A subclass of the NTL::Vec<T>
class.
More...
#include <latticetester/ntlwrap.h>
Inherits Vec< T >.
|
| vector () |
| Empty constructor. More...
|
|
| vector (size_type size) |
| Allocation constructor. More...
|
|
| vector (const Vec< T > &v) |
| Copy constructor. More...
|
|
| ~vector () |
| Destructor. More...
|
|
void | resize (size_type size) |
| Set the vector lenght to size. More...
|
|
void | clear () |
| Releases space and sets length to 0. More...
|
|
size_type | size () const |
| Returns the current lenght of the vector. More...
|
|
size_type | max_size () const |
| Returns the number of allocated and initialized elements in the vector. More...
|
|
void | push_back (const T &element) |
| a copy from NTL::Vec<T>::append More...
|
|
T | back () |
| return the last element, this one is for STL compatibility More...
|
|
bool | empty () const |
| Returns true if the vector has length 0 and false otherwise. More...
|
|
const T & | operator() (size_type i) const |
| Change in the indexation reference for () operator to start from 0. More...
|
|
template<typename T>
class NTL::vector< T >
A subclass of the NTL::Vec<T>
class.
It extends its parent with a few methods and overloads a few others with more compatible defaults.
◆ vector() [1/3]
Empty constructor.
Creates a vector of size 0.
◆ vector() [2/3]
Allocation constructor.
Allocates the space needed by a vector of size size
.
- Parameters
-
size | The size of the vector |
◆ vector() [3/3]
Copy constructor.
Makes a copy of v
.
- Parameters
-
◆ ~vector()
Destructor.
Frees memory of all T and destroys the vector.
◆ back()
return the last element, this one is for STL compatibility
◆ clear()
Releases space and sets length to 0.
This uses NTL::Vec<T>::kill()
.
◆ empty()
Returns true
if the vector has length 0 and false
otherwise.
◆ max_size()
Returns the number of allocated and initialized elements in the vector.
It is possible for the vector length to differ from this one if the max length has been preemptively expanded or if the vector has been shrinked because NTL does not free components until explicitly asked. This uses NTL::Vec<T>::MaxLength()
.
◆ operator()()
template<typename T>
const T& NTL::vector< T >::operator() |
( |
size_type |
i | ) |
const |
|
inline |
Change in the indexation reference for () operator to start from 0.
In NTL::Vec<T>
the () operator starts from 1 which is not compatible with boost.
◆ push_back()
a copy from NTL::Vec<T>::append
◆ resize()
Set the vector lenght to size.
New objects are initialized using the default contructor for T This uses NTL::Vec<T>::SetLength(size)
- Parameters
-
◆ size()
Returns the current lenght of the vector.
This uses NTL::Vec<T>::length()
.
The documentation for this class was generated from the following file:
- include/latticetester/ntlwrap.h