Skip to content

Commit 6a02c09

Browse files
committed
Added TdCondTdGridDistribution
1 parent f974d5e commit 6a02c09

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import numpy as np
2+
import warnings
3+
from .abstract_conditional_distribution import AbstractConditionalDistribution
4+
5+
class TdCondTdGridDistribution(AbstractConditionalDistribution):
6+
7+
def multiply(self, other):
8+
assert np.all(self.grid == other.grid), "Multiply:IncompatibleGrid: Can only multiply for equal grids."
9+
warnings.warn("Multiply:UnnormalizedResult: Multiplication does not yield normalized result.")
10+
sdg = self
11+
sdg.fvals = sdg.fvals * other.fvals
12+
return sdg
13+
14+
def marginalize_out(self, first_or_second):
15+
assert first_or_second in [1, 2], "firstOrSecond must be 1 or 2."
16+
raise NotImplementedError("Method is not implemented yet.")
17+
18+
def fix_dim(self, first_or_second, point):
19+
assert first_or_second in [1, 2], "firstOrSecond must be 1 or 2."
20+
raise NotImplementedError("Method is not implemented yet.")
21+
22+
def plot(self):
23+
if self.dim > 6:
24+
raise ValueError("Can currently only plot for T1, T2, and T3 torus.")
25+
raise NotImplementedError("Method is not implemented yet.")
26+
27+
def plot_interpolated(self):
28+
if self.dim > 6:
29+
raise ValueError("Can currently only plot for T1, T2, and T3 torus.")
30+
raise NotImplementedError("Method is not implemented yet.")
31+
32+
def get_manifold_size(self):
33+
raise ValueError("Not defined for conditional distributions because interpretation may not be 100% obvious.")
34+
35+
@classmethod
36+
def from_function(cls, fun, no_of_grid_points, fun_does_cartesian_product, grid_type, dim):
37+
raise NotImplementedError("Method is not implemented yet.")

0 commit comments

Comments
 (0)