Package org.apache.mahout.matrix

Examples of org.apache.mahout.matrix.TimesFunction


      pi.set(k, p);
      if (max < p)
        max = p;
    }
    // normalize the probabilities by largest observed value
    pi.assign(new TimesFunction(), 1.0 / max);
    return pi;
  }
View Full Code Here


      pi.set(k, p);
      if (max < p)
        max = p;
    }
    // normalize the probabilities by largest observed value
    pi.assign(new TimesFunction(), 1.0 / max);
    return pi;
  }
View Full Code Here

   * @param dv a Vector of rectangle sizes
   */
  void plotRectangle(Graphics2D g2, Vector v, Vector dv) {
    int h = size / 2;
    double[] flip = { 1, -1 };
    Vector v2 = v.copy().assign(new DenseVector(flip), new TimesFunction());
    v2 = v2.minus(dv.divide(2));
    double x = v2.get(0) + h;
    double y = v2.get(1) + h;
    g2.draw(new Rectangle2D.Double(x * ds, y * ds, dv.get(0) * ds, dv.get(1)
        * ds));
 
View Full Code Here

   * @param dv a Vector of rectangle sizes
   */
  void plotEllipse(Graphics2D g2, Vector v, Vector dv) {
    int h = size / 2;
    double[] flip = { 1, -1 };
    Vector v2 = v.copy().assign(new DenseVector(flip), new TimesFunction());
    v2 = v2.minus(dv.divide(2));
    double x = v2.get(0) + h;
    double y = v2.get(1) + h;
    g2
        .draw(new Ellipse2D.Double(x * ds, y * ds, dv.get(0) * ds, dv.get(1)
View Full Code Here

   * @param v a Vector of rectangle centers
   * @param dv a Vector of rectangle sizes
   */
  public static void plotRectangle(Graphics2D g2, Vector v, Vector dv) {
    double[] flip = { 1, -1 };
    Vector v2 = v.clone().assign(new DenseVector(flip), new TimesFunction());
    v2 = v2.minus(dv.divide(2));
    int h = size / 2;
    double x = v2.get(0) + h;
    double y = v2.get(1) + h;
    g2.draw(new Rectangle2D.Double(x * ds, y * ds, dv.get(0) * ds, dv.get(1)
View Full Code Here

   * @param v a Vector of rectangle centers
   * @param dv a Vector of rectangle sizes
   */
  public static void plotEllipse(Graphics2D g2, Vector v, Vector dv) {
    double[] flip = { 1, -1 };
    Vector v2 = v.clone().assign(new DenseVector(flip), new TimesFunction());
    v2 = v2.minus(dv.divide(2));
    int h = size / 2;
    double x = v2.get(0) + h;
    double y = v2.get(1) + h;
    g2
View Full Code Here

      if (max < p) {
        max = p;
      }
    }
    // normalize the probabilities by largest observed value
    pi.assign(new TimesFunction(), 1.0 / max);
    return pi;
  }
View Full Code Here

      if (max < p) {
        max = p;
      }
    }
    // normalize the probabilities by largest observed value
    pi.assign(new TimesFunction(), 1.0 / max);
    return pi;
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.matrix.TimesFunction

Copyright © 2018 www.massapicom. 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.