Codota Logo
AGNES.updateMatrix
Code IndexAdd Codota to your IDE (free)

How to use
updateMatrix
method
in
de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.AGNES

Best Java code snippets using de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.AGNES.updateMatrix (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Execute the cluster merge.
 *
 * @param size Data set size
 * @param scratch Scratch space.
 * @param ix First iterator
 * @param iy Second iterator
 * @param builder Hierarchy builder
 * @param mindist Distance that was used for merging
 * @param x First matrix position
 * @param y Second matrix position
 */
protected void merge(int size, double[] scratch, DBIDArrayIter ix, DBIDArrayIter iy, PointerHierarchyRepresentationBuilder builder, double mindist, int x, int y) {
 // Avoid allocating memory, by reusing existing iterators:
 ix.seek(x);
 iy.seek(y);
 if(LOG.isDebuggingFine()) {
  LOG.debugFine("Merging: " + DBIDUtil.toString(ix) + " -> " + DBIDUtil.toString(iy) + " " + mindist);
 }
 // Perform merge in data structure: x -> y
 assert(y < x);
 // Since y < x, prefer keeping y, dropping x.
 builder.add(ix, mindist, iy);
 // Update cluster size for y:
 final int sizex = builder.getSize(ix), sizey = builder.getSize(iy);
 builder.setSize(iy, sizex + sizey);
 // Note: this changes iy.
 updateMatrix(size, scratch, iy, builder, mindist, x, y, sizex, sizey);
}
origin: elki-project/elki

/**
 * Execute the cluster merge.
 *
 * @param end Active set size
 * @param mat Matrix paradigm
 * @param builder Hierarchy builder
 * @param mindist Distance that was used for merging
 * @param x First matrix position
 * @param y Second matrix position
 */
protected void merge(int end, MatrixParadigm mat, PointerHierarchyRepresentationBuilder builder, double mindist, int x, int y) {
 // Avoid allocating memory, by reusing existing iterators:
 final DBIDArrayIter ix = mat.ix.seek(x), iy = mat.iy.seek(y);
 if(LOG.isDebuggingFine()) {
  LOG.debugFine("Merging: " + DBIDUtil.toString(ix) + " -> " + DBIDUtil.toString(iy) + " " + mindist);
 }
 // Perform merge in data structure: x -> y
 assert (y < x);
 // Since y < x, prefer keeping y, dropping x.
 builder.add(ix, linkage.restore(mindist, getDistanceFunction().isSquared()), iy);
 // Update cluster size for y:
 final int sizex = builder.getSize(ix), sizey = builder.getSize(iy);
 builder.setSize(iy, sizex + sizey);
 updateMatrix(end, mat, builder, mindist, x, y, sizex, sizey);
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

/**
 * Execute the cluster merge.
 *
 * @param end Active set size
 * @param mat Matrix paradigm
 * @param builder Hierarchy builder
 * @param mindist Distance that was used for merging
 * @param x First matrix position
 * @param y Second matrix position
 */
protected void merge(int end, MatrixParadigm mat, PointerHierarchyRepresentationBuilder builder, double mindist, int x, int y) {
 // Avoid allocating memory, by reusing existing iterators:
 final DBIDArrayIter ix = mat.ix.seek(x), iy = mat.iy.seek(y);
 if(LOG.isDebuggingFine()) {
  LOG.debugFine("Merging: " + DBIDUtil.toString(ix) + " -> " + DBIDUtil.toString(iy) + " " + mindist);
 }
 // Perform merge in data structure: x -> y
 assert (y < x);
 // Since y < x, prefer keeping y, dropping x.
 builder.add(ix, linkage.restore(mindist, getDistanceFunction().isSquared()), iy);
 // Update cluster size for y:
 final int sizex = builder.getSize(ix), sizey = builder.getSize(iy);
 builder.setSize(iy, sizex + sizey);
 updateMatrix(end, mat, builder, mindist, x, y, sizex, sizey);
}
de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchicalAGNESupdateMatrix

Javadoc

Update the scratch distance matrix.

Popular methods of AGNES

  • <init>
    Constructor.
  • findMerge
    Perform the next merge step in AGNES.
  • getDistanceFunction
  • initializeDistanceMatrix
    Initialize a distance matrix.
  • merge
    Execute the cluster merge.
  • shrinkActiveSet
    Shrink the active set: if the last x objects are all merged, we can reduce the working size accordin
  • triangleSize
    Compute the size of a complete x by x triangle (minus diagonal)

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now