Class UndirectedEdgeFactory<V>

    • Constructor Detail

      • UndirectedEdgeFactory

        public UndirectedEdgeFactory()
    • Method Detail

      • createEdge

        public UndirectedEdge<V> createEdge​(V from,
                                            V to,
                                            double weight)
        Description copied from interface: EdgeFactory
        Creates an edge between the from and to vertices with the given weight
        Specified by:
        createEdge in interface EdgeFactory<V>
        Parameters:
        from - the from
        to - the to
        weight - the weight
        Returns:
        the edge
      • isDirected

        public boolean isDirected()
        Description copied from interface: EdgeFactory
        Indicates whether the factor produces directed or undirected edges.
        Specified by:
        isDirected in interface EdgeFactory<V>
        Returns:
        True if the edges constructed in this factory are directed, False indicates undirected
      • createEdge

        public UndirectedEdge<V> createEdge​(V from,
                                            V to,
                                            JsonEntry entry)
        Description copied from interface: EdgeFactory
        Creates an edge between the from and to vertices filling in any given edge properties (e.g. weight) using the JsonEntry. This method is used for deserializing a graph from json.
        Specified by:
        createEdge in interface EdgeFactory<V>
        Parameters:
        from - the from
        to - the to
        entry - the entry
        Returns:
        the edge
      • getEdgeClass

        public Class<? extends Edge> getEdgeClass()
        Description copied from interface: EdgeFactory
        Gets the type of edge this factory generates (used to validate edges being added to the graph).
        Specified by:
        getEdgeClass in interface EdgeFactory<V>
        Returns:
        the edge class