Boost logo

Boost :

From: Eric Fowler (efowler_at_[hidden])
Date: 2003-04-15 23:18:29


Sorry if this is obvious, I am just getting started with BGL.

I wish to make a simple geometric graph, in which vertices are comprised of
points in x, y space(x, y being unsigned integers), and edge weights are
unsigned integers equal to the distance-squared between the vertex points.

Simple, huh?

Here's where I am at:

#include "stdafx.h"
#include <boost\config.hpp>
#include <boost\graph\adjacency_list.hpp>
using namespace boost;

typedef std::pair<unsigned, unsigned> Point;
int main(int argc, char* argv[])
{
        typedef adjacency_list<listS, vecS, directedS> Graph;
        Graph g;
        Point p(1, 2); //just to show it all compiles
        return 0;
}

Now, how do I "tell" my Graph I am storing Point vertices with unsigned int
edges? Do I need to define properties? How?

Eric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk