This file is indexed.

/usr/share/doc/mathgl/mathgl_en/mathgl_en_54.html is in mathgl-doc-en 2.1.3.1-4ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual is for MathGL (version 2.1.2), a collection of classes and routines for scientific plotting. Please report any errors in this manual to mathgl.abalakin@gmail.org.

Copyright C 2008-2012 Alexey A. Balakin.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.  A copy of the license is included in the section entitled "GNU
Free Documentation License."


 -->
<!-- Created on December 22, 2013 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>MathGL 2.1.2: 6.3 Data resizing</title>

<meta name="description" content="MathGL 2.1.2: 6.3 Data resizing">
<meta name="keywords" content="MathGL 2.1.2: 6.3 Data resizing">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Data-resizing"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="mathgl_en_53.html#Data-constructor" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_55.html#Data-filling" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_51.html#Data-processing" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_51.html#Data-processing" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_65.html#MGL-scripts" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Data-resizing-1"></a>
<h2 class="section">6.3 Data resizing</h2>
<a name="index-Create"></a>
<a name="index-Rearrange"></a>
<a name="index-Extend"></a>
<a name="index-Transpose"></a>
<a name="index-Squeeze"></a>
<a name="index-Crop"></a>
<a name="index-Insert"></a>
<a name="index-Delete"></a>
<a name="index-Sort"></a>
<a name="index-Clean"></a>
<a name="index-Join"></a>

<dl>
<dt><a name="index-new-3"></a><u>MGL command:</u> <b>new</b><i> <small>DAT</small> [<code>nx=1 ny=1 nz=1</code>]</i></dt>
<dt><a name="index-Create-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Create</b><i> (<code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</i></dt>
<dt><a name="index-Create-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Create</b><i> (<code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005fcreate"></a><u>C function:</u> <code>void</code> <b>mgl_data_create</b><i> (<code>HMDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</i></dt>
<dt><a name="index-mgl_005fdatac_005fcreate"></a><u>C function:</u> <code>void</code> <b>mgl_datac_create</b><i> (<code>HADT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</i></dt>
<dd><p>Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters <var>mx</var>, <var>my</var>, <var>mz</var> is zero or negative.
</p></dd></dl>

<p><a name="rearrange"></a>
</p><dl>
<dt><a name="index-rearrange"></a><u>MGL command:</u> <b>rearrange</b><i> dat <code>mx [my=0 mz=0]</code></i></dt>
<dt><a name="index-Rearrange-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Rearrange</b><i> (<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>)</i></dt>
<dt><a name="index-Rearrange-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Rearrange</b><i> (<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005frearrange"></a><u>C function:</u> <code>void</code> <b>mgl_data_rearrange</b><i> (<code>HMDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</i></dt>
<dt><a name="index-mgl_005fdatac_005frearrange"></a><u>C function:</u> <code>void</code> <b>mgl_datac_rearrange</b><i> (<code>HADT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</i></dt>
<dd><p>Rearrange dimensions without changing data array so that resulting sizes should  be <var>mx</var>*<var>my</var>*<var>mz</var> &lt; nx*ny*nz. If some of parameter <var>my</var> or <var>mz</var> are zero then it will be selected to optimal fill of data array. For example, if <var>my</var>=0 then it will be change to <var>my</var>=nx*ny*nz/<var>mx</var> and <var>mz</var>=1.
</p></dd></dl>

<p><a name="transpose"></a>
</p><dl>
<dt><a name="index-transpose"></a><u>MGL command:</u> <b>transpose</b><i> dat ['dim'='yxz']</i></dt>
<dt><a name="index-Transpose-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Transpose</b><i> (<code>const char *</code>dim=<code>&quot;yx&quot;</code>)</i></dt>
<dt><a name="index-Transpose-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Transpose</b><i> (<code>const char *</code>dim=<code>&quot;yx&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005ftranspose"></a><u>C function:</u> <code>void</code> <b>mgl_data_transpose</b><i> (<code>HMDT</code> dat, <code>const char *</code>dim)</i></dt>
<dt><a name="index-mgl_005fdatac_005ftranspose"></a><u>C function:</u> <code>void</code> <b>mgl_datac_transpose</b><i> (<code>HADT</code> dat, <code>const char *</code>dim)</i></dt>
<dd><p>Transposes (shift order of) dimensions of the data. New order of dimensions is specified in string <var>dim</var>. This function can be useful also after reading of one-dimensional data.
</p></dd></dl>

<p><a name="extend"></a>
</p><dl>
<dt><a name="index-extend"></a><u>MGL command:</u> <b>extend</b><i> dat <code>n1 [n2=0]</code></i></dt>
<dt><a name="index-Extend-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Extend</b><i> (<code>int</code> n1, <code>int</code> n2=<code>0</code>)</i></dt>
<dt><a name="index-Extend-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Extend</b><i> (<code>int</code> n1, <code>int</code> n2=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005fextend"></a><u>C function:</u> <code>void</code> <b>mgl_data_extend</b><i> (<code>HMDT</code> dat, <code>int</code> n1, <code>int</code> n2)</i></dt>
<dt><a name="index-mgl_005fdatac_005fextend"></a><u>C function:</u> <code>void</code> <b>mgl_datac_extend</b><i> (<code>HADT</code> dat, <code>int</code> n1, <code>int</code> n2)</i></dt>
<dd><p>Increase the dimensions of the data by inserting new (|<var>n1</var>|+1)-th slices after (for <var>n1</var>&gt;0) or before (for <var>n1</var>&lt;0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter <var>n2</var>. Data to new slices is copy from existed one. For example, for <var>n1</var>&gt;0 new array will be
a_ij^new = a_i^old where j=0...<var>n1</var>. Correspondingly, for <var>n1</var>&lt;0 new array will be a_ij^new = a_j^old where i=0...|<var>n1</var>|.
</p></dd></dl>

<p><a name="squeeze"></a>
</p><dl>
<dt><a name="index-squeeze"></a><u>MGL command:</u> <b>squeeze</b><i> dat <code>rx [ry=1 rz=1 sm=off]</code></i></dt>
<dt><a name="index-Squeeze-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Squeeze</b><i> (<code>int</code> rx, <code>int</code> ry=<code>1</code>, <code>int</code> rz=<code>1</code>, <code>bool</code> smooth=<code>false</code>)</i></dt>
<dt><a name="index-Squeeze-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Squeeze</b><i> (<code>int</code> rx, <code>int</code> ry=<code>1</code>, <code>int</code> rz=<code>1</code>, <code>bool</code> smooth=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005fsqueeze"></a><u>C function:</u> <code>void</code> <b>mgl_data_squeeze</b><i> (<code>HMDT</code> dat, <code>int</code> rx, <code>int</code> ry, <code>int</code> rz, <code>int</code> smooth)</i></dt>
<dt><a name="index-mgl_005fdatac_005fsqueeze"></a><u>C function:</u> <code>void</code> <b>mgl_datac_squeeze</b><i> (<code>HADT</code> dat, <code>int</code> rx, <code>int</code> ry, <code>int</code> rz, <code>int</code> smooth)</i></dt>
<dd><p>Reduces the data size by excluding data elements which indexes are not divisible by <var>rx</var>, <var>ry</var>, <var>rz</var> correspondingly. Parameter <var>smooth</var> set to use smoothing
(i.e. out[i]=\sum_{j=i,i+r} a[j]/r) or not (i.e. out[i]=a[j*r]).
</p></dd></dl>

<p><a name="crop"></a>
</p><dl>
<dt><a name="index-crop"></a><u>MGL command:</u> <b>crop</b><i> dat <code>n1 n2</code> 'dir'</i></dt>
<dt><a name="index-Crop-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Crop</b><i> (<code>int</code> n1, <code>int</code> n2, <code>char</code> dir=<code>'x'</code>)</i></dt>
<dt><a name="index-Crop-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Crop</b><i> (<code>int</code> n1, <code>int</code> n2, <code>char</code> dir=<code>'x'</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005fcrop"></a><u>C function:</u> <code>void</code> <b>mgl_data_crop</b><i> (<code>HMDT</code> dat, <code>int</code> n1, <code>int</code> n2, <code>char</code> dir)</i></dt>
<dt><a name="index-mgl_005fdatac_005fcrop"></a><u>C function:</u> <code>void</code> <b>mgl_datac_crop</b><i> (<code>HADT</code> dat, <code>int</code> n1, <code>int</code> n2, <code>char</code> dir)</i></dt>
<dd><p>Cuts off edges of the data <var>i</var>&lt;<var>n1</var> and <var>i</var>&gt;<var>n2</var> if <var>n2</var>&gt;0 or <var>i</var>&gt;<code>n[xyz]</code>-<var>n2</var> if <var>n2</var>&lt;=0 along direction <var>dir</var>.
</p></dd></dl>

<p><a name="insert"></a>
</p><dl>
<dt><a name="index-insert"></a><u>MGL command:</u> <b>insert</b><i> dat 'dir' <code>[pos=off num=0]</code></i></dt>
<dt><a name="index-Insert-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Insert</b><i> (<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</i></dt>
<dt><a name="index-Insert-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Insert</b><i> (<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005finsert"></a><u>C function:</u> <code>void</code> <b>mgl_data_insert</b><i> (<code>HMDT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</i></dt>
<dt><a name="index-mgl_005fdatac_005finsert"></a><u>C function:</u> <code>void</code> <b>mgl_datac_insert</b><i> (<code>HADT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</i></dt>
<dd><p>Insert <var>num</var> slices along <var>dir</var>-direction at position <var>pos</var> and fill it by zeros.
</p></dd></dl>

<p><a name="delete"></a>
</p><dl>
<dt><a name="index-delete-1"></a><u>MGL command:</u> <b>delete</b><i> dat 'dir' <code>[pos=off num=0]</code></i></dt>
<dt><a name="index-Delete-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Delete</b><i> (<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</i></dt>
<dt><a name="index-Delete-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Delete</b><i> (<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005fdelete"></a><u>C function:</u> <code>void</code> <b>mgl_data_delete</b><i> (<code>HMDT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</i></dt>
<dt><a name="index-mgl_005fdatac_005fdelete"></a><u>C function:</u> <code>void</code> <b>mgl_datac_delete</b><i> (<code>HADT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</i></dt>
<dd><p>Delete <var>num</var> slices along <var>dir</var>-direction at position <var>pos</var>.
</p></dd></dl>

<p><a name="sort"></a>
</p><dl>
<dt><a name="index-sort"></a><u>MGL command:</u> <b>sort</b><i> dat <code>idx [idy=-1]</code></i></dt>
<dt><a name="index-Sort-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Sort</b><i> (<code>lond</code> idx, <code>long</code> idy=<code>-1</code>)</i></dt>
<dt><a name="index-mgl_005fdata_005fsort"></a><u>C function:</u> <code>void</code> <b>mgl_data_sort</b><i> (<code>HMDT</code> dat, <code>lond</code> idx, <code>long</code> idy)</i></dt>
<dd><p>Sort data rows (or slices in 3D case) by values of specified column <var>idx</var> (or cell {<var>idx</var>,<var>idy</var>} for 3D case). Note, this function is not thread safe!
</p></dd></dl>

<p><a name="clean"></a>
</p><dl>
<dt><a name="index-clean"></a><u>MGL command:</u> <b>clean</b><i> dat <code>idx</code></i></dt>
<dt><a name="index-Clean-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Clean</b><i> (<code>lond</code> idx)</i></dt>
<dt><a name="index-mgl_005fdata_005fclean"></a><u>C function:</u> <code>void</code> <b>mgl_data_clean</b><i> (<code>HMDT</code> dat, <code>lond</code> idx)</i></dt>
<dd><p>Delete rows which values are equal to next row for given column <var>idx</var>.
</p></dd></dl>

<p><a name="join"></a>
</p><dl>
<dt><a name="index-join"></a><u>MGL command:</u> <b>join</b><i> dat vdat</i></dt>
<dt><a name="index-Join-1"></a><u>Method on <code>mglData</code>:</u> <code>void</code> <b>Join</b><i> (<code>const mglDataA &amp;</code>vdat)</i></dt>
<dt><a name="index-Join-2"></a><u>Method on <code>mglDataC</code>:</u> <code>void</code> <b>Join</b><i> (<code>const mglDataA &amp;</code>vdat)</i></dt>
<dt><a name="index-mgl_005fdata_005fjoin"></a><u>C function:</u> <code>void</code> <b>mgl_data_join</b><i> (<code>HMDT</code> dat, <code>HCDT</code> vdat)</i></dt>
<dt><a name="index-mgl_005fdatac_005fjoin"></a><u>C function:</u> <code>void</code> <b>mgl_datac_join</b><i> (<code>HADT</code> dat, <code>HCDT</code> vdat)</i></dt>
<dd><p>Join data cells from <var>vdat</var> to <var>dat</var>. At this, function increase <var>dat</var> sizes according following: z-size for 3D data arrays arrays with equal x-,y-sizes; or y-size for 2D data arrays with equal x-sizes; or x-size otherwise.
</p></dd></dl>



<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="mathgl_en_53.html#Data-constructor" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_55.html#Data-filling" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_51.html#Data-processing" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_51.html#Data-processing" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_65.html#MGL-scripts" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>Build Daemon user</em> on <em>December 22, 2013</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
 </font>
 <br>

</p>
</body>
</html>