VPTissue Reference Manual
array3.h File Reference

Extending std with arithmetic for std::array<double, 3>. More...

#include "constants.h"
#include "signum.h"
#include <array>
#include <cmath>
#include <ostream>
Include dependency graph for array3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double std::Angle (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Angle between two vectors within range of [0, pi] radians.
 
std::array< double, 3 > std::CrossProduct (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Cross product with another vector.
 
double std::InnerProduct (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Inner product.
 
bool std::IsSameDirection (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Return true iff the two vectors point in the same direction.
 
double std::Norm (const std::array< double, 3 > &u)
 The array's norm.
 
double std::Norm2 (const std::array< double, 3 > &u)
 The array's norm squared.
 
std::array< double, 3 > std::Normalize (const std::array< double, 3 > &u)
 Normalized copy.
 
std::array< double, 3 > std::operator* (const std::array< double, 3 > &u, double m)
 Multiplication scalar * array.
 
std::array< double, 3 > std::operator* (double m, const std::array< double, 3 > &v)
 Multiplication array * scalar.
 
std::array< double, 3 > & std::operator*= (std::array< double, 3 > &u, double m)
 Unary multiplication by scalar.
 
std::array< double, 3 > std::operator+ (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Binary addition.
 
std::array< double, 3 > & std::operator+= (std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Unary addition.
 
std::array< double, 3 > std::operator- (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Binary subtraction.
 
std::array< double, 3 > & std::operator-= (std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Unary subtraction.
 
std::array< double, 3 > std::operator/ (const std::array< double, 3 > &u, double d)
 Division by a scalar.
 
std::array< double, 3 > & std::operator/= (std::array< double, 3 > &u, double m)
 Unary division by scalar.
 
std::ostream & std::operator<< (std::ostream &os, const std::array< double, 3 > &v)
 ostream insertion.
 
std::array< double, 3 > std::Orthogonalize (const std::array< double, 3 > &u)
 Perpendicular vector in 2D (in x,y i.e. 0,1 plane)
 
double std::SignedAngle (const std::array< double, 3 > &u, const std::array< double, 3 > &v)
 Signed angle between two vectors (within range of [-pi,pi] radians).
 

Detailed Description

Extending std with arithmetic for std::array<double, 3>.

Extending std to make functions available through namespace name (Koenig) lookup.

Definition in file array3.h.