changeset 19233:3a6fd52e1458

liboctave/array/dim-vector.h: convert comments to doxygen
author Carnë Draug <carandraug@octave.org>
date Wed, 01 Oct 2014 19:36:05 +0100
parents 931cc13a6f3b
children 068a3e51b7b8
files liboctave/array/dim-vector.h
diffstat 1 files changed, 37 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/dim-vector.h	Wed Oct 01 10:58:03 2014 -0700
+++ b/liboctave/array/dim-vector.h	Wed Oct 01 19:36:05 2014 +0100
@@ -62,7 +62,7 @@
 
   octave_idx_type& count (void) const { return rep[-2]; }
 
-  // Construct a new rep with count = 1 and ndims given.
+  //! Construct a new rep with count = 1 and ndims given.
 
   static octave_idx_type *newrep (int ndims)
   {
@@ -74,7 +74,7 @@
     return r;
   }
 
-  // Clone this->rep.
+  //! Clone this->rep.
 
   octave_idx_type *clonerep (void)
   {
@@ -91,7 +91,7 @@
     return r;
   }
 
-  // Clone and resize this->rep to length n, filling by given value.
+  //! Clone and resize this->rep to length n, filling by given value.
 
   octave_idx_type *resizerep (int n, octave_idx_type fill_value)
   {
@@ -117,7 +117,7 @@
     return r;
   }
 
-  // Free the rep.
+  //! Free the rep.
 
   void freerep (void)
   {
@@ -337,9 +337,12 @@
     return (num_ones () == length ());
   }
 
-  // Return the number of elements that a matrix with this dimension
-  // vector would have, NOT the number of dimensions (elements in the
-  // dimension vector).
+  //! Number of elements that a matrix with this dimensions would have.
+   /*!
+      Return the number of elements that a matrix with this dimension
+      vector would have, NOT the number of dimensions (elements in the
+      dimension vector).
+  */
 
   octave_idx_type numel (int n = 0) const
   {
@@ -353,13 +356,15 @@
     return retval;
   }
 
-  // The following function will throw a std::bad_alloc ()
-  // exception if the requested size is larger than can be indexed by
-  // octave_idx_type. This may be smaller than the actual amount of
-  // memory that can be safely allocated on a system.  However, if we
-  // don't fail here, we can end up with a mysterious crash inside a
-  // function that is iterating over an array using octave_idx_type
-  // indices.
+   /*!
+      The following function will throw a std::bad_alloc ()
+      exception if the requested size is larger than can be indexed by
+      octave_idx_type. This may be smaller than the actual amount of
+      memory that can be safely allocated on a system.  However, if we
+      don't fail here, we can end up with a mysterious crash inside a
+      function that is iterating over an array using octave_idx_type
+      indices.
+  */
 
   octave_idx_type safe_numel (void) const;
 
@@ -377,18 +382,19 @@
 
   dim_vector squeeze (void) const;
 
-  // This corresponds to cat().
+  //! This corresponds to cat().
   bool concat (const dim_vector& dvb, int dim);
 
-  // This corresponds to [,] (horzcat, dim = 0) and [;] (vertcat, dim = 1).
+  //! This corresponds to [,] (horzcat, dim = 0) and [;] (vertcat, dim = 1).
   // The rules are more relaxed here.
   bool hvcat (const dim_vector& dvb, int dim);
 
-  // Force certain dimensionality, preserving numel ().  Missing
-  // dimensions are set to 1, redundant are folded into the trailing
-  // one.  If n = 1, the result is 2d and the second dim is 1
-  // (dim_vectors are always at least 2D).
-
+  /*!
+      Force certain dimensionality, preserving numel ().  Missing
+      dimensions are set to 1, redundant are folded into the trailing
+      one.  If n = 1, the result is 2d and the second dim is 1
+      (dim_vectors are always at least 2D).
+  */
   dim_vector redim (int n) const;
 
   dim_vector as_column (void) const
@@ -423,7 +429,7 @@
     return def;
   }
 
-  // Compute a linear index from an index tuple.
+  //! Compute a linear index from an index tuple.
 
   octave_idx_type compute_index (const octave_idx_type *idx) const
   {
@@ -434,7 +440,7 @@
     return k;
   }
 
-  // Ditto, but the tuple may be incomplete (nidx < length ()).
+  //! Ditto, but the tuple may be incomplete (nidx < length ()).
 
   octave_idx_type compute_index (const octave_idx_type *idx, int nidx) const
   {
@@ -445,9 +451,11 @@
     return k;
   }
 
-  // Increment a multi-dimensional index tuple, optionally starting
-  // from an offset position and return the index of the last index
-  // position that was changed, or length () if just cycled over.
+  /*/!
+      Increment a multi-dimensional index tuple, optionally starting
+      from an offset position and return the index of the last index
+      position that was changed, or length () if just cycled over.
+  */
 
   int increment_index (octave_idx_type *idx, int start = 0) const
   {
@@ -462,7 +470,7 @@
     return i;
   }
 
-  // Return cumulative dimensions.
+  //! Return cumulative dimensions.
 
   dim_vector cumulative (void) const
   {
@@ -476,8 +484,8 @@
     return retval;
   }
 
-  // Compute a linear index from an index tuple.  Dimensions are
-  // required to be cumulative.
+  //! Compute a linear index from an index tuple.  Dimensions are
+  //! required to be cumulative.
 
   octave_idx_type cum_compute_index (const octave_idx_type *idx) const
   {