WaSH Docs
Public Member Functions | Public Attributes | List of all members
wash::Vec< T, dim > Class Template Reference

Custom vector class for WaSH simulation. More...

#include <vector.hpp>

Public Member Functions

T & operator[] (int i)
 
const T & operator[] (int i) const
 
Vec< T, dim > operator+ (T d)
 
Vec< T, dim > operator+ (Vec< T, dim > v)
 
void operator+= (Vec< T, dim > v)
 
Vec< T, dim > operator- (Vec< T, dim > v) const
 
Vec< T, dim > operator/ (T d)
 
Vec< T, dim > operator* (T d)
 
magnitude ()
 
at (const size_t i) const
 
Vec< T, dim > abs () const
 

Public Attributes

std::array< T, dim > data
 

Detailed Description

template<typename T, int dim>
class wash::Vec< T, dim >

Custom vector class for WaSH simulation.

Template Parameters
TDatatype of the vector
dimHow many elements in the vector WaSH custom vector class

This class is how we represent vectors in WaSH. It provides a number of basic operations, and is templated on the type of the vector and the dimensionality.

Parameters
TThe type of the vector (double/float)
dimThe dimensionality of the vector (2/3 typically)

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