vector/filter: Add vfilter_lookup

* vector/filter.xml (vfilter_lookup): New function.
master
Mike Gerwitz 2018-01-29 13:21:55 -05:00
parent a8fd36176d
commit a9b9286c9b
1 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,22 @@
<import package="list" />
<section title="Vector Filtering">
<function name="vfilter_lookup"
desc="Filter predicate by value and use corresponding index in
source vector as a value">
<param name="vector_pred" type="float" set="vector" desc="Vector to filter" />
<param name="vector_src" type="float" set="vector" desc="Vector to filter" />
<param name="value" type="float" desc="Predicate value" />
<param name="start_index" type="integer" desc="Starting vector_pred index" />
<t:cons-until-empty set="vector_pred" only="value" index="start_index">
<c:value-of name="vector_src" index="start_index" />
</t:cons-until-empty>
</function>
</section>
<section title="Matrix Filtering">
\ref{mfilter} handles complex filtering of matrices.
If the requested column~\tt{@col@} is marked as sequential with~\tt{@seq@},