Package maths
Class TPoly
- java.lang.Object
-
- maths.TPoly
-
public class TPoly extends java.lang.ObjectRepresents a polynomial linked list.This class is used to store and manipulate polynomials in a linked list structure. Each node in the list contains a polynomial (TMono) and a reference to the next node.
-
-
Constructor Summary
Constructors Constructor Description TPoly()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TPolygetNext()Returns the next node in the list.TMonogetPoly()Returns the polynomial of the current node.intlength()Returns the length of the polynomial linked list.voidsetNext(TPoly next)Sets the next node in the list.voidsetPoly(TMono poly)Sets the polynomial of the current node.
-
-
-
Method Detail
-
getNext
public TPoly getNext()
Returns the next node in the list.- Returns:
- the next node
-
getPoly
public TMono getPoly()
Returns the polynomial of the current node.- Returns:
- the polynomial
-
setNext
public void setNext(TPoly next)
Sets the next node in the list.- Parameters:
next- the next node
-
setPoly
public void setPoly(TMono poly)
Sets the polynomial of the current node.- Parameters:
poly- the polynomial
-
length
public int length()
Returns the length of the polynomial linked list.- Returns:
- the length of the list
-
-