Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FlowForge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timon Römer
FlowForge
Commits
c98dcd4a
Commit
c98dcd4a
authored
8 months ago
by
Timon Römer
Browse files
Options
Downloads
Patches
Plain Diff
Adds colors
parent
41be29f5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
GraphVisualizer.cs
+6
-0
6 additions, 0 deletions
GraphVisualizer.cs
MainWindow.xaml.cs
+2
-0
2 additions, 0 deletions
MainWindow.xaml.cs
with
8 additions
and
0 deletions
GraphVisualizer.cs
+
6
−
0
View file @
c98dcd4a
...
@@ -21,10 +21,16 @@ public static class GraphVisualizer
...
@@ -21,10 +21,16 @@ public static class GraphVisualizer
if
(
edge
.
IsBackwards
)
if
(
edge
.
IsBackwards
)
{
{
msaglEdge
.
LabelText
=
$"
{
0
}
/
{
edge
.
Residual
}
"
;
msaglEdge
.
LabelText
=
$"
{
0
}
/
{
edge
.
Residual
}
"
;
msaglEdge
.
Attr
.
Color
=
Color
.
Gray
;
}
}
else
else
{
{
msaglEdge
.
LabelText
=
$"
{
edge
.
MaxFlow
-
edge
.
Residual
}
/
{
edge
.
MaxFlow
}
"
;
msaglEdge
.
LabelText
=
$"
{
edge
.
MaxFlow
-
edge
.
Residual
}
/
{
edge
.
MaxFlow
}
"
;
if
(
edge
.
MaxFlow
-
edge
.
Residual
>
0
)
{
msaglEdge
.
Attr
.
Color
=
Color
.
Orange
;
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
MainWindow.xaml.cs
+
2
−
0
View file @
c98dcd4a
...
@@ -130,6 +130,8 @@ namespace FlowForge
...
@@ -130,6 +130,8 @@ namespace FlowForge
double
maxFlow
=
_fordFulkerson
.
Run
(
"1"
,
"4"
);
double
maxFlow
=
_fordFulkerson
.
Run
(
"1"
,
"4"
);
Console
.
WriteLine
(
$"Maximaler Fluss von Quelle zu Senke:
{
maxFlow
}
"
);
Console
.
WriteLine
(
$"Maximaler Fluss von Quelle zu Senke:
{
maxFlow
}
"
);
MessageBox
.
Show
(
$"Maximaler Fluss von Quelle zu Senke:
{
maxFlow
}
"
);
/*
/*
// Dictionary to store the flow along the augmenting path
// Dictionary to store the flow along the augmenting path
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment