----------------------------------------------------------------- lines 8-96 of file: include/cppad/utility/check_simple_vector.hpp ----------------------------------------------------------------- {xrst_begin CheckSimpleVector} Check Simple Vector Concept ########################### Syntax ****** | # ``include `` | ``CheckSimpleVector`` < *Scalar* , *Vector* >() | ``CheckSimpleVector`` < *Scalar* , *Vector* >( *x* , *y* ) Purpose ******* Preforms compile and run time checks that the type specified by *Vector* satisfies all the requirements for a :ref:`SimpleVector-name` class with :ref:`elements of type` *Scalar* . If a requirement is not satisfied, a an error message makes it clear what condition is not satisfied. Vector ****** is the vector type we are checking. Scalar ****** is the type corresponding to the elements of an *Vector* . x, y **** If the arguments *x* and *y* are present, they have prototype | |tab| ``const`` *Scalar* & *x* | |tab| ``const`` *Scalar* & *y* In addition, the check *x* == *x* will return the boolean value ``true`` , and *x* == *y* will return ``false`` . Restrictions ************ If the arguments *x* and *y* are not present, the following extra assumption is made by ``CheckSimpleVector`` : If *x* is a *Scalar* object | |tab| *x* = 0 | |tab| *y* = 1 assigns values to the objects *x* and *y* . In addition, *x* == *x* would return the boolean value ``true`` and *x* == *y* would return ``false`` . Include ******* The file ``cppad/utility/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. Parallel Mode ************* This routine must be called before entering parallel mode because it has static variables that must be initialized. If it's first call is not in parallel mode, and NDEBUG is not defined, you will get an assertion. Running in the debugger and going to the stack frame where CheckSimpleVector is called may help you determine what the value of *Scalar* and *Vector* need to be initialized. Example ******* {xrst_toc_hidden example/utility/check_simple_vector.cpp } The file :ref:`check_simple_vector.cpp-name` contains an example and test of this function where *S* is the same as *T* . The comments in this example suggest a way to change the example so *S* is not the same as *T* . {xrst_end CheckSimpleVector}