MyraMath
Classes
swizzle.h File Reference

Wonkish routines for rearranging a complex Range into two real Range's, and back again. More...

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Number.h>
#include <utility>
Include dependency graph for swizzle.h:

Go to the source code of this file.

Classes

class  myra::MatrixRange< Number >
 Represents a mutable MatrixRange. More...
 
class  myra::VectorRange< Number >
 Represents a mutable VectorRange. More...
 

Functions

std::pair< MatrixRange< NumberS >, MatrixRange< NumberS > > myra::swizzle (const MatrixRange< NumberC > &Z)
 Splits an IxJ complex MatrixRange into two IxJ real MatrixRange's (for real/imag parts, resp)
 
std::pair< MatrixRange< NumberD >, MatrixRange< NumberD > > myra::swizzle (const MatrixRange< NumberZ > &Z)
 Splits an IxJ complex MatrixRange into two IxJ real MatrixRange's (for real/imag parts, resp)
 
void myra::unswizzle (const MatrixRange< NumberC > &Z)
 Swizzle mutates its argument. This undoes a swizzle()
 
void myra::unswizzle (const MatrixRange< NumberZ > &Z)
 Swizzle mutates its argument. This undoes a swizzle()
 
std::pair< VectorRange< NumberS >, VectorRange< NumberS > > myra::swizzle (const VectorRange< NumberC > &z)
 Splits complex VectorRange into two real VectorRange's (for real/imag parts, resp)
 
std::pair< VectorRange< NumberD >, VectorRange< NumberD > > myra::swizzle (const VectorRange< NumberZ > &z)
 Splits complex VectorRange into two real VectorRange's (for real/imag parts, resp)
 
void myra::unswizzle (const VectorRange< NumberC > &z)
 Swizzle mutates its argument. This undoes a swizzle()
 
void myra::unswizzle (const VectorRange< NumberZ > &z)
 Swizzle mutates its argument. This undoes a swizzle()
 

Detailed Description

Wonkish routines for rearranging a complex Range into two real Range's, and back again.

Used to apply real Matrix's or Action's (like real Cholesky/LU solves) to complex operands. Note swizzle() rearranges Z, so you should unswizzle() it when you're done: