<?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[No matching function for call to ...]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich habe ein eigentlich simples Problem aber ich finde einfach keine Lösung dafür.<br />
Ich will eine Template-Library für Matrizen an den Umfpack solver via Boost Numeric Bindings anbinden, aber irgendwie findet der die passenden Methoden nicht.</p>
<p>Vielleicht sieht jemand von euch was da fehlt.<br />
Ich will die Methode aufrufen:</p>
<p>In umfpack.hpp - einem Header aus dem Boost Numeric Bindings package</p>
<pre><code class="language-cpp">template &lt;typename MatrA&gt;
  inline
  int symbolic (MatrA const&amp; A, 
                symbolic_type&lt;
                  typename traits::sparse_matrix_traits&lt;MatrA&gt;::value_type
                &gt;&amp; Symbolic, 
                double const* Control = 0, double* Info = 0) 
  {
#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK 
    BOOST_STATIC_ASSERT((boost::is_same&lt;
      typename traits::sparse_matrix_traits&lt;MatrA&gt;::matrix_structure, 
      traits::general_t
    &gt;::value)); 
    BOOST_STATIC_ASSERT((boost::is_same&lt;
      typename traits::sparse_matrix_traits&lt;MatrA&gt;::ordering_type,
      traits::column_major_t
    &gt;::value)); 
    BOOST_STATIC_ASSERT(traits::sparse_matrix_traits&lt;MatrA&gt;::index_base == 0);
#endif 

    typedef 
      typename traits::sparse_matrix_traits&lt;MatrA&gt;::storage_format storage_f; 

#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK 
    BOOST_STATIC_ASSERT(
      (boost::is_same&lt;storage_f, traits::compressed_t&gt;::value
       || 
       boost::is_same&lt;storage_f, traits::coordinate_t&gt;::value
       )); 
#endif 

    return detail::symbolic (storage_f(), A, &amp;Symbolic.ptr, Control, Info); 
  }
</code></pre>
<p>und zwar habe ich mir das so gedacht:</p>
<p>test_umfpack.cpp - Meiner Testfunktion, die das ganze aufrufen soll</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;boost/numeric/mtl/mtl.hpp&gt;

#include &lt;boost/numeric/bindings/traits/traits.hpp&gt;
#include &lt;boost/numeric/bindings/umfpack/umfpack.hpp&gt;

using namespace mtl;
using namespace boost::numeric::bindings::traits;

namespace umf = boost::numeric::bindings::umfpack;

int main()
{
  compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; matrix(5, 5);
  diagonal_setup(matrix, 1.);
  {
    matrix::inserter&lt;compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; &gt; ins(matrix);

    ins[2][2] = -2.;
    ins[3][1] = -1.;
    ins[1][3] = -1.;
  }
  std::cout &lt;&lt; &quot;Test matrix is\n&quot; &lt;&lt; matrix &lt;&lt; '\n';

  dense_vector&lt;double&gt; vector(5);
  for(unsigned i=0; i&lt;5; ++i)
    vector[i] = 5-i/2.;

  std::cout &lt;&lt; &quot;Test vector is\n&quot; &lt;&lt; vector &lt;&lt; '\n';

  // 1. Symbolic analysis of coefficient matrix
  umf::symbolic_type&lt;double&gt; Symbolic;
  umf::symbolic(matrix, Symbolic);

  // 2. Numeric factorization
  // TODO

  // 3. Backward substitution
  // TODO

  return 0;
}
</code></pre>
<p>Beim Aufruf der Funktion &quot;symbolic&quot; kommt dieser Compilerfehler:</p>
<pre><code>test_umfpack.cpp:33: error: no matching function for call to ‘symbolic(mtl::matrix::compressed2D&lt;double, mtl::matrix::parameters&lt;mtl::tag::col_major, mtl::index::c_index, mtl::non_fixed::dimensions, false&gt; &gt;&amp;, boost::numeric::bindings::umfpack::symbolic_type&lt;double&gt;&amp;)’
</code></pre>
<p>Ich versteh es irgendwie nicht. Das erste Argument ist templatisiert und müsste passen, das zweite ist genau das was ich als Symbolic definiert habe. Die anderen beiden sind optional.</p>
<p>Wäre über jede Hilfe unendlich dankbar.</p>
<p>Schönen Gruß<br />
Max</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/267004/no-matching-function-for-call-to</link><generator>RSS for Node</generator><lastBuildDate>Wed, 02 Sep 2026 18:15:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/267004.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 May 2010 20:19:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to No matching function for call to ... on Mon, 17 May 2010 20:19:29 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich habe ein eigentlich simples Problem aber ich finde einfach keine Lösung dafür.<br />
Ich will eine Template-Library für Matrizen an den Umfpack solver via Boost Numeric Bindings anbinden, aber irgendwie findet der die passenden Methoden nicht.</p>
<p>Vielleicht sieht jemand von euch was da fehlt.<br />
Ich will die Methode aufrufen:</p>
<p>In umfpack.hpp - einem Header aus dem Boost Numeric Bindings package</p>
<pre><code class="language-cpp">template &lt;typename MatrA&gt;
  inline
  int symbolic (MatrA const&amp; A, 
                symbolic_type&lt;
                  typename traits::sparse_matrix_traits&lt;MatrA&gt;::value_type
                &gt;&amp; Symbolic, 
                double const* Control = 0, double* Info = 0) 
  {
#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK 
    BOOST_STATIC_ASSERT((boost::is_same&lt;
      typename traits::sparse_matrix_traits&lt;MatrA&gt;::matrix_structure, 
      traits::general_t
    &gt;::value)); 
    BOOST_STATIC_ASSERT((boost::is_same&lt;
      typename traits::sparse_matrix_traits&lt;MatrA&gt;::ordering_type,
      traits::column_major_t
    &gt;::value)); 
    BOOST_STATIC_ASSERT(traits::sparse_matrix_traits&lt;MatrA&gt;::index_base == 0);
#endif 

    typedef 
      typename traits::sparse_matrix_traits&lt;MatrA&gt;::storage_format storage_f; 

#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK 
    BOOST_STATIC_ASSERT(
      (boost::is_same&lt;storage_f, traits::compressed_t&gt;::value
       || 
       boost::is_same&lt;storage_f, traits::coordinate_t&gt;::value
       )); 
#endif 

    return detail::symbolic (storage_f(), A, &amp;Symbolic.ptr, Control, Info); 
  }
</code></pre>
<p>und zwar habe ich mir das so gedacht:</p>
<p>test_umfpack.cpp - Meiner Testfunktion, die das ganze aufrufen soll</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;boost/numeric/mtl/mtl.hpp&gt;

#include &lt;boost/numeric/bindings/traits/traits.hpp&gt;
#include &lt;boost/numeric/bindings/umfpack/umfpack.hpp&gt;

using namespace mtl;
using namespace boost::numeric::bindings::traits;

namespace umf = boost::numeric::bindings::umfpack;

int main()
{
  compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; matrix(5, 5);
  diagonal_setup(matrix, 1.);
  {
    matrix::inserter&lt;compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; &gt; ins(matrix);

    ins[2][2] = -2.;
    ins[3][1] = -1.;
    ins[1][3] = -1.;
  }
  std::cout &lt;&lt; &quot;Test matrix is\n&quot; &lt;&lt; matrix &lt;&lt; '\n';

  dense_vector&lt;double&gt; vector(5);
  for(unsigned i=0; i&lt;5; ++i)
    vector[i] = 5-i/2.;

  std::cout &lt;&lt; &quot;Test vector is\n&quot; &lt;&lt; vector &lt;&lt; '\n';

  // 1. Symbolic analysis of coefficient matrix
  umf::symbolic_type&lt;double&gt; Symbolic;
  umf::symbolic(matrix, Symbolic);

  // 2. Numeric factorization
  // TODO

  // 3. Backward substitution
  // TODO

  return 0;
}
</code></pre>
<p>Beim Aufruf der Funktion &quot;symbolic&quot; kommt dieser Compilerfehler:</p>
<pre><code>test_umfpack.cpp:33: error: no matching function for call to ‘symbolic(mtl::matrix::compressed2D&lt;double, mtl::matrix::parameters&lt;mtl::tag::col_major, mtl::index::c_index, mtl::non_fixed::dimensions, false&gt; &gt;&amp;, boost::numeric::bindings::umfpack::symbolic_type&lt;double&gt;&amp;)’
</code></pre>
<p>Ich versteh es irgendwie nicht. Das erste Argument ist templatisiert und müsste passen, das zweite ist genau das was ich als Symbolic definiert habe. Die anderen beiden sind optional.</p>
<p>Wäre über jede Hilfe unendlich dankbar.</p>
<p>Schönen Gruß<br />
Max</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1898671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1898671</guid><dc:creator><![CDATA[Max3000]]></dc:creator><pubDate>Mon, 17 May 2010 20:19:29 GMT</pubDate></item><item><title><![CDATA[Reply to No matching function for call to ... on Tue, 18 May 2010 07:07:14 GMT]]></title><description><![CDATA[<p>Lass dir doch mal</p>
<pre><code class="language-cpp">typeid(typename traits::sparse_matrix_traits&lt; compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; &gt;::value_type)).name()
</code></pre>
<p>ausgeben, dann weißt du was er erwartet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1898768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1898768</guid><dc:creator><![CDATA[Probierer]]></dc:creator><pubDate>Tue, 18 May 2010 07:07:14 GMT</pubDate></item><item><title><![CDATA[Reply to No matching function for call to ... on Tue, 18 May 2010 19:06:22 GMT]]></title><description><![CDATA[<p>Ok also irgendwie funktioniert das mit dem typeid nicht, weil der sagt dass er value_type nicht kennt. Aber immerhin weiß ich jetzt, dass die Spezialisierung der sparse_matrix_detail_traits nicht geklappt hat. Aber irgendwie finde ich auch hier den fehler nicht. Meine Spezialisierung ist:</p>
<pre><code class="language-cpp">namespace boost{
  namespace numeric{
    namespace bindings{
      namespace traits{
	template &lt;typename T, typename P, typename M&gt;
	struct sparse_matrix_detail_traits&lt;mtl::compressed2D&lt;T,P&gt;, M&gt;
	{
	  // Typedefs
	  typedef general_t matrix_structure;
	  typedef compressed_t storage_format;
	  typedef typename boost::mpl::if_&lt;mtl::traits::is_row_major&lt;P&gt;, row_major_t, column_major_t&gt;::type ordering_type;
	  typedef T value_type;
	  typedef value_type* value_pointer;
	  typedef unsigned long* index_pointer;

	  typedef M matrix_type;

	  static ptrdiff_t num_rows(matrix_type&amp; matrix) {
	    using mtl::num_rows;
	    return static_cast&lt;ptrdiff_t&gt;(num_rows(matrix));
      	  }

	  static ptrdiff_t num_columns(matrix_type&amp; matrix) {
	    using mtl::num_cols;
	    std::cout &lt;&lt; &quot;TEst&quot;;
	    return static_cast&lt;ptrdiff_t&gt;(num_cols(matrix));
	  }

	  static index_pointer index1_storage(matrix_type &amp;matrix) {
	    return &amp;matrix.starts[0];
	  }

	  static index_pointer index2_storage(matrix_type &amp;matrix) {
	    return &amp;matrix.indices[0];
	  }

	  static value_pointer value_storage(matrix_type &amp;matrix) {
	    return &amp;matrix.data[0];
	  }

 	  static ptrdiff_t leading_dimension(matrix_type&amp; matrix) {
	    using mtl::num_cols;
	    return static_cast&lt;ptrdiff_t&gt;(num_cols(matrix));
	  }

	  static ptrdiff_t num_nonzeros(matrix_type &amp;matrix) {
	    return num_cols(matrix)*num_rows(matrix)-1;
	  }
	};
      }
    }
  }
}
</code></pre>
<p>Wenn ich jetzt auf dieser Spezialisierung die methoden aufrufen will kommt allerdings immer ein Fehler:</p>
<pre><code class="language-cpp">typedef  compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; matrix_type;

  matrix_type matrix(5, 5);
  diagonal_setup(matrix, 1.);
  {
    matrix::inserter&lt;compressed2D&lt;double, matrix::parameters&lt;tag::col_major&gt; &gt; &gt; ins(matrix);

    ins[2][2] = -2.;
    ins[3][1] = -1.;
    ins[1][3] = -1.;
  }

  dense_vector&lt;double&gt; vector(5);
  for(unsigned i=0; i&lt;5; ++i)
    vector[i] = 5-i/2.;

  sparse_matrix_detail_traits&lt;matrix_type, matrix_type&gt;::num_columns(matrix); // test for num_columns method
  std::cout &lt;&lt; typeid(sparse_matrix_detail_traits&lt;matrix_type, matrix_type&gt;::value_type).name(); // test for value_type definition
</code></pre>
<pre><code>Es kommt jedesmal der Fehler:
test_umfpack.cpp:35: error: ‘num_columns’ is not a member of ‘boost::numeric::bindings::traits::sparse_matrix_detail_traits&lt;mtl::matrix::compressed2D&lt;double, mtl::matrix::parameters&lt;mtl::matrix::parameters&lt;mtl::tag::col_major&gt; mtl::index::c_index, mtl::non_fixed::dimensions, false&gt; &gt;, mtl::matrix::compressed2D&lt;double, mtl::matrix::parameters&lt;mtl::tag::col_major, mtl::index::c_index, mtl::non_fixed::dimensions, false&gt; &gt; &gt;’
make: *** [test_umfpack] Fehler 1
</code></pre>
<p>Und das selbe entsprechend auch für value_type.<br />
Ich komm leider nicht weiter. Ich hab jetzt alles probiert, und ich weiß nicht was falsch ist.</p>
<p>Vielen Dank für eure Hilfe.</p>
<p>Grüße<br />
Max</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1899230</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1899230</guid><dc:creator><![CDATA[Max3000]]></dc:creator><pubDate>Tue, 18 May 2010 19:06:22 GMT</pubDate></item><item><title><![CDATA[Reply to No matching function for call to ... on Tue, 18 May 2010 19:15:42 GMT]]></title><description><![CDATA[<p>Oh man... immer wenn ich hier ins Forum schreibe finde ich die Lösung kurz danach selber :D.</p>
<p>Ich hab nur vergessen den Header zu includen, wo meine spezialisierung drin ist.<br />
Danke trotzdem fürs lesen ;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1899237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1899237</guid><dc:creator><![CDATA[Max3000]]></dc:creator><pubDate>Tue, 18 May 2010 19:15:42 GMT</pubDate></item></channel></rss>