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
Commits
4dd253a2
Commit
4dd253a2
authored
2 years ago
by
Jona Dirks
Browse files
Options
Downloads
Plain Diff
Merge branch 'description-dependencies' into 'main'
Allow loading different problems See merge request
!37
parents
5722a7fd
cf32b39c
No related branches found
Branches containing commit
No related tags found
1 merge request
!37
Allow loading different problems
Pipeline
#238546
passed
2 years ago
Stage: test
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/uni/bremen/grapa/library/io/implementation/BasicUndirectedGraphImporterExporter.java
+20
-2
20 additions, 2 deletions
.../implementation/BasicUndirectedGraphImporterExporter.java
with
20 additions
and
2 deletions
src/main/java/de/uni/bremen/grapa/library/io/implementation/BasicUndirectedGraphImporterExporter.java
+
20
−
2
View file @
4dd253a2
...
...
@@ -32,6 +32,24 @@ public class BasicUndirectedGraphImporterExporter
implements
Exporter
<
BasicUndirectedGraph
>,
Importer
<
BasicUndirectedGraph
>
{
private
String
problem
;
/**
* Creates an importer for the cluster editing problem.
*/
public
BasicUndirectedGraphImporterExporter
()
{
this
(
"cep"
);
}
/**
* Specifies which problem to look for.
*
* @param problem name of the problem
*/
public
BasicUndirectedGraphImporterExporter
(
String
problem
)
{
this
.
problem
=
problem
;
}
@Override
public
void
exportToFile
(
final
BasicUndirectedGraph
graph
,
final
String
path
)
throws
IOException
{
export
(
graph
,
new
FileWriter
(
path
));
...
...
@@ -89,8 +107,8 @@ public class BasicUndirectedGraphImporterExporter
if
(
nextLine
.
startsWith
(
"p"
))
{
//Pace Problem importtype
//block needed for pace
String
[]
arguments
=
nextLine
.
split
(
" "
);
if
(!(
arguments
[
1
].
equals
(
"cep"
)
||
arguments
[
1
].
equals
(
"td"
)))
{
System
.
err
.
println
(
"Wrong problem
see pace 2021 documentation
"
);
if
(!(
arguments
[
1
].
equals
(
problem
)))
{
System
.
err
.
println
(
"Wrong problem
for this solver
"
);
break
;
}
...
...
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