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
de9004ca
Verified
Commit
de9004ca
authored
2 years ago
by
Enna Gerhard
Browse files
Options
Downloads
Patches
Plain Diff
Improve clique lower bound but take more time
parent
df49d49d
No related branches found
Branches containing commit
No related tags found
1 merge request
!30
Maximum clique ennumeration
Pipeline
#205322
failed
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/algorithms/NativeMaximumCliqueEnnumerationSolver.java
+18
-4
18 additions, 4 deletions
...ary/algorithms/NativeMaximumCliqueEnnumerationSolver.java
with
18 additions
and
4 deletions
src/main/java/de/uni/bremen/grapa/library/algorithms/NativeMaximumCliqueEnnumerationSolver.java
+
18
−
4
View file @
de9004ca
...
...
@@ -3,6 +3,7 @@ package de.uni.bremen.grapa.library.algorithms;
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.ConsoleHelper
;
import
de.uni.bremen.grapa.library.helper.GetUndirectedGraph
;
import
de.uni.bremen.grapa.library.helper.GraphRenaming
;
import
de.uni.bremen.grapa.library.helper.GraphRenamingResult
;
...
...
@@ -18,6 +19,7 @@ import java.nio.file.Files;
import
java.nio.file.StandardCopyOption
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Scanner
;
import
java.util.Set
;
...
...
@@ -61,7 +63,7 @@ public class NativeMaximumCliqueEnnumerationSolver {
}
}
final
ProcessBuilder
processBuilder
=
new
ProcessBuilder
(
solver
.
getAbsolutePath
(),
"--input-file=ignored"
,
"--algorithm=
tomita
"
);
final
ProcessBuilder
processBuilder
=
new
ProcessBuilder
(
solver
.
getAbsolutePath
(),
"--input-file=ignored"
,
"--algorithm=
adjlist
"
);
final
GraphRenamingResult
rename
=
new
GraphRenaming
().
rename
(
blueGraph
);
final
DirectedGraph
<
Vertex
>
renamedGraph
=
rename
.
renamedGraph
();
try
{
...
...
@@ -75,7 +77,7 @@ public class NativeMaximumCliqueEnnumerationSolver {
final
Scanner
errors
=
new
Scanner
(
process
.
getErrorStream
());
while
(
errors
.
hasNext
())
{
System
.
err
.
println
(
errors
.
nextLine
());
ConsoleHelper
.
println
(
"[MCE] "
+
errors
.
nextLine
());
}
return
rename
.
decipher
(
readResult
);
...
...
@@ -101,7 +103,19 @@ public class NativeMaximumCliqueEnnumerationSolver {
if
(
line
.
startsWith
(
"NOTE"
)
||
line
.
startsWith
(
"Reading"
))
{
continue
;
}
System
.
out
.
println
(
line
);
final
String
[]
split
=
line
.
split
(
" "
);
if
(
split
.
length
<=
1
)
{
continue
;
}
Set
<
Vertex
>
newClique
=
new
HashSet
<>();
for
(
final
String
entry
:
split
)
{
newClique
.
add
(
graph
.
getVertex
(
Integer
.
parseInt
(
entry
)
-
offset
));
}
result
.
add
(
newClique
);
}
...
...
@@ -118,7 +132,7 @@ public class NativeMaximumCliqueEnnumerationSolver {
private
void
writeProblem
(
final
Process
process
,
final
DirectedGraph
<
Vertex
>
graph
,
final
int
offset
)
{
final
PrintWriter
writer
=
new
PrintWriter
(
new
OutputStreamWriter
(
new
BufferedOutputStream
(
process
.
getOutputStream
())));
writer
.
println
(
graph
.
maxId
()
+
offset
);
writer
.
println
(
graph
.
maxId
()
+
1
);
writer
.
println
(
graph
.
edgeCount
()
/
2
);
for
(
final
DirectedEdge
edge
:
graph
.
getEdges
())
{
...
...
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