Package cc.redberry.core.utils

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


                //assert Arrays.binarySearch(from, index) < 0;
                fromL.add(index);
                toL.add(generator.generate(IndicesUtils.getType(index)));
            }

        int[] _from = fromL.toArray(), _to = toL.toArray();
        ArraysUtils.quickSort(_from, _to);

        return applyIndexMapping(tensor, new IndexMapper(_from, _to));
    }
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);
            if (remainder instanceof Sum) {
                SumBuilder sb = new SumBuilder(remainder.size());
                for (Tensor tt : remainder)
                    sb.put(factorSymbolicTerms(tt));
View Full Code Here

        }
        if (level != 0)
            throw new BracketsError();
        if (beginIndex != endIndex)
            parse(expression.substring(beginIndex + 1, endIndex), indices, state);
        return indices.toArray();
    }

    /**
     * A bit of regex
     */
 
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

                                if (oldArgIndices.size(IndexType.getType(j)) != 0)
                                    throw new IllegalArgumentException("Error in field arg indices.");
                                newArgIndices.addAll(newIndices.getOfType(IndexType.getType(j)).getAllIndices());
                            }
                        }
                        pntf.argumentsIndices[i] = IndicesFactory.createSimple(null, newArgIndices.toArray());
                    }
                }
        }
        if (pn.tokenType == TokenType.Power || pn.tokenType == TokenType.ScalarFunction) {
            for (int i = 0; i < pn.content.length; ++i)
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

                hitList.clear();
                for (int i = 0; i < targetData.length; ++i)
                    if (weakMatch(fromData[seeds[seedIndex]], targetData[i])
                            && GraphUtils.componentSize(seeds[seedIndex], fromFContractions.components) >= GraphUtils.componentSize(i, targetFContractions.components))
                        hitList.add(i);
                hits[seedIndex] = hitList.toArray();
            }
            combinationsPort = new DistinctCombinationsPort(hits);
        }

        public int[] next() {
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

        }
        if (level != 0)
            throw new BracketsError();
        if (indexMode)
            ParserIndices.parseIndices(indicesList, indicesString, indexState);
        SimpleIndices indices = IndicesFactory.createSimple(null, indicesList.toArray());
        String name = nameBuilder.toString();
        return new ParseNodeSimpleTensor(indices, name);
    }

    @Override
View Full Code Here

        }
        if (level != 0)
            throw new BracketsError();
        if (indexMode)
            parseIndices(indicesList, indicesString, indexState);
        return indicesList.toArray();
    }

    /**
     *
     * Parse string representation and put result indices in indices
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.