Class DensePolyClient

java.lang.Object
it.unimi.di.prog2.h09.DensePolyClient

public class DensePolyClient extends Object
A class to test some methods of DensePoly.
  • Constructor Details

    • DensePolyClient

      private DensePolyClient()
      .
  • Method Details

    • asString

      private static String asString(DensePoly poly)
      Returns a string representation of the given polynomial.
      Parameters:
      poly - the polynomial to represent as a string, must not be null.
      Returns:
      a string representation of the polynomial.
    • main

      public static void main(String[] args)
      Tests some methods of DensePoly.

      Starting from term \( t_0 = 0 \) reads a list of \( t_i \) of terms from the standard input, given as a (coefficient, degree) pairs, and computes the polynomial \( t_0 + t_1 + t_2 \cdots \), emitting the resulting polynomial in the standard output.

      Parameters:
      args - not used.