Snowman  0.1.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
snowboy::Vector Class Reference
Inheritance diagram for snowboy::Vector:
Inheritance graph
[legend]
Collaboration diagram for snowboy::Vector:
Collaboration graph
[legend]

Public Member Functions

 Vector (const VectorBase &other)
 
 Vector (const Vector &other)
 
 Vector (Vector &&other) noexcept
 
size_t capacity () const noexcept
 
void Resize (size_t size, MatrixResizeType resize=MatrixResizeType::kSetZero)
 
Vectoroperator= (const Vector &other)
 
Vectoroperator= (const VectorBase &other)
 
Vectoroperator= (Vector &&other) noexcept
 
void Read (bool, bool, std::istream *)
 
void Read (bool, std::istream *)
 
void Swap (Vector *other) noexcept
 
void RemoveElement (size_t index) noexcept
 
- Public Member Functions inherited from snowboy::VectorBase
float * begin () const noexcept
 
float * end () const noexcept
 
size_t size () const noexcept
 
float * data () const noexcept
 
float & operator[] (size_t index) const noexcept
 
float & operator() (size_t index) const noexcept
 
bool empty () const noexcept
 
void Add (float x) noexcept
 
void AddDiagMat2 (float, const MatrixBase &, MatrixTransposeType, float) noexcept
 
void AddMatVec (float alpha, const MatrixBase &a, MatrixTransposeType trans, const VectorBase &x, float beta) noexcept
 
void AddVec (float, const VectorBase &) noexcept
 
void AddVec2 (float, const VectorBase &) noexcept
 
void ApplyFloor (float) noexcept
 
void ApplyLog () noexcept
 
void ApplyPow (float) noexcept
 
float ApplySoftmax () noexcept
 
void CopyColsFromMat (const MatrixBase &) noexcept
 
void CopyFromVec (const VectorBase &) noexcept
 
void CopyRowsFromMat (const MatrixBase &) noexcept
 
float CosineDistance (const VectorBase &) const
 
float DotVec (const VectorBase &) const
 
float EuclideanDistance (const VectorBase &) const
 
bool IsZero (float cutoff) const noexcept
 
float Max () const noexcept
 
float Max (int *e) const noexcept
 
float Min () const noexcept
 
float Min (int *e) const noexcept
 
void MulElements (const VectorBase &) noexcept
 
float Norm (float) const noexcept
 
SubVector Range (size_t offset, size_t size) const noexcept
 
void Scale (float) noexcept
 
void Set (float) noexcept
 
void SetRandomGaussian ()
 
void SetRandomUniform ()
 
float Sum () const noexcept
 
void Write (bool, std::ostream *) const
 
bool HasNan () const noexcept
 
bool HasInfinity () const noexcept
 

Static Public Member Functions

static void PrintAllocStats (std::ostream &)
 
static void ResetAllocStats ()
 

Protected Attributes

size_t m_cap {0}
 
- Protected Attributes inherited from snowboy::VectorBase
size_t m_size {0}
 
float * m_data {nullptr}
 

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