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


C# Graph.Read方法代码示例

本文整理汇总了C#中Graph.Read方法的典型用法代码示例。如果您正苦于以下问题:C# Graph.Read方法的具体用法?C# Graph.Read怎么用?C# Graph.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Graph的用法示例。


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

示例1: PlotGraph

 // PlotGraph(): A simple method that helps to plot a graph
 void PlotGraph(Graph _graph)
 {
     for (int i = 0; i < 100; i++)
     {
         float t = 0.01f * i;
         Instantiate(m_Node, new Vector3(t * 10.0f, _graph.Read(t) * 10.0f, 0f), Quaternion.identity);
     }
 }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:9,代码来源:SampleGraphProgram.cs

示例2: Start

    // Private Functions
    void Start()
    {
        m_graphAdd = m_graph + 1f;
        m_graphSubtract = m_graph - 1f;
        m_graphMultiply = m_graph * 2f;
        m_graphDivide = m_graph / 2f;

        for (int i = 0; i < 10; i++)
        {
            float x = (float)i / 10f;

            Debug.Log("At " + i + ", Default: " + m_graph.Read(x) + ", Add: " + m_graphAdd.Read(x) + ", Subtract: " + m_graphSubtract.Read(x) + ", Multiply: " + m_graphMultiply.Read(x) + ", Divide: " + m_graphDivide.Read(x));
        }
    }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:15,代码来源:GraphSandbox.cs

示例3: VerticalFlipAsFloat

 /// <summary>
 /// Flips the graph along the f(x)-direction and returns the x value of the graph
 /// </summary>
 /// <param name="_graph"> The graph to be flipped </param>
 /// <param name="_fFlip"> The value of f(x) at which the graph will be flipped along </param>
 /// <param name="_x"> The x value of the graph </param>
 /// <returns> Returns the value of f(x) on the flipped graph </returns>
 public static float VerticalFlipAsFloat(Graph _graph, float _fFlip, float _x)
 {
     return _fFlip * 2f - _graph.Read(_x);
 }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:11,代码来源:Graph.cs

示例4: MultiplyAsFloat

 /// <summary>
 /// Returns the product of graph-A and graph-B at x. the operator (_graphA * _graphB).Read() could also be use to represent the same thing;
 /// </summary>
 /// <param name="_graphA"> The first graph </param>
 /// <param name="_graphB"> The second graph </param>
 /// <param name="_x"> The x value of the graph </param>
 /// <returns> Return the product of both graphs </returns>
 public static float MultiplyAsFloat(Graph _graphA, Graph _graphB, float _x)
 {
     return _graphA.Read(_x) * _graphB.Read(_x);
 }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:11,代码来源:Graph.cs

示例5: MixAsFloat

 /// <summary>
 /// Returns the result at x of graph-A with a certain percentage influenced from graph-B
 /// </summary>
 /// <param name="_graphA"> The initial graph A </param>
 /// <param name="_graphB"> The influencing graph B </param>
 /// <param name="_fBInfluence"> The percentage of influenced from the influencing graph B </param>
 /// <param name="_x"> The x value of the graph </param>
 /// <returns> Returns the f(x) value of the graph </returns>
 public static float MixAsFloat(Graph _graphA, Graph _graphB, float _fBInfluence, float _x)
 {
     return _graphA.Read(_x) * (1f - _fBInfluence) + _fBInfluence * _graphB.Read(_x);
 }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:12,代码来源:Graph.cs

示例6: HorizontalFlipAsFloat

 /// <summary>
 /// Flips the graph along the x-direction and returns the x value of the graph
 /// </summary>
 /// <param name="_graph"> The graph to be flipped </param>
 /// <param name="_fFlip"> The value of f(x) at which the graph will be flipped along </param>
 /// <param name="_x"> The x value of the graph </param>
 /// <returns> Returns the value of x on the flipped graph </returns>
 public static float HorizontalFlipAsFloat(Graph _graph, float _fFlip, float _x)
 {
     return _graph.Read(_fFlip * 2f - _x);
 }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:11,代码来源:Graph.cs

示例7: AverageAsFloat

 /// <summary>
 /// Returns the average of graph-A and graph-B at x
 /// </summary>
 /// <param name="_graphA"> The first graph </param>
 /// <param name="_graphB"> The second graph </param>
 /// <param name="_x"> The x value of the graph </param>
 /// <returns> Returns the average of f(x) and g(x) </returns>
 public static float AverageAsFloat(Graph _graphA, Graph _graphB, float _x)
 {
     return (_graphA.Read(_x) + _graphB.Read(_x)) / 2f;
 }
开发者ID:Daburu,项目名称:Daburu-Tools,代码行数:11,代码来源:Graph.cs

示例8: Main

 static void Main()
 {
     Graph graph = new Graph();
     graph.Read();
     graph.Print();
 }
开发者ID:boriphuth,项目名称:algorithm,代码行数:6,代码来源:city.cs


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