class Polynomial implements IReadDataBlock {

    public static Polynomial copyOf(double[] coefficients) {
        if (Arrays2.isNullOrEmpty(coefficients)) {
            throw new IllegalArgumentException("Coefficients cannot be null or empty");
        }
        int usedDegree = Doubles.getUsedDegree(coefficients);
        Polynomial result = Cache.find(coefficients, usedDegree);
        return result != null ? result : new Polynomial(Arrays.copyOf(coefficients, usedDegree + 1), usedDegree);
    }

    private  Polynomial(final double[] coefficients, final int degree);

}