|
StandardAlgebra.java
|
// FILE. . . . . d:/hak/hlt/src/hlt/math/matrix/sources/StandardAlgebra.java // EDIT BY . . . Hassan Ait-Kaci // ON MACHINE. . Hak-Laptop // STARTED ON. . Tue Dec 3 17:40:58 2019 package hlt.math.matrix;
| package hlt.math.matrix documentation listing |
This is a concrete subclass of NumberAlgebra redefining its
operations as those of standard arithmetic to be final methods:
|
public class StandardAlgebra extends NumberAlgebra {
| Return the zero of this algebra as 0.0. It should always verify sum(x,zero()) = sum(zero(),x) = x, for any double x. |
public final double zero () { return 0.0; }
| Return the one of this algebra as 1.0. It should always verify product(x,one()) = product(one(),x) = x, for any double |
public final double one () { return 1.0; }
| Return the sum of the arguments as +. |
public final double sum (double x, double y) { return x + y; }
| Return the product of the arguments as ×. |
public final double product (double x, double y) { return x * y; }
| Return the difference of the arguments as binary -. |
public final double difference (double x, double y) { return x - y; }
| Return the negation of the argument as unary -. |
public final double negation (double x) { return -x; }
| Define a String form for this StandardAlgebra. It is final so it cannot be redefined in any subclass. |
public final String toString () { return "Standard Algebra"; } }
This file was generated on Wed Dec 18 03:37:41 PST 2019 from file StandardAlgebra.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci