TimeBehavior.m 1.14 KB
%Concrete class representing the time behavior of a model variable. It
%stores the values of a variable curve, the values of the selected
%evaluation function and the method chosen for tail computation

classdef TimeBehavior < handle
   
    properties
       time   %x-axis of time simulation
       values  %y-axis of time simulation
       currentEvalFunc
       evalFuncValues    
       currentTailMethod
    end
    
    methods
       
        function obj=TimeBehavior(t,v)
           obj.time=t;
           obj.values=v;
        end
        
%         function obj=set.currentEvalFunc(obj,func)
%             obj.currentEvalFunc=func;
%         end
        
        %pattern Strategy for computing values of the evaluation function
        function EvalValues=computeEvalFunc(obj)
           EvalValues=obj.currentEvalFunc.compute_ef(obj); 
           obj.evalFuncValues=EvalValues;
        end
        
        
        %pattern Strategy 
        function [XiMax, XiMin]=compute_tail(obj,perturbation,tail_size)
           [XiMax, XiMin]=obj.currentTailMethod.compute_tailspdf(obj,perturbation,tail_size); 
        end
                       
    end
    
end