diff --git a/Makefile.am b/Makefile.am
index b8a4166a..4e20a0fa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,8 +83,6 @@ UTIL_FILES = \
maths.ipp \
maths/matrix.cpp \
maths/matrix.hpp \
- maths/polynomial.ipp\
- maths/polynomial.hpp\
maths/vector.cpp \
maths/vector.hpp \
matrix.cpp \
diff --git a/maths/polynomial.hpp b/maths/polynomial.hpp
deleted file mode 100644
index b85bc094..00000000
--- a/maths/polynomial.hpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of libgim.
- *
- * libgim is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- *
- * libgim is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with libgim. If not, see .
- *
- * Copyright 2010 Danny Robson
- */
-
-#ifndef __UTIL_MATHS_POLYNOMIAL_HPP
-#define __UTIL_MATHS_POLYNOMIAL_HPP
-
-#include
-#include
-
-namespace maths {
- template
- struct polynomial {
- std::array coefficients;
-
- T eval (T x) const;
- };
-}
-
-#include "polynomial.ipp"
-
-#endif
diff --git a/maths/polynomial.ipp b/maths/polynomial.ipp
deleted file mode 100644
index 37ccb23a..00000000
--- a/maths/polynomial.ipp
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * This file is part of libgim.
- *
- * libgim is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- *
- * libgim is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with libgim. If not, see .
- *
- * Copyright 2010 Danny Robson
- */
-
-#ifdef __UTIL_MATHS_POLYNOMIAL_IPP
-#error Double includion of util/maths/polynomial.hpp
-#endif
-
-#define __UTIL_MATHS_POLYNOMIAL_IPP
-
-
-//-----------------------------------------------------------------------------
-template
-T
-maths::polynomial::eval (T x) const {
- T val = 0;
- T exp = 1;
-
- for (const T &i: coefficients) {
- val += i * exp;
- exp *= x;
- }
-
- return val;
-}
-
-
-//-----------------------------------------------------------------------------
-#include "../json.hpp"
-#include "../types.hpp"
-
-namespace json {
- template
- struct io> {
- typedef maths::polynomial type;
-
- static type
- deserialise (const json::node &node) {
- const json::array &source = node.as_array ();
- type dest;
-
- if (source.size () != N)
- throw std::runtime_error ("Polynomial size mismatch in json serialisation");
-
- for (size_t i = 0; i < N; ++i)
- dest.coefficients[i] = source[i].as_number ();
- return dest;
- }
-
- static std::unique_ptr
- serialise (type src) {
- auto dst = make_unique ();
-
- for (const auto &i: src.coefficients)
- dst->insert (i);
-
- return std::unique_ptr (dst.release ());
- }
- };
-}
-
-
-namespace json {
- //template
- //std::unique_ptr
- //io>::serialise (const maths::polynomial&);
-
- //template
- //maths::polynomial
- //io>::deserialise(const json::node &node);
- /*{
- typedef maths::polynomial type;
-
- json::array &source = node.as_array ();
- type dest;
-
- if (source.size () != N)
- throw std::runtime_error ("Polynomial size mismatch in json serialisation");
-
- for (size_t i = 0; i < N; ++i)
- dest.coefficients[i] = source[i].as_number ();
- return dest;
- }*/
-}
-
-
-/*namespace json {
- template
- struct io > {
- static std::unique_ptr serialise (const maths::polynomial&);
- static maths::polynomial deserialise (const json::node&);
- };
-
- template
- std::unique_ptr
- node::serialise> (const maths::polynomial &poly) {
- std::unique_ptr val (new array);
-
- for (const double &i: poly.coefficients)
- val->insert (node::serialise (i));
-
- std::unique_ptr ret (val.release ());
- return ret;
- }
-}*/
-
-
-/*from_json> (const json::node &node) {
- maths::polynomial val;
-
- const json::array &source = node.as_array ();
- for (size_t i = 0; i < N; ++i)
- val.coefficients[i] = source[i].as_number ();
-
- return val;
-}*/