All Frameworks Class Hierarchy This Framework Previous Next Indexes
Mathematics Class CATMathSetOfLongs
CATMathSetOfLongs
Usage: you must use this class as is. You should never derive it.
public class CATMathSetOfLongs
Class to define a set of longs.
Constructor and Destructor Index
- o
CATMathSetOfLongs(CATLONG32)
- Constructs a set of longs of a given length.
- o
CATMathSetOfLongs(CATLONG32,CATLONG32*)
- Constructs a set of longs of a given length and initializes with given values.
- o
CATMathSetOfLongs(CATMathSetOfLongs&)
- Copy constructor.
- o
~CATMathSetOfLongs()
-
Method Index
- o
AddElement(CATLONG32)
- Adds one Element at the end of this CATMathSetOfLongs.
- o
AddSet(CATMathSetOfLongs&)
- Concatenates two sets of longs .
- o
AddSet(CATMathSetOfLongs&,CATBoolean)
- Concatenates two sets of longs.
- o
AutoInvert()
- Inverts this CATMathSetOfLongs.
- o
Beginning()
- Resets the iterator in order to read again this CATMathSetOfLongs.
- o
Find(CATLONG32,CATLONG32*)
- Searches for the first occurence of an element in the collection.
- o
GetElement()
- Reads the current element in this CATMathSetOfLongs.
- o
GetElement(CATLONG32)
- Reads a specific element in this CATMathSetOfLongs.
- o
GetElements()
- Returns the array of longs.
- o
GetMaxNumberOfElements()
- Returns the maximum number oflongs of this CATMathSetOfLongs.
- o
GetNumberOfElements()
- Returns the number of valuated longs of this CATMathSetOfLongs.
- o
InsertElement(CATLONG32,CATLONG32)
- Inserts an element in a specific position.
- o
Next()
- Skips to the next element.
- o
Reset()
- Resets this CATMathSetofLongs.
- o
SetElement(CATLONG32)
- Replaces the current element.
- o
SetElement(CATLONG32,CATLONG32)
- Replaces the element at a current index.
- o
Sort()
- Sort a CATMathSetOfLongs by increasing.
- o
SwapElements(CATLONG32,CATLONG32)
- Swap the two elements at the index ipos1 and ipos2.
- o
operator =(CATMathSetOfLongs&)
- Assignment operator.
Constructor and Destructor
o CATMathSetOfLongs
public CATMathSetOfLongs( | const CATLONG32 | NbElements) |
-
Constructs a set of longs of a given length.
- Parameters:
-
- iNbElements
- The number of longs of the set.
o CATMathSetOfLongs
-
Constructs a set of longs of a given length and initializes with given values.
- Parameters:
-
- iNbElements
- The number of longs of the set.
- iSet
- The array of values.
o CATMathSetOfLongs
-
Copy constructor.
o ~CATMathSetOfLongs
public ~CATMathSetOfLongs( | ) |
-
Methods
o AddElement
public void AddElement( | const CATLONG32 | iElement) |
-
Adds one Element at the end of this CATMathSetOfLongs.
- Parameters:
-
- iElement
- The added element. this is reallocated if needed.
o AddSet
-
Concatenates two sets of longs .
- Parameters:
-
- iSet
- The set to concatenate at the end of this. this is reallocated if needed.
o AddSet
-
Concatenates two sets of longs.
- Parameters:
-
- iSet
- The set to concatenate at the end of this. this is reallocated if needed.
- iOption
- if Option = 1, lastpoint and firstpoint are merged.
o AutoInvert
-
Inverts this CATMathSetOfLongs.
o Beginning
-
Resets the iterator in order to read again this CATMathSetOfLongs.
o Find
-
Searches for the first occurence of an element in the collection.
- Parameters:
-
- iElement
- The element.
- Returns:
- The result of the search, and the position of the element if asked.
Legal values:
1 if the element is found, 0 if nor found.
o GetElement
-
Reads the current element in this CATMathSetOfLongs.
o GetElement
-
Reads a specific element in this CATMathSetOfLongs.
- Parameters:
-
- iIndex
- The index (0<= position < NumberOfElements) of the point to read.
o GetElements
-
Returns the array of longs.
- Returns:
- The array of longs that you must deallocate after use.
o GetMaxNumberOfElements
public CATLONG32 GetMaxNumberOfElements( | )const |
-
Returns the maximum number oflongs of this CATMathSetOfLongs.
- Returns:
- The maximum number of longs.
o GetNumberOfElements
-
Returns the number of valuated longs of this CATMathSetOfLongs.
- Returns:
- The number of valuated longs.
o InsertElement
-
Inserts an element in a specific position.
this is reallocated if needed.
- Parameters:
-
- iElement
- The new value of the current element.
- iIndex
- The index (0<= position < NumberOfElements) of the element.
o Next
-
Skips to the next element.
- Returns:
- Legal values: 0 if the iterator reaches the end of the set, 1 otherwise.
o Reset
-
Resets this CATMathSetofLongs.
The memory is not deleted and
the class can be used again.
o SetElement
public void SetElement( | const CATLONG32 | iElement) |
-
Replaces the current element.
- Parameters:
-
- iElement
- The new value of the current element.
o SetElement
-
Replaces the element at a current index.
- Parameters:
-
- iElement
- The new value of the current element.
- iIndex
- The index (0<= position < NumberOfElements) of the element.
o Sort
-
Sort a CATMathSetOfLongs by increasing.
o SwapElements
-
Swap the two elements at the index ipos1 and ipos2.
o operator =
-
Assignment operator.
- Parameters:
-
- iElements
- The set of longs to assign.
This object is included in the file: CATMathSetOfLongs.h
If needed, your Imakefile.mk should include the module: CATMathematics