8 #ifndef OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_UNIT_TESTS_HPP_
9 #define OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_UNIT_TESTS_HPP_
11 #include "Operators/Vector/vector_dist_operators.hpp"
25 template <
unsigned int prp,
typename vector>
bool check_values(vector & v,
float a)
28 auto it = v.getDomainIterator();
32 ret &= v.template getProp<prp>(it.get()) == a;
37 BOOST_REQUIRE_EQUAL(ret,
true);
42 template <
typename vector>
bool check_values_complex_expr(vector & vd)
45 auto it = vd.getDomainIterator();
51 float base1 = vd.template getProp<B>(
key) + 2.0 + vd.template getProp<B>(
key) - 2.0*vd.template getProp<C>(
key) / 5.0;
52 float base2 = vd.template getProp<A>(
key);
54 ret &= base1 == base2;
59 BOOST_REQUIRE_EQUAL(ret,
true);
64 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_pos_sum(vector & vd,
const rtype & p)
67 auto it = vd.getDomainIterator();
75 rtype base1 = rtype(xp) + p;
76 rtype base2 = vd.template getProp<A>(
key);
78 ret &= base1 == base2;
83 BOOST_REQUIRE_EQUAL(ret,
true);
88 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_pos_sub(vector & vd,
const rtype & p)
91 auto it = vd.getDomainIterator();
99 rtype base1 = rtype(xp) - p;
100 rtype base2 = vd.template getProp<A>(
key);
102 ret &= base1 == base2;
107 BOOST_REQUIRE_EQUAL(ret,
true);
112 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_pos_sub_minus(vector & vd,
const rtype & p)
115 auto it = vd.getDomainIterator();
123 rtype base1 = -(rtype(xp) - p);
124 rtype base2 = vd.template getProp<A>(
key);
126 ret &= base1 == base2;
131 BOOST_REQUIRE_EQUAL(ret,
true);
136 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_point_sub(vector & vd,
const rtype & p)
139 auto it = vd.getDomainIterator();
145 rtype base1 = -vd.template getProp<B>(
key);
146 rtype base2 = vd.template getProp<A>(
key);
148 ret &= base1 == base2;
153 BOOST_REQUIRE_EQUAL(ret,
true);
158 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sum(vector & vd,
double d)
161 auto it = vd.getDomainIterator();
167 rtype base1 = vd.template getProp<B>(
key) + d;
168 rtype base2 = vd.template getProp<A>(
key);
170 ret &= base1 == base2;
175 BOOST_REQUIRE_EQUAL(ret,
true);
180 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sum(vector & vd1, vector & vd2)
183 auto it = vd1.getDomainIterator();
189 rtype base1 = vd1.template getProp<B>(
key) + vd2.template getProp<C>(
key);
190 rtype base2 = vd1.template getProp<A>(
key);
192 ret &= base1 == base2;
197 BOOST_REQUIRE_EQUAL(ret,
true);
202 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sum_3(vector & vd1)
205 auto it = vd1.getDomainIterator();
211 rtype base1 = vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key) + vd1.template getProp<B>(
key);
212 rtype base2 = vd1.template getProp<A>(
key);
214 ret &= base1 == base2;
219 BOOST_REQUIRE_EQUAL(ret,
true);
224 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sum_4(vector & vd1)
227 auto it = vd1.getDomainIterator();
233 rtype base1 = (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key)) + (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key));
234 rtype base2 = vd1.template getProp<A>(
key);
237 ret &= base1 == base2;
242 BOOST_REQUIRE_EQUAL(ret,
true);
247 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sub(vector & vd,
double d)
250 auto it = vd.getDomainIterator();
256 rtype base1 = vd.template getProp<B>(
key) - d;
257 rtype base2 = vd.template getProp<A>(
key);
259 ret &= base1 == base2;
264 BOOST_REQUIRE_EQUAL(ret,
true);
269 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sub(
double d, vector & vd)
272 auto it = vd.getDomainIterator();
278 rtype base1 = d - vd.template getProp<B>(
key);
279 rtype base2 = vd.template getProp<A>(
key);
281 ret &= base1 == base2;
286 BOOST_REQUIRE_EQUAL(ret,
true);
291 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sub(vector & vd1, vector & vd2)
294 auto it = vd1.getDomainIterator();
300 rtype base1 = vd1.template getProp<C>(
key) - vd2.template getProp<B>(
key);
301 rtype base2 = vd1.template getProp<A>(
key);
303 ret &= base1 == base2;
308 BOOST_REQUIRE_EQUAL(ret,
true);
313 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sub_31(vector & vd1)
316 auto it = vd1.getDomainIterator();
322 rtype base1 = vd1.template getProp<B>(
key) - (vd1.template getProp<C>(
key) + vd1.template getProp<B>(
key));
323 rtype base2 = vd1.template getProp<A>(
key);
325 ret &= base1 == base2;
330 BOOST_REQUIRE_EQUAL(ret,
true);
336 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sub_32(vector & vd1)
339 auto it = vd1.getDomainIterator();
345 rtype base1 = (vd1.template getProp<C>(
key) + vd1.template getProp<B>(
key)) - vd1.template getProp<B>(
key);
346 rtype base2 = vd1.template getProp<A>(
key);
348 ret &= base1 == base2;
353 BOOST_REQUIRE_EQUAL(ret,
true);
358 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_sub_4(vector & vd1)
361 auto it = vd1.getDomainIterator();
367 rtype base1 = (vd1.template getProp<C>(
key) + vd1.template getProp<B>(
key)) - (vd1.template getProp<C>(
key) + vd1.template getProp<B>(
key));
368 rtype base2 = vd1.template getProp<A>(
key);
370 ret &= base1 == base2;
375 BOOST_REQUIRE_EQUAL(ret,
true);
381 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_mul(vector & vd,
double d)
384 auto it = vd.getDomainIterator();
390 rtype base1 = vd.template getProp<B>(
key) * d;
391 rtype base2 = vd.template getProp<A>(
key);
393 ret &= base1 == base2;
398 BOOST_REQUIRE_EQUAL(ret,
true);
404 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_mul(vector & vd1, vector & vd2)
407 auto it = vd1.getDomainIterator();
413 rtype base1 = vd1.template getProp<C>(
key) * vd2.template getProp<B>(
key);
414 rtype base2 = vd1.template getProp<A>(
key);
416 ret &= base1 == base2;
421 BOOST_REQUIRE_EQUAL(ret,
true);
426 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_mul_3(vector & vd1)
429 auto it = vd1.getDomainIterator();
435 rtype base1 = vd1.template getProp<B>(
key) * (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key));
436 rtype base2 = vd1.template getProp<A>(
key);
438 ret &= base1 == base2;
443 BOOST_REQUIRE_EQUAL(ret,
true);
449 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_mul_4(vector & vd1)
452 auto it = vd1.getDomainIterator();
458 rtype base1 = (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key)) * (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key));
459 rtype base2 = vd1.template getProp<A>(
key);
461 ret &= base1 == base2;
466 BOOST_REQUIRE_EQUAL(ret,
true);
473 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_div(vector & vd,
double d)
476 auto it = vd.getDomainIterator();
482 rtype base1 = vd.template getProp<B>(
key) / d;
483 rtype base2 = vd.template getProp<A>(
key);
485 ret &= base1 == base2;
490 BOOST_REQUIRE_EQUAL(ret,
true);
495 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_div(
double d, vector & vd)
498 auto it = vd.getDomainIterator();
504 rtype base1 = d / vd.template getProp<B>(
key);
505 rtype base2 = vd.template getProp<A>(
key);
507 ret &= base1 == base2;
512 BOOST_REQUIRE_EQUAL(ret,
true);
517 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_div(vector & vd1, vector & vd2)
520 auto it = vd1.getDomainIterator();
526 rtype base1 = vd1.template getProp<C>(
key) / vd2.template getProp<B>(
key);
527 rtype base2 = vd1.template getProp<A>(
key);
529 ret &= base1 == base2;
534 BOOST_REQUIRE_EQUAL(ret,
true);
539 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_div_31(vector & vd1)
542 auto it = vd1.getDomainIterator();
548 rtype base1 = vd1.template getProp<B>(
key) / (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key));
549 rtype base2 = vd1.template getProp<A>(
key);
551 ret &= base1 == base2;
556 BOOST_REQUIRE_EQUAL(ret,
true);
561 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_div_32(vector & vd1)
564 auto it = vd1.getDomainIterator();
570 rtype base1 = (vd1.template getProp<C>(
key) + vd1.template getProp<B>(
key)) / vd1.template getProp<B>(
key);
571 rtype base2 = vd1.template getProp<A>(
key);
573 ret &= base1 == base2;
578 BOOST_REQUIRE_EQUAL(ret,
true);
584 template <
typename rtype,
typename vector,
unsigned int A,
unsigned int B,
unsigned int C>
bool check_values_div_4(vector & vd1)
587 auto it = vd1.getDomainIterator();
593 rtype base1 = (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key)) / (vd1.template getProp<B>(
key) + vd1.template getProp<C>(
key));
594 rtype base2 = vd1.template getProp<A>(
key);
596 ret &= base1 == base2;
601 BOOST_REQUIRE_EQUAL(ret,
true);
606 template <
typename vector>
bool check_values_scal_norm_dist(vector & vd)
609 auto it = vd.getDomainIterator();
615 float base1 = vd.template getProp<VB>(
key) * vd.template getProp<VC>(
key) + norm(vd.template getProp<VC>(
key) + vd.template getProp<VB>(
key)) + distance(vd.template getProp<VC>(
key),vd.template getProp<VB>(
key));
616 float base2 = vd.template getProp<A>(
key);
618 ret &= base1 == base2;
623 BOOST_REQUIRE_EQUAL(ret,
true);
628 template <
typename vector>
void fill_values(vector & v)
630 auto it = v.getDomainIterator();
636 v.getPos(p)[0] = (float)rand() / RAND_MAX;
637 v.getPos(p)[1] = (float)rand() / RAND_MAX;
638 v.getPos(p)[2] = (float)rand() / RAND_MAX;
640 v.template getProp<A>(p) = fabs(sin(p.getKey()+1.0));
641 v.template getProp<B>(p) = fabs(sin(2.0*p.getKey()+3.0));
642 v.template getProp<C>(p) = fabs(sin(3.0*p.getKey()+18.0));
644 for (
size_t k = 0 ; k < 3 ; k++)
646 v.template getProp<VA>(p)[k] = fabs(sin(p.getKey()+1.0+k));
647 v.template getProp<VB>(p)[k] = fabs(sin(2.0*p.getKey()+1.0+3.0));
648 v.template getProp<VC>(p)[k] = fabs(sin(3.0*p.getKey()+1.0+k));
656 typedef vector_dist<3,float,aggregate<float,float,float,VectorS<3,float>,
VectorS<3,float>,VectorS<3,float>,
float>>
vector_type;
681 float dist = norm(p-q);
683 return (pA + pB) * exp(dist * dist /
var);
698 float dist = norm(p-q);
700 return (pA + pB) * exp(dist * dist /
var);
714 inline float value(
size_t p,
size_t q,
float pA,
float pB,
const vector_type & vd1)
719 float dist = norm(pp-pq);
721 return (pA + pB) * exp(dist * dist /
var);
740 float dist = norm(pp-pq);
742 return (pA + pB) * exp(dist * dist /
var);
755 float dist = norm(p-q);
757 return exp(dist * dist /
var);
763 BOOST_AUTO_TEST_SUITE( vector_dist_operators_test )
766 BOOST_AUTO_TEST_CASE( vector_dist_operators_test )
768 if (create_vcluster().getProcessingUnits() > 3)
774 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
780 typedef vector_dist<3,float,aggregate<float,float,float,VectorS<3,float>,VectorS<3,float>,VectorS<3,float>>> vtype;
782 vector_dist<3,float,aggregate<float,float,float,VectorS<3,float>,VectorS<3,float>,VectorS<3,float>>> vd(100,box,bc,ghost);
784 auto vA = getV<A>(vd);
785 auto vB = getV<B>(vd);
786 auto vC = getV<C>(vd);
788 auto vVA = getV<VA>(vd);
789 auto vVB = getV<VB>(vd);
790 auto vVC = getV<VC>(vd);
792 auto vPOS = getV<PROP_POS>(vd);
798 check_values<A>(vd,1.0);
799 check_values<B>(vd,2.0);
800 check_values<C>(vd,3.0);
803 check_values<A>(vd,2.0);
807 vA = vB + 2.0 + vB - 2.0*vC / 5.0;
808 check_values_complex_expr(vd);
813 check_values_sum<float,vtype,A,B,C>(vd,2.0);
815 check_values_sum<float,vtype,A,B,C>(vd,2.0);
817 check_values_sum<float,vtype,A,B,C>(vd,vd);
820 check_values_sub<float,vtype,A,B,C>(vd,2.0);
822 check_values_sub<float,vtype,A,B,C>(2.0,vd);
824 check_values_sub<float,vtype,A,B,C>(vd,vd);
827 check_values_mul<float,vtype,A,B,C>(vd,2.0);
829 check_values_mul<float,vtype,A,B,C>(vd,2.0);
831 check_values_mul<float,vtype,A,B,C>(vd,vd);
834 check_values_div<float,vtype,A,B,C>(vd,2.0);
836 check_values_div<float,vtype,A,B,C>(2.0,vd);
838 check_values_div<float,vtype,A,B,C>(vd,vd);
843 check_values_sum_3<float,vtype,A,B,C>(vd);
845 check_values_sum_3<float,vtype,A,B,C>(vd);
846 vA = (vC + vB) + (vC + vB);
847 check_values_sum_4<float,vtype,A,B,C>(vd);
850 check_values_sub_31<float,vtype,A,B,C>(vd);
852 check_values_sub_32<float,vtype,A,B,C>(vd);
853 vA = (vC + vB) - (vC + vB);
854 check_values_sub_4<float,vtype,A,B,C>(vd);
857 check_values_mul_3<float,vtype,A,B,C>(vd);
859 check_values_mul_3<float,vtype,A,B,C>(vd);
860 vA = (vC + vB) * (vC + vB);
861 check_values_mul_4<float,vtype,A,B,C>(vd);
864 check_values_div_31<float,vtype,A,B,C>(vd);
866 check_values_div_32<float,vtype,A,B,C>(vd);
867 vA = (vC + vB) / (vC + vB);
868 check_values_div_4<float,vtype,A,B,C>(vd);
875 check_values_sum<VectorS<3,float>,vtype,VA,VB,VC>(vd,2.0f);
877 check_values_sum<VectorS<3,float>,vtype,VA,VB,VC>(vd,2.0f);
879 check_values_sum<VectorS<3,float>,vtype,VA,VB,VC>(vd,vd);
882 check_values_sub<VectorS<3,float>,vtype,VA,VB,VC>(vd,2.0f);
884 check_values_sub<VectorS<3,float>,vtype,VA,VB,VC>(2.0f,vd);
886 check_values_sub<VectorS<3,float>,vtype,VA,VB,VC>(vd,vd);
889 check_values_mul<VectorS<3,float>,vtype,VA,VB,VC>(vd,2.0f);
891 check_values_mul<VectorS<3,float>,vtype,VA,VB,VC>(vd,2.0f);
893 check_values_mul<VectorS<3,float>,vtype,VA,VB,VC>(vd,vd);
896 check_values_div<VectorS<3,float>,vtype,VA,VB,VC>(vd,2.0f);
898 check_values_div<VectorS<3,float>,vtype,VA,VB,VC>(2.0f,vd);
900 check_values_div<VectorS<3,float>,vtype,VA,VB,VC>(vd,vd);
904 vVA = vVB + (vVC + vVB);
905 check_values_sum_3<VectorS<3,float>,vtype,VA,VB,VC>(vd);
906 vVA = (vVC + vVB) + vVB;
907 check_values_sum_3<VectorS<3,float>,vtype,VA,VB,VC>(vd);
908 vVA = (vVC + vVB) + (vVC + vVB);
909 check_values_sum_4<VectorS<3,float>,vtype,VA,VB,VC>(vd);
911 vVA = vVB - (vVC + vVB);
912 check_values_sub_31<VectorS<3,float>,vtype,VA,VB,VC>(vd);
913 vVA = (vVC + vVB) - vVB;
914 check_values_sub_32<VectorS<3,float>,vtype,VA,VB,VC>(vd);
915 vVA = (vVC + vVB) - (vVC + vVB);
916 check_values_sub_4<VectorS<3,float>,vtype,VA,VB,VC>(vd);
918 vVA = vVB * (vVC + vVB);
919 check_values_mul_3<VectorS<3,float>,vtype,VA,VB,VC>(vd);
920 vVA = (vVC + vVB) * vVB;
921 check_values_mul_3<VectorS<3,float>,vtype,VA,VB,VC>(vd);
922 vVA = (vVC + vVB) * (vVC + vVB);
923 check_values_mul_4<VectorS<3,float>,vtype,VA,VB,VC>(vd);
924 vA = vVB * (vVC + vVB);
925 check_values_mul_3<float,vtype,A,VB,VC>(vd);
926 vA = (vVC + vVB) * vVB;
927 check_values_mul_3<float,vtype,A,VB,VC>(vd);
928 vA = (vVC + vVB) * (vVC + vVB);
929 check_values_mul_4<float,vtype,A,VB,VC>(vd);
931 vVA = vVB / (vVC + vVB);
932 check_values_div_31<VectorS<3,float>,vtype,VA,VB,VC>(vd);
933 vVA = (vVC + vVB) / vVB;
934 check_values_div_32<VectorS<3,float>,vtype,VA,VB,VC>(vd);
935 vVA = (vVC + vVB) / (vVC + vVB);
936 check_values_div_4<VectorS<3,float>,vtype,VA,VB,VC>(vd);
941 check_values_scal_norm_dist(vd);
944 auto p0_e = getVExpr(p0);
947 check_values_pos_sum<VectorS<3,float>,vtype,VA,VB,VC>(vd,p0);
950 check_values_pos_sub<Point<3,float>,vtype,VA,VB,VC>(vd,p0);
952 vVA = -(vPOS - p0_e);
953 check_values_pos_sub_minus<Point<3,float>,vtype,VA,VB,VC>(vd,p0);
956 check_values_point_sub<Point<3,float>,vtype,VA,VB,VC>(vd,p0);
979 vVA = vPOS + (vPOS + vPOS);
980 vVA = (vPOS + vPOS) + vPOS;
981 vVA = (vPOS + vPOS) + (vPOS + vPOS);
983 vVA = vPOS - (vPOS + vPOS);
984 vVA = (vPOS + vPOS) - vPOS;
985 vVA = (vVC + vPOS) - (vPOS + vPOS);
987 vVA = vPOS * (vPOS + vPOS);
988 vVA = (vPOS + vPOS) * vPOS;
989 vVA = (vPOS + vPOS) * (vPOS + vPOS);
990 vA = vPOS * (vPOS + vPOS);
991 vA = (vPOS + vPOS) * vPOS;
992 vA = (vPOS + vPOS) * (vPOS + vPOS);
994 vVA = vPOS / (vPOS + vPOS);
995 vVA = (vPOS + vPOS) / vPOS;
996 vVA = (vPOS + vPOS) / (vPOS + vPOS);
999 #include "vector_dist_operators_apply_kernel_unit_tests.hpp"
1003 auto it = v1.getDomainIterator();
1009 v1.template getProp<0>(p) = -1.0;
1010 v1.template getProp<1>(p) = -1.0;
1011 v1.template getProp<2>(p) = -1.0;
1012 v1.template getProp<3>(p) = -1.0;
1013 v1.template getProp<4>(p) = -1.0;
1014 v1.template getProp<5>(p) = -1.0;
1015 v1.template getProp<6>(p) = -1.0;
1016 v1.template getProp<7>(p) = -1.0;
1022 template<
unsigned int i>
void loop_check(
vector_dist<3,
float,
aggregate<float,float,float,float,float,float,float,float>> & v1,
float check)
1024 auto it = v1.getDomainIterator();
1031 ret &= v1.template getProp<i>(p) == check;
1036 BOOST_REQUIRE_EQUAL(ret,
true);
1039 void check(
vector_dist<3,
float,
aggregate<float,float,float,float,float,float,float,float>> & v1,
size_t i)
1043 if (0 < i) check = 0.0;
1045 loop_check<0>(v1,check);
1047 if (1 < i) check = 1.0;
1049 loop_check<1>(v1,check);
1051 if (2 < i) check = 2.0;
1053 loop_check<2>(v1,check);
1055 if (3 < i) check = 3.0;
1057 loop_check<3>(v1,check);
1059 if (4 < i) check = 4.0;
1061 loop_check<4>(v1,check);
1063 if (5 < i) check = 5.0;
1065 loop_check<5>(v1,check);
1067 if (6 < i) check = 6.0;
1069 loop_check<6>(v1,check);
1071 if (7 < i) check = 7.0;
1073 loop_check<7>(v1,check);
1076 BOOST_AUTO_TEST_CASE( vector_dist_operators_assign_test )
1078 if (create_vcluster().getProcessingUnits() > 3)
1084 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
1089 vector_dist<3,float,aggregate<float,float,float,float,float,float,float,float>> vd(100,box,bc,ghost);
1091 auto v1 = getV<0>(vd);
1092 auto v2 = getV<1>(vd);
1093 auto v3 = getV<2>(vd);
1094 auto v4 = getV<3>(vd);
1095 auto v5 = getV<4>(vd);
1096 auto v6 = getV<5>(vd);
1097 auto v7 = getV<6>(vd);
1098 auto v8 = getV<7>(vd);
1171 BOOST_AUTO_TEST_SUITE_END()
Point< 3, float > value(const Point< 3, float > &p, const Point< 3, float > &q, const Point< 3, float > &pA, const Point< 3, float > &pB)
Result of the exponential kernel.
auto getPos(vect_dist_key_dx vec_key) -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
Get the position of an element.
This class implement the point shape in an N-dimensional space.
float value(size_t p, size_t q, float pA, float pB, const vector_type &vd1)
Result of the exponential kernel.
Point< 3, float > value(size_t p, size_t q, const Point< 3, float > &pA, const Point< 3, float > &pB, const vector_type &vd1)
Result of the exponential kernel.
exp_kernel(float var)
Exponential kernel giving variance.
This class is a trick to indicate the compiler a specific specialization pattern. ...
float value(const Point< 3, float > &p, const Point< 3, float > &q, float pA, float pB)
Result of the exponential kernel.
Point< 2, float > value(const Point< 3, float > &p, const Point< 3, float > &q)
Result of the exponential kernel.
float var
variance of the exponential kernel
auto distance(T exp1, P exp2) -> decltype(norm(exp1-exp2))
General distance formula.
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...