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

A constant class to hold a constant as a term. More...

#include <ossimTerm.h>

Inheritance diagram for ossimConst:
ossimTerm

Public Member Functions

 ossimConst (const ossim_float64 &value)
 Public Constructor. More...
 
 ossimConst (const ossimConst &src)
 Public Copy Constructor. More...
 
 ~ossimConst ()
 Destroys the constant. More...
 
ossim_float64 evaluate (std::vector< ossim_float64 >) const
 Evaluates a constant for a point. More...
 
ossimTermderivative (const ossim_uint32 &variable) const
 Calculates the derivative for a constant. More...
 
ossim_uint32 getType () const
 Gets the type of a constant. More...
 
ossimTermcopy () const
 Creates a copy of the constant. 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

ossim_float64 val
 

Detailed Description

A constant class to hold a constant as a term.

Definition at line 372 of file ossimTerm.h.

Constructor & Destructor Documentation

◆ ossimConst() [1/2]

ossimConst::ossimConst ( const ossim_float64 value)
inline

Public Constructor.

Parameters
[in]valueThe value of the constant

Definition at line 382 of file ossimTerm.h.

Referenced by copy(), and derivative().

382 : val(value) {}
ossim_float64 val
Definition: ossimTerm.h:427

◆ ossimConst() [2/2]

ossimConst::ossimConst ( const ossimConst src)
inline

Public Copy Constructor.

Parameters
[in]srcThe source to be copied

Definition at line 388 of file ossimTerm.h.

388 : val(src.val) {}
ossim_float64 val
Definition: ossimTerm.h:427

◆ ~ossimConst()

ossimConst::~ossimConst ( )
inline

Destroys the constant.

Definition at line 392 of file ossimTerm.h.

392 {}

Member Function Documentation

◆ copy()

ossimTerm * ossimConst::copy ( ) const
virtual

Creates a copy of the constant.

Returns
A pointer to a copy of the constant

Implements ossimTerm.

Definition at line 179 of file ossimTerm.cpp.

References ossimConst(), and val.

179  {
180  return new ossimConst(val);
181 }
ossim_float64 val
Definition: ossimTerm.h:427
ossimConst(const ossim_float64 &value)
Public Constructor.
Definition: ossimTerm.h:382

◆ derivative()

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

Calculates the derivative for a constant.

OSSIM CONSTANT 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 constant

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 168 of file ossimTerm.cpp.

References ossimConst().

169 {
170  return new ossimConst(0);
171 }
ossimConst(const ossim_float64 &value)
Public Constructor.
Definition: ossimTerm.h:382

◆ evaluate()

ossim_float64 ossimConst::evaluate ( std::vector< ossim_float64 ) const
inlinevirtual

Evaluates a constant for a point.

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

Implements ossimTerm.

Definition at line 402 of file ossimTerm.h.

402 { return val; }
ossim_float64 val
Definition: ossimTerm.h:427

◆ getType()

ossim_uint32 ossimConst::getType ( ) const
inlinevirtual

Gets the type of a constant.

Returns
The type of a constant

Implements ossimTerm.

Definition at line 418 of file ossimTerm.h.

References constant.

418 { return termType::constant; }

Member Data Documentation

◆ val

ossim_float64 ossimConst::val
private

Definition at line 427 of file ossimTerm.h.

Referenced by copy().


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