Public Member Functions | Protected Attributes | Private Types

mln::util::adjacency_matrix< V > Class Template Reference
[Utilities]

A class of adjacency matrix. More...

#include <adjacency_matrix.hh>

Inheritance diagram for mln::util::adjacency_matrix< V >:
Inheritance graph

List of all members.

Public Member Functions

void add (const V &e1, const V &e2)
 Make e1 and e2 adjacent.
 adjacency_matrix ()
 Constructors.
 adjacency_matrix (const V &nelements)
 Construct an adjacency matrix with nelements elements maximum.
bool are_adjacent (const V &e1, const V &e2) const
 Check whether e1 and e2 are adjacent.
void clear ()
 Clear all adjacencies.
const adj_thook_data_ () const
 @}
std::ostream & print_data_ (std::ostream &ostr) const
 Print data to std::out.
void remove (const V &e1, const V &e2)
 Remove adjacency between e1 and e2.

Protected Attributes

adj_t adj_

Private Types

typedef impl_t::adj_t adj_t
 Data structure used to store adjacency information.
typedef
internal::adjacency_matrix_impl_selector
< V, typename
mln::metal::equal< typename
mln::trait::value_< V >::quant,
trait::value::quant::low >
::eval > 
impl_t

Detailed Description

template<typename V = def::coord>
class mln::util::adjacency_matrix< V >

A class of adjacency matrix.

Support low and high quantification value types. In case of low quantification value type, it uses an image2d to store adjacency information. In case of high quantification value type, it uses a util::set to store the adjacency information.

Definition at line 136 of file adjacency_matrix.hh.


Member Typedef Documentation

template<typename V = def::coord>
typedef impl_t::adj_t mln::util::adjacency_matrix< V >::adj_t [private]
template<typename V = def::coord>
typedef internal::adjacency_matrix_impl_selector<V, typename mln::metal::equal< typename mln::trait::value_< V >::quant , trait::value::quant::low >::eval> mln::util::adjacency_matrix< V >::impl_t [private]

Definition at line 141 of file adjacency_matrix.hh.


Constructor & Destructor Documentation

template<typename V >
mln::util::adjacency_matrix< V >::adjacency_matrix (  ) 

Constructors.

@{

Default

Definition at line 308 of file adjacency_matrix.hh.

template<typename V >
mln::util::adjacency_matrix< V >::adjacency_matrix ( const V &  nelements  ) 

Construct an adjacency matrix with nelements elements maximum.

Definition at line 315 of file adjacency_matrix.hh.


Member Function Documentation

void mln::util::internal::adjacency_matrix_impl_selector< V, mln::metal::equal< mln::trait::value_< V >::quant, trait::value::quant::low >::eval >::add ( const V &  e1,
const V &  e2 
) [inherited]

Make e1 and e2 adjacent.

bool mln::util::internal::adjacency_matrix_impl_selector< V, mln::metal::equal< mln::trait::value_< V >::quant, trait::value::quant::low >::eval >::are_adjacent ( const V &  e1,
const V &  e2 
) const [inherited]

Check whether e1 and e2 are adjacent.

Clear all adjacencies.

template<typename V = def::coord>
const adj_t& mln::util::adjacency_matrix< V >::hook_data_ (  )  const

@}

Hook member used to retrieve the underlying data structure.

std::ostream& mln::util::internal::adjacency_matrix_impl_selector< V, mln::metal::equal< mln::trait::value_< V >::quant, trait::value::quant::low >::eval >::print_data_ ( std::ostream &  ostr  )  const [inherited]

Print data to std::out.

void mln::util::internal::adjacency_matrix_impl_selector< V, mln::metal::equal< mln::trait::value_< V >::quant, trait::value::quant::low >::eval >::remove ( const V &  e1,
const V &  e2 
) [inherited]

Remove adjacency between e1 and e2.


Member Data Documentation

Definition at line 83 of file adjacency_matrix.hh.