当前位置: 首页>>代码示例>>C#>>正文


C# IFunction类代码示例

本文整理汇总了C#中IFunction的典型用法代码示例。如果您正苦于以下问题:C# IFunction类的具体用法?C# IFunction怎么用?C# IFunction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IFunction类属于命名空间,在下文中一共展示了IFunction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetScriptBase

 internal SetScriptBase(SetScriptConstructor constructor, IFunction<Element> appliesTo, string property)
 {
     m_constructor = constructor;
     m_worldModel = constructor.WorldModel;
     AppliesTo = appliesTo;
     Property = property;
 }
开发者ID:Pertex,项目名称:Quest,代码行数:7,代码来源:SetScript.cs

示例2: CreateExitScript

 public CreateExitScript(WorldModel worldModel, IFunction<string> name, IFunction<Element> from, IFunction<Element> to)
 {
     m_worldModel = worldModel;
     m_name = name;
     m_from = from;
     m_to = to;
 }
开发者ID:Pertex,项目名称:Quest,代码行数:7,代码来源:CreateScript.cs

示例3: ListAddScript

 public ListAddScript(ScriptContext scriptContext, IFunctionGeneric list, IFunction<object> value)
 {
     m_scriptContext = scriptContext;
     m_list = list;
     m_value = value;
     m_worldModel = scriptContext.WorldModel;
 }
开发者ID:JatinR,项目名称:quest,代码行数:7,代码来源:ListAddScript.cs

示例4: RequestScript

 public RequestScript(ScriptContext scriptContext, string request, IFunction<string> data)
 {
     m_scriptContext = scriptContext;
     m_worldModel = scriptContext.WorldModel;
     m_data = data;
     m_request = (Request)(Enum.Parse(typeof(Request), request));
 }
开发者ID:JatinR,项目名称:quest,代码行数:7,代码来源:RequestScript.cs

示例5: SetFieldScript

 public SetFieldScript(WorldModel worldModel, IFunction<Element> obj, IFunction<string> field, IFunction<object> value)
 {
     m_worldModel = worldModel;
     m_obj = obj;
     m_field = field;
     m_value = value;
 }
开发者ID:Pertex,项目名称:Quest,代码行数:7,代码来源:SetFieldScript.cs

示例6: SimpleFuzzyRules

 public SimpleFuzzyRules(double[][] dataIn, IFunction function, List<FuzzySet> fuzzySets)
 {
     this.function = function;
     this.dataIn = dataIn;
     dataOut = getDataOutputs();
     rules = generateRules(fuzzySets);
 }
开发者ID:kepisty89,项目名称:fuzzyRules,代码行数:7,代码来源:SimpleFuzzyRules.cs

示例7: Execute

 public override void Execute(IFunction function, ResultRecord result) {
     double value;
     var votes = GetVotes().ToList();
     function.Calculate(votes, result.ContentItemRecord.Id, out value);
     result.Value = value;
     result.Count = votes.Count;
 }
开发者ID:NickAndersonX,项目名称:xodb,代码行数:7,代码来源:Calculus.cs

示例8: Plot

        Plot2DValue Plot(IFunction f, Double minx, Double maxx, Double precision)
        {
            var cp = new Plot2DValue();
            var N = (Int32)((maxx - minx) / precision) + 1;
            var M = new MatrixValue(N, 2);
            var x = new ScalarValue(minx);

            for (var i = 0; i < N; i++)
            {
                var row = i + 1;
                var y = f.Perform(Context, x);
                M[row, 1] = x.Clone();

                if (y is ScalarValue)
                {
                    M[row, 2] = (ScalarValue)y;
                }
                else if (y is MatrixValue)
                {
                    var Y = (MatrixValue)y;

                    for (var j = 1; j <= Y.Length; j++)
                    {
                        M[row, j + 1] = Y[j];
                    }
                }

                x.Re += precision;
            }

            cp.AddPoints(M);
            return cp;
        }
开发者ID:FlorianRappl,项目名称:YAMP,代码行数:33,代码来源:FplotFunction.cs

示例9: DoActionScript

 public DoActionScript(ScriptContext scriptContext, IFunction<Element> obj, IFunction<string> action)
 {
     m_scriptContext = scriptContext;
     m_worldModel = scriptContext.WorldModel;
     m_obj = obj;
     m_action = action;
 }
开发者ID:JatinR,项目名称:quest,代码行数:7,代码来源:DoScript.cs

示例10: RunDelegateScript

 public RunDelegateScript(WorldModel worldModel, IFunction<Element> obj, IFunction<string> del, IList<IFunction<object>> parameters)
 {
     m_worldModel = worldModel;
     m_delegate = del;
     m_parameters = new FunctionCallParameters(worldModel, parameters);
     m_appliesTo = obj;
 }
开发者ID:Pertex,项目名称:Quest,代码行数:7,代码来源:RunDelegateScript.cs

示例11: Integrate

 public double Integrate(IFunction<Vector2, double> function)
 {
     double output = 0;
     foreach (var finiteElement in FiniteElements)
         ;//output += finiteElement.Integrate(function);
     return output;
 }
开发者ID:phamhathanh,项目名称:2DFEM,代码行数:7,代码来源:Mesh.cs

示例12: IfScript

 public IfScript(IFunction<bool> expression, IScript thenScript, IScript elseScript, WorldModel worldModel)
 {
     m_expression = expression;
     m_thenScript = thenScript;
     m_elseScript = elseScript;
     m_worldModel = worldModel;
 }
开发者ID:Pertex,项目名称:Quest,代码行数:7,代码来源:IfScript.cs

示例13: FunctionRegressionView2D

        /// <summary>
        /// Constructs with the details of teh function regression problem to be visualized. 
        /// </summary>
        /// <param name="func">The function being regressed.</param>
        /// <param name="xMin">The minimum value of the input range being sampled.</param>
        /// <param name="xIncr">The increment between input sample values.</param>
        /// <param name="sampleCount">The number of samples over the input range.</param>
        /// <param name="genomeDecoder">Genome decoder.</param>
        public FunctionRegressionView2D(IFunction func, double xMin, double xIncr, int sampleCount, IGenomeDecoder<NeatGenome,IBlackBox> genomeDecoder)
        {
            InitializeComponent();
            InitGraph(string.Empty, string.Empty, string.Empty);

            _func = func;
            _xMin = xMin;
            _xIncr = xIncr;
            _sampleCount = sampleCount;
            _genomeDecoder = genomeDecoder;

            // Prebuild plot point objects.
            _plotPointListTarget = new PointPairList();
            _plotPointListResponse = new PointPairList();
            
            double[] args = new double[]{xMin};
            for(int i=0; i<sampleCount; i++, args[0] += xIncr)
            {
                _plotPointListTarget.Add(args[0], _func.GetValue(args));
                _plotPointListResponse.Add(args[0], 0.0);
            }

            // Bind plot points to graph.
            zed.GraphPane.AddCurve("Target", _plotPointListTarget, Color.Black, SymbolType.None);
            zed.GraphPane.AddCurve("Network Response", _plotPointListResponse, Color.Red, SymbolType.None);
        }
开发者ID:homoluden,项目名称:SharpNEAT,代码行数:34,代码来源:FunctionRegressionView2D.cs

示例14: Execute

 public override void Execute(IFunction function, ResultRecord result)
 {
     double value;
     function.Create(result.Value, result.Count, Vote, out value);
     result.Value = value;
     result.Count++;
 }
开发者ID:Timbioz,项目名称:SciGitAzure,代码行数:7,代码来源:Calculus.cs

示例15: PlaySoundScript

 public PlaySoundScript(WorldModel worldModel, IFunction<string> function, IFunction<bool> synchronous, IFunction<bool> loop)
 {
     m_worldModel = worldModel;
     m_filename = function;
     m_synchronous = synchronous;
     m_loop = loop;
 }
开发者ID:Pertex,项目名称:Quest,代码行数:7,代码来源:PlaySoundScript.cs


注:本文中的IFunction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。