19 return p1[0] * p2[0] + p1[1] * p2[1] + p1[2] * p2[2];
23 return std::sqrt(
dot(p1, p1));
27 return {0.5 * (p1[0] + p2[0]), 0.5 * (p1[1] + p2[1]), 0.5 * (p1[2] + p2[2])};
31 return {p1[0] + alpha * p2[0], p1[1] + alpha * p2[1], p1[2] + alpha * p2[2]};
48 return f / std::max(
norm(es), radius);
71 template <LFPCalculatorType Ty,
typename SegmentIdTy =
int>
85 const std::vector<double>& radius,
86 const std::vector<SegmentIdTy>& segment_ids,
88 double extra_cellular_conductivity);
90 template <
typename Vector>
91 void lfp(
const Vector& membrane_current);
102 const double f)
const;
104 std::vector<std::vector<double>>
m;
113 const double f)
const {
122 const double f)
const {
128 const std::vector<double>& radius,
129 const std::vector<int>& segment_ids,
131 double extra_cellular_conductivity);
134 const std::vector<double>& radius,
135 const std::vector<int>& segment_ids,
137 double extra_cellular_conductivity);