Instigate Open Source Documentation

instigate::algebra::interface< T > Struct Template Reference

Generic interface of type specialization. More...

#include <interface.hpp>

List of all members.

Static Public Member Functions

static T plus (const T &a, const T &b)
 Add the specified arguments.
static T minus (const T &a, const T &b)
 Subtract the specified arguments.
static T multiply (const T &a, const T &b)
 Multiply the specified arguments.
static T divide (const T &a, const T &b)
 Divide the specified arguments.
static T get_zero ()
 Get the additive identity element.
static T get_one ()
 Get multiplicative identity element.
static T opposite (const T &a)
 Negate the specified argument.
static T inverse (const T &a)
 Inverse the specified argument.

Static Public Attributes

static const bool is_additive_assocativity = false
 Check additive associativity of type T.
static const bool is_multiplicative_assocativity = false
 Check multiplicative associativity of type T.
static const bool is_comutativity_addition = false
 Check commutativity of addition.
static const bool is_comutativity_multiplication = false
 Check commutativity of multiplication.
static const bool is_distributivity = false
 Check distributivity.

Detailed Description

template<typename T>
struct instigate::algebra::interface< T >

Generic interface of type specialization.

This is a "non-intrusive" interface of Instigate Algebra base concepts. The methods of the interface are used in the Instigate STL algorithms. Users should specialize this interface for custom type, if it is a model of one of this concepts.


Member Function Documentation

template<typename T >
static T instigate::algebra::interface< T >::divide ( const T &  a,
const T &  b 
) [inline, static]

Divide the specified arguments.

Parameters:
a - the dividend
b - the divisor
Returns:
The quotient of a and b
template<typename T >
static T instigate::algebra::interface< T >::get_one (  )  [inline, static]
template<typename T >
static T instigate::algebra::interface< T >::get_zero (  )  [inline, static]

Get the additive identity element.

Returns:
The additive identity element
template<typename T >
static T instigate::algebra::interface< T >::inverse ( const T &  a  )  [inline, static]

Inverse the specified argument.

Parameters:
a - the argument to be inversed
Returns:
The inverse value of a

References instigate::algebra::interface< T >::get_one().

template<typename T >
static T instigate::algebra::interface< T >::minus ( const T &  a,
const T &  b 
) [inline, static]

Subtract the specified arguments.

Parameters:
a - the minuend
b - the subtrahend
Returns:
The difference of a and b
template<typename T >
static T instigate::algebra::interface< T >::multiply ( const T &  a,
const T &  b 
) [inline, static]

Multiply the specified arguments.

Parameters:
a - the first multiplier
b - the second multiplier
Returns:
The product of a and b
template<typename T >
static T instigate::algebra::interface< T >::opposite ( const T &  a  )  [inline, static]

Negate the specified argument.

Parameters:
a - the argument to be negated
Returns:
The negated value of a
template<typename T >
static T instigate::algebra::interface< T >::plus ( const T &  a,
const T &  b 
) [inline, static]

Add the specified arguments.

Parameters:
a - the first addend
b - the second addend
Returns:
The sum of a and b

The documentation for this struct was generated from the following file:


© Instigate CJSC, Open Source