Skip to content

Duplicate DistanceMatrix code in eigen_helpers.hpp and arc_helpers.hpp #46

@dmcconachie

Description

@dmcconachie

eigen_helpers.hpp

template<typename ScalarType, int VectorLength, int NumVectors>              
inline Eigen::Matrix<double, NumVectors, NumVectors> CalculateSquaredDistanceMatrix(const Eigen::Matrix<ScalarType, VectorLength, NumVectors>& set)

arc_helpers.hpp:

template<typename Datatype, typename Allocator = std::allocator<Datatype>>   
inline Eigen::MatrixXd BuildDistanceMatrix(const std::vector<Datatype, Allocator>& data, const std::function<double(const Datatype&, const Datatype&)>& distance_fn)
template<typename FirstDatatype, typename SecondDatatype, typename FirstAllocator = std::allocator<FirstDatatype>, typename SecondAllocator = std::allocator<SecondDatatype>>
inline Eigen::MatrixXd BuildDistanceMatrix(const std::vector<FirstDatatype, FirstAllocator>& data1, const std::vector<SecondDatatype, SecondAllocator>& data2, const std::function<double(const                 FirstDatatype&, const SecondDatatype&)>& distance_fn)

We might want to consider cleaning this up at some point.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions