Returns the cost of not having a space before the specified segmentation point
| 401 | // Returns the cost of not having a space before the specified |
| 402 | // segmentation point |
| 403 | int CubeSearchObject::NoSpaceCost(int pt_idx) { |
| 404 | // If failed to compute costs, return a 1.0 prob |
| 405 | if (!space_cost_ && !ComputeSpaceCosts()) |
| 406 | return CubeUtils::Prob2Cost(0.0); |
| 407 | return no_space_cost_[pt_idx]; |
| 408 | } |
| 409 | |
| 410 | // Returns the cost of not having any spaces within the specified range |
| 411 | // of segmentation points |