GithubHelp home page GithubHelp logo

rtree's Introduction

R-TREES: A DYNAMIC INDEX STRUCTURE FOR SPATIAL SEARCHING

Testsuite

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

rtree's People

Contributors

drug007 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

rtree's Issues

search() / remove() using DataType pointer?

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.

rtree.d(82,19): Error: cannot implicitly convert expression a_dataId of type const(T) to T

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?

Error triggered by rtree.d(876,13): instantiated from here: opOpAssign!("~", XYZ)

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.