Template Class Vector#

Inheritance Relationships#

Base Type#

Class Documentation#

template<typename ScalarType, size_t NumDims>
class Vector : public librapid::vectorDetail::VectorBase<Vector<ScalarType, NumDims>>#

Public Types

using Scalar = ScalarType#
using StorageType = vectorDetail::VectorStorage<Scalar, NumDims>#
using IndexTypeConst = typename StorageType::IndexTypeConst#
using IndexType = typename StorageType::IndexType#
using GetType = typename StorageType::GetType#

Public Functions

Vector() = default#
Vector(const Vector &other) = default#
Vector(Vector &&other) noexcept = default#
template<typename ...Args>
inline explicit Vector(Args... args)#
template<typename T>
inline Vector(const std::initializer_list<T> &args)#
template<typename T>
inline explicit Vector(const std::vector<T> &args)#
template<typename OtherScalar, size_t OtherDims>
inline explicit Vector(const Vector<OtherScalar, OtherDims> &other)#
template<typename LHS, typename RHS, typename Op>
inline explicit Vector(const vectorDetail::BinaryVecOp<LHS, RHS, Op> &other)#
template<typename Val, typename Op>
inline explicit Vector(const vectorDetail::UnaryVecOp<Val, Op> &other)#
auto operator=(const Vector &other) -> Vector& = default#
auto operator=(Vector &&other) noexcept -> Vector& = default#
template<typename OtherScalar, size_t OtherDims>
inline auto operator=(const Vector<OtherScalar, OtherDims> &other) -> Vector&#
template<typename LHS, typename RHS, typename Op>
inline auto operator=(const vectorDetail::BinaryVecOp<LHS, RHS, Op> &other) -> Vector&#
template<typename Val, typename Op>
inline auto operator=(const vectorDetail::UnaryVecOp<Val, Op> &other) -> Vector&#
inline virtual IndexTypeConst operator[](int64_t index) const override#
inline virtual IndexType operator[](int64_t index) override#
inline Vector eval() const#
template<typename NewScalar, size_t NewDims>
inline auto cast() const#
template<typename NewScalar, size_t NewDims>
inline operator Vector<NewScalar, NewDims>() const#
template<typename Other>
inline Vector &operator+=(const Other &other)#
template<typename Other>
inline Vector &operator-=(const Other &other)#
template<typename Other>
inline Vector &operator*=(const Other &other)#
template<typename Other>
inline Vector &operator/=(const Other &other)#
template<typename Other>
inline Vector &operator%=(const Other &other)#
template<typename Other>
inline Vector &operator&=(const Other &other)#
template<typename Other>
inline Vector &operator|=(const Other &other)#
template<typename Other>
inline Vector &operator^=(const Other &other)#
template<typename Other>
inline Vector &operator<<=(const Other &other)#
template<typename Other>
inline Vector &operator>>=(const Other &other)#
template<typename T_, typename Char, typename Ctx>
inline void str(const fmt::formatter<T_, Char> &formatter, Ctx &ctx) const#
inline const StorageType &storage() const#
inline StorageType &storage()#
inline virtual GetType _get(size_t index) const override#
inline void _set(size_t index, const GetType &value)#

Public Static Functions

static inline auto zero() -> Vector#
static inline auto one() -> Vector#
static inline auto full(Scalar val) -> Vector#
static inline auto random(Scalar lower = 0, Scalar upper = 1)#
static inline auto random(const Vector &lower = Vector::zero(), const Vector &upper = Vector::one())#
static inline auto fromPolar(Scalar r, Scalar theta)#
static inline auto fromPolar(Scalar r, Scalar theta, Scalar phi)#

Public Static Attributes

static constexpr size_t dims = NumDims#
static constexpr size_t length = StorageType::length#