\begin{cxxContents}
\cxxContentsEntry{1}{CDVector}{Vector class with double precision. }
\cxxContentsEntry{2}{CDMatrix}{Matrix class with double precision. }
\cxxContentsEntry{3}{warning}{}
\cxxContentsEntry{}{Class Graph}{}\end{cxxContents}
\begin{cxxclass}
{class\ }
        {CDVector}
        {:\ public\ virtual\ CVisDVector}
        {Vector class with double precision. }
        {1}
\cxxAuthor{
Rune Fisker, Mikkel B. Stegmann, 
Henrik Aanæs, Lars Pedersen et al.
\strut}
\cxxVersion{
2-5-2001
\strut}
\cxxSee{CDMatrix
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{}{CVisDVector}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{1}{CDVector}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{DIVAMatrixExport\ CDVector\&}
        {operator=}
        {(const\ CVisDVector\ \&vIn)}
        {Assignment operator. }
        {1.1}
\cxxitem{DIVAMatrixExport\ CDVector\&}
        {operator=}
        {(const\ CDVector\ \&vIn)}
        {Assignment operator. }
        {1.2}
\cxxitem{DIVAMatrixExport\ CDVector\&}
        {operator=}
        {(double\ value)}
        {Assignment operator. }
        {1.3}
\cxxitem{DIVAMatrixExport\ double}
        {Max}
        {()\ const\ }
        {Finds the maximum element in the vector. }
        {1.4}
\cxxitem{DIVAMatrixExport\ double}
        {Min}
        {()\ const\ }
        {Finds the minimum element in the vector. }
        {1.5}
\cxxitem{DIVAMatrixExport\ double}
        {Min}
        {(int\&\ iPos)\ const\ }
        {Finds the minimum element in the vector and its position. }
        {1.6}
\cxxitem{DIVAMatrixExport\ double}
        {Mean}
        {()\ const\ }
        {Calculates the mean value of the vector. }
        {1.7}
\cxxitem{DIVAMatrixExport\ double}
        {Skewness}
        {()\ const\ }
        {Calculates the skewness of the vector. }
        {1.8}
\cxxitem{DIVAMatrixExport\ double}
        {Std}
        {()\ const\ }
        {Calculates the standard deviation of the vector. }
        {1.9}
\cxxitem{DIVAMatrixExport\ double}
        {Sum}
        {()\ const\ }
        {Calculates the sum of the vector. }
        {1.10}
\cxxitem{DIVAMatrixExport\ double}
        {Var}
        {(\ double*\ pMean\ )\ const\ }
        {Calculates the variance of the vector. }
        {1.11}
\cxxitem{DIVAMatrixExport\ void}
        {Sort}
        {(\ bool\ ascending\ )}
        {Sorts the vector. }
        {1.12}
\cxxitem{DIVAMatrixExport\ void}
        {Sqr}
        {()}
        {Squares each element. }
        {1.13}
\cxxitem{DIVAMatrixExport\ void}
        {Sqrt}
        {()}
        {Takes the square root of each element. }
        {1.14}
\cxxitem{DIVAMatrixExport\ void}
        {Pow}
        {(double\ dP)}
        {Takes the power 'dP' of each element. }
        {1.15}
\cxxitem{DIVAMatrixExport\ void}
        {ElementMultiply}
        {(const\ CDVector\&\ vector)}
        {Multiplies two vectors element-wise. }
        {1.16}
\cxxitem{DIVAMatrixExport\ void}
        {ElementDivide}
        {(const\ CDVector\&\ vector)}
        {Divide two vectors element-wise. }
        {1.17}
\cxxitem{DIVAMatrixExport\ CDString}
        {ToString}
        {(const\ bool\ fNewline)\ const\ }
        {Returns a string representing the vector.  }
        {1.18}
\cxxitem{DIVAMatrixExport\ double}
        {Norm1}
        {()\ const\ }
        {Calculates the one-norm (L1) of the vector. }
        {1.19}
\cxxitem{DIVAMatrixExport\ double}
        {Norm2}
        {()\ const\ }
        {Calculates the two-norm (L2) of the vector.             }
        {1.20}
\cxxitem{DIVAMatrixExport\ double}
        {NormInf}
        {()\ const\ }
        {Calculates the infinity-norm (Linf) of the vector.             }
        {1.21}
\cxxitem{DIVAMatrixExport\ void}
        {Normalize2}
        {()}
        {Normalizes the vector to unit length, using the 2-norm. }
        {1.22}
\cxxitem{DIVAMatrixExport\ void}
        {ToMatlab}
        {(const\ CDString\&\ sFilename,\ const\ CDString\&\ sName,\ const\ CDString\&\ sComment,\ bool\ fAppend)\ const\ }
        {Writes the vector to disk in MatLab (.m) format. }
        {1.23}
\cxxitem{DIVAMatrixExport\ void}
        {FromMatlab}
        {(const\ CDString\&\ sFilename,\ const\ CDString\&\ sName)}
        {Reads a vector from disk in MatLab (.m) format. }
        {1.24}
\cxxitem{DIVAMatrixExport\ void}
        {ToFile}
        {(\ const\ CDString\&\ sFilename\ )\ const\ }
        {Writes the vector to disk in binary format. }
        {1.25}
\cxxitem{DIVAMatrixExport\ void}
        {FromFile}
        {(\ const\ CDString\&\ sFilename\ )}
        {Reads a vector from disk in binary format. }
        {1.26}
\cxxitem{DIVAMatrixExport\ void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the vector to disk in binary format. }
        {1.27}
\cxxitem{DIVAMatrixExport\ void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a vector from disk in binary format. }
        {1.28}
\cxxitem{DIVAMatrixExport\ void}
        {Eq}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Equal - compares a vector and a double.             }
        {1.29}
\cxxitem{DIVAMatrixExport\ void}
        {Eq}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Equal - compares a vector and a vector.             }
        {1.30}
\cxxitem{DIVAMatrixExport\ void}
        {Ne}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Not Equal - compares a double and a vector.             }
        {1.31}
\cxxitem{DIVAMatrixExport\ void}
        {Ne}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Not Equal - compares a vector and a vector.             }
        {1.32}
\cxxitem{DIVAMatrixExport\ void}
        {Lt}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than - compares a double and a vector.             }
        {1.33}
\cxxitem{DIVAMatrixExport\ void}
        {Lt}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than - compares a vector and a vector.             }
        {1.34}
\cxxitem{DIVAMatrixExport\ void}
        {Le}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than or Equal - compares a double and a vector.             }
        {1.35}
\cxxitem{DIVAMatrixExport\ void}
        {Le}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than or Equal - compares a vector and a vector.             }
        {1.36}
\cxxitem{DIVAMatrixExport\ void}
        {Gt}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than - compares a double and a vector.             }
        {1.37}
\cxxitem{DIVAMatrixExport\ void}
        {Gt}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than - compares a vector and a vector.             }
        {1.38}
\cxxitem{DIVAMatrixExport\ void}
        {Ge}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than or Equal - compares a double and a vector.             }
        {1.39}
\cxxitem{DIVAMatrixExport\ void}
        {Ge}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than or Equal - compares a vector and a vector.             }
        {1.40}
\cxxitem{DIVAMatrixExport\ void}
        {Log}
        {()}
        {Takes the natural logarithm of each element. }
        {1.41}
\cxxitem{DIVAMatrixExport\ void}
        {Abs}
        {()}
        {Takes the absolute valueof each element. }
        {1.42}
\cxxitem{DIVAMatrixExport\ void}
        {Reverse}
        {()}
        {Reverses the vector. }
        {1.43}
\cxxitem{DIVAMatrixExport\ void}
        {Rand}
        {()}
        {Uniformly distributed random numbers. }
        {1.44}
\cxxitem{DIVAMatrixExport\ void}
        {Rand}
        {(\ const\ int\ st,\ const\ int\ end\ )}
        {Uniformly distributed integer random numbers. }
        {1.45}
\cxxitem{DIVAMatrixExport\ void}
        {CrossProduct}
        {(\ const\ CDVector\ \&v1,\ const\ CDVector\ \&v2)}
        {Forms the cross product of two vectors. }
        {1.46}
\cxxitem{DIVAMatrixExport\ void}
        {Ceil}
        {()}
        {Takes ceil() of each element. }
        {1.47}
\cxxitem{DIVAMatrixExport\ void}
        {Floor}
        {()}
        {Takes floor() of each element. }
        {1.48}
\cxxitem{DIVAMatrixExport\ void}
        {Round}
        {()}
        {Takes round() of each element. }
        {1.49}
\cxxitem{DIVAMatrixExport\ void}
        {Linspace}
        {(\ const\ double\ x1,\ const\ double\ x2,\ const\ int\ n\ )}
        {Generates a vector of linearly equally spaced points  between x1 and x2 (inclusive). }
        {1.50}
\cxxitem{DIVAMatrixExport\ CDVector}
        {Range}
        {(\ const\ int\ st,\ const\ int\ end)\ const\ }
        {Returns a sub range of a vector. }
        {1.51}
\cxxitem{DIVAMatrixExport\ void}
        {ToMatrix}
        {(\ const\ int\ nRows,\ const\ int\ nCols,\ CDMatrix\ \&m,\ bool\ rowWise\ )}
        {Converts this vector to a matrix. }
        {1.52}
\cxxitem{DIVAMatrixExport\ CDVector}
        {VecCat}
        {(\ const\ CDVector\ \&v\ )\ const\ }
        {Concatenates a vector to the end of this vector. }
        {1.53}
\cxxitem{DIVAMatrixExport\ void}
        {Clamp}
        {(\ const\ double\ min,\ const\ double\ max\ )}
        {Clamps the vector to [min,max]. }
        {1.54}
\cxxitem{DIVAMatrixExport\ void}
        {AlignTo}
        {(\ const\ CDVector\ \&v,\ double*\ pA,\ double*\ pB\ )}
        {Linear alignment of this vector to another vector using the L2 norm. }
        {1.55}
\cxxitem{DIVAMatrixExport\ double}
        {AutoCorrelation}
        {(\ const\ int\ lag\ )\ const\ }
        {Calculates the autocorrelation of the vector. }
        {1.56}
\cxxitem{DIVAMatrixExport\ void}
        {Shuffle}
        {()}
        {Shuffles (randomizes) the vector. }
        {1.57}
\cxxitem{DIVAMatrixExport\ double}
        {Median}
        {()\ const\ }
        {Calculates the median. }
        {1.58}
\cxxitem{DIVAMatrixExport\ CDVector}
        {Trim}
        {(\ const\ double\ percentage\ )\ const\ }
        {Removes the extreme 'percentage' part of the vector. }
        {1.59}
\cxxitem{DIVAMatrixExport\ double}
        {TrimmedMean}
        {(\ const\ double\ percentage\ )\ const\ }
        {Calculates the trimmed mean. }
        {1.60}
\cxxitem{DIVAMatrixExport\ double}
        {TrimmedVar}
        {(\ const\ double\ percentage\ )\ const\ }
        {Calculates the trimmed variance. }
        {1.61}
\cxxitem{DIVAMatrixExport\ double}
        {TrimmedStd}
        {(\ const\ double\ percentage\ )\ const\ }
        {Calculates the trimmed standard deviation. }
        {1.62}
\end{cxxpublic}
\begin{cxxdoc}


Vector class with double precision based upon 
the VisSDK vector class CVisDVector.


\end{cxxdoc}
\begin{cxxfunction}
{DIVAMatrixExport\ CDVector\&}
        {operator=}
        {(const\ CVisDVector\ \&vIn)}
        {Assignment operator. }
        {1.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vIn} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Assignment operator. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDVector\&}
        {operator=}
        {(const\ CDVector\ \&vIn)}
        {Assignment operator. }
        {1.2}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vIn} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Assignment operator. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDVector\&}
        {operator=}
        {(double\ value)}
        {Assignment operator. }
        {1.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vIn} & Input double.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Assignment operator. Sets all element to the input value. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Max}
        {()\ const\ }
        {Finds the maximum element in the vector. }
        {1.4}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & maximum value of the elements.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Finds the maximum element in the vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Min}
        {()\ const\ }
        {Finds the minimum element in the vector. }
        {1.5}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & minimum value of the elements.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Finds the minimum element in the vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Min}
        {(int\&\ iPos)\ const\ }
        {Finds the minimum element in the vector and its position. }
        {1.6}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & minimum value of the elements and its position.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-9-1999
\strut}
\begin{cxxdoc}


Finds the minimum element in the vector and its position.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Mean}
        {()\ const\ }
        {Calculates the mean value of the vector. }
        {1.7}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & mean value.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Calculates the mean value of the vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Skewness}
        {()\ const\ }
        {Calculates the skewness of the vector. }
        {1.8}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & skewness.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Calculates the skewness the vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Std}
        {()\ const\ }
        {Calculates the standard deviation of the vector. }
        {1.9}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & skewness.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Calculates the standard deviation the vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Sum}
        {()\ const\ }
        {Calculates the sum of the vector. }
        {1.10}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & sum.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Calculates the sum of the vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Var}
        {(\ double*\ pMean\ )\ const\ }
        {Calculates the variance of the vector. }
        {1.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut pMean} & Optional pointer, where the mean is returned.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & variance.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-5-1999
\strut}
\begin{cxxdoc}


Calculates the variance the vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Sort}
        {(\ bool\ ascending\ )}
        {Sorts the vector. }
        {1.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut ascending} & If true (default) the vector is sorted in ascendingorder. If false its sorted in descending order.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-2-2001
\strut}
\begin{cxxdoc}


Sorts the vector in either ascending (default) or descending order.  
Implemented using the standard quicksort, qsort().

The STL sort is most likely faster, though.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Sqr}
        {()}
        {Squares each element. }
        {1.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-5-1999
\strut}
\begin{cxxdoc}


Squares each element.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Sqrt}
        {()}
        {Takes the square root of each element. }
        {1.14}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-5-1999
\strut}
\begin{cxxdoc}


Takes the square root of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Pow}
        {(double\ dP)}
        {Takes the power 'dP' of each element. }
        {1.15}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut dP} & The exponent.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-5-1999
\strut}
\begin{cxxdoc}


Takes the power 'dP' of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ElementMultiply}
        {(const\ CDVector\&\ vector)}
        {Multiplies two vectors element-wise. }
        {1.16}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vector} & The input vector to multiply this vector with.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-5-1999
\strut}
\begin{cxxdoc}


Multiplies two vectors element-wise.
Corresponding MatLab operator ".*".


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ElementDivide}
        {(const\ CDVector\&\ vector)}
        {Divide two vectors element-wise. }
        {1.17}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vector} & The input vector to divide this vector with.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-5-1999
\strut}
\begin{cxxdoc}


Divide two vectors element-wise.
Corresponding MatLab operator "./".


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDString}
        {ToString}
        {(const\ bool\ fNewline)\ const\ }
        {Returns a string representing the vector.  }
        {1.18}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fNewline} & If true, the string is terminated with a new line.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & output string.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
1-5-1999
\strut}
\begin{cxxdoc}


Returns a string representing the vector. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Norm1}
        {()\ const\ }
        {Calculates the one-norm (L1) of the vector. }
        {1.19}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & L1 norm.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Calculates the one-norm (L1) of the vector. 
Also known as the city block metric.

L1(v) = |x\_1| + |x\_2| .. + |x\_n|            


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Norm2}
        {()\ const\ }
        {Calculates the two-norm (L2) of the vector.             }
        {1.20}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & L2 norm.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Calculates the two-norm (L2) of the vector.
Also known as the Euclidean length.

L2(v) = sqrt( x\_1^2 + x\_2^2  .. + x\_n^2 )


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {NormInf}
        {()\ const\ }
        {Calculates the infinity-norm (Linf) of the vector.             }
        {1.21}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & L2 norm.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Calculates the infinity-norm (Linf) of the vector.
Also known as the Chebyshev Norm.

Linf(v) = max( |x\_1|, |x\_2| ... , |x\_n| )


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Normalize2}
        {()}
        {Normalizes the vector to unit length, using the 2-norm. }
        {1.22}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Normalizes the vector to unit length, using the 2-norm.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToMatlab}
        {(const\ CDString\&\ sFilename,\ const\ CDString\&\ sName,\ const\ CDString\&\ sComment,\ bool\ fAppend)\ const\ }
        {Writes the vector to disk in MatLab (.m) format. }
        {1.23}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Output file name. Should have the extension '.m'.
\\
{\tt\strut sName} & Name of destination matlab variable.
\\
{\tt\strut sComment} & Optional comment inside the file.
\\
{\tt\strut fAppend} & If true, the vector is appended to the file 'sFilename'.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Henrik Aanæs
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Writes the vector to disk in MatLab (.m) format.
To read the vector into MatLab write e.g. 
'my\_vector.m' at the MatLab prompt.  

Notice that this should be used for storage a (really)
large vectors, due to the computational and i/o overhead
induced by the simple MatLab text format.

Also, remember that MatLab can't read (.m) files with lines
longer than 4096 bytes.

If no communication with MatLab is needed, but merely 
to/from disk functionality within a DIVA program, it is
suggested to use the fast binary i/o methods ToFile() and
FromFile().      


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FromMatlab}
        {(const\ CDString\&\ sFilename,\ const\ CDString\&\ sName)}
        {Reads a vector from disk in MatLab (.m) format. }
        {1.24}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Input file name.
\\
{\tt\strut sName} & The name to search for (and load) inside the matlab file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Henrik Aanæs
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Reads a vector from disk in MatLab (.m) format into
'this'. 

Notice that this should be used for storage a (really)
large vectors, due to the computational and i/o overhead
induced by the simple MatLab text format.

Also, remember that MatLab can't read (.m) files with lines
longer than 4096 bytes.

If no communication with MatLab is needed, but merely 
to/from disk functionality within a DIVA program, it is
suggested to use the fast binary i/o methods ToFile() and
FromFile().                        


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToFile}
        {(\ const\ CDString\&\ sFilename\ )\ const\ }
        {Writes the vector to disk in binary format. }
        {1.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Output file name.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Writes the vector to disk in binary format.
Use 'readbin.m' to load such a file into MatLab
(placed in the diva/matlab dir).              


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FromFile}
        {(\ const\ CDString\&\ sFilename\ )}
        {Reads a vector from disk in binary format. }
        {1.26}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Input file name.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Reads a vector from disk in binary format.                        


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the vector to disk in binary format. }
        {1.27}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle (opened using fopen())
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Writes the vector to disk in binary format.
Use 'readbin.m' to load such a file into MatLab
(placed in the diva/matlab dir).              


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a vector from disk in binary format. }
        {1.28}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle (opened using fopen())
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-5-2001
\strut}
\begin{cxxdoc}


Reads a vector from disk in binary format.                        


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Eq}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Equal - compares a vector and a double.             }
        {1.29}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input double.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a double and returns
the result as a binary vector i.e.:

C(i) = 1 if A(i) == B
C(i) = 0 else 

Corresponding MatLab function EQ()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Eq}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Equal - compares a vector and a vector.             }
        {1.30}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) == B
C(i) = 0 else 

Corresponding MatLab function EQ()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ne}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Not Equal - compares a double and a vector.             }
        {1.31}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input double.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a double and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) != B
C(i) = 0 else 

Corresponding MatLab function NE()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ne}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Not Equal - compares a vector and a vector.             }
        {1.32}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) != B
C(i) = 0 else 

Corresponding MatLab function NE()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Lt}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than - compares a double and a vector.             }
        {1.33}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input double.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a double and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \< B
C(i) = 0 else 

Corresponding MatLab function LT()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Lt}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than - compares a vector and a vector.             }
        {1.34}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \< B
C(i) = 0 else 

Corresponding MatLab function LT()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Le}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than or Equal - compares a double and a vector.             }
        {1.35}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input double.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a double and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \<= B
C(i) = 0 else 

Corresponding MatLab function LE()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Le}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Less Than or Equal - compares a vector and a vector.             }
        {1.36}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \<= B
C(i) = 0 else 

Corresponding MatLab function LE()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Gt}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than - compares a double and a vector.             }
        {1.37}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a double and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \> B
C(i) = 0 else 

Corresponding MatLab function GT()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Gt}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than - compares a vector and a vector.             }
        {1.38}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \> B
C(i) = 0 else 

Corresponding MatLab function GT()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ge}
        {(const\ double\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than or Equal - compares a double and a vector.             }
        {1.39}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input double.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a double and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \>= B
C(i) = 0 else 

Corresponding MatLab function GE()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ge}
        {(\ const\ CDVector\&\ B,\ CDVector\&\ C\ )\ const\ }
        {Greater Than or Equal - compares a vector and a vector.             }
        {1.40}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut B} & Input vector.
\\
{\tt\strut C} & Output result vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares of a vector and a vector and returns
the result as a binary matrix i.e.:

C(i) = 1 if A(i) \>= B
C(i) = 0 else 

Corresponding MatLab function GE()


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Log}
        {()}
        {Takes the natural logarithm of each element. }
        {1.41}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Takes the natural logarithm of each element.                


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Abs}
        {()}
        {Takes the absolute valueof each element. }
        {1.42}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-7-2002
\strut}
\begin{cxxdoc}


Takes the absolute valueof each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Reverse}
        {()}
        {Reverses the vector. }
        {1.43}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2000
\strut}
\begin{cxxdoc}


Reverses the vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Rand}
        {()}
        {Uniformly distributed random numbers. }
        {1.44}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-9-2001
\strut}
\begin{cxxdoc}


Inserts uniformly distributed random numbers in
the range [0;1].


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Rand}
        {(\ const\ int\ st,\ const\ int\ end\ )}
        {Uniformly distributed integer random numbers. }
        {1.45}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-9-2001
\strut}
\begin{cxxdoc}


Inserts uniformly distributed integer random numbers in
the range [st;end].


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {CrossProduct}
        {(\ const\ CDVector\ \&v1,\ const\ CDVector\ \&v2)}
        {Forms the cross product of two vectors. }
        {1.46}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v1} & Input vector.
\\
{\tt\strut v2} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-16-2001
\strut}
\begin{cxxdoc}


Forms the cross product of two vectors and store the result in this.
If the vector does have the correct size, it will be resized.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ceil}
        {()}
        {Takes ceil() of each element. }
        {1.47}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-10-2002
\strut}
\begin{cxxdoc}


Takes ceil() of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Floor}
        {()}
        {Takes floor() of each element. }
        {1.48}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-10-2002
\strut}
\begin{cxxdoc}


Takes floor() of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Round}
        {()}
        {Takes round() of each element. }
        {1.49}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-10-2002
\strut}
\begin{cxxdoc}


Takes round() of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Linspace}
        {(\ const\ double\ x1,\ const\ double\ x2,\ const\ int\ n\ )}
        {Generates a vector of linearly equally spaced points  between x1 and x2 (inclusive). }
        {1.50}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut x1} & Starting point.
\\
{\tt\strut x2} & Ending point.
\\
{\tt\strut n} & Number of points.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-14-2002
\strut}
\begin{cxxdoc}


Generates a vector of linearly equally spaced points 
between x1 and x2 (inclusive).  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDVector}
        {Range}
        {(\ const\ int\ st,\ const\ int\ end)\ const\ }
        {Returns a sub range of a vector. }
        {1.51}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut st} & Starting posistion.
\\
{\tt\strut end} & End postion.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & sub range in a vector.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-14-2002
\strut}
\begin{cxxdoc}


Returns a sub range of a vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToMatrix}
        {(\ const\ int\ nRows,\ const\ int\ nCols,\ CDMatrix\ \&m,\ bool\ rowWise\ )}
        {Converts this vector to a matrix. }
        {1.52}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nRows} & Number of rows in the matrix.
\\
{\tt\strut nCols} & Number of cols in the matrix.
\\
{\tt\strut m} & Output matrix.
\\
{\tt\strut rowWise} & If true (default) vector data is extracted into rows.If false vector data is extracted into cols.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2002
\strut}
\begin{cxxdoc}


Converts this vector to a matrix, either by row (default) or column.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDVector}
        {VecCat}
        {(\ const\ CDVector\ \&v\ )\ const\ }
        {Concatenates a vector to the end of this vector. }
        {1.53}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Concatenated} & vector.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2002
\strut}
\begin{cxxdoc}


Concatenates a vector to the end of this vector.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Clamp}
        {(\ const\ double\ min,\ const\ double\ max\ )}
        {Clamps the vector to [min,max]. }
        {1.54}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut min} & Minumim value.
\\
{\tt\strut max} & Maximum value.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-6-2002
\strut}
\begin{cxxdoc}


Clamps the vector to [min,max]. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {AlignTo}
        {(\ const\ CDVector\ \&v,\ double*\ pA,\ double*\ pB\ )}
        {Linear alignment of this vector to another vector using the L2 norm. }
        {1.55}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Vector that this vector is being least squares fitted to.  
\\
{\tt\strut a} & Optional pointer to store the resulting transformation in.
\\
{\tt\strut b} & Optional pointer to store the resulting transformation in.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-6-2002
\strut}
\begin{cxxdoc}


Linear alignment of this vector to another vector using the L2 norm.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {AutoCorrelation}
        {(\ const\ int\ lag\ )\ const\ }
        {Calculates the autocorrelation of the vector. }
        {1.56}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut lag} & The lag.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & autocorrelation.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-14-2002
\strut}
\begin{cxxdoc}


Calculates the autocorrelation of the vector with
a given lag (default lag is 1).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Shuffle}
        {()}
        {Shuffles (randomizes) the vector. }
        {1.57}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-17-2002
\strut}
\cxxSee{Rand\ 
\strut}
\begin{cxxdoc}


Shuffles (randomizes) the vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Median}
        {()\ const\ }
        {Calculates the median. }
        {1.58}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & median.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-10-2002
\strut}
\cxxSee{Trim
\strut}
\begin{cxxdoc}


Calculates the median.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDVector}
        {Trim}
        {(\ const\ double\ percentage\ )\ const\ }
        {Removes the extreme 'percentage' part of the vector. }
        {1.59}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut percentage} & The amount of data to strip from the vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & trimmed version of the vector.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-10-2002
\strut}
\cxxSee{TrimmedMean,\ TrimmedVar,\ TrimmedStd
\strut}
\begin{cxxdoc}


Removes the extreme 'percentage' part of the vector.
E.g. v.Trim( .10 ) removes the 5\% of the lower tail and
5\% of the upper tail.

By convention Trim( 1. ) returns the median.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {TrimmedMean}
        {(\ const\ double\ percentage\ )\ const\ }
        {Calculates the trimmed mean. }
        {1.60}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut percentage} & The amount of data to strip from the vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & trimmed mean.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-10-2002
\strut}
\cxxSee{Trim
\strut}
\begin{cxxdoc}


Removes the extreme 'percentage' part of the vector and 
calculates the mean of the remaining data.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {TrimmedVar}
        {(\ const\ double\ percentage\ )\ const\ }
        {Calculates the trimmed variance. }
        {1.61}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut percentage} & The amount of data to strip from the vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & trimmed mean.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-10-2002
\strut}
\cxxSee{Trim
\strut}
\begin{cxxdoc}


Removes the extreme 'percentage' part of the vector and 
calculates the variance of the remaining data.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {TrimmedStd}
        {(\ const\ double\ percentage\ )\ const\ }
        {Calculates the trimmed standard deviation. }
        {1.62}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut percentage} & The amount of data to strip from the vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & trimmed mean.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-10-2002
\strut}
\cxxSee{Trim
\strut}
\begin{cxxdoc}


Removes the extreme 'percentage' part of the vector and 
calculates the standard deviation of the remaining data.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CDMatrix}
        {:\ public\ virtual\ CVisDMatrix}
        {Matrix class with double precision. }
        {2}
\cxxAuthor{
Rune Fisker, Mikkel B. Stegmann, 
Henrik Aanæs, Lars Pedersen et al.
\strut}
\cxxVersion{
2-5-2001
\strut}
\cxxSee{CDVector
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{}{CVisDMatrix}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{2}{CDMatrix}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{DIVAMatrixExport\ CDMatrix\&}
        {operator=}
        {(const\ CVisDMatrix\ \&mat)}
        {Assignment operator. }
        {2.1}
\cxxitem{DIVAMatrixExport\ CDMatrix\&}
        {operator=}
        {(const\ CDMatrix\ \&mat)}
        {Assignment operator. }
        {2.2}
\cxxitem{DIVAMatrixExport\ CDMatrix\&}
        {operator=}
        {(double\ value)}
        {Assignment operator. }
        {2.3}
\cxxitem{DIVAMatrixExport\ void}
        {SumCol}
        {(CDVector\&\ vSum)\ const\ }
        {Calc the sum of each column into a vector. }
        {2.4}
\cxxitem{DIVAMatrixExport\ void}
        {MeanCol}
        {(CDVector\&\ vMean)\ const\ }
        {Calc the mean of each column into a vector. }
        {2.5}
\cxxitem{DIVAMatrixExport\ void}
        {VarCol}
        {(CDVector\&\ vVar)\ const\ }
        {Calc the variance of each column into a vector. }
        {2.6}
\cxxitem{DIVAMatrixExport\ void}
        {StdCol}
        {(CDVector\&\ vStd)\ const\ }
        {Calc the standard deviation of each column into a vector. }
        {2.7}
\cxxitem{DIVAMatrixExport\ double}
        {Sum}
        {()\ const\ }
        {Calc the total sum of the matrix. }
        {2.8}
\cxxitem{DIVAMatrixExport\ double}
        {Mean}
        {()\ const\ }
        {Calcs the mean value of the matrix. }
        {2.9}
\cxxitem{DIVAMatrixExport\ double}
        {Var}
        {()\ const\ }
        {Calc the variance of the matrix. }
        {2.10}
\cxxitem{DIVAMatrixExport\ double}
        {Std}
        {()\ const\ }
        {Calc the standard diviation of the matrix. }
        {2.11}
\cxxitem{DIVAMatrixExport\ void}
        {OneWayANOVA}
        {(double\&\ dZ,\ int\&\ nDFModel,\ int\&\ nDFError)\ const\ }
        {One-way analysis of variance (ANOVA). }
        {2.12}
\cxxitem{DIVAMatrixExport\ void}
        {TTest}
        {(\ const\ int\ iCol1,\ const\ int\ iCol2,\ double\&\ dZ,\ int\&\ nDF\ )\ const\ }
        {Student's T-test. }
        {2.13}
\cxxitem{DIVAMatrixExport\ void}
        {Row}
        {(int\ i,\ CDVector\&\ vRow)\ const\ }
        {Return the i-th row of the matrix.             }
        {2.14}
\cxxitem{DIVAMatrixExport\ void}
        {Col}
        {(int\ i,\ CDVector\&\ vCol)\ const\ }
        {Return the i-th column of the matrix.             }
        {2.15}
\cxxitem{DIVAMatrixExport\ void}
        {Diag}
        {(const\ CDVector\ \&vec)}
        {Make the matrix a diagonal matrix containing 'vec'.             }
        {2.16}
\cxxitem{DIVAMatrixExport\ CDString}
        {ToString}
        {()\ const\ }
        {Returns a string representing the matrix.           }
        {2.17}
\cxxitem{DIVAMatrixExport\ void}
        {CombVert}
        {(CVisDMatrix\ \&Top,\ CVisDMatrix\ \&Bottom)}
        {Composes the matrix of Top and Bottom (on top of each other). }
        {2.18}
\cxxitem{DIVAMatrixExport\ void}
        {ToMatlab}
        {(\ const\ CDString\&\ sFilename,\ const\ CDString\&\ sName,\ const\ CDString\&\ sComment,\ bool\ fAppend)\ const\ }
        {Writes the matrix to disk in MatLab (.m) format. }
        {2.19}
\cxxitem{DIVAMatrixExport\ void}
        {Sqrt}
        {()}
        {Takes the square root of each element. }
        {2.20}
\cxxitem{DIVAMatrixExport\ void}
        {Sqr}
        {()}
        {Takes the power of two of each element. }
        {2.21}
\cxxitem{DIVAMatrixExport\ void}
        {ElementMultiply}
        {(const\ CDMatrix\&\ matrix)}
        {Element-wise matrix multiply. }
        {2.22}
\cxxitem{DIVAMatrixExport\ void}
        {ElementDivide}
        {(const\ CDMatrix\&\ matrix)}
        {Element-wise matrix division. }
        {2.23}
\cxxitem{DIVAMatrixExport\ void}
        {FromMatlab}
        {(const\ CDString\&\ sFilename,\ const\ CDString\&\ sName)}
        {Reads a matrix from disk in MatLab (.m) format. }
        {2.24}
\cxxitem{DIVAMatrixExport\ void}
        {ToFile}
        {(const\ CDString\ \&\ sFilename)\ const\ }
        {Writes the matrix to disk in binary format. }
        {2.25}
\cxxitem{DIVAMatrixExport\ void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the matrix to disk in binary format. }
        {2.26}
\cxxitem{DIVAMatrixExport\ void}
        {FromFile}
        {(const\ CDString\ \&\ sFilename)}
        {Reads a matrix from disk in binary format. }
        {2.27}
\cxxitem{DIVAMatrixExport\ void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a matrix from disk in binary format. }
        {2.28}
\cxxitem{DIVAMatrixExport\ void}
        {Kron}
        {(CDMatrix\ \&mX,\ CDMatrix\ \&mY)}
        {Forms the Kronecker tensor product of two matrices. }
        {2.29}
\cxxitem{DIVAMatrixExport\ void}
        {Eye}
        {()}
        {Converts the matrix in the identity matrix. }
        {2.30}
\cxxitem{DIVAMatrixExport\ void}
        {ToLaTeX}
        {(\ const\ CDString\&\ sFilename,\ const\ CDString\&\ sVarName,\ const\ CDString\&\ sComment,\ bool\ fWriteAsTable,\ const\ CDString\&\ sNumFmt,\ const\ CDString\&\ sBracketType,\ bool\ fAppend\ )\ const\ }
        {Writes the matrix in LaTeX format. Throws: CVisError. }
        {2.31}
\cxxitem{DIVAMatrixExport\ void}
        {TriU}
        {(\ CDMatrix\ \&matrix,\ const\ int\ K\ )\ const\ }
        {Extract upper triangular part of matrix. }
        {2.32}
\cxxitem{DIVAMatrixExport\ void}
        {TriL}
        {(\ CDMatrix\ \&matrix,\ const\ int\ K\ )\ const\ }
        {Extract lower triangular part of matrix. }
        {2.33}
\cxxitem{DIVAMatrixExport\ void}
        {Eq}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise equal to. Comparison of a matrix and a double. }
        {2.34}
\cxxitem{DIVAMatrixExport\ void}
        {Eq}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise equal to.  Comparison of two matrices. }
        {2.35}
\cxxitem{DIVAMatrixExport\ void}
        {Ne}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise not equal to. Comparison of a matrix and a double. }
        {2.36}
\cxxitem{DIVAMatrixExport\ void}
        {Ne}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise not equal to. Comparison of two matrices. }
        {2.37}
\cxxitem{DIVAMatrixExport\ void}
        {Lt}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than. Comparison of a matrix and a double. }
        {2.38}
\cxxitem{DIVAMatrixExport\ void}
        {Lt}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than. Comparison of two matrices. }
        {2.39}
\cxxitem{DIVAMatrixExport\ void}
        {Le}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than or equal. Comparison of a matrix and a double. }
        {2.40}
\cxxitem{DIVAMatrixExport\ void}
        {Le}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than or equal. Comparison of two matrices. }
        {2.41}
\cxxitem{DIVAMatrixExport\ void}
        {Gt}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than. Comparison of a matrix and a double. }
        {2.42}
\cxxitem{DIVAMatrixExport\ void}
        {Gt}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than. Comparison of two matrices. }
        {2.43}
\cxxitem{DIVAMatrixExport\ void}
        {Ge}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than or equal. Comparison of a matrix and a double. }
        {2.44}
\cxxitem{DIVAMatrixExport\ void}
        {Ge}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than or equal. Comparison of two matrices. }
        {2.45}
\cxxitem{DIVAMatrixExport\ void}
        {Log}
        {()}
        {Takes the natural logarithm (base e=2.71..) of each matrix element. }
        {2.46}
\cxxitem{DIVAMatrixExport\ void}
        {FlipLR}
        {()}
        {Flip matrix in left/right direction. }
        {2.47}
\cxxitem{DIVAMatrixExport\ void}
        {FlipUD}
        {()}
        {Flip matrix in up/down direction. }
        {2.48}
\cxxitem{DIVAMatrixExport\ void}
        {Rand}
        {()}
        {Uniformly distributed random numbers. }
        {2.49}
\cxxitem{DIVAMatrixExport\ void}
        {OuterProduct}
        {(const\ CDVector\ \&v1,\ const\ CDVector\ \&v2)}
        {Forms the outer product of two vectors. }
        {2.50}
\cxxitem{DIVAMatrixExport\ double}
        {Det}
        {()\ const\ }
        {Calculates the determinant of a square matrix up to the 3rd order. }
        {2.51}
\cxxitem{DIVAMatrixExport\ double}
        {Trace}
        {()\ const\ }
        {Calculates the trace - i.e. the sum of diagonal elements. }
        {2.52}
\cxxitem{DIVAMatrixExport\ void}
        {ToVector}
        {(\ CDVector\ \&v,\ bool\ rowWise\ )}
        {Converts this matrix to a vector. }
        {2.53}
\end{cxxpublic}
\begin{cxxdoc}


Matrix class with double precision based upon the VisSDK
matrix class CVisDMatrix.


\end{cxxdoc}
\begin{cxxfunction}
{DIVAMatrixExport\ CDMatrix\&}
        {operator=}
        {(const\ CVisDMatrix\ \&mat)}
        {Assignment operator. }
        {2.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut mat} & Input matrix.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Assignment operator (CVisDMatrix). 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDMatrix\&}
        {operator=}
        {(const\ CDMatrix\ \&mat)}
        {Assignment operator. }
        {2.2}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut mat} & Input matrix.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Assignment operator (CDMatrix). 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDMatrix\&}
        {operator=}
        {(double\ value)}
        {Assignment operator. }
        {2.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut value} & Input double.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Assignment operator (double). Set all values equal to 'value'.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {SumCol}
        {(CDVector\&\ vSum)\ const\ }
        {Calc the sum of each column into a vector. }
        {2.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vSum} & Output vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the sum of each column into a vector. 
The vector will be resized if it doesn't have the right length.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {MeanCol}
        {(CDVector\&\ vMean)\ const\ }
        {Calc the mean of each column into a vector. }
        {2.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vMean} & Output vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the mean of each column into a vector.
The vector will be resized if it doesn't have the right length.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {VarCol}
        {(CDVector\&\ vVar)\ const\ }
        {Calc the variance of each column into a vector. }
        {2.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vVar} & Output vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the variance of each column into a vector.
The vector will be resized if it doesn't have the right length.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {StdCol}
        {(CDVector\&\ vStd)\ const\ }
        {Calc the standard deviation of each column into a vector. }
        {2.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vStd} & Output vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the standard deviation of each column into a vector.
The vector will be resized if it doesn't have the right length.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Sum}
        {()\ const\ }
        {Calc the total sum of the matrix. }
        {2.8}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & sum.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the total sum of the matrix.              


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Mean}
        {()\ const\ }
        {Calcs the mean value of the matrix. }
        {2.9}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & mean value.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calcs the mean value of the matrix.               


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Var}
        {()\ const\ }
        {Calc the variance of the matrix. }
        {2.10}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & variance value.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the variance of the matrix.               


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Std}
        {()\ const\ }
        {Calc the standard diviation of the matrix. }
        {2.11}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & standard diviation  value.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Calc the standard diviation of the matrix.               


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {OneWayANOVA}
        {(double\&\ dZ,\ int\&\ nDFModel,\ int\&\ nDFError)\ const\ }
        {One-way analysis of variance (ANOVA). }
        {2.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut dZ} & \\
{\tt\strut nDFModel} & \\
{\tt\strut nDFError} & \end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Determination of the fluctuations observed 
in a sample, and their dependencies in the 
form of a one-way analysis of variance
(ANOVA).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {TTest}
        {(\ const\ int\ iCol1,\ const\ int\ iCol2,\ double\&\ dZ,\ int\&\ nDF\ )\ const\ }
        {Student's T-test. }
        {2.13}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut iCol1} & \\
{\tt\strut iCol2} & \\
{\tt\strut dZ} & \\
{\tt\strut nDF} & \end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Student's T-test.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Row}
        {(int\ i,\ CDVector\&\ vRow)\ const\ }
        {Return the i-th row of the matrix.             }
        {2.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut i} & The row number.
\\
{\tt\strut vRow} & Output vector;
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Return the i-th row of the matrix.
The vector will be resized if it doesn't have the right length.

Notice that due to the row major nature of matrices, row
read/writes are *much* faster than col read/writes.

Alternatively, one could use the more costly
CVisDVector CVisDMatrix::Row(int r) method.                        

To set the i-th row use:
void CVisDMatrix::SetRow(int r, const CVisDVector \&v)


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Col}
        {(int\ i,\ CDVector\&\ vCol)\ const\ }
        {Return the i-th column of the matrix.             }
        {2.15}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut i} & The column number.
\\
{\tt\strut vCol} & Output vector;
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Return the i-th column of the matrix.
The vector will be resized if it doesn't have the right length.

Alternatively, one could use the more costly
CVisDVector CVisDMatrix::Column(int r) method. 

To set the i-th col use:
void CVisDMatrix::SetColumn(int c, const CVisDVector \&v)


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Diag}
        {(const\ CDVector\ \&vec)}
        {Make the matrix a diagonal matrix containing 'vec'.             }
        {2.16}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vec} & Vector to place in the diagonal.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


This function transforms the matrix into a diagonal matrix,
with the values of 'vec' in the diagonal.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ CDString}
        {ToString}
        {()\ const\ }
        {Returns a string representing the matrix.           }
        {2.17}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & string.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Returns a string representing the matrix. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {CombVert}
        {(CVisDMatrix\ \&Top,\ CVisDMatrix\ \&Bottom)}
        {Composes the matrix of Top and Bottom (on top of each other). }
        {2.18}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Top} & Matrix to be placed in the top of this matrix.
\\
{\tt\strut Bottom} & Matrix to be placed in the bottom of this matrix.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
3-14-2001
\strut}
\begin{cxxdoc}


Composes the matrix of Top and Bottom (on top of each other).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToMatlab}
        {(\ const\ CDString\&\ sFilename,\ const\ CDString\&\ sName,\ const\ CDString\&\ sComment,\ bool\ fAppend)\ const\ }
        {Writes the matrix to disk in MatLab (.m) format. }
        {2.19}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Output file name. Should have the extension '.m'.
\\
{\tt\strut sName} & Name of destination matlab variable.
\\
{\tt\strut sComment} & Optional comment inside the file.
\\
{\tt\strut fAppend} & If true, the vector is appended to the file 'sFilename'.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Henrik Aanæs
\strut}
\cxxVersion{
14-7-1999
\strut}
\begin{cxxdoc}


Writes the matrix to disk in MatLab (.m) format.
To read the matrix into MatLab write e.g. 
'my\_matrix.m' at the MatLab prompt.  

Notice that this should be used for storage a (really)
large matrices, due to the computational and i/o overhead
induced by the simple MatLab text format.

Also, remember that MatLab can't read (.m) files with lines
longer than 4096 bytes.

If no communication with MatLab is needed, but merely 
to/from disk functionality within a DIVA program, it is
suggested to use the fast binary i/o methods ToFile() and
FromFile().      


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Sqrt}
        {()}
        {Takes the square root of each element. }
        {2.20}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
5-1-1999
\strut}
\begin{cxxdoc}


Takes the square root of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Sqr}
        {()}
        {Takes the power of two of each element. }
        {2.21}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
5-1-1999
\strut}
\begin{cxxdoc}


Takes the power of two of each element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ElementMultiply}
        {(const\ CDMatrix\&\ matrix)}
        {Element-wise matrix multiply. }
        {2.22}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
5-1-1999
\strut}
\begin{cxxdoc}


Multiply each element in the matrix with 
the corresponding element of the input matrix.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ElementDivide}
        {(const\ CDMatrix\&\ matrix)}
        {Element-wise matrix division. }
        {2.23}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
5-1-1999
\strut}
\begin{cxxdoc}


Divide each element in the matrix with 
the corresponding element of the input matrix.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FromMatlab}
        {(const\ CDString\&\ sFilename,\ const\ CDString\&\ sName)}
        {Reads a matrix from disk in MatLab (.m) format. }
        {2.24}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Input file name.
\\
{\tt\strut sName} & The name to search for (and load) inside the matlab file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Henrik Aanæs
\strut}
\cxxVersion{
14-7-1999
\strut}
\begin{cxxdoc}


Reads a matrix from disk in MatLab (.m) format into
'this'. 

Notice that this should be used for storage a (really)
large matrices, due to the computational and i/o overhead
induced by the simple MatLab text format.

Also, remember that MatLab can't read (.m) files with lines
longer than 4096 bytes.

If no communication with MatLab is needed, but merely 
to/from disk functionality within a DIVA program, it is
suggested to use the fast binary i/o methods ToFile() and
FromFile().                        


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToFile}
        {(const\ CDString\ \&\ sFilename)\ const\ }
        {Writes the matrix to disk in binary format. }
        {2.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Input file name.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Henrik Aanæs
\strut}
\cxxVersion{
7-22-1999
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Writes the matrix to disk in binary format.
The dimensions are saved as two doubles (!!?)
(rows,cols) in the start.           

Modified: Mikkel B. Stegmann 14/3-00


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the matrix to disk in binary format. }
        {2.26}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-14-1999
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Writes the matrix to disk in binary format.
The dimensions are saved as two doubles (!!?)
(rows,cols) in the start.  
The matrix is written to the binary file 'fh' 
at the current position of the file pointer.

Modified: Mikkel B. Stegmann 14/3-00


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FromFile}
        {(const\ CDString\ \&\ sFilename)}
        {Reads a matrix from disk in binary format. }
        {2.27}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Input file name.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{ToFile
\strut}
\begin{cxxdoc}


Reads a matrix from disk in binary format, as
written from CDMatrix::ToFile().                                   

The matrix is resizew if it doesn't fit the
disk matrix.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a matrix from disk in binary format. }
        {2.28}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{ToFile
\strut}
\begin{cxxdoc}


Reads a matrix from disk in binary format (from 
the current position of the file pointer), as
written from CDMatrix::ToFile().                                   

The matrix is resizew if it doesn't fit the
disk matrix.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Kron}
        {(CDMatrix\ \&mX,\ CDMatrix\ \&mY)}
        {Forms the Kronecker tensor product of two matrices. }
        {2.29}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
5-1-1999
\strut}
\begin{cxxdoc}


Forms the Kronecker tensor product of two matrices.
The result is placed in this.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Eye}
        {()}
        {Converts the matrix in the identity matrix. }
        {2.30}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
5-1-1999
\strut}
\begin{cxxdoc}


Converts the matrix in the identity matrix -
i.e. zeros all-over except the ones in the diagonal.            


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToLaTeX}
        {(\ const\ CDString\&\ sFilename,\ const\ CDString\&\ sVarName,\ const\ CDString\&\ sComment,\ bool\ fWriteAsTable,\ const\ CDString\&\ sNumFmt,\ const\ CDString\&\ sBracketType,\ bool\ fAppend\ )\ const\ }
        {Writes the matrix in LaTeX format. Throws: CVisError. }
        {2.31}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Destination file name.
\\
{\tt\strut sVarName} & Name of matrix.
\\
{\tt\strut sComment} & Comment in the LaTeX file.
\\
{\tt\strut fWriteAsTable} & If true the matrix is formatted as a table.
\\
{\tt\strut sNumFmt} & printf c-stype format of numbers, e.g. "\%.2f".
\\
{\tt\strut sBracketType} & Either "[" or "(".
\\
{\tt\strut fAppend} & If true 'sFilename' is append with this matrix.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-5-2000
\strut}
\begin{cxxdoc}


Writes the matrix in LaTeX format. Throws: CVisError.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {TriU}
        {(\ CDMatrix\ \&matrix,\ const\ int\ K\ )\ const\ }
        {Extract upper triangular part of matrix. }
        {2.32}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
5-12-2000
\strut}
\begin{cxxdoc}


Extracts the elements on and above the K-th diagonal. 
K = 0 is the main diagonal, K \> 0 is above the main 
diagonal and K \< 0 is below the main diagonal.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {TriL}
        {(\ CDMatrix\ \&matrix,\ const\ int\ K\ )\ const\ }
        {Extract lower triangular part of matrix. }
        {2.33}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
6-12-2000
\strut}
\begin{cxxdoc}


Extracts the elements on and below the K-th diagonal. 
K = 0 is the main diagonal, K \> 0 is above the main 
diagonal and K \< 0 is below the main diagonal.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Eq}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise equal to. Comparison of a matrix and a double. }
        {2.34}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
6-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with double B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) == B
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Eq}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise equal to.  Comparison of two matrices. }
        {2.35}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with 
corresponding element in B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) == B(i,j)
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ne}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise not equal to. Comparison of a matrix and a double. }
        {2.36}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with double B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) != B
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ne}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise not equal to. Comparison of two matrices. }
        {2.37}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with 
corresponding element in B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) != B(i,j)
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Lt}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than. Comparison of a matrix and a double. }
        {2.38}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with double B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \< B
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Lt}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than. Comparison of two matrices. }
        {2.39}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with 
corresponding element in B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \< B(i,j)
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Le}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than or equal. Comparison of a matrix and a double. }
        {2.40}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with double B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \<= B
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Le}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise less than or equal. Comparison of two matrices. }
        {2.41}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with 
corresponding element in B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \<= B(i,j)
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Gt}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than. Comparison of a matrix and a double. }
        {2.42}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with double B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \> B
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Gt}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than. Comparison of two matrices. }
        {2.43}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with 
corresponding element in B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \> B(i,j)
C(i,j) = 0 else  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ge}
        {(const\ double\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than or equal. Comparison of a matrix and a double. }
        {2.44}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with double B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \>= B
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Ge}
        {(\ const\ CDMatrix\&\ B,\ CDMatrix\&\ C\ )\ const\ }
        {Element wise greater than or equal. Comparison of two matrices. }
        {2.45}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Compares each element in this matrix (A) with 
corresponding element in B. 
Result matrix C has elements with values 1 or 0.

C(i,j) = 1 if A(i,j) \<= B(i,j)
C(i,j) = 0 else 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Log}
        {()}
        {Takes the natural logarithm (base e=2.71..) of each matrix element. }
        {2.46}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Lars Pedersen
\strut}
\cxxVersion{
7-12-2000
\strut}
\begin{cxxdoc}


Takes the natural logarithm (base e=2.71..) of each matrix element.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FlipLR}
        {()}
        {Flip matrix in left/right direction. }
        {2.47}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-9-2001
\strut}
\cxxSee{FlipUD
\strut}
\begin{cxxdoc}


FlipLR modifies the matrix with row preserved 
and columns flipped in the left/right direction.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {FlipUD}
        {()}
        {Flip matrix in up/down direction. }
        {2.48}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-9-2001
\strut}
\cxxSee{FlipLR
\strut}
\begin{cxxdoc}


FlipUD(X) modifies the matrix with columns preserved 
and rows flipped in the up/down direction.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {Rand}
        {()}
        {Uniformly distributed random numbers. }
        {2.49}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-9-2001
\strut}
\begin{cxxdoc}


Inserts uniformly distributed random numbers in
the range [0;1].


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {OuterProduct}
        {(const\ CDVector\ \&v1,\ const\ CDVector\ \&v2)}
        {Forms the outer product of two vectors. }
        {2.50}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v1} & Input vector.
\\
{\tt\strut v2} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-16-2001
\strut}
\begin{cxxdoc}


Forms the outer product of two vectors and store the result in this.
If the matrix does have the correct size, it will be resized.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Det}
        {()\ const\ }
        {Calculates the determinant of a square matrix up to the 3rd order. }
        {2.51}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & determinant.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-25-2001
\strut}
\begin{cxxdoc}


Calculates the determinant of a square matrix up to the 3rd order.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ double}
        {Trace}
        {()\ const\ }
        {Calculates the trace - i.e. the sum of diagonal elements. }
        {2.52}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & trace.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-25-2001
\strut}
\begin{cxxdoc}


Calculates the trace - i.e. the sum of diagonal elements.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{DIVAMatrixExport\ void}
        {ToVector}
        {(\ CDVector\ \&v,\ bool\ rowWise\ )}
        {Converts this matrix to a vector. }
        {2.53}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Output vector  
\\
{\tt\strut rowWise} & If true (default) matrix data is extracted row-wise.If false matrix data is extracted column-wise.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2002
\strut}
\begin{cxxdoc}


Converts this matrix to a vector, either by row (default) or column.    


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxvariable}
{0}
        {warning}
        {(s)}
        {}
        {3}
\end{cxxvariable}
\begin{cxxClassGraph}
\label{cxx.}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{1}{CDVector}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{2}{CDMatrix}{}
\end{cxxClassGraph}
