// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 Alec Jacobson // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #include "list_to_matrix.h" #include #include #include #include "max_size.h" #include "min_size.h" template IGL_INLINE bool igl::list_to_matrix(const std::vector > & V,Eigen::PlainObjectBase& M) { // number of rows int m = V.size(); if(m == 0) { M.resize( Derived::RowsAtCompileTime>=0?Derived::RowsAtCompileTime:0 , Derived::ColsAtCompileTime>=0?Derived::ColsAtCompileTime:0 ); return true; } // number of columns int n = igl::min_size(V); if(n != igl::max_size(V)) { return false; } assert(n != -1); // Resize output M.resize(m,n); // Loop over rows for(int i = 0;i IGL_INLINE bool igl::list_to_matrix(const std::vector > & V,Eigen::PlainObjectBase& M) { // number of rows int m = V.size(); if(m == 0) { M.resize( Derived::RowsAtCompileTime>=0?Derived::RowsAtCompileTime:0 , Derived::ColsAtCompileTime>=0?Derived::ColsAtCompileTime:0 ); return true; } // number of columns int n = static_cast(N); assert(n != -1); // Resize output M.resize(m,n); // Loop over rows for(int i = 0;i IGL_INLINE bool igl::list_to_matrix( const std::vector > & V, const int n, const T & padding, Eigen::PlainObjectBase& M) { const int m = V.size(); M.resize(m,n); for(int i = 0;in) { return false; } int j = 0; for(;j IGL_INLINE bool igl::list_to_matrix(const std::vector & V,Eigen::PlainObjectBase& M) { // number of rows int m = V.size(); if(m == 0) { //fprintf(stderr,"Error: list_to_matrix() list is empty()\n"); //return false; if(Derived::ColsAtCompileTime == 1) { M.resize(0,1); }else if(Derived::RowsAtCompileTime == 1) { M.resize(1,0); }else { M.resize(0,0); } return true; } // Resize output if(Derived::RowsAtCompileTime == 1) { M.resize(1,m); }else { M.resize(m,1); } // Loop over rows for(int i = 0;i >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh // generated by autoexplicit.sh // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector, std::allocator > > const&, Eigen::PlainObjectBase >&); #ifdef WIN32 template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(class std::vector > const &, class Eigen::PlainObjectBase > &); template bool igl::list_to_matrix >(class std::vector > const &,class Eigen::PlainObjectBase > &); template bool igl::list_to_matrix >(class std::vector > const &,class Eigen::PlainObjectBase > &); template bool igl::list_to_matrix >(class std::vector > const &,class Eigen::PlainObjectBase > &); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix<__int64,class Eigen::Matrix >(class std::vector >,class std::allocator > > > const &,class Eigen::PlainObjectBase > &); #endif #endif