AGX Dynamics  2.37.3.2
agx::CubicSplineLookupTable Class Reference

Base class for spline interpolation between the inserted variable/value pairs. More...

#include <LookupTables.h>

+ Inheritance diagram for agx::CubicSplineLookupTable:

Public Member Functions

 CubicSplineLookupTable ()
 
virtual void clear () override
 clear all data More...
 
const char * getClassName () const override
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void insertValue (const agx::Real x, const agx::Real y) override
 insert a value to the lookup table. More...
 
virtual agx::Real lookup (const agx::Real x) const override
 Lookup a specific value. More...
 
virtual agx::Real lookupDerivative (const agx::Real x) const
 
virtual bool restore (agxStream::StorageStream &str)
 Restores internal data from stream. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual bool store (agxStream::StorageStream &str) const
 Stores internal data into stream. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agx::LookupTable
 LookupTable ()
 Create a lookup table. More...
 
agx::Real getDefaultValue () const
 
size_t getNumValues () const
 return the number of values in the lookup table More...
 
RealPairList::const_iterator getValueEndIterator () const
 
RealPairList::const_iterator getValueIterator () const
 
virtual agx::Real resultScalerFunction () const
 Scale the found value. More...
 
void setDefaultValue (agx::Real defaultValue)
 Set the default return value, if the table has been cleared. More...
 
virtual void setValues (RealPairVector const &values)
 Set all lookup values at the same time (all previous will be removed.) More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

virtual ~CubicSplineLookupTable ()
 
- Protected Member Functions inherited from agx::LookupTable
virtual ~LookupTable ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Protected Attributes

CubicFunction2DRef m_spline
 
- Protected Attributes inherited from agx::LookupTable
agx::Real m_defaultValue
 
RealPairList m_xyPair
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Detailed Description

Base class for spline interpolation between the inserted variable/value pairs.

Definition at line 172 of file LookupTables.h.

Constructor & Destructor Documentation

◆ CubicSplineLookupTable()

agx::CubicSplineLookupTable::CubicSplineLookupTable ( )

◆ ~CubicSplineLookupTable()

virtual agx::CubicSplineLookupTable::~CubicSplineLookupTable ( )
inlineprotectedvirtual

Definition at line 201 of file LookupTables.h.

Member Function Documentation

◆ clear()

virtual void agx::CubicSplineLookupTable::clear ( )
overridevirtual

clear all data

Reimplemented from agx::LookupTable.

◆ create() [1/2]

static agxStream::Serializable* agx::CubicSplineLookupTable::create ( )
inlinestatic

Definition at line 199 of file LookupTables.h.

◆ create() [2/2]

static agxStream::Serializable* agx::CubicSplineLookupTable::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 199 of file LookupTables.h.

◆ getClassName()

const char* agx::CubicSplineLookupTable::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 199 of file LookupTables.h.

◆ getConstructClassId()

static const char* agx::CubicSplineLookupTable::getConstructClassId ( )
inlinestatic

Definition at line 199 of file LookupTables.h.

◆ getStorageAgent()

agxStream::StorageAgent* agx::CubicSplineLookupTable::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 199 of file LookupTables.h.

◆ insertValue()

virtual void agx::CubicSplineLookupTable::insertValue ( const agx::Real  x,
const agx::Real  y 
)
overridevirtual

insert a value to the lookup table.

Parameters
x- the lookup variable to be calculated using lookup
y- the defined value for that specific lookup variable.

Reimplemented from agx::LookupTable.

◆ lookup()

virtual agx::Real agx::CubicSplineLookupTable::lookup ( const agx::Real  x) const
overridevirtual

Lookup a specific value.

Implements agx::LookupTable.

◆ lookupDerivative()

virtual agx::Real agx::CubicSplineLookupTable::lookupDerivative ( const agx::Real  x) const
virtual

◆ restore() [1/2]

virtual bool agx::CubicSplineLookupTable::restore ( agxStream::StorageStream &  str)
virtual

Restores internal data from stream.

◆ restore() [2/2]

virtual void agx::CubicSplineLookupTable::restore ( agxStream::InputArchive &  in)
overridevirtual

◆ store() [1/2]

virtual bool agx::CubicSplineLookupTable::store ( agxStream::StorageStream &  str) const
virtual

Stores internal data into stream.

◆ store() [2/2]

virtual void agx::CubicSplineLookupTable::store ( agxStream::OutputArchive &  out) const
overridevirtual

Member Data Documentation

◆ m_spline

CubicFunction2DRef agx::CubicSplineLookupTable::m_spline
protected

Definition at line 202 of file LookupTables.h.


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