Skip to content

Releases: lucasmalara/graphs-and-algorithms

v2.0

09 Dec 16:57
Compare
Choose a tag to compare

New Release Announcement

  1. 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.
  2. Updated Javadoc.

  3. Removed static signature from few methods in Graph class due to introducing class parametrizing.

  4. 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.
  5. Extracted most methods from GraphRunner to different utility classes for more flexible testing of Graph class.

  6. 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

05 Dec 17:11
Compare
Choose a tag to compare

New Release Announcement

This release contains small updates that were focused on covering more test cases and refactoring some code.

  1. Added new test cases.

  2. Renamed test cases to follow BDD naming convention.

  3. Code refactoring, e.g

    • Removed redundant ArrayList instance in breadthFirstSearch(subset: Collection<Vertex>): int.
    • Replaced some for loops with Stream API chains.
    • Renamed some variables.

v1.1

28 Nov 21:23
Compare
Choose a tag to compare

New Release Announcement

This release contains smaller updates that were focused on improvements of what was already here.

  1. Updated javadoc:

    • Added new tags: @since, @version.
    • Added javadoc comments for new components.
    • General comments renaming here and there.
  2. Moved src directory directly to the repository main tree.

  3. Moved classes to new packages.

  4. Added package-info.java.

  5. Code refactoring:

    • Extracted few expressions to methods for better extensibility.
    • Improved code legibility.
  6. Updated dependencies.

  7. Updated README.

v1.0

23 May 15:45
Compare
Choose a tag to compare

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