Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-29 13:21:55 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-09-11 09:30:53 -0400
commita9b9286c9bd4fe3513dadcfe9a936072fee6af18 (patch)
tree1c3fdb843331048aaa7542d0411daf512debbe29
parenta8fd36176d58bb9d3bc49a3fb3e6ed243c289827 (diff)
downloadtame-a9b9286c9bd4fe3513dadcfe9a936072fee6af18.tar.gz
tame-a9b9286c9bd4fe3513dadcfe9a936072fee6af18.tar.bz2
tame-a9b9286c9bd4fe3513dadcfe9a936072fee6af18.zip
vector/filter: Add vfilter_lookup
* vector/filter.xml (vfilter_lookup): New function.
-rw-r--r--core/vector/filter.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/vector/filter.xml b/core/vector/filter.xml
index cc237d0..2b8f150 100644
--- a/core/vector/filter.xml
+++ b/core/vector/filter.xml
@@ -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@},