Skip to content

v2.0

Latest
Compare
Choose a tag to compare
@lucasmalara lucasmalara released this 09 Dec 16:57

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.