#include <vctBarycentricVector.h>
Inheritance diagram for vctBarycentricVector< _elementType, _size >:


I have decided to derive this class from vctFixedSizeVector, which means that the operations can only be performed on locally owned memory (as opposed to a referenced vector). The reason was that it would be too hard to regenerate this set of operations as a subclass for each vector type. In addition, most of the operations here are const methods, and in the case of computing a new set of coordinates, they return it by value. Therefore, vctBarycentricVector is safer to use than other library objects, but on the other hand the operations may be somewhat slower.
I did not provide the full set of constructors as I have with vctFixedSizeVector, and therefore the use of a vctBarycentricVector should be more explicit in terms of type conversions than vctFixedSizeVector.
Many operations on vctBarycentricVector require a tolerance argument, which is given with a default value. The tolerance argument must be non-negative, or else the result is undefined. The current implementation does not test for it, but assumes it. In most cases, we compare absolute values of numbers to the tolerance.
Definition at line 70 of file vctBarycentricVector.h.
| typedef vctFixedSizeVector<_elementType, _size> vctBarycentricVector< _elementType, _size >::BaseType |
Type of the base class.
Reimplemented from vctFixedSizeVector< _elementType, _size >.
Definition at line 73 of file vctBarycentricVector.h.
| typedef vctBarycentricVector<_elementType, _size> vctBarycentricVector< _elementType, _size >::ThisType |
Type of the vector itself.
Reimplemented from vctFixedSizeVector< _elementType, _size >.
Definition at line 74 of file vctBarycentricVector.h.
| typedef class cmnTypeTraits< value_type > vctBarycentricVector< _elementType, _size >::TypeTraits |
Type traits for the elements of the vector.
Reimplemented from vctFixedSizeVector< _elementType, _size >.
Definition at line 77 of file vctBarycentricVector.h.
| vctBarycentricVector< _elementType, _size >::vctBarycentricVector | ( | ) | [inline] |
Default constructor -- call base class def. ctor
Definition at line 80 of file vctBarycentricVector.h.
| vctBarycentricVector< _elementType, _size >::vctBarycentricVector | ( | const ThisType & | other | ) | [inline] |
copy constructor for vctBarycentricVector object
Definition at line 85 of file vctBarycentricVector.h.
| vctBarycentricVector< _elementType, _size >::vctBarycentricVector | ( | const BaseType & | other | ) | [inline] |
copy constructor for vctFixedSizeVector object
Definition at line 90 of file vctBarycentricVector.h.
| vctBarycentricVector< _elementType, _size >::vctBarycentricVector | ( | const vctFixedSizeVectorBase< _size, __stride, _elementType, __dataPtrType > & | other | ) | [inline] |
copy constructor from a general vector
Definition at line 96 of file vctBarycentricVector.h.
| bool vctBarycentricVector< _elementType, _size >::IsBarycentric | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return true iff the sum of elements of this vector is equal to 1 up to the given tolerance. See class documentation.
Definition at line 137 of file vctBarycentricVector.h.
References vctBarycentricVector< _elementType, _size >::_elementType, and vctFixedSizeConstVectorBase< _size, _stride, _elementType, vctFixedSizeVectorTraits< _elementType, _size, 1 >::array >::SumOfElements().
Referenced by vctBarycentricVector< _elementType, _size >::IsInterior(), and vctBarycentricVector< _elementType, _size >::IsMember().
| bool vctBarycentricVector< _elementType, _size >::IsInterior | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return true iff all the coordinates are greater than or equal to the given tolerance. See class documentation.
Definition at line 145 of file vctBarycentricVector.h.
References vctBarycentricVector< _elementType, _size >::IsBarycentric().
| bool vctBarycentricVector< _elementType, _size >::IsMember | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return true iff all the coodinates are greater than -tolerance. See class documentation.
Definition at line 155 of file vctBarycentricVector.h.
References vctBarycentricVector< _elementType, _size >::IsBarycentric().
Referenced by vctBarycentricVector< _elementType, _size >::IsBoundary(), and vctBarycentricVector< _elementType, _size >::IsVertex().
| bool vctBarycentricVector< _elementType, _size >::HasZero | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return true iff one of the coodinates is zero, up to the given tolerance. This is not a membership test.
Definition at line 165 of file vctBarycentricVector.h.
Referenced by vctBarycentricVector< _elementType, _size >::IsBoundary(), and vctBarycentricVector< _elementType, _size >::IsVertex().
| bool vctBarycentricVector< _elementType, _size >::IsBoundary | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return (IsMember(tolerance) && HasZero(tolerance));
Definition at line 175 of file vctBarycentricVector.h.
References vctBarycentricVector< _elementType, _size >::HasZero(), and vctBarycentricVector< _elementType, _size >::IsMember().
| bool vctBarycentricVector< _elementType, _size >::IsVertex | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return true iff a the vector is a member and a coordinate is equal to 1 up to a given tolerance
Definition at line 182 of file vctBarycentricVector.h.
References vctBarycentricVector< _elementType, _size >::_elementType, vctBarycentricVector< _elementType, _size >::HasZero(), and vctBarycentricVector< _elementType, _size >::IsMember().
| ThisType vctBarycentricVector< _elementType, _size >::ScaleToBarycentric | ( | const _elementType | tolerance = TypeTraits::Tolerance() |
) | const [inline] |
return a barycentric scaled version of this vector, that is, a vector whose sum of elements is 1. If the sum of this vector is zero up to the given tolerance, return a zero vector (which is not barycentric).
Definition at line 195 of file vctBarycentricVector.h.
References vctBarycentricVector< _elementType, _size >::_elementType, and vctFixedSizeConstVectorBase< _size, _stride, _elementType, vctFixedSizeVectorTraits< _elementType, _size, 1 >::array >::SumOfElements().