Vector

Dynamic-size dense vector.

Defined in Rodin/Math/Vector.h

template <
  class ScalarType>
class Vector;
Template parameters
ScalarType The element type (e.g., Real, Complex)

Dynamic-size dense vector type.

A column vector with dynamic size determined at runtime. The vector supports standard linear algebra operations with no additional storage. Dot products conjugate the right operand.

Public types

using Parent = Eigen::VectorX<ScalarType>
Eigen storage and expression base.

Constructors, destructors, conversion operators

Vector() defaulted
Constructs a vector with Eigen's default initialization.
Vector(const Vector& other) defaulted
Copies the vector and its owned coefficients.
Vector(Vector&& other) defaulted noexcept
Moves the vector and its owned coefficients.
Vector(const Parent& other)
Copies Eigen storage into a Rodin vector.
Vector(Parent&& other) noexcept
Takes ownership of an Eigen vector's storage.

Public functions

auto operator=(const Vector& other) -> Vector& defaulted
Copies the vector coefficients.
auto operator=(Vector&& other) -> Vector& defaulted noexcept
Moves the vector coefficients.
template<class Derived>
auto dot(const Eigen::MatrixBase<Derived>& other) const -> auto
Contracts with the conjugate of the right operand.

Function documentation

Vector(const Vector& other) defaulted

Copies the vector and its owned coefficients.

Parameters
other Vector to copy.

Vector(Vector&& other) defaulted noexcept

Moves the vector and its owned coefficients.

Parameters
other Vector to move.

Vector(const Parent& other)

Copies Eigen storage into a Rodin vector.

Parameters
other Eigen vector to copy.

Vector(Parent&& other) noexcept

Takes ownership of an Eigen vector's storage.

Parameters
other Eigen vector to move.

Vector& operator=(const Vector& other) defaulted

Copies the vector coefficients.

Parameters
other Vector to copy.
Returns This vector.

Vector& operator=(Vector&& other) defaulted noexcept

Moves the vector coefficients.

Parameters
other Vector to move.
Returns This vector.

template<class ScalarType> template<class Derived>
auto dot(const Eigen::MatrixBase<Derived>& other) const

Contracts with the conjugate of the right operand.

Template parameters
Derived Eigen type of the right operand.
Parameters
other Vector of the same size.
Returns The right-conjugating inner product.

Computes $\sum_i u_i\overline{v_i}$ , consistently with dot. Eigen expressions and views retain their Eigen types; use dot to contract those with this convention.