Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalinteresting question about new and nothrow new Pin
George_George28-Jan-08 16:39
George_George28-Jan-08 16:39 
GeneralRe: interesting question about new and nothrow new Pin
Maxwell Chen28-Jan-08 16:51
Maxwell Chen28-Jan-08 16:51 
GeneralRe: interesting question about new and nothrow new Pin
George_George28-Jan-08 19:21
George_George28-Jan-08 19:21 
GeneralRe: interesting question about new and nothrow new Pin
David Crow29-Jan-08 2:50
David Crow29-Jan-08 2:50 
GeneralRe: interesting question about new and nothrow new Pin
George_George29-Jan-08 13:46
George_George29-Jan-08 13:46 
Generalhelp Pin
gentleguy28-Jan-08 15:57
gentleguy28-Jan-08 15:57 
GeneralRe: help Pin
David Crow28-Jan-08 16:21
David Crow28-Jan-08 16:21 
GeneralRe: help Pin
gentleguy28-Jan-08 20:30
gentleguy28-Jan-08 20:30 
the following is my code:

for (int i = 0;i<10;i++)
{
minValue = fitness[9];

if (fitness[i] <= minValue )
{
minValue = fitness[bb];
for (int j = 0; j<3; j++)

for (int k = 0; k<4; k++)

gbest[i][j][k]=x[i][j][k];

for (int ii =0; ii<10; ii++)
{
for (int j = 0; j<3; j++)
{
for (int k = 0; k<4; k++)
{

vn[ii][j][k] = w*v[ii][j][k] + c1*rand()*(pbestArray[ii][j][k]-x[ii] [j][k]) + c2*rand()*(gbest[i][j][k]-x[ii][j][k]);
v[ii][j][k] = vn[ii][j][k];
xn[ii][j][k] = x[ii][j][k] + v[ii][j][k] + a1*(g-fitness[ii]);
x[ii][j][k] = xn[ii][j][k];
}
}
}
}
}

}

dear friend

firstly, i need to determine gbest in first 10 loop, and then the following formaula is following second l0 loop apart from gbest, because gbest is constant relave to second loop..but how to make gbest is a constant,,no change according my first loop.....so far, gbest could not get value from s[ii][j][k], i don't know why? could help me? thanks

Li Zhiyuan

5/10/2006

GeneralRe: help Pin
CPallini28-Jan-08 21:47
mveCPallini28-Jan-08 21:47 
QuestionRe: help Pin
David Crow29-Jan-08 2:44
David Crow29-Jan-08 2:44 
GeneralRe: help Pin
KarstenK29-Jan-08 3:06
mveKarstenK29-Jan-08 3:06 
Generalgetchar() help Pin
gentleguy28-Jan-08 15:04
gentleguy28-Jan-08 15:04 
QuestionRe: getchar() help Pin
David Crow28-Jan-08 15:56
David Crow28-Jan-08 15:56 
GeneralGetForegroundWindow() Pin
dellthinker28-Jan-08 8:12
dellthinker28-Jan-08 8:12 
GeneralRe: GetForegroundWindow() Pin
David Crow28-Jan-08 8:20
David Crow28-Jan-08 8:20 
GeneralRe: GetForegroundWindow() Pin
dellthinker28-Jan-08 13:20
dellthinker28-Jan-08 13:20 
GeneralRe: GetForegroundWindow() Pin
Mark Salsbery28-Jan-08 13:47
Mark Salsbery28-Jan-08 13:47 
GeneralRe: GetForegroundWindow() Pin
dellthinker28-Jan-08 14:48
dellthinker28-Jan-08 14:48 
AnswerRe: GetForegroundWindow() Pin
fd012900228-Jan-08 13:51
fd012900228-Jan-08 13:51 
Generaltest Pin
Member 462175228-Jan-08 7:44
Member 462175228-Jan-08 7:44 
GeneralRe: test Pin
CPallini28-Jan-08 7:56
mveCPallini28-Jan-08 7:56 
GeneralRe: test Pin
Hamid_RT28-Jan-08 19:16
Hamid_RT28-Jan-08 19:16 
GeneralGDI+ NOISE problem Pin
followait28-Jan-08 5:32
followait28-Jan-08 5:32 
GeneralRe: GDI+ NOISE problem Pin
Iain Clarke, Warrior Programmer28-Jan-08 5:34
Iain Clarke, Warrior Programmer28-Jan-08 5:34 
GeneralRe: GDI+ NOISE problem Pin
followait28-Jan-08 5:46
followait28-Jan-08 5:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.