为您找到相关结果88,052个
Golang极简入门教程(二):方法和接口_Golang_脚本之家
type Vertex struct { X, Y float64 } // 结构体 Vertex 的方法 // 这里的方法接收者(method receiver)v 的类型为 *Vertex func (v *Vertex) Abs() float64 { return math.Sqrt(v.X*v.X + v.Y*v.Y) } func main() { v := &Vertex{3, 4} ...
www.jb51.net/article/567...htm 2025-2-9
Flink JobGraph生成源码解析_java_脚本之家
JobVertex:job的顶点,即对应的计算逻辑(这里用的是Vertex, 而前面用的是Node,有点差异),通过inputs记录了所有来源的Edge,而输出是ArrayList来记录 JobEdge: job的边,记录了源Vertex和目标表Vertex. IntermediateDataSet: 定义了一个中间数据集,但并没有存储,只是记录了一个Producer(JobVertex)和一个Consumer(Job...
www.jb51.net/article/2689...htm 2025-2-9
Unity实现旋转扭曲图像特效_C#教程_脚本之家
#pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" uniform sampler2D _MainTex; uniform float4 _MainTex_TexelSize; half4 _MainTex_ST; //旋转扭曲的中心 uniform float4 _CenterRadius; //将旋转矩阵传入 uniform float4x4 _RotationMatrix; struct appdata { float4 vertex : POSITION; ...
www.jb51.net/article/1568...htm 2025-2-6
Python使用邻接矩阵实现图及Dijkstra算法问题_python_脚本之家
for j in range(self.vertexn): if(self.arcs[i][j] != inf) and (not self.visited[j]): print(self.arcs[i][j], end=" ") # 父节点与子节点的距离 print("vertex:{}".format(self.vertexes[j]), end=" ") self.visited[j] = True q.append(j) # 最短路径算法-Dijkstra 输入点v0...
www.jb51.net/article/2701...htm 2025-2-9