Class EdgeTypePartitionImpl

  • All Implemented Interfaces:
    Partition

    public class EdgeTypePartitionImpl
    extends PartitionImpl
    Author:
    mbastian
    • Field Detail

      • valueType

        private final Class valueType
      • column

        private final org.gephi.graph.api.Column column
    • Constructor Detail

      • EdgeTypePartitionImpl

        public EdgeTypePartitionImpl​(org.gephi.graph.api.Column column,
                                     Class valueType)
    • Method Detail

      • getValues

        public Collection getValues​(org.gephi.graph.api.Graph graph)
        Description copied from interface: Partition
        Returns the collection of values this partition represents. Each value has at least one element.
        Parameters:
        graph - graph this partition applies to
        Returns:
        values
      • getValue

        public Object getValue​(org.gephi.graph.api.Element element,
                               org.gephi.graph.api.Graph gr)
        Description copied from interface: Partition
        Returns the element's value for this partition.
        Parameters:
        element - element to get the value for
        gr - graph this element belongs to
        Returns:
        the value for this partition
      • getElementCount

        public int getElementCount​(org.gephi.graph.api.Graph graph)
        Description copied from interface: Partition
        Returns the number of elements that have a value in this partition.
        Parameters:
        graph - graph this partition applies to
        Returns:
        element count
      • count

        public int count​(Object value,
                         org.gephi.graph.api.Graph graph)
        Description copied from interface: Partition
        Returns the number of elements for the given value.
        Parameters:
        value - value
        graph - graph this partition applies to
        Returns:
        value count
      • percentage

        public float percentage​(Object value,
                                org.gephi.graph.api.Graph graph)
        Description copied from interface: Partition
        Returns the percentage of elements with the given value.
        Parameters:
        value - value
        Returns:
        percentage, between zero and 100
      • size

        public int size​(org.gephi.graph.api.Graph graph)
        Description copied from interface: Partition
        Returns the number of values this partition represents.
        Parameters:
        graph - this element belongs to
        Returns:
        value count
      • getIndex

        private org.gephi.graph.api.Index<org.gephi.graph.api.Edge> getIndex​(org.gephi.graph.api.Graph graph)
      • getColumn

        public org.gephi.graph.api.Column getColumn()
        Description copied from interface: Partition
        Returns the column associated with this partition.
        Returns:
        column or null if partition not based on a column
      • isValid

        public boolean isValid​(org.gephi.graph.api.Graph graph)
        Specified by:
        isValid in class PartitionImpl
      • getVersion

        public int getVersion​(org.gephi.graph.api.Graph graph)
        Specified by:
        getVersion in class PartitionImpl