Package maths

Class TPoly


  • public class TPoly
    extends java.lang.Object
    Represents 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
      TPoly getNext()
      Returns the next node in the list.
      TMono getPoly()
      Returns the polynomial of the current node.
      int length()
      Returns the length of the polynomial linked list.
      void setNext​(TPoly next)
      Sets the next node in the list.
      void setPoly​(TMono poly)
      Sets the polynomial of the current node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TPoly

        public TPoly()
        Default constructor.
    • 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