Package cc.redberry.core.utils

Examples of cc.redberry.core.utils.IntArrayList.toArray()


                    if (indices[b] == inverseIndexState(epsIndices[a]))
                        contract = true;
                if (!contract)
                    nonPermutableList.add(b);
            }
            int[] nonPermutableArray = nonPermutableList.toArray();

            //symmetries of eps indices, which are contracted with other product (also totally antisymmetric)
            Map<IntArray, Boolean> symmetries = getEpsilonSymmetries(indices.length);

            //symmetries of product, which is contracted with Levi-Civita
View Full Code Here


                }
                if (positionsOfMatrices.isEmpty())
                    continue out;

                //final simplifications
                traces.put(product.remove(positionsOfMatrices.toArray()));
                current = traces.build();
                current = ExpandAndEliminateTransformation.expandAndEliminate(current);
                current = deltaTrace.transform(current);
                if (simplifyLeviCivita != null)
                    current = simplifyLeviCivita.transform(current);
View Full Code Here

                from.add(fromIndex);
                to.add(generator.generate(IndicesUtils.getType(fromIndex)));
            }
        }

        int[] _from = from.toArray(), _to = to.toArray();
        ArraysUtils.quickSort(_from, _to);

        IITransformer transformer = createTransformer(node, indicator);
        if (transformer != null)
            transformer.apply(new IndexMapper(_from, _to), new IGWrapper(generator), upper, lower);
View Full Code Here

                    kroneckers.add(Tensors.createKronecker(index, inverseIndexState(newIndex)));
                }
            }

            factors[i] = applyDirectMapping(factors[i],
                    new StateSensitiveMapping(from.toArray(), to.toArray()));
        }

        //temp check
//            factorIndices = new IndicesBuilder().append(factors).getIndices();
//            assert factorIndices.size() == factorIndices.getFree().size();
View Full Code Here

                    if (remainder instanceof Sum)
                        remainder = ((Sum) remainder).remove(i);
                    else remainder = Complex.ZERO;
                }
            }
            Tensor symbolicPart = ((Sum) c).select(symbolicPositions.toArray());
            symbolicPart = factorSymbolicTerm(symbolicPart, factorizationEngine);
            if (remainder instanceof Sum) {
                SumBuilder sb = new SumBuilder(remainder.size());
                for (Tensor tt : remainder)
                    sb.put(factorSymbolicTerms(tt, factorizationEngine));
View Full Code Here

                        //adding new point to orbit
                        orbitList.add(imageOfPoint);
                    }
                }
            }
            orbits.add(orbitList.toArray());
            ++orbitsIndex;
        }
        return orbits.toArray(new int[orbits.size()][]);
    }
View Full Code Here

                im.add(i);
            else if (sum.get(i) instanceof Product && !((Product) sum.get(i)).getFactor().getImaginary().isZero())
                im.add(i);
        }
        Tensor[] parts = new Tensor[2];
        int[] positions = im.toArray();
        parts[0] = ((Sum) sum).select(positions);
        parts[1] = ((Sum) sum).remove(positions);
        return parts;
    }
View Full Code Here

                seen.set(start);
                ++counter;
                cycle.add(start);
                start = permutation[start];
            }
            cycles.add(cycle.toArray());
        }
        return cycles.toArray(new int[cycles.size()][]);
    }

    /**
 
View Full Code Here

                seen.set(start);
                ++counter;
                cycle.add(start);
                start = permutation[start];
            }
            cycles.add(cycle.toArray());
        }
        return cycles.toArray(new int[cycles.size()][]);
    }

    /**
 
View Full Code Here

                            continue MAIN;
                        }
                    }
                while ((currentInfo = currentInfo.next) != null);

                innerPort = new InnerPort(bijectionNew, addedBijectionsNew.toArray());
            } while (true);
        }

        private void init() {
            int j;
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.