Defines | Functions | Variables
test_pso.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <unistd.h>
Include dependency graph for test_pso.cpp:

Go to the source code of this file.

Defines

#define c1   1.49445
#define c2   1.49445
#define dim   2
#define maxgen   1001
#define PI   3.1415926
#define popmax   5.12
#define popmin   -5.12
#define sizepop   20
#define Vmax   1
#define Vmin   -1

Functions

double func (double *arr)
int main (void)
double * max (double *fit, int size)
void pop_init (void)
void PSO_func (void)

Variables

double fitness [sizepop]
double fitnessgbest
double fitnesspbest [sizepop]
double gbest [dim]
double genbest [maxgen][dim]
double pbest [sizepop][dim]
double pop [sizepop][dim]
double result [maxgen]
double V [sizepop][dim]

Define Documentation

#define c1   1.49445

Definition at line 11 of file test_pso.cpp.

#define c2   1.49445

Definition at line 12 of file test_pso.cpp.

#define dim   2

Definition at line 19 of file test_pso.cpp.

#define maxgen   1001

Definition at line 13 of file test_pso.cpp.

#define PI   3.1415926

Definition at line 20 of file test_pso.cpp.

#define popmax   5.12

Definition at line 15 of file test_pso.cpp.

#define popmin   -5.12

Definition at line 16 of file test_pso.cpp.

#define sizepop   20

Definition at line 14 of file test_pso.cpp.

#define Vmax   1

Definition at line 17 of file test_pso.cpp.

#define Vmin   -1

Definition at line 18 of file test_pso.cpp.


Function Documentation

double func ( double *  arr)

Definition at line 33 of file test_pso.cpp.

int main ( void  )

Definition at line 158 of file test_pso.cpp.

double* max ( double *  fit,
int  size 
)

Definition at line 55 of file test_pso.cpp.

void pop_init ( void  )

Definition at line 42 of file test_pso.cpp.

void PSO_func ( void  )

Definition at line 72 of file test_pso.cpp.


Variable Documentation

double fitness[sizepop]

Definition at line 24 of file test_pso.cpp.

double fitnessgbest

Definition at line 29 of file test_pso.cpp.

Definition at line 28 of file test_pso.cpp.

double gbest[dim]

Definition at line 27 of file test_pso.cpp.

double genbest[maxgen][dim]

Definition at line 30 of file test_pso.cpp.

double pbest[sizepop][dim]

Definition at line 26 of file test_pso.cpp.

double pop[sizepop][dim]

Definition at line 22 of file test_pso.cpp.

double result[maxgen]

Definition at line 25 of file test_pso.cpp.

double V[sizepop][dim]

Definition at line 23 of file test_pso.cpp.



test_statistic
Author(s):
autogenerated on Thu Jun 6 2019 18:52:37