Fleet  0.0.9
Inference in the LOT
Public Member Functions | Public Attributes | List of all members
Vector2D< T > Class Template Reference

Just a little wrapper to allow vectors to be handled as 2D arrays, which simplifie some stuff in GrammarHypothesis. More...

#include <Vector2D.h>

Public Member Functions

 Vector2D ()
 
 Vector2D (int x, int y)
 
 Vector2D (int x, int y, T b)
 
bool inbounds (int x, int y)
 
void fill (T x)
 
void resize (const int x, const int y)
 
void reserve (const int x, const int y)
 
void insert_y (const int y_at, T b)
 
void insert_x (const int x_at, T b)
 
void delete_y (const int y_at)
 
void delete_x (const int x_at)
 
const T & at (const int x, const int y) const
 
T & at (const int x, const int y)
 
T & operator() (const int x, const int y) const
 
const T & operator() (const int x, const int y)
 
void set (const int x, const int y, const T &val)
 
void set (const int x, const int y, const T &&val)
 
get (const int x, const int y)
 
template<typename X >
void operator[] (X x)
 
std::string string ()
 

Public Attributes

int xsize = 0
 
int ysize = 0
 
std::vector< T > value
 

Detailed Description

template<typename T>
class Vector2D< T >

Just a little wrapper to allow vectors to be handled as 2D arrays, which simplifie some stuff in GrammarHypothesis.

Author
Steven Piantadosi
Date
09/08/20
Author
Steven Piantadosi
Date
03/05/22

Constructor & Destructor Documentation

◆ Vector2D() [1/3]

template<typename T>
Vector2D< T >::Vector2D ( )
inline

◆ Vector2D() [2/3]

template<typename T>
Vector2D< T >::Vector2D ( int  x,
int  y 
)
inline

◆ Vector2D() [3/3]

template<typename T>
Vector2D< T >::Vector2D ( int  x,
int  y,
b 
)
inline

Member Function Documentation

◆ at() [1/2]

template<typename T>
const T& Vector2D< T >::at ( const int  x,
const int  y 
) const
inline

◆ at() [2/2]

template<typename T>
T& Vector2D< T >::at ( const int  x,
const int  y 
)
inline

◆ delete_x()

template<typename T>
void Vector2D< T >::delete_x ( const int  x_at)
inline

◆ delete_y()

template<typename T>
void Vector2D< T >::delete_y ( const int  y_at)
inline

◆ fill()

template<typename T>
void Vector2D< T >::fill ( x)
inline

◆ get()

template<typename T>
T Vector2D< T >::get ( const int  x,
const int  y 
)
inline

◆ inbounds()

template<typename T>
bool Vector2D< T >::inbounds ( int  x,
int  y 
)
inline

◆ insert_x()

template<typename T>
void Vector2D< T >::insert_x ( const int  x_at,
b 
)
inline

◆ insert_y()

template<typename T>
void Vector2D< T >::insert_y ( const int  y_at,
b 
)
inline

◆ operator()() [1/2]

template<typename T>
T& Vector2D< T >::operator() ( const int  x,
const int  y 
) const
inline

◆ operator()() [2/2]

template<typename T>
const T& Vector2D< T >::operator() ( const int  x,
const int  y 
)
inline

◆ operator[]()

template<typename T>
template<typename X >
void Vector2D< T >::operator[] ( X  x)
inline

◆ reserve()

template<typename T>
void Vector2D< T >::reserve ( const int  x,
const int  y 
)
inline

◆ resize()

template<typename T>
void Vector2D< T >::resize ( const int  x,
const int  y 
)
inline

◆ set() [1/2]

template<typename T>
void Vector2D< T >::set ( const int  x,
const int  y,
const T &  val 
)
inline

◆ set() [2/2]

template<typename T>
void Vector2D< T >::set ( const int  x,
const int  y,
const T &&  val 
)
inline

◆ string()

template<typename T>
std::string Vector2D< T >::string ( )
inline

Member Data Documentation

◆ value

template<typename T>
std::vector<T> Vector2D< T >::value

◆ xsize

template<typename T>
int Vector2D< T >::xsize = 0

◆ ysize

template<typename T>
int Vector2D< T >::ysize = 0

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