id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
63,400
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/internal/EvaluateConcordantPairs.java
EvaluateConcordantPairs.computeTau
@Reference(authors = "F. J. Rohlf", title = "Methods of comparing classifications", // booktitle = "Annual Review of Ecology and Systematics", // url = "https://doi.org/10.1146/annurev.es.05.110174.000533", // bibkey = "doi:10.1146/annurev.es.05.110174.000533") public double computeTau(long c, long ...
java
@Reference(authors = "F. J. Rohlf", title = "Methods of comparing classifications", // booktitle = "Annual Review of Ecology and Systematics", // url = "https://doi.org/10.1146/annurev.es.05.110174.000533", // bibkey = "doi:10.1146/annurev.es.05.110174.000533") public double computeTau(long c, long ...
[ "@", "Reference", "(", "authors", "=", "\"F. J. Rohlf\"", ",", "title", "=", "\"Methods of comparing classifications\"", ",", "//", "booktitle", "=", "\"Annual Review of Ecology and Systematics\"", ",", "//", "url", "=", "\"https://doi.org/10.1146/annurev.es.05.110174.000533\""...
Compute the Tau correlation measure @param c Concordant pairs @param d Discordant pairs @param m Total number of pairs @param wd Number of within distances @param bd Number of between distances @return Gamma plus statistic
[ "Compute", "the", "Tau", "correlation", "measure" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/internal/EvaluateConcordantPairs.java#L280-L288
63,401
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/application/internal/CheckELKIServices.java
CheckELKIServices.checkServices
public void checkServices(String update) { TreeSet<String> props = new TreeSet<>(); Enumeration<URL> us; try { us = getClass().getClassLoader().getResources(ELKIServiceLoader.RESOURCE_PREFIX); } catch(IOException e) { throw new AbortException("Error enumerating service folders.", e); ...
java
public void checkServices(String update) { TreeSet<String> props = new TreeSet<>(); Enumeration<URL> us; try { us = getClass().getClassLoader().getResources(ELKIServiceLoader.RESOURCE_PREFIX); } catch(IOException e) { throw new AbortException("Error enumerating service folders.", e); ...
[ "public", "void", "checkServices", "(", "String", "update", ")", "{", "TreeSet", "<", "String", ">", "props", "=", "new", "TreeSet", "<>", "(", ")", ";", "Enumeration", "<", "URL", ">", "us", ";", "try", "{", "us", "=", "getClass", "(", ")", ".", "...
Retrieve all properties and check them. @param update Folder to update service files in
[ "Retrieve", "all", "properties", "and", "check", "them", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/application/internal/CheckELKIServices.java#L96-L139
63,402
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/application/internal/CheckELKIServices.java
CheckELKIServices.checkAliases
@SuppressWarnings("unchecked") private void checkAliases(Class<?> parent, String classname, String[] parts) { Class<?> c = ELKIServiceRegistry.findImplementation((Class<Object>) parent, classname); if(c == null) { return; } Alias ann = c.getAnnotation(Alias.class); if(ann == null) { if...
java
@SuppressWarnings("unchecked") private void checkAliases(Class<?> parent, String classname, String[] parts) { Class<?> c = ELKIServiceRegistry.findImplementation((Class<Object>) parent, classname); if(c == null) { return; } Alias ann = c.getAnnotation(Alias.class); if(ann == null) { if...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "checkAliases", "(", "Class", "<", "?", ">", "parent", ",", "String", "classname", ",", "String", "[", "]", "parts", ")", "{", "Class", "<", "?", ">", "c", "=", "ELKIServiceRegistry", ...
Check if aliases are listed completely. @param parent Parent class @param classname Class name @param parts Splitted sevice line
[ "Check", "if", "aliases", "are", "listed", "completely", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/application/internal/CheckELKIServices.java#L230-L278
63,403
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java
CorrelationAnalysisSolution.getNormalizedLinearEquationSystem
public LinearEquationSystem getNormalizedLinearEquationSystem(Normalization<?> normalization) throws NonNumericFeaturesException { if(normalization != null) { LinearEquationSystem lq = normalization.transform(linearEquationSystem); lq.solveByTotalPivotSearch(); return lq; } else { re...
java
public LinearEquationSystem getNormalizedLinearEquationSystem(Normalization<?> normalization) throws NonNumericFeaturesException { if(normalization != null) { LinearEquationSystem lq = normalization.transform(linearEquationSystem); lq.solveByTotalPivotSearch(); return lq; } else { re...
[ "public", "LinearEquationSystem", "getNormalizedLinearEquationSystem", "(", "Normalization", "<", "?", ">", "normalization", ")", "throws", "NonNumericFeaturesException", "{", "if", "(", "normalization", "!=", "null", ")", "{", "LinearEquationSystem", "lq", "=", "normal...
Returns the linear equation system for printing purposes. If normalization is null the linear equation system is returned, otherwise the linear equation system will be transformed according to the normalization. @param normalization the normalization, can be null @return the linear equation system for printing purpose...
[ "Returns", "the", "linear", "equation", "system", "for", "printing", "purposes", ".", "If", "normalization", "is", "null", "the", "linear", "equation", "system", "is", "returned", "otherwise", "the", "linear", "equation", "system", "will", "be", "transformed", "...
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java#L163-L172
63,404
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java
CorrelationAnalysisSolution.squaredDistance
public double squaredDistance(V p) { // V_affin = V + a // dist(p, V_affin) = d(p-a, V) = ||p - a - proj_V(p-a) || double[] p_minus_a = minusEquals(p.toArray(), centroid); return squareSum(minusEquals(p_minus_a, times(strongEigenvectors, transposeTimes(strongEigenvectors, p_minus_a)))); }
java
public double squaredDistance(V p) { // V_affin = V + a // dist(p, V_affin) = d(p-a, V) = ||p - a - proj_V(p-a) || double[] p_minus_a = minusEquals(p.toArray(), centroid); return squareSum(minusEquals(p_minus_a, times(strongEigenvectors, transposeTimes(strongEigenvectors, p_minus_a)))); }
[ "public", "double", "squaredDistance", "(", "V", "p", ")", "{", "// V_affin = V + a", "// dist(p, V_affin) = d(p-a, V) = ||p - a - proj_V(p-a) ||", "double", "[", "]", "p_minus_a", "=", "minusEquals", "(", "p", ".", "toArray", "(", ")", ",", "centroid", ")", ";", ...
Returns the distance of NumberVector p from the hyperplane underlying this solution. @param p a vector in the space underlying this solution @return the distance of p from the hyperplane underlying this solution
[ "Returns", "the", "distance", "of", "NumberVector", "p", "from", "the", "hyperplane", "underlying", "this", "solution", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java#L190-L195
63,405
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java
CorrelationAnalysisSolution.errorVector
public double[] errorVector(V p) { return weakEigenvectors.length > 0 ? times(weakEigenvectors, transposeTimes(weakEigenvectors, minusEquals(p.toArray(), centroid))) : EMPTY_VECTOR; }
java
public double[] errorVector(V p) { return weakEigenvectors.length > 0 ? times(weakEigenvectors, transposeTimes(weakEigenvectors, minusEquals(p.toArray(), centroid))) : EMPTY_VECTOR; }
[ "public", "double", "[", "]", "errorVector", "(", "V", "p", ")", "{", "return", "weakEigenvectors", ".", "length", ">", "0", "?", "times", "(", "weakEigenvectors", ",", "transposeTimes", "(", "weakEigenvectors", ",", "minusEquals", "(", "p", ".", "toArray", ...
Returns the error vectors after projection. @param p a vector in the space underlying this solution @return the error vectors
[ "Returns", "the", "error", "vectors", "after", "projection", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java#L203-L205
63,406
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java
CorrelationAnalysisSolution.dataVector
public double[] dataVector(V p) { return strongEigenvectors.length > 0 ? times(strongEigenvectors, transposeTimes(strongEigenvectors, minusEquals(p.toArray(), centroid))) : EMPTY_VECTOR; }
java
public double[] dataVector(V p) { return strongEigenvectors.length > 0 ? times(strongEigenvectors, transposeTimes(strongEigenvectors, minusEquals(p.toArray(), centroid))) : EMPTY_VECTOR; }
[ "public", "double", "[", "]", "dataVector", "(", "V", "p", ")", "{", "return", "strongEigenvectors", ".", "length", ">", "0", "?", "times", "(", "strongEigenvectors", ",", "transposeTimes", "(", "strongEigenvectors", ",", "minusEquals", "(", "p", ".", "toArr...
Returns the data vectors after projection. @param p a vector in the space underlying this solution @return the error vectors
[ "Returns", "the", "data", "vectors", "after", "projection", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java#L213-L215
63,407
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java
CorrelationAnalysisSolution.writeToText
@Override public void writeToText(TextWriterStream out, String label) { if(label != null) { out.commentPrintLn(label); } out.commentPrintLn("Model class: " + this.getClass().getName()); try { if(getNormalizedLinearEquationSystem(null) != null) { // TODO: more elegant way of doing n...
java
@Override public void writeToText(TextWriterStream out, String label) { if(label != null) { out.commentPrintLn(label); } out.commentPrintLn("Model class: " + this.getClass().getName()); try { if(getNormalizedLinearEquationSystem(null) != null) { // TODO: more elegant way of doing n...
[ "@", "Override", "public", "void", "writeToText", "(", "TextWriterStream", "out", ",", "String", "label", ")", "{", "if", "(", "label", "!=", "null", ")", "{", "out", ".", "commentPrintLn", "(", "label", ")", ";", "}", "out", ".", "commentPrintLn", "(", ...
Text output of the equation system
[ "Text", "output", "of", "the", "equation", "system" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/data/model/CorrelationAnalysisSolution.java#L266-L292
63,408
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractStaticHistogram.java
AbstractStaticHistogram.getBinNr
protected int getBinNr(double coord) { if (Double.isInfinite(coord) || Double.isNaN(coord)) { throw new UnsupportedOperationException("Encountered non-finite value in Histogram: " + coord); } if (coord == max) { // System.err.println("Triggered special case: "+ (Math.floor((coord - // base...
java
protected int getBinNr(double coord) { if (Double.isInfinite(coord) || Double.isNaN(coord)) { throw new UnsupportedOperationException("Encountered non-finite value in Histogram: " + coord); } if (coord == max) { // System.err.println("Triggered special case: "+ (Math.floor((coord - // base...
[ "protected", "int", "getBinNr", "(", "double", "coord", ")", "{", "if", "(", "Double", ".", "isInfinite", "(", "coord", ")", "||", "Double", ".", "isNaN", "(", "coord", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Encountered non-f...
Compute the bin number. Has a special case for rounding max down to the last bin. @param coord Coordinate @return bin number
[ "Compute", "the", "bin", "number", ".", "Has", "a", "special", "case", "for", "rounding", "max", "down", "to", "the", "last", "bin", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractStaticHistogram.java#L79-L89
63,409
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractStaticHistogram.java
AbstractStaticHistogram.growSize
protected static int growSize(int current, int requiredSize) { // Double until 64, then increase by 50% each time. int newCapacity = ((current < 64) ? ((current + 1) << 1) : ((current >> 1) * 3)); // overflow? if (newCapacity < 0) { throw new OutOfMemoryError(); } if (requiredSize > newCap...
java
protected static int growSize(int current, int requiredSize) { // Double until 64, then increase by 50% each time. int newCapacity = ((current < 64) ? ((current + 1) << 1) : ((current >> 1) * 3)); // overflow? if (newCapacity < 0) { throw new OutOfMemoryError(); } if (requiredSize > newCap...
[ "protected", "static", "int", "growSize", "(", "int", "current", ",", "int", "requiredSize", ")", "{", "// Double until 64, then increase by 50% each time.", "int", "newCapacity", "=", "(", "(", "current", "<", "64", ")", "?", "(", "(", "current", "+", "1", ")...
Compute the size to grow to. @param current Current size @param requiredSize Required size @return Size to allocate
[ "Compute", "the", "size", "to", "grow", "to", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractStaticHistogram.java#L98-L109
63,410
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.expandNodes
private void expandNodes(DeLiCluTree index, SpatialPrimitiveDistanceFunction<V> distFunction, SpatialObjectPair nodePair, DataStore<KNNList> knns) { DeLiCluNode node1 = index.getNode(((SpatialDirectoryEntry) nodePair.entry1).getPageID()); DeLiCluNode node2 = index.getNode(((SpatialDirectoryEntry) nodePair.entry...
java
private void expandNodes(DeLiCluTree index, SpatialPrimitiveDistanceFunction<V> distFunction, SpatialObjectPair nodePair, DataStore<KNNList> knns) { DeLiCluNode node1 = index.getNode(((SpatialDirectoryEntry) nodePair.entry1).getPageID()); DeLiCluNode node2 = index.getNode(((SpatialDirectoryEntry) nodePair.entry...
[ "private", "void", "expandNodes", "(", "DeLiCluTree", "index", ",", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "SpatialObjectPair", "nodePair", ",", "DataStore", "<", "KNNList", ">", "knns", ")", "{", "DeLiCluNode", "node1", "=", "inde...
Expands the spatial nodes of the specified pair. @param index the index storing the objects @param distFunction the spatial distance function of this algorithm @param nodePair the pair of nodes to be expanded @param knns the knn list
[ "Expands", "the", "spatial", "nodes", "of", "the", "specified", "pair", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L209-L221
63,411
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.expandDirNodes
private void expandDirNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandDirNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries(); int numEntries_2 = no...
java
private void expandDirNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandDirNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries(); int numEntries_2 = no...
[ "private", "void", "expandDirNodes", "(", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "DeLiCluNode", "node1", ",", "DeLiCluNode", "node2", ")", "{", "if", "(", "LOG", ".", "isDebuggingFinest", "(", ")", ")", "{", "LOG", ".", "debugF...
Expands the specified directory nodes. @param distFunction the spatial distance function of this algorithm @param node1 the first node @param node2 the second node
[ "Expands", "the", "specified", "directory", "nodes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L230-L254
63,412
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.expandLeafNodes
private void expandLeafNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2, DataStore<KNNList> knns) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandLeafNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries()...
java
private void expandLeafNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2, DataStore<KNNList> knns) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandLeafNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries()...
[ "private", "void", "expandLeafNodes", "(", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "DeLiCluNode", "node1", ",", "DeLiCluNode", "node2", ",", "DataStore", "<", "KNNList", ">", "knns", ")", "{", "if", "(", "LOG", ".", "isDebuggingFi...
Expands the specified leaf nodes. @param distFunction the spatial distance function of this algorithm @param node1 the first node @param node2 the second node @param knns the knn list
[ "Expands", "the", "specified", "leaf", "nodes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L264-L289
63,413
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.reinsertExpanded
private void reinsertExpanded(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluTree index, IndexTreePath<DeLiCluEntry> path, DataStore<KNNList> knns) { int l = 0; // Count the number of components. for(IndexTreePath<DeLiCluEntry> it = path; it != null; it = it.getParentPath()) { l++; } Arr...
java
private void reinsertExpanded(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluTree index, IndexTreePath<DeLiCluEntry> path, DataStore<KNNList> knns) { int l = 0; // Count the number of components. for(IndexTreePath<DeLiCluEntry> it = path; it != null; it = it.getParentPath()) { l++; } Arr...
[ "private", "void", "reinsertExpanded", "(", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "DeLiCluTree", "index", ",", "IndexTreePath", "<", "DeLiCluEntry", ">", "path", ",", "DataStore", "<", "KNNList", ">", "knns", ")", "{", "int", "l...
Reinserts the objects of the already expanded nodes. @param distFunction the spatial distance function of this algorithm @param index the index storing the objects @param path the path of the object inserted last @param knns the knn list
[ "Reinserts", "the", "objects", "of", "the", "already", "expanded", "nodes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L299-L313
63,414
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.assertSameDimensionality
public static int assertSameDimensionality(SpatialComparable box1, SpatialComparable box2) { final int dim = box1.getDimensionality(); if(dim != box2.getDimensionality()) { throw new IllegalArgumentException("The spatial objects do not have the same dimensionality!"); } return dim; }
java
public static int assertSameDimensionality(SpatialComparable box1, SpatialComparable box2) { final int dim = box1.getDimensionality(); if(dim != box2.getDimensionality()) { throw new IllegalArgumentException("The spatial objects do not have the same dimensionality!"); } return dim; }
[ "public", "static", "int", "assertSameDimensionality", "(", "SpatialComparable", "box1", ",", "SpatialComparable", "box2", ")", "{", "final", "int", "dim", "=", "box1", ".", "getDimensionality", "(", ")", ";", "if", "(", "dim", "!=", "box2", ".", "getDimension...
Check that two spatial objects have the same dimensionality. @param box1 First object @param box2 Second object @return Dimensionality @throws IllegalArgumentException when the dimensionalities do not agree
[ "Check", "that", "two", "spatial", "objects", "have", "the", "same", "dimensionality", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L55-L61
63,415
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.getMin
public static double[] getMin(SpatialComparable box) { final int dim = box.getDimensionality(); double[] min = new double[dim]; for(int i = 0; i < dim; i++) { min[i] = box.getMin(i); } return min; }
java
public static double[] getMin(SpatialComparable box) { final int dim = box.getDimensionality(); double[] min = new double[dim]; for(int i = 0; i < dim; i++) { min[i] = box.getMin(i); } return min; }
[ "public", "static", "double", "[", "]", "getMin", "(", "SpatialComparable", "box", ")", "{", "final", "int", "dim", "=", "box", ".", "getDimensionality", "(", ")", ";", "double", "[", "]", "min", "=", "new", "double", "[", "dim", "]", ";", "for", "("...
Returns a clone of the minimum hyper point. @param box spatial object @return the minimum hyper point
[ "Returns", "a", "clone", "of", "the", "minimum", "hyper", "point", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L69-L76
63,416
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.getMax
public static double[] getMax(SpatialComparable box) { final int dim = box.getDimensionality(); double[] max = new double[dim]; for(int i = 0; i < dim; i++) { max[i] = box.getMax(i); } return max; }
java
public static double[] getMax(SpatialComparable box) { final int dim = box.getDimensionality(); double[] max = new double[dim]; for(int i = 0; i < dim; i++) { max[i] = box.getMax(i); } return max; }
[ "public", "static", "double", "[", "]", "getMax", "(", "SpatialComparable", "box", ")", "{", "final", "int", "dim", "=", "box", ".", "getDimensionality", "(", ")", ";", "double", "[", "]", "max", "=", "new", "double", "[", "dim", "]", ";", "for", "("...
Returns a clone of the maximum hyper point. @param box spatial object @return the maximum hyper point
[ "Returns", "a", "clone", "of", "the", "maximum", "hyper", "point", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L84-L91
63,417
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.intersects
public static boolean intersects(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); for(int i = 0; i < dim; i++) { if(box2.getMax(i) < box1.getMin(i) || box1.getMax(i) < box2.getMin(i)) { return false; } } return true; }
java
public static boolean intersects(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); for(int i = 0; i < dim; i++) { if(box2.getMax(i) < box1.getMin(i) || box1.getMax(i) < box2.getMin(i)) { return false; } } return true; }
[ "public", "static", "boolean", "intersects", "(", "SpatialComparable", "box1", ",", "SpatialComparable", "box2", ")", "{", "final", "int", "dim", "=", "assertSameDimensionality", "(", "box1", ",", "box2", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i...
Returns true if the two SpatialComparables intersect, false otherwise. @param box1 the first SpatialComparable @param box2 the first SpatialComparable @return true if the SpatialComparables intersect, false otherwise
[ "Returns", "true", "if", "the", "two", "SpatialComparables", "intersect", "false", "otherwise", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L100-L108
63,418
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.contains
public static boolean contains(SpatialComparable box, double[] point) { final int dim = box.getDimensionality(); if(dim != point.length) { throw new IllegalArgumentException("This HyperBoundingBox and the given point need same dimensionality"); } for(int i = 0; i < dim; i++) { if(box.getMin...
java
public static boolean contains(SpatialComparable box, double[] point) { final int dim = box.getDimensionality(); if(dim != point.length) { throw new IllegalArgumentException("This HyperBoundingBox and the given point need same dimensionality"); } for(int i = 0; i < dim; i++) { if(box.getMin...
[ "public", "static", "boolean", "contains", "(", "SpatialComparable", "box", ",", "double", "[", "]", "point", ")", "{", "final", "int", "dim", "=", "box", ".", "getDimensionality", "(", ")", ";", "if", "(", "dim", "!=", "point", ".", "length", ")", "{"...
Returns true if this SpatialComparable contains the given point, false otherwise. @param box spatial object @param point the point to be tested for containment @return true if this SpatialComparable contains the given point, false otherwise
[ "Returns", "true", "if", "this", "SpatialComparable", "contains", "the", "given", "point", "false", "otherwise", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L138-L150
63,419
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.enlargement
public static double enlargement(SpatialComparable exist, SpatialComparable addit) { final int dim = assertSameDimensionality(exist, addit); double v1 = 1.; double v2 = 1.; for(int i = 0; i < dim; i++) { final double emin = exist.getMin(i); final double emax = exist.getMax(i); final do...
java
public static double enlargement(SpatialComparable exist, SpatialComparable addit) { final int dim = assertSameDimensionality(exist, addit); double v1 = 1.; double v2 = 1.; for(int i = 0; i < dim; i++) { final double emin = exist.getMin(i); final double emax = exist.getMax(i); final do...
[ "public", "static", "double", "enlargement", "(", "SpatialComparable", "exist", ",", "SpatialComparable", "addit", ")", "{", "final", "int", "dim", "=", "assertSameDimensionality", "(", "exist", ",", "addit", ")", ";", "double", "v1", "=", "1.", ";", "double",...
Compute the enlargement obtained by adding an object to an existing object. @param exist Existing rectangle @param addit Additional rectangle @return Enlargement factor
[ "Compute", "the", "enlargement", "obtained", "by", "adding", "an", "object", "to", "an", "existing", "object", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L235-L251
63,420
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.perimeter
public static double perimeter(SpatialComparable box) { final int dim = box.getDimensionality(); double perimeter = 0.; for(int i = 0; i < dim; i++) { perimeter += box.getMax(i) - box.getMin(i); } return perimeter; }
java
public static double perimeter(SpatialComparable box) { final int dim = box.getDimensionality(); double perimeter = 0.; for(int i = 0; i < dim; i++) { perimeter += box.getMax(i) - box.getMin(i); } return perimeter; }
[ "public", "static", "double", "perimeter", "(", "SpatialComparable", "box", ")", "{", "final", "int", "dim", "=", "box", ".", "getDimensionality", "(", ")", ";", "double", "perimeter", "=", "0.", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Computes the perimeter of this SpatialComparable. @param box spatial object @return the perimeter of this SpatialComparable
[ "Computes", "the", "perimeter", "of", "this", "SpatialComparable", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L285-L292
63,421
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.overlap
public static double overlap(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); // the maximal and minimal value of the overlap box. double omax, omin; // the overlap volume double overlap = 1.; for(int i = 0; i < dim; i++) { // The m...
java
public static double overlap(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); // the maximal and minimal value of the overlap box. double omax, omin; // the overlap volume double overlap = 1.; for(int i = 0; i < dim; i++) { // The m...
[ "public", "static", "double", "overlap", "(", "SpatialComparable", "box1", ",", "SpatialComparable", "box2", ")", "{", "final", "int", "dim", "=", "assertSameDimensionality", "(", "box1", ",", "box2", ")", ";", "// the maximal and minimal value of the overlap box.", "...
Computes the volume of the overlapping box between two SpatialComparables. @param box1 the first SpatialComparable @param box2 the second SpatialComparable @return the overlap volume.
[ "Computes", "the", "volume", "of", "the", "overlapping", "box", "between", "two", "SpatialComparables", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L301-L326
63,422
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.relativeOverlap
public static double relativeOverlap(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); // the overlap volume double overlap = 1.; double vol1 = 1.; double vol2 = 1.; for(int i = 0; i < dim; i++) { final double box1min = box1.getMin(i)...
java
public static double relativeOverlap(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); // the overlap volume double overlap = 1.; double vol1 = 1.; double vol2 = 1.; for(int i = 0; i < dim; i++) { final double box1min = box1.getMin(i)...
[ "public", "static", "double", "relativeOverlap", "(", "SpatialComparable", "box1", ",", "SpatialComparable", "box2", ")", "{", "final", "int", "dim", "=", "assertSameDimensionality", "(", "box1", ",", "box2", ")", ";", "// the overlap volume", "double", "overlap", ...
Computes the volume of the overlapping box between two SpatialComparables and return the relation between the volume of the overlapping box and the volume of both SpatialComparable. @param box1 the first SpatialComparable @param box2 the second SpatialComparable @return the overlap volume in relation to the singular v...
[ "Computes", "the", "volume", "of", "the", "overlapping", "box", "between", "two", "SpatialComparables", "and", "return", "the", "relation", "between", "the", "volume", "of", "the", "overlapping", "box", "and", "the", "volume", "of", "both", "SpatialComparable", ...
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L337-L365
63,423
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.unionTolerant
public static ModifiableHyperBoundingBox unionTolerant(SpatialComparable mbr1, SpatialComparable mbr2) { if(mbr1 == null && mbr2 == null) { return null; } if(mbr1 == null) { // Clone - intentionally return new ModifiableHyperBoundingBox(mbr2); } if(mbr2 == null) { // Clone - ...
java
public static ModifiableHyperBoundingBox unionTolerant(SpatialComparable mbr1, SpatialComparable mbr2) { if(mbr1 == null && mbr2 == null) { return null; } if(mbr1 == null) { // Clone - intentionally return new ModifiableHyperBoundingBox(mbr2); } if(mbr2 == null) { // Clone - ...
[ "public", "static", "ModifiableHyperBoundingBox", "unionTolerant", "(", "SpatialComparable", "mbr1", ",", "SpatialComparable", "mbr2", ")", "{", "if", "(", "mbr1", "==", "null", "&&", "mbr2", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "mb...
Returns the union of the two specified MBRs. Tolerant of "null" values. @param mbr1 the first MBR @param mbr2 the second MBR @return the union of the two specified MBRs
[ "Returns", "the", "union", "of", "the", "two", "specified", "MBRs", ".", "Tolerant", "of", "null", "values", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L395-L408
63,424
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.centroid
public static double[] centroid(SpatialComparable obj) { final int dim = obj.getDimensionality(); double[] centroid = new double[dim]; for(int d = 0; d < dim; d++) { centroid[d] = (obj.getMax(d) + obj.getMin(d)) * .5; } return centroid; }
java
public static double[] centroid(SpatialComparable obj) { final int dim = obj.getDimensionality(); double[] centroid = new double[dim]; for(int d = 0; d < dim; d++) { centroid[d] = (obj.getMax(d) + obj.getMin(d)) * .5; } return centroid; }
[ "public", "static", "double", "[", "]", "centroid", "(", "SpatialComparable", "obj", ")", "{", "final", "int", "dim", "=", "obj", ".", "getDimensionality", "(", ")", ";", "double", "[", "]", "centroid", "=", "new", "double", "[", "dim", "]", ";", "for"...
Returns the centroid of this SpatialComparable. @param obj Spatial object to process @return the centroid of this SpatialComparable
[ "Returns", "the", "centroid", "of", "this", "SpatialComparable", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L475-L482
63,425
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/scaling/LinearScaling.java
LinearScaling.fromMinMax
public static LinearScaling fromMinMax(double min, double max) { double zoom = 1.0 / (max - min); return new LinearScaling(zoom, -min * zoom); }
java
public static LinearScaling fromMinMax(double min, double max) { double zoom = 1.0 / (max - min); return new LinearScaling(zoom, -min * zoom); }
[ "public", "static", "LinearScaling", "fromMinMax", "(", "double", "min", ",", "double", "max", ")", "{", "double", "zoom", "=", "1.0", "/", "(", "max", "-", "min", ")", ";", "return", "new", "LinearScaling", "(", "zoom", ",", "-", "min", "*", "zoom", ...
Make a linear scaling from a given minimum and maximum. The minimum will be mapped to zero, the maximum to one. @param min Minimum @param max Maximum @return New linear scaling.
[ "Make", "a", "linear", "scaling", "from", "a", "given", "minimum", "and", "maximum", ".", "The", "minimum", "will", "be", "mapped", "to", "zero", "the", "maximum", "to", "one", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/scaling/LinearScaling.java#L102-L105
63,426
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/PairCounting.java
PairCounting.fMeasure
public double fMeasure(double beta) { final double beta2 = beta * beta; double fmeasure = ((1 + beta2) * pairconfuse[0]) / ((1 + beta2) * pairconfuse[0] + beta2 * pairconfuse[1] + pairconfuse[2]); return fmeasure; }
java
public double fMeasure(double beta) { final double beta2 = beta * beta; double fmeasure = ((1 + beta2) * pairconfuse[0]) / ((1 + beta2) * pairconfuse[0] + beta2 * pairconfuse[1] + pairconfuse[2]); return fmeasure; }
[ "public", "double", "fMeasure", "(", "double", "beta", ")", "{", "final", "double", "beta2", "=", "beta", "*", "beta", ";", "double", "fmeasure", "=", "(", "(", "1", "+", "beta2", ")", "*", "pairconfuse", "[", "0", "]", ")", "/", "(", "(", "1", "...
Get the pair-counting F-Measure @param beta Beta value. @return F-Measure
[ "Get", "the", "pair", "-", "counting", "F", "-", "Measure" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/PairCounting.java#L118-L122
63,427
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/writers/TextWriterObjectComment.java
TextWriterObjectComment.write
@Override public void write(TextWriterStream out, String label, Object object) { StringBuilder buf = new StringBuilder(100); if(label != null) { buf.append(label).append('='); } if(object != null) { buf.append(object.toString()); } out.commentPrintLn(buf); }
java
@Override public void write(TextWriterStream out, String label, Object object) { StringBuilder buf = new StringBuilder(100); if(label != null) { buf.append(label).append('='); } if(object != null) { buf.append(object.toString()); } out.commentPrintLn(buf); }
[ "@", "Override", "public", "void", "write", "(", "TextWriterStream", "out", ",", "String", "label", ",", "Object", "object", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "100", ")", ";", "if", "(", "label", "!=", "null", ")", "{", ...
Put an object into the comment section
[ "Put", "an", "object", "into", "the", "comment", "section" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/writers/TextWriterObjectComment.java#L37-L47
63,428
elki-project/elki
elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/transform/ClassicMultidimensionalScalingTransform.java
ClassicMultidimensionalScalingTransform.computeSquaredDistanceMatrix
protected static <I> double[][] computeSquaredDistanceMatrix(final List<I> col, PrimitiveDistanceFunction<? super I> dist) { final int size = col.size(); double[][] imat = new double[size][size]; boolean squared = dist.isSquared(); FiniteProgress dprog = LOG.isVerbose() ? new FiniteProgress("Computing d...
java
protected static <I> double[][] computeSquaredDistanceMatrix(final List<I> col, PrimitiveDistanceFunction<? super I> dist) { final int size = col.size(); double[][] imat = new double[size][size]; boolean squared = dist.isSquared(); FiniteProgress dprog = LOG.isVerbose() ? new FiniteProgress("Computing d...
[ "protected", "static", "<", "I", ">", "double", "[", "]", "[", "]", "computeSquaredDistanceMatrix", "(", "final", "List", "<", "I", ">", "col", ",", "PrimitiveDistanceFunction", "<", "?", "super", "I", ">", "dist", ")", "{", "final", "int", "size", "=", ...
Compute the squared distance matrix. @param col Input data @param dist Distance function @return Distance matrix.
[ "Compute", "the", "squared", "distance", "matrix", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/transform/ClassicMultidimensionalScalingTransform.java#L158-L177
63,429
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/RescaleMetaOutlierAlgorithm.java
RescaleMetaOutlierAlgorithm.getOutlierResult
private OutlierResult getOutlierResult(ResultHierarchy hier, Result result) { List<OutlierResult> ors = ResultUtil.filterResults(hier, result, OutlierResult.class); if(!ors.isEmpty()) { return ors.get(0); } throw new IllegalStateException("Comparison algorithm expected at least one outlier result....
java
private OutlierResult getOutlierResult(ResultHierarchy hier, Result result) { List<OutlierResult> ors = ResultUtil.filterResults(hier, result, OutlierResult.class); if(!ors.isEmpty()) { return ors.get(0); } throw new IllegalStateException("Comparison algorithm expected at least one outlier result....
[ "private", "OutlierResult", "getOutlierResult", "(", "ResultHierarchy", "hier", ",", "Result", "result", ")", "{", "List", "<", "OutlierResult", ">", "ors", "=", "ResultUtil", ".", "filterResults", "(", "hier", ",", "result", ",", "OutlierResult", ".", "class", ...
Find an OutlierResult to work with. @param hier Result hierarchy @param result Result object @return Iterator to work with
[ "Find", "an", "OutlierResult", "to", "work", "with", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/RescaleMetaOutlierAlgorithm.java#L126-L132
63,430
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkapp/MkAppTreeNode.java
MkAppTreeNode.knnDistanceApproximation
protected PolynomialApproximation knnDistanceApproximation() { int p_max = 0; double[] b = null; for(int i = 0; i < getNumEntries(); i++) { MkAppEntry entry = getEntry(i); PolynomialApproximation approximation = entry.getKnnDistanceApproximation(); if(b == null) { p_max = approxima...
java
protected PolynomialApproximation knnDistanceApproximation() { int p_max = 0; double[] b = null; for(int i = 0; i < getNumEntries(); i++) { MkAppEntry entry = getEntry(i); PolynomialApproximation approximation = entry.getKnnDistanceApproximation(); if(b == null) { p_max = approxima...
[ "protected", "PolynomialApproximation", "knnDistanceApproximation", "(", ")", "{", "int", "p_max", "=", "0", ";", "double", "[", "]", "b", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getNumEntries", "(", ")", ";", "i", "++", "...
Determines and returns the polynomial approximation for the knn distances of this node as the maximum of the polynomial approximations of all entries. @return the conservative approximation for the knn distances
[ "Determines", "and", "returns", "the", "polynomial", "approximation", "for", "the", "knn", "distances", "of", "this", "node", "as", "the", "maximum", "of", "the", "polynomial", "approximations", "of", "all", "entries", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkapp/MkAppTreeNode.java#L70-L96
63,431
elki-project/elki
elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/ProxyDatabase.java
ProxyDatabase.setDBIDs
public void setDBIDs(DBIDs ids) { this.idrep.setDBIDs(ids); // Update relations. for (Relation<?> orel : this.relations) { if (orel instanceof ProxyView) { ((ProxyView<?>) orel).setDBIDs(this.idrep.getDBIDs()); } } }
java
public void setDBIDs(DBIDs ids) { this.idrep.setDBIDs(ids); // Update relations. for (Relation<?> orel : this.relations) { if (orel instanceof ProxyView) { ((ProxyView<?>) orel).setDBIDs(this.idrep.getDBIDs()); } } }
[ "public", "void", "setDBIDs", "(", "DBIDs", "ids", ")", "{", "this", ".", "idrep", ".", "setDBIDs", "(", "ids", ")", ";", "// Update relations.", "for", "(", "Relation", "<", "?", ">", "orel", ":", "this", ".", "relations", ")", "{", "if", "(", "orel...
Set the DBIDs to use. @param ids DBIDs to use
[ "Set", "the", "DBIDs", "to", "use", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/ProxyDatabase.java#L122-L130
63,432
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/progress/ProgressTracker.java
ProgressTracker.getProgresses
public synchronized Collection<Progress> getProgresses() { List<Progress> list = new ArrayList<>(progresses.size()); Iterator<WeakReference<Progress>> iter = progresses.iterator(); while(iter.hasNext()) { WeakReference<Progress> ref = iter.next(); if(ref.get() == null) { iter.remove(); ...
java
public synchronized Collection<Progress> getProgresses() { List<Progress> list = new ArrayList<>(progresses.size()); Iterator<WeakReference<Progress>> iter = progresses.iterator(); while(iter.hasNext()) { WeakReference<Progress> ref = iter.next(); if(ref.get() == null) { iter.remove(); ...
[ "public", "synchronized", "Collection", "<", "Progress", ">", "getProgresses", "(", ")", "{", "List", "<", "Progress", ">", "list", "=", "new", "ArrayList", "<>", "(", "progresses", ".", "size", "(", ")", ")", ";", "Iterator", "<", "WeakReference", "<", ...
Get a list of progresses tracked. @return List of progresses.
[ "Get", "a", "list", "of", "progresses", "tracked", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/progress/ProgressTracker.java#L48-L61
63,433
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/progress/ProgressTracker.java
ProgressTracker.addProgress
public synchronized void addProgress(Progress p) { // Don't add more than once. Iterator<WeakReference<Progress>> iter = progresses.iterator(); while(iter.hasNext()) { WeakReference<Progress> ref = iter.next(); // since we are at it anyway, remove old links. if(ref.get() == null) { ...
java
public synchronized void addProgress(Progress p) { // Don't add more than once. Iterator<WeakReference<Progress>> iter = progresses.iterator(); while(iter.hasNext()) { WeakReference<Progress> ref = iter.next(); // since we are at it anyway, remove old links. if(ref.get() == null) { ...
[ "public", "synchronized", "void", "addProgress", "(", "Progress", "p", ")", "{", "// Don't add more than once.", "Iterator", "<", "WeakReference", "<", "Progress", ">>", "iter", "=", "progresses", ".", "iterator", "(", ")", ";", "while", "(", "iter", ".", "has...
Add a new Progress to the tracker. @param p Progress
[ "Add", "a", "new", "Progress", "to", "the", "tracker", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/progress/ProgressTracker.java#L68-L84
63,434
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/deliclu/DeLiCluTreeIndex.java
DeLiCluTreeIndex.setHandled
public synchronized IndexTreePath<DeLiCluEntry> setHandled(DBID id, O obj) { if(LOG.isDebugging()) { LOG.debugFine("setHandled " + id + ", " + obj + "\n"); } // find the leaf node containing o IndexTreePath<DeLiCluEntry> pathToObject = findPathToObject(getRootPath(), obj, id); if(pathToObjec...
java
public synchronized IndexTreePath<DeLiCluEntry> setHandled(DBID id, O obj) { if(LOG.isDebugging()) { LOG.debugFine("setHandled " + id + ", " + obj + "\n"); } // find the leaf node containing o IndexTreePath<DeLiCluEntry> pathToObject = findPathToObject(getRootPath(), obj, id); if(pathToObjec...
[ "public", "synchronized", "IndexTreePath", "<", "DeLiCluEntry", ">", "setHandled", "(", "DBID", "id", ",", "O", "obj", ")", "{", "if", "(", "LOG", ".", "isDebugging", "(", ")", ")", "{", "LOG", ".", "debugFine", "(", "\"setHandled \"", "+", "id", "+", ...
Marks the specified object as handled and returns the path of node ids from the root to the objects's parent. @param id the objects id to be marked as handled @param obj the object to be marked as handled @return the path of node ids from the root to the objects's parent
[ "Marks", "the", "specified", "object", "as", "handled", "and", "returns", "the", "path", "of", "node", "ids", "from", "the", "root", "to", "the", "objects", "s", "parent", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/deliclu/DeLiCluTreeIndex.java#L95-L127
63,435
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/deliclu/DeLiCluTreeIndex.java
DeLiCluTreeIndex.delete
@Override public final boolean delete(DBIDRef id) { // find the leaf node containing o O obj = relation.get(id); IndexTreePath<DeLiCluEntry> deletionPath = findPathToObject(getRootPath(), obj, id); if(deletionPath == null) { return false; } deletePath(deletionPath); return true; }
java
@Override public final boolean delete(DBIDRef id) { // find the leaf node containing o O obj = relation.get(id); IndexTreePath<DeLiCluEntry> deletionPath = findPathToObject(getRootPath(), obj, id); if(deletionPath == null) { return false; } deletePath(deletionPath); return true; }
[ "@", "Override", "public", "final", "boolean", "delete", "(", "DBIDRef", "id", ")", "{", "// find the leaf node containing o", "O", "obj", "=", "relation", ".", "get", "(", "id", ")", ";", "IndexTreePath", "<", "DeLiCluEntry", ">", "deletionPath", "=", "findPa...
Deletes the specified object from this index. @return true if this index did contain the object with the specified id, false otherwise
[ "Deletes", "the", "specified", "object", "from", "this", "index", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/deliclu/DeLiCluTreeIndex.java#L180-L190
63,436
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/application/experiments/EvaluateIntrinsicDimensionalityEstimators.java
EvaluateIntrinsicDimensionalityEstimators.makeSample
protected double[] makeSample(int maxk) { final Random rnd = this.rnd.getSingleThreadedRandom(); double[] dists = new double[maxk + 1]; final double e = 1. / dim; for(int i = 0; i <= maxk; i++) { dists[i] = FastMath.pow(rnd.nextDouble(), e); } Arrays.sort(dists); return dists; }
java
protected double[] makeSample(int maxk) { final Random rnd = this.rnd.getSingleThreadedRandom(); double[] dists = new double[maxk + 1]; final double e = 1. / dim; for(int i = 0; i <= maxk; i++) { dists[i] = FastMath.pow(rnd.nextDouble(), e); } Arrays.sort(dists); return dists; }
[ "protected", "double", "[", "]", "makeSample", "(", "int", "maxk", ")", "{", "final", "Random", "rnd", "=", "this", ".", "rnd", ".", "getSingleThreadedRandom", "(", ")", ";", "double", "[", "]", "dists", "=", "new", "double", "[", "maxk", "+", "1", "...
Generate a data sample. @param maxk Number of entries. @return Data sample
[ "Generate", "a", "data", "sample", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/application/experiments/EvaluateIntrinsicDimensionalityEstimators.java#L194-L203
63,437
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/MTreeDirectoryEntry.java
MTreeDirectoryEntry.setRoutingObjectID
@Override public final boolean setRoutingObjectID(DBID objectID) { if(objectID == routingObjectID || DBIDUtil.equal(objectID, routingObjectID)) { return false; } this.routingObjectID = objectID; return true; }
java
@Override public final boolean setRoutingObjectID(DBID objectID) { if(objectID == routingObjectID || DBIDUtil.equal(objectID, routingObjectID)) { return false; } this.routingObjectID = objectID; return true; }
[ "@", "Override", "public", "final", "boolean", "setRoutingObjectID", "(", "DBID", "objectID", ")", "{", "if", "(", "objectID", "==", "routingObjectID", "||", "DBIDUtil", ".", "equal", "(", "objectID", ",", "routingObjectID", ")", ")", "{", "return", "false", ...
Sets the id of the routing object of this entry. @param objectID the id to be set
[ "Sets", "the", "id", "of", "the", "routing", "object", "of", "this", "entry", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/MTreeDirectoryEntry.java#L136-L143
63,438
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/MTreeDirectoryEntry.java
MTreeDirectoryEntry.writeExternal
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(id); out.writeInt(DBIDUtil.asInteger(routingObjectID)); out.writeDouble(parentDistance); out.writeDouble(coveringRadius); }
java
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(id); out.writeInt(DBIDUtil.asInteger(routingObjectID)); out.writeDouble(parentDistance); out.writeDouble(coveringRadius); }
[ "@", "Override", "public", "void", "writeExternal", "(", "ObjectOutput", "out", ")", "throws", "IOException", "{", "out", ".", "writeInt", "(", "id", ")", ";", "out", ".", "writeInt", "(", "DBIDUtil", ".", "asInteger", "(", "routingObjectID", ")", ")", ";"...
Calls the super method and writes the routingObjectID, the parentDistance and the coveringRadius of this entry to the specified stream.
[ "Calls", "the", "super", "method", "and", "writes", "the", "routingObjectID", "the", "parentDistance", "and", "the", "coveringRadius", "of", "this", "entry", "to", "the", "specified", "stream", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/MTreeDirectoryEntry.java#L175-L181
63,439
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/writers/TextWriterTextWriteable.java
TextWriterTextWriteable.write
@Override public void write(TextWriterStream out, String label, TextWriteable obj) { obj.writeToText(out, label); }
java
@Override public void write(TextWriterStream out, String label, TextWriteable obj) { obj.writeToText(out, label); }
[ "@", "Override", "public", "void", "write", "(", "TextWriterStream", "out", ",", "String", "label", ",", "TextWriteable", "obj", ")", "{", "obj", ".", "writeToText", "(", "out", ",", "label", ")", ";", "}" ]
Use the objects own text serialization.
[ "Use", "the", "objects", "own", "text", "serialization", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/writers/TextWriterTextWriteable.java#L39-L42
63,440
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/EvaluateClustering.java
EvaluateClustering.evaluteResult
protected void evaluteResult(Database db, Clustering<?> c, Clustering<?> refc) { ClusterContingencyTable contmat = new ClusterContingencyTable(selfPairing, noiseSpecialHandling); contmat.process(refc, c); ScoreResult sr = new ScoreResult(contmat); sr.addHeader(c.getLongName()); db.getHierarchy().ad...
java
protected void evaluteResult(Database db, Clustering<?> c, Clustering<?> refc) { ClusterContingencyTable contmat = new ClusterContingencyTable(selfPairing, noiseSpecialHandling); contmat.process(refc, c); ScoreResult sr = new ScoreResult(contmat); sr.addHeader(c.getLongName()); db.getHierarchy().ad...
[ "protected", "void", "evaluteResult", "(", "Database", "db", ",", "Clustering", "<", "?", ">", "c", ",", "Clustering", "<", "?", ">", "refc", ")", "{", "ClusterContingencyTable", "contmat", "=", "new", "ClusterContingencyTable", "(", "selfPairing", ",", "noise...
Evaluate a clustering result. @param db Database @param c Clustering @param refc Reference clustering
[ "Evaluate", "a", "clustering", "result", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/EvaluateClustering.java#L174-L181
63,441
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/EvaluateClustering.java
EvaluateClustering.isReferenceResult
private boolean isReferenceResult(Clustering<?> t) { // FIXME: don't hard-code strings return "bylabel-clustering".equals(t.getShortName()) // || "bymodel-clustering".equals(t.getShortName()) // || "allinone-clustering".equals(t.getShortName()) // || "allinnoise-clustering".equals(t.getS...
java
private boolean isReferenceResult(Clustering<?> t) { // FIXME: don't hard-code strings return "bylabel-clustering".equals(t.getShortName()) // || "bymodel-clustering".equals(t.getShortName()) // || "allinone-clustering".equals(t.getShortName()) // || "allinnoise-clustering".equals(t.getS...
[ "private", "boolean", "isReferenceResult", "(", "Clustering", "<", "?", ">", "t", ")", "{", "// FIXME: don't hard-code strings", "return", "\"bylabel-clustering\"", ".", "equals", "(", "t", ".", "getShortName", "(", ")", ")", "//", "||", "\"bymodel-clustering\"", ...
Test if a clustering result is a valid reference result. @param t Clustering to test. @return {@code true} if it is considered to be a reference result.
[ "Test", "if", "a", "clustering", "result", "is", "a", "valid", "reference", "result", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/EvaluateClustering.java#L189-L195
63,442
elki-project/elki
elki-persistent/src/main/java/de/lmu/ifi/dbs/elki/persistent/AbstractPageFile.java
AbstractPageFile.writePage
@Override public final synchronized int writePage(P page) { int pageid = setPageID(page); writePage(pageid, page); return pageid; }
java
@Override public final synchronized int writePage(P page) { int pageid = setPageID(page); writePage(pageid, page); return pageid; }
[ "@", "Override", "public", "final", "synchronized", "int", "writePage", "(", "P", "page", ")", "{", "int", "pageid", "=", "setPageID", "(", "page", ")", ";", "writePage", "(", "pageid", ",", "page", ")", ";", "return", "pageid", ";", "}" ]
Writes a page into this file. The method tests if the page has already an id, otherwise a new id is assigned and returned. @param page the page to be written @return the id of the page
[ "Writes", "a", "page", "into", "this", "file", ".", "The", "method", "tests", "if", "the", "page", "has", "already", "an", "id", "otherwise", "a", "new", "id", "is", "assigned", "and", "returned", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-persistent/src/main/java/de/lmu/ifi/dbs/elki/persistent/AbstractPageFile.java#L69-L74
63,443
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java
SVGHyperSphere.drawManhattan
public static Element drawManhattan(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) { final double[] v_mid = mid.toArray(); // a copy final long[] dims = proj.getVisibleDimensions2D(); SVGPath path = new SVGPath(); for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.n...
java
public static Element drawManhattan(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) { final double[] v_mid = mid.toArray(); // a copy final long[] dims = proj.getVisibleDimensions2D(); SVGPath path = new SVGPath(); for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.n...
[ "public", "static", "Element", "drawManhattan", "(", "SVGPlot", "svgp", ",", "Projection2D", "proj", ",", "NumberVector", "mid", ",", "double", "radius", ")", "{", "final", "double", "[", "]", "v_mid", "=", "mid", ".", "toArray", "(", ")", ";", "// a copy"...
Wireframe "manhattan" hypersphere @param svgp SVG Plot @param proj Visualization projection @param mid mean vector @param radius radius @return path element
[ "Wireframe", "manhattan", "hypersphere" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java#L63-L91
63,444
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java
SVGHyperSphere.drawCross
public static Element drawCross(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) { final double[] v_mid = mid.toArray(); final long[] dims = proj.getVisibleDimensions2D(); SVGPath path = new SVGPath(); for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(dims...
java
public static Element drawCross(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) { final double[] v_mid = mid.toArray(); final long[] dims = proj.getVisibleDimensions2D(); SVGPath path = new SVGPath(); for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(dims...
[ "public", "static", "Element", "drawCross", "(", "SVGPlot", "svgp", ",", "Projection2D", "proj", ",", "NumberVector", "mid", ",", "double", "radius", ")", "{", "final", "double", "[", "]", "v_mid", "=", "mid", ".", "toArray", "(", ")", ";", "final", "lon...
Wireframe "cross" hypersphere @param svgp SVG Plot @param proj Visualization projection @param mid mean vector @param radius radius @return path element
[ "Wireframe", "cross", "hypersphere" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java#L253-L267
63,445
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeUtil.java
RStarTreeUtil.getRangeQuery
@SuppressWarnings({ "cast", "unchecked" }) public static <O extends SpatialComparable> RangeQuery<O> getRangeQuery(AbstractRStarTree<?, ?, ?> tree, SpatialDistanceQuery<O> distanceQuery, Object... hints) { // Can we support this distance function - spatial distances only! SpatialPrimitiveDistanceFunction<? su...
java
@SuppressWarnings({ "cast", "unchecked" }) public static <O extends SpatialComparable> RangeQuery<O> getRangeQuery(AbstractRStarTree<?, ?, ?> tree, SpatialDistanceQuery<O> distanceQuery, Object... hints) { // Can we support this distance function - spatial distances only! SpatialPrimitiveDistanceFunction<? su...
[ "@", "SuppressWarnings", "(", "{", "\"cast\"", ",", "\"unchecked\"", "}", ")", "public", "static", "<", "O", "extends", "SpatialComparable", ">", "RangeQuery", "<", "O", ">", "getRangeQuery", "(", "AbstractRStarTree", "<", "?", ",", "?", ",", "?", ">", "tr...
Get an RTree range query, using an optimized double implementation when possible. @param <O> Object type @param tree Tree to query @param distanceQuery distance query @param hints Optimizer hints @return Query object
[ "Get", "an", "RTree", "range", "query", "using", "an", "optimized", "double", "implementation", "when", "possible", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeUtil.java#L67-L75
63,446
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeUtil.java
RStarTreeUtil.getKNNQuery
@SuppressWarnings({ "cast", "unchecked" }) public static <O extends SpatialComparable> KNNQuery<O> getKNNQuery(AbstractRStarTree<?, ?, ?> tree, SpatialDistanceQuery<O> distanceQuery, Object... hints) { // Can we support this distance function - spatial distances only! SpatialPrimitiveDistanceFunction<? super ...
java
@SuppressWarnings({ "cast", "unchecked" }) public static <O extends SpatialComparable> KNNQuery<O> getKNNQuery(AbstractRStarTree<?, ?, ?> tree, SpatialDistanceQuery<O> distanceQuery, Object... hints) { // Can we support this distance function - spatial distances only! SpatialPrimitiveDistanceFunction<? super ...
[ "@", "SuppressWarnings", "(", "{", "\"cast\"", ",", "\"unchecked\"", "}", ")", "public", "static", "<", "O", "extends", "SpatialComparable", ">", "KNNQuery", "<", "O", ">", "getKNNQuery", "(", "AbstractRStarTree", "<", "?", ",", "?", ",", "?", ">", "tree",...
Get an RTree knn query, using an optimized double implementation when possible. @param <O> Object type @param tree Tree to query @param distanceQuery distance query @param hints Optimizer hints @return Query object
[ "Get", "an", "RTree", "knn", "query", "using", "an", "optimized", "double", "implementation", "when", "possible", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeUtil.java#L87-L95
63,447
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.privateReconfigureLogging
private void privateReconfigureLogging(String pkg, final String name) { LogManager logManager = LogManager.getLogManager(); Logger logger = Logger.getLogger(LoggingConfiguration.class.getName()); // allow null as package name. if(pkg == null) { pkg = ""; } // Load logging configuration fro...
java
private void privateReconfigureLogging(String pkg, final String name) { LogManager logManager = LogManager.getLogManager(); Logger logger = Logger.getLogger(LoggingConfiguration.class.getName()); // allow null as package name. if(pkg == null) { pkg = ""; } // Load logging configuration fro...
[ "private", "void", "privateReconfigureLogging", "(", "String", "pkg", ",", "final", "String", "name", ")", "{", "LogManager", "logManager", "=", "LogManager", ".", "getLogManager", "(", ")", ";", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "Loggi...
Reconfigure logging. @param pkg Package name the configuration file comes from @param name File name.
[ "Reconfigure", "logging", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L107-L141
63,448
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.openSystemFile
private static InputStream openSystemFile(String filename) throws FileNotFoundException { try { return new FileInputStream(filename); } catch(FileNotFoundException e) { // try with classloader String resname = File.separatorChar != '/' ? filename.replace(File.separatorChar, '/') : filename...
java
private static InputStream openSystemFile(String filename) throws FileNotFoundException { try { return new FileInputStream(filename); } catch(FileNotFoundException e) { // try with classloader String resname = File.separatorChar != '/' ? filename.replace(File.separatorChar, '/') : filename...
[ "private", "static", "InputStream", "openSystemFile", "(", "String", "filename", ")", "throws", "FileNotFoundException", "{", "try", "{", "return", "new", "FileInputStream", "(", "filename", ")", ";", "}", "catch", "(", "FileNotFoundException", "e", ")", "{", "/...
Private copy from FileUtil, to avoid cross-dependencies. Try to open a file, first trying the file system, then falling back to the classpath. @param filename File name in system notation @return Input stream @throws FileNotFoundException When no file was found.
[ "Private", "copy", "from", "FileUtil", "to", "avoid", "cross", "-", "dependencies", ".", "Try", "to", "open", "a", "file", "first", "trying", "the", "file", "system", "then", "falling", "back", "to", "the", "classpath", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L151-L181
63,449
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.setVerbose
public static void setVerbose(java.util.logging.Level verbose) { if(verbose.intValue() <= Level.VERBOSE.intValue()) { // decrease to VERBOSE if it was higher, otherwise further to // VERYVERBOSE if(LOGGER_GLOBAL_TOP.getLevel() == null || LOGGER_GLOBAL_TOP.getLevel().intValue() > verbose.intValue()...
java
public static void setVerbose(java.util.logging.Level verbose) { if(verbose.intValue() <= Level.VERBOSE.intValue()) { // decrease to VERBOSE if it was higher, otherwise further to // VERYVERBOSE if(LOGGER_GLOBAL_TOP.getLevel() == null || LOGGER_GLOBAL_TOP.getLevel().intValue() > verbose.intValue()...
[ "public", "static", "void", "setVerbose", "(", "java", ".", "util", ".", "logging", ".", "Level", "verbose", ")", "{", "if", "(", "verbose", ".", "intValue", "(", ")", "<=", "Level", ".", "VERBOSE", ".", "intValue", "(", ")", ")", "{", "// decrease to ...
Reconfigure logging to enable 'verbose' logging at the top level. @param verbose verbosity level.
[ "Reconfigure", "logging", "to", "enable", "verbose", "logging", "at", "the", "top", "level", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L195-L221
63,450
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.setStatistics
public static void setStatistics() { // decrease to INFO if it was higher if(LOGGER_GLOBAL_TOP.getLevel() == null || LOGGER_GLOBAL_TOP.getLevel().intValue() > Level.STATISTICS.intValue()) { LOGGER_GLOBAL_TOP.setLevel(Level.STATISTICS); } if(LOGGER_ELKI_TOP.getLevel() == null || LOGGER_ELKI_TOP.get...
java
public static void setStatistics() { // decrease to INFO if it was higher if(LOGGER_GLOBAL_TOP.getLevel() == null || LOGGER_GLOBAL_TOP.getLevel().intValue() > Level.STATISTICS.intValue()) { LOGGER_GLOBAL_TOP.setLevel(Level.STATISTICS); } if(LOGGER_ELKI_TOP.getLevel() == null || LOGGER_ELKI_TOP.get...
[ "public", "static", "void", "setStatistics", "(", ")", "{", "// decrease to INFO if it was higher", "if", "(", "LOGGER_GLOBAL_TOP", ".", "getLevel", "(", ")", "==", "null", "||", "LOGGER_GLOBAL_TOP", ".", "getLevel", "(", ")", ".", "intValue", "(", ")", ">", "...
Enable runtime performance logging.
[ "Enable", "runtime", "performance", "logging", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L226-L237
63,451
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.replaceDefaultHandler
public static void replaceDefaultHandler(Handler handler) { Logger rootlogger = LogManager.getLogManager().getLogger(""); for(Handler h : rootlogger.getHandlers()) { if(h instanceof CLISmartHandler) { rootlogger.removeHandler(h); } } addHandler(handler); }
java
public static void replaceDefaultHandler(Handler handler) { Logger rootlogger = LogManager.getLogManager().getLogger(""); for(Handler h : rootlogger.getHandlers()) { if(h instanceof CLISmartHandler) { rootlogger.removeHandler(h); } } addHandler(handler); }
[ "public", "static", "void", "replaceDefaultHandler", "(", "Handler", "handler", ")", "{", "Logger", "rootlogger", "=", "LogManager", ".", "getLogManager", "(", ")", ".", "getLogger", "(", "\"\"", ")", ";", "for", "(", "Handler", "h", ":", "rootlogger", ".", ...
Replace the default log handler with the given log handler. This will remove all {@link CLISmartHandler} found on the root logger. It will leave any other handlers in place. @param handler Logging handler.
[ "Replace", "the", "default", "log", "handler", "with", "the", "given", "log", "handler", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L256-L264
63,452
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.setDefaultLevel
public static void setDefaultLevel(java.util.logging.Level level) { Logger.getLogger(TOPLEVEL_PACKAGE).setLevel(level); }
java
public static void setDefaultLevel(java.util.logging.Level level) { Logger.getLogger(TOPLEVEL_PACKAGE).setLevel(level); }
[ "public", "static", "void", "setDefaultLevel", "(", "java", ".", "util", ".", "logging", ".", "Level", "level", ")", "{", "Logger", ".", "getLogger", "(", "TOPLEVEL_PACKAGE", ")", ".", "setLevel", "(", "level", ")", ";", "}" ]
Set the default level. @param level level
[ "Set", "the", "default", "level", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L288-L290
63,453
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/batikutil/BatikUtil.java
BatikUtil.getRelativeCoordinates
public static double[] getRelativeCoordinates(Event evt, Element reference) { if(evt instanceof DOMMouseEvent && reference instanceof SVGLocatable && reference instanceof SVGElement) { // Get the screen (pixel!) coordinates DOMMouseEvent gnme = (DOMMouseEvent) evt; SVGMatrix mat = ((SVGLocatable) ...
java
public static double[] getRelativeCoordinates(Event evt, Element reference) { if(evt instanceof DOMMouseEvent && reference instanceof SVGLocatable && reference instanceof SVGElement) { // Get the screen (pixel!) coordinates DOMMouseEvent gnme = (DOMMouseEvent) evt; SVGMatrix mat = ((SVGLocatable) ...
[ "public", "static", "double", "[", "]", "getRelativeCoordinates", "(", "Event", "evt", ",", "Element", "reference", ")", "{", "if", "(", "evt", "instanceof", "DOMMouseEvent", "&&", "reference", "instanceof", "SVGLocatable", "&&", "reference", "instanceof", "SVGEle...
Get the relative coordinates of a point within the coordinate system of a particular SVG Element. @param evt Event, needs to be a DOMMouseEvent @param reference SVG Element the coordinate system is used of @return Array containing the X and Y values
[ "Get", "the", "relative", "coordinates", "of", "a", "point", "within", "the", "coordinate", "system", "of", "a", "particular", "SVG", "Element", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/batikutil/BatikUtil.java#L53-L69
63,454
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/birch/BIRCHLeafClustering.java
BIRCHLeafClustering.run
public Clustering<MeanModel> run(Relation<NumberVector> relation) { final int dim = RelationUtil.dimensionality(relation); CFTree tree = cffactory.newTree(relation.getDBIDs(), relation); // The CFTree does not store points. We have to reassign them (and the // quality is better than if we used the initi...
java
public Clustering<MeanModel> run(Relation<NumberVector> relation) { final int dim = RelationUtil.dimensionality(relation); CFTree tree = cffactory.newTree(relation.getDBIDs(), relation); // The CFTree does not store points. We have to reassign them (and the // quality is better than if we used the initi...
[ "public", "Clustering", "<", "MeanModel", ">", "run", "(", "Relation", "<", "NumberVector", ">", "relation", ")", "{", "final", "int", "dim", "=", "RelationUtil", ".", "dimensionality", "(", "relation", ")", ";", "CFTree", "tree", "=", "cffactory", ".", "n...
Run the clustering algorithm. @param relation Input data @return Clustering
[ "Run", "the", "clustering", "algorithm", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/birch/BIRCHLeafClustering.java#L100-L125
63,455
elki-project/elki
addons/tutorial/src/main/java/tutorial/outlier/DistanceStddevOutlier.java
DistanceStddevOutlier.run
public OutlierResult run(Database database, Relation<O> relation) { // Get a nearest neighbor query on the relation. KNNQuery<O> knnq = QueryUtil.getKNNQuery(relation, getDistanceFunction(), k); // Output data storage WritableDoubleDataStore scores = DataStoreUtil.makeDoubleStorage(relation.getDBIDs(), ...
java
public OutlierResult run(Database database, Relation<O> relation) { // Get a nearest neighbor query on the relation. KNNQuery<O> knnq = QueryUtil.getKNNQuery(relation, getDistanceFunction(), k); // Output data storage WritableDoubleDataStore scores = DataStoreUtil.makeDoubleStorage(relation.getDBIDs(), ...
[ "public", "OutlierResult", "run", "(", "Database", "database", ",", "Relation", "<", "O", ">", "relation", ")", "{", "// Get a nearest neighbor query on the relation.", "KNNQuery", "<", "O", ">", "knnq", "=", "QueryUtil", ".", "getKNNQuery", "(", "relation", ",", ...
Run the outlier detection algorithm @param database Database to use @param relation Relation to analyze @return Outlier score result
[ "Run", "the", "outlier", "detection", "algorithm" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/tutorial/src/main/java/tutorial/outlier/DistanceStddevOutlier.java#L90-L119
63,456
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/application/ELKILauncher.java
ELKILauncher.main
public static void main(String[] args) { if(args.length > 0 && args[0].charAt(0) != '-') { Class<?> cls = ELKIServiceRegistry.findImplementation(AbstractApplication.class, args[0]); if(cls != null) { try { Method m = cls.getMethod("main", String[].class); Object a = Arrays.co...
java
public static void main(String[] args) { if(args.length > 0 && args[0].charAt(0) != '-') { Class<?> cls = ELKIServiceRegistry.findImplementation(AbstractApplication.class, args[0]); if(cls != null) { try { Method m = cls.getMethod("main", String[].class); Object a = Arrays.co...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", ">", "0", "&&", "args", "[", "0", "]", ".", "charAt", "(", "0", ")", "!=", "'", "'", ")", "{", "Class", "<", "?", ">", "cls", "...
Launch ELKI. @param args Command line arguments.
[ "Launch", "ELKI", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/application/ELKILauncher.java#L70-L95
63,457
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/ClassGenericsUtil.java
ClassGenericsUtil.getParameterizer
public static Parameterizer getParameterizer(Class<?> c) { for(Class<?> inner : c.getDeclaredClasses()) { if(Parameterizer.class.isAssignableFrom(inner)) { try { return inner.asSubclass(Parameterizer.class).newInstance(); } catch(Exception e) { LOG.warning("Non-usab...
java
public static Parameterizer getParameterizer(Class<?> c) { for(Class<?> inner : c.getDeclaredClasses()) { if(Parameterizer.class.isAssignableFrom(inner)) { try { return inner.asSubclass(Parameterizer.class).newInstance(); } catch(Exception e) { LOG.warning("Non-usab...
[ "public", "static", "Parameterizer", "getParameterizer", "(", "Class", "<", "?", ">", "c", ")", "{", "for", "(", "Class", "<", "?", ">", "inner", ":", "c", ".", "getDeclaredClasses", "(", ")", ")", "{", "if", "(", "Parameterizer", ".", "class", ".", ...
Get a parameterizer for the given class. @param c Class @return Parameterizer or null.
[ "Get", "a", "parameterizer", "for", "the", "given", "class", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/ClassGenericsUtil.java#L145-L157
63,458
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/hierarchy/HashMapHierarchy.java
HashMapHierarchy.putRec
private void putRec(O obj, Rec<O> rec) { graph.put(obj, rec); for(int i = 0; i < numelems; ++i) { if(obj == elems[i]) { return; } } if(elems.length == numelems) { elems = Arrays.copyOf(elems, (elems.length << 1) + 1); } elems[numelems++] = obj; }
java
private void putRec(O obj, Rec<O> rec) { graph.put(obj, rec); for(int i = 0; i < numelems; ++i) { if(obj == elems[i]) { return; } } if(elems.length == numelems) { elems = Arrays.copyOf(elems, (elems.length << 1) + 1); } elems[numelems++] = obj; }
[ "private", "void", "putRec", "(", "O", "obj", ",", "Rec", "<", "O", ">", "rec", ")", "{", "graph", ".", "put", "(", "obj", ",", "rec", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numelems", ";", "++", "i", ")", "{", "if", ...
Put a record. @param obj Key @param rec Record
[ "Put", "a", "record", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/hierarchy/HashMapHierarchy.java#L246-L257
63,459
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/hierarchy/HashMapHierarchy.java
HashMapHierarchy.removeRec
private void removeRec(O obj) { graph.remove(obj); for(int i = 0; i < numelems; ++i) { if(obj == elems[i]) { System.arraycopy(elems, i + 1, elems, i, --numelems - i); elems[numelems] = null; return; } } }
java
private void removeRec(O obj) { graph.remove(obj); for(int i = 0; i < numelems; ++i) { if(obj == elems[i]) { System.arraycopy(elems, i + 1, elems, i, --numelems - i); elems[numelems] = null; return; } } }
[ "private", "void", "removeRec", "(", "O", "obj", ")", "{", "graph", ".", "remove", "(", "obj", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numelems", ";", "++", "i", ")", "{", "if", "(", "obj", "==", "elems", "[", "i", "]", ...
Remove a record. @param obj Key
[ "Remove", "a", "record", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/hierarchy/HashMapHierarchy.java#L264-L273
63,460
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java
TreePopup.createTree
protected JTree createTree() { JTree tree = new JTree(model); tree.setName("TreePopup.tree"); tree.setFont(getFont()); tree.setForeground(getForeground()); tree.setBackground(getBackground()); tree.setBorder(null); tree.setFocusable(true); tree.addMouseListener(handler); tree.addKeyL...
java
protected JTree createTree() { JTree tree = new JTree(model); tree.setName("TreePopup.tree"); tree.setFont(getFont()); tree.setForeground(getForeground()); tree.setBackground(getBackground()); tree.setBorder(null); tree.setFocusable(true); tree.addMouseListener(handler); tree.addKeyL...
[ "protected", "JTree", "createTree", "(", ")", "{", "JTree", "tree", "=", "new", "JTree", "(", "model", ")", ";", "tree", ".", "setName", "(", "\"TreePopup.tree\"", ")", ";", "tree", ".", "setFont", "(", "getFont", "(", ")", ")", ";", "tree", ".", "se...
Creates the JList used in the popup to display the items in the combo box model. This method is called when the UI class is created. @return a <code>JList</code> used to display the combo box items
[ "Creates", "the", "JList", "used", "in", "the", "popup", "to", "display", "the", "items", "in", "the", "combo", "box", "model", ".", "This", "method", "is", "called", "when", "the", "UI", "class", "is", "created", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java#L141-L153
63,461
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java
TreePopup.createScroller
protected JScrollPane createScroller() { JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); sp.setHorizontalScrollBar(null); sp.setName("TreePopup.scrollPane"); sp.setFocusable(false); sp.getVerticalScrollBar().se...
java
protected JScrollPane createScroller() { JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); sp.setHorizontalScrollBar(null); sp.setName("TreePopup.scrollPane"); sp.setFocusable(false); sp.getVerticalScrollBar().se...
[ "protected", "JScrollPane", "createScroller", "(", ")", "{", "JScrollPane", "sp", "=", "new", "JScrollPane", "(", "tree", ",", "ScrollPaneConstants", ".", "VERTICAL_SCROLLBAR_AS_NEEDED", ",", "ScrollPaneConstants", ".", "HORIZONTAL_SCROLLBAR_NEVER", ")", ";", "sp", "....
Creates the scroll pane which houses the scrollable tree.
[ "Creates", "the", "scroll", "pane", "which", "houses", "the", "scrollable", "tree", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java#L171-L179
63,462
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java
TreePopup.show
public void show(Component parent) { Dimension parentSize = parent.getSize(); Insets insets = getInsets(); // reduce the width of the scrollpane by the insets so that the popup // is the same width as the combo box. parentSize.setSize(parentSize.width - (insets.right + insets.left), 10 * parentSize...
java
public void show(Component parent) { Dimension parentSize = parent.getSize(); Insets insets = getInsets(); // reduce the width of the scrollpane by the insets so that the popup // is the same width as the combo box. parentSize.setSize(parentSize.width - (insets.right + insets.left), 10 * parentSize...
[ "public", "void", "show", "(", "Component", "parent", ")", "{", "Dimension", "parentSize", "=", "parent", ".", "getSize", "(", ")", ";", "Insets", "insets", "=", "getInsets", "(", ")", ";", "// reduce the width of the scrollpane by the insets so that the popup", "//...
Display the popup, attached to the given component. @param parent Parent component
[ "Display", "the", "popup", "attached", "to", "the", "given", "component", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java#L195-L210
63,463
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java
TreePopup.fireActionPerformed
protected void fireActionPerformed(ActionEvent event) { Object[] listeners = listenerList.getListenerList(); for(int i = listeners.length - 2; i >= 0; i -= 2) { if(listeners[i] == ActionListener.class) { ((ActionListener) listeners[i + 1]).actionPerformed(event); } } }
java
protected void fireActionPerformed(ActionEvent event) { Object[] listeners = listenerList.getListenerList(); for(int i = listeners.length - 2; i >= 0; i -= 2) { if(listeners[i] == ActionListener.class) { ((ActionListener) listeners[i + 1]).actionPerformed(event); } } }
[ "protected", "void", "fireActionPerformed", "(", "ActionEvent", "event", ")", "{", "Object", "[", "]", "listeners", "=", "listenerList", ".", "getListenerList", "(", ")", ";", "for", "(", "int", "i", "=", "listeners", ".", "length", "-", "2", ";", "i", "...
Notify action listeners. @param event the <code>ActionEvent</code> object
[ "Notify", "action", "listeners", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/TreePopup.java#L262-L269
63,464
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/style/PropertiesBasedStyleLibrary.java
PropertiesBasedStyleLibrary.setCached
private <T> void setCached(String prefix, String postfix, T data) { cache.put(prefix + '.' + postfix, data); }
java
private <T> void setCached(String prefix, String postfix, T data) { cache.put(prefix + '.' + postfix, data); }
[ "private", "<", "T", ">", "void", "setCached", "(", "String", "prefix", ",", "String", "postfix", ",", "T", "data", ")", "{", "cache", ".", "put", "(", "prefix", "+", "'", "'", "+", "postfix", ",", "data", ")", ";", "}" ]
Set a cache value @param <T> Type @param prefix Tree name @param postfix Property name @param data Data
[ "Set", "a", "cache", "value" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/style/PropertiesBasedStyleLibrary.java#L181-L183
63,465
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/style/PropertiesBasedStyleLibrary.java
PropertiesBasedStyleLibrary.getPropertyValue
protected String getPropertyValue(String prefix, String postfix) { String ret = properties.getProperty(prefix + "." + postfix); if (ret != null) { // logger.debugFine("Found property: "+prefix + "." + // postfix+" for "+prefix); return ret; } int pos = prefix.length(); while (pos >...
java
protected String getPropertyValue(String prefix, String postfix) { String ret = properties.getProperty(prefix + "." + postfix); if (ret != null) { // logger.debugFine("Found property: "+prefix + "." + // postfix+" for "+prefix); return ret; } int pos = prefix.length(); while (pos >...
[ "protected", "String", "getPropertyValue", "(", "String", "prefix", ",", "String", "postfix", ")", "{", "String", "ret", "=", "properties", ".", "getProperty", "(", "prefix", "+", "\".\"", "+", "postfix", ")", ";", "if", "(", "ret", "!=", "null", ")", "{...
Retrieve the property value for a particular path + type pair. @param prefix Path @param postfix Type @return Value
[ "Retrieve", "the", "property", "value", "for", "a", "particular", "path", "+", "type", "pair", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/style/PropertiesBasedStyleLibrary.java#L192-L218
63,466
elki-project/elki
elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/FilterUtil.java
FilterUtil.guessFactory
@SuppressWarnings("unchecked") public static <V extends NumberVector> NumberVector.Factory<V> guessFactory(SimpleTypeInformation<V> in) { NumberVector.Factory<V> factory = null; if(in instanceof VectorTypeInformation) { factory = (NumberVector.Factory<V>) ((VectorTypeInformation<V>) in).getFactory(); ...
java
@SuppressWarnings("unchecked") public static <V extends NumberVector> NumberVector.Factory<V> guessFactory(SimpleTypeInformation<V> in) { NumberVector.Factory<V> factory = null; if(in instanceof VectorTypeInformation) { factory = (NumberVector.Factory<V>) ((VectorTypeInformation<V>) in).getFactory(); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "V", "extends", "NumberVector", ">", "NumberVector", ".", "Factory", "<", "V", ">", "guessFactory", "(", "SimpleTypeInformation", "<", "V", ">", "in", ")", "{", "NumberVector", ".", ...
Try to guess the appropriate factory. @param in Input type @param <V> Vector type @return Factory
[ "Try", "to", "guess", "the", "appropriate", "factory", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/FilterUtil.java#L54-L71
63,467
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java
MultipleObjectsBundle.appendSimple
public void appendSimple(Object... data) { if(data.length != meta.size()) { throw new AbortException("Invalid number of attributes in 'append'."); } for(int i = 0; i < data.length; i++) { @SuppressWarnings("unchecked") final List<Object> col = (List<Object>) columns.get(i); col.add(d...
java
public void appendSimple(Object... data) { if(data.length != meta.size()) { throw new AbortException("Invalid number of attributes in 'append'."); } for(int i = 0; i < data.length; i++) { @SuppressWarnings("unchecked") final List<Object> col = (List<Object>) columns.get(i); col.add(d...
[ "public", "void", "appendSimple", "(", "Object", "...", "data", ")", "{", "if", "(", "data", ".", "length", "!=", "meta", ".", "size", "(", ")", ")", "{", "throw", "new", "AbortException", "(", "\"Invalid number of attributes in 'append'.\"", ")", ";", "}", ...
Append a new record to the data set. Pay attention to having the right number of values! @param data Data to append
[ "Append", "a", "new", "record", "to", "the", "data", "set", ".", "Pay", "attention", "to", "having", "the", "right", "number", "of", "values!" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java#L115-L124
63,468
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java
MultipleObjectsBundle.fromStream
public static MultipleObjectsBundle fromStream(BundleStreamSource source) { MultipleObjectsBundle bundle = new MultipleObjectsBundle(); boolean stop = false; DBIDVar var = null; ArrayModifiableDBIDs ids = null; int size = 0; while(!stop) { BundleStreamSource.Event ev = source.nextEvent(); ...
java
public static MultipleObjectsBundle fromStream(BundleStreamSource source) { MultipleObjectsBundle bundle = new MultipleObjectsBundle(); boolean stop = false; DBIDVar var = null; ArrayModifiableDBIDs ids = null; int size = 0; while(!stop) { BundleStreamSource.Event ev = source.nextEvent(); ...
[ "public", "static", "MultipleObjectsBundle", "fromStream", "(", "BundleStreamSource", "source", ")", "{", "MultipleObjectsBundle", "bundle", "=", "new", "MultipleObjectsBundle", "(", ")", ";", "boolean", "stop", "=", "false", ";", "DBIDVar", "var", "=", "null", ";...
Convert an object stream to a bundle @param source Object stream @return Static bundle
[ "Convert", "an", "object", "stream", "to", "a", "bundle" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java#L233-L286
63,469
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java
MultipleObjectsBundle.getRow
public Object[] getRow(int row) { Object[] ret = new Object[columns.size()]; for(int c = 0; c < columns.size(); c++) { ret[c] = data(row, c); } return ret; }
java
public Object[] getRow(int row) { Object[] ret = new Object[columns.size()]; for(int c = 0; c < columns.size(); c++) { ret[c] = data(row, c); } return ret; }
[ "public", "Object", "[", "]", "getRow", "(", "int", "row", ")", "{", "Object", "[", "]", "ret", "=", "new", "Object", "[", "columns", ".", "size", "(", ")", "]", ";", "for", "(", "int", "c", "=", "0", ";", "c", "<", "columns", ".", "size", "(...
Get an object row. @param row Row number @return Array of values
[ "Get", "an", "object", "row", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java#L294-L300
63,470
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeKNNQuery.java
RStarTreeKNNQuery.batchNN
protected void batchNN(AbstractRStarTreeNode<?, ?> node, Map<DBID, KNNHeap> knnLists) { if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { SpatialEntry p = node.getEntry(i); for(Entry<DBID, KNNHeap> ent : knnLists.entrySet()) { final DBID q = ent.getKey(); ...
java
protected void batchNN(AbstractRStarTreeNode<?, ?> node, Map<DBID, KNNHeap> knnLists) { if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { SpatialEntry p = node.getEntry(i); for(Entry<DBID, KNNHeap> ent : knnLists.entrySet()) { final DBID q = ent.getKey(); ...
[ "protected", "void", "batchNN", "(", "AbstractRStarTreeNode", "<", "?", ",", "?", ">", "node", ",", "Map", "<", "DBID", ",", "KNNHeap", ">", "knnLists", ")", "{", "if", "(", "node", ".", "isLeaf", "(", ")", ")", "{", "for", "(", "int", "i", "=", ...
Performs a batch knn query. @param node the node for which the query should be performed @param knnLists a map containing the knn lists for each query objects
[ "Performs", "a", "batch", "knn", "query", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeKNNQuery.java#L163-L204
63,471
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeKNNQuery.java
RStarTreeKNNQuery.getSortedEntries
protected List<DoubleDistanceEntry> getSortedEntries(AbstractRStarTreeNode<?, ?> node, DBIDs ids) { List<DoubleDistanceEntry> result = new ArrayList<>(); for(int i = 0; i < node.getNumEntries(); i++) { SpatialEntry entry = node.getEntry(i); double minMinDist = Double.MAX_VALUE; for(DBIDIter i...
java
protected List<DoubleDistanceEntry> getSortedEntries(AbstractRStarTreeNode<?, ?> node, DBIDs ids) { List<DoubleDistanceEntry> result = new ArrayList<>(); for(int i = 0; i < node.getNumEntries(); i++) { SpatialEntry entry = node.getEntry(i); double minMinDist = Double.MAX_VALUE; for(DBIDIter i...
[ "protected", "List", "<", "DoubleDistanceEntry", ">", "getSortedEntries", "(", "AbstractRStarTreeNode", "<", "?", ",", "?", ">", "node", ",", "DBIDs", "ids", ")", "{", "List", "<", "DoubleDistanceEntry", ">", "result", "=", "new", "ArrayList", "<>", "(", ")"...
Sorts the entries of the specified node according to their minimum distance to the specified objects. @param node the node @param ids the id of the objects @return a list of the sorted entries
[ "Sorts", "the", "entries", "of", "the", "specified", "node", "according", "to", "their", "minimum", "distance", "to", "the", "specified", "objects", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/query/RStarTreeKNNQuery.java#L214-L230
63,472
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/FilteredConvexHull2D.java
FilteredConvexHull2D.checkCandidateUpdate
private boolean checkCandidateUpdate(double[] point) { final double x = point[0], y = point[1]; if(points.isEmpty()) { leftx = rightx = x; topy = bottomy = y; topleft = topright = bottomleft = bottomright = point; return true; } // A non-regular diamond spanned by left, top, righ...
java
private boolean checkCandidateUpdate(double[] point) { final double x = point[0], y = point[1]; if(points.isEmpty()) { leftx = rightx = x; topy = bottomy = y; topleft = topright = bottomleft = bottomright = point; return true; } // A non-regular diamond spanned by left, top, righ...
[ "private", "boolean", "checkCandidateUpdate", "(", "double", "[", "]", "point", ")", "{", "final", "double", "x", "=", "point", "[", "0", "]", ",", "y", "=", "point", "[", "1", "]", ";", "if", "(", "points", ".", "isEmpty", "(", ")", ")", "{", "l...
Check whether a point is inside the current bounds, and update the bounds @param point New point @return {@code true} if the point is potentially on the hull
[ "Check", "whether", "a", "point", "is", "inside", "the", "current", "bounds", "and", "update", "the", "bounds" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/FilteredConvexHull2D.java#L116-L154
63,473
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/CLARA.java
CLARA.randomSample
static DBIDs randomSample(DBIDs ids, int samplesize, Random rnd, DBIDs previous) { if(previous == null) { return DBIDUtil.randomSample(ids, samplesize, rnd); } ModifiableDBIDs sample = DBIDUtil.newHashSet(samplesize); sample.addDBIDs(previous); sample.addDBIDs(DBIDUtil.randomSample(ids, sample...
java
static DBIDs randomSample(DBIDs ids, int samplesize, Random rnd, DBIDs previous) { if(previous == null) { return DBIDUtil.randomSample(ids, samplesize, rnd); } ModifiableDBIDs sample = DBIDUtil.newHashSet(samplesize); sample.addDBIDs(previous); sample.addDBIDs(DBIDUtil.randomSample(ids, sample...
[ "static", "DBIDs", "randomSample", "(", "DBIDs", "ids", ",", "int", "samplesize", ",", "Random", "rnd", ",", "DBIDs", "previous", ")", "{", "if", "(", "previous", "==", "null", ")", "{", "return", "DBIDUtil", ".", "randomSample", "(", "ids", ",", "sample...
Draw a random sample of the desired size. @param ids IDs to sample from @param samplesize Sample size @param rnd Random generator @param previous Previous medoids to always include in the sample. @return Sample
[ "Draw", "a", "random", "sample", "of", "the", "desired", "size", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/CLARA.java#L205-L222
63,474
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/configurator/FileParameterConfigurator.java
FileParameterConfigurator.actionPerformed
@Override public void actionPerformed(ActionEvent e) { // Use a new JFileChooser. Inconsistent behaviour otherwise! final JFileChooser fc = new JFileChooser(new File(".")); if(param.isDefined()) { fc.setSelectedFile(param.getValue()); } if(e.getSource() == button) { int returnVal = fc...
java
@Override public void actionPerformed(ActionEvent e) { // Use a new JFileChooser. Inconsistent behaviour otherwise! final JFileChooser fc = new JFileChooser(new File(".")); if(param.isDefined()) { fc.setSelectedFile(param.getValue()); } if(e.getSource() == button) { int returnVal = fc...
[ "@", "Override", "public", "void", "actionPerformed", "(", "ActionEvent", "e", ")", "{", "// Use a new JFileChooser. Inconsistent behaviour otherwise!", "final", "JFileChooser", "fc", "=", "new", "JFileChooser", "(", "new", "File", "(", "\".\"", ")", ")", ";", "if",...
Button callback to show the file selector
[ "Button", "callback", "to", "show", "the", "file", "selector" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/configurator/FileParameterConfigurator.java#L97-L119
63,475
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/batikutil/CloneInlineImages.java
CloneInlineImages.inlineThumbnail
protected Node inlineThumbnail(Document doc, ParsedURL urldata, Node eold) { RenderableImage img = ThumbnailRegistryEntry.handleURL(urldata); if(img == null) { LoggingUtil.warning("Image not found in registry: " + urldata.toString()); return null; } ByteArrayOutputStream os = new ByteArrayOu...
java
protected Node inlineThumbnail(Document doc, ParsedURL urldata, Node eold) { RenderableImage img = ThumbnailRegistryEntry.handleURL(urldata); if(img == null) { LoggingUtil.warning("Image not found in registry: " + urldata.toString()); return null; } ByteArrayOutputStream os = new ByteArrayOu...
[ "protected", "Node", "inlineThumbnail", "(", "Document", "doc", ",", "ParsedURL", "urldata", ",", "Node", "eold", ")", "{", "RenderableImage", "img", "=", "ThumbnailRegistryEntry", ".", "handleURL", "(", "urldata", ")", ";", "if", "(", "img", "==", "null", "...
Inline a referenced thumbnail. @param doc Document (element factory) @param urldata URL @param eold Existing node @return Replacement node, or {@code null}
[ "Inline", "a", "referenced", "thumbnail", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/batikutil/CloneInlineImages.java#L81-L101
63,476
elki-project/elki
elki-precomputed/src/main/java/de/lmu/ifi/dbs/elki/application/cache/PrecomputeDistancesAsciiApplication.java
PrecomputeDistancesAsciiApplication.openStream
private static PrintStream openStream(File out) throws IOException { OutputStream os = new FileOutputStream(out); os = out.getName().endsWith(GZIP_POSTFIX) ? new GZIPOutputStream(os) : os; return new PrintStream(os); }
java
private static PrintStream openStream(File out) throws IOException { OutputStream os = new FileOutputStream(out); os = out.getName().endsWith(GZIP_POSTFIX) ? new GZIPOutputStream(os) : os; return new PrintStream(os); }
[ "private", "static", "PrintStream", "openStream", "(", "File", "out", ")", "throws", "IOException", "{", "OutputStream", "os", "=", "new", "FileOutputStream", "(", "out", ")", ";", "os", "=", "out", ".", "getName", "(", ")", ".", "endsWith", "(", "GZIP_POS...
Open the output stream, using gzip if necessary. @param out Output file name. @return Output stream @throws IOException
[ "Open", "the", "output", "stream", "using", "gzip", "if", "necessary", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-precomputed/src/main/java/de/lmu/ifi/dbs/elki/application/cache/PrecomputeDistancesAsciiApplication.java#L152-L156
63,477
elki-project/elki
elki-core-data/src/main/java/de/lmu/ifi/dbs/elki/data/SparseShortVector.java
SparseShortVector.setDimensionality
@Override public void setDimensionality(int dimensionality) throws IllegalArgumentException { final int maxdim = getMaxDim(); if(maxdim > dimensionality) { throw new IllegalArgumentException("Given dimensionality " + dimensionality + " is too small w.r.t. the given values (occurring maximum: " + maxdim ...
java
@Override public void setDimensionality(int dimensionality) throws IllegalArgumentException { final int maxdim = getMaxDim(); if(maxdim > dimensionality) { throw new IllegalArgumentException("Given dimensionality " + dimensionality + " is too small w.r.t. the given values (occurring maximum: " + maxdim ...
[ "@", "Override", "public", "void", "setDimensionality", "(", "int", "dimensionality", ")", "throws", "IllegalArgumentException", "{", "final", "int", "maxdim", "=", "getMaxDim", "(", ")", ";", "if", "(", "maxdim", ">", "dimensionality", ")", "{", "throw", "new...
Sets the dimensionality to the new value. @param dimensionality the new dimensionality @throws IllegalArgumentException if the given dimensionality is too small to cover the given values (i.e., the maximum index of any value not zero is bigger than the given dimensionality)
[ "Sets", "the", "dimensionality", "to", "the", "new", "value", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-data/src/main/java/de/lmu/ifi/dbs/elki/data/SparseShortVector.java#L189-L196
63,478
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.findPathToObject
protected IndexTreePath<E> findPathToObject(IndexTreePath<E> subtree, SpatialComparable mbr, DBIDRef id) { N node = getNode(subtree.getEntry()); if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { if(DBIDUtil.equal(((LeafEntry) node.getEntry(i)).getDBID(), id)) { return n...
java
protected IndexTreePath<E> findPathToObject(IndexTreePath<E> subtree, SpatialComparable mbr, DBIDRef id) { N node = getNode(subtree.getEntry()); if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { if(DBIDUtil.equal(((LeafEntry) node.getEntry(i)).getDBID(), id)) { return n...
[ "protected", "IndexTreePath", "<", "E", ">", "findPathToObject", "(", "IndexTreePath", "<", "E", ">", "subtree", ",", "SpatialComparable", "mbr", ",", "DBIDRef", "id", ")", "{", "N", "node", "=", "getNode", "(", "subtree", ".", "getEntry", "(", ")", ")", ...
Returns the path to the leaf entry in the specified subtree that represents the data object with the specified mbr and id. @param subtree the subtree to be tested @param mbr the mbr to look for @param id the id to look for @return the path to the leaf entry of the specified subtree that represents the data object with...
[ "Returns", "the", "path", "to", "the", "leaf", "entry", "in", "the", "specified", "subtree", "that", "represents", "the", "data", "object", "with", "the", "specified", "mbr", "and", "id", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L116-L138
63,479
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.deletePath
protected void deletePath(IndexTreePath<E> deletionPath) { N leaf = getNode(deletionPath.getParentPath().getEntry()); int index = deletionPath.getIndex(); // delete o E entry = leaf.getEntry(index); leaf.deleteEntry(index); writeNode(leaf); // condense the tree Stack<N> stack = new Sta...
java
protected void deletePath(IndexTreePath<E> deletionPath) { N leaf = getNode(deletionPath.getParentPath().getEntry()); int index = deletionPath.getIndex(); // delete o E entry = leaf.getEntry(index); leaf.deleteEntry(index); writeNode(leaf); // condense the tree Stack<N> stack = new Sta...
[ "protected", "void", "deletePath", "(", "IndexTreePath", "<", "E", ">", "deletionPath", ")", "{", "N", "leaf", "=", "getNode", "(", "deletionPath", ".", "getParentPath", "(", ")", ".", "getEntry", "(", ")", ")", ";", "int", "index", "=", "deletionPath", ...
Delete a leaf at a given path - deletions for non-leaves are not supported! @param deletionPath Path to delete
[ "Delete", "a", "leaf", "at", "a", "given", "path", "-", "deletions", "for", "non", "-", "leaves", "are", "not", "supported!" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L203-L235
63,480
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.createBulkLeafNodes
protected List<E> createBulkLeafNodes(List<E> objects) { int minEntries = leafMinimum; int maxEntries = leafCapacity; ArrayList<E> result = new ArrayList<>(); List<List<E>> partitions = settings.bulkSplitter.partition(objects, minEntries, maxEntries); for(List<E> partition : partitions) { //...
java
protected List<E> createBulkLeafNodes(List<E> objects) { int minEntries = leafMinimum; int maxEntries = leafCapacity; ArrayList<E> result = new ArrayList<>(); List<List<E>> partitions = settings.bulkSplitter.partition(objects, minEntries, maxEntries); for(List<E> partition : partitions) { //...
[ "protected", "List", "<", "E", ">", "createBulkLeafNodes", "(", "List", "<", "E", ">", "objects", ")", "{", "int", "minEntries", "=", "leafMinimum", ";", "int", "maxEntries", "=", "leafCapacity", ";", "ArrayList", "<", "E", ">", "result", "=", "new", "Ar...
Creates and returns the leaf nodes for bulk load. @param objects the objects to be inserted @return the array of leaf nodes containing the objects
[ "Creates", "and", "returns", "the", "leaf", "nodes", "for", "bulk", "load", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L337-L366
63,481
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.choosePath
protected IndexTreePath<E> choosePath(IndexTreePath<E> subtree, SpatialComparable mbr, int depth, int cur) { if(getLogger().isDebuggingFiner()) { getLogger().debugFiner("node " + subtree + ", depth " + depth); } N node = getNode(subtree.getEntry()); if(node == null) { throw new RuntimeExcep...
java
protected IndexTreePath<E> choosePath(IndexTreePath<E> subtree, SpatialComparable mbr, int depth, int cur) { if(getLogger().isDebuggingFiner()) { getLogger().debugFiner("node " + subtree + ", depth " + depth); } N node = getNode(subtree.getEntry()); if(node == null) { throw new RuntimeExcep...
[ "protected", "IndexTreePath", "<", "E", ">", "choosePath", "(", "IndexTreePath", "<", "E", ">", "subtree", ",", "SpatialComparable", "mbr", ",", "int", "depth", ",", "int", "cur", ")", "{", "if", "(", "getLogger", "(", ")", ".", "isDebuggingFiner", "(", ...
Chooses the best path of the specified subtree for insertion of the given mbr at the specified level. @param subtree the subtree to be tested for insertion @param mbr the mbr to be inserted @param depth Reinsertion depth, 1 indicates root level @param cur Current depth @return the path of the appropriate subtree to in...
[ "Chooses", "the", "best", "path", "of", "the", "specified", "subtree", "for", "insertion", "of", "the", "given", "mbr", "at", "the", "specified", "level", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L512-L544
63,482
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.split
private N split(N node) { // choose the split dimension and the split point int minimum = node.isLeaf() ? leafMinimum : dirMinimum; long[] split = settings.nodeSplitter.split(node, NodeArrayAdapter.STATIC, minimum); // New node final N newNode = node.isLeaf() ? createNewLeafNode() : createNewDirect...
java
private N split(N node) { // choose the split dimension and the split point int minimum = node.isLeaf() ? leafMinimum : dirMinimum; long[] split = settings.nodeSplitter.split(node, NodeArrayAdapter.STATIC, minimum); // New node final N newNode = node.isLeaf() ? createNewLeafNode() : createNewDirect...
[ "private", "N", "split", "(", "N", "node", ")", "{", "// choose the split dimension and the split point", "int", "minimum", "=", "node", ".", "isLeaf", "(", ")", "?", "leafMinimum", ":", "dirMinimum", ";", "long", "[", "]", "split", "=", "settings", ".", "no...
Splits the specified node and returns the newly created split node. @param node the node to be split @return the newly created split node
[ "Splits", "the", "specified", "node", "and", "returns", "the", "newly", "created", "split", "node", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L570-L585
63,483
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.reInsert
public void reInsert(N node, IndexTreePath<E> path, int[] offs) { final int depth = path.getPathCount(); long[] remove = BitsUtil.zero(node.getCapacity()); List<E> reInsertEntries = new ArrayList<>(offs.length); for(int i = 0; i < offs.length; i++) { reInsertEntries.add(node.getEntry(offs[i])); ...
java
public void reInsert(N node, IndexTreePath<E> path, int[] offs) { final int depth = path.getPathCount(); long[] remove = BitsUtil.zero(node.getCapacity()); List<E> reInsertEntries = new ArrayList<>(offs.length); for(int i = 0; i < offs.length; i++) { reInsertEntries.add(node.getEntry(offs[i])); ...
[ "public", "void", "reInsert", "(", "N", "node", ",", "IndexTreePath", "<", "E", ">", "path", ",", "int", "[", "]", "offs", ")", "{", "final", "int", "depth", "=", "path", ".", "getPathCount", "(", ")", ";", "long", "[", "]", "remove", "=", "BitsUti...
Reinserts the specified node at the specified level. @param node the node to be reinserted @param path the path to the node @param offs the nodes indexes to reinsert
[ "Reinserts", "the", "specified", "node", "at", "the", "specified", "level", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L594-L640
63,484
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.condenseTree
private void condenseTree(IndexTreePath<E> subtree, Stack<N> stack) { N node = getNode(subtree.getEntry()); // node is not root if(!isRoot(node)) { N parent = getNode(subtree.getParentPath().getEntry()); int index = subtree.getIndex(); if(hasUnderflow(node)) { if(parent.deleteEntry...
java
private void condenseTree(IndexTreePath<E> subtree, Stack<N> stack) { N node = getNode(subtree.getEntry()); // node is not root if(!isRoot(node)) { N parent = getNode(subtree.getParentPath().getEntry()); int index = subtree.getIndex(); if(hasUnderflow(node)) { if(parent.deleteEntry...
[ "private", "void", "condenseTree", "(", "IndexTreePath", "<", "E", ">", "subtree", ",", "Stack", "<", "N", ">", "stack", ")", "{", "N", "node", "=", "getNode", "(", "subtree", ".", "getEntry", "(", ")", ")", ";", "// node is not root", "if", "(", "!", ...
Condenses the tree after deletion of some nodes. @param subtree the subtree to be condensed @param stack the stack holding the nodes to be reinserted after the tree has been condensed
[ "Condenses", "the", "tree", "after", "deletion", "of", "some", "nodes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L720-L765
63,485
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.getLeafNodes
private void getLeafNodes(N node, List<E> result, int currentLevel) { // Level 1 are the leaf nodes, Level 2 is the one atop! if(currentLevel == 2) { for(int i = 0; i < node.getNumEntries(); i++) { result.add(node.getEntry(i)); } } else { for(int i = 0; i < node.getNumEntries()...
java
private void getLeafNodes(N node, List<E> result, int currentLevel) { // Level 1 are the leaf nodes, Level 2 is the one atop! if(currentLevel == 2) { for(int i = 0; i < node.getNumEntries(); i++) { result.add(node.getEntry(i)); } } else { for(int i = 0; i < node.getNumEntries()...
[ "private", "void", "getLeafNodes", "(", "N", "node", ",", "List", "<", "E", ">", "result", ",", "int", "currentLevel", ")", "{", "// Level 1 are the leaf nodes, Level 2 is the one atop!", "if", "(", "currentLevel", "==", "2", ")", "{", "for", "(", "int", "i", ...
Determines the entries pointing to the leaf nodes of the specified subtree. @param node the subtree @param result the result to store the ids in @param currentLevel the level of the node in the R-Tree
[ "Determines", "the", "entries", "pointing", "to", "the", "leaf", "nodes", "of", "the", "specified", "subtree", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L786-L798
63,486
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.angleDense
public static double angleDense(NumberVector v1, NumberVector v2) { final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <= dim2) ? dim1 : dim2; // Essentially, we want to compute this: // v1.transposeTimes(v2) / (v1.euclideanLength() * v2.euclideanLength()); ...
java
public static double angleDense(NumberVector v1, NumberVector v2) { final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <= dim2) ? dim1 : dim2; // Essentially, we want to compute this: // v1.transposeTimes(v2) / (v1.euclideanLength() * v2.euclideanLength()); ...
[ "public", "static", "double", "angleDense", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "final", "int", "dim1", "=", "v1", ".", "getDimensionality", "(", ")", ",", "dim2", "=", "v2", ".", "getDimensionality", "(", ")", ";", "final", "...
Compute the absolute cosine of the angle between two dense vectors. To convert it to radians, use <code>Math.acos(angle)</code>! @param v1 first vector @param v2 second vector @return Angle
[ "Compute", "the", "absolute", "cosine", "of", "the", "angle", "between", "two", "dense", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L95-L121
63,487
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.angleSparse
public static double angleSparse(SparseNumberVector v1, SparseNumberVector v2) { // TODO: exploit precomputed length, when available? double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), i2 = v2.iter(); while(v1.iterValid(i1) && v2.iterValid(i2)) { final int d1 = v1.iterDim(i1), d2 = v2.iterDi...
java
public static double angleSparse(SparseNumberVector v1, SparseNumberVector v2) { // TODO: exploit precomputed length, when available? double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), i2 = v2.iter(); while(v1.iterValid(i1) && v2.iterValid(i2)) { final int d1 = v1.iterDim(i1), d2 = v2.iterDi...
[ "public", "static", "double", "angleSparse", "(", "SparseNumberVector", "v1", ",", "SparseNumberVector", "v2", ")", "{", "// TODO: exploit precomputed length, when available?", "double", "l1", "=", "0.", ",", "l2", "=", "0.", ",", "cross", "=", "0.", ";", "int", ...
Compute the angle for sparse vectors. @param v1 First vector @param v2 Second vector @return angle
[ "Compute", "the", "angle", "for", "sparse", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L130-L170
63,488
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.angleSparseDense
public static double angleSparseDense(SparseNumberVector v1, NumberVector v2) { // TODO: exploit precomputed length, when available. final int dim2 = v2.getDimensionality(); double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), d2 = 0; while(v1.iterValid(i1)) { final int d1 = v1.iterDim(i1)...
java
public static double angleSparseDense(SparseNumberVector v1, NumberVector v2) { // TODO: exploit precomputed length, when available. final int dim2 = v2.getDimensionality(); double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), d2 = 0; while(v1.iterValid(i1)) { final int d1 = v1.iterDim(i1)...
[ "public", "static", "double", "angleSparseDense", "(", "SparseNumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "// TODO: exploit precomputed length, when available.", "final", "int", "dim2", "=", "v2", ".", "getDimensionality", "(", ")", ";", "double", "l1", ...
Compute the angle for a sparse and a dense vector. @param v1 Sparse first vector @param v2 Dense second vector @return angle
[ "Compute", "the", "angle", "for", "a", "sparse", "and", "a", "dense", "vector", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L179-L216
63,489
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.cosAngle
public static double cosAngle(NumberVector v1, NumberVector v2) { // Java Hotspot appears to optimize these better than if-then-else: return v1 instanceof SparseNumberVector ? // v2 instanceof SparseNumberVector ? // angleSparse((SparseNumberVector) v1, (SparseNumberVector) v2) : // ...
java
public static double cosAngle(NumberVector v1, NumberVector v2) { // Java Hotspot appears to optimize these better than if-then-else: return v1 instanceof SparseNumberVector ? // v2 instanceof SparseNumberVector ? // angleSparse((SparseNumberVector) v1, (SparseNumberVector) v2) : // ...
[ "public", "static", "double", "cosAngle", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "// Java Hotspot appears to optimize these better than if-then-else:", "return", "v1", "instanceof", "SparseNumberVector", "?", "//", "v2", "instanceof", "SparseNumberV...
Compute the absolute cosine of the angle between two vectors. To convert it to radians, use <code>Math.acos(angle)</code>! @param v1 first vector @param v2 second vector @return Angle
[ "Compute", "the", "absolute", "cosine", "of", "the", "angle", "between", "two", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L227-L236
63,490
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.minCosAngle
public static double minCosAngle(SpatialComparable v1, SpatialComparable v2) { if(v1 instanceof NumberVector && v2 instanceof NumberVector) { return cosAngle((NumberVector) v1, (NumberVector) v2); } final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <=...
java
public static double minCosAngle(SpatialComparable v1, SpatialComparable v2) { if(v1 instanceof NumberVector && v2 instanceof NumberVector) { return cosAngle((NumberVector) v1, (NumberVector) v2); } final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <=...
[ "public", "static", "double", "minCosAngle", "(", "SpatialComparable", "v1", ",", "SpatialComparable", "v2", ")", "{", "if", "(", "v1", "instanceof", "NumberVector", "&&", "v2", "instanceof", "NumberVector", ")", "{", "return", "cosAngle", "(", "(", "NumberVecto...
Compute the minimum angle between two rectangles. @param v1 first rectangle @param v2 second rectangle @return Angle
[ "Compute", "the", "minimum", "angle", "between", "two", "rectangles", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L245-L298
63,491
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.angle
public static double angle(NumberVector v1, NumberVector v2, NumberVector o) { final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(), dimo = o.getDimensionality(); final int mindim = (dim1 <= dim2) ? dim1 : dim2; // Essentially, we want to compute this: // v1' = v1 - o, v2' = v2...
java
public static double angle(NumberVector v1, NumberVector v2, NumberVector o) { final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(), dimo = o.getDimensionality(); final int mindim = (dim1 <= dim2) ? dim1 : dim2; // Essentially, we want to compute this: // v1' = v1 - o, v2' = v2...
[ "public", "static", "double", "angle", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ",", "NumberVector", "o", ")", "{", "final", "int", "dim1", "=", "v1", ".", "getDimensionality", "(", ")", ",", "dim2", "=", "v2", ".", "getDimensionality", "(", ...
Compute the angle between two vectors with respect to a reference point. @param v1 first vector @param v2 second vector @param o Origin @return Angle
[ "Compute", "the", "angle", "between", "two", "vectors", "with", "respect", "to", "a", "reference", "point", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L308-L339
63,492
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.dotDense
public static double dotDense(NumberVector v1, NumberVector v2) { final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <= dim2) ? dim1 : dim2; double dot = 0; for(int k = 0; k < mindim; k++) { dot += v1.doubleValue(k) * v2.doubleValue(k); } retur...
java
public static double dotDense(NumberVector v1, NumberVector v2) { final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <= dim2) ? dim1 : dim2; double dot = 0; for(int k = 0; k < mindim; k++) { dot += v1.doubleValue(k) * v2.doubleValue(k); } retur...
[ "public", "static", "double", "dotDense", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "final", "int", "dim1", "=", "v1", ".", "getDimensionality", "(", ")", ",", "dim2", "=", "v2", ".", "getDimensionality", "(", ")", ";", "final", "in...
Compute the dot product of two dense vectors. @param v1 first vector @param v2 second vector @return dot product
[ "Compute", "the", "dot", "product", "of", "two", "dense", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L348-L356
63,493
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.dotSparse
public static double dotSparse(SparseNumberVector v1, SparseNumberVector v2) { double dot = 0.; int i1 = v1.iter(), i2 = v2.iter(); while(v1.iterValid(i1) && v2.iterValid(i2)) { final int d1 = v1.iterDim(i1), d2 = v2.iterDim(i2); if(d1 < d2) { i1 = v1.iterAdvance(i1); } else ...
java
public static double dotSparse(SparseNumberVector v1, SparseNumberVector v2) { double dot = 0.; int i1 = v1.iter(), i2 = v2.iter(); while(v1.iterValid(i1) && v2.iterValid(i2)) { final int d1 = v1.iterDim(i1), d2 = v2.iterDim(i2); if(d1 < d2) { i1 = v1.iterAdvance(i1); } else ...
[ "public", "static", "double", "dotSparse", "(", "SparseNumberVector", "v1", ",", "SparseNumberVector", "v2", ")", "{", "double", "dot", "=", "0.", ";", "int", "i1", "=", "v1", ".", "iter", "(", ")", ",", "i2", "=", "v2", ".", "iter", "(", ")", ";", ...
Compute the dot product for two sparse vectors. @param v1 First vector @param v2 Second vector @return dot product
[ "Compute", "the", "dot", "product", "for", "two", "sparse", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L365-L383
63,494
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.dotSparseDense
public static double dotSparseDense(SparseNumberVector v1, NumberVector v2) { final int dim2 = v2.getDimensionality(); double dot = 0.; for(int i1 = v1.iter(); v1.iterValid(i1);) { final int d1 = v1.iterDim(i1); if(d1 >= dim2) { break; } dot += v1.iterDoubleValue(i1) * v2.dou...
java
public static double dotSparseDense(SparseNumberVector v1, NumberVector v2) { final int dim2 = v2.getDimensionality(); double dot = 0.; for(int i1 = v1.iter(); v1.iterValid(i1);) { final int d1 = v1.iterDim(i1); if(d1 >= dim2) { break; } dot += v1.iterDoubleValue(i1) * v2.dou...
[ "public", "static", "double", "dotSparseDense", "(", "SparseNumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "final", "int", "dim2", "=", "v2", ".", "getDimensionality", "(", ")", ";", "double", "dot", "=", "0.", ";", "for", "(", "int", "i1", "=...
Compute the dot product for a sparse and a dense vector. @param v1 Sparse first vector @param v2 Dense second vector @return dot product
[ "Compute", "the", "dot", "product", "for", "a", "sparse", "and", "a", "dense", "vector", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L392-L404
63,495
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.dot
public static double dot(NumberVector v1, NumberVector v2) { // Java Hotspot appears to optimize these better than if-then-else: return v1 instanceof SparseNumberVector ? // v2 instanceof SparseNumberVector ? // dotSparse((SparseNumberVector) v1, (SparseNumberVector) v2) : // dot...
java
public static double dot(NumberVector v1, NumberVector v2) { // Java Hotspot appears to optimize these better than if-then-else: return v1 instanceof SparseNumberVector ? // v2 instanceof SparseNumberVector ? // dotSparse((SparseNumberVector) v1, (SparseNumberVector) v2) : // dot...
[ "public", "static", "double", "dot", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "// Java Hotspot appears to optimize these better than if-then-else:", "return", "v1", "instanceof", "SparseNumberVector", "?", "//", "v2", "instanceof", "SparseNumberVector...
Compute the dot product of the angle between two vectors. @param v1 first vector @param v2 second vector @return Dot product
[ "Compute", "the", "dot", "product", "of", "the", "angle", "between", "two", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L413-L422
63,496
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.minDot
public static double minDot(SpatialComparable v1, SpatialComparable v2) { if(v1 instanceof NumberVector && v2 instanceof NumberVector) { return dot((NumberVector) v1, (NumberVector) v2); } final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <= dim2) ? d...
java
public static double minDot(SpatialComparable v1, SpatialComparable v2) { if(v1 instanceof NumberVector && v2 instanceof NumberVector) { return dot((NumberVector) v1, (NumberVector) v2); } final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(); final int mindim = (dim1 <= dim2) ? d...
[ "public", "static", "double", "minDot", "(", "SpatialComparable", "v1", ",", "SpatialComparable", "v2", ")", "{", "if", "(", "v1", "instanceof", "NumberVector", "&&", "v2", "instanceof", "NumberVector", ")", "{", "return", "dot", "(", "(", "NumberVector", ")",...
Compute the minimum angle between two rectangles, assuming unit length vectors @param v1 first rectangle @param v2 second rectangle @return Angle
[ "Compute", "the", "minimum", "angle", "between", "two", "rectangles", "assuming", "unit", "length", "vectors" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L432-L450
63,497
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.project
public static <V extends NumberVector> V project(V v, long[] selectedAttributes, NumberVector.Factory<V> factory) { int card = BitsUtil.cardinality(selectedAttributes); if(factory instanceof SparseNumberVector.Factory) { final SparseNumberVector.Factory<?> sfactory = (SparseNumberVector.Factory<?>) factor...
java
public static <V extends NumberVector> V project(V v, long[] selectedAttributes, NumberVector.Factory<V> factory) { int card = BitsUtil.cardinality(selectedAttributes); if(factory instanceof SparseNumberVector.Factory) { final SparseNumberVector.Factory<?> sfactory = (SparseNumberVector.Factory<?>) factor...
[ "public", "static", "<", "V", "extends", "NumberVector", ">", "V", "project", "(", "V", "v", ",", "long", "[", "]", "selectedAttributes", ",", "NumberVector", ".", "Factory", "<", "V", ">", "factory", ")", "{", "int", "card", "=", "BitsUtil", ".", "car...
Project a number vector to the specified attributes. @param v a NumberVector to project @param selectedAttributes the attributes selected for projection @param factory Vector factory @param <V> Vector type @return a new NumberVector as a projection on the specified attributes
[ "Project", "a", "number", "vector", "to", "the", "specified", "attributes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L579-L604
63,498
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/util/Core.java
Core.mergeWith
public void mergeWith(Core o) { o.num = this.num = (num < o.num ? num : o.num); }
java
public void mergeWith(Core o) { o.num = this.num = (num < o.num ? num : o.num); }
[ "public", "void", "mergeWith", "(", "Core", "o", ")", "{", "o", ".", "num", "=", "this", ".", "num", "=", "(", "num", "<", "o", ".", "num", "?", "num", ":", "o", ".", "num", ")", ";", "}" ]
Merge two cores. @param o Other core
[ "Merge", "two", "cores", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/util/Core.java#L49-L51
63,499
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/trivial/ByLabelClustering.java
ByLabelClustering.run
public Clustering<Model> run(Relation<?> relation) { HashMap<String, DBIDs> labelMap = multiple ? multipleAssignment(relation) : singleAssignment(relation); ModifiableDBIDs noiseids = DBIDUtil.newArray(); Clustering<Model> result = new Clustering<>("By Label Clustering", "bylabel-clustering"); for(Entr...
java
public Clustering<Model> run(Relation<?> relation) { HashMap<String, DBIDs> labelMap = multiple ? multipleAssignment(relation) : singleAssignment(relation); ModifiableDBIDs noiseids = DBIDUtil.newArray(); Clustering<Model> result = new Clustering<>("By Label Clustering", "bylabel-clustering"); for(Entr...
[ "public", "Clustering", "<", "Model", ">", "run", "(", "Relation", "<", "?", ">", "relation", ")", "{", "HashMap", "<", "String", ",", "DBIDs", ">", "labelMap", "=", "multiple", "?", "multipleAssignment", "(", "relation", ")", ":", "singleAssignment", "(",...
Run the actual clustering algorithm. @param relation The data input we use
[ "Run", "the", "actual", "clustering", "algorithm", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/trivial/ByLabelClustering.java#L133-L158