Class CartesianProduct<T>
- java.lang.Object
-
- org.biojava.nbio.structure.quaternary.CartesianProduct<T>
-
public class CartesianProduct<T> extends Object
A cartesian product between two lists A and B is the set of all ordered pairs of the elements of both sets. See http://en.wikipedia.org/wiki/Cartesian_product for more details. Since the order of the elements matters; Lists are used instead of Sets. Example: A = {1, 2, 3} B = {4, 5} The ordered pairs are {1, 4}, {1, 5}, {2, 4}, .., {3, 5}- Author:
- Peter Rose
-
-
Constructor Summary
Constructors Constructor Description CartesianProduct(List<T> list1, List<T> list2)
Class constructor specifying the two lists of a cartesian product.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<OrderedPair<T>>
getOrderedPairs()
Generates the list of ordered pair between two sets.
-
-
-
Constructor Detail
-
CartesianProduct
public CartesianProduct(List<T> list1, List<T> list2)
Class constructor specifying the two lists of a cartesian product.
-
-
Method Detail
-
getOrderedPairs
public List<OrderedPair<T>> getOrderedPairs()
Generates the list of ordered pair between two sets.- Returns:
- the list of ordered pairs
-
-