Scythe-1.0.3
Classes | Namespaces | Functions
algorithm.h File Reference

Generic algorithms for Scythe objects. More...

#include <cmath>
#include <functional>
#include <algorithm>
#include "scythestat/defs.h"
#include "scythestat/matrix.h"
#include "scythestat/matrix_random_access_iterator.h"
Include dependency graph for algorithm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  scythe::exponentiate< T >
 A Functor encapsulating exponentiation. More...
struct  scythe::ax_plus_b< T >
 A Functor encapsulating $ax+b$. More...

Namespaces

namespace  scythe
 

The Scythe library namespace.


Functions

template<typename T , matrix_order O, matrix_style S, class FUNCTOR >
void scythe::for_each_ij_set (Matrix< T, O, S > &M, FUNCTOR func)
 Iterate through a Matrix in order.
template<matrix_order ORDER1, matrix_order ORDER2, typename T , typename S , matrix_order SO, matrix_style SS, matrix_order DO, matrix_style DS>
void scythe::copy (const Matrix< T, SO, SS > &source, Matrix< S, DO, DS > &dest)
 Copy the contents of one Matrix into another.
template<matrix_order ORDER1, matrix_order ORDER2, typename T , matrix_order SO, matrix_style SS, matrix_order DO, matrix_style DS>
void scythe::copy_recycle (const Matrix< T, SO, SS > &source, Matrix< T, DO, DS > &dest)
 Copy the contents of one Matrix into another.
template<class T >
scythe::sgn (const T &x)
 Determine the sign of a number.

Detailed Description

Generic algorithms for Scythe objects.

This file provides implementations of a few algorithms that operate on Scythe objects and also contains the definitions of a handful of useful function objects. These functions and functors are primarily intended for use within the library. We add algorithms to this header as need arises and do not currently attempt to provide a comprehensive set of generic algorithms for working with Scythe matrices.