ESYS13
Revision_
|
Describes binary operations performed on DataVector. More...
#include "DataAbstract.h"
#include "DataException.h"
#include "LocalOps.h"
#include "LapackInverseHelper.h"
Go to the source code of this file.
Namespaces | |
namespace | escript |
namespace | escript::DataMaths |
Contains maths operations performed on data vectors. | |
Functions | |
template<class UnaryFunction > | |
void | escript::DataMaths::unaryOp (DataTypes::ValueType &data, const DataTypes::ShapeType &shape, DataTypes::ValueType::size_type offset, UnaryFunction operation) |
Perform the unary operation on the data point specified by the given offset. Applies the specified operation to each value in the data point. Operation must be a pointer to a function. | |
template<class BinaryFunction > | |
void | escript::DataMaths::binaryOp (DataTypes::ValueType &left, const DataTypes::ShapeType &leftShape, DataTypes::ValueType::size_type leftOffset, const DataTypes::ValueType &right, const DataTypes::ShapeType &rightShape, DataTypes::ValueType::size_type rightOffset, BinaryFunction operation) |
Perform the binary operation on the data points specified by the given offsets in the "left" and "right" vectors. Applies the specified operation to corresponding values in both data points. Operation must be a pointer to a function. | |
template<class BinaryFunction > | |
void | escript::DataMaths::binaryOp (DataTypes::ValueType &left, const DataTypes::ShapeType &shape, DataTypes::ValueType::size_type offset, double right, BinaryFunction operation) |
Perform the binary operation on the data point specified by the given offset in the vector using the scalar value "right". Applies the specified operation to values in the data point. Operation must be a pointer to a function. | |
template<class BinaryFunction > | |
double | escript::DataMaths::reductionOp (const DataTypes::ValueType &left, const DataTypes::ShapeType &shape, DataTypes::ValueType::size_type offset, BinaryFunction operation, double initial_value) |
Perform the given data point reduction operation on the data point specified by the given offset into the view. Reduces all elements of the data point using the given operation, returning the result as a scalar. Operation must be a pointer to a function. | |
void | escript::DataMaths::matMult (const DataTypes::ValueType &left, const DataTypes::ShapeType &leftShape, DataTypes::ValueType::size_type leftOffset, const DataTypes::ValueType &right, const DataTypes::ShapeType &rightShape, DataTypes::ValueType::size_type rightOffset, DataTypes::ValueType &result, const DataTypes::ShapeType &resultShape) |
Perform a matrix multiply of the given views. | |
DataTypes::ShapeType | escript::DataMaths::determineResultShape (const DataTypes::ShapeType &left, const DataTypes::ShapeType &right) |
Determine the shape of the result array for a matrix multiplication of the given views. | |
void | escript::DataMaths::symmetric (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset) |
computes a symmetric matrix from your square matrix A: (A + transpose(A)) / 2 | |
void | escript::DataMaths::nonsymmetric (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset) |
computes a nonsymmetric matrix from your square matrix A: (A - transpose(A)) / 2 | |
void | escript::DataMaths::trace (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis_offset) |
computes the trace of a matrix | |
void | escript::DataMaths::transpose (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis_offset) |
Transpose each data point of this Data object around the given axis. | |
void | escript::DataMaths::swapaxes (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis0, int axis1) |
swaps the components axis0 and axis1. | |
void | escript::DataMaths::eigenvalues (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset) |
solves a local eigenvalue problem | |
void | escript::DataMaths::eigenvalues_and_eigenvectors (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, DataTypes::ValueType &V, const DataTypes::ShapeType &VShape, DataTypes::ValueType::size_type VOffset, const double tol=1.e-13) |
solves a local eigenvalue problem | |
bool | escript::DataMaths::checkOffset (const DataTypes::ValueType &data, const DataTypes::ShapeType &shape, DataTypes::ValueType::size_type offset) |
int | escript::DataMaths::matrix_inverse (const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &out, const DataTypes::ShapeType &outShape, DataTypes::ValueType::size_type outOffset, int count, LapackInverseHelper &helper) |
computes the inverses of square (up to 3x3) matricies | |
void | escript::DataMaths::matrixInverseError (int err) |
throws an appropriate exception based on failure of matrix_inverse. | |
bool | escript::DataMaths::vectorHasNaN (const DataTypes::ValueType &in, DataTypes::ValueType::size_type inOffset, size_t count) |
returns true if the vector contains NaN |
Describes binary operations performed on DataVector.
For operations on DataAbstract see BinaryOp.h. For operations on double* see LocalOps.h.