aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mdpoly/representations.py37
1 files changed, 1 insertions, 36 deletions
diff --git a/mdpoly/representations.py b/mdpoly/representations.py
index 6aa3088..b7943ad 100644
--- a/mdpoly/representations.py
+++ b/mdpoly/representations.py
@@ -2,7 +2,7 @@ from .abc import Repr
from .types import Number, Shape, MatrixIndex, PolyIndex
from .state import State
-from typing import Protocol, Sequence, Iterable
+from typing import Protocol, Iterable
from abc import abstractmethod
import numpy as np
@@ -70,24 +70,6 @@ class SparseMatrixRepr(Repr):
matrix :math:`Q` and such that the quadratic form :math:`x^T Q x` gives the
polynomial.
"""
-
- def at(self, entry: MatrixIndex, term: PolyIndex) -> Number:
- """ Access polynomial entry """
- raise NotImplementedError
-
- def set(self, entry: MatrixIndex, term: PolyIndex, value: Number) -> None:
- """ Set value of polynomial entry """
- raise NotImplementedError
-
- def entries(self) -> Sequence[MatrixIndex]:
- """ Return indices to non-zero entries of the matrix """
- raise NotImplementedError
-
- def terms(self, entry: MatrixIndex) -> Sequence[PolyIndex]:
- """ Return indices to non-zero terms in the polynomial at the given
- matrix entry """
- raise NotImplementedError
-
def basis(self):
raise NotImplementedError
@@ -102,23 +84,6 @@ class DenseRepr(Repr):
def __init__(self, shape: Shape, dtype:type =float):
self.data = np.zeros(shape, dtype)
- def at(self, entry: MatrixIndex, term: PolyIndex) -> Number:
- """ Access polynomial entry """
- raise NotImplementedError
-
- def set(self, entry: MatrixIndex, term: PolyIndex, value: Number) -> None:
- """ Set value of polynomial entry """
- raise NotImplementedError
-
- def entries(self) -> Iterable[MatrixIndex]:
- """ Return indices to non-zero entries of the matrix """
- raise NotImplementedError
-
- def terms(self, entry: MatrixIndex) -> Iterable[PolyIndex]:
- """ Return indices to non-zero terms in the polynomial at the given
- matrix entry """
- raise NotImplementedError
-
class DenseMatrixRepr(Repr):
""" Dense matrix representation of a polynomials """