本文整理汇总了C++中matrix_type::size方法的典型用法代码示例。如果您正苦于以下问题:C++ matrix_type::size方法的具体用法?C++ matrix_type::size怎么用?C++ matrix_type::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matrix_type
的用法示例。
在下文中一共展示了matrix_type::size方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
int operator()()
{
if ( make_preprocessing() ) { assert( !"Failed to make preprocessing." ); return 1; }
if( make_initialization_preprocessing() ) { assert( !"Failed to make initialization preprocessing." ); return 1; }
unknown_parameters = make_unknown_parameters(); if( !unknown_parameters ) { assert( !"Failed to make unknown parameters." ); return 1; }
fitting_array = make_fitting_array_initial_guess(); if ( fitting_array.size() != unknown_parameters ) { assert( !"Failed to make initial guess." ); return 1; }
max_iteration = make_max_iteration(); if( !max_iteration ) { assert( !"Failed to make max iteration." ); return 1; }
eps = make_eps();if( eps < value_type{0} ) { assert( !"Failed to make eps." ); return 1; }
if ( make_initialization_postprocessing() ) { assert( !"Failed to make initialization postprocessing." ); return 1; }
merit_function = make_merit_function(); if( !merit_function ) { assert( !"Failed to make merit function." ); return 1; }
jacobian_matrix_function.resize( 1, unknown_parameters );
for ( size_type index = 0; index != unknown_parameters; ++index )
{
jacobian_matrix_function[0][index] = make_jacobian_matrix_function( index );
if ( !jacobian_matrix_function[0][index] ) { assert( "Failed to make jacobian matrix function." ); return 1; }
}
hessian_matrix_function.resize( unknown_parameters, unknown_parameters );
for ( size_type index = 0; index != unknown_parameters; ++index )
for ( size_type jndex = 0; jndex <= index; ++jndex )
{
hessian_matrix_function[index][jndex] = make_hessian_matrix_function( index, jndex );
if ( !hessian_matrix_function[index][jndex] ) { assert( "Failed to make jacobian matrix function." ); return 1; }
if ( index != jndex )
{
hessian_matrix_function[jndex][index] = hessian_matrix_function[index][jndex];
}
}
if ( make_iteration_preprocessing() ) { assert( !"Failed to make iteration preprocessing." ); return 1; }
for ( size_type step_index = 0; step_index != max_iteration; ++step_index )
{
if ( make_every_iteration_preprocessing() ) { assert( !"Failed to make every iteration preprocessing." ); return 1; }
if ( make_iteration() ) { assert( !"Failed to make iteration" ); return 1; }
if ( ! make_fitting_flag() ) { /*eps reached*/break;}
if ( make_every_iteration_postprocessing() ) { assert( !"Failed to make every iteration postprocessing." ); return 1; }
}
if ( make_iteration_postprocessing() ) { assert( !"Failed to make iteration postprocessing." ); return 1; }
if ( make_postprocessing() ) { assert( !"Failed to make postprocessing. " ); return 1; }
return 0;
}
示例2:
// static std::ptrdiff_t stride1 (matrix_type& v) { return vector_traits<V>::stride (v); }
// static std::ptrdiff_t stride2 (matrix_type&) { return 1; }
static std::ptrdiff_t leading_dimension (matrix_type& v) { return v.size(); }
示例3: leading_dimension
static int leading_dimension (matrix_type& v) { return v.size(); }
示例4: storage_size
static int storage_size (matrix_type& v) { return v.size(); }
示例5:
static int size1 (matrix_type& v) { return v.size(); }