Add is_degenerate to geometric transforms

This commit is contained in:
Johannes Schönberger
2013-05-02 18:30:07 +02:00
parent aa309fd926
commit 5b78b2a69e
+20
View File
@@ -41,6 +41,26 @@ class GeometricTransform(object):
"""
raise NotImplementedError()
@classmethod
def is_degenerate(cls, data):
"""Check whether set of points is degenerate.
Parameters
----------
data : (N, 2) array
N points with `(x, y)` coordinates, respectively.
Returns
-------
flag : bool
Flag indicating if data is degenerate.
"""
# by default never degenerate since system equations can be under-,
# well- and over-determined.
return False
def __add__(self, other):
"""Combine this transformation with another.