Skip to content

Instantly share code, notes, and snippets.

@TaylorHawkes
Created January 17, 2023 19:18
Show Gist options
  • Save TaylorHawkes/cea073a80ab8f7c0eafd9000b3ee6551 to your computer and use it in GitHub Desktop.
Save TaylorHawkes/cea073a80ab8f7c0eafd9000b3ee6551 to your computer and use it in GitHub Desktop.
python to c++ converter tool online
#include <iostream >
#include <fstream >
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
using namespace std;
class particle
{
public:
double *position , *velocity , cost , *bestPosition , bestCost;
bool sortBool = true;
particle ()
{}
void allocation(int numbDecisionVariable)
{
position = new double[numbDecisionVariable ];
velocity = new double[numbDecisionVariable ];
bestPosition = new double[numbDecisionVariable ];
}
};
@TaylorHawkes
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment