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
|
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Collocation — HARP 1.16 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="next" title="Dataset" href="libharp_dataset.html" />
<link rel="prev" title="C library" href="libharp.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> HARP
</a>
<div class="version">
1.16
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="conventions/index.html">Conventions</a></li>
<li class="toctree-l1"><a class="reference internal" href="algorithms/index.html">Algorithms</a></li>
<li class="toctree-l1"><a class="reference internal" href="operations.html">Operations</a></li>
<li class="toctree-l1"><a class="reference internal" href="ingestions/index.html">Ingestion definitions</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="libharp.html">C library</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="libharp.html#introduction">Introduction</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="libharp.html#modules">Modules</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">Collocation</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_dataset.html">Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_documentation.html">Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_error.html">Error</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_general.html">General</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_geometry.html">Geometry</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_product.html">Product</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_product_metadata.html">Product Metadata</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_variable.html">Variable</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="matlab.html">MATLAB interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="python.html">Python interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="R.html">R interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="tools.html">Command line tools</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">HARP</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li><a href="libharp.html">C library</a> »</li>
<li>Collocation</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="collocation">
<h1>Collocation</h1>
<dl>
<dt class="sig sig-object cpp">
<span class="target" id="group__harp__collocation"></span><em><span class="pre">group</span></em> <span class="sig-name descname"><span class="pre">harp_collocation</span></span></dt>
<dd><p>The HARP Collocation module contains the functionality that deals with collocation two datasets of products. The two datasets are referred to as dataset A (primary) and dataset B (secondary). The result of a collocation is a list of pairs. Each pair references a measurement from dataset A (using the source product name and measurement index within that product) and a measurement from dataset B. Each collocation pair also gets a unique collocation_index sequence number. For each collocation criteria used in the matchup the actual difference is stored as part of the pair as well. Collocation results can be written to and read from a csv file. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-typedefs">Typedefs</p>
<dl class="cpp type">
<dt class="sig sig-object cpp" id="_CPPv421harp_collocation_pair">
<span id="_CPPv321harp_collocation_pair"></span><span id="_CPPv221harp_collocation_pair"></span><span id="harp_collocation_pair"></span><span class="target" id="group__harp__collocation_1ga0d5cd2a5de254da66941cc813a16d81e"></span><span class="k"><span class="pre">typedef</span></span><span class="w"> </span><span class="k"><span class="pre">struct</span></span><span class="w"> </span><a class="reference internal" href="#_CPPv428harp_collocation_pair_struct" title="harp_collocation_pair_struct"><span class="n"><span class="pre">harp_collocation_pair_struct</span></span></a><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_pair</span></span></span><br /></dt>
<dd></dd></dl>
<dl class="cpp type">
<dt class="sig sig-object cpp" id="_CPPv423harp_collocation_result">
<span id="_CPPv323harp_collocation_result"></span><span id="_CPPv223harp_collocation_result"></span><span id="harp_collocation_result"></span><span class="target" id="group__harp__collocation_1gadce42cfa00c3c02cfdb339c3e825147e"></span><span class="k"><span class="pre">typedef</span></span><span class="w"> </span><span class="k"><span class="pre">struct</span></span><span class="w"> </span><a class="reference internal" href="#_CPPv430harp_collocation_result_struct" title="harp_collocation_result_struct"><span class="n"><span class="pre">harp_collocation_result_struct</span></span></a><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result</span></span></span><br /></dt>
<dd></dd></dl>
</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-functions">Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv427harp_collocation_result_newPP23harp_collocation_resultiPPKcPPKc">
<span id="_CPPv327harp_collocation_result_newPP23harp_collocation_resultiPPKcPPKc"></span><span id="_CPPv227harp_collocation_result_newPP23harp_collocation_resultiPPKcPPKc"></span><span id="harp_collocation_result_new__harp_collocation_resultPP.i.cCPP.cCPP"></span><span class="target" id="group__harp__collocation_1ga6031ad343e7d81272882937baa3c6053"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_new</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">new_collocation_result</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">num_differences</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">difference_variable_name</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">difference_unit</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Create a new collocation result set </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>new_collocation_result</strong> – Pointer to the C variable where the new result set will be stored. </p></li>
<li><p><strong>num_differences</strong> – The number of differences that have been calculated per pair for the collocation result </p></li>
<li><p><strong>difference_variable_name</strong> – An array of variable names describing the type of difference for each calculated difference </p></li>
<li><p><strong>difference_unit</strong> – An array of units for each calculated difference </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv430harp_collocation_result_deleteP23harp_collocation_result">
<span id="_CPPv330harp_collocation_result_deleteP23harp_collocation_result"></span><span id="_CPPv230harp_collocation_result_deleteP23harp_collocation_result"></span><span id="harp_collocation_result_delete__harp_collocation_resultP"></span><span class="target" id="group__harp__collocation_1ga47424f40bc53ed860f2134390239a984"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_delete</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Remove a collocation result set </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>collocation_result</strong> – Result set that will be removed. </p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv433harp_collocation_result_sort_by_aP23harp_collocation_result">
<span id="_CPPv333harp_collocation_result_sort_by_aP23harp_collocation_result"></span><span id="_CPPv233harp_collocation_result_sort_by_aP23harp_collocation_result"></span><span id="harp_collocation_result_sort_by_a__harp_collocation_resultP"></span><span class="target" id="group__harp__collocation_1gaf908294e4c686bb1a24670e29b500a2b"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_sort_by_a</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Sort the collocation result pairs by dataset A Results will be sorted first by product index of A and then by sample index of A </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>collocation_result</strong> – Result set that will be sorted in place. </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv433harp_collocation_result_sort_by_bP23harp_collocation_result">
<span id="_CPPv333harp_collocation_result_sort_by_bP23harp_collocation_result"></span><span id="_CPPv233harp_collocation_result_sort_by_bP23harp_collocation_result"></span><span id="harp_collocation_result_sort_by_b__harp_collocation_resultP"></span><span class="target" id="group__harp__collocation_1ga7349b1f733e1b0d1042608a832af30dd"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_sort_by_b</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Sort the collocation result pairs by dataset B Results will be sorted first by product index of B and then by sample index of B </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>collocation_result</strong> – Result set that will be sorted in place. </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv449harp_collocation_result_sort_by_collocation_indexP23harp_collocation_result">
<span id="_CPPv349harp_collocation_result_sort_by_collocation_indexP23harp_collocation_result"></span><span id="_CPPv249harp_collocation_result_sort_by_collocation_indexP23harp_collocation_result"></span><span id="harp_collocation_result_sort_by_collocation_index__harp_collocation_resultP"></span><span class="target" id="group__harp__collocation_1ga5dbfa18bb076beb44e27ffbe2be8a1c3"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_sort_by_collocation_index</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Sort the collocation result pairs by collocation index </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>collocation_result</strong> – Result set that will be sorted in place. </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv451harp_collocation_result_filter_for_source_product_aP23harp_collocation_resultPKc">
<span id="_CPPv351harp_collocation_result_filter_for_source_product_aP23harp_collocation_resultPKc"></span><span id="_CPPv251harp_collocation_result_filter_for_source_product_aP23harp_collocation_resultPKc"></span><span id="harp_collocation_result_filter_for_source_product_a__harp_collocation_resultP.cCP"></span><span class="target" id="group__harp__collocation_1gacbab6bf6d38980dec0a07f27d47dd874"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_filter_for_source_product_a</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">source_product</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Filter collocation result set for a specific product from dataset A Only results that contain the referenced source product will be retained. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result</strong> – Result set that will be filtered in place. </p></li>
<li><p><strong>source_product</strong> – source product reference from dataset A that should be filtered on. </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv451harp_collocation_result_filter_for_source_product_bP23harp_collocation_resultPKc">
<span id="_CPPv351harp_collocation_result_filter_for_source_product_bP23harp_collocation_resultPKc"></span><span id="_CPPv251harp_collocation_result_filter_for_source_product_bP23harp_collocation_resultPKc"></span><span id="harp_collocation_result_filter_for_source_product_b__harp_collocation_resultP.cCP"></span><span class="target" id="group__harp__collocation_1gacc8a807955504326fb20f8d31b5fcf6f"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_filter_for_source_product_b</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">source_product</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Filter collocation result set for a specific product from dataset B Only results that contain the referenced source product will be retained. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result</strong> – Result set that will be filtered in place. </p></li>
<li><p><strong>source_product</strong> – source product reference from dataset B that should be filtered on. </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv454harp_collocation_result_filter_for_collocation_indicesP23harp_collocation_resultlP7int32_t">
<span id="_CPPv354harp_collocation_result_filter_for_collocation_indicesP23harp_collocation_resultlP7int32_t"></span><span id="_CPPv254harp_collocation_result_filter_for_collocation_indicesP23harp_collocation_resultlP7int32_t"></span><span id="harp_collocation_result_filter_for_collocation_indices__harp_collocation_resultP.l.int32_tP"></span><span class="target" id="group__harp__collocation_1ga7008e5754fbf0124d36b5e78a769e884"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_filter_for_collocation_indices</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span>, <span class="kt"><span class="pre">long</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">num_indices</span></span>, <span class="n"><span class="pre">int32_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_index</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Filter collocation result set for the specified list of collocation indices. The collocation result pairs will be sorted according to the order in the provided <em>collocation_index</em> parameter. If a collocation index cannot be found in the collocation_result set then an error will be thrown. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result</strong> – Result set that will be filtered in place. </p></li>
<li><p><strong>num_indices</strong> – Number of items in the collocation_index parameter. </p></li>
<li><p><strong>collocation_index</strong> – Array of collocation index values to match against the collocation_result set. </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv432harp_collocation_result_add_pairP23harp_collocation_resultlPKclPKcliPKd">
<span id="_CPPv332harp_collocation_result_add_pairP23harp_collocation_resultlPKclPKcliPKd"></span><span id="_CPPv232harp_collocation_result_add_pairP23harp_collocation_resultlPKclPKcliPKd"></span><span id="harp_collocation_result_add_pair__harp_collocation_resultP.l.cCP.l.cCP.l.i.doubleCP"></span><span class="target" id="group__harp__collocation_1ga44134180c3a56546a89c8c28eecee0c7"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_add_pair</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span>, <span class="kt"><span class="pre">long</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">collocation_index</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">source_product_a</span></span>, <span class="kt"><span class="pre">long</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index_a</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">source_product_b</span></span>, <span class="kt"><span class="pre">long</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index_b</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">num_differences</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">difference</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Add collocation result entry to a result set </p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>this function will not check for uniqueness of the collocation_index values in the resulting set </p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result</strong> – Result set that will be extended </p></li>
<li><p><strong>collocation_index</strong> – Unique index of the pair in the overall collocation result </p></li>
<li><p><strong>source_product_a</strong> – Name of the source_product attribute of the product from dataset A </p></li>
<li><p><strong>index_a</strong> – Value of the index variable for the matching sample in the product from dataset A </p></li>
<li><p><strong>source_product_b</strong> – Name of the source_product attribute of the product from dataset B </p></li>
<li><p><strong>index_b</strong> – Value of the index variable for the matching sample in the product from dataset B </p></li>
<li><p><strong>num_differences</strong> – Number of calculated differences (should equal the number of differences with which the collocation result was initialized) </p></li>
<li><p><strong>difference</strong> – Array of difference values </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv444harp_collocation_result_remove_pair_at_indexP23harp_collocation_resultl">
<span id="_CPPv344harp_collocation_result_remove_pair_at_indexP23harp_collocation_resultl"></span><span id="_CPPv244harp_collocation_result_remove_pair_at_indexP23harp_collocation_resultl"></span><span id="harp_collocation_result_remove_pair_at_index__harp_collocation_resultP.l"></span><span class="target" id="group__harp__collocation_1ga0ff0f268cbe8d1eda814a31bcc148a68"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_remove_pair_at_index</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span>, <span class="kt"><span class="pre">long</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Remove collocation result entry from a result set </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result</strong> – Result set from which to remove the entry </p></li>
<li><p><strong>index</strong> – Zero-based index in the collocation result set of the entry that should be removed </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv428harp_collocation_result_readPKcPP23harp_collocation_result">
<span id="_CPPv328harp_collocation_result_readPKcPP23harp_collocation_result"></span><span id="_CPPv228harp_collocation_result_readPKcPP23harp_collocation_result"></span><span id="harp_collocation_result_read__cCP.harp_collocation_resultPP"></span><span class="target" id="group__harp__collocation_1gafd767a5195c3337b83229443f74f7837"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_read</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result_filename</span></span>, <a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">new_collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Read collocation result set from a csv file The csv file should follow the HARP format for collocation result files. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result_filename</strong> – Full file path to the csv file. </p></li>
<li><p><strong>new_collocation_result</strong> – Pointer to the C variable where the new result set will be stored. </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv429harp_collocation_result_writePKcP23harp_collocation_result">
<span id="_CPPv329harp_collocation_result_writePKcP23harp_collocation_result"></span><span id="_CPPv229harp_collocation_result_writePKcP23harp_collocation_result"></span><span id="harp_collocation_result_write__cCP.harp_collocation_resultP"></span><span class="target" id="group__harp__collocation_1ga11c71ee15582b868a80ce5f997d1f70a"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_write</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result_filename</span></span>, <a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Read collocation result set to a csv file The csv file will follow the HARP format for collocation result files. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collocation_result_filename</strong> – Full file path to the csv file. </p></li>
<li><p><strong>collocation_result</strong> – Collocation result set that will be written to file. </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv437harp_collocation_result_swap_datasetsP23harp_collocation_result">
<span id="_CPPv337harp_collocation_result_swap_datasetsP23harp_collocation_result"></span><span id="_CPPv237harp_collocation_result_swap_datasetsP23harp_collocation_result"></span><span id="harp_collocation_result_swap_datasets__harp_collocation_resultP"></span><span class="target" id="group__harp__collocation_1ga1ee6e2e544c4db6668948108351d1ef2"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_swap_datasets</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv423harp_collocation_result" title="harp_collocation_result"><span class="n"><span class="pre">harp_collocation_result</span></span></a><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">collocation_result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Swap the columns of this collocation result inplace.</p>
<p>This swaps datasets A and B (such that A becomes B and B becomes A). </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>collocation_result</strong> – Collocation result whose datasets should be swapped. </p>
</dd>
</dl>
</dd></dl>
</div>
<dl class="cpp struct">
<dt class="sig sig-object cpp" id="_CPPv428harp_collocation_pair_struct">
<span id="_CPPv328harp_collocation_pair_struct"></span><span id="_CPPv228harp_collocation_pair_struct"></span><span id="harp_collocation_pair_struct"></span><span class="target" id="structharp__collocation__pair__struct"></span><span class="k"><span class="pre">struct</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_pair_struct</span></span></span><br /></dt>
<dd><div class="docutils container">
<em>#include <harp.h></em></div>
<p>Entry for a single matched pair for a collocation between a dataset A and dataset B </p>
</dd></dl>
<dl class="cpp struct">
<dt class="sig sig-object cpp" id="_CPPv430harp_collocation_result_struct">
<span id="_CPPv330harp_collocation_result_struct"></span><span id="_CPPv230harp_collocation_result_struct"></span><span id="harp_collocation_result_struct"></span><span class="target" id="structharp__collocation__result__struct"></span><span class="k"><span class="pre">struct</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">harp_collocation_result_struct</span></span></span><br /></dt>
<dd><div class="docutils container">
<em>#include <harp.h></em></div>
<p>HARP Collocation result </p>
</dd></dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="libharp.html" class="btn btn-neutral float-left" title="C library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="libharp_dataset.html" class="btn btn-neutral float-right" title="Dataset" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2015-2022 S[&]T, The Netherlands.</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
|