|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class Point2dArray1dC represents 1-dimensional array of 2-dimensional
points.
Parent Classes:
Typedefs:
- typedef double RealT;
-
general real parameter.
Methods:
- Point2dArray1dC()
-
Empty array of points.
- Point2dArray1dC(const SizeT n)
-
Creates an array of 'n' points.
- Point2dArray1dC(const char * filename)
-
Creates an array of points from the input file 'filename'.
- Point2dArray1dC(istream & s)
-
Creates an array of points from the input stream s.
- Point2dArray1dC(const Array1dC<Point2dC> & points)
-
Constructs an array of points from the array (as a big object).
- Point2dArray1dC(const Point2dArray1dC & points)
-
Another access to the array of points.
- Mean2dC Mean() const
-
Returns the mean of the points (e.g. the centroid).
- Line2dPPC FitLineXY() const
-
Returns the line which has the smallest sum of distance squares
from points.
- RealT SumSqrResiduum(const Line2dPPC & l) const
-
Returns the sum of squared distances of points from the line 'l'.
- void SeparatingLines() const
-
For each pair of points finds the separating line.
All points must be different. NOT IMPLEMENTED.
- Array1dC<Point2dC> Copy() const
-
Creates a new physical copy of the array.
- Array1dC<Point2dC> & Copy(const Array1dC<Point2dC> & orig)
-
Copies values from the 'orig' array into this array.
Only items
from the overlapping part of the ranges are copied. The function
returns this array.
- Array1dC<Point2dC> & Copy(const IndexRangeC & r,const IndexT off)
-
Copies values from the index range 'r' into the new position with the offset 'off'.
Only those items
which original position and destination are inside of the index range
of this array are copied.
- Array1dC<Point2dC> & Copy(const IndexT off,const Array1dC<Point2dC> & a)
-
Copies the maximum possible part of array 'a' into this array.
The first element of array 'a' is placed into the element
of this array with index 'off'. The functio returns this array.
- const Array1dC<Point2dC> & operator=(const Array1dC<Point2dC> & vv)
-
Assigment, as for a BIG_OBJECT.
Access to the object elements.
------------------------------
- const Array1dC<Point2dC> & Array1d() const
-
Access to the whole array.
- Array1dC<Point2dC> & Array1d()
-
Access to the whole array.
- SArray1dC<Point2dC> SArray1d()
-
Create an access as an sarray.
NB. This does NOT copy the data, it only make a new access to it.
If the array does not have contain element '0' an error will
occure in check mode, when optimised is enabled an empty array
will be returned.
In anycase only elements 0 and above will be accessable.
Array representation modifications.
-----------------------------------
- Array1dC<Point2dC> Enlarge(const IntT factor = 2) const
-
Enlarges the array by item duplications.
Every item is duplicated
'factor' times. The return array is extended by adding of higher
indexes.
- Array1dC<Point2dC> Extend(const SizeT n) const
-
Returns the array whose range is extended by adding 'n' items with default value from both limits of the range.
This array value are
copied into the same index positions in the returned array.
- Array1dC<Point2dC> & Append(const Array1dC<Point2dC> & a)
-
This array is extended by the length of the array 'a' and the contents of both arrays are copied to it.
The function supports empty arrays.
Logical operations.
-------------------
- BooleanT IsSharing(const Array1dC<Point2dC> & arr) const
-
Returns TRUE if this array and the array 'arr' are subarrays of the the same array.
Special operations.
-------------------
- void DebugAddresses() const
-
Prints addresses into 'cerrAMMA'.
- const BodyRefCounterC & RefCounter() const
-
Returns access to reference counter.
- const RangeBufferAccessC<Point2dC> & operator=(Point2dC * bp)
-
Changes the reference element to the element pointed by 'bp'.
Access to the object
--------------------
- Point2dC * ReferenceElm(void) const
-
Returns the pointer to the reference element of the attached buffer.
The reference element need not to be the valid element of the buffer.
- void * ReferenceVoid(void) const
-
Returns the pointer to the reference element of the attached buffer.
The reference element need not to be the valid element of the buffer.
The function is intended to be used in printing.
- const BufferAccessC<Point2dC> & Access(void) const
-
Returns this object.
- Point2dC * DataStart()
-
Returns the address of the first element of the buffer..
- const Point2dC * DataStart() const
-
Returns the address of the first element of the buffer..
- SizeT N() const
-
Returns the number of elements of the array.
- SizeT Size() const
-
Returns the number of elements of the array.
- const IndexRangeC & Limits() const
-
Returns the usable range of indeces expressed by this object.
- const IndexRangeC & Range() const
-
Returns the usable range of indeces expressed by this object.
- IndexT IMin() const
-
Returns the minimum index of the range of this access.
- IndexT IMax() const
-
Returns the maximum index of the range of this access.
- const Point2dC & operator[](const IndexT i) const
-
Read-only access to the ('i'+1)-th element of the buffer.
- Point2dC & operator[](const IndexT i)
-
Read-write access to the ('i'+1)-th element of the buffer.
- const RangeBufferAccessC<Point2dC> & RAccess(void) const
-
Returns this object.
Logical functions
-----------------
- BooleanT IsValid() const
-
Returns TRUE if this buffer access is not a default access object.
- BooleanT IsEmpty() const
-
Returns TRUE if the size of the array is zero.
- BooleanT Contains(const IndexT i) const
-
Returns TRUE if the array contains an item with the index 'i'.
- BooleanT IsOverlapping(const RangeBufferAccessC<Point2dC> & acc) const
-
Returns TRUE if this access has an item with the same index as
an item of the access 'acc'.
Modifications of the access
---------------------------
- const RangeBufferAccessC<Point2dC> & operator+=(const SizeT i)
-
Changes indeces of the access to be 'i' units higher.
- RangeBufferAccessC<Point2dC> operator+(const SizeT i) const
-
Creates the new access object with the indeces 'i' units higher
than those used in this access object.
- const IndexRangeC & ShrinkHigh(const SizeT k)
-
Changes the number of elements by subtracting the last 'k' elements.
- void ShiftIndexes(const IndexT offset)
-
All indexes of the items will be changed by 'offset'.
The range will be shifted by -offset.
- void SetSubRange(const IndexT newMin,const IndexT newMax)
-
The range of indexes of this array will be constrained to cover
the index range at most.
- const RangeBufferAccessC<Point2dC> & Swap(RangeBufferAccessC<Point2dC> & a)
-
Exchanges the contents of this buffer with buffer 'a'.
- void Swap(const IndexT i1,const IndexT i2)
-
Exchanges the contents of elements with indeces 'i1' and 'i2'.
- void Attach(const RangeBufferAccessC<Point2dC> & b)
-
Changes this buffer access to have the same access rights as 'b'.
- void Attach(const BufferAccessC<Point2dC> & b,const IndexRangeC & r)
-
Changes this buffer access to have the access rights as 'b' limited
by range 'r'.
Modifications of the buffer contents
------------------------------------
- void Fill(const Point2dC & d)
-
'd' value is assigned to all elements of the buffer.
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|