ADOL-C: Automatic Differentiation in C/C++ 2.7.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ADOLC::AbsNormalForm Struct Reference

Dense abs-normal form container backed by contiguous storage. More...

#include <absnormalform.h>

Collaboration diagram for ADOLC::AbsNormalForm:
Collaboration graph
[legend]

Public Types

using Shape = DenseShape
 

Public Member Functions

 ~AbsNormalForm ()=default
 
 AbsNormalForm ()=default
 
 AbsNormalForm (Shape dims)
 Construct a dense abs-normal form with the requested principal dimensions.
 
 AbsNormalForm (AbsNormalForm &&)=default
 
AbsNormalForm & operator= (AbsNormalForm &&)=default
 
 AbsNormalForm (const AbsNormalForm &)=delete
 
AbsNormalForm & operator= (const AbsNormalForm &)=delete
 
bool empty () const
 Report whether all principal dimensions are zero.
 
void clear ()
 Clear all stored data and reset the principal dimensions to {0, 0, 0}.
 
Shape dims () const
 Return the principal abs-normal form dimensions.
 
void updateCy ()
 Compute cy = y - J|z| from the current data.
 
void updateCz ()
 Compute cz = z - L|z| from the current data.
 
void resize (Shape dims)
 Resize the abs-normal form to the given principal dimensions.
 

Static Public Member Functions

static AbsNormalForm fromTape (short tapeId)
 Allocate an abs-normal form using the dimensions of a recorded tape.
 

Public Attributes

Shape shape {}
 Principal dimensions of the represented abs-normal form.
 
std::vector< double * > Y
 Row-pointer view of the m x n block Y.
 
std::vector< double * > J
 Row-pointer view of the m x s block J.
 
std::vector< double * > Z
 Row-pointer view of the s x n block Z.
 
std::vector< double * > L
 Row-pointer view of the s x s block L.
 
std::vector< double > Y_storage
 Owning contiguous storage for Y.
 
std::vector< double > J_storage
 Owning contiguous storage for J.
 
std::vector< double > Z_storage
 Owning contiguous storage for Z.
 
std::vector< double > L_storage
 Owning contiguous storage for L.
 
std::vector< double > cz
 Constant term of the switching equations.
 
std::vector< double > cy
 Constant term of the dependent equations.
 
std::vector< double > y
 Dependent values at the evaluation point.
 
std::vector< double > z
 Switching-variable values at the evaluation point.
 

Detailed Description

Dense abs-normal form container backed by contiguous storage.

The flat *_storage vectors own the matrix entries, while Y, J, Z, and L provide row-pointer views compatible with the existing driver interfaces.

Member Typedef Documentation

◆ Shape

Constructor & Destructor Documentation

◆ ~AbsNormalForm()

ADOLC::AbsNormalForm::~AbsNormalForm ( )
default

◆ AbsNormalForm() [1/4]

ADOLC::AbsNormalForm::AbsNormalForm ( )
default

◆ AbsNormalForm() [2/4]

ADOLC::AbsNormalForm::AbsNormalForm ( Shape  dims)
inlineexplicit

Construct a dense abs-normal form with the requested principal dimensions.

Storage is allocated immediately using the same semantics as resize().

◆ AbsNormalForm() [3/4]

ADOLC::AbsNormalForm::AbsNormalForm ( AbsNormalForm &&  )
default

◆ AbsNormalForm() [4/4]

ADOLC::AbsNormalForm::AbsNormalForm ( const AbsNormalForm &  )
delete

Member Function Documentation

◆ clear()

void ADOLC::AbsNormalForm::clear ( )

Clear all stored data and reset the principal dimensions to {0, 0, 0}.

All owning buffers and row-pointer views become empty.

◆ dims()

Shape ADOLC::AbsNormalForm::dims ( ) const
inline

Return the principal abs-normal form dimensions.

◆ empty()

bool ADOLC::AbsNormalForm::empty ( ) const
inline

Report whether all principal dimensions are zero.

◆ fromTape()

static AbsNormalForm ADOLC::AbsNormalForm::fromTape ( short  tapeId)
inlinestatic

Allocate an abs-normal form using the dimensions of a recorded tape.

Parameters
tapeIdTape identifier whose dependent, independent, and switching counts determine the returned principal dimensions.

◆ operator=() [1/2]

AbsNormalForm & ADOLC::AbsNormalForm::operator= ( AbsNormalForm &&  )
default

◆ operator=() [2/2]

AbsNormalForm & ADOLC::AbsNormalForm::operator= ( const AbsNormalForm &  )
delete

◆ resize()

void ADOLC::AbsNormalForm::resize ( Shape  dims)

Resize the abs-normal form to the given principal dimensions.

All owning buffers are resized with vector semantics, and the row-pointer views are rebuilt to point into the resized contiguous storage.

◆ updateCy()

void ADOLC::AbsNormalForm::updateCy ( )
inline

Compute cy = y - J|z| from the current data.

◆ updateCz()

void ADOLC::AbsNormalForm::updateCz ( )
inline

Compute cz = z - L|z| from the current data.

Member Data Documentation

◆ cy

std::vector<double> ADOLC::AbsNormalForm::cy

Constant term of the dependent equations.

◆ cz

std::vector<double> ADOLC::AbsNormalForm::cz

Constant term of the switching equations.

◆ J

std::vector<double *> ADOLC::AbsNormalForm::J

Row-pointer view of the m x s block J.

◆ J_storage

std::vector<double> ADOLC::AbsNormalForm::J_storage

Owning contiguous storage for J.

◆ L

std::vector<double *> ADOLC::AbsNormalForm::L

Row-pointer view of the s x s block L.

◆ L_storage

std::vector<double> ADOLC::AbsNormalForm::L_storage

Owning contiguous storage for L.

◆ shape

Shape ADOLC::AbsNormalForm::shape {}

Principal dimensions of the represented abs-normal form.

◆ Y

std::vector<double *> ADOLC::AbsNormalForm::Y

Row-pointer view of the m x n block Y.

◆ y

std::vector<double> ADOLC::AbsNormalForm::y

Dependent values at the evaluation point.

◆ Y_storage

std::vector<double> ADOLC::AbsNormalForm::Y_storage

Owning contiguous storage for Y.

◆ Z

std::vector<double *> ADOLC::AbsNormalForm::Z

Row-pointer view of the s x n block Z.

◆ z

std::vector<double> ADOLC::AbsNormalForm::z

Switching-variable values at the evaluation point.

◆ Z_storage

std::vector<double> ADOLC::AbsNormalForm::Z_storage

Owning contiguous storage for Z.


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