<commit_before>// Example for NormalForm library
//
// Normal form for Henon-Heiles hamiltonian

#include "stdafx.h"

#include <cmath>
#include <complex>
#include <iostream>
#include <iomanip>

// enable some logging output
#define NF_LOGGING

#include "normalform/normalform.h"
#include "normalform/prettyprint.h"


using namespace normalform;
using namespace std;


#ifdef MSVC
int _tmain(int argc, _TCHAR* argv[])
#else
int main(int argc, char* argv[])
#endif
{
	const unsigned int N = 2;     // number of degree of freedom
	const unsigned int order = 5; // normalization order

	typedef CPolynom<N>     Polynom;
	typedef CMonomCoeff<N>  Term;
	typedef complex<double> Complex;

	// construct hamiltonian
	IntPower m1000[] = {1,0,0,0}; // Q1 monom powers
	IntPower m0100[] = {0,1,0,0}; // Q2 monom powers
	IntPower m0010[] = {0,0,1,0}; // P1 monom powers
	IntPower m0001[] = {0,0,0,1}; // P2 monom powers
	// complex coordinates to diagonalize linear part
	// q1 = (Q1+i*P1)/sqrt(2),  p1 = (i*Q1+P1)/sqrt(2)
	// q2 = (Q2+i*P2)/sqrt(2),  p2 = (i*Q2+P2)/sqrt(2)
	Polynom q1 = Polynom() + Term(Complex(sqrt(0.5),0), m1000) + Term(Complex(0,sqrt(0.5)), m0010);
	Polynom p1 = Polynom() + Term(Complex(0,sqrt(0.5)), m1000) + Term(Complex(sqrt(0.5),0), m0010);
	Polynom q2 = Polynom() + Term(Complex(sqrt(0.5),0), m0100) + Term(Complex(0,sqrt(0.5)), m0001);
	Polynom p2 = Polynom() + Term(Complex(0,sqrt(0.5)), m0100) + Term(Complex(sqrt(0.5),0), m0001);
<commit_msg>use just int in example.cpp (for convenience)<commit_after>// Example for NormalForm library
//
// Normal form for Henon-Heiles hamiltonian

#include "stdafx.h"

#include <cmath>
#include <complex>
#include <iostream>
#include <iomanip>

// enable some logging output
#define NF_LOGGING

#include "normalform/normalform.h"
#include "normalform/prettyprint.h"


using namespace normalform;
using namespace std;


#ifdef MSVC
int _tmain(int argc, _TCHAR* argv[])
#else
int main(int argc, char* argv[])
#endif
{
	const int N = 2;     // number of degree of freedom
	const int order = 5; // normalization order

	typedef CPolynom<N>     Polynom;
	typedef CMonomCoeff<N>  Term;
	typedef complex<double> Complex;

	// construct hamiltonian
	IntPower m1000[] = {1,0,0,0}; // Q1 monom powers
	IntPower m0100[] = {0,1,0,0}; // Q2 monom powers
	IntPower m0010[] = {0,0,1,0}; // P1 monom powers
	IntPower m0001[] = {0,0,0,1}; // P2 monom powers
	// complex coordinates to diagonalize linear part
	// q1 = (Q1+i*P1)/sqrt(2),  p1 = (i*Q1+P1)/sqrt(2)
	// q2 = (Q2+i*P2)/sqrt(2),  p2 = (i*Q2+P2)/sqrt(2)
	Polynom q1 = Polynom() + Term(Complex(sqrt(0.5),0), m1000) + Term(Complex(0,sqrt(0.5)), m0010);
	Polynom p1 = Polynom() + Term(Complex(0,sqrt(0.5)), m1000) + Term(Complex(sqrt(0.5),0), m0010);
	Polynom q2 = Polynom() + Term(Complex(sqrt(0.5),0), m0100) + Term(Complex(0,sqrt(0.5)), m0001);
	Polynom p2 = Polynom() + Term(Complex(0,sqrt(0.5)), m0100) + Term(Complex(sqrt(0.5),0), m0001);

{'fraction_non_alphanumeric': 0.17517006802721088, 'fraction_numerical': 0.07755102040816327, 'mean_word_length': 4.507490636704119, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3979303', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1159, 'n_words': 292}