New Release Announcement
-
Added new test cases and refactored those already implemented.
- Improved existing test cases.
- Added test cases for new features.
- Added more cases for
parametrized
tests. - Replaced few
source
type annotations with others that fit better in given case. - Added missing
DisplayName
annotations.
-
Updated
Javadoc
. -
Removed
static
signature from few methods inGraph
class due to introducingclass parametrizing
. -
Added few new utility classes:
- Finding files -
FileFinder
- Global access of messages -
MessageProvider
- Printing formatting:
PrettierPrinter
. - Producing instances of
Graph
-GraphProducer
- Printing graphs and algorithms results -
GraphPrinter
.
- Finding files -
-
Extracted most methods from
GraphRunner
to different utility classes for more flexible testing ofGraph
class. -
Added the new features - read below.
New Features
- A graph can now store bounded-type data in its vertices. Example:
import com.graphs.struct.Graph;
public class Main {
public static void main(String[] args) {
// Type bounded to String.
Graph<String> graph = new Graph<>();
// Add new vertex with index: 1, that stores "Hello World"
graph.addNewVertex(1, "Hello World");
// These will not compile.
graph.setVertexData(1, true);
graph.setVertexData(1, 0);
graph.setVertexData(1, 'c');
// etc..
}
}
-
Add vertex with stored data
-
Get vertex stored data
-
Set vertex stored data
Notes
Class parametrizing is crucial as regards algorithms implementation solving issues in networks, e.g.:
-
Find if and which node stores given data.
-
Find any or approximately the shortest path (if exists) from any node to the node that stores given data.
-
Find if given data is stored in a node contained by various subsets in graph, e.g.:
- [minimal] [connected] dominating set,
- [maximal] independent set,
- complete subgraph,
- bipartite subgraph,
- clique,
- etc.
-
Send data from one node to another.