Created
March 20, 2019 01:48
-
-
Save tovrstra/e535608c72a24ca1d1f74877317ad359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OneDTransform: | |
def eval(self, r): | |
raise NotImplementedError | |
def inv(self, t): | |
raise NotImplementedError | |
def deriv1(self, r): | |
raise NotImplementedError | |
class Inv(OneDTransform): | |
def __init__(self, tf): | |
self.tf = tf | |
def eval(self, r): | |
return self.tf.inv(r) | |
def inv(self, t): | |
return self.tf.eval(t) | |
def deriv(self, r): | |
return 1.0/self.tf.deriv(self.tf.inv(r)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment