@Test public void testCycleReading() { Structure<Vertex, Edge> structure = (new Cycle()).generate(new StringAlgorithmParameter("", "5")); int i = 0; for (Vertex v : structure.getVertices()) v.label = "" + i++; testWriteRead(structure); }
public Collection<V> getVertices() { return vertices.values(); }
Structure extends XmlMarshallable implements IMovable { public Collection<V> getVertices() { return vertices.values(); } }
Structure extends XmlMarshallable implements IMovable { public Collection<V> getVertices() { return vertices.values(); } Structure(); }
Structure extends XmlMarshallable implements IMovable { public Collection<V> getVertices() { return vertices.values(); } Structure(); boolean isEmpty(); Collection<V> getVertices(); Edge getRandomEdge(); Vertex getRandomVertex(); void setVerticesT(HashMap<Integer, V> verticesNew); HashMap<Integer, V> getVerticesT(); void setEdgesT(HashMap<Integer, E> edgesNew); HashMap<Integer, E> getEdgesT(); Set<E> getEdges(); Set<IMovable> getAllMovablesModifiable(); void render(GralogGraphicsContext gc, Highlights highlights); void snapToGrid(double gridSize); double maximumCoordinate(int dimension); @Override void move(Vector2D offset); abstract V createVertex(); abstract V createVertex(Configuration config); V addVertex(Configuration config, int id); void mergeStructure(Structure<V,E> s, V thisVertex, V thatVertex); V addVertex(); @Deprecated void addVertex(V v); V addVertex(Configuration config); V addVertex(String label); V addVertex(String label, Configuration config); void addVertices(Collection<V> vs); void clear(); Edge getEdgeByEndVertices(Vertex sourceVertex, Vertex targetVertex); Edge getEdgeByVertexIds(int inputSourceId, int inputTargetId); @Deprecated Edge getEdgeByVertexIdsAndId(int inputSourceId, int inputTargetId, int inputEdgeId); Edge getEdgeById(int inputEdgeId); V getVertexById(int id); boolean removeVertexByID(int id); void removeVertex(Vertex v); void removeVertices(Collection<V> v); @Deprecated E createEdge(V source, V target); E createEdge(int id, Configuration config); boolean addEdge(E e, V source, V target); boolean addEdge(E e); void addEdges(Collection<E> es); E addEdge(int sourceID, int targetID); E addEdge(V source, V target); E addEdge(V source, V target, Configuration config); E addEdge(V source, V target, int id); E addEdge(V source, V target, int id, Configuration config); void removeEdge(int id); void removeEdge(Edge edge, boolean removeSiblingsEntries); void removeEdge(Edge e); void insertForeignSelection(Set<Object> selection, double offset); List<Object> duplicate(Set<Object> selection, double offset); boolean adjacent(V a, V b); Set<Edge> edgesBetweenVertices(V a, V b); int pollNextFreeEdgeID(); int pollNextFreeVertexID(); IMovable findObject(double x, double y); Set<IMovable> findObjects(Point2D from, Point2D to); void collapseEdges(Set<Object> selection); void alignHorizontallyMean(LinkedHashSet<Object> selection); void alignHorizontallyFirst(LinkedHashSet<Object> selection); void alignVerticallyMean(LinkedHashSet<Object> selection); @Override Element toXml(Document doc); int[][] toIncM(); void writeToFile(String filename); void writeToStream(StreamResult stream); String xmlToString(); String incToString(); String tgfToString(); void fromXml(Element gnode); static Structure loadFromFile(String fileName); static Structure loadFromStream(InputStream stream); void setFileReference(boolean hasReference, String ref); String getFileReference(); boolean hasFileReference(); void addStructureListener(StructureListener listener); void removeStructureListener(StructureListener listener); StructureDescription getDescription(); }
Structure extends XmlMarshallable implements IMovable { public Collection<V> getVertices() { return vertices.values(); } Structure(); boolean isEmpty(); Collection<V> getVertices(); Edge getRandomEdge(); Vertex getRandomVertex(); void setVerticesT(HashMap<Integer, V> verticesNew); HashMap<Integer, V> getVerticesT(); void setEdgesT(HashMap<Integer, E> edgesNew); HashMap<Integer, E> getEdgesT(); Set<E> getEdges(); Set<IMovable> getAllMovablesModifiable(); void render(GralogGraphicsContext gc, Highlights highlights); void snapToGrid(double gridSize); double maximumCoordinate(int dimension); @Override void move(Vector2D offset); abstract V createVertex(); abstract V createVertex(Configuration config); V addVertex(Configuration config, int id); void mergeStructure(Structure<V,E> s, V thisVertex, V thatVertex); V addVertex(); @Deprecated void addVertex(V v); V addVertex(Configuration config); V addVertex(String label); V addVertex(String label, Configuration config); void addVertices(Collection<V> vs); void clear(); Edge getEdgeByEndVertices(Vertex sourceVertex, Vertex targetVertex); Edge getEdgeByVertexIds(int inputSourceId, int inputTargetId); @Deprecated Edge getEdgeByVertexIdsAndId(int inputSourceId, int inputTargetId, int inputEdgeId); Edge getEdgeById(int inputEdgeId); V getVertexById(int id); boolean removeVertexByID(int id); void removeVertex(Vertex v); void removeVertices(Collection<V> v); @Deprecated E createEdge(V source, V target); E createEdge(int id, Configuration config); boolean addEdge(E e, V source, V target); boolean addEdge(E e); void addEdges(Collection<E> es); E addEdge(int sourceID, int targetID); E addEdge(V source, V target); E addEdge(V source, V target, Configuration config); E addEdge(V source, V target, int id); E addEdge(V source, V target, int id, Configuration config); void removeEdge(int id); void removeEdge(Edge edge, boolean removeSiblingsEntries); void removeEdge(Edge e); void insertForeignSelection(Set<Object> selection, double offset); List<Object> duplicate(Set<Object> selection, double offset); boolean adjacent(V a, V b); Set<Edge> edgesBetweenVertices(V a, V b); int pollNextFreeEdgeID(); int pollNextFreeVertexID(); IMovable findObject(double x, double y); Set<IMovable> findObjects(Point2D from, Point2D to); void collapseEdges(Set<Object> selection); void alignHorizontallyMean(LinkedHashSet<Object> selection); void alignHorizontallyFirst(LinkedHashSet<Object> selection); void alignVerticallyMean(LinkedHashSet<Object> selection); @Override Element toXml(Document doc); int[][] toIncM(); void writeToFile(String filename); void writeToStream(StreamResult stream); String xmlToString(); String incToString(); String tgfToString(); void fromXml(Element gnode); static Structure loadFromFile(String fileName); static Structure loadFromStream(InputStream stream); void setFileReference(boolean hasReference, String ref); String getFileReference(); boolean hasFileReference(); void addStructureListener(StructureListener listener); void removeStructureListener(StructureListener listener); StructureDescription getDescription(); public TreeSet<Interval> vertexIdHoles; public TreeSet<Interval> edgeIdHoles; }