Class SparsePolyClient
java.lang.Object
it.unimi.di.prog2.h09.SparsePolyClient
A class to test some methods of
SparsePoly
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
asString
(SparsePoly poly) Returns a string representation of the given polynomial.static void
Tests some methods ofSparsePoly
.
-
Constructor Details
-
SparsePolyClient
private SparsePolyClient().
-
-
Method Details
-
asString
Returns a string representation of the given polynomial.- Parameters:
poly
- the polynomial to represent as a string, must not benull
.- Returns:
- a string representation of the polynomial.
-
main
Tests some methods ofSparsePoly
.Starting from term \( t_0 = x + 1 \) reads a list of \( t_i \) of terms from the standard input, given as a (coefficient, degree) pairs, and computes the polynomials \( p_{i+1} = p_i \codt t_i + t_i \) emitting the last computed polynomial in the standard output.
- Parameters:
args
- not used.
-