This file is indexed.

/usr/share/gtk-doc/html/libgwyddion/GwyNLFitPreset.html is in libgwyddion20-doc 2.50-2.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GwyNLFitPreset: Gwyddion Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<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-GwyNLFitter.html" title="GwyNLFitter">
<link rel="next" href="GwyFDCurvePreset.html" title="GwyFDCurvePreset">
<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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GwyNLFitPreset.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GwyNLFitPreset.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</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-GwyNLFitter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GwyFDCurvePreset.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GwyNLFitPreset"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GwyNLFitPreset.top_of_page"></a>GwyNLFitPreset</span></h2>
<p>GwyNLFitPreset — NL fitter preset functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GwyNLFitPreset.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-value" title="gwy_nlfit_preset_get_value ()">gwy_nlfit_preset_get_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-formula" title="gwy_nlfit_preset_get_formula ()">gwy_nlfit_preset_get_formula</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()">gwy_nlfit_preset_get_nparams</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-param-name" title="gwy_nlfit_preset_get_param_name ()">gwy_nlfit_preset_get_param_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-param-units" title="gwy_nlfit_preset_get_param_units ()">gwy_nlfit_preset_get_param_units</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-guess" title="gwy_nlfit_preset_guess ()">gwy_nlfit_preset_guess</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="returnvalue">GwyNLFitter</span></a> *
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-create-fitter" title="gwy_nlfit_preset_create_fitter ()">gwy_nlfit_preset_create_fitter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="returnvalue">GwyNLFitter</span></a> *
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-fit" title="gwy_nlfit_preset_fit ()">gwy_nlfit_preset_fit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> *
</td>
<td class="function_name">
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-presets" title="gwy_nlfit_presets ()">gwy_nlfit_presets</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GwyNLFitPreset.html#GwyNLFitPresetBuiltin" title="GwyNLFitPresetBuiltin">GwyNLFitPresetBuiltin</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GwyNLFitPreset.html#GwyNLFitPreset-struct" title="struct GwyNLFitPreset">GwyNLFitPreset</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GwyNLFitPreset.html#GwyNLFitPresetClass" title="struct GwyNLFitPresetClass">GwyNLFitPresetClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="http://developer.gnome.org/doc/API/2.0/gtk/gobjectgobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> <a class="link" href="GwyResource.html" title="GwyResource">GwyResource</a>
        <span class="lineart">╰──</span> GwyNLFitPreset
            <span class="lineart">╰──</span> <a class="link" href="GwyFDCurvePreset.html" title="GwyFDCurvePreset">GwyFDCurvePreset</a>
</pre>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libgwyddion/gwyddion.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.description"></a><h2>Description</h2>
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter">Non-linear fitter</a> presets are predefined
<p>fitting functions, with guessing, weighting, etc. to ease fitting of
common functions.  Most of those currently implemented are related to
one-dimensional statistical characteristics of randomly rough surfaces,
however, several general-purpose fitting functions are also available.</p>
<p>The presets are identified by name and can be obtained from the
corresponding <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a>, see <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-presets" title="gwy_nlfit_presets ()"><code class="function">gwy_nlfit_presets()</code></a>.  All their properties
can be queried with methods such as <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()"><code class="function">gwy_nlfit_preset_get_nparams()</code></a> or
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-formula" title="gwy_nlfit_preset_get_formula ()"><code class="function">gwy_nlfit_preset_get_formula()</code></a>.  A generic method to derive units of
fitting parameters from units of fitted data is also available:
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-param-units" title="gwy_nlfit_preset_get_param_units ()"><code class="function">gwy_nlfit_preset_get_param_units()</code></a>.</p>
<p>As of version 2.7 the defined functions include:</p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td><code class="literal">"Gaussian"</code></td></tr>
<tr><td><code class="literal">"Gaussian (PSDF)"</code></td></tr>
<tr><td><code class="literal">"Gaussian (ACF)"</code></td></tr>
<tr><td><code class="literal">"Gaussian (HHCF)"</code></td></tr>
<tr><td><code class="literal">"Gaussian (RPSDF)"</code></td></tr>
<tr><td><code class="literal">"Exponential"</code></td></tr>
<tr><td><code class="literal">"Exponential (PSDF)"</code></td></tr>
<tr><td><code class="literal">"Exponential (ACF)"</code></td></tr>
<tr><td><code class="literal">"Exponential (HHCF)"</code></td></tr>
<tr><td><code class="literal">"Exponential (RPSDF)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 0)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 1)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 2)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 3)"</code></td></tr>
<tr><td><code class="literal">"Square wave"</code></td></tr>
<tr><td><code class="literal">"Power"</code></td></tr>
<tr><td><code class="literal">"Lorentzian"</code></td></tr>
<tr><td><code class="literal">"Sinc"</code></td></tr>
</table>
<p>The following presets are available since version 2.40:</p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td><code class="literal">"Parabolic step"</code></td></tr>
<tr><td><code class="literal">"Two Gaussians (PSDF)"</code></td></tr>
</table>
<p>The following presets are available since version 2.41:</p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td><code class="literal">"Smooth bent step"</code></td></tr>
<tr><td><code class="literal">"Smooth slanted step"</code></td></tr>
</table>
<p>The following presets are available since version 2.48:</p>
<table border="0" summary="Simple list" class="simplelist"><tr><td><code class="literal">"K-correlated (PSDF)"</code></td></tr></table>
<p>The following presets are available since version 2.49:</p>
<table border="0" summary="Simple list" class="simplelist"><tr><td><code class="literal">"Boltzmann bent step"</code></td></tr></table>
<p>The result of the fitting is stored in a normal <a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a>, therefore the
typical use is:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">GwyNLFitPreset</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">preset</span><span class="symbol">;</span>
<span class="usertype">GwyNLFitter</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">fitter</span><span class="symbol">;</span>
<span class="usertype">gdouble</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">params</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">errors</span><span class="symbol">;</span>

<span class="normal">preset </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GwyInventory.html#gwy-inventory-get-item">gwy_inventory_get_item</a></span><span class="symbol">(</span><span class="function"><a href="#gwy-nlfit-presets">gwy_nlfit_presets</a></span><span class="symbol">(),</span><span class="normal"> </span><span class="string">"Gaussian"</span><span class="symbol">);</span>
<span class="normal">params </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Memory-Allocation.html#g-new">g_new</a></span><span class="symbol">(</span><span class="normal"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble">gdouble</a></span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="#gwy-nlfit-preset-get-nparams">gwy_nlfit_preset_get_nparams</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">));</span>
<span class="normal">errors </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Memory-Allocation.html#g-new">g_new</a></span><span class="symbol">(</span><span class="normal"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble">gdouble</a></span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="#gwy-nlfit-preset-get-nparams">gwy_nlfit_preset_get_nparams</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">));</span>
<span class="comment">/* Use a priori parameter value information, or: */</span>
<span class="function"><a href="#gwy-nlfit-preset-guess">gwy_nlfit_preset_guess</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">,</span><span class="normal"> ndata</span><span class="symbol">,</span><span class="normal"> xdata</span><span class="symbol">,</span><span class="normal"> ydata</span><span class="symbol">,</span><span class="normal"> params</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">ok</span><span class="symbol">);</span>
<span class="normal">fitter </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="#gwy-nlfit-preset-fit">gwy_nlfit_preset_fit</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">,</span><span class="normal"> <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
<span class="normal">                              ndata</span><span class="symbol">,</span><span class="normal"> xdata</span><span class="symbol">,</span><span class="normal"> ydata</span><span class="symbol">,</span><span class="normal"> params</span><span class="symbol">,</span>
<span class="normal">                              params</span><span class="symbol">,</span><span class="normal"> errors</span><span class="symbol">,</span><span class="normal"> <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>

<span class="comment">/* Examine fitting status, parameters and errors... */</span>

<span class="function"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Memory-Allocation.html#g-free">g_free</a></span><span class="symbol">(</span><span class="normal">params</span><span class="symbol">);</span>
<span class="function"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Memory-Allocation.html#g-free">g_free</a></span><span class="symbol">(</span><span class="normal">errors</span><span class="symbol">);</span>
<span class="function"><a href="libgwyddion-GwyNLFitter.html#gwy-math-nlfit-free">gwy_math_nlfit_free</a></span><span class="symbol">(</span><span class="normal">fitter</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-value"></a><h3>gwy_nlfit_preset_get_value ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gwy_nlfit_preset_get_value (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
                            <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                            <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fres</code></em>);</pre>
<p>Calculates preset function value in a single point with given parameters.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>The point to compute value at.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>Preset parameter values.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fres</p></td>
<td class="parameter_description"><p>Set to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if succeeds, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-value.returns"></a><h4>Returns</h4>
<p> The function value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-formula"></a><h3>gwy_nlfit_preset_get_formula ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_nlfit_preset_get_formula (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);</pre>
<p>Gets function formula of <em class="parameter"><code>preset</code></em>
 (with Pango markup).</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-formula.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-formula.returns"></a><h4>Returns</h4>
<p> The preset function formula.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-nparams"></a><h3>gwy_nlfit_preset_get_nparams ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gwy_nlfit_preset_get_nparams (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);</pre>
<p>Return the number of parameters of <em class="parameter"><code>preset</code></em>
.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-nparams.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-nparams.returns"></a><h4>Returns</h4>
<p> The number of function parameters.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-param-name"></a><h3>gwy_nlfit_preset_get_param_name ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_nlfit_preset_get_param_name (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="type">gint</span></a> param</code></em>);</pre>
<p>Gets the name of a fitting parameter of a fitter preset.</p>
<p>The name may contain Pango markup.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-param-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>param</p></td>
<td class="parameter_description"><p>A parameter number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-param-name.returns"></a><h4>Returns</h4>
<p> The name of parameter <em class="parameter"><code>param</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-param-units"></a><h3>gwy_nlfit_preset_get_param_units ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *
gwy_nlfit_preset_get_param_units (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="type">gint</span></a> param</code></em>,
                                  <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit_x</code></em>,
                                  <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit_y</code></em>);</pre>
<p>Derives the SI unit of a fitting parameter from the units of abscissa and
ordinate.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-param-units.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>param</p></td>
<td class="parameter_description"><p>A parameter number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>siunit_x</p></td>
<td class="parameter_description"><p>SI unit of abscissa.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>siunit_y</p></td>
<td class="parameter_description"><p>SI unit of ordinate.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-get-param-units.returns"></a><h4>Returns</h4>
<p> A newly created <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> with the units of the parameter <em class="parameter"><code>param</code></em>
.
If the units of <em class="parameter"><code>param</code></em>
are not representable as <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a>,
the result is unitless (i.e. it will be presented as a mere
number).</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-5.html#api-index-2.5">2.5</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-guess"></a><h3>gwy_nlfit_preset_guess ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_nlfit_preset_guess (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="type">gint</span></a> n_dat</code></em>,
                        <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
                        <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fres</code></em>);</pre>
<p>Performs initial parameter estimate for a NL fitter.</p>
<p>The initial estimate method depends on the function used.  There is no
absolute guarantee of quality, however if the data points approximately
match the fitted function the fit will typically converge from the returned
estimate.</p>
<p>The parameters are filled also on failure, though just with some neutral
values that should not give raise to NaNs and infinities.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-guess.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_dat</p></td>
<td class="parameter_description"><p>The number of data points (number of items in <em class="parameter"><code>x</code></em>
and <em class="parameter"><code>y</code></em>
).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>Abscissa points.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>Ordinate points.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>The array to fill with estimated parameter values.  It has to be
at least <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()"><code class="function">gwy_nlfit_preset_get_nparams()</code></a> long.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fres</p></td>
<td class="parameter_description"><p>Set to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if succeeds, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-create-fitter"></a><h3>gwy_nlfit_preset_create_fitter ()</h3>
<pre class="programlisting"><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="returnvalue">GwyNLFitter</span></a> *
gwy_nlfit_preset_create_fitter (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);</pre>
<p>Creates a non-linear least-squares fitter for a preset function.</p>
<p>The created fitter will be of the function data type, as created with
<a class="link" href="libgwyddion-GwyNLFitter.html#gwy-math-nlfit-new" title="gwy_math_nlfit_new ()"><code class="function">gwy_math_nlfit_new()</code></a>.</p>
<p>If you do not need to modify the fitter settings you can use
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-fit" title="gwy_nlfit_preset_fit ()"><code class="function">gwy_nlfit_preset_fit()</code></a> directly with <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> fitter.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-create-fitter.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-create-fitter.returns"></a><h4>Returns</h4>
<p> A newly created fitter for <em class="parameter"><code>preset</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-47.html#api-index-2.47">2.47</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-fit"></a><h3>gwy_nlfit_preset_fit ()</h3>
<pre class="programlisting"><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="returnvalue">GwyNLFitter</span></a> *
gwy_nlfit_preset_fit (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
                      <em class="parameter"><code><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a> *fitter</code></em>,
                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="type">gint</span></a> n_dat</code></em>,
                      <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
                      <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>,
                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *err</code></em>,
                      <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fixed_param</code></em>);</pre>
<p>Performs a nonlinear fit with a preset.</p>
<p>See <a class="link" href="libgwyddion-GwyNLFitter.html#gwy-math-nlfit-fit-full" title="gwy_math_nlfit_fit_full ()"><code class="function">gwy_math_nlfit_fit_full()</code></a> for details.</p>
<div class="refsect3">
<a name="gwy-nlfit-preset-fit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>preset</p></td>
<td class="parameter_description"><p>A NL fitter function preset.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fitter</p></td>
<td class="parameter_description"><p>A Marquardt-Levenberg nonlinear fitter already initialized for
<em class="parameter"><code>preset</code></em>
's function, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_dat</p></td>
<td class="parameter_description"><p>The number of data points (number of items in <em class="parameter"><code>x</code></em>
and <em class="parameter"><code>y</code></em>
).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>Abscissa points.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>Ordinate points.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>Initial parameter estimate (the number of parameters depends on
the fitted preset and it can be obtained with
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()"><code class="function">gwy_nlfit_preset_get_nparams()</code></a>).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>Array to store parameter errros to, may be <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fixed_param</p></td>
<td class="parameter_description"><p>Which parameters should be treated as fixed (set
corresponding element to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for them).  May be <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
all parameters are variable.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-nlfit-preset-fit.returns"></a><h4>Returns</h4>
<p> Either <em class="parameter"><code>fitter</code></em>
itself, or a newly created fitter if it was <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-presets"></a><h3>gwy_nlfit_presets ()</h3>
<pre class="programlisting"><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> *
gwy_nlfit_presets (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets inventory with all the NLFit presets.</p>
<div class="refsect3">
<a name="gwy-nlfit-presets.returns"></a><h4>Returns</h4>
<p> NLFit preset inventory.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GwyNLFitPresetBuiltin"></a><h3>GwyNLFitPresetBuiltin</h3>
<pre class="programlisting">typedef struct _GwyNLFitPresetBuiltin GwyNLFitPresetBuiltin;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GwyNLFitPreset-struct"></a><h3>struct GwyNLFitPreset</h3>
<pre class="programlisting">struct GwyNLFitPreset;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GwyNLFitPresetClass"></a><h3>struct GwyNLFitPresetClass</h3>
<pre class="programlisting">struct GwyNLFitPresetClass {
    GwyResourceClass parent_class;
};
</pre>
</div>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.see-also"></a><h2>See Also</h2>
<p><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>