Mercurial > hg > octave-jordi
diff src/data.cc @ 14360:97883071e8e4
doc: Correct off-by-1 spacings in all .cc docstrings
* __makeinfo__.m: Only remove space at beginning of new line for
docstrings from scripts/ directory where this is the convention.
* besselj.cc, betainc.cc, cellfun.cc, dot.cc, fftw.cc, filter.cc, find.cc,
gammainc.cc, gcd.cc, givens.cc, hex2num.cc, kron.cc, lu.cc, max.cc, qr.cc,
quadcc.cc, qz.cc, regexp.cc, strfind.cc, sub2ind.cc, syl.cc, time.cc,
typecast.cc, urlwrite.cc, data.cc, dirfns.cc, file-io.cc, help.cc,
load-path.cc, mappers.cc, oct-parse.yy, ov-base.cc, ov-cell.cc, ov-struct.cc,
ov.cc, pr-output.cc, pt-mat.cc, strfns.cc, syscalls.cc, variables.cc:
Improve appearance of docstring spacing of @example code.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 13 Feb 2012 07:42:56 -0800 |
parents | 2ced2f59f523 |
children | 8de863b7126b |
line wrap: on
line diff
--- a/src/data.cc +++ b/src/data.cc @@ -119,7 +119,7 @@ @example\n\ @group\n\ all ([2, 3; 1, 0]))\n\ - @result{} [ 1, 0 ]\n\ + @result{} [ 1, 0 ]\n\ @end group\n\ @end example\n\ \n\ @@ -168,7 +168,7 @@ @example\n\ @group\n\ any (eye (2, 4))\n\ - @result{} [ 1, 1, 0, 0 ]\n\ + @result{} [ 1, 1, 0, 0 ]\n\ @end group\n\ @end example\n\ \n\ @@ -178,7 +178,7 @@ @example\n\ @group\n\ any (eye (2, 4), 2)\n\ - @result{} [ 1; 1 ]\n\ + @result{} [ 1; 1 ]\n\ @end group\n\ @end example\n\ @seealso{all}\n\ @@ -365,8 +365,8 @@ \n\ @example\n\ @group\n\ - hypot (hypot (@var{x}, @var{y}), @var{z})\n\ - hypot (hypot (hypot (@var{x}, @var{y}), @var{z}), @var{w}), etc.\n\ +hypot (hypot (@var{x}, @var{y}), @var{z})\n\ +hypot (hypot (hypot (@var{x}, @var{y}), @var{z}), @var{w}), etc.\n\ @end group\n\ @end example\n\ @end deftypefn") @@ -1256,10 +1256,10 @@ @example\n\ @group\n\ diag ([1, 2, 3], 1)\n\ - @result{} 0 1 0 0\n\ - 0 0 2 0\n\ - 0 0 0 3\n\ - 0 0 0 0\n\ + @result{} 0 1 0 0\n\ + 0 0 2 0\n\ + 0 0 0 3\n\ + 0 0 0 0\n\ @end group\n\ @end example\n\ \n\ @@ -1866,7 +1866,7 @@ new matrices. For example:\n\ \n\ @example\n\ -@var{hcat} = [ @var{array1}, @var{array2}, @dots{} ];\n\ +@var{hcat} = [ @var{array1}, @var{array2}, @dots{} ]\n\ @end example\n\ @seealso{cat, vertcat}\n\ @end deftypefn") @@ -2075,7 +2075,7 @@ new matrices. For example:\n\ \n\ @example\n\ -@var{vcat} = [ @var{array1}; @var{array2}; @dots{} ];\n\ +@var{vcat} = [ @var{array1}; @var{array2}; @dots{} ]\n\ @end example\n\ @seealso{cat, horzcat}\n\ @end deftypefn") @@ -2100,17 +2100,17 @@ A = ones (2, 2);\n\ B = zeros (2, 2);\n\ cat (2, A, B)\n\ - @result{} 1 1 0 0\n\ - 1 1 0 0\n\ + @result{} 1 1 0 0\n\ + 1 1 0 0\n\ @end group\n\ @end example\n\ \n\ Alternatively, we can concatenate @var{A} and @var{B} along the\n\ -second dimension the following way:\n\ +second dimension in the following way:\n\ \n\ @example\n\ @group\n\ -[A, B].\n\ +[A, B]\n\ @end group\n\ @end example\n\ \n\ @@ -2121,16 +2121,15 @@ @example\n\ @group\n\ cat (4, ones (2, 2), zeros (2, 2))\n\ - @result{} ans =\n\ -\n\ - ans(:,:,1,1) =\n\ -\n\ - 1 1\n\ - 1 1\n\ -\n\ - ans(:,:,1,2) =\n\ - 0 0\n\ - 0 0\n\ + @result{} ans(:,:,1,1) =\n\ +\n\ + 1 1\n\ + 1 1\n\ +\n\ + ans(:,:,1,2) =\n\ +\n\ + 0 0\n\ + 0 0\n\ @end group\n\ @end example\n\ @seealso{horzcat, vertcat}\n\ @@ -2386,8 +2385,8 @@ \n\ @example\n\ @group\n\ - ndims (ones (4, 1, 2, 1))\n\ - @result{} 3\n\ +ndims (ones (4, 1, 2, 1))\n\ + @result{} 3\n\ @end group\n\ @end example\n\ @end deftypefn") @@ -2411,16 +2410,16 @@ return the number of elements that would result from the indexing\n\ \n\ @example\n\ - @var{a}(@var{idx1}, @var{idx2}, @dots{})\n\ +@var{a}(@var{idx1}, @var{idx2}, @dots{})\n\ @end example\n\ \n\ Note that the indices do not have to be numerical. For example,\n\ \n\ @example\n\ @group\n\ - @var{a} = 1;\n\ - @var{b} = ones (2, 3);\n\ - numel (@var{a}, @var{b});\n\ +@var{a} = 1;\n\ +@var{b} = ones (2, 3);\n\ +numel (@var{a}, @var{b})\n\ @end group\n\ @end example\n\ \n\ @@ -2463,11 +2462,11 @@ @example\n\ @group\n\ size ([1, 2; 3, 4; 5, 6])\n\ - @result{} [ 3, 2 ]\n\ + @result{} [ 3, 2 ]\n\ \n\ [nr, nc] = size ([1, 2; 3, 4; 5, 6])\n\ - @result{} nr = 3\n\ - @result{} nc = 2\n\ + @result{} nr = 3\n\ + @result{} nc = 2\n\ @end group\n\ @end example\n\ \n\ @@ -2477,7 +2476,7 @@ @example\n\ @group\n\ size ([1, 2; 3, 4; 5, 6], 2)\n\ - @result{} 2\n\ + @result{} 2\n\ @end group\n\ @end example\n\ \n\ @@ -2650,31 +2649,32 @@ "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sum (@var{x})\n\ @deftypefnx {Built-in Function} {} sum (@var{x}, @var{dim})\n\ -@deftypefnx {Built-in Function} {} sum (@dots{}, 'native')\n\ -@deftypefnx {Built-in Function} {} sum (@dots{}, 'double')\n\ -@deftypefnx {Built-in Function} {} sum (@dots{}, 'extra')\n\ +@deftypefnx {Built-in Function} {} sum (@dots{}, \"native\")\n\ +@deftypefnx {Built-in Function} {} sum (@dots{}, \"double\")\n\ +@deftypefnx {Built-in Function} {} sum (@dots{}, \"extra\")\n\ Sum of elements along dimension @var{dim}. If @var{dim} is\n\ omitted, it defaults to the first non-singleton dimension.\n\ \n\ -If the optional argument 'native' is given, then the sum is performed\n\ +If the optional argument \"native\" is given, then the sum is performed\n\ in the same type as the original argument, rather than in the default\n\ double type. For example:\n\ \n\ @example\n\ @group\n\ sum ([true, true])\n\ - @result{} 2\n\ -sum ([true, true], 'native')\n\ - @result{} true\n\ + @result{} 2\n\ +sum ([true, true], \"native\")\n\ + @result{} true\n\ @end group\n\ @end example\n\ \n\ -On the contrary, if 'double' is given, the sum is performed in double\n\ +On the contrary, if \"double\" is given, the sum is performed in double\n\ precision even for single precision inputs.\n\ \n\ -For double precision inputs, 'extra' indicates that a more accurate algorithm\n\ -than straightforward summation is to be used. For single precision inputs,\n\ -'extra' is the same as 'double'. Otherwise, 'extra' has no effect.\n\ +For double precision inputs, \"extra\" indicates that a more accurate\n\ +algorithm than straightforward summation is to be used. For single precision\n\ +inputs, \"extra\" is the same as \"double\". Otherwise, \"extra\" has no\n\ +effect.\n\ @seealso{cumsum, sumsq, prod}\n\ @end deftypefn") { @@ -3010,8 +3010,7 @@ @example\n\ @group\n\ complex ([1, 2], [3, 4])\n\ -@result{}\n\ - 1 + 3i 2 + 4i\n\ + @result{} [ 1 + 3i 2 + 4i ]\n\ @end group\n\ @end example\n\ @seealso{real, imag, iscomplex}\n\ @@ -3944,9 +3943,8 @@ \n\ @example\n\ @group\n\ -[1/0 e^800]\n\ -@result{}\n\ -Inf Inf\n\ +[ 1/0 e^800 ]\n\ +@result{} Inf Inf\n\ @end group\n\ @end example\n\ \n\ @@ -4539,9 +4537,9 @@ @example\n\ @group\n\ eye (3)\n\ - @result{} 1 0 0\n\ - 0 1 0\n\ - 0 0 1\n\ + @result{} 1 0 0\n\ + 0 1 0\n\ + 0 0 1\n\ @end group\n\ @end example\n\ \n\ @@ -4783,7 +4781,7 @@ In other words, the statement\n\ \n\ @example\n\ - y = resize (x, dv);\n\ +y = resize (x, dv)\n\ @end example\n\ \n\ @noindent\n\ @@ -4791,10 +4789,12 @@ \n\ @example\n\ @group\n\ - y = zeros (dv, class (x));\n\ - sz = min (dv, size (x));\n\ - for i = 1:length (sz), idx@{i@} = 1:sz(i); endfor\n\ - y(idx@{:@}) = x(idx@{:@});\n\ +y = zeros (dv, class (x));\n\ +sz = min (dv, size (x));\n\ +for i = 1:length (sz)\n\ + idx@{i@} = 1:sz(i);\n\ +endfor\n\ +y(idx@{:@}) = x(idx@{:@});\n\ @end group\n\ @end example\n\ \n\ @@ -4873,8 +4873,8 @@ @example\n\ @group\n\ reshape ([1, 2, 3, 4], 2, 2)\n\ - @result{} 1 3\n\ - 2 4\n\ + @result{} 1 3\n\ + 2 4\n\ @end group\n\ @end example\n\ \n\ @@ -5436,7 +5436,7 @@ cumulatively from left to right:\n\ \n\ @example\n\ - (@dots{}((x1 + x2) + x3) + @dots{})\n\ +(@dots{}((x1 + x2) + x3) + @dots{})\n\ @end example\n\ \n\ At least one argument is required.\n\ @@ -5467,7 +5467,7 @@ cumulatively from left to right:\n\ \n\ @example\n\ - (@dots{}((x1 * x2) * x3) * @dots{})\n\ +(@dots{}((x1 * x2) * x3) * @dots{})\n\ @end example\n\ \n\ At least one argument is required.\n\ @@ -5579,7 +5579,7 @@ cumulatively from left to right:\n\ \n\ @example\n\ - (@dots{}((x1 .* x2) .* x3) .* @dots{})\n\ +(@dots{}((x1 .* x2) .* x3) .* @dots{})\n\ @end example\n\ \n\ At least one argument is required.\n\ @@ -5638,7 +5638,7 @@ cumulatively from left to right:\n\ \n\ @example\n\ - (@dots{}((x1 & x2) & x3) & @dots{})\n\ +(@dots{}((x1 & x2) & x3) & @dots{})\n\ @end example\n\ \n\ At least one argument is required.\n\ @@ -5659,7 +5659,7 @@ cumulatively from left to right:\n\ \n\ @example\n\ - (@dots{}((x1 | x2) | x3) | @dots{})\n\ +(@dots{}((x1 | x2) | x3) | @dots{})\n\ @end example\n\ \n\ At least one argument is required.\n\ @@ -5698,7 +5698,7 @@ @example\n\ @group\n\ t = tic; sleep (5); (double (tic ()) - double (t)) * 1e-6\n\ - @result{} 5\n\ + @result{} 5\n\ @end group\n\ @end example\n\ \n\ @@ -5860,9 +5860,9 @@ @example\n\ @group\n\ sort ([1, 2; 2, 3; 3, 1])\n\ - @result{} 1 1\n\ - 2 2\n\ - 3 3\n\ + @result{} 1 1\n\ + 2 2\n\ + 3 3\n\ @end group\n\ @end example\n\ \n\ @@ -5878,12 +5878,12 @@ @example\n\ @group\n\ [s, i] = sort ([1, 2; 2, 3; 3, 1])\n\ - @result{} s = 1 1\n\ - 2 2\n\ - 3 3\n\ - @result{} i = 1 3\n\ - 2 1\n\ - 3 2\n\ + @result{} s = 1 1\n\ + 2 2\n\ + 3 3\n\ + @result{} i = 1 3\n\ + 2 1\n\ + 3 2\n\ @end group\n\ @end example\n\ \n\ @@ -5896,9 +5896,9 @@ @example\n\ @group\n\ sort ([1+i; 1; 1-i])\n\ - @result{} 1 + 0i\n\ - 1 - 1i\n\ - 1 + 1i\n\ + @result{} 1 + 0i\n\ + 1 - 1i\n\ + 1 + 1i\n\ @end group\n\ @end example\n\ \n\