Package gnu.trove.set.hash

Examples of gnu.trove.set.hash.TIntHashSet.removeAll()


    }

    public static TIntHashSet getAllDummyIndicesT(Tensor tensor) {
        TIntHashSet set = new TIntHashSet();
        appendAllIndicesNamesT(tensor, set);
        set.removeAll(IndicesUtils.getIndicesNames(tensor.getIndices().getFree()));
        return set;
    }

    public static TIntHashSet getAllIndicesNamesT(Tensor... tensors) {
        TIntHashSet set = new TIntHashSet();
View Full Code Here


                for (int index : dataBijection) {
                    allowed.addAll(TensorUtils.getAllDummyIndicesT(currentData[index]));
                    ib.append(currentData[index]);
                }
                allowed.addAll(ib.getIndices().getNamesOfDummies());
                allowed.removeAll(IndicesUtils.getIndicesNames(mapping.getToData()));
                newTo = applyIndexMappingAndRenameAllDummies(to, mapping, allowed.toArray());
            }
        }
        return new SubsResult(newTo, remainder);
    }
View Full Code Here

                TIntHashSet oldDummyIndices = TensorUtils.getAllDummyIndicesT(oldTensor);
                TIntHashSet newDummyIndices = TensorUtils.getAllDummyIndicesT(tensor);

                TIntHashSet added = new TIntHashSet(newDummyIndices);
                added.removeAll(oldDummyIndices);

                if (!added.isEmpty() || previous.isPayloadInitialized()) {
                    ForbiddenContainer fc = previous.getPayload();

                    TIntHashSet removed = new TIntHashSet(oldDummyIndices);
View Full Code Here

                if (!added.isEmpty() || previous.isPayloadInitialized()) {
                    ForbiddenContainer fc = previous.getPayload();

                    TIntHashSet removed = new TIntHashSet(oldDummyIndices);
                    removed.removeAll(newDummyIndices);

                    fc.submit(removed, added);
                }
            }
        }
View Full Code Here

        @Override
        public TIntSet getForbidden() {
            insureInitialized();
            TIntHashSet result = new TIntHashSet(forbidden);
//            result.removeAll(TensorUtils.getAllIndicesNamesT(position.tensor.get(currentBranch)));
            result.removeAll(TensorUtils.getAllIndicesNamesT(tensor.get(position.currentIndex())));
            return result;
        }
    }

    private final static class ProductFC extends AbstractFC {
View Full Code Here

        this.factorForbiddenIndices = factorForbiddenIndices;
    }

    void put(Tensor summand, Tensor factor) {
        TIntHashSet allowed = TensorUtils.getAllDummyIndicesT(factor);
        allowed.removeAll(factorForbiddenIndices);
        //old variant
        //IndexGenerator ig = new IndexGeneratorFromData(TensorUtils.getAllDummyIndicesT(factor).toArray());
        summand = ApplyIndexMapping.renameDummy(summand, factorForbiddenIndices, allowed.toArray());
        builder.put(summand);
    }
View Full Code Here

    }

    private static TIntHashSet getAllDummyIndicesT(boolean includeScalarFunctions, Tensor tensor) {
        TIntHashSet set = new TIntHashSet();
        appendAllIndicesNamesT(tensor, set, includeScalarFunctions);
        set.removeAll(IndicesUtils.getIndicesNames(tensor.getIndices().getFree()));
        return set;
    }

    public static TIntHashSet getAllIndicesNamesT(Collection<? extends Tensor> tensors) {
        TIntHashSet set = new TIntHashSet();
View Full Code Here

    }

    public static TIntHashSet getAllDummyIndicesT(Tensor tensor) {
        TIntHashSet set = new TIntHashSet();
        appendAllIndicesNamesT(tensor, set);
        set.removeAll(IndicesUtils.getIndicesNames(tensor.getIndices().getFree()));
        return set;
    }

    public static TIntHashSet getAllIndicesNamesT(Tensor... tensors) {
        TIntHashSet set = new TIntHashSet();
View Full Code Here

    }

    private static TIntHashSet getAllDummyIndicesT(boolean includeScalarFunctions, Tensor tensor) {
        TIntHashSet set = new TIntHashSet();
        appendAllIndicesNamesT(tensor, set, includeScalarFunctions);
        set.removeAll(IndicesUtils.getIndicesNames(tensor.getIndices().getFree()));
        return set;
    }

    public static TIntHashSet getAllIndicesNamesT(Collection<? extends Tensor> tensors) {
        TIntHashSet set = new TIntHashSet();
View Full Code Here

        this.factorForbiddenIndices = factorForbiddenIndices;
    }

    void put(Tensor summand, Tensor factor) {
        TIntHashSet allowed = TensorUtils.getAllDummyIndicesT(factor);
        allowed.removeAll(factorForbiddenIndices);
        //old variant
        //IndexGenerator ig = new IndexGeneratorFromData(TensorUtils.getAllDummyIndicesT(factor).toArray());
        summand = ApplyIndexMapping.renameDummy(summand, factorForbiddenIndices, allowed.toArray());
        builder.put(summand);
    }
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.