Prev Next

Check Simple Vector Concept

Syntax
# include <cppad/check_simple_vector.hpp>

CheckSimpleVector<ScalarVector>()

Purpose
The syntax
     CheckSimpleVector<
ScalarVector>()
preforms compile and run time checks that the type specified by Vector satisfies all the requirements for a SimpleVector class with elements of type Scalar . If a requirement is not satisfied, a an error message makes it clear what condition is not satisfied.

Restrictions
The following extra assumption is made by CheckSimpleVector: If x is a Scalar object and i is an int,
     
x = i
assigns the object x the value of the value of i. If y is another Scalar object,
     
x = y
assigns the object x the value of y.

Include
The file cppad/check_simple_vector.hpp is included by cppad/cppad.hpp but it can also be included separately with out the rest if the CppAD include files.

Example
The file CheckSimpleVector.cpp contains an example and test of this function where S is the same as T. It returns true, if it succeeds an false otherwise. The comments in this example suggest a way to change the example so S is not the same as T.
Input File: cppad/check_simple_vector.hpp