Go to file
Alex Birkett 68fd7509f9 Fix Constratint parser (it should return the constraint) 2015-02-02 17:34:16 +01:00
gradle/wrapper Initial commit 2015-01-31 13:12:57 +01:00
src Fix Constratint parser (it should return the constraint) 2015-02-02 17:34:16 +01:00
.gitignore Initial commit 2015-01-31 13:12:57 +01:00
LICENSE Initial commit 2015-01-30 17:51:32 +01:00
README.md Update README.md 2015-02-01 21:01:44 +01:00
build.gradle Initial commit 2015-01-31 13:12:57 +01:00
gradlew Add missing gradlew script 2015-02-02 10:40:01 +01:00
gradlew.bat Initial commit 2015-01-31 13:12:57 +01:00
local.properties Initial commit 2015-01-31 13:12:57 +01:00
settings.gradle Initial commit 2015-01-31 13:12:57 +01:00

README.md

kiwi-java

A Java port of the Kiwi, a C++ implementation of the Cassowary constraint solving algorithm

Background

This project was created by porting Kiwi line for line to Java. The objective is to create a faster Java implementation of the Cassowary constraint solving algorithm.

Example usage

    Solver solver = new Solver();
    Variable x = new Variable("x");
    Variable y = new Variable("y");

    // x = 20
    solver.addConstraint(Symbolics.equals(x, 20));

    // x + 2 == y + 10
    solver.addConstraint(Symbolics.equals(Symbolics.add(x,2), Symbolics.add(y, 10)));

    solver.updateVariables();
    
    System.out.println("x " + x.getValue() + " y " + y.getValue());
    // x == 20
    // y == 12