Tabnine Logo
PointerHierarchyRepresentationBuilder.setSize
Code IndexAdd Tabnine to your IDE (free)

How to use
setSize
method
in
de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.PointerHierarchyRepresentationBuilder

Best Java code snippets using de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.PointerHierarchyRepresentationBuilder.setSize (Showing top 6 results out of 315)

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: 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);
}
origin: de.lmu.ifi.dbs.elki/elki

builder.setSize(iy, 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: elki-project/elki

builder.setSize(iy, sizex + sizey);
origin: de.lmu.ifi.dbs.elki/elki-clustering

builder.setSize(iy, sizex + sizey);
de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchicalPointerHierarchyRepresentationBuildersetSize

Javadoc

Set the cluster size of an object.

Popular methods of PointerHierarchyRepresentationBuilder

  • <init>
    Constructor.
  • add
    Add an element to the pointer representation. Important: If an algorithm does not produce links in a
  • complete
    Finalize the result.
  • getSize
    Get the cluster size of the current object.
  • isLinked
    Test if an object is already linked.

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Kernel (java.awt.image)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now