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

#include <sectioned_index_pattern.hpp>

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

Public Member Functions

 SectionedIndexPattern (const std::map< size_t, IndexPattern * > &sections)
 
const std::map< size_t, IndexPattern * > & getLinearSections () const
 
IndexPatternType getType () const override
 
void getSubIndexes (std::set< IndexPattern * > &indexes) const override
 

Static Public Member Functions

template<class VectorSizeT >
static std::map< size_t, IndexPattern * > detectLinearSections (const VectorSizeT &indexes, size_t maxCount=0)
 
static std::map< size_t, IndexPattern * > detectLinearSections (const std::map< size_t, size_t > &x2y, size_t maxCount=0)
 
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, IndexPattern * > sections_
 

Detailed Description

Several linear patterns

Definition at line 25 of file sectioned_index_pattern.hpp.

Constructor & Destructor Documentation

◆ SectionedIndexPattern()

CppAD::cg::SectionedIndexPattern::SectionedIndexPattern ( const std::map< size_t, IndexPattern * > &  sections)
inline

Definition at line 33 of file sectioned_index_pattern.hpp.

◆ ~SectionedIndexPattern()

virtual CppAD::cg::SectionedIndexPattern::~SectionedIndexPattern ( )
inlinevirtual

Definition at line 52 of file sectioned_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().

◆ detectLinearSections() [1/2]

static std::map< size_t, IndexPattern * > CppAD::cg::SectionedIndexPattern::detectLinearSections ( const std::map< size_t, size_t > &  x2y,
size_t  maxCount = 0 
)
inlinestatic

Definition at line 121 of file sectioned_index_pattern.hpp.

◆ detectLinearSections() [2/2]

template<class VectorSizeT >
static std::map< size_t, IndexPattern * > CppAD::cg::SectionedIndexPattern::detectLinearSections ( const VectorSizeT &  indexes,
size_t  maxCount = 0 
)
inlinestatic

Definition at line 61 of file sectioned_index_pattern.hpp.

◆ getLinearSections()

const std::map< size_t, IndexPattern * > & CppAD::cg::SectionedIndexPattern::getLinearSections ( ) const
inline

Definition at line 37 of file sectioned_index_pattern.hpp.

◆ getSubIndexes()

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

Implements CppAD::cg::IndexPattern.

Definition at line 45 of file sectioned_index_pattern.hpp.

◆ getType()

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

Implements CppAD::cg::IndexPattern.

Definition at line 41 of file sectioned_index_pattern.hpp.

◆ isConstant()

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

Definition at line 53 of file index_pattern_impl.hpp.

Member Data Documentation

◆ sections_

std::map<size_t, IndexPattern*> CppAD::cg::SectionedIndexPattern::sections_
protected

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

Definition at line 30 of file sectioned_index_pattern.hpp.


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