Package io.bhagat.math.linearalgebra
Class LinearEquation.Term
- java.lang.Object
-
- io.bhagat.math.linearalgebra.LinearEquation.Term
-
- Enclosing class:
- LinearEquation
public class LinearEquation.Term extends java.lang.ObjectA class for each term in the equation- Author:
- Bhagat
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTerm(double weight, java.lang.String variable)constructs a term
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetVariable()doublegetWeight()voidsetVariable(java.lang.String variable)voidsetWeight(double weight)java.lang.StringtoString()A way of visualizing each term
-
-
-
Method Detail
-
getWeight
public double getWeight()
- Returns:
- the weight
-
setWeight
public void setWeight(double weight)
- Parameters:
weight- the weight to set
-
getVariable
public java.lang.String getVariable()
- Returns:
- the variable
-
setVariable
public void setVariable(java.lang.String variable)
- Parameters:
variable- the variable to set
-
toString
public java.lang.String toString()
A way of visualizing each term- Overrides:
toStringin classjava.lang.Object
-
-