|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive test suite for polygon.H - 2D polygon operations. More...
Go to the source code of this file.
Classes | |
| class | VertexTest |
| class | PolygonConstructionTest |
| class | PolygonExtremePointsTest |
| class | PolygonVertexAccessTest |
| class | PolygonSegmentAccessTest |
| class | PolygonVertexIteratorTest |
| class | PolygonSegmentIteratorTest |
| class | PolygonIntersectionTest |
| class | PolygonSelfIntersectionTest |
| class | PolygonColinearityTest |
| class | PolygonContainmentTest |
| class | PolygonRemoveVertexTest |
| class | PolygonFromTriangleTest |
| class | RegularPolygonConstructionTest |
| class | RegularPolygonVertexTest |
| class | RegularPolygonSegmentTest |
| class | RegularPolygonVertexIteratorTest |
| class | RegularPolygonSegmentIteratorTest |
| class | RegularPolygonExtremePointsTest |
| class | RegularPolygonRotationTest |
| class | PolygonFromRegularTest |
Functions | |
| bool | approx_equal (const Geom_Number &a, const Geom_Number &b, double tol=EPSILON) |
| bool | points_equal (const Point &a, const Point &b, double tol=EPSILON) |
| TEST_F (VertexTest, DefaultConstruction) | |
| TEST_F (VertexTest, ConstructFromPoint) | |
| TEST_F (VertexTest, CopyConstruction) | |
| TEST_F (VertexTest, CopyAssignment) | |
| TEST_F (VertexTest, SelfAssignment) | |
| TEST_F (VertexTest, ToPointReturnsCorrectPointValue) | |
| TEST_F (VertexTest, DlinkToVertexConversion) | |
| TEST_F (VertexTest, DlinkToVertexConstConversion) | |
| TEST_F (PolygonConstructionTest, DefaultConstruction) | |
| TEST_F (PolygonConstructionTest, AddSingleVertex) | |
| TEST_F (PolygonConstructionTest, AddMultipleVertices) | |
| TEST_F (PolygonConstructionTest, ClosePolygon) | |
| TEST_F (PolygonConstructionTest, CloseWithTooFewVerticesThrows) | |
| TEST_F (PolygonConstructionTest, CannotAddVertexToClosedPolygon) | |
| TEST_F (PolygonConstructionTest, CannotCloseAlreadyClosedPolygon) | |
| TEST_F (PolygonConstructionTest, CopyConstruction) | |
| TEST_F (PolygonConstructionTest, MoveConstruction) | |
| TEST_F (PolygonConstructionTest, CopyAssignment) | |
| TEST_F (PolygonConstructionTest, MoveAssignment) | |
| TEST_F (PolygonConstructionTest, SelfCopyAssignment) | |
| TEST_F (PolygonConstructionTest, AddVertexWithCoordinates) | |
| TEST_F (PolygonExtremePointsTest, ExtremePointsSingleVertex) | |
| TEST_F (PolygonExtremePointsTest, ExtremePointsMultipleVertices) | |
| TEST_F (PolygonExtremePointsTest, NegativeCoordinates) | |
| TEST_F (PolygonVertexAccessTest, GetFirstVertex) | |
| TEST_F (PolygonVertexAccessTest, GetLastVertex) | |
| TEST_F (PolygonVertexAccessTest, GetFirstVertexEmptyPolygonThrows) | |
| TEST_F (PolygonVertexAccessTest, GetLastVertexEmptyPolygonThrows) | |
| TEST_F (PolygonVertexAccessTest, VertexBelongsToPolygon) | |
| TEST_F (PolygonVertexAccessTest, VertexDoesNotBelongToPolygon) | |
| TEST_F (PolygonVertexAccessTest, GetNextVertex) | |
| TEST_F (PolygonVertexAccessTest, GetPrevVertex) | |
| TEST_F (PolygonSegmentAccessTest, GetFirstSegment) | |
| TEST_F (PolygonSegmentAccessTest, GetLastSegment) | |
| TEST_F (PolygonSegmentAccessTest, GetFirstSegmentSingleVertexThrows) | |
| TEST_F (PolygonSegmentAccessTest, GetFirstSegmentEmptyPolygonThrows) | |
| TEST_F (PolygonVertexIteratorTest, IterateAllVertices) | |
| TEST_F (PolygonVertexIteratorTest, GetCurrentVertex) | |
| TEST_F (PolygonVertexIteratorTest, EmptyPolygonThrows) | |
| TEST_F (PolygonSegmentIteratorTest, OpenPolygonIteratesNMinus1Segments) | |
| TEST_F (PolygonSegmentIteratorTest, ClosedPolygonIteratesNSegments) | |
| TEST_F (PolygonSegmentIteratorTest, GetCurrentSegment) | |
| TEST_F (PolygonSegmentIteratorTest, EmptyPolygonThrows) | |
| TEST_F (PolygonSegmentIteratorTest, SingleVertexPolygonThrows) | |
| TEST_F (PolygonIntersectionTest, SegmentIntersectsPolygon) | |
| TEST_F (PolygonIntersectionTest, SegmentDoesNotIntersectPolygon) | |
| TEST_F (PolygonIntersectionTest, SegmentInsidePolygon) | |
| TEST_F (PolygonSelfIntersectionTest, ValidPolygonConstruction) | |
| TEST_F (PolygonSelfIntersectionTest, SelfIntersectingVertexThrows) | |
| TEST_F (PolygonSelfIntersectionTest, SelfIntersectingAddVertexThrows) | |
| TEST_F (PolygonColinearityTest, ColinearPointExtendsEdge) | |
| TEST_F (PolygonColinearityTest, PointInsideLastSegmentThrows) | |
| TEST_F (PolygonContainmentTest, PointInsidePolygon) | |
| TEST_F (PolygonContainmentTest, PointOutsidePolygon) | |
| TEST_F (PolygonContainmentTest, PointNearEdge) | |
| TEST_F (PolygonContainmentTest, OpenPolygonContainmentThrows) | |
| TEST_F (PolygonRemoveVertexTest, RemoveExistingVertex) | |
| TEST_F (PolygonRemoveVertexTest, RemoveNonExistingVertexThrows) | |
| TEST_F (PolygonFromTriangleTest, ConstructFromTriangle) | |
| TEST_F (PolygonFromTriangleTest, CorrectVerticesFromTriangle) | |
| TEST_F (RegularPolygonConstructionTest, DefaultConstruction) | |
| TEST_F (RegularPolygonConstructionTest, ConstructTriangle) | |
| TEST_F (RegularPolygonConstructionTest, ConstructSquare) | |
| TEST_F (RegularPolygonConstructionTest, ConstructHexagon) | |
| TEST_F (RegularPolygonConstructionTest, LessThanThreeSidesThrows) | |
| TEST_F (RegularPolygonConstructionTest, InvalidSideLengthAndAngleThrow) | |
| TEST_F (RegularPolygonConstructionTest, RadiusCalculation) | |
| TEST_F (RegularPolygonVertexTest, GetVertexInRange) | |
| TEST_F (RegularPolygonVertexTest, GetVertexOutOfRangeThrows) | |
| TEST_F (RegularPolygonVertexTest, GetFirstVertex) | |
| TEST_F (RegularPolygonVertexTest, GetLastVertex) | |
| TEST_F (RegularPolygonVertexTest, VerticesAreEquidistantFromCenter) | |
| TEST_F (RegularPolygonSegmentTest, GetFirstSegment) | |
| TEST_F (RegularPolygonSegmentTest, GetLastSegment) | |
| TEST_F (RegularPolygonSegmentTest, AllSidesEqualLength) | |
| TEST_F (RegularPolygonVertexIteratorTest, IterateAllVertices) | |
| TEST_F (RegularPolygonVertexIteratorTest, GetCurrentVertex) | |
| TEST_F (RegularPolygonVertexIteratorTest, NextWithoutCurrent) | |
| TEST_F (RegularPolygonVertexIteratorTest, GetCurrentVertexWithoutCurrent) | |
| TEST_F (RegularPolygonSegmentIteratorTest, IterateAllSegments) | |
| TEST_F (RegularPolygonSegmentIteratorTest, GetCurrentSegment) | |
| TEST_F (RegularPolygonSegmentIteratorTest, NextWithoutCurrent) | |
| TEST_F (RegularPolygonSegmentIteratorTest, GetCurrentSegmentWithoutCurrent) | |
| TEST_F (RegularPolygonExtremePointsTest, LowestPoint) | |
| TEST_F (RegularPolygonExtremePointsTest, HighestPoint) | |
| TEST_F (RegularPolygonExtremePointsTest, LeftmostPoint) | |
| TEST_F (RegularPolygonExtremePointsTest, RightmostPoint) | |
| TEST_F (RegularPolygonRotationTest, NoRotation) | |
| TEST_F (RegularPolygonRotationTest, RotationChangesVertexPositions) | |
| TEST_F (RegularPolygonRotationTest, AllVerticesAtSameRadiusAfterRotation) | |
| TEST_F (PolygonFromRegularTest, ConstructFromRegularPolygon) | |
| TEST_F (PolygonFromRegularTest, AssignFromRegularPolygon) | |
| TEST_F (PolygonFromRegularTest, VerticesMatch) | |
| TEST (PolygonTypeTraits, MoveConstructorIsNoexcept) | |
| TEST (PolygonTypeTraits, MoveAssignmentIsNoexcept) | |
| TEST (PolygonEdgeCases, PolygonWithManyVertices) | |
| TEST (PolygonEdgeCases, RegularPolygonWithManyVertices) | |
| TEST (PolygonEdgeCases, VerySmallPolygon) | |
| TEST (PolygonEdgeCases, NegativeCoordinatesPolygon) | |
| TEST (PolygonConvenienceMethods, AreaOfUnitSquare) | |
| TEST (PolygonConvenienceMethods, AreaOfClockwiseSquare) | |
| TEST (PolygonConvenienceMethods, AreaOfTriangle) | |
| TEST (PolygonConvenienceMethods, PerimeterOfUnitSquare) | |
| TEST (PolygonConvenienceMethods, PerimeterOf345Triangle) | |
| TEST (PolygonConvenienceMethods, CentroidOfUnitSquare) | |
| TEST (PolygonConvenienceMethods, CentroidOfTriangle) | |
| TEST (PolygonConvenienceMethods, IsConvexSquare) | |
| TEST (PolygonConvenienceMethods, IsConvexTriangle) | |
| TEST (PolygonConvenienceMethods, NonConvexLShape) | |
| TEST (PolygonConvenienceMethods, AreaThrowsForTooFewVertices) | |
| TEST (PolygonConvenienceMethods, PerimeterThrowsForSingleVertex) | |
| TEST (PolygonConvenienceMethods, CentroidThrowsForTooFewVertices) | |
| TEST (PolygonConvenienceMethods, IsConvexThrowsForTooFewVertices) | |
| int | main (int argc, char **argv) |
Variables | |
| constexpr double | EPSILON = 1e-6 |
Comprehensive test suite for polygon.H - 2D polygon operations.
Tests cover:
Definition in file polygon_test.cc.
| bool approx_equal | ( | const Geom_Number & | a, |
| const Geom_Number & | b, | ||
| double | tol = EPSILON |
||
| ) |
Definition at line 58 of file polygon_test.cc.
References __gmp_expr< mpq_t, mpq_t >::get_d().
Referenced by points_equal(), and TEST_F().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1487 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
Definition at line 65 of file polygon_test.cc.
References approx_equal(), Aleph::Point::get_x(), and Aleph::Point::get_y().
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaOfClockwiseSquare | |||
| ) |
Definition at line 1335 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::signed_area().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaOfTriangle | |||
| ) |
Definition at line 1348 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::close().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaOfUnitSquare | |||
| ) |
Definition at line 1322 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::signed_area().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaThrowsForTooFewVertices | |||
| ) |
Definition at line 1448 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), and Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | PolygonConvenienceMethods | , |
| CentroidOfTriangle | |||
| ) |
Definition at line 1397 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::centroid(), Aleph::Polygon::close(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST | ( | PolygonConvenienceMethods | , |
| CentroidOfUnitSquare | |||
| ) |
Definition at line 1383 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::centroid(), Aleph::Polygon::close(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST | ( | PolygonConvenienceMethods | , |
| CentroidThrowsForTooFewVertices | |||
| ) |
Definition at line 1465 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::centroid().
| TEST | ( | PolygonConvenienceMethods | , |
| IsConvexSquare | |||
| ) |
Definition at line 1410 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::is_convex().
| TEST | ( | PolygonConvenienceMethods | , |
| IsConvexThrowsForTooFewVertices | |||
| ) |
Definition at line 1474 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::is_convex().
| TEST | ( | PolygonConvenienceMethods | , |
| IsConvexTriangle | |||
| ) |
Definition at line 1422 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::is_convex().
| TEST | ( | PolygonConvenienceMethods | , |
| NonConvexLShape | |||
| ) |
Definition at line 1433 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | PolygonConvenienceMethods | , |
| PerimeterOf345Triangle | |||
| ) |
Definition at line 1371 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::perimeter().
| TEST | ( | PolygonConvenienceMethods | , |
| PerimeterOfUnitSquare | |||
| ) |
Definition at line 1359 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::perimeter().
| TEST | ( | PolygonConvenienceMethods | , |
| PerimeterThrowsForSingleVertex | |||
| ) |
Definition at line 1457 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | PolygonEdgeCases | , |
| NegativeCoordinatesPolygon | |||
| ) |
Definition at line 1305 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and Aleph::Polygon::contains().
| TEST | ( | PolygonEdgeCases | , |
| PolygonWithManyVertices | |||
| ) |
Definition at line 1252 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), Aleph::Polygon::contains(), cos(), Aleph::Polygon::is_closed(), N, Aleph::PI, sin(), Aleph::Polygon::size(), and y.
| TEST | ( | PolygonEdgeCases | , |
| RegularPolygonWithManyVertices | |||
| ) |
Definition at line 1275 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), __gmp_expr< mpq_t, mpq_t >::get_d(), Aleph::Regular_Polygon::get_vertex(), Aleph::Point::get_x(), Aleph::Point::get_y(), r, Aleph::Regular_Polygon::radius(), and Aleph::Regular_Polygon::size().
| TEST | ( | PolygonEdgeCases | , |
| VerySmallPolygon | |||
| ) |
Definition at line 1293 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST | ( | PolygonTypeTraits | , |
| MoveAssignmentIsNoexcept | |||
| ) |
Definition at line 1243 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | PolygonTypeTraits | , |
| MoveConstructorIsNoexcept | |||
| ) |
Definition at line 1238 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonColinearityTest | , |
| ColinearPointExtendsEdge | |||
| ) |
Definition at line 676 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonColinearityTest | , |
| PointInsideLastSegmentThrows | |||
| ) |
Definition at line 687 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonConstructionTest | , |
| AddMultipleVertices | |||
| ) |
Definition at line 204 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| AddSingleVertex | |||
| ) |
Definition at line 195 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| AddVertexWithCoordinates | |||
| ) |
Definition at line 306 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::get_first_vertex(), Aleph::Point::get_x(), Aleph::Point::get_y(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| CannotAddVertexToClosedPolygon | |||
| ) |
Definition at line 238 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and create_triangle().
| TEST_F | ( | PolygonConstructionTest | , |
| CannotCloseAlreadyClosedPolygon | |||
| ) |
Definition at line 245 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::close(), and create_triangle().
| TEST_F | ( | PolygonConstructionTest | , |
| ClosePolygon | |||
| ) |
Definition at line 215 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_triangle(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| CloseWithTooFewVerticesThrows | |||
| ) |
Definition at line 223 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::close().
| TEST_F | ( | PolygonConstructionTest | , |
| CopyAssignment | |||
| ) |
Definition at line 274 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_triangle().
| TEST_F | ( | PolygonConstructionTest | , |
| CopyConstruction | |||
| ) |
Definition at line 252 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::copy(), and points_equal().
| TEST_F | ( | PolygonConstructionTest | , |
| DefaultConstruction | |||
| ) |
Definition at line 188 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| MoveAssignment | |||
| ) |
Definition at line 285 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonConstructionTest | , |
| MoveConstruction | |||
| ) |
Definition at line 262 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonConstructionTest | , |
| SelfCopyAssignment | |||
| ) |
Definition at line 297 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonContainmentTest | , |
| OpenPolygonContainmentThrows | |||
| ) |
Definition at line 735 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::contains().
| TEST_F | ( | PolygonContainmentTest | , |
| PointInsidePolygon | |||
| ) |
Definition at line 717 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonContainmentTest | , |
| PointNearEdge | |||
| ) |
Definition at line 729 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonContainmentTest | , |
| PointOutsidePolygon | |||
| ) |
Definition at line 723 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonExtremePointsTest | , |
| ExtremePointsMultipleVertices | |||
| ) |
Definition at line 334 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::Polygon::highest_point(), Aleph::Polygon::leftmost_point(), Aleph::Polygon::lowest_point(), and Aleph::Polygon::rightmost_point().
| TEST_F | ( | PolygonExtremePointsTest | , |
| ExtremePointsSingleVertex | |||
| ) |
Definition at line 322 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::Polygon::highest_point(), Aleph::Polygon::leftmost_point(), Aleph::Polygon::lowest_point(), and Aleph::Polygon::rightmost_point().
| TEST_F | ( | PolygonExtremePointsTest | , |
| NegativeCoordinates | |||
| ) |
Definition at line 348 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::Polygon::highest_point(), Aleph::Polygon::leftmost_point(), Aleph::Polygon::lowest_point(), and Aleph::Polygon::rightmost_point().
| TEST_F | ( | PolygonFromRegularTest | , |
| AssignFromRegularPolygon | |||
| ) |
Definition at line 1205 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonFromRegularTest | , |
| ConstructFromRegularPolygon | |||
| ) |
Definition at line 1196 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonFromRegularTest | , |
| VerticesMatch | |||
| ) |
Definition at line 1216 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Regular_Polygon::get_vertex(), Aleph::Dlink::Iterator::has_curr(), points_equal(), Aleph::Polygon::size(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | PolygonFromTriangleTest | , |
| ConstructFromTriangle | |||
| ) |
Definition at line 783 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonFromTriangleTest | , |
| CorrectVerticesFromTriangle | |||
| ) |
Definition at line 792 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::contains(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonIntersectionTest | , |
| SegmentDoesNotIntersectPolygon | |||
| ) |
Definition at line 612 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonIntersectionTest | , |
| SegmentInsidePolygon | |||
| ) |
Definition at line 618 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonIntersectionTest | , |
| SegmentIntersectsPolygon | |||
| ) |
Definition at line 606 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonRemoveVertexTest | , |
| RemoveExistingVertex | |||
| ) |
Definition at line 763 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonRemoveVertexTest | , |
| RemoveNonExistingVertexThrows | |||
| ) |
Definition at line 771 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetFirstSegment | |||
| ) |
Definition at line 453 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetFirstSegmentEmptyPolygonThrows | |||
| ) |
Definition at line 477 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::get_first_segment().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetFirstSegmentSingleVertexThrows | |||
| ) |
Definition at line 469 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetLastSegment | |||
| ) |
Definition at line 461 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| ClosedPolygonIteratesNSegments | |||
| ) |
Definition at line 553 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::Polygon::Segment_Iterator::has_curr().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| EmptyPolygonThrows | |||
| ) |
Definition at line 573 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| GetCurrentSegment | |||
| ) |
Definition at line 564 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::Segment_Iterator::get_current_segment(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| OpenPolygonIteratesNMinus1Segments | |||
| ) |
Definition at line 543 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::Polygon::Segment_Iterator::has_curr().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| SingleVertexPolygonThrows | |||
| ) |
Definition at line 579 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonSelfIntersectionTest | , |
| SelfIntersectingAddVertexThrows | |||
| ) |
Definition at line 654 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonSelfIntersectionTest | , |
| SelfIntersectingVertexThrows | |||
| ) |
Definition at line 642 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonSelfIntersectionTest | , |
| ValidPolygonConstruction | |||
| ) |
Definition at line 630 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::close().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetFirstVertex | |||
| ) |
Definition at line 380 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetFirstVertexEmptyPolygonThrows | |||
| ) |
Definition at line 394 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::get_first_vertex().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetLastVertex | |||
| ) |
Definition at line 387 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetLastVertexEmptyPolygonThrows | |||
| ) |
Definition at line 400 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Polygon::get_last_vertex().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetNextVertex | |||
| ) |
Definition at line 418 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::next().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetPrevVertex | |||
| ) |
Definition at line 427 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexAccessTest | , |
| VertexBelongsToPolygon | |||
| ) |
Definition at line 406 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonVertexAccessTest | , |
| VertexDoesNotBelongToPolygon | |||
| ) |
Definition at line 412 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonVertexIteratorTest | , |
| EmptyPolygonThrows | |||
| ) |
Definition at line 519 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | PolygonVertexIteratorTest | , |
| GetCurrentVertex | |||
| ) |
Definition at line 510 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Polygon::Vertex_Iterator::get_current_vertex(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexIteratorTest | , |
| IterateAllVertices | |||
| ) |
Definition at line 501 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::Dlink::Iterator::has_curr().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| ConstructHexagon | |||
| ) |
Definition at line 839 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Regular_Polygon::get_center(), points_equal(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| ConstructSquare | |||
| ) |
Definition at line 831 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), EPSILON, Aleph::Regular_Polygon::get_side_size(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| ConstructTriangle | |||
| ) |
Definition at line 822 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), EPSILON, Aleph::Regular_Polygon::get_side_size(), Aleph::Regular_Polygon::is_closed(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| DefaultConstruction | |||
| ) |
| TEST_F | ( | RegularPolygonConstructionTest | , |
| InvalidSideLengthAndAngleThrow | |||
| ) |
Definition at line 854 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| LessThanThreeSidesThrows | |||
| ) |
Definition at line 847 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| RadiusCalculation | |||
| ) |
Definition at line 869 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), EPSILON, and Aleph::Regular_Polygon::radius().
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| HighestPoint | |||
| ) |
Definition at line 1118 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::highest_point(), points_equal(), and r.
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| LeftmostPoint | |||
| ) |
Definition at line 1127 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::leftmost_point(), points_equal(), and r.
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| LowestPoint | |||
| ) |
Definition at line 1109 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::lowest_point(), points_equal(), and r.
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| RightmostPoint | |||
| ) |
Definition at line 1136 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), points_equal(), r, and Aleph::Point::rightmost_point().
| TEST_F | ( | RegularPolygonRotationTest | , |
| AllVerticesAtSameRadiusAfterRotation | |||
| ) |
Definition at line 1174 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), __gmp_expr< mpq_t, mpq_t >::get_d(), Aleph::Regular_Polygon::get_vertex(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::PI, r, Aleph::Regular_Polygon::radius(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonRotationTest | , |
| NoRotation | |||
| ) |
Definition at line 1151 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Regular_Polygon::get_vertex().
| TEST_F | ( | RegularPolygonRotationTest | , |
| RotationChangesVertexPositions | |||
| ) |
Definition at line 1161 of file polygon_test.cc.
References approx_equal(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::PI.
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| GetCurrentSegment | |||
| ) |
Definition at line 1062 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Regular_Polygon::Segment_Iterator::get_current_segment(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| GetCurrentSegmentWithoutCurrent | |||
| ) |
Definition at line 1084 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Regular_Polygon::Segment_Iterator::get_current_segment(), and Aleph::Regular_Polygon::Segment_Iterator::next_ne().
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| IterateAllSegments | |||
| ) |
Definition at line 1053 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::Regular_Polygon::Segment_Iterator::has_curr().
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| NextWithoutCurrent | |||
| ) |
| TEST_F | ( | RegularPolygonSegmentTest | , |
| AllSidesEqualLength | |||
| ) |
Definition at line 972 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), __gmp_expr< mpq_t, mpq_t >::get_d(), and Aleph::Segment::length().
| TEST_F | ( | RegularPolygonSegmentTest | , |
| GetFirstSegment | |||
| ) |
Definition at line 952 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | RegularPolygonSegmentTest | , |
| GetLastSegment | |||
| ) |
Definition at line 962 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| GetCurrentVertex | |||
| ) |
Definition at line 1010 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Regular_Polygon::Vertex_Iterator::get_current_vertex(), and points_equal().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| GetCurrentVertexWithoutCurrent | |||
| ) |
Definition at line 1029 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Regular_Polygon::Vertex_Iterator::get_current_vertex(), and Aleph::Regular_Polygon::Vertex_Iterator::next_ne().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| IterateAllVertices | |||
| ) |
Definition at line 1001 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::Regular_Polygon::Vertex_Iterator::has_curr().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| NextWithoutCurrent | |||
| ) |
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetFirstVertex | |||
| ) |
Definition at line 904 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and points_equal().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetLastVertex | |||
| ) |
Definition at line 912 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and points_equal().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetVertexInRange | |||
| ) |
Definition at line 892 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetVertexOutOfRangeThrows | |||
| ) |
Definition at line 898 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST_F | ( | RegularPolygonVertexTest | , |
| VerticesAreEquidistantFromCenter | |||
| ) |
Definition at line 920 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), EPSILON, __gmp_expr< mpq_t, mpq_t >::get_d(), Aleph::Point::get_x(), Aleph::Point::get_y(), and r.
| TEST_F | ( | VertexTest | , |
| ConstructFromPoint | |||
| ) |
Definition at line 94 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| CopyAssignment | |||
| ) |
Definition at line 110 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| CopyConstruction | |||
| ) |
Definition at line 101 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| DefaultConstruction | |||
| ) |
Definition at line 87 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| DlinkToVertexConstConversion | |||
| ) |
Definition at line 149 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Vertex::dlink_to_vertex().
| TEST_F | ( | VertexTest | , |
| DlinkToVertexConversion | |||
| ) |
Definition at line 139 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Vertex::dlink_to_vertex().
| TEST_F | ( | VertexTest | , |
| SelfAssignment | |||
| ) |
Definition at line 121 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| ToPointReturnsCorrectPointValue | |||
| ) |
Definition at line 130 of file polygon_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Point::get_x(), Aleph::Point::get_y(), and Aleph::Vertex::to_point().