示例#1
0
 /**
  * Creates output port of mappings of two simple tensors and do not takes into account the
  * arguments of fields.
  *
  * @param from from tensor
  * @param to to tensor
  * @return port of mappings of indices
  */
 public static MappingsPort simpleTensorsPort(SimpleTensor from, SimpleTensor to) {
   final IndexMappingProvider provider =
       ProviderSimpleTensor.FACTORY_SIMPLETENSOR.create(
           IndexMappingProvider.Util.singleton(new IndexMappingBufferImpl()), from, to);
   provider.tick();
   return new MappingsPortRemovingContracted(provider);
 }
示例#2
0
 /**
  * Creates output port of mappings of tensor {@code from} on tensor {@code to} with specified
  * mappings rules defined in specified {@link IndexMappingBuffer}.
  *
  * @param buffer initial mapping rules
  * @param from from tensor
  * @param to to tensor
  * @return output port of mapping
  */
 public static MappingsPort createPort(
     final IndexMappingBuffer buffer, final Tensor from, final Tensor to) {
   final IndexMappingProvider provider =
       createPort(IndexMappingProvider.Util.singleton(buffer), from, to);
   provider.tick();
   return new MappingsPortRemovingContracted(provider);
 }