Jive reference manual
Namespaces | Classes | Functions
jem::numeric Namespace Reference

This namespace provides support for developing numerical algorithms and applications. More...

Namespaces

 ufunc
 

Classes

class  BandFilter
 
class  Cholesky
 
class  ConstantFunc
 
class  DataFunc
 
class  DiagonalFilter
 
class  EigenUtils
 
class  EqualFilter
 
class  FuncException
 
class  Function
 
class  GreaterFilter
 
class  LUSolver
 
class  MatmulChain
 Multiplies a series of matrices and vectors. More...
 
class  PassFilter
 
class  Quadrature
 
class  Quaternion
 
class  Reorder
 
class  SparseFilter
 
class  SparseFilterInterface
 
class  SparseFilters
 
class  SparseFilterWrapper
 
class  SparseILU
 
class  SparseLU
 
class  SparseMatrix
 Represents a sparse matrix. More...
 
class  SparseSelector
 
class  SparseSolver
 
class  SparseStructure
 Represents the structure of a sparse matrix. More...
 
class  SparseUtils
 
class  UserFunc
 

Functions

double det (const Array< double, 2 > &a)
 
template<int N>
double det (const Tuple< double, N, N > &a)
 
Array< double, 2 > inverse (const Array< double, 2 > &a)
 
template<int N>
Tuple< double, N, N > inverse (const Tuple< double, N, N > &a)
 
bool invert (const Array< double, 2 > &a)
 
bool invert (const Array< double, 2 > &a, double &d)
 
template<int N>
bool invert (Tuple< double, N, N > &a)
 
template<int N>
bool invert (Tuple< double, N, N > &a, double &d)
 
double det (const Tuple< double, 1, 1 > &a)
 
double det (const Tuple< double, 2, 2 > &a)
 
double det (const Tuple< double, 3, 3 > &a)
 
bool invert (Tuple< double, 1, 1 > &a, double &d)
 
bool invert (Tuple< double, 2, 2 > &a, double &d)
 
bool invert (Tuple< double, 3, 3 > &a, double &d)
 
template<class T >
void matmul (const Array< T, 1 > &r, const Array< T, 2 > &a, const Array< T, 1 > &b)
 Computes the product of a matrix and a column vector. More...
 
template<class T >
Array< T, 1 > matmul (const Array< T, 2 > &a, const Array< T, 1 > &b)
 Returns the product of a matrix and a column vector. More...
 
template<class T >
void matmul (const Array< T, 1 > &r, const Array< T, 1 > &a, const Array< T, 2 > &b)
 Computes the product of a row vector and a matrix. More...
 
template<class T >
Array< T, 1 > matmul (const Array< T, 1 > &a, const Array< T, 2 > &b)
 Returns the product of a row vector and a matrix. More...
 
template<class T >
void matmul (const Array< T, 2 > &r, const Array< T, 1 > &a, const Array< T, 1 > &b)
 Computes the product of a column vector and a row vector. More...
 
template<class T >
Array< T, 2 > matmul (const Array< T, 1 > &a, const Array< T, 1 > &b)
 Returns the product of a column vector and a row vector. More...
 
template<class T >
void matmul (const Array< T, 2 > &r, const Array< T, 2 > &a, const Array< T, 2 > &b)
 Computes the product of two matrices. More...
 
template<class T , int M, int N, int P>
void matmul (Tuple< T, M, P > &r, const Tuple< T, M, N > &a, const Tuple< T, N, P > &b)
 Computes the product of two matrices. More...
 
template<class T , int M, int P>
void matmul (Tuple< T, M, P > &r, const Array< T, 2 > &a, const Array< T, 2 > &b)
 Computes the product of two matrices. More...
 
template<class T , int M, int N>
void matmul (const Array< T, 2 > &r, const Tuple< T, M, N > &a, const Array< T, 2 > &b)
 Computes the product of two matrices. More...
 
template<class T , int N, int P>
void matmul (const Array< T, 2 > &r, const Array< T, 2 > &a, const Tuple< T, N, P > &b)
 Computes the product of two matrices. More...
 
template<class T >
Array< T, 2 > matmul (const Array< T, 2 > &a, const Array< T, 2 > &b)
 Returns the product of two matrices. More...
 
template<class T , int M, int N, int P>
Tuple< T, M, P > matmul (const Tuple< T, M, N > &a, const Tuple< T, N, P > &b)
 Returns the product of two matrices. More...
 
template<class T , int M, int N>
Array< T, 2 > matmul (const Tuple< T, M, N > &a, const Array< T, 2 > &b)
 Returns the product of two matrices. More...
 
template<class T , int N, int P>
Array< T, 2 > matmul (const Array< T, 2 > &a, const Tuple< T, N, P > &b)
 Returns the product of two matrices. More...
 
template<class T , class E1 , class E2 >
Tuple< T, 3 > crossProduct (const Tuple< T, 3, 1, E1 > &a, const Tuple< T, 3, 1, E2 > &b)
 
template<class T , class E1 , class E2 >
crossProduct (const Tuple< T, 2, 1, E1 > &a, const Tuple< T, 2, 1, E2 > &b)
 
template<class T , int N, class E1 , class E2 >
dotProduct (const Tuple< T, N, 1, E1 > &a, const Tuple< T, N, 1, E2 > &b)
 
template<class T , class E1 , class E2 >
dotProduct (const Array< T, 1, E1 > &a, const Array< T, 1, E2 > &b)
 
template<class T , int N, class E >
norm2 (const Tuple< T, N, 1, E > &v)
 
template<class T , class E >
norm2 (const Array< T, 1, E > &v)
 
template<class T , int N>
void axpy (const Array< T, N > &r, T t, const Array< T, N > &b)
 
template<class T , int N>
void axpy (const Array< T, N > &r, const Array< T, N > &a, T t, const Array< T, N > &b)
 
void parseUserFunc (String &name, String &args, String &expr, const String &input)
 
template<class T >
void matmul (const Array< T > &r, const SparseMatrix< T > &a, const Array< T > &b)
 Computes the product of a matrix and a column vector. More...
 
template<class T >
Array< T > matmul (const SparseMatrix< T > &a, const Array< T > &b)
 Returns the product of a matrix and a column vector. More...
 
template<class T >
void matmul (const Array< T > &r, const Array< T > &a, const SparseMatrix< T > &b)
 Computes the product of a row vector and a matrix. More...
 
template<class T >
Array< T > matmul (const Array< T > &a, const SparseMatrix< T > &b)
 Returns the product of a row vector and a matrix. More...
 
template<class T >
SparseMatrix< T > matmul (const SparseMatrix< T > &a, const SparseMatrix< T > &b)
 Returns the product of two sparse matrices. More...
 
template<class T , class F >
SparseMatrix< T > matmul (const SparseMatrix< T > &a, const SparseMatrix< T > &b, const SparseFilter< T, F > &filter)
 Returns the filtered product of two sparse matrices. More...
 
template<class R , class C >
SparseStructure select (const SparseStruct &src, const R &rows, const C &cols)
 
template<class T , class R , class C >
SparseMatrix< T > select (const SparseMatrix< T > &src, const R &rows, const C &cols)
 
template<class T >
Array< T > diag (const SparseMatrix< T > &a)
 Returns the diagonal values of a sparse matrix. More...
 
template<class T >
void sortRows (SparseMatrix< T > &a)
 performs a jem::sort on each row of a sparse matrix More...
 
template<class T , class F >
SparseMatrix< T > filter (const SparseMatrix< T > &a, const SparseFilter< T, F > &f)
 Returns a copy of a sparse matrix with certain elements filtered out. More...
 
template<class T , class A >
SparseMatrix< T > toMatrix (const util::SparseArray< T, 2, A > &a)
 creates a sparse matrix from a two-dimensional sparse array. More...
 
template<class T , class A >
util::SparseArray< T, 2, A > & toArray (util::SparseArray< T, 2, A > &out, const SparseMatrix< T > &in)
 creates a two-dimensional sparse array from a sparse matrix. More...
 
bool testCancelled (lint &flopCount)
 
void testCancelled (lint &flopCount, const char *where, const char *what)
 
short abs (short s)
 
int abs (int i)
 
lint abs (lint l)
 
float abs (float f)
 
double abs (double d)
 
float sqrt (float f)
 
double sqrt (double d)
 
template<class T >
modulus (const T &a, const T &b)
 
float modulus (float a, float b)
 
double modulus (double a, double b)
 
template<class T >
sign (const T &a, const T &b)
 
template<class T >
void addToSum (T &sum, T &err, const T &val)
 
template<class T >
void closeSum (T &sum, const T &err)
 
template<class T >
void closeSum (T &sum, const T &err, const T &val)
 
template<class T , class Op >
SparseMatrix< T > unite (const SparseMatrix< T > &a, const SparseMatrix< T > &b, const Op &op)
 Brief explanation of this unite function. More...
 
template<class T , class Op , class F >
SparseMatrix< T > unite (const SparseMatrix< T > &a, const SparseMatrix< T > &b, const Op &op, const SparseFilter< T, F > &filter)
 Brief explanation of this unite function. More...
 
template<class T , class Op >
SparseMatrix< T > intersect (const SparseMatrix< T > &a, const SparseMatrix< T > &b, const Op &op)
 Brief explanation of this unite function. More...
 
template<class T , class Op , class F >
SparseMatrix< T > intersect (const SparseMatrix< T > &a, const SparseMatrix< T > &b, const Op &op, const SparseFilter< T, F > &filter)
 Brief explanation of this unite function. More...
 

Detailed Description

The namespace jem::numeric provides support for developing numerical algorithms and applications.

All classes and functions in this namespace can be found in the package jem.numeric.

Function Documentation

double jem::numeric::det ( const Array< double, 2 > &  a)
template<int N>
double jem::numeric::det ( const Tuple< double, N, N > &  a)
Array<double,2> jem::numeric::inverse ( const Array< double, 2 > &  a)
template<int N>
Tuple< double, N, N > jem::numeric::inverse ( const Tuple< double, N, N > &  a)
bool jem::numeric::invert ( const Array< double, 2 > &  a)
bool jem::numeric::invert ( const Array< double, 2 > &  a,
double &  d 
)
template<int N>
bool jem::numeric::invert ( Tuple< double, N, N > &  a)
template<int N>
bool jem::numeric::invert ( Tuple< double, N, N > &  a,
double &  d 
)
double jem::numeric::det ( const Tuple< double, 1, 1 > &  a)
double jem::numeric::det ( const Tuple< double, 2, 2 > &  a)
double jem::numeric::det ( const Tuple< double, 3, 3 > &  a)
bool jem::numeric::invert ( Tuple< double, 1, 1 > &  a,
double &  d 
)
bool jem::numeric::invert ( Tuple< double, 2, 2 > &  a,
double &  d 
)
bool jem::numeric::invert ( Tuple< double, 3, 3 > &  a,
double &  d 
)
template<class T , class E1 , class E2 >
Tuple<T,3> jem::numeric::crossProduct ( const Tuple< T, 3, 1, E1 > &  a,
const Tuple< T, 3, 1, E2 > &  b 
)
template<class T , class E1 , class E2 >
T jem::numeric::crossProduct ( const Tuple< T, 2, 1, E1 > &  a,
const Tuple< T, 2, 1, E2 > &  b 
)
template<class T , int N, class E1 , class E2 >
T jem::numeric::dotProduct ( const Tuple< T, N, 1, E1 > &  a,
const Tuple< T, N, 1, E2 > &  b 
)
template<class T , class E1 , class E2 >
T jem::numeric::dotProduct ( const Array< T, 1, E1 > &  a,
const Array< T, 1, E2 > &  b 
)
template<class T , int N, class E >
T jem::numeric::norm2 ( const Tuple< T, N, 1, E > &  v)
template<class T , class E >
T jem::numeric::norm2 ( const Array< T, 1, E > &  v)
template<class T , int N>
void jem::numeric::axpy ( const Array< T, N > &  r,
t,
const Array< T, N > &  b 
)
template<class T , int N>
void jem::numeric::axpy ( const Array< T, N > &  r,
const Array< T, N > &  a,
t,
const Array< T, N > &  b 
)
void jem::numeric::parseUserFunc ( String name,
String args,
String expr,
const String input 
)
template<class T , class Op >
SparseMatrix<T> jem::numeric::unite ( const SparseMatrix< T > &  a,
const SparseMatrix< T > &  b,
const Op &  op 
)

More elaborate explanation of this unite function

Parameters
a- a sparse matrix
b- a sparse matrix
op- the binary operation to be performed between elements of the two sparse matrices
Returns
SparseMatrix object
template<class T , class Op , class F >
SparseMatrix<T> jem::numeric::unite ( const SparseMatrix< T > &  a,
const SparseMatrix< T > &  b,
const Op &  op,
const SparseFilter< T, F > &  filter 
)

More elaborate explanation of this unite function

Parameters
a- a sparse matrix
b- a sparse matrix
op- the binary operation to be performed between elements of the two sparse matrices
filter- the filter that has to be applied on the result of the binary operation of the two elements
Returns
SparseMatrix object
template<class T , class Op >
SparseMatrix<T> jem::numeric::intersect ( const SparseMatrix< T > &  a,
const SparseMatrix< T > &  b,
const Op &  op 
)

More elaborate explanation of this unite function

Parameters
a- a sparse matrix
b- a sparse matrix
op- the binary operation to be performed between elements of the two sparse matrices
Returns
SparseMatrix object
template<class T , class Op , class F >
SparseMatrix<T> jem::numeric::intersect ( const SparseMatrix< T > &  a,
const SparseMatrix< T > &  b,
const Op &  op,
const SparseFilter< T, F > &  filter 
)

More elaborate explanation of this unite function

Parameters
a- a sparse matrix
b- a sparse matrix
op- the binary operation to be performed between elements of the two sparse matrices
filter- the filter that has to be applied on the result of the binary operation of the two elements
Returns
SparseMatrix object
template<class R , class C >
SparseStructure jem::numeric::select ( const SparseStruct &  src,
const R &  rows,
const C &  cols 
)
template<class T , class R , class C >
SparseMatrix<T> jem::numeric::select ( const SparseMatrix< T > &  src,
const R &  rows,
const C &  cols 
)
bool jem::numeric::testCancelled ( lint &  flopCount)
void jem::numeric::testCancelled ( lint &  flopCount,
const char *  where,
const char *  what 
)
short jem::numeric::abs ( short  s)
int jem::numeric::abs ( int  i)
lint jem::numeric::abs ( lint  l)
float jem::numeric::abs ( float  f)
double jem::numeric::abs ( double  d)
float jem::numeric::sqrt ( float  f)
double jem::numeric::sqrt ( double  d)
template<class T >
T jem::numeric::modulus ( const T &  a,
const T &  b 
)
float jem::numeric::modulus ( float  a,
float  b 
)
double jem::numeric::modulus ( double  a,
double  b 
)
template<class T >
T jem::numeric::sign ( const T &  a,
const T &  b 
)
template<class T >
void jem::numeric::addToSum ( T &  sum,
T &  err,
const T &  val 
)
template<class T >
void jem::numeric::closeSum ( T &  sum,
const T &  err 
)
template<class T >
void jem::numeric::closeSum ( T &  sum,
const T &  err,
const T &  val 
)