summaryrefslogtreecommitdiff
path: root/algebra.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-12-07 23:35:10 -0500
committerJeffrey Walton <noloader@gmail.com>2020-12-07 23:35:10 -0500
commitac6987f3aee8fedd52a08f8d6e9b7d5ad28559bb (patch)
treea0f63ebf397db67a1d8f7e41f2e4e89d03a57a4f /algebra.h
parent4d2b58c8fe92e7ce5007d2f15f046d33f37eedc2 (diff)
downloadcryptopp-git-ac6987f3aee8fedd52a08f8d6e9b7d5ad28559bb.tar.gz
Use \return and \throw consitently in the docs
Diffstat (limited to 'algebra.h')
-rw-r--r--algebra.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/algebra.h b/algebra.h
index f41b3402..fed8e85f 100644
--- a/algebra.h
+++ b/algebra.h
@@ -33,56 +33,56 @@ public:
/// \brief Compare two elements for equality
/// \param a first element
/// \param b second element
- /// \returns true if the elements are equal, false otherwise
+ /// \return true if the elements are equal, false otherwise
/// \details Equal() tests the elements for equality using <tt>a==b</tt>
virtual bool Equal(const Element &a, const Element &b) const =0;
/// \brief Provides the Identity element
- /// \returns the Identity element
+ /// \return the Identity element
virtual const Element& Identity() const =0;
/// \brief Adds elements in the group
/// \param a first element
/// \param b second element
- /// \returns the sum of <tt>a</tt> and <tt>b</tt>
+ /// \return the sum of <tt>a</tt> and <tt>b</tt>
virtual const Element& Add(const Element &a, const Element &b) const =0;
/// \brief Inverts the element in the group
/// \param a first element
- /// \returns the inverse of the element
+ /// \return the inverse of the element
virtual const Element& Inverse(const Element &a) const =0;
/// \brief Determine if inversion is fast
- /// \returns true if inversion is fast, false otherwise
+ /// \return true if inversion is fast, false otherwise
virtual bool InversionIsFast() const {return false;}
/// \brief Doubles an element in the group
/// \param a the element
- /// \returns the element doubled
+ /// \return the element doubled
virtual const Element& Double(const Element &a) const;
/// \brief Subtracts elements in the group
/// \param a first element
/// \param b second element
- /// \returns the difference of <tt>a</tt> and <tt>b</tt>. The element <tt>a</tt> must provide a Subtract member function.
+ /// \return the difference of <tt>a</tt> and <tt>b</tt>. The element <tt>a</tt> must provide a Subtract member function.
virtual const Element& Subtract(const Element &a, const Element &b) const;
/// \brief TODO
/// \param a first element
/// \param b second element
- /// \returns TODO
+ /// \return TODO
virtual Element& Accumulate(Element &a, const Element &b) const;
/// \brief Reduces an element in the congruence class
/// \param a element to reduce
/// \param b the congruence class
- /// \returns the reduced element
+ /// \return the reduced element
virtual Element& Reduce(Element &a, const Element &b) const;
/// \brief Performs a scalar multiplication
/// \param a multiplicand
/// \param e multiplier
- /// \returns the product
+ /// \return the product
virtual Element ScalarMultiply(const Element &a, const Integer &e) const;
/// \brief TODO
@@ -90,7 +90,7 @@ public:
/// \param e1 the first multiplier
/// \param y second multiplicand
/// \param e2 the second multiplier
- /// \returns TODO
+ /// \return TODO
virtual Element CascadeScalarMultiply(const Element &x, const Integer &e1, const Element &y, const Integer &e2) const;
/// \brief Multiplies a base to multiple exponents in a group
@@ -135,17 +135,17 @@ public:
/// \brief Determines whether an element is a unit in the group
/// \param a the element
- /// \returns true if the element is a unit after reduction, false otherwise.
+ /// \return true if the element is a unit after reduction, false otherwise.
virtual bool IsUnit(const Element &a) const =0;
/// \brief Retrieves the multiplicative identity
- /// \returns the multiplicative identity
+ /// \return the multiplicative identity
virtual const Element& MultiplicativeIdentity() const =0;
/// \brief Multiplies elements in the group
/// \param a the multiplicand
/// \param b the multiplier
- /// \returns the product of a and b
+ /// \return the product of a and b
virtual const Element& Multiply(const Element &a, const Element &b) const =0;
/// \brief Calculate the multiplicative inverse of an element in the group
@@ -154,19 +154,19 @@ public:
/// \brief Square an element in the group
/// \param a the element
- /// \returns the element squared
+ /// \return the element squared
virtual const Element& Square(const Element &a) const;
/// \brief Divides elements in the group
/// \param a the dividend
/// \param b the divisor
- /// \returns the quotient
+ /// \return the quotient
virtual const Element& Divide(const Element &a, const Element &b) const;
/// \brief Raises a base to an exponent in the group
/// \param a the base
/// \param e the exponent
- /// \returns the exponentiation
+ /// \return the exponentiation
virtual Element Exponentiate(const Element &a, const Integer &e) const;
/// \brief TODO
@@ -174,7 +174,7 @@ public:
/// \param e1 first exponent
/// \param y second element
/// \param e2 second exponent
- /// \returns TODO
+ /// \return TODO
virtual Element CascadeExponentiate(const Element &x, const Integer &e1, const Element &y, const Integer &e2) const;
/// \brief Exponentiates a base to multiple exponents in the Ring
@@ -190,7 +190,7 @@ public:
virtual void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const;
/// \brief Retrieves the multiplicative group
- /// \returns the multiplicative group
+ /// \return the multiplicative group
virtual const AbstractGroup<T>& MultiplicativeGroup() const
{return m_mg;}
@@ -288,13 +288,13 @@ public:
/// \brief Performs a modular reduction in the ring
/// \param a the element
/// \param b the modulus
- /// \returns the result of <tt>a%b</tt>.
+ /// \return the result of <tt>a%b</tt>.
virtual const Element& Mod(const Element &a, const Element &b) const =0;
/// \brief Calculates the greatest common denominator in the ring
/// \param a the first element
/// \param b the second element
- /// \returns the the greatest common denominator of a and b.
+ /// \return the the greatest common denominator of a and b.
virtual const Element& Gcd(const Element &a, const Element &b) const;
protected: