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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6852cefe33918f74c8154af62bb33161ab88ba63 | 6cc00c07a75bf18a2b1824383c3acc050098d9ed | /Gulf Programming Contest/2017/league/league.cpp | ebda9ca286162a5126c053b5bf1883df64682293 | [
"MIT"
] | permissive | Mohammed-Shoaib/Coding-Problems | ac681c16c0f7c6d83f7cb46be71ea304d238344e | ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b | refs/heads/master | 2022-06-14T02:24:10.316962 | 2022-03-20T20:04:16 | 2022-03-20T20:04:16 | 145,226,886 | 75 | 31 | MIT | 2020-10-02T07:46:58 | 2018-08-18T14:31:33 | C++ | UTF-8 | C++ | false | false | 316 | cpp | league.cpp | #include <iostream>
#include <cstdio>
using namespace std;
int league(int N) {
return (N - 1) * 6;
}
int main() {
freopen("league.in", "r", stdin);
freopen("output.out", "w", stdout);
int T, k = 1;
cin >> T;
while (T--) {
int N;
cin >> N;
cout << k << ". " << league(N) << endl;
k++;
}
return 0;
} |
62c768ee0ddea580ae778faa3ec3c655a3bdb2a5 | 375f899736bbec5c900db342efec3ce8a19edbe9 | /quickSort.cpp | 116b54726c3163d7e2e335e7503580240220d37f | [] | no_license | davischoll/Estruturas-de-Dados | b10f31a65d900aa989ea4f205a8d5301527af749 | 0a2612df36577de0825697ed6201544b6e8cd584 | refs/heads/main | 2023-03-28T06:38:57.439015 | 2021-04-04T04:20:07 | 2021-04-04T04:20:07 | 352,410,903 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,334 | cpp | quickSort.cpp | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
void QuickSort (int vet[], int inicio, int fim);
int particao (int vet[], int inicio, int fim);
void troca(int vet[], int inicio, int fim);
#define TAMANHOVETOR 10
int main()
{
int vet[TAMANHOVETOR] = {0};
srand(time(NULL));
for (int i = 0; i < TAMANHOVETOR; i++)
vet[i] = rand() % 100; // GERA VALORES ALEATÓRIOS
printf("VETOR NAO ORDENADO: \n");
for (int i = 0; i < TAMANHOVETOR; i++)
printf("%d\n", vet[i]);
QuickSort(vet, 0, TAMANHOVETOR - 1);
printf("VETOR ORDENADO: \n");
for (int i = 0; i < TAMANHOVETOR; i++)
printf("%d\n", vet[i]);
return 0;
}
void QuickSort (int vet[], int inicio, int fim)
{
int meio;
if (inicio < fim)
{
meio = particao(vet, inicio, fim);
QuickSort (vet, inicio, meio);
QuickSort (vet, meio + 1, fim);
}
}
int particao (int vet[], int inicio, int fim)
{
int pivo, posicao_pivo, i, j;
posicao_pivo = (inicio + fim) / 2;
pivo = vet[posicao_pivo];
i = inicio - 1;
j = fim + 1;
while (i < j)
{
do
{
j--;
} while (vet[j] > pivo);
do
{
i++;
} while (vet[i] < pivo);
if (i < j)
troca(vet, i, j);
}
return j;
}
void troca(int vet[], int i, int f)
{
int aux;
aux = vet[i];
vet[i] = vet[f];
vet[f] = aux;
}
|
3b94caf16ad22603fea243903895d5dc49d1feb6 | d0e9c3e968af7f7e6b444f5e89e04dfbbdc14b91 | /utilities/convert/basil/multiclip.cc | 739f59664f6575dc49bdf53efc34aeea842fb3a9 | [] | no_license | jokulhlaup/elle_patch | 5c720383776c96ee41e3a3bcdd72ba95afa10724 | 86d1cea0e336854193d99bb7856446ed2b85e59d | refs/heads/master | 2016-09-01T22:20:11.142255 | 2013-01-29T01:51:45 | 2013-01-29T01:51:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,030 | cc | multiclip.cc | #include <stdio.h>
#include <vector>
#include "attrib.h"
#include "polyarea.h"
#include "multiclip.h"
#include "errnum.h"
#include "error.h"
int multiclip(std::vector<Coords> &pv2, std::vector<Coords> &pv1,
std::vector<std::vector<Coords> > &pclip )
{
int cnt, i, err=0;
int op=PBO_ISECT;
Coords pos;
POLYAREA *PA1=0, *PA2=0, *PAres=0, *p=0;
PLINE *poly1=0, *poly2=0, *cntr;
Vector v;
v[2] = 0.0;
for (i=0; i<pv1.size(); i++) {
pos = pv1[i];
v[0] = pos.x;
v[1] = pos.y;
if (poly1==0) {
if ((poly1 = poly_NewContour(v)) == 0)
OnError("",MALLOC_ERR);
}
else
poly_InclVertex(poly1->head.prev, poly_CreateNode(v));
}
poly_PreContour(poly1, TRUE);
if ( (poly1->Flags & PLF_ORIENT)
!= (unsigned int)(0 ? PLF_INV : PLF_DIR) )
poly_InvContour(poly1);
if (p == NULL)
p = poly_Create();
if (p == NULL)
OnError("",MALLOC_ERR);
poly_InclContour(p, poly1);
if (!poly_Valid(p))
OnError("polygon not valid",0);
PA1 = 0;
poly_M_Incl(&PA1, p);
/*
* create poly for cell
*/
for (i=0; i<pv2.size(); i++) {
pos = pv2[i];
v[0] = pos.x;
v[1] = pos.y;
if (poly2==0) {
if ((poly2 = poly_NewContour(v)) == 0)
OnError("",MALLOC_ERR);
}
else
poly_InclVertex(poly2->head.prev, poly_CreateNode(v));
}
poly_PreContour(poly2, TRUE);
if ( (poly2->Flags & PLF_ORIENT)
!= (unsigned int)(0 ? PLF_INV : PLF_DIR) )
poly_InvContour(poly2);
p = NULL;
if (p == NULL)
p = poly_Create();
if (p == NULL)
OnError("",MALLOC_ERR);
poly_InclContour(p, poly2);
if (!poly_Valid(p))
OnError("polygon not valid",0);
PA2 = 0;
poly_M_Incl(&PA2, p);
/*
* create the new polygons
*/
if ( !(poly_Valid(PA1) && poly_Valid(PA2)) )
{
poly_Free(&PA1);
poly_Free(&PA2);
OnError("One of polygons is not valid",0);
return -1;
}
if (poly_Boolean(PA1, PA2, &PAres, op) != err_ok)
{
poly_Free(&PA1);
poly_Free(&PA2);
poly_Free(&PAres);
OnError("Error while clipping",0);
return -1;
}
if (PAres != NULL) {
std::vector<Coords> pv;
i=0; POLYAREA *curpa = PAres;
do { i++; } while ((curpa = curpa->f) != PAres);
do {
for (cntr = curpa->contours;cntr != 0;cntr = cntr->next) {
VNODE *cur = &cntr->head;
do {
pos.x = cur->point[0];
pos.y = cur->point[1];
pv.push_back(pos);
} while (( cur = cur->next ) != &cntr->head);
}
pclip.push_back(pv);
} while ((curpa = curpa->f) != PAres);
}
/*else*/
/*err = EMPTYPOLY_ERR;*/
poly_Free(&PA1);
poly_Free(&PA2);
poly_Free(&PAres);
return(err);
}
|
67cbd0248881ac9cb43c8f298a6124e0ffea94d0 | 739cd742ce780376ce0c6fb228b158d4617330ea | /fishtoeque/src/main.cpp | 50c2d66f003c1777880681cdfedb5028d088ef5d | [] | no_license | dimitrisPs/opencv_360video | a5bbf9dfd99a97ab022be429651dace77fdad8eb | f50b20fdc8c7bd97d8ae0b3b904a8b90f77c7c62 | refs/heads/master | 2023-06-28T19:53:20.562255 | 2021-07-25T13:28:47 | 2021-07-25T13:28:47 | 53,042,819 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,281 | cpp | main.cpp | #include "main.hpp"
int main ()
{
/*create windows for src and result displaying */
cv::namedWindow("src Img",cv::WINDOW_NORMAL); //passing the autosize option prevents user to resize the window
cv::namedWindow("result Img",cv::WINDOW_NORMAL); //window's size is the same as the img resolution
cv::namedWindow("result Img2",cv::WINDOW_NORMAL); //window's size is the same as the img resolution
/*create Mat objects to hold Images*/
cv::Mat srcImg,srcImg1,srcImg2,dstImg,dstImg2;
cv::Mat mapX,mapY;
cv::Mat mapX2,mapY2;
cv::Mat extImg;
cv::Mat frontImg;
cv::Mat rearImg;
cv::Mat dst;
/*load img file*/
// srcImg=cv::imread("../../Desktop/test.jpg");
srcImg=cv::imread("./fish.jpg");
// srcImg=cv::imread("./small.jpg");
// srcImg=cv::imread("./fishpat.jpg");
// srcImg=cv::imread("./fishpat120.jpg");
// srcImg=cv::imread("./fishpat220.jpg");
/*the following five functions is when we want to remap square images (we cant see for over 180 degrees)*/
// dstImg.create( srcImg.size().height,srcImg.size().width, srcImg.type() );
// mapX.create( srcImg.size().height,srcImg.size().width, CV_32FC1 );
// mapY.create( srcImg.size().height,srcImg.size().width, CV_32FC1 );
// computeEqueRemap(&mapX,&mapY);
// remap( srcImg, dstImg, mapX, mapY, CV_INTER_LINEAR, cv::BORDER_WRAP , cv::Scalar(0,0, 0) );
/*copy the src image to an image with double the width */
// extImg.create(srcImg.size().height,srcImg.size().width*2, srcImg.type());
// mirror(srcImg,extImg);
// extImg= cv::imread("../../Desktop/test1.jpg");
srcImg1=cv::imread("/home/dimitris/Pictures/fisheye/1.jpg");
srcImg2=cv::imread("/home/dimitris/Pictures/fisheye/2.jpg");
// addBoarder(srcImg,extImg);
// extBoarderLeft(srcImg,extImg);
// frontImg.create( extImg.size().height,extImg.size().width, srcImg.type() );
// rearImg.create( extImg.size().height,extImg.size().width, srcImg.type() );
frontImg.create( srcImg1.size().height,srcImg1.size().width*2, srcImg1.type() );
rearImg.create( srcImg2.size().height,srcImg2.size().width*2, srcImg2.type() );
//width height
// cv::Rect frontROI(0,0,extImg.size().width/2,extImg.size().height);
// cv::Rect rearROI(extImg.size().width/2,0,extImg.size().width/2,extImg.size().height);
cv::Rect frontROI(0,0,srcImg1.size().width,srcImg1.size().height);
cv::Rect rearROI(srcImg2.size().width,0,srcImg2.size().width,srcImg2.size().height);
// dstImg.create( extImg.size().height,extImg.size().width, srcImg.type() );
// dstImg2.create( extImg.size().height,extImg.size().width, srcImg.type() );
// mapX.create( extImg.size().height,extImg.size().width, CV_32FC1 );
// mapY.create( extImg.size().height,extImg.size().width, CV_32FC1 );
// mapX2.create( extImg.size().height,extImg.size().width, CV_32FC1 );
// mapY2.create( extImg.size().height,extImg.size().width, CV_32FC1 );
dstImg.create( frontImg.size().height,frontImg.size().width, frontImg.type() );
dstImg2.create( rearImg.size().height,rearImg.size().width, rearImg.type() );
mapX.create( frontImg.size().height,frontImg.size().width, CV_32FC1 );
mapY.create( frontImg.size().height,frontImg.size().width, CV_32FC1 );
mapX2.create( rearImg.size().height,rearImg.size().width, CV_32FC1 );
mapY2.create( rearImg.size().height,rearImg.size().width, CV_32FC1 );
// extImg(frontROI).copyTo(frontImg(frontROI));
// extImg(rearROI).copyTo(rearImg(rearROI));
srcImg1.copyTo(frontImg(frontROI));
srcImg2.copyTo(rearImg(rearROI));
computeEqueRemap3(&mapX,&mapY);
computeEqueRemap5(&mapX2,&mapY2);
remap( frontImg, dstImg, mapX, mapY, CV_INTER_LINEAR, cv::BORDER_CONSTANT , cv::Scalar(0,0, 0) );
remap( rearImg, dstImg2, mapX2, mapY2, CV_INTER_LINEAR, cv::BORDER_CONSTANT , cv::Scalar(0,0, 0) );
// cv::addWeighted( dstImg, 0.5, dstImg2, 0.5, 0, dst);
/*display src img to src img window*/
// cv::imshow("src Img",extImg);
cv::imshow("result Img1",dstImg);
cv::imshow("result Img2",dstImg2);
// cv::imshow("f",dst);
cv::waitKey(); //wait for user keyboard input and then exit
return 0;
}
void computeEqueRemap(cv::Mat *mapX,cv::Mat *mapY)
{
/*we need to implement the reverse mapping and not the forward.
* that is we have to compute the transformation from plane to sphere
* and then from sphere to 2d circular image.
* Equations from http://paulbourke.net/dome/fish2/index.html
*/
float planarTheta, planarRadius;
float sphericalTheta,sphericalPhi;
float sphericalX,sphericalY,sphericalZ;
float proTheta,proPhi;//projection angles
const float sphericalRadius=1;
int equeX,equeY;
float cirX,cirY;
for( int equeY = 0; equeY < mapX->rows; equeY++ )
{
for( int equeX = 0;equeX < mapX->cols;equeX++ )
{
//from equerectangular image pixels x,y to spherical cordinates.
//the radius of the sphere is ! for simplicity
// remember for dual fisheye we must change theta to be from -pi to pi
sphericalTheta = -M_PI_2 * (1-2*(float)(equeX) / (mapX->cols-1));//devide with width-1 to get number in[-pi/2,pi/2]
sphericalPhi = M_PI_2 *(1-2*(float)(equeY) / (mapX->rows-1));
// compute cartesian coordinates of a pixel in 3d sphere
sphericalX=cos(sphericalPhi)*sin(sphericalTheta);
sphericalY=cos(sphericalPhi)*cos(sphericalTheta);
sphericalZ=sin(sphericalPhi);
//compute the polar coordinates of 3d points to planar circular image
proTheta=atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY);
planarRadius=proPhi/(FISHEYE_ANGLE/2.0);//must probide fisheye angle in rad
planarTheta=proTheta;
//compute pixel location to circular fisheye picture
cirX=(1+planarRadius*cos(planarTheta))/2;
cirY=(1+planarRadius*sin(planarTheta))/2;
mapX->at<float>(equeY,equeX)=(cirX)*mapX->cols;
mapY->at<float>(equeY,equeX)=mapX->rows-(cirY)*mapX->rows;
}
}
}
void computeEqueRemap2(cv::Mat *mapX,cv::Mat *mapY)
{
/*we need to implement the reverse mapping and not the forward.
* that is we have to compute the transformation from plane to sphere
* and then from sphere to 2d circular image.
* Equations from http://paulbourke.net/dome/fish2/index.html
*/
float planarTheta, planarRadius;
float sphericalTheta,sphericalPhi;
float sphericalX,sphericalY,sphericalZ;
float proTheta,proPhi;//projection angles
const float sphericalRadius=1;
int equeX,equeY;
float cirX,cirY;
for( int equeY = 0; equeY < mapX->rows; equeY++ )
{
for( int equeX = 0;equeX < mapX->cols;equeX++ )
{
//from equerectangular image pixels x,y to spherical cordinates.
//the radius of the sphere is ! for simplicity
sphericalTheta = -M_PI * (1-2*(float)(equeX) / (mapX->cols-1));//devide with width-1 to get number in[-pi/2,pi/2]
sphericalPhi = M_PI_2 *(1-2*(float)(equeY) / (mapX->rows-1));
// compute cartesian coordinates of a pixel in 3d sphere
sphericalX=cos(sphericalPhi)*sin(sphericalTheta);
sphericalY=cos(sphericalPhi)*cos(sphericalTheta);
sphericalZ=sin(sphericalPhi);
//compute the polar coordinates of 3d points to planar circular image
proTheta=atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY);
planarRadius=proPhi/(FISHEYE_ANGLE/2.0);//must provide fisheye angle in rad
planarTheta=proTheta;
//compute pixel location to circular fisheye picture
cirX=(1+planarRadius*cos(planarTheta))/2;
cirY=(1+planarRadius*sin(planarTheta))/2;
mapX->at<float>(equeY,equeX)=(cirX)*mapX->rows+mapX->rows/2;
mapY->at<float>(equeY,equeX)=mapY->rows-(cirY)*mapY->rows;
}
}
}
void computeEqueRemap3(cv::Mat *mapX,cv::Mat *mapY)
{
float planarTheta, planarRadius;
float sphericalTheta,sphericalPhi;
float sphericalX,sphericalY,sphericalZ;
float proTheta,proPhi;//projection angles
const float sphericalRadius=1;
int equeX,equeY;
float cirX,cirY;
for( int equeY = 0; equeY < mapX->rows; equeY++ )
{
for( int equeX = 0;equeX < mapX->cols;equeX++ )
{
//from equerectangular image pixels x,y to spherical cordinates.
//the radius of the sphere is ! for simplicity
sphericalTheta = -M_PI * (1-2*(float)(equeX) / (mapX->cols-1));//devide with width-1 to get number in[-pi/2,pi/2]
sphericalPhi = M_PI_2 *(1-2*(float)(equeY) / (mapX->rows-1));
// compute cartesian coordinates of a pixel in 3d sphere
sphericalX=cos(sphericalPhi)*sin(sphericalTheta);
sphericalY=cos(sphericalPhi)*cos(sphericalTheta);
sphericalZ=sin(sphericalPhi);
//compute the polar coordinates of 3d points to planar circular image
proTheta=atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY);
planarRadius=proPhi/(FISHEYE_ANGLE/2.0);//must provide fisheye angle in rad
planarTheta=proTheta;
//compute pixel location to circular fisheye picture
cirX=(1+planarRadius*cos(planarTheta))/2;
cirY=(1+planarRadius*sin(planarTheta))/2;
mapX->at<float>(equeY,equeX)=(cirX)*mapX->rows;
mapY->at<float>(equeY,equeX)=mapY->rows-(cirY)*mapY->rows;
}
}
}
void computeEqueRemap4(cv::Mat *mapX,cv::Mat *mapY)
{
float planarTheta, planarRadius;
float sphericalTheta,sphericalPhi;
float sphericalX,sphericalY,sphericalZ;
float proTheta,proPhi;//projection angles
const float sphericalRadius=1;
int equeX,equeY;
float cirX,cirY;
for( int equeY = 0; equeY < mapX->rows; equeY++ )
{
for( int equeX = 0;equeX < mapX->cols;equeX++ )
{
//from equerectangular image pixels x,y to spherical cordinates.
//the radius of the sphere is ! for simplicity
sphericalTheta = -M_PI * (1-2*(float)(equeX) / (mapX->cols-1));//devide with width-1 to get number in[-pi/2,pi/2]
sphericalPhi = M_PI_2 *(1-2*(float)(equeY) / (mapX->rows-1));
// compute cartesian coordinates of a pixel in 3d sphere
sphericalX=cos(sphericalPhi)*sin(sphericalTheta);
sphericalY=cos(sphericalPhi)*cos(sphericalTheta);
sphericalZ=sin(sphericalPhi);
//compute the polar coordinates of 3d points to planar circular image
if(sphericalTheta>M_PI_2)
{
proTheta=-atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY)-M_PI;
}
else if(sphericalTheta<-M_PI_2)
{
proTheta=-atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY)-M_PI;
}
else
{
proTheta=atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY);
}
planarRadius=proPhi/(FISHEYE_ANGLE/2.0);//must provide fisheye angle in rad
planarTheta=(proTheta);
//compute pixel location to circular fisheye picture
cirX=(1+planarRadius*cos(planarTheta))/2;
cirY=(1+planarRadius*sin(planarTheta))/2;
if(sphericalTheta>M_PI_2||sphericalTheta<-M_PI_2)
{
mapX->at<float>(equeY,equeX)=(cirX)*mapX->rows+mapX->rows;
mapY->at<float>(equeY,equeX)=mapY->rows-(cirY)*mapY->rows;
}
else
{
mapX->at<float>(equeY,equeX)=(cirX)*mapX->rows;
mapY->at<float>(equeY,equeX)=mapY->rows-(cirY)*mapY->rows;
}
}
}
}
void computeEqueRemap5(cv::Mat *mapX,cv::Mat *mapY)
{
float planarTheta, planarRadius;
float sphericalTheta,sphericalPhi;
float sphericalX,sphericalY,sphericalZ;
float proTheta,proPhi;//projection angles
const float sphericalRadius=1;
int equeX,equeY;
float cirX,cirY;
for( int equeY = 0; equeY < mapX->rows; equeY++ )
{
for( int equeX = 0;equeX < mapX->cols;equeX++ )
{
//from equerectangular image pixels x,y to spherical cordinates.
//the radius of the sphere is ! for simplicity
sphericalTheta = -M_PI * (1-2*(float)(equeX) / (mapX->cols-1));//devide with width-1 to get number in[-pi/2,pi/2]
sphericalPhi = M_PI_2 *(1-2*(float)(equeY) / (mapX->rows-1));
// compute cartesian coordinates of a pixel in 3d sphere
sphericalX=cos(sphericalPhi)*sin(sphericalTheta);
sphericalY=cos(sphericalPhi)*cos(sphericalTheta);
sphericalZ=sin(sphericalPhi);
//compute the polar coordinates of 3d points to planar circular image
proTheta=-atan2(sphericalZ,sphericalX);
proPhi=atan2(sqrt(pow(sphericalX,2.0)+pow(sphericalZ,2.0)),sphericalY)-M_PI;
planarRadius=proPhi/(FISHEYE_ANGLE/2.0);//must provide fisheye angle in rad
planarTheta=(proTheta);
//compute pixel location to circular fisheye picture
cirX=(1+planarRadius*cos(planarTheta))/2;
cirY=(1+planarRadius*sin(planarTheta))/2;
mapX->at<float>(equeY,equeX)=(cirX)*mapX->rows+mapX->rows;
mapY->at<float>(equeY,equeX)=mapY->rows-(cirY)*mapY->rows;
}
}
}
void addBoarder(const cv::Mat &src,cv::Mat &result)
{
cv::Rect roi(src.cols/2,0,src.cols,src.rows);
cv::Mat roiDest = result(roi);
src.copyTo(roiDest);
}
void extBoarderRight(const cv::Mat &src,cv::Mat &result)
{
cv::Rect roi(0,0,src.cols,src.rows);
cv::Mat roiDest = result(roi);
src.copyTo(roiDest);
}
void extBoarderLeft(const cv::Mat &src,cv::Mat &result)
{
cv::Rect roi(src.cols,0,src.cols,src.rows);
cv::Mat roiDest = result(roi);
src.copyTo(roiDest);
}
void mirror(const cv::Mat &src,cv::Mat &result)
{
cv::Mat mirror;
cv::flip(src,mirror,1);
cv::Rect roileft(0,0,src.cols,src.rows);
cv::Rect roiright(src.cols,0,src.cols,src.rows);
cv::Mat roi = result(roileft);
src.copyTo(roi);
roi = result(roiright);
mirror.copyTo(roi);
}
|
166dd32f0cfa5d9373c3383e678315ae0defdc69 | 3f7028cc89a79582266a19acbde0d6b066a568de | /source/extensions/config_subscription/grpc/new_delta_subscription_state.h | 03d949bac1b802b51b9b1c69e7a8e53b67551dc1 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | envoyproxy/envoy | 882d3c7f316bf755889fb628bee514bb2f6f66f0 | 72f129d273fa32f49581db3abbaf4b62e3e3703c | refs/heads/main | 2023-08-31T09:20:01.278000 | 2023-08-31T08:58:36 | 2023-08-31T08:58:36 | 65,214,191 | 21,404 | 4,756 | Apache-2.0 | 2023-09-14T21:56:37 | 2016-08-08T15:07:24 | C++ | UTF-8 | C++ | false | false | 9,833 | h | new_delta_subscription_state.h | #pragma once
#include "envoy/config/subscription.h"
#include "envoy/config/xds_config_tracker.h"
#include "envoy/event/dispatcher.h"
#include "envoy/grpc/status.h"
#include "envoy/local_info/local_info.h"
#include "envoy/service/discovery/v3/discovery.pb.h"
#include "source/common/common/assert.h"
#include "source/common/common/logger.h"
#include "source/common/config/api_version.h"
#include "source/common/config/ttl.h"
#include "source/extensions/config_subscription/grpc/pausable_ack_queue.h"
#include "source/extensions/config_subscription/grpc/watch_map.h"
#include "absl/container/node_hash_map.h"
namespace Envoy {
namespace Config {
// Tracks the xDS protocol state of an individual ongoing delta xDS session, i.e. a single type_url.
// There can be multiple NewDeltaSubscriptionStates active. They will always all be blissfully
// unaware of each other's existence, even when their messages are being multiplexed together by
// ADS.
//
// There are two scenarios which affect how NewDeltaSubscriptionState manages the resources. First
// scenario is when we are subscribed to a wildcard resource, and other scenario is when we are not.
//
// Delta subscription state also divides the resources it cached into three categories: requested,
// wildcard and ambiguous.
//
// The "requested" category is for resources that we have explicitly asked for (either through the
// initial set of resources or through the on-demand mechanism). Resources in this category are in
// one of two states: "complete" and "waiting for server".
//
// "Complete" resources are resources about which the server sent us the information we need (for
// now - just resource version).
//
// The "waiting for server" state is either for resources that we have just requested, but we still
// didn't receive any version information from the server, or for the "complete" resources that,
// according to the server, are gone, but we are still interested in them - in such case we strip
// the information from the resource.
//
// The "wildcard" category is for resources that we are not explicitly interested in, but we are
// indirectly interested through the subscription to the wildcard resource.
//
// The "ambiguous" category is for resources that we stopped being interested in, but we may still
// be interested indirectly through the wildcard subscription. This situation happens because of the
// xDS protocol limitation - the server isn't able to tell us that the resource we subscribed to is
// also a part of our wildcard subscription. So when we unsubscribe from the resource, we need to
// receive a confirmation from the server whether to keep the resource (which means that it was a
// part of our wildcard subscription) or to drop it.
//
// Please refer to drawings (non-wildcard-resource-state-machine.png and
// (wildcard-resource-state-machine.png) for visual depictions of the resource state machine.
//
// In the "no wildcard subscription" scenario all the cached resources should be in the "requested"
// category. Resources are added to the category upon the explicit request and dropped when we
// explicitly unsubscribe from it. Transitions between "complete" and "waiting for server" happen
// when we receive messages from the server - if a resource in the message is in "added resources"
// list (thus contains version information), the resource becomes "complete". If the resource in the
// message is in "removed resources" list, it changes into the "waiting for server" state. If a
// server sends us a resource that we didn't request, it's going to be ignored.
//
// In the "wildcard subscription" scenario, "requested" category is the same as in "no wildcard
// subscription" scenario, with one exception - the unsubscribed "complete" resource is not removed
// from the cache, but it's moved to the "ambiguous" resources instead. At this point we are waiting
// for the server to tell us that this resource should be either moved to the "wildcard" resources,
// or dropped. Resources in "wildcard" category are only added there or dropped from there by the
// server. Resources from both "wildcard" and "ambiguous" categories can become "requested"
// "complete" resources if we subscribe to them again.
//
// The delta subscription state transitions between the two scenarios depending on whether we are
// subscribed to wildcard resource or not. Nothing special happens when we transition from "no
// wildcard subscription" to "wildcard subscription" scenario, but when transitioning in the other
// direction, we drop all the resources in "wildcard" and "ambiguous" categories.
class NewDeltaSubscriptionState : public Logger::Loggable<Logger::Id::config> {
public:
NewDeltaSubscriptionState(std::string type_url, UntypedConfigUpdateCallbacks& watch_map,
const LocalInfo::LocalInfo& local_info, Event::Dispatcher& dispatcher,
XdsConfigTrackerOptRef xds_config_tracker);
// Update which resources we're interested in subscribing to.
void updateSubscriptionInterest(const absl::flat_hash_set<std::string>& cur_added,
const absl::flat_hash_set<std::string>& cur_removed);
void setMustSendDiscoveryRequest() { must_send_discovery_request_ = true; }
// Whether there was a change in our subscription interest we have yet to inform the server of.
bool subscriptionUpdatePending() const;
void markStreamFresh() { any_request_sent_yet_in_current_stream_ = false; }
UpdateAck handleResponse(const envoy::service::discovery::v3::DeltaDiscoveryResponse& message);
void handleEstablishmentFailure();
// Returns the next gRPC request proto to be sent off to the server, based on this object's
// understanding of the current protocol state, and new resources that Envoy wants to request.
envoy::service::discovery::v3::DeltaDiscoveryRequest getNextRequestAckless();
// The WithAck version first calls the Ack-less version, then adds in the passed-in ack.
envoy::service::discovery::v3::DeltaDiscoveryRequest getNextRequestWithAck(const UpdateAck& ack);
NewDeltaSubscriptionState(const NewDeltaSubscriptionState&) = delete;
NewDeltaSubscriptionState& operator=(const NewDeltaSubscriptionState&) = delete;
private:
bool isHeartbeatResponse(const envoy::service::discovery::v3::Resource& resource) const;
void handleGoodResponse(const envoy::service::discovery::v3::DeltaDiscoveryResponse& message);
void handleBadResponse(const EnvoyException& e, UpdateAck& ack);
class ResourceState {
public:
// Builds a ResourceState in the waitingForServer state.
ResourceState() = default;
// Builds a ResourceState with a specific version
ResourceState(absl::string_view version) : version_(version) {}
// Self-documenting alias of default constructor.
static ResourceState waitingForServer() { return {}; }
// Self-documenting alias of constructor with version.
static ResourceState withVersion(absl::string_view version) { return {version}; }
// If true, we currently have no version of this resource - we are waiting for the server to
// provide us with one.
bool isWaitingForServer() const { return version_ == absl::nullopt; }
void setAsWaitingForServer() { version_ = absl::nullopt; }
void setVersion(absl::string_view version) { version_ = std::string(version); }
// Must not be called if waitingForServer() == true.
std::string version() const {
ASSERT(version_.has_value());
return version_.value_or("");
}
private:
absl::optional<std::string> version_;
};
void addResourceStateFromServer(const envoy::service::discovery::v3::Resource& resource);
OptRef<ResourceState> getRequestedResourceState(absl::string_view resource_name);
OptRef<const ResourceState> getRequestedResourceState(absl::string_view resource_name) const;
bool isInitialRequestForLegacyWildcard();
// A map from resource name to per-resource version. The keys of this map are exactly the resource
// names we are currently interested in. Those in the waitingForServer state currently don't have
// any version for that resource: we need to inform the server if we lose interest in them, but we
// also need to *not* include them in the initial_resource_versions map upon a reconnect.
absl::node_hash_map<std::string, ResourceState> requested_resource_state_;
// A map from resource name to per-resource version. The keys of this map are resource names we
// have received as a part of the wildcard subscription.
absl::node_hash_map<std::string, std::string> wildcard_resource_state_;
// Used for storing resources that we lost interest in, but could
// also be a part of wildcard subscription.
absl::node_hash_map<std::string, std::string> ambiguous_resource_state_;
// Not all xDS resources supports heartbeats due to there being specific information encoded in
// an empty response, which is indistinguishable from a heartbeat in some cases. For now we just
// disable heartbeats for these resources (currently only VHDS).
const bool supports_heartbeats_;
TtlManager ttl_;
const std::string type_url_;
UntypedConfigUpdateCallbacks& watch_map_;
const LocalInfo::LocalInfo& local_info_;
XdsConfigTrackerOptRef xds_config_tracker_;
bool in_initial_legacy_wildcard_{true};
bool any_request_sent_yet_in_current_stream_{};
bool must_send_discovery_request_{};
// Tracks changes in our subscription interest since the previous DeltaDiscoveryRequest we sent.
// TODO: Can't use absl::flat_hash_set due to ordering issues in gTest expectation matching.
// Feel free to change to an unordered container once we figure out how to make it work.
std::set<std::string> names_added_;
std::set<std::string> names_removed_;
};
} // namespace Config
} // namespace Envoy
|
cf6d4110341658f365c743246ce8574a506d4c9b | 54320ef64dd0548a5b5016feed14c606a5fd1e76 | /Anush_Qalashyan/C++/Homework/30.10.2015/max_min_sum.cpp | 8b4eff3f16cb444bcf67b8770642afd0445d426a | [] | no_license | ITC-Vanadzor/ITC-7 | 9859ebbd0d824d3a480ea281bbdb14edbb6a374e | d2bfcdc3a1faea4cdc1d7e555404445ac8768c66 | refs/heads/master | 2021-01-17T15:43:29.646485 | 2019-02-17T19:07:36 | 2019-02-17T19:07:36 | 44,699,731 | 0 | 4 | null | 2017-04-13T18:45:36 | 2015-10-21T19:38:34 | JavaScript | UTF-8 | C++ | false | false | 774 | cpp | max_min_sum.cpp | #include <iostream>
int getMinMax(int* A, int size, int Min_out, int Max_out)
{
for (int i = 0; i < size; ++i)
{
if(i % 2 == 0)
{
Max_out = A[i];
if (Max_out < A[i])
{
Max_out = A[i];
}
}
else
{
Min_out = A[i];
if (Min_out > A[i])
{
Min_out = A[i];
}
}
}
return Min_out + Max_out ;
}
int main ()
{
int size;
std::cout << "size= " ;
std::cin >> size;
int A[size];
for(int i = 0; i < size; ++i)
{
std::cin >> A[i];
}
int Min_out;
int Max_out;
std::cout << getMinMax(A, size, Min_out, Max_out) << std::endl;
return 0;
}
|
9fdae3350b76d25da9a85a92ecdb109425cecf6c | f27c9ab5d8bffdac3d1511044ac26754895cbf37 | /cores/zuno/Print.h | f14a1faa7d83a2bb29c9274ae076b9f46c0e5baf | [] | no_license | Wismgari/Z-Uno-2.1.4 | 17fbf69910c926e2d9ad74bc12ca1e7c37cba3f2 | 5762ded25109692a25eefd2d5aee74e3300454e1 | refs/heads/master | 2020-03-31T04:58:16.560084 | 2018-10-07T10:13:12 | 2018-10-07T10:13:12 | 151,927,771 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,740 | h | Print.h | /*
Print.h - Base class that provides print() and println()
Copyright (c) 2008 David A. Mellis. All right reserved.
Simplified for Z-Uno project by Z-Wave.Me (c) 2016
*/
#ifndef Print_h
#define Print_h
#include "ArduinoTypes.h"
#include "c_lib_minimal.h"
#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2
class Print
{
private:
int write_error;
uint8_t dump_line_size;
protected:
void setWriteError(int err = 1) { write_error = err; }
public:
Print() { write_error = 0; dump_line_size = 10;};
int getWriteError() { return write_error; }
void clearWriteError() { setWriteError(0); }
void setDumpLine(uint8_t line_size) {dump_line_size = line_size;};
virtual void write(uint8_t a){ };// = 0;
virtual uint8_t write(uint8_t *buffer, size_t size);
uint8_t print(char *);
uint8_t print(char);
uint8_t print(unsigned char, uint8_t = DEC);
uint8_t print(int, uint8_t = DEC);
uint8_t print(unsigned int, uint8_t = DEC);
uint8_t print(long, uint8_t = DEC);
uint8_t print(unsigned long, uint8_t = DEC);
uint8_t print(float, uint8_t = 2);
uint8_t print(double, uint8_t = 2);
uint8_t fixPrint(long, uint8_t = 2);
uint8_t fixPrint(int n, uint8_t precision);
word dumpPrint(uint8_t *, uint8_t);
uint8_t println(char *);
uint8_t println(char);
uint8_t println(unsigned char, uint8_t = DEC);
uint8_t println(int, uint8_t = DEC);
uint8_t println(unsigned int, uint8_t = DEC);
uint8_t println(long, uint8_t = DEC);
uint8_t println(unsigned long, uint8_t = DEC);
uint8_t println(float, uint8_t = 2);
uint8_t println(double, uint8_t = 2);
uint8_t println(void);
};
#endif
|
39b20379fb1585d93ab51f0ada802ee0b95cdfc2 | ca57d57bec37faeb57899a80df5b4d267a536ac5 | /src/sun_ray/application.h | 06f8219b55defa14bc8d530a7d7cdca3fae11b14 | [
"BSD-3-Clause"
] | permissive | fuersten/sun_ray | ed875b2a5a2c0f9fd8bfb7321921b1b70c205a3a | b882d67cd9747f61b50def4c1414e7552ba917c0 | refs/heads/main | 2023-04-17T04:08:18.860499 | 2021-04-27T10:15:50 | 2021-04-27T10:15:50 | 335,270,596 | 2 | 0 | BSD-3-Clause | 2021-04-27T10:03:57 | 2021-02-02T11:46:17 | C++ | UTF-8 | C++ | false | false | 2,219 | h | application.h | //
// application.h
// sun_ray
//
// Created by Lars-Christian Fürstenberg on 29.02.20.
// Copyright © 2020 Lars-Christian Fürstenberg. All rights reserved.
//
#include <sun_ray/script/engine.h>
#include <sun_ray/version.h>
#include <fstream>
#include <iostream>
#include "options.h"
namespace sunray
{
class Application
{
public:
Application(std::ostream& stream, std::ostream& error_stream, const std::vector<std::string>& args)
: stream_{stream}
, error_stream_{error_stream}
{
print_copy_right();
opts_ = Options::handle_options(error_stream, args);
}
int run()
{
if (!opts_.first) {
return -1;
}
int ret{0};
try {
sunray::script::Engine executor{stream_, error_stream_, opts_.second.format_, opts_.second.dump_};
for (const auto& file : opts_.second.files_) {
std::ifstream input_source{file.string()};
if (input_source.good()) {
error_stream_ << "================================================================================\n";
error_stream_ << file.string() << ":" << std::endl;
error_stream_ << "================================================================================\n\n";
if (!executor.process(input_source)) {
error_stream_ << "\nfailure!\n\n";
ret = -1;
}
} else {
error_stream_ << "Could not open sunray source file " << file.string() << std::endl;
ret = -1;
}
}
} catch (const std::exception& ex) {
error_stream_ << "Caught exception: " << ex.what() << std::endl;
ret = -1;
}
return ret;
}
~Application() = default;
Application(const Application&) = delete;
Application(Application&&) = delete;
Application& operator=(const Application&) = delete;
Application& operator=(Application&&) = delete;
private:
void print_copy_right()
{
error_stream_ << fmt::format("SunRay ray tracer {}\n{}\n\n", SUNRAY_VERSION_STRING, SUNRAY_COPYRIGHT);
}
std::pair<bool, Options> opts_;
std::ostream& stream_;
std::ostream& error_stream_;
};
}
|
f40df15edcd6e39272c8503b389ebd33c8a8e478 | f623885149f6396c0d308e273e3e370c2f550930 | /Project 2/Project 2/testSequence.cpp | ba556dbde96a92ee5645bdcd04002f85a5b86874 | [] | no_license | melodychn/CS32 | d809f3e3039a920512cb4ea7d528a29ddc9e58f5 | bb9aff04af9224a34cba614c5c040cd427c0d155 | refs/heads/master | 2021-07-16T15:39:54.776429 | 2020-06-21T18:12:00 | 2020-06-21T18:12:00 | 179,424,733 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,501 | cpp | testSequence.cpp | //
// testnewSequence.cpp
// HW1
//
// Created by Melody Chen on 4/11/19.
// Copyright © 2019 Melody Chen. All rights reserved.
//
#include <iostream>
#include "Sequence.h"
#include <cassert>
using namespace std;
int main() {
Sequence a;
assert(a.insert(0,1)==0); //testing insert with size 0
assert(a.insert(0,0)==0); //testing insert at 0
assert(a.insert(2,3)==2); //testing insert at 2
assert(a.insert(2,2)==2); //testing insert
assert(a.insert(4,4)==4); //testing insert
assert(a.size()==5); //testing size
unsigned long test;
assert(a.get(0, test)==true); //testing get
assert(test==0); //testing value in list
assert(a.get(5, test)==false); //testing get
assert(a.get(4, test)==true); //testing get
assert(test==4); //testing value in list
assert(a.get(-1, test)==false); //testing get
assert(a.insert(6, 9)==-1); //testing insert at invalid location
assert(a.insert(0)==0); //testing insert at right position
assert(a.insert(5)==6); //testing insert
assert(a.insert(100)==7); //testing insert
assert(a.insert(1)==2); //testing insert
assert(a.erase(0)==true); //testing erase
assert(a.erase(0)==true); //testing erase
assert(a.erase(6)==true); //testing erase
assert(a.erase(6)==false); //testing erase
assert(a.remove(1)==2); //testing remove
assert(a.find(2)==0); //testing find
assert(a.find(6)==-1); //test find
assert(a.find(5)==3); //test find
Sequence b;
//testing for empty list
assert(b.remove(0)==0); //test for empty
assert(b.find(0)==-1); //test for empty
assert(b.erase(0)==false); //test for empty
assert(b.set(5, 10)==false); //test for empty
assert(b.get(0,test)==false); //test for empty
assert(b.insert(0)==0); //test for empty
assert(b.erase(0)==true); //test for one element
//testing for all same values
for(int k=0; k<4; k++)
b.insert(1);
assert(b.find(1)==0); //test find
assert(b.size()==4); //test size
assert(b.remove(1)==4); //test remove
assert(b.size()==0); //test changes in size
//regular testing
assert(b.insert(0)==0); //test insert
assert(b.insert(1)==1); //test insert
assert(b.insert(2)==2); //test insert
assert(b.set(0, 1)==true); //test set
assert(b.get(0, test)==true); //test get
assert(test==1); //test if value changed
assert(b.set(2,3)==true); //test set
assert(b.get(2, test)==true); //test get
assert(test==3); //test if value changed
assert(b.set(3,3)==false); //test set
//testing swap
Sequence d;
Sequence e;
ItemType v = 0;
// No failures inserting 5 items into b
for (int k = 0; k < 5; k++)
assert(d.insert(v) != -1);
// When two Sequences' contents are swapped, their capacities are
// swapped as well:
assert(d.size()==5);
assert(e.size()==0);
assert(d.find(v)==0);
assert(e.find(v)==-1);
e.swap(d);
assert(e.size()==5); //check if their sizes are swapped
assert(d.size()==0); //check if sizes are swapped
assert(d.find(v)==-1);
assert(e.find(v)==0);
assert(d.insert(v) != -1); //check if you're able to insert stuff into b now
assert(d.find(v)==0); //check if the first instance of v is at 0
//testing copy constructor
Sequence f(a);
assert(f.size()==a.size()); //test if size equal
assert(f.get(0, test)==true); //test if copied
assert(test==2); //test if value copied
assert(f.get(1,test)==true); //test if copied
assert(test==3); //test if value copied
assert(f.get(2,test)==true);
assert(test==4); //test if value copied
assert(f.get(3,test)==true);
assert(test==5); //test if value copied
assert(f.insert(0)==0); //test if insert works
assert(f.find(5)==4); //test find
//testing assignment operator
f = b;
assert(f.size()==3); //test if size changed
f.get(0, test);
assert(test==1); //test if value changed
f.get(1, test);
assert(test==1); //test if value changed
f.get(2, test);
assert(test==3); //test if value changed
assert(f.remove(1)==2); //test if remove
assert(f.size()==1); //test if size change
//test subsequence
Sequence g;
Sequence i;
Sequence z;
assert(subsequence(g, i)==-1); //test subseq for no subseq
g.insert(2);
g.insert(5);
g.insert(7);
g.insert(9);
g.insert(12);
g.insert(17);
i.insert(7);
i.insert(9);
i.insert(12);
z.insert(4);
z.insert(8);
z.insert(9);
z.insert(9);
assert(subsequence(g, g)==0); //test for aliasing
assert(subsequence(g, i)==2); //test for subseq
assert(subsequence(i, g)==-1); //test for no subseq
assert(subsequence(g, z)==-1); //test for no subseq
//test interleave
Sequence k(a);
i.insert(15);
i.insert(22);
i.insert(25);
interleave(i, z, k); //test interleave
k.get(0, test);
assert(test==7);
k.get(1, test);
assert(test==4);
Sequence y;
interleave(i, z, i); //test aliasing
i.get(0, test);
assert(test==7); //test if value changed
i.get(1, test);
assert(test==4); //test if value changed
i.get(2, test);
assert(test==9); //test if value changed
i.get(3, test);
assert(test==8); //test if value changed
i.get(8, test);
assert(test==22); //test if value changed
i.get(9, test);
assert(test==25); //test if value changed
cerr<<"passed all test cases"<<endl;
return 0;
}
|
16176c0f13dc1bd1ba4645954de06884c9f6f2c1 | 7964a53ada1c109f96c78ee720fd3827c3c34ae3 | /basics.h | a724dacc832575847546bc03eeaa536b58ba415f | [] | no_license | tobiasbuescher/Source-code | 777fa221c6ee102566a41130447e5775819a96f9 | e4e8d05ad2ae9b19a15a6bcf7a74acf8a4b4d564 | refs/heads/master | 2021-01-11T21:05:20.711749 | 2017-01-25T10:55:14 | 2017-01-25T10:55:14 | 79,242,765 | 0 | 1 | null | 2017-01-25T09:10:09 | 2017-01-17T15:40:59 | C++ | UTF-8 | C++ | false | false | 17,807 | h | basics.h | /* basics.h */
//////////////////////////////////////////
// basic types and functions //
// definitions //
//////////////////////////////////////////
#ifndef __BASICS_H_
#define __BASICS_H_
#include <iostream>
#include <fstream>
#include <limits>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include "parameter.h"
#include "shutdown.h"
#define MIN(x,y) (((x)<(y))?(x):(y))
#define MAX(x,y) (((x)>(y))?(x):(y))
////////////////////////////////////
// inline function definitions //
////////////////////////////////////
////////////////////////////////////
// double _nearbyint(...)
// ---------------
// wrap around replacing nearbyint, round to next integer
// Commented version does not honnor the IEEE754 round to even
// in case of fraction exactly = .5, this needs special care
// Uncommented version does include this rule!
// ===
// Parameters:
// double x: number to be rounded
// ===
// Returns:
// double: next integer to x
/*inline double _nearbyint(double x)
{
if (x >= 0.)
return (long)(x+0.5);
else
return (long)(x-0.5);
}*/
inline double _nearbyint(double x)
{
double d = x - ((long)x);
if (d == 0.5) { // special case
long l = (long)(x-d);
return l+(l%2);
}
if (d == -0.5) {
long l = (long)(x-d);
return l+(l%2);
}
if (x>= 0.)
return (long)(x+0.5);
else
return (long)(x-0.5);
}
////////////////////////////////////
// double _floor(...)
// ---------------
// wrap around replacing floor
// Note: this will obviously fail for x larger/smaller
// than max(int)/min(int) (causes overflow)
// However, such values are anyway "unphysical" and thus wrong
// (for a cell size of 1um, max(int) would be in the order of km)
// ===
// Parameters:
// double x: number to be floored
// ===
// Returns:
// int: floor integer to x
inline int _floor(double x)
{
if (x >= 0.)
return ((int)x);
else {
double d = x - (double)((int)x);
if (d != 0.)
return (((int)x)-1);
else // this would result in _floor(-4.)=-5 without the above if...
return ((int)x);
}
}
////////////////////////////////////
// double _ceil(...)
// ---------------
// wrap around replacing ceil
// Note: this will obviously fail for x larger/smaller
// than max(int)/min(int) (causes overflow)
// However, such values are anyway "unphysical" and thus wrong
// (for a cell size of 1um, max(int) would be in the order of km)
// ===
// Parameters:
// double x: number to be ceiled
// ===
// Returns:
// int: ceil integer to x
inline int _ceil(double x)
{
if (x < 0.)
return ((int)x);
else {
double d = x - (double)((int)x);
if (d != 0.)
return (((int)x)+1);
else // this would result in _ceil(4.)=5 without the above if...
return ((int)x);
}
}
/////////////////////////////////////////
// Time measurement defines
#ifdef __DEBUG_TIMER
#include <sys/time.h>
#define INIT_TIMERS { for (int __i = 0; __i < NUM_TIMERS; ++__i) \
{ tv_usec[__i] = tv_count[__i] = tv_run[__i] = 0;} tv_used = 0; }
#define SET_TIMER(x, y) { strncpy(tv_desc[(x)], (y), TIMER_DESC_SIZE); tv_desc[(x)][TIMER_DESC_SIZE-1] = 0x00; tv_used++;}
#define START_TIMER(x) { tv_run[(x)] = 1; gettimeofday(&(tv[(x)]), NULL); }
#define STOP_TIMER(x) { if (tv_run[(x)] == 1) { tv_run[(x)] = 0; __dtmp_s = tv[(x)].tv_sec;\
__dtmp_us = tv[(x)].tv_usec; gettimeofday(&(tv[(x)]), NULL); __dtmp_s = tv[(x)].tv_sec - __dtmp_s;\
__dtmp_s *= 1000000; tv_usec[(x)] += __dtmp_s;\
tv_usec[(x)] += (unsigned long)tv[(x)].tv_usec-(unsigned long)__dtmp_us; tv_count[(x)]++; }}
#define ISRUNNING_TIMER(x) { tv_run[(x)]}
#define OUTPUT_TIMERDATA(x) {\
ofstream fout((x), ios::trunc);\
if (!fout) {\
cerr << "Error while fopen((x))" << endl;\
return (-1);\
}\
struct timeval tv_tmp0;\
unsigned long tv_tmp_usec0 = tv_usec[0];\
unsigned long tv_tmp_count0;\
__dtmp_s = tv[0].tv_sec;\
__dtmp_us = tv[0].tv_usec;\
gettimeofday(&tv_tmp0, NULL);\
__dtmp_s = tv_tmp0.tv_sec - __dtmp_s;\
__dtmp_s *= 1000000;\
tv_tmp_usec0 += __dtmp_s;\
tv_tmp_usec0 += (unsigned long)tv_tmp0.tv_usec-(unsigned long)__dtmp_us;\
tv_tmp_count0 = tv_count[0]+1;\
fout << "0" << "\t" << tv_tmp_usec0 << "\t" << tv_tmp_count0 << "\t" << ((double)tv_tmp_usec0)/tv_tmp_count0\
<< "\t\t" << (double)tv_tmp_usec0/tv_tmp_usec0*100. << "\t" << tv_desc[0] << endl;\
for (unsigned int __i = 1; __i < tv_used; ++__i) {\
if (tv_run[__i]) {\
struct timeval tv_tmp;\
unsigned long tv_tmp_usec = tv_usec[__i];\
unsigned long tv_tmp_count;\
__dtmp_s = tv[__i].tv_sec;\
__dtmp_us = tv[__i].tv_usec;\
gettimeofday(&tv_tmp, NULL);\
__dtmp_s = tv_tmp.tv_sec - __dtmp_s;\
__dtmp_s *= 1000000;\
tv_tmp_usec += __dtmp_s;\
tv_tmp_usec += (unsigned long)tv_tmp.tv_usec-(unsigned long)__dtmp_us;\
tv_tmp_count = tv_count[__i]+1;\
fout << __i << "\t" << setw(16) << tv_tmp_usec << setw(12) << tv_tmp_count\
<< setw(12) << ((double)tv_tmp_usec)/tv_tmp_count << setw(16) << (double)tv_tmp_usec/tv_tmp_usec0*100.\
<< "\t" << tv_desc[__i] << endl;\
}\
else {\
fout << __i << "\t" << setw(16) << tv_usec[__i] << setw(12) << tv_count[__i]\
<< setw(12) << ((double)tv_usec[__i])/tv_count[__i] << setw(16) << (double)tv_usec[__i]/tv_tmp_usec0*100.\
<< "\t" << tv_desc[__i] << endl;\
}\
}\
fout.close(); }
#else
#define INIT_TIMERS {}
#define SET_TIMER(x, y) {}
#define START_TIMER(x) {}
#define STOP_TIMER(x) {}
#endif
//////////////////////////////////////////////////
// which indices form a cell:
// with i even, i and i+1 form one cell
#define __SAMECELL(i, j) ( labs((i)-(j)) < _pperc && (int)((i)/_pperc) == (int)((j)/_pperc) )
#define __GETOTHERCELLPART(i) (__SAMECELL(i,i+1)?i+1:i-1)
#define POW(x) ((x)*(x))
//////////////////////////////////////
// calculate norm of vector (for readability)
#define NORMSQ(x, y, z) ( ( ((x)*(x)) + ((y)*(y)) + ((z)*(z)) ) )
#define NORM(x, y, z) ( sqrt( NORMSQ((x), (y), (z)) ) )
//////////////////////////////////////
// get __index from particle positions
#ifdef RECTANGULAR
#ifdef MEASUREINS
#define GET__INDEX(i,s) ((int)( (dens_maxz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)/(s) ))
#define GET__INDEX_P(k,s) ((int)((dens_p_maxz-_rz[(k)])/(s) ))
#define GET_REALFLUX_CRZ(i) (dens_maxz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)
#elif defined (MEASUREINR)
#define GET__INDEX(i,s) ((int)(foldz((_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)/(s) ))
#define GET__INDEX_P(k,s) ((int)((foldz(_rz[(k)]))/(s) ))
#define GET_REALFLUX_CRZ(i) (foldz((_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.))
#endif
#elif defined (SPHERICAL)
#ifdef MEASUREINS
#define GET__INDEX(i,s) ((int)( (dens_maxz - NORM(\
(dens_com_rx-(_rx[(i)*_pperc]+_rx[(i)*_pperc+1])/2.),\
(dens_com_ry-(_ry[(i)*_pperc]+_ry[(i)*_pperc+1])/2.),\
(dens_com_rz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)\
))/(s) ))
#define GET__INDEX_P(k,s) ((int)( (dens_p_maxz - NORM(\
(dens_com_rx-_rx[(k)]),\
(dens_com_ry-_ry[(k)]),\
(dens_com_rz-_rz[(k)])\
))/(s) ))
#define GET_REALFLUX_CRZ(i) ( NORM(\
(dens_com_rx-(_rx[(i)*_pperc]+_rx[(i)*_pperc+1])/2.),\
(dens_com_ry-(_ry[(i)*_pperc]+_ry[(i)*_pperc+1])/2.),\
(dens_com_rz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)\
) )
#elif defined (MEASUREINR)
#define GET__INDEX(i,s) ((int)( (NORM(\
(dens_com_rx-(_rx[(i)*_pperc]+_rx[(i)*_pperc+1])/2.),\
(dens_com_ry-(_ry[(i)*_pperc]+_ry[(i)*_pperc+1])/2.),\
(dens_com_rz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)\
))/(s) ))
#define GET__INDEX_P(k,s) ((int)( (NORM(\
(dens_com_rx-_rx[(k)]),\
(dens_com_ry-_ry[(k)]),\
(dens_com_rz-_rz[(k)])\
))/(s) ))
#define GET_REALFLUX_CRZ(i) ( NORM(\
(dens_com_rx-(_rx[(i)*_pperc]+_rx[(i)*_pperc+1])/2.),\
(dens_com_ry-(_ry[(i)*_pperc]+_ry[(i)*_pperc+1])/2.),\
(dens_com_rz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)\
) )
#endif
#elif defined (ZYLINDRICAL)
#ifdef MEASUREINR
#define GET__INDEX_R(i,s) ((int)( (NORM(\
(dens_com_rx-(_rx[(i)*_pperc]+_rx[(i)*_pperc+1])/2.),\
(dens_com_ry-(_ry[(i)*_pperc]+_ry[(i)*_pperc+1])/2.),\
(0.)\
))/(s) ))
#define GET__INDEX_Z(i,s) ((int)(foldz((_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)/(s) ))
#define GET__INDEX_P_R(k,s) ((int)( (NORM(\
(dens_com_rx-_rx[(k)]),\
(dens_com_ry-_ry[(k)]),\
(0.)\
))/(s) ))
#define GET__INDEX_P_Z(k,s) ((int)((foldz(_rz[(k)]))/(s) ))
#define GET_REALFLUX_CRZ(i) (foldz((_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.))
#elif defined (MEASUREINS)
#define GET__INDEX_R(i,s) ((int)(dens_maxr- (NORM(\
(dens_com_rx-(_rx[(i)*_pperc]+_rx[(i)*_pperc+1])/2.),\
(dens_com_ry-(_ry[(i)*_pperc]+_ry[(i)*_pperc+1])/2.),\
(0.)\
))/(s) ))
#define GET__INDEX_Z(i,s) ((int)( (dens_maxz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)/(s) ))
#define GET__INDEX_P_R(k,s) ((int)(dens_p_maxr- (NORM(\
(dens_com_rx-_rx[(k)]),\
(dens_com_ry-_ry[(k)]),\
(0.)\
))/(s) ))
#define GET__INDEX_P_Z(k,s) ((int)((dens_p_maxz-_rz[(k)])/(s) ))
#define GET_REALFLUX_CRZ(i) (dens_maxz-(_rz[(i)*_pperc]+_rz[(i)*_pperc+1])/2.)
#endif
#endif // ifdef RECTANGULAR
//////////////////////////////////////
// calculate theta (either w respect to e_z or r_com)
#if (defined (RECTANGULAR) || defined (ZYLINDRICAL) )
#define CALC_THETA(x1, y1, z1, x2, y2, z2) (\
fabs(z1)/NORM(x1, y1, z1)\
)
#elif defined (SPHERICAL)
#define CALC_THETA(x1, y1, z1, x2, y2, z2) (\
fabs( (((x1)*(x2)) + ((y1)*(y2)) + \
((z1)*(z2)))/(NORM(x1, y1, z1)*NORM(x2, y2, z2)) )\
)
#endif
//////////////////////////////////////////////////
// error value defines //
//////////////////////////////////////////////////
/////////////////////////////////////
// load_dump()
#define ERRNO_FDUMP_OPEN 0x01
#define ERRNO_INITSIZE_TOO_SMALL 0x02
#define ERRNO_MAXSPECNUM_TOO_SMALL 0x03
#define ERRNO_DIFFERING_BC 0x04
#define ERRNO_WARN_NO_PREV_PMEAS 0x05
#define ERRNO_WARN_PREV_PMEAS 0x06
#define ERRNO_MEM_ALLOC 0x07
#define ERRNO_WARN_SDIV_OVERFLOW 0x08
#define ERRNO_UNKNOWN 0x09
#define ERRNO_URANDOM 0x0A
/**********************************************************************\
|* Demonstration program to compute the 32-bit CRC used as the frame *|
|* check sequence in ADCCP (ANSI X3.66, also known as FIPS PUB 71 *|
|* and FED-STD-1003, the U.S. versions of CCITT's X.25 link-level *|
|* protocol). The 32-bit FCS was added via the Federal Register, *|
|* 1 June 1982, p.23798. I presume but don't know for certain that *|
|* this polynomial is or will be included in CCITT V.41, which *|
|* defines the 16-bit CRC (often called CRC-CCITT) polynomial. FIPS *|
|* PUB 78 says that the 32-bit FCS reduces otherwise undetected *|
|* errors by a factor of 10^-5 over 16-bit FCS. *|
\**********************************************************************/
/* Need an unsigned type capable of holding 32 bits; */
typedef unsigned char BYTE;
typedef unsigned int DWORD;
typedef unsigned short WORD;
typedef DWORD UNS_32_BITS;
/* Copyright (C) 1986 Gary S. Brown. You may use this program, or
code or tables extracted from it, as desired without restriction.*/
/* First, the polynomial itself and its table of feedback terms. The */
/* polynomial is */
/* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */
/* Note that we take it "backwards" and put the highest-order term in */
/* the lowest-order bit. The X^32 term is "implied"; the LSB is the */
/* X^31 term, etc. The X^0 term (usually shown as "+1") results in */
/* the MSB being 1. */
/* Note that the usual hardware shift register implementation, which */
/* is what we're using (we're merely optimizing it by doing eight-bit */
/* chunks at a time) shifts bits into the lowest-order term. In our */
/* implementation, that means shifting towards the right. Why do we */
/* do it this way? Because the calculated CRC must be transmitted in */
/* order from highest-order term to lowest-order term. UARTs transmit */
/* characters in order from LSB to MSB. By storing the CRC this way, */
/* we hand it to the UART in the order low-byte to high-byte; the UART */
/* sends each low-bit to hight-bit; and the result is transmission bit */
/* by bit from highest- to lowest-order term without requiring any bit */
/* shuffling on our part. Reception works similarly. */
/* The feedback terms table consists of 256, 32-bit entries. Notes: */
/* */
/* 1. The table can be generated at runtime if desired; code to do so */
/* is shown later. It might not be obvious, but the feedback */
/* terms simply represent the results of eight shift/xor opera- */
/* tions for all combinations of data and CRC register values. */
/* */
/* 2. The CRC accumulation logic is the same for all CRC polynomials, */
/* be they sixteen or thirty-two bits wide. You simply choose the */
/* appropriate table. Alternatively, because the table can be */
/* generated at runtime, you can start by generating the table for */
/* the polynomial in question and use exactly the same "updcrc", */
/* if your application needn't simultaneously handle two CRC */
/* polynomials. (Note, however, that XMODEM is strange.) */
/* */
/* 3. For 16-bit CRCs, the table entries need be only 16 bits wide; */
/* of course, 32-bit entries work OK if the high 16 bits are zero. */
/* */
/* 4. The values must be right-shifted by eight bits by the "updcrc" */
/* logic; the shift must be unsigned (bring in zeroes). On some */
/* hardware you could probably optimize the shift in assembler by */
/* using byte-swap instructions. */
const UNS_32_BITS crc_32_tab[] = { /* CRC polynomial 0xedb88320 */
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
DWORD crc32buf(char *, unsigned long);
int allocate_init_arrays();
double get_ran_gaussian(int);
double get_ran_gaussian(int, double, double);
unsigned long get_seed();
#endif
|
305d65b5e463c1b7a87558c3786a4e6e3128dcc9 | 9a32178d3c2fdf377d84f65b55989264e67f40e9 | /2002/ALL VC SAMPLES/MFC/advanced/fire/firedlg.cpp | 40bf00d757c5f6382a85b953a0e799aed10222cd | [] | no_license | philipwolfe/Samples | 5e5cc1376575ac6361b62a3554c98626f153b694 | 7eb703287a6d07596a141c4557f271efe6c1666f | refs/heads/master | 2021-12-25T12:52:52.616313 | 2021-12-19T04:26:29 | 2021-12-19T04:26:29 | 250,445,305 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 10,884 | cpp | firedlg.cpp | // firedlg.cpp : implementation file
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#include "stdafx.h"
#include "fire.h"
#include "firedlg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// Implementation
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//{{AFX_MSG(CAboutDlg)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg message handlers
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CenterWindow();
return TRUE; // return TRUE unless you set the focus to a control
}
/////////////////////////////////////////////////////////////////////////////
// CFireDlg dialog
CFireDlg::CFireDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFireDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFireDlg)
m_nSetting = 0;
//}}AFX_DATA_INIT
m_nSettingMin = 0;
m_nSettingMax = 0;
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CFireDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFireDlg)
DDX_Control(pDX, IDC_SETTINGCTRL, m_SettingCtrl);
DDX_Control(pDX, IDC_SETTING, m_Setting);
DDX_Control(pDX, IDC_APPLY, m_Apply);
DDX_Control(pDX, IDC_PROPERTY, m_Property);
DDX_Control(pDX, IDC_HEIGHT, m_Height);
DDX_Control(pDX, IDC_COLOR, m_Color);
DDX_Control(pDX, IDC_BURN, m_Burn);
DDX_Control(pDX, IDC_FIRE, m_FireWnd);
DDX_Text(pDX, IDC_SETTING, m_nSetting);
DDV_MinMaxInt(pDX, m_nSetting, m_nSettingMin, m_nSettingMax);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFireDlg, CDialog)
//{{AFX_MSG_MAP(CFireDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_APPLY, OnApply)
ON_NOTIFY(TVN_SELCHANGED, IDC_PROPERTY, OnPropertySelchanged)
ON_NOTIFY(TCN_SELCHANGE, IDC_COLOR, OnColorSelchange)
ON_WM_DESTROY()
ON_WM_TIMER()
ON_EN_CHANGE(IDC_SETTING, OnSettingChange)
ON_WM_ACTIVATE()
ON_WM_VSCROLL()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFireDlg message handlers
BOOL CFireDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CenterWindow();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
m_FireWnd.InitFire(CFireWnd::red);
TC_ITEM TabCtrlItem;
TabCtrlItem.mask = TCIF_TEXT;
TabCtrlItem.pszText = "Wood";
m_Color.InsertItem( 0, &TabCtrlItem );
TabCtrlItem.pszText = "Natural Gas";
m_Color.InsertItem( 1, &TabCtrlItem );
TabCtrlItem.pszText = "Kryptonite";
m_Color.InsertItem( 2, &TabCtrlItem );
m_Height.SetRange(1, 100);
m_Height.SetTicFreq(10);
m_Height.SetPos(25);
m_Burn.SetRange( 0, 100 );
m_Burn.SetPos( 25 );
m_SettingCtrl.SetRange( 0, 100 );
m_SettingCtrl.SetBase( 10 );
m_SettingCtrl.SetPos( 0 );
TV_INSERTSTRUCT TreeCtrlItem;
TreeCtrlItem.hParent = TVI_ROOT;
TreeCtrlItem.hInsertAfter = TVI_LAST;
TreeCtrlItem.item.mask = TVIF_TEXT | TVIF_PARAM;
TreeCtrlItem.item.pszText = "Fire";
TreeCtrlItem.item.lParam = 0;
HTREEITEM hTreeItem1 = m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.hParent = hTreeItem1;
TreeCtrlItem.item.pszText = "Decay";
TreeCtrlItem.item.lParam = 1;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.item.pszText = "Flammability";
TreeCtrlItem.item.lParam = 2;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.item.pszText = "Maximum Heat";
TreeCtrlItem.item.lParam = 3;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.item.pszText = "Spread Rate";
TreeCtrlItem.item.lParam = 4;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.item.pszText = "Size";
TreeCtrlItem.item.lParam = 5;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.hParent = TVI_ROOT;
TreeCtrlItem.item.pszText = "Render";
TreeCtrlItem.item.lParam = 0;
HTREEITEM hTreeItem2 = m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.hParent = hTreeItem2;
TreeCtrlItem.item.pszText = "Smoothness";
TreeCtrlItem.item.lParam = 6;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.item.pszText = "Distribution";
TreeCtrlItem.item.lParam = 7;
m_Property.InsertItem(&TreeCtrlItem);
TreeCtrlItem.item.pszText = "Chaos";
TreeCtrlItem.item.lParam = 8;
m_Property.InsertItem(&TreeCtrlItem);
m_Property.Expand(hTreeItem1,TVE_EXPAND);
m_Property.Expand(hTreeItem2,TVE_EXPAND);
m_uTimerID = (UINT)SetTimer(0x451,33,NULL);
m_Apply.EnableWindow( FALSE );
return TRUE; // return TRUE unless you set the focus to a control
}
void CFireDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CFireDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CFireDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CFireDlg::OnColorSelchange(NMHDR* /*pNMHDR*/, LRESULT* pResult)
{
int nColor = m_Color.GetCurSel();
switch(nColor)
{
case 0:
m_FireWnd.InitFire(CFireWnd::red);
break;
case 1:
m_FireWnd.InitFire(CFireWnd::blue);
break;
case 2:
m_FireWnd.InitFire(CFireWnd::green);
break;
}
*pResult = 0;
}
void CFireDlg::OnSettingChange()
{
if (m_Apply.m_hWnd != NULL)
m_Apply.EnableWindow();
}
void CFireDlg::OnPropertySelchanged(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
switch(pNMTreeView->itemNew.lParam)
{
case 0:
m_nSetting = 0;
m_nSettingMin = 0;
m_nSettingMax = 0;
break;
case 1:
m_nSetting = m_FireWnd.m_nDecay;
m_nSettingMin = 1;
m_nSettingMax = 100;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
case 2:
m_nSetting = m_FireWnd.m_nFlammability;
m_nSettingMin = 1;
m_nSettingMax = 399;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
case 3:
m_nSetting = m_FireWnd.m_nMaxHeat;
m_nSettingMin = 0;
m_nSettingMax = 223;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
case 4:
m_nSetting = m_FireWnd.m_nSpreadRate;
m_nSettingMin = 1;
m_nSettingMax = 100;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
case 5:
{
CSize size = m_FireWnd.GetBitmapSize();
m_nSetting = m_FireWnd.m_nSize;
m_nSettingMin = 40;
m_nSettingMax = size.cx;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
}
break;
case 6:
m_nSetting = m_FireWnd.m_nSmoothness;
m_nSettingMin = 0;
m_nSettingMax = 5;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
case 7:
m_nSetting = m_FireWnd.m_nDistribution;
m_nSettingMin = 0;
m_nSettingMax = 10;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
case 8:
m_nSetting = m_FireWnd.m_nChaos;
m_nSettingMin = 1;
m_nSettingMax = 100;
m_SettingCtrl.SetRange((short)m_nSettingMin, (short)m_nSettingMax);
break;
}
if(pNMTreeView->itemNew.lParam == 0)
{
UpdateData(FALSE);
m_Apply.EnableWindow(FALSE);
m_Setting.EnableWindow(FALSE);
m_SettingCtrl.EnableWindow(FALSE);
}
else
{
UpdateData(FALSE);
m_Setting.EnableWindow();
m_SettingCtrl.EnableWindow();
}
*pResult = 0;
}
void CFireDlg::OnApply()
{
if (!UpdateData())
return;
HTREEITEM hTreeItem = m_Property.GetSelectedItem();
TV_ITEM TreeCtrlItem;
TreeCtrlItem.mask = TVIF_HANDLE | TVIF_PARAM;
TreeCtrlItem.hItem = hTreeItem;
m_Property.GetItem(&TreeCtrlItem);
switch(TreeCtrlItem.lParam)
{
case 0:
m_nSetting = 0;
break;
case 1:
m_FireWnd.m_nDecay = m_nSetting;
break;
case 2:
m_FireWnd.m_nFlammability = m_nSetting;
break;
case 3:
m_FireWnd.m_nMaxHeat = m_nSetting;
break;
case 4:
m_FireWnd.m_nSpreadRate = m_nSetting;
break;
case 5:
m_FireWnd.m_nSize = m_nSetting;
break;
case 6:
m_FireWnd.m_nSmoothness = m_nSetting;
break;
case 7:
m_FireWnd.m_nDistribution = m_nSetting;
break;
case 8:
m_FireWnd.m_nChaos = m_nSetting;
break;
}
m_Apply.EnableWindow( FALSE );
}
void CFireDlg::OnDestroy()
{
CDialog::OnDestroy();
KillTimer(m_uTimerID);
}
void CFireDlg::OnTimer(UINT nIDEvent)
{
CDialog::OnTimer(nIDEvent);
m_FireWnd.RenderFlame();
m_FireWnd.PaintFlame();
if ((rand() % 10) == 0)
m_Burn.SetPos( rand() % 100 );
// Eat spurious WM_TIMER messages
MSG msg;
while(::PeekMessage(&msg, m_hWnd, WM_TIMER, WM_TIMER, PM_REMOVE));
}
void CFireDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
CDialog::OnActivate(nState, pWndOther, bMinimized);
m_FireWnd.SendMessage(WM_QUERYNEWPALETTE); // redo the palette if necessary
}
void CFireDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
m_FireWnd.SetMaxBurn(100 - m_Height.GetPos());
CDialog::OnVScroll(nSBCode, nPos, pScrollBar);
}
|
d57019523876d5722a04d88803e9c8add29de2ac | dd1e8c0c9afcfa519046f7a240a65b6e3d3d55c3 | /search/DFS/UVA620.cpp | 3d8639be73a377ca5ffc7198884c3b38231ee056 | [] | no_license | LYoGA/ACM | 654db40e5d15b442777b097dbac1260d77444849 | b5bccef4b61648471c533671b520fdb83eeff7d6 | refs/heads/master | 2021-01-23T12:05:31.973037 | 2014-12-14T12:25:19 | 2014-12-14T12:25:19 | 12,356,200 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 918 | cpp | UVA620.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
const int MAXN = 105;
char str[MAXN];
int dfs(int b, int e) {
if (b == e && str[b] == 'A')
return 1;
if (e - b >= 1 && str[e] == 'A' && dfs(b, e - 1))
return 1;
if (e - b >= 2 && str[e] == 'B' && str[e - 1] == 'A' && dfs(b, e - 2))
return 2;
if (e - b >= 2 && str[b] == 'B' && str[e] == 'A' && dfs(b + 1, e - 1))
return 3;
return 0;
}
int main() {
int cas;
scanf("%d", &cas);
while (cas--) {
scanf("%s", str);
int len = strlen(str);
int ans = dfs(0, len - 1);
if (ans == 1)
printf("SIMPLE\n");
else if (ans == 2)
printf("FULLY-GROWN\n");
else if (ans == 3)
printf("MUTAGENIC\n");
else
printf("MUTANT\n");
}
return 0;
}
|
ad55fe7eea5938e3d7595045918574e6aa912644 | b3c47795e8b6d95ae5521dcbbb920ab71851a92f | /Leetcode/Algorithm/cpp/00542-01 Matrix.cc | 966a7375ab3f5b7eba1dede107e331997326b7f6 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Wizmann/ACM-ICPC | 6afecd0fd09918c53a2a84c4d22c244de0065710 | 7c30454c49485a794dcc4d1c09daf2f755f9ecc1 | refs/heads/master | 2023-07-15T02:46:21.372860 | 2023-07-09T15:30:27 | 2023-07-09T15:30:27 | 3,009,276 | 51 | 23 | null | null | null | null | UTF-8 | C++ | false | false | 1,342 | cc | 00542-01 Matrix.cc | const int INF = 0x3f3f3f3f;
const int my[] = {-1, 0, 1, 0};
const int mx[] = {0, 1, 0, -1};
struct MyPoint {
int x, y;
};
class Solution {
public:
vector<vector<int>> updateMatrix(vector<vector<int>>& matrix) {
n = matrix.size();
if (n == 0) {
return res;
}
m = matrix[0].size();
if (m == 0) {
return res;
}
res = vector<vector<int> >(n, vector<int>(m, INF));
queue<MyPoint> q;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (matrix[i][j] == 0) {
res[i][j] = 0;
q.push({j, i});
}
}
}
while (!q.empty()) {
auto p = q.front();
q.pop();
for (int i = 0; i < 4; i++) {
int ny = p.y + my[i];
int nx = p.x + mx[i];
if (0 <= ny && ny < n && 0 <= nx && nx < m) {
if (res[ny][nx] > res[p.y][p.x] + 1) {
res[ny][nx] = res[p.y][p.x] + 1;
q.push({nx, ny});
}
}
}
}
return res;
}
private:
int n, m;
vector<vector<int> > res;
};
|
b64b2fcbc0837aaba97269c4479001f924785301 | 14aa98620601084d587c99bfefe80cba5affb82b | /src/src_c/Fields/Pimpact_ModeField.hpp | ef19ecd7be09cde2936e20d939903255fc5ca934 | [
"MIT"
] | permissive | huppd/PINTimpact | fe810576ab407b1f16e435b897710ea9b662701a | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | refs/heads/master | 2021-05-05T13:59:22.848668 | 2018-06-26T13:21:53 | 2018-06-26T13:21:53 | 105,018,801 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,242 | hpp | Pimpact_ModeField.hpp | /// Pimpact
/// \author huppd
/// \date 2018
#pragma once
#ifndef PIMPACT_MODEFIELD_HPP
#define PIMPACT_MODEFIELD_HPP
#include <vector>
#include <iostream>
#include "mpi.h"
#include "Teuchos_ArrayRCP.hpp"
#include "Teuchos_RCP.hpp"
#include "Teuchos_ScalarTraitsDecl.hpp"
#include "Teuchos_SerialDenseMatrix.hpp"
#include "BelosTypes.hpp"
#include "Pimpact_AbstractField.hpp"
namespace Pimpact {
/// \brief important basic Vector class
/// vector for wrapping 2 fields into one mode
/// \ingroup Field
template<class IFT>
class ModeField : private AbstractField<typename IFT::GridT> {
public:
using GridT = typename IFT::GridT;
protected:
using ST = typename GridT::Scalar;
using OT = typename GridT::Ordinal;
using ScalarArray = ST*;
using AF = AbstractField<GridT>;
const Owning owning_;
IFT fieldc_;
IFT fields_;
ScalarArray s_;
private:
void allocate() {
OT n = getStorageSize();
setStoragePtr(new ST[n]);
std::uninitialized_fill_n(s_, n , 0.);
}
public:
constexpr OT getStorageSize() {
return fieldc_.getStorageSize() + fields_.getStorageSize();
}
constexpr ST* getRawPtr() {
return s_;
}
void setStoragePtr(ST* array) {
s_ = array;
fieldc_.setStoragePtr(s_);
fields_.setStoragePtr(s_ + fieldc_.getStorageSize());
}
ModeField(const Teuchos::RCP<const GridT>& grid, const Owning owning=Owning::Y):
AF(grid),
owning_(owning),
fieldc_(grid, Owning::N),
fields_(grid, Owning::N) {
if(owning_==Owning::Y) allocate();
};
/// \brief copy constructor.
///
/// shallow copy, because of efficiency and conistency with \c Pimpact::MultiField
/// \param vF
/// \param copyType by default a ECopy::Shallow is done but allows also to deepcopy the field
ModeField(const ModeField& vF, const ECopy copyType=ECopy::Deep):
AF(vF.grid()),
owning_(vF.owning_),
fieldc_(vF.fieldc_, copyType),
fields_(vF.fields_, copyType) {
if(owning_==Owning::Y) {
allocate();
switch(copyType) {
case ECopy::Shallow:
break;
case ECopy::Deep:
*this = vF;
break;
}
}
};
~ModeField() {
if(owning_==Owning::Y) delete[] s_;
}
Teuchos::RCP<ModeField> clone(const ECopy cType=ECopy::Deep) const {
Teuchos::RCP<ModeField> mv = Teuchos::rcp(new ModeField(grid()));
switch(cType) {
case ECopy::Shallow:
break;
case ECopy::Deep:
*mv = *this;
break;
}
return mv;
}
/// \name Attribute methods
/// \{
IFT& getCField() {
return fieldc_;
}
IFT& getSField() {
return fields_;
}
constexpr const IFT& getCField() {
return fieldc_;
}
constexpr const IFT& getSField() {
return fields_;
}
constexpr const Teuchos::RCP<const GridT>& grid() {
return AF::grid_;
}
constexpr const MPI_Comm& comm() {
return fieldc_.comm();
}
/// \brief returns the length of Field.
constexpr OT getLength() {
return fieldc_.getLength() + fields_.getLength();
}
/// \}
/// \name Update methods
/// \{
/// \brief Replace \c this with \f$\alpha a + \beta b\f$.
void add(const ST alpha, const ModeField& a, const ST beta, const ModeField& b,
const B wb=B::Y) {
fieldc_.add(alpha, a.fieldc_, beta, b.fieldc_, wb);
fields_.add(alpha, a.fields_, beta, b.fields_, wb);
}
/// \brief Put element-wise absolute values of source vector \c y into this
/// vector.
///
/// Here x represents this vector, and we update it as
/// \f[ x_i = | y_i | \quad \mbox{for } i=1, \dots, n \f]
/// \return Reference to this object
void abs(const ModeField& y) {
fieldc_.abs(y.fieldc_);
fields_.abs(y.fields_);
}
/// \brief Put element-wise reciprocal of source vector \c y into this vector.
///
/// Here x represents this vector, and we update it as
/// \f[ x_i = \frac{1}{y_i} \quad \mbox{for } i=1, \dots, n \f]
/// \return Reference to this object
void reciprocal(const ModeField& y) {
fieldc_.reciprocal(y.fieldc_);
fields_.reciprocal(y.fields_);
}
/// \brief Scale each element of the vectors in \c this with \c alpha.
void scale(const ST alpha, const B wB=B::Y) {
fieldc_.scale(alpha, wB);
fields_.scale(alpha, wB);
}
/// \brief Scale this vector <em>element-by-element</em> by the vector a.
///
/// Here x represents this vector, and we update it as
/// \f[ x_i = x_i \cdot a_i \quad \mbox{for } i=1, \dots, n \f]
/// \return Reference to this object
void scale(const ModeField& a) {
fieldc_.scale(a.fieldc_);
fields_.scale(a.fields_);
}
/// \brief Compute a scalar \c b, which is the dot-product of \c a and \c this, i.e.\f$b = a^H this\f$.
constexpr ST dotLoc(const ModeField& a) {
ST b=0.;
b = fieldc_.dotLoc(a.fieldc_) + fields_.dotLoc(a.fields_);
return b;
}
/// \brief Compute/reduces a scalar \c b, which is the dot-product of \c y and \c this, i.e.\f$b = y^H this\f$.
constexpr ST dot(const ModeField& y) {
return this->reduce(comm(), dotLoc(y));
}
/// \}
/// \name Norm method
/// \{
constexpr ST normLoc(ENorm type=ENorm::Two) {
ST normvec =
(ENorm::Inf==type)?
std::fmax(fieldc_.normLoc(type), fields_.normLoc(type)):
(fieldc_.normLoc(type) + fields_.normLoc(type));
return normvec;
}
/// \brief compute the norm
/// \return by default holds the value of \f$||this||_2\f$, or in the specified norm.
constexpr ST norm(const ENorm type=ENorm::Two) {
ST normvec = this->reduce(comm(), normLoc(type),
(ENorm::Inf==type)?MPI_MAX:MPI_SUM);
normvec = (ENorm::Two==type||ENorm::L2==type) ?
std::sqrt(normvec) :
normvec;
return normvec;
}
/// \brief Weighted 2-Norm.
///
/// Here x represents this vector, and we compute its weighted norm as follows:
/// \f[ \|x\|_w = \sqrt{\sum_{i=1}^{n} w_i \; x_i^2} \f]
/// \return \f$ \|x\|_w \f$
constexpr ST normLoc(const ModeField& weights) {
return fieldc_.normLoc(weights.fieldc_) + fields_.normLoc(weights.fields_);
}
/// \brief Weighted 2-Norm.
///
/// \warning untested
/// Here x represents this vector, and we compute its weighted norm as follows:
/// \f[ \|x\|_w = \sqrt{\sum_{i=1}^{n} w_i \; x_i^2} \f]
/// \return \f$ \|x\|_w \f$
constexpr ST norm(const ModeField& weights) {
return std::sqrt(this->reduce(comm(), normLoc(weights)));
}
/// \}
/// \name Initialization methods
/// \{
/// \brief *this := a
/// Assign (deep copy) A into mv.
ModeField& operator=(const ModeField& a) {
fieldc_ = a.fieldc_;
fields_ = a.fields_;
return *this;
}
/// \brief Replace the vectors with a random vectors.
void random(bool useSeed=false, const B bcYes=B::Y, int seed=1) {
fieldc_.random(useSeed, bcYes, seed);
fields_.random(useSeed, bcYes, seed);
}
/// \brief Replace each element of the vector with \c alpha.
void init(const ST alpha = Teuchos::ScalarTraits<ST>::zero(), const B wB=B::Y) {
fieldc_.init(alpha, wB);
fields_.init(alpha, wB);
}
void extrapolateBC(const Belos::ETrans trans=Belos::NOTRANS) {
fieldc_.extrapolateBC(trans);
fields_.extrapolateBC(trans);
}
void level() const {
fieldc_.level();
fields_.level();
}
void changed() const {
fieldc_.changed();
fields_.changed();
}
/// \}
/// Print the vector. To be used for debugging only.
void print(std::ostream& out=std::cout) const {
fieldc_.print(out);
fields_.print(out);
}
void write(const int count=0, const bool restart=false) const {
fieldc_.write(count, restart);
fields_.write(count+1, restart);
}
void read(const int count=0) {
fieldc_.read(count);
fields_.read(count+1);
}
/// \name comunication methods.
/// \brief highly dependent on underlying storage should only be used by Operator or on top field implementer.
///
/// \{
void exchange() const {
fieldc_.exchange();
fields_.exchange();
}
void setExchanged() const {
fieldc_.setExchanged();
fields_.setExchanged();
}
/// \}
}; // end of class ModeField
} // end of namespace Pimpact
#endif // end of #ifndef PIMPACT_MODEFIELD_HPP
|
4c4e6c63aeaae8e4897a6c5497c6e1d9bcf43643 | 542f386fa521225f2f70055fa2d43290f40f5385 | /Winconvert.hpp | fa8d052978e68daa8943d349dbfe96286b314896 | [] | no_license | liuhouer/ClockTool | 33937af25f0ccd92b396455aa7e1d3a23ad27af5 | 32407fe91ca991165003e5d067b503ecedd01c0c | refs/heads/master | 2021-01-10T08:12:23.734657 | 2015-11-16T02:00:58 | 2015-11-16T02:00:58 | 46,215,657 | 3 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 6,194 | hpp | Winconvert.hpp | // Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'Winconvert.pas' rev: 10.00
#ifndef WinconvertHPP
#define WinconvertHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp> // Pascal unit
#include <Sysinit.hpp> // Pascal unit
#include <Sysutils.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Winconvert
{
//-- type declarations -------------------------------------------------------
typedef short Int16;
class DELPHICLASS ElzhException;
class PASCALIMPLEMENTATION ElzhException : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
#pragma option push -w-inl
/* Exception.Create */ inline __fastcall ElzhException(const AnsiString Msg) : Sysutils::Exception(Msg) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateFmt */ inline __fastcall ElzhException(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateRes */ inline __fastcall ElzhException(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateResFmt */ inline __fastcall ElzhException(int Ident, System::TVarRec const * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateHelp */ inline __fastcall ElzhException(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateFmtHelp */ inline __fastcall ElzhException(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateResHelp */ inline __fastcall ElzhException(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateResFmtHelp */ inline __fastcall ElzhException(System::PResStringRec ResStringRec, System::TVarRec const * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~ElzhException(void) { }
#pragma option pop
};
typedef void __fastcall (__closure *TWriteProc)(void *DTA, Word NBytes, Word &Bytes_Put);
typedef void __fastcall (__closure *PutBytesProc)(void *DTA, Word NBytes, Word &Bytes_Put);
typedef void __fastcall (__closure *TReadProc)(void *DTA, Word NBytes, Word &Bytes_Got);
typedef void __fastcall (__closure *GetBytesProc)(void *DTA, Word NBytes, Word &Bytes_Got);
typedef Word Freqtype[628];
typedef Word *FreqPtr;
typedef short PntrType[941];
typedef short *pntrPtr;
typedef short SonType[627];
typedef short *SonPtr;
typedef Byte TextBufType[4155];
typedef Byte *TBufPtr;
typedef short WordRay[4097];
typedef short *WordRayPtr;
typedef short BWordRay[4353];
typedef short *BWordRayPtr;
class DELPHICLASS TLZH;
class PASCALIMPLEMENTATION TLZH : public System::TObject
{
typedef System::TObject inherited;
private:
Word code;
Word len;
void __fastcall InitTree(void);
void __fastcall InsertNode(short r);
void __fastcall DeleteNode(short p);
short __fastcall GetBit(TReadProc GetBytes);
short __fastcall GetByte(TReadProc GetBytes);
void __fastcall update(short c);
void __fastcall StartHuff(void);
void __fastcall Putcode(short l, Word c, TWriteProc PutBytes);
void __fastcall reconst(void);
void __fastcall EncodeChar(Word c, TWriteProc PutBytes);
void __fastcall EncodePosition(Word c, TWriteProc PutBytes);
void __fastcall EncodeEnd(TWriteProc PutBytes);
short __fastcall DecodeChar(TReadProc GetBytes);
Word __fastcall DecodePosition(TReadProc GetBytes);
void __fastcall InitLZH(void);
void __fastcall EndLZH(void);
public:
Classes::TStream* StreamIn;
Classes::TStream* StreamOut;
Word getbuf;
Byte getlen;
Byte putlen;
Word putbuf;
int textsize;
int codesize;
int printcount;
short match_position;
short match_length;
Byte *text_buf;
short *lson;
short *dad;
short *rson;
Word *freq;
short *prnt;
short *son;
void __fastcall LZHPack(int &Bytes_Written, TReadProc GetBytes, TWriteProc PutBytes);
void __fastcall LZHUnpack(int TextSize, TReadProc GetBytes, TWriteProc PutBytes);
void __fastcall GetBlockStream(void *DTA, Word NBytes, Word &Bytes_Got);
void __fastcall PutBlockStream(void *DTA, Word NBytes, Word &Bytes_Got);
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TLZH(void) : System::TObject() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TLZH(void) { }
#pragma option pop
};
//-- var, const, procedure ---------------------------------------------------
static const Shortint EXIT_OK = 0x0;
static const Shortint EXIT_FAILED = 0x1;
static const Word N = 0x1000;
static const Shortint F = 0x3c;
static const Shortint THRESHOLD = 0x2;
static const Word NUL = 0x1000;
static const Word N_CHAR = 0x13a;
static const Word T = 0x273;
static const Word R = 0x272;
static const Word MAX_FREQ = 0x8000;
extern PACKAGE Byte p_len[64];
extern PACKAGE Byte p_code[64];
extern PACKAGE Byte d_code[256];
extern PACKAGE Byte d_len[256];
} /* namespace Winconvert */
using namespace Winconvert;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Winconvert
|
1485e6c9280e5ca6d9ab970dd06d5bc2cff9a988 | b1522a9fb02cdc40d9cf089da94515ab03b6ba00 | /C++/Mini Twitter.cpp | c53e7ad3c7d2ac126bbe44012aae308156d4f153 | [
"MIT"
] | permissive | kmather73/LintCode | b16ff60aa8037ec406425898bdf98d3d1d7d33ac | a31d5a61c856f404520a4465d1da9d9a5c30d1ba | refs/heads/master | 2020-12-24T19:28:03.827812 | 2016-06-08T18:48:04 | 2016-06-08T18:48:04 | 56,944,897 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,126 | cpp | Mini Twitter.cpp | /**
* Definition of Tweet:
* class Tweet {
* public:
* int id;
* int user_id;
* String text;
* static Tweet create(int user_id, string tweet_text) {
* // This will create a new tweet object,
* // and auto fill id
* }
* }
*/
class MiniTwitter {
public:
MiniTwitter() :time_(0) {}
// @param user_id an integer
// @param tweet a string
// return a tweet
Tweet postTweet(int user_id, string tweet_text) {
const Tweet &t = Tweet::create( user_id, tweet_text);
userTimeline[ user_id ].push_back( make_pair(++time_, t) );
return t;
}
// @param user_id an integer
// return a list of 10 new feeds recently
// and sort by timeline
vector<Tweet> getNewsFeed(int user_id) {
userFollowingUsers[ user_id ].insert( user_id );
using revIt = std::vector<pair<uint,Tweet>>::reverse_iterator;
priority_queue<tuple<uint, revIt, revIt>> maxHeap;
for( int id : userFollowingUsers[ user_id ]) {
auto &news = userTimeline[ id ];
if( news.size() ) {
maxHeap.push( make_tuple(news.rbegin()->first,
news.rbegin(),
news.rend()
) );
}
}
vector<Tweet> recentTweets;
while( recentTweets.size() < numberOfRecentTweets && !maxHeap.empty() ){
const auto& top = maxHeap.top();
uint currTime;
revIt begin, end;
std::tie( currTime, begin, end) = top;
maxHeap.pop();
revIt next = begin+1;
if(next != end) {
maxHeap.push( make_tuple( next->first, next, end) );
}
recentTweets.push_back( begin->second );
}
return recentTweets;
}
// @param user_id an integer
// return a list of 10 new posts recently
// and sort by timeline
vector<Tweet> getTimeline(int user_id) {
vector<Tweet> recentTweets;
const auto& timeline = userTimeline[ user_id ];
for(auto it = timeline.rbegin(); recentTweets.size() < numberOfRecentTweets &&
it != timeline.rend(); ++it){
recentTweets.push_back( it->second );
}
return recentTweets;
}
// @param from_user_id an integer
// @param to_user_id an integer
// from user_id follows to_user_id
void follow(int from_user_id, int to_user_id) {
userFollowingUsers[ from_user_id ].insert( to_user_id );
}
// @param from_user_id an integer
// @param to_user_id an integer
// from user_id unfollows to_user_id
void unfollow(int from_user_id, int to_user_id) {
userFollowingUsers[ from_user_id ].erase( to_user_id );
}
private:
const uint numberOfRecentTweets = 10;
unordered_map<int, set<int>> userFollowingUsers;
unordered_map<int, vector<pair<uint, Tweet>>> userTimeline;
uint time_;
}; |
bc4eed209b4f48ad60a649c901094d0b55912909 | 52b8f5a7c1e04472927d8e9d7b13aeb17b9324fb | /djikstras.cpp | 868ff56d210b17b2c5273b671addac7e9219f09b | [] | no_license | NDThacker/cpp_practice | 1c55743c1870a6731c5308186497823baff6767f | c33be90c0072bd2f294ae691e6b334657a5b6391 | refs/heads/master | 2022-10-01T11:43:29.936481 | 2022-09-18T07:05:59 | 2022-09-18T07:05:59 | 212,974,410 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,112 | cpp | djikstras.cpp | #include <iostream>
#include <vector>
using namespace std;
void updateValues(vector<int> &nVec, int **edgeMat, vector<int> &res, int node, int start, int total)
{
for (int ind = 0; ind < total; ind++)
{
cout << "In here";
if (edgeMat[node-1][ind] != 1)
continue;
nVec.push_back(ind+1);
if(res[ind] == 0)
{
res[ind] = edgeMat[node-1][ind] + res[node-1];
}
else if(edgeMat[node-1][ind] + res[node-1] < res[ind])
{
res[ind] = edgeMat[node-1][ind] + res[node-1];
}
}
}
int main()
{
int nodes, edges, n1, n2;
cin >> nodes >> edges;
int edgeMat[nodes][nodes];
vector<int> res;
int start, end;
vector<int> nVec;
nVec.push_back(5);
for (int ind = 0; ind < edges; ind++)
{
//cout << "scanning";
cin >> n1 >> n2;
edgeMat[n1-1][n2-1] = 1;
edgeMat[n2-1][n1-1] = 1;
}
cout << "scanning complete";
//cin.clear();
cin >> start >> end;
cout << start;
//res.push_back(start);
cout << "Queue init";
int node;
while (!nVec.empty())
{
cout << "in here";
node = nVec[0];
nVec.erase(nVec.begin());
updateValues(nVec, (int **)edgeMat, res, node, start, nodes);
}
} |
3a63571a95bc7666593ac7f1ee33cdfaab4727e0 | 1725d222de24eac0c38de00d3b00d5f27b87c38d | / my-tel-util/ECG_Android/jni/CoreECGAnalyse/RPosAnalyser.cpp | 53564deb2b5c06736cb15087746a8e1378c72db7 | [] | no_license | flyfire/my-tel-util | 76e7776e3777056f50a59d9105e5e90d1db851b2 | 837149c71819272313c1367a09b29509ebd8522f | refs/heads/master | 2021-01-10T11:42:08.005663 | 2014-02-19T05:55:31 | 2014-02-19T05:55:31 | 46,967,698 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 14,114 | cpp | RPosAnalyser.cpp | #include "RPosAnalyser.h"
#include "LTSTAnalyst.h"
/*/// <summary>
/// RR间期上限值,超过此值可以认为数据不正常
/// </summary>
private const int MaxRRLength = 6000;
/// <summary>
/// RR间期下限值,超过此值可以认为数据不正常
/// </summary>
private const int MinRRLength = 30;*/
#define MAX_RR_LENGTH 6000
#define MIN_RR_LENGTH 30
extern double CalDistance(CPoint pt, CPoint ptLinePt1, CPoint ptLinePt2);
extern void LOGD_INT1(int intValue){
char csTemp[20];
sprintf(csTemp, "%d ", intValue);
LOGD(csTemp);
}
CRPosAnalyser::CRPosAnalyser(void) : EcgIndex(0),
IsSameWave(false),
CurrentRRIsInversion(false),
RSum(0),
CurrentMaxAmplitude(0),
CurrentMinAmplitude(255),
CurrentMaxAmplitudeIndex(0),
CurrentMinAmplitudeIndex(0),
CurrentRRIndex(0),
TopChordIndex(0),
m_index(0)
{
for (int i = 0; i < 8; ++i)
{
m_aRRDistance[i] = 220;
}
}
CRPosAnalyser::~CRPosAnalyser(void)
{
}
int CRPosAnalyser::abs(int x)
{
if(x <0) x=-x;
return x;
}
void CRPosAnalyser::Init()
{
EcgIndex = 0;
IsSameWave = false;
CurrentRRIsInversion = false;
RSum = 0;
CurrentMaxAmplitude = 0;
CurrentMinAmplitude = 255;
CurrentMaxAmplitudeIndex = 0;
CurrentMinAmplitudeIndex = 0;
CurrentRRIndex = 0;
TopChordIndex = 0;
m_index = 0;
EcgData.clear();
TopChordList.clear();
RSum2.clear();
m_lastRRWave.m_nRRLen = 0;
m_lastRRWave.m_nRPos = 0;
}
/*
* 函数介绍:
*
* 输入参数:
*
* 输出参数:
*
* 返 回 值:
*
* 备 注:
*
*/
bool CRPosAnalyser::Process(int nXPos,
int nTempData,
int nOriData,
CRRWave &rrWave,
DWORD dwPacketCount,
UINT nEcgFreq)
{
//lazy-init
Frequency = nEcgFreq;
RLen = nEcgFreq * 8;
rrWave.m_nSamplFreq = nEcgFreq;
m_lastRRWave.m_nSamplFreq = nEcgFreq;
//save original data
EcgData.push_back( (unsigned char)nOriData);
//判定是否存在R点
bool bRet = false;
float averge = 0;
RSum += nTempData;
RSum2.push_back(nTempData);
LOGD("EcgIndex");
LOGD_INT1(EcgIndex);
LOGD_INT1(RLen);
if (EcgIndex >= RLen)
{
averge = RSum / RLen / 2; //取平均值的百分五十
float fOld = RSum2.front();/*data = RSum2.Dequeue();*/
RSum2.pop_front();
RSum -= fOld;
LOGD("rrWave");
bRet = FindRRWave(EcgIndex - RLen, fOld, averge, rrWave, dwPacketCount);
//会有RLen个点没有被分析------------
////窗口到最后
//if (EcgIndex == EcgData.size() - 1)
//{
// int count = RSum2.size();
// for (int i = 1; i <= count; i++)
// {
// /*data = RSum2.Dequeue();
// Caculate(EcgIndex - RLen + i, data, averge);*/
// float fOld = RSum2.front();
// RSum2.pop_front();
// bRet = FindRRWave(EcgIndex - RLen + i, fOld, averge);
// }
//}
}
EcgIndex++;
return bRet;
}
bool CRPosAnalyser::FindRRWave( int nXPos, float nTempData, float fThreshold, CRRWave& rrWave, DWORD dwPackCount )
{
bool bRet = false;
if (nTempData > fThreshold)//上升点
{
if (!IsSameWave)//局部内第一个上升点
{
TopChordList.push_back(nXPos);
IsSameWave = true;
}
}
else//下降点
{
IsSameWave = false; //y6
int nSize = TopChordList.size();
if (TopChordIndex < TopChordList.size() && nXPos > TopChordList[TopChordIndex])
{//计算峰值
for (int i = 2 * TopChordList[TopChordIndex] - nXPos >= 0 ? 2 * TopChordList[TopChordIndex] - nXPos : 0;
i <= TopChordList[TopChordIndex]; i++)
{
int EcgValue = EcgData[i];
if (EcgValue > CurrentMaxAmplitude)
{//保留最大值
CurrentMaxAmplitude = EcgValue;
CurrentMaxAmplitudeIndex = i;
}
if (EcgValue < CurrentMinAmplitude)
{//保留最小值
CurrentMinAmplitude = EcgValue;
CurrentMinAmplitudeIndex = i;
}
if (m_lastRRWave.m_nRRLen != 0)//不是第一个R波
{
//确定R点是最大点还是最小点
CurrentRRIsInversion = abs(CurrentMinAmplitude - m_lastRRWave.m_nBaseline) > 2 * abs(CurrentMaxAmplitude - m_lastRRWave.m_nBaseline);
if (CurrentRRIsInversion)
{
CurrentRRIndex = CurrentMinAmplitudeIndex;
}
else
{
CurrentRRIndex = CurrentMaxAmplitudeIndex;
}
}
else
{
CurrentRRIsInversion = false;
CurrentRRIndex = CurrentMaxAmplitudeIndex;
}
}
bRet = ConfirmRPos(CurrentRRIndex, CurrentRRIsInversion, rrWave, dwPackCount);
CurrentMaxAmplitude = 0;
CurrentMinAmplitude = 255;
TopChordIndex++;
}
}
return bRet;
}
/*
* 函数介绍:
* 找到R点时,与之前的R波结束点形成一个RR间期
* 输入参数:
*
* 输出参数:
*
* 返 回 值:
*
* 备 注:
*
*/
bool CRPosAnalyser::ConfirmRPos( int nRPos, bool bIsInversion, CRRWave &rr, DWORD dwPackCount )
{
//头两个找到的R点通常是不符的,忽略之
if (m_lastRRWave.m_nRPos == 0)
{//第一个找到的R点,初始化PrevRR返回
if (nRPos == 0)
{
return false;
}
m_lastRRWave.m_nRPos = nRPos;
m_lastRRWave.m_nBaseline = 127;
return false;
}
else if (nRPos - m_lastRRWave.m_nRPos == 0)//R点位置重合
{
return false;
}
else if (nRPos - m_lastRRWave.m_nRPos - m_lastRRWave.m_nRRLen <= 0)//找到的R波在上一个RR间期内
{
return false;
}
if (m_lastRRWave.m_nRRLen < MIN_RR_LENGTH)
{//超短RR间期,当作杂波,同时合并处理
rr = m_lastRRWave;
m_lastRRWave.m_bIsNormal = false;
}
else
{
rr.m_nRPos = m_lastRRWave.m_nRPos + m_lastRRWave.m_nRRLen;
}
rr.m_bIsInversion = bIsInversion;
rr.m_nRRLen = nRPos - rr.m_nRPos;
rr.m_nAvarageHR = rr.m_nSamplFreq * 60 / rr.m_nRRLen;
LOGD("m_nRRLen");
LOGD_INT1(rr.m_nRRLen);
LOGD_INT1(MAX_RR_LENGTH);
if (rr.m_nRRLen > MAX_RR_LENGTH) //超长异常波形
{
rr.m_bIsNormal = false;
rr.m_nBaseline = 127;
}
else //非异常数据进行 RR间期分析
{
//TRACE(_T("RRLen : %.2f ms.\n"), ( (float)rr.m_nRRLen * 1000 / (float)rr.m_nSamplFreq));
rr.m_dwRPacketCout = dwPackCount;
//计算平均心率
int sum = 0;
m_aRRDistance[m_index++] = rr.m_nRRLen;
if (m_index >= 8)
{
m_index = 0;
}
for (int i = 0; i < 8; ++i)
{
sum += m_aRRDistance[i];
}
LOGD("sum");
LOGD_INT1(sum);
if (0 == sum)
{
rr.m_nAvarageHR = 0;
}
else
{
rr.m_nAvarageHR = 60 * 8 * rr.m_nSamplFreq / sum;
}
/*if (rr.m_nAvarageHR > 150 )
{
TRACE(_T("Find Heart Rate over speed.\n") );
}
TRACE(_T("RRLen:%d ms.\n"), rr.m_nRRLen*1000/300);
if (rr.m_nRRLen < 100)
{
TRACE(_T("") );
}*/
//RR间期分析
int nLen = min(rr.m_nRRLen, RRWAVE_BUF_SIZE);
for (int i = 0; i < nLen; ++i)
{
(rr.m_data)[i] = EcgData[i];
}
AnalyseRR(rr.m_data, rr);//进行RR间期分析
}
m_lastRRWave = rr;
return true;
}
void CRPosAnalyser::AnalyseRR( unsigned char *pData, CRRWave &rr )
{
float baseline = 0;//基线
int len = rr.m_nRRLen;//数据长度
int p1, p2;
//求Q波顶点:从 RR间期尾端 到 RR间期2/3 处寻找距离这两点确定的直接距离最远以及Y值最小的点
p1 = len * 2 / 3;
p2 = len - 1;
if (rr.m_bIsInversion)
{
//求Q波顶点:由于R波倒置,则寻找该区间的最高点
rr.m_nQStartPos = GetMaxDistanceIndex(EcgData, p1, p2, 0, pData[p2], -1, false);
}
else
{
//求Q波顶点:寻找该区间的最低点
rr.m_nQStartPos = GetMaxDistanceIndex(EcgData, p1, p2, 0, -1, pData[p2], false);
}
//求P波顶点:从 Q波顶点 到 RR间期68/100 处寻找Y值最大点
p1 = len * 68 / 100;
if (p1 < rr.m_nQStartPos)
{
rr.m_nPPos = p1;
p2 = rr.m_nQStartPos;
for (int i = p1; i < p2; i++)
{
if (pData[i] > pData[rr.m_nPPos])
{
rr.m_nPPos = i;
}
}
}
else
{
rr.m_nPPos = rr.m_nQStartPos;
}
//求Q波起始点:从 Q波顶点 - 80ms 到 Q波顶点 寻找这两点确定的直接距离最远以及Y值最大的点
p1 =( (rr.m_nQStartPos - (rr.m_nSamplFreq * 80 / 1000) ) > 0 ) ? rr.m_nQStartPos - (rr.m_nSamplFreq * 80 / 1000) : rr.m_nPPos;
p2 = rr.m_nQStartPos;
if (p1 < 0)
{
TRACE(_T("Here.\n") );
}
if (rr.m_bIsInversion)
{//R波倒置
rr.m_nQStartPos = GetMaxDistanceIndex(EcgData, p1, p2, 1, -1, 255, false);
}
else
{//R波正向
rr.m_nQStartPos = GetMaxDistanceIndex(EcgData, p1, p2, 1, pData[p2], -1, false);
}
//计算基线:从Q波起始点 - 50ms 到 Q波起始点 之间的采样点Y值的平均值
p1 = rr.m_nQStartPos - (rr.m_nSamplFreq * 50 / 1000) > 0 ? rr.m_nQStartPos - (rr.m_nSamplFreq * 50 / 1000) : rr.m_nPPos;
p2 = rr.m_nQStartPos;
//计算本周期的基线
for (int i = p1; i <= p2; i++)
{
baseline += pData[i];
}
baseline = baseline * 1.0 / (p2 - p1 + 1);
rr.m_nBaseline = (unsigned char)baseline;
////求T波顶点: RR间期3/20 到 RR间期7/10 之间的最大值
//p1 = len * 3 / 20;
//p2 = len * 7 / 10;
//rr.TPos = p1;
//for (int i = p1; i < p2; i++)
//{
// if (data[i] > data[rr.TPos])
// {
// rr.TPos = i;
// }
//}
////求S波顶点: R波顶点 至 RR间期2/5到处的最小点--这两点确定的直接距离最远以及Y值最小的点
//p1 = 0;
//p2 = rr.HR < 80 ? this.Frequency / 5 : this.Frequency * 150 / 1000;
//p2 = p2 >= len ? len - 1 : p2;
//if (PrevRR.IsInversion)
//{
// //R波倒置
// rr.SPos = GetMaxDistanceIndex(data, p1, p2, 1, data[p1], -1, true);
//}
//else
//{
// //R波正向
// rr.SPos = GetMaxDistanceIndex(data, p1, p2, 1, -1, byte.MaxValue, true);
//}
////求J点:计算从S点至S+140ms,与这两点确定的直接距离最远的点为J点
//if (PrevRR.IsInversion)
//{
// //R波倒置
// rr.JPos = rr.SPos;
//}
//else
//{
// //R波正向
// p1 = rr.SPos;
// p2 = (rr.SPos + this.Frequency * 140 / 1000) >= len ? len - 1 : (rr.SPos + this.Frequency * 140 / 1000);
// rr.JPos = GetMaxDistanceIndex(data, p1, p2, 1, data[rr.SPos], -1, true);
//}
////求L点(即ST段结束点)
//int stOff = 0;
//int iTH = data[rr.TPos] - rr.BaseY;
//int iLT = rr.TPos - rr.JPos + 1;
//stOff = rr.JPos + (iLT * 3) / 5;
//if (iTH <= iLT * 2 / 5)
//{
// stOff = rr.JPos + iLT * 7 / 10;
//}
//else if (iTH >= iLT * 3 / 4)
//{
// stOff = rr.JPos + iLT / 2;
//}
//rr.LPos = stOff;
////求I点:R波之后的第一个拐点
////求R波顶点至RR间期1/2到处的最小点
//if (PrevRR.IsInversion)
//{
// rr.IPos = rr.JPos;
//}
//else
//{
// rr.IPos = p1 = 0;
// p2 = len * 1 / 2;
// for (int i = p1; i < p2; i++)
// {
// if (data[i] < data[rr.IPos])
// rr.IPos = i;
// }
// //求I点:得用局域变换的方法,计算从I点至I+150ms,与这两点确定的直接距离最远的点为I点
// p1 = rr.IPos;
// p2 = (rr.IPos + this.Frequency * 150 / 1000) >= len ? len - 1 : (rr.IPos + this.Frequency * 150 / 1000);
// rr.IPos = GetMaxDistanceIndex(data, p1, p2, 1, data[p1], -1, true);
//}
////T波是否反向
//rr.IsTReverse = (data[rr.JPos] - data[stOff]) > 0;
////特征值
//float stHeight;
//if (data[rr.JPos] < rr.BaseY)
//{
// int stPos = (rr.JPos + stOff) / 2;
// stHeight = data[stPos] - rr.BaseY;
//}
//else
//{
// stHeight = data[rr.JPos] - rr.BaseY;
//}
//rr.TY = data[rr.TPos];
//rr.PFlag = data[rr.PPos] > rr.BaseY;
//rr.STSlope = (data[rr.LPos] - data[rr.JPos]) * 1f / (rr.LPos - rr.JPos);
//rr.STValue = stHeight / 51F;
}
/// <summary>
/// 寻找 到 p1与p2构成的直线 直接距离最大的点
/// </summary>
/// <param name="data">数据数组</param>
/// <param name="p1">起点</param>
/// <param name="p2">终点</param>
/// <param name="minDis">最小距离</param>
/// <param name="top">是否只能呈上升趋势。值为-1时忽略</param>
/// <param name="buttom">是否只能呈下降趋势。值为-1时忽略</param>
/// <param name="isAsc">遍历方向</param>
/// <returns>点 在数据数组中的索引</returns>
int CRPosAnalyser::GetMaxDistanceIndex(vector<unsigned char> &data,
int p1,
int p2,
double minDis,
int top,
int buttom,
bool isAsc)
{
bool hasTop = (top != -1);
bool hasButtom = (buttom != -1);
if (hasTop && hasButtom)
{
TRACE(_T("Can't has two kinds of trends at the same time!") );
return -1;
}
int index = -1;
double maxDis = minDis;
if (isAsc)
{
index = p1;
for (int i = p1; i < p2; i++)
{
//找Index
double tempDis = CalDistance(CPoint(i, data[i]), CPoint(p1, data[p1]), CPoint(p2, data[p2]) );
//double tempDis = 0;
if (hasTop)
{
if (data[i] > top && tempDis > maxDis)
{
maxDis = tempDis;
top = data[i];
index = i;
}
}
else if (hasButtom)
{
if (data[i] < buttom && tempDis > maxDis)
{
maxDis = tempDis;
buttom = data[i];
index = i;
}
}
else if (tempDis > maxDis)
{
maxDis = tempDis;
index = i;
}
}
}
else
{
index = p2;
for (int i = p2; i > p1; i--)
{
//找Index
double tempDis = CalDistance(CPoint(i, data[i]), CPoint(p1, data[p1]), CPoint(p2, data[p2]) );
//double tempDis = 0;
if (hasTop)
{
if (data[i] > top && tempDis > maxDis)
{
maxDis = tempDis;
top = data[i];
index = i;
}
}
else if (hasButtom)
{
if (data[i] < buttom && tempDis > maxDis)
{
maxDis = tempDis;
buttom = data[i];
index = i;
}
}
else if (tempDis > maxDis)
{
maxDis = tempDis;
index = i;
}
}
}
return index;
}
|
e9d0820ff71bf17dae91aeea02f0b5f26b95a8f2 | d04f0f5618a552ad0c1bb457b644a585d9c7abea | /SixJoint/Task.cpp | 0a929e456122a5971290c21890e5014b937296bc | [] | no_license | Nhiemth1985/ArduinoRL | 44a5ff19048aa89e4fb541111c94483603cf7ccf | d3859bcfbef08bd87cdb8a3d3214bd451c7cc57c | refs/heads/master | 2021-12-16T12:03:31.697932 | 2017-09-19T05:07:02 | 2017-09-19T05:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 211 | cpp | Task.cpp | #include <Arduino.h>
#include "Learning.h"
ArmState startState = { 60, 65, 50, 50, 50,100};
ArmState targetState = {100,80, 85,100,100,130};
void pickNewRandomTarget() {
chooseRandomState(targetState);
}
|
9c1307eab9e597be97c9665133994654951f5010 | 0b82c60d4498657538f2dbc15d294e1a9e855776 | /Back-End-Compiler/CodeGenNodes/idivNode.hpp | 7863144f4ceb2d31b2e0fd07c26b25bb77c78cc9 | [] | no_license | vincentrolypoly/Malice | d768d5aadad74008a941014ffe285c656b2ab839 | 2a4399cd08c001b1a52e028365f66f976bab989b | refs/heads/master | 2016-09-06T10:24:55.549117 | 2014-11-03T13:24:00 | 2014-11-03T13:24:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 243 | hpp | idivNode.hpp | #ifndef IDIV_H
#define IDIV_H
#include "IA32Nodes.hpp"
#include <string>
#include <fstream>
using namespace std;
class idivNode: public IA32Nodes{
string reg1;
public:
idivNode(string r1);
string printSelf();
bool removable();
};
#endif
|
3eb6ea8872acbeb7e6ac823e138e12c84c8860c3 | 815648614bd1382e47cb6bcf85daaeaff14f30d1 | /src/util/vec2d.cpp | 786e3c4d156639e665450907dc514aefdfad8bd9 | [] | no_license | adamagatt/sumo | d235519d64bdaee91c6a940e7ec8b6d8ddab84c2 | 98d1f5488ebc42e6e22ee293d712f3f017359c27 | refs/heads/main | 2023-01-07T16:17:28.229916 | 2020-11-01T20:33:04 | 2020-11-01T20:33:04 | 301,408,466 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,386 | cpp | vec2d.cpp | #include <cmath>
#include <iostream>
#include "vec2d.h"
Vec2d::Vec2d(float x, float y) : x(x), y(y) { }
float Vec2d::getX() const {
return x;
}
float Vec2d::getY() const {
return y;
}
void Vec2d::zero() {
x = 0;
y = 0;
}
Vec2d Vec2d::operator-() const {
return Vec2d{-x, -y};
}
float Vec2d::abs() const {
return sqrt(x*x + y*y);
}
Vec2d Vec2d::operator+(const Vec2d& other) const {
return Vec2d{x+other.getX(), y+other.getY()};
}
Vec2d& Vec2d::operator+=(const Vec2d& other) {
this->x += other.getX();
this->y += other.getY();
return *this;
}
Vec2d Vec2d::operator-(const Vec2d& other) {
return *this + (-other);
}
Vec2d& Vec2d::operator-=(const Vec2d& other) {
return *this += Vec2d{-other.getX(), -other.getY()};
}
Vec2d Vec2d::operator*(float scale) const {
return Vec2d{this->x * scale, this->y * scale};
}
Vec2d& Vec2d::operator*=(float scale) {
this->x *= scale;
this->y *= scale;
return *this;
}
Vec2d Vec2d::operator/(float scale) const {
return *this * (1.0 / scale);
}
Vec2d& Vec2d::operator/=(float scale) {
return *this *= (1.0 / scale);
}
std::ostream& operator<<(std::ostream& output, const Vec2d& v) {
output << "[" << v.x << ", " << v.y << "]";
return output;
}
bool operator==(const Vec2d& lhs, const Vec2d& rhs)
{
return lhs.x == rhs.x && lhs.y == rhs.y;
} |
b185260ae516d9f87b9be33ce2e3a3d046f40590 | 664814da59b39b9c0b0bfc7d40e95b0564df22d4 | /Seed/src/Platform/OpenGL/OpenGLTexture.cpp | 2674ffeb13feb9446c69d58d30ae41953241d2e2 | [
"Apache-2.0"
] | permissive | hightemplarzzyy/Seed | fae93c4140fbab898d0e4910e57b8f9584db0908 | d16c5b9f3c1586b09fe3bb25f52c908a939bb09f | refs/heads/master | 2020-04-28T03:08:24.599318 | 2020-02-23T08:00:19 | 2020-02-23T08:00:19 | 174,925,003 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,764 | cpp | OpenGLTexture.cpp | #include "Seedpch.h"
#include "OpenGLTexture.h"
#include <glad/glad.h>
#include <stb_image.h>
namespace Seed {
static GLenum SeedToOpenGLTextureFormat(TextureFormat format)
{
switch (format)
{
case TextureFormat::RGB: return GL_RGB;
case TextureFormat::RGBA: return GL_RGBA;
}
return 0;
}
static int CalculateMipMapCount(int width, int height)
{
int levels = 1;
while ((width | height) >> levels) {
levels++;
}
return levels;
}
//////////////////////////////////////////////////////////////////////////////////
// Texture2D
//////////////////////////////////////////////////////////////////////////////////
OpenGLTexture2D::OpenGLTexture2D(TextureFormat format, uint32_t width, uint32_t height, TextureWrap _wrap)
:m_Format(format), m_Width(width), m_Height(height),m_Wrap(_wrap)
{
glGenTextures(1, &m_RendererID);
glBindTexture(GL_TEXTURE_2D, m_RendererID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
GLenum wrap = m_Wrap == TextureWrap::Clamp ? GL_CLAMP_TO_EDGE : GL_REPEAT;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrap);
glTextureParameterf(m_RendererID, GL_TEXTURE_MAX_ANISOTROPY, RendererAPI::GetCapabilities().MaxAnisotropy);
glTexImage2D(GL_TEXTURE_2D, 0, SeedToOpenGLTextureFormat(m_Format), m_Width, m_Height, 0, SeedToOpenGLTextureFormat(m_Format), GL_UNSIGNED_BYTE, nullptr);
glGenerateMipmap(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);
}
OpenGLTexture2D::OpenGLTexture2D(const std::string& path, bool srgb)
: m_FilePath(path)
{
int width, height, channels;
SEED_CORE_INFO("Loading texture {0}, srgb={1}", path, srgb);
m_ImageData.Data = stbi_load(path.c_str(), &width, &height, &channels, srgb ? STBI_rgb : STBI_rgb_alpha);
m_Width = width;
m_Height = height;
m_Format = TextureFormat::RGBA;
// TODO: Consolidate properly
if (srgb)
{
glCreateTextures(GL_TEXTURE_2D, 1, &m_RendererID);
int levels = CalculateMipMapCount(m_Width, m_Height);
SEED_CORE_INFO("Creating srgb texture width {0} mips", levels);
glTextureStorage2D(m_RendererID, levels, GL_SRGB8, m_Width, m_Height);
glTextureParameteri(m_RendererID, GL_TEXTURE_MIN_FILTER, levels > 1 ? GL_LINEAR_MIPMAP_LINEAR : GL_LINEAR);
glTextureParameteri(m_RendererID, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTextureSubImage2D(m_RendererID, 0, 0, 0, m_Width, m_Height, GL_RGB, GL_UNSIGNED_BYTE, m_ImageData.Data);
glGenerateTextureMipmap(m_RendererID);
}
else
{
glGenTextures(1, &m_RendererID);
glBindTexture(GL_TEXTURE_2D, m_RendererID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, SeedToOpenGLTextureFormat(m_Format), m_Width, m_Height, 0, srgb ? GL_SRGB8 : SeedToOpenGLTextureFormat(m_Format), GL_UNSIGNED_BYTE, m_ImageData.Data);
glGenerateMipmap(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);
}
stbi_image_free(m_ImageData.Data);
}
OpenGLTexture2D::~OpenGLTexture2D()
{
glDeleteTextures(1, &m_RendererID);
}
void OpenGLTexture2D::Bind(uint32_t slot) const
{
glBindTextureUnit(slot, m_RendererID);
}
void OpenGLTexture2D::Lock()
{
m_Locked = true;
}
void OpenGLTexture2D::Unlock()
{
m_Locked = false;
glTextureSubImage2D(m_RendererID, 0, 0, 0, m_Width, m_Height, SeedToOpenGLTextureFormat(m_Format), GL_UNSIGNED_BYTE, m_ImageData.Data);
}
void OpenGLTexture2D::Resize(uint32_t width, uint32_t height)
{
SEED_CORE_ASSERT(m_Locked, "Texture must be locked!");
m_ImageData.Allocate(width * height * Texture::GetBPP(m_Format));
#if SEED_DEBUG
m_ImageData.ZeroInitialize();
#endif
}
Buffer OpenGLTexture2D::GetWriteableBuffer()
{
SEED_CORE_ASSERT(m_Locked, "Texture must be locked!");
return m_ImageData;
}
//////////////////////////////////////////////////////////////////////////////////
// TextureCube
//////////////////////////////////////////////////////////////////////////////////
OpenGLTextureCube::OpenGLTextureCube(const std::string& path)
: m_FilePath(path)
{
int width, height, channels;
stbi_set_flip_vertically_on_load(false);
m_ImageData = stbi_load(path.c_str(), &width, &height, &channels, STBI_rgb);
m_Width = width;
m_Height = height;
m_Format = TextureFormat::RGB;
unsigned int faceWidth = m_Width / 4;
unsigned int faceHeight = m_Height / 3;
SEED_CORE_ASSERT(faceWidth == faceHeight, "Non-square faces!");
std::array<unsigned char*, 6> faces;
for (size_t i = 0; i < faces.size(); i++)
faces[i] = new unsigned char[faceWidth * faceHeight * 3]; // 3 BPP
int faceIndex = 0;
for (size_t i = 0; i < 4; i++)
{
for (size_t y = 0; y < faceHeight; y++)
{
size_t yOffset = y + faceHeight;
for (size_t x = 0; x < faceWidth; x++)
{
size_t xOffset = x + i * faceWidth;
faces[faceIndex][(x + y * faceWidth) * 3 + 0] = m_ImageData[(xOffset + yOffset * m_Width) * 3 + 0];
faces[faceIndex][(x + y * faceWidth) * 3 + 1] = m_ImageData[(xOffset + yOffset * m_Width) * 3 + 1];
faces[faceIndex][(x + y * faceWidth) * 3 + 2] = m_ImageData[(xOffset + yOffset * m_Width) * 3 + 2];
}
}
faceIndex++;
}
for (size_t i = 0; i < 3; i++)
{
// Skip the middle one
if (i == 1)
continue;
for (size_t y = 0; y < faceHeight; y++)
{
size_t yOffset = y + i * faceHeight;
for (size_t x = 0; x < faceWidth; x++)
{
size_t xOffset = x + faceWidth;
faces[faceIndex][(x + y * faceWidth) * 3 + 0] = m_ImageData[(xOffset + yOffset * m_Width) * 3 + 0];
faces[faceIndex][(x + y * faceWidth) * 3 + 1] = m_ImageData[(xOffset + yOffset * m_Width) * 3 + 1];
faces[faceIndex][(x + y * faceWidth) * 3 + 2] = m_ImageData[(xOffset + yOffset * m_Width) * 3 + 2];
}
}
faceIndex++;
}
glGenTextures(1, &m_RendererID);
glBindTexture(GL_TEXTURE_CUBE_MAP, m_RendererID);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTextureParameterf(m_RendererID, GL_TEXTURE_MAX_ANISOTROPY, RendererAPI::GetCapabilities().MaxAnisotropy);
auto format = SeedToOpenGLTextureFormat(m_Format);
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, format, faceWidth, faceHeight, 0, format, GL_UNSIGNED_BYTE, faces[2]);
glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, format, faceWidth, faceHeight, 0, format, GL_UNSIGNED_BYTE, faces[0]);
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, format, faceWidth, faceHeight, 0, format, GL_UNSIGNED_BYTE, faces[4]);
glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, format, faceWidth, faceHeight, 0, format, GL_UNSIGNED_BYTE, faces[5]);
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, format, faceWidth, faceHeight, 0, format, GL_UNSIGNED_BYTE, faces[1]);
glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, format, faceWidth, faceHeight, 0, format, GL_UNSIGNED_BYTE, faces[3]);
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
glBindTexture(GL_TEXTURE_2D, 0);
for (size_t i = 0; i < faces.size(); i++)
delete[] faces[i];
stbi_image_free(m_ImageData);
}
OpenGLTextureCube::~OpenGLTextureCube()
{
glDeleteTextures(1, &m_RendererID);
}
void OpenGLTextureCube::Bind(uint32_t slot) const
{
glBindTextureUnit(slot, m_RendererID);
}
} |
1c1f03bcb3c3c3fd46503ab405f0d7476aac1029 | b8bfb544cd43c129882f8a463eccf897b5434067 | /src/ofApp.h | 7dfe977d2949b499b4329deb4cea94ee4c2786cc | [] | no_license | Michael-Newcombe/Audio-Visualizer | c235fc5b54e6b689fafd86863b60023ec4c51d5c | 1b0a80c931fa086ee73ada20013c86dc1dacdbc3 | refs/heads/master | 2022-11-15T10:27:37.570085 | 2020-07-16T18:51:58 | 2020-07-16T18:51:58 | 275,245,812 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,669 | h | ofApp.h | #pragma once
#include "ofMain.h"
#include "ofxMaxim.h"
#include "maxiGrains.h"
#include "ofxGui.h"
typedef hannWinFunctor grainPlayerWin;
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
//audio declarations
void audioOut(ofSoundBuffer& output);
ofSoundStream soundStream;
ofxMaxiSample song1;
ofxMaxiSample song2;
ofxMaxiSample song3;
vector<maxiTimePitchStretch<grainPlayerWin, maxiSample>*> stretches;
double wave;
double speed;
double grainLength;
int currentSong;
double outputs[2];
maxiMix mix;
ofxMaxiFFT fft;
ofxMaxiFFTOctaveAnalyzer oct;
int fftSize;
float peakFreq;
float spectralCentroid;
//graphics declarations
ofSpherePrimitive sphere;
ofConePrimitive cone;
ofConePrimitive cone2;
ofBoxPrimitive box;
ofLight spotLight;
ofLight pointLight;
ofLight pointLight2;
ofLight ambientLight;
//gui
ofxPanel gui;
ofParameter<float> playbackSpeed;
bool coneToggle;
bool sphereToggle;
bool octavesToggle;
};
|
f58e4fd71f9f4873788fa2c5ad6acfdd5d4c6ccb | e8a3c0b3722cacdb99e15693bff0a4333b7ccf16 | /Uva Oj/10195..the knights of the round table.cpp | 9a7a4190a4b8cd67fc1e8a3fa21bcd681bc537a1 | [] | no_license | piyush1146115/Competitive-Programming | 690f57acd374892791b16a08e14a686a225f73fa | 66c975e0433f30539d826a4c2aa92970570b87bf | refs/heads/master | 2023-08-18T03:04:24.680817 | 2023-08-12T19:15:51 | 2023-08-12T19:15:51 | 211,923,913 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 515 | cpp | 10195..the knights of the round table.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
double a, b, c, s, ar, rad;
while(scanf("%lf %lf %lf",&a, &b, &c) == 3){
if(a + b > c && b + c > a && c + a > b){
s = (a + b + c)/ 2.0;
ar = sqrt(s *(s - a) * (s - b) * (s - c));
rad = ar /s;
}
else rad = 0.0;
printf("The radius of the round table is: %.3lf\n",rad);
}
return 0;
}
|
181dd6e39dd307c2ae4e0783f4ead84fe3ebe23f | ca0faa3aec886f5c6af98e059d29b522ecec8ddd | /Exercises4_Federico_Pigozzi.cc | b14ee575ec32c7106922829b65fcdc5f8bffb130 | [] | no_license | pigozzif/advanced_programming-2018-19 | d0e434cc3aba611528ffe6ee95b46f978e557737 | a0d26460df4b3dfed7b2001f63bac6f9e86ee1c4 | refs/heads/master | 2020-03-31T00:37:29.223671 | 2019-01-26T15:17:17 | 2019-01-26T15:17:17 | 151,747,614 | 0 | 0 | null | 2019-01-17T23:01:28 | 2018-10-05T16:16:48 | C++ | UTF-8 | C++ | false | false | 3,518 | cc | Exercises4_Federico_Pigozzi.cc | #include <iostream>
// Exercise one
enum class Month {january=1, february, march, april, may,
june, july, august, september, october, november, december};
class Date {
int _day;
Month _month;
int _year;
public:
Date (const int day, const int month, const int year) : _day{day}, _month{Month(month)}, _year{year} {}
int day() const {
return _day;
}
int month() const noexcept {
return int(_month);
}
int year() const noexcept {
return _year;
}
void add_days(const unsigned int n) noexcept {
for (int i=0; i < n; i++) add_day();
}
private:
void add_day() noexcept;
};
void Date::add_day() noexcept {
switch (_month) {
case Month::january : case Month::march : case Month::may :
case Month::july : case Month::august : case Month::october :
++_day;
if (_day == 32) {
_day = 1;
_month = Month(int(_month) + 1);
}
break;
case Month::april : case Month::june : case Month::september : case Month::november :
++_day;
if (_day == 31) {
_day = 1;
_month = Month(int(_month) + 1);
}
break;
case Month::february :
++_day;
if (_day == 30) {
_day = 1;
_month = Month(3);
}
break;
case Month::december :
++_day;
if (_day == 32) {
_day = 1;
_month = Month(1);
++_year;
}
break;
}
}
// Exercise two
bool operator==(const Date& lhs, const Date& rhs) {
if (lhs.day() == rhs.day() && lhs.month() == rhs.month() && lhs.year() == rhs.year()) return true;
else return false;
}
bool operator!=(const Date& lhs, const Date& rhs) {
return !(lhs==rhs);
}
std::ostream& operator<<(std::ostream& os, const Date& date) {
os << date.day() << "/" << date.month() << "/" << date.year() << std::endl;
return os;
}
bool is_leap(const int y) {
return (y % 4 == 0 && y % 400 != 0);
}
// Exercises three and four
template<typename num>
class Vector {
num* elem;
std::size_t _size;
public:
Vector(std::size_t size) : elem{nullptr}, _size{size} {
try {
elem = new num[size];
}
catch (...) {
delete[] elem;
throw;
}
}
~Vector() noexcept {delete[] elem;}
num* begin() noexcept {return &elem[0];}
num* begin() const noexcept {return &elem[0];}
num* end() noexcept {return &elem[_size];}
num* end() const noexcept {return &elem[_size];}
std::size_t size() const noexcept {return _size;}
auto& operator[](const std::size_t pos) const noexcept {return elem[pos];} // Switched to "auto" return type
};
template<typename T>
std::ostream& operator<<(std::ostream& os, const Vector<T>& vector) {
for (auto& x : vector) os << x << std::endl;
}
// In general, I think that C++ 14 moved in the direction of improved "ease of writing" for the programmer side (sometimes at the expense of readability,
//as we can see from the opportunity to return auto
// Main function
int main() {
Vector<double> test{10};
for (auto i=0u; i < 10; i++) test[i] = i;
std::cout << test;
return 0;
}
|
d35da615c34ea3ec2c9168a3c6eddcfb1357cbcc | 32d798c1b7892a17ba8d34b1c22758315e3aec09 | /Kursovaya/Курсовой проект(лабиринт)/Курсовой проект(лабиринт)/Mechanics.h | 2e1ab5c70e95df146b4443785ba8eecf0f9249d6 | [] | no_license | W3STi/Logic | d52b42572f6353d1a6a71d7ad7240f35f075a2b4 | 98e2859acd9411fb16fd53ad4b5169552bea64d5 | refs/heads/master | 2023-02-01T09:35:35.402940 | 2020-12-16T15:13:21 | 2020-12-16T15:13:21 | 294,073,336 | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 1,059 | h | Mechanics.h | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<windows.h>
#include<iostream>
#include<memory.h>
#include<time.h>
#include<malloc.h>
#include<conio.h>
#include<vector>
using namespace std;
#define KEY_SPACE 32 //определение клавиши "пробел"
int ** dynamic_array(size_t height, size_t width);
void dynamic_array_free(int **maze, size_t height);
bool deadend(int x, int y, int** maze, int height, int width);
void go(int** maze, int height, int width, bool stopwatch, bool check_bot);
void go2(int** maze, int height, int width, double &difP);
void mazegame(int height, int width, bool stopwatch, bool check_bot, int lvl);
void Way_coord(int** maze, int *py, int *px, int *xc1, int *yc1, int *xc2, int *yc2, int lvl);
int Find_way(int** maze, int y, int x);
void runbot(int** maze, int height, int lvl, double &difB);
void mainmech(int** maze, int height, int lvl);
void grph_bot1(int *xc1, int *yc1, int *xc2, int *yc2);
void grph_bot2(int *xc1, int *yc1, int *xc2, int *yc2, int lvl);
|
474d87a3d0332230b1a0365b64f63f086b0d8e07 | e2021e9651b63a6ff9718ba628d3ad9f6b8ae981 | /2259/3469065_WA.cc | 41c17e7c41f650379ea61a7d1788374b8f604a66 | [
"Apache-2.0"
] | permissive | fanmengcheng/twilight-poj-solution | 36831f1a9b2d8bc020988e0606b240527a381754 | 3af3f0fb0c5f350cdf6421b943c6df02ee3f2f82 | refs/heads/master | 2020-04-08T22:36:47.267071 | 2015-05-26T10:21:03 | 2015-05-26T10:25:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,188 | cc | 3469065_WA.cc | #include<iostream>
using namespace std;
#define MAXN 1000
#define MAXINT 1000000
int qhead[MAXN];
int qtail[MAXN];
int s[MAXINT];
int qsize[MAXN];
int qpos[MAXN];
int qu[MAXN][MAXN];
int h,t,n,i,j,temp,p,test;
char str[10];
int main()
{
//freopen("d:/in.txt","r",stdin);
test=0;
while(scanf("%d",&n)&&n!=0)
{
test++;
printf("Scenario #%d\n",test);
for(i=0;i<n;++i)
{
scanf("%d",&p);
for(j=0;j<p;++j)
{
scanf("%d",&temp);
s[temp]=i;
}
}
memset(qhead,0,sizeof(int)*n);
memset(qtail,-1,sizeof(int)*n);
memset(qsize,0,sizeof(int)*n);
memset(qpos,-1,sizeof(int)*n);
h=0;
t=-1;
while(1)
{
scanf("%s",&str);
if(strcmp(str,"STOP")==0)
{
break;
}
if(strcmp(str,"ENQUEUE")==0)
{
scanf("%d",&temp);
int ss=s[temp];
int pp=qpos[ss];
if(pp<0)
{
t=(t+1)%MAXN;
qpos[ss]=t;
}
qtail[ss]=(qtail[ss]+1)%MAXN;
qu[qpos[ss]][qtail[ss]]=temp;
qsize[ss]++;
}
else
{
temp=qu[h][qhead[h]];
int ss=s[temp];
printf("%d\n",temp);
qhead[ss]=(qhead[ss]+1)%MAXN;
qsize[ss]--;
if(qsize[ss]==0)
{
h=(h+1)%MAXN;
qpos[ss]=-1;
}
}
}
}
return 0;
} |
56ce357406ec80a278668a530288ca5b29394307 | 2af4a134ad9176f26e3d0d8b81d268dd0c15ec7a | /2d/main.cpp | d5246628c0fdde9bd7c4b355614aba8e18d8d935 | [
"MIT"
] | permissive | kychern/gbc | 12e1cc2d791968c8e9403456295470f7247151f1 | 7436053037c8627a9e0a5d0877f8df76facbe322 | refs/heads/master | 2020-03-16T19:22:12.571591 | 2018-05-10T15:39:08 | 2018-05-10T15:39:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,524 | cpp | main.cpp | // Copyright Dmitry Anisimov danston@ymail.com (c) 2016-2017.
// Some examples on how to use the coordinate classes.
// README:
/*
A quick way to incorporate my code in your code is to implement a wrapper that converts data
stored in your data structures to my data structures. As a quick example:
std::vector<VertexR2> square(4);
square[0] = VertexR2(YourPointClass.x(), YourPointClass.y());
square[1] = VertexR2(YourPointClass.x(), YourPointClass.y());
square[2] = VertexR2(YourPointClass.x(), YourPointClass.y());
square[3] = VertexR2(YourPointClass.x(), YourPointClass.y());
VertexR2 centre(YourPointClass.x(), YourPointClass.y());
std::vector<double> result;
MyBarycentricClassR2 bary(square);
bary.compute(centre, result);
Below you can find other examples. For more information see README.md.
*/
// Local includes.
#include "./coords/MeanValueR2.hpp"
#include "./coords/HarmonicR2.hpp"
#include "./extra/MeshR2.hpp"
#include "./extra/TriangulatorR2.hpp"
#include "./extra/AllCoordinatesR2.hpp"
#include "./extra/TestCoordinatesR2.hpp"
// Examples.
int main() {
using namespace gbc;
// Polygon.
std::vector<VertexR2> poly(4);
poly[0] = VertexR2(0.1, 0.1);
poly[1] = VertexR2(1.0, 0.0);
poly[2] = VertexR2(0.9, 0.9);
poly[3] = VertexR2(0.2, 1.0);
// 1. Pointwise example.
// Evaluation point.
VertexR2 centre(0.5, 0.5);
// Storage for the computed barycentric coordinates.
std::vector<double> b;
// Compute mean value coordinates.
MeanValueR2 pbc(poly);
pbc.compute(centre, b);
// Output the resulting coordinates.
std::cout << "\nPointwise result: ";
for (size_t i = 0; i < b.size(); ++i) std::cout << b[i] << " ";
std::cout << "\n\n";
// 2. Mesh-based example.
// Create evaluation points.
const double edgeLength = 0.05;
// Refine the polygon to create regular mesh.
std::vector<VertexR2> refined;
const size_t n = poly.size();
for (size_t i = 0; i < n; ++i) {
refined.push_back(poly[i]);
const size_t ip = (i + 1) % n;
const size_t numS = ceil((poly[ip] - poly[i]).length() / edgeLength);
for (size_t j = 1; j < numS; ++j) {
VertexR2 vert = poly[i] + (double(j) / double(numS)) * (poly[ip] - poly[i]);
refined.push_back(vert);
}
}
// Create mesh.
TriangulatorR2 tri(refined, edgeLength, true);
tri.setPlanarGraph(true);
std::vector<VertexR2> queries;
std::vector<Face> faces;
tri.generate(queries, faces);
MeshR2 mesh;
mesh.initialize(queries, faces);
// Clean mesh from the polygon vertices.
std::vector<VertexR2> cleaned;
for (size_t i = 0; i < mesh.numVertices(); ++i) {
if (mesh.vertices()[i].type == INTERIOR || mesh.vertices()[i].type == FLAT)
cleaned.push_back(mesh.vertices()[i]);
}
// Storage for the computed barycentric coordinates.
std::vector<std::vector<double> > bb;
// Compute harmonic coordinates.
// Here the set of points must exclude the polygon's vertices!
// Excluding the polygon's vertices is necessary only for Harmonic and Local coordinates!
HarmonicR2 mbc(poly);
mbc.compute(cleaned, bb);
// You can also compute the coordinates given some edgeLength
// of the average triangle in the internal triangle mesh.
// mbc.compute(edgeLength, bb);
// Output the resulting coordinates.
std::cout << "Mesh-based result: \n";
for (size_t i = 0; i < bb.size(); ++i) {
for (size_t j = 0; j < bb[i].size(); ++j)
std::cout << bb[i][j] << " ";
std::cout << std::endl;
}
std::cout << "\n";
// 3. Example with all coordinates, where we print them in eps.
// Index of the printed basis function.
const size_t coordInd = 0;
// Change to your path here!
const std::string path = "/Users/path_to_the_folder/gbc/2d/out/";
// Compute and draw all coordinates.
AllCoordinatesR2 all(poly);
all.setPower(0.5); // for three-point coordinates
all.setIntegralPrecision(100); // for Gordon-Wixom and positive Gordon-Wixom coordinates
all.setEdgeLength(edgeLength); // for local coordinates
all.print(path, queries, faces, coordInd);
// 4. Example, where we test different properties of barycentric coordinates.
std::cout << "Test coordinates:\n";
TestCoordinatesR2 test;
test.make();
std::cout << "\n";
}
|
54d44da945ff4f85fe643ba3c9a97387197d9733 | daca8431e24ce78ea70ed32e9bb97ccb70b6f8d6 | /Src/Engine/Core/Vulkan/vulkanManager.h | 85334774c1fb324c8b14cefbadb15d9cffdbd4b2 | [] | no_license | kevomacartney/Venus | 6f947bf7d4301be87e6227d3c8a18ff0be2cd9ac | 686e302cf5a1387aeda24bf338de37a9bc010c0e | refs/heads/master | 2023-06-29T12:39:08.539896 | 2020-05-13T14:20:13 | 2020-05-13T14:20:13 | 244,494,730 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 298 | h | vulkanManager.h | //
// Created by Kelvin Macartney on 04/03/2020.
//
#ifndef VENUS_VULKANMANAGER_H
#define VENUS_VULKANMANAGER_H
namespace Venus::Core::Vulkan {
class VulkanManager {
public:
VulkanManager() = default;
~VulkanManager() = default;
};
}
#endif //VENUS_VULKANMANAGER_H
|
5d8167c54b89594fb2eb81b24fc99716babaf132 | e2f5c3367ba345dc15c8fdc75d6f6d720ef522ef | /Grid Based dp/Min cost path + intro grid.cpp | d8fee2f59f22716dd9919350eb2bcd902b34481d | [] | no_license | mansikagrawal/GEEKS-FOR-GEEKS-INTERVIEW-PRACTICE | 5f9ca6b75d88a56c977042efde1615408b65e357 | d43dc3460332b17223d0598dda52b931dacd10cb | refs/heads/master | 2022-12-13T10:52:40.770889 | 2020-09-22T16:03:05 | 2020-09-22T16:03:05 | 261,119,447 | 5 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 1,104 | cpp | Min cost path + intro grid.cpp | /* Grid based dp
This section can contain two type of problems
1) Given a matrix with each block some cost find a path to reach
one end to another end with min cost.
2) Find the number of ways to reach one end to another end. */
#include <bits/stdc++.h>
using namespace std;
#define R 3
#define C 3
int dp[3][3];
int cost[R][C] = { { 1, 2, 3 },
{ 4, 8, 2 },
{ 1, 5, 3 } };
int grid_dp()
{
for (int i = 0; i < R; i++) {
for (int j = 0; j < C; j++) {
// base case
if (i == 0 and j == 0) {
dp[i][j] = cost[0][0];
}
else if (j == 0) {
dp[i][j] = dp[i - 1][0] + cost[i][0];
}
else if (i == 0) {
dp[i][j] = dp[0][j - 1] + cost[0][j];
}
else {
dp[i][j] = min(dp[i - 1][j], dp[i][j - 1]) + cost[i][j];
}
}
}
}
int main()
{
grid_dp();
for (int i = 0; i < R; i++) {
cout << endl;
for (int j = 0; j < C; j++) {
cout << dp[i][j] << " ";
}
}
return 0;
}
|
fd7d18e7e4de8260d296306f131a77b9e42d95e6 | cf413a0e9bf3d1d54a9dca23d17b3c63b0a0291c | /Solve/2749.cpp | c93944eb04ffba6b22900ce3ff484add16483d6d | [] | no_license | ruru14/noj.am | 4d7dabf642f205bf901e595aaed1168469ef1b9f | b89b4f7372c357fbb8e567dafd8ba306fd01a200 | refs/heads/master | 2021-11-27T16:48:39.438279 | 2021-09-16T06:45:21 | 2021-09-16T06:45:21 | 130,633,719 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 327 | cpp | 2749.cpp | #include "2749.h"
int mem[1500001] = { 0, };
int fibo(unsigned long long n) {
if (n < 2)
return n;
if (mem[n] == 0)
mem[n] = (fibo(n - 1) % 1000000 + fibo(n - 2) % 1000000) % 1000000;
return mem[n];
}
void nojam2749::solution()
{
unsigned long long n;
scanf("%lld", &n);
n = n % 1500000;
printf("%d", fibo(n));
}
|
da88836a26a763caa0bf6b0eea731be72fb01fcd | f77606954ffedf1b78f3678db105e5c616b6ba3b | /cocos2d-x-2.2.2/projects/motoGame/Classes/Util/widget/LabelView.h | 87e528f04afe749c4e0d04f578a7a7da13fb593d | [
"MIT"
] | permissive | xbinglzh/my1netFrameWork | 6efe27135d365707a03c9d5f7a8702e7ea18c1e6 | bb6cd0da829ce66f7490b48448966d3c8267878d | refs/heads/master | 2016-09-06T19:05:47.493963 | 2014-07-28T11:55:43 | 2014-07-28T11:55:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,251 | h | LabelView.h | //
// LabelView.h
// iLostCity
//
// Created by user on 13-5-22.
//
//
#ifndef iLostCity_LabelView_h
#define iLostCity_LabelView_h
#include <list>
#include "cocos2d.h"
USING_NS_CC;
class CCLabelTTFStroke;
class LabelView : public CCNodeRGBA {
public:
LabelView();
~LabelView();
static LabelView *createWithFontStyle(const char *string, const char * styleId,
const CCSize& dimensions = CCSizeZero,
CCTextAlignment hAlignment = kCCTextAlignmentLeft,
CCVerticalTextAlignment vAlignment = kCCVerticalTextAlignmentTop);
bool initWithString(const char *string, const char *fontName,
float fontSize,
const CCSize& dimensions,
CCTextAlignment hAlignment,
CCVerticalTextAlignment vAlignment);
bool initWithFontType(const char *string, const char *fontName,
float fontSize, int type,
const CCSize& dimensions,
CCTextAlignment hAlignment,
CCVerticalTextAlignment vAlignment,
const cocos2d::ccColor3B& colStroke = ccc3(0, 0, 0));
private:
static LabelView *create(const char *string, const char *fontName,
float fontSize = -1,
const CCSize& dimensions = CCSizeZero,
CCTextAlignment hAlignment = kCCTextAlignmentLeft,
CCVerticalTextAlignment vAlignment = kCCVerticalTextAlignmentTop);
private:
CCRenderTexture *createStroke(CCLabelTTF *labelTTF, const int size, ccColor3B sideColor);
public:
void setFontStyleWithId(const char *styleId);
void setString(const char *label);
const char* getString(void);
void setColor(const ccColor3B& color3);
const ccColor3B &getColor();
CCTextAlignment getHorizontalAlignment();
void setHorizontalAlignment(CCTextAlignment alignment);
CCVerticalTextAlignment getVerticalAlignment();
void setVerticalAlignment(CCVerticalTextAlignment verticalAlignment);
CCSize getDimensions();
void setDimensions(const CCSize &dim);
float getFontSize();
void setFontSize(float fontSize);
const char* getFontName();
void setFontName(const char *fontName);
private:
CCLabelTTF *_labelTTF; //type = 1
CCLabelBMFont *_labelBMFont; //type = 2
CCLabelTTFStroke *_labelTTFStroke; //type = 3;
};
LabelView* createLabelInParentCenter(CCNode * parent,
const char *string,
const char * styleId,
bool removeAllChildren = false);
LabelView* createLabelInParentLeftCenter(CCNode * parent,
const char *string,
const char * styleId,
bool removeAllChildren = false);
LabelView* createLabelTTFItem(CCNode * parent,
const char *string,
const char * styleId,
const bool resetAll = false);
#endif
|
5b59d4cacc65a58b41f6c87399ff5d937be371e1 | 745f5ca4aab736a051342cce970a7232fe65aeca | /GLAC/GLAC/GLAData.cpp | dea93ff5720dd9f30b700ede661773d2a2037961 | [] | no_license | kiddove/nikki | cdf7bd3d83458090a979cf067bd05be9459221a1 | dfbe1db92159f4a80b32318a870b3c522a89ec8f | refs/heads/master | 2021-01-21T04:31:59.582089 | 2016-06-28T19:14:27 | 2016-06-28T19:14:27 | 13,760,340 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 59,779 | cpp | GLAData.cpp | #include "StdAfx.h"
#include "GLAData.h"
GLAData::GLAData(void)
{
int i1 = sizeof(GLA14);
int i2 = sizeof(GLA01_MAIN);
int i3 = sizeof(GLA01_LONG);
int i4 = sizeof(GLA01_SHORT);
ASSERT(i1 == 10000);
ASSERT(i2 == 4660);
ASSERT(i3 == 4660);
ASSERT(i4 == 4660);
}
GLAData::~GLAData(void)
{
if (m_LogFile.m_hFile != INVALID_HANDLE_VALUE)
m_LogFile.Close();
}
bool GLAData::Init()
{
// Get Current Directory
TCHAR szPath[MAX_PATH_LEN]={0};
GetModuleFileName(NULL, szPath, MAX_PATH_LEN);
(_tcsrchr(szPath, _T('\\')))[1] = 0;
CString strPath(szPath);
strPath += CONFIG_FILE_NAME;
m_strIniFilePath = strPath;
try
{
if (!m_LogFile.Open(_T("./Log.txt"), CFile::modeCreate | CFile::modeReadWrite | CFile::shareDenyNone | CFile::modeNoTruncate))
{
DWORD dwError = ::GetLastError();
TRACE(_T("open log file failed.(Error:%d)\n"), dwError);
}
//int iLen = m_LogFile.GetLength();
m_LogFile.Seek(0, CFile::end);
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
TRACE(_T("CFileException catched when open log file. [%s]\n"), szError);
}
m_bBigEndian = IsBigEndian();
TCHAR szPath14[MAX_PATH_LEN]={0};
GetPrivateProfileString(_T("GLA14"), _T("FilePath"), _T(""), szPath14, sizeof(szPath14), strPath);
m_strData14FileDir.Format(_T("%s"), szPath14);
//m_bufSize_GLA14 = GetPrivateProfileInt(_T("GLA14"), _T("BufferSize"), 0, strPath);
memset(szPath14, 0, MAX_PATH_LEN);
GetPrivateProfileString(_T("GLA01"), _T("FilePath"), _T(""), szPath14, sizeof(szPath14), strPath);
m_strData01FileDir.Format(_T("%s"), szPath14);
if (m_strData14FileDir.IsEmpty())
{
//TRACE(_T("read config file path failed.(GLA14)\n"));
WriteLog("read config file path failed.(GLA14)");
return false;
}
if (m_strData01FileDir.IsEmpty())
{
//TRACE(_T("read config file path failed.(GLA01)\n"));
WriteLog("read config file path failed.(GLA01)");
return false;
}
m_strData01FileDir += _T("*.*");
m_strData14FileDir += _T("*.*");
m_iLatMin = GetPrivateProfileInt(_T("Latitude"), _T("Min"), 0, strPath);
m_iLatMax = GetPrivateProfileInt(_T("Latitude"), _T("Max"), 0, strPath);
m_iLonMin = GetPrivateProfileInt(_T("Longitude"), _T("Min"), 0, strPath);
m_iLonMax = GetPrivateProfileInt(_T("Longitude"), _T("Max"), 0, strPath);
return true;
}
bool GLAData::IsInvalid(CString& strFile, int& stLen)
{
CFile f;
try
{
if (f.Open(strFile, CFile::modeRead))
{
int ilen = (int)f.GetLength();
f.Close();
int isize = sizeof(stLen);
if (ilen % isize != 0)
{
//TRACE(_T("Invalid File length!\n"));
CString strErr;
strErr.Format(_T("Invalid File length! [%s]"), strFile);
WriteLog(strErr);
return false;
}
else
return true;
}
else
{
DWORD dwError = ::GetLastError();
//TRACE(_T("IsInvalid --- open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
CString strErr;
strErr.Format(_T("IsInvalid --- open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
WriteLog(strErr);
}
return false;
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
//TRACE(_T("CFileException catched. [%s]\n"), szError);
CString strErr;
strErr.Format(_T("CFileException catched. [%s]\n"), szError);
WriteLog(strErr);
return false;
}
return true;
}
void GLAData::GetLength(CString& strFile, int& headLen, int& stLen)
{
headLen = 0;
stLen = 0;
int RecNum = 0;
CStdioFile stdf;
try
{
if (stdf.Open(strFile, CFile::modeRead))
{
CString strRecl, strNumhead;
stdf.ReadString(strRecl);
stdf.ReadString(strNumhead);
stdf.Close();
strRecl.Trim();
if (strRecl.Find(_T("Recl")) == 0)
{
int po1 = strRecl.Find(_T('='));
int po2 = strRecl.Find(_T(';'));
CString sRecl = strRecl.Mid(po1 + 1, po2 - po1 - 1);
stLen = atoi(sRecl);
}
if (strNumhead.Find(_T("Numhead")) == 0)
{
int po1 = strNumhead.Find(_T('='));
int po2 = strNumhead.Find(_T(';'));
CString sNum = strNumhead.Mid(po1 + 1, po2 - po1 - 1);
RecNum = atoi(sNum);
headLen = RecNum * stLen;
}
}
else
{
DWORD dwError = ::GetLastError();
TRACE(_T("open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
TRACE(_T("CFileException catched. [%s]\n"), szError);
}
}
void GLAData::ReadGLA01()
{
m_indexMin = INT_MAX;
m_indexMax = INT_MIN;
// output file
try
{
CString strOutput;
strOutput.Format(_T("./DataFile01_%s.txt"), m_strMark);
if (!m_DataFile01.Open(strOutput, CFile::modeCreate | CFile::modeReadWrite | CFile::shareDenyNone))
{
DWORD dwError = ::GetLastError();
CString strErr;
strErr.Format(_T("open OutputData01 file failed.(Error:%d)"), dwError);
WriteLog(strErr);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
CString strErr;
strErr.Format(_T("CFileException catched when open OutputData01 file. [%s]"), szError);
WriteLog(strErr);
}
CFileFind ff;
BOOL bFind = ff.FindFile(m_strData01FileDir);
int iCount = 0;
while (bFind)
{
bFind = ff.FindNextFile();
if (!ff.IsDirectory() && !ff.IsDots())
{
CString strFile;
strFile = ff.GetFilePath();
CString strName = ff.GetFileName();
int iPos = strName.Find(_T('_'));
CString strTemp = strName.Left(iPos);
if (strTemp.CompareNoCase(_T("GLA01")) == 0)
{
iPos = strName.Find(_T('_'), iPos + 1);
int iPos2 = strName.Find(_T('_'), iPos+1);
CString strMark = strName.Mid(iPos + 1, iPos2 - iPos - 1);
if (m_strMark.CompareNoCase(strMark) == 0)
{
int it = 0;
int iHeader = 0, istLen = 0;
GetLength(strFile, iHeader, istLen);
if (!this->IsInvalid(strFile, istLen))
return;
if (m_bBigEndian)
{
CFile f;
try
{
if (f.Open(strFile, CFile::modeRead))
{
m_iCount01 = 0;
int ilen = (int)f.GetLength();
int iCount =(ilen - iHeader) / istLen;
char* pBuffer = new char[istLen];
f.Seek(iHeader, CFile::begin);
for (int i = 0; i < iCount; i++)
{
memset(pBuffer, 0, istLen);
f.Read(pBuffer, istLen);
TraversalData01_Big(pBuffer);
}
delete pBuffer;
f.Close();
CString strInfo;
strInfo.Format(_T("\ntotal %d record in file : %s, max : %d, min : %d\n\n\n"), m_iCount01, strFile, m_indexMax, m_indexMin);
m_DataFile01.WriteString(strInfo);
}
else
{
DWORD dwError = ::GetLastError();
TRACE(_T("ReadGLA01 --- open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
TRACE(_T("CFileException catched. [%s]\n"), szError);
}
}
else
{
CFile f;
try
{
if (f.Open(strFile, CFile::modeRead))
{
m_iCount01 = 0;
int ilen = (int)f.GetLength();
char* pBuffer = new char[istLen];
int iCount =(ilen - iHeader) / istLen;
f.Seek(iHeader, CFile::begin);
for (int i = 0; i < iCount; i++)
{
memset(pBuffer, 0, istLen);
f.Read(pBuffer, istLen);
TraversalData01_Little(pBuffer);
}
delete pBuffer;
f.Close();
CString strInfo;
strInfo.Format(_T("\ntotal %d record in file : %s, max : %d, min : %d\n\n\n"), m_iCount01, strFile, m_indexMax, m_indexMin);
m_DataFile01.WriteString(strInfo);
}
else
{
DWORD dwError = ::GetLastError();
TRACE(_T("ReadGLA01 --- open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
TRACE(_T("CFileException catched. [%s]\n"), szError);
}
}
}
}
}
}
if (m_DataFile01.m_hFile != INVALID_HANDLE_VALUE)
m_DataFile01.Close();
return;
}
// big endian or little endian
void GLAData::ReadGLA14()
{
m_Search_Rec_Index.clear();
// output file
try
{
if (!m_DataFile14.Open("./DataFile14.txt", CFile::modeCreate | CFile::modeReadWrite | CFile::shareDenyNone))
{
DWORD dwError = ::GetLastError();
//TRACE(_T("open OutputData14 file failed.(Error:%d)\n"), dwError);
CString strErr;
strErr.Format(_T("open OutputData14 file failed.(Error:%d)\n"), dwError);
WriteLog(strErr);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
//TRACE(_T("CFileException catched when open OutputData14 file. [%s]\n"), szError);
CString strErr;
strErr.Format(_T("CFileException catched when open OutputData14 file. [%s]\n"), szError);
WriteLog(strErr);
}
CFileFind ff;
BOOL bFind = ff.FindFile(m_strData14FileDir);
int iCount = 0;
while (bFind)
{
bFind = ff.FindNextFile();
if (!ff.IsDirectory() && !ff.IsDots())
{
CString strFile;
strFile = ff.GetFilePath();
// GLA14_633_2123_001_1331_0_01_0001.DAT
CString strName = ff.GetFileName();
int iPos = strName.Find(_T('_'));
CString strTemp = strName.Left(iPos);
if (strTemp.CompareNoCase(_T("GLA14")) == 0)
{
iPos = strName.Find(_T('_'), iPos + 1);
int iPos2 = strName.Find(_T('_'), iPos+1);
//iPos2 = strName.Find(_T('_'), iPos2+1);
//iPos2 = strName.Find(_T('_'), iPos2+1);
// ipos2-1, ipos + 1
m_strMark = strName.Mid(iPos + 1, iPos2 - iPos - 1);
int it = 0;
int iHeader = 0, istLen = 0;
GetLength(strFile, iHeader, istLen);
if (!this->IsInvalid(strFile, istLen))
return;
if (m_bBigEndian)
{
CFile f;
try
{
if (f.Open(strFile, CFile::modeRead))
{
m_iCount14 = 0;
int ilen = (int)f.GetLength();
int iCount =(ilen - iHeader) / istLen;
char* pBuffer = new char[istLen];
f.Seek(iHeader, CFile::begin);
for (int i = 0; i < iCount; i++)
{
memset(pBuffer, 0, istLen);
f.Read(pBuffer, istLen);
TraversalData14_Big(pBuffer);
}
delete pBuffer;
f.Close();
CString strInfo;
strInfo.Format(_T("\ntotal %d record in file : %s\n\n\n"), m_iCount14, strFile);
m_DataFile14.WriteString(strInfo);
}
else
{
DWORD dwError = ::GetLastError();
TRACE(_T("ReadGLA14 --- open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
TRACE(_T("CFileException catched. [%s]\n"), szError);
}
}
else
{
CFile f;
try
{
if (f.Open(strFile, CFile::modeRead))
{
m_iCount14 = 0;
int ilen = (int)f.GetLength();
int iCount =(ilen - iHeader) / istLen;
char* pBuffer = new char[istLen];
f.Seek(iHeader, CFile::begin);
for (int i = 0; i < iCount; i++)
{
memset(pBuffer, 0, istLen);
f.Read(pBuffer, istLen);
TraversalData14_Little(pBuffer);
}
delete pBuffer;
f.Close();
CString strInfo;
strInfo.Format(_T("\ntotal %d record in file : %s\n\n\n"), m_iCount14, strFile);
m_DataFile14.WriteString(strInfo);
}
else
{
DWORD dwError = ::GetLastError();
TRACE(_T("ReadGLA14 --- open file failed.(Error:%d, path:%s)\n"), dwError, strFile);
}
}
catch(CFileException* e)
{
TCHAR szError[MAX_PATH_LEN];
e->GetErrorMessage(szError, MAX_PATH_LEN);
TRACE(_T("CFileException catched. [%s]\n"), szError);
}
}
ReadGLA01();
}
}
}
if (m_DataFile14.m_hFile != INVALID_HANDLE_VALUE)
m_DataFile14.Close();
return;
}
void GLAData::WriteLog(CString strLog)
{
COleDateTime dt = COleDateTime::GetCurrentTime();
CString strTime = dt.Format(_T("%Y-%m-%d %H:%M:%S : "));
CString str;
str.Format(_T("%s%s\n"), strTime, strLog);
m_LogFile.WriteString(str);
}
void GLAData::TraversalData14_Little(char *pBuffer)
{
GLA14* pData = (GLA14*)pBuffer;
bool bMark = false;
for (int i = 0; i < 40; i ++)
{
if (pData->i_FRir_qaFlag[i] != 15)
return;
}
for (int i = 0; i < 40; i++)
{
int iLat = htonl(pData->i_lat[i]);
int iLon = htonl(pData->i_lon[i]);
if (m_iLatMin <= iLat && iLat <= m_iLatMax
&& m_iLonMin <= iLon && iLon <= m_iLonMax)
{
bMark = true;
}
}
if (bMark)
{
if (m_DataFile14.m_hFile != INVALID_HANDLE_VALUE)
{
CString str;
str.Format(_T("Record : %d\n"), m_iCount14);
m_DataFile14.WriteString(str);
}
m_iCount14++;
PrintData14_Little(pBuffer);
}
}
void GLAData::PrintData14_Little(char* pBuffer)
{
if (m_DataFile14.m_hFile == INVALID_HANDLE_VALUE)
{
WriteLog(_T("Output DataFile14 is invalid!"));
return;
}
GLA14* pData = (GLA14*)pBuffer;
CString strOutput;
int iCount = 0;
//i_rec_ndx
strOutput.Format(_T("i_rec_ndx : %d\n"), htonl(pData->i_rec_ndx));
m_DataFile14.WriteString(strOutput);
iCount ++;
m_Search_Rec_Index.insert(htonl(pData->i_rec_ndx));
return;
//i_UTCTime[2];
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_UTCTime[%.2d] : %d\n"), i, htonl(pData->i_UTCTime[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_transtime
strOutput.Format(_T("i_transtime : %d\n"), htons(pData->i_transtime));
m_DataFile14.WriteString(strOutput);
iCount ++;
//i_Spare1[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_Spare1[%.2d] : %d\n"), i, pData->i_Spare1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_deltagpstmcor
strOutput.Format(_T("i_deltagpstmcor : %d\n"), htonl(pData->i_deltagpstmcor));
m_DataFile14.WriteString(strOutput);
iCount ++;
//i_dShortTime[39]
for (int i = 0; i < 39; i++)
{
strOutput.Format(_T("i_dShortTime[%.2d] : %d\n"), i, htonl(pData->i_dShortTime[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_lat[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_lat[%.2d] : %d\n"), i, htonl(pData->i_lat[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_lon[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_lon[%.2d] : %d\n"), i, htonl(pData->i_lon[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_elev[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_elev[%.2d] : %d\n"), i, htonl(pData->i_elev[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_campaign[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_campaign[%.2d] : %d\n"), i, pData->i_campaign[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare40
strOutput.Format(_T("i_spare40 : %d\n"), htons(pData->i_spare40));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_cycTrk
strOutput.Format(_T("i_cycTrk : %d\n"), htonl(pData->i_cycTrk));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_localSolarTime
strOutput.Format(_T("i_localSolarTime : %d\n"), htonl(pData->i_localSolarTime));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare41[7]
for (int i = 0; i < 7; i++)
{
strOutput.Format(_T("i_spare41[%.2d] : %d\n"), i, htonl(pData->i_spare41[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_deltaEllip[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_deltaEllip[%.2d] : %d\n"), i, htons(pData->i_deltaEllip[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_beamCoelv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_beamCoelv[%.2d] : %d\n"), i, htonl(pData->i_beamCoelv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_beamAzimuth[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_beamAzimuth[%.2d] : %d\n"), i, htonl(pData->i_beamAzimuth[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_d2refTrk[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_d2refTrk[%.2d] : %d\n"), i, htonl(pData->i_d2refTrk[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_SigBegOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_SigBegOff[%.2d] : %d\n"), i, htonl(pData->i_SigBegOff[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_DEM_hires_src[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_DEM_hires_src[%.2d] : %d\n"), i, pData->i_DEM_hires_src[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_DEMhiresArelv[9][40]
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_DEMhiresArelv[%.2d][%.2d] : %d\n"), i, j, htons(pData->i_DEMhiresArelv[i][j]));
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_ElevBiasCorr[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ElevBiasCorr[%.2d] : %d\n"), i, htons(pData->i_ElevBiasCorr[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare42[4][40]
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_spare42[%.2d][%.2d] : %d\n"), i, j, htons(pData->i_spare42[i][j]));
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_sigmaatt[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_sigmaatt[%.2d] : %d\n"), i, htons(pData->i_sigmaatt[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_Azimuth
strOutput.Format(_T("i_Azimuth : %d\n"), htonl(pData->i_Azimuth));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_AolAng
strOutput.Format(_T("i_AolAng : %d\n"), htonl(pData->i_AolAng));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpintensity_avg
strOutput.Format(_T("i_tpintensity_avg : %d\n"), htonl(pData->i_tpintensity_avg));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpazimuth_avg
strOutput.Format(_T("i_tpazimuth_avg : %d\n"), htons(pData->i_tpazimuth_avg));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpeccentricity_avg
strOutput.Format(_T("i_tpeccentricity_avg : %d\n"), htons(pData->i_tpeccentricity_avg));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpmajoraxis_avg
strOutput.Format(_T("i_tpmajoraxis_avg : %d\n"), htons(pData->i_tpmajoraxis_avg));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_poleTide[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_poleTide[%.2d] : %d\n"), i, pData->i_poleTide[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_gdHt[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_gdHt[%.2d] : %d\n"), i, htons(pData->i_gdHt[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_erElv[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_erElv[%.2d] : %d\n"), i, htons(pData->i_erElv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spElv[4]
for (int i = 0; i < 4; i++)
{
strOutput.Format(_T("i_spElv[%.2d] : %d\n"), i, htons(pData->i_spElv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ldElv[4]
for (int i = 0; i < 4; i++)
{
strOutput.Format(_T("i_ldElv[%.2d] : %d\n"), i, htons(pData->i_ldElv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare12[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_spare12[%.2d] : %d\n"), i, htons(pData->i_spare12[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_wTrop[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_wTrop[%.2d] : %d\n"), i, htons(pData->i_wTrop[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_dTrop[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_dTrop[%.2d] : %d\n"), i, htons(pData->i_dTrop[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_surfType
strOutput.Format(_T("i_surfType : %d\n"), pData->i_surfType);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare11[3]
for (int i = 0; i < 3; i++)
{
strOutput.Format(_T("i_spare11[%.2d] : %d\n"), i, pData->i_spare11[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_DEM_elv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_DEM_elv[%.2d] : %d\n"), i, htonl(pData->i_DEM_elv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_refRng[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_refRng[%.2d] : %d\n"), i, htonl(pData->i_refRng[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare47[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_spare47[%.2d] : %d\n"), i, htonl(pData->i_spare47[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ldRngOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ldRngOff[%.2d] : %d\n"), i, htonl(pData->i_ldRngOff[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_SigEndOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_SigEndOff[%.2d] : %d\n"), i, htonl(pData->i_SigEndOff[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_gpCntRngOff[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_gpCntRngOff[%.2d][%.2d] : %d\n"), i, j, htonl(pData->i_gpCntRngOff[i][j]));
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_reflctUC[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_reflctUC[%.2d] : %d\n"), i, htonl(pData->i_reflctUC[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_reflCor_atm
strOutput.Format(_T("i_reflCor_atm : %d\n"), htonl(pData->i_reflCor_atm));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_maxSmAmp[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_maxSmAmp[%.2d] : %d\n"), i, htons(pData->i_maxSmAmp[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ocElv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ocElv[%.2d] : %d\n"), i, htons(pData->i_ocElv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_numPk[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_numPk[%.2d] : %d\n"), i, pData->i_numPk[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_kurt1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_kurt1[%.2d] : %d\n"), i, htons(pData->i_kurt1[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_skew1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_skew1[%.2d] : %d\n"), i, htons(pData->i_skew1[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare4[160]
for (int i = 0; i < 160; i++)
{
strOutput.Format(_T("i_spare4[%.3d] : %d\n"), i, pData->i_spare4[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_Gamp[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_Gamp[%.2d][%.2d] : %d\n"), i, j, htonl(pData->i_Gamp[i][j]));
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_Garea[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_Garea[%.2d][%.2d] : %d\n"), i, j, htonl(pData->i_Garea[i][j]));
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_gsinma[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_gsinma[%.2d][%.2d] : %d\n"), i, j, htonl(pData->i_gsinma[i][j]));
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_nPeaks1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_nPeaks1[%.2d] : %d\n"), i, pData->i_nPeaks1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_LandVar[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_LandVar[%.2d] : %d\n"), i, htons(pData->i_LandVar[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ElvuseFlg[5]
for (int i = 0; i < 5; i++)
{
strOutput.Format(_T("i_ElvuseFlg[%.2d] : %d\n"), i, pData->i_ElvuseFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_atm_avail
strOutput.Format(_T("i_atm_avail : %d\n"), pData->i_atm_avail);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare16[4]
for (int i = 0; i < 4; i++)
{
strOutput.Format(_T("i_spare16[%.2d] : %d\n"), i, pData->i_spare16[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_cld1_mswf
strOutput.Format(_T("i_cld1_mswf : %d\n"), pData->i_cld1_mswf);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_MRC_af
strOutput.Format(_T("i_MRC_af : %d\n"), pData->i_MRC_af);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare9[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_spare9[%.2d] : %d\n"), pData->i_spare9[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_ElvFlg[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ElvFlg[%.2d] : %d\n"), i, pData->i_ElvFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_rng_UQF[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_rng_UQF[%.2d] : %d\n"), i, htons(pData->i_rng_UQF[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare49[10]
for (int i = 0; i < 10; i++)
{
strOutput.Format(_T("i_spare49[%.2d] : %d\n"), i, pData->i_spare49[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_timecorflg
strOutput.Format(_T("i_timecorflg : %d\n"), htons(pData->i_timecorflg));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_APID_AvFlg[8]
for (int i = 0; i < 8; i++)
{
strOutput.Format(_T("i_APID_AvFlg[%.2d] : %d\n"), i, pData->i_APID_AvFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_AttFlg2[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_AttFlg2[%.2d] : %d\n"), i, pData->i_AttFlg2[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare5
strOutput.Format(_T("i_spare5 : %d\n"), pData->i_spare5);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_FrameQF
strOutput.Format(_T("i_FrameQF : %d\n"), pData->i_FrameQF);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_OrbFlg[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_OrbFlg[%.2d] : %d\n"), i, pData->i_OrbFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_rngCorrFlg[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_rngCorrFlg[%.2d] : %d\n"), i, pData->i_rngCorrFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_CorrStatFlg[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_CorrStatFlg[%.2d] : %d\n"), i, pData->i_CorrStatFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare15[8]
for (int i = 0; i < 8; i++)
{
strOutput.Format(_T("i_spare15[%.2d] : %d\n"), i, pData->i_spare15[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_Attflg1
strOutput.Format(_T("i_Attflg1 : %d\n"), htons(pData->i_Attflg1));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_Spare6[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_Spare6[%.2d] : %d\n"), i, pData->i_Spare6[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare44[120]
for (int i = 0; i < 120; i++)
{
strOutput.Format(_T("i_spare44[%.3d] : %d\n"), i, pData->i_spare44[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_satNdx[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satNdx[%.2d] : %d\n"), i, pData->i_satNdx[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_satElevCorr[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satElevCorr[%.2d] : %d\n"), i, htons(pData->i_satElevCorr[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_satCorrFlg[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satCorrFlg[%.2d] : %d\n"), i, pData->i_satCorrFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_satNrgCorr[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satNrgCorr[%.2d] : %d\n"), i, htons(pData->i_satNrgCorr[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare13[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_spare13[%.2d] : %d\n"), i, htons(pData->i_spare13[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_gval_rcv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_gval_rcv[%.2d] : %d\n"), i, htons(pData->i_gval_rcv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_RecNrgAll[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_RecNrgAll[%.2d] : %d\n"), i, htons(pData->i_RecNrgAll[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_FRir_cldtop[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_FRir_cldtop[%.2d] : %d\n"), i, htons(pData->i_FRir_cldtop[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_FRir_gaFlag[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_FRir_qaFlag[%.2d] : %d\n"), i, pData->i_FRir_qaFlag[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_atm_char_flag
strOutput.Format(_T("i_atm_char_flag : %d\n"), htons(pData->i_atm_char_flag));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_atm_char_conf
strOutput.Format(_T("i_atm_char_conf : %d\n"), htons(pData->i_atm_char_conf));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare48[36]
for (int i = 0; i < 36; i++)
{
strOutput.Format(_T("i_spare48[%.2d] : %d\n"), i, pData->i_spare48[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_FRir_intsig[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_FRir_intsig[%.2d] : %d\n"), i, htons(pData->i_FRir_intsig[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare14[120]
for (int i = 0; i < 120; i++)
{
strOutput.Format(_T("i_spare14[%.3d] : %d\n"), i, pData->i_spare14[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_Surface_temp
strOutput.Format(_T("i_Surface_temp : %d\n"), htons(pData->i_Surface_temp));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_Surface_pres
strOutput.Format(_T("i_Surface_pres : %d\n"), htons(pData->i_Surface_pres));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_Surface_relh
strOutput.Format(_T("i_Surface_relh : %d\n"), htons(pData->i_Surface_relh));
m_DataFile14.WriteString(strOutput);
iCount++;
//i_maxRecAmp[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_maxRecAmp[%.2d] : %d\n"), i, htons(pData->i_maxRecAmp[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_sDevNsOb1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_sDevNsOb1[%.2d] : %d\n"), i, htons(pData->i_sDevNsOb1[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare8[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_spare8[%.2d] : %d\n"), i, pData->i_spare8[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_isRngOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_isRngOff[%.2d] : %d\n"), i, htonl(pData->i_isRngOff[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_pctSAT[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_pctSAT[%.2d] : %d\n"), i, pData->i_pctSAT[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_TxNrg[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_TxNrg[%.2d] : %d\n"), i, htons(pData->i_TxNrg[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_eqElv[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_eqElv[%.2d] : %d\n"), i, htons(pData->i_eqElv[i]));
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare7[120]
for (int i = 0; i < 120; i++)
{
strOutput.Format(_T("i_spare7[%.3d] : %d\n"), i, pData->i_spare7[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
m_DataFile14.WriteString("\n------------------------------------------------------------\n\n");
ASSERT(iCount == 105);
}
void GLAData::TraversalData01_Little(char *pBuffer)
{
// main=1, long=2, or short=3
GLA01_SHORT* pData = (GLA01_SHORT*)pBuffer;
short iType = htons(pData->i_gla01_rectype);
//if (iType == 3)
//{
// short
int iIndex = htonl(pData->i_rec_ndx);
//TRACE("%d\n", iIndex);
m_indexMin = iIndex < m_indexMin ? iIndex : m_indexMin;
m_indexMax = iIndex > m_indexMax ? iIndex : m_indexMax;
std::set<int>::iterator iter = m_Search_Rec_Index.find(iIndex);
if (iter != m_Search_Rec_Index.end())
{
if (m_DataFile01.m_hFile != INVALID_HANDLE_VALUE)
{
CString str;
str.Format(_T("Record : %d\n"), m_iCount01);
m_DataFile01.WriteString(str);
}
m_iCount01++;
PrintData01_Little(pBuffer);
}
//}
}
void GLAData::PrintData01_Little(char* pBuffer)
{
if (m_DataFile01.m_hFile == INVALID_HANDLE_VALUE)
{
WriteLog(_T("Output DataFile01 is invalid!"));
return;
}
GLA01_SHORT* pData = (GLA01_SHORT*)pBuffer;
CString strOutput;
int iCount = 0;
//i_rec_ndx
strOutput.Format(_T("i_rec_ndx : %d\n"), htonl(pData->i_rec_ndx));
m_DataFile01.WriteString(strOutput);
iCount ++;
//i_UTCTime[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_UTCTime[%.2d] : %d\n"), i, htonl(pData->i_UTCTime[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_gla01_rectype
strOutput.Format(_T("i_gla01_rectype : %d\n"), htons(pData->i_gla01_rectype));
m_DataFile01.WriteString(strOutput);
iCount++;
//i_spare1
strOutput.Format(_T("i_spare1 : %d\n"), htons(pData->i_spare1));
m_DataFile01.WriteString(strOutput);
iCount++;
//i_filtnum[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_filtnum[%.2d] : %d\n"), i, pData->i_filtnum[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_shot_ctr[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_shot_ctr[%.2d] : %d\n"), i, htons(pData->i_shot_ctr[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//istatflags[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("istatflags[%.2d] : %d\n"), i, htonl(pData->istatflags[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_gainSet1064[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_gainSet1064[%.2d] : %d\n"), i, htons(pData->i_gainSet1064[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_4nsPeakVal[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_4nsPeakVal[%.2d] : %d\n"), i, htons(pData->i_4nsPeakVal[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_8nsPeakVal[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_8nsPeakVal[%.2d] : %d\n"), i, htons(pData->i_8nsPeakVal[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_4nsBgMead[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_4nsBgMead[%.2d] : %d\n"), i, (unsigned short)(htons(pData->i_4nsBgMead[i])));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_4nsBgSDEV[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_4nsBgSDEV[%.2d] : %d\n"), i, (unsigned short)(htons(pData->i_4nsBgSDEV[i])));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_samp_pad[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_samp_pad[%.2d] : %d\n"), i, htons(pData->i_samp_pad[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_comp_type[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_comp_type[%.2d] : %d\n"), i, pData->i_comp_type[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_rng_wf[200][20]
for (int i = 0; i < 200; i++)
{
for (int j = 0; j < 20; j++)
{
strOutput.Format(_T("i_rng_wf[%.3d][%.2d] : %d\n"), i, j, pData->i_rng_wf[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_gainStatus[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_gainStatus[%.2d] : %d\n"), i, pData->i_gainStatus[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_NumCoinc[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_NumCoinc[%.2d] : %d\n"), i, pData->i_NumCoinc[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_rawPkHt[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_rawPkHt[%.2d] : %d\n"), i, pData->i_rawPkHt[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_spare2[184]
for (int i = 0; i < 184; i++)
{
strOutput.Format(_T("i_spare2[%.2d] : %d\n"), i, pData->i_spare2[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
m_DataFile01.WriteString("\n------------------------------------------------------------\n\n");
ASSERT(iCount == 19);
}
void GLAData::TraversalData14_Big(char *pBuffer)
{
GLA14* pData = (GLA14*)pBuffer;
bool bMark = false;
for (int i = 0; i < 40; i ++)
{
if (pData->i_FRir_qaFlag[i] != 15)
return;
}
for (int i = 0; i < 40; i++)
{
int iLat = pData->i_lat[i];
int iLon = pData->i_lon[i];
if (m_iLatMin <= iLat && iLat <= m_iLatMax
&& m_iLonMin <= iLon && iLon <= m_iLonMax)
{
bMark = true;
}
}
if (bMark)
{
if (m_DataFile14.m_hFile != INVALID_HANDLE_VALUE)
{
CString str;
str.Format(_T("Record : %d\n"), m_iCount14);
m_DataFile14.WriteString(str);
}
m_iCount14++;
PrintData14_Big(pBuffer);
}
}
void GLAData::PrintData14_Big(char* pBuffer)
{
if (m_DataFile14.m_hFile == INVALID_HANDLE_VALUE)
{
WriteLog(_T("Output DataFile14 is invalid!"));
return;
}
GLA14* pData = (GLA14*)pBuffer;
CString strOutput;
int iCount = 0;
//i_rec_ndx
strOutput.Format(_T("i_rec_ndx : %d\n"), pData->i_rec_ndx);
m_DataFile14.WriteString(strOutput);
iCount ++;
m_Search_Rec_Index.insert(pData->i_rec_ndx);
return;
//i_UTCTime[2];
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_UTCTime[%.2d] : %d\n"), i, pData->i_UTCTime[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_transtime
strOutput.Format(_T("i_transtime : %d\n"), pData->i_transtime);
m_DataFile14.WriteString(strOutput);
iCount ++;
//i_Spare1[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_Spare1[%.2d] : %d\n"), i, pData->i_Spare1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_deltagpstmcor
strOutput.Format(_T("i_deltagpstmcor : %d\n"), pData->i_deltagpstmcor);
m_DataFile14.WriteString(strOutput);
iCount ++;
//i_dShortTime[39]
for (int i = 0; i < 39; i++)
{
strOutput.Format(_T("i_dShortTime[%.2d] : %d\n"), i, pData->i_dShortTime[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_lat[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_lat[%.2d] : %d\n"), i, pData->i_lat[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_lon[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_lon[%.2d] : %d\n"), i, pData->i_lon[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_elev[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_elev[%.2d] : %d\n"), i, pData->i_elev[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_campaign[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_campaign[%.2d] : %d\n"), i, pData->i_campaign[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare40
strOutput.Format(_T("i_spare40 : %d\n"), pData->i_spare40);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_cycTrk
strOutput.Format(_T("i_cycTrk : %d\n"), pData->i_cycTrk);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_localSolarTime
strOutput.Format(_T("i_localSolarTime : %d\n"), pData->i_localSolarTime);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare41[7]
for (int i = 0; i < 7; i++)
{
strOutput.Format(_T("i_spare41[%.2d] : %d\n"), i, pData->i_spare41[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_deltaEllip[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_deltaEllip[%.2d] : %d\n"), i, pData->i_deltaEllip[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_beamCoelv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_beamCoelv[%.2d] : %d\n"), i, pData->i_beamCoelv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_beamAzimuth[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_beamAzimuth[%.2d] : %d\n"), i, pData->i_beamAzimuth[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_d2refTrk[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_d2refTrk[%.2d] : %d\n"), i, pData->i_d2refTrk[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_SigBegOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_SigBegOff[%.2d] : %d\n"), i, pData->i_SigBegOff[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_DEM_hires_src[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_DEM_hires_src[%.2d] : %d\n"), i, pData->i_DEM_hires_src[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_DEMhiresArelv[9][40]
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_DEMhiresArelv[%.2d][%.2d] : %d\n"), i, j, pData->i_DEMhiresArelv[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_ElevBiasCorr[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ElevBiasCorr[%.2d] : %d\n"), i, pData->i_ElevBiasCorr[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare42[4][40]
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_spare42[%.2d][%.2d] : %d\n"), i, j, pData->i_spare42[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_sigmaatt[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_sigmaatt[%.2d] : %d\n"), i, pData->i_sigmaatt[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_Azimuth
strOutput.Format(_T("i_Azimuth : %d\n"), pData->i_Azimuth);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_AolAng
strOutput.Format(_T("i_AolAng : %d\n"), pData->i_AolAng);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpintensity_avg
strOutput.Format(_T("i_tpintensity_avg : %d\n"), pData->i_tpintensity_avg);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpazimuth_avg
strOutput.Format(_T("i_tpazimuth_avg : %d\n"), pData->i_tpazimuth_avg);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpeccentricity_avg
strOutput.Format(_T("i_tpeccentricity_avg : %d\n"), pData->i_tpeccentricity_avg);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_tpmajoraxis_avg
strOutput.Format(_T("i_tpmajoraxis_avg : %d\n"), pData->i_tpmajoraxis_avg);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_poleTide[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_poleTide[%.2d] : %d\n"), i, pData->i_poleTide[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_gdHt[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_gdHt[%.2d] : %d\n"), i, pData->i_gdHt[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_erElv[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_erElv[%.2d] : %d\n"), i, pData->i_erElv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spElv[4]
for (int i = 0; i < 4; i++)
{
strOutput.Format(_T("i_spElv[%.2d] : %d\n"), i, pData->i_spElv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ldElv[4]
for (int i = 0; i < 4; i++)
{
strOutput.Format(_T("i_ldElv[%.2d] : %d\n"), i, pData->i_ldElv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare12[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_spare12[%.2d] : %d\n"), i, pData->i_spare12[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_wTrop[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_wTrop[%.2d] : %d\n"), i, pData->i_wTrop[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_dTrop[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_dTrop[%.2d] : %d\n"), i, pData->i_dTrop[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_surfType
strOutput.Format(_T("i_surfType : %d\n"), pData->i_surfType);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare11[3]
for (int i = 0; i < 3; i++)
{
strOutput.Format(_T("i_spare11[%.2d] : %d\n"), i, pData->i_spare11[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_DEM_elv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_DEM_elv[%.2d] : %d\n"), i, pData->i_DEM_elv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_refRng[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_refRng[%.2d] : %d\n"), i, pData->i_refRng[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare47[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_spare47[%.2d] : %d\n"), i, pData->i_spare47[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ldRngOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ldRngOff[%.2d] : %d\n"), i, pData->i_ldRngOff[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_SigEndOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_SigEndOff[%.2d] : %d\n"), i, pData->i_SigEndOff[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_gpCntRngOff[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_gpCntRngOff[%.2d][%.2d] : %d\n"), i, j, pData->i_gpCntRngOff[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_reflctUC[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_reflctUC[%.2d] : %d\n"), i, pData->i_reflctUC[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_reflCor_atm
strOutput.Format(_T("i_reflCor_atm : %d\n"), pData->i_reflCor_atm);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_maxSmAmp[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_maxSmAmp[%.2d] : %d\n"), i, pData->i_maxSmAmp[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ocElv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ocElv[%.2d] : %d\n"), i, pData->i_ocElv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_numPk[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_numPk[%.2d] : %d\n"), i, pData->i_numPk[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_kurt1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_kurt1[%.2d] : %d\n"), i, pData->i_kurt1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_skew1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_skew1[%.2d] : %d\n"), i, pData->i_skew1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare4[160]
for (int i = 0; i < 160; i++)
{
strOutput.Format(_T("i_spare4[%.3d] : %d\n"), i, pData->i_spare4[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_Gamp[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_Gamp[%.2d][%.2d] : %d\n"), i, j, pData->i_Gamp[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_Garea[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_Garea[%.2d][%.2d] : %d\n"), i, j, pData->i_Garea[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_gsinma[6][40]
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 40; j++)
{
strOutput.Format(_T("i_gsinma[%.2d][%.2d] : %d\n"), i, j, pData->i_gsinma[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_nPeaks1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_nPeaks1[%.2d] : %d\n"), i, pData->i_nPeaks1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_LandVar[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_LandVar[%.2d] : %d\n"), i, pData->i_LandVar[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_ElvuseFlg[5]
for (int i = 0; i < 5; i++)
{
strOutput.Format(_T("i_ElvuseFlg[%.2d] : %d\n"), i, pData->i_ElvuseFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_atm_avail
strOutput.Format(_T("i_atm_avail : %d\n"), pData->i_atm_avail);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare16[4]
for (int i = 0; i < 4; i++)
{
strOutput.Format(_T("i_spare16[%.2d] : %d\n"), i, pData->i_spare16[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_cld1_mswf
strOutput.Format(_T("i_cld1_mswf : %d\n"), pData->i_cld1_mswf);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_MRC_af
strOutput.Format(_T("i_MRC_af : %d\n"), pData->i_MRC_af);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare9[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_spare9[%.2d] : %d\n"), pData->i_spare9[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_ElvFlg[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_ElvFlg[%.2d] : %d\n"), i, pData->i_ElvFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_rng_UQF[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_rng_UQF[%.2d] : %d\n"), i, pData->i_rng_UQF[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare49[10]
for (int i = 0; i < 10; i++)
{
strOutput.Format(_T("i_spare49[%.2d] : %d\n"), i, pData->i_spare49[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_timecorflg
strOutput.Format(_T("i_timecorflg : %d\n"), pData->i_timecorflg);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_APID_AvFlg[8]
for (int i = 0; i < 8; i++)
{
strOutput.Format(_T("i_APID_AvFlg[%.2d] : %d\n"), i, pData->i_APID_AvFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_AttFlg2[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_AttFlg2[%.2d] : %d\n"), i, pData->i_AttFlg2[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare5
strOutput.Format(_T("i_spare5 : %d\n"), pData->i_spare5);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_FrameQF
strOutput.Format(_T("i_FrameQF : %d\n"), pData->i_FrameQF);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_OrbFlg[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_OrbFlg[%.2d] : %d\n"), i, pData->i_OrbFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_rngCorrFlg[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_rngCorrFlg[%.2d] : %d\n"), i, pData->i_rngCorrFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_CorrStatFlg[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_CorrStatFlg[%.2d] : %d\n"), i, pData->i_CorrStatFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare15[8]
for (int i = 0; i < 8; i++)
{
strOutput.Format(_T("i_spare15[%.2d] : %d\n"), i, pData->i_spare15[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_Attflg1
strOutput.Format(_T("i_Attflg1 : %d\n"), pData->i_Attflg1);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_Spare6[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_Spare6[%.2d] : %d\n"), i, pData->i_Spare6[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_spare44[120]
for (int i = 0; i < 120; i++)
{
strOutput.Format(_T("i_spare44[%.3d] : %d\n"), i, pData->i_spare44[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_satNdx[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satNdx[%.2d] : %d\n"), i, pData->i_satNdx[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_satElevCorr[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satElevCorr[%.2d] : %d\n"), i, pData->i_satElevCorr[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_satCorrFlg[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satCorrFlg[%.2d] : %d\n"), i, pData->i_satCorrFlg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_satNrgCorr[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_satNrgCorr[%.2d] : %d\n"), i, pData->i_satNrgCorr[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare13[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_spare13[%.2d] : %d\n"), i, pData->i_spare13[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_gval_rcv[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_gval_rcv[%.2d] : %d\n"), i, pData->i_gval_rcv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_RecNrgAll[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_RecNrgAll[%.2d] : %d\n"), i, pData->i_RecNrgAll[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_FRir_cldtop[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_FRir_cldtop[%.2d] : %d\n"), i, pData->i_FRir_cldtop[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_FRir_gaFlag[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_FRir_qaFlag[%.2d] : %d\n"), i, pData->i_FRir_qaFlag[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_atm_char_flag
strOutput.Format(_T("i_atm_char_flag : %d\n"), pData->i_atm_char_flag);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_atm_char_conf
strOutput.Format(_T("i_atm_char_conf : %d\n"), pData->i_atm_char_conf);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_spare48[36]
for (int i = 0; i < 36; i++)
{
strOutput.Format(_T("i_spare48[%.2d] : %d\n"), i, pData->i_spare48[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_FRir_intsig[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_FRir_intsig[%.2d] : %d\n"), i, pData->i_FRir_intsig[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare14[120]
for (int i = 0; i < 120; i++)
{
strOutput.Format(_T("i_spare14[%.3d] : %d\n"), i, pData->i_spare14[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_Surface_temp
strOutput.Format(_T("i_Surface_temp : %d\n"), pData->i_Surface_temp);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_Surface_pres
strOutput.Format(_T("i_Surface_pres : %d\n"), pData->i_Surface_pres);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_Surface_relh
strOutput.Format(_T("i_Surface_relh : %d\n"), pData->i_Surface_relh);
m_DataFile14.WriteString(strOutput);
iCount++;
//i_maxRecAmp[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_maxRecAmp[%.2d] : %d\n"), i, pData->i_maxRecAmp[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_sDevNsOb1[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_sDevNsOb1[%.2d] : %d\n"), i, pData->i_sDevNsOb1[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare8[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_spare8[%.2d] : %d\n"), i, pData->i_spare8[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_isRngOff[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_isRngOff[%.2d] : %d\n"), i, pData->i_isRngOff[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_pctSAT[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_pctSAT[%.2d] : %d\n"), i, pData->i_pctSAT[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
//i_TxNrg[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_TxNrg[%.2d] : %d\n"), i, pData->i_TxNrg[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_eqElv[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_eqElv[%.2d] : %d\n"), i, pData->i_eqElv[i]);
m_DataFile14.WriteString(strOutput);
}
iCount++;
//i_spare7[120]
for (int i = 0; i < 120; i++)
{
strOutput.Format(_T("i_spare7[%.3d] : %d\n"), i, pData->i_spare7[i]);
m_DataFile14.WriteString(strOutput);
}
iCount ++;
m_DataFile14.WriteString("\n------------------------------------------------------------\n\n");
ASSERT(iCount == 105);
}
void GLAData::TraversalData01_Big(char *pBuffer)
{
// main=1, long=2, or short=3
GLA01_SHORT* pData = (GLA01_SHORT*)pBuffer;
short iType = htons(pData->i_gla01_rectype);
//if (iType == 3)
//{
// short
int iIndex = pData->i_rec_ndx;
m_indexMin = iIndex < m_indexMin ? iIndex : m_indexMin;
m_indexMax = iIndex > m_indexMax ? iIndex : m_indexMax;
std::set<int>::iterator iter = m_Search_Rec_Index.find(iIndex);
if (iter != m_Search_Rec_Index.end())
{
if (m_DataFile01.m_hFile != INVALID_HANDLE_VALUE)
{
CString str;
str.Format(_T("Record : %d\n"), m_iCount01);
m_DataFile01.WriteString(str);
}
m_iCount01++;
PrintData01_Big(pBuffer);
}
//}
}
void GLAData::PrintData01_Big(char* pBuffer)
{
if (m_DataFile01.m_hFile == INVALID_HANDLE_VALUE)
{
WriteLog(_T("Output DataFile01 is invalid!"));
return;
}
GLA01_SHORT* pData = (GLA01_SHORT*)pBuffer;
CString strOutput;
int iCount = 0;
//i_rec_ndx
strOutput.Format(_T("i_rec_ndx : %d\n"), pData->i_rec_ndx);
m_DataFile01.WriteString(strOutput);
iCount ++;
//i_UTCTime[2]
for (int i = 0; i < 2; i++)
{
strOutput.Format(_T("i_UTCTime[%.2d] : %d\n"), i, pData->i_UTCTime[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_gla01_rectype
strOutput.Format(_T("i_gla01_rectype : %d\n"), pData->i_gla01_rectype);
m_DataFile01.WriteString(strOutput);
iCount++;
//i_spare1
strOutput.Format(_T("i_spare1 : %d\n"), pData->i_spare1);
m_DataFile01.WriteString(strOutput);
iCount++;
//i_filtnum[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_filtnum[%.2d] : %d\n"), i, pData->i_filtnum[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_shot_ctr[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_shot_ctr[%.2d] : %d\n"), i, pData->i_shot_ctr[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//istatflags[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("istatflags[%.2d] : %d\n"), i, pData->istatflags[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_gainSet1064[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_gainSet1064[%.2d] : %d\n"), i, pData->i_gainSet1064[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_4nsPeakVal[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_4nsPeakVal[%.2d] : %d\n"), i, pData->i_4nsPeakVal[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_8nsPeakVal[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_8nsPeakVal[%.2d] : %d\n"), i, pData->i_8nsPeakVal[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_4nsBgMead[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_4nsBgMead[%.2d] : %d\n"), i, (unsigned short)(pData->i_4nsBgMead[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_4nsBgSDEV[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_4nsBgSDEV[%.2d] : %d\n"), i, (unsigned short)(pData->i_4nsBgSDEV[i]));
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_samp_pad[40]
for (int i = 0; i < 40; i++)
{
strOutput.Format(_T("i_samp_pad[%.2d] : %d\n"), i, pData->i_samp_pad[i]);
m_DataFile01.WriteString(strOutput);
}
iCount++;
//i_comp_type[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_comp_type[%.2d] : %d\n"), i, pData->i_comp_type[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_rng_wf[200][20]
for (int i = 0; i < 200; i++)
{
for (int j = 0; j < 20; j++)
{
strOutput.Format(_T("i_rng_wf[%.3d][%.2d] : %d\n"), i, j, pData->i_rng_wf[i][j]);
m_DataFile14.WriteString(strOutput);
}
}
iCount++;
//i_gainStatus[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_gainStatus[%.2d] : %d\n"), i, pData->i_gainStatus[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_NumCoinc[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_NumCoinc[%.2d] : %d\n"), i, pData->i_NumCoinc[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_rawPkHt[20]
for (int i = 0; i < 20; i++)
{
strOutput.Format(_T("i_rawPkHt[%.2d] : %d\n"), i, pData->i_rawPkHt[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
//i_spare2[184]
for (int i = 0; i < 184; i++)
{
strOutput.Format(_T("i_spare2[%.2d] : %d\n"), i, pData->i_spare2[i]);
m_DataFile01.WriteString(strOutput);
}
iCount ++;
m_DataFile01.WriteString("\n------------------------------------------------------------\n\n");
ASSERT(iCount == 19);
} |
03ed41d5d743209cf4178cf3c961c21ee085e9bd | ec2fbd7dcc14cc16c95f4d8ce50da146ee05504a | /Source/ResourceAnimation.cpp | e313acf8b7297ed29b6afab74797ef72b25868fb | [
"MIT"
] | permissive | AniolAndres/Engine | 266ba25aa97301d8327cb474e5c4d3395980d1ea | a7f1f13892d26fb3975b24365693a415eb6d45a8 | refs/heads/master | 2022-03-06T18:46:25.131189 | 2019-12-02T11:10:40 | 2019-12-02T11:10:40 | 222,310,061 | 0 | 0 | null | 2019-11-17T20:49:12 | 2019-11-17T20:49:11 | null | UTF-8 | C++ | false | false | 12,976 | cpp | ResourceAnimation.cpp | #include "Resource.h"
#include "Application.h"
#include "ModuleFileSystem.h"
#include "ModuleResourceManager.h"
#include "ResourceAnimation.h"
#include "imgui.h"
#include "JSON.h"
#include <assert.h>
#include <algorithm>
ResourceAnimation::ResourceAnimation(unsigned uid) : Resource(uid, TYPE::ANIMATION)
{
}
ResourceAnimation::ResourceAnimation(const ResourceAnimation& resource) : Resource(resource)
{
for (int i = 0; i < resource.numberOfChannels; ++i)
{
Channel* newChannel = new Channel();
newChannel->channelName = resource.channels[i]->channelName;
newChannel->numPositionKeys = resource.channels[i]->numPositionKeys;
newChannel->numRotationKeys = resource.channels[i]->numRotationKeys;
for (int j = 0; j < newChannel->numPositionKeys; ++j)
{
newChannel->positionSamples[j] = resource.channels[i]->positionSamples[j];
}
for (int j = 0; j < newChannel->numRotationKeys; ++j)
{
newChannel->rotationSamples[j] = resource.channels[i]->rotationSamples[j];
}
channels.push_back(newChannel);
}
duration = resource.duration; //frames
framesPerSecond = resource.framesPerSecond;
numberFrames = resource.numberFrames;
numberOfChannels = resource.numberOfChannels;
durationInSeconds = resource.durationInSeconds;
}
ResourceAnimation::~ResourceAnimation()
{
DeleteFromMemory();
}
bool ResourceAnimation::LoadInMemory()
{
App->resManager->DeleteResourceFromUnusedList(UID);
char* data = nullptr;
unsigned ok = App->fsystem->Load(exportedFile.c_str(), &data);
// Load mesh file
if (ok != 0)
{
SetAnimation(data);
++loaded;
}
return true;
}
void ResourceAnimation::DeleteFromMemory()
{
Resource::DeleteFromMemory();
for(const auto& channel : channels)
{
channel->numPositionKeys = 0u;
channel->numRotationKeys = 0u;
channel->positionSamples.clear();
channel->rotationSamples.clear();
}
channels.clear();
}
void ResourceAnimation::Delete()
{
// Check if the animation was imported from Model or created from the editor
// TODO RM: Delete this if and use base Delete once all animations from models are saved on assets
if (App->fsystem->Exists(file.c_str()))
{
Resource::Delete();
}
else
{
// Delete Resource from ResourceManager
App->resManager->DeleteResourceFromList(UID);
// Delete file in Library
std::string fileInLibrary(IMPORTED_ANIMATIONS);
fileInLibrary += exportedFile;
fileInLibrary += ANIMATIONEXTENSION;
App->fsystem->Delete(fileInLibrary.c_str());
DeleteFromMemory();
}
}
void ResourceAnimation::SaveMetafile(const char* file) const
{
std::string filepath;
filepath.append(file);
JSON* json = new JSON();
JSON_value* meta = json->CreateValue();
struct stat statFile;
stat(filepath.c_str(), &statFile);
meta->AddUint("metaVersion", META_VERSION);
meta->AddUint("timeCreated", statFile.st_ctime);
// Resource info
meta->AddUint("GUID", UID);
meta->AddString("Name", name.c_str());
meta->AddString("File", file);
meta->AddString("ExportedFile", exportedFile.c_str());
json->AddValue("Animation", *meta);
// Save meta in Assets if animation comes from animation file
if (App->fsystem->GetExtension(filepath) == ANIMATIONEXTENSION)
{
filepath += METAEXT;
App->fsystem->Save(filepath.c_str(), json->ToString().c_str(), json->Size());
}
// Save meta in Library
std::string libraryPath(exportedFile + METAEXT);
App->fsystem->Save(libraryPath.c_str(), json->ToString().c_str(), json->Size());
RELEASE(json);
}
void ResourceAnimation::LoadConfigFromMeta()
{
std::string metaFile(file);
metaFile += ".meta";
// Check if meta file exists
if (!App->fsystem->Exists(metaFile.c_str()))
return;
char* data = nullptr;
unsigned oldUID = GetUID();
if (App->fsystem->Load(metaFile.c_str(), &data) == 0)
{
LOG("Warning: %s couldn't be loaded", metaFile.c_str());
RELEASE_ARRAY(data);
return;
}
JSON* json = new JSON(data);
JSON_value* value = json->GetValue("Animation");
// Make sure the UID from meta is the same
unsigned checkUID = value->GetUint("GUID");
if (oldUID != checkUID)
{
UID = checkUID;
// Update resource UID on resource list
App->resManager->ReplaceResource(oldUID, this);
exportedFile = IMPORTED_ANIMATIONS + std::to_string(UID) + ANIMATIONEXTENSION;
}
// Check the meta file version
if (value->GetUint("metaVersion", 0u) < META_VERSION)
SaveMetafile(file.c_str());
// Check the meta saved in library, if not save it
if (!App->fsystem->Exists((exportedFile + METAEXT).c_str()))
SaveMetafile(file.c_str());
RELEASE_ARRAY(data);
RELEASE(json);
}
void ResourceAnimation::LoadConfigFromLibraryMeta()
{
std::string metaFile(exportedFile);
metaFile += ".meta";
// Check if meta file exists
if (!App->fsystem->Exists(metaFile.c_str()))
return;
char* data = nullptr;
unsigned oldUID = GetUID();
if (App->fsystem->Load(metaFile.c_str(), &data) == 0)
{
LOG("Warning: %s couldn't be loaded", metaFile.c_str());
RELEASE_ARRAY(data);
return;
}
JSON* json = new JSON(data);
JSON_value* value = json->GetValue("Animation");
// Get resource variables
name = value->GetString("Name");
file = value->GetString("File");
RELEASE_ARRAY(data);
RELEASE(json);
}
void ResourceAnimation::SetAnimation(const char* animationData)
{
const char* data = animationData; //used as a base pointer for release
for (const auto& channel : channels)
{
channel->numPositionKeys = 0u;
channel->numRotationKeys = 0u;
channel->positionSamples.clear();
channel->rotationSamples.clear();
}
channels.clear();
memcpy(&duration, animationData, sizeof(double));
animationData += sizeof(double);
memcpy(&framesPerSecond, animationData, sizeof(double));
animationData += sizeof(double);
numberFrames = duration;
durationInSeconds = float(duration * (1 / framesPerSecond));
memcpy(&numberOfChannels, animationData, sizeof(int));
animationData += sizeof(int);
for (unsigned i = 0u; i < numberOfChannels; i++)
{
Channel* newChannel = new Channel();
char name[MAX_BONE_NAME_LENGTH]; //crash fix - Here we don't need to care of namelength. The /0 marks the end of the string. Notice the strings are length + 1 ALWAYS
memcpy(name, animationData, sizeof(char) * MAX_BONE_NAME_LENGTH);
animationData += sizeof(char)* MAX_BONE_NAME_LENGTH;
newChannel->channelName = std::string(name);
memcpy(&newChannel->numPositionKeys, animationData, sizeof(int));
animationData += sizeof(int);
memcpy(&newChannel->numRotationKeys, animationData, sizeof(int));
animationData += sizeof(int);
for (unsigned j = 0u; j < newChannel->numPositionKeys; j++)
{
math::float3 position = math::float3::one;
memcpy(&position, animationData, sizeof(float) * 3);
animationData += sizeof(float) * 3;
newChannel->positionSamples.push_back(position);
}
for (unsigned k = 0u; k < newChannel->numRotationKeys; k++)
{
math::Quat assimpRotation = math::Quat::identity;
memcpy(&assimpRotation, animationData, sizeof(math::Quat));
animationData += sizeof(math::Quat);
math::Quat rotation = math::Quat(assimpRotation.y, assimpRotation.z, assimpRotation.w, assimpRotation.x);
newChannel->rotationSamples.push_back(rotation);
}
channels.push_back(newChannel);
}
//load events
events.clear();
memcpy(&totalEvents, animationData, sizeof(int));
animationData += sizeof(int);
for (unsigned i = 0u; i < totalEvents; i++)
{
int newKey;
memcpy(&newKey, animationData, sizeof(int));
animationData += sizeof(int);
int newFrame;
memcpy(&newFrame, animationData, sizeof(int));
animationData += sizeof(int);
char newName[MAX_BONE_NAME_LENGTH];
memcpy(newName, animationData, sizeof(char) * MAX_BONE_NAME_LENGTH);
animationData += sizeof(char)* MAX_BONE_NAME_LENGTH;
Event* newEvent = new Event(newKey, newFrame, std::string(newName));
events.push_back(newEvent);
}
RELEASE_ARRAY(data);
}
unsigned ResourceAnimation::GetAnimationSize()
{
unsigned size = 0u;
size += sizeof(double) * 2;
size += sizeof(int);
for (unsigned i = 0u; i < numberOfChannels; ++i)
{
size += sizeof(char)* MAX_BONE_NAME_LENGTH;
size += sizeof(int) * 2;
for (unsigned j = 0u; j < channels[i]->numPositionKeys; ++j)
{
size += sizeof(float) * 3;
}
for (unsigned j = 0u; j < channels[i]->numRotationKeys; ++j)
{
size += sizeof(Quat);
}
}
//get events
size += sizeof(int);
for (unsigned i = 0u; i < totalEvents; i++)
{
size += sizeof(int) * 2;
size += sizeof(char)* MAX_BONE_NAME_LENGTH;
}
return size;
}
void ResourceAnimation::SaveAnimationData(char * data)
{
char* cursor = data;
memcpy(cursor, &duration, sizeof(double));
cursor += sizeof(double);
memcpy(cursor, &framesPerSecond, sizeof(double));
cursor += sizeof(double);
memcpy(cursor, &numberOfChannels, sizeof(int));
cursor += sizeof(int);
for (unsigned j = 0u; j < numberOfChannels; j++)
{
memcpy(cursor, channels[j]->channelName.c_str(), sizeof(char) * MAX_BONE_NAME_LENGTH); //Name
cursor += sizeof(char) * MAX_BONE_NAME_LENGTH;
memcpy(cursor, &channels[j]->numPositionKeys, sizeof(int));
cursor += sizeof(int);
memcpy(cursor, &channels[j]->numRotationKeys, sizeof(int));
cursor += sizeof(int);
//importar longitud array de posiciones e iterar
for (unsigned i = 0u; i < channels[j]->numPositionKeys; i++)
{
memcpy(cursor, &channels[j]->positionSamples[i], sizeof(float) * 3);
cursor += sizeof(float) * 3;
}
//importar longitud array de rotaciones e iterar
for (unsigned k = 0u; k < channels[j]->numRotationKeys; k++)
{
math::Quat newQuat = math::Quat(channels[j]->rotationSamples[k].w, channels[j]->rotationSamples[k].x,
channels[j]->rotationSamples[k].y, channels[j]->rotationSamples[k].z);
memcpy(cursor, &newQuat, sizeof(math::Quat));
cursor += sizeof(math::Quat);
}
}
//save events
memcpy(cursor, &totalEvents, sizeof(int));
cursor += sizeof(int);
for (unsigned i = 0u; i < totalEvents; i++)
{
memcpy(cursor, &events[i]->key, sizeof(int));
cursor += sizeof(int);
memcpy(cursor, &events[i]->frame, sizeof(int));
cursor += sizeof(int);
memcpy(cursor, events[i]->name.c_str(), sizeof(char) * MAX_BONE_NAME_LENGTH);
cursor += sizeof(char) * MAX_BONE_NAME_LENGTH;
}
}
void ResourceAnimation::SaveNewAnimation()
{
char* animationData = nullptr;
unsigned animationSize = GetAnimationSize();
animationData = new char[animationSize];
SaveAnimationData(animationData);
App->fsystem->Save((ANIMATIONS + name + ANIMATIONEXTENSION).c_str(), animationData, animationSize);
SetFile((ANIMATIONS + name + ANIMATIONEXTENSION).c_str());
RELEASE_ARRAY(animationData);
}
void ResourceAnimation::AddEvent(std::string name)
{
events.push_back(new Event(totalEvents, currentFrame, name));
++totalEvents;
if (totalEvents > 1)
{
std::sort(events.begin(), events.end(), [](const Event* lhs, const Event* rhs)
{ return lhs->frame < rhs->frame; });
}
SetEventKeys();
}
void ResourceAnimation::DeleteEvent(int key)
{
for (std::vector<Event*>::iterator it = events.begin(); it != events.end(); ++it)
{
if ((*it)->key == key)
{
events.erase(it);
--totalEvents;
break;
}
}
SetEventKeys();
}
void ResourceAnimation::SetEventKeys()
{
int contador = 0;
for (std::vector<Event*>::iterator it = events.begin(); it != events.end(); ++it)
{
(*it)->key = contador;
++contador;
}
}
unsigned ResourceAnimation::GetNumPositions(unsigned indexChannel) const
{
return channels[indexChannel]->numPositionKeys;
}
unsigned ResourceAnimation::GetNumRotations(unsigned indexChannel) const
{
return channels[indexChannel]->numRotationKeys;
}
const math::float3 ResourceAnimation::GetPosition(unsigned indexChannel, unsigned indexPosition) const
{
if (channels[indexChannel]->numPositionKeys > 1)
{
if (indexPosition >= channels[indexChannel]->positionSamples.size())
{
indexPosition = channels[indexChannel]->positionSamples.size() - 1;
}
return channels[indexChannel]->positionSamples[indexPosition];
}
else
return channels[indexChannel]->positionSamples[0];
}
const math::Quat ResourceAnimation::GetRotation(unsigned indexChannel, unsigned indexPosition) const
{
if (channels[indexChannel]->numRotationKeys > 1)
{
if (indexPosition >= channels[indexChannel]->rotationSamples.size())
{
indexPosition = channels[indexChannel]->rotationSamples.size() - 1;
}
return channels[indexChannel]->rotationSamples[indexPosition];
}
else
return channels[indexChannel]->rotationSamples[0];
}
unsigned ResourceAnimation::GetIndexChannel(std::string name) const
{
for (unsigned i = 0u; i < numberOfChannels; i++) //TODO, guardar map, en el anim controller
{
if (strcmp(name.c_str(), channels[i]->channelName.c_str()) == 0)
{
return i;
}
}
return 999u;
}
unsigned ResourceAnimation::GetNumberChannels() const
{
return channels.size();
}
unsigned ResourceAnimation::GetNumberFrames() const
{
return unsigned(numberFrames);
}
unsigned ResourceAnimation::GetFPS() const
{
return unsigned(framesPerSecond);
}
|
0a1274d86899cc46aaaf12aec77786ab9038da81 | 3db5bc7428e6fb929423863e34c8cb7dfab6a26c | /main.cpp | 6e4a430fb2c4f747b19e9802f07b6970d7627977 | [
"MIT"
] | permissive | mfkiwl/SDRReceiver | a8ae6dc83dd1b4af2901632c15eddbd14bde9906 | 93d970717eed00b0cddbd637447819eddc529b9a | refs/heads/master | 2023-07-10T08:25:05.299248 | 2021-08-09T14:36:12 | 2021-08-09T14:36:12 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,218 | cpp | main.cpp | #include "mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
#include <iostream>
QString MainWindow::settings_filename;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QApplication::setApplicationName("SDRReceiver");
QApplication::setApplicationVersion("1.0");
QCommandLineParser cmdparser;
cmdparser.setApplicationDescription("SDR Receiver for JAERO");
cmdparser.addHelpOption();
cmdparser.addVersionOption();
// ini file option (-s)
QCommandLineOption settingsnameoption(QStringList() << "s" << "settings-filename",QApplication::translate("main", "Run with setting file name <file name>."),QApplication::translate("main", "name"));
settingsnameoption.setDefaultValue("");
cmdparser.addOption(settingsnameoption);
cmdparser.process(a);
if(a.arguments().size()<=1)
{
fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main", "Error: Must specify an argument.")));
cmdparser.showHelp(1);
}
MainWindow::settings_filename=cmdparser.value(settingsnameoption);
MainWindow w;
w.setWindowTitle("SDRReceiver - " + MainWindow::settings_filename );
w.show();
return a.exec();
}
|
a6e47c6d763f24f09b4a6b0eb5b5a56ecf5c6a6c | 1815ed8de31de7ef2b34de448af1ec53fb355d39 | /coding_exercises/linkedlist/interesting/sum_linked.cpp | 3a8e080056bc214f4835c69ef8bd8cbe8d18053f | [] | no_license | nathanzhu144/coding | 59f0da0161b00ddf408359f220d6aeb2a2a7d9dc | c79c96351d31f529580c88013cb6e37fc23c337d | refs/heads/master | 2021-06-26T20:02:17.171219 | 2019-01-06T21:57:21 | 2019-01-06T21:57:21 | 121,160,805 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,630 | cpp | sum_linked.cpp | /**
* sum_linked.cpp
* Nathan Zhu
* October 16th, 2018
*
* How do you sum two linked lists together?
* Leetcode medium question.
*
* https://www.geeksforgeeks.org/sum-of-two-linked-lists/
*
*/
#include <iostream>
using namespace std;
struct ListNode
{
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
ListNode *insert(ListNode *root, int val);
//////////////////////////////////////
// Add two linked list //
//////////////////////////////////////
//My implementation
ListNode *addTwoNumbers(ListNode *l1, ListNode *l2)
{
ListNode *a = l1;
ListNode *b = l2;
ListNode *returned = NULL;
int overflow = 0;
while (a && b)
{
int temp = a->val + b->val + overflow;
if (temp >= 10)
{
overflow = 1;
returned = insert(returned, temp - 10);
}
else
{
overflow = 0;
returned = insert(returned, temp);
}
a = a->next;
b = b->next;
}
while (a)
{
int temp = a->val + overflow;
if (temp >= 10)
{
overflow = 1;
returned = insert(returned, temp - 10);
}
else
{
overflow = 0;
returned = insert(returned, temp);
}
a = a->next;
}
while (b)
{
int temp = b->val + overflow;
if (temp >= 10)
{
overflow = 1;
returned = insert(returned, temp - 10);
}
else
{
overflow = 0;
returned = insert(returned, temp);
}
b = b->next;
}
if (overflow){
returned = insert(returned, 1);
}
return returned;
}
void print(ListNode* n){
if(!n) return;
cout << n->val << " ";
print(n->next);
}
int main()
{
ListNode *root = NULL;
root = insert(root,9);
root = insert(root,3);
root = insert(root,5);
root = insert(root,9);
root = insert(root,9);
root = insert(root,9);
print(root);
cout << endl;
ListNode *root2 = NULL;
root2 = insert(root2,4);
root2 = insert(root2,5);
root2 = insert(root2,6);
print(root2);
cout << endl;
ListNode *sum = addTwoNumbers(root, root2);
print(sum);
cout << endl;
}
ListNode *insert(ListNode *root, int val)
{
ListNode *temp = new ListNode(val);
if (!root)
{
root = temp;
}
else
{
ListNode *i = root;
while (i->next)
{
i = i->next;
}
i->next = temp;
}
return root;
}
|
3cf30a6a760cbc549c92eec68e904da2092a5684 | 346c2d7a687e66369055c991ba0fcb2ae0604ba7 | /Task1 - 복사본 (2) (4)/2019.11.21/UserProgram.h | 92d06b6f652a0e326de7c9494809cdb851201f37 | [] | no_license | 3yeong/OOP | 400334b47b00471c00845743c9df3bc98dd36805 | 8936ff678670bead09885b0593a78b4095b30704 | refs/heads/master | 2022-11-20T04:34:52.810023 | 2022-10-31T15:30:34 | 2022-10-31T15:30:34 | 220,010,540 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 130 | h | UserProgram.h | #pragma once
#include <string>
using namespace std;
static class UserProgram
{
public:
UserProgram();
~UserProgram();
};
|
c80b195bbce89e2752209278024033e7e680dda5 | 2295081e6dc21b95d00a400e9e50cbda2ca3cee0 | /Link.h | 7ae8d59c3b7d1744039e43055ffaf3556e8840c9 | [] | no_license | vortex314/Common | d39b56aa9cf41e9f558ea35f535b3eaa949fcae3 | d08afec3850fb6fa615667d0b0725c70da7a6947 | refs/heads/master | 2021-07-08T16:30:21.287637 | 2021-05-12T10:48:06 | 2021-05-12T10:48:06 | 42,076,838 | 0 | 1 | null | 2021-05-12T10:49:38 | 2015-09-07T22:12:25 | C++ | UTF-8 | C++ | false | false | 718 | h | Link.h | #ifndef LINK_H
#define LINK_H
// #include "Event.h"
//#include "MqttIn.h"
#include "Handler.h"
class Link : public Handler
{
public:
// static const int CONNECTED,DISCONNECTED,RXD,MESSAGE,ERROR;
Link(const char* s) : Handler(s) {};
Link();
virtual ~Link();
virtual bool isConnected() { return _isConnected; }
virtual void isConnected(bool val) { _isConnected = val; }
virtual uint8_t read()=0;
virtual uint32_t hasData()=0;
// virtual Erc recv(Bytes& bytes)=0;
virtual Erc send(Bytes& bytes)=0;
virtual Erc connect()=0;
virtual Erc disconnect()=0;
protected:
private:
bool _isConnected;
};
#endif // LINK_H
|
13d93343dc17e2b0c9dd6c8ad70c9252e9703fd3 | e2446222c787d892cc95460478bf7758386a7f38 | /extl/smartptr/shared_array.h | 4c5600ebf8e7c11ebd85bd44b54a15c7e2c3e6f9 | [] | no_license | gxfgithub/hnr | 554bbc0223fc18ddc998c0b2e4b3d06a26953f5e | a843843e4e48ae14222ab5a04cf0f15f0f0dde19 | refs/heads/master | 2021-06-03T03:51:27.943129 | 2016-07-15T10:07:32 | 2016-07-15T10:07:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,087 | h | shared_array.h | /* ///////////////////////////////////////////////////////////////////////
* File: shared_array.h
*
* Created: 08.02.25
* Updated: 08.05.06
*
* Brief: shared_array class - shared array
*
* [<Home>]
* Copyright (c) 2008-2020, Waruqi All rights reserved.
* //////////////////////////////////////////////////////////////////// */
#ifndef EXTL_SMART_PTR_SHARED_ARRAY_H
#define EXTL_SMART_PTR_SHARED_ARRAY_H
/*!\file shared_array.h
* \brief shared_array class - shared array
*
* - custom thread-safe reference count
* - safe implicit conversion to the bool type
* - custom deleter
* - default deleter: new_allocator<T>::array_deleter_type
* - custom deleter function object:
* struct deleter
* {
* void operator()(int *p)
* {
* delete[] p;
* }
* };
* - usage:
* - shared_array<int, deleter > p(new int[10]); - using default deleter
* - shared_array<int, deleter > p(new int[10], deleter());
* - shared_array<int, deleter > p(new int[10], deleter(...));
*
*/
#ifndef __cplusplus
# error shared_array.h need be supported by c++.
#endif
/* ///////////////////////////////////////////////////////////////////////
* Includes
*/
#include "prefix.h"
#include "../utility/operator_bool.h"
#include "../algorithm/algorithm.h" /* for std_swap */
#include "../counter/shared_counter.h"
#include "../memory/allocator_selector.h"
/* ///////////////////////////////////////////////////////////////////////
* Warnings
*/
#if defined(EXTL_COMPILER_IS_MSVC) && (_MSC_VER <= 1200)
# pragma warning(push)
# pragma warning(disable:4284) /* odd return type for operator-> */
#endif
/* ///////////////////////////////////////////////////////////////////////
* ::extl namespace
*/
EXTL_BEGIN_NAMESPACE
/*!\brief shared_array class
*
* \param T The value type
* \param D The deleter type
*
* \ingroup extl_group_smart_ptr
*/
template< typename_param_k T
#ifdef EXTL_TEMPLATE_CLASS_DEFAULT_ARGUMENT_SUPPORT
, typename_param_k D = typename_type_def_k new_allocator<T>::array_deleter_type
#else
, typename_param_k D
#endif
>
class shared_array
{
/// \name Types
/// @{
public:
typedef shared_array<T, D> class_type;
typedef T value_type;
typedef value_type* pointer;
typedef value_type const* const_pointer;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef e_long_t index_type;
typedef D deleter_type;
#ifdef EXTL_TEMPLATE_CLASS_DEFAULT_ARGUMENT_SUPPORT
typedef shared_counter< value_type, deleter_type > shared_counter_type;
#else
typedef shared_counter < value_type
, deleter_type
, typename_type_k synch_traits_selector::synch_traits_type
, typename_type_k allocator_selector< e_byte_t >::allocator_type
> shared_counter_type;
#endif
typedef typename_type_k shared_counter_type::size_type size_type;
/// @}
/// \name Members
/// @{
private:
pointer m_ptr;
shared_counter_type m_shared_counter;
/// @}
/// \name Constructors
/// @{
public:
/* Constructor and destructor */
shared_array()
: m_ptr(NULL), m_shared_counter()
{
}
explicit_k shared_array(pointer p)
: m_ptr(p), m_shared_counter(p)
{
EXTL_ASSERT(is_valid());
}
shared_array(pointer p, deleter_type const& del)
: m_ptr(p), m_shared_counter(p, del)
{
EXTL_ASSERT(is_valid());
}
shared_array(class_type const& rhs)
: m_ptr(rhs.m_ptr), m_shared_counter(rhs.m_shared_counter)
{
EXTL_ASSERT(is_valid());
}
~shared_array() EXTL_THROW_0()
{
}
#ifdef EXTL_MEMBER_TEMPLATE_CTOR_OVERLOAD_DISCRIMINATED_SUPPORT
template < typename_param_k T1 >
explicit_k shared_array(T1* p)
: m_ptr(p), m_shared_counter(p)
{
EXTL_ASSERT(is_valid());
}
template < typename_param_k T1, typename_param_k D1 >
shared_array(shared_array<T1, D1> const& rhs)
: m_ptr(rhs.m_ptr), m_shared_counter(rhs.m_shared_counter)
{
EXTL_ASSERT(is_valid());
}
#endif
/// @}
public:
/// operator=() overload
class_type& operator=(class_type const& rhs)
{
EXTL_ASSERT(is_valid());
if(this != &rhs) /* Prevent self-assigment */
{
m_ptr = rhs.m_ptr;
m_shared_counter = rhs.m_shared_counter;
}
EXTL_ASSERT(is_valid());
return *this;
}
#ifdef EXTL_MEMBER_TEMPLATE_FUNC_OVERLOAD_DISCRIMINATED_SUPPORT
/// operator=() overload
template < typename_param_k T1, typename_param_k D1 >
class_type& operator=(shared_array<T1, D1> const& rhs)
{
EXTL_ASSERT(is_valid());
if(this != &rhs) /* Prevent self-assigment */
{
m_ptr = rhs.m_ptr;
m_shared_counter = rhs.m_shared_counter;
}
EXTL_ASSERT(is_valid());
return *this;
}
#endif
/// \name Accessors
/// @{
public:
reference operator[](index_type const& index) const
{
EXTL_ASSERT(NULL != m_ptr);
EXTL_ASSERT(index >= 0);
EXTL_ASSERT(is_valid());
return m_ptr[index];
}
const_pointer get_ptr() const
{
EXTL_ASSERT(is_valid());
return m_ptr;
}
pointer get_ptr()
{
EXTL_ASSERT(is_valid());
return m_ptr;
}
/* Returns the reference count */
size_type count() const
{
EXTL_ASSERT(is_valid());
return m_shared_counter.count();
}
e_bool_t is_unique() const
{
return m_shared_counter.is_unique();
}
/// @}
/// \name Mutators
/// @{
public:
/* swap */
void swap(class_type& other)
{
EXTL_ASSERT(is_valid());
std_swap(m_ptr, other.m_ptr);
m_shared_counter.swap(other.m_shared_counter);
EXTL_ASSERT(is_valid());
}
#ifdef EXTL_MEMBER_TEMPLATE_FUNC_OVERLOAD_DISCRIMINATED_SUPPORT
template < typename_param_k T1, typename_param_k D1 >
void swap(shared_array<T1, D1>& other)
{
EXTL_ASSERT(is_valid());
std_swap(m_ptr, other.m_ptr);
m_shared_counter.swap(other.m_shared_counter);
EXTL_ASSERT(is_valid());
}
#endif
/* Reset the pointer */
void reset()
{
class_type().swap(*this);
}
void reset(pointer p)
{
EXTL_ASSERT(p != m_ptr);
class_type(p).swap(*this);
}
#ifdef EXTL_MEMBER_TEMPLATE_FUNC_OVERLOAD_DISCRIMINATED_SUPPORT
template < typename_param_k T1 >
void reset(T1* p)
{
EXTL_ASSERT(p != m_ptr);
class_type(p).swap(*this);
}
#endif
/// @}
public:
/// safe implicit conversion to the bool type
EXTL_OPERATOR_BOOL_DEFINE_TYPE_T(class_type, safe_bool_type);
operator safe_bool_type() const
{
return EXTL_OPERATOR_BOOL_RETURN_RESULT(m_ptr != NULL);
}
e_bool_t operator !() const { return (m_ptr == NULL); }
/// less than
e_bool_t lt(class_type const & rhs) const { return m_ptr < rhs.m_ptr; }
#ifdef EXTL_MEMBER_TEMPLATE_FUNC_OVERLOAD_DISCRIMINATED_SUPPORT
/// less than
template < typename_param_k T1, typename_param_k D1 >
e_bool_t lt(shared_array<T1, D1> const & rhs) const { return m_ptr < rhs.m_ptr; }
#endif
private:
inline e_bool_t is_valid() const
{
if((NULL == m_ptr) != m_shared_counter.is_zero())
{
return e_false_v;
}
if((NULL != m_ptr) && (m_shared_counter.count() < 1))
{
return e_false_v;
}
return e_true_v;
}
};
/* ///////////////////////////////////////////////////////////////////////
* Operators overload
*/
template< typename_param_k T, typename_param_k D >
inline e_bool_t operator==(shared_array<T, D> const& lhs, shared_array<T, D> const& rhs)
{
return lhs.get_ptr() == rhs.get_ptr();
}
template< typename_param_k T, typename_param_k D >
inline e_bool_t operator!=(shared_array<T, D> const& lhs, shared_array<T, D> const& rhs)
{
return lhs.get_ptr() != rhs.get_ptr();
}
/* VC6.0: p != NULL */
#if defined(EXTL_COMPILER_IS_MSVC) && (_MSC_VER == 1200)
template< typename_param_k T, typename_param_k D >
inline e_bool_t operator==(shared_array<T, D> const& lhs, void* rhs)
{
return lhs.get_ptr() == static_cast<T*>(rhs);
}
template< typename_param_k T, typename_param_k D >
inline e_bool_t operator!=(shared_array<T, D> const& lhs, void* rhs)
{
return lhs.get_ptr() != static_cast<T*>(rhs);
}
#endif
template< typename_param_k T, typename_param_k D >
inline e_bool_t operator<(shared_array<T, D> const& lhs, shared_array<T, D> const& rhs)
{
return lhs.lt(rhs);
}
/// swap
template< typename_param_k T, typename_param_k D >
inline void swap(shared_array<T, D>& lhs, shared_array<T, D>& rhs)
{
lhs.swap(rhs);
}
/// get pointer shim
template< typename_param_k T, typename_param_k D >
inline T const* get_ptr(shared_array<T, D> const& p)
{
return p.get_ptr();
}
/* ///////////////////////////////////////////////////////////////////////
* Unit-testing
*/
#ifdef EXTL_SHARED_ARRAY_TEST_ENABLE
# include "unit_test/shared_array_test.h"
#endif
/* ///////////////////////////////////////////////////////////////////////
* ::extl namespace
*/
EXTL_END_NAMESPACE
/* ///////////////////////////////////////////////////////////////////////
* Warnings
*/
#if defined(EXTL_COMPILER_IS_MSVC) && (_MSC_VER <= 1200)
# pragma warning(pop)
#endif
/* ///////////////////////////////////////////////////////////////////////
* std::swap
*/
#if !defined(EXTL_NO_STL) && \
!defined(EXTL_NO_NAMESPACE)
/* ::std namespace */
EXTL_STD_BEGIN_NAMESPACE
template< typename_param_k T, typename_param_k D >
inline void swap(EXTL_NS(shared_array)<T, D>& lhs, EXTL_NS(shared_array)<T, D>& rhs)
{
lhs.swap(rhs);
}
/* ::std namespace */
EXTL_STD_END_NAMESPACE
#endif
/* //////////////////////////////////////////////////////////////////// */
#endif /* EXTL_SMART_PTR_SHARED_ARRAY_H */
/* //////////////////////////////////////////////////////////////////// */
|
a97a925803d68a205acda51204c285c5b1c0c890 | 24f1fe388f5e04ec213ba9365c44e998e4b0e980 | /day06/opestu.cpp | 43aad40b5298c64a792ff6c96ef79f3800694434 | [] | no_license | HuaxinWang/C- | 33306affacd586ce803a09dd7219e39887a0295e | 8c2272431437c6e39331477e64013e0ac858bd66 | refs/heads/master | 2021-01-19T05:50:14.765752 | 2017-09-15T02:51:12 | 2017-09-15T02:51:12 | 100,585,039 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,871 | cpp | opestu.cpp | #include <iostream>
#include <string>
using namespace std;
class Student
{
public:
Student(string name="", float score=0.0f)
{
m_strName = name;
m_fScore = score;
m_iId = m_iBaseId++;
}
bool operator<(const Student &other) const
{
return m_fScore < other.m_fScore;
}
int getId() const
{
return m_iId;
}
const string &getName() const
{
return m_strName;
}
float getScore() const
{
return m_fScore;
}
void setName(const string &name)
{
m_strName = name;
}
void setScore(float score)
{
m_fScore = score;
}
private:
static int m_iBaseId;
int m_iId;
string m_strName;
float m_fScore;
};
int Student::m_iBaseId = 1000;
ostream &operator << (ostream &out, const Student &stu)
{
out << "学号:" << stu.getId()
<< " 名字:" << stu.getName()
<< " 成绩:" << stu.getScore();
return out;
}
istream &operator >> (istream &in, Student &stu)
{
string strName = "";
float fScore = 0.0f;
cout << "请输入名字\n";
in >> strName;
cout << "请输入分数\n";
in >> fScore;
stu.setName(strName);
stu.setScore(fScore);
return in;
}
void bubble(Student* (&stu)[3])
{
Student *tmp = NULL;
int i = 0;
int j = 0;
for (; i < 3-1; i++)
{
for (j = 0; j < 3-1-i; j++)
{
if (*stu[j] < *stu[j+1])
{
tmp = stu[j];
stu[j] = stu[j+1];
stu[j+1] = tmp;
}
}
}
}
void show(Student * (&stu)[3])
{
for (int i = 0 ; i < 3; i++)
{
cout << *stu[i] << endl;
}
}
template<typename T>
class Compare
{
public:
bool operator()(T &a, T &b)
{
return a < b;
}
};
int main(void)
{
Student s1("aa", 90);
Student s2("bb", 89);
Compare<Student> com;
if (com(s1, s2))
{
cout << "s1 < s2\n";
}
else
{
cout << "s1 >= s2\n";
}
#if 0
Student *pStu[3] = {NULL};
for (int i = 0; i < 3; i++)
{
pStu[i] = new Student;
cin >> *pStu[i];
}
bubble(pStu);
show(pStu);
#endif
return 0;
}
|
f72d1cdb759f370da49b8d5d1f3b8af5db59bb5a | 0065cefdd3a4f163e92c6499c4f36feb584d99b7 | /rogue/cheat/sdk/SDK/UIFontPalette_structs.h | 884a30055a88f7bb9e3492bde9fd7f3c68f584d1 | [] | no_license | YMY1666527646/Rogue_Company_hack | ecd8461fc6b25a0adca1a6ef09ee57e59181bc84 | 2a19c81c5bf25b6e245084c073ad7af895a696e4 | refs/heads/main | 2023-08-20T06:07:14.660871 | 2021-10-21T20:33:53 | 2021-10-21T20:33:53 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,907 | h | UIFontPalette_structs.h | #pragma once
// Name: roguecompany, Version: 425
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Script Structs
//---------------------------------------------------------------------------
// ScriptStruct UIFontPalette.UIFontPalette
// 0x0230
struct FUIFontPalette
{
struct FSlateFontInfo GeneralHeading_17_D2D2858D46D790E57D7D8A9140F3A45C; // 0x0000(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
struct FSlateFontInfo TooltipHeading_18_4EA193C444FE7A4F73827A86213800F5; // 0x0050(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
struct FSlateFontInfo SubScreenHeading_29_CC0C81724643CD2C73AFF383D8355F77; // 0x00A0(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
struct FSlateFontInfo Subtitle_30_652CCC224E670DDF122B228933B5A5F2; // 0x00F0(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
struct FSlateFontInfo BoldSubtitle_31_82D86BB848ED28066E5B5AA3D4E4DED0; // 0x0140(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
struct FSlateFontInfo GeneralBodyCopy_26_84EC6719490FA1867F42869A5E146E06; // 0x0190(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
struct FSlateFontInfo FictionBodyCopy_28_221EDF9F4EE5F5DA0B9A18819EFE44C2; // 0x01E0(0x0050) (Edit, BlueprintVisible, HasGetValueTypeHash, NativeAccessSpecifierPublic)
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
a9d32263204534499b3bbf1233ec657c4c784f99 | 2c6bb48bfa057314b8fde3b01cd3b511319e865b | /img_oper_algorithm/RotRectAngle.cpp | 24a9b472e0e23d404ee65f6c6af879765e289598 | [] | no_license | king1991wbs/hiscene | 65edd35403b3cabbbdc28bae19a57372e7df939a | 9961445fd51688f1002a903181e1877608830f80 | refs/heads/master | 2021-01-20T08:47:06.347773 | 2015-03-25T06:03:40 | 2015-03-25T06:03:40 | 30,106,956 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,802 | cpp | RotRectAngle.cpp | #include "RotRectAngle.h"
double rotRectAngle( const RotatedRect &rRect )
{
double angle = 0.0;
Point2f pts[4];
rRect.points(pts);
//Point2f lEdgeA, LEdgeB;
int lPosA = 0, lPosB;
for( int i = 1; i < 4; ++i )
{
//rect if up-right
if( abs( pts[lPosA].x - pts[i].x ) < precision )
{
if( ( rRect.size.height - rRect.size.width ) > precision )////??????
return 0;
else
return CV_PI/2;
}
//find the most left point in rect
if( pts[lPosA].x > pts[i].x )
lPosA = i;
}
double length = ( pts[lPosA].x - pts[( lPosA + 1 ) % 4].x )*( pts[lPosA].x - pts[( lPosA + 1 ) % 4].x ) +
( pts[lPosA].y - pts[( lPosA + 1 ) % 4].y )*( pts[lPosA].y - pts[( lPosA + 1 ) % 4].y );
double height = rRect.size.height > rRect.size.width ? rRect.size.height : rRect.size.width;
if( abs( length - height*height ) < precision )
lPosB = ( lPosA + 1 ) % 4;
else if( lPosA == 0 )
{
lPosB = 3;
}else
lPosB = lPosA - 1;
Point2f vecAB( pts[lPosB].x - pts[lPosA].x , pts[lPosB].y - pts[lPosA].y);
Point2f vecUnitY( 0 , 1 );
double abDotunit = vecAB.ddot(vecUnitY);
double magAB = sqrt( vecAB.x*vecAB.x + vecAB.y*vecAB.y );
int angSign = abDotunit > 0 ? 1 : -1;//angle sign we need
double costheta = abs( abDotunit / magAB );
angle = angSign * acos( costheta );
return angle;
}
int main()
{
Mat image(200, 200, CV_8UC3, Scalar(0));
RotatedRect rRect = RotatedRect(Point2f(100,100), Size2f(100,100), 60);
Point2f vertices[4];
rRect.points(vertices);
for (int i = 0; i < 4; i++)
line(image, vertices[i], vertices[(i+1)%4], Scalar(0,255,0));
//Rect brect = rRect.boundingRect();
//rectangle(image, brect, Scalar(255,0,0));
double angle = rotRectAngle(rRect)/3.1415926*180;
cout << angle << endl;
imshow("rectangles", image);
waitKey(0);
return 0;
} |
3af215ccab38a45dd9484f9bd8eaaa0ce952e26b | 2870b0fc2b0b40c0c641c9f9529f84372f004c20 | /boss.cpp | 3330b2fd0c86545df821037396fedb7071225ba8 | [] | no_license | MoLiYue/homework | 865edf976ac3f2d88a52b26992141f5bbad6ad91 | c8c600683aa44d167d983f8b29f3b8974b749afa | refs/heads/master | 2020-05-09T13:41:11.052207 | 2019-04-13T12:07:11 | 2019-04-13T12:07:11 | 181,163,546 | 0 | 0 | null | 2019-04-13T12:04:22 | 2019-04-13T11:52:33 | C++ | WINDOWS-1252 | C++ | false | false | 25,112 | cpp | boss.cpp | #include<stdio.h>
#include "stdafx.h"
#include"functions.h"
#include <time.h>
#include <stdlib.h>
extern int x_boss0 = 0;
extern int y_boss0 = 0;
extern int hp_boss0 = boss0_hp;
extern int boss0_exist = 0;
extern int x, y;
extern char boss0_move;
extern int bullet;
extern int maxj = 0, maxd = 0;
int check_jump()
{
maxj = 4;
for (int i = -5; i <= 5; i++)
{
for (int j = 0; j <= 3; j++)
{
if (map[x_boss0 - 1 - j][y_boss0 + i] != 0)
if (j < maxj)maxj = j;
}
}
return maxj;
}
int check_drop()
{
maxd = 2;
for (int i = -5; i <= 5; i++)
{
for (int j = 0; j <= 1; j++)
{
if (map[x_boss0 + 6 + j][y_boss0 + i] != 0)
if (j < maxd)maxd = j;
}
}
return maxd;
}
int check_l()
{
for (int i = 0; i <= 5; i++)
{
if (map[x_boss0 + i][y_boss0 - 6] == 0 || map[x_boss0 + i][y_boss0 - 6] == body_value || map[x_boss0 + i][y_boss0 - 6] == head_value)
{
}
else {
return 0;
}
}
return 1;
}
int check_r()
{
for (int i = 0; i <= 5; i++)
{
if (map[x_boss0 + i][y_boss0 + 6] == 0 || map[x_boss0 + i][y_boss0 + 6] == body_value || map[x_boss0 + i][y_boss0 + 6] == head_value)
{
}
else {
return 0;
}
}
return 1;
}
void move_l()
{
map[x_boss0][y_boss0] -= boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] -= boss0_body_value;
map[x_boss0 + 5][y_boss0] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] -= boss0_body_value;
//
y_boss0 -= 1;
map[x_boss0][y_boss0] += boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] += boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] += boss0_body_value;
map[x_boss0 + 5][y_boss0] += boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] += boss0_body_value;
}
void move_r()
{
map[x_boss0][y_boss0] -= boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] -= boss0_body_value;
map[x_boss0 + 5][y_boss0] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] -= boss0_body_value;
//
y_boss0 += 1;
map[x_boss0][y_boss0] += boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] += boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] += boss0_body_value;
map[x_boss0 + 5][y_boss0] += boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] += boss0_body_value;
}
void drop()
{
map[x_boss0][y_boss0] -= boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] -= boss0_body_value;
map[x_boss0 + 5][y_boss0] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] -= boss0_body_value;
//
x_boss0 += 1;
map[x_boss0][y_boss0] += boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] += boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] += boss0_body_value;
map[x_boss0 + 5][y_boss0] += boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] += boss0_body_value;
}
void jump()
{
map[x_boss0][y_boss0] -= boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 1][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] -= boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] -= boss0_body_value;
map[x_boss0 + 5][y_boss0] -= boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] -= boss0_body_value;
//
x_boss0 -= 1;
map[x_boss0][y_boss0] += boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 1][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] += boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] += boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] += boss0_body_value;
map[x_boss0 + 5][y_boss0] += boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] += boss0_body_value;
}
void boss_ai()
{
if (boss0_move != '1')
{
boss0_move = '0';
if (bullet == 0)//ÎÞ×Óµ¯
{
if (x - y_boss0 > 25)
{
if (check_r() != 0)
{
//boss0_move = 'd';
move_r();
}
else
{
if (check_jump() != 0)
{
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
else if (x - y_boss0 < -25)
{
if (check_l() != 0)
{
//boss0_move = 'a';
move_l();
}
else
{
if (check_jump() != 0)
{
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
else
{
if (x - y_boss0 > 0)
{
if (check_r != 0)
{
if (y - x_boss0 < 6 && check_jump() != 0)
{
/*boss0_move = 'd';*/
move_r();
for (int p = 1; p < check_jump(); p++)
{
jump();
}
}
else
{
/*boss0_move = 'd';*/
move_r();
}
}
else
{
if (check_jump() != 0)
{
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
else
{
if (check_l != 0)
{
if (y - x_boss0 < 6 && check_jump() != 0)
{
/*boss0_move = 'a';*/
move_l();
for (int p = 1; p < check_jump(); p++)
{
jump();
}
}
else
{
/*boss0_move = 'a';*/
move_l();
}
}
else
{
if (check_jump() != 0)
{
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
}
}
else//ÓÐ×Óµ¯
{
if (x - y_boss0 > 0 && x - y_boss0 < 25)
{
if (check_jump() != 0)
{
if (y_boss0 <= 8) //gai
{
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
}
else
{
if (check_l != 0)
{
move_l();
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
/*boss0_move = 'a';*/
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
else
{
if (check_l() != 0)
{
/*boss0_move = 'a';*/
move_l();
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
else if (x - y_boss0 < 0 && x - y_boss0 > -25)
{
if (check_jump() != 0)
{
if (y_boss0 >= map_length - 8) //gai
{
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
}
else
{
if (check_r != 0)
{
move_r();
for (int p = 1; p <= check_jump(); p++)
{
jump();
}
/*boss0_move = 'd';*/
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
else
{
if (check_r() != 0)
{
/*boss0_move = 'r';*/
move_r();
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
else
{
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
}
}
}
}
}
void boss_asset()
{
if (boss0_exist == 1)
{
boss_ai();
if (boss0_move == '1')
{
x_boss0 = boss0_x; y_boss0 = boss0_y;
map[x_boss0][y_boss0] = boss0_head_value;
map[x_boss0 + 1][y_boss0 - 1] = boss0_body_value;
map[x_boss0 + 1][y_boss0 + 1] = boss0_body_value;
map[x_boss0 + 1][y_boss0] = boss0_body_value;
map[x_boss0 + 2][y_boss0 - 2] = boss0_body_value;
map[x_boss0 + 2][y_boss0 - 1] = boss0_body_value;
map[x_boss0 + 2][y_boss0] = boss0_body_value;
map[x_boss0 + 2][y_boss0 + 1] = boss0_body_value;
map[x_boss0 + 2][y_boss0 + 2] = boss0_body_value;
map[x_boss0 + 3][y_boss0 - 3] = boss0_body_value;
map[x_boss0 + 3][y_boss0 - 2] = boss0_body_value;
map[x_boss0 + 3][y_boss0 - 1] = boss0_body_value;
map[x_boss0 + 3][y_boss0] = boss0_body_value;
map[x_boss0 + 3][y_boss0 + 1] = boss0_body_value;
map[x_boss0 + 3][y_boss0 + 2] = boss0_body_value;
map[x_boss0 + 3][y_boss0 + 3] = boss0_body_value;
map[x_boss0 + 4][y_boss0 - 4] = boss0_body_value;
map[x_boss0 + 4][y_boss0 - 3] = boss0_body_value;
map[x_boss0 + 4][y_boss0 - 2] = boss0_body_value;
map[x_boss0 + 4][y_boss0 - 1] = boss0_body_value;
map[x_boss0 + 4][y_boss0] = boss0_body_value;
map[x_boss0 + 4][y_boss0 + 1] = boss0_body_value;
map[x_boss0 + 4][y_boss0 + 2] = boss0_body_value;
map[x_boss0 + 4][y_boss0 + 3] = boss0_body_value;
map[x_boss0 + 4][y_boss0 + 4] = boss0_body_value;
map[x_boss0 + 5][y_boss0 - 5] = boss0_body_value;
map[x_boss0 + 5][y_boss0] = boss0_body_value;
map[x_boss0 + 5][y_boss0 + 5] = boss0_body_value;
boss0_move = '0';
}
//else if (boss0_move == 'a')
//{
// map[x_boss0][y_boss0] -= boss0_head_value;
// map[x_boss0 + 1][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 1][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 1][y_boss0] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 2] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 2] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 3] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 2] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 2] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 3] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 4] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 3] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 2] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 2] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 3] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 4] -= boss0_body_value;
// map[x_boss0 + 5][y_boss0 - 5] -= boss0_body_value;
// map[x_boss0 + 5][y_boss0] -= boss0_body_value;
// map[x_boss0 + 5][y_boss0 + 5] -= boss0_body_value;
// //
// y_boss0 -= 1;
// map[x_boss0][y_boss0] += boss0_head_value;
// map[x_boss0 + 1][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 1][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 1][y_boss0] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 2] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 2][y_boss0] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 2] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 3] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 2] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 3][y_boss0] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 2] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 3] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 4] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 3] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 2] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 4][y_boss0] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 2] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 3] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 4] += boss0_body_value;
// map[x_boss0 + 5][y_boss0 - 5] += boss0_body_value;
// map[x_boss0 + 5][y_boss0] += boss0_body_value;
// map[x_boss0 + 5][y_boss0 + 5] += boss0_body_value;
//}
//else if (boss0_move == 'd')
//{
// map[x_boss0][y_boss0] -= boss0_head_value;
// map[x_boss0 + 1][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 1][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 1][y_boss0] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 2] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 2] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 3] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 2] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 2] -= boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 3] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 4] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 3] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 2] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 1] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 1] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 2] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 3] -= boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 4] -= boss0_body_value;
// map[x_boss0 + 5][y_boss0 - 5] -= boss0_body_value;
// map[x_boss0 + 5][y_boss0] -= boss0_body_value;
// map[x_boss0 + 5][y_boss0 + 5] -= boss0_body_value;
// //
// y_boss0 += 1;
// map[x_boss0][y_boss0] += boss0_head_value;
// map[x_boss0 + 1][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 1][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 1][y_boss0] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 2] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 2][y_boss0] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 2][y_boss0 + 2] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 3] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 2] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 3][y_boss0] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 2] += boss0_body_value;
// map[x_boss0 + 3][y_boss0 + 3] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 4] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 3] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 2] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 - 1] += boss0_body_value;
// map[x_boss0 + 4][y_boss0] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 1] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 2] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 3] += boss0_body_value;
// map[x_boss0 + 4][y_boss0 + 4] += boss0_body_value;
// map[x_boss0 + 5][y_boss0 - 5] += boss0_body_value;
// map[x_boss0 + 5][y_boss0] += boss0_body_value;
// map[x_boss0 + 5][y_boss0 + 5] += boss0_body_value;
//}
for (int p = 1; p <= check_drop(); p++)
{
drop();
}
}
} |
c23b28a18c5bc541e75bfad5f351eed12991c4b4 | 69e2e5fb5220d3311b9d1e4c2bb2f6c1722a156a | /werkkzeug3_kkrieger/geneffectipp.hpp | c49ff3b2202a4c6dfffb35cb205ba313e17cd96a | [
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | kebby/fr_public | c2acb4787472c5e039805a084894a7858dd6d19a | 2bb82d30bf9d10cf2a94b445710942ac9f065391 | refs/heads/master | 2021-01-16T00:36:57.267206 | 2012-08-16T03:36:05 | 2012-08-16T03:36:05 | 4,026,092 | 6 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 701 | hpp | geneffectipp.hpp | // This file is distributed under a BSD license. See LICENSE.txt for details.
#ifndef __GENEFFECTIPP_HPP__
#define __GENEFFECTIPP_HPP__
#include "_types.hpp"
#include "geneffect.hpp"
/****************************************************************************/
KObject * __stdcall Init_Effect_LineShuffle(sInt pass);
void __stdcall Exec_Effect_LineShuffle(KOp *op,KEnvironment *kenv,sInt pass);
KObject * __stdcall Init_Effect_JPEG(sInt pass,sF32 ratio,sF32 strength,sInt mode,sInt iters);
void __stdcall Exec_Effect_JPEG(KOp *op,KEnvironment *kenv,sInt pass,sF32 ratio,sF32 strength,sInt mode,sInt iters);
/****************************************************************************/
#endif
|
eb114479784d9e4bdf50031546b0edade36479b3 | 024c74f395b4a749b26cf2719b1e4efecd5331fc | /TopCoder/SRM 587/test.cpp | 911be5592552e2138722ada8ffd0994537bc8a40 | [] | no_license | thisisrajat/competitive-programming | 28ed70f77e2c3892ee1d005341ef7d37930caad9 | 422cc7fac78a9908ca7a95a7c6eae724ed4a0631 | refs/heads/master | 2021-01-01T18:12:10.693796 | 2017-01-01T17:42:53 | 2017-01-01T17:42:53 | 17,668,936 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 179 | cpp | test.cpp | #include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
long double a = 9099.96*100.00;
cout << a << endl;
printf("%.3f", 9099.96*100.00);
} |
4632aca153107a9b6b88778cedea4e8365f00cb1 | d92c0930458822cdcf75cd0d521333fe42a29543 | /praks/пр 4/ооп пр 4.3.cpp | 317d1bb3c344bc6869951389a5288f736a7f1264 | [] | no_license | Sosnovskiy2116/oop-1 | c9ad23788007222d3be221aa198a4a2eb81a4c6e | 1f455fd64d2ca109cd4e0d6b64c6ddfdf54ae8bb | refs/heads/master | 2020-05-14T12:12:34.737794 | 2019-04-16T18:31:58 | 2019-04-16T18:31:58 | 181,790,281 | 1 | 0 | null | 2019-04-17T00:54:48 | 2019-04-17T00:54:48 | null | UTF-8 | C++ | false | false | 1,188 | cpp | ооп пр 4.3.cpp | #include "pch.h"
#include <iostream>
#include <ctime>
using namespace std;
int** zap( int kolstr, int kolstolb, int** mat ) {
for (int i = 0; i < kolstr; i++) {
for (int j = 0; j < kolstolb; j++) {
mat[i][j] = rand() % 50 + 10;
}
}
return mat;
}
void vyv(int** uuk, int kolstr, int kolstolb) {
for (int i = 0; i < kolstr; i++) {
for (int j = 0; j < kolstolb; j++) {
cout << uuk[i][j] << " ";
}
cout << endl;
}
}
int** udal(int** mat,int kolstr,int kolstolb) {
for (int i = 0; i < kolstr; i++) {
delete mat[ i];
}
return mat;
}
int main() {
setlocale(LC_ALL, "Russian");
srand(time(0));
cout << "enter the number of rows of the array ";
int kolstr;
cin >> kolstr;
cout << endl << "enter the number of colomns of the array ";
int kolstolb;
cin >> kolstolb;
cout << endl;
int **mat = new int *[kolstr];
for (int i = 0; i < kolstr; i++) {
mat[i] = new int[kolstolb];
}
mat=zap( kolstr, kolstolb,mat);//zapolniaem massiv
vyv( mat, kolstr, kolstolb);//vyvodim
mat=udal(mat,kolstr,kolstolb);//udaliaem pamat, vydelennuu ranee dlia massiva
delete mat[];
cout << endl;
system("pause");
return 0;
} |
bc2078abbedb95aad8605799a5042acb4753139f | 6d8fdd9fe2066525a236c03501425028d4117129 | /ProjectW3S/UtilFunc.h | 189524ddd8b94f608ddd96063ee01656cff9bca5 | [
"MIT"
] | permissive | yashihei/EX1ST | 44c35cf925dd2e31f481cde346d2a44967826069 | 0ea8c8d5a73f9808b3e0e5594b894dcee70bc4bf | refs/heads/master | 2021-01-11T16:36:13.363609 | 2017-01-28T09:16:34 | 2017-01-28T09:16:34 | 80,120,594 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,637 | h | UtilFunc.h | #pragma once
template <typename Type> inline const Type& Clamp(const Type& x, const Type& min, const Type& max) {
return (x < min) ? min : ((max < x) ? max : x);
}
template <typename Type> inline Type Wrap(const Type& x, const Type& min, const Type& max) {
const Type n = (x - min) % (max - min);
return (n >= 0) ? (n + min) : (n + max);
}
template <typename Type> inline bool InRange(const Type& x, const Type& min, const Type& max) {
return (min <= x) && (x <= max);
}
template <typename Container, typename Pred> inline void Erase_if(Container& c, Pred pred) {
c.erase(std::remove_if(c.begin(), c.end(), pred), c.end());
}
template <typename Type> inline void OutputDebugValue(const Type& value) {
#ifdef _DEBUG
OutputDebugString(std::to_string(value).c_str());
OutputDebugString("\n");
#endif
}
inline bool IsCollied(const D3DXVECTOR3& pos1, const D3DXVECTOR3& pos2, float r1, float r2) {
D3DXVECTOR3 tmp = pos2 - pos1;
return tmp.x*tmp.x + tmp.y*tmp.y + tmp.z*tmp.z < (r1 + r2)*(r1 + r2);
}
inline void drawRectangle2D(LPDIRECT3DDEVICE9 d3dDevice, const D3DXVECTOR2& topLeft, const D3DXVECTOR2& bottomRight, const D3DXCOLOR& color = 0xFFFFFFFF) {
struct PlateVtx {
D3DXVECTOR3 pos;
float rhw;
DWORD color;
};
std::vector<PlateVtx> vtx {
{ { topLeft.x, topLeft.y, 0 }, 1, color },
{ { bottomRight.x, topLeft.y, 0 }, 1, color },
{ { topLeft.x, bottomRight.y, 0 }, 1, color },
{ { bottomRight.x, bottomRight.y, 0 }, 1, color },
};
d3dDevice->SetTexture(0, NULL);
d3dDevice->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
d3dDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, vtx.data(), sizeof(PlateVtx));
}
|
3ee57c4e05e833a0b3c70cc236dcff11c0c70cd0 | cf2fe95b72d73b2356ec24683b6e727a1f852191 | /intro/ext/limits.cpp | 073297ba1ee6641a1b94ed764468cd3d6c852a78 | [] | no_license | ardkastrati/AlgoLab | b480d75539fecdb5d9adfab4d50d958cb4bf5be9 | 4acb3eed65070eb5b9d0b3facedbf1c0e0aad1b1 | refs/heads/master | 2020-04-04T14:27:30.933419 | 2019-01-18T10:50:38 | 2019-01-18T10:50:38 | 155,999,529 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 648 | cpp | limits.cpp | #include <limits>
#include <iostream>
int main() {
std::cout << "type\tmin()\t\t\tmax()\t\t\t#binary digits\n";
std::cout << "int\t"
<< std::numeric_limits<int>::min() << "\t\t"
<< std::numeric_limits<int>::max() << "\t\t"
<< std::numeric_limits<int>::digits << "\n";
std::cout << "long\t"
<< std::numeric_limits<long>::min() << "\t"
<< std::numeric_limits<long>::max() << "\t"
<< std::numeric_limits<long>::digits << "\n";
std::cout << "double\t"
<< std::numeric_limits<double>::min() << "\t\t"
<< std::numeric_limits<double>::max() << "\t\t"
<< std::numeric_limits<double>::digits << "\n";
return 0;
}
|
8fcd00840f015d0019c8707af618c2ae7122fd5d | e6d4a87dcf98e93bab92faa03f1b16253b728ac9 | /algorithms/cpp/uniqueNumberofOccurrences/uniqueNumberofOccurrences.cpp | 0d975e9f261bff74837bc55cb7254db23b1dd3e6 | [] | no_license | MichelleZ/leetcode | b5a58e1822e3f6ef8021b29d9bc9aca3fd3d416f | a390adeeb71e997b3c1a56c479825d4adda07ef9 | refs/heads/main | 2023-03-06T08:16:54.891699 | 2023-02-26T07:17:47 | 2023-02-26T07:17:47 | 326,904,500 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 458 | cpp | uniqueNumberofOccurrences.cpp | // Source: https://leetcode.com/problems/unique-number-of-occurrences/
// Author: Miao Zhang
// Date: 2021-04-17
class Solution {
public:
bool uniqueOccurrences(vector<int>& arr) {
unordered_map<int, int> cnt;
for (auto a: arr) cnt[a]++;
unordered_set<int> s;
for (const auto& kv: cnt) {
if (!s.insert(kv.second).second) {
return false;
}
}
return true;
}
};
|
a5656743170fe329a8c20ffe105b7ff86e8bd0ae | b9fd9789a1b426fcbd8c3b3a0210c44500b31e60 | /CoreRpc03x/src/common/startup/service.cpp | c72b86dabb33f20cee41a4f2e7e9d23caddf28e6 | [] | no_license | zhangjingl02/CoreRpc | c94d31c1dca9e6a72e8cab2325651e0d61decf75 | 18891e7d345653ebc5f670762326eb364aa63316 | refs/heads/master | 2020-05-18T11:24:12.520122 | 2013-11-15T03:40:28 | 2013-11-15T03:40:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,738 | cpp | service.cpp | #include "service.h"
#include<stdio.h>
#include <string.h>
#include <boost/format.hpp>
static const int NAME_LENGTH = 16;
static const int VERSION_LENGTH = 16;
Service::Service(std::string name,std::string version,std::string dispname):
name_(name),version_(version),displayName_(dispname){
name_ = name;
versionInfo_ = version;
displayName_ = dispname;
versionInfo_ = "VER:";
versionInfo_ += name.substr(0, NAME_LENGTH);
for (int i=0; i< (int)(NAME_LENGTH- name.size()); i++)
versionInfo_ += " ";
versionInfo_ += version.substr(0, VERSION_LENGTH);
for (int i=0; i< (int)(VERSION_LENGTH+1-version.size()); i++)
versionInfo_ += " ";
versionInfo_ += " build:";
versionInfo_ +=" build:";
char month[10];
int day;
int year;
sscanf(__DATE__,"%s %d %d", &month, &day, &year);
int imonth = 0;
if (strcmp(month, "Jan") == 0 )
imonth = 1;
else if (strcmp(month, "Feb") == 0 )
imonth = 2;
else if (strcmp(month, "Mar") == 0 )
imonth = 3;
else if (strcmp(month, "Apr") == 0 )
imonth = 4;
else if (strcmp(month, "May") == 0 )
imonth = 5;
else if (strcmp(month, "Jun") == 0 )
imonth = 6;
else if (strcmp(month, "Jul") == 0 )
imonth = 7;
else if (strcmp(month, "Aug") == 0 )
imonth = 8;
else if (strcmp(month, "Sep") == 0 )
imonth = 9;
else if (strcmp(month, "Oct") == 0 )
imonth = 10;
else if (strcmp(month, "Nov") == 0 )
imonth = 11;
else if (strcmp(month, "Dec") == 0 )
imonth = 12;
versionInfo_ += str(boost::format("%4d-%02d-%02d ")%year%imonth%day);
//StringUtil::format("%4d-%02d-%02d ", year, imonth, day);
version_+= str(boost::format("%4d-%02d-%02d ")%year%imonth%day);
//version_ += StringUtil::format("%4d-%02d-%02d ", year, imonth, day);
versionInfo_ += __TIME__;
} |
b99ca74bd4d92de2eff51ddafd65a92de518a4d4 | 31ac07ecd9225639bee0d08d00f037bd511e9552 | /externals/OCCTLib/inc/GccAna_CircLin2dBisec.hxx | 70220d45c8bc2ba2c3309fa9c2d8c87650b871cb | [] | no_license | litao1009/SimpleRoom | 4520e0034e4f90b81b922657b27f201842e68e8e | 287de738c10b86ff8f61b15e3b8afdfedbcb2211 | refs/heads/master | 2021-01-20T19:56:39.507899 | 2016-07-29T08:01:57 | 2016-07-29T08:01:57 | 64,462,604 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,808 | hxx | GccAna_CircLin2dBisec.hxx | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _GccAna_CircLin2dBisec_HeaderFile
#define _GccAna_CircLin2dBisec_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineAlloc_HeaderFile
#include <Standard_DefineAlloc.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _gp_Circ2d_HeaderFile
#include <gp_Circ2d.hxx>
#endif
#ifndef _gp_Lin2d_HeaderFile
#include <gp_Lin2d.hxx>
#endif
#ifndef _Handle_GccInt_Bisec_HeaderFile
#include <Handle_GccInt_Bisec.hxx>
#endif
class Standard_OutOfRange;
class StdFail_NotDone;
class gp_Circ2d;
class gp_Lin2d;
class GccInt_Bisec;
//! Describes functions for building bisecting curves between a 2D line and a 2D circle. <br>
//! A bisecting curve between a circle and a line is a curve <br>
//! such that each of its points is at the same distance from <br>
//! the circle and the line. It can be a parabola or a line, <br>
//! depending of the relative position of the line and the <br>
//! circle. The algorithm computes all the elementary curves which are solutions. <br>
//! A CircLin2dBisec object provides a framework for: <br>
//! - defining the construction of the bisecting curves, <br>
//! - implementing the construction algorithm, and <br>
//! - consulting the result. <br>
class GccAna_CircLin2dBisec {
public:
DEFINE_STANDARD_ALLOC
//! Constructs bisecting curves between the circle Circle and the line Line. <br>
Standard_EXPORT GccAna_CircLin2dBisec(const gp_Circ2d& Circle,const gp_Lin2d& Line);
//! Returns true (this construction algorithm never fails). <br>
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of curves, representing solutions computed by this algorithm. <br>
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange <br>
//! exception if Index is greater than the number of solutions <br>
//! Exceptions <br>
//! Standard_OutOfRange if Index is less than zero or <br>
//! greater than the number of solutions computed by this algorithm. <br>
Standard_EXPORT Handle_GccInt_Bisec ThisSolution(const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
gp_Circ2d circle;
gp_Lin2d line;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|
d547dd3185517da0effa059ba5ccbe2594837b92 | 8da9fd5175fad4f938f3e6c1965254d1d4827cce | /lrlb_reactor/src/tcp_server.cpp | abe4447dee7eb05a7f2a79e7acf53a5fd8e9675a | [] | no_license | liangruijin/Lrlb | c80632354d05d5fe70487e20163b5d655ca1cc2a | 7cb38c332e5e38f89e433ee7c4ae29f3eef84882 | refs/heads/master | 2023-06-20T03:19:12.112844 | 2021-07-09T01:04:40 | 2021-07-09T01:04:40 | 329,559,789 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,683 | cpp | tcp_server.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include "tcp_server.h"
#include "tcp_conn.h"
#include "reactor_buf.h"
//tmp test message
struct message{
char data[m4K];
char len;
};
struct message msg;
// ==== 消息路由分发 ====
msg_router tcp_server::router;
void server_rd_callback(event_loop* loop,int fd,void * args);
void server_wt_callback(event_loop* loop,int fd,void * args);
void accept_callback(event_loop* loop,int fd,void * args){
tcp_server* server=(tcp_server*) args;
server->do_accept();
}
// ===连接资源的管理=== //
//全部已经在线的信息
tcp_conn ** tcp_server::conns =NULL;
//最大容量连接个数
int tcp_server::_max_conns=0;
//当前连接数量
int tcp_server::_curr_conns=0;
//保护_curr_conns的锁
pthread_mutex_t tcp_server::_conns_mutex=PTHREAD_MUTEX_INITIALIZER;
//
// 创建连接 的回调函数
conn_callback tcp_server::conn_start_cb;
void * tcp_server::conn_start_cb_args;
// 销毁连接触发 回调函数
conn_callback tcp_server::conn_close_cb;
void * tcp_server::conn_close_cb_args;
tcp_server::tcp_server(event_loop* loop,const char* ip,uint16_t port)
{
bzero(&_connaddr,sizeof (_connaddr)); //先把地址进行清空
//忽略一些信号
//SIGHUP:如果terminal关闭,会给当前进程发送该信号,默认操作是退出
//如果忽略了之后,当终端关闭了,该服务器还是不会关闭的。
if(signal(SIGHUP,SIG_IGN)==SIG_ERR){
fprintf(stderr,"signal ignore SIGHUP\n");
}
//SIGPIPE:如果客户端关闭连接,服务端再次write就会产生sigpipe
//其默认行为是关闭进程,我们肯定是不希望是因为写错误导致我们退出进程
//这里要么忽略信号,要么接受信号并处理,那么利用iO多路复用技术,
//通过IO复用函数来检测管道和socket连接的读端是否已经关闭。以POLL为例
//当socket连接被对方关闭时,socket上的POLLRDHUP事件将被触发。
if(signal(SIGPIPE,SIG_IGN)==SIG_ERR){
fprintf(stderr,"signal ignore SIGPIPE\n");
}
//1. 创建socket
//SOCK_CLOEXEC的作用是在子进程调用execd的时候自动关闭文件描述符
_sockfd = socket(AF_INET, SOCK_STREAM /*| SOCK_NONBLOCK*/ | SOCK_CLOEXEC, IPPROTO_TCP);
if (_sockfd == -1) {
fprintf(stderr, "tcp_server::socket()\n");
exit(1);
}
//2 初始化地址
struct sockaddr_in server_addr;
bzero(&server_addr, sizeof(server_addr));
server_addr.sin_family = AF_INET;
inet_aton(ip, &server_addr.sin_addr);
server_addr.sin_port = htons(port);
//2-1可以多次监听,设置REUSE属性
int op = 1;
if (setsockopt(_sockfd, SOL_SOCKET, SO_REUSEADDR, &op, sizeof(op)) < 0) {
fprintf(stderr, "setsocketopt SO_REUSEADDR\n");
}
//3 绑定端口
if (bind(_sockfd, (const struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) {
fprintf(stderr, "bind error\n");
exit(1);
}
//4 监听ip端口
if (listen(_sockfd, 500) == -1) {
fprintf(stderr, "listen error\n");
exit(1);
}
//5 初始化event_loop;
_loop=loop;
//6 创建连接管理
_max_conns=MAX_CONNS;
conns=new tcp_conn*[_max_conns+3];
//原话 :为啥呢,因为这里stdin,stdout,stderr已经被占用,所以我们呢
//需要多开三个文件描述符,不加三就会溢出
//思考:这里我觉得如果想表达最多连接数量的话,不应该用数组去表示表示,因为可能有其他fd被我们的
//服务器占用了,那么剩下的fd肯定不够。我觉的应该离散的保存,比如用个hash表保存比较好
//但是如果我们只是想表达最大连接fd的值的话,可以 用数组。但是就是担心越界了怎么办
if (conns == NULL) {
fprintf(stderr, "new conns[%d] error\n", _max_conns);
exit(1);
}
//7 ========创建线程池===========
int thread_cnt=3 ; //todo 从配置文件中读取
if(thread_cnt>0){
_thread_pool=new thread_pool(thread_cnt);
if(_thread_pool==NULL){
fprintf(stderr,"tcp_server new thread_pool error\n");
exit(1);
}
}
//===================
//8注册回调函数
_loop->add_io_event(_sockfd, accept_callback, EPOLLIN, this);
}
tcp_server::tcp_server(event_loop* loop,const char* ip,uint16_t port,int pthread_num)
{
bzero(&_connaddr,sizeof (_connaddr)); //先把地址进行清空
//忽略一些信号
//SIGHUP:如果terminal关闭,会给当前进程发送该信号,默认操作是退出
//如果忽略了之后,当终端关闭了,该服务器还是不会关闭的。
if(signal(SIGHUP,SIG_IGN)==SIG_ERR){
fprintf(stderr,"signal ignore SIGHUP\n");
}
//SIGPIPE:如果客户端关闭连接,服务端再次write就会产生sigpipe
//其默认行为是关闭进程,我们肯定是不希望是因为写错误导致我们退出进程
//这里要么忽略信号,要么接受信号并处理,那么利用iO多路复用技术,
//通过IO复用函数来检测管道和socket连接的读端是否已经关闭。以POLL为例
//当socket连接被对方关闭时,socket上的POLLRDHUP事件将被触发。
if(signal(SIGPIPE,SIG_IGN)==SIG_ERR){
fprintf(stderr,"signal ignore SIGPIPE\n");
}
//1. 创建socket
//SOCK_CLOEXEC的作用是在子进程调用execd的时候自动关闭文件描述符
_sockfd = socket(AF_INET, SOCK_STREAM /*| SOCK_NONBLOCK*/ | SOCK_CLOEXEC, IPPROTO_TCP);
if (_sockfd == -1) {
fprintf(stderr, "tcp_server::socket()\n");
exit(1);
}
//2 初始化地址
struct sockaddr_in server_addr;
bzero(&server_addr, sizeof(server_addr));
server_addr.sin_family = AF_INET;
inet_aton(ip, &server_addr.sin_addr);
server_addr.sin_port = htons(port);
//2-1可以多次监听,设置REUSE属性
int op = 1;
if (setsockopt(_sockfd, SOL_SOCKET, SO_REUSEADDR, &op, sizeof(op)) < 0) {
fprintf(stderr, "setsocketopt SO_REUSEADDR\n");
}
//3 绑定端口
if (bind(_sockfd, (const struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) {
fprintf(stderr, "bind error\n");
exit(1);
}
//4 监听ip端口
if (listen(_sockfd, 500) == -1) {
fprintf(stderr, "listen error\n");
exit(1);
}
//5 初始化event_loop;
_loop=loop;
//6 创建连接管理
_max_conns=MAX_CONNS;
conns=new tcp_conn*[_max_conns+3];
//原话 :为啥呢,因为这里stdin,stdout,stderr已经被占用,所以我们呢
//需要多开三个文件描述符,不加三就会溢出
//思考:这里我觉得如果想表达最多连接数量的话,不应该用数组去表示表示,因为可能有其他fd被我们的
//服务器占用了,那么剩下的fd肯定不够。我觉的应该离散的保存,比如用个hash表保存比较好
//但是如果我们只是想表达最大连接fd的值的话,可以 用数组。但是就是担心越界了怎么办
if (conns == NULL) {
fprintf(stderr, "new conns[%d] error\n", _max_conns);
exit(1);
}
//7 ========创建线程池===========
int thread_cnt=pthread_num ; //todo 从配置文件中读取
if(thread_cnt>0){
_thread_pool=new thread_pool(thread_cnt);
if(_thread_pool==NULL){
fprintf(stderr,"tcp_server new thread_pool error\n");
exit(1);
}
}
//===================
//8注册回调函数
_loop->add_io_event(_sockfd, accept_callback, EPOLLIN, this);
}
//开始提供创建链接服务
void tcp_server::do_accept()
{
int connfd;
while(true) { //循环读取呀
//accept与客户端创建链接
printf("begin accept\n");
connfd = accept(_sockfd, (struct sockaddr*)&_connaddr, &_addrlen);
if (connfd == -1) {
if (errno == EINTR) {
fprintf(stderr, "accept errno=EINTR\n");
continue;
}
else if (errno == EMFILE) {
//建立链接过多,资源不够
fprintf(stderr, "accept errno=EMFILE\n");
}
else if (errno == EAGAIN) {
fprintf(stderr, "accept errno=EAGAIN\n");
break;
}
else {
fprintf(stderr, "accept error");
exit(1);
}
}
else {
//this->_loop->add_io_event(connfd, server_rd_callback, EPOLLIN,&msg);
//break;
int cur_conns;
get_conn_num(&cur_conns);
if(cur_conns>=_max_conns){
fprintf(stderr, "so many connections, max = %d\n", _max_conns);
close(connfd);
}
else {
//我们需要判断有没有线程池,没有自己处理
if(_thread_pool!=NULL){ //多线程模式
//1 选择一个线程来处理
thread_queue<task_msg>* queue=_thread_pool->get_thread();
//2创建一个task
task_msg task;
task.type=task_msg::NEW_CONN;
task.connfd=connfd;
//3.添加到消息队列中去
queue->send(task);
//================
}
else{ //单线程模式
tcp_conn* conn=new tcp_conn(connfd,_loop);
if(conn==NULL) {
fprintf(stderr, "new tcp_conn error\n");
exit(1);
}
printf("get new connection succ \n");
break;
}
}
}
}
}
//链接对象释放的析构
tcp_server::~tcp_server()
{
close(_sockfd);
}
void server_rd_callback(event_loop * loop, int fd, void * args)
{
int ret=0;
struct message* msg=(struct message*) args;
input_buf ibuf;
ret=ibuf.read_data(fd);
if(ret==-1){
fprintf(stderr, "ibuf read_data error\n");
//删除事件
loop->del_io_event(fd);
//对端关闭
close(fd);
return;
}
if(ret==0){
//删除事件
loop->del_io_event(fd);
//对端关闭
close(fd);
return;
}
printf("--------------- \n");
printf("ibuf.length() = %d \n",ibuf.length());
char tmp[ibuf.length()];
memcpy(tmp,ibuf.data(),ibuf.length());
tmp[ibuf.length()-1]='\0';
printf("ibuf.data() is : %s \n",tmp);
printf("--------------- \n");
//将数据放在msg中
msg->len=ibuf.length();
bzero(msg->data,sizeof msg->data);
memcpy(msg->data,ibuf.data(),msg->len);
ibuf.pop(msg->len);
ibuf.adjust();
printf("*********** \n");
printf("recv data = %s ,msglen is %d\n", msg->data,msg->len);
printf("*********** \n");
//删除读事件,添加写事件
loop->del_io_event(fd, EPOLLIN);
loop->add_io_event(fd, server_wt_callback, EPOLLOUT, msg); //相当于回显
}
void server_wt_callback(event_loop * loop, int fd, void * args)
{
struct message* msg=(struct message*) args;
output_buf obuf;
//回显数据
obuf.send_data(msg->data,msg->len);
while(obuf.length()){
int write_ret=obuf.write2fd(fd);
if(write_ret==-1){
fprintf(stderr, "write connfd error\n");
return;
}
else if(write_ret==0){
break; //不是错误,只是不可写,如果不break的话,就会一直循环写
}
}
//删除写事件,添加读事件
loop->del_io_event(fd, EPOLLOUT);
loop->add_io_event(fd, server_rd_callback, EPOLLIN, msg);
}
//增加一个连接
void tcp_server::increase_conn(int connfd, tcp_conn * conn)
{
pthread_mutex_lock(&_conns_mutex);
conns[connfd]=conn;
_curr_conns++;
pthread_mutex_unlock(&_conns_mutex);
}
//减少一个连接
void tcp_server::decrease_conn(int connfd)
{
pthread_mutex_lock(&_conns_mutex);
conns[connfd]=NULL;
_curr_conns--;
pthread_mutex_unlock(&_conns_mutex);
}
//得到当前连接的数量
void tcp_server::get_conn_num(int * curr_conn)
{
pthread_mutex_lock(&_conns_mutex);
*curr_conn=_curr_conns;
pthread_mutex_unlock(&_conns_mutex);
}
|
bf58d7e031315382f3ef6cca10848a5d10f9f82a | dcbd41891a4dfefe941a73ca071e5553a367ed8f | /CTaskEvent.h | 48a5ad6cc112afea08ee207c20f68572b351b9a5 | [] | no_license | cuiopen/GameServer-4 | dbaf074c127d3cd5a0aae47e2303d6b0e6b01633 | 3235d24a9eeeb065bd5296d2e36d8ccba3174836 | refs/heads/master | 2020-03-19T15:47:26.790489 | 2015-05-15T01:48:03 | 2015-05-15T01:48:03 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 892 | h | CTaskEvent.h | #ifndef CTaskEvent_H_
#define CTaskEvent_H_
#include "CGameMesEvent.h"
#include "CMD_Game.h"
#include "CGlobeData.h"
class CCTaskEvent : public CCGameMesEvent
{
public:
CCTaskEvent(CCGameMesManager *pMesManager,CT_WORD id);
~CCTaskEvent(void);
private:
//处理用户消息
virtual CT_VOID OnUserEvent(CT_DWORD mainID,CT_DWORD subID,CT_CHAR* pBuf,CT_DWORD len,CT_LONGLONG reserve);
//用户定时器处理
virtual CT_VOID OnTime(CT_DWORD timeID){}
//用户时钟处理
virtual CT_VOID OnClock(CT_DWORD timeID)
{
}
private:
//处理奖励请求
CT_VOID DisposeRewardRequest(CT_CHAR* pBuf,CT_DWORD len);
CT_VOID DisposeTaskFastComplete(CT_CHAR* pBuf,CT_DWORD len);
CT_VOID DisposeTaskInquiry(CT_CHAR* pBuf,CT_DWORD len);
CT_VOID DispostTaskRole(CT_CHAR* pBuf,CT_DWORD len);
CT_VOID DisposeFightTeamUpgrade(CT_CHAR* pBuf, CT_DWORD len);
};
#endif |
cedae6292ddcf6f666daed6cdc4050dce641b5ee | 9ffee105d323f8f9c0cb8ac92d74ee3551ab5dfa | /Templates in C++/Function Templates/Example_3.cpp | b9d8fb5bd0790c5da63cf69c894cb6a89a4352c4 | [
"MIT"
] | permissive | Ahtisham-Shakir/CPP_OOP | 2098f3bf4d965d26adee5585033d211e297f0003 | 308e7bdbd1e73c644a17f612fc5b919cb68c171c | refs/heads/main | 2023-07-26T01:22:59.402548 | 2021-08-28T19:22:29 | 2021-08-28T19:22:29 | 375,672,983 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 202 | cpp | Example_3.cpp | #include <iostream>
using namespace std;
template <class type>
void show(type a)
{
cout << a << endl;
}
int main()
{
show("Hello");
show(100);
show(50.75);
show('*');
return 0;
} |
6c25be696ac275156ad2d9c755bc35d4baed7411 | b33a9177edaaf6bf185ef20bf87d36eada719d4f | /qtmultimedia/src/multimediawidgets/qvideowidget.cpp | d14a70475924f557087d62c03a2da8099908a980 | [
"Qt-LGPL-exception-1.1",
"LGPL-2.1-only",
"LGPL-2.0-or-later",
"LGPL-3.0-only",
"GPL-3.0-only",
"LGPL-2.1-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GFDL-1.3-only",
"LicenseRef-scancode-digia-qt-preview",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-generic-exception"
] | permissive | wgnet/wds_qt | ab8c093b8c6eead9adf4057d843e00f04915d987 | 8db722fd367d2d0744decf99ac7bafaba8b8a3d3 | refs/heads/master | 2021-04-02T11:07:10.181067 | 2020-06-02T10:29:03 | 2020-06-02T10:34:19 | 248,267,925 | 1 | 0 | Apache-2.0 | 2020-04-30T12:16:53 | 2020-03-18T15:20:38 | null | UTF-8 | C++ | false | false | 25,784 | cpp | qvideowidget.cpp | /****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qvideowidget_p.h"
#include "qpaintervideosurface_p.h"
#include <qmediaobject.h>
#include <qmediaservice.h>
#include <qvideowindowcontrol.h>
#include <qvideowidgetcontrol.h>
#include <qvideorenderercontrol.h>
#include <qvideosurfaceformat.h>
#include <qpainter.h>
#include <qapplication.h>
#include <qevent.h>
#include <qdialog.h>
#include <qboxlayout.h>
#include <qnamespace.h>
using namespace Qt;
QT_BEGIN_NAMESPACE
QVideoWidgetControlBackend::QVideoWidgetControlBackend(
QMediaService *service, QVideoWidgetControl *control, QWidget *widget)
: m_service(service)
, m_widgetControl(control)
{
connect(control, SIGNAL(brightnessChanged(int)), widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), widget, SLOT(_q_contrastChanged(int)));
connect(control, SIGNAL(hueChanged(int)), widget, SLOT(_q_hueChanged(int)));
connect(control, SIGNAL(saturationChanged(int)), widget, SLOT(_q_saturationChanged(int)));
connect(control, SIGNAL(fullScreenChanged(bool)), widget, SLOT(_q_fullScreenChanged(bool)));
QBoxLayout *layout = new QVBoxLayout;
layout->setMargin(0);
layout->setSpacing(0);
layout->addWidget(control->videoWidget());
widget->setLayout(layout);
}
void QVideoWidgetControlBackend::releaseControl()
{
m_service->releaseControl(m_widgetControl);
}
void QVideoWidgetControlBackend::setBrightness(int brightness)
{
m_widgetControl->setBrightness(brightness);
}
void QVideoWidgetControlBackend::setContrast(int contrast)
{
m_widgetControl->setContrast(contrast);
}
void QVideoWidgetControlBackend::setHue(int hue)
{
m_widgetControl->setHue(hue);
}
void QVideoWidgetControlBackend::setSaturation(int saturation)
{
m_widgetControl->setSaturation(saturation);
}
void QVideoWidgetControlBackend::setFullScreen(bool fullScreen)
{
m_widgetControl->setFullScreen(fullScreen);
}
Qt::AspectRatioMode QVideoWidgetControlBackend::aspectRatioMode() const
{
return m_widgetControl->aspectRatioMode();
}
void QVideoWidgetControlBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_widgetControl->setAspectRatioMode(mode);
}
QRendererVideoWidgetBackend::QRendererVideoWidgetBackend(
QMediaService *service, QVideoRendererControl *control, QWidget *widget)
: m_service(service)
, m_rendererControl(control)
, m_widget(widget)
, m_surface(new QPainterVideoSurface)
, m_aspectRatioMode(Qt::KeepAspectRatio)
, m_updatePaintDevice(true)
{
connect(this, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(this, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
connect(this, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
connect(this, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
connect(m_surface, SIGNAL(frameChanged()), this, SLOT(frameChanged()));
connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
this, SLOT(formatChanged(QVideoSurfaceFormat)));
m_rendererControl->setSurface(m_surface);
}
QRendererVideoWidgetBackend::~QRendererVideoWidgetBackend()
{
delete m_surface;
}
void QRendererVideoWidgetBackend::releaseControl()
{
m_service->releaseControl(m_rendererControl);
}
void QRendererVideoWidgetBackend::clearSurface()
{
m_rendererControl->setSurface(0);
}
void QRendererVideoWidgetBackend::setBrightness(int brightness)
{
m_surface->setBrightness(brightness);
emit brightnessChanged(brightness);
}
void QRendererVideoWidgetBackend::setContrast(int contrast)
{
m_surface->setContrast(contrast);
emit contrastChanged(contrast);
}
void QRendererVideoWidgetBackend::setHue(int hue)
{
m_surface->setHue(hue);
emit hueChanged(hue);
}
void QRendererVideoWidgetBackend::setSaturation(int saturation)
{
m_surface->setSaturation(saturation);
emit saturationChanged(saturation);
}
Qt::AspectRatioMode QRendererVideoWidgetBackend::aspectRatioMode() const
{
return m_aspectRatioMode;
}
void QRendererVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_aspectRatioMode = mode;
m_widget->updateGeometry();
}
void QRendererVideoWidgetBackend::setFullScreen(bool)
{
}
QSize QRendererVideoWidgetBackend::sizeHint() const
{
return m_surface->surfaceFormat().sizeHint();
}
void QRendererVideoWidgetBackend::showEvent()
{
}
void QRendererVideoWidgetBackend::hideEvent(QHideEvent *)
{
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
m_updatePaintDevice = true;
m_surface->setGLContext(0);
#endif
}
void QRendererVideoWidgetBackend::resizeEvent(QResizeEvent *)
{
updateRects();
}
void QRendererVideoWidgetBackend::moveEvent(QMoveEvent *)
{
}
void QRendererVideoWidgetBackend::paintEvent(QPaintEvent *event)
{
QPainter painter(m_widget);
if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
QRegion borderRegion = event->region();
borderRegion = borderRegion.subtracted(m_boundingRect);
QBrush brush = m_widget->palette().window();
QVector<QRect> rects = borderRegion.rects();
for (QVector<QRect>::iterator it = rects.begin(), end = rects.end(); it != end; ++it) {
painter.fillRect(*it, brush);
}
}
if (m_surface->isActive() && m_boundingRect.intersects(event->rect())) {
m_surface->paint(&painter, m_boundingRect, m_sourceRect);
m_surface->setReady(true);
} else {
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
if (m_updatePaintDevice && (painter.paintEngine()->type() == QPaintEngine::OpenGL
|| painter.paintEngine()->type() == QPaintEngine::OpenGL2)) {
m_updatePaintDevice = false;
m_surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
if (m_surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
m_surface->setShaderType(QPainterVideoSurface::GlslShader);
} else {
m_surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
}
}
#endif
}
}
void QRendererVideoWidgetBackend::formatChanged(const QVideoSurfaceFormat &format)
{
m_nativeSize = format.sizeHint();
updateRects();
m_widget->updateGeometry();
m_widget->update();
}
void QRendererVideoWidgetBackend::frameChanged()
{
m_widget->update(m_boundingRect);
}
void QRendererVideoWidgetBackend::updateRects()
{
QRect rect = m_widget->rect();
if (m_nativeSize.isEmpty()) {
m_boundingRect = QRect();
} else if (m_aspectRatioMode == Qt::IgnoreAspectRatio) {
m_boundingRect = rect;
m_sourceRect = QRectF(0, 0, 1, 1);
} else if (m_aspectRatioMode == Qt::KeepAspectRatio) {
QSize size = m_nativeSize;
size.scale(rect.size(), Qt::KeepAspectRatio);
m_boundingRect = QRect(0, 0, size.width(), size.height());
m_boundingRect.moveCenter(rect.center());
m_sourceRect = QRectF(0, 0, 1, 1);
} else if (m_aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
m_boundingRect = rect;
QSizeF size = rect.size();
size.scale(m_nativeSize, Qt::KeepAspectRatio);
m_sourceRect = QRectF(
0, 0, size.width() / m_nativeSize.width(), size.height() / m_nativeSize.height());
m_sourceRect.moveCenter(QPointF(0.5, 0.5));
}
}
QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(
QMediaService *service, QVideoWindowControl *control, QWidget *widget)
: m_service(service)
, m_windowControl(control)
, m_widget(widget)
{
connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
connect(control, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
connect(control, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
connect(control, SIGNAL(fullScreenChanged(bool)), m_widget, SLOT(_q_fullScreenChanged(bool)));
connect(control, SIGNAL(nativeSizeChanged()), m_widget, SLOT(_q_dimensionsChanged()));
control->setWinId(widget->winId());
}
QWindowVideoWidgetBackend::~QWindowVideoWidgetBackend()
{
}
void QWindowVideoWidgetBackend::releaseControl()
{
m_service->releaseControl(m_windowControl);
}
void QWindowVideoWidgetBackend::setBrightness(int brightness)
{
m_windowControl->setBrightness(brightness);
}
void QWindowVideoWidgetBackend::setContrast(int contrast)
{
m_windowControl->setContrast(contrast);
}
void QWindowVideoWidgetBackend::setHue(int hue)
{
m_windowControl->setHue(hue);
}
void QWindowVideoWidgetBackend::setSaturation(int saturation)
{
m_windowControl->setSaturation(saturation);
}
void QWindowVideoWidgetBackend::setFullScreen(bool fullScreen)
{
m_windowControl->setFullScreen(fullScreen);
}
Qt::AspectRatioMode QWindowVideoWidgetBackend::aspectRatioMode() const
{
return m_windowControl->aspectRatioMode();
}
void QWindowVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_windowControl->setAspectRatioMode(mode);
}
QSize QWindowVideoWidgetBackend::sizeHint() const
{
return m_windowControl->nativeSize();
}
void QWindowVideoWidgetBackend::showEvent()
{
m_windowControl->setWinId(m_widget->winId());
m_windowControl->setDisplayRect(m_widget->rect());
#if defined(Q_WS_WIN)
m_widget->setUpdatesEnabled(false);
#endif
}
void QWindowVideoWidgetBackend::hideEvent(QHideEvent *)
{
#if defined(Q_WS_WIN)
m_widget->setUpdatesEnabled(true);
#endif
}
void QWindowVideoWidgetBackend::moveEvent(QMoveEvent *)
{
m_windowControl->setDisplayRect(m_widget->rect());
}
void QWindowVideoWidgetBackend::resizeEvent(QResizeEvent *)
{
m_windowControl->setDisplayRect(m_widget->rect());
}
void QWindowVideoWidgetBackend::paintEvent(QPaintEvent *event)
{
if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
QPainter painter(m_widget);
painter.fillRect(event->rect(), m_widget->palette().window());
}
m_windowControl->repaint();
event->accept();
}
#if defined(Q_WS_WIN)
bool QWindowVideoWidgetBackend::winEvent(MSG *message, long *)
{
if (message->message == WM_PAINT)
m_windowControl->repaint();
return false;
}
#endif
void QVideoWidgetPrivate::setCurrentControl(QVideoWidgetControlInterface *control)
{
if (currentControl != control) {
currentControl = control;
currentControl->setBrightness(brightness);
currentControl->setContrast(contrast);
currentControl->setHue(hue);
currentControl->setSaturation(saturation);
currentControl->setAspectRatioMode(aspectRatioMode);
}
}
void QVideoWidgetPrivate::clearService()
{
if (service) {
QObject::disconnect(service, SIGNAL(destroyed()), q_func(), SLOT(_q_serviceDestroyed()));
if (widgetBackend) {
QLayout *layout = q_func()->layout();
for (QLayoutItem *item = layout->takeAt(0); item; item = layout->takeAt(0)) {
item->widget()->setParent(0);
delete item;
}
delete layout;
widgetBackend->releaseControl();
delete widgetBackend;
widgetBackend = 0;
} else if (rendererBackend) {
rendererBackend->clearSurface();
rendererBackend->releaseControl();
delete rendererBackend;
rendererBackend = 0;
} else {
windowBackend->releaseControl();
delete windowBackend;
windowBackend = 0;
}
currentBackend = 0;
currentControl = 0;
service = 0;
}
}
bool QVideoWidgetPrivate::createWidgetBackend()
{
if (QMediaControl *control = service->requestControl(QVideoWidgetControl_iid)) {
if (QVideoWidgetControl *widgetControl = qobject_cast<QVideoWidgetControl *>(control)) {
widgetBackend = new QVideoWidgetControlBackend(service, widgetControl, q_func());
setCurrentControl(widgetBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
bool QVideoWidgetPrivate::createWindowBackend()
{
if (QMediaControl *control = service->requestControl(QVideoWindowControl_iid)) {
if (QVideoWindowControl *windowControl = qobject_cast<QVideoWindowControl *>(control)) {
windowBackend = new QWindowVideoWidgetBackend(service, windowControl, q_func());
currentBackend = windowBackend;
setCurrentControl(windowBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
bool QVideoWidgetPrivate::createRendererBackend()
{
if (QMediaControl *control = service->requestControl(QVideoRendererControl_iid)) {
if (QVideoRendererControl *rendererControl = qobject_cast<QVideoRendererControl *>(control)) {
rendererBackend = new QRendererVideoWidgetBackend(service, rendererControl, q_func());
currentBackend = rendererBackend;
setCurrentControl(rendererBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
void QVideoWidgetPrivate::_q_serviceDestroyed()
{
if (widgetBackend)
delete q_func()->layout();
delete widgetBackend;
delete windowBackend;
delete rendererBackend;
widgetBackend = 0;
windowBackend = 0;
rendererBackend = 0;
currentControl = 0;
currentBackend = 0;
service = 0;
}
void QVideoWidgetPrivate::_q_brightnessChanged(int b)
{
if (b != brightness)
emit q_func()->brightnessChanged(brightness = b);
}
void QVideoWidgetPrivate::_q_contrastChanged(int c)
{
if (c != contrast)
emit q_func()->contrastChanged(contrast = c);
}
void QVideoWidgetPrivate::_q_hueChanged(int h)
{
if (h != hue)
emit q_func()->hueChanged(hue = h);
}
void QVideoWidgetPrivate::_q_saturationChanged(int s)
{
if (s != saturation)
emit q_func()->saturationChanged(saturation = s);
}
void QVideoWidgetPrivate::_q_fullScreenChanged(bool fullScreen)
{
if (!fullScreen && q_func()->isFullScreen())
q_func()->showNormal();
}
void QVideoWidgetPrivate::_q_dimensionsChanged()
{
q_func()->updateGeometry();
q_func()->update();
}
/*!
\class QVideoWidget
\brief The QVideoWidget class provides a widget which presents video
produced by a media object.
\ingroup multimedia
\inmodule QtMultimediaWidgets
Attaching a QVideoWidget to a QMediaObject allows it to display the
video or image output of that media object. A QVideoWidget is attached
to media object by passing a pointer to the QMediaObject in its
constructor, and detached by destroying the QVideoWidget.
\snippet multimedia-snippets/video.cpp Video widget
\b {Note}: Only a single display output can be attached to a media
object at one time.
\sa QMediaObject, QMediaPlayer, QGraphicsVideoItem
*/
/*!
Constructs a new video widget.
The \a parent is passed to QWidget.
*/
QVideoWidget::QVideoWidget(QWidget *parent)
: QWidget(parent, 0)
, d_ptr(new QVideoWidgetPrivate)
{
d_ptr->q_ptr = this;
}
/*!
\internal
*/
QVideoWidget::QVideoWidget(QVideoWidgetPrivate &dd, QWidget *parent)
: QWidget(parent, 0)
, d_ptr(&dd)
{
d_ptr->q_ptr = this;
QPalette palette = QWidget::palette();
palette.setColor(QPalette::Background, Qt::black);
setPalette(palette);
}
/*!
Destroys a video widget.
*/
QVideoWidget::~QVideoWidget()
{
d_ptr->clearService();
delete d_ptr;
}
/*!
\property QVideoWidget::mediaObject
\brief the media object which provides the video displayed by a widget.
*/
QMediaObject *QVideoWidget::mediaObject() const
{
return d_func()->mediaObject;
}
/*!
\internal
*/
bool QVideoWidget::setMediaObject(QMediaObject *object)
{
Q_D(QVideoWidget);
if (object == d->mediaObject)
return true;
d->clearService();
d->mediaObject = object;
if (d->mediaObject)
d->service = d->mediaObject->service();
if (d->service) {
if (d->createWidgetBackend()) {
// Nothing to do here.
} else if ((!window() || !window()->testAttribute(Qt::WA_DontShowOnScreen))
&& d->createWindowBackend()) {
if (isVisible())
d->windowBackend->showEvent();
} else if (d->createRendererBackend()) {
if (isVisible())
d->rendererBackend->showEvent();
} else {
d->service = 0;
d->mediaObject = 0;
return false;
}
connect(d->service, SIGNAL(destroyed()), SLOT(_q_serviceDestroyed()));
} else {
d->mediaObject = 0;
return false;
}
return true;
}
/*!
\property QVideoWidget::aspectRatioMode
\brief how video is scaled with respect to its aspect ratio.
*/
Qt::AspectRatioMode QVideoWidget::aspectRatioMode() const
{
return d_func()->aspectRatioMode;
}
void QVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
{
Q_D(QVideoWidget);
if (d->currentControl) {
d->currentControl->setAspectRatioMode(mode);
d->aspectRatioMode = d->currentControl->aspectRatioMode();
} else {
d->aspectRatioMode = mode;
}
}
/*!
\property QVideoWidget::fullScreen
\brief whether video display is confined to a window or is fullScreen.
*/
void QVideoWidget::setFullScreen(bool fullScreen)
{
Q_D(QVideoWidget);
Qt::WindowFlags flags = windowFlags();
if (fullScreen) {
d->nonFullScreenFlags = flags & (Qt::Window | Qt::SubWindow);
flags |= Qt::Window;
flags &= ~Qt::SubWindow;
setWindowFlags(flags);
showFullScreen();
} else {
flags &= ~(Qt::Window | Qt::SubWindow); //clear the flags...
flags |= d->nonFullScreenFlags; //then we reset the flags (window and subwindow)
setWindowFlags(flags);
showNormal();
}
}
/*!
\fn QVideoWidget::fullScreenChanged(bool fullScreen)
Signals that the \a fullScreen mode of a video widget has changed.
\sa isFullScreen()
*/
/*!
\property QVideoWidget::brightness
\brief an adjustment to the brightness of displayed video.
Valid brightness values range between -100 and 100, the default is 0.
*/
int QVideoWidget::brightness() const
{
return d_func()->brightness;
}
void QVideoWidget::setBrightness(int brightness)
{
Q_D(QVideoWidget);
int boundedBrightness = qBound(-100, brightness, 100);
if (d->currentControl)
d->currentControl->setBrightness(boundedBrightness);
else if (d->brightness != boundedBrightness)
emit brightnessChanged(d->brightness = boundedBrightness);
}
/*!
\fn QVideoWidget::brightnessChanged(int brightness)
Signals that a video widgets's \a brightness adjustment has changed.
\sa brightness()
*/
/*!
\property QVideoWidget::contrast
\brief an adjustment to the contrast of displayed video.
Valid contrast values range between -100 and 100, the default is 0.
*/
int QVideoWidget::contrast() const
{
return d_func()->contrast;
}
void QVideoWidget::setContrast(int contrast)
{
Q_D(QVideoWidget);
int boundedContrast = qBound(-100, contrast, 100);
if (d->currentControl)
d->currentControl->setContrast(boundedContrast);
else if (d->contrast != boundedContrast)
emit contrastChanged(d->contrast = boundedContrast);
}
/*!
\fn QVideoWidget::contrastChanged(int contrast)
Signals that a video widgets's \a contrast adjustment has changed.
\sa contrast()
*/
/*!
\property QVideoWidget::hue
\brief an adjustment to the hue of displayed video.
Valid hue values range between -100 and 100, the default is 0.
*/
int QVideoWidget::hue() const
{
return d_func()->hue;
}
void QVideoWidget::setHue(int hue)
{
Q_D(QVideoWidget);
int boundedHue = qBound(-100, hue, 100);
if (d->currentControl)
d->currentControl->setHue(boundedHue);
else if (d->hue != boundedHue)
emit hueChanged(d->hue = boundedHue);
}
/*!
\fn QVideoWidget::hueChanged(int hue)
Signals that a video widgets's \a hue has changed.
\sa hue()
*/
/*!
\property QVideoWidget::saturation
\brief an adjustment to the saturation of displayed video.
Valid saturation values range between -100 and 100, the default is 0.
*/
int QVideoWidget::saturation() const
{
return d_func()->saturation;
}
void QVideoWidget::setSaturation(int saturation)
{
Q_D(QVideoWidget);
int boundedSaturation = qBound(-100, saturation, 100);
if (d->currentControl)
d->currentControl->setSaturation(boundedSaturation);
else if (d->saturation != boundedSaturation)
emit saturationChanged(d->saturation = boundedSaturation);
}
/*!
\fn QVideoWidget::saturationChanged(int saturation)
Signals that a video widgets's \a saturation has changed.
\sa saturation()
*/
/*!
Returns the size hint for the current back end,
if there is one, or else the size hint from QWidget.
*/
QSize QVideoWidget::sizeHint() const
{
Q_D(const QVideoWidget);
if (d->currentBackend)
return d->currentBackend->sizeHint();
else
return QWidget::sizeHint();
}
/*!
\reimp
Current event \a event.
Returns the value of the baseclass QWidget::event(QEvent *event) function.
*/
bool QVideoWidget::event(QEvent *event)
{
Q_D(QVideoWidget);
if (event->type() == QEvent::WindowStateChange) {
if (windowState() & Qt::WindowFullScreen) {
if (d->currentControl)
d->currentControl->setFullScreen(true);
if (!d->wasFullScreen)
emit fullScreenChanged(d->wasFullScreen = true);
} else {
if (d->currentControl)
d->currentControl->setFullScreen(false);
if (d->wasFullScreen)
emit fullScreenChanged(d->wasFullScreen = false);
}
}
return QWidget::event(event);
}
/*!
\reimp
Handles the show \a event.
*/
void QVideoWidget::showEvent(QShowEvent *event)
{
Q_D(QVideoWidget);
QWidget::showEvent(event);
// The window backend won't work for re-directed windows so use the renderer backend instead.
if (d->windowBackend && window()->testAttribute(Qt::WA_DontShowOnScreen)) {
d->windowBackend->releaseControl();
delete d->windowBackend;
d->windowBackend = 0;
d->createRendererBackend();
}
if (d->currentBackend)
d->currentBackend->showEvent();
}
/*!
\reimp
Handles the hide \a event.
*/
void QVideoWidget::hideEvent(QHideEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend)
d->currentBackend->hideEvent(event);
QWidget::hideEvent(event);
}
/*!
\reimp
Handles the resize \a event.
*/
void QVideoWidget::resizeEvent(QResizeEvent *event)
{
Q_D(QVideoWidget);
QWidget::resizeEvent(event);
if (d->currentBackend)
d->currentBackend->resizeEvent(event);
}
/*!
\reimp
Handles the move \a event.
*/
void QVideoWidget::moveEvent(QMoveEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend)
d->currentBackend->moveEvent(event);
}
/*!
\reimp
Handles the paint \a event.
*/
void QVideoWidget::paintEvent(QPaintEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend) {
d->currentBackend->paintEvent(event);
} else if (testAttribute(Qt::WA_OpaquePaintEvent)) {
QPainter painter(this);
painter.fillRect(event->rect(), palette().window());
}
}
#if defined(Q_WS_WIN)
/*!
\internal
*/
bool QVideoWidget::winEvent(MSG *message, long *result)
{
return d_func()->windowBackend && d_func()->windowBackend->winEvent(message, result)
? true
: QWidget::winEvent(message, result);
}
#endif
#include "moc_qvideowidget.cpp"
#include "moc_qvideowidget_p.cpp"
QT_END_NAMESPACE
|
88d2f98d5bf175babea303ed87e3dc1c8cc2b392 | 8cb7d04277f805fd9c5a00786a1780133b06d604 | /Main_neu.ino.ino | 6b3450234b17495591a363da97f8f4ad9225f28b | [] | no_license | fabeck/Biometo | 4a854cc8f10b07a67a99a9fc88249f4af3c3a128 | a598f0997d855de9a8cf2b8d369c5ffa12d6ed26 | refs/heads/main | 2020-12-02T22:53:26.897728 | 2017-07-04T09:07:06 | 2017-07-04T09:07:06 | 96,197,847 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,561 | ino | Main_neu.ino.ino | #include <Wire.h>
#include <MySignals.h>
#include <sounddata.h>
#include <Adafruit_ILI9341.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <gfxfont.h>
#include <EEPROM.h>
#include <SD.h>
// Display
#define TFT_CS 10
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
//Variables
int Iteration = 0;
int check = 0;
//Senor Variables
//SP02
int valuePulse
uint8_t pulsoximeter_state = 0
int valueSPO2
//declares File
File myFile;
void setup() {
// put your setup code here, to run once:
// Reads Iteration and increases by 1
/* Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
*/
Iteration = EEPROM.read(0);
Iteration = Iteration + 1;
EEPROM.write(0, Iteration);
//Show Iteration on Display
tft.begin();
tft.setCursor(0, 0);
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.print(String("Iteration = ") + String(Iteration));
delay(50);
//Print display
tft.setCursor(0, 20);
tft.setTextColor(ILI9341_WHITE);
tft.print("SD-Card");
tft.setCursor(150, 20);
tft.setTextColor(ILI9341_GREEN);
tft.print("ok");
tft.setCursor(0, 40);
tft.setTextColor(ILI9341_WHITE);
tft.print("Data access:");
tft.setCursor(150, 40);
tft.setTextColor(ILI9341_GREEN);
tft.print("OK");
//initialize Sensors
MySignals.begin();
MySignals.initSensorUART();
MySignals.enableSensorUART(PULSIOXIMETER);
//Checks SD-Card
/*
tft.setCursor(0,20);
check = SD.begin(4);
if (check == 1){
tft.setTextColor(ILI9341_GREEN);
tft.print("SD-Card ok");
} else
{
tft.setTextColor(ILI9341_RED);
tft.print("SD-Card not ok");
return;
}
delay(50);
*/
//Checks File
SD.begin(4);
myFile = SD.open("meas.txt", FILE_WRITE);
if (myFile) {
myFile.println(String("Measurement Nr. ") + String(Iteration));
myFile.close(); // close the file
}
// if the file didn't open, print an error:
else {
tft.setCursor(150, 40);
tft.setTextColor(ILI9341_RED);
tft.println("failure");
}
}
void loop() {
// put your main code here, to run repeatedly:
myFile = SD.open("meas.txt", FILE_WRITE);
myFile.println("I am an arbitrary string written in the Loop");
myFile.println("I hope i am in the second row");
myFile.println("I hope i am in the third row");
myFile.println("");
myFile.println("I hope i am in the fifth row");
myFile.println("");
myFile.println("");
myFile.close();
}
|
1b1ebbb2b0fd37acd35f2a8797b9b5d99e1bbd3f | 2a85936a3ebe4ed0845c8fa4defd26674fe95c0a | /RadarRpcServer.cpp | 4af51fe6b8fd5e4e7abba1a8324535c60bdda3b9 | [] | no_license | erikarn/USRP-Radar-Relay | aaffe79f3ba17ab3b7530deeac5b179b4d46e61e | e7632d4102c9d407cbc8f0f4db42ee05a8ef7405 | refs/heads/master | 2021-01-18T17:19:58.156415 | 2012-06-23T21:30:41 | 2012-06-23T21:30:41 | 4,767,679 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,778 | cpp | RadarRpcServer.cpp | /*
* Copyright (c) 2012 Neratec Solutions AG
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <unistd.h>
#include <syslog.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <arpa/inet.h>
#include <string.h>
#include <fcntl.h>
#include "Debug.hpp"
#include "RadarRpcServer.hpp"
// read request on client_socket terminated by '\0'
bool RadarServer::sock_getcmd(void)
{
char c;
transmit_buffer.clear();
do {
if (read(sock_client, &c, 1) <= 0)
return false;
transmit_buffer.push_back(c);
} while (c);
return (transmit_buffer.length() > 0);
}
// prepare listener and start listening
bool RadarServer::start_listening(void)
{
struct sockaddr_in serv_addr;
int reuse_addr = 1;
sock_listen = socket(AF_INET, SOCK_STREAM, 0);
if (sock_listen < 0) {
DERR << "socket error" << std::endl;
return false;
}
// enable re-bind without time_wait problems
setsockopt(sock_listen, SOL_SOCKET, SO_REUSEADDR, &reuse_addr,
sizeof(reuse_addr));
memset((char *) &serv_addr, 0, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(port_listen);
int result = bind(sock_listen, (struct sockaddr *) &serv_addr,
sizeof(serv_addr));
if (result < 0) {
DERR << "unable to bind to port " << port_listen << std::endl;
finalize_server();
return false;
}
if (listen(sock_listen, 5) < 0) {
DERR << "unable to listen" << std::endl;
finalize_server();
return false;
}
return true;
}
RadarServer::RadarServer(unsigned short port)
{
sock_listen = -1;
port_listen = port;
}
RadarServer::~RadarServer(void)
{
finalize_server();
}
void RadarServer::finalize_server(void)
{
close(sock_listen);
sock_listen = -1;
}
void RadarServer::finalize_client(void)
{
shutdown(sock_client, SHUT_RDWR);
close(sock_client);
sock_client = -1;
}
bool RadarServer::accept_client(void)
{
fd_set myset;
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 0;
FD_ZERO(&myset);
FD_SET(sock_listen, &myset);
if (select(sock_listen + 1, &myset, 0, 0, &tv) < 1)
return false;
sock_client = accept(sock_listen, 0, 0);
if (sock_client < 0) {
finalize_server();
return false;
}
return true;
}
std::string& RadarServer::get_request(void)
{
transmit_buffer.clear();
if (sock_client > 0)
finalize_client();
if ((sock_listen < 0) && !start_listening()) {
DERR << "listener socket invalid, "
<< "restarting in some seconds..." << std::endl;
sleep(5);
} else if (accept_client()) {
if (sock_getcmd())
shutdown(sock_client, SHUT_RD);
else
finalize_client();
}
return transmit_buffer;
}
bool RadarServer::send_data(std::string& data)
{
int sent = 0;
int size = data.size() + 1;
while (sent < size) {
int wrote = write(sock_client, data.data() + sent, size - sent);
if (wrote < 0)
return false;
sent += wrote;
}
return true;
}
bool RadarServer::send_response(std::string& response)
{
if (!send_data(response)) {
finalize_client();
return false;
}
return true;
}
|
ba31dfeb9ab745dcb158a36818c2be1635e7e3bc | 3ef9dbe0dd6b8161b75950f682ec2fc24f79a90e | /CSES_challenge/Sorting_and_Searching/maximum_subarray_sum.cpp | b19e0db6ba544c12afa90341d41503579b893500 | [
"MIT"
] | permissive | JackBai0914/Competitive-Programming-Codebase | abc0cb911e5f6b32d1bd14416f9eb398b7c65bb9 | a1cabf0fa5072b07a7da25d66bf455eb45b0b7e9 | refs/heads/main | 2023-03-29T14:17:36.190798 | 2021-04-14T23:15:12 | 2021-04-14T23:15:12 | 358,065,977 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 608 | cpp | maximum_subarray_sum.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <set>
#define F first
#define S second
#define MP make_pair
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
ll n, a[10000010], ans = 0, fans = -1e18;
int main() {
std::ios::sync_with_stdio(false);
cin >> n;
for (int i = 1; i <= n; i ++) {
cin >> a[i];
ans = max(0ll, ans) + a[i];
fans = max (fans, ans);
}
cout << fans << endl;
return 0;
}
|
d697c05144fc2d3ac116e77c93351b8e23609fe8 | 3cbd8534190bdb7eb3f6994a4ada1d26c40da016 | /mmg.hh | 659d96ea57bd9cffd3421ee30c9db98e2e85527a | [] | no_license | cympfh/classed-MMG | 36dbedd4ea6985851deee80be5a5a058c1d7fc12 | b8aa1426c7d6565c87a08677414a42c4c8192457 | refs/heads/master | 2021-01-10T20:43:20.524292 | 2015-11-03T15:16:36 | 2015-11-03T15:16:36 | 37,809,883 | 0 | 0 | null | 2015-09-14T14:24:58 | 2015-06-21T13:29:21 | C++ | UTF-8 | C++ | false | false | 427 | hh | mmg.hh | struct PUnit;
struct Alphabet;
using Pattern = vector<PUnit>;
using Text = vector<Alphabet>;
// initial with `init`
vector<Text> docs;
int alphabet_size = -1;
map<string, int> class_size;
set<Alphabet> vocabulary;
bool preceq(const Text&, const Pattern&, bool=false);
void init(vector<Text>&_docs, bool=false);
vector<Pattern> kmmg();
using State = long long unsigned int;
int language_size(const Pattern&, int uplen=30);
|
fcfa945716a6a14e06c35a27041e9f7e6d24e93c | 40425604bbd709a80e273e02d62b5925d493fdc0 | /servidor/clases/cabeceras/ManejadorArchivos.h | 1c1220992502c507b5e17c7c09a7ceed6abe7d1f | [] | no_license | mafvidal/UdriveTPTaller2 | b93daa9a44b37048f953f640805b7c67e98d59c6 | 1a1bc28fb7bc2e2e58d36263d99d41fc1ea73f27 | HEAD | 2016-09-06T16:43:35.822346 | 2015-11-24T02:41:00 | 2015-11-24T02:41:00 | 42,020,376 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,099 | h | ManejadorArchivos.h | /*
* ManejadorArchivos.h
*
* Created on: 5 de nov. de 2015
* Author: mafv
*/
#ifndef MANEJADORARCHIVOS_H_
#define MANEJADORARCHIVOS_H_
#include "Archivo.h"
#include "json/json.h"
#include "Respuesta.h"
#include "ManejadorArchivosFisicos.h"
#include "Log.h"
/*
* Clase encargada de administrar los archivos
* segun lo enviado por el servidor
*/
class ManejadorArchivos {
private:
Log *log;
public:
ManejadorArchivos();
/**
* Metodo que permite crear un archivo logico
* @param nombreUsuario nombre del usuario que crea el archivo.
* @param datosDelArchivo datos del archivo a crear.
*/
string crearArchivo(const string &nombreUsuario,const string &datosDelArchivo);
/**
* Metodo que permite eliminar un archivo logico
* @param nombreUsuario nombre del usuario que eliminar el archivo.
* @param datosDelArchivo datos del archivo a eliminar.
*/
string eliminarArchivo(const string &nombreUsuario,const string &datosDelArchivo);
/**
* Permite compartir un archivo con una serie de usuarios
* @param datosDelArchivo posee los datos del archivo a compartir y la lista de usuarios.
*/
string compartirArchivo(const string &datosDelArchivo);
/**
* Metodo que permite actualizar un archivo logico
* @param nombreUsuario nombre del usuario que actualiza el archivo.
* @param datosDelArchivo datos del archivo a actualizar.
*/
string actualizarArchivo(const string &nombreUsuario,const string &datosDelArchivo);
/**
* Metodo que permite restaurar un archivo a una version anterior
* @param nombreUsuario nombre del usuario que restaura el archivo.
* @param datosDelArchivo datos del archivo a rastaurar.
*/
string restaurarArchivo(const string &nombreUsuario,const string &datosDelArchivo);
/**
* Metodo que permite recuperar un archivo de la papelera
* @param nombreUsuario nombre del usuario que recupera el archivo de la papelera.
* @param datosDelArchivo datos del archivo a recuperar del papelera.
*/
string recuperarArchivo(const string &nombreUsuario,const string &datosDelArchivo);
virtual ~ManejadorArchivos();
};
#endif /* MANEJADORARCHIVOS_H_ */
|
13efc5e5d9ab491bb14c8984534e330adb86427f | bbadd348ce2bf28ab0aa14603dfda2244f798257 | /GroupAssignment01/primalityChecker.cpp | f6cd7c1043b6e80c9aaf1fbff3ef9f69f5f8140b | [] | no_license | AliHaidry/GroupAssignment01 | 287a2741c7b3af092139563a0a09b192c87aae7b | 73eabea93d16f75c52593d623d54e25aadc1b3f4 | refs/heads/master | 2023-02-26T12:40:16.083701 | 2021-02-01T17:27:15 | 2021-02-01T17:27:15 | 333,540,523 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,168 | cpp | primalityChecker.cpp | #include <iostream>
#include <cstring>
#include <cstdlib>
#include "primalityChecker.h"
ll PrimalityValidator::modulo(ll base, ll exponent, ll mod)
{
ll x = 1;
ll y = base;
while (exponent > 0)
{
if (exponent % 2 == 1)
{
x = (x * y) % mod;
}
y = (y * y) % mod;
exponent = exponent / 2;
}
return x % mod;
}
/*
*The Fermat primality test is a primality test, giving a way to test if a number is a prime number,
*Fermat's test for checking primality
*/
/*
* If a given number is prime, then this method always returns true.
* If given number is composite (or non-prime), then it may return true or false,
* but the probability of producing incorrect result for composite is low and can be reduced by doing more
* iterations.
*/
bool PrimalityValidator::Fermat(ll prime, int iterations)
{
if (prime == 1)
{
return false;
}
for (int counter = 0; counter < iterations; counter++)
{
ll a = rand() % (prime - 1) + 1;
if (modulo(a, prime - 1, prime) != 1)
{
return false; // indicates not prime number
}
}
return true; // indicates is prime number
} |
c020c8c5bf234f10d4ae5413c7901c5c6ab5de00 | de5409656af4c6c5d172d8a07725039ef71dc1a4 | /Surpport.h | de7a58a7d9243908cb167b934385636523a683d9 | [] | no_license | ShinDongHyeop/NGP_TermProject_Server | 42bf7dbc49cbe1f16e3bf5641623b5be943d4486 | c29d3e52e76c785b96a516e5e024ec30659c3830 | refs/heads/master | 2021-08-29T22:19:49.965122 | 2017-12-15T05:37:05 | 2017-12-15T05:37:05 | 111,879,420 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 1,384 | h | Surpport.h | #pragma comment(lib, "ws2_32")
#include <WinSock2.h>
#include <iostream>
#include <vector>
#include <list>
#include <time.h>
#include <math.h>
#include <algorithm>
using namespace std;
#define SERVERPORT 5000
#define MAX_PLAYER 10
#define MAX_BULLET 100
#define PB_SIZE (sizeof(PlayerBuf) * MAX_PLAYER)
#define PLAYER_HP 100
#define PLAYER_SIZE 10
#define PLAYER_SPEED 20.0f
#define BULLET_RANGE 300
#define BULLET_SPEED 100.0f
#define BULLET_SIZE 3.0f
#define MAX_ITEM 5
#define ITEM_SIZE 8
#define ITEM_RESPAWN_TIME 5000
#define RECOVERY 20
#define KPH_TO_MPS (1000.0f / 3600.0f)
#define METTER_TO_PIXEL 40.0f
#define ROOM_OWNER 0
#define MAX_KILL 10
#define NULL_PLAYER 999
// 상태 변수
enum CollBox { LEFT, RIGHT, BOTTOM, TOP };
enum ShootState { NO_SHOOT, SHOOT };
enum GameState { LOGIN, RUNNING, END };
enum PlayerState { NONE, WAIT, READY, START, PLAY, DIE };
enum StartOK { ON, OFF, STARTOK };
enum ItemState { ITEM_EXIST, ITEM_NONE };
// 충돌체크 함수
template<class ObjectA, class ObjectB>
bool collision(ObjectA a, ObjectB b) {
float* collA = (*a)->getCollBox();
float* collB = (*b)->getCollBox();
if (collA[LEFT] > collB[RIGHT]) return false;
if (collA[RIGHT] < collB[LEFT]) return false;
if (collA[BOTTOM] > collB[TOP]) return false;
if (collA[TOP] < collB[BOTTOM]) return false;
return true;
}
// 송수신 서포트
|
bb2364c801c4b215c5796d9d0bf012ac3e15d8f3 | 3ddf4ecbc2033234e1f91a94981d82f29c838143 | /graph/single-source-shortest-paths.h | 8646b9d33ba27cc200c85547766e854e05461e27 | [] | no_license | fons/graph-repl | c4a2c3567944e3cdb8c77f9cd1061e6e10859b86 | 9a14a67c9c7219c7101c4d7c9af3b1ebb585ebba | refs/heads/master | 2016-09-05T15:14:45.209989 | 2012-12-01T18:28:47 | 2012-12-01T18:28:47 | 6,678,146 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 16,357 | h | single-source-shortest-paths.h | //
// single-source-shortest-paths.h
// graph-repl
//
// Created by alfons haffmans on 10/8/12.
// Copyright (c) 2012 mohegan skunk works. All rights reserved.
//
#ifndef graph_repl_single_source_shortest_paths_h
#define graph_repl_single_source_shortest_paths_h
template <typename edge_t, typename traits=edge_trait_t<edge_t>>
struct shortest_path_dijkstra_dense {
explicit shortest_path_dijkstra_dense (graph_base<edge_t, traits>& G, const typename traits::label_value_type& v) {
init(G,v);
}
std::ostream& pp(std::ostream& strm) {
for (auto& val : mst) {
strm << val << std::endl;
}
return strm;
}
graph_base<edge_t>& operator()(graph_base<edge_t>& T) {
for (auto& e : mst) {
T.insert(e);
}
return T;
}
std::vector<edge_t> operator()() {
return mst;
}
bool negative_cycle() const {
throw("has_negative_cycle not implemented");
}
private:
typedef typename std::unordered_map<typename traits::label_value_type, edge_t> edge_cont_t;
typedef typename std::unordered_map<typename traits::label_value_type, double> value_cont_t;
typedef typename traits::label_value_type label_t;
std::vector<edge_t> mst;
struct state {
state() {}
bool mst(const label_t& l, const edge_t& e) {
if (traits::weight(e) == 0) return false;
return push(mst_c, l, e);
}
std::pair<bool, edge_t> mst (label_t l) {
auto v = peek(mst_c, l);
if (traits::weight(v.second) == 0) return std::make_pair(false, edge_t(0,0,0));
return v;
}
bool fringe(const label_t& l, const edge_t& e) {
return push(fr, l, e);
}
std::pair<bool,edge_t> fringe(const label_t& l) {
auto v = peek(fr, l);
if (traits::weight(v.second) == 0) return std::make_pair(false, edge_t(0,0,0));
return v;
}
bool weight (const label_t& l, double w) {
return push(wt, l, w);
}
std::pair<bool, double> weight (const label_t&l ) {
auto v = peek(wt, l);
if (v.second == 0) return std::make_pair(false, 0);
return v;
}
bool fringe_to_mst (const label_t& l) {
auto v = fringe(l);
if (! v.first) return false;
fr.erase(l);
return mst(l, v.second);
}
bool flush_fringe_to_mst()
{
for (auto& el : fr) {
mst(el.first, el.second);
}
}
std::vector<edge_t>& mst(graph_base<edge_t>&G, std::vector<edge_t>& v_mst) {
typename graph_base<edge_t>::vertex_generator vg(G);
while (!vg.iter_done()) {
auto v = vg.yield();
//strm << v << ":";
auto e = mst_c[v];
//strm << e << std::endl;
if (traits::weight(e) == 0) continue;
v_mst.push_back(e);
}
return v_mst;
}
//private :
template<typename C, typename T>
bool push (C& c, const label_t& w, const T& e)
{
c[w] = e;
return true;
}
template <typename C>
std::pair<bool, typename C::mapped_type> peek(C& c, const label_t& l) {
auto it = c.find(l);
if (it != c.end()) {
return std::make_pair(true, it->second);
}
return std::make_pair(false, typename C::mapped_type());
}
edge_cont_t mst_c;
edge_cont_t fr;
value_cont_t wt;
};
template <typename T>
bool valid(const std::pair<bool, T>& v) {
return v.first;
}
template <typename T>
T value(const std::pair<bool, T>& v) {
return v.second;
}
void init(graph_base<edge_t, traits>& G, const typename traits::label_value_type& start)
{
state S;
typename traits::label_value_type v;
typename traits::label_value_type min;
for (v = start; min !=start; v = min ) {
std::cerr << "start processing : v = " << v << std::endl;
min = start;
typename graph_base<edge_t>::vertex_generator wg(G);
while (! wg.iter_done()) {
auto w = wg.yield();
if (w == start) continue;
if (!valid(S.mst(w))) {
edge_t e = G.edge(v,w);
if (traits::weight(e) == 0) continue;
std::cerr << "w : " << w << " processing " << e << std::endl;
if (traits::weight(e) != 0) {
auto vwt = S.weight(v);
double P = traits::weight(e);
if (valid(vwt) ) {
P += value(vwt);
}
auto wtw = S.weight(w);
if (!valid(wtw) || P < value(wtw)) {
std::cerr << "\t\tadding to fringe : " << e << std::endl;
S.fringe(w, e);
S.weight(w, P);
}
}
if (min == start) {
std::cerr << "\t\tassigning to min " << w << std::endl;
min = w;
}
auto wtmin = S.weight(min);
auto wtw = S.weight(w);
if (valid(wtw) && valid(wtmin) && (value(wtw) < value(wtmin))) {
std::cerr << "\t\tsecond assigning to min " << w << std::endl;
min = w;
}
}
}//end of inner loop
if (min != start) {
std::cerr << "move to mst : " << min << std::endl;
S.fringe_to_mst(min);
}
}// end of outer loop
S.flush_fringe_to_mst();
// for (auto& val : S.fr) {
// std::cerr << "fringe :" << val << std::endl;
// }
mst = S.mst(G,mst);
}// end of init
};
template <typename edge_t, typename traits=edge_trait_t<edge_t>>
struct shortest_path_dijkstra_pq {
private :
typedef graph_base<edge_t, edge_trait_t<edge_t>> graph_t;
typedef typename traits::label_value_type label_t;
typedef typename std::unordered_map<label_t, edge_t> edge_cont_t;
typedef typename std::unordered_map<label_t, label_t> label_cont_t;
typedef typename std::unordered_map<label_t, double> value_cont_t;
public :
explicit shortest_path_dijkstra_pq (graph_t& G, const label_t& v) : start(v), G(G) {
init(G,v);
}
std::ostream& pp(std::ostream& strm) const {
for (auto& v : dist_c) {
strm << v << std::endl;
}
for (auto& v : pred_c) {
auto w = G.edge(v.second, v.first);
if (traits::weight(w) != 0){
strm << "from "<< v.second << " to " << v.first << " edge :";
strm << " " << w << std::endl;
}
}
for (auto& val : dist_c) {
strm << start << " -> " << val.first << " : " << val.second << std::endl;
}
return strm;
}
typename std::pair<typename traits::weight_value_type, bool> dist(const label_t& v)
{
auto it = dist_c.find(v);
if (it == dist_c.end()) return std::make_pair(typename traits::weight_value_type(), false);
return std::make_pair(it->second, true);
}
std::pair<label_t,bool> pred(const label_t& v)
{
auto it = pred_c.find(v);
if (it == pred_c.end()) return std::make_pair(label_t(), false);
return std::make_pair(it->second, true);
}
bool negative_cycle() const {
throw("has_negative_cycle not implemented");
}
private:
const label_t& start;
graph_base<edge_t, traits>& G;
value_cont_t dist_c;
edge_cont_t mst;
label_cont_t pred_c;
void init(graph_t& G, const label_t& start)
{
priority_queue_stl<label_t, double> PQ;
typename graph_base<edge_t>::vertex_generator wg(G);
while (! wg.iter_done()) {
auto v = wg.yield();
dist_c[v] = std::numeric_limits<double>::max();
PQ.insert(v, dist_c[v]);
pred_c[v] = v;
}
dist_c[start] = 0;
PQ.update(start, dist_c[start]);
while (! PQ.empty()) {
auto min = PQ.getmin();
label_t u = min.first;
typename graph_base<edge_t>::adjacency_edge_generator vg(G, u);
while (! vg.iter_done()){
auto e = vg.yield();
auto v = traits::to(e);
auto w = traits::weight(e);
auto newlen = dist_c[u] + w;
if (newlen < dist_c[v]) {
PQ.update(v, newlen);
dist_c[v] = newlen;
mst[v] = e;
pred_c[v] = u;
}
}
}
}
};
template <typename edge_t, typename traits=edge_trait_t<edge_t>>
struct shortest_path_bellman_ford {
private :
typedef graph_base<edge_t, edge_trait_t<edge_t>> graph_t;
typedef typename traits::label_value_type label_t;
typedef typename std::unordered_map<label_t, edge_t> edge_cont_t;
typedef typename std::unordered_map<label_t, label_t> label_cont_t;
typedef typename traits::weight_value_type weight_t;
typedef typename std::unordered_map<label_t, weight_t> value_cont_t;
public :
explicit shortest_path_bellman_ford (graph_t& G, const label_t& v) : start(v), G(G) {
init(G,v);
}
shortest_path_bellman_ford(const shortest_path_bellman_ford&) = delete;
void operator=(shortest_path_bellman_ford&) = delete;
std::ostream& pp(std::ostream& strm) const {
for (auto& v : mdist ) {
strm << "node : " << v.first << " : distance " << v.second << std::endl;
}
stack<label_t> S;
for (auto& v : mpred) {
if (S.empty()) {
S.push(v.first);
}
if (v.first != S.top() ){
S.push(v.first);
}
if (v.second != S.top()){
S.push(v.second);
}
}
size_t count = 0;
while (! S.empty()) {
auto v = S.pop();
strm << v;
if (++count % 10 == 0) strm << std::endl;
if (! S.empty()) strm << " -> ";
}
strm << std::endl;
return strm;
}
typename std::pair<weight_t, bool> dist(const label_t& v)
{
auto it = mdist.find(v);
if (it == mdist.end()) return std::make_pair(typename traits::weight_value_type(), false);
return std::make_pair(it->second, true);
}
std::pair<label_t,bool> pred(const label_t& v)
{
auto it = mpred.find(v);
if (it == mpred.end()) return std::make_pair(label_t(), false);
return std::make_pair(it->second, true);
}
bool negative_cycle() const {
return has_negative_cycle;
}
private:
const label_t& start;
value_cont_t mdist;
edge_cont_t mst;
label_cont_t mpred;
bool has_negative_cycle = false;
graph_base<edge_t, traits>& G;
void init(graph_t& G, const label_t& s) {
typename graph_t::vertex_generator vg(G);
while (!vg.iter_done()) {
mdist[vg.yield()] = std::numeric_limits<double>::max();
}
mdist[s] = weight_t();
bool relaxing = true;
auto counter = G.V();
while (counter-- > 0 && relaxing) {
relaxing = false;
for (typename graph_t::iterator it = G.begin(); it != G.end(); it++) {
auto e = *it;
auto u = traits::from(e);
auto v = traits::to(e);
auto w = traits::weight(e);
if (mdist[u] == std::numeric_limits<double>::max()) continue;
auto newlen = mdist[u] + w;
if (newlen < mdist[v]) {
mdist[v] = newlen;
mpred[v] = u;
relaxing = true;
}
}
}
has_negative_cycle = relaxing;
}
};
//---------------------------------------------------------------------------------
template <typename edge_t, typename algo_t=shortest_path_dijkstra_pq<edge_t, edge_trait_t<edge_t>>, typename traits=edge_trait_t<edge_t>>
struct single_source_shortest_path
{
typedef typename traits::label_value_type label_t;
typedef typename traits::weight_value_type weight_t;
public :
single_source_shortest_path(graph_base<edge_t, traits>& G, const typename traits::label_value_type& s) : G(G), algo(G,s) {}
single_source_shortest_path(const single_source_shortest_path& obj) = delete;
single_source_shortest_path& operator=(const single_source_shortest_path& obj) = delete;
std::pair<weight_t, bool> dist(const label_t& v)
{
return algo.dist(v);
}
std::pair<label_t,bool> pred(const label_t& v)
{
return algo.pred(v);
}
graph_base<edge_t, traits>& operator()(graph_base<edge_t, traits>& T)
{
typename graph_base<edge_t>::vertex_generator wg(G);
while (! wg.iter_done()) {
auto to = wg.yield();
auto from = algo.pred(to);
if (!from.second) continue;
auto e = G.edge(from.first, to);
if (traits::weight(e) == 0) continue;
T.insert(e);
}
return T;
}
std::ostream& pp(std::ostream& strm) const {
return algo.pp(strm);
}
bool negative_cycle() const {
return algo.negative_cycle();
}
private :
graph_base<edge_t, traits>& G;
algo_t algo;
};
template<typename edge_t>
std::ostream operator<<(std::ostream& strm, const single_source_shortest_path<edge_t>& t) {
return t.pp(strm);
}
#endif
|
e1507b294e6a2a08c5357907ad4001cb2074362b | 28a3903ace2bee9d64428af0b2cea63ec1e7af11 | /include/Initial/Video/IShader.h | e0d3a8fd7be63aaaef65320a00db392488dd6711 | [] | no_license | thennequin/InitialProject | e90a551c8b38e9c458eabb8c9b1c9d3a5395e9a0 | 89ab9de41a1191da38ea002f7233f8de0a9cb0af | refs/heads/master | 2021-01-10T02:29:10.419919 | 2018-04-21T13:30:20 | 2018-04-21T13:30:20 | 43,328,862 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,342 | h | IShader.h | //---------------------------------------------
// Initial Engine
// Shader Module
//
// By Thibault HENNEQUIN
// December 20th 2008
//---------------------------------------------
#ifndef _ISHADER_HEADER_
#define _ISHADER_HEADER_
#include "Initial/Core/IString.h"
#include "Initial/Math/IMatrix.h"
#include "Initial/Ressource/ITexture.h"
#include "Initial/Video/IShaderManager.h"
namespace Initial
{
namespace Video
{
class IShaderManager;
class IShader
{
friend class IShaderManager;
public:
~IShader();
Core::IString GetFragmentCode();
Core::IString GetVertexCode();
void SetFragmentCode(Core::IString Code);
void SetVertexCode(Core::IString Code);
int GetProgram();
//Compile Shader
bool IsCompiled();
bool Compile();
Core::IString ReturnError();
void UseShader();
bool SetParameterInt(Core::IString Parameter, int value);
bool SetParameterFloat(Core::IString Parameter, float value);
bool SetParameter2Float(Core::IString Parameter, float value1, float value2);
bool SetParameter2Float(Core::IString Parameter, float value[2]);
bool SetParameter2Float(Core::IString Parameter, Core::IVector2D& value);
bool SetParameter3Float(Core::IString Parameter, float value1, float value2, float value3);
bool SetParameter3Float(Core::IString Parameter, float value[3]);
bool SetParameter3Float(Core::IString Parameter, Core::IVector3D& value);
bool SetParameter4Float(Core::IString Parameter, float value1, float value2, float value3, float value4);
bool SetParameter4Float(Core::IString Parameter, float value[4]);
bool SetParameterMatrix22(Core::IString Parameter, Math::IMatrix& mat);
bool SetParameterMatrix33(Core::IString Parameter, Math::IMatrix& mat);
bool SetParameterMatrix44(Core::IString Parameter, Math::IMatrix& mat);
protected:
IShader(IShaderManager *manager, Core::IString vertex, Core::IString fragment);
protected:
Core::IString m_sShaderName;
// Shader Code
Core::IString m_sFragmentCode;
Core::IString m_sVertexCode;
// Shader
int m_iFragmentShader;
int m_iVertexShader;
int m_iProgram;
bool m_bNeedCompile;
IShaderManager *m_pShaderManager;
};
}
}
#endif |
047ba31b43d165b9721b18304c9d69d2a815a3e7 | df6c3d7d95507bf452ce8eda24e779a82049fcad | /final-project/simulationNonInertial/20/phi | 440e61b6b2699945a91de5869ba3f4c5372ee385 | [] | no_license | aeronau/CFD-course | 5c555e7869f0170f90e9d3532b06f7e78683b770 | e891eb94950cfa0992d6ff003dbe45315af377c5 | refs/heads/master | 2021-09-01T04:18:32.111694 | 2017-12-24T18:18:44 | 2017-12-24T18:18:44 | 104,058,197 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 150,242 | phi | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "20";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
internalField nonuniform List<scalar>
11516
(
-1.81755e+10
-5.5647e+09
-4.33009e+09
-9.45335e+09
-4.96131e+09
-2.09395e+09
-1.57907e+10
-1.4081e+09
9.35955e+09
-9.59566e+09
-2.46664e+09
-2.05532e+09
-9.12718e+09
-2.03169e+08
1.23039e+09
-1.23788e+10
1.45935e+08
4.12662e+09
-1.42457e+10
2.9297e+08
2.26311e+09
-1.6475e+10
4.5141e+08
2.18013e+09
-1.80657e+10
1.51294e+08
1.62344e+09
-1.92305e+10
2.2079e+07
1.17943e+09
-1.99603e+10
-2.88721e+06
6.83973e+08
-2.03214e+10
-7.62543e+07
3.50854e+08
-2.04289e+10
-1.65857e+08
1.72116e+08
-2.03327e+10
-2.14331e+08
1.7041e+07
-2.01012e+10
-2.29895e+08
-9.82554e+07
-1.98246e+10
-2.48781e+08
-1.18863e+08
-1.95419e+10
-2.70684e+08
-9.17178e+07
-1.92723e+10
-2.74366e+08
-6.8101e+07
-1.8979e+10
-2.68638e+08
-8.08331e+07
-1.86648e+10
-2.6958e+08
-8.17625e+07
-1.83109e+10
-2.7997e+08
-8.84153e+07
-1.7925e+10
-2.88049e+08
-9.78417e+07
-1.75077e+10
-2.93877e+08
-1.10819e+08
-1.70645e+10
-3.01258e+08
-1.19828e+08
-1.65947e+10
-3.0815e+08
-1.28964e+08
-1.61031e+10
-3.13168e+08
-1.34237e+08
-1.55923e+10
-3.1551e+08
-1.38569e+08
-1.5069e+10
-3.14793e+08
-1.38001e+08
-1.45388e+10
-3.1012e+08
-1.34853e+08
-1.40108e+10
-3.006e+08
-1.26513e+08
-1.34954e+10
-2.85221e+08
-1.12783e+08
-1.30062e+10
-2.6336e+08
-9.22516e+07
-1.25615e+10
-2.3372e+08
-5.99432e+07
-1.21696e+10
-1.95871e+08
-2.97536e+07
-1.183e+10
-1.52744e+08
-7.39646e+06
-1.15536e+10
-1.08555e+08
2.27981e+07
-1.13442e+10
-6.34766e+07
5.16344e+07
-1.1205e+10
-1.66958e+07
7.94683e+07
-1.11348e+10
2.95854e+07
1.03626e+08
-1.11287e+10
7.22467e+07
1.2549e+08
-1.11748e+10
1.07967e+08
1.43365e+08
-1.12519e+10
1.34437e+08
1.5581e+08
-1.13291e+10
1.50558e+08
1.59429e+08
-1.13675e+10
1.5864e+08
1.49099e+08
-1.13298e+10
1.62534e+08
1.22141e+08
-1.11914e+10
1.65593e+08
7.83308e+07
-1.09433e+10
1.65595e+08
1.4073e+07
-1.05915e+10
1.74728e+08
-7.38247e+07
-1.01938e+10
1.8398e+08
-1.60636e+08
-1.01456e+10
2.72049e+08
4.78269e+07
-1.07496e+10
4.24656e+08
5.19828e+08
-1.03877e+10
5.67013e+08
-5.77516e+08
-2.89207e+09
1.31803e+09
-8.55725e+09
1.04121e+09
-7.34669e+09
-2.59262e+10
-5.43865e+09
-2.64096e+10
-3.95789e+09
-2.34858e+10
-3.85909e+09
-2.46771e+10
-8.24752e+08
-2.36069e+10
-8.70245e+08
-2.41038e+10
9.33476e+08
-2.42827e+10
6.57345e+08
-2.49846e+10
1.24966e+09
-2.57623e+10
9.55341e+08
-2.64648e+10
7.02383e+08
-2.68978e+10
3.80791e+08
-2.71745e+10
1.39458e+08
-2.73794e+10
-2.46104e+07
-2.74778e+10
-1.79447e+08
-2.74997e+10
-2.69641e+08
-2.75331e+10
-2.71756e+08
-2.75979e+10
-2.58211e+08
-2.76469e+10
-2.69412e+08
-2.76552e+10
-2.94615e+08
-2.76436e+10
-3.02402e+08
-2.76099e+10
-3.24098e+08
-2.7553e+10
-3.46091e+08
-2.74724e+10
-3.69024e+08
-2.73743e+10
-3.87717e+08
-2.72584e+10
-4.0674e+08
-2.7127e+10
-4.2113e+08
-2.69787e+10
-4.34072e+08
-2.6816e+10
-4.4148e+08
-2.6637e+10
-4.46538e+08
-2.64413e+10
-4.47167e+08
-2.62278e+10
-4.43009e+08
-2.59946e+10
-4.34514e+08
-2.57423e+10
-4.17781e+08
-2.54674e+10
-3.97321e+08
-2.51685e+10
-3.73523e+08
-2.48492e+10
-3.46671e+08
-2.45105e+10
-3.185e+08
-2.41567e+10
-2.85795e+08
-2.37888e+10
-2.52661e+08
-2.3411e+10
-2.19547e+08
-2.3026e+10
-1.88726e+08
-2.26321e+10
-1.65337e+08
-2.22199e+10
-1.5429e+08
-2.17714e+10
-1.6012e+08
-2.12559e+10
-1.91612e+08
-2.06385e+10
-2.55508e+08
-1.9896e+10
-3.50559e+08
-1.90117e+10
-4.74059e+08
-1.80419e+10
-5.52626e+08
-1.72811e+10
-2.76826e+08
-1.68307e+10
1.72528e+08
-1.57851e+10
-2.57744e+08
-4.33152e+09
-9.98319e+09
-7.61453e+09
-2.86878e+10
7.97724e+08
-1.37063e+09
-3.3267e+10
-2.60326e+09
4.83476e+09
-3.26775e+10
-1.61868e+09
1.01286e+10
-3.45622e+10
-1.70364e+09
1.33217e+09
-3.4649e+10
-6.94824e+08
1.86224e+09
-3.61675e+10
8.92347e+08
4.6315e+09
-3.72381e+10
6.88904e+08
2.54076e+09
-3.70211e+10
4.75601e+08
1.40254e+09
-3.69754e+10
2.78334e+08
1.22399e+09
-3.7164e+10
2.66689e+08
1.02758e+09
-3.74031e+10
2.04189e+08
6.42664e+08
-3.76949e+10
1.60864e+08
4.04867e+08
-3.79809e+10
1.26217e+08
2.51665e+08
-3.82462e+10
1.03767e+08
9.81949e+07
-3.85274e+10
8.68399e+07
1.08504e+07
-3.87938e+10
6.41472e+07
4.01833e+06
-3.89968e+10
3.77473e+07
-2.81139e+06
-3.91386e+10
1.63009e+07
-8.84829e+06
-3.92606e+10
-7.66263e+06
-7.53544e+06
-3.93554e+10
-2.55705e+07
-1.71485e+06
-3.94152e+10
-4.81351e+07
-6.35877e+06
-3.94431e+10
-7.17472e+07
-1.08392e+07
-3.94473e+10
-9.59342e+07
-1.28915e+07
-3.9427e+10
-1.20941e+08
-1.2678e+07
-3.93879e+10
-1.47066e+08
-6.2797e+06
-3.93301e+10
-1.73791e+08
4.34665e+06
-3.92602e+10
-2.00432e+08
2.23844e+07
-3.91796e+10
-2.2706e+08
4.63851e+07
-3.90939e+10
-2.53511e+08
7.84937e+07
-3.90047e+10
-2.8005e+08
1.17108e+08
-3.89142e+10
-3.06388e+08
1.63402e+08
-3.8824e+10
-3.32883e+08
2.17936e+08
-3.87395e+10
-3.59315e+08
2.88748e+08
-3.86633e+10
-3.81568e+08
3.55034e+08
-3.85886e+10
-3.98308e+08
4.00141e+08
-3.85371e+10
-4.17051e+08
4.73967e+08
-3.85282e+10
-4.3513e+08
5.64444e+08
-3.858e+10
-4.49905e+08
6.65837e+08
-3.87107e+10
-4.63392e+08
7.79345e+08
-3.89328e+10
-4.76954e+08
9.00456e+08
-3.9257e+10
-4.8999e+08
1.02791e+09
-3.96973e+10
-5.01025e+08
1.16266e+09
-4.02662e+10
-5.05802e+08
1.30098e+09
-4.09757e+10
-5.04076e+08
1.44138e+09
-4.18164e+10
-4.98239e+08
1.56629e+09
-4.27585e+10
-4.83108e+08
1.64964e+09
-4.37775e+10
-4.42199e+08
1.67001e+09
-4.47962e+10
-3.71055e+08
1.55207e+09
-4.55944e+10
-2.57291e+08
1.1543e+09
-4.51827e+10
-1.02519e+08
6.66375e+06
-4.19741e+10
4.08727e+08
-2.78854e+09
-3.67598e+10
1.94037e+09
-7.35054e+09
-3.76319e+10
3.76411e+09
-1.10518e+10
4.88261e+08
-3.02226e+09
-3.35605e+10
-1.84915e+09
-3.48431e+10
-5.45542e+09
-3.56577e+10
-4.8385e+09
-3.74034e+10
-9.31497e+08
-3.82406e+10
-8.61227e+08
-3.73419e+10
8.16842e+08
-3.66705e+10
5.88137e+08
-3.56037e+10
5.8902e+08
-3.50052e+10
5.73801e+08
-3.46895e+10
5.94745e+08
-3.45634e+10
4.01043e+08
-3.45578e+10
2.37588e+08
-3.46092e+10
9.57964e+07
-3.46716e+10
-7.21056e+07
-3.47282e+10
-1.84249e+08
-3.47697e+10
-2.22906e+08
-3.4787e+10
-2.55902e+08
-3.47971e+10
-2.90751e+08
-3.4825e+10
-3.13973e+08
-3.48457e+10
-3.37386e+08
-3.4871e+10
-3.66577e+08
-3.49055e+10
-3.9394e+08
-3.49539e+10
-4.19271e+08
-3.50182e+10
-4.40183e+08
-3.51072e+10
-4.5413e+08
-3.52227e+10
-4.62629e+08
-3.53712e+10
-4.6323e+08
-3.55537e+10
-4.57352e+08
-3.57757e+10
-4.4378e+08
-3.60388e+10
-4.24202e+08
-3.63455e+10
-3.97261e+08
-3.66979e+10
-3.64312e+08
-3.70977e+10
-3.22114e+08
-3.75475e+10
-2.70098e+08
-3.80501e+10
-2.07949e+08
-3.86133e+10
-1.38002e+08
-3.92449e+10
-5.97332e+07
-3.99537e+10
3.38665e+07
-4.07489e+10
1.36826e+08
-4.16394e+10
2.47756e+08
-4.26331e+10
3.6426e+08
-4.37381e+10
4.85496e+08
-4.49489e+10
5.99683e+08
-4.62539e+10
6.9991e+08
-4.76443e+10
7.79238e+08
-4.90938e+10
8.16915e+08
-5.05346e+10
7.82329e+08
-5.18606e+10
6.37491e+08
-5.28432e+10
3.34062e+08
-5.25552e+10
-5.06885e+08
-4.93657e+10
-2.42522e+09
-4.18831e+10
-5.59125e+09
-4.3109e+10
-4.8303e+09
-4.1123e+08
-2.83605e+10
1.37656e+09
1.56951e+09
-2.93443e+10
1.94541e+09
3.19591e+09
-2.60303e+10
1.27999e+09
4.91165e+09
-2.92118e+10
7.27666e+08
3.22255e+09
-2.84768e+10
3.10145e+07
6.15996e+08
-2.7343e+10
9.55125e+08
2.16607e+09
-2.72581e+10
5.98041e+08
1.57456e+09
-2.68891e+10
2.96655e+08
5.30477e+08
-2.61471e+10
8.08924e+07
2.51071e+08
-2.55455e+10
6.54484e+07
2.42124e+08
-2.51657e+10
6.96242e+07
9.28206e+07
-2.4958e+10
8.6503e+07
2.08999e+07
-2.48381e+10
8.17749e+07
-3.67171e+07
-2.48413e+10
9.10925e+07
-7.89525e+07
-2.49228e+10
1.20565e+08
-1.25043e+08
-2.49879e+10
1.14398e+08
-1.41337e+08
-2.50391e+10
1.10869e+08
-1.63126e+08
-2.50625e+10
1.06049e+08
-1.85947e+08
-2.50692e+10
1.02558e+08
-1.94498e+08
-2.50481e+10
1.04398e+08
-2.02379e+08
-2.50124e+10
1.07024e+08
-2.10685e+08
-2.49589e+10
1.10668e+08
-2.16336e+08
-2.48946e+10
1.13281e+08
-2.18718e+08
-2.48211e+10
1.1633e+08
-2.15958e+08
-2.47415e+10
1.18856e+08
-2.06183e+08
-2.46598e+10
1.21476e+08
-1.88279e+08
-2.45786e+10
1.24271e+08
-1.61476e+08
-2.45005e+10
1.27415e+08
-1.26798e+08
-2.4426e+10
1.31382e+08
-8.42845e+07
-2.43577e+10
1.36432e+08
-3.4153e+07
-2.42933e+10
1.43217e+08
1.99442e+07
-2.42295e+10
1.52438e+08
7.53763e+07
-2.41579e+10
1.61333e+08
1.38905e+08
-2.40929e+10
1.64244e+08
2.16149e+08
-2.40545e+10
1.62885e+08
2.94858e+08
-2.40241e+10
1.64925e+08
3.77466e+08
-2.39865e+10
1.72102e+08
4.54065e+08
-2.39278e+10
1.74022e+08
5.28554e+08
-2.38407e+10
1.74263e+08
6.06267e+08
-2.37242e+10
1.75496e+08
6.84768e+08
-2.35816e+10
1.80426e+08
7.66868e+08
-2.34111e+10
1.90179e+08
8.48936e+08
-2.32132e+10
2.08511e+08
9.32429e+08
-2.29813e+10
2.37356e+08
1.01197e+09
-2.27164e+10
2.83448e+08
1.07559e+09
-2.24567e+10
3.61777e+08
1.11676e+09
-2.22634e+10
4.85738e+08
1.1126e+09
-2.21861e+10
6.70597e+08
9.38561e+08
-2.22406e+10
9.20561e+08
3.9486e+08
-2.26271e+10
1.25215e+09
-8.12733e+08
-2.45451e+10
1.86164e+09
-2.7635e+09
-2.96358e+10
3.13313e+09
-5.36548e+09
-3.84334e+10
6.9753e+09
-9.2685e+09
3.27797e+09
-1.83137e+09
-2.55395e+10
-8.92495e+08
-2.47938e+10
-4.7284e+09
-2.63116e+10
-2.48238e+09
-2.69587e+10
3.7061e+07
-2.80205e+10
-1.27392e+08
-2.71598e+10
6.30673e+08
-2.69737e+10
7.89843e+08
-2.64684e+10
2.25625e+08
-2.58687e+10
-6.22756e+07
-2.52995e+10
-1.43301e+06
-2.49224e+10
1.63993e+07
-2.46671e+10
655413
-2.44809e+10
-7.3795e+07
-2.43457e+10
-1.83455e+08
-2.42246e+10
-2.54332e+08
-2.41311e+10
-2.74951e+08
-2.40267e+10
-3.22167e+08
-2.39069e+10
-3.77014e+08
-2.37846e+10
-4.00642e+08
-2.36481e+10
-4.28512e+08
-2.3503e+10
-4.51754e+08
-2.33496e+10
-4.73358e+08
-2.31917e+10
-4.896e+08
-2.30325e+10
-4.99532e+08
-2.28748e+10
-5.0057e+08
-2.27234e+10
-4.91831e+08
-2.25812e+10
-4.72672e+08
-2.24504e+10
-4.44663e+08
-2.23314e+10
-4.07848e+08
-2.22253e+10
-3.62934e+08
-2.21273e+10
-3.14139e+08
-2.20332e+10
-2.61489e+08
-2.1944e+10
-2.00131e+08
-2.18662e+10
-1.29344e+08
-2.18024e+10
-5.18845e+07
-2.17511e+10
3.38906e+07
-2.17021e+10
1.20151e+08
-2.16519e+10
2.10601e+08
-2.16061e+10
3.10847e+08
-2.15672e+10
4.20112e+08
-2.15367e+10
5.37848e+08
-2.1511e+10
6.62621e+08
-2.14895e+10
7.92356e+08
-2.14607e+10
9.14834e+08
-2.1404e+10
1.02105e+09
-2.12978e+10
1.0998e+09
-2.11294e+10
1.13333e+09
-2.08809e+10
1.08007e+09
-2.04975e+10
8.5536e+08
-2.00844e+10
2.66436e+08
-2.00005e+10
-7.54889e+08
-2.01424e+10
-2.42464e+09
-1.21863e+10
-5.9201e+09
-3.11165e+09
-2.63711e+10
7.08676e+08
2.13818e+09
-2.69525e+10
1.89289e+09
1.02816e+09
-2.55565e+10
2.19405e+09
5.41949e+08
-2.59557e+10
1.27908e+09
1.64746e+09
-2.70053e+10
9.44195e+08
1.32917e+08
-2.66023e+10
1.00261e+09
3.07308e+08
-2.65729e+10
8.52169e+08
3.50861e+08
-2.66444e+10
4.20469e+08
-6.84542e+07
-2.64417e+10
875597
-1.35463e+08
-2.622e+10
-1.23443e+08
4.94392e+06
-2.60757e+10
-1.03704e+08
-5.79662e+07
-2.59575e+10
-7.18686e+07
-1.19034e+08
-2.58352e+10
-6.9871e+07
-1.74888e+08
-2.57403e+10
-5.30281e+07
-2.1266e+08
-2.56688e+10
-3.99454e+07
-2.5193e+08
-2.56074e+10
-4.63054e+07
-2.64612e+08
-2.55395e+10
-5.43476e+07
-2.8754e+08
-2.54567e+10
-6.78255e+07
-3.19413e+08
-2.5355e+10
-7.38839e+07
-3.37644e+08
-2.52307e+10
-7.66489e+07
-3.61156e+08
-2.50801e+10
-7.78078e+07
-3.79504e+08
-2.49062e+10
-7.99273e+07
-3.92668e+08
-2.47107e+10
-8.17321e+07
-3.99412e+08
-2.44995e+10
-8.37839e+07
-3.96238e+08
-2.42781e+10
-8.58098e+07
-3.82047e+08
-2.40524e+10
-8.74021e+07
-3.54594e+08
-2.38268e+10
-8.85186e+07
-3.15591e+08
-2.36053e+10
-8.9279e+07
-2.65531e+08
-2.33894e+10
-8.98809e+07
-2.06824e+08
-2.31776e+10
-8.89105e+07
-1.43847e+08
-2.29798e+10
-8.1634e+07
-7.40705e+07
-2.28134e+10
-6.55673e+07
5.34252e+06
-2.26648e+10
-5.69955e+07
8.47389e+07
-2.2497e+10
-5.50136e+07
1.46797e+08
-2.23262e+10
-3.23129e+07
2.03366e+08
-2.21451e+10
-2.42806e+07
2.69432e+08
-2.19791e+10
-1.13651e+07
3.44891e+08
-2.18289e+10
6.61965e+06
4.10292e+08
-2.16916e+10
2.17084e+07
4.71527e+08
-2.15737e+10
3.90079e+07
5.32873e+08
-2.1474e+10
5.41786e+07
5.92357e+08
-2.13899e+10
7.03841e+07
6.46874e+08
-2.13167e+10
8.82549e+07
6.97279e+08
-2.12477e+10
1.08e+08
7.41824e+08
-2.11875e+10
1.3711e+08
7.71542e+08
-2.11665e+10
1.88227e+08
7.85128e+08
-2.12441e+10
2.67972e+08
7.67733e+08
-2.15632e+10
3.74892e+08
6.60137e+08
-2.24062e+10
5.26003e+08
3.81048e+08
-2.43733e+10
8.15308e+08
-1.31182e+08
-2.84127e+10
1.54193e+09
-8.14795e+08
-3.53841e+10
3.04524e+09
-2.07171e+09
-4.61039e+10
6.65148e+09
-5.63843e+09
1.59626e+09
1.33077e+10
-2.45388e+10
8.27533e+08
-2.5946e+10
-1.9593e+09
-2.71934e+10
4.77751e+08
-2.68303e+10
5.19399e+08
-2.68003e+10
4.17746e+08
-2.5933e+10
4.77471e+08
-2.51879e+10
6.80931e+08
-2.4957e+10
2.55217e+08
-2.50098e+10
-1.27526e+08
-2.5048e+10
-1.77622e+08
-2.50986e+10
-1.10648e+08
-2.51278e+10
-1.06716e+08
-2.51416e+10
-1.92e+08
-2.51412e+10
-3.00437e+08
-2.51406e+10
-3.63501e+08
-2.51661e+10
-3.67873e+08
-2.5207e+10
-4.1196e+08
-2.52628e+10
-4.66974e+08
-2.53138e+10
-5.00831e+08
-2.53518e+10
-5.38883e+08
-2.53764e+10
-5.68906e+08
-2.53912e+10
-5.92422e+08
-2.53999e+10
-6.06591e+08
-2.54082e+10
-6.09726e+08
-2.54212e+10
-5.99145e+08
-2.54451e+10
-5.72968e+08
-2.54834e+10
-5.3311e+08
-2.55382e+10
-4.82339e+08
-2.5611e+10
-4.21458e+08
-2.57021e+10
-3.51107e+08
-2.58107e+10
-2.7175e+08
-2.5929e+10
-1.88396e+08
-2.60598e+10
-1.01758e+08
-2.6207e+10
-9.57762e+06
-2.63488e+10
8.71845e+07
-2.64947e+10
1.84853e+08
-2.66455e+10
2.86355e+08
-2.68015e+10
3.9384e+08
-2.69642e+10
5.06399e+08
-2.71282e+10
6.21164e+08
-2.72925e+10
7.38896e+08
-2.74522e+10
8.59165e+08
-2.7599e+10
9.80147e+08
-2.77314e+10
1.09841e+09
-2.78398e+10
1.20289e+09
-2.79056e+10
1.2813e+09
-2.79313e+10
1.33461e+09
-2.79588e+10
1.35185e+09
-2.80309e+10
1.26578e+09
-2.80711e+10
8.61466e+08
-2.75237e+10
-1.00348e+08
-2.47597e+10
-2.49821e+09
-1.8082e+10
-6.15085e+09
-2.15191e+09
-2.78027e+10
3.57907e+08
1.75485e+09
-2.82385e+10
2.39543e+08
6.78451e+08
-2.89888e+10
1.19192e+08
7.0591e+08
-2.81603e+10
3.48958e+08
6.92303e+07
-2.83048e+10
2.61791e+08
-3.08522e+08
-2.82153e+10
3.46395e+08
-3.81686e+08
-2.82513e+10
3.45769e+08
-1.48336e+08
-2.84091e+10
1.64929e+08
-2.16501e+08
-2.84979e+10
-7.19456e+06
-1.4775e+08
-2.84783e+10
-5.21883e+07
-5.1331e+07
-2.85195e+10
-1.80411e+07
-7.56841e+07
-2.86092e+10
2.24953e+06
-9.94159e+07
-2.87335e+10
2.52907e+07
-1.39176e+08
-2.88514e+10
4.21093e+07
-2.00531e+08
-2.89807e+10
4.89975e+07
-2.39169e+08
-2.91069e+10
3.76127e+07
-2.51281e+08
-2.92185e+10
2.94132e+07
-2.83264e+08
-2.93155e+10
2.00404e+07
-3.30794e+08
-2.93874e+10
1.4005e+07
-3.68729e+08
-2.94348e+10
8.05982e+06
-4.13572e+08
-2.94458e+10
3.73942e+06
-4.53414e+08
-2.94206e+10
-2.02339e+06
-4.90193e+08
-2.93555e+10
-7.23726e+06
-5.15682e+08
-2.92565e+10
-1.42768e+07
-5.29242e+08
-2.9128e+10
-2.15407e+07
-5.2442e+08
-2.89766e+10
-2.96507e+07
-5.01113e+08
-2.88074e+10
-3.83967e+07
-4.61238e+08
-2.86209e+10
-4.77301e+07
-4.1024e+08
-2.84179e+10
-5.63875e+07
-3.51351e+08
-2.82025e+10
-6.36807e+07
-2.85868e+08
-2.79824e+10
-6.86425e+07
-2.0914e+08
-2.77572e+10
-7.08943e+07
-1.26504e+08
-2.75142e+10
-7.47473e+07
-5.59473e+07
-2.72595e+10
-8.64037e+07
1.00029e+07
-2.70087e+10
-1.02112e+08
8.84951e+07
-2.67393e+10
-1.14242e+08
1.48056e+08
-2.64461e+10
-1.2011e+08
2.0205e+08
-2.61399e+10
-1.23966e+08
2.50921e+08
-2.58225e+10
-1.2948e+08
2.9408e+08
-2.54909e+10
-1.35405e+08
3.30494e+08
-2.51385e+10
-1.42136e+08
3.54702e+08
-2.47599e+10
-1.48842e+08
3.67569e+08
-2.43479e+10
-1.53564e+08
3.68498e+08
-2.38973e+10
-1.52873e+08
3.58211e+08
-2.34135e+10
-1.43979e+08
3.34181e+08
-2.29196e+10
-1.19491e+08
3.00466e+08
-2.24709e+10
-7.94854e+07
2.61432e+08
-2.22135e+10
-2.30043e+07
2.33114e+08
-2.23891e+10
5.83046e+07
2.05198e+08
-2.32944e+10
2.05888e+08
1.22093e+08
-2.53916e+10
6.33542e+08
-1.95495e+07
-2.84691e+10
1.16833e+09
-9.48715e+08
-3.42522e+10
3.66812e+09
-4.30069e+09
-2.61684e+09
-9.36347e+09
-2.60971e+10
1.33197e+09
-2.65353e+10
-1.58978e+09
-2.65831e+10
3.73317e+08
-2.56869e+10
-2.56664e+08
-2.53308e+10
1.33745e+08
-2.50471e+10
3.9191e+08
-2.46818e+10
5.48313e+08
-2.4538e+10
1.89601e+08
-2.46619e+10
-8.11833e+07
-2.48672e+10
-8.53057e+07
-2.50318e+10
-1.82715e+07
-2.51217e+10
-6.3725e+07
-2.5152e+10
-1.82852e+08
-2.51745e+10
-2.82901e+08
-2.52221e+10
-3.17055e+08
-2.52742e+10
-3.3174e+08
-2.53249e+10
-3.90699e+08
-2.53775e+10
-4.56636e+08
-2.54177e+10
-5.12434e+08
-2.54414e+10
-5.71104e+08
-2.54429e+10
-6.23863e+08
-2.54206e+10
-6.68341e+08
-2.53783e+10
-7.00294e+08
-2.53217e+10
-7.15645e+08
-2.52598e+10
-7.09837e+08
-2.51994e+10
-6.82528e+08
-2.51474e+10
-6.36217e+08
-2.51102e+10
-5.73936e+08
-2.50915e+10
-4.97604e+08
-2.50897e+10
-4.12638e+08
-2.51e+10
-3.21687e+08
-2.51201e+10
-2.27019e+08
-2.5151e+10
-1.304e+08
-2.5198e+10
-3.20751e+07
-2.5259e+10
6.34542e+07
-2.53321e+10
1.59021e+08
-2.54123e+10
2.57123e+08
-2.54926e+10
3.52853e+08
-2.55748e+10
4.50382e+08
-2.56572e+10
5.44418e+08
-2.57337e+10
6.32115e+08
-2.57958e+10
7.13325e+08
-2.58323e+10
7.88384e+08
-2.58319e+10
8.58065e+08
-2.57868e+10
9.17094e+08
-2.56946e+10
9.60497e+08
-2.55635e+10
9.90642e+08
-2.54363e+10
1.02095e+09
-2.54153e+10
1.03645e+09
-2.56641e+10
9.1316e+08
-2.60611e+10
3.56755e+08
-2.67167e+10
-1.35363e+09
-2.46759e+10
-4.92536e+09
-2.56735e+08
-2.85615e+10
6.23706e+08
1.02364e+08
-2.83184e+10
7.17305e+08
-4.54734e+08
-2.83446e+10
7.74679e+08
-1.56085e+08
-2.8072e+10
6.70049e+08
-9.41962e+08
-2.78264e+10
2.72311e+08
-8.81553e+08
-2.76503e+10
1.79509e+08
-7.84923e+08
-2.75409e+10
2.49016e+08
-5.51522e+08
-2.76238e+10
2.21169e+08
-3.99103e+08
-2.77896e+10
1.1591e+08
-1.46737e+08
-2.7953e+10
5.15289e+07
6.85914e+06
-2.81542e+10
7.55742e+07
-3.94273e+06
-2.83253e+10
9.89168e+07
-7.72745e+07
-2.85456e+10
1.31439e+08
-9.66484e+07
-2.88116e+10
1.42585e+08
-1.21577e+08
-2.91127e+10
1.42668e+08
-1.30277e+08
-2.94103e+10
1.38136e+08
-1.41363e+08
-2.9711e+10
1.34604e+08
-1.76587e+08
-3.00146e+10
1.3257e+08
-2.22272e+08
-3.03189e+10
1.3101e+08
-2.68484e+08
-3.0615e+10
1.3033e+08
-3.20512e+08
-3.09003e+10
1.28904e+08
-3.7138e+08
-3.11659e+10
1.28847e+08
-4.1785e+08
-3.14135e+10
1.27845e+08
-4.5295e+08
-3.16444e+10
1.26064e+08
-4.70889e+08
-3.18622e+10
1.21762e+08
-4.6485e+08
-3.20665e+10
1.1482e+08
-4.38786e+08
-3.22579e+10
1.06516e+08
-3.94983e+08
-3.24382e+10
9.68073e+07
-3.38289e+08
-3.26074e+10
8.6052e+07
-2.73714e+08
-3.27661e+10
7.56322e+07
-2.03306e+08
-3.29065e+10
6.57281e+07
-1.30601e+08
-3.30155e+10
5.42154e+07
-6.48522e+07
-3.30929e+10
4.00652e+07
-9.51542e+06
-3.31482e+10
2.58195e+07
4.87524e+07
-3.31801e+10
1.08671e+07
1.17267e+08
-3.31909e+10
-8.09205e+06
1.69958e+08
-3.31751e+10
-2.76028e+07
2.09552e+08
-3.31333e+10
-4.73737e+07
2.40641e+08
-3.30648e+10
-6.90245e+07
2.63695e+08
-3.2971e+10
-9.21843e+07
2.78171e+08
-3.28537e+10
-1.15971e+08
2.80129e+08
-3.27141e+10
-1.40379e+08
2.70662e+08
-3.25514e+10
-1.6324e+08
2.488e+08
-3.23674e+10
-1.78212e+08
2.13154e+08
-3.21778e+10
-1.80217e+08
1.69877e+08
-3.20162e+10
-1.67473e+08
1.32868e+08
-3.19525e+10
-1.44595e+08
1.348e+08
-3.21333e+10
-1.18269e+08
2.54061e+08
-3.27314e+10
-7.36161e+07
4.64597e+08
-3.40513e+10
-4.12595e+06
8.15134e+08
-3.63772e+10
1.47618e+08
1.26591e+09
-3.9282e+10
-3.09212e+08
1.22896e+09
-4.90877e+10
5.5327e+08
3.9619e+09
-2.80084e+10
-2.08584e+10
-2.82312e+10
4.14084e+08
-2.77223e+10
-1.49037e+09
-2.71963e+10
5.50461e+08
-2.65205e+10
-3.11844e+08
-2.6297e+10
1.4401e+08
-2.61644e+10
4.06194e+08
-2.58219e+10
4.25346e+08
-2.55064e+10
6.52123e+07
-2.54125e+10
-9.19117e+07
-2.55492e+10
6.79713e+07
-2.56801e+10
1.5341e+08
-2.57224e+10
4.47217e+07
-2.57398e+10
-6.52423e+07
-2.57956e+10
-1.16259e+08
-2.58703e+10
-1.32761e+08
-2.59343e+10
-1.66185e+08
-2.59983e+10
-2.31721e+08
-2.60624e+10
-3.0476e+08
-2.61144e+10
-3.78001e+08
-2.61502e+10
-4.56089e+08
-2.61621e+10
-5.31861e+08
-2.61449e+10
-6.01719e+08
-2.60978e+10
-6.58529e+08
-2.60255e+10
-6.94348e+08
-2.59364e+10
-7.03149e+08
-2.58373e+10
-6.86271e+08
-2.57347e+10
-6.46172e+08
-2.56339e+10
-5.867e+08
-2.55344e+10
-5.1563e+08
-2.54312e+10
-4.4104e+08
-2.53202e+10
-3.64888e+08
-2.52023e+10
-2.86293e+08
-2.50806e+10
-2.06561e+08
-2.49546e+10
-1.26948e+08
-2.48262e+10
-5.06937e+07
-2.46964e+10
2.03783e+07
-2.45648e+10
9.02888e+07
-2.44339e+10
1.57088e+08
-2.43058e+10
2.22288e+08
-2.41862e+10
2.85098e+08
-2.40808e+10
3.44087e+08
-2.39926e+10
3.98745e+08
-2.39214e+10
4.50186e+08
-2.38633e+10
5.03491e+08
-2.38216e+10
5.64687e+08
-2.38169e+10
6.41321e+08
-2.39071e+10
7.57532e+08
-2.42223e+10
9.72792e+08
-2.49507e+10
1.32904e+09
-2.6445e+10
1.85568e+09
-2.92938e+10
2.59978e+09
-3.55734e+10
3.87325e+09
-4.60597e+10
5.78608e+09
-1.28053e+08
-2.92511e+10
2.8428e+08
-1.68235e+09
-2.88321e+10
4.82221e+08
-1.35229e+09
-2.83553e+10
4.9177e+08
-1.06953e+09
-2.81286e+10
2.57293e+08
-1.35613e+09
-2.7663e+10
-1.18786e+08
-1.16543e+09
-2.73063e+10
-1.20343e+08
-9.77908e+08
-2.70102e+10
4.18073e+07
-8.65504e+08
-2.6827e+10
1.57027e+08
-7.34239e+08
-2.6648e+10
1.50881e+08
-4.87634e+08
-2.65264e+10
1.34001e+08
-2.71964e+08
-2.64793e+10
1.1468e+08
-1.95073e+08
-2.64611e+10
1.1561e+08
-2.41413e+08
-2.64703e+10
1.37927e+08
-2.54467e+08
-2.65205e+10
1.48519e+08
-2.48769e+08
-2.65934e+10
1.51175e+08
-2.38147e+08
-2.66739e+10
1.52569e+08
-2.43911e+08
-2.67671e+10
1.54262e+08
-2.72314e+08
-2.68736e+10
1.57172e+08
-3.09413e+08
-2.69938e+10
1.59159e+08
-3.54737e+08
-2.71215e+10
1.61208e+08
-4.04349e+08
-2.72543e+10
1.62175e+08
-4.56855e+08
-2.73843e+10
1.64662e+08
-5.01659e+08
-2.7517e+10
1.65274e+08
-5.33794e+08
-2.76561e+10
1.64935e+08
-5.33695e+08
-2.78123e+10
1.60356e+08
-4.99971e+08
-2.79893e+10
1.53281e+08
-4.36153e+08
-2.81869e+10
1.43434e+08
-3.5357e+08
-2.84011e+10
1.31923e+08
-2.61045e+08
-2.86255e+10
1.18986e+08
-1.66519e+08
-2.88488e+10
1.03522e+08
-7.57201e+07
-2.90634e+10
8.522e+07
1.15888e+07
-2.92633e+10
6.50436e+07
8.69049e+07
-2.94496e+10
4.43638e+07
1.51968e+08
-2.962e+10
2.57904e+07
2.13967e+08
-2.97606e+10
9.0123e+06
2.68294e+08
-2.98702e+10
-9.17579e+06
3.04327e+08
-2.99486e+10
-2.87512e+07
3.25853e+08
-2.99936e+10
-4.91184e+07
3.33975e+08
-3.0001e+10
-7.05978e+07
3.27914e+08
-2.99633e+10
-9.30816e+07
3.03137e+08
-2.98773e+10
-1.16191e+08
2.61598e+08
-2.97367e+10
-1.39991e+08
2.03344e+08
-2.95339e+10
-1.6338e+08
1.28905e+08
-2.92621e+10
-1.82121e+08
3.62844e+07
-2.89186e+10
-1.93174e+08
-6.56968e+07
-2.85076e+10
-1.96222e+08
-1.6072e+08
-2.80434e+10
-1.9798e+08
-2.08178e+08
-2.75688e+10
-2.18962e+08
-9.86661e+07
-2.71379e+10
-2.41116e+08
1.10321e+08
-2.71012e+10
-2.13989e+08
7.22018e+08
-2.79473e+10
-1.45341e+08
1.92029e+09
-3.0402e+10
-1.80607e+08
3.51802e+09
-3.75137e+10
7.57311e+08
1.02817e+10
-2.72683e+09
2.46819e+09
-2.96816e+10
-1.06847e+09
-2.89753e+10
-1.68133e+09
-2.81941e+10
3.22514e+08
-2.77166e+10
-4.60472e+08
-2.76429e+10
1.66409e+07
-2.75526e+10
2.45002e+08
-2.70908e+10
3.70249e+07
-2.66567e+10
-1.97495e+08
-2.65076e+10
-9.05192e+07
-2.64697e+10
1.53446e+08
-2.64192e+10
2.01553e+08
-2.63818e+10
1.05412e+08
-2.63771e+10
5.0299e+07
-2.64024e+10
3.97279e+07
-2.64319e+10
2.91136e+07
-2.6459e+10
-6.55554e+06
-2.64926e+10
-6.52109e+07
-2.65306e+10
-1.35126e+08
-2.65646e+10
-2.14167e+08
-2.65912e+10
-3.01807e+08
-2.66007e+10
-3.93783e+08
-2.65858e+10
-4.84824e+08
-2.65422e+10
-5.65028e+08
-2.64785e+10
-6.17717e+08
-2.64059e+10
-6.34193e+08
-2.63352e+10
-6.17013e+08
-2.62711e+10
-5.74689e+08
-2.6215e+10
-5.13529e+08
-2.61649e+10
-4.44521e+08
-2.61157e+10
-3.80023e+08
-2.60702e+10
-3.1466e+08
-2.60273e+10
-2.50252e+08
-2.59823e+10
-1.91066e+08
-2.59282e+10
-1.37975e+08
-2.58619e+10
-9.09986e+07
-2.57873e+10
-4.85853e+07
-2.57058e+10
-9.36906e+06
-2.56175e+10
2.3927e+07
-2.55224e+10
5.21402e+07
-2.54193e+10
7.37794e+07
-2.5312e+10
9.3811e+07
-2.52006e+10
1.10309e+08
-2.50804e+10
1.23152e+08
-2.49418e+10
1.39395e+08
-2.47768e+10
1.69356e+08
-2.45808e+10
2.22252e+08
-2.4363e+10
3.21146e+08
-2.41777e+10
5.38579e+08
-2.409e+10
9.3345e+08
-2.42521e+10
1.68784e+09
-2.49723e+10
3.02318e+09
-2.64091e+10
5.05535e+09
-3.15131e+10
1.17662e+10
3.76605e+09
-2.95853e+10
1.14371e+08
-2.83287e+09
-2.92483e+10
3.12875e+08
-1.82153e+09
-2.88499e+10
1.85686e+08
-1.44905e+09
-2.86194e+10
-5.20903e+07
-1.33353e+09
-2.81983e+10
-2.88027e+08
-1.13037e+09
-2.7901e+10
-2.39343e+08
-9.11588e+08
-2.78107e+10
-7.68356e+07
-7.97431e+08
-2.7818e+10
3.62422e+07
-7.17845e+08
-2.77595e+10
5.77911e+07
-5.86584e+08
-2.76465e+10
7.30322e+07
-4.58966e+08
-2.74789e+10
7.30537e+07
-4.46615e+08
-2.73497e+10
8.38244e+07
-4.68842e+08
-2.72574e+10
1.08868e+08
-4.70548e+08
-2.71788e+10
1.2597e+08
-4.68844e+08
-2.70935e+10
1.37975e+08
-4.76169e+08
-2.69991e+10
1.48422e+08
-5.0364e+08
-2.68943e+10
1.59981e+08
-5.49886e+08
-2.67797e+10
1.70312e+08
-6.1274e+08
-2.66467e+10
1.80751e+08
-6.88267e+08
-2.64973e+10
1.89285e+08
-7.72932e+08
-2.63207e+10
1.98949e+08
-8.61976e+08
-2.61134e+10
2.07986e+08
-9.5129e+08
-2.58717e+10
2.18682e+08
-1.02246e+09
-2.56189e+10
2.28936e+08
-1.04156e+09
-2.5389e+10
2.40282e+08
-9.89533e+08
-2.52096e+10
2.52195e+08
-8.79763e+08
-2.50907e+10
2.6359e+08
-7.39393e+08
-2.5034e+10
2.74502e+08
-5.86557e+08
-2.50362e+10
2.85394e+08
-4.34797e+08
-2.50849e+10
2.94238e+08
-2.97538e+08
-2.51602e+10
3.00625e+08
-1.81701e+08
-2.52529e+10
3.0552e+08
-8.63175e+07
-2.53565e+10
3.05476e+08
-4.2034e+06
-2.54608e+10
3.01864e+08
6.71531e+07
-2.55528e+10
2.96058e+08
1.17668e+08
-2.56282e+10
2.88973e+08
1.45109e+08
-2.5683e+10
2.80407e+08
1.53066e+08
-2.57125e+10
2.69723e+08
1.42931e+08
-2.57101e+10
2.56238e+08
1.12162e+08
-2.56715e+10
2.40336e+08
5.94199e+07
-2.55897e+10
2.22817e+08
-1.59322e+07
-2.5457e+10
2.05e+08
-1.10989e+08
-2.52661e+10
1.88676e+08
-2.22798e+08
-2.5011e+10
1.75852e+08
-3.47564e+08
-2.4696e+10
1.69475e+08
-4.66132e+08
-2.43351e+10
1.76783e+08
-5.57552e+08
-2.39385e+10
1.97997e+08
-5.92207e+08
-2.34767e+10
2.09368e+08
-4.92646e+08
-2.29499e+10
2.23017e+08
-3.23903e+08
-2.21123e+10
2.18233e+08
-6.12666e+06
-2.04929e+10
2.25269e+07
5.70036e+08
-1.88917e+10
-1.18599e+08
2.46059e+09
-1.96083e+10
9.14926e+08
1.03907e+10
6.35105e+08
5.10174e+09
-3.01061e+10
-2.2682e+09
-2.95779e+10
-1.78975e+09
-2.89112e+10
-3.11715e+07
-2.86823e+10
-6.20299e+08
-2.84295e+10
-4.2605e+08
-2.80417e+10
-3.12041e+08
-2.77402e+10
-2.97141e+08
-2.76929e+10
-1.85057e+08
-2.77644e+10
4.72143e+07
-2.76948e+10
1.55616e+08
-2.75514e+10
1.25056e+08
-2.74727e+10
1.02572e+08
-2.74359e+10
1.1387e+08
-2.74064e+10
1.27106e+08
-2.73776e+10
1.28615e+08
-2.73505e+10
1.05743e+08
-2.73271e+10
6.18364e+07
-2.73023e+10
41747.7
-2.72729e+10
-7.70951e+07
-2.72375e+10
-1.65554e+08
-2.71903e+10
-2.62206e+08
-2.71226e+10
-3.64273e+08
-2.70327e+10
-4.55053e+08
-2.69349e+10
-5.02446e+08
-2.68522e+10
-4.88555e+08
-2.67975e+10
-4.27286e+08
-2.67717e+10
-3.39045e+08
-2.67694e+10
-2.37373e+08
-2.67809e+10
-1.37625e+08
-2.68002e+10
-5.06831e+07
-2.68215e+10
2.82951e+07
-2.68404e+10
9.98339e+07
-2.68522e+10
1.55724e+08
-2.68553e+10
1.99196e+08
-2.68458e+10
2.29562e+08
-2.68198e+10
2.48812e+08
-2.67709e+10
2.55635e+08
-2.66976e+10
2.5151e+08
-2.65994e+10
2.37525e+08
-2.64778e+10
2.15256e+08
-2.63312e+10
1.8874e+08
-2.61585e+10
1.60418e+08
-2.59546e+10
1.31244e+08
-2.57094e+10
1.0855e+08
-2.54078e+10
1.02785e+08
-2.50225e+10
1.17617e+08
-2.45257e+10
1.70989e+08
-2.3915e+10
3.24903e+08
-2.31564e+10
6.08519e+08
-2.22129e+10
1.16892e+09
-2.0995e+10
2.05712e+09
-1.94964e+10
3.69851e+09
-1.60851e+10
9.43634e+09
4.30441e+09
-2.8835e+10
-5.54035e+07
-3.23194e+09
-2.86341e+10
7.69037e+07
-1.95612e+09
-2.8439e+10
-9.69791e+07
-1.396e+09
-2.83174e+10
-1.22747e+08
-1.19821e+09
-2.8237e+10
-1.21222e+08
-9.85709e+08
-2.82215e+10
-7.09567e+07
-7.81647e+08
-2.83352e+10
-2.95756e+07
-6.038e+08
-2.84843e+10
-2.55423e+07
-5.10274e+08
-2.85772e+10
-4.51516e+07
-4.2796e+08
-2.86085e+10
-5.81668e+07
-3.58026e+08
-2.86329e+10
-5.25042e+07
-3.64625e+08
-2.86849e+10
-3.36266e+07
-3.81997e+08
-2.87463e+10
-1.46802e+07
-3.95996e+08
-2.8798e+10
-5.50891e+06
-4.15161e+08
-2.88299e+10
561088
-4.49961e+08
-2.88388e+10
7.17034e+06
-5.06104e+08
-2.88199e+10
1.52516e+07
-5.85139e+08
-2.87691e+10
2.39315e+07
-6.89178e+08
-2.8677e+10
3.3654e+07
-8.15754e+08
-2.85389e+10
4.33911e+07
-9.64631e+08
-2.83385e+10
5.57795e+07
-1.12975e+09
-2.80564e+10
6.93414e+07
-1.31977e+09
-2.76651e+10
8.58872e+07
-1.51304e+09
-2.71805e+10
1.02447e+08
-1.64384e+09
-2.66533e+10
1.19806e+08
-1.64648e+09
-2.61337e+10
1.36182e+08
-1.54144e+09
-2.56427e+10
1.53702e+08
-1.38164e+09
-2.51924e+10
1.74339e+08
-1.19931e+09
-2.47838e+10
1.99625e+08
-1.02157e+09
-2.44147e+10
2.27248e+08
-8.63147e+08
-2.40854e+10
2.56224e+08
-7.27719e+08
-2.37996e+10
2.84728e+08
-6.09211e+08
-2.3554e+10
3.14311e+08
-5.09282e+08
-2.33416e+10
3.4378e+08
-4.27891e+08
-2.31616e+10
3.70807e+08
-3.66735e+08
-2.3013e+10
3.93899e+08
-3.27314e+08
-2.28963e+10
4.13068e+08
-3.04599e+08
-2.28102e+10
4.28149e+08
-2.98947e+08
-2.27582e+10
4.3865e+08
-3.08084e+08
-2.27434e+10
4.44162e+08
-3.3237e+08
-2.27702e+10
4.45261e+08
-3.69763e+08
-2.28397e+10
4.43158e+08
-4.17893e+08
-2.29488e+10
4.38947e+08
-4.73696e+08
-2.3093e+10
4.32832e+08
-5.28432e+08
-2.32631e+10
4.25098e+08
-5.63626e+08
-2.3438e+10
4.17279e+08
-5.71584e+08
-2.35809e+10
4.07524e+08
-5.4666e+08
-2.35886e+10
3.80258e+08
-4.80375e+08
-2.33955e+10
3.44224e+08
-4.2758e+08
-2.28843e+10
3.15947e+08
-3.96291e+08
-2.13803e+10
1.72493e+08
-5.79598e+08
-1.88198e+10
-2.22881e+08
5.75359e+08
-1.57206e+10
7.69767e+07
7.57844e+09
5.53841e+08
5.42422e+09
-2.94204e+10
-2.85135e+09
-2.91696e+10
-1.86983e+09
-2.88691e+10
-3.3416e+08
-2.8931e+10
-5.99826e+08
-2.87586e+10
-6.55595e+08
-2.84819e+10
-6.09838e+08
-2.84125e+10
-3.55817e+08
-2.84348e+10
-1.55592e+08
-2.83858e+10
-2.16812e+07
-2.82871e+10
1.71844e+07
-2.82121e+10
1.03021e+07
-2.81542e+10
1.92036e+07
-2.80835e+10
3.32126e+07
-2.80032e+10
4.30388e+07
-2.79128e+10
3.89543e+07
-2.7812e+10
1.2296e+07
-2.76958e+10
-3.8423e+07
-2.75579e+10
-1.13017e+08
-2.73928e+10
-2.10285e+08
-2.71934e+10
-3.25396e+08
-2.69526e+10
-4.54572e+08
-2.66547e+10
-6.00162e+08
-2.62865e+10
-7.44753e+08
-2.58706e+10
-8.21644e+08
-2.54687e+10
-7.74953e+08
-2.51298e+10
-6.29679e+08
-2.48691e+10
-4.39458e+08
-2.46824e+10
-2.35729e+08
-2.45511e+10
-4.74505e+07
-2.44614e+10
1.16439e+08
-2.43981e+10
2.58117e+08
-2.43521e+10
3.82486e+08
-2.43103e+10
4.78383e+08
-2.42638e+10
5.52204e+08
-2.42104e+10
6.07656e+08
-2.41474e+10
6.44596e+08
-2.40761e+10
6.65295e+08
-2.3994e+10
6.67361e+08
-2.39013e+10
6.53947e+08
-2.37968e+10
6.2561e+08
-2.36767e+10
5.86003e+08
-2.35349e+10
5.39218e+08
-2.33661e+10
4.91952e+08
-2.3162e+10
4.5225e+08
-2.29129e+10
4.31833e+08
-2.26138e+10
4.38882e+08
-2.22572e+10
4.81045e+08
-2.17941e+10
5.51351e+08
-2.11506e+10
6.51165e+08
-2.01727e+10
8.87791e+08
-1.87782e+10
1.21899e+09
-1.68396e+10
1.93083e+09
-1.10235e+10
3.95805e+09
2.32999e+09
-2.73416e+10
-1.91919e+08
-2.7248e+09
-2.73628e+10
-1.80185e+08
-1.65621e+09
-2.72115e+10
-3.28671e+08
-1.13289e+09
-2.71843e+10
-1.81225e+08
-9.73546e+08
-2.73408e+10
-4.52243e+07
-7.21472e+08
-2.74647e+10
-5.26349e+07
-5.45007e+08
-2.75571e+10
-6.00691e+07
-3.88084e+08
-2.76437e+10
-9.5121e+07
-2.65423e+08
-2.7749e+10
-1.25245e+08
-1.39808e+08
-2.78707e+10
-1.45839e+08
-4.22842e+07
-2.80501e+10
-1.39014e+08
-8.28487e+06
-2.82565e+10
-1.33928e+08
-1.37406e+07
-2.84691e+10
-1.32709e+08
-3.12597e+07
-2.86756e+10
-1.36376e+08
-6.02507e+07
-2.88709e+10
-1.40605e+08
-1.07094e+08
-2.90505e+10
-1.43427e+08
-1.7607e+08
-2.92143e+10
-1.44376e+08
-2.70517e+08
-2.93542e+10
-1.42804e+08
-3.9457e+08
-2.94698e+10
-1.40246e+08
-5.51336e+08
-2.95538e+10
-1.34374e+08
-7.36234e+08
-2.96072e+10
-1.25658e+08
-9.4799e+08
-2.96051e+10
-1.10076e+08
-1.20731e+09
-2.9504e+10
-8.92453e+07
-1.52449e+09
-2.92895e+10
-6.47168e+07
-1.78913e+09
-2.90439e+10
-4.45444e+07
-1.84133e+09
-2.88394e+10
-3.35436e+07
-1.70365e+09
-2.86697e+10
-3.02315e+07
-1.50329e+09
-2.85289e+10
-3.0676e+07
-1.28059e+09
-2.84068e+10
-3.38298e+07
-1.06925e+09
-2.82996e+10
-3.93121e+07
-8.78942e+08
-2.82084e+10
-4.3759e+07
-7.11893e+08
-2.81282e+10
-4.76324e+07
-5.67582e+08
-2.80574e+10
-4.96018e+07
-4.4559e+08
-2.79947e+10
-4.95529e+07
-3.45689e+08
-2.79427e+10
-4.81815e+07
-2.64902e+08
-2.7907e+10
-4.39392e+07
-2.03824e+08
-2.78891e+10
-3.672e+07
-1.61926e+08
-2.78902e+10
-2.82629e+07
-1.38364e+08
-2.79112e+10
-1.83287e+07
-1.31437e+08
-2.79515e+10
-7.58289e+06
-1.42343e+08
-2.8004e+10
2.58269e+06
-1.71766e+08
-2.80561e+10
1.18418e+07
-2.20205e+08
-2.8089e+10
1.90444e+07
-2.84811e+08
-2.80743e+10
2.23896e+07
-3.61106e+08
-2.79681e+10
2.03095e+07
-4.41296e+08
-2.77188e+10
8.592e+06
-5.24186e+08
-2.72602e+10
-2.29223e+07
-6.13844e+08
-2.65584e+10
-6.90275e+07
-6.8593e+08
-2.56593e+10
-1.32651e+08
-7.24361e+08
-2.46618e+10
-1.68761e+08
-6.95539e+08
-2.36836e+10
-2.02437e+08
-8.67754e+08
-1.94866e+10
-8.54882e+08
-2.23762e+09
-1.93125e+09
-3.23195e+09
-6.38906e+09
-1.55614e+09
-2.14162e+09
-2.80154e+10
-2.5403e+09
-2.8386e+10
-1.6239e+09
-2.86097e+10
-3.88402e+08
-2.88346e+10
-5.12377e+08
-2.88389e+10
-6.57119e+08
-2.884e+10
-6.21819e+08
-2.88502e+10
-3.65733e+08
-2.89063e+10
-1.56354e+08
-2.8963e+10
-5.58995e+07
-2.90498e+10
-1.27968e+07
-2.9159e+10
3.77361e+06
-2.92661e+10
1.02027e+07
-2.93604e+10
7.41398e+06
-2.94405e+10
-5.15409e+06
-2.95012e+10
-3.55126e+07
-2.95393e+10
-8.84563e+07
-2.95493e+10
-1.66591e+08
-2.9523e+10
-2.75996e+08
-2.94494e+10
-4.17696e+08
-2.93183e+10
-5.86468e+08
-2.91188e+10
-7.76517e+08
-2.88232e+10
-1.00435e+09
-2.83726e+10
-1.28298e+09
-2.77486e+10
-1.50645e+09
-2.70462e+10
-1.51426e+09
-2.63696e+10
-1.3322e+09
-2.57408e+10
-1.08435e+09
-2.5173e+10
-8.12085e+08
-2.46715e+10
-5.52268e+08
-2.42421e+10
-3.13522e+08
-2.38826e+10
-9.82772e+07
-2.35851e+10
9.22166e+07
-2.33466e+10
2.52965e+08
-2.31616e+10
3.8811e+08
-2.30273e+10
5.03006e+08
-2.29331e+10
5.91001e+08
-2.28663e+10
6.52374e+08
-2.28226e+10
6.90946e+08
-2.27957e+10
7.08356e+08
-2.27784e+10
7.0444e+08
-2.27607e+10
6.79703e+08
-2.27265e+10
6.35163e+08
-2.26564e+10
5.75618e+08
-2.25265e+10
5.06291e+08
-2.23102e+10
4.35375e+08
-2.19843e+10
3.6909e+08
-2.15383e+10
3.1109e+08
-2.097e+10
2.60994e+08
-2.02958e+10
2.35851e+08
-1.95342e+10
3.66916e+08
-1.84994e+10
4.24102e+08
-1.56284e+10
-1.38959e+09
-5.43403e+09
-9.20244e+09
-5.52096e+09
-2.57121e+10
-2.92401e+08
-1.50687e+09
-2.60747e+10
-3.39235e+08
-9.20681e+08
-2.60404e+10
-4.21336e+08
-7.22672e+08
-2.61485e+10
-1.71105e+08
-6.7796e+08
-2.62582e+10
-6.93135e+07
-5.28419e+08
-2.62286e+10
-6.46968e+07
-4.90077e+08
-2.60915e+10
-8.65047e+07
-4.11017e+08
-2.59597e+10
-1.42184e+08
-2.20339e+08
-2.58913e+10
-1.44861e+08
-2.43235e+07
-2.58665e+10
-1.26807e+08
9.88872e+07
-2.58956e+10
-1.16388e+08
1.7291e+08
-2.59766e+10
-1.14833e+08
2.10944e+08
-2.60938e+10
-1.16821e+08
2.22473e+08
-2.62316e+10
-1.21535e+08
2.09126e+08
-2.63755e+10
-1.26418e+08
1.66186e+08
-2.65192e+10
-1.3032e+08
9.64313e+07
-2.66568e+10
-1.3309e+08
-657836
-2.67814e+10
-1.36414e+08
-1.31448e+08
-2.68821e+10
-1.419e+08
-3.04661e+08
-2.69484e+10
-1.4889e+08
-5.11277e+08
-2.69939e+10
-1.56965e+08
-7.40986e+08
-2.70245e+10
-1.59963e+08
-1.01103e+09
-2.6956e+10
-1.61119e+08
-1.42264e+09
-2.66996e+10
-1.62861e+08
-1.86257e+09
-2.64361e+10
-1.65562e+08
-1.92326e+09
-2.63738e+10
-1.76596e+08
-1.57399e+09
-2.64265e+10
-1.9517e+08
-1.23608e+09
-2.65371e+10
-2.16679e+08
-9.24978e+08
-2.66693e+10
-2.38884e+08
-6.60815e+08
-2.68036e+10
-2.61364e+08
-4.37557e+08
-2.6931e+10
-2.8295e+08
-2.48049e+08
-2.70454e+10
-3.02039e+08
-9.00714e+07
-2.71476e+10
-3.17758e+08
4.27625e+07
-2.72434e+10
-3.30424e+08
1.56301e+08
-2.7339e+10
-3.3976e+08
2.53337e+08
-2.74424e+10
-3.45591e+08
3.3479e+08
-2.75598e+10
-3.4983e+08
4.00737e+08
-2.7698e+10
-3.51062e+08
4.51478e+08
-2.78622e+10
-3.49102e+08
4.86028e+08
-2.80621e+10
-3.43796e+08
5.08556e+08
-2.83053e+10
-3.36104e+08
5.18523e+08
-2.85906e+10
-3.2769e+08
5.11985e+08
-2.89074e+10
-3.21589e+08
4.8948e+08
-2.9232e+10
-3.21477e+08
4.50402e+08
-2.95272e+10
-3.30669e+08
3.95162e+08
-2.97456e+10
-3.54102e+08
3.18487e+08
-2.98343e+10
-3.96122e+08
2.10459e+08
-2.97101e+10
-4.62279e+08
5.55023e+07
-2.9261e+10
-5.29471e+08
-1.84065e+08
-2.84611e+10
-4.18433e+08
-6.50936e+08
-2.72369e+10
-8.68703e+07
-1.5252e+09
-2.38708e+10
-7.29286e+08
-4.48928e+09
-9.11819e+09
-6.21921e+09
-1.46595e+10
-3.29776e+09
-6.72194e+09
-2.58347e+10
-1.36464e+09
-2.68738e+10
-9.03514e+08
-2.74201e+10
-2.49538e+08
-2.7657e+10
-4.36547e+08
-2.78185e+10
-5.53802e+08
-2.79673e+10
-5.22054e+08
-2.80212e+10
-3.76388e+08
-2.80892e+10
-2.02484e+08
-2.81652e+10
-9.311e+07
-2.8266e+10
-6.75859e+06
-2.84034e+10
5.38172e+07
-2.85759e+10
9.07539e+07
-2.87735e+10
1.03269e+08
-2.89861e+10
9.3023e+07
-2.92002e+10
5.3176e+07
-2.94084e+10
-1.30729e+07
-2.96056e+10
-1.07794e+08
-2.97853e+10
-2.38276e+08
-2.99343e+10
-4.12681e+08
-3.00443e+10
-6.26084e+08
-3.01202e+10
-8.56796e+08
-3.01719e+10
-1.1106e+09
-3.01114e+10
-1.49394e+09
-2.98415e+10
-1.92139e+09
-2.95325e+10
-1.97864e+09
-2.93863e+10
-1.64057e+09
-2.93275e+10
-1.32247e+09
-2.9308e+10
-1.02721e+09
-2.9305e+10
-7.67229e+08
-2.93082e+10
-5.39428e+08
-2.93119e+10
-3.40282e+08
-2.93101e+10
-1.69597e+08
-2.93051e+10
-2.32146e+07
-2.93016e+10
1.05339e+08
-2.93026e+10
2.19735e+08
-2.93188e+10
3.20919e+08
-2.93642e+10
4.10618e+08
-2.94477e+10
4.88424e+08
-2.95752e+10
5.53774e+08
-2.97528e+10
6.0687e+08
-2.99867e+10
6.49123e+08
-3.02853e+10
6.83856e+08
-3.06584e+10
7.17429e+08
-3.1114e+10
7.52092e+08
-3.16559e+10
7.89775e+08
-3.22848e+10
8.28411e+08
-3.29978e+10
8.59411e+08
-3.37671e+10
8.46067e+08
-3.44228e+10
6.69925e+08
-3.40964e+10
-4.83387e+07
-3.11491e+10
-2.28858e+09
-2.63603e+10
-6.5671e+09
-2.80508e+10
-1.35923e+10
-3.03833e+09
-2.42682e+10
-1.42084e+08
1.73384e+07
-2.50236e+10
-2.59929e+08
9.15584e+07
-2.53831e+10
-2.67748e+08
-1.05157e+08
-2.58004e+10
-9.44712e+07
-1.78502e+08
-2.60738e+10
-5.33772e+07
-2.09504e+08
-2.62135e+10
-7.3199e+07
-2.74765e+08
-2.62066e+10
-1.27251e+08
-2.73262e+08
-2.60949e+10
-1.19451e+08
-1.79884e+08
-2.59368e+10
-7.35843e+07
-6.50391e+07
-2.5785e+10
-4.07829e+07
3.52876e+07
-2.56627e+10
-2.1393e+07
1.14433e+08
-2.55806e+10
-1.09792e+07
1.699e+08
-2.55402e+10
-5.45527e+06
2.00192e+08
-2.55363e+10
-2.51735e+06
2.01817e+08
-2.55615e+10
-808922
1.69894e+08
-2.56068e+10
1.27609e+06
1.06799e+08
-2.56655e+10
4.14879e+06
1.52531e+07
-2.57213e+10
6.52858e+06
-1.19525e+08
-2.57271e+10
6.05898e+06
-3.24365e+08
-2.56397e+10
-4.49752e+06
-6.07762e+08
-2.54386e+10
-1.82299e+07
-9.25103e+08
-2.51906e+10
-2.21776e+07
-1.23223e+09
-2.48213e+10
-1.46728e+07
-1.74917e+09
-2.39055e+10
-1.74836e+07
-2.72934e+09
-2.27391e+10
-288188
-3.05893e+09
-2.20902e+10
3.13806e+07
-2.22402e+09
-2.17159e+10
4.40761e+07
-1.62471e+09
-2.14687e+10
4.67786e+07
-1.18212e+09
-2.13188e+10
4.63762e+07
-8.12425e+08
-2.12131e+10
4.32359e+07
-5.35169e+08
-2.11236e+10
3.92104e+07
-3.19483e+08
-2.10344e+10
3.56509e+07
-1.5225e+08
-2.09411e+10
3.33706e+07
-1.58152e+07
-2.08447e+10
3.2544e+07
1.00287e+08
-2.07498e+10
3.3342e+07
2.02836e+08
-2.06654e+10
3.58034e+07
2.96207e+08
-2.06021e+10
3.96595e+07
3.82268e+08
-2.05725e+10
4.50806e+07
4.62465e+08
-2.05907e+10
5.1712e+07
5.37758e+08
-2.06653e+10
5.76013e+07
6.09231e+08
-2.08023e+10
6.20221e+07
6.76924e+08
-2.10134e+10
6.71289e+07
7.43918e+08
-2.13078e+10
7.42541e+07
8.11599e+08
-2.16923e+10
8.15447e+07
8.83432e+08
-2.21668e+10
8.65952e+07
9.57343e+08
-2.27321e+10
8.73452e+07
1.03123e+09
-2.33912e+10
7.92652e+07
1.09052e+09
-2.41087e+10
4.75708e+07
1.07854e+09
-2.48994e+10
-8.70698e+06
9.45202e+08
-2.56971e+10
-6.012e+07
5.14807e+08
-2.69606e+10
-2.33092e+08
1.14026e+08
-2.89449e+10
-1.07852e+09
-1.25876e+09
-3.7785e+10
-2.86788e+09
-2.83672e+09
4.17089e+08
8.40357e+08
-2.31053e+10
1.42591e+08
-2.44323e+10
1.6045e+08
-2.51919e+10
2.37539e+08
-2.57438e+10
1.73133e+07
-2.62999e+10
-5.05253e+07
-2.67617e+10
-1.2548e+08
-2.70841e+10
-1.64443e+08
-2.7268e+10
-1.13244e+08
-2.73604e+10
-4.50635e+07
-2.74078e+10
2.88862e+07
-2.74462e+10
9.45159e+07
-2.74975e+10
1.45124e+08
-2.75734e+10
1.7536e+08
-2.76763e+10
1.82844e+08
-2.78055e+10
1.60755e+08
-2.79552e+10
1.08711e+08
-2.81211e+10
2.97973e+07
-2.82867e+10
-9.27586e+07
-2.84101e+10
-3.01667e+08
-2.84327e+10
-6.16884e+08
-2.83288e+10
-9.83534e+08
-2.81771e+10
-1.28033e+09
-2.79682e+10
-1.69977e+09
-2.72486e+10
-2.64733e+09
-2.62832e+10
-2.92749e+09
-2.5807e+10
-2.07083e+09
-2.55649e+10
-1.50132e+09
-2.54067e+10
-1.11447e+09
-2.53067e+10
-7.92388e+08
-2.52233e+10
-5.47702e+08
-2.51336e+10
-3.55745e+08
-2.50242e+10
-2.05472e+08
-2.48916e+10
-8.16475e+07
-2.47361e+10
2.57892e+07
-2.45606e+10
1.23342e+08
-2.43712e+10
2.14999e+08
-2.41747e+10
3.02667e+08
-2.39798e+10
3.8788e+08
-2.37985e+10
4.72764e+08
-2.36441e+10
5.57973e+08
-2.3528e+10
6.4339e+08
-2.34565e+10
7.31552e+08
-2.34274e+10
8.24331e+08
-2.34413e+10
9.26582e+08
-2.34976e+10
1.03807e+09
-2.36004e+10
1.15698e+09
-2.37686e+10
1.27934e+09
-2.40677e+10
1.3868e+09
-2.46527e+10
1.43341e+09
-2.58668e+10
1.24721e+09
-2.95312e+10
1.27335e+09
-3.77847e+10
6.67288e+08
-5.46463e+10
4.60919e+08
1.24705e+08
-2.29165e+10
3.78713e+07
1.27241e+09
-2.3798e+10
-1.27487e+08
1.10046e+09
-2.45931e+10
-9.65538e+07
7.85884e+08
-2.53358e+10
-6.14101e+07
6.24158e+08
-2.59752e+10
-8.43941e+07
5.13199e+08
-2.65568e+10
-1.35911e+08
4.44819e+08
-2.70674e+10
-1.59945e+08
4.06003e+08
-2.74872e+10
-1.45533e+08
4.02122e+08
-2.78264e+10
-1.18127e+08
4.14576e+08
-2.81082e+10
-9.42408e+07
4.34381e+08
-2.83523e+10
-7.91384e+07
4.54685e+08
-2.85761e+10
-7.1341e+07
4.69403e+08
-2.87883e+10
-6.82329e+07
4.67946e+08
-2.89906e+10
-6.83602e+07
4.42903e+08
-2.91796e+10
-7.17253e+07
3.88428e+08
-2.9353e+10
-7.74436e+07
3.09285e+08
-2.95308e+10
-7.98351e+07
2.27005e+08
-2.97162e+10
-7.03967e+07
1.0314e+08
-2.98537e+10
-6.43888e+07
-1.42342e+08
-2.98483e+10
-8.98786e+07
-5.31669e+08
-2.9593e+10
-1.45539e+08
-1.04465e+09
-2.90947e+10
-1.87154e+08
-1.54347e+09
-2.86881e+10
-1.56791e+08
-1.98932e+09
-2.72179e+10
-1.83415e+08
-9.29958e+08
-1.08634e+09
-9.42762e+08
-1.04915e+09
-2.50802e+10
-1.40491e+08
-1.36762e+09
-1.1739e+09
-1.34478e+09
-1.15021e+09
-2.41724e+10
-1.06749e+07
-3.09348e+09
-2.38706e+10
8.81772e+07
-1.98542e+09
-2.38034e+10
1.27325e+08
-1.34811e+09
-2.38807e+10
1.53202e+08
-8.57994e+08
-2.39865e+10
1.71975e+08
-5.69328e+08
-2.40893e+10
1.87342e+08
-3.70369e+08
-2.41767e+10
2.01072e+08
-2.30867e+08
-2.42472e+10
2.13388e+08
-1.22286e+08
-2.4301e+10
2.24368e+08
-3.3083e+07
-2.43391e+10
2.34331e+08
4.43344e+07
-2.43627e+10
2.43234e+08
1.13752e+08
-2.43733e+10
2.50872e+08
1.77684e+08
-2.43727e+10
2.56928e+08
2.37296e+08
-2.43622e+10
2.61245e+08
2.937e+08
-2.43415e+10
2.63147e+08
3.46934e+08
-2.4308e+10
2.62142e+08
3.97423e+08
-2.42537e+10
2.58182e+08
4.44813e+08
-2.41668e+10
2.51372e+08
4.89248e+08
-2.40276e+10
2.40636e+08
5.28655e+08
-2.38122e+10
2.24783e+08
5.58059e+08
-2.3494e+10
2.02398e+08
5.71519e+08
-2.30847e+10
1.76297e+08
5.84084e+08
-2.26551e+10
1.47932e+08
5.81469e+08
-2.23887e+10
1.6497e+08
5.70779e+08
-2.26901e+10
2.42047e+08
5.34413e+08
-2.29231e+10
2.45565e+08
5.24245e+07
-2.25783e+10
-3.49104e+08
-1.34733e+09
-2.11444e+10
-7.64901e+08
-3.57663e+09
-5.67651e+08
-3.20465e+09
-2.03327e+10
1.17712e+09
-2.14209e+10
1.13814e+09
-2.2325e+10
1.06054e+09
-2.32475e+10
8.9137e+08
-2.41471e+10
7.75415e+08
-2.50317e+10
6.34292e+08
-2.58934e+10
5.51646e+08
-2.66544e+10
5.20956e+08
-2.73103e+10
5.14809e+08
-2.78797e+10
5.25837e+08
-2.83839e+10
5.36497e+08
-2.88371e+10
5.34354e+08
-2.92469e+10
5.1275e+08
-2.96181e+10
4.70849e+08
-2.99565e+10
4.05454e+08
-3.02692e+10
3.2009e+08
-3.05816e+10
2.44667e+08
-3.09303e+10
1.7835e+08
-3.12828e+10
-1.20319e+07
-3.1519e+10
-4.6969e+08
-3.14755e+10
-1.17704e+09
-3.10372e+10
-1.90097e+09
-3.08599e+10
-2.03042e+09
-2.97635e+10
-8.72317e+08
-1.0251e+09
-9.65952e+08
-1.05978e+09
-2.80598e+10
-1.28716e+09
-1.0657e+09
-1.32033e+09
-1.0871e+09
-2.74665e+10
-2.65539e+09
-2.73981e+10
-1.4609e+09
-2.75149e+10
-8.5408e+08
-2.7729e+10
-4.09238e+08
-2.7936e+10
-1.52551e+08
-2.81089e+10
2.1005e+07
-2.82355e+10
1.38993e+08
-2.83139e+10
2.26968e+08
-2.83428e+10
2.95733e+08
-2.8321e+10
3.51873e+08
-2.82466e+10
3.98635e+08
-2.81185e+10
4.38031e+08
-2.79366e+10
4.72333e+08
-2.77002e+10
5.029e+08
-2.74081e+10
5.29569e+08
-2.70591e+10
5.52778e+08
-2.66486e+10
5.73156e+08
-2.61701e+10
5.92064e+08
-2.56131e+10
6.10012e+08
-2.4967e+10
6.25108e+08
-2.42201e+10
6.31066e+08
-2.33652e+10
6.27125e+08
-2.24359e+10
6.27405e+08
-2.14425e+10
6.00897e+08
-2.0427e+10
4.38827e+08
-1.91088e+10
1.14206e+08
-1.86146e+10
-2.21065e+08
-1.86741e+10
-2.96332e+08
-3.91755e+08
-2.03588e+10
3.53385e+07
1.9104e+09
-2.08644e+10
-9.23951e+07
1.75547e+09
-2.16462e+10
-1.24304e+08
1.74262e+09
-2.24481e+10
-2.09608e+08
1.67618e+09
-2.32622e+10
-2.70652e+08
1.62724e+09
-2.40332e+10
-3.40931e+08
1.57867e+09
-2.47352e+10
-4.01464e+08
1.53043e+09
-2.53349e+10
-4.45238e+08
1.4729e+09
-2.58433e+10
-4.59094e+08
1.41517e+09
-2.62996e+10
-4.50014e+08
1.37895e+09
-2.67171e+10
-4.37844e+08
1.34829e+09
-2.70951e+10
-4.30093e+08
1.30874e+09
-2.74472e+10
-4.17603e+08
1.25792e+09
-2.7786e+10
-3.95733e+08
1.18853e+09
-2.81102e+10
-3.73567e+08
1.09684e+09
-2.84095e+10
-3.60319e+08
9.9173e+08
-2.87742e+10
-3.45833e+08
9.88171e+08
-2.92802e+10
-2.76737e+08
9.5683e+08
-2.98714e+10
-2.05136e+08
7.1629e+08
-3.05247e+10
-2.60178e+08
4.13632e+08
-3.12339e+10
-4.64075e+08
1.41707e+08
-3.18869e+10
-7.64849e+08
-1.22839e+08
-8.19949e+09
-4.98731e+08
-1.80116e+08
-8.35814e+09
-8.23452e+09
-8.65093e+09
8.50751e+07
-1.01782e+08
2.57891e+08
-7.92603e+09
-1.63162e+08
-1.03683e+09
7.42095e+09
-6.78657e+09
-1.06705e+08
-1.88455e+09
-2.42628e+10
-3.57401e+08
-1.26368e+09
6.341e+09
6.58675e+09
6.28956e+09
6.75864e+09
-9.61272e+08
-1.26001e+09
-9.19556e+08
-2.40449e+10
-9.46061e+07
-2.08677e+09
-2.41523e+10
-1.28064e+07
-1.21597e+09
-2.42378e+10
7.6615e+06
-7.72332e+08
-2.42567e+10
2.11597e+07
-5.66279e+08
-2.42193e+10
3.22278e+07
-4.36816e+08
-2.41409e+10
4.27057e+07
-3.50831e+08
-2.4032e+10
5.25421e+07
-2.85117e+08
-2.38996e+10
6.23194e+07
-2.32104e+08
-2.37497e+10
7.22244e+07
-1.8628e+08
-2.35868e+10
8.24297e+07
-1.45121e+08
-2.3416e+10
9.31242e+07
-1.0692e+08
-2.32425e+10
1.05451e+08
-7.10085e+07
-2.30726e+10
1.20188e+08
-3.72834e+07
-2.29116e+10
1.37568e+08
-5.30048e+06
-2.27652e+10
1.58193e+08
2.53504e+07
-2.26384e+10
1.83842e+08
5.44808e+07
-2.25361e+10
2.16132e+08
8.18021e+07
-2.24639e+10
2.56533e+08
1.04896e+08
-2.24239e+10
3.04804e+08
1.14134e+08
-2.23968e+10
3.55194e+08
8.49284e+07
-2.23525e+10
4.12487e+08
1.15527e+07
-2.22649e+10
4.822e+08
-1.29176e+08
-2.2071e+10
5.70977e+08
-3.88452e+08
-2.14687e+10
6.1158e+08
-9.0414e+08
-2.09799e+10
9.96249e+08
-1.71184e+09
-2.23599e+10
2.03115e+09
-2.2566e+09
-2.45418e+10
3.74322e+09
-5.25487e+09
1.94391e+09
-1.44211e+09
-1.57011e+10
1.1469e+09
-1.57501e+10
1.13536e+09
-1.60189e+10
1.24353e+09
-1.65144e+10
1.20973e+09
-1.71017e+10
1.11772e+09
-1.78167e+10
1.03027e+09
-1.86106e+10
9.66464e+08
-1.94131e+10
9.04283e+08
-2.01674e+10
8.40552e+08
-2.08387e+10
7.80201e+08
-2.14287e+10
7.20247e+08
-2.19626e+10
6.64044e+08
-2.24582e+10
6.09022e+08
-2.29171e+10
5.47503e+08
-2.33506e+10
4.80825e+08
-2.37623e+10
4.00678e+08
-2.41698e+10
3.6167e+08
-2.47358e+10
5.62976e+08
-2.55458e+10
6.73202e+08
-2.66433e+10
4.01583e+08
-2.83071e+10
4.56465e+07
-2.99402e+10
-1.02907e+09
-8.34436e+09
-4.29394e+08
-8.1319e+09
-8.39306e+09
-7.51577e+09
4.61802e+07
-1.13161e+08
4.04322e+08
1.49317e+08
-8.355e+09
2.46296e+07
-1.04136e+09
1.67316e+08
8.02485e+09
-7.48868e+09
-5.69223e+07
-1.93141e+09
-2.66801e+10
-1.21004e+09
7.11195e+09
6.9165e+09
7.12937e+09
6.64042e+09
-8.09993e+08
-1.2408e+09
-8.39226e+08
-2.65528e+10
-1.67673e+09
-2.65908e+10
-8.20893e+08
-2.66426e+10
-3.43838e+08
-2.6655e+10
-1.1493e+08
-2.6634e+10
3.47336e+07
-2.65896e+10
1.38163e+08
-2.65299e+10
2.18937e+08
-2.64602e+10
2.8547e+08
-2.63845e+10
3.42811e+08
-2.63053e+10
3.92825e+08
-2.62245e+10
4.36903e+08
-2.61415e+10
4.75618e+08
-2.60529e+10
5.08489e+08
-2.59558e+10
5.36344e+08
-2.58464e+10
5.60441e+08
-2.57177e+10
5.80994e+08
-2.55593e+10
5.98497e+08
-2.53584e+10
6.12329e+08
-2.51017e+10
6.18623e+08
-2.47822e+10
6.09886e+08
-2.43862e+10
5.79949e+08
-2.38908e+10
5.37721e+08
-2.33027e+10
4.86e+08
-2.28754e+10
4.97156e+08
-2.24151e+10
5.3522e+08
-2.1285e+10
5.71654e+08
-1.58097e+10
-2.09146e+09
-3.66596e+09
-1.50824e+10
6.29531e+07
1.35493e+09
-1.43108e+10
1.72342e+07
1.01529e+09
-1.36255e+10
-1.46617e+07
1.12037e+09
-1.29535e+10
-7.11701e+07
1.11846e+09
-1.23215e+10
-1.10228e+08
1.14068e+09
-1.17265e+10
-1.36518e+08
1.14864e+09
-1.11544e+10
-1.61421e+08
1.14567e+09
-1.05961e+10
-1.83904e+08
1.12787e+09
-1.00302e+10
-2.0515e+08
1.09311e+09
-9.41274e+09
-2.34343e+08
1.04593e+09
-8.73397e+09
-2.68308e+08
9.95787e+08
-8.03007e+09
-2.95582e+08
9.58759e+08
-7.35841e+09
-3.14025e+08
9.53144e+08
-6.77423e+09
-3.37341e+08
9.93323e+08
-6.29538e+09
-3.92821e+08
1.0814e+09
-5.78845e+09
-5.6062e+08
1.17732e+09
-4.88214e+09
-8.25668e+08
1.12895e+09
-4.40191e+09
-1.35077e+08
8.87889e+08
-5.27833e+09
1.09794e+09
6.86067e+08
-6.81884e+09
1.41924e+09
6.52054e+08
-8.5189e+09
9.70375e+08
9.24567e+08
-3.64785e+09
-1.99815e+09
1.67879e+09
-3.83986e+09
-5.17617e+08
-3.06544e+08
-4.21081e+09
-3.10209e+08
6.86326e+08
1.74761e+08
1.43822e+09
-1.47159e+09
-7.83412e+07
-6.41662e+07
1.45518e+09
5.30875e+08
-1.50461e+09
-5.25317e+07
-1.58795e+08
-6.34242e+07
-1.25466e+08
-8.07031e+07
1.36079e+09
-5.56491e+09
7.92175e+07
-1.35251e+09
1.56671e+09
1.18829e+09
1.46973e+09
-2.53725e+10
-5.26268e+08
1.65132e+08
5.8161e+09
6.04459e+09
5.78613e+09
6.02502e+09
-2.61062e+10
-4.71354e+08
5.43034e+06
-2.64394e+10
-4.56252e+08
2.65017e+07
-2.65857e+10
-4.5945e+08
4.36571e+07
-2.66232e+10
-4.64801e+08
6.59753e+07
-2.65945e+10
-4.71108e+08
8.90904e+07
-2.65192e+10
-4.77454e+08
1.1148e+08
-2.64106e+10
-4.82968e+08
1.33518e+08
-2.62772e+10
-4.87201e+08
1.54599e+08
-2.61255e+10
-4.89803e+08
1.75188e+08
-2.59617e+10
-4.90269e+08
1.95232e+08
-2.57919e+10
-4.87806e+08
2.14745e+08
-2.56227e+10
-4.82447e+08
2.33253e+08
-2.54597e+10
-4.73432e+08
2.50621e+08
-2.53081e+10
-4.59584e+08
2.65973e+08
-2.51713e+10
-4.39306e+08
2.77818e+08
-2.50517e+10
-4.11283e+08
2.83436e+08
-2.49522e+10
-3.73978e+08
2.79658e+08
-2.48812e+10
-3.26926e+08
2.59802e+08
-2.48672e+10
-2.6946e+08
2.15473e+08
-2.49516e+10
-1.97212e+08
1.4583e+08
-2.52039e+10
-1.09944e+08
5.09155e+07
-2.57593e+10
1.07405e+07
-7.74812e+07
-2.69537e+10
3.02081e+08
-3.22878e+08
-2.93948e+10
8.8278e+08
-5.31334e+08
-3.29471e+10
1.56174e+09
-6.4941e+08
-3.77668e+10
3.73759e+09
-4.44866e+09
9.58293e+08
1.02009e+10
-1.55739e+10
4.85728e+08
-1.45533e+10
1.6659e+08
-1.34674e+10
1.75381e+08
-1.23974e+10
9.65183e+07
-1.13791e+10
1.17098e+07
-1.04026e+10
-6.48082e+07
-9.44292e+09
-1.38293e+08
-8.49033e+09
-2.13795e+08
-7.53407e+09
-2.97196e+08
-6.57305e+09
-3.85467e+08
-5.61539e+09
-4.72712e+08
-4.66823e+09
-5.47249e+08
-3.75583e+09
-5.90319e+08
-2.93802e+09
-5.805e+08
-2.30745e+09
-5.00913e+08
-2.03822e+09
-3.51311e+08
-2.10475e+09
-2.4722e+08
-1.01613e+09
-4.63898e+08
1.73904e+09
-8.50256e+08
4.64177e+09
-1.0146e+09
6.17625e+09
-4.97864e+08
-1.53425e+09
1.78337e+09
-1.24805e+09
2.17065e+09
1.98085e+09
6.53652e+08
-3.052e+09
-2.67617e+08
6.92975e+08
8.75155e+07
2.09222e+08
1.39671e+09
-1.62176e+09
-3.57416e+07
-3.61338e+07
2.65242e+07
2.11607e+09
7.17473e+08
-2.15731e+09
-1.39542e+07
-1.96062e+08
-1.42478e+08
-1.87894e+08
-1.54147e+08
1.77113e+09
2.70815e+08
-6.65775e+09
-3.33957e+08
-1.18236e+09
1.71523e+09
1.62646e+09
1.59388e+09
-2.91658e+10
1.99007e+08
6.96758e+09
6.82422e+09
6.60905e+09
6.39538e+09
-3.04005e+10
-4.22074e+07
-3.11435e+10
-5.01238e+07
-3.16634e+10
-5.27305e+07
-3.20445e+10
-5.06911e+07
-3.23349e+10
-4.71104e+07
-3.2556e+10
-4.45761e+07
-3.27208e+10
-4.28064e+07
-3.28361e+10
-4.2458e+07
-3.29077e+10
-4.28395e+07
-3.29396e+10
-4.38976e+07
-3.29347e+10
-4.56806e+07
-3.28969e+10
-4.77551e+07
-3.28285e+10
-4.97951e+07
-3.2729e+10
-5.14385e+07
-3.2596e+10
-5.23837e+07
-3.24253e+10
-5.19072e+07
-3.22116e+10
-5.0863e+07
-3.19503e+10
-5.35234e+07
-3.16413e+10
-6.33163e+07
-3.12911e+10
-7.75536e+07
-3.09022e+10
-9.51105e+07
-3.04669e+10
-1.09427e+08
-2.96889e+10
-1.94602e+08
-2.81033e+10
-4.46984e+08
-2.49744e+10
-1.31578e+09
-1.77025e+10
-5.84951e+09
-2.38375e+09
-2.3415e+10
1.83098e+08
8.03231e+08
-2.29534e+10
1.50591e+08
4.35994e+08
-2.2322e+10
1.23132e+08
3.96011e+08
-2.16094e+10
1.22818e+08
3.08513e+08
-2.08173e+10
1.29627e+08
2.38183e+08
-1.99664e+10
1.38709e+08
1.72087e+08
-1.90617e+10
1.44403e+08
1.04721e+08
-1.81108e+10
1.46812e+08
3.62384e+07
-1.71248e+10
1.47564e+08
-3.37668e+07
-1.61152e+10
1.48155e+08
-1.03692e+08
-1.50897e+10
1.49675e+08
-1.7105e+08
-1.40507e+10
1.52831e+08
-2.27544e+08
-1.29929e+10
1.58297e+08
-2.62629e+08
-1.19026e+10
1.64794e+08
-2.65684e+08
-1.07667e+10
1.70005e+08
-2.27995e+08
-9.6072e+09
1.71807e+08
-1.52048e+08
-8.59243e+09
1.91045e+08
-6.24316e+07
-8.02377e+09
3.10461e+08
3.52645e+07
-8.05251e+09
5.4348e+08
2.1472e+08
-8.64293e+09
7.15293e+08
5.67169e+08
-9.08081e+09
4.53675e+08
9.50687e+08
1.2607e+08
-6.37321e+08
8.86821e+08
9.11829e+07
-3.61859e+09
-4.20835e+09
-5.18298e+08
1.13305e+09
-4.93434e+08
4.06303e+06
8.90134e+06
-3.05601e+08
-5.65272e+07
1.53741e+08
5.95984e+07
3.88275e+07
5.27396e+07
4.43101e+07
7.4942e+08
9.09283e+07
-5.35359e+09
3.00437e+08
1.15894e+09
9.60868e+08
9.22983e+08
1.18984e+09
-2.5485e+10
-2.8443e+08
2.02169e+09
5.9168e+09
5.84271e+09
6.16447e+09
6.06031e+09
-2.62132e+10
-2.6034e+08
1.01969e+09
-2.65553e+10
-2.46444e+08
6.25753e+08
-2.67135e+10
-2.48542e+08
4.5159e+08
-2.6758e+10
-2.55571e+08
3.60832e+08
-2.6728e+10
-2.6542e+08
3.13878e+08
-2.66404e+10
-2.78079e+08
2.86579e+08
-2.6506e+10
-2.92561e+08
2.709e+08
-2.633e+10
-3.08716e+08
2.60555e+08
-2.61155e+10
-3.26646e+08
2.52965e+08
-2.58633e+10
-3.46247e+08
2.46167e+08
-2.55742e+10
-3.67912e+08
2.38896e+08
-2.52476e+10
-3.91631e+08
2.30298e+08
-2.48833e+10
-4.17119e+08
2.19093e+08
-2.44795e+10
-4.4333e+08
2.03764e+08
-2.40345e+10
-4.69228e+08
1.82033e+08
-2.35469e+10
-4.9353e+08
1.51004e+08
-2.30187e+10
-5.15466e+08
1.08816e+08
-2.24573e+10
-5.36961e+08
5.37061e+07
-2.18782e+10
-5.62682e+08
-1.26974e+07
-2.13117e+10
-5.99614e+08
-7.45701e+07
-2.08044e+10
-6.6534e+08
-1.0868e+08
-2.04575e+10
-7.33477e+08
-1.02395e+08
-2.07896e+10
-6.20836e+08
8.02503e+07
-2.22459e+10
-3.45046e+08
5.70916e+08
-2.5066e+10
-1.80559e+07
1.51281e+09
-3.91241e+10
2.83959e+09
6.13029e+09
-1.75217e+10
1.22557e+10
-2.41848e+10
3.06609e+08
-2.38385e+10
-6.80916e+06
-2.34483e+10
-7.11472e+07
-2.30125e+10
-1.99419e+08
-2.25379e+10
-3.20305e+08
-2.20176e+10
-4.37096e+08
-2.14495e+10
-5.55228e+08
-2.08355e+10
-6.7509e+08
-2.01783e+10
-8.00514e+08
-1.94787e+10
-9.30148e+08
-1.87356e+10
-1.06015e+09
-1.79426e+10
-1.18424e+09
-1.70825e+10
-1.29227e+09
-1.61288e+10
-1.37143e+09
-1.50502e+10
-1.41009e+09
-1.3818e+10
-1.40601e+09
-1.24731e+10
-1.38667e+09
-1.12086e+10
-1.39464e+09
-1.01394e+10
-1.34733e+09
-9.37396e+09
-1.0311e+09
-9.0354e+09
-3.40266e+08
3.89134e+08
1.1126e+08
3.85881e+08
-4.36806e+09
-4.34883e+09
-6.98098e+08
8.79943e+08
1.50439e+09
-7.60862e+08
-5.19445e+08
1.24511e+06
1.40562e+08
-2.80119e+08
-8.95926e+07
6.47644e+07
4.92748e+07
3.33401e+07
3.28091e+07
4.21024e+07
7.38093e+08
-3.64374e+08
-7.39513e+07
-4.22759e+09
-1.17636e+08
1.56998e+09
6.82696e+08
9.48559e+08
8.85008e+08
-1.98822e+10
2.21634e+09
4.74122e+09
4.15952e+09
4.66753e+09
4.08552e+09
-2.11176e+10
9.52411e+08
-2.18713e+10
4.65928e+08
-2.24128e+10
2.41609e+08
-2.28353e+10
1.12344e+08
-2.31845e+10
2.84489e+07
-2.34854e+10
-3.41334e+07
-2.37537e+10
-8.39345e+07
-2.3999e+10
-1.2785e+08
-2.42277e+10
-1.68731e+08
-2.44443e+10
-2.08887e+08
-2.46528e+10
-2.49343e+08
-2.48566e+10
-2.90342e+08
-2.50574e+10
-3.32708e+08
-2.52536e+10
-3.77467e+08
-2.54409e+10
-4.25158e+08
-2.56134e+10
-4.75521e+08
-2.57683e+10
-5.25943e+08
-2.59107e+10
-5.76593e+08
-2.60566e+10
-6.26145e+08
-2.62455e+10
-6.59764e+08
-2.6555e+10
-6.61515e+08
-2.7051e+10
-6.17975e+08
-2.76917e+10
-5.33766e+08
-2.87771e+10
-1.67132e+08
-3.17481e+10
1.17076e+09
-4.03056e+10
5.36745e+09
4.25616e+08
-2.88765e+10
1.09773e+08
7.19077e+08
-2.911e+10
1.30293e+08
5.6221e+08
-2.9324e+10
1.2926e+08
5.03137e+08
-2.95551e+10
1.39554e+08
4.20753e+08
-2.97913e+10
1.51198e+08
3.41717e+08
-3.00312e+10
1.63685e+08
2.64217e+08
-3.02731e+10
1.75344e+08
1.84615e+08
-3.05154e+10
1.8609e+08
1.03831e+08
-3.07568e+10
1.9686e+08
2.10235e+07
-3.09976e+10
2.08139e+08
-6.17126e+07
-3.12396e+10
2.19918e+08
-1.41284e+08
-3.14832e+10
2.32756e+08
-2.11739e+08
-3.17248e+10
2.46905e+08
-2.6565e+08
-3.19548e+10
2.6203e+08
-2.95867e+08
-3.21596e+10
2.77295e+08
-2.95593e+08
-3.23288e+10
2.91453e+08
-2.62276e+08
-3.24759e+10
3.05437e+08
-2.00009e+08
-3.26375e+10
3.28893e+08
-1.00731e+08
-3.28192e+10
3.61719e+08
7.77843e+07
-3.29437e+10
3.7304e+08
3.74459e+08
-3.29924e+10
3.21977e+08
7.41255e+08
-3.33417e+10
2.29339e+08
1.06737e+09
-8.67083e+09
2.63367e+08
1.42381e+09
-2.83507e+08
-1.32539e+08
-1.76807e+08
3.36797e+07
-8.93564e+09
-8.4782e+09
-8.33302e+09
-1.78837e+08
-8.57613e+09
4.32768e+06
7.64277e+08
-2.00647e+08
-2.13168e+08
-2.66747e+08
-4.89152e+08
8.05128e+09
-7.32944e+09
5.89622e+07
1.52479e+09
-4.85879e+08
-6.70267e+08
-6.33332e+08
-2.75689e+10
-3.8131e+08
3.13424e+09
-1.04467e+09
-8.42071e+08
-9.87778e+08
-8.12562e+08
6.97686e+09
7.32501e+09
7.13233e+09
7.17975e+09
-2.73911e+10
-3.94196e+08
2.27967e+09
-2.77147e+10
-3.4396e+08
1.71902e+09
-2.80349e+10
-3.04411e+08
1.27239e+09
-2.83037e+10
-2.82253e+08
1.01685e+09
-2.85244e+10
-2.70525e+08
8.60345e+08
-2.8709e+10
-2.65013e+08
7.6687e+08
-2.88685e+10
-2.61926e+08
7.07071e+08
-2.901e+10
-2.59271e+08
6.66256e+08
-2.91385e+10
-2.5646e+08
6.35094e+08
-2.92568e+10
-2.53286e+08
6.08178e+08
-2.93663e+10
-2.49422e+08
5.81554e+08
-2.9468e+10
-2.44408e+08
5.52405e+08
-2.95628e+10
-2.37189e+08
5.1896e+08
-2.96523e+10
-2.26756e+08
4.79522e+08
-2.97368e+10
-2.11743e+08
4.31346e+08
-2.98171e+10
-1.89729e+08
3.70895e+08
-2.98961e+10
-1.57089e+08
2.94874e+08
-2.99823e+10
-1.09619e+08
2.02297e+08
-3.00901e+10
-4.63891e+07
9.49586e+07
-3.02369e+10
3.08355e+07
-2.23363e+07
-3.04434e+10
1.16826e+08
-1.3045e+08
-3.07291e+10
1.89649e+08
-1.87693e+08
-3.1188e+10
2.76255e+08
-1.59185e+08
-3.18835e+10
4.15021e+08
4.85183e+07
-3.24985e+10
4.72703e+08
3.69553e+08
-3.2177e+10
1.98184e+08
5.97816e+08
-3.22027e+10
2.33156e+09
3.6613e+09
1.75976e+09
-5.31762e+09
-2.6627e+10
2.85203e+08
-2.66023e+10
1.1765e+08
-2.65842e+10
5.74948e+07
-2.65849e+10
-4.2906e+07
-2.65995e+10
-1.3996e+08
-2.66237e+10
-2.36277e+08
-2.66585e+10
-3.336e+08
-2.67048e+10
-4.32409e+08
-2.67638e+10
-5.34957e+08
-2.68373e+10
-6.39448e+08
-2.69266e+10
-7.43088e+08
-2.70309e+10
-8.40967e+08
-2.71449e+10
-9.26174e+08
-2.72571e+10
-9.91014e+08
-2.73516e+10
-1.02798e+09
-2.7416e+10
-1.03384e+09
-2.74582e+10
-1.01518e+09
-2.75229e+10
-9.68822e+08
-2.76287e+10
-8.37835e+08
-2.76932e+10
-5.4257e+08
-2.75735e+10
-7.98047e+07
-2.75178e+10
3.36923e+08
-7.72311e+09
5.69608e+08
-8.59406e+07
1.5597e+08
3.76515e+07
3.1546e+08
-6.74434e+09
-7.0911e+09
-6.64589e+09
-1.04735e+08
-2.89664e+08
-7.88415e+09
4.47004e+08
4.30823e+08
-1.03448e+08
-1.11914e+08
-1.07091e+08
-6.07911e+08
-1.81937e+08
7.46625e+09
-6.4526e+09
1.67366e+08
1.55591e+09
-6.21798e+08
-6.21426e+08
-6.53225e+08
-2.10483e+10
3.06904e+09
-1.12076e+09
-9.33259e+08
-1.29809e+09
-1.11646e+09
5.8288e+09
5.07134e+09
5.88707e+09
5.38368e+09
-2.11458e+10
1.95432e+09
-2.17409e+10
1.23277e+09
-2.22413e+10
6.84532e+08
-2.26341e+10
3.68936e+08
-2.29528e+10
1.72624e+08
-2.32268e+10
4.56419e+07
-2.34763e+10
-4.17651e+07
-2.37106e+10
-1.07722e+08
-2.39345e+10
-1.63178e+08
-2.41498e+10
-2.14083e+08
-2.43569e+10
-2.64415e+08
-2.45543e+10
-3.1638e+08
-2.47391e+10
-3.71022e+08
-2.49047e+10
-4.3091e+08
-2.50415e+10
-4.98026e+08
-2.51353e+10
-5.73914e+08
-2.51656e+10
-6.60736e+08
-2.51114e+10
-7.52386e+08
-2.49605e+10
-8.39611e+08
-2.4705e+10
-9.20455e+08
-2.43386e+10
-9.85503e+08
-2.38791e+10
-1.02301e+09
-2.33326e+10
-1.00427e+09
-2.26807e+10
-9.31994e+08
-2.18189e+10
-7.40871e+08
-2.09424e+10
4.16903e+08
-1.89791e+10
5.76442e+09
3.11837e+09
-2.53308e+10
8.30451e+07
6.06641e+08
-2.53719e+10
1.0493e+08
5.25237e+08
-2.54365e+10
1.14944e+08
4.78834e+08
-2.55278e+10
1.23537e+08
4.15087e+08
-2.56422e+10
1.32639e+08
3.50537e+08
-2.57779e+10
1.41224e+08
2.85892e+08
-2.59377e+10
1.48957e+08
2.21894e+08
-2.61223e+10
1.55718e+08
1.57982e+08
-2.63342e+10
1.6155e+08
9.58523e+07
-2.65751e+10
1.66629e+08
3.60504e+07
-2.68468e+10
1.71355e+08
-1.84583e+07
-2.71503e+10
1.7603e+08
-6.32916e+07
-2.74821e+10
1.80642e+08
-9.34546e+07
-2.78343e+10
1.84199e+08
-1.03588e+08
-2.81941e+10
1.85143e+08
-8.8295e+07
-2.85495e+10
1.81616e+08
-4.39608e+07
-2.88955e+10
1.72559e+08
3.11856e+07
-2.92288e+10
1.58536e+08
1.46374e+08
-2.95242e+10
1.35923e+08
3.23569e+08
-2.97128e+10
9.74291e+07
5.68821e+08
-2.97298e+10
3.52616e+07
8.31504e+08
-2.96198e+10
-4.88835e+07
1.10667e+09
-2.95974e+10
-1.18582e+08
1.59292e+09
-2.9014e+10
-2.12195e+08
2.44473e+09
-7.19612e+08
-8.23513e+08
-5.48207e+08
-6.905e+08
-2.75164e+10
-3.26424e+08
3.02861e+09
-1.11612e+09
-1.04496e+09
-1.00448e+09
-9.86026e+08
-2.66668e+10
-3.55523e+08
2.67938e+09
-2.6311e+10
-2.93372e+08
2.26858e+09
-2.62319e+10
-2.30443e+08
1.92174e+09
-2.63441e+10
-1.80357e+08
1.61087e+09
-2.65195e+10
-1.47504e+08
1.37971e+09
-2.67114e+10
-1.2793e+08
1.21499e+09
-2.69002e+10
-1.1544e+08
1.10171e+09
-2.70796e+10
-1.08545e+08
1.02211e+09
-2.72474e+10
-1.05289e+08
9.63019e+08
-2.74019e+10
-1.0442e+08
9.13869e+08
-2.75408e+10
-1.05137e+08
8.67759e+08
-2.76618e+10
-1.06814e+08
8.19408e+08
-2.77623e+10
-1.0854e+08
7.64893e+08
-2.78391e+10
-1.0892e+08
7.00303e+08
-2.78892e+10
-1.05956e+08
6.22644e+08
-2.79095e+10
-9.85159e+07
5.29174e+08
-2.78957e+10
-8.50837e+07
4.15785e+08
-2.78468e+10
-6.28878e+07
2.8109e+08
-2.77632e+10
-2.69465e+07
1.21296e+08
-2.76511e+10
2.83744e+07
-6.11853e+07
-2.75175e+10
1.03071e+08
-2.61569e+08
-2.7363e+10
1.92061e+08
-4.63021e+08
-2.71779e+10
2.71722e+08
-6.21475e+08
-2.69419e+10
3.25382e+08
-6.86654e+08
-2.64291e+10
3.17509e+08
-7.62722e+08
-2.53911e+10
2.83065e+08
-9.49766e+08
-2.49575e+10
9.08561e+08
-6.03777e+08
-3.03499e+10
5.38046e+09
3.83281e+09
2.44636e+09
2.06031e+09
-2.61244e+10
2.4554e+08
-2.6009e+10
1.24759e+08
-2.58903e+10
7.12434e+07
-2.57825e+10
-9.4225e+06
-2.56825e+10
-8.94517e+07
-2.55899e+10
-1.69901e+08
-2.55078e+10
-2.49449e+08
-2.54376e+10
-3.30104e+08
-2.53834e+10
-4.11186e+08
-2.53477e+10
-4.92518e+08
-2.5333e+10
-5.7125e+08
-2.534e+10
-6.43417e+08
-2.53657e+10
-7.04872e+08
-2.54038e+10
-7.5061e+08
-2.54468e+10
-7.75464e+08
-2.54904e+10
-7.75565e+08
-2.55417e+10
-7.48791e+08
-2.56138e+10
-6.85733e+08
-2.56956e+10
-5.56563e+08
-2.57271e+10
-3.3948e+08
-2.56331e+10
-6.2378e+07
-2.54979e+10
2.29856e+08
-2.56939e+10
6.7621e+08
-2.53503e+10
1.57154e+09
-4.19665e+08
-5.60087e+08
-4.7638e+08
-6.44821e+08
-2.38497e+10
2.253e+09
-9.56012e+08
-9.43686e+08
-1.06442e+09
-1.07713e+09
-2.2947e+10
1.84284e+09
-2.25666e+10
1.31603e+09
-2.24327e+10
9.02962e+08
-2.24463e+10
5.49014e+08
-2.24891e+10
2.91789e+08
-2.2528e+10
1.07947e+08
-2.25492e+10
-2.70798e+07
-2.25535e+10
-1.26902e+08
-2.25463e+10
-2.03674e+08
-2.25333e+10
-2.66771e+08
-2.25207e+10
-3.21496e+08
-2.25145e+10
-3.71238e+08
-2.25202e+10
-4.1822e+08
-2.25408e+10
-4.64347e+08
-2.25749e+10
-5.14146e+08
-2.26192e+10
-5.69066e+08
-2.2669e+10
-6.29214e+08
-2.2719e+10
-6.93537e+08
-2.27532e+10
-7.61081e+08
-2.27508e+10
-8.2168e+08
-2.26949e+10
-8.70061e+08
-2.25784e+10
-8.95259e+08
-2.24191e+10
-8.87149e+08
-2.22671e+10
-8.13136e+08
-2.21866e+10
-6.82872e+08
-2.21035e+10
-5.04182e+08
-2.05545e+10
-1.28694e+08
-1.33785e+10
4.02411e+09
3.08063e+09
-2.3721e+10
1.09153e+08
4.07815e+08
-2.36289e+10
1.25425e+08
3.32503e+08
-2.35616e+10
1.44789e+08
2.92234e+08
-2.35155e+10
1.58927e+08
2.3708e+08
-2.34902e+10
1.74245e+08
1.80274e+08
-2.34873e+10
1.89676e+08
1.24382e+08
-2.35075e+10
2.05712e+08
6.83238e+07
-2.35534e+10
2.22528e+08
1.35688e+07
-2.36273e+10
2.39869e+08
-3.84985e+07
-2.37326e+10
2.57438e+08
-8.5564e+07
-2.38712e+10
2.75161e+08
-1.26259e+08
-2.40438e+10
2.93209e+08
-1.57373e+08
-2.42482e+10
3.11512e+08
-1.74641e+08
-2.44769e+10
3.29402e+08
-1.74579e+08
-2.47184e+10
3.45468e+08
-1.53017e+08
-2.49599e+10
3.57877e+08
-1.07172e+08
-2.51921e+10
3.65199e+08
-3.30948e+07
-2.54026e+10
3.65926e+08
7.43411e+07
-2.55625e+10
3.57403e+08
2.24086e+08
-2.56304e+10
3.36302e+08
4.13331e+08
-2.56026e+10
3.00853e+08
6.23312e+08
-2.55327e+10
2.56206e+08
8.88763e+08
-2.53685e+10
2.02778e+08
1.30539e+09
-2.48211e+10
1.34377e+08
1.80436e+09
-2.39197e+10
8.37826e+07
2.06962e+09
-2.32604e+10
1.12251e+08
1.94397e+09
-2.28427e+10
1.7639e+08
1.71941e+09
-2.2588e+10
2.38522e+08
1.47722e+09
-2.24814e+10
2.9256e+08
1.25964e+09
-2.24707e+10
3.34041e+08
1.08044e+09
-2.25183e+10
3.64802e+08
9.40349e+08
-2.25996e+10
3.87499e+08
8.35649e+08
-2.26992e+10
4.02828e+08
7.56551e+08
-2.28051e+10
4.11706e+08
6.92533e+08
-2.29102e+10
4.14716e+08
6.36849e+08
-2.30081e+10
4.12253e+08
5.82444e+08
-2.30925e+10
4.04574e+08
5.23989e+08
-2.3157e+10
3.92001e+08
4.56562e+08
-2.31963e+10
3.75434e+08
3.76727e+08
-2.32061e+10
3.56139e+08
2.81761e+08
-2.31815e+10
3.35149e+08
1.69316e+08
-2.31197e+10
3.13505e+08
3.86521e+07
-2.3019e+10
2.92611e+08
-1.09603e+08
-2.28863e+10
2.75654e+08
-2.72067e+08
-2.2737e+10
2.66882e+08
-4.4138e+08
-2.26009e+10
2.70014e+08
-6.03467e+08
-2.25212e+10
2.9264e+08
-7.41799e+08
-2.25048e+10
3.19424e+08
-8.35181e+08
-2.24941e+10
3.18888e+08
-8.94743e+08
-2.24161e+10
2.77146e+08
-9.95202e+08
-2.22082e+10
2.71338e+08
-1.26183e+09
-2.23107e+10
7.78623e+08
-1.03085e+09
-2.59036e+10
4.69044e+09
2.93001e+09
3.27226e+09
3.39836e+09
-2.75142e+10
2.92282e+08
-2.74365e+10
1.89746e+08
-2.73517e+10
1.48665e+08
-2.72717e+10
8.77712e+07
-2.71948e+10
2.73282e+07
-2.71232e+10
-3.14301e+07
-2.70566e+10
-8.95477e+07
-2.69975e+10
-1.45703e+08
-2.69486e+10
-1.99511e+08
-2.69139e+10
-2.49563e+08
-2.68955e+10
-2.9526e+08
-2.68935e+10
-3.33805e+08
-2.69064e+10
-3.61455e+08
-2.69295e+10
-3.75612e+08
-2.69571e+10
-3.73194e+08
-2.69841e+10
-3.52298e+08
-2.7011e+10
-3.08584e+08
-2.70368e+10
-2.36535e+08
-2.70444e+10
-1.24533e+08
-2.70019e+10
2.95214e+07
-2.69018e+10
2.16586e+08
-2.68093e+10
4.55261e+08
-2.67099e+10
8.28247e+08
-2.62827e+10
1.29902e+09
-2.5498e+10
1.57438e+09
-2.49744e+10
1.45576e+09
-2.46819e+10
1.22928e+09
-2.45043e+10
9.95559e+08
-2.44184e+10
7.87329e+08
-2.43791e+10
6.1718e+08
-2.43586e+10
4.81807e+08
-2.4344e+10
3.74223e+08
-2.43288e+10
2.88204e+08
-2.43101e+10
2.15717e+08
-2.42893e+10
1.52339e+08
-2.42684e+10
9.33998e+07
-2.42497e+10
3.60957e+07
-2.42352e+10
-2.22164e+07
-2.4226e+10
-8.28484e+07
-2.42234e+10
-1.48496e+08
-2.42264e+10
-2.2071e+08
-2.42334e+10
-2.97565e+08
-2.42408e+10
-3.77294e+08
-2.42427e+10
-4.5738e+08
-2.42272e+10
-5.2931e+08
-2.41835e+10
-5.84399e+08
-2.40888e+10
-6.19252e+08
-2.3932e+10
-6.35342e+08
-2.37257e+10
-6.0696e+08
-2.35712e+10
-4.69021e+08
-2.34434e+10
-2.45659e+08
-2.27649e+10
9.97928e+07
-1.29086e+10
-1.02808e+09
-2.30111e+09
-2.35482e+10
6.40033e+07
1.98441e+08
-2.33494e+10
6.03865e+07
1.01436e+08
-2.31658e+10
7.97083e+07
5.78504e+07
-2.29854e+10
8.92028e+07
-1.42614e+06
-2.28123e+10
1.00717e+08
-5.95359e+07
-2.26467e+10
1.12157e+08
-1.16458e+08
-2.24907e+10
1.2441e+08
-1.73072e+08
-2.23483e+10
1.37619e+08
-2.26239e+08
-2.22225e+10
1.51757e+08
-2.75297e+08
-2.21157e+10
1.66746e+08
-3.18681e+08
-2.20314e+10
1.82657e+08
-3.54084e+08
-2.19733e+10
1.99894e+08
-3.77928e+08
-2.19404e+10
2.18507e+08
-3.88477e+08
-2.19282e+10
2.38247e+08
-3.82687e+08
-2.19289e+10
2.58481e+08
-3.57565e+08
-2.19358e+10
2.78008e+08
-3.09143e+08
-2.19425e+10
2.95743e+08
-2.36146e+08
-2.19413e+10
3.10173e+08
-1.36336e+08
-2.19153e+10
3.19249e+08
-8.59324e+06
-2.18447e+10
3.20857e+08
1.41732e+08
-2.17238e+10
3.12837e+08
3.09739e+08
-2.15392e+10
2.9467e+08
5.17401e+08
-2.12075e+10
2.68703e+08
7.84308e+08
-2.063e+10
2.32734e+08
1.04425e+09
-1.99044e+10
2.10319e+08
1.16927e+09
-1.92733e+10
2.20257e+08
1.13082e+09
-1.87774e+10
2.52112e+08
1.02109e+09
-1.84118e+10
2.90046e+08
8.78946e+08
-1.81572e+10
3.28602e+08
7.37729e+08
-1.79874e+10
3.64706e+08
6.0884e+08
-1.78801e+10
3.98442e+08
4.98299e+08
-1.78163e+10
4.30574e+08
4.05575e+08
-1.77824e+10
4.61311e+08
3.26395e+08
-1.77709e+10
4.91306e+08
2.55379e+08
-1.77757e+10
5.2075e+08
1.87061e+08
-1.77938e+10
5.49454e+08
1.17108e+08
-1.7822e+10
5.77263e+08
4.02608e+07
-1.78573e+10
6.03844e+08
-4.82987e+07
-1.78942e+10
6.28961e+08
-1.53846e+08
-1.79262e+10
6.5274e+08
-2.79446e+08
-1.79455e+10
6.761e+08
-4.27299e+08
-1.79423e+10
6.99897e+08
-5.98458e+08
-1.79047e+10
7.24085e+08
-7.91158e+08
-1.78227e+10
7.48743e+08
-9.98189e+08
-1.76905e+10
7.74576e+08
-1.20868e+09
-1.75068e+10
8.03208e+08
-1.40816e+09
-1.72606e+10
8.38375e+08
-1.60025e+09
-1.69223e+10
8.66048e+08
-1.78541e+09
-1.64814e+10
8.81329e+08
-1.94815e+09
-1.61562e+10
9.57755e+08
-2.00627e+09
-1.63088e+10
1.2563e+09
-2.06317e+09
-1.70361e+10
2.65591e+09
-2.63025e+09
-1.32416e+10
4.15556e+09
-4.71392e+09
2.17317e+09
-1.50227e+09
-2.88571e+10
3.41587e+08
-2.88295e+10
2.39851e+08
-2.87839e+10
2.00749e+08
-2.87345e+10
1.46735e+08
-2.868e+10
9.41802e+07
-2.86212e+10
4.39812e+07
-2.85579e+10
-5.51405e+06
-2.8492e+10
-5.04329e+07
-2.84254e+10
-9.0727e+07
-2.83593e+10
-1.25637e+08
-2.82961e+10
-1.53315e+08
-2.82379e+10
-1.70314e+08
-2.81832e+10
-1.75303e+08
-2.8129e+10
-1.65723e+08
-2.80715e+10
-1.39546e+08
-2.80108e+10
-9.32099e+07
-2.79467e+10
-2.60225e+07
-2.78785e+10
6.42634e+07
-2.77992e+10
1.80321e+08
-2.77008e+10
3.20588e+08
-2.75879e+10
4.81715e+08
-2.74565e+10
6.78351e+08
-2.72448e+10
9.21127e+08
-2.68485e+10
1.16418e+09
-2.63368e+10
1.29256e+09
-2.5912e+10
1.27491e+09
-2.55929e+10
1.19006e+09
-2.53554e+10
1.07861e+09
-2.51778e+10
9.69949e+08
-2.5038e+10
8.74274e+08
-2.49207e+10
7.95364e+08
-2.48153e+10
7.31917e+08
-2.47146e+10
6.81511e+08
-2.46144e+10
6.39743e+08
-2.45102e+10
6.01805e+08
-2.44004e+10
5.65647e+08
-2.42826e+10
5.27573e+08
-2.41545e+10
4.84509e+08
-2.40113e+10
4.32694e+08
-2.38491e+10
3.70968e+08
-2.36616e+10
2.97562e+08
-2.34374e+10
2.11505e+08
-2.3164e+10
1.14564e+08
-2.28315e+10
1.28626e+07
-2.24266e+10
-8.78593e+07
-2.19374e+10
-1.78124e+08
-2.13511e+10
-2.56384e+08
-2.06822e+10
-3.15055e+08
-1.99745e+10
-3.08997e+08
-1.91618e+10
-2.00408e+08
-1.79083e+10
-1.10519e+08
-1.35571e+10
-1.44397e+09
-7.6423e+09
-2.68144e+09
-2.30552e+08
-2.53223e+10
1.18694e+07
8.05601e+07
-2.51674e+10
-6.78544e+06
-1.98775e+07
-2.50184e+10
7.84948e+06
-7.09389e+07
-2.48664e+10
1.22301e+07
-1.35596e+08
-2.47119e+10
1.84966e+07
-1.9984e+08
-2.45538e+10
2.47108e+07
-2.63717e+08
-2.43928e+10
3.15547e+07
-3.27933e+08
-2.42295e+10
3.9141e+07
-3.89286e+08
-2.40652e+10
4.73688e+07
-4.46932e+08
-2.3901e+10
5.60343e+07
-4.99128e+08
-2.37384e+10
6.5072e+07
-5.43302e+08
-2.35786e+10
7.47103e+07
-5.75909e+08
-2.34209e+10
8.51848e+07
-5.95075e+08
-2.32619e+10
9.63081e+07
-5.97657e+08
-2.3097e+10
1.0753e+08
-5.79688e+08
-2.29227e+10
1.18334e+08
-5.3745e+08
-2.27376e+10
1.28434e+08
-4.70512e+08
-2.25428e+10
1.37229e+08
-3.77257e+08
-2.23365e+10
1.44302e+08
-2.60348e+08
-2.21197e+10
1.50026e+08
-1.22058e+08
-2.1898e+10
1.53895e+08
3.48279e+07
-2.16614e+10
1.54007e+08
2.15135e+08
-2.13617e+10
1.47036e+08
4.08925e+08
-2.09744e+10
1.36903e+08
5.70092e+08
-2.05533e+10
1.30353e+08
6.53258e+08
-2.01755e+10
1.36271e+08
6.52544e+08
-1.98594e+10
1.48686e+08
5.94959e+08
-1.96028e+10
1.62273e+08
5.01401e+08
-1.93899e+10
1.74933e+08
3.92713e+08
-1.92051e+10
1.84795e+08
2.82468e+08
-1.90337e+10
1.91794e+08
1.78001e+08
-1.88659e+10
1.9735e+08
8.28571e+07
-1.86985e+10
2.02257e+08
-1.55182e+06
-1.8533e+10
2.06805e+08
-7.62163e+07
-1.83736e+10
2.11235e+08
-1.44356e+08
-1.82271e+10
2.15919e+08
-2.08054e+08
-1.81018e+10
2.21081e+08
-2.71785e+08
-1.80077e+10
2.26665e+08
-3.38485e+08
-1.79545e+10
2.32526e+08
-4.13499e+08
-1.79522e+10
2.38674e+08
-4.98732e+08
-1.80091e+10
2.44861e+08
-5.95918e+08
-1.81289e+10
2.50024e+08
-7.06764e+08
-1.83088e+10
2.52732e+08
-8.32171e+08
-1.85369e+10
2.51673e+08
-9.70231e+08
-1.87867e+10
2.44396e+08
-1.12301e+09
-1.90198e+10
2.30006e+08
-1.29099e+09
-1.92037e+10
2.10119e+08
-1.4827e+09
-1.93167e+10
1.83488e+08
-1.69283e+09
-1.93473e+10
1.89296e+08
-1.94402e+09
-1.92672e+10
3.10981e+08
-2.23432e+09
-1.93478e+10
7.73522e+08
-2.59715e+09
-2.02734e+10
1.40496e+09
-2.88581e+09
-2.37796e+10
4.56034e+09
-5.67252e+09
3.10975e+09
-1.42883e+09
-3.05021e+10
4.40897e+08
-3.06127e+10
3.61956e+08
-3.07067e+10
3.21515e+08
-3.08015e+10
2.73962e+08
-3.08935e+10
2.26318e+08
-3.09825e+10
1.80709e+08
-3.10674e+10
1.35204e+08
-3.11476e+10
9.39208e+07
-3.12231e+10
5.7257e+07
-3.12939e+10
2.6106e+07
-3.13608e+10
2.60854e+06
-3.14241e+10
-9.40896e+06
-3.14824e+10
-8.45106e+06
-3.15327e+10
7.21893e+06
-3.15725e+10
4.00917e+07
-3.16008e+10
9.35698e+07
-3.16179e+10
1.66863e+08
-3.16253e+10
2.6185e+08
-3.16209e+10
3.76453e+08
-3.16012e+10
5.07174e+08
-3.15642e+10
6.52485e+08
-3.15093e+10
8.19402e+08
-3.14086e+10
1.00436e+09
-3.12506e+10
1.16492e+09
-3.10687e+10
1.26043e+09
-3.09203e+10
1.28115e+09
-3.08159e+10
1.25351e+09
-3.07513e+10
1.19609e+09
-3.07136e+10
1.12717e+09
-3.06929e+10
1.05832e+09
-3.068e+10
9.93833e+08
-3.06681e+10
9.36243e+08
-3.06524e+10
8.8626e+08
-3.06313e+10
8.42624e+08
-3.06039e+10
8.01531e+08
-3.057e+10
7.61989e+08
-3.05289e+10
7.19817e+08
-3.04814e+10
6.7346e+08
-3.04271e+10
6.18013e+08
-3.03656e+10
5.52732e+08
-3.02958e+10
4.75822e+08
-3.02152e+10
3.85037e+08
-3.01188e+10
2.79006e+08
-2.99974e+10
1.5908e+08
-2.98354e+10
2.13572e+07
-2.96067e+10
-1.38337e+08
-2.92798e+10
-3.25426e+08
-2.88284e+10
-5.32251e+08
-2.81351e+10
-7.65431e+08
-2.69506e+10
-1.03432e+09
-2.47134e+10
-1.52837e+09
-2.24077e+10
-2.30448e+09
-1.44958e+10
-6.05106e+09
-2.71198e+09
-2.70471e+10
-5.98973e+07
1.29731e+08
-2.70152e+10
-8.58724e+07
6.44945e+07
-2.69907e+10
-7.89861e+07
1.51208e+07
-2.69713e+10
-7.95437e+07
-4.18493e+07
-2.69554e+10
-7.87966e+07
-1.00731e+08
-2.69423e+10
-7.78954e+07
-1.60093e+08
-2.69315e+10
-7.65035e+07
-2.21099e+08
-2.69227e+10
-7.44276e+07
-2.80763e+08
-2.69158e+10
-7.16511e+07
-3.38461e+08
-2.69101e+10
-6.82501e+07
-3.92812e+08
-2.69058e+10
-6.40473e+07
-4.41012e+08
-2.69013e+10
-5.84319e+07
-4.81142e+08
-2.68955e+10
-5.08002e+07
-5.09558e+08
-2.68835e+10
-4.11375e+07
-5.24626e+08
-2.68597e+10
-2.9686e+07
-5.21761e+08
-2.68176e+10
-1.63721e+07
-4.99915e+08
-2.67564e+10
-1.476e+06
-4.56238e+08
-2.66753e+10
1.42697e+07
-3.91259e+08
-2.65763e+10
3.08162e+07
-3.05749e+08
-2.64611e+10
4.71449e+07
-2.01593e+08
-2.63324e+10
6.19116e+07
-7.83911e+07
-2.61823e+10
7.43032e+07
5.96434e+07
-2.59968e+10
8.49679e+07
1.94559e+08
-2.57793e+10
9.26626e+07
3.01936e+08
-2.55553e+10
1.01729e+08
3.59748e+08
-2.53479e+10
1.103e+08
3.61765e+08
-2.51639e+10
1.18166e+08
3.1806e+08
-2.50043e+10
1.2489e+08
2.41309e+08
-2.48625e+10
1.29754e+08
1.44484e+08
-2.47292e+10
1.32632e+08
3.84073e+07
-2.45977e+10
1.34871e+08
-6.85717e+07
-2.44638e+10
1.37913e+08
-1.71777e+08
-2.43223e+10
1.4216e+08
-2.71161e+08
-2.41716e+10
1.479e+08
-3.64547e+08
-2.40132e+10
1.5543e+08
-4.52494e+08
-2.38484e+10
1.65025e+08
-5.37614e+08
-2.36825e+10
1.7694e+08
-6.20762e+08
-2.35197e+10
1.91171e+08
-7.05921e+08
-2.33683e+10
2.0775e+08
-7.94566e+08
-2.32362e+10
2.26867e+08
-8.88261e+08
-2.3133e+10
2.48575e+08
-9.85915e+08
-2.3067e+10
2.72339e+08
-1.0882e+09
-2.30429e+10
2.97249e+08
-1.19694e+09
-2.30611e+10
3.22321e+08
-1.31265e+09
-2.31137e+10
3.45793e+08
-1.44506e+09
-2.31931e+10
3.69797e+08
-1.60125e+09
-2.33044e+10
4.03577e+08
-1.79078e+09
-2.34826e+10
4.58046e+08
-1.99796e+09
-2.37946e+10
5.75172e+08
-2.25872e+09
-2.43619e+10
8.41784e+08
-2.6088e+09
-2.54201e+10
1.36872e+09
-3.03292e+09
-2.71728e+10
2.27826e+09
-3.55861e+09
-3.32625e+10
4.82048e+09
-4.56273e+09
1.47148e+09
7.00697e+09
-3.06797e+10
5.35902e+08
-3.08889e+10
5.05186e+08
-3.10945e+10
4.68983e+08
-3.13117e+10
4.33667e+08
-3.15365e+10
3.95917e+08
-3.17681e+10
3.59536e+08
-3.20054e+10
3.22217e+08
-3.22469e+10
2.88065e+08
-3.24915e+10
2.57669e+08
-3.27385e+10
2.31932e+08
-3.29872e+10
2.13433e+08
-3.3234e+10
2.03996e+08
-3.34754e+10
2.07309e+08
-3.37052e+10
2.23619e+08
-3.39183e+10
2.56419e+08
-3.41075e+10
3.05724e+08
-3.42709e+10
3.7375e+08
-3.44057e+10
4.59228e+08
-3.45097e+10
5.60324e+08
-3.45835e+10
6.75744e+08
-3.46343e+10
8.07494e+08
-3.46553e+10
9.54183e+08
-3.46376e+10
1.09941e+09
-3.45768e+10
1.22096e+09
-3.44924e+10
1.29581e+09
-3.44072e+10
1.32201e+09
-3.43301e+10
1.30941e+09
-3.42639e+10
1.26904e+09
-3.42055e+10
1.21203e+09
-3.41493e+10
1.14734e+09
-3.40904e+10
1.08133e+09
-3.40249e+10
1.0187e+09
-3.39466e+10
9.58461e+08
-3.3852e+10
9.02162e+08
-3.37396e+10
8.48393e+08
-3.36054e+10
7.93744e+08
-3.34485e+10
7.37518e+08
-3.32655e+10
6.75364e+08
-3.30563e+10
6.06249e+08
-3.28191e+10
5.27932e+08
-3.25527e+10
4.40354e+08
-3.22558e+10
3.41268e+08
-3.19253e+10
2.27509e+08
-3.15563e+10
9.80316e+07
-3.11441e+10
-5.39216e+07
-3.06814e+10
-2.35015e+08
-3.0152e+10
-4.53967e+08
-2.95128e+10
-7.21758e+08
-2.86606e+10
-1.06586e+09
-2.72902e+10
-1.6048e+09
-2.51219e+10
-2.39971e+09
-2.12389e+10
-4.03019e+09
-1.60512e+10
-6.49511e+09
-1.75805e+09
-2.66069e+10
-9.83481e+07
2.0888e+08
-2.65738e+10
-1.2204e+08
1.81812e+08
-2.65532e+10
-1.23013e+08
1.47218e+08
-2.6544e+10
-1.27351e+08
1.07882e+08
-2.65451e+10
-1.31544e+08
6.57253e+07
-2.65567e+10
-1.35761e+08
2.34692e+07
-2.65796e+10
-1.40135e+08
-1.96729e+07
-2.66136e+10
-1.44428e+08
-6.23271e+07
-2.66595e+10
-1.48643e+08
-1.02945e+08
-2.67192e+10
-1.52877e+08
-1.3926e+08
-2.67923e+10
-1.5697e+08
-1.7122e+08
-2.68788e+10
-1.60252e+08
-1.96577e+08
-2.69755e+10
-1.62098e+08
-2.13481e+08
-2.70785e+10
-1.62518e+08
-2.18889e+08
-2.71786e+10
-1.61591e+08
-2.12448e+08
-2.72702e+10
-1.59023e+08
-1.91803e+08
-2.73478e+10
-1.54961e+08
-1.57073e+08
-2.74071e+10
-1.50025e+08
-1.09537e+08
-2.74438e+10
-1.445e+08
-5.07626e+07
-2.74526e+10
-1.38363e+08
1.79208e+07
-2.74274e+10
-1.31807e+08
9.62615e+07
-2.73629e+10
-1.2457e+08
1.80097e+08
-2.72604e+10
-1.17921e+08
2.62926e+08
-2.71323e+10
-1.11318e+08
3.30209e+08
-2.69965e+10
-1.07651e+08
3.66751e+08
-2.68674e+10
-1.05711e+08
3.68976e+08
-2.6758e+10
-1.05055e+08
3.41532e+08
-2.66751e+10
-1.05798e+08
2.89671e+08
-2.66195e+10
-1.07553e+08
2.2024e+08
-2.65918e+10
-1.09586e+08
1.42284e+08
-2.65913e+10
-1.11004e+08
6.19564e+07
-2.66175e+10
-1.10741e+08
-1.7326e+07
-2.66728e+10
-1.08428e+08
-9.29756e+07
-2.6757e+10
-1.04234e+08
-1.65573e+08
-2.68688e+10
-9.80243e+07
-2.36685e+08
-2.70095e+10
-8.94963e+07
-3.07244e+08
-2.71803e+10
-7.84315e+07
-3.77902e+08
-2.73861e+10
-6.50262e+07
-4.49461e+08
-2.76318e+10
-4.91801e+07
-5.2258e+08
-2.7927e+10
-3.11753e+07
-5.93971e+08
-2.82786e+10
-1.17699e+07
-6.6259e+08
-2.86959e+10
7.91533e+06
-7.24831e+08
-2.91865e+10
2.73323e+07
-7.81339e+08
-2.97555e+10
4.59095e+07
-8.34258e+08
-3.04155e+10
6.30412e+07
-8.88386e+08
-3.11777e+10
8.0407e+07
-9.58363e+08
-3.20603e+10
1.04472e+08
-1.06288e+09
-3.31238e+10
1.51854e+08
-1.16418e+09
-3.45064e+10
2.76329e+08
-1.28136e+09
-3.62441e+10
4.81002e+08
-1.54457e+09
-3.82425e+10
8.48796e+08
-2.13714e+09
-4.00803e+10
1.26855e+09
-3.29243e+09
-4.37942e+10
2.70839e+09
-3.82082e+09
-3.19023e+09
-1.25956e+10
-2.7923e+10
5.26038e+08
-2.80511e+10
5.30786e+08
-2.81908e+10
5.06061e+08
-2.83456e+10
4.8276e+08
-2.85135e+10
4.55367e+08
-2.86937e+10
4.28695e+08
-2.88866e+10
4.011e+08
-2.90905e+10
3.74614e+08
-2.93047e+10
3.50946e+08
-2.95305e+10
3.32266e+08
-2.97659e+10
3.18351e+08
-3.00082e+10
3.11589e+08
-3.02513e+10
3.14002e+08
-3.04905e+10
3.28627e+08
-3.07174e+10
3.55248e+08
-3.09264e+10
3.95521e+08
-3.1112e+10
4.49259e+08
-3.12706e+10
5.15502e+08
-3.13994e+10
5.92556e+08
-3.14958e+10
6.79588e+08
-3.1554e+10
7.77121e+08
-3.15674e+10
8.78181e+08
-3.15279e+10
9.76217e+08
-3.14454e+10
1.05337e+09
-3.13353e+10
1.09994e+09
-3.1214e+10
1.11504e+09
-3.10959e+10
1.10424e+09
-3.09891e+10
1.07317e+09
-3.08961e+10
1.02719e+09
-3.08169e+10
9.73288e+08
-3.07494e+10
9.16477e+08
-3.06878e+10
8.58405e+08
-3.06276e+10
8.00014e+08
-3.05633e+10
7.41172e+08
-3.04888e+10
6.80306e+08
-3.03994e+10
6.15554e+08
-3.02892e+10
5.44832e+08
-3.01542e+10
4.66144e+08
-2.99893e+10
3.77082e+08
-2.97929e+10
2.79389e+08
-2.9562e+10
1.71582e+08
-2.92979e+10
5.56242e+07
-2.90019e+10
-7.12744e+07
-2.86723e+10
-2.13912e+08
-2.83118e+10
-3.77454e+08
-2.79261e+10
-5.68285e+08
-2.75144e+10
-7.98382e+08
-2.70644e+10
-1.07667e+09
-2.64758e+10
-1.46424e+09
-2.55995e+10
-2.12631e+09
-2.40958e+10
-3.21952e+09
-2.31885e+10
-3.83164e+09
-2.67332e+10
-3.33425e+08
8.33506e+08
-2.53477e+10
-1.2032e+08
2.18822e+08
-2.51877e+10
-1.40665e+08
1.8806e+08
-2.50352e+10
-1.46065e+08
1.67559e+08
-2.48844e+10
-1.52836e+08
1.38525e+08
-2.47348e+10
-1.59898e+08
1.06814e+08
-2.45858e+10
-1.66928e+08
7.46366e+07
-2.44369e+10
-1.74279e+08
4.13615e+07
-2.42881e+10
-1.81788e+08
8.19484e+06
-2.41398e+10
-1.89492e+08
-2.2689e+07
-2.39911e+10
-1.97524e+08
-5.09417e+07
-2.38436e+10
-2.05851e+08
-7.41628e+07
-2.36968e+10
-2.14018e+08
-9.19774e+07
-2.35485e+10
-2.21299e+08
-1.02902e+08
-2.33951e+10
-2.2712e+08
-1.04268e+08
-2.32325e+10
-2.30951e+08
-9.57426e+07
-2.30577e+10
-2.32478e+08
-7.61962e+07
-2.28711e+10
-2.318e+08
-4.55507e+07
-2.26744e+10
-2.29397e+08
-5.61206e+06
-2.24697e+10
-2.25401e+08
4.23218e+07
-2.2259e+10
-2.20028e+08
9.75469e+07
-2.20402e+10
-2.14332e+08
1.57177e+08
-2.18031e+10
-2.11712e+08
2.14687e+08
-2.15344e+10
-2.12958e+08
2.62403e+08
-2.12337e+10
-2.18122e+08
2.94856e+08
-2.09138e+10
-2.23974e+08
3.12044e+08
-2.05877e+10
-2.30904e+08
3.1111e+08
-2.02679e+10
-2.3912e+08
2.94658e+08
-1.99633e+10
-2.47634e+08
2.64079e+08
-1.96794e+10
-2.56622e+08
2.23006e+08
-1.94166e+10
-2.65755e+08
1.73979e+08
-1.91737e+10
-2.74427e+08
1.20828e+08
-1.89482e+10
-2.82032e+08
6.41504e+07
-1.87351e+10
-2.87889e+08
3.49734e+06
-1.85334e+10
-2.90294e+08
-5.99178e+07
-1.83457e+10
-2.87473e+08
-1.26191e+08
-1.81764e+10
-2.78226e+08
-1.95382e+08
-1.803e+10
-2.62068e+08
-2.6924e+08
-1.79109e+10
-2.38706e+08
-3.48581e+08
-1.78229e+10
-2.07918e+08
-4.34955e+08
-1.77672e+10
-1.68364e+08
-5.27947e+08
-1.77482e+10
-1.19042e+08
-6.23344e+08
-1.77666e+10
-5.85612e+07
-7.20578e+08
-1.78244e+10
1.65469e+07
-8.20285e+08
-1.79302e+10
1.09742e+08
-9.23382e+08
-1.81038e+10
2.21841e+08
-1.02859e+09
-1.83809e+10
3.54545e+08
-1.14896e+09
-1.88027e+10
5.16241e+08
-1.3118e+09
-1.93998e+10
7.09882e+08
-1.49578e+09
-2.01517e+10
9.18435e+08
-1.7434e+09
-2.09799e+10
1.06316e+09
-2.13059e+09
-2.18034e+10
1.40258e+09
-3.08986e+09
-2.29199e+10
2.2779e+09
-4.78518e+09
-2.36832e+10
5.66677e+09
-8.91522e+09
1.25436e+09
-1.01792e+09
-2.46438e+10
3.58316e+08
-2.45944e+10
3.59077e+08
-2.45555e+10
3.40602e+08
-2.45264e+10
3.21728e+08
-2.45069e+10
2.9836e+08
-2.44962e+10
2.75113e+08
-2.44942e+10
2.50523e+08
-2.45009e+10
2.26442e+08
-2.45169e+10
2.05208e+08
-2.45417e+10
1.87393e+08
-2.45774e+10
1.75276e+08
-2.46229e+10
1.69472e+08
-2.4675e+10
1.71719e+08
-2.47282e+10
1.84421e+08
-2.47759e+10
2.07142e+08
-2.4812e+10
2.40176e+08
-2.48319e+10
2.83225e+08
-2.48316e+10
3.34179e+08
-2.48071e+10
3.90927e+08
-2.47537e+10
4.52732e+08
-2.4666e+10
5.1687e+08
-2.45388e+10
5.80724e+08
-2.43776e+10
6.35953e+08
-2.41888e+10
6.77862e+08
-2.39873e+10
7.02634e+08
-2.37868e+10
7.08062e+08
-2.35984e+10
6.99251e+08
-2.34299e+10
6.78028e+08
-2.32867e+10
6.4729e+08
-2.31691e+10
6.08746e+08
-2.30765e+10
5.66864e+08
-2.30065e+10
5.21942e+08
-2.2955e+10
4.73542e+08
-2.29175e+10
4.22754e+08
-2.2888e+10
3.6837e+08
-2.28613e+10
3.10104e+08
-2.28316e+10
2.46021e+08
-2.27949e+10
1.76101e+08
-2.27484e+10
9.97517e+07
-2.26861e+10
1.71686e+07
-2.26051e+10
-6.77184e+07
-2.2501e+10
-1.52044e+08
-2.23699e+10
-2.3379e+08
-2.22075e+10
-3.15766e+08
-2.20134e+10
-4.02593e+08
-2.1788e+10
-5.03224e+08
-2.1526e+10
-6.29567e+08
-2.1228e+10
-7.80287e+08
-2.09408e+10
-9.78001e+08
-2.09415e+10
-1.22837e+09
-2.11558e+10
-1.77857e+09
-1.9882e+10
-2.97811e+09
-6.71891e+09
-7.91827e+09
-2.00543e+09
-2.83991e+10
-1.06733e+08
3.1982e+08
-2.8384e+10
-1.14198e+08
3.1066e+08
-2.83664e+10
-1.24664e+08
2.99279e+08
-2.83551e+10
-1.31361e+08
2.84705e+08
-2.83483e+10
-1.39396e+08
2.67382e+08
-2.83449e+10
-1.47093e+08
2.48163e+08
-2.83458e+10
-1.55371e+08
2.29476e+08
-2.83501e+10
-1.64001e+08
2.10084e+08
-2.83577e+10
-1.73077e+08
1.92714e+08
-2.8369e+10
-1.82646e+08
1.77976e+08
-2.83824e+10
-1.92751e+08
1.66448e+08
-2.83984e+10
-2.03156e+08
1.60393e+08
-2.84139e+10
-2.13243e+08
1.5907e+08
-2.84252e+10
-2.22524e+08
1.65254e+08
-2.84286e+10
-2.30317e+08
1.79293e+08
-2.8421e+10
-2.3623e+08
2.00676e+08
-2.84014e+10
-2.40601e+08
2.29585e+08
-2.83702e+10
-2.43782e+08
2.6437e+08
-2.8329e+10
-2.46104e+08
3.05194e+08
-2.82765e+10
-2.48112e+08
3.49618e+08
-2.82121e+10
-2.50489e+08
3.97049e+08
-2.8139e+10
-2.52686e+08
4.4322e+08
-2.80613e+10
-2.55594e+08
4.84714e+08
-2.79834e+10
-2.59532e+08
5.17854e+08
-2.79073e+10
-2.66399e+08
5.37757e+08
-2.78329e+10
-2.75675e+08
5.4424e+08
-2.77601e+10
-2.8696e+08
5.3791e+08
-2.76906e+10
-2.99633e+08
5.20479e+08
-2.76241e+10
-3.12938e+08
4.93439e+08
-2.75603e+10
-3.26704e+08
4.58709e+08
-2.74993e+10
-3.41181e+08
4.20424e+08
-2.74402e+10
-3.56481e+08
3.77975e+08
-2.73849e+10
-3.72007e+08
3.32753e+08
-2.73348e+10
-3.87112e+08
2.84823e+08
-2.72936e+10
-4.01197e+08
2.35459e+08
-2.72652e+10
-4.13415e+08
1.84291e+08
-2.72552e+10
-4.23585e+08
1.3023e+08
-2.72703e+10
-4.31949e+08
7.45651e+07
-2.73169e+10
-4.38758e+08
1.54715e+07
-2.7403e+10
-4.43608e+08
-4.46837e+07
-2.75322e+10
-4.47025e+08
-1.05098e+08
-2.77087e+10
-4.48757e+08
-1.62541e+08
-2.79451e+10
-4.4537e+08
-2.11761e+08
-2.82583e+10
-4.33519e+08
-2.53088e+08
-2.86601e+10
-4.15266e+08
-2.93858e+08
-2.91613e+10
-3.91188e+08
-3.54566e+08
-2.97966e+10
-3.67539e+08
-4.37489e+08
-3.06416e+10
-3.51868e+08
-4.73993e+08
-3.18397e+10
-2.97609e+08
-4.72998e+08
-3.357e+10
-1.43592e+08
-5.47702e+08
-3.64096e+10
3.05477e+08
-8.97994e+08
-4.13881e+10
1.51244e+09
-1.66495e+09
-5.28349e+10
5.11642e+09
-2.86402e+09
-1.41271e+09
-1.19534e+09
-2.45886e+10
1.97992e+08
-2.45376e+10
2.12189e+08
-2.44979e+10
1.9529e+08
-2.44684e+10
1.81109e+08
-2.445e+10
1.62349e+08
-2.44403e+10
1.41737e+08
-2.44408e+10
1.20618e+08
-2.44506e+10
9.85477e+07
-2.44692e+10
7.80352e+07
-2.44968e+10
5.99907e+07
-2.45322e+10
4.5165e+07
-2.45749e+10
3.57842e+07
-2.46206e+10
3.17001e+07
-2.46638e+10
3.5417e+07
-2.46991e+10
4.70328e+07
-2.47211e+10
6.59942e+07
-2.4727e+10
9.27464e+07
-2.47168e+10
1.26462e+08
-2.46925e+10
1.67029e+08
-2.4655e+10
2.11948e+08
-2.46058e+10
2.60441e+08
-2.45487e+10
3.07456e+08
-2.44824e+10
3.50991e+08
-2.44154e+10
3.82737e+08
-2.43522e+10
3.99399e+08
-2.42965e+10
4.01877e+08
-2.42514e+10
3.89645e+08
-2.4219e+10
3.65734e+08
-2.41994e+10
3.32221e+08
-2.41925e+10
2.90149e+08
-2.41972e+10
2.42621e+08
-2.4212e+10
1.88946e+08
-2.42366e+10
1.30662e+08
-2.427e+10
6.81764e+07
-2.43124e+10
2.54692e+06
-2.43634e+10
-6.67349e+07
-2.44231e+10
-1.40662e+08
-2.44931e+10
-2.18076e+08
-2.45752e+10
-2.99423e+08
-2.46731e+10
-3.81765e+08
-2.47909e+10
-4.60199e+08
-2.49372e+10
-5.26106e+08
-2.51233e+10
-5.69627e+08
-2.53589e+10
-5.93873e+08
-2.56567e+10
-6.07164e+08
-2.60389e+10
-6.1384e+08
-2.65375e+10
-6.25548e+08
-2.7234e+10
-5.96266e+08
-2.81432e+10
-5.71738e+08
-2.90852e+10
-6.86372e+08
-2.97041e+10
-1.14366e+09
-2.92259e+10
-2.24807e+09
-2.83534e+10
-3.874e+09
-6.18816e+08
-3.01421e+10
-1.30128e+07
4.00804e+08
-3.02374e+10
7.46746e+06
4.22426e+08
-3.03222e+10
-2.43122e+06
4.11135e+08
-3.04147e+10
-1.95603e+06
4.05317e+08
-3.05122e+10
-3.26113e+06
3.95886e+08
-3.06153e+10
-3.46104e+06
3.84525e+08
-3.07232e+10
-3.90195e+06
3.73158e+08
-3.08363e+10
-4.34592e+06
3.61229e+08
-3.09528e+10
-5.02705e+06
3.49515e+08
-3.10731e+10
-5.95728e+06
3.40257e+08
-3.11968e+10
-7.27142e+06
3.33398e+08
-3.13233e+10
-8.85475e+06
3.31176e+08
-3.14517e+10
-1.04795e+07
3.33712e+08
-3.15764e+10
-1.19075e+07
3.40246e+08
-3.16945e+10
-1.27e+07
3.53022e+08
-3.18043e+10
-1.26183e+07
3.71812e+08
-3.19032e+10
-1.1876e+07
3.93768e+08
-3.19921e+10
-1.02851e+07
4.19653e+08
-3.20705e+10
-7.83002e+06
4.47873e+08
-3.21386e+10
-4.81402e+06
4.77657e+08
-3.21958e+10
-1.5148e+06
5.06719e+08
-3.22408e+10
1.867e+06
5.3318e+08
-3.2274e+10
6.30116e+06
5.54924e+08
-3.22966e+10
9.931e+06
5.6626e+08
-3.23095e+10
1.34523e+07
5.69357e+08
-3.23125e+10
1.67831e+07
5.6033e+08
-3.23084e+10
1.89506e+07
5.41265e+08
-3.22974e+10
2.03751e+07
5.11653e+08
-3.22797e+10
2.18901e+07
4.72377e+08
-3.22565e+10
2.37864e+07
4.2604e+08
-3.22259e+10
2.60258e+07
3.73382e+08
-3.21887e+10
2.82419e+07
3.16264e+08
-3.21436e+10
3.03725e+07
2.54367e+08
-3.20924e+10
3.282e+07
1.89841e+08
-3.20348e+10
3.61009e+07
1.21628e+08
-3.1972e+10
4.04814e+07
5.0114e+07
-3.19074e+10
4.53562e+07
-2.23731e+07
-3.1843e+10
4.93598e+07
-9.53665e+07
-3.17834e+10
5.2152e+07
-1.66839e+08
-3.17356e+10
5.46478e+07
-2.33706e+08
-3.17068e+10
5.93665e+07
-2.95e+08
-3.17075e+10
6.75748e+07
-3.44822e+08
-3.17409e+10
7.75032e+07
-3.80936e+08
-3.18284e+10
9.12675e+07
-3.87268e+08
-3.20246e+10
1.14618e+08
-3.51407e+08
-3.23579e+10
1.47612e+08
-3.25282e+08
-3.28827e+10
1.84801e+08
-2.82657e+08
-3.36659e+10
2.18405e+08
-1.37933e+08
-3.47788e+10
2.63978e+08
7.89835e+07
-3.63774e+10
3.36602e+08
3.45592e+08
-3.93122e+10
6.64296e+08
9.3914e+08
-4.45028e+10
1.12581e+09
1.94037e+09
-5.74785e+10
3.72331e+09
6.00559e+09
-1.47313e+09
-3.03586e+08
-2.43055e+10
3.70565e+07
-2.41317e+10
6.37069e+07
-2.39761e+10
5.61426e+07
-2.38289e+10
5.20273e+07
-2.36922e+10
4.39696e+07
-2.35649e+10
3.42352e+07
-2.34475e+10
2.42338e+07
-2.33405e+10
1.37386e+07
-2.32434e+10
3.59572e+06
-2.3157e+10
-4.10362e+06
-2.30815e+10
-9.20792e+06
-2.30166e+10
-9.69539e+06
-2.29609e+10
-5.24403e+06
-2.29094e+10
3.8312e+06
-2.28583e+10
1.93577e+07
-2.28054e+10
4.1143e+07
-2.27472e+10
6.69982e+07
-2.26821e+10
9.7477e+07
-2.26071e+10
1.30951e+08
-2.25208e+10
1.66386e+08
-2.24229e+10
2.02198e+08
-2.23097e+10
2.37243e+08
-2.21853e+10
2.6645e+08
-2.20513e+10
2.88047e+08
-2.1912e+10
3.01943e+08
-2.17727e+10
3.03707e+08
-2.16388e+10
2.96898e+08
-2.15142e+10
2.80603e+08
-2.14e+10
2.5552e+08
-2.12975e+10
2.23239e+08
-2.12056e+10
1.8406e+08
-2.11259e+10
1.39524e+08
-2.10588e+10
8.93705e+07
-2.10053e+10
3.55389e+07
-2.09657e+10
-2.17679e+07
-2.09405e+10
-8.22106e+07
-2.09332e+10
-1.44805e+08
-2.09468e+10
-2.0971e+08
-2.09878e+10
-2.74478e+08
-2.10626e+10
-3.3446e+08
-2.11728e+10
-3.8606e+08
-2.13165e+10
-4.20327e+08
-2.14939e+10
-4.25793e+08
-2.1727e+10
-3.85021e+08
-2.2043e+10
-2.98804e+08
-2.24735e+10
-1.73209e+08
-2.30577e+10
-2.00814e+07
-2.38746e+10
2.34631e+08
-2.50074e+10
5.6758e+08
-2.66469e+10
9.727e+08
-2.92593e+10
1.77875e+09
-3.39894e+10
3.29027e+09
-4.07498e+10
6.40378e+09
8.30722e+08
-2.79365e+10
4.6417e+07
3.41761e+08
-2.79346e+10
7.98576e+07
3.65929e+08
-2.79357e+10
7.60245e+07
3.626e+08
-2.79445e+10
8.17036e+07
3.60233e+08
-2.79599e+10
8.55804e+07
3.54989e+08
-2.79827e+10
9.04084e+07
3.48134e+08
-2.80106e+10
9.49e+07
3.39213e+08
-2.8045e+10
9.91857e+07
3.3118e+08
-2.80849e+10
1.02955e+08
3.22505e+08
-2.81301e+10
1.06105e+08
3.16094e+08
-2.81792e+10
1.08389e+08
3.10496e+08
-2.82296e+10
1.09779e+08
3.07672e+08
-2.82791e+10
1.10332e+08
3.08776e+08
-2.83247e+10
1.1012e+08
3.13625e+08
-2.83602e+10
1.09232e+08
3.21183e+08
-2.83826e+10
1.07812e+08
3.33077e+08
-2.83908e+10
1.05889e+08
3.46893e+08
-2.83831e+10
1.03697e+08
3.61547e+08
-2.83591e+10
1.01331e+08
3.76412e+08
-2.83179e+10
9.8441e+07
3.90473e+08
-2.82571e+10
9.48173e+07
4.02317e+08
-2.8178e+10
9.03265e+07
4.09971e+08
-2.80799e+10
8.46719e+07
4.11464e+08
-2.79637e+10
7.89658e+07
4.08591e+08
-2.78322e+10
7.24519e+07
3.97679e+08
-2.76875e+10
6.54823e+07
3.79845e+08
-2.75315e+10
5.78518e+07
3.54709e+08
-2.73674e+10
4.87185e+07
3.22486e+08
-2.71967e+10
3.86328e+07
2.82722e+08
-2.70196e+10
2.79743e+07
2.36527e+08
-2.68382e+10
1.66504e+07
1.8638e+08
-2.66515e+10
3.82566e+06
1.31356e+08
-2.64603e+10
-1.07524e+07
7.34957e+07
-2.62634e+10
-2.67386e+07
1.20629e+07
-2.60622e+10
-4.3392e+07
-5.21517e+07
-2.5861e+10
-6.03324e+07
-1.16186e+08
-2.56606e+10
-7.83727e+07
-1.80316e+08
-2.54635e+10
-9.84646e+07
-2.41785e+08
-2.52769e+10
-1.19225e+08
-2.94861e+08
-2.51135e+10
-1.36158e+08
-3.3527e+08
-2.49877e+10
-1.45423e+08
-3.62622e+08
-2.49048e+10
-1.48841e+08
-3.75901e+08
-2.48483e+10
-1.50779e+08
-3.85717e+08
-2.48163e+10
-1.5417e+08
-3.63388e+08
-2.484e+10
-1.65072e+08
-2.59754e+08
-2.49086e+10
-1.76128e+08
-1.80462e+08
-2.49833e+10
-1.72048e+08
-1.51449e+08
-2.50849e+10
-1.73531e+08
-7.18939e+06
-2.52088e+10
-1.79737e+08
2.06758e+08
-2.54792e+10
-1.67781e+08
5.70468e+08
-2.6193e+10
-3.53953e+07
1.46455e+09
-2.83257e+10
4.22316e+08
3.43185e+09
-3.37164e+10
2.14022e+09
9.13365e+09
4.06819e+07
2.55742e+09
-2.65233e+10
-1.30899e+08
-2.62578e+10
-1.04397e+08
-2.60151e+10
-9.2263e+07
-2.57774e+10
-8.47496e+07
-2.55483e+10
-7.90964e+07
-2.53266e+10
-7.53358e+07
-2.51113e+10
-7.3231e+07
-2.49038e+10
-7.05045e+07
-2.47038e+10
-6.84876e+07
-2.45122e+10
-6.42464e+07
-2.43288e+10
-5.90335e+07
-2.41526e+10
-5.10023e+07
-2.39829e+10
-3.89326e+07
-2.38184e+10
-2.29001e+07
-2.36552e+10
-3.81826e+06
-2.34919e+10
1.98327e+07
-2.33278e+10
4.58177e+07
-2.31612e+10
7.31102e+07
-2.2991e+10
1.00943e+08
-2.28166e+10
1.28392e+08
-2.26365e+10
1.53844e+08
-2.24537e+10
1.75452e+08
-2.22663e+10
1.9365e+08
-2.20786e+10
2.06742e+08
-2.18933e+10
2.119e+08
-2.17118e+10
2.1071e+08
-2.1538e+10
2.00629e+08
-2.13752e+10
1.82955e+08
-2.12249e+10
1.57331e+08
-2.10877e+10
1.24485e+08
-2.0966e+10
8.60299e+07
-2.08611e+10
4.1713e+07
-2.07774e+10
-6.50851e+06
-2.07159e+10
-5.92912e+07
-2.0678e+10
-1.1581e+08
-2.0667e+10
-1.7308e+08
-2.06861e+10
-2.31424e+08
-2.07404e+10
-2.89729e+08
-2.0836e+10
-3.43129e+08
-2.09761e+10
-3.84972e+08
-2.11562e+10
-4.13592e+08
-2.13599e+10
-4.31867e+08
-2.1558e+10
-4.44682e+08
-2.1737e+10
-4.22754e+08
-2.19163e+10
-3.45078e+08
-2.21039e+10
-2.24864e+08
-2.22901e+10
-7.86472e+07
-2.2464e+10
1.46445e+08
-2.26675e+10
4.82545e+08
-2.30074e+10
1.0288e+09
-2.34834e+10
2.11911e+09
-2.40263e+10
4.15954e+09
-2.38944e+10
8.37115e+09
2.24597e+09
-2.68855e+10
23496.5
2.29342e+08
-2.67316e+10
1.63308e+07
2.2197e+08
-2.65862e+10
2.15458e+07
2.22583e+08
-2.64447e+10
2.67822e+07
2.19899e+08
-2.63075e+10
3.23942e+07
2.14587e+08
-2.6175e+10
3.83542e+07
2.07834e+08
-2.6048e+10
4.46045e+07
1.99747e+08
-2.59253e+10
5.10259e+07
1.90707e+08
-2.58089e+10
5.74449e+07
1.83025e+08
-2.56972e+10
6.36677e+07
1.75314e+08
-2.55913e+10
6.94579e+07
1.69407e+08
-2.54904e+10
7.47209e+07
1.65457e+08
-2.53921e+10
7.93977e+07
1.64607e+08
-2.52933e+10
8.33128e+07
1.66464e+08
-2.51926e+10
8.62933e+07
1.72207e+08
-2.50863e+10
8.82279e+07
1.8036e+08
-2.49745e+10
8.90487e+07
1.91089e+08
-2.48579e+10
8.90239e+07
2.02862e+08
-2.47367e+10
8.81138e+07
2.14302e+08
-2.46113e+10
8.60573e+07
2.26471e+08
-2.44832e+10
8.25518e+07
2.35805e+08
-2.43537e+10
7.77888e+07
2.44199e+08
-2.42234e+10
7.31656e+07
2.50075e+08
-2.40978e+10
6.75066e+07
2.51659e+08
-2.39784e+10
6.1425e+07
2.50338e+08
-2.3869e+10
5.53627e+07
2.45999e+08
-2.37738e+10
4.82282e+07
2.36471e+08
-2.36943e+10
4.03868e+07
2.23655e+08
-2.36322e+10
3.17856e+07
2.06438e+08
-2.35905e+10
2.30518e+07
1.86609e+08
-2.35698e+10
1.45767e+07
1.63184e+08
-2.3574e+10
6.21164e+06
1.3841e+08
-2.36034e+10
-2.42445e+06
1.11043e+08
-2.3659e+10
-1.11145e+07
8.06406e+07
-2.37443e+10
-1.88172e+07
4.92953e+07
-2.386e+10
-2.47937e+07
1.66633e+07
-2.40076e+10
-2.98299e+07
-1.66048e+07
-2.41848e+10
-3.49798e+07
-4.95371e+07
-2.43909e+10
-3.95707e+07
-7.65859e+07
-2.46299e+10
-3.89133e+07
-9.22409e+07
-2.49146e+10
-2.96443e+07
-8.96977e+07
-2.52409e+10
-1.9327e+07
-7.25538e+07
-2.56044e+10
-5.48088e+06
-5.45772e+07
-2.59717e+10
2.20509e+07
-4.23992e+07
-2.62476e+10
2.16751e+07
-1.2852e+07
-2.64954e+10
-3.24848e+06
7.45541e+07
-2.67249e+10
-4.51055e+07
1.34818e+08
-2.68464e+10
-5.64217e+07
1.91294e+08
-2.68215e+10
-3.8465e+07
2.44892e+08
-2.64937e+10
-132616
2.88397e+08
-2.5414e+10
9.01871e+07
3.57999e+08
-2.35816e+10
3.26253e+08
1.34069e+09
-2.24808e+10
9.92709e+08
7.05202e+09
4.10828e+08
3.63053e+09
-3.01724e+10
-2.95357e+08
-2.99341e+10
-3.09994e+08
-2.96932e+10
-2.94751e+08
-2.94451e+10
-2.88423e+08
-2.91918e+10
-2.81603e+08
-2.89332e+10
-2.76307e+08
-2.86704e+10
-2.71208e+08
-2.84021e+10
-2.66643e+08
-2.81315e+10
-2.60069e+08
-2.78575e+10
-2.52816e+08
-2.75827e+10
-2.42796e+08
-2.7308e+10
-2.29767e+08
-2.70335e+10
-2.12544e+08
-2.67587e+10
-1.91494e+08
-2.64857e+10
-1.65558e+08
-2.62139e+10
-1.36366e+08
-2.59458e+10
-1.03878e+08
-2.56829e+10
-7.01687e+07
-2.5426e+10
-3.67433e+07
-2.51777e+10
-3.08022e+06
-2.49405e+10
2.76636e+07
-2.47149e+10
5.72935e+07
-2.45022e+10
8.12594e+07
-2.43031e+10
9.99276e+07
-2.41182e+10
1.13904e+08
-2.39528e+10
1.21495e+08
-2.38087e+10
1.22695e+08
-2.36886e+10
1.18418e+08
-2.35942e+10
1.07662e+08
-2.35278e+10
9.21955e+07
-2.34888e+10
7.07958e+07
-2.34801e+10
4.62797e+07
-2.35032e+10
1.86849e+07
-2.35599e+10
-1.19527e+07
-2.36518e+10
-4.43719e+07
-2.37756e+10
-7.95719e+07
-2.39302e+10
-1.165e+08
-2.41147e+10
-1.55041e+08
-2.43259e+10
-1.91644e+08
-2.45526e+10
-2.22618e+08
-2.47828e+10
-2.42119e+08
-2.50114e+10
-2.51509e+08
-2.52337e+10
-2.50842e+08
-2.54115e+10
-2.36115e+08
-2.55319e+10
-2.04312e+08
-2.55711e+10
-1.7961e+08
-2.55256e+10
-1.5245e+08
-2.53231e+10
-9.10906e+07
-2.48701e+10
2.15086e+07
-2.39663e+10
1.65077e+08
-2.21961e+10
4.79311e+08
-1.96773e+10
1.99114e+09
-1.49488e+10
4.67922e+09
3.21736e+09
-2.97174e+10
9.15923e+07
1.23526e+08
-2.96972e+10
8.48514e+07
1.40567e+08
-2.96758e+10
8.56269e+07
1.39893e+08
-2.96485e+10
8.11682e+07
1.3676e+08
-2.96209e+10
7.87568e+07
1.34687e+08
-2.95937e+10
7.5726e+07
1.327e+08
-2.95687e+10
7.28555e+07
1.30994e+08
-2.9545e+10
6.92216e+07
1.28019e+08
-2.95199e+10
6.50565e+07
1.23892e+08
-2.94952e+10
6.07152e+07
1.21047e+08
-2.94702e+10
5.65622e+07
1.18608e+08
-2.94446e+10
5.28337e+07
1.17001e+08
-2.94181e+10
4.97621e+07
1.18106e+08
-2.93882e+10
4.74436e+07
1.20109e+08
-2.93532e+10
4.58507e+07
1.24831e+08
-2.93128e+10
4.48698e+07
1.31556e+08
-2.92658e+10
4.42518e+07
1.3921e+08
-2.92141e+10
4.38251e+07
1.48628e+08
-2.9158e+10
4.34413e+07
1.5718e+08
-2.90981e+10
4.28599e+07
1.65736e+08
-2.9036e+10
4.22151e+07
1.74406e+08
-2.89708e+10
4.16276e+07
1.80838e+08
-2.89062e+10
4.02853e+07
1.86345e+08
-2.884e+10
3.87962e+07
1.89568e+08
-2.87776e+10
3.69806e+07
1.9162e+08
-2.87198e+10
3.43632e+07
1.88779e+08
-2.86689e+10
3.17598e+07
1.85389e+08
-2.86247e+10
2.90713e+07
1.78415e+08
-2.85902e+10
2.68078e+07
1.70655e+08
-2.85662e+10
2.52759e+07
1.60915e+08
-2.85556e+10
2.47033e+07
1.49464e+08
-2.85609e+10
2.49393e+07
1.38023e+08
-2.85829e+10
2.5177e+07
1.24264e+08
-2.86242e+10
2.50488e+07
1.0979e+08
-2.86853e+10
2.47797e+07
9.38336e+07
-2.87667e+10
2.53088e+07
7.57249e+07
-2.88698e+10
2.71854e+07
5.58833e+07
-2.89926e+10
3.03796e+07
3.23889e+07
-2.91326e+10
3.5285e+07
9.92511e+06
-2.92877e+10
4.35928e+07
-5.8099e+06
-2.94498e+10
5.37188e+07
-9.94423e+06
-2.96109e+10
6.00761e+07
1.69302e+06
-2.97845e+10
6.77216e+07
3.8908e+07
-2.99987e+10
8.62192e+07
9.6197e+07
-3.01667e+10
9.20403e+07
1.01647e+08
-3.02362e+10
1.23653e+08
8.81238e+07
-3.02301e+10
1.88109e+08
3.12172e+07
-3.0105e+10
2.15449e+08
-5.12021e+07
-2.99562e+10
3.09621e+08
-1.06354e+08
-2.9772e+10
4.79446e+08
-2.72442e+08
-2.9411e+10
9.02713e+08
-8.13554e+08
-2.73684e+10
1.64721e+09
-2.27281e+09
-1.76066e+10
2.05174e+09
-4.6642e+09
-4.46172e+09
-8.29779e+08
-2.80593e+10
-1.27562e+08
-2.81268e+10
-1.35943e+08
-2.81762e+10
-1.37389e+08
-2.82211e+10
-1.39326e+08
-2.82596e+10
-1.4029e+08
-2.8293e+10
-1.42265e+08
-2.83204e+10
-1.44977e+08
-2.83424e+10
-1.48806e+08
-2.8357e+10
-1.53349e+08
-2.83658e+10
-1.56431e+08
-2.83673e+10
-1.58388e+08
-2.83604e+10
-1.58199e+08
-2.83438e+10
-1.53655e+08
-2.83151e+10
-1.46088e+08
-2.82718e+10
-1.34216e+08
-2.82133e+10
-1.18883e+08
-2.81382e+10
-1.0138e+08
-2.80483e+10
-8.14072e+07
-2.79445e+10
-6.16781e+07
-2.78275e+10
-4.1512e+07
-2.76998e+10
-2.12644e+07
-2.75625e+10
-3.93099e+06
-2.74196e+10
1.3964e+07
-2.72739e+10
2.93521e+07
-2.71322e+10
4.17645e+07
-2.69951e+10
4.93246e+07
-2.6868e+10
5.5044e+07
-2.67521e+10
5.67899e+07
-2.66515e+10
5.73433e+07
-2.6568e+10
5.59425e+07
-2.65052e+10
5.32743e+07
-2.64657e+10
5.06217e+07
-2.64509e+10
4.57268e+07
-2.64646e+10
4.07243e+07
-2.65096e+10
3.60001e+07
-2.65879e+10
3.06363e+07
-2.66998e+10
2.44806e+07
-2.68434e+10
1.58911e+07
-2.7018e+10
9.99948e+06
-2.722e+10
1.09199e+07
-2.74445e+10
2.32515e+07
-2.76935e+10
5.04531e+07
-2.7961e+10
9.04182e+07
-2.82175e+10
1.33504e+08
-2.84514e+10
1.73128e+08
-2.86364e+10
2.03621e+08
-2.87456e+10
2.36379e+08
-2.87665e+10
2.47304e+08
-2.86141e+10
2.80224e+08
-2.81752e+10
2.98201e+08
-2.64505e+10
-2.60349e+08
-2.02328e+10
-2.46683e+09
-8.92072e+09
-4.49328e+09
-6.00441e+09
-2.53501e+10
2.08074e+07
-2.51645e+10
-2.226e+07
-2.4977e+10
-2.41828e+07
-2.47868e+10
-2.91401e+07
-2.45921e+10
-3.46587e+07
-2.43909e+10
-4.19868e+07
-2.41816e+10
-5.08023e+07
-2.3965e+10
-6.02279e+07
-2.37422e+10
-7.0046e+07
-2.35123e+10
-8.00066e+07
-2.32756e+10
-8.98063e+07
-2.30322e+10
-9.8736e+07
-2.27802e+10
-1.06039e+08
-2.25192e+10
-1.11712e+08
-2.22468e+10
-1.16066e+08
-2.19614e+10
-1.19352e+08
-2.16629e+10
-1.22003e+08
-2.13506e+10
-1.24302e+08
-2.10264e+10
-1.2648e+08
-2.06905e+10
-1.28401e+08
-2.03441e+10
-1.29991e+08
-1.9991e+10
-1.31591e+08
-1.9629e+10
-1.31728e+08
-1.92633e+10
-1.31414e+08
-1.88974e+10
-1.31652e+08
-1.85354e+10
-1.31724e+08
-1.81794e+10
-1.31376e+08
-1.78338e+10
-1.29781e+08
-1.75008e+10
-1.25929e+08
-1.71848e+10
-1.19358e+08
-1.68902e+10
-1.10231e+08
-1.66193e+10
-9.92557e+07
-1.63764e+10
-8.68657e+07
-1.61643e+10
-7.35684e+07
-1.59859e+10
-5.95625e+07
-1.5845e+10
-4.5291e+07
-1.57438e+10
-3.12267e+07
-1.56864e+10
-1.70958e+07
-1.567e+10
-3.95464e+06
-1.56811e+10
5.00132e+06
-1.56945e+10
6.20074e+06
-1.56654e+10
-1.00951e+07
-1.5534e+10
-4.89633e+07
-1.52636e+10
-9.35393e+07
-1.49111e+10
-1.26851e+08
-1.44336e+10
-2.27111e+08
-1.38938e+10
-3.24863e+08
-1.33012e+10
-4.54151e+08
-1.27024e+10
-5.3596e+08
-1.24607e+10
-3.74022e+08
-1.32013e+10
5.48259e+07
-1.42749e+10
-1.03401e+09
-1.2971e+10
-5.86566e+09
-2.43299e+09
-1.23322e+10
-1.24716e+10
-1.26139e+10
-1.27625e+10
-1.29169e+10
-1.308e+10
-1.3254e+10
-1.3441e+10
-1.36424e+10
-1.38574e+10
-1.40848e+10
-1.43213e+10
-1.45603e+10
-1.47961e+10
-1.50227e+10
-1.52355e+10
-1.54322e+10
-1.56104e+10
-1.57706e+10
-1.59125e+10
-1.60371e+10
-1.61451e+10
-1.62343e+10
-1.63093e+10
-1.63733e+10
-1.64316e+10
-1.64856e+10
-1.65374e+10
-1.65857e+10
-1.66297e+10
-1.66681e+10
-1.66994e+10
-1.67248e+10
-1.6744e+10
-1.67563e+10
-1.67625e+10
-1.67638e+10
-1.67624e+10
-1.67559e+10
-1.67395e+10
-1.67055e+10
-1.66513e+10
-1.65802e+10
-1.64904e+10
-1.63734e+10
-1.63085e+10
-1.6298e+10
-1.64068e+10
-1.65744e+10
-1.65691e+10
-1.66647e+10
-2.00654e+10
-3.03894e+10
3.90254e+08
1.41746e+09
-1.16639e+08
-8.35656e+07
-4.49912e+07
-6.48209e+07
-4.14597e+07
1.43173e+08
1.58087e+09
5.7692e+07
-1.76506e+09
6.96055e+07
-2.18274e+09
-4.18684e+07
5.26908e+08
5.86374e+06
2.01534e+09
-8.54092e+07
-8.26295e+07
-6.2454e+07
-9.32388e+07
-6.7516e+07
9.7893e+07
-9.80607e+07
3.12551e+07
1.93784e+07
1.65003e+07
8.03431e+06
-1.76221e+08
-2.53647e+07
-1.88676e+08
2.21665e+07
1.94327e+08
4.90783e+07
3.04509e+07
5.11428e+07
3.67792e+07
4.22705e+08
1.34207e+09
4.43592e+07
-4.44229e+08
7.41738e+08
2.90611e+06
-2.21287e+09
-1.95777e+08
-1.43409e+08
-1.94545e+08
-1.4662e+08
-7.24824e+07
4.9018e+08
-1.66201e+09
4.9865e+07
1.74953e+09
-5.46656e+08
-3.60687e+07
-7.16013e+08
3.33545e+08
1.15403e+08
1.11132e+08
4.80905e+07
7.97255e+07
6.53401e+07
4.53885e+07
5.74535e+07
-1.01655e+09
4.21872e+08
-7.56903e+06
1.37005e+08
1.10716e+08
1.39106e+08
1.02651e+08
5.56394e+08
1.91055e+09
-3.79127e+07
-8.98986e+07
-9.24764e+07
-8.42038e+07
-9.08544e+07
1.1522e+07
8.20996e+08
-1.19243e+08
-8.65443e+08
1.51709e+08
-1.29968e+09
4.30305e+08
-1.30218e+07
1.05427e+09
-6.39554e+07
-3.43741e+07
-4.00507e+07
-3.38949e+07
-3.23681e+08
6.15184e+07
-1.17659e+08
6.43849e+07
3.93074e+07
3.52404e+07
6.28071e+07
-2.62733e+07
-1.36809e+08
1.21992e+07
9.57197e+07
2.01005e+07
1.16286e+07
8.09129e+06
1.52187e+07
4.60714e+08
1.80977e+09
-4.68372e+07
-5.16237e+08
5.02245e+08
-3.5956e+07
-1.39614e+09
-1.45271e+08
-5.05186e+07
-9.71807e+07
-7.31818e+07
4.13718e+08
-1.43099e+09
7.64192e+07
1.34639e+09
-3.99759e+08
1.63997e+08
-1.02318e+09
3.5111e+08
6.01582e+07
1.27535e+08
1.14242e+08
1.33085e+08
1.08333e+08
1.58017e+08
-7.56126e+08
1.94573e+08
1.02339e+08
9.44496e+07
5.25097e+07
9.30906e+07
5.95441e+07
-2.61208e+08
2.15769e+08
1.03128e+07
3.87486e+07
3.07741e+07
3.45761e+07
4.59421e+07
1.48594e+09
-8.36334e+07
-1.53845e+09
-4.11004e+07
-1.51686e+09
3.75662e+08
1.4938e+09
-8.68537e+07
-8.7471e+07
-4.93921e+07
-7.32221e+07
-4.81676e+07
1.50928e+08
1.85421e+09
1.4022e+08
5.0034e+07
-1.31336e+08
-2.06284e+09
-2.2903e+09
2.21909e+08
4.06078e+08
-2.32185e+08
2.20569e+09
-8.54341e+07
-6.7946e+07
-6.83927e+07
-7.20685e+07
1.2394e+08
2.66642e+08
1.1339e+08
5.3683e+07
8.29702e+07
6.99229e+07
1.38878e+08
-9.4095e+08
-5.63156e+07
4.75354e+08
1.29916e+08
9.13701e+07
7.47094e+07
1.41426e+08
-1.55361e+09
-1.79629e+07
-1.60111e+08
-6.60391e+07
-1.25368e+08
-8.16011e+07
-1.45713e+09
3.7071e+08
-3.85881e+08
1.41347e+09
6.66032e+07
1.94417e+08
5.98578e+08
-1.78683e+08
-2.23109e+09
-1.95911e+08
-1.32155e+08
-1.46334e+08
-1.84681e+08
3.28483e+07
-1.66628e+09
4.04022e+08
-4.90432e+08
-31551.1
1.73873e+09
-8.78797e+07
4.84214e+07
1.78771e+07
-1.16037e+06
-2.53125e+06
-369339
-1.46115e+06
1.84087e+09
6.93305e+07
-2.01698e+09
1.54551e+08
-2.11946e+09
3.84117e+08
2.07253e+09
1.58131e+08
-5.25849e+07
-7.39728e+07
-7.76147e+07
-5.78261e+07
1.43201e+09
3.6047e+07
1.06505e+08
-1.30548e+08
-1.44081e+09
-1.26163e+09
2.12021e+08
-1.48793e+08
1.29369e+09
-1.85743e+07
-2.7022e+07
-2.46498e+07
-1.72925e+07
1.05725e+08
5.50652e+08
1.19027e+08
7.33779e+07
6.98159e+07
1.22487e+08
-4.59318e+08
3.34328e+07
4.00171e+08
8.05235e+07
1.99944e+07
4.53437e+07
3.90621e+07
-2.02594e+09
1.59314e+08
-1.91136e+08
-1.36224e+08
-1.87064e+08
-1.4263e+08
-1.34555e+09
4.50282e+08
-5.49427e+08
1.45655e+09
4.00245e+07
4.07248e+08
-9.0586e+07
-1.22546e+09
-1.34791e+08
-4.91529e+07
-9.68166e+07
-6.80164e+07
-9.14392e+08
4.33573e+08
-4.53766e+08
1.4327e+07
9.34443e+08
-1.62317e+08
-1.43668e+09
-8.24891e+09
-1.06955e+09
-1.50315e+09
-7.81008e+09
-1.48242e+08
-8.15999e+09
-2.77886e+08
-1.97514e+08
-2.01439e+08
-2.66567e+08
-2.36929e+08
-7.66171e+09
-2.87651e+08
-5.83441e+08
-4.34615e+08
-9.06893e+09
-1.43856e+08
-1.63937e+08
-2.3685e+08
-2.44717e+08
-8.67767e+09
-1.52442e+08
-5.83938e+08
-4.12667e+08
-4.53517e+08
-6.05342e+07
-1.55186e+09
-7.10617e+09
-1.97913e+09
-1.59155e+09
-1.32411e+08
-6.77435e+09
-1.75842e+08
-5.63083e+08
-7.45115e+08
-7.46596e+08
-4.09536e+07
-4.94337e+08
-4.72339e+08
-5.99064e+08
-7.54801e+09
-2.14775e+08
-7.88534e+08
-7.4462e+08
-7.81208e+08
-2.24998e+08
-4.75726e+08
-6.071e+08
-6.12874e+08
-2.52408e+06
-1.49967e+09
-8.10141e+09
-9.70356e+08
-1.43193e+09
-7.73453e+09
-8.90634e+09
2.80192e+08
-2.5181e+08
-2.23864e+08
-2.66094e+08
6.04765e+07
-8.66235e+09
-3.93664e+08
-5.95735e+08
-4.13382e+08
-7.83981e+09
-1.38666e+08
-1.95242e+07
-1.98282e+08
-7.60043e+09
-5.79223e+08
-2.07848e+08
-3.90855e+08
-5.60612e+07
-1.50804e+09
-7.24867e+09
-1.85476e+09
-1.47001e+09
-7.73908e+09
-3.65493e+07
-7.42204e+08
-7.6196e+08
-7.91546e+08
-1.78361e+08
-5.98119e+08
-4.71305e+08
-6.21618e+08
-6.94731e+09
-7.19244e+08
-5.59029e+08
-7.54572e+08
-4.5996e+08
-4.79316e+08
-5.97589e+08
-3.75039e+08
-3.50636e+08
-1.56922e+09
-1.48231e+08
-2.48883e+08
-4.50734e+09
9.08904e+08
1.00848e+08
-3.79171e+08
-1.6833e+09
-5.47642e+08
-5.41148e+08
2.81671e+08
-6.34056e+08
-8.851e+08
4.35243e+08
5.09285e+07
1.11393e+08
1.3518e+08
4.9452e+08
-1.01122e+09
4.79151e+08
-1.13605e+09
2.03422e+08
1.2475e+08
1.93055e+08
1.26277e+08
6.06305e+06
-4.28875e+08
-4.78452e+08
3.82962e+08
5.28816e+08
-5.62631e+06
-9.47815e+07
-1.33601e+09
-1.8846e+08
-1.31667e+08
-1.90533e+08
-1.22207e+08
-2.34146e+09
2.37459e+09
-2.73423e+07
-2.01647e+08
-1.97393e+08
-1.46292e+08
-2.52244e+08
-5.04034e+07
-1.98656e+09
-2.51068e+08
-3.1884e+08
-2.56369e+08
-3.14009e+08
-6.68927e+07
-1.70355e+08
2.19828e+07
1.30634e+08
8.64598e+07
-4.21934e+07
-6.64886e+08
-5.9281e+09
-1.39553e+09
1.64811e+09
1.54565e+09
1.56219e+09
-6.47139e+08
-1.95318e+08
-5.14167e+09
2.03734e+08
8.83591e+08
9.28988e+08
1.15175e+09
-2.39205e+07
1.00408e+07
-5.54085e+09
-1.82385e+08
4.19492e+07
1.21373e+09
1.02289e+09
1.24192e+09
-2.18944e+08
3.79202e+07
-3.33751e+08
-1.84728e+08
-1.31083e+09
-3.8983e+07
-1.26496e+08
-2.5767e+09
9.4379e+08
1.93392e+08
-1.05146e+09
-3.81685e+08
-4.48063e+08
1.64104e+09
-4.91589e+08
-9.92885e+08
9.87172e+07
3.42538e+08
2.58039e+08
2.84205e+08
1.47663e+09
9.61868e+08
1.02999e+08
9.72813e+07
1.7721e+08
1.63342e+08
1.41416e+07
-3.55679e+08
-4.11502e+08
3.2823e+08
-1.96987e+07
4.48093e+08
-7.57342e+06
4.6636e+07
-1.92871e+09
-2.51267e+08
-2.47347e+08
-2.3867e+08
-2.60154e+08
-2.26516e+09
2.21809e+09
3.51363e+07
-2.08938e+08
-1.69577e+08
-1.5206e+08
-2.2612e+08
3.16023e+07
-1.97477e+09
-2.65812e+08
-2.88214e+08
-2.72015e+08
-2.87794e+08
-1.94083e+07
-3.08747e+08
-3.69396e+08
2.59013e+07
2.83377e+08
3.92491e+08
-1.41766e+08
-5.52385e+08
-6.38063e+09
-1.03512e+09
1.65525e+09
1.2305e+09
1.52912e+09
-5.35958e+08
-5.83771e+09
-3.46428e+08
1.21623e+09
1.01813e+09
1.1946e+09
-1.64624e+08
1.7345e+08
-5.54345e+09
3.63033e+08
8.92912e+08
9.97315e+08
1.15889e+09
1.60576e+08
-8.65322e+08
9.20502e+08
4.03081e+08
3.39065e+08
4.67712e+08
1.3192e+09
-3.52361e+08
6.86625e+08
-1.18621e+09
3.78896e+08
1.55888e+08
3.66576e+08
-3.93203e+09
4.21527e+07
-4.363e+06
-1.01181e+08
-1.57206e+09
2.37565e+07
-4.79737e+09
1.10392e+08
1.87498e+08
-5.47364e+08
-1.75032e+09
-1.11912e+08
1.69199e+08
1.06244e+07
1.12051e+08
-1.53452e+08
-1.41282e+08
1.9424e+06
2.55103e+08
2.46496e+07
-2.02731e+08
6.62454e+07
6.97916e+07
2.59258e+07
1.07327e+08
-1.63367e+07
2.69502e+08
6.21048e+07
5.2644e+07
7.71882e+07
4.79723e+07
-1.74893e+08
4.51688e+08
7.96841e+07
1.34116e+08
1.07961e+08
1.07985e+08
3.18686e+07
3.51544e+07
4.02906e+06
-2.21181e+07
-4.89759e+07
-3.95072e+08
2.10306e+07
3.89592e+08
-1.25891e+07
-6.53675e+07
6.21493e+07
3.79338e+06
-4.10127e+06
5.89542e+08
-5.32823e+09
1.33228e+09
9.64611e+08
1.17871e+09
1.20148e+09
6.25671e+08
-6.11837e+07
-5.97157e+09
1.82786e+08
1.24841e+09
1.67672e+09
1.54115e+09
-5.13623e+07
-5.89623e+09
5.84556e+06
1.52409e+09
1.69323e+09
1.5621e+09
-6.36296e+07
-9.07432e+08
4.22435e+08
1.91002e+08
2.35895e+08
2.02964e+08
1.12225e+09
-5.25407e+08
4.4752e+07
1.07906e+08
6.0385e+07
2.11783e+07
-5.02569e+09
1.70293e+08
3.2697e+08
-5.15585e+08
-1.734e+09
-4.88989e+08
-4.66179e+09
-5.02677e+08
-1.51572e+09
-5.21251e+08
8.18142e+07
1.63008e+06
2.36896e+07
-9.06808e+07
2.17745e+06
-1.96267e+07
4.47858e+07
1.63514e+07
-8.11218e+07
4.00419e+07
1.36036e+07
2.36284e+07
4.16612e+07
-2.39933e+07
6.80238e+07
1.98469e+08
2.20312e+07
7.12621e+06
1.51708e+07
1.4594e+07
-4.0197e+06
3.62063e+07
3.02619e+07
-2.39945e+06
-5.44215e+07
-5.93709e+06
-6.52419e+07
2.27848e+08
1.4705e+07
1.29041e+07
1.9768e+07
1.47369e+07
-3.15732e+08
2.32614e+07
3.30398e+08
-3.23431e+07
-4.55744e+07
-2.85944e+08
2.91967e+08
4.52837e+07
-4.69681e+07
6.96696e+08
-3.5957e+09
1.43738e+09
6.16509e+08
5.73399e+08
7.86158e+08
6.89645e+08
-4.36536e+09
-5.31751e+07
1.22322e+09
1.2181e+09
1.12495e+09
1.28354e+07
-3.67154e+09
7.76794e+08
1.08901e+09
9.99395e+08
6.7721e+07
1.16413e+09
-3.46189e+08
-5.48489e+08
-4.76407e+08
-9.17367e+09
6.88584e+08
-1.95272e+08
-1.60523e+08
-2.34294e+08
1.06428e+09
-8.79555e+09
3.36591e+08
-5.3385e+08
-3.20792e+08
-4.34743e+08
-8.36798e+09
-6.492e+07
-5.94205e+07
-7.9609e+09
-8.26735e+09
8.95639e+06
-7.95204e+09
2.13943e+06
4.38422e+07
1.29493e+09
-4.08969e+08
-4.02083e+08
-4.8952e+08
-7.86187e+09
1.5157e+09
-6.96317e+08
-5.94189e+08
-6.58752e+08
1.30084e+09
3.64458e+06
-4.01466e+08
-4.71153e+08
-4.9563e+08
-7.48183e+09
-6.12826e+07
-9.40504e+07
-7.45551e+09
-3.64962e+07
-4.974e+07
2.95221e+08
9.86003e+08
-2.95593e+08
-3.87396e+08
-2.94716e+08
-6.57055e+09
4.60355e+08
-6.31413e+07
-1.35731e+07
-7.21485e+07
8.74463e+08
-6.18279e+09
-3.39425e+08
-1.523e+08
-2.51837e+08
-7.19302e+09
1.19079e+08
9.41402e+07
-6.85327e+09
-6.54208e+09
-6.21488e+09
-3.247e+07
1.41481e+09
-5.08761e+08
-4.74218e+08
-5.4441e+08
-5.46253e+09
1.49228e+09
-5.63378e+08
-4.57846e+08
-6.01765e+08
1.44169e+09
-4.649e+08
-4.34994e+08
-5.1797e+08
-6.30925e+09
2.84652e+07
4.81253e+06
-5.75305e+09
3.87264e+06
-1.35537e+08
-6.14489e+07
5.47621e+07
1.43889e+08
-8.69932e+06
-6.88484e+07
1.39109e+09
-9.07283e+07
-2.17658e+07
-5.34172e+07
-2.97247e+07
2.10334e+09
6.78199e+06
-1.11528e+08
-1.21778e+08
-8.686e+07
-1.20103e+08
-1.33219e+06
1.95235e+09
-1.11163e+08
-6.31043e+07
-5.20568e+07
-1.27855e+08
-1.69203e+07
-1.66003e+07
3.44868e+06
6.71661e+06
2.21487e+07
-9.20171e+07
2.90554e+06
2.65868e+07
6.86309e+07
-3.88733e+06
2.20458e+09
-2.39686e+09
-9.03303e+07
-1.00734e+08
-1.16738e+08
-7.2659e+07
1.26505e+07
-4.56851e+07
1.89361e+09
-8.07504e+07
-4.77607e+07
-5.26109e+07
-8.1329e+07
2.07997e+09
-9.7181e+07
-5.27117e+07
-1.11573e+08
-5.77219e+07
-5.76571e+07
-6.23469e+07
1.99531e+07
4.82291e+07
2.0618e+07
2.94616e+07
1.30591e+08
-1.58989e+07
7.28975e+07
-1.1015e+08
-8.98352e+07
1.18728e+07
-1.37666e+08
1.87816e+08
2.38393e+07
2.20413e+07
3.78338e+07
1.19899e+07
1.45834e+08
-2.11655e+08
3.24726e+07
2.07539e+07
-7.20249e+06
5.49099e+07
-1.99916e+08
1.6921e+08
2.30092e+07
6.86982e+07
4.80187e+07
3.0311e+07
2.70018e+07
2.80232e+07
8.51702e+06
-4.40046e+07
-1.98173e+07
-4.59041e+06
-550848
9.65098e+06
1.02999e+08
4.70762e+07
-7.87034e+07
-1.43811e+07
-7.34886e+07
1.60477e+08
-1.35592e+08
5.03922e+07
1.54792e+07
1.84189e+07
8.09405e+06
2.7187e+07
1.09445e+08
-1.15056e+07
4.10896e+07
5.6746e+06
4.65412e+07
-1.86313e+07
1.28687e+08
1.22499e+07
2.9116e+07
3.98981e+06
2.00036e+07
5.28641e+07
-2.02179e+07
3.81984e+07
2.00189e+07
-3.35002e+07
-5.72346e+07
6.32967e+06
-3.39475e+07
2.91359e+07
-3.88055e+08
-4.5194e+08
3.56965e+08
4.83232e+08
9.6663e+06
-2.4191e+09
-2.1666e+08
-1.79987e+08
-2.36576e+08
-1.50412e+08
3.98988e+07
-1.93181e+09
-2.50426e+08
-2.54335e+08
-2.44461e+08
-2.61946e+08
-2.05583e+09
-2.7517e+08
-2.98184e+08
-2.93318e+08
-2.83525e+08
-3.1452e+08
-3.69864e+08
-1.59598e+07
2.89921e+08
3.95059e+08
-4.30222e+08
5.33235e+06
-3.14745e+06
-6.90631e+07
2.79748e+06
8.43836e+06
2.82992e+08
-3.65218e+08
-3.461e+08
-7.30513e+06
1.34057e+08
4.09516e+08
1.78159e+08
1.5955e+08
2.18523e+08
1.22499e+08
5.19814e+08
3.82168e+07
-4.74103e+07
1.31731e+08
1.27612e+08
1.74653e+08
9.50417e+07
2.98197e+07
6.0664e+08
2.27086e+08
3.64643e+08
2.91284e+08
2.90551e+08
9.71856e+07
1.89219e+07
-1.29529e+08
-5.32606e+07
-3.88718e+08
7.06029e+06
-3.16166e+08
1.18931e+07
-9.33918e+06
2.61149e+08
-3.43711e+08
1.47239e+07
-3.10725e+08
2.97703e+07
-2.13812e+07
5.4346e+08
2.42455e+08
2.97289e+08
3.12229e+08
2.35743e+08
5.13864e+08
2.65974e+06
1.48795e+08
1.14742e+08
1.59436e+08
1.10131e+08
6.08325e+08
2.54842e+08
3.49915e+08
3.2847e+08
2.76285e+08
3.02008e+07
2.1394e+08
-2.55658e+07
-2.84505e+08
-2.47756e+08
1.75404e+07
-8.68862e+07
-3.75337e+07
1.48117e+07
-2.77209e+06
9.29129e+07
-6.37473e+07
1.75285e+09
-9.20826e+07
-2.50142e+07
-1.77415e+07
-8.73851e+07
1.99683e+09
-1.74241e+07
-1.01883e+08
-1.04986e+08
-9.91949e+07
-9.47122e+07
-3.81809e+07
1.7716e+09
-1.01055e+08
-2.29831e+07
-1.3404e+07
-7.96025e+07
-7.41256e+07
-6.15141e+07
-4.36446e+07
8.4642e+06
1.05672e+08
-6.77006e+07
4.35671e+07
3.40578e+07
-4.49377e+06
1.17242e+07
1.88214e+09
-2.16485e+09
-7.80801e+07
-9.81644e+07
-9.94948e+07
-5.20898e+07
1.81437e+07
8.29454e+08
-7.46358e+06
4.56938e+06
4.64428e+06
-3.31608e+06
1.60188e+09
-2.69065e+07
-4.84307e+07
-4.55517e+07
-1.04122e+07
2.36327e+06
2.14593e+07
-1.01096e+07
-8.14464e+06
-5.67409e+06
9.45628e+07
-2.50609e+07
9.4601e+07
1.50386e+07
-8.52642e+07
-9.36099e+07
-1.54159e+08
1.81958e+08
5.23884e+07
6.79163e+07
7.55277e+07
4.45454e+07
9.33341e+07
-1.07768e+08
6.03726e+07
2.30994e+07
3.04945e+07
5.5051e+07
9.714e+07
6.18807e+07
-1.46484e+07
-9.33584e+07
-7.09985e+07
-2.19991e+08
2.16205e+08
5.29747e+07
5.74537e+07
7.09002e+07
4.49917e+07
9.18286e+06
-1.56761e+06
-1.1011e+07
6.20134e+07
5.20234e+07
-2.58296e+07
-9.18653e+07
-2.0915e+07
1.07943e+08
-1.03357e+07
3.97693e+06
-1.36612e+06
-4.34588e+06
1.35033e+07
5.23586e+07
-4.76966e+07
3.74504e+07
3.9261e+07
5.52822e+07
2.84591e+07
2.88122e+07
1.83806e+07
1.13302e+07
1.49476e+06
4.38418e+07
542703
-6.67201e+06
8.06145e+06
-308635
-1.58264e+06
3.51615e+06
2.85838e+06
-3.92122e+08
-4.38102e+08
3.47341e+08
4.92954e+08
6.65838e+06
-2.16881e+09
-1.84255e+08
-1.71919e+08
-2.38928e+08
-1.17312e+08
-8.30522e+07
-1.28559e+09
-1.73183e+08
-1.2127e+08
-1.75331e+08
-1.12293e+08
-1.89302e+09
-2.34183e+08
-3.02619e+08
-3.00593e+08
-2.40824e+08
-5.91476e+07
-1.55688e+08
2.08315e+07
1.15222e+08
7.96247e+07
-3.50982e+08
5.67481e+06
-9.78268e+06
-3.11959e+08
1.59461e+07
2.03163e+07
2.40532e+08
-2.97893e+07
-3.10359e+08
-2.70259e+08
1.03415e+07
4.92608e+08
2.26782e+08
2.95161e+08
2.32108e+08
2.91349e+08
3.48987e+08
-3.06203e+06
2.37358e+08
1.25068e+08
1.19416e+08
1.33044e+08
1.09691e+08
2.02595e+08
3.74761e+07
-2.80498e+08
-2.3975e+08
-5.29988e+07
5.01417e+08
2.35591e+08
3.17658e+08
3.03164e+08
2.50735e+08
-3.8898e+08
3.36504e+06
-6.20851e+07
3.26648e+06
2.53351e+08
-3.34537e+08
-2.96549e+08
9.85106e+06
1.47438e+08
3.1643e+08
1.6382e+08
1.47852e+08
2.00864e+08
1.12965e+08
3.22479e+08
2.65836e+08
1.13899e+08
1.38163e+08
1.45023e+08
1.12046e+08
4.77107e+08
2.14854e+08
3.41592e+08
2.7219e+08
2.71285e+08
8.39555e+07
1.73948e+07
-1.18626e+08
-4.38085e+07
2.08867e+07
1.50692e+08
-2.8629e+06
2.57413e+07
5.95236e+06
1.44651e+08
7.29778e+07
-1.30096e+08
-1.01681e+08
2.31593e+07
2.06421e+08
5.50135e+07
3.8182e+07
8.27898e+07
-2.5597e+06
1.5265e+08
1.05802e+08
4.38276e+06
-1.70048e+07
2.03062e+06
-1.29468e+07
3.25703e+08
3.39799e+07
8.22141e+07
7.27545e+07
3.60843e+07
2.38483e+06
2.27137e+07
-1.39185e+07
-3.36574e+07
1.85505e+07
1.26767e+08
3.87795e+07
1.80878e+07
-7.92262e+06
-8.30583e+06
4.76307e+07
-1.41467e+08
1.9736e+08
7.19005e+07
-2.61285e+07
-2.81053e+07
1.45735e+09
-1.07904e+08
-4.47375e+07
-8.12674e+07
-4.73913e+07
2.20131e+09
1.42318e+08
-2.45158e+09
-1.2269e+08
-1.41096e+08
-1.55776e+08
-1.03612e+08
1.49305e+08
1.97244e+09
-1.2726e+08
-7.19363e+07
-6.63374e+07
-1.5827e+08
-1.22672e+07
-8.23349e+06
2.04444e+07
2.53445e+07
-9.94503e+07
1.63387e+08
6.82017e+07
4.08058e+07
2.33497e+09
-2.4815e+09
-1.07311e+08
-1.33901e+08
-1.39612e+08
-9.0222e+07
-2.48096e+08
2.37069e+08
2.11603e+09
-7.41948e+07
-3.89045e+07
-4.62133e+07
-6.18708e+07
1.76094e+07
5.79569e+07
-4.5924e+07
-1.70793e+07
3.31129e+06
2.12916e+09
-9.53821e+07
-6.13636e+07
-1.2907e+08
-4.17708e+07
3.27803e+07
2.52284e+08
-2.96958e+08
-3.57803e+08
-2.09346e+07
4.44231e+08
7.38572e+07
1.286e+08
1.24481e+08
8.94295e+07
1.75881e+08
1.58818e+08
3.63561e+08
1.75273e+08
1.60201e+08
2.19181e+08
1.18581e+08
9.05841e+07
5.45053e+08
2.20807e+08
3.66155e+08
2.87566e+08
2.90143e+08
8.65029e+07
2.32903e+07
-4.59362e+07
-1.26779e+08
-3.51336e+08
3.5283e+08
2.28575e+07
-2.98528e+08
2.92433e+08
-3.53163e+07
2.40781e+08
-2.69582e+08
-3.27282e+08
4.09249e+07
4.94573e+08
1.47246e+08
9.51544e+07
9.69626e+07
1.51298e+08
-5.65433e+07
1.193e+08
5.52226e+08
2.2687e+08
2.93869e+08
3.00945e+08
2.33395e+08
5.78136e+08
2.4415e+08
3.35886e+08
2.56736e+08
3.21327e+08
8.82012e+07
1.98941e+08
-6.65637e+07
-2.32163e+08
-2.77888e+08
3.16852e+07
-4.75796e+08
5.01e+08
3.56779e+08
-1.96e+07
-5.77177e+07
-1.388e+09
-1.7883e+08
-1.19901e+08
-1.75674e+08
-1.15186e+08
-2.39418e+09
8.02184e+07
-2.01809e+08
-2.08334e+08
-1.51573e+08
-2.56632e+08
3.30899e+07
-2.05173e+09
-2.35735e+08
-2.92609e+08
-2.35819e+08
-2.94025e+08
-1.69802e+08
2.77706e+07
8.51332e+07
1.20492e+08
-4.40491e+08
4.52687e+08
4.01819e+07
3.37443e+08
-2.46347e+09
-2.13152e+08
-1.94877e+08
-1.51524e+08
-2.43693e+08
-9.0092e+07
1.33288e+08
-1.92225e+09
-2.34601e+08
-2.32607e+08
-2.44707e+08
-2.19283e+08
8.11191e+07
-3.70236e+08
-6.28475e+07
3.73545e+08
2.77093e+08
-2.10171e+09
-2.53691e+08
-2.78657e+08
-2.78167e+08
-2.5917e+08
2.56845e+07
5.10446e+07
4.77655e+06
3.20165e+07
-4.88245e+06
-1.41158e+07
-578679
-1.43919e+07
3.14781e+07
-945949
-7.16468e+07
1.2165e+07
3.57745e+07
2.61186e+07
2.51193e+07
1.46682e+07
1.11573e+08
-1.35343e+07
-9.47254e+06
-2.20238e+07
-1.43361e+06
-1.4109e+07
-1.65136e+07
-2.85365e+07
-1.1375e+07
-2.98848e+07
1.0017e+07
-4.31042e+06
-2.70614e+06
-5.69731e+06
2.72806e+06
1.3325e+06
1.00502e+07
-6.0117e+06
1.56498e+07
3.64547e+07
-4.73093e+07
-1.72583e+07
1.04207e+08
-2.67769e+07
1.5883e+08
2.00969e+09
-4.02864e+07
-3.55391e+07
-5.59291e+07
-2.49742e+07
2.10589e+09
1.18422e+08
-2.1604e+09
-6.3962e+07
-7.96562e+07
-7.51736e+07
-6.65826e+07
2.89198e+07
5.03914e+06
1.99727e+07
-1.08299e+07
1.16889e+08
1.97238e+09
-4.13465e+07
-1.5184e+07
-1.85009e+07
-4.37227e+07
3.74108e+07
-9.96534e+06
-1.85986e+07
2.76867e+07
1.97369e+09
-2.09111e+09
-4.0987e+07
-7.13999e+07
-9.13586e+07
-4.53972e+07
-1.18645e+08
1.27962e+09
-6.24966e+06
-5.35644e+06
-1.04027e+07
1.73212e+06
1.81187e+09
-2.23263e+07
-9.24859e+06
-4.26313e+07
-1.78692e+07
4.62881e+07
-1.47657e+07
-2.36772e+07
-1.52541e+07
5.0944e+07
2.46954e+08
-2.775e+08
-6.50426e+07
-2.64674e+08
6.39585e+08
5.48576e+07
1.08373e+08
5.74868e+07
5.56102e+07
1.1604e+08
1.00218e+08
6.30965e+08
1.95249e+08
2.55107e+08
1.98124e+08
2.53858e+08
2.06569e+08
8.78015e+07
-2.31643e+08
-2.52424e+08
4.89614e+07
6.86371e+08
1.89694e+08
2.61459e+08
2.03175e+08
2.49247e+08
-3.4643e+08
3.58754e+08
1.4915e+07
-5.24902e+07
5.84459e+07
-4.86519e+06
2.59237e+08
-3.02606e+08
-2.76989e+08
3.1788e+07
6.36694e+08
9.82588e+07
6.02566e+07
5.59225e+07
1.21141e+08
4.587e+07
4.53245e+08
1.29465e+08
1.10968e+08
1.61246e+08
8.47981e+07
6.75972e+08
1.6316e+08
2.69905e+08
2.06134e+08
2.14116e+08
9.11896e+07
3.50748e+06
-4.93391e+07
-9.31902e+07
4.58556e+07
-3.67194e+08
-5.90668e+07
3.84104e+08
3.33156e+08
1.33522e+08
-1.68151e+09
-2.33059e+08
-2.4364e+08
-2.23228e+08
-2.53862e+08
-2.05497e+09
1.43784e+08
-2.00399e+08
-1.56344e+08
-1.32733e+08
-2.1071e+08
-3.41912e+08
7.96642e+07
3.56358e+08
2.84915e+08
1.22239e+08
-1.6393e+09
-2.43078e+08
-2.81191e+08
-2.66353e+08
-2.56182e+08
-3.84949e+08
4.14499e+08
3.51914e+08
2.83114e+07
-1.93534e+09
-1.72744e+08
-1.61367e+08
-1.08975e+08
-2.18059e+08
-1.21967e+08
-1.00687e+09
-1.55614e+08
-1.20013e+08
-1.7209e+08
-1.00576e+08
-1.53018e+09
-2.09741e+08
-2.94569e+08
-2.63294e+08
-2.32932e+08
-1.31962e+08
6.05645e+06
6.69232e+07
1.19763e+08
1.57825e+08
5.0308e+07
-4.24124e+07
-3.18148e+07
-3.08787e+07
4.24948e+07
-3.48215e+07
-1.77965e+07
-6.28106e+07
-2.53412e+07
-1.43165e+08
-1.3608e+08
-1.75381e+09
-1.11041e+07
-8.58955e+07
-4.26277e+07
1.5715e+07
-5.38396e+07
-8.40662e+07
5.05768e+07
-7.09772e+07
-1.13988e+07
-6.21146e+07
-3.14531e+07
-2.8432e+07
1.5359e+08
7.60512e+07
8.40538e+06
-3.33481e+07
-3.83899e+07
4.77088e+07
4.00971e+07
-8.61402e+07
-6.2643e+07
-5.19776e+07
-6.35646e+07
-1.21851e+08
6.36751e+07
-1.57638e+09
-6.38533e+07
6.92134e+07
1.33259e+08
-1.43988e+08
1.15429e+08
1.89737e+07
4.83593e+07
7.84226e+07
1.8171e+07
8.71681e+07
-7.08405e+07
-3.50034e+07
-4.1467e+07
-1.10183e+08
8.04099e+07
4.13678e+08
-6.66364e+07
-1.25679e+08
-6.73123e+07
-1.76631e+08
-1.98757e+06
-4.3593e+07
2.42662e+06
-1.91861e+09
4.18573e+07
5.67875e+07
-1.02122e+08
4.09917e+07
-3.54409e+08
-8.04167e+07
-1.00441e+08
-1.70836e+08
-4.47435e+07
-8.29326e+06
-1.29926e+07
8.15636e+08
-1.59787e+09
-3.93524e+07
-7.02419e+06
5.26559e+08
3.66856e+08
4.2061e+08
-2.5457e+08
-2.16903e+08
-1.987e+08
5.62437e+07
-5.41572e+08
1.69551e+09
-5.54857e+08
2.27187e+06
9.0418e+07
1.06641e+09
-1.66731e+07
1.52582e+07
3.26672e+08
2.22859e+08
3.22262e+08
-1.93655e+08
-1.08424e+08
-1.54742e+08
8.3007e+08
-1.67178e+09
-3.57619e+07
5.04007e+08
4.09344e+08
4.71018e+08
-2.35805e+08
-2.41659e+08
-2.1839e+08
1.79426e+09
-5.66272e+08
6.10403e+07
-7.63665e+08
-7.9491e+07
5.22796e+07
1.56625e+09
-7.04249e+07
-3.27381e+07
3.87081e+08
4.2673e+08
4.48379e+08
-2.1979e+08
-1.9321e+08
-1.99535e+08
5.50041e+07
4.04392e+08
8.52106e+06
-1.48556e+08
-6.05117e+07
-1.35439e+08
-3.39131e+07
-2.04125e+07
-7.30098e+06
-1.34939e+09
1.08774e+08
-1.28186e+08
7.25328e+07
1.62675e+07
-2.56838e+08
-5.06503e+07
-5.66264e+07
-8.80564e+07
7.39568e+06
1.3301e+07
1.35891e+07
7.91432e+08
1.89757e+06
-1.61541e+09
-1.27815e+07
4.67639e+08
3.80816e+08
4.43842e+08
-2.20467e+08
-2.05585e+08
-1.9165e+08
-4.74855e+07
-7.44012e+08
1.80144e+09
-5.24272e+08
-7.42136e+07
1.57255e+09
-3.59393e+07
-4.92729e+07
3.64362e+08
4.26832e+08
4.26387e+08
-2.12923e+08
-1.80889e+08
-1.89451e+08
-7.92764e+07
7.61756e+08
-1.54864e+09
-4.16303e+07
4.93766e+08
3.3124e+08
3.89442e+08
-2.14576e+08
-1.93037e+08
-1.68924e+08
1.70123e+09
-5.00502e+08
7.68919e+07
-4.92175e+08
1.22185e+08
1.02751e+09
2.95907e+08
2.09167e+08
2.99869e+08
-1.66461e+08
-8.86723e+07
-1.26639e+08
-3.62709e+08
2.50767e+08
-5.82774e+07
1.23778e+08
-7.32466e+07
-9.66184e+07
-6.61776e+07
1.25511e+08
8.24109e+07
4.53821e+07
1.38119e+07
7.11579e+07
-1.08967e+08
-1.72351e+08
-1.04435e+08
-1.76869e+09
4.79379e+07
2.27857e+07
7.89545e+07
-8.07583e+07
-3.20739e+07
-5.34652e+07
6.36087e+07
-6.33197e+07
2.89843e+07
-1.64229e+08
9.51514e+07
1.9596e+08
-5.10476e+07
-4.21316e+07
-3.02007e+07
4.65514e+07
8.89486e+07
-4.18062e+07
-3.39023e+07
-3.74196e+08
1.67658e+07
-3.84451e+07
-1.98992e+09
-1.0508e+08
-1.79862e+08
1.77365e+08
8.6693e+07
-2.76062e+07
-9.07838e+06
-9.14947e+06
-4.79169e+07
-1.46855e+08
-1.50341e+08
-1.65164e+09
7.1137e+08
-7.70405e+07
7.13759e+07
-2.253e+08
-1.94199e+08
-1.78297e+08
5.40952e+08
3.62371e+08
4.30963e+08
1.1997e+08
1.11e+09
8.91919e+07
-4.6845e+08
-4.84585e+08
1.78505e+09
4.8563e+07
7.23599e+07
4.716e+07
-1.709e+08
-9.53102e+07
-1.34825e+08
3.23922e+08
2.27547e+08
3.33181e+08
-1.68779e+09
8.91248e+07
7.29852e+08
-2.18879e+08
-2.18261e+08
-2.00469e+08
4.07949e+08
5.07136e+08
4.79833e+08
-2.15023e+07
1.5555e+09
6.41784e+07
-5.03301e+08
1.85018e+09
-6.75612e+08
-2.98573e+07
6.31362e+07
1.50862e+08
-2.09962e+08
-1.87706e+08
-1.97298e+08
3.79611e+08
4.2897e+08
4.46425e+08
-7.60529e+07
1.58847e+08
6.29805e+07
1.69412e+07
-3.26315e+07
-2.34678e+07
-2.68024e+07
3.20111e+07
-5.52004e+07
-7.92109e+07
-2.92902e+08
6.23608e+07
-7.71291e+07
1.43442e+08
6.33645e+07
-1.92964e+09
1.77183e+08
-3.12793e+07
-2.10849e+07
-2.40045e+07
4.22071e+06
-1.32314e+08
-9.87875e+07
2.46613e+07
1.42359e+08
2.93941e+08
-4.4597e+06
2.15897e+07
7.21785e+06
-4.69016e+06
6.70341e+06
-1.20369e+08
-3.74013e+07
-1.08391e+08
5.59394e+07
-3.39147e+08
1.60819e+08
-1.69186e+09
-1.85762e+08
1.13916e+07
1.49301e+06
2.87313e+06
9.63871e+06
-3.08699e+07
-1.28224e+08
-1.20193e+08
-1.32433e+08
-1.26965e+09
7.98356e+08
9.37297e+07
-2.29792e+08
-2.49478e+08
-2.31561e+08
3.40384e+08
4.00819e+08
3.85176e+08
1.3199e+09
5.96331e+07
-7.27939e+08
6.67689e+07
-5.76985e+08
1.35648e+09
1.75019e+07
-2.13866e+08
-2.04252e+08
-2.14389e+08
3.40593e+08
3.89497e+08
3.86438e+08
2.79086e+07
4.07756e+07
-1.16492e+09
7.7205e+08
2.02133e+07
-2.64542e+08
-2.00197e+08
-2.06629e+08
4.12138e+08
2.91053e+08
3.27117e+08
2.47717e+07
7.59221e+08
-5.63123e+08
1.22686e+09
8.46175e+06
-5.09302e+08
-1.77016e+08
-1.14043e+08
-1.61318e+08
2.63705e+08
1.68336e+08
2.53978e+08
-4.50084e+08
1.0741e+07
-3.99447e+08
6.35836e+08
-4.45249e+07
-3.0299e+06
5.94321e+08
1.09285e+06
5.29517e+08
-3.48192e+06
5.07407e+06
2.90815e+08
4.04321e+08
-4.29142e+06
-3.27427e+08
2.4981e+06
8.17678e+08
5.12366e+06
1.85561e+06
3.90663e+08
3.08283e+07
8.18598e+07
-6.61033e+08
-3.71767e+07
-1.11645e+08
8.61063e+07
-1.1372e+07
2.39927e+08
-1.61367e+08
4.93965e+08
2.26593e+07
-7.3426e+06
-5.68792e+08
3.61528e+08
1.88753e+07
3.28978e+08
2.00947e+07
-4.00552e+08
-4.63997e+08
-2.65948e+07
2.60808e+08
4.67776e+08
-3.81897e+08
5.51665e+06
2.1734e+08
-5.63495e+06
9.28286e+07
-4.73873e+08
2.05288e+07
-4.11169e+08
-1.86164e+07
6.22825e+08
-1.27336e+07
5.14868e+08
7.28655e+06
3.02282e+08
4.07203e+08
-2.26792e+07
-3.23069e+08
4.52706e+08
-5.10832e+06
2.80903e+06
-1.18656e+07
6.8724e+08
1.51033e+07
-8.52599e+06
-8.79168e+06
4.027e+08
-5.98556e+08
1.30465e+07
-4.17933e+08
-3.10719e+06
1.0194e+07
2.70906e+08
-6.07395e+08
-4.84354e+06
2.83407e+06
2.4264e+08
-1.80657e+07
-4.54916e+08
-3.91951e+08
2.88665e+08
3.914e+08
-3.10058e+08
4.58549e+08
1.18834e+07
-5.16166e+06
3.91908e+08
9.07626e+06
-5.1286e+06
-1.24719e+07
4.20551e+08
7.50016e+06
-3.27334e+06
-4.68062e+08
2.97278e+08
5.22008e+06
2.67433e+08
949494
1.26531e+08
-2.72273e+07
6.12628e+07
-1.0081e+08
2.02837e+07
-5.11502e+06
-1.5308e+08
5.01043e+06
-8.58786e+07
1.7758e+07
-1.24456e+07
-1.11917e+08
-1.15535e+08
1.48882e+06
1.31134e+08
9.55694e+06
-1.35334e+08
-2.29582e+07
5.21489e+06
-1.35514e+07
-2.81011e+07
851460
1.00095e+08
2.95386e+07
3.45731e+06
5.41399e+06
3.10597e+07
3.77201e+07
1.96669e+07
-1.7239e+07
-1.63977e+07
8.94723e+06
2.57483e+07
3.93878e+07
-3.82107e+06
4.88255e+07
-1.86293e+07
1.29295e+08
6.82521e+07
-1.48908e+07
-1.44412e+08
-9.38827e+07
1.62847e+08
5.56007e+06
-2.75766e+07
-3.30722e+06
-2.51717e+07
-6.64633e+06
-2.99053e+08
2.95757e+08
-3.46451e+08
3.45931e+08
5.0107e+07
53526.4
2.02873e+07
-5.75867e+07
1.68939e+06
-4.3097e+06
-9.27297e+07
5.97622e+06
-4.39213e+07
-1.02783e+07
2.62189e+06
2.09976e+07
-2.40554e+07
354782
-6.61914e+06
1.91566e+06
-8.65659e+07
-1.06569e+07
-1.70701e+06
-1.97444e+07
1.47474e+06
-700559
6.70022e+07
-1.32575e+07
1.4497e+07
3.58678e+06
2.42959e+07
-4.12682e+06
1.86106e+06
5.70086e+07
1.1342e+06
-1.92606e+07
65934.7
4.06152e+06
2.39402e+07
4.5354e+06
-2.12438e+07
3.2272e+06
-2.09509e+07
3.30833e+06
6.35367e+07
2.40914e+07
-6.20872e+07
-1.43715e+07
4.48916e+07
-5.48526e+07
-3.3651e+06
4.20174e+06
-1.72598e+07
1.39753e+06
-3.936e+06
3.44496e+06
-4.15204e+07
-2.91567e+08
3.07048e+08
-2.83118e+08
2.92756e+08
5.28027e+07
3.06299e+07
-8.81412e+07
-8.89099e+07
-2.13155e+07
-1.56572e+07
-3.5778e+07
1.07723e+07
1.20635e+08
-9.08375e+06
2.94734e+07
4.39971e+07
8.8415e+07
-4.6593e+06
-9.64996e+07
-6.46979e+06
-5.15249e+07
3.67296e+07
-9.93055e+06
-1.58467e+08
3.82759e+07
-1.87196e+07
5.60943e+07
-3.6531e+07
7.87723e+07
-1.98744e+07
7.54468e+07
-2.19407e+08
-413972
-2.83617e+06
2.14186e+08
2.62758e+07
4.10998e+07
2.48007e+07
-1.16991e+08
3.12549e+07
4.58689e+07
1.16972e+08
-1.1729e+08
616183
-8.74213e+07
9.94951e+06
1.04444e+07
-1.83298e+07
1.874e+08
-2.30442e+07
-2.1869e+08
-2.8179e+07
-1.35185e+08
-6.6334e+06
6.87955e+07
2.72708e+07
2.70058e+07
-1.88522e+07
-3.13178e+07
-4.90573e+07
-1.61094e+08
-2.68205e+07
-1.51065e+07
-2.62723e+08
-4.82151e+07
5.66483e+06
2.16859e+08
1.37484e+07
2.27657e+08
-2.96933e+08
-2.74158e+07
109257
-3.10276e+08
1.50857e+08
-6.67555e+07
-2.66167e+07
-2.7722e+08
2.63349e+08
1.49499e+07
-3.51969e+08
-3.33617e+08
1.84137e+08
-4.61232e+06
-7.33793e+07
2.73968e+07
-4.66378e+07
-4.5162e+07
3.87329e+07
-1.19347e+08
-4.86132e+07
6.63566e+07
3.22687e+07
-7.22463e+07
-9.19788e+07
5.41066e+07
6.65099e+07
-3.69694e+07
-9.98607e+07
3.88399e+07
2.49788e+07
-5.54745e+07
-2.89735e+07
1.12316e+07
-9.61032e+07
-4.7383e+06
-8.09391e+07
-7.18125e+07
6.59284e+06
9.46195e+07
2.0537e+07
5.84088e+06
-1.19061e+08
-3.91334e+07
-5.19344e+07
1.51517e+06
-2.1067e+07
1.02369e+08
1.40689e+07
1.06757e+07
1.64479e+07
2.01482e+07
-6.52625e+07
-2.30347e+07
7.19159e+06
6.11431e+07
-8.19398e+06
-2.62129e+07
5.70501e+07
8.36941e+07
2.35495e+07
-7.07364e+07
-8.76301e+07
1.10354e+08
-1.62525e+07
-3.76224e+07
-1.90492e+06
-1.80652e+07
-2.71525e+06
3.24665e+07
4.3795e+07
5.4908e+07
-4.09074e+07
-7.91989e+07
-3.18805e+07
-4.88491e+07
-2.86676e+07
-5.57441e+07
-1.5641e+07
4.17172e+07
-6.67721e+07
-1.16426e+07
-2.16913e+07
-9.12864e+07
-1.24686e+07
-3.62347e+07
-2.77528e+07
6.7277e+07
4.4867e+07
2.79688e+07
4.08833e+07
-3.12828e+07
-9.62641e+06
7.30925e+07
-3.0217e+07
5.81637e+07
-9.0184e+06
2.64623e+07
4.51703e+07
-2.96855e+07
-1.11153e+07
-4.64505e+07
1.7114e+07
1.12428e+07
-3.36117e+07
-907485
1.37488e+07
-6.49666e+07
-5.80083e+06
-2.79426e+07
3.46143e+07
-2.84522e+07
3.63438e+07
-2.283e+07
-1.65399e+07
-1.19022e+07
-1.08785e+06
-5.71817e+06
-5.13393e+08
-4.42194e+08
6.82823e+08
9.52507e+06
5.64594e+08
822399
4.84373e+08
6.41528e+06
3.2525e+08
4.39752e+08
1.06845e+07
-3.53531e+08
7.56639e+08
799081
4.56454e+06
8.49224e+06
4.45711e+08
-6.71248e+06
-6.3868e+08
-4.31968e+08
3.63004e+06
-6.21447e+08
-6.70743e+06
-1.47211e+07
4.76112e+08
-5.25437e+08
1.46241e+07
1.52537e+07
-4.81213e+08
-4.10077e+08
3.00237e+08
4.11382e+08
-3.27095e+08
4.64952e+08
-6.25693e+06
3.98173e+08
-5.8694e+06
-1.17069e+06
-3.27957e+08
-3.78986e+08
1.90599e+08
2.60153e+08
1.01797e+07
-2.44974e+08
1.39654e+07
-2.44656e+06
-2.50847e+08
-808518
-3.39557e+06
-3.48688e+08
6.41725e+06
-2.81051e+08
-2.62243e+08
-6.49743e+06
535431
-4.92371e+06
-3.10745e+08
1.12821e+07
-1.04421e+08
-3.26247e+07
-6.38973e+06
2.54466e+08
2.8507e+07
2.20725e+07
-4.25435e+06
2.48229e+07
-2.33872e+07
5.50434e+07
1.07336e+07
-1.31867e+08
1.4172e+08
-1.66275e+07
2.27655e+07
-2.4591e+07
1.58084e+07
-3.00734e+07
1.70889e+08
3.07269e+08
-2.73968e+07
-2.47178e+08
-3.11278e+08
1.19739e+07
-8.88676e+07
8.93285e+06
-6.12785e+07
7.60475e+06
-3.5284e+08
-3.27739e+08
2.07607e+08
-1.63907e+07
2.80217e+08
2.21782e+07
-2.38864e+08
2.02425e+06
-2.32254e+08
-3.17395e+08
-2.77874e+08
1.71666e+07
-3.11577e+08
7.0793e+06
2.72736e+06
-2.7366e+08
9.70499e+06
3.18314e+07
-8.63511e+07
2.15944e+08
-2.8548e+07
7.4174e+07
-3.72982e+07
4.82586e+07
1.9383e+07
2.02522e+08
4.20498e+07
-3.49001e+07
1.05108e+07
1.89967e+08
2.60984e+08
3.09099e+07
-2.96066e+08
-2.58864e+08
-9.32236e+06
-1.79297e+08
8.91125e+06
-1.18258e+07
-2.51989e+08
1.62841e+07
3.78949e+07
-2.07941e+07
-9.98189e+07
1.1921e+08
2.47884e+07
-1.01725e+07
-983524
-3.03661e+07
2.59608e+07
-8.28812e+07
7.91707e+06
-3.07253e+07
2.27459e+06
-4.87726e+07
-2.20683e+06
2.23064e+07
9.62462e+07
1.62381e+07
-9.22631e+07
6.04311e+07
-1.23768e+07
4.2008e+07
1.97044e+07
-6.73355e+07
2.25662e+07
282267
-1.39497e+08
4.0879e+07
7.08783e+06
-3.54747e+06
-1.92311e+07
1.69204e+08
-883066
5.07416e+07
-6.58227e+07
6.97626e+07
-8.58562e+07
2.35543e+07
1.1546e+08
-9.02528e+07
-4.68626e+07
-1.98944e+06
6.08491e+07
-2.98858e+07
-1.63146e+08
2.45564e+07
-4.2098e+06
1.79332e+08
1.43841e+07
4.11643e+07
-6.82852e+06
1.38182e+08
2.34849e+07
-1.81687e+08
-870185
-1.74913e+08
9.39474e+06
-6.46611e+06
4.29342e+07
1.81656e+06
-3.25055e+07
3.69686e+06
-2.21513e+07
-2.12091e+08
3.45934e+06
3.37269e+07
-2.04071e+08
5.82057e+06
-9.83113e+06
1.43726e+08
-1.58583e+07
6.2322e+07
-8.10536e+07
-1.33227e+07
-2.46828e+08
3.42038e+07
-9.35156e+06
-2.60904e+08
2.79773e+08
-1.32307e+06
-3.627e+08
-3.27381e+08
1.01828e+08
1.00083e+07
2.34094e+07
-1.08089e+07
-4.30171e+07
-3.47984e+06
-1.10667e+07
-4.91574e+07
-718068
-5.13965e+06
6.66959e+07
7.53448e+07
-2.71229e+07
2.64601e+07
-8.93102e+07
-9.43485e+07
-8.03477e+07
1.07351e+07
9.26032e+07
3.09492e+07
-7.89618e+07
-4.24109e+07
4.13059e+06
-7.92782e+07
-1.83531e+07
2.21997e+07
-847201
-9.86802e+07
-4.19384e+07
-2.86026e+07
2.07834e+07
8.46078e+07
-1.40083e+07
-1.60835e+07
2.65689e+07
-8.30769e+06
8.00034e+07
5.54226e+07
2.79531e+07
8.01764e+07
-1.02961e+08
-7.45461e+07
1.02593e+08
-8.72229e+06
-5.2619e+07
-7.19403e+07
-4.78311e+06
-3.32059e+07
-1.08089e+07
7.79199e+06
3.59434e+07
-1.72446e+07
-1.84387e+07
-1.32897e+06
1.845e+07
4.82021e+07
3.87803e+07
-4.64757e+07
-3.93597e+07
-3.16593e+07
-5.89809e+07
-8.37882e+07
-2.59844e+07
-4.28167e+06
-3.59371e+07
-1.67141e+07
1.58098e+07
-2.32582e+07
-9.25545e+07
-2.30555e+07
-1.79525e+07
-8.44818e+06
8.25383e+06
4.12205e+07
8.15316e+06
4.47158e+06
-216476
-3.86506e+06
2.97636e+06
1.13267e+07
2.04766e+07
-2.09565e+07
3.52345e+07
-5.02555e+06
-7.97872e+06
-1.26249e+06
-557424
2.14532e+07
-1.42348e+07
324048
-5.03937e+06
3.49629e+06
1.42483e+07
-2.55734e+06
6.64169e+06
-8.03788e+06
-2.87483e+06
-2.77893e+06
-4.06831e+08
-3.6671e+08
5.78329e+08
-3.4162e+07
5.42816e+08
3.86943e+06
4.95655e+08
1.49492e+06
2.60855e+08
3.68121e+08
2.74571e+06
-2.92565e+08
7.51044e+08
6.88642e+06
3.05993e+06
3.66717e+08
2.67217e+07
7.26403e+07
-6.10667e+08
-3.01411e+07
-1.01335e+08
-7.25554e+06
-1.47717e+08
1.27849e+07
4.54543e+08
-5.2585e+08
-2.59464e+06
-3.66217e+08
-4.27401e+08
-2.31125e+07
2.30259e+08
4.28322e+08
-3.37999e+08
4.53282e+06
1.99247e+08
-3.98107e+06
8.38753e+07
-1.35013e+07
-3.18709e+08
-3.06793e+08
1.77523e+08
2.44072e+08
4.17488e+07
-4.63799e+07
-1.8413e+08
-2.87293e+08
-2.47246e+08
-3.35104e+07
-1.65804e+07
-1.91793e+08
9.88701e+06
-1.47011e+07
-2.65326e+08
8.41599e+06
-1.45123e+07
-1.77269e+07
-1.9671e+08
2.97318e+07
-5.0519e+07
-5.90099e+07
1.82698e+08
4.95063e+07
6.71919e+07
5.46899e+07
3.46894e+07
1.91816e+08
5.47848e+07
4.67235e+07
-4.6281e+07
1.72537e+08
2.37671e+08
-2.75618e+08
-2.39492e+08
-1.72679e+08
1.56956e+07
-2.42859e+08
1.95479e+07
4.23691e+07
-5.44923e+07
5.20242e+07
-4.7243e+07
3.31805e+07
7.95201e+07
3.06243e+07
6.24981e+07
1.2779e+06
-2.89857e+08
-3.32931e+08
1.5155e+08
-1.61437e+07
2.20678e+08
-1.64245e+08
2.30766e+07
4.69047e+06
-2.02394e+08
-2.9249e+08
3.7081e+06
-2.53525e+08
-2.23843e+08
4.79127e+06
6.27572e+06
-2.10213e+08
620995
-2.77035e+07
-3.0854e+07
-9.34862e+06
1.61522e+08
2.79767e+07
7.72866e+06
1.618e+07
9.79455e+06
8.03441e+07
3.64333e+07
-1.69628e+07
-4.46335e+07
5.15289e+07
1.73528e+07
9.93956e+07
9.30069e+07
1.32051e+08
2.45783e+08
-2.8826e+07
-2.2165e+08
-2.55169e+08
9.09804e+06
-6.81083e+07
8.76435e+06
-5.2464e+07
-8.48292e+06
1.36315e+08
1.59487e+08
2.19388e+07
7.0884e+07
2.77446e+07
-7.5528e+07
-1.09071e+07
-1.30343e+08
5.1505e+06
-7.49218e+07
-8.13433e+06
-6.929e+07
-2.45469e+07
1.98497e+07
5.47501e+07
-1.33487e+08
6.81329e+06
966898
-1.00094e+07
-1.40453e+07
2.8152e+07
3.44997e+07
8.97668e+06
3.56359e+07
3.48659e+07
5.84282e+07
3.15766e+07
-2.40174e+07
3.77501e+07
-1.99489e+07
-4.99497e+06
2.53817e+07
7.72864e+06
-3.07909e+07
1.73769e+07
-8.34097e+06
-2.78991e+07
-1.40412e+06
-7.44734e+06
-3.97616e+06
4.09292e+07
5.20012e+07
2.38232e+07
-1.09971e+08
-1.42949e+07
3.69573e+07
-1.82742e+07
-2.28779e+07
-1.43727e+07
1.80086e+08
3.06836e+07
-4.01289e+07
9.87524e+07
6.66107e+07
1.34367e+08
6.33608e+07
-6.4606e+06
9.46036e+06
-1.22105e+07
7.7131e+07
8.10312e+07
-1.27065e+08
3.9951e+07
-2.05569e+07
2.27352e+07
-3.98296e+07
7.65671e+07
-8.53538e+07
-2.40461e+07
-2.14938e+08
6.83146e+07
4.86545e+06
-1.64442e+08
1.27251e+08
-5.237e+06
4.31648e+07
-3.03558e+08
5.35217e+07
-2.96545e+08
-1.36686e+08
-7.37888e+06
3.38416e+07
1.37048e+08
7.04177e+07
-9.8226e+06
2.965e+07
1.4548e+06
-8.44149e+07
-6.98984e+07
-1.13918e+08
8.68425e+07
-1.11673e+08
1.11807e+08
6.12021e+07
1.3205e+08
8.69946e+07
5.10264e+06
7.33691e+07
7.32502e+07
6.16245e+07
7.7872e+07
4.34356e+07
6.99276e+07
-2.32577e+08
5.64124e+07
-8.734e+07
1.79915e+08
-4.41828e+07
2.31616e+08
-2.87722e+08
3.96345e+07
-5.70508e+07
-2.85449e+08
1.78565e+08
3.85968e+07
-8.9947e+07
-2.14635e+08
1.32602e+08
5.7444e+07
-2.77209e+08
-3.02779e+08
-2.89865e+07
1.7031e+08
7.48564e+07
-6.55149e+06
9.13184e+06
-4.2334e+07
2.98867e+07
-8.03158e+06
-5.28158e+07
-1.72426e+08
4.18106e+07
4.82249e+07
2.23595e+08
2.27186e+07
1.6718e+08
-1.91322e+08
2.57353e+06
-1.233e+07
-3.05196e+08
2.16369e+07
-2.20757e+08
-1.09614e+07
1.63508e+07
-2.23169e+08
-2.74485e+08
-1.34915e+07
-1.11958e+07
-2.51032e+08
3.46231e+07
-5.52777e+06
-5.76464e+07
-3.9904e+07
1.25047e+07
1.98382e+08
3.48018e+07
1.27843e+07
3.5582e+07
4.30965e+07
-7.35528e+07
2.14346e+07
-2.13852e+07
8.65566e+07
3.19041e+07
3.25775e+07
2.64326e+08
1.47594e+08
-3.06026e+07
-2.63625e+08
-2.41866e+08
1.04944e+07
-5.53571e+07
1.54435e+07
-7.57184e+07
3.02554e+07
-3.25629e+08
3.22974e+08
-3.03142e+08
3.03654e+08
-4.0721e+07
2.50814e+08
1.94786e+08
-2.13257e+08
5.80579e+07
-2.69613e+08
2.25481e+07
-2.12595e+08
1.97551e+07
-2.45293e+08
-3.06583e+08
5.3968e+07
-2.32029e+08
2.92611e+07
3.01991e+07
-8.3383e+07
5.43642e+07
-4.92311e+07
2.08223e+08
-4.73314e+07
8.8418e+07
6.42358e+07
-4.64856e+07
2.121e+08
7.36055e+07
-8.08927e+07
-3.57523e+07
3.13992e+07
8.39061e+07
2.41538e+08
1.88626e+08
6.96882e+07
-2.36504e+08
-2.85484e+08
-3.42946e+07
-2.40896e+08
4.75783e+07
-3.69875e+07
-1.83109e+08
5.24483e+07
9.27597e+07
-3.75334e+08
-4.54861e+08
2.80143e+07
6.2242e+08
-5.24493e+07
-1.26991e+07
4.97024e+08
1.9743e+07
-1.3812e+07
6.00435e+08
2.05527e+07
3.83193e+08
2.69097e+08
-1.19286e+07
-4.45907e+06
-3.98944e+06
7.99589e+08
3.44055e+07
3.69726e+08
3.19335e+07
8.4623e+07
-6.456e+08
-3.99917e+07
-1.11231e+08
-1.00484e+07
-1.60789e+08
4.72413e+08
3.40775e+07
-1.42464e+07
-5.33152e+08
3.84102e+07
4.48288e+07
-4.38488e+08
-4.05085e+08
-3.10589e+07
4.45567e+08
2.41314e+08
-2.61987e+06
8.83441e+07
1.02534e+07
2.1869e+08
-4.13077e+08
-4.39212e+07
-5.16955e+08
6.67529e+08
6.11665e+07
2.37527e+07
4.52109e+08
4.17392e+08
3.05442e+08
5.24047e+07
5.6464e+08
2.39738e+07
2.89376e+07
7.30961e+08
3.40971e+07
4.24285e+08
5.94485e+07
-5.27772e+07
-6.2133e+08
-4.47955e+07
-4.19939e+08
4.76533e+07
-5.11282e+07
-6.07901e+08
6.57083e+07
4.55382e+08
-5.12761e+07
5.00494e+07
-4.80821e+08
-3.83959e+08
-4.80032e+08
7.43518e+07
3.89124e+08
2.86638e+08
-3.41027e+07
3.71582e+08
4.06507e+07
-4.24205e+07
4.63927e+08
5.52862e+07
8.42012e+07
971846
2.42868e+07
3.91714e+07
7.71899e+06
-1.15941e+07
-1.03978e+07
3.50118e+06
-5.68939e+06
-1.25289e+07
4.11992e+06
7.4292e+06
-3.89291e+06
-297282
3.34784e+07
-2.64245e+06
-3.61805e+07
-1.94495e+07
-7.74277e+06
-4.00017e+06
-1.38745e+07
1.08316e+07
-1.23248e+07
1.50586e+07
-8.35821e+06
6.10426e+06
-1.94724e+07
1.54998e+07
7.1219e+06
-3.74989e+06
7.15985e+06
-634606
7.45469e+06
-8.5207e+06
-2.91296e+06
-5.76462e+06
2.90939e+07
-2.71842e+07
6.05269e+06
-1.13994e+07
-4.18793e+06
246159
-3.92453e+06
-2.24127e+07
-1.71188e+07
-4.03446e+07
1.25386e+08
2.48563e+07
-1.62477e+07
-1.38779e+08
7.60612e+07
-3.0882e+07
-9.88118e+06
-1.24945e+07
6.39384e+07
5.05796e+07
-1.4966e+07
-1.0501e+08
2.20781e+07
2.16785e+07
-1.88738e+07
-1.08326e+08
4.77919e+07
-1.71282e+07
-1.85433e+08
1.36314e+08
1.53791e+07
2.07471e+08
2.95515e+07
-2.67686e+08
1.50225e+08
2.65677e+07
-2.37312e+08
-1.74139e+07
-4.84633e+07
1.39786e+08
5.49374e+07
-1.98331e+07
3.57852e+07
-2.81525e+07
-1.60892e+08
2.26822e+07
2.55982e+07
-2.1104e+08
2.02868e+08
-2.0843e+07
2.26139e+07
-2.8111e+08
4.49968e+07
-2.70153e+08
2.01297e+07
-3.0696e+07
1.41318e+08
-1.83963e+08
2.6775e+07
1.91675e+07
2.02994e+07
-1.54701e+08
2.80946e+07
-2.5314e+07
-2.33883e+07
1.36218e+07
1.20142e+07
-1.59893e+08
1.91012e+07
-2.10566e+08
3.04508e+07
-5.99355e+07
2.23218e+08
-2.59722e+07
7.70584e+07
-7.67665e+07
-3.57516e+07
-2.24544e+08
9.01149e+07
-3.05438e+07
-2.53382e+08
2.36799e+08
2.73615e+07
-3.11412e+08
-3.06537e+08
1.64087e+07
1.62989e+08
5.69589e+07
-1.30343e+07
-4.10212e+07
-1.53887e+07
-9.8354e+06
-1.04735e+07
-1.38971e+08
2.39208e+08
7.59297e+07
2.22049e+08
-2.49614e+08
-8.86247e+07
-3.37223e+07
-2.64991e+08
2.45242e+07
-2.50089e+08
-2.48673e+08
-8.1169e+07
-2.43507e+08
-3.87063e+07
3.26999e+07
-4.32258e+07
-2.85519e+08
5.7181e+07
-4.61125e+07
-1.1308e+08
-7.70262e+07
7.69006e+07
2.34124e+08
6.75133e+07
1.02768e+08
7.07906e+07
2.24026e+08
-1.28781e+08
6.44291e+07
-6.01178e+07
1.53177e+08
4.33196e+07
4.80768e+07
2.34044e+08
-9.1586e+07
2.05701e+08
-2.38476e+08
-2.47678e+08
4.76576e+07
-2.2822e+08
-1.95103e+08
4.86203e+07
1.06025e+07
-2.64405e+08
2.7298e+08
-3.12487e+08
3.2209e+08
-3.49343e+07
2.22945e+08
1.94288e+08
-2.50248e+08
3.86056e+07
-2.91182e+08
1.5868e+07
-2.59088e+08
2.22861e+07
-2.28745e+08
-2.1192e+08
1.33799e+07
-3.21993e+08
1.13042e+07
1.37107e+07
-1.37294e+08
-1.1095e+07
-3.44454e+07
2.63919e+08
2.44712e+06
3.03302e+07
-1.03303e+07
5.89018e+07
-1.60268e+08
-2.75145e+07
2.16685e+07
1.8029e+08
2.6778e+08
1.76022e+08
-3.01159e+06
-2.79611e+08
-1.89341e+08
527014
-4.77437e+07
-319295
-9.29446e+07
-3.68898e+08
-4.35467e+08
6.82412e+07
-7.59501e+07
5.77215e+08
3.59725e+08
3.07411e+08
-7.46646e+07
-2.7597e+07
3.96361e+08
1.94196e+07
-4.48511e+07
4.66151e+08
3.43038e+07
-3.58664e+07
-5.30972e+07
6.26346e+08
5.07036e+07
-6.09483e+07
3.69923e+08
-5.52187e+08
5.78135e+07
-3.97807e+08
4.40727e+07
-5.78268e+08
3.52324e+07
-3.54559e+08
-7.93579e+07
-4.22141e+08
3.5209e+08
2.89188e+08
3.83345e+07
3.61902e+08
4.3475e+08
5.34746e+07
3.94163e+08
4.29053e+07
-2.65098e+07
-4.30873e+08
2.31467e+07
2.81825e+07
-3.18325e+08
-2.62963e+07
-3.65953e+08
5.24329e+08
-1.97284e+07
1.1979e+07
4.24195e+08
4.83073e+08
2.2175e+07
3.1611e+08
2.63576e+08
1.50321e+07
1.02322e+07
6.69515e+08
1.46975e+07
3.29463e+08
2.9732e+07
5.39241e+07
-5.46806e+08
-3.10913e+07
-9.44988e+07
-2.25396e+07
-1.32632e+08
4.18347e+08
-1.17462e+07
1.9705e+07
-4.67892e+08
-3.73347e+08
-3.28811e+08
-1.69574e+07
3.73647e+08
2.34832e+08
-1.05325e+07
7.81787e+07
-2.60626e+06
1.71986e+08
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<scalar>
60
(
2.94261e+10
2.64083e+10
2.4639e+10
3.0653e+10
2.3499e+10
2.55349e+10
2.41567e+10
2.29324e+10
2.71778e+10
2.55914e+10
2.93535e+10
2.95874e+10
3.06739e+10
3.14663e+10
3.07886e+10
3.14986e+10
2.94003e+10
3.00477e+10
2.71482e+10
2.75663e+10
2.48181e+10
2.44026e+10
2.29047e+10
2.14501e+10
2.16129e+10
1.93585e+10
1.97504e+10
1.58039e+10
1.56172e+10
1.6335e+10
2.38191e+10
2.45678e+10
2.88711e+10
2.67787e+10
2.53894e+10
2.62641e+10
2.3834e+10
2.75946e+10
2.37226e+10
2.88884e+10
2.54535e+10
3.0433e+10
2.70879e+10
3.05437e+10
2.66528e+10
2.78541e+10
2.54833e+10
2.47083e+10
2.84266e+10
2.46603e+10
3.00976e+10
2.447e+10
2.79729e+10
2.67546e+10
2.70233e+10
3.03526e+10
2.97543e+10
2.80045e+10
2.54751e+10
1.22438e+10
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
60
(
3.43364e+09
4.34639e+09
-4.23833e+10
-4.98206e+10
-4.29274e+10
-6.21542e+09
-6.2998e+10
-1.74547e+10
-9.47326e+09
-2.92216e+10
-1.01368e+10
-7.42021e+10
-5.80787e+10
-3.81208e+10
-2.28536e+10
-1.59758e+10
-1.65671e+10
-8.47682e+09
7.21372e+09
8.72995e+08
-1.22473e+09
-3.38153e+10
-4.5745e+10
-5.7395e+10
-1.65382e+10
-1.87267e+10
-2.82589e+10
-1.05967e+10
-5.04881e+10
-1.80508e+10
-2.39963e+10
-6.065e+10
-1.64618e+10
-1.99095e+10
-4.01601e+10
-1.08896e+10
-3.04913e+10
-4.22781e+09
-1.04781e+10
-7.52486e+09
-2.69647e+10
-8.90654e+09
-4.32327e+10
-1.55383e+10
-2.11525e+10
-3.25204e+10
-3.65299e+10
-2.63071e+09
-5.12737e+10
-3.11703e+10
-5.69385e+10
-4.36827e+10
-3.66274e+10
-2.52683e+10
-2.39618e+10
-1.55e+10
-8.67234e+09
-4.14166e+09
-1.13629e+10
-3.88268e+10
)
;
}
rightSide
{
type symmetryPlane;
value uniform 0;
}
leftSide
{
type symmetryPlane;
value uniform 0;
}
duct
{
type calculated;
value uniform 0;
}
cylinder
{
type calculated;
value nonuniform List<scalar>
448
(
0
2.32831e-10
0
0
-7.45058e-09
0
0
7.45058e-09
0
0
7.45058e-09
-7.45058e-09
7.45058e-09
0
0
2.32831e-10
0
0
0
0
-7.45058e-09
0
-7.45058e-09
-7.45058e-09
-7.45058e-09
0
7.45058e-09
0
7.45058e-09
-2.32831e-10
0
2.32831e-10
0
0
1.86265e-09
-1.86265e-09
0
0
-7.45058e-09
-7.45058e-09
0
0
0
1.86265e-09
0
-7.45058e-09
-1.86265e-09
3.72529e-09
0
-7.45058e-09
7.45058e-09
0
3.72529e-09
1.86265e-09
-1.49012e-08
0
-7.45058e-09
0
1.86265e-09
0
2.32831e-10
0
0
0
0
1.86265e-09
0
0
7.45058e-09
0
1.86265e-09
-1.86265e-09
-7.45058e-09
7.45058e-09
-7.45058e-09
0
0
0
0
0
0
7.45058e-09
0
0
-1.86265e-09
-7.45058e-09
7.45058e-09
0
-7.45058e-09
0
0
-3.72529e-09
0
0
0
7.45058e-09
-7.45058e-09
3.72529e-09
0
0
-7.45058e-09
0
-7.45058e-09
0
0
-7.45058e-09
0
-1.86265e-09
0
7.45058e-09
0
0
-3.72529e-09
0
7.45058e-09
0
0
0
7.45058e-09
0
-1.86265e-09
0
1.49012e-08
-7.45058e-09
0
-7.45058e-09
-3.72529e-09
0
7.45058e-09
-7.45058e-09
0
0
-1.86265e-09
-1.86265e-09
-7.45058e-09
7.45058e-09
0
0
1.86265e-09
0
0
7.45058e-09
7.45058e-09
-7.45058e-09
3.72529e-09
0
0
-7.45058e-09
1.86265e-09
0
0
0
0
-1.86265e-09
-7.45058e-09
1.86265e-09
-1.86265e-09
-7.45058e-09
0
0
0
7.45058e-09
0
0
0
0
0
0
0
0
-1.86265e-09
-3.72529e-09
0
7.45058e-09
0
0
1.86265e-09
1.86265e-09
1.86265e-09
1.86265e-09
-7.45058e-09
0
-1.86265e-09
0
0
0
0
0
1.86265e-09
1.86265e-09
0
7.45058e-09
-1.86265e-09
0
0
0
1.86265e-09
0
2.91038e-11
1.86265e-09
-9.31323e-10
9.31323e-10
-2.91038e-11
-9.31323e-10
0
-9.31323e-10
-2.91038e-11
0
0
0
-5.82077e-11
0
0
0
-9.31323e-10
-9.31323e-10
0
9.31323e-10
9.31323e-10
0
0
9.31323e-10
0
0
0
0
0
-9.31323e-10
0
0
9.31323e-10
9.31323e-10
2.91038e-11
0
0
9.31323e-10
-2.91038e-11
0
0
-9.31323e-10
2.91038e-11
0
-1.86265e-09
0
0
0
0
9.31323e-10
2.91038e-11
-9.31323e-10
9.31323e-10
-9.31323e-10
-5.82077e-11
-9.31323e-10
9.31323e-10
0
2.91038e-11
9.31323e-10
0
0
-2.91038e-11
-9.31323e-10
0
1.16415e-10
0
9.31323e-10
1.86265e-09
0
-1.86265e-09
0
0
0
0
0
3.72529e-09
0
-7.45058e-09
7.45058e-09
0
7.45058e-09
9.31323e-10
0
3.72529e-09
0
0
9.31323e-10
0
0
-9.31323e-10
0
-1.86265e-09
-9.31323e-10
0
1.86265e-09
0
9.31323e-10
0
2.32831e-10
0
0
3.72529e-09
0
0
0
0
1.86265e-09
9.31323e-10
9.31323e-10
0
0
0
-9.31323e-10
0
0
7.45058e-09
0
-9.31323e-10
0
3.72529e-09
-9.31323e-10
-7.45058e-09
1.86265e-09
9.31323e-10
0
9.31323e-10
0
-1.86265e-09
0
0
0
0
9.31323e-10
3.72529e-09
0
5.58794e-09
9.31323e-10
-1.86265e-09
0
-2.32831e-10
7.45058e-09
0
0
9.31323e-10
-1.16415e-10
-2.32831e-10
7.45058e-09
0
-9.31323e-10
1.86265e-09
3.72529e-09
9.31323e-10
-7.45058e-09
-1.86265e-09
-9.31323e-10
0
0
0
0
0
0
7.45058e-09
0
0
0
3.72529e-09
-7.45058e-09
1.86265e-09
9.31323e-10
3.72529e-09
0
9.31323e-10
0
-2.32831e-10
0
0
9.31323e-10
-9.31323e-10
0
1.86265e-09
0
0
0
3.72529e-09
0
7.45058e-09
1.49012e-08
7.45058e-09
0
7.45058e-09
0
-1.86265e-09
7.45058e-09
0
-3.72529e-09
0
1.86265e-09
0
0
7.45058e-09
1.86265e-09
9.31323e-10
0
0
0
-1.86265e-09
-9.31323e-10
0
1.16415e-10
2.32831e-10
-7.45058e-09
0
0
7.45058e-09
0
0
7.45058e-09
9.31323e-10
7.45058e-09
0
9.31323e-10
1.86265e-09
-1.16415e-10
0
0
1.86265e-09
0
0
0
-1.86265e-09
-9.31323e-10
7.45058e-09
0
0
-4.65661e-10
-3.72529e-09
0
0
0
0
0
-1.86265e-09
-9.31323e-10
9.31323e-10
0
0
0
0
-1.86265e-09
)
;
}
}
// ************************************************************************* //
| |
3dd9aed623e91de3ec9c2e577280b9031315f312 | 522c7dfa88d6b78aaa97b9ff39380421acd1739b | /UltraSonic/exmple/UltraSonic/UltraSonic.ino | 907ac1c6be3c774e46f196bd3000c6dfe1f7905b | [
"MIT"
] | permissive | hriships-zz/arduinolib | 439b1dce74c58a419abdd78cfe302304fc74ef24 | 8187001c0568b2b1f924c515aef86a88f18f9685 | refs/heads/master | 2021-09-18T17:02:09.533827 | 2016-11-21T04:28:20 | 2016-11-21T04:28:20 | 74,324,035 | 0 | 0 | MIT | 2018-07-17T06:29:24 | 2016-11-21T03:48:58 | C++ | UTF-8 | C++ | false | false | 330 | ino | UltraSonic.ino | #include <UltraSonic.h>
int ULTRASONIC_TRIG_PIN = 2;
int ULTRASONIC_ECHO_PIN = 4;
UltraSonic *ultraSonicSensor = NULL;
void setup() {
Serial.begin (9600);
ultraSonicSensor = new UltraSonic(ULTRASONIC_TRIG_PIN, ULTRASONIC_ECHO_PIN);
}
void loop() {
ultraSonicSensor->calibrateEcho();
Serial.println("");
delay(2000);
} |
04aa3709dcfa9e3a2cce0eb99de6407ee051b0d0 | cff81ff659ad529706dc9ba1befbc68d8ae5ad26 | /hr_ways_to_give_a_check.cpp | c806c2f5a649fe0643042e7a2a40e76352015a1e | [] | no_license | iishipatel/Competetive-Programming | 9dafb3e49e60daee0f7dfca7f88ea23fd0777507 | 2ece5d282e753aee38d503bc5102baffa0141b2f | refs/heads/master | 2020-08-05T23:03:48.027950 | 2019-10-08T12:02:27 | 2019-10-08T12:02:27 | 212,747,647 | 1 | 0 | null | 2019-10-04T06:12:08 | 2019-10-04T06:12:06 | null | UTF-8 | C++ | false | false | 958 | cpp | hr_ways_to_give_a_check.cpp | /*
Author : Abhinav
Modified : 07-02-2018 07:59:02 PM
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
#define faster ios_base::sync_with_stdio(false);cin.tie(0);
const ll mod = 1e9+7;
#define for(i,j,k) for(ll i=j; i<k; i++)
#define forv(i,j,k) for(ll i=j; i>k; i--)
int main(){
faster;
int t,P_x,P_y,k_x,k_y,ans;
cin >> t;
while(t--){
vector <string> s(8);
for(i,0,8){
cin >> s[i];
for(j,0,8){
if(s[i][j] == 'k'){
k_x = i;
k_y = j;
}
}
}
ans = 0;
for(i,0,8){
if(s[1][i] == 'P'){
P_y = i;
//for Rook
if(k_x == 0 || k_y == P_y)
ans++;
//for Bishop
if(k_x == abs(P_y-k_y))
ans++;
//for Queen
if((k_x == 0 || k_y == P_y) || k_x == abs(P_y-k_y))
ans++;
//for Knight
if((k_x == 1 && (abs(k_y - P_y) == 2)) || (k_x == 2 && (abs(k_y - P_y) == 1)))
ans++;
}
}
cout << ans << "\n";
}
return 0;
} |
baf8aa873160b24fe1e4791d115813201f10b2a7 | 1ccf8028b6c97355583e8032c8c8aaff6baa9092 | /Session02/1.cviceni/1.cviceni.cpp | 86d53f4adab61002c1696a71e0e64083099cc457 | [] | no_license | meitys79/ICpp1 | 78a507b5dd036afd72211c1c208dc22f41430be2 | 2d2dc7cc21653316ce3c85c75e3fd24bffb76e84 | refs/heads/master | 2020-08-07T07:56:51.982233 | 2019-10-07T11:16:19 | 2019-10-07T11:16:19 | 212,520,280 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,373 | cpp | 1.cviceni.cpp |
#include <iostream>
using namespace std;
struct trojuhelnik
{
int a;
int b;
int c;
};
bool lzeSestrojit(trojuhelnik t) {
if ((t.a + t.b > t.c) && (t.a + t.c > t.b) && (t.b + t.c > t.a)) {
return true;
}
return false;
}
bool lzeSestrojita(trojuhelnik ta) {
if ((ta.a + ta.b > ta.c) && (ta.a + ta.c > ta.b) && (ta.b + ta.c > ta.a)) {
return true;
}
return false;
}
bool lzeSestrojitb(trojuhelnik tb) {
if ((tb.a + tb.b > tb.c) && (tb.a + tb.c > tb.b) && (tb.b + tb.c > tb.a)) {
return true;
}
return false;
}
//priklad 1.
int main() {
cout << "-------------Priklad 1----------- \n";
int a, b, c;
cout << "Zadej delku strany a(cm): " ;
cin >> a;
cout << "Zadej d>>lku strany b(cm): ";
cin >> b;
cout << "Zadej delku strany c(cm): ";
cin >> c;
if ((a + b > c) && (a + c > b) && (b + c > a)) {
cout << "Obvod trojuhelniku je: " << a + b + c<< " cm \n" ;
}
else
{
cout << "Trojuhelnik nelze sestrojit" ;
}
cout << "-------------Priklad 2----------- \n";
//priklad 2.
trojuhelnik t;
cout << "Zadej delku strany a(cm): " ;
cin >> t.a;
cout << "Zadej delku strany b(cm): " ;
cin >> t.b;
cout << "Zadej delku strany c(cm): ";
cin >> t.c;
if (lzeSestrojit(t))
{
cout << "Obvod trojuhelniku je: " << t.a + t.b + t.c<<" cm \n" ;
}
else
{
cout << "Trojuhelnik nelze sestrojit" ;
}
cout << "-------------Priklad 3----------- \n";
//priklad 3.
trojuhelnik* ta = new trojuhelnik;
cout << "Zadej delku strany a(cm):" ;
cin >> ta->a;
cout << "Zadej delku strany b(cm): " ;
cin >> ta->b;
cout << "Zadej delku strany c(cm): " ;
cin >> ta->c;
if (lzeSestrojita(*ta))
{
cout << "Obvod trojuhelniku je: " << ta->a + ta->b + ta->c<<"cm\n" ;
}
else
{
cout << "Trojuhelnik nelze sestrojit" ;
}
delete(ta);
cout << "-------------Priklad 4----------- \n";
//priklad 4.
trojuhelnik* tb = new trojuhelnik;
cout << "Zadej delku strany a(cm):" ;
cin >> tb->a;
cout << "Zadej delku strany b(cm): " ;
cin >> tb->b;
cout << "Zadej delku strany c(cm):" ;
cin >> tb->c;
if (lzeSestrojitb(*tb))
{
cout << "Obvod trojuhelniku je: " << tb->a + tb->b + tb->c << "cm\n";
}
else
{
cout << "Trojuhelnik nelze sestrojit" ;
}
delete(tb);
cout << "-------------Priklad 5----------- \n";
//priklad 5.
int pocetTrojuh;
cout << "zadejte pocet trojuhelniku: " << endl;
cin >> pocetTrojuh;
trojuhelnik* poleTrojuhel = new trojuhelnik[pocetTrojuh];
for (int i = 0; i < pocetTrojuh; i++)
{
trojuhelnik* t = new trojuhelnik;
cout << "Zadejte trojuhelnik na indexu " << i << endl;
poleTrojuhel[i] = *t;
cout << "zadej a: ";
cin >> poleTrojuhel[i].a;
cout << "zadej b: ";
cin >> poleTrojuhel[i].b;
cout << "zadej c: ";
cin >> poleTrojuhel[i].c;
cout << endl;
delete t;
}
for (int i = 0; i < pocetTrojuh; i++)
{
cout << "Trojuhelnik " << i << " a: " << poleTrojuhel[i].a << ", b: " << poleTrojuhel[i].b << ", c: " << poleTrojuhel[i].c << endl;
if (lzeSestrojit(poleTrojuhel[i]))
{
cout << "Obvod: " << poleTrojuhel[i].a + poleTrojuhel[i].b + poleTrojuhel[i].c << endl;
}
else
{
cout << "Trojuhelnik nelze sestrojit" << endl;
}
}
delete[] poleTrojuhel;
system("Pause");
return 0;
} |
3843da16169123add34289225acbbe517218738e | c846d27585f1503d1d9933d8a11e6aaedcdb123b | /EchoServer.cc | 18806c9716d62248c185d7252274612833ccf0a4 | [
"MIT"
] | permissive | ebayboy/nanorpc | 4a6eaf08533fb12a90358135374b34e6573ed2c9 | ea2440894453636b631d726156f2b284e8a1c751 | refs/heads/master | 2022-12-20T18:27:46.356218 | 2020-10-10T06:46:06 | 2020-10-10T06:46:06 | 299,888,549 | 0 | 1 | MIT | 2020-09-30T10:48:34 | 2020-09-30T10:48:33 | null | UTF-8 | C++ | false | false | 2,809 | cc | EchoServer.cc | /**
* @project nanorpc
* @file EchoServer.cc
* @author S Roychowdhury <sroycode AT gmail DOT com>
* @version 1.0
*
* @section LICENSE
*
* Copyright (c) 2013 S Roychowdhury
*
* 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 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.
*
* @section DESCRIPTION
*
* example: echo server
*
*/
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <iostream>
#include "RpcServer.hh"
#include "echo.pb.h"
#include "EchoEndpoint.hh"
class EchoServiceImpl : public echo::EchoService {
public:
EchoServiceImpl() {};
virtual void Echo1(::google::protobuf::RpcController* controller,
const ::echo::EchoRequest* request,
::echo::EchoResponse* response,
::google::protobuf::Closure* done) {
std::cerr << "Received1: " << request->message().c_str() << std::endl;
response->set_response(std::string("You sent1: ") + request->message());
if (done) {
done->Run();
}
}
virtual void Echo2(::google::protobuf::RpcController* controller,
const ::echo::EchoRequest* request,
::echo::EchoResponse* response,
::google::protobuf::Closure* done) {
std::cerr << "Received2: " << request->message().c_str() << std::endl;
response->set_response(std::string("You sent2: ") + request->message());
if (done) {
done->Run();
}
}
};
void OnExit(int sig)
{
std::cerr << "Exiting on ^C " << sig << std::endl;
}
int main(int argc, char *argv[])
{
signal(SIGINT, OnExit);
try {
nrpc::RpcServer rpc_server(ECHO_ENDPOINT_PORT);
::google::protobuf::Service *service = new EchoServiceImpl();
rpc_server.RegisterService(service);
rpc_server.Start();
} catch (nn::exception& e) {
std::cerr << "NN EXCEPTION : " << e.what() << std::endl;
} catch (std::exception& e) {
std::cerr << "STD EXCEPTION : " << e.what() << std::endl;
} catch (...) {
std::cerr << " UNTRAPPED EXCEPTION " << std::endl;
}
return 0;
}
|
6769094c94396f930fb3be3eb72ef24be2a7abc8 | 33d2c53baa002c94d48f34818f8ba2c3c2646662 | /cpp/system/secureimageprovider.cpp | 1eabd7f7fb9739b5e6d1a541266fdbcc6f8b5fbe | [] | no_license | kmakeev/DSClient | b521316163c3e46d1512f97e1ebc02eaf6687729 | bc51a99d1b228bb3271e71f6a5d8b5d7d84278c7 | refs/heads/master | 2021-01-23T06:45:29.196187 | 2015-07-22T12:36:41 | 2015-07-22T12:36:41 | 39,503,018 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,718 | cpp | secureimageprovider.cpp | //******************************************************************************
//******************************************************************************
#include "header\system\secureimageprovider.h"
#include "header\system\o1requestor.h"
#include <QDebug>
//******************************************************************************
//******************************************************************************
SecureImageProvider::SecureImageProvider()
: QQuickImageProvider (QQuickImageProvider::Image)
{
}
//******************************************************************************
//******************************************************************************
QImage SecureImageProvider::requestImage(const QString & id, QSize * size,
const QSize & requestedSize)
{
Q_UNUSED(id)
Q_UNUSED(size)
Q_UNUSED(requestedSize)
// qDebug() << Q_FUNC_INFO << id;
QImage resultImage;
if (!id.isEmpty() && O1Requestor::instance().loadImage(id, resultImage))
{
return resultImage;
} else {
qDebug() << Q_FUNC_INFO << id << " Ошибка загрузки картинки";
resultImage.load(":/pics/default.png");
return resultImage;
}
}
//******************************************************************************
//******************************************************************************
QPixmap SecureImageProvider::requestPixmap(const QString & id, QSize * size,
const QSize & requestedSize)
{
Q_UNUSED(id)
Q_UNUSED(size)
Q_UNUSED(requestedSize)
// qDebug() << Q_FUNC_INFO << id;
return QPixmap();
}
|
78339ff97c668ec4ea7bb5ffde9bf249c3579ebd | bdc0b8809d52933c10f8eb77442bd0b4453f28f9 | /build/visualization_msgs/rosidl_typesupport_c/visualization_msgs/msg/interactive_marker_pose__type_support.cpp | 359f2ed89173b24757afd62c57e8517ced683019 | [] | no_license | ClaytonCalabrese/BuiltRos2Eloquent | 967f688bbca746097016dbd34563716bd98379e3 | 76bca564bfd73ef73485e5c7c48274889032e408 | refs/heads/master | 2021-03-27T22:42:12.976367 | 2020-03-17T14:24:07 | 2020-03-17T14:24:07 | 247,810,969 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,340 | cpp | interactive_marker_pose__type_support.cpp | // generated from rosidl_typesupport_c/resource/idl__type_support.cpp.em
// with input from visualization_msgs:msg/InteractiveMarkerPose.idl
// generated code does not contain a copyright notice
#include "cstddef"
#include "rosidl_generator_c/message_type_support_struct.h"
#include "visualization_msgs/msg/rosidl_typesupport_c__visibility_control.h"
#include "visualization_msgs/msg/interactive_marker_pose__struct.h"
#include "rosidl_typesupport_c/identifier.h"
#include "rosidl_typesupport_c/message_type_support_dispatch.h"
#include "rosidl_typesupport_c/type_support_map.h"
#include "rosidl_typesupport_c/visibility_control.h"
#include "rosidl_typesupport_interface/macros.h"
namespace visualization_msgs
{
namespace msg
{
namespace rosidl_typesupport_c
{
typedef struct _InteractiveMarkerPose_type_support_ids_t
{
const char * typesupport_identifier[2];
} _InteractiveMarkerPose_type_support_ids_t;
static const _InteractiveMarkerPose_type_support_ids_t _InteractiveMarkerPose_message_typesupport_ids = {
{
"rosidl_typesupport_fastrtps_c", // ::rosidl_typesupport_fastrtps_c::typesupport_identifier,
"rosidl_typesupport_introspection_c", // ::rosidl_typesupport_introspection_c::typesupport_identifier,
}
};
typedef struct _InteractiveMarkerPose_type_support_symbol_names_t
{
const char * symbol_name[2];
} _InteractiveMarkerPose_type_support_symbol_names_t;
#define STRINGIFY_(s) #s
#define STRINGIFY(s) STRINGIFY_(s)
static const _InteractiveMarkerPose_type_support_symbol_names_t _InteractiveMarkerPose_message_typesupport_symbol_names = {
{
STRINGIFY(ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, visualization_msgs, msg, InteractiveMarkerPose)),
STRINGIFY(ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerPose)),
}
};
typedef struct _InteractiveMarkerPose_type_support_data_t
{
void * data[2];
} _InteractiveMarkerPose_type_support_data_t;
static _InteractiveMarkerPose_type_support_data_t _InteractiveMarkerPose_message_typesupport_data = {
{
0, // will store the shared library later
0, // will store the shared library later
}
};
static const type_support_map_t _InteractiveMarkerPose_message_typesupport_map = {
2,
"visualization_msgs",
&_InteractiveMarkerPose_message_typesupport_ids.typesupport_identifier[0],
&_InteractiveMarkerPose_message_typesupport_symbol_names.symbol_name[0],
&_InteractiveMarkerPose_message_typesupport_data.data[0],
};
static const rosidl_message_type_support_t InteractiveMarkerPose_message_type_support_handle = {
rosidl_typesupport_c__typesupport_identifier,
reinterpret_cast<const type_support_map_t *>(&_InteractiveMarkerPose_message_typesupport_map),
rosidl_typesupport_c__get_message_typesupport_handle_function,
};
} // namespace rosidl_typesupport_c
} // namespace msg
} // namespace visualization_msgs
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_C_EXPORT_visualization_msgs
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_c, visualization_msgs, msg, InteractiveMarkerPose)() {
return &::visualization_msgs::msg::rosidl_typesupport_c::InteractiveMarkerPose_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif
|
823d1fb5c36720c473e8d1778392681cb1a536dd | 157dc6385d761606bee938bc3a31a5e58b2a674a | /XNetFrame/WindowViewer.h | 153c0e868f7055d7517c3f31cc16ea4a2287c615 | [] | no_license | guojunping/XNet | b745f0fee1749b50cf71ebbf605d92902320c81d | fdf8eabff0f0ec2938d896b6e57edc0d0c69c72f | refs/heads/master | 2022-11-06T20:48:46.680964 | 2020-07-07T08:21:48 | 2020-07-07T08:21:48 | 277,760,354 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 602 | h | WindowViewer.h | ///////////////////////////////////////
// Author : Mr Kim
// Name :
///////////////////////////////////////
#ifndef __WINDOW_VIEWER_H
#define __WINDOW_VIEWER_H
#include "TypesDn.h"
#include "Viewer.h"
namespace DnNetworkFramework{
class CWindowViewer : public CViewer{
private:
HWND m_hWindow; //
sint32 m_siMaxChar; //
TCHAR m_szBuffer[1024]; //
public:
CWindowViewer(void);
CWindowViewer(LPTSTR, HWND); //
~CWindowViewer(void);
EViewerResult setWindow(HWND); //
EViewerResult setMaxChar(sint32); //
EViewerResult view(time_t, LPTSTR);
};
}
#endif
|
49f6dbfb1fede692c154827fadfe0c33db06fb4a | f88213364606807b3ccccac4b35c3746246f475d | /Lab12/Prog2.cpp | 69e254a8e05791b76639b6e51ba753d45c6d2b61 | [] | no_license | PemchingKue/CSC1500 | 12e06e7f3d6adca148b8384af0f603c1c944175c | 6f0daac8cb9f63ece3a26845b4c00d78d66d9997 | refs/heads/master | 2020-03-13T23:17:45.807181 | 2018-04-27T18:42:25 | 2018-04-27T18:42:25 | 131,332,640 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,765 | cpp | Prog2.cpp | /* Source code was adapted from the class representation: http://www.algolist.net/Data_structures/Graph/Internal_representation */
#include <iostream>
#include <string>
using namespace std;
struct Graph {
Graph(int v) {
vertexCount = v;
adjacencyMatrix = new bool*[v];
for (int i = 0; i < vertexCount; i++) {
adjacencyMatrix[i] = new bool[v];
for (int j = 0; j < v; j++)
adjacencyMatrix[i][j] = false;
}
};
~Graph() {
for (int i = 0; i < vertexCount; i++)
delete[] adjacencyMatrix[i];
delete[] adjacencyMatrix;
};
bool** adjacencyMatrix;
int vertexCount;
};
void addEdge(Graph *g, int i, int j) {
//The code given below is for the undirected graph. Modify it to for the directed graph
if (i >= 0 && i < g->vertexCount && j > 0 && j < g->vertexCount) {
g->adjacencyMatrix[i][j] = true;
g->adjacencyMatrix[j][i] = true;
}
}
void removeEdge(Graph *g, int i, int j) {
if (i >= 0 && i < g->vertexCount && j > 0 && j < g->vertexCount) {
g->adjacencyMatrix[i][j] = false;
g->adjacencyMatrix[j][i] = true;
}
}
void removeVertex(Graph *g, int i) {
int v = g->vertexCount - 1;
g->vertexCount = v;
bool** newMatrix = new bool*[v];
for (int i = 0; i < v; i++) {
for (int j = 0; j < v; j++)
newMatrix[i][j] = g->adjacencyMatrix[i][j];
}
g->adjacencyMatrix = newMatrix;
for (int i = 0; i < v + 1; i++){
delete[] g->adjacencyMatrix[i];
delete[] g->adjacencyMatrix;
}
}
void addVertex(Graph *g) {
// your code here
//Step 1. increment vertex count
int v = g->vertexCount + 1;
g->vertexCount = v;
//Step 2. create a new matrix of size v by v. See example in the code for struct Graph
bool** newMatrix = new bool*[v];
//Step 3. copy old values into the new matrix
for (int i = 0; i < v; i++) {
for (int j = 0; j < v; j++)
newMatrix[i][j] = g->adjacencyMatrix[i][j];
}
//Step 4. link a new matrix to the graph
g->adjacencyMatrix = newMatrix;
//Step 5. free memory occupied by the old matrix. See example in the code for struct Graph
for (int i = 0; i < v - 1; i++){
delete[] g->adjacencyMatrix[i];
delete[] g->adjacencyMatrix;
}
}
bool isEdge(Graph *g, int i, int j) {
if (i >= 0 && i < g->vertexCount && j > 0 && j < g->vertexCount)
return g->adjacencyMatrix[i][j];
else
return false;
}
void printGraph(Graph *g) {
cout << "Graph:" << endl;
for (int i = 0; i<g->vertexCount; i++) {
cout << "Edges from vertex " << i << ":\t";
for (int j = 0; j < g->vertexCount; j++) {
if (isEdge(g, i, j))
cout << j << ",\t";
}
cout << endl;
}
}
int main()
{
Graph *g = new Graph(5);
addEdge(g, 1, 4);
addEdge(g, 3, 2);
printGraph(g);
//removeEdge(g, 1, 4);
//removeEdge(g, 2, 4);
addVertex(g);
printGraph(g);
delete g;
system("pause");
return 0;
}
|
442cabe7364e1b962891ded68b549b0da4e4fc5a | bccd2a32cc76564b3939c8444575f4f6c8fdedad | /RoboAfetivo/Camera.cpp | 6aa5b7f6b5d997ab8eb43a01b261a9c56cd76773 | [] | no_license | Cleversonzato/RoboAfetivo | 2c5f712d383d8c52d1c6dbf931267e95cf40d3d9 | 3e7e53b816cc7a218fe35ae520de438378a289ca | refs/heads/master | 2021-01-11T08:24:50.868626 | 2017-03-22T04:42:58 | 2017-03-22T04:42:58 | 72,287,431 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,503 | cpp | Camera.cpp | #include "stdafx.h"
#include "Camera.h"
const std::string Camera::janela = "Reconhecimento Facial";
void Camera::mostraFrame(cv::Mat& frame)
{
cv::imshow(janela, frame);
cv::waitKey(-1);
}
Camera::Camera()
{
}
Camera::~Camera()
{
captura.release();
cv::destroyAllWindows();
}
void Camera::preparaCamera()
{
captura.open(localCamera);
if (!captura.isOpened())
{ std::cout << "problemas na camera"; }
}
void Camera::gravando()
{
//objetos
MostraSuaCara *identificador = new MostraSuaCara;
Tratamentos *alteracao = new Tratamentos;
//cascade classifier
std::vector<cv::Rect> coordenadas, coordenadasOlhoD, coordenadasOlhoE, coordenadasBoca, coordenadasNariz;
cv::Mat pretoBranco, caracteristicas;
//iniciando a captura e janela
cv::namedWindow(janela, CV_WINDOW_NORMAL);
preparaCamera();
captura >> frame;
//variaveis do calculo de densidade
int *denH, *denV;
denH = new int[frame.rows];
denV = new int[frame.cols];
cv::Mat tep; //apagar ou melhorar
std::vector<int> partesH, partesV;
do {
captura >> frame;
//tratamento inicial das imagens
alteracao->paraPretoBranco(frame, pretoBranco);
//reconhecimento facial
coordenadas = identificador->pegaCara(pretoBranco);
for (int i = 0; i < coordenadas.size(); i++) {
mostraFrame(pretoBranco);
//apagar
tep = pretoBranco(coordenadas[i]).clone();
alteracao->brilhoContraste(tep);
alteracao->borrar(tep);
//alteracao->colocaBarraLimiar(pretoBranco(coordenadas[i]));
// alteracao->limiarOtsu(tep);
alteracao->pegaDensidade(tep, denH,0);
//alteracao->desenhaDensidade(tep, denH, 0);
identificador->pegaAreas(denH, tep.rows, partesH);
mostraFrame(tep);
for (int j = 0; j < (partesH.size() - 1); j = j + 2) {
alteracao->pegaDensidade(tep(cv::Rect_<int>(0, partesH[j], tep.cols, (partesH[j + 1] - partesH[j]))), 0, denV);
alteracao->desenhaDensidade(tep(cv::Rect_<int>(0, partesH[j], tep.cols, (partesH[j + 1] - partesH[j]))), 0, denV);
identificador->pegaAreas2(denV, tep.cols, partesV);
std::cout << j << " tamanho do array H: " << partesH.size() << " quadrado: " << cv::Rect_<int>(0, partesH[j], tep.cols, (partesH[j + 1] - partesH[j])) << '\n';
for (int y = 0; y < (partesV.size() - 1); y = y + 2) {
std::cout << j << " tamanho do array V: " << partesV.size() << " quadrado: " << cv::Rect_<int>(partesV[y], partesH[j], partesV[y + 1] - partesV[y], (partesH[j + 1] - partesH[j])) << '\n';
alteracao->desenhaRetangulo(tep, cv::Rect_<int>(partesV[y], partesH[j], partesV[y+1]-partesV[y], (partesH[j + 1] - partesH[j])));
}
partesV.erase(partesV.begin(), partesV.end());
}
partesH.erase(partesH.begin(), partesH.end());
/*
for (int j = 0; j < (partesH.size() - 1); j = j + 2) {
std::cout << j << " tamanho do array H: " << partesH.size() << " quadrado: " << cv::Rect_<int>(0, partesH[j], tep.cols, (partesH[j + 1] - partesH[j])) << '\n';
alteracao->desenhaRetangulo(tep, cv::Rect_<int>(0, partesH[j], tep.cols, (partesH[j + 1] - partesH[j])));
}
partesH.erase(partesH.begin(), partesH.end());
for (int y = 0; y < partesV.size() -1; y = y + 2) {
std::cout << y << " tamanho do array V: " << partesV.size() << " quadrado: " << cv::Rect_<int>(partesV[y], 0, (partesV[y + 1] - partesV[y]), tep.rows) << '\n';
alteracao->desenhaRetangulo(tep, cv::Rect_<int>(partesV[y], 0, (partesV[y + 1] - partesV[y]), tep.rows ));
}
partesV.erase(partesV.begin(), partesV.end());
*/
mostraFrame(tep);
//fim apagar
/*
identificador->pegaAreas(pretoBranco(coordenadas[i]), coordenadasBoca, coordenadasOlhoD, coordenadasOlhoE, coordenadasNariz);
for (size_t y = 0; y < coordenadasBoca.size(); y++) {
coordenadasBoca[y].x = coordenadasBoca[y].x + coordenadas[i].x;
coordenadasBoca[y].y = coordenadasBoca[y].y + coordenadas[i].y;
//cv::rectangle(frame, coordenadasBoca[y], cv::Scalar(0, 250, 0, 4)); //desenha o quadro verde na boca
alteracao->colocaBarraLimiar(pretoBranco(coordenadasBoca[y]));
}
for (size_t j = 0; j < coordenadasOlhoD.size(); j++) {
coordenadasOlhoD[j].x = coordenadasOlhoD[j].x + coordenadas[i].x;
coordenadasOlhoD[j].y = coordenadasOlhoD[j].y + coordenadas[i].y;
//cv::rectangle(frame, coordenadasOlhoD[j], cv::Scalar(0, 0, 250, 4)); //desenha o quadro vermelho no olhoD
alteracao->colocaBarraLimiar(pretoBranco(coordenadasOlhoD[j]));
}
for (size_t w = 0; w < coordenadasOlhoE.size(); w++) {
coordenadasOlhoE[w].x = coordenadasOlhoE[w].x + coordenadas[i].x;
coordenadasOlhoE[w].y = coordenadasOlhoE[w].y + coordenadas[i].y;
//cv::rectangle(frame, coordenadasOlhoE[w], cv::Scalar(0, 0, 250, 4)); //desenha o quadro vermelho no olhoE
alteracao->colocaBarraLimiar(pretoBranco(coordenadasOlhoE[w]));
}
for (size_t z = 0; z < coordenadasNariz.size(); z++) {
coordenadasNariz[z].x = coordenadasNariz[z].x + coordenadas[i].x;
coordenadasNariz[z].y = coordenadasNariz[z].y + coordenadas[i].y;
//cv::rectangle(frame, coordenadasNariz[z], cv::Scalar(100, 100, 100, 4)); //desenha o quadro cinza no nariz
alteracao->colocaBarraLimiar(pretoBranco(coordenadasNariz[z]));
} */
}
cv::imshow(janela, frame);
} while (cvWaitKey(1) != 13);
//limpeza
delete identificador;
delete alteracao;
delete[] denH;
delete[] denV;
}
void Camera::salvaMat(std::string destino, cv::Mat& imagem)
{
cv::imwrite(destino,imagem);
}
|
bfc44113eb328adeec7cbe81a90a329cba31d002 | 95ae92abbb91f8c980fe513fab893780d907ce0a | /Parallelia/ItemProcessor.h | c41f5a39f54c8d12b12abb256e91def5014d8fb2 | [] | no_license | ArtyomShabarshin/Parallelia | ce21079d4c2570df17e1ceaa066139be3bafb66a | 57c12a7d75fcf4cd94f870dc923a0dc8331c63e3 | refs/heads/master | 2020-05-26T23:45:52.315320 | 2013-03-26T14:55:24 | 2013-03-26T14:55:24 | 5,992,621 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,221 | h | ItemProcessor.h | #ifndef ITEMPROCESSOR_H
#define ITEMPROCESSOR_H
#include "IInputDataFlowBlock.h"
#include "InputDataFlowBlockCoreDebugProxy.h"
#include "concurrent_vector.h"
#include "concurrent_queue.h"
namespace Parallelia
{
namespace ParalleliaCore
{
template<typename T>
class ItemProcessor
{
public:
typedef IOutputDataFlowBlock<T>* Linktype;
typedef std::pair<Linktype, typename IInputDataFlowBlock<T>::Predicate> LinkStoreItem;
typedef typename Concurrency::concurrent_vector<LinkStoreItem>::const_iterator LinkIterator;
typedef Concurrency::concurrent_queue<std::shared_ptr<Concurrency::event> > ConsumerQueue;
ItemProcessor(Parallelia::Utils::InputDataFlowBlockCoreDebugProxy<T>& debug);
virtual ~ItemProcessor();
void ProcessItem(const T& t, int consumerid, ConsumerQueue& consumers) { DoProcessItem(t, consumerid, consumers); }
void AddLink(Linktype outputBlock, typename IInputDataFlowBlock<T>::Predicate predicate);
long ProcessedItems() const { return m_processedItems; }
protected:
LinkIterator BeginLink() { return m_linktovector.begin(); }
LinkIterator EndLink() { return m_linktovector.end(); }
Parallelia::Utils::InputDataFlowBlockCoreDebugProxy<T>& Debug() { return m_debug; }
void IncrementProcessedItems() { _InterlockedIncrement(&m_processedItems); }
private:
//no copy
ItemProcessor(const ItemProcessor&);
ItemProcessor& operator=(const ItemProcessor&);
virtual void DoProcessItem(const T& t, int consumerid, ConsumerQueue& consumers) = 0;
private:
Concurrency::concurrent_vector<LinkStoreItem> m_linktovector;
Parallelia::Utils::InputDataFlowBlockCoreDebugProxy<T>& m_debug;
long m_processedItems;
};
template<typename T>
ItemProcessor<T>::ItemProcessor(Parallelia::Utils::InputDataFlowBlockCoreDebugProxy<T>& debug) : m_debug(debug)
,m_processedItems(0L)
{}
template<typename T>
ItemProcessor<T>::~ItemProcessor()
{}
template<typename T>
void ItemProcessor<T>::AddLink(Linktype outputBlock, typename IInputDataFlowBlock<T>::Predicate predicate)
{
LinkStoreItem link = std::make_pair(outputBlock, predicate);
m_linktovector.push_back(link);
}
}
}
#endif |
1cc181accd1a3d87ea5a38d6abe7e8e23c69c390 | dd14da4f34dc2accd432601cf4e60a458cb930a4 | /STL/Containers/Sequence_Containers/list/list1.cpp | 2f4e43dc88f8a4960e793b9081ae7b44c53c729d | [] | no_license | debajitdeb11/cpp-code-practice | 8dfbff3becf2381b304f6de9411a0f4288108eca | a89a3f6f4a6c3d703c105922ad91b1a8a05d2091 | refs/heads/master | 2021-01-01T00:14:27.278647 | 2020-08-13T09:51:52 | 2020-08-13T09:51:52 | 239,092,286 | 1 | 0 | null | 2020-02-26T19:16:49 | 2020-02-08T08:17:33 | C++ | UTF-8 | C++ | false | false | 1,378 | cpp | list1.cpp | #include <iostream>
#include <list>
#include <iterator>
using namespace std;
// To display list
void display(list<int> li)
{
list<int>::iterator it;
for (it = li.begin(); it != li.end(); ++it)
cout << " " << *it;
cout << "\n";
}
int main()
{
// Initialized list
list<int> gqlist1;
list<int> gqlist2;
for (int i = 0; i < 10; i++)
{
gqlist1.push_back(i * 2);
gqlist2.push_front(i * 3);
}
// Display the Element of the List
cout << "Display the Element of List: 1\n";
display(gqlist1);
cout << "Display the element of List: 2\n";
display(gqlist2);
// Display the front & back of the List
cout << "List-1 front(): " << gqlist1.front() << "\n";
cout << "List-2 back(): " << gqlist2.back() << "\n";
// Pop the elements from the list
cout << "Pop() Element from the back of the List-1: "
<< "\n";
gqlist1.pop_back();
display(gqlist1);
cout << "Pop() Element from the front of the List - 2: "
<< "\n";
gqlist2.pop_front();
display(gqlist2);
// Reverse the list
cout << "Reverse List-1: ";
gqlist1.reverse();
display(gqlist1);
cout << "Reverse List-2: ";
gqlist2.reverse();
display(gqlist2);
// Sort the List
cout << "Sort the List-1: ";
gqlist1.sort();
display(gqlist1);
return 0;
} |
65f4e7147e576413768b309574ba1a6813baf10c | 04bfe691a9829dbc11f9f74dc8744f849cc50546 | /include/RunAction.hh | 6be461309cae107dc43429bf004fcd80291da0f1 | [] | no_license | Z6fans/muon | 174ae437575b013599a6dd28b0705aa2d119eab8 | 613323281def976538e9bf60c8088075e76d56fb | refs/heads/master | 2020-06-08T04:15:42.292742 | 2019-07-17T14:16:32 | 2019-07-17T14:16:32 | 193,155,661 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 448 | hh | RunAction.hh | #ifndef RUNACTION_HH
#define RUNACTION_HH
#include "G4UserRunAction.hh"
class G4Run;
class RunAction : public G4UserRunAction
{
public:
RunAction();
~RunAction();
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
private:
void CreateHistogram();
void WriteHistogram();
void BeginMaster();
void EndMaster(const G4Run*);
void BeginWorker();
void EndWorker(const G4Run*);
};
#endif // RUNACTION_HH
|
6499a52a136bd694a582c8d25c2e34b8ad4eea49 | 9402379373dceaacddbd68911410df582f763246 | /src/tlocCore/containers/tlocForwardList.h | 9558b7d60ecd2913f353b674c2a1a73cfcfa4a23 | [] | no_license | samaursa/tlocEngine | 45c08cf4c63e618f0df30adc91b39f58c7978608 | 5fab63a31af9c4e266d7805a24a3d6611af71fa7 | refs/heads/master | 2022-12-30T20:10:38.841709 | 2014-09-12T07:36:27 | 2014-09-12T07:36:27 | 305,503,446 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,691 | h | tlocForwardList.h | #ifndef TLOC_FORWARD_LIST_H
#define TLOC_FORWARD_LIST_H
#include <tlocCore/tlocCoreBase.h>
#include <tlocCore/containers/tlocList.h>
#include <tlocCore/containers/tlocArray.h>
#include <tlocCore/iterators/tlocIterator.h>
#include <tlocCore/utilities/tlocUtils.h>
namespace tloc { namespace core { namespace containers {
template <typename T, typename T_Container>
class ForwardListT
{
private:
//--------------------------------------------------------------------------
// typedefs
typedef ForwardListT<T, T_Container> this_type;
public:
//--------------------------------------------------------------------------
// typedefs (similar to forward_list)
typedef T_Container container_type;
typedef typename T_Container::value_type value_type;
typedef typename T_Container::size_type size_type;
typedef typename T_Container::difference_type difference_type;
typedef typename T_Container::reference reference;
typedef typename T_Container::const_reference const_reference;
typedef typename T_Container::pointer pointer;
typedef typename T_Container::const_pointer const_pointer;
typedef typename T_Container::iterator iterator;
typedef typename T_Container::const_iterator const_iterator;
//--------------------------------------------------------------------------
// Functions
//
// Notes: The following methods, unlike all other methods in the engine
// are started with lower case and match std::forward_list. This is to
// facilitate switching between the containers easily if need be
//--------------------------------------------------------------------------
// Constructors
TL_FI ForwardListT();
TL_FI ForwardListT(size_type aCount, const T& value = T());
template <typename T_InputIterator>
TL_FI ForwardListT(T_InputIterator aRangeBegin, T_InputIterator aRangeEnd);
TL_FI ForwardListT(const this_type& aOther);
//--------------------------------------------------------------------------
// General
TL_FI const T_Container& _Get_container() const;
//--------------------------------------------------------------------------
// Assignment
TL_FI void assign(size_type aCount, const T& aValue);
template <typename T_InputIterator>
TL_FI void assign(T_InputIterator aFirst,
T_InputIterator aLast);
//--------------------------------------------------------------------------
// Element Access
TL_FI reference front();
TL_FI const_reference front() const;
//--------------------------------------------------------------------------
// Iterators
TL_FI iterator before_begin();
TL_FI const_iterator before_begin() const;
TL_FI const_iterator cbefore_begin() const;
TL_FI iterator begin();
TL_FI const_iterator begin() const;
TL_FI const_iterator cbegin() const;
TL_FI iterator end();
TL_FI const_iterator end() const;
TL_FI const_iterator cend() const;
//--------------------------------------------------------------------------
// Capacity
TL_FI bool empty() const;
TL_FI size_type max_size() const;
//--------------------------------------------------------------------------
// Modifiers
// TODO: Fix all inputs to const_iterator once iterator -> const_iterator
// cast conversion exists
// TODO: Make all insert_after functions return an iterator to the element
// it has inserted.
TL_FI void clear();
TL_FI iterator insert_after(iterator aPos,
const value_type& aValue);
TL_FI void insert_after(iterator aPos,
size_type aNumOfValues,
const value_type& aValue);
template <typename T_Iterator>
TL_FI void insert_after(iterator aPos,
T_Iterator aFirst,
T_Iterator aLast);
TL_FI iterator erase_after(iterator aPos);
TL_FI iterator erase_after(iterator aFirst,
iterator aLast);
TL_FI void push_front(const T& aValue);
TL_FI void pop_front();
TL_FI void swap(this_type& aOther);
//--------------------------------------------------------------------------
// Operations
TL_FI void merge(this_type& aOther);
template <typename T_Compare>
TL_FI void merge(this_type& aOther, T_Compare aComp);
TL_FI void splice_after(iterator aPos, this_type& aFrom);
TL_FI void splice_after(iterator aPos, this_type& aFrom,
iterator aOther);
TL_FI void splice_after(iterator aPos, this_type& aFrom,
iterator aOtherBegin,
iterator aOtherEnd);
template <typename T_Pred>
TL_FI void remove_if(T_Pred aFunctionToCompare);
TL_FI void reverse();
TL_FI void unique();
template <typename T_Pred>
TL_FI void unique(T_Pred aBinaryPred);
TL_FI void sort();
template <typename T_Compare>
TL_FI void sort(T_Compare aComp);
protected:
//--------------------------------------------------------------------------
// Variables
T_Container m_container;
};
//////////////////////////////////////////////////////////////////////////
// Default types for easy instantiation
template <typename T>
struct ForwardList : public utils::TypedefHelperBase<T>
{
typedef ForwardListT
<T, List<T, ListNode<T, singly_linked_tag>, List_Dynamic(), false> > type;
};
template <typename T>
struct ArrayForwardList : public utils::TypedefHelperBase<T>
{
typedef ForwardListT<T, Array<T> > type;
};
};};};
#endif |
310cc74d5654da40070e86744382d2ec18eee71d | 7859b6b4f7f2024bfaace1423d062f069711c8a0 | /opt/cfg_lifting.h | c1bc22d12cd4925fcf8d163c7318922af5421bf7 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | onecoolx/xoc | 751f0b28dacbd7e358afbeb679b9335ac9dbc7bb | 1af5e48f4e2967d33cf7aa0359ed526d4920e6a6 | refs/heads/master | 2023-01-07T19:33:04.033188 | 2023-01-04T09:59:20 | 2023-01-04T09:59:20 | 40,281,588 | 0 | 0 | null | 2018-02-07T06:08:22 | 2015-08-06T03:10:27 | C++ | UTF-8 | C++ | false | false | 2,261 | h | cfg_lifting.h | /*@
Copyright (c) 2013-2021, Su Zhenyu steven.known@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Su Zhenyu nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@*/
#ifndef _CFG_LIFTING_H_
#define _CFG_LIFTING_H_
namespace xoc {
class CFGLifting {
COPY_CONSTRUCTOR(CFGLifting);
IRCFG * m_cfg;
BB2LI m_bb2li;
public:
CFGLifting(IRCFG * cfg);
//Find and Return LOOP_SIBLING and BODY_ROOT.
//e.g:LOOP
// BODY_ROOT
// END_LOOP
// LOOP_SIBLING
void getKidOfLoop(IRBB * bb, OUT IRBB ** sibling, OUT IRBB ** body_root);
//Find and Return TRUE_BODY, FALSE_BODY, IF_SIBLING.
//e.g:IF
// TRUE_BODY
// ELSE
// FALSE_BODY
// END_IF
// IF_SIBLING
void getKidOfIF(IRBB * irbb, IRBB ** true_body, IRBB ** false_body,
IRBB ** sibling);
};
} //namespace xoc
#endif
|
3291576b66703945c8892d406e0cb353c3c96dec | b9154098324ab0b1339dee638db0e5218e458328 | /codeforces/749D1.cpp | 276d039241cd9dc14363010fff1ebd48c8ab3d5d | [] | no_license | yasharmaster/competitive-programming-solutions | 17c972e1842fa28969fb459b0d4db8c4568faee0 | b862c89a5adda744185a2b14b82342d1912f3798 | refs/heads/master | 2021-01-20T09:45:56.325759 | 2017-10-22T04:44:35 | 2017-10-22T04:44:35 | 78,131,241 | 0 | 3 | null | 2017-10-22T04:44:36 | 2017-01-05T16:53:52 | C++ | UTF-8 | C++ | false | false | 1,778 | cpp | 749D1.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <climits>
#include <vector>
#include <string>
#include <set>
#define DBG false
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)
#define mp make_pair
#define pb push_back
#define fast_io ios_base::sync_with_stdio(0);cin.tie(NULL)
typedef long long ll;
using namespace std;
int main(){
fast_io;
int n;
cin >> n;
vector<int> bids[n+1];
int max_bid[n+1], person, bid, q, k;
FOR(i, 1, n){
max_bid[i] = -1;
}
REP(i, n){
cin >> person >> bid;
bids[person].push_back(bid);
if(max_bid[person] < bid){
max_bid[person] = bid;
}
}
set< pair<int, int> > myset;
FOR(i, 1, n){
if(max_bid[i] != -1){
myset.insert(make_pair(-max_bid[i], i));
}
}
FOR(i, 1, n){
sort(bids[i].begin(), bids[i].end());
}
cin >> q;
while(q--){
cin >> k;
vector<int> gone;
REP(i, k){
cin >> person;
gone.push_back(person);
if(max_bid[person] != -1){
myset.erase(make_pair(-max_bid[person], person));
}
}
if(myset.empty()){
cout << "0 0\n";
}
else if(myset.size() == 1){
person = (*myset.begin()).second;
cout << person << " " << bids[person][0] << endl;
}
else{
set<pair<int, int> >::iterator itr = myset.begin();
pair<int, int> a = *itr;
itr++;
pair<int, int> b = *itr;
bid = *lower_bound(bids[a.second].begin(), bids[a.second].end(), -b.first);
cout << a.second << " " << bid << endl;
}
REP(i, k){
if( max_bid[gone[i]] != -1){
myset.insert(make_pair(-max_bid[gone[i]], gone[i]));
}
}
}
return 0;
}
|
0e3246835d91f71655407e8e6357fe188e2d076c | 44c4009ebfbc777bf338024d36150b64d4f37602 | /nested-try.cpp | a7bbc2fb64da69bf2af4e8f22c1400653497f687 | [] | no_license | Animeshnbe/hello-world | 7951bf20da1d27b9d66a61a7034863139ddfcf45 | cef78b83d071399e4b656b561a04c80a0b638159 | refs/heads/master | 2018-10-12T18:41:02.021579 | 2018-07-11T16:16:33 | 2018-07-11T16:16:33 | 116,478,327 | 0 | 0 | null | 2018-07-11T12:41:05 | 2018-01-06T11:43:07 | null | UTF-8 | C++ | false | false | 471 | cpp | nested-try.cpp | #include<iostream>
#include<math.h>
using namespace std;
int main(){
float a,b;
cout<<"\nEnter a natural number: ";
try{
cin>>a;
try{
b=a-floor(a);
if(b!=0)
throw ("Not an integer!");
cout<<a/(a+5)<<endl;
}
catch (const char msg[]){
cout<<msg<<endl;
}
if (a<=0)
throw("Not a natural number!");
cout<<a*a<<endl;
}
catch (const char msg[]){
cout<<msg<<endl;
}
cout<<a/(a-5)<<endl;
return 0;
}
|
68851163b253deaae03362bfc79a609dfaa376be | 76dba61f664fe4a9ecf7fa5a926a43055e8b92d5 | /mesh/nurbs.hpp | 907be677d1f5dd71aa4a4878407fd0e23cd238b4 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Zlib"
] | permissive | mfem/mfem | 4be8b3782f69af874a543565c25b3615188137a1 | a15866e212b167ab83d5384e7326cdd3fa0723b2 | refs/heads/master | 2023-08-16T23:11:02.996304 | 2023-08-16T03:10:57 | 2023-08-16T03:10:57 | 37,287,688 | 1,442 | 548 | BSD-3-Clause | 2023-09-14T16:29:14 | 2015-06-11T21:42:21 | C++ | UTF-8 | C++ | false | false | 25,590 | hpp | nurbs.hpp | // Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit https://mfem.org.
//
// MFEM is free software; you can redistribute it and/or modify it under the
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.
#ifndef MFEM_NURBS
#define MFEM_NURBS
#include "../config/config.hpp"
#include "../general/table.hpp"
#include "../linalg/vector.hpp"
#include "element.hpp"
#include "mesh.hpp"
#ifdef MFEM_USE_MPI
#include "../general/communication.hpp"
#endif
#include <iostream>
namespace mfem
{
class GridFunction;
class KnotVector
{
protected:
static const int MaxOrder;
Vector knot;
int Order, NumOfControlPoints, NumOfElements;
public:
/// Create KnotVector
KnotVector() { }
KnotVector(std::istream &input);
KnotVector(int Order_, int NCP);
KnotVector(const KnotVector &kv) { (*this) = kv; }
KnotVector &operator=(const KnotVector &kv);
int GetNE() const { return NumOfElements; }
int GetNKS() const { return NumOfControlPoints - Order; }
int GetNCP() const { return NumOfControlPoints; }
int GetOrder() const { return Order; }
int Size() const { return knot.Size(); }
/// Count the number of elements
void GetElements();
bool isElement(int i) const { return (knot(Order+i) != knot(Order+i+1)); }
double getKnotLocation(double xi, int ni) const
{ return (xi*knot(ni+1) + (1. - xi)*knot(ni)); }
int findKnotSpan(double u) const;
void CalcShape (Vector &shape, int i, double xi) const;
void CalcDShape (Vector &grad, int i, double xi) const;
void CalcDnShape(Vector &gradn, int n, int i, double xi) const;
void CalcD2Shape(Vector &grad2, int i, double xi) const
{ CalcDnShape(grad2, 2, i, xi); }
/** Gives the locations of the maxima of the knotvector in reference space. The
function gives the knotspan @a ks, the coordinate in the knotspan @a xi
and the coordinate of the maximum in parameter space @a u */
void FindMaxima(Array<int> &ks, Vector &xi, Vector &u);
/** Global curve interpolation through the points @a x. @a x is an array with the
length of the spatial dimension containing vectors with spatial coordinates. The
controlpoints of the interpolated curve are given in @a x in the same form.*/
void FindInterpolant(Array<Vector*> &x);
void Difference(const KnotVector &kv, Vector &diff) const;
void UniformRefinement(Vector &newknots) const;
/** Return a new KnotVector with elevated degree by repeating the endpoints
of the knot vector. */
/// @note The returned object should be deleted by the caller.
KnotVector *DegreeElevate(int t) const;
void Flip();
void Print(std::ostream &out) const;
void PrintFunctions(std::ostream &out, int samples=11) const;
/// Destroys KnotVector
~KnotVector() { }
double &operator[](int i) { return knot(i); }
const double &operator[](int i) const { return knot(i); }
};
class NURBSPatch
{
protected:
int ni, nj, nk, Dim;
double *data; // the layout of data is: (Dim x ni x nj x nk)
Array<KnotVector *> kv;
// Special B-NET access functions
// - SetLoopDirection(int dir) flattens the multi-dimensional B-NET in the
// requested direction. It effectively creates a 1D net.
// - The slice(int, int) operator is the access function in that flattened structure.
// The first int gives the slice and the second int the element in that slice.
// - Both routines are used in 'InsertKnot', 'DegreeElevate' and 'UniformRefinement'.
// - In older implementations slice(int int) was implemented as operator()(int, int)
int nd; // Number of knots in flattened structure
int ls; // Number of variables per knot in flattened structure
int sd; // Stride for data access
int SetLoopDirection(int dir);
inline double &slice(int i, int j);
inline const double &slice(int i, int j) const;
NURBSPatch(NURBSPatch *parent, int dir, int Order, int NCP);
void swap(NURBSPatch *np);
void init(int dim_);
public:
NURBSPatch(const NURBSPatch &orig);
NURBSPatch(std::istream &input);
NURBSPatch(const KnotVector *kv0, const KnotVector *kv1, int dim_);
NURBSPatch(const KnotVector *kv0, const KnotVector *kv1,
const KnotVector *kv2, int dim_);
NURBSPatch(Array<const KnotVector *> &kv, int dim_);
NURBSPatch& operator=(const NURBSPatch&) = delete;
~NURBSPatch();
void Print(std::ostream &out) const;
void DegreeElevate(int dir, int t);
void KnotInsert (int dir, const KnotVector &knot);
void KnotInsert (int dir, const Vector &knot);
void KnotInsert(Array<Vector *> &knot);
void KnotInsert(Array<KnotVector *> &knot);
void DegreeElevate(int t);
void UniformRefinement();
// Return the number of components stored in the NURBSPatch
int GetNC() const { return Dim; }
int GetNKV() const { return kv.Size(); }
/// @note The returned object should NOT be deleted by the caller.
KnotVector *GetKV(int i) { return kv[i]; }
// Standard B-NET access functions
inline double &operator()(int i, int j);
inline const double &operator()(int i, int j) const;
inline double &operator()(int i, int j, int l);
inline const double &operator()(int i, int j, int l) const;
inline double &operator()(int i, int j, int k, int l);
inline const double &operator()(int i, int j, int k, int l) const;
static void Get2DRotationMatrix(double angle,
DenseMatrix &T);
static void Get3DRotationMatrix(double n[], double angle, double r,
DenseMatrix &T);
void FlipDirection(int dir);
void SwapDirections(int dir1, int dir2);
/// Rotate the NURBSPatch.
/** A rotation of a 2D NURBS-patch requires an angle only. Rotating
a 3D NURBS-patch requires a normal as well.*/
void Rotate(double angle, double normal[]= NULL);
void Rotate2D(double angle);
void Rotate3D(double normal[], double angle);
int MakeUniformDegree(int degree = -1);
/// @note The returned object should be deleted by the caller.
friend NURBSPatch *Interpolate(NURBSPatch &p1, NURBSPatch &p2);
/// @note The returned object should be deleted by the caller.
friend NURBSPatch *Revolve3D(NURBSPatch &patch, double n[], double ang,
int times);
};
#ifdef MFEM_USE_MPI
class ParNURBSExtension;
#endif
class NURBSPatchMap;
class NURBSExtension
{
#ifdef MFEM_USE_MPI
friend class ParNURBSExtension;
#endif
friend class NURBSPatchMap;
protected:
int mOrder; // see GetOrder() for description
Array<int> mOrders;
int NumOfKnotVectors;
// global entity counts
int NumOfVertices, NumOfElements, NumOfBdrElements, NumOfDofs;
// local entity counts
int NumOfActiveVertices, NumOfActiveElems, NumOfActiveBdrElems;
int NumOfActiveDofs;
Array<int> activeVert; // activeVert[glob_vert] = loc_vert or -1
Array<bool> activeElem;
Array<bool> activeBdrElem;
Array<int> activeDof; // activeDof[glob_dof] = loc_dof + 1 or 0
Mesh *patchTopo;
int own_topo;
Array<int> edge_to_knot;
Array<KnotVector *> knotVectors;
Vector weights;
// periodic BC info:
// - dof 2 dof map
// - master and slave boundary indices
Array<int> d_to_d;
Array<int> master;
Array<int> slave;
// global offsets, meshOffsets == meshVertexOffsets
Array<int> v_meshOffsets;
Array<int> e_meshOffsets;
Array<int> f_meshOffsets;
Array<int> p_meshOffsets;
// global offsets, spaceOffsets == dofOffsets
Array<int> v_spaceOffsets;
Array<int> e_spaceOffsets;
Array<int> f_spaceOffsets;
Array<int> p_spaceOffsets;
Table *el_dof, *bel_dof;
Array<int> el_to_patch;
Array<int> bel_to_patch;
Array2D<int> el_to_IJK; // IJK are "knot-span" indices!
Array2D<int> bel_to_IJK; // they are NOT element indices!
std::vector<Array<int>> patch_to_el;
std::vector<Array<int>> patch_to_bel;
Array<NURBSPatch *> patches;
inline int KnotInd(int edge) const;
/// @note The returned object should NOT be deleted by the caller.
inline KnotVector *KnotVec(int edge);
inline const KnotVector *KnotVec(int edge) const;
inline const KnotVector *KnotVec(int edge, int oedge, int *okv) const;
void CheckPatches();
void CheckBdrPatches();
void GetPatchKnotVectors (int p, Array<KnotVector *> &kv);
void GetPatchKnotVectors (int p, Array<const KnotVector *> &kv) const;
void GetBdrPatchKnotVectors(int p, Array<KnotVector *> &kv);
void GetBdrPatchKnotVectors(int p, Array<const KnotVector *> &kv) const;
void SetOrderFromOrders();
void SetOrdersFromKnotVectors();
// periodic BC helper functions
void InitDofMap();
void ConnectBoundaries();
void ConnectBoundaries1D(int bnd0, int bnd1);
void ConnectBoundaries2D(int bnd0, int bnd1);
void ConnectBoundaries3D(int bnd0, int bnd1);
int DofMap(int dof) const
{
return (d_to_d.Size() > 0 )? d_to_d[dof] : dof;
};
// also count the global NumOfVertices and the global NumOfDofs
void GenerateOffsets();
// count the global NumOfElements
void CountElements();
// count the global NumOfBdrElements
void CountBdrElements();
// generate the mesh elements
void Get1DElementTopo(Array<Element *> &elements) const;
void Get2DElementTopo(Array<Element *> &elements) const;
void Get3DElementTopo(Array<Element *> &elements) const;
// generate the boundary mesh elements
void Get1DBdrElementTopo(Array<Element *> &boundary) const;
void Get2DBdrElementTopo(Array<Element *> &boundary) const;
void Get3DBdrElementTopo(Array<Element *> &boundary) const;
// FE space generation functions
// based on activeElem, count NumOfActiveDofs, generate el_dof,
// el_to_patch, el_to_IJK, activeDof map (global-to-local)
void GenerateElementDofTable();
// generate elem_to_global-dof table for the active elements
// define el_to_patch, el_to_IJK, activeDof (as bool)
void Generate1DElementDofTable();
void Generate2DElementDofTable();
void Generate3DElementDofTable();
// call after GenerateElementDofTable
void GenerateBdrElementDofTable();
// generate the bdr-elem_to_global-dof table for the active bdr. elements
// define bel_to_patch, bel_to_IJK
void Generate1DBdrElementDofTable();
void Generate2DBdrElementDofTable();
void Generate3DBdrElementDofTable();
// FE --> Patch translation functions
void GetPatchNets (const Vector &Nodes, int vdim);
void Get1DPatchNets(const Vector &Nodes, int vdim);
void Get2DPatchNets(const Vector &Nodes, int vdim);
void Get3DPatchNets(const Vector &Nodes, int vdim);
// Patch --> FE translation functions
// Side effects: delete the patches, update the weights from the patches
void SetSolutionVector (Vector &Nodes, int vdim);
void Set1DSolutionVector(Vector &Nodes, int vdim);
void Set2DSolutionVector(Vector &Nodes, int vdim);
void Set3DSolutionVector(Vector &Nodes, int vdim);
// determine activeVert, NumOfActiveVertices from the activeElem array
void GenerateActiveVertices();
// determine activeBdrElem, NumOfActiveBdrElems
void GenerateActiveBdrElems();
void MergeWeights(Mesh *mesh_array[], int num_pieces);
void SetPatchToElements();
void SetPatchToBdrElements();
// to be used by ParNURBSExtension constructor(s)
NURBSExtension() { }
public:
/// Copy constructor: deep copy
NURBSExtension(const NURBSExtension &orig);
/// Read-in a NURBSExtension
NURBSExtension(std::istream &input);
/** @brief Create a NURBSExtension with elevated order by repeating the
endpoints of the knot vectors and using uniform weights of 1. */
/** If a knot vector in @a parent already has order greater than or equal to
@a newOrder, it will be used unmodified. */
NURBSExtension(NURBSExtension *parent, int newOrder);
/** @brief Create a NURBSExtension with elevated knot vector orders (by
repeating the endpoints of the knot vectors and using uniform weights of
1) as given by the array @a newOrders. */
/** If a knot vector in @a parent already has order greater than or equal to
the corresponding entry in @a newOrder, it will be used unmodified. */
NURBSExtension(NURBSExtension *parent, const Array<int> &newOrders);
/// Construct a NURBSExtension by merging a partitioned NURBS mesh
NURBSExtension(Mesh *mesh_array[], int num_pieces);
/// Copy assignment not supported
NURBSExtension& operator=(const NURBSExtension&) = delete;
// Generate connections between boundaries, such as periodic BCs
void ConnectBoundaries(Array<int> &master, Array<int> &slave);
const Array<int> &GetMaster() const { return master; };
Array<int> &GetMaster() { return master; };
const Array<int> &GetSlave() const { return slave; };
Array<int> &GetSlave() { return slave; };
void MergeGridFunctions(GridFunction *gf_array[], int num_pieces,
GridFunction &merged);
/// Destroy a NURBSExtension
virtual ~NURBSExtension();
// Print functions
void Print(std::ostream &out) const;
void PrintCharacteristics(std::ostream &out) const;
void PrintFunctions(const char *filename, int samples=11) const;
// Meta data functions
int Dimension() const { return patchTopo->Dimension(); }
int GetNP() const { return patchTopo->GetNE(); }
int GetNBP() const { return patchTopo->GetNBE(); }
/// Read-only access to the orders of all knot vectors.
const Array<int> &GetOrders() const { return mOrders; }
/** @brief If all orders are identical, return that number. Otherwise, return
NURBSFECollection::VariableOrder. */
int GetOrder() const { return mOrder; }
int GetNKV() const { return NumOfKnotVectors; }
int GetGNV() const { return NumOfVertices; }
int GetNV() const { return NumOfActiveVertices; }
int GetGNE() const { return NumOfElements; }
int GetNE() const { return NumOfActiveElems; }
int GetGNBE() const { return NumOfBdrElements; }
int GetNBE() const { return NumOfActiveBdrElems; }
int GetNTotalDof() const { return NumOfDofs; }
int GetNDof() const { return NumOfActiveDofs; }
// Knotvector read-only access function
const KnotVector *GetKnotVector(int i) const { return knotVectors[i]; }
// Mesh generation functions
void GetElementTopo (Array<Element *> &elements) const;
void GetBdrElementTopo(Array<Element *> &boundary) const;
bool HavePatches() const { return (patches.Size() != 0); }
/// @note The returned object should NOT be deleted by the caller.
Table *GetElementDofTable() { return el_dof; }
/// @note The returned object should NOT be deleted by the caller.
Table *GetBdrElementDofTable() { return bel_dof; }
void GetVertexLocalToGlobal(Array<int> &lvert_vert);
void GetElementLocalToGlobal(Array<int> &lelem_elem);
// Set the attribute for patch @a i, which is set to all elements in the
// patch.
void SetPatchAttribute(int i, int attr) { patchTopo->SetAttribute(i, attr); }
// Get the attribute for patch @a i, which is set to all elements in the
// patch.
int GetPatchAttribute(int i) const { return patchTopo->GetAttribute(i); }
// Set the attribute for patch boundary element @a i, which is set to all
// boundary elements in the patch.
void SetPatchBdrAttribute(int i, int attr)
{ patchTopo->SetBdrAttribute(i, attr); }
// Get the attribute for patch boundary element @a i, which is set to all
// boundary elements in the patch.
int GetPatchBdrAttribute(int i) const
{ return patchTopo->GetBdrAttribute(i); }
// Load functions
void LoadFE(int i, const FiniteElement *FE) const;
void LoadBE(int i, const FiniteElement *BE) const;
const Vector &GetWeights() const { return weights; }
Vector &GetWeights() { return weights; }
// Translation functions: from FE coordinates to IJK patch
// format and vice versa
void ConvertToPatches(const Vector &Nodes);
void SetKnotsFromPatches();
void SetCoordsFromPatches(Vector &Nodes);
// Read a GridFunction written patch-by-patch, e.g. with PrintSolution().
void LoadSolution(std::istream &input, GridFunction &sol) const;
// Write a GridFunction patch-by-patch.
void PrintSolution(const GridFunction &sol, std::ostream &out) const;
// Refinement methods
// new_degree = max(old_degree, min(old_degree + rel_degree, degree))
void DegreeElevate(int rel_degree, int degree = 16);
void UniformRefinement();
void KnotInsert(Array<KnotVector *> &kv);
void KnotInsert(Array<Vector *> &kv);
const Array<int>& GetPatchElements(int patch);
const Array<int>& GetPatchBdrElements(int patch);
};
#ifdef MFEM_USE_MPI
class ParNURBSExtension : public NURBSExtension
{
private:
int *partitioning;
Table *GetGlobalElementDofTable();
Table *Get1DGlobalElementDofTable();
Table *Get2DGlobalElementDofTable();
Table *Get3DGlobalElementDofTable();
void SetActive(const int *partitioning, const Array<bool> &active_bel);
void BuildGroups(const int *partitioning, const Table &elem_dof);
public:
GroupTopology gtopo;
Array<int> ldof_group;
ParNURBSExtension(const ParNURBSExtension &orig);
ParNURBSExtension(MPI_Comm comm, NURBSExtension *parent, int *partitioning,
const Array<bool> &active_bel);
// Create a parallel version of 'parent' with partitioning as in
// 'par_parent'; the 'parent' object is destroyed.
// The 'parent' can be either a local NURBSExtension or a global one.
ParNURBSExtension(NURBSExtension *parent,
const ParNURBSExtension *par_parent);
virtual ~ParNURBSExtension() { delete [] partitioning; }
};
#endif
class NURBSPatchMap
{
private:
const NURBSExtension *Ext;
int I, J, K, pOffset, opatch;
Array<int> verts, edges, faces, oedge, oface;
inline static int F(const int n, const int N)
{ return (n < 0) ? 0 : ((n >= N) ? 2 : 1); }
inline static int Or1D(const int n, const int N, const int Or)
{ return (Or > 0) ? n : (N - 1 - n); }
inline static int Or2D(const int n1, const int n2,
const int N1, const int N2, const int Or);
// also set verts, edges, faces, orientations etc
void GetPatchKnotVectors (int p, const KnotVector *kv[]);
void GetBdrPatchKnotVectors(int p, const KnotVector *kv[], int *okv);
public:
NURBSPatchMap(const NURBSExtension *ext) { Ext = ext; }
int nx() { return I + 1; }
int ny() { return J + 1; }
int nz() { return K + 1; }
void SetPatchVertexMap(int p, const KnotVector *kv[]);
void SetPatchDofMap (int p, const KnotVector *kv[]);
void SetBdrPatchVertexMap(int p, const KnotVector *kv[], int *okv);
void SetBdrPatchDofMap (int p, const KnotVector *kv[], int *okv);
inline int operator()(const int i) const;
inline int operator[](const int i) const { return (*this)(i); }
inline int operator()(const int i, const int j) const;
inline int operator()(const int i, const int j, const int k) const;
};
// Inline function implementations
inline double &NURBSPatch::slice(int i, int j)
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= nd || j < 0 || j > ls)
{
mfem_error("NURBSPatch::slice()");
}
#endif
return data[j%sd + sd*(i + (j/sd)*nd)];
}
inline const double &NURBSPatch::slice(int i, int j) const
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= nd || j < 0 || j > ls)
{
mfem_error("NURBSPatch::slice()");
}
#endif
return data[j%sd + sd*(i + (j/sd)*nd)];
}
inline double &NURBSPatch::operator()(int i, int l)
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= ni || nj > 0 || nk > 0 ||
l < 0 || l >= Dim)
{
mfem_error("NURBSPatch::operator() 1D");
}
#endif
return data[i*Dim+l];
}
inline const double &NURBSPatch::operator()(int i, int l) const
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= ni || nj > 0 || nk > 0 ||
l < 0 || l >= Dim)
{
mfem_error("NURBSPatch::operator() const 1D");
}
#endif
return data[i*Dim+l];
}
inline double &NURBSPatch::operator()(int i, int j, int l)
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= ni || j < 0 || j >= nj || nk > 0 ||
l < 0 || l >= Dim)
{
mfem_error("NURBSPatch::operator() 2D");
}
#endif
return data[(i+j*ni)*Dim+l];
}
inline const double &NURBSPatch::operator()(int i, int j, int l) const
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= ni || j < 0 || j >= nj || nk > 0 ||
l < 0 || l >= Dim)
{
mfem_error("NURBSPatch::operator() const 2D");
}
#endif
return data[(i+j*ni)*Dim+l];
}
inline double &NURBSPatch::operator()(int i, int j, int k, int l)
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= ni || j < 0 || j >= nj || k < 0 ||
k >= nk || l < 0 || l >= Dim)
{
mfem_error("NURBSPatch::operator() 3D");
}
#endif
return data[(i+(j+k*nj)*ni)*Dim+l];
}
inline const double &NURBSPatch::operator()(int i, int j, int k, int l) const
{
#ifdef MFEM_DEBUG
if (data == 0 || i < 0 || i >= ni || j < 0 || j >= nj || k < 0 ||
k >= nk || l < 0 || l >= Dim)
{
mfem_error("NURBSPatch::operator() const 3D");
}
#endif
return data[(i+(j+k*nj)*ni)*Dim+l];
}
inline int NURBSExtension::KnotInd(int edge) const
{
int kv = edge_to_knot[edge];
return (kv >= 0) ? kv : (-1-kv);
}
inline KnotVector *NURBSExtension::KnotVec(int edge)
{
return knotVectors[KnotInd(edge)];
}
inline const KnotVector *NURBSExtension::KnotVec(int edge) const
{
return knotVectors[KnotInd(edge)];
}
inline const KnotVector *NURBSExtension::KnotVec(int edge, int oedge, int *okv)
const
{
int kv = edge_to_knot[edge];
if (kv >= 0)
{
*okv = oedge;
return knotVectors[kv];
}
else
{
*okv = -oedge;
return knotVectors[-1-kv];
}
}
// static method
inline int NURBSPatchMap::Or2D(const int n1, const int n2,
const int N1, const int N2, const int Or)
{
// Needs testing
switch (Or)
{
case 0: return n1 + n2*N1;
case 1: return n2 + n1*N2;
case 2: return n2 + (N1 - 1 - n1)*N2;
case 3: return (N1 - 1 - n1) + n2*N1;
case 4: return (N1 - 1 - n1) + (N2 - 1 - n2)*N1;
case 5: return (N2 - 1 - n2) + (N1 - 1 - n1)*N2;
case 6: return (N2 - 1 - n2) + n1*N2;
case 7: return n1 + (N2 - 1 - n2)*N1;
}
#ifdef MFEM_DEBUG
mfem_error("NURBSPatchMap::Or2D");
#endif
return -1;
}
inline int NURBSPatchMap::operator()(const int i) const
{
const int i1 = i - 1;
switch (F(i1, I))
{
case 0: return verts[0];
case 1: return pOffset + Or1D(i1, I, opatch);
case 2: return verts[1];
}
#ifdef MFEM_DEBUG
mfem_error("NURBSPatchMap::operator() const 1D");
#endif
return -1;
}
inline int NURBSPatchMap::operator()(const int i, const int j) const
{
const int i1 = i - 1, j1 = j - 1;
switch (3*F(j1, J) + F(i1, I))
{
case 0: return verts[0];
case 1: return edges[0] + Or1D(i1, I, oedge[0]);
case 2: return verts[1];
case 3: return edges[3] + Or1D(j1, J, -oedge[3]);
case 4: return pOffset + Or2D(i1, j1, I, J, opatch);
case 5: return edges[1] + Or1D(j1, J, oedge[1]);
case 6: return verts[3];
case 7: return edges[2] + Or1D(i1, I, -oedge[2]);
case 8: return verts[2];
}
#ifdef MFEM_DEBUG
mfem_error("NURBSPatchMap::operator() const 2D");
#endif
return -1;
}
inline int NURBSPatchMap::operator()(const int i, const int j, const int k)
const
{
// Needs testing
const int i1 = i - 1, j1 = j - 1, k1 = k - 1;
switch (3*(3*F(k1, K) + F(j1, J)) + F(i1, I))
{
case 0: return verts[0];
case 1: return edges[0] + Or1D(i1, I, oedge[0]);
case 2: return verts[1];
case 3: return edges[3] + Or1D(j1, J, oedge[3]);
case 4: return faces[0] + Or2D(i1, J - 1 - j1, I, J, oface[0]);
case 5: return edges[1] + Or1D(j1, J, oedge[1]);
case 6: return verts[3];
case 7: return edges[2] + Or1D(i1, I, oedge[2]);
case 8: return verts[2];
case 9: return edges[8] + Or1D(k1, K, oedge[8]);
case 10: return faces[1] + Or2D(i1, k1, I, K, oface[1]);
case 11: return edges[9] + Or1D(k1, K, oedge[9]);
case 12: return faces[4] + Or2D(J - 1 - j1, k1, J, K, oface[4]);
case 13: return pOffset + I*(J*k1 + j1) + i1;
case 14: return faces[2] + Or2D(j1, k1, J, K, oface[2]);
case 15: return edges[11] + Or1D(k1, K, oedge[11]);
case 16: return faces[3] + Or2D(I - 1 - i1, k1, I, K, oface[3]);
case 17: return edges[10] + Or1D(k1, K, oedge[10]);
case 18: return verts[4];
case 19: return edges[4] + Or1D(i1, I, oedge[4]);
case 20: return verts[5];
case 21: return edges[7] + Or1D(j1, J, oedge[7]);
case 22: return faces[5] + Or2D(i1, j1, I, J, oface[5]);
case 23: return edges[5] + Or1D(j1, J, oedge[5]);
case 24: return verts[7];
case 25: return edges[6] + Or1D(i1, I, oedge[6]);
case 26: return verts[6];
}
#ifdef MFEM_DEBUG
mfem_error("NURBSPatchMap::operator() const 3D");
#endif
return -1;
}
}
#endif
|
8cefd8738e1ad8ec0b35b6fcfd9c251f3f5da7f2 | 6ce2ce4bcbbb6142223878c1b36ad71d68dd55fb | /codeGenFrameWork/binaryExpr.cpp | b42f9955aceba6599799aba32b8e930336864431 | [] | no_license | aktemur/rtpg4llvm | d8a0365104001d8b741baf3218523317e56810d9 | 808633d9b959913ecb6c83795f830c028ea0ba6f | refs/heads/master | 2021-03-24T12:43:54.744478 | 2018-02-08T10:32:01 | 2018-02-08T10:32:01 | 90,113,527 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 492 | cpp | binaryExpr.cpp | #include "binaryExpr.h"
#include <iostream>
using namespace codeGen;
BinaryExpr::~BinaryExpr() {
delete left;
delete right;
}
cval BinaryExpr::build() {
cval lval = left->build();
cval rval = right->build();
return this->op(lval, rval);
}
void BinaryExpr::print() {
std::cout << "(";
left->print();
printOp();
right->print();
std::cout << ")";
}
void BinaryExpr::setLeftExpr(ExprCode *e) {
left = e;
}
void BinaryExpr::setRightExpr(ExprCode *e) {
right = e;
} |
6b35cddc225e87a7e0160b8babf9df9a67081225 | d23726099e5da046531af160d7088fce0095b6af | /main.cpp | ed6968feb22bdb28516be6e0d8e4baa58e038e64 | [] | no_license | ICY-ANPI/RootFinder | 299a5c2e72f24977718cce418d5841e308690283 | 08332156a3feae709402931bdb61466bf6c28772 | refs/heads/master | 2021-04-03T09:04:46.531171 | 2018-03-10T07:49:38 | 2018-03-10T07:49:38 | 124,597,281 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 619 | cpp | main.cpp | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: Irene
*
* Last edited 9-3-18
*/
#include <stdio.h>
#include "iostream"
#include "resolver.h"
#include "functor.h"
using namespace std;
/*
*
*/
int main(int argc, char** argv) {
functor<double> f;
resolver<double> r;
//funcion sqr(x) -exp(-x), entre 0 y 1
cout<<"Newton Raphson: "<<r.NewtonRaphson(f,0,1)<<endl;
return 0;
}
|
0ff6dfbf0495df440cbfbe28c82358d85ee490e7 | c7c86ff91e651adb9bfc54c1ec4a6d2623cd77bc | /src/Core.h | aa0f577a4ea2bfe800a99cd8004105db04c19978 | [] | no_license | jeffason/JrsCheckers | f45ef8f0b57910f2d6872f0c206462b2f093abb6 | 12b7737a5027ee0fc8135cf6a22946e6385f389b | refs/heads/master | 2021-01-10T09:01:59.658108 | 2016-01-07T00:21:20 | 2016-01-07T00:21:20 | 49,169,802 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 669 | h | Core.h | /////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Core.h
//
// DESCRIPTION:
// Core engine functionality commonly used across different parts of the application
//
// jrs051413 - created
//
/////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
#define INPUT_KEY_ARROW_UP 72
#define INPUT_KEY_ARROW_LEFT 75
#define INPUT_KEY_ARROW_RIGHT 77
#define INPUT_KEY_ARROW_DOWN 80
namespace jrs{
struct Vec2D
{
int x;
int y;
Vec2D() : x(0), y(0) {}
Vec2D(int _x, int _y) : x(_x), y(_y) {}
};
} |
4ae4fbf8e2eef9bae97d4ec3ad9f5541c84aeaf5 | f059e48efe35c17d27a1c315593e895e34c932d4 | /structures/maps/hashmap.cpp | 41adcf9f77e5b82d3789c63fa2b4a3cd7ea808e3 | [] | no_license | mingkaic/MingC-Util | 02a855561b6be1ab034aacad575ea1f87e8f5b22 | f89e1df342cd0923aa278300913e2914a398c42c | refs/heads/master | 2021-01-01T05:44:45.046754 | 2016-05-13T19:13:16 | 2016-05-13T19:13:16 | 58,181,140 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,043 | cpp | hashmap.cpp | //
// hashmap.cpp
// Map
//
// description: hashmap that uses heaps as buckets
// features priority removal
//
// description: hashed structure mapping keys to value
//
// Created by Ming Kai Chen on 2014-07-15.
// Copyright (c) 2014 Ming Kai Chen. All rights reserved.
//
#ifdef __HASH_MAP__H
#include <string>
#define DEFAULT_NBUCKET 101
// constructs an array of searchlists
// of size 101
// @remark default constructor
template <typename K, typename V>
hashmap<K, V>::hashmap (void) : numBuckets(DEFAULT_NBUCKET), curSize(0)
{
dictionary = new list::searchlist<pairptr<K, V> >[numBuckets];
pairptr_initialize();
}
// constructs an array of searchlists
// of size primed number greater than
// intendedSize * 2
// @remark default constructor
template <typename K, typename V>
hashmap<K, V>::hashmap (size_t intendedSize) : curSize(0)
{
numBuckets = nearestPrime(intendedSize*2);
dictionary = new list::searchlist<pairptr<K, V> >[numBuckets];
pairptr_initialize();
}
// destroys self content, then copy src content to self
// minor issue: searchlist contains smart pointer which
// discourages deep copying. unreference pair
// when changing value
// @remark copy constructor
template <typename K, typename V>
hashmap<K, V>::hashmap (const hashmap& src) :
numBuckets(src.numBuckets), curSize(src.curSize), comparator<K>(src)
{
dictionary = new list::searchlist<pairptr<K, V> >[numBuckets];
pairptr_initialize();
for (size_t i = 0; i < src.numBuckets; i++)
{
dictionary[i] = src.dictionary[i];
}
}
// destructor
// @remark destructor
template <typename K, typename V>
hashmap<K, V>::~hashmap (void)
{
delete[] dictionary;
}
// copy assignment operator
// minor issue: searchlist contains smart pointer which
// discourages deep copying. unreference pair
// when changing value
// @param[in] src reference to hashmap object to copy from
// @return reference to this after copy assignment
template <typename K, typename V>
hashmap<K, V>& hashmap<K, V>::operator = (const hashmap<K, V>& src)
{
comparator<K>::operator = (src);
if (this != &src)
{
curSize = src.curSize;
numBuckets = src.numBuckets;
clear();
for (size_t i = 0; i < src.numBuckets; i++)
{
dictionary[i] = src.dictionary[i];
}
}
return *this;
}
// get value in key-value pairs into this
// @param[in] key key
// @return wrapper object value associated with key,
// castable to false if there was no associated value
// castable to true otherwise
template <typename K, typename V>
dcontain::wrapper<V> hashmap<K, V>::get (K key) const
{
dcontain::wrapper<V> pass; // empty wrapper (bad)
size_t hashIndex = this->hashcode(key) % numBuckets;
pairptr<K, V> sample(new dcontain::pair<K, V>(key));
signed searchIndex = dictionary[hashIndex].search(sample);
if (searchIndex > -1)
{
pairptr<K, V> ptr = dictionary[hashIndex].nPeek(searchIndex);
pass.value = ptr->getData();
pass.good = true;
}
return pass;
}
// insert key-value pairs into this
// @param[in] key key
// @param[in] value value
// @return wrapper object of previous value associated with key,
// castable to false if no previous value associated with key
// castable to true otherwise
template <typename K, typename V>
dcontain::wrapper<V> hashmap<K, V>::put (K key, V data)
{
dcontain::wrapper<V> pass; // empty wrapper (bad)
size_t hashIndex = this->hashcode(key) % numBuckets;
pairptr<K, V> sample(new dcontain::pair<K, V>(key, data));
signed searchIndex = dictionary[hashIndex].search(sample);
if (searchIndex > -1)
{
pairptr<K, V> ptr = dictionary[hashIndex].nReplace(sample, searchIndex);
pass.value = ptr->getData();
pass.good = true;
}
else
{
dictionary[hashIndex].push_back(sample);
curSize++;
}
return pass;
}
// insert all key-value pairs in other into this
// @param[in] other reference to another hashmap
// @return void
template <typename K, typename V>
void hashmap<K, V>::putAll (const hashmap<K, V>& other)
{
size_t listsize;
size_t hashIndex;
signed searchIndex;
for (size_t i = 0; i < other.numBuckets; i++)
{
listsize = other.dictionary[i].size();
for (size_t j = 0; j < listsize; j++)
{
pairptr<K, V> sample = other.dictionary[i].nPeek(j);
hashIndex = this->hashcode(sample->getKey()) % numBuckets;
searchIndex = dictionary[hashIndex].search(sample);
if (searchIndex > -1)
{
dictionary[hashIndex].nReplace(sample, searchIndex);
}
else
{
dictionary[hashIndex].push_back(sample);
curSize++;
}
}
}
}
// remove key-value association
// @param[in] key Key in the key-value pair
// @return wrapper object value associated with key,
// castable to false if there was no associated value
// castable to true otherwise
template <typename K, typename V>
dcontain::wrapper<V> hashmap<K, V>::remove (K key)
{
dcontain::wrapper<V> pass; // empty wrapper (bad)
size_t hashIndex = this->hashcode(key) % numBuckets;
pairptr<K, V> sample(new dcontain::pair<K, V>(key));
signed searchIndex = dictionary[hashIndex].search(sample);
if (searchIndex > -1)
{
pairptr<K, V> ptr = dictionary[hashIndex].nRemove(searchIndex);
pass.value = ptr->getData();
pass.good = true;
curSize--;
}
return pass;
}
// determines if key is stored
// @param[in] key Key value
// @return true if key is found, false otherwise
template <typename K, typename V>
bool hashmap<K, V>::containsKey (K key) const
{
pairptr<K, V> sample(new dcontain::pair<K, V>(key));
size_t hashIndex = this->hashcode(key);
signed searchIndex = dictionary[hashIndex].search(sample);
return searchIndex > -1;
}
// determines if value is stored
// @param[in] value Value
// @return true if key is found, false otherwise
template <typename K, typename V>
bool hashmap<K, V>::containsValue (V value, equatable<V> eq) const
{
size_t listsize;
size_t hashIndex;
signed searchIndex;
bool found = false;
for (size_t i = 0; i < numBuckets && false == found; i++)
{
listsize = dictionary[i].size();
for (size_t j = 0; j < listsize && false == found; j++)
{
pairptr<K, V> sample = dictionary[i].nPeek(j);
found = found || eq(value, sample->getValue());
}
}
return found;
}
// determines if dictionary is empty
// @param[] void
// @return true if empty, false otherwise
template <typename K, typename V>
bool hashmap<K, V>::isEmpty (void) const
{
return 0 == curSize;
}
// find the size of the list
// @param[] void
// @return integer size of list
template <typename K, typename V>
size_t hashmap<K, V>::size (void) const
{
return curSize;
}
// removes all pairs in dictionary
// @param[] void
// @return void
template <typename K, typename V>
void hashmap<K, V>::clear (void)
{
delete[] dictionary;
dictionary = new list::searchlist<pairptr<K, V> >[numBuckets];
}
template <typename K, typename V>
std::vector<K> hashmap<K, V>::hashIntersect (const hashmap<K, V>& src) const
{
std::vector<K> joined;
size_t listsize;
size_t hashIndex;
signed searchIndex;
for (size_t i = 0; i < src.numBuckets; i++)
{
listsize = src.dictionary[i].size();
for (size_t j = 0; j < listsize; j++)
{
pairptr<K, V> sample = src.dictionary[i].nPeek(j);
hashIndex = this->hashcode(sample->getKey()) % numBuckets;
searchIndex = dictionary[hashIndex].search(sample);
if (searchIndex > -1)
{
joined.push_back(sample.getKey());
}
}
}
return joined;
}
template <typename K, typename V>
std::vector<K> hashmap<K, V>::hashUnion (const hashmap& src) const
{
std::vector<K> joined;
size_t listsize;
size_t hashIndex;
signed searchIndex;
for (size_t i = 0; i < src.numBuckets; i++)
{
listsize = src.dictionary[i].size();
for (size_t j = 0; j < listsize; j++)
{
pairptr<K, V> sample = src.dictionary[i].nPeek(j);
hashIndex = this->hashcode(sample->getKey()) % numBuckets;
searchIndex = dictionary[hashIndex].search(sample);
if (searchIndex < 0)
{
joined.push_back(sample.getKey());
}
}
}
for (size_t i = 0; i < numBuckets; i++)
{
listsize = dictionary[i].size();
for (size_t j = 0; j < listsize; j++)
{
pairptr<K, V> sample = dictionary[i].nPeek(j);
joined.push_back(sample.getKey());
}
}
return joined;
}
template <typename K, typename V>
std::vector<K> hashmap<K, V>::hashDifference (const hashmap& src) const
{
std::vector<K> diff;
size_t listsize;
size_t hashIndex;
signed searchIndex;
for (size_t i = 0; i < numBuckets; i++)
{
listsize = dictionary[i].size();
for (size_t j = 0; j < listsize; j++)
{
pairptr<K, V> sample = dictionary[i].nPeek(j);
if (false == src.get(sample->getKey()))
{
diff.push_back(sample.getKey());
}
}
}
return diff;
}
#endif /* __HASH_MAP__H */ |
77e88f801076e72f874b3c7e809f6745a08e712b | b1f367c0994badd5b28a81824017d2a934c0a008 | /Algorithm/Branch_Bound/Exercise/Bracket normals/bracketNormal.cpp | 0cd17dd69d8d8b8321cba7d64fb9b56dc1874f02 | [] | no_license | h114mx001/Competitive-Coding | 070bfe8d931ca3e0a551cb839442e1b5c395f739 | 7cd069aff9450104a4b3b65bd2700fc1d6c5383c | refs/heads/master | 2023-02-07T07:37:25.334940 | 2020-12-27T09:33:31 | 2020-12-27T09:33:31 | 289,979,932 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 804 | cpp | bracketNormal.cpp | #include <bits/stdc++.h>
using namespace std;
int arr[100];
int n;
string brackets = "()";
bool checkValid(int j){
int sum = 0;
for (int i = 1; i <= j; i++){
if (arr[i] == 0){
++sum;
} else --sum;
if (sum < 0) return false;
}
if (j < n){
return true;
}
else if (sum == 0) return true; else return false;
}
void printResult(){
for (int i = 1; i <= n; i++){
cout << brackets[arr[i]];
}
cout << endl;
}
void Attempt(int i){
for (int j = 0; j <= 1; j++){
arr[i] = j;
if (checkValid(i)){
if (i == n) printResult();
else Attempt(i+1);
}
}
}
int main(){
freopen("task.inp","r",stdin);
freopen("task.out","w",stdout);
cin >> n;
n*=2;
Attempt(1);
} |
6803c31b9575ac29187ea624f482fe52ecd33328 | f6724b46574298a3b89ac558954eadc49c9f96f1 | /IntersectionofTwoLinkedLists.cpp | 123b18b9f96aae07e7f1b3e20f3b40ffb1c765c2 | [] | no_license | zrss/LeetCode | 5b0a6ce72d44859cc12a45edef8c5a371c149bc9 | 54ff11599b5c141072f94e77ce55731b76467f0d | refs/heads/master | 2020-04-06T00:57:25.675167 | 2016-10-22T03:26:26 | 2016-10-22T03:26:26 | 24,978,800 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,253 | cpp | IntersectionofTwoLinkedLists.cpp | #include <iostream>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
if (headA == NULL || headB == NULL)
return NULL;
ListNode* aPtr = headA;
ListNode* bPtr = headB;
while (aPtr != NULL && bPtr != NULL) {
aPtr = aPtr->next;
bPtr = bPtr->next;
}
ListNode* lPtr;
ListNode* lHead;
ListNode* sHead;
if (aPtr != NULL) {
lPtr = aPtr;
lHead = headA;
sHead = headB;
} else {
lPtr = bPtr;
lHead = headB;
sHead = headA;
}
while (lPtr != NULL) {
lPtr = lPtr->next;
lHead = lHead->next;
}
while (sHead != NULL && sHead != lHead) {
sHead = sHead->next;
lHead = lHead->next;
}
return sHead;
}
};
int main(int argc, char const *argv[])
{
Solution solution;
ListNode ln1(1);
ListNode ln2(2);
ListNode ln3(3);
ln1.next = &ln2;
ln2.next = &ln3;
ListNode* rel = solution.getIntersectionNode(&ln1, &ln1);
cout << rel->val << endl;
return 0;
} |
6f1f371acebbce39722a7d7a09b99e4fc76c9667 | 976a68b4b8441352b5f775a946335328db88783c | /src/assembler/mips_instr_writer.h | cbd2ef564801021e75345558e4c9195d1d256330 | [
"MIT"
] | permissive | maddnias/EzMIPS | 08f4b75d0c2529e6817175c09492712f648ec52d | 01b1a96528d2293faebc363a4004f8c03cf82f42 | refs/heads/master | 2021-05-31T07:02:45.852827 | 2016-05-03T12:25:22 | 2016-05-03T12:25:22 | 57,319,750 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 331 | h | mips_instr_writer.h | #ifndef MIPS_INSTR_WRITER_H
#define MIPS_INSTR_WRITER_H
#include "runtime_context.h"
class mips_instr_writer
{
public:
mips_instr_writer(void);
~mips_instr_writer(void);
void write_instr(const mips_instr &instr, mem_segment &segment,
unsigned int addr);
bool m_big_endian;
private:
runtime_context *ctx;
};
#endif
|
d5127c2823b875a38d00db3319a3a371cfe5ab13 | 0b01e80ca3d9217403b8aaf48ce6462c6a9cd296 | /Q_2422.cpp | 45861d5e73829adac4476dc13dabb0e26d655e29 | [] | no_license | middlelow-Y/algorithm_training | dda2fef8dbf0ec415058728db6ba2848637fa2c4 | e6f860f71db25c432b55236505d19073cdb2dc61 | refs/heads/master | 2021-10-10T13:51:14.494121 | 2019-01-11T12:49:51 | 2019-01-11T12:49:51 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 889 | cpp | Q_2422.cpp | #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int N, M;
int how_many = 0;
int main() {
int a, b;
scanf("%d %d", &N, &M);
vector<vector<int>> cannot(N, vector<int>(N,0));
for (int i = 0; i < M; i++) {
scanf("%d %d", &a, &b);
cannot[a - 1][b - 1] = 1;
cannot[b - 1][a - 1] = 1;
}
for (int first_choose = 0; first_choose < N - 2; first_choose++) {
for (int second_choose = first_choose + 1; second_choose < N - 1; second_choose++) {
for (int third_choose = second_choose + 1; third_choose < N; third_choose++) {
bool breaker2 = false;
if (cannot[first_choose][second_choose] == 1) breaker2 = true;
else if (cannot[second_choose][third_choose] == 1) breaker2 = true;
else if (cannot[first_choose][third_choose] == 1) breaker2 = true;
if (breaker2 == false) { how_many++; }
}
}
}
printf("%d \n", how_many);
} |
2d408931b411c63413df7bcdbfc8ea78b4785e1b | 945a0eadeef3656506fd875101f6d05e30058af7 | /src/motion_model.cpp | 63358c3fcf4dd72a92fe83d65d0925989d54c431 | [] | no_license | sameerbardapurkar/ParticleFilter | f3f8b420a7617cddb2a44ab853b6c62effff3788 | 75df45ee347173b2dab5fa3a0f6dac8351dceb1d | refs/heads/master | 2020-07-02T09:52:20.666591 | 2016-12-13T04:28:11 | 2016-12-13T04:28:11 | 74,312,385 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,877 | cpp | motion_model.cpp | #include <motion_model.h>
using namespace utils;
using namespace data;
namespace mm{
MotionModel::MotionModel(data::Log *log, double mm_std_xy, double mm_std_theta)
:
std_xy_(mm_std_xy),
std_theta_(mm_std_theta)
{
utils_ = new UtilFunctions();
log_ = log;
}
void MotionModel::applyMotionModel(std::vector<ps::ParticleState>& particles,
double time, double next_time){
odom* odom_val_current = log_->getOdom(time);
odom* odom_val_next = log_->getOdom(odom_val_current->next_t);
double x0 = odom_val_current->x;
double y0 = odom_val_current->y;
double th0 = odom_val_current->theta;
double x1 = odom_val_next->x;
double y1 = odom_val_next->y;
double th1 = odom_val_next->theta;
//Sameer
//printf("x0: %f, y0: %f, th0: %f, x1: %f, y1: %f, th1: %f \n", x0,y0,th0,x1,y1,th1);
//Sameer
// Change
double x_diff = x1 - x0;
double y_diff = y1 - y0;
double theta_diff = th1 - th0;
Eigen::Vector2f diff_vec(x_diff, y_diff);
Eigen::Vector2f robot_diff_vec = utils_->rotateVector(diff_vec, -th0); //check the angle of rotation
// the main loop of the motion model
for(int i = 0; i < particles.size(); i++){
double rot = particles[i].theta();
Eigen::Vector2f p_diff = utils_->rotateVector(robot_diff_vec, rot);
Eigen::Vector3f s_p_diff = sampleNormalDist(p_diff, theta_diff);
particles[i].x(particles[i].x() + s_p_diff(0));
particles[i].y(particles[i].y() + s_p_diff(1));
particles[i].theta(particles[i].theta() + s_p_diff(2));
}
}
Eigen::Vector3f MotionModel::sampleNormalDist(Eigen::Vector2f p, double theta){
std::random_device rd;
std::mt19937 gen(rd());
std::normal_distribution<> d1(p(0), std_xy_);
std::normal_distribution<> d2(p(1), std_xy_);
std::normal_distribution<> d3(theta, std_theta_);
Eigen::Vector3f norm_p(d1(gen), d2(gen), d3(gen));
return norm_p;
}
} |
12569f556cbcb5c64bdead998957b8ed6ecc28e7 | e5539f96495ab051a322b82896a6cc41731490b4 | /.old/ImpInHeaven/Scene.cpp | 7e3ae570c04b35cd3bd4507e88b66ccde6b91728 | [] | no_license | StormHowl/ImpInHeaven | 7fa8cd086e5b61f10879b755a8a0e7bf6287a3eb | b79c5d8e81c4799f678dba1d92ea5efb6432478c | refs/heads/master | 2021-07-05T21:28:20.016765 | 2017-09-29T17:40:58 | 2017-09-29T17:40:58 | 92,089,878 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,537 | cpp | Scene.cpp | #include "Scene.h"
#include "utils.h"
#include <algorithm>
#include <iterator>
Scene::Scene()
{
}
void Scene::addEntity(DrawableElement* element)
{
elements.push_back(element);
}
Imp* Scene::addPlayer(Imp* player)
{
players.insert(std::pair<std::string, Imp*>(player->getIdentifier(), player));
return player;
}
Monster* Scene::addMonster(Monster* monster)
{
monsters.insert(std::pair<std::string, Monster*>(monster->getIdentifier(), monster));
return monster;
}
Imp* Scene::getPlayerById(std::string identifier)
{
return players.at(identifier);
}
Monster* Scene::getMonsterById(std::string identifier)
{
return monsters.at(identifier);
}
std::vector<Imp*> Scene::getPlayers()
{
std::vector<Imp*> playersVector;
playersVector.reserve(players.size());
std::transform(players.begin(), players.end(), std::back_inserter(playersVector), [](std::pair<const std::string, Imp*> const &p) { return p.second; });
return playersVector;
}
std::vector<Monster*> Scene::getMonsters()
{
std::vector<Monster*> monstersVector;
monstersVector.reserve(monsters.size());
std::transform(monsters.begin(), monsters.end(), std::back_inserter(monstersVector), [](std::pair<const std::string, Monster*> const &p) { return p.second; });
return monstersVector;
}
void Scene::draw(Screen* screen)
{
for(const auto player : players)
{
player.second->draw(screen);
}
for (const auto monster : monsters)
{
dynamic_cast<Bird*>(monster.second)->draw(screen);
}
for(const auto element : elements)
{
element->draw(screen);
}
}
|
160cdb1c82588db3e596fdf1894c82014b0167ca | d55bc0e8fd533aa2c02e2f80f03944838f6acdb2 | /project/source/components/Camera.h | 23f34e0461eddcc86e58e037c5957fa3926c99b8 | [
"Zlib",
"CC-BY-4.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | laetemn/rehover | 8214a19610b364529ecf5405233dd631af6bd812 | 5219658b9877a9ea032a588aa95a6881ac37e92e | refs/heads/master | 2023-06-25T23:19:17.628437 | 2020-04-28T17:10:37 | 2020-04-28T17:10:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,706 | h | Camera.h | #pragma once
#include "../pchheader.h"
namespace Components {
/*! Camera viewport in screen space */
struct CameraViewport {
float width; /*< Width of the viewport rect */
float height; /*< Height of the viewport rect */
float offsetLeft; /*< X position relative to the left of the frame */
float offsetTop; /*< Y position relative to the top of the frame */
};
/*! \brief Camera component
* Gives an entity a camera that renders to a viewport (on screen)
*/
class Camera {
public:
/*! \brief Create a camera
* \param offsetLeft Viewport X position (relative to left)
* \param offsetTop Viewport Y position (relative to top)
* \param width Viewport width
* \param height Viewport height
*/
explicit Camera(float offsetLeft = 0, float offsetTop = 0, float width = 1, float height = 1);
/*! \brief Set camera viewport
* \param offsetLeft Viewport X position (relative to left)
* \param offsetTop Viewport Y position (relative to top)
* \param width Viewport width
* \param height Viewport height
*/
void SetViewport(float offsetLeft, float offsetTop, float width, float height);
/*! \brief Set camera perspective projection matrix
* \param fov Field of view
* \param nearPlane Near clipping plane distance
* \param farPlane Far clipping plane distance
*/
void SetPerspective(float fov, float nearPlane, float farPlane);
/*! Field of view */
float fieldOfView;
/*! Near clipping plane distance */
float nearPlane;
/*! Far clipping plane distance */
float farPlane;
/*! Camera viewport */
CameraViewport viewport;
/*! Perspective projection matrix */
Mtx44 perspectiveMtx;
};
} // namespace Components |
3868df9115e6edb778641693e0a7ba978c8f3c8f | 104f14a892dbdd0d3cae5428298c8a56fa7cb887 | /RectPlatform.cpp | f24a0e3f99934ba21d3ac1622a429699ebb64e97 | [] | no_license | biyasto/Recreated-SuperMarioBros3 | 4ba5addf0cb21df1551fcb0f50dfa48194873f8b | 8368256b9727d5a55b593f727e3a33bfa7a345c7 | refs/heads/master | 2023-06-29T16:05:04.855612 | 2021-08-04T11:59:07 | 2021-08-04T11:59:07 | 391,110,044 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 423 | cpp | RectPlatform.cpp | #include "RectPlatform.h"
CRectPlatform::CRectPlatform(float x, float y, float width, float height) {
this->x = x;
this->y = y;
this->width = width;
this->height = height;
}
void CRectPlatform::GetBoundingBox(float& left, float& top, float& right, float& bottom)
{
left = x - width / 2;
top = y - height / 2;
right = x + width / 2;
bottom = y + height / 2;
}
void CRectPlatform::Render(Vector2 finalPos) {
}
|
3ab6d5e0c8f1d641c5b453763c3b02a9ccf3cc17 | 5d5baef098c65be072a7ce12899d320847e8636d | /Mixer/DirectoriesDlg.cpp | 6eedac09582bcf8893680271ce9fdc3a38b9ce65 | [] | no_license | OlafvdSpek/xcc | e43bfdaf2fbac4c413fc7855ddf378b6d7975024 | 76adf95fc048d8c1143b3bcc8e777f870245680d | refs/heads/master | 2023-03-23T13:10:33.983570 | 2023-03-12T08:30:29 | 2023-03-12T08:30:29 | 44,600,393 | 44 | 18 | null | 2016-02-17T17:16:10 | 2015-10-20T10:59:00 | C++ | UTF-8 | C++ | false | false | 3,276 | cpp | DirectoriesDlg.cpp | #include "stdafx.h"
#include "DirectoriesDlg.h"
#include "xcc_dirs.h"
CDirectoriesDlg::CDirectoriesDlg(CWnd* pParent /*=NULL*/)
: ETSLayoutDialog(CDirectoriesDlg::IDD, pParent, "directories_dlg")
{
//{{AFX_DATA_INIT(CDirectoriesDlg)
m_edit_dune2 = xcc_dirs::get_dir(game_dune2).c_str();
m_edit_td_primary = xcc_dirs::get_dir(game_td).c_str();
m_edit_td_secondary = xcc_dirs::get_td_secondary_dir().c_str();
m_edit_ra = xcc_dirs::get_dir(game_ra).c_str();
m_edit_dune2000 = xcc_dirs::get_dir(game_dune2000).c_str();
m_edit_ts = xcc_dirs::get_dir(game_ts).c_str();
m_edit_ra2 = xcc_dirs::get_dir(game_ra2).c_str();
m_edit_cd = xcc_dirs::get_cd_dir().c_str();
m_edit_data = xcc_dirs::get_data_dir().c_str();
//}}AFX_DATA_INIT
}
void CDirectoriesDlg::DoDataExchange(CDataExchange* pDX)
{
ETSLayoutDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDirectoriesDlg)
DDX_Text(pDX, IDC_DUNE2, m_edit_dune2);
DDX_Text(pDX, IDC_DUNE2000, m_edit_dune2000);
DDX_Text(pDX, IDC_RA2, m_edit_ra2);
DDX_Text(pDX, IDC_RA, m_edit_ra);
DDX_Text(pDX, IDC_TD_PRIMARY, m_edit_td_primary);
DDX_Text(pDX, IDC_TD_SECONDARY, m_edit_td_secondary);
DDX_Text(pDX, IDC_TS, m_edit_ts);
DDX_Text(pDX, IDC_CD, m_edit_cd);
DDX_Text(pDX, IDC_DATA, m_edit_data);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDirectoriesDlg, ETSLayoutDialog)
//{{AFX_MSG_MAP(CDirectoriesDlg)
ON_BN_CLICKED(IDC_RESET_CD, OnResetCd)
ON_BN_CLICKED(IDC_RESET_DATA, OnResetData)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CDirectoriesDlg::OnOK()
{
ETSLayoutDialog::OnOK();
xcc_dirs::set_dir(game_dune2, static_cast<string>(m_edit_dune2));
xcc_dirs::set_dir(game_td, static_cast<string>(m_edit_td_primary));
xcc_dirs::set_td_secondary_dir(static_cast<string>(m_edit_td_secondary));
xcc_dirs::set_dir(game_ra, static_cast<string>(m_edit_ra));
xcc_dirs::set_cd_dir(static_cast<string>(m_edit_cd));
}
void CDirectoriesDlg::OnResetCd()
{
UpdateData(true);
xcc_dirs::reset_cd_dir();
m_edit_cd = xcc_dirs::get_cd_dir().c_str();
UpdateData(false);
}
void CDirectoriesDlg::OnResetData()
{
UpdateData(true);
xcc_dirs::reset_data_dir();
m_edit_data = xcc_dirs::get_data_dir().c_str();
UpdateData(false);
}
BOOL CDirectoriesDlg::OnInitDialog()
{
ETSLayoutDialog::OnInitDialog();
CreateRoot(HORIZONTAL)
<< (pane(VERTICAL, ABSOLUTE_VERT)
<< item(IDC_DUNE2_STATIC, NORESIZE)
<< item(IDC_TD_PRIMARY_STATIC, NORESIZE)
<< item(IDC_TD_SECONDARY_STATIC, NORESIZE)
<< item(IDC_RA_STATIC, NORESIZE)
<< item(IDC_DUNE2000_STATIC, NORESIZE)
<< item(IDC_TS_STATIC, NORESIZE)
<< item(IDC_RA2_STATIC, NORESIZE)
<< item(IDC_DATA_STATIC, NORESIZE)
<< item(IDC_CD_STATIC, NORESIZE)
)
<< (pane(VERTICAL, ABSOLUTE_VERT)
<< item(IDC_DUNE2, ABSOLUTE_VERT)
<< item(IDC_TD_PRIMARY, ABSOLUTE_VERT)
<< item(IDC_TD_SECONDARY, ABSOLUTE_VERT)
<< item(IDC_RA, ABSOLUTE_VERT)
<< item(IDC_DUNE2000, ABSOLUTE_VERT)
<< item(IDC_TS, ABSOLUTE_VERT)
<< item(IDC_RA2, ABSOLUTE_VERT)
<< item(IDC_DATA, ABSOLUTE_VERT)
<< item(IDC_CD, ABSOLUTE_VERT)
)
<< (pane(VERTICAL, ABSOLUTE_VERT)
<< item(IDOK, NORESIZE)
<< item(IDCANCEL, NORESIZE)
<< itemGrowing(VERTICAL)
<< item(IDC_RESET_DATA, NORESIZE)
<< item(IDC_RESET_CD, NORESIZE)
);
UpdateLayout();
return true;
}
|
d1815da1b6b5d0be12cfb15f8a9063a16f5b92c2 | 0127c1ab6e64da0ae867aad0309cc9006ebced5f | /arduino/oled__.ino | 3a64de0137105febb7f9c9c3d0c8cbb041a14928 | [] | no_license | if-0518/homework | 1e328bae1307d09ee7f57d971bb017ed67ba382b | df53bb20e8c847c6a4a5e1d6d996e2703b0f256c | refs/heads/main | 2023-02-06T05:04:04.283422 | 2020-12-16T04:37:00 | 2020-12-16T04:37:00 | 321,707,156 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,876 | ino | oled__.ino | #include <NTPClient.h>
#include <WiFiUdp.h>
#include <SoftwareSerial.h> //软串口通信
#define SSID "if"
#define PASS "88888888"
SoftwareSerial monitor(5, 6); // RX, TX 软串口通信
#include <U8glib.h>
#include <U8g2lib.h>
#include <Arduino.h>
#include "dht11.h"
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "ntp1.aliyun.com",60*60*8, 30*60*1000);
//创建dht11示例
dht11 DHT11;
//定义DHT11接入Arduino的管脚
#define DHT11PIN 8
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); //设置OLED型号
//-------字体设置,大、中、小
#define setFont_L u8g.setFont(u8g_font_7x13)
#define setFont_M u8g.setFont(u8g_font_fixed_v0r)
#define setFont_S u8g.setFont(u8g_font_fixed_v0r)
#define setFont_SS u8g.setFont(u8g_font_fub25n)
int a =300;
void setup()
{
Serial.begin(115200);
monitor.begin(115200);
monitor.println("AT");//指令测试
delay(1000);
if (monitor.find("OK")) //接收指令正常则返回OK
{
monitor.println("AT+CWMODE=1");
// delay(2000);
monitor.println("AT+RST");
// delay(2000);
String cmd = "AT+CWJAP=\"";
cmd += SSID;
cmd += "\",\"";
cmd += PASS;
cmd += "\"";
monitor.println(cmd);
}
timeClient.begin();
pinMode(10,OUTPUT); //设置输出口
//以下信息为DHT11库文件版本信息
Serial.println("DHT11 TEST PROGRAM ");
Serial.print("LIBRARY VERSION: ");
Serial.println(DHT11LIB_VERSION);
Serial.println();
}
void loop()
{ // put your main code here, to run repeatedly:
//记录实验数据组别
int n = analogRead(A3); //读取模拟口A3,获取光强
Serial.println(n); // 用于IDE串口观察窗
if (n>= a ) //对光强进行判断
digitalWrite(10,HIGH);
else
digitalWrite(10,LOW);
delay(100);
static int count = 1;
Serial.println(count++);
int chk = DHT11.read(DHT11PIN);
Serial.print("Read sensor: ");
switch (chk)
{
case DHTLIB_OK:
Serial.println("OK");
break;
case DHTLIB_ERROR_CHECKSUM:
Serial.println("Checksum error");
break;
case DHTLIB_ERROR_TIMEOUT:
Serial.println("Time out error");
break;
default:
Serial.println("Unknown error");
break;
}
Serial.print("Humidity (%): ");
Serial.println((float)DHT11.humidity, 8);
Serial.print("Temperature (oC): ");
Serial.println((float)DHT11.temperature, 8);
Serial.println("");
delay(2000);
int a=10;
u8g.firstPage();
do{
setFont_L;
u8g.setPrintPos(0,10);
u8g.print("Mon N318,9:00");
u8g.setPrintPos(0,22);
u8g.print(" N411,1:00");
u8g.setPrintPos(0,34);
u8g.print(" N105,2:45");
u8g.setPrintPos(0,46);
u8g.print("H(%)");
u8g.setPrintPos(30,46);
u8g.print((float)DHT11.humidity+8);
u8g.setPrintPos(0,58);
u8g.print("T(C)");
u8g.setPrintPos(30,58);
u8g.print((float)DHT11.temperature-25);
u8g.setPrintPos(70,58);
u8g.print(timeClient.getFormattedTime());
delay(1000);
u8g.clear()
u8g.print("Tue N318,9:00");
u8g.setPrintPos(0,22);
u8g.print(" N411,1:00");
u8g.setPrintPos(0,34);
u8g.print(" N105,2:45");
u8g.setPrintPos(0,46);
u8g.print("H(%)");
u8g.setPrintPos(30,46);
u8g.print((float)DHT11.humidity+8);
u8g.setPrintPos(0,58);
u8g.print("T(C)");
u8g.setPrintPos(30,58);
u8g.print((float)DHT11.temperature-25);
u8g.setPrintPos(70,58);
u8g.print(timeClient.getFormattedTime());
delay(1000);
} while (u8g.nextPage());
}
|
17bf7dd84af1ee9a18b60389dc12e5ca8d3f5da9 | c58866b57331311979f2479ae7627e6492be30db | /src/Vtk/Wrapper/quickVtkArcSource.hpp | 81e2a153bc7d204ae5a63af30ce924331da9afcb | [
"BSD-3-Clause"
] | permissive | ruisebastiao/QVTK | 2763b3c7d2a3260b6a641403135cf4e219f826c5 | 6e9aee0d0fc691539dca3b825d0ffe6e7b30db09 | refs/heads/master | 2021-03-07T18:19:11.934936 | 2020-10-21T21:22:39 | 2020-10-21T21:22:39 | 246,286,556 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,089 | hpp | quickVtkArcSource.hpp | #pragma once
#include "quickMathVector3.hpp"
#include "quickVtkPolyDataAlgorithm.hpp"
#include <vtkArcSource.h>
namespace quick {
namespace Vtk {
class ArcSource : public PolyDataAlgorithm {
Q_OBJECT
Q_PROPERTY(quick::Math::Vector3* point1 READ getPoint1 CONSTANT);
Q_PROPERTY(quick::Math::Vector3* point2 READ getPoint2 CONSTANT);
Q_PROPERTY(quick::Math::Vector3* center READ getCenter CONSTANT);
Q_PROPERTY(quick::Math::Vector3* polarVector READ getPolarVector CONSTANT);
Q_PROPERTY(qreal angle READ getAngle WRITE setAngle NOTIFY angleChanged);
Q_PROPERTY(int resolution READ getResolution WRITE setResolution NOTIFY resolutionChanged);
Q_PROPERTY(bool negative READ getNegative WRITE setNegative NOTIFY negativeChanged);
Q_PROPERTY(bool useNormalAndAngle READ getUseNormalAndAngle WRITE setUseNormalAndAngle NOTIFY useNormalAndAngleChanged);
private:
// static //Qml::Register::Class<ArcSource> Register;
vtkSmartPointer<vtkArcSource> m_vtkObject = nullptr;
Math::Vector3* m_point1 = nullptr;
Math::Vector3* m_point2 = nullptr;
Math::Vector3* m_center = nullptr;
Math::Vector3* m_polarVector = nullptr;
public:
ArcSource();
auto getPoint1() -> Math::Vector3*;
auto getPoint2() -> Math::Vector3*;
auto getCenter() -> Math::Vector3*;
auto getPolarVector() -> Math::Vector3*;
auto setAngle(qreal) -> void;
auto getAngle() -> qreal;
auto setResolution(int) -> void;
auto getResolution() -> int;
auto setNegative(bool) -> void;
auto getNegative() -> bool;
auto setUseNormalAndAngle(bool) -> void;
auto getUseNormalAndAngle() -> bool;
signals:
void angleChanged();
void resolutionChanged();
void negativeChanged();
void useNormalAndAngleChanged();
};
}
}
|
278a8708a673563ed4ff54046a9a87aeea54a4a7 | 170c5603638739b16ef4662ed0a9d994c3b05a27 | /ICP/src/scene.cpp | ddfe18e5853a4f2f60b00f962bc38aa38b0c9e7e | [] | no_license | ybcr7/UCL-3D-Geometry | 4e845dc77dc595134113b6fde7b42956c0776087 | a64588c0683ee6720f65645ce93e1b255e2e8d32 | refs/heads/master | 2021-04-08T01:01:53.704224 | 2019-08-15T22:32:38 | 2019-08-15T22:32:38 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,443 | cpp | scene.cpp | #include <igl/readOFF.h>
#include <igl/opengl/glfw/Viewer.h>
#include "scene.h"
#include "icp.h"
#define FILE_PATH "../data/"
struct Scene::RenderingData{
Eigen::MatrixXd V;
Eigen::MatrixXi F;
Eigen::MatrixXd C;
};
Scene::Scene(igl::opengl::glfw::Viewer& refViewer):viewer(refViewer){
iteration = 300;
subsample_rate = 0;
mark_out = false;
}
Scene::~Scene(){}
void Scene::Initialise(){
rendering_data.clear();
igl::readOFF(FILE_PATH "bun000.off", V1, F1);
igl::readOFF(FILE_PATH "bun045.off", V2, F2);
Eigen::MatrixXd V(V1.rows()+V2.rows(), V1.cols());
V << V1,V2;
Eigen::MatrixXi F(F1.rows()+F2.rows(),F1.cols());
F << F1,(F2.array()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
}
void Scene::Point2PointAlign(){
rendering_data.clear();
Eigen::MatrixXd Vx = V2;
int total_iteration = iteration;
clock_t start_time = std::clock();
double error_metric = 1000;
for (size_t i=0; i<iteration;i++){
// Basic ICP algorithm
std::pair<Eigen::MatrixXd, Eigen::MatrixXd> correspondences = ICP::FindCorrespondences(V1, Vx);
std::pair<double, std::pair<Eigen::Matrix3d, Eigen::RowVector3d>> transform_info = ICP::EstimateRigidTransform(correspondences.first, correspondences.second);
Vx = ICP::ApplyRigidTransform(Vx, transform_info.second);
// if (transform_info.first < error_metric){
// error_metric = transform_info.first;
// }else{
// total_iteration = i;
// break;
// }
}
double time_taken = (clock() - start_time) / (double) CLOCKS_PER_SEC;
std::cout << "ICP Basic takes " + std::to_string(time_taken) + "s to complete " + std::to_string(total_iteration) + " iteration(s)" << std::endl;
// Generate data and store them for display
Eigen::MatrixXd V(V1.rows()+Vx.rows(), V1.cols());
V << V1,Vx;
Eigen::MatrixXi F(F1.rows()+F2.rows(),F1.cols());
F << F1,(F2.array()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
// Find non-overlapping area
// Vx to V1
std::pair<Eigen::MatrixXi, Eigen::MatrixXi> FF2 = ICP::FindNonOverlappingFaces(V1, Vx, F2);
// V1 to Vx
std::pair<Eigen::MatrixXi, Eigen::MatrixXi> FF1 = ICP::FindNonOverlappingFaces(Vx, V1, F1);
Eigen::MatrixXd VM(V1.rows() + V1.rows() + Vx.rows() + Vx.rows(), V1.cols());
VM << V1, V1, Vx, Vx;
Eigen::MatrixXi FM(FF1.first.rows() + FF1.second.rows() + FF2.first.rows() + FF2.second.rows(),
F1.cols());
FM << FF1.first, (FF1.second.array() + V1.rows()), (FF2.first.array() + V1.rows() + V1.rows()), (
FF2.second.array() + Vx.rows() + V1.rows() + V1.rows());
Eigen::MatrixXd CM(FM.rows(), 3);
CM <<
Eigen::RowVector3d(1.0, 0.5, 0.25).replicate(FF1.first.rows(), 1),
Eigen::RowVector3d(1.0, 0.0, 0.0).replicate(FF1.second.rows(), 1),
Eigen::RowVector3d(1.0, 0.8, 0.0).replicate(FF2.first.rows(), 1),
Eigen::RowVector3d(1.0, 0.0, 0.0).replicate(FF2.second.rows(), 1);
rendering_data.push_back(RenderingData{VM, FM, CM});
if (mark_out){
Visualise(rendering_data.size());
}else{
Visualise(rendering_data.size()-1);
}
}
void Scene::RotateMesh(double x, double y, double z){
rendering_data.clear();
// Load M1
igl::readOFF(FILE_PATH "bun000.off", V1, F1);
// M2 = R(M1), vertex positions are changed while the face relation remains
V2 = ICP::Rotate(V1, x, y, z);
F2 = F1;
// Display meshes
Eigen::MatrixXd V(V1.rows()+V2.rows(), V1.cols());
V << V1,V2;
Eigen::MatrixXi F(F1.rows()+F2.rows(),F1.cols());
F << F1, (F2.array()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
}
void Scene::AddNoiseToMesh(double sd){
rendering_data.clear();
// Load M1
igl::readOFF(FILE_PATH "bun000.off", V1, F1);
igl::readOFF(FILE_PATH "bun045.off", V2, F2);
// M2' = M2
V2 = ICP::AddNoise(V2, sd);
// Display meshes
Eigen::MatrixXd V(V1.rows()+V2.rows(), V1.cols());
V << V1,V2;
Eigen::MatrixXi F(F1.rows()+F2.rows(),F1.cols());
F << F1, (F2.array()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
}
void Scene::Point2PointAlignOptimised(){
rendering_data.clear();
Eigen::MatrixXd Vx = V2;
double last_distance = ICP::GetErrorMetric(V1, Vx);
int total_iteration = iteration;
double error_metric = 1000;
clock_t start_time = std::clock();
// Use the subsample to perform ICP algorithm
for (size_t i=0; i<iteration;i++){
Eigen::MatrixXd V_subsampled = ICP::GetSubsample(Vx, subsample_rate);
std::pair<Eigen::MatrixXd, Eigen::MatrixXd> correspondences = ICP::FindCorrespondences(V1, V_subsampled);
std::pair<double, std::pair<Eigen::Matrix3d, Eigen::RowVector3d>> transform_info = ICP::EstimateRigidTransform(correspondences.first, correspondences.second);
Vx = ICP::ApplyRigidTransform(Vx, transform_info.second);
// if (transform_info.first < error_metric){
// error_metric = transform_info.first;
// }else{
// total_iteration = i;
// break;
// }
}
double time_taken = (clock() - start_time) / (double) CLOCKS_PER_SEC;
std::cout << "ICP Optimised takes " + std::to_string(time_taken) + "s to complete " + std::to_string(total_iteration) + " iteration(s)" << std::endl;
// Generate data and store them for display
Eigen::MatrixXd V(V1.rows()+Vx.rows(), V1.cols());
V << V1,Vx;
Eigen::MatrixXi F(F1.rows()+F2.rows(),F1.cols());
F << F1,(F2.array()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
}
void Scene::LoadMultiple(){
rendering_data.clear();
//315,045,000,270,090
igl::readOFF(FILE_PATH "bun315.off", V1, F1);//Orange
igl::readOFF(FILE_PATH "bun045.off", V2, F2);//Yellow
igl::readOFF(FILE_PATH "bun000.off", V3, F3);//Blue
igl::readOFF(FILE_PATH "bun270.off", V4, F4);//Green
igl::readOFF(FILE_PATH "bun180.off", V5, F5);//Pink
V5 = ICP::Rotate(V5, 0, 180, 0);
// igl::readOFF(FILE_PATH "bun315.off", V6, F6);
// Display meshes
Eigen::MatrixXd V(V1.rows()+V2.rows()+V3.rows()+V4.rows()+V5.rows(), V1.cols());
V << V1,V2,V3,V4,V5;
Eigen::MatrixXi F(F1.rows()+F2.rows()+F3.rows()+F4.rows()+F5.rows(), F1.cols());
F <<F1,(F2.array()+V1.rows()), (F3.array()+V2.rows()+V1.rows()), (F4.array()+V3.rows()+V2.rows()+V1.rows()), (F5.array()+V4.rows()+V3.rows()+V2.rows()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1),
Eigen::RowVector3d(0.25,0.6,1.0).replicate(F3.rows(),1),
Eigen::RowVector3d(0.2,0.7,0.45).replicate(F4.rows(),1),
Eigen::RowVector3d(0.8,0.0,0.8).replicate(F5.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
}
void Scene::MultiMeshAlign(){
rendering_data.clear();
Eigen::MatrixXd V1r = V1;
Eigen::MatrixXi F1r = F1;
Eigen::MatrixXd V2r = V2;
Eigen::MatrixXi F2r = F2;
Eigen::MatrixXd V3r = V3;
Eigen::MatrixXi F3r = F3;
Eigen::MatrixXd V4r = V4;
Eigen::MatrixXi F4r = F4;
Eigen::MatrixXd V5r = V5;
Eigen::MatrixXi F5r = F5;
// Eigen::MatrixXd V6r = V6;
// Eigen::MatrixXi F6r = F6;
clock_t start_time = std::clock();
// for (size_t i=0; i<iteration;i++){
//
// //V2r = ICP::FindBestStartRotation(V1, V2r);
// V2r = ICP::ICPOptimised(V1, V2r, 95);
//
// Eigen::MatrixXd Vx(V1r.rows()+V2r.rows(), V1r.cols());
// Vx << V1r,V2r;
//
// Eigen::MatrixXi Fx(F1r.rows()+F2r.rows(),F1r.cols());
// Fx << F1r, (F2r.array()+V1r.rows());
//
// Eigen::MatrixXd Cx(Fx.rows(),3);
// Cx <<
// Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1r.rows(),1),
// Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2r.rows(),1);
//
// //V3r = ICP::FindBestStartRotation(Vx, V3r);
// V3r = ICP::ICPOptimised(Vx, V3r, 95);
//
// Eigen::MatrixXd Vy(Vx.rows()+V3r.rows(), Vx.cols());
// Vy << Vx,V3r;
//
// Eigen::MatrixXi Fy(Fx.rows()+F3r.rows(),Fx.cols());
// Fy << Fx, (F3r.array()+Vx.rows());
//
// Eigen::MatrixXd Cy(Fy.rows(),3);
// Cy <<
// Eigen::RowVector3d(1.0,0.5,0.25).replicate(Fx.rows(),1),
// Eigen::RowVector3d(1.0,0.8,0.0).replicate(F3r.rows(),1);
//
// //V4r = ICP::FindBestStartRotation(Vy, V4r);
// V4r = ICP::ICPOptimised(Vy, V4r, 95);
//
// Eigen::MatrixXd Vz(Vy.rows()+V4r.rows(), Vy.cols());
// Vz << Vy,V4r;
//
// Eigen::MatrixXi Fz(Fy.rows()+F4r.rows(),Fy.cols());
// Fz << Fy, (F4r.array()+Vy.rows());
//
// Eigen::MatrixXd Cz(Fz.rows(),3);
// Cz <<
// Eigen::RowVector3d(1.0,0.5,0.25).replicate(Fy.rows(),1),
// Eigen::RowVector3d(1.0,0.8,0.0).replicate(F4r.rows(),1);
//
// //V5r = ICP::FindBestStartRotation(Vz, V5r);
// V5r = ICP::ICPOptimised(Vz, V5r, 95);
//
// Eigen::MatrixXd Vo(Vz.rows()+V5r.rows(), Vz.cols());
// Vo << Vz,V5r;
//
// Eigen::MatrixXi Fo(Fz.rows()+F5r.rows(),Fz.cols());
// Fo << Fz, (F5r.array()+Vz.rows());
//
// Eigen::MatrixXd Co(Fo.rows(),3);
// Co <<
// Eigen::RowVector3d(1.0,0.5,0.25).replicate(Fz.rows(),1),
// Eigen::RowVector3d(1.0,0.8,0.0).replicate(F5r.rows(),1);
//
// if (i+1==iteration){
// Eigen::MatrixXd C(Fo.rows(),3);
// C<<
// Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1r.rows(),1),
// Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2r.rows(),1),
// Eigen::RowVector3d(0.25,0.6,1.0).replicate(F3r.rows(),1),
// Eigen::RowVector3d(0.2,0.7,0.45).replicate(F4r.rows(),1),
// Eigen::RowVector3d(0.8,0.0,0.8).replicate(F5r.rows(),1);
// rendering_data.push_back(RenderingData{Vo,Fo,C});
// }else{
// }
//
// }
//V2r = ICP::FindBestStartRotation(V1, V2r);
for (size_t i=0; i<iteration;i++) {
V2r = ICP::ICPOptimised(V1, V2r, 95);
}
Eigen::MatrixXd V12(V1.rows()+V2r.rows(), V1.cols());
V12<<V1, V2r;
Eigen::MatrixXi F12(F1.rows()+F2r.rows(), F1.cols());
F12<<F1, (F2r.array()+V1.rows());
//V3r = ICP::FindBestStartRotation(V2r, V3r);
for (size_t i=0; i<iteration;i++) {
V3r = ICP::ICPOptimised(V12, V3r, 95);
}
Eigen::MatrixXd V123(V12.rows()+V3r.rows(), V1.cols());
V123<<V12, V3r;
Eigen::MatrixXi F123(F12.rows()+F3r.rows(), F1.cols());
F123<<F12, (F3r.array()+V12.rows());
//V4r = ICP::FindBestStartRotation(V3r, V4r);
for (size_t i=0; i<iteration;i++) {
V4r = ICP::ICPOptimised(V123, V4r, 95);
}
Eigen::MatrixXd V1234(V123.rows()+V4r.rows(), V1.cols());
V1234<<V123, V4r;
Eigen::MatrixXi F1234(F123.rows()+F4r.rows(), F1.cols());
F1234<<F123,(F4r.array()+V123.rows());
//V5r = ICP::FindBestStartRotation(V4r, V5r);
for (size_t i=0; i<iteration;i++) {
V5r = ICP::ICPOptimised(V1234, V5r, 95);
}
Eigen::MatrixXd V12345(V1234.rows()+V5.rows(), V1.cols());
V12345<<V1234, V5r;
Eigen::MatrixXi F12345(F1234.rows()+F5r.rows(), F1.cols());
F12345<<F1234,(F5r.array()+V1234.rows());
Eigen::MatrixXd C(F12345.rows(),3);
C<<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),//Orange
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2r.rows(),1),//Yellow
Eigen::RowVector3d(0.25,0.6,1.0).replicate(F3r.rows(),1),//Blue
Eigen::RowVector3d(0.2,0.7,0.45).replicate(F4r.rows(),1),//Green
Eigen::RowVector3d(0.8,0.0,0.8).replicate(F5r.rows(),1);//Pink
rendering_data.push_back(RenderingData{V12345,F12345,C});
double time_taken = (clock() - start_time) / (double) CLOCKS_PER_SEC;
std::cout << "ICP Optimised takes " + std::to_string(time_taken) + "s to complete " + std::to_string(iteration) + " iteration(s)" << std::endl;
Visualise(rendering_data.size());
}
void Scene::Point2PlaneAlign(){
rendering_data.clear();
Eigen::MatrixXd Vx = V2;
clock_t start_time = std::clock();
// Use the subsample to perform ICP algorithm
for (size_t i=0; i<iteration;i++){
Eigen::MatrixXd N = ICP::GetVertexNormal(V1);
std::pair<std::pair<Eigen::MatrixXd, Eigen::MatrixXd>, Eigen::MatrixXd> correspondences = ICP::FindCorrespondencesNormalBased(V1, Vx, N);
std::pair<Eigen::Matrix3d, Eigen::RowVector3d> transform = ICP::EstimateRigidTransformNormalBased(correspondences.first.first, correspondences.second, correspondences.first.second);
Vx = ICP::ApplyRigidTransform(Vx, transform);
}
double time_taken = (clock() - start_time) / (double) CLOCKS_PER_SEC;
std::cout << "ICP Advanced takes " + std::to_string(time_taken) + "s to complete " + std::to_string(iteration) + " iteration(s)" << std::endl;
// Generate data and store them for display
Eigen::MatrixXd V(V1.rows()+Vx.rows(), V1.cols());
V << V1,Vx;
Eigen::MatrixXi F(F1.rows()+F2.rows(),F1.cols());
F << F1,(F2.array()+V1.rows());
Eigen::MatrixXd C(F.rows(),3);
C <<
Eigen::RowVector3d(1.0,0.5,0.25).replicate(F1.rows(),1),
Eigen::RowVector3d(1.0,0.8,0.0).replicate(F2.rows(),1);
rendering_data.push_back(RenderingData{V,F,C});
Visualise(rendering_data.size());
}
void Scene::SetIteration(int i){
if (i < 1){
iteration = 1;
}else{
iteration = i;
}
}
void Scene::SetMarkOut(bool b) {
mark_out = b;
}
void Scene::Visualise(int i){
if (i > 0 && i <= rendering_data.size()){
viewer.data().clear();
viewer.data().set_mesh(rendering_data[i-1].V, rendering_data[i-1].F);
viewer.data().set_colors(rendering_data[i-1].C);
viewer.data().set_face_based(true);
}else {
viewer.data().clear();
}
}
void Scene::SetSubsampleRate(double s){
subsample_rate = s;
if (s < 0) subsample_rate = 0;
if (s >= 100) subsample_rate = 99;
std::cout << "Subsample Rate: " + std::to_string(subsample_rate) + "%" << std::endl;
}
//void Scene::Point2PointAlign() {
//
// rendering_data.clear();
//
// Eigen::MatrixXd Vx = V2;
//
// for (size_t i = 0; i < iteration; i++) {
//
// // Basic ICP algorithm
// Vx = ICP::ICPBasic(V1, Vx);
//
// // Generate data and store them for display
// Eigen::MatrixXd V(V1.rows() + Vx.rows(), V1.cols());
// V << V1, Vx;
// Eigen::MatrixXi F(F1.rows() + F2.rows(), F1.cols());
// F << F1, (F2.array() + V1.rows());
// Eigen::MatrixXd C(F.rows(), 3);
// C <<
// Eigen::RowVector3d(1.0, 0.5, 0.25).replicate(F1.rows(), 1),
// Eigen::RowVector3d(1.0, 0.8, 0.0).replicate(F2.rows(), 1);
//
// // If the V not longer changes or reaches the iteration limit
// if (i + 1 == iteration) {
//
// std::cout << "Iteration times: " + std::to_string(i + 1) << std::endl;
//
// if (mark_out) {
// // Find non-overlapping area
// // Vx to V1
// std::pair<Eigen::MatrixXi, Eigen::MatrixXi> FF2 = ICP::FindNonOverlappingFaces(V1, Vx, F2);
// // V1 to Vx
// std::pair<Eigen::MatrixXi, Eigen::MatrixXi> FF1 = ICP::FindNonOverlappingFaces(Vx, V1, F1);
//
// Eigen::MatrixXd V(V1.rows() + V1.rows() + Vx.rows() + Vx.rows(), V1.cols());
// V << V1, V1, Vx, Vx;
//
// Eigen::MatrixXi F(FF1.first.rows() + FF1.second.rows() + FF2.first.rows() + FF2.second.rows(),
// F1.cols());
// F << FF1.first, (FF1.second.array() + V1.rows()), (FF2.first.array() + V1.rows() + V1.rows()), (
// FF2.second.array() + Vx.rows() + V1.rows() + V1.rows());
//
// Eigen::MatrixXd C(F.rows(), 3);
// C <<
// Eigen::RowVector3d(1.0, 0.8, 0.0).replicate(FF1.first.rows(), 1),
// Eigen::RowVector3d(1.0, 0.0, 0.0).replicate(FF1.second.rows(), 1),
// Eigen::RowVector3d(1.0, 0.5, 0.25).replicate(FF2.first.rows(), 1),
// Eigen::RowVector3d(1.0, 0.0, 0.0).replicate(FF2.second.rows(), 1);
//
// rendering_data.push_back(RenderingData{V, F, C});
//
// } else {
// rendering_data.push_back(RenderingData{V, F, C});
// }
//
// break;
//
// } else {
//
// rendering_data.push_back(RenderingData{V, F, C});
// }
//
// }
//
// Visualise(rendering_data.size());
//
//}
|
8df33c8e2147bcab6087c0433933690a226fac71 | 61abba14ecc4f5ee6097e956619c6ed54640cfe7 | /programming-in-high-level-languages/2nd-semester/laboratory-work-3/v1-unfinished/Polynomial.cpp | b49e870b225690f79d527613afc8c0f9e77f53ad | [] | no_license | koterevma/mb-bmstu-works | bd6864a1c167fe32f87c098e161d01a6862755a8 | 15fa5e82761d0265f833e8adb966650cd66808cf | refs/heads/master | 2023-08-29T19:34:18.471944 | 2021-11-09T19:31:26 | 2021-11-09T19:31:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,041 | cpp | Polynomial.cpp | #pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "bugprone-narrowing-conversions"
/**
* Created by Bernigend on 28.04.2020.
*/
#include <cmath>
#include "Polynomial.h"
// конструктор по умолчанию
Polynomial::Polynomial() = default;
// конструктор с параметрами
Polynomial::Polynomial(unsigned int _degree, const double* _coefficient)
{
this->degree = _degree;
this->coefficient = new double [this->degree + 1];
for (int i = 0; i <= this->degree; i++) {
this->coefficient[i] = (_coefficient != nullptr) ? _coefficient[i] : 0.0;
}
}
// констурктор копирования
Polynomial::Polynomial(const Polynomial& polynomial)
{
this->degree = polynomial.degree;
this->coefficient = new double [this->degree + 1];
for (int i = 0; i <= this->degree; i++) {
this->coefficient[i] = polynomial.coefficient[i];
}
}
// деструктор
Polynomial::~Polynomial() = default;
// вычисляет значение многочлена при заданном X
double Polynomial::calculate(double x)
{
double answer = 0.0;
for (int i = 0; i <= this->degree; i++) {
answer += std::pow(x, this->degree - i) * this->coefficient[i];
}
return answer;
}
Polynomial Polynomial::operator+ (const Polynomial& polynomial)
{
Polynomial* result;
if (this->degree > polynomial.degree) {
result = new Polynomial(this->degree, this->coefficient);
unsigned int tmp = 0;
for (int i = this->degree - polynomial.degree; i - 1 <= polynomial.degree; i++) {
result->coefficient[i] = result->coefficient[i] + polynomial.coefficient[tmp++];
}
} else if (this->degree == polynomial.degree) {
result = new Polynomial(this->degree, this->coefficient);
for (int i = 0; i <= polynomial.degree; i++) {
result->coefficient[i] = result->coefficient[i] + polynomial.coefficient[i];
}
} else {
result = new Polynomial(polynomial.degree, polynomial.coefficient);
unsigned int tmp = 0;
for (int i = polynomial.degree - this->degree; i - 1 <= this->degree; i++) {
result->coefficient[i] = result->coefficient[i] + this->coefficient[tmp++];
}
}
return *result;
}
Polynomial Polynomial::operator- (const Polynomial& polynomial)
{
Polynomial* result;
if (this->degree > polynomial.degree) {
result = new Polynomial(this->degree, this->coefficient);
unsigned int tmp = 0;
for (int i = this->degree - polynomial.degree; i - 1 <= polynomial.degree; i++) {
result->coefficient[i] = result->coefficient[i] - polynomial.coefficient[tmp++];
}
} else if (this->degree == polynomial.degree) {
result = new Polynomial(this->degree, this->coefficient);
for (int i = 0; i <= polynomial.degree; i++) {
result->coefficient[i] = result->coefficient[i] - polynomial.coefficient[i];
}
} else {
result = new Polynomial(polynomial.degree, polynomial.coefficient);
unsigned int tmp = 0;
for (int i = polynomial.degree - this->degree; i - 1 <= this->degree; i++) {
result->coefficient[i] = this->coefficient[tmp++] - result->coefficient[i];
}
}
return *result;
}
Polynomial Polynomial::operator* (const Polynomial& polynomial)
{
Polynomial temp;
temp.degree = this->degree + polynomial.degree;
temp.coefficient = new double [temp.degree + 1];
for (int i = 0; i <= this->degree; i++) {
for (int j = 0; j <= polynomial.degree; j++) {
temp.coefficient[i + j] += this->coefficient[i] * polynomial.coefficient[j];
}
}
return temp;
}
Polynomial Polynomial::operator/ (Polynomial& other)
{
auto H = new Polynomial();
auto R = new Polynomial();
Polynomial* p = &other;
Polynomial::DivPolynomial(this, p, H, R);
return *H;
}
Polynomial Polynomial::operator% (Polynomial& other)
{
auto H = new Polynomial();
auto R = new Polynomial();
Polynomial* p = &other;
Polynomial::DivPolynomial(this, p, H, R);
return *R;
}
Polynomial Polynomial::operator+=(const Polynomial& polynomial)
{
*this = *this + polynomial;
return *this;
}
Polynomial Polynomial::operator-=(const Polynomial& polynomial)
{
*this = *this - polynomial;
return *this;
}
Polynomial Polynomial::operator*=(const Polynomial& polynomial)
{
*this = *this * polynomial;
return *this;
}
Polynomial Polynomial::operator/=(Polynomial& polynomial)
{
*this = *this / polynomial;
return *this;
}
Polynomial Polynomial::operator%=(Polynomial& polynomial)
{
*this = *this % polynomial;
return *this;
}
bool Polynomial::DivPolynomial(Polynomial *P, Polynomial *Q, Polynomial *H, Polynomial *R) {
int i,j;
double u;
auto *nh = new Polynomial(),
*nr = new Polynomial();
// nh = (Polynomial *) calloc(1,sizeof(Polynomial));
// nr = (Polynomial *) calloc(1,sizeof(Polynomial));
if (Q->degree==0 && Q->coefficient[0]==0.0) return false;
nr->degree=P->degree;
nr->coefficient = new double [nr->degree+1];
for (i=0; i<=P->degree; i++) nr->coefficient[i]=P->coefficient[i];
nh->degree = P->degree - Q->degree;
nh->coefficient = new double [nh->degree+1];
if (nh->degree<0) {
nh->degree=0;
nh->coefficient[0] = 0.0;
} else {
for (i = nh->degree; i>=0; i--) {
nh->coefficient[i] = nr->coefficient[nr->degree] / Q->coefficient[Q->degree];
for (j=i; j<=nr->degree; j++) {
u = nh->coefficient[i] * Q->coefficient[j-i];
u = -u;
nr->coefficient[j] = nr->coefficient[j] + u;
}
if (nr->degree > 0) nr->degree--;
}
while (fabs(nr->coefficient[nr->degree]) < 1e-12 && nr->degree>0)
nr->degree--;
}
H->degree = nh->degree;
H->coefficient = new double [H->degree+1];
for (i=0; i<=nh->degree; i++) H->coefficient[i] = nh->coefficient[i];
R->degree = nr->degree;
R->coefficient = new double [R->degree+1];
for (i=0; i<=nr->degree; i++) R->coefficient[i] = nr->coefficient[i];
delete nh;
delete nr;
return true;
}
// перегрузка оператора []
double& Polynomial::operator[] (const unsigned int _degree)
{
return this->coefficient[_degree];
}
// то же самое, что и []
double Polynomial::at(unsigned int _degree)
{
return (_degree <= this->degree) ? this->coefficient[_degree] : 0.0;
}
// оператор вывода
std::ostream& operator<< (std::ostream& ostream, const Polynomial& polynomial)
{
auto _degree = static_cast<int>(polynomial.degree);
for (int i = _degree; i >= 0; i--) {
double _coefficient = polynomial.coefficient[_degree - i];
if (_coefficient == 0) continue;
if (i < _degree) {
ostream << ((_coefficient > 0) ? " + " : " - ");
}
ostream << ((_coefficient < 0) ? -_coefficient : _coefficient);
if (i != 0) ostream << "x^" << i;
}
return ostream;
}
// оператор ввода
std::istream& operator>> (std::istream& in, Polynomial& polynomial)
{
in >> polynomial.degree;
polynomial.coefficient = new double [polynomial.degree + 1];
for (int i = 0; i <= polynomial.degree; i++) {
in >> polynomial.coefficient[i];
}
return in;
}
#pragma clang diagnostic pop |
72eab7f763cc3d08b0334e0ee477430c504ebed0 | 85b24d826dd7a2fe9a4bfa2c0ccdf8fc04f9da14 | /emulator/decode_instruction.cpp | 2cbb6349bcf203103cd2d859bca19320e82fb845 | [] | no_license | alexzhang007/MipsSimulator | d6d91283e3ad8a0ae39e75616d3e391fa25fabfb | eac10be7a6bb4944890a4a7e5ae0ad07c8ea3682 | refs/heads/master | 2020-06-25T22:42:24.758219 | 2017-07-12T10:49:03 | 2017-07-12T10:49:03 | 96,996,734 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,105 | cpp | decode_instruction.cpp | #include "decode_instruction.h"
InstructionDecoder::InstructionDecoder(int depth): depth_(depth){
}
InstructionDecoder::~InstructionDecoder(){
for (int i=0; i<depth_; i++) {
fifo.pop();
}
}
bool InstructionDecoder::DecodePush(MipsInstruction& inst){
if (fifo.size() < depth_)
fifo.push(inst);
else
return false;
return true;
}
DecodeCluster InstructionDecoder::DecodeRun(bool& pass){
DecodeCluster ret;
if (fifo.size() > 0) {
MipsInstruction next_inst = fifo.front();
fifo.pop();
switch (next_inst.GetType()) {
case I_type : {
I_type_instruction_field32 i_inst = next_inst.inst_.i_type;
if (i_inst.opcode == RV32I_ADDI) {
switch (i_inst.funct3) {
case FUNCT3_ADDI : { //ADDI
ret.op = INT_ADDI ;
ret.rd = i_inst.rd ;
ret.rs1 = i_inst.rs1;
ret.imm = i_inst.imm;
break;
}
}
}
break;
}
case R_type : {
R_type_instruction_field32 r_inst = next_inst.inst_.r_type;
if (r_inst.opcode == RV32I_ADD ) {
switch (r_inst.funct3) {
case 0x0 : { //ADD or SUB
ret.op = r_inst.funct7 ==0 ? INT_ADD :INT_SUB ;
ret.rd = r_inst.rd ;
ret.rs1 = r_inst.rs1;
ret.rs2 = r_inst.rs2;
break;
}
}
}
break;
}
}
pass = true;
} else {
pass = false;
}
return ret;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.