CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::Random1DIndexPattern Class Reference

#include <random_1d_index_pattern.hpp>

Inheritance diagram for CppAD::cg::Random1DIndexPattern:
Inheritance graph
Collaboration diagram for CppAD::cg::Random1DIndexPattern:
Collaboration graph

Public Member Functions

template<class VectorSizeT >
 Random1DIndexPattern (const VectorSizeT &x2y)
 
 Random1DIndexPattern (const std::map< size_t, size_t > &x2y)
 
IndexPatternType getType () const override
 
const std::map< size_t, size_t > & getValues () const
 
void getSubIndexes (std::set< IndexPattern * > &indexes) const override
 
const std::string & getName () const
 
void setName (const std::string &name)
 

Static Public Member Functions

template<class VectorSizeT >
static IndexPatterndetect (const VectorSizeT &x2y)
 
static IndexPatterndetect (const std::map< size_t, size_t > &x2y)
 
static bool isConstant (const IndexPattern &ip)
 

Protected Attributes

std::map< size_t, size_t > indexes_
 
std::string name_
 

Detailed Description

Random pattern

Definition at line 25 of file random_1d_index_pattern.hpp.

Constructor & Destructor Documentation

◆ Random1DIndexPattern() [1/2]

template<class VectorSizeT >
CppAD::cg::Random1DIndexPattern::Random1DIndexPattern ( const VectorSizeT &  x2y)
inline

Definition at line 32 of file random_1d_index_pattern.hpp.

◆ Random1DIndexPattern() [2/2]

CppAD::cg::Random1DIndexPattern::Random1DIndexPattern ( const std::map< size_t, size_t > &  x2y)
inline

Definition at line 40 of file random_1d_index_pattern.hpp.

Member Function Documentation

◆ detect() [1/2]

IndexPattern * CppAD::cg::IndexPattern::detect ( const std::map< size_t, size_t > &  x2y)
inlinestaticinherited

Detects the index pattern for the provided points (y = f(x))

Parameters
indexXthe index of the independents (x)
x2ymaps the independents to the dependents (x,y)
Returns
the generated index pattern (must be deleted by user)

Definition at line 38 of file index_pattern_impl.hpp.

◆ detect() [2/2]

template<class VectorSizeT >
IndexPattern * CppAD::cg::IndexPattern::detect ( const VectorSizeT &  x2y)
inlinestaticinherited

Detects the index pattern for the provided points (y = f(x))

Parameters
indexXthe index of the independents (x)
x2ymaps the independents to the dependents (indexes[x] = y )
Returns
the generated index pattern (must be deleted by user)

Definition at line 22 of file index_pattern_impl.hpp.

Referenced by CppAD::cg::Plane2DIndexPattern::detectPlane2D(), CppAD::cg::ModelCSourceGen< Base >::prepareSparseForwardOneWithLoops(), CppAD::cg::ModelCSourceGen< Base >::prepareSparseReverseOneWithLoops(), and CppAD::cg::ModelCSourceGen< Base >::prepareSparseReverseTwoWithLoops().

◆ getName()

const std::string & CppAD::cg::RandomIndexPattern::getName ( ) const
inlineinherited

Definition at line 34 of file random_index_pattern.hpp.

◆ getSubIndexes()

void CppAD::cg::RandomIndexPattern::getSubIndexes ( std::set< IndexPattern * > &  indexes) const
inlineoverridevirtualinherited

Implements CppAD::cg::IndexPattern.

Definition at line 30 of file random_index_pattern.hpp.

◆ getType()

IndexPatternType CppAD::cg::Random1DIndexPattern::getType ( ) const
inlineoverridevirtual

Implements CppAD::cg::IndexPattern.

Definition at line 45 of file random_1d_index_pattern.hpp.

◆ getValues()

const std::map< size_t, size_t > & CppAD::cg::Random1DIndexPattern::getValues ( ) const
inline

Definition at line 49 of file random_1d_index_pattern.hpp.

◆ isConstant()

bool CppAD::cg::IndexPattern::isConstant ( const IndexPattern ip)
inlinestaticinherited

Definition at line 53 of file index_pattern_impl.hpp.

◆ setName()

void CppAD::cg::RandomIndexPattern::setName ( const std::string &  name)
inlineinherited

Definition at line 38 of file random_index_pattern.hpp.

Member Data Documentation

◆ indexes_

std::map<size_t, size_t> CppAD::cg::Random1DIndexPattern::indexes_
protected

Definition at line 27 of file random_1d_index_pattern.hpp.

◆ name_

std::string CppAD::cg::Random1DIndexPattern::name_
protected

Definition at line 28 of file random_1d_index_pattern.hpp.


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