int Stats::score() const { // Balancing factors // a = shot-balance // b = water-balance double a = 3; double b = 0.5; double score = (a * hits() - b * misses()) / (shots() + misses()) * 1000; int res = static_cast<int>(score); if (res <= 0) { res = 1; } return res; }
void TravelTimeDijkstraModelling::updateMeshDependency_(){ if (verbose_) std::cout << "... looking for shot and receiver positions." << std::endl; if (!dataContainer_){ throwError(1, "We have no dataContainer defined"); } RVector shots(unique(sort((*dataContainer_)("s")))); if (shots.size() == 0){ throwError(1, "There are no shot positions in the dataContainer."); } shotNodeId_.resize(shots.size()) ; shotsInv_.clear(); if (shots[0] < 0){ throwError(1, "There are shots index lower then 0."); } for (Index i = 0; i < shots.size(); i ++){ shotNodeId_[i] = mesh_->findNearestNode(dataContainer_->sensorPosition((Index)shots[i])); if (mesh_->node(shotNodeId_[i]).cellSet().size() == 0){ __MS("no cells found") } shotsInv_[Index(shots[i])] = i; } RVector receiver(unique(sort((*dataContainer_)("g")))); receNodeId_.resize(receiver.size()) ; receiInv_.clear(); for (Index i = 0; i < receiver.size(); i ++){ receNodeId_[i] = mesh_->findNearestNode(dataContainer_->sensorPosition(Index(receiver[i]))); receiInv_[Index(receiver[i])] = i; } }
int ShotGroup::frameEndEDL() const { return shots()[0].frameEndEDL(); }
int ShotGroup::frameStartEDL() const { return shots()[shots().count()-1].frameStartEDL(); }