<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem mit Fibonacci Heap]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte die Fibonacci Heap implementierung von Dietmar Kuehl nutzen und habe folgendes Problem:</p>
<p>Header Datei:</p>
<pre><code class="language-cpp">// -*-C++-*- boost/f_heap.hpp
// &lt;!!----------------------------------------------------------------------&gt;
// &lt;!! Copyright (C) 1999 Dietmar Kuehl, Claas Solutions GmbH &gt;
// &lt;!!&gt;
// &lt;!! Permission to use, copy, modify, distribute and sell this &gt;
// &lt;!! software for any purpose is hereby granted without fee, provided &gt;
// &lt;!! that the above copyright notice appears in all copies and that &gt;
// &lt;!! both that copyright notice and this permission notice appear in &gt;
// &lt;!! supporting documentation. Dietmar Kuehl and Claas Solutions make no &gt;
// &lt;!! representations about the suitability of this software for any &gt;
// &lt;!! purpose. It is provided &quot;as is&quot; without express or implied warranty. &gt;
// &lt;!!----------------------------------------------------------------------&gt;

// Author: Dietmar Kuehl dietmar.kuehl@claas-solutions.de
// Title:  Declaration for Fibonacci Heaps
// Version: $Id: f_heap.hpp,v 1.1.1.1 1999/08/19 23:18:24 kuehl Exp $

// --------------------------------------------------------------------------
// This implementation is based on the description found in &quot;Network Flow&quot;,
// R.K.Ahuja, T.L.Magnanti, J.B.Orlin, Prentice Hall. The algorithmic stuff
// should be basically identical to this description, however, the actual
// representation is not.
// --------------------------------------------------------------------------

#ifndef FHEAP_H_
#define FHEAP_H_

#include &lt;functional&gt;
#include &lt;vector&gt;

namespace boost
{

// --------------------------------------------------------------------------
// The template class fibonacci_heap_base defines everything which does
// not depend on the compare type. Thus, the actual algorithmic stuff
// is in the template class fibonacci_heap. However, the definition of
// the nodes and the iterator type is in fibonacci_heap_base.

template &lt;typename T&gt; class fibonacci_heap_base {
protected:
  struct node;

public:
  typedef T                                      value_type;
  typedef T&amp;                                     reference;
  typedef T const&amp;                               const_reference;
  typedef typename std::vector&lt;node*&gt;::size_type size_type;
  typedef node*                                  pointer;
  class                                          iterator;
  typedef iterator                               const_iterator;

  friend class iterator;

protected:
  class node {
    friend class iterator;

  public:
    node(T const&amp; data): m_parent(0), m_lost_child(0), m_data(data) { m_children.reserve(8); }
    ~node() {}
    void destroy();

    node*     join(node* tree); // add tree as a child
    void      cut(node* child); // remove the child
    int       lost_child() const { return m_lost_child; }
    void      clear()            { m_parent = 0; m_lost_child = 0; }
    size_type rank() const       { return m_children.size(); }
    bool      is_root() const    { return m_parent == 0; }
    node*     parent() const     { return m_parent; }
    void      remove_all()       { m_children.erase(m_children.begin(), m_children.end()); }

    T const&amp; data() const        { return m_data; }
    template &lt;typename K&gt; void data(K const&amp; data) { m_data = data; }

    typename std::vector&lt;node*&gt;::const_iterator begin() const { return m_children.begin(); }
    typename std::vector&lt;node*&gt;::const_iterator end() const   { return m_children.end(); }

  private:
    size_type          m_index;  // index of the object in the parent's vector
    node*              m_parent; // pointer to the parent node
    std::vector&lt;node*&gt; m_children;
    int                m_lost_child;
    T                  m_data;

    node(node const&amp;);
    void operator= (node const&amp;);
  };

public:
  class iterator {
    // : public std::iterator&lt;std::forward_iterator_tag, T const, size_type, T const*, T const&amp;&gt;
  public:
    iterator(): m_heap(0), m_node(0) {}
    iterator(fibonacci_heap_base const* h);
    iterator(fibonacci_heap_base const* h, node const* n): m_heap(h), m_node(n) {}

    // generated copy ctor, copy assignment, dtor are appropriate

    bool operator== (iterator const&amp; it) const { return m_node == it.m_node; }
    bool operator!= (iterator const&amp; it) const { return m_node != it.m_node; }
    T const&amp; operator* () const  { return m_node-&gt;data(); }
    T const* operator-&gt; () const { return &amp;m_node-&gt;data(); }

    iterator &amp;operator++ ();
    iterator operator++ (int);

  private:
    node const* find_root(typename std::vector&lt;node*&gt;::const_iterator) const;
    node const* find_leaf(node const*) const;

    fibonacci_heap_base const* m_heap;
    node const*                m_node;
  };

public:
  fibonacci_heap_base(): m_size(0) {}
  ~fibonacci_heap_base();

  bool      empty() const { return m_size == 0; }
  size_type size() const  { return m_size; }

  iterator begin() const { return iterator(this); }
  iterator end() const   { return iterator(this, 0); }

protected:
  std::vector&lt;node*&gt; m_roots;
  size_type          m_size;

private:
  fibonacci_heap_base(fibonacci_heap_base const&amp;); // deliberately not implemented
  void operator=(fibonacci_heap_base const&amp;);      // deliberately not implemented
};

// --------------------------------------------------------------------------
// The template class fibonacci_heap implements all algorithmic ingredients
// for an Fibonacci heap.

template &lt;typename T, typename Comp = std::less&lt;T&gt; &gt; class fibonacci_heap: public fibonacci_heap_base&lt;T&gt; {
  typedef typename fibonacci_heap_base&lt;T&gt;::node           node;

public:
  typedef typename fibonacci_heap_base&lt;T&gt;::size_type      size_type;
  typedef node*                                           pointer;
  typedef T                                               value_type;
  typedef T&amp;                                              reference;
  typedef T const&amp;                                        const_reference;
  typedef typename fibonacci_heap_base&lt;T&gt;::iterator       iterator;
  typedef typename fibonacci_heap_base&lt;T&gt;::const_iterator const_iterator;
  typedef Comp                                            compare_type;

  explicit fibonacci_heap(Comp const&amp; comp = Comp()): m_compare(comp) {}

  pointer  push(T const&amp; data);
  void     pop();
  T const&amp; top() const;
  template &lt;typename K&gt; void     change_top(K const&amp; data);

  template &lt;typename K&gt; void     change(pointer, K const&amp;);
  template &lt;typename K&gt; void     decrease(pointer, K const&amp;);
  template &lt;typename K&gt; void     increase(pointer, K const&amp;);
  void     remove(pointer);

private:
  void add_root(node* n);
  void find_min() const;
  void cut(node* n);

  Comp  m_compare;
  mutable node* m_min;
};

// --------------------------------------------------------------------------

} // boost

#endif /* BOOST_F_HEAP_HPP */
</code></pre>
<p>und die passende Source Datei:</p>
<pre><code class="language-cpp">// -*-C++-*- boost/f_heap.cc
// &lt;!!----------------------------------------------------------------------&gt;
// &lt;!! Copyright (C) 1998 Dietmar Kuehl, Claas Solutions GmbH &gt;
// &lt;!!&gt;
// &lt;!! Permission to use, copy, modify, distribute and sell this &gt;
// &lt;!! software for any purpose is hereby granted without fee, provided &gt;
// &lt;!! that the above copyright notice appears in all copies and that &gt;
// &lt;!! both that copyright notice and this permission notice appear in &gt;
// &lt;!! supporting documentation. Dietmar Kuehl and Claas Solutions make no &gt;
// &lt;!! representations about the suitability of this software for any &gt;
// &lt;!! purpose. It is provided &quot;as is&quot; without express or implied warranty. &gt;
// &lt;!!----------------------------------------------------------------------&gt;

// Author: Dietmar Kuehl dietmar.kuehl@claas-solutions.de
// Title:  Implementation of a Fibonacci heap
// Version: $Id: f_heap.cc,v 1.1.1.1 1999/08/19 23:18:24 kuehl Exp $

// --------------------------------------------------------------------------

#  include &quot;fheap.h&quot;

namespace boost
{

// --- implementation of the iterator class for Fibonacci heaps -------------

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::node const* fibonacci_heap_base&lt;T&gt;::iterator::find_root(typename std::vector&lt;node*&gt;::const_iterator it) const
{
  for (; it != m_heap-&gt;m_roots.end(); ++it)
    if ((*it) != 0)
      return (*it);
  return 0;
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::node const* fibonacci_heap_base&lt;T&gt;::iterator::find_leaf(node const* n) const
{
  if (n == 0)
    return 0;

  while (n-&gt;m_children.size() != 0)
    n = n-&gt;m_children[0];

  return n;
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::iterator::iterator(fibonacci_heap_base&lt;T&gt; const* h):
  m_heap(h),
  m_node(0)
{
  if (m_heap-&gt;m_size == 0)
    return;

  m_node = find_leaf(find_root(m_heap-&gt;m_roots.begin()));
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::iterator&amp; fibonacci_heap_base&lt;T&gt;::iterator::operator++ ()
{
  if (m_node-&gt;is_root())
    m_node = find_leaf(find_root(m_heap-&gt;m_roots.begin() + m_node-&gt;rank() + 1));
  else if (m_node-&gt;m_parent-&gt;m_children.size() == m_node-&gt;m_index + 1)
    m_node = m_node-&gt;m_parent;
  else
    m_node = find_leaf(m_node-&gt;m_parent-&gt;m_children[m_node-&gt;m_index + 1]);

  return *this;
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::iterator fibonacci_heap_base&lt;T&gt;::iterator::operator++ (int)
{
  iterator rc(*this);
  operator++ ();
  return rc;
}

// --- implementation of Fibonacci heap's node member functions ----------------

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::pointer fibonacci_heap_base&lt;T&gt;::node::join(node* tree)
{
  tree-&gt;m_index  = m_children.size();
  tree-&gt;m_parent = this;
  m_children.push_back(tree);
  m_lost_child = 0;

  return this;
}

template &lt;typename T&gt; inline void fibonacci_heap_base&lt;T&gt;::node::cut(node* child)
{
  size_type index = child-&gt;m_index;
  if (m_children.size() &gt; index + 1)
    {
      m_children[index] = m_children[m_children.size() - 1];
      m_children[index]-&gt;m_index = index;
    }
  m_children.pop_back();
  ++m_lost_child;
}

template &lt;typename T&gt; inline void fibonacci_heap_base&lt;T&gt;::node::destroy()
{
  typename std::vector&lt;node*&gt;::size_type idx = m_children.size();
  while (idx-- != 0)
    if (m_children[idx] != 0)
      {
	m_children[idx]-&gt;destroy();
	delete m_children[idx];
      }
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::~fibonacci_heap_base()
{
  if (m_size == 0)
    return;

  typename std::vector&lt;node*&gt;::size_type idx = m_roots.size();
  while (idx-- != 0)
    if (m_roots[idx] != 0)
      {
	m_roots[idx]-&gt;destroy();
	delete m_roots[idx];
      }
}

// --- implementation of auxiliary the Fibonacci heap member functions ---------

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::add_root(node* n)
{
  size_type rank = n-&gt;rank();
  if (m_roots.size() &lt;= rank)
    {
      while (m_roots.size() &lt; rank)
        m_roots.push_back(0);
      m_roots.push_back(n);
      n-&gt;clear();
    }
  else if (m_roots[rank] == 0)
    {
      m_roots[rank] = n;
      n-&gt;clear();
    }
  else
    {
      node* r = m_roots[rank];
      m_roots[rank] = 0;
      if (m_compare(n-&gt;data(), r-&gt;data()))
	{
	  n-&gt;clear();
	  add_root(r-&gt;join(n));
	}
      else
	{
	  r-&gt;clear();
	  add_root(n-&gt;join(r));
	}
    }
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::find_min() const
{
  if (m_size == 0)
    m_min = 0;
  else
    {
      typename std::vector&lt;node*&gt;::const_iterator end = m_roots.end();
      typename std::vector&lt;node*&gt;::const_iterator it = m_roots.begin();
      while (*it == 0)
        ++it;
      m_min = *it;

      for (++it; it != end; ++it)
        if (*it != 0 &amp;&amp; m_compare(m_min-&gt;data(), (*it)-&gt;data()))
          m_min = *it;
    }
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::cut(node* n)
{
  node* p = n-&gt;parent();
  p-&gt;cut(n);
  if (p-&gt;is_root())
    {
      m_roots[p-&gt;rank() + 1] = 0;
      add_root(p);
    }
  else if (p-&gt;lost_child() == 2)
    {
      cut(p);
      add_root(p);
    }
}

// --- implementation of Fibonacci heap's modifying member functions -----------

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::decrease(pointer n, K const&amp; data)
{
  n-&gt;data(data);
  typename std::vector&lt;node*&gt;::const_iterator it = n-&gt;begin();
  typename std::vector&lt;node*&gt;::const_iterator end = n-&gt;end();
  for (; it != end; ++it)
    if (m_compare(n-&gt;data(), (*it)-&gt;data()))
      {
	if (n-&gt;is_root())
	  m_roots[n-&gt;rank()] = 0;
	else
	  cut(n);

	for (it = n-&gt;begin(); it != end; ++it)
	  add_root(*it);
	n-&gt;remove_all();

	add_root(n);
	break;
      }
  m_min = 0;
}

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::increase(pointer n, K const&amp; data)
{
  n-&gt;data(data);
  if (!n-&gt;is_root() &amp;&amp; m_compare(n-&gt;parent()-&gt;data(), n-&gt;data()))
    {
      cut(n);
      add_root(n);
    }
  m_min = 0;
}

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::change(pointer n, K const&amp; data)
{
  T comp(n-&gt;data());
  comp = data;

  if (m_compare(n-&gt;data(), comp))
    increase(n, data);
  else
    decrease(n, data);
}

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::change_top(K const&amp; data)
{
  if (m_min == 0)
    find_min();
  change(m_min, data);
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::remove(pointer n)
{
  if (n-&gt;is_root())
    m_roots[n-&gt;rank()] = 0;
  else
    cut(n);

  typename std::vector&lt;node*&gt;::const_iterator it = n-&gt;begin();
  typename std::vector&lt;node*&gt;::const_iterator end = n-&gt;end();
  for (it = n-&gt;begin(); it != end; ++it)
    add_root(*it);

  m_min = 0;
  delete n;
}

// --- implementation of basic heap interface for Fibonacci heaps --------------

template &lt;typename T, typename Comp&gt; inline T const&amp; fibonacci_heap&lt;T, Comp&gt;::top() const
{
  if (m_min == 0)
    find_min();
  return m_min-&gt;data();
}

template &lt;typename T, typename Comp&gt; inline typename fibonacci_heap&lt;T, Comp&gt;::pointer fibonacci_heap&lt;T, Comp&gt;::push(T const&amp; data)
{
  node* n = new node(data);
  ++m_size;
  add_root(n);

  m_min = 0;
  return n;
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::pop()
{
  if (m_min == 0)
    find_min();

  node* del = m_min;
  m_roots[m_min-&gt;rank()] = 0;

  typename std::vector&lt;node*&gt;::const_iterator end = del-&gt;end();

  for (typename std::vector&lt;node*&gt;::const_iterator it = del-&gt;begin(); it != end; ++it)
    add_root(*it);
  --m_size;

  delete del;
  m_min = 0;
}

// -----------------------------------------------------------------------------

} // namespace boost
</code></pre>
<p>Beim kompilieren bekomme ich aber folgenden Fehler:</p>
<pre><code>/fheap.cpp:27: error: expected initializer before ‘const’
/fheap.cpp:35: error: expected initializer before ‘const’
/fheap.cpp:56: error: expected initializer before ‘&amp;’ token
/fheap.cpp:68: error: expected initializer before ‘fibonacci_heap_base’
/fheap.cpp:77: error: expected initializer before ‘fibonacci_heap_base’
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::add_root(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
/fheap.cpp:129: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::find_min() const’:
/fheap.cpp:160: error: ‘m_size’ was not declared in this scope
/fheap.cpp:164: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::cut(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
/fheap.cpp:182: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::decrease(typename boost::fibonacci_heap_base&lt;T&gt;::node*, const K&amp;)’:
/fheap.cpp:203: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::remove(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
/fheap.cpp:249: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘typename boost::fibonacci_heap_base&lt;T&gt;::node* boost::fibonacci_heap&lt;T, Comp&gt;::push(const T&amp;)’:
/fheap.cpp:274: error: ‘m_size’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::pop()’:
/fheap.cpp:287: error: ‘m_roots’ was not declared in this scope
/fheap.cpp:293: error: ‘m_size’ was not declared in this scope
make: *** [fheap.o] Fehler 1
</code></pre>
<p>Ich vermute, dass ein Fehler im Header vorliegt, aber leider kann ich ihn nicht finden.</p>
<p>Sieht einer von euch, wo das Problem ist?</p>
<p>grüße,</p>
<p>fr33way</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/298022/problem-mit-fibonacci-heap</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 03:14:39 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/298022.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Jan 2012 22:58:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Thu, 12 Jan 2012 07:49:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte die Fibonacci Heap implementierung von Dietmar Kuehl nutzen und habe folgendes Problem:</p>
<p>Header Datei:</p>
<pre><code class="language-cpp">// -*-C++-*- boost/f_heap.hpp
// &lt;!!----------------------------------------------------------------------&gt;
// &lt;!! Copyright (C) 1999 Dietmar Kuehl, Claas Solutions GmbH &gt;
// &lt;!!&gt;
// &lt;!! Permission to use, copy, modify, distribute and sell this &gt;
// &lt;!! software for any purpose is hereby granted without fee, provided &gt;
// &lt;!! that the above copyright notice appears in all copies and that &gt;
// &lt;!! both that copyright notice and this permission notice appear in &gt;
// &lt;!! supporting documentation. Dietmar Kuehl and Claas Solutions make no &gt;
// &lt;!! representations about the suitability of this software for any &gt;
// &lt;!! purpose. It is provided &quot;as is&quot; without express or implied warranty. &gt;
// &lt;!!----------------------------------------------------------------------&gt;

// Author: Dietmar Kuehl dietmar.kuehl@claas-solutions.de
// Title:  Declaration for Fibonacci Heaps
// Version: $Id: f_heap.hpp,v 1.1.1.1 1999/08/19 23:18:24 kuehl Exp $

// --------------------------------------------------------------------------
// This implementation is based on the description found in &quot;Network Flow&quot;,
// R.K.Ahuja, T.L.Magnanti, J.B.Orlin, Prentice Hall. The algorithmic stuff
// should be basically identical to this description, however, the actual
// representation is not.
// --------------------------------------------------------------------------

#ifndef FHEAP_H_
#define FHEAP_H_

#include &lt;functional&gt;
#include &lt;vector&gt;

namespace boost
{

// --------------------------------------------------------------------------
// The template class fibonacci_heap_base defines everything which does
// not depend on the compare type. Thus, the actual algorithmic stuff
// is in the template class fibonacci_heap. However, the definition of
// the nodes and the iterator type is in fibonacci_heap_base.

template &lt;typename T&gt; class fibonacci_heap_base {
protected:
  struct node;

public:
  typedef T                                      value_type;
  typedef T&amp;                                     reference;
  typedef T const&amp;                               const_reference;
  typedef typename std::vector&lt;node*&gt;::size_type size_type;
  typedef node*                                  pointer;
  class                                          iterator;
  typedef iterator                               const_iterator;

  friend class iterator;

protected:
  class node {
    friend class iterator;

  public:
    node(T const&amp; data): m_parent(0), m_lost_child(0), m_data(data) { m_children.reserve(8); }
    ~node() {}
    void destroy();

    node*     join(node* tree); // add tree as a child
    void      cut(node* child); // remove the child
    int       lost_child() const { return m_lost_child; }
    void      clear()            { m_parent = 0; m_lost_child = 0; }
    size_type rank() const       { return m_children.size(); }
    bool      is_root() const    { return m_parent == 0; }
    node*     parent() const     { return m_parent; }
    void      remove_all()       { m_children.erase(m_children.begin(), m_children.end()); }

    T const&amp; data() const        { return m_data; }
    template &lt;typename K&gt; void data(K const&amp; data) { m_data = data; }

    typename std::vector&lt;node*&gt;::const_iterator begin() const { return m_children.begin(); }
    typename std::vector&lt;node*&gt;::const_iterator end() const   { return m_children.end(); }

  private:
    size_type          m_index;  // index of the object in the parent's vector
    node*              m_parent; // pointer to the parent node
    std::vector&lt;node*&gt; m_children;
    int                m_lost_child;
    T                  m_data;

    node(node const&amp;);
    void operator= (node const&amp;);
  };

public:
  class iterator {
    // : public std::iterator&lt;std::forward_iterator_tag, T const, size_type, T const*, T const&amp;&gt;
  public:
    iterator(): m_heap(0), m_node(0) {}
    iterator(fibonacci_heap_base const* h);
    iterator(fibonacci_heap_base const* h, node const* n): m_heap(h), m_node(n) {}

    // generated copy ctor, copy assignment, dtor are appropriate

    bool operator== (iterator const&amp; it) const { return m_node == it.m_node; }
    bool operator!= (iterator const&amp; it) const { return m_node != it.m_node; }
    T const&amp; operator* () const  { return m_node-&gt;data(); }
    T const* operator-&gt; () const { return &amp;m_node-&gt;data(); }

    iterator &amp;operator++ ();
    iterator operator++ (int);

  private:
    node const* find_root(typename std::vector&lt;node*&gt;::const_iterator) const;
    node const* find_leaf(node const*) const;

    fibonacci_heap_base const* m_heap;
    node const*                m_node;
  };

public:
  fibonacci_heap_base(): m_size(0) {}
  ~fibonacci_heap_base();

  bool      empty() const { return m_size == 0; }
  size_type size() const  { return m_size; }

  iterator begin() const { return iterator(this); }
  iterator end() const   { return iterator(this, 0); }

protected:
  std::vector&lt;node*&gt; m_roots;
  size_type          m_size;

private:
  fibonacci_heap_base(fibonacci_heap_base const&amp;); // deliberately not implemented
  void operator=(fibonacci_heap_base const&amp;);      // deliberately not implemented
};

// --------------------------------------------------------------------------
// The template class fibonacci_heap implements all algorithmic ingredients
// for an Fibonacci heap.

template &lt;typename T, typename Comp = std::less&lt;T&gt; &gt; class fibonacci_heap: public fibonacci_heap_base&lt;T&gt; {
  typedef typename fibonacci_heap_base&lt;T&gt;::node           node;

public:
  typedef typename fibonacci_heap_base&lt;T&gt;::size_type      size_type;
  typedef node*                                           pointer;
  typedef T                                               value_type;
  typedef T&amp;                                              reference;
  typedef T const&amp;                                        const_reference;
  typedef typename fibonacci_heap_base&lt;T&gt;::iterator       iterator;
  typedef typename fibonacci_heap_base&lt;T&gt;::const_iterator const_iterator;
  typedef Comp                                            compare_type;

  explicit fibonacci_heap(Comp const&amp; comp = Comp()): m_compare(comp) {}

  pointer  push(T const&amp; data);
  void     pop();
  T const&amp; top() const;
  template &lt;typename K&gt; void     change_top(K const&amp; data);

  template &lt;typename K&gt; void     change(pointer, K const&amp;);
  template &lt;typename K&gt; void     decrease(pointer, K const&amp;);
  template &lt;typename K&gt; void     increase(pointer, K const&amp;);
  void     remove(pointer);

private:
  void add_root(node* n);
  void find_min() const;
  void cut(node* n);

  Comp  m_compare;
  mutable node* m_min;
};

// --------------------------------------------------------------------------

} // boost

#endif /* BOOST_F_HEAP_HPP */
</code></pre>
<p>und die passende Source Datei:</p>
<pre><code class="language-cpp">// -*-C++-*- boost/f_heap.cc
// &lt;!!----------------------------------------------------------------------&gt;
// &lt;!! Copyright (C) 1998 Dietmar Kuehl, Claas Solutions GmbH &gt;
// &lt;!!&gt;
// &lt;!! Permission to use, copy, modify, distribute and sell this &gt;
// &lt;!! software for any purpose is hereby granted without fee, provided &gt;
// &lt;!! that the above copyright notice appears in all copies and that &gt;
// &lt;!! both that copyright notice and this permission notice appear in &gt;
// &lt;!! supporting documentation. Dietmar Kuehl and Claas Solutions make no &gt;
// &lt;!! representations about the suitability of this software for any &gt;
// &lt;!! purpose. It is provided &quot;as is&quot; without express or implied warranty. &gt;
// &lt;!!----------------------------------------------------------------------&gt;

// Author: Dietmar Kuehl dietmar.kuehl@claas-solutions.de
// Title:  Implementation of a Fibonacci heap
// Version: $Id: f_heap.cc,v 1.1.1.1 1999/08/19 23:18:24 kuehl Exp $

// --------------------------------------------------------------------------

#  include &quot;fheap.h&quot;

namespace boost
{

// --- implementation of the iterator class for Fibonacci heaps -------------

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::node const* fibonacci_heap_base&lt;T&gt;::iterator::find_root(typename std::vector&lt;node*&gt;::const_iterator it) const
{
  for (; it != m_heap-&gt;m_roots.end(); ++it)
    if ((*it) != 0)
      return (*it);
  return 0;
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::node const* fibonacci_heap_base&lt;T&gt;::iterator::find_leaf(node const* n) const
{
  if (n == 0)
    return 0;

  while (n-&gt;m_children.size() != 0)
    n = n-&gt;m_children[0];

  return n;
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::iterator::iterator(fibonacci_heap_base&lt;T&gt; const* h):
  m_heap(h),
  m_node(0)
{
  if (m_heap-&gt;m_size == 0)
    return;

  m_node = find_leaf(find_root(m_heap-&gt;m_roots.begin()));
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::iterator&amp; fibonacci_heap_base&lt;T&gt;::iterator::operator++ ()
{
  if (m_node-&gt;is_root())
    m_node = find_leaf(find_root(m_heap-&gt;m_roots.begin() + m_node-&gt;rank() + 1));
  else if (m_node-&gt;m_parent-&gt;m_children.size() == m_node-&gt;m_index + 1)
    m_node = m_node-&gt;m_parent;
  else
    m_node = find_leaf(m_node-&gt;m_parent-&gt;m_children[m_node-&gt;m_index + 1]);

  return *this;
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::iterator fibonacci_heap_base&lt;T&gt;::iterator::operator++ (int)
{
  iterator rc(*this);
  operator++ ();
  return rc;
}

// --- implementation of Fibonacci heap's node member functions ----------------

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::pointer fibonacci_heap_base&lt;T&gt;::node::join(node* tree)
{
  tree-&gt;m_index  = m_children.size();
  tree-&gt;m_parent = this;
  m_children.push_back(tree);
  m_lost_child = 0;

  return this;
}

template &lt;typename T&gt; inline void fibonacci_heap_base&lt;T&gt;::node::cut(node* child)
{
  size_type index = child-&gt;m_index;
  if (m_children.size() &gt; index + 1)
    {
      m_children[index] = m_children[m_children.size() - 1];
      m_children[index]-&gt;m_index = index;
    }
  m_children.pop_back();
  ++m_lost_child;
}

template &lt;typename T&gt; inline void fibonacci_heap_base&lt;T&gt;::node::destroy()
{
  typename std::vector&lt;node*&gt;::size_type idx = m_children.size();
  while (idx-- != 0)
    if (m_children[idx] != 0)
      {
	m_children[idx]-&gt;destroy();
	delete m_children[idx];
      }
}

template &lt;typename T&gt; inline fibonacci_heap_base&lt;T&gt;::~fibonacci_heap_base()
{
  if (m_size == 0)
    return;

  typename std::vector&lt;node*&gt;::size_type idx = m_roots.size();
  while (idx-- != 0)
    if (m_roots[idx] != 0)
      {
	m_roots[idx]-&gt;destroy();
	delete m_roots[idx];
      }
}

// --- implementation of auxiliary the Fibonacci heap member functions ---------

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::add_root(node* n)
{
  size_type rank = n-&gt;rank();
  if (m_roots.size() &lt;= rank)
    {
      while (m_roots.size() &lt; rank)
        m_roots.push_back(0);
      m_roots.push_back(n);
      n-&gt;clear();
    }
  else if (m_roots[rank] == 0)
    {
      m_roots[rank] = n;
      n-&gt;clear();
    }
  else
    {
      node* r = m_roots[rank];
      m_roots[rank] = 0;
      if (m_compare(n-&gt;data(), r-&gt;data()))
	{
	  n-&gt;clear();
	  add_root(r-&gt;join(n));
	}
      else
	{
	  r-&gt;clear();
	  add_root(n-&gt;join(r));
	}
    }
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::find_min() const
{
  if (m_size == 0)
    m_min = 0;
  else
    {
      typename std::vector&lt;node*&gt;::const_iterator end = m_roots.end();
      typename std::vector&lt;node*&gt;::const_iterator it = m_roots.begin();
      while (*it == 0)
        ++it;
      m_min = *it;

      for (++it; it != end; ++it)
        if (*it != 0 &amp;&amp; m_compare(m_min-&gt;data(), (*it)-&gt;data()))
          m_min = *it;
    }
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::cut(node* n)
{
  node* p = n-&gt;parent();
  p-&gt;cut(n);
  if (p-&gt;is_root())
    {
      m_roots[p-&gt;rank() + 1] = 0;
      add_root(p);
    }
  else if (p-&gt;lost_child() == 2)
    {
      cut(p);
      add_root(p);
    }
}

// --- implementation of Fibonacci heap's modifying member functions -----------

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::decrease(pointer n, K const&amp; data)
{
  n-&gt;data(data);
  typename std::vector&lt;node*&gt;::const_iterator it = n-&gt;begin();
  typename std::vector&lt;node*&gt;::const_iterator end = n-&gt;end();
  for (; it != end; ++it)
    if (m_compare(n-&gt;data(), (*it)-&gt;data()))
      {
	if (n-&gt;is_root())
	  m_roots[n-&gt;rank()] = 0;
	else
	  cut(n);

	for (it = n-&gt;begin(); it != end; ++it)
	  add_root(*it);
	n-&gt;remove_all();

	add_root(n);
	break;
      }
  m_min = 0;
}

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::increase(pointer n, K const&amp; data)
{
  n-&gt;data(data);
  if (!n-&gt;is_root() &amp;&amp; m_compare(n-&gt;parent()-&gt;data(), n-&gt;data()))
    {
      cut(n);
      add_root(n);
    }
  m_min = 0;
}

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::change(pointer n, K const&amp; data)
{
  T comp(n-&gt;data());
  comp = data;

  if (m_compare(n-&gt;data(), comp))
    increase(n, data);
  else
    decrease(n, data);
}

template &lt;typename T, typename Comp&gt; template &lt;typename K&gt; inline void fibonacci_heap&lt;T, Comp&gt;::change_top(K const&amp; data)
{
  if (m_min == 0)
    find_min();
  change(m_min, data);
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::remove(pointer n)
{
  if (n-&gt;is_root())
    m_roots[n-&gt;rank()] = 0;
  else
    cut(n);

  typename std::vector&lt;node*&gt;::const_iterator it = n-&gt;begin();
  typename std::vector&lt;node*&gt;::const_iterator end = n-&gt;end();
  for (it = n-&gt;begin(); it != end; ++it)
    add_root(*it);

  m_min = 0;
  delete n;
}

// --- implementation of basic heap interface for Fibonacci heaps --------------

template &lt;typename T, typename Comp&gt; inline T const&amp; fibonacci_heap&lt;T, Comp&gt;::top() const
{
  if (m_min == 0)
    find_min();
  return m_min-&gt;data();
}

template &lt;typename T, typename Comp&gt; inline typename fibonacci_heap&lt;T, Comp&gt;::pointer fibonacci_heap&lt;T, Comp&gt;::push(T const&amp; data)
{
  node* n = new node(data);
  ++m_size;
  add_root(n);

  m_min = 0;
  return n;
}

template &lt;typename T, typename Comp&gt; inline void fibonacci_heap&lt;T, Comp&gt;::pop()
{
  if (m_min == 0)
    find_min();

  node* del = m_min;
  m_roots[m_min-&gt;rank()] = 0;

  typename std::vector&lt;node*&gt;::const_iterator end = del-&gt;end();

  for (typename std::vector&lt;node*&gt;::const_iterator it = del-&gt;begin(); it != end; ++it)
    add_root(*it);
  --m_size;

  delete del;
  m_min = 0;
}

// -----------------------------------------------------------------------------

} // namespace boost
</code></pre>
<p>Beim kompilieren bekomme ich aber folgenden Fehler:</p>
<pre><code>/fheap.cpp:27: error: expected initializer before ‘const’
/fheap.cpp:35: error: expected initializer before ‘const’
/fheap.cpp:56: error: expected initializer before ‘&amp;’ token
/fheap.cpp:68: error: expected initializer before ‘fibonacci_heap_base’
/fheap.cpp:77: error: expected initializer before ‘fibonacci_heap_base’
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::add_root(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
/fheap.cpp:129: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::find_min() const’:
/fheap.cpp:160: error: ‘m_size’ was not declared in this scope
/fheap.cpp:164: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::cut(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
/fheap.cpp:182: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::decrease(typename boost::fibonacci_heap_base&lt;T&gt;::node*, const K&amp;)’:
/fheap.cpp:203: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::remove(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
/fheap.cpp:249: error: ‘m_roots’ was not declared in this scope
/fheap.cpp: In member function ‘typename boost::fibonacci_heap_base&lt;T&gt;::node* boost::fibonacci_heap&lt;T, Comp&gt;::push(const T&amp;)’:
/fheap.cpp:274: error: ‘m_size’ was not declared in this scope
/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::pop()’:
/fheap.cpp:287: error: ‘m_roots’ was not declared in this scope
/fheap.cpp:293: error: ‘m_size’ was not declared in this scope
make: *** [fheap.o] Fehler 1
</code></pre>
<p>Ich vermute, dass ein Fehler im Header vorliegt, aber leider kann ich ihn nicht finden.</p>
<p>Sieht einer von euch, wo das Problem ist?</p>
<p>grüße,</p>
<p>fr33way</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167012</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167012</guid><dc:creator><![CDATA[fr33way]]></dc:creator><pubDate>Thu, 12 Jan 2012 07:49:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:01:43 GMT]]></title><description><![CDATA[<p>Fehlt vor <code>fibonacci_heap_base&lt;T&gt;::node</code> in Zeile 27 nicht ein <code>typename</code> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167013</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:01:43 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Thu, 12 Jan 2012 07:50:04 GMT]]></title><description><![CDATA[<p>du meinst fibonacci_heap_base&lt;typename T&gt;::node ?</p>
<p>das wirft nen fehler: /fheap.cpp:27: error: template argument 1 is invalid</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167018</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167018</guid><dc:creator><![CDATA[fr33way]]></dc:creator><pubDate>Thu, 12 Jan 2012 07:50:04 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:09:40 GMT]]></title><description><![CDATA[<p>fr33way schrieb:</p>
<blockquote>
<p>du meinst fibonacci_heap_base&lt;typename T&gt;::node ?</p>
</blockquote>
<p>Nein, <em>davor</em>. Also</p>
<pre><code class="language-cpp">template &lt;typename T&gt; inline typename fibonacci_heap_base&lt;T&gt;::node const* fibonacci_heap_base&lt;T&gt;::iterator::find_root(typename std::vector&lt;node*&gt;::const_iterator it) const
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2167019</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167019</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:09:40 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:21:11 GMT]]></title><description><![CDATA[<p>danke, das reduziert schon mal einen Teil der Fehlermeldungen.<br />
Was jetzt bleibt sind die:</p>
<pre><code>src/cex/pathfinder/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::add_root(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
src/cex/pathfinder/fheap.cpp:129: error: ‘m_roots’ was not declared in this scope
src/cex/pathfinder/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::find_min() const’:
src/cex/pathfinder/fheap.cpp:160: error: ‘m_size’ was not declared in this scope
src/cex/pathfinder/fheap.cpp:164: error: ‘m_roots’ was not declared in this scope
src/cex/pathfinder/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::cut(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
src/cex/pathfinder/fheap.cpp:182: error: ‘m_roots’ was not declared in this scope
src/cex/pathfinder/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::decrease(typename boost::fibonacci_heap_base&lt;T&gt;::node*, const K&amp;)’:
src/cex/pathfinder/fheap.cpp:203: error: ‘m_roots’ was not declared in this scope
src/cex/pathfinder/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::remove(typename boost::fibonacci_heap_base&lt;T&gt;::node*)’:
src/cex/pathfinder/fheap.cpp:249: error: ‘m_roots’ was not declared in this scope
src/cex/pathfinder/fheap.cpp: In member function ‘typename boost::fibonacci_heap_base&lt;T&gt;::node* boost::fibonacci_heap&lt;T, Comp&gt;::push(const T&amp;)’:
src/cex/pathfinder/fheap.cpp:274: error: ‘m_size’ was not declared in this scope
src/cex/pathfinder/fheap.cpp: In member function ‘void boost::fibonacci_heap&lt;T, Comp&gt;::pop()’:
src/cex/pathfinder/fheap.cpp:287: error: ‘m_roots’ was not declared in this scope
src/cex/pathfinder/fheap.cpp:293: error: ‘m_size’ was not declared in this scope
make: *** [fheap.o] Fehler 1
</code></pre>
<p>Aber was ich nicht ganz verstehe, denn über die friend angaben dürfte das doch gar nicht auftreten? (Bzw weil fibonacci_heap ja direkt von fibonacci_heap_base erbt)</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167020</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167020</guid><dc:creator><![CDATA[fr33way]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:21:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:28:13 GMT]]></title><description><![CDATA[<p>IIRC musst du da explizit <code>this-&gt;</code> schreiben, weil die Basisklasse eine Templateklasse ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167022</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167022</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:28:13 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:37:00 GMT]]></title><description><![CDATA[<p>fibonacci_heap_base&lt;T&gt; ist eine abhängige Basis, die folglich bei der in der Templatedefinition von fibonacci_heap&lt;T, Comp&gt;::add_root nicht durchsucht werden kann.<br />
m_roots ist aber kein abhängiger Name und wird folglich bereits bei der Templatedefinition gebunden. Abhilfe wird dadurch geschaffen, dass m_roots durch einen abhängigen Ausdruck ersetzt wird (14.6.2.2/3):<br />
- durch Qualifizierung: fibonacci_heap_base&lt;T&gt;::m_roots, oder<br />
- durch explizite Verwendung von this: this-&gt;m_roots</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167025</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:37:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Thu, 12 Jan 2012 07:52:38 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>danke! das hat das problem gelöst.</p>
<p>nun bleibe nur noch eine Kleinigkeit, das Programm kompiliert korrekt, aber beim linken kriege ich undefined references.</p>
<p>ich erzeuge ein Objekt per</p>
<pre><code class="language-cpp">boost::fibonacci_heap&lt;Vertex&lt;PTYPE&gt;*, CompareDistance&gt; remainingNodes;
remainingNodes.push(someNode);
</code></pre>
<p>Und im weiteren Programmverlauf erfolgen diverse weitere zugriffe</p>
<pre><code>search.cpp:(.text+0xc95): undefined reference to `boost::fibonacci_heap&lt;proj::Vertex&lt;double&gt;*, proj::CompareDistance&gt;::push(proj::Vertex&lt;double&gt;* const&amp;)'
search.cpp:(.text+0xcb1): undefined reference to `boost::fibonacci_heap&lt;proj::Vertex&lt;double&gt;*, proj::CompareDistance&gt;::top() const'
search.cpp:(.text+0xd07): undefined reference to `boost::fibonacci_heap&lt;proj::Vertex&lt;double&gt;*, proj::CompareDistance&gt;::pop()'
search.cpp:(.text+0x1b18): undefined reference to `boost::fibonacci_heap&lt;proj::Vertex&lt;double&gt;*, proj::CompareDistance&gt;::push(proj::Vertex&lt;double&gt;* const&amp;)'
search.cpp:(.text+0x1e7e): undefined reference to `boost::fibonacci_heap_base&lt;proj::Vertex&lt;double&gt;*&gt;::~fibonacci_heap_base()'
search.cpp:(.text+0x2470): undefined reference to `boost::fibonacci_heap_base&lt;proj::Vertex&lt;double&gt;*&gt;::~fibonacci_heap_base()'
collect2: ld returned 1 exit status
make: *** [project] Fehler 1
</code></pre>
<p>weiterhin danke für eure hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167026</guid><dc:creator><![CDATA[fr33way]]></dc:creator><pubDate>Thu, 12 Jan 2012 07:52:38 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:40:30 GMT]]></title><description><![CDATA[<p>Was für eine Ursache können denn diese Fehler haben? Der Code ist alt, aber älter als 2-Phase-Lookup sicher nicht, denn in der Parameterliste der ersten Methode (Zeile 27) schreibt er ja <code>typename std::vector&lt;node*&gt;::const_iterator it</code> . Hats da mal Änderungen gegeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167027</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167027</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:40:30 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Wed, 11 Jan 2012 23:49:23 GMT]]></title><description><![CDATA[<p>Templatedefinitionen nicht im Header platziert, dafür eine Menge überflüssige inlines.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167029</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167029</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 11 Jan 2012 23:49:23 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Thu, 12 Jan 2012 00:04:17 GMT]]></title><description><![CDATA[<p>hat noch einer eine idee zu meinem linker problem?</p>
<p>Es sind ja lediglich Dateien die im cpp file definiert worden. ich nutze autotools zum erstellen eines Makefiles, in die <a href="http://Makefile.am" rel="nofollow">Makefile.am</a> habe ich meine neue cpp Datei eingetragen.</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167031</guid><dc:creator><![CDATA[fr33way]]></dc:creator><pubDate>Thu, 12 Jan 2012 00:04:17 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Thu, 12 Jan 2012 03:11:02 GMT]]></title><description><![CDATA[<p>Das liegt, wie camper richtig bemerkt, stumpf daran, dass die gesamte Klassenvorlage dem Compiler bekannt sein muss, damit er sie für scc_cex::Vertex&lt;double&gt;* konkretisieren kann. Sofern du nicht auf explicit instantiation zurückgreifen willst, muss die <em>gesamte</em> Template in den Header; eine Aufspaltung in Header und Quellcodedatei, wie man sie andernfalls kennt, ist mit Templates nicht möglich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167035</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Thu, 12 Jan 2012 03:11:02 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Fibonacci Heap on Thu, 12 Jan 2012 07:28:48 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>danke, hatte leider die eine Antwort nicht so verstanden.</p>
<p>Das hat auf jeden Fall mein Problem behoben und die Sache läuft.</p>
<p>Also Danke für Eure Hilfe.</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2167048</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2167048</guid><dc:creator><![CDATA[fr33way]]></dc:creator><pubDate>Thu, 12 Jan 2012 07:28:48 GMT</pubDate></item></channel></rss>