Hello community,

here is the log from the commit of package armadillo for openSUSE:Factory 
checked in at 2014-07-04 17:18:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/armadillo (Old)
 and      /work/SRC/openSUSE:Factory/.armadillo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "armadillo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/armadillo/armadillo.changes      2014-06-04 
18:40:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.armadillo.new/armadillo.changes 2014-07-04 
17:18:53.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Jul  2 20:17:08 UTC 2014 - badshah...@gmail.com
+
+- Update to Version 4.320   (Daintree Tea Raider)
+  + Expanded eigs_sym() and eigs_gen() to use an optional
+    tolerance parameter
+  + Expanded eig_sym() to automatically fall back to standard
+    decomposition method if divide-and-conquer fails
+  + Automatic installer enables use of C++11 random number
+    generator when using gcc 4.8.3+ in C++11 mode.
+
+-------------------------------------------------------------------

Old:
----
  armadillo-4.300.8.tar.gz

New:
----
  armadillo-4.320.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ armadillo.spec ++++++
--- /var/tmp/diff_new_pack.OwuiZY/_old  2014-07-04 17:18:54.000000000 +0200
+++ /var/tmp/diff_new_pack.OwuiZY/_new  2014-07-04 17:18:54.000000000 +0200
@@ -19,7 +19,7 @@
 %define soname libarmadillo4
 
 Name:           armadillo
-Version:        4.300.8
+Version:        4.320.0
 Release:        0
 Summary:        Fast C++ matrix library with interfaces to LAPACK and ATLAS
 License:        MPL-2.0

++++++ armadillo-4.300.8.tar.gz -> armadillo-4.320.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.300.8/CMakeLists.txt 
new/armadillo-4.320.0/CMakeLists.txt
--- old/armadillo-4.300.8/CMakeLists.txt        2014-06-01 04:44:40.000000000 
+0200
+++ new/armadillo-4.320.0/CMakeLists.txt        2014-07-02 09:00:14.000000000 
+0200
@@ -13,10 +13,11 @@
 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 
 set(ARMA_MAJOR 4)
-set(ARMA_MINOR 300)
-set(ARMA_PATCH 8)
+set(ARMA_MINOR 320)
+set(ARMA_PATCH 0)
+set(ARMADILLO_VERSION ${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH})
 
-message(STATUS "Configuring Armadillo 
${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH}")
+message(STATUS "Configuring Armadillo ${ARMADILLO_VERSION}")
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
"${CMAKE_SOURCE_DIR}/build_aux/cmake/Modules/")
 
@@ -34,6 +35,7 @@
 set(ARMA_USE_ARPACK    false)
 set(ARMA_USE_CXX11_RNG false)
 set(ARMA_USE_WRAPPER   true )
+option(BUILD_SHARED_LIBS "build shared library" ON)
 
 ## NOTE:
 ## Set ARMA_USE_WRAPPER to false if you're getting linking errors when 
compiling your programs,
@@ -248,10 +250,10 @@
 
 
 if(DEFINED CMAKE_CXX_COMPILER_ID AND DEFINED CMAKE_CXX_COMPILER_VERSION)
-  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT 
${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.9)
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT 
${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8.3)
     set(ARMA_USE_CXX11_RNG true)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-    message(STATUS "Detected gcc 4.9 or later. Added '-std=c++11' to compiler 
flags")
+    message(STATUS "Detected gcc 4.8.3 or later. Added '-std=c++11' to 
compiler flags")
   endif()
 endif()
 
@@ -309,7 +311,7 @@
 message(STATUS "CMAKE_SHARED_LINKER_FLAGS = ${CMAKE_SHARED_LINKER_FLAGS}")
 message(STATUS "CMAKE_REQUIRED_INCLUDES   = ${CMAKE_REQUIRED_INCLUDES}"  )
 
-add_library( armadillo SHARED ${PROJECT_SOURCE_DIR}/src/wrapper.cpp )
+add_library( armadillo ${PROJECT_SOURCE_DIR}/src/wrapper.cpp )
 target_link_libraries( armadillo ${ARMA_LIBS} )
 set_target_properties(armadillo PROPERTIES VERSION 
${ARMA_MAJOR}.${ARMA_MINOR_ALT}.${ARMA_PATCH} SOVERSION ${ARMA_MAJOR})
 
@@ -360,8 +362,13 @@
   set(INSTALL_DATA_DIR "share")
 endif()
 
+# executables destination
+if(NOT INSTALL_BIN_DIR)
+  set(INSTALL_BIN_DIR "bin")
+endif()
+
 # Make relative paths absolute so we can write them in Config.cmake files
-foreach(p LIB INCLUDE DATA)
+foreach(p LIB INCLUDE DATA BIN)
   set(var INSTALL_${p}_DIR)
   if(NOT IS_ABSOLUTE "${${var}}")
     set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
@@ -372,6 +379,7 @@
 message(STATUS "INSTALL_LIB_DIR      = ${INSTALL_LIB_DIR}"     )
 message(STATUS "INSTALL_INCLUDE_DIR  = ${INSTALL_INCLUDE_DIR}" )
 message(STATUS "INSTALL_DATA_DIR     = ${INSTALL_DATA_DIR}"    )
+message(STATUS "INSTALL_BIN_DIR      = ${INSTALL_BIN_DIR}"    )
 
 
 # Note that the trailing / character in "include/" is critical
@@ -383,10 +391,11 @@
 PATTERN "*orig" EXCLUDE
 )
 
-install(TARGETS armadillo 
-  DESTINATION ${INSTALL_LIB_DIR}
-  EXPORT ArmadilloLibraryDepends)
-
+install(TARGETS armadillo EXPORT ArmadilloLibraryDepends
+  ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
+  LIBRARY DESTINATION ${INSTALL_LIB_DIR}
+  RUNTIME DESTINATION ${INSTALL_BIN_DIR})
+  
 # Export the package for use from the build-tree
 # (this registers the build-tree with a global CMake-registry)
 export(PACKAGE armadillo)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.300.8/README.txt 
new/armadillo-4.320.0/README.txt
--- old/armadillo-4.300.8/README.txt    2014-05-11 15:10:28.000000000 +0200
+++ new/armadillo-4.320.0/README.txt    2014-07-01 04:38:08.000000000 +0200
@@ -25,7 +25,7 @@
 
  6: Documentation / API Reference Manual
  
- 7: MEX Interface to Octave & Matlab
+ 7: MEX Interface to Octave
 
  8: Bug Reports and Frequently Asked Questions
 
@@ -407,10 +407,10 @@
 
 
 
-=== 7: MEX Interface to Octave & Matlab ===
+=== 7: MEX Interface to Octave ===
 
 The "mex_interface" folder contains examples of how to interface
-Octave and Matlab with C++ code that uses Armadillo matrices.
+Octave with C++ code that uses Armadillo matrices.
 
 
 
@@ -451,6 +451,7 @@
 Contributors:
 - Matthew Amidon
 - Eric R. Anderson
+- Kipton Barros
 - BenoƮt Bayol
 - Salim Bcoin
 - Justin Bedo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.300.8/build_aux/rpm/armadillo.spec 
new/armadillo-4.320.0/build_aux/rpm/armadillo.spec
--- old/armadillo-4.300.8/build_aux/rpm/armadillo.spec  2014-04-29 
07:23:58.000000000 +0200
+++ new/armadillo-4.320.0/build_aux/rpm/armadillo.spec  2014-07-02 
09:04:49.000000000 +0200
@@ -1,5 +1,5 @@
 Name:           armadillo
-Version:        4.300.0
+Version:        4.320.0
 Release:        1%{?dist}
 Summary:        Fast C++ matrix library with interfaces to LAPACK and ATLAS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.300.8/docs.html 
new/armadillo-4.320.0/docs.html
--- old/armadillo-4.300.8/docs.html     2014-05-19 08:33:48.000000000 +0200
+++ new/armadillo-4.320.0/docs.html     2014-07-02 09:00:14.000000000 +0200
@@ -114,7 +114,7 @@
   <tbody>
     <tr>
       <td style="text-align: left; vertical-align: top;">
-        <font size=+2><b>Reference for Armadillo 4.300</b></font>
+        <font size=+2><b>Reference for Armadillo 4.320</b></font>
         <br>
       </td>
       <td style="text-align: right; vertical-align: top;">
@@ -1642,7 +1642,7 @@
 Batch insertion constructors:
 <ul>
 <li>form&nbsp;1: sp_mat(<i>locations</i>, <i>values</i>, <i>sort_locations = 
true</i>)</li>
-<li>form&nbsp;2: sp_mat(<i>locations</i>, <i>values</i>, <i>n_rows</i>, 
<i>n_cols</i>, <i>sort_locations = true</i>)</li>
+<li>form&nbsp;2: sp_mat(<i>locations</i>, <i>values</i>, <i>n_rows</i>, 
<i>n_cols</i>, <i>sort_locations = true</i>, <i>check_for_zeros = true</i>)</li>
 <li>form&nbsp;3: sp_mat(<i>rowind</i>, <i>colptr</i>, <i>values</i>, 
<i>n_rows</i>, <i>n_cols</i>)</li>
 <br>
 <ul>
@@ -1678,6 +1678,10 @@
 <li>
 If <i>sort_locations</i> is set to <i>false</i>, the <i>locations</i> matrix 
is assumed to contain locations that are already sorted according to 
column-major ordering
 </li>
+<br>
+<li>
+If <i>check_for_zeros</i> is set to <i>false</i>, the <i>values</i> vector is 
assumed to contain no zero values
+</li>
 </ul>
 </ul>
 <br>
@@ -9228,12 +9232,15 @@
 <a name="eigs_sym"></a>
 <b>vec eigval = eigs_sym( X, k )</b>
 <br><b>vec eigval = eigs_sym( X, k, form )</b>
+<br><b>vec eigval = eigs_sym( X, k, form, tol )</b>
 <br>
 <br><b>eigs_sym( eigval, X, k )</b>
 <br><b>eigs_sym( eigval, X, k, form )</b>
+<br><b>eigs_sym( eigval, X, k, form, tol )</b>
 <br>
 <br><b>eigs_sym( eigval, eigvec, X, k )</b>
 <br><b>eigs_sym( eigval, eigvec, X, k, form )</b>
+<br><b>eigs_sym( eigval, eigvec, X, k, form, tol )</b>
 <ul>
 <li>Obtain a limited number of eigenvalues and eigenvectors of <b>sparse</b> 
symmetric real matrix <i>X</i></li>
 <br>
@@ -9252,6 +9259,10 @@
 </ul>
 </li>
 <br>
+<li>
+The argument <i>tol</i> is optional; it specifies the tolerance for convergence
+</li>
+<br>
 <li>The eigenvalues and corresponding eigenvectors are stored in <i>eigval</i> 
and <i>eigvec</i>, respectively</li>
 <br>
 <li>If <i>X</i> is not square, a <i>std::logic_error</i> exception is 
thrown</li>
@@ -9296,12 +9307,15 @@
 <a name="eigs_gen"></a>
 <b>cx_vec eigval = eigs_gen( X, k )</b>
 <br><b>cx_vec eigval = eigs_gen( X, k, form )</b>
+<br><b>cx_vec eigval = eigs_gen( X, k, form, tol )</b>
 <br>
 <br><b>eigs_gen( eigval, X, k )</b>
 <br><b>eigs_gen( eigval, X, k, form )</b>
+<br><b>eigs_gen( eigval, X, k, form, tol )</b>
 <br>
 <br><b>eigs_gen( eigval, eigvec, X, k )</b>
 <br><b>eigs_gen( eigval, eigvec, X, k, form )</b>
+<br><b>eigs_gen( eigval, eigvec, X, k, form, tol )</b>
 <ul>
 <li>
 Obtain a limited number of eigenvalues and eigenvectors of <b>sparse</b> 
general (non-symmetric/non-hermitian) square matrix <i>X</i>
@@ -9327,6 +9341,10 @@
 </li>
 <br>
 <li>
+The argument <i>tol</i> is optional; it specifies the tolerance for convergence
+</li>
+<br>
+<li>
 The eigenvalues and corresponding eigenvectors are stored in <i>eigval</i> and 
<i>eigvec</i>, respectively
 </li>
 <br>
@@ -12607,12 +12625,20 @@
 <br>
 <ul>
 
+<a name="added_in_4320"></a>
+<li>Added in 4.320:
+<ul>
+<li>expanded <a href="#eigs_sym">eigs_sym()</a> and <a 
href="#eigs_gen">eigs_gen()</a> to use an optional tolerance parameter</li>
+<li>expanded <a href="#eig_sym">eig_sym()</a> to automatically fall back to 
standard decomposition method if divide-and-conquer fails</li>
+<li>cmake-based installer enables use of C++11 random number generator when 
using gcc 4.8.3+ in C++11 mode</li>
+</ul>
+</li>
+<br>
 <a name="added_in_4300"></a>
 <li>Added in 4.300:
 <ul>
 <li>added <a href="#find_finite">find_finite()</a> and <a 
href="#find_nonfinite">find_nonfinite()</a></li>
 <li>expressions <i>X=<a href="#inv">inv</a>(A)*B*C</i> and <i>X=A<a 
href="#i_member">.i()</a>*B*C</i> are automatically converted to <i>X=<a 
href="#solve">solve</a>(A,B*C)</i></li>
-<li>cmake-based installer enables use of C++11 random number generator when 
using gcc 4.9+ in C++11 mode</li>
 </ul>
 </li>
 <br>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/Gen_bones.hpp 
new/armadillo-4.320.0/include/armadillo_bits/Gen_bones.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/Gen_bones.hpp  2013-08-01 
08:36:28.000000000 +0200
+++ new/armadillo-4.320.0/include/armadillo_bits/Gen_bones.hpp  2014-06-30 
09:35:37.000000000 +0200
@@ -1,5 +1,5 @@
-// Copyright (C) 2011-2013 Conrad Sanderson
-// Copyright (C) 2011-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-2014 Conrad Sanderson
+// Copyright (C) 2011-2014 NICTA (www.nicta.com.au)
 // 
 // 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
@@ -42,6 +42,8 @@
   inline void apply_inplace_minus(Mat<elem_type>& out) const;
   inline void apply_inplace_schur(Mat<elem_type>& out) const;
   inline void apply_inplace_div  (Mat<elem_type>& out) const;
+  
+  inline void apply(subview<elem_type>& out) const;
   };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/Gen_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/Gen_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/Gen_meat.hpp   2013-11-29 
07:48:03.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/Gen_meat.hpp   2014-06-30 
09:35:37.000000000 +0200
@@ -1,5 +1,5 @@
-// Copyright (C) 2011-2013 Conrad Sanderson
-// Copyright (C) 2011-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-2014 Conrad Sanderson
+// Copyright (C) 2011-2014 NICTA (www.nicta.com.au)
 // 
 // 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
@@ -306,5 +306,24 @@
 
 
 
+template<typename T1, typename gen_type>
+inline
+void
+Gen<T1, gen_type>::apply(subview<typename T1::elem_type>& out) const
+  {
+  arma_extra_debug_sigprint();
+  
+  // NOTE: we're assuming that the submatrix has the same dimensions as the 
Gen object
+  // this is checked by subview::operator=()
+  
+       if(is_same_type<gen_type, gen_ones_diag>::yes) { out.eye();   }
+  else if(is_same_type<gen_type, gen_ones_full>::yes) { out.ones();  }
+  else if(is_same_type<gen_type, gen_zeros    >::yes) { out.zeros(); }
+  else if(is_same_type<gen_type, gen_randu    >::yes) { out.randu(); }
+  else if(is_same_type<gen_type, gen_randn    >::yes) { out.randn(); }
+  }
+
+
+
 //! @}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/SpMat_bones.hpp 
new/armadillo-4.320.0/include/armadillo_bits/SpMat_bones.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/SpMat_bones.hpp        
2014-02-22 05:03:02.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/SpMat_bones.hpp        
2014-06-12 09:53:33.000000000 +0200
@@ -78,7 +78,7 @@
   #endif
   
   template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& 
locations, const Base<eT,T2>& values, const bool sort_locations = true);
-  template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& 
locations, const Base<eT,T2>& values, const uword n_rows, const uword n_cols, 
const bool sort_locations = true);
+  template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& 
locations, const Base<eT,T2>& values, const uword n_rows, const uword n_cols, 
const bool sort_locations = true, const bool check_for_zeros = true);
   
   template<typename T1, typename T2, typename T3> inline SpMat(const 
Base<uword,T1>& rowind, const Base<uword,T2>& colptr, const Base<eT,T3>& 
values, const uword n_rows, const uword n_cols);
   
@@ -518,8 +518,6 @@
   inline bool  empty() const;
   inline uword size()  const;
   
-  inline void remove_zeros();
-  
   /**
    * Resize memory.  You are responsible for updating the column pointers and
    * filling the new memory (if the new size is larger).  If the new size is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/SpMat_iterators_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/SpMat_iterators_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/SpMat_iterators_meat.hpp       
2013-02-21 08:16:35.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/SpMat_iterators_meat.hpp       
2014-07-02 05:44:32.000000000 +0200
@@ -382,7 +382,7 @@
     return;
     }
 
-  // We don't count zeroes in our position count, so we have to find the 
nonzero
+  // We don't count zeros in our position count, so we have to find the nonzero
   // value corresponding to the given initial position.  We assume initial_pos
   // is valid.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/SpMat_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/SpMat_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/SpMat_meat.hpp 2014-02-22 
16:07:03.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/SpMat_meat.hpp 2014-07-02 
05:44:32.000000000 +0200
@@ -224,15 +224,48 @@
   arma_debug_check( (vals.is_vec() == false),     "SpMat::SpMat(): given 
'values' object is not a vector"                  );
   arma_debug_check( (locs.n_rows != 2),           "SpMat::SpMat(): locations 
matrix must have two rows"                    );
   arma_debug_check( (locs.n_cols != vals.n_elem), "SpMat::SpMat(): number of 
locations is different than number of values" );
-  
+
   // If there are no elements in the list, max() will fail.
   if(locs.n_cols == 0)  { init(0, 0); return; }
   
-  // Automatically determine size
+  // Automatically determine size before pruning zeros.
   uvec bounds = arma::max(locs, 1);
   init(bounds[0] + 1, bounds[1] + 1);
   
-  init_batch(locs, vals, sort_locations);
+  // Ensure that there are no zeros
+  const uword N_old = vals.n_elem;
+        uword N_new = 0;
+  
+  for(uword i = 0; i < N_old; ++i)
+    {
+    if(vals[i] != eT(0))  { ++N_new; }
+    }
+  
+  if(N_new != N_old)
+    {
+    Col<eT>    filtered_vals(N_new);
+    Mat<uword> filtered_locs(2, N_new);
+    
+    uword index = 0;
+    for(uword i = 0; i < N_old; ++i)
+      {
+      if(vals[i] != eT(0))
+        {
+        filtered_vals[index] = vals[i];
+        
+        filtered_locs.at(0, index) = locs.at(0, i);
+        filtered_locs.at(1, index) = locs.at(1, i);
+        
+        ++index;
+        }
+      }
+    
+    init_batch(filtered_locs, filtered_vals, sort_locations);
+    }
+  else
+    {
+    init_batch(locs, vals, sort_locations);
+    }
   }
 
 
@@ -246,7 +279,7 @@
 template<typename eT>
 template<typename T1, typename T2>
 inline
-SpMat<eT>::SpMat(const Base<uword,T1>& locations_expr, const Base<eT,T2>& 
vals_expr, const uword in_n_rows, const uword in_n_cols, const bool 
sort_locations)
+SpMat<eT>::SpMat(const Base<uword,T1>& locations_expr, const Base<eT,T2>& 
vals_expr, const uword in_n_rows, const uword in_n_cols, const bool 
sort_locations, const bool check_for_zeros)
   : n_rows(0)
   , n_cols(0)
   , n_elem(0)
@@ -269,8 +302,48 @@
   arma_debug_check( (locs.n_cols != vals.n_elem), "SpMat::SpMat(): number of 
locations is different than number of values" );
   
   init(in_n_rows, in_n_cols);
-  
-  init_batch(locs, vals, sort_locations);
+
+  // Ensure that there are no zeros, unless the user asked not to.
+  if(check_for_zeros)
+    {
+    const uword N_old = vals.n_elem;
+          uword N_new = 0;
+    
+    for(uword i = 0; i < N_old; ++i)
+      {
+      if(vals[i] != eT(0))  { ++N_new; }
+      }
+    
+    if(N_new != N_old)
+      {
+      Col<eT>    filtered_vals(N_new);
+      Mat<uword> filtered_locs(2, N_new);
+      
+      uword index = 0;
+      for(uword i = 0; i < N_old; ++i)
+        {
+        if(vals[i] != eT(0))
+          {
+          filtered_vals[index] = vals[i];
+          
+          filtered_locs.at(0, index) = locs.at(0, i);
+          filtered_locs.at(1, index) = locs.at(1, i);
+          
+          ++index;
+          }
+        }
+      
+      init_batch(filtered_locs, filtered_vals, sort_locations);
+      }
+    else
+      {
+      init_batch(locs, vals, sort_locations);
+      }
+    }
+  else
+    {
+    init_batch(locs, vals, sort_locations);
+    }
   }
 
 
@@ -4108,68 +4181,6 @@
     {
     access::rw(col_ptrs[i + 1]) += col_ptrs[i];
     }
-  
-  remove_zeros();
-  }
-
-
-
-template<typename eT>
-inline
-void
-SpMat<eT>::remove_zeros()
-  {
-  arma_extra_debug_sigprint();
-  
-  uword zeros_count = 0;
-  
-  for(uword i=0; i<n_nonzero; ++i)
-    {
-    if(values[i] == eT(0))  { zeros_count++; }
-    }
-  
-  if(zeros_count == 0)
-    {
-    return;
-    }
-  
-  const uword actual_n_nonzero = n_nonzero - zeros_count;
-  
-  SpMat<eT> out(n_rows, n_cols);
-  
-  out.mem_resize(actual_n_nonzero);
-  
-  const SpMat<eT>& x = (*this);
-  
-  typename SpMat<eT>::const_iterator x_it  = x.begin();
-  typename SpMat<eT>::const_iterator x_end = x.end();
-  
-  uword cur_val = 0;
-  while(x_it != x_end)
-    {
-    const eT val = (*x_it);
-    
-    if(val != eT(0))
-      {
-      access::rw(out.values[cur_val])      = val;
-      access::rw(out.row_indices[cur_val]) = x_it.row();
-      
-      ++access::rw(out.col_ptrs[x_it.col() + 1]);
-      ++cur_val;
-      }
-    
-    ++x_it;
-    }
-  
-  const uword  out_n_cols   = out.n_cols;
-        uword* out_col_ptrs = access::rwp(out.col_ptrs);
-  
-  for(uword c = 1; c <= out_n_cols; ++c)
-    {
-    out_col_ptrs[c] += out_col_ptrs[c - 1];
-    }
-  
-  steal_mem(out);
   }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/arma_cmath.hpp 
new/armadillo-4.320.0/include/armadillo_bits/arma_cmath.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/arma_cmath.hpp 2013-12-21 
09:28:13.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/arma_cmath.hpp 2014-06-30 
12:19:17.000000000 +0200
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2013 Conrad Sanderson
-// Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2014 Conrad Sanderson
+// Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
 // 
 // 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
@@ -47,10 +47,9 @@
     }
   #else
     {
-    const bool x_is_inf = ( (x == x) && ((x - x) != float(0)) );
-    const bool x_is_nan = (x != x);
+    const float y = (std::numeric_limits<float>::max)();
     
-    return ( (x_is_inf == false) && (x_is_nan == false) );
+    return (x == x) && (x >= -y) && (x <= y);
     }
   #endif
   }
@@ -76,10 +75,9 @@
     }
   #else
     {
-    const bool x_is_inf = ( (x == x) && ((x - x) != double(0)) );
-    const bool x_is_nan = (x != x);
+    const double y = (std::numeric_limits<double>::max)();
     
-    return ( (x_is_inf == false) && (x_is_nan == false) );
+    return (x == x) && (x >= -y) && (x <= y);
     }
   #endif
   }
@@ -103,6 +101,72 @@
 
 
 
+// rudimentary wrappers for log1p()
+
+arma_inline
+float
+arma_log1p(const float x)
+  {
+  #if defined(ARMA_USE_CXX11)
+    {
+    return std::log1p(x);
+    }
+  #else
+    {
+    if((x >= float(0)) && (x < std::numeric_limits<float>::epsilon()))
+      {
+      return x;
+      }
+    else
+    if((x < float(0)) && (-x < std::numeric_limits<float>::epsilon()))
+      {
+      return x;
+      }
+    else
+      {
+      return std::log(float(1) + x);
+      }
+    }
+  #endif
+  }
+
+
+
+arma_inline
+double
+arma_log1p(const double x)
+  {
+  #if defined(ARMA_USE_CXX11)
+    {
+    return std::log1p(x);
+    }
+  #elif defined(ARMA_HAVE_LOG1P)
+    {
+    return log1p(x);
+    }
+  #else
+    {
+    if((x >= double(0)) && (x < std::numeric_limits<double>::epsilon()))
+      {
+      return x;
+      }
+    else
+    if((x < double(0)) && (-x < std::numeric_limits<double>::epsilon()))
+      {
+      return x;
+      }
+    else
+      {
+      return std::log(double(1) + x);
+      }
+    }
+  #endif
+  }
+
+
+
+
+
 //
 // wrappers for trigonometric functions
 // 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/arma_ostream_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/arma_ostream_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/arma_ostream_meat.hpp  
2014-02-10 06:33:09.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/arma_ostream_meat.hpp  
2014-06-24 08:32:17.000000000 +0200
@@ -732,7 +732,7 @@
   
   o.setf(ios::fixed);
   
-  o << S.n_rows << 'x' << S.n_cols << '\n';
+  o << S.n_rows << 'x' << S.n_cols;
   
   stream_state.restore(o);
   }
@@ -753,7 +753,7 @@
   
   o.setf(ios::fixed);
     
-  o << S.n_rows << 'x' << S.n_cols << 'x' << S.n_slices << '\n';
+  o << S.n_rows << 'x' << S.n_cols << 'x' << S.n_slices;
   
   stream_state.restore(o);
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/arma_version.hpp 
new/armadillo-4.320.0/include/armadillo_bits/arma_version.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/arma_version.hpp       
2014-06-01 04:44:40.000000000 +0200
+++ new/armadillo-4.320.0/include/armadillo_bits/arma_version.hpp       
2014-07-02 09:00:14.000000000 +0200
@@ -12,9 +12,9 @@
 
 
 #define ARMA_VERSION_MAJOR 4
-#define ARMA_VERSION_MINOR 300
-#define ARMA_VERSION_PATCH 8
-#define ARMA_VERSION_NAME  "Medieval Cornea Scraper"
+#define ARMA_VERSION_MINOR 320
+#define ARMA_VERSION_PATCH 0
+#define ARMA_VERSION_NAME  "Daintree Tea Raider"
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/diskio_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/diskio_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/diskio_meat.hpp        
2014-04-15 02:54:50.000000000 +0200
+++ new/armadillo-4.320.0/include/armadillo_bits/diskio_meat.hpp        
2014-06-24 15:50:17.000000000 +0200
@@ -3680,7 +3680,7 @@
 
       if(dataset >= 0)
         {
-        hid_t filespace = H5Dget_space(dataset);
+        hid_t filespace = arma_H5Dget_space(dataset);
 
         // This must be <= 3 due to our search rules.
         const int ndims = arma_H5Sget_simple_extent_ndims(filespace);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/fn_eig_sym.hpp 
new/armadillo-4.320.0/include/armadillo_bits/fn_eig_sym.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/fn_eig_sym.hpp 2014-02-06 
06:42:28.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/fn_eig_sym.hpp 2014-06-14 
05:18:27.000000000 +0200
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2013 Conrad Sanderson
-// Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2014 Conrad Sanderson
+// Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
 // Copyright (C) 2011 Stanislav Funiak
 // 
 // This Source Code Form is subject to the terms of the Mozilla Public
@@ -84,13 +84,25 @@
   arma_extra_debug_sigprint();
   arma_ignore(junk);
   
-  arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eig_sym(): eigval 
is an alias of eigvec" );
+  typedef typename T1::elem_type eT;
   
   const char sig = (method != NULL) ? method[0] : char(0);
   
-  arma_debug_check( ((sig != 's') && (sig != 'd')), "eig_sym(): unknown method 
specified" );
+  arma_debug_check( ((sig != 's') && (sig != 'd')),         "eig_sym(): 
unknown method specified"     );
+  arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eig_sym(): eigval 
is an alias of eigvec" );
+  
+  const Proxy<T1> P(X.get_ref());
+  
+  const bool is_alias = P.is_alias(eigvec);
+  
+  Mat<eT>  eigvec_tmp;
+  Mat<eT>& eigvec_out = (is_alias == false) ? eigvec : eigvec_tmp;
   
-  const bool status = (sig == 'd') ? auxlib::eig_sym_dc(eigval, eigvec, X) : 
auxlib::eig_sym(eigval, eigvec, X);
+  bool status = false;
+  
+  if(sig == 'd')       { status = auxlib::eig_sym_dc(eigval, eigvec_out, P.Q); 
}
+  
+  if(status == false)  { status = auxlib::eig_sym(eigval, eigvec_out, P.Q);    
}
   
   if(status == false)
     {
@@ -98,6 +110,10 @@
     eigvec.reset();
     arma_bad("eig_sym(): failed to converge", false);
     }
+  else
+    {
+    if(is_alias)  { eigvec.steal_mem(eigvec_tmp); }
+    }
   
   return status;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/fn_eigs_gen.hpp 
new/armadillo-4.320.0/include/armadillo_bits/fn_eigs_gen.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/fn_eigs_gen.hpp        
2014-02-08 09:18:07.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/fn_eigs_gen.hpp        
2014-07-01 04:36:22.000000000 +0200
@@ -20,6 +20,7 @@
   const SpBase<typename T1::elem_type, T1>& X,
   const uword                               n_eigvals,
   const char*                               form = "lm",
+  const typename T1::elem_type              tol  = 0.0,
   const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
   )
   {
@@ -31,7 +32,7 @@
   Mat< std::complex<T> > eigvec;
   Col< std::complex<T> > eigval;
   
-  const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form);
+  const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form, 
tol);
   
   if(status == false)
     {
@@ -54,6 +55,7 @@
   const SpBase<typename T1::elem_type, T1>&            X,
   const uword                                          n_eigvals,
   const char*                                          form = "lm",
+  const typename T1::pod_type                          tol  = 0.0,
   const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
   )
   {
@@ -64,7 +66,7 @@
   
   Mat< std::complex<T> > eigvec;
   
-  const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form);
+  const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form, 
tol);
   
   if(status == false)
     {
@@ -88,6 +90,7 @@
   const SpBase<typename T1::elem_type, T1>&          X,
   const uword                                        n_eigvals,
   const char*                                        form = "lm",
+  const typename T1::pod_type                        tol  = 0.0,
   const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
   )
   {
@@ -96,7 +99,7 @@
   
   arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eigs_gen(): 
eigval is an alias of eigvec" );
   
-  const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form);
+  const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form, 
tol);
   
   if(status == false)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/fn_eigs_sym.hpp 
new/armadillo-4.320.0/include/armadillo_bits/fn_eigs_sym.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/fn_eigs_sym.hpp        
2014-02-08 07:01:59.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/fn_eigs_sym.hpp        
2014-07-01 04:36:22.000000000 +0200
@@ -20,6 +20,7 @@
   const SpBase<typename T1::elem_type,T1>& X,
   const uword                              n_eigvals,
   const char*                              form = "lm",
+  const typename T1::elem_type             tol  = 0.0,
   const typename arma_real_only<typename T1::elem_type>::result* junk = 0
   )
   {
@@ -29,7 +30,7 @@
   Mat<typename T1::elem_type> eigvec;
   Col<typename T1::pod_type > eigval;
   
-  const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form);
+  const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form, 
tol);
   
   if(status == false)
     {
@@ -52,6 +53,7 @@
   const SpBase<typename T1::elem_type,T1>& X,
   const uword                              n_eigvals,
   const char*                              form = "lm",
+  const typename T1::elem_type             tol  = 0.0,
   const typename arma_real_only<typename T1::elem_type>::result* junk = 0
   )
   {
@@ -60,7 +62,7 @@
   
   Mat<typename T1::elem_type> eigvec;
   
-  const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form);
+  const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form, 
tol);
   
   if(status == false)
     {
@@ -84,6 +86,7 @@
   const SpBase<typename T1::elem_type,T1>& X,
   const uword                              n_eigvals,
   const char*                              form = "lm",
+  const typename T1::elem_type             tol  = 0.0,
   const typename arma_real_only<typename T1::elem_type>::result* junk = 0
   )
   {
@@ -92,7 +95,7 @@
   
   arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eigs_sym(): 
eigval is an alias of eigvec" );
   
-  const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form);
+  const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form, 
tol);
   
   if(status == false)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.300.8/include/armadillo_bits/fn_misc.hpp 
new/armadillo-4.320.0/include/armadillo_bits/fn_misc.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/fn_misc.hpp    2014-04-29 
16:12:41.000000000 +0200
+++ new/armadillo-4.320.0/include/armadillo_bits/fn_misc.hpp    2014-06-24 
07:48:53.000000000 +0200
@@ -113,11 +113,7 @@
     }
   else
     {
-    #if defined(ARMA_HAVE_LOG1P)
-      return (log_a + log1p(std::exp(negdelta)));
-    #else
-      return (log_a + std::log(1.0 + std::exp(negdelta)));
-    #endif
+    return (log_a + arma_log1p(std::exp(negdelta)));
     }
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/sp_auxlib_bones.hpp 
new/armadillo-4.320.0/include/armadillo_bits/sp_auxlib_bones.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/sp_auxlib_bones.hpp    
2014-02-28 06:25:49.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/sp_auxlib_bones.hpp    
2014-06-12 10:40:02.000000000 +0200
@@ -27,17 +27,17 @@
   // eigs_sym() via ARPACK
   
   template<typename eT, typename T1>
-  inline static bool eigs_sym(Col<eT>& eigval, Mat<eT>& eigvec, const 
SpBase<eT, T1>& X, const uword n_eigvals, const char* form_str);
+  inline static bool eigs_sym(Col<eT>& eigval, Mat<eT>& eigvec, const 
SpBase<eT, T1>& X, const uword n_eigvals, const char* form_str, const eT 
default_tol);
   
   
   //
   // eigs_gen() via ARPACK
   
   template<typename T, typename T1>
-  inline static bool eigs_gen(Col< std::complex<T> >& eigval, Mat< 
std::complex<T> >& eigvec, const SpBase<T, T1>& X, const uword n_eigvals, const 
char* form_str);
+  inline static bool eigs_gen(Col< std::complex<T> >& eigval, Mat< 
std::complex<T> >& eigvec, const SpBase<T, T1>& X, const uword n_eigvals, const 
char* form_str, const T default_tol);
   
   template<typename T, typename T1>
-  inline static bool eigs_gen(Col< std::complex<T> >& eigval, Mat< 
std::complex<T> >& eigvec, const SpBase< std::complex<T>, T1>& X, const uword 
n_eigvals, const char* form_str);
+  inline static bool eigs_gen(Col< std::complex<T> >& eigval, Mat< 
std::complex<T> >& eigvec, const SpBase< std::complex<T>, T1>& X, const uword 
n_eigvals, const char* form_str, const T default_tol);
   
   
   private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/sp_auxlib_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/sp_auxlib_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/sp_auxlib_meat.hpp     
2014-02-28 06:25:49.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/sp_auxlib_meat.hpp     
2014-06-12 10:40:02.000000000 +0200
@@ -48,7 +48,7 @@
 template<typename eT, typename T1>
 inline
 bool
-sp_auxlib::eigs_sym(Col<eT>& eigval, Mat<eT>& eigvec, const SpBase<eT, T1>& X, 
const uword n_eigvals, const char* form_str)
+sp_auxlib::eigs_sym(Col<eT>& eigval, Mat<eT>& eigvec, const SpBase<eT, T1>& X, 
const uword n_eigvals, const char* form_str, const eT default_tol)
   {
   arma_extra_debug_sigprint();
   
@@ -69,7 +69,7 @@
     arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "eigs_sym(): given 
sparse matrix is not square");
     
     // Make sure we aren't asking for every eigenvalue.
-    arma_debug_check( (n_eigvals >= p.get_n_rows()), "eigs_sym(): n_eigvals 
must be less than the number of rows in the matrix");
+    arma_debug_check( (n_eigvals + 1 >= p.get_n_rows()), "eigs_sym(): 
n_eigvals + 1 must be less than the number of rows in the matrix");
     
     // If the matrix is empty, the case is trivial.
     if(p.get_n_cols() == 0) // We already know n_cols == n_rows.
@@ -81,7 +81,7 @@
     
     // Set up variables that get used for neupd().
     blas_int n, ncv, ldv, lworkl, info;
-    eT tol;
+    eT tol = default_tol;
     podarray<eT> resid, v, workd, workl;
     podarray<blas_int> iparam, ipntr;
     podarray<eT> rwork; // Not used in this case.
@@ -138,7 +138,7 @@
 template<typename T, typename T1>
 inline
 bool
-sp_auxlib::eigs_gen(Col< std::complex<T> >& eigval, Mat< std::complex<T> >& 
eigvec, const SpBase<T, T1>& X, const uword n_eigvals, const char* form_str)
+sp_auxlib::eigs_gen(Col< std::complex<T> >& eigval, Mat< std::complex<T> >& 
eigvec, const SpBase<T, T1>& X, const uword n_eigvals, const char* form_str, 
const T default_tol)
   {
   arma_extra_debug_sigprint();
   
@@ -177,7 +177,7 @@
     arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "eigs_gen(): given 
sparse matrix is not square");
     
     // Make sure we aren't asking for every eigenvalue.
-    arma_debug_check( (n_eigvals >= p.get_n_rows()), "eigs_gen(): n_eigvals 
must be less than the number of rows in the matrix");
+    arma_debug_check( (n_eigvals + 1 >= p.get_n_rows()), "eigs_gen(): 
n_eigvals + 1 must be less than the number of rows in the matrix");
     
     // If the matrix is empty, the case is trivial.
     if(p.get_n_cols() == 0) // We already know n_cols == n_rows.
@@ -189,7 +189,7 @@
     
     // Set up variables that get used for neupd().
     blas_int n, ncv, ldv, lworkl, info;
-    T tol;
+    T tol = default_tol;
     podarray<T> resid, v, workd, workl;
     podarray<blas_int> iparam, ipntr;
     podarray<T> rwork; // Not used in the real case.
@@ -289,7 +289,7 @@
 template<typename T, typename T1>
 inline
 bool
-sp_auxlib::eigs_gen(Col< std::complex<T> >& eigval, Mat< std::complex<T> >& 
eigvec, const SpBase< std::complex<T>, T1>& X, const uword n_eigvals, const 
char* form_str)
+sp_auxlib::eigs_gen(Col< std::complex<T> >& eigval, Mat< std::complex<T> >& 
eigvec, const SpBase< std::complex<T>, T1>& X, const uword n_eigvals, const 
char* form_str, const T default_tol)
   {
   arma_extra_debug_sigprint();
   
@@ -328,7 +328,7 @@
     arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "eigs_gen(): given 
sparse matrix is not square");
     
     // Make sure we aren't asking for every eigenvalue.
-    arma_debug_check( (n_eigvals >= p.get_n_rows()), "eigs_gen(): n_eigvals 
must be less than the number of rows in the matrix");
+    arma_debug_check( (n_eigvals + 1 >= p.get_n_rows()), "eigs_gen(): 
n_eigvals + 1 must be less than the number of rows in the matrix");
     
     // If the matrix is empty, the case is trivial.
     if(p.get_n_cols() == 0) // We already know n_cols == n_rows.
@@ -340,7 +340,7 @@
     
     // Set up variables that get used for neupd().
     blas_int n, ncv, ldv, lworkl, info;
-    T tol;
+    T tol = default_tol;
     podarray< std::complex<T> > resid, v, workd, workl;
     podarray<blas_int> iparam, ipntr;
     podarray<T> rwork;
@@ -424,12 +424,13 @@
     n = p.get_n_rows(); // The size of the matrix.
     blas_int nev = n_eigvals;
     
-    tol = std::numeric_limits<eT>::epsilon(); // Machine epsilon as tolerance.
     resid.set_size(n);
     
     // "NCV must satisfy the two inequalities 2 <= NCV-NEV and NCV <= N".
     // "It is recommended that NCV >= 2 * NEV".
-    ncv = (2 * nev < n) ? 2 * nev : ((nev + 2 < n) ? nev + 2 : n);
+    ncv = 2 + nev;
+    if (ncv < 2 * nev) { ncv = 2 * nev; }
+    if (ncv > n)       { ncv = n; }
     v.set_size(n * ncv); // Array N by NCV (output).
     rwork.set_size(ncv); // Work array of size NCV for complex calls.
     ldv = n; // "Leading dimension of V exactly as declared in the calling 
program."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/subview_bones.hpp 
new/armadillo-4.320.0/include/armadillo_bits/subview_bones.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/subview_bones.hpp      
2013-11-07 15:01:27.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/subview_bones.hpp      
2014-06-30 09:35:37.000000000 +0200
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2013 Conrad Sanderson
-// Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2014 Conrad Sanderson
+// Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
 // Copyright (C)      2011 James Sanders
 // 
 // This Source Code Form is subject to the terms of the Mozilla Public
@@ -67,6 +67,10 @@
   inline void operator%= (const subview& x);
   inline void operator/= (const subview& x);
   
+  template<typename T1, typename gen_type>
+  inline typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, 
void>::result operator=(const Gen<T1,gen_type>& x);
+  
+  
   inline static void extract(Mat<eT>& out, const subview& in);
   
   inline static void  plus_inplace(Mat<eT>& out, const subview& in);
@@ -204,6 +208,9 @@
   template<typename T1>
   inline void operator= (const Base<eT,T1>& x);
   
+  template<typename T1, typename gen_type>
+  inline typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, 
void>::result operator=(const Gen<T1,gen_type>& x);
+  
   arma_inline const Op<subview_col<eT>,op_htrans>  t() const;
   arma_inline const Op<subview_col<eT>,op_htrans> ht() const;
   arma_inline const Op<subview_col<eT>,op_strans> st() const;
@@ -272,6 +279,9 @@
   template<typename T1>
   inline void operator= (const Base<eT,T1>& x);
   
+  template<typename T1, typename gen_type>
+  inline typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, 
void>::result operator=(const Gen<T1,gen_type>& x);
+  
   arma_inline const Op<subview_row<eT>,op_htrans>  t() const;
   arma_inline const Op<subview_row<eT>,op_htrans> ht() const;
   arma_inline const Op<subview_row<eT>,op_strans> st() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.300.8/include/armadillo_bits/subview_meat.hpp 
new/armadillo-4.320.0/include/armadillo_bits/subview_meat.hpp
--- old/armadillo-4.300.8/include/armadillo_bits/subview_meat.hpp       
2013-11-29 07:48:03.000000000 +0100
+++ new/armadillo-4.320.0/include/armadillo_bits/subview_meat.hpp       
2014-06-30 09:35:37.000000000 +0200
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2013 Conrad Sanderson
-// Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2014 Conrad Sanderson
+// Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
 // Copyright (C) 2011 James Sanders
 // Copyright (C) 2013 Ryan Curtin
 // 
@@ -1197,6 +1197,21 @@
 
 
 
+template<typename eT>
+template<typename T1, typename gen_type>
+inline
+typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, 
void>::result
+subview<eT>::operator= (const Gen<T1,gen_type>& in)
+  {
+  arma_extra_debug_sigprint();
+  
+  arma_debug_assert_same_size(n_rows, n_cols, in.n_rows, in.n_cols, "copy into 
submatrix");
+  
+  in.apply(*this);
+  }
+
+
+
 //! transform each element in the subview using a functor
 template<typename eT>
 template<typename functor>
@@ -2672,6 +2687,21 @@
 
 
 template<typename eT>
+template<typename T1, typename gen_type>
+inline
+typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, 
void>::result
+subview_col<eT>::operator= (const Gen<T1,gen_type>& in)
+  {
+  arma_extra_debug_sigprint();
+  
+  arma_debug_assert_same_size(subview<eT>::n_rows, uword(1), in.n_rows, 
(in.is_col ? uword(1) : in.n_cols), "copy into submatrix");
+  
+  in.apply(*this);
+  }
+
+
+
+template<typename eT>
 arma_inline
 const Op<subview_col<eT>,op_htrans>
 subview_col<eT>::t() const
@@ -3002,6 +3032,21 @@
   }
 
 
+
+template<typename eT>
+template<typename T1, typename gen_type>
+inline
+typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, 
void>::result
+subview_row<eT>::operator= (const Gen<T1,gen_type>& in)
+  {
+  arma_extra_debug_sigprint();
+  
+  arma_debug_assert_same_size(uword(1), subview<eT>::n_cols, (in.is_row ? 
uword(1) : in.n_rows), in.n_cols, "copy into submatrix");
+  
+  in.apply(*this);
+  }
+
+
 
 template<typename eT>
 arma_inline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.300.8/mex_interface/armaMex.hpp 
new/armadillo-4.320.0/mex_interface/armaMex.hpp
--- old/armadillo-4.300.8/mex_interface/armaMex.hpp     2014-01-04 
15:39:58.000000000 +0100
+++ new/armadillo-4.320.0/mex_interface/armaMex.hpp     2014-06-05 
03:52:25.000000000 +0200
@@ -1,5 +1,5 @@
 // Connector for Mex files to use Armadillo for calculation
-// Version 0.2
+// Version 0.3
 // 
 // Copyright (C) 2014 George Yammine
 // Copyright (C) 2014 Conrad Sanderson
@@ -470,8 +470,6 @@
     mwIndex *jc = mxGetJc(matlabMatrix);
     mwIndex *ir = mxGetIr(matlabMatrix);
 
-    mwIndex current_row_index;
-
     mwSize  m = mxGetM(matlabMatrix);
     mwSize  n = mxGetN(matlabMatrix);
     
@@ -479,10 +477,11 @@
 
     umat locations = zeros<umat>(2,non_zero);
     Col<Type> values = zeros< Col<Type> >(non_zero);
-
+    mwSize  row = 0;
+    
     for(mwSize col = 0; col < n ; col++) 
       {
-      mwSize  row = 0;
+
       mwIndex starting_row_index = jc[col]; 
       mwIndex stopping_row_index = jc[col+1]; 
       
@@ -493,7 +492,7 @@
         }
       else 
         {
-        for (current_row_index = starting_row_index; current_row_index < 
stopping_row_index; current_row_index++) 
+        for (mwIndex current_row_index = starting_row_index; current_row_index 
< stopping_row_index; current_row_index++) 
           {
           values[row]=pr[row];
           locations.at(0,row)=ir[current_row_index];
@@ -539,9 +538,11 @@
     umat locations = zeros<umat>(2,non_zero);
     Col<double> values = zeros< Col<double> >(non_zero);
 
+    mwSize  row = 0;
+     
     for(mwSize col = 0; col < n ; col++) 
       {
-      mwSize  row = 0;
+     
       mwIndex starting_row_index = jc[col]; 
       mwIndex stopping_row_index = jc[col+1]; 
       
@@ -552,7 +553,7 @@
         }
       else 
         {
-        for (mwIndex current_row_index = starting_row_index; current_row_index 
< stopping_row_index; current_row_index++) 
+        for (mwIndex current_row_index = starting_row_index; current_row_index 
< stopping_row_index ; current_row_index++) 
           {
           values[row]=pr[row];
           locations.at(0,row)=ir[current_row_index];
@@ -560,8 +561,8 @@
           row++;
           }
         }
+
       }
-    
     return SpMat<double>(locations, values, m, n, sort_locations);
     }
   }
@@ -598,10 +599,10 @@
 
     umat locations = zeros<umat>(2,non_zero);
     Col<Type> values = zeros< Col<Type> >(non_zero);
-
+    mwSize row = 0;
+    
     for(mwSize col = 0; col < n ; col++) 
       {
-      mwSize row = 0;
       mwIndex starting_row_index = jc[col]; 
       mwIndex stopping_row_index = jc[col+1]; 
       
@@ -657,10 +658,11 @@
 
     umat locations = zeros<umat>(2,non_zero);
     Col<double> values = zeros< Col<double> >(non_zero);
-
+     
+    mwSize row = 0;
+    
     for(mwSize col = 0; col < n ; col++) 
       {
-      mwSize row = 0;
       mwIndex starting_row_index = jc[col]; 
       mwIndex stopping_row_index = jc[col+1]; 
       
Files old/armadillo-4.300.8/mex_interface/armaMex_documentation.pdf and 
new/armadillo-4.320.0/mex_interface/armaMex_documentation.pdf differ

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to