#include <ResizeArray.h>
Public Methods | |
| ResizeArray (int s=3) | |
| Constructor The first argument is the initial internal size of the array, i.e. the initial number of elements for which to allocate memory (although the initial external size of the array will be zero). More... | |
| ~ResizeArray () | |
| int | num (void) const |
| current size of array. More... | |
| T & | operator[] (int N) |
| unchecked accessor, for speed. More... | |
| T const & | operator[] (int N) const |
| a const version of above. More... | |
| void | append (const T &val) |
| add a new element to the end of the array. Return index of new item. More... | |
| void | remove (int n) |
| remove an item from the array, shifting remaining items down by 1. More... | |
| void | clear () |
| delete entire array by defining size to be empty. More... | |
| void | truncatelastn (int N) |
| truncate the array by defining the size to be N items less. More... | |
| int | find (const T &val) |
| scan the array until the first item that matches in the array is found. Return the index if found, (-1) otherwise. More... | |
Definition at line 36 of file ResizeArray.h.
|
||||||||||
|
Constructor The first argument is the initial internal size of the array, i.e. the initial number of elements for which to allocate memory (although the initial external size of the array will be zero).
Definition at line 50 of file ResizeArray.h. |
|
|||||||||
|
Definition at line 56 of file ResizeArray.h. |
|
||||||||||
|
add a new element to the end of the array. Return index of new item.
Definition at line 65 of file ResizeArray.h. Referenced by Residue::add_atom, GeometryList::add_geometry, NameList< Material * >::add_name, SmallRingLinkages::addLinkagePath, LinkageEdge::addPath, SmallRing::append, Fragment::append, bondsearchthread, GeometryMol::calculate_all, GraphicsFltkRepVolumetric::dataset_append, DisplayDevice::find_pbc_cells, DisplayDevice::find_pbc_images, generic_get_names, Molecule::get_new_frames, SmallRingLinkages::getLinkageEdge, measure_energy, measure_geom, measure_pbc_neighbors, measure_sasa, mol_delete_cb, parse_frames, Molecule::record_database, Molecule::record_file, Molecule::record_remarks, SmallRing::reverse, text_cmd_animate, VMDGetOptions, VMDinitialize, write_stride_record, and MolFilePlugin::write_structure. |
|
||||||||||
|
delete entire array by defining size to be empty.
Definition at line 97 of file ResizeArray.h. Referenced by SmallRingLinkages::clear, SmallRing::clear, GraphicsFltkRepVolumetric::dataset_clear, measure_pbc_neighbors, SmallRing::reverse, and write_stride_record. |
|
||||||||||
|
scan the array until the first item that matches in the array is found. Return the index if found, (-1) otherwise.
Definition at line 110 of file ResizeArray.h. |
|
||||||||||
|
||||||||||
|
a const version of above.
Definition at line 62 of file ResizeArray.h. |
|
||||||||||
|
unchecked accessor, for speed.
Definition at line 61 of file ResizeArray.h. |
|
||||||||||
|
remove an item from the array, shifting remaining items down by 1.
Definition at line 89 of file ResizeArray.h. Referenced by GeometryList::del_geometry. |
|
||||||||||
|
truncate the array by defining the size to be N items less.
Definition at line 102 of file ResizeArray.h. Referenced by SmallRing::remove_last. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002