1 #ifndef CLASSIC_Vector_HH
2 #define CLASSIC_Vector_HH
153 std::transform(this->
begin(), this->
end(), result.
begin(), std::negate<T>());
161 std::bind(std::multiplies<T>(), std::placeholders::_1, val));
169 std::bind(std::divides<T>(), std::placeholders::_1, val));
215 return std::inner_product(V1.
begin(), V1.
end(), V2.
begin(),
T(0));
238 std::bind(std::multiplies<T>(), std::placeholders::_1, x));
250 throw SizeError(
"scaled_norm()",
"Inconsistent dimensions.");
254 for(
int i = 0; i < V.
size(); ++i) {
255 double dv = D[i] * V[i];
261 #endif // CLASSIC_Vector_HH
Tps< T > sqrt(const Tps< T > &x)
Square root.
T scaled_norm(const Array1D< T > D, const Vector< T > &V)
Euclidean norm of diagonal matrix D times vector V.
Matrix< T > operator-(const Matrix< T > &, const Matrix< T > &)
Matrix subtraction.
int size() const
Get array size.
Vector< T > & operator=(const Vector< T > &)
Matrix< T > operator*(const Matrix< T > &, const Matrix< T > &)
Matrix multiply.
clearpage the user may choose between constant or variable radius This model includes fringe fields begin
Array1D< T > & operator=(const Array1D< T > &)
Vector< T > & operator*=(const T &)
Multiply by scalar and assign.
Vector()
Default constructor.
T euclidean_norm(const Vector< T > &)
Euclidean norm.
T::PETE_Expr_t::PETE_Return_t sum(const PETE_Expr< T > &expr)
Vector< T > operator-() const
Change sign of vector.
iterator begin()
Get beginning of data.
Matrix< T > operator+(const Matrix< T > &, const Matrix< T > &)
Matrix addition.
iterator end()
Get end of data.
Vector< T > & operator+=(const Vector< T > &)
Add vector and assign.
Vector< T > & operator-=(const Vector< T > &)
Subtract vector and assign.
Vector< T > & operator/=(const T &)
Divide by scalar and assign.
Matrix< T > operator/(const Matrix< T > &, const T &)
Matrix divided by scalar.