Instigate Open Source Documentation

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

Specialization of the Algebra Interface for type int. More...

#include <interface.hpp>

List of all members.

Static Public Member Functions

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

Static Public Attributes

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

Detailed Description

template<>
struct instigate::algebra::interface< int >

Specialization of the Algebra Interface for type int.


Member Function Documentation

static int instigate::algebra::interface< int >::get_one (  )  [inline, static]

Get multiplicative identity element.

Returns:
The multiplicative identity element
static int instigate::algebra::interface< int >::get_zero (  )  [inline, static]

Get the additive identity element.

Returns:
The additive identity element
static int instigate::algebra::interface< int >::minus ( const int &  a,
const int &  b 
) [inline, static]

Subtract the specified arguments.

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

Multiply the specified arguments.

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

Negate the specified argument.

Parameters:
a - the argument to be negated
Returns:
The negated value of a
static int instigate::algebra::interface< int >::plus ( const int &  a,
const int &  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