MADNESS  0.10.1
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
madness::Vector< T, N > Class Template Reference

A simple, fixed dimension vector. More...

#include <vector.h>

Public Types

using arrayT = std::array< T, N >
 The underlying array type. More...
 
using const_iterator = typename arrayT::const_iterator
 Const iterator type. More...
 
using const_reference = typename arrayT::const_reference
 Const reference type. More...
 
using const_reverse_iterator = typename arrayT::const_reverse_iterator
 Const reverse iterator type. More...
 
using difference_type = typename arrayT::difference_type
 Difference type. More...
 
using iterator = typename arrayT::iterator
 Iterator type. More...
 
using reference = typename arrayT::reference
 Reference type. More...
 
using reverse_iterator = typename arrayT::reverse_iterator
 Reverse iterator type. More...
 
using size_type = typename arrayT::size_type
 Size type. More...
 
using value_type = typename arrayT::value_type
 The data value type. More...
 

Public Member Functions

 Vector ()=default
 Default constructor; does not initialize vector contents. More...
 
template<typename Q >
 Vector (const Q(&t)[N])
 Construct from a C-style array of the same dimension. More...
 
template<typename Q >
 Vector (const std::array< Q, N > &t)
 Construct from a std::array of equal length. More...
 
 Vector (const std::initializer_list< T > &list)
 List initialization constructor (deep copy because Vector is POD). More...
 
template<typename Q , typename A >
 Vector (const std::vector< Q, A > &t)
 Construct from an STL vector of equal or greater length. More...
 
template<typename Q >
 Vector (const Vector< Q, N > &other)
 Copy constructor is deep (because Vector is POD). More...
 
 Vector (const Vector< T, N > &other)
 Copy constructor is deep (because Vector is POD). More...
 
template<typename Q >
 Vector (Q t)
 Initialize all elements to value t. More...
 
reference at (size_type i)
 Access element i of the Vector with bounds checking. More...
 
const_reference at (size_type i) const
 Access element i of the Vector with bounds checking. More...
 
reference back ()
 Access the last element. More...
 
const_reference back () const
 Access the last element. More...
 
iterator begin ()
 Iterator starting at the first element. More...
 
const_iterator begin () const
 Const iterator starting at the first element. More...
 
Tdata ()
 Direct access to the underlying array. More...
 
const Tdata () const
 Direct access to the underlying array. More...
 
bool empty () const
 Check if the Vector is empty. More...
 
iterator end ()
 Iterator to the end (past the last element). More...
 
const_iterator end () const
 Const iterator to the end (past the last element). More...
 
void fill (const T &t)
 Fill the Vector with the specified value. More...
 
reference front ()
 Access the first element. More...
 
const_reference front () const
 Access the first element. More...
 
hashT hash () const
 Support for MADNESS hashing. More...
 
size_type max_size () const
 Get the maximum size of the Vector. More...
 
T normf () const
 Calculate the 2-norm of the vector elements. More...
 
 operator std::array< T, N > ()
 Type conversion to a std::array. More...
 
template<typename Q >
Vector< T, N > & operator*= (Q q)
 In-place, element-wise multiplcation by a scalar. More...
 
template<typename Q >
Vector< T, N > & operator+= (const Vector< Q, N > &q)
 In-place, element-wise addition of another Vector. More...
 
template<typename Q >
Vector< T, N > & operator-= (const Vector< Q, N > &q)
 In-place, element-wise subtraction of another Vector. More...
 
Vector< T, N > & operator= (const std::initializer_list< T > &list)
 List initialization assignment (deep copy because Vector is POD). More...
 
template<typename Q , typename A >
Vector< T, N > & operator= (const std::vector< Q, A > &other)
 Assignment is deep (because Vector is POD). More...
 
Vector< T, N > & operator= (const T &t)
 Fill from a scalar value. More...
 
template<typename Q >
Vector< T, N > & operator= (const Vector< Q, N > &other)
 Assignment is deep (because Vector is POD). More...
 
Vector< T, N > & operator= (const Vector< T, N > &other)
 Assignment is deep (because a Vector is POD). More...
 
reference operator[] (size_type i)
 Access element i of the Vector. More...
 
const_reference operator[] (size_type i) const
 Access element i of the Vector. More...
 
reverse_iterator rbegin ()
 Reverse iterator starting at the last element. More...
 
const_reverse_iterator rbegin () const
 Const reverse iterator starting at the last element. More...
 
reverse_iterator rend ()
 Reverse iterator to the beginning (before the first element). More...
 
const_reverse_iterator rend () const
 Const reverse iterator to the beginning (before the first element). More...
 
template<typename Archive >
void serialize (Archive &ar)
 Support for MADNESS serialization. More...
 
size_type size () const
 Accessor for the number of elements in the Vector. More...
 
void swap (Vector< T, N > &other)
 Swap the contents with another Vector. More...
 

Static Public Attributes

static const size_type static_size = N
 The size of the Vector. More...
 

Private Attributes

arrayT data_
 The underlying array. More...
 

Friends

template<typename Q , std::size_t M>
class Vector
 
bool operator!= (const Vector< T, N > &l, const Vector< T, N > &r)
 Check if any element is not equal to its partner in the other Vector. More...
 
bool operator< (const Vector< T, N > &l, const Vector< T, N > &r)
 Compare l and r lexicographically. More...
 
std::ostream & operator<< (std::ostream &s, const Vector< T, N > &v)
 Output a Vector to stream. More...
 
bool operator<= (const Vector< T, N > &l, const Vector< T, N > &r)
 Compare l and r lexicographically. More...
 
bool operator== (const Vector< T, N > &l, const Vector< T, N > &r)
 Check if each element is equal to its partner in the other Vector. More...
 
bool operator> (const Vector< T, N > &l, const Vector< T, N > &r)
 Compare l and r lexicographically. More...
 
bool operator>= (const Vector< T, N > &l, const Vector< T, N > &r)
 Compare l and r lexicographically. More...
 

Detailed Description

template<typename T, std::size_t N>
class madness::Vector< T, N >

A simple, fixed dimension vector.

This class eliminates memory allocation cost, is just POD (it can be copied easily and allocated on the stack), and the known dimension permits aggressive compiler optimizations.

Provides additional mathematical and I/O operations.

Template Parameters
TThe type of data stored in the vector.
NThe size of the vector.

Member Typedef Documentation

◆ arrayT

template<typename T , std::size_t N>
using madness::Vector< T, N >::arrayT = std::array<T,N>

The underlying array type.

◆ const_iterator

template<typename T , std::size_t N>
using madness::Vector< T, N >::const_iterator = typename arrayT::const_iterator

Const iterator type.

◆ const_reference

template<typename T , std::size_t N>
using madness::Vector< T, N >::const_reference = typename arrayT::const_reference

Const reference type.

◆ const_reverse_iterator

template<typename T , std::size_t N>
using madness::Vector< T, N >::const_reverse_iterator = typename arrayT::const_reverse_iterator

Const reverse iterator type.

◆ difference_type

template<typename T , std::size_t N>
using madness::Vector< T, N >::difference_type = typename arrayT::difference_type

Difference type.

◆ iterator

template<typename T , std::size_t N>
using madness::Vector< T, N >::iterator = typename arrayT::iterator

Iterator type.

◆ reference

template<typename T , std::size_t N>
using madness::Vector< T, N >::reference = typename arrayT::reference

Reference type.

◆ reverse_iterator

template<typename T , std::size_t N>
using madness::Vector< T, N >::reverse_iterator = typename arrayT::reverse_iterator

Reverse iterator type.

◆ size_type

template<typename T , std::size_t N>
using madness::Vector< T, N >::size_type = typename arrayT::size_type

Size type.

◆ value_type

template<typename T , std::size_t N>
using madness::Vector< T, N >::value_type = typename arrayT::value_type

The data value type.

Constructor & Destructor Documentation

◆ Vector() [1/8]

template<typename T , std::size_t N>
madness::Vector< T, N >::Vector ( )
default

Default constructor; does not initialize vector contents.

◆ Vector() [2/8]

template<typename T , std::size_t N>
template<typename Q >
madness::Vector< T, N >::Vector ( Q  t)
inlineexplicit

Initialize all elements to value t.

Template Parameters
QThe type of t.
Parameters
[in]tThe value used to initialized the Vector.

References madness::Vector< T, N >::fill().

◆ Vector() [3/8]

template<typename T , std::size_t N>
template<typename Q >
madness::Vector< T, N >::Vector ( const Q(&)  t[N])
inlineexplicit

Construct from a C-style array of the same dimension.

Template Parameters
QThe type of data in t.
Parameters
[in]tThe C-style array.

References copy(), madness::Vector< T, N >::data_, and N.

◆ Vector() [4/8]

template<typename T , std::size_t N>
template<typename Q , typename A >
madness::Vector< T, N >::Vector ( const std::vector< Q, A > &  t)
inlineexplicit

Construct from an STL vector of equal or greater length.

Template Parameters
QType of data stored in the std::vector.
AAllocator type for the std::vector.
Parameters
[in]tThe std::vector.

References madness::Vector< T, N >::operator=().

◆ Vector() [5/8]

template<typename T , std::size_t N>
template<typename Q >
madness::Vector< T, N >::Vector ( const std::array< Q, N > &  t)
inlineexplicit

Construct from a std::array of equal length.

Template Parameters
QType of data stored in the original std::array.
Parameters
[in]tThe std::array.

References madness::Vector< T, N >::data_.

◆ Vector() [6/8]

template<typename T , std::size_t N>
madness::Vector< T, N >::Vector ( const Vector< T, N > &  other)
inline

Copy constructor is deep (because Vector is POD).

Parameters
[in]otherThe Vector to copy.

References madness::Vector< T, N >::data_, MADNESS_PRAGMA_GCC, and madness::pop().

◆ Vector() [7/8]

template<typename T , std::size_t N>
template<typename Q >
madness::Vector< T, N >::Vector ( const Vector< Q, N > &  other)
inline

Copy constructor is deep (because Vector is POD).

Template Parameters
QType of the Vector to copy.
Parameters
[in]otherThe Vector to copy.

References madness::Vector< T, N >::data_.

◆ Vector() [8/8]

template<typename T , std::size_t N>
madness::Vector< T, N >::Vector ( const std::initializer_list< T > &  list)
inline

List initialization constructor (deep copy because Vector is POD).

This constructor allows initialization using, e.g.,

Vector<double, 3> v{ 1.5, 2.4, -1.9 };
static const double v
Definition: hatom_sf_dirac.cc:20
Exceptions
MadnessExceptionif the list does not contain exactly N elements.
Parameters
[in]listThe initializer list; elements are copied to the Vector.

References copy(), madness::Vector< T, N >::data_, MADNESS_ASSERT, and N.

Member Function Documentation

◆ at() [1/2]

template<typename T , std::size_t N>
reference madness::Vector< T, N >::at ( size_type  i)
inline

Access element i of the Vector with bounds checking.

Parameters
[in]iThe index.
Returns
A reference to element i.

References madness::Vector< T, N >::data_.

◆ at() [2/2]

template<typename T , std::size_t N>
const_reference madness::Vector< T, N >::at ( size_type  i) const
inline

Access element i of the Vector with bounds checking.

Parameters
[in]iThe index.
Returns
A const reference to element i.

References madness::Vector< T, N >::data_.

◆ back() [1/2]

template<typename T , std::size_t N>
reference madness::Vector< T, N >::back ( )
inline

Access the last element.

Returns
A reference to the last element.

References madness::Vector< T, N >::data_.

◆ back() [2/2]

template<typename T , std::size_t N>
const_reference madness::Vector< T, N >::back ( ) const
inline

Access the last element.

Returns
A const reference to the last element.

References madness::Vector< T, N >::data_.

◆ begin() [1/2]

template<typename T , std::size_t N>
iterator madness::Vector< T, N >::begin ( )
inline

Iterator starting at the first element.

Returns
Iterator to the starting element.

References madness::Vector< T, N >::data_.

Referenced by main().

◆ begin() [2/2]

template<typename T , std::size_t N>
const_iterator madness::Vector< T, N >::begin ( ) const
inline

Const iterator starting at the first element.

Returns
Const iterator to the starting element.

References madness::Vector< T, N >::data_.

◆ data() [1/2]

template<typename T , std::size_t N>
T* madness::Vector< T, N >::data ( )
inline

Direct access to the underlying array.

Returns
Pointer to the underlying array.

References madness::Vector< T, N >::data_.

◆ data() [2/2]

template<typename T , std::size_t N>
const T* madness::Vector< T, N >::data ( ) const
inline

Direct access to the underlying array.

Returns
Const pointer to the underlying array.

References madness::Vector< T, N >::data_.

◆ empty()

template<typename T , std::size_t N>
bool madness::Vector< T, N >::empty ( ) const
inline

Check if the Vector is empty.

Returns
True if the Vector is empty; false otherwise. This should be false unless N == 0.

References madness::Vector< T, N >::data_.

◆ end() [1/2]

template<typename T , std::size_t N>
iterator madness::Vector< T, N >::end ( )
inline

Iterator to the end (past the last element).

Returns
Iterator to the end.

References madness::Vector< T, N >::data_.

◆ end() [2/2]

template<typename T , std::size_t N>
const_iterator madness::Vector< T, N >::end ( ) const
inline

Const iterator to the end (past the last element).

Returns
Const iterator to the end.

References madness::Vector< T, N >::data_.

◆ fill()

template<typename T , std::size_t N>
void madness::Vector< T, N >::fill ( const T t)
inline

◆ front() [1/2]

template<typename T , std::size_t N>
reference madness::Vector< T, N >::front ( )
inline

Access the first element.

Returns
A reference to the first element.

References madness::Vector< T, N >::data_.

◆ front() [2/2]

template<typename T , std::size_t N>
const_reference madness::Vector< T, N >::front ( ) const
inline

Access the first element.

Returns
A const reference to the first element.

References madness::Vector< T, N >::data_.

◆ hash()

template<typename T , std::size_t N>
hashT madness::Vector< T, N >::hash ( ) const
inline

Support for MADNESS hashing.

Returns
The hash.

References madness::Vector< T, N >::data_, and madness::hash_value().

◆ max_size()

template<typename T , std::size_t N>
size_type madness::Vector< T, N >::max_size ( ) const
inline

Get the maximum size of the Vector.

Returns
The maximum size, N.

References madness::Vector< T, N >::data_.

◆ normf()

template<typename T , std::size_t N>
T madness::Vector< T, N >::normf ( ) const
inline

Calculate the 2-norm of the vector elements.

Returns
The 2-norm.
Todo:
Is there a reason this is "normf" and not "norm2"?

References d(), madness::Vector< T, N >::data_, N, and T().

Referenced by madness::Diamagnetic_potential_factor::Diamagnetic_potential_factor(), madness::Diamagnetic_potential_factor::apply_potential(), bend(), madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), madness::Diamagnetic_potential_factor::compute_R_times_T_commutator_scalar_term_numerically(), madness::Diamagnetic_potential_factor::compute_U2(), madness::NuclearCorrelationFactor::dsmoothed_unitvec(), madness::Diamagnetic_potential_factor::factor_with_phase(), ExactSpinor::Fvalue(), Ansatz0::make_guess(), make_Hv(), make_pw_matrix(), madness::Molecule::nuclear_attraction_potential_second_derivative(), sgl_guess::operator()(), madness::R_times_arg_div_R::operator()(), stepfunction::operator()(), ncf::operator()(), madness::NuclearCorrelationFactor::R_functor::operator()(), madness::NuclearCorrelationFactor::U1_functor::operator()(), madness::NuclearCorrelationFactor::U1_atomic_functor::operator()(), madness::NuclearCorrelationFactor::U1_dot_U1_functor::operator()(), madness::NuclearCorrelationFactor::U2_functor::operator()(), madness::NuclearCorrelationFactor::U3_functor::operator()(), madness::NuclearCorrelationFactor::U2_atomic_functor::operator()(), madness::NuclearCorrelationFactor::U3_atomic_functor::operator()(), madness::NuclearCorrelationFactor::square_times_V_functor::operator()(), madness::NuclearCorrelationFactor::square_times_V_derivative_functor::operator()(), madness::NuclearCorrelationFactor::RX_functor::operator()(), madness::NuclearCorrelationFactor::U1X_functor::operator()(), madness::NuclearCorrelationFactor::U2X_functor::operator()(), madness::NuclearCorrelationFactor::U3X_functor::operator()(), refpotfunctor::operator()(), madness::Znemo::s_orbital::operator()(), madness::Znemo::p_orbital::operator()(), madness::spherical_box< NDIM >::operator()(), p_minus(), p_plus(), ExactSpinor::psivalue(), slater(), madness::NuclearCorrelationFactor::smoothed_unitvec(), madness::Slater::Sp(), madness::Polynomial< N >::Sp(), test_add(), test_conversion(), test_inner(), test_Kcommutator(), and madness::unitvec().

◆ operator std::array< T, N >()

template<typename T , std::size_t N>
madness::Vector< T, N >::operator std::array< T, N > ( )
inline

Type conversion to a std::array.

Returns
The underlying std::array.

◆ operator*=()

template<typename T , std::size_t N>
template<typename Q >
Vector<T,N>& madness::Vector< T, N >::operator*= ( Q  q)
inline

In-place, element-wise multiplcation by a scalar.

Template Parameters
QType of the scalar.
Parameters
[in]qThe scalar.
Returns
A reference to this for chaining operations.
Todo:
Do we want a similar division operation?

References madness::Vector< T, N >::data_, N, and q().

◆ operator+=()

template<typename T , std::size_t N>
template<typename Q >
Vector<T,N>& madness::Vector< T, N >::operator+= ( const Vector< Q, N > &  q)
inline

In-place, element-wise addition of another Vector.

Template Parameters
QType stored in the other Vector.
Parameters
[in]qThe other Vector.
Returns
A reference to this for chaining operations.

References madness::Vector< T, N >::data_, N, and q().

◆ operator-=()

template<typename T , std::size_t N>
template<typename Q >
Vector<T,N>& madness::Vector< T, N >::operator-= ( const Vector< Q, N > &  q)
inline

In-place, element-wise subtraction of another Vector.

Template Parameters
QType stored in the other Vector.
Parameters
[in]qThe other Vector.
Returns
A reference to this for chaining operations.

References madness::Vector< T, N >::data_, N, and q().

◆ operator=() [1/5]

template<typename T , std::size_t N>
Vector<T,N>& madness::Vector< T, N >::operator= ( const std::initializer_list< T > &  list)
inline

List initialization assignment (deep copy because Vector is POD).

This assignment operator allows initialization using, e.g.,

v = { 1.5, 2.4, -1.9 };
Exceptions
MadnessExceptionif the list does not contain exactly N elements.
Parameters
[in]listThe initializer list; elements are copied to the Vector.

References copy(), madness::Vector< T, N >::data_, MADNESS_ASSERT, and N.

◆ operator=() [2/5]

template<typename T , std::size_t N>
template<typename Q , typename A >
Vector<T,N>& madness::Vector< T, N >::operator= ( const std::vector< Q, A > &  other)
inline

Assignment is deep (because Vector is POD).

Make sure the size of other is at least N.

Template Parameters
QThe type of data in the std::vector.
AThe allocator type for the std::vector.
Parameters
[in]otherThe std::vector to copy.
Returns
This Vector.

References copy(), madness::Vector< T, N >::data_, MADNESS_ASSERT, and N.

◆ operator=() [3/5]

template<typename T , std::size_t N>
Vector<T,N>& madness::Vector< T, N >::operator= ( const T t)
inline

Fill from a scalar value.

Parameters
[in]tThe scalar to use for filling.
Returns
This Vector.

References madness::Vector< T, N >::fill().

◆ operator=() [4/5]

template<typename T , std::size_t N>
template<typename Q >
Vector<T,N>& madness::Vector< T, N >::operator= ( const Vector< Q, N > &  other)
inline

Assignment is deep (because Vector is POD).

Template Parameters
QThe type of the Vector to copy.
Parameters
[in]otherThe Vector to copy.
Returns
This Vector.

References madness::Vector< T, N >::data_.

◆ operator=() [5/5]

template<typename T , std::size_t N>
Vector<T,N>& madness::Vector< T, N >::operator= ( const Vector< T, N > &  other)
inline

Assignment is deep (because a Vector is POD).

Parameters
[in]otherThe Vector to copy.
Returns
This Vector.

References madness::Vector< T, N >::data_.

Referenced by madness::Vector< T, N >::Vector().

◆ operator[]() [1/2]

template<typename T , std::size_t N>
reference madness::Vector< T, N >::operator[] ( size_type  i)
inline

Access element i of the Vector.

Bounds checking is not performed.

Parameters
[in]iThe index.
Returns
A reference to element i.

References madness::Vector< T, N >::data_.

◆ operator[]() [2/2]

template<typename T , std::size_t N>
const_reference madness::Vector< T, N >::operator[] ( size_type  i) const
inline

Access element i of the Vector.

Bounds checking is not performed.

Parameters
[in]iThe index.
Returns
A const reference to element i.

References madness::Vector< T, N >::data_.

◆ rbegin() [1/2]

template<typename T , std::size_t N>
reverse_iterator madness::Vector< T, N >::rbegin ( )
inline

Reverse iterator starting at the last element.

Returns
Reverse iterator to the last element.

References madness::Vector< T, N >::data_.

◆ rbegin() [2/2]

template<typename T , std::size_t N>
const_reverse_iterator madness::Vector< T, N >::rbegin ( ) const
inline

Const reverse iterator starting at the last element.

Returns
Const reverse iterator to the last element.

References madness::Vector< T, N >::data_.

◆ rend() [1/2]

template<typename T , std::size_t N>
reverse_iterator madness::Vector< T, N >::rend ( )
inline

Reverse iterator to the beginning (before the first element).

Returns
Reverse iterator to the beginning.

References madness::Vector< T, N >::data_.

◆ rend() [2/2]

template<typename T , std::size_t N>
const_reverse_iterator madness::Vector< T, N >::rend ( ) const
inline

Const reverse iterator to the beginning (before the first element).

Returns
Const reverse iterator to the beginning.

References madness::Vector< T, N >::data_.

◆ serialize()

template<typename T , std::size_t N>
template<typename Archive >
void madness::Vector< T, N >::serialize ( Archive &  ar)
inline

Support for MADNESS serialization.

Template Parameters
ArchiveThe archive type.
Parameters
[in,out]arThe archive.

References madness::Vector< T, N >::data_.

◆ size()

template<typename T , std::size_t N>
size_type madness::Vector< T, N >::size ( ) const
inline

Accessor for the number of elements in the Vector.

Returns
The number of elements.

References madness::Vector< T, N >::data_.

Referenced by operator>>().

◆ swap()

template<typename T , std::size_t N>
void madness::Vector< T, N >::swap ( Vector< T, N > &  other)
inline

Swap the contents with another Vector.

Parameters
[in]otherThe other vector.

References madness::Vector< T, N >::data_.

Referenced by madness::swap().

Friends And Related Function Documentation

◆ Vector

template<typename T , std::size_t N>
template<typename Q , std::size_t M>
friend class Vector
friend

◆ operator!=

template<typename T , std::size_t N>
bool operator!= ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)
friend

Check if any element is not equal to its partner in the other Vector.

Parameters
[in]lOne Vector.
[in]rThe other Vector.
Returns
True if any element is not equal to its partner; false otherwise.

◆ operator<

template<typename T , std::size_t N>
bool operator< ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)
friend

Compare l and r lexicographically.

Parameters
[in]lOne Vector.
[in]rThe other Vector.
Returns
True if the contents of l are lexicographically less than the contents of r; false otherwise.

◆ operator<<

template<typename T , std::size_t N>
std::ostream& operator<< ( std::ostream &  s,
const Vector< T, N > &  v 
)
friend

Output a Vector to stream.

Parameters
[in]sThe output stream.
[in]vThe Vector to output.
Returns
The output stream.

◆ operator<=

template<typename T , std::size_t N>
bool operator<= ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)
friend

Compare l and r lexicographically.

Parameters
[in]lOne Vector.
[in]rThe other Vector.
Returns
True if the contents of l are lexicographically less than or equal to the contents of r; false otherwise.

◆ operator==

template<typename T , std::size_t N>
bool operator== ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)
friend

Check if each element is equal to its partner in the other Vector.

Parameters
[in]lOne Vector.
[in]rThe other Vector.
Returns
True if each element is equal to its partner; false otherwise.

◆ operator>

template<typename T , std::size_t N>
bool operator> ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)
friend

Compare l and r lexicographically.

Parameters
[in]lOne Vector.
[in]rThe other Vector.
Returns
True if the contents of l are lexicographically greater than the contents of r; false otherwise.

◆ operator>=

template<typename T , std::size_t N>
bool operator>= ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)
friend

Compare l and r lexicographically.

Parameters
[in]lOne Vector.
[in]rThe other Vector.
Returns
True if the contents of l are lexicographically greater than or equal to the contents of r; false otherwise.

Member Data Documentation

◆ data_

template<typename T , std::size_t N>
arrayT madness::Vector< T, N >::data_
private

◆ static_size

template<typename T , std::size_t N>
const size_type madness::Vector< T, N >::static_size = N
static

The size of the Vector.


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