Codota Logo
DiagonalMatrix.setElement
Code IndexAdd Codota to your IDE (free)

How to use
setElement
method
in
gov.sandia.cognition.math.matrix.custom.DiagonalMatrix

Best Java code snippets using gov.sandia.cognition.math.matrix.custom.DiagonalMatrix.setElement (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: algorithmfoundry/Foundry

@Override
public void set(
  final int rowIndex,
  final int columnIndex,
  final double value)
{
  setElement(rowIndex, columnIndex, value);
}
origin: algorithmfoundry/Foundry

@Override
public void set(
  final int rowIndex,
  final int columnIndex,
  final double value)
{
  setElement(rowIndex, columnIndex, value);
}
origin: gov.sandia.foundry/gov-sandia-cognition-common-core

@Override
public void set(
  final int rowIndex,
  final int columnIndex,
  final double value)
{
  setElement(rowIndex, columnIndex, value);
}
origin: algorithmfoundry/Foundry

/**
 * Sets elements of the group with their score (+1/-1 or similar) and how
 * much to trust that weight.
 *
 * @param group The element's group id
 * @param index The element's within-group id
 * @param trust The amount the score should be trusted
 * @param score The score assigned to the element
 */
public void setElementsScore(int group,
  int index,
  double trust,
  double score)
{
  isInitialized = false;
  // Make sure its in within space
  checkNode(group, index);
  // Add to solution and diagonal
  int i = eachPartsStart[group] + index;
  rhs.setElement(i, trust * score);
  additional.setElement(i, i, trust);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

/**
 * Sets elements of the group with their score (+1/-1 or similar) and how
 * much to trust that weight.
 *
 * @param group The element's group id
 * @param index The element's within-group id
 * @param trust The amount the score should be trusted
 * @param score The score assigned to the element
 */
public void setElementsScore(int group,
  int index,
  double trust,
  double score)
{
  isInitialized = false;
  // Make sure its in within space
  checkNode(group, index);
  // Add to solution and diagonal
  int i = eachPartsStart[group] + index;
  rhs.setElement(i, trust * score);
  additional.setElement(i, i, trust);
}
origin: algorithmfoundry/Foundry

/**
 * Sets elements of the group with their score (+1/-1 or similar) and how
 * much to trust that weight.
 *
 * @param group The element's group id
 * @param index The element's within-group id
 * @param trust The amount the score should be trusted
 * @param score The score assigned to the element
 */
public void setElementsScore(int group,
  int index,
  double trust,
  double score)
{
  isInitialized = false;
  // Make sure its in within space
  checkNode(group, index);
  // Add to solution and diagonal
  int i = eachPartsStart[group] + index;
  rhs.setElement(i, trust * score);
  additional.setElement(i, i, trust);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

/**
 * Creates a new {@link MatrixVectorMultiplierDiagonalPreconditioner} for
 * the given matrix.
 * 
 * @param m 
 *      The matrix.
 */
public MatrixVectorMultiplierDiagonalPreconditioner(Matrix m)
{
  super(m);
  if (!m.isSquare())
  {
    throw new IllegalArgumentException("This preconditioner only works "
      + "on square matrices");
  }
  int n = m.getNumRows();
  Minv = new DiagonalMatrix(n);
  for (int i = 0; i < n; ++i)
  {
    double ij = m.getElement(i, i);
    if (ij == 0)
    {
      throw new IllegalArgumentException("Diagonal preconditioner "
        + "only serves for matrices with non-zero diagonal elements");
    }
    Minv.setElement(i, i, 1.0 / ij);
  }
}
origin: algorithmfoundry/Foundry

/**
 * Creates a new {@link MatrixVectorMultiplierDiagonalPreconditioner} for
 * the given matrix.
 * 
 * @param m 
 *      The matrix.
 */
public MatrixVectorMultiplierDiagonalPreconditioner(Matrix m)
{
  super(m);
  if (!m.isSquare())
  {
    throw new IllegalArgumentException("This preconditioner only works "
      + "on square matrices");
  }
  int n = m.getNumRows();
  Minv = new DiagonalMatrix(n);
  for (int i = 0; i < n; ++i)
  {
    double ij = m.getElement(i, i);
    if (ij == 0)
    {
      throw new IllegalArgumentException("Diagonal preconditioner "
        + "only serves for matrices with non-zero diagonal elements");
    }
    Minv.setElement(i, i, 1.0 / ij);
  }
}
origin: algorithmfoundry/Foundry

/**
 * Creates a new {@link MatrixVectorMultiplierDiagonalPreconditioner} for
 * the given matrix.
 * 
 * @param m 
 *      The matrix.
 */
public MatrixVectorMultiplierDiagonalPreconditioner(Matrix m)
{
  super(m);
  if (!m.isSquare())
  {
    throw new IllegalArgumentException("This preconditioner only works "
      + "on square matrices");
  }
  int n = m.getNumRows();
  Minv = new DiagonalMatrix(n);
  for (int i = 0; i < n; ++i)
  {
    double ij = m.getElement(i, i);
    if (ij == 0)
    {
      throw new IllegalArgumentException("Diagonal preconditioner "
        + "only serves for matrices with non-zero diagonal elements");
    }
    Minv.setElement(i, i, 1.0 / ij);
  }
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

for (int i = 0; i < size; ++i)
  this.additional.setElement(i, i, DEFAULT_TRUST);
origin: algorithmfoundry/Foundry

for (int i = 0; i < size; ++i)
  this.additional.setElement(i, i, DEFAULT_TRUST);
origin: algorithmfoundry/Foundry

for (int i = 0; i < size; ++i)
  this.additional.setElement(i, i, DEFAULT_TRUST);
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

diag.setElement(i, i, rowSum);
origin: algorithmfoundry/Foundry

diag.setElement(i, i, rowSum);
origin: algorithmfoundry/Foundry

diag.setElement(i, i, rowSum);
gov.sandia.cognition.math.matrix.customDiagonalMatrixsetElement

Javadoc

Set the value stored at the input locations to the input value

Popular methods of DiagonalMatrix

  • <init>
    Creates a square (diagonal.length x diagonal.length) diagonal matrix, initialized to the input value
  • identity
  • times
  • assertMultiplicationDimensions
  • assertSameDimensions
  • checkBounds
    Helper that makes sure the input row index and column index are within the bounds of matrix. This do
  • checkSolveDimensions
  • checkSubmatrixRange
  • get
  • getNumColumns
  • getNumRows
  • minus
  • getNumRows,
  • minus,
  • normFrobeniusSquared,
  • plus,
  • preTimes

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JLabel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
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