I'm a little new to pseudocode, What does :
mean in pseudocode?
For example:
X ← copy(C[s − a : s + len])
I'm a little new to pseudocode, What does :
mean in pseudocode?
For example:
X ← copy(C[s − a : s + len])
X ← copy(C[s − a : s + len])
From s - a
to s + len
.
Since pseudocode is an informal description of code, any particular piece of pseudocode means whatever the author intended it to mean. Usually the meaning is either obvious from context or the author provides some kind of key to the symbols they use.
In this case, the colon appears to be a range operator. But, you should not take that to mean that it will always be a range operator in any other pseudocode that you run across.
COMPLEMENT:
As Ferruccio
said, pseudocode is informal so it is interpreted according to the conventions that the writer uses or some conventions that are understandable for computer community members.
Nevertheless I give you here some examples to make it's meaning more clear for you in various situations :
Block indicator
foreach di in D :
...
Range (like your case)
for i in range (1 : 10) do
...
Block indicator
if (condition) :
Block indicator
function myFunc() :
Synonym for "so that"
sample from posterior S = {Theta(t) : t = 1,...,N}
Concatenation of two matrices horizontally
Z = X:Y
The bad news: there are even more different meanings for a simple colon!