Matrices
Code IndexAdd Codota to your IDE (free)

Best code snippets using no.uib.cipr.matrix.Matrices(Showing top 15 results out of 315)

origin: nz.ac.waikato.cms.weka/weka-dev

/**
 * Return the correlation/covariance matrix
 *
 * @return the correlation or covariance matrix
 */
public double[][] getCorrelationMatrix() {
 return Matrices.getArray(m_correlation);
}
origin: fommil/matrix-toolkits-java

/**
 * Creates a random vector. Numbers are drawn from a uniform distribution
 * between 0 and 1
 * 
 * @param size
 *            Size of the vector
 */
public static Vector random(int size) {
  return random(new DenseVector(size));
}
origin: fommil/matrix-toolkits-java

public Matrix mult(Matrix B, DenseMatrix C) {
  if (pivots == null)
    return super.mult(B, C);
  checkMultAdd(B, C);
  C.set(B);
  LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(),
      Matrices.ld(C.numRows()), 1, pivots.length, pivots,
      transposed ? -1 : 1);
  return C;
}
origin: openimaj/openimaj

public Model(int nvisible, int nhidden) {
  w1 = (DenseMatrix) Matrices.random(nhidden, nhidden);
  w2 = (DenseMatrix) Matrices.random(nvisible, nhidden);
  b1 = (DenseVector) Matrices.random(nhidden);
  b2 = (DenseVector) Matrices.random(nvisible);
}
origin: ujmp/universal-java-matrix-package

public double getDouble(long... coordinates) {
  if (inv == null) {
    DenseMatrix A = new MTJDenseDoubleMatrix2D(getSource()).getWrappedObject();
    DenseMatrix I = Matrices.identity((int) getSource().getColumnCount());
    DenseMatrix AI = I.copy();
    inv = new MTJDenseDoubleMatrix2D((DenseMatrix) A.solve(I, AI));
  }
  return inv.getAsDouble(coordinates);
}
origin: fommil/matrix-toolkits-java

/**
 * Creates a random matrix. Numbers are drawn from a uniform distribution
 * between 0 and 1
 * 
 * @param numRows
 *            Number of rows
 * @param numColumns
 *            Number of columns
 */
public static Matrix random(int numRows, int numColumns) {
  return random(new DenseMatrix(numRows, numColumns));
}
origin: com.googlecode.matrix-toolkits-java/mtj

@Override
public Matrix copy() {
  return Matrices.synchronizedMatrixByColumns(A.copy());
}
origin: com.googlecode.matrix-toolkits-java/mtj

@Override
public Vector copy() {
  return Matrices.synchronizedVector(x.copy());
}
origin: fommil/matrix-toolkits-java

@Override
public Matrix copy() {
  return Matrices.synchronizedMatrixByRows(A.copy());
}
origin: com.googlecode.matrix-toolkits-java/mtj

public Matrix transAmult(Matrix B, DenseMatrix C) {
  if (pivots == null)
    return super.transAmult(B, C);
  checkTransAmultAdd(B, C);
  C.set(B);
  LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(),
      Matrices.ld(C.numRows()), 1, pivots.length, pivots,
      transposed ? 1 : -1);
  return C;
}
origin: com.googlecode.matrix-toolkits-java/mtj

public Matrix mult(Matrix B, DenseMatrix C) {
  if (pivots == null)
    return super.mult(B, C);
  checkMultAdd(B, C);
  C.set(B);
  LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(),
      Matrices.ld(C.numRows()), 1, pivots.length, pivots,
      transposed ? -1 : 1);
  return C;
}
origin: com.googlecode.matrix-toolkits-java/mtj

/**
 * Creates a random vector. Numbers are drawn from a uniform distribution
 * between 0 and 1
 * 
 * @param size
 *            Size of the vector
 */
public static Vector random(int size) {
  return random(new DenseVector(size));
}
origin: fommil/matrix-toolkits-java

public Matrix transAmult(Matrix B, DenseMatrix C) {
  if (pivots == null)
    return super.transAmult(B, C);
  checkTransAmultAdd(B, C);
  C.set(B);
  LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(),
      Matrices.ld(C.numRows()), 1, pivots.length, pivots,
      transposed ? 1 : -1);
  return C;
}
origin: com.googlecode.matrix-toolkits-java/mtj

/**
 * Creates a random matrix. Numbers are drawn from a uniform distribution
 * between 0 and 1
 * 
 * @param numRows
 *            Number of rows
 * @param numColumns
 *            Number of columns
 */
public static Matrix random(int numRows, int numColumns) {
  return random(new DenseMatrix(numRows, numColumns));
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Return the correlation/covariance matrix
 *
 * @return the correlation or covariance matrix
 */
public double[][] getCorrelationMatrix() {
 return Matrices.getArray(m_correlation);
}
no.uib.cipr.matrixMatrices

Javadoc

Static utility methods for matrices and vectors

Most used methods

  • identity
    Returns the identity matrix of the given size
  • getArray
    Returns a dense array containing a copy of the given vector
  • ld
    max(1, max(M, N)) provided as a convenience for 'leading dimension' calculations.
  • random
    Populates a vector with random numbers drawn from a uniform distribution between 0 and 1
  • cardinality
    Returns the number of non-zero entries in the given vector
  • index
    Creates a strided linear index.
  • synchronizedMatrix
    Returns a synchronized matrix which wraps the given matrix. Only theset(int, int, double) and add(in
  • synchronizedMatrixByColumns
    Returns a synchronized matrix which wraps the given matrix. Only theset(int, int, double) and add(in
  • synchronizedMatrixByRows
    Returns a synchronized matrix which wraps the given matrix. Only theset(int, int, double) and add(in
  • synchronizedVector
    Returns a synchronized vector which wraps the given vector. Only theset(int, double) and add(int, do

Popular classes and methods

  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • Font (java.awt)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • DateFormat (java.text)
    DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Runner (org.openjdk.jmh.runner)
    Runner executes JMH benchmarks.This is the entry point for JMH Java API. Runner is not usually reu
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)