Giter Club home page Giter Club logo

Comments (3)

aniketmitra001 avatar aniketmitra001 commented on May 30, 2024

@bacusters indeed this will make finding the required classes easier. Something we also need to consider is the schematic of the components . The idea was to have a very simple grouping into four namespaces. So, maybe we can reorganise the folder structure so that they are in sync with the namespaces and also change the namespaces from movetk_ to fully qualified names as movetk::

Below is the proposed reorganisation of the folder structure under src/include . @bacusters what do you think?
Also adding @mwernerds to the discussion to get his inputs on the same

MoveTKFolderStructure

from movetk.

bacusters avatar bacusters commented on May 30, 2024

I think that is a nice setup yes! One question: do we need the 'algorithms' folder in between? I think the folders for the different components are self-explaining enough to not need that? Or do we have common interfaces that we need in the movetk::algorithms namespace?

from movetk.

aniketmitra001 avatar aniketmitra001 commented on May 30, 2024

I think that is a nice setup yes! One question: do we need the 'algorithms' folder in between? I think the folders for the different components are self-explaining enough to not need that? Or do we have common interfaces that we need in the movetk::algorithms namespace?

Well that is a design choice we will have to think about , do we want a common traits and interface under movetk::algorithms or we wish to have traits and interfaces under each component?

One thing is certain that we will now need an interface similar to DistanceTraits.h & DistanceInterface.h for the DTW implementation by @mstroila because when the DTW algorithm moves to movetk/algo/Similarity.h this will create the same circular reference problem since
Similarity.h includes GeometryInterface.h and because boost.geometry already has an implementation of DTW , we have the following interface in GeometryInterface.h

      template<class GeometryTraits, class Norm, class T>
    struct dynamic_time_warping_algorithm {
        typedef T dynamic_time_warping;
    };

    template<class GeometryTraits, class Norm>
    struct dynamic_time_warping_algorithm<GeometryTraits, Norm, void> {
        typedef movetk_support::Dynamic_Time_Warping<GeometryTraits, Norm> dynamic_time_warping;
    };

    template<class GeometryTraits, class Norm>
    struct ComputeDynamicTimeWarpingDistance {
        template<class InputIterator,
                typename = movetk_core::requires_random_access_iterator<InputIterator>,
                typename = movetk_core::requires_movetk_point<GeometryTraits,
                        typename InputIterator::value_type>>
        typename GeometryTraits::NT operator()(InputIterator polyline_a_first, InputIterator polyline_a_beyond,
                                               InputIterator polyline_b_first, InputIterator polyline_b_beyond) {
            typedef dynamic_time_warping_algorithm<GeometryTraits, Norm,
                    typename GeometryTraits::MovetkDynamicTimeWarpingDistance> algorithm;
            typename algorithm::dynamic_time_warping distance;
            return distance(polyline_a_first, polyline_a_beyond, polyline_b_first, polyline_b_beyond);
        }

    };

which needs to know the definition of movetk_support::Dynamic_Time_Warping

So, going forward, we will have interfaces for algorithms as well, whether we wish to have a common traits and interface header (movetk/algo/AlgorithmTraits.h & movetk/algo/AlgorithmInterfaces.h ) or have a separate (movetk/algo/similarity/SimilarityTraits.h & movetk/algo/similarity/SimilarityInterface.h ) is something we need to decide upon.

from movetk.

Related Issues (20)

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.