Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-10-24 15:41:09


"Calum Grant" <calum_at_[hidden]> wrote

> I would really like to be able to write
>
> for_each(
> limit(
> sort( (descending(col<2, 0>()), col<0, Location::name>() ),
> group_by( col<0, Location::id_column>(),
> select(
> (locations, locations),
> col<1, Location::x_column>() <= col<0, Location::x_column>() +
> m_cutoff &&
> col<1, Location::x_column>() >= col<0, Location::x_column>() -
> m_cutoff &&
> col<1, Location::y_column>() <= col<0, Location::y_column>() +
> m_cutoff &&
> col<1, Location::y_column>() >= col<0, Location::y_column>() -
> m_cutoff &&
> col<1, Location::z_column>() <= col<0, Location::z_column>() +
> m_cutoff &&
> col<1, Location::z_column>() >= col<0, Location::z_column>() -
> m_cutoff &&
> query(test_distance())
> ),
> ),
> ), 50),
> display_result()
> );
>
> In order to achieve this, I would need to implement sorting using
> multiple columns, group_by(), and query(). And this query would I
> suspect run as fast as the original. (Though it would not support
> dynamic update).

And, once you are done with this, you will have pretty much the same that
RTL has right now, and even your interface will look the same.

Except, as you mentioned, you won't have dynamic updates that RTL has.

I wonder if your query will still be faster by then ;-)

Regards,
Arkadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk