add comments to c++ impl
This commit is contained in:
parent
5a60f7842c
commit
14cd3d8044
1 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,9 @@ public:
|
||||||
return this->operator*(GF<N>(rhs));
|
return this->operator*(GF<N>(rhs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* throws std::invalid_argument when dividing by 0
|
||||||
|
*/
|
||||||
GF<N> operator/(const GF<N> &rhs) const {
|
GF<N> operator/(const GF<N> &rhs) const {
|
||||||
if (rhs._value == 0) {
|
if (rhs._value == 0) {
|
||||||
throw std::invalid_argument("division by 0 is illegal");
|
throw std::invalid_argument("division by 0 is illegal");
|
||||||
|
@ -117,7 +120,13 @@ public:
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* returns the characteristic of this GF
|
||||||
|
*/
|
||||||
uint characteristic() const { return N; }
|
uint characteristic() const { return N; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* returns the value of this GF
|
||||||
|
*/
|
||||||
uint value() const { return _value; }
|
uint value() const { return _value; }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue