74 std::vector< std::vector<int> > b2minds;
75 IndexedSet<IBlob::pointer>
blobs;
76 IndexedSet<IChannel::shared_vector> measures;
77 for (
IBlob::pointer iblob : neighbors_oftype<IBlob::pointer>(grind, islice)) {
79 std::vector<int> minds;
80 for (
auto neigh : grind.neighbors(iblob)) {
81 if (neigh.code() ==
'm') {
82 IChannel::shared_vector imeas = std::get<IChannel::shared_vector>(neigh.ptr);
83 int mind = measures(imeas);
84 minds.push_back(mind);
88 b2minds.push_back(minds);
92 const size_t nmeasures = measures.size();
95 for (
size_t mind=0; mind<nmeasures; ++mind) {
96 const auto& imeas = measures.collection[mind];
99 const double sig = sqrt(value);
101 meas(mind) = value/sig;
105 const size_t nblobs = blobs.size();
110 for (
size_t bind = 0; bind < nblobs; ++bind) {
112 init(bind) = iblob->value();
114 const auto& minds = b2minds[bind];
115 for (
int mind : minds) {
116 const double sig = sigma(mind);
118 geom(mind, bind) = 1.0/sig;
127 for (
size_t ind=0; ind < nblobs; ++ind) {
128 auto oblob = blobs.collection[ind];
129 const double value = solved[ind];
130 const double unc = 0.0;
132 oblob->shape(), islice, oblob->face());
133 grind.replace(oblob, nblob);
vector_t solve(matrix_t response, vector_t measured, const Params ¶ms=Params(), vector_t source=Eigen::VectorXd(), vector_t weights=Eigen::VectorXd())
const GenericPointer< typename T::ValueType > T2 value
static double blob_weight(IBlob::pointer iblob, ISlice::pointer islice, const cluster_indexed_graph_t &grind)
const GenericPointer< typename T::ValueType > & pointer
static double measure_sum(const IChannel::shared_vector &imeas, const ISlice::pointer &islice)