Syntax
# include <cppad/check_simple_vector.hpp> CheckSimpleVector<Scalar, Vector>()
Purpose
The syntax
CheckSimpleVector<Scalar, Vector>() 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:
The type Scalar supports the syntax
Scalar(i) == Scalar(j)
where i and j are either 0 or 1.
In addition, this syntax returns the value true (false) if and only if
i equals j.
(i does not equal j).
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