Diff of /src/modules/bugs/functions/IfElse.cc [98f06f] .. [082b02]  Maximize  Restore

Switch to side-by-side view

--- a/src/modules/bugs/functions/IfElse.cc
+++ b/src/modules/bugs/functions/IfElse.cc
@@ -20,4 +20,37 @@
 	return mask[1] && mask[2];
     }
 
+    bool IfElse::isScale(vector<bool> const &mask, 
+			 vector<bool> const &fixed) const
+    {
+	//Don't even bother with the case where the predicate is a
+	//scale function. False negatives are allowed and this is a
+	//silly case
+	if (mask[0]) return false;
+	
+	if (fixed.empty()) {
+	    //result is a scale function if both arguments are
+	    return mask[1] && mask[2];
+	}
+	else {
+	    //..but is never a fixed scale function
+	    return false;
+	}
+    }
+
+    bool IfElse::isLinear(vector<bool> const &mask, 
+			  vector<bool> const &fixed) const
+    {
+	if (mask[0]) return false;
+	
+	if (fixed.empty()) {
+	    //result is a linear function if either argument is
+	    return mask[1] || mask[2];
+	}
+	else {
+	    //..but is never a fixed scale function
+	    return false;
+	}
+    }
+
 }}

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks