Releases: lucasmalara/graphs-and-algorithms
v2.0
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.
v1.2
New Release Announcement
This release contains small updates that were focused on covering more test cases and refactoring some code.
-
Added new test cases.
-
Renamed test cases to follow
BDD
naming convention. -
Code refactoring, e.g
- Removed redundant
ArrayList
instance inbreadthFirstSearch(subset: Collection<Vertex>): int
. - Replaced some for loops with
Stream API
chains. - Renamed some variables.
- Removed redundant
v1.1
New Release Announcement
This release contains smaller updates that were focused on improvements of what was already here.
-
Updated
javadoc
:- Added new tags:
@since
,@version
. - Added
javadoc
comments for new components. - General comments renaming here and there.
- Added new tags:
-
Moved src directory directly to the repository main tree.
-
Moved classes to new packages.
-
Added
package-info.java
. -
Code refactoring:
- Extracted few expressions to methods for better extensibility.
- Improved code legibility.
-
Updated dependencies.
-
Updated README.
v1.0
Improvements
- Code refactoring (cleaner code, improved functionality and efficiency of Graph implementation)
- Replaced some of the methods with lombok annotations
- Changed the order of displayable vertices to ascending
- Changed the displayable sets of vertices to unmodifiable
- Changed return type of some of the methods from void to boolean
- Added new files to resources
- Added javadoc
- Added JetBrains annotations
- Added JUnit unit tests
- Added GraphRunner class
- Added NegativeVertexIndexException class
- Added NoSuchVertexIndexException class
New Features
- Disconnect vertices
- Get neighbours of given vertex
- Remove multiple vertices from the graph (before: only singular vertex per method invocation)
- Create complete graph of given size,
- Check if graph contains given vertices (before: only singular vertex per method invocation)
- Check if subgraph or graph is bipartite
- Check if subgraph or graph is complete
- Check if given subset of vertices is an independent set of the graph
- Compute maximal independent set in the graph
- Modified implementation of breadth first search algorithm
- Map a graph to a complete graph of the same size
- Map vertices set to vertices indexes set