//#####################################################################
// Copyright 2020, Jason Goulding, Craig Schroeder, Tamar Shinar.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class Nearest_Neighbors
//#####################################################################
#ifndef __Nearest_Neighbors__
#define __Nearest_Neighbors__

#include <Core/Arrays/ARRAY.h>
#include <Core/Arrays/ARRAY_VIEW.h>
#include <Core/Vectors/VECTOR.h>
#include <functional>
#include <utility>
namespace PhysBAM{
using std::pair;
template<class TV,class T> void
Nearest_Neighbors(ARRAY_VIEW<const TV> X,ARRAY<pair<VECTOR<int,2>,T> >& pairs,T dist);
template<class TV,class T> void
Nearest_Neighbors(ARRAY_VIEW<const TV> X,ARRAY_VIEW<const TV> Y,ARRAY<pair<VECTOR<int,2>,T> >& pairs,T dist);
template<class TV,class T> void
Nearest_Neighbors(ARRAY_VIEW<const TV> X,ARRAY<pair<VECTOR<int,2>,T> >& pairs,T dist,const RANGE<TV>& domain,const VECTOR<bool,TV::m>& periodic);
template<class TV,class T> void
Nearest_Neighbors(ARRAY_VIEW<const TV> X,std::function<void(int,int,T)> func,T dist);
template<class TV,class T> void
Nearest_Neighbors(ARRAY_VIEW<const TV> X,ARRAY_VIEW<const TV> Y,std::function<void(int,int,T)> func,T dist);
}
#endif
