Template Class Vector
Defined in File vector.h
Inheritance Relationships
Base Type
public opensn::NDArray< TYPE, 1 >
(Template Class NDArray)
Class Documentation
-
template<typename TYPE>
class Vector : public opensn::NDArray<TYPE, 1> Public Functions
-
inline Vector()
Create an empty dense (column) vector.
-
inline Vector(unsigned int rows)
Create a dense (column) vector with specified number of rows.
-
inline Vector(unsigned int rows, TYPE intitial_value)
Create a dense (column) vector with specified number of rows and initialize the elements.
-
inline unsigned int Rows() const
Return the number of rows.
-
inline void Resize(unsigned int new_size)
Resize the vector.
-
inline void Resize(unsigned int new_size, const TYPE &value)
Resize the vector and initialize the new elements with a value.
-
inline void Normalize()
Normalizes the vector in-place.
-
inline TYPE Magnitude() const
Computes the L2-norm of the vector. Otherwise known as the length of a 3D vector.
-
inline std::string PrintStr() const
Prints the vector to a string and then returns the string.
-
inline Vector()