Package cc.mallet.types

Examples of cc.mallet.types.SparseMatrixn.valueAtLocation()


  public static LogTableFactor makeFromMatrix (Variable[] vars, SparseMatrixn values)
  {
    SparseMatrixn logValues = (SparseMatrixn) values.cloneMatrix ();
    for (int i = 0; i < logValues.numLocations (); i++) {
      logValues.setValueAtLocation (i, Math.log (logValues.valueAtLocation (i)));
    }
    Flops.log (logValues.numLocations ());
    return new LogTableFactor (vars, logValues);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.