Returns the cost of having a space before the specified segmentation point
| 391 | |
| 392 | // Returns the cost of having a space before the specified segmentation point |
| 393 | int CubeSearchObject::SpaceCost(int pt_idx) { |
| 394 | if (!space_cost_ && !ComputeSpaceCosts()) { |
| 395 | // Failed to compute costs return a zero prob |
| 396 | return CubeUtils::Prob2Cost(0.0); |
| 397 | } |
| 398 | return space_cost_[pt_idx]; |
| 399 | } |
| 400 | |
| 401 | // Returns the cost of not having a space before the specified |
| 402 | // segmentation point |