Examples of compose()


Examples of kodkod.ast.Formula.compose()

    } else {
      left = bf.left().accept(this);
      right = bf.right().accept(this);
    }
    skolemDepth = oldDepth;
    ret = (left==bf.left()&&right==bf.right()) ? bf : left.compose(op, right);
    return source(cache(bf,ret),bf);
  }

  /**
   * If not cached, visits the formula's children with appropriate settings
View Full Code Here

Examples of mikera.matrixx.impl.DiagonalMatrix.compose()

  @Test
  public void testDiagonalMatrix() {
    DiagonalMatrix d = DiagonalMatrix.create(1, 2);
    Matrix22 m = new Matrix22(1, 2, 3, 4);

    assertEquals(new Matrix22(1, 2, 6, 8), d.compose(m));
    assertEquals(new Matrix22(1, 4, 3, 8), m.compose(d));
  }

  @Test
  public void testMatrixFromDoubles() {
View Full Code Here

Examples of mikera.transformz.MatrixTransform.compose()

   
    assertTrue(mimv.epsilonEquals(v));   
   
    // composition of matrix and its inverse should be an identity transform
    MatrixTransform mt=new MatrixTransform(m);
    ATransform id=mt.compose(new MatrixTransform(mi));
    AVector idv=id.transform(v);
    assertTrue(idv.epsilonEquals(v));   
  }
 
  @Test
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.compose()

        private Map<String, ByteBuffer> previousRowKey = new HashMap<String, ByteBuffer>(); // previous CF row key

        public RowIterator()
        {
            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(quote(keyspace)).getTable(quote(cfName)).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.compose()

        private Map<String, ByteBuffer> previousRowKey = new HashMap<String, ByteBuffer>(); // previous CF row key

        public RowIterator()
        {
            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(quote(keyspace)).getTable(quote(cfName)).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.compose()

        {
            if (session == null)
                throw new RuntimeException("Can't create connection session");

            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(keyspace).getTable(cfName).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.compose()

        {
            if (session == null)
                throw new RuntimeException("Can't create connection session");

            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(keyspace).getTable(cfName).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.ListType.compose()

                if (((Field) attribute.getJavaMember()).getType().isAssignableFrom(List.class))
                {
                    ListType listType = ListType.getInstance((AbstractType) valueClassInstance);
                    outputCollection = new ArrayList();
                    outputCollection.addAll((Collection) listType.compose(valueByteBuffer));
                }

                else if (((Field) attribute.getJavaMember()).getType().isAssignableFrom(Set.class))
                {
                    SetType setType = SetType.getInstance((AbstractType) valueClassInstance);
View Full Code Here

Examples of org.apache.cassandra.db.marshal.MapType.compose()

                MapType mapType = MapType.getInstance((AbstractType) keyClassInstance,
                        (AbstractType) valueClassInstance);

                Map rawMap = new HashMap();
                rawMap.putAll((Map) mapType.compose(valueByteBuffer));

                Map dataCollection = marshalMap(mapGenericClasses, keyClass, valueClass, rawMap);
                PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), dataCollection.isEmpty() ? rawMap
                        : dataCollection);
            }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.SetType.compose()

                else if (((Field) attribute.getJavaMember()).getType().isAssignableFrom(Set.class))
                {
                    SetType setType = SetType.getInstance((AbstractType) valueClassInstance);
                    outputCollection = new HashSet();
                    outputCollection.addAll((Collection) setType.compose(valueByteBuffer));
                }

                PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(),
                        marshalCollection(valueValidationClass, outputCollection, genericClass));
            }
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.