utility

Some General Purpose Utilities

These routines can be included individually; for example,

# include <cppad/utility/vector.hpp>

only includes the definitions necessary for the CppAD::vector class. They can also be included as a group, separate from the rest of CppAD, using

# include <cppad/utility.hpp>

They will also be included, along with the rest of CppAD, using

# include <cppad/cppad.hpp>

Testing

The routines listed below support numerical correctness and speed testing:

NearEqual

Determine if Two Values Are Nearly Equal

time_test

Determine Amount of Time to Execute a Test

speed_test

Run One Speed Test and Return Results

SpeedTest

Run One Speed Test and Print Results

test_boolofvoid

Object that Runs a Group of Tests

C++ Concepts

We refer to a the set of classes that satisfy certain conditions as a C++ concept. The following concepts are used by the CppAD Template library:

NumericType

Definition of a Numeric Type

CheckNumericType

Check NumericType Class Concept

SimpleVector

C++ Concept: A Simple Vector

CheckSimpleVector

Check Simple Vector Concept

General Numerical Routines

The routines listed below are general purpose numerical routines written with the floating point type a C++ template parameter. This enables them to be used with algorithmic differentiation types, as well as for other purposes.

nan

Obtain Nan or Determine if a Value is Nan

pow_int

The Integer Power Function

Poly

Evaluate a Polynomial or its Derivative

lu_det_and_solve

Compute Determinants and Solve Equations by LU Factorization

RombergOne

One DimensionalRomberg Integration

RombergMul

Multi-dimensional Romberg Integration

Runge45

An Embedded 4th and 5th Order Runge-Kutta ODE Solver

Rosen34

A 3rd and 4th Order Rosenbrock ODE Solver

OdeErrControl

An Error Controller for ODE Solvers

OdeGear

An Arbitrary Order Gear Method

OdeGearControl

An Error Controller for Gear’s Ode Solvers

Miscellaneous

Error Handler

All of the routines in the CppAD namespace use the following general purpose error handler:

ErrorHandler

Replacing the CppAD Error Handler

The CppAD Vector Template Class

This is a simple implementation of a template vector class (that is easy to view in a C++ debugger):

CppAD_vector

The CppAD::vector Template Class

Multi-Threading Memory Allocation

thread_alloc

A Fast Multi-Threading Memory Allocator

Sorting Indices

index_sort

Returns Indices that Sort a Vector

to_string

to_string

Convert Certain Types to a String

set_union

set_union

Union of Standard Sets

Sparse Matrices

sparse_rc

Row and Column Index Sparsity Patterns

sparse_rcv

Sparse Matrix Row, Column, Value Representation

sparse2eigen

Convert A CppAD Sparse Matrix to an Eigen Sparse Matrix

Dynamic Libraries

create_dll_lib

Create a Dynamic Link Library

link_dll_lib

Link a Dynamic Link Library