【发布时间】:2013-06-02 18:40:27
【问题描述】:
所以我一直在阅读这个看起来像这样的伪代码:
%setting up matrix A
for vertex = 1...n
a(vertex,vertex) := number of direct neighbors;
for the direct neighbors of vertex
if the neighbor is not a pole
a(vertex,neighbor) := -1;
我的问题是:= 在这里是什么意思?是这个吗?:
a(vertex,vertex) = a(vertex,vertex)+number of direct neighbors;
还是这样的:
a(vertex,vertex) = number of direct neighbors;
【问题讨论】:
-
查看上一个问题,了解更多关于
:=的信息:http://stackoverflow.com/questions/5344694/what-does-do。另请参阅此 Wikipedia 文章:http://en.wikipedia.org/wiki/Assignment_(computer_science)。 -
这和 MATLAB 有什么关系?
标签: matlab operators variable-assignment pseudocode