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,800
elki-project/elki
elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java
DoubleIntegerDBIDArrayList.addInternal
protected void addInternal(double dist, int id) { if(size == dists.length) { grow(); } dists[size] = dist; ids[size] = id; ++size; }
java
protected void addInternal(double dist, int id) { if(size == dists.length) { grow(); } dists[size] = dist; ids[size] = id; ++size; }
[ "protected", "void", "addInternal", "(", "double", "dist", ",", "int", "id", ")", "{", "if", "(", "size", "==", "dists", ".", "length", ")", "{", "grow", "(", ")", ";", "}", "dists", "[", "size", "]", "=", "dist", ";", "ids", "[", "size", "]", ...
Add an entry, consisting of distance and internal index. @param dist Distance @param id Internal index
[ "Add", "an", "entry", "consisting", "of", "distance", "and", "internal", "index", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java#L132-L139
63,801
elki-project/elki
elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java
DoubleIntegerDBIDArrayList.grow
protected void grow() { if(dists == EMPTY_DISTS) { dists = new double[INITIAL_SIZE]; ids = new int[INITIAL_SIZE]; return; } final int len = dists.length; final int newlength = len + (len >> 1) + 1; double[] odists = dists; dists = new double[newlength]; System.arraycopy(odi...
java
protected void grow() { if(dists == EMPTY_DISTS) { dists = new double[INITIAL_SIZE]; ids = new int[INITIAL_SIZE]; return; } final int len = dists.length; final int newlength = len + (len >> 1) + 1; double[] odists = dists; dists = new double[newlength]; System.arraycopy(odi...
[ "protected", "void", "grow", "(", ")", "{", "if", "(", "dists", "==", "EMPTY_DISTS", ")", "{", "dists", "=", "new", "double", "[", "INITIAL_SIZE", "]", ";", "ids", "=", "new", "int", "[", "INITIAL_SIZE", "]", ";", "return", ";", "}", "final", "int", ...
Grow the data storage.
[ "Grow", "the", "data", "storage", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java#L144-L158
63,802
elki-project/elki
elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java
DoubleIntegerDBIDArrayList.reverse
protected void reverse() { for(int i = 0, j = size - 1; i < j; i++, j--) { double tmpd = dists[j]; dists[j] = dists[i]; dists[i] = tmpd; int tmpi = ids[j]; ids[j] = ids[i]; ids[i] = tmpi; } }
java
protected void reverse() { for(int i = 0, j = size - 1; i < j; i++, j--) { double tmpd = dists[j]; dists[j] = dists[i]; dists[i] = tmpd; int tmpi = ids[j]; ids[j] = ids[i]; ids[i] = tmpi; } }
[ "protected", "void", "reverse", "(", ")", "{", "for", "(", "int", "i", "=", "0", ",", "j", "=", "size", "-", "1", ";", "i", "<", "j", ";", "i", "++", ",", "j", "--", ")", "{", "double", "tmpd", "=", "dists", "[", "j", "]", ";", "dists", "...
Reverse the list.
[ "Reverse", "the", "list", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java#L183-L192
63,803
elki-project/elki
elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java
DoubleIntegerDBIDArrayList.truncate
public void truncate(int newsize) { if(newsize < size) { double[] odists = dists; dists = new double[newsize]; System.arraycopy(odists, 0, dists, 0, newsize); int[] oids = ids; ids = new int[newsize]; System.arraycopy(oids, 0, ids, 0, newsize); size = newsize; } }
java
public void truncate(int newsize) { if(newsize < size) { double[] odists = dists; dists = new double[newsize]; System.arraycopy(odists, 0, dists, 0, newsize); int[] oids = ids; ids = new int[newsize]; System.arraycopy(oids, 0, ids, 0, newsize); size = newsize; } }
[ "public", "void", "truncate", "(", "int", "newsize", ")", "{", "if", "(", "newsize", "<", "size", ")", "{", "double", "[", "]", "odists", "=", "dists", ";", "dists", "=", "new", "double", "[", "newsize", "]", ";", "System", ".", "arraycopy", "(", "...
Truncate the list to the given size, freeing the memory. @param newsize New size
[ "Truncate", "the", "list", "to", "the", "given", "size", "freeing", "the", "memory", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDArrayList.java#L230-L240
63,804
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.arrangeVisualizations
private RectangleArranger<PlotItem> arrangeVisualizations(double width, double height) { if(!(width > 0. && height > 0.)) { LOG.warning("No size information during arrange()", new Throwable()); return new RectangleArranger<>(1., 1.); } RectangleArranger<PlotItem> plotmap = new RectangleArranger<...
java
private RectangleArranger<PlotItem> arrangeVisualizations(double width, double height) { if(!(width > 0. && height > 0.)) { LOG.warning("No size information during arrange()", new Throwable()); return new RectangleArranger<>(1., 1.); } RectangleArranger<PlotItem> plotmap = new RectangleArranger<...
[ "private", "RectangleArranger", "<", "PlotItem", ">", "arrangeVisualizations", "(", "double", "width", ",", "double", "height", ")", "{", "if", "(", "!", "(", "width", ">", "0.", "&&", "height", ">", "0.", ")", ")", "{", "LOG", ".", "warning", "(", "\"...
Recompute the layout of visualizations. @param width Initial width @param height Initial height @return Arrangement
[ "Recompute", "the", "layout", "of", "visualizations", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L190-L226
63,805
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.initialize
public void initialize(double ratio) { if(!(ratio > 0 && ratio < Double.POSITIVE_INFINITY)) { LOG.warning("Invalid ratio: " + ratio, new Throwable()); ratio = 1.4; } this.ratio = ratio; if(plot != null) { LOG.warning("Already initialized."); lazyRefresh(); return; } ...
java
public void initialize(double ratio) { if(!(ratio > 0 && ratio < Double.POSITIVE_INFINITY)) { LOG.warning("Invalid ratio: " + ratio, new Throwable()); ratio = 1.4; } this.ratio = ratio; if(plot != null) { LOG.warning("Already initialized."); lazyRefresh(); return; } ...
[ "public", "void", "initialize", "(", "double", "ratio", ")", "{", "if", "(", "!", "(", "ratio", ">", "0", "&&", "ratio", "<", "Double", ".", "POSITIVE_INFINITY", ")", ")", "{", "LOG", ".", "warning", "(", "\"Invalid ratio: \"", "+", "ratio", ",", "new"...
Initialize the plot. @param ratio Initial ratio
[ "Initialize", "the", "plot", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L233-L248
63,806
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.initializePlot
private void initializePlot() { plot = new VisualizationPlot(); { // Add a background element: CSSClass cls = new CSSClass(this, "background"); final String bgcol = context.getStyleLibrary().getBackgroundColor(StyleLibrary.PAGE); cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, bgcol); p...
java
private void initializePlot() { plot = new VisualizationPlot(); { // Add a background element: CSSClass cls = new CSSClass(this, "background"); final String bgcol = context.getStyleLibrary().getBackgroundColor(StyleLibrary.PAGE); cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, bgcol); p...
[ "private", "void", "initializePlot", "(", ")", "{", "plot", "=", "new", "VisualizationPlot", "(", ")", ";", "{", "// Add a background element:", "CSSClass", "cls", "=", "new", "CSSClass", "(", "this", ",", "\"background\"", ")", ";", "final", "String", "bgcol"...
Initialize the SVG plot.
[ "Initialize", "the", "SVG", "plot", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L348-L391
63,807
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.embedOrThumbnail
private Visualization embedOrThumbnail(final int thumbsize, PlotItem it, VisualizationTask task, Element parent) { final Visualization vis; if(!single) { vis = task.getFactory().makeVisualizationOrThumbnail(context, task, plot, it.w, it.h, it.proj, thumbsize); } else { vis = task.getFactory(...
java
private Visualization embedOrThumbnail(final int thumbsize, PlotItem it, VisualizationTask task, Element parent) { final Visualization vis; if(!single) { vis = task.getFactory().makeVisualizationOrThumbnail(context, task, plot, it.w, it.h, it.proj, thumbsize); } else { vis = task.getFactory(...
[ "private", "Visualization", "embedOrThumbnail", "(", "final", "int", "thumbsize", ",", "PlotItem", "it", ",", "VisualizationTask", "task", ",", "Element", "parent", ")", "{", "final", "Visualization", "vis", ";", "if", "(", "!", "single", ")", "{", "vis", "=...
Produce thumbnail for a visualizer. @param thumbsize Thumbnail size @param it Plot item @param task Task @param parent Parent element to draw to
[ "Produce", "thumbnail", "for", "a", "visualizer", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L401-L418
63,808
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.visibleInOverview
protected boolean visibleInOverview(VisualizationTask task) { return task.isVisible() && !task.has(single ? RenderFlag.NO_EMBED : RenderFlag.NO_THUMBNAIL); }
java
protected boolean visibleInOverview(VisualizationTask task) { return task.isVisible() && !task.has(single ? RenderFlag.NO_EMBED : RenderFlag.NO_THUMBNAIL); }
[ "protected", "boolean", "visibleInOverview", "(", "VisualizationTask", "task", ")", "{", "return", "task", ".", "isVisible", "(", ")", "&&", "!", "task", ".", "has", "(", "single", "?", "RenderFlag", ".", "NO_EMBED", ":", "RenderFlag", ".", "NO_THUMBNAIL", "...
Test whether a task should be displayed in the overview plot. @param task Task to display @return visibility
[ "Test", "whether", "a", "task", "should", "be", "displayed", "in", "the", "overview", "plot", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L483-L485
63,809
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.recalcViewbox
private void recalcViewbox() { final Element root = plot.getRoot(); // Reset plot attributes SVGUtil.setAtt(root, SVGConstants.SVG_WIDTH_ATTRIBUTE, "20cm"); SVGUtil.setAtt(root, SVGConstants.SVG_HEIGHT_ATTRIBUTE, SVGUtil.fmt(20 * plotmap.getHeight() / plotmap.getWidth()) + "cm"); String vb = "0 0 " ...
java
private void recalcViewbox() { final Element root = plot.getRoot(); // Reset plot attributes SVGUtil.setAtt(root, SVGConstants.SVG_WIDTH_ATTRIBUTE, "20cm"); SVGUtil.setAtt(root, SVGConstants.SVG_HEIGHT_ATTRIBUTE, SVGUtil.fmt(20 * plotmap.getHeight() / plotmap.getWidth()) + "cm"); String vb = "0 0 " ...
[ "private", "void", "recalcViewbox", "(", ")", "{", "final", "Element", "root", "=", "plot", ".", "getRoot", "(", ")", ";", "// Reset plot attributes", "SVGUtil", ".", "setAtt", "(", "root", ",", "SVGConstants", ".", "SVG_WIDTH_ATTRIBUTE", ",", "\"20cm\"", ")",...
Recompute the view box of the plot.
[ "Recompute", "the", "view", "box", "of", "the", "plot", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L490-L497
63,810
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.triggerSubplotSelectEvent
protected void triggerSubplotSelectEvent(PlotItem it) { // forward event to all listeners. for(ActionListener actionListener : actionListeners) { actionListener.actionPerformed(new DetailViewSelectedEvent(this, ActionEvent.ACTION_PERFORMED, null, 0, it)); } }
java
protected void triggerSubplotSelectEvent(PlotItem it) { // forward event to all listeners. for(ActionListener actionListener : actionListeners) { actionListener.actionPerformed(new DetailViewSelectedEvent(this, ActionEvent.ACTION_PERFORMED, null, 0, it)); } }
[ "protected", "void", "triggerSubplotSelectEvent", "(", "PlotItem", "it", ")", "{", "// forward event to all listeners.", "for", "(", "ActionListener", "actionListener", ":", "actionListeners", ")", "{", "actionListener", ".", "actionPerformed", "(", "new", "DetailViewSele...
When a subplot was selected, forward the event to listeners. @param it PlotItem selected
[ "When", "a", "subplot", "was", "selected", "forward", "the", "event", "to", "listeners", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L523-L528
63,811
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/GeneralizedParetoDistribution.java
GeneralizedParetoDistribution.cdf
public static double cdf(double val, double mu, double sigma, double xi) { val = (val - mu) / sigma; // Check support: if(val < 0) { return 0.; } if(xi < 0 && val > -1. / xi) { return 1.; } return 1 - FastMath.pow(1 + xi * val, -1. / xi); }
java
public static double cdf(double val, double mu, double sigma, double xi) { val = (val - mu) / sigma; // Check support: if(val < 0) { return 0.; } if(xi < 0 && val > -1. / xi) { return 1.; } return 1 - FastMath.pow(1 + xi * val, -1. / xi); }
[ "public", "static", "double", "cdf", "(", "double", "val", ",", "double", "mu", ",", "double", "sigma", ",", "double", "xi", ")", "{", "val", "=", "(", "val", "-", "mu", ")", "/", "sigma", ";", "// Check support:", "if", "(", "val", "<", "0", ")", ...
CDF of GPD distribution @param val Value @param mu Location parameter mu @param sigma Scale parameter sigma @param xi Shape parameter xi (= -kappa) @return CDF at position x.
[ "CDF", "of", "GPD", "distribution" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/GeneralizedParetoDistribution.java#L169-L179
63,812
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/GeneralizedParetoDistribution.java
GeneralizedParetoDistribution.quantile
public static double quantile(double val, double mu, double sigma, double xi) { if(val < 0.0 || val > 1.0) { return Double.NaN; } if(xi == 0.) { return mu - sigma * FastMath.log(1 - val); } return mu - sigma / xi * (1 - FastMath.pow(1 - val, -xi)); }
java
public static double quantile(double val, double mu, double sigma, double xi) { if(val < 0.0 || val > 1.0) { return Double.NaN; } if(xi == 0.) { return mu - sigma * FastMath.log(1 - val); } return mu - sigma / xi * (1 - FastMath.pow(1 - val, -xi)); }
[ "public", "static", "double", "quantile", "(", "double", "val", ",", "double", "mu", ",", "double", "sigma", ",", "double", "xi", ")", "{", "if", "(", "val", "<", "0.0", "||", "val", ">", "1.0", ")", "{", "return", "Double", ".", "NaN", ";", "}", ...
Quantile function of GPD distribution @param val Value @param mu Location parameter mu @param sigma Scale parameter sigma @param xi Shape parameter xi (= -kappa) @return Quantile function at position x.
[ "Quantile", "function", "of", "GPD", "distribution" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/GeneralizedParetoDistribution.java#L195-L203
63,813
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/benchmark/RangeQueryBenchmarkAlgorithm.java
RangeQueryBenchmarkAlgorithm.run
public Result run(Database database, Relation<O> relation, Relation<NumberVector> radrel) { if(queries != null) { throw new AbortException("This 'run' method will not use the given query set!"); } // Get a distance and kNN query instance. DistanceQuery<O> distQuery = database.getDistanceQuery(rela...
java
public Result run(Database database, Relation<O> relation, Relation<NumberVector> radrel) { if(queries != null) { throw new AbortException("This 'run' method will not use the given query set!"); } // Get a distance and kNN query instance. DistanceQuery<O> distQuery = database.getDistanceQuery(rela...
[ "public", "Result", "run", "(", "Database", "database", ",", "Relation", "<", "O", ">", "relation", ",", "Relation", "<", "NumberVector", ">", "radrel", ")", "{", "if", "(", "queries", "!=", "null", ")", "{", "throw", "new", "AbortException", "(", "\"Thi...
Run the algorithm, with separate radius relation @param database Database @param relation Relation @param radrel Radius relation @return Null result
[ "Run", "the", "algorithm", "with", "separate", "radius", "relation" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/benchmark/RangeQueryBenchmarkAlgorithm.java#L141-L170
63,814
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.random
public static long[] random(int card, int capacity, Random random) { if(card < 0 || card > capacity) { throw new IllegalArgumentException("Cannot set " + card + " out of " + capacity + " bits."); } // FIXME: Avoid recomputing the cardinality. if(card < capacity >>> 1) { long[] bitset = BitsU...
java
public static long[] random(int card, int capacity, Random random) { if(card < 0 || card > capacity) { throw new IllegalArgumentException("Cannot set " + card + " out of " + capacity + " bits."); } // FIXME: Avoid recomputing the cardinality. if(card < capacity >>> 1) { long[] bitset = BitsU...
[ "public", "static", "long", "[", "]", "random", "(", "int", "card", ",", "int", "capacity", ",", "Random", "random", ")", "{", "if", "(", "card", "<", "0", "||", "card", ">", "capacity", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Can...
Creates a new BitSet of fixed cardinality with randomly set bits. @param card the cardinality of the BitSet to create @param capacity the capacity of the BitSet to create - the randomly generated indices of the bits set to true will be uniformly distributed between 0 (inclusive) and capacity (exclusive) @param random ...
[ "Creates", "a", "new", "BitSet", "of", "fixed", "cardinality", "with", "randomly", "set", "bits", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L134-L155
63,815
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.copy
public static long[] copy(long[] v, int mincap) { int words = ((mincap - 1) >>> LONG_LOG2_SIZE) + 1; if(v.length == words) { return Arrays.copyOf(v, v.length); } long[] ret = new long[words]; System.arraycopy(v, 0, ret, 0, Math.min(v.length, words)); return ret; }
java
public static long[] copy(long[] v, int mincap) { int words = ((mincap - 1) >>> LONG_LOG2_SIZE) + 1; if(v.length == words) { return Arrays.copyOf(v, v.length); } long[] ret = new long[words]; System.arraycopy(v, 0, ret, 0, Math.min(v.length, words)); return ret; }
[ "public", "static", "long", "[", "]", "copy", "(", "long", "[", "]", "v", ",", "int", "mincap", ")", "{", "int", "words", "=", "(", "(", "mincap", "-", "1", ")", ">>>", "LONG_LOG2_SIZE", ")", "+", "1", ";", "if", "(", "v", ".", "length", "==", ...
Copy a bitset. Note: Bits beyond mincap <em>may</em> be retained! @param v Array to copy @param mincap Target <em>minimum</em> capacity @return Copy with space for at least "capacity" bits
[ "Copy", "a", "bitset", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L176-L184
63,816
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.isZero
public static boolean isZero(long[] v) { for(int i = 0; i < v.length; i++) { if(v[i] != 0) { return false; } } return true; }
java
public static boolean isZero(long[] v) { for(int i = 0; i < v.length; i++) { if(v[i] != 0) { return false; } } return true; }
[ "public", "static", "boolean", "isZero", "(", "long", "[", "]", "v", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "v", ".", "length", ";", "i", "++", ")", "{", "if", "(", "v", "[", "i", "]", "!=", "0", ")", "{", "return", "f...
Test for the bitstring to be all-zero. @param v Bitstring @return true when all zero
[ "Test", "for", "the", "bitstring", "to", "be", "all", "-", "zero", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L291-L298
63,817
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.setI
public static long[] setI(long[] v, long[] o) { assert (o.length <= v.length) : "Bit set sizes do not agree."; final int max = Math.min(v.length, o.length); for(int i = 0; i < max; i++) { v[i] = o[i]; } return v; }
java
public static long[] setI(long[] v, long[] o) { assert (o.length <= v.length) : "Bit set sizes do not agree."; final int max = Math.min(v.length, o.length); for(int i = 0; i < max; i++) { v[i] = o[i]; } return v; }
[ "public", "static", "long", "[", "]", "setI", "(", "long", "[", "]", "v", ",", "long", "[", "]", "o", ")", "{", "assert", "(", "o", ".", "length", "<=", "v", ".", "length", ")", ":", "\"Bit set sizes do not agree.\"", ";", "final", "int", "max", "=...
Put o onto v in-place, i.e. v = o @param v Primary object @param o data to initialize to. @return v
[ "Put", "o", "onto", "v", "in", "-", "place", "i", ".", "e", ".", "v", "=", "o" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L381-L388
63,818
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.onesI
public static void onesI(long[] v, int bits) { final int fillWords = bits >>> LONG_LOG2_SIZE; final int fillBits = bits & LONG_LOG2_MASK; Arrays.fill(v, 0, fillWords, LONG_ALL_BITS); if(fillBits > 0) { v[fillWords] = (1L << fillBits) - 1; } if(fillWords + 1 < v.length) { Arrays.fill(...
java
public static void onesI(long[] v, int bits) { final int fillWords = bits >>> LONG_LOG2_SIZE; final int fillBits = bits & LONG_LOG2_MASK; Arrays.fill(v, 0, fillWords, LONG_ALL_BITS); if(fillBits > 0) { v[fillWords] = (1L << fillBits) - 1; } if(fillWords + 1 < v.length) { Arrays.fill(...
[ "public", "static", "void", "onesI", "(", "long", "[", "]", "v", ",", "int", "bits", ")", "{", "final", "int", "fillWords", "=", "bits", ">>>", "LONG_LOG2_SIZE", ";", "final", "int", "fillBits", "=", "bits", "&", "LONG_LOG2_MASK", ";", "Arrays", ".", "...
Fill a vector initialized with "bits" ones. @param v Vector to fill. @param bits Size
[ "Fill", "a", "vector", "initialized", "with", "bits", "ones", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L443-L453
63,819
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.xorI
public static long[] xorI(long[] v, long[] o) { assert (o.length <= v.length) : "Bit set sizes do not agree."; for(int i = 0; i < o.length; i++) { v[i] ^= o[i]; } return v; }
java
public static long[] xorI(long[] v, long[] o) { assert (o.length <= v.length) : "Bit set sizes do not agree."; for(int i = 0; i < o.length; i++) { v[i] ^= o[i]; } return v; }
[ "public", "static", "long", "[", "]", "xorI", "(", "long", "[", "]", "v", ",", "long", "[", "]", "o", ")", "{", "assert", "(", "o", ".", "length", "<=", "v", ".", "length", ")", ":", "\"Bit set sizes do not agree.\"", ";", "for", "(", "int", "i", ...
XOR o onto v in-place, i.e. v ^= o @param v Primary object @param o data to xor @return v
[ "XOR", "o", "onto", "v", "in", "-", "place", "i", ".", "e", ".", "v", "^", "=", "o" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L475-L481
63,820
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.orI
public static long[] orI(long[] v, long[] o) { assert (o.length <= v.length) : "Bit set sizes do not agree."; final int max = Math.min(v.length, o.length); for(int i = 0; i < max; i++) { v[i] |= o[i]; } return v; }
java
public static long[] orI(long[] v, long[] o) { assert (o.length <= v.length) : "Bit set sizes do not agree."; final int max = Math.min(v.length, o.length); for(int i = 0; i < max; i++) { v[i] |= o[i]; } return v; }
[ "public", "static", "long", "[", "]", "orI", "(", "long", "[", "]", "v", ",", "long", "[", "]", "o", ")", "{", "assert", "(", "o", ".", "length", "<=", "v", ".", "length", ")", ":", "\"Bit set sizes do not agree.\"", ";", "final", "int", "max", "="...
OR o onto v in-place, i.e. v |= o @param v Primary object @param o data to or @return v
[ "OR", "o", "onto", "v", "in", "-", "place", "i", ".", "e", ".", "v", "|", "=", "o" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L533-L540
63,821
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.andI
public static long[] andI(long[] v, long[] o) { int i = 0; for(; i < o.length; i++) { v[i] &= o[i]; } // Zero higher words Arrays.fill(v, i, v.length, 0); return v; }
java
public static long[] andI(long[] v, long[] o) { int i = 0; for(; i < o.length; i++) { v[i] &= o[i]; } // Zero higher words Arrays.fill(v, i, v.length, 0); return v; }
[ "public", "static", "long", "[", "]", "andI", "(", "long", "[", "]", "v", ",", "long", "[", "]", "o", ")", "{", "int", "i", "=", "0", ";", "for", "(", ";", "i", "<", "o", ".", "length", ";", "i", "++", ")", "{", "v", "[", "i", "]", "&="...
AND o onto v in-place, i.e. v &amp;= o @param v Primary object @param o data to and @return v
[ "AND", "o", "onto", "v", "in", "-", "place", "i", ".", "e", ".", "v", "&amp", ";", "=", "o" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L594-L602
63,822
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.nandI
public static long[] nandI(long[] v, long[] o) { int i = 0; for(; i < o.length; i++) { v[i] &= ~o[i]; } return v; }
java
public static long[] nandI(long[] v, long[] o) { int i = 0; for(; i < o.length; i++) { v[i] &= ~o[i]; } return v; }
[ "public", "static", "long", "[", "]", "nandI", "(", "long", "[", "]", "v", ",", "long", "[", "]", "o", ")", "{", "int", "i", "=", "0", ";", "for", "(", ";", "i", "<", "o", ".", "length", ";", "i", "++", ")", "{", "v", "[", "i", "]", "&=...
NOTAND o onto v in-place, i.e. v &amp;= ~o @param v Primary object @param o data to and @return v
[ "NOTAND", "o", "onto", "v", "in", "-", "place", "i", ".", "e", ".", "v", "&amp", ";", "=", "~o" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L679-L685
63,823
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.invertI
public static long[] invertI(long[] v) { for(int i = 0; i < v.length; i++) { v[i] = ~v[i]; } return v; }
java
public static long[] invertI(long[] v) { for(int i = 0; i < v.length; i++) { v[i] = ~v[i]; } return v; }
[ "public", "static", "long", "[", "]", "invertI", "(", "long", "[", "]", "v", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "v", ".", "length", ";", "i", "++", ")", "{", "v", "[", "i", "]", "=", "~", "v", "[", "i", "]", ";",...
Invert v in-place. @param v Object to invert @return v
[ "Invert", "v", "in", "-", "place", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L693-L698
63,824
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.cycleLeftC
public static long cycleLeftC(long v, int shift, int len) { return shift == 0 ? v : shift < 0 ? cycleRightC(v, -shift, len) : // (((v) << (shift)) | ((v) >>> ((len) - (shift)))) & ((1 << len) - 1); }
java
public static long cycleLeftC(long v, int shift, int len) { return shift == 0 ? v : shift < 0 ? cycleRightC(v, -shift, len) : // (((v) << (shift)) | ((v) >>> ((len) - (shift)))) & ((1 << len) - 1); }
[ "public", "static", "long", "cycleLeftC", "(", "long", "v", ",", "int", "shift", ",", "int", "len", ")", "{", "return", "shift", "==", "0", "?", "v", ":", "shift", "<", "0", "?", "cycleRightC", "(", "v", ",", "-", "shift", ",", "len", ")", ":", ...
Rotate a long to the left, cyclic with length len @param v Bits @param shift Shift value @param len Length @return cycled bit set
[ "Rotate", "a", "long", "to", "the", "left", "cyclic", "with", "length", "len" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L839-L842
63,825
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.cycleLeftI
public static long[] cycleLeftI(long[] v, int shift, int len) { long[] t = copy(v, len, shift); return orI(shiftRightI(v, len - shift), truncateI(t, len)); }
java
public static long[] cycleLeftI(long[] v, int shift, int len) { long[] t = copy(v, len, shift); return orI(shiftRightI(v, len - shift), truncateI(t, len)); }
[ "public", "static", "long", "[", "]", "cycleLeftI", "(", "long", "[", "]", "v", ",", "int", "shift", ",", "int", "len", ")", "{", "long", "[", "]", "t", "=", "copy", "(", "v", ",", "len", ",", "shift", ")", ";", "return", "orI", "(", "shiftRigh...
Cycle a bitstring to the right. @param v Bit string @param shift Number of steps to cycle @param len Length
[ "Cycle", "a", "bitstring", "to", "the", "right", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L851-L854
63,826
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.numberOfTrailingZerosSigned
public static int numberOfTrailingZerosSigned(long[] v) { for(int p = 0;; p++) { if(p == v.length) { return -1; } if(v[p] != 0) { return Long.numberOfTrailingZeros(v[p]) + p * Long.SIZE; } } }
java
public static int numberOfTrailingZerosSigned(long[] v) { for(int p = 0;; p++) { if(p == v.length) { return -1; } if(v[p] != 0) { return Long.numberOfTrailingZeros(v[p]) + p * Long.SIZE; } } }
[ "public", "static", "int", "numberOfTrailingZerosSigned", "(", "long", "[", "]", "v", ")", "{", "for", "(", "int", "p", "=", "0", ";", ";", "p", "++", ")", "{", "if", "(", "p", "==", "v", ".", "length", ")", "{", "return", "-", "1", ";", "}", ...
Find the number of trailing zeros. @param v Bitset @return Position of first set bit, -1 if no set bit was found.
[ "Find", "the", "number", "of", "trailing", "zeros", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1063-L1072
63,827
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.numberOfLeadingZerosSigned
public static int numberOfLeadingZerosSigned(long[] v) { for(int p = 0, ip = v.length - 1; p < v.length; p++, ip--) { if(v[ip] != 0) { return Long.numberOfLeadingZeros(v[ip]) + p * Long.SIZE; } } return -1; }
java
public static int numberOfLeadingZerosSigned(long[] v) { for(int p = 0, ip = v.length - 1; p < v.length; p++, ip--) { if(v[ip] != 0) { return Long.numberOfLeadingZeros(v[ip]) + p * Long.SIZE; } } return -1; }
[ "public", "static", "int", "numberOfLeadingZerosSigned", "(", "long", "[", "]", "v", ")", "{", "for", "(", "int", "p", "=", "0", ",", "ip", "=", "v", ".", "length", "-", "1", ";", "p", "<", "v", ".", "length", ";", "p", "++", ",", "ip", "--", ...
Find the number of leading zeros. @param v Bitset @return Position of first set bit, -1 if no set bit was found.
[ "Find", "the", "number", "of", "leading", "zeros", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1134-L1141
63,828
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.previousClearBit
public static int previousClearBit(long v, int start) { if(start < 0) { return -1; } start = start < Long.SIZE ? start : Long.SIZE - 1; long cur = ~v & (LONG_ALL_BITS >>> -(start + 1)); return cur == 0 ? -1 : 63 - Long.numberOfLeadingZeros(cur); }
java
public static int previousClearBit(long v, int start) { if(start < 0) { return -1; } start = start < Long.SIZE ? start : Long.SIZE - 1; long cur = ~v & (LONG_ALL_BITS >>> -(start + 1)); return cur == 0 ? -1 : 63 - Long.numberOfLeadingZeros(cur); }
[ "public", "static", "int", "previousClearBit", "(", "long", "v", ",", "int", "start", ")", "{", "if", "(", "start", "<", "0", ")", "{", "return", "-", "1", ";", "}", "start", "=", "start", "<", "Long", ".", "SIZE", "?", "start", ":", "Long", ".",...
Find the previous clear bit. @param v Values to process @param start Start position (inclusive) @return Position of previous clear bit, or -1.
[ "Find", "the", "previous", "clear", "bit", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1262-L1269
63,829
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.nextSetBit
public static int nextSetBit(long v, int start) { if(start >= Long.SIZE) { return -1; } start = start < 0 ? 0 : start; long cur = v & (LONG_ALL_BITS << start); return cur == 0 ? -1 : cur == LONG_ALL_BITS ? 0 : Long.numberOfTrailingZeros(cur); }
java
public static int nextSetBit(long v, int start) { if(start >= Long.SIZE) { return -1; } start = start < 0 ? 0 : start; long cur = v & (LONG_ALL_BITS << start); return cur == 0 ? -1 : cur == LONG_ALL_BITS ? 0 : Long.numberOfTrailingZeros(cur); }
[ "public", "static", "int", "nextSetBit", "(", "long", "v", ",", "int", "start", ")", "{", "if", "(", "start", ">=", "Long", ".", "SIZE", ")", "{", "return", "-", "1", ";", "}", "start", "=", "start", "<", "0", "?", "0", ":", "start", ";", "long...
Find the next set bit. @param v Value to process @param start Start position (inclusive) @return Position of next set bit, or -1.
[ "Find", "the", "next", "set", "bit", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1307-L1314
63,830
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.intersect
public static boolean intersect(long[] x, long[] y) { final int min = (x.length < y.length) ? x.length : y.length; for(int i = 0; i < min; i++) { if((x[i] & y[i]) != 0L) { return true; } } return false; }
java
public static boolean intersect(long[] x, long[] y) { final int min = (x.length < y.length) ? x.length : y.length; for(int i = 0; i < min; i++) { if((x[i] & y[i]) != 0L) { return true; } } return false; }
[ "public", "static", "boolean", "intersect", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "final", "int", "min", "=", "(", "x", ".", "length", "<", "y", ".", "length", ")", "?", "x", ".", "length", ":", "y", ".", "length", ...
Test whether two Bitsets intersect. @param x First bitset @param y Second bitset @return {@code true} when the bitsets intersect.
[ "Test", "whether", "two", "Bitsets", "intersect", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1434-L1442
63,831
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.intersectionSize
public static int intersectionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int res = 0; for(int i = 0; i < min; i++) { res += Long.bitCount(x[i] & y[i]); } return res; }
java
public static int intersectionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int res = 0; for(int i = 0; i < min; i++) { res += Long.bitCount(x[i] & y[i]); } return res; }
[ "public", "static", "int", "intersectionSize", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "final", "int", "lx", "=", "x", ".", "length", ",", "ly", "=", "y", ".", "length", ";", "final", "int", "min", "=", "(", "lx", "<",...
Compute the intersection size of two Bitsets. @param x First bitset @param y Second bitset @return Intersection size
[ "Compute", "the", "intersection", "size", "of", "two", "Bitsets", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1462-L1470
63,832
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.unionSize
public static int unionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int i = 0, res = 0; for(; i < min; i++) { res += Long.bitCount(x[i] | y[i]); } for(; i < lx; i++) { res += Long.bitCount(x[i]); } for(; i < ly; i++) ...
java
public static int unionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int i = 0, res = 0; for(; i < min; i++) { res += Long.bitCount(x[i] | y[i]); } for(; i < lx; i++) { res += Long.bitCount(x[i]); } for(; i < ly; i++) ...
[ "public", "static", "int", "unionSize", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "final", "int", "lx", "=", "x", ".", "length", ",", "ly", "=", "y", ".", "length", ";", "final", "int", "min", "=", "(", "lx", "<", "ly"...
Compute the union size of two Bitsets. @param x First bitset @param y Second bitset @return Union size
[ "Compute", "the", "union", "size", "of", "two", "Bitsets", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1490-L1504
63,833
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.equal
public static boolean equal(long[] x, long[] y) { if(x == null || y == null) { return (x == null) && (y == null); } int p = Math.min(x.length, y.length) - 1; for(int i = x.length - 1; i > p; i--) { if(x[i] != 0L) { return false; } } for(int i = y.length - 1; i > p; i--)...
java
public static boolean equal(long[] x, long[] y) { if(x == null || y == null) { return (x == null) && (y == null); } int p = Math.min(x.length, y.length) - 1; for(int i = x.length - 1; i > p; i--) { if(x[i] != 0L) { return false; } } for(int i = y.length - 1; i > p; i--)...
[ "public", "static", "boolean", "equal", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "if", "(", "x", "==", "null", "||", "y", "==", "null", ")", "{", "return", "(", "x", "==", "null", ")", "&&", "(", "y", "==", "null", ...
Test two bitsets for equality @param x First bitset @param y Second bitset @return {@code true} when the bitsets are equal
[ "Test", "two", "bitsets", "for", "equality" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1570-L1591
63,834
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.compare
public static int compare(long[] x, long[] y) { if(x == null) { return (y == null) ? 0 : -1; } if(y == null) { return +1; } int p = Math.min(x.length, y.length) - 1; for(int i = x.length - 1; i > p; i--) { if(x[i] != 0) { return +1; } } for(int i = y.lengt...
java
public static int compare(long[] x, long[] y) { if(x == null) { return (y == null) ? 0 : -1; } if(y == null) { return +1; } int p = Math.min(x.length, y.length) - 1; for(int i = x.length - 1; i > p; i--) { if(x[i] != 0) { return +1; } } for(int i = y.lengt...
[ "public", "static", "int", "compare", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "if", "(", "x", "==", "null", ")", "{", "return", "(", "y", "==", "null", ")", "?", "0", ":", "-", "1", ";", "}", "if", "(", "y", "=="...
Compare two bitsets. @param x First bitset @param y Second bitset @return Comparison result
[ "Compare", "two", "bitsets", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1611-L1636
63,835
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/split/distribution/DistanceEntry.java
DistanceEntry.compareTo
@Override public int compareTo(DistanceEntry<E> o) { int comp = Double.compare(distance, o.distance); return comp; // return comp != 0 ? comp : // entry.getEntryID().compareTo(o.entry.getEntryID()); }
java
@Override public int compareTo(DistanceEntry<E> o) { int comp = Double.compare(distance, o.distance); return comp; // return comp != 0 ? comp : // entry.getEntryID().compareTo(o.entry.getEntryID()); }
[ "@", "Override", "public", "int", "compareTo", "(", "DistanceEntry", "<", "E", ">", "o", ")", "{", "int", "comp", "=", "Double", ".", "compare", "(", "distance", ",", "o", ".", "distance", ")", ";", "return", "comp", ";", "// return comp != 0 ? comp :", ...
Compares this object with the specified object for order. @param o the Object to be compared. @return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. @throws ClassCastException if the specified object's type prevents it from being compared to...
[ "Compares", "this", "object", "with", "the", "specified", "object", "for", "order", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/split/distribution/DistanceEntry.java#L85-L91
63,836
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mktab/MkTabTreeIndex.java
MkTabTreeIndex.knnDistances
private double[] knnDistances(O object) { KNNList knns = knnq.getKNNForObject(object, getKmax() - 1); double[] distances = new double[getKmax()]; int i = 0; for(DoubleDBIDListIter iter = knns.iter(); iter.valid() && i < getKmax(); iter.advance(), i++) { distances[i] = iter.doubleValue(); } ...
java
private double[] knnDistances(O object) { KNNList knns = knnq.getKNNForObject(object, getKmax() - 1); double[] distances = new double[getKmax()]; int i = 0; for(DoubleDBIDListIter iter = knns.iter(); iter.valid() && i < getKmax(); iter.advance(), i++) { distances[i] = iter.doubleValue(); } ...
[ "private", "double", "[", "]", "knnDistances", "(", "O", "object", ")", "{", "KNNList", "knns", "=", "knnq", ".", "getKNNForObject", "(", "object", ",", "getKmax", "(", ")", "-", "1", ")", ";", "double", "[", "]", "distances", "=", "new", "double", "...
Returns the knn distance of the object with the specified id. @param object the query object @return the knn distance of the object with the specified id
[ "Returns", "the", "knn", "distance", "of", "the", "object", "with", "the", "specified", "id", "." ]
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/mktab/MkTabTreeIndex.java#L86-L94
63,837
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/DoubleDynamicHistogram.java
DoubleDynamicHistogram.downsample
protected double downsample(double[] data, int start, int end, int size) { double sum = 0; for (int i = start; i < end; i++) { sum += data[i]; } return sum; }
java
protected double downsample(double[] data, int start, int end, int size) { double sum = 0; for (int i = start; i < end; i++) { sum += data[i]; } return sum; }
[ "protected", "double", "downsample", "(", "double", "[", "]", "data", ",", "int", "start", ",", "int", "end", ",", "int", "size", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", ";", "i", "+...
Perform downsampling on a number of bins. @param data Data array (needs cast!) @param start Interval start @param end Interval end (exclusive) @param size Intended size - extra bins are assumed to be empty, should be a power of two @return New bin value
[ "Perform", "downsampling", "on", "a", "number", "of", "bins", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/DoubleDynamicHistogram.java#L242-L248
63,838
elki-project/elki
addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java
Simple1DOFCamera.setRotationZ
public void setRotationZ(double rotationZ) { this.rotationZ = rotationZ; this.cosZ = FastMath.cos(rotationZ); this.sinZ = FastMath.sin(rotationZ); fireCameraChangedEvent(); }
java
public void setRotationZ(double rotationZ) { this.rotationZ = rotationZ; this.cosZ = FastMath.cos(rotationZ); this.sinZ = FastMath.sin(rotationZ); fireCameraChangedEvent(); }
[ "public", "void", "setRotationZ", "(", "double", "rotationZ", ")", "{", "this", ".", "rotationZ", "=", "rotationZ", ";", "this", ".", "cosZ", "=", "FastMath", ".", "cos", "(", "rotationZ", ")", ";", "this", ".", "sinZ", "=", "FastMath", ".", "sin", "("...
Set the z rotation angle in radians. @param rotationZ Z rotation angle.
[ "Set", "the", "z", "rotation", "angle", "in", "radians", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java#L213-L219
63,839
elki-project/elki
addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java
Simple1DOFCamera.apply
public void apply(GL2 gl) { // 3D projection gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity(); // Perspective. glu.gluPerspective(35, ratio, 1, 1000); glu.gluLookAt(distance * sinZ, distance * -cosZ, height, // pos 0, 0, .5, // center 0, 0, 1 // up ); // Change bac...
java
public void apply(GL2 gl) { // 3D projection gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity(); // Perspective. glu.gluPerspective(35, ratio, 1, 1000); glu.gluLookAt(distance * sinZ, distance * -cosZ, height, // pos 0, 0, .5, // center 0, 0, 1 // up ); // Change bac...
[ "public", "void", "apply", "(", "GL2", "gl", ")", "{", "// 3D projection", "gl", ".", "glMatrixMode", "(", "GL2", ".", "GL_PROJECTION", ")", ";", "gl", ".", "glLoadIdentity", "(", ")", ";", "// Perspective.", "glu", ".", "gluPerspective", "(", "35", ",", ...
Apply the camera to a GL context. @param gl GL context.
[ "Apply", "the", "camera", "to", "a", "GL", "context", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java#L226-L244
63,840
elki-project/elki
addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java
Simple1DOFCamera.project
public void project(double x, double y, double z, double[] out) { glu.gluProject(x, y, z, modelview, 0, projection, 0, viewp, 0, out, 0); }
java
public void project(double x, double y, double z, double[] out) { glu.gluProject(x, y, z, modelview, 0, projection, 0, viewp, 0, out, 0); }
[ "public", "void", "project", "(", "double", "x", ",", "double", "y", ",", "double", "z", ",", "double", "[", "]", "out", ")", "{", "glu", ".", "gluProject", "(", "x", ",", "y", ",", "z", ",", "modelview", ",", "0", ",", "projection", ",", "0", ...
Project a coordinate @param x X @param y Y @param z Z @param out output buffer
[ "Project", "a", "coordinate" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java#L280-L282
63,841
elki-project/elki
addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java
Simple1DOFCamera.addCameraListener
public void addCameraListener(CameraListener lis) { if (listeners == null) { listeners = new ArrayList<>(5); } listeners.add(lis); }
java
public void addCameraListener(CameraListener lis) { if (listeners == null) { listeners = new ArrayList<>(5); } listeners.add(lis); }
[ "public", "void", "addCameraListener", "(", "CameraListener", "lis", ")", "{", "if", "(", "listeners", "==", "null", ")", "{", "listeners", "=", "new", "ArrayList", "<>", "(", "5", ")", ";", "}", "listeners", ".", "add", "(", "lis", ")", ";", "}" ]
Add a camera listener. @param lis Listener
[ "Add", "a", "camera", "listener", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Simple1DOFCamera.java#L317-L322
63,842
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/projections/AffineProjection.java
AffineProjection.axisProjection
public static AffineTransformation axisProjection(int dim, int ax1, int ax2) { // setup a projection to get the data into the interval -1:+1 in each // dimension with the intended-to-see dimensions first. AffineTransformation proj = AffineTransformation.reorderAxesTransformation(dim, ax1, ax2); // Assum...
java
public static AffineTransformation axisProjection(int dim, int ax1, int ax2) { // setup a projection to get the data into the interval -1:+1 in each // dimension with the intended-to-see dimensions first. AffineTransformation proj = AffineTransformation.reorderAxesTransformation(dim, ax1, ax2); // Assum...
[ "public", "static", "AffineTransformation", "axisProjection", "(", "int", "dim", ",", "int", "ax1", ",", "int", "ax2", ")", "{", "// setup a projection to get the data into the interval -1:+1 in each", "// dimension with the intended-to-see dimensions first.", "AffineTransformation...
Compute an transformation matrix to show only axis ax1 and ax2. @param dim Dimensionality @param ax1 First axis @param ax2 Second axis @return transformation matrix
[ "Compute", "an", "transformation", "matrix", "to", "show", "only", "axis", "ax1", "and", "ax2", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/projections/AffineProjection.java#L147-L164
63,843
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkcop/MkCoPTreeNode.java
MkCoPTreeNode.conservativeKnnDistanceApproximation
protected ApproximationLine conservativeKnnDistanceApproximation(int k_max) { // determine k_0, y_1, y_kmax int k_0 = k_max; double y_1 = Double.NEGATIVE_INFINITY; double y_kmax = Double.NEGATIVE_INFINITY; for(int i = 0; i < getNumEntries(); i++) { MkCoPEntry entry = getEntry(i); Approx...
java
protected ApproximationLine conservativeKnnDistanceApproximation(int k_max) { // determine k_0, y_1, y_kmax int k_0 = k_max; double y_1 = Double.NEGATIVE_INFINITY; double y_kmax = Double.NEGATIVE_INFINITY; for(int i = 0; i < getNumEntries(); i++) { MkCoPEntry entry = getEntry(i); Approx...
[ "protected", "ApproximationLine", "conservativeKnnDistanceApproximation", "(", "int", "k_max", ")", "{", "// determine k_0, y_1, y_kmax", "int", "k_0", "=", "k_max", ";", "double", "y_1", "=", "Double", ".", "NEGATIVE_INFINITY", ";", "double", "y_kmax", "=", "Double",...
Determines and returns the conservative approximation for the knn distances of this node as the maximum of the conservative approximations of all entries. @param k_max the maximum k parameter @return the conservative approximation for the knn distances
[ "Determines", "and", "returns", "the", "conservative", "approximation", "for", "the", "knn", "distances", "of", "this", "node", "as", "the", "maximum", "of", "the", "conservative", "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/mkcop/MkCoPTreeNode.java#L70-L101
63,844
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkcop/MkCoPTreeNode.java
MkCoPTreeNode.progressiveKnnDistanceApproximation
protected ApproximationLine progressiveKnnDistanceApproximation(int k_max) { if(!isLeaf()) { throw new UnsupportedOperationException("Progressive KNN-distance approximation " + "is only vailable in leaf nodes!"); } // determine k_0, y_1, y_kmax int k_0 = 0; double y_1 = Double.POSITIVE_INFINI...
java
protected ApproximationLine progressiveKnnDistanceApproximation(int k_max) { if(!isLeaf()) { throw new UnsupportedOperationException("Progressive KNN-distance approximation " + "is only vailable in leaf nodes!"); } // determine k_0, y_1, y_kmax int k_0 = 0; double y_1 = Double.POSITIVE_INFINI...
[ "protected", "ApproximationLine", "progressiveKnnDistanceApproximation", "(", "int", "k_max", ")", "{", "if", "(", "!", "isLeaf", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Progressive KNN-distance approximation \"", "+", "\"is only vaila...
Determines and returns the progressive approximation for the knn distances of this node as the maximum of the progressive approximations of all entries. @param k_max the maximum k parameter @return the conservative approximation for the knn distances
[ "Determines", "and", "returns", "the", "progressive", "approximation", "for", "the", "knn", "distances", "of", "this", "node", "as", "the", "maximum", "of", "the", "progressive", "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/mkcop/MkCoPTreeNode.java#L111-L139
63,845
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java
CSSClassManager.addClass
public CSSClass addClass(CSSClass clss) throws CSSNamingConflict { CSSClass existing = store.get(clss.getName()); if (existing != null && existing.getOwner() != null && existing.getOwner() != clss.getOwner()) { throw new CSSNamingConflict("CSS class naming conflict between "+clss.getOwner().toString()+" a...
java
public CSSClass addClass(CSSClass clss) throws CSSNamingConflict { CSSClass existing = store.get(clss.getName()); if (existing != null && existing.getOwner() != null && existing.getOwner() != clss.getOwner()) { throw new CSSNamingConflict("CSS class naming conflict between "+clss.getOwner().toString()+" a...
[ "public", "CSSClass", "addClass", "(", "CSSClass", "clss", ")", "throws", "CSSNamingConflict", "{", "CSSClass", "existing", "=", "store", ".", "get", "(", "clss", ".", "getName", "(", ")", ")", ";", "if", "(", "existing", "!=", "null", "&&", "existing", ...
Add a single class to the map. @param clss new CSS class @return existing (old) class @throws CSSNamingConflict when a class of the same name but different owner object exists.
[ "Add", "a", "single", "class", "to", "the", "map", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java#L54-L60
63,846
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java
CSSClassManager.removeClass
public synchronized void removeClass(CSSClass clss) { CSSClass existing = store.get(clss.getName()); if (existing == clss) { store.remove(existing.getName()); } }
java
public synchronized void removeClass(CSSClass clss) { CSSClass existing = store.get(clss.getName()); if (existing == clss) { store.remove(existing.getName()); } }
[ "public", "synchronized", "void", "removeClass", "(", "CSSClass", "clss", ")", "{", "CSSClass", "existing", "=", "store", ".", "get", "(", "clss", ".", "getName", "(", ")", ")", ";", "if", "(", "existing", "==", "clss", ")", "{", "store", ".", "remove"...
Remove a single CSS class from the map. Note that classes are removed by reference, not by name! @param clss Class to remove
[ "Remove", "a", "single", "CSS", "class", "from", "the", "map", ".", "Note", "that", "classes", "are", "removed", "by", "reference", "not", "by", "name!" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java#L68-L73
63,847
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java
CSSClassManager.getClass
public CSSClass getClass(String name, Object owner) throws CSSNamingConflict { CSSClass existing = store.get(name); // Not found. if (existing == null) { return null; } // Different owner if (owner != null && existing.getOwner() != owner) { throw new CSSNamingConflict("CSS class nami...
java
public CSSClass getClass(String name, Object owner) throws CSSNamingConflict { CSSClass existing = store.get(name); // Not found. if (existing == null) { return null; } // Different owner if (owner != null && existing.getOwner() != owner) { throw new CSSNamingConflict("CSS class nami...
[ "public", "CSSClass", "getClass", "(", "String", "name", ",", "Object", "owner", ")", "throws", "CSSNamingConflict", "{", "CSSClass", "existing", "=", "store", ".", "get", "(", "name", ")", ";", "// Not found.", "if", "(", "existing", "==", "null", ")", "{...
Retrieve a single class by name and owner @param name Class name @param owner Class owner @return existing (old) class @throws CSSNamingConflict if an owner was specified and doesn't match
[ "Retrieve", "a", "single", "class", "by", "name", "and", "owner" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java#L83-L94
63,848
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java
CSSClassManager.serialize
public void serialize(StringBuilder buf) { for (CSSClass clss : store.values()) { clss.appendCSSDefinition(buf); } }
java
public void serialize(StringBuilder buf) { for (CSSClass clss : store.values()) { clss.appendCSSDefinition(buf); } }
[ "public", "void", "serialize", "(", "StringBuilder", "buf", ")", "{", "for", "(", "CSSClass", "clss", ":", "store", ".", "values", "(", ")", ")", "{", "clss", ".", "appendCSSDefinition", "(", "buf", ")", ";", "}", "}" ]
Serialize managed CSS classes to rule file. @param buf String buffer
[ "Serialize", "managed", "CSS", "classes", "to", "rule", "file", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java#L121-L125
63,849
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java
CSSClassManager.mergeCSSFrom
public boolean mergeCSSFrom(CSSClassManager other) throws CSSNamingConflict { for (CSSClass clss : other.getClasses()) { this.addClass(clss); } return true; }
java
public boolean mergeCSSFrom(CSSClassManager other) throws CSSNamingConflict { for (CSSClass clss : other.getClasses()) { this.addClass(clss); } return true; }
[ "public", "boolean", "mergeCSSFrom", "(", "CSSClassManager", "other", ")", "throws", "CSSNamingConflict", "{", "for", "(", "CSSClass", "clss", ":", "other", ".", "getClasses", "(", ")", ")", "{", "this", ".", "addClass", "(", "clss", ")", ";", "}", "return...
Merge CSS classes, for example to merge two plots. @param other Other class to merge with @return success code @throws CSSNamingConflict If there is a naming conflict.
[ "Merge", "CSS", "classes", "for", "example", "to", "merge", "two", "plots", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java#L160-L165
63,850
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java
CSSClassManager.updateStyleElement
public void updateStyleElement(Document document, Element style) { StringBuilder buf = new StringBuilder(); serialize(buf); Text cont = document.createTextNode(buf.toString()); while (style.hasChildNodes()) { style.removeChild(style.getFirstChild()); } style.appendChild(cont); }
java
public void updateStyleElement(Document document, Element style) { StringBuilder buf = new StringBuilder(); serialize(buf); Text cont = document.createTextNode(buf.toString()); while (style.hasChildNodes()) { style.removeChild(style.getFirstChild()); } style.appendChild(cont); }
[ "public", "void", "updateStyleElement", "(", "Document", "document", ",", "Element", "style", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "serialize", "(", "buf", ")", ";", "Text", "cont", "=", "document", ".", "createTextNo...
Update the text contents of an existing style element. @param document Document element (factory) @param style Style element
[ "Update", "the", "text", "contents", "of", "an", "existing", "style", "element", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/css/CSSClassManager.java#L192-L200
63,851
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java
ALOCI.calculate_MDEF_norm
private static double calculate_MDEF_norm(Node sn, Node cg) { // get the square sum of the counting neighborhoods box counts long sq = sn.getSquareSum(cg.getLevel() - sn.getLevel()); /* * if the square sum is equal to box count of the sampling Neighborhood then * n_hat is equal one, and as cg need...
java
private static double calculate_MDEF_norm(Node sn, Node cg) { // get the square sum of the counting neighborhoods box counts long sq = sn.getSquareSum(cg.getLevel() - sn.getLevel()); /* * if the square sum is equal to box count of the sampling Neighborhood then * n_hat is equal one, and as cg need...
[ "private", "static", "double", "calculate_MDEF_norm", "(", "Node", "sn", ",", "Node", "cg", ")", "{", "// get the square sum of the counting neighborhoods box counts", "long", "sq", "=", "sn", ".", "getSquareSum", "(", "cg", ".", "getLevel", "(", ")", "-", "sn", ...
Method for the MDEF calculation @param sn Sampling Neighborhood @param cg Counting Neighborhood @return MDEF norm
[ "Method", "for", "the", "MDEF", "calculation" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java#L259-L287
63,852
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java
BundleWriter.writeBundleStream
public void writeBundleStream(BundleStreamSource source, WritableByteChannel output) throws IOException { ByteBuffer buffer = ByteBuffer.allocateDirect(INITIAL_BUFFER); DBIDVar var = DBIDUtil.newVar(); ByteBufferSerializer<?>[] serializers = null; loop: while(true) { BundleStreamSource.Event ev =...
java
public void writeBundleStream(BundleStreamSource source, WritableByteChannel output) throws IOException { ByteBuffer buffer = ByteBuffer.allocateDirect(INITIAL_BUFFER); DBIDVar var = DBIDUtil.newVar(); ByteBufferSerializer<?>[] serializers = null; loop: while(true) { BundleStreamSource.Event ev =...
[ "public", "void", "writeBundleStream", "(", "BundleStreamSource", "source", ",", "WritableByteChannel", "output", ")", "throws", "IOException", "{", "ByteBuffer", "buffer", "=", "ByteBuffer", ".", "allocateDirect", "(", "INITIAL_BUFFER", ")", ";", "DBIDVar", "var", ...
Write a bundle stream to a file output channel. @param source Data source @param output Output channel @throws IOException on IO errors
[ "Write", "a", "bundle", "stream", "to", "a", "file", "output", "channel", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java#L71-L117
63,853
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java
BundleWriter.flushBuffer
private void flushBuffer(ByteBuffer buffer, WritableByteChannel output) throws IOException { buffer.flip(); output.write(buffer); buffer.flip(); buffer.limit(buffer.capacity()); }
java
private void flushBuffer(ByteBuffer buffer, WritableByteChannel output) throws IOException { buffer.flip(); output.write(buffer); buffer.flip(); buffer.limit(buffer.capacity()); }
[ "private", "void", "flushBuffer", "(", "ByteBuffer", "buffer", ",", "WritableByteChannel", "output", ")", "throws", "IOException", "{", "buffer", ".", "flip", "(", ")", ";", "output", ".", "write", "(", "buffer", ")", ";", "buffer", ".", "flip", "(", ")", ...
Flush the current write buffer to disk. @param buffer Buffer to write @param output Output channel @throws IOException on IO errors
[ "Flush", "the", "current", "write", "buffer", "to", "disk", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java#L126-L131
63,854
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java
BundleWriter.ensureBuffer
private ByteBuffer ensureBuffer(int size, ByteBuffer buffer, WritableByteChannel output) throws IOException { if(buffer.remaining() >= size) { return buffer; } flushBuffer(buffer, output); if(buffer.remaining() >= size) { return buffer; } // Aggressively grow the buffer return By...
java
private ByteBuffer ensureBuffer(int size, ByteBuffer buffer, WritableByteChannel output) throws IOException { if(buffer.remaining() >= size) { return buffer; } flushBuffer(buffer, output); if(buffer.remaining() >= size) { return buffer; } // Aggressively grow the buffer return By...
[ "private", "ByteBuffer", "ensureBuffer", "(", "int", "size", ",", "ByteBuffer", "buffer", ",", "WritableByteChannel", "output", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "remaining", "(", ")", ">=", "size", ")", "{", "return", "buffer", ";...
Ensure the buffer is large enough. @param size Required size to add @param buffer Existing buffer @param output Output channel @return Buffer, eventually resized @throws IOException on IO errors
[ "Ensure", "the", "buffer", "is", "large", "enough", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java#L142-L152
63,855
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java
BundleWriter.writeHeader
private ByteBufferSerializer<?>[] writeHeader(BundleStreamSource source, ByteBuffer buffer, WritableByteChannel output) throws IOException { final BundleMeta meta = source.getMeta(); final int nummeta = meta.size(); @SuppressWarnings("rawtypes") final ByteBufferSerializer[] serializers = new ByteBufferS...
java
private ByteBufferSerializer<?>[] writeHeader(BundleStreamSource source, ByteBuffer buffer, WritableByteChannel output) throws IOException { final BundleMeta meta = source.getMeta(); final int nummeta = meta.size(); @SuppressWarnings("rawtypes") final ByteBufferSerializer[] serializers = new ByteBufferS...
[ "private", "ByteBufferSerializer", "<", "?", ">", "[", "]", "writeHeader", "(", "BundleStreamSource", "source", ",", "ByteBuffer", "buffer", ",", "WritableByteChannel", "output", ")", "throws", "IOException", "{", "final", "BundleMeta", "meta", "=", "source", ".",...
Write the header for the given stream to the stream. @param source Bundle stream @param buffer Buffer to use for writing @param output Output channel @return Array of serializers @throws IOException on IO errors
[ "Write", "the", "header", "for", "the", "given", "stream", "to", "the", "stream", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java#L163-L192
63,856
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java
DBSCAN.runDBSCAN
protected void runDBSCAN(Relation<O> relation, RangeQuery<O> rangeQuery) { final int size = relation.size(); FiniteProgress objprog = LOG.isVerbose() ? new FiniteProgress("Processing objects", size, LOG) : null; IndefiniteProgress clusprog = LOG.isVerbose() ? new IndefiniteProgress("Number of clusters", LOG...
java
protected void runDBSCAN(Relation<O> relation, RangeQuery<O> rangeQuery) { final int size = relation.size(); FiniteProgress objprog = LOG.isVerbose() ? new FiniteProgress("Processing objects", size, LOG) : null; IndefiniteProgress clusprog = LOG.isVerbose() ? new IndefiniteProgress("Number of clusters", LOG...
[ "protected", "void", "runDBSCAN", "(", "Relation", "<", "O", ">", "relation", ",", "RangeQuery", "<", "O", ">", "rangeQuery", ")", "{", "final", "int", "size", "=", "relation", ".", "size", "(", ")", ";", "FiniteProgress", "objprog", "=", "LOG", ".", "...
Run the DBSCAN algorithm @param relation Data relation @param rangeQuery Range query class
[ "Run", "the", "DBSCAN", "algorithm" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java#L175-L197
63,857
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java
DBSCAN.expandCluster
protected void expandCluster(Relation<O> relation, RangeQuery<O> rangeQuery, DBIDRef startObjectID, ArrayModifiableDBIDs seeds, FiniteProgress objprog, IndefiniteProgress clusprog) { DoubleDBIDList neighbors = rangeQuery.getRangeForDBID(startObjectID, epsilon); ncounter += neighbors.size(); // startObject ...
java
protected void expandCluster(Relation<O> relation, RangeQuery<O> rangeQuery, DBIDRef startObjectID, ArrayModifiableDBIDs seeds, FiniteProgress objprog, IndefiniteProgress clusprog) { DoubleDBIDList neighbors = rangeQuery.getRangeForDBID(startObjectID, epsilon); ncounter += neighbors.size(); // startObject ...
[ "protected", "void", "expandCluster", "(", "Relation", "<", "O", ">", "relation", ",", "RangeQuery", "<", "O", ">", "rangeQuery", ",", "DBIDRef", "startObjectID", ",", "ArrayModifiableDBIDs", "seeds", ",", "FiniteProgress", "objprog", ",", "IndefiniteProgress", "c...
DBSCAN-function expandCluster. Border-Objects become members of the first possible cluster. @param relation Database relation to run on @param rangeQuery Range query to use @param startObjectID potential seed of a new potential cluster @param seeds Array to store the current seeds @param objprog Number of objects pro...
[ "DBSCAN", "-", "function", "expandCluster", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java#L211-L251
63,858
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java
DBSCAN.processNeighbors
private void processNeighbors(DoubleDBIDListIter neighbor, ModifiableDBIDs currentCluster, ArrayModifiableDBIDs seeds) { final boolean ismetric = getDistanceFunction().isMetric(); for(; neighbor.valid(); neighbor.advance()) { if(processedIDs.add(neighbor)) { if(!ismetric || neighbor.doubleValue() ...
java
private void processNeighbors(DoubleDBIDListIter neighbor, ModifiableDBIDs currentCluster, ArrayModifiableDBIDs seeds) { final boolean ismetric = getDistanceFunction().isMetric(); for(; neighbor.valid(); neighbor.advance()) { if(processedIDs.add(neighbor)) { if(!ismetric || neighbor.doubleValue() ...
[ "private", "void", "processNeighbors", "(", "DoubleDBIDListIter", "neighbor", ",", "ModifiableDBIDs", "currentCluster", ",", "ArrayModifiableDBIDs", "seeds", ")", "{", "final", "boolean", "ismetric", "=", "getDistanceFunction", "(", ")", ".", "isMetric", "(", ")", "...
Process a single core point. @param neighbor Iterator over neighbors @param currentCluster Current cluster @param seeds Seed set
[ "Process", "a", "single", "core", "point", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java#L260-L273
63,859
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixture.java
GaussianUniformMixture.loglikelihoodAnomalous
private double loglikelihoodAnomalous(DBIDs anomalousObjs) { return anomalousObjs.isEmpty() ? 0 : anomalousObjs.size() * -FastMath.log(anomalousObjs.size()); }
java
private double loglikelihoodAnomalous(DBIDs anomalousObjs) { return anomalousObjs.isEmpty() ? 0 : anomalousObjs.size() * -FastMath.log(anomalousObjs.size()); }
[ "private", "double", "loglikelihoodAnomalous", "(", "DBIDs", "anomalousObjs", ")", "{", "return", "anomalousObjs", ".", "isEmpty", "(", ")", "?", "0", ":", "anomalousObjs", ".", "size", "(", ")", "*", "-", "FastMath", ".", "log", "(", "anomalousObjs", ".", ...
Loglikelihood anomalous objects. Uniform distribution. @param anomalousObjs @return loglikelihood for anomalous objects
[ "Loglikelihood", "anomalous", "objects", ".", "Uniform", "distribution", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixture.java#L187-L189
63,860
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixture.java
GaussianUniformMixture.loglikelihoodNormal
private double loglikelihoodNormal(DBIDs objids, SetDBIDs anomalous, CovarianceMatrix builder, Relation<V> relation) { double[] mean = builder.getMeanVector(); final LUDecomposition lu = new LUDecomposition(builder.makeSampleMatrix()); double[][] covInv = lu.inverse(); // for each object compute probabi...
java
private double loglikelihoodNormal(DBIDs objids, SetDBIDs anomalous, CovarianceMatrix builder, Relation<V> relation) { double[] mean = builder.getMeanVector(); final LUDecomposition lu = new LUDecomposition(builder.makeSampleMatrix()); double[][] covInv = lu.inverse(); // for each object compute probabi...
[ "private", "double", "loglikelihoodNormal", "(", "DBIDs", "objids", ",", "SetDBIDs", "anomalous", ",", "CovarianceMatrix", "builder", ",", "Relation", "<", "V", ">", "relation", ")", "{", "double", "[", "]", "mean", "=", "builder", ".", "getMeanVector", "(", ...
Computes the loglikelihood of all normal objects. Gaussian model @param objids Object IDs for 'normal' objects. @param builder Covariance matrix builder @param relation Database @return loglikelihood for normal objects
[ "Computes", "the", "loglikelihood", "of", "all", "normal", "objects", ".", "Gaussian", "model" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixture.java#L199-L212
63,861
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/DistanceStatisticsWithClasses.java
DistanceStatisticsWithClasses.exactMinMax
private DoubleMinMax exactMinMax(Relation<O> relation, DistanceQuery<O> distFunc) { final FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("Exact fitting distance computations", relation.size(), LOG) : null; DoubleMinMax minmax = new DoubleMinMax(); // find exact minimum and maximum first. ...
java
private DoubleMinMax exactMinMax(Relation<O> relation, DistanceQuery<O> distFunc) { final FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("Exact fitting distance computations", relation.size(), LOG) : null; DoubleMinMax minmax = new DoubleMinMax(); // find exact minimum and maximum first. ...
[ "private", "DoubleMinMax", "exactMinMax", "(", "Relation", "<", "O", ">", "relation", ",", "DistanceQuery", "<", "O", ">", "distFunc", ")", "{", "final", "FiniteProgress", "progress", "=", "LOG", ".", "isVerbose", "(", ")", "?", "new", "FiniteProgress", "(",...
Compute the exact maximum and minimum. @param relation Relation to process @param distFunc Distance function @return Exact maximum and minimum
[ "Compute", "the", "exact", "maximum", "and", "minimum", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/DistanceStatisticsWithClasses.java#L357-L374
63,862
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.preInsert
@Override protected void preInsert(RdKNNEntry entry) { KNNHeap knns_o = DBIDUtil.newHeap(settings.k_max); preInsert(entry, getRootEntry(), knns_o); }
java
@Override protected void preInsert(RdKNNEntry entry) { KNNHeap knns_o = DBIDUtil.newHeap(settings.k_max); preInsert(entry, getRootEntry(), knns_o); }
[ "@", "Override", "protected", "void", "preInsert", "(", "RdKNNEntry", "entry", ")", "{", "KNNHeap", "knns_o", "=", "DBIDUtil", ".", "newHeap", "(", "settings", ".", "k_max", ")", ";", "preInsert", "(", "entry", ",", "getRootEntry", "(", ")", ",", "knns_o",...
Performs necessary operations before inserting the specified entry. @param entry the entry to be inserted
[ "Performs", "necessary", "operations", "before", "inserting", "the", "specified", "entry", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java#L123-L127
63,863
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.postDelete
@Override protected void postDelete(RdKNNEntry entry) { // reverse knn of o ModifiableDoubleDBIDList rnns = DBIDUtil.newDistanceDBIDList(); doReverseKNN(getRoot(), ((RdKNNLeafEntry) entry).getDBID(), rnns); // knn of rnn ArrayModifiableDBIDs ids = DBIDUtil.newArray(rnns); ids.sort(); List...
java
@Override protected void postDelete(RdKNNEntry entry) { // reverse knn of o ModifiableDoubleDBIDList rnns = DBIDUtil.newDistanceDBIDList(); doReverseKNN(getRoot(), ((RdKNNLeafEntry) entry).getDBID(), rnns); // knn of rnn ArrayModifiableDBIDs ids = DBIDUtil.newArray(rnns); ids.sort(); List...
[ "@", "Override", "protected", "void", "postDelete", "(", "RdKNNEntry", "entry", ")", "{", "// reverse knn of o", "ModifiableDoubleDBIDList", "rnns", "=", "DBIDUtil", ".", "newDistanceDBIDList", "(", ")", ";", "doReverseKNN", "(", "getRoot", "(", ")", ",", "(", "...
Performs necessary operations after deleting the specified object.
[ "Performs", "necessary", "operations", "after", "deleting", "the", "specified", "object", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java#L132-L145
63,864
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.doReverseKNN
private void doReverseKNN(RdKNNNode node, DBID oid, ModifiableDoubleDBIDList result) { if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { RdKNNLeafEntry entry = (RdKNNLeafEntry) node.getEntry(i); double distance = distanceQuery.distance(entry.getDBID(), oid); if(distan...
java
private void doReverseKNN(RdKNNNode node, DBID oid, ModifiableDoubleDBIDList result) { if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { RdKNNLeafEntry entry = (RdKNNLeafEntry) node.getEntry(i); double distance = distanceQuery.distance(entry.getDBID(), oid); if(distan...
[ "private", "void", "doReverseKNN", "(", "RdKNNNode", "node", ",", "DBID", "oid", ",", "ModifiableDoubleDBIDList", "result", ")", "{", "if", "(", "node", ".", "isLeaf", "(", ")", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "node", ".", ...
Performs a reverse knn query in the specified subtree. @param node the root node of the current subtree @param oid the id of the object for which the rknn query is performed @param result the list containing the query results
[ "Performs", "a", "reverse", "knn", "query", "in", "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/rdknn/RdKNNTree.java#L399-L419
63,865
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.doBulkReverseKNN
private void doBulkReverseKNN(RdKNNNode node, DBIDs ids, Map<DBID, ModifiableDoubleDBIDList> result) { if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { RdKNNLeafEntry entry = (RdKNNLeafEntry) node.getEntry(i); for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { ...
java
private void doBulkReverseKNN(RdKNNNode node, DBIDs ids, Map<DBID, ModifiableDoubleDBIDList> result) { if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { RdKNNLeafEntry entry = (RdKNNLeafEntry) node.getEntry(i); for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { ...
[ "private", "void", "doBulkReverseKNN", "(", "RdKNNNode", "node", ",", "DBIDs", "ids", ",", "Map", "<", "DBID", ",", "ModifiableDoubleDBIDList", ">", "result", ")", "{", "if", "(", "node", ".", "isLeaf", "(", ")", ")", "{", "for", "(", "int", "i", "=", ...
Performs a bulk reverse knn query in the specified subtree. @param node the root node of the current subtree @param ids the object ids for which the rknn query is performed @param result the map containing the query results for each object
[ "Performs", "a", "bulk", "reverse", "knn", "query", "in", "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/rdknn/RdKNNTree.java#L428-L458
63,866
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.checkDistanceFunction
private void checkDistanceFunction(SpatialPrimitiveDistanceFunction<? super O> distanceFunction) { if(!settings.distanceFunction.equals(distanceFunction)) { throw new IllegalArgumentException("Parameter distanceFunction must be an instance of " + this.distanceQuery.getClass() + ", but is " + distanceFunction....
java
private void checkDistanceFunction(SpatialPrimitiveDistanceFunction<? super O> distanceFunction) { if(!settings.distanceFunction.equals(distanceFunction)) { throw new IllegalArgumentException("Parameter distanceFunction must be an instance of " + this.distanceQuery.getClass() + ", but is " + distanceFunction....
[ "private", "void", "checkDistanceFunction", "(", "SpatialPrimitiveDistanceFunction", "<", "?", "super", "O", ">", "distanceFunction", ")", "{", "if", "(", "!", "settings", ".", "distanceFunction", ".", "equals", "(", "distanceFunction", ")", ")", "{", "throw", "...
Throws an IllegalArgumentException if the specified distance function is not an instance of the distance function used by this index. @throws IllegalArgumentException @param distanceFunction the distance function to be checked
[ "Throws", "an", "IllegalArgumentException", "if", "the", "specified", "distance", "function", "is", "not", "an", "instance", "of", "the", "distance", "function", "used", "by", "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/rdknn/RdKNNTree.java#L538-L542
63,867
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.insertAll
@Override public final void insertAll(DBIDs ids) { if(ids.isEmpty() || (ids.size() == 1)) { return; } // Make an example leaf if(canBulkLoad()) { List<RdKNNEntry> leafs = new ArrayList<>(ids.size()); for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { leafs.add(c...
java
@Override public final void insertAll(DBIDs ids) { if(ids.isEmpty() || (ids.size() == 1)) { return; } // Make an example leaf if(canBulkLoad()) { List<RdKNNEntry> leafs = new ArrayList<>(ids.size()); for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { leafs.add(c...
[ "@", "Override", "public", "final", "void", "insertAll", "(", "DBIDs", "ids", ")", "{", "if", "(", "ids", ".", "isEmpty", "(", ")", "||", "(", "ids", ".", "size", "(", ")", "==", "1", ")", ")", "{", "return", ";", "}", "// Make an example leaf", "i...
Inserts the specified objects into this index. If a bulk load mode is implemented, the objects are inserted in one bulk. @param ids the objects to be inserted
[ "Inserts", "the", "specified", "objects", "into", "this", "index", ".", "If", "a", "bulk", "load", "mode", "is", "implemented", "the", "objects", "are", "inserted", "in", "one", "bulk", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java#L570-L591
63,868
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/HiCO.java
HiCO.correlationDistance
public int correlationDistance(PCAFilteredResult pca1, PCAFilteredResult pca2, int dimensionality) { // TODO: Can we delay copying the matrixes? // pca of rv1 double[][] v1t = copy(pca1.getEigenvectors()); double[][] v1t_strong = pca1.getStrongEigenvectors(); int lambda1 = pca1.getCorrelationDimensi...
java
public int correlationDistance(PCAFilteredResult pca1, PCAFilteredResult pca2, int dimensionality) { // TODO: Can we delay copying the matrixes? // pca of rv1 double[][] v1t = copy(pca1.getEigenvectors()); double[][] v1t_strong = pca1.getStrongEigenvectors(); int lambda1 = pca1.getCorrelationDimensi...
[ "public", "int", "correlationDistance", "(", "PCAFilteredResult", "pca1", ",", "PCAFilteredResult", "pca2", ",", "int", "dimensionality", ")", "{", "// TODO: Can we delay copying the matrixes?", "// pca of rv1", "double", "[", "]", "[", "]", "v1t", "=", "copy", "(", ...
Computes the correlation distance between the two subspaces defined by the specified PCAs. @param pca1 first PCA @param pca2 second PCA @param dimensionality the dimensionality of the data space @return the correlation distance between the two subspaces defined by the specified PCAs
[ "Computes", "the", "correlation", "distance", "between", "the", "two", "subspaces", "defined", "by", "the", "specified", "PCAs", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/HiCO.java#L302-L352
63,869
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/KappaDistribution.java
KappaDistribution.logcdf
public static double logcdf(double val, double shape1, double shape2) { if(val == Double.NEGATIVE_INFINITY) { return Double.NEGATIVE_INFINITY; } if(val == Double.POSITIVE_INFINITY) { return 0.; } if(val != val) { return Double.NaN; } if(shape1 == 0.) { val = FastMath....
java
public static double logcdf(double val, double shape1, double shape2) { if(val == Double.NEGATIVE_INFINITY) { return Double.NEGATIVE_INFINITY; } if(val == Double.POSITIVE_INFINITY) { return 0.; } if(val != val) { return Double.NaN; } if(shape1 == 0.) { val = FastMath....
[ "public", "static", "double", "logcdf", "(", "double", "val", ",", "double", "shape1", ",", "double", "shape2", ")", "{", "if", "(", "val", "==", "Double", ".", "NEGATIVE_INFINITY", ")", "{", "return", "Double", ".", "NEGATIVE_INFINITY", ";", "}", "if", ...
Cumulative density function, for location = 0, scale = 1 @param val Value @param shape1 Shape parameter @param shape2 Shape parameter @return CDF
[ "Cumulative", "density", "function", "for", "location", "=", "0", "scale", "=", "1" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/KappaDistribution.java#L246-L274
63,870
elki-project/elki
elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java
InMemoryInvertedIndex.naiveQuerySparse
private double naiveQuerySparse(SparseNumberVector obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { double len = 0.; // Length of query object, for final normalization for(int iter = obj.iter(); obj.iterValid(iter); iter = obj.iterAdvance(iter)) { final int dim = obj.iterDim(iter); ...
java
private double naiveQuerySparse(SparseNumberVector obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { double len = 0.; // Length of query object, for final normalization for(int iter = obj.iter(); obj.iterValid(iter); iter = obj.iterAdvance(iter)) { final int dim = obj.iterDim(iter); ...
[ "private", "double", "naiveQuerySparse", "(", "SparseNumberVector", "obj", ",", "WritableDoubleDataStore", "scores", ",", "HashSetModifiableDBIDs", "cands", ")", "{", "double", "len", "=", "0.", ";", "// Length of query object, for final normalization", "for", "(", "int",...
Query the most similar objects, sparse version. @param obj Query object @param scores Score storage @param cands Non-zero objects set @return Result
[ "Query", "the", "most", "similar", "objects", "sparse", "version", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java#L180-L200
63,871
elki-project/elki
elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java
InMemoryInvertedIndex.naiveQueryDense
private double naiveQueryDense(NumberVector obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { double len = 0.; // Length of query object, for final normalization for(int dim = 0, max = obj.getDimensionality(); dim < max; dim++) { final double val = obj.doubleValue(dim); if(val == ...
java
private double naiveQueryDense(NumberVector obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { double len = 0.; // Length of query object, for final normalization for(int dim = 0, max = obj.getDimensionality(); dim < max; dim++) { final double val = obj.doubleValue(dim); if(val == ...
[ "private", "double", "naiveQueryDense", "(", "NumberVector", "obj", ",", "WritableDoubleDataStore", "scores", ",", "HashSetModifiableDBIDs", "cands", ")", "{", "double", "len", "=", "0.", ";", "// Length of query object, for final normalization", "for", "(", "int", "dim...
Query the most similar objects, dense version. @param obj Query object @param scores Score storage @param cands Non-zero objects set @return Result
[ "Query", "the", "most", "similar", "objects", "dense", "version", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java#L210-L229
63,872
elki-project/elki
elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java
InMemoryInvertedIndex.naiveQuery
private double naiveQuery(V obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { if(obj instanceof SparseNumberVector) { return naiveQuerySparse((SparseNumberVector) obj, scores, cands); } else { return naiveQueryDense(obj, scores, cands); } }
java
private double naiveQuery(V obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { if(obj instanceof SparseNumberVector) { return naiveQuerySparse((SparseNumberVector) obj, scores, cands); } else { return naiveQueryDense(obj, scores, cands); } }
[ "private", "double", "naiveQuery", "(", "V", "obj", ",", "WritableDoubleDataStore", "scores", ",", "HashSetModifiableDBIDs", "cands", ")", "{", "if", "(", "obj", "instanceof", "SparseNumberVector", ")", "{", "return", "naiveQuerySparse", "(", "(", "SparseNumberVecto...
Query the most similar objects, abstract version. @param obj Query object @param scores Score storage (must be initialized with zeros!) @param cands Non-zero objects set (must be empty) @return Result
[ "Query", "the", "most", "similar", "objects", "abstract", "version", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java#L239-L246
63,873
elki-project/elki
elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/AbstractDatabaseConnection.java
AbstractDatabaseConnection.invokeStreamFilters
protected BundleStreamSource invokeStreamFilters(BundleStreamSource stream) { assert (stream != null); if(filters == null) { return stream; } // We dynamically switch between streaming and bundle operations. MultipleObjectsBundle bundle = null; for(ObjectFilter filter : filters) { if...
java
protected BundleStreamSource invokeStreamFilters(BundleStreamSource stream) { assert (stream != null); if(filters == null) { return stream; } // We dynamically switch between streaming and bundle operations. MultipleObjectsBundle bundle = null; for(ObjectFilter filter : filters) { if...
[ "protected", "BundleStreamSource", "invokeStreamFilters", "(", "BundleStreamSource", "stream", ")", "{", "assert", "(", "stream", "!=", "null", ")", ";", "if", "(", "filters", "==", "null", ")", "{", "return", "stream", ";", "}", "// We dynamically switch between ...
Transforms the specified list of objects and their labels into a list of objects and their associations. @param stream the objects to process @return processed objects
[ "Transforms", "the", "specified", "list", "of", "objects", "and", "their", "labels", "into", "a", "list", "of", "objects", "and", "their", "associations", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/AbstractDatabaseConnection.java#L100-L118
63,874
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/ELKILogRecord.java
ELKILogRecord.inferCallerELKI
private void inferCallerELKI() { needToInferCaller = false; StackTraceElement[] stack = (new Throwable()).getStackTrace(); int ix = 0; // skip back to the logger. while(ix < stack.length) { StackTraceElement frame = stack[ix]; final String cls = frame.getClassName(); if(cls.equals(...
java
private void inferCallerELKI() { needToInferCaller = false; StackTraceElement[] stack = (new Throwable()).getStackTrace(); int ix = 0; // skip back to the logger. while(ix < stack.length) { StackTraceElement frame = stack[ix]; final String cls = frame.getClassName(); if(cls.equals(...
[ "private", "void", "inferCallerELKI", "(", ")", "{", "needToInferCaller", "=", "false", ";", "StackTraceElement", "[", "]", "stack", "=", "(", "new", "Throwable", "(", ")", ")", ".", "getStackTrace", "(", ")", ";", "int", "ix", "=", "0", ";", "// skip ba...
Infer a caller, ignoring logging-related classes.
[ "Infer", "a", "caller", "ignoring", "logging", "-", "related", "classes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/ELKILogRecord.java#L119-L151
63,875
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/result/SamplingResult.java
SamplingResult.getSamplingResult
public static SamplingResult getSamplingResult(final Relation<?> rel) { Collection<SamplingResult> selections = ResultUtil.filterResults(rel.getHierarchy(), rel, SamplingResult.class); if(selections.isEmpty()) { final SamplingResult newsam = new SamplingResult(rel); ResultUtil.addChildResult(rel, ne...
java
public static SamplingResult getSamplingResult(final Relation<?> rel) { Collection<SamplingResult> selections = ResultUtil.filterResults(rel.getHierarchy(), rel, SamplingResult.class); if(selections.isEmpty()) { final SamplingResult newsam = new SamplingResult(rel); ResultUtil.addChildResult(rel, ne...
[ "public", "static", "SamplingResult", "getSamplingResult", "(", "final", "Relation", "<", "?", ">", "rel", ")", "{", "Collection", "<", "SamplingResult", ">", "selections", "=", "ResultUtil", ".", "filterResults", "(", "rel", ".", "getHierarchy", "(", ")", ","...
Get the sampling result attached to a relation @param rel Relation @return Sampling result.
[ "Get", "the", "sampling", "result", "attached", "to", "a", "relation" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/SamplingResult.java#L83-L91
63,876
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGButton.java
SVGButton.render
public Element render(SVGPlot svgp) { Element tag = svgp.svgElement(SVGConstants.SVG_G_TAG); Element button = svgp.svgRect(x, y, w, h); if(!Double.isNaN(r)) { SVGUtil.setAtt(button, SVGConstants.SVG_RX_ATTRIBUTE, r); SVGUtil.setAtt(button, SVGConstants.SVG_RY_ATTRIBUTE, r); } SVGUtil.set...
java
public Element render(SVGPlot svgp) { Element tag = svgp.svgElement(SVGConstants.SVG_G_TAG); Element button = svgp.svgRect(x, y, w, h); if(!Double.isNaN(r)) { SVGUtil.setAtt(button, SVGConstants.SVG_RX_ATTRIBUTE, r); SVGUtil.setAtt(button, SVGConstants.SVG_RY_ATTRIBUTE, r); } SVGUtil.set...
[ "public", "Element", "render", "(", "SVGPlot", "svgp", ")", "{", "Element", "tag", "=", "svgp", ".", "svgElement", "(", "SVGConstants", ".", "SVG_G_TAG", ")", ";", "Element", "button", "=", "svgp", ".", "svgRect", "(", "x", ",", "y", ",", "w", ",", "...
Produce the actual SVG elements for the button. @param svgp Plot to draw to @return Button wrapper element
[ "Produce", "the", "actual", "SVG", "elements", "for", "the", "button", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGButton.java#L113-L147
63,877
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGButton.java
SVGButton.setTitle
public void setTitle(String title, String textcolor) { this.title = title; if(titlecss == null) { titlecss = new CSSClass(this, "text"); titlecss.setStatement(SVGConstants.CSS_TEXT_ANCHOR_PROPERTY, SVGConstants.CSS_MIDDLE_VALUE); titlecss.setStatement(SVGConstants.CSS_FILL_PROPERTY, textcolor)...
java
public void setTitle(String title, String textcolor) { this.title = title; if(titlecss == null) { titlecss = new CSSClass(this, "text"); titlecss.setStatement(SVGConstants.CSS_TEXT_ANCHOR_PROPERTY, SVGConstants.CSS_MIDDLE_VALUE); titlecss.setStatement(SVGConstants.CSS_FILL_PROPERTY, textcolor)...
[ "public", "void", "setTitle", "(", "String", "title", ",", "String", "textcolor", ")", "{", "this", ".", "title", "=", "title", ";", "if", "(", "titlecss", "==", "null", ")", "{", "titlecss", "=", "new", "CSSClass", "(", "this", ",", "\"text\"", ")", ...
Set the button title @param title Button title @param textcolor Color
[ "Set", "the", "button", "title" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGButton.java#L155-L163
63,878
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.key
private Pair<PlotItem, VisualizationTask> key(PlotItem item, VisualizationTask task) { return new Pair<>(item, task); }
java
private Pair<PlotItem, VisualizationTask> key(PlotItem item, VisualizationTask task) { return new Pair<>(item, task); }
[ "private", "Pair", "<", "PlotItem", ",", "VisualizationTask", ">", "key", "(", "PlotItem", "item", ",", "VisualizationTask", "task", ")", "{", "return", "new", "Pair", "<>", "(", "item", ",", "task", ")", ";", "}" ]
Helper function for building a key object @param item Plot item @param task Visualization Task @return Key
[ "Helper", "function", "for", "building", "a", "key", "object" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L54-L56
63,879
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.value
private Pair<Element, Visualization> value(Element elem, Visualization vis) { return new Pair<>(elem, vis); }
java
private Pair<Element, Visualization> value(Element elem, Visualization vis) { return new Pair<>(elem, vis); }
[ "private", "Pair", "<", "Element", ",", "Visualization", ">", "value", "(", "Element", "elem", ",", "Visualization", "vis", ")", "{", "return", "new", "Pair", "<>", "(", "elem", ",", "vis", ")", ";", "}" ]
Helper function to build a value pair @param elem Container element @param vis Visualization @return Value object
[ "Helper", "function", "to", "build", "a", "value", "pair" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L65-L67
63,880
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.put
public void put(PlotItem it, VisualizationTask task, Element elem, Visualization vis) { map.put(key(it, task), value(elem, vis)); }
java
public void put(PlotItem it, VisualizationTask task, Element elem, Visualization vis) { map.put(key(it, task), value(elem, vis)); }
[ "public", "void", "put", "(", "PlotItem", "it", ",", "VisualizationTask", "task", ",", "Element", "elem", ",", "Visualization", "vis", ")", "{", "map", ".", "put", "(", "key", "(", "it", ",", "task", ")", ",", "value", "(", "elem", ",", "vis", ")", ...
Put a new combination into the map. @param it Plot item @param task Visualization Task @param elem Container element @param vis Visualization
[ "Put", "a", "new", "combination", "into", "the", "map", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L117-L119
63,881
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.remove
public Pair<Element, Visualization> remove(PlotItem it, VisualizationTask task) { return map.remove(key(it, task)); }
java
public Pair<Element, Visualization> remove(PlotItem it, VisualizationTask task) { return map.remove(key(it, task)); }
[ "public", "Pair", "<", "Element", ",", "Visualization", ">", "remove", "(", "PlotItem", "it", ",", "VisualizationTask", "task", ")", "{", "return", "map", ".", "remove", "(", "key", "(", "it", ",", "task", ")", ")", ";", "}" ]
Remove a combination. @param it Plot item @param task Visualization task @return Previous value
[ "Remove", "a", "combination", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L128-L130
63,882
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.put
public void put(PlotItem it, VisualizationTask task, Pair<Element, Visualization> pair) { map.put(key(it, task), pair); }
java
public void put(PlotItem it, VisualizationTask task, Pair<Element, Visualization> pair) { map.put(key(it, task), pair); }
[ "public", "void", "put", "(", "PlotItem", "it", ",", "VisualizationTask", "task", ",", "Pair", "<", "Element", ",", "Visualization", ">", "pair", ")", "{", "map", ".", "put", "(", "key", "(", "it", ",", "task", ")", ",", "pair", ")", ";", "}" ]
Put a new item into the visualizations @param it Plot item @param task Visualization task @param pair Pair object
[ "Put", "a", "new", "item", "into", "the", "visualizations" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L139-L141
63,883
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/AbstractMTreeNode.java
AbstractMTreeNode.coveringRadiusFromEntries
public double coveringRadiusFromEntries(DBID routingObjectID, AbstractMTree<O, N, E, ?> mTree) { double coveringRadius = 0.; for(int i = 0; i < getNumEntries(); i++) { E entry = getEntry(i); final double cover = entry.getParentDistance() + entry.getCoveringRadius(); coveringRadius = coveringRa...
java
public double coveringRadiusFromEntries(DBID routingObjectID, AbstractMTree<O, N, E, ?> mTree) { double coveringRadius = 0.; for(int i = 0; i < getNumEntries(); i++) { E entry = getEntry(i); final double cover = entry.getParentDistance() + entry.getCoveringRadius(); coveringRadius = coveringRa...
[ "public", "double", "coveringRadiusFromEntries", "(", "DBID", "routingObjectID", ",", "AbstractMTree", "<", "O", ",", "N", ",", "E", ",", "?", ">", "mTree", ")", "{", "double", "coveringRadius", "=", "0.", ";", "for", "(", "int", "i", "=", "0", ";", "i...
Determines and returns the covering radius of this node. @param routingObjectID the object id of the routing object of this node @param mTree the M-Tree @return the covering radius of this node
[ "Determines", "and", "returns", "the", "covering", "radius", "of", "this", "node", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/AbstractMTreeNode.java#L86-L94
63,884
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/SweepHullDelaunay2D.java
SweepHullDelaunay2D.quadraticEuclidean
public static double quadraticEuclidean(double[] v1, double[] v2) { final double d1 = v1[0] - v2[0], d2 = v1[1] - v2[1]; return (d1 * d1) + (d2 * d2); }
java
public static double quadraticEuclidean(double[] v1, double[] v2) { final double d1 = v1[0] - v2[0], d2 = v1[1] - v2[1]; return (d1 * d1) + (d2 * d2); }
[ "public", "static", "double", "quadraticEuclidean", "(", "double", "[", "]", "v1", ",", "double", "[", "]", "v2", ")", "{", "final", "double", "d1", "=", "v1", "[", "0", "]", "-", "v2", "[", "0", "]", ",", "d2", "=", "v1", "[", "1", "]", "-", ...
Squared euclidean distance. 2d. @param v1 First double[] @param v2 Second double[] @return Quadratic distance
[ "Squared", "euclidean", "distance", ".", "2d", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/SweepHullDelaunay2D.java#L693-L696
63,885
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractObjDynamicHistogram.java
AbstractObjDynamicHistogram.aggregateSpecial
protected void aggregateSpecial(T value, int bin) { final T exist = getSpecial(bin); // Note: do not inline above accessor, as getSpecial will initialize the // special variable used below! special[bin] = aggregate(exist, value); }
java
protected void aggregateSpecial(T value, int bin) { final T exist = getSpecial(bin); // Note: do not inline above accessor, as getSpecial will initialize the // special variable used below! special[bin] = aggregate(exist, value); }
[ "protected", "void", "aggregateSpecial", "(", "T", "value", ",", "int", "bin", ")", "{", "final", "T", "exist", "=", "getSpecial", "(", "bin", ")", ";", "// Note: do not inline above accessor, as getSpecial will initialize the", "// special variable used below!", "special...
Aggregate for a special value. @param value Parameter value @param bin Special bin index.
[ "Aggregate", "for", "a", "special", "value", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractObjDynamicHistogram.java#L161-L166
63,886
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/projection/AbstractProjectionAlgorithm.java
AbstractProjectionAlgorithm.removePreviousRelation
protected void removePreviousRelation(Relation<?> relation) { if(keep) { return; } boolean first = true; for(It<Index> it = relation.getHierarchy().iterDescendants(relation).filter(Index.class); it.valid(); it.advance()) { if(first) { Logging.getLogger(getClass()).statistics("Index s...
java
protected void removePreviousRelation(Relation<?> relation) { if(keep) { return; } boolean first = true; for(It<Index> it = relation.getHierarchy().iterDescendants(relation).filter(Index.class); it.valid(); it.advance()) { if(first) { Logging.getLogger(getClass()).statistics("Index s...
[ "protected", "void", "removePreviousRelation", "(", "Relation", "<", "?", ">", "relation", ")", "{", "if", "(", "keep", ")", "{", "return", ";", "}", "boolean", "first", "=", "true", ";", "for", "(", "It", "<", "Index", ">", "it", "=", "relation", "....
Remove the previous relation. Manually also log index statistics, as we may be removing indexes. @param relation Relation to remove
[ "Remove", "the", "previous", "relation", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/projection/AbstractProjectionAlgorithm.java#L68-L81
63,887
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mktab/MkTabTreeNode.java
MkTabTreeNode.kNNDistances
protected double[] kNNDistances() { int k = getEntry(0).getKnnDistances().length; double[] result = new double[k]; for(int i = 0; i < getNumEntries(); i++) { for(int j = 0; j < k; j++) { MkTabEntry entry = getEntry(i); result[j] = Math.max(result[j], entry.getKnnDistance(j + 1)); ...
java
protected double[] kNNDistances() { int k = getEntry(0).getKnnDistances().length; double[] result = new double[k]; for(int i = 0; i < getNumEntries(); i++) { for(int j = 0; j < k; j++) { MkTabEntry entry = getEntry(i); result[j] = Math.max(result[j], entry.getKnnDistance(j + 1)); ...
[ "protected", "double", "[", "]", "kNNDistances", "(", ")", "{", "int", "k", "=", "getEntry", "(", "0", ")", ".", "getKnnDistances", "(", ")", ".", "length", ";", "double", "[", "]", "result", "=", "new", "double", "[", "k", "]", ";", "for", "(", ...
Determines and returns the knn distance of this node as the maximum knn distance of all entries. @return the knn distance of this node
[ "Determines", "and", "returns", "the", "knn", "distance", "of", "this", "node", "as", "the", "maximum", "knn", "distance", "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/mktab/MkTabTreeNode.java#L66-L79
63,888
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java
VarianceOfVolume.run
public OutlierResult run(Database database, Relation<O> relation) { StepProgress stepprog = LOG.isVerbose() ? new StepProgress("VOV", 3) : null; DBIDs ids = relation.getDBIDs(); int dim = RelationUtil.dimensionality(relation); LOG.beginStep(stepprog, 1, "Materializing nearest-neighbor sets."); KNNQ...
java
public OutlierResult run(Database database, Relation<O> relation) { StepProgress stepprog = LOG.isVerbose() ? new StepProgress("VOV", 3) : null; DBIDs ids = relation.getDBIDs(); int dim = RelationUtil.dimensionality(relation); LOG.beginStep(stepprog, 1, "Materializing nearest-neighbor sets."); KNNQ...
[ "public", "OutlierResult", "run", "(", "Database", "database", ",", "Relation", "<", "O", ">", "relation", ")", "{", "StepProgress", "stepprog", "=", "LOG", ".", "isVerbose", "(", ")", "?", "new", "StepProgress", "(", "\"VOV\"", ",", "3", ")", ":", "null...
Runs the VOV algorithm on the given database. @param database Database to query @param relation Data to process @return VOV outlier result
[ "Runs", "the", "VOV", "algorithm", "on", "the", "given", "database", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java#L122-L148
63,889
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java
VarianceOfVolume.computeVOVs
private void computeVOVs(KNNQuery<O> knnq, DBIDs ids, DoubleDataStore vols, WritableDoubleDataStore vovs, DoubleMinMax vovminmax) { FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Variance of Volume", ids.size(), LOG) : null; boolean warned = false; for(DBIDIter iter = ids.iter(); iter.valid(); ...
java
private void computeVOVs(KNNQuery<O> knnq, DBIDs ids, DoubleDataStore vols, WritableDoubleDataStore vovs, DoubleMinMax vovminmax) { FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Variance of Volume", ids.size(), LOG) : null; boolean warned = false; for(DBIDIter iter = ids.iter(); iter.valid(); ...
[ "private", "void", "computeVOVs", "(", "KNNQuery", "<", "O", ">", "knnq", ",", "DBIDs", "ids", ",", "DoubleDataStore", "vols", ",", "WritableDoubleDataStore", "vovs", ",", "DoubleMinMax", "vovminmax", ")", "{", "FiniteProgress", "prog", "=", "LOG", ".", "isVer...
Compute variance of volumes. @param knnq KNN query @param ids IDs to process @param vols Volumes @param vovs Variance of Volume storage @param vovminmax Score minimum/maximum tracker
[ "Compute", "variance", "of", "volumes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java#L190-L217
63,890
elki-project/elki
elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java
NNDescent.boundSize
private void boundSize(HashSetModifiableDBIDs set, int items) { if(set.size() > items) { DBIDs sample = DBIDUtil.randomSample(set, items, rnd); set.clear(); set.addDBIDs(sample); } }
java
private void boundSize(HashSetModifiableDBIDs set, int items) { if(set.size() > items) { DBIDs sample = DBIDUtil.randomSample(set, items, rnd); set.clear(); set.addDBIDs(sample); } }
[ "private", "void", "boundSize", "(", "HashSetModifiableDBIDs", "set", ",", "int", "items", ")", "{", "if", "(", "set", ".", "size", "(", ")", ">", "items", ")", "{", "DBIDs", "sample", "=", "DBIDUtil", ".", "randomSample", "(", "set", ",", "items", ","...
Bound the size of a set by random sampling. @param set Set to process @param items Maximum size
[ "Bound", "the", "size", "of", "a", "set", "by", "random", "sampling", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java#L281-L287
63,891
elki-project/elki
elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java
NNDescent.add
private boolean add(DBIDRef cur, DBIDRef cand, double distance) { KNNHeap neighbors = store.get(cur); if(neighbors.contains(cand)) { return false; } double newKDistance = neighbors.insert(distance, cand); return (distance <= newKDistance); }
java
private boolean add(DBIDRef cur, DBIDRef cand, double distance) { KNNHeap neighbors = store.get(cur); if(neighbors.contains(cand)) { return false; } double newKDistance = neighbors.insert(distance, cand); return (distance <= newKDistance); }
[ "private", "boolean", "add", "(", "DBIDRef", "cur", ",", "DBIDRef", "cand", ",", "double", "distance", ")", "{", "KNNHeap", "neighbors", "=", "store", ".", "get", "(", "cur", ")", ";", "if", "(", "neighbors", ".", "contains", "(", "cand", ")", ")", "...
Add cand to cur's heap neighbors with distance @param cur Current object @param cand Neighbor candidate @param distance Distance @return {@code true} if it was a new neighbor.
[ "Add", "cand", "to", "cur", "s", "heap", "neighbors", "with", "distance" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java#L388-L395
63,892
elki-project/elki
elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java
NNDescent.sampleNew
private int sampleNew(DBIDs ids, WritableDataStore<HashSetModifiableDBIDs> sampleNewNeighbors, WritableDataStore<HashSetModifiableDBIDs> newNeighborHash, int items) { int t = 0; for(DBIDIter iditer = ids.iter(); iditer.valid(); iditer.advance()) { KNNHeap realNeighbors = store.get(iditer); HashSetMo...
java
private int sampleNew(DBIDs ids, WritableDataStore<HashSetModifiableDBIDs> sampleNewNeighbors, WritableDataStore<HashSetModifiableDBIDs> newNeighborHash, int items) { int t = 0; for(DBIDIter iditer = ids.iter(); iditer.valid(); iditer.advance()) { KNNHeap realNeighbors = store.get(iditer); HashSetMo...
[ "private", "int", "sampleNew", "(", "DBIDs", "ids", ",", "WritableDataStore", "<", "HashSetModifiableDBIDs", ">", "sampleNewNeighbors", ",", "WritableDataStore", "<", "HashSetModifiableDBIDs", ">", "newNeighborHash", ",", "int", "items", ")", "{", "int", "t", "=", ...
samples newNeighbors for every object @param ids All ids @param sampleNewNeighbors Output of sampled new neighbors @param newNeighborHash - new neighbors for every object @param items Number of items to collect @return Number of new neighbors
[ "samples", "newNeighbors", "for", "every", "object" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java#L416-L435
63,893
elki-project/elki
elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java
NNDescent.reverse
private void reverse(WritableDataStore<HashSetModifiableDBIDs> sampleNewHash, WritableDataStore<HashSetModifiableDBIDs> newReverseNeighbors, WritableDataStore<HashSetModifiableDBIDs> oldReverseNeighbors) { for(DBIDIter iditer = relation.iterDBIDs(); iditer.valid(); iditer.advance()) { KNNHeap heap = store.get...
java
private void reverse(WritableDataStore<HashSetModifiableDBIDs> sampleNewHash, WritableDataStore<HashSetModifiableDBIDs> newReverseNeighbors, WritableDataStore<HashSetModifiableDBIDs> oldReverseNeighbors) { for(DBIDIter iditer = relation.iterDBIDs(); iditer.valid(); iditer.advance()) { KNNHeap heap = store.get...
[ "private", "void", "reverse", "(", "WritableDataStore", "<", "HashSetModifiableDBIDs", ">", "sampleNewHash", ",", "WritableDataStore", "<", "HashSetModifiableDBIDs", ">", "newReverseNeighbors", ",", "WritableDataStore", "<", "HashSetModifiableDBIDs", ">", "oldReverseNeighbors...
calculates new and old neighbors for database @param sampleNewHash new neighbors for every object @param newReverseNeighbors new reverse neighbors @param oldReverseNeighbors old reverse neighbors
[ "calculates", "new", "and", "old", "neighbors", "for", "database" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java#L444-L452
63,894
elki-project/elki
elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/set/JaccardSimilarityDistanceFunction.java
JaccardSimilarityDistanceFunction.similarityNumberVector
public static double similarityNumberVector(NumberVector o1, NumberVector o2) { final int d1 = o1.getDimensionality(), d2 = o2.getDimensionality(); int intersection = 0, union = 0; int d = 0; for(; d < d1 && d < d2; d++) { double v1 = o1.doubleValue(d), v2 = o2.doubleValue(d); if(v1 != v1 ||...
java
public static double similarityNumberVector(NumberVector o1, NumberVector o2) { final int d1 = o1.getDimensionality(), d2 = o2.getDimensionality(); int intersection = 0, union = 0; int d = 0; for(; d < d1 && d < d2; d++) { double v1 = o1.doubleValue(d), v2 = o2.doubleValue(d); if(v1 != v1 ||...
[ "public", "static", "double", "similarityNumberVector", "(", "NumberVector", "o1", ",", "NumberVector", "o2", ")", "{", "final", "int", "d1", "=", "o1", ".", "getDimensionality", "(", ")", ",", "d2", "=", "o2", ".", "getDimensionality", "(", ")", ";", "int...
Compute Jaccard similarity for two number vectors. @param o1 First vector @param o2 Second vector @return Jaccard similarity
[ "Compute", "Jaccard", "similarity", "for", "two", "number", "vectors", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/set/JaccardSimilarityDistanceFunction.java#L124-L151
63,895
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/AbstractMkTree.java
AbstractMkTree.batchNN
@Deprecated protected final Map<DBID, KNNList> batchNN(N node, DBIDs ids, int kmax) { Map<DBID, KNNList> res = new HashMap<>(ids.size()); for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { DBID id = DBIDUtil.deref(iter); res.put(id, knnq.getKNNForDBID(id, kmax)); } return res;...
java
@Deprecated protected final Map<DBID, KNNList> batchNN(N node, DBIDs ids, int kmax) { Map<DBID, KNNList> res = new HashMap<>(ids.size()); for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { DBID id = DBIDUtil.deref(iter); res.put(id, knnq.getKNNForDBID(id, kmax)); } return res;...
[ "@", "Deprecated", "protected", "final", "Map", "<", "DBID", ",", "KNNList", ">", "batchNN", "(", "N", "node", ",", "DBIDs", "ids", ",", "int", "kmax", ")", "{", "Map", "<", "DBID", ",", "KNNList", ">", "res", "=", "new", "HashMap", "<>", "(", "ids...
Performs a batch k-nearest neighbor query for a list of query objects. @param node the node representing the subtree on which the query should be performed @param ids the ids of the query objects @param kmax Maximum k value @deprecated Change to use by-object NN lookups instead.
[ "Performs", "a", "batch", "k", "-", "nearest", "neighbor", "query", "for", "a", "list", "of", "query", "objects", "." ]
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/AbstractMkTree.java#L106-L114
63,896
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/application/greedyensemble/ComputeKNNOutlierScores.java
ComputeKNNOutlierScores.writeResult
void writeResult(PrintStream out, DBIDs ids, OutlierResult result, ScalingFunction scaling, String label) { if(scaling instanceof OutlierScaling) { ((OutlierScaling) scaling).prepare(result); } out.append(label); DoubleRelation scores = result.getScores(); for(DBIDIter iter = ids.iter(); iter....
java
void writeResult(PrintStream out, DBIDs ids, OutlierResult result, ScalingFunction scaling, String label) { if(scaling instanceof OutlierScaling) { ((OutlierScaling) scaling).prepare(result); } out.append(label); DoubleRelation scores = result.getScores(); for(DBIDIter iter = ids.iter(); iter....
[ "void", "writeResult", "(", "PrintStream", "out", ",", "DBIDs", "ids", ",", "OutlierResult", "result", ",", "ScalingFunction", "scaling", ",", "String", "label", ")", "{", "if", "(", "scaling", "instanceof", "OutlierScaling", ")", "{", "(", "(", "OutlierScalin...
Write a single output line. @param out Output stream @param ids DBIDs @param result Outlier result @param scaling Scaling function @param label Identification label
[ "Write", "a", "single", "output", "line", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/application/greedyensemble/ComputeKNNOutlierScores.java#L336-L348
63,897
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/application/greedyensemble/ComputeKNNOutlierScores.java
ComputeKNNOutlierScores.runForEachK
private void runForEachK(String prefix, int mink, int maxk, IntFunction<OutlierResult> runner, BiConsumer<String, OutlierResult> out) { if(isDisabled(prefix)) { LOG.verbose("Skipping (disabled): " + prefix); return; // Disabled } LOG.verbose("Running " + prefix); final int digits = (int) Fas...
java
private void runForEachK(String prefix, int mink, int maxk, IntFunction<OutlierResult> runner, BiConsumer<String, OutlierResult> out) { if(isDisabled(prefix)) { LOG.verbose("Skipping (disabled): " + prefix); return; // Disabled } LOG.verbose("Running " + prefix); final int digits = (int) Fas...
[ "private", "void", "runForEachK", "(", "String", "prefix", ",", "int", "mink", ",", "int", "maxk", ",", "IntFunction", "<", "OutlierResult", ">", "runner", ",", "BiConsumer", "<", "String", ",", "OutlierResult", ">", "out", ")", "{", "if", "(", "isDisabled...
Iterate over the k range. @param prefix Prefix string @param mink Minimum value of k for this method @param maxk Maximum value of k for this method @param runner Runner to run @param out Output function
[ "Iterate", "over", "the", "k", "range", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/application/greedyensemble/ComputeKNNOutlierScores.java#L359-L378
63,898
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkapp/PolynomialApproximation.java
PolynomialApproximation.getCoefficients
public double[] getCoefficients() { double[] result = new double[b.length]; System.arraycopy(b, 0, result, 0, b.length); return result; }
java
public double[] getCoefficients() { double[] result = new double[b.length]; System.arraycopy(b, 0, result, 0, b.length); return result; }
[ "public", "double", "[", "]", "getCoefficients", "(", ")", "{", "double", "[", "]", "result", "=", "new", "double", "[", "b", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "b", ",", "0", ",", "result", ",", "0", ",", "b", ".", "length...
Returns a copy of the the array of coefficients b0, ..., bp. @return the a copy of the array of coefficients b0, ..., bp
[ "Returns", "a", "copy", "of", "the", "the", "array", "of", "coefficients", "b0", "...", "bp", "." ]
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/PolynomialApproximation.java#L77-L81
63,899
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkapp/PolynomialApproximation.java
PolynomialApproximation.getValueAt
public double getValueAt(int k) { double result = 0.; double log_k = FastMath.log(k), acc = 1.; for (int p = 0; p < b.length; p++) { result += b[p] * acc; acc *= log_k; } return result; }
java
public double getValueAt(int k) { double result = 0.; double log_k = FastMath.log(k), acc = 1.; for (int p = 0; p < b.length; p++) { result += b[p] * acc; acc *= log_k; } return result; }
[ "public", "double", "getValueAt", "(", "int", "k", ")", "{", "double", "result", "=", "0.", ";", "double", "log_k", "=", "FastMath", ".", "log", "(", "k", ")", ",", "acc", "=", "1.", ";", "for", "(", "int", "p", "=", "0", ";", "p", "<", "b", ...
Returns the function value of the polynomial approximation at the specified k. @param k the value for which the polynomial approximation should be returned @return the function value of the polynomial approximation at the specified k
[ "Returns", "the", "function", "value", "of", "the", "polynomial", "approximation", "at", "the", "specified", "k", "." ]
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/PolynomialApproximation.java#L100-L108