OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | List of all members
ossimProd Class Reference

A polynomial class to hold a product as a term. More...

#include <ossimTerm.h>

Inheritance diagram for ossimProd:
ossimTerm

Public Member Functions

 ossimProd (ossimTerm *leftTerm, ossimTerm *rightTerm)
 Public Constructor. More...
 
 ossimProd (const ossimProd &src)
 Public Copy Constructor. More...
 
 ~ossimProd ()
 Destroys the product. More...
 
ossim_float64 evaluate (std::vector< ossim_float64 > point) const
 Evaluates a product for a point. More...
 
ossimTermderivative (const ossim_uint32 &variable) const
 Calculates the derivative for a product. More...
 
ossim_uint32 getType () const
 Gets the type of a product. More...
 
ossimTermcopy () const
 Creates a copy of the product. More...
 
- Public Member Functions inherited from ossimTerm
virtual ~ossimTerm ()
 Virtual destructor for destroying tree from the top node. More...
 
ossim_float64 operator() (std::vector< ossim_float64 > point) const
 Evaluates the function for a point. More...
 
ossimTermoperator+ (ossimTerm *rhs) const
 Returns a copy of the two terms in a polynomial. More...
 
ossimTermoperator* (ossimTerm *rhs) const
 Returns a copy of the two terms in a product. More...
 

Private Attributes

ossimTermlTerm
 
ossimTermrTerm
 

Detailed Description

A polynomial class to hold a product as a term.

Definition at line 244 of file ossimTerm.h.

Constructor & Destructor Documentation

◆ ossimProd() [1/2]

ossimProd::ossimProd ( ossimTerm leftTerm,
ossimTerm rightTerm 
)
inline

Public Constructor.

Parameters
leftTermThe left term
rightTermThe right term

Definition at line 254 of file ossimTerm.h.

Referenced by copy(), and derivative().

254 : lTerm(leftTerm), rTerm(rightTerm) {}
ossimTerm * lTerm
Definition: ossimTerm.h:299
ossimTerm * rTerm
Definition: ossimTerm.h:300

◆ ossimProd() [2/2]

ossimProd::ossimProd ( const ossimProd src)
inline

Public Copy Constructor.

Parameters
[in]srcThe source to be copied

Definition at line 260 of file ossimTerm.h.

260 : lTerm(src.lTerm->copy()), rTerm(src.rTerm->copy()) {}
ossimTerm * lTerm
Definition: ossimTerm.h:299
ossimTerm * rTerm
Definition: ossimTerm.h:300
virtual ossimTerm * copy() const =0
Returns a pointer to a copy of the term.

◆ ~ossimProd()

ossimProd::~ossimProd ( )
inline

Destroys the product.

Definition at line 264 of file ossimTerm.h.

264 { delete lTerm; delete rTerm; }
ossimTerm * lTerm
Definition: ossimTerm.h:299
ossimTerm * rTerm
Definition: ossimTerm.h:300

Member Function Documentation

◆ copy()

ossimTerm * ossimProd::copy ( ) const
virtual

Creates a copy of the product.

Returns
A pointer to a copy of the product

Implements ossimTerm.

Definition at line 121 of file ossimTerm.cpp.

References ossimTerm::copy(), lTerm, ossimProd(), and rTerm.

121  {
122  return new ossimProd(lTerm->copy(), rTerm->copy());
123 }
ossimTerm * lTerm
Definition: ossimTerm.h:299
ossimTerm * rTerm
Definition: ossimTerm.h:300
virtual ossimTerm * copy() const =0
Returns a pointer to a copy of the term.
ossimProd(ossimTerm *leftTerm, ossimTerm *rightTerm)
Public Constructor.
Definition: ossimTerm.h:254

◆ derivative()

ossimTerm * ossimProd::derivative ( const ossim_uint32 variable) const
virtual

Calculates the derivative for a product.

OSSIM PRODUCT AS A TERM.

Parameters
[in]variableThe variable in which the derivative is with respect too.
Returns
A pointer to that contains the derivative of the term.

Calculates the derivative for a product

Parameters
[in]variableThe variable in which the derivative is with respect too.
Returns
A pointer to that contains the derivative of the term.

Implements ossimTerm.

Definition at line 111 of file ossimTerm.cpp.

References ossimTerm::copy(), ossimTerm::derivative(), lTerm, ossimProd(), rTerm, and variable.

111  {
113 }
virtual ossimTerm * derivative(const ossim_uint32 &variable) const =0
Calculates the derivative of the term.
A polynomial class to hold a polynomial as a term.
Definition: ossimTerm.h:179
ossimTerm * lTerm
Definition: ossimTerm.h:299
ossimTerm * rTerm
Definition: ossimTerm.h:300
virtual ossimTerm * copy() const =0
Returns a pointer to a copy of the term.
ossimProd(ossimTerm *leftTerm, ossimTerm *rightTerm)
Public Constructor.
Definition: ossimTerm.h:254

◆ evaluate()

ossim_float64 ossimProd::evaluate ( std::vector< ossim_float64 point) const
inlinevirtual

Evaluates a product for a point.

Parameters
[in]pointThe point to be evaluated
Returns
The value at a point.

Implements ossimTerm.

Definition at line 274 of file ossimTerm.h.

274 { return lTerm->evaluate(point) * rTerm->evaluate(point); }
virtual ossim_float64 evaluate(std::vector< ossim_float64 >) const =0
Evaluates a term at a given point PURE VIRTUAL.
ossimTerm * lTerm
Definition: ossimTerm.h:299
ossimTerm * rTerm
Definition: ossimTerm.h:300

◆ getType()

ossim_uint32 ossimProd::getType ( ) const
inlinevirtual

Gets the type of a product.

Returns
The type of a product

Implements ossimTerm.

Definition at line 290 of file ossimTerm.h.

References product.

290 { return termType::product; }

Member Data Documentation

◆ lTerm

ossimTerm* ossimProd::lTerm
private

Definition at line 299 of file ossimTerm.h.

Referenced by copy(), and derivative().

◆ rTerm

ossimTerm* ossimProd::rTerm
private

Definition at line 300 of file ossimTerm.h.

Referenced by copy(), and derivative().


The documentation for this class was generated from the following files: