Examples of unsafeSet()


Examples of cc.redberry.core.transformations.substitutions.SubstitutionIterator.unsafeSet()

    public Tensor transform(Tensor tensor) {
        SubstitutionIterator iterator = new SubstitutionIterator(tensor, traverseGuide);
        Tensor current;
        while ((current = iterator.next()) != null) {
            if (current instanceof Product)
                iterator.unsafeSet(expandProduct((Product) current, transformations));
            else if (ExpandUtils.isExpandablePower(current)) {
                Sum sum = (Sum) current.get(0);
                int exponent = ((Complex) current.get(1)).intValue();
                if (exponent == -1)
                    continue;
View Full Code Here

Examples of cc.redberry.core.transformations.substitutions.SubstitutionIterator.unsafeSet()

                else
                    temp = ExpandUtils.expandPower(sum, exponent, iterator.getForbidden(), transformations);
                if (reciprocal)
                    temp = reciprocal(temp);
                if (symbolic)
                    iterator.unsafeSet(temp);
                else
                    iterator.set(temp);
            }
        }
        return iterator.result();
View Full Code Here

Examples of cc.redberry.core.transformations.substitutions.SubstitutionIterator.unsafeSet()

    public Tensor transform(Tensor tensor) {
        SubstitutionIterator iterator = new SubstitutionIterator(tensor, traverseGuide);
        Tensor current;
        while ((current = iterator.next()) != null) {
            if (current instanceof Product)
                iterator.unsafeSet(expandProduct((Product) current, transformations));
            else if (ExpandUtils.isExpandablePower(current)) {
                Sum sum = (Sum) current.get(0);
                int exponent = ((Complex) current.get(1)).intValue();
                if (exponent == -1)
                    continue;
View Full Code Here

Examples of cc.redberry.core.transformations.substitutions.SubstitutionIterator.unsafeSet()

                else
                    temp = ExpandUtils.expandPower(sum, exponent, iterator.getForbidden(), transformations);
                if (reciprocal)
                    temp = reciprocal(temp);
                if (symbolic)
                    iterator.unsafeSet(temp);
                else
                    iterator.set(temp);
            }
        }
        return iterator.result();
View Full Code Here

Examples of mikera.matrixx.AMatrix.unsafeSet()

      AVector row = unsafeGetVec(i);
            if (! ((row == null) || (row.isZero()))) {
                for (int j = 0; j < cols; ++j) {
            AVector acol = a.unsafeGetVec(j);
            double v = ((acol == null) || acol.isZero()) ? 0.0 : row.dotProduct(acol);
            if (v!=0.0) r.unsafeSet(i, j, v);
          }
            }
    }
    return r;
  }
View Full Code Here

Examples of mikera.matrixx.Matrix.unsafeSet()

//        double acc=0.0;
//        for (int k=0; k<ic; k++) {
//          acc+=a.unsafeGet(i, k)*tmp[k];
//        }
        double acc=DoubleArrays.dotProduct(a.data, i*ic, tmp, 0, ic);
        result.unsafeSet(i,j,acc);
      }
    }
    return result;   
  }
 
View Full Code Here

Examples of mikera.matrixx.Matrix.unsafeSet()

      for (int j=0; j<cc; j++) {
        double acc=0.0;
        for (int k=0; k<ic; k++) {
          acc+=a.unsafeGet(i, k)*b.unsafeGet(k, j);
        }
        result.unsafeSet(i,j,acc);
      }
    }
    return result;   
  }
}
View Full Code Here

Examples of mikera.matrixx.Matrix.unsafeSet()

    Matrix l = Matrix.create(n, n);

    for (int i = 0; i < n; i++) {
      for (int j = 0; j < i; j++) {
        l.unsafeSet(i, j, m.get(i, j));
      }
      l.unsafeSet(i, i, 1.0);
    }

    // clear low elements to ensure upper triangle only is populated
View Full Code Here

Examples of mikera.matrixx.Matrix.unsafeSet()

    for (int i = 0; i < n; i++) {
      for (int j = 0; j < i; j++) {
        l.unsafeSet(i, j, m.get(i, j));
      }
      l.unsafeSet(i, i, 1.0);
    }

    // clear low elements to ensure upper triangle only is populated
    Matrix u = m;
    for (int i = 0; i < n; i++) {
View Full Code Here

Examples of mikera.matrixx.Matrix.unsafeSet()

    // clear low elements to ensure upper triangle only is populated
    Matrix u = m;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < i; j++) {
        u.unsafeSet(i, j, 0.0);
      }
    }

    return new LUPResult (l, u, p);
  }
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.