cassowary-d 0.0.1
Linear constraint solving library.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
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);
}
- Registered by Yuriy Glukhov
- 0.0.1 released 10 years ago
- yglukhov/cassowary.d
- LGPL
- Copyright © 2014, Yuriy Glukhov
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.1 2014-Apr-29 ~master 2014-Apr-30 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
210 downloads total
-
- Score:
- 1.0
- Short URL:
- cassowary-d.dub.pm