Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jgrapht/jgrapht
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: tj-developers/jgrapht
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Jun 11, 2018

  1. Copy the full SHA
    c1ec9f5 View commit details

Commits on Jun 13, 2018

  1. added mpq tree algorithm class skeleton

    Ira Justus Fesefeldt committed Jun 13, 2018
    Copy the full SHA
    5bb5ff9 View commit details
  2. checkstyle

    Ira Justus Fesefeldt committed Jun 13, 2018
    Copy the full SHA
    212d777 View commit details
  3. Merge pull request #46 from PhoenixIra/mpqTree

    Mpq tree algorithm skeleton class
    PhoenixIra authored Jun 13, 2018
    Copy the full SHA
    0fe6a9d View commit details

Commits on Jun 26, 2018

  1. added MPQ Node Tree structure

    Ira Justus Fesefeldt committed Jun 26, 2018
    Copy the full SHA
    fce5827 View commit details
  2. added MPQNodeSet

    Ira Justus Fesefeldt committed Jun 26, 2018
    Copy the full SHA
    7b3cfab View commit details
  3. added the 'trivial' case

    Ira Justus Fesefeldt committed Jun 26, 2018
    Copy the full SHA
    6e3b7f2 View commit details
  4. Merge branch 'mpqIntervalRecognizer' of https://github.com/tj-develop…

    …ers/jgrapht into mpqTree
    Ira Justus Fesefeldt committed Jun 26, 2018
    Copy the full SHA
    6357c17 View commit details

Commits on Jul 25, 2018

  1. Added first part of certificate generator

    Ira Justus Fesefeldt committed Jul 25, 2018
    Copy the full SHA
    8b4d81e View commit details

Commits on Aug 4, 2018

  1. Added R/L computation of certificate generation

    Ira Justus Fesefeldt committed Aug 4, 2018
    Copy the full SHA
    3df00c5 View commit details
  2. Fixed small issue

    Ira Justus Fesefeldt committed Aug 4, 2018
    Copy the full SHA
    6ca0225 View commit details

Commits on Aug 13, 2018

  1. capsulated at finder into its own class

    Ira Justus Fesefeldt committed Aug 13, 2018
    Copy the full SHA
    1366f29 View commit details
  2. reverted changed in korte moehring alg

    Ira Justus Fesefeldt committed Aug 13, 2018
    Copy the full SHA
    89d642b View commit details

Commits on Aug 21, 2018

  1. Implemented rough template for leaf, need to clean and optimie it, an…

    …d also wait for the addChild in PNode
    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    26f104c View commit details
  2. Commit after fixing minor changes

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    c6e6637 View commit details
  3. initial changes

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    de320a7 View commit details
  4. Implemented rough case for all nodes where N_small = N_big

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    86d8727 View commit details
  5. Implemented all the templates, need to optimize, include javadox

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    418b24b View commit details
  6. Fixed minor mistakes in the template implementation+ optimized.

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    d7552d4 View commit details
  7. implemented the addChild method

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    8dd975a View commit details
  8. Encapsulated the tree updates in MPQTreeUpdater.java and added javadoc

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    33898d0 View commit details
  9. Reverting the recognizer to previous version

    Your Name authored and Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    93a8499 View commit details
  10. refine MPQ tree node

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    d7312c1 View commit details
  11. correct MPQ tree node definition

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    542b029 View commit details
  12. implement labeling phase

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    88ff977 View commit details
  13. implement circular linked list

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    0ccdad1 View commit details
  14. remove circular linked list

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    82253df View commit details
  15. implement circular list node

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    b7c3007 View commit details
  16. changes according to review comments

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    ba28b0e View commit details
  17. compose set A for updating phase

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    60e19cd View commit details
  18. minor changes

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    33f2b14 View commit details
  19. compose set B for updating phase

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    a4005f8 View commit details
  20. add positive and negative instances for testing

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    8218e23 View commit details
  21. change class visibility and format the code

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    a84b0b2 View commit details
  22. implementation and integration

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    3e4b95e View commit details
  23. Copy the full SHA
    41175f6 View commit details
  24. remove unused methods and add comments

    Jiong Fu committed Aug 21, 2018
    Copy the full SHA
    0d2cbfc View commit details
  25. Merge pull request #57 from PhoenixIra/mpqIntervalRecognizer

    added certificate generator
    PhoenixIra authored Aug 21, 2018
    Copy the full SHA
    da88cbc View commit details

Commits on Aug 24, 2018

  1. Merge pull request #64 from tj-developers/mpqIntervalRecognizer-project

    Mpq interval recognizer project
    christophgruene authored Aug 24, 2018
    Copy the full SHA
    067048b View commit details

Commits on Aug 8, 2020

  1. Bump guava from 24.1-jre to 24.1.1-jre in /jgrapht-guava

    Bumps [guava](https://github.com/google/guava) from 24.1-jre to 24.1.1-jre.
    - [Release notes](https://github.com/google/guava/releases)
    - [Commits](https://github.com/google/guava/commits)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 8, 2020
    Copy the full SHA
    dc0e001 View commit details
  2. Merge pull request #77 from tj-developers/dependabot/maven/jgrapht-gu…

    …ava/com.google.guava-guava-24.1.1-jre
    
    Bump guava from 24.1-jre to 24.1.1-jre in /jgrapht-guava
    christophgruene authored Aug 8, 2020
    Copy the full SHA
    8f98cff View commit details
  3. Bump checkstyle from 8.8 to 8.29

    Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.8 to 8.29.
    - [Release notes](https://github.com/checkstyle/checkstyle/releases)
    - [Commits](checkstyle/checkstyle@checkstyle-8.8...checkstyle-8.29)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 8, 2020
    Copy the full SHA
    6da64f1 View commit details
  4. Bump rubyzip from 1.2.1 to 2.3.0 in /docs

    Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 1.2.1 to 2.3.0.
    - [Release notes](https://github.com/rubyzip/rubyzip/releases)
    - [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md)
    - [Commits](rubyzip/rubyzip@v1.2.1...v2.3.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 8, 2020
    Copy the full SHA
    6cd9a3c View commit details
  5. Copy the full SHA
    a5b8ad4 View commit details
  6. Bump ffi from 1.9.23 to 1.13.1 in /docs

    Bumps [ffi](https://github.com/ffi/ffi) from 1.9.23 to 1.13.1.
    - [Release notes](https://github.com/ffi/ffi/releases)
    - [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
    - [Commits](ffi/ffi@1.9.23...1.13.1)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 8, 2020
    Copy the full SHA
    d50d385 View commit details
  7. Merge pull request #81 from tj-developers/dependabot/bundler/docs/nok…

    …ogiri-1.10.10
    
    Bump nokogiri from 1.8.2 to 1.10.10 in /docs
    christophgruene authored Aug 8, 2020
    Copy the full SHA
    8b86f2c View commit details
  8. Merge pull request #80 from tj-developers/dependabot/bundler/docs/ffi…

    …-1.13.1
    
    Bump ffi from 1.9.23 to 1.13.1 in /docs
    christophgruene authored Aug 8, 2020
    Copy the full SHA
    8c3dd8f View commit details
  9. Merge pull request #79 from tj-developers/dependabot/bundler/docs/rub…

    …yzip-2.3.0
    
    Bump rubyzip from 1.2.1 to 2.3.0 in /docs
    christophgruene authored Aug 8, 2020
    Copy the full SHA
    9114407 View commit details
  10. Merge pull request #78 from tj-developers/dependabot/maven/com.puppyc…

    …rawl.tools-checkstyle-8.29
    
    Bump checkstyle from 8.8 to 8.29
    christophgruene authored Aug 8, 2020
    Copy the full SHA
    dc53d94 View commit details
Showing with 5,987 additions and 24 deletions.
  1. +5 −5 docs/Gemfile.lock
  2. +25 −1 jgrapht-core/src/main/java/org/jgrapht/GraphTests.java
  3. +68 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interfaces/IntervalStructureInterface.java
  4. +59 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interfaces/IntervalTreeInterface.java
  5. +346 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/ATFinder.java
  6. +112 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/CircularListNode.java
  7. +318 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/IntervalGraphRecognizer.java
  8. +46 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/IntervalGraphRecognizerInterface.java
  9. +344 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/KorteMoehringIntervalGraphRecognizer.java
  10. +137 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/LexBreadthFirstSearch.java
  11. +680 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/MPQTreeUpdater.java
  12. +32 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/mpq/Leaf.java
  13. +106 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/mpq/MPQTreeNode.java
  14. +55 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/mpq/PNode.java
  15. +56 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/mpq/QNode.java
  16. +120 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/mpq/QSectionNode.java
  17. +5 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/mpq/package-info.java
  18. +5 −0 jgrapht-core/src/main/java/org/jgrapht/alg/interval/package-info.java
  19. +156 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/Interval.java
  20. +346 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/IntervalGraphMapping.java
  21. +72 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/IntervalGraphMappingListener.java
  22. +108 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/IntervalTreeNodeValue.java
  23. +133 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/IntervalTreeStructure.java
  24. +105 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/IntervalVertexPair.java
  25. +212 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/RedBlackIntervalTree.java
  26. +4 −0 jgrapht-core/src/main/java/org/jgrapht/graph/interval/package-info.java
  27. +274 −16 jgrapht-core/src/main/java/org/jgrapht/traverse/LexBreadthFirstIterator.java
  28. +180 −0 jgrapht-core/src/main/java/org/jgrapht/util/BinarySearchTree.java
  29. +680 −0 jgrapht-core/src/main/java/org/jgrapht/util/RedBlackTree.java
  30. +194 −0 jgrapht-core/src/main/java/org/jgrapht/util/RedBlackTreeNode.java
  31. +104 −0 jgrapht-core/src/test/java/org/jgrapht/alg/interval/ATFinderTest.java
  32. +77 −0 jgrapht-core/src/test/java/org/jgrapht/alg/interval/CircularListTest.java
  33. +266 −0 jgrapht-core/src/test/java/org/jgrapht/alg/interval/IntervalGraphRecognizerTest.java
  34. +56 −0 jgrapht-core/src/test/java/org/jgrapht/alg/interval/KorteMoehringIntervalGraphRecognizerTest.java
  35. +205 −0 jgrapht-core/src/test/java/org/jgrapht/graph/interval/IntervalGraphMappingTest.java
  36. +60 −0 jgrapht-core/src/test/java/org/jgrapht/graph/interval/IntervalTreeStructureTest.java
  37. +70 −0 jgrapht-core/src/test/java/org/jgrapht/graph/interval/RedBlackIntervalTreeTest.java
  38. +164 −0 jgrapht-core/src/test/java/org/jgrapht/util/RedBlackTreeTest.java
  39. +1 −1 jgrapht-guava/pom.xml
  40. +1 −1 pom.xml
10 changes: 5 additions & 5 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ GEM
execjs (2.7.0)
faraday (0.15.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.23)
ffi (1.13.1)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (185)
@@ -199,15 +199,15 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.3.0)
mini_portile2 (2.4.0)
minima (2.4.1)
jekyll (~> 3.5)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
multipart-post (2.0.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
octokit (4.9.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.1)
@@ -220,7 +220,7 @@ GEM
ruby-enum (0.7.2)
i18n
ruby_dep (1.5.0)
rubyzip (1.2.1)
rubyzip (2.3.0)
safe_yaml (1.0.4)
sass (3.5.6)
sass-listen (~> 4.0.0)
26 changes: 25 additions & 1 deletion jgrapht-core/src/main/java/org/jgrapht/GraphTests.java
Original file line number Diff line number Diff line change
@@ -17,8 +17,13 @@
*/
package org.jgrapht;

import org.jgrapht.alg.connectivity.*;
import org.jgrapht.alg.cycle.*;
import org.jgrapht.alg.connectivity.BiconnectivityInspector;
import org.jgrapht.alg.connectivity.ConnectivityInspector;
import org.jgrapht.alg.connectivity.KosarajuStrongConnectivityInspector;
import org.jgrapht.alg.cycle.ChordalityInspector;
import org.jgrapht.alg.cycle.HierholzerEulerianCycle;
import org.jgrapht.alg.interval.*;

import java.util.*;
import java.util.stream.*;
@@ -29,6 +34,7 @@
* @author Barak Naveh
* @author Dimitrios Michail
* @author Joris Kinable
* @author Ira Justus Fesefeldt
*/
public abstract class GraphTests
{
@@ -497,6 +503,24 @@ public static <V, E> boolean isChordal(Graph<V, E> graph)
Objects.requireNonNull(graph, GRAPH_CANNOT_BE_NULL);
return new ChordalityInspector<>(graph).isChordal();
}

/**
* Tests whether a graph is an interval graph. <a href="https://en.wikipedia.org/wiki/Interval_graph">
* Interval graphs</a> are a familiy of graphs, which can be represented as intersections of intervals.
* The vertices are intervals on the number line and two vertices are connected if and only if the intervals of
* these vertices intersect each other.
*
* @param graph the input graph
* @param <V> the graph vertex type
* @param <E> the graph edge type
* @return true if the graph is an interval graph, false otherwise
* @see IntervalGraphRecognizer#isIntervalGraph()
*
*/
public static <V, E> boolean isIntervalGraph(Graph<V, E> graph) {
Objects.requireNonNull(graph, GRAPH_CANNOT_BE_NULL);
return new IntervalGraphRecognizer<>(graph).isIntervalGraph();
}

/**
* Checks whether a graph is <a href="http://www.graphclasses.org/classes/gc_14.html">weakly
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* (C) Copyright 2003-2018, by Christoph Grüne and Contributors.
*
* JGraphT : a free Java graph-theory library
*
* This program and the accompanying materials are dual-licensed under
* either
*
* (a) the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation, or (at your option) any
* later version.
*
* or (per the licensee's choosing)
*
* (b) the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation.
*/
package org.jgrapht.alg.interfaces;

import org.jgrapht.graph.interval.Interval;

import java.util.List;

/**
* Interface of IntervalStructure
* This interface is used for an implementation of an efficient data structure to maintain intervals.
*
* @param <T> the type of the interval
*
* @author Christoph Grüne (christophgruene)
* @since Apr 26, 2018
*/
public interface IntervalStructureInterface<T extends Comparable<T>> {

/**
* Returns all intervals that overlap with the given <code>interval</code>
*
* @param interval the interval
* @return all intervals that overlap with the given <code>interval</code>
*/
List<Interval<T>> overlapsWith(Interval<T> interval);


/**
* Returns all intervals that overlap with the given <code>point</code>
* @param point the point
* @return all intervals that overlap with the given <code>point</code>
*/
List<Interval<T>> overlapsWithPoint(T point);

/**
* adds an interval to the interval tree. It returns true iff the key has been added successfully.
*
* @param interval the interval
*
* @return true, if the key was not contained in the tree; false, otherwise
*/
boolean add(Interval<T> interval);

/**
* removes an interval from the tree. It returns true iff the key has been removed successfully.
*
* @param interval the interval
*
* @return true, if the key was contained in the tree; false, otherwise
*/
boolean remove(Interval<T> interval);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* (C) Copyright 2003-2018, by Christoph Grüne and Contributors.
*
* JGraphT : a free Java graph-theory library
*
* This program and the accompanying materials are dual-licensed under
* either
*
* (a) the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation, or (at your option) any
* later version.
*
* or (per the licensee's choosing)
*
* (b) the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation.
*/
package org.jgrapht.alg.interfaces;

import org.jgrapht.graph.interval.Interval;
import org.jgrapht.graph.interval.IntervalTreeNodeValue;
import org.jgrapht.util.BinarySearchTree;

import java.util.List;

/**
* Interface of IntervalTree
* This is the interface to an interval tree. It maintains intervals in order to find intersecting intervals and
* included points in O(log n + k), where n is the number of intervals and k the output size,
* i.e. the number of output intervals.
*
* @param <T> The type of the interval
* @param <K> The key for the search tree
* @param <NodeValue> The node value type
*
* @author Christoph Grüne (christophgruene)
* @since Apr 26, 2018
*/
public interface IntervalTreeInterface
<K, NodeValue extends IntervalTreeNodeValue<Interval<T>, T>, T extends Comparable<T>>
extends BinarySearchTree<K, NodeValue> {

/**
* Returns all intervals of all vertices that intersect with the given <code>interval</code>
*
* @param interval the interval
* @return all intersecting intervals of vertices in the graph
*/
List<Interval<T>> overlapsWith(Interval<T> interval);

/**
* Returns all intervals of all vertices that include the given <code>point</code>
*
* @param point the point
* @return all including intervals of vertices in the graph
*/
List<Interval<T>> overlapsWith(T point);

}
Loading