Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71220 - in trunk/libs/geometry/example: . with_external_libs
From: barend.gehrels_at_[hidden]
Date: 2011-04-12 18:11:34


Author: barendgehrels
Date: 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
New Revision: 71220
URL: http://svn.boost.org/trac/boost/changeset/71220

Log:
Updated examples (assign -> assign_values)
Text files modified:
   trunk/libs/geometry/example/01_point_example.cpp | 24 ++++++++++++------------
   trunk/libs/geometry/example/02_linestring_example.cpp | 4 ++--
   trunk/libs/geometry/example/03_polygon_example.cpp | 4 ++--
   trunk/libs/geometry/example/05_a_overlay_polygon_example.cpp | 4 ++--
   trunk/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp | 4 ++--
   trunk/libs/geometry/example/06_a_transformation_example.cpp | 2 +-
   trunk/libs/geometry/example/c01_custom_point_example.cpp | 12 ++++++------
   trunk/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp | 2 +-
   8 files changed, 28 insertions(+), 28 deletions(-)

Modified: trunk/libs/geometry/example/01_point_example.cpp
==============================================================================
--- trunk/libs/geometry/example/01_point_example.cpp (original)
+++ trunk/libs/geometry/example/01_point_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -53,13 +53,13 @@
 
     // All these types are handled the same way. We show here
     // assigning them and calculating distances.
- assign(pt1, 1, 1);
- assign(pt2, 2, 2);
- assign(pt3, 3, 3);
- assign(pt4, 4, 4);
- assign(pt5, 5, 5);
- assign(pt6, 6, 6);
- assign(pt7, 7, 7);
+ assign_values(pt1, 1, 1);
+ assign_values(pt2, 2, 2);
+ assign_values(pt3, 3, 3);
+ assign_values(pt4, 4, 4);
+ assign_values(pt5, 5, 5);
+ assign_values(pt6, 6, 6);
+ assign_values(pt7, 7, 7);
 
 
     double d1 = distance(pt1, pt2);
@@ -76,13 +76,13 @@
     // 1: default, empty constructor, causing no initialization at all
     model::d2::point_xy<double> p1;
 
- // 2: as shown above, assign
+ // 2: as shown above, assign_values
     model::d2::point_xy<double> p2;
- assign(p2, 1, 1);
+ assign_values(p2, 1, 1);
 
     // 3: using "set" function
     // set uses the concepts behind, such that it can be applied for
- // every point-type (like assign)
+ // every point-type (like assign_values)
     model::d2::point_xy<double> p3;
     set<0>(p3, 1);
     set<1>(p3, 1);
@@ -118,8 +118,8 @@
 
     // There are 3-dimensional points too
     model::point<double, 3, cs::cartesian> d3a, d3b;
- assign(d3a, 1, 2, 3);
- assign(d3b, 4, 5, 6);
+ assign_values(d3a, 1, 2, 3);
+ assign_values(d3b, 4, 5, 6);
     d3 = distance(d3a, d3b);
 
 

Modified: trunk/libs/geometry/example/02_linestring_example.cpp
==============================================================================
--- trunk/libs/geometry/example/02_linestring_example.cpp (original)
+++ trunk/libs/geometry/example/02_linestring_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -79,9 +79,9 @@
     // points can be created using "make" and added to a linestring using the std:: "push_back"
     ls.push_back(make<point_2d>(1.1, 1.1));
 
- // points can also be assigned using "assign" and added to a linestring using "append"
+ // points can also be assigned using "assign_values" and added to a linestring using "append"
     point_2d lp;
- assign(lp, 2.5, 2.1);
+ assign_values(lp, 2.5, 2.1);
     append(ls, lp);
 
     // Lines can be streamed using DSV (delimiter separated values)

Modified: trunk/libs/geometry/example/03_polygon_example.cpp
==============================================================================
--- trunk/libs/geometry/example/03_polygon_example.cpp (original)
+++ trunk/libs/geometry/example/03_polygon_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -41,7 +41,7 @@
             {3.4, 2.0}, {4.1, 3.0}, {5.3, 2.6}, {5.4, 1.2}, {4.9, 0.8}, {2.9, 0.7},
             {2.0, 1.3} // closing point is opening point
             };
- assign(poly, coor);
+ assign_points(poly, coor);
     }
 
     // Polygons should be closed, and directed clockwise. If you're not sure if that is the case,
@@ -77,7 +77,7 @@
         model::ring<point_2d>& inner = poly.inners().back();
 
         const double coor[][2] = { {4.0, 2.0}, {4.2, 1.4}, {4.8, 1.9}, {4.4, 2.2}, {4.0, 2.0} };
- assign(inner, coor);
+ assign_points(inner, coor);
     }
 
     correct(poly);

Modified: trunk/libs/geometry/example/05_a_overlay_polygon_example.cpp
==============================================================================
--- trunk/libs/geometry/example/05_a_overlay_polygon_example.cpp (original)
+++ trunk/libs/geometry/example/05_a_overlay_polygon_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -45,7 +45,7 @@
         const double c[][2] = {
             {160, 330}, {60, 260}, {20, 150}, {60, 40}, {190, 20}, {270, 130}, {260, 250}, {160, 330}
         };
- bg::assign(a, c);
+ bg::assign_points(a, c);
     }
     bg::correct(a);
     std::cout << "A: " << bg::dsv(a) << std::endl;
@@ -55,7 +55,7 @@
         const double c[][2] = {
             {300, 330}, {190, 270}, {150, 170}, {150, 110}, {250, 30}, {380, 50}, {380, 250}, {300, 330}
         };
- bg::assign(b, c);
+ bg::assign_points(b, c);
     }
     bg::correct(b);
     std::cout << "B: " << bg::dsv(b) << std::endl;

Modified: trunk/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp
==============================================================================
--- trunk/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp (original)
+++ trunk/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -35,13 +35,13 @@
     bg::model::linestring<point_2d> ls;
     {
         const double c[][2] = { {0, 1}, {2, 5}, {5, 3} };
- bg::assign(ls, c);
+ bg::assign_points(ls, c);
     }
 
     bg::model::polygon<point_2d> p;
     {
         const double c[][2] = { {3, 0}, {0, 3}, {4, 5}, {3, 0} };
- bg::assign(p, c);
+ bg::assign_points(p, c);
     }
     bg::correct(p);
 

Modified: trunk/libs/geometry/example/06_a_transformation_example.cpp
==============================================================================
--- trunk/libs/geometry/example/06_a_transformation_example.cpp (original)
+++ trunk/libs/geometry/example/06_a_transformation_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -35,7 +35,7 @@
     const double coor[][2] = { {0, 0}, {0, 7}, {2, 2}, {2, 0}, {0, 0} };
     // note that for this syntax you have to include the two
     // include files above (c_array_cartesian.hpp, std_as_linestring.hpp)
- assign(poly, coor);
+ assign_points(poly, coor);
     //read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
     transform(poly, poly2, translate);
 

Modified: trunk/libs/geometry/example/c01_custom_point_example.cpp
==============================================================================
--- trunk/libs/geometry/example/c01_custom_point_example.cpp (original)
+++ trunk/libs/geometry/example/c01_custom_point_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -108,8 +108,8 @@
 
     my_array_point a1 = {{0}};
     my_array_point a2 = {{0}};
- boost::geometry::assign(a1, 1, 2, 3);
- boost::geometry::assign(a2, 3, 2, 1);
+ boost::geometry::assign_values(a1, 1, 2, 3);
+ boost::geometry::assign_values(a2, 3, 2, 1);
 
     std::cout << "color distance "
         << boost::geometry::dsv(a1) << " to "
@@ -132,8 +132,8 @@
 
     my_class_rw crw1;
     my_class_rw crw2;
- boost::geometry::assign(crw1, 1, 2);
- boost::geometry::assign(crw2, 3, 4);
+ boost::geometry::assign_values(crw1, 1, 2);
+ boost::geometry::assign_values(crw2, 3, 4);
     std::cout << "class r/w distance "
         << boost::geometry::dsv(crw1) << " to "
         << boost::geometry::dsv(crw2) << " is "
@@ -141,8 +141,8 @@
 
     my_class_gs cgs1;
     my_class_gs cgs2;
- boost::geometry::assign(cgs1, 1, 2);
- boost::geometry::assign(cgs2, 3, 4);
+ boost::geometry::assign_values(cgs1, 1, 2);
+ boost::geometry::assign_values(cgs2, 3, 4);
     std::cout << "class g/s distance "
         << boost::geometry::dsv(crw1) << " to "
         << boost::geometry::dsv(crw2) << " is "

Modified: trunk/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp
==============================================================================
--- trunk/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp (original)
+++ trunk/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp 2011-04-12 18:11:32 EDT (Tue, 12 Apr 2011)
@@ -73,7 +73,7 @@
     for (int v = 0; v < psShape->nVertices; v++)
     {
         typename point_type<T>::type point;
- assign(point, x[v], y[v]);
+ assign_values(point, x[v], y[v]);
         append(polygon, point);
     }
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk