public PrimitiveProductSubstitution(Tensor from, Tensor to) { super(from, to); Product product = (Product) from; this.fromFactor = product.getFactor(); this.fromIndexless = product.getIndexless(); this.fromContent = product.getContent(); this.fromData = fromContent.getDataCopy(); }
private static Tensor inverseOrderInProduct(Product product, IndexType type) { ProductContent pc = product.getContent(); PrimitiveSubgraph[] subgraphs = PrimitiveSubgraphPartition.calculatePartition(pc, type); Tensor[] data = pc.getDataCopy(); boolean somethingDone = false; for (PrimitiveSubgraph ps : subgraphs) {
if (content.data instanceof Product) { ProductContent currentContent = ((Product) content.data).getContent(); currentData = currentContent.getDataCopy(); ProductsBijectionsPort dataPort = new ProductsBijectionsPort(fromContent, currentContent); while ((dataBijection = dataPort.take()) != null) {