| 1 |
|
| MODULE = Geo::Geos PACKAGE = Geo::Geos::Algorithm::MinimumDiameter |
| 2 |
|
| PROTOTYPES: DISABLE |
| 3 |
|
| |
| 4 |
|
| MinimumDiameter* new(SV*, Geometry& g, SV* hint = NULL) { |
| 5 |
2 |
| if (!hint) { |
| 6 |
2 |
▶ | bool convex = SvTRUE(hint); |
Branch: 1 branch
| Branch | True | False | Total |
| bool convex = SvTRUE(hint); |
1 |
1 |
2 |
|
| 7 |
1 |
▶ | RETVAL = new MinimumDiameter(&g, convex); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new MinimumDiameter(&g, convex); |
1 |
0 |
1 |
|
| 8 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 9 |
|
| else RETVAL = new MinimumDiameter(&g); |
| 10 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 11 |
|
| |
| 12 |
|
| Sv getMinimumRectangle(Object obj) { |
| 13 |
|
| Geometry* r; |
| 14 |
3 |
▶ | if (obj.stash().name() == "Geo::Geos::Algorithm::MinimumDiameter") { |
Branch: 4 branches
| Branch | True | False | Total |
| if (obj.stash().name() == "Geo::Geos::Algorithm::MinimumDiameter") { |
3 |
0 |
3 |
| if (obj.stash().name() == "Geo::Geos::Algorithm::MinimumDiameter") { |
3 |
0 |
3 |
| if (obj.stash().name() == "Geo::Geos::Algorithm::MinimumDiameter") { |
3 |
0 |
3 |
| if (obj.stash().name() == "Geo::Geos::Algorithm::MinimumDiameter") { |
2 |
1 |
3 |
|
| 15 |
2 |
▶ | auto& self = xs::in<MinimumDiameter&>(obj); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& self = xs::in<MinimumDiameter&>(obj); |
2 |
0 |
2 |
|
| 16 |
2 |
▶ | r = self.getMinimumRectangle(); |
Branch: 1 branch
| Branch | True | False | Total |
| r = self.getMinimumRectangle(); |
2 |
0 |
2 |
|
| 17 |
|
| } |
| 18 |
|
| else { |
| 19 |
1 |
▶ | auto& g = xs::in<Geometry&>(obj); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& g = xs::in<Geometry&>(obj); |
1 |
0 |
1 |
|
| 20 |
1 |
▶ | r = MinimumDiameter::getMinimumRectangle(&g); |
Branch: 1 branch
| Branch | True | False | Total |
| r = MinimumDiameter::getMinimumRectangle(&g); |
1 |
0 |
1 |
|
| 21 |
|
| } |
| 22 |
3 |
▶ | RETVAL = Helper::uplift(r); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = Helper::uplift(r); |
3 |
0 |
3 |
|
| 23 |
|
| } |
| 24 |
|
| |
| 25 |
|
| Sv getMinimumDiameter(Geometry& g) { |
| 26 |
1 |
▶ | RETVAL = Helper::uplift(MinimumDiameter::getMinimumDiameter(&g)); |
Branch: 2 branches
| Branch | True | False | Total |
| RETVAL = Helper::uplift(MinimumDiameter::getMinimumDiameter(&g)); |
1 |
0 |
1 |
| RETVAL = Helper::uplift(MinimumDiameter::getMinimumDiameter(&g)); |
1 |
0 |
1 |
|
| 27 |
|
| } |
| 28 |
|
| |
| 29 |
1 |
▶ | double MinimumDiameter::getLength() |
Branch: 1 branch
| Branch | True | False | Total |
| double MinimumDiameter::getLength() |
0 |
1 |
1 |
|
| 30 |
|
| |
| 31 |
|
| Coordinate* MinimumDiameter::getWidthCoordinate() { |
| 32 |
1 |
| RETVAL = new Coordinate(* (THIS->getWidthCoordinate())); |
| 33 |
1 |
▶ | } |
Branch: 4 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 34 |
|
| |
| 35 |
|
| LineString* MinimumDiameter::getSupportingSegment () { |
| 36 |
1 |
| RETVAL = dyn_cast<LineString*>(THIS->getSupportingSegment()); |
| 37 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
|
| 38 |
|
| |
| 39 |
|
| LineString* MinimumDiameter::getDiameter () { |
| 40 |
2 |
| RETVAL = dyn_cast<LineString*>(THIS->getDiameter()); |
| 41 |
2 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
|
| 42 |
|
| |
| 43 |
|
| |
| 44 |
0 |
▶ | int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
Branch: 1 branch
| Branch | True | False | Total |
| int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
0 |
0 |
0 |
|
| 45 |
|
| |
| 46 |
|
| BOOT { |
| 47 |
46 |
▶ | xs::exp::autoexport(Stash(__PACKAGE__)); |
Branch: 2 branches
| Branch | True | False | Total |
| xs::exp::autoexport(Stash(__PACKAGE__)); |
46 |
0 |
46 |
| xs::exp::autoexport(Stash(__PACKAGE__)); |
46 |
0 |
46 |
|
| 48 |
|
| } |