Package edu.uic.ncdm.venn.data
Class VennData
- java.lang.Object
-
- edu.uic.ncdm.venn.data.VennData
-
public class VennData extends java.lang.Object
class representing the class combinations and corresponding weights
-
-
Field Summary
Fields Modifier and Type Field Description double[]
areas
weights for class combinations specified indata[*][0]
(if isAreas istrue
, unused otherwise)java.lang.String[][]
data
data is either a list of pairs of class names which all have the weight 1 (isAreas isfalse
) or a list of class combination specifications at [][0] (names are separated by~
) with [][1] unused (null
, isAreas istrue
)boolean
isAreas
iftrue
then areas is used anddata[*][1]
is unused, otherwise all areas are implicitly 1 and data contains class pairs
-
Constructor Summary
Constructors Constructor Description VennData(java.lang.String[][] data, double[] areas, boolean isAreas)
create Venn data by specifying raw contents - no consistency checks are made so it is the responsibility of the caller to make sure the content combination is valid.VennData(java.lang.String[] data, double[] areas)
create Venn data from a list of strings specifying the classes and associated areas.VennData(java.lang.String[] pair1, java.lang.String[] pair2)
create Venn data from a list of pairs (all will have equal area).
-
-
-
Field Detail
-
isAreas
public boolean isAreas
iftrue
then areas is used anddata[*][1]
is unused, otherwise all areas are implicitly 1 and data contains class pairs
-
areas
public double[] areas
weights for class combinations specified indata[*][0]
(if isAreas istrue
, unused otherwise)
-
data
public java.lang.String[][] data
data is either a list of pairs of class names which all have the weight 1 (isAreas isfalse
) or a list of class combination specifications at [][0] (names are separated by~
) with [][1] unused (null
, isAreas istrue
)
-
-
Constructor Detail
-
VennData
public VennData(java.lang.String[][] data, double[] areas, boolean isAreas)
create Venn data by specifying raw contents - no consistency checks are made so it is the responsibility of the caller to make sure the content combination is valid.
-
VennData
public VennData(java.lang.String[] data, double[] areas)
create Venn data from a list of strings specifying the classes and associated areas.- Parameters:
data
- list of string specifying classes/combinations (names must be separated by~
)areas
- areas associated with the classes
-
VennData
public VennData(java.lang.String[] pair1, java.lang.String[] pair2)
create Venn data from a list of pairs (all will have equal area).- Parameters:
pair1
- first item of each pairpair2
- second item of each pair
-
-