Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::ZVector< T > Class Template Reference

#include <zvector.h>

Public Member Functions

 ZVector ()
 
 ZVector (int64_t min_index, int64_t max_index)
 
int64_t min_index () const
 
int64_t max_index () const
 
Value (int64_t index) const
 Returns the value stored at index.
 
T & operator[] (int64_t index)
 Shortcut for returning the value stored at index.
 
operator[] (int64_t index) const
 
void Set (int64_t index, T value)
 Sets to value the content of the array at index.
 
bool Reserve (int64_t new_min_index, int64_t new_max_index)
 
void SetAll (T value)
 Sets all the elements in the array to value.
 

Detailed Description

template<class T>
class operations_research::ZVector< T >

Definition at line 43 of file zvector.h.

Constructor & Destructor Documentation

◆ ZVector() [1/2]

template<class T >
operations_research::ZVector< T >::ZVector ( )
inline

Definition at line 45 of file zvector.h.

◆ ZVector() [2/2]

template<class T >
operations_research::ZVector< T >::ZVector ( int64_t min_index,
int64_t max_index )
inline

Definition at line 48 of file zvector.h.

Member Function Documentation

◆ max_index()

template<class T >
int64_t operations_research::ZVector< T >::max_index ( ) const
inline

Definition at line 58 of file zvector.h.

◆ min_index()

template<class T >
int64_t operations_research::ZVector< T >::min_index ( ) const
inline

Definition at line 56 of file zvector.h.

◆ operator[]() [1/2]

template<class T >
T & operations_research::ZVector< T >::operator[] ( int64_t index)
inline

Shortcut for returning the value stored at index.

Definition at line 70 of file zvector.h.

◆ operator[]() [2/2]

template<class T >
T operations_research::ZVector< T >::operator[] ( int64_t index) const
inline

Definition at line 77 of file zvector.h.

◆ Reserve()

template<class T >
bool operations_research::ZVector< T >::Reserve ( int64_t new_min_index,
int64_t new_max_index )
inline

Reserves memory for new minimum and new maximum indices. Returns true if the memory could be reserved. Never shrinks the memory allocated.

Definition at line 96 of file zvector.h.

◆ Set()

template<class T >
void operations_research::ZVector< T >::Set ( int64_t index,
T value )
inline

Sets to value the content of the array at index.

Definition at line 86 of file zvector.h.

◆ SetAll()

template<class T >
void operations_research::ZVector< T >::SetAll ( T value)
inline

Sets all the elements in the array to value.

Definition at line 131 of file zvector.h.

◆ Value()

template<class T >
T operations_research::ZVector< T >::Value ( int64_t index) const
inline

Returns the value stored at index.

Definition at line 61 of file zvector.h.


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