This file is indexed.

/usr/share/gtk-doc/html/libgwyddion/libgwyddion-Math.html is in libgwyddion20-doc 2.34-3ubuntu1.

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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gwyddion Library Reference Manual: Math</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="prev" href="libgwyddion-gwyentities.html" title="gwyentities">
<link rel="next" href="libgwyddion-Math-Fallback.html" title="Math Fallback">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left">
<a href="#" class="shortcut">Top</a>
                   | 
                  <a href="#libgwyddion-Math.description" class="shortcut">Description</a>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="libgwyddion-gwyentities.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgwyddion-Math-Fallback.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgwyddion-Math"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwyddion-Math.top_of_page"></a>Math</span></h2>
<p>Math — Mathematical utility functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgwyddion-Math.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgwyddion/gwyddion.h&gt;

#define             <a class="link" href="libgwyddion-Math.html#ROUND:CAPS" title="ROUND()">ROUND</a>                               (x)
#define             <a class="link" href="libgwyddion-Math.html#GWY-ROUND:CAPS" title="GWY_ROUND()">GWY_ROUND</a>                           (x)
#define             <a class="link" href="libgwyddion-Math.html#GWY-SQRT3:CAPS" title="GWY_SQRT3">GWY_SQRT3</a>
#define             <a class="link" href="libgwyddion-Math.html#GWY-SQRT-PI:CAPS" title="GWY_SQRT_PI">GWY_SQRT_PI</a>
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="libgwyddion-Math.html#gwy-math-humanize-numbers" title="gwy_math_humanize_numbers ()">gwy_math_humanize_numbers</a>           (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> unit</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> maximum</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *precision</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgwyddion-Math.html#gwy-math-is-in-polygon" title="gwy_math_is_in_polygon ()">gwy_math_is_in_polygon</a>              (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> y</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *poly</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="libgwyddion-Math.html#gwy-math-find-nearest-line" title="gwy_math_find_nearest_line ()">gwy_math_find_nearest_line</a>          (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> y</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *d2min</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coords</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *metric</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="libgwyddion-Math.html#gwy-math-find-nearest-point" title="gwy_math_find_nearest_point ()">gwy_math_find_nearest_point</a>         (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> y</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *d2min</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coords</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *metric</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *           <a class="link" href="libgwyddion-Math.html#gwy-math-lin-solve" title="gwy_math_lin_solve ()">gwy_math_lin_solve</a>                  (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *result</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *           <a class="link" href="libgwyddion-Math.html#gwy-math-lin-solve-rewrite" title="gwy_math_lin_solve_rewrite ()">gwy_math_lin_solve_rewrite</a>          (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *result</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgwyddion-Math.html#gwy-math-tridiag-solve-rewrite" title="gwy_math_tridiag_solve_rewrite ()">gwy_math_tridiag_solve_rewrite</a>      (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *d</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *a</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *b</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *           <a class="link" href="libgwyddion-Math.html#gwy-math-fit-polynom" title="gwy_math_fit_polynom ()">gwy_math_fit_polynom</a>                (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ndata</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *xdata</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *ydata</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coeffs</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgwyddion-Math.html#gwy-math-choleski-decompose" title="gwy_math_choleski_decompose ()">gwy_math_choleski_decompose</a>         (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *matrix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwyddion-Math.html#gwy-math-choleski-solve" title="gwy_math_choleski_solve ()">gwy_math_choleski_solve</a>             (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *decomp</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="libgwyddion-Math.html#gwy-math-curvature" title="gwy_math_curvature ()">gwy_math_curvature</a>                  (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coeffs</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *kappa1</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *kappa2</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *phi1</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *phi2</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *xc</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *yc</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *zc</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="libgwyddion-Math.html#gwy-math-median" title="gwy_math_median ()">gwy_math_median</a>                     (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *array</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwyddion-Math.html#gwy-math-sort" title="gwy_math_sort ()">gwy_math_sort</a>                       (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *array</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="libgwyddion-Math.html#gwy-math-median-uncertainty" title="gwy_math_median_uncertainty ()">gwy_math_median_uncertainty</a>         (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *array</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *uarray</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgwyddion-Math.description"></a><h2>Description</h2>
<p>
Functions <code class="function">gwy_math_SI_prefix()</code> and <a class="link" href="libgwyddion-Math.html#gwy-math-humanize-numbers" title="gwy_math_humanize_numbers ()"><code class="function">gwy_math_humanize_numbers()</code></a> deal with
number representation.
</p>
<p>
Nearest object finding functions <a class="link" href="libgwyddion-Math.html#gwy-math-find-nearest-line" title="gwy_math_find_nearest_line ()"><code class="function">gwy_math_find_nearest_line()</code></a> and
<a class="link" href="libgwyddion-Math.html#gwy-math-find-nearest-point" title="gwy_math_find_nearest_point ()"><code class="function">gwy_math_find_nearest_point()</code></a> can be useful in widget and vector layer
implementation.
</p>
<p>
And <a class="link" href="libgwyddion-Math.html#gwy-math-lin-solve" title="gwy_math_lin_solve ()"><code class="function">gwy_math_lin_solve()</code></a>, <a class="link" href="libgwyddion-Math.html#gwy-math-lin-solve-rewrite" title="gwy_math_lin_solve_rewrite ()"><code class="function">gwy_math_lin_solve_rewrite()</code></a>, and
<a class="link" href="libgwyddion-Math.html#gwy-math-fit-polynom" title="gwy_math_fit_polynom ()"><code class="function">gwy_math_fit_polynom()</code></a> are general purpose numeric methods.
</p>
</div>
<div class="refsect1">
<a name="libgwyddion-Math.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="ROUND:CAPS"></a><h3>ROUND()</h3>
<pre class="programlisting">#define ROUND(x) ((gint)floor((x) + 0.5))
</pre>
<div class="warning">
<h3 class="title">Warning</h3>
<p><code class="literal">ROUND</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Rounds a number to nearest integer.  Use <a class="link" href="libgwyddion-Math.html#GWY-ROUND:CAPS" title="GWY_ROUND()"><code class="literal">GWY_ROUND</code></a> instead.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>A double value.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GWY-ROUND:CAPS"></a><h3>GWY_ROUND()</h3>
<pre class="programlisting">#define GWY_ROUND(x) ((gint)floor((x) + 0.5))
</pre>
<p>
Rounds a number to nearest integer.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>A double value.</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.5</p>
</div>
<hr>
<div class="refsect2">
<a name="GWY-SQRT3:CAPS"></a><h3>GWY_SQRT3</h3>
<pre class="programlisting">#define GWY_SQRT3 1.73205080756887729352744634150587236694280525381038
</pre>
<p>
The square root of 3.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GWY-SQRT-PI:CAPS"></a><h3>GWY_SQRT_PI</h3>
<pre class="programlisting">#define GWY_SQRT_PI 1.77245385090551602729816748334114518279754945612237
</pre>
<p>
The square root of pi.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-humanize-numbers"></a><h3>gwy_math_humanize_numbers ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             gwy_math_humanize_numbers           (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> unit</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> maximum</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *precision</code></em>);</pre>
<p>
Finds a human-friendly representation for a range of numbers.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit</code></em> :</span></p></td>
<td>The smallest possible step.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>maximum</code></em> :</span></p></td>
<td>The maximum possible value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>precision</code></em> :</span></p></td>
<td>A location to store <code class="function">printf()</code> precession, if not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The magnitude i.e., a power of 1000.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-is-in-polygon"></a><h3>gwy_math_is_in_polygon ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gwy_math_is_in_polygon              (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> y</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *poly</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
Establishes wether the test point <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> is inside the polygon <em class="parameter"><code>poly</code></em>.
The polygon can be defined either clockwise or anti-clockwise and
can be a concave, convex or self-intersecting polygon.
</p>
<p>
</p>
<div class="warning">
<h3 class="title">Warning</h3> Result can be either TRUE or FALSE if the test point
is *exactly* on an edge. </div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>The x coordinate of the test point.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>The y coordinate of the test point.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>poly</code></em> :</span></p></td>
<td>An array of coordinate pairs (points) that define a
polygon.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The number of corners of the polygon.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if the test point is inside poly and FALSE otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.7</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-find-nearest-line"></a><h3>gwy_math_find_nearest_line ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gwy_math_find_nearest_line          (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> y</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *d2min</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coords</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *metric</code></em>);</pre>
<p>
Finds the line from <em class="parameter"><code>coords</code></em> nearest to the point (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X-coordinate of the point to search.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y-coordinate of the point to search.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>d2min</code></em> :</span></p></td>
<td>Where to store the squared minimal distance, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The number of lines (i.e. <em class="parameter"><code>coords</code></em> has 4<em class="parameter"><code>n</code></em> items).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coords</code></em> :</span></p></td>
<td>Line coordinates stored as x00, y00, x01, y01, x10, y10, etc.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>metric</code></em> :</span></p></td>
<td>Metric matrix (2x2, but stored sequentially by rows: m11, m12,
m21, m22), it must be positive definite.  Vector norm is then
calculated as m11*x*x + (m12 + m21)*x*y + m22*y*y.
It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, standard Euclidean metric is then used.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The line number. It may return -1 if (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) doesn't lie
in the orthogonal stripe of any of the lines.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-find-nearest-point"></a><h3>gwy_math_find_nearest_point ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gwy_math_find_nearest_point         (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> y</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *d2min</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coords</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *metric</code></em>);</pre>
<p>
Finds the point from <em class="parameter"><code>coords</code></em> nearest to the point (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X-coordinate of the point to search.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y-coordinate of the point to search.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>d2min</code></em> :</span></p></td>
<td>Location to store the squared minimal distance to, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The number of points (i.e. <em class="parameter"><code>coords</code></em> has 2<em class="parameter"><code>n</code></em> items).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coords</code></em> :</span></p></td>
<td>Point coordinates stored as x0, y0, x1, y1, x2, y2, etc.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>metric</code></em> :</span></p></td>
<td>Metric matrix (2x2, but stored sequentially by rows: m11, m12,
m21, m22).  Vector norm is then calculated as
m11*x*x + (m12 + m21)*x*y + m22*y*y.
It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, standard Euclidean metric is then used.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The point number.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-lin-solve"></a><h3>gwy_math_lin_solve ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *           gwy_math_lin_solve                  (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *result</code></em>);</pre>
<p>
Solve a regular system of linear equations.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The size of the system.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>The matrix of the system (<em class="parameter"><code>n</code></em> times <em class="parameter"><code>n</code></em>), ordered by row, then
column.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rhs</code></em> :</span></p></td>
<td>The right hand side of the sytem.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>Where the result should be stored.  May be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to allocate
a fresh array for the result.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The solution (<em class="parameter"><code>result</code></em> if it wasn't <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
matrix is singular.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-lin-solve-rewrite"></a><h3>gwy_math_lin_solve_rewrite ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *           gwy_math_lin_solve_rewrite          (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *result</code></em>);</pre>
<p>
Solves a regular system of linear equations.
</p>
<p>
This is a memory-conservative version of <a class="link" href="libgwyddion-Math.html#gwy-math-lin-solve" title="gwy_math_lin_solve ()"><code class="function">gwy_math_lin_solve()</code></a> overwriting
<em class="parameter"><code>matrix</code></em> and <em class="parameter"><code>rhs</code></em> with intermediate results.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The size of the system.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>The matrix of the system (<em class="parameter"><code>n</code></em> times <em class="parameter"><code>n</code></em>), ordered by row, then
column.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rhs</code></em> :</span></p></td>
<td>The right hand side of the sytem.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>Where the result should be stored.  May be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to allocate
a fresh array for the result.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The solution (<em class="parameter"><code>result</code></em> if it wasn't <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
matrix is singular.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-tridiag-solve-rewrite"></a><h3>gwy_math_tridiag_solve_rewrite ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gwy_math_tridiag_solve_rewrite      (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *d</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *a</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *b</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>);</pre>
<p>
Solves a tridiagonal system of linear equations.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The dimension of <em class="parameter"><code>d</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
<td>The diagonal of a tridiagonal matrix, its contents will be overwritten.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>The above-diagonal stripe (it has <em class="parameter"><code>n</code></em>-1 elements).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>The below-diagonal stripe (it has <em class="parameter"><code>n</code></em>-1 elements).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rhs</code></em> :</span></p></td>
<td>The right hand side of the system, upon return it will contain the
solution.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the elimination suceeded, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the system is
(numerically) singular.  The contents of <em class="parameter"><code>d</code></em> and <em class="parameter"><code>rhs</code></em> may be
overwritten in the case of failure too, but not to any meaningful
values.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-fit-polynom"></a><h3>gwy_math_fit_polynom ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *           gwy_math_fit_polynom                (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ndata</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *xdata</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *ydata</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coeffs</code></em>);</pre>
<p>
Fits a polynom through a general (x, y) data set.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ndata</code></em> :</span></p></td>
<td>The number of items in <em class="parameter"><code>xdata</code></em>, <em class="parameter"><code>ydata</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xdata</code></em> :</span></p></td>
<td>Independent variable data (of size <em class="parameter"><code>ndata</code></em>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ydata</code></em> :</span></p></td>
<td>Dependent variable data (of size <em class="parameter"><code>ndata</code></em>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The degree of polynom to fit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coeffs</code></em> :</span></p></td>
<td>An array of size <em class="parameter"><code>n</code></em>+1 to store the coefficients to, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
(a fresh array is allocated then).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The coefficients of the polynom (<em class="parameter"><code>coeffs</code></em> when it was not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
otherwise a newly allocated array).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-choleski-decompose"></a><h3>gwy_math_choleski_decompose ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gwy_math_choleski_decompose         (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *matrix</code></em>);</pre>
<p>
Decomposes a symmetric positive definite matrix in place.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The dimension of <em class="parameter"><code>a</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>Lower triangular part of a symmetric matrix, stored by rows, i.e.,
matrix = [a_00 a_10 a_11 a_20 a_21 a_22 a_30 ...].</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether the matrix was really positive definite.  If <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
the decomposition failed and <em class="parameter"><code>a</code></em> does not contain any meaningful
values.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-choleski-solve"></a><h3>gwy_math_choleski_solve ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_math_choleski_solve             (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *decomp</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *rhs</code></em>);</pre>
<p>
Solves a system of linear equations with predecomposed symmetric positive
definite matrix <em class="parameter"><code>a</code></em> and right hand side <em class="parameter"><code>b</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The dimension of <em class="parameter"><code>a</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>decomp</code></em> :</span></p></td>
<td>Lower triangular part of Choleski decomposition as computed
by <a class="link" href="libgwyddion-Math.html#gwy-math-choleski-decompose" title="gwy_math_choleski_decompose ()"><code class="function">gwy_math_choleski_decompose()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rhs</code></em> :</span></p></td>
<td>Right hand side vector.  Is is modified in place, on return it
contains the solution.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-curvature"></a><h3>gwy_math_curvature ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gwy_math_curvature                  (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *coeffs</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *kappa1</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *kappa2</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *phi1</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *phi2</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *xc</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *yc</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *zc</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-median"></a><h3>gwy_math_median ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             gwy_math_median                     (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *array</code></em>);</pre>
<p>
Finds median of an array of values using Quick select algorithm.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Number of items in <em class="parameter"><code>array</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>array</code></em> :</span></p></td>
<td>Array of doubles.  It is modified by this function.  All values are
kept, but their positions in the array change.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The median value of <em class="parameter"><code>array</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-sort"></a><h3>gwy_math_sort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_math_sort                       (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *array</code></em>);</pre>
<p>
Sorts an array of doubles using a quicksort algorithm.
</p>
<p>
This is usually about twice as fast as the generic quicksort function
thanks to specialization for doubles.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Number of items in <em class="parameter"><code>array</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>array</code></em> :</span></p></td>
<td>Array of doubles to sort in place.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-math-median-uncertainty"></a><h3>gwy_math_median_uncertainty ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             gwy_math_median_uncertainty         (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> n</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *array</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *uarray</code></em>);</pre>
<p>
</p>
</div>
</div>
<div class="refsect1">
<a name="libgwyddion-Math.see-also"></a><h2>See Also</h2>
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a>, non-linear least square fitter;
           Math Fallback,
           fallback mathematical functions
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>