Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a67102ee65
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (39 sloc) 1.507 kB
@comment{
Copyright 2011 JBoss Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
}
@comment{
Extrapolates a piece-wise linear function, mapping outer values as missing
/**
* @param name - derived field name
* @param origField - name of the original field to be mapped
* @param xmin, xmax - domain boundaries
*/
}
@declare{'normContOutliersAsMissingRule'}
rule "outliersAsMissing_@{name}"
@if{ isInnerFieldName( name ) } @@activationListener('direct') @end{}
when
$src : @{origField}( missing == false, valid == true,
value < @{xmin} || value > @{xmax}, $ctx : context
@if{ context != null } , context == @{format("string",context)} @end{})
then
@{name} x = new @{name}();
x.setValue((@{type}) 0.0); // not relevant
x.setMissing(true);
x.setValid(true);
x.setContext($ctx);
x.setName(@{format("string",name)});
//x.setContinous();
insertLogical(x);
end
@end{}
@includeNamed{'normContOutliersAsMissingRule'}
Jump to Line
Something went wrong with that request. Please try again.