Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FPTG Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GraPA
Java
FPTG Library
Merge requests
!33
Fix typo, improve debuggung
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix typo, improve debuggung
mce
into
main
Overview
0
Commits
3
Pipelines
1
Changes
1
Merged
Enna Gerhard
requested to merge
mce
into
main
2 years ago
Overview
0
Commits
3
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
3774b7cd
Prev
Next
Show latest version
1 file
+
8
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
3774b7cd
Merge remote-tracking branch 'origin/main' into mce
· 3774b7cd
Enna Gerhard
authored
2 years ago
src/main/java/de/uni/bremen/grapa/library/algorithms/vertexcover/NativeVcSolver.java
+
8
−
3
Options
@@ -3,6 +3,8 @@ package de.uni.bremen.grapa.library.algorithms.vertexcover;
import
de.uni.bremen.grapa.library.graphs.api.DirectedEdge
;
import
de.uni.bremen.grapa.library.graphs.api.DirectedGraph
;
import
de.uni.bremen.grapa.library.graphs.api.Vertex
;
import
de.uni.bremen.grapa.library.helper.GraphRenaming
;
import
de.uni.bremen.grapa.library.helper.GraphRenamingResult
;
import
java.io.BufferedInputStream
;
import
java.io.File
;
@@ -58,11 +60,14 @@ public class NativeVcSolver {
try
{
final
Process
process
=
processBuilder
.
start
();
final
int
offset
=
graph
.
vertexExists
(
0
)
?
1
:
0
;
final
int
offset
=
1
;
writeProblem
(
process
,
graph
,
offset
);
GraphRenamingResult
renaming
=
new
GraphRenaming
().
rename
(
graph
);
writeProblem
(
process
,
renaming
.
renamedGraph
(),
offset
);
return
readResult
(
graph
,
process
,
offset
);
Set
<
Vertex
>
result
=
readResult
(
renaming
.
renamedGraph
(),
process
,
offset
);
return
renaming
.
decipher
(
result
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
IllegalStateException
(
"VC Solver not successful"
);
Loading