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
Divide the specified arguments.
- Parameters:
-
| a | - the dividend |
| b | - the divisor |
- Returns:
- The quotient of a and b
Get the additive identity element.
- Returns:
- The additive identity element
Subtract the specified arguments.
- Parameters:
-
| a | - the minuend |
| b | - the subtrahend |
- Returns:
- The difference of a and b
Multiply the specified arguments.
- Parameters:
-
| a | - the first multiplier |
| b | - the second multiplier |
- Returns:
- The product of a and b
Negate the specified argument.
- Parameters:
-
| a | - the argument to be negated |
- Returns:
- The negated value of a
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: