Examples of decompose()


Examples of mikera.matrixx.decompose.impl.qr.HouseholderQR.decompose()

  @Test
  public void testDecompose() {
    double[][] dataA = { { 0, 3, 1 }, { 0, 4, -2 }, { 2, 1, 1 } };
    Matrix A = Matrix.create(dataA);
    HouseholderQR alg = new HouseholderQR(false);
    IQRResult result = alg.decompose(A);
   
    AMatrix Q = result.getQ();
    AMatrix R = result.getR();

    Matrix expectQ = Matrix.create(new double[][] { { 0, -0.6, 0.8 },
View Full Code Here

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

        List<ByteBuffer> boundValues = new ArrayList<ByteBuffer>(values.length);
        for (int i = 0; i < values.length; i++)
        {
            Object value = values[i];
            AbstractType type = prepared.boundNames.get(i).type;
            boundValues.add(value instanceof ByteBuffer || value == null ? (ByteBuffer)value : type.decompose(value));
        }
        return QueryOptions.forInternalCalls(boundValues);
    }

    private static ParsedStatement.Prepared prepareInternal(String query) throws RequestValidationException
View Full Code Here

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

        else
        {
            AbstractType valueType = def.type.isCollection()
                                   ? ((CollectionType) def.type).valueComparator()
                                   : def.type;
            cf.addColumn(new Cell(name, value instanceof ByteBuffer ? (ByteBuffer)value : valueType.decompose(value), timestamp));
        }
        return this;
    }
}
View Full Code Here

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

        List<ByteBuffer> boundValues = new ArrayList<ByteBuffer>(values.length);
        for (int i = 0; i < values.length; i++)
        {
            Object value = values[i];
            AbstractType type = prepared.boundNames.get(i).type;
            boundValues.add(value instanceof ByteBuffer || value == null ? (ByteBuffer)value : type.decompose(value));
        }
        return QueryOptions.forInternalCalls(boundValues);
    }

    private static ParsedStatement.Prepared prepareInternal(String query) throws RequestValidationException
View Full Code Here

Examples of org.apache.cassandra.db.marshal.CompositeType.decompose()

        for (int i = 0; i < 5; i++)
        {
            List<Row> page = pager.fetchPage(1);
            assertEquals(toString(page), 1, page.size());
            // The only live cell we should have each time is the row marker
            assertRow(page.get(0), "k0", ct.decompose("c" + i, ""));
        }
    }
}
View Full Code Here

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

            Object valueClassInstance;
            try
            {
                valueClassInstance = valueValidationClass.getDeclaredField("instance").get(null);
                ListType listType = ListType.getInstance((AbstractType) valueClassInstance);
                return listType.decompose((List) value).array();
            }
            catch (NoSuchFieldException e)
            {
                log.error("Error while retrieving field{} value via CQL, Caused by: .", clazz.getSimpleName(), e);
                throw new PersistenceException(e);
View Full Code Here

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

                Object valueClassInstance = valueClass.getDeclaredField("instance").get(null);

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

                return mapType.decompose((Map) value).array();
            }
            catch (NoSuchFieldException e)
            {
                log.error("Error while retrieving field{} value via CQL, Caused by: .", keyClass.getSimpleName(), e);
                throw new PersistenceException(e);
View Full Code Here

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

            Object valueClassInstance;
            try
            {
                valueClassInstance = valueValidationClass.getDeclaredField("instance").get(null);
                SetType setType = SetType.getInstance((AbstractType) valueClassInstance);
                return setType.decompose((Set) value).array();
            }
            catch (NoSuchFieldException e)
            {
                log.error("Error while retrieving field{} value via CQL, Caused by: .", clazz.getSimpleName(), e);
                throw new PersistenceException(e);
View Full Code Here

Examples of org.apache.cassandra.db.marshal.TimeUUIDType.decompose()

            }

            int nodeCount = 0;
            // Check schema version
            UUID benchmark = UUID.fromString(currentVersionId);
            ByteBuffer benchmarkBB = ti.decompose(benchmark);
            for (String version : versions.keySet()) {
                if (version.equals(StorageProxy.UNREACHABLE)) {
                    nodeCount += versions.get(version).size();
                    continue;
                }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.UTF8Type.decompose()

    }

    private static Mutation makeSchemaMutation(FunctionName name)
    {
        UTF8Type kv = (UTF8Type)SystemKeyspace.SchemaFunctionsTable.getKeyValidator();
        return new Mutation(SystemKeyspace.NAME, kv.decompose(name.keyspace));
    }

    public Mutation toSchemaDrop(long timestamp)
    {
        Mutation mutation = makeSchemaMutation(name);
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.