A dlang version of the RTree algorithm. This is port of C++ version by Yariv Barkan. For more information please read the comments in rtree.d
LICENSE
Public domain
A dynamic index structure for spatial searching
A dlang version of the RTree algorithm. This is port of C++ version by Yariv Barkan. For more information please read the comments in rtree.d
LICENSE
Public domain
I'm storing rects which are related to the stored DataType pointer. The rects of DataType can change, hence I want to update the index.
To remove the rect associated with DataType, I need to know the old rect and than insert a new rect. This requires housekeeping code for old-rect, new-rect.
How about adding a way where I can use DataType pointer to remove/update the index? If a constraint, that DataType pointer is only allowed once makes things simpler I think that would help.
I get this error when using RTree!(myClass, float, 2, double)
and trying to insert a node with:
// myObj is of type MyClass
foreach(myObj; ...){
rtree.insert(min, max, myObj);
}
The problem seems to be that the const from the parameter is not reflected in the template instantiation. But when I try to use: RTree!(const myClass, float, 2, double)
I get a bunch of other problems origin from here:
...
rtree.d(125,2): instantiated from here: Array!(const(myClass))
Isn't the const for insert wrong?
I want to use class pointers in rtree and have a opCall() defined for my class. When this opCall is present I get the following error. This looks like rtree is requiring the ~ operator to exists.
Can't this be made more generic, so that there are no requirements on my side when using rtree?
C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(4434,26): Error: need this for opCall of type @system gob(gob child, int position = 0)
C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(4550,17): Error: template instance std.conv.emplaceRef!(gob, gob, gob) error instantiating
C:\D\dmd2\windows\bin\..\..\src\phobos\std\container\array.d(433,20): instantiated from here: emplace!(gob, gob)
C:\D\dmd2\windows\bin\..\..\src\phobos\std\container\array.d(877,32): instantiated from here: insertBack!(gob)
C:\D\dmd2\windows\bin\..\..\src\phobos\std\container\array.d(806,23): instantiated from here: insertBack!(gob)
C:\Users\robby\AppData\Local\dub\packages\rtree-0.0.1\rtree\source\rtree.d(876,13): instantiated from here: opOpAssign!("~", gob)
..\..\gui.d(27,17): instantiated from here: RTree!(gob, float, 2, double, 8, 4)
C:\D\dmd2\windows\bin\..\..\src\phobos\std\container\array.d(546,21): Error: template instance std.container.array.Array!(gob).Array.__ctor!(gob) error instantiating
C:\Users\robby\AppData\Local\dub\packages\rtree-0.0.1\rtree\source\rtree.d(126,2): instantiated from here: Array!(gob)
..\..\gui.d(27,17): instantiated from here: RTree!(gob, float, 2, double, 8, 4)
Wouldn't it be more efficient to just get rid of all internal state without iterating over all nodes?
Just wondering...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.