Examples of scalarProduct()


Examples of com.exigen.ie.constrainer.Constrainer.scalarProduct()

    IntExpArray intvars = new IntExpArray(constrainer, vars.length);
    for (int i = 0; i < vars.length; i++) {
      IntExp cvar = (IntExp) vars[i].getImpl();
      intvars.set(cvar, i);
    }
    IntExp scalProd = constrainer.scalarProduct(intvars, values);
    problem.defineConstraintImpl(this, scalProd, oper, value);
  }

  public Linear(Var[] vars, String oper, int value) {
    super(vars[0].getProblem(), name);
View Full Code Here

Examples of com.exigen.ie.constrainer.Constrainer.scalarProduct()

    IntExpArray intvars = new IntExpArray(constrainer, vars.length);
    for (int i = 0; i < vars.length; i++) {
      IntExp cvar = (IntExp) vars[i].getImpl();
      intvars.set(cvar, i);
    }
    IntExp scalProd = constrainer.scalarProduct(intvars, values);
    problem.defineConstraintImpl(this, scalProd, oper, var);
  }

  public Linear(Var[] vars, String oper, Var var) {
    super(vars[0].getProblem(), name);
View Full Code Here

Examples of raytracer.common.type.Vector.scalarProduct()

  @Override
  public double[] primitive(Ray ray) {
    double coef[] = new double[3];
    Vector tmp = ray.getOrigin().add(this.center.product(-1.));
    coef[0] = ray.getDirection().scalarProduct(ray.getDirection());
    coef[1] = 2. * tmp.scalarProduct(ray.getDirection());
    coef[3] = tmp.scalarProduct(tmp) - this.rayon * this.rayon;
    return Solver.deg2(coef);
  }

  @Override
View Full Code Here

Examples of raytracer.common.type.Vector.scalarProduct()

  public double[] primitive(Ray ray) {
    double coef[] = new double[3];
    Vector tmp = ray.getOrigin().add(this.center.product(-1.));
    coef[0] = ray.getDirection().scalarProduct(ray.getDirection());
    coef[1] = 2. * tmp.scalarProduct(ray.getDirection());
    coef[3] = tmp.scalarProduct(tmp) - this.rayon * this.rayon;
    return Solver.deg2(coef);
  }

  @Override
  public Vector normal(Vector inter) {
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.