CAPD DynSys Library
5.2.0
|
#include <stdexcept>
#include "capd/basicalg/minmax.h"
#include <sstream>
Namespaces | |
capd | |
capd::vectalg | |
Functions | |
double | nonnegativePart (double x) |
double | nonnegativePart (long double x) |
double | nonnegativePart (int x) |
template<typename Object > | |
void | capd::vectalg::clear (Object &u) |
Assign zero to each coordinate. More... | |
template<typename Object > | |
Object::ScalarType | capd::vectalg::euclNorm (const Object &u) |
Computes euclidean norm of any vector. More... | |
template<typename Object > | |
bool | capd::vectalg::normalize (Object &u) |
normalize a vector with respect to euclidean norm if impossible returns false More... | |
template<typename ResultType , typename Object > | |
ResultType | capd::vectalg::absoluteValue (const Object &v) |
template<typename ResultType , typename Object > | |
ResultType | capd::vectalg::unaryMinus (const Object &v) |
template<typename ResultType , typename T1 , typename T2 > | |
void | capd::vectalg::addObjects (const T1 &v1, const T2 &v2, ResultType &result) |
this procedure can be use to add two vector-like objects: More... | |
template<typename ResultType , typename T1 , typename T2 > | |
ResultType | capd::vectalg::addObjects (const T1 &v1, const T2 &v2) |
template<typename ResultType , typename T1 , typename T2 > | |
void | capd::vectalg::subtractObjects (const T1 &v1, const T2 &v2, ResultType &result) |
this procedure can be use to subtract two vector-like objects: More... | |
template<typename ResultType , typename T1 , typename T2 > | |
ResultType | capd::vectalg::subtractObjects (const T1 &v1, const T2 &v2) |
template<typename T1 , typename T2 > | |
T1::ScalarType | capd::vectalg::scalarProduct (const T1 &v1, const T2 &v2) |
this procedure can be use to compute scalar product of two vector-like objects: More... | |
template<typename ResultType , typename Object , typename FactorType > | |
ResultType | capd::vectalg::multiplyObjectScalar (const Object &v, const FactorType &s) |
this procedure can be use to multiply by a scalar any element of vector-like objects as a result we may obtain object of different type, multiplication of column of matrix and scalar gives vector result = v * s More... | |
template<typename ResultType , typename Object , typename FactorType > | |
ResultType | capd::vectalg::divideObjectScalar (const Object &v, const FactorType &s) |
this procedure can be use to divide by a scalar any element of vector-like objects as a result we may obtain object of different type, dividing of column of matrix by scalar gives vector result = v / s More... | |
template<typename ResultType , typename Object , typename FactorType > | |
ResultType | capd::vectalg::addObjectScalar (const Object &v, const FactorType &s) |
this procedure can be use to add a scalar to any element of vector-like objects result[i] = v[i] + s More... | |
template<typename ResultType , typename Object , typename FactorType > | |
ResultType | capd::vectalg::subtractObjectScalar (const Object &v, const FactorType &s) |
this procedure can be used to substract a scalar from any element of vector-like objects result[i] = v[i] - s More... | |
template<typename ResultType , typename MatrixType , typename VectorType > | |
void | capd::vectalg::matrixByVector (const MatrixType &m, const VectorType &u, ResultType &result) |
this procedure realizes multiplication of matrix-like object by vector-like object result = m*v More... | |
template<typename ResultType , typename MatrixType , typename VectorType > | |
ResultType | capd::vectalg::matrixByVector (const MatrixType &m, const VectorType &u) |
template<typename ResultType , typename Matrix1 , typename Matrix2 > | |
void | capd::vectalg::matrixByMatrix (const Matrix1 &a1, const Matrix2 &a2, ResultType &result) |
this procedure realizes multiplication of two matrix-like objects result = m1*m2 More... | |
template<typename ResultType , typename Matrix1 , typename Matrix2 > | |
ResultType | capd::vectalg::matrixByMatrix (const Matrix1 &a1, const Matrix2 &a2) |
template<typename T1 , typename T2 > | |
T1 & | capd::vectalg::assignObjectObject (T1 &u, const T2 &v) |
this procedure can be use to assign one vector-like objects from the other. More... | |
template<typename T1 , typename T2 > | |
T1 & | capd::vectalg::addAssignObjectObject (T1 &u, const T2 &v) |
this procedure can be use to add of two vector-like objects result is stored in the first argument u += v More... | |
template<typename T1 , typename T2 > | |
T1 & | capd::vectalg::subtractAssignObjectObject (T1 &u, const T2 &v) |
this procedure can be use to subtract of two vector-like objects result is stored in the first argument u -= v More... | |
template<typename Object , typename Scalar > | |
Object & | capd::vectalg::assignFromScalar (Object &u, const Scalar &s) |
this procedure can be use to assign each element of a vector-like object to be equal to a given scalar u[i] = s More... | |
template<typename Object , typename Scalar > | |
Object & | capd::vectalg::addAssignObjectScalar (Object &u, const Scalar &s) |
this procedure can be use to add a scalar to each element of a vector-like object u[i] += s More... | |
template<typename Object , typename Scalar > | |
Object & | capd::vectalg::subtractAssignObjectScalar (Object &u, const Scalar &s) |
this procedure can be use to subtract a scalar from each element of a vector-like object u[i] -= s More... | |
template<typename Object , typename Scalar > | |
Object & | capd::vectalg::multiplyAssignObjectScalar (Object &u, const Scalar &s) |
this procedure can be use to multiply by a scalar each element of a vector-like object u[i] *= s More... | |
template<typename Object , typename Object2 , typename Scalar > | |
Object & | capd::vectalg::multiplyAssignObjectScalarAddObject (Object &u, const Scalar &s, const Object2 &v) |
this procedure can be use to multiply by a scalar each element of a vector-like object and then add compoent-wise elements of second vector-like object u[i] = u[i]*s+v[i] More... | |
template<typename V , typename M , typename V2 > | |
V & | capd::vectalg::addAssignMatrixByVector (V &u, const M &A, const V2 &v) |
This procedure computes u += A*v where u,v are vectors and A is a matrix. More... | |
template<typename V , typename M , typename V2 > | |
V & | capd::vectalg::subtractAssignMatrixByVector (V &u, const M &A, const V2 &v) |
This procedure computes u -= A*v where u,v are vectors and A is a matrix. More... | |
template<typename Object , typename Scalar > | |
Object & | capd::vectalg::divideAssignObjectScalar (Object &u, const Scalar &s) |
this procedure can be use to divide by a scalar any element of two vector-like objects u[i] /= s More... | |
template<class Object , class Scalar > | |
void | capd::vectalg::evalPolynomial (Object *c, Scalar t, Object &result, int n) |
Evaluates polynomial p:R->R^n at some argument. More... | |
template<typename T1 , typename T2 > | |
bool | capd::vectalg::lessThan (const T1 &v1, const T2 &v2) |
template<typename T1 , typename T2 > | |
bool | capd::vectalg::greaterThan (const T1 &v1, const T2 &v2) |
template<typename T1 , typename T2 > | |
bool | capd::vectalg::lessEqual (const T1 &v1, const T2 &v2) |
template<typename T1 , typename T2 > | |
bool | capd::vectalg::greaterEqual (const T1 &v1, const T2 &v2) |
template<typename T1 , typename T2 > | |
bool | capd::vectalg::equal (const T1 &v1, const T2 &v2) |
template<typename T1 , typename T2 > | |
bool | capd::vectalg::notEqual (const T1 &v1, const T2 &v2) |
This file provides an algebraic operation which may be implemented on the container level such as addition of some objects
Constraints on any type which appears in these algorithms: