diff src/DLD-FUNCTIONS/sparse.cc @ 8458:d254a21e0120

reimplement full as method of octave_base_value
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 12 Jan 2009 13:06:06 +0100
parents aaf2b6d6813c
children 6e9f26506804
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/sparse.cc
+++ b/src/DLD-FUNCTIONS/sparse.cc
@@ -349,46 +349,6 @@
    return retval;
 }
 
-DEFUN_DLD (full, args, ,
-    "-*- texinfo -*-\n\
-@deftypefn {Loadable Function} {@var{FM} =} full (@var{SM})\n\
- returns a full storage matrix from a sparse, diagonal, permutation matrix or a range.\n\
-@seealso{sparse}\n\
-@end deftypefn")
-{
-  octave_value retval;
-
-  if (args.length() < 1)
-    {
-      print_usage ();
-      return retval;
-    }
-
-  if (args(0).is_sparse_type ())
-    {
-      if (args(0).type_name () == "sparse matrix") 
-	retval = args(0).matrix_value ();
-      else if (args(0).type_name () == "sparse complex matrix")
-	retval = args(0).complex_matrix_value ();
-      else if (args(0).type_name () == "sparse bool matrix")
-	retval = args(0).bool_matrix_value ();
-    } 
-  else if (args(0).is_diag_matrix () || args(0).is_perm_matrix ())
-    {
-      octave_value_list idx;
-      idx(0) = idx(1) = ':';
-      retval = args(0).do_index_op (idx);
-    }
-  else if (args(0).is_range ())
-    retval = args(0).matrix_value ();
-  else if (args(0).is_matrix_type ())
-    retval = args(0);
-  else
-    gripe_wrong_type_arg ("full", args(0));
-
-  return retval;
-}
-
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***