changeset 5829:93785a1b0f97

[project @ 2006-05-23 18:34:10 by jwe]
author jwe
date Tue, 23 May 2006 18:34:10 +0000
parents 22e23bee74c8
children 0bb816a28335
files scripts/ChangeLog scripts/plot/mesh.m src/ChangeLog src/DLD-FUNCTIONS/cellfun.cc src/DLD-FUNCTIONS/eig.cc src/OPERATORS/op-int.h src/load-save.cc src/ov-intx.h
diffstat 8 files changed, 41 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Tue May 23 06:05:14 2006 +0000
+++ b/scripts/ChangeLog	Tue May 23 18:34:10 2006 +0000
@@ -1,3 +1,8 @@
+2006-05-23  John W. Eaton  <jwe@octave.org>
+
+	* plot/mesh.m: Use __gnupot_raw__ except where __gnuplot_set__ is
+	really needed.
+
 2006-05-22  John W. Eaton  <jwe@octave.org>
 
 	* scripts/general/lookup.m: New file from Octave Forge.
--- a/scripts/plot/mesh.m	Tue May 23 06:05:14 2006 +0000
+++ b/scripts/plot/mesh.m	Tue May 23 18:34:10 2006 +0000
@@ -74,9 +74,8 @@
         __gnuplot_raw__ ("set nologscale;\n");
         __gnuplot_set__ parametric;
         __gnuplot_raw__ ("set view 60, 30, 1, 1;\n");
-        __gnuplot_set__ palette defined ( 0 "dark-blue", 1 "blue", ...
-                  2 "cyan", 3 "yellow", 4 "red" , 5 "dark-red" )
-        __gnuplot_set__ nocolorbox
+        __gnuplot_raw__ ("set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n");
+        __gnuplot_raw__ ("set nocolorbox;\n");
         __gnuplot_splot__ zz with line palette;
         __gnuplot_set__ noparametric;
       else
--- a/src/ChangeLog	Tue May 23 06:05:14 2006 +0000
+++ b/src/ChangeLog	Tue May 23 18:34:10 2006 +0000
@@ -1,3 +1,16 @@
+2006-05-23  John W. Eaton  <jwe@octave.org>
+
+	* load-save.cc (Fsave): Use tellp instead of pubseekoff to
+	determine whether we are at beginning of file.
+
+	* ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::increment, 
+	OCTAVE_VALUE_INT_SCALAR_T::decrement,
+	OCTAVE_VALUE_INT_MATRIX_T::increment,
+	OCTAVE_VALUE_INT_MATRIX_T::decrement): New functions.
+	* OPERATORS/op-int.h (OCTAVE_INSTALL_M_INT_UNOPS,
+	OCTAVE_INSTALL_S_INT_UNOPS, OCTAVE_M_INT_UNOPS,
+	OCTAVE_S_INT_UNOPS): Uncomment increment and decrement ops.
+
 2006-05-19  John W. Eaton  <jwe@octave.org>
 
 	* symtab.cc (SYMBOL_DEF::document): If definition is a function,
--- a/src/DLD-FUNCTIONS/cellfun.cc	Tue May 23 06:05:14 2006 +0000
+++ b/src/DLD-FUNCTIONS/cellfun.cc	Tue May 23 18:34:10 2006 +0000
@@ -373,7 +373,7 @@
 @}\n\
 @end group\n\
 @end example\n\
-@seealso{num2cell,cell2mat\n\
+@seealso{num2cell, cell2mat}\n\
 @end deftypefn")
 {
   int nargin = args.length();
--- a/src/DLD-FUNCTIONS/eig.cc	Tue May 23 06:05:14 2006 +0000
+++ b/src/DLD-FUNCTIONS/eig.cc	Tue May 23 18:34:10 2006 +0000
@@ -42,6 +42,8 @@
 Schur decomposition, from which the eigenvalues are apparent.  The\n\
 eigenvectors, when desired, are computed by further manipulations of the\n\
 Schur decomposition.\n\
+\n\
+The eigenvalues returned by @code{eig} are not ordered.\n\
 @end deftypefn")
 {
   octave_value_list retval;
--- a/src/OPERATORS/op-int.h	Tue May 23 06:05:14 2006 +0000
+++ b/src/OPERATORS/op-int.h	Tue May 23 18:34:10 2006 +0000
@@ -103,8 +103,8 @@
   DEFUNOP_OP (s_transpose, TYPE ## _scalar, /* no-op */) \
   DEFUNOP_OP (s_hermitian, TYPE ## _scalar, /* no-op */) \
  \
-  /* DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) */ \
-  /* DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement) */
+  DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \
+  DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement)
 
 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2) \
   /* scalar by scalar ops. */ \
@@ -413,8 +413,8 @@
       return octave_value (v.TYPE ## _array_value().transpose ()); \
   } \
  \
-  /* DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) */ \
-  /* DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement) */
+  DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \
+  DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement)
 
 #define OCTAVE_MM_INT_ARITH_OPS(T1, T2) \
   /* matrix by matrix ops. */ \
@@ -527,8 +527,8 @@
   INSTALL_UNOP (op_transpose, octave_ ## TYPE ## _scalar, s_transpose); \
   INSTALL_UNOP (op_hermitian, octave_ ## TYPE ## _scalar, s_hermitian); \
  \
-  /* INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _scalar, s_incr); */ \
-  /* INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _scalar, s_decr); */
+  INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _scalar, s_incr); \
+  INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _scalar, s_decr);
 
 #define OCTAVE_INSTALL_SS_INT_ARITH_OPS(PFX, T1, T2) \
   INSTALL_BINOP (op_add, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _add); \
@@ -656,8 +656,8 @@
   INSTALL_UNOP (op_transpose, octave_ ## TYPE ## _matrix, m_transpose); \
   INSTALL_UNOP (op_hermitian, octave_ ## TYPE ## _matrix, m_transpose); \
  \
-  /* INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _matrix, m_incr); */ \
-  /* INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _matrix, m_decr); */
+  INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _matrix, m_incr); \
+  INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _matrix, m_decr);
 
 #define OCTAVE_INSTALL_MM_INT_ARITH_OPS(T1, T2) \
   INSTALL_BINOP (op_add, octave_ ## T1 ## _matrix, octave_ ## T2 ## _matrix, mm_add); \
--- a/src/load-save.cc	Tue May 23 06:05:14 2006 +0000
+++ b/src/load-save.cc	Tue May 23 18:34:10 2006 +0000
@@ -1681,9 +1681,7 @@
 
 	      if (file)
 		{
-		  bool write_header_info
-		    = ((file.rdbuf ())->pubseekoff (0, std::ios::cur)
-		       == static_cast<std::streampos> (0));
+		  bool write_header_info = ! file.tellp ();
 	      
 		  save_vars (argv, i, argc, file, format,
 			     save_as_floats, write_header_info);
@@ -1703,9 +1701,7 @@
 	  
 	      if (file)
 		{
-		  bool write_header_info
-		    = ((file.rdbuf ())->pubseekoff (0, std::ios::cur)
-		       == static_cast<std::streampos> (0));
+		  bool write_header_info = ! file.tellp ();
 	      
 		  save_vars (argv, i, argc, file, format,
 			     save_as_floats, write_header_info);
--- a/src/ov-intx.h	Tue May 23 06:05:14 2006 +0000
+++ b/src/ov-intx.h	Tue May 23 18:34:10 2006 +0000
@@ -136,6 +136,10 @@
     return retval;
   }
 
+  void increment (void) { matrix += 1; }
+
+  void decrement (void) { matrix -= 1; }
+
   idx_vector index_vector (void) const { return idx_vector (matrix); }
 
   int write (octave_stream& os, int block_size,
@@ -300,6 +304,10 @@
     return retval;
   }
 
+  void increment (void) { scalar += 1; }
+
+  void decrement (void) { scalar -= 1; }
+
   idx_vector index_vector (void) const { return idx_vector (scalar); }
 
   int write (octave_stream& os, int block_size,