#include <SmartArray.h>
Public Methods | |
| void | Set (const T &x) |
| Makes all elements equal to x. | |
| void | Add (const T &x) |
| void | AddTail (const T &x) |
This class wraps a pointer to an array of objects of class T, an keeps track of the number of references to it. If any non-constant function is called, for an object with number of references grater than 1, a copy of the array is performed
This essentially means that a copy of the array will be created only if there is a chance that a function is modifying the contents of a shared array. Therefore, whenever possible, the constant version of operator[]() must be called to avoid unnecessary copies of the array.
Definition at line 66 of file SmartArray.h.
|
||||||||||
|
Adds an element after the last element without increasing the size of the array. Definition at line 282 of file SmartArray.h. Referenced by SmartArray< SmartMatrix< MEMDATA > >::AddTail(), DAGSearchDatabase::GetClosest(), and DAGSearchDatabase::GetKClosest(). |
|
||||||||||
|
Adds an element after the last element. It increases the size of the arrayif necessary. Definition at line 289 of file SmartArray.h. Referenced by ShockGraph::GroupShockPoints(). |
1.2.18