Class ConditionalKDE.BatchResult
java.lang.Object
edu.cmu.tetrad.util.ConditionalKDE.BatchResult
- Enclosing class:
ConditionalKDE
Result of batchBivariateAllPairs(): provides indexed lookup so callers
don't have to track which result corresponds to which pair.
-
Method Summary
Modifier and TypeMethodDescriptionget(int i, int j) Retrieves aConditionalResult2Dobject associated with the specified pair of indices.intnVars()Returns the total number of variables involved in the batch operation.List<int[]> pairs()Returns the list of variable index pairs involved in the batch operation.results()Returns the array ofConditionalResult2Dobjects that represent the results of the 2D conditional density estimations for all variable pairs in the batch operation.
-
Method Details
-
get
Retrieves aConditionalResult2Dobject associated with the specified pair of indices. If the input indices are not ordered (i.e., i > j), the method swaps the values to ensure proper lookup. Throws an exception if the pair is not found.- Parameters:
i- The first index of the pair.j- The second index of the pair.- Returns:
- The
ConditionalResult2Dobject corresponding to the specified pair of indices. - Throws:
IllegalArgumentException- if the pair (i, j) cannot be found in the list of pairs.
-
pairs
Returns the list of variable index pairs involved in the batch operation.- Returns:
- A list of integer arrays, where each array represents a pair of variable indices.
-
results
Returns the array ofConditionalResult2Dobjects that represent the results of the 2D conditional density estimations for all variable pairs in the batch operation.- Returns:
- An array of
ConditionalResult2Dobjects corresponding to the computations performed for each pair of variables.
-
nVars
public int nVars()Returns the total number of variables involved in the batch operation.- Returns:
- The number of variables.
-