blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a0b7eaa5292d0c1d2d923aec6864f6849c837614
|
81e8e6b4bb4af832ed7230b299b9cc9bb98a0b12
|
/src/io/GLGPUDataset.cpp
|
e4f96c8144b8cd52055bb875faf4a49415854be6
|
[
"LicenseRef-scancode-other-permissive"
] |
permissive
|
cquammen/vortexfinder2
|
293d4d23e67056b6963b0be91d38dbcb575d33b6
|
a66df322a201112bf06738b5ad40d58a308c9d12
|
refs/heads/master
| 2022-12-11T13:19:49.841436
| 2019-03-29T19:56:51
| 2019-03-29T19:56:51
| 291,189,298
| 1
| 0
|
NOASSERTION
| 2020-08-29T03:05:05
| 2020-08-29T02:55:57
| null |
UTF-8
|
C++
| false
| false
| 11,830
|
cpp
|
GLGPUDataset.cpp
|
#include "GLGPUDataset.h"
#include "GLGPU_IO_Helper.h"
#include "common/Utils.hpp"
#include "glpp/GL_post_process.h"
#include <cassert>
#include <cmath>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <fstream>
#include <glob.h>
#if WITH_PROTOBUF
#include "common/DataInfo.pb.h"
#endif
template <typename T>
void free1(T **p)
{
if (*p != NULL) {
free(*p);
*p = NULL;
}
}
GLGPUDataset::GLGPUDataset()
{
memset(_rho, 0, sizeof(float*)*2);
memset(_phi, 0, sizeof(float*)*2);
memset(_re, 0, sizeof(float*)*2);
memset(_im, 0, sizeof(float*)*2);
memset(_Jx, 0, sizeof(float*)*2);
memset(_Jy, 0, sizeof(float*)*2);
memset(_Jz, 0, sizeof(float*)*2);
}
GLGPUDataset::~GLGPUDataset()
{
for (int i=0; i<2; i++) {
free1(&_rho[i]);
free1(&_phi[i]);
free1(&_re[i]);
free1(&_im[i]);
free1(&_Jx[i]);
free1(&_Jy[i]);
free1(&_Jz[i]);
}
}
void GLGPUDataset::PrintInfo(int slot) const
{
const GLHeader &h = _h[slot];
fprintf(stderr, "dtype=%d\n", h.dtype);
fprintf(stderr, "dims={%d, %d, %d}\n", h.dims[0], h.dims[1], h.dims[2]);
fprintf(stderr, "pbc={%d, %d, %d}\n", h.pbc[0], h.pbc[1], h.pbc[2]);
fprintf(stderr, "origins={%f, %f, %f}\n", h.origins[0], h.origins[1], h.origins[2]);
fprintf(stderr, "lengths={%f, %f, %f}\n", h.lengths[0], h.lengths[1], h.lengths[2]);
fprintf(stderr, "cell_lengths={%f, %f, %f}\n", h.cell_lengths[0], h.cell_lengths[1], h.cell_lengths[2]);
fprintf(stderr, "B={%f, %f, %f}\n", h.B[0], h.B[1], h.B[2]);
fprintf(stderr, "Kex=%f\n", h.Kex);
fprintf(stderr, "Jxext=%f\n", h.Jxext);
fprintf(stderr, "V=%f\n", h.V);
fprintf(stderr, "time=%f\n", h.time);
fprintf(stderr, "fluctuation_amp=%f\n", h.fluctuation_amp);
}
void GLGPUDataset::SerializeDataInfoToString(std::string& buf) const
{
#if WITH_PROTOBUF
PBDataInfo pb;
pb.set_model(PBDataInfo::GLGPU);
pb.set_name(_data_name);
if (Lengths()[0]>0) {
pb.set_ox(Origins()[0]);
pb.set_oy(Origins()[1]);
pb.set_oz(Origins()[2]);
pb.set_lx(Lengths()[0]);
pb.set_ly(Lengths()[1]);
pb.set_lz(Lengths()[2]);
}
pb.set_bx(B()[0]);
pb.set_by(B()[1]);
pb.set_bz(B()[2]);
pb.set_kex(Kex());
pb.set_dx(dims()[0]);
pb.set_dy(dims()[1]);
pb.set_dz(dims()[2]);
pb.set_pbc_x(pbc()[0]);
pb.set_pbc_y(pbc()[0]);
pb.set_pbc_z(pbc()[0]);
pb.SerializeToString(&buf);
#endif
}
bool GLGPUDataset::OpenDataFile(const std::string &filename)
{
std::ifstream ifs;
ifs.open(filename.c_str(), std::ifstream::in);
if (!ifs.is_open()) return false;
char fname[1024];
_filenames.clear();
while (ifs.getline(fname, 1024)) {
// std::cout << fname << std::endl;
_filenames.push_back(fname);
}
ifs.close();
_data_name = filename;
return true;
}
bool GLGPUDataset::OpenDataFileByPattern(const std::string &pattern)
{
glob_t results;
glob(pattern.c_str(), 0, NULL, &results);
_filenames.clear();
for (int i=0; i<results.gl_pathc; i++)
_filenames.push_back(results.gl_pathv[i]);
// fprintf(stderr, "found %lu files\n", _filenames.size());
return _filenames.size()>0;
}
void GLGPUDataset::CloseDataFile()
{
_filenames.clear();
}
bool GLGPUDataset::LoadTimeStep(int timestep, int slot)
{
assert(timestep>=0 && timestep<=_filenames.size());
bool succ = false;
const std::string &filename = _filenames[timestep];
// load
if (OpenBDATDataFile(filename, slot)) succ = true;
else if (OpenLegacyDataFile(filename, slot)) succ = true;
if (!succ) return false;
// if (_precompute_supercurrent)
// ComputeSupercurrentField(slot);
// ModulateKex(slot);
// fprintf(stderr, "loaded time step %d, %s\n", timestep, _filenames[timestep].c_str());
SetTimeStep(timestep, slot);
return true;
}
void GLGPUDataset::GetDataArray(GLHeader& h, float **rho, float **phi, float **re, float **im, float **J, int slot)
{
h = _h[slot];
*rho = _rho[slot];
*phi = _phi[slot];
*re = _re[slot];
*im = _im[slot];
// *J = _J[slot];
*J = NULL; // FIXME
}
bool GLGPUDataset::BuildDataFromArray(const GLHeader& h, const float *rho, const float *phi, const float *re, const float *im)
{
memcpy(&_h[0], &h, sizeof(GLHeader));
const int count = h.dims[0]*h.dims[1]*h.dims[2];
// _psi[0] = (float*)realloc(_psi[0], sizeof(float)*count*2);
_rho[0] = (float*)malloc(sizeof(float)*count);
_phi[0] = (float*)malloc(sizeof(float)*count);
_re[0] = (float*)malloc(sizeof(float)*count);
_im[0] = (float*)malloc(sizeof(float)*count);
memcpy(_rho[0], rho, sizeof(float)*count);
memcpy(_phi[0], phi, sizeof(float)*count);
memcpy(_re[0], re, sizeof(float)*count);
memcpy(_im[0], im, sizeof(float)*count);
return true;
}
#if 0
void GLGPUDataset::ModulateKex(int slot)
{
float K = Kex(slot);
float *re = slot == 0 ? _re : _re1,
*im = slot == 0 ? _im : _im1;
for (int i=0; i<dims()[0]; i++)
for (int j=0; j<dims()[1]; j++)
for (int k=0; k<dims()[2]; k++) {
const int idx[3] = {i, j, k};
NodeIdType nid = Idx2Nid(idx);
float x = i * CellLengths()[0] + Origins()[0];
float rho = sqrt(re[nid]*re[nid] + im[nid]*im[nid]),
// phi = atan2(im[nid], re[nid]) - K*x;
phi = atan2(im[nid], re[nid]) + K*x;
re[nid] = rho * cos(phi);
im[nid] = rho * sin(phi);
}
}
#endif
void GLGPUDataset::RotateTimeSteps()
{
std::swap(_rho[0], _rho[1]);
std::swap(_phi[0], _phi[1]);
std::swap(_re[0], _re[1]);
std::swap(_im[0], _im[1]);
std::swap(_Jx[0], _Jx[1]);
std::swap(_Jy[0], _Jy[1]);
std::swap(_Jz[0], _Jz[1]);
GLDataset::RotateTimeSteps();
}
bool GLGPUDataset::OpenLegacyDataFile(const std::string& filename, int slot)
{
int ndims;
_h[slot].dtype = DTYPE_CA02;
free1(&_rho[slot]);
free1(&_phi[slot]);
free1(&_re[slot]);
free1(&_im[slot]);
free1(&_Jx[slot]);
free1(&_Jy[slot]);
free1(&_Jz[slot]);
if (!::GLGPU_IO_Helper_ReadLegacy(
filename, _h[slot], &_rho[slot], &_phi[slot], &_re[slot], &_im[slot], &_Jx[slot], &_Jy[slot], &_Jz[slot], false, _precompute_supercurrent))
return false;
else
return true;
}
void GLGPUDataset::WriteNetCDF(const std::string& filename, int slot) {
GLGPU_IO_Helper_WriteNetCDF(
filename, _h[slot],
_rho[slot], _phi[slot],
_re[slot], _im[slot],
_Jx[slot], _Jy[slot], _Jz[slot]);
}
void GLGPUDataset::WriteRaw(const std::string& prefix, int slot) {
const int count = _h[0].dims[0] * _h[0].dims[1] * _h[0].dims[2];
FILE *fp = fopen(prefix.c_str(), "wb");
fwrite(_Jx[slot], sizeof(float), count, fp);
fwrite(_Jy[slot], sizeof(float), count, fp);
fwrite(_Jz[slot], sizeof(float), count, fp);
fclose(fp);
}
bool GLGPUDataset::OpenBDATDataFile(const std::string& filename, int slot)
{
int ndims;
_h[slot].dtype = DTYPE_BDAT;
free1(&_rho[slot]);
free1(&_phi[slot]);
free1(&_re[slot]);
free1(&_im[slot]);
free1(&_Jx[slot]);
free1(&_Jy[slot]);
free1(&_Jz[slot]);
if (!::GLGPU_IO_Helper_ReadBDAT(
filename, _h[slot], &_rho[slot], &_phi[slot], &_re[slot], &_im[slot], &_Jx[slot], &_Jy[slot], &_Jz[slot], false, _precompute_supercurrent))
return false;
else
return true;
}
#if 0
float Ax(const float X[3], int slot=0) const {if (By()>0) return -Kex(slot); else return -X[1]*Bz()-Kex(slot);}
// float Ax(const float X[3], int slot=0) const {if (By()>0) return 0; else return -X[1]*Bz();}
float Ay(const float X[3], int slot=0) const {if (By()>0) return X[0]*Bz(); else return 0;}
float Az(const float X[3], int slot=0) const {if (By()>0) return -X[0]*By(); else return X[1]*Bx();}
#endif
float GLGPUDataset::Rho(int i, int j, int k, int slot) const
{
int idx[3] = {i, j, k};
NodeIdType nid = Idx2Nid(idx);
return Rho(nid, slot);
}
float GLGPUDataset::Phi(int i, int j, int k, int slot) const
{
int idx[3] = {i, j, k};
NodeIdType nid = Idx2Nid(idx);
return Phi(nid, slot);
}
float GLGPUDataset::Re(int i, int j, int k, int slot) const
{
int idx[3] = {i, j, k};
NodeIdType nid = Idx2Nid(idx);
return Re(nid, slot);
}
float GLGPUDataset::Im(int i, int j, int k, int slot) const
{
int idx[3] = {i, j, k};
NodeIdType nid = Idx2Nid(idx);
return Im(nid, slot);
}
bool GLGPUDataset::A(const float X[3], float A[3], int slot) const
{
if (B(slot)[1]>0) {
A[0] = -Kex(slot);
A[1] = X[0] * B(slot)[2];
A[2] = -X[0] * B(slot)[1];
} else {
A[0] = -X[1] * B(slot)[2] - Kex(slot);
A[1] = 0;
A[2] = X[1] * B(slot)[0];
}
return true;
}
bool GLGPUDataset::A(NodeIdType n, float A_[3], int slot) const
{
float X[3];
Pos(n, X);
return A(X, A_, slot);
}
void GLGPUDataset::Nid2Idx(NodeIdType id, int *idx) const
{
int s = dims()[0] * dims()[1];
int k = id / s;
int j = (id - k*s) / dims()[0];
int i = id - k*s - j*dims()[0];
idx[0] = i; idx[1] = j; idx[2] = k;
}
NodeIdType GLGPUDataset::Idx2Nid(const int *idx) const
{
for (int i=0; i<3; i++)
if (idx[i]<0 || idx[i]>=dims()[i])
return UINT_MAX;
return idx[0] + dims()[0] * (idx[1] + dims()[1] * idx[2]);
}
void GLGPUDataset::Idx2Pos(const int idx[], float pos[]) const
{
for (int i=0; i<3; i++)
pos[i] = idx[i] * CellLengths()[i] + Origins()[i];
}
void GLGPUDataset::Pos2Idx(const float pos[], int idx[]) const
{
for (int i=0; i<3; i++)
idx[i] = (pos[i] - Origins()[i]) / CellLengths()[i];
// TODO: perodic boundary conditions
}
void GLGPUDataset::Pos2Grid(const float pos[], float gpos[]) const
{
for (int i=0; i<3; i++)
gpos[i] = (pos[i] - Origins()[i]) / CellLengths()[i];
}
bool GLGPUDataset::Pos(NodeIdType id, float X[3]) const
{
int idx[3];
Nid2Idx(id, idx);
Idx2Pos(idx, X);
return true;
}
bool GLGPUDataset::Supercurrent(const float X[2], float J[3], int slot) const
{
// TODO
return false;
}
bool GLGPUDataset::Supercurrent(NodeIdType, float J[3], int slot) const
{
// TODO
return false;
}
#if 0
float GLGPUDataset::QP(const float X0[], const float X1[]) const
{
const float *L = Lengths(),
*O = Origins();
float d[3] = {X1[0] - X0[0], X1[1] - X0[1], X1[2] - X0[2]};
int p[3] = {0}; // 0: not crossed; 1: positive; -1: negative
for (int i=0; i<3; i++) {
d[i] = X1[i] - X0[i];
if (d[i]>L[i]/2) {d[i] -= L[i]; p[i] = 1;}
else if (d[i]<-L[i]/2) {d[i] += L[i]; p[i] = -1;}
}
const float X[3] = {X0[0] - O[0], X0[1] - O[1], X0[2] - O[2]};
if (By()>0 && p[0]!=0) { // By>0
return p[0] * L[0] * (Bz()*X[1] - By()*X[2]);
} else if (p[1]!=0) {
return p[1] * L[1] * (Bx()*X[2] - Bz()*X[0]);
} else return 0.0;
}
#else
float GLGPUDataset::QP(const float X0_[], const float X1_[], int slot) const
{
float X0[3], X1[3];
float N[3];
for (int i=0; i<3; i++) {
X0[i] = (X0_[i] - Origins()[i]) / CellLengths()[i];
X1[i] = (X1_[i] - Origins()[i]) / CellLengths()[i];
N[i] = dims()[i];
}
if (B(slot)[1]>0 && fabs(X1[0]-X0[0])>N[0]/2) {
// TODO
assert(false);
return 0.0;
} else if (fabs(X1[1]-X0[1])>N[1]/2) {
// pbc j
float dj = X1[1] - X0[1];
if (dj > N[1]/2) dj = dj - N[1];
else if (dj < -N[1]/2) dj = dj + N[1];
float dist = fabs(dj);
float dist1 = fabs(fmod1(X0[1] + N[1]/2, N[1]) - N[1]);
float f = dist1/dist;
// pbc k
float dk = X1[2] - X0[2];
if (dk > N[2]/2) dk = dk - N[2];
else if (dk < -N[2]/2) dk = dk + N[2];
float k = fmod1(X0[2] + f*dk, N[2]);
// pbc i
float di = X1[0] - X0[0];
if (di > N[0]/2) di = di - N[0];
else if (di < -N[0]/2) di = di + N[0];
float i = fmod1(X0[0] + f*dk, N[0]);
float sign = dj>0 ? 1 : -1;
float qp = sign * (k*CellLengths()[2]*B(slot)[0]*Lengths()[1] - i*CellLengths()[0]*B(slot)[2]*Lengths()[1]);
return qp;
}
return 0.0;
}
#endif
|
36012d1df7249d7ad7c71b56265adc50d538a0d3
|
0ae50405d60e245a025c6f984cb315a7afeb6833
|
/pointlike/HealpixDiffuseFunc.h
|
e9ac95e588caf5d6617a42ef9b052db26297bb70
|
[
"BSD-3-Clause"
] |
permissive
|
fermi-lat/pointlike
|
65977ee0085670c24800982ffa0855dba6c46680
|
edcdc696c3300e2f26ff3efa92a1bd9790074247
|
refs/heads/master
| 2021-11-11T19:18:42.676557
| 2020-01-23T20:57:54
| 2020-01-23T20:57:54
| 103,187,044
| 1
| 3
|
BSD-3-Clause
| 2021-11-05T15:33:32
| 2017-09-11T20:52:43
|
Python
|
UTF-8
|
C++
| false
| false
| 3,136
|
h
|
HealpixDiffuseFunc.h
|
/** @file HealpixDiffuseFunc.h
@brief declare class HealpixDiffuseFunc
$Header: /nfs/slac/g/glast/ground/cvs/pointlike/pointlike/HealpixDiffuseFunc.h,v 1.1 2008/10/20 23:40:12 markusa Exp $
*/
#ifndef skymaps_HealpixDiffuseFunc_h
#define skymaps_HealpixDiffuseFunc_h
#include "skymaps/SkySpectrum.h"
#include "skymaps/SkyImage.h"
#include "healpix/HealpixArray.h"
#include "tip/IFileSvc.h"
#include "astro/SkyFunction.h"
#include "astro/SkyDir.h"
#include <vector>
#include <cassert>
namespace skymaps {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/** @class HealpixDiffuseFunc
@brief a SkyFunction that adapts a diffuse map. also includes extragal diffuse
*/
class HealpixDiffuseFunc : public skymaps::SkySpectrum {
public:
/** @brief ctor that reads a Healpix SkyMap represention of the diffuse, with multple layers for
eneries.
@param diffuse_healpix_file Name of file. It must have an extension ENERGIES with the corresponding energy valuse
@param energy[1000] initial energy for the SkyFunction
@param interpolate[true] interpolate the input map
*/
enum unitType {COUNTS,DIFFCOUNTS,DENSITY,DIFFDENSITY,FLUX};
HealpixDiffuseFunc(const std::string& diffuse_healpix_file, unitType u=COUNTS, double exposure=1., double energy=1000., bool interpolate=true);
virtual ~HealpixDiffuseFunc();
double isotropicFlux(double energy) const; ///< access to an isotropic flux component
///@brief interpolate table
///@param e energy in MeV
virtual double value (const astro::SkyDir& dir, double e) const;
///@brief integral for the energy limits, in the given direction
virtual double integral(const astro::SkyDir& dir, double a, double b) const;
virtual std::string name() const {return m_name;};
//-------------------------------------------------------
/** @brief set vector of values for set of energy bins
@param dir direction
@param energies vector of the bin edges.
@return result vector of the values
*/
std::vector<double> integral(const astro::SkyDir& dir, const std::vector<double>&energies) const;
/// @return number of layers
size_t layers()const { return m_energies.size();}
class FitsIO {
public:
FitsIO::FitsIO(const std::string & filename);
FitsIO::~FitsIO();
healpix::HealpixArray<std::vector<double> >& skymap(){ return *m_skymap;};
std::vector<double>& energies(){ return m_energies; };
private:
void read(const std::string & filename);
tip::IFileSvc& fileSvc;
healpix::HealpixArray<std::vector<double> > * m_skymap;
std::vector<double> m_energies;
};
private:
std::string m_name;
FitsIO m_fitio;
healpix::HealpixArray<std::vector<double> >& m_skymap; ///< skymap
std::vector<double>& m_energies; ///< list of energies
unitType m_unit;
double m_exposure;
size_t layer(double e)const;
double m_emin, m_emax;
double m_solidAngle;
};
} // namespace skymaps
#endif
|
a8d4a2c69e2e30ca86d0b4c962b936748d3d83fb
|
9851c3dca7338965d7fc57b55ef33ad35a1af30a
|
/Account_m/Account_m/Checking.cpp
|
ef9f0a7faceb7b59a34fd469784c2adf0944e01d
|
[] |
no_license
|
Cottonterrorrr/MyRepo
|
6b23e6ec4a6d02649c90f375a37509e16a937e96
|
a7a8f3c6de47e6fb7682bef55e7b5bb2dfc763df
|
refs/heads/main
| 2023-09-04T13:24:58.882508
| 2021-11-03T21:35:41
| 2021-11-03T21:35:41
| 424,386,841
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 318
|
cpp
|
Checking.cpp
|
#include "Checking.h"
#include <iostream>
Checking::~Checking()
{
}
void Checking::Withdraw(float amount)
{
if ((m_Balance-amount)>50)
{
Account::Withdraw(amount);
std::cout << " Withdraw " << std::endl;
}
else
{
std::cout << "inseficient Balance. balance need to be more than 50 " << std::endl;
}
}
|
9ec202b1dfb2a45f6ef8550465b8919eb36bf753
|
f3c8d78b4f8af9a5a0d047fbae32a5c2fca0edab
|
/Qt/my_old_programm/Games/Chess/other/checkmate/checkmate-checkmate/src/checkmate.h
|
65cf99905b609b386e77e21f20e1e2583013598d
|
[] |
no_license
|
RinatB2017/mega_GIT
|
7ddaa3ff258afee1a89503e42b6719fb57a3cc32
|
f322e460a1a5029385843646ead7d6874479861e
|
refs/heads/master
| 2023-09-02T03:44:33.869767
| 2023-08-21T08:20:14
| 2023-08-21T08:20:14
| 97,226,298
| 5
| 2
| null | 2022-12-09T10:31:43
| 2017-07-14T11:17:39
|
C++
|
UTF-8
|
C++
| false
| false
| 2,581
|
h
|
checkmate.h
|
/************************************************************************
* Copyright 2009 Miquel Canes Gonzalez miquelcanes@gmail.com *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
************************************************************************/
#ifndef kchess_kchess_H
#define kchess_kches_H
#include "gameconsole.h"
#include "board.h"
#include "gameinstance.h"
#include "movetablemodel.h"
#include "pieceinstance.h"
#include <QDockWidget>
#include <QActionGroup>
#include <QPoint>
#include <QXmlGuiWindow>
#include <QActionMenu>
#include <QGameDifficulty>
#include <QToggleAction>
class Checkmate : public KXmlGuiWindow
{
Q_OBJECT
public:
Checkmate(QWidget* parent=0);
virtual ~Checkmate();
public slots:
void newGame();
void setWhite(bool check);
void setBlack(bool check);
void setBothHuman(bool check);
void exit();
void difficultyChanged(KGameDifficulty::standardLevel difficulty);
void configureNewGame();
void pause(bool checked);
void showErrorMessage(const QString& message);
void showInfoMessage(const QString& message);
void showIllegalMove(const QString& message, const PieceInstance& movement);
void changeColor(bool white);
void showResult(const QString& message, ChessUtilities::Result res, const QPoint& kpos);
private:
void setupActions();
void setupLists();
GameInstance* m_game;
Board* m_board;
GameConsole* m_console;
QAbstractItemModel* m_movements;
QDockWidget* m_consoleDock;
QDockWidget* m_movementsDock;
KToggleAction* m_white;
KToggleAction* m_black;
KToggleAction* m_humans;
QActionGroup* m_playerColor;
};
#endif
|
5e0cb2117cbf73e967842c15feec707338e0c5ac
|
7a898faeba337793828cceffbf828f90fc25fcf1
|
/src/core/server/client_session.h
|
e8ef8a9d0830bc43b381a585b649e1393fcb0a55
|
[] |
no_license
|
N500/open-carom3d-server
|
83ac643ec6ea0f782176572ad05d10b31cd6696d
|
7b0c81a067a13ac9bd38120cc3b25b1e9fc20b34
|
refs/heads/master
| 2022-12-18T07:06:54.793294
| 2020-07-10T02:42:51
| 2020-07-10T02:42:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,894
|
h
|
client_session.h
|
//
// Created by CGR on 13/05/2020.
//
#ifndef __OPEN_CAROM3D_SERVER_CLIENT_SESSION_H__
#define __OPEN_CAROM3D_SERVER_CLIENT_SESSION_H__
#include <nettools/ntConnection.h>
#include <core/util/types.h>
#include <vector>
namespace core {
class Server;
class ClientSession {
protected:
Server& m_server;
nettools::ntConnection& m_ntClient;
u32 m_sessionId;
std::vector<u8> m_pendingDataToRead;
std::vector<u8> m_pendingDataToSend;
public:
ClientSession(nettools::ntConnection& ntClient, Server& server);
void appendReceivedData(unsigned char data[], unsigned int dataLen) {
m_pendingDataToRead.insert(m_pendingDataToRead.end(), data, data + dataLen);
}
void appendDataToSend(unsigned char data[], unsigned int dataLen) {
m_pendingDataToRead.insert(m_pendingDataToRead.end(), data, data + dataLen);
}
void discardReadPendingData(unsigned int dataLen) {
m_pendingDataToRead.erase(m_pendingDataToRead.begin(), m_pendingDataToRead.begin() + dataLen);
}
void discardSendPendingData(unsigned int dataLen) {
m_pendingDataToSend.erase(m_pendingDataToSend.begin(), m_pendingDataToSend.begin() + dataLen);
}
u8* pendingReadData() {
return &m_pendingDataToRead[0];
}
u8* pendingSendData() {
return &m_pendingDataToSend[0];
}
u32 pendingReadDataSize() const {
return m_pendingDataToRead.size();
}
u32 pendingSendDataSize() const {
return m_pendingDataToSend.size();
}
Server& server() const { return m_server; }
nettools::ntConnection& ntClient() const { return m_ntClient; }
u32 sessionId() const { return m_sessionId; }
};
}
#endif //__OPEN_CAROM3D_SERVER_CLIENTSESSION_H__
|
fd7c90ad64576f2ebf451ab648b9ba590716d39c
|
0d78e9f4547d2fc002b889bbe43ee444a39d08c8
|
/simple_demo/inc/MLNativeWindow.h
|
c42ebbae693cbd51719fbaaeeedf7b27192670d6
|
[] |
no_license
|
jafffy/LpGL_ML1
|
ff04ecc99b9508edcd84e125d7c2e75891553cd9
|
b486a6367a2f49fee79cf15a3f448ee1950e4ce8
|
refs/heads/master
| 2020-04-06T14:31:40.465558
| 2019-02-22T23:59:20
| 2019-02-23T07:29:56
| 157,544,524
| 0
| 0
| null | 2019-02-19T13:48:28
| 2018-11-14T12:19:56
|
C++
|
UTF-8
|
C++
| false
| false
| 296
|
h
|
MLNativeWindow.h
|
#ifndef MLNATIVEWINDOW_H_
#define MLNATIVEWINDOW_H_
#include "App.h"
class MLNativeWindowImpl;
class MLNativeWindow
{
public:
MLNativeWindow(App* app);
~MLNativeWindow();
int Start();
void OnRender(float dt);
private:
MLNativeWindowImpl* impl = nullptr;
};
#endif // MLNATIVEWINDOW_H_
|
370cf3441e78ef123a11cc6b2c7706c0012c6ce2
|
9c5309cc7e8cef9a60c84484b662fab8d0b5b32a
|
/esp8266_controller/IAnchor.hpp
|
d2d4ee337df8cb19e4240c026827fd95b9130580
|
[] |
no_license
|
msieverding/gondola
|
18c353acc4a8fc0e5c072fdd472b3f500990775a
|
108d027fd79323830952ecba03cc6cc7486d6408
|
refs/heads/master
| 2021-08-14T21:04:51.695501
| 2017-11-16T19:45:19
| 2017-11-16T19:45:19
| 99,155,564
| 1
| 0
| null | 2017-08-02T19:55:22
| 2017-08-02T19:55:22
| null |
UTF-8
|
C++
| false
| false
| 4,655
|
hpp
|
IAnchor.hpp
|
#ifndef _I_ANCHOR_HPP_
#define _I_ANCHOR_HPP_
#include "Coordinate.hpp"
#include "Config.hpp"
#include <functional>
#include <Ticker.h>
/**
* Class for an Anchor of a gondola
*/
class IAnchor
{
public:
/**
* Type for the callback, that should be executed, when movement is finished
*/
typedef std::function<bool(IAnchor *)> callback;
/**
* Constructor
* Values can be changed after construction.
* @param id id of the anchor
* @param anchorPosition position of the anchor
* @param spooledDistance current spooled distance of the anchor
* @param targetSpooledDistance target spooled distance of the anchor
* @param ropeOffset offset between motor and anchor in cm
*/
IAnchor(uint8_t id, Coordinate anchorPosition, float spooledDistance, float targetSpooledDistance, float ropeOffset);
/**
* vitual Destructor
*/
virtual ~IAnchor();
/**
* Set the mounting position of the anchor
* @param anchorPos mounting position
*/
void setAnchorPos(Coordinate anchorPos);
/**
* @return Coordinate, where the anchor is mounted
* Get the mounting position of the anchor
*/
Coordinate getAnchorPos();
/**
* Get the current spooled distance
* @return spooled distance
*/
float getSpooledDistance();
/**
* Get the time estimated current spooled distance
* @return estimated spooled distance
*/
virtual float getTimeEstimatedSpooledDistance();
/**
* Get the target spooled distance
* @return target spooled distance
*/
float getTargetSpooledDistance();
/**
* Get the time budget for the current movement
* @return travel time
*/
uint32_t getTravelTime();
/**
* Set the spooled distance initially
* @param spooledDistance spooled distance to set
*/
virtual bool setInitialSpooledDistance(float spooledDistance);
/**
* Set the new spooling targetDistance.
* @param targetDistance Distance to spool to
* @return steps needed for movement
*/
virtual uint32_t setTargetSpooledDistance(float targetDistance) = 0;
/**
* Start the movement.
* target spooled distance must be set with setTargetSpooledDistance before to
* setup the movement
* @param traveltime time budget for the movement
* @return success. Could be false if communication fails
*/
virtual bool startMovement(uint32_t traveltime);
/**
* Register a callback, that should be executed, when an initial spooled distance should be set
* @param cb callback to execute
*/
void registerInitCallback(callback cb);
/**
* Execute the initCallback if registered
* @return return of init callback
*/
virtual bool executeInitCallback();
/**
* Register a callback, that should be executed, when the movement is finished
* @param cb callback to execute
*/
void registerReadyCallback(callback cb);
/**
* Execute the readyCallback if registered
* @return return of readyCallback
*/
virtual bool executeReadyCallback();
/**
* Loop that should be executed with high frequency in the main arduino loop
*
* Makes the movemetn of the stepper motor when requestes
*/
virtual void loop() = 0;
/**
* Get the ID of the anchor
* @return Id of this anchor
*/
uint8_t getID();
/**
* Get the rope offset of the anchor
* @return rope offset
*/
float getRopeOffset();
/**
* Set the rope offset of the anchor
* @param offset offset in cm
*/
void setRopeOffset(float offset);
/**
* Round a float to a given precision
* @param f float to round
* @param precision precision of rounding
* @return rounded f
*/
static float roundPrecision(float f, float precision);
protected:
// Membervariables
uint8_t m_ID; //!< ID of Anchor. Could be used for a protocoll above
Coordinate m_AnchorPosition; //!< Mounting position
float m_SpooledDistance; //!< Current spooled distance
float m_TargetSpooledDistance; //!< Target spooled distance
callback m_InitCallback; //!< Callback to set an initial spooled distance
callback m_ReadyCallback; //!< Callback that should be executed to propagate the finished movement
uint32_t m_TravelTime; //!< Time budget for movement
float m_RopeOffset; //!< Spool that is spooled from motor to anchor
uint32_t m_StartTime; //!< start of movement
};
#endif /* _I_ANCHOR_HPP_ */
|
60c3a9f2a59014babb3f0bd4ebe4e6b65e506c6e
|
304ef9ff301d97451d01ed44e145a974ecf8ff87
|
/leetcode/111-minimum-depth-of-binary-tree.cpp
|
c4376691ae59be9a1f0eec87577e49aab02308e3
|
[] |
no_license
|
hartaacme/competitive-programming
|
eafb8d6ca09b000d2a6207e8e7f915742b440b79
|
0f77cb0c2240e687ce7813b4f5bf79a4d9828715
|
refs/heads/master
| 2021-01-17T15:55:03.735973
| 2016-07-12T06:52:47
| 2016-07-12T06:52:47
| 57,095,232
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 812
|
cpp
|
111-minimum-depth-of-binary-tree.cpp
|
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int minDepth(TreeNode* root) {
if (root == NULL) return false;
queue<TreeNode*> q;
q.push(root);
map<TreeNode*, int> mp;
mp[root] = 1;
int ans = 1000000000;
while (!q.empty()) {
TreeNode* front = q.front();
q.pop();
if (front->left == NULL && front->right == NULL) {
ans = min(ans, mp[front]);
continue;
}
if (front->left != NULL) {
mp[front->left] = 1 + mp[front];
q.push(front->left);
}
if (front->right != NULL) {
mp[front->right] = 1 + mp[front];
q.push(front->right);
}
}
return ans;
}
};
|
5566a1a3e084111ab7ee4c4aa9685caa0c54863a
|
8137ce070a3c30626d2a6afd3d3585eba9cb5370
|
/include/Search.h
|
2948820c3ffafcda5f7a49d5c4ff54cae3af697c
|
[] |
no_license
|
fiftyfivebells/not-so-deep-blue
|
b26f76463d30d4cd3d413481640151138e6606a7
|
05411edd5dd01e65af44a691d7a529546df8b5af
|
refs/heads/master
| 2022-07-29T17:42:34.504035
| 2020-05-17T20:37:03
| 2020-05-17T20:37:03
| 261,883,007
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 319
|
h
|
Search.h
|
#ifndef SEARCH_H
#define SEARCH_H
#include "Chessboard.h"
class Search {
public:
Search();
Search(Chessboard &);
void findBestMove();
//private:
Chessboard cb;
Move bestMove;
int alphaBeta(Chessboard &, int, int, int);
int evaluate(Chessboard &);
int quiesce(Chessboard &, int, int);
};
#endif
|
05f9ac4506d4fb714e56a79d143fc9d7ab6ca88f
|
639cdc6ce0e94a27b72ceede7a295ca621fae21a
|
/build/linux-build/Sources/src/zpp_nape/util/ZNPList_ZPP_InteractionGroup.cpp
|
6a87dcbf7e042ff2a65a56626585eaf01f0723d6
|
[
"MIT"
] |
permissive
|
HedgehogFog/TimeOfDeath
|
fb04bd6010115dc37b5d7777821f8fa53e1854a0
|
b78abacf940e1a88c8b987d99764ebb6876c5dc6
|
refs/heads/master
| 2020-04-27T10:48:43.759612
| 2019-03-18T04:30:47
| 2019-03-18T04:30:47
| 174,270,248
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| true
| 41,617
|
cpp
|
ZNPList_ZPP_InteractionGroup.cpp
|
// Generated by Haxe 4.0.0-preview.5
#include <hxcpp.h>
#ifndef INCLUDED_zpp_nape_dynamics_ZPP_InteractionGroup
#include <hxinc/zpp_nape/dynamics/ZPP_InteractionGroup.h>
#endif
#ifndef INCLUDED_zpp_nape_util_ZNPList_ZPP_InteractionGroup
#include <hxinc/zpp_nape/util/ZNPList_ZPP_InteractionGroup.h>
#endif
#ifndef INCLUDED_zpp_nape_util_ZNPNode_ZPP_InteractionGroup
#include <hxinc/zpp_nape/util/ZNPNode_ZPP_InteractionGroup.h>
#endif
HX_DEFINE_STACK_FRAME(_hx_pos_dbd726255778db80_12685_new,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","new",0x154a7934,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.new","zpp_nape/util/Lists.hx",12685,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12691_begin,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","begin",0xeee76ffd,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.begin","zpp_nape/util/Lists.hx",12691,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12698_setbegin,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","setbegin",0x12edb9f3,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.setbegin","zpp_nape/util/Lists.hx",12698,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12704_add,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","add",0x15409af5,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.add","zpp_nape/util/Lists.hx",12704,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12708_inlined_add,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_add",0x19f7e961,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_add","zpp_nape/util/Lists.hx",12708,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12754_addAll,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","addAll",0x1fbe9d2c,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.addAll","zpp_nape/util/Lists.hx",12754,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12764_insert,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","insert",0x1ea0d6e5,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.insert","zpp_nape/util/Lists.hx",12764,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12768_inlined_insert,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_insert",0x7c5153f9,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_insert","zpp_nape/util/Lists.hx",12768,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12812_pop,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","pop",0x154c0665,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.pop","zpp_nape/util/Lists.hx",12812,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12816_inlined_pop,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_pop",0x1a0354d1,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_pop","zpp_nape/util/Lists.hx",12816,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12850_pop_unsafe,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","pop_unsafe",0x04615600,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.pop_unsafe","zpp_nape/util/Lists.hx",12850,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12854_inlined_pop_unsafe,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_pop_unsafe",0x9497ed14,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_pop_unsafe","zpp_nape/util/Lists.hx",12854,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12876_remove,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","remove",0x854c2ff0,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.remove","zpp_nape/util/Lists.hx",12876,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12878_try_remove,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","try_remove",0x1b8b8bb4,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.try_remove","zpp_nape/util/Lists.hx",12878,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12912_inlined_remove,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_remove",0xe2fcad04,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_remove","zpp_nape/util/Lists.hx",12912,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12916_inlined_try_remove,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_try_remove",0xabc222c8,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_try_remove","zpp_nape/util/Lists.hx",12916,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12940_erase,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","erase",0xb1ae6eba,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.erase","zpp_nape/util/Lists.hx",12940,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12944_inlined_erase,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_erase",0xcda73026,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_erase","zpp_nape/util/Lists.hx",12944,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12990_splice,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","splice",0x40621928,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.splice","zpp_nape/util/Lists.hx",12990,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_12995_clear,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","clear",0x86ecf761,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.clear","zpp_nape/util/Lists.hx",12995,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13000_inlined_clear,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_clear",0xa2e5b8cd,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_clear","zpp_nape/util/Lists.hx",13000,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13005_reverse,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","reverse",0x4559dbf6,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.reverse","zpp_nape/util/Lists.hx",13005,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13021_empty,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","empty",0xae6bc061,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.empty","zpp_nape/util/Lists.hx",13021,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13026_size,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","size",0x8f30b16d,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.size","zpp_nape/util/Lists.hx",13026,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13029_has,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","has",0x1545e82e,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.has","zpp_nape/util/Lists.hx",13029,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13033_inlined_has,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","inlined_has",0x19fd369a,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.inlined_has","zpp_nape/util/Lists.hx",13033,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13064_front,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","front",0x451f9e7d,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.front","zpp_nape/util/Lists.hx",13064,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13066_back,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","back",0x83edead3,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.back","zpp_nape/util/Lists.hx",13066,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13075_iterator_at,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","iterator_at",0x1e9c26b8,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.iterator_at","zpp_nape/util/Lists.hx",13075,0x9f4e6754)
HX_LOCAL_STACK_FRAME(_hx_pos_dbd726255778db80_13088_at,"zpp_nape.util.ZNPList_ZPP_InteractionGroup","at",0x42ada29f,"zpp_nape.util.ZNPList_ZPP_InteractionGroup.at","zpp_nape/util/Lists.hx",13088,0x9f4e6754)
namespace zpp_nape{
namespace util{
void ZNPList_ZPP_InteractionGroup_obj::__construct(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12685_new)
HXLINE(12695) this->length = 0;
HXLINE(12694) this->pushmod = false;
HXLINE(12693) this->modified = false;
HXLINE(12686) this->head = null();
}
Dynamic ZNPList_ZPP_InteractionGroup_obj::__CreateEmpty() { return new ZNPList_ZPP_InteractionGroup_obj; }
void *ZNPList_ZPP_InteractionGroup_obj::_hx_vtable = 0;
Dynamic ZNPList_ZPP_InteractionGroup_obj::__Create(hx::DynamicArray inArgs)
{
hx::ObjectPtr< ZNPList_ZPP_InteractionGroup_obj > _hx_result = new ZNPList_ZPP_InteractionGroup_obj();
_hx_result->__construct();
return _hx_result;
}
bool ZNPList_ZPP_InteractionGroup_obj::_hx_isInstanceOf(int inClassId) {
return inClassId==(int)0x00000001 || inClassId==(int)0x4ffe6986;
}
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::begin(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12691_begin)
HXDLIN(12691) return this->head;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,begin,return )
void ZNPList_ZPP_InteractionGroup_obj::setbegin( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup i){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12698_setbegin)
HXLINE(12699) this->head = i;
HXLINE(12700) this->modified = true;
HXLINE(12701) this->pushmod = true;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,setbegin,(void))
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::add( ::zpp_nape::dynamics::ZPP_InteractionGroup o){
HX_GC_STACKFRAME(&_hx_pos_dbd726255778db80_12704_add)
HXDLIN(12704) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret;
HXDLIN(12704) if (hx::IsNull( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool )) {
HXDLIN(12704) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::__alloc( HX_CTX );
}
else {
HXDLIN(12704) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12704) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = ret->next;
HXDLIN(12704) ret->next = null();
}
HXDLIN(12704) ret->elt = o;
HXDLIN(12704) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup temp = ret;
HXDLIN(12704) temp->next = this->head;
HXDLIN(12704) this->head = temp;
HXDLIN(12704) this->modified = true;
HXDLIN(12704) this->length++;
HXDLIN(12704) return o;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,add,return )
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::inlined_add( ::zpp_nape::dynamics::ZPP_InteractionGroup o){
HX_GC_STACKFRAME(&_hx_pos_dbd726255778db80_12708_inlined_add)
HXLINE(12718) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret;
HXLINE(12720) if (hx::IsNull( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool )) {
HXLINE(12721) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::__alloc( HX_CTX );
}
else {
HXLINE(12727) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXLINE(12728) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = ret->next;
HXLINE(12729) ret->next = null();
}
HXLINE(12736) ret->elt = o;
HXLINE(12717) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup temp = ret;
HXLINE(12739) temp->next = this->head;
HXLINE(12740) this->head = temp;
HXLINE(12741) this->modified = true;
HXLINE(12742) this->length++;
HXLINE(12743) return o;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,inlined_add,return )
void ZNPList_ZPP_InteractionGroup_obj::addAll( ::zpp_nape::util::ZNPList_ZPP_InteractionGroup x){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12754_addAll)
HXLINE(12755) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cx_ite = x->head;
HXLINE(12756) while(hx::IsNotNull( cx_ite )){
HXLINE(12757) ::zpp_nape::dynamics::ZPP_InteractionGroup i = cx_ite->elt;
HXLINE(12758) this->add(i);
HXLINE(12759) cx_ite = cx_ite->next;
}
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,addAll,(void))
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::insert( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur, ::zpp_nape::dynamics::ZPP_InteractionGroup o){
HX_GC_STACKFRAME(&_hx_pos_dbd726255778db80_12764_insert)
HXDLIN(12764) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret;
HXDLIN(12764) if (hx::IsNull( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool )) {
HXDLIN(12764) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::__alloc( HX_CTX );
}
else {
HXDLIN(12764) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12764) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = ret->next;
HXDLIN(12764) ret->next = null();
}
HXDLIN(12764) ret->elt = o;
HXDLIN(12764) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup temp = ret;
HXDLIN(12764) if (hx::IsNull( cur )) {
HXDLIN(12764) temp->next = this->head;
HXDLIN(12764) this->head = temp;
}
else {
HXDLIN(12764) temp->next = cur->next;
HXDLIN(12764) cur->next = temp;
}
HXDLIN(12764) this->pushmod = (this->modified = true);
HXDLIN(12764) this->length++;
HXDLIN(12764) return temp;
}
HX_DEFINE_DYNAMIC_FUNC2(ZNPList_ZPP_InteractionGroup_obj,insert,return )
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::inlined_insert( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur, ::zpp_nape::dynamics::ZPP_InteractionGroup o){
HX_GC_STACKFRAME(&_hx_pos_dbd726255778db80_12768_inlined_insert)
HXLINE(12778) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret;
HXLINE(12780) if (hx::IsNull( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool )) {
HXLINE(12781) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::__alloc( HX_CTX );
}
else {
HXLINE(12787) ret = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXLINE(12788) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = ret->next;
HXLINE(12789) ret->next = null();
}
HXLINE(12796) ret->elt = o;
HXLINE(12777) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup temp = ret;
HXLINE(12799) if (hx::IsNull( cur )) {
HXLINE(12800) temp->next = this->head;
HXLINE(12801) this->head = temp;
}
else {
HXLINE(12804) temp->next = cur->next;
HXLINE(12805) cur->next = temp;
}
HXLINE(12807) this->pushmod = (this->modified = true);
HXLINE(12808) this->length++;
HXLINE(12809) return temp;
}
HX_DEFINE_DYNAMIC_FUNC2(ZNPList_ZPP_InteractionGroup_obj,inlined_insert,return )
void ZNPList_ZPP_InteractionGroup_obj::pop(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12812_pop)
HXDLIN(12812) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret = this->head;
HXDLIN(12812) this->head = ret->next;
HXDLIN(12812) {
HXDLIN(12812) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = ret;
HXDLIN(12812) o->elt = null();
HXDLIN(12812) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12812) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(12812) if (hx::IsNull( this->head )) {
HXDLIN(12812) this->pushmod = true;
}
HXDLIN(12812) this->modified = true;
HXDLIN(12812) this->length--;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,pop,(void))
void ZNPList_ZPP_InteractionGroup_obj::inlined_pop(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12816_inlined_pop)
HXLINE(12825) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret = this->head;
HXLINE(12826) this->head = ret->next;
HXLINE(12828) {
HXLINE(12829) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = ret;
HXLINE(12838) o->elt = null();
HXLINE(12839) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXLINE(12840) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXLINE(12845) if (hx::IsNull( this->head )) {
HXLINE(12845) this->pushmod = true;
}
HXLINE(12846) this->modified = true;
HXLINE(12847) this->length--;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,inlined_pop,(void))
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::pop_unsafe(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12850_pop_unsafe)
HXDLIN(12850) ::zpp_nape::dynamics::ZPP_InteractionGroup ret = this->head->elt;
HXDLIN(12850) this->pop();
HXDLIN(12850) return ret;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,pop_unsafe,return )
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::inlined_pop_unsafe(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12854_inlined_pop_unsafe)
HXLINE(12863) ::zpp_nape::dynamics::ZPP_InteractionGroup ret = this->head->elt;
HXLINE(12864) this->pop();
HXLINE(12865) return ret;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,inlined_pop_unsafe,return )
void ZNPList_ZPP_InteractionGroup_obj::remove( ::zpp_nape::dynamics::ZPP_InteractionGroup obj){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12876_remove)
HXDLIN(12876) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre = null();
HXDLIN(12876) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur = this->head;
HXDLIN(12876) bool ret = false;
HXDLIN(12876) while(hx::IsNotNull( cur )){
HXDLIN(12876) if (hx::IsEq( cur->elt,obj )) {
HXDLIN(12876) {
HXDLIN(12876) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup old;
HXDLIN(12876) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret1;
HXDLIN(12876) if (hx::IsNull( pre )) {
HXDLIN(12876) old = this->head;
HXDLIN(12876) ret1 = old->next;
HXDLIN(12876) this->head = ret1;
HXDLIN(12876) if (hx::IsNull( this->head )) {
HXDLIN(12876) this->pushmod = true;
}
}
else {
HXDLIN(12876) old = pre->next;
HXDLIN(12876) ret1 = old->next;
HXDLIN(12876) pre->next = ret1;
HXDLIN(12876) if (hx::IsNull( ret1 )) {
HXDLIN(12876) this->pushmod = true;
}
}
HXDLIN(12876) {
HXDLIN(12876) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = old;
HXDLIN(12876) o->elt = null();
HXDLIN(12876) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12876) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(12876) this->modified = true;
HXDLIN(12876) this->length--;
HXDLIN(12876) this->pushmod = true;
}
HXDLIN(12876) ret = true;
HXDLIN(12876) goto _hx_goto_13;
}
HXDLIN(12876) pre = cur;
HXDLIN(12876) cur = cur->next;
}
_hx_goto_13:;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,remove,(void))
bool ZNPList_ZPP_InteractionGroup_obj::try_remove( ::zpp_nape::dynamics::ZPP_InteractionGroup obj){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12878_try_remove)
HXLINE(12887) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre = null();
HXLINE(12888) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur = this->head;
HXLINE(12889) bool ret = false;
HXLINE(12890) while(hx::IsNotNull( cur )){
HXLINE(12891) if (hx::IsEq( cur->elt,obj )) {
HXLINE(12892) this->erase(pre);
HXLINE(12893) ret = true;
HXLINE(12894) goto _hx_goto_15;
}
HXLINE(12896) pre = cur;
HXLINE(12897) cur = cur->next;
}
_hx_goto_15:;
HXLINE(12899) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,try_remove,return )
void ZNPList_ZPP_InteractionGroup_obj::inlined_remove( ::zpp_nape::dynamics::ZPP_InteractionGroup obj){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12912_inlined_remove)
HXDLIN(12912) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre = null();
HXDLIN(12912) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur = this->head;
HXDLIN(12912) bool ret = false;
HXDLIN(12912) while(hx::IsNotNull( cur )){
HXDLIN(12912) if (hx::IsEq( cur->elt,obj )) {
HXDLIN(12912) {
HXDLIN(12912) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup old;
HXDLIN(12912) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret1;
HXDLIN(12912) if (hx::IsNull( pre )) {
HXDLIN(12912) old = this->head;
HXDLIN(12912) ret1 = old->next;
HXDLIN(12912) this->head = ret1;
HXDLIN(12912) if (hx::IsNull( this->head )) {
HXDLIN(12912) this->pushmod = true;
}
}
else {
HXDLIN(12912) old = pre->next;
HXDLIN(12912) ret1 = old->next;
HXDLIN(12912) pre->next = ret1;
HXDLIN(12912) if (hx::IsNull( ret1 )) {
HXDLIN(12912) this->pushmod = true;
}
}
HXDLIN(12912) {
HXDLIN(12912) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = old;
HXDLIN(12912) o->elt = null();
HXDLIN(12912) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12912) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(12912) this->modified = true;
HXDLIN(12912) this->length--;
HXDLIN(12912) this->pushmod = true;
}
HXDLIN(12912) ret = true;
HXDLIN(12912) goto _hx_goto_17;
}
HXDLIN(12912) pre = cur;
HXDLIN(12912) cur = cur->next;
}
_hx_goto_17:;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,inlined_remove,(void))
bool ZNPList_ZPP_InteractionGroup_obj::inlined_try_remove( ::zpp_nape::dynamics::ZPP_InteractionGroup obj){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12916_inlined_try_remove)
HXLINE(12925) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre = null();
HXLINE(12926) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur = this->head;
HXLINE(12927) bool ret = false;
HXLINE(12928) while(hx::IsNotNull( cur )){
HXLINE(12929) if (hx::IsEq( cur->elt,obj )) {
HXLINE(12930) {
HXLINE(12930) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup old;
HXDLIN(12930) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret1;
HXDLIN(12930) if (hx::IsNull( pre )) {
HXLINE(12930) old = this->head;
HXDLIN(12930) ret1 = old->next;
HXDLIN(12930) this->head = ret1;
HXDLIN(12930) if (hx::IsNull( this->head )) {
HXLINE(12930) this->pushmod = true;
}
}
else {
HXLINE(12930) old = pre->next;
HXDLIN(12930) ret1 = old->next;
HXDLIN(12930) pre->next = ret1;
HXDLIN(12930) if (hx::IsNull( ret1 )) {
HXLINE(12930) this->pushmod = true;
}
}
HXDLIN(12930) {
HXLINE(12930) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = old;
HXDLIN(12930) o->elt = null();
HXDLIN(12930) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12930) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(12930) this->modified = true;
HXDLIN(12930) this->length--;
HXDLIN(12930) this->pushmod = true;
}
HXLINE(12931) ret = true;
HXLINE(12932) goto _hx_goto_19;
}
HXLINE(12934) pre = cur;
HXLINE(12935) cur = cur->next;
}
_hx_goto_19:;
HXLINE(12937) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,inlined_try_remove,return )
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::erase( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12940_erase)
HXDLIN(12940) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup old;
HXDLIN(12940) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret;
HXDLIN(12940) if (hx::IsNull( pre )) {
HXDLIN(12940) old = this->head;
HXDLIN(12940) ret = old->next;
HXDLIN(12940) this->head = ret;
HXDLIN(12940) if (hx::IsNull( this->head )) {
HXDLIN(12940) this->pushmod = true;
}
}
else {
HXDLIN(12940) old = pre->next;
HXDLIN(12940) ret = old->next;
HXDLIN(12940) pre->next = ret;
HXDLIN(12940) if (hx::IsNull( ret )) {
HXDLIN(12940) this->pushmod = true;
}
}
HXDLIN(12940) {
HXDLIN(12940) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = old;
HXDLIN(12940) o->elt = null();
HXDLIN(12940) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12940) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(12940) this->modified = true;
HXDLIN(12940) this->length--;
HXDLIN(12940) this->pushmod = true;
HXDLIN(12940) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,erase,return )
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::inlined_erase( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12944_inlined_erase)
HXLINE(12953) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup old;
HXLINE(12954) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret;
HXLINE(12955) if (hx::IsNull( pre )) {
HXLINE(12956) old = this->head;
HXLINE(12957) ret = old->next;
HXLINE(12958) this->head = ret;
HXLINE(12959) if (hx::IsNull( this->head )) {
HXLINE(12959) this->pushmod = true;
}
}
else {
HXLINE(12962) old = pre->next;
HXLINE(12963) ret = old->next;
HXLINE(12964) pre->next = ret;
HXLINE(12965) if (hx::IsNull( ret )) {
HXLINE(12965) this->pushmod = true;
}
}
HXLINE(12968) {
HXLINE(12969) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = old;
HXLINE(12978) o->elt = null();
HXLINE(12979) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXLINE(12980) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXLINE(12985) this->modified = true;
HXLINE(12986) this->length--;
HXLINE(12987) this->pushmod = true;
HXLINE(12988) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,inlined_erase,return )
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::splice( ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre,int n){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12990_splice)
HXLINE(12991) while(true){
HXLINE(12991) bool _hx_tmp;
HXDLIN(12991) n = (n - 1);
HXDLIN(12991) if (((n + 1) > 0)) {
HXLINE(12991) _hx_tmp = hx::IsNotNull( pre->next );
}
else {
HXLINE(12991) _hx_tmp = false;
}
HXDLIN(12991) if (!(_hx_tmp)) {
HXLINE(12991) goto _hx_goto_23;
}
HXDLIN(12991) this->erase(pre);
}
_hx_goto_23:;
HXLINE(12992) return pre->next;
}
HX_DEFINE_DYNAMIC_FUNC2(ZNPList_ZPP_InteractionGroup_obj,splice,return )
void ZNPList_ZPP_InteractionGroup_obj::clear(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_12995_clear)
HXDLIN(12995) while(hx::IsNotNull( this->head )){
HXDLIN(12995) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret = this->head;
HXDLIN(12995) this->head = ret->next;
HXDLIN(12995) {
HXDLIN(12995) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = ret;
HXDLIN(12995) o->elt = null();
HXDLIN(12995) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(12995) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(12995) if (hx::IsNull( this->head )) {
HXDLIN(12995) this->pushmod = true;
}
HXDLIN(12995) this->modified = true;
HXDLIN(12995) this->length--;
}
HXDLIN(12995) this->pushmod = true;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,clear,(void))
void ZNPList_ZPP_InteractionGroup_obj::inlined_clear(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13000_inlined_clear)
HXLINE(13001) while(hx::IsNotNull( this->head )){
HXLINE(13001) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret = this->head;
HXDLIN(13001) this->head = ret->next;
HXDLIN(13001) {
HXLINE(13001) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup o = ret;
HXDLIN(13001) o->elt = null();
HXDLIN(13001) o->next = ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool;
HXDLIN(13001) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup_obj::zpp_pool = o;
}
HXDLIN(13001) if (hx::IsNull( this->head )) {
HXLINE(13001) this->pushmod = true;
}
HXDLIN(13001) this->modified = true;
HXDLIN(13001) this->length--;
}
HXLINE(13002) this->pushmod = true;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,inlined_clear,(void))
void ZNPList_ZPP_InteractionGroup_obj::reverse(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13005_reverse)
HXLINE(13006) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur = this->head;
HXLINE(13007) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup pre = null();
HXLINE(13008) while(hx::IsNotNull( cur )){
HXLINE(13009) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup nx = cur->next;
HXLINE(13010) cur->next = pre;
HXLINE(13011) this->head = cur;
HXLINE(13012) pre = cur;
HXLINE(13013) cur = nx;
}
HXLINE(13015) this->modified = true;
HXLINE(13016) this->pushmod = true;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,reverse,(void))
bool ZNPList_ZPP_InteractionGroup_obj::empty(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13021_empty)
HXDLIN(13021) return hx::IsNull( this->head );
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,empty,return )
int ZNPList_ZPP_InteractionGroup_obj::size(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13026_size)
HXDLIN(13026) return this->length;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,size,return )
bool ZNPList_ZPP_InteractionGroup_obj::has( ::zpp_nape::dynamics::ZPP_InteractionGroup obj){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13029_has)
HXDLIN(13029) bool ret;
HXDLIN(13029) {
HXDLIN(13029) ret = false;
HXDLIN(13029) {
HXDLIN(13029) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cx_ite = this->head;
HXDLIN(13029) while(hx::IsNotNull( cx_ite )){
HXDLIN(13029) ::zpp_nape::dynamics::ZPP_InteractionGroup npite = cx_ite->elt;
HXDLIN(13029) if (hx::IsEq( npite,obj )) {
HXDLIN(13029) ret = true;
HXDLIN(13029) goto _hx_goto_33;
}
HXDLIN(13029) cx_ite = cx_ite->next;
}
_hx_goto_33:;
}
}
HXDLIN(13029) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,has,return )
bool ZNPList_ZPP_InteractionGroup_obj::inlined_has( ::zpp_nape::dynamics::ZPP_InteractionGroup obj){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13033_inlined_has)
HXLINE(13042) bool ret;
HXLINE(13043) {
HXLINE(13044) ret = false;
HXLINE(13045) {
HXLINE(13046) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cx_ite = this->head;
HXLINE(13047) while(hx::IsNotNull( cx_ite )){
HXLINE(13048) ::zpp_nape::dynamics::ZPP_InteractionGroup npite = cx_ite->elt;
HXLINE(13050) if (hx::IsEq( npite,obj )) {
HXLINE(13051) ret = true;
HXLINE(13052) goto _hx_goto_35;
}
HXLINE(13055) cx_ite = cx_ite->next;
}
_hx_goto_35:;
}
}
HXLINE(13059) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,inlined_has,return )
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::front(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13064_front)
HXDLIN(13064) return this->head->elt;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,front,return )
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::back(){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13066_back)
HXLINE(13067) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret = this->head;
HXLINE(13068) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup cur = ret;
HXLINE(13069) while(hx::IsNotNull( cur )){
HXLINE(13070) ret = cur;
HXLINE(13071) cur = cur->next;
}
HXLINE(13073) return ret->elt;
}
HX_DEFINE_DYNAMIC_FUNC0(ZNPList_ZPP_InteractionGroup_obj,back,return )
::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::iterator_at(int ind){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13075_iterator_at)
HXLINE(13084) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup ret = this->head;
HXLINE(13085) while(true){
HXLINE(13085) bool _hx_tmp;
HXDLIN(13085) ind = (ind - 1);
HXDLIN(13085) if (((ind + 1) > 0)) {
HXLINE(13085) _hx_tmp = hx::IsNotNull( ret );
}
else {
HXLINE(13085) _hx_tmp = false;
}
HXDLIN(13085) if (!(_hx_tmp)) {
HXLINE(13085) goto _hx_goto_40;
}
HXDLIN(13085) ret = ret->next;
}
_hx_goto_40:;
HXLINE(13086) return ret;
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,iterator_at,return )
::zpp_nape::dynamics::ZPP_InteractionGroup ZNPList_ZPP_InteractionGroup_obj::at(int ind){
HX_STACKFRAME(&_hx_pos_dbd726255778db80_13088_at)
HXLINE(13097) ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup it = this->iterator_at(ind);
HXLINE(13098) if (hx::IsNotNull( it )) {
HXLINE(13098) return it->elt;
}
else {
HXLINE(13098) return null();
}
HXDLIN(13098) return null();
}
HX_DEFINE_DYNAMIC_FUNC1(ZNPList_ZPP_InteractionGroup_obj,at,return )
hx::ObjectPtr< ZNPList_ZPP_InteractionGroup_obj > ZNPList_ZPP_InteractionGroup_obj::__new() {
hx::ObjectPtr< ZNPList_ZPP_InteractionGroup_obj > __this = new ZNPList_ZPP_InteractionGroup_obj();
__this->__construct();
return __this;
}
hx::ObjectPtr< ZNPList_ZPP_InteractionGroup_obj > ZNPList_ZPP_InteractionGroup_obj::__alloc(hx::Ctx *_hx_ctx) {
ZNPList_ZPP_InteractionGroup_obj *__this = (ZNPList_ZPP_InteractionGroup_obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(ZNPList_ZPP_InteractionGroup_obj), true, "zpp_nape.util.ZNPList_ZPP_InteractionGroup"));
*(void **)__this = ZNPList_ZPP_InteractionGroup_obj::_hx_vtable;
__this->__construct();
return __this;
}
ZNPList_ZPP_InteractionGroup_obj::ZNPList_ZPP_InteractionGroup_obj()
{
}
void ZNPList_ZPP_InteractionGroup_obj::__Mark(HX_MARK_PARAMS)
{
HX_MARK_BEGIN_CLASS(ZNPList_ZPP_InteractionGroup);
HX_MARK_MEMBER_NAME(head,"head");
HX_MARK_MEMBER_NAME(modified,"modified");
HX_MARK_MEMBER_NAME(pushmod,"pushmod");
HX_MARK_MEMBER_NAME(length,"length");
HX_MARK_END_CLASS();
}
void ZNPList_ZPP_InteractionGroup_obj::__Visit(HX_VISIT_PARAMS)
{
HX_VISIT_MEMBER_NAME(head,"head");
HX_VISIT_MEMBER_NAME(modified,"modified");
HX_VISIT_MEMBER_NAME(pushmod,"pushmod");
HX_VISIT_MEMBER_NAME(length,"length");
}
hx::Val ZNPList_ZPP_InteractionGroup_obj::__Field(const ::String &inName,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 2:
if (HX_FIELD_EQ(inName,"at") ) { return hx::Val( at_dyn() ); }
break;
case 3:
if (HX_FIELD_EQ(inName,"add") ) { return hx::Val( add_dyn() ); }
if (HX_FIELD_EQ(inName,"pop") ) { return hx::Val( pop_dyn() ); }
if (HX_FIELD_EQ(inName,"has") ) { return hx::Val( has_dyn() ); }
break;
case 4:
if (HX_FIELD_EQ(inName,"head") ) { return hx::Val( head ); }
if (HX_FIELD_EQ(inName,"size") ) { return hx::Val( size_dyn() ); }
if (HX_FIELD_EQ(inName,"back") ) { return hx::Val( back_dyn() ); }
break;
case 5:
if (HX_FIELD_EQ(inName,"begin") ) { return hx::Val( begin_dyn() ); }
if (HX_FIELD_EQ(inName,"erase") ) { return hx::Val( erase_dyn() ); }
if (HX_FIELD_EQ(inName,"clear") ) { return hx::Val( clear_dyn() ); }
if (HX_FIELD_EQ(inName,"empty") ) { return hx::Val( empty_dyn() ); }
if (HX_FIELD_EQ(inName,"front") ) { return hx::Val( front_dyn() ); }
break;
case 6:
if (HX_FIELD_EQ(inName,"length") ) { return hx::Val( length ); }
if (HX_FIELD_EQ(inName,"addAll") ) { return hx::Val( addAll_dyn() ); }
if (HX_FIELD_EQ(inName,"insert") ) { return hx::Val( insert_dyn() ); }
if (HX_FIELD_EQ(inName,"remove") ) { return hx::Val( remove_dyn() ); }
if (HX_FIELD_EQ(inName,"splice") ) { return hx::Val( splice_dyn() ); }
break;
case 7:
if (HX_FIELD_EQ(inName,"pushmod") ) { return hx::Val( pushmod ); }
if (HX_FIELD_EQ(inName,"reverse") ) { return hx::Val( reverse_dyn() ); }
break;
case 8:
if (HX_FIELD_EQ(inName,"modified") ) { return hx::Val( modified ); }
if (HX_FIELD_EQ(inName,"setbegin") ) { return hx::Val( setbegin_dyn() ); }
break;
case 10:
if (HX_FIELD_EQ(inName,"pop_unsafe") ) { return hx::Val( pop_unsafe_dyn() ); }
if (HX_FIELD_EQ(inName,"try_remove") ) { return hx::Val( try_remove_dyn() ); }
break;
case 11:
if (HX_FIELD_EQ(inName,"inlined_add") ) { return hx::Val( inlined_add_dyn() ); }
if (HX_FIELD_EQ(inName,"inlined_pop") ) { return hx::Val( inlined_pop_dyn() ); }
if (HX_FIELD_EQ(inName,"inlined_has") ) { return hx::Val( inlined_has_dyn() ); }
if (HX_FIELD_EQ(inName,"iterator_at") ) { return hx::Val( iterator_at_dyn() ); }
break;
case 13:
if (HX_FIELD_EQ(inName,"inlined_erase") ) { return hx::Val( inlined_erase_dyn() ); }
if (HX_FIELD_EQ(inName,"inlined_clear") ) { return hx::Val( inlined_clear_dyn() ); }
break;
case 14:
if (HX_FIELD_EQ(inName,"inlined_insert") ) { return hx::Val( inlined_insert_dyn() ); }
if (HX_FIELD_EQ(inName,"inlined_remove") ) { return hx::Val( inlined_remove_dyn() ); }
break;
case 18:
if (HX_FIELD_EQ(inName,"inlined_pop_unsafe") ) { return hx::Val( inlined_pop_unsafe_dyn() ); }
if (HX_FIELD_EQ(inName,"inlined_try_remove") ) { return hx::Val( inlined_try_remove_dyn() ); }
}
return super::__Field(inName,inCallProp);
}
hx::Val ZNPList_ZPP_InteractionGroup_obj::__SetField(const ::String &inName,const hx::Val &inValue,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 4:
if (HX_FIELD_EQ(inName,"head") ) { head=inValue.Cast< ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup >(); return inValue; }
break;
case 6:
if (HX_FIELD_EQ(inName,"length") ) { length=inValue.Cast< int >(); return inValue; }
break;
case 7:
if (HX_FIELD_EQ(inName,"pushmod") ) { pushmod=inValue.Cast< bool >(); return inValue; }
break;
case 8:
if (HX_FIELD_EQ(inName,"modified") ) { modified=inValue.Cast< bool >(); return inValue; }
}
return super::__SetField(inName,inValue,inCallProp);
}
void ZNPList_ZPP_InteractionGroup_obj::__GetFields(Array< ::String> &outFields)
{
outFields->push(HX_("head",20,29,0b,45));
outFields->push(HX_("modified",49,db,c7,16));
outFields->push(HX_("pushmod",28,29,4b,75));
outFields->push(HX_("length",e6,94,07,9f));
super::__GetFields(outFields);
};
#ifdef HXCPP_SCRIPTABLE
static hx::StorageInfo ZNPList_ZPP_InteractionGroup_obj_sMemberStorageInfo[] = {
{hx::fsObject /* ::zpp_nape::util::ZNPNode_ZPP_InteractionGroup */ ,(int)offsetof(ZNPList_ZPP_InteractionGroup_obj,head),HX_("head",20,29,0b,45)},
{hx::fsBool,(int)offsetof(ZNPList_ZPP_InteractionGroup_obj,modified),HX_("modified",49,db,c7,16)},
{hx::fsBool,(int)offsetof(ZNPList_ZPP_InteractionGroup_obj,pushmod),HX_("pushmod",28,29,4b,75)},
{hx::fsInt,(int)offsetof(ZNPList_ZPP_InteractionGroup_obj,length),HX_("length",e6,94,07,9f)},
{ hx::fsUnknown, 0, null()}
};
static hx::StaticInfo *ZNPList_ZPP_InteractionGroup_obj_sStaticStorageInfo = 0;
#endif
static ::String ZNPList_ZPP_InteractionGroup_obj_sMemberFields[] = {
HX_("head",20,29,0b,45),
HX_("begin",29,ea,55,b0),
HX_("modified",49,db,c7,16),
HX_("pushmod",28,29,4b,75),
HX_("length",e6,94,07,9f),
HX_("setbegin",47,e3,5c,2b),
HX_("add",21,f2,49,00),
HX_("inlined_add",8d,4c,2e,02),
HX_("addAll",80,09,fb,9e),
HX_("insert",39,43,dd,9d),
HX_("inlined_insert",4d,34,10,a7),
HX_("pop",91,5d,55,00),
HX_("inlined_pop",fd,b7,39,02),
HX_("pop_unsafe",54,7c,ec,75),
HX_("inlined_pop_unsafe",68,87,ef,15),
HX_("remove",44,9c,88,04),
HX_("try_remove",08,b2,16,8d),
HX_("inlined_remove",58,8d,bb,0d),
HX_("inlined_try_remove",1c,bd,19,2d),
HX_("erase",e6,e8,1c,73),
HX_("inlined_erase",52,b6,9d,fa),
HX_("splice",7c,85,9e,bf),
HX_("clear",8d,71,5b,48),
HX_("inlined_clear",f9,3e,dc,cf),
HX_("reverse",22,39,fc,1a),
HX_("empty",8d,3a,da,6f),
HX_("size",c1,a0,53,4c),
HX_("has",5a,3f,4f,00),
HX_("inlined_has",c6,99,33,02),
HX_("front",a9,18,8e,06),
HX_("back",27,da,10,41),
HX_("iterator_at",e4,89,d2,06),
HX_("at",f3,54,00,00),
::String(null()) };
hx::Class ZNPList_ZPP_InteractionGroup_obj::__mClass;
void ZNPList_ZPP_InteractionGroup_obj::__register()
{
ZNPList_ZPP_InteractionGroup_obj _hx_dummy;
ZNPList_ZPP_InteractionGroup_obj::_hx_vtable = *(void **)&_hx_dummy;
hx::Static(__mClass) = new hx::Class_obj();
__mClass->mName = HX_("zpp_nape.util.ZNPList_ZPP_InteractionGroup",42,0f,e9,ca);
__mClass->mSuper = &super::__SGetClass();
__mClass->mConstructEmpty = &__CreateEmpty;
__mClass->mConstructArgs = &__Create;
__mClass->mGetStaticField = &hx::Class_obj::GetNoStaticField;
__mClass->mSetStaticField = &hx::Class_obj::SetNoStaticField;
__mClass->mStatics = hx::Class_obj::dupFunctions(0 /* sStaticFields */);
__mClass->mMembers = hx::Class_obj::dupFunctions(ZNPList_ZPP_InteractionGroup_obj_sMemberFields);
__mClass->mCanCast = hx::TCanCast< ZNPList_ZPP_InteractionGroup_obj >;
#ifdef HXCPP_SCRIPTABLE
__mClass->mMemberStorageInfo = ZNPList_ZPP_InteractionGroup_obj_sMemberStorageInfo;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mStaticStorageInfo = ZNPList_ZPP_InteractionGroup_obj_sStaticStorageInfo;
#endif
hx::_hx_RegisterClass(__mClass->mName, __mClass);
}
} // end namespace zpp_nape
} // end namespace util
|
7ff582a356f4edf68e98caea99679011bf770584
|
6f5f3a1745923eb8769b0609ffb67c2517befa4e
|
/External/FEXCore/Source/Interface/Context/Context.h
|
bd216e86a570488d53029ac51254de94abf8d402
|
[
"MIT"
] |
permissive
|
giomasce/FEX
|
1f0d004c0cfed829d6cc1ee59257edf17c395056
|
69118cbc8677b699cb5e868f008cfc5d45ed6fe2
|
refs/heads/main
| 2023-08-20T15:41:12.436887
| 2021-10-26T19:34:53
| 2021-10-26T19:34:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 12,880
|
h
|
Context.h
|
#pragma once
#include "Common/JitSymbols.h"
#include "Interface/Core/CPUID.h"
#include "Interface/Core/HostFeatures.h"
#include "Interface/Core/X86HelperGen.h"
#include <FEXCore/Config/Config.h>
#include <FEXCore/Core/Context.h>
#include <FEXCore/Core/CoreState.h>
#include <FEXCore/Core/SignalDelegator.h>
#include <FEXCore/Debug/InternalThreadState.h>
#include <FEXCore/Utils/CompilerDefs.h>
#include <FEXCore/Utils/Event.h>
#include <stdint.h>
#include <atomic>
#include <condition_variable>
#include <functional>
#include <istream>
#include <map>
#include <memory>
#include <mutex>
#include <shared_mutex>
#include <stddef.h>
#include <string>
#include <unordered_map>
#include <queue>
#include <vector>
namespace FEXCore {
class CodeLoader;
class ThunkHandler;
class GdbServer;
namespace CPU {
class Arm64JITCore;
class X86JITCore;
}
namespace HLE {
struct SyscallArguments;
class SyscallHandler;
}
}
namespace FEXCore::IR {
class RegisterAllocationData;
class IRListView;
namespace Validation {
class IRValidation;
}
}
namespace FEXCore::Context {
enum CoreRunningMode {
MODE_RUN = 0,
MODE_SINGLESTEP = 1,
};
struct AOTIRInlineEntry {
uint64_t GuestHash;
uint64_t GuestLength;
/* RAData followed by IRData */
uint8_t InlineData[0];
IR::RegisterAllocationData *GetRAData();
IR::IRListView *GetIRData();
};
struct AOTIRInlineIndexEntry {
uint64_t GuestStart;
uint64_t DataOffset;
};
struct AOTIRInlineIndex {
uint64_t Count;
uint64_t DataBase;
AOTIRInlineIndexEntry Entries[0];
AOTIRInlineEntry *Find(uint64_t GuestStart);
AOTIRInlineEntry *GetInlineEntry(uint64_t DataOffset);
};
struct AOTIRCaptureCacheEntry {
std::unique_ptr<std::ostream> Stream;
std::map<uint64_t, uint64_t> Index;
void AppendAOTIRCaptureCache(uint64_t GuestRIP, uint64_t Start, uint64_t Length, uint64_t Hash, FEXCore::IR::IRListView *IRList, FEXCore::IR::RegisterAllocationData *RAData);
};
struct Context {
friend class FEXCore::HLE::SyscallHandler;
#ifdef JIT_ARM64
friend class FEXCore::CPU::Arm64JITCore;
#endif
#ifdef JIT_X86_64
friend class FEXCore::CPU::X86JITCore;
#endif
friend class FEXCore::IR::Validation::IRValidation;
struct {
CoreRunningMode RunningMode {CoreRunningMode::MODE_RUN};
uint64_t VirtualMemSize{1ULL << 36};
// this is for internal use
bool ValidateIRarser { false };
FEX_CONFIG_OPT(Multiblock, MULTIBLOCK);
FEX_CONFIG_OPT(SingleStepConfig, SINGLESTEP);
FEX_CONFIG_OPT(GdbServer, GDBSERVER);
FEX_CONFIG_OPT(Is64BitMode, IS64BIT_MODE);
FEX_CONFIG_OPT(TSOEnabled, TSOENABLED);
FEX_CONFIG_OPT(ABILocalFlags, ABILOCALFLAGS);
FEX_CONFIG_OPT(ABINoPF, ABINOPF);
FEX_CONFIG_OPT(AOTIRCapture, AOTIRCAPTURE);
FEX_CONFIG_OPT(AOTIRGenerate, AOTIRGENERATE);
FEX_CONFIG_OPT(AOTIRLoad, AOTIRLOAD);
FEX_CONFIG_OPT(SMCChecks, SMCCHECKS);
FEX_CONFIG_OPT(Core, CORE);
FEX_CONFIG_OPT(MaxInstPerBlock, MAXINST);
FEX_CONFIG_OPT(RootFSPath, ROOTFS);
FEX_CONFIG_OPT(ThunkHostLibsPath, THUNKHOSTLIBS);
FEX_CONFIG_OPT(ThunkConfigFile, THUNKCONFIG);
FEX_CONFIG_OPT(DumpIR, DUMPIR);
FEX_CONFIG_OPT(StaticRegisterAllocation, SRA);
FEX_CONFIG_OPT(GlobalJITNaming, GLOBALJITNAMING);
FEX_CONFIG_OPT(LibraryJITNaming, LIBRARYJITNAMING);
FEX_CONFIG_OPT(BlockJITNaming, BLOCKJITNAMING);
} Config;
using IntCallbackReturn = FEX_NAKED void(*)(FEXCore::Core::InternalThreadState *Thread, volatile void *Host_RSP);
IntCallbackReturn InterpreterCallbackReturn;
FEXCore::HostFeatures HostFeatures;
std::mutex ThreadCreationMutex;
uint64_t ThreadID{};
FEXCore::Core::InternalThreadState* ParentThread;
std::vector<FEXCore::Core::InternalThreadState*> Threads;
std::atomic_bool CoreShuttingDown{false};
std::mutex IdleWaitMutex;
std::condition_variable IdleWaitCV;
std::atomic<uint32_t> IdleWaitRefCount{};
Event PauseWait;
bool Running{};
FEXCore::CPUIDEmu CPUID;
FEXCore::HLE::SyscallHandler *SyscallHandler{};
std::unique_ptr<FEXCore::ThunkHandler> ThunkHandler;
CustomCPUFactoryType CustomCPUFactory;
FEXCore::Context::ExitHandler CustomExitHandler;
struct AOTIRCacheEntry {
AOTIRInlineIndex *Array;
void *mapping;
size_t size;
};
std::unordered_map<std::string, AOTIRCacheEntry> AOTIRCache;
std::function<int(const std::string&)> AOTIRLoader;
std::function<std::unique_ptr<std::ostream>(const std::string&)> AOTIRWriter;
std::unordered_map<std::string, AOTIRCaptureCacheEntry> AOTIRCaptureCache;
struct AddrToFileEntry {
uint64_t Start;
uint64_t Len;
uint64_t Offset;
std::string fileid;
std::string filename;
void *CachedFileEntry;
bool ContainsCode;
};
using AddrToFileMapType = std::map<uint64_t, AddrToFileEntry>;
AddrToFileMapType AddrToFile;
std::map<std::string, std::string> FilesWithCode;
AddrToFileMapType::iterator FindAddrForFile(uint64_t Entry, uint64_t Length);
#ifdef BLOCKSTATS
std::unique_ptr<FEXCore::BlockSamplingData> BlockData;
#endif
SignalDelegator *SignalDelegation{};
X86GeneratedCode X86CodeGen;
Context();
~Context();
FEXCore::Core::InternalThreadState* InitCore(FEXCore::CodeLoader *Loader);
FEXCore::Context::ExitReason RunUntilExit();
int GetProgramStatus() const;
bool IsPaused() const { return !Running; }
void Pause();
void Run();
void WaitForThreadsToRun();
void Step();
void Stop(bool IgnoreCurrentThread);
void WaitForIdle();
void StopThread(FEXCore::Core::InternalThreadState *Thread);
void SignalThread(FEXCore::Core::InternalThreadState *Thread, FEXCore::Core::SignalEvent Event);
bool GetGdbServerStatus() const { return DebugServer != nullptr; }
void StartGdbServer();
void StopGdbServer();
void HandleCallback(FEXCore::Core::InternalThreadState *Thread, uint64_t RIP);
void RegisterHostSignalHandler(int Signal, HostSignalDelegatorFunction Func, bool Required);
void RegisterFrontendHostSignalHandler(int Signal, HostSignalDelegatorFunction Func, bool Required);
static void RemoveCodeEntry(FEXCore::Core::InternalThreadState *Thread, uint64_t GuestRIP);
// Wrapper which takes CpuStateFrame instead of InternalThreadState
static void RemoveCodeEntryFromJit(FEXCore::Core::CpuStateFrame *Frame, uint64_t GuestRIP) {
RemoveCodeEntry(Frame->Thread, GuestRIP);
}
// Debugger interface
void CompileRIP(FEXCore::Core::InternalThreadState *Thread, uint64_t RIP);
uint64_t GetThreadCount() const;
FEXCore::Core::RuntimeStats *GetRuntimeStatsForThread(uint64_t Thread);
bool GetDebugDataForRIP(uint64_t RIP, FEXCore::Core::DebugData *Data);
bool FindHostCodeForRIP(uint64_t RIP, uint8_t **Code);
struct GenerateIRResult {
FEXCore::IR::IRListView* IRList;
// User's responsibility to deallocate this.
FEXCore::IR::RegisterAllocationData* RAData;
uint64_t TotalInstructions;
uint64_t TotalInstructionsLength;
uint64_t StartAddr;
uint64_t Length;
};
[[nodiscard]] GenerateIRResult GenerateIR(FEXCore::Core::InternalThreadState *Thread, uint64_t GuestRIP);
struct CompileCodeResult {
void* CompiledCode;
FEXCore::IR::IRListView* IRData;
FEXCore::Core::DebugData* DebugData;
// User's responsibility to deallocate this.
FEXCore::IR::RegisterAllocationData* RAData;
bool GeneratedIR;
uint64_t StartAddr;
uint64_t Length;
};
[[nodiscard]] CompileCodeResult CompileCode(FEXCore::Core::InternalThreadState *Thread, uint64_t GuestRIP);
uintptr_t CompileBlock(FEXCore::Core::CpuStateFrame *Frame, uint64_t GuestRIP);
// same as CompileBlock, but aborts on failure
void CompileBlockJit(FEXCore::Core::CpuStateFrame *Frame, uint64_t GuestRIP);
bool LoadAOTIRCache(int streamfd);
void FinalizeAOTIRCache();
void WriteFilesWithCode(std::function<void(const std::string& fileid, const std::string& filename)> Writer);
/**
* @brief Initializes the JIT compilers for the thread
*
* @param State The internal FEX thread state object
* @param CompileThread Is this for the compile service or not?
*
* InitializeCompiler is called inside of CreateThread, so you likely don't need this
* This is exposed because the CompileService needs to initialize compilers while copying data from
* the paired InternalThreadState that it is compiling code for
*/
void InitializeCompiler(FEXCore::Core::InternalThreadState* State, bool CompileThread);
// Used for thread creation from syscalls
/**
* @brief Used to create FEX thread objects in preparation for creating a true OS thread
*
* @param NewThreadState The initial thread state to setup for our state
* @param ParentTID The PID that was the parent thread that created this
*
* @return The InternalThreadState object that tracks all of the emulated thread's state
*
* Usecases:
* OS thread Creation:
* - Thread = CreateThread(NewState, PPID);
* - InitializeThread(Thread);
* OS fork (New thread created with a clone of thread state):
* - clone{2, 3}
* - Thread = CreateThread(CopyOfThreadState, PPID);
* - ExecutionThread(Thread); // Starts executing without creating another host thread
* Thunk callback executing guest code from native host thread
* - Thread = CreateThread(NewState, PPID);
* - InitializeThreadTLSData(Thread);
* - HandleCallback(Thread, RIP);
*/
FEXCore::Core::InternalThreadState* CreateThread(FEXCore::Core::CPUState *NewThreadState, uint64_t ParentTID);
/**
* @brief Initializes the TLS data for a thread
*
* @param Thread The internal FEX thread state object
*/
void InitializeThreadTLSData(FEXCore::Core::InternalThreadState *Thread);
/**
* @brief Initializes the OS thread object and prepares to start executing on that new OS thread
*
* @param Thread The internal FEX thread state object
*
* The OS thread will wait until RunThread is executed
*/
void InitializeThread(FEXCore::Core::InternalThreadState *Thread);
/**
* @brief Starts the OS thread object to start executing guest code
*
* @param Thread The internal FEX thread state object
*/
void RunThread(FEXCore::Core::InternalThreadState *Thread);
/**
* @brief Destroys this FEX thread object and stops tracking it internally
*
* @param Thread The internal FEX thread state object
*/
void DestroyThread(FEXCore::Core::InternalThreadState *Thread);
void CopyMemoryMapping(FEXCore::Core::InternalThreadState *ParentThread, FEXCore::Core::InternalThreadState *ChildThread);
void CleanupAfterFork(FEXCore::Core::InternalThreadState *ExceptForThread);
std::vector<FEXCore::Core::InternalThreadState*>* GetThreads() { return &Threads; }
uint8_t GetGPRSize() const { return Config.Is64BitMode ? 8 : 4; }
void AddNamedRegion(uintptr_t Base, uintptr_t Size, uintptr_t Offset, const std::string &filename);
void RemoveNamedRegion(uintptr_t Base, uintptr_t Size);
FEXCore::JITSymbols Symbols;
// Public for threading
void ExecutionThread(FEXCore::Core::InternalThreadState *Thread);
protected:
void ClearCodeCache(FEXCore::Core::InternalThreadState *Thread, bool AlsoClearIRCache);
private:
/**
* @brief Does some final thread initialization
*
* @param Thread The internal FEX thread state object
*
* InitCore and CreateThread both call this to finish up thread object initialization
*/
void InitializeThreadData(FEXCore::Core::InternalThreadState *Thread);
void WaitForIdleWithTimeout();
void NotifyPause();
void AddBlockMapping(FEXCore::Core::InternalThreadState *Thread, uint64_t Address, void *Ptr, uint64_t Start, uint64_t Length);
FEXCore::CodeLoader *LocalLoader{};
// Entry Cache
uint64_t StartingRIP;
std::mutex ExitMutex;
std::unique_ptr<GdbServer> DebugServer;
std::shared_mutex AOTIRCacheLock;
std::shared_mutex AOTIRCaptureCacheWriteoutLock;
std::atomic<bool> AOTIRCaptureCacheWriteoutFlusing;
std::queue<std::function<void()>> AOTIRCaptureCacheWriteoutQueue;
void AOTIRCaptureCacheWriteoutQueue_Flush();
void AOTIRCaptureCacheWriteoutQueue_Append(const std::function<void()> &fn);
bool StartPaused = false;
FEX_CONFIG_OPT(AppFilename, APP_FILENAME);
};
uint64_t HandleSyscall(FEXCore::HLE::SyscallHandler *Handler, FEXCore::Core::CpuStateFrame *Frame, FEXCore::HLE::SyscallArguments *Args);
}
|
88ac51d9e282eb1cdba9480d080985eb28ebe7e9
|
9256db8d0af4f2224bcb9ef282e19da0e7f49029
|
/src/NodeVisitor.cpp
|
78656a8c2e5bfd4599f05fa55fea85b16a8221ac
|
[] |
no_license
|
killvxk/wscript
|
fc57e8bc96468e6a89d2beac335d8472f4804848
|
39f572bb46bd1a2bacdbc16a1f9fd8cf66862136
|
refs/heads/master
| 2020-05-07T08:41:12.367168
| 2018-11-02T13:50:06
| 2018-11-02T13:50:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,996
|
cpp
|
NodeVisitor.cpp
|
#include "includes/NodeVisitor.hpp"
#include <iostream>
void NodeVisitor::error(std::string message) {
throw std::runtime_error("[error][NodeVisitor]: " + message);
};
anything NodeVisitor::visit(AST* node) {
if (dynamic_cast<AST_BinOp*>( node ))
return (anything)this->visit_AST_BinOp((AST_BinOp*) node);
else if (dynamic_cast<AST_UnaryOp*>( node ))
return (anything)this->visit_AST_UnaryOp((AST_UnaryOp*) node);
else if (dynamic_cast<AST_Integer*>( node ))
return (anything)this->visit_AST_Integer((AST_Integer*) node);
else if (dynamic_cast<AST_Float*>( node ))
return (anything)this->visit_AST_Float((AST_Float*) node);
else if (dynamic_cast<AST_Str*>( node ))
return (anything)this->visit_AST_Str((AST_Str*) node); // TODO: fix
else if (dynamic_cast<AST_Var*>( node ))
return (anything)this->visit_AST_Var((AST_Var*) node);
else if (dynamic_cast<AST_VarDecl*>( node ))
return (anything)this->visit_AST_VarDecl((AST_VarDecl*) node);
else if (dynamic_cast<AST_Compound*>( node ))
return (anything)this->visit_AST_Compound((AST_Compound*) node);
else if (dynamic_cast<AST_Assign*>( node ))
return (anything)this->visit_AST_Assign((AST_Assign*) node);
else if (dynamic_cast<AST_Abstract_Condition*>( node ))
return (anything)this->visit_AST_Abstract_Condition((AST_Abstract_Condition*) node);
else if (dynamic_cast<AST_DoWhile*>( node ))
return (anything)this->visit_AST_DoWhile((AST_DoWhile*) node);
else if (dynamic_cast<AST_FunctionCall*>( node ))
return (anything)this->visit_AST_functionCall((AST_FunctionCall*) node);
else if (dynamic_cast<AST_FunctionDefinition*>( node ))
return (anything)this->visit_AST_functionDefinition((AST_FunctionDefinition*) node);
else if (dynamic_cast<AST_Return*>( node ))
return (anything)this->visit_AST_Return((AST_Return*) node);
else if (dynamic_cast<AST_AttributeAccess*>( node ))
return (anything)this->visit_AST_AttributeAccess((AST_AttributeAccess*) node);
else if (dynamic_cast<AST_NoOp*>( node ))
return (anything)this->visit_AST_NoOp((AST_NoOp*) node);
else if (dynamic_cast<AST_Object*>( node ))
return (anything)this->visit_AST_Object((AST_Object*) node);
else if (dynamic_cast<AST_Array*>( node ))
return (anything)this->visit_AST_Array((AST_Array*) node);
else if (dynamic_cast<AST_ArrayAccess*>( node ))
return (anything)this->visit_AST_ArrayAccess((AST_ArrayAccess*) node);
else if (dynamic_cast<AST_StringAccess*>( node ))
return (anything)this->visit_AST_StringAccess((AST_StringAccess*) node);
else if (dynamic_cast<AST_Empty*>( node ))
return (anything)this->visit_AST_Empty((AST_Empty*) node);
return (anything)this->visit_default(node);
};
anything NodeVisitor::visit_default(AST* node) {
this->error("Encountered an unhandled AST node");
return (anything)0;
};
|
1f71e6548cd38af1df3b01eb8eebb3905847a0cf
|
4044b9de0d2cde8fbe1f0e8fee0073c818a89d13
|
/SimpleMRP/composant.h
|
169341faa96b131e3ddffd4bf1d97937ae7add2b
|
[] |
no_license
|
stefmedjo/simple-mrp
|
2b7eba139326ae879ebd0dc65233ec15f4b1b52e
|
4b6fb4d8e8b0765d366fff2d2e0c1e9054dad16a
|
refs/heads/main
| 2023-03-27T07:03:05.426747
| 2021-04-02T13:47:13
| 2021-04-02T13:47:13
| 354,031,118
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 636
|
h
|
composant.h
|
#ifndef COMPOSANT_H
#define COMPOSANT_H
#include "article.h"
#include "QHash"
class Fournisseur;
class Compose;
class Composant : public Article
{
Q_OBJECT
public:
explicit Composant(QObject *parent = 0);
void addFournisseur(Fournisseur *f);
void removeFournisseur(Fournisseur *f);
QList<Fournisseur *> getListeFournisseur();
void addCompose(Compose *c, double val);
void removeCompose(Compose *c);
QHash<Compose *, double> getListeCompose();
signals:
public slots:
private:
QList<Fournisseur *> listeFournisseur;
QHash<Compose *, double> listeCompose;
};
#endif // COMPOSANT_H
|
471c833375a94d695272da1f101894956e900336
|
2593fe77ac639d7504993c5aa5572df80451ec9e
|
/Apna College/KadeneAlgo.cpp
|
f5bde01ae1391164f55792043c1ab44404fc1ce9
|
[] |
no_license
|
jaimit25/Cpp_dsa
|
873d02b2f4519fbe76bf8101ad557e1b8f472917
|
b05a284a028c931b9814ac727aaee1b9d59962e1
|
refs/heads/master
| 2023-08-19T00:34:30.781252
| 2021-10-04T10:31:38
| 2021-10-04T10:31:38
| 373,571,184
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 448
|
cpp
|
KadeneAlgo.cpp
|
#include <iostream>
using namespace std;
int maxSumSubArray(int A[], int n)
{
int maxSum = 0;
int currSum = 0;
for (int i = 0; i < n; i++)
{
currSum = currSum + A[i];
if (currSum > maxSum)
{
maxSum = currSum;
}
if (currSum < 0)
{
currSum = 0;
}
}
return maxSum;
}
int main()
{
int A[] = {5, -4, -2, 6, -1}, n = 5;
int max = maxSumSubArray(A, n);
cout << "Max Sum of SubArray is : " << max << endl;
return 0;
}
|
61d0eed857102c5e24fb7dabc59a20fd3699a294
|
1df2034fd14c9a757bab238b955c0855dc1337a1
|
/tests/nostdlib/llvm_passes/IndVars/CannonLoopVars/cannonloopvars.cpp
|
112aa3a07254e7aa44cc4f6d365c93612554e035
|
[
"MIT"
] |
permissive
|
OCHyams/dexter
|
60d4aecbe7d749a79a84082b86bbcca50044fada
|
d89b66ca6a0d1ba29a4c32f152773a34ce2881e8
|
refs/heads/master
| 2020-06-02T10:54:44.706186
| 2019-10-08T12:05:31
| 2019-10-08T12:05:31
| 191,132,435
| 0
| 0
|
MIT
| 2019-06-10T08:57:20
| 2019-06-10T08:57:20
| null |
UTF-8
|
C++
| false
| false
| 871
|
cpp
|
cannonloopvars.cpp
|
// RUN: %dexter -- -fno-unroll-loops
int
foo(int blah)
{
int i = 0;
for (i = blah; i < blah + 10; i++) { // DexWatch('i', 'blah')
if (i < 3) // DexWatch('i', 'blah')
return 0; // DexUnreachable()
}
return 1; // DexWatch('i', 'blah')
}
int
main()
{
return foo(3);
}
// And at O2 we just can't read those variables, despite a relatable indvar
// being available.
// This seems poor codegen because we compare two constant values in the loop
// which is exactly what I was expecting indvars to get rid of, see the
// loop-invariant-conditions.ll test in llvm
// DexExpectWatchValue('blah', '3', from_line=1, to_line=50)
// DexExpectWatchValue('i', '0', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', from_line=1, to_line=50)
// DexExpectStepKind('VERTICAL_BACKWARD', 10)
// DexExpectStepKind('FUNC', 2)
// DexExpectStepKind('FUNC_EXTERNAL', 0)
|
5474145792d0043a7036417f7c66e1cc4b5e8d8f
|
a90d5b17c624888fad66a2a5d6fbb07430424726
|
/resources/code/application/03-ModelLoading/model_loading_application.cpp
|
2d643df5e8da639b592133d8a5160b44780ec256
|
[] |
no_license
|
atherlangga/blowgun
|
1e039e9a160ddddfbb0b8dffd8f4e1b21aec6822
|
9500aa8e1b2b78b45165f62a19f4ffb0f0c68a7a
|
refs/heads/master
| 2020-05-17T07:58:12.562488
| 2014-01-10T12:47:38
| 2014-01-10T12:47:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,368
|
cpp
|
model_loading_application.cpp
|
#include "model_loading_application.h"
#include <memory>
#include <iostream>
#include <fstream>
#include <stdexcept>
#include <GLES2/gl2.h>
#include <blowgun/matrix.h>
#include <blowgun/program.h>
#include <blowgun/program_builder.h>
#include <blowgun/vertex_attribute.h>
#include <blowgun/model_loader_obj.h>
#include <blowgun/texture.h>
#include <blowgun/texture_builder.h>
#include <blowgun/image_loader_tga.h>
// Minimalist vertex shader.
// Only takes a PMV matrix and vertex position
// as its input.
static const char * kVertexShaderSource = "\
attribute mediump vec4 a_vertex_position;\
attribute mediump vec2 a_vertex_texture;\
varying mediump vec2 v_vertex_texture;\
uniform mediump mat4 u_PMV_matrix;\
\
void main(void)\
{\
v_vertex_texture = a_vertex_texture;\
gl_Position = u_PMV_matrix * a_vertex_position;\
}";
// Minimalist fragment shader.
static const char * kFragmentShaderSource = "\
varying mediump vec2 v_vertex_texture;\
uniform mediump sampler2D u_texture;\
\
void main (void)\
{\
gl_FragColor = texture2D(u_texture, v_vertex_texture);\
}";
// Projection Model-View matrix
static std::shared_ptr<blowgun::Matrix> pmv_matrix;
// Model to draw.
static std::shared_ptr<blowgun::Model> model;
// Texture for model.
static std::unique_ptr<blowgun::Texture> texture;
// GPU program built from vertex shader and
// fragment shader above.
static std::unique_ptr<blowgun::Program> program;
// Predefined position for "a_vertex_position" in
// vertex shader to bind for.
static const blowgun::i32 kVertexPositionAttrib = 0;
// Predefined position for "a_vertex_texture" in
// vertex shader to bind for.
static const blowgun::i32 kVertexTextureAttrib = 1;
void
ModelLoadingApplication::OnInitialization()
{
// Create perspective matrix.
blowgun::Matrix persp = blowgun::Matrix::CreateIdentity().
Perspective(60, 800.0f/600.0f, 1.0f, 20.0f);
// Create translation matrix.
blowgun::Matrix trans = blowgun::Matrix::CreateIdentity().
Translate(0.0f, 0.0f, -15.0f);
// In this application, PMV is a result of translation multiplied by
// perspective.
pmv_matrix = std::make_shared<blowgun::Matrix>(trans.Multiply(persp));
// Build the GPU program.
program = blowgun::ProgramBuilder().
AddShader(GL_VERTEX_SHADER, kVertexShaderSource).
AddShader(GL_FRAGMENT_SHADER, kFragmentShaderSource).
BindAttribute(kVertexPositionAttrib, "a_vertex_position").
BindAttribute(kVertexTextureAttrib, "a_vertex_texture").
Build();
// Activate the program.
program->Use();
// Build and load the model.
blowgun::ModelLoaderOBJ loader;
std::ifstream cubeObjFile("data/cube.obj", std::ios::in);
model = loader.Load(cubeObjFile);
// Open the texture file.
// Notice that `std::ios::binary` need to be explicitly requested,
// otherwise it will fail silently on Win32. Trust me, I just spent
// too much times chased the bug.
std::ifstream image_file("data/bricks_color_map.tga",
std::ios::in | std::ios::binary);
if (!image_file.is_open())
throw new std::runtime_error("File not opened.");
// Load the texture.
blowgun::ImageLoaderTGA imageLoaderTGA;
std::shared_ptr<blowgun::Image> image = imageLoaderTGA.Load(image_file);
// Build and setup texture.
texture = blowgun::TextureBuilder().
SetTarget(GL_TEXTURE_2D).
SetLevelOfDetail(0).
SetFormat(GL_RGB).
SetWidth(image->width).
SetHeight(image->height).
SetType(GL_UNSIGNED_BYTE).
SetData(image->data).
Build();
// Specify "zooming" filter.
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
void
ModelLoadingApplication::OnDraw() const
{
// Clear out the color and buffer.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
// Set up PMV matrix.
int pmv_matrix_location = program->GetUniformLocation("u_PMV_matrix");
glUniformMatrix4fv(pmv_matrix_location, 1, GL_FALSE, pmv_matrix->values());
// Set up the texture.
glActiveTexture(GL_TEXTURE0);
texture->Bind();
int texture_location = program->GetUniformLocation("u_texture");
glUniform1i(texture_location, 0);
const std::vector<blowgun::VertexAttribute> vertex_attributes =
model->vertex_attributes();
// Send vertex position information to GPU program.
glEnableVertexAttribArray(kVertexPositionAttrib);
glVertexAttribPointer(
kVertexPositionAttrib,
3,
GL_FLOAT,
GL_FALSE,
2 * sizeof(blowgun::VertexAttribute),
&vertex_attributes.at(0).data.float_3[0]);
// Send vertex texture coordinate information to GPU program.
glEnableVertexAttribArray(kVertexTextureAttrib);
glVertexAttribPointer(
kVertexTextureAttrib,
2,
GL_FLOAT,
GL_FALSE,
2 * sizeof(blowgun::VertexAttribute),
&vertex_attributes.at(1).data.float_2[0]);
glDrawArrays(GL_TRIANGLES, 0, vertex_attributes.size() / 2);
}
void
ModelLoadingApplication::OnDestroy()
{
program->Delete();
texture->Delete();
}
|
434a30e84d59a156efd8d7330aa143f6198172cf
|
8e5d3e0cf1bb293e9e85c9c13c87798f80f18e51
|
/kameleon-plus/branches/kameleon-plus-MJS/src/example/c++/integrator_prog.cpp
|
042b2de80ebd73282b4b5c3692e417988ff830a4
|
[] |
no_license
|
ccmc/ccmc-software
|
8fc43f9fa00e44d0b4a212c1841d574a9eaf3304
|
0e2fb90add626f185b0b71cdb9a7b8b3b5c43266
|
refs/heads/master
| 2021-01-17T03:58:07.261337
| 2018-04-04T15:22:37
| 2018-04-04T15:22:37
| 40,681,189
| 10
| 7
| null | 2015-08-13T20:51:18
| 2015-08-13T20:51:18
| null |
UTF-8
|
C++
| false
| false
| 4,267
|
cpp
|
integrator_prog.cpp
|
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <ccmc/Kameleon.h>
#include <ccmc/Tracer.h>
#include <ccmc/Fieldline.h>
#include <ccmc/StringConstants.h>
#include <ccmc/Interpolator.h>
//#include <ccmc/old-tracer.h>
#include <ccmc/Point3f.h>
#include <boost/lexical_cast.hpp>
//#include <boost/program_options.hpp>
//#include <google/profiler.h>
#include <ctime>
#define LENGTH 500;
using namespace std;
using namespace ccmc;
//namespace po = boost::program_options;
int main (int argc, char * argv[])
{
std::string filename;
std::string variable;
float c0;
float c1;
float c2;
int iterations = 10;
if (argc != 6)
{
cout << "tracer <filename> <variable> c0 c1 c2" << endl;
exit(1);
}
filename = argv[1];
variable = argv[2];
c0 = boost::lexical_cast<float>(argv[3]);
c1 = boost::lexical_cast<float>(argv[4]);
c2 = boost::lexical_cast<float>(argv[5]);
/*po::options_description desc("Test program");
desc.add_options()("help", "produce help message")("input-file", po::value<std::string>(&filename), "input file")
("variable", po::value<std::string>(&variable), "Variable to trace")
("c0", po::value<float>(&c0), "First position component")
("c1", po::value<float>(&c1), "Second position component")
("c2", po::value<float>(&c2), "Third position component");
po::positional_options_description p;
p.add("input-file", -1);
po::variables_map vm;
po::store(
po::command_line_parser(argc, argv).options(desc).positional(p).run(),
vm);
po::notify(vm);
if (vm.count("help"))
{
cout << desc << endl;
}
if (vm.count("input-file"))
{
std::cout << "Input file: " << filename << std::endl;
} else
{
std::cout << "Input file was not set." << std::endl;
std::cout << desc << std::endl;
exit(1);
}
std::cout << "after po options" << std::endl;
*/
cout << "hello from integrator!" << std::endl;
Kameleon kameleon;
kameleon.open(filename);
kameleon.loadVectorVariable(variable);
Tracer tracer(&kameleon);
tracer.setMaxIterations(20000);
//tracer.setInnerBoundary(2.5f);
tracer.setDn(.2f);
std::cout << ".2f = "<< .2f << "\n";
clock_t start, finish;
start = clock();
cout << "Initializing field line";
Fieldline f1;
cout << "Before bidirectional trace";
f1 = tracer.bidirectionalTrace(variable,c0,c1,c2);
finish = clock();
float elapsed_time = ((double) finish - (double) start) / CLOCKS_PER_SEC;
int vnum = 1;
std::string variables[] = {ccmc::strings::variables::b_};
Fieldline f2;
Point3f p;
ccmc::Interpolator * interpolator = kameleon.createNewInterpolator();
for (int f = 0; f < f1.size(); f++)
{
p = f1.getPosition(f);
for (int i = 0; i < vnum; i++)
{
f2.insertPointData(p,interpolator->interpolate(variables[i],
p.component1,p.component2,p.component3));
}
}
delete interpolator;
kameleon.close();
float dn = .2f;
int step_max = 20000;
float r_end = 2.5f;
finish = clock();
float elapsed_time2 = ((double) finish - (double) start) / CLOCKS_PER_SEC;
vector<float> elengths = f2.getDs();
vector<float> length = f2.measure();
std:: cout << "total points: "<< f2.size() << endl;
std:: cout << "points in f1: " << f1.size() << endl;
std::cout << "New elapsed time: " << elapsed_time << " with " << f1.getPositions().size() << " positions." << std::endl;
for (int i = 0; i < f2.size(); i++)
{
if (((i % 100) == 0)||i==f2.size()-1)
{
std::cout << "New[" << i << "]: " << f2.getPositions()[i];
cout << " data at point: " << f2.getData()[i];
if(i > 0)
{
cout << " ds vector: " << f2.getElements()[i];
cout << " element length: " << f2.getDs()[i];
}
cout << " total length: " << f2.measure()[i];
cout << " integral: "<< f2.integrate()[i];
cout << std::endl;
}
}
Fieldline f3 = f2.interpolate(1,100);
for(int i = 0; i < f3.size(); i++)
{
std::cout << "New[" << i << "]: " << f3.getPositions()[i];
cout << " data at point: " << f3.getData()[i];
cout << " nearest lower vertex: " << f3.getNearest()[i];
cout << " data at nearest: " << f2.getData()[f3.getNearest()[i]] << " "<< f2.getData()[f3.getNearest()[i]+1];
cout << std::endl;
}
std::cout << "finished" << std::endl;
return 0;
}
|
013cc5e879ed6bb43ef0c76147856f50d070acc7
|
fb548f9e6912ad127eea02ddba18029819cd8acc
|
/src/mesh.cpp
|
16883148186707b83c3642fe510aa1d95c47f287
|
[] |
no_license
|
Mrninjatoe/Particle-Collision-Project
|
28c8859c1b3d7a488f0c798be780eadb9c75bc2e
|
b05786ea2655d1191bd17abb12a1ffd5c437181b
|
refs/heads/master
| 2020-03-10T04:22:37.482776
| 2018-11-20T18:21:19
| 2018-11-20T18:21:19
| 129,190,493
| 4
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,250
|
cpp
|
mesh.cpp
|
#include "mesh.hpp"
Mesh::Mesh(std::vector<Vertex> vertices, std::vector<GLuint> indices, bool hasMX) {
_vertices = vertices;
_indices = indices;
_hasModelMX = hasMX;
_hasTextures = 0;
_setupBuffers();
_setupAttributes();
}
Mesh::Mesh(std::vector<Vertex> vertices, std::vector<GLuint> indices, glm::vec3 min, glm::vec3 max, bool hasMX, std::vector<Triangle>& triangles) {
_vertices = vertices;
_indices = indices;
_min = min;
_max = max;
_triangles = triangles;
_hasModelMX = hasMX;
_hasTextures = 0;
_setupBuffers();
_setupAttributes();
}
Mesh::Mesh(std::vector<Vertex> vertices, std::vector<GLuint> indices, glm::vec3 min, glm::vec3 max, bool hasMX, std::vector<Triangle>& triangles, std::vector<Texture>& textures) {
_vertices = vertices;
_indices = indices;
_min = min;
_max = max;
_triangles = triangles;
_hasModelMX = hasMX;
_textures = textures;
_hasTextures = 1;
_setupBuffers();
_setupAttributes();
}
Mesh::~Mesh() {
glDeleteBuffers(1, &_ibo);
glDeleteBuffers(1, &_vbo);
glDeleteBuffers(1, &_vao);
}
void Mesh::_setupBuffers() {
glGenVertexArrays(1, &_vao);
glBindVertexArray(_vao);
glGenBuffers(1, &_vbo);
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
glBufferData(GL_ARRAY_BUFFER, _vertices.size() * sizeof(Vertex), &_vertices[0], GL_STATIC_DRAW);
glGenBuffers(1, &_ibo);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _ibo);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, _indices.size() * sizeof(GLuint), &_indices[0], GL_STATIC_DRAW);
}
void Mesh::_setupAttributes() {
glBindVertexArray(_vao);
glEnableVertexAttribArray(BindingLocation::position);
glVertexAttribPointer(BindingLocation::position, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (GLvoid*)0);
glEnableVertexAttribArray(BindingLocation::normal);
glVertexAttribPointer(BindingLocation::normal, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (GLvoid*)offsetof(Vertex, Vertex::normal));
glEnableVertexAttribArray(BindingLocation::color);
glVertexAttribPointer(BindingLocation::color, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (GLvoid*)offsetof(Vertex, Vertex::color));
glEnableVertexAttribArray(BindingLocation::uv);
glVertexAttribPointer(BindingLocation::uv, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (GLvoid*)offsetof(Vertex, Vertex::uv));
glBindVertexArray(0);
}
|
ca00391626870f6662b73382ba05611616aab066
|
9eb2245869dcc3abd3a28c6064396542869dab60
|
/benchspec/CPU/523.xalancbmk_r/build/build_base_mytest-64.0001/XMLDouble.cpp
|
2c0e325fd1ea173a437df3f1368bdbabee5a971c
|
[] |
no_license
|
lapnd/CPU2017
|
882b18d50bd88e0a87500484a9d6678143e58582
|
42dac4b76117b1ba4a08e41b54ad9cfd3db50317
|
refs/heads/master
| 2023-03-23T23:34:58.350363
| 2021-03-24T10:01:03
| 2021-03-24T10:01:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 129
|
cpp
|
XMLDouble.cpp
|
version https://git-lfs.github.com/spec/v1
oid sha256:6e046400ca59a82051df0846ed15344fc74060f61c5c77f59c51eee676a1e20f
size 1920
|
2b6fc923825831227541602e16070a557f9ce5f3
|
867e60f17fdf0148a0ed744f0ee43d43e244dc08
|
/Classes/GameScene.h
|
47b1bb57f47361957d8c25d085e9ff253fe791f2
|
[] |
no_license
|
AIRIA/WhiteTile
|
0f98fcb8c4097252b8fa5b1becc6174c8c46b0eb
|
7fc7b48f54996e602e21e2638cbb5c7991cbecb5
|
refs/heads/master
| 2016-09-05T21:15:43.998819
| 2014-07-28T06:01:14
| 2014-07-28T06:01:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,923
|
h
|
GameScene.h
|
//
// GameScene.h
// WhiteTile
//
// Created by AIRIA on 14-4-21.
//
//
#ifndef __WhiteTile__GameScene__
#define __WhiteTile__GameScene__
#include <iostream>
#include "cocos2d.h"
#include "GameConfig.h"
using namespace cocos2d;
class GameScene:public CCLayer
{
private:
//classic mode proper
float m_fClassicTime;
private:
//chan mode proper
float m_fChanTime;
private:
std::vector<int> m_vBlackTags;
GameType gameMode;
private:
std::string resultTitle;
std::string currentScore;
float topScore;
bool isGameover;
int tileTag;
int activeTiles;
int tileCount;
CCSize m_winSize;
CCSpriteBatchNode *tileBatchNode;
CCLabelTTF *scoreLabel,*scoreLabelShadow;
float m_fTileWidth,m_fTileHeight;
int m_nVerticalTiles,m_nHorizontalTiles;
CCArray *tilePools;
float m_fTileScaleX,m_fTileScaleY;
/* 显示引导文字介绍 */
void showGuide();
/* 创建层里面的白块儿 */
void createTile(int rows);
void initLayers();
void __showResult();
void __backHandler(CCObject *pSender);
void __retryHandler(CCObject *pSender);
void __endGame(CCObject *obj);
void __updateScore(CCObject *obj);
void __tileTouchDownHandler(CCObject *pSender);
void __tileTouchUpHandler(CCObject *pSender);
void __whiteTileTouchHandler(CCObject *pSender);
void __rollBackHandler(CCObject *pSender,void *param);
void __blinkHandler();
void __timerHandler(float del);
void __initSelectMode();
void __createGreenResultLayer();
void __saveScore();
void __shareHandler(CCObject *pSender);
public:
void startGame(CCObject *pSender);
static CCScene *scene(GameType gameType);
virtual void update(float f);
virtual bool init();
CREATE_FUNC(GameScene);
virtual void onEnter();
virtual void onExit();
};
#endif /* defined(__WhiteTile__GameScene__) */
|
804fb05223fb0de1dafe6eb40c20828c990d1c73
|
835dc1d5613032fc19afd70d557b09c5b478192e
|
/engine/engine.cpp
|
de0701666e3c3a88fe28cb4969cb92b5a6ab974f
|
[] |
no_license
|
AmadeusDeadDmytro/AmaEngine
|
0b6230504ec362d38df2963e3717306052710144
|
b1b184c8035e35c71613ce367b3faab680427e5f
|
refs/heads/master
| 2023-02-19T13:32:29.393748
| 2021-01-21T07:29:57
| 2021-01-21T07:29:57
| 331,546,922
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,106
|
cpp
|
engine.cpp
|
#include "engine.h"
#include <stdio.h>
#include <windows.h>
#include <GL/GL.h>
#include <SDL.h>
#undef main
#include "texture.h"
namespace deusage
{
namespace engine
{
SDL_GLContext glContext;
SDL_Window *window;
draw_method_ptr draw_method;
input_handler_ptr input_handler;
bool running;
void init(draw_method_ptr draw_method, input_handler_ptr input_handler)
{
if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
printf("SDL initialization: %s\n", SDL_GetError());
//TODO exception
return;
}
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
window = SDL_CreateWindow("Ama Engine", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_OPENGL);
if (window == nullptr)
{
printf("SDL window creation: %s\n", SDL_GetError());
return;
}
glContext = SDL_GL_CreateContext(window);
//vsync on
SDL_GL_SetSwapInterval(1);
//enable alpha blending
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
engine::draw_method = draw_method;
engine::input_handler = input_handler;
}
void destroy()
{
SDL_GL_DeleteContext(glContext);
SDL_DestroyWindow(window);
SDL_Quit();
}
void engine_window_resized(unsigned w, unsigned h)
{
printf("engine window has been resized to %ux%u\n", w, h);
}
void engine_input_handler(SDL_Event *e)
{
switch (e->type)
{
case SDL_WINDOWEVENT:
switch (e->window.event)
{
case SDL_WINDOWEVENT_RESIZED:
engine_window_resized(e->window.data1, e->window.data2);
break;
}
break;
}
}
void loop()
{
running = true;
// main loop
while (running)
{
SDL_Event e;
if (SDL_PollEvent(&e))
{
engine_input_handler(&e);
input_handler(&e);
}
//TODO: dynamic viewport adaption
//(catch some of the events)
draw_method();
SDL_GL_SwapWindow(window);
}
}
} // namespace engine
} // namespace deusage
|
d95f441d2aa1577f217b73b07ab78165ddcc4941
|
30d65bd092e4750655cb5af2a7945ebb5082cc7c
|
/CheckPath/CheakPath.cpp
|
ef7b7ffda66af0bef93f6fe25fd7ab029b2c471f
|
[] |
no_license
|
Gao-zhenfeng/Object-Oriented
|
ad2b4077165bee1c21aa20dce412f979747183fe
|
a19fa99d5714e44dfe7294c3dcb11817c0a2ffe5
|
refs/heads/master
| 2023-03-10T22:36:24.202926
| 2021-02-28T15:07:31
| 2021-02-28T15:07:31
| 319,052,636
| 0
| 0
| null | 2020-12-07T08:28:15
| 2020-12-06T14:28:46
| null |
UTF-8
|
C++
| false
| false
| 1,108
|
cpp
|
CheakPath.cpp
|
#include <iostream>
#include <filesystem>
#include <string>
using std::cout;
using std::endl;
int main()
{
namespace fs = std::filesystem;
//定义路径,使用RAW字符串、转义字符串、正斜杠字符串
fs::path p1{ "E:\Program\C++练习\class_exe\CheckPath\Hello.txt" };
fs::path p2{ R"(E:\Program\C++练习\class_exe\CheckPath)" };
fs::path p3{ "E:/Program/C++练习/class_exe/CheckPath/Hello.txt" };
//输出默认文件分隔符
cout << "file separator is : " << fs::path::preferred_separator << endl;
//判断是否是常规文件,如果是,输出文件大小
if (fs::is_regular_file(p2))
{
cout << p2 << "s size is : " << fs::file_size(p2) << endl;
}
else if (fs::is_directory(p2)) //判断是否是目录,如果是目录,列出其子目录
{
cout << p2 << "is a directory, includes : " << endl;
for (auto& e : fs::directory_iterator(p2)) {
cout << " " << e.path() << endl;
}
}
//判断路径是否存在
else if (fs::exists(p2))
{
cout << p2 << " is a special file" << endl;
}
else
{
cout << p2 << " does not exist" << endl;
}
return 0;
}
|
85ce038f66b0efaed9c31fac24e5aa6c9a9b1de8
|
11cb07ccbfdbe794147def48d4649d7a80bdc8e4
|
/base/Imp/nSocket.cpp
|
d0621dec57ea6d939107d49c5852791a056679eb
|
[] |
no_license
|
qq587282/GameServerFramework
|
e34078d148400772b6473c49dd732d4c57bb2d7f
|
64f0b71b81dc94ce92517f3e7efecc1d775a32ee
|
refs/heads/master
| 2020-05-20T18:41:54.102213
| 2017-07-03T10:33:03
| 2017-07-03T10:33:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 20,174
|
cpp
|
nSocket.cpp
|
#include <netdb.h>
#include "base/nMisc.h"
#include "base/nSys.h"
#include "base/nBaseServer.h"
#include "base/nDebugger.h"
#include "base/nZip.h"
#include "base/Imp/nSocket.h"
namespace Tidy
{
nSocket::nSocket(const int sock, const struct sockaddr *addr, const CommandCtl* ctl, const BYTE zipMethod, const bool needQuickAck):
_bit_mask(0),
_sock(sock),
_peer_ip_str("0.0.0.0"),
_peer_port(0),
_local_ip_str("0.0.0.0"),
_local_port(0),
rd_msec(T_RD_MSEC),
wr_msec(T_WR_MSEC),
_rcv_raw_size(0),
_current_packet(0),
_command_ctl(ctl),
_zip_method(zipMethod),
_need_enc(false),
_enc_data(NULL),
_need_close(false),
_need_quick_ack(needQuickAck)
{
assert_debug(-1 != _sock, "");
if(addr->sa_family == AF_INET){
_peer_ip_str = inet_ntoa(reinterpret_cast<const struct sockaddr_in*>(addr)->sin_addr);
_peer_port = ntohs(reinterpret_cast<const struct sockaddr_in*>(addr)->sin_port);
struct sockaddr_in localAddr;
socklen_t len = sizeof(struct sockaddr_in);
getsockname(_sock, reinterpret_cast<struct sockaddr*>(&localAddr), &len);
_local_ip_str = inet_ntoa(localAddr.sin_addr);
_local_port = ntohs(localAddr.sin_port);
}
else if(addr->sa_family == AF_LOCAL){
_need_quick_ack = false;
}
fcntl(this->_sock, F_SETFD,
fcntl(this->_sock, F_GETFD, 0)
| FD_CLOEXEC);
setNonblock();
set_flag(INCOMPLETE_READ | INCOMPLETE_WRITE);
}
nSocket::~nSocket()
{
baseServer->debug("关闭套接口连接[%p]", this);
sync();
::shutdown(_sock, SHUT_RDWR);
TEMP_FAILURE_RETRY(::close(_sock));
_sock = -1;
SAFE_DELETE(_enc_data);
}
/**
* \brief 从接收到数据的buffer中提取一个消息
*
*/
#define success_unpack() \
do { \
if(_unpack_cmd_queue.rd_ready()) {\
int commandLen = _command_ctl->unpackCmd(this, _unpack_cmd_queue, NULL, commandBuffer, commandBufferLen); \
if(commandLen < 0){\
assert_fail("unpackCmd fail");\
setNeedClose();\
return 0;\
}\
if(commandLen > 0){\
return commandLen;\
}\
}\
assert_debug(_rcv_queue.rd_size() >= _rcv_raw_size, "");\
if (_rcv_raw_size >= _command_ctl->getMinPacketSize()){ \
int nRecordLen = _command_ctl->getPacketSize(_rcv_queue, 0); \
if(nRecordLen < 0){ \
assert_fail("获取包数据大小错误");\
setNeedClose();\
return 0;\
} \
else if (_rcv_raw_size >= static_cast<DWORD>(nRecordLen)){ \
DWORD rcvSize = _rcv_queue.rd_size();\
int commandLen = _command_ctl->unpackCmd(this, _rcv_queue, &_unpack_cmd_queue, commandBuffer, commandBufferLen); \
if(commandLen < 0){\
assert_fail("unpackCmd fail");\
setNeedClose();\
return 0;\
}\
if(rcvSize != _rcv_queue.rd_size()){\
assert_debug((rcvSize - _rcv_queue.rd_size()) == static_cast<DWORD>(nRecordLen), "");\
_rcv_raw_size -= (rcvSize - _rcv_queue.rd_size()); \
}\
assert_debug(_rcv_queue.rd_size() >= _rcv_raw_size, "");\
return commandLen; \
} \
} \
} while(0)
DWORD nSocket::recvToCmd(void *commandBuffer, const DWORD commandBufferLen, const bool wait)
{
//够一个完整的纪录,不需要向套接口接收数据
success_unpack();
do {
int retval = recvToBuf();
if (-1 == retval || (0 == retval && !wait))
return retval;
//够一个完整的纪录,不需要向套接口接收数据
success_unpack();
} while(true);
return 0;
}
int nSocket::sendRawData(const void *pBuffer, const DWORD nSize)
{
int retcode = 0;
if (isset_flag(INCOMPLETE_WRITE))
{
clear_flag(INCOMPLETE_WRITE);
goto do_select;
}
retcode = TEMP_FAILURE_RETRY(::send(_sock, pBuffer, nSize, MSG_NOSIGNAL));
if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
{
do_select:
retcode = waitForWrite();
if (1 == retcode)
retcode = TEMP_FAILURE_RETRY(::send(_sock, pBuffer, nSize, MSG_NOSIGNAL));
else
return retcode;
}
if (retcode > 0 && static_cast<DWORD>(retcode) < nSize)
set_flag(INCOMPLETE_WRITE);
return retcode;
}
bool nSocket::sendRawDataIM(const void *pBuffer, const DWORD nSize)
{
assert_debug(pBuffer != NULL && nSize > 0, "数据无效");
DWORD offset = 0;
do
{
int retcode = sendRawData(&((char *)pBuffer)[offset], nSize - offset);
if (-1 == retcode)
{
return false;
}
offset += retcode;
}
while(offset < nSize);
return (offset == nSize);
}
bool nSocket::sendCmd(const void *nullCommand, const DWORD commandLen, const bool buffer)
{
if (NULL == nullCommand) {
assert_fail("消息数据乱");
return false;
}
bool retval = true;
if (buffer) {
if(checkNeedZip() == true) {
_mutex.lock();
_wait_zip_packet_queue.wr_reserve(_command_ctl->getCmdBufferSize(commandLen));
DWORD len = _command_ctl->putPacket(eZipMethod_None, nullCommand, commandLen, _wait_zip_packet_queue.wr_buf(), _wait_zip_packet_queue.wr_size(), true, &_current_packet);
_wait_zip_packet_queue.wr_flip(len);
_mutex.unlock();
}
else {
_mutex.lock();
_snd_queue.wr_reserve(_command_ctl->getCmdBufferSize(commandLen));
DWORD len = _command_ctl->putPacket(eZipMethod_None, nullCommand, commandLen, _snd_queue.wr_buf(), _snd_queue.wr_size(), true, &_current_packet);
_snd_queue.wr_flip(len);
_mutex.unlock();
}
}
else {
if(_command_ctl->getCmdBufferSize(commandLen) < PACKET_ZIP_BUFFER) {
StackCmdQueue commandQueue;
commandQueue.wr_flip(_command_ctl->putPacket(_zip_method, nullCommand, commandLen, commandQueue.wr_buf(), commandQueue.wr_size(), true, &_current_packet));
if (_need_enc) {
packetPackEnc(commandQueue, commandQueue.rd_size(), 0);
}
_mutex.lock();
retval = sendRawDataIM(commandQueue.rd_buf(), commandQueue.rd_size());
_mutex.unlock();
}
else {
BufferCmdQueue commandQueue;
commandQueue.wr_reserve(_command_ctl->getCmdBufferSize(commandLen));
commandQueue.wr_flip(_command_ctl->putPacket(_zip_method, nullCommand, commandLen, commandQueue.wr_buf(), commandQueue.wr_size(), true, &_current_packet));
if (_need_enc) {
packetPackEnc(commandQueue, commandQueue.rd_size(), 0);
}
_mutex.lock();
retval = sendRawDataIM(commandQueue.rd_buf(), commandQueue.rd_size());
_mutex.unlock();
}
}
return retval;
}
bool nSocket::sync()
{
DWORD nSize = 0, currentCmd = 0, offset = 0, len = 0;
if(checkNeedZip() == true && _wait_zip_packet_queue.rd_ready()) {
_mutex.lock();
if(_wait_zip_packet_queue.rd_ready()) {
if(_wait_zip_packet_queue.rd_size() >= PACKET_ZIP_BUFFER) {
BufferCmdQueue cmdQueue;
cmdQueue.put(_wait_zip_packet_queue.rd_buf(), _wait_zip_packet_queue.rd_size());
_wait_zip_packet_queue.reset();
_mutex.unlock();
_snd_queue.wr_reserve(_command_ctl->getBufferSize(cmdQueue.rd_size()));
len = _command_ctl->putPacket(_zip_method, cmdQueue.rd_buf(), cmdQueue.rd_size(), _snd_queue.wr_buf(), _snd_queue.wr_size(), false, &_current_packet);
_snd_queue.wr_flip(len);
}
else {
StackCmdQueue cmdQueue;
cmdQueue.put(_wait_zip_packet_queue.rd_buf(), _wait_zip_packet_queue.rd_size());
_wait_zip_packet_queue.reset();
_mutex.unlock();
_snd_queue.wr_reserve(_command_ctl->getBufferSize(cmdQueue.rd_size()));
len = _command_ctl->putPacket(_zip_method, cmdQueue.rd_buf(), cmdQueue.rd_size(), _snd_queue.wr_buf(), _snd_queue.wr_size(), false, &_current_packet);
_snd_queue.wr_flip(len);
}
}
else {
_mutex.unlock();
}
}
if (_snd_queue.rd_ready()) {
_mutex.lock();
if (_snd_queue.rd_ready()) {
nSize = _snd_queue.rd_size();
currentCmd = _current_packet;
offset = _enc_queue.rd_size();
_enc_queue.put(_snd_queue.rd_buf(), nSize);
_snd_queue.rd_flip(nSize);
_current_packet = 0;
}
_mutex.unlock();
}
if (_need_enc && nSize > 0) {
packetPackEnc(_enc_queue, currentCmd, offset);
}
if (_enc_queue.rd_ready()) {
int retcode = sendRawData_NoPoll(_enc_queue.rd_buf(), _enc_queue.rd_size());
if (retcode > 0) {
_enc_queue.rd_flip(retcode);
}
else if (-1 == retcode) {
return false;
}
}
return true;
}
int nSocket::checkIOForRead()
{
struct pollfd pfd;
pfd.fd = _sock;
pfd.events = POLLIN | POLLERR | POLLPRI;
pfd.revents = 0;
int retcode = TEMP_FAILURE_RETRY(::poll(&pfd, 1, 0));
if (retcode > 0 && 0 == (pfd.revents & POLLIN))
{
retcode = -1;
}
return retcode;
}
int nSocket::checkIOForWrite()
{
struct pollfd pfd;
pfd.fd = _sock;
pfd.events = POLLOUT | POLLERR | POLLPRI;
pfd.revents = 0;
int retcode = TEMP_FAILURE_RETRY(::poll(&pfd, 1, 0));
if (retcode > 0 && 0 == (pfd.revents & POLLOUT))
retcode = -1;
return retcode;
}
/**
* \brief 将接收到的数据解密
*
*/
#define success_recv_and_dec() \
do { \
if ((unsigned int)retcode < _rcv_queue.wr_size()) \
{ \
set_flag(INCOMPLETE_READ); \
} \
_rcv_queue.wr_flip(retcode); \
unsigned int size = _rcv_queue.rd_size() - _rcv_raw_size - ((_rcv_queue.rd_size() - _rcv_raw_size) % 8); \
if(size) \
{ \
_command_ctl->encdecData(_enc_data, (void*)(&_rcv_queue.rd_buf()[_rcv_raw_size]), size, false); \
_rcv_raw_size += size; \
} \
} while(0)
/**
* \brief 接收数据
*
*/
#define success_recv() \
do { \
if ((unsigned int)retcode < _rcv_queue.wr_size()) \
{ \
set_flag(INCOMPLETE_READ); \
} \
_rcv_queue.wr_flip(retcode); \
_rcv_raw_size += retcode; \
} while(0)
int nSocket::recvToBuf_NoPoll()
{
int retcode =0;
if(_need_enc)
{
_rcv_queue.wr_reserve(MAX_PROTO_CMD_LEN);
retcode = TEMP_FAILURE_RETRY(::recv(_sock, _rcv_queue.wr_buf(), _rcv_queue.wr_size(), MSG_NOSIGNAL));
if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
{
baseServer->debug("尝试重新接收数据:[ip=%s,retcode=%u,err=%u]",getIP(),retcode,errno);
return 0;//should retry
}
if (retcode > 0)
success_recv_and_dec();
}
else
{
_rcv_queue.wr_reserve(MAX_PROTO_CMD_LEN);
retcode = TEMP_FAILURE_RETRY(::recv(_sock, _rcv_queue.wr_buf(), _rcv_queue.wr_size(), MSG_NOSIGNAL));
if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
{
baseServer->debug("尝试重新接收数据:[ip=%s,retcode=%u,err=%u]",getIP(),retcode,errno);
return 0;//should retry
}
if (retcode > 0)
success_recv();
}
if (0 == retcode)
return -1;//EOF
if(_need_quick_ack == true){
keepQuickAck();
}
return retcode;
}
DWORD nSocket::recvToCmd_NoPoll(void *commandBuffer, const DWORD commandBufferLen)
{
//够一个完整的纪录,不需要向套接口接收数据
success_unpack();
return 0;
}
void nSocket::addEpoll(int kdpfd, __uint32_t events, void *ptr)
{
struct epoll_event ev;
ev.events = events;
ev.data.ptr = ptr;
_mutex.lock();
if (-1 == epoll_ctl(kdpfd, EPOLL_CTL_ADD, _sock, &ev)){
char _buf[100];
strerror_r(errno, _buf, sizeof(_buf));
assert_fail("注册epoll事件失败");
}
_mutex.unlock();
}
void nSocket::delEpoll(int kdpfd, __uint32_t events)
{
struct epoll_event ev;
ev.events = events;
_mutex.lock();
if (-1 == epoll_ctl(kdpfd, EPOLL_CTL_DEL, _sock, &ev)){
char _buf[100];
strerror_r(errno, _buf, sizeof(_buf));
assert_fail("取消epoll注册失败");
}
_mutex.unlock();
}
int nSocket::sendRawData_NoPoll(const void *data, const DWORD len)
{
int retcode = TEMP_FAILURE_RETRY(::send(_sock, data, len, MSG_NOSIGNAL));
if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
{
baseServer->debug("尝试重新发送数据:[ip=%s,retcode=%d,err=%d,size=%u]", getIP(), retcode, errno, len);
return 0;//should retry
}
if (retcode > 0 && static_cast<DWORD>(retcode) < len){
set_flag(INCOMPLETE_WRITE);
#ifdef _DEBUG_NYS
baseServer->debug("未完成发送[%d,%u]", retcode, len);
#endif
}
return retcode;
}
bool nSocket::setNonblock()
{
int fd_flags;
if(_local_port != 0){
//unix domain socket 不设置此选项,否则会阻塞
int nodelay = 1;
if (::setsockopt(_sock, IPPROTO_TCP, TCP_NODELAY, (void *)&nodelay, sizeof(nodelay))){
return false;
}
}
fd_flags = ::fcntl(_sock, F_GETFL, 0);
#if defined(O_NONBLOCK)
fd_flags |= O_NONBLOCK;
#elif defined(O_NDELAY)
fd_flags |= O_NDELAY;
#elif defined(FNDELAY)
fd_flags |= O_FNDELAY;
#else
/* XXXX: this breaks things, but an alternative isn't obvious...*/
return false;
#endif
if (::fcntl(_sock, F_SETFL, fd_flags) == -1) {
return false;
}
return true;
}
int nSocket::waitForRead()
{
struct pollfd pfd;
pfd.fd = _sock;
pfd.events = POLLIN | POLLERR | POLLPRI;
pfd.revents = 0;
int retcode = TEMP_FAILURE_RETRY(::poll(&pfd, 1, rd_msec));
if (retcode > 0 && 0 == (pfd.revents & POLLIN))
retcode = -1;
return retcode;
}
int nSocket::waitForWrite()
{
struct pollfd pfd;
pfd.fd = _sock;
pfd.events = POLLOUT | POLLERR | POLLPRI;
pfd.revents = 0;
int retcode = TEMP_FAILURE_RETRY(::poll(&pfd, 1, wr_msec));
if (retcode > 0 && 0 == (pfd.revents & POLLOUT))
retcode = -1;
return retcode;
}
int nSocket::recvToBuf()
{
int retcode = 0;
if(_need_enc)
{
if (isset_flag(INCOMPLETE_READ))
{
clear_flag(INCOMPLETE_READ);
goto do_select_enc;
}
_rcv_queue.wr_reserve(MAX_PROTO_CMD_LEN);
retcode = TEMP_FAILURE_RETRY(::recv(_sock, _rcv_queue.wr_buf(), _rcv_queue.wr_size(), MSG_NOSIGNAL));
if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
{
do_select_enc:
retcode = waitForRead();
if (1 == retcode)
retcode = TEMP_FAILURE_RETRY(::recv(_sock, _rcv_queue.wr_buf(), _rcv_queue.wr_size(), MSG_NOSIGNAL));
else
return retcode;
}
if (retcode > 0)
success_recv_and_dec();
}
else
{
if (isset_flag(INCOMPLETE_READ))
{
clear_flag(INCOMPLETE_READ);
goto do_select;
}
_rcv_queue.wr_reserve(MAX_PROTO_CMD_LEN);
retcode = TEMP_FAILURE_RETRY(::recv(_sock, _rcv_queue.wr_buf(), _rcv_queue.wr_size(), MSG_NOSIGNAL));
if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
{
do_select:
retcode = waitForRead();
if (1 == retcode)
retcode = TEMP_FAILURE_RETRY(::recv(_sock, _rcv_queue.wr_buf(), _rcv_queue.wr_size(), MSG_NOSIGNAL));
else
return retcode;
}
if (retcode > 0)
success_recv();
}
if (0 == retcode)
return -1;//EOF
if(_need_quick_ack == true){
keepQuickAck();
}
return retcode;
}
bool nSocket::heartTick() const
{
char buff[1];
::send(_sock, buff, 0, MSG_NOSIGNAL);
return true;
}
DWORD nSocket::getSendBufferSize() const
{
return _wait_zip_packet_queue.rd_size() + _snd_queue.rd_size() + _enc_queue.rd_size();
}
const CommandCtl* nSocket::getCommandCtl() const
{
return _command_ctl;
}
void nSocket::setNeedClose()
{
_need_close = true;
}
bool nSocket::checkNeedClose() const
{
return _need_close;
}
void nSocket::keepQuickAck()
{
// 避免延迟确认带来的延迟.每次调用在0.4us左右,可以接受.
int quickAck = 1;
setsockopt(_sock, IPPROTO_TCP, TCP_QUICKACK, (void*)&quickAck, sizeof(int));
}
int nSocket::createTcpSocket()
{
int sock = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (-1 == sock){
baseServer->error("创建套接口失败");
return sock;
}
//设置套接口为可重用状态
int reuse = 1;
if (-1 == ::setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse))){
baseServer->error("不能设置套接口为可重用状态");
TEMP_FAILURE_RETRY(::close(sock));
return -1;
}
//设置套接口发送接收缓冲,并且服务器的必须在accept之前设置
socklen_t window_size = 128 * 1024;
if (-1 == ::setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &window_size, sizeof(window_size))){
TEMP_FAILURE_RETRY(::close(sock));
return -1;
}
if (-1 == ::setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &window_size, sizeof(window_size))){
TEMP_FAILURE_RETRY(::close(sock));
return -1;
}
return sock;
}
int nSocket::createUnixSocket()
{
int sock = ::socket(AF_LOCAL, SOCK_STREAM, 0);
if (-1 == sock){
baseServer->error("创建套接口失败");
return sock;
}
//设置套接口为可重用状态
int reuse = 1;
if (-1 == ::setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse))){
baseServer->error("不能设置套接口为可重用状态");
TEMP_FAILURE_RETRY(::close(sock));
return -1;
}
return sock;
}
int nSocket::bindTcpServer(const std::string &ip, WORD port)
{
assert_debug(port > 0, "");
int socket = createTcpSocket();
if(socket == -1){
return -1;
}
struct sockaddr_in addr;
bzero(&addr, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(ip.c_str());
// 域名绑定IP使用INADDR_ANY
if(ip.empty() == true || ip.data()[0] == '*' || addr.sin_addr.s_addr == INADDR_NONE){
addr.sin_addr.s_addr = htonl(INADDR_ANY);
}
addr.sin_port = htons(port);
int retcode = ::bind(socket, (struct sockaddr *) &addr, sizeof(addr));
if (-1 == retcode){
TEMP_FAILURE_RETRY(::close(socket));
return -1;
}
baseServer->info("服务器 %s:[%s,%u] 端口初始化绑定成功", baseServer->getServerName(), ip.c_str(), port);
return socket;
}
int nSocket::bindUnixServer(const char *path)
{
int socket = createUnixSocket();
if(socket == -1){
return -1;
}
struct sockaddr_un sa;
memset(&sa,0,sizeof(sa));
sa.sun_family = AF_LOCAL;
copyStr(sa.sun_path, path, sizeof(sa.sun_path));
int retcode = ::bind(socket, (struct sockaddr *) &sa, sizeof(sa));
if (-1 == retcode){
TEMP_FAILURE_RETRY(::close(socket));
return -1;
}
baseServer->info("服务器 %s:%s 端口初始化绑定成功", baseServer->getServerName(), path);
return socket;
}
nSocket* nSocket::connectTcpServer(const char *ip, int port, const CommandCtl *commandCtl, const BYTE zipMethod)
{
char dnsBuffer[8192];
struct hostent hostInfo;
struct hostent *host = NULL;
int rc = 0;
if(gethostbyname_r(ip, &hostInfo, dnsBuffer, sizeof(dnsBuffer), &host, &rc) != 0 || host == NULL){
assert_fail("连接失败,无法解析host[%s,%d]", ip, rc);
return NULL;
}
int socket = nSocket::createTcpSocket();
if(socket == -1){
return NULL;
}
struct sockaddr_in addr;
bzero(&addr, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = ((struct in_addr*)(host->h_addr))->s_addr;
addr.sin_port = htons(port);
int retcode = TEMP_FAILURE_RETRY(::connect(socket, (struct sockaddr *) &addr, sizeof(addr)));
if (-1 == retcode && errno != EINPROGRESS){
baseServer->error("创建到服务器 %s(%u) 的连接失败", ip, port);
TEMP_FAILURE_RETRY(::close(socket));
return NULL;
}
baseServer->info("创建到服务器 %s:%u 的连接成功", ip, port);
return new nSocket(socket, reinterpret_cast<const struct sockaddr*>(&addr), commandCtl, zipMethod, false);
}
nSocket* nSocket::connectUnixServer(const char *destUnixSocketPath, const CommandCtl *commandCtl, const BYTE zipMethod)
{
int socket = nSocket::createUnixSocket();
if(socket == -1){
return NULL;
}
struct sockaddr_un sa;
sa.sun_family = AF_LOCAL;
copyStr(sa.sun_path, destUnixSocketPath, sizeof(sa.sun_path));
int retcode = TEMP_FAILURE_RETRY(::connect(socket, (struct sockaddr *) &sa, sizeof(sa)));
if (-1 == retcode){
baseServer->error("创建到服务器 [%s] 的连接失败", destUnixSocketPath);
TEMP_FAILURE_RETRY(::close(socket));
return NULL;
}
baseServer->info("创建到服务器 [%s] 的连接成功", destUnixSocketPath);
struct sockaddr_in addr;
bzero(&addr, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr("127.0.0.1");
addr.sin_port = htons(0);
return new nSocket(socket, reinterpret_cast<const struct sockaddr*>(&addr), commandCtl, zipMethod, false);
}
nEncrypt* nSocket::getEncData()
{
_enc_data = new nEncrypt();
return _enc_data;
}
void nSocket::changeCommandCtl(const CommandCtl* commandCtl)
{
assert_debug(_command_ctl != commandCtl, "");
_command_ctl = commandCtl;
}
};
|
4945bc2a44561b7b691afd3033148a8f7bc6c785
|
9ba0255bc414c35aa1792f5fc1827b655ae549f8
|
/Library/LaserScan/include/RegistrationStructs.h
|
808d1b2e287f8c3d0e4953a28b44c23c7096c662
|
[] |
no_license
|
Geodan/3D4EM-LoD2buildingmodels
|
526353e190cd0e985a461a9e2fcad355baad559e
|
4ce4d87af56303d58ce0295634c5ca1d727ce5b3
|
refs/heads/master
| 2021-01-20T12:41:54.687549
| 2017-02-20T08:10:15
| 2017-02-20T08:10:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,774
|
h
|
RegistrationStructs.h
|
/*
Copyright 2010 University of Twente and Delft University of Technology
This file is part of the Mapping libraries and tools, developed
for research, education and projects in photogrammetry and laser scanning.
The Mapping libraries and tools are free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
The Mapping libraries and tools are distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the Mapping libraries and tools. If not, see
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------*/
/*--------------------------------------------------------------------
* Project : Automated reconstruction of industrial installations
*
* File made : March 2005
* Author : Tahir Rabbani
* Modified :
* Purpose : Structure definitions for keeping information related to registration.
*--------------------------------------------------------------------*/
#ifndef __REGISTRATION_STRUCTS__h___
#define __REGISTRATION_STRUCTS__h___
#include "Vector3D.h"
#include "Rotation3D.h"
#include "RotationParameter.h"
#include "ExteriorOrientation.h"
#include "ENLSIPFitting.h"
#include "LaserObjects.h"
#include "LaserTransform3D.h"
class LaserPoints;
#define SHOW_DEBUG 0
//--------------------------------------------------------------
//Type for keeping scan and target number together. Used as a key
//for the map for direct lookup.
struct RegTargetId
//--------------------------------------------------------------
{
//The id of the target.
int regTargetNumber;
//The id of the scan
int scanNumber;
//Constructor.
RegTargetId(int sn=-1,int on=-1);
//operator ==
bool operator==(const RegTargetId& o2)const;
//operator >
bool operator>(const RegTargetId& o2)const;
//operator <
bool operator<(const RegTargetId& o2)const;
};
//--------------------------------------------------------------
//A generic registration target. Keeps type as a string and a list of parameter values.
//--------------------------------------------------------------
struct RegistrationTarget
{
//id of the target.
RegTargetId id;
//Type name, like "LaserCylinder", "LaserPlane", etc.
string type;
//A list of parameters.
vector<double> parameters;
//Constructor.
RegistrationTarget(const RegTargetId& a=RegTargetId(),const char* tp="",const vector<double>& pr=vector<double>());
//Print some information to a given file or by default to stderr.
bool Print(FILE* pFile=stderr);
};
//--------------------------------------------------------------
//struct for transformation. Just has a combination of Rotation and translation
//Applies the transformation to RegistrationTargets directly.
//--------------------------------------------------------------
//--------------------------------------------------------------
//full information for object-parameter based registration.
//--------------------------------------------------------------
struct RegistrationData
{
//Table of exterior orientations.
//maps a scan id to its transform.
typedef map<int,LaserTransform3D> TransformMap;
TransformMap transforms;
//Table of all targets.
//map a target-id to its data.
typedef map<RegTargetId,RegistrationTarget> TargetMap;
TargetMap targets;
//Map of correspondences.
typedef map<RegTargetId, vector<RegTargetId> > CorrMap;
CorrMap correspondences;
//define an iterator type.
typedef CorrMap::iterator CorrMapIter;
//Clears all maps etc.
void ClearAll();
//Read from file.
bool LoadFromFile(const char* fileName);
//Save to file.
bool SaveToFile(const char* fileName);
//Print to a file or stderr
bool Print(FILE* pFile=stderr);
//Print corresponding object parameters.
bool PrintCorrespondences(FILE* pFile=stderr);
//Get Observation count.
int GetObsCount();
//Get Parameter Count
int GetParamCount();
//Check if we have transform for a given id.
bool HasTransform(int id);
//Load transformvalues from an iterator.
template<class T>
bool LoadTransform(int scanId,T vals)
{
if(HasTransform(scanId))
{
TransformMap::iterator iter = transforms.begin();
int index = 0;
for(;iter!=transforms.end();iter++)
{
if(iter->first == scanId)
{
break;
}
index++;
}
//We have to find the offset.
int offset = index*7;
transforms[scanId].LoadFromVector(vals+offset);
}
else
{
cerr<<"No transform for id: "<<scanId<<" in LoadTransform()\n";
}
}
template<class T>
bool SaveTransform(int scanId,T vals)
{
if(HasTransform(scanId))
{
TransformMap::iterator iter = transforms.begin();
int index = 0;
for(;iter!=transforms.end();iter++)
{
if(iter->first == scanId)
{
break;
}
index++;
}
//We have to find the offset.
int offset = index*7;
transforms[scanId].SaveToVector(vals+offset);
}
else
{
cerr<<"No transform for id: "<<scanId<<" in LoadTransform()\n";
}
}
//See how many scans have objects in correspondence map
int GetUsedScanCount();
};
#endif //__REGISTRATION_STRUCTS__h___
|
0e6c8917d0522f0b8813ef99ddf2301f07622d90
|
22fe0a7a3ccba95e3f4dfcd3e5e061478578b494
|
/www/seamonkey/patches/patch-mozilla_js_src_jit_LIR.cpp
|
390bb01d531123599f09e2fa6b6291bc5e09b1f5
|
[] |
no_license
|
alslater/pkgsrc
|
0f97f3eaf7a980e9ceaed5802012333e11946e08
|
c5c9c96a3375320018106521f805574f96e77751
|
refs/heads/trunk
| 2023-07-08T15:53:53.435685
| 2015-07-08T22:51:58
| 2015-07-08T22:51:58
| 38,878,918
| 2
| 4
| null | 2021-05-04T11:31:12
| 2015-07-10T12:19:51
|
Makefile
|
UTF-8
|
C++
| false
| false
| 467
|
cpp
|
patch-mozilla_js_src_jit_LIR.cpp
|
$NetBSD: patch-mozilla_js_src_jit_LIR.cpp,v 1.1 2015/03/17 19:50:42 ryoon Exp $
--- mozilla/js/src/jit/LIR.cpp.orig 2015-03-09 05:34:37.000000000 +0000
+++ mozilla/js/src/jit/LIR.cpp
@@ -314,7 +314,7 @@ LNode::printName(FILE *fp, Opcode op)
const char *name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- fprintf(fp, "%c", tolower(name[i]));
+ fprintf(fp, "%c", tolower(((unsigned char)name[i])));
}
void
|
3d401d7d2fea0ad64b8075b6a8ead989fd550f7c
|
892d94d439d22613e913c6893799cc4427550f90
|
/googletest/GeneralTest.cpp
|
6410c4f448faa12d8adda369027a591517ee844d
|
[] |
no_license
|
VovaMiller/digger-offline-2d
|
cc3452e06ef73070b75ed1ccc709e646e644367b
|
cb6d01ef5c5884a156a4ac94b4827519638411b6
|
refs/heads/master
| 2021-09-14T19:25:58.035846
| 2018-05-17T21:15:36
| 2018-05-17T21:15:36
| 121,681,872
| 0
| 0
| null | 2018-05-17T20:46:07
| 2018-02-15T20:56:43
| null |
UTF-8
|
C++
| false
| false
| 8,425
|
cpp
|
GeneralTest.cpp
|
#include <gtest/gtest.h>
#include <DiggerOffline/utils_double.h>
#include <DiggerOffline/Point2DInt.h>
#include <DiggerOffline/Point2D.h>
#include <DiggerOffline/Box2DInt.h>
#include <DiggerOffline/Box2D.h>
TEST(Box2DIntTest, Has) {
Box2DInt box(0, 0, 10, 5);
EXPECT_TRUE(box.Has(0, 0)) << "Top Left corner";
EXPECT_TRUE(box.Has(9, 4)) << "Bottom Right corner";
EXPECT_TRUE(box.Has(9, 0)) << "Top Right corner";
EXPECT_TRUE(box.Has(0, 4)) << "Bottom Left corner";
EXPECT_TRUE(box.Has(4, 0)) << "Top side";
EXPECT_TRUE(box.Has(4, 4)) << "Bottom side";
EXPECT_TRUE(box.Has(0, 3)) << "Left side";
EXPECT_TRUE(box.Has(9, 3)) << "Right side";
EXPECT_TRUE(box.Has(4, 2)) << "Inside";
EXPECT_FALSE(box.Has(-1, -1)) << "Outside (Top Left)";
EXPECT_FALSE(box.Has(4, -1)) << "Outside (Top)";
EXPECT_FALSE(box.Has(10, -1)) << "Outside (Top Right)";
EXPECT_FALSE(box.Has(10, 3)) << "Outside (Right)";
EXPECT_FALSE(box.Has(10, 5)) << "Outside (Bottom Right)";
EXPECT_FALSE(box.Has(4, 5)) << "Outside (Bottom)";
EXPECT_FALSE(box.Has(-1, 5)) << "Outside (Bottom Left)";
EXPECT_FALSE(box.Has(-1, 3)) << "Outside (Left)";
}
TEST(Box2DIntTest, IntersectsWith) {
Box2DInt box(0, 0, 10, 5);
EXPECT_TRUE(box.IntersectsWith(Box2DInt(0, 0, 1, 1)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(0, 0, 10, 5)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(0, 0, 100, 100)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(2, 2, 1, 1)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(-1, -1, 2, 2)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(9, 4, 1, 1)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(5, -2, 2, 10)));
EXPECT_TRUE(box.IntersectsWith(Box2DInt(-2, 2, 20, 2)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(0, 0, 0, 0)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(1, 1, 0, 0)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(-1, -1, 1, 1)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(10, 5, 1, 1)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(-1, -1, 1, 10)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(-1, -1, 10, 1)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(10, -1, 1, 10)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(-1, 5, 10, 1)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(2, -5, 2, 2)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(2, 10, 2, 2)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(-5, 2, 2, 2)));
EXPECT_FALSE(box.IntersectsWith(Box2DInt(15, 2, 2, 2)));
}
TEST(Box2DTest, Has) {
Box2D box(0.0, 0.0, 10.0, 5.0);
EXPECT_TRUE(box.Has(4.0, 2.0)) << "Inside";
EXPECT_TRUE(box.Has(9.9, 4.9)) << "Inside";
EXPECT_TRUE(box.Has(0.1, 0.1)) << "Inside";
EXPECT_FALSE(box.Has(0.0, 0.0)) << "Top Left corner";
EXPECT_FALSE(box.Has(10.0, 5.0)) << "Bottom Right corner";
EXPECT_FALSE(box.Has(10.0, 0)) << "Top Right corner";
EXPECT_FALSE(box.Has(0, 5.0)) << "Bottom Left corner";
EXPECT_FALSE(box.Has(4.0, 0.0)) << "Top side";
EXPECT_FALSE(box.Has(4.0, 5.0)) << "Bottom side";
EXPECT_FALSE(box.Has(0.0, 3.0)) << "Left side";
EXPECT_FALSE(box.Has(10.0, 3.0)) << "Right side";
EXPECT_FALSE(box.Has(-1.0, -1.0)) << "Outside (Top Left)";
EXPECT_FALSE(box.Has(4.0, -1.0)) << "Outside (Top)";
EXPECT_FALSE(box.Has(11.0, -1.0)) << "Outside (Top Right)";
EXPECT_FALSE(box.Has(11.0, 3.0)) << "Outside (Right)";
EXPECT_FALSE(box.Has(11.0, 6.0)) << "Outside (Bottom Right)";
EXPECT_FALSE(box.Has(4.0, 6.0)) << "Outside (Bottom)";
EXPECT_FALSE(box.Has(-1.0, 6.0)) << "Outside (Bottom Left)";
EXPECT_FALSE(box.Has(-1.0, 3.0)) << "Outside (Left)";
}
TEST(Box2DTest, IntersectsWith) {
Box2D box(0.0, 0.0, 10.0, 5.0);
EXPECT_TRUE(box.IntersectsWith(Box2D(0.0, 0.0, 1.0, 1.0)));
EXPECT_TRUE(box.IntersectsWith(Box2D(0.0, 0.0, 10.0, 5.0)));
EXPECT_TRUE(box.IntersectsWith(Box2D(0.0, 0.0, 100.0, 100.0)));
EXPECT_TRUE(box.IntersectsWith(Box2D(2.0, 2.0, 1.0, 1.0)));
EXPECT_TRUE(box.IntersectsWith(Box2D(-1.0, -1.0, 2.0, 2.0)));
EXPECT_TRUE(box.IntersectsWith(Box2D(9.9, 4.9, 0.1, 0.1)));
EXPECT_TRUE(box.IntersectsWith(Box2D(5.0, -2.0, 2.0, 10.0)));
EXPECT_TRUE(box.IntersectsWith(Box2D(-2.0, 2.0, 20.0, 2.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(0.0, 0.0, 0.0, 0.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(1.0, 1.0, 0.0, 0.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(-1.0, -1.0, 1.0, 1.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(10.0, 5.0, 1.0, 1.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(-1.0, -1.0, 1.0, 10.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(-1.0, -1.0, 10.0, 1.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(10.0, -1.0, 1.0, 10.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(-1.0, 5.0, 10.0, 1.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(2.0, -5.0, 2.0, 2.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(2.0, 10.0, 2.0, 2.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(-5.0, 2.0, 2.0, 2.0)));
EXPECT_FALSE(box.IntersectsWith(Box2D(15.0, 2.0, 2.0, 2.0)));
}
TEST(Point2DIntTest, ScalarProduct) {
Point2DInt point(1, 1);
EXPECT_EQ(point.len2(), point^point) << "(point, point) != |point|^2";
EXPECT_EQ(0, point^Point2DInt(0, 0)) << "(point, 0) != 0";
EXPECT_EQ(-point.len2(), point^(point * (-1))) << "(point, -point) != -|point|^2";
EXPECT_EQ(0, point^Point2DInt(point.y, -point.x)) << "(v1, v2) != 0, when v1 _|_ v2";
EXPECT_EQ(1, point^Point2DInt(1, 0));
EXPECT_EQ(1, point^Point2DInt(0, 1));
EXPECT_EQ(point^Point2DInt(-3, 2), Point2DInt(-3, 2)^point) << "(v1, v2) != (v2, v1)";
}
TEST(Point2DTest, ScalarProduct) {
Point2D point(1.0, 1.0);
EXPECT_NEAR(point.len2(), point^point, kEps) << "(point, point) != |point|^2";
EXPECT_NEAR(0.0, point^Point2D(0.0, 0.0), kEps) << "(point, 0) != 0";
EXPECT_NEAR(-point.len2(), point^(point * (-1.0)), kEps) << "(point, -point) != -|point|^2";
EXPECT_NEAR(0.0, point^Point2D(point.y, -point.x), kEps) << "(v1, v2) != 0, when v1 _|_ v2";
EXPECT_NEAR(1.0, point^Point2D(1.0, 0.0), kEps);
EXPECT_NEAR(1.0, point^Point2D(0.0, 1.0), kEps);
EXPECT_NEAR(point^Point2D(-3.0, 2.0), Point2D(-3.0, 2.0)^point, kEps) << "(v1, v2) != (v2, v1)";
}
TEST(Point2DTest, VectorProduct) {
Point2D point(1.0, 1.0);
EXPECT_NEAR(0.0, point*point, kEps) << "|[point, point]| != 0";
EXPECT_NEAR(0.0, point*Point2D(0.0, 0.0), kEps) << "|[point, 0]| != 0";
EXPECT_NEAR(0.0, point*(point * (-1.0)), kEps) << "|[point, -point]| != 0";
EXPECT_NEAR(-2.0, point*Point2D(1.0, -1.0), kEps);
EXPECT_NEAR(2.0, point*Point2D(-1.0, 1.0), kEps);
EXPECT_NEAR(-1.0, point*Point2D(1.0, 0.0), kEps);
EXPECT_NEAR(1.0, point*Point2D(0.0, 1.0), kEps);
EXPECT_NEAR(point*Point2D(-3.0, 2.0), -(Point2D(-3.0, 2.0)*point), kEps) << "[v1, v2].z != -[v2, v1].z";
}
TEST(Point2DTest, GetAngle) {
Point2D point(1.0, 1.0);
double pi = 4 * std::atan(1);
EXPECT_NEAR(0.0, point.get_angle(point), kEps) << "angle(v, v) != 0";
EXPECT_NEAR(pi, std::abs(point.get_angle(point * (-1))), kEps) << "|angle(v, -v)| != pi";
EXPECT_NEAR(0.0, point.get_angle(Point2D(0.0, 0.0)), kEps) << "angle(v, 0) != 0";
EXPECT_NEAR(pi / 2.0, point.get_angle(Point2D(point.y, -point.x)), kEps);
EXPECT_NEAR(point.get_angle(Point2D(-3.0, 2.0)), Point2D(-3.0, 2.0).get_angle(point), kEps) << "angle(v1, v2) != angle(v2, v1)";
EXPECT_NEAR(pi / 4.0, Point2D(1.0, 1.0).get_angle(Point2D(1.0, 0)), kEps);
EXPECT_NEAR(3.0 * pi / 4.0, Point2D(1.0, 1.0).get_angle(Point2D(-1.0, 0)), kEps);
EXPECT_NEAR(3.0 * pi / 4.0, Point2D(1.0, 1.0).get_angle(Point2D(0.0, -1.0)), kEps);
}
TEST(Point2DTest, GetCos) {
Point2D point(1.0, 1.0);
double pi = 4 * std::atan(1);
EXPECT_NEAR(1.0, point.get_cos(point), kEps) << "cos(v, v) != 1";
EXPECT_NEAR(-1.0, point.get_cos(point * (-1)), kEps) << "cos(v, -v) != -1";
EXPECT_NEAR(1.0, point.get_cos(Point2D(0.0, 0.0)), kEps) << "cos(v, 0) != 1";
EXPECT_NEAR(0.0, point.get_cos(Point2D(point.y, -point.x)), kEps);
EXPECT_NEAR(point.get_cos(Point2D(-3.0, 2.0)), Point2D(-3.0, 2.0).get_cos(point), kEps) << "cos(v1, v2) != cos(v2, v1)";
EXPECT_NEAR(std::cos(pi / 4.0), Point2D(1.0, 1.0).get_cos(Point2D(1.0, 0)), kEps);
EXPECT_NEAR(std::cos(3.0 * pi / 4.0), Point2D(1.0, 1.0).get_cos(Point2D(-1.0, 0)), kEps);
EXPECT_NEAR(std::cos(3.0 * pi / 4.0), Point2D(1.0, 1.0).get_cos(Point2D(0.0, -1.0)), kEps);
}
|
e95f71bc16820323cc826b843974ba6f0374549f
|
76763c51ed3049882c1a30cc64d3a1a9f37d0cb1
|
/Creational Pattern/Builder/Basic Builder/Builder.cpp
|
67ee96be9e2a4bfd8773f9261e4439b4b30683e4
|
[] |
no_license
|
tolerance93/Design-Patterns-in-cpp
|
e23636a0dc0d83ed0981c886df629d8b52be2b68
|
ac05ea2ac981c6f8727a3517c1453ec07da68399
|
refs/heads/master
| 2023-04-06T01:07:53.681244
| 2021-05-08T09:23:21
| 2021-05-08T09:23:21
| 331,330,814
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,712
|
cpp
|
Builder.cpp
|
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <memory>
using namespace std;
/**
* 빌더 패턴은 생성이 까다로운 객체를 쉽게 처리하기 위한 패턴. 즉 생성자 코드 단 한 줄로 생성할 수 없는 객체를 다룸
*/
struct HtmlBuilder;
struct HtmlElement
{
string name;
string text;
vector<HtmlElement> elements;
const size_t indent_size = 2;
HtmlElement() {}
HtmlElement(const string& name, const string& text) : name(name), text(text)
{
}
string str(int indent = 0) const
{
ostringstream oss;
string i(indent_size*indent, ' ');
oss << i << "<" << name << ">" << endl;
if (text.size() > 0)
oss << string(indent_size*(indent + 1), ' ') << text << endl;
for (const auto& e : elements)
oss << e.str(indent + 1);
oss << i << "</" << name << ">" << endl;
return oss.str();
}
/**
* 팩토리 메서드를 두어 빌더를 생성할 수 있게한다.
* 생성자를 private/protected로 감춰서 build함수가 아니면 객체 생성이 불가능하도록 강제할 수 있다.
* static method!
*/
static unique_ptr<HtmlBuilder> build(string root_name)
{
return make_unique<HtmlBuilder>(root_name);
}
};
struct HtmlBuilder
{
HtmlBuilder(string root_name)
{
root.name = root_name;
}
/**
* 리턴 값을 활용하면 흐림식 인터페이스 스타일의 빌더를 만들 수 있다.(fluent interface)
* void to start with
*/
HtmlBuilder& add_child(string child_name, string child_text)
{
HtmlElement e{ child_name, child_text };
/**
* push_back vs emplace_back
* Instead of taking a value_type it takes a variadic list of arguments,
* so that means that you can now perfectly forward the arguments and
* construct directly an object into a container without a temporary at all.
*/
root.elements.emplace_back(e);
return *this;
}
//pointer based
HtmlBuilder* add_child_2(string child_name, string child_text)
{
HtmlElement e{ child_name, child_text };
root.elements.emplace_back(e);
return this;
}
string str() { return root.str(); }
/**
* 최종 목적은 HtmlElement를 만드는 것이지, 빌더를 만드는 것이 아니다.
* 단순 root return대신 return std::move(root)와 같이 이동 시멘틱을 이용할 수도 있다.
* conversion operator. 이후에는 copy constructor를 통해 할당( ex. = 사용시)
*/
operator HtmlElement() const { return root; }
HtmlElement root;
};
int main()
{
// <p>hello</p>
auto text = "hello";
string output;
output += "<p>";
output += text;
output += "</p>";
printf("<p>%s</p>", text);
// <ul><li>hello</li><li>world</li></ul>
string words[] = { "hello", "world" };
ostringstream oss;
oss << "<ul>";
for (auto w : words)
oss << " <li>" << w << "</li>";
oss << "</ul>";
printf(oss.str().c_str());
cout << endl;
//easier
HtmlBuilder builder{ "ul" };
builder.add_child("li", "hello").add_child("li", "world");
cout << builder.str() << endl;
/**
* conversion operator + copy constructor 사용
* xCode에서는 한줄에 fluent로 불가. why?
*/
auto builder2 = HtmlElement::build("ul");
builder2->add_child_2("li", "hello")->add_child_2("li", "world");
cout << builder2->str() << endl;
getchar();
return 0;
}
|
5e44299441f46fffd76f5a6866146a215b533c20
|
e0170d9e91b3a51d03992ce1bd290f50517aaee4
|
/Player.h
|
45546ad68d81957c0cf59664af88515202fd9309
|
[] |
no_license
|
artyrex7/CommanderMak
|
7c917c8297dca2af116f24ce6d200a444fae5520
|
51984beb79b809a3231f50084d0c7751de1fbfc0
|
refs/heads/master
| 2020-04-09T03:55:16.010743
| 2018-12-06T03:15:21
| 2018-12-06T03:15:21
| 160,002,820
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 303
|
h
|
Player.h
|
#pragma once
#include <iostream>
using namespace std;
class Player{
public:
Player(int max=1, int position=20, int width=40);
int takeTurn();
int getPlayerPos();
private:
void move(int);
int currentPos;
int fieldWidth;
int maxMoves;
};
|
5b3a8cf745ae63a7e9c1d01654943d43d8bfc22e
|
04b1803adb6653ecb7cb827c4f4aa616afacf629
|
/media/capture/video/video_capture_device_factory.h
|
57e8c87cb877c88982427c0d318f099607153772
|
[
"BSD-3-Clause"
] |
permissive
|
Samsung/Castanets
|
240d9338e097b75b3f669604315b06f7cf129d64
|
4896f732fc747dfdcfcbac3d442f2d2d42df264a
|
refs/heads/castanets_76_dev
| 2023-08-31T09:01:04.744346
| 2021-07-30T04:56:25
| 2021-08-11T05:45:21
| 125,484,161
| 58
| 49
|
BSD-3-Clause
| 2022-10-16T19:31:26
| 2018-03-16T08:07:37
| null |
UTF-8
|
C++
| false
| false
| 3,140
|
h
|
video_capture_device_factory.h
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
#define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_checker.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
#include "media/capture/video/video_capture_device.h"
namespace media {
// VideoCaptureDeviceFactory is the base class for creation of video capture
// devices in the different platforms. VCDFs are created by MediaStreamManager
// on UI thread and plugged into VideoCaptureManager, who owns and operates them
// in Device Thread (a.k.a. Audio Thread).
// Typical operation is to first call GetDeviceDescriptors() to obtain
// information about available devices. The obtained descriptors can then be
// used to either obtain the supported formats of a device using
// GetSupportedFormats(), or to create an instance of VideoCaptureDevice for
// the device using CreateDevice().
// TODO(chfremer): Add a layer on top of the platform-specific implementations
// that uses strings instead of descriptors as keys for accessing devices.
// crbug.com/665065
class CAPTURE_EXPORT VideoCaptureDeviceFactory {
public:
VideoCaptureDeviceFactory();
virtual ~VideoCaptureDeviceFactory();
// Creates a VideoCaptureDevice object. Returns NULL if something goes wrong.
virtual std::unique_ptr<VideoCaptureDevice> CreateDevice(
const VideoCaptureDeviceDescriptor& device_descriptor) = 0;
// Obtains the supported formats of a device.
// This method should be called before allocating or starting a device. In
// case format enumeration is not supported, or there was a problem
// |supported_formats| will be empty.
virtual void GetSupportedFormats(
const VideoCaptureDeviceDescriptor& device_descriptor,
VideoCaptureFormats* supported_formats) = 0;
// Gets descriptors of all video capture devices connected.
// Used by the default implementation of EnumerateDevices().
// Note: The same physical device may appear more than once if it is
// accessible through different APIs.
virtual void GetDeviceDescriptors(
VideoCaptureDeviceDescriptors* device_descriptors) = 0;
// Gets the location of all cameras of a device asynchronously.
// Used for platforms where camera location enumeration is asynchronous
// operation, i.e. UWP API on Windows 10.
// This method should be called before allocating or starting a device.
using DeviceDescriptorsCallback = base::OnceCallback<void(
std::unique_ptr<VideoCaptureDeviceDescriptors> device_descriptors)>;
virtual void GetCameraLocationsAsync(
std::unique_ptr<VideoCaptureDeviceDescriptors> device_descriptors,
DeviceDescriptorsCallback result_callback);
protected:
base::ThreadChecker thread_checker_;
private:
DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory);
};
} // namespace media
#endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
|
e34facbce4aeac2f1cdd6774cad3feba43bbc3ff
|
22101bafa870a4ad9000905bb89a40d4a93c098c
|
/HTML.h
|
10f823d65c72be4095095281d1bfab390d28efd3
|
[] |
no_license
|
cruxeon/porthole
|
bfe3975ed34343643a57c2127318e719fedfc815
|
1de9885bceb253d6193b7cc1f606d1ed8bf185d6
|
refs/heads/master
| 2021-01-09T20:15:14.711538
| 2016-08-12T01:58:12
| 2016-08-12T01:58:12
| 63,287,539
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,288
|
h
|
HTML.h
|
// HTML namespace will contain all html events,
// so that parser could know which attribute is a Javascript event
namespace HTML {
static const int eventsNumber = 19;
enum Event{
OnLoad,
OnUnload,
OnBlur,
OnChange,
OnFocus,
OnReset,
OnSelect,
OnSubmit,
OnAbort,
OnKeyDown,
OnKeyPress,
OnKeyUp,
OnClick,
OnDblClick,
OnMouseDown,
OnMouseMove,
OnMouseOut,
OnMouseOver,
OnMouseUp
};
// All HTML compatible events that could be found parsing the application xml
static const string events[eventsNumber] = {
"onload", /* Script to be run when a document load */
"onunload", /* Script to be run when a document unload */
"onblur", /* Script to be run when an element loses focus */
"onchange", /* Script to be run when an element changes */
"onfocus", /* Script to be run when an element gets focus */
"onreset", /* Script to be run when a form is reset */
"onselect", /* Script to be run when a document load */
"onsubmit", /* Script to be run when a form is submitted */
"onabort", /* Script to be run when loading of an image is interrupted */
"onkeydown", /* Script to be run when a key is pressed */
"onkeypress", /* Script to be run when a key is pressed and released */
"onkeyup", /* Script to be run when a key is released */
"onclick", /* Script to be run on a mouse click */
"ondblclick", /* Script to be run on a mouse double-click */
"onmousedown", /* Script to be run when mouse button is pressed */
"onmousemove", /* Script to be run when mouse pointer moves */
"onmouseout", /* Script to be run when mouse pointer moves out of an element */
"onmouseover", /* Script to be run when mouse pointer moves over an element */
"onmouseup", /* Script to be run when mouse button is released */
};
static bool isEvent(string stringToSearch)
{
for(int i = 0; i < eventsNumber; i++)
if(stringToSearch.compare(events[i]) == 0)
return true; // found
return false; // not found
}
};
|
4c90abb8a8c5f84f148283598d95e76758c2ae86
|
87e76e8765594898acfea10e6c7af52fdc40fcd7
|
/code/AuthorInfo.cpp
|
dba315ae1cbc1dfdca58020bb10c38ef56fad3dc
|
[] |
no_license
|
adam-zhang/codefactory
|
7813e1c696983c8ec35fcd6007a76fff3412dbf0
|
aed43fa568e23b6919c4d56881e76ab8b89f14d4
|
refs/heads/master
| 2023-04-07T00:19:08.288616
| 2023-04-01T14:32:39
| 2023-04-01T14:32:39
| 173,849,887
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 387
|
cpp
|
AuthorInfo.cpp
|
/********************************************************************************
> FileName: AuthorInfo.cpp
> Author: Mingping Zhang
> Email: mingpingzhang@163.com
> Create Time: Fri Jun 04 10:47:58 2021
********************************************************************************/
#include "AuthorInfo.h"
AuthorInfo::AuthorInfo()
{
}
AuthorInfo::~AuthorInfo()
{
}
|
12fccf99c6d2f919619e0b64d8d4bcc93eac15c0
|
fae551eb54ab3a907ba13cf38aba1db288708d92
|
/content/browser/interest_group/interest_group_storage_unittest.cc
|
1d40d3055c0a5928b5329a5e5ba215c402fd6641
|
[
"BSD-3-Clause"
] |
permissive
|
xtblock/chromium
|
d4506722fc6e4c9bc04b54921a4382165d875f9a
|
5fe0705b86e692c65684cdb067d9b452cc5f063f
|
refs/heads/main
| 2023-04-26T18:34:42.207215
| 2021-05-27T04:45:24
| 2021-05-27T04:45:24
| 371,258,442
| 2
| 1
|
BSD-3-Clause
| 2021-05-27T05:36:28
| 2021-05-27T05:36:28
| null |
UTF-8
|
C++
| false
| false
| 15,100
|
cc
|
interest_group_storage_unittest.cc
|
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/interest_group/interest_group_storage.h"
#include <functional>
#include <memory>
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "sql/database.h"
#include "sql/test/scoped_error_expecter.h"
#include "sql/test/test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
#include "url/origin.h"
namespace content {
using auction_worklet::mojom::BiddingInterestGroupPtr;
using blink::mojom::InterestGroupPtr;
class InterestGroupStorageTest : public testing::Test {
public:
InterestGroupStorageTest() = default;
void SetUp() override { ASSERT_TRUE(temp_directory_.CreateUniqueTempDir()); }
std::unique_ptr<InterestGroupStorage> CreateStorage() {
return std::make_unique<InterestGroupStorage>(temp_directory_.GetPath());
}
base::FilePath db_path() {
return temp_directory_.GetPath().Append(
FILE_PATH_LITERAL("InterestGroups"));
}
base::test::SingleThreadTaskEnvironment& task_environment() {
return task_environment_;
}
InterestGroupPtr NewInterestGroup(::url::Origin owner, std::string name) {
InterestGroupPtr result = blink::mojom::InterestGroup::New();
result->owner = owner;
result->name = name;
result->expiry = base::Time::Now() + base::TimeDelta::FromDays(30);
return result;
}
private:
base::ScopedTempDir temp_directory_;
base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
};
TEST_F(InterestGroupStorageTest, DatabaseInitialized_CreateDatabase) {
base::HistogramTester histograms;
EXPECT_FALSE(base::PathExists(db_path()));
{ std::unique_ptr<InterestGroupStorage> storage = CreateStorage(); }
// InterestGroupStorageSqlImpl opens the database lazily.
EXPECT_FALSE(base::PathExists(db_path()));
{
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
url::Origin test_origin =
url::Origin::Create(GURL("https://owner.example.com"));
storage->LeaveInterestGroup(test_origin, "example");
}
// InterestGroupStorage creates the database if it doesn't exist.
EXPECT_TRUE(base::PathExists(db_path()));
{
sql::Database raw_db;
EXPECT_TRUE(raw_db.Open(db_path()));
// [interest_groups], [join_history], [bid_history], [win_history], [meta].
EXPECT_EQ(4u, sql::test::CountSQLTables(&raw_db));
}
}
TEST_F(InterestGroupStorageTest, DatabaseJoin) {
url::Origin test_origin =
url::Origin::Create(GURL("https://owner.example.com"));
InterestGroupPtr test_group = NewInterestGroup(test_origin, "example");
{
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
storage->JoinInterestGroup(test_group.Clone());
}
{
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
std::vector<url::Origin> origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
EXPECT_EQ(test_origin, origins[0]);
std::vector<BiddingInterestGroupPtr> interest_groups =
storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ(test_origin, interest_groups[0]->group->owner);
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
}
}
// Test that joining and interest group twice increments the counter.
// Test that joining multiple interest groups with the same owner only creates a
// single distinct owner. Test that leaving one interest group does not affect
// membership of other interest groups by the same owner.
TEST_F(InterestGroupStorageTest, JoinJoinLeave) {
url::Origin test_origin =
url::Origin::Create(GURL("https://owner.example.com"));
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
storage->JoinInterestGroup(NewInterestGroup(test_origin, "example"));
storage->JoinInterestGroup(NewInterestGroup(test_origin, "example"));
std::vector<url::Origin> origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
EXPECT_EQ(test_origin, origins[0]);
std::vector<BiddingInterestGroupPtr> interest_groups =
storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(2, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
storage->JoinInterestGroup(NewInterestGroup(test_origin, "example2"));
interest_groups = storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(2u, interest_groups.size());
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
EXPECT_EQ(test_origin, origins[0]);
storage->LeaveInterestGroup(test_origin, "example");
interest_groups = storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("example2", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
EXPECT_EQ(test_origin, origins[0]);
}
TEST_F(InterestGroupStorageTest, BidCount) {
url::Origin test_origin =
url::Origin::Create(GURL("https://owner.example.com"));
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
storage->JoinInterestGroup(NewInterestGroup(test_origin, "example"));
std::vector<url::Origin> origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
EXPECT_EQ(test_origin, origins[0]);
std::vector<BiddingInterestGroupPtr> interest_groups =
storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
storage->RecordInterestGroupBid(test_origin, "example");
interest_groups = storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(1, interest_groups[0]->signals->bid_count);
storage->RecordInterestGroupBid(test_origin, "example");
interest_groups = storage->GetInterestGroupsForOwner(test_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(2, interest_groups[0]->signals->bid_count);
}
TEST_F(InterestGroupStorageTest, RecordsWins) {
url::Origin test_origin =
url::Origin::Create(GURL("https://owner.example.com"));
GURL ad1_url = GURL("http://owner.example.com/ad1");
GURL ad2_url = GURL("http://owner.example.com/ad2");
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
storage->JoinInterestGroup(NewInterestGroup(test_origin, "example"));
std::vector<url::Origin> origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
EXPECT_EQ(test_origin, origins[0]);
std::vector<BiddingInterestGroupPtr> interest_groups =
storage->GetInterestGroupsForOwner(test_origin);
ASSERT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
std::string ad1_json = "{url: '" + ad1_url.spec() + "'}";
storage->RecordInterestGroupBid(test_origin, "example");
storage->RecordInterestGroupWin(test_origin, "example", ad1_json);
interest_groups = storage->GetInterestGroupsForOwner(test_origin);
ASSERT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(1, interest_groups[0]->signals->bid_count);
// Add the second win *after* the first so we can check ordering.
task_environment().FastForwardBy(base::TimeDelta::FromSeconds(1));
std::string ad2_json = "{url: '" + ad2_url.spec() + "'}";
storage->RecordInterestGroupBid(test_origin, "example");
storage->RecordInterestGroupWin(test_origin, "example", ad2_json);
interest_groups = storage->GetInterestGroupsForOwner(test_origin);
ASSERT_EQ(1u, interest_groups.size());
EXPECT_EQ("example", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(2, interest_groups[0]->signals->bid_count);
EXPECT_EQ(2u, interest_groups[0]->signals->prev_wins.size());
// Ad wins should be listed in reverse chronological order.
EXPECT_EQ(ad2_json, interest_groups[0]->signals->prev_wins[0]->ad_json);
EXPECT_EQ(ad1_json, interest_groups[0]->signals->prev_wins[1]->ad_json);
// Try delete
storage->DeleteInterestGroupData(
base::BindLambdaForTesting([&test_origin](const url::Origin& candidate) {
return candidate == test_origin;
}));
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(0u, origins.size());
}
TEST_F(InterestGroupStorageTest, StoresAllFields) {
url::Origin partial_origin =
url::Origin::Create(GURL("https://partial.example.com"));
InterestGroupPtr partial = NewInterestGroup(partial_origin, "partial");
url::Origin full_origin =
url::Origin::Create(GURL("https://full.example.com"));
InterestGroupPtr full = blink::mojom::InterestGroup::New();
full->owner = full_origin;
full->name = "full";
full->expiry = base::Time::Now() + base::TimeDelta::FromDays(30);
full->bidding_url = GURL("https://full.example.com/bid");
full->update_url = GURL("https://full.example.com/update");
full->trusted_bidding_signals_url = GURL("https://full.example.com/signals");
full->trusted_bidding_signals_keys =
absl::make_optional(std::vector<std::string>{"a", "b", "c", "d"});
full->user_bidding_signals = "foo";
full->ads = std::vector<blink::mojom::InterestGroupAdPtr>();
full->ads->emplace_back(blink::mojom::InterestGroupAd::New(
GURL("https://full.example.com/ad1"), "metadata1"));
full->ads->emplace_back(blink::mojom::InterestGroupAd::New(
GURL("https://full.example.com/ad2"), "metadata2"));
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
storage->JoinInterestGroup(partial.Clone());
storage->JoinInterestGroup(full.Clone());
std::vector<BiddingInterestGroupPtr> bidding_interest_groups =
storage->GetInterestGroupsForOwner(partial_origin);
ASSERT_EQ(1u, bidding_interest_groups.size());
EXPECT_EQ(partial, bidding_interest_groups[0]->group);
bidding_interest_groups = storage->GetInterestGroupsForOwner(full_origin);
ASSERT_EQ(1u, bidding_interest_groups.size());
EXPECT_EQ(full, bidding_interest_groups[0]->group);
}
TEST_F(InterestGroupStorageTest, DeleteOriginDeleteAll) {
std::vector<::url::Origin> test_origins = {
url::Origin::Create(GURL("https://owner.example.com")),
url::Origin::Create(GURL("https://owner2.example.com")),
url::Origin::Create(GURL("https://owner3.example.com")),
};
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
for (const auto& origin : test_origins)
storage->JoinInterestGroup(NewInterestGroup(origin, "example"));
std::vector<url::Origin> origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(3u, origins.size());
storage->DeleteInterestGroupData(
base::BindLambdaForTesting([&test_origins](const url::Origin& origin) {
return origin == test_origins[0];
}));
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(2u, origins.size());
storage->DeleteInterestGroupData({});
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(0u, origins.size());
}
TEST_F(InterestGroupStorageTest, DBMaintenanceExpiresOldInterestGroups) {
url::Origin keep_origin =
url::Origin::Create(GURL("https://owner.example.com"));
std::vector<::url::Origin> test_origins = {
url::Origin::Create(GURL("https://owner.example.com")),
url::Origin::Create(GURL("https://owner2.example.com")),
url::Origin::Create(GURL("https://owner3.example.com")),
};
std::unique_ptr<InterestGroupStorage> storage = CreateStorage();
storage->JoinInterestGroup(NewInterestGroup(keep_origin, "keep"));
for (const auto& origin : test_origins)
storage->JoinInterestGroup(NewInterestGroup(origin, "discard"));
std::vector<url::Origin> origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(3u, origins.size());
std::vector<BiddingInterestGroupPtr> interest_groups =
storage->GetInterestGroupsForOwner(keep_origin);
EXPECT_EQ(2u, interest_groups.size());
task_environment().FastForwardBy(InterestGroupStorage::kHistoryLength -
base::TimeDelta::FromDays(1));
storage->JoinInterestGroup(NewInterestGroup(keep_origin, "keep"));
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(3u, origins.size());
interest_groups = storage->GetInterestGroupsForOwner(keep_origin);
EXPECT_EQ(2u, interest_groups.size());
// Advance to expiration and check that even without DB maintenance the
// outdated entries are not reported.
task_environment().FastForwardBy(base::TimeDelta::FromDays(1) +
base::TimeDelta::FromSeconds(1));
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
interest_groups = storage->GetInterestGroupsForOwner(keep_origin);
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("keep", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
// All the groups should still be in the database since they shouldn't have
// been cleaned up yet.
interest_groups = storage->GetAllInterestGroupsUnfilteredForTesting();
EXPECT_EQ(4u, interest_groups.size());
// Wait an hour to perform DB maintenance.
task_environment().FastForwardBy(InterestGroupStorage::kMaintenanceInterval);
// Verify that the database only contains unexpired entries.
origins = storage->GetAllInterestGroupOwners();
EXPECT_EQ(1u, origins.size());
interest_groups = storage->GetAllInterestGroupsUnfilteredForTesting();
EXPECT_EQ(1u, interest_groups.size());
EXPECT_EQ("keep", interest_groups[0]->group->name);
EXPECT_EQ(1, interest_groups[0]->signals->join_count);
EXPECT_EQ(0, interest_groups[0]->signals->bid_count);
}
} // namespace content
|
c596bcd8199853389a83a2ff2252fddb2be79d85
|
5b0f5482e6af4a023d5b094ba69e424e46b6f511
|
/fossa files/FOSSASAT-2-master/FOSSASAT-2-master/software/TestSketches/CameraPhoto/src/ADCS/ADS/measure_hybrid.cpp
|
a6186d3c1878b1efbbb14bfcfa8fd1474fcac3d8
|
[
"GPL-3.0-only"
] |
permissive
|
THRMAT007/EEE4022S_LoRa_Hydrological
|
9a067dd205e623441e88a68e58700f78808c6cfb
|
dd856ac68b60b47170115b53aadff57781b46024
|
refs/heads/main
| 2023-08-30T12:55:43.157856
| 2021-11-09T17:09:28
| 2021-11-09T17:09:28
| 413,339,467
| 0
| 0
|
MIT
| 2021-11-09T10:33:29
| 2021-10-04T08:36:40
|
HTML
|
UTF-8
|
C++
| false
| false
| 3,185
|
cpp
|
measure_hybrid.cpp
|
/* Project: FossaSat-2 Flight Software
Author: Team Steiner
Module: attitude_determination
File:
04/18/20
This file drives the measurements hybridation algorithm
*/
/*********************** Headers ***********************/
#include "../ADCS/adcs.h"
/********************* Main function *********************/
void ADS_Measurement_Hybrid(const ADCS_CALC_TYPE v_1[ADCS_NUM_AXES], const ADCS_CALC_TYPE v_2[ADCS_NUM_AXES], const ADCS_CALC_TYPE v_3[ADCS_NUM_AXES],
const ADCS_CALC_TYPE m_1[ADCS_NUM_AXES], const ADCS_CALC_TYPE m_2[ADCS_NUM_AXES], const ADCS_CALC_TYPE m_3[ADCS_NUM_AXES],
ADCS_CALC_TYPE eulerAnglesMatrix[ADCS_NUM_AXES][ADCS_NUM_AXES]) {
// Normalize both ephemeris and measurements vectors
ADCS_CALC_TYPE m1_norm = ADCS_VectorNorm(m_1);
ADCS_CALC_TYPE m2_norm = ADCS_VectorNorm(m_2);
ADCS_CALC_TYPE m3_norm = ADCS_VectorNorm(m_3);
ADCS_CALC_TYPE v1_norm = ADCS_VectorNorm(v_1);
ADCS_CALC_TYPE v2_norm = ADCS_VectorNorm(v_2);
ADCS_CALC_TYPE v3_norm = ADCS_VectorNorm(v_3);
ADCS_CALC_TYPE m1[ADCS_NUM_AXES];
ADCS_CALC_TYPE m2[ADCS_NUM_AXES];
ADCS_CALC_TYPE m3[ADCS_NUM_AXES];
ADCS_CALC_TYPE v1[ADCS_NUM_AXES];
ADCS_CALC_TYPE v2[ADCS_NUM_AXES];
ADCS_CALC_TYPE v3[ADCS_NUM_AXES];
for(uint8_t i = 0; i < ADCS_NUM_AXES; i++) {
m1[i] = m_1[i] * (1.0/ADCS_Add_Tolerance(m1_norm, 0));
m2[i] = m_2[i] * (1.0/ADCS_Add_Tolerance(m2_norm, 0));
m3[i] = m_3[i] * (1.0/ADCS_Add_Tolerance(m3_norm, 0));
v1[i] = v_1[i] * (1.0/ADCS_Add_Tolerance(v1_norm, 0));
v2[i] = v_2[i] * (1.0/ADCS_Add_Tolerance(v2_norm, 0));
v3[i] = v_3[i] * (1.0/ADCS_Add_Tolerance(v3_norm, 0));
}
// Measurements matrix
ADCS_CALC_TYPE measMaxtrix[ADCS_NUM_AXES][ADCS_NUM_AXES];
measMaxtrix[0][0] = m1[0];
measMaxtrix[0][1] = m2[0];
measMaxtrix[0][2] = m3[0];
measMaxtrix[1][0] = m1[1];
measMaxtrix[1][1] = m2[1];
measMaxtrix[1][2] = m3[1];
measMaxtrix[2][0] = m1[2];
measMaxtrix[2][1] = m2[2];
measMaxtrix[2][2] = m3[2];
// Inverse theoretical matrix
ADCS_CALC_TYPE invV[ADCS_NUM_AXES][ADCS_NUM_AXES];
const ADCS_CALC_TYPE det_V = ( (v1[0]*v2[1]*v3[2]) - (v1[2]*v2[1]*v3[0]) + (v1[1]*v2[2]*v3[0])
+ (v1[2]*v2[0]*v3[1]) - (v1[1]*v2[0]*v3[2]) - (v1[0]*v2[2]*v3[1]) );
ADCS_CALC_TYPE gain = 1.0/(ADCS_Add_Tolerance(det_V, 0));
invV[0][0] = gain * (v2[1]*v3[2] - v2[2]*v3[1]);
invV[0][1] = gain * (v2[2]*v3[0] - v2[0]*v3[2]);
invV[0][2] = gain * (v2[0]*v3[1] - v2[1]*v3[0]);
invV[1][0] = gain * (v1[2]*v3[1] - v1[1]*v3[2]);
invV[1][1] = gain * (v1[0]*v3[2] - v1[2]*v3[0]);
invV[1][2] = gain * (v1[1]*v3[0] - v1[0]*v3[1]);
invV[2][0] = gain * (v1[1]*v2[2] - v1[2]*v2[1]);
invV[2][1] = gain * (v1[2]*v2[0] - v1[0]*v2[2]);
invV[2][2] = gain * (v1[0]*v2[1] - v1[1]*v2[0]);
// Euler angles matrix (matrices multiplication)
for(uint8_t i = 0; i < ADCS_NUM_AXES; i++) {
for(uint8_t j = 0; j < ADCS_NUM_AXES; j++) {
eulerAnglesMatrix[i][j] = 0;
for(uint8_t k = 0; k < ADCS_NUM_AXES; k++) {
eulerAnglesMatrix[i][j] += (measMaxtrix[i][k] * invV[k][j]);
}
}
}
}
|
38a61bfa02a2a8d2ee1117847f1908e4700d0955
|
317c7bbb3ce5bc47fc88ad68812d19ba8823d99d
|
/src/search/real_binary_search.hpp
|
7fc2f58aeb481e642d3befd4e17345f7932beb1f
|
[] |
no_license
|
gtnao0219/algorithm
|
f7d6c8e86ed75d420ecce2042204f25e0759f465
|
1fd6a44dfd1456997f9caca683b414a96b7ef8ce
|
refs/heads/main
| 2023-03-17T14:41:54.020904
| 2023-02-26T17:40:15
| 2023-02-26T17:40:15
| 201,729,617
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 311
|
hpp
|
real_binary_search.hpp
|
#pragma once
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T real_bin_search(T ng, T ok, function<bool(T)> is_ok, int loop = 100) {
for (int i = 0; i < loop; i++) {
T mid = (ok + ng) / 2;
if (is_ok(mid)) {
ok = mid;
} else {
ng = mid;
}
}
return ok;
}
|
3669f58b444a6a41d77787cc24562666f820942a
|
e7a38548297bd80835f48b5d4c66fd1e4b53d7dc
|
/src/pot.cc
|
46d41464a9ece93640afb3a4bfb3f939d41f4a9f
|
[
"Unlicense"
] |
permissive
|
codezoid/Lagzilla
|
f14a364bd92a351fa7cf697e32497dc694c048e3
|
3b69b7cb4110932986840da25480416dcc2b88ab
|
refs/heads/master
| 2016-09-08T00:41:59.155753
| 2011-10-17T01:12:07
| 2011-10-17T01:12:07
| 2,574,028
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 981
|
cc
|
pot.cc
|
#include <iostream>
#include "pot.h"
#include "card.h"
Pot::Pot() {
pot_amount = 0;
betting_round_count = 1;
minimum_raise_amount = 0;
small_blind_amount = 0;
big_blind_amount = 0;
}
int Pot::GetPotAmount() {
return pot_amount;
}
int Pot::GetBettingRoundCount() {
return betting_round_count;
}
int Pot::GetMinimumRaiseAmount() {
return minimum_raise_amount;
}
int Pot::GetSmallBlindAmount() {
return small_blind_amount;
}
int Pot::GetBigBlindAmount() {
return big_blind_amount;
}
Card Pot::GetCommunityCard(int i) {
return community_cards[i];
}
void Pot::SetPotAmount(int i) {
pot_amount = i;
}
void Pot::SetBettingRoundCount(int i) {
betting_round_count = i;
}
void Pot::SetMinimumRaiseAmount(int i) {
minimum_raise_amount = i;
}
void Pot::SetSmallBlindAmount(int i) {
small_blind_amount = i;
}
void Pot::SetBigBlindAmount(int i) {
big_blind_amount = i;
}
void Pot::SetCommunityCard(int i, Card card) {
community_cards[i] = card;
}
|
928292ec17bef21407cbed0b0267dcccd079641d
|
553d991a81342552c4b8ca325fcee65042ea27fc
|
/src/DirectShowAccess.h
|
c31bd7c1a7dbf5f0557a27f1e9fdf580d899a81e
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
NanteroKun/kte
|
c0e8ba8611aed6af956e81cc0b2dbf02d30c62cd
|
5bf8318279553562e3d93d1e7f343507591b84bf
|
refs/heads/master
| 2021-01-22T22:44:02.384603
| 2017-03-18T16:53:13
| 2017-03-18T16:53:13
| null | 0
| 0
| null | null | null | null |
SHIFT_JIS
|
C++
| false
| false
| 17,930
|
h
|
DirectShowAccess.h
|
#pragma once
#include "DirectShow.h"
#include "DirectShowEncoder.h"
#include "DirectShowASFWriter.h"
#include "DirectShowAudioVolume.h"
//プラグインの構造体
struct FilterPluginStruct
{
GUID guidFilter; //フィルタのGUID
GUID guidCategory; //フィルタのカテゴリGUID (DMOのみ)
int nFilterID; //フィルタに登録した際に得られるID (-1なら未作成)
CString strFilterName; //フィルタに登録した際の登録名
BOOL bDMO; //DMOデバイスかどうか (DMOの場合はカテゴリGUIDが定義されている)
BOOL bEnable; //このフィルタが有効化どうか
};
//プルシンク構造体
struct PullSinkStruct
{
int nID; //インデックスID
int nRegistID; //登録ID
DWORD dwPort; //ポート番号
DWORD dwMax; //最大接続数
};
//プッシュシンク構造体
struct PushSinkStruct
{
int nID; //インデックスID
int nRegistID; //登録ID
CString strServerName; //サーバー名
BOOL bAutoDelete; //自動削除
};
//ファイルシンク構造体
struct FileSinkStruct
{
int nID; //インデックスID
int nRegistID; //登録ID
CString strFileName; //ファイル名
};
//WDMフィルタの列挙型
enum ENUM_WDM_FILTER
{
WDM_FILTER_NONE = 0,
WDM_FILTER_CROSS_BAR1,
WDM_FILTER_CROSS_BAR2,
WDM_FILTER_TV_AUDIO,
WDM_FILTER_TV_TUNER
};
//////////////////////////////////////////////////
//MFC側からDirectShowに対するアクセサクラス
//////////////////////////////////////////////////
class CDirectShowAccess
{
public:
CDirectShowAccess(void); //コンストラクタ
~CDirectShowAccess(void); //デストラクタ
BOOL Init(); //DirectShowを初期化
void Exit(); //DirectShowを終了
BOOL ChangeProfileNotify(); //プロファイルの変更通知
BOOL SaveProfileSetting(); //プロファイルからのロード
BOOL LoadProfileSetting(); //プロファイルへのセーブ
//グラフファイルの保存
HRESULT SaveGraphFile(WCHAR* wszPath)
{return CDirectShowEtc::SaveGraphFile(m_pDirectShow->GetGraphBuilder(),wszPath);}
//////////////////////////////////////////////////
//フィルタの実行と停止
BOOL RunFilter(); //フィルタの開始
BOOL StopFilter(); //フィルタの停止
BOOL IsRunFilter()const{ //フィルタの開始状態
return m_bRunFilter;}
BOOL m_bRunFilter; //フィルタが実行しているかどうか
//プレビューが可能か否か(ビデオのみチェック)
inline BOOL IsCanPreview() const {
return (m_nVideoIndex != -1 && m_nVideoSettingIndex != -1);
}
inline BOOL IsCanAudioPreview() const {return (m_nAudioIndex != -1);}
//////////////////////////////////////////////////
//ビデオキャプチャデバイスを選択します
BOOL SelectVideoIndex(int nIndex);
//ビデオキャプチャデバイスの設定を選択します
BOOL SelectVideoSettingIndex(int nSettingIndex,AM_MEDIA_TYPE *pamt);
//現在のキャプチャデバイスのビデオサイズを取得
BOOL GetCurrentVideoSize(int &nWidth,int &nHeight);
//////////////////////////////////////////////////
//オーディオキャプチャデバイスを選択します
BOOL SelectAudioIndex(int nIndex,BOOL bUseVideoPin);
//オーディオキャプチャデバイスの設定を選択します
BOOL SelectAudioSettingIndex(int nSettingIndex,AM_MEDIA_TYPE *pamt);
//オーディオボリュームフィルタに接続する
BOOL ConnectAudioVolume();
int GetVideoIndex() const {return m_nVideoIndex;}
int GetVideoSettingIndex() const {return m_nVideoSettingIndex;}
int GetAudioIndex() const {return m_nAudioIndex;}
int GetAudioSettingIndex() const {return m_nAudioSettingIndex;}
int GetWDMFilterID(ENUM_WDM_FILTER e) const {
switch (e) {
case WDM_FILTER_NONE: return -1;
case WDM_FILTER_CROSS_BAR1: return m_nCrossbar1ID;
case WDM_FILTER_CROSS_BAR2: return m_nCrossbar2ID;
case WDM_FILTER_TV_AUDIO: return m_nTVAudioID;
case WDM_FILTER_TV_TUNER: return m_nTVTunerID;
default: return -1;
}
}
BOOL IsVidoFindAudioPin() const {return m_bVideoFindAudioPin;}
BOOL IsUseAudioVideoFilter() const {
if (m_bUseAudioVideoFilter && m_nVideoFilterID == m_nAudioFilterID) return TRUE;
return FALSE;}
HRESULT RenderPreview(); //プレビューの接続の試行
HRESULT RenderPreviewSubRoutine1(const int nLastFilterID,const wchar_t* lpszOutputPin);
void RenderPreviewSubRoutine2();
BOOL CheckConnectFilter(BOOL bVideo); //フィルタの接続状況を確認するサブルーチン
//コールバックウィンドウハンドルの設定
BOOL SetCallbackHWnd(HWND hWnd) {
return (BOOL)m_pDirectShow->SetCallbackHWnd(hWnd);}
//コールバックの通知
LRESULT OnGraphNotify() {
return m_pDirectShow->OnGraphNotify();}
//////////////////////////////////////////////////
//ビデオプレビューのアクセサ
BOOL SetPreviewWindow(HWND hWnd); //ビデオプレビューのウィンドウハンドルを設定する
BOOL RemovePreviewWindow(); //ビデオプレビューのウィンドウハンドルを解除する
BOOL ResizePreviewWindow(RECT rcClient);//ビデオプレビューのウィンドウサイズを変更する
BOOL ShowPreviewWindow(BOOL bShow); //ビデオプレビューの表示・非表示を切り替える
//プロパティウィンドウを表示します
BOOL ShowPropertySetting(BOOL bVideo,ENUM_WDM_FILTER eDevice,HWND hWnd);
//////////////////////////////////////////////////
//メンバ変数
//ビデオキャプチャデバイスに関する設定
vector<wstring> m_strVideoNameList; //全てのビデオキャプチャデバイスの名前リスト
vector<wstring> m_strVideoSettingList; //現在のビデオキャプチャデバイスの設定リスト(設定略称)
vector<AM_MEDIA_TYPE> m_VideoMediaTypeList; //ビデオのメディアタイプリスト (対になっている)
vector<VIDEO_STREAM_CONFIG_CAPS> m_VideoCapsList; //ビデオのデバイス性能リスト (対になっている)
AM_MEDIA_TYPE m_VideoFirstMediaType; //現在のビデオ接続メディアタイプ(最先端)
AM_MEDIA_TYPE m_VideoLastMediaType; //現在のビデオ接続メディアタイプ(最後尾)
//オーディオキャプチャデバイスに関する設定
vector<wstring> m_strAudioNameList; //全てのオーディオキャプチャデバイスの名前
vector<wstring> m_strAudioSettingList; //現在のオーディオキャプチャデバイスの設定リスト(設定略称)
vector<AM_MEDIA_TYPE> m_AudioMediaTypeList; //オーディオのメディアタイプリスト (対になっている)
vector<AUDIO_STREAM_CONFIG_CAPS> m_AudioCapsList; //オーディオのデバイス性能リスト (対になっている)
AM_MEDIA_TYPE m_AudioFirstMediaType; //現在のオーディオ接続メディアタイプ(最先端)
AM_MEDIA_TYPE m_AudioLastMediaType; //現在のオーディオ接続メディアタイプ(最後尾)
ALLOCATOR_PROPERTIES m_AudioSetAllocator; //オーディオキャプチャのアロケーターバッファ(要求)
ALLOCATOR_PROPERTIES m_AudioGetAllocator; //オーディオキャプチャのアロケーターバッファ(実際の接続)
//////////////////////////////////////////////////
//プラグインに関する設定
vector<FilterPluginStruct> m_VideoPluginList; //ビデオプラグインの配列
vector<FilterPluginStruct> m_AudioPluginList; //オーディオプラグインの配列
//フィルタ配列の接続
BOOL ChainPluginList(BOOL bVideo,int nInputFilterID,const wchar_t* lpszInputPinName,int nOutputFilterID,const wchar_t* lpszOutputPinName);
//プラグインの追加登録
BOOL AddPlugin(BOOL bVideo,const GUID guid,const GUID guidCategory,LPCWSTR lpszPluginName);
//プラグインの削除
BOOL RemovePlugin(BOOL bVideo,int nIndex);
//フィルタ配列の入れ替え(上へ・下へ)
BOOL SwitchPlugin(BOOL bVideo,int nSrcIndex,int nDestIndex);
//プラグインの設定ダイアログを表示
BOOL ShowPluginDialog(HWND hWnd,BOOL bVideo,int nIndex);
//プラグインここまで
//////////////////////////////////////////////////
//基準クロックからの基準タイムの取得
BOOL GetClockTime(REFERENCE_TIME &rtTime) {assert(m_pDirectShow); return SUCCEEDED(m_pDirectShow->GetGraphClockTime(rtTime));}
//基準クロックの分解能を取得
BOOL GetClockResolution(REFERENCE_TIME &rcResolution) {assert(m_pDirectShow); return SUCCEEDED(m_pDirectShow->GetGraphClockResolution(rcResolution));}
//ビデオキャプチャフィルタのフレーム数・ドロップ数などを取得
BOOL GetVideoDropFrame(long* plNotDropped,long* plDropped,long* plAverageSize)
{
assert(m_pDirectShow);
if (m_nVideoFilterID == -1)
return FALSE;
if (m_nVideoFilterOutputPinIndex == -1)
return FALSE;
HRESULT hr;
hr = m_pDirectShow->GetDropFrame(
m_pDirectShow->GetFilterByID(m_nVideoFilterID),m_nVideoFilterOutputPinIndex,
plNotDropped,plDropped,plAverageSize);
return SUCCEEDED(hr);
}
//デバイス性能(遅延時間・オフセット)などを取得
BOOL GetPushSourceInfo(BOOL bVideo,REFERENCE_TIME* prtLatency,ULONG* pFlags,
REFERENCE_TIME* prtOffset,REFERENCE_TIME* prtMaxOffset)
{
assert(m_pDirectShow);
int nID = bVideo? m_nVideoFilterID : m_nAudioFilterID;
if (nID == -1) return FALSE;
int nPinIndex = bVideo ? m_nVideoFilterOutputPinIndex : m_nAudioFilterOutputPinIndex;
if (nPinIndex == -1) return FALSE;
HRESULT hr = m_pDirectShow->GetPushSourceInfo(
m_pDirectShow->GetFilterByID(nID),
nPinIndex,prtLatency,pFlags,prtOffset,prtMaxOffset);
return SUCCEEDED(hr);
}
//ストリーム情報を取得
BOOL GetStreamInfo(BOOL bVideo,AM_STREAM_INFO* pAsi)
{
assert(m_pDirectShow);
int nID = bVideo? m_nVideoFilterID : m_nAudioFilterID;
if (nID == -1) return FALSE;
int nPinIndex = bVideo ? m_nVideoFilterOutputPinIndex : m_nAudioFilterOutputPinIndex;
if (nPinIndex == -1) return FALSE;
HRESULT hr = m_pDirectShow->GetStreamInfo(
m_pDirectShow->GetFilterByID(nID),nPinIndex,pAsi);
return SUCCEEDED(hr);
}
//
void SetAudioVolumeHWnd(HWND hWnd) {
//assert(m_pAudioVolumeFilter);
if (m_pAudioVolumeFilter)
m_pAudioVolumeFilter->SetHWnd(hWnd);
}
int GetAudioVolumeChannels() {
//assert(m_pAudioVolumeFilter);
if (m_pAudioVolumeFilter)
return m_pAudioVolumeFilter->GetChannels();
return -1;
}
BOOL GetAudioVolumedB(double *pddB) {
//assert(m_pAudioVolumeFilter);
if (m_pAudioVolumeFilter)
return m_pAudioVolumeFilter->GetdB(pddB);
return FALSE;
}
BOOL IsAudioVolumeEnabled() const {
if (m_pAudioVolumeFilter)
return m_pAudioVolumeFilter->IsCaptureEnabled();
return FALSE;
}
void AudioVolumeEnableCapture(BOOL bEnable) {
if (m_pAudioVolumeFilter)
m_pAudioVolumeFilter->EnableCapture(bEnable);
m_bAudioVolumeEnable = bEnable;
}
private:
CDirectShow* m_pDirectShow; //DirectShowクラス
//ビデオ周り
int m_nVideoIndex; //ビデオ選択のインデックス(デバイス名のインデックス)
int m_nVideoSettingIndex; //ビデオ選択設定のインデックス(設定略称のインデックス)
int m_nVideoFilterID; //ビデオフィルタのID
int m_nVideoSmartTeeID; //ビデオ分岐フィルタのID
int m_nVideoColorSpaceID; //ビデオ変換フィルタ(カラースペース)のID
int m_nVideoAVIDecompressorID; //ビデオ変換フィルタ(AVIデコンプレッサ)のID
int m_nVideoOverlayMixerID; //オーバーレイミキサのID
int m_nCrossbar1ID; //第1クロスバーのフィルタのID
int m_nCrossbar2ID; //第2クロスバーのフィルタのID
int m_nTVAudioID; //TVオーディオのフィルタのID
int m_nTVTunerID; //TVチューナーのフィルタのID
int m_nVideoFilterOutputPinIndex; //ビデオフィルタの出力ピンの番号
BOOL m_bVideoFindAudioPin; //ビデオデバイスにオーディオピンがあるかどうか
BOOL m_bUseAudioVideoFilter; //オーディオデバイスとビデオデバイスを共用している
//オーディオ周り
int m_nAudioIndex; //オーディオ選択のインデックス
int m_nAudioSettingIndex; //オーディオ選択設定のインデックス(設定略称のインデックス)
int m_nAudioFilterID; //オーディオフィルタのID
int m_nAudioSmartTeeID; //オーディオ分岐フィルタのID
int m_nAudioRenderID; //オーディオレンダラのID (IReferenceClock用)
int m_nAudioNullFilterID; //オーディオフィルタのNullレンダラのID
CDirectShowAudioVolume* m_pAudioVolumeFilter; //オーディオボリュームのサンプルグラバのラッパーのポインタ
int m_nAudioFilterOutputPinIndex; //オーディオフィルタの出力ピンの番号
BOOL m_bAudioVolumeEnable; //オーディオボリュームが有効かどうか
//ビデオプレビューの項目
HWND m_hVideoWnd; //ビデオプレビューのウィンドウハンドル
BOOL m_bVideoShow; //ビデオプレビューが表示されているかどうか?
int m_nVideoVMR; //ビデオミキシングレンダラの選択(0,1,7,9,10の選択)
BOOL m_bVideoVMROverlay; //プレビューのビデオミキシングレンダラのオーバーレイ確保の有無
BOOL m_bVideoForceOff; //ビデオプレビューを強制的に切る設定(再起動時で有効になる)
//////////////////////////////////////////////////
//エンコーダーに関する設定
//////////////////////////////////////////////////
public:
vector<CodecStruct> m_VideoCodecList; //ビデオコーデック
vector<CodecStruct> m_AudioCodecList; //オーディオコーデック
vector<AudioCodecFormatStruct> m_AudioFormatList; //現在のオーディオコーデック設定リスト
BOOL SelectVideoCodecIndex(int nIndex);
BOOL SetVideoCodecSetting(const DWORD dwBitrate,const DWORD msBufferWindow,const double dFPS,const RECT rcSource,const RECT rcTarget);
BOOL SetVideoCodecSetting2(const DWORD dwQuality,const int nMaxKeyFrameSpacing);
BOOL SetVideoComplexity(const WORD wComplexity);
BOOL SelectAudioCodecIndex(int nIndex);
BOOL SelectAudioCodecFormatIndex(int nIndex);
BOOL StartEncode(); //エンコードの開始
BOOL StopEncode(BOOL bForceDisconnect); //エンコードの停止
//エンコード可能かどうか
inline BOOL IsCanEncode() const {
return IsCanPreview() && IsRunFilter() && IsCanAudioPreview() && !IsEncode() &&
(m_nVideoCodecIndex != -1) && (m_nAudioCodecIndex != -1) && (m_nAudioCodecFormatIndex != -1);}
//(m_PullSinkList.size() != 0 || m_PushSinkList.size() != 0 || m_FileSinkList.size() != 0)
//エンコードしているかどうかを取得
inline BOOL IsEncode() const { return m_bStartEncode;}
private:
//ASFライタのパラメータを適用する(StartEncode()のサブルーチン)
HRESULT SetAsfWriterParam();
CDirectShowEncoder* m_pDirectShowEncoder; //エンコーダークラス
int m_bStartEncode; //エンコードをしているかどうかの設定
int m_nVideoCodecIndex; //現在のビデオコーデックのインデックス
int m_nAudioCodecIndex; //現在のオーディオコーデックのインデックス
int m_nAudioCodecFormatIndex; //現在のオーディオコーデックのフォーマットインデックス
//////////////////////////////////////////////////
//ASFライタに関する設定
//////////////////////////////////////////////////
private:
CDirectShowASFWriter* m_pDirectShowASFWriter; //ASFライタクラス
CString m_strAsfTempName; //ASFライタのテンポラリファイル(c:\temp\に出来るファイル名)
public:
//プル出力を追加
BOOL AddPullSink(DWORD dwPort,DWORD dwMax,int &nID);
//プル出力を削除
BOOL RemovePullSink(int nID);
//プル出力の適用
HRESULT ApplyPullSink(int nIndex);
//プル出力を変更(最大接続人数の変更)
BOOL ChangePullSink(int nID,DWORD dwMax);
//プル配信の情報を取得
BOOL GetPullSink(int nIndex,DWORD dwIPAddress,DWORD dwPort,NetworkClientStruct &Client,DWORD &dwSrcPort);
//プル出力が正当なデータであるのかチェックする
BOOL IsVaildPullSink(int nIndex);
//プッシュ出力を追加
BOOL AddPushSink(CString strServerName,BOOL bAutoDelete,int &nID);
//プッシュ出力を削除
BOOL RemovePushSink(int nID);
//プッシュ出力の適用
HRESULT ApplyPushSink(int nIndex);
//ファイルに出力を追加
BOOL AddFileSink(CString strFileName,int &nID);
//ファイルに出力を削除
BOOL RemoveFileSink(int nID);
//ファイルに出力の適用
HRESULT ApplyFileSink(int nIndex);
vector<PullSinkStruct> m_PullSinkList; //プルシンク
vector<PushSinkStruct> m_PushSinkList; //プッシュシンク
vector<FileSinkStruct> m_FileSinkList; //ファイルシンク
//統計情報を取得
BOOL GetStatistics(QWORD &cnsCurrentTime,WM_WRITER_STATISTICS &Stats,WM_WRITER_STATISTICS_EX &StatsEx);
//ネットワークコールバック用のウィンドウハンドルを関連付け
void SetNetworkCallbackHWnd(HWND hWnd){
m_hNetworkCallbackWnd = hWnd;}
HWND GetNetworkCallbackHWnd()const{
return m_hNetworkCallbackWnd;}
//メタデータを設定
BOOL SetMetadata(CString &strTitle,CString &strAuthor,CString &strDescription,
CString &strRating,CString &strCopyright);
private:
//全てのシンク(プル・プッシュ・ファイル)を適用する
BOOL ApplyAllSink();
//属性タブ
CString m_strTitle; //題名
CString m_strAuthor; //作成者
CString m_strDescription; //説明
CString m_strRating; //規制
CString m_strCopyright; //著作権
//プル出力の接続・切断のコールバックを受け取るウィンドウハンドル
HWND m_hNetworkCallbackWnd;
};
//////////////////////////////////////////////////
//[EOF]
|
fede8ceb2a1d29d28d6ad8eeb4e05c5dfc6669d3
|
92d05ea68d5882f6969b077de04674df5c8d0b65
|
/main.cpp
|
fefeef851da252b920ddb216b3a509f4af361343
|
[] |
no_license
|
amystek/TEP_Lab_2
|
d08944a90e5c1bc30d6d3664e99b47549b0781d8
|
d5537873a811eebd39cd2f848aae597b252d0ae3
|
refs/heads/master
| 2022-08-01T10:26:25.096416
| 2020-05-29T22:11:06
| 2020-05-29T22:11:06
| 266,632,145
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,273
|
cpp
|
main.cpp
|
#include "main.h"
int main()
{
// v_lista2();
v_lista3();
return 0;
} //int main()
void v_mod_tab(CTable *pcTab, int iNewSize)
{
pcTab->bSetNewSize(iNewSize);
} //void v_mod_tab(CTable *pcTab, int iNewSize)
void v_mod_tab(CTable cTab, int iNewSize)
{
cTab.bSetNewSize(iNewSize);
} //void v_mod_tab(CTable cTab, int iNewSize)
void v_lista2()
{
CTable *pc_tab1, *pc_tab2;
pc_tab1 = new CTable();
pc_tab1->vSetName("pc_tab1");
pc_tab2 = new CTable(*pc_tab1);
cout << "Increase pc_tab2, result: " << boolalpha << pc_tab1->bSetNewSize(7) << endl;
CTable c_tab;
CTable *pc_new_tab, *pc_new_tab2;
pc_new_tab = c_tab.pcClone();
pc_new_tab2 = pc_tab1->pcClone();
cout << endl << "pctab1.i_tab_length: " << pc_tab1->i_getTableSize() << endl;
v_mod_tab(pc_tab1, 11);
cout << "pctab1.i_tab_length: " << pc_tab1->i_getTableSize() << endl;
v_mod_tab(*pc_tab1, 13);
cout << "pctab1.i_tab_length: " << pc_tab1->i_getTableSize() << endl;
pc_tab1->vPrint();
pc_tab2->vPrint();
delete pc_tab1;
delete pc_tab2;
} //void v_lista2()
void v_lista3()
{
// Zadanie 1
// CTable c_tab_0, c_tab_1;
// c_tab_0.bSetNewSize(6);
// c_tab_1.bSetNewSize(4);
//
// c_tab_0.vPrint();
// c_tab_1.vPrint();
//
// c_tab_0 = c_tab_1;
//
// c_tab_0.vPrint();
// c_tab_1.vPrint();
//Zadanie 2
// po usunięciu destruktora program się nie skompilował
//Zadanie 3
CTable c_tab_0, c_tab_1;
c_tab_0.bSetNewSize(6);
c_tab_1.bSetNewSize(4);
c_tab_0.vSetValueAt(0,1);
c_tab_0.vSetValueAt(1,2);
c_tab_0.vSetValueAt(2,3);
c_tab_0.vSetValueAt(3,4);
c_tab_1.vSetValueAt(0,51);
c_tab_1.vSetValueAt(1,52);
c_tab_1.vSetValueAt(2,53);
c_tab_1.vSetValueAt(3,54);
c_tab_0.vPrint();
c_tab_1.vPrint();
/* initialize table */
cout << endl << "c_tab_0 = c_tab_1" << endl;
c_tab_0 = c_tab_1;
cout << endl << "c_tab_1.vSetValueAt(2,123);" << endl;
c_tab_1.vSetValueAt(2,123);
c_tab_0.vPrint();
c_tab_1.vPrint();
//Zadanie 4
//TODO: poprawić operator+
cout << endl << "c_tab_0 + c_tab_1" << endl;
c_tab_0.operator+(c_tab_1);
c_tab_0.vPrint();
// delete & c_tab_0;
} //void v_lista3()
|
954477fb5a154a9707bdd2c45e4c66ad3bddcb1d
|
9edca2e178d153f5e309914c526605cacafb9c2b
|
/Directx11FPS/Help/Graphic/Inter/inter.IFlush.h
|
0ca73052e432681db0e00607ff5508ff189bea86
|
[
"MIT"
] |
permissive
|
sekys/FPS
|
0165dd35a3b2ff09e38165cb2fa5e9b49ac79e06
|
d582b6b5fb55adc88b6c4aa6a4cd2145488db31f
|
refs/heads/master
| 2020-05-31T03:45:19.610501
| 2014-12-10T16:08:08
| 2014-12-10T16:08:08
| 24,189,970
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 66
|
h
|
inter.IFlush.h
|
#pragma once
class IFlush {
public:
virtual void Flush() = 0;
};
|
a04c88c512f0375ecb96dcd282dde5bd2a160f7b
|
8fc1619aea082639b3a13d607e9e36abd3c91c5e
|
/include/network/address.hpp
|
ab63da9451a28c7c731246f5c4c487673a97b993
|
[
"MIT"
] |
permissive
|
RoseLeBlood/aSTL
|
2dcf28160b5152c33d3ccf99f91ebc0d4cc2f89f
|
5b532499f26cf406e30152bdb6bd51d853fbec03
|
refs/heads/master
| 2021-07-16T13:06:23.405363
| 2021-02-25T10:11:50
| 2021-02-25T10:11:50
| 77,330,174
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,192
|
hpp
|
address.hpp
|
/*
* The MIT License
*
* Copyright 2016 annas.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
* File: address.hpp
* Author: annas
*
* Created on 26. Dezember 2016, 22:06
*/
#ifndef ADDRESS_HPP
#define ADDRESS_HPP
#include "enums.hpp"
#include "../string.hpp"
namespace std {
namespace net {
class ip_address_base {
public:
ip_address_base() : m_addr(AddrFamily::Unknown) {}
ip_address_base(AddrFamily addr) : m_addr(addr) { }
virtual AddrFamily getFamily() {
return m_addr;
}
protected:
AddrFamily m_addr;
};
class ip_address4 : public ip_address_base {
public:
static const ip_address4 Any;// = ip_address4(0x0000000000000000);
static const ip_address4 Loop;// = ip_address4(0x000000000100007F);
static const ip_address4 BroadCast;// = ip_address4(0x00000000FFFFFFFF);
ip_address4() : ip_address_base(AddrFamily::Internet) { }
ip_address4( int address);
ip_address4(const ip_address4& v);
explicit ip_address4(unsigned short addr[4]);
void getaddress(unsigned short b[4]);
long get();
void set(long value);
static ip_address4 parse(std::string ip);
ip_address4& operator = (const ip_address4& v);
std::string to_string();
private:
unsigned int m_address;
};
inline bool operator == (const ip_address4& a, const ip_address4& b ) {
return a.get() == b.get();
}
inline bool operator != (const ip_address4& a, const ip_address4& b ) {
return a.get() != b.get();
}
class ip_address6 : public ip_address_base {
public:
static const ip_address6 Any ;//= ip_address6(unsigned char[]{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },0);
static const ip_address6 Loopback ;//= ip_address6(unsigned char[]{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },0);
static const ip_address6 None ;//= ip_address6(unsigned char[]{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },0);
ip_address6() : ip_address_base(AddrFamily::InternetV6) { }
ip_address6(unsigned short addr[16], long scopid);
ip_address6(unsigned short addr[16]);
ip_address6(const ip_address6& v);
ip_address6(const ip_address4& v);
void getaddress(unsigned short b[16]);
long getscopid();
void setscopid(long id);
static ip_address6 parse(std::string ip) { return ip_address6(); }
ip_address6& operator = (const ip_address6& v);
unsigned short* get() { return m_numbers; }
const ip_address4& to_ip4();
bool is_multicast() { return ((m_numbers[0] & 0xFF00 ) == 0xFF00 ); }
bool is_linklocal() { return ((m_numbers[0] & 0xFFC0 ) == 0xFE80 ); }
bool is_sitelocal() { return ((m_numbers[0] & 0xFFC0 ) == 0xFEC0 ); }
bool is_teredo() { return (m_numbers[0] == 0x2001 ) && ( m_numbers[1] == 0 ); }
bool is_ipv4mapped() {
for (int i = 0; i < 5; i++) {
if (m_numbers[i] != 0) {
return false;
}
}
return (m_numbers[5] == 0xFFFF);
}
private:
long m_scopid;
unsigned short m_numbers[8];
};
inline bool operator == (const ip_address6& a, const ip_address6& b ) {
for(int i =0; i < 8; i++)
if (a.get()[i] != b.get()[i]) return false;
return a.getscopid() == b.getscopid();
}
inline bool operator != (const ip_address6& a, const ip_address6& b ) {
return !(a == b);
}
}
}
#endif /* ADDRESS_HPP */
|
5c76d05e6f9afdbc9a8679fd61d28e387b195a3e
|
27fdddea150d37f310c259cd55f9bd8688cf64d2
|
/bmengine/cHardwarePlatform_Unix.cpp
|
c518f3fc06ef7450f2448f6150b108e0222e798e
|
[] |
no_license
|
thebadmonkeydev/BMG.Engine
|
3f1be9ed582d5b1ab6c45469a0589a10e1f495ea
|
d2b14d2798ef6ec4a977d04d9974151235b1a13f
|
refs/heads/master
| 2021-01-22T14:38:52.961949
| 2014-02-14T20:44:15
| 2014-02-14T20:44:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 710
|
cpp
|
cHardwarePlatform_Unix.cpp
|
/*
* cHardwarePlatform_Unix.cpp
*
* Created on: Feb 25, 2013
* Author: michael
*/
#include "cHardwarePlatform_Unix.h"
namespace bmcore {
cHardwarePlatform_Unix* cHardwarePlatform_Unix::sm_pinstance = NULL;
cHardwarePlatform_Unix::~cHardwarePlatform_Unix() {
}
cHardwarePlatform_Unix::cHardwarePlatform_Unix() {
// TODO Auto-generated constructor stub
}
tReal32 cHardwarePlatform_Unix::getCPUSpeed()
{
}
tuChar8* cHardwarePlatform_Unix::getDevURL()
{
}
tReal32 cHardwarePlatform_Unix::getDiskAccessSpeed()
{
}
cHardwarePlatform_Unix* cHardwarePlatform_Unix::Get()
{
if (NULL == sm_pinstance){sm_pinstance = new cHardwarePlatform_Unix;}
return sm_pinstance;
}
} /* namespace bmcore */
|
53da44dd5b9e38d0018642efa296865eafd9069d
|
6f3f43161f34af60b6efcd1685dab51ddc5881df
|
/สัปดาห์ที่3.2/Source.cpp
|
1402f914859db0c0bf850aa826ba452a051fd52b
|
[] |
no_license
|
64011150/-3.2.
|
1c8e4311e6327d2bd9bfa786de130bfc0d231840
|
f9dd6574a8ffcc0731e56e249570122114dc514e
|
refs/heads/master
| 2023-07-13T08:18:48.450228
| 2021-08-22T07:47:39
| 2021-08-22T07:47:39
| 398,743,428
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 132
|
cpp
|
Source.cpp
|
#include<stdio.h>
int main() {
int a;
int b = 1;
scanf_s("%d", &a);
while (b <= a) {
printf("*");
b = b + 1;
}
return 0;
}
|
d9adb1f2d155770990442dc169a6e011b1a50bf1
|
c2edc63819f7634a951c3e9a7d524c3321201490
|
/VZ03/sea_horse.cpp
|
fa98215facae4dda9504ecfe01514394a0156d1d
|
[] |
no_license
|
aryapradipta9/OkeOce
|
07c574ef22ff90947db828b2eaf608543d7aa322
|
6e227ae44baeaf34e0caa56f66161c554a48222e
|
refs/heads/master
| 2021-01-21T11:19:11.476512
| 2017-03-17T03:39:57
| 2017-03-17T03:39:57
| 83,553,908
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 238
|
cpp
|
sea_horse.cpp
|
#include "sea_horse.h"
/** @brief Inisialisasi Hewan
*/
SeaHorse::SeaHorse() {
Animal::species = "Hippocampus mohnikei";
Animal::experience = "Horselike sea creature";
Animal::berat = 10;
Animal::animal_char = 't';
}
|
bd8b9b60975c7266dd244fa150cc831e22394efb
|
9655da99ede9d123c05ff8118e4034e948bca2e8
|
/arm-rtmp/inc/RtmpH264.h
|
07141f0027f6d2e509045fd7646cfd9f8ea71cb6
|
[] |
no_license
|
tla001/arm-rtmp
|
115c01fa1895623ce992f3215238096f26dc3b97
|
682a4a37aff16cb5235f7c75d84bb9902929da07
|
refs/heads/master
| 2021-01-12T00:39:22.964314
| 2017-01-13T10:10:09
| 2017-01-13T10:10:09
| 78,751,451
| 2
| 1
| null | null | null | null |
GB18030
|
C++
| false
| false
| 4,984
|
h
|
RtmpH264.h
|
#pragma once
#include "librtmp_send264.h"
#include "sps_decode.h"
//#ifdef _BASEFUNC_EXPORT_
//#define BASE_API extern "C" __declspec(dllexport)
//#else
//#define BASE_API __declspec(dllimport)
//#endif
//
//#define __STDC_CONSTANT_MACROS
extern "C" {
#include "x264.h"
#include "x264_config.h"
//#include "mp4v2\mp4v2.h"
#include "libswscale/swscale.h"
//#include "libavutil\opt.h"
#include "libavutil/imgutils.h"
}
//CRITICAL_SECTION m_Cs;// 临界区结构对象
typedef struct
{
// rtmp object
char* szUrl;
RTMP* rtmp;
RTMPPacket packet;
// faac encoder
unsigned long nSampleRate;
unsigned long nChannels;
unsigned long nTimeStamp;
unsigned long nTimeDelta;
char* szPcmAudio;
unsigned long nPcmAudioSize;
unsigned long nPcmAudioLen;
char* szAacAudio;
unsigned long nAacAudioSize;
}RTMPMOD_SPublishObj;
typedef unsigned long long QWORD, ULONG64, UINT64, ULONGLONG;
class RtmpH264
{
public:
RtmpH264(void);
~RtmpH264()
{
}
int CreatePublish(char* url, int outChunkSize, int isOpenPrintLog, int logType);
void DeletePublish();
int InitVideoParams(unsigned long width, unsigned long height, unsigned long fps, unsigned long bitrate, enum AVPixelFormat src_pix_fmt,bool bConstantsBitrate);
int SendScreenCapture(BYTE * frame, unsigned long Height, unsigned long timespan);
//int WriteVideoParams(unsigned long width, unsigned long height, unsigned long fps, unsigned long bitrate);
//int WriteScreenCapture(BYTE * frame, unsigned long Stride, unsigned long Height, unsigned long timespan);
void FreeEncodeParams(); //释放占用内存资源
public:
DWORD m_startTime;
RTMPMOD_SPublishObj rtmp_PublishObj;
struct SwsContext * m_SwsContext;
int m_width; //宽度
int m_height; // 高度
int m_frameRate; //帧率fps
int m_bitRate; //比特率
int m_baseFrameSize;
int m_audioChannel; //声道数
int m_audioSample; //音频采样率
int m_type;//0 rtmp推流模式, 1 mp4录像模式
bool m_isCreatePublish;
enum AVPixelFormat m_srcPicFmt;
uint8_t *src_data[4];
int src_linesize[4];
};
/*创建推送流
*<param name="url">推送流地址</param>
*<param name="outChunkSize">发送包大小</param>
*/
long RTMP_CreatePublish(char* url, unsigned long outChunkSize, int isOpenPrintLog, int logType);
//删除推送流
void RTMP_DeletePublish();
/*初始化编码参数
*<param name="width">视频宽度</param>
*<param name="height">视频高度</param>
*<param name="fps">帧率</param>
*<param name="bitrate">比特率</param>
*<param name="bConstantsBitrate"> 是否恒定码率 </param>
*/
long RTMP_InitVideoParams(unsigned long width, unsigned long height, unsigned long fps, unsigned long bitrate,enum AVPixelFormat src_pix_fmt,bool bConstantsBitrate = false);
/*初始化编码参数
*<param name="frame">图片地址</param>
*<param name="Stride">图片步幅</param>
*<param name="Height">图片行高</param>
*<param name="timespan">时间戳</param>
*/
long RTMP_SendScreenCapture(char * frame, unsigned long Height, unsigned long timespan);
/*初始化编码参数
*<param name="szBuf">音频数据地址</param>
*<param name="nBufLen">音频数据长度 单位字节</param>
*<param name="nSampleRate">采样率</param>
*<param name="nChannels">声道数</param>
*<param name="timespan">时间戳</param>
*/
long RTMP_SendAudioFrame(char* szBuf, unsigned long nBufLen, unsigned long nSampleRate, unsigned long nChannels, unsigned long timespan);
///*创建MP4文件
//*<param name="fileName">文件名</param>
//*<param name="audioSample">采样率</param>
//*<param name="audioChannel">声道数</param>
//*/
//BASE_API long RTMP_CreateMp4File(char* fileName, int audioChannel, int audioSample);
//BASE_API void RTMP_CloseMp4File();
//
///*初始化编码参数
//*<param name="width">视频宽度</param>
//*<param name="height">视频高度</param>
//*<param name="fps">帧率</param>
//*<param name="bitrate">比特率</param>
//*/
//BASE_API long RTMP_WriteVideoParams(unsigned long width, unsigned long height, unsigned long fps, unsigned long bitrate);
//
//
///*编码图像数据并写入文件
//*<param name="szBuf">音频数据地址</param>
//*<param name="nBufLen">音频数据长度 单位字节</param>
//*<param name="nSampleRate">采样率</param>
//*<param name="nChannels">声道数</param>
//*<param name="timespan">时间戳</param>
//*/
//BASE_API long RTMP_WriteScreenCapture(char * frame, unsigned long Stride, unsigned long Height, unsigned long timespan);
//
//
///*编码音频数据并写入文件
//*<param name="szBuf">音频数据地址</param>
//*<param name="nBufLen">音频数据长度 单位字节</param>
//*<param name="nSampleRate">采样率</param>
//*<param name="nChannels">声道数</param>
//*<param name="timespan">时间戳</param>
//*/
//BASE_API long RTMP_WriteAudioFrame(char* szBuf, unsigned long nBufLen, unsigned long nSampleRate, unsigned long nChannels, unsigned long timespan);
|
301ccbfe70727d264a62f4a75d873570ed47485a
|
7cd9a827ca5ffd3d5adcce200fb446ee027a293c
|
/include/ShiftLib/Geometry/XSVector3D.hpp
|
007ede8d79dfcd41d37fdc41ba57f29a5c8342e7
|
[
"Apache-2.0"
] |
permissive
|
Sibras/ShiftLib
|
dc41889504731df7277587c7cb390d9a8f5c8c14
|
144e4cee18b20c92d06c7c2c4c338d85d8f2049e
|
refs/heads/master
| 2023-07-07T00:35:25.229618
| 2023-06-30T15:35:22
| 2023-06-30T15:35:22
| 203,160,167
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 18,739
|
hpp
|
XSVector3D.hpp
|
#pragma once
/**
* Copyright Matthew Oliver
*
* Licensed under the Apache License, Version 2.0 (the "License") noexcept;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "SIMD/XSSIMD3.hpp"
namespace Shift {
template<typename T, SIMDWidth Width>
class Vector3D;
template<typename T>
class Vector3DData
{
public:
SIMD3Data<T> values;
/** Default constructor. */
XS_INLINE Vector3DData() noexcept = default;
/**
* Constructor.
* @param other The other.
*/
XS_INLINE Vector3DData(const Vector3DData& other) noexcept = default;
/**
* Forwarding Constructor.
* @param other The other.
*/
XS_INLINE Vector3DData(Vector3DData&& other) noexcept = default;
/**
* Assignment operator.
* @param other The other.
* @returns A shallow copy of this object.
*/
XS_INLINE Vector3DData& operator=(const Vector3DData& other) noexcept = default;
/**
* Move assignment operator.
* @param other The other.
* @returns A shallow copy of this object.
*/
XS_INLINE Vector3DData& operator=(Vector3DData&& other) noexcept = default;
/**
* Construct from non-data type.
* @tparam Width Type of SIMD being used.
* @param other The non-data type to construct from.
*/
template<SIMDWidth Width>
XS_INLINE explicit Vector3DData(const Vector3D<T, Width>& other) noexcept
: values(other.values)
{}
/**
* Construct from member variables.
* @param value0In The first pre-calculated value.
* @param value1In The second pre-calculated value.
* @param value2In The third pre-calculated value.
*/
XS_INLINE Vector3DData(T&& value0In, T&& value1In, T&& value2In)
: values(forward<T>(value0In), forward<T>(value1In), forward<T>(value2In))
{}
/**
* Directly set the contents this object.
* @note This function is used to set data using pre-calculated values.
* This removes the necessity to load and then store.
* @param x Points pre-calculated x value.
* @param y Points pre-calculated y value.
* @param z Points pre-calculated z value.
*/
XS_INLINE void setData(T x, T y, T z) noexcept
{
this->values.setData(x, y, z);
}
/**
* Save to memory.
* @tparam Width Type of SIMD being used.
* @param other The object to store.
*/
template<SIMDWidth Width>
XS_INLINE void store(const Vector3D<T, Width>& other) noexcept
{
this->values.store(other.values);
}
/**
* Load from memory.
* @tparam Width Type of SIMD being used.
* @returns The loaded object.
*/
template<SIMDWidth Width = defaultWidthSIMD128<T>>
XS_INLINE Vector3D<T, Width> load() const noexcept
{
return Vector3D<T, Width>(this->values.template load<Vector3D<T, Width>::widthImpl>());
}
};
template<typename T, typename T2 = T>
class Vector3DDataPad
{
public:
SIMD3DataPad<T, T2> values;
/** Default constructor. */
XS_INLINE Vector3DDataPad() noexcept = default;
/**
* Constructor.
* @param other The other.
*/
XS_INLINE Vector3DDataPad(const Vector3DDataPad& other) noexcept = default;
/**
* Forwarding Constructor.
* @param other The other.
*/
XS_INLINE Vector3DDataPad(Vector3DDataPad&& other) noexcept = default;
/**
* Assignment operator.
* @param other The other.
* @returns A shallow copy of this object.
*/
XS_INLINE Vector3DDataPad& operator=(const Vector3DDataPad& other) noexcept = default;
/**
* Move assignment operator.
* @param other The other.
* @returns A shallow copy of this object.
*/
XS_INLINE Vector3DDataPad& operator=(Vector3DDataPad&& other) noexcept = default;
/**
* Construct from non-data type.
* @tparam Width Type of SIMD being used.
* @param other The non-data type to construct from.
*/
template<SIMDWidth Width>
XS_INLINE explicit Vector3DDataPad(const Vector3D<T, Width>& other) noexcept
: values(other.values)
{}
/**
* Construct from member variables.
* @param value0In The first pre-calculated value.
* @param value1In The second pre-calculated value.
* @param value2In The third pre-calculated value.
*/
XS_INLINE Vector3DDataPad(T&& value0In, T&& value1In, T&& value2In)
: values(forward<T>(value0In), forward<T>(value1In), forward<T>(value2In))
{}
/**
* Directly set the contents this object.
* @note This function is used to set data using pre-calculated values.
* This removes the necessity to load and then store.
* @param x Points pre-calculated x value.
* @param y Points pre-calculated y value.
* @param z Points pre-calculated z value.
*/
XS_INLINE void setData(T x, T y, T z) noexcept
{
this->values.setData(x, y, z);
}
/**
* Save to memory.
* @tparam Width Type of SIMD being used.
* @param other The object to store.
*/
template<SIMDWidth Width>
XS_INLINE void store(const Vector3D<T, Width>& other) noexcept
{
this->values.store(other.values);
}
/**
* Load from memory.
* @tparam Width Type of SIMD being used.
* @returns The loaded object.
*/
template<SIMDWidth Width = defaultWidthSIMD128<T>>
XS_INLINE Vector3D<T, Width> load() const noexcept
{
return Vector3D<T, Width>(this->values.template load<Vector3D<T, Width>::widthImpl>());
}
};
/**
* A base type used to store a 3-D vector.
* @note Cross product operations on 3-D vectors contained in this library are
* performed in a right-hand coordinate system.
* @tparam T Generic type parameter.
* @tparam Width Type of SIMD being used.
*/
template<typename T, SIMDWidth Width = defaultWidthSIMD128<T>>
class Vector3D
{
public:
using Type = T;
using SIMD3Def = SIMD3<T, SIMD3<T, Width>::widthImpl>;
using Data = Vector3DData<T>;
template<typename T2 = Type>
using DataPad = Vector3DDataPad<T, T2>;
static constexpr SIMDWidth width = Width;
static constexpr SIMDWidth widthImpl = SIMD3Def::widthImpl;
using BaseDef = typename SIMD3Def::BaseDef;
using InBaseDef = typename SIMD3Def::InBaseDef;
SIMD3Def values;
/** Default constructor. */
XS_INLINE Vector3D() noexcept = default;
/**
* Constructor.
* @param other The other.
*/
XS_INLINE Vector3D(const Vector3D& other) noexcept = default;
/**
* Forwarding Constructor.
* @param other The other.
*/
XS_INLINE Vector3D(Vector3D&& other) noexcept = default;
/**
* Assignment operator.
* @param other The other.
* @returns A shallow copy of this object.
*/
XS_INLINE Vector3D& operator=(const Vector3D& other) noexcept = default;
/**
* Move assignment operator.
* @param other The other.
* @returns A shallow copy of this object.
*/
XS_INLINE Vector3D& operator=(Vector3D&& other) noexcept = default;
/**
* Constructor.
* @tparam Width2 Type of SIMD being used.
* @param other The other.
*/
template<SIMDWidth Width2>
XS_INLINE explicit Vector3D(const Vector3D<T, Width2>& other) noexcept
: values(other.values)
{}
/**
* Construct a 3-D vector from x, y, and z elements.
* @param x The x value.
* @param y The y value.
* @param z The z value.
*/
XS_INLINE Vector3D(T x, T y, T z) noexcept
: values(x, y, z)
{}
/**
* Constructor to set all elements to the same scalar value.
* @param value Value to set all vector elements to.
*/
XS_INLINE explicit Vector3D(T value) noexcept
: values(value)
{}
/**
* Construct a 3-D vector from a SIMD3.
* @param values The SIMD3.
*/
XS_INLINE explicit Vector3D(const SIMD3Def& values) noexcept
: values(values)
{}
/**
* Construct from 3 different values.
* @param value0 The first value.
* @param value1 The second value.
* @param value2 The third value.
*/
XS_INLINE Vector3D(const BaseDef value0, const BaseDef value1, const BaseDef value2) noexcept
: values(value0, value1, value2)
{}
/**
* Construct from a SIMD2 and a single scalar value.
* @param other0 The input SIMD2.
* @param other1 The third value.
*/
XS_INLINE Vector3D(const typename SIMD3Def::SIMD2Def& other0, const InBaseDef other1) noexcept
: values(other0, other1)
{}
/**
* Constructor to build a 3-D vector with all elements set to 0.
* @returns Newly constructed Vector3D with required attributes.
*/
XS_INLINE static Vector3D Zero() noexcept
{
return Vector3D(SIMD3Def::Zero());
}
/**
* Constructor to build a 3-D vector with all elements set to 1.
* @returns Newly constructed Vector3D with required attributes.
*/
XS_INLINE static Vector3D One() noexcept
{
return Vector3D(SIMD3Def::One());
}
/**
* Get an element of a 3-D vector.
* @note Optimized for getting value from register.
* @tparam Index The index of the element to retrieve (must be between 0 and 2).
* @returns InBaseDef containing the desired value.
*/
template<uint32_t Index>
XS_INLINE InBaseDef getValueInBase() const noexcept
{
return this->values.template getValueInBase<Index>();
}
/**
* Get an element of a 3-D vector.
* @note Optimised for getting value from register.
* @tparam Index The index of the element to retrieve (must be between 0 and 2).
* @returns SIMDBase containing the desired value.
*/
template<uint32_t Index>
XS_INLINE BaseDef getValue() const noexcept
{
return this->values.template getValue<Index>();
}
/**
* Dynamically get an element of the object.
* @note Optimised for getting value from register.
* @param index The index of the element to retrieve (range is 0-2).
* @returns SIMDInBase containing the desired value.
*/
XS_INLINE InBaseDef getValueInBase(const uint32 index) const noexcept
{
return this->values.getValueInBase(index);
}
/**
* Dynamically get an element of the object.
* @note Optimised for getting value from register.
* @param index The index of the element to retrieve (range is 0-2).
* @returns BaseDef containing the desired value.
*/
XS_INLINE BaseDef getValue(const uint32 index) const noexcept
{
return this->values.getValue(index);
}
/**
* Set an element of a 3-D vector.
* @tparam Index The index of the element to set (must be between 0 and 2).
* @param value The new value.
*/
template<uint32_t Index>
XS_INLINE void setValue(InBaseDef value) noexcept
{
this->values.template setValue<Index>(value);
}
/**
* Set an element of a 3-D vector.
* @tparam Index The index of the element to set (must be between 0 and 2).
* @param value The new value.
*/
template<uint32_t Index>
XS_INLINE void setValue(BaseDef value) noexcept
{
this->values.template setValue<Index>(value);
}
/**
* Multiply a 3-D vector by a scalar and then add another vector.
* @param value Value to multiply the vector by.
* @param vector Second vector to add.
* @returns The result of the operation.
*/
XS_INLINE Vector3D mad(BaseDef value, const Vector3D& vector) const noexcept
{
return Vector3D(this->values.mad(value, vector.values));
}
/**
* Compute the dot product of two 3-D vectors.
* @param vector The second vector.
* @returns The value of the dot product stored in a floatBase.
*/
XS_INLINE BaseDef dot3(const Vector3D& vector) const noexcept
{
return this->values.dot3(vector.values);
}
/**
* Compute the dot product of two 3-D vectors.
* @param vector The second vector.
* @returns The value of the dot product stored in a floatInBase.
*/
XS_INLINE InBaseDef dot3InBase(const Vector3D& vector) const noexcept
{
return this->values.dot3InBase(vector.values);
}
/**
* Compute cross product of two 3-D vectors.
* @note Uses Right-handed coordinate system.
* @param vector The second vector.
* @returns A new vector corresponding to the cross product of the inputs.
*/
XS_INLINE Vector3D cross3(const Vector3D& vector) const noexcept
{
return Vector3D(this->values.cross3(vector.values));
}
/**
* Compute component product of two 3-D vectors.
* @param vector The second vector.
* @returns A new vector corresponding to the component product of the inputs.
*/
XS_INLINE Vector3D component3(const Vector3D& vector) const noexcept
{
return Vector3D(this->values * vector.values);
}
/**
* Compute the square of the length of a 3-D vector.
* @returns Squared length of vector stored in BaseDef.
*/
XS_INLINE BaseDef lengthSqr() const noexcept
{
return this->values.lengthSqr();
}
/**
* Compute the length of a 3-D vector.
* @returns Length of vector stored in BaseDef.
*/
XS_INLINE BaseDef length() const noexcept
{
return this->values.length();
}
/**
* Compute the square of the length of a 3-D vector.
* @returns Squared length of vector stored in InBaseDef.
*/
XS_INLINE InBaseDef lengthSqrInBase() const noexcept
{
return this->values.lengthSqrInBase();
}
/**
* Compute the length of a 3-D vector.
* @returns Length of vector stored in InBaseDef.
*/
XS_INLINE InBaseDef lengthInBase() const noexcept
{
return this->values.lengthInBase();
}
/**
* Normalise a vector.
* @note The result is unpredictable when all elements of vector are at or near zero.
* @returns A new vector corresponding to the normalised vector.
*/
XS_INLINE Vector3D normalize() const noexcept
{
return Vector3D(this->values.normalize());
}
};
/**
* Add two 3-D vectors.
* @param vector1 The first vector.
* @param vector2 Vector to add to the first one.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width> operator+(const Vector3D<T, Width>& vector1, const Vector3D<T, Width>& vector2) noexcept
{
return Vector3D<T, Width>(vector1.values + vector2.values);
}
/**
* Subtract a 3-D vector from another 3-D vector.
* @param vector1 The first vector.
* @param vector2 Vector to subtract from the first one.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width> operator-(const Vector3D<T, Width>& vector1, const Vector3D<T, Width>& vector2) noexcept
{
return Vector3D<T, Width>(vector1.values - vector2.values);
}
/**
* Multiply a 3-D vector by a scalar.
* @param vector The vector.
* @param value Value to multiply the vector by.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width> operator*(
const Vector3D<T, Width>& vector, typename Vector3D<T, Width>::BaseDef value) noexcept
{
return Vector3D<T, Width>(vector.values * value);
}
/**
* Multiply a 3-D vector by another.
* @param vector1 The first vector.
* @param vector2 Vector to multiply the first one by.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width> operator*(const Vector3D<T, Width>& vector1, const Vector3D<T, Width>& vector2) noexcept
{
return Vector3D<T, Width>(vector1.values * vector2.values);
}
/**
* Divide a 3-D vector by a scalar.
* @param vector The vector.
* @param value Value to divide the vector by.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width> operator/(
const Vector3D<T, Width>& vector, typename Vector3D<T, Width>::BaseDef value) noexcept
{
return Vector3D<T, Width>(vector.values / value);
}
/**
* Negate all elements of a 3-D vector.
* @param vector The vector to negate.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width> operator-(const Vector3D<T, Width>& vector) noexcept
{
return Vector3D<T, Width>(-vector.values);
}
/**
* Perform compound assignment and addition with a 3-D vector.
* @param [in,out] vector1 The first vector.
* @param vector2 Vector3D to add to first one.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width>& operator+=(Vector3D<T, Width>& vector1, const Vector3D<T, Width>& vector2) noexcept
{
vector1.values += vector2.values;
return vector1;
}
/**
* Perform compound assignment and subtraction by a 3-D vector.
* @param [in,out] vector1 The first vector.
* @param vector2 Vector3D to subtract from first one.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width>& operator-=(Vector3D<T, Width>& vector1, const Vector3D<T, Width>& vector2) noexcept
{
vector1.values -= vector2.values;
return vector1;
}
/**
* Perform compound assignment and multiplication by a scalar.
* @param [in,out] vector The vector.
* @param value Value to multiply the vector by.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width>& operator*=(
Vector3D<T, Width>& vector, typename Vector3D<T, Width>::BaseDef value) noexcept
{
vector.values *= value;
return vector;
}
/**
* Perform compound assignment and division by a scalar.
* @param [in,out] vector The vector.
* @param value Value to divide the vector by.
* @returns The result of the operation.
*/
template<typename T, SIMDWidth Width>
XS_INLINE Vector3D<T, Width>& operator/=(
Vector3D<T, Width>& vector, typename Vector3D<T, Width>::BaseDef value) noexcept
{
vector.values /= value;
return vector;
}
} // namespace Shift
|
718899b5d1437049c57c23ebccd2700f18403e4a
|
bec4ce7862948e5057b9573dd82a4aa0733ff485
|
/src/ch3/string/demo13.cc
|
9131da7acaeadf6d7749be28deb280a27960725e
|
[
"MIT"
] |
permissive
|
HerculesShek/cpp-practise
|
27b850a9c446a6571a95629cb6045e18957e6071
|
aa0cdc3101c831c1c677f0de46a2f85a4b407bc3
|
refs/heads/master
| 2016-09-06T13:05:04.184703
| 2014-09-23T01:41:38
| 2014-09-23T01:41:38
| 17,898,200
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 172
|
cc
|
demo13.cc
|
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name("zhangsan");
string res = "hello, " + name;
cout << res << endl;
return 0;
}
|
7b956301f52e6b8a45817d7142b83c2e329e1f28
|
8f3cd6fda9299e125918512060e91aeb2d708b4c
|
/hafta7/hafta7_3.cpp
|
78d0895487f26d22c3db8e8291f4fc4fbf9190a6
|
[] |
no_license
|
BurakKaragol/CPlusPlus
|
cdba22fff7b0ef40bade41b81695ab3291376b3d
|
90b026704ec858d37830b54646eb9039885716f0
|
refs/heads/master
| 2022-05-20T23:21:14.938980
| 2022-03-29T10:33:42
| 2022-03-29T10:33:42
| 149,350,694
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 332
|
cpp
|
hafta7_3.cpp
|
#include <iostream>
// haftanın konusu : nesnelere işaret eden pointerlar
using namespace std;
class Ogrenci
{
private:
int yas;
public:
Ogrenci():yas(22){}
void Goster()
{
cout << yas << endl;
}
};
int main()
{
Ogrenci *ogr1 = new Ogrenci;
ogr1->Goster();
delete ogr1;
return 0;
}
|
d0b9d351473156717b1ba4d5d4509d4bb9b8650a
|
c4cf2bc7a5c7de9cf9af2f9b48543b068b0cb59b
|
/1. Practice/Questions/Arrays/5.1 Product_of_Array_Exc_Self_Efficient.cpp
|
398e29456a171a61b8d2f4ab4c4d41303b1a3621
|
[] |
no_license
|
PacificPR/DS_ALGO_PRACTICE
|
abcf36007818d8448fbe50cf7a552ac89cfddf7f
|
ce42bf740035abb1deab75db78b2ec92bb9d8d8d
|
refs/heads/master
| 2021-05-20T09:45:26.941780
| 2020-10-01T20:08:11
| 2020-10-01T20:08:11
| 252,231,972
| 1
| 2
| null | 2020-10-01T20:08:13
| 2020-04-01T16:41:16
|
C++
|
UTF-8
|
C++
| false
| false
| 1,004
|
cpp
|
5.1 Product_of_Array_Exc_Self_Efficient.cpp
|
/*
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].
Example:
Input: [1,2,3,4]
Output: [24,12,8,6]
*/
class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
if(nums.size()==0)
return vector<int>();
vector<int> res(nums.size(),1);
res[0] = 1;
for(int i=1;i<nums.size();i++) //Computing left product in the res array
res[i] = nums[i-1]*res[i-1];
int x = nums[nums.size()-1]; //For computing right product , this variable is updated with right products
for(int i=nums.size()-2;i>=0;i--){ //Computing right_product
res[i] = x*res[i];
x = x*nums[i]; //Multiplying right numbers , so later on we can multiply it with left_product in res
}
return res;
}
};
// DOESN'T REQUIRE EXTRA SPACE
|
97cc4399e9cfd8269836df0496072f74154b0e47
|
5d83739af703fb400857cecc69aadaf02e07f8d1
|
/Archive2/a0/9e0c410f74bd29/main.cpp
|
a2ffe4f33227394dcdbd71fd1fc93cf7f6db92df
|
[] |
no_license
|
WhiZTiM/coliru
|
3a6c4c0bdac566d1aa1c21818118ba70479b0f40
|
2c72c048846c082f943e6c7f9fa8d94aee76979f
|
refs/heads/master
| 2021-01-01T05:10:33.812560
| 2015-08-24T19:09:22
| 2015-08-24T19:09:22
| 56,789,706
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,406
|
cpp
|
main.cpp
|
#include <algorithm>
#include <initializer_list>
#include <iostream>
#include <type_traits>
#include <vector>
template<typename T>
class any_t{
public:
explicit any_t(std::initializer_list<T> const& list)
: data(list) { }
template<typename InputIt>
explicit any_t(InputIt begin, InputIt end)
: data(begin, end) { }
template<class U = T>
explicit operator typename std::enable_if<std::is_same<U, bool>::value, bool>::type() {
return std::any_of(data.begin(), data.end(), [] (bool x) { return x; });
}
private:
std::vector<T> data;
template<typename U>
friend any_t<bool> operator==(U const& other, any_t const& self) {
std::vector<bool> results(self.data.size());
std::transform(self.data.begin(), self.data.end(), results.begin(),
[&] (T const& x) { return x == other; });
return any_t<bool>(results.begin(), results.end());
}
};
struct deduce;
template<class T, class U>
using Defaulted = typename std::conditional<std::is_same<T, deduce>::value, U, T>::type;
template<class T = deduce, class U, class... Us, class R = Defaulted<T, U>>
any_t<R> any(U u, Us... us){
return any_t<R>{static_cast<R>(u), static_cast<R>(us)...};
}
int main() {
auto x = 42;
std::cout << bool(x == any<long>(3, 42, 90)) << '\n';
std::cout << bool(x == any(3, 41, 90)) << '\n';
return 0;
}
|
363f15800885820c911d5afa3db9fb7d06d1dda8
|
eb77b7e6744e7380db2b4835a0faeddca479619b
|
/apps/fortran/shsgc/updateRK3_kernel.inc
|
6fe285c8221d4feddc945f7a4301ba7c5777b5e7
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
OP-DSL/OPS
|
b4fea672de28973acc9a1ae611fd4fd475d04dd9
|
73d0dd431ea70be98b27f49275c43840fd3073ca
|
refs/heads/develop
| 2023-08-16T23:05:22.584318
| 2023-08-14T22:37:16
| 2023-08-15T11:26:12
| 16,912,507
| 44
| 34
|
NOASSERTION
| 2023-09-10T18:40:12
| 2014-02-17T12:44:34
|
C++
|
UTF-8
|
C++
| false
| false
| 885
|
inc
|
updateRK3_kernel.inc
|
subroutine updateRK3_kernel(rho_new, rhou_new, rhoE_new, rho_old, &
& rhou_old, rhoE_old, rho_res, rhou_res, rhoE_res, a1, a2)
real (kind=8) , DIMENSION(1) :: rho_new, rhou_new, rhoE_new, rho_old, rhou_old, rhoE_old
real (kind=8), DIMENSION(1), INTENT(IN) :: rho_res, rhou_res, rhoE_res
real(8) :: a1, a2
rho_new(OPS_ACC1(0)) = rho_old(OPS_ACC4(0)) + a1 * (-rho_res(OPS_ACC7(0))) * dt
rhou_new(OPS_ACC2(0)) = rhou_old(OPS_ACC5(0)) + a1 * (-rhou_res(OPS_ACC8(0))) * dt
rhoE_new(OPS_ACC3(0)) = rhoE_old(OPS_ACC6(0)) + a1 * (-rhoE_res(OPS_ACC9(0))) * dt
! update old state
rho_old(OPS_ACC4(0)) = rho_old(OPS_ACC4(0)) + a2 * (-rho_res(OPS_ACC7(0))) * dt
rhou_old(OPS_ACC5(0)) = rhou_old(OPS_ACC5(0)) + a2 * (-rhou_res(OPS_ACC8(0))) * dt
rhoE_old(OPS_ACC6(0)) = rhoE_old(OPS_ACC6(0)) + a2 * (-rhoE_res(OPS_ACC9(0))) * dt
end subroutine
|
9cba22e92a0de81d90b756fbc5f9362cb56b9241
|
df9de80e6a36a73502db652fe8d73ff8e9f00815
|
/AuroraFlux/Source/AI/Ambient Fighters/Ambient Fighter.cpp
|
5eb48bc1b9a0fe50f3d7bfd5f66f4abc1f5462ec
|
[] |
no_license
|
BSchotanes/AuroraFlux
|
090137d66f566f96ff8a3d5092206f54e8b3986d
|
6819056104601ac582260e22b7545db908162420
|
refs/heads/master
| 2021-07-08T01:57:49.783068
| 2017-10-04T22:54:11
| 2017-10-04T22:54:11
| 105,750,121
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,477
|
cpp
|
Ambient Fighter.cpp
|
#include "Ambient Fighter.h"
#include "../../Collision/Physics.h"
#include "../AmbientFlockingMovement.h"
#include "../../Entity/Missile.h"
#include "../../Object Manager/ObjectManager.h"
#include "AmbientBoundingBox.h"
#include "../../Camera/Camera.h"
CAmbientFighter::CAmbientFighter(CAmbientBoundingBox* _pContainingBox, D3DXMATRIX _d3dMatrix, int _flockID)
{
SetDefaults();
D3DXMatrixIdentity(&m_d3dMatrix);
D3DXVECTOR3 _d3dObjPos = CPhysics::GetMat4Vec(ePOS, &_d3dMatrix);
m_d3dMatrix._41 = _d3dObjPos.x;
m_d3dMatrix._42 = _d3dObjPos.y;
m_d3dMatrix._43 = _d3dObjPos.z;
m_pContainingBox = _pContainingBox;
m_nFlockID = _flockID;
PushBehavior(new CAmbientFlockingMovement((CAmbientFighter*)this));
m_bIsInIntroduction = false;
m_bHasAlreadyPassedPlayer = false;
m_bHasAlreadyShakenCamera = false;
}
CAmbientFighter::CAmbientFighter(D3DXMATRIX _d3dWorldPos, CCamera* _pCamera)
{
SetDefaults();
m_d3dMatrix = _d3dWorldPos;
m_pCamera = _pCamera;
m_bIsInIntroduction = true;
m_nObjectType = eRED_ENEMY;
m_nFlockID = -1;
m_bHasAlreadyPassedPlayer = false;
EffectInformation::CreateEffect(eRED_ENEMY_THRUSTER, &m_esEngineTrail, this, true, false);
CPhysics::LookAt(&m_d3dMatrix, _pCamera->GetCurrentMatrix());
}
bool CAmbientFighter::IntroUpdate(float fTime)
{
if(!m_esEngineTrail.GetPlay())
{
m_esEngineTrail.ResetPosition();
m_esEngineTrail.SetPlay(true);
}
////
//move the ambient fighter forward
D3DXMATRIX d3dMat;
D3DXMatrixIdentity(&d3dMat);
D3DXMatrixTranslation(&d3dMat, 0.0f, 0.0f, 300.0f*fTime);
m_d3dMatrix = m_d3dMatrix * d3dMat;
CPhysics::TurnTo(&m_d3dMatrix, &CPhysics::GetMat4Vec(ePOS, m_pCamera->GetCurrentMatrix()), fTime, 0.001f);
D3DXVECTOR3 _d3dZAxis = CPhysics::GetMat4Vec(eZAXIS, m_pCamera->GetCurrentMatrix());
D3DXVec3Normalize(&_d3dZAxis, &_d3dZAxis);
if(m_bHasAlreadyPassedPlayer == false)
{
D3DXVECTOR3 _fghterPos = CPhysics::GetMat4Vec(ePOS, GetMatrix());
D3DXVECTOR3 _camPos = CPhysics::GetMat4Vec(ePOS, m_pCamera->GetCurrentMatrix());
D3DXVECTOR3 _lngthVec = _camPos - _fghterPos;
float distToTar = D3DXVec3Length(&_lngthVec);
if(distToTar < 1500 && m_bHasPlayedWarpIn == false)
{
EffectInformation::CreateEffect(eRED_ENEMY_ARRIVAL, &m_esArrival, this, false, true);
m_bHasPlayedWarpIn = true;
}
if(distToTar < 70.0f && m_bHasAlreadyShakenCamera == false)
{
WwiseNS::SoundEvent(eEnemyThrust, ePlay, false, this);
m_pCamera->Shake(30, 60, 0.4f);
m_bHasAlreadyShakenCamera = true;
}
if( distToTar > 140 && HalfSpaceTest(_d3dZAxis, CPhysics::GetMat4Vec(ePOS, m_pCamera->GetCurrentMatrix()), GetPosition()))
{
m_bHasAlreadyPassedPlayer = true;
return true;
}
}
return false;
}
bool CAmbientFighter::HalfSpaceTest(const D3DXVECTOR3& planeNorm, const D3DXVECTOR3& pointOnPlane, const D3DXVECTOR3& objPoint)
{
D3DXVECTOR3 v = objPoint - pointOnPlane;
float dot = D3DXVec3Dot(&planeNorm, &v);
if(dot > 0)
return false;
else
return true;
}
bool CAmbientFighter::Update(float fTime, bool _boss)
{
if(m_bIsInIntroduction)
{
return IntroUpdate(fTime);
}
CEnemy::Update(fTime);
if (m_pCurrMoveBehavior)
{
m_pCurrMoveBehavior->Update(fTime);
}
if(_boss)
{
return false;
}
if (bobmTimer >= 40+timerOffset && !m_bFirstExplosion && !m_bSecondExplosion && !m_bThirdExplosion)
{
m_bFirstExplosion = true;
}
else
{
bobmTimer += fTime;
}
static float m_fExplosionTimer = 0.0f;
if(m_bFirstExplosion)
{
if(m_fExplosionTimer > 2.0f)
{
CMissile* tempMissile = (CMissile*)(m_pContainingBox->GetObjectManager()->ReturnArmamentToMasterList(eMISSILE));
if(tempMissile != NULL)
{
D3DXMATRIX d3dMissileMat;
D3DXMatrixTranslation(&d3dMissileMat, (float)(rand()%60-30), (float)(rand()%20-10), (float)(rand()%75-37));
tempMissile->SetTarget(this);
tempMissile->SetMatrix(&( (*GetMatrix()) * d3dMissileMat ));
tempMissile->SetOwner(this);
tempMissile->SetActive(true);
tempMissile->SetLifetime(0.01f);
tempMissile->SetDoOnce(true);
tempMissile->SetHealth(1);
tempMissile->SetVelocityModifier(0.0f);
tempMissile->SetDamage(0);
tempMissile->SetIsVisable(false);
tempMissile->SetIsScenery(true);
for (unsigned int i = 0; i < tempMissile->GetMovementBehaviorStack().size(); i++)
{
tempMissile->PopBehavior();
}
}
m_fExplosionTimer = 0.0f;
m_bFirstExplosion = false;
m_bSecondExplosion = true;
}
else
{
m_fExplosionTimer += fTime;
}
}
else if(m_bSecondExplosion)
{
if(m_fExplosionTimer > 2.0f)
{
CMissile* tempMissile = (CMissile*)(m_pContainingBox->GetObjectManager()->ReturnArmamentToMasterList(eMISSILE));
if(tempMissile != NULL)
{
D3DXMATRIX d3dMissileMat;
D3DXMatrixTranslation(&d3dMissileMat, (float)(rand()%60-30), (float)(rand()%20-10), (float)(rand()%75-37));
tempMissile->SetTarget(this);
tempMissile->SetMatrix(&( (*GetMatrix()) * d3dMissileMat ));
tempMissile->SetOwner(this);
tempMissile->SetActive(true);
tempMissile->SetLifetime(0.01f);
tempMissile->SetDoOnce(true);
tempMissile->SetHealth(1);
tempMissile->SetVelocityModifier(0.0f);
tempMissile->SetDamage(0);
tempMissile->SetIsVisable(false);
tempMissile->SetIsScenery(true);
for (unsigned int i = 0; i < tempMissile->GetMovementBehaviorStack().size(); i++)
{
tempMissile->PopBehavior();
}
}
m_fExplosionTimer = 0.0f;
m_bSecondExplosion = false;
m_bThirdExplosion = true;
}
else
{
m_fExplosionTimer += fTime;
}
}
else if(m_bThirdExplosion)
{
if(m_fExplosionTimer > 2.0f)
{
CMissile* tempMissile = (CMissile*)(m_pContainingBox->GetObjectManager()->ReturnArmamentToMasterList(eMISSILE));
if(tempMissile != NULL)
{
D3DXMATRIX d3dMissileMat;
D3DXMatrixTranslation(&d3dMissileMat, (float)(rand()%60-30), (float)(rand()%20-10), (float)(rand()%75-37));
tempMissile->SetTarget(this);
tempMissile->SetMatrix(&( (*GetMatrix()) * d3dMissileMat ));
tempMissile->SetOwner(this);
tempMissile->SetActive(true);
tempMissile->SetLifetime(0.01f);
tempMissile->SetDoOnce(true);
tempMissile->SetHealth(1);
tempMissile->SetVelocityModifier(0.0f);
tempMissile->SetDamage(0);
tempMissile->SetIsVisable(false);
tempMissile->SetIsScenery(true);
for (unsigned int i = 0; i < tempMissile->GetMovementBehaviorStack().size(); i++)
{
tempMissile->PopBehavior();
}
}
m_fExplosionTimer = 0.0f;
bobmTimer = 0.0f;
m_bThirdExplosion = false;
}
else
{
m_fExplosionTimer += fTime;
}
}
//firing behavior
if(_fAmbientFighterFiringBucket > 15.0f + _nRandomFiringOffset)
{
SetFlags(GetFlags() | eFIRE_LASER);
_fAmbientFighterFiringBucket = 0.0f;
}
else
{
_fAmbientFighterFiringBucket += fTime;
}
return false;
}
void CAmbientFighter::SetDefaults()
{
m_nObjectType = eAMBIENT_ENEMY;
m_nHealth = 1;
m_pPlayer = nullptr;
m_nShields = 0;
m_nDamage = 0;
m_nVelocityModifier = 400.0f;
m_pCurrMoveBehavior = nullptr;
m_pShootBehavior = nullptr;
m_fStunPower = 0;
m_pWaypoint = nullptr;
SetBV(CCollOBJ::Create(eSPH, D3DXVECTOR3(0,0,0), 10.0));
m_bFirstExplosion = false;
m_bSecondExplosion = false;
m_bThirdExplosion = false;
bobmTimer = 0.0f;
timerOffset = rand()%20;
_nRandomFiringOffset = rand()%10;
_fAmbientFighterFiringBucket = 0.0f;
m_bHasAlreadyShakenCamera = false;
m_bHasPlayedWarpIn = false;
}
|
4120cf3b4ad943e91fe9f0a91dcf0ec67fbbf1ed
|
1c027949aa9c9b255c994ccdef9cffb34a6746c2
|
/handle-inl.hpp
|
89264e02646dc951d383e2e21894075c8307e3b5
|
[] |
no_license
|
overmind2/sanya-cpp
|
dee7e81a7d061c2497e42eb6ad4114a5d7fd657d
|
7ba15f18d103f3fdcfed95faad0bebb8b415414d
|
refs/heads/master
| 2016-09-06T01:15:30.747847
| 2011-11-09T04:38:15
| 2011-11-09T04:38:15
| 2,727,418
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,240
|
hpp
|
handle-inl.hpp
|
#ifndef HANDLE_INL_HPP
#define HANDLE_INL_HPP
namespace sanya {
inline Handle::~Handle() {
if (prev_root_ || next_root_) {
UnlinkFromRootSet();
}
}
/** @brief Construct from newly-allocated raw object */
inline Handle::Handle(RawObject *ro) {
Empty();
LinkToRootSet(ro);
}
/** @brief Copy constructor from another object */
inline Handle::Handle(const Handle &o) {
Empty();
LinkToRootSet(o.raw_);
}
/** @brief Assignment mutator */
inline Handle &Handle::operator=(const Handle &o) {
set_raw(o.raw_);
return *this;
}
inline Handle &Handle::operator=(RawObject *ro) {
set_raw(ro);
return *this;
}
inline void Handle::set_raw(RawObject *new_raw) {
LinkToRootSet(new_raw);
}
inline RawObject *Handle::raw() const {
return raw_;
}
RawObject &Handle::AsObject() const {
return *raw_;
}
RawPair &Handle::AsPair() const {
return *(RawPair *)raw_;
}
RawFixnum &Handle::AsFixnum() const {
return *(RawFixnum *)raw_;
}
RawSymbol &Handle::AsSymbol() const {
return *(RawSymbol *)raw_;
}
RawVector &Handle::AsVector() const {
return *(RawVector *)raw_;
}
RawGrowableVector &Handle::AsGrowableVector() const {
return *(RawGrowableVector *)raw_;
}
RawDict &Handle::AsDict() const {
return *(RawDict *)raw_;
}
inline Handle::Handle() {
Empty();
}
inline void Handle::Empty() {
raw_ = NULL;
prev_root_ = NULL;
next_root_ = NULL;
}
inline void Handle::LinkToRootSet(RawObject *ro) {
if (ro->heap_allocated()) {
if (!next_root_) {
// The first time we got a heap object
RootSet::Get().Put(this);
}
else {
// So we already have a heap object
}
}
else if (raw_->heap_allocated()) {
// Switching from heap object to non-heap object
// release the root set.
UnlinkFromRootSet();
}
else {
// Neither of the pointers are heap-allocated -- ignore.
}
raw_ = ro;
}
inline void Handle::UnlinkFromRootSet() {
prev_root_->next_root_ = next_root_;
next_root_->prev_root_ = prev_root_;
prev_root_ = NULL;
next_root_ = NULL;
}
} // namespace sanya
// vim: set ts=4 sw=4 sts=4:
#endif /* HANDLE_INL_HPP */
|
6b7530bfbb402658ddc2470c927b49e30220d4e3
|
d1760931952b6e5a18d4666547068b50a11f0056
|
/FBXImport/WriteFile.h
|
366caddf92a55a2739ce07d00362be0ea089e8cc
|
[] |
no_license
|
xx8086/ReadFbx
|
19d68a7513d998703e8288e3d844bf32b71859da
|
8fe2392c8f8b69699a87a0aeca75fc6574aa15bc
|
refs/heads/master
| 2021-01-12T04:23:24.111455
| 2016-12-29T09:46:41
| 2016-12-29T09:46:41
| 77,600,087
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 512
|
h
|
WriteFile.h
|
#ifndef _WRITEFILE_FBXNODE_H
#define _WRITEFILE_FBXNODE_H
#include "AnalyseFbx\ExtractFbxNode.h"
class CWriteFile
{
public:
CWriteFile(FbxScene* secen, FbxManager* _fManager, int fps = 24);
public:
bool DoFile(FbxNode * pRoot);
bool WriteToBinary();
bool GetFileName(const char* fileName);
public:
bool WriteMesh();
bool WriteAnim();
bool WriteMatrix();
bool WriteMatrix2();
private:
bool GetHeader(MBDHeader& MH, MBDDataheader& _mdh);
private:
std::string m_strFileName;
CRootNode m_node;
};
#endif
|
d16043fc18e4a7f3e40c3a8f46d15d13dcfb328c
|
315b0b26f54c4aba01607fc74886b7a9ceee234f
|
/Simulation_src/LoadResources/LoadObject/ObjFileParser.cpp
|
f9bc68716ea5dd0fb32b75d13e975fca6f94e26b
|
[] |
no_license
|
kbenedek/Testing-OpenGL
|
8d9eba11413454e71a1761b97ab76d37f9904dfa
|
266d036875301efbe40a10b40ed22cfa2594404e
|
refs/heads/master
| 2022-01-11T09:39:14.900871
| 2019-10-13T10:29:27
| 2019-10-13T10:29:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,539
|
cpp
|
ObjFileParser.cpp
|
//
// Created by biomfire on 10/12/19.
//
#include "ObjFileParser.h"
ObjFileParser::ObjFileParser(std::istream &file) {
ParseObjFile(file);
}
void ObjFileParser::ParseObjFile(std::istream &file) {
parseVertices(file);
organizeVertices();
}
void ObjFileParser::parseVertices(std::istream &file) {
std::string line;
while (std::getline(file, line)) {
std::string lineHeader;
std::stringstream iss(line);
iss >> lineHeader;
if (lineHeader == "v")
parseVertex(iss);
else if (lineHeader == "vt")
parseUv(iss);
else if (lineHeader == "vn")
parseNormal(iss);
else if (lineHeader == "f")
parseFaces(iss);
else {
iss.clear();
iss.str(std::string());
}
}
}
void ObjFileParser::organizeVertices() {
for (unsigned long int currentVertexIndex : vertexIndices) {
unsigned int vertexIndex = currentVertexIndex;
glm::vec3 vertex = temp_vertices[vertexIndex - 1];
glm::vec2 uv = temp_uvs[vertexIndex -1];
glm::vec3 normal = temp_normals[vertexIndex-1];
vertices.push_back(vertex);
uvs.push_back(uv);
normals.push_back(normal);
}
}
void ObjFileParser::parseFaces(std::stringstream &line) {
std::string coords;
for (int i = 0; i < 3; i++) {
line >> coords;
split(coords, '/');
vertexIndices.push_back(stoi(coords));
}
}
void ObjFileParser::parseNormal(std::stringstream &line) {
glm::vec3 normal;
line >> normal.x >> normal.y >> normal.z;
temp_normals.push_back(normal);
}
void ObjFileParser::parseUv(std::stringstream &line) {
glm::vec2 uv;
line >> uv.x >> uv.y;
temp_uvs.push_back(uv);
}
void ObjFileParser::parseVertex(std::stringstream &line) {
glm::vec3 vertex;
line >> vertex.x >> vertex.y >> vertex.z;
temp_vertices.push_back(vertex);
}
const std::vector<glm::vec3> &ObjFileParser::getVertices() const {
return vertices;
}
const std::vector<glm::vec2> &ObjFileParser::getUv() const {
return uvs;
}
const std::vector<glm::vec3> &ObjFileParser::getNormals() const {
return normals;
}
std::vector<std::string> ObjFileParser::split(std::string &inputstring, char c) {
//TODO relocate this function
std::stringstream inputstream(inputstring);
std::string split;
std::vector<std::string> returnvector;
while (getline(inputstream, split, c))
returnvector.push_back(split);
return returnvector;
}
|
4b2b56ba33a22b314953c0c022b2d78bd233da3f
|
27420b4c3d261840465a28895490432959f4f2b6
|
/s3/src/common/s3_lock.h
|
08da3155b963bb8a2e1942d712e985aa0cb31a69
|
[] |
no_license
|
skei/old-plugin-frameworks
|
18d15314c0ed3f0ee9f0a9282bbcacd9e907c2fb
|
c2ad1cb10f38ee4a28a0f9e9ac77effcbc0d5f9c
|
refs/heads/main
| 2023-03-18T04:54:20.491450
| 2021-02-22T16:53:15
| 2021-02-22T16:53:15
| 341,266,302
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,408
|
h
|
s3_lock.h
|
#ifndef s3_lock_included
#define s3_lock_included
//----------------------------------------------------------------------
#ifdef S3_WIN32
//#include <windows.h>
class S3_Lock {
private:
CRITICAL_SECTION MCriticalSection;
public:
S3_Lock() {
InitializeCriticalSection(&MCriticalSection);
}
~S3_Lock() {
DeleteCriticalSection(&MCriticalSection);
}
void lock(void) {
EnterCriticalSection(&MCriticalSection);
}
bool tryLock(void) {
return TryEnterCriticalSection( &MCriticalSection );
}
void unlock(void) {
LeaveCriticalSection(&MCriticalSection);
}
};
#endif // S3_WIN32
//----------------------------------------------------------------------
#ifdef S3_LINUX
// -lpthread
//#include <pthread.h>
class S3_Lock {
private:
pthread_mutex_t MMutex; // = PTHREAD_MUTEX_INITIALIZER;
public:
S3_Lock() {
pthread_mutex_init(&MMutex,S3_NULL);
}
~S3_Lock() {
pthread_mutex_destroy(&MMutex);
}
void lock(void) {
pthread_mutex_lock(&MMutex);
}
bool tryLock(void) {
return (pthread_mutex_trylock(&MMutex)==0);
}
void unlock(void) {
pthread_mutex_unlock(&MMutex);
}
};
#endif
//----------------------------------------------------------------------
#endif
|
13a07af97dd86fabde61d33f451394073ec38893
|
14192459ed8ca68de9214191b956d740a44d418f
|
/tools/lookup/lib/file.hh
|
5ec94e9d6ec03cf4b5da72b1bd5cb9276a9c4524
|
[
"MIT"
] |
permissive
|
mbits-os/tangle
|
a1d5835700daf66659576a884d9270238ad84058
|
78d445fe9cf8865a5075c233f954a6d039456887
|
refs/heads/main
| 2023-03-11T11:01:15.442391
| 2023-02-19T20:02:50
| 2023-02-19T20:02:50
| 67,643,354
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 814
|
hh
|
file.hh
|
// Copyright (c) 2020 midnightBITS
// This code is licensed under MIT license (see LICENSE for details)
#pragma once
#include <cstdio>
#include <filesystem>
#include <memory>
#include <vector>
namespace fs = std::filesystem;
struct file_closer {
void operator()(std::FILE* f) { std::fclose(f); }
};
struct file {
using ptr = std::unique_ptr<FILE, file_closer>;
static ptr open(char const* path, char const* mode = "r");
};
class buffered_file : file::ptr {
public:
static buffered_file open(char const* path, char const* mode = "r");
FILE* handle() const noexcept { return get(); }
bool is_open() const { return !!*this; }
bool readline(std::string& out);
private:
buffered_file(FILE* file);
void underflow();
std::vector<char> buffer_;
size_t capacity_{};
size_t pos_{};
bool eof_{false};
};
|
e17c8521c1742fe483d709f90c06d9e1c773ef10
|
a492e8528a19446e7ad3ea72885a249c39213ba2
|
/echelon/hdf5/dataset_dimensions.hpp
|
8236b12ff1c0619df0988e20a4de4e56a79101aa
|
[
"BSL-1.0"
] |
permissive
|
qbb-project/echelon
|
3f80dc4f94a9b3f19a3af147932f5620e0f242f6
|
73feef2b539eab34f6908a746f53ed86fac8a5e1
|
refs/heads/master
| 2020-12-19T14:58:45.299144
| 2020-02-02T17:45:37
| 2020-02-02T18:10:08
| 26,272,618
| 2
| 2
| null | 2016-10-31T18:57:17
| 2014-11-06T14:06:33
|
C++
|
UTF-8
|
C++
| false
| false
| 4,385
|
hpp
|
dataset_dimensions.hpp
|
// Copyright (c) 2013-2014 Christopher Hinz
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef ECHELON_HDF5_DATASET_DIMENSIONS_HPP
#define ECHELON_HDF5_DATASET_DIMENSIONS_HPP
#include <echelon/hdf5/type.hpp>
#include <echelon/hdf5/type_factory.hpp>
#include <echelon/hdf5/object.hpp>
#include <echelon/hdf5/dimension_scale.hpp>
#include <hdf5.h> // hsize_t
#include <vector>
#include <string>
#include <cstddef>
namespace echelon
{
namespace hdf5
{
/** \brief Handle to a dataset dimension
*/
class dimension
{
public:
dimension(const dataset& associated_dataset_, std::size_t index_);
/** \brief Attach a new dimension scale to this dimension.
*
* \param scale_name Name of the new dimension scale
* \param location Location of the new dataset
* \param dataset_name Name of the dimension scale's dataset
* \param datatype Datatype of the new dimension scale
* \param extent Extent of the dimension scale
*
* \return a handle to the new dimension scale.
*/
dimension_scale attach_dimension_scale(const std::string& scale_name, object location,
const std::string& dataset_name, const type& datatype,
const std::vector<hsize_t>& extent);
/** \brief Attach a new dimension scale to this dimension.
*
* \param scale_name Name of the new dimension scale
* \param location Location of the new dataset
* \param dataset_name Name of the dimension scale's dataset
* \param extent Extent of the dimension scale
*
* \tparam T C++ type, which should be used to determine
* the dimension scale's value typele
*
* \return a handle to the new dimension scale.
*/
template <typename T>
dimension_scale attach_dimension_scale(const std::string& scale_name, object location,
const std::string& dataset_name,
const std::vector<hsize_t>& extent)
{
return attach_dimension_scale(scale_name, location, dataset_name, get_hdf5_type<T>(),
extent);
}
/** \brief The label of the dimension.
*/
std::string label() const;
/** \brief Relabel the dimension.
*
* \param new_label New label of the dimension
*/
void relabel(const std::string& new_label);
/** \brief The extend of the dimension.
*/
hsize_t extend() const;
private:
const dataset* associated_dataset_;
std::size_t index_;
};
/** \brief Accessor class for the dimensions of a dataset
*/
class dataset_dimensions
{
public:
/** \brief Type of the iterator over all dataset dimensions
*/
typedef std::vector<dimension>::iterator iterator;
/** \brief Type of the iterator over all dataset dimensions
*/
typedef std::vector<dimension>::const_iterator const_iterator;
dataset_dimensions(const dataset& associated_dataset_, std::size_t rank_);
/** \brief Access a dimension by index.
*
* \param index Index of the dimension
*
* \return a handle to the specified dimension.
*/
dimension& operator[](std::size_t index)
{
return dimensions_[index];
}
/** \brief Access a dimension by index.
*
* \param index Index of the dimension
*
* \return a handle to the specified dimension.
*/
const dimension& operator[](std::size_t index) const
{
return dimensions_[index];
}
/** \brief Iterator pointing to the first dimension
*/
iterator begin()
{
return dimensions_.begin();
}
/** \brief Iterator pointing just after the last dimension
*/
iterator end()
{
return dimensions_.end();
}
/** \brief Iterator pointing to the first dimension
*/
const_iterator begin() const
{
return dimensions_.begin();
}
/** \brief Iterator pointing just after the last dimension
*/
const_iterator end() const
{
return dimensions_.end();
}
std::size_t count() const;
private:
std::vector<dimension> dimensions_;
};
}
}
#endif
|
260aa82f66c815652bff6dbb8db59d0c421ed4bc
|
ca74848e60e1a86279cba5b527f197680ae1c487
|
/src/libsk/add_root_ca_entry.cc
|
85e6046e80b9aa13a449064f395ba2ce0d8dd41a
|
[] |
no_license
|
EFForg/sovereign-keys
|
72d61c48325b80b0bc5ed31612d7797757266149
|
423a664fe5a3f2418520d51faad0e053c8642baa
|
refs/heads/master
| 2020-03-21T03:54:21.278926
| 2012-08-01T03:07:17
| 2012-08-01T03:07:17
| 138,080,343
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 461
|
cc
|
add_root_ca_entry.cc
|
// Copyright 2012 the SK authors. All rights reserved.
#include "add_root_ca_entry.h"
#include "add_root_ca_descriptor.h"
namespace sk {
AddRootCAEntry::AddRootCAEntry(int version)
: LogEntry(GetDescriptor(version)) {
}
AddRootCAEntry::~AddRootCAEntry() {
}
// static
const AddRootCADescriptor* AddRootCAEntry::GetDescriptor(int version) {
static AddRootCADescriptor desc(1);
if (version == 1)
return &desc;
return NULL;
}
} // namespace sk
|
ac206427a2fbf810c771d43b5b66da77d4435e79
|
5369d02ed95b7b32d412df533247c2d26c7a768c
|
/341/proj3/fptr.cpp
|
e235c8a56b4c3017b99b01d69691a0d3ac628cf1
|
[] |
no_license
|
mcdyl1/Projects
|
304a6b7b2b74fcf7b5409f9eb6fc9e1b1d3ea803
|
2b83415935ae365a3d1fe4b1d82363afc35cbeb9
|
refs/heads/master
| 2022-10-13T07:24:41.613676
| 2020-06-08T18:55:46
| 2020-06-08T18:55:46
| 167,740,105
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,511
|
cpp
|
fptr.cpp
|
// File: fptr.cpp
//
// CMSC 341 Fall 2017
//
// Simple use of function pointers
//
#include <iostream>
using namespace std ;
// An example function
//
int add3(int x) {
return x + 3 ;
}
// Another function that has same
// signature as add3()
//
int add5(int x) {
return x + 5 ;
}
// function that takes two parameters
//
int addpair3(int x, int y) {
return x + y + 3 ;
}
// Another function that has same
// signature as addpair3()
//
int addpair5(int x, int y) {
return x + y + 5 ;
}
int main() {
// Declare function pointer named "fptr" that can
// point to functions that take an int parameter
// and returns an int.
//
int (*fptr)(int ) ;
int n ;
// use fptr to invoke add3
//
fptr = add3 ; // assigns function to function pointer
n = fptr(8) ;
cout << "n = " << n << endl ; // should be 11
// use fptr to invoke add5
//
fptr = add5 ; // assigns function to function pointer
n = fptr(8) ;
cout << "n = " << n << endl ; // should be 13
// Declare a function pointer named "anotherFptr"
// that points to a function that takes two
// int parameters and returns an int.
//
int (*anotherFptr) (int, int) ;
anotherFptr = addpair3 ; // function pointer assignment
n = anotherFptr(17, 13) ;
cout << "n = " << n << endl ; // should be 33
anotherFptr = addpair5 ; // function pointer assignment
n = anotherFptr(17, 13) ;
cout << "n = " << n << endl ; // should be 35
return 0 ;
}
|
03aba6da34b276fded48872f3b3b0d2d36a5e558
|
99f19b9e53faa4d078829deb7124b0b500c060e8
|
/MPI-Convolution.cpp
|
c08b894ac39cf999f953f97ab664ba9737dac116
|
[] |
no_license
|
GreyVader1993/MPI
|
03e764bdcaf9cf4d91dd7f26c4dede9b41486210
|
5de6b910b56c9ac5044e74000355c82064642a5e
|
refs/heads/main
| 2022-12-15T07:23:11.383348
| 2020-09-21T19:50:46
| 2020-09-21T19:50:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,620
|
cpp
|
MPI-Convolution.cpp
|
//CONVOLUTION
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include "mpi.h"
class conv
{
public:
int y[10];
void calculate(int m, int n, int *x, int *h);
void display();
conv()
{
for (int i = 0; i < 9; i++)
y[i] = 0;
}
};
void conv::calculate(int m, int n, int x[5], int h[5])
{
int i, j;
for (i = 0; i < m + n - 1; i++)
{
y[i] = 0;
for (j = 0; j <= i; j++)
{
y[i] = y[i] + (x[j] * h[i - j]);
//printf("\n%d",y[i]);
}
}
//for(int k=0;k<9;k++)
// printf("\n%d",y[k]);
//for(int k=0;k<5;k++)
// printf("\n%d",h[k]);
}
void conv::display()
{
for (int i = 0; i < 9; i++)
printf("\n The Value of output y[%d]=
%d",i,y[i]);
}
int main()
{
int input, rank, key = 0, rightSize = 5, leftSize = 5, found = 0;
int right[10] = {1, 2, 3, 4, 5};
int left[10] = {1, 2, 3, 4, 5};
int flag = 0;
char check;
MPI::Status status;
conv c;
MPI::Init();
rank = MPI::COMM_WORLD.Get_rank();
if (rank == 0)
{
//MPI::COMM_WORLD.Recv(&rightSize, 1, MPI_INT, 1, 100,
status);
printf("receving from 1");
MPI::COMM_WORLD.Recv(&right, rightSize, MPI_INT, 1, 101,
status);
//MPI::COMM_WORLD.Recv(&leftSize, 1, MPI_INT,2, 200,
status);
printf("receving from 2");
MPI::COMM_WORLD.Recv(&left, leftSize, MPI_INT, 2, 201,
status);
c.calculate(5, 5, right, left);
for (int i = 0; i < 9; i++)
printf("\n The Value of output y[%d]=%d", i, c.y[i]);
}
//MPI::COMM_WORLD.Barrier();
//Right Side of the tree
if (rank == 1)
{
printf("sending from 1");
//MPI::COMM_WORLD.Recv(&rightSize, 1, MPI_INT, 0, 100,
status);
//MPI::COMM_WORLD.Recv(&right, rightSize, MPI_INT, 0, 101,
status);
//right[]={1,2,3,4,5};
//for(int i=0;i<10;i++)
//{
// right[i]=i*2;
//}
//MPI::COMM_WORLD.Send(&rightSize,1,MPI::INT,0,100);
MPI::COMM_WORLD.Send(&right, rightSize, MPI::INT, 0, 101);
/*std::cout<<"\n\nRight Side (Processor "<<rank<<")\n";
for(int i=0;i<rightSize;i++)
{
std::cout<<right[i]<<"\n";
}*/
}
//Left Side of the tree
if (rank == 2)
{
printf("sending from 2");
//for(int i=0;i<10;i++)
//{
// left[i]=i*4;
//}
//left[5]={1,2,3,4,5};
//MPI::COMM_WORLD.Send(&leftSize,1,MPI::INT,0,200);
MPI::COMM_WORLD.Send(&left, leftSize, MPI::INT, 0, 201);
/*std::cout<<"\n\nRight Side (Processor "<<rank<<")\n";
for(int i=0;i<rightSize;i++)
{
std::cout<<right[i]<<"\n";
}*/
}
MPI::Finalize();
return 0;
}
|
b22daebae16fe9be82587f98f03e415bd071b9fe
|
70bdd0066f99a1a122d0b08d17b58fd0bc29efba
|
/onevariable_pdp/chains.cpp
|
a66c6653aa8776328b3386e7d6be9c2f0cee10b7
|
[] |
no_license
|
gopalkedia71/autoparallel
|
ac11b2b8cdc85eb82d1e1f365a38356dc6903ff1
|
b56978b3fd60b3a89c1fce639dfd168be8f20a8b
|
refs/heads/master
| 2020-04-10T08:45:33.838615
| 2017-01-28T13:13:16
| 2017-01-28T13:13:16
| 68,215,025
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,203
|
cpp
|
chains.cpp
|
#include<iostream>
#include "solutions.hpp"
#include<math.h>
#include "solutions.cpp"
using namespace std;
void chains(int a,int b,int c,int l1,int u1,int &t1,int &t2,int &x,int &y,bool &ifposs)
{
int x0 = 0;
int y0 = 0;
solution(a,b,c,x0,y0);
x = x0;y = y0;
float t1_x,t2_x;
float t1_y,t2_y;
ifposs = true;
if(b>0)
{
t1_x = ceil(float(x-u1)/float(b));
t2_x = floor(float(x-l1)/float(b));
}
else
{
t1_x = ceil(float(x-l1)/float(b));
t2_x = floor(float(x-u1)/float(b));
}
if(a>0)
{
t1_y = ceil(float(l1-y)/float(a));
t2_y = floor(float(u1-y)/float(a));
}
else
{
t1_y = ceil(float(u1-y)/float(a));
t2_y = floor(float(l1-y)/float(a));
}
if(t1_x <= t1_y)
{
t1 = t1_y;
}
else
{
t1 = t1_x;
}
if(t2_x <= t2_y)
{
t2 = t2_x;
}
else
{
t2 = t2_y;
}
if(t1>t2)
{
ifposs = false;
}
}
|
53c31a190b3c877e4f6b65256cca37aac8d4c55b
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5706278382862336_0/C++/sankalpbihani/curr.cpp
|
159337d6cf8f5a06dc26cfa7c6e1975f6dc5b5bb
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,237
|
cpp
|
curr.cpp
|
#include<bits/stdc++.h>
using namespace std;
typedef long long L;
L gcd(L p, L q) {
if(q==0)
return p;
else
return gcd(q, p%q);
}
L log2(L x) {
if(x<=1)
return 0;
else
return 1+log2(x/2);
}
bool check(L x) {
if(x!=0 and x%2==0) {
return check(x/2);
} else {
if(x==1)
return true;
else
return false;
}
}
L func(L p, L q) {
if(p==1 and q==1) {
return 0;
} else if(p > q/2) {
return 1;
} else {
return 1 + func(p,q/2);
}
}
int main()
{
#ifndef ONLINE_JUDGE
freopen("int.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif // ONLINE_JUDGE
ios_base::sync_with_stdio(false);
L T;
cin>>T;
for(L t=1; t<=T; t++) {
L p,q;
char ch;
cin>>p>>ch>>q;
L g = gcd(p,q);
p=p/g;
q=q/g;
if(p!=0 && p<=q && check(q)) {
L ans;
ans=func(p,q);
cout<<"Case #"<<t<<": "<<ans<<endl;
} else {
cout<<"Case #"<<t<<": "<<"impossible"<<endl;
}
}
return 0;
}
|
f4a29bdfc9243183d2ab70b72d918031129f0785
|
6cffd9701f69a41a1245c993d6b51d4f9e095449
|
/T_Area/T_Area.h
|
fb33a87bc2bf9f61a3eb684036b94030c7e84018
|
[] |
no_license
|
oldmadjackal/Geo_3000
|
bb9ea259082d2be822336e7c346aef35c841c9e8
|
429fe18fe10a209fe047c13728e765fb043e22bb
|
refs/heads/master
| 2021-01-13T03:45:28.108418
| 2017-03-12T10:18:04
| 2017-03-12T10:18:04
| 77,243,687
| 0
| 0
| null | null | null | null |
WINDOWS-1251
|
C++
| false
| false
| 11,453
|
h
|
T_Area.h
|
/********************************************************************/
/* */
/* МОДУЛЬ ЗАДАЧИ "АНАЛИЗ ПОВЕРХНОСТИ" */
/* */
/********************************************************************/
#ifdef T_AREA_EXPORTS
#define T_AREA_API __declspec(dllexport)
#else
#define T_AREA_API __declspec(dllimport)
#endif
/*---------------------------------------------- Параметры генерации */
/*------------------------------------- Описание записей индикаторов */
#define _ANGLES_MAX 5
#define _ANGLES_LIST_MAX 8
#define _IND_MAX 128
typedef struct { /* Описание углового диапазона */
double a_lst[_ANGLES_MAX] ;
int a_lst_cnt ;
double a_min ;
double a_max ;
char a_lst_text[128] ;
char a_min_text[32] ;
char a_max_text[32] ;
int type ;
#define _INLIST_RANGE 0
#define _OR_RANGE 1
#define _AND_RANGE 2
int base ;
#define _ABSOLUTE_VALUE 0
#define _NORMAL_VALUE 1
} RSS_Module_Area_Range ;
typedef struct { /* Управление сканир.углового диапазона */
RSS_Module_Area_Range *range ;
double *angle ;
int idx ;
int idx_max ;
int type ;
//#define _OR_RANGE 1
//#define _AND_RANGE 2
} RSS_Module_Area_Scan ;
typedef struct { /* Описание 3D углового сектора */
int use_flag ;
int done_flag ;
COLORREF color ;
RSS_Module_Area_Range azim_range ;
RSS_Module_Area_Range elev_range ;
RSS_Module_Area_Range roll_range ;
int priority_type ;
#define _A_E_R_PRIO 0
#define _A_R_E_PRIO 1
#define _E_A_R_PRIO 2
#define _E_R_A_PRIO 3
#define _R_A_E_PRIO 4
#define _R_E_A_PRIO 5
RSS_Module_Area_Scan scan[3] ;
} RSS_Module_Area_Angles ;
typedef struct {
char name[128] ; /* Название */
int type ; /* Тип индикатора: */
#define _FLAT_IND 0 /* Плоский */
#define _CYLINDER_IND 1 /* Цилиндрический */
RSS_Point base ; /* Базовая точка */
double size1 ; /* Размерные параметры */
double size2 ;
double cell ; /* Размер ячейки */
RSS_Module_Area_Angles angles[_ANGLES_LIST_MAX] ; /* Таблица угловых 3D-секторов */
double angle_step ; /* Шаг сканировния углов */
int angles_idx ; /* Индекс рабочего 3D-секторa */
COLORREF *data ; /* Индикаторный список */
int data_cnt ;
// int cnt_1 ;
int move_flag ; /* Флаг подготовки индикатора текущего состояния */
int formed_flag ; /* Флаг сформированного индикатора */
class RSS_Module_Area *context ; /* Контекст привязки */
int idx ; /* Индекс привязки */
int dlist1_idx ; /* Индексы дисплейных списков */
int dlist2_idx ;
} RSS_Module_Area_Indicator ;
/*-------------------- Описание класса объекта "Поверхность анализа" */
class T_AREA_API RSS_Object_Area : public RSS_Object {
public:
RSS_Module_Area_Indicator *Indicator ; /* Ссылка на индикатор */
public:
virtual void vFree (void) ; /* Освободить ресурсы */
virtual void vWriteSave(std::string *) ; /* Записать данные в строку */
RSS_Object_Area() ; /* Конструктор */
~RSS_Object_Area() ; /* Деструктор */
} ;
/*---------------------- Описание класса задачи "Анализ поверхности" */
class T_AREA_API RSS_Module_Area : public RSS_Kernel {
public:
static
struct RSS_Module_Area_instr *mInstrList ; /* Список команд */
RSS_Module_Area_Indicator *mContextObject ; /* Обьект 'контекстной' операции */
char mContextAction[64] ; /* Действие 'контекстной' операции */
HWND mIndListWnd ; /* Окно списка индикаторов */
RSS_Module_Area_Indicator *mIndicators[_IND_MAX] ; /* Список индикаторов */
RSS_Module_Area_Indicator *mIndicator_last ; /* Ссылак на последний созданный индикатор */
COLORREF mBadColor ; /* Цвет 'недоступности' */
COLORREF mGoodColor ; /* Цвет доступности */
COLORREF mScanColor ; /* Цвет 'подготовки' */
int mNoShow ; /* Флаг запрещения отрисовки на экран */
double mRange ; /* Размерный параметр */
public:
virtual int vExecuteCmd (const char *) ; /* Выполнить команду */
virtual void vShow (char *) ; /* Отобразить связанные данные */
virtual void vReadSave (std::string *) ; /* Чтение данных из строки */
virtual void vWriteSave (std::string *) ; /* Записать данные в строку */
virtual void vChangeContext (void) ; /* Выполнить действие в контексте потока */
public:
int cHelp (char *) ; /* Инструкция HELP */
int cCreate (char *) ; /* Инструкция CREATE */
int cCopy (char *) ; /* Инструкция COPY */
int cBase (char *) ; /* Инструкция BASE */
int cAngle (char *) ; /* Инструкция ANGLE */
int cSize (char *) ; /* Инструкция SIZE */
int cTable (char *) ; /* Инструкция TABLE */
int cExecute (char *) ; /* Инструкция EXECUTE */
int cIndicatorList (char *) ; /* Инструкция INDICATOR_LIST */
int cIndicatorKill (char *) ; /* Инструкция INDICATOR_KILL */
#define INDICATOR RSS_Module_Area_Indicator
INDICATOR *FindIndicator (char *) ; /* Поиск индикатора по имени */
void iIndicatorShow (INDICATOR *) ; /* Отображение индикатора на сцене */
void iIndicatorShow_ (INDICATOR *) ; /* Отображение индикатора с передачей контекста */
void iIndicatorHide (INDICATOR *) ; /* Удаление индикатора из сцены */
void iIndicatorKill (INDICATOR *) ; /* Удаление индикатора */
int iIndicatorAlloc (INDICATOR *) ; /* Размещение ресурсов индикатора */
char *iErrorDecode (int) ; /* Расшифровка кода ошибки */
int iReadTableFile (INDICATOR *,
char * ) ;
int iGetNextPoint (INDICATOR *,
int, RSS_Point *,
int *, COLORREF *, int) ;
void iPrepareAngles (INDICATOR *,
RSS_Point * ) ;
void iResetAngles (INDICATOR *) ;
int iAnalisePrevious(INDICATOR *, int,
COLORREF * ) ;
void iGetNextAngle (INDICATOR *) ;
#undef INDICATOR
public:
RSS_Module_Area() ; /* Конструктор */
~RSS_Module_Area() ; /* Деструктор */
} ;
/*-------------------------------------------- Инструкции управления */
struct RSS_Module_Area_instr {
char *name_full ; /* Полное имя команды */
char *name_shrt ; /* Короткое имя команды */
char *help_row ; /* HELP - строка */
char *help_full ; /* HELP - полный */
int (RSS_Module_Area::*process)(char *) ; /* Процедура выполнения команды */
} ;
/*--------------------------------------- Команды диалогового обмена */
#define _TASK_AREA_ADD_INDICATOR 1
#define _TASK_AREA_KILL_INDICATOR 2
/*--------------------------------------------- Диалоговые процедуты */
/* Файл T_Area.cpp */
RSS_Kernel *GetTaskAreaEntry(void) ;
/* Файл T_Area_dialog.cpp */
BOOL CALLBACK Task_Area_Help_dialog (HWND, UINT, WPARAM, LPARAM) ;
BOOL CALLBACK Task_Area_IList_dialog (HWND, UINT, WPARAM, LPARAM) ;
BOOL CALLBACK Task_Area_Angles_dialog(HWND, UINT, WPARAM, LPARAM) ;
/* Файл T_Area_color.cpp */
COLORREF Task_Area_color_choice (COLORREF) ;
COLORREF Task_Area_set_color (COLORREF) ;
BOOL CALLBACK Task_Area_color_dialog (HWND, UINT, WPARAM, LPARAM) ;
|
be02c2e8dffd43827bced5bfb736076bb19ac430
|
c94e8af6187b75677b784eccc10006a9c21fb270
|
/trees/pointer.cpp
|
6a3ab4eb9b8cf081ab446571dbe87dedddfa454b
|
[] |
no_license
|
jdgarcia01/data_structures
|
401e5be37974924636ddb76c40116bbf03f25755
|
5b39fce824e3defaaacb0fa7c499afa2b9d2020a
|
refs/heads/master
| 2021-09-08T23:09:23.505648
| 2018-03-12T19:39:59
| 2018-03-12T19:39:59
| 112,858,027
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 230
|
cpp
|
pointer.cpp
|
#include <iostream>
#include <cstddef>
int main(int argc, char **argv){
int *p = NULL;
int ival = 43;
std::cout << p << std::endl;
p = &ival;
std::cout << *p << std::endl;
}
|
b4444e0dc791c3aa2256065fb3db648be4675726
|
3c5b079da3c442504b9e71f8626e7407313aa4cf
|
/Second Semester/March 25, 2018/primjer10.cpp
|
7d97ce3133063b9f3a4ed6aa0108f84016d3217f
|
[] |
no_license
|
muhamedkarajic/functional-programming
|
b1fc5eebdbcc989afc9ed6fddc535f7eae7bc79b
|
881476a30320116d4c57eb44b081faf24c29b345
|
refs/heads/master
| 2023-04-21T06:34:42.162240
| 2021-05-20T23:35:06
| 2021-05-20T23:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,766
|
cpp
|
primjer10.cpp
|
#include <iostream>
using namespace std;
void unos(int **matrica, int red, int kolona)
{
for (size_t i = 0; i < red; i++)
{
for (size_t j = 0; j < kolona; j++)
{
cout << "[" << i << "][" << j << "] = ";
cin >> matrica[i][j];
}
}
system("CLS");
}
void ispis(int **matrica, int red, int kolona)
{
for (size_t i = 0; i < red; i++)
{
for (size_t j = 0; j < kolona; j++)
{
cout << matrica[i][j] << " ";
}
cout << endl;
}
cout << endl;
}
void ispisZbir(int **matrica, int **drugaMatrica, int red, int kolona)
{
for (size_t i = 0; i < red; i++)
{
for (size_t j = 0; j < kolona; j++)
{
cout << matrica[i][j] + drugaMatrica[i][j] << " ";
}
cout << endl;
}
cout << endl;
}
void dealokacijaMatrice(int **matrica, int red)
{
for (size_t i = 0; i < red; i++)
delete matrica[i];
delete[] matrica;
matrica = NULL;
}
int main()
{
//Napisite program u kojem cete deklarisati 2 dinamicka dvodimenzionalna niza,
//o velicini matrice odlucuje korisnik,
//kreirati funkcije za: unos, ispis, sumu elemenata matrice
int red = 5, kolona = 2;
int **matrica = new int *[red];
int **drugaMatrica = new int *[red];
for (size_t i = 0; i < red; i++)
{
matrica[i] = new int[kolona];
drugaMatrica[i] = new int[kolona];
}
cout << "Unos matrice: " << endl;
unos(matrica, red, kolona);
cout << "Unos druge matrice: " << endl;
unos(drugaMatrica, red, kolona);
cout << "Ispis matrice: " << endl;
ispis(matrica, red, kolona);
cout << "Ispis druge matrice: " << endl;
ispis(drugaMatrica, red, kolona);
cout << "Ispis zbira matrica: " << endl;
ispisZbir(matrica, drugaMatrica, red, kolona);
//dealokacija
dealokacijaMatrice(matrica, red);
dealokacijaMatrice(drugaMatrica, red);
system("PAUSE");
return 0;
}
|
77cc5688832fa2b76ffbb7b9bc527f6e0077a1d7
|
30092b6d0f13018ff5f35785a91a33dc1ab034d9
|
/Pacman/Classes/Model/Spirit/Spirit.cpp
|
1500b818ff971ac2904c16fced67d43cf59ed6f8
|
[
"BSD-3-Clause"
] |
permissive
|
nonothing/pac-man-cocos2dx
|
f551a31d317c7cd571afcfa867a7816faacd8bf0
|
0d244893e67b51cd1497224948cc8a9aa76be299
|
refs/heads/master
| 2021-01-20T12:21:44.975531
| 2016-11-03T02:56:39
| 2016-11-03T02:56:39
| 21,959,875
| 5
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,194
|
cpp
|
Spirit.cpp
|
#include "model/Spirit/Spirit.h"
#include "model/World.h"
Spirit::Spirit(PPoint* position, ETexture texture, int width, int height, Level* level) :
WorldObjectMove(position, texture, width, height) {
level_ = level;
setState(ATTACK);
setCountStep(0);
createMap(level_->getWidth(), level_->getHeight());
countCollision_ = 0;
}
void Spirit::refresh(BricksVec bricks) {
if (getState() == DEAD) {
setState(collidesWithRefresh(getBounds(), bricks));
}
}
int Spirit::collidesWithRefresh(PRectangle* rect, BricksVec bricks) {
return find_if(bricks.begin(), bricks.end(), [rect](Brick* brick){return brick->getBounds()->intersects(rect) && brick->getTextureName() == ENone;}) != bricks.end() ? ATTACK : DEAD;
}
bool Spirit::collidesWithLevel(PRectangle* rect, BricksVec bricks) {
return find_if(bricks.begin(), bricks.end(), [rect](Brick* brick){return brick->getBounds()->intersects(rect) && brick->getTextureName() > ECocos;}) != bricks.end();
}
void Spirit::go(BricksVec bricks, Player* player, PPoint* point) {
clearMap();
ai(bricks, player, point);
sprite_->setPosition(position_->getX() + 15,position_->getY() + 15);
}
void Spirit::onLoadImageAttack() {
switch (direction_) {
case LEFT:
setTexture(left());
break;
case RIGHT:
setTexture(right());
break;
case DOWN:
setTexture(down());
break;
case UP:
setTexture(up());
break;
}
}
void Spirit::clearMap(){
for (int row = 0; row < level_->getWidth(); row++) {
for (int column = 0; column < level_->getHeight(); column++) {
map[row][column] = 0;
}
}
}
void Spirit::onLoadImageDead() {
switch (direction_) {
case LEFT:
setTexture(EOrbLeft);
break;
case RIGHT:
setTexture(EOrbRight);
break;
case UP:
setTexture(EOrbUp);
break;
case DOWN:
setTexture(EOrbDown);
break;
}
}
void Spirit::onLoadImageDefence(bool isWhite) {
setTexture(isWhite ? ESpiritDefenceWhite : EspiritDefence);
}
void Spirit::onLoadImage() {
switch (getState()) {
case ATTACK:
onLoadImageAttack();
break;
case DEFENCE:
onLoadImageDefence(leftDefence_);
break;
case DEAD:
onLoadImageDead();
break;
}
}
void Spirit::move(BricksVec bricks) {
onLoadImage();
refresh(bricks);
onMove(direction_);
if (!collidesWithLevel(getBounds(), bricks)) {
setPosition(getBounds());
countCollision_ = 0;
} else {
countCollision_++;
if(countCollision_ > 10){
changeDirection(direction_);
countCollision_ = 0;
}
}
countStep_++;
}
void Spirit::findDirection(BricksVec bricks, PPoint* point) {
potencialMap(point, bricks);
if (getCountStep() >= (30 / SPEED_)) {
for(int i=1 ; i <= 4; i++) {
moveTo(getMap(), (Direction)i);
}
setCountStep(0);
}
}
void Spirit::moveTo(int** map, Direction dir) {
if (map[getPointX() + getHorizontalOffset(dir)][getPointY() + getVerticalOffset(dir)] < map[getPointX()][getPointY()] + 1) {
setDirection(dir);
}
}
int Spirit::getCountStep() {
return countStep_;
}
void Spirit::setCountStep(int countStep) {
this->countStep_ = countStep;
}
void Spirit::setDefence(bool isDefence) {
this->leftDefence_ = isDefence;
}
void Spirit::createMap(int width, int height) {
this->width_ = width;
this->height_ = height;
map = new int*[width];
for (int i=0; i<width; i++)
map[i] = new int[height];
}
void Spirit::potencialMap(PPoint* point, vector<Brick*> bricks) {
inverseMap(bricks);
int count = 0;
step = 2;
map[point->getX() / 30][point->getY() / 30] = 1;
if (getState() != DEAD) {
changeMap();
}
while (count < 40) {
for (int row = 0; row < width_; row++) {
for (int column = 0; column < height_; column++) {
if (map[row][column] == step - 1) {
if (row > 1) {
if (map[row - 1][column] == 0) {
map[row - 1][column] = step;
}
}
if (row < width_ - 1) {
if (map[row + 1][column] == 0) {
map[row + 1][column] = step;
}
}
if (column > 1) {
if (map[row][column - 1] == 0) {
map[row][column - 1] = step;
}
}
if (column < height_ - 1) {
if (map[row][column + 1] == 0) {
map[row][column + 1] = step;
}
}
}
}
}
step++;
count++;
}
}
void Spirit::changeMap() {
if (getDirection() == LEFT) {
map[(getPointX()) + 1][getPointY()] = WALL;
}
if (getDirection() == RIGHT) {
map[(getPointX()) - 1][getPointY()] = WALL;
}
if (getDirection() == DOWN) {
map[getPointX()][(getPointY()) + 1] = WALL;
}
if (getDirection() == UP) {
map[getPointX()][(getPointY()) - 1] = WALL;
}
}
void Spirit::inverseMap(BricksVec bricks) {
int row = 0;
int column = 0;
for(auto brick: bricks) {
if(brick->getTextureName() <= ECocos) {
map[row][column] = 0;
} else {
map[row][column] = WALL;
}
row++;
if (row == width_) {
row = 0;
column++;
}
if (column == height_) {
column = 0;
}
}
}
int** Spirit::getMap() {
return map;
}
void Spirit::changeDirection(int dir) {
int direction = dir + 1;
if(direction > RIGHT) direction = UP;
direction_ = direction;
}
int Spirit::getHorizontalOffset(Direction dir) {
return dir == RIGHT ? 1 : dir == LEFT ? -1 : 0;
}
int Spirit::getVerticalOffset(Direction dir) {
return dir == UP ? 1 : dir == DOWN ? -1 : 0;
}
|
a96321b450df8ec3cde0f8a89c5fc6e87a8c0c0e
|
d81f77b9216c2a0b9c5f08a42fbd0eeaebc546df
|
/GCPAssignment/GCPAssignment/Camera.h
|
ecb5d60a717436735eadf732fe8e7e6b76142f6b
|
[] |
no_license
|
samuelbrown3199/GraphicsComputationProgramming
|
c71ea8e5721a201212e9c5438f12eb58cb4f7029
|
a88b428eb0b29a983abc179b25401b2fc6b6f1d9
|
refs/heads/main
| 2023-01-18T15:49:41.809816
| 2020-12-05T15:20:56
| 2020-12-05T15:20:56
| 302,592,846
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 531
|
h
|
Camera.h
|
#pragma once
#ifndef CAMERA_H_
#define CAMERA_H_
#include <iostream>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include <glm/gtx/transform.hpp>
#include "InputManager.h"
class Camera
{
private:
bool firstMouse = true;
float pitch = 0.0f, yaw = -90.0f;
const float movementSpeed = 0.1f;
glm::vec2 oldMousePos, newMousePos;
glm::vec3 forward;
glm::vec3 up;
public:
glm::vec3 position;
int time = 0;
Camera();
void CameraControls();
void MouseMovement();
void UpdateCamera();
glm::mat4 view;
};
#endif
|
5217a10acbe77ef28ff1a793710f2d7d24d8b232
|
fa55d8ed32564195f2687d1e18b99f80c5683073
|
/lbc_lintcode/442-implement-trie.cc
|
25406ad1f96ceb8f87fc23585b336649b79a3186
|
[] |
no_license
|
TenFifteen/SummerCamp
|
1841bf1bd212938cee818540658185cd3e429f0c
|
383b9321eee9e0721772f93a897c890f737f2eff
|
refs/heads/master
| 2020-04-05T23:48:01.393256
| 2018-03-11T12:37:38
| 2018-03-11T12:37:38
| 38,595,086
| 9
| 4
| null | 2016-07-18T14:21:15
| 2015-07-06T03:15:55
|
C++
|
UTF-8
|
C++
| false
| false
| 1,636
|
cc
|
442-implement-trie.cc
|
/*
题目:27 % Implement Trie 中等
题目大意:
实现一个trie树
解题思路:
见代码
遇到的问题:
没有问题。
*/
/**
* Your Trie object will be instantiated and called as such:
* Trie trie;
* trie.insert("lintcode");
* trie.search("lint"); will return false
* trie.startsWith("lint"); will return true
*/
class TrieNode {
public:
unordered_map<char, TrieNode *> next;
bool isWord;
// Initialize your data structure here.
TrieNode() {
isWord = false;
}
};
class Trie {
public:
Trie() {
root = new TrieNode();
}
// Inserts a word into the trie.
void insert(string word) {
auto cur = root;
for (int i = 0; i < word.size(); ++i) {
if (cur->next.find(word[i]) == cur->next.end()) {
cur->next[word[i]] = new TrieNode();
}
cur = cur->next[word[i]];
}
cur->isWord = true;
}
// Returns if the word is in the trie.
bool search(string word) {
auto cur = root;
for (int i = 0; i < word.size(); ++i) {
if (cur->next.find(word[i]) == cur->next.end()) return false;
cur = cur->next[word[i]];
}
return cur->isWord;
}
// Returns if there is any word in the trie
// that starts with the given prefix.
bool startsWith(string prefix) {
auto cur = root;
for (int i = 0; i < prefix.size(); ++i) {
if (cur->next.find(prefix[i]) == cur->next.end()) return false;
cur = cur->next[prefix[i]];
}
return true;
}
private:
TrieNode* root;
};
|
3d04c6d22bfa17cc5a3eb241b6d63ddf3df9e608
|
9f48878caa37ac5f2ccf938fc476efa47c89c644
|
/tests/Unit/PointwiseFunctions/MathFunctions/Test_TensorProduct.cpp
|
6db711401cfd698256142280b471f87a141b3c9f
|
[
"MIT"
] |
permissive
|
sxs-collaboration/spectre
|
34f7733ab4c75dbca2f432028145fed110c9ef24
|
96f573cf158201f712da2bfb3378edf497a35a0d
|
refs/heads/develop
| 2023-08-19T11:18:18.465609
| 2023-08-19T04:24:25
| 2023-08-19T04:24:25
| 87,570,510
| 149
| 190
|
NOASSERTION
| 2023-09-14T20:10:35
| 2017-04-07T17:28:20
|
C++
|
UTF-8
|
C++
| false
| false
| 10,089
|
cpp
|
Test_TensorProduct.cpp
|
// Distributed under the MIT License.
// See LICENSE.txt for details.
#include "Framework/TestingFramework.hpp"
#include <array>
#include <cstddef>
#include <memory>
#include <pup.h>
#include <string>
#include <utility>
#include "DataStructures/DataBox/Prefixes.hpp" // IWYU pragma: keep
#include "DataStructures/DataBox/Tag.hpp"
#include "DataStructures/Tensor/Tensor.hpp"
#include "DataStructures/Variables.hpp"
#include "Domain/CoordinateMaps/Affine.hpp"
#include "Domain/CoordinateMaps/CoordinateMap.hpp"
#include "Domain/CoordinateMaps/CoordinateMap.tpp"
#include "Domain/CoordinateMaps/ProductMaps.hpp"
#include "Domain/CoordinateMaps/ProductMaps.tpp"
#include "Framework/TestHelpers.hpp"
#include "NumericalAlgorithms/LinearOperators/PartialDerivatives.tpp"
#include "NumericalAlgorithms/Spectral/LogicalCoordinates.hpp"
#include "NumericalAlgorithms/Spectral/Mesh.hpp"
#include "NumericalAlgorithms/Spectral/Spectral.hpp"
#include "PointwiseFunctions/MathFunctions/Gaussian.hpp"
#include "PointwiseFunctions/MathFunctions/MathFunction.hpp" // IWYU pragma: keep
#include "PointwiseFunctions/MathFunctions/PowX.hpp"
#include "PointwiseFunctions/MathFunctions/Sinusoid.hpp"
#include "PointwiseFunctions/MathFunctions/TensorProduct.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/MakeWithValue.hpp"
#include "Utilities/TMPL.hpp"
// IWYU pragma: no_forward_declare Tags::deriv
class DataVector;
template <size_t VolumeDim, typename Fr>
class MathFunction;
namespace {
using Affine = domain::CoordinateMaps::Affine;
using Affine2D = domain::CoordinateMaps::ProductOf2Maps<Affine, Affine>;
using Affine3D = domain::CoordinateMaps::ProductOf3Maps<Affine, Affine, Affine>;
template <size_t VolumeDim>
auto make_affine_map();
template <>
auto make_affine_map<1>() {
return domain::make_coordinate_map<Frame::ElementLogical, Frame::Inertial>(
Affine{-1.0, 1.0, -0.3, 0.7});
}
template <>
auto make_affine_map<2>() {
return domain::make_coordinate_map<Frame::ElementLogical, Frame::Inertial>(
Affine2D{Affine{-1.0, 1.0, -0.3, 0.7}, Affine{-1.0, 1.0, 0.3, 0.55}});
}
template <>
auto make_affine_map<3>() {
return domain::make_coordinate_map<Frame::ElementLogical, Frame::Inertial>(
Affine3D{Affine{-1.0, 1.0, -0.3, 0.7}, Affine{-1.0, 1.0, 0.3, 0.55},
Affine{-1.0, 1.0, 2.3, 2.8}});
}
template <typename T, size_t VolumeDim>
Scalar<T> expected_value(const tnsr::I<T, VolumeDim>& x,
const std::array<size_t, VolumeDim>& powers,
const double scale) {
auto result = make_with_value<Scalar<T>>(x, scale);
for (size_t d = 0; d < VolumeDim; ++d) {
result.get() *= pow(x.get(d), gsl::at(powers, d));
}
return result;
}
template <typename T, size_t VolumeDim>
tnsr::i<T, VolumeDim> expected_first_derivs(
const tnsr::I<T, VolumeDim>& x, const std::array<size_t, VolumeDim>& powers,
const double scale) {
auto result = make_with_value<tnsr::i<T, VolumeDim>>(x, scale);
for (size_t d = 0; d < VolumeDim; ++d) {
const size_t p = gsl::at(powers, d);
for (size_t i = 0; i < VolumeDim; ++i) {
if (d == i) {
if (0 == p) {
result.get(i) = 0.0;
} else {
result.get(i) *= p * pow(x.get(d), p - 1);
}
} else {
result.get(i) *= pow(x.get(d), p);
}
}
}
return result;
}
template <typename T, size_t VolumeDim>
tnsr::ii<T, VolumeDim> expected_second_derivs(
const tnsr::I<T, VolumeDim>& x, const std::array<size_t, VolumeDim>& powers,
const double scale) {
auto result = make_with_value<tnsr::ii<T, VolumeDim>>(x, scale);
for (size_t d = 0; d < VolumeDim; ++d) {
const size_t p = gsl::at(powers, d);
for (size_t i = 0; i < VolumeDim; ++i) {
if (d == i) {
if (2 > p) {
result.get(i, i) = 0.0;
} else {
result.get(i, i) *= p * (p - 1) * pow(x.get(d), p - 2);
}
} else {
result.get(i, i) *= pow(x.get(d), p);
}
for (size_t j = i + 1; j < VolumeDim; ++j) {
if (d == j or d == i) {
if (0 == p) {
result.get(i, j) = 0.0;
} else {
result.get(i, j) *= p * pow(x.get(d), p - 1);
}
} else {
result.get(i, j) *= pow(x.get(d), p);
}
}
}
}
return result;
}
template <size_t VolumeDim>
void test_tensor_product(
const Mesh<VolumeDim>& mesh, const double scale,
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, VolumeDim>&&
functions,
const std::array<size_t, VolumeDim>& powers) {
const auto coordinate_map = make_affine_map<VolumeDim>();
const auto x = coordinate_map(logical_coordinates(mesh));
MathFunctions::TensorProduct<VolumeDim> f(scale, std::move(functions));
CHECK_FALSE(f != f);
test_copy_semantics(f);
auto f_for_move = f;
test_move_semantics(std::move(f_for_move), f);
CHECK_ITERABLE_APPROX(f(x), expected_value(x, powers, scale));
CHECK_ITERABLE_APPROX(f.first_derivatives(x),
expected_first_derivs(x, powers, scale));
CHECK_ITERABLE_APPROX(f.second_derivatives(x),
expected_second_derivs(x, powers, scale));
tnsr::I<double, VolumeDim> point{2.2};
for (size_t d = 0; d < VolumeDim; ++d) {
point.get(d) += d * 1.7;
};
CHECK_ITERABLE_APPROX(f(point), expected_value(point, powers, scale));
CHECK_ITERABLE_APPROX(f.first_derivatives(point),
expected_first_derivs(point, powers, scale));
CHECK_ITERABLE_APPROX(f.second_derivatives(point),
expected_second_derivs(point, powers, scale));
}
struct Var1 : db::SimpleTag {
using type = Scalar<DataVector>;
static std::string name() { return "Var1"; }
};
template <size_t VolumeDim>
struct Var2 : db::SimpleTag {
using type = tnsr::i<DataVector, VolumeDim, Frame::Inertial>;
static std::string name() { return "Var2"; }
};
template <size_t VolumeDim>
using TwoVars = tmpl::list<Var1, Var2<VolumeDim>>;
template <size_t VolumeDim>
void test_with_numerical_derivatives(
const Mesh<VolumeDim>& mesh, const double scale,
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, VolumeDim>&&
functions) {
const auto coordinate_map = make_affine_map<VolumeDim>();
Variables<TwoVars<VolumeDim>> u(mesh.number_of_grid_points());
const auto xi = logical_coordinates(mesh);
const auto x = coordinate_map(xi);
const auto inv_jacobian = coordinate_map.inv_jacobian(xi);
MathFunctions::TensorProduct<VolumeDim> f(scale, std::move(functions));
get<Var1>(u) = f(x);
get<Var2<VolumeDim>>(u) = f.first_derivatives(x);
const auto du =
partial_derivatives<TwoVars<VolumeDim>>(u, mesh, inv_jacobian);
const auto& dVar1 =
get<Tags::deriv<Var1, tmpl::size_t<VolumeDim>, Frame::Inertial>>(du);
Approx custom_approx = Approx::custom().epsilon(1.e-6);
CHECK_ITERABLE_CUSTOM_APPROX(f.first_derivatives(x), dVar1, custom_approx);
const auto& dVar2 = get<
Tags::deriv<Var2<VolumeDim>, tmpl::size_t<VolumeDim>, Frame::Inertial>>(
du);
const auto d2f = f.second_derivatives(x);
for (size_t i = 0; i < VolumeDim; ++i) {
for (size_t j = 0; j < VolumeDim; ++j) {
const auto& d2f_ij = d2f.get(i, j);
const auto& dVar2_ij = dVar2.get(i, j);
CHECK_ITERABLE_CUSTOM_APPROX(d2f_ij, dVar2_ij, custom_approx);
}
}
}
} // namespace
SPECTRE_TEST_CASE("Unit.PointwiseFunctions.MathFunctions.TensorProduct",
"[PointwiseFunctions][Unit]") {
for (size_t a = 0; a < 5; ++a) {
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, 1> functions{
{std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(a)}};
test_tensor_product(Mesh<1>{4, Spectral::Basis::Legendre,
Spectral::Quadrature::GaussLobatto},
1.5, std::move(functions), {{a}});
for (size_t b = 0; b < 4; ++b) {
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, 2>
functions_2d{
{std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(a),
std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(b)}};
test_tensor_product(Mesh<2>{{{4, 3}},
Spectral::Basis::Legendre,
Spectral::Quadrature::GaussLobatto},
2.5, std::move(functions_2d), {{a, b}});
for (size_t c = 0; c < 3; ++c) {
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, 3>
functions_3d{
{std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(a),
std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(b),
std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(c)}};
test_tensor_product(Mesh<3>{{{4, 3, 5}},
Spectral::Basis::Legendre,
Spectral::Quadrature::GaussLobatto},
3.5, std::move(functions_3d), {{a, b, c}});
}
}
}
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, 1> sinusoid{
{std::make_unique<MathFunctions::Sinusoid<1, Frame::Inertial>>(1.0, 1.0,
-1.0)}};
test_with_numerical_derivatives(
Mesh<1>{8, Spectral::Basis::Legendre, Spectral::Quadrature::GaussLobatto},
1.5, std::move(sinusoid));
std::array<std::unique_ptr<MathFunction<1, Frame::Inertial>>, 3> generic_3d{
{std::make_unique<MathFunctions::Sinusoid<1, Frame::Inertial>>(1.0, 1.0,
-1.0),
std::make_unique<MathFunctions::Gaussian<1, Frame::Inertial>>(1.0, 1.0,
0.4),
std::make_unique<MathFunctions::PowX<1, Frame::Inertial>>(2)}};
test_with_numerical_derivatives(
Mesh<3>{8, Spectral::Basis::Legendre, Spectral::Quadrature::GaussLobatto},
1.5, std::move(generic_3d));
}
|
c94918b6d3ffd1d077c57d2c2fb969b99be2aebc
|
74bb403b0d41d837e65da91e538bdac703acd682
|
/CameraBase.h
|
06aebb90dd5b9a61843ee1add1af7911e04d8903
|
[] |
no_license
|
younggilyoun/MapTool
|
f9a6ba81cac89eb6042569dc17f3f4157d882210
|
26ccb5bbc40c3f4437b4641e48abc0cff1a353f2
|
refs/heads/master
| 2020-05-20T05:48:31.176601
| 2019-05-09T13:08:08
| 2019-05-09T13:08:08
| 185,414,654
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 889
|
h
|
CameraBase.h
|
#pragma once
struct CameraInfo
{
char _strName[256];
D3DXVECTOR3 _vEye;
D3DXVECTOR3 _vLookAt;
D3DXVECTOR3 _vUp;
};
class CameraBase
{
protected:
D3DXVECTOR3 m_vEye;
D3DXVECTOR3 m_vLookAt;
D3DXVECTOR3 m_vOrgEye;
D3DXVECTOR3 m_vOrgLookAt;
D3DXVECTOR3 m_vUp;
D3DXVECTOR3 m_vOrgUp;
D3DXVECTOR3 m_vDir;
D3DXVECTOR3 m_vHorz;
D3DXMATRIX m_mView;
char m_strName[256];
public:
void SetTransView(void);
void SetTransProj(void);
void Update(float dTime);
void SetCamVectors(void);
virtual void KeyControl(float dTime) = 0;
virtual void RotateX(float _angle);
virtual void RotateY(float _angle);
virtual void MoveX(float _move);
virtual void MoveY(float _move);
virtual void MoveZ(float _move);
char* GetName() { return m_strName; }
D3DXMATRIX GetView() { return m_mView;}
public:
CameraBase(CameraInfo _info);
virtual ~CameraBase(void);
};
|
2c6a7b2f5bd90a8dc2f266f54b8c168181423f28
|
fd9d7610860a0b406405038bf057160025566fdd
|
/src/NpcHit.cpp
|
9095cd97c2cc8901fed8483d118d273efac73205
|
[] |
no_license
|
Mitch-Muscle-Man-Sorenstein/CSE2-
|
a7a89ad9394279e6291102130845bd20c6871c17
|
83e803b5feccd83dcc89e0914bd233013cb3fdad
|
refs/heads/master
| 2022-12-09T20:18:43.891396
| 2020-09-06T05:23:21
| 2020-09-06T05:23:21
| 289,932,065
| 11
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 14,008
|
cpp
|
NpcHit.cpp
|
#include "NpcHit.h"
#include "WindowsWrapper.h"
#include "Back.h"
#include "Bullet.h"
#include "Caret.h"
#include "Flags.h"
#include "Game.h"
#include "Map.h"
#include "MyChar.h"
#include "NpChar.h"
#include "Sound.h"
#include "TextScr.h"
#include "ValueView.h"
void JadgeHitNpCharBlock(NPCHAR *npc, int x, int y)
{
int hit = 0;
if (npc->y - npc->hit.top < (y * 0x10 + 5) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 - 5) * 0x200
&& npc->x - npc->hit.back < (x * 0x10 + 8) * 0x200
&& npc->x - npc->hit.back > x * 0x10 * 0x200)
{
npc->x = ((x * 0x10 + 8) * 0x200) + npc->hit.back;
hit |= 1;
}
if (npc->y - npc->hit.top < (y * 0x10 + 5) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 - 5) * 0x200
&& npc->x + npc->hit.back > (x * 0x10 - 8) * 0x200
&& npc->x + npc->hit.back < x * 0x10 * 0x200)
{
npc->x = ((x * 0x10 - 8) * 0x200) - npc->hit.back;
hit |= 4;
}
if (npc->x - npc->hit.back < (x * 0x10 + 5) * 0x200
&& npc->x + npc->hit.back > (x * 0x10 - 5) * 0x200
&& npc->y - npc->hit.top < (y * 0x10 + 8) * 0x200
&& npc->y - npc->hit.top > y * 0x10 * 0x200)
{
npc->y = ((y * 0x10 + 8) * 0x200) + npc->hit.top;
npc->ym = 0;
hit |= 2;
}
if (npc->x - npc->hit.back < (x * 0x10 + 5) * 0x200
&& npc->x + npc->hit.back > (x * 0x10 - 5) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 - 8) * 0x200
&& npc->y + npc->hit.bottom < y * 0x10 * 0x200)
{
npc->y = ((y * 0x10 - 8) * 0x200) - npc->hit.bottom;
npc->ym = 0;
hit |= 8;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleA(NPCHAR *npc, int x, int y)
{
int hit = 0;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y - npc->hit.top < (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800
&& npc->y + npc->hit.bottom > (y * 0x10 - 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800 + npc->hit.top;
// Halt momentum
if (npc->ym < 0)
npc->ym = 0;
// Set that hit a ceiling
hit |= 2;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleB(NPCHAR *npc, int x, int y)
{
int hit = 0;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y - npc->hit.top < (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800
&& npc->y + npc->hit.bottom > (y * 0x10 - 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800 + npc->hit.top;
// Halt momentum
if (npc->ym < 0)
npc->ym = 0;
// Set that hit a ceiling
hit |= 2;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleC(NPCHAR *npc, int x, int y)
{
int hit = 0;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y - npc->hit.top < (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800
&& npc->y + npc->hit.bottom > (y * 0x10 - 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800 + npc->hit.top;
// Halt momentum
if (npc->ym < 0)
npc->ym = 0;
// Set that hit a ceiling
hit |= 2;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleD(NPCHAR *npc, int x, int y)
{
int hit = 0;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y - npc->hit.top < (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800
&& npc->y + npc->hit.bottom > (y * 0x10 - 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800 + npc->hit.top;
// Halt momentum
if (npc->ym < 0)
npc->ym = 0;
// Set that hit a ceiling
hit |= 2;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleE(NPCHAR *npc, int x, int y)
{
int hit = 0;
hit |= 0x10000;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800
&& npc->y - npc->hit.top < (y * 0x10 + 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800 - npc->hit.bottom;
// Halt momentum
if (npc->ym > 0)
npc->ym = 0;
// Set that hit this slope
hit |= 0x28;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleF(NPCHAR *npc, int x, int y)
{
int hit = 0;
hit |= 0x20000;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x >= (x * 0x10 - 8) * 0x200 // Note that this function uses '>='. I'm not sure if this is a bug.
&& npc->y + npc->hit.bottom > (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800
&& npc->y - npc->hit.top < (y * 0x10 + 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) + ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800 - npc->hit.bottom;
// Halt momentum
if (npc->ym > 0)
npc->ym = 0;
// Set that hit this slope
hit |= 0x28;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleG(NPCHAR *npc, int x, int y)
{
int hit = 0;
hit |= 0x40000;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800
&& npc->y - npc->hit.top < (y * 0x10 + 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) + 0x800 - npc->hit.bottom;
// Halt momentum
if (npc->ym > 0)
npc->ym = 0;
// Set that hit this slope
hit |= 0x18;
}
npc->flag |= hit;
}
void JudgeHitNpCharTriangleH(NPCHAR *npc, int x, int y)
{
int hit = 0;
hit |= 0x80000;
if (npc->x < (x * 0x10 + 8) * 0x200
&& npc->x > (x * 0x10 - 8) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800
&& npc->y - npc->hit.top < (y * 0x10 + 8) * 0x200)
{
// Clip
npc->y = (y * 0x10 * 0x200) - ((npc->x - (x * 0x10 * 0x200)) / 2) - 0x800 - npc->hit.bottom;
// Halt momentum
if (npc->ym > 0)
npc->ym = 0;
// Set that hit this slope
hit |= 0x18;
}
npc->flag |= hit;
}
void JudgeHitNpCharWater(NPCHAR *npc, int x, int y)
{
int hit = 0;
if (npc->x - npc->hit.back < (x * 0x10 + 6) * 0x200
&& npc->x + npc->hit.back > (x * 0x10 - 6) * 0x200
&& npc->y - npc->hit.top < (y * 0x10 + 6) * 0x200
&& npc->y + npc->hit.bottom > (y * 0x10 - 6) * 0x200)
hit |= 0x100;
npc->flag |= hit;
}
void HitNpCharMap(void)
{
int x, y;
int judg;
int offx[9];
int offy[9];
int i, j;
offx[0] = 0;
offx[1] = 1;
offx[2] = 0;
offx[3] = 1;
offx[4] = 2;
offx[5] = 2;
offx[6] = 2;
offx[7] = 0;
offx[8] = 1;
offy[0] = 0;
offy[1] = 0;
offy[2] = 1;
offy[3] = 1;
offy[4] = 0;
offy[5] = 1;
offy[6] = 2;
offy[7] = 2;
offy[8] = 2;
for (i = 0; i < NPC_MAX; ++i)
{
if (!(gNPC[i].cond & 0x80))
continue;
if (gNPC[i].bits & NPC_IGNORE_SOLIDITY)
continue;
if (gNPC[i].size >= 3)
{
judg = 9;
x = (gNPC[i].x - 0x1000) / 0x10 / 0x200;
y = (gNPC[i].y - 0x1000) / 0x10 / 0x200;
}
else
{
judg = 4;
x = gNPC[i].x / 0x10 / 0x200;
y = gNPC[i].y / 0x10 / 0x200;
}
gNPC[i].flag = 0;
for (j = 0; j < judg; ++j)
{
switch (GetAttribute(x + offx[j], y + offy[j]))
{
// No NPC block
case 0x44:
if (gNPC[i].bits & NPC_IGNORE_TILE_44)
break;
// Fallthrough
// Block
case 0x03:
case 0x05:
case 0x41:
case 0x43:
JadgeHitNpCharBlock(&gNPC[i], x + offx[j], y + offy[j]);
break;
// Slopes
case 0x50:
JudgeHitNpCharTriangleA(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x51:
JudgeHitNpCharTriangleB(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x52:
JudgeHitNpCharTriangleC(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x53:
JudgeHitNpCharTriangleD(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x54:
JudgeHitNpCharTriangleE(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x55:
JudgeHitNpCharTriangleF(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x56:
JudgeHitNpCharTriangleG(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x57:
JudgeHitNpCharTriangleH(&gNPC[i], x + offx[j], y + offy[j]);
break;
// Water
case 0x02:
case 0x60:
case 0x62:
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
// Water block
case 0x04:
case 0x61:
case 0x64:
JadgeHitNpCharBlock(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
// Water slopes
case 0x70:
JudgeHitNpCharTriangleA(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x71:
JudgeHitNpCharTriangleB(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x72:
JudgeHitNpCharTriangleC(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x73:
JudgeHitNpCharTriangleD(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x74:
JudgeHitNpCharTriangleE(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x75:
JudgeHitNpCharTriangleF(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x76:
JudgeHitNpCharTriangleG(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0x77:
JudgeHitNpCharTriangleH(&gNPC[i], x + offx[j], y + offy[j]);
JudgeHitNpCharWater(&gNPC[i], x + offx[j], y + offy[j]);
break;
case 0xA0:
gNPC[i].flag |= 0x100;
// Fallthrough
case 0x80:
gNPC[i].flag |= 0x1000;
break;
case 0xA1:
gNPC[i].flag |= 0x100;
// Fallthrough
case 0x81:
gNPC[i].flag |= 0x2000;
break;
case 0xA2:
gNPC[i].flag |= 0x100;
// Fallthrough
case 0x82:
gNPC[i].flag |= 0x4000;
break;
case 0xA3:
gNPC[i].flag |= 0x100;
// Fallthrough
case 0x83:
gNPC[i].flag |= 0x8000;
break;
}
if (gNPC[i].y > gWaterY + 0x800)
gNPC[i].flag |= 0x100;
}
}
}
void LoseNpChar(NPCHAR *npc, BOOL bVanish)
{
int val;
// Play death sound
PlaySoundObject(npc->destroy_voice, 1);
// Create smoke
switch (npc->size)
{
case 1:
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 3);
break;
case 2:
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 7);
break;
case 3:
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 12);
break;
}
// Create drop
if (npc->exp != 0)
{
switch (Random(1, 5))
{
case 1:
// Spawn health
if (npc->exp > 6)
val = 6;
else
val = 2;
SetLifeObject(npc->x, npc->y, val);
break;
case 2:
// Spawn missile launcher ammo
if (npc->exp > 6)
val = 3;
else
val = 1;
if (SetBulletObject(npc->x, npc->y, val))
break;
// Fallthrough
default:
// Spawn weapon energy
SetExpObjects(npc->x, npc->y, npc->exp);
break;
}
}
// Set flag
SetNPCFlag(npc->code_flag);
// Create value view
if (npc->bits & NPC_SHOW_DAMAGE)
{
if ((npc->bits & NPC_SHOW_DAMAGE) && npc->damage_view) // npc->bits & NPC_SHOW_DAMAGE is already verified at this point, so this is redundant
SetValueView(&npc->x, &npc->y, npc->damage_view);
if (bVanish)
VanishNpChar(npc);
}
else
{
npc->cond = 0;
}
}
void HitNpCharBullet(void)
{
int n, b;
BOOL bHit;
for (n = 0; n < NPC_MAX; ++n)
{
if (!(gNPC[n].cond & 0x80))
continue;
if (gNPC[n].bits & NPC_SHOOTABLE && gNPC[n].bits & NPC_INTERACTABLE)
continue;
for (b = 0; b < BULLET_MAX; ++b)
{
if (!(gBul[b].cond & 0x80))
continue;
if (gBul[b].damage == -1)
continue;
// Check if bullet touches npc
bHit = FALSE;
if (gNPC[n].bits & NPC_SHOOTABLE
&& gNPC[n].x - gNPC[n].hit.back < gBul[b].x + gBul[b].enemyXL
&& gNPC[n].x + gNPC[n].hit.back > gBul[b].x - gBul[b].enemyXL
&& gNPC[n].y - gNPC[n].hit.top < gBul[b].y + gBul[b].enemyYL
&& gNPC[n].y + gNPC[n].hit.bottom > gBul[b].y - gBul[b].enemyYL)
bHit = TRUE;
else if (gNPC[n].bits & NPC_INVULNERABLE
&& gNPC[n].x - gNPC[n].hit.back < gBul[b].x + gBul[b].blockXL
&& gNPC[n].x + gNPC[n].hit.back > gBul[b].x - gBul[b].blockXL
&& gNPC[n].y - gNPC[n].hit.top < gBul[b].y + gBul[b].blockYL
&& gNPC[n].y + gNPC[n].hit.bottom > gBul[b].y - gBul[b].blockYL)
bHit = TRUE;
if (bHit)
{
// Damage NPC
if (gNPC[n].bits & NPC_SHOOTABLE)
{
gNPC[n].life -= gBul[b].damage;
if (gNPC[n].life < 1)
{
gNPC[n].life = 0;
if (gNPC[n].bits & NPC_SHOW_DAMAGE)
gNPC[n].damage_view -= gBul[b].damage;
if ((gMC.cond & 0x80) && gNPC[n].bits & NPC_EVENT_WHEN_KILLED)
StartTextScript(gNPC[n].code_event);
else
gNPC[n].cond |= 8;
}
else
{
if (gNPC[n].shock < 14)
{
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
PlaySoundObject(gNPC[n].hit_voice, 1);
gNPC[n].shock = 16;
}
if (gNPC[n].bits & NPC_SHOW_DAMAGE)
gNPC[n].damage_view -= gBul[b].damage;
}
}
else if (gBul[b].code_bullet == 13
|| gBul[b].code_bullet == 14
|| gBul[b].code_bullet == 15
|| gBul[b].code_bullet == 28
|| gBul[b].code_bullet == 29
|| gBul[b].code_bullet == 30)
{
// Strange empty case that's needed for accurate assembly
}
else if (!(gBul[b].bbits & 0x10))
{
// Hit invulnerable NPC
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 2, 2);
PlaySoundObject(31, 1);
gBul[b].life = 0;
continue;
}
--gBul[b].life;
}
}
if (gNPC[n].cond & 8)
LoseNpChar(&gNPC[n], TRUE);
}
}
|
c3763e7bba01fc735c0796a77f73fd891a804d8f
|
ba124544200d011da6500f0543aee72d6e8007f8
|
/Lab2.cpp
|
012d35cf6a281ebd3defb6ad6123b0fe7e85c14f
|
[] |
no_license
|
Jvictor97/FileSystem
|
f4ad91f618b574748c88d80074ccae337e75da87
|
f08613204ecf897a3d7c98343b7834d856f116c6
|
refs/heads/master
| 2020-05-18T09:07:02.646410
| 2018-09-22T20:12:42
| 2018-09-22T20:12:42
| 184,314,849
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,121
|
cpp
|
Lab2.cpp
|
#include <iostream>
#include <bitset>
#include <cstdio>
#include <string>
#include <ostream>
using namespace std;
void writeHeader(FILE * hd, int sizeBloco, int qtdeBlocos){
fputc('$', hd);
for(int bloco = 0; bloco < qtdeBlocos; bloco++){
for(int size = 0; size < sizeBloco; size++){
fputc('0', hd);
}
//fputc('\n', hd);
}
fputc('*', hd);
}
FILE * createhd(int qtdeBlocos, int sizeBloco){
FILE * hd;
hd = fopen("myHD.txt", "w+");
if(hd == NULL){
cout<<"Unable to create Hard Drive File"<<endl;
return NULL;
}
writeHeader(hd, sizeBloco, (qtdeBlocos/(sizeBloco * 8)));
for(int blocos = 0; blocos < qtdeBlocos; blocos++){
for(int size = 0; size < sizeBloco; size++){
fputc('#', hd);
}
//fputc('\n', hd);
}
return hd;
}
void writeToBlock(int blockNo, string content, FILE * hd, int sizeBloco){
if(content.length() < sizeBloco){
fseek(hd, blockNo * sizeBloco, SEEK_SET);
fputs(content.c_str(), hd);
}else{
cout<<"Too big";
}
}
int main() {
//bitset<8> mb = bitset<8>(16);
FILE * hd = createhd(1024, 32);
writeToBlock(30, "DeuCerto", hd, 32);
fclose(hd);
return 0;
}
|
282f3828b893a1d68e1804b725ba97b0eee7c68e
|
a9aa074f0d0bbbd75bc5ea72c4a60c3985407762
|
/hitomi/sxs/tasks/sxsflagpix/sxsflagpixlib.h
|
21c3143f42afbd355673e65f3420c47ff479d5b8
|
[] |
no_license
|
Areustle/heasoft-6.20
|
d54e5d5b8769a2544472d98b1ac738a1280da6c1
|
1162716527d9d275cdca064a82bf4d678fbafa15
|
refs/heads/master
| 2021-01-21T10:29:55.195578
| 2017-02-28T14:26:43
| 2017-02-28T14:26:43
| 83,440,883
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 17,465
|
h
|
sxsflagpixlib.h
|
/// \file sxsflagpixlib.h
/// \brief functions for sxsflagpix
/// \author Mike Witthoeft
/// \date $Date: 2016/08/22 23:20:35 $
/// \addtogroup tool_sxsflagpix
/// \section tool_sxsflagpix_sxsflagpixlib Supplementary functions for sxsflagpix
///
/// \subsection tool_sxsflagpix_sxspixelmap SXS Pixel Map - sxspixelmap
///
/// Mapping between various SXS pixel indices: chip, side, and quadrant.
///
#ifndef TOOL_SXSFLAGPIX_SXSFLAGPIXLIB_H
#define TOOL_SXSFLAGPIX_SXSFLAGPIXLIB_H
#include "ahgen/ahversion.h"
AHVERSION(TOOL_SXSFLAGPIX_SXSFLAGPIXLIB,"$Id: sxsflagpixlib.h,v 1.17 2016/08/22 23:20:35 mwitthoe Exp $")
#include "ahfits/ahfits.h"
#include "ahsxs/sxsstatus.h"
#include "ahsxs/sxsdt.h"
#include <string>
#include <map>
#include <set>
/// \brief data type of PIXEL column
typedef int type_pixel;
/// \brief data type of row number
typedef long long type_row;
/// \brief data type of TIME column
typedef double type_time;
/// \brief data type of PHA column
typedef long type_pha;
/// \brief data type of PI column
typedef long type_pi;
/// \brief data type of EPI column
typedef double type_epi;
/// \brief data type of element in STATUS column
typedef char type_status;
/// \brief data type of element in PROC_STATUS column
typedef char type_proc_status;
/// \brief data type of CTMULT column
typedef int type_mult;
/// \brief data type of FLG_* columns
typedef char type_flag;
/// \brief data type of DURATION column
typedef double type_duration;
/// \brief data type of the itype column
typedef int type_itype;
/// \brief data type of PSP_ID column
typedef int type_pspid;
/// \brief number of MXS LEDs
const int NUMLED=4;
/// \brief number of bit in PROC_STATUS column
const int LENPROC_STATUS=32;
/// \brief max number of rows allowed in a single group
const int MAXGROUPSIZE=1000;
/// \brief units of the antico DURATION column in seconds
const double ANTDURUNITS=80.e-6;
/// \brief enumerated values for types of flagging performed in this task
enum FlagTypes {
e_PROX, ///< proximity check
e_CTEL, ///< electrical cross talk
e_CTEL2, ///< 2nd electrical cross talk
e_CTREC, ///< recoil cross talk
e_ANT, ///< antico
e_GTI, ///< GTI
e_MXS ///< MXS GTI
};
/// \brief structure to store input parameters
struct Par {
Par(): m_calcant(false),m_antswitch(0),m_antphathr(0),m_calcctrec(false),
m_calcprox(false),m_calcctel(false),m_ctelnear(1),m_calcctel2(false),
m_ctelnear2(1),m_pxpithr(0),m_calcmxs(false),m_kalow(0.),m_kahigh(0.),
m_kbeta(0.),m_dtflag(false),m_ckrisetime(false) {}
std::string m_infile; ///< name of input file
std::string m_inantfile; ///< name of antico file
std::string m_outfile; ///< name of output file
std::string m_antpsp; ///< PSP to use for coincidence (A=PSPA B=PSPB)
std::string m_antshift; ///< Shift to apply to the TIME of an antico event(s) or CALDB
std::string m_gtifile; ///< GTI input file to include event
bool m_calcant; ///< flag antico pixels
std::string m_antdtpre; ///< delta-t before event to check for antico
std::string m_antdtfol; ///< delta-t after event to check for antico
int m_antswitch; ///< 0 delta time (follow) from file; 1 use parameter
int m_antphathr; ///< PHA threshold for antico
int m_antdurthr; ///< DURATION threshold for antico
bool m_calcctrec; ///< flag recoil cross-talk
std::string m_ctrecdt; ///< delta-t for recoil cross-talk
bool m_calcprox; ///< flag event for time proximity
std::string m_proxdt; ///< delta time in sec for event the occurs close in time
bool m_calcctel; ///< flag electrical cross-talk
std::string m_pixdeffile; ///< name of CALDB pixel map file name
std::string m_cteldt; ///< delta-t for electrical cross-talk
int m_ctelnear; ///< neighbor radius for electrical cross-talk
bool m_calcctel2; ///< flag electrical cross-talk 2 (different delta-time)
std::string m_cteldt2; ///< delta-t for electrical cross-talk 2
int m_ctelnear2; ///< neighbor radius for electrical cross-talk 2
int m_pxpithr; ///< Events with PI below this value are skipped (see usepxpithr)
std::string m_usepxpithr; ///< Flagging types which skip events based on pxpithr
bool m_calcmxs; ///< flag MXS
std::string m_mxsdt; ///< delta-t for MXS GTI afterglow
std::string m_inmxsgti; ///< name of MXS GTI file
double m_kalow; ///< Lower energy limit of Mn K-alpha for recoil test
double m_kahigh; ///< Upper energy limit of Mn K-alpha for recoil test
double m_kbeta; ///< Energy of Mn K-beta for recoil test
bool m_dtflag; ///< True if writing delta-time columns for cross-talk and antico
bool m_ckrisetime; ///< True to skip events with RISE_TIME > 127
std::string m_resetflags; ///< True to reset all STATUS bits before operations
std::set<int> m_usepxpithr_values;
std::set<int> m_resetflags_values;
};
/// \brief structure to information from a single row for cross-talk
struct CTRow {
CTRow(): m_row(0), m_time(0.), m_time_null(0), m_pixel(0), m_pixel_null(0),
m_pha(0), m_pha_null(0), m_pi(0), m_pi_null(0), m_epi(0.), m_epi_null(0.),
m_rise_time(0), m_mult(0), m_itype(0), num_status(ahsxs::LEN_SXSSTATUS),
num_proc_status(LENPROC_STATUS), m_dtctel(0.), m_dtctel_null(0),
m_dtctrec(0.), m_dtctrec_null(0), m_isel(false)
{
for (int i=0; i < ahsxs::LEN_SXSSTATUS; i++) m_status[i]=0;
for (int i=0; i < LENPROC_STATUS; i++) m_proc_status[i]=0;
}
long long m_row;
double m_time;
char m_time_null;
int m_pixel;
char m_pixel_null;
long m_pha;
char m_pha_null;
long m_pi;
char m_pi_null;
double m_epi;
char m_epi_null;
int m_rise_time;
int m_mult;
int m_itype;
char m_status[ahsxs::LEN_SXSSTATUS];
ahfits::IndexType num_status;
char m_proc_status[LENPROC_STATUS];
ahfits::IndexType num_proc_status;
double m_dtctel;
char m_dtctel_null;
double m_dtctrec;
char m_dtctrec_null;
// true if event has electrical cross-talk with some other event
bool m_isel;
};
/// \addtogroup tool_sxsflagpix
namespace sxspixelmap {
/** \addtogroup tool_sxsflagpix
* @{
*/
typedef std::map<int, int> pixmap;
/// \brief Describe location of SXS detector pixels.
///
/// The SXS detector has 36 pixels split into two sides of 18 pixels each
/// and four quadrants with 9 pixels each. This structure will map the
/// global pixel index (0-35) to each of 1) side number (0,1); 2) side pixel,
/// i.e. XM pixel (0-17); 3) quadrant number (0-3); and 4) quadrant pixel,
/// i.e. SPC pixel (0-8).
typedef struct {
pixmap m_xmside; ///< convert pixel to XM side index (0-1)
pixmap m_xmpixel; ///< convert pixel to XM pixel (0-17)
pixmap m_spcquad; ///< convert pixel to SPC quadrant (0-3)
pixmap m_spcpixel; ///< convert pixel to SPC pixel (0-8)
} DataType;
/// \brief read data file and load data into global data map
/// \param[in] filename name of data file
/// \param[out] dat data from CALDB file
void load(const std::string & filename, DataType & dat);
/// \brief clear data
/// \param[in,out] dat data from CALDB file
void clear(DataType & dat);
/// \brief return the XM side number for the given global pixel number
/// \param[in] dat data from CALDB file
/// \return XM side number
double get_xmside(DataType & dat, int pixel);
/// \brief return the XM pixel number for the given global pixel number
/// \param[in] dat data from CALDB file
/// \return XM pixel number
double get_xmpixel(DataType & dat, int pixel);
/// \brief return the SPC quadrant number for the given global pixel number
/// \param[in] dat data from CALDB file
/// \return SPC quadrant number
double get_spcquad(DataType & dat, int pixel);
/// \brief return the SPC pixel number for the given global pixel number
/// \param[in] dat data from CALDB file
/// \return SPC pixel number
double get_spcpixel(DataType & dat, int pixel);
/** @} */
} // namespace sxspixelmap
/// \brief This function is used to get the value or file name from a time
/// interval parameter, e.g. antdtpre. An error is thrown if the value
/// is negative or the file name does not equal the previously-specified
/// file name.
/// \param[in] parval name of the parameter
/// \param[in] value value of the parameter
/// \parma[in] dtfile dt filename
/// \parampin] allowneg do not throw error if value is negative
void getdtpar(const std::string& parval,double& value,std::string& dtfile,
bool allowneg=false);
/// \brief Parse parameter string containing a list of flagging types.
/// \param[in] parname name of parameter (for error message only)
/// \param[in] parval input parameter string
/// \param[out] types output list of enumerated types
///
/// Valid flagging types:
/// ALL - include all types
/// NONE - include no types
/// PROX - proximity
/// CTEL - electrical cross-talk
/// CTEL2 - 2nd electrical cross-talk
/// CTREC - recoil cross-talk
/// ANT - antico
/// GTI - GTI
/// MXS - MXS GTI
void parse_flagging_types(const std::string& parname, const std::string& parval,
std::set<int>& types);
/// \brief reset STATUS bits
/// \param[in] fp ahfits object of output file (clone of input)
/// \param[in] types flagging types to reset STATUS bits for
/// \param[out] clean if yes, delete output files
void reset_status(ahfits::FilePtr fp, const std::set<int>& types, bool& clean);
/// \brief flag recoil and electrical cross-talk
/// \param[in] fp ahfits object of output file (clone of input)
/// \param[in] ckrisetime if true, skip events with RISE_TIME > 127
/// \param[in] ctrecdt delta time in sec for event cross-talk due to recoil electrons
/// \param[in] cteldt delta time in sec for electrical cross-talk between pixels
/// \param[in] ctelnear number of nearby pixels to check for electrical cross-talk
/// \param[in] proxdt delta-time used to define simultaneous events
/// \param[in] calcctrec flag recoil cross-talk
/// \param[in] calcctel flag electrical cross talk
/// \param[in] calcprox flag simultaneous events
/// \param[in] dtflag write delta-time output columns
/// \param[in] kalow PHA comparison value for lowest K-alpha
/// \param[in] kahigh PHA comparison value for highest K-alpha
/// \param[in] kbeta PHA comparison value for K-beta
/// \param[in] ctelidx which electrical cross-talk delta-time to use:
/// 1 - DTCTEL
/// 2 - DTCTEL2
/// \param[in] usepxpithr true: apply pxpithr to events
/// \param[in] pxpithr skip events with PI less than this threshold
/// \param[in] pixmapdat data from SXS pixel map CALDB file
/// \param[out] clean if yes, delete output files
void process_crosstalk(ahfits::FilePtr fp, bool ckrisetime, double ctrecdt,
double cteldt, int ctelnear, double proxdt, bool calcctrec,
bool calcctel, bool calcprox, bool dtflag, double kalow,
double kahigh, double kbeta, int ctelidx, bool usepxpithr,
int pxpithr, sxspixelmap::DataType& pixmapdat,bool& clean);
/// \brief flag antico pixels
/// \param[in] fp ahfits object of output file (clone of input)
/// \param[in] fpa ahfits object of antico file (if needed)
/// \param[in] ckrisetime if true, skip events with RISE_TIME > 127
/// \param[in] antpsp which PSP to check for antico coincidence
/// \param[in] antshift Shift to apply to the TIME of an antico event (s) or CALDB
/// \param[in] antdtpre delta time in sec preceding an antico event
/// \param[in] antdtfol delta time in sec following an antico event
/// \param[in] antswitch set antdtfol: if 0 read delta time from file; if 1 use parameter
/// \param[in] antphathr PHA threshold for antico
/// \param[in] antdurthr DURATION threshold for antico
/// \param[in] dtflag write delta-time output columns
/// \param[out] clean if yes, delete output files
void process_antico(ahfits::FilePtr fp, ahfits::FilePtr fpa, bool ckrisetime,
const std::string& antpsp, double antshift, double antdtpre,
double antdtfol, int antswitch, int antphathr, int antdurthr,
bool dtflag, bool& clean);
/// \brief flag MXS events
/// \param[in] fp ahfits object of output file (clone of input)
/// \param[in] gp ahfits object of MXS GTI file (if needed)
/// \param[in] ckrisetime if true, skip events with RISE_TIME > 127
/// \param[in] mxsdt afterglow time
/// \param[out] extnumarray number of rows for each MXS GTI extension
/// \param[out] clean if yes, delete output files
void process_mxs(ahfits::FilePtr fp, ahfits::FilePtr gp, bool ckrisetime,
double mxsdt, long* extnumarray, bool& clean);
/// \brief Will obtain flagging information for time intervals from gti file
/// \param[in] fp ahfits object of output file (clone of input)
/// \param[in] gtifile GTI input file
/// \param[in] ckrisetime if true, skip events with RISE_TIME > 127
/// \param[out] clean if yes, delete output files
void flag_gti(ahfits::FilePtr fp, const std::string & gtifile, bool ckrisetime,
bool& clean);
#endif /* TOOL_SXSFLAGPIX_SXSFLAGPIXLIB_H */
/* Revision Log
$Log: sxsflagpixlib.h,v $
Revision 1.17 2016/08/22 23:20:35 mwitthoe
sxsflagpix: fix bug where negative values for antshift were not permitted when entered manually (CALDB was OK); now antshift can be positive or negative
Revision 1.16 2016/08/16 18:12:20 mwitthoe
sxsflagpix: remove constraint on group size when flagging cross-talk; previously the tool threw an error if there were more than 1000 in a group, now there can be any number
Revision 1.15 2016/08/11 20:07:01 mwitthoe
sxsflagpix: 1) switch meaning on 0/1 for GTI STATUS bits - 0 means invalid event or not in GTI, 1 means valid event in GTI; 2) allow negative pxpithr values
Revision 1.14 2016/07/25 18:46:47 mwitthoe
sxsflagpix: 1) skip events with PHA/PI/EPI=NULL; 2) do not include pixel 12 events in proximity check; 3) add parameters pxpithr/usepxpithr for setting a PI threshold for including events in the proximity and cross-talk checks; 4) change meaning of resetflags parameter to be a list of flagging types to reset the STATUS bits for
Revision 1.13 2016/05/24 19:40:12 mwitthoe
sxsflagpix: add new parameter, resetflags, to set all STATUS bits to zero before flagging new bits
Revision 1.12 2015/12/08 15:52:27 mwitthoe
sxsflagpix: convert antico DURATION value to seconds when constructing the antico search interval
Revision 1.11 2015/12/03 19:36:14 mwitthoe
sxsflagpix: perform a 2nd electrical cross-talk check using a different delta-time
Revision 1.10 2015/10/07 16:53:21 mwitthoe
sxsflagpix: add ckrisetime parameter to skip events with RISE_TIME>127
Revision 1.9 2015/10/02 20:44:05 mwitthoe
sxsflagpix: remove pixmap include statement from sxsflagpixlib.h
Revision 1.8 2015/09/25 20:02:10 mwitthoe
sxsflagpix: add parameter, antdurthr, which is the DURATION threshold for accepting antico events; if an antico event has a DURATION less than antdurthr, then it is ignored
Revision 1.7 2015/09/23 14:22:15 mwitthoe
sxsflagpix: delete output file if there is an error before processing
Revision 1.6 2015/09/23 14:11:24 mwitthoe
sxsflagpix: 1) add dtflag parameter which switches on new delta-time output columns for cross-talk and antico (diagnostics); 2) throw error if discovered that TIME column is not sorted; 3) perform recoil cross-talk energy check with EPI instead of PHA; 4) fix parameter description for calcprox; 5) fix afterglow counter for MXS flagging and clarify log messages
Revision 1.5 2015/07/30 16:07:14 mwitthoe
sxsflagpix: clean up tool; see issues 532, 534, and 543
Revision 1.4 2014/01/22 20:40:21 mwitthoe
sxsflagpix: update accordng to code review; issue 331
Revision 1.3 2014/01/09 20:33:50 rshill
Code review comments
Revision 1.2 2013/11/14 18:44:41 mwitthoe
sxsflagpix: correct Doxygen section labels in sxsflagpixlib.h
Revision 1.1 2013/11/12 17:45:03 mwitthoe
sxsflagpix: moved getPar_warn() functions to ahapp; renamed sxspixel map to sxsflagpixlib; worked on standards compliance for source (mainly moving variable declarations to top of scope)
BELOW IS THE REVISION LOG FOR sxspixelmap.h BEFORE RENAMING TO sxsflagpixlib.h
Revision 1.4 2013/07/25 19:47:33 mwitthoe
fix doxygen tags
Revision 1.3 2013/04/16 17:19:26 mwitthoe
sxsflagpix: change source to match latest TRF (major change to cross-talk algorithm, add MXS algorithm); modify form ahcaldb library, sxspixelmap, to follow new standards
Revision 1.2 2013/01/24 18:54:09 mwitthoe
update Doxygen for ahcaldb library
Revision 1.1 2013/01/02 19:09:52 mwitthoe
add new ahcaldb library for the SXS pixel map
*/
|
a2424ccbc5c150a7f402a599f4db2650f53422db
|
737f2d68e6dec69091b030e31ed281cfe0658f66
|
/2021_04_29/vector.hpp
|
3bc1795667471f54ba542159d05bf65168833558
|
[] |
no_license
|
niangeer/Jie
|
b0517cf6a6abfa4cc905f17c0e7408ed990f79ea
|
f2f37207713b729ae4bf00fe82f33989e8758256
|
refs/heads/main
| 2023-06-01T20:04:05.883583
| 2021-06-16T15:16:51
| 2021-06-16T15:16:51
| 315,895,149
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 3,269
|
hpp
|
vector.hpp
|
#include <iostream>
#include <assert.h>
using namespace std;
namespace jzh
{
template<class T>
class vector
{
public:
typedef T* iterator;
typedef const T* const_iterator;
//Constructor
vector()
:_start(nullptr)
, _finish(nullptr)
, _endofstorage(nullptr)
{}
vector(int n, const T& data = T())
:_start(nullptr)
, _finish(nullptr)
, _endofstorage(nullptr)
{
resize(n, data);
}
template<class InputIterator>
vector(InputIterator first, InputIterator last)
: _start(nullptr)
, _finish(nullptr)
, _endofstorage(nullptr)
{
reserve(last - first);
while (first != last)
{
push_back(*first);
first++;
}
}
vector(const vector<T>& v)
:_start(nullptr)
, _finish(nullptr)
, _endofstorage(nullptr)
{
vector<T> tmp(v.begin(), v.end());
swap(tmp);
}
vector<T>& operator=(const vector<T>& v)
{
if (&v != this)
{
vector<T> tmp(v);
swap(tmp);
}
return *this;
}
~vector()
{
delete[] _start;
_start = _finish = _endofstorage = nullptr;
}
//Iterators
iterator begin() { return _start; }
iterator end() { return _finish; }
const_iterator begin() const { return _start; }
const_iterator end() const { return _finish; }
//Capacity
size_t size() const { return _finish - _start; }
size_t capacity() const { return _endofstorage - _start; }
bool empty() const { return _start == _finish; }
void reserve(size_t n)
{
if (n > capacity())
{
//增容可能导致 _finish 减 _start 发生变化
size_t old_size = size();
T* tmp = new T[n];
memcpy(tmp, _start, sizeof(T)*size());
delete[] _start;
_start = tmp;
_finish = tmp + old_size;
_endofstorage = tmp + n;
}
}
void resize(size_t n, const T& data)
{
if (n > size())
{
if (n > capacity())
reserve(n);
while (_finish != _start + n)
{
*_finish = data;
_finish++;
}
}
else
{
_finish = _start + n;
}
}
void resize(size_t n) { resize(n, T()); }
//Element access
T& operator[](size_t pos)
{
assert(size() > pos);
return _start[pos];
}
//Modifiers
void push_back(const T& data)
{
check_capacity();
*_finish = data;
_finish++;
}
void pop_back()
{
assert(_finish > _start);
_finish--;
}
iterator insert(iterator pos, const T& data)
{
assert(pos >= _start && pos <= _finish);
//增容可能导致pos变为野指针
size_t posi = pos - _start;
check_capacity();
pos = _start + posi;
iterator it = _finish;
while (it != pos)
{
*it = *(it - 1);
it--;
}
*pos = data;
_finish++;
return pos;
}
iterator erase(iterator pos)
{
assert(pos >= _start && pos < _finish);
iterator it = pos;
while (it != _finish - 1)
{
*(it) = *(it + 1);
it++;
}
_finish--;
return pos;
}
void swap(vector<T>& v)
{
std::swap(_start, v._start);
std::swap(_finish, v._finish);
std::swap(_endofstorage, v._endofstorage);
}
void check_capacity()
{
if (_finish == _endofstorage)
{
if (capacity() == 0)
reserve(4);
else
reserve(capacity() * 2);
}
}
private:
iterator _start;
iterator _finish;
iterator _endofstorage;
};
}
|
67640d0c0e6dab2bfc5e382de011a00eac3b8899
|
92e5ea8186da4b62820c95825292aeb1eeeb2f87
|
/include/gui/group.hpp
|
5d5e2d2faab6bc167041c79b141362a8e4c26638
|
[
"MIT"
] |
permissive
|
dawikur/c8
|
aceda567aa63be34d33e1de96206a0c2921bd1a7
|
8b335158d92c283965c71e911a10bc897f293d97
|
refs/heads/master
| 2021-01-01T05:16:16.483947
| 2016-06-01T07:15:19
| 2016-06-01T07:15:19
| 57,598,268
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 654
|
hpp
|
group.hpp
|
// Copyright 2016 Dawid Kurek. All Rights Reserved.
#ifndef INCLUDE_GUI_GROUP_HPP_
#define INCLUDE_GUI_GROUP_HPP_
#include <nana/gui.hpp>
#include <nana/gui/place.hpp>
#include <nana/gui/widgets/form.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/widgets/panel.hpp>
#include <string>
namespace gui {
class Group : public nana::panel<true> {
public:
Group(nana::widget& owner, std::string const &title);
private:
void arrange();
void draw(nana::paint::graphics &graphics);
nana::widget &_owner;
nana::place _place;
nana::label _title;
nana::drawing _drawer;
};
} // namespace gui
#endif // INCLUDE_GUI_GROUP_HPP_
|
03414fb10564efeb830cee5c1282efb11522af49
|
9f424a27353e57c575fbbd083e018045c1e4bbc4
|
/rsdevice.h
|
08f49441d5d61095285ada1079ac682ba2bdd5ed
|
[] |
no_license
|
leon1205/librealsensePlus
|
19a8824332af8aea558a911c9db3b02ece99be01
|
f442222cc3c4b340e4b7f9b6f406ad80ebfbc141
|
refs/heads/master
| 2021-06-08T11:31:04.540317
| 2016-12-11T13:58:30
| 2016-12-11T13:58:30
| 75,485,895
| 6
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 834
|
h
|
rsdevice.h
|
#ifndef RSDEVICE_H
#define RSDEVICE_H
#include <librealsense/rs.hpp>
#include <QString>
class rsdevice
{
public:
rs::context ctx;
rs::device * dev;
int devCount;
QString devName;
QString devSerial;
QString devFwVersion;
QString devCamType;
QString devIspFwVersion;
bool streamEnable;
public:
QString getDevName(){
return devName;
}
QString getDevSerial(){
return devSerial;
}
QString getDevFwVersion(){
return devFwVersion;
}
QString getCamType(){
return devCamType;
}
QString getIspFwVersion(){
return devIspFwVersion;
}
public:
rsdevice();
void initRsDevice();
void enableStream();
uchar * getFrameData();
bool isSteamEnable();
float getDistance(int x,int y);
};
#endif // RSDEVICE_H
|
e8f19959326bd9d1089350cd0cb6953ab6e49997
|
a36dd074b4df149877ddf84cd7c1032ff8bfc531
|
/Equilibrium Index
|
c741acc4a7e8e68a75515a93b0f8373a9effabed
|
[] |
no_license
|
Kalkivenkatesh/Bankers_algorithm
|
5c4d1c41875d33747b29dd667e2cb72004daeea0
|
628ec59b53e6340bebacc4e0de684943ad086ea1
|
refs/heads/master
| 2021-07-01T12:50:25.831286
| 2020-10-06T20:07:54
| 2020-10-06T20:07:54
| 181,349,963
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 391
|
Equilibrium Index
|
#include<bits/stdc++.h>
using namespace std;
int equi(int arr[], int num)
{
int sum=0,leftsum=0;
for(int i=0;i<num;i++)
{
sum=sum+arr[i];
}
for(int i=0;i<num;i++)
{
sum = sum-arr[i];
if(leftsum==sum)
{
return i;
}
leftsum=leftsum+arr[i];
}
return -1;
}
int main()
{
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
cout<<equi(a,n);
return 0;
}
|
|
609001a7013dac2f30acbc3a1949ee6906dce86f
|
94ca84163372e5e42871f24fafd3dc0b57f942fa
|
/GameEngine_Prototype/GameEngine_Editor/EditorMain.cpp
|
5aa500cff5ea74b1ec75acd4c30d0098bd7836b7
|
[
"MIT"
] |
permissive
|
Michaelwolf95/XEngine
|
2f957c09965e70e46fbc061d02c0d49aa56e3107
|
d134fa376484d1115bf5af75f062ef44c8e70263
|
refs/heads/master
| 2020-04-05T06:00:27.423995
| 2019-05-17T02:17:59
| 2019-05-17T02:17:59
| 156,621,443
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,620
|
cpp
|
EditorMain.cpp
|
//==================================================
// ENTRY POINT FOR EDITOR
//==================================================
#ifndef STB_DEFINE
#define STB_DEFINE
#define STB_IMAGE_IMPLEMENTATION
// Disabled to prevent duplicate from the engine.
//include <stb/stb_image.h>
#endif
#include "XEngineEditor.h"
#include "EditorSettingsManager.h"
#include "ProjectSettingsManager.h"
#include "ProjectCompiler.h"
#include "SceneEditor.h"
#include <Windows.h>
#include <stdio.h>
#include <string>
namespace XEngine::Editor
{
// Engine Callbacks
static void Editor_Init();
static void Editor_Update();
static void Editor_PreRender();
static void Editor_PostRender();
static void Editor_ApplicationClose();
// Editor entry point function.
int EDITOR_MAIN()
{
std::cout << "===== LAUNCHING X-ENGINE EDITOR =====" << std::endl;
//std::cout << "API Mode: " << API_MODE << std::endl;
EditorSettingsManager* editorSettings = EditorSettingsManager::CreateManager();
ProjectSettingsManager* projectSettings = ProjectSettingsManager::CreateManager();
projectSettings->LoadProjectSettings();
// TODO: Get project path as input, or load from file.
//AssetManager::getInstance().setProjectFilePath(std::string("D:/VisualStudio/CECS_491_Prototype/DemoProject/"));
AssetManager::getInstance().setProjectFilePath(projectSettings->getProjectDirectory());
//TODO: Set compiler params based on Project path.
ProjectCompiler* compiler = ProjectCompiler::CreateManager();
//compiler->CompileProject();
compiler->LoadProjectLibrary();
XEngine::OnEngineInit = &Editor_Init;
XEngine::OnEngineUpdate = &Editor_Update;
XEngine::OnEnginePreRender = &Editor_PreRender;
XEngine::OnEnginePostRender = &Editor_PostRender;
XEngine::OnApplicationClose = &Editor_ApplicationClose;
XEngine::ENGINE_INITIALIZE();
// False for editor mode.
XEngine::useDefaultSceneInitialization = false;
return XEngine::ENGINE_MAIN();
}
void Editor_Init()
{
XEngine::Editor::SceneEditor::CreateManager();
XEngine::Editor::SceneEditor::getInstance().StartEditMode();
}
void Editor_Update()
{
XEngine::Editor::SceneEditor::getInstance().UpdateEditor();
}
void Editor_PreRender()
{
XEngine::Editor::SceneEditor::getInstance().EditorPreRender();
}
void Editor_PostRender()
{
XEngine::Editor::SceneEditor::getInstance().EditorPostRender();
}
void Editor_ApplicationClose()
{
XEngine::Editor::SceneEditor::getInstance().ShutDown();
}
}
// ENTRY POINT
int main(int argc, char *argv[])
{
//TODO: Set project path based on launch params.
return XEngine::Editor::EDITOR_MAIN();
}
|
2389b8815f20fcf79223a1cfa05c4ff4166788f2
|
6d6add25752e31c66dc4cf62501bd6e07907c49d
|
/engine/src/Menu.cpp
|
113b7bac5e8da6d41319a54aa1b60f279a81b9a7
|
[] |
no_license
|
Jin992/PongSDL2
|
dff8a5846a544cdecde58fddc3e533e2d3fb2a7a
|
908c6bb4999b05fa2c42dadd7fa87a678c848fe9
|
refs/heads/master
| 2020-12-23T22:05:25.884955
| 2020-02-09T16:55:01
| 2020-02-09T16:55:01
| 237,290,183
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,484
|
cpp
|
Menu.cpp
|
//
// Created by jin on 2/3/20.
//
#include <Menu.h>
namespace Engine {
namespace ui {
Menu::Menu(int32_t x, int32_t y)
: _item_pos(0), _active_index(0) {
set_x(x);
set_y(y);
type(entity::Pressable);
setOnKeyPressDown_hdl([this](SDL_KeyboardEvent &ev) {
selected()->onKeyPressDown(ev);
});
setOnKeyPressUp_hdl([](SDL_KeyboardEvent &ev) {
if (ev.timestamp){}
});
}
void Menu::setItemPadding(uint16_t padding) {
_padding = padding;
}
void Menu::add_button(std::string const & name, engine_key_hdl down, engine_key_hdl up){
std::shared_ptr<Button> btn = std::make_shared<Button>(name, -1, x(), y() + _item_pos);
_item_pos += _padding;
btn->setOnKeyPressUp_hdl(up);
btn->setOnKeyPressDown_hdl(down);
_buttons.push_back({name, btn});
if (_buttons[_active_index].second->color() != _active_color)
_buttons[_active_index].second->color(_active_color);
}
void Menu::nextIndex() {
// change color of current item to default
_buttons[_active_index].second->color(_color);
// check if active index in vector range
if (++_active_index >= (int32_t)_buttons.size())
_active_index = 0;
// change color of next item to select color
_buttons[_active_index].second->color(_active_color);
}
void Menu::prevIndex() {
// change color of current item to default
_buttons[_active_index].second->color(_color);
// check if active index in vector range
if (--_active_index < 0)
_active_index = _buttons.size() - 1;
// change color of previous item to select color
_buttons[_active_index].second->color(_active_color);
}
std::shared_ptr<Button> Menu::selected() {
return _buttons[_active_index].second;
}
void Menu::render(Renderer::engine_renderer &renderer) {
for (auto it : _buttons)
it.second->render(renderer);
}
void Menu::update(double) {}
void Menu::set_active_color(int32_t color) {
_active_color = color;
}
void Menu::set_color(int32_t color) {
_color = color;
}
};
}
|
50f98b6428ce8bd9a1bd2cf962718236d7220116
|
52cacec1a8f389810465d2fbfa1b62f19b93c935
|
/yaris/Common/Mrc.cpp
|
f37fb9cd24ed8f05dfa5f95ec8f4d240861c4938
|
[] |
no_license
|
michel-launier/yaris
|
33905ef0adb88101fffad0d205eac49403256485
|
fb82470585614f5b3ffca18e8cfdc72b1c25c11e
|
refs/heads/main
| 2023-08-18T23:00:54.470220
| 2021-10-02T03:23:48
| 2021-10-02T03:23:48
| 410,304,585
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 945
|
cpp
|
Mrc.cpp
|
//
// Mrc.cpp
// yaris
//
// Created by Michel Launier on 2021-09-28.
//
#include "Mrc.hpp"
// ---------------------------------------------------------------------------
/// Creation & destruction of the MRC pointer
///
_MrcPtr::_MrcPtr(Mrc* p) { if (p != 0) p->retain(); ptr = p; }
_MrcPtr::~_MrcPtr() { if (ptr != 0) ptr->release(); }
// ---------------------------------------------------------------------------
/// Reassignment of the MRC pointer.
///
Mrc* _MrcPtr::assign(Mrc* p) {
if (p != ptr) {
if (p != 0) p->retain();
if (ptr != 0) ptr->release();
ptr = p;
}
return ptr;
}
// ---------------------------------------------------------------------------
/// Reassignment of the MRC pointer.
///
Mrc* _MrcPtr::assign(_MrcPtr p) {
if (p.ptr != ptr) {
if (p.ptr != 0) p.ptr->retain();
if (ptr != 0) ptr->release();
ptr = p.ptr;
}
return ptr;
}
|
79a9ed58a014ecc10d23009016611892a21aad5c
|
d024ccbb4cc04af3866a4db1ac1d8c1d7395d909
|
/boj/11575 Affine Cipher.cpp
|
cf25937f55e718a470a6283a412c8c20e277980b
|
[] |
no_license
|
demetoir/ps-solved-code
|
ff0418dddd10f3b053c9b8d32af48027b10c8481
|
f4d4fd2183176b083f2287c9d89c6d5a1e983cc5
|
refs/heads/master
| 2022-10-14T20:11:34.581439
| 2020-06-12T11:24:11
| 2020-06-12T11:24:11
| 68,782,768
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 803
|
cpp
|
11575 Affine Cipher.cpp
|
#include <stdio.h>
#include <vector>
#include <set>
#include <algorithm>
#include <queue>
#include <math.h>
#include <iostream>
#include <stack>
#include <string>
#include <string.h>
using namespace std;
#define LL long long
#define MP pair < int,int>
#define si(a) scanf("%d",&(a))
#define sLL(a) scanf("%lld",&(a))
#define sS(a) scanf("%s",a)
#define INF 1234567890
#define INFLL 12345678912345678
////////////////////////////////////////////////////////////////////////////////
int a, b;
char str[1000001];
int main() {
int testcase;
si(testcase);
for (int test = 0; test < testcase; test++) {
memset(str, 0, sizeof(str));
scanf("%d%d%s", &a, &b, str);
for (int i = 0; str[i] != 0; i++) {
str[i] = (((str[i] - 'A')*a + b) % 26) + 'A';
}
puts(str);
}
return 0;
}
|
a75cd3c8e50faab95876f51497c05811b24b0f6a
|
b22588340d7925b614a735bbbde1b351ad657ffc
|
/athena/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/components/ISF_FatrasDetDescrTools_entries.cxx
|
d0dabb9c1c700cd599b5967c6e6bae014b6bf750
|
[] |
no_license
|
rushioda/PIXELVALID_athena
|
90befe12042c1249cbb3655dde1428bb9b9a42ce
|
22df23187ef85e9c3120122c8375ea0e7d8ea440
|
refs/heads/master
| 2020-12-14T22:01:15.365949
| 2020-01-19T03:59:35
| 2020-01-19T03:59:35
| 234,836,993
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 640
|
cxx
|
ISF_FatrasDetDescrTools_entries.cxx
|
#include "GaudiKernel/DeclareFactoryEntries.h"
#include "ISF_FatrasDetDescrTools/PlanarDetLayerBuilder.h"
#include "ISF_FatrasDetDescrTools/InputLayerMaterialProvider.h"
#include "ISF_FatrasDetDescrTools/LayerMaterialProvider.h"
using namespace iFatras;
DECLARE_TOOL_FACTORY( PlanarDetLayerBuilder )
DECLARE_TOOL_FACTORY( InputLayerMaterialProvider )
DECLARE_TOOL_FACTORY( LayerMaterialProvider )
/** factory entries need to have the name of the package */
DECLARE_FACTORY_ENTRIES( ISF_FatrasDetDescrTools )
{
DECLARE_TOOL( PlanarDetLayerBuilder )
DECLARE_TOOL( InputLayerMaterialProvider )
DECLARE_TOOL( LayerMaterialProvider )
}
|
4ff6c178a3e52c15f26fa2aa45d9f9ed55e00f3c
|
f73caed888febd9216c7f94639c25042f0136b0d
|
/Source/BattleTanks/Private/TankAIController.cpp
|
5712ddaa67f921216c77afb527aa5fa63a7ea0b0
|
[] |
no_license
|
kacperluk/BattleTanks_Final_Version
|
e063315ab0d897f4514370df0c86efe0dc8026ac
|
906d1efc2e8ca4635713f25e2a13b95b4e947e7c
|
refs/heads/master
| 2022-01-11T17:14:18.376003
| 2019-05-31T18:35:47
| 2019-05-31T18:35:47
| 187,662,040
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,543
|
cpp
|
TankAIController.cpp
|
// Fill out your copyright notice in the Description page of Project Settings.
#include "TankAIController.h"
#include "Tank.h"
#include "TankAiminngComponent.h"
#include "TankPlayerController.h"
#include "Tank.h"
#include "Engine/World.h"
void ATankAIController::BeginPlay()
{
Super::BeginPlay();
}
void ATankAIController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (bControlledTankAlive != true) { return; }
auto PlayerTank = GetWorld()->GetFirstPlayerController()->GetPawn();
auto ControlledTank = Cast<ATank>(GetPawn());
auto AimingComponent = ControlledTank->FindComponentByClass<UTankAiminngComponent>();
//if (!ensure(AimingComponent)) { return; }
if(PlayerTank)
{
MoveToActor(PlayerTank, AcceptanceRadius);
//Aim towards player
AimingComponent->AimAt(PlayerTank->GetActorLocation());
//If aiming or locked
auto FiringStatus = AimingComponent->GetFiringState();
if(FiringStatus == EFiringStatus::Locked)
AimingComponent->Fire(); // TODO Dont fire every frame like a retard
return;
}
}
void ATankAIController::SetPawn(APawn* InPawn)
{
Super::SetPawn(InPawn);
if(InPawn)
{
auto PossesedTank = Cast<ATank>(InPawn);
if (!(PossesedTank)) { return; }
// Subscribe our local method to the tanks death event
PossesedTank->OnTankDeath.AddUniqueDynamic(this, &ATankAIController::OnTankDeath);
}
}
void ATankAIController::OnTankDeath()
{
UE_LOG(LogTemp, Warning, TEXT("%s DIED"), *this->GetName());
bControlledTankAlive = false;
}
|
7d182453cbee41c0cb2592d95ce368b86d7c7ba3
|
c963f96d5715a03c18ebc8489a9b1c9c63a8c086
|
/first_steps/2_3/main.cpp
|
c06b0398f7c077cc48232fb6acb2c178eea40362
|
[] |
no_license
|
barabun/first_steps_mediapipe
|
650728a3864b0ff6f76385a2505e222635fb0583
|
c17432a15ffe260b54babafbbef03ddf25203588
|
refs/heads/master
| 2023-04-22T00:02:17.683101
| 2021-04-29T07:56:06
| 2021-04-29T07:56:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,274
|
cpp
|
main.cpp
|
/// Example 2.3 : Video pipeline with ImageCroppingCalculator (dynamic crop)
/// By Oleksiy Grechnyev, IT-JIM
/// Here I show how to use ImageCroppingCalculator with a dynamic crop
/// Translation: the cropping rect is no longer supplied in calculator options,
/// But cropping rects for each frame come from a separate input stream in_rect
/// ACHTUNG! This pipeline is still NOT real-time!
#include <iostream>
#include <string>
#include <memory>
#include <atomic>
#include <mutex>
#include <cmath>
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/formats/image_frame.h"
#include "mediapipe/framework/formats/image_frame_opencv.h"
#include "mediapipe/framework/port/parse_text_proto.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/port/opencv_highgui_inc.h"
#include "mediapipe/framework/port/opencv_imgproc_inc.h"
#include "mediapipe/framework/formats/rect.pb.h"
//==============================================================================
mediapipe::Status run() {
using namespace std;
using namespace mediapipe;
// A graph with ImageCroppingCalculator
// Here we have a second inpt stream in_rect
// Which contains the cropping rect for each frame, note the tag RECT
string protoG = R"(
input_stream: "in"
input_stream: "in_rect"
output_stream: "out"
node {
calculator: "ImageCroppingCalculator"
input_stream: "IMAGE:in"
input_stream: "RECT:in_rect"
output_stream: "IMAGE:out"
}
)";
// Parse config and create graph
CalculatorGraphConfig config;
if (!ParseTextProto<mediapipe::CalculatorGraphConfig>(protoG, &config)) {
return absl::InternalError("Cannot parse the graph config !");
}
CalculatorGraph graph;
MP_RETURN_IF_ERROR(graph.Initialize(config));
// Mutex protecting imshow() and the stop flag
mutex mutexImshow;
atomic_bool flagStop(false);
// Add observer to "out", then start the graph
// This callback displays the frame on the screen
auto cb = [&mutexImshow, &flagStop](const Packet &packet)->Status{
// Get cv::Mat from the packet
const ImageFrame & outputFrame = packet.Get<ImageFrame>();
cv::Mat ofMat = formats::MatView(&outputFrame);
cv::Mat frameOut;
cvtColor(ofMat, frameOut, cv::COLOR_RGB2BGR);
cout << packet.Timestamp() << ": RECEIVED VIDEO PACKET size = " << frameOut.size() << endl;
{
lock_guard<mutex> lock(mutexImshow);
// Display frame on screen and quit on ESC
cv::imshow("frameOut", frameOut);
if (27 == cv::waitKey(1)){
cout << "It's time to QUIT !" << endl;
flagStop = true;
}
}
return OkStatus();
};
MP_RETURN_IF_ERROR(graph.ObserveOutputStream("out", cb));
graph.StartRun({});
// Start the camera and check that it works
cv::VideoCapture cap(cv::CAP_ANY);
if (!cap.isOpened())
return absl::NotFoundError("CANNOT OPEN CAMERA !");
cv::Mat frameIn, frameInRGB;
// Camera loop, runs until we get flagStop == true
for (int i=0; !flagStop ; ++i){
// Read next frame from camera
cap.read(frameIn);
if (frameIn.empty())
return absl::NotFoundError("CANNOT OPEN CAMERA !");
cout << "SIZE_IN = " << frameIn.size() << endl;
{
lock_guard<mutex> lock(mutexImshow);
cv::imshow("frameIn", frameIn);
}
// Convert it to a packet and send
cv::cvtColor(frameIn, frameInRGB, cv::COLOR_BGR2RGB);
ImageFrame *inputFrame = new ImageFrame(
ImageFormat::SRGB, frameInRGB.cols, frameInRGB.rows, ImageFrame::kDefaultAlignmentBoundary
);
frameInRGB.copyTo(formats::MatView(inputFrame));
Timestamp ts(i);
MP_RETURN_IF_ERROR(graph.AddPacketToInputStream("in",
Adopt(inputFrame).At(ts)
));
// Create a crop rect (center+width+height) for each frame
// Let's move the rect up and down for fun
int yc = int(frameIn.rows * (0.5 + 0.2 * cos(0.3 * i)));
Rect rect;
rect.set_width(0.8*frameIn.cols);
rect.set_height(0.4*frameIn.rows);
rect.set_x_center(frameIn.cols / 2);
rect.set_y_center(yc);
MP_RETURN_IF_ERROR(graph.AddPacketToInputStream("in_rect", MakePacket<Rect>(rect).At(ts)));
}
// Don't forget to close both input streams !
graph.CloseInputStream("in");
graph.CloseInputStream("in_rect");
// Wait for the graph to finish
MP_RETURN_IF_ERROR(graph.WaitUntilDone());
return OkStatus();
}
//==============================================================================
int main(int argc, char** argv){
using namespace std;
FLAGS_alsologtostderr = 1;
google::SetLogDestination(google::GLOG_INFO, ".");
google::InitGoogleLogging(argv[0]);
cout << "Example 2.3 : Video pipeline with ImageCroppingCalculator (dynamic crop)" << endl;
mediapipe::Status status = run();
cout << "status =" << status << endl;
cout << "status.ok() = " << status.ok() << endl;
return 0;
}
|
e1a006dbd1f467e5f9f3358dc4619395c5a9fe3d
|
61bd1270ec9722a9519f0311cf1ecc01f401b2fe
|
/Codeforces/1335/D.cpp
|
3a5bc092bcd6ea686cea8806538edaffed53a8c5
|
[] |
no_license
|
GonzaloPereira/CompetitiveProgramming
|
495aef87835d13b9f5491b8ac56ef0face9be428
|
ffc06d855ca021490cc071b92dd3aa84a978dd5b
|
refs/heads/main
| 2021-11-19T03:34:46.578008
| 2021-08-10T00:46:29
| 2021-08-10T00:46:29
| 190,089,378
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 603
|
cpp
|
D.cpp
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define FIO ios_base::sync_with_stdio(false), cin.tie(NULL);
#define N 100
char ar[N][N];
int main(){
FIO;
int t; cin >> t;
while(t--){
for(int i = 0 ; i < 9 ; i++){
for(int j = 0 ; j < 9 ; j++){
cin >> ar[i][j];
if(ar[i][j]=='1') ar[i][j] = '2';
}
}
for(int i = 0 ; i < 9 ; i++){
for(int j = 0 ; j < 9 ; j++){
cout << ar[i][j];
}
cout << endl;
}
}
return 0;
}
|
53a1b6a13ec3d7334b1cca535fb415379ff0ce91
|
15568eb5834435a24538ac50368bb1cbf64049a1
|
/RU/Files/day2_LabWork/cases/t-junction-st/0.45/C2
|
9761dc12aee41f688589ce791f4ac5f4818d751d
|
[] |
no_license
|
lhp18/TwoDaysFoamProgrammingCourse
|
9a2c2de84c7d76ad80dd7392fc024b46b9b0e368
|
200206cdcb66e40fc360e579d6d2f8519b53dd5d
|
refs/heads/master
| 2021-05-30T16:26:52.957290
| 2016-01-05T17:03:59
| 2016-01-05T17:03:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 64,329
|
C2
|
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0.45";
object C2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField nonuniform List<scalar>
6400
(
0.00242908
0.00242619
0.00242247
0.00241845
0.00241424
0.00240988
0.00240538
0.00240073
0.00239592
0.00239095
0.00238583
0.00238054
0.00237508
0.00236944
0.00236363
0.00235763
0.00235143
0.00234505
0.00233845
0.00233165
0.00232463
0.00231739
0.00230992
0.00230222
0.00229427
0.00228607
0.00227761
0.00226888
0.00225987
0.00225058
0.00224099
0.0022311
0.0022209
0.00221037
0.0021995
0.00218829
0.00217672
0.00216479
0.00215247
0.00213976
0.00212664
0.0021131
0.00209912
0.0020847
0.00206981
0.00205444
0.00203858
0.0020222
0.0020053
0.00198784
0.00196982
0.00195121
0.00193199
0.00191215
0.00189166
0.0018705
0.00184864
0.00182606
0.00180275
0.00177866
0.00175378
0.00172809
0.00170154
0.00167412
0.00164579
0.00161652
0.00158629
0.00155506
0.00152281
0.00148949
0.00145507
0.00141952
0.00138281
0.0013449
0.00130577
0.00126536
0.00122366
0.00118063
0.00113625
0.00109049
0.00104332
0.000994743
0.00094474
0.000893316
0.000840488
0.000786286
0.00073076
0.000673984
0.000616063
0.000557136
0.000497385
0.00043705
0.000376477
0.000316225
0.000257162
0.000200397
0.000146837
9.80494e-05
5.65617e-05
2.58172e-05
0.00243184
0.00242896
0.0024253
0.00242134
0.00241721
0.00241293
0.0024085
0.00240393
0.0023992
0.00239433
0.00238929
0.00238409
0.00237872
0.00237318
0.00236746
0.00236156
0.00235546
0.00234918
0.00234269
0.002336
0.0023291
0.00232197
0.00231462
0.00230703
0.00229921
0.00229113
0.0022828
0.0022742
0.00226533
0.00225617
0.00224673
0.00223698
0.00222692
0.00221654
0.00220583
0.00219477
0.00218336
0.00217159
0.00215943
0.00214688
0.00213393
0.00212057
0.00210676
0.00209252
0.00207781
0.00206262
0.00204694
0.00203074
0.00201402
0.00199675
0.00197891
0.00196049
0.00194146
0.00192181
0.0019015
0.00188052
0.00185885
0.00183645
0.00181331
0.0017894
0.00176469
0.00173916
0.00171277
0.0016855
0.00165732
0.00162819
0.00159809
0.00156697
0.00153482
0.00150158
0.00146724
0.00143174
0.00139506
0.00135715
0.00131799
0.00127753
0.00123574
0.00119259
0.00114803
0.00110204
0.0010546
0.00100567
0.000955242
0.00090331
0.000849878
0.000794962
0.000738602
0.000680864
0.000621853
0.000561723
0.000500703
0.000439126
0.000377476
0.000316452
0.000256968
0.000200277
0.000147369
0.000100078
6.10144e-05
3.30878e-05
0.00243773
0.00243493
0.0024314
0.00242761
0.00242364
0.00241953
0.00241528
0.00241088
0.00240634
0.00240165
0.00239681
0.00239181
0.00238664
0.00238131
0.00237581
0.00237012
0.00236426
0.00235821
0.00235196
0.00234551
0.00233886
0.00233199
0.0023249
0.00231758
0.00231003
0.00230224
0.0022942
0.0022859
0.00227733
0.00226849
0.00225937
0.00224995
0.00224022
0.00223018
0.00221982
0.00220912
0.00219808
0.00218668
0.0021749
0.00216274
0.00215019
0.00213723
0.00212384
0.00211001
0.00209573
0.00208097
0.00206573
0.00204998
0.00203372
0.00201691
0.00199954
0.00198159
0.00196304
0.00194386
0.00192404
0.00190356
0.00188238
0.00186048
0.00183784
0.00181443
0.00179023
0.00176519
0.00173931
0.00171254
0.00168485
0.00165621
0.00162659
0.00159595
0.00156425
0.00153146
0.00149754
0.00146245
0.00142615
0.0013886
0.00134975
0.00130957
0.00126801
0.00122503
0.00118059
0.00113463
0.00108713
0.00103805
0.000987345
0.000934993
0.000880975
0.000825285
0.000767938
0.000708978
0.0006485
0.000586666
0.000523743
0.000460153
0.000396524
0.000333761
0.000273108
0.000215826
0.000162987
0.000116448
7.85212e-05
5.1651e-05
0.00244686
0.00244422
0.00244092
0.00243737
0.00243367
0.00242983
0.00242586
0.00242175
0.0024175
0.00241311
0.00240857
0.00240389
0.00239905
0.00239405
0.00238889
0.00238357
0.00237807
0.00237239
0.00236652
0.00236047
0.00235422
0.00234776
0.0023411
0.00233422
0.00232712
0.00231979
0.00231222
0.00230441
0.00229634
0.002288
0.0022794
0.00227052
0.00226134
0.00225187
0.00224208
0.00223198
0.00222154
0.00221076
0.00219962
0.00218811
0.00217622
0.00216394
0.00215125
0.00213813
0.00212458
0.00211057
0.00209609
0.00208112
0.00206564
0.00204964
0.0020331
0.00201599
0.0019983
0.00198
0.00196108
0.0019415
0.00192125
0.00190029
0.00187861
0.00185618
0.00183296
0.00180894
0.00178408
0.00175834
0.0017317
0.00170412
0.00167557
0.00164601
0.00161541
0.00158372
0.0015509
0.00151692
0.00148173
0.00144528
0.00140753
0.00136843
0.00132792
0.00128597
0.00124252
0.0011975
0.00115087
0.00110257
0.00105253
0.00100071
0.000947046
0.000891499
0.000834039
0.000774666
0.00071343
0.000650458
0.000586
0.000520483
0.000454581
0.000389298
0.000326029
0.000265961
0.000210282
0.000160928
0.000120315
9.14767e-05
0.0024592
0.0024568
0.00245382
0.00245062
0.00244728
0.00244382
0.00244023
0.00243651
0.00243267
0.0024287
0.00242459
0.00242035
0.00241597
0.00241144
0.00240676
0.00240192
0.00239693
0.00239177
0.00238645
0.00238095
0.00237526
0.00236939
0.00236333
0.00235707
0.0023506
0.00234392
0.00233702
0.0023299
0.00232254
0.00231493
0.00230708
0.00229896
0.00229057
0.00228191
0.00227296
0.00226371
0.00225415
0.00224427
0.00223406
0.00222351
0.0022126
0.00220132
0.00218966
0.00217761
0.00216514
0.00215225
0.00213892
0.00212513
0.00211086
0.00209611
0.00208084
0.00206504
0.0020487
0.00203178
0.00201428
0.00199616
0.0019774
0.00195798
0.00193788
0.00191706
0.00189551
0.00187319
0.00185008
0.00182614
0.00180134
0.00177566
0.00174905
0.00172148
0.00169292
0.00166332
0.00163264
0.00160085
0.0015679
0.00153373
0.00149831
0.00146158
0.00142349
0.00138396
0.00134295
0.00130038
0.00125618
0.00121027
0.00116256
0.00111295
0.00106136
0.00100768
0.00095182
0.000893697
0.000833271
0.000770566
0.000705718
0.000639032
0.000571052
0.00050266
0.000435155
0.000369678
0.000307603
0.000251226
0.000203807
0.000170402
0.0024746
0.00247252
0.00246995
0.0024672
0.00246432
0.00246133
0.00245823
0.00245503
0.0024517
0.00244827
0.00244471
0.00244104
0.00243724
0.00243331
0.00242925
0.00242506
0.00242072
0.00241624
0.00241161
0.00240683
0.00240188
0.00239678
0.0023915
0.00238604
0.00238041
0.00237458
0.00236856
0.00236234
0.00235592
0.00234928
0.00234241
0.00233532
0.00232798
0.0023204
0.00231257
0.00230447
0.00229609
0.00228743
0.00227848
0.00226922
0.00225965
0.00224975
0.0022395
0.00222891
0.00221795
0.00220661
0.00219488
0.00218274
0.00217018
0.00215718
0.00214372
0.0021298
0.00211538
0.00210045
0.002085
0.002069
0.00205243
0.00203526
0.00201749
0.00199908
0.00198001
0.00196025
0.00193978
0.00191858
0.0018966
0.00187383
0.00185023
0.00182577
0.00180041
0.00177411
0.00174685
0.00171858
0.00168925
0.00165882
0.00162724
0.00159445
0.0015604
0.00152502
0.00148824
0.00144999
0.00141017
0.00136867
0.0013254
0.00128022
0.00123298
0.00118353
0.0011317
0.00107731
0.00102018
0.000960176
0.000897238
0.000831411
0.000762938
0.00069233
0.000620527
0.000548702
0.000478373
0.000412408
0.000355591
0.000316247
0.00249279
0.00249111
0.00248904
0.00248682
0.0024845
0.00248208
0.00247958
0.00247698
0.00247429
0.0024715
0.00246862
0.00246564
0.00246255
0.00245936
0.00245606
0.00245264
0.00244911
0.00244546
0.00244169
0.00243778
0.00243375
0.00242958
0.00242527
0.00242081
0.00241621
0.00241144
0.00240652
0.00240143
0.00239617
0.00239073
0.00238511
0.0023793
0.00237328
0.00236707
0.00236064
0.002354
0.00234713
0.00234002
0.00233267
0.00232506
0.0023172
0.00230906
0.00230064
0.00229193
0.00228292
0.00227359
0.00226394
0.00225394
0.0022436
0.0022329
0.00222182
0.00221035
0.00219847
0.00218617
0.00217343
0.00216024
0.00214658
0.00213243
0.00211777
0.00210258
0.00208684
0.00207054
0.00205365
0.00203614
0.002018
0.00199919
0.0019797
0.00195948
0.00193853
0.00191679
0.00189425
0.00187085
0.00184658
0.00182137
0.00179519
0.00176799
0.0017397
0.00171027
0.00167962
0.00164767
0.00161433
0.00157949
0.00154302
0.00150477
0.00146456
0.00142221
0.00137746
0.00133006
0.00127972
0.00122613
0.00116899
0.00110806
0.00104316
0.00097425
0.000901626
0.000826455
0.000750213
0.000676195
0.000610881
0.000566354
0.00251334
0.00251212
0.00251063
0.00250903
0.00250735
0.0025056
0.00250378
0.00250189
0.00249993
0.0024979
0.00249579
0.00249361
0.00249135
0.00248901
0.00248659
0.00248409
0.0024815
0.00247882
0.00247604
0.00247317
0.0024702
0.00246713
0.00246396
0.00246068
0.00245728
0.00245377
0.00245014
0.00244639
0.0024425
0.00243849
0.00243434
0.00243004
0.0024256
0.00242101
0.00241626
0.00241135
0.00240627
0.00240102
0.00239558
0.00238996
0.00238414
0.00237812
0.0023719
0.00236545
0.00235878
0.00235188
0.00234474
0.00233734
0.00232969
0.00232177
0.00231357
0.00230508
0.00229628
0.00228718
0.00227775
0.00226799
0.00225788
0.00224741
0.00223656
0.00222532
0.00221368
0.00220162
0.00218913
0.00217618
0.00216277
0.00214887
0.00213446
0.00211953
0.00210404
0.00208798
0.00207133
0.00205405
0.00203611
0.00201749
0.00199814
0.00197803
0.00195709
0.00193529
0.00191256
0.00188882
0.001864
0.00183799
0.00181067
0.00178189
0.0017515
0.00171928
0.00168501
0.00164838
0.00160904
0.00156662
0.00152068
0.00147074
0.00141627
0.00135671
0.00129147
0.00122142
0.00114784
0.00107379
0.00100659
0.0009609
0.00253566
0.00253496
0.0025341
0.00253318
0.00253221
0.00253119
0.00253013
0.00252903
0.00252788
0.00252668
0.00252544
0.00252415
0.00252281
0.00252142
0.00251998
0.00251849
0.00251694
0.00251533
0.00251367
0.00251195
0.00251017
0.00250833
0.00250642
0.00250445
0.0025024
0.00250029
0.0024981
0.00249584
0.0024935
0.00249108
0.00248858
0.00248599
0.00248331
0.00248054
0.00247767
0.00247471
0.00247164
0.00246847
0.00246518
0.00246179
0.00245828
0.00245464
0.00245088
0.00244699
0.00244296
0.0024388
0.00243448
0.00243002
0.00242541
0.00242063
0.00241568
0.00241056
0.00240526
0.00239977
0.0023941
0.00238822
0.00238214
0.00237584
0.00236932
0.00236257
0.00235559
0.00234836
0.00234088
0.00233313
0.00232512
0.00231682
0.00230823
0.00229934
0.00229013
0.0022806
0.00227072
0.00226049
0.00224988
0.00223888
0.00222747
0.00221561
0.00220329
0.00219045
0.00217705
0.00216306
0.0021484
0.00213302
0.00211681
0.00209967
0.00208149
0.00206212
0.00204137
0.00201905
0.00199483
0.00196842
0.00193944
0.00190741
0.00187177
0.00183175
0.00178636
0.00173475
0.0016789
0.00162037
0.00156521
0.00152685
0.00255898
0.00255884
0.00255866
0.00255846
0.00255824
0.002558
0.00255774
0.00255747
0.00255717
0.00255686
0.00255653
0.00255618
0.00255581
0.00255543
0.00255502
0.0025546
0.00255416
0.0025537
0.00255322
0.00255271
0.00255219
0.00255165
0.00255108
0.0025505
0.00254989
0.00254925
0.0025486
0.00254792
0.00254721
0.00254648
0.00254573
0.00254494
0.00254413
0.00254329
0.00254243
0.00254153
0.0025406
0.00253963
0.00253864
0.00253761
0.00253654
0.00253544
0.0025343
0.00253312
0.0025319
0.00253064
0.00252934
0.00252799
0.0025266
0.00252516
0.00252367
0.00252214
0.00252055
0.00251891
0.00251722
0.00251548
0.00251368
0.00251183
0.00250992
0.00250795
0.00250592
0.00250384
0.00250169
0.00249949
0.00249723
0.00249491
0.00249253
0.00249009
0.00248759
0.00248503
0.00248242
0.00247974
0.00247699
0.00247418
0.0024713
0.00246834
0.00246529
0.00246215
0.00245891
0.00245553
0.002452
0.00244827
0.00244432
0.00244009
0.00243553
0.00243059
0.00242521
0.00241937
0.0024129
0.0024057
0.00239763
0.00238855
0.00237818
0.00236617
0.00235198
0.00233489
0.00231443
0.0022916
0.00226859
0.00225124
0.00258246
0.00258289
0.0025834
0.00258393
0.00258447
0.00258502
0.00258557
0.00258614
0.00258671
0.00258729
0.00258788
0.00258849
0.0025891
0.00258973
0.00259038
0.00259104
0.00259171
0.0025924
0.00259312
0.00259384
0.00259459
0.00259536
0.00259616
0.00259697
0.00259781
0.00259867
0.00259957
0.00260048
0.00260143
0.00260241
0.00260342
0.00260446
0.00260553
0.00260664
0.00260779
0.00260898
0.00261021
0.00261147
0.00261279
0.00261414
0.00261555
0.002617
0.0026185
0.00262006
0.00262168
0.00262335
0.00262508
0.00262687
0.00262873
0.00263066
0.00263266
0.00263474
0.0026369
0.00263914
0.00264146
0.00264388
0.00264639
0.002649
0.00265172
0.00265455
0.00265749
0.00266057
0.00266377
0.00266712
0.00267061
0.00267427
0.00267809
0.00268209
0.00268629
0.00269068
0.00269529
0.00270014
0.00270522
0.00271056
0.00271618
0.00272209
0.00272831
0.00273486
0.00274176
0.00274902
0.00275665
0.00276468
0.00277313
0.00278201
0.00279135
0.00280116
0.00281146
0.00282224
0.00283363
0.00284578
0.00285891
0.00287328
0.00288907
0.00290643
0.00292555
0.00294667
0.00297001
0.00299527
0.00302008
0.00303801
0.00260525
0.00260623
0.0026074
0.00260864
0.00260992
0.00261123
0.00261257
0.00261394
0.00261535
0.0026168
0.00261829
0.00261981
0.00262138
0.00262299
0.00262465
0.00262636
0.00262811
0.00262992
0.00263178
0.0026337
0.00263568
0.00263771
0.00263982
0.00264198
0.00264422
0.00264653
0.00264891
0.00265137
0.00265391
0.00265653
0.00265924
0.00266204
0.00266494
0.00266793
0.00267101
0.00267421
0.00267751
0.00268093
0.00268446
0.00268811
0.00269189
0.0026958
0.00269984
0.00270403
0.00270836
0.00271284
0.00271749
0.00272229
0.00272727
0.00273243
0.00273777
0.00274331
0.00274904
0.00275499
0.00276115
0.00276755
0.00277417
0.00278105
0.00278819
0.00279559
0.00280328
0.00281127
0.00281957
0.0028282
0.00283717
0.00284651
0.00285622
0.00286634
0.00287687
0.00288786
0.00289931
0.00291127
0.00292374
0.00293678
0.0029504
0.00296466
0.00297957
0.0029952
0.00301157
0.00302874
0.00304676
0.00306569
0.00308559
0.00310652
0.00312858
0.00315184
0.00317642
0.00320246
0.00323013
0.00325966
0.00329131
0.00332546
0.00336293
0.0034041
0.0034492
0.00349845
0.00355153
0.00360645
0.00365751
0.00369238
0.00262663
0.00262811
0.0026299
0.00263179
0.00263375
0.00263577
0.00263785
0.00263998
0.00264217
0.00264442
0.00264673
0.00264912
0.00265157
0.00265409
0.00265668
0.00265936
0.00266211
0.00266495
0.00266788
0.0026709
0.00267401
0.00267722
0.00268053
0.00268394
0.00268747
0.00269111
0.00269487
0.00269874
0.00270275
0.00270689
0.00271116
0.00271558
0.00272014
0.00272486
0.00272973
0.00273477
0.00273998
0.00274536
0.00275093
0.00275669
0.00276264
0.0027688
0.00277517
0.00278177
0.00278859
0.00279565
0.00280295
0.00281051
0.00281834
0.00282644
0.00283484
0.00284353
0.00285253
0.00286185
0.00287151
0.00288153
0.0028919
0.00290266
0.00291381
0.00292537
0.00293737
0.00294981
0.00296273
0.00297614
0.00299007
0.00300454
0.00301958
0.00303521
0.00305146
0.00306838
0.00308598
0.00310431
0.00312341
0.00314332
0.00316408
0.00318575
0.00320838
0.00323203
0.00325675
0.00328261
0.00330969
0.00333807
0.00336782
0.00339906
0.00343187
0.0034664
0.00350278
0.00354118
0.00358179
0.00362483
0.00367057
0.00371932
0.00377144
0.0038277
0.00388796
0.003952
0.00401874
0.00408529
0.00414511
0.00418536
0.002646
0.00264792
0.00265026
0.00265275
0.00265532
0.00265798
0.00266071
0.00266351
0.0026664
0.00266937
0.00267242
0.00267556
0.0026788
0.00268213
0.00268556
0.0026891
0.00269274
0.00269649
0.00270036
0.00270435
0.00270846
0.00271271
0.00271708
0.0027216
0.00272626
0.00273107
0.00273604
0.00274116
0.00274646
0.00275193
0.00275757
0.00276341
0.00276943
0.00277566
0.00278209
0.00278874
0.00279561
0.00280272
0.00281006
0.00281765
0.0028255
0.00283362
0.00284202
0.0028507
0.00285969
0.00286898
0.0028786
0.00288855
0.00289884
0.0029095
0.00292053
0.00293195
0.00294378
0.00295602
0.0029687
0.00298184
0.00299544
0.00300954
0.00302415
0.00303929
0.00305498
0.00307126
0.00308814
0.00310564
0.00312381
0.00314267
0.00316225
0.00318257
0.00320369
0.00322564
0.00324845
0.00327217
0.00329685
0.00332254
0.00334928
0.00337714
0.00340618
0.00343645
0.00346803
0.00350098
0.0035354
0.00357135
0.00360893
0.00364823
0.00368936
0.00373242
0.00377753
0.00382482
0.00387442
0.00392645
0.00398103
0.00403823
0.00409809
0.0041608
0.00422621
0.00429356
0.00436138
0.00442671
0.00448391
0.00452267
0.00266294
0.00266523
0.00266804
0.00267104
0.00267415
0.00267735
0.00268064
0.00268403
0.00268751
0.00269109
0.00269478
0.00269858
0.00270248
0.0027065
0.00271065
0.00271491
0.00271931
0.00272384
0.0027285
0.00273332
0.00273828
0.0027434
0.00274867
0.00275412
0.00275973
0.00276553
0.00277151
0.00277768
0.00278405
0.00279063
0.00279743
0.00280444
0.00281168
0.00281917
0.0028269
0.00283488
0.00284313
0.00285166
0.00286047
0.00286957
0.00287898
0.00288871
0.00289877
0.00290917
0.00291993
0.00293105
0.00294255
0.00295445
0.00296676
0.00297949
0.00299267
0.00300631
0.00302042
0.00303503
0.00305016
0.00306581
0.00308203
0.00309882
0.00311621
0.00313422
0.00315289
0.00317223
0.00319227
0.00321306
0.0032346
0.00325695
0.00328013
0.00330418
0.00332914
0.00335505
0.00338195
0.00340989
0.00343891
0.00346908
0.00350043
0.00353304
0.00356695
0.00360224
0.00363896
0.00367719
0.00371699
0.00375844
0.0038016
0.00384656
0.00389339
0.00394215
0.0039929
0.0040457
0.00410056
0.00415748
0.00421636
0.00427703
0.0043392
0.00440239
0.00446645
0.00453032
0.00459247
0.00465035
0.00469986
0.00473399
0.00267714
0.00267972
0.00268293
0.00268635
0.0026899
0.00269355
0.00269731
0.00270118
0.00270516
0.00270925
0.00271345
0.00271778
0.00272224
0.00272683
0.00273155
0.00273641
0.00274142
0.00274658
0.0027519
0.00275738
0.00276303
0.00276885
0.00277485
0.00278104
0.00278743
0.00279401
0.00280081
0.00280782
0.00281505
0.00282252
0.00283022
0.00283817
0.00284638
0.00285485
0.00286361
0.00287264
0.00288197
0.00289161
0.00290157
0.00291185
0.00292248
0.00293346
0.0029448
0.00295652
0.00296864
0.00298117
0.00299412
0.0030075
0.00302134
0.00303566
0.00305046
0.00306577
0.00308161
0.00309799
0.00311494
0.00313249
0.00315064
0.00316943
0.00318888
0.00320901
0.00322986
0.00325145
0.00327381
0.00329697
0.00332097
0.00334584
0.00337161
0.00339833
0.00342602
0.00345474
0.00348453
0.00351542
0.00354748
0.00358074
0.00361527
0.00365111
0.00368831
0.00372694
0.00376705
0.0038087
0.00385195
0.00389684
0.00394343
0.00399177
0.00404189
0.00409381
0.00414754
0.00420304
0.00426025
0.00431902
0.00437912
0.00444016
0.00450159
0.00456263
0.00462283
0.00468116
0.00473617
0.00478581
0.00482728
0.00485636
0.00268841
0.00269122
0.00269473
0.00269849
0.00270238
0.0027064
0.00271052
0.00271476
0.00271913
0.00272361
0.00272823
0.00273297
0.00273786
0.00274288
0.00274806
0.00275338
0.00275887
0.00276451
0.00277033
0.00277633
0.0027825
0.00278887
0.00279543
0.00280219
0.00280916
0.00281635
0.00282377
0.00283141
0.0028393
0.00284743
0.00285582
0.00286448
0.00287341
0.00288263
0.00289214
0.00290196
0.0029121
0.00292256
0.00293336
0.00294452
0.00295603
0.00296793
0.00298021
0.00299289
0.003006
0.00301953
0.00303352
0.00304797
0.0030629
0.00307832
0.00309427
0.00311075
0.00312779
0.00314541
0.00316362
0.00318245
0.00320193
0.00322207
0.0032429
0.00326445
0.00328675
0.00330982
0.00333369
0.0033584
0.00338397
0.00341045
0.00343786
0.00346624
0.00349564
0.00352608
0.00355762
0.00359028
0.00362413
0.0036592
0.00369554
0.0037332
0.00377223
0.00381267
0.00385457
0.00389798
0.00394293
0.00398947
0.00403762
0.00408741
0.00413884
0.0041919
0.00424654
0.0043027
0.00436024
0.00441896
0.00447854
0.00453852
0.00459825
0.00465688
0.00471357
0.0047675
0.00481729
0.00486118
0.00489706
0.00492237
0.00269668
0.00269964
0.00270337
0.00270737
0.00271152
0.00271579
0.00272018
0.0027247
0.00272934
0.00273411
0.00273902
0.00274407
0.00274926
0.0027546
0.0027601
0.00276576
0.00277158
0.00277758
0.00278376
0.00279012
0.00279667
0.00280343
0.00281038
0.00281755
0.00282494
0.00283255
0.0028404
0.0028485
0.00285684
0.00286545
0.00287432
0.00288347
0.00289291
0.00290264
0.00291269
0.00292305
0.00293374
0.00294477
0.00295615
0.0029679
0.00298002
0.00299254
0.00300545
0.00301879
0.00303255
0.00304676
0.00306144
0.00307659
0.00309223
0.00310839
0.00312508
0.00314232
0.00316013
0.00317853
0.00319753
0.00321717
0.00323747
0.00325844
0.00328011
0.00330251
0.00332567
0.00334961
0.00337436
0.00339994
0.0034264
0.00345376
0.00348206
0.00351133
0.0035416
0.00357291
0.0036053
0.00363881
0.00367348
0.00370934
0.00374644
0.00378482
0.00382452
0.00386558
0.00390803
0.00395192
0.00399726
0.00404408
0.0040924
0.00414222
0.00419352
0.00424629
0.00430045
0.00435592
0.00441256
0.00447015
0.00452838
0.00458682
0.00464488
0.00470178
0.00475656
0.00480845
0.00485617
0.00489799
0.00493186
0.00495568
0.00270197
0.00270501
0.00270887
0.00271302
0.00271733
0.00272177
0.00272633
0.00273102
0.00273584
0.00274079
0.00274588
0.00275112
0.00275651
0.00276205
0.00276775
0.00277362
0.00277966
0.00278587
0.00279227
0.00279886
0.00280565
0.00281264
0.00281985
0.00282727
0.00283491
0.00284279
0.00285091
0.00285928
0.00286791
0.0028768
0.00288597
0.00289542
0.00290517
0.00291522
0.00292559
0.00293628
0.0029473
0.00295868
0.00297041
0.00298251
0.002995
0.00300788
0.00302117
0.00303489
0.00304904
0.00306365
0.00307873
0.00309429
0.00311035
0.00312692
0.00314404
0.0031617
0.00317994
0.00319877
0.00321822
0.0032383
0.00325903
0.00328044
0.00330256
0.0033254
0.00334899
0.00337336
0.00339854
0.00342455
0.00345142
0.00347918
0.00350786
0.0035375
0.00356812
0.00359976
0.00363245
0.00366622
0.00370112
0.00373718
0.00377442
0.00381289
0.00385261
0.00389362
0.00393595
0.00397962
0.00402465
0.00407105
0.00411883
0.00416797
0.00421847
0.00427027
0.00432332
0.00437752
0.00443274
0.00448881
0.00454546
0.00460236
0.00465902
0.00471481
0.00476893
0.00482056
0.00486858
0.00491128
0.00494634
0.00497124
0.00270443
0.00270747
0.00271138
0.0027156
0.00271998
0.0027245
0.00272914
0.0027339
0.0027388
0.00274384
0.00274902
0.00275434
0.00275981
0.00276545
0.00277124
0.0027772
0.00278334
0.00278965
0.00279616
0.00280285
0.00280974
0.00281684
0.00282416
0.00283169
0.00283945
0.00284745
0.00285569
0.00286418
0.00287293
0.00288195
0.00289125
0.00290083
0.00291072
0.00292091
0.00293141
0.00294225
0.00295342
0.00296494
0.00297682
0.00298908
0.00300172
0.00301476
0.00302821
0.00304209
0.00305641
0.00307118
0.00308642
0.00310215
0.00311838
0.00313513
0.00315241
0.00317025
0.00318866
0.00320766
0.00322728
0.00324752
0.00326842
0.00329
0.00331227
0.00333527
0.00335901
0.00338352
0.00340884
0.00343497
0.00346196
0.00348983
0.00351861
0.00354833
0.00357901
0.0036107
0.00364342
0.0036772
0.00371207
0.00374807
0.00378523
0.00382357
0.00386313
0.00390393
0.003946
0.00398935
0.004034
0.00407996
0.00412722
0.00417577
0.0042256
0.00427664
0.00432885
0.00438214
0.00443638
0.00449145
0.00454714
0.00460319
0.00465922
0.0047146
0.00476855
0.00482028
0.00486884
0.00491281
0.00494998
0.00497735
1.01218e-05
1.01233e-05
1.26237e-05
1.61353e-05
2.0283e-05
2.49563e-05
3.01336e-05
3.58394e-05
4.2136e-05
4.91249e-05
5.69516e-05
6.58104e-05
7.59449e-05
8.76405e-05
0.000101198
0.000116867
0.000134701
0.000154244
0.00017384
0.000189084
1.97049e-05
2.05449e-05
2.49432e-05
3.09167e-05
3.78252e-05
4.54484e-05
5.37242e-05
6.26739e-05
7.23819e-05
8.29953e-05
9.4728e-05
0.000107864
0.000122756
0.000139804
0.000159414
0.00018189
0.000207208
0.000234546
0.000261311
0.000281235
3.94383e-05
4.2459e-05
4.99423e-05
5.95768e-05
7.04912e-05
8.2326e-05
9.49507e-05
0.000108368
0.000122684
0.000138101
0.000154918
0.000173532
0.000194423
0.000218126
0.000245159
0.000275869
0.000310115
0.000346615
0.000381704
0.000407023
8.03185e-05
8.67982e-05
9.87984e-05
0.000113469
0.000129719
0.000147052
0.000165255
0.0001843
0.000204312
0.000225553
0.000248421
0.000273446
0.000301254
0.000332526
0.000367896
0.000407738
0.00045173
0.000498018
0.000541692
0.000572112
0.000160838
0.000171865
0.000189609
0.000210464
0.000233066
0.000256784
0.000281326
0.000306634
0.00033285
0.000360299
0.00038949
0.00042109
0.000455877
0.000494682
0.000538255
0.00058696
0.000640216
0.000695481
0.000746493
0.000780636
0.000309069
0.000325033
0.00034883
0.000376028
0.000404955
0.00043484
0.000465325
0.00049633
0.000528014
0.000560758
0.000595191
0.0006321
0.000672399
0.000717061
0.000766923
0.000822298
0.000882278
0.000943569
0.000998634
0.00103413
0.000561912
0.000581741
0.000610067
0.000641824
0.000675076
0.000708936
0.000742995
0.000777161
0.000811605
0.000846782
0.000883395
0.000922296
0.000964477
0.00101101
0.00106278
0.00112002
0.00118146
0.00124311
0.0012967
0.00133032
0.000958427
0.000978972
0.00100774
0.00103956
0.00107245
0.00110545
0.00113816
0.00117048
0.00120264
0.00123516
0.00126866
0.00130393
0.00134195
0.00138378
0.00143031
0.00148166
0.00153628
0.0015898
0.0016344
0.0016616
0.00152465
0.00154081
0.0015634
0.00158816
0.00161339
0.00163825
0.00166244
0.00168594
0.00170905
0.00173211
0.00175552
0.00177984
0.00180584
0.00183438
0.00186626
0.00190151
0.00193865
0.0019738
0.00200134
0.00201673
0.00224877
0.00225488
0.00226364
0.00227311
0.0022825
0.00229138
0.00229965
0.00230736
0.00231455
0.00232126
0.00232764
0.00233383
0.0023402
0.00234701
0.00235468
0.00236326
0.00237218
0.00237994
0.00238458
0.00238549
0.00303957
0.00303258
0.00302266
0.00301166
0.00300024
0.00298875
0.00297715
0.00296526
0.00295294
0.00293998
0.00292621
0.00291132
0.00289495
0.00287668
0.00285611
0.0028334
0.00280977
0.00278729
0.00276833
0.0027556
0.00369357
0.00367812
0.00365649
0.00363249
0.00360757
0.00358237
0.00355713
0.00353178
0.00350596
0.00347925
0.00345119
0.00342119
0.00338846
0.00335219
0.00331174
0.00326726
0.00322047
0.00317547
0.00313831
0.00311513
0.00418708
0.00416848
0.00414231
0.00411308
0.00408247
0.00405125
0.0040197
0.00398783
0.00395538
0.00392185
0.00388655
0.00384874
0.00380746
0.00376176
0.00371088
0.00365484
0.00359524
0.00353647
0.00348661
0.00345549
0.00452641
0.004509
0.00448396
0.00445563
0.00442564
0.00439471
0.00436313
0.00433092
0.00429786
0.00426352
0.00422718
0.00418806
0.00414522
0.00409768
0.00404466
0.00398601
0.003923
0.00385949
0.00380372
0.0037682
0.00474029
0.00472659
0.00470595
0.00468214
0.00465656
0.00462984
0.00460224
0.00457377
0.00454425
0.00451329
0.00448028
0.00444451
0.0044051
0.00436117
0.00431196
0.0042572
0.00419777
0.0041368
0.00408159
0.00404552
0.00486481
0.00485552
0.00484033
0.0048223
0.00480258
0.00478167
0.00475979
0.00473694
0.00471297
0.00468754
0.00466019
0.00463027
0.00459706
0.00455981
0.00451782
0.00447074
0.00441914
0.0043654
0.00431548
0.00428159
0.00493223
0.00492689
0.00491672
0.00490414
0.00489008
0.00487494
0.00485887
0.00484187
0.00482379
0.00480439
0.00478328
0.00475996
0.00473386
0.00470433
0.0046708
0.0046329
0.00459095
0.00454667
0.0045047
0.00447513
0.00496648
0.00496408
0.00495778
0.00494957
0.00494017
0.00492989
0.00491882
0.00490693
0.0048941
0.00488015
0.00486479
0.00484764
0.00482826
0.00480615
0.00478083
0.00475197
0.00471971
0.00468523
0.00465198
0.00462782
0.00498307
0.00498251
0.00497883
0.00497375
0.00496782
0.00496121
0.00495398
0.00494608
0.00493744
0.00492789
0.00491725
0.00490525
0.00489156
0.0048758
0.0048576
0.00483668
0.00481306
0.0047875
0.00476243
0.00474371
0.00499122
0.00499133
0.00498924
0.00498625
0.00498269
0.00497864
0.00497412
0.0049691
0.00496351
0.00495726
0.0049502
0.00494215
0.00493289
0.00492216
0.00490967
0.0048952
0.0048787
0.00486058
0.0048424
0.00482826
2.90402e-52
2.89876e-52
2.89237e-52
2.88757e-52
2.88659e-52
2.89119e-52
2.90264e-52
2.92174e-52
2.94882e-52
2.98377e-52
3.02606e-52
3.07474e-52
3.12849e-52
3.18558e-52
3.24393e-52
3.30103e-52
3.354e-52
3.39958e-52
3.4342e-52
3.4539e-52
1.47324e-51
1.46911e-51
1.46477e-51
1.46144e-51
1.46022e-51
1.46201e-51
1.46747e-51
1.47698e-51
1.4907e-51
1.50856e-51
1.5303e-51
1.55544e-51
1.58329e-51
1.61299e-51
1.64348e-51
1.6735e-51
1.70159e-51
1.72608e-51
1.74518e-51
1.75707e-51
5.12603e-51
5.10473e-51
5.08357e-51
5.06711e-51
5.0591e-51
5.06248e-51
5.07949e-51
5.11148e-51
5.15903e-51
5.22194e-51
5.29925e-51
5.38927e-51
5.48963e-51
5.59728e-51
5.70847e-51
5.81881e-51
5.92316e-51
6.01589e-51
6.09084e-51
6.14128e-51
1.64355e-50
1.63414e-50
1.62507e-50
1.61795e-50
1.61391e-50
1.61389e-50
1.61856e-50
1.62839e-50
1.64356e-50
1.66404e-50
1.6895e-50
1.71941e-50
1.75299e-50
1.78926e-50
1.82696e-50
1.86467e-50
1.90075e-50
1.9334e-50
1.96069e-50
1.98027e-50
5.14503e-50
5.10754e-50
5.07123e-50
5.04244e-50
5.02473e-50
5.02084e-50
5.03286e-50
5.0622e-50
5.10954e-50
5.17472e-50
5.25681e-50
5.3541e-50
5.46413e-50
5.5837e-50
5.70887e-50
5.83508e-50
5.9572e-50
6.06974e-50
6.16659e-50
6.23871e-50
1.59781e-49
1.5836e-49
1.56981e-49
1.55873e-49
1.55154e-49
1.54908e-49
1.55197e-49
1.56064e-49
1.57531e-49
1.59592e-49
1.62221e-49
1.65362e-49
1.68938e-49
1.72849e-49
1.76971e-49
1.8116e-49
1.85261e-49
1.891e-49
1.92476e-49
1.95067e-49
4.9461e-49
4.89408e-49
4.84345e-49
4.80235e-49
4.77466e-49
4.763e-49
4.76929e-49
4.79479e-49
4.84014e-49
4.9052e-49
4.98909e-49
5.09014e-49
5.20592e-49
5.33329e-49
5.46841e-49
5.60687e-49
5.74377e-49
5.87368e-49
5.99005e-49
6.08142e-49
1.52839e-48
1.50981e-48
1.49168e-48
1.47685e-48
1.46658e-48
1.46171e-48
1.46282e-48
1.47029e-48
1.4843e-48
1.5048e-48
1.53153e-48
1.56396e-48
1.60135e-48
1.6427e-48
1.68685e-48
1.73243e-48
1.77792e-48
1.82159e-48
1.86131e-48
1.89309e-48
4.71669e-48
4.65155e-48
4.58787e-48
4.53545e-48
4.49844e-48
4.47945e-48
4.48029e-48
4.50208e-48
4.54535e-48
4.60993e-48
4.69497e-48
4.79886e-48
4.91926e-48
5.05319e-48
5.197e-48
5.34649e-48
5.49695e-48
5.6429e-48
5.77735e-48
5.88662e-48
1.45387e-47
1.43138e-47
1.40936e-47
1.39115e-47
1.37809e-47
1.37102e-47
1.37048e-47
1.37682e-47
1.39018e-47
1.4105e-47
1.43752e-47
1.47074e-47
1.50943e-47
1.55269e-47
1.5994e-47
1.64827e-47
1.69782e-47
1.74633e-47
1.79152e-47
1.82872e-47
4.47629e-47
4.39963e-47
4.32443e-47
4.26201e-47
4.21674e-47
4.19122e-47
4.18713e-47
4.20551e-47
4.24676e-47
4.31068e-47
4.39641e-47
4.50243e-47
4.62654e-47
4.76593e-47
4.91722e-47
5.07641e-47
5.23895e-47
5.39936e-47
5.55028e-47
5.67586e-47
1.37664e-46
1.35078e-46
1.32538e-46
1.30423e-46
1.28876e-46
1.27977e-46
1.27777e-46
1.28309e-46
1.29583e-46
1.31591e-46
1.34308e-46
1.37686e-46
1.41658e-46
1.46139e-46
1.51026e-46
1.56195e-46
1.61506e-46
1.66786e-46
1.71797e-46
1.76005e-46
4.22892e-46
4.14249e-46
4.05747e-46
3.98657e-46
3.9343e-46
3.9032e-46
3.89488e-46
3.91022e-46
3.94956e-46
4.01263e-46
4.09862e-46
4.20606e-46
4.33294e-46
4.47665e-46
4.63405e-46
4.8014e-46
4.97428e-46
5.14732e-46
5.31285e-46
5.45293e-46
1.29762e-45
1.26897e-45
1.24074e-45
1.21717e-45
1.19969e-45
1.1891e-45
1.18588e-45
1.19031e-45
1.20246e-45
1.22225e-45
1.24943e-45
1.28355e-45
1.324e-45
1.36999e-45
1.42055e-45
1.47456e-45
1.53065e-45
1.58713e-45
1.64155e-45
1.6879e-45
3.97715e-45
3.88285e-45
3.78981e-45
3.71204e-45
3.65412e-45
3.61852e-45
3.60668e-45
3.61943e-45
3.65698e-45
3.71905e-45
3.80485e-45
3.91303e-45
4.04172e-45
4.18854e-45
4.3506e-45
4.52441e-45
4.70577e-45
4.88943e-45
5.06751e-45
5.22005e-45
1.2176e-44
1.18676e-44
1.15629e-44
1.13081e-44
1.11176e-44
1.09992e-44
1.09571e-44
1.09939e-44
1.111e-44
1.13045e-44
1.1575e-44
1.19175e-44
1.23261e-44
1.27939e-44
1.3312e-44
1.38698e-44
1.44544e-44
1.50495e-44
1.56299e-44
1.61294e-44
3.72343e-44
3.62317e-44
3.52398e-44
3.44098e-44
3.3788e-44
3.33976e-44
3.32519e-44
3.33579e-44
3.3717e-44
3.43264e-44
3.51784e-44
3.62605e-44
3.75559e-44
3.9043e-44
4.06953e-44
4.24806e-44
4.43596e-44
4.62814e-44
4.81657e-44
4.97942e-44
1.13734e-43
1.10491e-43
1.0728e-43
1.04592e-43
1.02574e-43
1.01298e-43
1.00803e-43
1.0111e-43
1.02221e-43
1.04129e-43
1.06809e-43
1.10223e-43
1.14322e-43
1.1904e-43
1.24297e-43
1.29997e-43
1.36019e-43
1.42206e-43
1.48301e-43
1.53588e-43
3.4701e-43
3.36578e-43
3.26229e-43
3.17568e-43
3.11059e-43
3.06918e-43
3.05264e-43
3.06154e-43
3.09598e-43
3.15565e-43
3.23985e-43
3.34742e-43
3.47687e-43
3.62625e-43
3.79317e-43
3.97471e-43
4.1672e-43
4.36576e-43
4.56227e-43
4.73322e-43
1.05756e-42
1.02414e-42
9.9095e-43
9.63178e-43
9.42287e-43
9.28938e-43
9.2348e-43
9.26078e-43
9.36756e-43
9.55412e-43
9.81833e-43
1.01567e-42
1.05649e-42
1.10369e-42
1.15658e-42
1.21426e-42
1.27563e-42
1.33917e-42
1.40233e-42
1.4574e-42
3.21939e-42
3.11282e-42
3.00682e-42
2.91816e-42
2.85143e-42
2.80866e-42
2.79085e-42
2.79849e-42
2.83162e-42
2.88991e-42
2.97273e-42
3.07903e-42
3.20748e-42
3.35638e-42
3.52358e-42
3.70645e-42
3.90162e-42
4.10446e-42
4.3068e-42
4.48363e-42
9.78934e-42
9.45081e-42
9.11364e-42
8.83176e-42
8.61963e-42
8.4833e-42
8.4258e-42
8.44845e-42
8.55129e-42
8.73333e-42
8.99261e-42
9.32605e-42
9.7297e-42
1.01985e-41
1.07261e-41
1.13046e-41
1.19238e-41
1.25695e-41
1.3216e-41
1.37819e-41
2.97334e-41
2.86621e-41
2.75937e-41
2.6701e-41
2.60293e-41
2.55971e-41
2.5413e-41
2.54808e-41
2.58003e-41
2.63685e-41
2.71793e-41
2.82238e-41
2.94901e-41
3.09634e-41
3.26249e-41
3.44512e-41
3.64115e-41
3.84622e-41
4.05219e-41
4.23276e-41
9.02088e-41
8.68306e-41
8.34569e-41
8.06403e-41
7.85223e-41
7.71583e-41
7.65738e-41
7.67787e-41
7.77721e-41
7.95442e-41
8.20772e-41
8.53443e-41
8.93109e-41
9.39332e-41
9.91561e-41
1.0491e-40
1.11102e-40
1.176e-40
1.24145e-40
1.2989e-40
2.73381e-40
2.62764e-40
2.52148e-40
2.43291e-40
2.36637e-40
2.32352e-40
2.30509e-40
2.31136e-40
2.34226e-40
2.3975e-40
2.47655e-40
2.5786e-40
2.70266e-40
2.84744e-40
3.01133e-40
3.19225e-40
3.38746e-40
3.59286e-40
3.80035e-40
3.98262e-40
8.27568e-40
7.94309e-40
7.61008e-40
7.33253e-40
7.12422e-40
6.99017e-40
6.93248e-40
6.95185e-40
7.04805e-40
7.22014e-40
7.46654e-40
7.78493e-40
8.17236e-40
8.6251e-40
9.13844e-40
9.70629e-40
1.03204e-39
1.09684e-39
1.16246e-39
1.22014e-39
2.50241e-39
2.39854e-39
2.2944e-39
2.20769e-39
2.1427e-39
2.10094e-39
2.08299e-39
2.08904e-39
2.119e-39
2.17258e-39
2.24931e-39
2.34851e-39
2.46933e-39
2.61069e-39
2.77122e-39
2.94913e-39
3.14197e-39
3.34593e-39
3.553e-39
3.73508e-39
7.55845e-39
7.23501e-39
6.91035e-39
6.64027e-39
6.43817e-39
6.30853e-39
6.25304e-39
6.27214e-39
6.36549e-39
6.53221e-39
6.77091e-39
7.0796e-39
7.45585e-39
7.89654e-39
8.39771e-39
8.95414e-39
9.55856e-39
1.01994e-38
1.08513e-38
1.14248e-38
2.2805e-38
2.18007e-38
2.07913e-38
1.99526e-38
1.9326e-38
1.89251e-38
1.87546e-38
1.88154e-38
1.91064e-38
1.96248e-38
2.03666e-38
2.13261e-38
2.24962e-38
2.3868e-38
2.54303e-38
2.71677e-38
2.90587e-38
3.10681e-38
3.31167e-38
3.49188e-38
6.87313e-38
6.56211e-38
6.24915e-38
5.98939e-38
5.79574e-38
5.67219e-38
5.62008e-38
5.63959e-38
5.73033e-38
5.89144e-38
6.12175e-38
6.4196e-38
6.78301e-38
7.20946e-38
7.6957e-38
8.23732e-38
8.82797e-38
9.45689e-38
1.00993e-37
1.06644e-37
2.06922e-37
1.97315e-37
1.87637e-37
1.79614e-37
1.73646e-37
1.69852e-37
1.68269e-37
1.68899e-37
1.71729e-37
1.76732e-37
1.83876e-37
1.93112e-37
2.04384e-37
2.17623e-37
2.32734e-37
2.49593e-37
2.68011e-37
2.87661e-37
3.07769e-37
3.25452e-37
6.22284e-37
5.92686e-37
5.62835e-37
5.3812e-37
5.19778e-37
5.08165e-37
5.0338e-37
5.05425e-37
5.14252e-37
5.29783e-37
5.51919e-37
5.80526e-37
6.15449e-37
6.56491e-37
7.0339e-37
7.55785e-37
8.13125e-37
8.7442e-37
9.37239e-37
9.92467e-37
1.8694e-36
1.77844e-36
1.68659e-36
1.61064e-36
1.55443e-36
1.519e-36
1.50463e-36
1.51129e-36
1.53882e-36
1.58699e-36
1.65553e-36
1.74404e-36
1.8521e-36
1.97918e-36
2.12453e-36
2.28714e-36
2.46538e-36
2.65626e-36
2.85218e-36
3.02434e-36
5.60988e-36
5.33095e-36
5.04902e-36
4.81623e-36
4.64439e-36
4.53665e-36
4.49373e-36
4.51547e-36
4.60136e-36
4.7507e-36
4.96268e-36
5.23625e-36
5.57025e-36
5.96321e-36
6.41312e-36
6.91706e-36
7.47033e-36
8.06381e-36
8.67378e-36
9.20948e-36
1.68167e-35
1.59635e-35
1.51e-35
1.43882e-35
1.38643e-35
1.35377e-35
1.34103e-35
1.34813e-35
1.37492e-35
1.42119e-35
1.4867e-35
1.57117e-35
1.67429e-35
1.79566e-35
1.93474e-35
2.09071e-35
2.2622e-35
2.44645e-35
2.63605e-35
2.80245e-35
5.03582e-35
4.77537e-35
4.51155e-35
4.29437e-35
4.13505e-35
4.03636e-35
3.99877e-35
4.02202e-35
4.10557e-35
4.24881e-35
4.45109e-35
4.71164e-35
5.02965e-35
5.40409e-35
5.8335e-35
6.31562e-35
6.84643e-35
7.4176e-35
8.00602e-35
8.52203e-35
1.5064e-34
1.42708e-34
1.34664e-34
1.28054e-34
1.23221e-34
1.20248e-34
1.19146e-34
1.19907e-34
1.22512e-34
1.26944e-34
1.33184e-34
1.41214e-34
1.51011e-34
1.6255e-34
1.75792e-34
1.90676e-34
2.07085e-34
2.24766e-34
2.43e-34
2.58976e-34
4.50149e-34
4.2604e-34
4.01572e-34
3.81495e-34
3.6687e-34
3.5794e-34
3.54736e-34
3.57221e-34
3.65342e-34
3.79046e-34
3.98284e-34
4.23004e-34
4.53156e-34
4.88677e-34
5.29469e-34
5.75362e-34
6.26021e-34
6.80683e-34
7.37102e-34
7.86487e-34
1.34375e-33
1.27063e-33
1.19635e-33
1.13551e-33
1.09136e-33
1.06463e-33
1.05538e-33
1.06349e-33
1.0888e-33
1.13114e-33
1.1904e-33
1.26644e-33
1.35914e-33
1.46837e-33
1.59389e-33
1.73524e-33
1.89145e-33
2.06022e-33
2.23454e-33
2.38697e-33
4.00709e-33
3.78577e-33
3.56076e-33
3.37677e-33
3.24381e-33
3.16403e-33
3.13757e-33
3.16401e-33
3.24283e-33
3.37361e-33
3.55599e-33
3.78968e-33
4.07445e-33
4.41001e-33
4.79583e-33
5.23068e-33
5.7118e-33
6.2322e-33
6.77011e-33
7.23991e-33
1.19368e-32
1.12683e-32
1.05881e-32
1.00329e-32
9.63342e-33
9.39606e-33
9.32108e-33
9.40711e-33
9.65255e-33
1.00561e-32
1.06171e-32
1.13346e-32
1.22086e-32
1.32385e-32
1.44232e-32
1.57596e-32
1.72397e-32
1.88425e-32
2.05001e-32
2.19461e-32
3.55224e-32
3.35071e-32
3.14546e-32
2.97828e-32
2.85854e-32
2.78816e-32
2.76716e-32
2.79509e-32
2.87148e-32
2.99596e-32
3.16834e-32
3.3885e-32
3.65648e-32
3.97227e-32
4.3357e-32
4.74598e-32
5.20085e-32
5.6939e-32
6.20408e-32
6.64851e-32
1.05601e-31
9.95374e-32
9.33569e-32
8.83331e-32
8.47525e-32
8.26722e-32
8.20918e-32
8.29969e-32
8.5373e-32
8.92099e-32
9.45038e-32
1.01253e-31
1.09463e-31
1.19138e-31
1.30276e-31
1.42859e-31
1.56824e-31
1.71974e-31
1.87658e-31
2.013e-31
3.1361e-31
2.954e-31
2.76825e-31
2.61759e-31
2.51077e-31
2.44949e-31
2.43371e-31
2.46298e-31
2.53685e-31
2.65504e-31
2.8175e-31
3.02427e-31
3.27558e-31
3.57171e-31
3.91277e-31
4.29834e-31
4.72661e-31
5.19167e-31
5.67322e-31
6.09145e-31
9.30395e-31
8.75809e-31
8.2009e-31
7.74997e-31
7.43204e-31
7.2522e-31
7.2102e-31
7.30461e-31
7.53412e-31
7.898e-31
8.39621e-31
9.02915e-31
9.79786e-31
1.07035e-30
1.17469e-30
1.29273e-30
1.42395e-30
1.56656e-30
1.71425e-30
1.84232e-30
2.75741e-30
2.59409e-30
2.42726e-30
2.29257e-30
2.19817e-30
2.14558e-30
2.1347e-30
2.16509e-30
2.23636e-30
2.34831e-30
2.501e-30
2.69461e-30
2.92956e-30
3.20632e-30
3.52527e-30
3.8863e-30
4.28798e-30
4.72486e-30
5.17736e-30
5.56909e-30
8.16383e-30
7.67599e-30
7.17742e-30
6.7759e-30
6.49628e-30
6.34311e-30
6.31602e-30
6.41363e-30
6.63479e-30
6.97904e-30
7.44665e-30
8.03848e-30
8.75604e-30
9.60114e-30
1.05753e-29
1.16787e-29
1.29071e-29
1.42442e-29
1.56292e-29
1.68262e-29
2.41459e-29
2.26912e-29
2.12039e-29
2.00094e-29
1.91832e-29
1.8739e-29
1.86754e-29
1.89882e-29
1.96741e-29
2.0732e-29
2.21632e-29
2.3971e-29
2.6161e-29
2.87396e-29
3.17127e-29
3.50819e-29
3.88358e-29
4.29244e-29
4.71593e-29
5.08132e-29
7.13428e-29
6.7012e-29
6.25836e-29
5.90372e-29
5.66021e-29
5.53195e-29
5.51848e-29
5.61852e-29
5.8311e-29
6.15599e-29
6.59377e-29
7.14564e-29
7.81355e-29
8.59978e-29
9.50647e-29
1.05345e-28
1.16806e-28
1.29297e-28
1.42234e-28
1.53378e-28
2.10577e-28
1.97705e-28
1.84543e-28
1.74036e-28
1.66878e-28
1.63193e-28
1.62966e-28
1.66158e-28
1.72742e-28
1.82714e-28
1.96097e-28
2.12933e-28
2.3329e-28
2.57246e-28
2.84876e-28
3.16218e-28
3.51185e-28
3.89313e-28
4.288e-28
4.62758e-28
6.209e-28
5.82707e-28
5.43658e-28
5.1259e-28
4.91606e-28
4.81075e-28
4.80952e-28
4.91119e-28
5.11498e-28
5.42089e-28
5.82974e-28
6.34305e-28
6.96307e-28
7.6925e-28
8.53394e-28
9.4888e-28
1.05548e-27
1.17177e-27
1.29219e-27
1.39557e-27
1.82886e-27
1.71572e-27
1.60008e-27
1.50842e-27
1.44707e-27
1.41716e-27
1.41853e-27
1.45084e-27
1.51388e-27
1.60767e-27
1.73251e-27
1.88891e-27
2.07764e-27
2.2996e-27
2.55567e-27
2.84637e-27
3.17108e-27
3.5255e-27
3.89242e-27
4.20694e-27
5.3812e-27
5.04661e-27
4.70481e-27
4.43493e-27
4.25611e-27
4.17172e-27
4.18129e-27
4.28379e-27
4.47864e-27
4.76601e-27
5.14698e-27
5.62326e-27
6.1974e-27
6.87237e-27
7.65113e-27
8.53558e-27
9.524e-27
1.06033e-26
1.17205e-26
1.26765e-26
1.58167e-26
1.48288e-26
1.38204e-26
1.30276e-26
1.2508e-26
1.22717e-26
1.23174e-26
1.26419e-26
1.32438e-26
1.41238e-26
1.52857e-26
1.67353e-26
1.84809e-26
2.05322e-26
2.28991e-26
2.55882e-26
2.85949e-26
3.18794e-26
3.52781e-26
3.81821e-26
4.64387e-26
4.35271e-26
4.05576e-26
3.82338e-26
3.6729e-26
3.60734e-26
3.62628e-26
3.72885e-26
3.91463e-26
4.184e-26
4.53819e-26
4.97912e-26
5.50953e-26
6.13259e-26
6.85153e-26
7.6686e-26
8.58261e-26
9.58142e-26
1.06147e-25
1.14961e-25
1.36197e-25
1.2763e-25
1.18902e-25
1.12107e-25
1.07764e-25
1.05964e-25
1.06695e-25
1.09931e-25
1.15662e-25
1.23902e-25
1.34693e-25
1.48098e-25
1.64206e-25
1.8312e-25
2.04945e-25
2.29756e-25
2.57523e-25
2.87877e-25
3.19267e-25
3.46001e-25
3.98993e-25
3.73829e-25
3.48231e-25
3.28409e-25
3.15923e-25
3.11044e-25
3.13736e-25
3.23927e-25
3.41594e-25
3.66788e-25
3.99649e-25
4.40382e-25
4.89274e-25
5.46658e-25
6.12874e-25
6.88172e-25
7.72476e-25
8.6466e-25
9.59957e-25
1.04099e-24
1.16752e-24
1.09374e-24
1.01881e-24
9.61139e-25
9.25386e-25
9.12371e-25
9.21987e-25
9.5403e-25
1.00845e-24
1.08544e-24
1.18546e-24
1.30917e-24
1.45749e-24
1.6315e-24
1.83229e-24
2.06067e-24
2.31648e-24
2.59626e-24
2.88539e-24
3.13083e-24
3.41236e-24
3.19643e-24
2.97756e-24
2.81021e-24
2.70829e-24
2.67427e-24
2.70784e-24
2.80843e-24
2.97596e-24
3.21111e-24
3.51537e-24
3.89091e-24
4.34067e-24
4.86806e-24
5.47658e-24
6.16891e-24
6.94464e-24
7.79331e-24
8.66994e-24
9.41289e-24
9.96141e-24
9.33065e-24
8.69272e-24
8.20847e-24
7.9194e-24
7.83286e-24
7.94802e-24
8.2633e-24
8.7787e-24
9.49654e-24
1.04217e-23
1.15612e-23
1.29243e-23
1.45219e-23
1.63652e-23
1.84628e-23
2.08139e-23
2.33867e-23
2.6043e-23
2.82906e-23
2.90434e-23
2.72044e-23
2.53493e-23
2.39523e-23
2.3137e-23
2.29252e-23
2.33148e-23
2.43015e-23
2.5886e-23
2.80763e-23
3.0888e-23
3.43437e-23
3.8473e-23
4.33104e-23
4.88912e-23
5.52434e-23
6.23656e-23
7.01605e-23
7.82048e-23
8.50002e-23
8.45704e-23
7.92194e-23
7.38377e-23
6.98205e-23
6.7535e-23
6.70468e-23
6.835e-23
7.14335e-23
7.63016e-23
8.29811e-23
9.15229e-23
1.01998e-22
1.14502e-22
1.29142e-22
1.4603e-22
1.65257e-22
1.86821e-22
2.10425e-22
2.34772e-22
2.55306e-22
2.45932e-22
2.30394e-22
2.1482e-22
2.03309e-22
1.96948e-22
1.95934e-22
2.00253e-22
2.09875e-22
2.24821e-22
2.45181e-22
2.71118e-22
3.0286e-22
3.40702e-22
3.84989e-22
4.36075e-22
4.94241e-22
5.59496e-22
6.30936e-22
7.04586e-22
7.66598e-22
7.14192e-22
6.69172e-22
6.24223e-22
5.91359e-22
5.73803e-22
5.72141e-22
5.86337e-22
6.16324e-22
6.62183e-22
7.24212e-22
8.02934e-22
8.99071e-22
1.01356e-21
1.14747e-21
1.30192e-21
1.47782e-21
1.67519e-21
1.8913e-21
2.11397e-21
2.30115e-21
2.07107e-21
1.94092e-21
1.81156e-21
1.71812e-21
1.67014e-21
1.66936e-21
1.7157e-21
1.80903e-21
1.94964e-21
2.13853e-21
2.37736e-21
2.66841e-21
3.01462e-21
3.41938e-21
3.88616e-21
4.4178e-21
5.01453e-21
5.66795e-21
6.34083e-21
6.90552e-21
5.99694e-21
5.62159e-21
5.25037e-21
4.98592e-21
4.85631e-21
4.86677e-21
5.01718e-21
5.30723e-21
5.73811e-21
6.31303e-21
7.03727e-21
7.91806e-21
8.9646e-21
1.01875e-20
1.15976e-20
1.32038e-20
1.50071e-20
1.69818e-20
1.90141e-20
2.07169e-20
1.73376e-20
1.62578e-20
1.5196e-20
1.44513e-20
1.41063e-20
1.41765e-20
1.4662e-20
1.55623e-20
1.68818e-20
1.86308e-20
2.08262e-20
2.34906e-20
2.66528e-20
3.03459e-20
3.4604e-20
3.94548e-20
4.49019e-20
5.08669e-20
5.70022e-20
6.21341e-20
5.00426e-20
4.69445e-20
4.3918e-20
4.18327e-20
4.0931e-20
4.12595e-20
4.28191e-20
4.56104e-20
4.96484e-20
5.49666e-20
6.16183e-20
6.9675e-20
7.92265e-20
9.03756e-20
1.03228e-19
1.17872e-19
1.34319e-19
1.52329e-19
1.70842e-19
1.86302e-19
1.44194e-19
1.3533e-19
1.26736e-19
1.20934e-19
1.18634e-19
1.19976e-19
1.24965e-19
1.33608e-19
1.45957e-19
1.6212e-19
1.82266e-19
2.06618e-19
2.35457e-19
2.69103e-19
3.07883e-19
3.52073e-19
4.0171e-19
4.56068e-19
5.11905e-19
5.58457e-19
4.14734e-19
3.89452e-19
3.65148e-19
3.49123e-19
3.43454e-19
3.48552e-19
3.64446e-19
3.91176e-19
4.28918e-19
4.78019e-19
5.39007e-19
6.12587e-19
6.99629e-19
8.01124e-19
9.18096e-19
1.05139e-18
1.20114e-18
1.36513e-18
1.53346e-18
1.67358e-18
1.19059e-18
1.11872e-18
1.0503e-18
1.00642e-18
9.93124e-19
1.01165e-18
1.06211e-18
1.14468e-18
1.25994e-18
1.40903e-18
1.59358e-18
1.81581e-18
2.07843e-18
2.38449e-18
2.73717e-18
3.1391e-18
3.59071e-18
4.08524e-18
4.5925e-18
5.01402e-18
3.41098e-18
3.20735e-18
3.01572e-18
2.89677e-18
2.8681e-18
2.93336e-18
3.09302e-18
3.34777e-18
3.69958e-18
4.15201e-18
4.71024e-18
5.38118e-18
6.17322e-18
7.09584e-18
8.15884e-18
9.37034e-18
1.07318e-17
1.22224e-17
1.37504e-17
1.5018e-17
9.75127e-18
9.1766e-18
8.64291e-18
8.32438e-18
8.2721e-18
8.49688e-18
9.0005e-18
9.78556e-18
1.08585e-17
1.22308e-17
1.39185e-17
1.59434e-17
1.83313e-17
2.11115e-17
2.43143e-17
2.79647e-17
3.20673e-17
3.65589e-17
4.11595e-17
4.49698e-17
2.7813e-17
2.61981e-17
2.47212e-17
2.38811e-17
2.38254e-17
2.45863e-17
2.61703e-17
2.85866e-17
3.18568e-17
3.60164e-17
4.1117e-17
4.72253e-17
5.44218e-17
6.27968e-17
7.24432e-17
8.34385e-17
9.57968e-17
1.09326e-16
1.23171e-16
1.3462e-16
7.91354e-17
7.46181e-17
7.05613e-17
6.83877e-17
6.85235e-17
7.10638e-17
7.60315e-17
8.34599e-17
9.34183e-17
1.0602e-16
1.21427e-16
1.39847e-16
1.61527e-16
1.86745e-16
2.15789e-16
2.48896e-16
2.86109e-16
3.26841e-16
3.68494e-16
4.02879e-16
2.24571e-16
2.12001e-16
2.00952e-16
1.9547e-16
1.9678e-16
2.05165e-16
2.20704e-16
2.43512e-16
2.73812e-16
3.11967e-16
3.58482e-16
4.14001e-16
4.79287e-16
5.55198e-16
6.4261e-16
7.42255e-16
8.54269e-16
9.76852e-16
1.10211e-15
1.20533e-15
6.35494e-16
6.00716e-16
5.70925e-16
5.57583e-16
5.64201e-16
5.91613e-16
6.40091e-16
7.10021e-16
8.02136e-16
9.17585e-16
1.05795e-15
1.2252e-15
1.42172e-15
1.65012e-15
1.91311e-15
2.2129e-15
2.54993e-15
2.91869e-15
3.29516e-15
3.6049e-15
1.79287e-15
1.69728e-15
1.61792e-15
1.58714e-15
1.61496e-15
1.70384e-15
1.85467e-15
2.06879e-15
2.34857e-15
2.69765e-15
3.12093e-15
3.62457e-15
4.21581e-15
4.90274e-15
5.6936e-15
6.59521e-15
7.60883e-15
8.71764e-15
9.84865e-15
1.07776e-14
5.0415e-15
4.78075e-15
4.57248e-15
4.50758e-15
4.61453e-15
4.90055e-15
5.36866e-15
6.02334e-15
6.87228e-15
7.92692e-15
9.20255e-15
1.07182e-14
1.24961e-14
1.4561e-14
1.69382e-14
1.96485e-14
2.26955e-14
2.60279e-14
2.94239e-14
3.22083e-14
1.41262e-14
1.34212e-14
1.28849e-14
1.27714e-14
1.31611e-14
1.40754e-14
1.55244e-14
1.7523e-14
2.00961e-14
2.32796e-14
2.71211e-14
3.16792e-14
3.70223e-14
4.32262e-14
5.03677e-14
5.85104e-14
6.76652e-14
7.76747e-14
8.78655e-14
9.62063e-14
3.94297e-14
3.75432e-14
3.6196e-14
3.60941e-14
3.74638e-14
4.03682e-14
4.48414e-14
5.0933e-14
5.87223e-14
6.83226e-14
7.98812e-14
9.35789e-14
1.09625e-13
1.28252e-13
1.49693e-13
1.74142e-13
2.01631e-13
2.31677e-13
2.62236e-13
2.87203e-13
1.09603e-13
1.04617e-13
1.01344e-13
1.01735e-13
1.06423e-13
1.15597e-13
1.29369e-13
1.47902e-13
1.7145e-13
2.00368e-13
2.35113e-13
2.76239e-13
3.2439e-13
3.80271e-13
4.44597e-13
5.17953e-13
6.0043e-13
6.90551e-13
7.82118e-13
8.56784e-13
3.033e-13
2.90321e-13
2.82746e-13
2.85936e-13
3.01661e-13
3.30477e-13
3.72756e-13
4.29033e-13
5.00115e-13
5.87108e-13
6.91426e-13
8.14775e-13
9.59118e-13
1.12661e-12
1.31941e-12
1.53931e-12
1.78655e-12
2.05661e-12
2.33071e-12
2.55377e-12
8.35236e-13
8.02072e-13
7.85864e-13
8.0124e-13
8.53118e-13
9.43151e-13
1.07256e-12
1.24308e-12
1.45726e-12
1.71856e-12
2.03134e-12
2.40082e-12
2.83299e-12
3.33441e-12
3.91166e-12
4.5701e-12
5.31044e-12
6.11879e-12
6.93824e-12
7.60376e-12
2.28802e-12
2.20528e-12
2.17543e-12
2.2381e-12
2.40687e-12
2.68668e-12
3.08148e-12
3.59689e-12
4.24098e-12
5.02445e-12
5.9607e-12
7.06569e-12
8.35768e-12
9.85658e-12
1.15824e-11
1.35512e-11
1.57649e-11
1.8181e-11
2.06272e-11
2.26094e-11
6.23224e-12
6.03221e-12
5.99631e-12
6.23088e-12
6.77324e-12
7.63812e-12
8.83835e-12
1.03919e-11
1.23242e-11
1.46683e-11
1.74652e-11
2.07635e-11
2.46187e-11
2.90911e-11
3.42413e-11
4.01178e-11
4.67254e-11
5.39334e-11
6.12214e-11
6.71133e-11
1.68722e-11
1.64097e-11
1.64536e-11
1.72864e-11
1.901e-11
2.16684e-11
2.53029e-11
2.99709e-11
3.57515e-11
4.27467e-11
5.10813e-11
6.09029e-11
7.23792e-11
8.56932e-11
1.01027e-10
1.18527e-10
1.38204e-10
1.59658e-10
1.81317e-10
1.98782e-10
4.53788e-11
4.43804e-11
4.49346e-11
4.77845e-11
5.32059e-11
6.13292e-11
7.2286e-11
8.62584e-11
1.03492e-10
1.243e-10
1.4906e-10
1.7822e-10
2.12284e-10
2.51802e-10
2.97325e-10
3.49286e-10
4.0771e-10
4.71364e-10
5.35525e-10
5.87114e-10
1.21198e-10
1.19291e-10
1.22117e-10
1.31603e-10
1.48488e-10
1.73156e-10
2.06023e-10
2.47656e-10
2.98816e-10
3.60454e-10
4.33722e-10
5.19963e-10
6.20697e-10
7.37567e-10
8.7221e-10
1.02592e-09
1.19872e-09
1.38683e-09
1.5761e-09
1.72779e-09
3.21305e-10
3.18588e-10
3.30215e-10
3.61104e-10
4.132e-10
4.87624e-10
5.85653e-10
7.09042e-10
8.60107e-10
1.04175e-09
1.25745e-09
1.51125e-09
1.8077e-09
2.15167e-09
2.54801e-09
3.00049e-09
3.50905e-09
4.06209e-09
4.61732e-09
5.06075e-09
8.45161e-10
8.45207e-10
8.88456e-10
9.87199e-10
1.14645e-09
1.36941e-09
1.65992e-09
2.02326e-09
2.46647e-09
2.99834e-09
3.62934e-09
4.37148e-09
5.23826e-09
6.24416e-09
7.40348e-09
8.7271e-09
1.02141e-08
1.18291e-08
1.34464e-08
1.47327e-08
2.20498e-09
2.22714e-09
2.37862e-09
2.68925e-09
3.17153e-09
3.83423e-09
4.68852e-09
5.75035e-09
7.04091e-09
8.58629e-09
1.04174e-08
1.25697e-08
1.5083e-08
1.8e-08
2.13626e-08
2.5202e-08
2.95132e-08
3.4188e-08
3.88557e-08
4.25505e-08
5.70425e-09
5.82896e-09
6.33826e-09
7.30132e-09
8.74733e-09
1.06991e-08
1.31892e-08
1.62648e-08
1.99878e-08
2.44341e-08
2.96937e-08
3.58703e-08
4.30802e-08
5.14479e-08
6.10947e-08
7.21092e-08
8.44692e-08
9.78462e-08
1.11158e-07
1.21638e-07
1.4631e-08
1.5157e-08
1.68185e-08
1.97633e-08
2.40519e-08
2.97418e-08
3.69247e-08
4.5735e-08
5.63483e-08
6.89814e-08
8.38924e-08
1.0138e-07
1.21778e-07
1.45447e-07
1.72735e-07
2.03886e-07
2.38813e-07
2.76529e-07
3.13917e-07
3.43161e-07
3.72157e-08
3.91847e-08
4.44787e-08
5.33622e-08
6.59323e-08
8.23222e-08
1.02775e-07
1.27657e-07
1.57454e-07
1.92771e-07
2.34333e-07
2.82984e-07
3.39678e-07
4.05435e-07
4.81236e-07
5.67746e-07
6.64632e-07
7.6898e-07
8.71963e-07
9.51914e-07
9.39457e-08
1.00857e-07
1.17399e-07
1.43828e-07
1.80175e-07
2.26689e-07
2.83968e-07
3.52965e-07
4.3498e-07
5.31656e-07
6.44986e-07
7.77313e-07
9.31297e-07
1.10979e-06
1.31552e-06
1.55023e-06
1.81275e-06
2.09465e-06
2.37146e-06
2.58452e-06
2.35778e-07
2.59081e-07
3.0986e-07
3.87273e-07
4.90608e-07
6.20103e-07
7.77082e-07
9.63904e-07
1.18391e-06
1.4414e-06
1.74171e-06
2.0912e-06
2.49715e-06
2.9674e-06
3.50937e-06
4.12756e-06
4.81817e-06
5.55746e-06
6.27947e-06
6.82971e-06
5.90686e-07
6.66879e-07
8.19661e-07
1.0419e-06
1.32914e-06
1.68056e-06
2.09871e-06
2.58902e-06
3.15962e-06
3.82138e-06
4.58808e-06
5.47646e-06
6.50602e-06
7.69793e-06
9.07207e-06
1.06402e-05
1.2391e-05
1.42609e-05
1.60775e-05
1.74467e-05
1.49246e-06
1.73012e-06
2.17565e-06
2.79514e-06
3.56887e-06
4.49033e-06
5.56296e-06
6.79814e-06
8.21449e-06
9.83804e-06
1.17029e-05
1.38515e-05
1.63344e-05
1.92073e-05
2.25231e-05
2.63144e-05
3.05545e-05
3.50835e-05
3.94713e-05
4.27434e-05
3.92549e-06
4.5455e-06
5.76597e-06
7.41738e-06
9.41261e-06
1.17201e-05
1.43395e-05
1.72913e-05
2.06148e-05
2.43678e-05
2.86296e-05
3.35023e-05
3.91102e-05
4.55945e-05
5.30953e-05
6.17099e-05
7.14035e-05
8.18334e-05
9.20007e-05
9.95692e-05
0.00499661
0.0049961
0.00499506
0.00499365
0.00499193
0.00498992
0.00498763
0.00498503
0.00498208
0.00497872
0.00497489
0.00497048
0.00496539
0.00495947
0.00495261
0.00494472
0.00493582
0.00492625
0.00491691
0.00490997
0.00499871
0.00499851
0.00499813
0.00499759
0.00499692
0.00499612
0.00499518
0.00499409
0.00499283
0.00499138
0.00498971
0.00498777
0.00498553
0.00498292
0.00497991
0.00497646
0.0049726
0.00496848
0.00496449
0.00496152
0.00499949
0.00499942
0.00499929
0.0049991
0.00499885
0.00499854
0.00499817
0.00499774
0.00499723
0.00499665
0.00499596
0.00499516
0.00499423
0.00499316
0.00499192
0.0049905
0.00498891
0.00498722
0.00498558
0.00498434
0.0049998
0.00499978
0.00499973
0.00499966
0.00499957
0.00499946
0.00499932
0.00499916
0.00499896
0.00499873
0.00499846
0.00499815
0.00499779
0.00499736
0.00499688
0.00499632
0.0049957
0.00499503
0.00499438
0.00499389
0.00499992
0.00499991
0.0049999
0.00499987
0.00499984
0.0049998
0.00499975
0.00499969
0.00499962
0.00499953
0.00499943
0.00499931
0.00499917
0.00499901
0.00499883
0.00499862
0.00499838
0.00499813
0.00499788
0.00499769
0.00499997
0.00499997
0.00499996
0.00499995
0.00499994
0.00499993
0.00499991
0.00499989
0.00499986
0.00499983
0.00499979
0.00499975
0.0049997
0.00499964
0.00499957
0.00499949
0.00499941
0.00499931
0.00499922
0.00499915
0.00499999
0.00499999
0.00499999
0.00499998
0.00499998
0.00499997
0.00499997
0.00499996
0.00499995
0.00499994
0.00499993
0.00499991
0.00499989
0.00499987
0.00499985
0.00499982
0.00499979
0.00499975
0.00499972
0.00499969
0.005
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499998
0.00499998
0.00499997
0.00499997
0.00499996
0.00499995
0.00499995
0.00499994
0.00499992
0.00499991
0.0049999
0.00499989
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499998
0.00499998
0.00499998
0.00499997
0.00499997
0.00499997
0.00499996
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.00499999
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
0.005
)
;
boundaryField
{
outlet
{
type zeroGradient;
}
inlet1
{
type fixedValue;
value uniform 0;
}
inlet2
{
type fixedValue;
value uniform 0.005;
}
frontAndBack
{
type empty;
}
defaultFaces
{
type zeroGradient;
}
}
// ************************************************************************* //
|
|
2feda63bb896894af9ced43bfe1aed9978a9a7ed
|
7f9df16c8ea390d32e2939e1da1becdc7a82f40f
|
/StackLanguage/StackLanguage/ProcessorState.h
|
5bf9048540ab34b889732d9f4950a3eba88562da
|
[
"Apache-2.0"
] |
permissive
|
Pharap/WorkInProgressStackLanguage
|
3ecbd862731baa0271989a897b1a4ff03f5289c2
|
61d55636e36d35b9080a8bcda81a10ce1b51b264
|
refs/heads/master
| 2020-03-29T01:10:38.177568
| 2018-09-19T01:38:50
| 2018-09-19T01:38:50
| 149,374,368
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,183
|
h
|
ProcessorState.h
|
#pragma once
//
// Copyright (C) 2018 Pharap (@Pharap)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include "Stack.h"
#include "LanguageTypes.h"
template< typename Settings >
class ProcessorState
{
public:
using SettingsType = typename Settings;
public:
static constexpr std::size_t DataStackSize = SettingsType::DataStackSize;
static constexpr std::size_t ReturnStackSize = SettingsType::ReturnStackSize;
public:
using DataStack = Stack<Word, DataStackSize>;
using ReturnStack = Stack<Address, ReturnStackSize>;
private:
DataStack dataStack = DataStack();
ReturnStack returnStack = ReturnStack();
Address instructionPointer = 0;
public:
DataStack & getDataStack(void)
{
return this->dataStack;
}
const DataStack & getDataStack(void) const
{
return this->dataStack;
}
ReturnStack & getReturnStack(void)
{
return this->returnStack;
}
const ReturnStack & getReturnStack(void) const
{
return this->returnStack;
}
const Address & getInstructionPointer(void) const
{
return this->instructionPointer;
}
void incrementInstructionPointer(void)
{
++this->instructionPointer;
}
void functionCall(Address address)
{
this->returnStack.push(this->instructionPointer);
this->instructionPointer = address;
}
void functionReturn(void)
{
this->instructionPointer = this->returnStack.peek();
this->returnStack.drop();
}
void jumpAbsolute(Address address)
{
this->instructionPointer = address;
}
void jumpRelative(AddressOffset addressOffset)
{
this->instructionPointer += addressOffset;
}
};
|
106419c0749a827f3bac9eaa038cde0f6601276c
|
7f9a5b9bb4b85d48e958efb078f076c081c6aee2
|
/SudoPlacements/Trees/07.ZigZagTraversal.cpp
|
654000c1d5933b396822fc0d447c51be504025c4
|
[] |
no_license
|
anuragroy11/GeeksForGeeks
|
dd6075df188033f3c740ec98b98c7c12911e1594
|
ec9af2d85f1900394be19063ff5196da83c6dc7c
|
refs/heads/master
| 2020-03-22T17:27:45.646008
| 2018-08-16T14:21:49
| 2018-08-16T14:21:49
| 140,396,797
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,405
|
cpp
|
07.ZigZagTraversal.cpp
|
/*Please note that it's Function problem i.e.
you need to write your solution in the form of Function(s) only.
Driver Code to call/invoke your function is mentioned above.*/
//User function Template for C++
/*Structure of the node of the binary tree is as
struct Node {
int data;
struct Node *left, *right;
};
*/
// your task is to complete this function
// Function takes a single argument as input
// the root of the binary tree
// print a new line after each test case
void zigZagTraversal(Node* root) {
stack<Node*> s1, s2;
Node* temp;
if (root != nullptr)
s1.push(root);
while (!s1.empty() || !s2.empty()) {
while (!s1.empty()) {
temp = s1.top();
s1.pop();
cout << temp -> data << " ";
if (temp -> left != nullptr)
s2.push(temp -> left);
if (temp -> right != nullptr)
s2.push(temp -> right);
}
while (!s2.empty()) {
temp = s2.top();
s2.pop();
cout << temp -> data << " ";
if (temp -> right != nullptr)
s1.push(temp -> right);
if (temp -> left != nullptr)
s1.push(temp -> left);
}
}
cout << endl;
}
|
b6363d02bfa36d709337248347e34854739584b6
|
dc5d7e573caabdce36a35095dd26616d514e1408
|
/CataZJUT/CCrystalPlanes.h
|
d09064dbab29522b37cb80804a144d5867edc342
|
[] |
no_license
|
gvtheen/IACS
|
29c11f12e63ef890009cb90bc77136ad07c10371
|
360e85d667c38fe0212866cd9fbb287059e8625a
|
refs/heads/master
| 2022-07-15T10:08:08.742473
| 2020-05-14T12:44:31
| 2020-05-14T12:44:31
| 201,960,213
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,905
|
h
|
CCrystalPlanes.h
|
#ifndef CCREATEPLANE_H
#define CCREATEPLANE_H
#include <Eigen/Dense>
#include <vector>
#include "../Util/Point-Vector.h"
#include "CPlane.h"
#include "../Util/Bitset.h"
/*
This class main function is to identify crystal plane of the known cluster.
*/
using util::Point3;
namespace CATAZJUT{
class CConfigurationBase;
class CCrystalPlanes
{
public:
CCrystalPlanes();
CCrystalPlanes(std::vector<size_t>&,CConfigurationBase*);
CCrystalPlanes(CCrystalPlanes&);
virtual ~CCrystalPlanes();
CCrystalPlanes* Clone();
void CreateCrystalPlane();
void SetLatticPlane(std::vector<CPlane*>&);
std::vector<CPlane*>& LatticePlane();
Eigen::MatrixXd* PointsOfMat();
void SetPointsMat(Eigen::MatrixXd*);
CConfigurationBase* ConfigurationBase();
void setConfigurationBase( CConfigurationBase*);
size_t crystalPlaneNum();
Point3 CartesianCoordinateAtGene(size_t crystal_Plane_No,double height,double R_radio,double thea);
double DistanceCutoff();
void SetDistanceCutoff(double);
CPlane* operator[](size_t index);
void outputCrystalPlane();
protected:
void RemoveRow(Eigen::MatrixXd&, size_t);
void RemoveColumn(Eigen::MatrixXd&, size_t);
bool IsOnLine(Eigen::MatrixXd&);
bool IsInclude3PointsInExitPlane(size_t i,size_t j,size_t k);
bool IsAdjecentPointer(size_t i,size_t j,size_t k);
bool CheckIsCrystalPlane(CPlane&,std::vector<size_t>&,util::Bitset&);
private:
Eigen::MatrixXd* m_PointsMat;
std::vector<CPlane*> m_Plane;
std::vector<Eigen::MatrixXd*> m_PointsInIndividualPlanes;
double mDistance_Cutoff=2.8;
CConfigurationBase *m_pCConfigurationBase;
std::vector<size_t> m_indexInConfig;
};
}
#endif // CCREATEPLANE_H
|
d509feb5797a3f6bcc3f7313319a4d5a4652d02d
|
a943ecc0f1ea5367a315a9b7760f12b67c4fb21b
|
/rollerOpt_COBYLA_NEW/runLogs/Optimization35/2500/k
|
b237726b1ec4c5971123ad6db2a58190dc65c1de
|
[] |
no_license
|
Owbr3335/3M_Roller
|
d86e59fc8a8e174c793bffb63abdf118e57ad153
|
5136a1b84a674199acab2d11b111b61bef83e3bf
|
refs/heads/master
| 2020-04-24T06:09:31.546146
| 2019-04-26T21:43:50
| 2019-04-26T21:43:50
| 171,755,246
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 117,215
|
k
|
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "2500";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField nonuniform List<scalar>
9836
(
0.000159832
0.000166203
0.000151488
0.000142012
0.00021453
0.00012273
0.00012061
0.000228657
0.000193373
0.000109438
0.000111207
0.000215054
0.000234129
0.000148392
0.000105651
0.000105683
0.000180719
0.000256487
0.000204998
0.000123813
0.000103978
0.000102843
0.000147011
0.00025408
0.00024561
0.000156981
0.000114319
0.000102815
0.000101227
0.000127958
0.000236617
0.000267123
0.000204758
0.000130434
0.000109478
0.000102071
0.00010032
0.000115251
0.00019903
0.000276929
0.000247127
0.000158497
0.000118748
0.00010642
0.000101503
9.96135e-05
0.000107993
0.000159354
0.000270486
0.000271729
0.000197941
0.000132985
0.000112477
0.000104404
0.000101055
9.89859e-05
0.000103818
0.000136097
0.00024939
0.000286472
0.000241
0.000156063
0.000120824
0.000108338
0.000103042
0.000100715
9.85448e-05
0.000101439
0.000120698
0.000209396
0.000290706
0.0002718
0.000188171
0.000133321
0.000113757
0.000105567
0.000102091
0.000100447
9.82186e-05
9.99634e-05
0.000111678
0.000167812
0.000282445
0.000288199
0.000228106
0.000151142
0.000121644
0.000109093
0.000103719
0.000101338
0.000100213
9.79773e-05
9.89372e-05
0.000106301
0.000142576
0.000259544
0.0003002
0.000263918
0.00017877
0.000131376
0.000114479
0.000105993
0.000102329
0.000100724
0.000100037
9.78325e-05
9.81751e-05
0.000102972
0.000125891
0.000219117
0.000301601
0.000288467
0.000212064
0.000146595
0.000120859
0.000109613
0.000103779
0.000101235
0.000100225
9.99014e-05
9.78117e-05
9.75154e-05
0.00010074
0.000115571
0.000176992
0.000292518
0.000300597
0.000250069
0.000168116
0.000129396
0.000114181
0.000106171
0.000102049
0.000100456
9.98151e-05
9.98067e-05
9.78494e-05
9.68512e-05
9.91951e-05
0.000109111
0.000149484
0.00026846
0.000311286
0.000280001
0.000197919
0.000141059
0.000119778
0.000109426
0.00010359
0.000100837
9.98363e-05
9.9479e-05
9.97069e-05
9.79e-05
9.63115e-05
9.8038e-05
0.000104998
0.000131623
0.000227881
0.000311144
0.000301236
0.000231808
0.000158891
0.000126505
0.000113445
0.00010587
0.000101583
9.99456e-05
9.91707e-05
9.92471e-05
9.96195e-05
9.79397e-05
9.58862e-05
9.70972e-05
0.000102284
0.000120224
0.000186117
0.000301305
0.000311237
0.000267041
0.000183714
0.000135866
0.000118055
0.000108798
0.000103099
0.000100248
9.91365e-05
9.86869e-05
9.90581e-05
9.95375e-05
9.79687e-05
9.55311e-05
9.63226e-05
0.000100277
0.000112977
0.000156974
0.000276131
0.000320446
0.000293139
0.000214372
0.000150167
0.000123466
0.00011227
0.000105218
0.000100956
9.9227e-05
9.83208e-05
9.83699e-05
9.88678e-05
9.94638e-05
9.79905e-05
9.52292e-05
9.56905e-05
9.87204e-05
0.000108138
0.000138384
0.000236927
0.000319468
0.000311617
0.000247676
0.000170763
0.000131073
0.000116044
0.000107835
0.000102455
9.95307e-05
9.83019e-05
9.77195e-05
9.81111e-05
9.8662e-05
9.94031e-05
9.80027e-05
9.50154e-05
9.51747e-05
9.74839e-05
0.000104847
0.000126111
0.00019601
0.000309083
0.000320389
0.000280325
0.00019761
0.000142301
0.000120548
0.000110732
0.000104423
0.000100304
9.84038e-05
9.74387e-05
9.72898e-05
9.78421e-05
9.84965e-05
9.93458e-05
9.79836e-05
9.48689e-05
9.47107e-05
9.64981e-05
0.000102591
0.000118165
0.000165245
0.000283621
0.000328118
0.000303505
0.000227985
0.000159374
0.000126377
0.000113875
0.000106642
0.000101756
9.87422e-05
9.74539e-05
9.67172e-05
9.69484e-05
9.75917e-05
9.83429e-05
9.92896e-05
9.79493e-05
9.48176e-05
9.42992e-05
9.57404e-05
0.000100853
0.00011315
0.000146031
0.000246037
0.000326612
0.00031986
0.00025972
0.000181914
0.00013556
0.000117412
0.000109041
0.000103437
9.96066e-05
9.75998e-05
9.65803e-05
9.61791e-05
9.66466e-05
9.73642e-05
9.81875e-05
9.92394e-05
9.79181e-05
9.48293e-05
9.38951e-05
9.51257e-05
9.94175e-05
0.000109972
0.000133161
0.000206244
0.000316358
0.000327748
0.000289934
0.000209239
0.000149053
0.00012229
0.000111585
0.000105287
0.000100896
9.80156e-05
9.66368e-05
9.57862e-05
9.57799e-05
9.63446e-05
9.71394e-05
9.8042e-05
9.91961e-05
9.78915e-05
9.48503e-05
9.35228e-05
9.45632e-05
9.82407e-05
0.000107657
0.000124595
0.000174412
0.000292239
0.000334722
0.000311324
0.000238291
0.000168144
0.000129446
0.000114511
0.000107202
0.000102365
9.89195e-05
9.68452e-05
9.57766e-05
9.51686e-05
9.54187e-05
9.60633e-05
9.69269e-05
9.79063e-05
9.91641e-05
9.78719e-05
9.48507e-05
9.31935e-05
9.40383e-05
9.72428e-05
0.00010561
0.000118744
0.000154241
0.000257191
0.000333597
0.000326062
0.000268246
0.000191301
0.000140477
0.000118411
0.000109266
0.000103782
0.00010006
9.73547e-05
9.58779e-05
9.50018e-05
9.47089e-05
9.50921e-05
9.58028e-05
9.67245e-05
9.77837e-05
9.91492e-05
9.78606e-05
9.48325e-05
9.28958e-05
9.35619e-05
9.6359e-05
0.000103735
0.000114674
0.000140138
0.000218484
0.000324768
0.000333391
0.000296452
0.000217806
0.000155653
0.000124222
0.000111622
0.000105358
0.000101126
9.82151e-05
9.61574e-05
9.50565e-05
9.43589e-05
9.43324e-05
9.47999e-05
9.55559e-05
9.65378e-05
9.76914e-05
9.9157e-05
9.78568e-05
9.48089e-05
9.26491e-05
9.31458e-05
9.55825e-05
0.000102077
0.000111674
0.000130433
0.000184671
0.000303466
0.000341138
0.000316312
0.000245121
0.000175356
0.000132756
0.000114761
0.000106933
0.00010233
9.90684e-05
9.67476e-05
9.52295e-05
9.43724e-05
9.3881e-05
9.40215e-05
9.45398e-05
9.53369e-05
9.63789e-05
9.76376e-05
9.91875e-05
9.78511e-05
9.47866e-05
9.24543e-05
9.2804e-05
9.49252e-05
0.000100708
0.000109227
0.000123633
0.00016272
0.000270557
0.000340748
0.000331988
0.00027299
0.000198124
0.000144896
0.000119279
0.000108886
0.000103422
9.99982e-05
9.74052e-05
9.56044e-05
9.44821e-05
9.38194e-05
9.35235e-05
9.37762e-05
9.43221e-05
9.51638e-05
9.62512e-05
9.76469e-05
9.92472e-05
9.78416e-05
9.47692e-05
9.22971e-05
9.25287e-05
9.43731e-05
9.96156e-05
0.000107223
0.00011895
0.000147207
0.000232923
0.000333833
0.00033944
0.000300759
0.000223167
0.000160858
0.000125948
0.000111307
0.000104799
0.000100773
9.80992e-05
9.60775e-05
9.47394e-05
9.39007e-05
9.34262e-05
9.32767e-05
9.35978e-05
9.41714e-05
9.50415e-05
9.62519e-05
9.77777e-05
9.9347e-05
9.78321e-05
9.47464e-05
9.21743e-05
9.23023e-05
9.3911e-05
9.86524e-05
0.000105681
0.000115434
0.000136335
0.00019739
0.000315981
0.000347225
0.00032063
0.000249463
0.000180333
0.000135482
0.000114954
0.000106203
0.000101699
9.86717e-05
9.65756e-05
9.50687e-05
9.41096e-05
9.351e-05
9.31961e-05
9.31327e-05
9.35057e-05
9.41568e-05
9.51186e-05
9.6482e-05
9.80465e-05
9.94794e-05
9.78292e-05
9.47267e-05
9.20962e-05
9.21115e-05
9.35254e-05
9.77697e-05
0.00010445
0.00011265
0.000128651
0.000172624
0.000286013
0.000348324
0.000336772
0.000275957
0.000202559
0.000148417
0.000120126
0.00010831
0.000102553
9.92661e-05
9.69876e-05
9.54018e-05
9.4363e-05
9.37301e-05
9.33015e-05
9.31427e-05
9.31757e-05
9.359e-05
9.44197e-05
9.55315e-05
9.70527e-05
9.85393e-05
9.9705e-05
9.7829e-05
9.4704e-05
9.20359e-05
9.19076e-05
9.32051e-05
9.70033e-05
0.00010331
0.000110329
0.000123018
0.000155673
0.000250376
0.000343666
0.000345672
0.000302103
0.000226601
0.000164728
0.000127733
0.000111012
0.000103801
9.97804e-05
9.73329e-05
9.56737e-05
9.45893e-05
9.39515e-05
9.35777e-05
9.32996e-05
9.32685e-05
9.353e-05
9.4128e-05
9.51019e-05
9.64961e-05
9.82738e-05
9.96542e-05
0.000100081
0.000100135
9.78307e-05
9.46609e-05
9.19919e-05
9.1688e-05
9.29187e-05
9.6358e-05
0.000102197
0.000108372
0.000118875
0.000143367
0.000215573
0.000330428
0.000352579
0.000324284
0.000251458
0.000184142
0.000138007
0.000115308
0.000105224
0.000100422
9.7635e-05
9.58321e-05
9.47244e-05
9.41092e-05
9.38505e-05
9.36916e-05
9.3567e-05
9.37302e-05
9.42693e-05
9.52324e-05
9.66356e-05
9.85127e-05
0.000100107
0.000100237
0.000100631
0.000100171
0.000100336
9.78294e-05
9.46173e-05
9.19412e-05
9.14839e-05
9.26481e-05
9.58471e-05
0.000101146
0.000106721
0.000115743
0.000134497
0.000186932
0.000305567
0.000356697
0.000339928
0.000277067
0.000205563
0.000151613
0.000121096
0.000107633
0.000101176
9.78793e-05
9.59469e-05
9.47548e-05
9.41801e-05
9.40226e-05
9.4092e-05
9.41638e-05
9.426e-05
9.47021e-05
9.56636e-05
9.71507e-05
9.92149e-05
0.000100343
0.000100887
0.000101619
0.000101577
0.000102894
0.0001007
0.000101585
0.000100208
0.000100568
9.78246e-05
9.45792e-05
9.1898e-05
9.13008e-05
9.23903e-05
9.54131e-05
0.000100208
0.000105309
0.000113308
0.000128024
0.000167869
0.000275049
0.000354575
0.000351242
0.000301778
0.000228735
0.000167873
0.000129551
0.000110808
0.000102489
9.81931e-05
9.59781e-05
9.47226e-05
9.4157e-05
9.40832e-05
9.43617e-05
9.47505e-05
9.5149e-05
9.56132e-05
9.65338e-05
9.82226e-05
0.000100686
0.000101693
0.000102708
0.000102772
0.000102978
0.000104421
0.000104551
0.000101304
0.000102555
0.000100273
0.000100829
9.78139e-05
9.45339e-05
9.18714e-05
9.11142e-05
9.21516e-05
9.49885e-05
9.93435e-05
0.00010412
0.000111189
0.000123221
0.000153874
0.000242666
0.000346666
0.000357426
0.000325645
0.000251931
0.000187027
0.000140255
0.000115791
0.000104292
9.88107e-05
9.6018e-05
9.45848e-05
9.40043e-05
9.40361e-05
9.44777e-05
9.52093e-05
9.60564e-05
9.68667e-05
9.79264e-05
9.96706e-05
0.000102454
0.000103653
0.000104641
0.000103949
0.000105166
0.000105843
0.000104171
0.000106198
0.000105974
0.000101813
0.00010327
0.000100293
0.000100936
9.7799e-05
9.4477e-05
9.18173e-05
9.09206e-05
9.19073e-05
9.45801e-05
9.84912e-05
0.000103074
0.000109294
0.000119861
0.000143521
0.000212253
0.000329613
0.000364635
0.000341573
0.000275657
0.000207351
0.000154145
0.000122327
0.000107192
9.98371e-05
9.61636e-05
9.43841e-05
9.36829e-05
9.38228e-05
9.44524e-05
9.54679e-05
9.68157e-05
9.81837e-05
9.95871e-05
0.000101391
0.000103943
0.000105444
0.00010628
0.000106204
0.000107158
0.00010709
0.000108201
0.000107752
0.000105157
0.00010784
0.000107309
0.000102097
0.000103901
0.000100269
0.00010095
9.77762e-05
9.44054e-05
9.17342e-05
9.0721e-05
9.16344e-05
9.41724e-05
9.7712e-05
0.000102039
0.000107681
0.000117458
0.000136226
0.000187921
0.000306128
0.000366506
0.000355261
0.000298977
0.000228912
0.000170308
0.000131327
0.000111301
0.000101544
9.66084e-05
9.42765e-05
9.33051e-05
9.34255e-05
9.42387e-05
9.55231e-05
9.73448e-05
9.9372e-05
0.000101112
0.000102943
0.000105283
0.000106922
0.000107711
0.000107969
0.000108708
0.000109166
0.000110009
0.000109141
0.000110411
0.000109651
0.000106186
0.000109532
0.000108772
0.000102353
0.000104597
0.000100226
0.000100943
9.77428e-05
9.43185e-05
9.16338e-05
9.05027e-05
9.13584e-05
9.36826e-05
9.69979e-05
0.000100987
0.000106336
0.000115435
0.000130865
0.00017141
0.000278428
0.000363973
0.000364029
0.000322079
0.000250661
0.000188599
0.000142799
0.000116955
0.000104293
9.75883e-05
9.4325e-05
9.29719e-05
9.29191e-05
9.38553e-05
9.54255e-05
9.76241e-05
0.00010022
0.000102426
0.00010441
0.000106484
0.00010824
0.000109076
0.000109441
0.000110092
0.000110831
0.000111485
0.000111493
0.000112492
0.000111292
0.00011282
0.000111687
0.000107369
0.000111435
0.000110477
0.000102619
0.000105395
0.000100175
0.000100933
9.7698e-05
9.42342e-05
9.15055e-05
9.02695e-05
9.10753e-05
9.3169e-05
9.62563e-05
9.9982e-05
0.000105181
0.000113492
0.000126884
0.000158979
0.000249473
0.00035641
0.000371392
0.000342273
0.000271965
0.000208247
0.000156638
0.000124741
0.000108049
9.94573e-05
9.47273e-05
9.2827e-05
9.23781e-05
9.32758e-05
9.5089e-05
9.77326e-05
0.000100776
0.000103493
0.000105694
0.0001077
0.000109554
0.00011052
0.000110864
0.000111618
0.000112323
0.000112976
0.000113429
0.00011429
0.000114118
0.000115345
0.000113632
0.000115425
0.000113942
0.00010876
0.000113628
0.000112493
0.000102899
0.000106299
0.00010013
0.000100899
9.76485e-05
9.41597e-05
9.13752e-05
9.00147e-05
9.07442e-05
9.27013e-05
9.54823e-05
9.90028e-05
0.000104051
0.00011155
0.000124074
0.000149543
0.000221621
0.000340863
0.000380135
0.000357144
0.000294633
0.000227965
0.000172959
0.000134329
0.000113565
0.000102195
9.5963e-05
9.29329e-05
9.21004e-05
9.27304e-05
9.44969e-05
9.7605e-05
0.000101001
0.000104225
0.000106748
0.000109099
0.000110975
0.000111968
0.000112398
0.000113506
0.000114052
0.000115123
0.000115406
0.000116765
0.00011657
0.000118127
0.000117004
0.000118712
0.00011619
0.000118332
0.000116438
0.000110422
0.000116076
0.000114847
0.000103179
0.00010735
0.000100045
0.00010082
9.76206e-05
9.41067e-05
9.12491e-05
8.97135e-05
9.03659e-05
9.21743e-05
9.47237e-05
9.80196e-05
0.000102851
0.00010967
0.000121833
0.000142545
0.000198296
0.000319983
0.000383894
0.000371872
0.000316387
0.000248417
0.00019045
0.000146644
0.000120389
0.000106325
9.82209e-05
9.36745e-05
9.21491e-05
9.25844e-05
9.42007e-05
9.72544e-05
0.000100942
0.000104788
0.00010791
0.000110123
0.000112402
0.000113293
0.000114257
0.00011573
0.000116779
0.000119379
0.000119165
0.000123647
0.000120974
0.000127064
0.00012155
0.000128084
0.000120702
0.000125987
0.000119038
0.000122591
0.000119004
0.000112533
0.000118161
0.000116348
0.000103392
0.000109
9.99237e-05
0.000100696
9.7663e-05
9.40939e-05
9.11101e-05
8.93412e-05
8.99229e-05
9.15841e-05
9.39339e-05
9.70327e-05
0.000101629
0.000107909
0.000119681
0.0001372
0.000181842
0.000294887
0.000382506
0.000382364
0.000339722
0.000268579
0.000209139
0.00016068
0.000129473
0.000111796
0.000101681
9.56991e-05
9.27511e-05
9.27264e-05
9.42865e-05
9.73373e-05
0.000101016
0.000105101
0.000108718
0.000111721
0.000114278
0.000114163
0.0001165
0.000118193
0.000122201
0.000126671
0.00013158
0.000146106
0.000140498
0.000169109
0.000144368
0.000182805
0.000140381
0.000179208
0.000131768
0.000159161
0.000124022
0.000138112
0.000124555
0.000113424
0.000123723
0.00012102
0.000104035
0.000109443
9.97822e-05
0.000100571
9.78325e-05
9.41374e-05
9.09433e-05
8.88704e-05
8.93451e-05
9.09636e-05
9.30781e-05
9.60607e-05
0.000100423
0.000106374
0.000117397
0.000133224
0.000169252
0.000267231
0.000377161
0.000392889
0.000360685
0.000289344
0.00022804
0.000176677
0.000140227
0.000119184
0.000106606
9.90732e-05
9.47e-05
9.3516e-05
9.47394e-05
9.78444e-05
0.000101414
0.000105345
0.000109186
0.00011314
0.000118386
0.000118847
0.00012099
0.000130499
0.000135799
0.000164717
0.000190276
0.000221541
0.00030354
0.000267251
0.000428142
0.000276054
0.000485543
0.000240186
0.000444989
0.000184845
0.000326735
0.000143922
0.00021274
0.000147066
0.000116599
0.000145702
0.000138985
0.000104198
0.000110462
9.97447e-05
0.000100531
9.82057e-05
9.44254e-05
9.09003e-05
8.83394e-05
8.85612e-05
9.01989e-05
9.21609e-05
9.50794e-05
9.92838e-05
0.000105066
0.000115097
0.000130288
0.000159563
0.000240069
0.00036498
0.000404839
0.000378096
0.000311764
0.000247018
0.000193928
0.00015304
0.000128252
0.000113422
0.000104197
9.88475e-05
9.59315e-05
9.61558e-05
9.90141e-05
0.000102254
0.000105925
0.000110014
0.000114351
0.000119576
0.00014089
0.000139725
0.000139566
0.000141387
0.000216745
0.000247187
0.000408387
0.000535684
0.000676104
0.00100556
0.00087819
0.00146298
0.000893532
0.00167566
0.000706977
0.00150865
0.000435394
0.00103109
0.000237383
0.00055095
0.000248855
0.000128187
0.000240585
0.000213193
0.000104114
0.000116052
0.000100056
0.00010083
9.96745e-05
9.59587e-05
9.16579e-05
8.82784e-05
8.77619e-05
8.92162e-05
9.11316e-05
9.40283e-05
9.8259e-05
0.000103819
0.000113047
0.0001278
0.00015218
0.000216045
0.00034549
0.000412246
0.000396109
0.000334991
0.000266408
0.000211672
0.00016779
0.000138918
0.000122158
0.000111587
0.000105147
0.000101046
9.9786e-05
0.000101387
0.000104105
0.000107768
0.000111801
0.000115479
0.000120694
0.000136984
0.000134623
0.000282132
0.000274344
0.000272005
0.000284164
0.0006686
0.000807287
0.00139866
0.00182876
0.0022013
0.00301982
0.00270051
0.00385653
0.00274753
0.00412762
0.00226952
0.00382023
0.00137842
0.0029998
0.000642
0.00170317
0.000667765
0.000176044
0.000614116
0.000496791
0.000106224
0.000140826
0.000100544
0.000102399
0.000100872
0.000100251
9.57584e-05
8.98921e-05
8.76634e-05
8.82409e-05
8.99551e-05
9.28895e-05
9.72894e-05
0.000102546
0.000111191
0.000125553
0.000146416
0.000198197
0.000321634
0.000412341
0.000410394
0.000361189
0.000286298
0.000229804
0.00018343
0.000151563
0.000132561
0.000121444
0.00011398
0.000109516
0.000106968
0.000106635
0.000108227
0.000110796
0.00011384
0.000117383
0.000122131
0.000132805
0.000126509
0.000254547
0.000231297
0.00102045
0.00100391
0.000924275
0.00100445
0.00225834
0.0026791
0.00385784
0.00465792
0.00500433
0.00604705
0.00544833
0.00658711
0.00531742
0.00655166
0.00468329
0.00607186
0.00359307
0.00522739
0.00191154
0.00393766
0.00189794
0.000358443
0.00167174
0.00133031
0.000116587
0.000235136
0.000101334
0.000106864
9.79149e-05
0.000105988
0.000105352
9.67007e-05
8.97729e-05
8.80765e-05
8.89771e-05
9.16959e-05
9.63333e-05
0.000101351
0.000109337
0.000123452
0.000142293
0.000184755
0.000294413
0.000409129
0.000424432
0.000385701
0.000308097
0.000247742
0.00020006
0.000165012
0.000144783
0.000133494
0.000126076
0.000121852
0.000121127
0.000118785
0.000116528
0.000115307
0.000117605
0.000120349
0.000124354
0.000150008
0.000201504
0.000196379
0.00095323
0.000848993
0.00345664
0.00347756
0.00303158
0.00329057
0.00539259
0.00603901
0.00694556
0.00769644
0.00753156
0.00831419
0.00757587
0.00851756
0.00727185
0.00844263
0.00661747
0.0079476
0.00562052
0.00706385
0.0041163
0.00584438
0.00403685
0.000939792
0.00373394
0.00315995
0.000159209
0.000568885
0.000102818
0.000121123
0.000104336
0.000120812
0.000115798
9.94862e-05
9.0428e-05
8.90019e-05
9.09794e-05
9.55247e-05
0.000100275
0.000107564
0.000121295
0.000139474
0.000174269
0.000267351
0.000399605
0.000439779
0.000407333
0.000332041
0.00026603
0.000216635
0.000179589
0.000157575
0.000147087
0.000141801
0.000139799
0.000137373
0.000132882
0.000127671
0.000123833
0.000123334
0.000125273
0.000128746
0.000145066
0.000514462
0.000447321
0.000733996
0.000613028
0.00342882
0.00330723
0.00721017
0.00737928
0.00655897
0.00694613
0.00832411
0.00882355
0.00898701
0.00958191
0.00947046
0.0103944
0.00970039
0.0111266
0.00949948
0.0112143
0.00876776
0.0106299
0.00760997
0.00944398
0.00603288
0.00791958
0.00606981
0.00234861
0.00589175
0.0054626
0.000321517
0.00150796
0.000104372
0.000201606
0.000121626
0.000138787
0.000127487
0.000103359
9.20749e-05
9.13267e-05
9.53909e-05
9.971e-05
0.000105951
0.000119099
0.000137311
0.000166187
0.000242129
0.00038067
0.000450532
0.00042956
0.000358736
0.00028514
0.000233096
0.000194063
0.000170821
0.000160823
0.000156639
0.000156053
0.000156289
0.000154552
0.000151641
0.00014377
0.000136552
0.000134488
0.000136505
0.000150519
0.000391406
0.000253976
0.00237732
0.0020466
0.00305724
0.00278465
0.00737962
0.00732576
0.00964185
0.00975026
0.00919848
0.00946736
0.0101084
0.0105209
0.0113139
0.0121693
0.0126116
0.0139908
0.0131793
0.0153339
0.0129423
0.0155076
0.0118657
0.0145292
0.0101995
0.0128297
0.00821346
0.010665
0.00838925
0.00477026
0.00832109
0.00817498
0.00661313
0.00100981
0.00390608
0.00013012
0.00104461
0.000139579
0.000157912
0.000139819
0.000107141
9.49521e-05
9.60434e-05
9.97261e-05
0.000104753
0.000116926
0.000135362
0.000160215
0.000221493
0.000356926
0.000452203
0.00044796
0.000389399
0.000305852
0.00024977
0.000208236
0.000182917
0.000171441
0.000169027
0.000172325
0.000182674
0.000205084
0.000220764
0.000209281
0.00018163
0.000161119
0.000153327
0.000163575
0.00054846
0.00160142
0.0014024
0.00653755
0.00606877
0.0071831
0.0069592
0.00982015
0.00985946
0.0110071
0.0109657
0.0108136
0.0109846
0.0128891
0.0133993
0.015345
0.016416
0.01718
0.0185049
0.0178692
0.0192449
0.0174268
0.0192892
0.0158693
0.0186095
0.0136009
0.0166726
0.0110012
0.0139985
0.0124265
0.00972768
0.0111588
0.00786963
0.00602862
0.00774989
0.00956784
0.0110958
0.0110647
0.00944095
0.0037477
0.00740341
0.00741366
0.00570425
0.000935935
0.00837646
0.000156964
0.000179068
0.000149656
0.000109521
9.94633e-05
0.000100357
0.000104422
0.00011486
0.000133498
0.00015622
0.000206451
0.00033012
0.000450038
0.000465327
0.000418719
0.000329687
0.000266371
0.000222482
0.000193433
0.000180373
0.000178916
0.000192377
0.000241567
0.00035706
0.000462489
0.000463023
0.000359163
0.000261454
0.000209957
0.000194749
0.000516029
0.00395584
0.0027451
0.0053724
0.00465901
0.00971207
0.00956888
0.0098545
0.00981989
0.0109113
0.0108793
0.0137956
0.0136618
0.0137261
0.0138418
0.0171375
0.0175371
0.019208
0.0195174
0.0198991
0.0201719
0.0200267
0.0202653
0.0200248
0.0203013
0.0178563
0.0191482
0.0198692
0.0203221
0.0154253
0.0170265
0.0193371
0.0195461
0.0182668
0.014043
0.0125392
0.0141844
0.0156212
0.0125782
0.00929193
0.00908858
0.0109471
0.0124704
0.0125638
0.0108091
0.00744506
0.00778566
0.00855823
0.00897986
0.00899257
0.0151804
0.0107665
0.0156873
0.0194194
0.000176346
0.00019961
0.000150055
0.000111417
0.000103059
0.00010471
0.00011301
0.000131713
0.000153514
0.000195058
0.000302242
0.000442107
0.000483645
0.000445164
0.000356955
0.000283977
0.000236281
0.000203772
0.000187369
0.000187886
0.000221999
0.000387724
0.000780226
0.00138599
0.00151126
0.00117008
0.000721546
0.000417933
0.000286034
0.000507473
0.00445347
0.00825509
0.00842979
0.00925032
0.0089677
0.0107937
0.0107459
0.0108683
0.010851
0.01342
0.0131064
0.0174484
0.0171938
0.017671
0.0176054
0.0195444
0.0194485
0.0201473
0.0199648
0.02004
0.0195676
0.0196821
0.0184349
0.0202825
0.0198661
0.0190546
0.0180507
0.0201399
0.0203944
0.0201995
0.0171236
0.018483
0.0202134
0.0202205
0.0195875
0.0157144
0.0141354
0.0157128
0.0172184
0.0141133
0.010642
0.0104872
0.0123394
0.014037
0.0139062
0.0121704
0.00948694
0.010832
0.0104031
0.0105155
0.0231918
0.00329935
0.0236025
0.0134183
0.0164587
0.000200847
0.000216098
0.000145513
0.000111816
0.000106342
0.000112341
0.000129871
0.000151613
0.000186275
0.000276242
0.000423823
0.000497205
0.000471631
0.000388618
0.000303567
0.000250067
0.000213941
0.000193862
0.000194321
0.000253287
0.000599759
0.00164372
0.00338752
0.00450198
0.00397621
0.00242295
0.00114468
0.000561154
0.0005867
0.00316271
0.0102486
0.00949716
0.0105964
0.0105173
0.0106989
0.0106691
0.0119967
0.0115777
0.0127531
0.0123803
0.0168687
0.0164611
0.018849
0.0186455
0.0192885
0.0190738
0.0196382
0.0192641
0.0187434
0.0181131
0.0172522
0.0165399
0.0171282
0.0162562
0.0156316
0.015159
0.019437
0.0182886
0.0170529
0.0158883
0.0203904
0.019939
0.0188716
0.0185783
0.0196834
0.0202706
0.0201518
0.0202209
0.0172402
0.0156854
0.017216
0.0186272
0.0156158
0.0119825
0.0118021
0.0137333
0.0154929
0.0153217
0.0135168
0.011058
0.0121983
0.0116754
0.011693
0.0188409
0.00705846
0.0227033
0.0135333
0.0146889
0.000233737
0.000213243
0.000135615
0.000112116
0.000112829
0.000128447
0.000150343
0.000179664
0.000253714
0.000399695
0.000500254
0.00049397
0.00042457
0.000326264
0.000264642
0.000224205
0.00019972
0.000198629
0.000273707
0.000786225
0.00257099
0.00579624
0.00789131
0.00756477
0.00575055
0.00338727
0.00146775
0.00091667
0.00269791
0.00986043
0.0110552
0.0112994
0.011066
0.0110768
0.0112375
0.0111015
0.0148348
0.0141771
0.0159983
0.0154579
0.0184901
0.018369
0.0181846
0.0179618
0.0188829
0.0185051
0.0176412
0.0172461
0.0163598
0.0164824
0.0149675
0.0149728
0.0151064
0.0154446
0.01498
0.0143171
0.0139546
0.0138964
0.0174595
0.0160182
0.0147807
0.0138362
0.0196035
0.0182835
0.0166487
0.0197402
0.0202336
0.0192706
0.0189769
0.020037
0.0186313
0.0171536
0.0185866
0.0197666
0.0170462
0.0132677
0.0129871
0.0150949
0.0168851
0.0166668
0.0148148
0.0119582
0.0123686
0.0127065
0.012462
0.017167
0.0126102
0.0269395
0.0127911
0.013754
0.000260118
0.000195852
0.000126375
0.000115564
0.000127189
0.000149641
0.000175605
0.000235512
0.00037358
0.000498612
0.000514324
0.000459223
0.000353375
0.000280062
0.000235068
0.000205449
0.000200805
0.000277238
0.000880623
0.00325152
0.00781789
0.0102027
0.00985284
0.00846835
0.00631802
0.00385846
0.00200339
0.0027665
0.00881912
0.0111486
0.0106575
0.0116113
0.0114182
0.0124388
0.0120331
0.0134995
0.0128982
0.0179508
0.0175814
0.0182787
0.0181708
0.0179544
0.0180478
0.015932
0.0156065
0.0168243
0.0163567
0.0163501
0.0160064
0.0157443
0.0161227
0.0140901
0.0144131
0.0148122
0.0151866
0.0132237
0.0129872
0.0130513
0.0133521
0.0150807
0.0137981
0.0128731
0.0123555
0.0177367
0.0159355
0.014285
0.0202328
0.0199526
0.0172617
0.0168856
0.0187441
0.019752
0.0185031
0.0197016
0.020227
0.0183676
0.0144585
0.0140168
0.0163837
0.0181677
0.0178968
0.0160221
0.0122714
0.0122143
0.013497
0.0129426
0.0172195
0.0187599
0.0260462
0.0125583
0.0138521
0.000257798
0.000161787
0.000123566
0.000127236
0.000149061
0.00017263
0.000222948
0.000345736
0.000492153
0.000534831
0.000490324
0.000385415
0.00029771
0.000245443
0.000212325
0.000201628
0.000267332
0.000880813
0.00352878
0.00909107
0.0115174
0.0111664
0.00957083
0.00767986
0.00569451
0.0039978
0.00348495
0.00794128
0.0105187
0.0124019
0.0120572
0.0138905
0.0130921
0.0156666
0.0148127
0.0170744
0.0164331
0.0190354
0.0193692
0.0182882
0.0186444
0.0155563
0.0156848
0.0141755
0.0136777
0.0154418
0.014776
0.0158642
0.0152953
0.0158154
0.0161568
0.0161371
0.0162842
0.0137888
0.0142843
0.0147881
0.0152899
0.0122181
0.0123636
0.0127245
0.0132138
0.0129839
0.0120938
0.0116743
0.0115951
0.0153405
0.0136421
0.012334
0.0198836
0.0186088
0.0148716
0.0145417
0.0166341
0.020206
0.0196167
0.020164
0.0198687
0.0194704
0.0155376
0.0148976
0.0175507
0.0192532
0.0189426
0.0171079
0.0124849
0.0123649
0.0141392
0.0134026
0.0174557
0.00269435
0.015864
0.0129566
0.0146232
0.000239311
0.000142674
0.000129961
0.000149037
0.000171588
0.000211985
0.000320197
0.000475374
0.00055227
0.000520391
0.000423118
0.00031929
0.000256909
0.000219053
0.000202902
0.000242424
0.000781927
0.003489
0.00956812
0.0121882
0.0116774
0.0094901
0.00789005
0.0064661
0.00516959
0.00479377
0.00738948
0.00946208
0.0140366
0.0128047
0.0156572
0.0146999
0.0176958
0.0167137
0.0191793
0.0185461
0.0195122
0.0194676
0.0177201
0.0187175
0.0160828
0.0167971
0.0133243
0.0132693
0.0131609
0.012618
0.0144946
0.0137707
0.0158975
0.0153888
0.0144625
0.0162316
0.016472
0.0161415
0.0163967
0.0137713
0.0144118
0.0150953
0.0157259
0.0117815
0.0121686
0.0126707
0.013279
0.011492
0.0111366
0.0110837
0.0112844
0.0131405
0.0118295
0.0110293
0.0185717
0.016507
0.0127691
0.0125276
0.0143486
0.0198866
0.0200926
0.0199014
0.0186269
0.019972
0.016492
0.0156752
0.0185454
0.019803
0.0195497
0.0180269
0.0129122
0.0129112
0.0147626
0.0139829
0.0168543
0.00159424
0.0112123
0.0138438
0.015558
0.000201085
0.00013994
0.000148885
0.000170956
0.00020577
0.000293919
0.000453941
0.000558154
0.000547232
0.000464539
0.00034632
0.00027121
0.000226499
0.000204322
0.000222537
0.00059029
0.00310372
0.00951472
0.0124959
0.0115692
0.00900196
0.00790409
0.00715657
0.00593629
0.005548
0.00736747
0.00907565
0.0137069
0.0175784
0.0174704
0.0192554
0.0185838
0.0204997
0.019977
0.0206828
0.0206957
0.0196244
0.0203228
0.0149567
0.0162793
0.0134396
0.0139426
0.0121989
0.0120078
0.0127681
0.0122617
0.0135884
0.0132006
0.0156317
0.0150651
0.0137584
0.0132379
0.0164873
0.016551
0.0158303
0.0163578
0.014
0.0147601
0.0154856
0.0160959
0.011661
0.0121589
0.0127748
0.0134796
0.010711
0.010665
0.0108494
0.0111974
0.0114525
0.0106794
0.0103748
0.0165056
0.0142854
0.0111861
0.0110331
0.0124103
0.0187432
0.0199108
0.0188931
0.016631
0.0198731
0.0173171
0.0163888
0.019208
0.0197833
0.0196251
0.0187213
0.0135657
0.0137969
0.0154171
0.0146799
0.0157918
0.00166442
0.0106488
0.0150118
0.0162946
0.000175359
0.000150821
0.000171058
0.000199947
0.00027551
0.00042529
0.00055749
0.000570877
0.000505615
0.000377969
0.000288484
0.000235227
0.000207252
0.00021008
0.000424852
0.00233691
0.00896992
0.0125171
0.011475
0.00836867
0.00778358
0.00763558
0.00729821
0.00657407
0.00763264
0.00921717
0.013252
0.0199013
0.019122
0.0206869
0.0204139
0.0212084
0.0210744
0.0210588
0.0212255
0.0198944
0.0206154
0.0176523
0.0188959
0.0128536
0.013716
0.0120971
0.0123503
0.0118059
0.0116113
0.0132845
0.0127658
0.0132263
0.0132742
0.0134574
0.0151068
0.0143015
0.0131405
0.0130871
0.0165642
0.0165244
0.0153474
0.0160982
0.0142335
0.0150044
0.0157274
0.0163083
0.0116513
0.0122038
0.0128462
0.013564
0.0103233
0.0104728
0.010771
0.0111657
0.0104233
0.010118
0.0100531
0.0143539
0.012418
0.0102569
0.0101824
0.010992
0.0168513
0.0190683
0.01716
0.0145584
0.0192247
0.0179996
0.0170352
0.0193828
0.0193313
0.0193604
0.0190284
0.0144169
0.0149448
0.0160909
0.0154737
0.0153059
0.00173138
0.0119352
0.0161636
0.0166319
0.000167972
0.000171634
0.000197305
0.000258751
0.000398926
0.000552148
0.00059575
0.000541901
0.000417622
0.000308968
0.000245803
0.000210909
0.000203697
0.000310939
0.00158028
0.00756845
0.012386
0.0114919
0.00787707
0.00740555
0.00769543
0.00862368
0.00895624
0.00886259
0.0100214
0.0136589
0.0205582
0.0219255
0.0221286
0.0218661
0.0219789
0.0212434
0.0216576
0.0197513
0.0206114
0.0174375
0.0186785
0.0148441
0.0161249
0.0122015
0.0122438
0.0117318
0.0119845
0.0121461
0.0118205
0.0142444
0.0138961
0.0136716
0.013226
0.0135426
0.0142214
0.0141583
0.0144375
0.0136501
0.0128957
0.0130802
0.0165651
0.0163973
0.0148528
0.0157786
0.0143418
0.0151392
0.0158806
0.0164228
0.0116432
0.0122046
0.0128536
0.0135858
0.0101522
0.0103881
0.010687
0.0110391
0.00993653
0.00985535
0.00989189
0.0125569
0.0110707
0.00983217
0.00981341
0.0102042
0.0148885
0.0175411
0.0153453
0.0128441
0.0179522
0.0184546
0.0175961
0.0192661
0.0183504
0.0186909
0.0190088
0.0154603
0.0161633
0.0167578
0.0164203
0.0153103
0.00758556
0.0147117
0.01702
0.0165995
0.000176221
0.000196317
0.000246697
0.000371843
0.000538379
0.000617696
0.000578262
0.000462672
0.000337373
0.000259734
0.000215461
0.000200527
0.000246156
0.000981826
0.00568362
0.0119602
0.0115493
0.00775567
0.00651774
0.0073765
0.00887173
0.0105522
0.0116676
0.0128568
0.0157631
0.020718
0.0219733
0.0218914
0.0221553
0.0221727
0.0214348
0.0218902
0.0198025
0.0207549
0.0172123
0.0186117
0.0141722
0.0156835
0.0123618
0.0129637
0.0119983
0.0111689
0.0118887
0.012112
0.0129256
0.0123698
0.0146898
0.0145321
0.0145292
0.0139881
0.0134969
0.0138821
0.0147337
0.0146419
0.0138582
0.0131218
0.0127773
0.0131938
0.0165297
0.016246
0.0145069
0.0155358
0.0143801
0.0151972
0.0159438
0.0164442
0.0114663
0.0119935
0.0126449
0.013414
0.0100498
0.0102309
0.010442
0.0107191
0.00972101
0.00970976
0.00976419
0.0112915
0.0103426
0.00965745
0.00966632
0.00988381
0.0132817
0.0158996
0.0138502
0.0116796
0.0165172
0.0186498
0.0180318
0.0189123
0.0171619
0.0178596
0.0189097
0.0166136
0.0172188
0.0175787
0.0174862
0.0152292
0.00734184
0.0149552
0.0174685
0.0165306
0.000195109
0.000240972
0.000346102
0.000517612
0.000628771
0.000611189
0.000513365
0.000370502
0.000279429
0.000223903
0.000199258
0.000213564
0.000589956
0.00381811
0.011044
0.0116272
0.00783813
0.00603848
0.00606609
0.00790865
0.0103004
0.0124083
0.0145846
0.0171808
0.0205746
0.0204393
0.0207464
0.0203932
0.0207628
0.0208687
0.0195513
0.0202951
0.0172408
0.0185353
0.0139165
0.0156836
0.010459
0.012065
0.0100683
0.00982765
0.0112342
0.00943447
0.0122821
0.0119588
0.0136782
0.0131152
0.0127673
0.0150311
0.0148302
0.0149294
0.0145406
0.013821
0.0143296
0.0150726
0.015001
0.0134346
0.0127946
0.0127467
0.0133455
0.0164354
0.0160966
0.0142311
0.0153113
0.014267
0.0151481
0.0159487
0.0164019
0.0111118
0.0116545
0.0123545
0.0131818
0.00982011
0.00987667
0.00999446
0.0102337
0.00959351
0.00954772
0.00946425
0.0106445
0.0100953
0.00955025
0.00958204
0.00979867
0.0122182
0.0145518
0.0129497
0.0111229
0.0153789
0.0187667
0.0186576
0.0185147
0.0163538
0.0174795
0.0188871
0.0176459
0.0179423
0.0185071
0.0183949
0.015986
0.00108073
0.0102024
0.0177429
0.0173022
0.000231959
0.000330737
0.000488211
0.000629663
0.000641278
0.000564252
0.00041079
0.000301615
0.000238912
0.000200867
0.00019839
0.000370513
0.00237106
0.00950228
0.0116092
0.00811766
0.00602695
0.00525633
0.00562462
0.00788634
0.0110315
0.0138358
0.0165702
0.0191652
0.018016
0.0125445
0.0175001
0.0171993
0.0175316
0.0176571
0.0162065
0.0170324
0.0136073
0.0150621
0.00988447
0.0118407
0.00648045
0.00795641
0.00720182
0.0061122
0.00939026
0.00687008
0.0119823
0.0109273
0.0141197
0.0136725
0.0125011
0.0133577
0.0153522
0.0152009
0.0153764
0.0150115
0.014081
0.0146793
0.0153672
0.0152303
0.0131706
0.012667
0.0127259
0.0134493
0.0163464
0.0159621
0.0139891
0.015127
0.0141014
0.0150444
0.0158903
0.0163384
0.0106519
0.0112451
0.011997
0.0128929
0.0093521
0.00932964
0.00940453
0.00967303
0.00940768
0.00918855
0.00890107
0.0104634
0.0100221
0.00935344
0.0093066
0.00969532
0.0118785
0.0138856
0.012838
0.0111477
0.0150363
0.0191766
0.0193215
0.0184934
0.0163331
0.0176506
0.019257
0.0183782
0.0184492
0.0192026
0.019035
0.0163964
0.000432715
0.00567855
0.018396
0.0184474
0.000306811
0.00046948
0.000625379
0.000675448
0.000609319
0.000463964
0.000329918
0.000253459
0.000211073
0.000193802
0.000266324
0.0014014
0.00740963
0.0113738
0.00856898
0.0062095
0.00521318
0.00446269
0.00430892
0.00637429
0.0098812
0.0129994
0.014265
0.0125993
0.00800151
0.00498907
0.0114832
0.00471465
0.01235
0.0126588
0.0127014
0.0114502
0.0122386
0.00886247
0.0103183
0.00528201
0.00709798
0.00297519
0.00377601
0.00419625
0.00309488
0.00776599
0.0053571
0.0115996
0.00990694
0.0145337
0.0139966
0.0129641
0.0138009
0.0156423
0.0155885
0.0158123
0.0155399
0.014223
0.0148404
0.0155574
0.0153037
0.0129405
0.0125704
0.0127087
0.0135029
0.0162579
0.0158552
0.0138644
0.0150193
0.0138878
0.0149023
0.015808
0.0162628
0.010152
0.0107862
0.0116028
0.0125688
0.00870023
0.00866938
0.00879035
0.00913781
0.00902373
0.00856627
0.00815307
0.0106359
0.0103417
0.00878333
0.00962693
0.0101374
0.0121693
0.0140437
0.0136067
0.0119142
0.0154455
0.0196644
0.0197992
0.0190821
0.0171376
0.0189346
0.0197793
0.0189403
0.0189251
0.0197135
0.0194983
0.0151957
0.000150098
0.00218599
0.0191754
0.0190828
0.000429646
0.000616397
0.000699582
0.000655921
0.000521287
0.000370103
0.000278047
0.000223058
0.000196808
0.000226357
0.000858651
0.00536848
0.0107429
0.00902491
0.00677333
0.00553085
0.0044206
0.00274136
0.00280061
0.00469078
0.00662725
0.00750099
0.006651
0.00423788
0.00201747
0.00576177
0.00194711
0.00175802
0.00648356
0.0067837
0.00681381
0.00577655
0.00642761
0.00380368
0.00486525
0.00204458
0.00282482
0.00160126
0.0016276
0.00311561
0.00198464
0.00755134
0.0051571
0.0123944
0.0112346
0.00987123
0.0150704
0.014484
0.0134065
0.0142945
0.0158172
0.015878
0.0160118
0.0159129
0.0142707
0.0148758
0.0156118
0.0152838
0.0127934
0.0125115
0.0126256
0.0134559
0.0161724
0.0157841
0.0138151
0.0149787
0.0136454
0.0147208
0.0156848
0.0161757
0.00966433
0.0103462
0.0112135
0.0122426
0.00806715
0.00810471
0.00839389
0.0088184
0.00821326
0.00779289
0.00769115
0.0119126
0.0116169
0.00886506
0.00938525
0.0104291
0.0136221
0.0151168
0.015398
0.0137199
0.0172469
0.0201319
0.0200424
0.0198289
0.0190416
0.019871
0.0202705
0.01922
0.0193086
0.0197453
0.0193908
0.0122518
0.000116267
0.00111185
0.0198423
0.0192941
0.000584717
0.000720672
0.000698786
0.000584964
0.00041597
0.00030579
0.000247162
0.000210437
0.000219589
0.000615169
0.0039131
0.00979435
0.00942056
0.00746353
0.00654054
0.00506199
0.00272382
0.00140593
0.00187908
0.00262388
0.00307155
0.0028258
0.00192563
0.00109581
0.000614803
0.00225667
0.000907493
0.00084417
0.00252643
0.0025613
0.00261934
0.00212324
0.00239348
0.00144557
0.00178828
0.00105123
0.00118733
0.00132669
0.00111119
0.0031095
0.00189182
0.00879175
0.00639518
0.0130357
0.0118466
0.0101951
0.011548
0.0155922
0.0150303
0.0140481
0.0148393
0.0158449
0.0159839
0.0159992
0.0159965
0.014221
0.0148151
0.0154839
0.0150272
0.0126923
0.0124167
0.0123933
0.0131315
0.0161213
0.0157733
0.0138263
0.0149945
0.0133958
0.0145238
0.0155405
0.0160947
0.00941134
0.0101308
0.0110056
0.0119949
0.00770352
0.00786749
0.00823556
0.0086909
0.00830706
0.00793715
0.00785954
0.0124751
0.0107023
0.00864117
0.00903767
0.00949528
0.0151056
0.0174794
0.0163747
0.0133042
0.0187145
0.020132
0.0198243
0.0202864
0.0194568
0.019805
0.019808
0.0191808
0.0195675
0.0192376
0.0190146
0.00934644
0.000210919
0.00147663
0.020311
0.0192039
0.000718416
0.000743331
0.000655063
0.000466239
0.000341738
0.00027305
0.000232883
0.0002305
0.000549852
0.0031824
0.00878423
0.00957194
0.00798712
0.00759929
0.00666715
0.00369981
0.00122028
0.000833339
0.000978737
0.00114542
0.00111083
0.000861109
0.000628599
0.000480346
0.000398475
0.00055743
0.000999003
0.000597042
0.00107066
0.0010771
0.00109611
0.00094849
0.00102702
0.000801114
0.0008662
0.000901759
0.000820785
0.00163744
0.00111975
0.00424309
0.00264694
0.0110224
0.0105341
0.00920446
0.00785197
0.0136776
0.0127167
0.0121637
0.0158022
0.01541
0.014419
0.0150098
0.0155488
0.0158799
0.0155748
0.0156945
0.0138478
0.0144816
0.0149858
0.0143371
0.0126125
0.0122181
0.0119124
0.0124062
0.0160743
0.0158237
0.0139889
0.0151538
0.013145
0.0142971
0.0153385
0.0159994
0.00933739
0.0100562
0.0109289
0.011834
0.00785537
0.00802103
0.00832161
0.00885115
0.00839178
0.00845494
0.00916378
0.011262
0.0107057
0.00915169
0.0102038
0.00984436
0.0144527
0.0174182
0.0154433
0.0128101
0.0181532
0.0193192
0.0183955
0.0184322
0.0181934
0.016866
0.0176848
0.0188367
0.0195409
0.0182988
0.0177868
0.010033
0.00137106
0.00312583
0.0203644
0.0189159
0.000787547
0.000709109
0.000552818
0.000375149
0.000301586
0.000266075
0.000259547
0.000572929
0.00298742
0.00804527
0.00952732
0.00828629
0.00848227
0.00825619
0.00555757
0.0016044
0.000610272
0.000482089
0.000510509
0.000519423
0.000475398
0.000426038
0.000389634
0.000355971
0.000345873
0.000459461
0.00039087
0.000342702
0.000636597
0.000478019
0.000661424
0.000663059
0.000670367
0.000630761
0.000646829
0.000686815
0.000638238
0.00106133
0.000796715
0.00262351
0.00163822
0.00576128
0.00398708
0.0114701
0.0106003
0.00957325
0.00820893
0.0138222
0.0130691
0.0123412
0.0156972
0.0154474
0.0143918
0.0147689
0.0146376
0.0152369
0.0144314
0.0147952
0.0130317
0.0136852
0.0138724
0.0130383
0.0125941
0.0118709
0.0111229
0.0112661
0.0160453
0.0159917
0.0144167
0.01548
0.0128758
0.0140198
0.0150448
0.0158819
0.0094358
0.0101432
0.0109137
0.0117433
0.00947558
0.00975696
0.010098
0.010344
0.00861696
0.00908807
0.00553082
0.0124569
0.00785177
0.00645691
0.0072718
0.00772004
0.0146754
0.0167982
0.0165156
0.0136632
0.0170331
0.0167601
0.0167109
0.0167926
0.0168211
0.0167
0.0157916
0.018386
0.0193606
0.0160323
0.0169257
0.012818
0.00110398
0.00645751
0.020007
0.0181791
0.000786226
0.000614156
0.000444605
0.000332216
0.000293754
0.000307836
0.000675401
0.00307122
0.00773261
0.00932825
0.00841405
0.00912369
0.00973866
0.0074595
0.00280344
0.000658618
0.000358547
0.000326439
0.000331971
0.000333319
0.000330561
0.000327732
0.000316603
0.00030337
0.000350081
0.000322825
0.000409013
0.000308074
0.000492942
0.000504337
0.000507252
0.000508541
0.000528361
0.00050985
0.000677948
0.000580984
0.00144905
0.000926358
0.00326166
0.00223533
0.00628764
0.00461977
0.0114891
0.0105917
0.0096389
0.00965906
0.00889426
0.00761359
0.013517
0.0130551
0.0121471
0.0149417
0.0149659
0.0137685
0.0138496
0.0130043
0.0137934
0.0125124
0.013189
0.0116758
0.0123036
0.0120699
0.0111103
0.0128917
0.0114998
0.0103656
0.00992709
0.0160971
0.0161654
0.0151969
0.0159989
0.0126514
0.0136864
0.0147741
0.0156711
0.0106235
0.0110104
0.0114591
0.011952
0.00555186
0.00607601
0.00589199
0.00617689
0.0063064
0.0064242
0.00190172
0.00886336
0.00293234
0.00222393
0.00257785
0.00272508
0.0109743
0.0176108
0.011785
0.0102596
0.0172711
0.0150663
0.0140914
0.0155384
0.013183
0.0166451
0.012422
0.0144752
0.0175095
0.0188556
0.0146526
0.0151254
0.0147421
0.0139138
0.0161864
0.0190499
0.0168598
0.00074162
0.000501062
0.000383649
0.000331704
0.000349929
0.000891236
0.00348839
0.00773003
0.00917442
0.00846059
0.00952754
0.0110369
0.00929142
0.00428803
0.000927123
0.000344597
0.000270014
0.000265571
0.000271549
0.000277584
0.000283944
0.000283026
0.000277139
0.000269647
0.000369177
0.000331446
0.000300701
0.000420539
0.000292289
0.000428133
0.000442224
0.000433808
0.00050334
0.000461092
0.000770501
0.000580895
0.00166967
0.0011309
0.00339992
0.00240658
0.00637012
0.00470915
0.0113779
0.0106949
0.0101942
0.00964878
0.0080392
0.0127033
0.0125491
0.0119305
0.0136009
0.0137937
0.0126784
0.0125803
0.010778
0.0117035
0.010625
0.011245
0.00990747
0.0103621
0.00980232
0.00913934
0.0137129
0.0116546
0.0104133
0.00932441
0.0160781
0.0162979
0.0162825
0.0165168
0.0125008
0.0133294
0.0146303
0.0152838
0.0062042
0.00654495
0.00661648
0.0070042
0.00183909
0.00208623
0.00194622
0.00203407
0.00204957
0.00233446
0.000218222
0.00341285
0.000337175
0.000252772
0.000296664
0.000314179
0.00442054
0.0126131
0.00493522
0.00415627
0.0135446
0.0134531
0.0135022
0.0153847
0.00582904
0.012661
0.00561389
0.0144427
0.0167269
0.0182008
0.0130646
0.0143055
0.0177264
0.0226779
0.0270207
0.0175261
0.0165319
0.000640377
0.000428588
0.00038365
0.000403833
0.00105574
0.00422849
0.00792305
0.00915446
0.008512
0.0097796
0.0120948
0.0109338
0.00586175
0.00137257
0.000375946
0.000252284
0.000237434
0.000240346
0.000246028
0.000253237
0.000256523
0.000255444
0.00025258
0.000248542
0.000276465
0.000377087
0.000339665
0.000311451
0.000286507
0.000386928
0.000416333
0.000398038
0.000506839
0.000448456
0.000838487
0.000628764
0.00170151
0.00118247
0.00324172
0.00238485
0.0067829
0.00460148
0.0116344
0.0117244
0.0117939
0.0114922
0.0090492
0.0122969
0.0122364
0.0122797
0.0119038
0.0123594
0.0122527
0.0120986
0.00937871
0.00996894
0.010225
0.0107247
0.00893728
0.00886038
0.00891173
0.00864064
0.0152266
0.0130595
0.012856
0.00991625
0.0159946
0.0159695
0.0170144
0.0169258
0.00735198
0.0133422
0.0147661
0.0147509
0.0020126
0.00213719
0.00211115
0.00221516
0.000210476
0.000240546
0.000223245
0.000234197
0.000236037
0.000274234
6.24852e-06
0.000399711
9.56314e-06
7.18986e-06
8.42617e-06
8.9334e-06
0.000524334
0.00529284
0.000593291
0.000489374
0.00593141
0.0134962
0.0125536
0.0119651
0.000734305
0.00548907
0.000702954
0.0119945
0.0159439
0.016974
0.0128537
0.0131348
0.0184883
0.00823974
0.0223153
0.0162876
0.016462
0.000545467
0.00042502
0.000465792
0.00126424
0.00485966
0.00850262
0.00920245
0.00862537
0.0100159
0.0129212
0.0123006
0.00735963
0.00190264
0.000460054
0.000251296
0.000225151
0.000223502
0.000227142
0.000232805
0.000237382
0.000238303
0.000238219
0.000235625
0.000232615
0.000265329
0.000253384
0.000351922
0.000322292
0.000295949
0.000272902
0.000364157
0.000405706
0.000380725
0.000519261
0.000447003
0.0008476
0.000642571
0.0015996
0.00117002
0.00302445
0.00208452
0.0108329
0.010208
0.00734742
0.00507592
0.0132194
0.0141228
0.014347
0.0139597
0.012696
0.0126288
0.0141599
0.0112898
0.0117705
0.0126437
0.0124649
0.0093061
0.00971159
0.0108807
0.0112647
0.00889825
0.0086382
0.00901887
0.00906653
0.017194
0.0159654
0.0175796
0.0138343
0.00877514
0.0157569
0.0172201
0.0172819
0.00224057
0.00831784
0.0075903
0.00772337
0.000231976
0.000247204
0.000244492
0.000257767
6.03013e-06
6.8656e-06
6.40852e-06
6.70973e-06
6.79909e-06
7.85378e-06
1.14156e-05
1.49276e-05
0.000642243
1.67848e-05
1.38553e-05
0.000718968
0.013696
0.0106001
0.0128269
0.00518752
2.10219e-05
0.000682185
2.0192e-05
0.00513663
0.0145686
0.0158535
0.0122915
0.0128778
0.0201105
0.00202581
0.0168717
0.0159027
0.0167857
0.000521378
0.000512775
0.00136788
0.00545169
0.00913308
0.00939039
0.00879785
0.0103713
0.0135593
0.0133675
0.008608
0.00245895
0.000565457
0.000261769
0.000221989
0.00021525
0.000216263
0.000220031
0.000224239
0.000225759
0.000226859
0.000225364
0.00022337
0.000220189
0.000245196
0.000235713
0.000260764
0.000333979
0.000305967
0.000281623
0.000349283
0.000398197
0.000369197
0.000517336
0.00044375
0.000813323
0.000635245
0.00131128
0.00105471
0.00326483
0.00183584
0.0132272
0.0120336
0.00904295
0.00699428
0.0160819
0.0171
0.0170927
0.0163582
0.0147871
0.0146511
0.0172382
0.0116281
0.0121197
0.0147309
0.0145474
0.0105207
0.0105762
0.0132665
0.0135099
0.0106927
0.00941172
0.0106494
0.0111337
0.0182034
0.0181972
0.0195418
0.0186509
0.00941974
0.00305154
0.0170647
0.00939306
0.000268645
0.00278305
0.00236705
0.00252916
6.65054e-06
7.10805e-06
7.05234e-06
7.42919e-06
1.8241e-05
2.03764e-05
0.0109071
0.00458314
0.0132023
0.0099687
0.000645718
1.9544e-05
0.000633628
0.0139202
0.015326
0.0127116
0.0126753
0.0193464
0.000891841
0.011286
0.0158325
0.0173299
0.000605471
0.00144604
0.0057666
0.00977923
0.00976636
0.00907771
0.0107166
0.014019
0.014095
0.00949096
0.00295029
0.000675966
0.00028382
0.000224505
0.000212801
0.000210633
0.000212363
0.000215509
0.000216886
0.000218371
0.000217354
0.000216416
0.000214097
0.000210298
0.000229724
0.000221696
0.000250104
0.000241051
0.000267981
0.000318131
0.000290298
0.00033288
0.000380027
0.000352498
0.000483284
0.000421317
0.000686076
0.000571479
0.00104206
0.000824733
0.00417882
0.00184219
0.0151704
0.0136175
0.0106633
0.0118426
0.0101552
0.00713072
0.0192349
0.01977
0.0192401
0.0179792
0.017989
0.0178111
0.0204487
0.0138085
0.0142371
0.017935
0.0177677
0.0133821
0.0132589
0.0166927
0.0168118
0.016775
0.0127152
0.0140174
0.0154802
0.0187056
0.0186691
0.0199269
0.0196015
0.00311729
0.000367697
0.0106422
0.00338531
7.85541e-06
0.000326368
0.00027596
0.000300642
0.0046653
0.000565577
0.0103243
0.00427927
1.85029e-05
1.81402e-05
0.013492
0.0148165
0.0132206
0.00979977
0.0128384
0.0176013
0.000569516
0.00793797
0.0159382
0.0171761
0.00139873
0.00590446
0.0102576
0.0102336
0.00937414
0.0111053
0.0142351
0.0144492
0.00995216
0.00328008
0.000775793
0.000309599
0.00023374
0.00021402
0.000208737
0.000207946
0.000209865
0.000210651
0.000212147
0.000211152
0.000211116
0.000209416
0.000207033
0.000203112
0.000217095
0.000210657
0.00023276
0.000225633
0.000255844
0.000245626
0.000274779
0.000300025
0.000311824
0.000345615
0.000326446
0.000406125
0.00037181
0.0005003
0.000447551
0.000967687
0.000603547
0.00520681
0.00797639
0.00215696
0.016282
0.0144412
0.0124601
0.0103322
0.0217156
0.0214512
0.0202169
0.0185105
0.0211211
0.0209899
0.0227812
0.0170774
0.0174545
0.0210696
0.0209464
0.0171758
0.0167981
0.0192617
0.0197528
0.0197931
0.018313
0.017937
0.0189902
0.0102057
0.0184933
0.0102561
0.0195469
0.000360428
1.07155e-05
0.00403439
0.00041264
9.46549e-06
8.0638e-06
8.8303e-06
0.000573405
1.62666e-05
0.00440124
0.000526823
0.0134283
0.0146173
0.010406
0.00422523
0.0132875
0.00972108
0.0157021
0.000361497
0.00478565
0.0159244
0.0166084
0.00562072
0.0107274
0.0106584
0.00972332
0.0113366
0.0142415
0.0144766
0.0100295
0.00341644
0.000848748
0.00033551
0.000246208
0.000219291
0.000209333
0.000205647
0.00020629
0.000206272
0.000207566
0.000206513
0.000206615
0.000205673
0.000204188
0.000201714
0.000198166
0.000207095
0.000202156
0.000218821
0.000213309
0.000236388
0.000228123
0.000261285
0.000250229
0.000281701
0.000288994
0.000305482
0.000297059
0.000324928
0.000314327
0.000383172
0.000342303
0.000981086
0.000517516
0.00826329
0.00545569
0.00830045
0.00239411
0.0165864
0.0146216
0.0125084
0.0103682
0.0228989
0.0218853
0.0203456
0.0184339
0.0232784
0.0232015
0.0237263
0.0201031
0.0205699
0.02317
0.0227125
0.0188843
0.0190397
0.0199726
0.0206115
0.0198308
0.0198696
0.0189258
0.0192888
0.00379993
0.0109999
0.010382
0.0037279
1.04178e-05
0.000480324
1.20961e-05
1.63504e-05
0.000541153
1.51044e-05
0.0132289
0.0143104
0.00481816
0.000518214
0.0134042
0.00952889
0.00425815
0.0139362
0.000254073
0.003074
0.0158013
0.0154383
0.0108285
0.0111138
0.0100099
0.0115581
0.0141356
0.0143345
0.00990282
0.00341611
0.00089482
0.000362111
0.000258801
0.000227495
0.000212433
0.000204676
0.000203969
0.000202979
0.000203922
0.000203184
0.000202873
0.000202316
0.000201292
0.000199842
0.000197785
0.000194869
0.000199395
0.000196187
0.000208068
0.000203746
0.000220819
0.000214548
0.000240407
0.000231391
0.000266278
0.000254527
0.000270982
0.00027905
0.0002754
0.00028987
0.000283474
0.00034283
0.000302906
0.000994545
0.00048922
0.00603043
0.00780392
0.00431467
0.00810916
0.0101454
0.00233791
0.0163965
0.0143265
0.012241
0.0230887
0.0217487
0.0198085
0.0176618
0.0240573
0.024036
0.0238447
0.0212892
0.021877
0.0238238
0.0230796
0.0189122
0.0194099
0.0199483
0.0207342
0.0190735
0.0189272
0.018201
0.0171434
0.000459491
0.00426474
0.00953298
0.00359979
0.000437671
1.38524e-05
1.54132e-05
0.0132593
0.0140996
0.00060408
1.48039e-05
0.0139755
0.00957949
0.00411318
0.000535637
0.0117963
0.000190133
0.00190505
0.0155316
0.0145586
0.0117012
0.0102962
0.0115617
0.0138807
0.013959
0.0094861
0.00335019
0.000927687
0.000388933
0.00027427
0.000235526
0.000216957
0.000204457
0.000202085
0.000200297
0.000200477
0.000200392
0.000199836
0.000199346
0.000198318
0.000197472
0.000196196
0.000194453
0.000192172
0.000194665
0.000192994
0.000199589
0.000196304
0.000209271
0.000204514
0.000223341
0.000216404
0.00024414
0.000234553
0.000258508
0.000266314
0.000262683
0.000275555
0.000270119
0.000328546
0.000288077
0.000929359
0.000473971
0.00729765
0.00544595
0.00913332
0.00419605
0.00969433
0.0116732
0.00203687
0.0156162
0.0136437
0.0228177
0.0208185
0.0185548
0.0164062
0.0241747
0.0241529
0.0235825
0.0215626
0.0221054
0.0238803
0.0229789
0.0165859
0.0185561
0.0184032
0.0202711
0.0172908
0.0144567
0.0149367
1.33719e-05
0.000513711
0.00304416
0.00830578
0.000416205
1.26037e-05
0.0132108
0.0140027
1.72539e-05
0.0140842
0.00994786
0.00411813
0.000505301
1.54917e-05
0.00985003
0.000154209
0.00121477
0.0151539
0.0132765
0.0107441
0.0115748
0.0135507
0.0135505
0.00919903
0.00331417
0.000973042
0.00042052
0.000290098
0.000245942
0.000220469
0.000204917
0.00020007
0.000197739
0.000197023
0.000197063
0.000196822
0.000196441
0.000195544
0.00019494
0.000193874
0.000192901
0.000191521
0.000189774
0.00019213
0.000190612
0.000193625
0.000191664
0.000200312
0.000196481
0.000210528
0.00020534
0.000225894
0.000218506
0.000247549
0.000237273
0.000255264
0.000251375
0.000266588
0.000259931
0.000320548
0.000280063
0.000778348
0.000445286
0.00662739
0.00841597
0.00488949
0.0101343
0.00375033
0.0109382
0.0127349
0.00152365
0.00333682
0.014513
0.0216927
0.0192212
0.0168511
0.0148933
0.024013
0.0239597
0.0225665
0.0215172
0.0220799
0.0235453
0.0225071
0.0119551
0.0147811
0.0144107
0.0183958
0.0122057
0.00715055
1.47126e-05
0.00034248
0.00252055
1.18631e-05
0.0134733
0.0138661
0.0107266
0.0042288
0.000507593
1.44828e-05
0.0077325
0.000136871
0.00085063
0.014383
0.0122778
0.0114702
0.0133526
0.0132448
0.00918606
0.00341768
0.0010574
0.000461726
0.000310176
0.000255257
0.000225532
0.000205274
0.000197884
0.000194796
0.000193452
0.000193219
0.000193108
0.000192934
0.000192484
0.000192104
0.000191331
0.0001906
0.000189795
0.000188896
0.000189623
0.000187393
0.000190372
0.000189612
0.000193352
0.000190823
0.000200745
0.000196684
0.00021224
0.000206651
0.000228023
0.000220244
0.000240407
0.000243453
0.000253297
0.000247155
0.00030085
0.00026674
0.00060583
0.000391827
0.00761193
0.00591915
0.00924744
0.0042838
0.010708
0.0117268
0.0132593
0.00103917
0.00277683
0.00235762
0.0202028
0.0173328
0.0149975
0.0133148
0.0233527
0.0231654
0.0213197
0.0208415
0.0218746
0.0228434
0.0220096
0.0105594
0.010706
0.0110531
0.0148554
0.0059839
0.00203876
9.79914e-06
0.000276103
0.0136717
0.0103023
0.0135763
0.00470549
0.000524235
1.45909e-05
0.0058757
0.000127827
0.000646251
0.0134092
0.0112375
0.013088
0.0131354
0.00945934
0.00384372
0.00124301
0.000521318
0.000333415
0.00026759
0.000229319
0.000206217
0.000195847
0.000191402
0.000189435
0.000188949
0.000188859
0.00018871
0.000188772
0.000188627
0.000188169
0.000187716
0.000187294
0.000186803
0.000185828
0.000187737
0.000187101
0.000186744
0.000184714
0.000188958
0.000187873
0.000193299
0.000190458
0.000201655
0.000197241
0.000213734
0.000207832
0.000230543
0.000222428
0.000233095
0.000241144
0.000236218
0.000272657
0.000250886
0.000418358
0.000320792
0.00830647
0.00674413
0.00513679
0.00965235
0.00360024
0.0107551
0.0119836
0.000613171
0.00182068
0.00145784
0.00297309
0.0184527
0.0153617
0.0131633
0.0118282
0.0226232
0.0222041
0.0198366
0.0193654
0.0213295
0.0221178
0.021601
0.00512681
0.00967029
0.0099629
0.0122238
0.00164354
0.000219932
7.83775e-06
0.0138256
0.0103701
0.0044536
0.0132005
0.000583722
1.50424e-05
0.00420502
0.000123165
0.000510828
0.0123808
0.010201
0.0131972
0.00993611
0.00519588
0.00166073
0.000630305
0.000366983
0.000279828
0.000235959
0.000206982
0.000194092
0.000187751
0.00018501
0.000184104
0.000184175
0.000184028
0.000184396
0.000184473
0.000184345
0.000184145
0.000184019
0.000183687
0.000182907
0.000182501
0.0001856
0.000186654
0.000186109
0.000184871
0.000184439
0.000182184
0.000187849
0.000185886
0.000193586
0.000190521
0.00020252
0.000197838
0.0002157
0.000209399
0.000224671
0.000231394
0.000227482
0.000249234
0.000237935
0.000307425
0.000268593
0.00854512
0.00729056
0.00580962
0.00431028
0.00958568
0.0104749
0.000381702
0.000985075
0.000733493
0.00230308
0.00172831
0.003496
0.0165701
0.0134758
0.0115114
0.0218505
0.0210643
0.0182191
0.0169541
0.0205325
0.0217052
0.0213654
0.00131203
0.00458752
0.00990225
0.00972142
0.0110381
0.000176937
6.23867e-06
0.0137789
0.0102816
0.00463544
0.000556604
0.0126232
1.66934e-05
0.00307747
0.000122832
0.000419959
0.0112641
0.00917033
0.0111743
0.00632557
0.00288
0.000854094
0.000420844
0.000298008
0.000241988
0.000208588
0.000192871
0.000184622
0.00018068
0.000178926
0.000178993
0.000178828
0.000179465
0.000179766
0.000179954
0.000180068
0.00018017
0.000180021
0.000179683
0.000179569
0.000179358
0.000183664
0.000185836
0.000184965
0.000184283
0.000184329
0.000183137
0.000182125
0.000178946
0.000187617
0.000185118
0.000193956
0.000190701
0.000203651
0.000198631
0.000217823
0.000211252
0.000223938
0.000220519
0.000235157
0.00022873
0.000262538
0.000245308
0.00842331
0.00734904
0.00617275
0.00483448
0.00924781
0.0100965
0.00029376
0.000493095
0.000394858
0.0011541
0.000772986
0.00267528
0.00194116
0.00385855
0.0146661
0.0117289
0.0211761
0.0198232
0.0165012
0.014773
0.0197769
0.0215587
0.0213546
0.000139132
0.00111736
0.0044612
0.00368964
0.0106009
5.03759e-06
0.0136224
0.0103488
0.00467488
0.000582476
1.59564e-05
0.0118937
0.00233167
0.000126575
0.000394976
0.0103569
0.0082752
0.00881347
0.00412671
0.00144473
0.000524975
0.000324562
0.000253343
0.000210735
0.000192075
0.000182102
0.000177137
0.000174241
0.000173683
0.00017334
0.000174015
0.000174551
0.00017494
0.000175531
0.000175789
0.000175927
0.000176036
0.000176236
0.000176187
0.000175991
0.000184009
0.000181142
0.000184396
0.000184348
0.000181697
0.000181612
0.000182435
0.000180717
0.000175991
0.000187589
0.000184806
0.00019447
0.000190993
0.000205042
0.000199713
0.000213536
0.000216373
0.000225515
0.00022031
0.000240832
0.000232109
0.00806423
0.00722281
0.00613591
0.0050114
0.00881432
0.0101949
0.000255456
0.000324086
0.000292981
0.000507707
0.000393851
0.001293
0.00083757
0.00289886
0.00203825
0.00388832
0.0128078
0.0205088
0.0184744
0.0147124
0.0138708
0.0191919
0.0216034
0.0215729
3.95869e-06
0.000119193
0.00103047
0.00365193
0.000827926
0.0110797
0.0131459
0.0100684
0.00483951
0.000589175
1.66738e-05
0.0108065
0.00212319
0.00017544
0.00053684
0.00952732
0.00778901
0.00703249
0.00257863
0.000758935
0.000374574
0.000268353
0.000215898
0.000191945
0.000180506
0.000174331
0.000170674
0.000169009
0.000168155
0.000168581
0.000169006
0.000169475
0.000170342
0.000170882
0.000171309
0.00017181
0.000172319
0.000172563
0.000172648
0.000173031
0.00018203
0.000182628
0.000182513
0.000178712
0.000182075
0.000182496
0.000179377
0.000178802
0.000182112
0.000180168
0.000173161
0.000187647
0.000184637
0.000195182
0.000191415
0.000206917
0.000201221
0.00020918
0.000216867
0.000212477
0.000228396
0.000222196
0.00758534
0.00686639
0.00600146
0.00496513
0.00880241
0.0110396
0.000236743
0.000270853
0.000260536
0.000322394
0.000289266
0.000537047
0.000404229
0.00132705
0.000830642
0.00285905
0.00198242
0.00382221
0.0199136
0.0169836
0.0128536
0.0136861
0.0189026
0.0220183
0.0221016
3.42045e-06
0.000109981
0.000835418
0.00401417
8.73863e-05
0.0112861
0.0123061
0.00968496
0.00455885
0.000611912
1.68829e-05
0.00998685
0.00242228
0.000571982
0.00211004
0.00875531
0.00782775
0.00545843
0.00143733
0.000478994
0.000294687
0.00022471
0.000192746
0.000179753
0.00017242
0.00016814
0.000165651
0.000164024
0.000163828
0.000163824
0.000164051
0.000164837
0.000165432
0.000166188
0.000166929
0.000167627
0.000168258
0.000168784
0.000169451
0.000169852
0.000180211
0.000182325
0.000181496
0.000180364
0.00018092
0.000175787
0.000178672
0.00017934
0.000178326
0.00017709
0.000181596
0.000179317
0.00017035
0.000187809
0.000184493
0.000196192
0.000192061
0.00020303
0.000209126
0.000205676
0.00021811
0.000213341
0.00747937
0.00639639
0.00566429
0.00481168
0.00936854
0.000240908
0.000223949
0.000267218
0.000257013
0.000327524
0.000290774
0.0005379
0.000404467
0.00127329
0.000788159
0.00276314
0.00185376
0.00365176
0.0191835
0.0152804
0.0109172
0.0137557
0.01895
0.0227132
0.0229547
3.18902e-06
8.84014e-05
0.000850962
0.00467843
2.50549e-06
0.0132971
0.0110573
0.0105882
0.00456756
0.000573479
1.74727e-05
0.00926189
0.00364773
0.00893234
0.0245382
0.0086099
0.0082151
0.00378735
0.000781182
0.000345918
0.000240676
0.000195749
0.000179661
0.000171371
0.000166411
0.000163438
0.000161252
0.000160408
0.000159674
0.000159398
0.000159704
0.00016
0.000160664
0.000161508
0.000162349
0.000163147
0.000164009
0.000164953
0.000165627
0.000166428
0.000180602
0.000177894
0.0001811
0.000181066
0.00017678
0.000178051
0.000173075
0.000176476
0.000176269
0.000177333
0.000175791
0.000181423
0.000178711
0.000167147
0.000188214
0.000184555
0.000197311
0.000192652
0.00020135
0.000198984
0.000208106
0.000204604
0.00778951
0.00618441
0.00519983
0.00445728
0.000241117
0.000225609
0.000234847
0.000212565
0.000267458
0.000253544
0.000333651
0.000298398
0.000534902
0.000415824
0.00114956
0.000711665
0.00257833
0.00167791
0.00332062
0.0182612
0.0133219
0.00893494
0.0137037
0.0192537
0.0237477
0.0240981
2.54356e-06
9.21049e-05
0.00101372
0.00451737
0.0127002
0.0103483
0.0050063
0.0105418
0.000580252
1.64563e-05
0.00872054
0.00709435
0.000396064
0.0284294
0.00865859
0.00880062
0.00221346
0.000479025
0.000270407
0.000203903
0.000180657
0.00017112
0.000165702
0.000162466
0.000160128
0.00015874
0.000157697
0.000156949
0.000156592
0.000156342
0.000156351
0.000156672
0.000157192
0.000157918
0.000158714
0.000159608
0.000160507
0.000161499
0.000162174
0.00017876
0.000179599
0.000179036
0.000175318
0.000179148
0.000179568
0.000173796
0.000174099
0.000170819
0.000174674
0.000174022
0.000176397
0.000174507
0.000181282
0.000178176
0.000162522
0.000188523
0.000184631
0.000193742
0.000195333
0.000199396
0.000197221
0.00631961
0.00491718
0.00406514
0.000249787
0.000215601
0.000220343
0.000226659
0.000238165
0.000201825
0.000276843
0.000261964
0.00035427
0.000321824
0.000529711
0.000430013
0.0010079
0.000686809
0.00230495
0.00146772
0.00297502
0.0170253
0.0111782
0.00702017
0.0144387
0.0196838
0.0250052
0.0255096
2.68029e-06
0.000105093
0.00107034
0.00585222
0.0122597
0.00959224
0.000641132
0.00442446
0.0100891
1.66857e-05
0.00857021
0.0266701
0.000199935
0.00523894
0.00891873
0.0118768
0.00111114
0.00033592
0.000221812
0.000187497
0.000173164
0.000166682
0.000162834
0.000160326
0.000158734
0.00015752
0.000156526
0.000155789
0.000155218
0.000154754
0.000154507
0.000154475
0.000154702
0.000155146
0.00015572
0.000156443
0.000157306
0.000158166
0.000158901
0.000178495
0.000176903
0.000177968
0.000178276
0.000173093
0.000175557
0.00017716
0.000171763
0.000171581
0.000167403
0.000173408
0.000172255
0.000175731
0.000173262
0.000181039
0.000177559
0.000159555
0.000188996
0.000184775
0.000189888
0.000192047
0.000191282
0.00492351
0.00370496
0.000263762
0.000214012
0.00020294
0.000209365
0.000221696
0.000228952
0.000250264
0.000193041
0.000297818
0.00027844
0.0003762
0.000342945
0.0005366
0.000452446
0.000891544
0.000684307
0.00201138
0.00124648
0.00261896
0.0154692
0.00903668
0.00528011
0.0155306
0.0204873
0.0263126
0.0272463
3.01376e-06
0.000117987
0.00140647
0.00755184
0.0117138
0.00918781
1.83214e-05
0.00055429
0.00441049
0.0100304
0.00857321
0.0347175
0.000124284
0.00131048
0.00934319
0.0243402
0.000600024
0.000259276
0.000202971
0.000181972
0.000170773
0.000165229
0.000161773
0.000159602
0.000158184
0.000157008
0.000156116
0.000155381
0.000154744
0.000154188
0.000153811
0.000153609
0.000153651
0.000153933
0.000154394
0.000155029
0.000155813
0.000156693
0.000157538
0.00017748
0.000176277
0.000176281
0.000174713
0.000175037
0.000176011
0.000170931
0.000171868
0.00017333
0.000169748
0.000169426
0.000162844
0.000171997
0.000170426
0.000175243
0.000172495
0.000180909
0.000176827
0.00015828
0.000185097
0.000186402
0.000185778
0.00364037
0.000274836
0.000214009
0.000194481
0.00020235
0.000209991
0.000226818
0.000237444
0.000258669
0.00018675
0.000316009
0.000293405
0.000406309
0.000367542
0.000560913
0.00051283
0.000944428
0.000848058
0.00176485
0.00141627
0.00257126
0.01409
0.00698806
0.00383786
0.0207237
0.0274687
0.0291637
3.44629e-06
0.000156213
0.00196601
0.00735071
0.0109944
0.00889522
1.60432e-05
0.000544219
0.00426329
0.00921045
0.00863065
0.0162221
0.000102386
0.000184712
0.0121328
0.0224141
0.000387502
0.000225624
0.00019818
0.000181425
0.000170912
0.000165738
0.000162246
0.000160144
0.000158565
0.000157325
0.000156281
0.000155359
0.000154609
0.000154047
0.000153677
0.000153453
0.000153429
0.00015364
0.000154044
0.000154614
0.000155366
0.000156252
0.000157127
0.000176049
0.000175468
0.000174544
0.000175186
0.000172957
0.000171366
0.00017339
0.000167502
0.00016935
0.000169936
0.000167728
0.00016716
0.000159995
0.000170979
0.000168786
0.000174029
0.000171585
0.000181015
0.000176619
0.000157928
0.000181014
0.000276363
0.00021784
0.000194523
0.000187379
0.000204003
0.000198678
0.000209897
0.000234617
0.000245188
0.000257827
0.000180519
0.000332663
0.000301442
0.000484168
0.000452244
0.000858618
0.000936242
0.00138488
0.0017463
0.00210862
0.00214067
0.00318834
0.0136991
0.00571726
0.0224427
0.0286106
0.0307361
4.57206e-06
0.000212503
0.00205523
0.00990374
0.010078
0.00875262
1.56245e-05
0.000520824
0.00420115
0.00950741
0.00911081
0.00215482
0.00010125
0.000111231
0.0192985
0.00936765
0.00029779
0.000214962
0.00019784
0.000183066
0.00017452
0.000168813
0.000165094
0.000162407
0.000160437
0.000158843
0.000157451
0.000156288
0.000155349
0.000154627
0.000154119
0.000153892
0.000153945
0.000154209
0.000154654
0.000155188
0.000155805
0.000156509
0.000157282
0.000175613
0.000173138
0.000173155
0.0001739
0.000171146
0.000172556
0.000170778
0.000167757
0.000169432
0.000162733
0.000166951
0.000166986
0.000166022
0.000165057
0.000158883
0.000169882
0.000167697
0.000173025
0.000170164
0.000176838
0.000158056
0.000291652
0.000225503
0.000187588
0.000195225
0.000190409
0.000180148
0.0002103
0.000202961
0.000217308
0.000234703
0.000244193
0.000259422
0.000176903
0.000401029
0.000340559
0.000963439
0.00094188
0.00230525
0.00259445
0.00306624
0.00455816
0.00323396
0.00458482
0.0056151
0.0142154
0.0237596
0.0294192
0.0317558
6.13416e-06
0.000230137
0.00293751
0.0102429
0.0105434
0.00922688
0.00871951
1.49391e-05
0.00052066
0.00403241
0.00907669
0.0118648
0.000305756
0.000100629
0.000104048
0.017581
0.00228726
0.000261497
0.000212817
0.000199743
0.000186747
0.000180699
0.000174958
0.00017104
0.000167469
0.000164501
0.000162281
0.000160387
0.00015883
0.000157576
0.000156559
0.000155881
0.000155515
0.000155399
0.000155519
0.000155838
0.00015632
0.000156945
0.000157676
0.00015845
0.000172723
0.000174162
0.000171397
0.000172288
0.000172431
0.000167636
0.000169351
0.000166959
0.000164756
0.00016602
0.000160271
0.00016462
0.000164538
0.000164812
0.000163287
0.000158593
0.000168509
0.000166751
0.000172517
0.000169388
0.000159187
0.000435308
0.000226341
0.000186448
0.000180662
0.000196962
0.000192746
0.000176253
0.000212968
0.000206974
0.000219124
0.000231556
0.0002415
0.000315213
0.000172141
0.000810472
0.000613454
0.0026902
0.0026664
0.0056894
0.00623591
0.0071035
0.00964102
0.00694519
0.00995729
0.0167279
0.0245544
0.0302556
0.0319513
6.7096e-06
0.000328271
0.00312102
0.0117659
0.00994573
0.00900129
0.00912124
1.49401e-05
0.000492912
0.00403516
0.00936556
0.0159653
0.000130744
0.000101146
0.000104241
0.0102405
0.000549816
0.000248297
0.000213633
0.00020414
0.000193981
0.000189078
0.000183942
0.000179756
0.000176059
0.000172383
0.000169224
0.000166265
0.000164068
0.000162243
0.000160801
0.00015974
0.00015895
0.000158482
0.000158361
0.000158519
0.000158911
0.000159496
0.000160199
0.000160964
0.000173046
0.000170141
0.000170223
0.000173027
0.000167261
0.000169298
0.000169999
0.000164139
0.000165471
0.000162443
0.000161846
0.000162435
0.000159313
0.000162333
0.000161978
0.000163535
0.000162005
0.000158757
0.000166388
0.000165187
0.000169234
0.000161769
0.00113759
0.000223061
0.000180692
0.000185183
0.000189358
0.000176
0.000201112
0.000195487
0.000171108
0.000212049
0.000207478
0.000216846
0.000234954
0.000262711
0.000648446
0.00232574
0.00174627
0.00643453
0.00641247
0.0110895
0.0118903
0.013859
0.0167163
0.0203378
0.0247676
0.0305528
0.0317917
9.50483e-06
0.000351478
0.00375665
0.0115594
0.0092341
0.00882105
0.0111043
1.41189e-05
0.00049835
0.00408947
0.0096756
0.00898972
0.0155686
0.000111188
0.000100994
0.000105831
0.00335767
0.000183214
0.000243743
0.000216678
0.000212122
0.000204067
0.000200262
0.000196006
0.000191965
0.00018805
0.000184323
0.000180804
0.000177389
0.000174174
0.000171225
0.000168896
0.000167091
0.000165687
0.00016479
0.000164357
0.000164296
0.000164559
0.000165056
0.000165769
0.000166671
0.000169582
0.000172991
0.000167945
0.000168959
0.000171447
0.000163961
0.000165894
0.000165809
0.000160487
0.000162457
0.00016035
0.00015944
0.000159298
0.000159054
0.000160555
0.000159914
0.000161332
0.00016049
0.000159844
0.000165094
0.000163275
0.0001689
0.00016774
0.00340743
0.000223575
0.000180946
0.000175229
0.000178251
0.000189155
0.000193429
0.000169899
0.000202404
0.000197992
0.000210075
0.000206068
0.000216111
0.000285003
0.000401572
0.00202992
0.00587662
0.00477461
0.0122248
0.0122395
0.0182026
0.0191281
0.0234422
0.0250298
0.0246692
0.0306392
0.0308958
1.01773e-05
0.000431406
0.00368053
0.0117415
0.00889794
0.00908979
0.0141586
1.43818e-05
0.000501692
0.00412589
0.00944287
0.00924886
0.0123972
0.000109372
0.000101261
0.000104795
0.000944599
0.000122189
0.00024311
0.000223332
0.000223037
0.000217913
0.000214569
0.000211483
0.000208055
0.000204759
0.000201257
0.000197813
0.000194323
0.000190875
0.000187506
0.000184208
0.0001812
0.00017883
0.000177134
0.00017624
0.000175899
0.000176
0.000176455
0.00017733
0.00017844
0.000170595
0.000166752
0.000166926
0.000171856
0.000164287
0.000165976
0.000168692
0.000160463
0.000162411
0.000161852
0.000156897
0.000158324
0.000159519
0.000157399
0.000156931
0.000159307
0.000158763
0.000157998
0.000159278
0.000158288
0.000162606
0.000164507
0.000162406
0.000166731
0.000179673
0.00814163
0.000247136
0.000183771
0.00016999
0.000174254
0.000179509
0.000190379
0.000193943
0.000201526
0.000197484
0.000213617
0.000206475
0.00022371
0.000518184
0.000980282
0.00566341
0.0116493
0.0101516
0.0195237
0.019549
0.025915
0.026213
0.0301553
0.024127
0.0299295
1.24796e-05
0.000426992
0.00378327
0.0112681
0.00862245
0.0103887
0.0145904
1.43097e-05
0.000513721
0.00425258
0.00882181
0.00948268
0.00897725
0.00470919
0.000110064
0.000100962
0.000104557
0.000271002
0.000114416
0.000246899
0.000235018
0.000236892
0.00023504
0.000233045
0.000231087
0.000228788
0.000226378
0.000223491
0.000220527
0.000217257
0.000213876
0.000210419
0.000207211
0.000204464
0.000202147
0.000200265
0.000198844
0.000198102
0.000197998
0.000198393
0.000199155
0.000199784
0.000166736
0.000171016
0.000164425
0.000165412
0.000170005
0.000161229
0.000163246
0.000164039
0.000156466
0.000158687
0.000160149
0.00015475
0.000154867
0.000159281
0.000155494
0.000154923
0.000160375
0.000157024
0.000155938
0.000158258
0.000155931
0.000168828
0.000163748
0.000162138
0.000165655
0.000200409
0.0150949
0.000353761
0.000186122
0.000169911
0.00017671
0.000172299
0.00018239
0.000189641
0.000192899
0.000201502
0.000196623
0.000236954
0.000216393
0.000262473
0.00141418
0.00319198
0.0120779
0.0188783
0.0173716
0.0262652
0.0260704
0.029343
0.0288594
0.0236314
0.0288229
1.23228e-05
0.000449735
0.00358389
0.0108281
0.00882611
0.0133219
0.0129446
1.47863e-05
0.000530893
0.00431161
0.008454
0.00906175
0.00873794
0.00142621
0.000109628
0.000100774
0.000104799
0.000139216
0.000113292
0.000258377
0.000251978
0.000254184
0.00025489
0.000254869
0.000254376
0.000253165
0.000251569
0.000249444
0.000247003
0.000244242
0.000241343
0.000238468
0.000235844
0.000233408
0.000231211
0.000229364
0.000228143
0.000227652
0.000227682
0.000227862
0.000228371
0.000229061
0.000168203
0.000163325
0.000163793
0.00017033
0.000161613
0.0001623
0.000166558
0.000156943
0.000160083
0.000160942
0.000153136
0.000154679
0.000159455
0.000152425
0.000152434
0.000159528
0.000153217
0.000152694
0.000163436
0.000155076
0.000153808
0.000158228
0.000154505
0.000180755
0.000161273
0.000159629
0.000165774
0.000230108
0.0230365
0.000764388
0.000186246
0.000169126
0.000166667
0.000179703
0.000175416
0.000183426
0.000189354
0.000192925
0.000206118
0.000198694
0.00031828
0.000250376
0.000410879
0.00455256
0.00835779
0.0203802
0.0255291
0.0246169
0.028402
0.0280298
0.0280588
0.0231186
1.31851e-05
0.000418185
0.00341542
0.0103281
0.0100543
0.0141759
0.00631064
1.51594e-05
0.000544464
0.00424834
0.00865177
0.00844137
0.00883387
0.00876598
0.000391907
0.000108142
0.000100713
0.000104146
0.000119774
0.000113311
0.000274299
0.000271795
0.00027437
0.000276839
0.000278329
0.000279048
0.000278759
0.000278059
0.000276714
0.000275128
0.000273291
0.000271385
0.000269426
0.000267528
0.000265744
0.000264203
0.000263067
0.000262621
0.000262758
0.000263425
0.000264285
0.000265395
0.000267031
0.000164003
0.000168791
0.000160809
0.00016186
0.000167711
0.000159086
0.000160334
0.000162038
0.000153083
0.000155911
0.000159634
0.000150398
0.000151612
0.000159242
0.000150143
0.000149982
0.000160821
0.000151149
0.000150736
0.000169868
0.0001528
0.000152005
0.00015579
0.000153998
0.000201291
0.000160289
0.000156755
0.000164314
0.000269055
0.0268668
0.00218134
0.000185358
0.000170307
0.000167075
0.000180004
0.000176463
0.000182368
0.000190562
0.000196829
0.000225261
0.00020693
0.000605924
0.000367032
0.000980419
0.0112313
0.0165604
0.0259765
0.0276859
0.0273697
0.0275149
0.0272803
0.0226889
1.22332e-05
0.000398518
0.00322748
0.00970548
0.0129481
0.0130331
0.00195135
1.56622e-05
0.000538299
0.00429935
0.00992208
0.008672
0.00841756
0.00894426
0.00904997
0.000162797
0.00010773
0.000100962
0.000103412
0.000116471
0.000111976
0.000290358
0.000291731
0.000294916
0.000298341
0.000300782
0.000302506
0.000303274
0.000303591
0.000303295
0.000302857
0.000302188
0.000301398
0.000300543
0.000299787
0.000299282
0.000299043
0.000299278
0.000300103
0.000301354
0.000302849
0.000304711
0.000307177
0.000309896
0.000159077
0.000165813
0.000168029
0.000158712
0.000158981
0.000163748
0.000155112
0.000157698
0.000159813
0.000149907
0.000151485
0.000159082
0.000147739
0.000148562
0.000159569
0.000148146
0.000147793
0.000164199
0.000148932
0.000148605
0.000181861
0.000151029
0.000149599
0.000152702
0.000152003
0.00023161
0.000161386
0.000155475
0.000161108
0.000163642
0.000313065
0.0274387
0.00659812
0.000185665
0.00017265
0.000168334
0.000178802
0.000176211
0.000181825
0.000195932
0.00020965
0.000288426
0.00023327
0.0015538
0.000792813
0.0029533
0.0210241
0.0243806
0.0273816
0.0273212
0.0274628
0.0223477
0.0221075
1.16519e-05
0.000377082
0.00299006
0.00926735
0.0138387
0.00755378
0.000517582
1.53733e-05
0.00055078
0.00478425
0.0127863
0.0100132
0.00870423
0.00850052
0.00877766
0.00877011
0.000125364
0.000107292
0.000101095
0.000102938
0.000115986
0.000110641
0.000303735
0.000309647
0.000313934
0.000318027
0.000321071
0.000323318
0.000324617
0.000325575
0.000326063
0.000326499
0.000326811
0.00032713
0.000327511
0.000328126
0.00032898
0.000330103
0.000331604
0.000333468
0.000335593
0.000337966
0.000340592
0.000343154
0.000345733
0.000161766
0.000157625
0.000155271
0.000155942
0.000166273
0.000164551
0.00015634
0.0001602
0.00015073
0.000154165
0.000158763
0.000147046
0.000148223
0.000158952
0.000145667
0.000145912
0.000161228
0.000146115
0.000145782
0.000170837
0.000146655
0.00014626
0.000202604
0.000150219
0.000147792
0.000151274
0.000148812
0.00027138
0.000159461
0.000156421
0.000161697
0.000166357
0.000348333
0.0250369
0.0152428
0.000188419
0.000173125
0.000169643
0.000178427
0.000175481
0.000182886
0.000211677
0.000248093
0.000498421
0.000319082
0.00437177
0.00219504
0.00884452
0.0263468
0.027029
0.0265868
0.0220919
0.0247997
0.00890321
1.10166e-05
0.000344451
0.0028323
0.0129082
0.00235101
0.000187138
1.58349e-05
0.000621241
0.00453876
0.0137468
0.0128601
0.0102629
0.00881922
0.00859013
0.00823916
0.000119508
0.000106933
0.000100861
0.000103022
0.000114464
0.000109368
0.000312289
0.000319603
0.000324288
0.000328215
0.000331196
0.000333659
0.000335218
0.00033651
0.000337392
0.000338235
0.000339034
0.000339893
0.000340891
0.000342134
0.000343611
0.000345354
0.000347418
0.000349797
0.000352358
0.000355095
0.000357736
0.000360155
0.000362334
0.000156468
0.000163048
0.000153906
0.000152584
0.000153722
0.000164801
0.000160653
0.000152749
0.00015849
0.000147274
0.000150371
0.000158374
0.000144392
0.000145176
0.000159513
0.000143481
0.000143616
0.000164832
0.000143751
0.000143621
0.000183188
0.000144682
0.00014396
0.000233272
0.00014822
0.000146616
0.000151664
0.000147128
0.000316772
0.000159138
0.000156209
0.000154382
0.000163839
0.000167383
0.000364159
0.0193678
0.0242201
0.000194217
0.000172637
0.000169595
0.000179659
0.000175335
0.000186713
0.000267113
0.000366723
0.00118068
0.000628621
0.0120449
0.00620541
0.01975
0.0272807
0.027083
0.0208815
0.0171623
0.0198448
0.00269885
0.00937158
1.00354e-05
0.000324674
0.00807004
0.00061704
0.000131102
1.7911e-05
0.000592505
0.00429599
0.0127583
0.0138001
0.0130539
0.0108328
0.0088132
0.00858015
0.00835889
0.000118141
0.000106022
0.000100586
0.000103262
0.000113254
0.000108702
0.000315403
0.000323605
0.00032797
0.000331586
0.000334331
0.000336819
0.000338508
0.000339906
0.000340934
0.000341907
0.000342864
0.000343911
0.000345124
0.000346582
0.000348282
0.000350274
0.000352545
0.00035506
0.00035774
0.000360447
0.000362945
0.00036514
0.000366913
0.000151279
0.000159273
0.000163205
0.000152067
0.00015071
0.000150912
0.000160827
0.000158358
0.000150419
0.000157608
0.000143634
0.000146878
0.000158367
0.00014207
0.000142503
0.000161424
0.000141386
0.000141373
0.000171896
0.000141572
0.000141499
0.00020395
0.000143118
0.000141893
0.000274183
0.000145298
0.000144689
0.000149717
0.000146631
0.00035086
0.000161192
0.000157039
0.000151346
0.000154238
0.000164356
0.000166198
0.000368179
0.00861011
0.0272524
0.000210105
0.00017241
0.000168765
0.000183269
0.000177033
0.000194455
0.000443213
0.00076903
0.00321766
0.00168165
0.0229081
0.0159305
0.0261409
0.0250783
0.0241284
0.0164653
0.00868204
0.000311004
0.00276608
9.43366e-06
0.00253875
0.000206195
0.000122099
1.71922e-05
0.000556142
0.00444726
0.00762399
0.0126437
0.0137548
0.0133494
0.010964
0.00940171
0.00891707
0.00809525
0.000115982
0.000105046
0.000100659
0.00010273
0.000111626
0.000108261
0.000312217
0.000324201
0.000328467
0.000331938
0.000334439
0.000336489
0.000337913
0.000339087
0.000340077
0.000341061
0.000342116
0.000343357
0.000344827
0.000346494
0.000348378
0.000350451
0.000352713
0.00035505
0.000357381
0.000359439
0.000361048
0.000362085
0.000362457
0.000146761
0.000154724
0.000149545
0.000159985
0.0001607
0.000149442
0.00014845
0.000158023
0.000156806
0.000145918
0.000157396
0.000140792
0.000142477
0.000159195
0.000139782
0.000140415
0.000165464
0.000139202
0.00013925
0.000184371
0.000139224
0.000139165
0.000235314
0.000141432
0.000139843
0.000320933
0.000143179
0.000141978
0.00015036
0.000147599
0.000152199
0.000145198
0.000365543
0.000161735
0.000158679
0.00015599
0.000163018
0.000165595
0.000361988
0.00259447
0.00957426
0.0269247
0.000264018
0.000172855
0.000168855
0.000189166
0.000179913
0.00021553
0.000957613
0.00207949
0.00838295
0.00468305
0.0271191
0.0250621
0.0276091
0.0191508
0.0190614
0.00257384
9.07191e-06
0.000313771
0.0006627
0.000135373
0.000120046
1.60662e-05
0.000592936
0.00401642
0.00234545
0.00709909
0.0121665
0.0137772
0.0135484
0.00891607
0.0123942
0.00908801
0.00817033
0.00011454
0.000104758
0.000101303
0.000110117
0.000107475
0.000299534
0.000316069
0.000319951
0.000323441
0.000325483
0.000327426
0.000328643
0.000329833
0.000330729
0.000331603
0.000332631
0.000333906
0.000335222
0.00033657
0.000337918
0.000339199
0.000340386
0.000341493
0.000342162
0.000342179
0.000341304
0.000339393
0.000336266
0.000149461
0.000146603
0.000145324
0.000143317
0.000143822
0.00015631
0.000159209
0.000157337
0.000145854
0.000145501
0.000155963
0.000156237
0.000142197
0.000157533
0.000138744
0.000140127
0.00016151
0.000137506
0.000138177
0.000172757
0.000136928
0.000137074
0.0002055
0.000137106
0.000136887
0.000277479
0.000138985
0.000138239
0.000353237
0.000142045
0.000139806
0.000150472
0.000153404
0.000148443
0.000144495
0.000368811
0.000160032
0.000159012
0.00015622
0.000162291
0.000165513
0.000331744
0.000309379
0.00306195
0.0087487
0.0217456
0.0004635
0.000174475
0.000169767
0.00020941
0.000185732
0.000277904
0.00244866
0.005633
0.0194787
0.0114855
0.0274067
0.0275735
0.0264129
0.0088177
0.000293774
9.12897e-06
0.000217041
0.000123918
0.000117658
1.73103e-05
0.000522167
0.0041079
0.000607931
0.00206202
0.00638366
0.0114137
0.0135131
0.00999422
0.0138537
0.00916953
0.00926736
0.00752245
0.000113345
0.000104399
0.000101129
0.000103578
0.000109695
0.000105623
0.000274087
0.000290957
0.000293837
0.000298485
0.000299259
0.000301661
0.000302283
0.00030344
0.000303633
0.000303873
0.00030441
0.000305015
0.0003051
0.000304923
0.000304388
0.000303353
0.000302076
0.000300168
0.000297383
0.000293382
0.000287824
0.000280515
0.000271567
0.000144475
0.00015214
0.000142887
0.000141876
0.000141073
0.000141809
0.000156527
0.000156324
0.000155083
0.000142494
0.000154966
0.00015612
0.000139165
0.000158653
0.000136199
0.000137138
0.000165974
0.000135305
0.000135957
0.000185467
0.000134655
0.00013485
0.000237888
0.000135061
0.000134653
0.000325206
0.000136676
0.00013609
0.000366435
0.000140852
0.000137934
0.000153209
0.000150334
0.000148479
0.000147962
0.00014582
0.000142705
0.000360494
0.000159251
0.000157229
0.000154601
0.000162302
0.000167052
0.000260804
9.17007e-06
0.000358736
0.00271699
0.0165472
0.00104983
0.000176194
0.000171663
0.00027019
0.000202195
0.000470573
0.00632637
0.0139997
0.0259653
0.0218931
0.0245087
0.0264016
0.0206516
0.0028409
0.0101164
8.59515e-06
0.000138082
0.000121189
0.00011541
1.5118e-05
0.000537185
0.00381348
0.000209486
0.000531781
0.0018048
0.00480102
0.010366
0.0131073
0.0131847
0.0108664
0.00963924
0.00936284
0.00754271
0.000112286
0.000100627
0.000102941
0.000103513
0.000104763
0.000108121
0.000241448
0.000248998
0.000252232
0.000257297
0.000257506
0.000258336
0.000257313
0.000256505
0.00025491
0.000253334
0.000252131
0.000250865
0.000249015
0.00024696
0.000244615
0.000241756
0.000238509
0.000234824
0.000230329
0.000224751
0.00021792
0.00021016
0.000201766
0.000139781
0.000147882
0.000152743
0.000138695
0.000138712
0.00013968
0.000139116
0.000139678
0.000154611
0.000153805
0.00015355
0.000154641
0.000156388
0.000135959
0.000161574
0.000134551
0.00013506
0.000173261
0.000132967
0.000134021
0.000207643
0.000132388
0.000132599
0.000280725
0.000133139
0.000132441
0.000355558
0.000134654
0.000133837
0.000368692
0.000140329
0.000136354
0.000152468
0.000149507
0.000146958
0.000144652
0.000142973
0.000325443
0.000159156
0.000156473
0.000153902
0.000164283
0.000168529
0.000193395
1.06029e-05
0.000316692
0.00262937
0.000180819
0.000172443
0.000443962
0.000251378
0.00103108
0.0152351
0.0230936
0.0274079
0.0262849
0.0194938
0.0206534
0.0165955
0.000350313
0.00355304
0.00948175
0.000125151
0.000118787
0.000114799
1.56325e-05
0.000504609
0.00356928
0.000138491
0.000196369
0.000459554
0.00133599
0.00352314
0.0140726
0.00853865
0.0138042
0.0124106
0.009402
0.010639
0.00764796
0.000109713
0.000100499
0.000103447
0.000103987
0.000104403
0.000107144
0.000217909
0.00021609
0.000214945
0.000217433
0.000216665
0.000215868
0.000213512
0.000211083
0.000207894
0.000204991
0.00020254
0.000200152
0.000197391
0.000194717
0.000191857
0.000188656
0.000185504
0.000182176
0.000178233
0.000173752
0.000168876
0.000164
0.000159488
0.000136141
0.000143228
0.000138089
0.000148989
0.000152203
0.000135595
0.000136372
0.00013669
0.000136463
0.000152055
0.000151969
0.000152959
0.000154582
0.000158061
0.000134
0.000166137
0.000132271
0.000133019
0.000186749
0.000130717
0.000131458
0.000240865
0.000130194
0.000130436
0.000329356
0.000131177
0.000130364
0.000366986
0.000132725
0.000131682
0.000357596
0.000139555
0.000135418
0.000151399
0.000148866
0.000146452
0.000144304
0.000142149
0.000248875
0.000161049
0.000156229
0.000153324
0.000165687
0.000169165
0.000154794
9.32562e-06
0.00653771
0.000193642
0.000176006
0.000914443
0.0003861
0.0024847
0.0233344
0.0262542
0.0256728
0.0268578
0.00917511
0.0178057
1.05143e-05
0.00042793
0.00296607
0.000121523
0.000117264
0.000112665
1.47325e-05
0.000461613
0.00377623
0.00012532
0.000136174
0.000180689
0.000359397
0.000919725
0.012372
0.00245558
0.0138027
0.0140498
0.00986227
0.0136638
0.00912767
0.00690475
0.000108389
0.000102419
0.000100455
0.000104377
0.000104576
0.000105503
0.00010634
0.000203985
0.000194493
0.00018678
0.000184384
0.000181466
0.000179468
0.000176494
0.000173158
0.000169407
0.000166114
0.000163449
0.000161114
0.000158855
0.00015685
0.000154825
0.000152933
0.00015134
0.000149447
0.000147354
0.000145132
0.000142777
0.000140592
0.000137996
0.000131709
0.000138593
0.000135291
0.000133874
0.000145016
0.000148951
0.000149853
0.000133098
0.000132234
0.000132896
0.000133952
0.000150148
0.000151109
0.000152775
0.000155254
0.000161337
0.000131476
0.000173684
0.000130309
0.000130797
0.000210198
0.000128717
0.00012943
0.000284092
0.000128128
0.000128241
0.000357845
0.00012911
0.000128412
0.000367945
0.000131314
0.000129705
0.000315515
0.000139727
0.00013741
0.000141817
0.000134808
0.000151037
0.00014862
0.000146212
0.000143647
0.00018486
0.000162823
0.000157559
0.000154091
0.000166392
0.000171534
0.00013492
0.0153968
0.000228159
0.000184495
0.00208284
0.000737001
0.00599616
0.0259985
0.0263028
0.0201732
0.024848
0.00990287
0.00291931
1.26015e-05
0.000345145
0.000120341
0.000114475
0.00011093
1.33718e-05
0.000491861
0.00330327
0.000123124
0.000126473
0.000134967
0.000165074
0.000272445
0.00615192
0.000612034
0.0107731
0.0130769
0.0126794
0.0141269
0.010527
0.00948906
0.00657684
0.000107366
0.000103722
0.000101524
0.000100313
0.000105741
0.000106157
0.000106937
0.000197262
0.000180812
0.00016857
0.000160788
0.000155058
0.000151739
0.00014833
0.000144927
0.000141605
0.000138845
0.00013681
0.000135437
0.000134341
0.000133504
0.000132818
0.000132483
0.000132108
0.000131564
0.000130828
0.000129722
0.000128402
0.000126676
0.000124555
0.000127849
0.000134367
0.000130866
0.000129504
0.000140965
0.000131499
0.000145351
0.000147301
0.000147929
0.000130122
0.000130143
0.00013072
0.000149067
0.000150765
0.000152901
0.000157369
0.000166176
0.000129597
0.000187925
0.000128073
0.000129111
0.000244671
0.000126425
0.000127104
0.000332868
0.00012618
0.000126131
0.000367697
0.000127192
0.000126576
0.000353165
0.000130178
0.000128021
0.00023614
0.000138424
0.000140822
0.000137625
0.000133708
0.000151058
0.000148295
0.000145545
0.000143084
0.000149501
0.000163703
0.000159941
0.000156198
0.00016749
0.000176363
0.000122258
0.022958
0.000320453
0.000206314
0.00480019
0.00157396
0.0139326
0.0255842
0.0240114
0.0167936
0.019738
0.00932421
0.00323102
0.000342428
1.0101e-05
0.000117611
0.000112391
0.000109498
1.42871e-05
0.000437506
0.00309377
0.000120018
0.000123377
0.000126257
0.000132516
0.000151023
0.00160801
0.000210497
0.00382818
0.00774618
0.0142028
0.0115166
0.0138495
0.00950955
0.0129725
0.00677143
0.000106346
0.000102728
0.000100949
0.000100201
0.000106384
0.000107043
0.000108224
0.000194801
0.000170138
0.000155725
0.000145207
0.000136858
0.000131943
0.000128092
0.000125219
0.000122925
0.000121025
0.000119862
0.000119534
0.000119314
0.000119398
0.000119726
0.000120172
0.000120462
0.000120406
0.00011997
0.000119031
0.000117813
0.000116191
0.000114407
0.00012359
0.000129883
0.000126318
0.000124747
0.000136895
0.000128441
0.000126006
0.00014149
0.000127094
0.000144258
0.00014528
0.000146788
0.00012864
0.000127396
0.000148582
0.000150712
0.000154114
0.000160833
0.000174247
0.000127755
0.000212631
0.000125846
0.000126787
0.000288508
0.000124515
0.000125161
0.000359266
0.000124337
0.000124304
0.000366859
0.000125332
0.000124751
0.000302791
0.000129207
0.000126296
0.000175582
0.000140388
0.0001379
0.000136414
0.000135881
0.000133858
0.000131484
0.000152246
0.00014837
0.000145401
0.000142815
0.00013182
0.000164031
0.000161025
0.000157825
0.000170141
0.000188879
0.000112461
0.0255416
0.00055166
0.000262559
0.0107745
0.00344511
0.0218606
0.0233954
0.0192204
0.0165214
0.00290276
0.00940653
0.000380244
1.0113e-05
0.000115084
0.000110739
1.28616e-05
0.000407164
0.00302855
0.000117173
0.000120089
0.000122804
0.000125893
0.0001303
0.000402392
0.000140925
0.000920083
0.00210645
0.0133459
0.00452708
0.0139945
0.00866857
0.0124652
0.0143691
0.00621834
0.000107354
0.000107761
0.00010408
0.00010725
0.000101844
0.000100496
0.000100045
0.000108837
0.000110084
0.0002013
0.000162503
0.000145402
0.000133639
0.000124076
0.000117756
0.000113696
0.000111561
0.000110202
0.000109017
0.000108656
0.000108876
0.000109301
0.000110054
0.000110926
0.000111641
0.000112027
0.000112061
0.000111584
0.000110786
0.000109634
0.000108313
0.000107234
0.000119707
0.000125904
0.000121651
0.000120128
0.000132719
0.000122968
0.00012097
0.000137597
0.000125282
0.00012249
0.00014092
0.000125193
0.000142392
0.000144236
0.00014619
0.000126054
0.000148448
0.000151275
0.000156564
0.000166043
0.000189133
0.00012563
0.000248964
0.000123981
0.000124941
0.00033622
0.000122477
0.000123026
0.000367939
0.000122442
0.000122335
0.000346751
0.000123515
0.000122982
0.00022209
0.000131585
0.000128136
0.000124798
0.000144442
0.000140214
0.00013709
0.000134531
0.000132439
0.000154123
0.00015028
0.000145871
0.000142647
0.000119403
0.000165778
0.000161555
0.000158754
0.000176841
0.000219454
0.000106364
0.0250044
0.00108952
0.000398015
0.0196663
0.00735764
0.0247466
0.0187686
0.016294
0.000332481
0.00295013
0.00933365
1.11707e-05
0.000112887
1.19104e-05
0.000383713
0.00287769
0.000114708
0.000116895
0.000119472
0.000121723
0.000124901
0.000172159
0.000128077
0.000261119
0.000501936
0.00822056
0.0010657
0.0111342
0.0107266
0.0143384
0.0129284
0.00991681
0.00599699
0.000108623
0.00010876
0.000105916
0.000102734
0.000108297
0.000101182
0.000100166
9.98699e-05
0.000109789
0.000111299
0.000215625
0.000158924
0.000136435
0.000123906
0.000114192
0.000107206
0.000103127
0.000101544
0.000100894
0.000100367
0.000100532
0.000101297
0.000102303
0.000103466
0.000104476
0.00010523
0.000105625
0.000105644
0.000105208
0.000104515
0.000103613
0.000103059
0.000102641
0.000115961
0.000121695
0.000117432
0.000115833
0.000128628
0.000118459
0.000116934
0.000133572
0.000120855
0.000118914
0.000137293
0.000123586
0.00012141
0.000139226
0.00012478
0.000141332
0.000143538
0.000145993
0.000148633
0.000153018
0.000160164
0.000174736
0.000215116
0.000124155
0.000294031
0.000121859
0.000122943
0.000359878
0.000120807
0.000121195
0.000364489
0.000120775
0.000120658
0.000287752
0.000121791
0.000121199
0.000166606
0.000130832
0.000126632
0.00012961
0.000123329
0.000128222
0.000139738
0.000136698
0.0001339
0.000131852
0.000155461
0.000151225
0.000146636
0.000142628
0.000110943
0.000168579
0.00016202
0.000159032
0.000191421
0.000290309
0.00010185
0.0230656
0.00227136
0.000707583
0.0236166
0.0157557
0.0247246
0.0160771
9.71108e-06
0.000337919
0.00289979
0.00925928
1.11753e-05
0.000384178
0.00260868
0.000113545
0.000114857
0.000117565
0.000119072
0.000122005
0.000133573
0.0001242
0.000149561
0.000181849
0.00229973
0.000287907
0.00435007
0.0141208
0.0139094
0.00688107
0.0100249
0.013382
0.00626077
0.000110427
0.000109603
0.000104121
0.000106991
0.000107596
0.000101673
0.000109146
0.000100498
9.98688e-05
9.98518e-05
0.000111796
0.000236319
0.000158294
0.000129561
0.000115324
0.000105879
9.89599e-05
9.50036e-05
9.39263e-05
9.3846e-05
9.39487e-05
9.46973e-05
9.59794e-05
9.72917e-05
9.85999e-05
9.9681e-05
0.000100348
0.000100737
0.000100687
0.000100342
9.98379e-05
9.95495e-05
9.93592e-05
9.88635e-05
0.000112506
0.000118065
0.000113758
0.000112278
0.00012445
0.000114829
0.000113707
0.000129594
0.000117396
0.000115985
0.000133442
0.000120315
0.000118313
0.000135928
0.000122725
0.000121246
0.000138253
0.000140637
0.000143285
0.000146017
0.000149765
0.000155616
0.000165787
0.000190494
0.000253554
0.000121952
0.000338755
0.000120181
0.000121031
0.000367241
0.000118958
0.000119489
0.000338449
0.000118971
0.000118845
0.000206809
0.00012005
0.000119414
0.000139381
0.000127649
0.000125938
0.000128737
0.000124377
0.00013047
0.000121963
0.000117105
0.000139648
0.000136595
0.000133176
0.000155994
0.000152422
0.000147737
0.000143077
0.000105367
0.00017514
0.000163308
0.000159283
0.000225939
0.000451395
9.82173e-05
0.0185467
0.00469255
0.00137493
0.0242805
0.0214654
0.0227532
9.85082e-06
0.000331605
0.00285566
0.00933646
1.14111e-05
0.000334649
0.00265654
0.000112898
0.000115234
0.000116558
0.000118926
0.000127214
0.000120953
0.000131005
0.000137029
0.000506302
0.000153658
0.000998048
0.0143755
0.00952128
0.00193336
0.0131717
0.00900519
0.014639
0.00569038
0.000111436
0.000111303
0.000105342
0.000102803
0.000107933
0.000108572
0.000100835
0.00011037
9.99517e-05
9.95211e-05
9.98694e-05
0.000261348
0.000160904
0.000124597
0.000108069
9.86639e-05
9.23177e-05
8.87825e-05
8.80735e-05
8.86414e-05
8.93417e-05
9.06097e-05
9.20835e-05
9.36031e-05
9.49521e-05
9.58815e-05
9.65493e-05
9.68886e-05
9.68179e-05
9.67153e-05
9.65996e-05
9.65293e-05
9.6336e-05
9.59971e-05
0.000109226
0.000114345
0.000110608
0.000109244
0.000120412
0.000111922
0.000110968
0.000125523
0.000114486
0.000113324
0.000129411
0.000117265
0.000115539
0.000132381
0.000119715
0.000117901
0.000135016
0.000120617
0.000137551
0.000140351
0.000143261
0.00014671
0.000151732
0.000159419
0.000175304
0.00021789
0.000300381
0.000359742
0.000118356
0.000119359
0.000360696
0.000117371
0.000117682
0.000270159
0.000117336
0.000117228
0.000158042
0.000118361
0.000117683
0.000124992
0.000126449
0.000128737
0.000124334
0.000129883
0.000124039
0.000132615
0.000120471
0.000109617
0.000139341
0.00013612
0.000156212
0.000152897
0.000148396
0.000143243
0.000100878
0.00018982
0.000166028
0.00016045
0.000301785
0.000791463
9.57839e-05
0.0163666
0.00929903
0.00271509
0.0226391
0.0233134
0.0187317
9.67398e-06
0.000323408
0.00284419
0.00940149
9.8303e-06
0.000339671
0.00233051
0.000113523
0.000114728
0.000116895
0.000123177
0.00011849
0.000125774
0.000128456
0.000184616
0.000132138
0.000263793
0.0116082
0.0031467
0.000421996
0.011489
0.0147856
0.0129314
0.0112082
0.00573038
0.000112356
0.000107398
0.000103524
0.000101607
0.000108735
0.00010968
0.000100239
0.00011141
9.95622e-05
9.9507e-05
9.98986e-05
0.000286693
0.000165257
0.000120684
0.000101815
9.25084e-05
8.70208e-05
8.3867e-05
8.37188e-05
8.48187e-05
8.60444e-05
8.75097e-05
8.92036e-05
9.07169e-05
9.1924e-05
9.29199e-05
9.35866e-05
9.38285e-05
9.39747e-05
9.41694e-05
9.41339e-05
9.41939e-05
9.41327e-05
9.41826e-05
0.000106111
0.000110906
0.000107869
0.000106694
0.000116431
0.000109442
0.000108569
0.00012147
0.000111818
0.000110803
0.000125351
0.000114276
0.000112786
0.000128682
0.000116609
0.000114632
0.000131624
0.000118436
0.000117062
0.000134347
0.000137239
0.000140299
0.000143704
0.000148122
0.000154568
0.000165478
0.000192338
0.000258221
0.000341273
0.000365461
0.000116718
0.000117433
0.000327747
0.000115679
0.000116112
0.000191316
0.000115529
0.000115436
0.000134663
0.000116643
0.000115886
0.000115074
0.000125548
0.000128165
0.000131916
0.000123599
0.00013239
0.000122694
0.000135985
0.0001187
0.000121854
0.000103986
0.000139241
0.000156253
0.000153012
0.000148843
0.000143763
9.77094e-05
0.000221692
0.000171747
0.0001621
0.000464241
0.00146995
9.44054e-05
0.0173214
0.00517624
0.0203641
0.0229836
0.0168555
9.41872e-06
0.000319203
0.00284217
0.00971054
9.95678e-06
0.000296785
0.00228849
0.000114253
0.000120721
0.000115454
0.000122641
0.000124965
0.000138041
0.000127341
0.00014937
0.00479946
0.000721723
0.000170625
0.0146632
0.0138744
0.00660697
0.0112616
0.0145279
0.00556641
0.000105135
0.000109643
0.000108323
0.000108451
0.000102194
0.000100572
0.000110827
9.97227e-05
0.000112819
9.95237e-05
9.97045e-05
9.99662e-05
0.000308418
0.000169894
0.000117564
9.66762e-05
8.75139e-05
8.26421e-05
8.00534e-05
8.03791e-05
8.19532e-05
8.34681e-05
8.51795e-05
8.68984e-05
8.83775e-05
8.97148e-05
9.07083e-05
9.12757e-05
9.16016e-05
9.20481e-05
9.21792e-05
9.23322e-05
9.24873e-05
9.27846e-05
9.31512e-05
0.000105241
0.000103743
0.00010745
0.000112489
0.000107274
0.000106515
0.000117359
0.000109338
0.000108392
0.000121239
0.000111425
0.000110089
0.000124817
0.000113464
0.000111544
0.000128053
0.000115201
0.000113685
0.000131044
0.00011602
0.000134
0.000137165
0.000140632
0.000144718
0.000150338
0.000158631
0.000176055
0.000221031
0.000307269
0.000358958
0.000355108
0.000115056
0.000249962
0.000114014
0.000114424
0.000150234
0.000113905
0.000113817
0.000121997
0.000114912
0.000114235
0.000107715
0.000127689
0.000124808
0.000131796
0.000135192
0.000122224
0.000135441
0.000139087
0.000116817
0.000120603
0.000119818
0.000100046
0.00015679
0.000152954
0.000149037
0.000143939
9.58157e-05
0.000289067
0.000183371
0.000165956
0.00079201
0.00273711
9.36051e-05
0.0212334
0.00971535
0.0175829
0.0215539
0.0172608
9.27751e-06
0.000320094
0.00282703
0.00880377
8.79151e-06
0.000290073
0.00216068
0.000117627
0.000113922
0.00011905
0.000121339
0.000129687
0.000123141
0.000133431
0.00119137
0.000219315
0.000137032
0.0144096
0.00841939
0.00185618
0.0113368
0.0145218
0.0148098
0.00557206
0.000103266
0.000106205
0.000110609
0.000108891
0.000109245
0.000101332
0.000100001
0.000111922
9.96473e-05
9.97493e-05
9.99803e-05
0.000100063
0.000323681
0.000174179
0.000115046
9.24434e-05
8.33333e-05
7.90571e-05
7.69719e-05
7.78067e-05
7.97519e-05
8.15864e-05
8.34955e-05
8.52636e-05
8.68638e-05
8.81856e-05
8.90977e-05
8.96158e-05
9.02087e-05
9.05548e-05
9.07306e-05
9.10819e-05
9.15612e-05
9.20672e-05
9.26225e-05
0.000102591
0.000104808
0.00010409
0.000101117
0.000104358
0.000108686
0.000113111
0.000107016
0.000106126
0.000117156
0.000108709
0.000107584
0.000120906
0.000110505
0.000108876
0.000124351
0.00011215
0.000110674
0.00012759
0.000114123
0.000112844
0.000130674
0.000133903
0.000137416
0.000141399
0.000146411
0.000153444
0.000165187
0.000194603
0.000263035
0.000343823
0.00036253
0.000313558
0.000113453
0.000177915
0.000112418
0.000112883
0.000130252
0.000112187
0.000112146
0.000112531
0.000113139
0.000112449
0.000102746
0.00013104
0.000126982
0.000123945
0.000134579
0.000138836
0.000121545
0.000138914
0.000114987
0.000118586
0.000117925
0.000120376
9.7458e-05
0.000157557
0.000152745
0.000148998
0.00014411
9.46765e-05
0.00042658
0.000208077
0.000172825
0.00140507
0.0048836
9.33411e-05
0.022393
0.0166707
0.0166893
0.0193447
9.31325e-06
0.000316323
0.00260666
0.00902399
8.48066e-06
0.000268099
0.0020765
0.000115582
0.000116892
0.000118707
0.000125222
0.000120284
0.00012771
0.000285235
0.00014523
0.000129503
0.00998332
0.0026463
0.000423203
0.0115107
0.0145814
0.0151066
0.0113156
0.00558703
0.000104316
0.000101869
0.000108275
0.000111876
0.000109682
0.0001102
0.00010055
9.99273e-05
0.000113251
9.98899e-05
0.000100067
0.000100188
0.000100123
0.000331428
0.000177669
0.000112756
8.87835e-05
7.98357e-05
7.60672e-05
7.46595e-05
7.62467e-05
7.8572e-05
8.06926e-05
8.26941e-05
8.44501e-05
8.59604e-05
8.72013e-05
8.79442e-05
8.86192e-05
8.91019e-05
8.94041e-05
8.98382e-05
9.04519e-05
9.10603e-05
9.17615e-05
9.24978e-05
0.000100998
0.000102895
0.000102239
0.000104359
0.000103647
0.000101387
0.000105071
0.000108994
0.000113059
0.000106326
0.000105441
0.000116932
0.000107959
0.000106597
0.000120568
0.000109456
0.000108111
0.000124002
0.000111142
0.000109969
0.00012726
0.000112
0.000130555
0.000134072
0.000138042
0.00014272
0.000148839
0.000157876
0.000176817
0.000225021
0.000313832
0.00035773
0.000347346
0.000228297
0.000142911
0.000110886
0.000111309
0.000118687
0.000110628
0.000110635
0.000105863
0.000111429
0.000110856
9.9403e-05
0.0001307
0.000134047
0.000126514
0.000123527
0.00013846
0.000144084
0.000113054
0.000116716
0.000116138
0.000119686
0.000118686
0.000122555
9.58864e-05
0.000158994
0.000152711
0.00014861
9.41862e-05
0.000689543
0.000257024
0.000186709
0.00247619
0.00842705
9.34255e-05
0.0217963
0.0200549
0.0161765
0.0171758
9.20962e-06
0.000292803
0.00268102
0.0080384
7.85035e-06
0.0002581
0.00201624
0.000114492
0.000115979
0.000122076
0.000117355
0.000123975
0.000153744
0.000132627
0.000125729
0.00353285
0.000581577
0.000173686
0.0116823
0.0147242
0.0155107
0.0121621
0.00434042
0.00564802
0.000105605
0.000103057
0.000101136
0.000110335
0.000109207
0.000109496
0.000112959
0.000111365
0.000100376
0.000100185
0.000100254
0.000100377
0.00010034
0.000100177
0.000333987
0.000179788
0.000110363
8.5535e-05
7.69105e-05
7.38435e-05
7.35889e-05
7.55632e-05
7.80925e-05
8.03439e-05
8.23485e-05
8.40054e-05
8.54109e-05
8.64278e-05
8.72461e-05
8.77664e-05
8.82314e-05
8.8764e-05
8.94223e-05
9.01544e-05
9.089e-05
9.17598e-05
9.29912e-05
0.000101133
0.000100491
0.000102603
0.000101971
0.000103952
0.000103057
0.000101556
0.000105159
0.000109037
0.000112947
0.000105779
0.000104695
0.000116723
0.000107129
0.000105924
0.000120316
0.000108531
0.000107495
0.000123748
0.000110445
0.000109225
0.000127138
0.000130644
0.000134592
0.000139074
0.000144639
0.000152245
0.000164981
0.000197288
0.000268265
0.000346424
0.000358701
0.000293994
0.000165565
0.000125797
0.000109449
0.000109922
0.000109881
0.000109036
0.000109142
0.000101635
0.000109703
0.000109182
9.73492e-05
0.000133506
0.000129783
0.000138286
0.000125666
0.000143663
0.000147949
0.00011125
0.000114994
0.000114444
0.000117949
0.000117099
0.000122135
0.000121085
0.000125088
9.51053e-05
0.00016171
0.000152908
9.40727e-05
0.00115224
0.000351459
0.000212076
0.00419689
0.0144786
9.43626e-05
0.0205167
0.0211529
0.0162278
8.55009e-06
0.000302003
0.00239589
0.00813872
7.53765e-06
0.000245869
0.00196729
0.000114376
0.00011893
0.0001155
0.000120467
0.000135076
0.000127742
0.000122094
0.000815111
0.000192029
0.00013874
0.0118978
0.0149418
0.0158353
0.012808
0.00513161
0.00103486
0.00567781
0.000107239
0.000103782
0.000101992
0.000101018
0.000111401
0.000109834
0.000110375
0.000112442
0.000100635
0.000100614
0.000100657
0.000100651
0.000100486
0.00010021
0.000328684
0.000180825
0.000107601
8.27707e-05
7.46735e-05
7.28849e-05
7.31773e-05
7.53517e-05
7.79824e-05
8.02613e-05
8.22388e-05
8.37827e-05
8.50338e-05
8.59899e-05
8.66116e-05
8.72138e-05
8.78209e-05
8.85071e-05
8.92793e-05
9.01127e-05
9.12737e-05
9.26235e-05
9.3997e-05
0.000101024
0.00010045
0.000102358
0.000101616
0.000103452
0.000102593
0.000101622
0.000105188
0.000109002
0.000112828
0.000105134
0.00010411
0.000116556
0.000106311
0.000105379
0.000120144
0.000107853
0.000106848
0.000123642
0.000108559
0.000127183
0.000131061
0.000135409
0.000140671
0.000147195
0.000157344
0.000177391
0.00023015
0.000319209
0.000357505
0.000336757
0.000206618
0.000135877
0.000115195
0.000108101
0.000104159
0.000107638
0.000107784
9.90314e-05
0.000108083
0.000107714
9.61246e-05
0.00013267
0.000137735
0.000129278
0.00014334
0.000147607
0.000153251
0.000109445
0.000113408
0.000112902
0.000116306
0.000115547
0.000120613
0.000119471
0.000124098
0.000123401
0.000128305
9.48319e-05
0.000166467
9.46688e-05
0.00188886
0.000516247
0.000256402
0.00672979
0.0179864
9.54914e-05
0.0187784
0.0210905
0.0156904
8.81542e-06
0.000269727
0.00243552
0.00711821
7.17747e-06
0.000239669
0.00194263
0.000117044
0.000118256
0.000129626
0.000123692
0.000119873
0.000227917
0.000142697
0.000131625
0.0121362
0.0152975
0.016291
0.0132197
0.00567879
0.0012881
0.000255897
0.00574084
0.000108723
0.000105281
0.000102921
0.00010175
0.000101256
0.000112393
0.000110541
0.00011133
0.000113736
0.000101073
0.00010104
0.00010098
0.00010091
0.000100664
0.000100242
0.000318282
0.000178978
0.000104831
8.04982e-05
7.36894e-05
7.25468e-05
7.30913e-05
7.54489e-05
7.81917e-05
8.04979e-05
8.22826e-05
8.3692e-05
8.48429e-05
8.5636e-05
8.62856e-05
8.69912e-05
8.76854e-05
8.84801e-05
8.9556e-05
9.08608e-05
9.22027e-05
9.36559e-05
9.53181e-05
0.000100963
0.00010032
0.000102041
0.000101336
0.00010289
0.000102231
0.00010166
0.000105205
0.000108964
0.000112735
0.000104433
0.000103641
0.000116449
0.000105649
0.000104804
0.000120068
0.000107341
0.000106199
0.000123677
0.000127499
0.000131728
0.000136678
0.000142779
0.000150998
0.000165051
0.000199607
0.00027511
0.000347294
0.000353817
0.000270925
0.000154007
0.000121359
0.000107328
0.000106848
0.000100946
0.000106218
0.000106484
9.72826e-05
0.000106616
0.000106175
9.56114e-05
0.000137352
0.000132184
0.000142621
0.000147183
0.000154324
0.000174243
0.000108172
0.000112064
0.000111586
0.000114695
0.000113974
0.000118936
0.000117743
0.00012235
0.000121521
0.000127593
0.000126598
0.000131119
9.49973e-05
9.57383e-05
0.00296226
0.000784245
0.000327575
0.0104446
0.0194991
9.70864e-05
0.016564
0.0198035
7.87608e-06
0.000278147
0.00217844
0.0156108
0.00726487
7.02575e-06
0.000232146
0.00191392
0.000114924
0.000125385
0.000121072
0.000116263
0.000147169
0.000133547
0.000127008
0.0126517
0.0157214
0.0166254
0.0135173
0.00609217
0.00145378
0.000295527
0.00015201
0.00575243
0.00011072
0.000106368
0.000111472
0.000104046
0.000102713
0.000101968
0.000101678
0.000113582
0.000112336
0.000101528
0.000101449
0.000101293
0.000101125
0.000100846
0.00030414
0.000174789
0.000102133
7.92279e-05
7.33569e-05
7.24959e-05
7.34518e-05
7.62233e-05
7.89502e-05
8.09942e-05
8.25125e-05
8.37873e-05
8.47584e-05
8.5507e-05
8.6188e-05
8.69618e-05
8.79018e-05
8.91051e-05
9.04005e-05
9.17991e-05
9.33917e-05
9.51555e-05
9.69763e-05
0.000101657
0.000102381
0.000101864
0.000101667
0.000105204
0.000108919
0.00011268
0.000103826
0.000103151
0.000116408
0.000105137
0.000104199
0.000120113
0.000105702
0.000123919
0.00012802
0.000132772
0.00013841
0.000145648
0.000156664
0.000177982
0.000235709
0.00032342
0.000355909
0.000322886
0.000186358
0.000129427
0.000111766
0.000103042
9.86341e-05
0.000105022
0.00010531
9.64603e-05
0.000105341
0.000104971
9.55175e-05
0.000136687
0.00014215
0.000146978
0.000155372
0.000186265
0.000112974
0.000112212
0.000117152
0.000115927
0.00012048
0.000119536
0.000125663
0.000124698
0.000130582
0.00012932
0.000135981
9.60251e-05
9.71677e-05
0.00436225
0.00117778
0.000434205
0.0139105
0.0197952
9.88737e-05
0.0191393
8.16388e-06
0.000246201
0.00217091
0.0142172
0.00714356
6.77264e-06
0.000228377
0.00190632
0.000122767
0.000117439
0.000114569
0.000135631
0.000128645
0.000123958
0.0130842
0.0162492
0.0170539
0.0135917
0.00617982
0.00159332
0.000312883
0.000155801
0.000137413
0.00579398
0.000113124
0.000112207
0.000103713
0.000102887
0.000102398
0.000102133
0.000113235
0.000101952
0.000288443
0.00016924
9.97703e-05
7.87971e-05
7.33196e-05
7.28969e-05
7.45694e-05
7.73602e-05
7.97269e-05
8.14643e-05
8.28838e-05
8.39966e-05
8.48319e-05
8.55695e-05
8.64483e-05
8.74598e-05
8.86293e-05
8.99762e-05
9.14766e-05
9.31561e-05
9.49725e-05
9.68677e-05
9.8859e-05
0.000101672
0.000105195
0.000108894
0.000112673
0.00010333
0.000102619
0.000116457
0.000104641
0.000103682
0.000120312
0.000124335
0.000128838
0.000134195
0.000140787
0.00014969
0.000165028
0.000201975
0.000283549
0.000346215
0.000346701
0.000244657
0.000144084
0.000117251
0.000105547
0.000100263
9.739e-05
0.000103853
0.00010421
9.62033e-05
9.62686e-05
0.000141186
0.00014663
0.00015711
0.000202624
0.000115197
0.000113914
0.000118539
0.000117451
0.000123598
0.000122636
0.000128647
0.000127284
0.000135195
0.000134158
0.000140555
9.72575e-05
9.89119e-05
0.00606554
0.0017155
0.000577872
0.0160899
0.0195277
0.0175743
7.15913e-06
0.00024744
0.00212083
0.0142361
0.00666718
6.6432e-06
0.000225296
0.00189996
0.000118842
0.000115757
0.000130304
0.000125655
0.000120029
0.0140458
0.0169199
0.0173307
0.0135263
0.00609283
0.00162131
0.000331633
0.000158991
0.000139274
0.000131818
0.000114327
0.000103255
0.000102854
0.000272243
0.000162929
9.84537e-05
7.87631e-05
7.37043e-05
7.40685e-05
7.59943e-05
7.8501e-05
8.05447e-05
8.21841e-05
8.34544e-05
8.43718e-05
8.51599e-05
8.60138e-05
8.70245e-05
8.82104e-05
8.96364e-05
9.11948e-05
9.29247e-05
9.48037e-05
9.67846e-05
9.88534e-05
0.000101671
0.00010519
0.00010891
0.00011273
0.000116618
0.000120639
0.000124988
0.000130002
0.000136085
0.000144007
0.000155542
0.000179303
0.000241104
0.000326379
0.000351989
0.000305391
0.000170386
0.000123814
0.000109071
0.000102081
9.84038e-05
9.69125e-05
9.65032e-05
9.74201e-05
0.000146195
0.000158655
0.000224239
0.000116451
0.000115248
0.000121428
0.000120418
0.000126458
0.000125049
0.000133284
0.000131977
0.000139384
0.00013854
0.000145783
9.89515e-05
0.00821642
0.0023833
0.000757672
0.0172015
0.0188073
0.0161686
7.21791e-06
0.000247178
0.00199012
0.0130788
6.6056e-06
0.000224361
0.000116785
0.000126818
0.000121471
0.000118052
0.0151018
0.0175429
0.0176744
0.0133293
0.00586117
0.00159121
0.00033527
0.000161297
0.000140768
0.00013338
0.000128456
0.000255375
0.000157792
9.79686e-05
7.91198e-05
7.4874e-05
7.55988e-05
7.75042e-05
7.97603e-05
8.16571e-05
8.30792e-05
8.40642e-05
8.48283e-05
8.56708e-05
8.66707e-05
8.79005e-05
8.93335e-05
9.09334e-05
9.27343e-05
9.46793e-05
9.67171e-05
9.88402e-05
0.000101671
0.000105211
0.000108969
0.00011286
0.000116888
0.000121155
0.000125899
0.000131574
0.000138652
0.000148244
0.000164869
0.000205125
0.000291728
0.000344011
0.00033641
0.000217351
0.000135478
0.000113676
0.000104179
9.95625e-05
9.76077e-05
9.68578e-05
9.7636e-05
9.89742e-05
0.000160688
0.000249289
0.000119123
0.000124055
0.000122617
0.000131025
0.00012952
0.000137236
0.000136151
0.000145067
0.000144407
0.000162117
0.0103811
0.00315546
0.000962499
0.0176826
0.0182062
7.34856e-06
0.000225758
6.53236e-06
0.0177973
0.0128309
0.00536085
0.00151668
0.000331126
0.000163107
0.000142261
0.000134722
0.000238595
0.00015388
9.80603e-05
8.03222e-05
7.64792e-05
7.72549e-05
7.91775e-05
8.12929e-05
8.28806e-05
8.39508e-05
8.47229e-05
8.54967e-05
8.64471e-05
8.76639e-05
8.90843e-05
9.07372e-05
9.259e-05
9.45702e-05
9.66498e-05
9.88274e-05
0.000101678
0.000105253
0.000109068
0.000113076
0.000117304
0.000121871
0.000127141
0.00013363
0.000142111
0.000154332
0.000180943
0.000246401
0.000329014
0.000346215
0.000280947
0.000155791
0.000119014
0.000106902
0.000100993
9.83833e-05
9.73782e-05
9.78024e-05
9.89815e-05
0.000277136
0.000143319
0.000162999
0.00016335
0.000301669
0.0117637
0.00392966
0.00117629
6.5396e-06
0.0046969
0.00136645
0.000321101
0.000224118
0.000150856
9.91561e-05
8.21385e-05
7.82602e-05
7.91418e-05
8.1161e-05
8.29733e-05
8.41348e-05
8.49088e-05
8.55641e-05
8.64021e-05
8.75341e-05
8.89246e-05
9.0587e-05
9.24635e-05
9.44667e-05
9.65943e-05
9.88224e-05
0.00010169
0.000105316
0.000109228
0.000113402
0.000117863
0.000122851
0.000128806
0.000136317
0.000146679
0.000164282
0.000209326
0.000298715
0.000341999
0.000321859
0.000191031
0.000128026
0.00011064
0.000102835
9.92345e-05
9.79508e-05
9.78793e-05
9.90245e-05
0.000212278
0.000149164
0.000101147
8.42165e-05
8.04222e-05
8.14932e-05
8.34443e-05
8.47962e-05
8.55018e-05
8.59638e-05
8.66112e-05
8.75903e-05
8.88642e-05
9.04892e-05
9.23728e-05
9.43944e-05
9.65585e-05
9.88202e-05
0.000101712
0.000105413
0.000109458
0.000113838
0.000118621
0.000124144
0.000130975
0.000139907
0.000153045
0.000182332
0.000252903
0.000330146
0.000338191
0.000250562
0.000143462
0.000114901
0.000105032
0.000100272
9.84804e-05
9.7978e-05
9.91135e-05
0.000203514
0.000148455
0.000103377
8.68627e-05
8.34827e-05
8.47683e-05
8.63776e-05
8.69712e-05
8.70367e-05
8.73025e-05
8.79192e-05
8.89624e-05
9.04984e-05
9.23455e-05
9.43619e-05
9.65406e-05
9.8817e-05
0.000101744
0.000105549
0.000109768
0.000114414
0.000119625
0.000125843
0.000133704
0.000144888
0.000163389
0.000214251
0.000303446
0.00033957
0.000302572
0.000170599
0.000121564
0.000107864
0.000101513
9.91145e-05
9.83265e-05
9.91761e-05
0.000197322
0.000147651
0.000106226
9.08596e-05
8.82644e-05
8.96502e-05
9.01958e-05
8.94359e-05
8.88009e-05
8.87707e-05
8.93974e-05
9.07148e-05
9.24113e-05
9.43716e-05
9.65462e-05
9.88178e-05
0.000101788
0.000105733
0.000110179
0.000115158
0.000120916
0.000128056
0.000137304
0.000151999
0.000182734
0.000261233
0.000327646
0.00032724
0.000218598
0.000132943
0.00011112
0.000103042
9.98249e-05
9.87656e-05
9.9141e-05
0.000191911
0.000146536
0.000110959
9.73087e-05
9.60938e-05
9.68599e-05
9.47963e-05
9.20122e-05
9.04942e-05
9.0372e-05
9.12466e-05
9.26471e-05
9.4477e-05
9.65853e-05
9.88215e-05
0.000101845
0.000105977
0.000110704
0.000116119
0.000122545
0.000130925
0.000142498
0.000163011
0.000217819
0.000306003
0.000333233
0.000277792
0.000153019
0.000115801
0.000105085
0.000100616
9.91872e-05
9.90933e-05
0.000186053
0.000146349
0.000118015
0.000108012
0.000108939
0.000106704
9.96104e-05
9.41735e-05
9.2192e-05
9.21751e-05
9.31205e-05
9.47274e-05
9.66756e-05
9.88393e-05
0.000101921
0.000106284
0.000111358
0.000117352
0.000124679
0.000134733
0.000149989
0.000183659
0.00026839
0.000323825
0.000312408
0.000187922
0.00012396
0.000107516
0.000101608
9.95526e-05
9.91101e-05
0.000179643
0.000148605
0.000128
0.000125822
0.00012828
0.000117909
0.000103092
9.58952e-05
9.3858e-05
9.39427e-05
9.51555e-05
9.68546e-05
9.88888e-05
0.000102017
0.000106675
0.000112184
0.000118917
0.000127599
0.000139825
0.000162097
0.000221143
0.000307702
0.000324631
0.000245166
0.00013843
0.000110794
0.000102831
0.000100015
9.92706e-05
0.000176059
0.000154373
0.000143668
0.000154188
0.000152835
0.000123702
0.000104554
9.73161e-05
9.55317e-05
9.58537e-05
9.71576e-05
9.89699e-05
0.000102137
0.000107171
0.000113254
0.000120931
0.000131464
0.000147296
0.000185007
0.000273408
0.000321094
0.000291294
0.000164059
0.000116493
0.000104416
0.000100591
9.94804e-05
0.000178391
0.000167292
0.000172269
0.000193262
0.00016777
0.00012532
0.000104944
9.86341e-05
9.71307e-05
9.7687e-05
9.90939e-05
0.000102287
0.000107786
0.000114651
0.000123597
0.000136605
0.000160225
0.000225253
0.000306019
0.000311748
0.000209223
0.00012629
0.000106699
0.0001013
9.97405e-05
0.000184235
0.000188172
0.000208871
0.000223031
0.000171638
0.000124691
0.000104729
9.95733e-05
9.86039e-05
9.93087e-05
0.00010248
0.00010856
0.000116426
0.000127298
0.000144017
0.000185529
0.000276574
0.000314846
0.000263952
0.000143823
0.000110183
0.000102169
0.000100024
0.000163165
0.000196192
0.000238754
0.000234198
0.00016891
0.000119677
0.000103827
0.000100058
9.96599e-05
0.000102733
0.000109567
0.000118732
0.00013246
0.000157041
0.000229767
0.000300779
0.000294145
0.000173905
0.000116218
0.000103323
0.000100197
0.000129325
0.000196492
0.000256341
0.00023481
0.000154102
0.000112751
0.000102787
0.000100187
0.000103037
0.000110912
0.000121947
0.000139779
0.000184328
0.00027671
0.000303941
0.000225512
0.000127209
0.000105099
0.000100409
0.000114584
0.000204731
0.000262557
0.000216668
0.000133276
0.000107422
0.000101321
0.000103414
0.000112691
0.000126604
0.0001528
0.000232371
0.00029499
0.000268166
0.000147262
0.000108159
0.000100687
0.000114305
0.000225622
0.000256672
0.000179087
0.000116569
0.000103017
0.000103937
0.000115091
0.000133487
0.000181413
0.00027415
0.000286101
0.000181611
0.000113775
0.000101107
0.000120004
0.00023957
0.00023031
0.0001379
0.000105633
0.000104667
0.000118589
0.000146272
0.000231451
0.000287175
0.000230123
0.000124177
0.000101805
0.000130512
0.000238581
0.000181331
0.000109725
0.000105672
0.000123974
0.000175188
0.000264809
0.000260783
0.000142661
0.000103099
0.000148567
0.000207829
0.000120296
0.00010714
0.000134505
0.000225282
0.000269811
0.000175492
0.000105613
0.000158932
0.000142293
0.000109015
0.000161503
0.000250556
0.000217846
0.000110637
0.000143542
0.000112547
0.000206781
0.000236948
0.000120312
0.000127835
0.00022629
0.000142679
0.000157887
0.0001705
0.000165246
)
;
boundaryField
{
lowerOutlet
{
type inletOutlet;
inletValue uniform 0.0001;
value nonuniform List<scalar>
144
(
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0151804
0.0001
0.0001
0.0001
0.0001
0.00893234
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.00734184
0.0001
0.0139138
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0187599
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.00758556
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
)
;
}
top
{
type inletOutlet;
inletValue uniform 0.0001;
value nonuniform List<scalar>
100
(
9.79149e-05
0.000104336
0.000121626
0.000139579
0.000156964
0.000176346
0.000200847
0.000233737
0.000260118
0.000257798
0.000239311
0.000201085
0.000175359
0.000167972
0.000176221
0.000195109
0.000231959
0.000306811
0.000429646
0.000584717
0.000718416
0.000787547
0.000786226
0.00074162
0.000640377
0.000545467
0.000521378
0.000605471
0.00139873
0.00562072
0.0108285
0.0117012
0.0107441
0.0114702
0.013088
0.0131972
0.0111743
0.00881347
0.00703249
0.00545843
0.00378735
0.00221346
0.00111114
0.000600024
0.000387502
0.00029779
0.000261497
0.000248297
0.000243743
0.00024311
0.000246899
0.000258377
0.000274299
0.000290358
0.000303735
0.000312289
0.000315403
0.000312217
0.000299534
0.000274087
0.000241448
0.000217909
0.000203985
0.000197262
0.000194801
0.0002013
0.000215625
0.000236319
0.000261348
0.000286693
0.000308418
0.000323681
0.000331428
0.000333987
0.000328684
0.000318282
0.00030414
0.000288443
0.000272243
0.000255375
0.000238595
0.000224118
0.000212278
0.000203514
0.000197322
0.000191911
0.000186053
0.000179643
0.000176059
0.000178391
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
)
;
}
sides
{
type inletOutlet;
inletValue uniform 0.0001;
value uniform 0.0001;
}
front
{
type empty;
}
back
{
type empty;
}
roller
{
Cmu 0.09;
kappa 0.41;
E 9.8;
Ceps2 1.9;
type kLowReWallFunction;
value nonuniform List<scalar>
144
(
7.97841e-10
1.29034e-09
1.43781e-09
5.23565e-10
2.09718e-10
4.6599e-10
7.63886e-11
5.96437e-11
3.25502e-10
8.96094e-10
1.3276e-09
8.88108e-10
1.15608e-09
1.01575e-09
9.25202e-10
3.02592e-10
5.01555e-10
2.97091e-10
6.65631e-10
3.41902e-10
1.27007e-10
3.82047e-10
2.61342e-11
4.3129e-10
8.57013e-10
8.97037e-10
8.27674e-10
1.30476e-09
1.19857e-09
9.89576e-10
5.92866e-10
4.11713e-10
3.87024e-10
1.75341e-10
4.15584e-10
7.30372e-10
1.05135e-10
8.38686e-10
8.91022e-10
9.80544e-10
8.47033e-10
8.80618e-10
1.60456e-09
1.74127e-09
1.80443e-09
3.49566e-10
8.23451e-10
6.66596e-10
5.71702e-10
2.2819e-10
2.53362e-10
5.60447e-10
7.65757e-10
2.72831e-10
2.51279e-10
3.13324e-10
2.67389e-11
3.37322e-10
9.34509e-10
1.09759e-09
1.0215e-09
2.13972e-10
2.87866e-10
1.99089e-10
1.74549e-10
4.36842e-10
3.16197e-10
5.90754e-10
3.72797e-10
1.12904e-09
1.20808e-09
9.25807e-10
8.73942e-10
1.47121e-10
3.09195e-10
1.34501e-10
1.62308e-10
2.06791e-10
1.61438e-10
2.10767e-10
1.78432e-10
2.39292e-10
3.53773e-10
2.13904e-10
3.53518e-10
5.05859e-10
3.64234e-11
2.80509e-11
2.92621e-10
4.30494e-10
2.57071e-10
6.6049e-10
4.2428e-10
8.24969e-10
9.68335e-10
8.18492e-10
1.20035e-09
1.44593e-09
1.25391e-09
7.23055e-10
1.85128e-10
2.46431e-10
1.85779e-10
2.93118e-10
3.36748e-10
3.06464e-10
3.75131e-10
5.49469e-11
4.0697e-10
6.2851e-10
4.9094e-10
5.5225e-10
3.3828e-10
3.36756e-10
1.0086e-09
1.10329e-09
1.0722e-09
1.10417e-09
9.75571e-10
9.87688e-10
9.57649e-10
1.21324e-09
1.04722e-09
1.01188e-09
8.78776e-10
3.96624e-10
1.6885e-10
1.48708e-10
2.28071e-10
1.88267e-10
1.86215e-10
1.78841e-10
2.21678e-10
9.44648e-10
7.23573e-10
3.44937e-10
1.9553e-10
3.91108e-10
4.6314e-11
2.68222e-11
4.1527e-10
1.25153e-10
5.47414e-10
5.07873e-10
)
;
}
burner
{
type fixedValue;
value uniform 0.0001;
}
}
// ************************************************************************* //
|
|
e23b3c2a7fe12580bacac756bcc24140e6a61b2e
|
28897cab8fac8b0f4c14deaa14954999bd3346f5
|
/code/dataFile.cpp
|
477fe10a3226879a3096fe82fa94cc1817443bbd
|
[] |
no_license
|
ifarbod/skincontrol
|
bbf1419dc6d26b007dcf77d375103e9ae8a1c027
|
241991bbd5283764bebaa9882d7eabc34dfe3b81
|
refs/heads/master
| 2021-12-24T07:57:35.731373
| 2021-07-30T23:17:41
| 2021-07-30T23:17:41
| 91,604,052
| 6
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 28,212
|
cpp
|
dataFile.cpp
|
/*
Skin Control dataFile.cpp
By Neutrinobeam
*/
#pragma once
#include "dataFile.h"
#include "modMenu.h"
#include "skin.h"
#include "tattoo.h"
#include "weapons.h"
#include <fstream>
/* Save File Format
v1.0 & v1.1 ?
Skin Control.dat
Save file for Skin Control. Do not edit.
name modelHash nthComponent nthComponentTexture nthProp nthPropTexture weaponID weaponTint
v1.2
Skin Control.dat
Save file for Skin Control. Do not edit.
name modelHash nthComponent nthComponentTexture nthProp nthPropTexture weaponID weaponTint weaponMask
v2.0
Skin Control.dat v2.0
Save file for Skin Control. Do not edit.
<name>modelHash nthDrawable nthDrawableTexture weaponID weaponTint weaponMask tattoMask (ifPlayer) nthTattooValue
nthTattooCollection nthTattooZone (ifFreemode) mother father faceRatio skinRatio overrideRatio nthMorph eyeColor hair
hairColor hairHighlights nthOverlayValue nthOverlayColor nthOverlayOpacity v2.1 Skin Control.ini v2.1 Hotkey: 119
<name>modelHash nthDrawable nthDrawableTexture weaponID weaponTint weaponMask tattoMask (ifPlayer) nthTattooValue
nthTattooCollection nthTattooZone (ifFreemode) mother father faceRatio skinRatio overrideRatio nthMorph eyeColor hair
hairColor hairHighlights nthOverlayValue nthOverlayColor nthOverlayOpacity
*/
// used to convert pre v2.0 save files to v2.0
bool convertDataFile2_0()
{
std::string text;
std::string outText = "";
std::string tempText = "";
int modelID = -2;
int value = -1;
int valueID;
int mother = 0;
int father = 0;
int hair = 0;
int haircolor = 0;
int mix = 0;
size_t pos;
size_t pre;
bool readValid;
std::fstream buffer(SAVEFILE, std::fstream::in);
if (!buffer.is_open())
{
MM::notifyAboveMap("Count not open data file.");
return false;
}
std::getline(buffer, text);
outText.append("Skin Control.dat ");
outText.append(VERSION);
std::getline(buffer, text);
outText.push_back('\n');
outText.append("Save file for Skin Control. Do not edit.");
outText.push_back('\n');
for (int i = 0; i < numSaves; i++)
{
readValid = true;
valueID = -1;
std::getline(buffer, text);
pos = text.find_first_of(' ');
if (pos != std::string::npos)
{
outText.append("<");
outText.append(text.substr(0, pos));
outText.append(">");
while (readValid)
{
++valueID;
switch (valueID)
{
case 0: // malformed modelHash to default
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
modelID = hashLookup(std::stoul(text.substr(pre, pos - pre)));
else
{
modelID = hashLookup(std::stoul(text.substr(pre)));
++valueID;
}
if (modelID == -1)
{ // -2 when pos == npos
// Unreadable to Franklin
outText.append(std::to_string(getModelHash(1)));
outText.append(" ");
modelID = 1;
}
else if (pos != std::string::npos)
{
outText.append(text.substr(pre, pos - pre + 1));
}
break;
case 1: // freemode parent face to head blend
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
{
value = std::stoi(text.substr(pre, pos - pre));
}
else
{
value = std::stoi(text.substr(pre));
++valueID;
}
if (isFreemode(modelID))
{
// 0 to PED::_0x5EF...(0)-1 to PED::_0x5EF...(0)+ PED::_0x5EF...(2)-1 : male
// PED::_0x5EF...(0)+ PED::_0x5EF...(2)-1 to
if (value >= PED::_GET_NUM_PARENT_PEDS_OF_TYPE(0) + PED::_GET_NUM_PARENT_PEDS_OF_TYPE(2) +
PED::_GET_NUM_PARENT_PEDS_OF_TYPE(1) +
PED::_GET_NUM_PARENT_PEDS_OF_TYPE(3))
value = 0;
if (value >= PED::_GET_NUM_PARENT_PEDS_OF_TYPE(0) + PED::_GET_NUM_PARENT_PEDS_OF_TYPE(2))
{
mother =
value - PED::_GET_NUM_PARENT_PEDS_OF_TYPE(0) - PED::_GET_NUM_PARENT_PEDS_OF_TYPE(2);
}
else
{
father = value;
mix = 16;
}
value = 0;
}
outText.append(std::to_string(value));
outText.append(" ");
break;
case 5: // freemode old hair to head overlay
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
{
value = std::stoi(text.substr(pre, pos - pre));
}
else
{
value = std::stoi(text.substr(pre));
++valueID;
}
if (isFreemode(modelID))
{
hair = value;
}
outText.append(std::to_string(value));
outText.append(" ");
break;
case 6: // freemode old hair color to head overlay
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
{
value = std::stoi(text.substr(pre, pos - pre));
}
else
{
value = std::stoi(text.substr(pre));
++valueID;
}
if (isFreemode(modelID))
{
haircolor = value;
}
outText.append(std::to_string(value));
outText.append(" ");
break;
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 37:
case 38:
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
{
value = std::stoi(text.substr(pre, pos - pre));
}
else
{
value = std::stoi(text.substr(pre));
++valueID;
}
outText.append(std::to_string(value - 1) + ' ');
break;
case 31:
case 32:
case 33:
case 34:
case 35:
case 36:
case 39:
case 40:
pre = pos + 1;
pos = text.find_first_of(' ', pre);
break;
case 41:
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
{
value = std::stoi(text.substr(pre, pos - pre));
}
else
{
value = std::stoi(text.substr(pre));
++valueID;
}
// read value to weaponHash
if (value > 11)
++value;
if (value > 18)
++value;
if (value > 25)
++value;
outText.append(std::to_string(getWeaponHash(value)));
outText.append(" ");
break;
default:
pre = pos + 1;
pos = text.find_first_of(' ', pre);
if (pos != std::string::npos)
{
outText.append(text.substr(pre, pos - pre + 1));
}
else
{
outText.append(text.substr(pre));
outText.append(" ");
++valueID;
}
break;
}
readValid = (pos != std::string::npos);
}
if (!readValid)
{
switch (valueID)
{
case 0:
outText.append("2602752943 "); // model = Franklin
case 1:
outText.append("0 "); // Drawable 0
case 2:
outText.append("0 "); // Drawable 0 texture
case 3:
outText.append("0 ");
case 4:
outText.append("0 ");
case 5:
outText.append("0 ");
case 6:
outText.append("0 ");
case 7:
outText.append("0 ");
case 8:
outText.append("0 ");
case 9:
outText.append("0 ");
case 10:
outText.append("0 ");
case 11:
outText.append("0 ");
case 12:
outText.append("0 ");
case 13:
outText.append("0 ");
case 14:
outText.append("0 ");
case 15:
outText.append("0 ");
case 16:
outText.append("0 ");
case 17:
outText.append("0 ");
case 18:
outText.append("0 ");
case 19:
outText.append("0 ");
case 20:
outText.append("0 ");
case 21:
outText.append("0 ");
case 22:
outText.append("0 ");
case 23:
outText.append("0 "); // Drawable 11
case 24:
outText.append("0 "); // Drawable 11 texture
case 25:
outText.append("-1 "); // Drawable 12 (1st prop)
case 26:
outText.append("-1 ");
case 27:
outText.append("-1 ");
case 28:
outText.append("-1 ");
case 29:
outText.append("-1 ");
case 30:
outText.append("-1 ");
case 31: // skip block
case 32:
case 33:
case 34:
case 35:
case 36: //
case 37:
outText.append("-1 "); // Drawable 15 (watch prop)
case 38:
outText.append("-1 "); // Drawable 15 texture
case 39: // skip block
case 40: //
case 41:
outText.append("0xA2719263 "); // weaponHash unarmed 0xA2719263
case 42:
outText.append("0 "); // weaponTint
case 43:
outText.append("0 "); // weaponMask
break;
default: // case -1:
break;
}
}
// Additional data
if (isPlayer(modelID))
{
// -1 -1 x16
outText.append(
"-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ");
}
if (isFreemode(modelID))
{
// 0 0 0 0
// 0 x 20
// 0 0 0 0
outText.append(std::to_string(mother));
outText.append(" ");
outText.append(std::to_string(father));
outText.append(" ");
outText.append(std::to_string(mix));
outText.append(" ");
outText.append(std::to_string(mix));
outText.append(" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ");
outText.append(std::to_string(hair));
outText.append(" ");
outText.append(std::to_string(haircolor));
outText.append(" ");
outText.append(std::to_string(haircolor));
outText.append(" -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 20 -1 0 "
"20 -1 0 20 -1 0 20 ");
}
}
// blank line or end of line with ' '
outText.push_back('\n');
}
buffer.close();
buffer.open(SAVEFILE, std::fstream::out | std::fstream::trunc);
if (!buffer.is_open())
{
MM::notifyAboveMap("Could not write data file.");
return false;
}
buffer.write(outText.c_str(), outText.size() - 1);
buffer.close();
return true;
}
// convert v2.0 to v2.1
bool convertDataFile2_1()
{
std::string text;
std::string outText = "";
std::string tempText = "";
std::fstream buffer(SAVEFILE, std::fstream::in);
if (!buffer.is_open())
{
MM::notifyAboveMap("Count not open data file.");
return false;
}
std::getline(buffer, text);
outText.append("Skin Control.ini ");
outText.append(VERSION);
std::getline(buffer, text);
outText.push_back('\n');
outText.append("Hotkey: ");
outText.append(std::to_string(HOTKEY));
outText.push_back('\n');
for (int i = 0; i < numSaves; i++)
{
std::getline(buffer, text);
outText.append(text);
outText.push_back('\n');
}
buffer.close();
buffer.open(SAVEFILE, std::fstream::out | std::fstream::trunc);
if (!buffer.is_open())
{
MM::notifyAboveMap("Could not write data file.");
return false;
}
buffer.write(outText.c_str(), outText.size() - 1);
buffer.close();
return true;
}
int checkDataFile(int& hotkey)
{
std::string text;
std::string text2;
std::fstream buffer(SAVEFILE, std::fstream::in);
if (!buffer.is_open())
{
initDataFile();
return 0;
}
std::getline(buffer, text2);
if (text2.size() < 17)
return 2;
text = text2.substr(17);
std::getline(buffer, text2);
buffer.close();
if (0 == text.compare(VERSION))
{
if (text2.size() > 8)
hotkey = std::stoi(text2.substr(8));
return 0;
}
if (0 == text.compare("v2.1"))
{
if (text2.size() > 8)
hotkey = std::stoi(text2.substr(8));
return 0;
}
if (0 == text.compare("v2.0"))
return 1;
return 2;
}
void initDataFile()
{
std::filebuf fs;
fs.open(SAVEFILE, std::ios_base::out | std::ios_base::trunc);
std::ostream os(&fs);
os << SAVEFILE << " " << VERSION << std::endl;
os << "Hotkey: " << HOTKEY << std::endl;
for (int i = 0; i < numSaves; i++)
os << std::endl;
fs.close();
}
void peekNames(std::vector<std::string>* names)
{
std::string str;
std::ifstream buffer(SAVEFILE, std::ios_base::in);
std::getline(buffer, str);
std::getline(buffer, str);
for (int i = 0; i < numSaves; i++)
{
std::getline(buffer, str);
size_t pos = str.find_first_of('<');
size_t pos2 = str.find_first_of('>');
if (pos == std::string::npos || pos2 == std::string::npos)
{
names->at(i) = " ";
}
else
{
names->at(i) = str.substr(pos + 1, pos2 - pos - 1).c_str();
}
}
buffer.close();
}
void loadSkin(int slot, PedSkin& skin, WeaponData& currentWeaponData, Hash& lastValidSkin, bool& nonDefaultSkin,
std::vector<Entity>& weapon, std::vector<std::pair<Hash, int>>& ammoWeapon)
{
if (loadPedInSlot(slot, skin))
{ // save to skin
Ped playerPed = PLAYER::PLAYER_PED_ID();
Hash model = ENTITY::GET_ENTITY_MODEL(playerPed);
setLastSkin(model, lastValidSkin);
int index = hashLookup(skin.model);
std::vector<Entity> weapons;
std::vector<std::pair<Hash, int>> ammoWeapons;
currentWeaponData = getWeaponComponentData(skin.weapon);
if (0 == PED::IS_PED_HUMAN(playerPed))
{
weapons = weapon;
ammoWeapons = ammoWeapon;
}
else
{
getWeaponsFromPed(playerPed, &weapons, &ammoWeapons, NULL);
}
renderPlayerSkin(skin, currentWeaponData, index, true, true, nonDefaultSkin);
playerPed = PLAYER::PLAYER_PED_ID();
if (0 == PED::IS_PED_HUMAN(playerPed))
{
weapon = weapons;
ammoWeapon = ammoWeapons;
}
else
setWeaponsOfPed(playerPed, &weapons, &ammoWeapons, skin.weapon);
}
else
MM::notifyAboveMap("Load failed");
}
bool loadPedInSlot(int slot, PedSkin& skin)
{
std::string text;
std::ifstream buffer(SAVEFILE, std::ios_base::in);
std::getline(buffer, text);
std::getline(buffer, text);
for (int i = 0; i < numSaves; i++)
{
std::getline(buffer, text);
if (i == slot)
break;
}
buffer.close();
return pedSkinFromString(skin, text);
}
const char* getSaveName()
{
bool done = false;
int status = 0;
while (!done)
{
GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD(TRUE, "Save Name", "", "Enter a name.", "", "", "", 64);
while (GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 0)
WAIT(0);
status = GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD();
if (status == 1)
done = true;
else if (status == 2 || status == 3)
return "";
}
return GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT();
}
bool saveSkin(int slot, PedSkin& skin)
{
const char* name = getSaveName();
if (strcmp(name, "") == 0)
return false;
return saveSkinToSlot(slot, name, skin);
}
bool saveSkinToSlot(int slot, const char* name, PedSkin& skin)
{
std::string tempS = "";
std::string text;
std::fstream buffer(SAVEFILE, std::fstream::in);
if (!buffer.is_open())
{
MM::notifyAboveMap("Could not read data file.");
return false;
}
for (int i = 0; i < numSaves + 2; i++)
{
std::getline(buffer, text);
if (i == slot + 2)
{
tempS.append(pedSkinAsString(skin, name));
tempS.push_back('\n');
}
else
{
tempS.append(text);
tempS.push_back('\n');
}
}
buffer.close();
buffer.open(SAVEFILE, std::fstream::out | std::fstream::trunc);
if (!buffer.is_open())
{
MM::notifyAboveMap("Could not write data file.");
return false;
}
buffer.write(tempS.c_str(), tempS.size());
buffer.close();
return true;
}
std::string pedSkinAsString(PedSkin& skin, std::string name)
{
// int modelID = -1;
int type = hashLookup(skin.model);
std::string value = "";
value.append("<" + name + ">");
value.append(std::to_string(skin.model) + " ");
for (int i = 0; i < numParts; i++)
{
value.append(std::to_string(skin.drawable[i]) + " ");
value.append(std::to_string(skin.texture[i]) + " ");
}
value.append(std::to_string(skin.weapon) + " ");
value.append(std::to_string(skin.weaponTint) + " ");
value.append(std::to_string(skin.weaponModMask) + " ");
// Tattoos
if (isPlayer(type))
{
for (int i = 0; i < numTatSlots; ++i)
{
value.append(std::to_string(skin.tattoo[i].value) + " ");
value.append(std::to_string(skin.tattoo[i].collection) + " ");
}
} // Freemode extra data
if (isFreemode(type))
{
// Parents
value.append(std::to_string(skin.freemodeData.mother) + " ");
value.append(std::to_string(skin.freemodeData.father) + " ");
value.append(std::to_string(skin.freemodeData.faceRatio) + " ");
value.append(std::to_string(skin.freemodeData.skinRatio) + " ");
// Morphs
for (int i = 0; i < numMorphs; ++i)
{
value.append(std::to_string(skin.freemodeData.morph[i]) + " ");
}
// Eye
value.append(std::to_string(skin.freemodeData.eyeColor) + " ");
// Hair
value.append(std::to_string(skin.freemodeData.hair) + " ");
value.append(std::to_string(skin.freemodeData.hairColor) + " ");
value.append(std::to_string(skin.freemodeData.hairHighlights) + " ");
// Overlay
for (int i = 0; i < numFaceOverlays; ++i)
{
value.append(std::to_string(skin.freemodeData.overlay[i].value) + " ");
value.append(std::to_string(skin.freemodeData.overlay[i].color) + " ");
value.append(std::to_string(skin.freemodeData.overlay[i].opacity) + " ");
}
}
return value;
}
bool pedSkinFromString(PedSkin& skin, std::string data)
{
int modelID = -1;
int type = -1;
// <Savename>model frame1 texture1 frame2 texture2 ...
size_t pos2 = 0;
size_t pos = data.find_first_of('>');
try
{
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.model = std::stoul(data.substr(pos2, pos - pos2), NULL);
type = hashLookup(skin.model);
for (int i = 0; i < numParts; i++)
{
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.drawable[i] = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.texture[i] = std::stoi(data.substr(pos2, pos - pos2), NULL);
}
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.weapon = std::stoul(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.weaponTint = std::stoul(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.weaponModMask = std::stoul(data.substr(pos2, pos - pos2), NULL);
// Tattoos
skin.tatsPreserve = false;
if (isPlayer(type))
{
for (int i = 0; i < numTatSlots; ++i)
{
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.tattoo[i].value = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.tattoo[i].collection = std::stoi(data.substr(pos2, pos - pos2), NULL);
}
skin.tatsPreserve = true;
}
// Freemode extra data
skin.fmPreserve = false;
if (isFreemode(type))
{
// Parents
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.mother = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.father = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.faceRatio = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.skinRatio = std::stoi(data.substr(pos2, pos - pos2), NULL);
// Morphs
for (int i = 0; i < numMorphs; ++i)
{
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.morph[i] = std::stoi(data.substr(pos2, pos - pos2), NULL);
}
// Non-overlay
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.eyeColor = std::stoul(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.hair = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.hairColor = std::stoul(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.hairHighlights = std::stoul(data.substr(pos2, pos - pos2), NULL);
// Overlay
for (int i = 0; i < numFaceOverlays; ++i)
{
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.overlay[i].value = std::stoi(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.overlay[i].color = std::stoul(data.substr(pos2, pos - pos2), NULL);
pos2 = pos + 1;
pos = data.find_first_of(' ', pos + 1);
skin.freemodeData.overlay[i].opacity = std::stoul(data.substr(pos2, pos - pos2), NULL);
}
}
skin.fmPreserve = true;
}
catch (std::exception e)
{
MM::notifyAboveMap("Damaged data file.");
return false;
}
return true;
}
|
4b1a6872850796c46ca81e4e82fffe8ffba97fca
|
fc9509b72acc753eaae129a1fcb27cd9f8ee56b0
|
/zhengtu/mcode/IOCPServer/TestServer/TestServer.cpp
|
06483e00a7d0e373c61985fafda401bd71057e56
|
[] |
no_license
|
edolphin-ydf/hydzhengtu
|
25df5567226c5b7533e24631ae3d641ee0182aa9
|
724601751c00702438ffb93c1411226ae21f46a0
|
refs/heads/master
| 2020-12-31T03:25:48.625000
| 2012-10-24T10:58:00
| 2012-10-24T10:58:00
| 49,243,199
| 2
| 1
| null | null | null | null |
WINDOWS-1252
|
C++
| false
| false
| 1,110
|
cpp
|
TestServer.cpp
|
// Server.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include <tchar.h>
#include <windows.h>
#include <string.h>
#include ".\gameworld.h"
using namespace std;
CGameWorld g_gameWorld;
#define CONFIG_FILE ".\\config.ini"
int _tmain(int argc, _TCHAR* argv[])
{
UINT nPort = 10000;
UINT nMaxClient = 10;
nPort = GetPrivateProfileInt("config", "Port", 0, CONFIG_FILE);
nMaxClient = GetPrivateProfileInt("config", "MaxClient", 0, CONFIG_FILE);
// init game world
g_gameWorld.Init(nMaxClient, nPort);
// update game logic
float fLastTime = (float)GetTickCount();
float fCurrTime = 0;
float fElapse = 0;
float fTick1 = 0;
float fTick2 = 0;
while(TRUE)
{
fCurrTime = (float)GetTickCount();
fElapse = (fCurrTime - fLastTime);
fTick1 = fCurrTime;
// ÓÎÏ·Âß¼
if ( !g_gameWorld.OnTick(fElapse) )
{
printf("ÓÎÏ·Òì³£Í˳ö!");
break;
}
fLastTime = fCurrTime;
fTick2 = (float)GetTickCount();
Sleep(1);
}
g_gameWorld.OnQuit();
getchar();
return 0;
}
|
8c1c43c51a26ad2fe4e15b8308e2032f9c41629a
|
5ac19d80b92609cd3506220675ec45088d92441e
|
/examples/artificial_neural_networks/perceptron/percept.h
|
0d93b28bd68cded99af478242db158d564fee330
|
[] |
no_license
|
pmanoonpong/gorobots_edu
|
3d5dc739a3058819fa6e5976c9041b07c944a616
|
ee904c0e6c0773490c2d51229a15d00652a2472e
|
refs/heads/master
| 2023-05-25T13:30:37.175280
| 2023-05-19T15:49:37
| 2023-05-19T15:49:37
| 42,652,094
| 3
| 8
| null | 2015-10-02T08:33:08
| 2015-09-17T11:21:12
| null |
UTF-8
|
C++
| false
| false
| 608
|
h
|
percept.h
|
//percept.h V. Rao, H. Rao
// Perceptron model
#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;
class ineuron
{
protected:
float weight;
float activation;
friend class oneuron;
public:
ineuron() {};
ineuron(float j) ;
float act(float x);
};
class oneuron
{
protected:
int output;
float activation;
friend class network;
public:
oneuron() { };
void actvtion(float x[4], ineuron *nrn);
int outvalue(float j) ;
};
class network
{
public:
ineuron nrn[4];
oneuron onrn;
network(float,float,float,float);
};
|
17d0a3554f8bd3db8e4ab6fbb3825418e6b2dfb0
|
43260ae9ca878721e72b37ad21349cd9d7553c8d
|
/solve.edu.pl/Liczby Królewskie.cpp
|
133fe770edbcf734585ea893b04d5a0114b92368
|
[] |
no_license
|
PawelMasluch/Programming-tasks-and-my-solutons
|
55e9d72917499c30e596d3e64639048edbf22e01
|
6177e0908bca61141b1851b73dc0d0c950d6229f
|
refs/heads/main
| 2023-08-24T07:10:55.111954
| 2021-10-17T10:01:48
| 2021-10-17T10:01:48
| 372,923,592
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 615
|
cpp
|
Liczby Królewskie.cpp
|
#include<cstdio> // 100 pkt
using namespace std;
#define FORD(i,b,a) for(int i=b; i>=a; --i)
int f(int n)
{
int wyn = 0, tmp = ( 1 << 30 ), ile = 0;
FORD(i,30,1)
{
if( n > ( tmp >> 1 ) )
{
wyn += tmp;
n -= ( tmp >> 1 );
++ile;
}
tmp >>= 1;
}
if( ile & 1 )
{
++wyn;
}
return wyn;
}
void zapytania()
{
int q, n;
scanf( "%d", &q );
while( q )
{
scanf( "%d", &n );
printf( "%d\n", f( n ) );
--q;
}
}
int main()
{
zapytania();
return 0;
}
|
f9fac6ff6f03f38ad4f94c6e43700e8bbb334ac1
|
fc939cdf171c12ecd3abd73a4e297eacd63f9754
|
/CPP/floornmod.cpp
|
bd9109433847a93832b7e955e0dd85bde3ecee94
|
[] |
no_license
|
PrerakMathur20/Codes
|
08caa1b51d7359f8e040d639283d4f757c6f10ee
|
6cd37d340fc1eb8f3ec87a3ef05153e3db3f3873
|
refs/heads/master
| 2023-08-04T22:50:45.081682
| 2021-10-03T00:50:18
| 2021-10-03T00:50:18
| 412,939,902
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 341
|
cpp
|
floornmod.cpp
|
#include <iostream>
using namespace std;
int code(){
int a,b;
cin>>a>>b;
int special=0;
int temp;
if(a < b){
temp = a;
a = b;
b = temp;
}
while(a > b){
if((a/b) == (a % b))
special++;
}
cout<<special<<"\n";
a--;
}
int main() {
int t;
cin>>t;
while(t>0){
code();
t--;
}
return 0;
}
|
fbdcde056645bac0d81a781d9472638433039f53
|
96d9e3e8bab6f9c1b7759798f9c50a9a139f8550
|
/EJEMPLODT/DiscoSpinning.cpp
|
d7d4f64633e88caa5db16870c20a6f99eebc3841
|
[] |
no_license
|
TheAnderliu/PROYECTO_PROGRA2
|
8c96e82bc48a96b07a7c65f337f6d0d3a00d084c
|
7f102c9257d8c59e8caf30cfd94e9e9926fc9ae0
|
refs/heads/master
| 2020-04-02T04:36:48.055440
| 2018-10-21T15:53:14
| 2018-10-21T15:53:14
| 154,025,032
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,075
|
cpp
|
DiscoSpinning.cpp
|
#include "stdafx.h"
CDiscoSpinning::CDiscoSpinning() :CDisco()
{
}
CDiscoSpinning::~CDiscoSpinning()
{
}
void CDiscoSpinning::mover(){
if (x + dx + ancho >= 70 || x + dx <= 0 )
{
dx *= -1;
}
else if (y + dy + alto >= 30 || y + dy <= 0)
{
dy *= -1;
}
x += dx;
y += dy;
}
void CDiscoSpinning::mostrar(){
Console::ForegroundColor = ConsoleColor::Yellow;
Console::SetCursorPosition(x, y);
cout << "++++" << endl;
Console::ForegroundColor = ConsoleColor::Yellow;
Console::SetCursorPosition(x, y + 1);
cout << "++++" << endl;
Console::ForegroundColor = ConsoleColor::Yellow;
Console::SetCursorPosition(x, y + 2);
cout << "++++" << endl;
Console::ForegroundColor = ConsoleColor::Yellow;
Console::SetCursorPosition(x, y + 3);
cout << "++++" << endl;
}
void CDiscoSpinning::borrar(){
Console::SetCursorPosition(x, y);
cout << " " << endl;
Console::SetCursorPosition(x, y + 1);
cout << " " << endl;
Console::SetCursorPosition(x, y + 2);
cout << " " << endl;
Console::SetCursorPosition(x, y + 3);
cout << " " << endl;
}
|
1f7a2700812e37e5cc6f340e86cf792f5e7e114d
|
aba13f939ab3ec14e7a943cdb855394cb4cf0473
|
/Project1/ContrastShader.h
|
acaa047d5019a920b29e879c2c390b7e7cdfc91c
|
[] |
no_license
|
isaaclopinho/OpenGLopinho
|
fb10b85b599a44f00f2553b08e31b19f6625020e
|
ac824bef34b7efc3f2e38c38b46ab1ece10a532a
|
refs/heads/main
| 2022-12-26T22:35:14.688844
| 2020-10-11T04:31:45
| 2020-10-11T04:31:45
| 302,821,419
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 248
|
h
|
ContrastShader.h
|
#pragma once
#include "ShaderProgram.h"
class ContrastShader : public ShaderProgram
{
public:
GLuint location_offset;
void loadOffset(float v);
void bindAttributes();
void getAllUniformLocations();
ContrastShader();
~ContrastShader();
};
|
3dbd077666b44af439b98bdbb65eddb966dc0664
|
b6d48bdd2e600888cdfd502585b4b70074f677fb
|
/mainwindow.h
|
753af832ee79f7beb2f1115b794555ecbf415748
|
[
"MIT"
] |
permissive
|
cycoe/Ah-Counter
|
ac268b5c0f3bdee0b0b4d8a47e705589a5ad4444
|
4b92707aa061a7d9956db800ffe0165d5b34048d
|
refs/heads/master
| 2022-11-19T07:39:29.321126
| 2020-07-20T06:41:52
| 2020-07-20T06:41:52
| 280,302,657
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,172
|
h
|
mainwindow.h
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QComboBox>
#include <QList>
#include <QHBoxLayout>
#include "recorder.h"
#include "nameeditor.h"
#include "countbox.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_btnAddName_clicked();
void on_btnAddSpecie_clicked();
void on_cbName_currentIndexChanged(const QString&);
void on_countbox_text_changed(QString const&, CountBox*);
void on_leName_textChanged(const QString&);
void on_leSpecie_textChanged(const QString&);
void on_action_export_triggered();
void on_action_names_triggered();
void on_action_species_triggered();
private:
void add_name(QString const&);
void add_specie(QString const&);
void remove_name(QString const&);
void remove_specie(QString const&);
void add_specie_widget(QString const&);
void add_connects();
Ui::MainWindow *ui = nullptr;
Recorder *recorder = nullptr;
QList<CountBox*> specie_widgets;
};
#endif // MAINWINDOW_H
|
ca00f87fc057c21a7f54b87c1011fbad2d0a56bf
|
fcd9089eadd7a592f3d982eee0677bcbd4f13e7f
|
/SP2/SP2/SP2/a.cpp
|
48ad0a2acbe6f183d084027e159fbd8b9bc33721
|
[] |
no_license
|
KHTseng/CS6301-Implementation-of-advanced-data-structure-and-algorithms
|
b7e9b06e7d5487106fd4cc94d6fa733759ace573
|
abad4994b63eeb240e1f1b4bdea333ada6fa603c
|
refs/heads/master
| 2021-01-10T16:41:09.872637
| 2016-03-24T02:37:14
| 2016-03-24T02:37:14
| 54,608,556
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,919
|
cpp
|
a.cpp
|
//
// a.cpp
// SP2
//
// Created by TsengKai Han on 1/30/16.
// Copyright © 2016 TsengKai Han. All rights reserved.
//
#include <stdio.h>
#include <list>
#include "graph.cpp"
#include <stack>
using namespace std;
list<Vertex> toplogicalOrder1(Graph g){
list<Vertex> ans;
vector<int> numComeing(g.numNodes+1, 0); // 0 not used
for (int i = 1; i < g.verts.size(); i++) {// update numComing
numComeing[i] = int(g.verts[i].revAdj.size());
}
while (ans.size() != g.verts.size()-1) {
int tempAns = int(ans.size());
for (int i = 1; i < g.verts.size(); i++) {
if (numComeing[i] == 0 && g.verts[i].seen == 0) {// no coming edge
ans.push_back(g.verts[i]);
g.verts[i].seen = 1;
for (list<Edge>::iterator it = g.verts[i].Adj.begin(); it != g.verts[i].Adj.end(); it++) {//update numComing
numComeing[it->otherEnd(g.verts[i]).name]--;
if (numComeing[it->otherEnd(g.verts[i]).name]< 0) {//check undirected edge
ans.clear();
return ans;
}
}
}
}
if (tempAns == ans.size()) {//check cycle
ans.clear();
return ans;
}
}
return ans;
}
stack<Vertex> toplogicalOrder2(Graph g) {
stack<Vertex> ans, wrong;
stack<int> dfs;
vector<int> numComeing(g.numNodes+1, 0); // 0 not used
for (int i = 1; i < g.verts.size(); i++) {// update numComing
numComeing[i] = int(g.verts[i].revAdj.size());
}
for (int i = 1; i < g.verts.size(); i++) {// push noncoming into stack
if (numComeing[i] == 0) {
g.verts[i].seen = 1;
dfs.push(i);
}
}
while (!dfs.empty()) {
int v = dfs.top();
dfs.pop();
ans.push(g.verts[v]);
for (list<Edge>::iterator it = g.verts[v].Adj.begin(); it != g.verts[v].Adj.end(); it++) {//update numComing
numComeing[it->otherEnd(v).name]--;
if (numComeing[it->otherEnd(v).name] < 0) {//check undirected edge
return wrong;
}
if (numComeing[it->otherEnd(v).name] == 0) {//push nocoming into stack
dfs.push(it->otherEnd(v).name);
}
}
}
if (ans.size() != g.numNodes) {// cycle
return wrong;
}
return ans;
}
int main(int argc, const char * argv[]) {
////create graph
Graph g;
g = g.readGraph(1);
//toplogicalOrder
list<Vertex> ans1;
stack<Vertex> ans2;
ans1 = toplogicalOrder1(g);
ans2 = toplogicalOrder2(g);
for (list<Vertex>::iterator it = ans1.begin(); it != ans1.end(); it++) {
cout<<it->name<<" ";
}
cout<<endl;
while (!ans2.empty()) {
cout<<ans2.top().name<<" ";
ans2.pop();
}
cout<<endl;
return 0;
}
|
09f725aa182b08ce0c74c5e45de30015ba525973
|
ee8d49632b7b50c146207f953484b658d938b528
|
/compilador/main.cpp
|
68321a7a55344e2d758d3390dfffdd94adfe68b6
|
[] |
no_license
|
DiegoMora2112/Compilador
|
9396bb61f0d84bae4ad84869b8ac422aac8664d7
|
ef1aba8157630557a1cd130618b3761e39b0ef5a
|
refs/heads/master
| 2020-03-21T06:30:43.811950
| 2018-06-22T23:47:15
| 2018-06-22T23:47:15
| 138,225,160
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 760
|
cpp
|
main.cpp
|
#include "compilador.h"
string fuente, resto;
vector <string> lineas, reservadas,operadores,ids,numeros;
int linesN, nReservadas, found;
bool flt = false;
int main(int argc, char** argv) {
//*****Proceso de scaning******
compilador* c1 = new compilador();
c1->setCompilador(c1);
cout<<"*********"<<endl;
linesN = c1->getNlineas();
c1->getLineas(lineas);
for(int i = 0; i<linesN; i++){
cout<<lineas[i]<<endl;
}
//*****Proceso de generacion de tokens*****
for(int i = 0; i<lineas.size();i++){
resto = c1->getOperadores(lineas[i]);
cout<<resto<<endl;
c1->crearToken(resto,c1,reservadas,operadores,numeros,ids,flt);
c1->generate(lineas[i]);
c1->showlProp();
c1->clearVectors();
}
c1->emit();
return 0;
}
|
4aa9ed9549bb5b8879e3ba985ae95b408aac43cb
|
d9034235f0ab71688a1795f98d8cc0c798ef62a2
|
/180968_main2.cpp
|
0f94aa55d45eead2bb4461fe35ec3a33e5d3fcc9
|
[] |
no_license
|
OOP2019lab/lab12-180968EhteshamArif
|
b23f09f3477871fc23220c02715dd40f5ca88f9a
|
fd5d14464d4cd434268b1997f1a74a21942f01ab
|
refs/heads/master
| 2020-05-16T02:19:37.497988
| 2019-04-22T05:24:20
| 2019-04-22T05:24:20
| 182,627,615
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 435
|
cpp
|
180968_main2.cpp
|
/*#pragma once
#include"circle.h"
#include"rectangle.h"
#include"shape.h"
#include"triangle.h"
#include<iostream>
using namespace std;
int sumArea(shape &a,shape &b)
{
int sum=a.area()+b.area();
return sum;
}
void main()
{
triangle t1(1.0,9.0, "Red");
circle c1(2, "Blue");
rectangle r1(6,2, "Orange");
shape s1("Purple");
cout<<sumArea(t1,c1)<<endl;
cout<<sumArea(s1,r1)<<endl;
cout<<sumArea(s1,t1)<<endl;
}*/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.