cassowary-d 0.0.1

Linear constraint solving library.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

cassowary.d

Cassowary constraint solving library for D language.

This is a port of Java version of http://www.cs.washington.edu/research/constraints/cassowary/

Usage:

import std.stdio;
import cassowary.d;

unittest
{
	auto x = new ClVariable(123);
	auto y = new ClVariable(30);
	auto solver = new ClSimplexSolver();

	auto eq = new ClLinearEquation(x, y / 3 - 5);
	solver.addStay(y);
	solver.addConstraint(eq);

	assert(x.value() == y.value() / 3 - 5);
	assert(x.value() == 5);
}
Authors:
Yuriy Glukhov
Dependencies:
none
Versions:
0.0.1 2014-Apr-29
~master 2014-Apr-30
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 198 downloads total