quickgraph

Saving a wpf layout to pdf using pdfsharp, c#

独自空忆成欢 提交于 2021-02-17 20:55:39
问题 I'm new to c#, wpf and the pdfsharp library. This is my XAML Code: <Grid> <zoom:ZoomControl> <graphsharp:GraphLayout x:Name="graphLayout" Graph="{Binding ElementName=root, Path=GraphToVisualize}" LayoutAlgorithmType="FR" OverlapRemovalAlgorithmType="FSA" HighlightAlgorithmType="Simple"></graphsharp:GraphLayout> </zoom:ZoomControl> <Button Content="Button" Height="23" Name="button1" Width="75" Margin="12,294,658,412" Click="button1_Click" /> </Grid> I want now save my "graphLayout" to a pdf

QuickGraph - How can I associate an Edge with a Class? (i.e. like you can with a Vertex)

回眸只為那壹抹淺笑 提交于 2020-01-02 17:30:52
问题 Q1 - How can I associate an Edge with a Class? (i.e. like you can with a Vertex) In my case there are various types of edges I want to be able to model. So my real question I guess is how can I associate some level of data with Edges (e.g. edge type). The graph I was looking at using was: http://quickgraph.codeplex.com/wikipage?title=BidirectionalGraph&referringTitle=Documentation thanks 回答1: An edge by default only connects two vertices on the graph. If you need more information associated

can QuickGraph support these requirements? (includes database persistence support)

二次信任 提交于 2019-12-25 12:08:17
问题 Would QuickGraph be able to help me out with my requirements below? (a) want to model a graph of nodes and directional relationships between nodes - for example to model web pages/files linked under a URL, or modeling IT infrastructure and dependencies between hardware/software. The library would include methods such as * Node.GetDirectParents() //i.e. there could be more than one direct parent for a node * Node.GetRootParents() //i.e. traverse the tree to the top root parent(s) for the given

QuickGraph - How can I associate an Edge with a Class? (i.e. like you can with a Vertex)

不羁的心 提交于 2019-12-06 04:46:58
Q1 - How can I associate an Edge with a Class? (i.e. like you can with a Vertex) In my case there are various types of edges I want to be able to model. So my real question I guess is how can I associate some level of data with Edges (e.g. edge type). The graph I was looking at using was: http://quickgraph.codeplex.com/wikipage?title=BidirectionalGraph&referringTitle=Documentation thanks An edge by default only connects two vertices on the graph. If you need more information associated with an edge (i.e. a "Relationship"), you can implement the IEdge<T> interfaces or subclass Edge<T> . Then,

How to set target vertex in QuickGraph Dijkstra or A*

二次信任 提交于 2019-12-05 03:33:28
问题 I am using QuickGraph version 3.6 and I found function SetRootVertex, but no SetTagretVertex. I need this because I am searching short paths in huge graph and this would speed up program a lot. Clases in question are DijkstraShortestPathAlgorithm and AStarShortestPathAlgorithm. 回答1: I don't think there is a way to this without using events. You could wrap the necessary code in one extension method, making things clear, e.g.: public static class Extensions { class AStarWrapper<TVertex, TEdge>

How to set target vertex in QuickGraph Dijkstra or A*

丶灬走出姿态 提交于 2019-12-03 17:16:24
I am using QuickGraph version 3.6 and I found function SetRootVertex, but no SetTagretVertex. I need this because I am searching short paths in huge graph and this would speed up program a lot. Clases in question are DijkstraShortestPathAlgorithm and AStarShortestPathAlgorithm. I don't think there is a way to this without using events. You could wrap the necessary code in one extension method, making things clear, e.g.: public static class Extensions { class AStarWrapper<TVertex, TEdge> where TEdge : IEdge<TVertex> { private TVertex target; private AStarShortestPathAlgorithm<TVertex, TEdge>

QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's

时光毁灭记忆、已成空白 提交于 2019-12-01 06:18:52
问题 In QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's. In other words all vertex's which have somewhere under them (on the way to the leaf nodes) one or more of the vertexs input. So if the vertexs were Nodes, and the edges were a depends on relationship, find all nodes that would be impacted by a given set of nodes. If not how hard is it to write one's own algorithms? 回答1: Here's what I've used to accomplish a predecessor search on a given vertex: