Overview | Modules | Class Hierarchy | Classes | Members

Public Member Functions | Friends
tlp::EdgeProperty< TYPE > Class Template Reference

That class enables to define a property/attribute on edges on a VectorGraph. More...

`#include <vectorgraphproperty.h>`

Inheritance diagram for tlp::EdgeProperty< TYPE >:
[legend]
Collaboration diagram for tlp::EdgeProperty< TYPE >:
[legend]

List of all members.

## Public Member Functions

- EdgeProperty ()
- EdgeProperty (const EdgeProperty &obj)
- bool isValid () const

## Friends

- class VectorGraph

## Detailed Description

### template<typename TYPE>
class tlp::EdgeProperty< TYPE >

That class enables to define a property/attribute on edges on a VectorGraph.

Using EdgeProperty you can assign any kind of attribute to edges. To use that class you must first create an instance of EdgeProperty and then connect it to your graph. NodeProperty can be copied in another EdgeProperty, however the to NodeProperty will share the same content. You can consider that EdgeProperty is just a pointer on a stl:vector. to free memory used by a EdgeProperty connected to a graph you must use the free function.

Warning:
  After the call to free all The copy of the orignal EdgeProperty are no more valid

Using EdgeProperty you can store and access to values with the same efficiency as if you created manually a vector. EdgeProperty manage for you the resize, etc... when the graph is modified.

Furthemrore, in DEBUG mode, operator[] check if one try to access outside of the Array Bound. in DEBUG mode, the validy of the Property is also checked (if it has been free/alloc etc...)

     VectorGraph g;
     EdgeProperty<double> weight;
     g.alloc(weight); //connect weight to g, g allocate memory for that attribute
     edge e;
     forEach(e, g.getEdges()) {
       weight[n] = g.deg(g.target(e)) + g.deg(g.source(e));
     }
     EdgeProperty<double> weight2 = weight; //weight2 and weight are pointing on the same memory addres
     weight2[g[0]] = 3;
     cout << weight[g[0]]; //output 3
     g.free(weight2); //free the memory, weight and weight2 are no more valid.

See also:
  VectorGraph alloc(EdgeProperty)
  VectorGraph free(EdgeProperty)
  VectorGraph

## Constructor & Destructor Documentation

template<typename TYPE>

tlp::EdgeProperty< TYPE >::EdgeProperty | ( |  | ) | `[inline]`

template<typename TYPE>

tlp::EdgeProperty< TYPE >::EdgeProperty | ( | const EdgeProperty< TYPE > & | obj | ) | `[inline]`

## Member Function Documentation

template<typename TYPE >

bool tlp::EdgeProperty< TYPE >::isValid | ( |  | ) | const`[virtual]`

Implements tlp::VectorGraphProperty< TYPE >.

## Friends And Related Function Documentation

template<typename TYPE>

friend class VectorGraph`[friend]`

Reimplemented from tlp::VectorGraphProperty< TYPE >.

Tulip Software by LaBRI Visualization Team 2001 - 2012