#include <vector_T.h>
Regular vector Using CPUMemoryManager, it has the same behavior as std::vector with extra conveniences:
Public Member Functions | |
vector () | |
Basic constructor. More... | |
vector (Size n, const T &value) | |
Constructor. More... | |
vector (Size n) | |
Constructor. More... | |
vector (const std::vector< T, Alloc > &x) | |
Constructor. More... | |
vector (const std::initializer_list< T > &t) | |
Brace initalizer constructor. More... | |
vector (std::vector< T, Alloc > &&v) | |
Move constructor. More... | |
vector & | operator= (const std::vector< T, Alloc > &x) |
Copy operator. More... | |
vector & | operator= (std::vector< T, Alloc > &&v) |
Move assignment operator. More... | |
vector (typename vector< T >::const_iterator first, typename vector< T >::const_iterator last) | |
Constructor. More... | |
reference | operator[] (Size n) |
Read/write random access. More... | |
const_reference | operator[] (Size n) const |
Read-only random access. More... | |
std::ostream & | write (std::ostream &os) const |
std::istream & | read (std::istream &in) |
void | fill (const T &value) |
Sets every element to 'value'. More... | |
void | fastResize (Size n) |
SOFA_TYPE_API std::istream & | read (std::istream &in) |
SOFA_TYPE_API std::istream & | read (std::istream &in) |
SOFA_TYPE_API std::ostream & | write (std::ostream &os) const |
SOFA_TYPE_API std::istream & | read (std::istream &in) |
SOFA_TYPE_API std::istream & | read (std::istream &in) |
Specialization for reading vectors of int and unsigned int using "A-B" notation for all integers between A and B. More... | |
SOFA_TYPE_API std::istream & | read (std::istream &in) |
SOFA_TYPE_API std::ostream & | write (std::ostream &os) const |
Specialization for writing vectors of unsigned char. More... | |
SOFA_TYPE_API std::istream & | read (std::istream &in) |
SOFA_TYPE_API std::ostream & | write (std::ostream &os) const |
SOFA_TYPE_API std::ostream & | write (std::ostream &os) const |
Friends | |
std::ostream & | operator<< (std::ostream &os, const vector &vec) |
Output stream. More... | |
std::istream & | operator>> (std::istream &in, vector &vec) |
Input stream. More... | |
|
inline |
Basic constructor.
|
inline |
Constructor.
|
inlineexplicit |
Constructor.
|
inline |
Constructor.
|
inline |
Brace initalizer constructor.
|
inline |
Move constructor.
|
inline |
Constructor.
|
inline |
this function is usefull for vector_device because it resize the vector without device operation (if device is not valid). Therefore the function is used in asynchronous code to safly resize a vector which is either cuda of type::vector
|
inline |
Sets every element to 'value'.
|
inline |
Copy operator.
|
inline |
Move assignment operator.
|
inline |
Read/write random access.
|
inline |
Read-only random access.
SOFA_TYPE_API std::istream & sofa::type::vector< int >::read | ( | std::istream & | in | ) |
Input stream Specialization for reading vectors of int and unsigned int using "A-B" notation for all integers between A and B, optionnally specifying a step using "A-B-step" notation.
SOFA_TYPE_API std::istream & sofa::type::vector< unsigned int >::read | ( | std::istream & | in | ) |
Input stream Specialization for reading vectors of int and unsigned int using "A-B" notation for all integers between A and B
SOFA_TYPE_API std::istream & sofa::type::vector< unsigned char >::read | ( | std::istream & | in | ) |
Input stream Specialization for reading vectors of unsigned char
SOFA_TYPE_API std::istream & sofa::type::vector< int >::read | ( | std::istream & | in | ) |
Specialization for reading vectors of int and unsigned int using "A-B" notation for all integers between A and B.
SOFA_TYPE_API std::istream & sofa::type::vector< unsigned int >::read | ( | std::istream & | in | ) |
SOFA_TYPE_API std::istream & sofa::type::vector< unsigned char >::read | ( | std::istream & | in | ) |
|
inline |
SOFA_TYPE_API std::ostream & sofa::type::vector< unsigned char >::write | ( | std::ostream & | os | ) | const |
Output stream Specialization for writing vectors of unsigned char
SOFA_TYPE_API std::ostream & sofa::type::vector< unsigned char >::write | ( | std::ostream & | os | ) | const |
Specialization for writing vectors of unsigned char.
SOFA_TYPE_API std::ostream & sofa::type::vector< std::string >::write | ( | std::ostream & | os | ) | const |
Output stream Specialization for writing vectors of unsigned char
SOFA_TYPE_API std::ostream & sofa::type::vector< std::string >::write | ( | std::ostream & | os | ) | const |
|
inline |
|
friend |
Output stream.
|
friend |
Input stream.