Class PerformanceLoggingRing<E>
java.lang.Object
dk.jonaslindstrom.ruffini.common.helpers.PerformanceLoggingRing<E>
- All Implemented Interfaces:
AdditiveGroup<E>
,CommutativeMonoid<E>
,Monoid<E>
,Ring<E>
,Semigroup<E>
,SemiRing<E>
,Set<E>
- Direct Known Subclasses:
PerformanceLoggingField
Wrapper for the ring class which logs the number of operations performed in this ring.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the result of a+b.boolean
Returnstrue
if and only if a = b as elements of this set.int
int
int
int
identity()
Return the identity element of this monoid.Return the result of the product ab in this group.Return -a.void
reset()
toString()
Returns a human-readable string representation of an element in this set.zero()
Return the zero element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, scale, scale, subtract, sum
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
isIdentity, power
-
Field Details
-
multiplications
protected int multiplications -
additions
protected int additions -
negations
protected int negations -
equalities
protected int equalities
-
-
Constructor Details
-
PerformanceLoggingRing
-
-
Method Details
-
negate
Description copied from interface:AdditiveGroup
Return -a.- Specified by:
negate
in interfaceAdditiveGroup<E>
-
add
Description copied from interface:CommutativeMonoid
Return the result of a+b.- Specified by:
add
in interfaceCommutativeMonoid<E>
-
zero
Description copied from interface:CommutativeMonoid
Return the zero element.- Specified by:
zero
in interfaceCommutativeMonoid<E>
-
identity
Description copied from interface:Monoid
Return the identity element of this monoid. -
multiply
Description copied from interface:Semigroup
Return the result of the product ab in this group. -
toString
Description copied from interface:Set
Returns a human-readable string representation of an element in this set. -
equals
Description copied from interface:Set
Returnstrue
if and only if a = b as elements of this set. -
getMultiplications
public int getMultiplications() -
getAdditions
public int getAdditions() -
getNegations
public int getNegations() -
getEqualities
public int getEqualities() -
toString
-
reset
public void reset()
-