public enum DIMACSFormat extends Enum<DIMACSFormat>
For a general description of the formats see http://dimacs.rutgers.edu/Challenges. Note that there are a lot of different formats based on each different challenge.
Enum Constant and Description |
---|
COLORING
Coloring format.
|
MAX_CLIQUE
Max-clique challenge format.
|
SHORTEST_PATH
Shortest path challenge format.
|
Modifier and Type | Method and Description |
---|---|
String |
getEdgeDescriptor()
Get the edge descriptor used in the format.
|
String |
getProblem()
Get the name of the problem.
|
static DIMACSFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DIMACSFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DIMACSFormat SHORTEST_PATH
This is the format used in the 9th DIMACS implementation challenge. A shortest path graph file looks as follows:
c <comments>
p sp <number of nodes> <number of edges>
a <edge source 1> <edge target 1>
a <edge source 2> <edge target 2>
a <edge source 3> <edge target 3>
a <edge source 4> <edge target 4>
...
A weighted variant where each edge has a floating-point weight is also supported:
a <edge source 1> <edge target 1> <edge_weight>
public static final DIMACSFormat MAX_CLIQUE
This is the format used in the 2nd DIMACS implementation challenge. A graph file looks as follows:
c <comments>
p edge <number of nodes> <number of edges>
e <edge source 1> <edge target 1>
e <edge source 2> <edge target 2>
e <edge source 3> <edge target 3>
e <edge source 4> <edge target 4>
...
A weighted variant where each edge has a floating-point weight is also supported:
e <edge source 1> <edge target 1> <edge_weight>
public static final DIMACSFormat COLORING
This is the format used in the 2nd
DIMACS implementation challenge. Same as the MAX_CLIQUE
but uses "col"
instead of "edge" in the problem definition line.
public static DIMACSFormat[] values()
for (DIMACSFormat c : DIMACSFormat.values()) System.out.println(c);
public static DIMACSFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getProblem()
public String getEdgeDescriptor()
Copyright © 2019. All rights reserved.