[ge-talk] A layout manager

Christof Lutteroth lutteroth at cs.auckland.ac.nz
Thu Sep 13 23:45:23 EDT 2007


Hi!

Fredrik Holmqvist wrote:
> While I'm already all for this layoutmanager I think runnable C++ 
> examples would be the best to convince people. The example page does 
> really shows some, not all, strengths of this layoutmanager though.
I think you are right. I am pretty sure that ALM will be ported to Haiku 
sometime soon. This will probably be much easier once Haiku is self-hosting.

>  From the latest examples:
> As lp_solve is LGPL it can probably be used, but maybe it would be 
> better to have the whole layoutmanager consistant and implemented on 
> it's own, in cases modifications needs to be done. It's also a bit of a 
> black box, the code isn't really readable as is. The size of the code 
> makes that a lesser problem, and could probably be fixed easily. The 
> OS-devs should probably need at least a basic understanding of what the 
> algorithms does and how it works, either thru well written docs or self 
> documenting code.
The lp_solve package is the best open source solver that I know of. It 
would be nice to port it to Haiku. We can also strip it down to the 
parts that are actually needed for ALM and integrate it with the ALM 
code, or replace it with a different one.
The good thing about linear programming is that the problem is formally 
well-defined, so ideally we should not need to worry too much about the 
solving as long as it works and is fast enough.
Regarding the current ALM implementation itself, I created a new package 
(alm-0.3.1.zip) that contains more source code comments (and some minor 
corrections).

> Myself I've been reading up on Simplex algorithms, which has taken some 
> time when you've been out of the loop.
> (It' interesting how many papers come without any explanations for terms 
> as BFS (Basic Feasable Solution) and other terms, making it hard to 
> learn for those that havn't learnt it already.) I think I'm getting the 
> hang of it though.
Very good! Yes, I know... such papers can be really hard to read.

> I've been playing with the Cassowary Java impl myself, putting it on a 
> strict diet and trying to learn more.
The Cassowary solver might also be an option. IIRC it also uses the 
simplex method, but instead of giving the user full control over the 
objective function it uses some kind of lexicographic ordering of 
constraints (i.e. for specifying constraint priorities). It would be 
nice to know if Cassowary is faster than lp_solve for GUI layout.

Cheers,
Christof


More information about the glasselevator-talk mailing list