Package cc.redberry.core.utils

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


                --iUpper;
            }
        }
        list.add(data, iUpper, firstLower - iUpper);
        list.add(data, iLower, data.length - iLower);
        return IndicesFactory.create(list.toArray());
    }

    @Override
    public int[] getNamesOfDummies() {
        IntArrayList list = new IntArrayList();
View Full Code Here


            else if (l < u)
                --iUpper;
            else
                list.add(l);
        }
        return list.toArray();
    }

    @Override
    public Indices getOfType(IndexType type) {
        int type_ = type.getType();
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

                }
            if (y)
                dataList.add(data[i]);
        }
        //todo review
        return UnsafeIndicesFactory.createIsolatedUnsafeWithoutSort(null, dataList.toArray());
    }

    @Override
    public int[] getNamesOfDummies() {
        IntArrayList dataList = new IntArrayList();
View Full Code Here

                if ((data[i] ^ data[j]) == 0x80000000) {
                    dataList.add(data[i] & 0x7FFFFFFF);
                    break;
                }
            }
        return dataList.toArray();
    }

    @Override
    public SimpleIndices getOfType(IndexType type) {
        int type_ = type.getType() << 24;
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

        //building index generator
        IntArrayList usedIndices = new IntArrayList(TensorUtils.getAllIndicesNames(split.factoredOut));
        usedIndices.addAll(factorsIndicesNames);
        usedIndices.addAll(termIndicesNames);
        IndexGenerator ig = new IndexGenerator(usedIndices.toArray());

        List<Tensor> mkCollectedList = new ArrayList<>();

        for (Map.Entry<Integer, IndexMappingBufferRecord> entry : concurentBuffer.getMap().entrySet()) {
View Full Code Here

            for (int i : arr)
                if (contains(i))
                    continue;
                else
                    temp.add(i);
            super.addAll(temp.toArray());
        }
    }
}
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.