diff --git a/pom.xml b/pom.xml index 3e29476..61acbca 100644 --- a/pom.xml +++ b/pom.xml @@ -18,8 +18,8 @@ maven-compiler-plugin 3.5.1 - 1.6 - 1.6 + 1.8 + 1.8 @@ -61,7 +61,19 @@ - + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + @@ -80,7 +92,7 @@ com.github.Data2Semantics nodes - v0.1.16 + v0.1.17 diff --git a/src/main/java/nl/peterbloem/motive/MotifModel.java b/src/main/java/nl/peterbloem/motive/MotifModel.java index 6d6a7eb..62e409e 100644 --- a/src/main/java/nl/peterbloem/motive/MotifModel.java +++ b/src/main/java/nl/peterbloem/motive/MotifModel.java @@ -122,7 +122,7 @@ public static double size(Graph graph, Graph sub, additions.add((int)removals.frequency(pair)); } - bits.add("multiple-edges", Functions.prefix(additions.isEmpty() ? 0 : Functions.max(additions))); + bits.add("multiple-edges", Functions.prefix(additions.isEmpty() ? 0 : (long)Functions.max(additions))); bits.add("multiple-edges", OnlineModel.storeIntegers(additions)); } @@ -287,7 +287,7 @@ public static List subbedDegrees( for(Pair token : instanceToInstance.tokens()) additions.add((int)instanceToInstance.frequency(token) - 1); - rest.add("multi-edges", Functions.prefix(additions.isEmpty() ? 0 : Functions.max(additions))); + rest.add("multi-edges", Functions.prefix(additions.isEmpty() ? 0 : (long)Functions.max(additions))); rest.add("multi-edges", OnlineModel.storeIntegers(additions)); // * check for any disconnected nodes and add 0s @@ -431,7 +431,7 @@ public static List subbedDegrees( rest.add("multi-edges", Functions.prefix( additions.isEmpty() ? - 0 : Functions.max(additions))); + 0 : (long)Functions.max(additions))); rest.add("multi-edges", OnlineModel.storeIntegers(additions)); // * check for any disconnected nodes and add 0s @@ -682,7 +682,7 @@ private static void sizeSubbedER(DGraph graph, DGraph sub, for(Pair token : instanceToInstance.tokens()) additions.add((int)instanceToInstance.frequency(token) - 1); - bits.add("multiple-edges", Functions.prefix(additions.isEmpty() ? 0 : max(additions))); + bits.add("multiple-edges", Functions.prefix(additions.isEmpty() ? 0 : (long)max(additions))); bits.add("multiple-edges", OnlineModel.storeIntegers(additions)); } @@ -751,7 +751,7 @@ private static void sizeSubbedER(UGraph graph, UGraph sub, for(Pair token : instanceToInstance.tokens()) additions.add((int)instanceToInstance.frequency(token) - 1); - bits.add("multiple-edges", Functions.prefix(additions.isEmpty() ? 0 : max(additions))); + bits.add("multiple-edges", Functions.prefix(additions.isEmpty() ? 0 : (long)max(additions))); bits.add("multiple-edges", OnlineModel.storeIntegers(additions)); } diff --git a/src/test/java/nl/peterbloem/motive/MotifModelTest.java b/src/test/java/nl/peterbloem/motive/MotifModelTest.java index 4cdd227..6d5b7b9 100644 --- a/src/test/java/nl/peterbloem/motive/MotifModelTest.java +++ b/src/test/java/nl/peterbloem/motive/MotifModelTest.java @@ -257,7 +257,7 @@ public static double sizeBetaCopying(DGraph graph, DGraph sub, additions.add((int)removals.frequency(pair)); } - rest.add("multi-edges", Functions.prefix(additions.isEmpty() ? 0 : Functions.max(additions))); + rest.add("multi-edges", Functions.prefix(additions.isEmpty() ? 0 : (long) Functions.max(additions))); rest.add("multi-edges", OnlineModel.storeIntegers(additions)); // * Store the rewiring information @@ -327,7 +327,7 @@ public static double sizeBetaCopying(UGraph graph, UGraph sub, additions.add((int)removals.frequency(pair)); } - rest.add("multi-edges", Functions.prefix(additions.isEmpty() ? 0 : Functions.max(additions))); + rest.add("multi-edges", Functions.prefix(additions.isEmpty() ? 0 : (long) Functions.max(additions))); rest.add("multi-edges", OnlineModel.storeIntegers(additions)); // * Store the rewiring information