CppADCodeGen  HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
CppAD::cg::Plane2DIndexPattern Class Reference
Inheritance diagram for CppAD::cg::Plane2DIndexPattern:
Inheritance graph
Collaboration diagram for CppAD::cg::Plane2DIndexPattern:
Collaboration graph

Public Member Functions

 Plane2DIndexPattern (IndexPattern *pattern1, IndexPattern *pattern2)
 
 Plane2DIndexPattern (const Plane2DIndexPattern &orig)=delete
 
const IndexPatterngetPattern1 () const
 
const IndexPatterngetPattern2 () const
 
IndexPatternType getType () const override
 
void getSubIndexes (std::set< IndexPattern *> &indexes) const override
 

Static Public Member Functions

static Plane2DIndexPatterndetectPlane2D (const std::map< size_t, std::map< size_t, size_t > > &x2y2z)
 
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

IndexPatternpattern1_
 
IndexPatternpattern2_
 

Detailed Description

A plane index pattern (2D) defined by two index patterns for each index coordinate

z = f1(x) + f2(y)

Definition at line 28 of file plane_2d_index_pattern.hpp.

Member Function Documentation

◆ detect() [1/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 detectPlane2D(), CppAD::cg::LoopModel< Base >::getIndexedTapeIndexes(), CppAD::cg::ModelCSourceGen< Base >::prepareSparseForwardOneWithLoops(), CppAD::cg::ModelCSourceGen< Base >::prepareSparseJacobianRowWithLoops(), and CppAD::cg::ModelCSourceGen< Base >::prepareSparseReverseOneWithLoops().

◆ detect() [2/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.

◆ detectPlane2D()

static Plane2DIndexPattern* CppAD::cg::Plane2DIndexPattern::detectPlane2D ( const std::map< size_t, std::map< size_t, size_t > > &  x2y2z)
inlinestatic

try to fit a combination of two patterns: z = fStart(x) + flit(y);

try to fit a combination of two patterns: z = fStart(x) + flit(y);

try to detect a pattern for the initial iteration index based on x

try to detect a pattern for the following iterations based on the local loop index (local index != model index)

only need to keep one

Definition at line 78 of file plane_2d_index_pattern.hpp.

Referenced by CppAD::cg::ModelCSourceGen< Base >::prepareSparseForwardOneWithLoops().

Member Data Documentation

◆ pattern1_

IndexPattern* CppAD::cg::Plane2DIndexPattern::pattern1_
protected

maps the start of the linear section (first x) to the linear pattern

Definition at line 33 of file plane_2d_index_pattern.hpp.


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