IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::Vector< T, Allocator > Class Template Reference

A more IMP-like version of the std::vector. More...

#include <IMP/Vector.h>

Inherits IMP::Value.

Inherited by IMP::IndexVector< Tag, T, Allocator, Equal >.

Detailed Description

template<class T, class Allocator = std::allocator<T>>
class IMP::Vector< T, Allocator >

A more IMP-like version of the std::vector.

Specifically this class adds functionality from Python arrays such as

  • hashing
  • output to streams
  • use of +=es
  • implicit conversion when the contents are implicitly convertible
  • bounds checking in debug mode

Definition at line 50 of file Vector.h.

Public Member Functions

template<class VO>
 Vector (const std::vector< VO > &o)
template<class It>
 Vector (It b, It e)
 Vector (unsigned int sz, const T &t=T())
template<class O>
 operator Vector< O > () const
template<class OV>
Vector< T > operator+= (const OV &o)

Constructor & Destructor Documentation

◆ Vector() [1/4]

template<class T, class Allocator = std::allocator<T>>
IMP::Vector< T, Allocator >::Vector ( )

Definition at line 89 of file Vector.h.

◆ Vector() [2/4]

template<class T, class Allocator = std::allocator<T>>
IMP::Vector< T, Allocator >::Vector ( unsigned int sz,
const T & t = T() )
explicit

Definition at line 90 of file Vector.h.

◆ Vector() [3/4]

template<class T, class Allocator = std::allocator<T>>
template<class It>
IMP::Vector< T, Allocator >::Vector ( It b,
It e )

Definition at line 109 of file Vector.h.

◆ Vector() [4/4]

template<class T, class Allocator = std::allocator<T>>
template<class VO>
IMP::Vector< T, Allocator >::Vector ( const std::vector< VO > & o)
explicit

Definition at line 112 of file Vector.h.

Member Function Documentation

◆ operator Vector< O >()

template<class T, class Allocator = std::allocator<T>>
template<class O>
IMP::Vector< T, Allocator >::operator Vector< O > ( ) const

Definition at line 116 of file Vector.h.

◆ operator+=()

template<class T, class Allocator = std::allocator<T>>
template<class OV>
Vector< T > IMP::Vector< T, Allocator >::operator+= ( const OV & o)

Definition at line 120 of file Vector.h.


The documentation for this class was generated from the following file: