[PDP-discuss] Using input layer for both input and target?
Frank Leoné
ftmleone at hotmail.com
Fri Jun 1 04:29:29 MDT 2007
I made a script alright and it works. Possibly it is also useful for other,
so, this is the code:
void setEventSpecs (int numEnv, int numSpecOne, int numSpecOther)
{
int e = 0;
int t = 0;
for (e = 0; e < .projects.environments[numEnv].events.gp.size; e++)
for (t = 0; t < .projects.environments[numEnv].events.gp[e].size; t++)
{
if (t == 0)
.projects[0].environments[numEnv].events.gp[e][t].spec.spec =
.projects[0].environments[numEnv].event_specs[numSpecOne];
else
.projects[0].environments[numEnv].events.gp[e][t].spec.spec =
.projects[0].environments[numEnv].event_specs[numSpecOther];
}
}
It receives the number of the environment, the number of the event spec for
the first event and the number of the event spec for the other events. Next
it just applies them.
It should be easy enough to change it to a more general case, e.g. by using
an array of targetspecs with the same length as one group of events and
applying them.
void setEventSpecs (int numEnv, int targetSpecs[])
{
int e = 0;
int t = 0;
for (e = 0; e < .projects.environments[numEnv].events.gp.size; e++)
for (t = 0; t < .projects.environments[numEnv].events.gp[e].size; t++)
{
.projects[0].environments[numEnv].events.gp[e][t].spec.spec =
targetSpecs[t];
}
}
Didn't test this one, but should work. Hopefully its useful for someone and
something like this can be included in the upcoming version.
kind regards,
Frank
_________________________________________________________________
Hotmail en Messenger on the move http://www.msn.nl/services
More information about the PDP-Discuss
mailing list