lemon/hypercube_graph.h
changeset 2001 c9e5de6e3eac
parent 1993 2115143eceea
child 2111 ea1fa1bc3f6d
equal deleted inserted replaced
10:b389c456a8ee 11:98aa4fc72977
    23 #include <vector>
    23 #include <vector>
    24 #include <lemon/bits/invalid.h>
    24 #include <lemon/bits/invalid.h>
    25 #include <lemon/bits/utility.h>
    25 #include <lemon/bits/utility.h>
    26 #include <lemon/error.h>
    26 #include <lemon/error.h>
    27 
    27 
       
    28 #include <lemon/bits/base_extender.h>
    28 #include <lemon/bits/graph_extender.h>
    29 #include <lemon/bits/graph_extender.h>
    29 
    30 
    30 ///\ingroup graphs
    31 ///\ingroup graphs
    31 ///\file
    32 ///\file
    32 ///\brief HyperCubeGraph class.
    33 ///\brief HyperCubeGraph class.
   316 	Value val = _first_value;
   317 	Value val = _first_value;
   317 	int id = _graph.index(k); 
   318 	int id = _graph.index(k); 
   318 	int n = 0;
   319 	int n = 0;
   319 	while (id != 0) {
   320 	while (id != 0) {
   320 	  if (id & 1) {
   321 	  if (id & 1) {
   321 	    val = _bin_func(_values[n], _first_value);
   322 	    val = _bin_func(val, _values[n]);
   322 	  }
   323 	  }
   323 	  id >>= 1;
   324 	  id >>= 1;
   324 	  ++n;
   325 	  ++n;
   325 	}
   326 	}
   326 	return val;
   327 	return val;