|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53375 - sandbox/SOC/2009/function_graph/libs/function_graph/example
From: mlopez7_at_[hidden]
Date: 2009-05-28 22:31:28
Author: lopezeant
Date: 2009-05-28 22:31:28 EDT (Thu, 28 May 2009)
New Revision: 53375
URL: http://svn.boost.org/trac/boost/changeset/53375
Log:
updated and added test1.cpp
Added:
sandbox/SOC/2009/function_graph/libs/function_graph/example/test1.cpp (contents, props changed)
Added: sandbox/SOC/2009/function_graph/libs/function_graph/example/test1.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/function_graph/libs/function_graph/example/test1.cpp 2009-05-28 22:31:28 EDT (Thu, 28 May 2009)
@@ -0,0 +1,22 @@
+#include <iostream>
+#include <boost/function.hpp>
+#include <functional>
+#include <algorithm>
+#include <vector>
+#include "function_graph.hpp"
+
+struct int_less_than {
+ bool operator()(int a, int b) { return a < b; }
+};
+
+int main()
+{
+ boost::function2<bool,int,int> h = int_less_than();
+ boost::function2<bool,int,int> g = int_less_than();
+ boost::graph::function_graph<bool, int> implicitG1(h);
+ implicitG1.set_edge_function(g);
+ implicitG1.edge(1,2);
+
+
+ return 0;
+}
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