Loading src/main/java/messif/algorithms/impl/MultipleOverlaysAlgorithm.java +4 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,10 @@ public class MultipleOverlaysAlgorithm extends Algorithm implements NavigationDi return algorithms.size(); } public Algorithm getAlgorithm(int i) { return algorithms.get(i); } /** * Returns all the currently encapsulated algorithms. * @return all the currently encapsulated algorithms Loading src/main/java/messif/objects/PrecomputedDistancesFixedArrayFilter.java +2 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ public class PrecomputedDistancesFixedArrayFilter extends PrecomputedDistancesFi @Override protected void writeData(OutputStream stream) throws IOException { if (precompDist == null) return; for (int i = 0; i < precompDist.length; i++) { if (i > 0) stream.write(' '); Loading src/main/java/messif/objects/util/RankedSortedMultiCollection.java +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.NoSuchElementException; import messif.utility.SortedCollection; /** Loading Loading @@ -188,4 +189,12 @@ public class RankedSortedMultiCollection extends RankedSortedCollection implemen public int getSublistCount() { return sublists.length; } public float getThresholdDistance(int subListIndex) { return sublists[subListIndex].getThresholdDistance(); } public float getLastDistance(int subListIndex) throws NoSuchElementException { return sublists[subListIndex].getLastDistance(); } } src/main/java/messif/operations/query/ApproxKNNQueryOperation.java +2 −2 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ public class ApproxKNNQueryOperation extends KNNQueryOperation implements Approx * @param localSearchType type of the local search parameter * @param radiusGuaranteed radius within which the answer is required to be guaranteed as correct */ @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(-1 to switch off)"}) @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(use LocalAbstractObject.UNKNOWN_DISTANCE to switch off)"}) public ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, int localSearchParam, LocalSearchType localSearchType, float radiusGuaranteed) { super(queryObject, k); this.localSearchParam = localSearchParam; Loading @@ -108,7 +108,7 @@ public class ApproxKNNQueryOperation extends KNNQueryOperation implements Approx * @param localSearchType type of the local search parameter * @param radiusGuaranteed radius within which the answer is required to be guaranteed as correct */ @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Answer type", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(-1 to switch off)"}) @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Answer type", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(use LocalAbstractObject.UNKNOWN_DISTANCE to switch off)"}) public ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, AnswerType answerType, int localSearchParam, LocalSearchType localSearchType, float radiusGuaranteed) { super(queryObject, k, answerType); this.localSearchParam = localSearchParam; Loading src/main/java/messif/pivotselection/KMeansPivotChooser.java +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class KMeansPivotChooser extends AbstractPivotChooser { } public List<AbstractObjectList<LocalAbstractObject>> getClusters() { return actualClusters; return resultingPartitioning; } /** Loading Loading @@ -119,7 +119,7 @@ public class KMeansPivotChooser extends AbstractPivotChooser { System.err.print("Running "+nIterations+"th iteration of "); System.err.println((useKmeansForCenters) ? "k-means" : "k-medoids"); // Compute data partitioning and report cluster sizes actualClusters = getPartitioning(objectList, pivots, "initial"); List<AbstractObjectList<LocalAbstractObject>> actualClusters = getPartitioning(objectList, pivots, "initial"); System.err.println(" Selecting clustroids..."); // now calculate the new pivots for the new clusters Loading Loading
src/main/java/messif/algorithms/impl/MultipleOverlaysAlgorithm.java +4 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,10 @@ public class MultipleOverlaysAlgorithm extends Algorithm implements NavigationDi return algorithms.size(); } public Algorithm getAlgorithm(int i) { return algorithms.get(i); } /** * Returns all the currently encapsulated algorithms. * @return all the currently encapsulated algorithms Loading
src/main/java/messif/objects/PrecomputedDistancesFixedArrayFilter.java +2 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ public class PrecomputedDistancesFixedArrayFilter extends PrecomputedDistancesFi @Override protected void writeData(OutputStream stream) throws IOException { if (precompDist == null) return; for (int i = 0; i < precompDist.length; i++) { if (i > 0) stream.write(' '); Loading
src/main/java/messif/objects/util/RankedSortedMultiCollection.java +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.NoSuchElementException; import messif.utility.SortedCollection; /** Loading Loading @@ -188,4 +189,12 @@ public class RankedSortedMultiCollection extends RankedSortedCollection implemen public int getSublistCount() { return sublists.length; } public float getThresholdDistance(int subListIndex) { return sublists[subListIndex].getThresholdDistance(); } public float getLastDistance(int subListIndex) throws NoSuchElementException { return sublists[subListIndex].getLastDistance(); } }
src/main/java/messif/operations/query/ApproxKNNQueryOperation.java +2 −2 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ public class ApproxKNNQueryOperation extends KNNQueryOperation implements Approx * @param localSearchType type of the local search parameter * @param radiusGuaranteed radius within which the answer is required to be guaranteed as correct */ @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(-1 to switch off)"}) @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(use LocalAbstractObject.UNKNOWN_DISTANCE to switch off)"}) public ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, int localSearchParam, LocalSearchType localSearchType, float radiusGuaranteed) { super(queryObject, k); this.localSearchParam = localSearchParam; Loading @@ -108,7 +108,7 @@ public class ApproxKNNQueryOperation extends KNNQueryOperation implements Approx * @param localSearchType type of the local search parameter * @param radiusGuaranteed radius within which the answer is required to be guaranteed as correct */ @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Answer type", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(-1 to switch off)"}) @AbstractOperation.OperationConstructor({"Query object", "Number of nearest objects", "Answer type", "Local search param", "Type of <br/>local search param", "guaranteed radius <br/>(use LocalAbstractObject.UNKNOWN_DISTANCE to switch off)"}) public ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, AnswerType answerType, int localSearchParam, LocalSearchType localSearchType, float radiusGuaranteed) { super(queryObject, k, answerType); this.localSearchParam = localSearchParam; Loading
src/main/java/messif/pivotselection/KMeansPivotChooser.java +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class KMeansPivotChooser extends AbstractPivotChooser { } public List<AbstractObjectList<LocalAbstractObject>> getClusters() { return actualClusters; return resultingPartitioning; } /** Loading Loading @@ -119,7 +119,7 @@ public class KMeansPivotChooser extends AbstractPivotChooser { System.err.print("Running "+nIterations+"th iteration of "); System.err.println((useKmeansForCenters) ? "k-means" : "k-medoids"); // Compute data partitioning and report cluster sizes actualClusters = getPartitioning(objectList, pivots, "initial"); List<AbstractObjectList<LocalAbstractObject>> actualClusters = getPartitioning(objectList, pivots, "initial"); System.err.println(" Selecting clustroids..."); // now calculate the new pivots for the new clusters Loading