I understand a good bit of C++. I am what you will call an Intermediate Learner. For my Internship I was given a Research Paper of the following topic: Cardinality Constraint Portfolio Optimization Problem. Some of you may or may not have heard of it. If anyone wants to go through the paper I have provided a link. I want to discuss this paper with someone on this thread who can clear my doubts about the first Algorithm in the paper. The Algorithm seems to be in C#.
It is either telling you how big an array of unknown size is or something along those lines.
for example if you have an array of 10 things, but you (for some probably unrealistic reason) did not know that, it would return 10.
I didnt dig into the paper. It may say what it is, did you search the text of the paper for all mentions to see? Does it seem to be doing what I said above? If the answer to both of those is no, you either have to figure it out or find another paper, one that is more carefully written.
its not real code. We have to guess. This is gibberish to me... it looks like it is assigning one array from another array via a set a single value function, which is of course nonsense.
It might make sense if setvalue is a "fill" command, in which case it is very poorly named. If it is a filler, then it is filling parent array with either z rc times or rc z times, unclear. Then child is set to that array? that seems idiotic as well though, because in that case, why not fill child directly with the function? It may be "clever" and assign both arrays at once, one with the function and another with the assignment statement, in which case the author should be taken out back and given a stern talking to, possibly involving a baseball bat.
My best guess is that it assigns a single value in parent, then child is assigned all of parent, including the new changed value. What that means to the algorithm is beyond me.
Liagkouras, K. & Metaxiotis, K. (2016). A new efficiently encoded multiobjective algorithm for the solution of the cardinality constrained portfolio optimization problem. Annals of Operations Research, pp 1-39.
It looks like you're talking about the statement at the bottom of Fig 2 on page 13. The details of the algorithm, including an example, are described in the following pages, why not read through that to see if you can figure out what they mean? I agree that it the meaning of the statement isn't very clear, which sort of defeats the purpose of pseudo-code. :(