Class 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 in data[*][0] (if isAreas is true, unused otherwise)
      java.lang.String[][] data
      data is either a list of pairs of class names which all have the weight 1 (isAreas is false) or a list of class combination specifications at [][0] (names are separated by ~) with [][1] unused (null, isAreas is true)
      boolean isAreas
      if true then areas is used and data[*][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).
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • isAreas

        public boolean isAreas
        if true then areas is used and data[*][1] is unused, otherwise all areas are implicitly 1 and data contains class pairs
      • areas

        public double[] areas
        weights for class combinations specified in data[*][0] (if isAreas is true, 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 is false) or a list of class combination specifications at [][0] (names are separated by ~) with [][1] unused (null, isAreas is true)
    • 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.
        Parameters:
        data - (see data)
        areas - (see areas)
        isAreas - (see )
      • 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 pair
        pair2 - second item of each pair