blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
986 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
145 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
122 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
ae4464155c35b1c05ccb59d2fbf9648a9591ca26
bb283e9f669f81d5b175c8792392d880f812f591
/Light.h
f0e267e6f4076c36176fa34fb5975fd3b54d50a0
[]
no_license
elfprincexu/RayMini
b49c1e4e126d8dbc7bd0fa8b5f1bb0e7b3a25975
d432f08a3b9b8b9e08b805208de0f35b1b646035
refs/heads/master
2016-08-11T08:17:54.097611
2015-11-30T14:01:22
2015-11-30T14:01:22
46,980,569
1
0
null
null
null
null
UTF-8
C++
false
false
4,028
h
// ********************************************************* // Light Class // Author : Tamy Boubekeur (boubek@gmail.com). // Copyright (C) 2010 Tamy Boubekeur. // All rights reserved. // ********************************************************* #ifndef LIGHT_H #define LIGHT_H #include <iostream> #include <vector> #include <random> #include <ctime> #include "Vec3D.h" #include "ParameterHandler.h" #define PI 3.14159265358979323846 class Light { public: inline Light () : color (Vec3Df (1.0f, 1.0f, 1.0f)), intensity (1.0f) {} inline Light (const Vec3Df & pos, const Vec3Df & color, float intensity) : pos (pos), color (color), intensity (intensity) {} virtual ~Light () {} inline const Vec3Df & getPos () const { return pos; } inline const Vec3Df & getColor () const { return color; } inline float getIntensity () const { return intensity; } inline void setPos (const Vec3Df & p) { pos = p; } inline void setColor (const Vec3Df & c) { color = c; } inline void setIntensity (float i) { intensity = i; } inline void getSamples ( const float& iRadius, const unsigned int& iNumSamples, const Vec3Df& iNormal, std::vector< Light >& oSamples ) const { if ( ( iRadius <= 0.0f ) || ( iNumSamples <= 1u ) ) { oSamples.push_back ( *this ); } else { std::default_random_engine generator ( time ( NULL ) ); std::uniform_real_distribution<float> distRadius ( 0.0f, iRadius ); std::uniform_real_distribution<float> distTheta ( 0.0f, 2 * PI ); Vec3Df xAxis, yAxis; iNormal.getTwoOrthogonals ( xAxis, yAxis ); xAxis.normalize (); yAxis.normalize (); float sampleIntensity = getIntensity () / ( (float) iNumSamples ); for ( unsigned int s = 0; s < iNumSamples; s++ ) { float radius = distRadius ( generator ); float theta = distTheta ( generator ); float x = radius * cos ( theta ); float y = radius * sin ( theta ); oSamples.push_back ( Light ( getPos () + x * xAxis + y * yAxis, getColor (), sampleIntensity ) ); } } } inline void getSamples ( const float& iRadius, const unsigned int& iNumSamples, const Vec3Df& iNormal, std::vector< Vec3Df >& oSamples ) const { if ( ( iRadius <= 0.0f ) || ( iNumSamples <= 1u ) ) { oSamples.push_back ( getPos () ); } else { std::default_random_engine generator ( rand () );// ( time ( NULL ) ); std::uniform_real_distribution<float> distRadius ( 0.0f, iRadius ); std::uniform_real_distribution<float> distTheta ( 0.0f, 2 * PI ); Vec3Df xAxis, yAxis; iNormal.getTwoOrthogonals ( xAxis, yAxis ); xAxis.normalize (); yAxis.normalize (); for ( unsigned int s = 0; s < iNumSamples; s++ ) { float radius = distRadius ( generator ); float theta = distTheta ( generator ); float x = radius * cos ( theta ); float y = radius * sin ( theta ); oSamples.push_back ( getPos () + x * xAxis + y * yAxis ); } } } private: Vec3Df pos; Vec3Df color; float intensity; }; #endif // LIGHT_H // Some Emacs-Hints -- please don't remove: // // Local Variables: // mode:C++ // tab-width:4 // End:
[ "elfprincexu@126.com" ]
elfprincexu@126.com
2e6def7f43145773b9615aecc275d786ce4b314f
01bcef56ade123623725ca78d233ac8653a91ece
/utils/hlmv/matsyswin.h
d4ef1f408ff34cd8357d88937349327df8e95d79
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SwagSoftware/Kisak-Strike
1085ba3c6003e622dac5ebc0c9424cb16ef58467
4c2fdc31432b4f5b911546c8c0d499a9cff68a85
refs/heads/master
2023-09-01T02:06:59.187775
2022-09-05T00:51:46
2022-09-05T00:51:46
266,676,410
921
123
null
2022-10-01T16:26:41
2020-05-25T03:41:35
C++
WINDOWS-1252
C++
false
false
4,024
h
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // // $Workfile: $ // $Date: $ // //----------------------------------------------------------------------------- // $Log: $ // // $NoKeywords: $ //=============================================================================// #ifndef MATSYSWIN_H #define MATSYSWIN_H #ifdef _WIN32 #pragma once #endif #include <mxtk/mxMatSysWindow.h> #include "materialsystem/imaterialsystem.h" #include "interface.h" class ITexture; class MatSysWindow : public mxMatSysWindow { public: // CREATORS MatSysWindow( mxWindow *parent, int x, int y, int w, int h, const char *label, int style ); ~MatSysWindow( ); // MANIPULATORS void dumpViewport (const char *filename); void dumpViewportWithLabel (const char *filename, const char *label); virtual int handleEvent( mxEvent *event ); virtual void draw( ); Color getViewportPixelColor( int x, int y ); void *m_hWnd; // void *m_hDC; CSysModule *m_hMaterialSystemInst; ITexture *m_pCubemapTexture; }; extern MatSysWindow *g_MatSysWindow; extern IMaterial *g_materialBackground; extern IMaterial *g_materialWireframe; extern IMaterial *g_materialWireframeVertexColor; extern IMaterial *g_materialWireframeVertexColorNoCull; extern IMaterial *g_materialDebugCopyBaseTexture; extern IMaterial *g_materialFlatshaded; extern IMaterial *g_materialSmoothshaded; extern IMaterial *g_materialBones; extern IMaterial *g_materialLines; extern IMaterial *g_materialFloor; extern IMaterial *g_materialVertexColor; extern IMaterial *g_materialShadow; extern IMaterial *g_materialArcActive; extern IMaterial *g_materialArcInActive; extern IMaterial *g_materialDebugText; #if 0 typedef struct { int width; int height; int bpp; int flags; int frequency; } screen_res_t; typedef struct { int width; int height; int bpp; } devinfo_t; class MaterialSystemApp { public: MaterialSystemApp(); ~MaterialSystemApp(); void Term(); // Post a message to shutdown the app. void AppShutdown(); int WinMain(void *hInstance, void *hPrevInstance, char *szCmdLine, int iCmdShow); long WndProc(void *hwnd, long iMsg, long wParam, long lParam); int FindNumParameter(const char *s, int defaultVal=-1); bool FindParameter(const char *s); const char* FindParameterArg(const char *s); void SetTitleText(const char *fmt, ...); private: bool InitMaterialSystem(); void Clear(); bool CreateMainWindow(int width, int height, int bpp, bool fullscreen); void RenderScene(); void MouseCapture(); void MouseRelease(); void GetParameters(); public: IMaterialSystem *m_pMaterialSystem; void *m_hMaterialSystemInst; devinfo_t m_DevInfo; void *m_hInstance; int m_iCmdShow; void *m_hWnd; void *m_hDC; bool m_bActive; bool m_bFullScreen; int m_width; int m_height; int m_centerx; // for mouse offset calculations int m_centery; int m_bpp; BOOL m_bChangeBPP; BOOL m_bAllowSoft; BOOL m_bPaused; int m_glnWidth; int m_glnHeight; float m_gldAspect; float m_NearClip; float m_FarClip; float m_fov; screen_res_t *m_pResolutions; int m_iResCount; int m_iVidMode; }; // ---------------------------------------------------------------------------------------- // // Global functions // ---------------------------------------------------------------------------------------- // // Show an error dialog and quit. bool Sys_Error(const char *pMsg, ...); // Print to the trace window. void con_Printf(const char *pMsg, ...); // Returns true if the key is down. bool IsKeyDown(char key); extern MaterialSystemApp g_MaterialSystemApp; extern unsigned int g_Time; #endif #endif // GLAPP_H
[ "bbchallenger100@gmail.com" ]
bbchallenger100@gmail.com
738574fe372a7c4f9f3963707644cafe244f5cfa
879dc5681a36a3df9ae5a7244fa2d9af6bd346d7
/src/Boole1/Weblab.cpp
2e110f2aff4a33623a2137c14f8d5c0e3059b912
[ "BSD-3-Clause" ]
permissive
gachet/booledeusto
9defdba424a64dc7cf7ccd3938d412e3e797552b
fdc110a9add4a5946fabc2055a533593932a2003
refs/heads/master
2022-01-18T21:27:26.810810
2014-01-30T15:20:23
2014-01-30T15:20:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,974
cpp
//--------------------------------------------------------------------------- #include <vcl/printers.hpp> #include <vcl/vcl.h> #pragma hdrstop #include "Unit15.h" #include "V_Boole2.h" #include <string> #include <sstream> #include <time> #include <windows.h> #include "Weblab.h" //--------------------------------------------------------------------------- #pragma resource "*.dfm" TWeblabForm *WeblabForm; //--------------------------------------------------------------------------- __fastcall TWeblabForm::TWeblabForm(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- using namespace std; // Get current date/time, format is YYYY-MM-DD.HH:mm:ss const std::string CurrentDateTime() { time_t now = time(0); struct tm tstruct; char buf[80]; tstruct = *localtime(&now); // Visit http://en.cppreference.com/w/cpp/chrono/c/strftime // for more information about date/time format strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); return buf; } //! Builds a header with the timestamp and additional information, to //! preppend in generated VHDL code. std::string BuildCodeHeader() { // Get the computer name DWORD size; char computername[ MAX_COMPUTERNAME_LENGTH ]; size = MAX_COMPUTERNAME_LENGTH; GetComputerName( computername, &size ); char username [ 300 ]; size = 300; GetUserName( (char*)username, &size ); std::ostringstream oss; oss << "---------------------------------------------------" << std::endl; oss << "-- Generated by Boole-Deusto." << std::endl; oss << "-- Timestamp: " << CurrentDateTime() << std::endl; oss << "-- Computer name: " << computername << std::endl; oss << "-- User name: " << username << std::endl; oss << "---------------------------------------------------" << std::endl; oss << std::endl; return oss.str(); }
[ "luis.rodriguez@opendeusto.es" ]
luis.rodriguez@opendeusto.es
21e7677650088745a6e8776c1e302ec2d57ef1a0
d9971dde7fc385321bf6c8b48c0d63c96cf3692c
/build/release/share/lib/rtl/flx_strutil.hpp
ba500b81b8baf99eb5b0129351d12f382ba0aad6
[]
no_license
felix-lang/osx10binary
204aa8ef0bbb0f879997b5bbe5b21502034b1c71
08f8354752ac22be35b4a0566491f233f34ebb3d
refs/heads/master
2021-01-19T04:24:33.218565
2016-08-05T16:33:11
2016-08-05T16:33:11
65,033,134
0
0
null
null
null
null
UTF-8
C++
false
false
2,162
hpp
#line 14 "/Users/skaller/felix/src/packages/strutil.fdoc" #ifndef __FLX_STRUTIL_HPP_ #define __FLX_STRUTIL_HPP_ #include <string> #include <sstream> #include <iomanip> #include <stdarg.h> #include <stdlib.h> #include "flx_strutil_config.hpp" //RF: was only to commented out to fix macosx problem, //but lets see what happens to all the other builds. //#ifndef MACOSX //template class RTL_EXTERN std::basic_string<char>; //#endif namespace flx { namespace rtl { namespace strutil { using namespace std; template<class T> basic_string<T> mul(basic_string<T> s, int n) { basic_string<T> r = ""; while(n--) r+=s; return r; } // normalise string positions Python style // note substr requires 0<=b<=size, 0<=n, // however n>size is OK template<class T> basic_string<T> substr(basic_string<T> const &s, int b, int e) { int n = s.size(); if(b<0) b=b+n; if(b<0) b=0; if(b>=n) b=n; if(e<0) e=e+n; if(e<0) e=0; if(e>=n) e=n; int m = e-b; if(m<0) m=0; return s.substr(b,m); } template<class T> T subscript(basic_string<T> const &s, int i) { int n = s.size(); if(i<0) i=i+n; return i<0 || i >= n ? T(0) : s[i]; } template<class T> string str(T const &t) { std::ostringstream x; x << t; return x.str(); } template<class T> string fmt_default(T const &t, int w, int p) { std::ostringstream x; x << std::setw(w) << std::setprecision(p) << t; return x.str(); } template<class T> string fmt_fixed(T const &t, int w, int p) { std::ostringstream x; x << std::fixed << std::setw(w) << std::setprecision(p) << t; return x.str(); } template<class T> string fmt_scientific(T const &t, int w, int p) { std::ostringstream x; x << std::scientific << std::setw(w) << std::setprecision(p) << t; return x.str(); } STRUTIL_EXTERN string atostr(char const *a); STRUTIL_EXTERN string flx_asprintf(char const *fmt,...); STRUTIL_EXTERN string flxid_to_cid(string const&); STRUTIL_EXTERN string filename_to_modulename (string const&); STRUTIL_EXTERN size_t string_hash(string const &s); }}} #endif
[ "skaller@users.sourceforge.net" ]
skaller@users.sourceforge.net
382fa62bc07270c60e939a95ca1c6337466cbe6d
1385c32207e378f47bf2153956825e89228b8de1
/references/WebRTC/media/engine/fakewebrtcvideocapturemodule.h
7556811f2de01962bfe014e5056324c2d68400fe
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-free-unknown", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-google-patent-license-webrtc", "LicenseRef-scancode-google-patent-license-webm" ]
permissive
marlonnardi/alcinoe
4d5dc32328fff661792f5805a799e16b001688d1
5e14b2fca7adcc38e483771055b5623501433334
refs/heads/master
2020-08-12T09:38:29.484894
2020-05-17T23:17:32
2020-05-17T23:17:32
163,667,647
1
0
Apache-2.0
2019-10-12T22:52:31
2018-12-31T12:34:34
Pascal
UTF-8
C++
false
false
2,823
h
/* * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ #define MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ #include <vector> #include "api/video/i420_buffer.h" #include "media/engine/webrtcvideocapturer.h" #include "rtc_base/task_queue_for_test.h" // Fake class for mocking out webrtc::VideoCaptureModule. class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule { public: FakeWebRtcVideoCaptureModule() : callback_(NULL), running_(false) {} ~FakeWebRtcVideoCaptureModule() {} void RegisterCaptureDataCallback( rtc::VideoSinkInterface<webrtc::VideoFrame>* callback) override { callback_ = callback; } void DeRegisterCaptureDataCallback() override { callback_ = NULL; } int32_t StartCapture(const webrtc::VideoCaptureCapability& cap) override { if (running_) return -1; cap_ = cap; running_ = true; return 0; } int32_t StopCapture() override { running_ = false; return 0; } const char* CurrentDeviceName() const override { return NULL; // not implemented } bool CaptureStarted() override { return running_; } int32_t CaptureSettings(webrtc::VideoCaptureCapability& settings) override { if (!running_) return -1; settings = cap_; return 0; } int32_t SetCaptureRotation(webrtc::VideoRotation rotation) override { return -1; // not implemented } bool SetApplyRotation(bool enable) override { return true; // ignored } bool GetApplyRotation() override { return true; // Rotation compensation is turned on. } void SendFrame(int w, int h) { if (!running_ || !callback_) return; task_queue_.SendTask([this, w, h]() { rtc::scoped_refptr<webrtc::I420Buffer> buffer = webrtc::I420Buffer::Create(w, h); // Initialize memory to satisfy DrMemory tests. See // https://bugs.chromium.org/p/libyuv/issues/detail?id=377 buffer->InitializeData(); callback_->OnFrame(webrtc::VideoFrame(buffer, webrtc::kVideoRotation_0, 0 /* timestamp_us */)); }); } const webrtc::VideoCaptureCapability& cap() const { return cap_; } private: rtc::test::TaskQueueForTest task_queue_{"FakeWebRtcVideoCaptureModule"}; rtc::VideoSinkInterface<webrtc::VideoFrame>* callback_; bool running_; webrtc::VideoCaptureCapability cap_; }; #endif // MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_
[ "loki5100-nospam@yahoo.fr" ]
loki5100-nospam@yahoo.fr
404d6c32fd83d186299a0bf7d2ef761ddb2bbd6f
b58bdf4f49514654c68cbf8f297c87b3230161b3
/serial.cpp
2025dc771b1e368dd17aa638f727cf16839612f7
[]
no_license
ekoeppen/serial-legacy
f8cec3682fbb9a949d6da066b87fa1b2ccb60463
4caa27772010b2989b3a970395ae87b1a76504f7
refs/heads/master
2021-05-26T12:26:49.921234
2013-03-06T19:38:57
2013-03-06T19:38:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,290
cpp
// On Windows under cygwin, try /dev/comNN, where NN is 0, 1, 2, etc // GUC-232A came up as /dev/com4 just now (I think) #include <stdio.h> /* Standard input/output definitions */ #include <string.h> /* String function definitions */ #include <stdlib.h> #include <unistd.h> /* UNIX standard function definitions */ #include <fcntl.h> /* File control definitions */ #include <termios.h> /* POSIX terminal control definitions */ #include <errno.h> /* Error number definitions */ #include <sys/types.h> #include <sys/time.h> unsigned char buf[512]; unsigned baudMapping[][2] = { {0 , B0 }, {50 , B50 }, {75 , B75 }, {110 , B110 }, {134 , B134 }, {150 , B150 }, {200 , B200 }, {300 , B300 }, {600 , B600 }, {1200 , B1200 }, {1800 , B1800 }, {2400 , B2400 }, {4800 , B4800 }, {9600 , B9600 }, {19200 , B19200 }, {38400 , B38400 }, {57600 , B57600 }, {115200 , B115200 }, {230400 , B230400 }, }; int baudMappingCount = sizeof(baudMapping) / sizeof(baudMapping[0]); char presetNames[10][512]; char presetStrings[10][16384]; // should probably use std::string void usage(char *progname) { fprintf(stderr, "\n"); fprintf(stderr, "serial v1.0 by Brad Grantham, grantham@plunk.org\n\n"); fprintf(stderr, "usage: %s serialportfile baud\n", progname); fprintf(stderr, "e.g.: %s /dev/ttyS0 38400\n", progname); fprintf(stderr, "\n\nThe file $HOME/.serial (%s/.serial in your specific case) can also\n", getenv("HOME")); fprintf(stderr, "contain 10 string presets which are emitted when pressing \"~\" (tilde)\n"); fprintf(stderr, "followed by one of the keys \"1\" through \"0\".\n"); fprintf(stderr, "This file contains one preset per line, of the format:\n"); fprintf(stderr, "\n name-of-preset preset-string-here\n"); fprintf(stderr, "\nThe preset string itself can contain spaces and also can contain embedded\n"); fprintf(stderr, "newlines in the form \"\\n\". Here's a short example file:\n"); fprintf(stderr, "\n restart-device reboot\\n\n"); fprintf(stderr, " initiate-connection telnet distant-machine\\nexport DISPLAY=flebbenge:0\\n\n"); fprintf(stderr, "\nPressing \"~\" then 1 will send \"reboot\" and a newline over the serial port.\n"); fprintf(stderr, "Pressing \"~\" then 2 will send \"telnet distant-machine\" over the serial\n"); fprintf(stderr, "port, then a newline, then \"export DISPLAY=flebbenge:0\", and then\n"); fprintf(stderr, "another newline.\n"); fprintf(stderr, "When running, press \"~\" (tilde) and then \"h\" for some help.\n"); fprintf(stderr, "\n"); } void readPresetStrings(void) { FILE *presetFile; char presetName[FILENAME_MAX]; char stringbuf[16384]; for(int i = 0; i < 10; i++) presetStrings[i][0] = '\0'; sprintf(presetName, "%s/.serial", getenv("HOME")); presetFile = fopen(presetName, "r"); if(presetFile == NULL) { fprintf(stderr, "couldn't open preset strings file \"%s\"\n", presetName); fprintf(stderr, "proceeding without preset strings.\n"); } else { for(int i = 0; i < 10; i++) { int which = (i + 1) % 10; if(fscanf(presetFile, "%s ", presetNames[which]) != 1) break; if(fgets(stringbuf, sizeof(stringbuf) - 1, presetFile) == NULL) { fprintf(stderr, "preset for %d (\"%s\") had a name but no string. Ignored.\n", which, presetNames[which]); break; } stringbuf[strlen(stringbuf) - 1] = '\0'; char *dst = presetStrings[which], *src = stringbuf; while(*src) { if(src[0] == '\\' && src[1] == 'n') { *dst++ = '\n'; src += 2; } else *dst++ = *src++; } *dst++ = '\0'; } fclose(presetFile); } } int main(int argc, char **argv) { int speed; int duplex = 0, crnl = 0; int serial; int tty_in, tty_out; struct termios options; struct termios old_termios; unsigned int baud; bool done = false; fd_set reads; struct timeval timeout; bool saw_tilde = false; if(argc < 3) { usage(argv[0]); exit(EXIT_FAILURE); } if(argv[2][0] < '0' || argv[2][0] > '9') { usage(argv[0]); exit(EXIT_FAILURE); } readPresetStrings(); baud = (unsigned int) atoi(argv[2]); int which; for(which = 0; which < baudMappingCount; which++){ if(baudMapping[which][0] == baud) { baud = baudMapping[which][1]; break; } } if(which == baudMappingCount) { fprintf(stderr, "Didn't understand baud rate \"%s\"\n", argv[2]); exit(EXIT_FAILURE); } if(false) printf("baud mapping chosen: %d (0x%X)\n", baud, baud); tty_in = dup(0); if(tty_in == -1) { fprintf(stderr, "Can't open dup of stdin\n"); exit(EXIT_FAILURE); } if(fcntl(tty_in, F_SETFL, O_NONBLOCK) == -1) { fprintf(stderr, "Failed to set nonblocking stdin\n"); exit(EXIT_FAILURE); } tty_out = dup(1); if(tty_out == -1) { fprintf(stderr, "Can't open dup of stdout\n"); exit(EXIT_FAILURE); } serial = open(argv[1], O_RDWR | O_NOCTTY | O_NONBLOCK); if(serial == -1) { fprintf(stderr, "Can't open serial port \"%s\"\n", argv[1]); exit(EXIT_FAILURE); } /* * get the current options of the input tty */ tcgetattr(tty_in, &old_termios); tcgetattr(tty_in, &options); /* * set raw input, 1 second timeout */ options.c_cflag |= (CLOCAL | CREAD); options.c_cc[VMIN] = 0; options.c_cc[VTIME] = 10; options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); options.c_iflag &= ~INLCR; options.c_iflag &= ~ICRNL; /* * Miscellaneous stuff */ options.c_cflag |= (CLOCAL | CREAD); /* Enable receiver, set * local */ /* * Linux seems to have problem with the following ??!! */ options.c_cflag |= (IXON | IXOFF); /* Software flow control */ options.c_lflag = 0; /* no local flags */ options.c_cflag |= HUPCL; /* Drop DTR on close */ /* * Clear the line */ tcflush(tty_in, TCIFLUSH); /* * Update the options synchronously */ if (tcsetattr(tty_in, TCSANOW, &options) != 0) { perror("setting stdin tc"); goto restore; } /* * get the current options of the output tty */ tcgetattr(serial, &options); /* * set raw input, 1 second timeout */ options.c_cflag |= (CLOCAL | CREAD); options.c_oflag &= ~OPOST; options.c_cc[VMIN] = 0; options.c_cc[VTIME] = 10; options.c_iflag &= ~INPCK; /* Enable parity checking */ options.c_iflag |= IGNPAR; options.c_cflag &= ~PARENB; /* Clear parity enable */ options.c_cflag &= ~CSTOPB; options.c_cflag &= ~CSIZE; options.c_cflag |= CS8; options.c_cflag &= ~CRTSCTS; options.c_oflag &= ~(IXON | IXOFF | IXANY); /* no flow control */ options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); options.c_oflag &= ~OPOST; /* No output processing */ options.c_iflag &= ~INLCR; /* Don't convert linefeeds */ options.c_iflag &= ~ICRNL; /* Don't convert linefeeds */ /* * Miscellaneous stuff */ options.c_cflag |= (CLOCAL | CREAD); /* Enable receiver, set * local */ /* * Linux seems to have problem with the following ??!! */ options.c_oflag &= ~(IXON | IXOFF | IXANY); /* no flow control */ options.c_lflag = 0; /* no local flags */ options.c_cflag |= HUPCL; /* Drop DTR on close */ cfsetispeed(&options, baud); speed = cfgetispeed(&options); if(false) printf("set tty input to speed %d, expected %d\n", speed, baud); cfsetospeed(&options, baud); speed = cfgetospeed(&options); if(false) printf("set tty output to speed %d, expected %d\n", speed, baud); /* * Clear the line */ tcflush(serial, TCIFLUSH); if (tcsetattr(serial, TCSANOW, &options) != 0) { perror("setting serial tc"); goto restore; } tcflush(serial, TCIFLUSH); printf("press \"~\" (tilde) and then \"h\" for some help.\n"); while(!done) { FD_ZERO(&reads); FD_SET(serial, &reads); FD_SET(tty_in, &reads); timeout.tv_sec = 0; timeout.tv_usec = 500000; int result = select(FD_SETSIZE, &reads, NULL, NULL, &timeout); if(result < 0) { perror("select"); done = true; continue; } else if(result == 0) { if(false) printf("select timed out.\n"); } else { for(int i = 0 ; i < FD_SETSIZE; i++) { if(FD_ISSET(i, &reads)) { if(false) printf("read on %d\n", i); } } if(FD_ISSET(serial, &reads)) { if(false) printf("Read from serial\n"); int byte_count = read(serial, buf, sizeof(buf)); if(byte_count == 0) { fprintf(stderr, "unknown read of 0 bytes!\n"); done = true; continue; } write(tty_out, buf, byte_count); } if(FD_ISSET(tty_in, &reads)) { if(false) printf("Read from TTY\n"); int byte_count = read(tty_in, buf, sizeof(buf)); if(saw_tilde) { if(buf[0] == 'h' || buf[0] == '?') { printf("key help:\n"); printf(" . - exit\n"); printf(" d - toggle duplex\n"); printf(" n - toggle whether to send CR with NL\n"); printf(" 0-9 - send preset strings from ~/.serial\n"); int i; for(i = 0; i < 10; i++) { int which = (i + 1) % 10; if(presetStrings[which][0] == '\0') break; printf(" %d : \"%s\"\n", which, presetNames[which]); } if(i == 0) printf(" (no preset strings)\n"); printf(" p - print contents of presets\n"); saw_tilde = false; continue; } else if(buf[0] >= '0' && buf[0] <= '9') { int which = buf[0] - '0'; write(serial, presetStrings[which], strlen(presetStrings[which])); saw_tilde = false; continue; } else if(buf[0] == 'p') { printf("preset strings from ~/.serial:\n"); int i; for(i = 0; i < 10; i++) { int which = (i + 1) % 10; if(presetStrings[which][0] == '\0') break; printf(" %d, \"%15s\", : \"%s\"\n", which, presetNames[which], presetStrings[which]); } if(i == 0) printf(" (no preset strings)\n"); saw_tilde = false; continue; } else if(buf[0] == '.') { done = true; saw_tilde = false; continue; } else if(buf[0] == 'd') { duplex = !duplex; saw_tilde = false; continue; } else if(buf[0] == 'n') { crnl = !crnl; tcgetattr(serial, &options); if(crnl) options.c_iflag |= ICRNL; else options.c_iflag &= ~ICRNL; tcsetattr(serial, TCSANOW, &options); tcgetattr(tty_out, &options); if(crnl) options.c_oflag |= OCRNL; else options.c_oflag &= ~OCRNL; tcsetattr(tty_out, TCSANOW, &options); continue; saw_tilde = false; } } else if(buf[0] == '~') { saw_tilde = true; continue; /* ick */ } else saw_tilde = false; if(byte_count == 0) { fprintf(stderr, "unknown read of 0 bytes!\n"); done = true; continue; } if(false) printf("writing %d bytes: '%c', %d\n", byte_count, buf[0], buf[0]); write(serial, buf, byte_count); if(duplex) write(tty_out, buf, byte_count); } } } restore: if (tcsetattr(tty_in, TCSANOW, &old_termios) != 0) { perror("restoring stdin"); return (0); } close(serial); close(tty_in); close(tty_out); return 0; }
[ "eck@40hz.org" ]
eck@40hz.org
b45f1e8e5e835fed174bd012e4a7be0560d0d9dd
8eae6774231f4a313e7aa8ac30d5c678dc1c2a42
/CodeForces/1270 E-gc.cpp
758eef6ea66fa417250b59abb957ba1b03d2daaf
[ "MIT" ]
permissive
windcry1/My-ACM-ICPC
c97b203e5e54d355168ed14db888f4a1b3e6c363
b85b1c83b72c6b51731dae946a0df57c31d3e7a1
refs/heads/master
2021-09-06T20:47:56.525749
2021-08-22T14:06:10
2021-08-22T14:06:10
231,622,263
0
0
null
null
null
null
UTF-8
C++
false
false
1,852
cpp
/************************************************************************* >>> Author: WindCry1 >>> Mail: lanceyu120@gmail.com >>> Website: https://windcry1.com >>> Date: 12/30/2019 11:03:37 PM *************************************************************************/ #include <cstring> #include <cmath> #include <cstdio> #include <cctype> #include <cstdlib> #include <ctime> #include <vector> #include <iostream> #include <string> #include <queue> #include <set> #include <map> #include <algorithm> #include <complex> #include <stack> #include <bitset> #include <iomanip> #include <list> #include <sstream> #include <fstream> #if __cplusplus >= 201103L #include <unordered_map> #include <unordered_set> #endif #define ll long long #define ull unsigned long long #define DEBUG(x) cout<<#x<<" : "<<x<<endl; #define lowbit(x) x&(-x) #define ls u<<1 #define rs u<<1|1 using namespace std; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const double eps = 1e-8; const int INF = 0x3f3f3f3f; const int mod = 1e9+7; const int dir[4][2]={-1,0,1,0,0,-1,0,1}; ll dis[1010][1010],x[1010],y[1010]; inline ll dis2(ll ax,ll ay,ll bx,ll by){ return (ax-bx)*(ax-bx)+(ay-by)*(ay-by); } int main(){ ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #ifdef WindCry1 freopen("C:\\Users\\LENOVO\\Desktop\\in.txt","r",stdin); #endif int n;cin>>n; ll gcd=0; for(int i=1;i<=n;i++) cin>>x[i]>>y[i]; for(int i=1;i<=n;i++) for(int j=i+1;j<=n;j++){ dis[j][i]=dis[i][j]=dis2(x[i],y[i],x[j],y[j]); if(!gcd) gcd=dis[i][j]; else gcd=__gcd(dis[i][j],gcd); } for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) dis[i][j]/=gcd; vector<int> res; res.push_back(1); //for(int i=1;i<=n;i++) cout<<dis[1][i]<<" ";cout<<endl; for(int i=2;i<=n;i++) if(!(dis[1][i]&1)) res.push_back(i); cout<<res.size()<<endl; for(auto i:res) cout<<i<<" ";cout<<endl; return 0; }
[ "lanceyu120@gmail.com" ]
lanceyu120@gmail.com
3920385be3fd5a28ad8284769b5684348fc2d383
f5243a2ee19c0499444993ba363a8e6703b0b78b
/system/utest/crashlogger/crashlogger-test.cpp
ce66a079c301b3fa8cdb1fb78293f3bb7d6cce23
[ "BSD-3-Clause", "MIT" ]
permissive
shreks7/magenta
a5f3d58b12763ee389522303801d950178c41e4b
a6b2c4933b26595631c6e2cf25709b4803a3e7ff
refs/heads/master
2021-01-01T20:04:39.732925
2017-07-29T01:21:50
2017-07-29T17:11:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,793
cpp
// Copyright 2017 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stdio.h> #include <regex.h> #include <unistd.h> #include <magenta/processargs.h> #include <mxtl/unique_ptr.h> #include <launchpad/launchpad.h> #include <unittest/unittest.h> // This should match the value used by crashlogger. static const uint64_t kSysExceptionKey = 1166444u; // Helper class for using POSIX regular expressions. class RegEx { public: RegEx(const char* regex_str) { int err = regcomp(&regex_, regex_str, REG_EXTENDED); if (err != 0) { char msg[100]; msg[0] = '\0'; regerror(err, &regex_, msg, sizeof(msg)); fprintf(stderr, "Regex compilation failed: %s\n", msg); abort(); } } ~RegEx() { regfree(&regex_); } bool Matches(const char* str) { return regexec(&regex_, str, 0, NULL, 0) == 0; } private: regex_t regex_; }; // This tests the output of crashlogger given a process that crashes. It // launches a test instance of crashlogger in order to capture its output. bool test_crash(const char* crasher_arg) { const char* argv[] = { "/boot/bin/crasher", crasher_arg }; launchpad_t* crasher_lp; launchpad_create(0, "crash-test", &crasher_lp); // Make sure we bind an exception port to the process before we start // it running. mx_handle_t crasher_proc = launchpad_get_process_handle(crasher_lp); mx_handle_t exception_port; ASSERT_EQ(mx_port_create(0, &exception_port), MX_OK); ASSERT_EQ(mx_task_bind_exception_port(crasher_proc, exception_port, kSysExceptionKey, 0), MX_OK); // Launch the crasher process. launchpad_load_from_file(crasher_lp, argv[0]); launchpad_clone(crasher_lp, LP_CLONE_ALL); launchpad_set_args(crasher_lp, countof(argv), argv); const char* errmsg; ASSERT_EQ(launchpad_go(crasher_lp, &crasher_proc, &errmsg), MX_OK); // Launch a test instance of crashlogger. const char* crashlogger_argv[] = { "/boot/bin/crashlogger" }; launchpad_t* crashlogger_lp; launchpad_create(0, "crashlogger-test-instance", &crashlogger_lp); launchpad_load_from_file(crashlogger_lp, crashlogger_argv[0]); launchpad_clone(crasher_lp, LP_CLONE_ALL); launchpad_set_args(crashlogger_lp, countof(crashlogger_argv), crashlogger_argv); mx_handle_t handles[] = { exception_port }; uint32_t handle_types[] = { PA_HND(PA_USER0, 0) }; launchpad_add_handles(crashlogger_lp, countof(handles), handles, handle_types); int pipe_fd; launchpad_add_pipe(crashlogger_lp, &pipe_fd, STDOUT_FILENO); mx_handle_t crashlogger_proc; ASSERT_EQ(launchpad_go(crashlogger_lp, &crashlogger_proc, &errmsg), MX_OK); // Read crashlogger's output into a buffer. Stop reading when we get // an end-of-backtrace line which matches the following regular // expression. RegEx end_regex("^bt#\\d+: end"); FILE* fp = fdopen(pipe_fd, "r"); uint32_t output_size = 10000; uint32_t size_read = 0; mxtl::unique_ptr<char[]> output(new char[output_size]); for (;;) { char* line_buf = &output[size_read]; int32_t size_remaining = output_size - size_read; ASSERT_GT(size_remaining, 1); if (!fgets(line_buf, size_remaining, fp)) break; size_read += (uint32_t)strlen(line_buf); if (end_regex.Matches(line_buf)) break; } fclose(fp); // Check that the output contains backtrace info. RegEx overall_regex( "arch: .*\n" "(dso: id=.* base=.* name=.*\n)+" "(bt#\\d+: pc 0x.* sp 0x.* \\(.*,0x.*\\))+"); ASSERT_TRUE(overall_regex.Matches(output.get())); // Clean up. ASSERT_EQ(mx_object_wait_one(crasher_proc, MX_PROCESS_TERMINATED, MX_TIME_INFINITE, NULL), MX_OK); ASSERT_EQ(mx_handle_close(crasher_proc), MX_OK); ASSERT_EQ(mx_task_kill(crashlogger_proc), MX_OK); ASSERT_EQ(mx_object_wait_one(crashlogger_proc, MX_PROCESS_TERMINATED, MX_TIME_INFINITE, NULL), MX_OK); ASSERT_EQ(mx_handle_close(crashlogger_proc), MX_OK); return true; } bool test_crash_write0() { BEGIN_TEST; test_crash("write0"); END_TEST; } bool test_crash_stack_overflow() { BEGIN_TEST; test_crash("stackov"); END_TEST; } BEGIN_TEST_CASE(crashlogger_tests) RUN_TEST(test_crash_write0) RUN_TEST(test_crash_stack_overflow) END_TEST_CASE(crashlogger_tests) int main(int argc, char** argv) { bool success = unittest_run_all_tests(argc, argv); return success ? 0 : -1; }
[ "mseaborn@google.com" ]
mseaborn@google.com
4461b819f4d4f481f49536b7ebd0807b39e4b990
21f5356e9fd0b3ab9ee7a5c54e30fd94bb660ee4
/win32/src/PyDEVMODE.cpp
a1bc2566e3e9adcc6f3658b4eba6d6ba9289cb66
[]
no_license
chevah/pywin32
90850232a557ecf054bc316e324aaf60188f2cca
d4ff0b440147ab65f1945991e81163fb1cf1ceaf
refs/heads/master
2020-03-29T09:46:04.465546
2014-10-24T09:11:17
2014-10-24T09:11:17
25,680,336
5
1
null
null
null
null
UTF-8
C++
false
false
33,618
cpp
// @doc - This file contains autoduck documentation #include "PyWinTypes.h" #include "structmember.h" #include "PyWinObjects.h" #ifdef MS_WINCE #define DM_SPECVERSION 0 #endif // @object PyDEVMODE|Python object wrapping a DEVMODE structure struct PyMethodDef PyDEVMODEA::methods[] = { {"Clear", PyDEVMODEA::Clear, 1}, // @pymeth Clear|Resets all members of the structure {NULL} }; #define OFF(e) offsetof(PyDEVMODEA, e) struct PyMemberDef PyDEVMODEA::members[] = { // @prop int|SpecVersion|Should always be set to DM_SPECVERSION {"SpecVersion", T_USHORT, OFF(devmode.dmSpecVersion), 0, "Should always be set to DM_SPECVERSION"}, // @prop int|DriverVersion|Version nbr assigned to printer driver by vendor {"DriverVersion", T_USHORT, OFF(devmode.dmDriverVersion), 0, "Version nbr assigned to printer driver by vendor"}, // @prop int|Size|Size of structure {"Size", T_USHORT, OFF(devmode.dmSize), READONLY, "Size of structure"}, // @prop int|DriverExtra|Number of extra bytes allocated for driver data, can only be set when new object is created {"DriverExtra", T_USHORT, OFF(devmode.dmDriverExtra), READONLY, "Number of extra bytes allocated for driver data, can only be set when new object is created"}, // @prop int|Fields|Bitmask of win32con.DM_* constants indicating which members are set {"Fields", T_ULONG, OFF(devmode.dmFields), 0, "Bitmask of win32con.DM_* constants indicating which members are set"}, // @prop int|Orientation|Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE {"Orientation", T_SHORT, OFF(devmode.dmOrientation), 0, "Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE"}, // @prop int|PaperSize|Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant {"PaperSize", T_SHORT, OFF(devmode.dmPaperSize), 0, "Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant"}, // @prop int|PaperLength|Specified in 1/10 millimeters {"PaperLength", T_SHORT, OFF(devmode.dmPaperLength), 0, "Specified in 1/10 millimeters"}, // @prop int|PaperWidth|Specified in 1/10 millimeters {"PaperWidth", T_SHORT, OFF(devmode.dmPaperWidth), 0, "Specified in 1/10 millimeters"}, #ifndef MS_WINCE // @prop int|Position_x|Position of display relative to desktop {"Position_x", T_LONG, OFF(devmode.dmPosition.x), 0, "Position of display relative to desktop"}, // @prop int|Position_y|Position of display relative to desktop {"Position_y", T_LONG, OFF(devmode.dmPosition.y), 0, "Position of display relative to desktop"}, #endif // @prop int|DisplayOrientation|Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270 {"DisplayOrientation",T_ULONG,OFF(devmode.dmDisplayOrientation), 0, "Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270"}, // @prop int|DisplayFixedOutput|DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH {"DisplayFixedOutput",T_ULONG,OFF(devmode.dmDisplayFixedOutput), 0, "DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH"}, // @prop int|Scale|Specified as percentage, eg 50 means half size of original {"Scale", T_SHORT, OFF(devmode.dmScale), 0, "Specified as percentage, eg 50 means half size of original"}, // @prop int|Copies|Nbr of copies to print {"Copies", T_SHORT, OFF(devmode.dmCopies), 0, "Nbr of copies to print"}, // @prop int|DefaultSource|DMBIN_* constant, or can be a printer-specific value {"DefaultSource", T_SHORT, OFF(devmode.dmDefaultSource), 0, "DMBIN_* constant, or can be a printer-specific value"}, // @prop int|PrintQuality|DMRES_* constant, interpreted as DPI if positive {"PrintQuality", T_SHORT, OFF(devmode.dmPrintQuality), 0, "DMRES_* constant, interpreted as DPI if positive"}, // @prop int|Color|DMCOLOR_COLOR or DMCOLOR_MONOCHROME {"Color", T_SHORT, OFF(devmode.dmColor), 0, "DMCOLOR_COLOR or DMCOLOR_MONOCHROME"}, // @prop int|Duplex|For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL {"Duplex", T_SHORT, OFF(devmode.dmDuplex), 0, "For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL"}, // @prop int|YResolution|Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI {"YResolution", T_SHORT, OFF(devmode.dmYResolution), 0, "Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI"}, // @prop int|TTOption|TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV {"TTOption", T_SHORT, OFF(devmode.dmTTOption), 0, "TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV"}, // @prop int|Collate|DMCOLLATE_TRUE or DMCOLLATE_FALSE {"Collate", T_SHORT, OFF(devmode.dmCollate), 0, "DMCOLLATE_TRUE or DMCOLLATE_FALSE"}, // @prop int|LogPixels|Pixels per inch (only for display devices {"LogPixels", T_USHORT, OFF(devmode.dmLogPixels), 0, "Pixels per inch (only for display devices)"}, // @prop int|BitsPerPel|Color resolution in bits per pixel {"BitsPerPel", T_ULONG, OFF(devmode.dmBitsPerPel), 0, "Color resolution in bits per pixel"}, // @prop int|PelsWidth|Pixel width of display {"PelsWidth", T_ULONG, OFF(devmode.dmPelsWidth), 0, "Pixel width of display"}, // @prop int|PelsHeight|Pixel height of display {"PelsHeight", T_ULONG, OFF(devmode.dmPelsHeight), 0, "Pixel height of display"}, // @prop int|DisplayFlags|Combination of DM_GRAYSCALE and DM_INTERLACED {"DisplayFlags", T_ULONG, OFF(devmode.dmDisplayFlags), 0, "Combination of DM_GRAYSCALE and DM_INTERLACED"}, // @prop int|DisplayFrequency|Refresh rate {"DisplayFrequency",T_ULONG, OFF(devmode.dmDisplayFrequency), 0, "Refresh rate"}, #ifdef MS_WINCE // @prop int|DisplayOrientation|Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270 {"DisplayOrientation",T_ULONG,OFF(devmode.dmDisplayOrientation), 0, "Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270"}, #else // @prop int|ICMMethod|Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values {"ICMMethod", T_ULONG, OFF(devmode.dmICMMethod), 0, "Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values"}, // @prop int|ICMIntent|Intent of ICM, one of win32con.DMICM_* values {"ICMIntent", T_ULONG, OFF(devmode.dmICMIntent), 0, "Intent of ICM, one of win32con.DMICM_* values"}, // @prop int|MediaType|win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER {"MediaType", T_ULONG, OFF(devmode.dmMediaType), 0, "win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER"}, // @prop int|DitherType|Dithering option, win32con.DMDITHER_* {"DitherType", T_ULONG, OFF(devmode.dmDitherType), 0, "Dithering options, win32con.DMDITHER_*"}, // @prop int|Reserved1|Reserved, use only 0 {"Reserved1", T_ULONG, OFF(devmode.dmReserved1), 0, "Reserved, use only 0"}, // @prop int|Reserved2|Reserved, use only 0 {"Reserved2", T_ULONG, OFF(devmode.dmReserved2), 0, "Reserved, use only 0"}, #if WINVER >= 0x0500 // @prop int|Nup|Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP {"Nup", T_ULONG, OFF(devmode.dmNup), 0, "Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP"}, // @prop int|PanningWidth|Not used, leave as 0 {"PanningWidth", T_ULONG, OFF(devmode.dmPanningWidth), 0, "Not used, leave as 0"}, // @prop int|PanningHeight|Not used, leave as 0 {"PanningHeight", T_ULONG, OFF(devmode.dmPanningHeight), 0, "Not used, leave as 0"}, #endif // WINVER >= 0x0500 #endif // !MS_WINCE {NULL} }; // @prop str|DeviceName|String of at most 32 chars PyObject *PyDEVMODEA::get_DeviceName(PyObject *self, void *unused) { PDEVMODEA pdevmode=((PyDEVMODEA *)self)->pdevmode; if (pdevmode->dmDeviceName[CCHDEVICENAME-1]==0) // in case DeviceName fills space and has no trailing NULL return PyString_FromString((char *)&pdevmode->dmDeviceName); else return PyString_FromStringAndSize((char *)&pdevmode->dmDeviceName, CCHDEVICENAME); } int PyDEVMODEA::set_DeviceName(PyObject *self, PyObject *v, void *unused) { if(v==NULL){ PyErr_SetString(PyExc_AttributeError, "Attributes of PyDEVMODE can't be deleted"); return -1; } char *value; Py_ssize_t valuelen; if (PyString_AsStringAndSize(v, &value, &valuelen)==-1) return -1; if (valuelen > CCHDEVICENAME){ PyErr_Format(PyExc_ValueError,"DeviceName must be a string of length %d or less", CCHDEVICENAME); return -1; } PDEVMODEA pdevmode=&((PyDEVMODEA *)self)->devmode; ZeroMemory(&pdevmode->dmDeviceName, CCHDEVICENAME); memcpy(&pdevmode->dmDeviceName, value, valuelen); // update variable length DEVMODE with same value memcpy(((PyDEVMODEA *)self)->pdevmode, pdevmode, pdevmode->dmSize); return 0; } // @prop str|FormName|Name of form as returned by <om win32print.EnumForms>, at most 32 chars PyObject *PyDEVMODEA::get_FormName(PyObject *self, void *unused) { PDEVMODEA pdevmode=((PyDEVMODEA *)self)->pdevmode; if (pdevmode->dmFormName[CCHFORMNAME-1]==0) // If dmFormName occupies whole 32 chars, trailing NULL not present return PyString_FromString((char *)&pdevmode->dmFormName); else return PyString_FromStringAndSize((char *)&pdevmode->dmFormName, CCHFORMNAME); } int PyDEVMODEA::set_FormName(PyObject *self, PyObject *v, void *unused) { if(v==NULL){ PyErr_SetString(PyExc_AttributeError, "Attributes of PyDEVMODE can't be deleted"); return -1; } char *value; Py_ssize_t valuelen; if (PyString_AsStringAndSize(v, &value, &valuelen)==-1) return -1; if (valuelen > CCHFORMNAME){ PyErr_Format(PyExc_ValueError,"FormName must be a string of length %d or less", CCHFORMNAME); return -1; } PDEVMODEA pdevmode=&((PyDEVMODEA *)self)->devmode; ZeroMemory(&pdevmode->dmFormName, CCHFORMNAME); memcpy(&pdevmode->dmFormName, value, valuelen); // update variable length PDEVMODE with same value memcpy(((PyDEVMODEA *)self)->pdevmode, pdevmode, pdevmode->dmSize); return 0; } // @prop str|DriverData|Driver data appended to end of structure PyObject *PyDEVMODEA::get_DriverData(PyObject *self, void *unused) { PDEVMODEA pdevmode=((PyDEVMODEA *)self)->pdevmode; if (pdevmode->dmDriverExtra==0){ // No extra space allocated Py_INCREF(Py_None); return Py_None; } return PyString_FromStringAndSize((char *)((ULONG_PTR)pdevmode + pdevmode->dmSize), pdevmode->dmDriverExtra); } int PyDEVMODEA::set_DriverData(PyObject *self, PyObject *v, void *unused) { if(v==NULL){ PyErr_SetString(PyExc_AttributeError, "Attributes of PyDEVMODE can't be deleted"); return -1; } char *value; Py_ssize_t valuelen; if (PyString_AsStringAndSize(v, &value, &valuelen)==-1) return -1; PDEVMODEA pdevmode=((PyDEVMODEA *)self)->pdevmode; if (valuelen > pdevmode->dmDriverExtra){ PyErr_Format(PyExc_ValueError,"Length of DriverData cannot be longer that DriverExtra (%d bytes)", pdevmode->dmDriverExtra); return -1; } // This is not a real struct member, calculate address after end of fixed part of structure char *driverdata=(char *)((ULONG_PTR)pdevmode + pdevmode->dmSize); ZeroMemory(driverdata, pdevmode->dmDriverExtra); memcpy(driverdata, value, valuelen); return 0; } PyGetSetDef PyDEVMODEA::getset[] = { {"DeviceName", PyDEVMODEA::get_DeviceName, PyDEVMODEA::set_DeviceName, "String of at most 32 chars"}, {"FormName", PyDEVMODEA::get_FormName, PyDEVMODEA::set_FormName, "Name of form as returned by EnumForms, at most 32 chars"}, {"DriverData", PyDEVMODEA::get_DriverData, PyDEVMODEA::set_DriverData, "Driver data appended to end of structure"}, {NULL} }; PYWINTYPES_EXPORT PyTypeObject PyDEVMODEAType = { PYWIN_OBJECT_HEAD "PyDEVMODEA", sizeof(PyDEVMODEA), 0, PyDEVMODEA::deallocFunc, 0, // tp_print; 0, // tp_getattr 0, // tp_setattr 0, // tp_compare 0, // tp_repr 0, // tp_as_number 0, // tp_as_sequence 0, // tp_as_mapping 0, // tp_hash 0, // tp_call 0, // tp_str 0, // tp_getattro 0, // tp_setattro 0, // tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags; 0, // tp_doc; /* Documentation string */ 0, // traverseproc tp_traverse; 0, // tp_clear; 0, // tp_richcompare; 0, // tp_weaklistoffset; 0, // tp_iter 0, // iternextfunc tp_iternext PyDEVMODEA::methods, PyDEVMODEA::members, PyDEVMODEA::getset, // tp_getset; 0, // tp_base; 0, // tp_dict; 0, // tp_descr_get; 0, // tp_descr_set; 0, // tp_dictoffset; 0, // tp_init; 0, // tp_alloc; PyDEVMODEA::tp_new // newfunc tp_new; }; PyDEVMODEA::PyDEVMODEA(PDEVMODEA pdm) { ob_type = &PyDEVMODEAType; memcpy(&devmode, pdm, pdm->dmSize); pdevmode=(PDEVMODEA)malloc(pdm->dmSize + pdm->dmDriverExtra); if (pdevmode==NULL) PyErr_Format(PyExc_MemoryError, "PyDEVMODEA::PyDEVMODE - Unable to allocate DEVMODE of size %d", pdm->dmSize + pdm->dmDriverExtra); else memcpy(pdevmode, pdm, pdm->dmSize + pdm->dmDriverExtra); _Py_NewReference(this); } PyDEVMODEA::PyDEVMODEA(void) { ob_type = &PyDEVMODEAType; static WORD dmSize=sizeof(DEVMODEA); pdevmode=(PDEVMODEA)malloc(dmSize); ZeroMemory(pdevmode,dmSize); pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; ZeroMemory(&devmode,dmSize); devmode.dmSize=dmSize; devmode.dmSpecVersion=DM_SPECVERSION; _Py_NewReference(this); } PyDEVMODEA::PyDEVMODEA(USHORT dmDriverExtra) { ob_type = &PyDEVMODEAType; static WORD dmSize=sizeof(DEVMODEA); pdevmode=(PDEVMODEA)malloc(dmSize+dmDriverExtra); ZeroMemory(pdevmode,dmSize+dmDriverExtra); pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; pdevmode->dmDriverExtra=dmDriverExtra; ZeroMemory(&devmode,dmSize); devmode.dmSize=dmSize; devmode.dmSpecVersion=DM_SPECVERSION; devmode.dmDriverExtra=dmDriverExtra; _Py_NewReference(this); } PyDEVMODEA::~PyDEVMODEA() { if (pdevmode!=NULL) free(pdevmode); } BOOL PyDEVMODE_Check(PyObject *ob) { if (ob->ob_type!=&PyDEVMODEAType){ PyErr_SetString(PyExc_TypeError,"Object must be a PyDEVMODE"); return FALSE; } return TRUE; } void PyDEVMODEA::deallocFunc(PyObject *ob) { delete (PyDEVMODEA *)ob; } PDEVMODEA PyDEVMODEA::GetDEVMODE(void) { // Propagate any changes made by python attribute logic from the fixed length DEVMODE // to the externally visible variable length DEVMODE before handing it off to anyone else memcpy(pdevmode, &devmode, devmode.dmSize); return pdevmode; } // @pymethod |PyDEVMODE|Clear|Resets all members of the structure PyObject *PyDEVMODEA::Clear(PyObject *self, PyObject *args) { PDEVMODEA pdevmode=((PyDEVMODEA *)self)->pdevmode; USHORT dmDriverExtra=pdevmode->dmDriverExtra; WORD dmSize=pdevmode->dmSize; DWORD totalsize=dmSize + dmDriverExtra; ZeroMemory(pdevmode, totalsize); pdevmode->dmDriverExtra=dmDriverExtra; pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; pdevmode=&((PyDEVMODEA *)self)->devmode; ZeroMemory(pdevmode, dmSize); pdevmode->dmDriverExtra=dmDriverExtra; pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; Py_INCREF(Py_None); return Py_None; } PyObject *PyDEVMODEA::tp_new(PyTypeObject *typ, PyObject *args, PyObject *kwargs) { USHORT DriverExtra=0; static char *keywords[]={"DriverExtra", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|H", keywords, &DriverExtra)) return NULL; return new PyDEVMODEA(DriverExtra); } // If pywintypes is compiled with UNICODE defined, all modules that use these // objects will also need to be UNICODE #ifndef UNICODE BOOL PyWinObject_AsDEVMODE(PyObject *ob, PDEVMODE *ppDEVMODE, BOOL bNoneOk) { if (ob==Py_None) if (bNoneOk){ *ppDEVMODE=NULL; return TRUE; } else{ PyErr_SetString(PyExc_ValueError,"PyDEVMODE cannot be None in this context"); return FALSE; } if (!PyDEVMODE_Check(ob)) return FALSE; *ppDEVMODE=((PyDEVMODEA *)ob)->GetDEVMODE(); return TRUE; } PyObject *PyWinObject_FromDEVMODE(PDEVMODEA pdevmode) { static WORD dmSize=sizeof(DEVMODE); if (pdevmode==NULL){ Py_INCREF(Py_None); return Py_None; } // make sure we can't overflow the fixed size DEVMODE in PyDEVMODE if (pdevmode->dmSize>dmSize){ PyErr_Format(PyExc_WindowsError,"DEVMODE structure of size %d greater than supported size of %d", pdevmode->dmSize, dmSize); return NULL; } PyObject *ret=new PyDEVMODEA(pdevmode); // check that variable sized pdevmode is allocated if (((PyDEVMODEA *)ret)->GetDEVMODE()==NULL){ Py_DECREF(ret); ret=NULL; } return ret; } #endif // DEVMODEW support // @object PyDEVMODEW|Unicode version of <o PyDEVMODE> object /* PyDEVMODEW is only needed when win32api, win32gui, or win32print are built with UNICODE defined. Currently, you must explicitely ask for the unicode version. */ struct PyMethodDef PyDEVMODEW::methods[] = { {"Clear", PyDEVMODEW::Clear, 1}, // @pymeth Clear|Resets all members of the structure {NULL} }; #define OFFW(e) offsetof(PyDEVMODEW, e) struct PyMemberDef PyDEVMODEW::members[] = { // @prop int|SpecVersion|Should always be set to DM_SPECVERSION {"SpecVersion", T_USHORT, OFFW(devmode.dmSpecVersion), 0, "Should always be set to DM_SPECVERSION"}, // @prop int|DriverVersion|Version nbr assigned to printer driver by vendor {"DriverVersion", T_USHORT, OFFW(devmode.dmDriverVersion), 0, "Version nbr assigned to printer driver by vendor"}, // @prop int|Size|Size of structure {"Size", T_USHORT, OFFW(devmode.dmSize), READONLY, "Size of structure"}, // @prop int|DriverExtra|Number of extra bytes allocated for driver data, can only be set when new object is created {"DriverExtra", T_USHORT, OFFW(devmode.dmDriverExtra), READONLY, "Number of extra bytes allocated for driver data, can only be set when new object is created"}, // @prop int|Fields|Bitmask of win32con.DM_* constants indicating which members are set {"Fields", T_ULONG, OFFW(devmode.dmFields), 0, "Bitmask of win32con.DM_* constants indicating which members are set"}, // @prop int|Orientation|Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE {"Orientation", T_SHORT, OFFW(devmode.dmOrientation), 0, "Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE"}, // @prop int|PaperSize|Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant {"PaperSize", T_SHORT, OFFW(devmode.dmPaperSize), 0, "Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant"}, // @prop int|PaperLength|Specified in 1/10 millimeters {"PaperLength", T_SHORT, OFFW(devmode.dmPaperLength), 0, "Specified in 1/10 millimeters"}, // @prop int|PaperWidth|Specified in 1/10 millimeters {"PaperWidth", T_SHORT, OFFW(devmode.dmPaperWidth), 0, "Specified in 1/10 millimeters"}, #ifndef MS_WINCE // @prop int|Position_x|Position of display relative to desktop {"Position_x", T_LONG, OFFW(devmode.dmPosition.x), 0, "Position of display relative to desktop"}, // @prop int|Position_y|Position of display relative to desktop {"Position_y", T_LONG, OFFW(devmode.dmPosition.y), 0, "Position of display relative to desktop"}, #endif // @prop int|DisplayOrientation|Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270 {"DisplayOrientation",T_ULONG,OFFW(devmode.dmDisplayOrientation), 0, "Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270"}, // @prop int|DisplayFixedOutput|DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH {"DisplayFixedOutput",T_ULONG,OFFW(devmode.dmDisplayFixedOutput), 0, "DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH"}, // @prop int|Scale|Specified as percentage, eg 50 means half size of original {"Scale", T_SHORT, OFFW(devmode.dmScale), 0, "Specified as percentage, eg 50 means half size of original"}, // @prop int|Copies|Nbr of copies to print {"Copies", T_SHORT, OFFW(devmode.dmCopies), 0, "Nbr of copies to print"}, // @prop int|DefaultSource|DMBIN_* constant, or can be a printer-specific value {"DefaultSource", T_SHORT, OFFW(devmode.dmDefaultSource), 0, "DMBIN_* constant, or can be a printer-specific value"}, // @prop int|PrintQuality|DMRES_* constant, interpreted as DPI if positive {"PrintQuality", T_SHORT, OFFW(devmode.dmPrintQuality), 0, "DMRES_* constant, interpreted as DPI if positive"}, // @prop int|Color|DMCOLOR_COLOR or DMCOLOR_MONOCHROME {"Color", T_SHORT, OFFW(devmode.dmColor), 0, "DMCOLOR_COLOR or DMCOLOR_MONOCHROME"}, // @prop int|Duplex|For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL {"Duplex", T_SHORT, OFFW(devmode.dmDuplex), 0, "For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL"}, // @prop int|YResolution|Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI {"YResolution", T_SHORT, OFFW(devmode.dmYResolution), 0, "Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI"}, // @prop int|TTOption|TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV {"TTOption", T_SHORT, OFFW(devmode.dmTTOption), 0, "TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV"}, // @prop int|Collate|DMCOLLATE_TRUE or DMCOLLATE_FALSE {"Collate", T_SHORT, OFFW(devmode.dmCollate), 0, "DMCOLLATE_TRUE or DMCOLLATE_FALSE"}, // @prop int|LogPixels|Pixels per inch (only for display devices {"LogPixels", T_USHORT, OFFW(devmode.dmLogPixels), 0, "Pixels per inch (only for display devices)"}, // @prop int|BitsPerPel|Color resolution in bits per pixel {"BitsPerPel", T_ULONG, OFFW(devmode.dmBitsPerPel), 0, "Color resolution in bits per pixel"}, // @prop int|PelsWidth|Pixel width of display {"PelsWidth", T_ULONG, OFFW(devmode.dmPelsWidth), 0, "Pixel width of display"}, // @prop int|PelsHeight|Pixel height of display {"PelsHeight", T_ULONG, OFFW(devmode.dmPelsHeight), 0, "Pixel height of display"}, // @prop int|DisplayFlags|Combination of DM_GRAYSCALE and DM_INTERLACED {"DisplayFlags", T_ULONG, OFFW(devmode.dmDisplayFlags), 0, "Combination of DM_GRAYSCALE and DM_INTERLACED"}, // @prop int|DisplayFrequency|Refresh rate {"DisplayFrequency",T_ULONG, OFFW(devmode.dmDisplayFrequency), 0, "Refresh rate"}, #ifdef MS_WINCE // @prop int|DisplayOrientation|Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270 {"DisplayOrientation",T_ULONG,OFFW(devmode.dmDisplayOrientation), 0, "Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270"}, #else // @prop int|ICMMethod|Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values {"ICMMethod", T_ULONG, OFFW(devmode.dmICMMethod), 0, "Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values"}, // @prop int|ICMIntent|Intent of ICM, one of win32con.DMICM_* values {"ICMIntent", T_ULONG, OFFW(devmode.dmICMIntent), 0, "Intent of ICM, one of win32con.DMICM_* values"}, // @prop int|MediaType|win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER {"MediaType", T_ULONG, OFFW(devmode.dmMediaType), 0, "win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER"}, // @prop int|DitherType|Dithering option, win32con.DMDITHER_* {"DitherType", T_ULONG, OFFW(devmode.dmDitherType), 0, "Dithering options, win32con.DMDITHER_*"}, // @prop int|Reserved1|Reserved, use only 0 {"Reserved1", T_ULONG, OFFW(devmode.dmReserved1), 0, "Reserved, use only 0"}, // @prop int|Reserved2|Reserved, use only 0 {"Reserved2", T_ULONG, OFFW(devmode.dmReserved2), 0, "Reserved, use only 0"}, #if WINVER >= 0x0500 // @prop int|Nup|Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP {"Nup", T_ULONG, OFFW(devmode.dmNup), 0, "Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP"}, // @prop int|PanningWidth|Not used, leave as 0 {"PanningWidth", T_ULONG, OFFW(devmode.dmPanningWidth), 0, "Not used, leave as 0"}, // @prop int|PanningHeight|Not used, leave as 0 {"PanningHeight", T_ULONG, OFFW(devmode.dmPanningHeight), 0, "Not used, leave as 0"}, #endif // WINVER >= 0x0500 #endif // !MS_WINCE {NULL} }; // @prop <o PyUnicode>|DeviceName|String of at most 32 chars PyObject *PyDEVMODEW::get_DeviceName(PyObject *self, void *unused) { PDEVMODEW pdevmode=((PyDEVMODEW *)self)->pdevmode; if (pdevmode->dmDeviceName[CCHDEVICENAME-1]==0) // in case DeviceName fills space and has no trailing NULL return PyWinObject_FromWCHAR(pdevmode->dmDeviceName); return PyWinObject_FromWCHAR(pdevmode->dmDeviceName, CCHDEVICENAME); } int PyDEVMODEW::set_DeviceName(PyObject *self, PyObject *v, void *unused) { if(v==NULL){ PyErr_SetString(PyExc_AttributeError, "Attributes of PyDEVMODEW can't be deleted"); return -1; } WCHAR *devicename; DWORD cch; if (!PyWinObject_AsWCHAR(v, &devicename, FALSE, &cch)) return -1; if (cch > CCHDEVICENAME){ PyErr_Format(PyExc_ValueError,"DeviceName must be a string of length %d or less", CCHDEVICENAME); PyWinObject_FreeWCHAR(devicename); return -1; } PDEVMODEW pdevmode=&((PyDEVMODEW *)self)->devmode; ZeroMemory(&pdevmode->dmDeviceName, sizeof(pdevmode->dmDeviceName)); memcpy(&pdevmode->dmDeviceName, devicename, cch * sizeof(WCHAR)); // update variable length DEVMODE with same value memcpy(((PyDEVMODEW *)self)->pdevmode, pdevmode, pdevmode->dmSize); PyWinObject_FreeWCHAR(devicename); return 0; } // @prop str|FormName|Name of form as returned by <om win32print.EnumForms>, at most 32 chars PyObject *PyDEVMODEW::get_FormName(PyObject *self, void *unused) { PDEVMODEW pdevmode=((PyDEVMODEW *)self)->pdevmode; if (pdevmode->dmFormName[CCHFORMNAME-1]==0) // If dmFormName occupies whole 32 chars, trailing NULL not present return PyWinObject_FromWCHAR(pdevmode->dmFormName); return PyWinObject_FromWCHAR(pdevmode->dmFormName, CCHFORMNAME); } int PyDEVMODEW::set_FormName(PyObject *self, PyObject *v, void *unused) { if(v==NULL){ PyErr_SetString(PyExc_AttributeError, "Attributes of PyDEVMODEW can't be deleted"); return -1; } WCHAR *formname; DWORD cch; if (!PyWinObject_AsWCHAR(v, &formname, FALSE, &cch)) return -1; if (cch > CCHFORMNAME){ PyErr_Format(PyExc_ValueError,"FormName must be a string of length %d or less", CCHFORMNAME); PyWinObject_FreeWCHAR(formname); return -1; } PDEVMODEW pdevmode=&((PyDEVMODEW *)self)->devmode; ZeroMemory(&pdevmode->dmFormName, sizeof(pdevmode->dmFormName)); memcpy(&pdevmode->dmFormName, formname, cch * sizeof(WCHAR)); // update variable length PDEVMODE with same value memcpy(((PyDEVMODEW *)self)->pdevmode, pdevmode, pdevmode->dmSize); PyWinObject_FreeWCHAR(formname); return 0; } // @prop str|DriverData|Driver data appended to end of structure PyObject *PyDEVMODEW::get_DriverData(PyObject *self, void *unused) { PDEVMODEW pdevmode=((PyDEVMODEW *)self)->pdevmode; if (pdevmode->dmDriverExtra==0){ // No extra space allocated Py_INCREF(Py_None); return Py_None; } return PyString_FromStringAndSize((char *)((ULONG_PTR)pdevmode + pdevmode->dmSize), pdevmode->dmDriverExtra); } int PyDEVMODEW::set_DriverData(PyObject *self, PyObject *v, void *unused) { if(v==NULL){ PyErr_SetString(PyExc_AttributeError, "Attributes of PyDEVMODEW can't be deleted"); return -1; } char *value; Py_ssize_t valuelen; if (PyString_AsStringAndSize(v, &value, &valuelen)==-1) return -1; PDEVMODEW pdevmode=((PyDEVMODEW *)self)->pdevmode; if (valuelen > pdevmode->dmDriverExtra){ PyErr_Format(PyExc_ValueError,"Length of DriverData cannot be longer that DriverExtra (%d bytes)", pdevmode->dmDriverExtra); return -1; } // This is not a real struct member, calculate address after end of fixed part of structure char *driverdata=(char *)((ULONG_PTR)pdevmode + pdevmode->dmSize); ZeroMemory(driverdata, pdevmode->dmDriverExtra); memcpy(driverdata, value, valuelen); return 0; } PyGetSetDef PyDEVMODEW::getset[] = { {"DeviceName", PyDEVMODEW::get_DeviceName, PyDEVMODEW::set_DeviceName, "String of at most 32 chars"}, {"FormName", PyDEVMODEW::get_FormName, PyDEVMODEW::set_FormName, "Name of form as returned by EnumForms, at most 32 chars"}, {"DriverData", PyDEVMODEW::get_DriverData, PyDEVMODEW::set_DriverData, "Driver data appended to end of structure"}, {NULL} }; PYWINTYPES_EXPORT PyTypeObject PyDEVMODEWType = { PYWIN_OBJECT_HEAD "PyDEVMODEW", sizeof(PyDEVMODEW), 0, PyDEVMODEW::deallocFunc, 0, // tp_print; 0, // tp_getattr 0, // tp_setattr 0, // tp_compare 0, // tp_repr 0, // tp_as_number 0, // tp_as_sequence 0, // tp_as_mapping 0, // tp_hash 0, // tp_call 0, // tp_str 0, // tp_getattro 0, // tp_setattro 0, // tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags; 0, // tp_doc 0, // traverseproc tp_traverse; 0, // tp_clear; 0, // tp_richcompare; 0, // tp_weaklistoffset; 0, // tp_iter 0, // iternextfunc tp_iternext PyDEVMODEW::methods, PyDEVMODEW::members, PyDEVMODEW::getset, // tp_getset; 0, // tp_base; 0, // tp_dict; 0, // tp_descr_get; 0, // tp_descr_set; 0, // tp_dictoffset; 0, // tp_init; 0, // tp_alloc; PyDEVMODEW::tp_new // newfunc tp_new; }; PyDEVMODEW::PyDEVMODEW(PDEVMODEW pdm) { ob_type = &PyDEVMODEWType; memcpy(&devmode, pdm, pdm->dmSize); pdevmode=(PDEVMODEW)malloc(pdm->dmSize + pdm->dmDriverExtra); if (pdevmode==NULL) PyErr_Format(PyExc_MemoryError, "PyDEVMODEA::PyDEVMODE - Unable to allocate DEVMODE of size %d", pdm->dmSize + pdm->dmDriverExtra); else memcpy(pdevmode, pdm, pdm->dmSize + pdm->dmDriverExtra); _Py_NewReference(this); } PyDEVMODEW::PyDEVMODEW(void) { ob_type = &PyDEVMODEWType; static WORD dmSize=sizeof(DEVMODEW); pdevmode=(PDEVMODEW)malloc(dmSize); ZeroMemory(pdevmode,dmSize); pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; ZeroMemory(&devmode,dmSize); devmode.dmSize=dmSize; devmode.dmSpecVersion=DM_SPECVERSION; _Py_NewReference(this); } PyDEVMODEW::PyDEVMODEW(USHORT dmDriverExtra) { ob_type = &PyDEVMODEWType; static WORD dmSize=sizeof(DEVMODEW); pdevmode=(PDEVMODEW)malloc(dmSize+dmDriverExtra); ZeroMemory(pdevmode,dmSize+dmDriverExtra); pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; pdevmode->dmDriverExtra=dmDriverExtra; ZeroMemory(&devmode,dmSize); devmode.dmSize=dmSize; devmode.dmSpecVersion=DM_SPECVERSION; devmode.dmDriverExtra=dmDriverExtra; _Py_NewReference(this); } PyDEVMODEW::~PyDEVMODEW() { if (pdevmode!=NULL) free(pdevmode); } BOOL PyDEVMODEW_Check(PyObject *ob) { if (ob->ob_type!=&PyDEVMODEWType){ PyErr_SetString(PyExc_TypeError,"Object must be a PyDEVMODEW"); return FALSE; } return TRUE; } void PyDEVMODEW::deallocFunc(PyObject *ob) { delete (PyDEVMODEW *)ob; } PDEVMODEW PyDEVMODEW::GetDEVMODE(void) { // Propagate any changes made by python attribute logic from the fixed length DEVMODE // to the externally visible variable length DEVMODE before handing it off to anyone else memcpy(pdevmode, &devmode, devmode.dmSize); return pdevmode; } // @pymethod |PyDEVMODE|Clear|Resets all members of the structure PyObject *PyDEVMODEW::Clear(PyObject *self, PyObject *args) { PDEVMODEW pdevmode=((PyDEVMODEW *)self)->pdevmode; USHORT dmDriverExtra=pdevmode->dmDriverExtra; WORD dmSize=pdevmode->dmSize; DWORD totalsize=dmSize + dmDriverExtra; ZeroMemory(pdevmode, totalsize); pdevmode->dmDriverExtra=dmDriverExtra; pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; pdevmode=&((PyDEVMODEW *)self)->devmode; ZeroMemory(pdevmode, dmSize); pdevmode->dmDriverExtra=dmDriverExtra; pdevmode->dmSize=dmSize; pdevmode->dmSpecVersion=DM_SPECVERSION; Py_INCREF(Py_None); return Py_None; } PyObject *PyDEVMODEW::tp_new(PyTypeObject *typ, PyObject *args, PyObject *kwargs) { USHORT DriverExtra=0; static char *keywords[]={"DriverExtra", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|H", keywords, &DriverExtra)) return NULL; return new PyDEVMODEW(DriverExtra); } BOOL PyWinObject_AsDEVMODE(PyObject *ob, PDEVMODEW *ppDEVMODE, BOOL bNoneOk) { if (ob==Py_None) if (bNoneOk){ *ppDEVMODE=NULL; return TRUE; } else{ PyErr_SetString(PyExc_ValueError,"PyDEVMODE cannot be None in this context"); return FALSE; } if (!PyDEVMODEW_Check(ob)) return FALSE; *ppDEVMODE=((PyDEVMODEW *)ob)->GetDEVMODE(); return TRUE; } PyObject *PyWinObject_FromDEVMODE(PDEVMODEW pDEVMODE) { static WORD dmSize=sizeof(DEVMODEW); if (pDEVMODE==NULL){ Py_INCREF(Py_None); return Py_None; } // make sure we can't overflow the fixed size DEVMODE in PyDEVMODE if (pDEVMODE->dmSize>dmSize){ PyErr_Format(PyExc_WindowsError,"DEVMODE structure of size %d greater than supported size of %d", pDEVMODE->dmSize, dmSize); return NULL; } PyObject *ret=new PyDEVMODEW(pDEVMODE); // check that variable sized pdevmode is allocated if (((PyDEVMODEW *)ret)->GetDEVMODE()==NULL){ Py_DECREF(ret); ret=NULL; } return ret; }
[ "adi.roiban@chevah.com" ]
adi.roiban@chevah.com
31fc0a6a12854e4c373a9f5454ed009277368449
98c3a1405296e8ccadf21a54c1ba38c75abac7f9
/Swiat.cpp
950044cdf98018fc93fefeb76be9b7ce0a1e66ee
[]
no_license
blejson/simulation
f11c12c096e20c1b310720e137aad2df9f2a6cd6
dde7b2c1b946c0602a6f163430d14548ee300eca
refs/heads/master
2020-12-28T03:55:13.203929
2020-02-04T10:01:42
2020-02-04T10:01:42
238,172,719
1
0
null
null
null
null
WINDOWS-1250
C++
false
false
6,336
cpp
#include "Swiat.h" #include "Organizm.h" #include "Roslina.h" #include "Zwierze.h" #include "trawa.h" #include "wilk.h" #include "mlecz.h" #include "wilczeJagody.h" #include "barszczSosnowskiego.h" #include "guarana.h" #include "owca.h" #include "lis.h" #include "zolw.h" #include "antylopa.h" #include "czlowiek.h" #include <iostream> #include<Windows.h> #include <time.h> #include <conio.h> #include <algorithm> #include <fstream> #include <string> using namespace std; void gotoxy(int x, int y) { COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); } void Swiat::tworzPlansze() { for (int i = 0; i < this->getX(); i++) { for (int j = 0; j < this->getY(); j++) { this->plansza[i][j] = " "; } } for (auto n : this->organizmy) { string name = typeid(*n).name(); if (name == "class antylopa" || name == "class lis" || name == "class owca" || name == "class wilk" || name == "class zolw" || name=="class czlowiek") { plansza[n->getX() - 1][n->getY() - 1] = "Z"; } } } Swiat::Swiat(int x, int y) { this->x = x; this->y = y; this->l_tur = 1; this->plansza = new string *[x]; for (int i = 0; i < x; i++) { this->plansza[i] = new string [y]; } for (int i = 0; i < x; i++) { for (int j = 0; j < y; j++) { this->plansza[i][j] = " "; } } } bool sortowanie(Organizm* org1, Organizm* org2) { if (org1->getInicjatywa() != org2->getInicjatywa()) { return org1->getInicjatywa() > org2->getInicjatywa(); } else return org1->getWiek() > org2->getWiek(); } void zapis(vector<Organizm*> organizmy, Swiat* world) { fstream plik; plik.open("zapis.txt", ios::out); plik << organizmy.size() << endl; plik << world->getL_tur() << endl; for (auto n : organizmy) { int z=0; string name = typeid(*n).name(); if (name == " class antylopa") z = 0; else if (name == "class czlowiek") z = 2; else if (name == "class guarana") z = 3; else if (name == "class lis") z = 4; else if (name == "class mlecz") z = 5; else if (name == "class owca") z = 6; else if (name == "class trawa") z = 7; else if (name == "class wilczeJagody") z = 8; else if (name == "class wilk") z = 9; else if (name == "class zolw") z = 10; plik << z << endl; plik << n->getX() << endl; plik<< n->getY() << endl; } plik.close(); } void odczyt(Swiat* world) { fstream plik; plik.open("zapis.txt", ios::in); string linia; getline(plik, linia); int il = atoi(linia.c_str()); getline(plik, linia); world->setL_tur(atoi(linia.c_str())); for (int i = 0; i < il; i++) { int n, px, py; getline(plik, linia); n = atoi(linia.c_str()); getline(plik, linia); px = atoi(linia.c_str()); getline(plik, linia); py = atoi(linia.c_str()); switch (n) { case 0: world->organizmy.push_back(new antylopa(*world, px, py)); break; case 1: world->organizmy.push_back(new barszczSosnowskiego(*world, px, py)); break; case 2: world->organizmy.push_back(new czlowiek(*world, px, py)); break; case 3: world->organizmy.push_back(new guarana(*world, px, py)); break; case 4: world->organizmy.push_back(new lis(*world, px, py)); break; case 5: world->organizmy.push_back(new mlecz(*world, px, py)); break; case 6: world->organizmy.push_back(new owca(*world, px, py)); break; case 7: world->organizmy.push_back(new trawa(*world, px, py)); break; case 8: world->organizmy.push_back(new wilczeJagody(*world, px, py)); break; case 9: world->organizmy.push_back(new wilk(*world, px, py)); break; case 10: world->organizmy.push_back(new zolw(*world, px, py)); break; } } plik.close(); } void Swiat::wykonajTure() { char inp; do { sort(this->organizmy.begin(), this->organizmy.end(), sortowanie); system("cls"); cout << "Runda nr: " << this->getL_tur(); gotoxy(0, 1); cout << "kliknij dowolny przycisk aby rozpoczac runde" << endl; cout << "kliknij q aby wyjsc, z aby zapisac gre, lub o aby otworzyc zapisana"; int i = 0; while (!this->komentarze.empty()) { gotoxy(this->n + this->x + 5, 5+i); string kom = this->komentarze.front(); cout << kom; this->komentarze.erase(this->komentarze.begin()); i++; } this->komentarze.clear(); Swiat::rysujSwiat(); inp = _getch(); if (inp == -32) { inp = _getch(); } this->setL_tur(this->getL_tur()+1); if (inp == 122) zapis(this->organizmy, this); // jeżeli użytkownik kliknął "z" program zapisze aktualny stan do pliku if (inp == 111) { // "o" odczytuje z pliku organizmy.clear(); odczyt(this); } if (inp != 111 && inp != 122 && inp != 113) { vector<Organizm*> korganizmy = organizmy; for (auto n : korganizmy) { this->tworzPlansze(); n->akcja(); n->setWiek(n->getWiek() + 1); } } } while (inp != 113); //while inp!= "q" } int Swiat::getL_tur() { return this->l_tur; } void Swiat::setL_tur(int nl) { this->l_tur = nl; } void Swiat::rysujSwiat() { gotoxy(n, z); for (int i = 0; i <= (this->x + 1); i++) { cout << "#"; } gotoxy(n, z + y+1); for (int i = 0; i <= (this->x + 1); i++) { cout << "#"; } for (int i = 0; i <= y; i++) { gotoxy(n, z + i); cout << "#"; } for (int i = 0; i <= y; i++) { gotoxy(n+x+1, z + i); cout << "#"; } for (auto n : organizmy) { n->rysowanie(); } } int Swiat::getX() { return this->x; } int Swiat::getY() { return this->y; } void Swiat::komentator(Organizm* a, Organizm* b, string akt) { string kom; string name1,name2, name11, name22; name1= typeid(*a).name(); name2= typeid(*b).name(); for (int i = 6; i < name1.length(); i++) { name11 += name1[i]; } for (int i = 6; i < name2.length(); i++) { name22 += name2[i]; } if (akt == "zabija") { kom += name11; kom += " "; kom += akt; kom += " "; kom += name22; } else if (akt == "zjada") { kom += name11; kom += " "; kom += akt; kom += " "; kom += name22; } else if (akt == "rozmnaza sie") { kom += name11; kom += " "; kom += akt; } this->komentarze.push_back(kom); } Swiat::~Swiat() { for (int i = 0; i < this->getX(); i++) { delete[] this->plansza[i]; } delete [] this->plansza; this->komentarze.clear(); this->organizmy.clear(); }
[ "noreply@github.com" ]
blejson.noreply@github.com
4084f354a97f9a90b15059f2a6ea480d2ccf4a70
a1df45487531b511fc32dd2b5352e7b701436781
/Exams/mid17extra/isBalanced.cpp
bf1224e1e9d9652907793f0935c49e0df5a3b54e
[]
no_license
TarekkMA/FEE-First-Data-Structure-Algorithms
a7b0886ea48fbefc499a0a99c134c9455f11e3d1
b0e92230f2a2ca83134909f8448cfe095f87a786
refs/heads/master
2021-09-04T07:47:52.680847
2018-01-17T05:44:43
2018-01-17T05:44:43
110,882,196
0
0
null
null
null
null
UTF-8
C++
false
false
1,730
cpp
#include <iostream> #define SIZE 100 using namespace std; struct Stack{ char data[SIZE]; int top = -1; }; bool isEmpty(Stack s){ if(s.top == -1) return true; else return false; } bool isFull(Stack s){ if(s.top == SIZE-1) return true; else return false; } void push(Stack&s,char c){ if(isFull(s)){ cout << "FULL" << endl; return; } s.top++; s.data[s.top] = c; } char pop(Stack&s){ if(isEmpty(s)){ cout << "EMPTY" << endl; return 0;//if empty return char which assci value is 0 } char val = s.data[s.top]; s.top--; return val; } bool isBalanced(char expression[]){ Stack s; char c = expression[0]; //starting value int i = 0; //while to loop over the string //string have '\0' ending while(c!='\0'){ if(c == '('){ push(s,'('); }else if(c == ')'){ if(s.top == -1) return false; else pop(s); } i++; c = expression[i]; } //check if there is '(' still not removed if(isEmpty(s)){ return true; }else{ //stack is not empty and expression is not balanced return false; } } int main() { char exp1[] = "(3+4)*(2+5-6)"; char exp2[] = "((5-2)/(7+4)"; if(isBalanced(exp1)){ cout << exp1 << " is balanced" << endl; }else{ cout << exp1 << " is not balanced" << endl; } if(isBalanced(exp2)){ cout << exp2 << " is balanced" << endl; }else{ cout << exp2 << " is not balanced" << endl; } return 0; }
[ "tarekkma@gmail.com" ]
tarekkma@gmail.com
2dbc0d214ce64cabe291b67304188d534750e63c
2a7e77565c33e6b5d92ce6702b4a5fd96f80d7d0
/fuzzedpackages/multinet/src/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h
635cbe1cb3bcc944c099798584fb2d4da96b6c0c
[]
no_license
akhikolla/testpackages
62ccaeed866e2194652b65e7360987b3b20df7e7
01259c3543febc89955ea5b79f3a08d3afe57e95
refs/heads/master
2023-02-18T03:50:28.288006
2021-01-18T13:23:32
2021-01-18T13:23:32
329,981,898
7
1
null
null
null
null
UTF-8
C++
false
false
10,928
h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #if defined(EIGEN_USE_THREADS) && !defined(EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H) #define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H namespace Eigen { // Use the SimpleThreadPool by default. We'll switch to the new non blocking // thread pool later. #ifndef EIGEN_USE_SIMPLE_THREAD_POOL template <typename Env> using ThreadPoolTempl = NonBlockingThreadPoolTempl<Env>; typedef NonBlockingThreadPool ThreadPool; #else template <typename Env> using ThreadPoolTempl = SimpleThreadPoolTempl<Env>; typedef SimpleThreadPool ThreadPool; #endif // Barrier is an object that allows one or more threads to wait until // Notify has been called a specified number of times. class Barrier { public: Barrier(unsigned int count) : state_(count << 1), notified_(false) { eigen_assert(((count << 1) >> 1) == count); } ~Barrier() { eigen_assert((state_>>1) == 0); } void Notify() { unsigned int v = state_.fetch_sub(2, std::memory_order_acq_rel) - 2; if (v != 1) { eigen_assert(((v + 2) & ~1) != 0); return; // either count has not dropped to 0, or waiter is not waiting } std::unique_lock<std::mutex> l(mu_); eigen_assert(!notified_); notified_ = true; cv_.notify_all(); } void Wait() { unsigned int v = state_.fetch_or(1, std::memory_order_acq_rel); if ((v >> 1) == 0) { return; } std::unique_lock<std::mutex> l(mu_); while (!notified_) { cv_.wait(l); } } private: std::mutex mu_; std::condition_variable cv_; std::atomic<unsigned int> state_; // low bit is waiter flag bool notified_; }; // Notification is an object that allows a user to to wait for another // thread to signal a notification that an event has occurred. // // Multiple threads can wait on the same Notification object, // but only one caller must call Notify() on the object. struct Notification : Barrier { Notification() : Barrier(1) {}; }; // Runs an arbitrary function and then calls Notify() on the passed in // Notification. template <typename Function, typename... Args> struct FunctionWrapperWithNotification { static void run(Notification* n, Function f, Args... args) { f(args...); if (n) { n->Notify(); } } }; template <typename Function, typename... Args> struct FunctionWrapperWithBarrier { static void run(Barrier* b, Function f, Args... args) { f(args...); if (b) { b->Notify(); } } }; template <typename SyncType> static EIGEN_STRONG_INLINE void wait_until_ready(SyncType* n) { if (n) { n->Wait(); } } // Build a thread pool device on top the an existing pool of threads. struct ThreadPoolDevice { // The ownership of the thread pool remains with the caller. ThreadPoolDevice(ThreadPoolInterface* pool, int num_cores) : pool_(pool), num_threads_(num_cores) { } EIGEN_STRONG_INLINE void* allocate(size_t num_bytes) const { return internal::aligned_malloc(num_bytes); } EIGEN_STRONG_INLINE void deallocate(void* buffer) const { internal::aligned_free(buffer); } EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const { ::memcpy(dst, src, n); } EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const { memcpy(dst, src, n); } EIGEN_STRONG_INLINE void memcpyDeviceToHost(void* dst, const void* src, size_t n) const { memcpy(dst, src, n); } EIGEN_STRONG_INLINE void memset(void* buffer, int c, size_t n) const { ::memset(buffer, c, n); } EIGEN_STRONG_INLINE int numThreads() const { return num_threads_; } EIGEN_STRONG_INLINE size_t firstLevelCacheSize() const { return l1CacheSize(); } EIGEN_STRONG_INLINE size_t lastLevelCacheSize() const { // The l3 cache size is shared between all the cores. return l3CacheSize() / num_threads_; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const { // Should return an enum that encodes the ISA supported by the CPU return 1; } template <class Function, class... Args> EIGEN_STRONG_INLINE Notification* enqueue(Function&& f, Args&&... args) const { Notification* n = new Notification(); pool_->Schedule(std::bind(&FunctionWrapperWithNotification<Function, Args...>::run, n, f, args...)); return n; } template <class Function, class... Args> EIGEN_STRONG_INLINE void enqueue_with_barrier(Barrier* b, Function&& f, Args&&... args) const { pool_->Schedule(std::bind( &FunctionWrapperWithBarrier<Function, Args...>::run, b, f, args...)); } template <class Function, class... Args> EIGEN_STRONG_INLINE void enqueueNoNotification(Function&& f, Args&&... args) const { pool_->Schedule(std::bind(f, args...)); } // Returns a logical thread index between 0 and pool_->NumThreads() - 1 if // called from one of the threads in pool_. Returns -1 otherwise. EIGEN_STRONG_INLINE int currentThreadId() const { return pool_->CurrentThreadId(); } // parallelFor executes f with [0, n) arguments in parallel and waits for // completion. F accepts a half-open interval [first, last). // Block size is choosen based on the iteration cost and resulting parallel // efficiency. If block_align is not nullptr, it is called to round up the // block size. void parallelFor(Index n, const TensorOpCost& cost, std::function<Index(Index)> block_align, std::function<void(Index, Index)> f) const { typedef TensorCostModel<ThreadPoolDevice> CostModel; if (n <= 1 || numThreads() == 1 || CostModel::numThreads(n, cost, static_cast<int>(numThreads())) == 1) { f(0, n); return; } // Calculate block size based on (1) the iteration cost and (2) parallel // efficiency. We want blocks to be not too small to mitigate // parallelization overheads; not too large to mitigate tail // effect and potential load imbalance and we also want number // of blocks to be evenly dividable across threads. double block_size_f = 1.0 / CostModel::taskSize(1, cost); Index block_size = numext::mini(n, numext::maxi<Index>(1, block_size_f)); const Index max_block_size = numext::mini(n, numext::maxi<Index>(1, 2 * block_size_f)); if (block_align) { Index new_block_size = block_align(block_size); eigen_assert(new_block_size >= block_size); block_size = numext::mini(n, new_block_size); } Index block_count = divup(n, block_size); // Calculate parallel efficiency as fraction of total CPU time used for // computations: double max_efficiency = static_cast<double>(block_count) / (divup<int>(block_count, numThreads()) * numThreads()); // Now try to increase block size up to max_block_size as long as it // doesn't decrease parallel efficiency. for (Index prev_block_count = block_count; prev_block_count > 1;) { // This is the next block size that divides size into a smaller number // of blocks than the current block_size. Index coarser_block_size = divup(n, prev_block_count - 1); if (block_align) { Index new_block_size = block_align(coarser_block_size); eigen_assert(new_block_size >= coarser_block_size); coarser_block_size = numext::mini(n, new_block_size); } if (coarser_block_size > max_block_size) { break; // Reached max block size. Stop. } // Recalculate parallel efficiency. const Index coarser_block_count = divup(n, coarser_block_size); eigen_assert(coarser_block_count < prev_block_count); prev_block_count = coarser_block_count; const double coarser_efficiency = static_cast<double>(coarser_block_count) / (divup<int>(coarser_block_count, numThreads()) * numThreads()); if (coarser_efficiency + 0.01 >= max_efficiency) { // Taking it. block_size = coarser_block_size; block_count = coarser_block_count; if (max_efficiency < coarser_efficiency) { max_efficiency = coarser_efficiency; } } } // Recursively divide size into halves until we reach block_size. // Division code rounds mid to block_size, so we are guaranteed to get // block_count leaves that do actual computations. Barrier barrier(static_cast<unsigned int>(block_count)); std::function<void(Index, Index)> handleRange; handleRange = [=, &handleRange, &barrier, &f](Index first, Index last) { if (last - first <= block_size) { // Single block or less, execute directly. f(first, last); barrier.Notify(); return; } // Split into halves and submit to the pool. Index mid = first + divup((last - first) / 2, block_size) * block_size; pool_->Schedule([=, &handleRange]() { handleRange(mid, last); }); pool_->Schedule([=, &handleRange]() { handleRange(first, mid); }); }; handleRange(0, n); barrier.Wait(); } // Convenience wrapper for parallelFor that does not align blocks. void parallelFor(Index n, const TensorOpCost& cost, std::function<void(Index, Index)> f) const { parallelFor(n, cost, nullptr, std::move(f)); } private: ThreadPoolInterface* pool_; int num_threads_; }; } // end namespace Eigen #endif // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H
[ "akhilakollasrinu424jf@gmail.com" ]
akhilakollasrinu424jf@gmail.com
62f1b8e32ad023330a15d45521692e9e9ceb0929
66bed781982f87371b28189ab0f0faa30b537e11
/TP - El Beze/Chevalier-Chris-TP-Sudoku/main.cpp
2b8157a32cbb8cc90e6910e637c534b12190264d
[]
no_license
cc222ip/Programmation-avance-e-et-re-alisation
7adda58a1ee505825435c0046585152ee1d8832d
c28958165f3570e08cd8e9e113a626455f48abc6
refs/heads/master
2020-03-11T08:58:45.211529
2018-04-17T12:03:06
2018-04-17T12:03:06
129,897,981
0
0
null
null
null
null
UTF-8
C++
false
false
763
cpp
#include "sudoku.h" int main() { float temps; clock_t t1, t2; Grid G1; cout << "Grille avant remplissage :" << endl; G1.Afficher(); bool b1 = false; t1 = clock(); G1.Resolution1(0, b1); t2 = clock(); temps = (float)(t2 - t1)/CLOCKS_PER_SEC; cout << "Grille après remplissage (version 1) :" << endl; G1.Afficher(); cout << "Temps d'exécution de la version 1 : " << temps << endl << endl; Grid G2; bool b2 = false; t1 = clock(); G2.Resolution2(0, b2); t2 = clock(); temps = (float)(t2 - t1)/CLOCKS_PER_SEC; cout << "Grille après remplissage (version 2) :" << endl; G2.Afficher(); cout << "Temps d'exécution de la version 2 : " << temps << endl; return 0; }
[ "32032587+cc222ip@users.noreply.github.com" ]
32032587+cc222ip@users.noreply.github.com
d80aa572249362d0aefc6268081d3810487d2c29
9f520bcbde8a70e14d5870fd9a88c0989a8fcd61
/pitzDaily/23/Ua
ce34381d033265a3a153b3f3e2b24e7c8a4ee91c
[]
no_license
asAmrita/adjoinShapOptimization
6d47c89fb14d090941da706bd7c39004f515cfea
079cbec87529be37f81cca3ea8b28c50b9ceb8c5
refs/heads/master
2020-08-06T21:32:45.429939
2019-10-06T09:58:20
2019-10-06T09:58:20
213,144,901
1
0
null
null
null
null
UTF-8
C++
false
false
239,382
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "23"; object Ua; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField nonuniform List<vector> 6400 ( (0.000255447412648 0.000353176176516 0) (0.000759547143642 0.000322695088566 0) (0.00112972468232 0.000321937538027 0) (0.00172575950053 0.000367187511694 0) (0.00217296513374 0.000230588506097 0) (0.00246277638922 -3.19905916108e-06 0) (0.0021514118674 -0.000116771303234 0) (0.00184657842634 -9.20555705809e-06 0) (0.00213240440953 0.000125981485053 0) (0.00286115482628 0.000172679806527 0) (0.00243171257593 0.000127485238594 0) (0.00337515275987 0.000341222187832 0) (0.00434582887829 0.000580910199361 0) (0.00565040945948 0.000536828181786 0) (0.00549171846322 0.000276113914544 0) (0.00552683480763 0.000611433146278 0) (0.00686105596019 0.00131235028224 0) (0.0083705346455 0.00134459787871 0) (0.00852419927519 0.000502598161986 0) (0.00826678205606 -0.000356171451727 0) (0.00762568156365 -0.000752446268344 0) (0.00659121856535 -0.00100714205367 0) (0.00530151588345 -0.000892197353102 0) (0.0036619994986 -0.000679755986882 0) (0.00358414588536 -0.000850052255314 0) (0.00449055943781 -0.00106441213646 0) (0.00524447993691 -0.000475312683709 0) (0.00598304413061 -2.73399450762e-05 0) (0.00551039450845 0.000371715769557 0) (0.00374873125997 0.00158120407906 0) (0.003465727112 0.00249863357234 0) (0.00647493261007 0.00404379165959 0) (0.0185504805698 0.0013836385234 0) (0.0507501135353 -0.0493252141193 0) (0.0624425819092 -0.0732672251673 0) (0.0763799255009 -0.0882844489465 0) (0.0828599318837 -0.098037995552 0) (0.0895148056042 -0.10550012909 0) (0.0956866333593 -0.111232683547 0) (0.101566764536 -0.115548922519 0) (0.107125998725 -0.118660444321 0) (0.112184106451 -0.120692490254 0) (0.116466081283 -0.12141044922 0) (0.119680302133 -0.120066177419 0) (0.121488865959 -0.115525062144 0) (0.121622950196 -0.10650298754 0) (0.119759065352 -0.0940583208009 0) (0.115840301525 -0.0776896771561 0) (0.109531675147 -0.057947711719 0) (0.100840261083 -0.0353707563958 0) (0.0901643767385 -0.0147245608687 0) (0.0767062307286 -0.00143258609002 0) (0.0520824708236 0.00423762051025 0) (0.0330327150582 0.00489946549172 0) (0.0232321820205 0.00577326304416 0) (0.0112654810833 0.00339681847677 0) (0.00801063324752 0.0025517291708 0) (0.00659866302763 0.00195176102493 0) (0.00561718083757 0.00109763020206 0) (0.00353071554437 0.000340208795101 0) (0.00172616237056 -0.000152409998609 0) (0.000151473811004 -0.000608634199921 0) (-0.00160866509082 -0.000523428716584 0) (-0.00343061828593 -0.000251835097823 0) (-0.00459451701542 -0.000126704250626 0) (-0.00537349982066 -6.44494591276e-05 0) (-0.00587580958958 6.82738321407e-05 0) (-0.00619599069039 0.000145872457581 0) (-0.00639226938551 0.000200985729582 0) (-0.00646640744784 0.000276555654147 0) (-0.00656049521083 0.000349815352064 0) (-0.00647986251861 0.000429370122165 0) (-0.00618935810515 0.000527775173266 0) (-0.00599690495615 0.000694030220713 0) (-0.00488892290213 0.000546038429638 0) (-0.00465057998988 0.000514050443574 0) (-0.0032489199788 0.000290680414819 0) (-0.00360336703175 0.000523307697978 0) (-0.00162948934484 0.000364891725623 0) (-0.00123308256235 0.000662592577062 0) (8.47686497635e-05 0.000438633682561 0) (0.000363886794509 0.000540273121875 0) (0.000640738028619 0.000556564648655 0) (0.000781400751181 0.0004355680184 0) (0.00123029977628 0.000434883401638 0) (0.00196581180829 0.000322412811522 0) (0.0027332865375 1.35588213028e-05 0) (0.00314235623424 0.000125083973047 0) (0.00351576868707 0.000470816508735 0) (0.0040950668965 0.000478663862463 0) (0.00470166738976 0.000598656821662 0) (0.00539669637742 0.00108229548946 0) (0.00595508466884 0.00123909060561 0) (0.00616539530026 0.000893908550977 0) (0.00694728535612 0.000551401772887 0) (0.00736997101508 0.000715230929866 0) (0.00732713312043 0.00035004946584 0) (0.00647477370912 -0.00142306232557 0) (0.00433557628125 -0.0017836243633 0) (0.00493560486049 -0.00253024384825 0) (0.00507533756837 -0.00304950103624 0) (0.00467038412417 -0.00301657449154 0) (0.00457404374259 -0.0034506100323 0) (0.00551659981614 -0.0049261229114 0) (0.00377999284694 -0.00268459647582 0) (0.00523949831763 -0.00352906194264 0) (0.0114692431039 -0.00575525265411 0) (0.0167801255365 -0.00848230535104 0) (0.0428425349552 -0.0377510822649 0) (0.0530719583962 -0.0597797557427 0) (0.0665632977557 -0.0564349381156 0) (0.072713770576 -0.0412306595728 0) (0.0754835645485 -0.0266459984896 0) (0.0820386764819 -0.023494038545 0) (0.0930799462976 -0.0229718946 0) (0.105588554703 -0.0151831688809 0) (0.115407532521 -0.0068870069925 0) (0.124301062907 0.00178813550639 0) (0.131507183492 0.0105951408898 0) (0.136836148446 0.0194676463821 0) (0.140208974001 0.0283570852037 0) (0.141731218038 0.0371279980775 0) (0.141673074077 0.0453329907706 0) (0.14025478704 0.051965401591 0) (0.137641164552 0.0557681781434 0) (0.133691735275 0.055509177862 0) (0.128129841963 0.051646451603 0) (0.12061792611 0.0440637267905 0) (0.11164869798 0.0341196580203 0) (0.101586954654 0.0226444102692 0) (0.0914139325771 0.0101064497688 0) (0.08250310631 -0.00222768707496 0) (0.0743148268752 -0.0126782559817 0) (0.0658985878128 -0.016763215033 0) (0.0572709339077 -0.0157970006094 0) (0.047546320835 -0.0125624726014 0) (0.0361055090073 -0.00704469719093 0) (0.0249926694783 -0.00474596572313 0) (0.0161004445766 -0.0047157864775 0) (0.0096490782739 -0.00508199892722 0) (0.00398894082373 -0.00423964477454 0) (0.000481901578192 -0.00267859754579 0) (-0.00150275589525 -0.00352161182574 0) (-0.00340260014646 -0.00304191141747 0) (-0.00449976160944 -0.00174476714312 0) (-0.00508631660792 -0.000881423952553 0) (-0.0054663206061 -0.000688688235294 0) (-0.00602092036846 -0.000716941437906 0) (-0.00626980074888 -0.00061215422846 0) (-0.00652846766638 -0.000371799173116 0) (-0.00656424110988 -5.51701775653e-05 0) (-0.0064720625887 0.000326825908292 0) (-0.00603057345832 0.000559609630256 0) (-0.00605534323849 0.000812907706743 0) (-0.00566990687119 0.00099230511653 0) (-0.00522456346881 0.00104749790903 0) (-0.00457689587978 0.0010059261208 0) (-0.0039075367334 0.0012727220313 0) (-0.00251467181008 0.00160214477454 0) (-0.000981590952413 0.00280215845721 0) (0.000129962347285 0.000748131725398 0) (0.00035018454787 0.000893204588496 0) (0.000558141132531 0.00093023633768 8.00421508867e-29) (0.00120103528524 0.00112342727956 -8.98209789896e-29) (0.00207495396531 0.00141619411794 -1.08903585393e-28) (0.00237309351379 0.00112749529029 1.0339990213e-28) (0.00244086501576 0.000522120972717 -1.04912114675e-28) (0.00282212270503 0.00068784863099 1.29547769422e-28) (0.00336307621934 0.00106330951841 0) (0.00403575047442 0.00121219359749 0) (0.00480733952877 0.00139830127652 0) (0.0052759849292 0.00170337528595 0) (0.00568281530918 0.00170633483995 0) (0.00580647891855 0.00137013497779 0) (0.00587332904135 0.000373313567371 0) (0.00569898403332 -0.00141464984052 0) (0.00265539797353 -0.00152924698062 0) (0.00265519064875 -0.00179917275116 0) (0.00279237736776 -0.00201068819894 0) (0.00302347006822 -0.00197876410292 0) (0.00396792018548 -0.00256844556172 0) (0.00562811715389 -0.00391943915104 0) (0.00387664796068 -0.00217976184671 0) (0.0043811210033 -0.00181023321305 0) (0.00751852556179 -0.00149862742629 0) (0.0176168599462 0.00148467739447 0) (0.0485483574797 -0.00072306349957 0) (0.0616877716074 -0.0116968213001 0) (0.0723931283994 -0.0329871856686 0) (0.0809776687684 -0.0393248699361 2.17159040024e-27) (0.0899694976669 -0.0305241886492 -1.75003243596e-27) (0.0939816481592 -0.019636223708 0) (0.0957653967137 -0.0129643578936 0) (0.0992159322673 -0.0115650223461 0) (0.105098473561 -0.0104695310091 0) (0.110780427366 -0.00611669534923 0) (0.114901161531 -0.00146800108983 0) (0.118034531426 0.00314357209169 0) (0.119942768625 0.00722025387214 0) (0.120645206997 0.010393064974 0) (0.120181820617 0.0123788247154 0) (0.118579661529 0.0129409863698 0) (0.115799209511 0.0119261130477 0) (0.111781879155 0.009294792086 0) (0.10636426052 0.00525314970298 0) (0.0995210386381 0.000454550248909 0) (0.0913308993274 -0.00448423998355 0) (0.082092709984 -0.00875798519835 0) (0.0718456788572 -0.0126773308925 0) (0.0615464045589 -0.0157798975033 0) (0.05223041895 -0.0177638860337 0) (0.0444259969889 -0.018600967972 0) (0.038057182562 -0.0180621795329 0) (0.0325955003277 -0.0167651847439 0) (0.0276735655551 -0.0152700596683 0) (0.0231254037524 -0.0136665747508 0) (0.0183451142282 -0.0125860434105 0) (0.0132553060357 -0.0113733439269 0) (0.00791705669264 -0.00938985856665 0) (0.00433848768254 -0.00749008310959 0) (0.00188502343856 -0.00588920539025 0) (-0.000258742331126 -0.00496376854402 0) (-0.00220213810057 -0.00464296418993 0) (-0.0036332530765 -0.00356972524926 0) (-0.00425580506115 -0.00179595932573 0) (-0.0050236953013 -0.00112805003103 0) (-0.00557317697537 -0.000973255392548 0) (-0.00585803839817 -0.000870111180948 0) (-0.00606377360355 -0.000586087865305 0) (-0.00616440595252 -0.000181793814037 0) (-0.00618695951419 0.000225824628353 0) (-0.00627742036582 0.000535011090614 0) (-0.00654654675318 0.00073742201223 0) (-0.00658595776509 0.00114402365977 0) (-0.00614557789086 0.00164408964579 0) (-0.00545159491231 0.00183087657292 0) (-0.00466812855988 0.00188927014426 0) (-0.00393113508983 0.00245236814581 0) (-0.00300221855981 0.00383941537915 0) (-0.000607003651093 0.0041660433249 0) (0.00013988639359 0.00120127526668 0) (0.000110321699915 0.000678616681475 0) (0.000518872659164 0.00156263324843 0) (0.0014620976237 0.00200613139242 0) (0.001592933541 0.00146368521775 0) (0.000524280951307 0.000311606842183 0) (0.000585127244693 0.00032004204973 0) (0.00127141366723 0.000998717779484 0) (0.00285220046953 0.00197449976742 0) (0.00353054975439 0.00200784715899 0) (0.00450211523909 0.00222932544466 0) (0.00477921436903 0.00211885812299 0) (0.00491083701644 0.00131830928089 0) (0.00450664356039 -0.000122812936064 0) (0.00300886453418 -0.00106065395741 0) (0.00310603577295 -0.00162394214967 0) (0.00306132836354 -0.00199240835104 0) (0.00278660949247 -0.00198874322048 0) (0.00292624027899 -0.00202705423801 0) (0.00424975615793 -0.0026279384495 0) (0.00460986794078 -0.00190758099854 0) (0.00516025675758 -0.00166577124398 0) (0.00596192965427 -0.00108155718611 0) (0.0103311781991 0.00185475153223 0) (0.0292949870389 0.011550147546 0) (0.0437452647365 0.0200001319987 0) (0.0611818043756 0.0187677558938 0) (0.0704456054773 0.00447563635205 0) (0.0815943199294 -0.00280529543132 0) (0.0911263836157 -0.000528557137195 0) (0.0976003662114 0.00750547917856 0) (0.100279709569 0.0147901612624 0) (0.101515826713 0.0185561800104 0) (0.103651678914 0.0193767193306 0) (0.107050697849 0.0200403082115 0) (0.110430867187 0.0213802946353 0) (0.113231508202 0.0218237304372 0) (0.115451716147 0.0209897399948 0) (0.116727169156 0.0186122838025 0) (0.116767005445 0.014650848439 0) (0.115320423453 0.00921570389194 0) (0.112221890222 0.00251947163954 0) (0.107420762724 -0.00514500394662 0) (0.100991202385 -0.013384960438 0) (0.0931654901923 -0.0216771559437 0) (0.0842094749708 -0.0294763960361 -5.27416505285e-28) (0.0744667993869 -0.0360938030446 5.21891935928e-28) (0.0643125149175 -0.0412078203653 0) (0.0542624848128 -0.0445845053699 0) (0.0447053604201 -0.0465830760909 0) (0.0361262784914 -0.0477181037773 0) (0.0289102998145 -0.0478235561342 0) (0.022955190328 -0.0463731061321 0) (0.0179192653527 -0.0431429478645 0) (0.0135590582675 -0.0372728019436 0) (0.00965710888854 -0.0288148991205 0) (0.00616240203955 -0.0184284421671 0) (0.0035591121006 -0.0118167290924 -3.7510334412e-28) (0.00191150594136 -0.00801355093576 3.00180615396e-28) (0.00105979056496 -0.00616861539604 0) (0.000177664149596 -0.00492003943851 0) (-0.000923262757995 -0.00412233062794 0) (-0.0023044201424 -0.00373717098054 0) (-0.00380544342127 -0.00314827881129 0) (-0.00468255031826 -0.00207971749 0) (-0.00495049423377 -0.00152300878557 0) (-0.00529130158646 -0.00128666770663 0) (-0.00562598344154 -0.00112717351625 0) (-0.00590197778424 -0.000833374087671 0) (-0.00623605408277 -0.000422186372933 0) (-0.00653178684061 -3.35027432385e-05 0) (-0.00683087181615 0.000274397080484 0) (-0.00683796843712 0.000829978455742 0) (-0.00615941097891 0.0016316386698 0) (-0.00562808739372 0.00228805781431 0) (-0.00500439535786 0.00276107787727 0) (-0.00401822616265 0.00300597869374 0) (-0.00259006534938 0.0029896865648 0) (-0.00219854530725 0.00450951515557 0) (-0.000544253459019 0.00566557701014 0) (-4.55619633163e-06 0.00106771141909 0) (2.5891124101e-05 0.000814161705223 0) (0.000666477706674 0.00262682248217 0) (0.00115130410063 0.00211268633716 0) (0.000743665634853 0.00086805002233 0) (0.000483903636296 0.000369568827835 0) (0.000734971073842 0.000761277084255 0) (0.00214167116473 0.0024164714372 0) (0.00336093441606 0.00296858557233 0) (0.00374682321043 0.00250262660363 0) (0.00383555076375 0.00212279589129 0) (0.0035928585809 0.00103386711846 0) (0.00292821603735 -0.000361110626139 0) (0.00272825176751 -0.00103474188141 0) (0.00325004599191 -0.00173202303921 0) (0.00362514380129 -0.00221414056601 0) (0.00379680591639 -0.00205639454497 0) (0.0039759346648 -0.00171160436217 0) (0.00545098215275 -0.00166514593691 0) (0.004477907498 -0.0011804275479 0) (0.00498692163805 -0.00140862306693 0) (0.0063475695466 -0.00158664276235 0) (0.00986297012597 0.00328757823378 0) (0.0319246942347 0.0137550345157 0) (0.0464375592291 0.0139493659024 0) (0.0601081847152 0.0178756010213 0) (0.0693284048376 0.0159384674702 0) (0.0778974311348 0.011255276531 0) (0.0872879198124 0.0105413316057 0) (0.0946915157677 0.0149700190507 0) (0.0990108151076 0.0216139851656 1.11248692872e-27) (0.100855254911 0.0269215202147 -9.84271487958e-28) (0.101942959589 0.029433792011 0) (0.103653293318 0.0296984239975 0) (0.10604684493 0.0290688109985 0) (0.108399069428 0.0278068023642 0) (0.110297359851 0.0253381898276 0) (0.111466221527 0.0216359266299 0) (0.11152169465 0.0167760521396 0) (0.110196968919 0.0109360828134 0) (0.107356801952 0.00434410731844 0) (0.102998433628 -0.00273112039097 0) (0.0972249744329 -0.00996368428487 0) (0.0902036412548 -0.0169647474164 0) (0.0821400225945 -0.023302495789 0) (0.0732916344963 -0.0286214412333 0) (0.0639496176853 -0.0327468603568 0) (0.0545423267561 -0.0357834169152 0) (0.045542607025 -0.0381102244245 0) (0.037425095775 -0.039931392932 0) (0.0304091505367 -0.0412644229227 0) (0.0246799282145 -0.040909571536 0) (0.0200342479462 -0.0384477823138 0) (0.0159460719694 -0.0339412911706 0) (0.0120269661652 -0.0272433494087 0) (0.00812662271316 -0.0195098951632 0) (0.00434228439041 -0.0110035261501 0) (0.00241241156591 -0.00732459492729 0) (0.00106499556639 -0.00560005546912 0) (9.52746362402e-05 -0.0046919570834 0) (-0.000809526420122 -0.00425988704829 0) (-0.0017357639504 -0.0041950061558 0) (-0.0027771256536 -0.00375181061089 0) (-0.00420807016963 -0.002898630528 0) (-0.00469603867013 -0.0019815231241 0) (-0.00498606346989 -0.00149625908952 0) (-0.00524525005916 -0.00147808733239 0) (-0.00551510798432 -0.00143811727776 0) (-0.00582794346569 -0.00123139426705 0) (-0.00626357289877 -0.00090388453314 0) (-0.00682320701006 -0.000493455051123 0) (-0.00703002308329 0.000296200442388 0) (-0.00642846627172 0.00140706837089 0) (-0.00601556042833 0.0023374674492 0) (-0.00550338830443 0.00311046559107 0) (-0.00482100015004 0.00380366597663 0) (-0.00368249131238 0.00394642094125 0) (-0.00261735255186 0.00412459412343 0) (-0.00200419546514 0.00598765497575 0) (-0.000310499859668 0.00662137359192 0) (5.70839740851e-06 0.000967252669129 0) (8.05561859376e-05 0.00102890384137 0) (0.000714798281843 0.00297511427869 0) (0.00073308914781 0.00162800092523 0) (0.000429685838051 0.000553072833697 0) (0.000495983987862 0.000515924086463 0) (0.001303435931 0.00169585670523 0) (0.00323089901581 0.00373256111549 0) (0.003334773207 0.00305378393857 0) (0.00324712048978 0.00208300154648 0) (0.00277960645588 0.00117341484985 0) (0.00197662911173 -3.93333176736e-05 0) (0.00209548654695 -0.000709451238751 0) (0.00265901513901 -0.00126128937353 0) (0.00315851002229 -0.00161534674679 0) (0.0037997560405 -0.00178170757368 0) (0.00439523447858 -0.0013954537706 0) (0.00583693924373 -0.000751307866443 0) (0.00397437698656 -0.000320948254496 0) (0.00457335394643 -0.0003495960935 0) (0.00641497024241 0.000660802696987 0) (0.00784996833836 0.00613976740877 0) (0.0287134565417 0.0358855816778 0) (0.045015020901 0.03991086177 0) (0.0579393886126 0.0328311357854 0) (0.0669393931268 0.0269202475416 0) (0.0740761406837 0.0248261615103 0) (0.0814145774934 0.0231686684658 0) (0.088608785518 0.0243476615412 0) (0.0940243635136 0.0285005771034 0) (0.0971694200641 0.0333262447716 0) (0.0988100421892 0.0367402593839 0) (0.100105166973 0.0378956270557 0) (0.101808716729 0.0371467588799 0) (0.103821836964 0.0351714668908 0) (0.105660594829 0.0320808782072 0) (0.106980473063 0.0277049939403 0) (0.107486473906 0.0221030815451 0) (0.10688596468 0.0153798581891 0) (0.10498317249 0.00769213051134 0) (0.101667780627 -0.000742742894428 0) (0.0968971431785 -0.00962502509582 0) (0.0906877828317 -0.0185715053132 0) (0.08314055084 -0.0271497790414 0) (0.0744732230908 -0.0349544145962 0) (0.065068051245 -0.0416618662919 0) (0.0554750150267 -0.0470974964448 0) (0.0462562642081 -0.0511142717078 0) (0.0379341496184 -0.0534826893966 0) (0.0308351073648 -0.0541259999894 0) (0.0251184709475 -0.0526363709394 0) (0.0205727870676 -0.0489622805064 0) (0.0170175050748 -0.0432703702264 0) (0.0140999911082 -0.035984292172 0) (0.0113798740598 -0.0277612909209 0) (0.00852655180116 -0.0191988164727 0) (0.00566413414535 -0.01157338693 0) (0.00376466475776 -0.00754663857505 0) (0.00233841964469 -0.00555896710758 0) (0.00131813963778 -0.00497553287927 0) (0.000835936961563 -0.0059121951725 0) (0.000889213609418 -0.00796767830167 0) (-0.000576184172074 -0.00790049143315 0) (-0.00348485760148 -0.00513737523902 0) (-0.0034207426739 -0.00149040563069 0) (-0.00409292482588 -0.00156014469272 0) (-0.00464093441683 -0.00169114682719 0) (-0.00522048545837 -0.00179490248031 0) (-0.00575385163961 -0.00173856129634 0) (-0.00654446442153 -0.00155612543074 0) (-0.00718224407097 -0.000812372034673 0) (-0.00680186278805 0.000611087458595 0) (-0.00639319223405 0.00186103317837 0) (-0.00617448274205 0.00285725428842 0) (-0.00559849101389 0.00383877513033 0) (-0.00498159116895 0.00477790259945 0) (-0.00371982669529 0.00477396779452 0) (-0.00275100461636 0.00504089997299 0) (-0.00213025281762 0.00702281399955 0) (-0.000396256400714 0.00761637890678 0) (5.36822076012e-05 0.00106707810581 0) (0.000299484671884 0.00154146539254 0) (0.0010996853832 0.0033524529768 0) (0.00104022960371 0.00229893678117 0) (0.000463812450428 0.000595529976847 0) (0.000862023234585 0.00110956459235 0) (0.00255481922836 0.00346932362235 0) (0.00326341097117 0.00389485889292 0) (0.00304432217461 0.0024822814479 0) (0.00212752726083 0.00108571727427 0) (0.00297097821431 0.000365091391024 -4.36368931491e-28) (0.00203487029193 -0.000505830691494 1.60229751278e-28) (0.00261495402804 -0.000989822851401 0) (0.00285680762881 -0.00127681388822 0) (0.00341376094489 -0.00151631490522 0) (0.00419146556221 -0.00141932314596 0) (0.00552605165029 -0.000746836431764 0) (0.00334875093802 -8.13259116485e-05 0) (0.0037984015214 -1.07371974114e-05 0) (0.00509993105806 0.0011540230563 0) (0.00571245876199 0.0043388252757 0) (0.0116172529777 0.0224004679185 0) (0.0391775129529 0.0613848838646 0) (0.051869220657 0.0636223269367 0) (0.0621848437814 0.0449679641104 0) (0.0698872084906 0.0380712207782 0) (0.0760684951784 0.035521808052 0) (0.0821581407974 0.0345916897296 0) (0.0876971740479 0.0358268476349 0) (0.0918400458155 0.0387796920563 0) (0.0944573859575 0.0417635825167 0) (0.0961814126891 0.0434414613071 -7.82158478531e-28) (0.0977500081292 0.043259810924 7.12692922299e-28) (0.0995390073456 0.0413927229598 0) (0.101389051828 0.0381621613862 0) (0.102942626191 0.0336115742978 0) (0.103902299298 0.0277039842432 0) (0.103991048781 0.0205183271725 0) (0.102949789479 0.0121878140559 0) (0.100575943866 0.00292002010683 0) (0.096726288115 -0.00698953675078 0) (0.0913355678632 -0.0171622583703 0) (0.0844552220007 -0.0271704748246 0) (0.076295240485 -0.0365884485008 0) (0.0672416244865 -0.0450280682317 0) (0.0578135802124 -0.0521430578997 0) (0.0485890107752 -0.0575942546088 0) (0.0400831208836 -0.0610734810341 0) (0.0326824358753 -0.0622164334769 0) (0.0266527915833 -0.0608653464905 0) (0.0220795229171 -0.057086894651 0) (0.018947145207 -0.0513801591473 0) (0.017055631832 -0.0442989691535 0) (0.0161138739896 -0.0365494026977 0) (0.015652290046 -0.0289966144647 0) (0.0152345488856 -0.0224149328869 0) (0.0147342980559 -0.0171165005466 0) (0.0142790759865 -0.0133541542928 0) (0.0138806773218 -0.0112837759667 0) (0.0132926994111 -0.0104374440454 0) (0.012321529227 -0.0102963665656 0) (0.0107485423903 -0.0105657893602 0) (0.00792354498459 -0.0107703612307 0) (0.00320687948639 -0.0104034449591 0) (-0.00159020229877 -0.00229424457333 0) (-0.00283425612597 -0.00233104098702 0) (-0.00404579557315 -0.00257463571175 0) (-0.00515149178689 -0.00272896611617 0) (-0.00612174687653 -0.00268386601364 0) (-0.00701653762854 -0.00222403420312 0) (-0.00725908342255 -0.000813474422475 0) (-0.00683942464825 0.000853180149554 0) (-0.00683087222944 0.00212881575214 0) (-0.00654355739928 0.0033048031956 0) (-0.00605437130812 0.00456245897118 0) (-0.00525226930227 0.00544621251592 0) (-0.00428024344922 0.00587002655623 0) (-0.00294187530219 0.00602293298889 0) (-0.00228022826556 0.00793824610075 0) (-0.000511892697317 0.00883930968733 0) (8.14392713123e-05 0.00127798244686 0) (0.000579418536194 0.00228400701046 0) (0.00140112282093 0.00319949760253 0) (0.000514858859541 0.000960372987609 0) (0.000484052774677 0.000744503440411 0) (0.00145856177212 0.00229242309313 0) (0.00260112144513 0.00379559493782 0) (0.00324991900211 0.00392479459999 0) (0.00235205365488 0.0015377206869 0) (0.00253184350442 0.000865250684689 0) (0.00187255246733 6.61460241903e-05 0) (0.00250561123243 -0.000597581777845 0) (0.0027644177829 -0.000813054986054 0) (0.00291844163684 -0.000940224021992 0) (0.00373661625691 -0.00095211787155 0) (0.00515040953339 -0.000383832410577 0) (0.00302813983228 0.000255104187054 0) (0.00320320929019 0.000278096752706 0) (0.00385183538804 0.00116633146768 0) (0.00629685596482 0.004599043642 0) (0.00571566956666 0.00951294942323 0) (0.0219333653587 0.0775887069276 0) (0.0455687073647 0.092283498508 0) (0.0544582183526 0.0763126571461 0) (0.0635776507171 0.0557316347722 0) (0.0705267574132 0.048453110963 0) (0.0759451330539 0.0455146648786 0) (0.0810405951493 0.0445978103794 0) (0.0854902415842 0.0453647519194 0) (0.08891154595 0.0471235305188 0) (0.0913485002385 0.0486162112012 0) (0.093262275354 0.0489042442918 0) (0.0950984339602 0.0475756208437 0) (0.0970103091582 0.0446754842103 0) (0.098813323638 0.040338979779 0) (0.100210029683 0.0345837148991 0) (0.100923979979 0.0274268989525 0) (0.100689136907 0.0189646401121 0) (0.0992636964599 0.00935461031665 0) (0.0964598114091 -0.00117055840843 0) (0.0921670901137 -0.0123005168325 0) (0.0863878804996 -0.0236596944985 0) (0.0792720490004 -0.0348269247298 0) (0.0711289697923 -0.0453465696738 0) (0.0624001962825 -0.0547246195665 -4.01080611429e-28) (0.0535950247092 -0.0624256278338 3.97773460645e-28) (0.0452180455983 -0.0678871967415 0) (0.0377130201691 -0.070593278087 0) (0.0314721356406 -0.0701580798241 0) (0.0267693874975 -0.0664733037415 0) (0.0237405711326 -0.0599535565413 0) (0.0223517243257 -0.0514995751294 0) (0.0224998510974 -0.0421201236196 0) (0.0236899996916 -0.0325296404688 0) (0.0253700648737 -0.0236076074662 0) (0.0270558296526 -0.0161915980719 0) (0.0283343321953 -0.0108842081529 0) (0.0289054594717 -0.0078731781121 0) (0.0285885211573 -0.00682916155361 0) (0.0273081878065 -0.00728008719312 0) (0.0250954885358 -0.00876169526239 0) (0.0219504368709 -0.010703704169 0) (0.0177163937268 -0.0123311067355 0) (0.0115422676141 -0.0128174326477 0) (0.00219959639054 -0.00494248866994 0) (-0.00170884320623 -0.00399323501841 0) (-0.00342514261044 -0.00397104860592 0) (-0.00500090692845 -0.00407222885663 0) (-0.00628161769467 -0.00370061297931 0) (-0.00718867397168 -0.0026810770603 0) (-0.00737001468321 -0.000853188966553 0) (-0.00734226440331 0.000841612172992 0) (-0.00747778114316 0.00224866483731 0) (-0.00718833458285 0.0036963003787 0) (-0.0067515546623 0.00518973965702 0) (-0.00585956744894 0.00617889061836 0) (-0.00498326440823 0.00701099073608 0) (-0.00339000689187 0.00735603599597 0) (-0.00229599973651 0.00890760956372 0) (-0.000422947994602 0.0101690550977 0) (9.57485592453e-05 0.00154521111127 0) (0.000901374471182 0.00326232310506 0) (0.00130007368066 0.00295922586802 0) (0.000595941479481 0.00103394896239 0) (0.000806588342642 0.00124881715074 0) (0.00227835452959 0.00373515858166 0) (0.00233020480063 0.00406060482799 0) (0.00326539059765 0.00369859233631 0) (0.00175383428013 0.0010425428034 0) (0.00395728479892 0.000954931664139 0) (0.00228177419451 -5.89467097076e-05 0) (0.0027707974756 -0.000232397012282 0) (0.00281894278292 -0.000389885207557 0) (0.00317234322584 -0.000375303178576 0) (0.0042936671239 0.000269314845778 0) (0.00505573284509 0.000979213793239 0) (0.0029320468309 0.000688485030704 0) (0.00323104272899 0.0013522509348 0) (0.00397777478033 0.00335507196538 0) (0.00542722149701 0.0082683854386 0) (0.00634981892865 0.0197873680036 0) (0.0260288148594 0.111599190415 0) (0.0437573469688 0.125869763577 0) (0.0525904298433 0.0901044006196 0) (0.0622374452135 0.0679173602474 0) (0.0688771539516 0.0596548304323 0) (0.0739214752068 0.0559993563016 0) (0.0784659395328 0.05452727625 0) (0.0823851151343 0.0544277208032 0) (0.0855578983923 0.0549021916482 0) (0.0880939236672 0.0549643015915 0) (0.0903050956082 0.0539057204668 0) (0.092436053684 0.0513957010226 -6.08638131013e-28) (0.0945048480219 0.0474076854058 5.61972326977e-28) (0.0963129009784 0.0419846474488 0) (0.0975947697953 0.0351303033771 0) (0.0980962042652 0.0268696839685 0) (0.0975805014588 0.0172823774926 0) (0.0958482777208 0.00650370217474 0) (0.09276315596 -0.00525783735271 0) (0.0882772312723 -0.0177056083528 0) (0.0824596130892 -0.0304438249431 0) (0.0755162429266 -0.0429679586326 0) (0.0677855293817 -0.0546582040303 0) (0.0597092471076 -0.0647943318759 0) (0.0517755198636 -0.0726149399415 0) (0.0444750908057 -0.0774124924495 0) (0.0382497069187 -0.0786549381344 0) (0.0334609614414 -0.076107503663 0) (0.0304003558256 -0.0698720139423 0) (0.0291500922091 -0.0605902429126 0) (0.0296126597899 -0.0493829958642 0) (0.0314482828782 -0.0378456286915 0) (0.0343470995043 -0.0269306495 0) (0.0374756688803 -0.0175503865842 0) (0.0401741624726 -0.0103667167835 0) (0.0419690138335 -0.00570238753054 0) (0.0424572712326 -0.0036534652043 0) (0.0414369601752 -0.00393195700922 0) (0.0389433770252 -0.00600675364953 0) (0.0351811403942 -0.00916609872606 0) (0.0305750512267 -0.01252968855 0) (0.0253925401085 -0.0152298626441 0) (0.0192729997562 -0.0163233218869 0) (0.0110238720623 -0.0136961013367 0) (0.00135556894208 -0.00486748031458 0) (-0.0029831318738 -0.00546229003404 0) (-0.00510230327129 -0.00617114555895 0) (-0.0067863599891 -0.00507680722983 0) (-0.00760662216688 -0.00324500739436 0) (-0.00790238495061 -0.00116530877182 0) (-0.0082386648124 0.000615204866408 0) (-0.00836579738131 0.00229428136111 0) (-0.00806919759532 0.00404284064296 0) (-0.0075171382021 0.00569706545293 0) (-0.00671419368992 0.00700928903579 0) (-0.00562783302137 0.00814759921607 0) (-0.00399346071852 0.00907085711196 0) (-0.00233235285787 0.0103125465987 0) (-0.000229852700497 0.0114116084246 0) (0.000131159345187 0.00196034037144 0) (0.00131057674878 0.00446811347191 0) (0.00118477491914 0.00244161485994 0) (0.000650563564125 0.00102348319158 0) (0.00151072859288 0.00228988600282 0) (0.00165117881602 0.00290240178397 0) (0.00219242094701 0.00442344120157 0) (0.00282556697762 0.00303673320507 0) (0.001542331282 0.000884849801643 0) (0.00281273788005 0.000651588387824 0) (0.00244804804244 7.78236715102e-05 0) (0.00275046407608 0.000177516427145 0) (0.00275333973544 0.000140004799164 0) (0.00337267242385 0.000469831844759 0) (0.00496284570834 0.00181152789934 0) (0.00259062092874 0.00123287399506 0) (0.00261408101065 0.00140453621546 0) (0.0030477326127 0.00256811659998 0) (0.00388370698867 0.00588201943183 0) (0.00349327370207 0.0106517822704 0) (0.00699394380922 0.0370010884603 0) (0.03104449994 0.145883330317 0) (0.0388449310193 0.148667280372 0) (0.0478232184538 0.103951388857 0) (0.0584994759053 0.0804782500526 0) (0.0654581528575 0.0707925617747 0) (0.0706190240892 0.0660150432467 0) (0.0750916589439 0.0635270788397 0) (0.0789474633511 0.0622520681722 0) (0.0822151344749 0.0613542275479 0) (0.085017711084 0.0600242104766 0) (0.0875523308329 0.0576989495664 0) (0.0899320119479 0.0540975616393 0) (0.0921009353264 0.0491468119106 0) (0.0938668806845 0.0428245120888 0) (0.0950034494029 0.0350956282001 0) (0.0952999621518 0.0259435078014 0) (0.0945723346017 0.0153927984879 0) (0.092678817989 0.00353047077656 0) (0.0895379090974 -0.00945902013532 0) (0.0851488876633 -0.0232568460115 0) (0.0796155511598 -0.0373780793775 0) (0.0731641390444 -0.0511543331454 0) (0.0661433570358 -0.0637458467389 0) (0.0589996393803 -0.0742041902297 0) (0.0522286003319 -0.0815943578301 0) (0.0463011705709 -0.0851534380566 0) (0.0416310624553 -0.0844148451931 0) (0.0385041139807 -0.079340537332 0) (0.0370830670202 -0.0703047074511 0) (0.0374164615619 -0.0582014625729 0) (0.0393201577099 -0.0444458895401 0) (0.0424626065243 -0.0308086291841 0) (0.0462767784538 -0.0190698242877 0) (0.0502569299656 -0.00989449461898 0) (0.0533179716626 -0.00389263693767 0) (0.0548601363599 -0.00115297388467 0) (0.0545763717785 -0.00142155254502 0) (0.052282469529 -0.00423576144854 0) (0.0480806623579 -0.00876135815264 0) (0.0424038533061 -0.013892693913 0) (0.0358820514559 -0.0183760749088 0) (0.0292295055793 -0.0208523750131 0) (0.0226776510415 -0.0202008283864 0) (0.0161332520145 -0.0164049242817 0) (0.00887802594065 -0.0125750737042 0) (0.000176134289726 -0.00537224201304 0) (-0.00474045121978 -0.00600980275064 0) (-0.0074684778141 -0.00649901394914 0) (-0.00828509811151 -0.00401343060016 0) (-0.00888910903228 -0.00173506641929 0) (-0.00939733792198 0.000269928056201 0) (-0.00947465458612 0.00231756873059 0) (-0.00913557760414 0.00439329203814 0) (-0.00844222023209 0.00624391739556 0) (-0.00759755025073 0.0079023024542 0) (-0.00627091044356 0.00940669762181 0) (-0.00457338355845 0.0107179365512 0) (-0.00265555271299 0.0118347329264 0) (-0.000285570315033 0.0124941740571 0) (0.000200066856754 0.00256328743541 0) (0.00142307720368 0.00527100348817 0) (0.000847591836446 0.00172199300884 0) (0.000883507993132 0.00136569159164 0) (0.00208921387263 0.00355430250733 0) (0.00126071650045 0.00291762682178 0) (0.0027183195682 0.00544436607205 0) (0.00230602468175 0.00222054959095 0) (0.00230490664584 0.00118638005076 0) (0.00225374615347 0.00073545781205 0) (0.00246718578721 0.000471012311611 0) (0.00265072415842 0.000586855462479 0) (0.00263559843074 0.000642855445608 0) (0.00360011463199 0.00146956011312 0) (0.00493347200206 0.00307724406954 0) (0.0022226219382 0.00162139908699 0) (0.00249784614042 0.00215494183674 0) (0.00299745961149 0.00375233272577 0) (0.00379786486664 0.00876573473616 0) (0.00289339697952 0.0155440927142 0) (0.00882611484996 0.0500418827361 0) (0.0314675042967 0.177559622508 0) (0.0297543221666 0.165710491993 0) (0.0412977831697 0.116393850419 0) (0.0534452255776 0.0914847041243 0) (0.0611389393189 0.0802568395361 0) (0.0667687020621 0.0742078055464 0) (0.0715005996752 0.0705636852119 0) (0.0755647712057 0.0681011356713 0) (0.0790786159274 0.0659805727316 0) (0.0821627122562 0.0635057171132 0) (0.0849401739238 0.0601981770911 0) (0.0874525051643 0.0557914318632 0) (0.0896211348809 0.0501585973855 0) (0.0912855253412 0.0432043065749 0) (0.0922728443001 0.0348270317551 0) (0.0924292593059 0.0249428039279 0) (0.0916275729139 0.0135156246407 0) (0.0897766697362 0.000598374039365 0) (0.0868345274099 -0.0136151360994 0) (0.082828006225 -0.0287391097843 0) (0.0778773639603 -0.0441565762726 0) (0.0722157404082 -0.0590080860995 0) (0.0661902139306 -0.0722284678607 0) (0.0602327106646 -0.0826530224696 0) (0.0548068087661 -0.0891960266887 0) (0.0503396858447 -0.0910654555077 0) (0.047168079606 -0.0879261916884 0) (0.0455314434808 -0.0799835708393 0) (0.0455311579473 -0.0680262007864 0) (0.0471388426544 -0.0532972042851 0) (0.0501956543083 -0.037547263416 0) (0.0542860202217 -0.0226879099803 0) (0.0587957416825 -0.0106093276808 0) (0.0628822666464 -0.00268655036271 0) (0.0659795898889 0.00110686679768 0) (0.0670747691971 0.000837598022973 0) (0.0658485082808 -0.00283402399863 0) (0.0622695430106 -0.00901170150955 0) (0.0564920501675 -0.0165629055756 0) (0.0489833683685 -0.0240495148832 0) (0.0404969082528 -0.0298511157193 0) (0.0317902360782 -0.0323240117695 0) (0.0234179045485 -0.0300722295451 0) (0.0157025844374 -0.0226778359494 0) (0.00884427358771 -0.012584117175 0) (0.00240022368638 -0.00555531486828 0) (-0.00350872187702 -0.00353730963737 0) (-0.00697379449426 -0.00520119958082 0) (-0.00934570822065 -0.00497840812729 0) (-0.0100925303942 -0.00251526849131 0) (-0.0106697191111 -0.000126231883056 0) (-0.0106819702482 0.00233999352322 0) (-0.0102888494691 0.00476464132743 0) (-0.00957304633596 0.00694517785307 0) (-0.0085583436985 0.00892775868374 0) (-0.0070502093502 0.0107442536703 0) (-0.0052974007587 0.0122768704293 0) (-0.00336657741673 0.0135184002607 0) (-0.000554044659114 0.0140303838855 0) (0.00023679882701 0.00333183783994 0) (0.00103001573183 0.00539585798018 0) (0.00073298270841 0.00184899429586 0) (0.00116124021506 0.00182330470426 0) (0.00113375890568 0.00219679173486 0) (0.000965841794018 0.00299557160957 0) (0.00319856680741 0.00638702483136 0) (0.00204107861398 0.00192593647611 0) (0.00337798974222 0.00186385649919 0) (0.00232239535586 0.00107285872224 0) (0.00246736333383 0.000895616291397 0) (0.00257910279676 0.000961858815928 0) (0.00260326124792 0.00109387316022 0) (0.00388875656737 0.00242974437691 0) (0.00350661468994 0.00300539229027 0) (0.00190111928694 0.00192874234096 0) (0.00229665974491 0.00276809748294 0) (0.00295070879512 0.00494141679283 0) (0.0036040952825 0.0116460728831 0) (0.00289913582312 0.0210736173707 0) (0.008513781616 0.0576858808471 0) (0.0208605691298 0.192647015755 0) (0.018410154684 0.177490244514 0) (0.0339132517261 0.126435904316 0) (0.0478375894729 0.100248812079 0) (0.056513102201 0.0876043559547 0) (0.0627856303395 0.0803781448109 0) (0.0679250020369 0.0756980615621 0) (0.072288435776 0.0722559122336 0) (0.0760544161184 0.0692130532521 0) (0.0793462003763 0.0659340900143 0) (0.0822525645326 0.0619750059532 0) (0.084791014023 0.0570509908664 0) (0.0868958864067 0.050970269041 0) (0.0884533087541 0.0435599126504 0) (0.0893474552136 0.0346477928614 0) (0.0894789235451 0.024089775931 0) (0.0887690331237 0.0118110661916 0) (0.0871668089311 -0.00213974116936 0) (0.0846618840046 -0.0175297231087 0) (0.0813039499658 -0.0338850337135 0) (0.0772236587301 -0.0504496157642 0) (0.0726437409683 -0.0661757387797 0) (0.067870704858 -0.0797740461928 0) (0.0632666815736 -0.0898537468385 0) (0.0592100330093 -0.0951678042605 0) (0.0560671497109 -0.0949202998396 0) (0.0541542042167 -0.0889893632736 0) (0.0537051561329 -0.0779655554486 0) (0.0548413814971 -0.0630915671116 0) (0.0575215882183 -0.0460953838149 0) (0.0614973721452 -0.0290033466729 0) (0.0663103225848 -0.0139616059396 0) (0.0712721999115 -0.00276281680638 0) (0.0755687849202 0.00332393647584 0) (0.0782474580125 0.00400539514253 0) (0.078860681772 0.000158884533079 0) (0.0768708169944 -0.00720684017193 0) (0.0722972640308 -0.0167359879555 0) (0.0654471590508 -0.0270137086377 0) (0.056832646945 -0.0364721739946 0) (0.0471466503296 -0.0435139922097 0) (0.037156177671 -0.0465576794214 0) (0.0273093793009 -0.0443818595885 0) (0.0178080810713 -0.0362302830562 0) (0.00903597358758 -0.0231781848276 0) (0.00187543130304 -0.00863847891673 0) (-0.00224758083103 0.00147231223454 0) (-0.00541165019354 0.000618079290959 0) (-0.00920834350822 -0.00306785776406 0) (-0.0115551774593 -0.00318166259927 0) (-0.0120394538232 -0.000611385988204 0) (-0.0118919180867 0.00236356759437 0) (-0.0114288563165 0.00513109845822 0) (-0.0106376055452 0.00760809674601 0) (-0.00963236426932 0.0100056040162 0) (-0.00800620500637 0.0121652831395 0) (-0.00608269701129 0.0139602938849 0) (-0.00404614011626 0.0155559140574 0) (-0.00073694396653 0.0162357654409 0) (0.000205362769004 0.00385959718228 0) (0.000556398791795 0.00515922228184 0) (0.000731791777071 0.00194357831259 0) (0.00123355481314 0.00207397822535 0) (0.000951982795106 0.00217371493574 0) (0.00132378473316 0.0038200122964 0) (0.00386011874235 0.00701661378411 0) (0.00161891205718 0.00158415741132 0) (0.0041857431545 0.00277785057019 0) (0.00232123667319 0.00136119846769 0) (0.00251425432889 0.00121656943059 0) (0.00254321217174 0.00128045903987 0) (0.00261786298393 0.00150182311689 0) (0.00409677178865 0.00337433793263 0) (0.00178849369677 0.00204456792755 0) (0.00164266726181 0.00216677223111 0) (0.00220925600693 0.00326786306831 0) (0.00306110810242 0.00611282282427 0) (0.00347800752409 0.0131665518136 0) (0.00335498328482 0.0213987024515 0) (0.00874826975018 0.0638587618671 0) (0.0113294719 0.205786232812 0) (0.00797626041299 0.187100971598 0) (0.0265099853453 0.134782764929 0) (0.0421144950618 0.107310307986 0) (0.0518159106951 0.0933942414867 0) (0.0587639729985 0.0851535445396 0) (0.0643352319417 0.0796302689861 0) (0.06898960709 0.0754498909162 0) (0.0729564496827 0.0717625043297 0) (0.0763736188393 0.0679523967585 0) (0.0793257705662 0.0635744768128 0) (0.0818364801195 0.0583068094459 0) (0.0838702686474 0.0518928785966 0) (0.0853614700045 0.0440920617172 4.13697419041e-28) (0.086245009403 0.0346765230667 -3.85707901974e-28) (0.0864681449933 0.023464099349 0) (0.0859954179168 0.0103671177067 0) (0.0848176085135 -0.00454751141345 0) (0.082965025303 -0.0209951693085 0) (0.0805209074041 -0.0384159231461 0) (0.0776237232008 -0.0559304800274 0) (0.0744529136622 -0.0723250224638 0) (0.0711994230827 -0.0860951103998 0) (0.0680516334029 -0.0956081418693 0) (0.0652246255764 -0.0994328738447 0) (0.063036144727 -0.0967954357621 0) (0.0618852723705 -0.0878906935011 0) (0.0621450135565 -0.0738136436879 0) (0.0640424686845 -0.0563193094334 0) (0.0675465877626 -0.0375770654172 0) (0.0723332911427 -0.0198963723764 0) (0.077791589511 -0.00549681509741 0) (0.083087175507 0.00382870695272 0) (0.0873232075163 0.00716871007732 0) (0.0896769377369 0.00452185292651 0) (0.0894878093139 -0.00295760805423 0) (0.0866506586953 -0.0135743185034 0) (0.0813043846751 -0.0257387333821 0) (0.0737791864169 -0.0378094034063 0) (0.0646709500659 -0.048315383209 0) (0.0546865546785 -0.0558599758233 0) (0.0444015369852 -0.0592653421041 0) (0.0341516892538 -0.0575446308046 0) (0.0238698745745 -0.0502972611801 0) (0.013445548383 -0.037490637431 0) (0.00388585756486 -0.0209395838225 0) (-0.0033704017695 -0.00428817967192 0) (-0.00537212976976 0.0066292055431 0) (-0.00858565748306 0.0050851418714 0) (-0.0119750288371 1.48326200801e-05 0) (-0.0136154108876 -0.000242543548865 0) (-0.0137862264257 0.00221524821746 0) (-0.0129949799585 0.00555586729028 0) (-0.0120309019841 0.00827039925683 0) (-0.0108977792178 0.0109918012867 0) (-0.00921559103016 0.0136493169076 0) (-0.0068893538126 0.0158356895437 0) (-0.00445697949118 0.0176564066193 0) (-0.000831055023818 0.0185164857613 0) (0.000236474232646 0.00445963447742 0) (0.000852427263632 0.00544996532087 0) (0.00141010238983 0.00387526386478 0) (0.000998864107993 0.00204310185622 0) (0.000902601152121 0.00232556165884 0) (0.00177940981233 0.0049304187864 0) (0.00422572231692 0.00686932618106 0) (0.00173209335542 0.00178713740032 0) (0.00478066212633 0.00370687782177 0) (0.00234946868636 0.00149722926389 0) (0.00255159479934 0.00145472604156 0) (0.0025027124148 0.00155488900935 0) (0.00258366650689 0.00189853699399 0) (0.00406158596659 0.00442895252244 0) (0.00161690178936 0.00226312223624 0) (0.00164220661941 0.00251518015302 0) (0.00227364547827 0.003824167236 0) (0.00333585651101 0.00742836402462 0) (0.0034444300848 0.0131123558837 0) (0.00390968856465 0.0219038266828 0) (0.00795865679268 0.0677938452942 0) (0.00405050063391 0.213692877554 0) (-0.000965499415068 0.195745053776 0) (0.0191585744888 0.142442587859 0) (0.0363441617382 0.113558351141 0) (0.0470398215098 0.0984299812909 0) (0.0546357266712 0.0892839281304 0) (0.0606153229527 0.0830566432322 0) (0.0655264277678 0.0783024868618 0) (0.069646535633 0.0741431471617 0) (0.0731380843477 0.0699542943674 0) (0.0760996054897 0.0652698166155 0) (0.0785749234132 0.0597255670228 0) (0.080562380601 0.0530097535369 0) (0.0820386881827 0.044830876314 0) (0.0829815213687 0.0349250743974 0) (0.083380939234 0.023093574577 0) (0.0832491430883 0.00925569227524 0) (0.0826339584661 -0.00648933349806 0) (0.0816307946643 -0.0238014127854 0) (0.0803789088761 -0.0420457996841 0) (0.0790257923804 -0.0602521206343 0) (0.0776589972945 -0.0770882415344 0) (0.0762304458962 -0.0908736194781 0) (0.0745829141872 -0.0997200758881 0) (0.0726500681959 -0.101944306049 0) (0.0707882089671 -0.0967556704267 0) (0.0697177353835 -0.0848148958482 0) (0.0701567958595 -0.0678677502139 0) (0.0725122037548 -0.0482014565472 0) (0.0767106912394 -0.0283387123673 0) (0.0822172661237 -0.0107889979959 0) (0.0882063837809 0.00222339269332 0) (0.0937179101128 0.00908228656356 0) (0.0977701614336 0.00915107367811 0) (0.0995947080311 0.0029424375999 0) (0.0986854047541 -0.00803181534606 0) (0.0949464693592 -0.0215069898672 0) (0.0888726010084 -0.0353998945284 0) (0.0811375176007 -0.0483934190357 0) (0.0722807824157 -0.0591460878839 0) (0.0629498774104 -0.0666263104468 0) (0.0536446074998 -0.0700545826844 0) (0.044472288868 -0.0689408838694 0) (0.0351335769881 -0.0629956585159 0) (0.0251821642711 -0.0524527262234 0) (0.0141157198432 -0.0373796703722 0) (0.00308691473781 -0.0187807734314 0) (-0.0058774852343 0.000392658672225 0) (-0.00911746058831 0.012845990097 0) (-0.0109191092988 0.0111096686913 0) (-0.014299754858 0.00604316644155 0) (-0.0152681611317 0.00395259076915 0) (-0.0153523395223 0.00596062006505 0) (-0.0143300697716 0.00894202961034 0) (-0.0126892592457 0.011946289582 0) (-0.0108785919051 0.0153551231954 0) (-0.00813879878844 0.0182408717027 0) (-0.00509098500715 0.0201592022885 0) (-0.000990258672737 0.0211275941163 0) (0.000203301978793 0.00506488204637 0) (0.0012101794301 0.00583857850243 0) (0.000791831022511 0.00215780040121 0) (0.000756527834002 0.00210883004881 0) (0.000627348921842 0.00251340859232 0) (0.00229118103212 0.00651304788226 0) (0.00395956797206 0.00612217067213 0) (0.00191280745649 0.00224221197282 0) (0.00495677330921 0.00413870311948 0) (0.00240987946028 0.00145608879957 0) (0.00254438526031 0.00162804444722 0) (0.0024499328787 0.0017928378092 0) (0.00255168574795 0.00229684380003 0) (0.00402565131977 0.00534953768734 0) (0.00158618446627 0.00253503568342 0) (0.00167960652115 0.00294384797742 0) (0.00241003654986 0.00461783657536 0) (0.00371247274724 0.00922217326782 0) (0.00339115036751 0.0131888280495 0) (0.00374441950371 0.0237414937793 0) (0.00600704896069 0.070142483149 0) (-0.00166795715742 0.217627585814 0) (-0.00886734580788 0.204746658346 0) (0.011559493099 0.150337411452 0) (0.0303819891624 0.119745890383 0) (0.0420722771769 0.103343777008 0) (0.0502934037267 0.093308043625 0) (0.0566620158501 0.0864267585422 0) (0.0618096517219 0.0811670335522 0) (0.0660621113543 0.0766062430514 0) (0.0696123096507 0.0720938615827 0) (0.0725807633755 0.0671337355623 0) (0.0750354403942 0.0613217841511 0) (0.0770054794883 0.0543028045357 0) (0.0785027078132 0.0457502325621 0) (0.0795422692426 0.0353808626078 3.48392732073e-28) (0.0801585493318 0.0229961910563 -3.25030468553e-28) (0.0804234629409 0.00853891641321 0) (0.0804674291058 -0.00784539858736 0) (0.0804889814147 -0.025754715808 0) (0.0807263606805 -0.0444933332137 0) (0.0813548988748 -0.0630519798955 0) (0.0823197176304 -0.0800755795767 0) (0.0831428776629 -0.093819586543 0) (0.0830001261489 -0.102163644549 0) (0.0813057838757 -0.103043851517 0) (0.078698176888 -0.0953488245222 0) (0.07677393085 -0.0804479161836 0) (0.0768972509818 -0.0609815214949 0) (0.0796057571146 -0.0396850882643 0) (0.0845548784451 -0.019283662175 0) (0.0908154970967 -0.0023970987845 0) (0.0972597080058 0.00876668318754 0) (0.102790596145 0.0128192949946 0) (0.106468860095 0.00953633678542 0) (0.107585116119 -1.87682398605e-05 0) (0.105891040899 -0.0138928456979 -2.02866907789e-28) (0.101523093184 -0.0295883666208 2.00305205572e-28) (0.0950843714932 -0.044625501554 0) (0.0876003283787 -0.0575007257938 0) (0.0798384786212 -0.0676678735961 0) (0.0722851901498 -0.0743843207366 0) (0.0653397406942 -0.0772947000693 0) (0.0590215012721 -0.0763248900275 0) (0.0529136210336 -0.0716776828454 0) (0.0462144781738 -0.0637608606969 0) (0.0380366635828 -0.0531233346536 0) (0.0275596855945 -0.0396514309328 0) (0.0154915401861 -0.0224541979487 0) (0.00359758661071 -0.00307492228939 0) (-0.00530382098124 0.0154124220677 0) (-0.0113021676752 0.0207926738217 0) (-0.0148045687203 0.0153642108426 0) (-0.0160034681019 0.0103089186004 0) (-0.0167988031273 0.0104460826763 0) (-0.0153854936648 0.013121470153 0) (-0.0130666236627 0.0172670223179 0) (-0.00974656575784 0.0208982277576 0) (-0.00610331832425 0.0231803319846 0) (-0.00125761790661 0.0243348723673 0) (9.33326270554e-05 0.00576238951803 0) (0.00102453382394 0.00623485286791 0) (0.00075105209703 0.00221161777161 0) (0.000772062862339 0.00236900651869 1.91957614148e-29) (0.000557819964023 0.00289657823338 -2.2014111193e-29) (0.00285221458023 0.00829815128649 0) (0.00305060572312 0.00508059542869 0) (0.00216730194058 0.00265805862139 0) (0.00295440262117 0.00241803457254 0) (0.00249771412589 0.00154214171169 0) (0.00237367723555 0.00180766610179 0) (0.00235269672049 0.00202248474771 0) (0.00257273141329 0.00275882064081 0) (0.0039151296921 0.00602280351012 0) (0.00155010566084 0.00282315743713 0) (0.00170951116517 0.00348813235465 0) (0.00253777142251 0.00570965545726 0) (0.00399038341268 0.0112843536463 0) (0.00336158573484 0.0150192002706 0) (0.00321215607284 0.0255889966562 0) (0.00425878804788 0.0718788402565 0) (-0.00589249824767 0.220363337943 0) (-0.0154397295417 0.213334914104 0) (0.00335291711842 0.159680975343 0) (0.0239601836345 0.126409617038 0) (0.0367690668442 0.108529132824 0) (0.0456413816576 0.0975294521341 0) (0.0524092046401 0.0899668201827 0) (0.0578001730972 0.0841961103376 0) (0.0621916830506 0.079235774169 0) (0.0658098885846 0.0743979404797 0) (0.0687997400874 0.0691527151028 0) (0.0712523417114 0.0630601602994 0) (0.0732227203269 0.0557314048292 0) (0.074751710341 0.0468165679458 0) (0.0758889623738 0.0360255558999 0) (0.0767171773166 0.0231749839642 0) (0.0773834434983 0.00825052427064 0) (0.0781341092562 -0.00852920039505 0) (0.079329720942 -0.0266707495301 0) (0.0813854430436 -0.0454154732584 0) (0.0845629805368 -0.0637957731276 0) (0.0886394067208 -0.0806831272833 0) (0.0924474719768 -0.0945996908476 0) (0.0939442550779 -0.103355674803 0) (0.0913821954196 -0.103878533223 0) (0.0861843840215 -0.0937483865093 0) (0.082268074133 -0.0759003696995 0) (0.0819546666818 -0.0543311830476 0) (0.0853085085093 -0.0318823360848 0) (0.0912024104932 -0.0113126912017 0) (0.0981751767681 0.00467244439915 0) (0.10488631493 0.013884580176 0) (0.110223916888 0.0151826061258 0) (0.113346955156 0.00878821498521 0) (0.113768904349 -0.00372639689425 0) (0.111412103587 -0.019827673728 0) (0.106731342086 -0.0368270237281 0) (0.100514404187 -0.0522842279596 0) (0.0938876691637 -0.0645387410434 0) (0.0879882505053 -0.0732881144531 0) (0.0832545717947 -0.0786554369919 0) (0.0798467327733 -0.0804626387558 0) (0.0777275612701 -0.079006533279 0) (0.0764754719703 -0.0748409744532 0) (0.0753130385685 -0.0687353353245 0) (0.0731912177391 -0.0615627167613 0) (0.0689706909527 -0.0538427095418 0) (0.0614693964989 -0.0449851849909 0) (0.0497269696569 -0.0327518090351 0) (0.0336090255327 -0.0153708546509 0) (0.0157423875373 0.0045801934754 0) (1.42701849219e-05 0.0215413046751 0) (-0.00934478227724 0.0246102280081 0) (-0.015965248787 0.0220088477903 0) (-0.0173069662853 0.0178417701147 0) (-0.0160436995312 0.0196406653203 0) (-0.0119023424747 0.0236639955584 0) (-0.00726128428479 0.0267724072912 0) (-0.00140911560766 0.0277840711653 0) (-2.42187230389e-05 0.00626885286175 0) (0.000961509290969 0.00652727280826 0) (0.000656578413681 0.00187306434103 0) (0.000776668832931 0.00253682857159 0) (0.000659501945738 0.00354403921583 0) (0.00336038421143 0.0098127889273 0) (0.00247055150665 0.00433925529013 0) (0.00253451419501 0.00286364675786 0) (0.00301260821732 0.00239127772353 0) (0.00257603717304 0.00179275869427 0) (0.00230420749949 0.00201739375574 0) (0.00226268840419 0.00225702918984 0) (0.00269005611681 0.00330913553288 0) (0.0033832148033 0.00596818424766 0) (0.00147514751317 0.00310960672679 0) (0.00173732205754 0.00407007774268 0) (0.00270436145607 0.00699121993501 0) (0.00399007402035 0.0122322374976 0) (0.00328748504963 0.0164450158897 0) (0.00277054383944 0.0271873733745 0) (0.00303021842742 0.0733917282508 0) (-0.00890671466885 0.22297997478 0) (-0.020577137141 0.22168813949 0) (-0.00488275963426 0.17028006607 0) (0.0166936698136 0.134082424618 0) (0.0309870352297 0.114207681915 0) (0.0406032564855 0.102098174999 0) (0.0478178198224 0.0937722792303 0) (0.0534867857387 0.0874392494794 0) (0.0580454950171 0.0820428143322 0) (0.0617562244 0.0768494115595 0) (0.0647881721122 0.0712931528042 0) (0.0672531544235 0.0649012099728 0) (0.0692273522982 0.0572572575331 0) (0.0707754075936 0.0479955175811 0) (0.0719780738889 0.0368281811268 0) (0.072967567529 0.0236015093971 -2.9446839859e-28) (0.0739775122161 0.00837172537652 2.74359753956e-28) (0.0754035397833 -0.00852058153654 0) (0.0778494983443 -0.0264242231373 0) (0.0820415716401 -0.044482910886 0) (0.0885304242603 -0.061906040691 0) (0.0971076815248 -0.0779959961121 0) (0.105686406241 -0.0924406765568 0) (0.109658094848 -0.103231111861 0) (0.104189895854 -0.107218128765 0) (0.0927135072339 -0.0945630374757 0) (0.085719708512 -0.0729298031428 0) (0.0857347117555 -0.0492394275625 0) (0.0902916326176 -0.0255986521008 0) (0.0971281004813 -0.00482386927511 0) (0.104518350801 0.0102607780169 0) (0.111194010528 0.0175325752707 0) (0.116170947129 0.0162015340096 0) (0.11876468286 0.00701258636066 0) (0.118690271819 -0.00793157896896 0) (0.11615681322 -0.0256927594732 0) (0.111805171565 -0.043256574401 0) (0.106661863566 -0.0583167384216 0) (0.101859976335 -0.0694231406082 0) (0.0985117446092 -0.0762400967581 0) (0.0973645729586 -0.079493968894 0) (0.0983281481174 -0.0796523069465 0) (0.101185185419 -0.0769982825758 0) (0.10554932509 -0.0723571684273 0) (0.110809716777 -0.0667638401334 0) (0.116161206268 -0.0613532189945 0) (0.120574289305 -0.05718634799 0) (0.122693266181 -0.0547925182175 0) (0.120689570357 -0.0537144077392 0) (0.112240988955 -0.0515769857534 0) (0.094932240929 -0.0454557079686 0) (0.0671329907378 -0.0305386166334 0) (0.0339459746674 -0.0042007013998 0) (0.00940254084887 0.0187116138544 0) (-0.00725013546885 0.0323448273425 0) (-0.0152576775454 0.0321577739295 0) (-0.0151171195601 0.0309955733147 0) (-0.00895412999016 0.0325140589379 0) (-0.00133147945357 0.0327745162435 0) (-0.000154631026426 0.00679995160411 0) (0.000825873897416 0.0069071247033 0) (0.00053516398452 0.00163782288776 0) (0.000829298471461 0.00273776540783 0) (0.000960457110501 0.00434682955558 0) (0.00365817553411 0.0102291585823 0) (0.00202069508414 0.00357466245923 0) (0.00346284619753 0.00352590449839 0) (0.00301594184306 0.0023766529768 0) (0.00259927837204 0.00195063345945 0) (0.00224348922963 0.00219996151371 0) (0.00218652070599 0.00246447943412 0) (0.00276984209438 0.0037780648352 0) (0.00193766321309 0.00396158455516 0) (0.00145786013525 0.00339665979064 1.59802909874e-28) (0.00185699206395 0.00450314100093 -2.37560137915e-28) (0.00298192461356 0.00805884646654 0) (0.00350079501682 0.0105222644049 0) (0.00313104455261 0.016905001762 0) (0.00250223646902 0.0280118268788 0) (0.00237274377048 0.0743074485534 0) (-0.0106023296 0.225674535834 0) (-0.0242165675787 0.229940255271 0) (-0.0122469685494 0.181235599273 0) (0.00878928208201 0.143038974647 0) (0.0244729252806 0.120626272812 0) (0.0351028016337 0.107084197717 0) (0.0428588858706 0.0978836464055 0) (0.0488662700533 0.0909088921581 0) (0.0536379685175 0.085019466291 0) (0.0574751658057 0.0794267120733 0) (0.0605727737306 0.0735263755064 0) (0.0630606771363 0.0668135716536 0) (0.0650322666671 0.058847212082 0) (0.0665705974291 0.0492488162984 0) (0.0677809948308 0.0377377965964 0) (0.0688371724802 0.0242013103394 0) (0.0700498949817 0.00879443744907 0) (0.0719706527053 -0.00795747006908 0) (0.07544939208 -0.0250959516415 0) (0.0815435752984 -0.0415273076163 0) (0.0910660529948 -0.0562549345822 -2.22112488225e-28) (0.103000941087 -0.0682870619638 2.34069770672e-28) (0.112186045952 -0.0772015485372 0) (0.106141181347 -0.0820032827898 0) (0.114885758651 -0.106224163543 0) (0.097868592734 -0.102064923437 0) (0.0876453418936 -0.0735693807039 0) (0.0897163903768 -0.0463046614151 0) (0.0954879508627 -0.020789928479 0) (0.10278143254 0.000477556643847 0) (0.110130260991 0.0147466674775 0) (0.116526460886 0.0201518219791 0) (0.121162615396 0.0164028572342 0) (0.123500026053 0.00485815000255 0) (0.123438152995 -0.0118701815192 0) (0.121401003166 -0.0305529982598 0) (0.118288170905 -0.0480764986528 0) (0.115179743527 -0.062154560811 0) (0.113206422966 -0.0716016209852 0) (0.113306159206 -0.076192306928 0) (0.11603443784 -0.0767047829457 0) (0.121688265231 -0.0743441294544 0) (0.129769305596 -0.0698593064544 0) (0.139868980264 -0.063990412281 0) (0.151525158419 -0.058006158239 0) (0.164196279688 -0.0532057695094 0) (0.177203619574 -0.0508502820075 0) (0.189479845832 -0.0518370026402 0) (0.19933949799 -0.0564917687902 0) (0.204274437614 -0.0640924605026 0) (0.200788353149 -0.0728947279087 0) (0.18458510414 -0.0798541248808 0) (0.15328557615 -0.0799251742392 0) (0.110793222093 -0.0670804402268 0) (0.0660452254702 -0.0337116520668 0) (0.0289328677392 0.0157467407725 0) (0.00277550793447 0.0483264305051 0) (-0.0060927503605 0.0444665034966 0) (0.000657575362252 0.0411225557877 0) (-0.000220926747042 0.00711041363193 0) (0.000686742709476 0.00709817858674 0) (0.00046858559878 0.00165934836216 0) (0.00104930964705 0.00346514813972 0) (0.00141645170634 0.00528203197903 0) (0.00388937068215 0.0105195239675 0) (0.00182219117724 0.00321376661134 0) (0.00429399657716 0.00420087571289 0) (0.00292765382635 0.00234631992298 0) (0.00262616193684 0.00206572665552 0) (0.00219888084753 0.00236191224604 0) (0.00216238238912 0.00266381016489 0) (0.00273868908383 0.00434079690464 0) (0.00149900689773 0.00343536360899 0) (0.0015282357967 0.00357198258909 0) (0.0021034895497 0.00480198332994 0) (0.00344100251903 0.00893893336008 0) (0.0028458709893 0.00817816967743 0) (0.00255142040606 0.0169439775505 0) (0.00234051790976 0.0277466574931 0) (0.00209993334234 0.0742741817074 0) (-0.0114603967692 0.228401193733 0) (-0.026393355016 0.238088701826 0) (-0.018376261905 0.192279603199 0) (0.00120097765606 0.152603307136 0) (0.0174127015794 0.127980551195 0) (0.0289908503518 0.112651234151 0) (0.0374918957251 0.102319893553 0) (0.0439331644883 0.0946156462396 0) (0.0489788103787 0.0881619197344 0) (0.0529864064419 0.082117782808 0) (0.0561768901004 0.0758348661972 0) (0.0586987713842 0.0687755502586 0) (0.0606595760138 0.0604731539741 0) (0.0621555162184 0.0505357369285 0) (0.0633081447045 0.0386884596575 0) (0.0643186591547 0.0248593253581 0) (0.0655613204084 0.00931405871254 -2.48858667407e-28) (0.0677204329375 -0.00718288337116 2.31326510079e-28) (0.0718569867617 -0.023272944054 0) (0.0791559246284 -0.0374504433632 0) (0.08967085663 -0.0481149720328 0) (0.0986203726563 -0.0531256934644 0) (0.0895958964232 -0.0488618199171 0) (0.0868068203019 -0.0593591186566 0) (0.108109242537 -0.100707511561 0) (0.099343541651 -0.114091296331 0) (0.0903043675862 -0.0765043795952 0) (0.0946828136645 -0.0444832568171 0) (0.100923195738 -0.0166538065322 0) (0.108057569433 0.0052145781996 0) (0.115035580265 0.0186507911687 0) (0.121095321918 0.0222435220032 0) (0.125577951554 0.0163208343058 0) (0.12808915348 0.00286843511803 0) (0.128686399655 -0.0150289487107 0) (0.127970627138 -0.0339336365711 0) (0.126958168433 -0.0507600086556 0) (0.126844182142 -0.0632932477885 0) (0.128573441888 -0.0705808851824 0) (0.132844145232 -0.0725879189359 0) (0.140030887272 -0.0700920981725 0) (0.150035669063 -0.0645987491347 0) (0.163019515269 -0.0574642080821 0) (0.178349565734 -0.0498944715822 0) (0.195618147071 -0.0429928223689 0) (0.214403714437 -0.0381511065354 0) (0.234218662096 -0.0365528865948 0) (0.25428081907 -0.0390529901686 0) (0.27329605915 -0.0460863954574 0) (0.289008646683 -0.0573085556108 0) (0.298440363138 -0.0716628630925 0) (0.298315061454 -0.0876931042401 0) (0.285918429791 -0.10366024492 0) (0.260775374918 -0.116460384254 0) (0.223204061682 -0.120318690197 0) (0.172631842894 -0.106283444279 0) (0.109896023357 -0.0610086337718 0) (0.0414782387061 0.0297075655366 0) (0.0203855099997 0.0392247300849 0) (-0.00031632770995 0.0074217461615 0) (0.000629787548202 0.00741407487099 0) (0.000449951174278 0.00177649620644 0) (0.00147764159553 0.00463839855843 0) (0.00171421284261 0.00574698534132 0) (0.0036622159322 0.0106416854278 0) (0.00177979379739 0.00318242796831 0) (0.00483258590938 0.00464113326299 0) (0.00283264516374 0.00219174117342 0) (0.00255495086301 0.00215860578859 0) (0.00212460286974 0.00252141303471 0) (0.00208536016283 0.00288551780037 0) (0.00278647479686 0.00505905843522 0) (0.00144796772582 0.00362806173686 0) (0.00151061113005 0.00374262501276 0) (0.00221524797149 0.00526204495223 0) (0.00364234807341 0.0098539616399 0) (0.00265731088208 0.00822659123424 0) (0.00188467914067 0.0169456037524 0) (0.0019039556018 0.0269039391361 0) (0.00179388774262 0.0735402089602 0) (-0.0119834962467 0.231099161721 0) (-0.027532429314 0.24613864762 0) (-0.0232446486898 0.20325516812 0) (-0.00569670332739 0.162516302458 0) (0.0105534246697 0.13582355972 0) (0.0225830273631 0.118853310182 0) (0.0316396000967 0.107238934314 0) (0.0386652450028 0.0985684604094 0) (0.0440734843517 0.091480813995 0) (0.0483049612009 0.0849231804599 0) (0.051624389205 0.0782132938026 0) (0.0541972089004 0.0707756201197 0) (0.0561456347966 0.0621152174497 0) (0.0575764899247 0.0518220774921 0) (0.0586222554798 0.0396207924929 0) (0.0595105437397 0.0254717191454 0) (0.0606969331442 0.00975018358363 0) (0.0630646016193 -0.00652097610824 0) (0.0679741691871 -0.0215849485214 0) (0.0764232647325 -0.0336117692376 -2.20622573526e-28) (0.0862980760892 -0.0407217693396 2.48618915267e-28) (0.0846391622799 -0.0382343097932 0) (0.0699224203801 -0.0352676820511 0) (0.0712776898953 -0.0492908681068 0) (0.0940062157709 -0.0995435797165 0) (0.0957067736316 -0.121571159869 0) (0.0944290042392 -0.0794243501201 0) (0.0997639094396 -0.0424882789983 0) (0.105973632769 -0.0123685881958 0) (0.112732828127 0.00996837998083 0) (0.11934812595 0.0225107976175 0) (0.125272832147 0.0244517185909 0) (0.129979466675 0.0168005273708 0) (0.133196496064 0.00213888617897 0) (0.135118962752 -0.016061678082 0) (0.136443784598 -0.0342362049628 0) (0.138217435512 -0.0493918645691 0) (0.14153413799 -0.0595416768948 0) (0.14730580061 -0.0638473919394 0) (0.155925756091 -0.062703042484 0) (0.167512654012 -0.0570023904338 0) (0.181942165816 -0.0483322177358 0) (0.19872978905 -0.0386106664765 0) (0.218092662955 -0.0290663532493 0) (0.239499317135 -0.0210487178146 0) (0.262530044769 -0.0158011151264 0) (0.286701261407 -0.0144028162859 0) (0.311376349932 -0.0175752565339 0) (0.335433769239 -0.0255309552395 0) (0.357157116166 -0.0380322105451 0) (0.374322278409 -0.0545001615209 0) (0.384797943044 -0.0741299804805 0) (0.38760481703 -0.0959400597259 0) (0.383075971332 -0.118610595343 0) (0.37059773959 -0.140374803571 0) (0.345040998476 -0.157361888136 0) (0.290726527869 -0.161218201578 0) (0.183506393273 -0.103973908871 0) (0.131571430465 -0.0659574950257 0) (-0.000384564352845 0.0074476491996 0) (0.000652098777786 0.00779275047121 0) (0.000540474905341 0.00208199907126 0) (0.00206228225925 0.00620702156909 0) (0.00159213564807 0.00556926106493 0) (0.00296023027856 0.0105983418001 0) (0.00214932695145 0.00407515417201 0) (0.0048562996863 0.00472725144104 0) (0.00280645549383 0.00222021840127 0) (0.00237054012711 0.00235249772114 0) (0.00202779303836 0.00272100393342 0) (0.00199108285396 0.00311767445132 0) (0.00275011444487 0.00565611753077 0) (0.0013779421625 0.00386028763886 0) (0.00150959848065 0.00400586735471 0) (0.00228481737462 0.00574565126629 0) (0.00347485525364 0.0100484177994 0) (0.00250465921924 0.00821908344311 0) (0.00154335171065 0.016708027484 0) (0.00164458574951 0.0257933889604 0) (0.00146470285196 0.0729742223233 0) (-0.0129999792527 0.234062934461 0) (-0.0283708694652 0.254317775517 0) (-0.0271254503731 0.214166079089 0) (-0.0118120651706 0.172678090893 0) (0.00414925458686 0.144004297269 0) (0.0164645043772 0.125379093751 0) (0.025763290675 0.112561108553 0) (0.0330510189802 0.102944270645 0) (0.0389123072463 0.0949831870708 0) (0.0434463536676 0.0878574067787 0) (0.0469401475135 0.0806679795242 0) (0.0495933328833 0.0728136174608 0) (0.0515410006316 0.0637656494995 0) (0.0529012459588 0.0530902245181 0) (0.053819678858 0.0405042539803 0) (0.0545670115266 0.0259947657859 0) (0.0557491708866 0.0100656986173 0) (0.0586191563006 -0.00593894154601 0) (0.0652175573112 -0.0200176452095 0) (0.0762234775552 -0.0306325275696 0) (0.0867230810924 -0.0364955605901 0) (0.0669167536097 -0.0277674662343 0) (0.0632921524067 -0.0312069926963 0) (0.062790360985 -0.0434907996131 0) (0.0789178457205 -0.0899671365486 0) (0.0686361609928 -0.0883995235495 0) (0.098656185152 -0.0802622696541 0) (0.103676770857 -0.0392211015724 0) (0.110069177485 -0.00731596046884 0) (0.116597110208 0.0151303178044 0) (0.123032940088 0.0266630003721 0) (0.129064096894 0.0271180120208 0) (0.134298797905 0.0181387057133 0) (0.138578428327 0.00278879719423 0) (0.142204220565 -0.0151960399317 0) (0.145925935204 -0.0322022977982 0) (0.150724782744 -0.0453414237041 0) (0.157519272152 -0.0527977596919 0) (0.166935189459 -0.0539202278448 0) (0.179270360225 -0.0491279322222 0) (0.194369842959 -0.0398388470212 0) (0.211991652941 -0.0276481180499 0) (0.231789841527 -0.0147533480382 0) (0.253186006696 -0.00321533297548 0) (0.276279690251 0.00586336136314 0) (0.300707316263 0.0116093188578 0) (0.325903825558 0.0131384417057 0) (0.351156565336 0.0100968179532 0) (0.375514943103 0.00252211827019 0) (0.397746799781 -0.00923599091075 0) (0.41665128984 -0.0246901941008 0) (0.431838849368 -0.0434671910912 0) (0.444048139488 -0.0652716063133 0) (0.455047971331 -0.0898868890606 0) (0.465974495283 -0.116314830964 0) (0.474890414682 -0.143994766351 0) (0.47336974349 -0.174218917436 0) (0.44179108543 -0.203479998228 0) (0.385251744517 -0.210710171105 0) (-0.000465703944637 0.00732966799004 0) (0.000731710268669 0.00866920401395 0) (0.00078047836646 0.00267288985055 0) (0.00245884002115 0.00757212770012 0) (0.00114314843359 0.00507705789746 0) (0.0020667827676 0.0104930534917 0) (0.00263432209997 0.00590940922805 0) (0.00397495008569 0.00429273518788 0) (0.0030004180497 0.00267624894094 0) (0.00223672269305 0.00272529354331 0) (0.00200735641276 0.00298836955347 0) (0.00194461823183 0.00336941466186 0) (0.00270474876338 0.00610223728458 0) (0.00129559182793 0.00403006580797 0) (0.00147716774002 0.00423279606097 0) (0.00228103402104 0.0060657485788 0) (0.00302003240064 0.0092159122969 0) (0.00240044212198 0.00804739916151 0) (0.00149869956602 0.0163377203442 0) (0.00167267432864 0.0245250374638 0) (0.00117131264985 0.0727059240775 0) (-0.0149223854235 0.237079610966 0) (-0.0297576442197 0.263107007241 0) (-0.0306107258393 0.225278471038 0) (-0.0172684785643 0.183148832281 0) (-0.00173111446688 0.152533908825 0) (0.0108077461136 0.132148163506 0) (0.0203096841245 0.118062430607 0) (0.0276865609376 0.107523952433 0) (0.033590402336 0.0988489157833 0) (0.0384152286348 0.0909388893905 0) (0.0421541721523 0.0832146698232 0) (0.0449302167422 0.0749022478294 0) (0.0469057109237 0.0654299768204 0) (0.0482082263954 0.0543402464515 0) (0.0489944950726 0.0413343547212 0) (0.049583093393 0.0264314458018 0) (0.0507718291787 0.0103242449409 0) (0.0542864060216 -0.00512235592654 0) (0.0624881721952 -0.01773604924 -2.2626985074e-28) (0.0737288445452 -0.0264516207467 2.77600090241e-28) (0.0773313603348 -0.0295733894864 0) (0.0569667929175 -0.0246801876724 0) (0.0617853106827 -0.0295655727709 0) (0.057436556688 -0.0401999089277 0) (0.0699285454115 -0.0826201233837 0) (0.0479780251167 -0.0559006995984 0) (0.101033005944 -0.0767087777711 0) (0.106353171022 -0.033704507965 0) (0.113162849988 -0.00107560130173 0) (0.119715754608 0.0209269155899 0) (0.126255446217 0.0312897494048 0) (0.13271418607 0.0304198516911 0) (0.13884192934 0.0204871567012 0) (0.144574375192 0.00492407530346 0) (0.15024864288 -0.0123585871348 0) (0.156554733757 -0.0277278768416 0) (0.164281611668 -0.038408715666 0) (0.174054668294 -0.0427880296385 0) (0.186177040584 -0.0405119211297 0) (0.20065876276 -0.0323192493988 0) (0.217346116738 -0.0198454440329 0) (0.235916701316 -0.00530728094621 0) (0.256137354899 0.00927755912198 0) (0.277703846197 0.0216957423892 0) (0.300104119122 0.0304114783448 0) (0.323018645292 0.0347970814748 0) (0.345966975927 0.0348929271329 0) (0.367957011411 0.0303741076692 0) (0.388001220731 0.0214670270979 0) (0.405114581359 0.00855582587197 0) (0.418805148263 -0.00795905452768 0) (0.429510866114 -0.0276338209833 0) (0.438676071733 -0.0500478670789 0) (0.448232895593 -0.0740923554866 0) (0.459031791857 -0.0975300785932 0) (0.471511912005 -0.117793178437 0) (0.486147593922 -0.13324027317 0) (0.50034484496 -0.151287926127 0) (0.502116234562 -0.188647443846 0) (-0.000414130279022 0.00692100440427 0) (0.000621114333019 0.00981246063685 0) (0.00102681399493 0.00347494578456 0) (0.00185938381935 0.00642464730709 0) (0.000799038675247 0.00475095801019 0) (0.00140217092216 0.00996757947927 0) (0.0026333223205 0.00747556695232 0) (0.00309058662975 0.00391744017781 0) (0.00323581151407 0.00341964115109 0) (0.00222757426297 0.00320045923208 0) (0.00211253072367 0.00329226332085 0) (0.00197759495306 0.00364831836129 0) (0.00266596776463 0.00637659145223 0) (0.00121586633931 0.00420444538007 0) (0.00143080316759 0.0044362509455 0) (0.00214460108658 0.00615163323782 0) (0.00242412188857 0.00776215006632 0) (0.00238226463558 0.00789391824851 1.81876266932e-28) (0.0017883302729 0.0157564326457 -4.43869302865e-28) (0.0020889875775 0.0232065419838 0) (0.000982480867941 0.0724082004755 0) (-0.0189687321668 0.239227219426 0) (-0.0325023355632 0.2732408426 0) (-0.0344161778376 0.237252746733 0) (-0.0223785181765 0.194212840285 0) (-0.00712265288158 0.161532192233 0) (0.00567060718362 0.139210424013 0) (0.015402266846 0.123698918342 0) (0.0228718877469 0.112156579755 0) (0.0287499175382 0.102763425111 0) (0.033478690221 0.0942836207854 0) (0.0373071636177 0.0859260405401 0) (0.0402576585596 0.0770525660699 0) (0.0423102681772 0.0671312096249 0) (0.0435878732638 0.0555863634689 0) (0.0442522760526 0.0421147687444 0) (0.0446429947261 0.0267563438577 0) (0.0457296808863 0.0104419850362 0) (0.0495912848527 -0.00426692976998 0) (0.0572588129881 -0.0151535241288 0) (0.0600473373378 -0.0202967422173 0) (0.0573399582228 -0.0222664189893 0) (0.0537123651038 -0.0249408484167 0) (0.0590443554926 -0.0298628948643 0) (0.0506430516116 -0.0371824730801 0) (0.0374674517636 -0.0442422974322 0) (0.0483928835015 -0.0544381070056 0) (0.1000981759 -0.0682389201277 0) (0.108148008692 -0.0256272210991 0) (0.115465292295 0.00651361369362 0) (0.122253531424 0.027502199326 0) (0.1291392576 0.0365907508204 0) (0.136265364478 0.0346314831417 0) (0.14349709092 0.0241880833142 0) (0.15081329669 0.00893851339072 0) (0.158504872168 -0.00713204194705 0) (0.167110760996 -0.0204698696109 0) (0.177182059256 -0.0284961840975 0) (0.189063432754 -0.0299060561794 0) (0.202826408142 -0.0246944434361 0) (0.21833498142 -0.013999459103 0) (0.235404895611 0.000324211460354 0) (0.25388500435 0.0159791502745 0) (0.273610684263 0.0306949345444 0) (0.294403118322 0.0427114171018 0) (0.315840171593 0.0504891363121 0) (0.337229036625 0.0532756448144 0) (0.357766516946 0.0509795950486 0) (0.376839345915 0.0444169880912 0) (0.393531267199 0.0333571471107 0) (0.407375923696 0.0179452571958 0) (0.418583413511 -0.00174933684349 0) (0.428105270218 -0.0257229932308 0) (0.437298212201 -0.0538435790795 0) (0.446899611391 -0.0847170153742 0) (0.456123366626 -0.115694019292 0) (0.465236690491 -0.142809681551 0) (0.478426442591 -0.162017795138 0) (0.502401299465 -0.175473870384 0) (0.529631684295 -0.192159127618 0) (-0.000210148537331 0.00652727525873 0) (0.000589470519145 0.0107802590642 0) (0.000929398440485 0.00418073255107 0) (0.00128207238945 0.00551669914552 0) (0.00106907673716 0.00526636443347 1.91983306109e-29) (0.00148131491143 0.00905183820332 -3.48461432844e-29) (0.00298860089294 0.0105177173024 0) (0.00287333865993 0.00425919787531 0) (0.00443895547774 0.00524362903538 0) (0.00237949062275 0.00352972664813 0) (0.00236472079008 0.00355735004579 0) (0.00208633452228 0.00393988337957 0) (0.00262999748777 0.00648576190422 0) (0.00117269687743 0.00441593774507 0) (0.0014303810992 0.00463507774585 0) (0.00191588515842 0.00608041014441 0) (0.00200738645188 0.0066699708846 0) (0.00241501695972 0.00781114434778 0) (0.00233791324254 0.0150779019873 0) (0.00268983665641 0.0219941782111 0) (0.000534977881357 0.0708308946666 0) (-0.0263653655112 0.233839030467 0) (-0.0371029392696 0.284627401233 2.19054002111e-27) (-0.0391058539037 0.251080061499 0) (-0.0274868344204 0.206426831023 0) (-0.0121333770332 0.171229334348 0) (0.00105422944206 0.146669327509 0) (0.0110869404249 0.129513864565 0) (0.018681929568 0.11682632894 0) (0.0245631792943 0.10663260655 0) (0.029176673241 0.0975873924364 0) (0.0328551489956 0.0887536636036 0) (0.035708156816 0.0794357978296 0) (0.0378249715708 0.0688653203349 0) (0.0391550120753 0.0568633583846 0) (0.0397444761723 0.0428756287731 0) (0.0399371698479 0.0269528783559 0) (0.0407743619124 0.0102620437925 0) (0.0443413219191 -0.0039105863891 0) (0.0441551957918 -0.0121963452512 0) (0.0433655897713 -0.0156758263591 0) (0.0435721765901 -0.0186586035823 0) (0.0502113386193 -0.0243081515596 0) (0.0573366201638 -0.0316421624404 0) (0.0463826112009 -0.0355963034809 0) (0.0290827387775 -0.0350340016172 0) (0.0487484750061 -0.049863416601 0) (0.0999382716513 -0.0554928918171 0) (0.109410857923 -0.0152532579968 0) (0.11723244737 0.0153456910359 0) (0.124389560109 0.0348630995218 0) (0.131787718302 0.0426503906725 0) (0.139726029694 0.039851335384 0) (0.148150126204 0.0292719021258 0) (0.157036540025 0.014697978309 0) (0.166574036878 7.62952710463e-05 0) (0.177109635798 -0.0112081837527 0) (0.188961543788 -0.0168364402253 0) (0.202258771959 -0.0158081428399 0) (0.216917323407 -0.00841840091832 0) (0.232730107757 0.0039770033604 0) (0.249500078265 0.0193512841805 0) (0.267119802909 0.0354924992031 0) (0.285528082718 0.0502487629959 0) (0.304588613106 0.0619229812251 0) (0.32395650658 0.0694058753142 0) (0.343032145211 0.0719878348052 0) (0.361030442763 0.0693998190446 0) (0.377224621111 0.061864370662 0) (0.391176154634 0.050459788314 0) (0.40301555877 0.0352456606623 0) (0.4137596571 0.0161372021776 0) (0.424885477363 -0.0069205434545 0) (0.437594408958 -0.0338793752381 0) (0.451458493683 -0.0634396092392 0) (0.464736864528 -0.0933078325677 0) (0.477412218492 -0.120665035117 0) (0.494664869095 -0.142938669075 0) (0.524495001323 -0.159994614102 0) (0.558578266944 -0.17340960576 0) (9.56310460881e-05 0.00701252943598 0) (0.000745040506619 0.0110295973162 0) (0.000546045271258 0.00473812116787 0) (0.00118400048802 0.00642765585785 0) (0.00151483637491 0.00592997383439 0) (0.00173266542039 0.00832695357229 0) (0.00316482623949 0.0120325224725 0) (0.00255497785218 0.00438411783873 0) (0.00453390802116 0.00574641037774 0) (0.00264985017085 0.0036831743648 0) (0.00251178796584 0.00379935372843 0) (0.00220567264933 0.00424594401816 0) (0.00258427209723 0.00649922658448 0) (0.00118726089979 0.0046806856642 0) (0.00151494171364 0.00489937640657 0) (0.00194486065533 0.00612092524254 0) (0.0019665054849 0.00707223089513 0) (0.00226649999056 0.00815703065651 0) (0.0025610491652 0.0146363009398 0) (0.00315452732593 0.0215050817702 0) (-0.000173649269762 0.0647774894166 0) (-0.025380619825 0.17163464107 0) (-0.0397299541594 0.283587022323 -2.41302517611e-27) (-0.043104757807 0.26509439516 0) (-0.0322817648651 0.220012935087 0) (-0.0167586611821 0.181859342941 0) (-0.00306981721337 0.15464558102 0) (0.00735637837335 0.135572469787 0) (0.0151344931467 0.121568766887 0) (0.021058338449 0.110467790887 0) (0.0256212764723 0.100790748123 0) (0.0291697184092 0.0914755130083 0) (0.0318822758768 0.0817755775038 0) (0.0337856484866 0.0708956677336 0) (0.0350286081111 0.0582558425793 0) (0.0356507982342 0.0436489361646 0) (0.0357612406067 0.027113729648 0) (0.0365386814923 0.00979910683832 0) (0.0410497364181 -0.0045853523688 0) (0.0333869761989 -0.010793494572 0) (0.0339681471592 -0.0137407263033 0) (0.0357926289655 -0.0158763553436 0) (0.0480074169786 -0.02316439481 0) (0.0574952258683 -0.0323721352858 0) (0.0406500923153 -0.0307551998759 0) (0.0281152477614 -0.0305126571954 0) (0.0547843369892 -0.0458641548076 0) (0.100372955722 -0.039728974239 0) (0.11054809942 -0.00321542565766 0) (0.11872577993 0.0251053797995 0) (0.126276884541 0.0428886014523 0) (0.134253620357 0.049449050028 0) (0.143039175201 0.0460858734942 0) (0.152618473639 0.0357222794063 0) (0.162930158293 0.0221504046713 0) (0.174032845667 0.00920256919712 0) (0.186077211446 4.95160691117e-05 0) (0.199177106399 -0.0032655469445 0) (0.213305150076 -2.37243787289e-05 0) (0.228289836292 0.00923413124728 0) (0.24389885976 0.0229913525951 0) (0.259944649801 0.0391343140398 0) (0.276345741298 0.0554017302641 0) (0.293087276275 0.0697380955888 0) (0.310090598197 0.0805046686361 0) (0.327079826739 0.086632602771 0) (0.343585458343 0.0876149545091 0) (0.358983828581 0.0834860998654 0) (0.372747051623 0.074515370666 0) (0.384737386441 0.0613558634242 0) (0.395568597384 0.044834089306 0) (0.406694780978 0.0256165929485 0) (0.419963710693 0.00356580087442 0) (0.436149324706 -0.0212305895611 0) (0.453843517171 -0.0471855804615 0) (0.471164102928 -0.0722309875767 0) (0.488118997738 -0.0943050575597 0) (0.510333919822 -0.112230443439 0) (0.544983813232 -0.126124082386 0) (0.581892326098 -0.136671484127 0) (0.000268225542739 0.00825477446703 0) (0.000644550361209 0.0100177007564 0) (-1.70929642764e-05 0.00495771714829 0) (0.00104944796747 0.0065194779231 0) (0.00200764033383 0.00614713605062 0) (0.00187074440801 0.007735164675 0) (0.00336312982868 0.0130488262772 0) (0.00236454992114 0.00444676261399 0) (0.00417651799277 0.00539586078356 0) (0.00293232953405 0.00399210240459 0) (0.0026281981421 0.00407773146515 0) (0.00233135911732 0.00458777804664 0) (0.00253021850347 0.00648044721712 0) (0.00123197577858 0.00497852920058 0) (0.00159070733801 0.00526182549004 0) (0.00220695271034 0.00638236245853 0) (0.00184649058217 0.00736424673869 0) (0.00180594499611 0.00852450559349 0) (0.00211862200467 0.0144890809572 0) (0.00309262283846 0.0224065340346 0) (-0.000353201254267 0.0422840209678 0) (-0.0063603376786 0.0949688077236 0) (-0.0348764423518 0.273331694103 0) (-0.0423421560344 0.277744370425 0) (-0.0352954621896 0.234517541697 0) (-0.0206686613491 0.193433023305 0) (-0.00670498422377 0.16321350761 0) (0.00414889675667 0.141938525567 0) (0.0121863233024 0.126437770391 0) (0.018213656145 0.114316130757 0) (0.0228013491363 0.103933201366 0) (0.0263107938106 0.0941015563648 0) (0.0289584184845 0.0839859562516 0) (0.0307612390424 0.0728164015334 0) (0.0318492399866 0.0598723510734 0) (0.032223262195 0.044871436145 0) (0.0321468578912 0.0273208771257 0) (0.0329804295431 0.00919139847572 0) (0.034933352636 -0.00525309650146 0) (0.0278930531134 -0.0101908890219 0) (0.0310163158304 -0.0129163020707 0) (0.0343281014212 -0.0144272504188 0) (0.0469055978936 -0.0207810556996 0) (0.0576551685351 -0.0298183581758 0) (0.0389665933462 -0.0271541958754 0) (0.038219930363 -0.0319216310454 0) (0.0755404073272 -0.0453568473938 0) (0.101994093009 -0.0232822388925 0) (0.111967480411 0.00951384853629 0) (0.120137865689 0.0353459271063 0) (0.128010198065 0.0513763507029 0) (0.136546277887 0.0568836371131 0) (0.146126744369 0.0532407389281 0) (0.156737919804 0.0433966102742 0) (0.168260912614 0.0310694733966 0) (0.180622328421 0.0199109267236 0) (0.193794232792 0.0128253326567 0) (0.20771552837 0.0115446733151 0) (0.222231436991 0.0164884159395 0) (0.23710563245 0.0268789404864 0) (0.252098342462 0.0410547650249 0) (0.267053454309 0.0568735856944 0) (0.281940523048 0.0721271506359 0) (0.296808839748 0.0848917607126 0) (0.311646771282 0.0937398816555 0) (0.326290918053 0.0978534495566 0) (0.340374356861 0.0969987979224 0) (0.353443969317 0.0914128202651 0) (0.365278019403 0.081660766924 0) (0.376075193386 0.0683600087592 0) (0.386967431263 0.0518605818782 0) (0.399668634071 0.0331667374005 0) (0.415641331318 0.0125600330414 0) (0.434992301985 -0.0094502004579 0) (0.455540290019 -0.0315598821151 0) (0.475816313685 -0.0517898008643 0) (0.495275154509 -0.0686890894913 0) (0.520430594454 -0.0812492229695 0) (0.557931499502 -0.0899500023709 0) (0.596401278044 -0.0957122565274 0) (0.000226531883003 0.00919538105619 0) (0.000602458957257 0.00900849686881 0) (4.85428667128e-05 0.00494060396737 0) (0.00159050223514 0.0113182876943 0) (0.0017738330648 0.00600770017506 0) (0.00194276540075 0.0075635038779 0) (0.00356584379206 0.0135932127145 0) (0.00235147075944 0.0046756522562 0) (0.00429589247349 0.00563353585978 0) (0.00315884942525 0.0042958763369 0) (0.00276281389195 0.00435773154138 0) (0.00246924192015 0.00495609989654 0) (0.00248934900138 0.00641585886463 0) (0.00128542852313 0.00524196308362 0) (0.00156225350152 0.00566942661038 0) (0.00231410306113 0.00668780732269 0) (0.0017207361032 0.00780056006087 0) (0.00141717908199 0.00900661674792 0) (0.00113517081653 0.014048829399 0) (0.00213298468837 0.023448249156 0) (-0.00011793715608 0.0354735854756 0) (-0.00162089362533 0.0842146218657 0) (-0.0222598784855 0.271018608304 0) (-0.0376062843431 0.290872520736 0) (-0.0361869991787 0.249661578685 0) (-0.0237273821383 0.205810333431 0) (-0.0099285157135 0.172390480329 0) (0.00132671026188 0.148672006467 0) (0.00971870599154 0.131500586931 0) (0.015946882505 0.118249300047 0) (0.0206481789731 0.107088993338 0) (0.0242316714831 0.0967081932983 0) (0.026937023711 0.086157536923 0) (0.0288079108312 0.0746487266608 0) (0.0299411104132 0.0614315107506 0) (0.0303266054213 0.0461137638675 0) (0.0301321689087 0.0281627666498 0) (0.0308487110061 0.00892722126401 0) (0.0303545948153 -0.00590595730758 0) (0.02635714693 -0.00962937568614 0) (0.030657600136 -0.0118283114916 0) (0.0354798024078 -0.0129153626849 0) (0.0486362696896 -0.017999869397 0) (0.0572116183791 -0.0245882324779 0) (0.0469847948572 -0.0272105743535 0) (0.063163070816 -0.0384143482801 0) (0.0851755974527 -0.0334152538613 0) (0.103615792089 -0.0076183623558 0) (0.113271904043 0.0221420069105 0) (0.121437434587 0.0456751407596 0) (0.129600843392 0.0601311183792 0) (0.138640350192 0.0648309896095 0) (0.148911737111 0.0611852398689 0) (0.160383999573 0.0521077811538 0) (0.172874237237 0.0411856093157 0) (0.186189003623 0.031846109116 0) (0.200149183576 0.0267034837644 0) (0.214550767176 0.0271799063103 0) (0.229137657596 0.0334223149573 0) (0.243628840823 0.0444708096202 0) (0.257797917917 0.0585995571483 0) (0.271547269973 0.0737290026672 0) (0.284929622971 0.0878132862228 0) (0.298084874907 0.0991436636173 0) (0.311076346248 0.106525405411 0) (0.323832296817 0.109338885989 0) (0.336062042973 0.107533101186 0) (0.34743218261 0.101438323254 0) (0.357882142368 0.0916755561 0) (0.367952210136 0.0789225699065 0) (0.379198428578 0.0636201729298 0) (0.393591673316 0.0464838861691 0) (0.412601188739 0.02780539101 0) (0.4350500973 0.00832953184792 0) (0.457862086318 -0.00977869397017 0) (0.480562753286 -0.0257103855166 0) (0.50056916288 -0.0381854084682 0) (0.527038835004 -0.0470482425677 0) (0.565635694344 -0.0518246111217 0) (0.604406556312 -0.0539468064984 0) (0.000378183828613 0.0100720077685 0) (0.000832586099258 0.00888868469829 0) (0.000394731507286 0.00527782328785 0) (0.00153286291053 0.0122134507148 0) (0.00124165420897 0.00594810711796 0) (0.0017377849865 0.00773514671508 0) (0.00349164968533 0.0138180915329 0) (0.00246051193449 0.00502494225523 0) (0.00431015535493 0.00574920953828 0) (0.00327241146418 0.00454830548551 0) (0.00280857705592 0.00462647107664 0) (0.0025939828787 0.00532445095482 0) (0.00250920866883 0.00633384320295 0) (0.00135633462047 0.00553127215744 0) (0.00137605514732 0.00604998634857 0) (0.0021665005477 0.00680109003405 0) (0.00164993993649 0.00814801031284 0) (0.00136541104438 0.00947048556958 0) (0.000826107955175 0.0129807098088 0) (0.00128663402905 0.0237843824411 0) (0.000145441235939 0.0307007579923 0) (0.000258089420287 0.0820992375235 0) (-0.0166948932333 0.260323899 0) (-0.0337133568037 0.304449759345 0) (-0.0366647337719 0.265639053112 0) (-0.026519597692 0.219040351298 0) (-0.0130476949855 0.182250078358 0) (-0.00135492864495 0.155863350357 0) (0.0075311419157 0.136847947917 0) (0.0141060721195 0.122360573041 0) (0.0190423301888 0.110360318642 0) (0.0228195846886 0.0993994300778 0) (0.0257282969643 0.0884165344475 0) (0.027849169963 0.0765634439599 0) (0.0292710436238 0.0630659295366 0) (0.0300047753788 0.0474590653961 0) (0.0301761549146 0.0292597087628 0) (0.0311919218909 0.00929067514754 0) (0.0300099024475 -0.00592444785791 0) (0.0268465469975 -0.00900145517999 0) (0.0312100344452 -0.0103566843503 0) (0.036902156756 -0.0107333931296 -1.2818258655e-28) (0.0518484905826 -0.0141544487797 0) (0.0567768384041 -0.0176785900812 0) (0.0569462729801 -0.0238432532453 0) (0.0728238227042 -0.0312112694635 0) (0.090362672281 -0.0190003925469 0) (0.105205814059 0.00697634383886 0) (0.114471274927 0.0342641190784 0) (0.12264418859 0.0558392313046 0) (0.13104437 0.0690064977231 0) (0.140498092561 0.0731798771143 0) (0.151327600752 0.0697880002609 0) (0.163471862501 0.0616695209695 0) (0.176683903814 0.052240794933 0) (0.190668226555 0.0446793659009 0) (0.205126577869 0.0413040584096 0) (0.219748125377 0.0432437053739 0) (0.23420576372 0.0504048332205 0) (0.248194234587 0.0616835877446 0) (0.261511099991 0.0753293466052 0) (0.274121992772 0.0893567055033 0) (0.28616630485 0.101911542374 0) (0.297871342202 0.111533946381 0) (0.309372746272 0.1172932718 0) (0.320655531627 0.1188177223 0) (0.331469517132 0.116240794335 0) (0.341546015864 0.110050142128 0) (0.350932260123 0.100992152622 0) (0.360289633079 0.0898371734881 0) (0.371422094883 0.0772521643804 0) (0.386391064127 0.0639613396347 0) (0.40721048585 0.0501751845589 0) (0.431727888125 0.0362096200348 0) (0.456393264414 0.0230648424476 0) (0.480378726576 0.0107854872244 0) (0.501070338069 0.000503858793871 0) (0.528076427091 -0.00591892057327 0) (0.565791858981 -0.00894571129804 0) (0.603356594102 -0.00921943792314 0) (0.000588597385164 0.0110225157754 0) (0.000922209110093 0.00659654597355 0) (0.000803486659069 0.00628586061974 0) (0.00132995784997 0.0119275552187 0) (0.00100395472254 0.00635820069213 0) (0.00155784747766 0.00818327271837 0) (0.00331858914128 0.0140769721354 0) (0.00256047704611 0.00546003510065 0) (0.00420374567046 0.00589841718049 0) (0.00335780540321 0.00497128726283 0) (0.00276574501696 0.00489325505493 0) (0.00267330549932 0.00565636114658 0) (0.0025772878503 0.00639514416923 0) (0.00154364532186 0.00593920979052 0) (0.00122326291247 0.00636348429232 0) (0.00193732324681 0.00687545190488 0) (0.00186930052679 0.00911374396474 0) (0.00159807255412 0.00983677920844 0) (0.00126385144801 0.0116772121644 0) (0.000733545935926 0.0236857120033 0) (0.000132499044932 0.028406606766 0) (-0.000636843573965 0.0829646043009 0) (-0.0194747097755 0.228292712702 0) (-0.0347181147967 0.311774279105 0) (-0.0386594999665 0.281462722748 0) (-0.0300540465719 0.233151681148 0) (-0.0165922471003 0.19295582433 0) (-0.00424708092459 0.163667694367 0) (0.00534950378413 0.14260951032 0) (0.0124720498078 0.126765740839 0) (0.0178063300607 0.113865871894 0) (0.0219146835074 0.102303545466 0) (0.0251644101706 0.0909016749517 0) (0.027710684325 0.0787430694072 0) (0.0296516198891 0.065009879385 0) (0.0310248759546 0.0491791005656 0) (0.0319674432629 0.030818446014 0) (0.0336892426357 0.01043755834 0) (0.0325704524919 -0.00560580857911 0) (0.029447754382 -0.00849570478009 0) (0.031566909882 -0.00871003022112 0) (0.0403331035712 -0.00833477218222 1.32587172178e-28) (0.0563100621794 -0.00890252850679 0) (0.05996719973 -0.010728756806 0) (0.0665200102778 -0.0178219259215 0) (0.078972405254 -0.0196800322136 0) (0.0942643935285 -0.00465797098196 0) (0.106891206385 0.0204454847838 0) (0.115665604641 0.0457048950236 0) (0.123769294447 0.0656973278209 0) (0.132318732329 0.0778989515553 0) (0.142077558924 0.0818284041221 0) (0.153323441291 0.0789165357974 0) (0.165955779558 0.0718984495262 0) (0.179667198273 0.0639933515429 -6.55714684603e-29) (0.19408017168 0.0581155186342 6.38449114726e-29) (0.208809694997 0.0562944208219 0) (0.223474884819 0.0593903154016 0) (0.237710274759 0.0671063006976 0) (0.251208744353 0.0782334681025 0) (0.263799144558 0.0910309514184 0) (0.275505111672 0.103634715047 0) (0.286539968989 0.114405928153 0) (0.297211159712 0.122162145267 0) (0.307728572758 0.126262727816 0) (0.318126582861 0.126594608499 0) (0.328173475958 0.123445977747 0) (0.337562807228 0.117398910248 0) (0.346261300799 0.109228306256 0) (0.354890042002 0.0997877027489 0) (0.365228906899 0.0899458189632 0) (0.379526670597 0.0804990240379 0) (0.399779486675 0.0717087046073 0) (0.424237106962 0.0635019393614 0) (0.449036630401 0.0558200119339 0) (0.473251666015 0.0484944363018 0) (0.493522586846 0.0418540034724 0) (0.519507078065 0.0382974043615 0) (0.556551704441 0.0361223027365 0) (0.594390031365 0.0361933685704 0) (0.000307709267895 0.0118776657425 0) (0.00107765435115 0.00701387770152 0) (0.00117956979342 0.00701679434483 0) (0.00148857271219 0.0120540708057 0) (0.00119830317603 0.0067885201029 0) (0.00156617209571 0.00846991119781 0) (0.00301883238374 0.014332047701 0) (0.0026119479995 0.00601643342311 0) (0.00393786499354 0.00605948468557 0) (0.00343030067463 0.00560109319544 0) (0.0027254377624 0.00513771826956 0) (0.00273713394435 0.00585099658474 0) (0.00273585470303 0.00667449764866 0) (0.00180559365025 0.00653519036663 0) (0.00128125290118 0.00662888845288 0) (0.00190795427505 0.00697796855494 0) (0.00228426035532 0.0104900381074 0) (0.00173104578157 0.0100307929911 0) (0.00191730667584 0.0106152569141 0) (0.000457692011514 0.0224849071231 0) (-0.000250912127762 0.0283651565969 0) (-0.00318994704374 0.0779697313312 -1.67183189499e-28) (-0.00999427168911 0.113892809879 4.48054118469e-28) (-0.0318610919406 0.297018930036 0) (-0.0405132286259 0.292945850825 0) (-0.0346188117424 0.247643723051 0) (-0.021068799631 0.204693564112 0) (-0.00775681052781 0.172319210282 0) (0.00285111112502 0.148968479622 0) (0.0107763807724 0.131606122028 0) (0.0167108953712 0.117732213845 0) (0.021308378319 0.105551728481 0) (0.0250324618247 0.0937582185846 0) (0.0281420588316 0.0813512023112 0) (0.0307864914034 0.0674759474905 0) (0.033030750213 0.0515347878522 0) (0.0350448934436 0.0331292225439 0) (0.0377357912662 0.0125944671666 0) (0.0381888524914 -0.00501819074246 0) (0.0364144542442 -0.00907408200258 0) (0.0324986461087 -0.00779240138195 0) (0.0487271780598 -0.00584806274021 0) (0.0606156827946 -0.00220996959852 0) (0.0657843062543 -0.00321516034078 0) (0.0759735440875 -0.00953638664001 0) (0.083681648068 -0.00729718927983 0) (0.0978029083561 0.00876195492802 0) (0.108613980307 0.0327394642772 -1.04111573447e-28) (0.11684851352 0.056388070978 0) (0.124787175636 0.0751697917676 0) (0.133388045619 0.086725846999 0) (0.143338449175 0.0906738978126 0) (0.154863476126 0.0884324064276 0) (0.167817327542 0.0826133856322 0) (0.181837839415 0.0762235989298 0) (0.196484004012 0.0719120987876 0) (0.211312394804 0.0714353856873 0) (0.225904596116 0.0754188652801 0) (0.239887369545 0.0834068134552 0) (0.252974739855 0.094130747985 0) (0.265036654553 0.105895799871 0) (0.276149785705 0.116978936782 0) (0.286585111195 0.125954838271 0) (0.29671099775 0.131895319837 0) (0.306799206839 0.134415474535 0) (0.316919057755 0.13361460515 0) (0.326840773588 0.129923209486 0) (0.336179263256 0.123989255566 0) (0.344751236942 0.116599983584 0) (0.352992848906 0.10858173973 0) (0.36250806046 0.100836960295 0) (0.375561862252 0.0941246808249 0) (0.394169167653 0.0889554891084 0) (0.417182413643 0.0853147074942 0) (0.440918891245 0.0828421354138 0) (0.463979264799 0.0802546487775 0) (0.482937225457 0.077293275438 0) (0.506646588868 0.0756544705719 0) (0.54142231655 0.0744971553686 0) (0.578571420857 0.0752106200018 0) (0.000184150697088 0.0123925396141 0) (0.00110398582419 0.0071706479114 0) (0.00128563486802 0.00746465304129 0) (0.00173824971031 0.0124025178301 0) (0.00140799842335 0.00704045720221 0) (0.00159507684637 0.00849313936372 0) (0.00263441797415 0.0145348831819 0) (0.00260439500638 0.00676788762489 0) (0.00357975370947 0.00620988063729 0) (0.00363101393316 0.00645056886428 0) (0.00275533267782 0.00532503796887 0) (0.00284404812898 0.00586196498985 0) (0.00269694442763 0.00670518303924 0) (0.00220706956072 0.00736998440407 0) (0.00159040267685 0.00681051131222 0) (0.00210638862932 0.00712149772439 0) (0.00260599768263 0.0109580538318 0) (0.0017228060162 0.0101177612426 0) (0.00259978561297 0.0108083832688 0) (0.000265100854517 0.0205746576179 0) (-0.000573653317585 0.0283854992915 0) (-0.0069168509967 0.0670756228133 0) (-0.00924190455342 0.100568786887 0) (-0.0256583035565 0.305805013376 0) (-0.0428404681224 0.31344341193 0) (-0.0402956593742 0.266385944909 0) (-0.0268481017873 0.218781523133 0) (-0.0122642850428 0.182387448716 0) (-0.000290756577779 0.15622507373 0) (0.00873200687879 0.137064530173 0) (0.0154946040437 0.122091138855 0) (0.0207527147837 0.109262872344 0) (0.02508228272 0.0971110745517 0) (0.0288536345799 0.0845304616801 0) (0.0323100940268 0.0706230660372 0) (0.0355641138844 0.0547237069745 0) (0.0388169415795 0.0364092189113 0) (0.0423979150339 0.0158983968021 0) (0.047984951466 -0.00396871071262 0) (0.0411921149636 -0.00901481211807 0) (0.0362785906178 -0.00720357602193 0) (0.0666061751466 -0.00303476895149 0) (0.0687216392754 0.00412342729661 0) (0.073351693363 0.00438377348161 0) (0.0821238177936 0.00046684362972 0) (0.0881802873594 0.00429970253147 0) (0.101053035031 0.0208516543171 0) (0.110306359173 0.043820419532 1.02116610032e-28) (0.117968987739 0.0662772934682 0) (0.125655199395 0.0842055579955 -8.1185903661e-29) (0.134212564355 0.0954142040708 0) (0.144246141078 0.0996124575322 0) (0.155923935819 0.0981951391407 0) (0.169052865692 0.0936395165676 0) (0.183222546338 0.0887348252174 0) (0.197944764761 0.0858727770597 0) (0.212741344283 0.0865606966992 0) (0.22718368758 0.0912265716966 0) (0.240917269651 0.0993000297189 0) (0.253697593783 0.109494003744 0) (0.265443938739 0.12018657071 0) (0.276277700489 0.129800570445 0) (0.286503702549 0.137102336305 0) (0.296517564577 0.141372527359 0) (0.306622085297 0.142426321428 0) (0.316902318678 0.140527873545 0) (0.327124774054 0.136226757013 0) (0.336829860229 0.130234766201 0) (0.345669438548 0.123350258065 0) (0.353804237303 0.116387356564 0) (0.362537290419 0.110256198282 0) (0.373996235627 0.105749739244 0) (0.390296368824 0.103548699685 0) (0.410974973548 0.103782146516 0) (0.432907112267 0.105801363959 0) (0.454101216905 0.107844988966 0) (0.471543699754 0.108907970373 0) (0.492701836348 0.109973275708 0) (0.524361575498 0.11053395592 0) (0.559605202824 0.112413187004 0) (7.45926545901e-05 0.0127918543938 0) (0.00110092690372 0.00764989108061 0) (0.00146635987064 0.00789309799496 0) (0.00205741045877 0.0126794762957 0) (0.00145703095756 0.00717226416441 0) (0.0015254362757 0.00824670430621 0) (0.00198764373721 0.0145352388605 -3.11475198366e-29) (0.00255534109637 0.00775959729952 1.60927270044e-29) (0.00345980214454 0.00657090632979 0) (0.00443774086135 0.00837744899923 0) (0.00278111720618 0.00536079357001 0) (0.00301317673277 0.0058107792874 0) (0.00273287635946 0.00663221075998 0) (0.00317551843298 0.00975727231946 0) (0.0017508442574 0.00673566860549 0) (0.00229316737561 0.0072888719766 0) (0.00272449850997 0.0103684252027 0) (0.00161599332643 0.0101131764187 0) (0.00271875834139 0.0111784393842 0) (0.000359890816931 0.0171022305629 0) (-0.000819772630127 0.0288114492312 0) (-0.00601491664626 0.0411680171223 0) (-0.00976342173396 0.0962231134466 0) (-0.0277186313472 0.278390440452 0) (-0.0450364418611 0.340968332613 0) (-0.045948542503 0.29206380294 0) (-0.0337101391478 0.236932894355 0) (-0.0179157871146 0.194740088387 0) (-0.00431855646646 0.164818252125 0) (0.00608058918517 0.143376847614 0) (0.0138962689355 0.127081252745 0) (0.0199827531176 0.113534240544 0) (0.0250367091862 0.101045788555 0) (0.0295401891724 0.0883741838266 0) (0.0338390863796 0.074549052259 0) (0.0381326084628 0.058848090239 0) (0.042635919049 0.0407656841979 0) (0.0474305916694 0.0203449906772 0) (0.0553230266032 -0.000757802174236 0) (0.0467740315104 -0.00804056092281 0) (0.0507199052275 -0.00620063757363 0) (0.0976289118196 0.00099100872293 0) (0.0870938073806 0.0103410064812 0) (0.0865107892876 0.0121573730424 0) (0.0867174825845 0.00952586942684 0) (0.0929823678109 0.014452697728 0) (0.103993823786 0.0314359138126 0) (0.111896155647 0.0537046994773 0) (0.118955771929 0.0753727848854 0) (0.126321807518 0.0927774643904 7.90609313873e-29) (0.134753120819 0.103903894541 0) (0.144772465118 0.108547750364 -6.39415886993e-29) (0.15648974052 0.108072768765 0) (0.169665761525 0.104816671956 0) (0.183849524688 0.101354568112 0) (0.198520031386 0.0998363145555 0) (0.213183649493 0.101548237324 0) (0.227422553906 0.10675817242 0) (0.240919601937 0.114820311376 0) (0.2534836622 0.124461252535 0) (0.265084416515 0.134148440638 0) (0.275875759611 0.142445330471 0) (0.286173692815 0.148281702237 0) (0.296374466211 0.151100639225 0) (0.306792746857 0.150864451159 0) (0.317530268835 0.147958095925 0) (0.328368812172 0.143022752757 0) (0.338806879797 0.136822140073 0) (0.348342125059 0.130161511319 0) (0.356828221579 0.123843204793 0) (0.365157053518 0.118764742257 0) (0.37519182003 0.115753415521 0) (0.389050610756 0.115580128106 0) (0.40700045986 0.118525464228 0) (0.426642386142 0.123786950195 0) (0.445695230636 0.129620242264 0) (0.461321923 0.1344476818 0) (0.479724084279 0.138587437543 0) (0.508130847566 0.141652884199 0) (0.541212805547 0.145738767042 0) (-7.47935926949e-06 0.0130429240797 0) (0.0010692817204 0.00833931476927 0) (0.00193258558832 0.00897110754255 0) (0.00236706761468 0.0123436994098 0) (0.00128642010434 0.0072048677116 0) (0.00136203624127 0.00794515365497 0) (0.00117222892763 0.0139572649955 0) (0.00259080420712 0.00959030277016 0) (0.00336876011837 0.00679044627952 0) (0.00431725395468 0.00811279087832 0) (0.00294254579215 0.0055754430307 0) (0.00302621539471 0.00591356671483 0) (0.00298834494288 0.00681834601572 0) (0.00338982593609 0.00959928796838 0) (0.00169418745731 0.00663578188796 0) (0.00221899335077 0.00747260319104 0) (0.00276516125156 0.00940817430442 0) (0.00148032611156 0.0100920432952 0) (0.00201177250889 0.0115517055691 0) (0.000651537180517 0.0173967965365 0) (-0.00155692507461 0.0287794207175 0) (-0.00303289060046 0.0338999869111 0) (-0.00860529865996 0.0941324164485 0) (-0.0298553491767 0.230758198907 0) (-0.0351856287237 0.354344056179 0) (-0.047930176948 0.31711129952 0) (-0.0401486047676 0.258174754749 0) (-0.024391779842 0.209705645206 0) (-0.00930860457845 0.175131125347 0) (0.00263060923166 0.150797107875 0) (0.0116855049635 0.132847816342 0) (0.0187441672581 0.118442648901 0) (0.0246182953486 0.105603189097 0) (0.0298968023787 0.0929084627094 0) (0.0350177529519 0.0792799254444 0) (0.0402910809116 0.0639224075972 0) (0.046015915644 0.0462687027489 0) (0.0522456950464 0.0261785140849 0) (0.0609524209923 0.00478290810067 0) (0.0671399077352 -0.00789162120482 0) (0.0822159297109 -0.00472622893766 0) (0.113541467476 0.00566829325671 0) (0.100144782399 0.0155906052346 0) (0.0927744991031 0.0178200517808 0) (0.0909323264774 0.0163244729977 0) (0.0973332320888 0.0229623525633 0) (0.106487798666 0.0405326257335 0) (0.113266309565 0.062475729413 0) (0.119724936879 0.0837150426479 0) (0.126732038209 0.100884716493 0) (0.134973459145 0.112153728911 0) (0.144895478804 0.117399944556 6.20195855493e-29) (0.156552664004 0.117951271596 -5.47670156732e-29) (0.169664129889 0.116006557064 0) (0.183747011095 0.113936941944 0) (0.19826057419 0.113671875578 0) (0.212710844318 0.11630783471 0) (0.226704883262 0.121988544181 0) (0.239972818815 0.130026373107 0) (0.252379942709 0.139184901809 0) (0.263941570481 0.148027463911 0) (0.274831932268 0.155244743156 0) (0.285362094983 0.159898611787 0) (0.295914033604 0.161551655837 0) (0.306807227567 0.160269226457 0) (0.318171169605 0.156523701548 0) (0.329830719689 0.151031999514 0) (0.34128580399 0.144610295739 0) (0.351914697001 0.13808148419 0) (0.361276577285 0.132234571262 0) (0.369799109598 0.12792719259 0) (0.37896449889 0.125960858532 0) (0.390764949699 0.127118834754 0) (0.406065852006 0.131796154213 0) (0.423273799459 0.13923398822 0) (0.44005511779 0.147817413919 0) (0.453742655423 0.155691353041 0) (0.469203608564 0.162363972164 0) (0.493824055873 0.167878741514 0) (0.523880807043 0.174528948706 0) (-0.000151288786211 0.0132080320655 0) (0.00128934491578 0.00897585055161 0) (0.00290612683969 0.0107737107284 0) (0.00222006306249 0.0113153230317 0) (0.00104360624042 0.00727663264944 0) (0.0013215051093 0.00809432302906 0) (0.000931431313215 0.0127929193978 0) (0.00277576832436 0.0133293813625 0) (0.00311242875686 0.00692096729185 0) (0.00420000409299 0.00772545770308 0) (0.0033130356004 0.00630046147396 0) (0.00301664190373 0.00613792411364 0) (0.00317770900142 0.00712181095642 0) (0.00325021560265 0.00881469056712 0) (0.00178313530514 0.00685222805046 0) (0.00199755088299 0.0076324024125 0) (0.00267585211303 0.00835516643584 0) (0.00144297169352 0.00978623041821 0) (0.00127071873727 0.0116890584523 0) (0.00105252088393 0.0146139635954 0) (-0.00197850749065 0.0276929111736 0) (-0.00241590834877 0.0318493851923 0) (-0.00853719811392 0.0823695411201 0) (-0.0136819389249 0.111400414636 1.8000447601e-28) (-0.0273312700912 0.353644979885 -1.50405445812e-27) (-0.0483493081427 0.34371448757 0) (-0.0457120563177 0.283258602642 0) (-0.0315481451951 0.227757189099 0) (-0.0153315331837 0.187538644056 0) (-0.00177677392527 0.159584282042 0) (0.00866942029113 0.139544311961 0) (0.0168169759409 0.124056657221 0) (0.0235757319692 0.110788983546 0) (0.0296397791995 0.0980968770732 0) (0.035525018372 0.084755176236 0) (0.0416103951549 0.0698613646408 0) (0.0482805924186 0.0528045532645 0) (0.0553711209951 0.0333024920454 0) (0.0643706831465 0.0122770355551 0) (0.07554597533 -0.00262688547647 0) (0.0990512093677 -0.00180330962585 0) (0.119019972803 0.00971502566077 0) (0.10526944229 0.0189572721837 0) (0.0960203490502 0.0211639247552 0) (0.0945737223745 0.0212698941167 0) (0.100841687606 0.0300125760036 0) (0.108421111516 0.048345697402 0) (0.114295010437 0.070284658768 0) (0.12019335258 0.0913841282862 0) (0.126833067047 0.108553504343 0) (0.134841662575 0.120144365211 0) (0.144598909389 0.126109918261 0) (0.15611029239 0.1277386357 5.31363268075e-29) (0.169060193684 0.127095010024 0) (0.182943387034 0.12636148882 4.22751573267e-29) (0.19721068135 0.127272698179 0) (0.211378467043 0.130767736795 0) (0.225085981605 0.136899326181 0) (0.238112658682 0.144964263018 0) (0.250376711807 0.153775609065 0) (0.261931789083 0.161987208495 0) (0.272963498642 0.168393546313 0) (0.283769869536 0.17215161676 0) (0.294713369627 0.17290040638 0) (0.306118180709 0.170767618826 0) (0.318153534714 0.166283034377 0) (0.330713048794 0.160224537601 0) (0.343341888644 0.153462612736 0) (0.355350676309 0.146850982882 0) (0.36605153853 0.141176897898 0) (0.375411523101 0.13725661706 0) (0.384451518878 0.135853528677 0) (0.394911222508 0.137737019559 0) (0.408034485551 0.143404862132 0) (0.422975145502 0.152234081795 0) (0.437520060298 0.162782170328 0) (0.44921030702 0.173022738195 0) (0.461530754964 0.18161060248 0) (0.481519829234 0.188831977876 0) (0.507080908419 0.197678693903 0) (-0.000164970397908 0.0133910482858 0) (0.00201325776834 0.0120278282052 0) (0.00299650323464 0.0114602670241 0) (0.00150305272272 0.00894067222684 0) (0.000969852870067 0.00751653959159 0) (0.00133957649407 0.00832420777589 0) (0.00113143996757 0.0116148029189 0) (0.00243494506398 0.0151538040109 -2.23877373113e-28) (0.00292234533348 0.00735831291487 0) (0.00391534412764 0.007401531897 0) (0.00354985584458 0.00711504818493 0) (0.0029629167116 0.00632825670824 0) (0.00322120745841 0.00722251203061 0) (0.00319226814892 0.00823721724399 0) (0.00212070122294 0.00726335999092 0) (0.00190730194483 0.00759588751062 0) (0.00289667559043 0.00819368837756 0) (0.00155063007357 0.00955126528124 0) (0.000774490193705 0.0115544586366 0) (0.00141297214937 0.0125094534948 0) (-0.00200945203205 0.0244202315262 0) (-0.0028879957126 0.0319459799695 0) (-0.0110071035886 0.068289412645 0) (-0.0153797609334 0.111247998174 0) (-0.0242943374579 0.300879174565 0) (-0.0453491637503 0.375454089443 0) (-0.0509851410853 0.312691540514 0) (-0.039518803435 0.24950488751 0) (-0.0225565280956 0.202466204917 0) (-0.00732404912862 0.170004877141 0) (0.00467057626213 0.147326217266 0) (0.0140221308712 0.130446603141 0) (0.0217103706529 0.116596549867 0) (0.0285420718795 0.103862955477 0) (0.0351113397188 0.0908406299156 0) (0.0418217714928 0.076480623893 0) (0.0491260933941 0.0600717929865 0) (0.0566054517346 0.0412009757834 0) (0.0653794944838 0.0204419325725 0) (0.0798143709171 0.00380870565329 0) (0.105109571861 0.00296491995212 0) (0.11845138621 0.0133036991999 0) (0.106021847058 0.0211182779058 0) (0.0975600917814 0.0232049896189 0) (0.0973213687272 0.0252118477117 0) (0.10332720464 0.0360340862229 0) (0.109699523701 0.0551852045554 0) (0.114877570845 0.0773258937602 0) (0.120288696299 0.0984887480893 0) (0.126578812732 0.115832082623 0) (0.134331457948 0.127876153979 0) (0.14387216745 0.134638243066 0) (0.155166042808 0.137363551203 0) (0.167871396339 0.137989155502 0) (0.181470202487 0.138527131267 -4.10892320188e-29) (0.195414294544 0.140544834036 -3.42562757839e-29) (0.209237449101 0.144855505853 0) (0.222613663528 0.151449341853 0) (0.235369330905 0.159625765003 0) (0.247469882525 0.168250178239 0) (0.25900117076 0.176053257886 0) (0.270155836999 0.181906214092 0) (0.281217002882 0.185027545427 0) (0.292527872875 0.185100885175 0) (0.304419463708 0.182293766699 0) (0.317110709291 0.177186400825 0) (0.330585526398 0.170628589105 0) (0.34447430748 0.163574479443 0) (0.35807340137 0.156947064489 0) (0.370498552357 0.151561465007 0) (0.381268440888 0.148191011923 0) (0.390865653367 0.147512894341 0) (0.400642649533 0.150177996755 0) (0.411993016837 0.156629404693 0) (0.424724331713 0.166250732614 0) (0.436944149487 0.177666270055 0) (0.446489218066 0.188777474907 0) (0.455463451509 0.197599678614 0) (0.469553268934 0.204660146555 0) (0.487782602946 0.21422103559 0) (-5.70851196775e-05 0.0139244174844 0) (0.00171951375448 0.0137744299222 0) (0.00168698194945 0.00835476969996 0) (0.0016223231761 0.00834194088924 0) (0.00118099266921 0.00787198899997 0) (0.00143500799927 0.00864472546604 0) (0.00126348864001 0.0107436145856 0) (0.0019820896685 0.0159384256328 2.21066550713e-28) (0.00275270672026 0.00817754494015 0) (0.00354604795531 0.00738045305532 0) (0.00410935305805 0.00899966895084 1.17381817438e-28) (0.00295528713535 0.00658406060809 0) (0.00328780572227 0.00713504296444 0) (0.00339608876716 0.00807600265565 0) (0.00277570069461 0.00805874612289 0) (0.00203698096573 0.00751519536166 0) (0.00298557569102 0.00824266250915 0) (0.00281400853939 0.0110003170701 0) (0.000538422142669 0.0112668996744 0) (0.00177360094787 0.0121285267225 0) (-0.00226231519684 0.0211609557295 0) (-0.00387794306145 0.0328053310117 0) (-0.0080350051558 0.0399549496945 0) (-0.0182224182453 0.110685855887 0) (-0.0304111544427 0.246567628258 0) (-0.0371310391983 0.405711341709 0) (-0.0574554992048 0.346067753969 0) (-0.0482264527562 0.275812279781 0) (-0.0311834474498 0.220527681601 0) (-0.0142319829535 0.182394785611 0) (-0.000502266136376 0.156360395699 0) (0.0102017264205 0.137683674361 0) (0.0188799730392 0.123024605047 0) (0.0264575767201 0.110129015422 0) (0.0336261068105 0.0973812659617 0) (0.0408133598197 0.0835608346769 0) (0.0485007177562 0.0677868194275 0) (0.0560298792322 0.049520625448 0) (0.0643483813037 0.0289532093668 0) (0.0807033210107 0.0110635463008 0) (0.104890243306 0.00868727032552 0) (0.11440525332 0.0167095587321 0) (0.104278983873 0.0227473598037 0) (0.0978404929918 0.024833855716 0) (0.0989945860003 0.0287635319072 0) (0.104747396948 0.0414257316291 0) (0.110269861341 0.0613540418814 0) (0.114942551384 0.0837975581489 0) (0.119956924888 0.105148501506 0) (0.125933244223 0.122781802043 0) (0.133423265641 0.135363973095 0) (0.142710568913 0.142961504134 0) (0.153729598749 0.146772079102 0) (0.166121799366 0.148613420957 0) (0.179365336852 0.150346930976 0) (0.192920532235 0.153400272469 3.3383293656e-29) (0.206342563071 0.158490284301 -2.63904235063e-29) (0.21933932302 0.165568729135 0) (0.231778992683 0.173950315501 0) (0.243666871286 0.182550719026 0) (0.255114339518 0.190161348784 0) (0.266316271041 0.195703929208 0) (0.277536723186 0.198427792716 0) (0.289093671929 0.198031346697 0) (0.301315430992 0.194696076728 0) (0.314463011268 0.189032562044 0) (0.328613366769 0.181947859058 0) (0.34350987983 0.174469214049 0) (0.358497396326 0.167575051376 0) (0.372587107347 0.162077268398 0) (0.384943429041 0.15865070894 0) (0.395542501266 0.157818613336 0) (0.405308983298 0.160076038546 0) (0.415605090715 0.165853362297 0) (0.426688001696 0.174725901541 0) (0.436915384941 0.185587111121 0) (0.444082275947 0.196516135581 0) (0.44851401723 0.205153260454 0) (0.45330336579 0.211785383775 0) (0.458352395341 0.220644804904 0) (2.68634848922e-05 0.0145864039188 0) (0.00100280124818 0.0132096992899 0) (0.00184337362958 0.0113313401827 0) (0.00194886551858 0.00830663059884 0) (0.00154139805857 0.00816383088179 0) (0.00145954720887 0.00888261554082 0) (0.00120217917395 0.00997621967028 0) (0.00130143763299 0.0162738763592 0) (0.00236116236588 0.0092655939696 0) (0.00328117470626 0.0077784149901 0) (0.00400540801297 0.00918891711886 -1.13927476966e-28) (0.00327033591324 0.00716352172907 0) (0.0033783062979 0.00708518584612 0) (0.00368493213902 0.00803201795364 0) (0.0039825281189 0.0105569667833 1.42783120973e-28) (0.00199037038199 0.00746809454233 0) (0.00262588287217 0.00831490363214 0) (0.00332251728864 0.0105517967348 0) (0.00100936543638 0.010558948198 0) (0.00159572504218 0.0122984914735 0) (-0.000183456154498 0.0168553834141 0) (-0.00581203427891 0.0321769231631 0) (-0.0059739195473 0.0356152625856 0) (-0.0161676298546 0.0916837154197 0) (-0.0230178611187 0.121942919429 0) (-0.0342486345628 0.351241523461 0) (-0.0630247358438 0.393039810666 0) (-0.0573190112568 0.309240427618 0) (-0.0412898753902 0.24297107956 0) (-0.0227120880775 0.197323340144 0) (-0.00704891005568 0.166888831732 0) (0.00520015295101 0.145855442312 0) (0.0149755056643 0.130080997072 0) (0.0233111405308 0.116840068257 0) (0.0310140079716 0.104252709248 0) (0.0385700278227 0.0909130390097 0) (0.0464739773455 0.0757426584725 0) (0.0538628224614 0.0580455994851 0) (0.0616357512574 0.0376320437582 0) (0.0788182346618 0.0188098401853 0) (0.100931638253 0.0148395601835 0) (0.108410830369 0.0201659904681 0) (0.101035449532 0.0244084945492 0) (0.0970599691022 0.0266274037443 0) (0.0995443735674 0.0323182532382 0) (0.105130883434 0.0465023088693 0) (0.110112183513 0.0671090523402 0) (0.114448217253 0.0898796713991 0) (0.119161940389 0.111480185604 0) (0.124870925385 0.129468582303 0) (0.132104552589 0.142631579644 0) (0.141115478369 0.151068392569 0) (0.151817044418 0.155924681366 0) (0.163842615591 0.158907268964 0) (0.176674211271 0.161746453531 0) (0.189785957877 0.165756563484 0) (0.202755743306 0.171584797275 2.57963540737e-29) (0.215322114944 0.179165193257 0) (0.227388327532 0.187837471586 -1.46495521121e-29) (0.238992092354 0.196564619213 0) (0.250264945999 0.204184614674 0) (0.261401924056 0.209648035108 0) (0.272647919613 0.212210031331 0) (0.284295080005 0.211559032252 0) (0.296666341412 0.207868530619 0) (0.310065546544 0.201764348663 0) (0.324677173503 0.194208089775 0) (0.340401676305 0.186319877751 0) (0.356715789682 0.17918457759 0) (0.372631718918 0.173694567892 0) (0.387035751605 0.170537203429 0) (0.399335790141 0.170214292073 0) (0.409779516869 0.173202239985 0) (0.419261105448 0.17998327036 0) (0.428076486361 0.190157589498 0) (0.434797710702 0.20196135238 0) (0.437314213512 0.211887631804 0) (0.434336829699 0.215920957782 0) (0.426761549508 0.213643345815 0) (0.417691161812 0.211825941929 0) (-0.000225095699982 0.0152653673397 0) (0.00135101837253 0.0138420954186 0) (0.00210482683293 0.0114766021533 0) (0.00174247103639 0.00818842349838 0) (0.00140519480387 0.00812658549353 0) (0.00129574343496 0.0089558777215 0) (0.00114900901163 0.00971060722131 0) (0.00055331634739 0.0156693266344 0) (0.00209381383536 0.0117602979725 0) (0.00322891368453 0.00818592452757 0) (0.00388228203564 0.00873555870796 0) (0.00366240909164 0.00801958313243 0) (0.00327505557822 0.00709153112727 0) (0.00369714700095 0.00800506555771 0) (0.00366755319442 0.00910140497353 -1.13816470078e-28) (0.00228812017633 0.00750246459193 0) (0.00225379029252 0.00807084801773 0) (0.00329400775081 0.00909227751013 1.12002667643e-28) (0.00144187014116 0.0101837734978 0) (0.000426590148722 0.0122942308217 0) (0.000607773198043 0.0142707974027 0) (-0.00507556854828 0.0273968598095 0) (-0.00643566630818 0.0350858243604 0) (-0.0184461466871 0.0746989360599 0) (-0.0254331605145 0.12512632956 0) (-0.0359092030896 0.284880348806 0) (-0.0584851198275 0.432806701404 0) (-0.0685755196933 0.34283493786 0) (-0.0532505127676 0.269106109408 0) (-0.0331312791393 0.215102435652 0) (-0.015225153119 0.179187490236 0) (-0.0011492031469 0.155092747163 0) (0.00989923477194 0.137796594016 0) (0.0190653861741 0.1239673291 0) (0.0272880460851 0.111377591087 0) (0.03514675603 0.0984087500141 0) (0.0431744931245 0.0837873485671 0) (0.050367125885 0.0666326328617 0) (0.0575737135886 0.046360874059 0) (0.0747950815545 0.026824043316 0) (0.0947760399377 0.0212028862972 0) (0.101378362581 0.0238579243207 0) (0.0968390884799 0.0264761791549 0) (0.0953388464641 0.02892027457 0) (0.0990079634011 0.036116709746 0) (0.104542443392 0.0514961740515 0) (0.109232026614 0.0726534900218 0) (0.113376324392 0.0957249934196 0) (0.117882951805 0.117589595951 0) (0.123376085446 0.135956786213 0) (0.130369317918 0.149707444332 0) (0.139093628482 0.158957075035 0) (0.149449849813 0.164795001659 0) (0.161070841832 0.16882533394 0) (0.17344832396 0.172665717706 0) (0.18607309721 0.177541163605 0) (0.198544593437 0.184052969823 0) (0.210626590989 0.192135276444 0) (0.22224930426 0.20116128741 1.43831054456e-29) (0.233474543951 0.210139714172 0) (0.244447972335 0.217945462087 0) (0.255361494893 0.223543345218 0) (0.266437726513 0.226177615073 0) (0.277935362174 0.225509669108 0) (0.290154407522 0.221688409537 0) (0.303413868133 0.215339956692 0) (0.317973173422 0.207469828983 0) (0.33386582943 0.199287934814 0) (0.350700813092 0.191989842788 0) (0.367515737938 0.186540308635 0) (0.382947247016 0.183575482774 0) (0.395809897255 0.183380722521 0) (0.405630295604 0.185998952885 0) (0.413000906229 0.191268266086 0) (0.419070457937 0.197767777635 0) (0.424300828677 0.201815815627 0) (0.427939753036 0.198178654343 0) (0.425331555436 0.184105147723 0) (0.409612681752 0.166135539467 0) (0.389417758112 0.174808434369 0) (-0.000617984173829 0.015609706058 0) (0.00136159398708 0.0148311381574 0) (0.00188790007855 0.010340370254 0) (0.00142178792667 0.00801876285904 0) (0.00115598991346 0.00807850732644 0) (0.00121820529713 0.00896415278193 0) (0.00119860296211 0.00969912389735 0) (0.000344459560134 0.0141053891809 0) (0.00171327513851 0.014795474467 0) (0.00327020747456 0.00898730059731 0) (0.00383482482973 0.00847198988317 0) (0.00460017869893 0.0106623671323 0) (0.00328612322738 0.00746466460564 0) (0.00361954554658 0.00769844025841 0) (0.00402638363777 0.00883611031441 0) (0.00330790329147 0.00877814610533 0) (0.00214223995156 0.00790033199069 0) (0.00326659597157 0.00881156476738 -1.04867988223e-28) (0.00290342583669 0.0111685314991 0) (4.9140956184e-05 0.0115525603187 0) (0.00132774343874 0.0131240272403 0) (-0.00446876161128 0.0230533052935 0) (-0.00713168222692 0.0349216233154 0) (-0.0117565502044 0.0415134934059 0) (-0.0264882800862 0.107546424816 0) (-0.0417644674649 0.16297245554 0) (-0.0517039202877 0.460426136577 0) (-0.0774377002393 0.399272262252 0) (-0.0660941563116 0.305393157265 0) (-0.0456753668696 0.237869462174 0) (-0.0253014201905 0.194030729523 0) (-0.00902342020857 0.165698702243 0) (0.00356137215606 0.146279647335 0) (0.0137001772495 0.1315255272 0) (0.0224920399815 0.1187220449 0) (0.0306418681267 0.105979901719 0) (0.0387531245176 0.0918250296479 0) (0.0458132124212 0.0751915503416 0) (0.052442554882 0.0551065884085 0) (0.0691864358367 0.0349674438249 0) (0.0873919722584 0.02770499417 0) (0.0938339159126 0.0279218976676 0) (0.0919958878708 0.0291651957063 0) (0.0927734040192 0.0318788243387 0) (0.0974689496377 0.0402955512385 0) (0.103062911903 0.056569893208 0) (0.107653014758 0.0781407579244 0) (0.111726199043 0.101457017787 0) (0.116111609436 0.123567544598 0) (0.121441301252 0.142305480868 0) (0.128217214836 0.156621929109 0) (0.136655956692 0.166633526405 0) (0.146653034801 0.173369379668 -3.19089697307e-29) (0.157846739055 0.178338418801 3.09627549567e-29) (0.169742210506 0.183062054902 0) (0.181847450718 0.188696856061 0) (0.193779979121 0.19581825823 0) (0.205321672291 0.20437528859 0) (0.216420332101 0.213781656458 0) (0.227152745338 0.22309111023 4.12425951845e-30) (0.237671932395 0.231208740967 0) (0.2481628409 0.237102930479 0) (0.258822794218 0.239993485708 0) (0.269870698646 0.239498034619 0) (0.281569665271 0.235719346677 0) (0.294232925031 0.229256448951 0) (0.308176619554 0.221127000466 0) (0.323573631824 0.212601088567 0) (0.340230936674 0.204968173315 0) (0.35736681411 0.199273262128 0) (0.373629234286 0.196127392852 0) (0.387577658088 0.195620749715 0) (0.398435757799 0.197382001206 0) (0.407090357318 0.200615008546 0) (0.416332556978 0.203365590395 0) (0.428647991708 0.20186342489 0) (0.441495321727 0.192147043099 0) (0.438589983123 0.176439592245 0) (0.398504799844 0.16738417155 0) (0.339550058359 0.143264523767 0) (-0.000909708820865 0.0156946641889 0) (0.000690185559108 0.0162244342075 0) (0.00116711840549 0.00934124269626 0) (0.0012640492178 0.00814020671175 0) (0.00138508679887 0.00859061926072 0) (0.00140156586678 0.00907670037052 0) (0.00136266577364 0.0096762153047 0) (0.000596617318031 0.0123916756285 0) (0.000827688071429 0.0166467106561 0) (0.00265348513683 0.00978361393762 0) (0.00373040425935 0.00878805080666 0) (0.00403350643298 0.00938018563207 0) (0.00371384092975 0.0082328368841 0) (0.00338685404457 0.00732591546643 0) (0.00395042461279 0.0082660379316 0) (0.00390891537988 0.00975694183806 0) (0.00225244060861 0.00771414158635 0) (0.00256179239251 0.0084901879625 0) (0.00318383293097 0.010203102437 0) (0.000853792998632 0.0109058932358 0) (0.00101538579455 0.0129136420234 0) (-0.000794380818295 0.0159911987634 0) (-0.00884523752928 0.0305714106244 0) (-0.0103269926044 0.0390942292689 0) (-0.0262621520959 0.0880344361291 0) (-0.0338516212092 0.137400763393 0) (-0.0575505442787 0.400197243707 -7.41477322234e-28) (-0.0747614757134 0.461969371999 1.31281732315e-27) (-0.0801504616241 0.346391621404 0) (-0.0605755108301 0.265675327495 0) (-0.0376261883819 0.212014242711 0) (-0.0186459501762 0.178065320191 0) (-0.00413582755763 0.155731068141 0) (0.00720579245544 0.139598437856 0) (0.0166817031519 0.126302668324 0) (0.0251674410704 0.113606650339 0) (0.0333668652335 0.0998119568387 0) (0.0404040690014 0.08366773751 0) (0.0465179252606 0.0638617341825 0) (0.0624452219304 0.0431994204557 0) (0.0793504509449 0.0343437059605 0) (0.0860672988206 0.0324450310384 0) (0.0866773812853 0.0325745336748 0) (0.0894520093752 0.0355614633504 0) (0.0950301842365 0.044922319931 0) (0.100777585725 0.0618308426405 0) (0.10541054972 0.083681712441 0) (0.109509852441 0.107171519132 0) (0.11384937421 0.129488743818 0) (0.119066070442 0.148566626671 0) (0.125652374043 0.163405676426 0) (0.133816033551 0.17411044433 0) (0.143452838831 0.181646508165 0) (0.154210689751 0.187434126172 0) (0.165609889789 0.192912284992 0) (0.177174137557 0.199186154949 0) (0.188533958328 0.206821219312 0) (0.199481008943 0.215792727025 0) (0.209970627855 0.225560203194 0) (0.220084810068 0.2352221083 -4.07182930967e-30) (0.229976476922 0.243709418241 2.57787911162e-30) (0.239819036455 0.249987395027 0) (0.249780992288 0.253243040165 0) (0.260034695284 0.25303989755 0) (0.27079008351 0.249421579715 0) (0.28232449637 0.242945139145 0) (0.294966690025 0.234628162432 0) (0.308978877532 0.225803427301 0) (0.324327210154 0.217890698658 0) (0.34039655178 0.212107958076 0) (0.355854396444 0.209202114799 0) (0.368968982261 0.20925704911 0) (0.378412710607 0.21162453949 0) (0.384508217137 0.214941846514 0) (0.389687334712 0.216836072587 0) (0.394292082315 0.214180271302 0) (0.386867317352 0.205051420722 0) (0.34173955706 0.18868432334 0) (0.233518331384 0.0992080622935 0) (0.2100936704 0.0489257527481 0) (-0.000964328291644 0.0155684432341 0) (1.37466677189e-05 0.0165111145316 0) (0.000349526875426 0.00969410609226 0) (0.00123953059204 0.00856484608296 0) (0.00194317058417 0.00886721231376 0) (0.00172117090757 0.00911718738634 0) (0.00157556318687 0.00964538052978 0) (0.000949244979827 0.0108753856897 0) (-7.18292365231e-05 0.0167621483118 0) (0.00194733622165 0.0121612720313 0) (0.003714969372 0.00960119520981 0) (0.00411750703748 0.00923926355357 0) (0.00489097947472 0.0109983016714 0) (0.00348127982596 0.0076030304911 0) (0.0036586728105 0.00785954859879 0) (0.00411230836198 0.00923197246967 0) (0.00327389033186 0.00882539884328 0) (0.00204807469466 0.00827839894603 0) (0.00311800642911 0.0095235781075 0) (0.00233678180627 0.0111678917979 0) (-0.000438621971489 0.0122835483515 -8.15044203328e-29) (0.000289452535527 0.0151013609723 0) (-0.00724883636123 0.0257155088886 0) (-0.0101174321597 0.0374718117958 0) (-0.019625595024 0.054824187825 0) (-0.0330023555396 0.115851016789 0) (-0.074423925627 0.344187347958 0) (-0.0652794858376 0.500325757391 0) (-0.099899876332 0.402777739027 0) (-0.0779468303668 0.303115763536 0) (-0.0526824658836 0.234819316362 0) (-0.030336937074 0.192895988006 0) (-0.0133377333542 0.166482036297 0) (-0.000439050153612 0.148351853195 0) (0.00991562442117 0.134198253274 0) (0.0188359818325 0.121317184878 0) (0.0271675789136 0.107746367316 0) (0.0342931669481 0.0920389025822 0) (0.0400266914267 0.0726127626577 0) (0.0549260309101 0.0515441614011 0) (0.0709842471603 0.0411517161419 0) (0.0782278819823 0.0374725979663 0) (0.08098275021 0.0367267491386 0) (0.0854587106565 0.0399623570315 0) (0.0917976650087 0.0500200172568 0) (0.0977699022771 0.0673446251808 0) (0.102547026002 0.0893526052791 0) (0.106748158376 0.112939682354 0) (0.111105366935 0.135412294617 0) (0.116255546733 0.154784365422 0) (0.122682379309 0.170088463187 0) (0.130588696227 0.181405978504 0) (0.139874711444 0.189636218817 0) (0.150200518374 0.19611599864 0) (0.161101699051 0.202212729914 0) (0.172114741281 0.208993126031 0) (0.18287707441 0.217024282 0) (0.193181320849 0.226315500237 0) (0.202979896523 0.236375509038 0) (0.212349680371 0.246347221762 -1.49295409061e-30) (0.22143485009 0.255185043236 -2.55383786465e-30) (0.230391020246 0.261847638035 0) (0.239352369185 0.265484911361 0) (0.248435551543 0.265600113279 0) (0.25777719275 0.262167763265 0) (0.267579451435 0.255686886249 0) (0.278119771057 0.247151872269 0) (0.289662481288 0.237927992665 0) (0.302236561116 0.229530884356 0) (0.315308762955 0.22331063759 0) (0.327514822725 0.220091334718 0) (0.336760521544 0.219829615579 0) (0.340870782244 0.221319583631 0) (0.338644003296 0.221979716831 0) (0.329544620234 0.218277090243 0) (0.308044026158 0.206723905034 0) (0.255918973887 0.180278992944 0) (0.155227003853 0.0906699097199 0) (0.0589062343314 0.0117621129651 0) (0.036838585548 0.0207918117838 0) (-0.00090635719037 0.0153620310154 0) (0.000364019537479 0.0165653595555 0) (0.000622509903108 0.00969792952771 0) (0.00119786605488 0.012071235807 0) (0.00171823373283 0.00919284658214 0) (0.00198878022759 0.00908155763165 0) (0.00176899183918 0.00953350463404 0) (0.00134805671888 0.0100413633607 0) (-0.000236242149531 0.0154621499119 0) (0.000694996009834 0.0151495012717 0) (0.00316670967041 0.0104300495296 0) (0.00403495668947 0.00935454540799 0) (0.00450620075094 0.00963725957697 0) (0.00412664485447 0.00876178791989 0) (0.0032944368182 0.00770523920144 0) (0.00386130158236 0.0085673051031 0) (0.00381225316492 0.00969737449255 0) (0.00203202545435 0.00815245495181 0) (0.00225385531161 0.00872962319822 0) (0.00309223896583 0.0104897337076 0) (8.27131693629e-05 0.011356750156 7.68099617275e-29) (0.000278037286882 0.0136601813351 0) (-0.00170752638474 0.0165335370484 0) (-0.0111744136822 0.0332994000287 0) (-0.0128571621299 0.0411483101816 0) (-0.0353437555152 0.0989108863061 0) (-0.0424958711357 0.166260005922 0) (-0.0737915030112 0.444728867545 0) (-0.0955302835792 0.505842489927 0) (-0.0943230929891 0.350088650147 0) (-0.0699200136823 0.263500451901 0) (-0.0442930397604 0.210955667801 0) (-0.0242252702719 0.178967992871 0) (-0.00929132963851 0.158024675335 0) (0.00223540165152 0.142543398682 0) (0.0117518708252 0.129187417236 0) (0.0202974798224 0.115666379772 0) (0.0276026741198 0.100314350744 0) (0.0331414164859 0.0813507288218 0) (0.046889415844 0.0600209088481 0) (0.0624727926679 0.0481839293318 0) (0.0703884424895 0.043018310775 0) (0.0749722224734 0.0415979905571 0) (0.080873130659 0.0450403977035 0) (0.0878722315923 0.0555837673452 0) (0.0941186175331 0.0731461716946 0) (0.0991086915985 0.0952023529532 0) (0.103468281295 0.118811761124 0) (0.107894794606 0.141382988511 0) (0.113019630795 0.160994976799 0) (0.119317529245 0.176698288771 0) (0.126989134295 0.18854222293 0) (0.135941950201 0.197357492191 0) (0.145849610259 0.204401315905 0) (0.1562619833 0.210977304995 0) (0.166724664505 0.218122576809 0) (0.176875620888 0.22641316822 0) (0.186499693188 0.23589682767 4.15809383677e-30) (0.195536147818 0.246132874841 0) (0.204046279216 0.256308044835 1.47939777374e-30) (0.212156398466 0.265398751237 0) (0.219997343688 0.272355612561 0) (0.227663444424 0.276289471871 0) (0.235208052476 0.276639082579 0) (0.242678261464 0.273299720324 0) (0.250167848563 0.266691461891 0) (0.257846442273 0.257746974892 0) (0.265901526488 0.247801891889 0) (0.274340290939 0.238375215789 0) (0.282650405408 0.230823797582 0) (0.289425287717 0.225893224846 0) (0.292228838954 0.223211792539 0) (0.287991008059 0.220759390262 0) (0.273553340851 0.214495562907 0) (0.244308640837 0.199067972994 0) (0.1918906474 0.165576768004 0) (0.113605245042 0.0875758376219 0) (0.0463850828502 -0.0106416179308 0) (0.0168534489369 -0.00848773038767 0) (0.00837358976768 0.0042216691389 0) (-0.000921825297284 0.0152177324363 0) (0.000242507830505 0.0170506024034 0) (0.00125227990808 0.00985312070965 0) (0.00136511137952 0.0103405862472 0) (0.00133024009911 0.00949357329862 0) (0.00196432390272 0.00928511499447 0) (0.00194175175942 0.00949312336652 0) (0.00179815041921 0.00993326935664 0) (0.000624672308336 0.0129742321891 0) (-0.000880019245315 0.0172570984186 0) (0.00190493807891 0.0121268737182 0) (0.00389752735429 0.0104411970595 0) (0.00433695534181 0.00938221129091 0) (0.00434511276758 0.0097682522684 0) (0.00349939853931 0.00887126873545 0) (0.00326189587902 0.00833652609604 0) (0.00381278051082 0.00958734146322 0) (0.00379062882133 0.0107844578048 0) (0.00204129996678 0.00841270057197 0) (0.00309685445878 0.0096945781531 0) (0.00240567383445 0.0117449588264 0) (-0.000866429805835 0.0128325367087 0) (0.000201072841692 0.0151908058179 0) (-0.00932720639906 0.0280687041854 0) (-0.0119845286796 0.0361292888531 0) (-0.0225190945223 0.0538819393647 0) (-0.0412574625456 0.13065941459 0) (-0.0837004823213 0.396860939685 0) (-0.0686909756564 0.51619233071 0) (-0.118885724115 0.408809383252 0) (-0.09042384918 0.300673247406 0) (-0.0612652019484 0.23356570984 0) (-0.0371680999571 0.193859335269 0) (-0.0194874085933 0.168956970022 0) (-0.00635990815945 0.151519198793 0) (0.00399300639072 0.137324925253 0) (0.0128821187289 0.123640659037 0) (0.0204399960995 0.108533284814 0) (0.0260007492352 0.0900729618188 0) (0.0385049837598 0.0686609623717 0) (0.0538863152249 0.0554806898294 0) (0.0625911155674 0.0490752433466 0) (0.0686881615954 0.0471373340525 0) (0.0757701179556 0.0507370589354 0) (0.0833459502948 0.0615919198023 0) (0.0898968489495 0.0792484928253 0) (0.0951437003619 0.101258895498 0) (0.099701919319 0.124820735784 0) (0.104237891159 0.14743302967 0) (0.109372402767 0.167227138929 0) (0.115570572486 0.183260555587 0) (0.123032638092 0.19554339427 0) (0.131675322065 0.204835802751 0) (0.141186275095 0.212317785409 0) (0.15112809913 0.21923403475 0) (0.161051676457 0.226597085624 0) (0.170589476498 0.234995376394 -5.82077727445e-30) (0.179510549869 0.244516297658 -4.11516354025e-30) (0.187731514213 0.254769193075 0) (0.19528820407 0.264983327981 0) (0.202280074458 0.274156179875 0) (0.208806492524 0.281230000502 0) (0.214917612931 0.285276042799 0) (0.220599919353 0.285665219221 0) (0.225803543548 0.282202968934 0) (0.2304965465 0.275205490382 0) (0.234708276764 0.265496159364 0) (0.238502959317 0.254301907512 0) (0.241821251257 0.243029347558 0) (0.244154905185 0.232890695287 0) (0.244086574715 0.224370211097 0) (0.238918140295 0.216550487032 0) (0.224711596586 0.206477280229 0) (0.196448879992 0.18867045631 0) (0.147898133503 0.1551713392 0) (0.0800182076511 0.0873075615328 0) (0.0276630789177 -0.00978964988196 0) (0.00570296344626 -0.0210610601477 0) (0.00704621695395 -0.01460965607 0) (0.00282806964683 -0.00640071166407 0) (-0.000933725414908 0.0150173215277 0) (-0.000524398754745 0.017672606984 0) (0.00116658789533 0.0105108603307 0) (0.00159883020841 0.00952238192079 0) (0.00181372616344 0.0111011239866 0) (0.00209506813157 0.00951743654221 0) (0.0021510191628 0.00955338240998 0) (0.00214038598634 0.00994232427283 0) (0.00150096313245 0.0110639208074 0) (-0.000650610892391 0.0162131925458 0) (-0.00045352378372 0.0166969158209 0) (0.00255369789518 0.0106417094628 0) (0.00416511010227 0.0100469930286 0) (0.00408966325594 0.00968339887554 0) (0.00415442697435 0.0107776248492 0) (0.00319982936892 0.00866804104891 0) (0.00340657522011 0.00867047154856 0) (0.00417063349968 0.0100820222783 0) (0.00266682547965 0.00864035345499 0) (0.00205088006544 0.0089761937043 0) (0.00333673020892 0.010794101491 0) (0.000390878307851 0.0119386556303 0) (6.16657243863e-05 0.0136221141518 0) (-0.00290690026891 0.0172790265092 0) (-0.0154608320229 0.0332674492088 0) (-0.0175618033728 0.0477592317616 0) (-0.0418261696891 0.110162449756 0) (-0.052521771206 0.186506382127 0) (-0.076312420553 0.468536344058 0) (-0.128723070146 0.529523163871 0) (-0.113615491939 0.355028021418 0) (-0.0816378031881 0.263617557871 0) (-0.0525564457437 0.212338476092 0) (-0.0312136408967 0.181669429916 0) (-0.0159149554144 0.161368663714 0) (-0.00440199614771 0.145857377731 0) (0.00501385374557 0.131750114567 0) (0.012901977001 0.116753924687 0) (0.018698197668 0.098787808546 0) (0.029899485264 0.0775394386582 0) (0.045242416277 0.0630263283144 0) (0.0548479575689 0.055619186505 0) (0.0621667452199 0.0532801433435 0) (0.0702184309525 0.0569876100134 0) (0.0783012684142 0.0680134614096 0) (0.085172208839 0.0856495845254 0) (0.0907010834303 0.1075344802 0) (0.0954843883523 0.130985767309 0) (0.100159360515 0.153583817317 0) (0.105332000155 0.173502404433 0) (0.111456889381 0.189797312955 0) (0.118735017284 0.20243401892 0) (0.127093559592 0.212100267741 0) (0.136234213227 0.219899935004 0) (0.145730654019 0.227021010538 1.08259599192e-29) (0.155135625692 0.234453149794 0) (0.164070980876 0.242797234312 5.76101043406e-30) (0.172283245484 0.252178752296 0) (0.179658422929 0.262254698533 0) (0.186198466482 0.27229486253 0) (0.191968655473 0.281316932462 0) (0.197032395588 0.288255152547 0) (0.20139585261 0.292141600888 0) (0.204983896533 0.292277381441 0) (0.207658785043 0.288369670407 0) (0.209272081253 0.280610386626 0) (0.209718148528 0.269675396066 0) (0.20893792184 0.256622973106 0) (0.206811962687 0.242667236437 0) (0.202874957692 0.228785568227 0) (0.195802413726 0.215106897402 0) (0.182804722023 0.200103013485 0) (0.159179928936 0.180014869818 0) (0.119253500263 0.148350818915 0) (0.0628539583401 0.0962963951846 0) (0.0147318544539 0.000982593332735 0) (-0.0014848227952 -0.0203879952791 0) (0.000177070136593 -0.0176305586165 0) (0.00259327975655 -0.015897980022 0) (0.00107493473691 -0.0100711843209 0) (-0.000763843254978 0.0146447379864 0) (-0.000903104025796 0.0177468725442 0) (0.000951730348331 0.0143971114475 0) (0.00179172051732 0.0095481367908 0) (0.00224989196836 0.0120127490596 0) (0.00191191420068 0.0100757718713 0) (0.00211800763994 0.00968131221832 0) (0.00217571144581 0.010047128682 0) (0.00196783761548 0.0105953370283 0) (0.000643031610754 0.0142490773505 0) (-0.00105665812906 0.0162304971831 0) (0.00118974349633 0.0162212023441 0) (0.00304652169634 0.0107663240953 0) (0.00379357289242 0.00985250515144 0) (0.00390291440118 0.0103090754715 0) (0.00414538484174 0.0109157288877 0) (0.00352056338251 0.0089006031638 0) (0.00409167762994 0.00924157322987 0) (0.00391350593972 0.010314846827 0) (0.00217763308407 0.00940927136726 0) (0.00299614966619 0.00998381676519 0) (0.00261934585344 0.0116455561793 0) (-0.00151712291692 0.0142117317553 0) (-0.0021533492293 0.0172293538763 0) (-0.00631158586379 0.0209635272899 0) (-0.0162149621843 0.0423218384112 0) (-0.0222628692295 0.0561325715888 0) (-0.0571861842047 0.148217254487 0) (-0.0861501082406 0.40071164378 0) (-0.0956798798219 0.48682486378 -7.4097198195e-28) (-0.158663338091 0.415905943246 9.15174618071e-28) (-0.107328927116 0.302121357754 0) (-0.0712067406126 0.235600830294 0) (-0.0447829723862 0.196831762133 0) (-0.0265321389158 0.172416041811 0) (-0.0134384332747 0.154941077707 0) (-0.00325770718263 0.140078972387 0) (0.00506508433759 0.125033847095 0) (0.0112598372949 0.10751480928 0) (0.0212270132246 0.0866830004833 0) (0.0365463526111 0.0708328352393 0) (0.0471228377508 0.0626172431253 0) (0.0554400348071 0.0599590879985 0) (0.0642811915808 0.0637283802222 0) (0.0728121781981 0.0748131314479 0) (0.0800076143788 0.092337726798 0) (0.0858303515323 0.114030080405 0) (0.0908540668529 0.137315284103 0) (0.0956881302375 0.1598477853 0) (0.100920710857 0.179835774254 0) (0.106995004736 0.196326728083 2.33456493553e-29) (0.11411345847 0.209237252079 -2.26722914563e-29) (0.122214543205 0.219181008631 0) (0.131013857122 0.227185613074 -1.19858349988e-29) (0.140094780045 0.234382436093 -1.07017282817e-29) (0.149009284047 0.241737156957 0) (0.157364815381 0.249860459092 0) (0.164880459977 0.258912157558 0) (0.171405750546 0.268593240598 0) (0.176902800838 0.278211664216 0) (0.181398072299 0.286805159216 0) (0.184918138126 0.293302078017 0) (0.187430635447 0.296699061695 0) (0.188812827693 0.296231417757 0) (0.188861515319 0.291509981035 0) (0.187339676927 0.282598820937 0) (0.184034223762 0.270011982444 0) (0.178785638392 0.254608274091 0) (0.171440851916 0.237356523376 0) (0.161655004396 0.218925610824 0) (0.148410189339 0.19899161487 0) (0.129216946859 0.175306706734 0) (0.0994127612184 0.143492337656 0) (0.0561653592018 0.0969728471216 0) (0.013771680655 0.0296066385657 0) (-0.00389639804702 -0.0147746944829 0) (-0.00526933124863 -0.0167635149619 0) (-0.00180798452344 -0.0144258228709 0) (-3.29139085148e-05 -0.0158290687451 0) (0.000534232498043 -0.0112828369521 0) (-0.000614521735421 0.0140771329899 0) (-0.00064640157106 0.0176483736531 0) (7.63271355475e-05 0.015860136331 0) (0.0012622784137 0.0100077831774 0) (0.00174941021506 0.00965971356058 9.56035869491e-30) (0.0018692445418 0.0102264571515 4.47307882231e-32) (0.0020919927347 0.00992904259288 -1.07982454899e-29) (0.00212755871556 0.0102326881967 0) (0.00218984468566 0.0107884704136 0) (0.00140717704384 0.0125181703487 0) (-0.000416686002283 0.0165056784772 0) (-0.000773223897935 0.0154580329554 0) (0.001494987977 0.0122795894306 0) (0.00338264288734 0.0109496003556 0) (0.00360206237365 0.0100135981318 0) (0.00415976438097 0.0108883514771 0) (0.00387924417628 0.00992214574998 0) (0.00347947711881 0.009474528479 0) (0.00360453599391 0.0102758691382 0) (0.00345138843706 0.01140888352 0) (0.00202700074015 0.0106122254758 0) (0.00242585990031 0.0119875464369 0) (0.00113202283352 0.0133824603285 0) (-0.00366550780519 0.016584138253 0) (-0.0037692289059 0.0201306964178 0) (-0.0144467334973 0.0361730522355 0) (-0.0186411281763 0.0472097277088 0) (-0.0552702267079 0.119497489827 0) (-0.0557232797169 0.17336078039 0) (-0.115648993442 0.445255808845 0) (-0.134393157941 0.573888538267 0) (-0.132625096763 0.357707252552 0) (-0.0916956067743 0.266087312991 0) (-0.0601800032607 0.215421280589 0) (-0.0383160841789 0.185103114786 0) (-0.0231598366218 0.164787568564 0) (-0.0119225934277 0.148730679517 0) (-0.0030244293832 0.133427446859 0) (0.00369059986082 0.116273810894 0) (0.0126883571294 0.0959667067301 0) (0.0276904633361 0.0790450542607 0) (0.0393771747623 0.0700478031983 0) (0.0485398916772 0.0671120959978 0) (0.0580171888865 0.0709008796301 0) (0.066946667086 0.0819545680772 0) (0.0744627011016 0.0992953334425 0) (0.0805815958603 0.12073887181 0) (0.0858522583183 0.143809676871 0) (0.0908573344866 0.166230086335 0) (0.0961652746965 0.18623639591 0) (0.102207267331 0.202862706104 0) (0.109187660251 0.215973567788 0) (0.117056817054 0.226106894303 0) (0.125544175787 0.234213059753 1.18466721236e-29) (0.134241953146 0.241365164542 0) (0.142699773055 0.248501798099 0) (0.150508480169 0.25623874783 0) (0.157356879029 0.264764917477 0) (0.163054694823 0.273820867371 0) (0.16752099495 0.282750591125 0) (0.1707418274 0.290612930951 0) (0.17270932553 0.296334896683 0) (0.173362362314 0.298885572867 0) (0.172550759676 0.297445103249 0) (0.170038351759 0.291540486244 0) (0.16554434635 0.281120133455 0) (0.158805198391 0.266545509123 0) (0.149634457545 0.248477260661 0) (0.137957916643 0.2276373389 0) (0.123767923744 0.204417267999 0) (0.106797718917 0.178206924881 0) (0.0853845953794 0.146757237435 0) (0.055065192495 0.106962902811 0) (0.018033541205 0.0562225239302 0) (-0.00217699540049 -0.00861745622001 0) (-0.00915158532936 -0.0125772469204 0) (-0.00556884395117 -0.0137777784063 0) (-0.00306070958179 -0.0123855521125 0) (-0.00134623585993 -0.0134130288594 0) (0.000223409195674 -0.0113638250992 0) (-0.000630829232398 0.0134924587281 0) (-0.000791038716236 0.0179116708053 0) (-0.000824326525691 0.0152901180847 0) (0.000386667066265 0.0116427343663 0) (0.00186269257064 0.010809535208 0) (0.00241459995364 0.0105212502636 0) (0.00228829760758 0.00990774396202 0) (0.00216836814185 0.0103566523406 0) (0.00218528427177 0.0109758606122 0) (0.00185255529535 0.0116108348537 0) (0.000298345013907 0.0151340090361 0) (-0.00104352558538 0.0150699566785 0) (-0.000129486898024 0.0160391044635 0) (0.0020298119266 0.011513114899 0) (0.00358079926233 0.0109782419527 0) (0.00382262226025 0.0105134654347 0) (0.00403484076322 0.011119903264 0) (0.00324420157225 0.0101349712583 0) (0.00309692142599 0.010265087411 0) (0.00307537306911 0.0110638939076 0) (0.00290657208232 0.012648942284 0) (0.00133909037541 0.0119101238405 0) (0.00156940858785 0.0133034563609 0) (0.000260192935762 0.0145477628622 0) (-0.00228156954021 0.0182936102671 0) (-0.00506424503456 0.0224153384218 0) (-0.0184951489068 0.0408519757083 0) (-0.0268879925097 0.0610727259742 0) (-0.0650645398124 0.136953653866 0) (-0.0699441464903 0.221978022332 0) (-0.0943802190674 0.544647599615 -4.88779957074e-28) (-0.171578979245 0.438762659612 7.18654678239e-28) (-0.116102648652 0.307986044496 0) (-0.0782180053828 0.238929252439 0) (-0.0516084983056 0.200044770402 0) (-0.0337027417797 0.175692418096 0) (-0.0210156867639 0.157856141543 0) (-0.0113454017022 0.142007582629 0) (-0.00401041104193 0.125090826722 0) (0.00435519339576 0.105368281892 0) (0.0187505433948 0.0876640910901 0) (0.0315791131378 0.077888958752 0) (0.0415084540997 0.074686111732 0) (0.0514838328184 0.0784523227724 0) (0.0607692364782 0.0894020175109 0) (0.0685953021357 0.106501376293 0) (0.0750058245466 0.127648916781 0) (0.0805230911963 0.150463493793 0) (0.0857042979751 0.172730194568 0) (0.0910971178788 0.192708300705 2.42281325846e-29) (0.0971204718012 0.209414826373 0) (0.103980885129 0.222659810399 0) (0.111641105889 0.232903898964 0) (0.119844524871 0.241018576459 0) (0.128191969721 0.248015939849 0) (0.136230277391 0.254802932059 0) (0.143533172535 0.261994527873 0) (0.149758504151 0.269802617435 0) (0.154675437263 0.278002829113 0) (0.158159735519 0.285973805052 0) (0.160158510107 0.292798355646 0) (0.160635214791 0.297409776789 0) (0.159513583857 0.298762423053 0) (0.156641222669 0.296000215687 0) (0.151788052518 0.28859220592 0) (0.144682416747 0.276405228348 0) (0.135076019367 0.259690871948 0) (0.12283627306 0.238962978634 0) (0.108064130996 0.214756380246 0) (0.091194977514 0.187240795518 0) (0.072777240492 0.155700008189 0) (0.0516120599249 0.118562040878 0) (0.0231258915469 0.0731652025654 0) (0.00103237460852 0.0105430678224 0) (-0.00746253591499 -0.00676855995462 0) (-0.00809660361398 -0.00952260048065 0) (-0.00571650497282 -0.0114121818775 0) (-0.00343039898331 -0.0105555639824 0) (-0.00195752310236 -0.0118316817864 0) (-0.000101253372057 -0.010748850572 0) (-0.000673243673551 0.0127694822038 0) (-0.00173677973878 0.0179057863691 0) (-0.00141236884216 0.0149788157223 0) (-2.1216475064e-06 0.0140243746779 0) (0.00169382554287 0.0115138741047 0) (0.00243598242426 0.0100355751739 0) (0.00235984407205 0.00922281195024 0) (0.00229917902166 0.0100342782869 0) (0.00218628888628 0.0109826053912 0) (0.00213537412245 0.011758969585 0) (0.00114618765976 0.0128263515922 0) (-7.69631679923e-05 0.0166729752165 0) (-0.000313249737111 0.0137493807082 0) (0.00050458316294 0.0171430178402 0) (0.00221011049934 0.0131383099107 0) (0.00333671711456 0.0111847918937 0) (0.00368352352039 0.0109756639355 0) (0.00366458546982 0.0116106780549 0) (0.00292428954736 0.0108341723446 0) (0.00263498978821 0.0109363972559 0) (0.00250433111296 0.0115681972936 0) (0.00197868649125 0.0132316599098 0) (0.000249689035033 0.012697044784 0) (0.00147226008939 0.0140361631956 0) (-0.00166413984732 0.0176894843621 0) (-0.00471407145198 0.0225992981353 0) (-0.0100428175459 0.0268883174824 0) (-0.0257553086303 0.0548451643541 0) (-0.0345903926741 0.0730856343413 0) (-0.0689966611943 0.180223650917 0) (-0.0981151288746 0.506032307423 0) (-0.142059867041 0.602553988502 0) (-0.140186110377 0.367745233169 0) (-0.0985488784283 0.269245612527 0) (-0.0667688444623 0.218057353682 0) (-0.045310334198 0.188063699275 0) (-0.0306338771121 0.167673610331 0) (-0.0199060563072 0.150886850724 0) (-0.0118380260896 0.134013690555 0) (-0.00375862511501 0.114865476031 0) (0.00978957999202 0.0966982758672 0) (0.0237076677586 0.0860953698794 0) (0.0343868550317 0.0826345631184 0) (0.0447394775708 0.0863344016845 0) (0.054341872778 0.0971215589545 0) (0.0624625858485 0.113933018884 0) (0.0691552812247 0.134745162621 0) (0.07491352087 0.157267257797 0) (0.0802704484426 0.179343238275 -2.73683052921e-29) (0.0857524839575 0.199251200617 -4.43659270612e-29) (0.091766293433 0.215988408983 1.99186185393e-29) (0.0985208128043 0.229308652352 0) (0.105991572381 0.239593894012 0) (0.11393625814 0.247634832078 0) (0.1219646989 0.254379146395 0) (0.129621620168 0.260696887035 0) (0.136464669601 0.267195664357 0) (0.142122074556 0.274104127233 0) (0.146324043189 0.281228909679 0) (0.14890530058 0.287983241788 0) (0.149777852988 0.293479110667 0) (0.148883960936 0.296667382522 0) (0.146146333594 0.296506219968 0) (0.141433537692 0.29213067409 0) (0.134554011697 0.282989661346 0) (0.125284435683 0.268916818658 0) (0.113435591002 0.250111376685 0) (0.0989855769241 0.227004200306 0) (0.0822930884943 0.200009448838 0) (0.0642919797808 0.169126419949 0) (0.0460752880314 0.133643713311 0) (0.0266285747637 0.093180970416 0) (0.00444105371813 0.0480109480284 0) (-0.00199626664425 -0.00459140014588 0) (-0.0090118489379 -0.0053166447106 0) (-0.00759857464824 -0.00769689967156 0) (-0.00579328278971 -0.00941799855815 0) (-0.00361103115162 -0.00885589553842 0) (-0.00236001203665 -0.0103093854043 0) (-0.0002887767196 -0.0096220577275 0) (-0.000611850163555 0.0117058425423 0) (-0.00211039073953 0.0172923406882 0) (-0.00205497862717 0.0171827363556 0) (-0.000520998509913 0.0151913124892 0) (0.00104359540194 0.0136634517962 -8.79624562665e-29) (0.00212643183605 0.0107028143016 0) (0.00247493788536 0.00920749524894 0) (0.00264577747742 0.00997143485681 0) (0.00239414144236 0.0108190634597 0) (0.0021679929791 0.0116562625172 0) (0.00176920272388 0.0124671290683 0) (0.000389013154803 0.0147913481394 0) (-0.000243171599159 0.013963460856 0) (5.08612823839e-05 0.0147585474654 0) (0.000659445434677 0.0142280442875 0) (0.00256268884725 0.0145973107036 0) (0.00302215978655 0.0113872785098 0) (0.0032376949399 0.0112555900913 0) (0.00320610185439 0.0120134064815 0) (0.00257865556914 0.011513878505 0) (0.00216093449978 0.0114429991054 0) (0.00187754231506 0.0121267893991 0) (0.00137984191457 0.0139315861052 0) (0.00107865234448 0.0133479790364 0) (0.000307596174943 0.0152773206019 0) (-0.00661804621422 0.020370344905 0) (-0.00852420903341 0.0243414963992 0) (-0.0253282449989 0.0442438336882 0) (-0.0311364157868 0.0622330940955 0) (-0.0750415216947 0.147673919603 0) (-0.0727030880273 0.249376081786 0) (-0.0959409617559 0.578988304851 0) (-0.17973353602 0.438528968897 0) (-0.123365587967 0.306715148024 0) (-0.0848407742912 0.240025198145 0) (-0.0584574619061 0.202472854772 0) (-0.0409667452845 0.178493852405 0) (-0.0287526563851 0.160224828245 0) (-0.0197830492031 0.14311522718 0) (-0.0116697800997 0.124454999516 0) (0.00090479003291 0.106139579167 0) (0.0157574654234 0.09462842874 0) (0.0272008446307 0.0909146838841 0) (0.0378424071303 0.0945041154509 0) (0.0477240256147 0.105082306697 0) (0.0561217951596 0.121567029849 0) (0.0630835904772 0.14201092011 0) (0.0690732659081 0.164208894414 0) (0.0746010597289 0.186061173518 2.69468278487e-29) (0.080172283806 0.205861240927 0) (0.0861814013088 0.22258482796 0) (0.0928399752744 0.235928350815 0) (0.100136636168 0.246193969667 0) (0.107843868558 0.25408964094 0) (0.115581441168 0.260495079949 0) (0.122893572792 0.266237956609 0) (0.12932420402 0.271911983479 0) (0.134474891105 0.277756628789 0) (0.138040334414 0.283606320632 0) (0.139818278349 0.288910235663 0) (0.139690779794 0.292816804397 0) (0.137586672043 0.294308320389 0) (0.13344025571 0.292368011743 0) (0.127159771927 0.286151708835 0) (0.118616581305 0.275125581936 0) (0.10766402962 0.259132645694 0) (0.0942036073362 0.238362185514 0) (0.0783683736079 0.213203122491 0) (0.0608486890341 0.184007478662 0) (0.04316108864 0.150687825326 0) (0.0267300218132 0.112585448263 0) (0.00981460051119 0.0704017061934 0) (-0.00686463353493 0.0291468797419 0) (-0.0056709009174 -0.00284381225863 0) (-0.00992780660937 -0.00421633771141 0) (-0.00777291371988 -0.0058756595091 0) (-0.00589349929046 -0.00732436350004 0) (-0.00402030215245 -0.00759176479394 0) (-0.00258437427679 -0.00853882042418 0) (-0.000448380930255 -0.00829060298159 0) (-0.000413021006991 0.0106787244754 0) (-0.00167624992599 0.0164289020391 0) (-0.00236494621683 0.0172835478794 -1.1616724073e-28) (-0.00129119634355 0.0160544529536 0) (0.000111119458518 0.0144621877323 9.62555740013e-29) (0.0014919854787 0.0118630459536 0) (0.00249504794023 0.0102258723427 0) (0.00278691964208 0.00987131630928 0) (0.00261124008632 0.010669162646 0) (0.0022390545348 0.0114435887744 0) (0.00191511366651 0.0122794491455 0) (0.000938212627454 0.0129740559709 0) (-0.000316171616173 0.0164547677311 0) (-0.000311564294807 0.0144937226031 0) (-0.000241406782052 0.0165003456427 0) (0.000717860883141 0.0129409799325 0) (0.00232673439431 0.0134124026554 0) (0.00275894035066 0.0117161580707 0) (0.00282225227619 0.011622751792 0) (0.00282635354481 0.0124701074618 0) (0.00207746202578 0.0122413637067 0) (0.00130940297231 0.0124938307083 0) (0.00119279087113 0.0131646067608 0) (0.00106313908885 0.0149749552868 0) (0.000636243276353 0.015893851914 0) (-0.00158080922265 0.0166660990545 0) (-0.00698461177051 0.0211673394273 0) (-0.0123042423495 0.0265209032786 0) (-0.0312458787497 0.0512720219782 0) (-0.0407509493125 0.0797047232028 0) (-0.0814749086144 0.205343082715 0) (-0.108034261655 0.523605083393 0) (-0.18820194039 0.651408932796 0) (-0.153759186393 0.367801524785 0) (-0.106997666434 0.269880806218 0) (-0.07373716211 0.220194302553 0) (-0.0522614891012 0.19081870636 0) (-0.0379625570511 0.17024166658 0) (-0.0278421149982 0.152490254493 0) (-0.0194082971007 0.134150489514 0) (-0.00772976632603 0.115892032876 0) (0.00766273244836 0.103540771812 0) (0.0199686667993 0.0994941544064 0) (0.0308492757895 0.102925443654 0) (0.040973566434 0.113256758971 -4.72997842056e-29) (0.0496306738666 0.12938096646 0) (0.0568457399823 0.149428743785 0) (0.0630546289269 0.171274902664 0) (0.0687448521425 0.192873710032 0) (0.074401686724 0.212531699782 0) (0.0804072347611 0.229201849636 0) (0.0869757996811 0.242522755169 0) (0.0941093129424 0.252716003829 0) (0.10159564492 0.260405122989 0) (0.109065825849 0.266398450983 0) (0.116065896938 0.271476044211 0) (0.1221294199 0.276211524226 0) (0.126835433303 0.280849879356 0) (0.129847833516 0.285251008052 0) (0.130932647043 0.288902606121 0) (0.12994788094 0.290998200358 0) (0.126816898597 0.290566483275 0) (0.121497200963 0.286637486125 0) (0.113952570762 0.278416347058 0) (0.104136853052 0.265420645054 0) (0.0920038034429 0.247539423426 0) (0.077577996684 0.224989133967 0) (0.0611915594393 0.198159209949 0) (0.0439262585348 0.167390968642 0) (0.0279717265464 0.132673656786 0) (0.0147380143959 0.0940141975723 0) (0.00100654978641 0.0525170109849 0) (-0.00498776887068 0.0070103110914 0) (-0.0115464138565 0.000231789851248 0) (-0.0107569190063 -0.00219714771045 0) (-0.00867532414333 -0.00401451752392 0) (-0.0061972161228 -0.0052543805862 0) (-0.00430865133989 -0.00573845878501 0) (-0.00300667829205 -0.00729822771944 0) (-0.000443670800814 -0.00642052817033 0) (-0.000136760473645 0.00994206874596 0) (-0.000940653980678 0.0153055803497 0) (-0.00218653592225 0.0173061917095 1.16461582838e-28) (-0.00200960207576 0.0171905688989 0) (-0.000904128290747 0.0155839355927 0) (0.000512777139364 0.0130995289354 0) (0.0019886275856 0.0108206992839 0) (0.00268731675525 0.0098492301393 0) (0.00273090554089 0.0104364326655 0) (0.00234046608419 0.0111917716857 0) (0.00189404066731 0.0119620442367 0) (0.00150939096997 0.0128454035451 0) (0.000411653808123 0.0131701940864 0) (-0.000519471465101 0.0169329615069 0) (-0.000784064592167 0.0139578610526 0) (-0.00119654909098 0.0179402741413 0) (0.000799066059961 0.0132000078956 0) (0.00225505389461 0.0134568135673 0) (0.00227436703694 0.012340873165 0) (0.00251044253221 0.0126234700723 0) (0.00187425059482 0.0129474380355 0) (0.00108986281971 0.0145368575454 0) (0.000538615418658 0.0135969071094 0) (0.000850368242594 0.0144737051844 0) (2.63095781551e-05 0.0162089453887 0) (-0.00108819711558 0.017789972959 0) (-0.00363629516841 0.0184126164577 0) (-0.0107014558892 0.0261629482886 0) (-0.0169555024654 0.0324831469661 0) (-0.0392018232046 0.0680726864082 0) (-0.0799058969329 0.15602915384 0) (-0.0830576094788 0.25594135063 0) (-0.152130883817 0.714973408875 0) (-0.196604872431 0.435756154464 0) (-0.132483732939 0.306887479926 0) (-0.0911826936115 0.241990338507 0) (-0.0646452449554 0.205157017817 0) (-0.0476033012323 0.181194352048 0) (-0.0360149724539 0.162250878434 0) (-0.0269964969253 0.143976245999 0) (-0.0160001358642 0.125880084352 0) (-0.000520734144627 0.112838894473 0) (0.0127180077807 0.108350501327 0) (0.0238197709832 0.11156909749 0) (0.0341477871096 0.121619484646 4.63335716889e-29) (0.0430474182019 0.137353930073 0) (0.0504976278127 0.156981074445 0) (0.056911881721 0.178451130404 0) (0.0627534341463 0.19976911689 0) (0.0684894501239 0.219253609009 0) (0.0744894282802 0.235834098572 0) (0.0809702227619 0.249091496268 0) (0.0879470837268 0.259166587013 0) (0.0952238259448 0.266597182462 0) (0.102444300747 0.272117277261 0) (0.109159141716 0.276454554951 0) (0.1148954942 0.280156993672 0) (0.119214728099 0.283470535587 0) (0.121755400201 0.286279106814 0) (0.122257630265 0.288112492056 0) (0.120561623948 0.28821896773 0) (0.116593082022 0.285689411232 0) (0.110343038897 0.279622700475 0) (0.101842249509 0.269301288162 0) (0.0911374009799 0.254325996468 0) (0.0782917548463 0.234665372934 0) (0.0634684326559 0.210597388301 0) (0.0472204602069 0.182548224946 0) (0.0309845021247 0.150879720662 0) (0.0173093065563 0.115750671937 0) (0.00697622975833 0.0782077435221 0) (-0.00377382545304 0.0410550453802 0) (-0.00411855537351 0.0029739167153 0) (-0.0110244567403 0.00160509268236 0) (-0.0108963146034 -0.000212588995711 0) (-0.00910648372089 -0.00182907463708 0) (-0.00740983070838 -0.0033697887651 0) (-0.00464358119231 -0.00390317831281 0) (-0.00333549901369 -0.00529869962382 0) (-0.000499192850317 -0.00484913409714 0) (9.67159681104e-05 0.0101392445089 0) (-0.000187284205335 0.0141741085367 0) (-0.00156461342672 0.016866830441 0) (-0.00212193740248 0.0171116708305 0) (-0.00181755712286 0.0166542359467 0) (-0.000422071282371 0.0142646833641 0) (0.00118618684496 0.0132212206691 0) (0.00221034439026 0.0104029672224 0) (0.0026570792434 0.0101575905711 0) (0.00243353727867 0.0108564055901 0) (0.00193343056737 0.0115928860938 0) (0.00138899457654 0.0124245655459 0) (0.000847014276893 0.0134198652888 0) (-0.000367493021137 0.0145257097732 0) (-0.000782793994007 0.0142794512679 0) (-0.00101922196976 0.0146832155443 0) (-0.000862005716626 0.0178512471382 0) (0.00078175376899 0.0135799413344 0) (0.00104889683512 0.0141495107571 0) (0.00135830317977 0.0151283028325 0) (0.00158564829796 0.0134978732799 0) (0.00108673310264 0.0137900721181 0) (0.000355569071331 0.0146145552433 0) (1.49607360224e-06 0.0146976273493 0) (0.000199353037188 0.0155618109304 0) (-0.0020268258799 0.0174958088417 0) (-0.00400607534627 0.0189611600907 0) (-0.0071521428168 0.0202361318543 0) (-0.0133557338695 0.0293206160342 0) (-0.025398430554 0.0478658192972 0) (-0.0444279940481 0.0795966548886 0) (-0.102406785492 0.202253422154 0) (-0.162406336682 0.631591085829 0) (-0.212700415245 0.648183085282 0) (-0.161308614325 0.366613232643 0) (-0.111548209542 0.270813811559 0) (-0.0784917182876 0.22238211197 0) (-0.0578219241679 0.193436712025 0) (-0.0443281298522 0.172545313059 0) (-0.0344504784238 0.153971409781 0) (-0.0238601064432 0.136050935183 0) (-0.0086802502489 0.122493112181 5.20109162185e-29) (0.00548146956942 0.11745570816 0) (0.0168160032919 0.12040955336 0) (0.027303780679 0.130146232036 0) (0.0364292532551 0.145466624605 0) (0.0440954107851 0.164650775071 0) (0.0507003266639 0.18572329927 0) (0.0566804292412 0.2067349289 0) (0.0624870116849 0.226016352619 0) (0.0684769518984 0.242473501039 0) (0.0748689687374 0.255630305015 0) (0.0816913733417 0.265547092845 0) (0.0887643707707 0.272675251796 0) (0.0957462523776 0.277672027268 0) (0.102195237963 0.281208641171 0) (0.107636261965 0.283802603608 0) (0.111618199336 0.285697022226 0) (0.113759886002 0.286799189689 0) (0.11378136595 0.28668533148 0) (0.111510956753 0.28466892995 0) (0.106883977763 0.2799193135 0) (0.0999332622063 0.271626227316 0) (0.09076283631 0.259175102938 0) (0.0795124738149 0.242274674403 0) (0.0663489128338 0.220992463686 0) (0.0515743977924 0.195684783688 0) (0.035984646951 0.166840368434 0) (0.021359816887 0.134869075039 0) (0.0103206747835 0.10006573537 0) (0.00244628353733 0.0643888744421 0) (-0.00702226705189 0.0332613116935 0) (-0.00582309810901 0.00302810817364 0) (-0.0113677868246 0.00202310331895 0) (-0.0110285850629 0.000965692318459 0) (-0.00921008682811 -0.000162394875461 0) (-0.00794529620091 -0.000980308038175 0) (-0.0063253095086 -0.00227285471257 0) (-0.00324005612491 -0.00302688911316 0) (-0.00055285129928 -0.00258896731414 0) (0.00010430057375 0.0106241088516 0) (9.97276253019e-05 0.0132738247949 0) (-0.000999377017254 0.0161355838707 0) (-0.00183060926119 0.0168799822184 0) (-0.00210067385536 0.0167494795359 0) (-0.0013065864449 0.0158125353935 0) (0.000186630567955 0.0130484097338 0) (0.00150390925457 0.0120894237583 0) (0.00225424642361 0.0103731976797 0) (0.00244834369228 0.0105765223421 0) (0.00199752850187 0.011191882662 0) (0.00137713195147 0.0119546527128 0) (0.000703160614411 0.0128519514558 0) (-0.000274546798684 0.0138577371712 0) (-0.00125095595632 0.0158266548597 0) (-0.00101813958873 0.0148968357496 0) (-0.00142821560066 0.0161351929951 0) (-0.00114046602792 0.015107359256 0) (-0.000210643265696 0.0149925740131 0) (0.000226198818161 0.0143591545757 0) (0.000688172280512 0.0145699451317 0) (0.000575701801532 0.014129550657 0) (8.91745161486e-05 0.0146369166624 0) (-0.000301014512088 0.0149061843819 0) (-0.000440923828799 0.015915211205 0) (-0.00122000935079 0.0160201865434 0) (-0.00491074514684 0.0178507330371 0) (-0.0054572425412 0.0190280958909 0) (-0.0102486470552 0.0247430608223 0) (-0.0167361652547 0.0331236036358 0) (-0.0411202528771 0.064858858516 0) (-0.055127282647 0.0977318627108 0) (-0.0996717617472 0.32480861783 0) (-0.102079383342 0.8248072904 0) (-0.195367343743 0.435062781115 0) (-0.133923980685 0.30549989523 0) (-0.0938768539745 0.242883683253 0) (-0.0687406900221 0.207325193316 0) (-0.0528140771702 0.183557145531 0) (-0.041775408168 0.16419334272 0) (-0.031292891566 0.146356714771 0) (-0.0166874627083 0.132464739507 -5.02799808658e-29) (-0.00171070741224 0.126775944002 0) (0.009893883086 0.12942078921 0) (0.0204969047733 0.138814279751 0) (0.0298311421542 0.153701536524 0) (0.0376941888693 0.172422017584 -2.38290038326e-29) (0.0444749095958 0.193077600266 2.3028588618e-29) (0.0505803053395 0.213758596757 0) (0.0564474674521 0.232808266419 0) (0.062421054142 0.249109851559 0) (0.06872056345 0.262131489543 0) (0.0753867408547 0.271854027682 0) (0.082256413543 0.278642357248 0) (0.0890038796146 0.283075211432 0) (0.0951979153835 0.285763987011 0) (0.100365453892 0.287191651586 0) (0.104047936559 0.287595421723 0) (0.10584990869 0.286905914137 0) (0.105476587386 0.284750756346 0) (0.102749838357 0.280519620435 0) (0.0976212914113 0.273476887171 0) (0.0901729036904 0.262924692758 0) (0.0805864163737 0.248374002853 0) (0.0690934331101 0.229656666482 0) (0.0559586546213 0.206940379138 0) (0.0416255705988 0.18065821625 0) (0.0271655177151 0.151387654151 0) (0.014765870741 0.119678592995 0) (0.00679807276283 0.0861700732707 0) (0.000726235846862 0.0531442541414 0) (-0.00632306730726 0.0234997393594 0) (-0.00982191776167 0.00545949452996 0) (-0.011529469282 0.00300333781757 0) (-0.0109305680142 0.00222843419966 0) (-0.00903440946331 0.00118547807845 0) (-0.00786339077055 0.000735063030659 0) (-0.00692875836379 0.000332230950506 0) (-0.00371736090363 -0.000480368702381 0) (-0.000428318311009 -0.000539905640902 0) (-6.60121250961e-05 0.0108032172818 0) (2.00422911361e-05 0.0131352162949 0) (-0.000598480036989 0.0152519284639 0) (-0.00145738875798 0.0166109355349 0) (-0.00194497423585 0.0166705437067 0) (-0.00194402483512 0.0163456154442 0) (-0.00075494006153 0.0151497082302 0) (0.000690601014694 0.0121244305155 0) (0.00172563087172 0.0116429291808 0) (0.00209941794875 0.010447994904 0) (0.0020109216698 0.0107280461742 0) (0.00140398431413 0.0114509803147 0) (0.000688982307314 0.0122840793009 0) (-5.1581289039e-05 0.0131622196496 0) (-0.00108240181653 0.0139352453261 0) (-0.0022060115682 0.0166482114366 0) (-0.00211142973396 0.0151879540717 0) (-0.00226180236102 0.016777035977 0) (-0.00151216639648 0.0152403271425 0) (-0.00104326391521 0.0165416463167 0) (-0.000567936528094 0.0143075735437 0) (-0.000315350438925 0.0141684356886 0) (-0.000544642915462 0.0149150934467 0) (-0.000890231490615 0.0155424201526 0) (-0.00104268946062 0.0159660720901 0) (-0.00136597134256 0.0170153275077 0) (-0.00237677752802 0.0164215453058 0) (-0.0049893916489 0.0184364107726 0) (-0.00712154538052 0.0207089985102 0) (-0.0162814525666 0.0304470412985 0) (-0.02482560854 0.0397022462681 0) (-0.0576639724187 0.0866802709978 0) (-0.110349079445 0.251310496214 0) (-0.13039176805 0.694028524522 0) (-0.262601691904 0.555666326186 -2.27826163339e-28) (-0.165785067556 0.353220485748 7.33294778166e-29) (-0.113016301176 0.268621521117 0) (-0.0809584495646 0.223588664713 -4.17410030594e-29) (-0.0615995165661 0.195573576284 0) (-0.0489817922246 0.174730687449 0) (-0.038298017275 0.156762793834 0) (-0.024366247156 0.142674974921 0) (-0.00888255906239 0.13630885764 0) (0.00309884312914 0.138577723993 0) (0.0137771457858 0.147603809118 0) (0.0233040228886 0.162043519262 0) (0.0313467914184 0.180281274482 0) (0.0382890139869 0.200501349439 0) (0.0445070310152 0.220828066834 0) (0.0504243038771 0.239617285694 0) (0.0563740276947 0.255731424624 0) (0.0625751856898 0.268584505928 0) (0.0690798834838 0.278079528308 0) (0.0757415610865 0.284495441631 0) (0.0822519066584 0.288331356964 0) (0.0881930717408 0.290136187504 0) (0.0930979295057 0.290355012307 0) (0.0965052809562 0.289216707682 0) (0.0980102537037 0.286675706257 0) (0.0973077373411 0.282416469382 0) (0.0942179244285 0.275916529048 0) (0.088715231111 0.26655262683 0) (0.0809375197632 0.253761460654 0) (0.071149405852 0.237201041625 0) (0.0596778402979 0.216835993844 0) (0.0468875958674 0.192923059582 0) (0.0333583046797 0.16595285866 0) (0.0204127900338 0.1366150116 0) (0.0105954694639 0.105773531764 0) (0.00566375538891 0.0748537444714 0) (0.000641054190284 0.0464788234791 0) (-0.00455098218211 0.0174932403076 0) (-0.0102239720289 0.00648898071897 0) (-0.0107696192582 0.0044107930674 0) (-0.0104943496007 0.00374207652982 0) (-0.00848136876614 0.0024855008995 0) (-0.00741842940889 0.00211137060745 0) (-0.00677198365572 0.00258288216307 0) (-0.00450442657825 0.00293589074994 0) (-0.00044709644339 0.00107418625592 0) (-0.000190000407206 0.010599426435 0) (-0.000184900196542 0.0133780800582 0) (-0.00037473775448 0.0147340006088 0) (-0.000986843944547 0.0161632566122 0) (-0.00162195224369 0.0164765475803 0) (-0.00190600613702 0.0164060976729 0) (-0.00163061934198 0.0159941820058 0) (-0.000165767357134 0.013815801999 0) (0.000877095528052 0.0117135183187 0) (0.00147993750734 0.0113339327008 0) (0.00167150906372 0.0102791819257 0) (0.00140738362622 0.0108127646689 0) (0.00073505771496 0.0117081957053 0) (-2.86719179997e-05 0.0125149853933 0) (-0.000818729395068 0.0134746784661 0) (-0.00196292575378 0.0142825399546 0) (-0.00329250842802 0.0170721318142 0) (-0.00294256845508 0.0152481255992 0) (-0.00300393810649 0.0170733881204 0) (-0.00235642966181 0.0153040571306 0) (-0.00207191251325 0.0155598056197 0) (-0.00152811025682 0.0143979181136 0) (-0.00127580101728 0.0149317760269 0) (-0.00165866255522 0.0158509255726 0) (-0.00220221431881 0.0168444511984 0) (-0.00216607769976 0.0167653196188 0) (-0.00259705203145 0.0182554432684 0) (-0.00371515375547 0.0182065371824 0) (-0.00715946806415 0.0220056707588 0) (-0.0110304107022 0.024804647026 0) (-0.0217887205914 0.0367410640948 0) (-0.0276745993145 0.0476274325268 0) (-0.062037433021 0.122051984227 0) (-0.0897278869676 0.358240251588 0) (-0.171280562796 0.914812975064 0) (-0.195078294059 0.426477391963 -5.65083999524e-29) (-0.133871729361 0.302002822234 0) (-0.0942607653108 0.24309304318 4.18400902302e-29) (-0.0706484497366 0.208926077751 0) (-0.0560390933017 0.185682904174 0) (-0.0448668955513 0.167241060347 0) (-0.0315842888875 0.15303107968 0) (-0.0159966224447 0.146037781733 0) (-0.00352854453845 0.14785622471 0) (0.00718885350378 0.156497823984 0) (0.0168941313103 0.170479889112 2.30868557075e-29) (0.0251025069146 0.188218118509 -2.22568917608e-29) (0.0321932056887 0.207983781973 0) (0.0385125636421 0.227932437736 0) (0.0444700468677 0.246431662034 0) (0.0503879447091 0.262325693938 0) (0.0564834485232 0.274976738067 0) (0.0628185623018 0.284212138866 0) (0.0692630896925 0.290226073037 0) (0.0755272487858 0.293437496467 0) (0.0812090680159 0.294330878561 0) (0.0858509978834 0.29331066292 0) (0.0889935222335 0.290595529803 0) (0.0902266686148 0.28616460226 0) (0.0892384407012 0.279765143564 0) (0.085851720469 0.270974986603 0) (0.0800695716489 0.25930175102 0) (0.0720914427966 0.24434015598 0) (0.0622704770115 0.225916918422 0) (0.0510382415664 0.204136389831 0) (0.0388698273301 0.179324063064 0) (0.0264584780197 0.151989247334 0) (0.0152564748997 0.122936539214 0) (0.00793414619067 0.0935076586813 0) (0.00551531243498 0.0662100610879 0) (0.00115333624239 0.0442923600764 0) (-0.00541384752852 0.020022244381 0) (-0.00833968145135 0.00597675058178 0) (-0.00972986969321 0.0052000624422 0) (-0.00964167380047 0.00514816463673 0) (-0.00759941648452 0.00383578401617 0) (-0.0065900606161 0.00320762277532 0) (-0.00619569073299 0.00374864415787 0) (-0.00411677281098 0.00482195916841 0) (-0.00032289250132 0.0050562949558 0) (-0.000192759668488 0.0101179654129 0) (-0.000260442056855 0.01349858293 0) (-0.000148440739448 0.0145207743051 0) (-0.000377817469221 0.0154727101 0) (-0.00112818858244 0.0161373334766 0) (-0.00167129341102 0.0162261195483 0) (-0.00194402815933 0.0160681473772 0) (-0.00130116690924 0.015206103258 0) (7.38506454223e-06 0.0122310839502 0) (0.000599366135433 0.0116330551953 0) (0.000971846910501 0.0109242829691 0) (0.00106892406217 0.0104048866144 0) (0.000703437049478 0.0110699343554 0) (5.70692765768e-05 0.011750870028 0) (-0.000798535659427 0.0127563335039 0) (-0.00170471563163 0.0138221136033 0) (-0.00294408415348 0.014631416533 0) (-0.00427532469699 0.0172252138408 0) (-0.0038707952481 0.0156345770941 0) (-0.00407372413445 0.0170756597977 0) (-0.00330683228257 0.0153363625109 0) (-0.00284862091032 0.0151822528617 0) (-0.00243443330278 0.0155175434609 0) (-0.0029738502283 0.0161812759078 0) (-0.00364567089492 0.017368502295 0) (-0.00341393633194 0.0179745007628 0) (-0.00337454061307 0.0178241384563 0) (-0.00451012699325 0.0197417208442 0) (-0.00629912524101 0.0208993390046 0) (-0.0112533886101 0.0254639243002 0) (-0.0160363249473 0.0281181576869 0) (-0.028698240105 0.0460988058524 0) (-0.060090979473 0.103512528772 0) (-0.113430050408 0.271995344351 0) (-0.179470355683 0.79773993622 0) (-0.258083327532 0.51575691603 8.02078449604e-29) (-0.161542408267 0.344875768882 0) (-0.109693297283 0.266999934645 0) (-0.0801125024191 0.224023574276 0) (-0.0629449817667 0.197146546902 0) (-0.050999021993 0.177758696445 0) (-0.0382841831058 0.163446896526 0) (-0.0229567900662 0.155912931249 0) (-0.0099587472534 0.157233619914 0) (0.000767922175637 0.165480589635 0) (0.0106407926083 0.179000268841 0) (0.0190054844286 0.196225627656 0) (0.0262341735267 0.215516901375 0) (0.0326454016377 0.235062676971 0) (0.0386347633205 0.253240615154 0) (0.0445132274054 0.2688800791 0) (0.0504950780714 0.281294364335 0) (0.0566504980846 0.290237778221 0) (0.0628651999657 0.295821412534 0) (0.0688687357399 0.298384126718 0) (0.0742771868211 0.298344551097 0) (0.0786458108231 0.296064371295 0) (0.0815207850557 0.291750681559 0) (0.0824908450927 0.285408655499 0) (0.0812397768375 0.27685493477 0) (0.0775974230346 0.265781284437 0) (0.0716006617884 0.251846065922 0) (0.0635135382678 0.234826626162 0) (0.0537822081562 0.214738846249 0) (0.0429599172084 0.191829351211 0) (0.0316558684969 0.166468569288 0) (0.0206471893244 0.139141596192 0) (0.0113463385476 0.110753118309 0) (0.00629720330708 0.0831888357095 0) (0.00605071271654 0.0597848423438 0) (0.0024294165224 0.0437258498802 0) (-0.00564840842581 0.0172935438786 0) (-0.0078204405461 0.00622518621878 0) (-0.00894285595785 0.00584085021958 0) (-0.00867668790668 0.0064736928222 0) (-0.00654985089799 0.00511847693329 0) (-0.00527363740535 0.00404599246156 0) (-0.00528256869235 0.00453688332248 0) (-0.00610630808173 0.0125069258677 -5.10052337966e-29) (0.000485789973884 0.00418719845615 0) (-0.000342900000653 0.00972321642799 0) (-0.000179315793938 0.0126806238742 0) (0.000508164208645 0.0144818915298 0) (0.000343371314816 0.0149516297165 0) (-0.000557937265107 0.0154893498049 0) (-0.00149111042587 0.0158577981309 0) (-0.00212939528423 0.0158846610381 0) (-0.00232550519516 0.0155769618041 0) (-0.00113489866309 0.0135959453763 0) (-0.000189793201256 0.0116901537794 0) (-3.59102009746e-06 0.0114517978511 0) (0.000124829329023 0.0106605395513 0) (0.000291713120725 0.0105331320211 0) (6.75654263146e-05 0.0109940760506 0) (-0.000710092670829 0.0118907791866 0) (-0.00168243323849 0.0129560582649 0) (-0.00274760116777 0.0141067903177 0) (-0.00402046295582 0.0150533191082 0) (-0.00530938673518 0.0172351968615 0) (-0.00498142224333 0.015948994528 0) (-0.00501751002771 0.0163201012042 0) (-0.00430033081931 0.0151865050558 0) (-0.004012577925 0.0153673920159 0) (-0.00429958850794 0.0164763475369 0) (-0.00486106081448 0.0173838670225 0) (-0.00482181901117 0.0175641364303 0) (-0.00495348805289 0.0191141364403 0) (-0.00527649421262 0.0192360140214 0) (-0.00708524323543 0.0218427776373 0) (-0.00913705359896 0.0229334008854 0) (-0.0139889339454 0.0280858521176 0) (-0.0157028499288 0.0316615924126 0) (-0.0308095564433 0.0548403481787 0) (-0.0705226634223 0.12313991509 0) (-0.137985143997 0.360579898905 0) (-0.321869750376 0.7671796988 0) (-0.19324365116 0.409639829536 0) (-0.126256018923 0.297189735048 0) (-0.0896631453012 0.241194120454 0) (-0.0696156489974 0.209141188743 0) (-0.056700612481 0.188251510068 0) (-0.04445182893 0.173829328882 0) (-0.02968604067 0.165879885673 0) (-0.0161798226526 0.166692741213 0) (-0.00545672381079 0.174539725027 0) (0.00457424028409 0.187597880444 0) (0.0130928386903 0.20430067831 0) (0.020453402882 0.22309631611 0) (0.0269493044085 0.242212283685 0) (0.0329646671122 0.260035089686 0) (0.0387971894395 0.275382865638 0) (0.0446575568773 0.287523499767 0) (0.0506223170186 0.296141013054 0) (0.0565923248203 0.301265655888 0) (0.0623169645503 0.303156711553 0) (0.0674321140516 0.302166178568 0) (0.0715088205365 0.298611365015 0) (0.0741027340475 0.29268699667 0) (0.0748049753121 0.284426160038 0) (0.0732970726509 0.273722344633 0) (0.0694210097391 0.260395995906 0) (0.0632516635623 0.244277139592 0) (0.0551178796854 0.225349255795 0) (0.0455650412091 0.203831420801 0) (0.0352994100101 0.180106472699 0) (0.0251187495663 0.154558136936 0) (0.0158947867331 0.127624418149 0) (0.00888783798085 0.100350135636 0) (0.0064270595764 0.0755242752428 0) (0.00921629324922 0.057514084079 0) (0.0055377035991 0.05168834669 0) (-0.00628656744754 0.0125437331736 0) (-0.00791712458078 0.00697254026162 0) (-0.00820851848276 0.00672649012503 0) (-0.00736433216905 0.00756974066906 0) (-0.00615650634031 0.00772376032035 0) (-0.00319385176301 0.00504579606274 0) (-0.00285946520751 0.00423364654266 0) (-0.0039713673659 0.0129951994097 3.91052196884e-29) (0.00327441516478 0.0132214283563 0) (-0.000160938188585 0.00951815469049 0) (0.000159353162014 0.0153704755248 0) (0.000729577604005 0.0153050820244 0) (0.000531300127157 0.0146367816043 0) (-0.000384661595068 0.0147887786962 0) (-0.00153365991776 0.0151731296595 0) (-0.0024762942233 0.0154830157888 0) (-0.00310488282302 0.0154892607937 0) (-0.002895445913 0.0149929337357 0) (-0.00130662228954 0.0117981232016 0) (-0.000581001230749 0.0111001335922 0) (-0.000606522909214 0.0110187123914 0) (-0.000771560851609 0.0121684322302 0) (-0.000657796641481 0.0105205976256 0) (-0.000930687603505 0.0111045970598 0) (-0.00163189559718 0.0118156703374 0) (-0.0027196555616 0.0130520028416 0) (-0.00390329862729 0.0144490474841 0) (-0.00521410917223 0.0153440096859 0) (-0.00651405595427 0.0171605800885 0) (-0.00611339857229 0.0159293350613 0) (-0.00601217498311 0.0159721955876 0) (-0.00552919362983 0.0156062465731 0) (-0.00596079905476 0.0163051988492 0) (-0.00659722075688 0.0176776970247 0) (-0.00648213660469 0.0181361127447 0) (-0.00636457742108 0.0182530004797 0) (-0.00694628903192 0.0199438096842 0) (-0.00776240167759 0.0207792351419 0) (-0.0103159504301 0.0235347247856 -7.58658595013e-30) (-0.0129174165348 0.0244962177079 0) (-0.0173740518297 0.0325958527694 0) (-0.0305114065212 0.0526535630884 0) (-0.0431054266635 0.0734274603472 0) (-0.0876511459598 0.207486534758 0) (-0.216494269674 1.24842262064 0) (-0.246727962387 0.479528168046 0) (-0.146892827397 0.331817330636 1.12095127996e-29) (-0.0997092733391 0.260129511053 -8.19935077083e-30) (-0.0761586150914 0.22152499901 0) (-0.062064429851 0.198614467187 0) (-0.0501372973406 0.184085381294 0) (-0.0361313333082 0.17588850812 0) (-0.0222122481562 0.176224352471 0) (-0.0114624221371 0.183670674001 0) (-0.00128427820782 0.19627277053 0) (0.00739383707695 0.212444473136 0) (0.0148861346098 0.230721571458 0) (0.0214622597299 0.249377524274 0) (0.0275006633726 0.266808325018 0) (0.0332825235139 0.281824179048 0) (0.0390148097912 0.293651375832 0) (0.0447786007102 0.301906555674 0) (0.0504887093706 0.306541742867 0) (0.0559144899875 0.307737667854 0) (0.0607129789294 0.305779437102 0) (0.0644737380165 0.300938988869 0) (0.0667658170331 0.293398565776 0) (0.0671867279249 0.283221816368 0) (0.0654180199481 0.270387750734 0) (0.0613218097034 0.254862005145 0) (0.0550165954167 0.236669017551 0) (0.0468989289882 0.216021846109 0) (0.0376309422846 0.193356051316 0) (0.0281423526051 0.169182675585 0) (0.0195347250426 0.143868853314 0) (0.0128395744157 0.117759147862 0) (0.00894841396751 0.0919006817487 0) (0.00933919502534 0.0687848772798 0) (0.013854236549 0.0532236036992 0) (0.0039832204761 0.022915120217 0) (-0.00775902123795 0.0123020082349 0) (-0.00789417031575 0.00806449809916 0) (-0.00747057740577 0.00793693933645 0) (-0.00629855846141 0.00875436852646 0) (-0.00521649150604 0.00936172547636 1.20265310147e-29) (-0.00235614745742 0.00661255514826 0) (-0.000973182275133 0.00414626720765 0) (0.000891687012302 0.00772630605586 0) (0.00107305016219 0.00459851021316 0) (0.000284849312309 0.00996200991019 0) (0.000874442718372 0.0148394306625 0) (0.000563789339973 0.0152431655979 0) (0.000260960960598 0.0142619722237 0) (-0.000654109617712 0.0139740180433 0) (-0.00182655494395 0.0143896295546 0) (-0.00289018612368 0.0148209066748 0) (-0.00371776866662 0.0151070595523 9.99023462513e-30) (-0.00420489810945 0.0150458747156 -9.60072776833e-30) (-0.00348565177853 0.0143223273771 0) (-0.00169415306812 0.0115011405865 0) (-0.000912160087186 0.0104312575988 0) (-0.00128659476336 0.0109680065275 0) (-0.00184044092488 0.0115301857818 0) (-0.00192706384727 0.0113988080465 0) (-0.00217289527114 0.0113065261006 0) (-0.00277363511006 0.0118814165412 0) (-0.00390095431135 0.0134030441472 0) (-0.00511741922309 0.0145200513204 0) (-0.00657420623272 0.015657666795 0) (-0.00760727127599 0.0166916081517 0) (-0.00731390041477 0.0157471865052 0) (-0.00715362116451 0.0154352202652 0) (-0.00741888333767 0.0162543356731 0) (-0.00795989394189 0.0171271090191 0) (-0.00799522951385 0.0174203808462 0) (-0.00835800513068 0.0188294918868 0) (-0.00828843437435 0.0189329843903 0) (-0.0093124168312 0.0210205159226 0) (-0.0102808703936 0.021764062554 7.25109510302e-30) (-0.0131337486732 0.0248014469536 0) (-0.0151707576578 0.0263960972177 0) (-0.026260493179 0.0375292008016 0) (-0.0475705590753 0.0686236667972 0) (-0.0785979825994 0.165432100453 0) (-0.108959807579 0.480817770282 0) (-0.389243496003 0.592763739661 0) (-0.180307532986 0.3752657135 0) (-0.111971304493 0.281132892138 0) (-0.0830508186473 0.234212197864 0) (-0.067331433137 0.208781316297 0) (-0.0554728659191 0.194162795548 0) (-0.0422617940884 0.185914964974 0) (-0.0281246435235 0.185843635259 0) (-0.0172337204814 0.192883264943 0) (-0.00692026460062 0.205034832241 0) (0.00193139778175 0.220663325956 0) (0.0095610587825 0.238396237314 0) (0.0162157896066 0.256557672408 0) (0.0222770983948 0.273556474121 0) (0.0280061316198 0.28819693291 0) (0.0336062286515 0.299667703016 0) (0.0391612770254 0.307521052601 0) (0.0445983395338 0.311633601553 0) (0.0497064907621 0.312108974126 0) (0.0541647828041 0.309165786894 0) (0.0575839589877 0.303030406153 0) (0.0595507892272 0.293873484086 0) (0.0596741840491 0.281793402965 0) (0.0576388400118 0.266865589881 0) (0.0533403871538 0.249221534844 0) (0.046949998719 0.229108094165 0) (0.0389409556728 0.207000870415 0) (0.0301385629766 0.183588743741 0) (0.0218376345249 0.159594440572 0) (0.0157367922595 0.135564643669 0) (0.0134827690351 0.112178732548 0) (0.0160138765176 0.0912700628032 0) (0.0240272487718 0.075996986971 0) (0.0328322812257 0.0790284844628 0) (-0.00306393236794 0.0128247104881 0) (-0.00915331344532 0.013105313129 0) (-0.00735816147634 0.00936527158715 0) (-0.00660958640877 0.0092446629572 0) (-0.00546619359468 0.00994557829797 8.83842007234e-30) (-0.00467874014594 0.0108321785232 -1.15255907687e-29) (-0.00272479466787 0.00994693537976 0) (-0.000857598976408 0.00525591638765 0) (-0.000692155120241 0.00725718110271 0) (0.000200043360483 0.0137062893589 0) (0.000709728018902 0.010906040911 0) (0.0017496990498 0.0141735646257 0) (0.00099533092435 0.0149017952259 0) (0.000150579131653 0.0134489622056 0) (-0.000915423765736 0.013030467159 0) (-0.00205435295372 0.0134466119956 0) (-0.00316842329435 0.0140764911472 0) (-0.00411739882445 0.0145356615259 0) (-0.00481348838158 0.0147730994968 0) (-0.0050466111653 0.014611440791 0) (-0.00405039972335 0.0136691976831 0) (-0.00225764773167 0.0112800433253 0) (-0.00156206794613 0.0100829038733 0) (-0.00200080156966 0.0105037691718 0) (-0.0027979427417 0.0111848036318 0) (-0.00329656897445 0.0115712263636 0) (-0.00352204469707 0.0115972101 0) (-0.0041726626557 0.0122969066892 0) (-0.00497547834086 0.0128902000515 0) (-0.00642312643203 0.0147027850517 0) (-0.00785347500058 0.0155952916875 0) (-0.00869751067099 0.0160087736006 0) (-0.00844879603494 0.0154157899586 0) (-0.00889179447914 0.0158927927855 0) (-0.00965136005462 0.017107902257 0) (-0.00979381334805 0.0175777371897 -9.03550550373e-30) (-0.00972899850511 0.0176864555238 0) (-0.0103836073318 0.0193567965526 0) (-0.0105381003334 0.0198363263919 0) (-0.01225859082 0.0219750834267 0) (-0.0135743809252 0.0235338311937 0) (-0.0172063364795 0.0279874462854 0) (-0.0198775280508 0.0311574110225 0) (-0.0314943350108 0.0422046493582 0) (-0.0618665076632 0.0953554908974 0) (-0.168279421012 0.470209304835 0) (-0.384266884825 0.796526819308 0) (-0.2154697738 0.427600975337 0) (-0.126196331012 0.303716982824 0) (-0.0907846269393 0.247157829537 0) (-0.0728530241271 0.218828300765 1.17096599924e-29) (-0.0606477755904 0.204117566342 -1.16673038241e-29) (-0.0481289262517 0.195977466317 0) (-0.033900389723 0.195582614942 0) (-0.0227556403382 0.202202331978 0) (-0.0123192873651 0.21390251194 0) (-0.00327475438609 0.228968329474 0) (0.00450134339431 0.246127311647 0) (0.0112351738583 0.263755158815 0) (0.017321544661 0.280278904783 0) (0.0229988521835 0.294497623877 0) (0.0284664024966 0.305566036292 0) (0.0338095629505 0.312975071826 0) (0.038965469248 0.316528635867 0) (0.043742049513 0.316255185574 0) (0.0478406379265 0.312308043354 0) (0.0508956892961 0.304868801745 0) (0.0525164827014 0.294099007847 0) (0.052329650766 0.280137802085 0) (0.050027518385 0.263171418627 0) (0.0455604329768 0.243521380188 0) (0.0391635550949 0.221688276723 0) (0.0313980274567 0.198433845235 0) (0.0232861960904 0.17471313433 0) (0.0165866084773 0.151516500936 0) (0.0138082503236 0.129877205635 0) (0.0176203060748 0.11238937871 0) (0.0293759589721 0.103166592801 0) (0.0407732784508 0.112409539268 0) (0.00132031182171 0.0163261976499 0) (-0.00686040917113 0.0141814985614 0) (-0.00841504712064 0.0141563587082 0) (-0.00629648019183 0.0106655769961 6.74666834235e-30) (-0.00550729993994 0.0104934525367 0) (-0.00447061488063 0.0110082630683 -8.47398225561e-30) (-0.00376850902945 0.011732782742 0) (-0.00292889508456 0.0118668082916 0) (-0.00118281133701 0.00706537000015 0) (-0.000737714424018 0.00816508293584 0) (0.000128233989538 0.013622970765 0) (0.00117684884396 0.012209866245 0) (0.00265586914348 0.0136631563286 0) (0.00162585171909 0.0142763270247 0) (9.63454953725e-05 0.012362090276 0) (-0.00100998315325 0.0120559192626 0) (-0.00203610423171 0.0125172023302 0) (-0.00311430462097 0.013166954441 0) (-0.0041988712645 0.0138497315456 0) (-0.00509737289676 0.0142839623588 0) (-0.00572321115571 0.0144808801204 0) (-0.0058295660285 0.0143079524826 0) (-0.00469981356137 0.0131287101173 0) (-0.00309456928569 0.0111630778192 0) (-0.00238963949786 0.00961400095914 0) (-0.00286068717318 0.00996724139409 0) (-0.00374282057572 0.0107858941639 0) (-0.00451214749629 0.0114646033008 0) (-0.00517252319338 0.0121266629457 0) (-0.0056793305875 0.0125746651953 0) (-0.00649416434085 0.0132347441813 0) (-0.00756148079606 0.0138518134359 0) (-0.00925376447099 0.0153269865703 0) (-0.00962299460102 0.0152035994643 0) (-0.00999165922935 0.0155471089429 0) (-0.010801227527 0.016312803057 0) (-0.0111710005322 0.0167578307232 8.81132191212e-30) (-0.0117992145094 0.0180183610852 0) (-0.0114672697737 0.0180003771795 0) (-0.0125877048078 0.0202375004606 0) (-0.0142333850472 0.0214204125574 0) (-0.0152090179657 0.022331153437 0) (-0.0171526103567 0.0255332455897 0) (-0.0221519390947 0.0314229906302 0) (-0.0249976325431 0.0355620994521 0) (-0.0324484482632 0.0544150576537 0) (-0.0845907384627 0.229670455302 0) (-0.243892710152 1.5600860658 0) (-0.27642666359 0.509248388601 0) (-0.148547307961 0.330709307755 0) (-0.101230714239 0.261394979352 0) (-0.0792445551002 0.229267603671 0) (-0.0658615199815 0.214192557781 0) (-0.0537750540546 0.206172583428 0) (-0.0394981654617 0.205492778775 0) (-0.0280047980523 0.211665141694 0) (-0.0174619131443 0.222896952821 0) (-0.00820515065791 0.237372964688 0) (-0.000273398560921 0.253923670555 0) (0.00654114074183 0.270974857773 0) (0.012656388764 0.286977969887 0) (0.0182866771758 0.300726863008 0) (0.0236261024988 0.311345108497 0) (0.0287609481885 0.318265081599 0) (0.0336358501521 0.321220496041 0) (0.0380758823453 0.320166994318 0) (0.0418042740604 0.315194715437 0) (0.0444814702253 0.30644280715 0) (0.0457448901305 0.294068757851 0) (0.0452471998239 0.278263326007 0) (0.0426978503151 0.259346115538 0) (0.0381420553715 0.237866831444 0) (0.0319165647383 0.214622393928 0) (0.0247371433325 0.190670189013 0) (0.017949551946 0.16713853422 0) (0.0139928582785 0.145010501774 0) (0.0161932293296 0.125248872795 0) (0.027622435532 0.109673401712 0) (0.044518892578 0.104305410554 0) (0.0121361181373 0.0305610387193 0) (-0.00226606665351 0.0195948799894 0) (-0.00561539164154 0.0149171787684 0) (-0.00655846182864 0.0147148532384 0) (-0.00505145191397 0.011829927113 -6.6158953293e-30) (-0.00429291167456 0.0115864746985 -3.44356658967e-30) (-0.00337362027455 0.0119026916446 0) (-0.00266375061097 0.0123255781761 0) (-0.00240338619682 0.0123728606404 0) (-0.00122023534251 0.00793261769101 0) (-7.98947674123e-05 0.00909953451213 0) (0.0011275187817 0.0138294059734 0) (0.00054439596732 0.0155707729331 0) (0.00216348687557 0.0140861369245 0) (0.00124001942029 0.0129271300884 0) (-0.000216572801125 0.0109077531992 0) (-0.00105362621392 0.0110462398242 0) (-0.00183791092264 0.0115064828 0) (-0.0027961183866 0.0122068434648 0) (-0.00390777341404 0.0129176099913 0) (-0.00503398354877 0.0136024479449 0) (-0.00594696100692 0.0140105193313 0) (-0.0065760932334 0.0141953693479 0) (-0.00667389306108 0.0140231953529 0) (-0.00544734719411 0.0125049978376 0) (-0.00416896417597 0.0108894288376 0) (-0.0035249628285 0.00955132094986 0) (-0.00400718501683 0.00981062318729 0) (-0.0048397857131 0.0103969939295 0) (-0.00583358268419 0.0113959557197 0) (-0.00667851795065 0.0121276917027 0) (-0.00761548012819 0.0130242899949 0) (-0.00825464433538 0.013329414359 0) (-0.00935065090869 0.0139450131898 0) (-0.010484106173 0.0146040751443 1.06274483116e-29) (-0.0110869518164 0.0149884982864 0) (-0.0119164476441 0.015711565685 0) (-0.0127654407249 0.0165468717012 0) (-0.012855833885 0.0168089664356 0) (-0.0140795129672 0.0187709420771 0) (-0.0147570402754 0.0192225700629 0) (-0.0154813639435 0.0199278460594 0) (-0.0174088250946 0.0220906541757 0) (-0.0182976057092 0.0232205117325 0) (-0.0220487144138 0.0264441267217 0) (-0.0259805932167 0.0326243977676 0) (-0.0292447905701 0.0470761566426 0) (-0.0537633959323 0.138292443183 0) (-0.302184780471 1.79452744159 0) (-0.423878439041 0.571613045458 0) (-0.186907480105 0.36513743159 0) (-0.115633016475 0.279414365602 0) (-0.0866027190396 0.241068205655 0) (-0.0710304329628 0.224749159275 0) (-0.0591185026603 0.216626125311 0) (-0.0448269145466 0.215622057275 0) (-0.0329422954476 0.221308918523 0) (-0.0223154184907 0.232035230762 0) (-0.0128385912956 0.245889322216 0) (-0.00474387232859 0.261793520255 0) (0.00215338438747 0.278222635369 0) (0.00830219563194 0.293658358239 0) (0.0138935602748 0.306889591342 0) (0.0191146724529 0.317009713072 0) (0.0240529723109 0.323395144632 0) (0.0286580014409 0.325711655438 0) (0.0327695130809 0.323844669533 0) (0.0361312875883 0.317823864736 0) (0.0384311209868 0.307749452097 0) (0.0393391211535 0.293781897065 0) (0.0385423448588 0.276179397836 0) (0.0357803797028 0.255433161238 0) (0.0312652376636 0.232405920027 0) (0.0255365716874 0.208360390246 0) (0.0197075588417 0.184945881367 0) (0.0160091783769 0.163965239429 0) (0.018740039751 0.147132922843 0) (0.0342080022551 0.137105753036 0) (0.0681535632313 0.138359677342 0) (0.097546317836 0.193148551984 0) (0.00431838955556 0.019205285581 0) (-0.00316250005363 0.016982069057 0) (-0.004548216769 0.0165502917975 0) (-0.00455030303822 0.0147675061321 0) (-0.00394207577813 0.0128121460628 0) (-0.00318580982338 0.0124762203224 3.2735285519e-30) (-0.00243421166341 0.0126590571055 0) (-0.00184220424911 0.0128697021384 -2.23663041818e-31) (-0.00187323157612 0.012308991718 0) (-0.0011995842402 0.00908320742514 0) (0.00049755957005 0.0109935200558 0) (0.00122958138221 0.0116700593956 0) (-0.000576870681182 0.0152481485044 0) (0.000488390733374 0.0146183684284 0) (0.00019073278667 0.0114125452211 0) (-0.000573741076222 0.0104646986627 0) (-0.00123815076264 0.0107246812374 0) (-0.00188347271616 0.011026870709 0) (-0.00258943308168 0.011286456377 0) (-0.003520536727 0.011896951588 0) (-0.00464907484426 0.012614886974 0) (-0.00581557998456 0.0132791767178 0) (-0.00676599415447 0.013697358882 0) (-0.00743350075752 0.0138799255496 0) (-0.007567422885 0.0136950419872 0) (-0.00609869789741 0.0115894128204 0) (-0.00539743096855 0.0107696698612 0) (-0.00495570888197 0.00958324582646 0) (-0.00541776161556 0.00968462253526 0) (-0.00622760455805 0.0103598783966 0) (-0.00713387570348 0.0111005025972 0) (-0.00825512999585 0.0119623446632 0) (-0.0090918600117 0.0124856935741 0) (-0.0100575758441 0.0131532922814 0) (-0.011072925093 0.0136957052329 -1.02662350683e-29) (-0.0119730672642 0.0142305541384 0) (-0.0130761643642 0.0150114302591 0) (-0.013578386867 0.0154235100895 0) (-0.0146894327898 0.0167794070611 0) (-0.0152886270232 0.0169684120472 0) (-0.0162333325964 0.0178640307623 0) (-0.0176811817162 0.019394243222 0) (-0.0184055575505 0.0201051044965 0) (-0.0202407835913 0.0222288066928 0) (-0.0209000343853 0.0237332552716 0) (-0.0230068407112 0.0272802258281 0) (-0.026865265114 0.0375655021082 0) (-0.0340013551423 0.0779858338362 0) (-0.0915386927926 0.635904318511 0) (-0.669003957742 0.689368763286 0) (-0.231804666123 0.417698299038 0) (-0.131106606123 0.303526331155 0) (-0.0937147671363 0.254793756828 0) (-0.075617224856 0.235933653858 0) (-0.0639389111303 0.227373580438 0) (-0.0497557632956 0.225981186562 0) (-0.0375192224267 0.231150387326 0) (-0.0268352843568 0.241325187564 0) (-0.0171501001013 0.254524447638 0) (-0.00888740761085 0.269742004014 0) (-0.001905031727 0.285503918619 0) (0.00428232617447 0.300326235511 0) (0.00984552073828 0.312994483362 0) (0.0149633010081 0.322570834055 0) (0.0197252057045 0.328377964133 0) (0.0240839241708 0.330015817648 0) (0.027891228369 0.32730220459 0) (0.0309098355696 0.320209826881 0) (0.0328558334348 0.308804782179 0) (0.0334357493698 0.293259246014 0) (0.0323733576202 0.273913541927 0) (0.0294332738939 0.251453396524 0) (0.025023670867 0.227083957178 0) (0.0198612596069 0.202544312142 0) (0.0154748557451 0.180059767516 0) (0.0152253538846 0.162342560191 0) (0.0253308339054 0.153515410125 0) (0.0531645560252 0.159463515091 0) (0.0775244360247 0.197279262217 0) (0.00890964339003 0.023676796202 0) (-0.00209510307849 0.0183087387376 0) (-0.00205256691355 0.0165931751488 0) (-0.00249996076934 0.0160045760379 0) (-0.00293344949636 0.0145933214831 0) (-0.0028872799859 0.0135207854497 0) (-0.00226077076859 0.0131155908887 0) (-0.00170044999911 0.0131861156958 0) (-0.00118747775974 0.0131841933251 2.05105067926e-31) (-0.00123715951635 0.0125187763359 0) (-0.0010675521179 0.0104541603912 -2.99957047953e-30) (0.000340169823942 0.0124336355295 0) (0.000878899962516 0.0114616149743 0) (-0.00095339505702 0.0147244845156 0) (-0.000865226399525 0.0148333387747 0) (-0.000571880984238 0.0114969240586 0) (-0.000813910646869 0.00988865469752 0) (-0.0015451664519 0.010146045681 0) (-0.00218975358839 0.0105082831873 0) (-0.00280760046943 0.0108594565377 0) (-0.00345803076833 0.01114226437 0) (-0.00429456270928 0.0115603517123 0) (-0.00542061892605 0.0122569757286 0) (-0.00660226996937 0.012900468321 0) (-0.0076070630936 0.0133245096898 0) (-0.00834424158825 0.0134600438846 0) (-0.00837842121459 0.0130895562814 0) (-0.00684507670498 0.0106123684395 0) (-0.00603556792542 0.00933276142519 0) (-0.00642834313313 0.00956770388115 0) (-0.0069386529852 0.00972715480854 0) (-0.00759314916035 0.010040543426 0) (-0.00869350439027 0.0108804459881 -1.20809865069e-29) (-0.00983490690778 0.0117791725409 0) (-0.0109300789973 0.0123769107923 0) (-0.0116412562861 0.012591065651 0) (-0.0128917843325 0.013379099405 0) (-0.0137994751693 0.0139822349154 0) (-0.0149331887676 0.0147002636386 0) (-0.015696292273 0.0152639090693 0) (-0.0169297866208 0.0162942430046 0) (-0.0182472947345 0.0170379605359 0) (-0.0190403814161 0.0176226479119 0) (-0.0210411839689 0.0194103170334 0) (-0.0214214613376 0.0203822318396 0) (-0.0239684320984 0.0231894977701 0) (-0.0245507508865 0.0265267771873 0) (-0.0244777009295 0.0327957619618 0) (-0.0273343938843 0.0619774568053 0) (-0.0540209335961 0.238281831109 0) (-0.466668258885 0.885079849802 0) (-0.272509556356 0.485339945641 0) (-0.143639035282 0.332280468507 0) (-0.0991913086592 0.269733903044 0) (-0.0791203970213 0.247456469441 0) (-0.0680761676229 0.238314192822 0) (-0.0541875954266 0.236540181473 0) (-0.041694515943 0.241184122141 0) (-0.0309733207757 0.250765881343 0) (-0.0211095821176 0.263280174161 0) (-0.0126746603442 0.277770548145 0) (-0.00560353120638 0.292822678377 0) (0.000627426332286 0.306987988931 0) (0.00617418168539 0.319052433083 0) (0.0112070944482 0.328044366534 0) (0.01581925996 0.3332343204 0) (0.0199663157672 0.334158262352 0) (0.023509837817 0.33056889148 0) (0.0262297970307 0.32238578514 0) (0.0278719011056 0.30964837619 0) (0.0281875890651 0.292557699445 0) (0.0269635654049 0.271577416282 0) (0.0240613897395 0.247689343729 0) (0.0203347823762 0.222670436424 0) (0.0170185432623 0.199160525157 0) (0.0166137894554 0.180551215545 0) (0.023870975359 0.170828433286 0) (0.0453155091544 0.172428776011 0) (0.0758231834361 0.182398777609 0) (0.037518870372 0.0801266668076 0) (0.00380648011272 0.0222860264432 0) (4.89153307315e-05 0.0173904868655 0) (-0.000262282642714 0.0168132065165 0) (-0.000649647577363 0.0153456709604 0) (-0.00145393864507 0.0137460163523 0) (-0.0017508096722 0.0139042955915 0) (-0.00145019046788 0.0135315417984 0) (-0.00120459380708 0.0135220510876 0) (-0.0010224408843 0.0133012376764 0) (-0.000606735574056 0.0109790011217 0) (-0.000379781230267 0.0100263878161 2.95002932551e-30) (0.000657911329814 0.0132649156347 0) (0.000819393067389 0.0105394999789 0) (-0.000879831021732 0.0140013816697 0) (-0.00141223376924 0.0146775634821 0) (-0.00125743322439 0.0122069072379 0) (-0.0011834241526 0.00928288624271 0) (-0.00193753929752 0.00956436497633 0) (-0.00254468825553 0.00995154626502 0) (-0.00314272743717 0.0103184577239 0) (-0.00373534034702 0.0106552204958 0) (-0.00436942519762 0.0109310762124 0) (-0.00511654169598 0.0111683232397 0) (-0.00623661724368 0.0118166555851 0) (-0.00746335140469 0.0124295605713 0) (-0.0086167381028 0.0128574054702 0) (-0.00948820628429 0.0129283016435 0) (-0.00952624599941 0.0124309909397 0) (-0.00808779529526 0.0103321321132 0) (-0.00721583036158 0.00884585866204 0) (-0.00774517070493 0.00905447868659 0) (-0.00866075875113 0.00974835971705 0) (-0.0092167650339 0.00996559905642 1.17037382621e-29) (-0.010049902554 0.0103246697659 0) (-0.0112356797176 0.0110628558145 0) (-0.0126887737411 0.0120147079839 0) (-0.0136174565759 0.012475400814 0) (-0.0143284155289 0.0127086673664 0) (-0.0159916978518 0.0137793695078 0) (-0.0171462207067 0.01465025444 0) (-0.0180179415372 0.0148582331432 0) (-0.0190936239257 0.0154409260356 0) (-0.0210542860661 0.0171176589489 0) (-0.0221314458453 0.0179159052542 0) (-0.0228537329808 0.0188680935728 0) (-0.0255195041381 0.0207069821885 0) (-0.0247863845813 0.0228197149769 0) (-0.0254124015016 0.0295859564532 0) (-0.027538351747 0.0447180633852 0) (-0.0483781679696 0.142574430329 0) (-0.132502117289 1.22566356485 0) (-0.315657138355 0.560742787971 0) (-0.156071688916 0.362311129814 0) (-0.103600667323 0.284769052659 0) (-0.0817875759275 0.258980714557 0) (-0.0716359230714 0.249363844525 0) (-0.0581174487253 0.247278857562 0) (-0.0454390010109 0.251404325751 0) (-0.0346823649966 0.260352665141 0) (-0.0246794257134 0.272155031616 0) (-0.0160667715109 0.285877643705 0) (-0.00890186277246 0.300180621537 0) (-0.00262282891101 0.313648937037 0) (0.00291754457237 0.32507461421 0) (0.0078843661695 0.333449047839 0) (0.0123762207339 0.337991297659 0) (0.0163535332996 0.338175044292 0) (0.0196868267306 0.33368968409 0) (0.0221716393322 0.324404809913 0) (0.023580376269 0.310339250414 0) (0.0237024006685 0.291735465929 0) (0.0223610912607 0.269205111023 0) (0.01946610543 0.244072373353 0) (0.0163232394242 0.218771129564 0) (0.0146612336732 0.197003150425 0) (0.0185252574928 0.183778020109 0) (0.0361127545266 0.187074211507 0) (0.0755959167655 0.215921242235 0) (0.0829800150708 0.299727207316 0) (0.0115649243729 0.0273832470078 0) (0.00223003676682 0.019603924667 0) (0.00156876306297 0.0173848787122 0) (0.00153193841371 0.0170089037232 0) (0.000826389039248 0.0142618377018 0) (-1.37401458282e-05 0.0137131325997 0) (-0.000400859311512 0.0139889452121 0) (-0.000335945627522 0.0138399277845 0) (-0.000212967258526 0.0139392233298 0) (-0.000190105933982 0.0140969322049 0) (6.66504184282e-05 0.0137694743299 0) (6.57212212633e-05 0.0118124356857 0) (0.000178840706736 0.0145051145788 0) (0.000281894402609 0.00987810010868 0) (-0.000703506318389 0.0133754730617 0) (-0.00149906889535 0.0140699393227 0) (-0.0019247739964 0.0128226008632 0) (-0.00165438371223 0.00877111820588 0) (-0.00238386604057 0.00901906582747 0) (-0.00292879213347 0.00942403354832 0) (-0.00348560183534 0.00979839389402 0) (-0.00405435582112 0.0101172211285 0) (-0.0046589251033 0.0103927832784 0) (-0.00530420430514 0.0106270446596 0) (-0.00605798919215 0.010811440146 0) (-0.00711882734912 0.0112121182615 0) (-0.00844263560141 0.0117704984049 0) (-0.00977160136458 0.012206345883 0) (-0.0107428350032 0.0122288891868 0) (-0.0109070254587 0.0116536125686 0) (-0.00931010929111 0.00959403192192 0) (-0.00865412508166 0.00854126075956 0) (-0.00941369634941 0.00885530151967 0) (-0.00985923217127 0.00906641061819 0) (-0.0111632374797 0.00999244452586 0) (-0.0118412676696 0.0102092871345 0) (-0.0127497151429 0.0105576799426 0) (-0.0136542334664 0.0110258411449 0) (-0.0155286281257 0.0120426573544 0) (-0.0163892298856 0.0124298379734 0) (-0.0172832288864 0.0129198870815 0) (-0.0191122821469 0.0139382234352 0) (-0.0203914689755 0.0146021140547 0) (-0.0215919746204 0.0151554060363 0) (-0.0225170557402 0.0159767656046 0) (-0.0250066696436 0.0177564194304 0) (-0.0257894559921 0.0191754259881 0) (-0.0280264482482 0.0212544875439 0) (-0.0274410994218 0.0259108966353 0) (-0.0296021886931 0.0371593450616 0) (-0.0301954917775 0.110969199503 0) (0.21767739039 1.95665683929 0) (-0.41441810039 0.632101019421 0) (-0.173851738256 0.391827593877 0) (-0.108730462973 0.29983916797 0) (-0.0843076505063 0.270657293578 0) (-0.0748328564238 0.260615025055 0) (-0.0615624179752 0.258226962334 0) (-0.0487167033629 0.261812319284 0) (-0.0379096832299 0.270077711597 0) (-0.0278134260667 0.281141816722 0) (-0.0190160546726 0.294057161859 0) (-0.0117525627056 0.307574677976 0) (-0.00542341878274 0.320310170088 0) (0.00011550469421 0.331068500881 0) (0.00503110316336 0.338801654201 0) (0.00942963474418 0.342677249871 0) (0.0132802271624 0.342108247241 0) (0.0164640511052 0.336722169889 0) (0.0187941133571 0.326341391538 0) (0.0200755530513 0.310972506915 0) (0.0201578016862 0.290925179223 0) (0.018968864383 0.267035361122 0) (0.0166804304714 0.241179323531 0) (0.0155940872591 0.216978353957 0) (0.0185004215304 0.200168151791 0) (0.0306832404692 0.198455908839 0) (0.0594898088269 0.219027163994 0) (0.0865730544092 0.257105824997 0) (0.0371370309294 0.0918270232391 0) (0.00719121753616 0.0234233873983 0) (0.00709219424551 0.0184425226305 0) (0.00492854967906 0.0168738607965 0) (0.00368535409756 0.0152938777566 0) (0.00238476751555 0.0138234672178 0) (0.00151635747047 0.0125655280484 0) (0.00124871833083 0.0138864866517 0) (0.00114313335423 0.0139262649732 0) (0.00113533445241 0.0139203592679 0) (0.00110503226153 0.0136704883703 0) (0.000845181754837 0.0123081657595 0) (0.000315261940073 0.0106452589294 0) (-0.000735278145014 0.0138164578802 0) (-0.000404345866856 0.00939700877364 0) (-0.00050988321508 0.0126656535342 0) (-0.00140097065081 0.0131512405643 0) (-0.00252526425057 0.0130081024694 0) (-0.00214653443355 0.00839224983683 0) (-0.00282032636732 0.00852478311598 0) (-0.00332216527 0.00893779820438 0) (-0.00382651878579 0.00931134809956 0) (-0.00435158765008 0.00960285223117 0) (-0.0049284296191 0.00983000367429 0) (-0.00557056902246 0.0100141588816 0) (-0.0062823787066 0.010186677764 0) (-0.00711662523691 0.0103244904474 0) (-0.00810571566227 0.0104390426924 0) (-0.00945602656588 0.0108155161029 2.95889331813e-29) (-0.0109733968966 0.0112655632711 0) (-0.0122066895829 0.0114914122458 0) (-0.0126096461253 0.0111106078215 0) (-0.0110476541831 0.00916802636565 0) (-0.010318834114 0.00823492439317 0) (-0.010889035117 0.0085531487162 0) (-0.0115556023977 0.00889635463051 0) (-0.0123708929748 0.00920817902864 0) (-0.012942402492 0.00939949422685 0) (-0.0147840206375 0.0102851298088 0) (-0.0156201691487 0.0104670254756 0) (-0.016839180977 0.0112599883313 0) (-0.0183631381 0.0120084148447 0) (-0.0195877334596 0.0122411360887 0) (-0.0205703041237 0.0125871210233 0) (-0.0230346991099 0.0141149352514 0) (-0.0244220531017 0.0149310296648 0) (-0.0258744328611 0.0156634705749 0) (-0.0272565112015 0.0171321497977 0) (-0.0289898221326 0.019449766992 0) (-0.0298741411035 0.0235876135963 0) (-0.0287843793982 0.0307630093949 0) (-0.0260528780638 0.0648501834542 0) (0.0567973912365 0.705834757642 0) (-0.682282030415 0.700560064849 0) (-0.207177446576 0.428960756889 0) (-0.116484676075 0.317517045472 0) (-0.0870526048418 0.283362186295 0) (-0.0776867815641 0.272331353985 0) (-0.0644544921159 0.269442981669 0) (-0.0514694925131 0.272404291694 0) (-0.0405952042033 0.279931841752 0) (-0.0304598357462 0.290230736838 0) (-0.0214731961586 0.302301703008 0) (-0.0141093179727 0.314999803498 0) (-0.00773307406274 0.326970108008 0) (-0.0021990455271 0.337038361292 0) (0.0026721849322 0.344116542344 0) (0.0069969150756 0.347320620268 0) (0.0107580683079 0.346004472925 0) (0.0138512711742 0.33973471132 0) (0.0161094931587 0.328288398948 0) (0.017368104028 0.311667953599 0) (0.0175198789514 0.290274992147 0) (0.0165317652298 0.265231849302 0) (0.0147168214799 0.239082215146 0) (0.0152113916716 0.216725184008 0) (0.021439583688 0.205339571994 0) (0.0407500489908 0.212950287164 0) (0.0801965536167 0.244748805729 0) (0.0755211426851 0.314751243846 0) (0.0156205490965 0.0277205222898 0) (0.00736378650413 0.0176085409866 0) (0.00784079877657 0.0158933658179 0) (0.00684096877938 0.0151950622007 0) (0.00524684660049 0.0141195589693 0) (0.00375995921591 0.0126667505272 0) (0.00316554626252 0.012369376709 0) (0.00316647238271 0.0136455408983 0) (0.00269343516548 0.0138390801362 0) (0.00228250154357 0.0138278712667 0) (0.00184124167038 0.0136332383904 0) (0.00110583687753 0.0120477317213 0) (0.000626477441401 0.0103505068019 0) (-5.70851526784e-05 0.0125049840045 0) (-0.000238382312602 0.012367983227 0) (-0.00040801496507 0.012278486507 0) (-0.00124715315918 0.0116199558102 0) (-0.00290285545454 0.0126999865418 0) (-0.0026488002073 0.00831332117585 0) (-0.00324826771773 0.00806913673075 0) (-0.00375000825696 0.00851961153456 0) (-0.00417562469907 0.00889649218518 0) (-0.00463004513675 0.00914404601765 0) (-0.00515970101923 0.00930351785015 0) (-0.00577895653663 0.00940808600166 0) (-0.00649769142392 0.00948434854649 0) (-0.00732913756468 0.00955278199186 0) (-0.00827148929909 0.00960464315232 0) (-0.00936739455743 0.00963620914635 -2.87413612077e-29) (-0.0106540771808 0.00969476775599 0) (-0.0120814477741 0.00996418446629 0) (-0.0136279158852 0.0105138769074 0) (-0.0144609530567 0.010570432086 0) (-0.0133265729693 0.00917932826779 0) (-0.0123935830785 0.00809536509267 0) (-0.012628586774 0.00815779245475 0) (-0.013175933155 0.0083735259573 0) (-0.0142311223697 0.00868616553641 0) (-0.0153832492836 0.00899381837965 0) (-0.0160711125934 0.00920415503158 0) (-0.0173513001596 0.00978977247689 0) (-0.0192330233674 0.0106664720338 0) (-0.0205302592268 0.0111155446005 0) (-0.0222048752971 0.0117218381893 0) (-0.0231573613561 0.0119171780636 0) (-0.0247709965738 0.0125576416429 0) (-0.0274777354792 0.01425790856 0) (-0.0289885843715 0.0157739522034 0) (-0.0301989291337 0.0176177733214 0) (-0.0320296000732 0.0208420494295 0) (-0.0312973996097 0.0275312514817 0) (-0.025019634123 0.0493303140884 0) (-0.0114533431986 0.289907562771 0) (-0.542618902829 0.806152197353 0) (-0.241384586282 0.480411566896 0) (-0.123651911601 0.340135396315 0) (-0.0884231009457 0.297637639457 0) (-0.0796646324278 0.284569839757 0) (-0.0666070985184 0.280885459022 0) (-0.0536052320144 0.283136944093 0) (-0.0426825432073 0.28988755961 0) (-0.03256998347 0.299398020962 0) (-0.0233968598768 0.310591307731 0) (-0.0159373286832 0.322437201438 0) (-0.00952483409201 0.333612260437 0) (-0.00401063976382 0.342972433348 0) (0.000811780019707 0.349391815045 0) (0.00507122756617 0.351934795304 0) (0.0087701170165 0.34989836658 0) (0.0118250808324 0.342789367436 0) (0.0140971142521 0.330342024555 0) (0.0154674072685 0.312565354346 0) (0.0159236568116 0.289996593168 0) (0.0156516559571 0.264200296163 0) (0.0158275415661 0.238857807202 0) (0.0223622486834 0.221437672163 0) (0.042791091854 0.222962161987 0) (0.0904837646061 0.25524981475 0) (0.160503406242 0.322760782997 0) (0.138843443251 0.424077222889 0) (0.0113610034227 0.0217399713007 0) (0.0129821085952 0.0148464223594 0) (0.00997873943038 0.0141556617745 0) (0.00811193191642 0.0135096204905 0) (0.00623127919559 0.0123516780004 0) (0.00530902132518 0.0122080066946 0) (0.00493662089973 0.0123787611523 0) (0.00476512840662 0.013243124247 0) (0.00398104593094 0.0133991426191 0) (0.00322759780523 0.0133444074072 0) (0.0023724662933 0.013174578354 0) (0.00118868914315 0.0114514895388 0) (0.000685374778551 0.0104338832496 0) (0.000661648860985 0.0122065305023 0) (0.000362393046769 0.0106558253709 0) (-0.000531865601419 0.0116727712568 0) (-0.00117686120031 0.0099985941306 0) (-0.0029810559837 0.0122027287009 0) (-0.0031747658136 0.00815256833311 0) (-0.00379799287741 0.00754821145964 0) (-0.00428229471128 0.0079367134096 0) (-0.00461360798905 0.00817222401006 0) (-0.00498683229206 0.00822173006291 0) (-0.00548313662497 0.00819466215912 0) (-0.00610137537004 0.00814429463655 0) (-0.00683766699372 0.00809712017957 0) (-0.00769420467784 0.00807329497134 0) (-0.00867511033411 0.00808564512617 0) (-0.00979862760316 0.00816813422411 0) (-0.0110620267409 0.00837015957119 0) (-0.0123312049682 0.00872540989845 0) (-0.0135484062257 0.00909820184392 0) (-0.014735757886 0.00935083447897 0) (-0.0158065042699 0.00951482076331 0) (-0.0164019851883 0.0092586315203 0) (-0.0154920969642 0.00833461649912 0) (-0.0151482041711 0.00776287687701 0) (-0.0156813829507 0.00773321674053 0) (-0.0163184613758 0.00797540265522 0) (-0.0170687751156 0.00825302726976 0) (-0.0182815493638 0.00878024228477 0) (-0.0195446591349 0.00927899534722 0) (-0.020661860994 0.00930756675691 0) (-0.0217770614698 0.00939812268699 0) (-0.024778688095 0.0104979548539 0) (-0.0265227823389 0.0111733902299 0) (-0.0278901832439 0.0123015294171 0) (-0.0290826350458 0.0133844920062 0) (-0.0324786067382 0.0156217158085 0) (-0.0340826108397 0.0183144532167 0) (-0.03603912765 0.0231850129616 0) (-0.0312053294052 0.0392224544208 0) (-0.0366052973605 0.150288427251 0) (-0.241744018077 0.958127662348 0) (-0.273435088004 0.552387825959 0) (-0.131958704495 0.368872464303 0) (-0.0872380040997 0.313139510265 0) (-0.080397581989 0.297015329687 0) (-0.0679491987726 0.292409686003 0) (-0.0550983482016 0.293958051061 0) (-0.044149989883 0.299935225483 0) (-0.0341116857418 0.308639300923 0) (-0.0247635278833 0.318923254958 0) (-0.0172220217366 0.329882294965 0) (-0.0107940504295 0.34023275444 0) (-0.00532760979996 0.348870933846 0) (-0.000571145338594 0.354637777762 0) (0.00361968333657 0.356546608325 0) (0.00727197728184 0.353840214295 0) (0.0103310088797 0.345967267165 0) (0.0126947465472 0.332623361146 0) (0.0142960203172 0.313845576973 0) (0.0152020234553 0.290391286178 0) (0.0157234549976 0.264536049084 0) (0.017762008862 0.241744275681 0) (0.0288963733929 0.232899570971 0) (0.0567589412508 0.250553045306 0) (0.111114515502 0.29756546188 0) (0.134897034213 0.352903007553 0) (0.0209049638706 0.0280277713236 0) (0.00379420956429 0.011783510008 0) (0.00972895615015 0.0125736817511 0) (0.00973490723775 0.0125561958212 0) (0.00830816015292 0.0119147891387 0) (0.00750257758109 0.0119254299764 0) (0.00636064870829 0.011135625395 0) (0.00640728936405 0.0122431634778 0) (0.00557568937348 0.0124633695374 0) (0.00459893274244 0.0125744934626 0) (0.0035929218659 0.0124837568999 0) (0.00238257776125 0.0117654499624 0) (0.00119844408564 0.00985031359314 0) (0.00102497370093 0.0105365838375 0) (0.00105301565363 0.0121341243592 0) (0.000550457270668 0.0110887814909 0) (-0.000997328607623 0.0111177769995 0) (-0.00131581351503 0.00877461324702 0) (-0.00308558300033 0.0114265907943 0) (-0.00358056434896 0.00711743812332 0) (-0.00458651663669 0.00693332463327 0) (-0.00517369445566 0.00749439200613 0) (-0.00583160453778 0.00796023449657 0) (-0.00658994893658 0.00808338770362 0) (-0.00760129626642 0.00808488349241 0) (-0.00876006895143 0.00803996466389 0) (-0.00996422204077 0.00798054217237 0) (-0.0110862716296 0.00793039259304 0) (-0.012010652879 0.00789545334291 0) (-0.012679957663 0.0078143431184 0) (-0.012921211288 0.00757264462637 0) (-0.0131662469621 0.00749790121454 0) (-0.0141266055984 0.00787732654956 0) (-0.0150790528904 0.00805489772805 0) (-0.0162095230155 0.00804901070498 0) (-0.0173125713988 0.00829087096555 0) (-0.0182908279801 0.00862439967096 0) (-0.0186825640853 0.00842220870953 0) (-0.0185094512094 0.00801190871713 0) (-0.0178209479319 0.00748568145766 0) (-0.0182141210582 0.00740624736135 0) (-0.0184406976589 0.00733530685136 0) (-0.0203884518558 0.00782479536281 0) (-0.0218079788944 0.00794227677542 0) (-0.0236563943763 0.00809107130336 0) (-0.0249635013961 0.00849098276147 0) (-0.0262645335928 0.00951869986845 0) (-0.0273522812532 0.0103878825055 0) (-0.0307317996455 0.0115586831122 0) (-0.0325818761496 0.0130833083082 0) (-0.0346134263734 0.015192261859 0) (-0.0382659329882 0.0187636254455 0) (-0.0374857154052 0.0282177441008 0) (-0.0364305360086 0.0786546492251 0) (0.0839657879718 1.1446257438 0) (-0.307500739492 0.641627287363 0) (-0.139017715615 0.401822805723 0) (-0.0820392813024 0.328715478974 0) (-0.0798447598974 0.309231535626 0) (-0.0686463429219 0.303888558578 0) (-0.0560304899754 0.304818343293 0) (-0.0450183066321 0.310033413243 0) (-0.03506930994 0.317897871996 0) (-0.0255659063801 0.327231658264 0) (-0.0179680046115 0.337261091032 0) (-0.0115582308304 0.346756562058 0) (-0.00618263342007 0.354661232606 0) (-0.00152306156409 0.359791144622 0) (0.00258507300136 0.361110337176 0) (0.00619866953585 0.357810804729 0) (0.00930082199285 0.349286275167 0) (0.0118346945204 0.335199709481 0) (0.0137888334827 0.315635026252 0) (0.0153206731507 0.291643162186 0) (0.0170056534649 0.266474891723 0) (0.0228341788703 0.248072534418 0) (0.0462073071555 0.252040763302 0) (0.103372557351 0.293233564179 0) (0.193307169631 0.372372345056 0) (0.127926738834 0.492179687527 0) (0.013336408162 0.024010575768 0) (0.0135410595791 0.0141226046713 0) (0.0117577507457 0.0124688819898 0) (0.0101343445309 0.0113735963186 0) (0.008950202439 0.0108369038939 0) (0.00814244199994 0.0107794852982 0) (0.00758975756986 0.0111242876692 0) (0.00696218424067 0.0113747246599 0) (0.00590659964505 0.0115114165995 0) (0.00480912412453 0.0115628425047 0) (0.00364282885878 0.0113943164914 0) (0.00236696974004 0.0107236317976 0) (0.00160065032944 0.00982288538348 0) (0.00153023885345 0.0106983702591 0) (0.00131917423508 0.0115875703349 0) (0.000562657667459 0.00930726358454 0) (-0.00156316436608 0.00988972545835 0) (-0.00190368008641 0.00858231059182 0) (-0.00334297377996 0.0103515215769 0) (-0.00391950295848 0.00621530803275 0) (-0.00592995333558 0.00702382239805 0) (-0.00650629333005 0.00728709567639 0) (-0.0074473831021 0.00743293143213 0) (-0.00842764085058 0.0071029845808 0) (-0.00962010530933 0.00674411292682 0) (-0.0108072413669 0.00652250869328 0) (-0.0118375270048 0.00643750519457 0) (-0.0126804129931 0.00652576983459 0) (-0.0134014492157 0.00676673832455 0) (-0.0141157595657 0.00705639113295 0) (-0.014832812006 0.00734845666929 0) (-0.0155038366422 0.00752502378444 0) (-0.0161254527091 0.00763005929174 0) (-0.0167282410222 0.00775578427163 0) (-0.0171215764768 0.00770188993738 0) (-0.0169858014137 0.00739876978231 0) (-0.0178126971846 0.00746057808583 0) (-0.01856493558 0.00760641057518 0) (-0.019497269301 0.00778370612796 0) (-0.0200289207424 0.00760994432228 0) (-0.0204283380905 0.00720894268657 0) (-0.0211170412658 0.00683448535512 0) (-0.0222591119903 0.0066652265054 0) (-0.0223951112593 0.00642700850393 0) (-0.0237403964873 0.00670391651745 0) (-0.0245359933358 0.00720399756496 0) (-0.0256206750568 0.00778401098545 0) (-0.0286529406933 0.00849503171873 0) (-0.0305141944601 0.00908278316396 0) (-0.0321786144942 0.010557249881 0) (-0.0361904038532 0.0121962206295 0) (-0.0399062208121 0.0135483228155 0) (-0.0437776979817 0.0167810734255 0) (-0.0413129330906 0.0498199374649 0) (0.341412927341 1.30296090529 0) (-0.352770636489 0.722154523617 0) (-0.147135365061 0.430546102463 0) (-0.0739686436958 0.341813098648 0) (-0.0787863583761 0.320803510611 0) (-0.0690405789944 0.315429553906 0) (-0.0564885345756 0.315879708228 0) (-0.0452911406283 0.320317384846 0) (-0.0354175687983 0.327275279004 0) (-0.0257976710693 0.335599925458 0) (-0.0181884670064 0.344643435816 0) (-0.0118473239118 0.353251498994 0) (-0.00662169941928 0.360416192162 0) (-0.00210665468301 0.364938378102 0) (0.00189173463968 0.365734001162 0) (0.00546537776551 0.361948092022 0) (0.00864590621565 0.35291948902 0) (0.0114400593227 0.338280917576 0) (0.0139221699554 0.318193210417 0) (0.0163708187487 0.294162261405 0) (0.0196851236904 0.271015598446 0) (0.0306075718482 0.260624753916 0) (0.0652874275436 0.285371158663 0) (0.128589811387 0.359043566407 0) (0.139374321246 0.441001657742 0) (0.0383120656713 0.0563643385163 0) (0.00460850031514 0.0144572821748 0) (0.011429206884 0.0119081972696 0) (0.0116966083113 0.0111808498534 0) (0.0105250754629 0.0103762916994 0) (0.0100711593841 0.0103537404713 0) (0.00872228985308 0.00980040715966 0) (0.00835973660709 0.0103362554223 0) (0.00727285128757 0.0104797994156 0) (0.00621903315726 0.0105494454605 0) (0.00507573467201 0.0105884801779 0) (0.00385136193497 0.0105030170676 0) (0.00262111066734 0.00980475900955 0) (0.00202469712448 0.00960517708795 0) (0.00168763305871 0.0102287945591 0) (0.00120602040107 0.0112851953545 0) (0.000409218259866 0.0087645416548 0) (-0.00120519305299 0.00746351071021 0) (-0.00267638870212 0.00941763263997 0) (-0.00370524781816 0.00933224034523 0) (-0.00346674362438 0.00475688098819 0) (-0.00520554868947 0.00531689889949 0) (-0.0065304167425 0.00599507106757 0) (-0.00784080058863 0.00606149381612 0) (-0.00904055891716 0.0056509709154 -8.53478032867e-30) (-0.010187061651 0.00542561761285 7.95689028075e-30) (-0.0110891281625 0.00551047767246 0) (-0.0117789701926 0.00579213656476 0) (-0.0122917135513 0.00619118825731 0) (-0.01267337265 0.0064761941 0) (-0.0130266603506 0.00650787935258 0) (-0.0133122615718 0.00636467196936 0) (-0.0141522481081 0.00646728380314 0) (-0.0149170284092 0.00664536089348 0) (-0.0157112695553 0.00689433145901 0) (-0.0165080901834 0.00714423195096 0) (-0.0173098291238 0.0072382684451 0) (-0.0180125740806 0.00714738548096 0) (-0.0185293976286 0.00699328711425 0) (-0.019365503507 0.00687003176371 0) (-0.0200989008658 0.00659583244668 0) (-0.0212929689399 0.00639854417582 0) (-0.0223254553159 0.00619261665496 0) (-0.022938274632 0.00612712876123 0) (-0.0233980895004 0.00609313955126 0) (-0.0236723284897 0.0058997293308 0) (-0.0246116468733 0.00592140232112 0) (-0.025980953597 0.00595284181317 0) (-0.0283834672277 0.00645161177284 0) (-0.0296256680179 0.00704868475161 0) (-0.0315753492169 0.0076093552872 0) (-0.0349327736549 0.00825050190566 0) (-0.0387302062603 0.00819540754227 0) (-0.0441420507439 0.00644233521295 0) (-0.038507433872 0.0221553133519 0) (0.416199480152 1.3825911442 0) (-0.421430807577 0.780136278005 0) (-0.163581926783 0.454571712093 0) (-0.0689140828081 0.353918180098 0) (-0.0797145664159 0.332737419877 0) (-0.069811397517 0.3273732567 0) (-0.0565877569836 0.327112974483 0) (-0.0449559049938 0.330584553422 0) (-0.0351150189692 0.336481753758 0) (-0.0254414566937 0.343702079169 0) (-0.0178920648321 0.351683326972 0) (-0.0116959212922 0.359366321848 0) (-0.00670301291298 0.365785630955 0) (-0.00240138288062 0.369740960538 0) (0.00144572111245 0.370104933732 0) (0.00497490652417 0.365979093299 0) (0.00828616931615 0.356660600806 0) (0.0114628170334 0.341774655675 0) (0.0146340032152 0.321606342798 0) (0.0179960103281 0.298243565725 0) (0.0223408914654 0.278332875109 0) (0.0370756949116 0.277244400138 0) (0.0758143946963 0.318577299245 0) (0.130431734365 0.397621545752 0) (0.077334325213 0.462416795421 0) (0.0248180624175 0.0265974163937 0) (0.0181025249634 0.0142649746629 0) (0.0149550452004 0.011840123944 0) (0.0126187899047 0.0102084041201 0) (0.011413137268 0.00938566224511 0) (0.0106688354965 0.00920311345272 0) (0.00989213750063 0.00937423366875 0) (0.00880908357913 0.00941564328897 0) (0.00766277072272 0.00950028897637 2.61364755584e-30) (0.0065251645165 0.00953952537986 0) (0.00520794356006 0.00932062452615 0) (0.00395094999907 0.00905884646468 0) (0.00298819957505 0.00879594131214 0) (0.00246243822528 0.00914141202267 0) (0.00198635262615 0.00991708002545 0) (0.00123522364803 0.0106270159587 0) (0.000303627596654 0.00807237143308 0) (-0.000599032090468 0.00531277273111 0) (-0.00227941429197 0.00786676755207 0) (-0.00426116039957 0.00845460779443 -1.02342441582e-29) (-0.00324004751611 0.00390343558036 0) (-0.00399120042772 0.00352954598928 0) (-0.00646678651879 0.00485228314818 0) (-0.00781892843162 0.00484350476057 0) (-0.00880935153317 0.00478246208418 0) (-0.0094057089935 0.00496502097324 0) (-0.00968817440812 0.00523737353994 0) (-0.0097545479027 0.00527710146159 0) (-0.010057143397 0.00537017734485 0) (-0.0110244191539 0.00574571085158 0) (-0.0119446243782 0.00596757411078 0) (-0.0128395538129 0.00601507515693 0) (-0.0136418416004 0.00601554510686 0) (-0.0143978897038 0.0061360148219 0) (-0.0151546079962 0.00631859576659 0) (-0.015922352184 0.00645785952844 0) (-0.0167097094845 0.0064856283607 0) (-0.0174998189465 0.0065042540835 0) (-0.018325626498 0.00645575197209 0) (-0.0190446807127 0.00627978468136 0) (-0.0197723918969 0.00593478418477 0) (-0.0200764914635 0.00543383667425 0) (-0.0213618057723 0.00538135223207 0) (-0.021890655373 0.00532107396917 0) (-0.0229575004312 0.00532022099774 0) (-0.0241784373667 0.00526309708716 0) (-0.0248927293791 0.00502717600119 0) (-0.0257584661651 0.00467898283443 0) (-0.0269731039798 0.00462335082603 0) (-0.0288217707507 0.00495710768382 0) (-0.0304922805984 0.00511851993776 0) (-0.0331561913653 0.00504014536206 0) (-0.035459389023 0.00429691562495 0) (-0.0391009389325 0.00258030833819 0) (-0.0341875074934 0.0105261825648 0) (0.273408259918 1.23430979506 0) (-0.468136963353 0.787295675755 0) (-0.186052809947 0.472755378942 0) (-0.0679696913996 0.368562003443 0) (-0.0821846835397 0.346952475947 0) (-0.0702436785351 0.340688718315 0) (-0.0558852854023 0.339235580214 0) (-0.043780909346 0.341490809751 0) (-0.0340259400888 0.346149575992 0) (-0.0244357459375 0.352158079288 0) (-0.0170637049067 0.3589918449 0) (-0.0111220076615 0.365714720555 0) (-0.00647253802171 0.371397930871 0) (-0.00249025955552 0.374844254869 0) (0.00112825869403 0.374890688195 0) (0.00456648557575 0.370604895776 0) (0.00799657916042 0.361230406517 0) (0.0116023791082 0.346364982048 0) (0.0156231156625 0.326391382821 0) (0.0203050816123 0.303967441485 0) (0.027202804013 0.287852365832 0) (0.0533046255819 0.298146237789 0) (0.115898013387 0.360860625509 9.17159434824e-30) (0.195821722971 0.447685073859 0) (0.115953355737 0.495121143308 0) (0.0161509893559 0.0098057988662 0) (0.0175631421014 0.0093069329231 0) (0.0149992202752 0.00921214476871 0) (0.0134586045427 0.00878227970704 0) (0.0121929413881 0.00832743667014 0) (0.0112773440538 0.00822564409101 0) (0.010331495095 0.00822658965733 0) (0.00914743382787 0.00828908875598 0) (0.00794007658058 0.00836610212957 -2.54538513867e-30) (0.00668447491015 0.0082931625139 0) (0.00544408718471 0.00811220374718 0) (0.0046639405892 0.00857372955588 -2.76874023733e-30) (0.0037290941161 0.00860371347352 0) (0.00289967105435 0.00876269979366 0) (0.00223177739636 0.00933119321037 0) (0.00125269059261 0.00953920992032 0) (0.000237622918585 0.00748344794776 0) (-0.000293048045844 0.00430028117152 0) (-0.00152364739424 0.00611296885407 0) (-0.00392050290305 0.00716122864282 1.03440516902e-29) (-0.00447590347902 0.00500632488742 0) (-0.00549939739396 0.0038299965953 0) (-0.00624108181516 0.00367438318066 0) (-0.00675278208334 0.00396068933552 0) (-0.00707643268711 0.00413547952254 0) (-0.0071231269386 0.00407683780149 0) (-0.00807899135034 0.00452721033513 0) (-0.00900551087572 0.00490223888167 3.38879200489e-30) (-0.00989456378425 0.00508243755393 0) (-0.0107400898259 0.00516466500372 0) (-0.0115614300137 0.00522919183047 0) (-0.0123281019362 0.00525826187816 0) (-0.0130076886575 0.00534109239657 0) (-0.0136398381197 0.0054856707809 0) (-0.0142889839796 0.0056561525618 0) (-0.0149630825333 0.00577217356118 0) (-0.0156866274327 0.00580319586555 0) (-0.0164284752501 0.00578061531283 0) (-0.0171709459147 0.0056750253813 0) (-0.0178411107976 0.00545314257935 0) (-0.018751363012 0.00519449830294 0) (-0.0196674499012 0.00486179136476 0) (-0.0205697079366 0.00464717422826 0) (-0.0214000890567 0.0045389432227 0) (-0.0223307096162 0.00435100228232 0) (-0.0232221783462 0.00422524480232 -3.38258027695e-30) (-0.0240180990777 0.00402921528934 0) (-0.0255225249174 0.00372493619959 0) (-0.0268129157486 0.00352830385612 0) (-0.0269820070583 0.00349153324792 0) (-0.0281063021457 0.00323580706582 0) (-0.0298412248728 0.00269417177999 0) (-0.0308459622252 0.00190160427415 0) (-0.0327803283809 0.000147940589771 0) (-0.0274300498846 0.000382961854442 0) (-0.279317905491 0.624808744489 0) (-0.505734050958 0.811551038586 0) (-0.236728737667 0.521868760969 0) (-0.0779629577466 0.39660443595 0) (-0.0861129350887 0.365504221118 0) (-0.0698571985084 0.354996774776 0) (-0.0542081776539 0.351098265144 0) (-0.0416862157152 0.351491099255 0) (-0.0320707374965 0.354524035485 0) (-0.0227246843524 0.359118438892 0) (-0.0156848158451 0.364679038542 0) (-0.0101539908334 0.370385976578 0) (-0.00599398843839 0.375332008746 0) (-0.00246522249436 0.378351293007 0) (0.000813494815399 0.378248545307 0) (0.00410644784878 0.374063287321 0) (0.00771872493478 0.365042236569 0) (0.0120053637955 0.350830915265 0) (0.0174428331739 0.33208337324 0) (0.0242420739246 0.312490154642 0) (0.033782057436 0.304012948331 0) (0.0713215460849 0.333252753121 0) (0.140968448988 0.426571109151 -9.80103394872e-30) (0.143855683801 0.508017583594 0) (0.0385757110426 0.0410587567068 0) (0.0037492720828 0.011116120046 0) (0.0129696876148 0.00892884914601 0) (0.0138964054378 0.00821857022684 0) (0.013856057319 0.00792295806144 0) (0.0131108934986 0.00751923069365 0) (0.011868569178 0.00717385011458 0) (0.0106566494984 0.00701747891911 0) (0.0094531544933 0.00701620531975 0) (0.00820517901309 0.00709219981008 0) (0.00702370299593 0.00720992121115 0) (0.00593176449953 0.00722754358449 0) (0.00494417035797 0.00725479074328 2.61585954164e-30) (0.00395481440716 0.00724870366505 0) (0.00304134282301 0.00769063063731 0) (0.00239753897887 0.00874411671422 0) (0.00127752853846 0.00811371061642 0) (0.000293177403561 0.00693145374687 0) (-0.000178787787979 0.00402703465411 0) (-0.000997280701704 0.00478495840647 0) (-0.0028024885632 0.00557117481258 -1.0154536427e-29) (-0.00379567857881 0.00416831311829 0) (-0.00414196607655 0.00272882298248 0) (-0.0045736239987 0.0027265981692 0) (-0.00504130018333 0.00296365156151 0) (-0.0061008522624 0.00348623446663 0) (-0.00704029302851 0.00381540054391 0) (-0.00792796321357 0.00397636416028 0) (-0.00878964129882 0.00412612918907 -3.20800600656e-30) (-0.00960063114025 0.00425700057445 0) (-0.0103347989893 0.00440068732403 0) (-0.0110017130563 0.00453420879143 0) (-0.0115935109773 0.00466559476257 0) (-0.0121049840404 0.00480272460568 0) (-0.0125994952328 0.00487581726169 0) (-0.013177321173 0.00490127657152 0) (-0.0140539273859 0.00498770751787 0) (-0.0149105759309 0.00502613671831 0) (-0.0157765308556 0.00502535039933 8.42907662421e-30) (-0.0166407540932 0.00494950838806 -7.99179066866e-30) (-0.0175080904407 0.00472088354255 0) (-0.0183571077574 0.00436898736538 -1.99600373786e-30) (-0.0191967021983 0.00404148427119 0) (-0.0200277348413 0.00385407924543 0) (-0.0208494916336 0.00365790204736 0) (-0.0217071979426 0.00346092082605 0) (-0.0225658969667 0.00330532816653 3.26648028559e-30) (-0.023661350344 0.00301605864916 0) (-0.0246810245342 0.00269892764106 0) (-0.025276162503 0.0026754549693 0) (-0.0257991979871 0.00262940045794 0) (-0.0271806619322 0.00225003852444 0) (-0.0275761600723 0.00184398967324 0) (-0.0274112803996 0.00125066830318 0) (-0.0259006509981 0.00106053926554 0) (-0.0151097673717 0.0022563038748 0) (-0.0691126887213 0.0513705527456 0) (-0.221544616162 0.903713120022 0) (-0.283906571609 0.603306068906 0) (-0.0677275369014 0.436575511929 0) (-0.0805640624431 0.387059701679 0) (-0.0650080307575 0.371507793546 0) (-0.0499995259338 0.365340625462 0) (-0.0378656785075 0.364004355801 0) (-0.0287980566671 0.365493818189 0) (-0.0200834043277 0.3687086819 0) (-0.0136501778236 0.373000341728 0) (-0.00875158452318 0.377716287576 0) (-0.00530048376818 0.38197850764 0) (-0.00246379000577 0.384615061853 0) (0.000266191336815 0.384459778776 0) (0.00318867716951 0.380565046156 0) (0.00669125247361 0.372102316174 0) (0.0112664234692 0.358702385018 0) (0.017521085473 0.341232394479 0) (0.0252861445755 0.324485633687 0) (0.035271664636 0.323046648912 0) (0.083293629568 0.361975473366 0) (0.143145701743 0.458874152128 0) (0.0747861122981 0.514508410195 0) (0.0284412776071 0.0252322678508 0) (0.0202704132954 0.012460808542 0) (0.0162251993527 0.00920720233669 0) (0.0153014939949 0.00802731471568 0) (0.0142308260143 0.00708902717812 3.16947100848e-30) (0.0132613365757 0.00633843276676 0) (0.0122148666025 0.00593363565147 0) (0.0110518263143 0.00580178447553 0) (0.0098513693002 0.00581003358204 0) (0.00871975329804 0.00594840275859 0) (0.0075715471455 0.00615275892094 0) (0.00640722356348 0.0062463036625 0) (0.00545629844752 0.00647419168103 0) (0.00451004826501 0.0066015622764 0) (0.00337877743719 0.00666829498592 0) (0.00278971696672 0.00823389432992 0) (0.00141122596694 0.00685357730977 0) (0.000507181520112 0.00625031724005 0) (-0.000192604030297 0.0038629144801 0) (-0.000796074851738 0.00364409027642 0) (-0.00220161907577 0.00435722661206 1.01469284632e-29) (-0.00346737650411 0.00372533746806 0) (-0.0034038497199 0.00211955258802 0) (-0.0042856907565 0.00231329096434 0) (-0.0051538820001 0.00259105941847 0) (-0.00599396395703 0.00277552864779 0) (-0.00685178178774 0.0029397056413 0) (-0.00767235520522 0.00313034719585 0) (-0.0084494991923 0.00333890961781 0) (-0.00916794340938 0.00355273344329 0) (-0.00981616785256 0.00376639859219 0) (-0.0104058758483 0.00396795806414 0) (-0.0108927275546 0.00411031881725 0) (-0.0114556660571 0.00420118222165 0) (-0.0123099029389 0.00426623971117 0) (-0.0131532579445 0.00424137869391 -2.38169441481e-31) (-0.0140081381642 0.0042181378564 2.2900821119e-31) (-0.0148489004121 0.00423130596012 0) (-0.0156618052488 0.00421896364586 0) (-0.0164479000544 0.00412182375465 -1.22784456874e-29) (-0.0172408266394 0.00387294736758 1.16164131575e-29) (-0.0180542778934 0.00353520975099 1.97071748348e-30) (-0.0188854127763 0.00325706482984 0) (-0.0197150455377 0.00306514229479 0) (-0.0205709328858 0.00282453588652 0) (-0.0213400687246 0.0025418343449 0) (-0.0223026156657 0.00232615271376 0) (-0.0232600833481 0.00212522083604 0) (-0.024076124492 0.00200406863251 0) (-0.0246620964476 0.00197089536247 0) (-0.0252644633874 0.00181392587405 0) (-0.0257715058785 0.00157430784529 0) (-0.0262865785374 0.00137682831564 0) (-0.0274222748914 0.00119577920494 0) (-0.0284684621566 0.00184215793564 0) (-0.0296661469116 0.0063185881755 0) (-0.0555437525934 0.0284749865788 0) (0.0294557042347 1.01303522801 0) (-0.332030455289 0.697640190402 0) (-0.0447357276271 0.471970776248 0) (-0.0686691145181 0.40852355752 -8.95710983092e-30) (-0.0593287311515 0.385737634116 0) (-0.0452933119077 0.374764959346 0) (-0.0334510889845 0.369829545298 0) (-0.0248155377827 0.368569314124 0) (-0.0167912806476 0.369745132825 0) (-0.0111207442025 0.37238016255 0) (-0.00705082340905 0.375869771723 0) (-0.00444526930449 0.379363798449 0) (-0.00244100762444 0.381814484584 0) (-0.000475089156903 0.381985771844 0) (0.00196004179708 0.378930558048 0) (0.00550535285331 0.372050572111 0) (0.010887383381 0.361180695323 0) (0.019010242652 0.347645071393 0) (0.029890134217 0.337737264779 0) (0.0493704815504 0.350228239876 0) (0.123704775897 0.419139829614 0) (0.194615194082 0.514323318942 0) (0.128178088549 0.513311821676 0) (0.0172745432579 0.00697423771242 0) (0.0163711392529 0.00759378457255 0) (0.0157921100678 0.0075181576601 0) (0.0152260612103 0.00694722792641 0) (0.0145411274597 0.00617459598525 -2.95258159968e-30) (0.0134909546225 0.0053632295776 0) (0.0125430260581 0.00486091550317 2.94889275997e-30) (0.0114560370174 0.0046430482824 0) (0.0102482588592 0.00462746882836 0) (0.0090105381812 0.00469905143378 0) (0.0080289793037 0.00499743967471 0) (0.00685415222014 0.00518375996372 0) (0.00601565357738 0.00548969655743 0) (0.00502404661227 0.00561835094328 0) (0.00382912830883 0.00565640183153 0) (0.0031944525497 0.00684378363132 0) (0.00178128479779 0.00607745625304 0) (0.000618359690723 0.00517101790027 0) (-0.000287388087331 0.00306191338055 0) (-0.000607236116043 0.00226167079037 0) (-0.00173756633984 0.00309764640991 -9.78931907129e-30) (-0.00350918436144 0.00319109187137 0) (-0.00310369251506 0.00163452088337 0) (-0.004258668908 0.00170648676536 0) (-0.00496739458039 0.00178580708277 0) (-0.00573499266736 0.00195744510101 0) (-0.00650292621184 0.00215272412302 0) (-0.00726154218745 0.00237496818268 0) (-0.00800724693635 0.00262101293553 0) (-0.00873129225194 0.00288820652436 0) (-0.00943235085418 0.00316975612291 0) (-0.0100463541649 0.00339721088082 0) (-0.0106785718346 0.0035358368393 0) (-0.0114651926413 0.00355945706378 0) (-0.0122538121279 0.00344179383109 0) (-0.0130755138741 0.00334295925294 0) (-0.0139061269107 0.00333792485002 0) (-0.014719812003 0.00337465499092 0) (-0.0155208628264 0.00340459548795 0) (-0.016245116177 0.00335792733817 0) (-0.016971645079 0.00309630386597 0) (-0.0178023329459 0.00267616651423 0) (-0.0187004466788 0.00239795370848 0) (-0.0195912654754 0.00226206176309 0) (-0.0203713402909 0.00199919312647 0) (-0.0210647419144 0.00157094224806 0) (-0.0220164369821 0.00137492134024 0) (-0.022893431456 0.00137802924765 0) (-0.0235818056191 0.0013365358163 0) (-0.0240317043829 0.00131352374672 0) (-0.0244350405097 0.00124346739558 0) (-0.0251864383779 0.00104854730541 0) (-0.025765406217 0.000570468159889 0) (-0.0266769190771 2.66775087787e-05 0) (-0.0286983881307 -0.000656283326181 -6.72222492232e-30) (-0.0323980073815 -0.00253854397862 0) (-0.0592951625429 -0.00608631668498 0) (0.168368350534 1.01144303405 0) (-0.362131457424 0.699697286999 0) (0.00681720727297 0.48950257633 0) (-0.051676758572 0.420094498902 8.85758656372e-30) (-0.0449882693343 0.4049537411 0) (-0.0338392495975 0.39549152624 0) (-0.02431542049 0.390958367753 0) (-0.0176862552575 0.389591659902 0) (-0.0115103142484 0.390203749091 0) (-0.00731145307299 0.392041017178 0) (-0.00458962493512 0.394879753424 0) (-0.00345513185731 0.397879585167 0) (-0.00295230068921 0.399857947761 0) (-0.0022674243219 0.39994264526 0) (-0.00113086376403 0.397343821585 0) (0.00107615613925 0.39110224 0) (0.00539956001634 0.381043309685 0) (0.0130411783863 0.368435515538 0) (0.0230036704064 0.359388917195 0) (0.0336618096102 0.385378676026 0) (0.145681922279 0.459172001576 0) (0.144123533293 0.564565381148 0) (0.0493471511546 0.0463153633127 0) (0.00164988183882 0.0147272781234 0) (0.0145619777759 0.00973600131008 0) (0.0163234208306 0.00755763563851 0) (0.015944294064 0.00624493388204 0) (0.0150135433245 0.00521826923055 0) (0.0139736563655 0.00429611870918 0) (0.0127814090518 0.0036428244936 -2.78545733679e-30) (0.011607910122 0.00336490020454 0) (0.0104687896184 0.00340427708664 0) (0.00922682341054 0.00354911157988 3.1553032341e-30) (0.00854199043448 0.00397522324726 0) (0.00767142595898 0.00433688208332 0) (0.00651831158213 0.004432530849 0) (0.00579215728844 0.00474829530975 0) (0.00483357318144 0.0052150495659 0) (0.00387665249911 0.00620596602726 0) (0.0016455077055 0.00472286297539 0) (0.000417068669721 0.00362266526433 0) (-0.000541315659875 0.00306723276673 0) (-0.00124569523113 0.00250729402522 0) (-0.00207527800513 0.00233235002792 1.07422240667e-29) (-0.00281299556343 0.00193490723021 0) (-0.00283596392423 0.00113784668677 0) (-0.0038049004304 0.00100309822586 0) (-0.00450406778624 0.00104685862681 0) (-0.00521727717027 0.00123522491447 0) (-0.00589630212383 0.00142550108733 0) (-0.00660202076194 0.00162328819946 0) (-0.00735518609654 0.00183414346774 0) (-0.00817826621988 0.00208968117632 0) (-0.00899054876658 0.00237501883202 0) (-0.00986590686535 0.00266772911578 0) (-0.0106091586656 0.0028515100499 0) (-0.0113038275947 0.0028329854007 0) (-0.0120673618216 0.00262585180955 0) (-0.0129301054854 0.00249580796655 0) (-0.01377566392 0.002500586921 0) (-0.0146441076027 0.00254353018973 0) (-0.015458608399 0.00264903993658 0) (-0.0161218681649 0.00271753185338 0) (-0.0168085798248 0.0022437073198 0) (-0.017843087293 0.00152653820943 0) (-0.019017178756 0.00129943851991 0) (-0.0200131259275 0.00140856624558 0) (-0.0208914381614 0.00131701738633 0) (-0.0213915701616 0.000888548533502 0) (-0.0214603392118 0.000522063145256 0) (-0.0226825417624 0.000597438471234 0) (-0.0231470316084 0.000769356348488 0) (-0.0235499852216 0.000707051912287 0) (-0.0240243698832 0.000577356390084 0) (-0.0246469079848 0.000419189372569 0) (-0.0249897244616 8.80657727e-06 0) (-0.0251520346913 -0.000757169647481 0) (-0.02486151725 -0.00224258352543 6.70481489752e-30) (-0.0214736952129 -0.00557131353182 0) (-0.0445143316355 -0.00507486914307 0) (0.269495687379 0.996099839843 0) (-0.400348275809 0.800756154489 0) (-0.00820040605465 0.475437642818 0) (-0.0513075550801 0.453587444192 0) (-0.0510401637239 0.406648867184 0) (-0.0320115352456 0.38321391128 0) (-0.0211332589453 0.369838315057 0) (-0.0139325782426 0.361767239739 0) (-0.00786317035103 0.357797850969 0) (-0.00440540743469 0.356384322244 0) (-0.00264800960494 0.356980539939 0) (-0.00223780654006 0.358994737211 0) (-0.00264945386226 0.361534026891 0) (-0.00332644970344 0.3630253427 0) (-0.00305299205142 0.362807427011 0) (-0.000713506514449 0.361095557496 0) (0.00506986688277 0.358192072885 0) (0.0178359987766 0.358073899666 0) (0.0257142293771 0.373383044845 0) (0.0534981650034 0.396246822312 0) (0.180602789229 0.56964299368 0) (0.017835079357 0.679134652831 0) (0.0423857643772 0.0418703662376 0) (0.0261613471505 0.0175119528867 0) (0.0212781609266 0.0101660199828 0) (0.0189327247991 0.00672295819086 0) (0.0179023483896 0.00504509504222 0) (0.0158054124249 0.00377954159517 0) (0.0144500274056 0.00299101010928 0) (0.0133333731163 0.00244305360191 0) (0.0123161064041 0.00211988259763 0) (0.0107468157871 0.00223889095727 0) (0.00991326113613 0.00281394612251 -3.31945114296e-30) (0.00936897480226 0.00327999591333 0) (0.00850545167408 0.00345512761916 0) (0.00736066522004 0.00359871676319 0) (0.00606204061351 0.00364011806824 0) (0.00463971881133 0.00358378890292 0) (0.00298993647454 0.00346785787222 0) (0.00118532470424 0.00281947627759 0) (0.000328149991677 0.00296506931521 0) (-0.000673187968314 0.00184315897882 0) (-0.00209408316135 0.00158733480934 0) (-0.00219693663284 0.00147101504391 8.33969796167e-30) (-0.0038926805106 0.00212715523561 0) (-0.00254722050904 0.000783221652244 0) (-0.0033319744519 0.000352739321566 0) (-0.00401166652581 0.000316223322664 0) (-0.0047197325112 0.000580495505209 0) (-0.00532665134723 0.000719161546105 0) (-0.00614360403678 0.00085084798788 0) (-0.00702310626438 0.00100625221234 0) (-0.0079606916384 0.0012394234172 0) (-0.00888881248389 0.00156250712725 0) (-0.00970364962104 0.00193890367765 0) (-0.0102805242549 0.00226126159527 0) (-0.0108139801923 0.00218758694404 0) (-0.0114424361904 0.00168123056589 0) (-0.0124665695105 0.00136755586348 0) (-0.0137935885049 0.00145189464733 0) (-0.0149869356843 0.00150823497566 0) (-0.0160843769727 0.00155290696029 0) (-0.0174368427711 0.00160050444621 0) (-0.0197215392359 0.00136117203155 0) (-0.0200529165251 0.000702368307778 0) (-0.0202611132144 0.000443427562566 0) (-0.0210758373751 0.000666820684239 0) (-0.0218690572222 0.000782306426539 0) (-0.0224262887336 0.000592968273734 0) (-0.0225539633302 0.000249070773006 0) (-0.0225350622298 0.000273255446393 0) (-0.0229913251725 0.000450484741963 0) (-0.0233039192247 0.000266964328644 0) (-0.0233557213235 0.000134428374337 0) (-0.0237370142965 0.00015107924218 0) (-0.0238914300518 -6.74392207341e-05 0) (-0.0238021699646 -0.000512806087298 0) (-0.0233068028116 -0.00142953086398 0) (-0.0230363607525 -0.00318468723036 0) (-0.0390070900188 0.00477040589948 0) (0.108921438093 0.753994239009 0) (-0.338361389881 0.51043114861 0) (0.0939828088636 0.512602135903 0) (-0.065553196054 0.459566163954 0) (0.00582287904561 0.450409299756 0) (-0.000449506126914 0.459096726764 0) (0.0012975246841 0.459240778085 0) (0.002510043335 0.460764406627 0) (0.00343300982155 0.461936810732 0) (0.00319701599573 0.463194898818 0) (0.00170747382935 0.46542406063 0) (-0.00165104349854 0.467296192656 0) (-0.0054211584645 0.467485919455 0) (-0.00860930400888 0.466881704466 0) (-0.0120909036456 0.465391219107 0) (-0.0150315132469 0.460841749671 0) (-0.0168730496922 0.453377609876 0) (-0.0192700334995 0.439927234703 0) (0.0154593612401 0.435473819257 0) (-0.0355368246319 0.46603887623 0) (0.148645559777 0.435635973628 0) (0.0336023274 0.579623004873 0) (0.0445967109296 0.00954630710366 0) (0.0327623618393 0.00688651462432 0) (0.0242452304628 0.00569279550737 0) (0.0202558549861 0.00424721172419 0) (0.0180468397593 0.00306115486635 0) (0.0164717409979 0.00225082256631 0) (0.0150532151412 0.00182427073932 0) (0.0139164564865 0.00128278410268 0) (0.0125891363378 0.00058804051808 0) (0.0114887178701 0.00102246167927 0) (0.0100887166073 0.00192537866202 0) (0.00907264498828 0.00227639628967 0) (0.0080948220341 0.0022088122956 0) (0.00689798460628 0.00214200601155 0) (0.00552509017612 0.00211738859301 0) (0.00425507013145 0.00214064343259 0) (0.00299463528235 0.00219338791104 0) (0.00158049868224 0.00190951100317 0) (0.00064515550104 0.00235139678598 0) (-0.00110205607876 0.000747768354265 0) (-0.00140789836461 0.000260785853995 0) (-0.00268690700387 0.000636965685143 -8.21346733623e-30) (-0.0044480485701 0.000966000878694 0) (-0.00641526949318 0.000902561553645 0) (-0.00677905757676 -1.67081460954e-05 0) (-0.00598448103996 -6.57420525908e-05 0) (-0.00678805314241 0.000153541947194 0) (-0.00714971958977 0.000209103716836 0) (-0.00759607478192 0.000224900655839 0) (-0.00808883610325 0.000268277364357 0) (-0.00869328172216 0.000367742917672 0) (-0.00955872012645 0.000544262735863 0) (-0.0107631125439 0.000807655498763 0) (-0.0122629918995 0.0011207938427 0) (-0.0146604931855 0.00116238196726 0) (-0.016294858679 0.000645465417762 0) (-0.0164225505576 0.00024579662714 0) (-0.0173062667091 0.000264441377414 0) (-0.0181669994382 0.000266507565379 0) (-0.0187283334519 0.000187415125461 0) (-0.0193633993868 3.06008230868e-05 0) (-0.0201517781393 1.02289919869e-05 0) (-0.0207463896449 -1.49209889173e-05 0) (-0.0206167822056 -0.00010576552075 0) (-0.0210271632569 -2.13720857546e-05 0) (-0.0217204148993 6.12914343822e-05 0) (-0.0222682487482 3.6225878955e-05 0) (-0.0223701853349 -5.66426717006e-06 0) (-0.0224590747282 4.11416848319e-05 0) (-0.0230868620462 4.97884024619e-05 0) (-0.0233492943583 -6.73587454004e-05 0) (-0.0228427497562 -0.000104946672133 0) (-0.0231958794507 -6.29714804985e-05 0) (-0.0232179067239 -0.000132537169343 0) (-0.0227457459322 -0.000274968991391 0) (-0.0215775310749 -0.000780807104475 0) (-0.0198444585915 -0.00190818296681 0) (-0.0357670460621 0.0110609680521 0) (0.463461747377 0.77892602987 0) (-2.24112790314 1.08294477973 0) (0.06956806787 0.302529110134 0) (-1.6753465576 0.657534317865 0) (-0.712935297482 0.316438636876 0) (-0.903349609528 0.317793444436 0) (-0.760237252501 0.28119942755 0) (-0.662276130037 0.259723267532 0) (-0.547943702711 0.245347411433 0) (-0.433134992563 0.236481841865 0) (-0.313243633213 0.232686178883 0) (-0.198317564292 0.234344273002 0) (-0.0818367231382 0.238550535864 0) (0.0339580534146 0.241682470774 0) (0.149730263688 0.245510382668 0) (0.257717690933 0.251489317146 0) (0.388478631092 0.258796069602 0) (0.378823880746 0.253137252106 0) (0.927965359092 0.419337759007 0) (0.169657005542 0.275469165908 0) (1.36439500554 0.767822375744 0) (-0.138830012466 0.737981351969 0) (0.0396819970474 0.0113843268047 0) (0.0251209525224 0.000258310345869 0) (0.0227753862403 0.00129143960219 0) (0.020155648427 0.00125081417985 0) (0.017911631565 0.000971143058857 0) (0.0165349874119 0.000699287000734 0) (0.0151560270811 0.000534449937947 0) (0.0139290019979 0.000240368627447 0) (0.013251639271 -0.000208032954575 0) (0.0143350056759 2.40155755835e-06 0) (0.0130215982732 0.000736234582643 0) (0.0110650130344 0.000997057528115 0) (0.00965037555938 0.000908363305966 0) (0.00820060504877 0.000861063248994 0) (0.00667512083862 0.000879201510994 0) (0.00512756213238 0.00089219027871 0) (0.00362294778082 0.000842442619588 0) (0.00201380960137 0.000657354873847 0) (0.00103949072092 0.000911668375301 0) ) ; boundaryField { frontAndBack { type empty; } upperWall { type noSlip; } lowerWall { type noSlip; } inlet { type fixedValue; value uniform (0 0.5 0); } outlet { type adjointOutletVelocityPower; value nonuniform List<vector> 20 ( (0.318782303904 -0.228719693822 0) (0.466045980703 -0.235701417957 0) (0.522415939771 -0.210427630553 0) (0.561838743625 -0.179497312535 0) (0.589646174422 -0.141467534481 0) (0.606746435306 -0.0978228210822 0) (0.615934308743 -0.0529221910479 0) (0.618068920782 -0.00680487072582 0) (0.608857513827 0.0379520278499 0) (0.593292050792 0.0775726154664 0) (0.574970828641 0.115169499204 0) (0.555152770797 0.149508742689 0) (0.535475808662 0.180091226345 0) (0.51550791752 0.205472036312 0) (0.491894310346 0.223586866842 0) (0.458167443556 0.229725236709 0) (0.413700066702 0.22146837594 0) (0.369591102003 0.201163165492 0) (0.303942546029 0.171740372063 0) (0.2388151708 0.0789811813003 0) ) ; } } // ************************************************************************* //
[ "as998@snu.edu.in" ]
as998@snu.edu.in
9b1511e659db97e3ba491f5e6f8445d6e5071d7c
ee1423adcd4bfeb2703464996171d103542bad09
/dali-core/automated-tests/dali-test-suite/events/utc-Dali-LongPressGestureDetector.cpp
fc06ce2363b2b9d80aad701f18350b692c74c7b0
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-flora-1.1" ]
permissive
sak0909/Dali
26ac61a521ab1de26a7156c51afd3cc839cb705a
0b383fc316b8b57afcf9a9e8bac6e24a4ba36e49
refs/heads/master
2020-12-30T12:10:51.930311
2017-05-16T21:56:24
2017-05-16T21:57:14
91,505,804
0
1
null
null
null
null
UTF-8
C++
false
false
48,570
cpp
// // Copyright (c) 2014 Samsung Electronics Co., Ltd. // // Licensed under the Flora License, Version 1.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://floralicense.org/license/ // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an AS IS BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #include <iostream> #include <stdlib.h> #include <tet_api.h> #include <dali/public-api/dali-core.h> #include <dali/integration-api/events/touch-event-integ.h> #include <dali/integration-api/events/long-press-gesture-event.h> #include <dali/integration-api/system-overlay.h> #include <dali-test-suite-utils.h> using namespace Dali; static void Startup(); static void Cleanup(); extern "C" { void (*tet_startup)() = Startup; void (*tet_cleanup)() = Cleanup; } enum { POSITIVE_TC_IDX = 0x01, NEGATIVE_TC_IDX, }; #define MAX_NUMBER_OF_TESTS 10000 extern "C" { struct tet_testlist tet_testlist[MAX_NUMBER_OF_TESTS]; } // Add test functionality for all APIs in the class (Positive and Negative) TEST_FUNCTION( UtcDaliLongPressGestureDetectorConstructor, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureDetectorNew, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureDetectorDownCast, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSetTouchesRequired01, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSetTouchesRequired02, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureGetMinimumTouchesRequired, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureGetMaximumTouchesRequired, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionNegative, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionPositive, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionDetach, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionActorDestroyedDuringLongPress, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionRotatedActor, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionChildHit, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionAttachDetachMany, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionMultipleGestureDetectors, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionMultipleDetectorsOnActor, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSignalReceptionDifferentPossible, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureEmitIncorrectStateClear, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureEmitIncorrectStateContinuing, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureDetectorTypeRegistry, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureRepeatedState, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGesturePossibleCancelled, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureDetachAfterStarted, POSITIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureActorUnstaged, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureActorStagedAndDestroyed, NEGATIVE_TC_IDX ); TEST_FUNCTION( UtcDaliLongPressGestureSystemOverlay, POSITIVE_TC_IDX ); // Called only once before first test is run. static void Startup() { } // Called only once after last test is run static void Cleanup() { } /////////////////////////////////////////////////////////////////////////////// // Stores data that is populated in the callback and will be read by the TET cases struct SignalData { SignalData() : functorCalled( false ), voidFunctorCalled( false ), receivedGesture( Gesture::Clear ), pressedActor() {} void Reset() { functorCalled = false; voidFunctorCalled = false; receivedGesture.numberOfTouches = 0u; receivedGesture.screenPoint = Vector2(0.0f, 0.0f); receivedGesture.localPoint = Vector2(0.0f, 0.0f); pressedActor = NULL; } bool functorCalled; bool voidFunctorCalled; LongPressGesture receivedGesture; Actor pressedActor; }; // Functor that sets the data when called struct GestureReceivedFunctor { GestureReceivedFunctor(SignalData& data) : signalData(data) { } void operator()(Actor actor, LongPressGesture longPress) { signalData.functorCalled = true; signalData.receivedGesture = longPress; signalData.pressedActor = actor; } void operator()() { signalData.voidFunctorCalled = true; } SignalData& signalData; }; // Functor that removes the gestured actor from stage struct UnstageActorFunctor : public GestureReceivedFunctor { UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage ) : GestureReceivedFunctor( data ), stateToUnstage( stateToUnstage ) { } void operator()( Actor actor, LongPressGesture longPress ) { GestureReceivedFunctor::operator()( actor, longPress ); if ( longPress.state == stateToUnstage ) { Stage::GetCurrent().Remove( actor ); } } Gesture::State& stateToUnstage; }; // Functor for receiving a touch event struct TouchEventFunctor { bool operator()(Actor actor, const TouchEvent& touch) { //For line coverage unsigned int points = touch.GetPointCount(); if( points > 0) { const TouchPoint& touchPoint = touch.GetPoint(0); tet_printf("Touch Point state = %d\n", touchPoint.state); } return false; } }; // Generate a LongPressGestureEvent to send to Core Integration::LongPressGestureEvent GenerateLongPress( Gesture::State state, unsigned int numberOfTouches, Vector2 point) { Integration::LongPressGestureEvent longPress( state ); longPress.numberOfTouches = numberOfTouches; longPress.point = point; return longPress; } /////////////////////////////////////////////////////////////////////////////// // Positive test case for a method static void UtcDaliLongPressGestureDetectorConstructor() { TestApplication application; LongPressGestureDetector detector; DALI_TEST_CHECK(!detector); } static void UtcDaliLongPressGestureDetectorNew() { TestApplication application; LongPressGestureDetector detector = LongPressGestureDetector::New(); DALI_TEST_CHECK(detector); DALI_TEST_EQUALS(1u, detector.GetMinimumTouchesRequired(), TEST_LOCATION); DALI_TEST_EQUALS(1u, detector.GetMaximumTouchesRequired(), TEST_LOCATION); LongPressGestureDetector detector2 = LongPressGestureDetector::New(5u); DALI_TEST_CHECK(detector2); DALI_TEST_EQUALS(5u, detector2.GetMinimumTouchesRequired(), TEST_LOCATION); DALI_TEST_EQUALS(5u, detector2.GetMaximumTouchesRequired(), TEST_LOCATION); LongPressGestureDetector detector3 = LongPressGestureDetector::New(5u, 7u); DALI_TEST_CHECK(detector2); DALI_TEST_EQUALS(5u, detector3.GetMinimumTouchesRequired(), TEST_LOCATION); DALI_TEST_EQUALS(7u, detector3.GetMaximumTouchesRequired(), TEST_LOCATION); //Scoped test to test destructor { LongPressGestureDetector detector4 = LongPressGestureDetector::New(); DALI_TEST_CHECK(detector4); } // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); detector.Attach(actor); TouchEventFunctor touchFunctor; actor.TouchedSignal().Connect(&application, touchFunctor); Integration::TouchEvent touchEvent(1); TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f); touchEvent.AddPoint(point); application.ProcessEvent(touchEvent); // Render and notify application.SendNotification(); application.Render(); // For line coverage, Initialise default constructor TouchEvent touchEvent2; } static void UtcDaliLongPressGestureDetectorDownCast() { TestApplication application; tet_infoline("Testing Dali::LongPressGestureDetector::DownCast()"); LongPressGestureDetector detector = LongPressGestureDetector::New(); BaseHandle object(detector); LongPressGestureDetector detector2 = LongPressGestureDetector::DownCast(object); DALI_TEST_CHECK(detector2); LongPressGestureDetector detector3 = DownCast< LongPressGestureDetector >(object); DALI_TEST_CHECK(detector3); BaseHandle unInitializedObject; LongPressGestureDetector detector4 = LongPressGestureDetector::DownCast(unInitializedObject); DALI_TEST_CHECK(!detector4); LongPressGestureDetector detector5 = DownCast< LongPressGestureDetector >(unInitializedObject); DALI_TEST_CHECK(!detector5); GestureDetector detector6 = LongPressGestureDetector::New(); LongPressGestureDetector detector7 = LongPressGestureDetector::DownCast(detector6); DALI_TEST_CHECK(detector7); } static void UtcDaliLongPressGestureSetTouchesRequired01() { TestApplication application; LongPressGestureDetector detector = LongPressGestureDetector::New(); unsigned int touches = 3; DALI_TEST_CHECK(touches != detector.GetMinimumTouchesRequired()); DALI_TEST_CHECK(touches != detector.GetMaximumTouchesRequired()); detector.SetTouchesRequired(touches); DALI_TEST_EQUALS(touches, detector.GetMinimumTouchesRequired(), TEST_LOCATION); DALI_TEST_EQUALS(touches, detector.GetMaximumTouchesRequired(), TEST_LOCATION); // Attach an actor and change the required touches Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); TestGestureManager& gestureManager = application.GetGestureManager(); gestureManager.Initialize(); detector.SetTouchesRequired(4); // Gesture detection should have been updated only DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); // Reset values gestureManager.Initialize(); // Create a second gesture detector that requires even less maximum touches LongPressGestureDetector secondDetector = LongPressGestureDetector::New(); secondDetector.Attach(actor); // Gesture detection should have been updated DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); } static void UtcDaliLongPressGestureSetTouchesRequired02() { TestApplication application; LongPressGestureDetector detector = LongPressGestureDetector::New(); unsigned int min = 3; unsigned int max = 5; DALI_TEST_CHECK(min != detector.GetMinimumTouchesRequired()); DALI_TEST_CHECK(max != detector.GetMaximumTouchesRequired()); detector.SetTouchesRequired(min, max); DALI_TEST_EQUALS(min, detector.GetMinimumTouchesRequired(), TEST_LOCATION); DALI_TEST_EQUALS(max, detector.GetMaximumTouchesRequired(), TEST_LOCATION); // Attach an actor and change the maximum touches Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); TestGestureManager& gestureManager = application.GetGestureManager(); gestureManager.Initialize(); detector.SetTouchesRequired(4, 5); // Gesture detection should have been updated only DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); // Reset values gestureManager.Initialize(); // Create a second gesture detector that requires even less maximum touches LongPressGestureDetector secondDetector = LongPressGestureDetector::New(); secondDetector.Attach(actor); // Gesture detection should have been updated DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); } static void UtcDaliLongPressGestureGetMinimumTouchesRequired() { TestApplication application; LongPressGestureDetector detector = LongPressGestureDetector::New(); DALI_TEST_EQUALS(1u, detector.GetMinimumTouchesRequired(), TEST_LOCATION); } static void UtcDaliLongPressGestureGetMaximumTouchesRequired() { TestApplication application; LongPressGestureDetector detector = LongPressGestureDetector::New(); DALI_TEST_EQUALS(1u, detector.GetMaximumTouchesRequired(), TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionNegative() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); // Do a long press outside actor's area application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, Vector2(112.0f, 112.0f ) ) ); application.ProcessEvent( GenerateLongPress( Gesture::Started, 1u, Vector2(112.0f, 112.0f ) ) ); application.ProcessEvent( GenerateLongPress( Gesture::Finished, 1u, Vector2(112.0f, 112.0f ) ) ); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionPositive() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); // Do a long press inside actor's area application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 50.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 50.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(1u, data.receivedGesture.numberOfTouches, TEST_LOCATION); DALI_TEST_EQUALS( Vector2(50.0f, 50.0f), data.receivedGesture.localPoint, 0.1, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 50.0f))); } static void UtcDaliLongPressGestureSignalReceptionDetach() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); // Start long press within the actor's area application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(20.0f, 20.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(20.0f, 20.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(1u, data.receivedGesture.numberOfTouches, TEST_LOCATION); DALI_TEST_EQUALS( Vector2(20.0f, 20.0f), data.receivedGesture.localPoint, 0.1, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(20.0f, 20.0f))); // repeat the long press within the actor's area - we should still receive the signal data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 50.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 50.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(1u, data.receivedGesture.numberOfTouches, TEST_LOCATION); DALI_TEST_EQUALS( Vector2(50.0f, 50.0f), data.receivedGesture.localPoint, 0.1, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 50.0f))); // Detach actor detector.DetachAll(); // Ensure we are no longer signalled data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(20.0f, 20.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(20.0f, 20.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 50.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionActorDestroyedDuringLongPress() { TestApplication application; SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.DetectedSignal().Connect(&application, functor); // Actor lifetime is scoped { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); detector.Attach(actor); // Start long press within the actor's area application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(20.0f, 20.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(20.0f, 20.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Remove the actor from stage and reset the data Stage::GetCurrent().Remove(actor); // Render and notify application.SendNotification(); application.Render(); } // Actor should now have been destroyed data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(20.0f, 20.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionRotatedActor() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); // Do a long press application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(5.0f, 5.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(5.0f, 5.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(5.0f, 5.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(1u, data.receivedGesture.numberOfTouches, TEST_LOCATION); DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION); // Rotate actor again and render actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS); application.SendNotification(); application.Render(); // Do another long press, should still receive event data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(5.0f, 5.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(5.0f, 5.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(5.0f, 5.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(1u, data.receivedGesture.numberOfTouches, TEST_LOCATION); DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION); // Rotate actor again and render actor.SetRotation(Dali::Degree(90.0f), Vector3::YAXIS); application.SendNotification(); application.Render(); // Do a long press, inside where the actor used to be, Should not receive the event data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(70.0f, 70.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(70.0f, 70.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(70.0f, 70.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionChildHit() { TestApplication application; Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. // Change rotation of child to be different from parent so that we can check if our local coordinate // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); child.SetAnchorPoint(AnchorPoint::CENTER); child.SetParentOrigin(ParentOrigin::CENTER); child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); TouchEventFunctor touchFunctor; child.TouchedSignal().Connect(&application, touchFunctor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(parent); detector.DetectedSignal().Connect(&application, functor); // Do long press - hits child area but parent should still receive it application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 50.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 50.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 50.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, parent == data.pressedActor, TEST_LOCATION); DALI_TEST_EQUALS(Vector2(50.0f, 50.0f), data.receivedGesture.screenPoint, 0.01f, TEST_LOCATION); // Attach child and generate same touch points // (Also proves that you can detach and then re-attach another actor) detector.Attach(child); detector.Detach(parent); // Do an entire long press, only check finished value data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(51.0f, 51.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(51.0f, 51.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(51.0f, 51.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, child == data.pressedActor, TEST_LOCATION); DALI_TEST_EQUALS(Vector2(51.0f, 51.0f), data.receivedGesture.screenPoint, 0.01f, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionAttachDetachMany() { TestApplication application; Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); first.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); second.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(first); detector.Attach(second); detector.DetectedSignal().Connect(&application, functor); // LongPress within second actor's area application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(120.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(120.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(120.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, second == data.pressedActor, TEST_LOCATION); // LongPress within first actor's area data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(20.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(20.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(20.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, first == data.pressedActor, TEST_LOCATION); // Detach the second actor detector.Detach(second); // second actor shouldn't receive event data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(120.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(120.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(120.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // first actor should continue receiving event data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(20.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(20.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(20.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); // LongPress in actor's area application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor becomes invisible - actor should not receive the next long press actor.SetVisible(false); // Render and notify application.SendNotification(); application.Render(); // LongPress in the same area, shouldn't receive event data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } static void UtcDaliLongPressGestureSignalReceptionMultipleGestureDetectors() { TestApplication application; Dali::TestGestureManager& gestureManager = application.GetGestureManager(); Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); first.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetAnchorPoint(AnchorPoint::TOP_LEFT); second.SetX(100.0f); first.Add(second); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector firstDetector = LongPressGestureDetector::New(); firstDetector.Attach(first); firstDetector.DetectedSignal().Connect(&application, functor); // secondDetector is scoped { // Reset gestureManager statistics gestureManager.Initialize(); LongPressGestureDetector secondDetector = LongPressGestureDetector::New(); secondDetector.SetTouchesRequired(2); secondDetector.Attach(second); secondDetector.DetectedSignal().Connect(&application, functor); DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); // LongPress within second actor's area application.ProcessEvent(GenerateLongPress(Gesture::Possible, 2u, Vector2(150.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 2u, Vector2(150.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 2u, Vector2(150.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, second == data.pressedActor, TEST_LOCATION); // LongPress continues as single touch gesture - we should not receive any gesture data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(150.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(150.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(150.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Single touch long press starts - first actor should receive gesture data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, first == data.pressedActor, TEST_LOCATION); // long press changes to double-touch - we shouldn't receive event data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 2u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 2u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 2u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Reset gesture manager statistics gestureManager.Initialize(); } // secondDetector has now been deleted. Gesture detection should have been updated only DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); } void UtcDaliLongPressGestureSignalReceptionMultipleDetectorsOnActor() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to one detector SignalData firstData; GestureReceivedFunctor firstFunctor(firstData); LongPressGestureDetector firstDetector = LongPressGestureDetector::New(); firstDetector.Attach(actor); firstDetector.DetectedSignal().Connect(&application, firstFunctor); // Attach actor to another detector SignalData secondData; GestureReceivedFunctor secondFunctor(secondData); LongPressGestureDetector secondDetector = LongPressGestureDetector::New(); secondDetector.Attach(actor); secondDetector.DetectedSignal().Connect(&application, secondFunctor); // LongPress in actor's area - both detector's functors should be called application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, firstData.functorCalled, TEST_LOCATION); DALI_TEST_EQUALS(true, secondData.functorCalled, TEST_LOCATION); } void UtcDaliLongPressGestureSignalReceptionDifferentPossible() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // LongPress possible in actor's area. application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Move actor somewhere else actor.SetPosition( 100.0f, 100.0f ); // Render and notify application.SendNotification(); application.Render(); // Emit Started event, we should not receive the long press. application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // LongPress possible in empty area. application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Move actor in to the long press position. actor.SetPosition( 0.0f, 0.0f ); // Render and notify application.SendNotification(); application.Render(); // Emit Started event, we should not receive the long press. application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Normal long press in actor's area for completeness. application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); } void UtcDaliLongPressGestureEmitIncorrectStateClear() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // Try a Clear state try { application.ProcessEvent(GenerateLongPress(Gesture::Clear, 1u, Vector2(50.0f, 10.0f))); tet_result(TET_FAIL); } catch ( Dali::DaliException& e ) { DALI_TEST_ASSERT( e, "false", TEST_LOCATION ); } } void UtcDaliLongPressGestureEmitIncorrectStateContinuing() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // Try a Continuing state try { application.ProcessEvent(GenerateLongPress(Gesture::Continuing, 1u, Vector2(50.0f, 10.0f))); tet_result(TET_FAIL); } catch ( Dali::DaliException& e ) { DALI_TEST_ASSERT( e, "false", TEST_LOCATION ); } } void UtcDaliLongPressGestureDetectorTypeRegistry() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type TypeInfo type; type = TypeRegistry::Get().GetTypeInfo( "LongPressGestureDetector" ); DALI_TEST_CHECK( type ); BaseHandle handle = type.CreateInstance(); DALI_TEST_CHECK( handle ); LongPressGestureDetector detector = LongPressGestureDetector::DownCast( handle ); DALI_TEST_CHECK( detector ); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); detector.Attach(actor); // Connect to signal through type handle.ConnectSignal( &application, LongPressGestureDetector::SIGNAL_LONG_PRESS_DETECTED, functor ); // Render and notify application.SendNotification(); application.Render(); // Emit gesture application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.voidFunctorCalled, TEST_LOCATION); } void UtcDaliLongPressGestureRepeatedState() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // Two possibles application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // ... Send some finished states, still no signal application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Send two Started states, should be signalled application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); // Send two cancelled states, should not be signalled application.ProcessEvent(GenerateLongPress(Gesture::Cancelled, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Cancelled, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } void UtcDaliLongPressGesturePossibleCancelled() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // Send a possible followed by a cancel, we should not be signalled application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); application.ProcessEvent(GenerateLongPress(Gesture::Cancelled, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } void UtcDaliLongPressGestureDetachAfterStarted() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Attach actor to detector SignalData data; GestureReceivedFunctor functor( data ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // Emit initial signal application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); // Detach actor detector.Detach(actor); // Emit Finished, no signal application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } void UtcDaliLongPressGestureActorUnstaged() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // State to remove actor in. Gesture::State stateToUnstage( Gesture::Started ); // Attach actor to detector SignalData data; UnstageActorFunctor functor( data, stateToUnstage ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect( &application, functor ); // Emit signals application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); // Render and notify application.SendNotification(); application.Render(); // Re-add actor to stage Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Change state to Gesture::Continuing to remove stateToUnstage = Gesture::Finished; // Emit signals application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); tet_result( TET_PASS ); // If we get here then we have handled actor stage removal gracefully. } void UtcDaliLongPressGestureActorStagedAndDestroyed() { TestApplication application; Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify application.SendNotification(); application.Render(); // State to remove actor in. Gesture::State stateToUnstage( Gesture::Started ); // Attach actor to detector SignalData data; UnstageActorFunctor functor( data, stateToUnstage ); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.Attach(dummyActor); detector.DetectedSignal().Connect( &application, functor ); // Here we are testing a Started actor which is removed in the Started callback, but then added back // before we get a finished state. As we were removed from the stage, even if we're at the same // position, we should still not be signalled. // Emit signals application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); // Render and notify application.SendNotification(); application.Render(); // Re add to the stage, we should not be signalled Stage::GetCurrent().Add(actor); // Render and notify application.SendNotification(); application.Render(); // Continue signal emission application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); data.Reset(); // Here we delete an actor in started, we should not receive any subsequent signalling. // Emit signals application.ProcessEvent(GenerateLongPress(Gesture::Possible, 1u, Vector2(50.0f, 10.0f))); application.ProcessEvent(GenerateLongPress(Gesture::Started, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); data.Reset(); // Render and notify application.SendNotification(); application.Render(); // Delete actor as well actor = NULL; // Render and notify application.SendNotification(); application.Render(); // Continue signal emission application.ProcessEvent(GenerateLongPress(Gesture::Finished, 1u, Vector2(50.0f, 10.0f))); DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); } void UtcDaliLongPressGestureSystemOverlay() { TestApplication application; Dali::Integration::SystemOverlay& systemOverlay( application.GetCore().GetSystemOverlay() ); systemOverlay.GetOverlayRenderTasks().CreateTask(); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); systemOverlay.Add(actor); // Render and notify application.SendNotification(); application.Render(); SignalData data; GestureReceivedFunctor functor(data); LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(actor); detector.DetectedSignal().Connect(&application, functor); // Do a long press inside actor's area Vector2 screenCoords( 50.0f, 50.0f ); application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, screenCoords ) ); application.ProcessEvent( GenerateLongPress( Gesture::Started, 1u, screenCoords ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); }
[ "sak0909@outlook.com" ]
sak0909@outlook.com
414a28e0887532952ec2aaf56146f2af64a6dbc9
98a112e0577d63a48fd826d14d00420e58479a03
/ejercicios/semaforo_temporizador_funcion/semaforo_temporizador_funcion.ino
696236e170ceffa98697c4fbfd6fb6cb751bccf4
[]
no_license
mundostr/itec_arduino2019_c1
d22b823d30f75ba9577a0707c51cde087761ba65
8bd0812b6a37f9acf090603c9955634a2f1e7e63
refs/heads/master
2020-05-19T03:24:49.802004
2020-02-17T12:25:21
2020-02-17T12:25:21
184,799,627
0
0
null
null
null
null
UTF-8
C++
false
false
3,111
ino
/* Reescritura ejercicio semáforo, manteniendo el uso de una función para el manejo de las luces, pero agregando temporizadores para atender varias tareas al mismo tiempo (por ejemplo, ciclar luces y estar atentos a la pulsación de un botón). */ // Incluimos la librería elapsedMillis, para manejar los temporizadores con una sintaxis más limpia #include <elapsedMillis.h> // Definimos las constantes para indicar los pines a utilizar y los tiempos de encendido de cada luz const byte PIN_RJO = 3; const byte PIN_VDE = 4; const byte PIN_AMA = 5; const int INTERVALO_RJO = 5000; const int INTERVALO_VDE = 5000; const int INTERVALO_AMA = 3000; // Agregamos un par de variables que nos servirán en el loop() para llevar // un control de qué luz encender, y poder cambiar dinámicamente el tiempo que aguarda el temporizador byte etapa = 1; int intervalo = INTERVALO_RJO; // Creamos un objeto de tipo elapsedMillis para manejar el temporizador elapsedMillis timer1; // Esta función simplemente apaga todas las luces y enciende por último la que indiquemos en el argumento "luz" void gestionarLuz(byte luz) { digitalWrite(PIN_RJO, LOW); digitalWrite(PIN_VDE, LOW); digitalWrite(PIN_AMA, LOW); digitalWrite(luz, HIGH); } void setup() { // En este caso solo inicializamos los pines de las luces como salida // no estamos habilitando la consola serial ya que los mismos leds nos // indican visualmente si el código se está ejecutando de forma correcta. pinMode(PIN_RJO, OUTPUT); pinMode(PIN_VDE, OUTPUT); pinMode(PIN_AMA, OUTPUT); } void loop() { // Continuamente chequeamos si ha transcurrido un intervalo para cambio de luces // y dentro del propio if(), ajustamos la variable "intervalo" según se necesite. if (timer1 >= intervalo) { // "etapa" comienza en 1, nos permite llevar un control de si estamos en la // etapa del rojo, el verde o el amarillo. switch (etapa) { case 1: // Si etapa está en 1, significa que debemos encender el rojo, por ende // hacemos un llamado a la función "gestionarLuz()", pasándolo como argumento PIN_RJO gestionarLuz(PIN_RJO); // y luego cambiamos intervalo y etapa, para que la próxima vez que el if() genere una // condición verdadera, el switch() ejecute el case siguiente. intervalo = INTERVALO_VDE; etapa = 2; break; case 2: // idem anterior y actualizamos "etapa" e "intervalo" para el amarillo. gestionarLuz(PIN_VDE); intervalo = INTERVALO_AMA; etapa = 3; break; case 3: // idem anterior y actualizamos para retornar a la etapa 1 (rojo). gestionarLuz(PIN_AMA); intervalo = INTERVALO_RJO; etapa = 1; } // MUY IMPORTANTE, independientemente de cuál case se ejecute en cada momento, siempre // que el if() genera una condición verdadera, corremos el código y volvemos el timer // a cero para dejarlo listo para la próxima iteracción. timer1 = 0; } }
[ "idux.net@gmail.com" ]
idux.net@gmail.com
8b91c9c88a3c5f0dcfc5f1635bd225e4f490fc4e
fcb52aa59832f7db99ae516f50bd89ab65e35fbb
/zjw_pcsRLGR.cpp
409fa35dde8e2b0140f7da337efbc4b0b3d71371
[]
no_license
kingzjw/pcs
1716380c3e89822d36725beda880f6e870fbadd1
a8decb17b8b7150c175ce0a0d38a1f52b1202bae
refs/heads/master
2020-03-16T15:23:08.444984
2018-10-06T04:11:16
2018-10-06T04:11:16
132,741,388
5
0
null
null
null
null
GB18030
C++
false
false
10,551
cpp
#include "zjw_pcsRLGR.h" PCS_RLGR::PCS_RLGR(VectorXd * mvSignal, Eigen::SparseMatrix<double>* lapMat) { //RLGR论文中有提到 stepSize deta from 0.01 - 1 范围。越低,保真度越高。 stepSize = 0.001; this->mvSignal = mvSignal; this->spLaplacian = lapMat; } PCS_RLGR::~PCS_RLGR() { } void PCS_RLGR::rlgr_mv_compress() { inputList.clear(); separateMotionVector(); #ifdef ZJW_DEBUG cout << "=========================================" << endl; cout << "start RLGR motion vector compress ...." << endl; cout << "start gft (include the compute eigen vector )..." << endl; #endif // ZJW_DEBUG //mv信号的x,y,z三种信号,分别通过gft处理成gft信号,然后合并 MatrixXd lapMat = MatrixXd(*(spLaplacian)); GFT g = GFT(lapMat); //---三种信号的结果 //VectorXcd signalGFTTotal; VectorXcd signalGFTTemp[3]; for (int signal_type = 0; signal_type < 3; signal_type++) { VectorXcd signal(mvSignalXYZ[signal_type]); g.gft(signal, signalGFTTemp[signal_type]); } //round stepsize的处理 signalGFT中的内容,转化到numsList中。 for (int i = 0; i < mvSignal->rows() / 3; i++) { /*signalGFTTotal(i * 3 + 0) = signalGFTTemp[0](i); signalGFTTotal(i * 3 + 1) = signalGFTTemp[1](i); signalGFTTotal(i * 3 + 2) = signalGFTTemp[2](i);*/ //实部和虚部都进行压缩 // 3 * 0 inputList.push_back((int)(signalGFTTemp[0](i).real() / stepSize + 0.5)); inputList.push_back((int)(signalGFTTemp[0](i).imag() / stepSize + 0.5)); // 3 * 1 inputList.push_back((int)(signalGFTTemp[1](i).real() / stepSize + 0.5)); inputList.push_back((int)(signalGFTTemp[1](i).imag() / stepSize + 0.5)); // 3 * 2 inputList.push_back((int)(signalGFTTemp[2](i).real() / stepSize + 0.5)); inputList.push_back((int)(signalGFTTemp[2](i).imag() / stepSize + 0.5)); } //处理负数 PCS_RLGR::positiveNum(inputList, inputList_u); #ifdef ZJW_DEBUG cout << "start encode signal of gft and decode get the signal ....." << endl; #endif // ZJW_DEBUG //然后gft信号经过 rlgb处理成 压缩内容。存储在文件中 //rlgr encode and compress to the file RLGR rlgr = RLGR(&inputList_u, &resList_u); rlgr.encode(); #ifdef ZJW_DEBUG cout << "end RLGR motion vector compress !!" << endl; cout << "=========================================" << endl; #endif // ZJW_DEBUG } VectorXcd PCS_RLGR::rlgr_mv_decompress() { resList.clear(); #ifdef ZJW_DEBUG cout << "=========================================" << endl; cout << "start RLGR motion vector decompress ...." << endl; cout << "start RLGR decoding ....." << endl; #endif // ZJW_DEBUG //解压数据,恢复成gft信号。解压之后数据再resList中了 RLGR rlgr2 = RLGR(&inputList_u, &resList_u); rlgr2.decode(); //回复成负数 PCS_RLGR::restoreNum(resList_u, resList); #ifdef ZJW_DEBUG cout << "start inverse quantization and igft ....." << endl; #endif // ZJW_DEBUG //解压数据,吸纳打包成规定gft signal 的形式,然后gft解析成 原始mv信号 VectorXcd gftDecodeSignal[3]; //x 2表示实部和虚部,3表示三种信号 gftDecodeSignal[0].resize(resList.size() / 2 / 3); //y gftDecodeSignal[1].resize(resList.size() / 2 / 3); //z gftDecodeSignal[2].resize(resList.size() / 2 / 3); for (int i = 0; i < gftDecodeSignal[0].size(); i++) { gftDecodeSignal[0](i) = complex<double>(resList[(i * 3 + 0) * 2] * stepSize, resList[(i * 3 + 0) * 2 + 1] * stepSize); gftDecodeSignal[1](i) = complex<double>(resList[(i * 3 + 1) * 2] * stepSize, resList[(i * 3 + 1) * 2 + 1] * stepSize); gftDecodeSignal[2](i) = complex<double>(resList[(i * 3 + 2) * 2] * stepSize, resList[(i * 3 + 2) * 2 + 1] * stepSize); } //存放,igft出来的三种信号结果 VectorXcd mvDecodeSignal[3]; MatrixXd lapMat(*spLaplacian); GFT g = GFT(lapMat); //x,y,z三种信号 for (int i = 0; i < 3; i++) { g.igft(gftDecodeSignal[i], mvDecodeSignal[i]); } //合并三种xyz信号,f_Result的result可能已经从系数变成复数的形式了 VectorXcd mvDecodeResult; mvDecodeResult.resize(mvDecodeSignal[0].rows() * 3); for (int i = 0; i < mvDecodeSignal[0].rows(); i++) { mvDecodeResult(3 * i + 0) = mvDecodeSignal[0](i); mvDecodeResult(3 * i + 1) = mvDecodeSignal[1](i); mvDecodeResult(3 * i + 2) = mvDecodeSignal[2](i); } #ifdef ZJW_DEBUG cout << "end RLGR motion vector compress !!" << endl; cout << "=========================================" << endl; #endif // ZJW_DEBUG return mvDecodeResult; } VectorXcd PCS_RLGR::testPCS_RLGR() { inputList.clear(); separateMotionVector(); #ifdef ZJW_DEBUG cout << "=========================================" << endl; cout << "start RLGR motion vector compress ...." << endl; cout << "start gft (include the compute eigen vector )..." << endl; #endif // ZJW_DEBUG //mv信号的x,y,z三种信号,分别通过gft处理成gft信号,然后合并 MatrixXd lapMat = MatrixXd(*(spLaplacian)); GFT g = GFT(lapMat); //---三种信号的结果 //VectorXcd signalGFTTotal; VectorXcd signalGFTTemp[3]; for (int signal_type = 0; signal_type < 3; signal_type++) { VectorXcd signal(mvSignalXYZ[signal_type]); g.gft(signal, signalGFTTemp[signal_type]); } //round stepsize的处理 signalGFT中的内容,转化到numsList中。 for (int i = 0; i < mvSignal->rows() / 3; i++) { /*signalGFTTotal(i * 3 + 0) = signalGFTTemp[0](i); signalGFTTotal(i * 3 + 1) = signalGFTTemp[1](i); signalGFTTotal(i * 3 + 2) = signalGFTTemp[2](i);*/ //实部和虚部都进行压缩 // 3 * 0 inputList.push_back((int)(signalGFTTemp[0](i).real() / stepSize + 0.5)); inputList.push_back((int)(signalGFTTemp[0](i).imag() / stepSize + 0.5)); // 3 * 1 inputList.push_back((int)(signalGFTTemp[1](i).real() / stepSize + 0.5)); inputList.push_back((int)(signalGFTTemp[1](i).imag() / stepSize + 0.5)); // 3 * 2 inputList.push_back((int)(signalGFTTemp[2](i).real() / stepSize + 0.5)); inputList.push_back((int)(signalGFTTemp[2](i).imag() / stepSize + 0.5)); } //处理负数 PCS_RLGR::positiveNum(inputList, inputList_u); #ifdef ZJW_DEBUG cout << "start encode signal of gft and decode get the signal ....." << endl; #endif // ZJW_DEBUG //然后gft信号经过 rlgb处理成 压缩内容。存储在文件中 //rlgr encode and compress to the file RLGR rlgr = RLGR(&inputList_u, &resList_u); rlgr.encode(); #ifdef ZJW_DEBUG cout << "end RLGR motion vector compress !!" << endl; cout << "=========================================" << endl; #endif // ZJW_DEBUG resList.clear(); #ifdef ZJW_DEBUG cout << "=========================================" << endl; cout << "start RLGR motion vector decompress ...." << endl; cout << "start RLGR decoding ....." << endl; #endif // ZJW_DEBUG //解压数据,恢复成gft信号。解压之后数据再resList中了 RLGR rlgr2 = RLGR(&inputList_u, &resList_u); rlgr2.decode(); //回复成负数 PCS_RLGR::restoreNum(resList_u, resList); #ifdef ZJW_DEBUG cout << "start inverse quantization and igft ....." << endl; #endif // ZJW_DEBUG //解压数据,吸纳打包成规定gft signal 的形式,然后gft解析成 原始mv信号 VectorXcd gftDecodeSignal[3]; //x 2表示实部和虚部,3表示三种信号 gftDecodeSignal[0].resize(resList.size() / 2 / 3); //y gftDecodeSignal[1].resize(resList.size() / 2 / 3); //z gftDecodeSignal[2].resize(resList.size() / 2 / 3); for (int i = 0; i < gftDecodeSignal[0].size(); i++) { gftDecodeSignal[0](i) = complex<double>(resList[(i * 3 + 0) * 2] * stepSize, resList[(i * 3 + 0) * 2 + 1] * stepSize); gftDecodeSignal[1](i) = complex<double>(resList[(i * 3 + 1) * 2] * stepSize, resList[(i * 3 + 1) * 2 + 1] * stepSize); gftDecodeSignal[2](i) = complex<double>(resList[(i * 3 + 2) * 2] * stepSize, resList[(i * 3 + 2) * 2 + 1] * stepSize); } //存放,igft出来的三种信号结果 VectorXcd mvDecodeSignal[3]; //x,y,z三种信号 for (int i = 0; i < 3; i++) { g.igft(gftDecodeSignal[i], mvDecodeSignal[i]); } //合并三种xyz信号,f_Result的result可能已经从系数变成复数的形式了 VectorXcd mvDecodeResult; mvDecodeResult.resize(mvDecodeSignal[0].rows() * 3); for (int i = 0; i < mvDecodeSignal[0].rows(); i++) { mvDecodeResult(3 * i + 0) = mvDecodeSignal[0](i); mvDecodeResult(3 * i + 1) = mvDecodeSignal[1](i); mvDecodeResult(3 * i + 2) = mvDecodeSignal[2](i); } #ifdef ZJW_DEBUG cout << "end RLGR motion vector compress !!" << endl; cout << "=========================================" << endl; #endif // ZJW_DEBUG return mvDecodeResult; } void PCS_RLGR::positiveNum(vector<int>& sourceDataNegativeList) { //RLGR中的论文中有提到,如何处理对有负数的数据。 for (int i = 0; i < sourceDataNegativeList.size(); i++) { if (sourceDataNegativeList[i] >= 0) { sourceDataNegativeList[i] *= 2; } else { sourceDataNegativeList[i] *= (-2); sourceDataNegativeList[i] -= -1; } } } void PCS_RLGR::restoreNum(vector<int>& resDecodeData) { //RLGR中的论文中有提到,如何处理对有负数的数据。 for (int i = 0; i < resDecodeData.size(); i++) { if (resDecodeData[i] % 2 == 0) { resDecodeData[i] /= 2; } else { resDecodeData[i] += 1; resDecodeData[i] /= -2; } } } void PCS_RLGR::positiveNum(vector<int>& sourceDataNegativeList, vector<uint64_t>& codeData_out) { //RLGR中的论文中有提到,如何处理对有负数的数据。 codeData_out.clear(); for (int i = 0; i < sourceDataNegativeList.size(); i++) { if (sourceDataNegativeList[i] >= 0) { codeData_out.push_back(sourceDataNegativeList[i] * 2); } else { codeData_out.push_back(sourceDataNegativeList[i] * (-2) - 1); } } } void PCS_RLGR::restoreNum(vector<uint64_t>& sourceDecodeData, vector<int>& resDecodeData_out) { resDecodeData_out.clear(); //RLGR中的论文中有提到,如何处理对有负数的数据。 for (int i = 0; i < sourceDecodeData.size(); i++) { if (sourceDecodeData[i] % 2 == 0) { resDecodeData_out.push_back(sourceDecodeData[i] / 2); } else { resDecodeData_out.push_back((sourceDecodeData[i] + 1) / -2); } } } bool PCS_RLGR::separateMotionVector() { //x mvSignalXYZ[0].resize(mvSignal->rows() / 3); //y mvSignalXYZ[1].resize(mvSignal->rows() / 3); //z mvSignalXYZ[2].resize(mvSignal->rows() / 3); for (int i = 0; i < mvSignal->rows() / 3; i++) { mvSignalXYZ[0](i) = (*mvSignal)(3 * i); mvSignalXYZ[1](i) = (*mvSignal)(3 * i + 1); mvSignalXYZ[2](i) = (*mvSignal)(3 * i + 2); } return true; }
[ "zjwking258@163.com" ]
zjwking258@163.com
b4fe18fc188d6e444a20c322aaa8fdf83ac45e42
41551ed6dbb8bd8c893c20ff3f0d7dca7f2437b8
/main.cpp
7993a74bc14717524096d25ce2e27a62a343767d
[]
no_license
Sindeguru/GeometricShapes
cbeacc9c00b5e04f75b9c21e6506fa6b416d4b8a
0116b8083ec7b5eee9343877fb4f6c8a6088c6bd
refs/heads/master
2022-08-18T16:40:04.795017
2020-05-22T20:52:15
2020-05-22T20:52:15
266,200,275
0
0
null
null
null
null
UTF-8
C++
false
false
1,617
cpp
#include "Point.h" #include "Line.h" #include "Triangle.h" #include "Circle.h" #include "Quadrilateral.h" #include "Sphere.h" #include "Ellipse.h" #include "Container.h" #define Add(x) Add(x, #x) #define SetA(t) SetA()[t] #define SetB(t) SetB()[t] #define SetC(t) SetC()[t] #define SetD(t) SetD()[t] using namespace std; int main() { Point<int> Dot(2); Dot.SetA(0) = 1; Dot.SetA(1) = 2; cout << Dot << endl; Point<int> Dot2(Dot); Line<int> Vec(2); Vec.SetA(0) = 0; Vec.SetA(1) = 0; Vec.SetB(0) = 3; Vec.SetB(1) = -4; cout << Vec << endl; Line<int> Vec2(Vec); Circle<int> Cc(2); Cc.SetA(0) = 0; Cc.SetA(1) = 0; Cc.SetB(0) = 3; Cc.SetB(1) = -4; cout << Cc << endl; Triangle<int> Tri(2); Tri.SetA(0) = 0; Tri.SetA(1) = 0; Tri.SetB(0) = 0; Tri.SetB(1) = 2; Tri.SetC(0) = 3; Tri.SetC(1) = 0; cout << Tri << endl; Quadrilateral<int> Sq(2); Sq.SetA(0) = 0; Sq.SetA(1) = 0; Sq.SetB(0) = 0; Sq.SetB(1) = 2; Sq.SetC(0) = 2; Sq.SetC(1) = 2; Sq.SetD(0) = 2; Sq.SetD(1) = 0; cout << Sq << endl; Quadrilateral<int> Sk(Sq); Container Box; Box.Add(Dot); Box.Add(Sq); Box.Add(Tri); Box.ShowAll(); cout << endl; Box.Show(0); Box.Remove(1); Box.ShowAll(); cout << endl; Sphere<int> Sph(3); Sph.SetA(0) = 0; Sph.SetA(1) = 0; Sph.SetA(2) = 0; Sph.SetB(0) = 5; Sph.SetB(1) = 5; Sph.SetB(2) = 0; cout << Sph << endl; Ellipse<int> El(2); El.SetA(0) = 5; El.SetA(1) = 5; El.SetB(0) = 2; El.SetB(1) = 2; El.SetC(0) = 0; El.SetC(1) = 0; cout << El << endl; return 0; }
[ "noreply@github.com" ]
Sindeguru.noreply@github.com
49c4c2fefa23371d2f93d7131d87c5c296eb698e
cf8ddfc720bf6451c4ef4fa01684327431db1919
/SDK/ARKSurvivalEvolved_DinoAttackStateMelee_parameters.hpp
4893fb174e6231f8610106b14dc8a6b5bb109f96
[ "MIT" ]
permissive
git-Charlie/ARK-SDK
75337684b11e7b9f668da1f15e8054052a3b600f
c38ca9925309516b2093ad8c3a70ed9489e1d573
refs/heads/master
2023-06-20T06:30:33.550123
2021-07-11T13:41:45
2021-07-11T13:41:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
722
hpp
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DinoAttackStateMelee_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function DinoAttackStateMelee.DinoAttackStateMelee_C.ExecuteUbergraph_DinoAttackStateMelee struct UDinoAttackStateMelee_C_ExecuteUbergraph_DinoAttackStateMelee_Params { int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "sergey.2bite@gmail.com" ]
sergey.2bite@gmail.com
b3742443f7e5b36f79b82ee0566da232ca9d472b
7cad3ff6a8689849db4ee8de9599e2e171a20aa1
/cprog09lab22c.cpp
8ef2e5cbca26bc2313a90c55d08a52dcf7f5cf27
[]
no_license
wnr/cprog13-lab2
9eb918ca9081ca04afb00259f266f0d28a6d159f
7dbba5cae55e40e40e344f62f41b376be3f7f942
refs/heads/master
2023-06-25T17:35:12.459225
2013-11-06T14:58:35
2013-11-06T14:58:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,706
cpp
/* * Driver for cprog06lab22c. Written 2006-10-03 by Gunnar Kreitz <gkreitz> * * If you need to modify this file to solve the assignment, you're most likely * solving it the wrong way. */ #include "julian.h" #include "gregorian.h" #include "kattistime.h" #include "gregorian.h" #include "julian.h" #include <vector> #include <string> #include <cstdio> #include <iostream> #include <cassert> #include <stdexcept> using std::size_t; using std::cout; using std::endl; using lab2::Julian; using lab2::Gregorian; using lab2::Date; static int linenr = 0; // Anonymous namespace for local variables and functions namespace { std::vector<Date *> dates; /* * There is no way in standard C++ to read a size_t. The way we do it is * scanf("%zu", &ret) which is legal in C99 and thus most likely will be OK in * C++0x. It's already supported by most compilers. */ size_t read_idx_or_die() { size_t ret; if(scanf("%zu", &ret) != 1) { assert(!"Tried to read idx but failed"); } assert(ret < dates.size()); return ret; } int read_int_or_die() { int ret; if(scanf("%d", &ret) != 1) { assert(!"Tried to read int but failed"); } return ret; } template<class D> void new_date() { int y, m, d; try { if(scanf("%d%d%d", &y, &m, &d) == 3) { dates.push_back(new D(y,m,d)); } else { dates.push_back(new D()); } cout << "L" << linenr << ";" << *dates[dates.size()-1] << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ";" <<"exception_in_constructor" << endl; } } template<class D> void new_date_copy() { const size_t idx = read_idx_or_die(); try { dates.push_back(new D(*const_cast<const Date*>(dates[idx]))); cout << "L" << linenr << ";" << *dates[dates.size()-1] << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ";" <<"exception_in_copy_constructor" << endl; } } } int main(int argc, char **argv) { char buf[101]; while(scanf("%100s", buf) == 1) { linenr++; std::string command(buf); if(command == "julian") { new_date<Julian>(); } else if(command == "juliancopy") { new_date_copy<Julian>(); } else if(command == "gregorian") { new_date<Gregorian>(); } else if(command == "gregoriancopy") { new_date_copy<Gregorian>(); } else if(command == "copy") { const size_t from = read_idx_or_die(); const size_t to = read_idx_or_die(); try { (*dates[to]) = *const_cast<const Date*>(dates[from]); cout << "L" << linenr << ":D" << from << ",D" << to << ";" << "copy" << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ";" <<"exception_when_copying" << endl; } } else if(command == "delete") { const size_t idx = read_idx_or_die(); delete dates[idx]; dates[idx] = 0; } else if(command == "print") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" << *const_cast<const Date*>(dates[idx]) << endl; } else if(command == "year") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->year() << endl; } else if(command == "month") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->month() << endl; } else if(command == "day") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->day() << endl; } else if(command == "week_day") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->week_day() << endl; } else if(command == "days_per_week") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->days_per_week() << endl; } else if(command == "days_this_month") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->days_this_month() << endl; } else if(command == "months_per_year") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->months_per_year() << endl; } else if(command == "week_day_name") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->week_day_name() << endl; } else if(command == "month_name") { const size_t idx = read_idx_or_die(); cout << "L" << linenr << ":D" << idx << ";" <<const_cast<const Date*>(dates[idx])->month_name() << endl; } else if(command == "d++") { const size_t idx = read_idx_or_die(); try { ++(*dates[idx]); cout << "L" << linenr<< ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_++" << endl; } } else if(command == "d--") { const size_t idx = read_idx_or_die(); try { --(*dates[idx]); cout << "L" << linenr<< ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_--" << endl; } } else if(command == "d+=") { const size_t idx = read_idx_or_die(); const int val = read_int_or_die(); try { (*dates[idx]) += val; cout << "L" << linenr << ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_+=" << endl; } } else if(command == "d-=") { const size_t idx = read_idx_or_die(); const int val = read_int_or_die(); try { (*dates[idx]) -= val; cout << "L" << linenr << ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_-=" << endl; } } else if(command == "chained") { const size_t idx = read_idx_or_die(); try { /* * Subtracts two days. The reason for doing it this very odd way * is to test that prefix and postfix increment/decrement seem to * work properly when chained. * * I know it's ugly, but adding parenthesis or spaces doesn't really * help all that much. Sorry. */ ----------++++++++--++--++--++(*dates[idx]); cout << "L" << linenr<< ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_++--++" << endl; } } else if(command == "add_year") { const size_t idx = read_idx_or_die(); int val; try { if(scanf("%d", &val) == 1) { dates[idx]->add_year(val); } else { dates[idx]->add_year(); } cout << "L" << linenr << ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_add_year" << endl; } } else if(command == "add_month") { const size_t idx = read_idx_or_die(); int val; try { if(scanf("%d", &val) == 1) { dates[idx]->add_month(val); } else { dates[idx]->add_month(); } cout << "L" << linenr << ":D" << idx << ";" << (*dates[idx]) << endl; } catch (std::out_of_range oor) { cout << "L" << linenr << ":D" << idx << ";" <<"exception_in_add_month" << val << *dates[idx] << endl; } } else if(command == "d==") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) == (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "d!=") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) != (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "d<") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) < (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "d<=") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) <= (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "d>") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) > (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "d>=") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) >= (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "d-") { const size_t lhs = read_idx_or_die(); const size_t rhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ",D" << rhs << ";" <<((*const_cast<const Date*>(dates[lhs])) - (*const_cast<const Date*>(dates[rhs]))) << endl; } else if(command == "mod_julian_day") { const size_t lhs = read_idx_or_die(); cout << "L" << linenr << ":D" << lhs << ";" <<const_cast<const Date*>(dates[lhs])->mod_julian_day() << endl; } else if(command == "set_k_time") { time_t time = 0; /* No standardized way to read time_t with scanf */ if(!(std::cin >> time)) assert(!"Can't read time"); set_k_time(time); } else { assert(!"Unknown command"); } } return 0; }
[ "lucas@wiener.se" ]
lucas@wiener.se
c0b973c54697463f4fbfb99932084888c8bde25c
83b760ac2f72d08f46c424917ebbf4424f7531be
/src/ExpTest.h
e0de409ba7e0603d077092a2fe01f3cd1a491185
[]
no_license
elyawy/stepping_stone1
96582517883d458a7136d57db832f650abd5fe73
8ac70c372105f4f583e5ded5c0fc2082fabadbc2
refs/heads/master
2020-04-11T04:33:01.479821
2018-12-29T21:38:21
2018-12-29T21:38:21
161,515,934
0
0
null
null
null
null
UTF-8
C++
false
false
376
h
// // Created by ziv_t on 12/16/18. // #ifndef STEPPING_STONE1_EXPTEST_H #define STEPPING_STONE1_EXPTEST_H #include "test.h" #include "Expression.h" #include "Number.h" #include "BinaryExpression.h" #include "Plus.h" #include "Minus.h" #include "Mul.h" #include "Div.h" class ExpTest : public test { public: void run() override; }; #endif //STEPPING_STONE1_EXPTEST_H
[ "ziv.tzur@live.biu.ac.il" ]
ziv.tzur@live.biu.ac.il
3629132ed27318e7cde173bca215b20be25afb9b
7f1f2d028a0faa297617a4e2070714891df11688
/practice/1104ex/mytime3.cpp
3c92458da1987bcf02e38d78a6c0b2dd7ac4b172
[]
no_license
mallius/CppPrimerPlus
3487058a82d74ef0dd0c51b19c9f082b89c0c3f3
2a1ca08b4cdda542bb5cda35c8c5cfd903f969eb
refs/heads/master
2021-01-01T04:12:16.783696
2018-03-08T13:49:17
2018-03-08T13:49:17
58,808,717
0
0
null
null
null
null
UTF-8
C++
false
false
1,162
cpp
#include <iostream> #include "mytime3.h" Time::Time() { hours = minutes = 0; } Time::Time(int h, int m) { hours = h; minutes = m; } void Time::AddMin(int m) { minutes+=m; hours+=minutes / 60; minutes %=60; } void Time::AddHr(int h) { hours+=h; } void Time::Reset(int h, int m) { hours = h; minutes = m; } Time operator+(const Time & t1, const Time & t2) { Time sum; sum.minutes = t1.minutes + t2.minutes; sum.hours = t1.hours + t2.hours + sum.minutes / 60; sum.minutes %= 60; return sum; } Time operator-(const Time & t1, const Time & t2) { Time diff; int tot1, tot2; tot1 = t1.minutes + 60 * t1.hours; tot2 = t2.minutes + 60 * t2.hours; diff.minutes = (tot2 - tot1) % 60; diff.hours = (tot2 - tot1) / 60; return diff; } Time operator*(double mult, const Time & t) { Time result; long totalminutes = t.hours * mult * 60 + t.minutes * mult; result.hours = totalminutes / 60; result.minutes = totalminutes % 60; return result; } Time operator*(const Time & t, double mult) { return (mult * t); } std::ostream & operator<<(std::ostream & os, const Time & t) { os << t.hours << " hrs, " << t.minutes << " mins"; return os; }
[ "mallius@qq.com" ]
mallius@qq.com
79c593e08994157b33dd24c743d7a3652b3dfa30
aa646aeef6ffcb0356c91dc97a1cca8b029d94ef
/src/iksdl/Renderer.cpp
ce955d4bcc6bd15db19b0f8269338eda4c626d55
[ "Zlib" ]
permissive
InternationalKoder/iksdl
3562ff4322c7da0c85f30a2efd4198dc50c95cde
066a60b405bab5310a500132b0bd4d82c6476f24
refs/heads/main
2023-05-13T16:27:29.203552
2021-05-29T21:20:23
2021-05-29T21:20:23
349,504,332
0
0
NOASSERTION
2021-05-29T21:20:24
2021-03-19T17:30:37
C++
UTF-8
C++
false
false
2,310
cpp
/* * IKSDL - C++ wrapper for SDL * Copyright (C) 2021 InternationalKoder * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * */ #include "iksdl/Renderer.hpp" #include "iksdl/SdlException.hpp" #include <SDL.h> #include <string> namespace iksdl { Renderer::Renderer(SDL_Window& window, const RendererOptions& options) : m_renderer(nullptr) { m_renderer = SDL_CreateRenderer(&window, -1, options.m_sdlFlags); if(m_renderer == nullptr) throw SdlException(std::string(CREATE_RENDERER_ERROR) + SDL_GetError()); } Renderer::Renderer(Renderer&& other) : m_renderer(std::exchange(other.m_renderer, nullptr)), m_viewport(std::move(other.m_viewport)) {} Renderer::~Renderer() { SDL_DestroyRenderer(m_renderer); } Renderer& Renderer::operator=(Renderer&& other) { if(this == &other) return *this; SDL_DestroyRenderer(m_renderer); m_renderer = std::exchange(other.m_renderer, nullptr); m_viewport = std::move(other.m_viewport); return *this; } void Renderer::clear(const Color& clearColor) const { SDL_SetRenderDrawColor(m_renderer, clearColor.getRed(), clearColor.getGreen(), clearColor.getBlue(), clearColor.getAlpha()); SDL_RenderClear(m_renderer); } void Renderer::setViewport(const Recti& viewport) { m_viewport = { .x = viewport.getX(), .y = viewport.getY(), .w = viewport.getWidth(), .h = viewport.getHeight() }; SDL_RenderSetViewport(m_renderer, &m_viewport); } }
[ "international_koder@yahoo.com" ]
international_koder@yahoo.com
0735e7072e6e2e32dbda8f1e39f0ecbeac626286
efd67fa3fdac58fd2bf6be94cd52d720f0cd2f25
/src/parser/Parser.cpp
b2e64ce3920be29f335ebeb0174aacb929ceb186
[]
no_license
pik694/TKOM-rasph
22cd129776e836c2217e9eb9f88ba95b8b51e619
a983cc2a77e8056bc20e4bb58d23cacc72295802
refs/heads/master
2020-03-09T03:00:56.247171
2018-06-05T21:51:47
2018-06-05T21:51:47
128,554,959
0
0
null
null
null
null
UTF-8
C++
false
false
17,150
cpp
// // Created by Piotr Żelazko on 06.05.2018. // #include <common/ast/nodes.hpp> #include "NodesFactory.hpp" #include "TokenTypesAcceptor.hpp" using namespace rasph::common::ast; using namespace rasph::common::tokens; using namespace rasph::parser; template<TokenType ... types> using Acceptor = TokenTypesAcceptor<false, types ...>; template<TokenType ... types> using AcceptorErr = TokenTypesAcceptor<true, types ...>; /// Declatations of specializations template<> node_ptr_t Parser::tryParse<nodes::BlockNode>(); template<> node_ptr_t Parser::tryParse<nodes::ForStatementNode>(); template<> node_ptr_t Parser::tryParse<nodes::AssignableNode>(); template<> node_ptr_t Parser::tryParse<nodes::AssignStatementNode>(); template<> node_ptr_t Parser::tryParse<nodes::IfStatementNode>(); template<> node_ptr_t Parser::tryParse<nodes::ConditionNode>(); template<> node_ptr_t Parser::tryParse<nodes::ExpressionNode>(); template<> node_ptr_t Parser::tryParse<nodes::LiteralNode>(); template<> node_ptr_t Parser::tryParse<nodes::VariableAssignableNode>(); template<> node_ptr_t Parser::tryParse<nodes::PeriodicStatement>(); /// PARSING METHODS template<typename ... Args> rasph::parser::node_ptr_t rasph::parser::Parser::tryParse() { return NodesFactory<Args...>(*this)(); } template<> rasph::parser::node_ptr_t rasph::parser::Parser::tryParse<>() { return nullptr; } template<> node_ptr_t Parser::tryParse<nodes::ClassMemberCall>() { auto ident = Acceptor<TokenType::IDENTIFIER>(*this)(); if (!ident) return nullptr; if (!Acceptor<TokenType::DOT>(*this)()) { tokensBuffer_.push_front(ident); return nullptr; } auto memberName = AcceptorErr<TokenType::IDENTIFIER>(*this)(); if (Acceptor<TokenType::PARENTHESIS_LEFT>(*this)()) { auto methodCall = new nodes::MethodCall(ident->getTextValue(), memberName->getTextValue()); node_ptr_t node = tryParse < nodes::AssignableNode > (); if (node) { auto param = cast<nodes::AssignableNode>(std::move(node)); methodCall->addParameter(std::move(param)); while (Acceptor<TokenType::COMMA>(*this)()) { param = cast<nodes::AssignableNode>(tryParse < nodes::AssignableNode > ()); methodCall->addParameter(std::move(param)); } } AcceptorErr<TokenType::PARENTHESIS_RIGHT>(*this)(); return node_ptr_t(methodCall); } return node_ptr_t(new nodes::ClassMemberCall(ident->getTextValue(), memberName->getTextValue())); } template<> node_ptr_t Parser::tryParse<nodes::PrimaryExpressionNode>() { std::unique_ptr<nodes::AssignableNode> node; node_ptr_t tmp_node; if (Acceptor<TokenType::PARENTHESIS_LEFT>(*this)()) { node = cast<nodes::AssignableNode>(tryParse < nodes::ExpressionNode > ()); AcceptorErr<TokenType::PARENTHESIS_RIGHT>(*this)(); } else { tmp_node = tryParse < nodes::ClassMemberCall, nodes::LiteralNode, nodes::VariableAssignableNode > (); if (tmp_node) node = cast<nodes::AssignableNode>(std::move(tmp_node)); } return node ? node_ptr_t(new nodes::PrimaryExpressionNode(std::move(node))) : nullptr; } template<> node_ptr_t Parser::tryParse<nodes::MultiplicativeExpressionNode>() { auto node = tryParse < nodes::PrimaryExpressionNode > (); if (!node) return nullptr; auto expression = new nodes::MultiplicativeExpressionNode(cast<nodes::PrimaryExpressionNode>(std::move(node))); auto acceptor = Acceptor<TokenType::DIVIDE, TokenType::MULTIPLY>(*this); std::shared_ptr<Token> token; while ((token = acceptor())) { expression->addExpression(token->getType(), cast<nodes::PrimaryExpressionNode>(tryParse < nodes::PrimaryExpressionNode > ())); } return node_ptr_t(expression); } template<> node_ptr_t Parser::tryParse<nodes::ExpressionNode>() { auto node = tryParse < nodes::MultiplicativeExpressionNode > (); if (!node) return nullptr; auto expression = new nodes::ExpressionNode(cast<nodes::MultiplicativeExpressionNode>(std::move(node))); auto acceptor = Acceptor<TokenType::PLUS, TokenType::MINUS>(*this); std::shared_ptr<Token> token; while ((token = acceptor())) { expression->addExpression(token->getType(), cast<nodes::MultiplicativeExpressionNode>( tryParse < nodes::MultiplicativeExpressionNode > ())); } return node_ptr_t(expression); } template<> node_ptr_t Parser::tryParse<nodes::LiteralNode>() { auto token = Acceptor<TokenType::TEXT_LITERAL, TokenType::NUM_LITERAL, TokenType::FALSE, TokenType::TRUE>(*this)(); if (!token) return nullptr; return node_ptr_t(new nodes::LiteralNode(*token)); } template<> node_ptr_t Parser::tryParse<nodes::StatementNode>() { return tryParse < nodes::ClassMemberCall, nodes::BlockNode, nodes::ForStatementNode, nodes::IfStatementNode, nodes::AssignStatementNode, nodes::PeriodicStatement> (); } template<> node_ptr_t Parser::tryParse<nodes::BlockNode>() { auto tmpToken = Acceptor<TokenType::CBRACKET_LEFT>(*this)(); if (!tmpToken) return nullptr; auto block = new nodes::BlockNode(); node_ptr_t node; while ((node = tryParse < nodes::StatementNode > ())) { auto statement = cast<nodes::StatementNode>(std::move(node)); block->addStatement(std::move(statement)); } AcceptorErr<TokenType::CBRACKET_RIGHT>(*this)(); return node_ptr_t(block); } template<> node_ptr_t Parser::tryParse<nodes::ForStatementNode>() { auto tmpToken = Acceptor<TokenType::FOR>(*this)(); if (!tmpToken) return nullptr; tmpToken = AcceptorErr<TokenType::IDENTIFIER>(*this)(); std::string iterator = tmpToken->getTextValue(); AcceptorErr<TokenType::IN>(*this)(); auto assignable = cast<nodes::AssignableNode>(tryParse < nodes::AssignableNode > ()); auto block = cast<nodes::BlockNode>(std::move(tryParse < nodes::BlockNode > ())); return node_ptr_t(new nodes::ForStatementNode(iterator, std::move(assignable), std::move(block))); } template<> node_ptr_t Parser::tryParse<nodes::AssignStatementNode>() { auto token = Acceptor<TokenType::IDENTIFIER>(*this)(); if (!token) return nullptr; const std::string ident = token->getTextValue(); AcceptorErr<TokenType::ASSIGN>(*this)(); auto node = cast<nodes::AssignableNode>(tryParse < nodes::AssignableNode > ()); return node_ptr_t(new nodes::AssignStatementNode(ident, std::move(node))); } template<> node_ptr_t Parser::tryParse<nodes::PrimaryConditionNode>() { bool inverted = false; auto unary = Acceptor<TokenType::NOT>(*this)(); if (unary) inverted = true; std::unique_ptr<nodes::AssignableNode> node; if (Acceptor<TokenType::PARENTHESIS_LEFT>(*this)()) { node = cast<nodes::AssignableNode>(tryParse < nodes::ConditionNode > ()); AcceptorErr<TokenType::PARENTHESIS_RIGHT>(*this)(); } else { node = cast<nodes::AssignableNode>(tryParse < nodes::AssignableNode > ()); } return node_ptr_t(new nodes::PrimaryConditionNode(inverted, std::move(node))); } template<> node_ptr_t Parser::tryParse<nodes::RelationalConditionNode>() { auto node = tryParse < nodes::PrimaryConditionNode > (); if (!node) return nullptr; auto condition = new nodes::RelationalConditionNode(cast<nodes::PrimaryConditionNode>(std::move(node))); auto token = Acceptor<TokenType::GEQUAL, TokenType::LEQUAL, TokenType::LESS, TokenType::GREATER>(*this)(); if (token) { condition->addCondition(token->getType(), cast<nodes::PrimaryConditionNode>(tryParse < nodes::PrimaryConditionNode > ())); } return node_ptr_t(condition); } template<> node_ptr_t Parser::tryParse<nodes::EqualityConditionNode>() { auto node = tryParse < nodes::RelationalConditionNode > (); if (!node) return nullptr; auto condition = new nodes::EqualityConditionNode(cast<nodes::RelationalConditionNode>(std::move(node))); auto token = Acceptor<TokenType::EQUAL, TokenType::NEQUAL>(*this)(); if (token) { condition->addCondition(token->getType(), cast<nodes::RelationalConditionNode>(tryParse < nodes::RelationalConditionNode > ())); } return node_ptr_t(condition); } template<> node_ptr_t Parser::tryParse<nodes::AndConditionNode>() { auto node = tryParse < nodes::EqualityConditionNode > (); if (!node) return nullptr; auto condition = new nodes::AndConditionNode(cast<nodes::EqualityConditionNode>(std::move(node))); auto acceptor = Acceptor<TokenType::AND>(*this); while (acceptor()) { condition->addCondition(cast<nodes::EqualityConditionNode>(tryParse < nodes::EqualityConditionNode > ())); } return node_ptr_t(condition); } template<> node_ptr_t Parser::tryParse<nodes::ConditionNode>() { auto node = tryParse < nodes::AndConditionNode > (); if (!node) return nullptr; auto condition = new nodes::ConditionNode(cast<nodes::AndConditionNode>(std::move(node))); auto acceptor = Acceptor<TokenType::OR>(*this); while (acceptor()) { condition->addCondition(cast<nodes::AndConditionNode>(tryParse < nodes::AndConditionNode > ())); } return node_ptr_t(condition); } template<> node_ptr_t Parser::tryParse<nodes::IfStatementNode>() { if (!Acceptor<TokenType::IF>(*this)()) return nullptr; auto condition = cast<nodes::ConditionNode>(tryParse < nodes::ConditionNode > ()); auto ifBlock = cast<nodes::BlockNode>(tryParse < nodes::BlockNode > ()); if (!Acceptor<TokenType::ELSE>(*this)()) return node_ptr_t(new nodes::IfStatementNode(std::move(ifBlock), std::move(condition))); auto elseBlock = cast<nodes::BlockNode>(tryParse < nodes::BlockNode > ()); return node_ptr_t(new nodes::IfStatementNode(std::move(ifBlock), std::move(condition), std::move(elseBlock))); } template<> node_ptr_t Parser::tryParse<nodes::ClassNode>() { // class auto tmpToken = peekToken(); if (tmpToken->getType() != TokenType::CLASS) { unpeekTokens(); return nullptr; } // identifier tmpToken = peekToken(); if (tmpToken->getType() != TokenType::IDENTIFIER) { throw std::invalid_argument("Could not find class identifier"); } auto classNode = new nodes::ClassNode(tmpToken->getTextValue()); // { tmpToken = peekToken(); if (tmpToken->getType() != TokenType::CBRACKET_LEFT) { throw std::invalid_argument("Could not find \"{\" "); } // members node_ptr_t node; while ((node = tryParse < nodes::EventMemberNode, nodes::AttributeMemberNode, nodes::MethodMemberNode > ())) { auto member = std::unique_ptr<nodes::ClassMemberNode>(dynamic_cast<nodes::ClassMemberNode *>(node.get())); if (!member) throw std::bad_cast(); node.release(); classNode->addNode(std::move(member)); } tmpToken = peekToken(); if (tmpToken->getType() != TokenType::CBRACKET_RIGHT) { throw std::invalid_argument("Could not find \"}\" "); } popTokens(4); return std::unique_ptr<ProgramNode>(classNode); } template<> node_ptr_t Parser::tryParse<nodes::EventMemberNode>() { auto tmpToken = peekToken(); if (tmpToken->getType() != TokenType::EVENT) { unpeekTokens(); return nullptr; } tmpToken = peekToken(); if (tmpToken->getType() != TokenType::IDENTIFIER) throw std::invalid_argument("Could not find event's identifier"); popTokens(2); return std::unique_ptr<ProgramNode>(new nodes::EventMemberNode(tmpToken->getTextValue())); } template<> node_ptr_t Parser::tryParse<nodes::AttributeMemberNode>() { auto tmpToken = peekToken(); if (tmpToken->getType() != TokenType::VAR) { unpeekTokens(); return nullptr; } tmpToken = peekToken(); if (tmpToken->getType() != TokenType::IDENTIFIER) throw std::invalid_argument("Could not find variable's identifier"); popTokens(2); return std::unique_ptr<ProgramNode>(new nodes::AttributeMemberNode(tmpToken->getTextValue())); } template<> node_ptr_t Parser::tryParse<nodes::MethodMemberNode>() { auto tmpToken = peekToken(); if (tmpToken->getType() != TokenType::FUNC) { unpeekTokens(); return nullptr; } tmpToken = peekToken(); if (tmpToken->getType() != TokenType::IDENTIFIER) throw std::invalid_argument("Could not find functions's identifier"); auto method = new nodes::MethodMemberNode(tmpToken->getTextValue()); tmpToken = peekToken(); if (tmpToken->getType() != TokenType::PARENTHESIS_LEFT) throw std::invalid_argument("Could not find list of parameters"); tmpToken = peekToken(); if (tmpToken->getType() == TokenType::IDENTIFIER) { while (true) { method->addParameter(tmpToken->getTextValue()); popTokens(); tmpToken = peekToken(); if (tmpToken->getType() != TokenType::COMMA) { unpeekTokens(); break; } popTokens(); tmpToken = peekToken(); if (tmpToken->getType() != TokenType::IDENTIFIER) { throw std::invalid_argument("Expected identifier"); } } } else { unpeekTokens(); } tmpToken = peekToken(); if (tmpToken->getType() != TokenType::PARENTHESIS_RIGHT) throw std::invalid_argument("Could not find list of parameters"); tmpToken = peekToken(); if (tmpToken->getType() != TokenType::CBRACKET_LEFT) throw std::invalid_argument("Could not find method body"); // method body node_ptr_t node; while ((node = tryParse < nodes::StatementNode > ())) { auto statement = std::unique_ptr<nodes::StatementNode>(dynamic_cast<nodes::StatementNode *>(node.get())); if (!statement) throw std::bad_cast(); node.release(); method->addStatement(std::move(statement)); } tmpToken = peekToken(); if (tmpToken->getType() == TokenType::RETURN) { popTokens(); method->setReturnStatement(cast<nodes::AssignableNode>(tryParse < nodes::AssignableNode > ())); } else unpeekTokens(); tmpToken = peekToken(); if (tmpToken->getType() != TokenType::CBRACKET_RIGHT) throw std::invalid_argument("Could not find method body"); popTokens(6); return std::unique_ptr<ProgramNode>(method); } template<> node_ptr_t Parser::tryParse<nodes::VariableAssignableNode>() { //TODO : object member auto token = Acceptor<TokenType::IDENTIFIER>(*this)(); if (!token) return nullptr; return node_ptr_t(new nodes::VariableAssignableNode(token->getTextValue())); } template<> node_ptr_t Parser::tryParse<nodes::AssignableNode>() { return tryParse < nodes::ExpressionNode > (); } template<> node_ptr_t Parser::tryParse<nodes::PeriodicStatement>() { if (!Acceptor<TokenType::EVERY>(*this)()){ return nullptr; } auto time = AcceptorErr<TokenType::NUM_LITERAL>(*this)(); auto specifier = AcceptorErr<TokenType::SEC, TokenType::MIN, TokenType::MS>(*this)(); auto block = cast<nodes::BlockNode>(tryParse<nodes::BlockNode>()); if (!block) throw std::runtime_error("Invalid every statement"); return node_ptr_t(new nodes::PeriodicStatement(*time, *specifier, std::move(block))); } /// OTHER MEMBERS rasph::parser::Parser::Parser(std::unique_ptr<rasph::lexer::Lexer> lexer) : lexer_(std::move(lexer)) {} std::shared_ptr<rasph::common::ast::ProgramTree> rasph::parser::Parser::parse() { auto programTree = std::make_shared<ProgramTree>(); node_ptr_t node; while ((node = tryParse<nodes::ClassNode, nodes::StatementNode>())) programTree->add(std::move(node)); auto item = peekedTokens_.size(); auto size1 = tokensBuffer_.size(); auto token = tokensBuffer_.front(); if (!peekedTokens_.empty() || tokensBuffer_.front()->getType() != TokenType::END) throw std::runtime_error("Invalid buffers state"); return programTree; } void Parser::popTokens(size_t count) { for (int i = 0; i < count; ++i) { if (peekedTokens_.empty()) break; peekedTokens_.pop_front(); } } void Parser::unpeekTokens(size_t count) { for (int i = 0; i < count; ++i) { if (peekedTokens_.empty()) throw std::out_of_range("Peeked tokens buffer is empty"); tokensBuffer_.push_front(peekedTokens_.front()); peekedTokens_.pop_front(); }; } std::shared_ptr<rasph::common::tokens::Token> Parser::peekToken() { std::shared_ptr<rasph::common::tokens::Token> token; if (!tokensBuffer_.empty()) { token = tokensBuffer_.front(); tokensBuffer_.pop_front(); } else { token = std::move(lexer_->getNextToken()); } if (!token) { throw std::invalid_argument("There are no more tokens"); } peekedTokens_.push_front(token); return token; }
[ "piotr.zelazko@icloud.com" ]
piotr.zelazko@icloud.com
cc05420a258a33d21be60dafb1b6ebf9b6645828
9c9003f4912e2065c3901f1f51ef5b398f999a10
/projectb/client/game_xxx/newProtocol/game_fourcolorball_def.pb.cc
0806ae59f850b01543f9feaffcd6d61dd49ed1ac
[]
no_license
PHDaozhang/recharge_h5
41424d5725eae69cc6a921cd1ef954b255a0ca65
7d5e63d97e731ea860d927c37612fe35f7d3bd61
refs/heads/master
2020-08-11T21:57:49.842525
2019-10-15T07:32:40
2019-10-15T07:32:40
214,632,134
0
3
null
null
null
null
UTF-8
C++
false
true
6,424
cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: game_fourcolorball_def.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "game_fourcolorball_def.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // @@protoc_insertion_point(includes) namespace game_fourcolorball_protocols { namespace { const ::google::protobuf::EnumDescriptor* e_server_msg_type_descriptor_ = NULL; const ::google::protobuf::EnumDescriptor* e_game_state_descriptor_ = NULL; } // namespace void protobuf_AssignDesc_game_5ffourcolorball_5fdef_2eproto() { protobuf_AddDesc_game_5ffourcolorball_5fdef_2eproto(); const ::google::protobuf::FileDescriptor* file = ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "game_fourcolorball_def.proto"); GOOGLE_CHECK(file != NULL); e_server_msg_type_descriptor_ = file->enum_type(0); e_game_state_descriptor_ = file->enum_type(1); } namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); inline void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, &protobuf_AssignDesc_game_5ffourcolorball_5fdef_2eproto); } void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); } } // namespace void protobuf_ShutdownFile_game_5ffourcolorball_5fdef_2eproto() { } void protobuf_AddDesc_game_5ffourcolorball_5fdef_2eproto() { static bool already_here = false; if (already_here) return; already_here = true; GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n\034game_fourcolorball_def.proto\022\034game_fou" "rcolorball_protocols*\275\n\n\021e_server_msg_ty" "pe\022\024\n\017e_mst_start_c2l\020\220N\022\034\n\027e_mst_c2l_ge" "t_room_info\020\221N\022\031\n\024e_mst_c2l_enter_room\020\222" "N\022\031\n\024e_mst_c2l_leave_room\020\223N\022\026\n\021e_mst_c2" "l_add_bet\020\224N\022\031\n\024e_mst_c2l_repeat_bet\020\225N\022" "\030\n\023e_mst_c2l_clear_bet\020\226N\022\"\n\035e_mst_c2l_g" "et_room_scene_info\020\227N\022\032\n\025e_mst_c2l_check" "_state\020\230N\022\021\n\014e_mst_c2l_gm\020\231N\022\035\n\030e_mst_c2" "l_ask_for_banker\020\232N\022\033\n\026e_mst_c2l_leave_b" "anker\020\233N\022#\n\036e_mst_c2l_ask_first_for_bank" "er\020\234N\022\036\n\031e_mst_c2l_ask_player_list\020\235N\022\036\n" "\031e_mst_c2l_ask_banker_list\020\236N\022\037\n\032e_mst_c" "2l_ask_history_list\020\237N\022$\n\037e_mst_c2l_cont" "rol_change_result\020\240N\022\024\n\017e_mst_start_l2c\020" "\230u\022#\n\036e_mst_l2c_get_room_info_result\020\231u\022" " \n\033e_mst_l2c_enter_room_result\020\232u\022 \n\033e_m" "st_l2c_leave_room_result\020\233u\022\026\n\021e_mst_l2c" "_add_bet\020\234u\022\031\n\024e_mst_l2c_repeat_bet\020\235u\022\030" "\n\023e_mst_l2c_clear_bet\020\236u\022\033\n\026e_mst_l2c_bc" "_begin_bet\020\237u\022\035\n\030e_mst_l2c_bc_begin_awar" "d\020\240u\022 \n\033e_mst_l2c_bc_total_bet_info\020\241u\022\"" "\n\035e_mst_l2c_get_room_scene_info\020\242u\022!\n\034e_" "mst_l2c_check_state_result\020\245u\022\035\n\030e_mst_l" "2c_bc_accept_gift\020\247u\022\035\n\030e_mst_l2c_ask_fo" "r_banker\020\250u\022\033\n\026e_mst_l2c_leave_banker\020\251u" "\022#\n\036e_mst_l2c_ask_first_for_banker\020\252u\022\037\n" "\032e_mst_l2c_bc_change_banker\020\253u\022\036\n\031e_mst_" "l2c_ask_player_list\020\254u\022\036\n\031e_mst_l2c_ask_" "banker_list\020\255u\022\037\n\032e_mst_l2c_ask_history_" "list\020\256u\022!\n\034e_mst_l2c_bc_rob_banker_info\020" "\257u\022 \n\033e_mst_l2c_bc_every_bet_info\020\214y\022$\n\037" "e_mst_l2c_control_change_result\020\216y\022\033\n\026e_" "mst_l2c_bc_debuginfo\020\221y\022\"\n\035e_mst_l2c_not" "ice_gm_bank_info\020\222y\022\027\n\021e_mst_clend_index" "\020\240\234\001*T\n\014e_game_state\022\026\n\022e_state_game_beg" "in\020\000\022\024\n\020e_state_game_bet\020\001\022\026\n\022e_state_ga" "me_award\020\002", 1490); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "game_fourcolorball_def.proto", &protobuf_RegisterTypes); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_game_5ffourcolorball_5fdef_2eproto); } // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_game_5ffourcolorball_5fdef_2eproto { StaticDescriptorInitializer_game_5ffourcolorball_5fdef_2eproto() { protobuf_AddDesc_game_5ffourcolorball_5fdef_2eproto(); } } static_descriptor_initializer_game_5ffourcolorball_5fdef_2eproto_; const ::google::protobuf::EnumDescriptor* e_server_msg_type_descriptor() { protobuf_AssignDescriptorsOnce(); return e_server_msg_type_descriptor_; } bool e_server_msg_type_IsValid(int value) { switch(value) { case 10000: case 10001: case 10002: case 10003: case 10004: case 10005: case 10006: case 10007: case 10008: case 10009: case 10010: case 10011: case 10012: case 10013: case 10014: case 10015: case 10016: case 15000: case 15001: case 15002: case 15003: case 15004: case 15005: case 15006: case 15007: case 15008: case 15009: case 15010: case 15013: case 15015: case 15016: case 15017: case 15018: case 15019: case 15020: case 15021: case 15022: case 15023: case 15500: case 15502: case 15505: case 15506: case 20000: return true; default: return false; } } const ::google::protobuf::EnumDescriptor* e_game_state_descriptor() { protobuf_AssignDescriptorsOnce(); return e_game_state_descriptor_; } bool e_game_state_IsValid(int value) { switch(value) { case 0: case 1: case 2: return true; default: return false; } } // @@protoc_insertion_point(namespace_scope) } // namespace game_fourcolorball_protocols // @@protoc_insertion_point(global_scope)
[ "czh850109@gmail.com" ]
czh850109@gmail.com
65b779a2a6e0f530770b7ae19fa4ad7caa66e6d6
2b7b4f2f174d01b0f2445e2e2275e6a1a8f143c6
/HDU/1864[dp].cpp
c042f97f06e60b43014bd7ba020ae3d88beb6598
[]
no_license
lilyht/OJ_code
34220c6d0dbd36984af0fae69dce8427742b1eac
eb589194c109fdc5ed24ea99f2b0f5108964a72c
refs/heads/master
2022-12-27T09:10:17.911928
2020-10-12T08:45:08
2020-10-12T08:45:08
303,328,850
0
0
null
null
null
null
GB18030
C++
false
false
1,981
cpp
#include <iostream> #include <string.h> #include <iomanip> using namespace std; /* * 最大报销额 * 现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类) * 要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。 * 现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 */ int check[35]; int dp[3000050]; //因为dp数组的下标必须是整数,而输入的价格为两位小数,所以扩大100倍变整数,最后输出的时候再变回去 30 * 1000 * 100 int main() { double Q = 0.0; while(cin>>Q) { int N = 0; cin>>N; memset(check, 0, sizeof(check)); memset(dp, 0, sizeof(dp)); int index = 0; if(N == 0) { break; } for(int i=0; i<N; i++) { int m; cin>>m; if(m != 0) { double a = 0.0, b = 0.0, c = 0.0; double aprice = 0.0, bprice = 0.0, cprice = 0.0; bool flag = 1; double total = 0.0; for(int j=0; j<m; j++) { char type, colon; double price = 0.0; cin>>type>>colon>>price; if(type == 'A') { aprice += price; } else if (type == 'B') { bprice += price; } else if (type == 'C') { cprice += price; } else { flag = 0; } total += price; } if(aprice > 600.0 || bprice > 600.0 || cprice > 600.0 ) flag = 0; if(total > 1000.0) flag = 0; if(flag == 1) { //有效发票 check[index] = (int)(total * 100); index++ ; } } } dp[0] = 0; int intQ = (int)(Q * 100); for(int i=0; i<index; i++) { for(int j=intQ; j>=check[i]; j--) { dp[j] = max(dp[j], dp[j-check[i]] + check[i]); } } cout<<fixed<<setprecision(2); // 固定输出两位小数,所有后面的输出均可以这种格式输出 cout<<dp[intQ] * 1.0 / 100<<endl; } return 0; }
[ "295808612@qq.com" ]
295808612@qq.com
326151aa0b85f77b9eeeaae62159a449eca8a3c6
e1e756097a338ac7ed026de4ec825821a6653ea3
/boost_net/deps.h
87817d9352fe9c7797f587b98849091b26a4ae48
[]
no_license
killgxlin/boost_network
43a8c2753a9cf5b796f6c0aa7d846347c128ff1c
6ae91543919c68e66b95f7da3501e7c9f4ed515f
refs/heads/master
2021-01-22T03:08:41.855916
2013-07-10T15:11:27
2013-07-10T15:11:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
604
h
#ifndef DEPS_H #define DEPS_H #include <boost/thread.hpp> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> #include <boost/lockfree/spsc_queue.hpp> #include <boost/lockfree/queue.hpp> #include <boost/lockfree/stack.hpp> #include <boost/asio.hpp> #include <boost/atomic.hpp> #include <set> #include <vector> #include <list> #include <map> #include <functional> #include <stdint.h> #include <stdio.h> namespace asio = boost::asio; namespace lockfree = boost::lockfree; namespace this_thread = boost::this_thread; namespace posix_time = boost::posix_time; #endif
[ "killgxlin@hotmail.com" ]
killgxlin@hotmail.com
e062d6f4d40808db7328067db2a03f02888f9816
a96f0a36ffd4b91dd059420b79856931b5e0f5e3
/SolveConnect2/MoveInstructionsExit.cpp
4a8e1c5d5d2fff366c060a82622e988ba27cfb1b
[ "Unlicense" ]
permissive
rothor/Connect2Solver
5163e8a8e21f40cd5bc2bf15df297a17a249e87c
eca13bfb374443e5877ece3266f874dcacaab5d6
refs/heads/master
2022-09-17T16:45:11.003015
2020-05-27T05:49:34
2020-05-27T05:49:34
267,188,047
0
0
null
null
null
null
UTF-8
C++
false
false
317
cpp
#include "MoveInstructionsExit.h" MoveInstructionsExit::MoveInstructionsExit(bool isForced, bool mustTeleport, Point teleportPoint, bool resetIfOnlyForcedMovesAfter) : isForced(isForced), mustTeleport(mustTeleport), teleportPoint(teleportPoint), resetIfOnlyForcedMovesAfter(resetIfOnlyForcedMovesAfter) { }
[ "warm.juice@yahoo.com" ]
warm.juice@yahoo.com
69ec5591ec882ccf7637b6ba5ee54f7a123be744
dccb136394c3c7f4a636f17f444ebaf95e24ab66
/Programmers/Lv_1/programmers_콜라츠 추측.cpp
02bb4b87b4f3f88df6c815bdb31c196c7e9c7d5e
[]
no_license
Oh-kyung-tak/Algorithm
e2b88f6ae8e97130259dedfc30bb48591ae5b2fd
be63f972503170eb8ce06002a2eacd365ade7787
refs/heads/master
2020-04-25T22:37:41.799025
2020-01-19T08:55:42
2020-01-19T08:55:42
173,117,722
0
0
null
null
null
null
UTF-8
C++
false
false
359
cpp
#include <string> #include <vector> using namespace std; int solution(int num) { int answer = 0; int cnt = 0; long long int temp = num; while (1) { if (temp == 1) { answer = cnt; break; } if (cnt > 500) { answer = -1; break; } if (temp % 2 == 0) temp /= 2; else temp = (temp * 3) + 1; cnt++; } return answer; }
[ "38690587+Oh-kyung-tak@users.noreply.github.com" ]
38690587+Oh-kyung-tak@users.noreply.github.com
6a1abca18f7b099e259a48b2411c3266066ed802
a1091ad42e6a07b6fbb6fe876feb03547a8da1eb
/MITK-superbuild/ep/include/ITK-4.7/itkAffineTransform.hxx
80ddcc40ddf04aaf085c1081143d76e71f5141d9
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
Sotatek-TuyenLuu/DP2
bc61866fe5d388dd11209f4d02744df073ec114f
a48dd0a41c788981009c5ddd034b0e21644c8077
refs/heads/master
2020-03-10T04:59:52.461184
2018-04-12T07:19:27
2018-04-12T07:19:27
129,206,578
1
0
null
null
null
null
UTF-8
C++
false
false
9,602
hxx
/*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #ifndef __itkAffineTransform_hxx #define __itkAffineTransform_hxx #include "itkNumericTraits.h" #include "itkAffineTransform.h" #include "vnl/algo/vnl_matrix_inverse.h" namespace itk { /** Constructor with default arguments */ template< typename TScalar, unsigned int NDimensions > AffineTransform< TScalar, NDimensions >::AffineTransform():Superclass(ParametersDimension) {} /** Constructor with default arguments */ template< typename TScalar, unsigned int NDimensions > AffineTransform< TScalar, NDimensions >::AffineTransform(unsigned int parametersDimension): Superclass(parametersDimension) {} /** Constructor with explicit arguments */ template< typename TScalar, unsigned int NDimensions > AffineTransform< TScalar, NDimensions >::AffineTransform(const MatrixType & matrix, const OutputVectorType & offset): Superclass(matrix, offset) {} /** Destructor */ template< typename TScalar, unsigned int NDimensions > AffineTransform< TScalar, NDimensions >:: ~AffineTransform() { } /** Print self */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions >::PrintSelf(std::ostream & os, Indent indent) const { Superclass::PrintSelf(os, indent); } /** Compose with a translation */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions >::Translate(const OutputVectorType & trans, bool pre) { OutputVectorType newTranslation = this->GetTranslation(); if ( pre ) { newTranslation += this->GetMatrix() * trans; } else { newTranslation += trans; } this->SetVarTranslation(newTranslation); this->ComputeOffset(); this->Modified(); } /** Compose with isotropic scaling */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions > ::Scale(const TScalar & factor, bool pre) { if ( pre ) { MatrixType newMatrix = this->GetMatrix(); newMatrix *= factor; this->SetVarMatrix(newMatrix); } else { MatrixType newMatrix = this->GetMatrix(); newMatrix *= factor; this->SetVarMatrix(newMatrix); OutputVectorType newTranslation = this->GetTranslation(); newTranslation *= factor; this->SetVarTranslation(newTranslation); } this->ComputeMatrixParameters(); this->ComputeOffset(); this->Modified(); } /** Compose with anisotropic scaling */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions > ::Scale(const OutputVectorType & factor, bool pre) { MatrixType trans; unsigned int i, j; for ( i = 0; i < NDimensions; i++ ) { for ( j = 0; j < NDimensions; j++ ) { trans[i][j] = 0.0; } trans[i][i] = factor[i]; } if ( pre ) { this->SetVarMatrix(this->GetMatrix() * trans); } else { this->SetVarMatrix( trans * this->GetMatrix() ); this->SetVarTranslation( trans * this->GetTranslation() ); } this->ComputeMatrixParameters(); this->ComputeOffset(); this->Modified(); } /** Compose with elementary rotation */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions > ::Rotate(int axis1, int axis2, TScalar angle, bool pre) { MatrixType trans; unsigned int i, j; for ( i = 0; i < NDimensions; i++ ) { for ( j = 0; j < NDimensions; j++ ) { trans[i][j] = 0.0; } trans[i][i] = 1.0; } trans[axis1][axis1] = std::cos(angle); trans[axis1][axis2] = std::sin(angle); trans[axis2][axis1] = -std::sin(angle); trans[axis2][axis2] = std::cos(angle); if ( pre ) { this->SetVarMatrix(this->GetMatrix() * trans); } else { this->SetVarMatrix( trans * this->GetMatrix() ); this->SetVarTranslation( trans * this->GetTranslation() ); } this->ComputeMatrixParameters(); this->ComputeOffset(); this->Modified(); } /** Compose with 2D rotation * \todo Find a way to generate a compile-time error * is this is used with NDimensions != 2. */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions > ::Rotate2D(TScalar angle, bool pre) { MatrixType trans; trans[0][0] = std::cos(angle); trans[0][1] = -std::sin(angle); trans[1][0] = std::sin(angle); trans[1][1] = std::cos(angle); if ( pre ) { this->SetVarMatrix(this->GetMatrix() * trans); } else { this->SetVarMatrix( trans * this->GetMatrix() ); this->SetVarTranslation( trans * this->GetTranslation() ); } this->ComputeMatrixParameters(); this->ComputeOffset(); this->Modified(); } /** Compose with 3D rotation * \todo Find a way to generate a compile-time error * is this is used with NDimensions != 3. */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions > ::Rotate3D(const OutputVectorType & axis, TScalar angle, bool pre) { MatrixType trans; ScalarType r, x1, x2, x3; ScalarType q0, q1, q2, q3; // Convert the axis to a unit vector r = std::sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]); x1 = axis[0] / r; x2 = axis[1] / r; x3 = axis[2] / r; // Compute quaternion elements q0 = std::cos(angle / 2.0); q1 = x1 * std::sin(angle / 2.0); q2 = x2 * std::sin(angle / 2.0); q3 = x3 * std::sin(angle / 2.0); // Compute elements of the rotation matrix trans[0][0] = q0 * q0 + q1 * q1 - q2 * q2 - q3 * q3; trans[0][1] = 2.0 * ( q1 * q2 - q0 * q3 ); trans[0][2] = 2.0 * ( q1 * q3 + q0 * q2 ); trans[1][0] = 2.0 * ( q1 * q2 + q0 * q3 ); trans[1][1] = q0 * q0 + q2 * q2 - q1 * q1 - q3 * q3; trans[1][2] = 2.0 * ( q2 * q3 - q0 * q1 ); trans[2][0] = 2.0 * ( q1 * q3 - q0 * q2 ); trans[2][1] = 2.0 * ( q2 * q3 + q0 * q1 ); trans[2][2] = q0 * q0 + q3 * q3 - q1 * q1 - q2 * q2; // Compose rotation matrix with the existing matrix if ( pre ) { this->SetVarMatrix(this->GetMatrix() * trans); } else { this->SetVarMatrix( trans * this->GetMatrix() ); this->SetVarTranslation( trans * this->GetTranslation() ); } this->ComputeMatrixParameters(); this->ComputeOffset(); this->Modified(); } /** Compose with elementary rotation */ template< typename TScalar, unsigned int NDimensions > void AffineTransform< TScalar, NDimensions > ::Shear(int axis1, int axis2, TScalar coef, bool pre) { MatrixType trans; unsigned int i, j; for ( i = 0; i < NDimensions; i++ ) { for ( j = 0; j < NDimensions; j++ ) { trans[i][j] = 0.0; } trans[i][i] = 1.0; } trans[axis1][axis2] = coef; if ( pre ) { this->SetVarMatrix(this->GetMatrix() * trans); } else { this->SetVarMatrix( trans * this->GetMatrix() ); this->SetVarTranslation( trans * this->GetTranslation() ); } this->ComputeMatrixParameters(); this->ComputeOffset(); this->Modified(); } /** Get an inverse of this transform. */ template< typename TScalar, unsigned int NDimensions > bool AffineTransform< TScalar, NDimensions > ::GetInverse(Self *inverse) const { return this->Superclass::GetInverse(inverse); } /** Return an inverse of this transform. */ template< typename TScalar, unsigned int NDimensions > typename AffineTransform< TScalar, NDimensions >::InverseTransformBasePointer AffineTransform< TScalar, NDimensions > ::GetInverseTransform() const { Pointer inv = New(); return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; } /** Compute a distance between two affine transforms */ template< typename TScalar, unsigned int NDimensions > typename AffineTransform< TScalar, NDimensions >::ScalarType AffineTransform< TScalar, NDimensions > ::Metric(const Self *other) const { ScalarType result = 0.0, term; for ( unsigned int i = 0; i < NDimensions; i++ ) { for ( unsigned int j = 0; j < NDimensions; j++ ) { term = this->GetMatrix()[i][j] - other->GetMatrix()[i][j]; result += term * term; } term = this->GetOffset()[i] - other->GetOffset()[i]; result += term * term; } return std::sqrt(result); } /** Compute a distance between self and the identity transform */ template< typename TScalar, unsigned int NDimensions > typename AffineTransform< TScalar, NDimensions >::ScalarType AffineTransform< TScalar, NDimensions > ::Metric(void) const { ScalarType result = 0.0, term; for ( unsigned int i = 0; i < NDimensions; i++ ) { for ( unsigned int j = 0; j < NDimensions; j++ ) { if ( i == j ) { term = this->GetMatrix()[i][j] - 1.0; } else { term = this->GetMatrix()[i][j]; } result += term * term; } term = this->GetOffset()[i]; result += term * term; } return std::sqrt(result); } } // namespace #endif
[ "tuyen.luu@sotatek.com" ]
tuyen.luu@sotatek.com
ef54862e9b292111e173b6984a08f51a0632a2c5
37cca16f12e7b1d4d01d6f234da6d568c318abee
/src/rice/pastry/join/JoinRequest.cpp
4800078c4930f901273844ca2f14c01f5f557daf
[]
no_license
subhash1-0/thirstyCrow
e48155ce68fc886f2ee8e7802567c1149bc54206
78b7e4e3d2b9a9530ad7d66b44eacfe73ceea582
refs/heads/master
2016-09-06T21:25:54.075724
2015-09-21T17:21:15
2015-09-21T17:21:15
42,881,521
0
0
null
null
null
null
UTF-8
C++
false
false
10,593
cpp
// Generated from /pastry-2.1/src/rice/pastry/join/JoinRequest.java #include <rice/pastry/join/JoinRequest.hpp> #include <java/io/IOException.hpp> #include <java/io/Serializable.hpp> #include <java/lang/ArrayStoreException.hpp> #include <java/lang/ClassCastException.hpp> #include <java/lang/Cloneable.hpp> #include <java/lang/Iterable.hpp> #include <java/lang/NullPointerException.hpp> #include <java/lang/Object.hpp> #include <java/lang/String.hpp> #include <java/lang/StringBuilder.hpp> #include <java/util/Date.hpp> #include <java/util/Observer.hpp> #include <rice/p2p/commonapi/NodeHandleSet.hpp> #include <rice/p2p/commonapi/rawserialization/InputBuffer.hpp> #include <rice/p2p/commonapi/rawserialization/OutputBuffer.hpp> #include <rice/pastry/Id.hpp> #include <rice/pastry/NodeHandle.hpp> #include <rice/pastry/NodeHandleFactory.hpp> #include <rice/pastry/NodeSetI.hpp> #include <rice/pastry/join/JoinAddress.hpp> #include <rice/pastry/leafset/LeafSet.hpp> #include <rice/pastry/routing/RouteSet.hpp> #include <SubArray.hpp> #include <ObjectArray.hpp> template<typename ComponentType, typename... Bases> struct SubArray; namespace java { namespace io { typedef ::SubArray< ::java::io::Serializable, ::java::lang::ObjectArray > SerializableArray; } // io namespace lang { typedef ::SubArray< ::java::lang::Cloneable, ObjectArray > CloneableArray; typedef ::SubArray< ::java::lang::Iterable, ObjectArray > IterableArray; } // lang namespace util { typedef ::SubArray< ::java::util::Observer, ::java::lang::ObjectArray > ObserverArray; } // util } // java namespace rice { namespace p2p { namespace commonapi { typedef ::SubArray< ::rice::p2p::commonapi::NodeHandleSet, ::java::lang::ObjectArray, ::java::io::SerializableArray > NodeHandleSetArray; } // commonapi } // p2p namespace pastry { typedef ::SubArray< ::rice::pastry::NodeSetI, ::java::lang::ObjectArray, ::rice::p2p::commonapi::NodeHandleSetArray > NodeSetIArray; namespace routing { typedef ::SubArray< ::rice::pastry::routing::RouteSet, ::java::lang::ObjectArray, ::rice::pastry::NodeSetIArray, ::java::io::SerializableArray, ::java::util::ObserverArray, ::java::lang::IterableArray > RouteSetArray; typedef ::SubArray< ::rice::pastry::routing::RouteSetArray, ::java::lang::CloneableArray, ::java::io::SerializableArray > RouteSetArrayArray; } // routing } // pastry } // rice template<typename T, typename U> static T java_cast(U* u) { if(!u) return static_cast<T>(nullptr); auto t = dynamic_cast<T>(u); if(!t) throw new ::java::lang::ClassCastException(); return t; } template<typename T> static T* npc(T* t) { if(!t) throw new ::java::lang::NullPointerException(); return t; } rice::pastry::join::JoinRequest::JoinRequest(const ::default_init_tag&) : super(*static_cast< ::default_init_tag* >(0)) { clinit(); } rice::pastry::join::JoinRequest::JoinRequest(::rice::pastry::NodeHandle* nh, int8_t rtBaseBitLength) : JoinRequest(*static_cast< ::default_init_tag* >(0)) { ctor(nh,rtBaseBitLength); } rice::pastry::join::JoinRequest::JoinRequest(::rice::pastry::NodeHandle* nh, int8_t rtBaseBitLength, int64_t timestamp) : JoinRequest(*static_cast< ::default_init_tag* >(0)) { ctor(nh,rtBaseBitLength,timestamp); } rice::pastry::join::JoinRequest::JoinRequest(::rice::pastry::NodeHandle* nh, ::java::util::Date* stamp, int8_t rtBaseBitLength) : JoinRequest(*static_cast< ::default_init_tag* >(0)) { ctor(nh,stamp,rtBaseBitLength); } rice::pastry::join::JoinRequest::JoinRequest(::rice::p2p::commonapi::rawserialization::InputBuffer* buf, ::rice::pastry::NodeHandleFactory* nhf, ::rice::pastry::NodeHandle* sender, ::rice::pastry::PastryNode* localNode) /* throws(IOException) */ : JoinRequest(*static_cast< ::default_init_tag* >(0)) { ctor(buf,nhf,sender,localNode); } constexpr int8_t rice::pastry::join::JoinRequest::HAS_HANDLE; constexpr int8_t rice::pastry::join::JoinRequest::HAS_JOIN_HANDLE; constexpr int8_t rice::pastry::join::JoinRequest::HAS_LEAFSET; constexpr int64_t rice::pastry::join::JoinRequest::serialVersionUID; constexpr int16_t rice::pastry::join::JoinRequest::TYPE; void rice::pastry::join::JoinRequest::ctor(::rice::pastry::NodeHandle* nh, int8_t rtBaseBitLength) { ctor(nh, static_cast< ::java::util::Date* >(nullptr), rtBaseBitLength); } void rice::pastry::join::JoinRequest::ctor(::rice::pastry::NodeHandle* nh, int8_t rtBaseBitLength, int64_t timestamp) { ctor(nh, static_cast< ::java::util::Date* >(nullptr), rtBaseBitLength); this->timestamp = timestamp; } void rice::pastry::join::JoinRequest::ctor(::rice::pastry::NodeHandle* nh, ::java::util::Date* stamp, int8_t rtBaseBitLength) { super::ctor(JoinAddress::getCode(), stamp); handle = nh; initialize(rtBaseBitLength); setPriority(MAX_PRIORITY); } rice::pastry::NodeHandle* rice::pastry::join::JoinRequest::getHandle() { return handle; } rice::pastry::NodeHandle* rice::pastry::join::JoinRequest::getJoinHandle() { return joinHandle; } rice::pastry::leafset::LeafSet* rice::pastry::join::JoinRequest::getLeafSet() { return leafSet; } bool rice::pastry::join::JoinRequest::accepted() { return joinHandle != nullptr; } void rice::pastry::join::JoinRequest::acceptJoin(::rice::pastry::NodeHandle* nh, ::rice::pastry::leafset::LeafSet* ls) { joinHandle = nh; leafSet = ls; } int32_t rice::pastry::join::JoinRequest::lastRow() { return rowCount; } void rice::pastry::join::JoinRequest::pushRow(::rice::pastry::routing::RouteSetArray* row) { rows->set(--rowCount, row); } rice::pastry::routing::RouteSetArray* rice::pastry::join::JoinRequest::getRow(int32_t i) { return (*rows)[i]; } int32_t rice::pastry::join::JoinRequest::numRows() { return npc(rows)->length; } void rice::pastry::join::JoinRequest::initialize(int8_t rtBaseBitLength) { joinHandle = nullptr; this->rtBaseBitLength = rtBaseBitLength; rowCount = static_cast< int16_t >((::rice::pastry::Id::IdBitLength / rtBaseBitLength)); rows = new ::rice::pastry::routing::RouteSetArrayArray(rowCount); } java::lang::String* rice::pastry::join::JoinRequest::toString() { return ::java::lang::StringBuilder().append(u"JoinRequest("_j)->append(static_cast< ::java::lang::Object* >((handle != nullptr ? npc(handle)->getNodeId() : static_cast< ::rice::pastry::Id* >(nullptr)))) ->append(u","_j) ->append(static_cast< ::java::lang::Object* >((joinHandle != nullptr ? npc(joinHandle)->getNodeId() : static_cast< ::rice::pastry::Id* >(nullptr)))) ->append(u","_j) ->append(timestamp) ->append(u")"_j)->toString(); } int16_t rice::pastry::join::JoinRequest::getType() { return TYPE; } void rice::pastry::join::JoinRequest::serialize(::rice::p2p::commonapi::rawserialization::OutputBuffer* buf) /* throws(IOException) */ { npc(buf)->writeByte(static_cast< int8_t >(int32_t(1))); npc(buf)->writeLong(timestamp); npc(buf)->writeByte(static_cast< int8_t >(rtBaseBitLength)); npc(handle)->serialize(buf); if(joinHandle != nullptr) { npc(buf)->writeBoolean(true); npc(joinHandle)->serialize(buf); } else { npc(buf)->writeBoolean(false); } npc(buf)->writeShort(static_cast< int16_t >(rowCount)); auto maxIndex = ::rice::pastry::Id::IdBitLength / rtBaseBitLength; for (auto i = int32_t(0); i < maxIndex; i++) { auto thisRow = (*rows)[i]; if(thisRow != nullptr) { npc(buf)->writeBoolean(true); for (auto j = int32_t(0); j < npc(thisRow)->length; j++) { if((*thisRow)[j] != nullptr) { npc(buf)->writeBoolean(true); npc((*thisRow)[j])->serialize(buf); } else { npc(buf)->writeBoolean(false); } } } else { npc(buf)->writeBoolean(false); } } if(leafSet != nullptr) { npc(buf)->writeBoolean(true); npc(leafSet)->serialize(buf); } else { npc(buf)->writeBoolean(false); } } void rice::pastry::join::JoinRequest::ctor(::rice::p2p::commonapi::rawserialization::InputBuffer* buf, ::rice::pastry::NodeHandleFactory* nhf, ::rice::pastry::NodeHandle* sender, ::rice::pastry::PastryNode* localNode) /* throws(IOException) */ { super::ctor(JoinAddress::getCode()); auto version = npc(buf)->readByte(); { int32_t numRows; int32_t numCols; switch (version) { case int32_t(1): timestamp = npc(buf)->readLong(); case int32_t(0): setSender(sender); rtBaseBitLength = npc(buf)->readByte(); initialize(rtBaseBitLength); handle = java_cast< ::rice::pastry::NodeHandle* >(npc(nhf)->readNodeHandle(buf)); if(npc(buf)->readBoolean()) joinHandle = java_cast< ::rice::pastry::NodeHandle* >(npc(nhf)->readNodeHandle(buf)); rowCount = npc(buf)->readShort(); numRows = ::rice::pastry::Id::IdBitLength / rtBaseBitLength; numCols = int32_t(1) << rtBaseBitLength; for (auto i = int32_t(0); i < numRows; i++) { ::rice::pastry::routing::RouteSetArray* thisRow; if(npc(buf)->readBoolean()) { thisRow = new ::rice::pastry::routing::RouteSetArray(numCols); for (auto j = int32_t(0); j < numCols; j++) { if(npc(buf)->readBoolean()) { thisRow->set(j, new ::rice::pastry::routing::RouteSet(buf, nhf, localNode)); } else { thisRow->set(j, nullptr); } } } else { thisRow = nullptr; } rows->set(i, thisRow); } if(npc(buf)->readBoolean()) leafSet = ::rice::pastry::leafset::LeafSet::build(buf, nhf); break; default: throw new ::java::io::IOException(::java::lang::StringBuilder().append(u"Unknown Version: "_j)->append(version)->toString()); } } } extern java::lang::Class *class_(const char16_t *c, int n); java::lang::Class* rice::pastry::join::JoinRequest::class_() { static ::java::lang::Class* c = ::class_(u"rice.pastry.join.JoinRequest", 28); return c; } java::lang::Class* rice::pastry::join::JoinRequest::getClass0() { return class_(); }
[ "sgurjar@adobe.com" ]
sgurjar@adobe.com
e9a66c9b45349acf8f03b599f2f20ced652a34b9
5a8168174356adbdf8c95a6c493e03e14e568079
/src/shapely.cpp
634bfee7d1d95beb4a0cb6f5296cfa073f74ed01
[ "Apache-2.0" ]
permissive
UTNuclearRobotics/descartes_tutorials
133f9edc7861f4ca8aa7a7ed08f6af66f844e799
3245e2b262818563c017af8788936f64c1869f2e
refs/heads/master
2021-01-01T04:23:37.419903
2018-07-12T21:25:15
2018-07-12T21:25:15
97,168,045
0
0
null
2017-07-13T21:58:01
2017-07-13T21:58:01
null
UTF-8
C++
false
false
8,914
cpp
// Core ros functionality like ros::init and spin #include <ros/ros.h> // ROS Trajectory Action server definition #include <control_msgs/FollowJointTrajectoryAction.h> // Means by which we communicate with above action-server #include <actionlib/client/simple_action_client.h> // Includes the descartes robot model we will be using #include <descartes_moveit/moveit_state_adapter.h> // Includes the descartes trajectory type we will be using #include <descartes_trajectory/axial_symmetric_pt.h> #include <descartes_trajectory/cart_trajectory_pt.h> // Includes the planner we will be using #include <descartes_planner/dense_planner.h> #include <tf/tf.h> #include <eigen_conversions/eigen_msg.h> #include <geometry_msgs/Pose.h> #include "move_interface/move_interface.h" #include <moveit/move_group_interface/move_group_interface.h> #include <moveit/planning_interface/planning_interface.h> #include <moveit_msgs/PlanningScene.h> #include <moveit/robot_model_loader/robot_model_loader.h> #include <moveit/robot_state/robot_state.h> #include <moveit/robot_state/conversions.h> #include <string> #include <vector> std::vector<double> getCurrentJointState(const std::string& topic) { sensor_msgs::JointStateConstPtr state = ros::topic::waitForMessage<sensor_msgs::JointState>(topic, ros::Duration(0.0)); if (!state) throw std::runtime_error("Joint state message capture failed"); return state->position; } int main(int argc, char** argv) { // Initialize ROS ros::init(argc, argv, "descartes_tutorial"); ros::NodeHandle nh; // Required for communication with moveit components ros::AsyncSpinner spinner (2); spinner.start(); float xPos; float yPos; float zPos; std::string moveGroup, fixedFrame; if(nh.getParam("/config_data/move_group", moveGroup) && nh.getParam("/config_data/fixed_frame", fixedFrame) && nh.getParam("/config_data/x_pos", xPos) && nh.getParam("/config_data/y_pos", yPos) && nh.getParam("/config_data/z_pos", zPos)) { } else { ROS_ERROR("Unable to get config data from param server. Ending demo."); return false; } moveit::planning_interface::MoveGroupInterface group(moveGroup); EigenSTL::vector_Affine3d poses; // 1. Define sequence of points /* geometry_msgs::Pose target_pose1; target_pose1.orientation.w = 1.0; target_pose1.position.x = 0.0; target_pose1.position.y = 0.5; target_pose1.position.z = 0.5; Eigen::Quaterniond quat; Eigen::Quaterniond quat1; double rotationRadians = 3.14195/2; Eigen::Vector3d rotationVector = Eigen::Vector3d(0,0,1); quat = Eigen::AngleAxisd(rotationRadians, rotationVector); rotationVector = Eigen::Vector3d(0,1,0); quat1 = Eigen::AngleAxisd(rotationRadians, rotationVector); quat = quat*quat1; tf::quaternionEigenToMsg(quat, target_pose1.orientation); group.setPoseTarget(target_pose1); moveit::planning_interface::MoveGroupInterface::Plan my_plan; bool success = group.plan(my_plan); ROS_INFO("Visualizing plan 1 (pose goal) %s",success?"":"FAILED"); */ /* Sleep to give Rviz time to visualize the plan. */ ros::Duration(1.0).sleep(); double R = 0.04; double angle = 2*3.14195/21; double offset = (R-0.005)/3; for (unsigned int i = 0; i < 1; ++i) { Eigen::Affine3d pose; double o = offset*i; double r = sqrt(R*R-o*o); for (unsigned int j = 0; j < 20; j++) // j = 21 { pose = Eigen::Translation3d((xPos+r*cos(angle*j)), (yPos+(r)*sin(angle*j)), zPos +(o)); Eigen::Quaterniond quat; double rotationRadians = 3.14195; Eigen::Vector3d rotationVector = Eigen::Vector3d(0,1,0); quat = Eigen::AngleAxisd(rotationRadians, rotationVector); Eigen::Matrix3d rotMat; rotMat = quat; pose.linear() *= rotMat; /* rotationRadians = 3.14195/2; rotationVector = Eigen::Vector3d(0,1,0); quat = Eigen::AngleAxisd(rotationRadians, rotationVector); rotMat = quat; pose.linear() *= rotMat; rotationRadians = 3.14195/2; rotationVector = Eigen::Vector3d(0,1,0); quat = Eigen::AngleAxisd(rotationRadians, rotationVector); rotMat = quat; pose.linear() *= rotMat; */ poses.push_back(pose); ros::Duration(0.1).sleep(); } } /* Eigen::Quaterniond quat; double rotationRadians = 3.14195/2; Eigen::Vector3d rotationVector = Eigen::Vector3d(0,0,1); quat = Eigen::AngleAxisd(rotationRadians, rotationVector); Eigen::Matrix3d rotMat; rotMat = quat; pose.linear() *= rotMat; rotationRadians = 3.14195/2; rotationVector = Eigen::Vector3d(0,1,0); quat = Eigen::AngleAxisd(rotationRadians, rotationVector); rotMat = quat; pose.linear() *= rotMat; */ /* descartes_core::TrajectoryPtPtr pt = makeTolerancedCartesianPoint(pose); points.push_back(pt); poses.push_back(pose); */ ros::Duration(0.1).sleep(); ros::Duration(0.5).sleep(); MoveInterface mi = MoveInterface(); mi.initialize(moveGroup); // creating rviz markers visualization_msgs::Marker z_axes, y_axes, x_axes, line; visualization_msgs::MarkerArray markers_msg; float AXIS_LINE_WIDTH = 0.02; float AXIS_LINE_LENGTH = 0.02; ros::Publisher marker_publisher_ = nh.advertise<visualization_msgs::MarkerArray>("chatter", 1000); z_axes.type = y_axes.type = x_axes.type = visualization_msgs::Marker::LINE_LIST; z_axes.ns = y_axes.ns = x_axes.ns = "axes"; z_axes.action = y_axes.action = x_axes.action = visualization_msgs::Marker::ADD; z_axes.lifetime = y_axes.lifetime = x_axes.lifetime = ros::Duration(0); z_axes.header.frame_id = y_axes.header.frame_id = x_axes.header.frame_id = fixedFrame; z_axes.scale.x = y_axes.scale.x = x_axes.scale.x = AXIS_LINE_WIDTH; // z properties z_axes.id = 0; z_axes.color.r = 0; z_axes.color.g = 0; z_axes.color.b = 1; z_axes.color.a = 1; // y properties y_axes.id = 1; y_axes.color.r = 0; y_axes.color.g = 1; y_axes.color.b = 0; y_axes.color.a = 1; // x properties x_axes.id = 2; x_axes.color.r = 1; x_axes.color.g = 0; x_axes.color.b = 0; x_axes.color.a = 1; // line properties line.type = visualization_msgs::Marker::LINE_STRIP; line.ns = "line"; line.action = visualization_msgs::Marker::ADD; line.lifetime = ros::Duration(0); line.header.frame_id = fixedFrame; line.scale.x = AXIS_LINE_WIDTH; line.id = 0; line.color.r = 1; line.color.g = 0; line.color.b = 0; line.color.a = 0; // creating axes markers z_axes.points.reserve(2*poses.size()); y_axes.points.reserve(2*poses.size()); x_axes.points.reserve(2*poses.size()); line.points.reserve(poses.size()); geometry_msgs::Point p_start,p_end; double distance = 0; Eigen::Affine3d prev = poses[0]; for(unsigned int i = 0; i < poses.size(); i++) { const Eigen::Affine3d& pose = poses[i]; distance = (pose.translation() - prev.translation()).norm(); tf::pointEigenToMsg(pose.translation(),p_start); geometry_msgs::Pose pose_request; tf::poseEigenToMsg(pose,pose_request); geometry_msgs::PoseStamped pose_test; pose_test.header.frame_id = fixedFrame; pose_test.pose = pose_request; bool success = mi.planMove(pose_test, 1.0, false); // mi.moveArm(pose_test, 1.0, false); if(success==0) { Eigen::Affine3d moved_along_x = pose * Eigen::Translation3d(AXIS_LINE_LENGTH,0,0); tf::pointEigenToMsg(moved_along_x.translation(),p_end); x_axes.points.push_back(p_start); x_axes.points.push_back(p_end); } else { Eigen::Affine3d moved_along_y = pose * Eigen::Translation3d(0,AXIS_LINE_LENGTH,0); tf::pointEigenToMsg(moved_along_y.translation(),p_end); y_axes.points.push_back(p_start); y_axes.points.push_back(p_end); } if(distance > 0.01) { Eigen::Affine3d moved_along_z = pose * Eigen::Translation3d(0,0,AXIS_LINE_LENGTH); tf::pointEigenToMsg(moved_along_z.translation(),p_end); z_axes.points.push_back(p_start); z_axes.points.push_back(p_end); // saving previous prev = pose; } line.points.push_back(p_start); } markers_msg.markers.push_back(x_axes); markers_msg.markers.push_back(y_axes); markers_msg.markers.push_back(z_axes); markers_msg.markers.push_back(line); while(marker_publisher_.getNumSubscribers() < 1) { ros::Duration(1.0).sleep(); ROS_INFO_THROTTLE(5,"Check RViz to make sure you are subscribed to the marker array /chatter."); } marker_publisher_.publish(markers_msg); ros::spinOnce(); ros::Duration(1.0).sleep(); ros::Duration(0.5).sleep(); /* for (unsigned int i = 0; i < 5; ++i) { Eigen::Affine3d pose; pose = Eigen::Translation3d(0.0, 0.04 * i, 1.3); descartes_core::TrajectoryPtPtr pt = makeTolerancedCartesianPoint(pose); points.push_back(pt); } */ // Wait till user kills the process (Control-C) return 0; }
[ "cpetlowany@gmail.com" ]
cpetlowany@gmail.com
e0d27f358bb3393b65f71dc8a93640ef8c5103f5
20482a4f7571a81f9e0e0aa2021d48cd1826571e
/White/Week 4/block_3/Calculator/RatCalc.cpp
d9f6d8cc7e3c044be1ea9d7bd4ceaf036543189f
[]
no_license
intelek2al/Coursera
c0bb155d99853c449c479a4ff1217955edd17e09
d16476c4ed0046e9f30b5f5a6999c4923af6b4e4
refs/heads/master
2022-12-05T22:42:32.527351
2020-08-16T15:57:52
2020-08-16T15:57:52
283,719,832
0
0
null
null
null
null
UTF-8
C++
false
false
3,115
cpp
#include <iostream> #include <numeric> #include <sstream> #include <string.h> #include <map> #include <set> #include <vector> #include <exception> using namespace std; class Rational { public: Rational() { num = 0; den = 1; } Rational(int numerator, int denominator) { if (denominator == 0) { throw invalid_argument("Invalid argument"); } if (denominator < 0) { numerator *= -1; denominator *= -1; } num = numerator / gcd(abs(numerator), abs(denominator)); den = denominator / gcd(abs(numerator), abs(denominator)); } int Numerator() const { return num; } int Denominator() const { return den; } private: int num; int den; }; Rational operator+(const Rational &a, const Rational &b) { int den = lcm(a.Denominator(), b.Denominator()); int num = a.Numerator() * den / a.Denominator() + b.Numerator() * den / b.Denominator(); return Rational(num, den); } Rational operator-(const Rational &a, const Rational &b) { int den = lcm(a.Denominator(), b.Denominator()); int num = a.Numerator() * den / a.Denominator() - b.Numerator() * den / b.Denominator(); return Rational(num, den); } bool operator==(const Rational &a, const Rational &b) { return (a.Denominator() == b.Denominator() && a.Numerator() == b.Numerator()); } Rational operator*(const Rational &a, const Rational &b) { return Rational(a.Numerator() * b.Numerator(), a.Denominator() * b.Denominator()); } Rational operator/(const Rational &a, const Rational &b) { if (b.Numerator() == 0) { throw domain_error("Division by zero"); } return Rational(a.Numerator() * b.Denominator(), a.Denominator() * b.Numerator()); } ostream &operator<<(ostream &stream, const Rational &a) { if (stream) stream << a.Numerator() << "/" << a.Denominator(); return stream; } istream &operator>>(istream &stream, Rational &a) { int n, d; char c; if (stream) { stream >> n >> c >> d; if (stream && c == '/') { a = Rational(n, d); } } return stream; } bool operator<(const Rational &a, const Rational &b) { int den = lcm(a.Denominator(), b.Denominator()); int num1 = a.Numerator() * den / a.Denominator(); int num2 = b.Numerator() * den / b.Denominator(); return num1 < num2; } class Calculator { private: Rational left; Rational right; char oper; public: Calculator() { left = Rational(); right = Rational(); oper = '+'; } Calculator(const Rational &l, const Rational &r, const char &o) { left = l; right = r; oper = o; } Rational Accept() { switch (oper) { case '+': return (left + right); case '-': return (left - right); case '*': return (left * right); case '/': return (left / right); } return Rational(); } }; istream &operator>>(istream &stream, Calculator &calc) { Rational t_left = Rational(); Rational t_right = Rational(); char t_oper = '+'; stream >> t_left >> t_oper >> t_right; calc = Calculator(t_left, t_right, t_oper); return stream; } int main() { Calculator calc; try { cin >> calc; cout << calc.Accept() << endl; } catch (exception &ex) { cout << ex.what() << endl; } return 0; }
[ "nikita96511@gmail.com" ]
nikita96511@gmail.com
61a82e52305e2e61a97596d3feffac7509d13418
fafdf1e62cf622035ee82666ba6ae7108127d140
/gameswf/gameswf/plugins/sysinfo/sysinfo.h
98679b0f826e8fc91ff86aff160424899c28f7f7
[]
no_license
saerich/RaiderZ-Evolved-SDK
7f18942ddc6c566d47c3a6222c03fad7543738a4
b576e6757b6a781a656be7ba31eb0cf5e8a23391
refs/heads/master
2023-02-12T03:21:26.442348
2020-08-30T15:39:54
2020-08-30T15:39:54
281,213,173
1
2
null
null
null
null
UTF-8
C++
false
false
885
h
// sysinfo.cpp -- Vitaly Alexeev <tishka92@yahoo.com> 2007 // This source code has been donated to the Public Domain. Do // whatever you want with it. // gameSWF plugin, gets dir entity #ifndef GAMESWF_SYSINFO_PLUGIN_H #define GAMESWF_SYSINFO_PLUGIN_H #include "gameswf/gameswf_object.h" using namespace gameswf; namespace sysinfo_plugin { struct sysinfo : public as_object { // Unique id of a gameswf resource enum { m_class_id = AS_PLUGIN_SYSINFO }; virtual bool is(int class_id) const { if (m_class_id == class_id) return true; else return as_object::is(class_id); } sysinfo(player* player); exported_module void get_dir(as_object* info, const tu_string& path); exported_module bool get_hdd_serno(tu_string* sn, const char* dev); exported_module int get_freemem(); }; } #endif // GAMESWF_SYSINFO_PLUGIN_H
[ "fabs1996@live.co.uk" ]
fabs1996@live.co.uk
5281ce41cfbb5c3a9e8ba6e720e00cf2eb26ea00
c0ac6fe0a4a03245e034b296800156eaba01ad2e
/SDL2_Standardproject/SDL/SDLMusic.h
e7b8d6e2d839238da3e8d402b90bcce18bcf0c4d
[]
no_license
TorsteinA/snake-plusplus
1a325d648f81f384c50b10defe9493d7d5087929
1dfd5628a76c2f7c0d4af913e57dd189448ee2a0
refs/heads/master
2021-01-25T04:35:38.190577
2017-06-04T19:44:13
2017-06-04T19:44:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
524
h
// // Created by torstein on 03.06.17. // #ifndef SNAKE_PLUSPLUS_SDLMUSIC_H #define SNAKE_PLUSPLUS_SDLMUSIC_H #include <string> #include <SDL2/SDL_mixer.h> class SDLMusic { public: /* Loads the given file on construction */ SDLMusic(const std::string& file); /* Free's the memory consumed by the sound data */ ~SDLMusic(); /* Play sound effect */ void playMusic(); void PauseUnpauseMusic(); void StopMusic(); private: Mix_Music *gameMusic; }; #endif //SNAKE_PLUSPLUS_SDLMUSIC_H
[ "alvtor15@student.westerdals.no" ]
alvtor15@student.westerdals.no
80569f4edda4541973f452a5a57caf2f2faf59f5
9f5289c0bb0d3d7a91d1003a4ae7564576cb169e
/Source/SBansheeEngine/Source/BsScriptResourceManager.cpp
a73c6b30c3f5f11e6f0eec4be46efff3e4c63a58
[]
no_license
linuxaged/BansheeEngine
59fa82828ba0e38841ac280ea1878c9f1e9bf9bd
12cb86711cc98847709f702e11a577cc7c2f7913
refs/heads/master
2021-01-11T00:04:23.661733
2016-10-10T13:18:44
2016-10-10T13:18:44
70,758,880
3
3
null
2016-10-13T01:57:56
2016-10-13T01:57:55
null
UTF-8
C++
false
false
17,585
cpp
//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// #include "BsScriptResourceManager.h" #include "BsMonoManager.h" #include "BsMonoAssembly.h" #include "BsMonoClass.h" #include "BsResources.h" #include "BsScriptTexture2D.h" #include "BsScriptTexture3D.h" #include "BsScriptTextureCube.h" #include "BsScriptSpriteTexture.h" #include "BsScriptPlainText.h" #include "BsScriptScriptCode.h" #include "BsScriptShader.h" #include "BsScriptShaderInclude.h" #include "BsScriptMaterial.h" #include "BsScriptMesh.h" #include "BsScriptFont.h" #include "BsScriptPrefab.h" #include "BsScriptStringTable.h" #include "BsScriptGUISkin.h" #include "BsScriptPhysicsMaterial.h" #include "BsScriptPhysicsMesh.h" #include "BsScriptAudioClip.h" #include "BsScriptAnimationClip.h" #include "BsScriptManagedResource.h" #include "BsScriptAssemblyManager.h" using namespace std::placeholders; namespace BansheeEngine { ScriptResourceManager::ScriptResourceManager() { mResourceDestroyedConn = gResources().onResourceDestroyed.connect(std::bind(&ScriptResourceManager::onResourceDestroyed, this, _1)); } ScriptResourceManager::~ScriptResourceManager() { mResourceDestroyedConn.disconnect(); } template<class RetType, class InType> void ScriptResourceManager::createScriptResource(MonoObject* instance, const ResourceHandle<InType>& resourceHandle, RetType** out) { const String& uuid = resourceHandle.getUUID(); #if BS_DEBUG_MODE _throwExceptionIfInvalidOrDuplicate(uuid); #endif RetType* scriptResource = new (bs_alloc<RetType>()) RetType(instance, resourceHandle); mScriptResources[uuid] = scriptResource; *out = scriptResource; } template<class RetType, class InType> void ScriptResourceManager::getScriptResource(const ResourceHandle<InType>& resourceHandle, RetType** out, bool create) { String uuid = resourceHandle.getUUID(); if (!uuid.empty()) { *out = static_cast<RetType*>(getScriptResource(uuid)); if (*out == nullptr && create) createScriptResource(resourceHandle, out); } else *out = nullptr; } namespace Detail { template<class RetType, class InType> void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<InType>& resourceHandle, RetType** out) { MonoObject* monoInstance = RetType::createInstance(); thisPtr->createScriptResource(monoInstance, resourceHandle, out); } template<> void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<StringTable>& resourceHandle, ScriptStringTable** out) { MonoClass* resourceClass = ScriptStringTable::getMetaData()->scriptClass; bool dummy = true; void* params = { &dummy }; MonoObject* monoInstance = resourceClass->createInstance(&params, 1); thisPtr->createScriptResource(monoInstance, resourceHandle, out); } template<> void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Texture>& resourceHandle, ScriptTextureBase** out) { TextureType type = resourceHandle->getProperties().getTextureType(); if (type == TEX_TYPE_3D) return ScriptResourceManager_createScriptResource(thisPtr, resourceHandle, (ScriptTexture3D**)out); else if (type == TEX_TYPE_CUBE_MAP) return ScriptResourceManager_createScriptResource(thisPtr, resourceHandle, (ScriptTextureCube**)out); else return ScriptResourceManager_createScriptResource(thisPtr, resourceHandle, (ScriptTexture2D**)out); } template<> void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const HResource& resourceHandle, ScriptResourceBase** out) { #if BS_DEBUG_MODE thisPtr->_throwExceptionIfInvalidOrDuplicate(resourceHandle.getUUID()); #endif UINT32 resTypeID = resourceHandle->getTypeId(); switch (resTypeID) { case TID_Texture: { HTexture texture = static_resource_cast<Texture>(resourceHandle); TextureType type = texture->getProperties().getTextureType(); if (type == TEX_TYPE_3D) return ScriptResourceManager_createScriptResource(thisPtr, texture, (ScriptTexture3D**)out); else if (type == TEX_TYPE_CUBE_MAP) return ScriptResourceManager_createScriptResource(thisPtr, texture, (ScriptTextureCube**)out); else return ScriptResourceManager_createScriptResource(thisPtr, texture, (ScriptTexture2D**)out); } case TID_SpriteTexture: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<SpriteTexture>(resourceHandle), (ScriptSpriteTexture**)out); case TID_Font: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<Font>(resourceHandle), (ScriptFont**)out); case TID_PlainText: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<PlainText>(resourceHandle), (ScriptPlainText**)out); case TID_ScriptCode: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<ScriptCode>(resourceHandle), (ScriptScriptCode**)out); case TID_Shader: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<Shader>(resourceHandle), (ScriptShader**)out); case TID_ShaderInclude: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<ShaderInclude>(resourceHandle), (ScriptShaderInclude**)out); case TID_Prefab: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<Prefab>(resourceHandle), (ScriptPrefab**)out); case TID_StringTable: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<StringTable>(resourceHandle), (ScriptStringTable**)out); case TID_Material: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<Material>(resourceHandle), (ScriptMaterial**)out); case TID_Mesh: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<Mesh>(resourceHandle), (ScriptMesh**)out); case TID_GUISkin: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<GUISkin>(resourceHandle), (ScriptGUISkin**)out); case TID_PhysicsMaterial: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<PhysicsMaterial>(resourceHandle), (ScriptPhysicsMaterial**)out); case TID_PhysicsMesh: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<PhysicsMesh>(resourceHandle), (ScriptPhysicsMesh**)out); case TID_AudioClip: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<AudioClip>(resourceHandle), (ScriptAudioClip**)out); case TID_AnimationClip: return ScriptResourceManager_createScriptResource(thisPtr, static_resource_cast<AnimationClip>(resourceHandle), (ScriptAnimationClip**)out); case TID_ManagedResource: BS_EXCEPT(InternalErrorException, "Managed resources must have a managed instance by default, this call is invalid.") break; default: BS_EXCEPT(NotImplementedException, "Attempting to load a resource type that is not supported. Type ID: " + toString(resTypeID)); break; } } template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Texture>&, ScriptTexture2D**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Texture>&, ScriptTexture3D**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Texture>&, ScriptTextureCube**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Texture>&, ScriptTextureBase**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<SpriteTexture>&, ScriptSpriteTexture**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Mesh>&, ScriptMesh**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Material>&, ScriptMaterial**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Shader>&, ScriptShader**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<ShaderInclude>&, ScriptShaderInclude**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Prefab>&, ScriptPrefab**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<Font>&, ScriptFont**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<PlainText>&, ScriptPlainText**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<ScriptCode>&, ScriptScriptCode**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<StringTable>&, ScriptStringTable**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<GUISkin>&, ScriptGUISkin**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<PhysicsMesh>&, ScriptPhysicsMesh**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<PhysicsMaterial>&, ScriptPhysicsMaterial**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<AudioClip>&, ScriptAudioClip**); template void ScriptResourceManager_createScriptResource(ScriptResourceManager* thisPtr, const ResourceHandle<AnimationClip>&, ScriptAnimationClip**); } template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Texture>&, ScriptTexture2D**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Texture>&, ScriptTexture3D**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Texture>&, ScriptTextureCube**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<SpriteTexture>&, ScriptSpriteTexture**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Mesh>&, ScriptMesh**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Material>&, ScriptMaterial**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Shader>&, ScriptShader**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<ShaderInclude>&, ScriptShaderInclude**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Prefab>&, ScriptPrefab**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<Font>&, ScriptFont**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<PlainText>&, ScriptPlainText**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<ScriptCode>&, ScriptScriptCode**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<StringTable>&, ScriptStringTable**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<GUISkin>&, ScriptGUISkin**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<PhysicsMesh>&, ScriptPhysicsMesh**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<PhysicsMaterial>&, ScriptPhysicsMaterial**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<AudioClip>&, ScriptAudioClip**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<AnimationClip>&, ScriptAnimationClip**); template BS_SCR_BE_EXPORT void ScriptResourceManager::createScriptResource(MonoObject*, const ResourceHandle<ManagedResource>&, ScriptManagedResource**); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Texture>& resourceHandle, ScriptTexture2D** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Texture>& resourceHandle, ScriptTexture3D** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Texture>& resourceHandle, ScriptTextureCube** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Texture>& resourceHandle, ScriptTextureBase** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<SpriteTexture>& resourceHandle, ScriptSpriteTexture** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Mesh>& resourceHandle, ScriptMesh** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Material>& resourceHandle, ScriptMaterial** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Shader>& resourceHandle, ScriptShader** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<ShaderInclude>& resourceHandle, ScriptShaderInclude** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Prefab>& resourceHandle, ScriptPrefab** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Font>& resourceHandle, ScriptFont** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<PlainText>& resourceHandle, ScriptPlainText** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<ScriptCode>& resourceHandle, ScriptScriptCode** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<StringTable>& resourceHandle, ScriptStringTable** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<GUISkin>& resourceHandle, ScriptGUISkin** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<PhysicsMesh>& resourceHandle, ScriptPhysicsMesh** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<PhysicsMaterial>& resourceHandle, ScriptPhysicsMaterial** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<AudioClip>& resourceHandle, ScriptAudioClip** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<AnimationClip>& resourceHandle, ScriptAnimationClip** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<ManagedResource>& resourceHandle, ScriptManagedResource** out, bool create); template BS_SCR_BE_EXPORT void ScriptResourceManager::getScriptResource(const ResourceHandle<Resource>& resourceHandle, ScriptResourceBase** out, bool create); ScriptResourceBase* ScriptResourceManager::getScriptResource(const String& uuid) { if (uuid == "") return nullptr; auto findIter = mScriptResources.find(uuid); if(findIter != mScriptResources.end()) return findIter->second; return nullptr; } void ScriptResourceManager::destroyScriptResource(ScriptResourceBase* resource) { HResource resourceHandle = resource->getGenericHandle(); const String& uuid = resourceHandle.getUUID(); if(uuid == "") BS_EXCEPT(InvalidParametersException, "Provided resource handle has an undefined resource UUID."); (resource)->~ScriptResourceBase(); MemoryAllocator<GenAlloc>::free(resource); mScriptResources.erase(uuid); } void ScriptResourceManager::onResourceDestroyed(const String& UUID) { auto findIter = mScriptResources.find(UUID); if (findIter != mScriptResources.end()) { findIter->second->notifyResourceDestroyed(); mScriptResources.erase(findIter); } } void ScriptResourceManager::_throwExceptionIfInvalidOrDuplicate(const String& uuid) const { if(uuid == "") BS_EXCEPT(InvalidParametersException, "Provided resource handle has an undefined resource UUID."); auto findIter = mScriptResources.find(uuid); if(findIter != mScriptResources.end()) { BS_EXCEPT(InvalidStateException, "Provided resource handle already has a script resource. \ Retrieve the existing instance instead of creating a new one."); } } }
[ "bearishsun@gmail.com" ]
bearishsun@gmail.com
47807127c3fb34099a030ec43addd11c37a9d3ad
19555fc7ebb58e6d915b78a22b9b8a29de4fabe0
/examples/TerrainDemo/terrain.cpp
f58b2d013a742b90ae39e669a9f5499023f07d7d
[ "Unlicense" ]
permissive
wyrover/freeimage-PhotoViewer
1713a79d0f4a98b0b0ee7cca31aadc6e88c476a6
9d8fa6024e81e50904bab941501c639716cf26e0
refs/heads/master
2021-05-27T18:05:11.281823
2013-09-03T03:20:54
2013-09-03T03:20:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
31,530
cpp
#include "stdafx.h" #include "terrain.h" #include "viewer.h" #include "texture.h" #include "quaternion.h" #include "options.h" #include <math.h> #include "platform/log.h" #include "platform/imageloader.h" using namespace Platform; #define MORPH_RANGE .025f //////////////////////////////////////////////////////////////////////////// // Public: Terrain() // Params: // No params. // Initialises a few variables... //////////////////////////////////////////////////////////////////////////// Terrain::Terrain() { heightmap = NULL; camznear = 0; opt_terrain_wireframe = false; //set to .1 to see little pops... varthreshold = .05f; opt_global_debug = false; placename = NULL; range = 200; vertices = new Vector[maxvertices]; } Terrain::~Terrain() { delete [] texturemap; texturemap = 0; delete [] colormap; colormap = 0; delete [] varianceTree1; varianceTree1 = 0; delete [] varianceTree2; varianceTree2 = 0; delete [] bintritree; bintritree = 0; delete [] vertices; vertices = 0; } //////////////////////////////////////////////////////////////////////////// // Public: load() // Params: charactor array to a tga file repesenting the height array. // Returns: true if ok, false if failed. //////////////////////////////////////////////////////////////////////////// bool Terrain::load(const std::wstring& filePath) { // load in a image, brightness repesents the height of the terrain. Image* image = ImageLoader::LoadImage(filePath, Image::GRAYSCALE); if (!image) { Log::print(L"Couldnt load the terrain height map."); return false; } heightmap = image->getWritableData(); width = image->getWidth(); height = image->getHeight(); if (height != 256 && width != 256) { Log::print(L"Terrain image needs to be 256 * 256 at the moment.(sorry)"); return false; } CalcVarianceTree(); CalcLight(); CalcTexture(); // maximum number of bintrees that we could ever need // is allocated, so no error checking has to be done. bintritree = new BinTriTree[256*256*4]; //(n^2 + n^2) * 2 location.load(L"data/location.pcx", L"data/location.txt"); return true; } //////////////////////////////////////////////////////////////////////////// // Public: Draw() // Params: Pointer to Viewer class, uses position and rotations values //////////////////////////////////////////////////////////////////////////// void Terrain::Draw(Viewer *viewer) { starttime = timeGetTime(); BuildTree(viewer); endtime = timeGetTime(); Log::printf(L"Split count: %d in %dms", tricount, endtime - starttime); glBindTexture(GL_TEXTURE_2D, gltexture); tricount = 0; starttime = endtime; RenderTree(); endtime = timeGetTime(); Log::printf(L"Render Count: %d in %dms", tricount, endtime - starttime); } //////////////////////////////////////////////////////////////////////////// // Private: RenderTree() //////////////////////////////////////////////////////////////////////////// void Terrain::RenderTree(void) { if (!opt_terrain_wireframe) glBegin(GL_TRIANGLES); vertexindex = 0; RenderTree2(0, 0, (float)getHeight(0, 0), height, width, (float)getHeight(height, width), 0, width, (float)getHeight(0, width), &bintritree[1]); RenderTree2(height, width, (float)getHeight(height, width), 0, 0, (float)getHeight(0, 0), height, 0, (float)getHeight(height, 0), &bintritree[2]); if (!opt_terrain_wireframe) { glEnd(); } } //////////////////////////////////////////////////////////////////////////// // Private: RenderTree2() // Params: Vertices of current triangle with their morph valuse. //////////////////////////////////////////////////////////////////////////// void Terrain::RenderTree2(UINT16 x1, UINT16 y1, float morph1, UINT16 x2, UINT16 y2, float morph2, UINT16 x3, UINT16 y3, float morph3, BinTriTree *tri) { if (tri->leftChild != 0 && tri->rightChild != 0) { int hx = (x1 + x2) / 2; int hy = (y1 + y2) / 2; float realHeight = (float)getHeight(hx, hy); float avgHeight = (morph1 + morph2) / 2; float v = realHeight - avgHeight; float tmorph = tri->morph; if (tri->bottomNeighbour != 0) { tmorph = (tmorph + tri->bottomNeighbour->morph) / 2; } float morphheight = avgHeight + (v * tmorph); RenderTree2(x2, y2, morph2, x3, y3, morph3, hx, hy, morphheight, tri->leftChild); RenderTree2(x3, y3, morph3, x1, y1, morph1, hx, hy, morphheight, tri->rightChild); } else { tricount++; if (opt_terrain_wireframe) { #ifdef NICE_WIREFRAME glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glDisable(GL_TEXTURE_2D); glColor3f(0.3f, 0.5f, 1.0f); glBegin(GL_TRIANGLES); glVertex3f((GLfloat)x1 - 128, morph1*0.1f, (GLfloat)y1 - 128); glVertex3f((GLfloat)x2 - 128, morph2*0.1f, (GLfloat)y2 - 128); glVertex3f((GLfloat)x3 - 128, morph3*0.1f, (GLfloat)y3 - 128); glEnd(); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glEnable(GL_POLYGON_OFFSET_FILL); glPolygonOffset(1.0f, 1.0f); glEnable(GL_TEXTURE_2D); glColor3f(1, 1, 1); glBegin(GL_TRIANGLES); glTexCoord2f(x1 / 256.0f, y1 / 256.0f); glVertex3f((GLfloat)x1 - 128, morph1*0.1f, (GLfloat)y1 - 128); glTexCoord2f(x2 / 256.0f, y2 / 256.0f); glVertex3f((GLfloat)x2 - 128, morph2*0.1f, (GLfloat)y2 - 128); glTexCoord2f(x3 / 256.0f, y3 / 256.0f); glVertex3f((GLfloat)x3 - 128, morph3*0.1f, (GLfloat)y3 - 128); glDisable(GL_POLYGON_OFFSET_FILL); glEnd(); #else // BASIC WIREFRAME glDisable(GL_TEXTURE_2D); // shouldn't be here really glBegin(GL_LINE_LOOP); glVertex3f((GLfloat)x1 - 128, morph1*0.1f, (GLfloat)y1 - 128); glVertex3f((GLfloat)x2 - 128, morph2*0.1f, (GLfloat)y2 - 128); glVertex3f((GLfloat)x3 - 128, morph3*0.1f, (GLfloat)y3 - 128); glEnd(); #endif } else { glTexCoord2f(x1 / 256.0f, y1 / 256.0f); glVertex3f((GLfloat)x1 - 128, morph1*0.1f, (GLfloat)y1 - 128); glTexCoord2f(x2 / 256.0f, y2 / 256.0f); glVertex3f((GLfloat)x2 - 128, morph2*0.1f, (GLfloat)y2 - 128); glTexCoord2f(x3 / 256.0f, y3 / 256.0f); glVertex3f((GLfloat)x3 - 128, morph3*0.1f, (GLfloat)y3 - 128); } } } //////////////////////////////////////////////////////////////////////////// // Private: BuildTree() // Params: Pointer to the viewer class. //////////////////////////////////////////////////////////////////////////// void Terrain::BuildTree(Viewer *viewer) { bintritree[1].leftChild = 0; bintritree[1].rightChild = 0; bintritree[1].leftNeighbour = 0; bintritree[1].rightNeighbour = 0; bintritree[1].bottomNeighbour = &bintritree[2]; bintritree[1].leaf = 1; bintritree[2].leftChild = 0; bintritree[2].rightChild = 0; bintritree[2].leftNeighbour = 0; bintritree[2].rightNeighbour = 0; bintritree[2].bottomNeighbour = &bintritree[1]; bintritree[2].leaf = 1; nextfreebintree = 3; Vector d1, d2, d3, d4; DistanceTo(d1, -128, -128, viewer->pos, viewer->rot); DistanceTo(d2, -128, 128, viewer->pos, viewer->rot); DistanceTo(d3, 128, 128, viewer->pos, viewer->rot); DistanceTo(d4, 128, -128, viewer->pos, viewer->rot); DistanceTo(aoipos, -viewer->aoipos[2], -viewer->aoipos[0], viewer->pos, viewer->rot); tricount = 0; if (!aoi) { aoipos[0] = 20000; aoipos[2] = 20000; } cvarianceTree = varianceTree1; ctreedepth = 17; // BuildTree2(&bintritree[1], d1[2], d3[2], d2[2]); BuildTree3(&bintritree[1], d1[0], d1[2], d3[0], d3[2], d2[0], d2[2]); cvarianceTree = varianceTree2; ctreedepth = 17; // BuildTree2(&bintritree[2], d3[2], d1[2], d4[2]); BuildTree3(&bintritree[2], d3[0], d3[2], d1[0], d1[2], d4[0], d4[2]); } //////////////////////////////////////////////////////////////////////////// // Private: DistanceTo() // Params: Vector: a vector to hold the result // float, float: a 2d point on the terrain. // Vector: the view position. // Vector: the view direction.(Given in degrees) // // Side effects: Vector result is changed. //////////////////////////////////////////////////////////////////////////// void Terrain::DistanceTo(Vector result, float x, float y, Vector view, Vector viewrot) { Vector rot; Matrix matrix; rot[0] = -view[0]; rot[1] = 0; rot[2] = -view[2]; zeroVector(result); identityMatrix(matrix); translateMatrix(matrix, rot); rotateMatrixY(matrix, ((viewrot[1] - 180) / 360)*2*M_PI); rot[0] = -y; rot[2] = -x; multVertexMatrix(rot, matrix, result); } //////////////////////////////////////////////////////////////////////////// // Private: BuildTree3() // Params: BinTriTree: actually a node, but hey. // float, float: right vertex // float, float: left vertex // float, float: apex vertex // Side effects: BinTriTree is built. // ctreedepth changes by only relevant to recursion. //////////////////////////////////////////////////////////////////////////// void Terrain::BuildTree3(BinTriTree *tri, float x1, float z1, float x2, float z2, float x3, float z3) { // get our split point float zh = (z1 + z2) / 2; float xh = (x1 + x2) / 2; float variance; // Are we the lowest triangle in tree if (ctreedepth < 1) return; int cullstate = TriCull2D(x1, z1, x2, z2, x3, z3); // Are we in view fustrum? if (cullstate == 2) return; variance = ((float)cvarianceTree[tri->leaf]) / abs(zh); // AOI calculation float d = ((aoipos[0] - xh) * (aoipos[0] - xh) + (aoipos[2] - zh) * (aoipos[2] - zh)); if (d < range) { // Scale the variance variance = variance * (1 + ((range - d) * invrange)); } if ( variance > varthreshold) { // Split triangle float t = variance - varthreshold; if (t < MORPH_RANGE) { // Geomorphing tri->morph = t / MORPH_RANGE; } else { tri->morph = 1.0f; } if (tri->leftChild == 0 && tri->rightChild == 0) { // Has not been split, so split it Split(tri); } ctreedepth--; if (cullstate == 1) { // Triangle totally inside view fustrum BuildTree2(tri->rightChild, x2, z2, x3, z3, xh, zh); BuildTree2(tri->leftChild, x3, z3, x1, z1, xh, zh); } else { // Needs further checking BuildTree3(tri->rightChild, x2, z2, x3, z3, xh, zh); BuildTree3(tri->leftChild, x3, z3, x1, z1, xh, zh); } ctreedepth++; } } //////////////////////////////////////////////////////////////////////////// // Private: BuildTree2() // Params: BinTriTree: actually a node, but hey. // float, float: right vertex // float, float: left vertex // float, float: apex vertex // Side effects: BinTriTree is built. // ctreedepth changes by only relevant to recursion. //////////////////////////////////////////////////////////////////////////// void Terrain::BuildTree2(BinTriTree *tri, float x1, float z1, float x2, float z2, float x3, float z3) { // get our split point float zh = (z1 + z2) / 2; float xh = (x1 + x2) / 2; float variance; // Are we the lowest triangle in tree if (ctreedepth < 1) return; variance = ((float)cvarianceTree[tri->leaf]) / abs(zh); // AOI calculation float d = ((aoipos[0] - xh) * (aoipos[0] - xh) + (aoipos[2] - zh) * (aoipos[2] - zh)); if (d < range) { // Scale the variance variance = variance * (1 + ((range - d) * invrange)); } if ( variance > varthreshold) { // Split triangle float t = variance - varthreshold; if (t < MORPH_RANGE) { // Geomorphing tri->morph = t / MORPH_RANGE; } else { tri->morph = 1.0; } if (tri->leftChild == 0 && tri->rightChild == 0) { // Has not been split, so split it Split(tri); } ctreedepth--; BuildTree2(tri->rightChild, x2, z2, x3, z3, xh, zh); BuildTree2(tri->leftChild, x3, z3, x1, z1, xh, zh); ctreedepth++; } } //////////////////////////////////////////////////////////////////////////// // Private: Split() // Params: BinTriTree: triangle to be split. // // Side effects: BinTriTree is split the mesh kept coherent. //////////////////////////////////////////////////////////////////////////// void Terrain::Split(BinTriTree *tri) { if (tri->bottomNeighbour != 0) { if (tri->bottomNeighbour->bottomNeighbour != tri) { Split(tri->bottomNeighbour); } Split2(tri); Split2(tri->bottomNeighbour); tri->leftChild->rightNeighbour = tri->bottomNeighbour->rightChild; tri->rightChild->leftNeighbour = tri->bottomNeighbour->leftChild; tri->bottomNeighbour->leftChild->rightNeighbour = tri->rightChild; tri->bottomNeighbour->rightChild->leftNeighbour = tri->leftChild; } else { Split2(tri); tri->leftChild->rightNeighbour = 0; tri->rightChild->leftNeighbour = 0; } } //////////////////////////////////////////////////////////////////////////// // Private: Split2() // Params: BinTriTree: triangle to be split. // // Side effects: BinTriTree is split. //////////////////////////////////////////////////////////////////////////// void Terrain::Split2(BinTriTree *tri) { tri->leftChild = &bintritree[nextfreebintree++]; tri->rightChild = &bintritree[nextfreebintree++]; tri->leftChild->leaf = tri->leaf * 2; tri->rightChild->leaf = (tri->leaf * 2) + 1; tri->leftChild->morph = 0; tri->rightChild->morph = 0; tri->leftChild->leftNeighbour = tri->rightChild; tri->rightChild->rightNeighbour = tri->leftChild; tri->leftChild->bottomNeighbour = tri->leftNeighbour; if (tri->leftNeighbour != 0) { if (tri->leftNeighbour->bottomNeighbour == tri) { tri->leftNeighbour->bottomNeighbour = tri->leftChild; } else { if (tri->leftNeighbour->leftNeighbour == tri) { tri->leftNeighbour->leftNeighbour = tri->leftChild; } else { tri->leftNeighbour->rightNeighbour = tri->leftChild; } } } tri->rightChild->bottomNeighbour = tri->rightNeighbour; if (tri->rightNeighbour != 0) { if (tri->rightNeighbour->bottomNeighbour == tri) { tri->rightNeighbour->bottomNeighbour = tri->rightChild; } else { if (tri->rightNeighbour->rightNeighbour == tri) { tri->rightNeighbour->rightNeighbour = tri->rightChild; } else { tri->rightNeighbour->leftNeighbour = tri->rightChild; } } } tri->leftChild->leftChild = 0; tri->leftChild->rightChild = 0; tri->rightChild->leftChild = 0; tri->rightChild->rightChild = 0; tricount++; } //////////////////////////////////////////////////////////////////////////// // Private: insideTri() // Params: float, float: left vertex of triangle. // float, float: right vertex of triangle. // float, float: apex of triangle. // float, float: point tob checked. // Return: Is point inside triangle. // Side effects: None. //////////////////////////////////////////////////////////////////////////// inline bool Terrain::insideTri(float x1, float y1, float x2, float y2, float x3, float y3, float a, float b) { //FIXME: faster(?) if you get orientation of 1,2,ab and 1,3,ab float d; float c; c = ((x2 - x1) * y1) - ((y2 - y1) * x1); d = (((x2 - x1) * b) - ((y2 - y1) * a)) - c; if (d > 0) return false; c = ((x3 - x2) * y2) - ((y3 - y2) * x2); d = (((x3 - x2) * b) - ((y3 - y2) * a)) - c; if (d > 0) return false; c = ((x1 - x3) * y3) - ((y1 - y3) * x3); d = (((x1 - x3) * b) - ((y1 - y3) * a)) - c; if (d > 0) return false; return true; } //////////////////////////////////////////////////////////////////////////// // Private: CalcVarianceTree() // // Side effects: Built variance tree. varianceTree1 and varianceTree2 //////////////////////////////////////////////////////////////////////////// void Terrain::CalcVarianceTree() { int v; varianceTree1 = new UINT8[256*256*2]; varianceTree2 = new UINT8[256*256*2]; // a level more than this makes no sence... i think... maxtreedepth = 15; ctreedepth = 0; cvarianceTree = varianceTree1; v = CalcVarianceTreeTM(0, 0, height, width, 0, width, 1); Log::printf(L"max variance: %d.", v); cvarianceTree = varianceTree2; v = CalcVarianceTreeTM(height, width, 0, 0, height, 0, 1); Log::printf(L"max variance: %d.", v); } //////////////////////////////////////////////////////////////////////////// // Private: CalcVarianceTreeTM() // Params: UINT16, UINT16: right vertex // UINT16, UINT16: left vertex // UINT16, UINT16: apex vertex // int: leaf number in variance tree. // Return: variance of leaf. //////////////////////////////////////////////////////////////////////////// int Terrain::CalcVarianceTreeTM(UINT16 x1, UINT16 y1, UINT16 x2, UINT16 y2, UINT16 x3, UINT16 y3, int leaf) { int hx = (x1 + x2) / 2; int hy = (y1 + y2) / 2; int realHeight = getHeight(hx, hy); int avgHeight = (getHeight(x1, y1) + getHeight(x2, y2)) / 2; int v = abs(realHeight - avgHeight); //stop recursion when grid size is less than 1 if (ctreedepth < 14) { ctreedepth++; int v1 = CalcVarianceTreeTM(x2, y2, x3, y3, hx, hy, leaf * 2); if (v1 > v) v = v1; ctreedepth++; v1 = CalcVarianceTreeTM(x3, y3, x1, y1, hx, hy, (leaf * 2) + 1); if (v1 > v) v = v1; } else if (ctreedepth < maxtreedepth) { ctreedepth++; int v1 = CalcVarianceTree((float)x2, (float)y2, (float)x3, (float)y3, (float)hx, (float)hy, leaf * 2); if (v1 > v) v = v1; ctreedepth++; v1 = CalcVarianceTree((float)x3, (float)y3, (float)x1, (float)y1, (float)hx, (float)hy, (leaf * 2) + 1); if (v1 > v) v = v1; } ctreedepth--; cvarianceTree[leaf] = (UINT8)v; return v; } //////////////////////////////////////////////////////////////////////////// // Private: CalcVarianceTree() // Params: float, float: right vertex // float, float: left vertex // float, float: apex vertex // int: leaf number in variance tree. // Return: variance of leaf. // Comments: used for small triagles - greater accuracy //////////////////////////////////////////////////////////////////////////// int Terrain::CalcVarianceTree(float x1, float y1, float x2, float y2, float x3, float y3, int leaf) { Vector v1; Vector v2; Vector v3; Vector normal; float hx = (x1 + x2) / 2; float hy = (y1 + y2) / 2; float realHeight = (float)getHeight((UINT16)hx, (UINT16)hy); float avgHeight = (getHeight((UINT16)x1, (UINT16)y1) + getHeight((UINT16)x2, (UINT16)y2)) / 2.0f; float v = abs(realHeight - avgHeight); v1[0] = x1; v1[1] = getHeight((UINT16)x1, (UINT16)y1) * 0.1f; v1[2] = y1; v2[0] = x2; v2[1] = getHeight((UINT16)x2, (UINT16)y2) * 0.1f; v2[2] = y2; v3[0] = x3; v3[1] = getHeight((UINT16)x3, (UINT16)y3) * 0.1f; v3[2] = y3; getPlaneNormal(v1, v2, v3, normal); normal[1] = abs(normal[1]); normal[1] += (1 - normal[1]) / 2; v = v * abs(normal[1]); //stop recursion when grid size is less than 1; if (ctreedepth < maxtreedepth) { ctreedepth++; float v1 = (float) CalcVarianceTree((float)x2, (float)y2, (float)x3, (float)y3, (float)hx, (float)hy, leaf * 2); if (v1 > v) v = v1; ctreedepth++; v1 = (float) CalcVarianceTree((float)x3, (float)y3, (float)x1, (float)y1, (float)hx, (float)hy, (leaf * 2) + 1); if (v1 > v) v = v1; } ctreedepth--; cvarianceTree[leaf] = (UINT8)v; return (int)v; } //////////////////////////////////////////////////////////////////////////// // Private: getHeight() // Params: UINT16, UINT16: location on terrain // Return: height value // Comments: wraps. //////////////////////////////////////////////////////////////////////////// inline int Terrain::getHeight(UINT16 x, UINT16 y) { x = x & 255; y = y & 255; return (int)heightmap[x+(y*256)]; } //////////////////////////////////////////////////////////////////////////// // Private: getColor() // Params: UINT16, UINT16: location on terrain // Return: colour value // Comments: wraps. //////////////////////////////////////////////////////////////////////////// inline int Terrain::getColor(UINT16 x, UINT16 y) { x = x & 255; y = y & 255; return (int)colormap[x+(y*256)]; } //////////////////////////////////////////////////////////////////////////// // Private: TriCull2D() // Params: float, float: right vertex of triangle // float, float: left vertex of triangle // float, float: apex vertex of triangle // Comments: the triangle is previously rotated, fov is 90, and in 2d // Return: 1 if fully inside. // 2 if fully outside. // 0 if partly inside. //////////////////////////////////////////////////////////////////////////// inline int Terrain::TriCull2D(float x1, float y1, float x2, float y2, float x3, float y3) { int a = PointCull2D(x1, y1); int b = PointCull2D(x2, y2); int c = PointCull2D(x3, y3); //if fully inside if (a == 0 && b == 0 && c == 0) return 1; // if partly inside if (a == 0 || b == 0 || c == 0) return 0; if (LineCull2D(a, b, x1, y1, x2, y2)) return 0; if (LineCull2D(b, c, x2, y2, x3, y3)) return 0; if (LineCull2D(c, a, x3, y3, x1, y1)) return 0; // else tri outside view return 2; } //////////////////////////////////////////////////////////////////////////// // Private: LineCull2D(); // Params: ini, int: values from point cull, related to the other params // float, float: start of line // float, float: end of line // Return: 1 if inside or maybe inside(!) // 0 if outside. //////////////////////////////////////////////////////////////////////////// inline int Terrain::LineCull2D(int a, int b, float x1, float y1, float x2, float y2) { // behind if ((a&b) == 4) return 0; // infront and oppisite if ((a | b) == 3) return 1; if ((a + b) == 7) return 1; // need more checks... else return 0; } //////////////////////////////////////////////////////////////////////////// // Private: PointCull2D() // // Is point in view fustrum? //////////////////////////////////////////////////////////////////////////// inline int Terrain::PointCull2D(float x, float y) { // if behind camera if (y < camznear) { // if to the left if ((y - camznear) < x) { return 5; } // if to the right if ((y - camznear) < -x) { return 6; } return 4; } else { // if to the left if ((y - camznear) < x) { return 1; } // if to the right if ((y - camznear) < -x) { return 2; } // else point inside so.. return 0; } } //////////////////////////////////////////////////////////////////////////// // Private: Collision() // // Comments: 'Slide' collision is done. //////////////////////////////////////////////////////////////////////////// int Terrain::Collision(Vector oldpos, Vector pos, Vector newpos) { Vector diff, normal, v1, v2, v3; int x = (int)oldpos[0] + 128; int y = (int)oldpos[2] + 128; newpos[0] = pos[0]; newpos[1] = pos[1]; newpos[2] = pos[2]; if ((x < 0) || (x > 254) || (y < 0) || (y > 254)) return 0; if ( (pos[0] - (x - 128)) < (pos[2] - (y - 128)) ) { v1[0] = x - 128.0f; v1[1] = getHeight(x, y) * 0.1f; v1[2] = y - 128.0f; v2[0] = x - 127.0f; v2[1] = getHeight(x + 1, y + 1) * 0.1f; v2[2] = y - 127.0f; v3[0] = x - 127.0f; v3[1] = getHeight(x + 1, y) * 0.1f; v3[2] = y - 128.0f; } else { v1[0] = x - 128.0f; v1[1] = getHeight(x, y) * 0.1f; v1[2] = y - 128.0f; v2[0] = x - 128.0f; v2[1] = getHeight(x, y + 1) * 0.1f; v2[2] = y - 127.0f; v3[0] = x - 127.0f; v3[1] = getHeight(x + 1, y + 1) * 0.1f; v3[2] = y - 127.0f; } getPlaneNormal(v1, v2, v3, normal); subtractVector(pos, v1, diff); float d = scalerProduct(normal, diff); if (d < 1.2f) { newpos[0] -= normal[0] * (d - 1.2f); newpos[1] -= normal[1] * (d - 1.2f); newpos[2] -= normal[2] * (d - 1.2f); } return -1; } //////////////////////////////////////////////////////////////////////////// // Private: CalcLight() // // Comments: Cacluates a lightmap for the texture. // The light is at infinity. //////////////////////////////////////////////////////////////////////////// void Terrain::CalcLight() { float d, d1, d2; Vector light, normal, v1, v2, v3; light[0] = 0.7f; light[1] = 0.5f; light[2] = -0.5f; colormap = new UINT8[256*256]; for (int y = 0; y < 256; y++) { for (int x = 0; x < 256; x += 1) { v1[0] = x - 128.0f; v1[1] = getHeight(x, y) * 0.1f; v1[2] = y - 128.0f; v2[0] = x - 127.0f; v2[1] = getHeight(x + 1, y + 1) * 0.1f; v2[2] = y - 127.0f; v3[0] = x - 127.0f; v3[1] = getHeight(x + 1, y) * 0.1f; v3[2] = y - 128.0f; getPlaneNormal(v1, v2, v3, normal); d1 = scalerProduct(normal, light); v1[0] = x - 128.0f; v1[1] = getHeight(x, y) * 0.1f; v1[2] = y - 128.0f; v2[0] = x - 128.0f; v2[1] = getHeight(x, y + 1) * 0.1f; v2[2] = y - 127.0f; v3[0] = x - 127.0f; v3[1] = getHeight(x + 1, y + 1) * 0.1f; v3[2] = y - 127.0f; getPlaneNormal(v1, v2, v3, normal); d2 = scalerProduct(normal, light); d = (d1 + d2) / 2; if (d > 0.2f) { colormap[(y*256)+x] = (UINT8)(d * 255.0f); } else { colormap[(y*256)+x] = (UINT8)(0.2f * 255.0f); } } } } //////////////////////////////////////////////////////////////////////////// // Private: CalcTexture() // // Comments: Generates a texture for the terrain. //////////////////////////////////////////////////////////////////////////// void Terrain::CalcTexture() { texturemap = new UINT8[256*256*3]; for (int y = 0; y < 256; y++) { for (int x = 0; x < 256; x++) { if (getHeight(x, y) == 0) { texturemap[((y*256)+x)*3] = 0; texturemap[(((y*256)+x)*3)+1] = 100; texturemap[(((y*256)+x)*3)+2] = 180; } else { texturemap[((y*256)+x)*3] = 32; texturemap[(((y*256)+x)*3)+1] = getColor(x, y); texturemap[(((y*256)+x)*3)+2] = getHeight(x, y); } } } glGenTextures(1, &gltexture); glBindTexture(GL_TEXTURE_2D, gltexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, 3, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, texturemap); } //////////////////////////////////////////////////////////////////////////// // Private: CalcAreaOfInterest() // // Comments: Calculates where the viewer is looking on the terrain. //////////////////////////////////////////////////////////////////////////// void Terrain::CalcAreaOfInterest(Viewer *viewer) { aoipos[0] = viewer->pos[0] + 128; aoipos[1] = viewer->pos[1]; aoipos[2] = viewer->pos[2] + 128; aoi = false; placename = "Void"; if (aoipos[1] > 25.6f) { if (viewer->aoidir[1] >= 0.0f) return; float s = (aoipos[1] - 25.6f) / viewer->aoidir[1]; aoipos[0] -= s * viewer->aoidir[0]; aoipos[1] -= s * viewer->aoidir[1]; aoipos[2] -= s * viewer->aoidir[2]; } else if (aoipos[1] < 0.0f) { if (viewer->aoidir[1] < 0.0f) return; float s = (aoipos[1]) / viewer->aoidir[1]; aoipos[0] -= s * viewer->aoidir[0]; aoipos[1] -= s * viewer->aoidir[1]; aoipos[2] -= s * viewer->aoidir[2]; } bool bDone = false; while (!bDone) { if (aoipos[0] < 0 && viewer->aoidir[0] < 0) { return; } if (aoipos[0] > 256 && viewer->aoidir[0] > 0) { return; } if (aoipos[2] < 0 && viewer->aoidir[2] < 0) { return; } if (aoipos[2] > 256 && viewer->aoidir[2] > 0) { return; } if (aoipos[1] < (getHeight((UINT16)aoipos[0], (UINT16)aoipos[2]) / 10)) { bDone = true; break; } aoipos[0] += viewer->aoidir[0]; aoipos[1] += viewer->aoidir[1]; aoipos[2] += viewer->aoidir[2]; } placename = location.getPlaceName((int)aoipos[0], 255 - (int)aoipos[2]); aoipos[0] += -128; aoipos[1] += 0; aoipos[2] += -128; viewer->aoipos[0] = aoipos[0]; viewer->aoipos[1] = aoipos[1]; viewer->aoipos[2] = aoipos[2]; range = sqrt(((aoipos[0] - viewer->pos[0]) * (aoipos[0] - viewer->pos[0])) + ((aoipos[1] - viewer->pos[1]) * (aoipos[1] - viewer->pos[1])) + ((aoipos[2] - viewer->pos[2]) * (aoipos[2] - viewer->pos[2]))); range = range * 10; invrange = 3 / range; aoi = true; }
[ "watsonmw@gmail.com" ]
watsonmw@gmail.com
5dcfe57f8b3cda88ba78e70bd1fb51130dfb23a6
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
/NT/multimedia/dshow/filters/dv/dvenc/encprop.cpp
8457e8c68b93c86b993935d3abeecb3c6f954395
[]
no_license
jjzhang166/WinNT5_src_20201004
712894fcf94fb82c49e5cd09d719da00740e0436
b2db264153b80fbb91ef5fc9f57b387e223dbfc2
refs/heads/Win2K3
2023-08-12T01:31:59.670176
2021-10-14T15:14:37
2021-10-14T15:14:37
586,134,273
1
0
null
2023-01-07T03:47:45
2023-01-07T03:47:44
null
UTF-8
C++
false
false
4,595
cpp
//==========================================================================; // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR // PURPOSE. // // Copyright (c) 1992 - 1999 Microsoft Corporation. All Rights Reserved. // //--------------------------------------------------------------------------; #include <windows.h> #include <windowsx.h> #include <streams.h> #include <commctrl.h> #include <olectl.h> #include <memory.h> #include <stdlib.h> #include <stdio.h> #include <tchar.h> #include <dv.h> #include "EncProp.h" #include "resource.h" // // CreateInstance // // Used by the ActiveMovie base classes to create instances // CUnknown *CDVEncProperties::CreateInstance(LPUNKNOWN lpunk, HRESULT *phr) { CUnknown *punk = new CDVEncProperties(lpunk, phr); if (punk == NULL) { *phr = E_OUTOFMEMORY; } return punk; } // CreateInstance // // Constructor // CDVEncProperties::CDVEncProperties(LPUNKNOWN pUnk, HRESULT *phr) : CBasePropertyPage (NAME("DVenc Property Page"), pUnk,IDD_DVEnc,IDS_TITLE), m_pIDVEnc(NULL), m_bIsInitialized(FALSE) { ASSERT(phr); } // (Constructor) // // OnReceiveMessage // // Handles the messages for our property window // INT_PTR CDVEncProperties::OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_COMMAND: { if (m_bIsInitialized) { m_bDirty = TRUE; if (m_pPageSite) { m_pPageSite->OnStatusChange(PROPPAGESTATUS_DIRTY); } } return (LRESULT) 1; } } return CBasePropertyPage::OnReceiveMessage(hwnd,uMsg,wParam,lParam); } // OnReceiveMessage // // OnConnect // // Called when we connect to a transform filter // HRESULT CDVEncProperties::OnConnect(IUnknown *pUnknown) { ASSERT(m_pIDVEnc == NULL); HRESULT hr = pUnknown->QueryInterface(IID_IDVEnc, (void **) &m_pIDVEnc); if (FAILED(hr)) { return E_NOINTERFACE; } ASSERT(m_pIDVEnc); // Get the initial property m_pIDVEnc->get_IFormatResolution(&m_iPropVidFormat,&m_iPropDVFormat, &m_iPropResolution, FALSE, NULL); m_bIsInitialized = FALSE ; return NOERROR; } // OnConnect // // OnDisconnect // // Likewise called when we disconnect from a filter // HRESULT CDVEncProperties::OnDisconnect() { // Release of Interface after setting the appropriate old effect value if (m_pIDVEnc == NULL) { return E_UNEXPECTED; } m_pIDVEnc->Release(); m_pIDVEnc = NULL; return NOERROR; } // OnDisconnect // // OnActivate // // We are being activated // HRESULT CDVEncProperties::OnActivate() { //Button_Enable(hwndCtl, fEnable); CheckRadioButton(m_Dlg, IDC_NTSC, IDC_PAL, m_iPropVidFormat); CheckRadioButton(m_Dlg, IDC_dvsd, IDC_dvsl, m_iPropDVFormat); CheckRadioButton(m_Dlg, IDC_720x480, IDC_88x60, m_iPropResolution); m_bIsInitialized = TRUE; return NOERROR; } // OnActivate // // OnDeactivate // // We are being deactivated // HRESULT CDVEncProperties::OnDeactivate(void) { ASSERT(m_pIDVEnc); m_bIsInitialized = FALSE; GetControlValues(); return NOERROR; } // OnDeactivate // // OnApplyChanges // // Apply any changes so far made // HRESULT CDVEncProperties::OnApplyChanges() { GetControlValues(); return ( m_pIDVEnc->put_IFormatResolution(m_iPropVidFormat, m_iPropDVFormat, m_iPropResolution, FALSE, NULL ) ); } // OnApplyChanges void CDVEncProperties::GetControlValues() { int i; ASSERT(m_pIDVEnc); for (i = IDC_720x480; i <= IDC_88x60; i++) { if (IsDlgButtonChecked(m_Dlg, i)) { m_iPropResolution = i; break; } } for ( i = IDC_dvsd; i <= IDC_dvsl; i++) { if (IsDlgButtonChecked(m_hwnd, i)) { m_iPropDVFormat = i; break; } } for ( i = IDC_NTSC; i <= IDC_PAL; i++) { if (IsDlgButtonChecked(m_hwnd, i)){ m_iPropVidFormat = i; break; } } }
[ "seta7D5@protonmail.com" ]
seta7D5@protonmail.com
944c0218f95274c77b5f0f62dda22a61d1b35b6d
ec2560aaa143f1d6c7920f7ce426edc3590755a3
/src/main.cpp
bd4da616b0311d2c427a77bf01e560ab2c2966a4
[]
no_license
shionn/Lamp9900K
7ec37a5cee8c0980375e8192c1518e6843598329
2d4e679f1ef7ac142cf69d70622a96a9638fcf04
refs/heads/master
2022-10-20T15:47:57.435091
2020-07-26T16:41:54
2020-07-26T16:41:54
280,657,733
0
0
null
null
null
null
UTF-8
C++
false
false
2,499
cpp
#include <Arduino.h> #include <Adafruit_NeoPixel.h> #define PIXEL_COUNT 40 #define PIXEL_PIN 6 #define BUTTON 4 Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800); int mode = 0; int state = 0; int buttonState = 1; void setup() { strip.begin(); // Initialize NeoPixel strip object (REQUIRED) strip.show(); // Initialize all pixels to 'off' pinMode(BUTTON, INPUT_PULLUP); Serial.begin(9600); } uint32_t Wheel(byte WheelPos) { WheelPos = 255 - WheelPos; if(WheelPos < 85) { return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3); } if(WheelPos < 170) { WheelPos -= 85; return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3); } WheelPos -= 170; return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); } void displayColor(uint32_t color) { for(int i = 0; i < PIXEL_COUNT; i++) { strip.setPixelColor(i, color); } } void chenille(int step) { for(uint8_t i=0; i<PIXEL_COUNT; i++) { uint8_t d = (step + PIXEL_COUNT - i) % (PIXEL_COUNT); strip.setPixelColor(i, 255 >> d, 255 >> d, 255 >> d); } } void doubleChenille(int step) { for(uint8_t i=0; i<PIXEL_COUNT; i++) { uint8_t d = (step + PIXEL_COUNT - i) % (PIXEL_COUNT /2); strip.setPixelColor(i, 255 >> d, 255 >> d, 255 >> d); } } void randFlash(int state) { if (!state) { uint8_t pos = random(PIXEL_COUNT); for(uint8_t i=0; i<PIXEL_COUNT; i++) { if (pos == i && state == 0) { strip.setPixelColor(i,255,255,255); } else { uint32_t color = strip.getPixelColor(i); strip.setPixelColor(i, color >> 17 , (color & 0x0000ff00) >> 9, (color & 0x000000ff) >> 1); } } } } void loop() { int value = analogRead(A0); if (mode == 0) { displayColor(strip.Color(0,0,0)); } if (mode == 1) { uint8_t a = pow(2,value/128); displayColor(strip.Color(a,a,a)); } if (mode == 2) { displayColor(Wheel(value/8)); } if (mode == 3) { uint8_t a = pow(2,abs(map(state, 0, 1023, -8, 8))); displayColor(strip.Color(a,a,a)); } if (mode == 4) { chenille(map(state, 0, 1024, 0, 39)); } if (mode == 5) { doubleChenille(map(state, 0, 1024, 0, 39)); } if (mode == 6) { randFlash(state%8); } state += value/16 + 1; if ( state >= 1024) { state -= 1024; } strip.show(); delay(10); if (digitalRead(BUTTON) == 0 && buttonState) { mode++; if (mode == 7) { mode = 0; } } buttonState = digitalRead(BUTTON); }
[ "shionn@gmail.com" ]
shionn@gmail.com
116e141da1f82a0a8957bf1f433722efb4ef0ce1
107d79f2c1802a3ff66d300d5d1ab2d413bac375
/src/eepp/window/backend/SDL/cbackendsdl.hpp
b30e185f4a2bf0abd7a7704f612c134be24425cb
[ "MIT" ]
permissive
weimingtom/eepp
2030ab0b2a6231358f8433304f90611499b6461e
dd672ff0e108ae1e08449ca918dc144018fb4ba4
refs/heads/master
2021-01-10T01:36:39.879179
2014-06-02T02:46:33
2014-06-02T02:46:33
46,509,734
0
0
null
null
null
null
UTF-8
C++
false
false
412
hpp
#ifndef EE_WINDOWCBACKENDSDL_HPP #define EE_WINDOWCBACKENDSDL_HPP #include <eepp/window/cbackend.hpp> #include <eepp/window/backend/SDL/base.hpp> #ifdef EE_BACKEND_SDL_1_2 #include <eepp/window/backend/SDL/cwindowsdl.hpp> namespace EE { namespace Window { namespace Backend { namespace SDL { class EE_API cBackendSDL : public cBackend { public: cBackendSDL(); ~cBackendSDL(); }; }}}} #endif #endif
[ "spartanj@gmail.com" ]
spartanj@gmail.com
7386567c8ec7748c7634d8a503f5f871cbbb7f12
7a138fa71d3e08958d8443992e2d57d504bb593a
/peg/assignments/mirrored_pairs.cpp
f6f88493370492c1582720b1192b5481d6ecbfb2
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sustcoderboy/competitive-programming-archive
8a254e7542d9f616df73d8aaa9ca23d6242dec9b
2cd3237f376c609b7c4e87804e36a8cac7ec3402
refs/heads/master
2021-01-22T17:38:41.565826
2015-11-22T03:50:00
2015-11-22T03:50:00
46,705,756
1
0
null
2015-11-23T08:10:07
2015-11-23T08:10:07
null
UTF-8
C++
false
false
576
cpp
#include <iostream> #include <set> #include <string> using namespace std; const set<string> mirrored_pairs {"pq", "qp", "bd", "db"}; inline void use_io_optimizations() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { use_io_optimizations(); cout << "Ready\n"; for (string pair; getline(cin, pair) && pair != " "; ) { if (mirrored_pairs.count(pair)) { cout << "Mirrored"; } else { cout << "Ordinary"; } cout << " pair\n"; } return 0; }
[ "gsshopov@gmail.com" ]
gsshopov@gmail.com
c20f37b5ce449778437e336312c9d55232046da2
c5553524da92ea50ecdb4c735e4df645b2453963
/vol 115/p11565.cpp
4eac3b508fa36801e953889a711c32e0799e41a6
[]
no_license
hk-117/UVa_solves
d68720287f05e6e997ffe3b2924b4b7db05e914f
692be8a95f438cd107149186ac2f6a0df4728f5d
refs/heads/master
2023-04-16T16:46:55.112583
2023-04-12T06:42:58
2023-04-12T06:42:58
210,403,514
0
0
null
null
null
null
UTF-8
C++
false
false
776
cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; while(n--){ int A,B,C; cin>>A>>B>>C; bool solved=false; for(int x=-22;x<=22 && !solved;x++){ if(x*x <= C){ for(int y=-100;y<=100 && !solved;y++){ if(y!=x && x*x+y*y<=C){ for(int z=-100;z<=100 && !solved;z++){ if(z!=x && z!=y && x+y+z==A && x*y*z==B && x*x+y*y+z*z==C){ printf("%d %d %d\n",x,y,z); solved=true; } } } } } } if(!solved) printf("No solution.\n"); } }
[ "noreply@github.com" ]
hk-117.noreply@github.com
5b457fd284b8d4a5f7c80a1f2f680da1d1d0e3c3
9afbec90ab8a66ad58160f037e5f6a88d135608f
/src/compat/glibc_compat.cpp
d0817fb4f43368a5546a4276d9212fb4cd11e3d5
[]
no_license
campuscoindev/CC
8b96151e93562d33855b58723b96e5785cc72fcb
7d6f586e458558199c68e9d47fe36a416cc6a07b
refs/heads/master
2023-08-03T09:38:11.470626
2023-07-20T15:36:45
2023-07-20T15:36:45
165,657,914
7
4
null
null
null
null
UTF-8
C++
false
false
827
cpp
// Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/cc-config.h" #endif #include <cstddef> #if defined(HAVE_SYS_SELECT_H) #include <sys/select.h> #endif // Prior to GLIBC_2.14, memcpy was aliased to memmove. extern "C" void* memmove(void* a, const void* b, size_t c); extern "C" void* memcpy(void* a, const void* b, size_t c) { return memmove(a, b, c); } extern "C" void __chk_fail(void) __attribute__((__noreturn__)); extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a) { if (a >= FD_SETSIZE) __chk_fail(); return a / __NFDBITS; } extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
[ "webframes@gmail.com" ]
webframes@gmail.com
2d5ab229aa9e25afb5cc5b78ad06656459b99879
5cb82722442bb6e888f1cea59544d0d6fd01bf2f
/Source/Renderer/Public/Resource/Material/MaterialResource.cpp
6c145a61c8a68e048b912e298a440edce0ea931d
[ "MIT" ]
permissive
RobertoMalatesta/unrimp
d9a137c5041adcc5e8b9f075586effec70eda2c6
90310657f106eb83f3a9688329b78619255a1042
refs/heads/master
2023-07-28T08:31:36.699889
2021-09-09T18:24:26
2021-09-09T19:03:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
15,513
cpp
/*********************************************************\ * Copyright (c) 2012-2021 The Unrimp Team * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \*********************************************************/ //[-------------------------------------------------------] //[ Includes ] //[-------------------------------------------------------] #include "Renderer/Public/Resource/Material/MaterialResource.h" #include "Renderer/Public/Resource/Material/MaterialTechnique.h" #include "Renderer/Public/Resource/Material/MaterialResourceManager.h" #include "Renderer/Public/RenderQueue/RenderableManager.h" #include <algorithm> //[-------------------------------------------------------] //[ Anonymous detail namespace ] //[-------------------------------------------------------] namespace { namespace detail { //[-------------------------------------------------------] //[ Structures ] //[-------------------------------------------------------] struct OrderByMaterialResourceId final { [[nodiscard]] inline bool operator()(Renderer::MaterialResourceId left, Renderer::MaterialResourceId right) const { return (left < right); } }; struct OrderByMaterialTechniqueId final { [[nodiscard]] inline bool operator()(const Renderer::MaterialTechnique* left, Renderer::MaterialTechniqueId right) const { return (left->getMaterialTechniqueId() < right); } [[nodiscard]] inline bool operator()(Renderer::MaterialTechniqueId left, const Renderer::MaterialTechnique* right) const { return (left < right->getMaterialTechniqueId()); } }; //[-------------------------------------------------------] //[ Anonymous detail namespace ] //[-------------------------------------------------------] } // detail } //[-------------------------------------------------------] //[ Namespace ] //[-------------------------------------------------------] namespace Renderer { //[-------------------------------------------------------] //[ Public methods ] //[-------------------------------------------------------] Context& MaterialResource::getContext() const { return getResourceManager<MaterialResourceManager>().getRenderer().getContext(); } void MaterialResource::setParentMaterialResourceId(MaterialResourceId parentMaterialResourceId) { if (mParentMaterialResourceId != parentMaterialResourceId) { const MaterialResourceId materialResourceId = getId(); // Destroy all material techniques destroyAllMaterialTechniques(); // Unregister from previous parent material resource const MaterialResourceManager& materialResourceManager = getResourceManager<MaterialResourceManager>(); if (isValid(mParentMaterialResourceId)) { MaterialResource& parentMaterialResource = materialResourceManager.getById(mParentMaterialResourceId); SortedChildMaterialResourceIds::const_iterator iterator = std::lower_bound(parentMaterialResource.mSortedChildMaterialResourceIds.cbegin(), parentMaterialResource.mSortedChildMaterialResourceIds.cend(), materialResourceId, ::detail::OrderByMaterialResourceId()); RHI_ASSERT(getContext(), iterator != parentMaterialResource.mSortedChildMaterialResourceIds.end() && *iterator == materialResourceId, "Invalid material resource ID") parentMaterialResource.mSortedChildMaterialResourceIds.erase(iterator); } // Set new parent material resource ID mParentMaterialResourceId = parentMaterialResourceId; if (isValid(mParentMaterialResourceId)) { // Register to new parent material resource MaterialResource& parentMaterialResource = materialResourceManager.getById(mParentMaterialResourceId); RHI_ASSERT(getContext(), parentMaterialResource.getLoadingState() == IResource::LoadingState::LOADED, "Invalid parent material resource loading state") SortedChildMaterialResourceIds::const_iterator iterator = std::lower_bound(parentMaterialResource.mSortedChildMaterialResourceIds.cbegin(), parentMaterialResource.mSortedChildMaterialResourceIds.cend(), materialResourceId, ::detail::OrderByMaterialResourceId()); RHI_ASSERT(getContext(), iterator == parentMaterialResource.mSortedChildMaterialResourceIds.end() || *iterator != materialResourceId, "Invalid material resource ID") parentMaterialResource.mSortedChildMaterialResourceIds.insert(iterator, materialResourceId); // Setup material resource setAssetId(parentMaterialResource.getAssetId()); mMaterialProperties = parentMaterialResource.mMaterialProperties; for (MaterialTechnique* materialTechnique : parentMaterialResource.mSortedMaterialTechniqueVector) { mSortedMaterialTechniqueVector.push_back(new MaterialTechnique(materialTechnique->getMaterialTechniqueId(), *this, materialTechnique->getMaterialBlueprintResourceId())); } } else { // Don't touch the child material resources, but reset everything else mMaterialProperties.removeAllProperties(); } } } MaterialTechnique* MaterialResource::getMaterialTechniqueById(MaterialTechniqueId materialTechniqueId) const { SortedMaterialTechniqueVector::const_iterator iterator = std::lower_bound(mSortedMaterialTechniqueVector.cbegin(), mSortedMaterialTechniqueVector.cend(), materialTechniqueId, ::detail::OrderByMaterialTechniqueId()); return (iterator != mSortedMaterialTechniqueVector.end() && (*iterator)->getMaterialTechniqueId() == materialTechniqueId) ? *iterator : nullptr; } void MaterialResource::destroyAllMaterialTechniques() { for (MaterialTechnique* materialTechnique : mSortedMaterialTechniqueVector) { delete materialTechnique; } mSortedMaterialTechniqueVector.clear(); } void MaterialResource::releaseTextures() { // TODO(co) Cleanup for (MaterialTechnique* materialTechnique : mSortedMaterialTechniqueVector) { materialTechnique->clearTextures(); } } //[-------------------------------------------------------] //[ Private methods ] //[-------------------------------------------------------] MaterialResource::~MaterialResource() { // Sanity checks RHI_ASSERT(getContext(), isInvalid(mParentMaterialResourceId), "Invalid parent material resource ID") RHI_ASSERT(getContext(), mSortedChildMaterialResourceIds.empty(), "Invalid sorted child material resource IDs") RHI_ASSERT(getContext(), mSortedMaterialTechniqueVector.empty(), "Invalid sorted material technique vector") RHI_ASSERT(getContext(), mMaterialProperties.getSortedPropertyVector().empty(), "Invalid material properties") RHI_ASSERT(getContext(), mAttachedRenderables.empty(), "Invalid attached renderables") // Avoid crash in case of failed sanity check while (!mAttachedRenderables.empty()) { mAttachedRenderables[0]->unsetMaterialResourceId(); } } MaterialResource& MaterialResource::operator=(MaterialResource&& materialResource) { // Call base implementation IResource::operator=(std::move(materialResource)); // Swap data // -> Lucky us that we're usually not referencing by using raw-pointers, so a simple swap does the trick std::swap(mParentMaterialResourceId, materialResource.mParentMaterialResourceId); std::swap(mSortedChildMaterialResourceIds, materialResource.mSortedChildMaterialResourceIds); std::swap(mSortedMaterialTechniqueVector, materialResource.mSortedMaterialTechniqueVector); std::swap(mMaterialProperties, materialResource.mMaterialProperties); std::swap(mAttachedRenderables, materialResource.mAttachedRenderables); // Done return *this; } void MaterialResource::deinitializeElement() { // Sanity check RHI_ASSERT(getContext(), mAttachedRenderables.empty(), "Invalid attached renderables") // Avoid crash in case of failed sanity check while (!mAttachedRenderables.empty()) { mAttachedRenderables[0]->unsetMaterialResourceId(); } // Unset parent material resource ID setParentMaterialResourceId(getInvalid<MaterialResourceId>()); // Inform child material resources, if required if (!mSortedChildMaterialResourceIds.empty()) { const MaterialResourceManager& materialResourceManager = static_cast<MaterialResourceManager&>(getResourceManager()); while (!mSortedChildMaterialResourceIds.empty()) { const MaterialResourceId materialResourceId = mSortedChildMaterialResourceIds.front(); materialResourceManager.getById(materialResourceId).setParentMaterialResourceId(getInvalid<MaterialResourceId>()); } mSortedChildMaterialResourceIds.clear(); } // Cleanup destroyAllMaterialTechniques(); mMaterialProperties.removeAllProperties(); // Call base implementation IResource::deinitializeElement(); } bool MaterialResource::setPropertyByIdInternal(MaterialPropertyId materialPropertyId, const MaterialPropertyValue& materialPropertyValue, MaterialProperty::Usage materialPropertyUsage, bool changeOverwrittenState) { // Call the base implementation MaterialProperty* materialProperty = mMaterialProperties.setPropertyById(materialPropertyId, materialPropertyValue, materialPropertyUsage, changeOverwrittenState); if (nullptr != materialProperty) { // Perform derived work, if required to do so switch (materialProperty->getUsage()) { case MaterialProperty::Usage::SHADER_UNIFORM: for (MaterialTechnique* materialTechnique : mSortedMaterialTechniqueVector) { materialTechnique->scheduleForShaderUniformUpdate(); } break; case MaterialProperty::Usage::SHADER_COMBINATION: // Handled by "Renderer::MaterialProperties::setPropertyById()" break; case MaterialProperty::Usage::RASTERIZER_STATE: case MaterialProperty::Usage::DEPTH_STENCIL_STATE: case MaterialProperty::Usage::BLEND_STATE: // TODO(co) Optimization: The calculation of the FNV1a hash of "Rhi::SerializedGraphicsPipelineState" is pretty fast, but maybe it makes sense to schedule the calculation in case many material properties are changed in a row? for (MaterialTechnique* materialTechnique : mSortedMaterialTechniqueVector) { materialTechnique->calculateSerializedGraphicsPipelineStateHash(); } break; case MaterialProperty::Usage::TEXTURE_REFERENCE: for (MaterialTechnique* materialTechnique : mSortedMaterialTechniqueVector) { materialTechnique->clearTextures(); } break; case MaterialProperty::Usage::STATIC: // Initial cached material data gathering is performed inside "Renderer::Renderable::setMaterialResourceId()" // Optional "RenderQueueIndex" (e.g. compositor materials usually don't need this property) if (RENDER_QUEUE_INDEX_PROPERTY_ID == materialPropertyId) { const int renderQueueIndex = materialProperty->getIntegerValue(); // Sanity checks RHI_ASSERT(getContext(), renderQueueIndex >= 0, "Invalid render queue index") RHI_ASSERT(getContext(), renderQueueIndex <= 255, "Invalid render queue index") // Update the cached material data of all attached renderables for (Renderable* renderable : mAttachedRenderables) { renderable->mRenderQueueIndex = static_cast<uint8_t>(renderQueueIndex); // In here we don't care about the fact that one and the same renderable manager instance might // update cached renderables data. It's not performance critical in here and resolving this will // require additional logic which itself has an performance impact. So keep it simple. renderable->getRenderableManager().updateCachedRenderablesData(); } } // Optional "CastShadows" (e.g. compositor materials usually don't need this property) else if (CAST_SHADOWS_PROPERTY_ID == materialPropertyId) { // Update the cached material data of all attached renderables const bool castShadows = materialProperty->getBooleanValue(); for (Renderable* renderable : mAttachedRenderables) { renderable->mCastShadows = castShadows; // In here we don't care about the fact that one and the same renderable manager instance might // update cached renderables data. It's not performance critical in here and resolving this will // require additional logic which itself has an performance impact. So keep it simple. renderable->getRenderableManager().updateCachedRenderablesData(); } } // Optional "UseAlphaMap" else if (USE_ALPHA_MAP_PROPERTY_ID == materialPropertyId) { // Update the cached material data of all attached renderables const bool useAlphaMap = materialProperty->getBooleanValue(); for (Renderable* renderable : mAttachedRenderables) { renderable->mUseAlphaMap = useAlphaMap; // In here we don't care about the fact that one and the same renderable manager instance might // update cached renderables data. It's not performance critical in here and resolving this will // require additional logic which itself has an performance impact. So keep it simple. renderable->getRenderableManager().updateCachedRenderablesData(); } } break; case MaterialProperty::Usage::UNKNOWN: case MaterialProperty::Usage::SAMPLER_STATE: case MaterialProperty::Usage::GLOBAL_REFERENCE: case MaterialProperty::Usage::UNKNOWN_REFERENCE: case MaterialProperty::Usage::PASS_REFERENCE: case MaterialProperty::Usage::MATERIAL_REFERENCE: case MaterialProperty::Usage::INSTANCE_REFERENCE: case MaterialProperty::Usage::GLOBAL_REFERENCE_FALLBACK: default: // Nothing here break; } // Inform child material resources, if required const MaterialResourceManager& materialResourceManager = static_cast<MaterialResourceManager&>(getResourceManager()); for (MaterialResourceId materialResourceId : mSortedChildMaterialResourceIds) { materialResourceManager.getById(materialResourceId).setPropertyByIdInternal(materialPropertyId, materialPropertyValue, materialPropertyUsage, false); } // Material property change detected return true; } // No material property change detected return false; } //[-------------------------------------------------------] //[ Namespace ] //[-------------------------------------------------------] } // Renderer
[ "cofenberg@gmail.com" ]
cofenberg@gmail.com
44f5d6893236a1fb6ff716204a4dfe521cd9b3ed
5838cf8f133a62df151ed12a5f928a43c11772ed
/NT/inetsrv/iis/config/src/core/catutil/precomp.hxx
e171741e5158679bf57dc3cad5495c959f08b998
[]
no_license
proaholic/Win2K3
e5e17b2262f8a2e9590d3fd7a201da19771eb132
572f0250d5825e7b80920b6610c22c5b9baaa3aa
refs/heads/master
2023-07-09T06:15:54.474432
2021-08-11T09:09:14
2021-08-11T09:09:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,727
hxx
/*++ Copyright (c) 1996 Microsoft Corporation Module Name: precomp.hxx Abstract: Master include file for the schemagen Author: Ivan Pashov (IvanPash) 02-Apr-2002 Revision History: --*/ #pragma once #include <windows.h> #include <stdio.h> #include <olectl.h> #include <xmlparser.h> #include <iiscnfg.h> #include <catalog.h> #include <catmeta.h> #include <CoreMacros.h> #define _ATL_NO_DEBUG_CRT #define ATLASSERT(expr) ASSERT(expr) #include <atlbase.h> #include <safecs.h> #include <Hash.h> #include <MetaTableStructs.h> #include <FixedTableHeap.h> #include <TableSchema.h> #include <SmartPointer.h> #include <TMSXMLBase.h> #include <TFileMapping.h> #include <Unknown.hxx> #include <TXmlParsedFile.h> #include <wstring.h> #include "..\schemagen\XMLUtility.h" #include "..\schemagen\Output.h" #include "..\schemagen\TException.h" #include "..\schemagen\THeap.h" #include "..\schemagen\TPEFixup.h" #include "..\schemagen\TFixupHeaps.h" #include "..\schemagen\TIndexMeta.h" #include "..\schemagen\TTagMeta.h" #include "..\schemagen\TColumnMeta.h" #include "..\schemagen\TRelationMeta.h" #include "TXmlFile.h" #include "..\schemagen\ICompilationPlugin.h" #include "..\schemagen\TTableMeta.h" #include "..\schemagen\TFixedTableHeapBuilder.h" #include "TSchemaGeneration.h" #include "..\schemagen\TCom.h" #include "..\schemagen\TFile.h" #include "..\schemagen\THashedUniqueIndexes.h" #include "TTableInfoGeneration.h" #include "TComCatMetaXmlFile.h" #include "TFixupDLL.h" #include "TComCatDataXmlFile.h" #include "TPopulateTableSchema.h" #include "..\schemagen\TDatabaseMeta.h" #include "..\schemagen\TMetaInferrence.h" #include "..\schemagen\THashedPKIndexes.h" #include "TLateSchemaValidate.h"
[ "blindtiger@foxmail.com" ]
blindtiger@foxmail.com
cf7f539047488e3056324559d2ca21c0b801fcaa
2ddc2dbf5340a56d7a9edf969ff430edf0461326
/Triangle Types_1045.cpp
c507e458be374b99e7bc8757ff797a215c5c76dc
[]
no_license
babu12f/uri_problem_solved
791df063744bf4319014779f68d9264f5bb6461f
768c6f4ed7a31f361fba1843f1a5707b12476644
refs/heads/master
2021-05-08T07:13:03.025964
2017-10-16T18:08:59
2017-10-16T18:08:59
106,715,047
0
0
null
null
null
null
UTF-8
C++
false
false
935
cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <iomanip> #include <stdio.h> #include <functional> #define pf printf #define sf scanf using namespace std; int main() { double a, b, c, arr[3]; int i, j, n; cin>>arr[0]>>arr[1]>>arr[2]; sort(arr, arr+3, greater<double>()); a = arr[0]; b = arr[1]; c = arr[2]; if( a >= b+c ) cout<<"NAO FORMA TRIANGULO"<<endl; else if( ( a * a ) == ( b * b ) + ( c * c ) ) cout<<"TRIANGULO RETANGULO"<<endl; else if( ( a * a ) > ( b * b ) + ( c * c ) ) cout<<"TRIANGULO OBTUSANGULO"<<endl; else if( ( a * a ) < ( b * b ) + ( c * c ) ) cout<<"TRIANGULO ACUTANGULO"<<endl; if( a==b && a==c && b==c ) cout<<"TRIANGULO EQUILATERO"<<endl; else if( ( a==b && a != c ) || ( b==c && b != a ) || ( c==a && a != b ) ) cout<<"TRIANGULO ISOSCELES"<<endl; return 0; }
[ "babu_12f@yahoo.com" ]
babu_12f@yahoo.com
6b5f4339f3a738dfcc79194ea90f1b2ff8a2cd12
142620600b8fb59f3b38079e7703c28c55eeac65
/lib/Parallelization/Tasks/JunkDetectionTask.cpp
faa62198017a062f2d0d812fa25ba897cf668dcd
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
dmark1021/mull
289d7b17b93c3999e870297bbefc89fb49ffbd4a
0eac81abd7efaf2a793e6586a2d1c0c79271b388
refs/heads/master
2020-04-20T04:39:29.563988
2019-01-29T22:19:09
2019-01-29T22:19:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
566
cpp
#include "Parallelization/Tasks/JunkDetectionTask.h" #include "Parallelization/Progress.h" #include "JunkDetection/JunkDetector.h" using namespace mull; JunkDetectionTask::JunkDetectionTask(JunkDetector &detector) : detector(detector) {} void JunkDetectionTask::operator()(iterator begin, iterator end, Out &storage, progress_counter &counter) { for (auto it = begin; it != end; ++it, counter.increment()) { auto point = *it; if (detector.isJunk(point)) { continue; } storage.push_back(point); } }
[ "1101.debian@gmail.com" ]
1101.debian@gmail.com
281c70e7c2ca7a0d7271d91f467dba9ff9597b05
28dba754ddf8211d754dd4a6b0704bbedb2bd373
/Ural/P1277.cpp
d1d918f48d3aa712a21c2ec0db9d1a9e87e7593d
[]
no_license
zjsxzy/algo
599354679bd72ef20c724bb50b42fce65ceab76f
a84494969952f981bfdc38003f7269e5c80a142e
refs/heads/master
2023-08-31T17:00:53.393421
2023-08-19T14:20:31
2023-08-19T14:20:31
10,140,040
0
1
null
null
null
null
UTF-8
C++
false
false
2,310
cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int MAXN = 200 + 10; const int inf = 0x3f3f3f3f; struct SAP { int cap[MAXN][MAXN], flow[MAXN][MAXN], g[MAXN][MAXN]; int n; int h[MAXN], vh[MAXN], source, sink; int mk[MAXN]; void init(int n) { this->n = n; memset(cap, 0, sizeof(cap)); memset(g, 0, sizeof(g)); memset(mk, 0, sizeof(mk)); } void addCap(int i, int j, int val) { cap[i][j] += val; g[i][j] = 1; } int sap(const int idx, const int maxCap) { if (idx == sink) return maxCap; int l = maxCap, d, minH = n; for (int i = 0; i < n; i++) { if (cap[idx][i] - flow[idx][i] > 0) { if (h[idx] == h[i] + 1) { d = sap(i, min(l, cap[idx][i] - flow[idx][i])); flow[idx][i] += d; flow[i][idx] -= d; l -= d; if (h[source] == n || l == 0) return maxCap - l; } minH = min(minH, h[i] + 1); } } if (l == maxCap) { vh[h[idx]]--; vh[minH]++; if (vh[h[idx]] == 0) h[source] = n; h[idx] = minH; } return maxCap - l; } int solve(int source, int sink) { if (source == sink) return inf; this->sink = sink; this->source = source; memset(flow, 0, sizeof(flow)); memset(h, 0, sizeof(h)); memset(vh, 0, sizeof(vh)); int ans = 0; while (h[source] != n) ans += sap(source, inf); return ans; } }sap; int K, N, M, S, F; int main() { freopen("in.txt", "r", stdin); cin >> K; cin >> N >> M >> S >> F; S--; F--; sap.init(2 * N); for (int i = 0; i < N; i++) { int x; cin >> x; sap.addCap(2 * i, 2 * i + 1, x); sap.addCap(2 * i + 1, 2 * i, x); } while (M--) { int u, v; cin >> u >> v; u--; v--; sap.addCap(2 * u + 1, 2 * v, inf); sap.addCap(2 * v + 1, 2 * u, inf); } int source = 2 * S + 1, sink = 2 * F; int ret = sap.solve(source, sink); if (ret > K || S == F) puts("NO"); else puts("YES"); return 0; }
[ "zjsxzy@gmail.com" ]
zjsxzy@gmail.com
279c3ab66a21e3e833f312f2a3476c5f650b7a67
285b4638f208afcb523feeea18bc5c6ad1ff0adc
/Backjoon/Dynamic Programming/(11055)가장_큰_증가_부분_수열.cpp
441b56fa927d9f0344791d7c3513a29798a7193c
[]
no_license
Kuril951/ICPC_Study
8941b8b86e3c12eef3858e2cbf880f84523bac7a
78cd99b50fe05983e459672ae2f1c5ec6011cd17
refs/heads/master
2018-10-21T12:42:44.542883
2018-10-04T07:05:18
2018-10-04T07:05:18
116,656,800
0
0
null
null
null
null
UTF-8
C++
false
false
401
cpp
#include<iostream> using namespace std; int main() { int N, dp[1001] = { 0 }, res = 0; int num[1001]; scanf("%d", &N); for (int i = 0; i < N; i++) { int maxN = 0, tmp; scanf("%d", &tmp); num[i] = dp[i] = tmp; for (int j = 0; j < i; j++) { if (num[j] < tmp && maxN < dp[j]) maxN = dp[j]; } dp[i] += maxN; if (dp[i] > res) res = dp[i]; } printf("%d", res); return 0; }
[ "viodle238@naver.com" ]
viodle238@naver.com
62bbf01038639d94938b8490447c838dfb620c03
7e0ab9f52aa73962260411656903e217ccc34757
/src/Analysis.hpp
7e178ad2962317c9430f824d0dbe08a1fed32907
[ "Apache-2.0" ]
permissive
vishalbelsare/OpenABL
5a46f1e6d61e6317c905f82cc5bd6d7e318abbac
eb08ef86df0b9c0532cb8fd6b714bde5e8551923
refs/heads/master
2021-06-05T14:55:52.644766
2019-08-12T09:03:53
2019-08-12T09:03:53
141,203,558
0
0
Apache-2.0
2021-04-04T17:43:16
2018-07-16T22:57:37
C++
UTF-8
C++
false
false
5,847
hpp
/* Copyright 2017 OpenABL Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <map> #include <vector> #include <functional> #include <cassert> #include "Type.hpp" #include "Value.hpp" namespace OpenABL { // Globally unique variable id, to distinguish // different variables that have the same name. struct VarId { static VarId make() { return VarId { ++max_id }; } bool operator==(const VarId &other) const { return id == other.id; } bool operator!=(const VarId &other) const { return id != other.id; } bool operator<(const VarId &other) const { return id < other.id; } VarId() : id{0} {} void reset() { id = 0; } private: VarId(uint32_t id) : id{id} {} static uint32_t max_id; uint32_t id; }; struct ScopeEntry { Type type; bool isConst; bool isGlobal; Value val; }; struct Scope { void add(VarId var, Type type, bool isConst, bool isGlobal, Value val) { vars.insert({ var, ScopeEntry { type, isConst, isGlobal, val } }); } bool has(VarId var) const { return vars.find(var) != vars.end(); } const ScopeEntry &get(VarId var) const { auto it = vars.find(var); return it->second; } private: std::map<VarId, ScopeEntry> vars; }; struct FunctionSignature { static const unsigned MAIN_ONLY = 1 << 0; static const unsigned STEP_ONLY = 1 << 1; static const unsigned SEQ_STEP_ONLY = 1 << 2; static const unsigned MAIN_STEP_ONLY = MAIN_ONLY | STEP_ONLY; FunctionSignature() : origName(""), name(""), paramTypes(), returnType(), flags(0), decl(nullptr) {} FunctionSignature(const std::string &origName, const std::string &name, const std::vector<Type> &paramTypes, Type returnType, unsigned flags, const AST::FunctionDeclaration *decl) : origName(origName), name(name), paramTypes(paramTypes), returnType(returnType), flags(flags), decl(decl) {} bool isCompatibleWith(const std::vector<Type> &argTypes) const { if (customIsCompatibleWith) { return customIsCompatibleWith(argTypes); } if (argTypes.size() != paramTypes.size()) { return false; } for (size_t i = 0; i < argTypes.size(); i++) { if (!argTypes[i].isPromotableTo(paramTypes[i])) { return false; } } return true; } bool isConflictingWith(const std::vector<Type> &newParamTypes) const { if (newParamTypes.size() != paramTypes.size()) { // Always allow arity overloading return false; } // Don't allow overloading between bool, int and float bool haveDiff = false; for (size_t i = 0; i < newParamTypes.size(); i++) { Type newParamType = newParamTypes[i], paramType = paramTypes[i]; if (newParamType != paramType) { haveDiff = true; if ((paramType.isBool() || paramType.isInt() || paramType.isFloat()) && (newParamType.isBool() || newParamType.isInt() || newParamType.isFloat())) { return true; } } } return !haveDiff; } // Concrete signature with any generic agent types replaced FunctionSignature getConcreteSignature(const std::vector<Type> &argTypes) const; std::string origName; std::string name; std::vector<Type> paramTypes; Type returnType; unsigned flags; const AST::FunctionDeclaration *decl; std::function<bool(const std::vector<Type> &)> customIsCompatibleWith = {}; std::function<FunctionSignature(const std::vector<Type> &)> customGetConcreteSignature = {}; }; struct Function { const FunctionSignature *getCompatibleSignature(const std::vector<Type> &argTypes) const { for (const FunctionSignature &sig : signatures) { if (sig.isCompatibleWith(argTypes)) { return &sig; } } return nullptr; } // Get signature that conflicts for the purpose of overloading const FunctionSignature *getConflictingSignature(const std::vector<Type> &paramTypes) const { for (const FunctionSignature &sig : signatures) { if (sig.isConflictingWith(paramTypes)) { return &sig; } } return nullptr; } std::string name; std::vector<FunctionSignature> signatures; }; struct FunctionList { std::map<std::string, Function> funcs; void add(FunctionSignature sig) { funcs[sig.origName].signatures.push_back(sig); } void add(const std::string &name, const std::string &sigName, std::vector<Type> argTypes, Type returnType, unsigned flags = 0) { add({ name, sigName, argTypes, returnType, flags, nullptr }); } void add(const std::string &name, std::vector<Type> argTypes, Type returnType, unsigned flags = 0) { add(name, name, argTypes, returnType, flags); } Function *getByName(const std::string &name) { auto it = funcs.find(name); if (it == funcs.end()) { return nullptr; } return &it->second; } }; /* Supported types of reductions across all agents */ enum class ReductionKind { COUNT_TYPE, COUNT_MEMBER, SUM_MEMBER, }; using ReductionInfo = std::pair<ReductionKind, Type>; } namespace std { template<> struct hash<OpenABL::ReductionInfo> { size_t operator()(const OpenABL::ReductionInfo &t) const { return std::hash<int>()(static_cast<int>(t.first)) ^ std::hash<OpenABL::Type>()(t.second); } }; }
[ "nikita.ppv@gmail.com" ]
nikita.ppv@gmail.com
c89e90136cab3a60b50a29ee3dc325cbea133af1
7716aa9c07f9b98d73162aecf58fc19440556ee8
/Sensors.h
2facafdc937ccd1e622f3cf3608eb59038292a9f
[]
no_license
kara-te-kid/robot_dance
e11e6b4e6bede648c5350cb9ac220fc3042dc960
247dcf62be551d8a3031aa1c7d00f7e33d2c48a5
refs/heads/main
2023-07-02T22:02:41.206339
2021-08-09T04:21:11
2021-08-09T04:21:11
394,146,352
0
0
null
null
null
null
UTF-8
C++
false
false
1,631
h
#ifndef Sensors_h #define Sensors_h /* TODO: pin as parameters update orientation separately */ class Sensors { public: typedef enum { White, Edge, Black } StateSequence; Sensors() { MIDDLE_State = Black; OUTER_State = White; }; void readSensors() { R_OUTER = 1-digitalRead(3); R_INNER = 1-digitalRead(4); MIDDLE = 1-digitalRead(5); L_INNER = 1-digitalRead(6); L_OUTER = 1-digitalRead(7); Serial.print(L_OUTER); Serial.print(L_INNER); Serial.print(MIDDLE); Serial.print(R_INNER); Serial.println(R_OUTER); } bool getAnyOUTER() { return (L_OUTER || R_OUTER); } bool isOnEdge() { return OUTER_State=Edge; } bool updateMiddleSensorState() { Serial.println("MiddleSensorState"); Serial.println(MIDDLE_State); if (MIDDLE && !L_INNER && !R_INNER) { switch (MIDDLE_State) { case White : MIDDLE_State = Edge; return true; // TODO: update orientation case Edge: MIDDLE_State = Black; break; default: break; } } else if (!MIDDLE) { MIDDLE_State = White; } return false; } void updateOuterSensorState() { switch (OUTER_State) { case White: OUTER_State = Edge; return; case Edge: OUTER_State = Black; return; default: return; } } bool setOuterSensorStateToWhite() { OUTER_State = White; } int L_OUTER, L_INNER, MIDDLE, R_INNER, R_OUTER; StateSequence MIDDLE_State, OUTER_State; //private: }; #endif
[ "noreply@github.com" ]
kara-te-kid.noreply@github.com
eacca4277594a975518cdc4b0e9098e07eb9be1e
2b46f6f8143912a2992773f11f032eca5e794ddf
/3rdparty/stout/include/stout/os/windows/read.hpp
cb0abf70307f0dbba0b8f68e884df199b0359186
[ "Apache-2.0", "PSF-2.0", "BSD-3-Clause", "MIT", "GPL-2.0-or-later", "BSL-1.0", "LicenseRef-scancode-protobuf", "BSD-2-Clause" ]
permissive
cloudflare/mesos
58fa931856afb2c7a6503d70e170f19736b3940e
e5358ed1c132923d5fa357d1e337e037d1f29c8a
refs/heads/master
2023-08-13T04:14:31.024391
2016-06-07T01:05:15
2016-06-07T16:14:22
42,358,969
3
1
Apache-2.0
2022-07-22T09:14:56
2015-09-12T14:02:06
C++
UTF-8
C++
false
false
1,485
hpp
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef __STOUT_OS_WINDOWS_READ_HPP__ #define __STOUT_OS_WINDOWS_READ_HPP__ #include <io.h> #include <stout/result.hpp> #include <stout/windows.hpp> // For order-dependent networking headers. #include <stout/os/socket.hpp> namespace os { // Forward declaration for an OS-agnostic `read`. inline Result<std::string> read(int fd, size_t size); inline ssize_t read(int fd, void* data, size_t size) { if (net::is_socket(fd)) { return ::recv(fd, (char*) data, size, 0); } return ::_read(fd, data, size); } inline ssize_t read(HANDLE handle, void* data, size_t size) { return ::os::read( _open_osfhandle(reinterpret_cast<intptr_t>(handle), O_RDONLY), data, size); } inline Result<std::string> read(HANDLE handle, size_t size) { return ::os::read( _open_osfhandle(reinterpret_cast<intptr_t>(handle), O_RDONLY), size); } } // namespace os { #endif // __STOUT_OS_WINDOWS_READ_HPP__
[ "joris.van.remoortere@gmail.com" ]
joris.van.remoortere@gmail.com
d3442873e65e3cf548e6a539cd4918ccfec402a3
5d334d89e22028b95d4924a42bc0623fe013316d
/modules/util/source/Color.cpp
0cc04e61ab009e51762b62f8ee81268f233c833b
[]
no_license
alxarsenault/axlib
e2369e20664c01f004e989e24e595475bdf85e5d
b4b4241ffc9b58849925fe4e8b966e8199990c35
refs/heads/master
2021-06-18T12:23:08.901204
2017-07-13T17:26:40
2017-07-13T17:26:40
64,876,596
6
1
null
null
null
null
UTF-8
C++
false
false
2,565
cpp
/* * Copyright (c) 2016 Alexandre Arsenault. * * This file is part of axLib. * * axLib is free or commercial software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 or any later version of the * License or use a commercial axFrameworks License. * * axLib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with axLib. If not, see <http://www.gnu.org/licenses/>. * * To release a closed-source product which uses axLib, commercial * licenses are available, email alx.arsenault@gmail.com for more information. */ #include "Color.hpp" namespace ax { namespace util { ColorVector CreateHeatColors(const int& n) { ColorVector colors; float incr = 1.0 / float(n); float v = 0.0; float r = 1.0; float g = 0.0; float b = 0.0; for (int i = 0; i < n; i++) { g = v; v += incr; if (v > 1.0) v = 1.0; if (g > 1.0) g = 1.0; colors.emplace_back(Color<float>(r, g, b, 1.0)); } return colors; } ColorVector CreateRainbowColors(const int& n) { ColorVector colors; float separation = 1.0 / 6.0; float incr = 1.0 / float(n); float v = 0.0; for (int i = 0; i < n; i++) { float r = 0.0; float g = 0.0; float b = 0.0; float ratio = 0.0; float t = v; if (t > 5 * separation) { ratio = (t - (5.0 * separation)) / (separation); r = 1.0; g = 0.0; b = 1.0 - ratio; } else if (t > 4 * separation) { ratio = (t - (4.0 * separation)) / (separation); r = ratio; g = 0.0; b = 1.0; } else if (t > 3 * separation) { ratio = (t - (3.0 * separation)) / (separation); r = 0.0; g = 1.0 - ratio; b = 1.0; } else if (t > 2 * separation) { ratio = (t - (2.0 * separation)) / (separation); r = 0.0; g = 1.0; b = ratio; } else if (t > separation) { ratio = (t - separation) / (separation); r = 1.0 - ratio; g = 1.0; b = 0.0; } else { ratio = t / (separation); r = 1.0; g = ratio; b = 0.0; } v += incr; if (v > 1.0) v = 1.0; if (r > 1.0) r = 1.0; if (g > 1.0) g = 1.0; if (b > 1.0) b = 1.0; colors.emplace_back(Color<float>(r, g, b, 1.0)); } return colors; } } }
[ "aarsenault@erftcomposites.com" ]
aarsenault@erftcomposites.com
ea3724c52872965a0ea4acf2a6f2bdf880266333
456551bbf0c752075d23e2dd348d9bf09533c40f
/ABC/146/c.cpp
5ede690b89b03ad52025de6bc22f279bc03acb31
[]
no_license
skjmp/ProCon
5bed08c6efdc202d5f7d6038cd7a99d9c59d58f0
b9971b374d45499f22e6eb0107473ca37ca46591
refs/heads/master
2020-03-27T20:12:38.044762
2020-03-01T11:42:03
2020-03-01T13:49:31
147,048,755
0
0
null
null
null
null
UTF-8
C++
false
false
1,858
cpp
#include <bits/stdc++.h> #define REP(i, a, n) for (long long i = (a); i < (long long)(n); ++i) #define REPC(i, a, n) for (long long i = (a); i <= (long long)(n); ++i) #define ALL(t) t.begin(), t.end() #define RALL(t) t.rbegin(), t.rend() #define MATINIT(type, row, col, init) \ vector<vector<type>>(row, vector<type>(col, init)); #define Yes(cond) cout << (cond ? "Yes" : "No") << endl; #define YES(cond) cout << (cond ? "YES" : "NO") << endl; using namespace std; using LL = long long; using ULL = unsigned long long; template <class T> using VEC = std::vector<T>; template <class T> using MAT = std::vector<std::vector<T>>; void DUMP() { cerr << endl; } template <class Head, class... Tail> void DUMP(Head &&head, Tail &&... tail) { cerr << head << ", "; DUMP(std::move(tail)...); } template <typename T> ostream &operator<<(ostream &os, vector<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, set<T> &s) { os << "{"; for (auto p : s) os << p << ","; os << "}"; return os; } template <typename T1, typename T2> ostream &operator<<(ostream &os, map<T1, T2> &m) { os << "{"; for (auto p : m) os << p << ","; os << "}"; return os; } template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << "[" << p.first << " " << p.second << "]"; return os; } int main() { LL A, B, X; cin >> A >> B >> X; int left = 0; int right = 1e9 + 1; auto f = [&](LL N) -> LL { int keta = 0; LL M = N; while (M > 0) { M /= 10; keta++; } return A * N + B * keta; }; while (right - left > 1) { LL mid = (left + right) / 2; // DUMP(left, right, f(mid)); if (f(mid) <= X) { left = mid; } else { right = mid; } } cout << left << endl; return 0; }
[ "2036oshmkufafg36@gmail.com" ]
2036oshmkufafg36@gmail.com
c8e1a4b43eb56a31287e5dcdc569f1237db0fd5d
eaf717be88ef3c0186b2a765ff4ad68610cbe270
/File.cpp
95df7e7b357b0d6b8d769da314d2b279cf639602
[ "MIT" ]
permissive
MMagueta/BackupSystem
a417a2ed45376c95daa8df9f4f6ab1c83684c391
f9116a3ed46fcc47396e868e75df533a5589442a
refs/heads/master
2020-04-04T22:12:52.347574
2018-11-10T16:07:16
2018-11-10T16:07:16
156,314,721
0
0
null
null
null
null
UTF-8
C++
false
false
360
cpp
#include "File.h" File::File(std::string path){ stat(path.c_str() , &this->Stat); int div = this->Stat.st_size/BLOCO; int block_1 = 0; int block_2 = BLOCO; for(int i = 0; i <= div; i++){ this->Blocks.push_back(std::vector<int>{block_1, block_2}); this->Flags.push_back(false); block_1 += BLOCO; block_2 += BLOCO; } this->Path = path; }
[ "maguetamarcos@gmail.com" ]
maguetamarcos@gmail.com
59ca68a412eeb77e8f5b3534e281ef67df80c070
5be504e32c1d8c003b71ade91804fdee7487b046
/display_list/display_list_mask_filter_unittests.cc
ea79eee36fb6f2855dc7934d157d6af3deff14c1
[ "BSD-3-Clause" ]
permissive
linxuebin1990/engine
be83486c4e445b5a376c9fcc201721fcf2b0d106
4a358030cb0742491af5acc91ece40ee445ff027
refs/heads/master
2023-03-08T17:06:20.320016
2022-05-07T07:14:02
2022-05-07T07:14:02
241,888,547
2
1
BSD-3-Clause
2023-02-27T16:12:47
2020-02-20T13:18:16
C++
UTF-8
C++
false
false
7,803
cc
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/display_list/display_list_attributes_testing.h" #include "flutter/display_list/display_list_builder.h" #include "flutter/display_list/display_list_comparable.h" #include "flutter/display_list/display_list_mask_filter.h" #include "flutter/display_list/types.h" #include "gtest/gtest.h" namespace flutter { namespace testing { TEST(DisplayListMaskFilter, BuilderSetGet) { DlBlurMaskFilter filter(SkBlurStyle::kNormal_SkBlurStyle, 5.0); DisplayListBuilder builder; ASSERT_EQ(builder.getMaskFilter(), nullptr); builder.setMaskFilter(&filter); ASSERT_NE(builder.getMaskFilter(), nullptr); ASSERT_TRUE( Equals(builder.getMaskFilter(), static_cast<DlMaskFilter*>(&filter))); builder.setMaskFilter(nullptr); ASSERT_EQ(builder.getMaskFilter(), nullptr); } TEST(DisplayListMaskFilter, FromSkiaNullFilter) { std::shared_ptr<DlMaskFilter> filter = DlMaskFilter::From(nullptr); ASSERT_EQ(filter, nullptr); ASSERT_EQ(filter.get(), nullptr); } TEST(DisplayListMaskFilter, FromSkiaBlurFilter) { sk_sp<SkMaskFilter> sk_filter = SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0); std::shared_ptr<DlMaskFilter> filter = DlMaskFilter::From(sk_filter); ASSERT_EQ(filter->type(), DlMaskFilterType::kUnknown); // We cannot recapture the blur parameters from an SkBlurMaskFilter ASSERT_EQ(filter->asBlur(), nullptr); ASSERT_EQ(filter->skia_object(), sk_filter); } TEST(DisplayListMaskFilter, BlurConstructor) { DlBlurMaskFilter filter(SkBlurStyle::kNormal_SkBlurStyle, 5.0); } TEST(DisplayListMaskFilter, BlurShared) { DlBlurMaskFilter filter(SkBlurStyle::kNormal_SkBlurStyle, 5.0); ASSERT_NE(filter.shared().get(), &filter); ASSERT_EQ(*filter.shared(), filter); } TEST(DisplayListMaskFilter, BlurAsBlur) { DlBlurMaskFilter filter(SkBlurStyle::kNormal_SkBlurStyle, 5.0); ASSERT_NE(filter.asBlur(), nullptr); ASSERT_EQ(filter.asBlur(), &filter); } TEST(DisplayListMaskFilter, BlurContents) { DlBlurMaskFilter filter(SkBlurStyle::kNormal_SkBlurStyle, 5.0); ASSERT_EQ(filter.style(), SkBlurStyle::kNormal_SkBlurStyle); ASSERT_EQ(filter.sigma(), 5.0); } TEST(DisplayListMaskFilter, BlurEquals) { DlBlurMaskFilter filter1(SkBlurStyle::kNormal_SkBlurStyle, 5.0); DlBlurMaskFilter filter2(SkBlurStyle::kNormal_SkBlurStyle, 5.0); TestEquals(filter1, filter2); } TEST(DisplayListMaskFilter, BlurNotEquals) { DlBlurMaskFilter filter1(SkBlurStyle::kNormal_SkBlurStyle, 5.0); DlBlurMaskFilter filter2(SkBlurStyle::kInner_SkBlurStyle, 5.0); DlBlurMaskFilter filter3(SkBlurStyle::kNormal_SkBlurStyle, 6.0); TestNotEquals(filter1, filter2, "Blur style differs"); TestNotEquals(filter1, filter3, "blur radius differs"); } TEST(DisplayListMaskFilter, UnknownConstructor) { DlUnknownMaskFilter filter( SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0)); } TEST(DisplayListMaskFilter, UnknownShared) { DlUnknownMaskFilter filter( SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0)); ASSERT_NE(filter.shared().get(), &filter); ASSERT_EQ(*filter.shared(), filter); } TEST(DisplayListMaskFilter, UnknownContents) { sk_sp<SkMaskFilter> sk_filter = SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0); DlUnknownMaskFilter filter(sk_filter); ASSERT_EQ(filter.skia_object(), sk_filter); ASSERT_EQ(filter.skia_object().get(), sk_filter.get()); } TEST(DisplayListMaskFilter, UnknownEquals) { sk_sp<SkMaskFilter> sk_filter = SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0); DlUnknownMaskFilter filter1(sk_filter); DlUnknownMaskFilter filter2(sk_filter); TestEquals(filter1, filter2); } TEST(DisplayListMaskFilter, UnknownNotEquals) { // Even though the filter is the same, it is a different instance // and we cannot currently tell them apart because the Skia // MaskFilter objects do not implement == DlUnknownMaskFilter filter1( SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0)); DlUnknownMaskFilter filter2( SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5.0)); TestNotEquals(filter1, filter2, "SkMaskFilter instance differs"); } void testEquals(DlMaskFilter* a, DlMaskFilter* b) { // a and b have the same nullness or values ASSERT_TRUE(Equals(a, b)); ASSERT_FALSE(NotEquals(a, b)); ASSERT_TRUE(Equals(b, a)); ASSERT_FALSE(NotEquals(b, a)); } void testNotEquals(DlMaskFilter* a, DlMaskFilter* b) { // a and b do not have the same nullness or values ASSERT_FALSE(Equals(a, b)); ASSERT_TRUE(NotEquals(a, b)); ASSERT_FALSE(Equals(b, a)); ASSERT_TRUE(NotEquals(b, a)); } void testEquals(std::shared_ptr<const DlMaskFilter> a, DlMaskFilter* b) { // a and b have the same nullness or values ASSERT_TRUE(Equals(a, b)); ASSERT_FALSE(NotEquals(a, b)); ASSERT_TRUE(Equals(b, a)); ASSERT_FALSE(NotEquals(b, a)); } void testNotEquals(std::shared_ptr<const DlMaskFilter> a, DlMaskFilter* b) { // a and b do not have the same nullness or values ASSERT_FALSE(Equals(a, b)); ASSERT_TRUE(NotEquals(a, b)); ASSERT_FALSE(Equals(b, a)); ASSERT_TRUE(NotEquals(b, a)); } void testEquals(std::shared_ptr<const DlMaskFilter> a, std::shared_ptr<const DlMaskFilter> b) { // a and b have the same nullness or values ASSERT_TRUE(Equals(a, b)); ASSERT_FALSE(NotEquals(a, b)); ASSERT_TRUE(Equals(b, a)); ASSERT_FALSE(NotEquals(b, a)); } void testNotEquals(std::shared_ptr<const DlMaskFilter> a, std::shared_ptr<const DlMaskFilter> b) { // a and b do not have the same nullness or values ASSERT_FALSE(Equals(a, b)); ASSERT_TRUE(NotEquals(a, b)); ASSERT_FALSE(Equals(b, a)); ASSERT_TRUE(NotEquals(b, a)); } TEST(DisplayListMaskFilter, ComparableTemplates) { DlBlurMaskFilter filter1a(SkBlurStyle::kNormal_SkBlurStyle, 3.0); DlBlurMaskFilter filter1b(SkBlurStyle::kNormal_SkBlurStyle, 3.0); DlBlurMaskFilter filter2(SkBlurStyle::kNormal_SkBlurStyle, 5.0); std::shared_ptr<DlMaskFilter> shared_null; // null to null testEquals(nullptr, nullptr); testEquals(shared_null, nullptr); testEquals(shared_null, shared_null); // ptr to null testNotEquals(&filter1a, nullptr); testNotEquals(&filter1b, nullptr); testNotEquals(&filter2, nullptr); // shared_ptr to null and shared_null to ptr testNotEquals(filter1a.shared(), nullptr); testNotEquals(filter1b.shared(), nullptr); testNotEquals(filter2.shared(), nullptr); testNotEquals(shared_null, &filter1a); testNotEquals(shared_null, &filter1b); testNotEquals(shared_null, &filter2); // ptr to ptr testEquals(&filter1a, &filter1a); testEquals(&filter1a, &filter1b); testEquals(&filter1b, &filter1b); testEquals(&filter2, &filter2); testNotEquals(&filter1a, &filter2); // shared_ptr to ptr testEquals(filter1a.shared(), &filter1a); testEquals(filter1a.shared(), &filter1b); testEquals(filter1b.shared(), &filter1b); testEquals(filter2.shared(), &filter2); testNotEquals(filter1a.shared(), &filter2); testNotEquals(filter1b.shared(), &filter2); testNotEquals(filter2.shared(), &filter1a); testNotEquals(filter2.shared(), &filter1b); // shared_ptr to shared_ptr testEquals(filter1a.shared(), filter1a.shared()); testEquals(filter1a.shared(), filter1b.shared()); testEquals(filter1b.shared(), filter1b.shared()); testEquals(filter2.shared(), filter2.shared()); testNotEquals(filter1a.shared(), filter2.shared()); testNotEquals(filter1b.shared(), filter2.shared()); testNotEquals(filter2.shared(), filter1a.shared()); testNotEquals(filter2.shared(), filter1b.shared()); } } // namespace testing } // namespace flutter
[ "noreply@github.com" ]
linxuebin1990.noreply@github.com
2071be5f20b72ff9959f49c579b2295dca33e77c
0342fe0e71b63481ffa104eb0f2d127409021bae
/export/mac64/cpp/obj/src/flixel/group/FlxTypedSpriteGroup.cpp
0ac67c69b8c112438e392644b8b0cec507e6e639
[]
no_license
azlen/LD36
a063027afe49a219eb0a3711e12a3a9f553bc410
2b800e01ee491631974a6abd28a12f5019cb430a
refs/heads/master
2020-12-02T17:10:09.618613
2016-08-29T02:02:00
2016-08-29T02:02:00
66,799,278
0
1
null
null
null
null
UTF-8
C++
false
true
99,378
cpp
// Generated by Haxe 3.3.0 #include <hxcpp.h> #include "hxMath.h" #ifndef INCLUDED_flixel_FlxBasic #include <flixel/FlxBasic.h> #endif #ifndef INCLUDED_flixel_FlxCamera #include <flixel/FlxCamera.h> #endif #ifndef INCLUDED_flixel_FlxObject #include <flixel/FlxObject.h> #endif #ifndef INCLUDED_flixel_FlxSprite #include <flixel/FlxSprite.h> #endif #ifndef INCLUDED_flixel_graphics_frames_FlxFrame #include <flixel/graphics/frames/FlxFrame.h> #endif #ifndef INCLUDED_flixel_graphics_frames_FlxFramesCollection #include <flixel/graphics/frames/FlxFramesCollection.h> #endif #ifndef INCLUDED_flixel_group_FlxTypedGroup #include <flixel/group/FlxTypedGroup.h> #endif #ifndef INCLUDED_flixel_group_FlxTypedGroupIterator #include <flixel/group/FlxTypedGroupIterator.h> #endif #ifndef INCLUDED_flixel_group_FlxTypedSpriteGroup #include <flixel/group/FlxTypedSpriteGroup.h> #endif #ifndef INCLUDED_flixel_math_FlxCallbackPoint #include <flixel/math/FlxCallbackPoint.h> #endif #ifndef INCLUDED_flixel_math_FlxPoint #include <flixel/math/FlxPoint.h> #endif #ifndef INCLUDED_flixel_util_FlxDestroyUtil #include <flixel/util/FlxDestroyUtil.h> #endif #ifndef INCLUDED_flixel_util_FlxPool_flixel_math_FlxPoint #include <flixel/util/FlxPool_flixel_math_FlxPoint.h> #endif #ifndef INCLUDED_flixel_util_IFlxDestroyable #include <flixel/util/IFlxDestroyable.h> #endif #ifndef INCLUDED_flixel_util_IFlxPool #include <flixel/util/IFlxPool.h> #endif #ifndef INCLUDED_flixel_util_IFlxPooled #include <flixel/util/IFlxPooled.h> #endif #ifndef INCLUDED_openfl__legacy_display_BitmapData #include <openfl/_legacy/display/BitmapData.h> #endif #ifndef INCLUDED_openfl__legacy_display_BlendMode #include <openfl/_legacy/display/BlendMode.h> #endif #ifndef INCLUDED_openfl__legacy_display_IBitmapDrawable #include <openfl/_legacy/display/IBitmapDrawable.h> #endif namespace flixel{ namespace group{ void FlxTypedSpriteGroup_obj::__construct(hx::Null< Float > __o_X,hx::Null< Float > __o_Y,hx::Null< Int > __o_MaxSize){ Float X = __o_X.Default(0); Float Y = __o_Y.Default(0); Int MaxSize = __o_MaxSize.Default(0); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","new",0x9fa77753,"flixel.group.FlxTypedSpriteGroup.new","flixel/group/FlxSpriteGroup.hx",26,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(X,"X") HX_STACK_ARG(Y,"Y") HX_STACK_ARG(MaxSize,"MaxSize") HXLINE( 52) this->_skipTransformChildren = false; HXLINE( 74) super::__construct(X,Y,null()); HXLINE( 75) this->group = ::flixel::group::FlxTypedGroup_obj::__new(MaxSize); HXLINE( 76) this->_sprites = this->group->members; } Dynamic FlxTypedSpriteGroup_obj::__CreateEmpty() { return new FlxTypedSpriteGroup_obj; } hx::ObjectPtr< FlxTypedSpriteGroup_obj > FlxTypedSpriteGroup_obj::__new(hx::Null< Float > __o_X,hx::Null< Float > __o_Y,hx::Null< Int > __o_MaxSize) { hx::ObjectPtr< FlxTypedSpriteGroup_obj > _hx_result = new FlxTypedSpriteGroup_obj(); _hx_result->__construct(__o_X,__o_Y,__o_MaxSize); return _hx_result; } Dynamic FlxTypedSpriteGroup_obj::__Create(hx::DynamicArray inArgs) { hx::ObjectPtr< FlxTypedSpriteGroup_obj > _hx_result = new FlxTypedSpriteGroup_obj(); _hx_result->__construct(inArgs[0],inArgs[1],inArgs[2]); return _hx_result; } void FlxTypedSpriteGroup_obj::transformChildren_openfl__legacy_display_BlendMode( ::Dynamic Function,::hx::EnumBase Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","transformChildren_openfl__legacy_display_BlendMode",0x65952a52,"flixel.group.FlxTypedSpriteGroup.transformChildren_openfl__legacy_display_BlendMode","flixel/group/FlxSpriteGroup.hx",552,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Value,"Value") HXLINE( 553) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 553) if (_hx_tmp) { HXLINE( 555) return; } HXLINE( 558) { HXLINE( 558) HX_VARI( Int,_g) = (int)0; HXDLIN( 558) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 558) while((_g < _g1->length)){ HXLINE( 558) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 558) ++_g; HXLINE( 560) Bool _hx_tmp1 = hx::IsNotNull( sprite ); HXDLIN( 560) if (_hx_tmp1) { HXLINE( 562) Function(sprite,Value); } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,transformChildren_openfl__legacy_display_BlendMode,(void)) void FlxTypedSpriteGroup_obj::transformChildren_Int( ::Dynamic Function,Int Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","transformChildren_Int",0x8f3579ce,"flixel.group.FlxTypedSpriteGroup.transformChildren_Int","flixel/group/FlxSpriteGroup.hx",552,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Value,"Value") HXLINE( 553) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 553) if (_hx_tmp) { HXLINE( 555) return; } HXLINE( 558) { HXLINE( 558) HX_VARI( Int,_g) = (int)0; HXDLIN( 558) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 558) while((_g < _g1->length)){ HXLINE( 558) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 558) ++_g; HXLINE( 560) Bool _hx_tmp1 = hx::IsNotNull( sprite ); HXDLIN( 560) if (_hx_tmp1) { HXLINE( 562) Function(sprite,Value); } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,transformChildren_Int,(void)) void FlxTypedSpriteGroup_obj::transformChildren_Float( ::Dynamic Function,Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","transformChildren_Float",0x2758683b,"flixel.group.FlxTypedSpriteGroup.transformChildren_Float","flixel/group/FlxSpriteGroup.hx",552,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Value,"Value") HXLINE( 553) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 553) if (_hx_tmp) { HXLINE( 555) return; } HXLINE( 558) { HXLINE( 558) HX_VARI( Int,_g) = (int)0; HXDLIN( 558) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 558) while((_g < _g1->length)){ HXLINE( 558) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 558) ++_g; HXLINE( 560) Bool _hx_tmp1 = hx::IsNotNull( sprite ); HXDLIN( 560) if (_hx_tmp1) { HXLINE( 562) Function(sprite,Value); } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,transformChildren_Float,(void)) void FlxTypedSpriteGroup_obj::transformChildren_Bool( ::Dynamic Function,Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","transformChildren_Bool",0xbaf55a6b,"flixel.group.FlxTypedSpriteGroup.transformChildren_Bool","flixel/group/FlxSpriteGroup.hx",552,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Value,"Value") HXLINE( 553) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 553) if (_hx_tmp) { HXLINE( 555) return; } HXLINE( 558) { HXLINE( 558) HX_VARI( Int,_g) = (int)0; HXDLIN( 558) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 558) while((_g < _g1->length)){ HXLINE( 558) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 558) ++_g; HXLINE( 560) Bool _hx_tmp1 = hx::IsNotNull( sprite ); HXDLIN( 560) if (_hx_tmp1) { HXLINE( 562) Function(sprite,Value); } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,transformChildren_Bool,(void)) void FlxTypedSpriteGroup_obj::transformChildren_Array_flixel_FlxCamera( ::Dynamic Function,::Array< ::Dynamic> Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","transformChildren_Array_flixel_FlxCamera",0x8df728db,"flixel.group.FlxTypedSpriteGroup.transformChildren_Array_flixel_FlxCamera","flixel/group/FlxSpriteGroup.hx",552,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Value,"Value") HXLINE( 553) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 553) if (_hx_tmp) { HXLINE( 555) return; } HXLINE( 558) { HXLINE( 558) HX_VARI( Int,_g) = (int)0; HXDLIN( 558) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 558) while((_g < _g1->length)){ HXLINE( 558) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 558) ++_g; HXLINE( 560) Bool _hx_tmp1 = hx::IsNotNull( sprite ); HXDLIN( 560) if (_hx_tmp1) { HXLINE( 562) Function(sprite,Value); } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,transformChildren_Array_flixel_FlxCamera,(void)) void FlxTypedSpriteGroup_obj::multiTransformChildren_Float(::Array< ::Dynamic> FunctionArray,::Array< Float > ValueArray){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","multiTransformChildren_Float",0x31c44efc,"flixel.group.FlxTypedSpriteGroup.multiTransformChildren_Float","flixel/group/FlxSpriteGroup.hx",575,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(FunctionArray,"FunctionArray") HX_STACK_ARG(ValueArray,"ValueArray") HXLINE( 576) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 576) if (_hx_tmp) { HXLINE( 578) return; } HXLINE( 581) HX_VARI( Int,numProps) = FunctionArray->length; HXLINE( 582) if ((numProps > ValueArray->length)) { HXLINE( 584) return; } HXLINE( 587) HX_VAR( ::Dynamic,lambda); HXLINE( 588) { HXLINE( 588) HX_VARI( Int,_g) = (int)0; HXDLIN( 588) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 588) while((_g < _g1->length)){ HXLINE( 588) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 588) ++_g; HXLINE( 590) Bool _hx_tmp1; HXDLIN( 590) Bool _hx_tmp2 = hx::IsNotNull( sprite ); HXDLIN( 590) if (_hx_tmp2) { HXLINE( 590) _hx_tmp1 = sprite->exists; } else { HXLINE( 590) _hx_tmp1 = false; } HXDLIN( 590) if (_hx_tmp1) { HXLINE( 592) HX_VARI( Int,_g3) = (int)0; HXDLIN( 592) while((_g3 < numProps)){ HXLINE( 592) HX_VARI( Int,i) = _g3++; HXLINE( 594) lambda = FunctionArray->__get(i); HXLINE( 595) Float _hx_tmp3 = ValueArray->__get(i); HXDLIN( 595) lambda(sprite,_hx_tmp3); } } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,multiTransformChildren_Float,(void)) void FlxTypedSpriteGroup_obj::transformChildren_flixel_math_FlxPoint( ::Dynamic Function, ::flixel::math::FlxPoint Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","transformChildren_flixel_math_FlxPoint",0xcdc8d2f3,"flixel.group.FlxTypedSpriteGroup.transformChildren_flixel_math_FlxPoint","flixel/group/FlxSpriteGroup.hx",552,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Value,"Value") HXLINE( 553) Bool _hx_tmp = hx::IsNull( this->group ); HXDLIN( 553) if (_hx_tmp) { HXLINE( 555) return; } HXLINE( 558) { HXLINE( 558) HX_VARI( Int,_g) = (int)0; HXDLIN( 558) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 558) while((_g < _g1->length)){ HXLINE( 558) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 558) ++_g; HXLINE( 560) Bool _hx_tmp1 = hx::IsNotNull( sprite ); HXDLIN( 560) if (_hx_tmp1) { HXLINE( 562) Function(sprite,Value); } } } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,transformChildren_flixel_math_FlxPoint,(void)) void FlxTypedSpriteGroup_obj::initVars(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","initVars",0xad6ba309,"flixel.group.FlxTypedSpriteGroup.initVars","flixel/group/FlxSpriteGroup.hx",85,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 86) this->flixelType = (int)4; HXLINE( 88) this->offset = ::flixel::math::FlxCallbackPoint_obj::__new(this->offsetCallback_dyn(),null(),null()); HXLINE( 89) this->origin = ::flixel::math::FlxCallbackPoint_obj::__new(this->originCallback_dyn(),null(),null()); HXLINE( 90) this->scale = ::flixel::math::FlxCallbackPoint_obj::__new(this->scaleCallback_dyn(),null(),null()); HXLINE( 91) this->scrollFactor = ::flixel::math::FlxCallbackPoint_obj::__new(this->scrollFactorCallback_dyn(),null(),null()); HXLINE( 93) this->scale->set((int)1,(int)1); HXLINE( 94) this->scrollFactor->set((int)1,(int)1); HXLINE( 96) { HXLINE( 96) HX_VARI( ::flixel::math::FlxPoint,point) = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)0,(int)0); HXDLIN( 96) point->_inPool = false; HXDLIN( 96) this->velocity = point; HXDLIN( 96) HX_VARI_NAME( ::flixel::math::FlxPoint,point1,"point") = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)0,(int)0); HXDLIN( 96) point1->_inPool = false; HXDLIN( 96) this->acceleration = point1; HXDLIN( 96) HX_VARI_NAME( ::flixel::math::FlxPoint,point2,"point") = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)0,(int)0); HXDLIN( 96) point2->_inPool = false; HXDLIN( 96) this->drag = point2; HXDLIN( 96) HX_VARI_NAME( ::flixel::math::FlxPoint,point3,"point") = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)10000,(int)10000); HXDLIN( 96) point3->_inPool = false; HXDLIN( 96) this->maxVelocity = point3; } } void FlxTypedSpriteGroup_obj::destroy(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","destroy",0xd803c96d,"flixel.group.FlxTypedSpriteGroup.destroy","flixel/group/FlxSpriteGroup.hx",104,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 106) this->offset = ( ( ::flixel::math::FlxPoint)(::flixel::util::FlxDestroyUtil_obj::destroy(this->offset)) ); HXLINE( 107) this->origin = ( ( ::flixel::math::FlxPoint)(::flixel::util::FlxDestroyUtil_obj::destroy(this->origin)) ); HXLINE( 108) this->scale = ( ( ::flixel::math::FlxPoint)(::flixel::util::FlxDestroyUtil_obj::destroy(this->scale)) ); HXLINE( 109) this->scrollFactor = ( ( ::flixel::math::FlxPoint)(::flixel::util::FlxDestroyUtil_obj::destroy(this->scrollFactor)) ); HXLINE( 111) this->group = ( ( ::flixel::group::FlxTypedGroup)(::flixel::util::FlxDestroyUtil_obj::destroy(this->group)) ); HXLINE( 112) this->_sprites = null(); HXLINE( 114) this->super::destroy(); } ::flixel::FlxSprite FlxTypedSpriteGroup_obj::clone(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","clone",0x21249d10,"flixel.group.FlxTypedSpriteGroup.clone","flixel/group/FlxSpriteGroup.hx",122,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 123) HX_VARI( ::flixel::group::FlxTypedSpriteGroup,newGroup) = ::flixel::group::FlxTypedSpriteGroup_obj::__new(this->x,this->y,this->group->maxSize); HXLINE( 124) { HXLINE( 124) HX_VARI( Int,_g) = (int)0; HXDLIN( 124) HX_VARI( ::cpp::VirtualArray,_g1) = this->group->members; HXDLIN( 124) while((_g < _g1->get_length())){ HXLINE( 124) HX_VARI( ::Dynamic,sprite) = _g1->__get(_g); HXDLIN( 124) ++_g; HXLINE( 126) Bool _hx_tmp = hx::IsNotNull( sprite ); HXDLIN( 126) if (_hx_tmp) { HXLINE( 128) newGroup->add(( ( ::flixel::FlxSprite)(sprite) )->clone()); } } } HXLINE( 131) return newGroup; } Bool FlxTypedSpriteGroup_obj::isOnScreen( ::flixel::FlxCamera Camera){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","isOnScreen",0xe3a8b162,"flixel.group.FlxTypedSpriteGroup.isOnScreen","flixel/group/FlxSpriteGroup.hx",141,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Camera,"Camera") HXLINE( 142) { HXLINE( 142) HX_VARI( Int,_g) = (int)0; HXDLIN( 142) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 142) while((_g < _g1->length)){ HXLINE( 142) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 142) ++_g; HXLINE( 144) Bool _hx_tmp; HXDLIN( 144) Bool _hx_tmp1; HXDLIN( 144) Bool _hx_tmp2; HXDLIN( 144) Bool _hx_tmp3 = hx::IsNotNull( sprite ); HXDLIN( 144) if (_hx_tmp3) { HXLINE( 144) _hx_tmp2 = sprite->exists; } else { HXLINE( 144) _hx_tmp2 = false; } HXDLIN( 144) if (_hx_tmp2) { HXLINE( 144) _hx_tmp1 = sprite->visible; } else { HXLINE( 144) _hx_tmp1 = false; } HXDLIN( 144) if (_hx_tmp1) { HXLINE( 144) _hx_tmp = sprite->isOnScreen(Camera); } else { HXLINE( 144) _hx_tmp = false; } HXDLIN( 144) if (_hx_tmp) { HXLINE( 146) return true; } } } HXLINE( 150) return false; } Bool FlxTypedSpriteGroup_obj::overlapsPoint( ::flixel::math::FlxPoint point,hx::Null< Bool > __o_InScreenSpace, ::flixel::FlxCamera Camera){ Bool InScreenSpace = __o_InScreenSpace.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","overlapsPoint",0xe77cba57,"flixel.group.FlxTypedSpriteGroup.overlapsPoint","flixel/group/FlxSpriteGroup.hx",162,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(point,"point") HX_STACK_ARG(InScreenSpace,"InScreenSpace") HX_STACK_ARG(Camera,"Camera") HXLINE( 163) HX_VARI( Bool,result) = false; HXLINE( 164) { HXLINE( 164) HX_VARI( Int,_g) = (int)0; HXDLIN( 164) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 164) while((_g < _g1->length)){ HXLINE( 164) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 164) ++_g; HXLINE( 166) Bool _hx_tmp; HXDLIN( 166) Bool _hx_tmp1; HXDLIN( 166) Bool _hx_tmp2 = hx::IsNotNull( sprite ); HXDLIN( 166) if (_hx_tmp2) { HXLINE( 166) _hx_tmp1 = sprite->exists; } else { HXLINE( 166) _hx_tmp1 = false; } HXDLIN( 166) if (_hx_tmp1) { HXLINE( 166) _hx_tmp = sprite->visible; } else { HXLINE( 166) _hx_tmp = false; } HXDLIN( 166) if (_hx_tmp) { HXLINE( 168) if (!(result)) { HXLINE( 168) result = sprite->overlapsPoint(point,InScreenSpace,Camera); } else { HXLINE( 168) result = true; } } } } HXLINE( 172) return result; } Bool FlxTypedSpriteGroup_obj::pixelsOverlapPoint( ::flixel::math::FlxPoint point,hx::Null< Int > __o_Mask, ::flixel::FlxCamera Camera){ Int Mask = __o_Mask.Default(255); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","pixelsOverlapPoint",0xc3b2a483,"flixel.group.FlxTypedSpriteGroup.pixelsOverlapPoint","flixel/group/FlxSpriteGroup.hx",185,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(point,"point") HX_STACK_ARG(Mask,"Mask") HX_STACK_ARG(Camera,"Camera") HXLINE( 186) HX_VARI( Bool,result) = false; HXLINE( 187) { HXLINE( 187) HX_VARI( Int,_g) = (int)0; HXDLIN( 187) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 187) while((_g < _g1->length)){ HXLINE( 187) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 187) ++_g; HXLINE( 189) Bool _hx_tmp; HXDLIN( 189) Bool _hx_tmp1; HXDLIN( 189) Bool _hx_tmp2 = hx::IsNotNull( sprite ); HXDLIN( 189) if (_hx_tmp2) { HXLINE( 189) _hx_tmp1 = sprite->exists; } else { HXLINE( 189) _hx_tmp1 = false; } HXDLIN( 189) if (_hx_tmp1) { HXLINE( 189) _hx_tmp = sprite->visible; } else { HXLINE( 189) _hx_tmp = false; } HXDLIN( 189) if (_hx_tmp) { HXLINE( 191) if (!(result)) { HXLINE( 191) result = sprite->pixelsOverlapPoint(point,Mask,Camera); } else { HXLINE( 191) result = true; } } } } HXLINE( 195) return result; } void FlxTypedSpriteGroup_obj::update(Float elapsed){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","update",0x579c78f6,"flixel.group.FlxTypedSpriteGroup.update","flixel/group/FlxSpriteGroup.hx",199,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(elapsed,"elapsed") HXLINE( 200) this->group->update(elapsed); HXLINE( 202) Bool _hx_tmp = this->moves; HXDLIN( 202) if (_hx_tmp) { HXLINE( 204) this->updateMotion(elapsed); } } void FlxTypedSpriteGroup_obj::draw(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","draw",0x0c4e99b1,"flixel.group.FlxTypedSpriteGroup.draw","flixel/group/FlxSpriteGroup.hx",210,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 210) this->group->draw(); } ::Array< ::Dynamic> FlxTypedSpriteGroup_obj::replaceColor(Int _tmp_Color,Int _tmp_NewColor,hx::Null< Bool > __o_FetchPositions){ Bool FetchPositions = __o_FetchPositions.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","replaceColor",0x6ca2bf3c,"flixel.group.FlxTypedSpriteGroup.replaceColor","flixel/group/FlxSpriteGroup.hx",225,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(_tmp_Color,"_tmp_Color") HX_STACK_ARG(_tmp_NewColor,"_tmp_NewColor") HX_STACK_ARG(FetchPositions,"FetchPositions") HXLINE( 226) HX_VARI( Int,Color) = _tmp_Color; HXDLIN( 226) HX_VARI( Int,NewColor) = _tmp_NewColor; HXDLIN( 226) HX_VARI( ::Array< ::Dynamic>,positions) = null(); HXLINE( 227) if (FetchPositions) { HXLINE( 229) positions = ::Array_obj< ::Dynamic>::__new(); } HXLINE( 232) HX_VAR( ::Array< ::Dynamic>,spritePositions); HXLINE( 233) { HXLINE( 233) HX_VARI( Int,_g) = (int)0; HXDLIN( 233) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 233) while((_g < _g1->length)){ HXLINE( 233) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 233) ++_g; HXLINE( 235) Bool _hx_tmp = hx::IsNotNull( sprite ); HXDLIN( 235) if (_hx_tmp) { HXLINE( 237) spritePositions = sprite->replaceColor(Color,NewColor,FetchPositions); HXLINE( 238) if (FetchPositions) { HXLINE( 240) positions = positions->concat(spritePositions); } } } } HXLINE( 245) return positions; } ::Dynamic FlxTypedSpriteGroup_obj::add( ::Dynamic Sprite){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","add",0x9f9d9914,"flixel.group.FlxTypedSpriteGroup.add","flixel/group/FlxSpriteGroup.hx",255,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HXLINE( 256) HX_VARI( ::flixel::FlxSprite,sprite) = ( ( ::flixel::FlxSprite)(Sprite) ); HXLINE( 257) { HXLINE( 257) Float _hx_tmp = (sprite->x + this->x); HXDLIN( 257) sprite->set_x(_hx_tmp); } HXLINE( 258) { HXLINE( 258) Float _hx_tmp1 = (sprite->y + this->y); HXDLIN( 258) sprite->set_y(_hx_tmp1); } HXLINE( 259) { HXLINE( 259) Float _hx_tmp2 = (sprite->alpha * this->alpha); HXDLIN( 259) sprite->set_alpha(_hx_tmp2); } HXLINE( 260) { HXLINE( 260) HX_VARI( ::flixel::math::FlxPoint,_this) = sprite->scrollFactor; HXDLIN( 260) HX_VARI( ::flixel::math::FlxPoint,point) = this->scrollFactor; HXDLIN( 260) _this->set_x(point->x); HXDLIN( 260) _this->set_y(point->y); HXDLIN( 260) Bool _hx_tmp3 = point->_weak; HXDLIN( 260) if (_hx_tmp3) { HXLINE( 260) point->put(); } } HXLINE( 261) sprite->set_cameras(this->_cameras); HXLINE( 262) return this->group->add(Sprite); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,add,return ) ::Dynamic FlxTypedSpriteGroup_obj::recycle(hx::Class ObjectClass, ::Dynamic ObjectFactory,hx::Null< Bool > __o_Force){ Bool Force = __o_Force.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","recycle",0xeb09ac86,"flixel.group.FlxTypedSpriteGroup.recycle","flixel/group/FlxSpriteGroup.hx",275,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(ObjectClass,"ObjectClass") HX_STACK_ARG(ObjectFactory,"ObjectFactory") HX_STACK_ARG(Force,"Force") HXLINE( 275) return this->group->recycle(ObjectClass,ObjectFactory,Force,null()); } HX_DEFINE_DYNAMIC_FUNC3(FlxTypedSpriteGroup_obj,recycle,return ) ::Dynamic FlxTypedSpriteGroup_obj::remove( ::Dynamic Sprite,hx::Null< Bool > __o_Splice){ Bool Splice = __o_Splice.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","remove",0xd51f8f31,"flixel.group.FlxTypedSpriteGroup.remove","flixel/group/FlxSpriteGroup.hx",286,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Splice,"Splice") HXLINE( 287) HX_VARI( ::flixel::FlxSprite,sprite) = ( ( ::flixel::FlxSprite)(Sprite) ); HXLINE( 288) { HXLINE( 288) Float _hx_tmp = (sprite->x - this->x); HXDLIN( 288) sprite->set_x(_hx_tmp); } HXLINE( 289) { HXLINE( 289) Float _hx_tmp1 = (sprite->y - this->y); HXDLIN( 289) sprite->set_y(_hx_tmp1); } HXLINE( 291) sprite->set_cameras(null()); HXLINE( 292) return this->group->remove(Sprite,Splice); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,remove,return ) ::Dynamic FlxTypedSpriteGroup_obj::replace( ::Dynamic OldObject, ::Dynamic NewObject){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","replace",0x5ea5e4a7,"flixel.group.FlxTypedSpriteGroup.replace","flixel/group/FlxSpriteGroup.hx",304,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(OldObject,"OldObject") HX_STACK_ARG(NewObject,"NewObject") HXLINE( 304) return this->group->replace(OldObject,NewObject); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,replace,return ) void FlxTypedSpriteGroup_obj::sort( ::Dynamic Function,hx::Null< Int > __o_Order){ HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_hx_Closure_0, ::Dynamic,f,Int,a1) HXARGC(2) Int _hx_run( ::Dynamic a2, ::Dynamic a3){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","sort",0x1636950b,"flixel.group.FlxTypedSpriteGroup.sort","flixel/group/FlxSpriteGroup.hx",316,0xeb1fa7f3) HX_STACK_ARG(a2,"a2") HX_STACK_ARG(a3,"a3") HXLINE( 316) return ( (Int)(f(a1,a2,a3)) ); } HX_END_LOCAL_FUNC2(return) Int Order = __o_Order.Default(-1); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","sort",0x1636950b,"flixel.group.FlxTypedSpriteGroup.sort","flixel/group/FlxSpriteGroup.hx",316,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Order,"Order") HXLINE( 316) ::Dynamic f = Function; HXDLIN( 316) Int a1 = Order; HXDLIN( 316) ::Dynamic _hx_tmp = ::Dynamic(new _hx_Closure_0(f,a1)); HXDLIN( 316) this->group->members->sort(_hx_tmp); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,sort,(void)) ::Dynamic FlxTypedSpriteGroup_obj::getFirstAvailable(hx::Class ObjectClass,hx::Null< Bool > __o_Force){ Bool Force = __o_Force.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","getFirstAvailable",0x44b6b4e2,"flixel.group.FlxTypedSpriteGroup.getFirstAvailable","flixel/group/FlxSpriteGroup.hx",329,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(ObjectClass,"ObjectClass") HX_STACK_ARG(Force,"Force") HXLINE( 329) return this->group->getFirstAvailable(ObjectClass,Force); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,getFirstAvailable,return ) Int FlxTypedSpriteGroup_obj::getFirstNull(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","getFirstNull",0x3deb1a0e,"flixel.group.FlxTypedSpriteGroup.getFirstNull","flixel/group/FlxSpriteGroup.hx",340,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 340) return this->group->getFirstNull(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,getFirstNull,return ) ::Dynamic FlxTypedSpriteGroup_obj::getFirstExisting(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","getFirstExisting",0x25cf6192,"flixel.group.FlxTypedSpriteGroup.getFirstExisting","flixel/group/FlxSpriteGroup.hx",351,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 351) return this->group->getFirstExisting(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,getFirstExisting,return ) ::Dynamic FlxTypedSpriteGroup_obj::getFirstAlive(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","getFirstAlive",0x6da0fe66,"flixel.group.FlxTypedSpriteGroup.getFirstAlive","flixel/group/FlxSpriteGroup.hx",362,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 362) return this->group->getFirstAlive(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,getFirstAlive,return ) ::Dynamic FlxTypedSpriteGroup_obj::getFirstDead(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","getFirstDead",0x3742ca2b,"flixel.group.FlxTypedSpriteGroup.getFirstDead","flixel/group/FlxSpriteGroup.hx",373,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 373) return this->group->getFirstDead(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,getFirstDead,return ) Int FlxTypedSpriteGroup_obj::countLiving(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","countLiving",0xa01b2b4b,"flixel.group.FlxTypedSpriteGroup.countLiving","flixel/group/FlxSpriteGroup.hx",383,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 383) return this->group->countLiving(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,countLiving,return ) Int FlxTypedSpriteGroup_obj::countDead(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","countDead",0x17fab246,"flixel.group.FlxTypedSpriteGroup.countDead","flixel/group/FlxSpriteGroup.hx",393,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 393) return this->group->countDead(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,countDead,return ) ::Dynamic FlxTypedSpriteGroup_obj::getRandom(hx::Null< Int > __o_StartIndex,hx::Null< Int > __o_Length){ Int StartIndex = __o_StartIndex.Default(0); Int Length = __o_Length.Default(0); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","getRandom",0xf7598a6c,"flixel.group.FlxTypedSpriteGroup.getRandom","flixel/group/FlxSpriteGroup.hx",405,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(StartIndex,"StartIndex") HX_STACK_ARG(Length,"Length") HXLINE( 405) return this->group->getRandom(StartIndex,Length); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,getRandom,return ) ::flixel::group::FlxTypedGroupIterator FlxTypedSpriteGroup_obj::iterator( ::Dynamic filter){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","iterator",0xee05921b,"flixel.group.FlxTypedSpriteGroup.iterator","flixel/group/FlxSpriteGroup.hx",415,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(filter,"filter") HXLINE( 415) return ::flixel::group::FlxTypedGroupIterator_obj::__new(this->group->members,filter); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,iterator,return ) void FlxTypedSpriteGroup_obj::forEach( ::Dynamic Function,hx::Null< Bool > __o_Recurse){ Bool Recurse = __o_Recurse.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","forEach",0x783bc61d,"flixel.group.FlxTypedSpriteGroup.forEach","flixel/group/FlxSpriteGroup.hx",426,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Recurse,"Recurse") HXLINE( 426) this->group->forEach(Function,Recurse); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,forEach,(void)) void FlxTypedSpriteGroup_obj::forEachAlive( ::Dynamic Function,hx::Null< Bool > __o_Recurse){ Bool Recurse = __o_Recurse.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","forEachAlive",0xc86ec470,"flixel.group.FlxTypedSpriteGroup.forEachAlive","flixel/group/FlxSpriteGroup.hx",437,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Recurse,"Recurse") HXLINE( 437) this->group->forEachAlive(Function,Recurse); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,forEachAlive,(void)) void FlxTypedSpriteGroup_obj::forEachDead( ::Dynamic Function,hx::Null< Bool > __o_Recurse){ Bool Recurse = __o_Recurse.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","forEachDead",0xe8751361,"flixel.group.FlxTypedSpriteGroup.forEachDead","flixel/group/FlxSpriteGroup.hx",448,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Recurse,"Recurse") HXLINE( 448) this->group->forEachDead(Function,Recurse); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,forEachDead,(void)) void FlxTypedSpriteGroup_obj::forEachExists( ::Dynamic Function,hx::Null< Bool > __o_Recurse){ Bool Recurse = __o_Recurse.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","forEachExists",0x1ab74bd9,"flixel.group.FlxTypedSpriteGroup.forEachExists","flixel/group/FlxSpriteGroup.hx",459,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Recurse,"Recurse") HXLINE( 459) this->group->forEachExists(Function,Recurse); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,forEachExists,(void)) void FlxTypedSpriteGroup_obj::forEachOfType(hx::Class ObjectClass, ::Dynamic Function,hx::Null< Bool > __o_Recurse){ Bool Recurse = __o_Recurse.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","forEachOfType",0xaf35856e,"flixel.group.FlxTypedSpriteGroup.forEachOfType","flixel/group/FlxSpriteGroup.hx",471,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(ObjectClass,"ObjectClass") HX_STACK_ARG(Function,"Function") HX_STACK_ARG(Recurse,"Recurse") HXLINE( 471) this->group->forEachOfType(ObjectClass,Function,Recurse); } HX_DEFINE_DYNAMIC_FUNC3(FlxTypedSpriteGroup_obj,forEachOfType,(void)) void FlxTypedSpriteGroup_obj::clear(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","clear",0x211cfb40,"flixel.group.FlxTypedSpriteGroup.clear","flixel/group/FlxSpriteGroup.hx",480,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 480) this->group->clear(); } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,clear,(void)) void FlxTypedSpriteGroup_obj::kill(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","kill",0x10e84d4b,"flixel.group.FlxTypedSpriteGroup.kill","flixel/group/FlxSpriteGroup.hx",488,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 489) this->super::kill(); HXLINE( 490) this->group->kill(); } void FlxTypedSpriteGroup_obj::revive(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","revive",0xdb0ded42,"flixel.group.FlxTypedSpriteGroup.revive","flixel/group/FlxSpriteGroup.hx",497,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 498) this->super::revive(); HXLINE( 499) this->group->revive(); } void FlxTypedSpriteGroup_obj::reset(Float X,Float Y){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","reset",0xbf89d382,"flixel.group.FlxTypedSpriteGroup.reset","flixel/group/FlxSpriteGroup.hx",510,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(X,"X") HX_STACK_ARG(Y,"Y") HXLINE( 511) this->revive(); HXLINE( 512) this->setPosition(X,Y); HXLINE( 514) { HXLINE( 514) HX_VARI( Int,_g) = (int)0; HXDLIN( 514) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 514) while((_g < _g1->length)){ HXLINE( 514) HX_VARI( ::flixel::FlxSprite,sprite) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 514) ++_g; HXLINE( 516) Bool _hx_tmp = hx::IsNotNull( sprite ); HXDLIN( 516) if (_hx_tmp) { HXLINE( 518) sprite->reset(X,Y); } } } } void FlxTypedSpriteGroup_obj::setPosition(hx::Null< Float > __o_X,hx::Null< Float > __o_Y){ Float X = __o_X.Default(0); Float Y = __o_Y.Default(0); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","setPosition",0x6aebbc5e,"flixel.group.FlxTypedSpriteGroup.setPosition","flixel/group/FlxSpriteGroup.hx",531,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(X,"X") HX_STACK_ARG(Y,"Y") HXLINE( 533) HX_VARI( Float,dx) = (X - this->x); HXLINE( 534) HX_VARI( Float,dy) = (Y - this->y); HXLINE( 535) this->multiTransformChildren_Float(::Array_obj< ::Dynamic>::__new(2)->init(0,this->xTransform_dyn())->init(1,this->yTransform_dyn()),::Array_obj< Float >::__new(2)->init(0,dx)->init(1,dy)); HXLINE( 538) this->_skipTransformChildren = true; HXLINE( 539) this->set_x(X); HXLINE( 540) this->set_y(Y); HXLINE( 541) this->_skipTransformChildren = false; } ::Array< ::Dynamic> FlxTypedSpriteGroup_obj::set_cameras(::Array< ::Dynamic> Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_cameras",0xe3294344,"flixel.group.FlxTypedSpriteGroup.set_cameras","flixel/group/FlxSpriteGroup.hx",604,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 605) ::Array< ::Dynamic> _hx_tmp = this->get_cameras(); HXDLIN( 605) if (hx::IsNotEq( _hx_tmp,Value )) { HXLINE( 606) this->transformChildren_Array_flixel_FlxCamera(this->camerasTransform_dyn(),Value); } HXLINE( 607) return this->super::set_cameras(Value); } Bool FlxTypedSpriteGroup_obj::set_exists(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_exists",0xf5d49986,"flixel.group.FlxTypedSpriteGroup.set_exists","flixel/group/FlxSpriteGroup.hx",611,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 612) Bool _hx_tmp = (this->exists != Value); HXDLIN( 612) if (_hx_tmp) { HXLINE( 613) this->transformChildren_Bool(this->existsTransform_dyn(),Value); } HXLINE( 614) return this->super::set_exists(Value); } Bool FlxTypedSpriteGroup_obj::set_visible(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_visible",0xa31c3188,"flixel.group.FlxTypedSpriteGroup.set_visible","flixel/group/FlxSpriteGroup.hx",618,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 619) Bool _hx_tmp; HXDLIN( 619) if (this->exists) { HXLINE( 619) _hx_tmp = (this->visible != Value); } else { HXLINE( 619) _hx_tmp = false; } HXDLIN( 619) if (_hx_tmp) { HXLINE( 620) this->transformChildren_Bool(this->visibleTransform_dyn(),Value); } HXLINE( 621) return this->super::set_visible(Value); } Bool FlxTypedSpriteGroup_obj::set_active(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_active",0x4c3abd70,"flixel.group.FlxTypedSpriteGroup.set_active","flixel/group/FlxSpriteGroup.hx",625,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 626) Bool _hx_tmp; HXDLIN( 626) if (this->exists) { HXLINE( 626) _hx_tmp = (this->active != Value); } else { HXLINE( 626) _hx_tmp = false; } HXDLIN( 626) if (_hx_tmp) { HXLINE( 627) this->transformChildren_Bool(this->activeTransform_dyn(),Value); } HXLINE( 628) return this->super::set_active(Value); } Bool FlxTypedSpriteGroup_obj::set_alive(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_alive",0x0bff8b63,"flixel.group.FlxTypedSpriteGroup.set_alive","flixel/group/FlxSpriteGroup.hx",632,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 633) Bool _hx_tmp; HXDLIN( 633) if (this->exists) { HXLINE( 633) _hx_tmp = (this->alive != Value); } else { HXLINE( 633) _hx_tmp = false; } HXDLIN( 633) if (_hx_tmp) { HXLINE( 634) this->transformChildren_Bool(this->aliveTransform_dyn(),Value); } HXLINE( 635) return this->super::set_alive(Value); } Float FlxTypedSpriteGroup_obj::set_x(Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_x",0x52f1250e,"flixel.group.FlxTypedSpriteGroup.set_x","flixel/group/FlxSpriteGroup.hx",639,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 640) Bool _hx_tmp; HXDLIN( 640) Bool _hx_tmp1; HXDLIN( 640) if (!(this->_skipTransformChildren)) { HXLINE( 640) _hx_tmp1 = this->exists; } else { HXLINE( 640) _hx_tmp1 = false; } HXDLIN( 640) if (_hx_tmp1) { HXLINE( 640) _hx_tmp = (this->x != Value); } else { HXLINE( 640) _hx_tmp = false; } HXDLIN( 640) if (_hx_tmp) { HXLINE( 642) HX_VARI( Float,offset) = (Value - this->x); HXLINE( 643) this->transformChildren_Float(this->xTransform_dyn(),offset); } HXLINE( 646) return (this->x = Value); } Float FlxTypedSpriteGroup_obj::set_y(Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_y",0x52f1250f,"flixel.group.FlxTypedSpriteGroup.set_y","flixel/group/FlxSpriteGroup.hx",650,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 651) Bool _hx_tmp; HXDLIN( 651) Bool _hx_tmp1; HXDLIN( 651) if (!(this->_skipTransformChildren)) { HXLINE( 651) _hx_tmp1 = this->exists; } else { HXLINE( 651) _hx_tmp1 = false; } HXDLIN( 651) if (_hx_tmp1) { HXLINE( 651) _hx_tmp = (this->y != Value); } else { HXLINE( 651) _hx_tmp = false; } HXDLIN( 651) if (_hx_tmp) { HXLINE( 653) HX_VARI( Float,offset) = (Value - this->y); HXLINE( 654) this->transformChildren_Float(this->yTransform_dyn(),offset); } HXLINE( 657) return (this->y = Value); } Float FlxTypedSpriteGroup_obj::set_angle(Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_angle",0x0d506b69,"flixel.group.FlxTypedSpriteGroup.set_angle","flixel/group/FlxSpriteGroup.hx",661,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 662) Bool _hx_tmp; HXDLIN( 662) if (this->exists) { HXLINE( 662) _hx_tmp = (this->angle != Value); } else { HXLINE( 662) _hx_tmp = false; } HXDLIN( 662) if (_hx_tmp) { HXLINE( 664) HX_VARI( Float,offset) = (Value - this->angle); HXLINE( 665) this->transformChildren_Float(this->angleTransform_dyn(),offset); } HXLINE( 667) return (this->angle = Value); } Float FlxTypedSpriteGroup_obj::set_alpha(Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_alpha",0x0c04cef4,"flixel.group.FlxTypedSpriteGroup.set_alpha","flixel/group/FlxSpriteGroup.hx",671,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 672) HX_VAR( Float,lowerBound); HXDLIN( 672) if ((Value < (int)0)) { HXLINE( 672) lowerBound = (int)0; } else { HXLINE( 672) lowerBound = Value; } HXDLIN( 672) ::Dynamic _hx_tmp; HXDLIN( 672) if ((lowerBound > (int)1)) { HXLINE( 672) _hx_tmp = (int)1; } else { HXLINE( 672) _hx_tmp = lowerBound; } HXDLIN( 672) Value = _hx_tmp; HXLINE( 674) Bool _hx_tmp1; HXDLIN( 674) if (this->exists) { HXLINE( 674) _hx_tmp1 = (this->alpha != Value); } else { HXLINE( 674) _hx_tmp1 = false; } HXDLIN( 674) if (_hx_tmp1) { HXLINE( 676) HX_VAR( Float,factor); HXDLIN( 676) if ((this->alpha > (int)0)) { HXLINE( 676) factor = ((Float)Value / (Float)this->alpha); } else { HXLINE( 676) factor = (int)0; } HXLINE( 677) this->transformChildren_Float(this->alphaTransform_dyn(),factor); } HXLINE( 679) return (this->alpha = Value); } Int FlxTypedSpriteGroup_obj::set_facing(Int Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_facing",0x19f9bac4,"flixel.group.FlxTypedSpriteGroup.set_facing","flixel/group/FlxSpriteGroup.hx",683,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 684) Bool _hx_tmp; HXDLIN( 684) if (this->exists) { HXLINE( 684) _hx_tmp = (this->facing != Value); } else { HXLINE( 684) _hx_tmp = false; } HXDLIN( 684) if (_hx_tmp) { HXLINE( 685) this->transformChildren_Int(this->facingTransform_dyn(),Value); } HXLINE( 686) return (this->facing = Value); } Bool FlxTypedSpriteGroup_obj::set_flipX(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_flipX",0xed006ca1,"flixel.group.FlxTypedSpriteGroup.set_flipX","flixel/group/FlxSpriteGroup.hx",690,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 691) Bool _hx_tmp; HXDLIN( 691) if (this->exists) { HXLINE( 691) _hx_tmp = (this->flipX != Value); } else { HXLINE( 691) _hx_tmp = false; } HXDLIN( 691) if (_hx_tmp) { HXLINE( 692) this->transformChildren_Bool(this->flipXTransform_dyn(),Value); } HXLINE( 693) return (this->flipX = Value); } Bool FlxTypedSpriteGroup_obj::set_flipY(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_flipY",0xed006ca2,"flixel.group.FlxTypedSpriteGroup.set_flipY","flixel/group/FlxSpriteGroup.hx",697,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 698) Bool _hx_tmp; HXDLIN( 698) if (this->exists) { HXLINE( 698) _hx_tmp = (this->flipY != Value); } else { HXLINE( 698) _hx_tmp = false; } HXDLIN( 698) if (_hx_tmp) { HXLINE( 699) this->transformChildren_Bool(this->flipYTransform_dyn(),Value); } HXLINE( 700) return (this->flipY = Value); } Bool FlxTypedSpriteGroup_obj::set_moves(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_moves",0xf6d3f3d8,"flixel.group.FlxTypedSpriteGroup.set_moves","flixel/group/FlxSpriteGroup.hx",704,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 705) Bool _hx_tmp; HXDLIN( 705) if (this->exists) { HXLINE( 705) _hx_tmp = (this->moves != Value); } else { HXLINE( 705) _hx_tmp = false; } HXDLIN( 705) if (_hx_tmp) { HXLINE( 706) this->transformChildren_Bool(this->movesTransform_dyn(),Value); } HXLINE( 707) return (this->moves = Value); } Bool FlxTypedSpriteGroup_obj::set_immovable(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_immovable",0xdf98d1a0,"flixel.group.FlxTypedSpriteGroup.set_immovable","flixel/group/FlxSpriteGroup.hx",711,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 712) Bool _hx_tmp; HXDLIN( 712) if (this->exists) { HXLINE( 712) _hx_tmp = (this->immovable != Value); } else { HXLINE( 712) _hx_tmp = false; } HXDLIN( 712) if (_hx_tmp) { HXLINE( 713) this->transformChildren_Bool(this->immovableTransform_dyn(),Value); } HXLINE( 714) return (this->immovable = Value); } Bool FlxTypedSpriteGroup_obj::set_solid(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_solid",0x6b33dbc1,"flixel.group.FlxTypedSpriteGroup.set_solid","flixel/group/FlxSpriteGroup.hx",718,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 719) Bool _hx_tmp; HXDLIN( 719) if (this->exists) { HXLINE( 719) _hx_tmp = ((((int)this->allowCollisions & (int)(int)4369) > (int)0) != Value); } else { HXLINE( 719) _hx_tmp = false; } HXDLIN( 719) if (_hx_tmp) { HXLINE( 720) this->transformChildren_Bool(this->solidTransform_dyn(),Value); } HXLINE( 721) return this->super::set_solid(Value); } Int FlxTypedSpriteGroup_obj::set_color(Int _tmp_Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_color",0x34ca98f9,"flixel.group.FlxTypedSpriteGroup.set_color","flixel/group/FlxSpriteGroup.hx",725,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(_tmp_Value,"_tmp_Value") HXLINE( 726) HX_VARI( Int,Value) = _tmp_Value; HXDLIN( 726) Bool _hx_tmp; HXDLIN( 726) if (this->exists) { HXLINE( 726) _hx_tmp = (this->color != Value); } else { HXLINE( 726) _hx_tmp = false; } HXDLIN( 726) if (_hx_tmp) { HXLINE( 727) this->transformChildren_Int(this->gColorTransform_dyn(),Value); } HXLINE( 728) return (this->color = Value); } ::hx::EnumBase FlxTypedSpriteGroup_obj::set_blend(::hx::EnumBase Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_blend",0x9f630fe7,"flixel.group.FlxTypedSpriteGroup.set_blend","flixel/group/FlxSpriteGroup.hx",732,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 733) Bool _hx_tmp; HXDLIN( 733) if (this->exists) { HXLINE( 733) _hx_tmp = hx::IsNotEq( this->blend,Value ); } else { HXLINE( 733) _hx_tmp = false; } HXDLIN( 733) if (_hx_tmp) { HXLINE( 734) this->transformChildren_openfl__legacy_display_BlendMode(this->blendTransform_dyn(),Value); } HXLINE( 735) return (this->blend = Value); } Bool FlxTypedSpriteGroup_obj::set_pixelPerfectRender(Bool Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_pixelPerfectRender",0x5163ac87,"flixel.group.FlxTypedSpriteGroup.set_pixelPerfectRender","flixel/group/FlxSpriteGroup.hx",739,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 740) Bool _hx_tmp; HXDLIN( 740) if (this->exists) { HXLINE( 740) _hx_tmp = hx::IsNotEq( this->pixelPerfectRender,Value ); } else { HXLINE( 740) _hx_tmp = false; } HXDLIN( 740) if (_hx_tmp) { HXLINE( 741) this->transformChildren_Bool(this->pixelPerfectTransform_dyn(),Value); } HXLINE( 742) return this->super::set_pixelPerfectRender(Value); } Float FlxTypedSpriteGroup_obj::set_width(Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_width",0xb4d0dd9c,"flixel.group.FlxTypedSpriteGroup.set_width","flixel/group/FlxSpriteGroup.hx",750,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 750) return Value; } Float FlxTypedSpriteGroup_obj::get_width(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","get_width",0xd17ff190,"flixel.group.FlxTypedSpriteGroup.get_width","flixel/group/FlxSpriteGroup.hx",754,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 755) if ((this->group->length == (int)0)) { HXLINE( 756) return (int)0; } HXLINE( 758) HX_VARI( Float,minX) = ::Math_obj::POSITIVE_INFINITY; HXLINE( 759) HX_VARI( Float,maxX) = ::Math_obj::NEGATIVE_INFINITY; HXLINE( 761) { HXLINE( 761) HX_VARI( Int,_g) = (int)0; HXDLIN( 761) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 761) while((_g < _g1->length)){ HXLINE( 761) HX_VARI( ::flixel::FlxSprite,member) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 761) ++_g; HXLINE( 763) Bool _hx_tmp = hx::IsNull( member ); HXDLIN( 763) if (_hx_tmp) { HXLINE( 763) continue; } HXLINE( 764) HX_VARI( Float,minMemberX) = member->x; HXLINE( 765) Float _hx_tmp1 = member->get_width(); HXDLIN( 765) HX_VARI( Float,maxMemberX) = (minMemberX + _hx_tmp1); HXLINE( 767) Bool _hx_tmp2 = (maxMemberX > maxX); HXDLIN( 767) if (_hx_tmp2) { HXLINE( 769) maxX = maxMemberX; } HXLINE( 771) Bool _hx_tmp3 = (minMemberX < minX); HXDLIN( 771) if (_hx_tmp3) { HXLINE( 773) minX = minMemberX; } } } HXLINE( 776) return (maxX - minX); } Float FlxTypedSpriteGroup_obj::set_height(Float Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_height",0x38408391,"flixel.group.FlxTypedSpriteGroup.set_height","flixel/group/FlxSpriteGroup.hx",784,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 784) return Value; } Float FlxTypedSpriteGroup_obj::get_height(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","get_height",0x34c2e51d,"flixel.group.FlxTypedSpriteGroup.get_height","flixel/group/FlxSpriteGroup.hx",788,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 789) if ((this->group->length == (int)0)) { HXLINE( 791) return (int)0; } HXLINE( 794) HX_VARI( Float,minY) = ::Math_obj::POSITIVE_INFINITY; HXLINE( 795) HX_VARI( Float,maxY) = ::Math_obj::NEGATIVE_INFINITY; HXLINE( 797) { HXLINE( 797) HX_VARI( Int,_g) = (int)0; HXDLIN( 797) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_sprites; HXDLIN( 797) while((_g < _g1->length)){ HXLINE( 797) HX_VARI( ::flixel::FlxSprite,member) = _g1->__get(_g).StaticCast< ::flixel::FlxSprite >(); HXDLIN( 797) ++_g; HXLINE( 799) Bool _hx_tmp = hx::IsNull( member ); HXDLIN( 799) if (_hx_tmp) { HXLINE( 799) continue; } HXLINE( 800) HX_VARI( Float,minMemberY) = member->y; HXLINE( 801) Float _hx_tmp1 = member->get_height(); HXDLIN( 801) HX_VARI( Float,maxMemberY) = (minMemberY + _hx_tmp1); HXLINE( 803) Bool _hx_tmp2 = (maxMemberY > maxY); HXDLIN( 803) if (_hx_tmp2) { HXLINE( 805) maxY = maxMemberY; } HXLINE( 807) Bool _hx_tmp3 = (minMemberY < minY); HXDLIN( 807) if (_hx_tmp3) { HXLINE( 809) minY = minMemberY; } } } HXLINE( 812) return (maxY - minY); } Int FlxTypedSpriteGroup_obj::get_length(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","get_length",0xd17e721c,"flixel.group.FlxTypedSpriteGroup.get_length","flixel/group/FlxSpriteGroup.hx",819,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 819) return this->group->length; } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,get_length,return ) Int FlxTypedSpriteGroup_obj::get_maxSize(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","get_maxSize",0xc20eab8f,"flixel.group.FlxTypedSpriteGroup.get_maxSize","flixel/group/FlxSpriteGroup.hx",824,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 824) return this->group->maxSize; } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,get_maxSize,return ) Int FlxTypedSpriteGroup_obj::set_maxSize(Int Size){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_maxSize",0xcc7bb29b,"flixel.group.FlxTypedSpriteGroup.set_maxSize","flixel/group/FlxSpriteGroup.hx",829,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Size,"Size") HXLINE( 829) return this->group->set_maxSize(Size); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,set_maxSize,return ) ::cpp::VirtualArray FlxTypedSpriteGroup_obj::get_members(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","get_members",0x0ffadee3,"flixel.group.FlxTypedSpriteGroup.get_members","flixel/group/FlxSpriteGroup.hx",834,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 834) return this->group->members; } HX_DEFINE_DYNAMIC_FUNC0(FlxTypedSpriteGroup_obj,get_members,return ) void FlxTypedSpriteGroup_obj::xTransform( ::flixel::FlxSprite Sprite,Float X){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","xTransform",0x4c3dab41,"flixel.group.FlxTypedSpriteGroup.xTransform","flixel/group/FlxSpriteGroup.hx",839,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(X,"X") HXLINE( 839) Float _hx_tmp = (Sprite->x + X); HXDLIN( 839) Sprite->set_x(_hx_tmp); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,xTransform,(void)) void FlxTypedSpriteGroup_obj::yTransform( ::flixel::FlxSprite Sprite,Float Y){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","yTransform",0x0c882320,"flixel.group.FlxTypedSpriteGroup.yTransform","flixel/group/FlxSpriteGroup.hx",840,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Y,"Y") HXLINE( 840) Float _hx_tmp = (Sprite->y + Y); HXDLIN( 840) Sprite->set_y(_hx_tmp); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,yTransform,(void)) void FlxTypedSpriteGroup_obj::angleTransform( ::flixel::FlxSprite Sprite,Float Angle){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","angleTransform",0x285b5f06,"flixel.group.FlxTypedSpriteGroup.angleTransform","flixel/group/FlxSpriteGroup.hx",841,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Angle,"Angle") HXLINE( 841) Float _hx_tmp = (Sprite->angle + Angle); HXDLIN( 841) Sprite->set_angle(_hx_tmp); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,angleTransform,(void)) void FlxTypedSpriteGroup_obj::alphaTransform( ::flixel::FlxSprite Sprite,Float Alpha){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","alphaTransform",0xe7f1b21b,"flixel.group.FlxTypedSpriteGroup.alphaTransform","flixel/group/FlxSpriteGroup.hx",842,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Alpha,"Alpha") HXLINE( 842) Float _hx_tmp = (Sprite->alpha * Alpha); HXDLIN( 842) Sprite->set_alpha(_hx_tmp); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,alphaTransform,(void)) void FlxTypedSpriteGroup_obj::facingTransform( ::flixel::FlxSprite Sprite,Int Facing){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","facingTransform",0x8cbce265,"flixel.group.FlxTypedSpriteGroup.facingTransform","flixel/group/FlxSpriteGroup.hx",843,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Facing,"Facing") HXLINE( 843) Sprite->set_facing(Facing); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,facingTransform,(void)) void FlxTypedSpriteGroup_obj::flipXTransform( ::flixel::FlxSprite Sprite,Bool FlipX){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","flipXTransform",0x2d6d76ce,"flixel.group.FlxTypedSpriteGroup.flipXTransform","flixel/group/FlxSpriteGroup.hx",844,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(FlipX,"FlipX") HXLINE( 844) Sprite->set_flipX(FlipX); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,flipXTransform,(void)) void FlxTypedSpriteGroup_obj::flipYTransform( ::flixel::FlxSprite Sprite,Bool FlipY){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","flipYTransform",0xedb7eead,"flixel.group.FlxTypedSpriteGroup.flipYTransform","flixel/group/FlxSpriteGroup.hx",845,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(FlipY,"FlipY") HXLINE( 845) Sprite->set_flipY(FlipY); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,flipYTransform,(void)) void FlxTypedSpriteGroup_obj::movesTransform( ::flixel::FlxSprite Sprite,Bool Moves){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","movesTransform",0x6670d0b7,"flixel.group.FlxTypedSpriteGroup.movesTransform","flixel/group/FlxSpriteGroup.hx",846,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Moves,"Moves") HXLINE( 846) Sprite->set_moves(Moves); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,movesTransform,(void)) void FlxTypedSpriteGroup_obj::pixelPerfectTransform( ::flixel::FlxSprite Sprite,Bool PixelPerfect){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","pixelPerfectTransform",0x21312cf8,"flixel.group.FlxTypedSpriteGroup.pixelPerfectTransform","flixel/group/FlxSpriteGroup.hx",847,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(PixelPerfect,"PixelPerfect") HXLINE( 847) Sprite->set_pixelPerfectRender(PixelPerfect); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,pixelPerfectTransform,(void)) void FlxTypedSpriteGroup_obj::gColorTransform( ::flixel::FlxSprite Sprite,Int Color){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","gColorTransform",0x1fbe79c3,"flixel.group.FlxTypedSpriteGroup.gColorTransform","flixel/group/FlxSpriteGroup.hx",848,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Color,"Color") HXLINE( 848) Sprite->set_color(Color); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,gColorTransform,(void)) void FlxTypedSpriteGroup_obj::blendTransform( ::flixel::FlxSprite Sprite,::hx::EnumBase Blend){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","blendTransform",0x1d7b3ac8,"flixel.group.FlxTypedSpriteGroup.blendTransform","flixel/group/FlxSpriteGroup.hx",849,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Blend,"Blend") HXLINE( 849) Sprite->set_blend(Blend); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,blendTransform,(void)) void FlxTypedSpriteGroup_obj::immovableTransform( ::flixel::FlxSprite Sprite,Bool Immovable){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","immovableTransform",0x108fd76f,"flixel.group.FlxTypedSpriteGroup.immovableTransform","flixel/group/FlxSpriteGroup.hx",850,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Immovable,"Immovable") HXLINE( 850) Sprite->set_immovable(Immovable); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,immovableTransform,(void)) void FlxTypedSpriteGroup_obj::visibleTransform( ::flixel::FlxSprite Sprite,Bool Visible){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","visibleTransform",0x807eb3c7,"flixel.group.FlxTypedSpriteGroup.visibleTransform","flixel/group/FlxSpriteGroup.hx",851,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Visible,"Visible") HXLINE( 851) Sprite->set_visible(Visible); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,visibleTransform,(void)) void FlxTypedSpriteGroup_obj::activeTransform( ::flixel::FlxSprite Sprite,Bool Active){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","activeTransform",0x51542a39,"flixel.group.FlxTypedSpriteGroup.activeTransform","flixel/group/FlxSpriteGroup.hx",852,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Active,"Active") HXLINE( 852) Sprite->set_active(Active); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,activeTransform,(void)) void FlxTypedSpriteGroup_obj::solidTransform( ::flixel::FlxSprite Sprite,Bool Solid){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","solidTransform",0x242323ae,"flixel.group.FlxTypedSpriteGroup.solidTransform","flixel/group/FlxSpriteGroup.hx",853,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Solid,"Solid") HXLINE( 853) Sprite->set_solid(Solid); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,solidTransform,(void)) void FlxTypedSpriteGroup_obj::aliveTransform( ::flixel::FlxSprite Sprite,Bool Alive){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","aliveTransform",0x29096fcc,"flixel.group.FlxTypedSpriteGroup.aliveTransform","flixel/group/FlxSpriteGroup.hx",854,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Alive,"Alive") HXLINE( 854) Sprite->set_alive(Alive); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,aliveTransform,(void)) void FlxTypedSpriteGroup_obj::existsTransform( ::flixel::FlxSprite Sprite,Bool Exists){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","existsTransform",0xb2051b63,"flixel.group.FlxTypedSpriteGroup.existsTransform","flixel/group/FlxSpriteGroup.hx",855,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Exists,"Exists") HXLINE( 855) Sprite->set_exists(Exists); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,existsTransform,(void)) void FlxTypedSpriteGroup_obj::camerasTransform( ::flixel::FlxSprite Sprite,::Array< ::Dynamic> Cameras){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","camerasTransform",0x7f778a8b,"flixel.group.FlxTypedSpriteGroup.camerasTransform","flixel/group/FlxSpriteGroup.hx",856,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Cameras,"Cameras") HXLINE( 856) Sprite->set_cameras(Cameras); } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,camerasTransform,(void)) void FlxTypedSpriteGroup_obj::offsetTransform( ::flixel::FlxSprite Sprite, ::flixel::math::FlxPoint Offset){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","offsetTransform",0x35aa32cc,"flixel.group.FlxTypedSpriteGroup.offsetTransform","flixel/group/FlxSpriteGroup.hx",858,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Offset,"Offset") HXLINE( 858) HX_VARI( ::flixel::math::FlxPoint,_this) = Sprite->offset; HXDLIN( 858) _this->set_x(Offset->x); HXDLIN( 858) _this->set_y(Offset->y); HXDLIN( 858) Bool _hx_tmp = Offset->_weak; HXDLIN( 858) if (_hx_tmp) { HXLINE( 858) Offset->put(); } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,offsetTransform,(void)) void FlxTypedSpriteGroup_obj::originTransform( ::flixel::FlxSprite Sprite, ::flixel::math::FlxPoint Origin){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","originTransform",0x93cd4e19,"flixel.group.FlxTypedSpriteGroup.originTransform","flixel/group/FlxSpriteGroup.hx",859,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Origin,"Origin") HXLINE( 859) HX_VARI( ::flixel::math::FlxPoint,_this) = Sprite->origin; HXDLIN( 859) _this->set_x(Origin->x); HXDLIN( 859) _this->set_y(Origin->y); HXDLIN( 859) Bool _hx_tmp = Origin->_weak; HXDLIN( 859) if (_hx_tmp) { HXLINE( 859) Origin->put(); } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,originTransform,(void)) void FlxTypedSpriteGroup_obj::scaleTransform( ::flixel::FlxSprite Sprite, ::flixel::math::FlxPoint Scale){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","scaleTransform",0x4ec9456f,"flixel.group.FlxTypedSpriteGroup.scaleTransform","flixel/group/FlxSpriteGroup.hx",860,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(Scale,"Scale") HXLINE( 860) HX_VARI( ::flixel::math::FlxPoint,_this) = Sprite->scale; HXDLIN( 860) _this->set_x(Scale->x); HXDLIN( 860) _this->set_y(Scale->y); HXDLIN( 860) Bool _hx_tmp = Scale->_weak; HXDLIN( 860) if (_hx_tmp) { HXLINE( 860) Scale->put(); } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,scaleTransform,(void)) void FlxTypedSpriteGroup_obj::scrollFactorTransform( ::flixel::FlxSprite Sprite, ::flixel::math::FlxPoint ScrollFactor){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","scrollFactorTransform",0x4d8808c3,"flixel.group.FlxTypedSpriteGroup.scrollFactorTransform","flixel/group/FlxSpriteGroup.hx",861,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HX_STACK_ARG(ScrollFactor,"ScrollFactor") HXLINE( 861) HX_VARI( ::flixel::math::FlxPoint,_this) = Sprite->scrollFactor; HXDLIN( 861) _this->set_x(ScrollFactor->x); HXDLIN( 861) _this->set_y(ScrollFactor->y); HXDLIN( 861) Bool _hx_tmp = ScrollFactor->_weak; HXDLIN( 861) if (_hx_tmp) { HXLINE( 861) ScrollFactor->put(); } } HX_DEFINE_DYNAMIC_FUNC2(FlxTypedSpriteGroup_obj,scrollFactorTransform,(void)) void FlxTypedSpriteGroup_obj::offsetCallback( ::flixel::math::FlxPoint Offset){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","offsetCallback",0xeadd6065,"flixel.group.FlxTypedSpriteGroup.offsetCallback","flixel/group/FlxSpriteGroup.hx",864,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Offset,"Offset") HXLINE( 864) this->transformChildren_flixel_math_FlxPoint(this->offsetTransform_dyn(),Offset); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,offsetCallback,(void)) void FlxTypedSpriteGroup_obj::originCallback( ::flixel::math::FlxPoint Origin){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","originCallback",0xfa35edb8,"flixel.group.FlxTypedSpriteGroup.originCallback","flixel/group/FlxSpriteGroup.hx",865,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Origin,"Origin") HXLINE( 865) this->transformChildren_flixel_math_FlxPoint(this->originTransform_dyn(),Origin); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,originCallback,(void)) void FlxTypedSpriteGroup_obj::scaleCallback( ::flixel::math::FlxPoint Scale){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","scaleCallback",0xf9e6b322,"flixel.group.FlxTypedSpriteGroup.scaleCallback","flixel/group/FlxSpriteGroup.hx",866,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Scale,"Scale") HXLINE( 866) this->transformChildren_flixel_math_FlxPoint(this->scaleTransform_dyn(),Scale); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,scaleCallback,(void)) void FlxTypedSpriteGroup_obj::scrollFactorCallback( ::flixel::math::FlxPoint ScrollFactor){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","scrollFactorCallback",0x26aab64e,"flixel.group.FlxTypedSpriteGroup.scrollFactorCallback","flixel/group/FlxSpriteGroup.hx",867,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(ScrollFactor,"ScrollFactor") HXLINE( 867) this->transformChildren_flixel_math_FlxPoint(this->scrollFactorTransform_dyn(),ScrollFactor); } HX_DEFINE_DYNAMIC_FUNC1(FlxTypedSpriteGroup_obj,scrollFactorCallback,(void)) ::flixel::FlxSprite FlxTypedSpriteGroup_obj::loadGraphicFromSprite( ::flixel::FlxSprite Sprite){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","loadGraphicFromSprite",0x6f12dc84,"flixel.group.FlxTypedSpriteGroup.loadGraphicFromSprite","flixel/group/FlxSpriteGroup.hx",881,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Sprite,"Sprite") HXLINE( 881) return hx::ObjectPtr<OBJ_>(this); } ::flixel::FlxSprite FlxTypedSpriteGroup_obj::loadGraphic( ::Dynamic Graphic,hx::Null< Bool > __o_Animated,hx::Null< Int > __o_Width,hx::Null< Int > __o_Height,hx::Null< Bool > __o_Unique,::String Key){ Bool Animated = __o_Animated.Default(false); Int Width = __o_Width.Default(0); Int Height = __o_Height.Default(0); Bool Unique = __o_Unique.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","loadGraphic",0xb4356b15,"flixel.group.FlxTypedSpriteGroup.loadGraphic","flixel/group/FlxSpriteGroup.hx",890,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Graphic,"Graphic") HX_STACK_ARG(Animated,"Animated") HX_STACK_ARG(Width,"Width") HX_STACK_ARG(Height,"Height") HX_STACK_ARG(Unique,"Unique") HX_STACK_ARG(Key,"Key") HXLINE( 890) return hx::ObjectPtr<OBJ_>(this); } ::flixel::FlxSprite FlxTypedSpriteGroup_obj::loadRotatedGraphic( ::Dynamic Graphic,hx::Null< Int > __o_Rotations,hx::Null< Int > __o_Frame,hx::Null< Bool > __o_AntiAliasing,hx::Null< Bool > __o_AutoBuffer,::String Key){ Int Rotations = __o_Rotations.Default(16); Int Frame = __o_Frame.Default(-1); Bool AntiAliasing = __o_AntiAliasing.Default(false); Bool AutoBuffer = __o_AutoBuffer.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","loadRotatedGraphic",0x45e23732,"flixel.group.FlxTypedSpriteGroup.loadRotatedGraphic","flixel/group/FlxSpriteGroup.hx",902,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Graphic,"Graphic") HX_STACK_ARG(Rotations,"Rotations") HX_STACK_ARG(Frame,"Frame") HX_STACK_ARG(AntiAliasing,"AntiAliasing") HX_STACK_ARG(AutoBuffer,"AutoBuffer") HX_STACK_ARG(Key,"Key") HXLINE( 902) return hx::ObjectPtr<OBJ_>(this); } ::flixel::FlxSprite FlxTypedSpriteGroup_obj::makeGraphic(Int Width,Int Height,hx::Null< Int > __o__tmp_Color,hx::Null< Bool > __o_Unique,::String Key){ Int _tmp_Color = __o__tmp_Color.Default(-1); Bool Unique = __o_Unique.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","makeGraphic",0x27a1d44d,"flixel.group.FlxTypedSpriteGroup.makeGraphic","flixel/group/FlxSpriteGroup.hx",914,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Width,"Width") HX_STACK_ARG(Height,"Height") HX_STACK_ARG(_tmp_Color,"_tmp_Color") HX_STACK_ARG(Unique,"Unique") HX_STACK_ARG(Key,"Key") HXLINE( 914) HX_VARI( Int,Color) = _tmp_Color; HXDLIN( 914) return hx::ObjectPtr<OBJ_>(this); } ::openfl::_legacy::display::BitmapData FlxTypedSpriteGroup_obj::set_pixels( ::openfl::_legacy::display::BitmapData Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_pixels",0xc29e6ad7,"flixel.group.FlxTypedSpriteGroup.set_pixels","flixel/group/FlxSpriteGroup.hx",923,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 923) return Value; } ::flixel::graphics::frames::FlxFrame FlxTypedSpriteGroup_obj::set_frame( ::flixel::graphics::frames::FlxFrame Value){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_frame",0xf0f19fc3,"flixel.group.FlxTypedSpriteGroup.set_frame","flixel/group/FlxSpriteGroup.hx",932,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Value,"Value") HXLINE( 932) return Value; } ::openfl::_legacy::display::BitmapData FlxTypedSpriteGroup_obj::get_pixels(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","get_pixels",0xbf20cc63,"flixel.group.FlxTypedSpriteGroup.get_pixels","flixel/group/FlxSpriteGroup.hx",941,0xeb1fa7f3) HX_STACK_THIS(this) HXLINE( 941) return null(); } void FlxTypedSpriteGroup_obj::calcFrame(hx::Null< Bool > __o_RunOnCpp){ Bool RunOnCpp = __o_RunOnCpp.Default(false); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","calcFrame",0xbd00728b,"flixel.group.FlxTypedSpriteGroup.calcFrame","flixel/group/FlxSpriteGroup.hx",950,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(RunOnCpp,"RunOnCpp") } void FlxTypedSpriteGroup_obj::resetHelpers(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","resetHelpers",0x60f4ebe3,"flixel.group.FlxTypedSpriteGroup.resetHelpers","flixel/group/FlxSpriteGroup.hx",957,0xeb1fa7f3) HX_STACK_THIS(this) } void FlxTypedSpriteGroup_obj::stamp( ::flixel::FlxSprite Brush,hx::Null< Int > __o_X,hx::Null< Int > __o_Y){ Int X = __o_X.Default(0); Int Y = __o_Y.Default(0); HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","stamp",0x5cccf9b6,"flixel.group.FlxTypedSpriteGroup.stamp","flixel/group/FlxSpriteGroup.hx",962,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Brush,"Brush") HX_STACK_ARG(X,"X") HX_STACK_ARG(Y,"Y") } ::flixel::graphics::frames::FlxFramesCollection FlxTypedSpriteGroup_obj::set_frames( ::flixel::graphics::frames::FlxFramesCollection Frames){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","set_frames",0xe27a2b50,"flixel.group.FlxTypedSpriteGroup.set_frames","flixel/group/FlxSpriteGroup.hx",969,0xeb1fa7f3) HX_STACK_THIS(this) HX_STACK_ARG(Frames,"Frames") HXLINE( 969) return Frames; } void FlxTypedSpriteGroup_obj::updateColorTransform(){ HX_STACK_FRAME("flixel.group.FlxTypedSpriteGroup","updateColorTransform",0x64df671f,"flixel.group.FlxTypedSpriteGroup.updateColorTransform","flixel/group/FlxSpriteGroup.hx",975,0xeb1fa7f3) HX_STACK_THIS(this) } FlxTypedSpriteGroup_obj::FlxTypedSpriteGroup_obj() { } void FlxTypedSpriteGroup_obj::__Mark(HX_MARK_PARAMS) { HX_MARK_BEGIN_CLASS(FlxTypedSpriteGroup); HX_MARK_MEMBER_NAME(group,"group"); HX_MARK_MEMBER_NAME(members,"members"); HX_MARK_MEMBER_NAME(length,"length"); HX_MARK_MEMBER_NAME(_skipTransformChildren,"_skipTransformChildren"); HX_MARK_MEMBER_NAME(_sprites,"_sprites"); ::flixel::FlxSprite_obj::__Mark(HX_MARK_ARG); HX_MARK_END_CLASS(); } void FlxTypedSpriteGroup_obj::__Visit(HX_VISIT_PARAMS) { HX_VISIT_MEMBER_NAME(group,"group"); HX_VISIT_MEMBER_NAME(members,"members"); HX_VISIT_MEMBER_NAME(length,"length"); HX_VISIT_MEMBER_NAME(_skipTransformChildren,"_skipTransformChildren"); HX_VISIT_MEMBER_NAME(_sprites,"_sprites"); ::flixel::FlxSprite_obj::__Visit(HX_VISIT_ARG); } hx::Val FlxTypedSpriteGroup_obj::__Field(const ::String &inName,hx::PropertyAccess inCallProp) { switch(inName.length) { case 3: if (HX_FIELD_EQ(inName,"add") ) { return hx::Val( add_dyn()); } break; case 4: if (HX_FIELD_EQ(inName,"draw") ) { return hx::Val( draw_dyn()); } if (HX_FIELD_EQ(inName,"sort") ) { return hx::Val( sort_dyn()); } if (HX_FIELD_EQ(inName,"kill") ) { return hx::Val( kill_dyn()); } break; case 5: if (HX_FIELD_EQ(inName,"group") ) { return hx::Val( group); } if (HX_FIELD_EQ(inName,"clone") ) { return hx::Val( clone_dyn()); } if (HX_FIELD_EQ(inName,"clear") ) { return hx::Val( clear_dyn()); } if (HX_FIELD_EQ(inName,"reset") ) { return hx::Val( reset_dyn()); } if (HX_FIELD_EQ(inName,"set_x") ) { return hx::Val( set_x_dyn()); } if (HX_FIELD_EQ(inName,"set_y") ) { return hx::Val( set_y_dyn()); } if (HX_FIELD_EQ(inName,"stamp") ) { return hx::Val( stamp_dyn()); } break; case 6: if (HX_FIELD_EQ(inName,"length") ) { return hx::Val( inCallProp == hx::paccAlways ? get_length() : length); } if (HX_FIELD_EQ(inName,"update") ) { return hx::Val( update_dyn()); } if (HX_FIELD_EQ(inName,"remove") ) { return hx::Val( remove_dyn()); } if (HX_FIELD_EQ(inName,"revive") ) { return hx::Val( revive_dyn()); } break; case 7: if (HX_FIELD_EQ(inName,"members") ) { return hx::Val( inCallProp == hx::paccAlways ? get_members() : members); } if (HX_FIELD_EQ(inName,"maxSize") ) { if (inCallProp == hx::paccAlways) return hx::Val(get_maxSize()); } if (HX_FIELD_EQ(inName,"destroy") ) { return hx::Val( destroy_dyn()); } if (HX_FIELD_EQ(inName,"recycle") ) { return hx::Val( recycle_dyn()); } if (HX_FIELD_EQ(inName,"replace") ) { return hx::Val( replace_dyn()); } if (HX_FIELD_EQ(inName,"forEach") ) { return hx::Val( forEach_dyn()); } break; case 8: if (HX_FIELD_EQ(inName,"_sprites") ) { return hx::Val( _sprites); } if (HX_FIELD_EQ(inName,"initVars") ) { return hx::Val( initVars_dyn()); } if (HX_FIELD_EQ(inName,"iterator") ) { return hx::Val( iterator_dyn()); } break; case 9: if (HX_FIELD_EQ(inName,"countDead") ) { return hx::Val( countDead_dyn()); } if (HX_FIELD_EQ(inName,"getRandom") ) { return hx::Val( getRandom_dyn()); } if (HX_FIELD_EQ(inName,"set_alive") ) { return hx::Val( set_alive_dyn()); } if (HX_FIELD_EQ(inName,"set_angle") ) { return hx::Val( set_angle_dyn()); } if (HX_FIELD_EQ(inName,"set_alpha") ) { return hx::Val( set_alpha_dyn()); } if (HX_FIELD_EQ(inName,"set_flipX") ) { return hx::Val( set_flipX_dyn()); } if (HX_FIELD_EQ(inName,"set_flipY") ) { return hx::Val( set_flipY_dyn()); } if (HX_FIELD_EQ(inName,"set_moves") ) { return hx::Val( set_moves_dyn()); } if (HX_FIELD_EQ(inName,"set_solid") ) { return hx::Val( set_solid_dyn()); } if (HX_FIELD_EQ(inName,"set_color") ) { return hx::Val( set_color_dyn()); } if (HX_FIELD_EQ(inName,"set_blend") ) { return hx::Val( set_blend_dyn()); } if (HX_FIELD_EQ(inName,"set_width") ) { return hx::Val( set_width_dyn()); } if (HX_FIELD_EQ(inName,"get_width") ) { return hx::Val( get_width_dyn()); } if (HX_FIELD_EQ(inName,"set_frame") ) { return hx::Val( set_frame_dyn()); } if (HX_FIELD_EQ(inName,"calcFrame") ) { return hx::Val( calcFrame_dyn()); } break; case 10: if (HX_FIELD_EQ(inName,"isOnScreen") ) { return hx::Val( isOnScreen_dyn()); } if (HX_FIELD_EQ(inName,"set_exists") ) { return hx::Val( set_exists_dyn()); } if (HX_FIELD_EQ(inName,"set_active") ) { return hx::Val( set_active_dyn()); } if (HX_FIELD_EQ(inName,"set_facing") ) { return hx::Val( set_facing_dyn()); } if (HX_FIELD_EQ(inName,"set_height") ) { return hx::Val( set_height_dyn()); } if (HX_FIELD_EQ(inName,"get_height") ) { return hx::Val( get_height_dyn()); } if (HX_FIELD_EQ(inName,"get_length") ) { return hx::Val( get_length_dyn()); } if (HX_FIELD_EQ(inName,"xTransform") ) { return hx::Val( xTransform_dyn()); } if (HX_FIELD_EQ(inName,"yTransform") ) { return hx::Val( yTransform_dyn()); } if (HX_FIELD_EQ(inName,"set_pixels") ) { return hx::Val( set_pixels_dyn()); } if (HX_FIELD_EQ(inName,"get_pixels") ) { return hx::Val( get_pixels_dyn()); } if (HX_FIELD_EQ(inName,"set_frames") ) { return hx::Val( set_frames_dyn()); } break; case 11: if (HX_FIELD_EQ(inName,"countLiving") ) { return hx::Val( countLiving_dyn()); } if (HX_FIELD_EQ(inName,"forEachDead") ) { return hx::Val( forEachDead_dyn()); } if (HX_FIELD_EQ(inName,"setPosition") ) { return hx::Val( setPosition_dyn()); } if (HX_FIELD_EQ(inName,"set_cameras") ) { return hx::Val( set_cameras_dyn()); } if (HX_FIELD_EQ(inName,"set_visible") ) { return hx::Val( set_visible_dyn()); } if (HX_FIELD_EQ(inName,"get_maxSize") ) { return hx::Val( get_maxSize_dyn()); } if (HX_FIELD_EQ(inName,"set_maxSize") ) { return hx::Val( set_maxSize_dyn()); } if (HX_FIELD_EQ(inName,"get_members") ) { return hx::Val( get_members_dyn()); } if (HX_FIELD_EQ(inName,"loadGraphic") ) { return hx::Val( loadGraphic_dyn()); } if (HX_FIELD_EQ(inName,"makeGraphic") ) { return hx::Val( makeGraphic_dyn()); } break; case 12: if (HX_FIELD_EQ(inName,"replaceColor") ) { return hx::Val( replaceColor_dyn()); } if (HX_FIELD_EQ(inName,"getFirstNull") ) { return hx::Val( getFirstNull_dyn()); } if (HX_FIELD_EQ(inName,"getFirstDead") ) { return hx::Val( getFirstDead_dyn()); } if (HX_FIELD_EQ(inName,"forEachAlive") ) { return hx::Val( forEachAlive_dyn()); } if (HX_FIELD_EQ(inName,"resetHelpers") ) { return hx::Val( resetHelpers_dyn()); } break; case 13: if (HX_FIELD_EQ(inName,"overlapsPoint") ) { return hx::Val( overlapsPoint_dyn()); } if (HX_FIELD_EQ(inName,"getFirstAlive") ) { return hx::Val( getFirstAlive_dyn()); } if (HX_FIELD_EQ(inName,"forEachExists") ) { return hx::Val( forEachExists_dyn()); } if (HX_FIELD_EQ(inName,"forEachOfType") ) { return hx::Val( forEachOfType_dyn()); } if (HX_FIELD_EQ(inName,"set_immovable") ) { return hx::Val( set_immovable_dyn()); } if (HX_FIELD_EQ(inName,"scaleCallback") ) { return hx::Val( scaleCallback_dyn()); } break; case 14: if (HX_FIELD_EQ(inName,"angleTransform") ) { return hx::Val( angleTransform_dyn()); } if (HX_FIELD_EQ(inName,"alphaTransform") ) { return hx::Val( alphaTransform_dyn()); } if (HX_FIELD_EQ(inName,"flipXTransform") ) { return hx::Val( flipXTransform_dyn()); } if (HX_FIELD_EQ(inName,"flipYTransform") ) { return hx::Val( flipYTransform_dyn()); } if (HX_FIELD_EQ(inName,"movesTransform") ) { return hx::Val( movesTransform_dyn()); } if (HX_FIELD_EQ(inName,"blendTransform") ) { return hx::Val( blendTransform_dyn()); } if (HX_FIELD_EQ(inName,"solidTransform") ) { return hx::Val( solidTransform_dyn()); } if (HX_FIELD_EQ(inName,"aliveTransform") ) { return hx::Val( aliveTransform_dyn()); } if (HX_FIELD_EQ(inName,"scaleTransform") ) { return hx::Val( scaleTransform_dyn()); } if (HX_FIELD_EQ(inName,"offsetCallback") ) { return hx::Val( offsetCallback_dyn()); } if (HX_FIELD_EQ(inName,"originCallback") ) { return hx::Val( originCallback_dyn()); } break; case 15: if (HX_FIELD_EQ(inName,"facingTransform") ) { return hx::Val( facingTransform_dyn()); } if (HX_FIELD_EQ(inName,"gColorTransform") ) { return hx::Val( gColorTransform_dyn()); } if (HX_FIELD_EQ(inName,"activeTransform") ) { return hx::Val( activeTransform_dyn()); } if (HX_FIELD_EQ(inName,"existsTransform") ) { return hx::Val( existsTransform_dyn()); } if (HX_FIELD_EQ(inName,"offsetTransform") ) { return hx::Val( offsetTransform_dyn()); } if (HX_FIELD_EQ(inName,"originTransform") ) { return hx::Val( originTransform_dyn()); } break; case 16: if (HX_FIELD_EQ(inName,"getFirstExisting") ) { return hx::Val( getFirstExisting_dyn()); } if (HX_FIELD_EQ(inName,"visibleTransform") ) { return hx::Val( visibleTransform_dyn()); } if (HX_FIELD_EQ(inName,"camerasTransform") ) { return hx::Val( camerasTransform_dyn()); } break; case 17: if (HX_FIELD_EQ(inName,"getFirstAvailable") ) { return hx::Val( getFirstAvailable_dyn()); } break; case 18: if (HX_FIELD_EQ(inName,"pixelsOverlapPoint") ) { return hx::Val( pixelsOverlapPoint_dyn()); } if (HX_FIELD_EQ(inName,"immovableTransform") ) { return hx::Val( immovableTransform_dyn()); } if (HX_FIELD_EQ(inName,"loadRotatedGraphic") ) { return hx::Val( loadRotatedGraphic_dyn()); } break; case 20: if (HX_FIELD_EQ(inName,"scrollFactorCallback") ) { return hx::Val( scrollFactorCallback_dyn()); } if (HX_FIELD_EQ(inName,"updateColorTransform") ) { return hx::Val( updateColorTransform_dyn()); } break; case 21: if (HX_FIELD_EQ(inName,"transformChildren_Int") ) { return hx::Val( transformChildren_Int_dyn()); } if (HX_FIELD_EQ(inName,"pixelPerfectTransform") ) { return hx::Val( pixelPerfectTransform_dyn()); } if (HX_FIELD_EQ(inName,"scrollFactorTransform") ) { return hx::Val( scrollFactorTransform_dyn()); } if (HX_FIELD_EQ(inName,"loadGraphicFromSprite") ) { return hx::Val( loadGraphicFromSprite_dyn()); } break; case 22: if (HX_FIELD_EQ(inName,"transformChildren_Bool") ) { return hx::Val( transformChildren_Bool_dyn()); } if (HX_FIELD_EQ(inName,"_skipTransformChildren") ) { return hx::Val( _skipTransformChildren); } if (HX_FIELD_EQ(inName,"set_pixelPerfectRender") ) { return hx::Val( set_pixelPerfectRender_dyn()); } break; case 23: if (HX_FIELD_EQ(inName,"transformChildren_Float") ) { return hx::Val( transformChildren_Float_dyn()); } break; case 28: if (HX_FIELD_EQ(inName,"multiTransformChildren_Float") ) { return hx::Val( multiTransformChildren_Float_dyn()); } break; case 38: if (HX_FIELD_EQ(inName,"transformChildren_flixel_math_FlxPoint") ) { return hx::Val( transformChildren_flixel_math_FlxPoint_dyn()); } break; case 40: if (HX_FIELD_EQ(inName,"transformChildren_Array_flixel_FlxCamera") ) { return hx::Val( transformChildren_Array_flixel_FlxCamera_dyn()); } break; case 50: if (HX_FIELD_EQ(inName,"transformChildren_openfl__legacy_display_BlendMode") ) { return hx::Val( transformChildren_openfl__legacy_display_BlendMode_dyn()); } } return super::__Field(inName,inCallProp); } hx::Val FlxTypedSpriteGroup_obj::__SetField(const ::String &inName,const hx::Val &inValue,hx::PropertyAccess inCallProp) { switch(inName.length) { case 5: if (HX_FIELD_EQ(inName,"group") ) { group=inValue.Cast< ::flixel::group::FlxTypedGroup >(); return inValue; } break; case 6: if (HX_FIELD_EQ(inName,"length") ) { length=inValue.Cast< Int >(); return inValue; } break; case 7: if (HX_FIELD_EQ(inName,"members") ) { members=inValue.Cast< ::cpp::VirtualArray >(); return inValue; } if (HX_FIELD_EQ(inName,"maxSize") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_maxSize(inValue) ); } break; case 8: if (HX_FIELD_EQ(inName,"_sprites") ) { _sprites=inValue.Cast< ::Array< ::Dynamic> >(); return inValue; } break; case 22: if (HX_FIELD_EQ(inName,"_skipTransformChildren") ) { _skipTransformChildren=inValue.Cast< Bool >(); return inValue; } } return super::__SetField(inName,inValue,inCallProp); } void FlxTypedSpriteGroup_obj::__GetFields(Array< ::String> &outFields) { outFields->push(HX_HCSTRING("group","\x3f","\xb3","\xf4","\x99")); outFields->push(HX_HCSTRING("members","\xd9","\x2c","\x70","\x1a")); outFields->push(HX_HCSTRING("length","\xe6","\x94","\x07","\x9f")); outFields->push(HX_HCSTRING("maxSize","\x85","\xf9","\x83","\xcc")); outFields->push(HX_HCSTRING("_skipTransformChildren","\x8d","\x52","\xb5","\x7c")); outFields->push(HX_HCSTRING("_sprites","\x4f","\x02","\x43","\x99")); super::__GetFields(outFields); }; #if HXCPP_SCRIPTABLE static hx::StorageInfo FlxTypedSpriteGroup_obj_sMemberStorageInfo[] = { {hx::fsObject /*::flixel::group::FlxTypedGroup*/ ,(int)offsetof(FlxTypedSpriteGroup_obj,group),HX_HCSTRING("group","\x3f","\xb3","\xf4","\x99")}, {hx::fsObject /*cpp::ArrayBase*/ ,(int)offsetof(FlxTypedSpriteGroup_obj,members),HX_HCSTRING("members","\xd9","\x2c","\x70","\x1a")}, {hx::fsInt,(int)offsetof(FlxTypedSpriteGroup_obj,length),HX_HCSTRING("length","\xe6","\x94","\x07","\x9f")}, {hx::fsBool,(int)offsetof(FlxTypedSpriteGroup_obj,_skipTransformChildren),HX_HCSTRING("_skipTransformChildren","\x8d","\x52","\xb5","\x7c")}, {hx::fsObject /*Array< ::Dynamic >*/ ,(int)offsetof(FlxTypedSpriteGroup_obj,_sprites),HX_HCSTRING("_sprites","\x4f","\x02","\x43","\x99")}, { hx::fsUnknown, 0, null()} }; static hx::StaticInfo *FlxTypedSpriteGroup_obj_sStaticStorageInfo = 0; #endif static ::String FlxTypedSpriteGroup_obj_sMemberFields[] = { HX_HCSTRING("transformChildren_openfl__legacy_display_BlendMode","\xe5","\x33","\xca","\x25"), HX_HCSTRING("transformChildren_Int","\x1b","\x1a","\x96","\x58"), HX_HCSTRING("transformChildren_Float","\xc8","\x75","\x5b","\x82"), HX_HCSTRING("transformChildren_Bool","\x7e","\xfd","\x20","\x26"), HX_HCSTRING("transformChildren_Array_flixel_FlxCamera","\xae","\x0c","\xc0","\xd3"), HX_HCSTRING("multiTransformChildren_Float","\x4f","\x02","\xe4","\x0f"), HX_HCSTRING("transformChildren_flixel_math_FlxPoint","\x06","\x0c","\xc3","\x75"), HX_HCSTRING("group","\x3f","\xb3","\xf4","\x99"), HX_HCSTRING("members","\xd9","\x2c","\x70","\x1a"), HX_HCSTRING("length","\xe6","\x94","\x07","\x9f"), HX_HCSTRING("_skipTransformChildren","\x8d","\x52","\xb5","\x7c"), HX_HCSTRING("_sprites","\x4f","\x02","\x43","\x99"), HX_HCSTRING("initVars","\xdc","\x5a","\x00","\x53"), HX_HCSTRING("destroy","\xfa","\x2c","\x86","\x24"), HX_HCSTRING("clone","\x5d","\x13","\x63","\x48"), HX_HCSTRING("isOnScreen","\xf5","\x43","\xb9","\xa1"), HX_HCSTRING("overlapsPoint","\xa4","\xc5","\xbd","\x35"), HX_HCSTRING("pixelsOverlapPoint","\x16","\x82","\x44","\xe0"), HX_HCSTRING("update","\x09","\x86","\x05","\x87"), HX_HCSTRING("draw","\x04","\x2c","\x70","\x42"), HX_HCSTRING("replaceColor","\x8f","\x5c","\xeb","\x3d"), HX_HCSTRING("add","\x21","\xf2","\x49","\x00"), HX_HCSTRING("recycle","\x13","\x10","\x8c","\x37"), HX_HCSTRING("remove","\x44","\x9c","\x88","\x04"), HX_HCSTRING("replace","\x34","\x48","\x28","\xab"), HX_HCSTRING("sort","\x5e","\x27","\x58","\x4c"), HX_HCSTRING("getFirstAvailable","\xaf","\xea","\xb3","\x05"), HX_HCSTRING("getFirstNull","\x61","\xb7","\x33","\x0f"), HX_HCSTRING("getFirstExisting","\x65","\xa4","\x6c","\xee"), HX_HCSTRING("getFirstAlive","\xb3","\x09","\xe2","\xbb"), HX_HCSTRING("getFirstDead","\x7e","\x67","\x8b","\x08"), HX_HCSTRING("countLiving","\x58","\xd9","\x8a","\x30"), HX_HCSTRING("countDead","\x13","\xd3","\x86","\x54"), HX_HCSTRING("getRandom","\x39","\xab","\xe5","\x33"), HX_HCSTRING("iterator","\xee","\x49","\x9a","\x93"), HX_HCSTRING("forEach","\xaa","\x29","\xbe","\xc4"), HX_HCSTRING("forEachAlive","\xc3","\x61","\xb7","\x99"), HX_HCSTRING("forEachDead","\x6e","\xc1","\xe4","\x78"), HX_HCSTRING("forEachExists","\x26","\x57","\xf8","\x68"), HX_HCSTRING("forEachOfType","\xbb","\x90","\x76","\xfd"), HX_HCSTRING("clear","\x8d","\x71","\x5b","\x48"), HX_HCSTRING("kill","\x9e","\xdf","\x09","\x47"), HX_HCSTRING("revive","\x55","\xfa","\x76","\x0a"), HX_HCSTRING("reset","\xcf","\x49","\xc8","\xe6"), HX_HCSTRING("setPosition","\x6b","\x6a","\x5b","\xfb"), HX_HCSTRING("set_cameras","\x51","\xf1","\x98","\x73"), HX_HCSTRING("set_exists","\x19","\x2c","\xe5","\xb3"), HX_HCSTRING("set_visible","\x95","\xdf","\x8b","\x33"), HX_HCSTRING("set_active","\x03","\x50","\x4b","\x0a"), HX_HCSTRING("set_alive","\x30","\xac","\x8b","\x48"), HX_HCSTRING("set_x","\x5b","\x9b","\x2f","\x7a"), HX_HCSTRING("set_y","\x5c","\x9b","\x2f","\x7a"), HX_HCSTRING("set_angle","\x36","\x8c","\xdc","\x49"), HX_HCSTRING("set_alpha","\xc1","\xef","\x90","\x48"), HX_HCSTRING("set_facing","\x57","\x4d","\x0a","\xd8"), HX_HCSTRING("set_flipX","\x6e","\x8d","\x8c","\x29"), HX_HCSTRING("set_flipY","\x6f","\x8d","\x8c","\x29"), HX_HCSTRING("set_moves","\xa5","\x14","\x60","\x33"), HX_HCSTRING("set_immovable","\xed","\xdc","\xd9","\x2d"), HX_HCSTRING("set_solid","\x8e","\xfc","\xbf","\xa7"), HX_HCSTRING("set_color","\xc6","\xb9","\x56","\x71"), HX_HCSTRING("set_blend","\xb4","\x30","\xef","\xdb"), HX_HCSTRING("set_pixelPerfectRender","\x9a","\x4f","\x8f","\xbc"), HX_HCSTRING("set_width","\x69","\xfe","\x5c","\xf1"), HX_HCSTRING("get_width","\x5d","\x12","\x0c","\x0e"), HX_HCSTRING("set_height","\x24","\x16","\x51","\xf6"), HX_HCSTRING("get_height","\xb0","\x77","\xd3","\xf2"), HX_HCSTRING("get_length","\xaf","\x04","\x8f","\x8f"), HX_HCSTRING("get_maxSize","\x9c","\x59","\x7e","\x52"), HX_HCSTRING("set_maxSize","\xa8","\x60","\xeb","\x5c"), HX_HCSTRING("get_members","\xf0","\x8c","\x6a","\xa0"), HX_HCSTRING("xTransform","\xd4","\x3d","\x4e","\x0a"), HX_HCSTRING("yTransform","\xb3","\xb5","\x98","\xca"), HX_HCSTRING("angleTransform","\x19","\x37","\x04","\x53"), HX_HCSTRING("alphaTransform","\x2e","\x8a","\x9a","\x12"), HX_HCSTRING("facingTransform","\xf2","\x1a","\xd1","\xb5"), HX_HCSTRING("flipXTransform","\xe1","\x4e","\x16","\x58"), HX_HCSTRING("flipYTransform","\xc0","\xc6","\x60","\x18"), HX_HCSTRING("movesTransform","\xca","\xa8","\x19","\x91"), HX_HCSTRING("pixelPerfectTransform","\x45","\xcd","\x91","\xea"), HX_HCSTRING("gColorTransform","\x50","\xb2","\xd2","\x48"), HX_HCSTRING("blendTransform","\xdb","\x12","\x24","\x48"), HX_HCSTRING("immovableTransform","\x02","\xb5","\x21","\x2d"), HX_HCSTRING("visibleTransform","\x9a","\xf6","\x1b","\x49"), HX_HCSTRING("activeTransform","\xc6","\x62","\x68","\x7a"), HX_HCSTRING("solidTransform","\xc1","\xfb","\xcb","\x4e"), HX_HCSTRING("aliveTransform","\xdf","\x47","\xb2","\x53"), HX_HCSTRING("existsTransform","\xf0","\x53","\x19","\xdb"), HX_HCSTRING("camerasTransform","\x5e","\xcd","\x14","\x48"), HX_HCSTRING("offsetTransform","\x59","\x6b","\xbe","\x5e"), HX_HCSTRING("originTransform","\xa6","\x86","\xe1","\xbc"), HX_HCSTRING("scaleTransform","\x82","\x1d","\x72","\x79"), HX_HCSTRING("scrollFactorTransform","\x10","\xa9","\xe8","\x16"), HX_HCSTRING("offsetCallback","\x78","\x38","\x86","\x15"), HX_HCSTRING("originCallback","\xcb","\xc5","\xde","\x24"), HX_HCSTRING("scaleCallback","\x6f","\xbe","\x27","\x48"), HX_HCSTRING("scrollFactorCallback","\xa1","\x5e","\x9d","\xf1"), HX_HCSTRING("loadGraphicFromSprite","\xd1","\x7c","\x73","\x38"), HX_HCSTRING("loadGraphic","\x22","\x19","\xa5","\x44"), HX_HCSTRING("loadRotatedGraphic","\xc5","\x14","\x74","\x62"), HX_HCSTRING("makeGraphic","\x5a","\x82","\x11","\xb8"), HX_HCSTRING("set_pixels","\x6a","\xfd","\xae","\x80"), HX_HCSTRING("set_frame","\x90","\xc0","\x7d","\x2d"), HX_HCSTRING("get_pixels","\xf6","\x5e","\x31","\x7d"), HX_HCSTRING("calcFrame","\x58","\x93","\x8c","\xf9"), HX_HCSTRING("resetHelpers","\x36","\x89","\x3d","\x32"), HX_HCSTRING("stamp","\x03","\x70","\x0b","\x84"), HX_HCSTRING("set_frames","\xe3","\xbd","\x8a","\xa0"), HX_HCSTRING("updateColorTransform","\x72","\x0f","\xd2","\x2f"), ::String(null()) }; static void FlxTypedSpriteGroup_obj_sMarkStatics(HX_MARK_PARAMS) { HX_MARK_MEMBER_NAME(FlxTypedSpriteGroup_obj::__mClass,"__mClass"); }; #ifdef HXCPP_VISIT_ALLOCS static void FlxTypedSpriteGroup_obj_sVisitStatics(HX_VISIT_PARAMS) { HX_VISIT_MEMBER_NAME(FlxTypedSpriteGroup_obj::__mClass,"__mClass"); }; #endif hx::Class FlxTypedSpriteGroup_obj::__mClass; void FlxTypedSpriteGroup_obj::__register() { hx::Static(__mClass) = new hx::Class_obj(); __mClass->mName = HX_HCSTRING("flixel.group.FlxTypedSpriteGroup","\xe1","\xd1","\x86","\xf9"); __mClass->mSuper = &super::__SGetClass(); __mClass->mConstructEmpty = &__CreateEmpty; __mClass->mConstructArgs = &__Create; __mClass->mGetStaticField = &hx::Class_obj::GetNoStaticField; __mClass->mSetStaticField = &hx::Class_obj::SetNoStaticField; __mClass->mMarkFunc = FlxTypedSpriteGroup_obj_sMarkStatics; __mClass->mStatics = hx::Class_obj::dupFunctions(0 /* sStaticFields */); __mClass->mMembers = hx::Class_obj::dupFunctions(FlxTypedSpriteGroup_obj_sMemberFields); __mClass->mCanCast = hx::TCanCast< FlxTypedSpriteGroup_obj >; #ifdef HXCPP_VISIT_ALLOCS __mClass->mVisitFunc = FlxTypedSpriteGroup_obj_sVisitStatics; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mMemberStorageInfo = FlxTypedSpriteGroup_obj_sMemberStorageInfo; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mStaticStorageInfo = FlxTypedSpriteGroup_obj_sStaticStorageInfo; #endif hx::_hx_RegisterClass(__mClass->mName, __mClass); } } // end namespace flixel } // end namespace group
[ "azlen@livingcode.org" ]
azlen@livingcode.org
15419330440fd257f86d1382598aa93972373ac0
87febda1eb6c6d1f28374414f3485f4ac7bc7b90
/i2c/i2c.h
4d08ce0d5c3816b78de0f1e41218fa5f34b71a9c
[ "BSD-2-Clause" ]
permissive
pgbaum/bbExamples
3e7a72d5edc4a8ee9e709449bd94769db306381e
9c90dedd6e993f6c13114e0973913b66f83e8787
refs/heads/master
2020-05-19T10:52:09.943913
2014-03-11T20:25:10
2014-03-11T20:25:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
384
h
#ifndef I2C_H_INCLUDED #define I2C_H_INCLUDED #include <cstdint> class I2C { private: int dev; void registerClient( int addr ); public: // TODO: allow more than one device I2C( const char *device, int address ); ~I2C( ); void write1( uint8_t cmd, uint8_t val ) { write( cmd, &val, 1 ); } void write( uint8_t cmd, uint8_t *p, int n ); }; #endif
[ "peter@dr-baum.net" ]
peter@dr-baum.net
6f17c6b5f24d51bc2676dae2c0cd7cd8757c00b8
792e697ba0f9c11ef10b7de81edb1161a5580cfb
/tools/clang/test/CodeGen/temporary-lifetime.cpp
af1907cb99158dc8b691c438dffcf8bfc60441f6
[ "Apache-2.0", "LLVM-exception", "NCSA" ]
permissive
opencor/llvmclang
9eb76cb6529b6a3aab2e6cd266ef9751b644f753
63b45a7928f2a8ff823db51648102ea4822b74a6
refs/heads/master
2023-08-26T04:52:56.472505
2022-11-02T04:35:46
2022-11-03T03:55:06
115,094,625
0
1
Apache-2.0
2021-08-12T22:29:21
2017-12-22T08:29:14
LLVM
UTF-8
C++
false
false
6,262
cpp
// RUN: %clang_cc1 -disable-noundef-analysis %s -std=c++11 -O1 -DWITH_DTOR -triple x86_64 -emit-llvm -o - | FileCheck -check-prefix=CHECK-DTOR %s // RUN: %clang_cc1 -disable-noundef-analysis %s -std=c++11 -O1 -triple x86_64 -emit-llvm -o - | FileCheck -check-prefix=CHECK-NO-DTOR %s struct A { A(); #ifdef WITH_DTOR ~A(); #endif char a[1024]; operator bool() const; }; template <typename T> void Foo(T &&); template <typename T> void Bar(T &&); template <typename T> T Baz(); void Test1() { // CHECK-DTOR-LABEL: Test1 // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR:[^ ]+]]) // CHECK-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-DTOR: call void @_ZN1AD1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR]]) // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR]]) // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR:[^ ]+]]) // CHECK-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-DTOR: call void @_ZN1AD1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR]]) // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR]]) // CHECK-DTOR: } // CHECK-NO-DTOR-LABEL: Test1 // CHECK-NO-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-NO-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR:[^ ]+]]) // CHECK-NO-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-NO-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR]]) // CHECK-NO-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-NO-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR:[^ ]+]]) // CHECK-NO-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-NO-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR]]) // CHECK-NO-DTOR: } { const A &a = A{}; Foo(a); } { const A &a = A{}; Foo(a); } } void Test2() { // CHECK-DTOR-LABEL: Test2 // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR1:[0-9]+]]) // CHECK-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR1:[^ ]+]]) // CHECK-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR2:[0-9]+]]) // CHECK-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR2:[^ ]+]]) // CHECK-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-DTOR: call void @_ZN1AD1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR2]]) // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR2]]) // CHECK-DTOR: call void @_ZN1AD1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR1]]) // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR1]]) // CHECK-DTOR: } // CHECK-NO-DTOR-LABEL: Test2 // CHECK-NO-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR1:[0-9]+]]) // CHECK-NO-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR1:[^ ]+]]) // CHECK-NO-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-NO-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR2:[0-9]+]]) // CHECK-NO-DTOR: call void @_ZN1AC1Ev(%struct.A* nonnull {{[^,]*}} %[[VAR2:[^ ]+]]) // CHECK-NO-DTOR: call void @_Z3FooIRK1AEvOT_ // CHECK-NO-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR2]]) // CHECK-NO-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR1]]) // CHECK-NO-DTOR: } const A &a = A{}; Foo(a); const A &b = A{}; Foo(b); } void Test3() { // CHECK-DTOR-LABEL: Test3 // CHECK-DTOR: call void @llvm.lifetime.start // CHECK-DTOR: call void @llvm.lifetime.start // if.then: // CHECK-DTOR: call void @llvm.lifetime.end // cleanup: // CHECK-DTOR: call void @llvm.lifetime.end // cleanup: // CHECK-DTOR: call void @llvm.lifetime.end // CHECK-DTOR: } const A &a = A{}; if (const A &b = A(a)) { Foo(b); return; } Bar(a); } void Test4() { // CHECK-DTOR-LABEL: Test4 // CHECK-DTOR: call void @llvm.lifetime.start // for.cond.cleanup: // CHECK-DTOR: call void @llvm.lifetime.end // for.body: // CHECK-DTOR: } for (const A &a = A{}; a;) { Foo(a); } } int Test5() { // CHECK-DTOR-LABEL: Test5 // CHECK-DTOR: call void @llvm.lifetime.start // CHECK-DTOR: call i32 @_Z3BazIiET_v() // CHECK-DTOR: store // CHECK-DTOR: call void @_Z3FooIRKiEvOT_ // CHECK-DTOR: load // CHECK-DTOR: call void @llvm.lifetime.end // CHECK-DTOR: } const int &a = Baz<int>(); Foo(a); return a; } void Test6() { // CHECK-DTOR-LABEL: Test6 // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 {{[0-9]+}}, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-DTOR: call i32 @_Z3BazIiET_v() // CHECK-DTOR: store // CHECK-DTOR: call void @_Z3FooIiEvOT_ // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 {{[0-9]+}}, i8* nonnull %[[ADDR]]) // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 {{[0-9]+}}, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-DTOR: call i32 @_Z3BazIiET_v() // CHECK-DTOR: store // CHECK-DTOR: call void @_Z3FooIiEvOT_ // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 {{[0-9]+}}, i8* nonnull %[[ADDR]]) // CHECK-DTOR: } Foo(Baz<int>()); Foo(Baz<int>()); } void Test7() { // CHECK-DTOR-LABEL: Test7 // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-DTOR: call void @_Z3BazI1AET_v({{.*}} %[[SLOT:[^ ]+]]) // CHECK-DTOR: call void @_Z3FooI1AEvOT_({{.*}} %[[SLOT]]) // CHECK-DTOR: call void @_ZN1AD1Ev(%struct.A* nonnull {{[^,]*}} %[[SLOT]]) // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR]]) // CHECK-DTOR: call void @llvm.lifetime.start.p0i8(i64 1024, i8* nonnull %[[ADDR:[0-9]+]]) // CHECK-DTOR: call void @_Z3BazI1AET_v({{.*}} %[[SLOT:[^ ]+]]) // CHECK-DTOR: call void @_Z3FooI1AEvOT_({{.*}} %[[SLOT]]) // CHECK-DTOR: call void @_ZN1AD1Ev(%struct.A* nonnull {{[^,]*}} %[[SLOT]]) // CHECK-DTOR: call void @llvm.lifetime.end.p0i8(i64 1024, i8* nonnull %[[ADDR]]) // CHECK-DTOR: } Foo(Baz<A>()); Foo(Baz<A>()); }
[ "agarny@hellix.com" ]
agarny@hellix.com
a0d880b2b88fd407f1e2d54855d71d6a3c1f6d42
a7c4aca213a2a6450b37609d395a887c6a96e049
/monsterbreaker/Classes/DoubleBrick.cpp
4224b875b951715336c35d3fa43108b6f42bf472
[]
no_license
ilhaeYe/MB
ba6172fbde53d1ca03b11e2243b6f4c797df29a7
9d4d6e9aa8fdfb6205ba5a6ebca7b6ec8f24e9e5
refs/heads/master
2020-12-25T17:56:14.480060
2018-07-15T20:45:27
2018-07-15T20:45:27
38,498,603
0
1
null
null
null
null
UTF-8
C++
false
false
1,024
cpp
#include "DoubleBrick.h" USING_NS_CC; DoubleBrick::DoubleBrick(const char * mapType, cocos2d::Layer * layer, int brickTypeID) : Brick(mapType, brickTypeID) { this->layer = layer; b = false; } DoubleBrick::~DoubleBrick() { } DoubleBrick* DoubleBrick::create(const char * mapType, cocos2d::Layer * layer, int brickTypeID) { auto pSprite = new DoubleBrick(mapType, layer, brickTypeID); SpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Block/Block.plist", "Block/Block.png"); if (pSprite->initWithSpriteFrameName(String::createWithFormat("Block/Block%s2.png", mapType, brickTypeID)->getCString())) { pSprite->autorelease(); pSprite->InitSprite(); return pSprite; } CC_SAFE_DELETE(pSprite); return NULL; } void DoubleBrick::DestroyBlock() { if (!b) { b = true; auto sBrick = SingleBrick::create(getMapType().c_str(), BRICK_SINGLE_ID); sBrick->setPosition(this->getPosition()); layer->addChild(sBrick, ZINDEX_BRICK_SPRITE, myEnum::kMyTag::kBlockTag); Brick::DestroyBlock(); } }
[ "yeaih89@gmail.com" ]
yeaih89@gmail.com
b41122e6588fbf460da1a54840c13540644f09f2
0dc243cf9828bd1ca3acdefe02acf7febd7817fe
/src/Geometry_GeometricTests/GeometricPrimitives.cpp
3d268a261d660eb8cfece2b10e5340dd609b3b8c
[ "BSD-3-Clause" ]
permissive
Akranar/daguerreo
c8b38eb43cf4f59497c2d2d13ced92911bd3cc5a
20999144d2c62e54837cd60462cf0db2cfb2d5c8
refs/heads/master
2020-05-22T12:38:22.550303
2011-10-05T22:55:26
2011-10-05T22:55:26
2,337,599
3
0
null
null
null
null
UTF-8
C++
false
false
34
cpp
#include "GeometricPrimitives.h"
[ "akranar@gmail.com" ]
akranar@gmail.com
11a57f0b69c78ae8acc7dfbf1dc48e3e84f23c81
99778425ab9564302e48e7acbd6cb27a3c93a7dc
/src/qt/sendcoinsdialog.cpp
c7bd80d092705190b0a4bfe8e6c25bde4eb452e3
[ "MIT" ]
permissive
Tastigernet/thor-core
d5b4e48e9b38e7c61c36785bbc662e3a9d03e88b
dc60b5dfa97f382d138a38edb1fecb85d5baf0c2
refs/heads/master
2022-04-21T03:10:21.610332
2020-04-20T02:45:54
2020-04-20T02:45:54
256,633,996
0
0
MIT
2020-04-17T23:54:32
2020-04-17T23:54:31
null
UTF-8
C++
false
false
34,741
cpp
// Copyright (c) 2011-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/sendcoinsdialog.h> #include <qt/forms/ui_sendcoinsdialog.h> #include <qt/addresstablemodel.h> #include <qt/bitcoinunits.h> #include <qt/clientmodel.h> #include <qt/coincontroldialog.h> #include <qt/guiutil.h> #include <qt/optionsmodel.h> #include <qt/platformstyle.h> #include <qt/sendcoinsentry.h> #include <base58.h> #include <chainparams.h> #include <wallet/coincontrol.h> #include <validation.h> // mempool and minRelayTxFee #include <ui_interface.h> #include <txmempool.h> #include <policy/fees.h> #include <wallet/fees.h> #include <QFontMetrics> #include <QScrollBar> #include <QSettings> #include <QTextDocument> static const std::array<int, 9> confTargets = { {2, 4, 6, 12, 24, 48, 144, 504, 1008} }; int getConfTargetForIndex(int index) { if (index+1 > static_cast<int>(confTargets.size())) { return confTargets.back(); } if (index < 0) { return confTargets[0]; } return confTargets[index]; } int getIndexForConfTarget(int target) { for (unsigned int i = 0; i < confTargets.size(); i++) { if (confTargets[i] >= target) { return i; } } return confTargets.size() - 1; } SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *parent) : QDialog(parent), ui(new Ui::SendCoinsDialog), clientModel(0), model(0), fNewRecipientAllowed(true), fFeeMinimized(true), platformStyle(_platformStyle) { ui->setupUi(this); if (!_platformStyle->getImagesOnButtons()) { ui->addButton->setIcon(QIcon()); ui->clearButton->setIcon(QIcon()); ui->sendButton->setIcon(QIcon()); } else { ui->addButton->setIcon(_platformStyle->SingleColorIcon(":/icons/add")); ui->clearButton->setIcon(_platformStyle->SingleColorIcon(":/icons/remove")); ui->sendButton->setIcon(_platformStyle->SingleColorIcon(":/icons/send")); } GUIUtil::setupAddressWidget(ui->lineEditCoinControlChange, this); addEntry(); connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry())); connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); // Coin Control connect(ui->pushButtonCoinControl, SIGNAL(clicked()), this, SLOT(coinControlButtonClicked())); connect(ui->checkBoxCoinControlChange, SIGNAL(stateChanged(int)), this, SLOT(coinControlChangeChecked(int))); connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &))); // Coin Control: clipboard actions QAction *clipboardQuantityAction = new QAction(tr("Copy quantity"), this); QAction *clipboardAmountAction = new QAction(tr("Copy amount"), this); QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this); QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this); QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this); QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this); QAction *clipboardChangeAction = new QAction(tr("Copy change"), this); connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity())); connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAmount())); connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee())); connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee())); connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes())); connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput())); connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange())); ui->labelCoinControlQuantity->addAction(clipboardQuantityAction); ui->labelCoinControlAmount->addAction(clipboardAmountAction); ui->labelCoinControlFee->addAction(clipboardFeeAction); ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction); ui->labelCoinControlBytes->addAction(clipboardBytesAction); ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction); ui->labelCoinControlChange->addAction(clipboardChangeAction); // init transaction fee section QSettings settings; if (!settings.contains("fFeeSectionMinimized")) settings.setValue("fFeeSectionMinimized", true); if (!settings.contains("nFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility settings.setValue("nFeeRadio", 1); // custom if (!settings.contains("nFeeRadio")) settings.setValue("nFeeRadio", 0); // recommended if (!settings.contains("nSmartFeeSliderPosition")) settings.setValue("nSmartFeeSliderPosition", 0); if (!settings.contains("nTransactionFee")) settings.setValue("nTransactionFee", (qint64)DEFAULT_TRANSACTION_FEE); if (!settings.contains("fPayOnlyMinFee")) settings.setValue("fPayOnlyMinFee", false); ui->groupFee->setId(ui->radioSmartFee, 0); ui->groupFee->setId(ui->radioCustomFee, 1); ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true); ui->customFee->setValue(settings.value("nTransactionFee").toLongLong()); ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool()); minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool()); } void SendCoinsDialog::setClientModel(ClientModel *_clientModel) { this->clientModel = _clientModel; if (_clientModel) { connect(_clientModel, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(updateSmartFeeLabel())); } } void SendCoinsDialog::setModel(WalletModel *_model) { this->model = _model; if(_model && _model->getOptionsModel()) { for(int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); if(entry) { entry->setModel(_model); } } setBalance(_model->getBalance(), _model->getUnconfirmedBalance(), _model->getImmatureBalance(), _model->getWatchBalance(), _model->getWatchUnconfirmedBalance(), _model->getWatchImmatureBalance()); connect(_model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount))); connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); updateDisplayUnit(); // Coin Control connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels())); connect(_model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool))); ui->frameCoinControl->setVisible(_model->getOptionsModel()->getCoinControlFeatures()); coinControlUpdateLabels(); // fee section for (const int n : confTargets) { ui->confTargetSelector->addItem(tr("%1 (%2 blocks)").arg(GUIUtil::formatNiceTimeOffset(n*Params().GetConsensus().nPowTargetSpacing)).arg(n)); } connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(updateSmartFeeLabel())); connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(coinControlUpdateLabels())); connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls())); connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels())); connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels())); connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee())); connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls())); connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels())); // Thor: Disable RBF // connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel())); // connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels())); ui->customFee->setSingleStep(GetRequiredFee(1000)); updateFeeSectionControls(); updateMinFeeLabel(); updateSmartFeeLabel(); // set default rbf checkbox state // Thor: Disable RBF // ui->optInRBF->setCheckState(Qt::Checked); // set the smartfee-sliders default value (wallets default conf.target or last stored value) QSettings settings; if (settings.value("nSmartFeeSliderPosition").toInt() != 0) { // migrate nSmartFeeSliderPosition to nConfTarget // nConfTarget is available since 0.15 (replaced nSmartFeeSliderPosition) int nConfirmTarget = 25 - settings.value("nSmartFeeSliderPosition").toInt(); // 25 == old slider range settings.setValue("nConfTarget", nConfirmTarget); settings.remove("nSmartFeeSliderPosition"); } if (settings.value("nConfTarget").toInt() == 0) ui->confTargetSelector->setCurrentIndex(getIndexForConfTarget(model->getDefaultConfirmTarget())); else ui->confTargetSelector->setCurrentIndex(getIndexForConfTarget(settings.value("nConfTarget").toInt())); } } SendCoinsDialog::~SendCoinsDialog() { QSettings settings; settings.setValue("fFeeSectionMinimized", fFeeMinimized); settings.setValue("nFeeRadio", ui->groupFee->checkedId()); settings.setValue("nConfTarget", getConfTargetForIndex(ui->confTargetSelector->currentIndex())); settings.setValue("nTransactionFee", (qint64)ui->customFee->value()); settings.setValue("fPayOnlyMinFee", ui->checkBoxMinimumFee->isChecked()); delete ui; } void SendCoinsDialog::on_sendButton_clicked() { if(!model || !model->getOptionsModel()) return; QList<SendCoinsRecipient> recipients; bool valid = true; for(int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); if(entry) { if(entry->validate()) { recipients.append(entry->getValue()); } else { valid = false; } } } if(!valid || recipients.isEmpty()) { return; } fNewRecipientAllowed = false; WalletModel::UnlockContext ctx(model->requestUnlock()); if(!ctx.isValid()) { // Unlock wallet was cancelled fNewRecipientAllowed = true; return; } // prepare transaction for getting txFee earlier WalletModelTransaction currentTransaction(recipients); WalletModel::SendCoinsReturn prepareStatus; // Always use a CCoinControl instance, use the CoinControlDialog instance if CoinControl has hammern enabled CCoinControl ctrl; if (model->getOptionsModel()->getCoinControlFeatures()) ctrl = *CoinControlDialog::coinControl(); updateCoinControlState(ctrl); prepareStatus = model->prepareTransaction(currentTransaction, ctrl); // process prepareStatus and on error generate message shown to user processSendCoinsReturn(prepareStatus, BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), currentTransaction.getTransactionFee())); if(prepareStatus.status != WalletModel::OK) { fNewRecipientAllowed = true; return; } CAmount txFee = currentTransaction.getTransactionFee(); // Format confirmation message QStringList formatted; for (const SendCoinsRecipient &rcp : currentTransaction.getRecipients()) { // generate bold amount string QString amount = "<b>" + BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount); amount.append("</b>"); // generate monospace address string QString address = "<span style='font-family: monospace;'>" + rcp.address; address.append("</span>"); QString recipientElement; if (!rcp.paymentRequest.IsInitialized()) // normal payment { if(rcp.label.length() > 0) // label with address { recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.label)); recipientElement.append(QString(" (%1)").arg(address)); } else // just address { recipientElement = tr("%1 to %2").arg(amount, address); } } else if(!rcp.authenticatedMerchant.isEmpty()) // authenticated payment request { recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant)); } else // unauthenticated payment request { recipientElement = tr("%1 to %2").arg(amount, address); } formatted.append(recipientElement); } QString questionString = tr("Are you sure you want to send?"); questionString.append("<br /><br />%1"); if(txFee > 0) { // append fee string if a fee is required questionString.append("<hr /><span style='color:#aa0000;'>"); questionString.append(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), txFee)); questionString.append("</span> "); questionString.append(tr("added as transaction fee")); // append transaction size questionString.append(" (" + QString::number((double)currentTransaction.getTransactionSize() / 1000) + " kB)"); } // add total amount in all subdivision units questionString.append("<hr />"); CAmount totalAmount = currentTransaction.getTotalTransactionAmount() + txFee; QStringList alternativeUnits; for (BitcoinUnits::Unit u : BitcoinUnits::availableUnits()) { if(u != model->getOptionsModel()->getDisplayUnit()) alternativeUnits.append(BitcoinUnits::formatHtmlWithUnit(u, totalAmount)); } questionString.append(tr("Total Amount %1") .arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount))); questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%1)</span>") .arg(alternativeUnits.join(" " + tr("or") + "<br />"))); /* Thor: Disable RBF questionString.append("<hr /><span>"); if (ui->optInRBF->isChecked()) { questionString.append(tr("You can increase the fee later (signals Replace-By-Fee, BIP-125).")); } else { questionString.append(tr("Not signalling Replace-By-Fee, BIP-125.")); } questionString.append("</span>"); */ SendConfirmationDialog confirmationDialog(tr("Confirm send coins"), questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this); confirmationDialog.exec(); QMessageBox::StandardButton retval = (QMessageBox::StandardButton)confirmationDialog.result(); if(retval != QMessageBox::Yes) { fNewRecipientAllowed = true; return; } // now send the prepared transaction WalletModel::SendCoinsReturn sendStatus = model->sendCoins(currentTransaction); // process sendStatus and on error generate message shown to user processSendCoinsReturn(sendStatus); if (sendStatus.status == WalletModel::OK) { accept(); CoinControlDialog::coinControl()->UnSelectAll(); coinControlUpdateLabels(); } fNewRecipientAllowed = true; } void SendCoinsDialog::clear() { // Remove entries until only one left while(ui->entries->count()) { ui->entries->takeAt(0)->widget()->deleteLater(); } addEntry(); updateTabsAndLabels(); } void SendCoinsDialog::reject() { clear(); } void SendCoinsDialog::accept() { clear(); } SendCoinsEntry *SendCoinsDialog::addEntry() { SendCoinsEntry *entry = new SendCoinsEntry(platformStyle, this); entry->setModel(model); ui->entries->addWidget(entry); connect(entry, SIGNAL(removeEntry(SendCoinsEntry*)), this, SLOT(removeEntry(SendCoinsEntry*))); connect(entry, SIGNAL(useAvailableBalance(SendCoinsEntry*)), this, SLOT(useAvailableBalance(SendCoinsEntry*))); connect(entry, SIGNAL(payAmountChanged()), this, SLOT(coinControlUpdateLabels())); connect(entry, SIGNAL(subtractFeeFromAmountChanged()), this, SLOT(coinControlUpdateLabels())); // Focus the field, so that entry can start immediately entry->clear(); entry->setFocus(); ui->scrollAreaWidgetContents->resize(ui->scrollAreaWidgetContents->sizeHint()); qApp->processEvents(); QScrollBar* bar = ui->scrollArea->verticalScrollBar(); if(bar) bar->setSliderPosition(bar->maximum()); updateTabsAndLabels(); return entry; } void SendCoinsDialog::updateTabsAndLabels() { setupTabChain(0); coinControlUpdateLabels(); } void SendCoinsDialog::removeEntry(SendCoinsEntry* entry) { entry->hide(); // If the last entry is about to be removed add an empty one if (ui->entries->count() == 1) addEntry(); entry->deleteLater(); updateTabsAndLabels(); } QWidget *SendCoinsDialog::setupTabChain(QWidget *prev) { for(int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); if(entry) { prev = entry->setupTabChain(prev); } } QWidget::setTabOrder(prev, ui->sendButton); QWidget::setTabOrder(ui->sendButton, ui->clearButton); QWidget::setTabOrder(ui->clearButton, ui->addButton); return ui->addButton; } void SendCoinsDialog::setAddress(const QString &address) { SendCoinsEntry *entry = 0; // Replace the first entry if it is still unused if(ui->entries->count() == 1) { SendCoinsEntry *first = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(0)->widget()); if(first->isClear()) { entry = first; } } if(!entry) { entry = addEntry(); } entry->setAddress(address); } void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv) { if(!fNewRecipientAllowed) return; SendCoinsEntry *entry = 0; // Replace the first entry if it is still unused if(ui->entries->count() == 1) { SendCoinsEntry *first = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(0)->widget()); if(first->isClear()) { entry = first; } } if(!entry) { entry = addEntry(); } entry->setValue(rv); updateTabsAndLabels(); } bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv) { // Just paste the entry, all pre-checks // are done in paymentserver.cpp. pasteEntry(rv); return true; } void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, const CAmount& watchBalance, const CAmount& watchUnconfirmedBalance, const CAmount& watchImmatureBalance) { Q_UNUSED(unconfirmedBalance); Q_UNUSED(immatureBalance); Q_UNUSED(watchBalance); Q_UNUSED(watchUnconfirmedBalance); Q_UNUSED(watchImmatureBalance); if(model && model->getOptionsModel()) { ui->labelBalance->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), balance)); } } void SendCoinsDialog::updateDisplayUnit() { setBalance(model->getBalance(), 0, 0, 0, 0, 0); ui->customFee->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); updateMinFeeLabel(); updateSmartFeeLabel(); } void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg) { QPair<QString, CClientUIInterface::MessageBoxFlags> msgParams; // Default to a warning message, override if error message is needed msgParams.second = CClientUIInterface::MSG_WARNING; // This comment is specific to SendCoinsDialog usage of WalletModel::SendCoinsReturn. // WalletModel::TransactionCommitFailed is used only in WalletModel::sendCoins() // all others are used only in WalletModel::prepareTransaction() switch(sendCoinsReturn.status) { case WalletModel::InvalidAddress: msgParams.first = tr("The recipient address is not valid. Please recheck."); break; case WalletModel::InvalidAmount: msgParams.first = tr("The amount to pay must be larger than 0."); break; case WalletModel::AmountExceedsBalance: msgParams.first = tr("The amount exceeds your balance."); break; case WalletModel::AmountWithFeeExceedsBalance: msgParams.first = tr("The total exceeds your balance when the %1 transaction fee is included.").arg(msgArg); break; case WalletModel::DuplicateAddress: msgParams.first = tr("Duplicate address found: addresses should only be used once each."); break; case WalletModel::TransactionCreationFailed: msgParams.first = tr("Transaction creation failed!"); msgParams.second = CClientUIInterface::MSG_ERROR; break; case WalletModel::TransactionCommitFailed: msgParams.first = tr("The transaction was rejected with the following reason: %1").arg(sendCoinsReturn.reasonCommitFailed); msgParams.second = CClientUIInterface::MSG_ERROR; break; case WalletModel::AbsurdFee: msgParams.first = tr("A fee higher than %1 is considered an absurdly high fee.").arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), maxTxFee)); break; case WalletModel::PaymentRequestDestroyed: msgParams.first = tr("Payment request destroyed."); msgParams.second = CClientUIInterface::MSG_ERROR; break; // included to prevent a compiler warning. case WalletModel::OK: default: return; } Q_EMIT message(tr("Send Coins"), msgParams.first, msgParams.second); } void SendCoinsDialog::minimizeFeeSection(bool fMinimize) { ui->labelFeeMinimized->setVisible(fMinimize); ui->buttonChooseFee ->setVisible(fMinimize); ui->buttonMinimizeFee->setVisible(!fMinimize); ui->frameFeeSelection->setVisible(!fMinimize); ui->horizontalLayoutSmartFee->setContentsMargins(0, (fMinimize ? 0 : 6), 0, 0); fFeeMinimized = fMinimize; } void SendCoinsDialog::on_buttonChooseFee_clicked() { minimizeFeeSection(false); } void SendCoinsDialog::on_buttonMinimizeFee_clicked() { updateFeeMinimizedLabel(); minimizeFeeSection(true); } void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry) { // Get CCoinControl instance if CoinControl is enabled or create a new one. CCoinControl coin_control; if (model->getOptionsModel()->getCoinControlFeatures()) { coin_control = *CoinControlDialog::coinControl(); } // Calculate available amount to send. CAmount amount = model->getBalance(&coin_control); for (int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry* e = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); if (e && !e->isHidden() && e != entry) { amount -= e->getValue().amount; } } if (amount > 0) { entry->checkSubtractFeeFromAmount(); entry->setAmount(amount); } else { entry->setAmount(0); } } void SendCoinsDialog::setMinimumFee() { ui->customFee->setValue(GetRequiredFee(1000)); } void SendCoinsDialog::updateFeeSectionControls() { ui->confTargetSelector ->setEnabled(ui->radioSmartFee->isChecked()); ui->labelSmartFee ->setEnabled(ui->radioSmartFee->isChecked()); ui->labelSmartFee2 ->setEnabled(ui->radioSmartFee->isChecked()); ui->labelSmartFee3 ->setEnabled(ui->radioSmartFee->isChecked()); ui->labelFeeEstimation ->setEnabled(ui->radioSmartFee->isChecked()); ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked()); ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked()); ui->labelCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked()); ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked()); } void SendCoinsDialog::updateFeeMinimizedLabel() { if(!model || !model->getOptionsModel()) return; if (ui->radioSmartFee->isChecked()) ui->labelFeeMinimized->setText(ui->labelSmartFee->text()); else { ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) + "/kB"); } } void SendCoinsDialog::updateMinFeeLabel() { if (model && model->getOptionsModel()) ui->checkBoxMinimumFee->setText(tr("Pay only the required fee of %1").arg( BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), GetRequiredFee(1000)) + "/kB") ); } void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl) { if (ui->radioCustomFee->isChecked()) { ctrl.m_feerate = CFeeRate(ui->customFee->value()); } else { ctrl.m_feerate.reset(); } // Avoid using global defaults when sending money from the GUI // Either custom fee will be used or if not selected, the confirmation target from dropdown box ctrl.m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex()); // Thor: Disabled RBF UI //ctrl.signalRbf = ui->optInRBF->isChecked(); } void SendCoinsDialog::updateSmartFeeLabel() { if(!model || !model->getOptionsModel()) return; CCoinControl coin_control; updateCoinControlState(coin_control); coin_control.m_feerate.reset(); // Explicitly use only fee estimation rate for smart fee labels FeeCalculation feeCalc; CFeeRate feeRate = CFeeRate(GetMinimumFee(1000, coin_control, ::mempool, ::feeEstimator, &feeCalc)); ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), feeRate.GetFeePerK()) + "/kB"); if (feeCalc.reason == FeeReason::FALLBACK) { ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...) ui->labelFeeEstimation->setText(""); ui->fallbackFeeWarningLabel->setVisible(true); int lightness = ui->fallbackFeeWarningLabel->palette().color(QPalette::WindowText).lightness(); QColor warning_colour(255 - (lightness / 5), 176 - (lightness / 3), 48 - (lightness / 14)); ui->fallbackFeeWarningLabel->setStyleSheet("QLabel { color: " + warning_colour.name() + "; }"); ui->fallbackFeeWarningLabel->setIndent(QFontMetrics(ui->fallbackFeeWarningLabel->font()).width("x")); } else { ui->labelSmartFee2->hide(); ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", feeCalc.returnedTarget)); ui->fallbackFeeWarningLabel->setVisible(false); } updateFeeMinimizedLabel(); } // Coin Control: copy label "Quantity" to clipboard void SendCoinsDialog::coinControlClipboardQuantity() { GUIUtil::setClipboard(ui->labelCoinControlQuantity->text()); } // Coin Control: copy label "Amount" to clipboard void SendCoinsDialog::coinControlClipboardAmount() { GUIUtil::setClipboard(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" "))); } // Coin Control: copy label "Fee" to clipboard void SendCoinsDialog::coinControlClipboardFee() { GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace(ASYMP_UTF8, "")); } // Coin Control: copy label "After fee" to clipboard void SendCoinsDialog::coinControlClipboardAfterFee() { GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace(ASYMP_UTF8, "")); } // Coin Control: copy label "Bytes" to clipboard void SendCoinsDialog::coinControlClipboardBytes() { GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, "")); } // Coin Control: copy label "Dust" to clipboard void SendCoinsDialog::coinControlClipboardLowOutput() { GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text()); } // Coin Control: copy label "Change" to clipboard void SendCoinsDialog::coinControlClipboardChange() { GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace(ASYMP_UTF8, "")); } // Coin Control: settings menu - coin control enabled/disabled by user void SendCoinsDialog::coinControlFeatureChanged(bool checked) { ui->frameCoinControl->setVisible(checked); if (!checked && model) // coin control features disabled CoinControlDialog::coinControl()->SetNull(); coinControlUpdateLabels(); } // Coin Control: button inputs -> show actual coin control dialog void SendCoinsDialog::coinControlButtonClicked() { CoinControlDialog dlg(platformStyle); dlg.setModel(model); dlg.exec(); coinControlUpdateLabels(); } // Coin Control: checkbox custom change address void SendCoinsDialog::coinControlChangeChecked(int state) { if (state == Qt::Unchecked) { CoinControlDialog::coinControl()->destChange = CNoDestination(); ui->labelCoinControlChangeLabel->clear(); } else // use this to re-validate an already entered address coinControlChangeEdited(ui->lineEditCoinControlChange->text()); ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked)); } // Coin Control: custom change address changed void SendCoinsDialog::coinControlChangeEdited(const QString& text) { if (model && model->getAddressTableModel()) { // Default to no change address until verified CoinControlDialog::coinControl()->destChange = CNoDestination(); ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); const CTxDestination dest = DecodeDestination(text.toStdString()); if (text.isEmpty()) // Nothing entered { ui->labelCoinControlChangeLabel->setText(""); } else if (!IsValidDestination(dest)) // Invalid address { ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Thor address")); } else // Valid address { if (!model->IsSpendable(dest)) { ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address")); // confirmation dialog QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm custom change address"), tr("The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel); if(btnRetVal == QMessageBox::Yes) CoinControlDialog::coinControl()->destChange = dest; else { ui->lineEditCoinControlChange->setText(""); ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}"); ui->labelCoinControlChangeLabel->setText(""); } } else // Known change address { ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}"); // Query label QString associatedLabel = model->getAddressTableModel()->labelForAddress(text); if (!associatedLabel.isEmpty()) ui->labelCoinControlChangeLabel->setText(associatedLabel); else ui->labelCoinControlChangeLabel->setText(tr("(no label)")); CoinControlDialog::coinControl()->destChange = dest; } } } } // Coin Control: update labels void SendCoinsDialog::coinControlUpdateLabels() { if (!model || !model->getOptionsModel()) return; updateCoinControlState(*CoinControlDialog::coinControl()); // set pay amounts CoinControlDialog::payAmounts.clear(); CoinControlDialog::fSubtractFeeFromAmount = false; for(int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); if(entry && !entry->isHidden()) { SendCoinsRecipient rcp = entry->getValue(); CoinControlDialog::payAmounts.append(rcp.amount); if (rcp.fSubtractFeeFromAmount) CoinControlDialog::fSubtractFeeFromAmount = true; } } if (CoinControlDialog::coinControl()->HasSelected()) { // actual coin control calculation CoinControlDialog::updateLabels(model, this); // show coin control stats ui->labelCoinControlAutomaticallySelected->hide(); ui->widgetCoinControl->show(); } else { // hide coin control stats ui->labelCoinControlAutomaticallySelected->show(); ui->widgetCoinControl->hide(); ui->labelCoinControlInsuffFunds->hide(); } } SendConfirmationDialog::SendConfirmationDialog(const QString &title, const QString &text, int _secDelay, QWidget *parent) : QMessageBox(QMessageBox::Question, title, text, QMessageBox::Yes | QMessageBox::Cancel, parent), secDelay(_secDelay) { setDefaultButton(QMessageBox::Cancel); yesButton = button(QMessageBox::Yes); updateYesButton(); connect(&countDownTimer, SIGNAL(timeout()), this, SLOT(countDown())); } int SendConfirmationDialog::exec() { updateYesButton(); countDownTimer.start(1000); return QMessageBox::exec(); } void SendConfirmationDialog::countDown() { secDelay--; updateYesButton(); if(secDelay <= 0) { countDownTimer.stop(); } } void SendConfirmationDialog::updateYesButton() { if(secDelay > 0) { yesButton->setEnabled(false); yesButton->setText(tr("Yes") + " (" + QString::number(secDelay) + ")"); } else { yesButton->setEnabled(true); yesButton->setText(tr("Yes")); } }
[ "antoinebrulenew@gmail.com" ]
antoinebrulenew@gmail.com
5a9d8a99ec74562f9aa8b8ef4170ff28407c32f6
ce497b404b38bdf2e2708fdfb870edcdef81866b
/cpp/ProjectQServer/Desu3/GState.cpp
5ee656ddebe6f8d1189f1c447f126ab00da815ac
[]
no_license
rjrivera/code-dojo
00e8c9ef5e2d3b1912c74c3afa0de66624eaa0e7
083bf5a4a41e9055dd78bc9be0a2d3b6f29651c3
refs/heads/master
2020-04-06T05:42:06.276739
2020-03-08T20:57:30
2020-03-08T20:57:30
28,792,381
0
3
null
2017-02-01T07:17:18
2015-01-05T01:35:42
C++
UTF-8
C++
false
false
648
cpp
#include "GState.h" #include "Event.cpp" #include "Point.cpp" GState::GState() : GPoint(new Point()){ // INFO: Point() defaults to X->0, Y->0; } //public void GState::eventHandler(Event * curEvent){ switch(curEvent->eventType){ case 0: GPoint->X(GPoint->X() + 1); // set the Point->X to Point->X + 1 via the public api of Point.h break; default: std::cout << curEvent->eventType << " is not a recognized eventType\n"; } // std::cout << GPoint->X() << ", " << GPoint->Y() << std::endl; } void GState::iterateAI(){ // no AI Behavior currently defined. } //private void GState::eventProcessor(Event * curEvent){ }
[ "riveratyrant@gmail.com" ]
riveratyrant@gmail.com
9ee23ea1657d393e9d641eb83fce14b4ea544f55
3d4e859c1f15cc8a142026c9562a92ab4c28cf25
/include/cppystruct/pack.h
e9fa462db61ab5be3515d78e19343c4c326ba421
[]
no_license
houyawei-NO1/falldetection
cb99e8547e3cf29e300c24f75a049babb325e8aa
362ee14a03e41846cb36b951b6ae7881802f6402
refs/heads/main
2023-07-04T22:44:07.855482
2021-08-25T10:22:10
2021-08-25T10:22:10
397,207,099
0
0
null
null
null
null
UTF-8
C++
false
false
2,665
h
#pragma once #include <array> #include "include/cppystruct/calcsize.h" #include "include/cppystruct/data_view.h" namespace pystruct { template <typename Fmt, typename... Args> constexpr auto pack(Fmt formatString, Args&&... args); // Impl namespace internal { template <typename RepType> constexpr int packElement(char* data, bool bigEndian, FormatType format, RepType elem) { if constexpr (std::is_same_v<RepType, std::string_view>) { // Trim the string size to the repeat count specified in the format elem = std::string_view(elem.data(), std::min(elem.size(), format.size)); } else { (void)format; // Unreferenced if constexpr RepType != string_view } data_view<char> view(data, bigEndian); data::store(view, elem); return 0; } template <typename RepType, typename T> constexpr RepType convert(const T& val) { // If T is char[], and RepType is string_view - construct directly with std::size(val) // because std::string_view doesn't have a constructor taking a char(&)[] if constexpr(std::is_array_v<T> && std::is_same_v<std::remove_extent_t<T>, char> && std::is_same_v<RepType, std::string_view>) { return RepType(std::data(val), std::size(val)); } else { return static_cast<RepType>(val); } } template <typename Fmt, size_t... Items, typename... Args> constexpr auto pack(std::index_sequence<Items...>, Args&&... args) { static_assert(sizeof...(args) == sizeof...(Items), "pack expected items for packing != sizeof...(args) passed"); constexpr auto formatMode = pystruct::getFormatMode(Fmt{}); using ArrayType = std::array<char, pystruct::calcsize(Fmt{})>; ArrayType output{}; constexpr FormatType formats[] = { pystruct::getTypeOfItem<Items>(Fmt{})... }; using Types = std::tuple<typename pystruct::RepresentedType< decltype(formatMode), formats[Items].formatChar > ...>; // Convert args to a tuple of the represented types Types t = std::make_tuple(convert<std::tuple_element_t<Items, Types>>(std::forward<Args>(args))...); constexpr size_t offsets[] = { getBinaryOffset<Items>(Fmt{})... }; int _[] = { 0, packElement(output.data() + offsets[Items], formatMode.isBigEndian(), formats[Items], std::get<Items>(t))... }; (void)_; // _ is a dummy for pack expansion return output; } } // namespace internal template <typename Fmt, typename... Args> constexpr auto pack(Fmt, Args&&... args) { constexpr size_t itemCount = countItems(Fmt{}); return internal::pack<Fmt>(std::make_index_sequence<itemCount>(), std::forward<Args>(args)...); } } // namespace pystruct
[ "30817974+houyawei-NO1@users.noreply.github.com" ]
30817974+houyawei-NO1@users.noreply.github.com
0a536f4a3bfc55e0c17a548a6ab2d8d5154d9d58
045ad86b79d87f501cfd8252ecd8cc3c1ac960dd
/DCPS/Discovery/DiscoveryController.h
77f11d2d82087eda2ff65b81875905e064de65b3
[ "MIT" ]
permissive
intact-software-systems/cpp-software-patterns
9513e4d988342d88c100e4d85a0e58a3dbd9909e
e463fc7eeba4946b365b5f0b2eecf3da0f4c895b
refs/heads/master
2020-04-08T08:22:25.073672
2018-11-26T14:19:49
2018-11-26T14:19:49
159,176,259
1
0
null
null
null
null
UTF-8
C++
false
false
3,569
h
#ifndef DCPS_Discovery_DiscoveryController_h_IsIncluded #define DCPS_Discovery_DiscoveryController_h_IsIncluded #include"DCPS/CommonDefines.h" #include"DCPS/Discovery/EndpointDiscoveryController.h" #include"DCPS/Discovery/ParticipantDiscoveryController.h" #include"DCPS/Export.h" namespace DCPS { namespace Discovery { /** * @brief The DiscoveryControllerState class */ class DLL_STATE DiscoveryControllerState { public: DiscoveryControllerState(); virtual ~DiscoveryControllerState(); ParticipantDiscoveryController *ParticipantDiscovery() const; EndpointDiscoveryController *EndpointDiscovery() const; private: ParticipantDiscoveryController *participantDiscovery_; EndpointDiscoveryController *endpointDiscovery_; }; /** * @brief The DiscoveryController class * * TODO: * - Define topics: * - TopicBuiltinTopicData with data needed to establish pub/sub, see RTPS specification * - TODO: Rename, already a class Policy::TopicBuiltinTopicData * - DCPSParticipant, * - PublicationBuiltinTopicData, * - DCPSSubscription, * * TODO: * - DiscoveryController is an observer to the data-reader, data-writer, topic and participant caches/objectmanagers. * - For every creation add a dds topic data instance to discovery cache writer. * * - DiscoveryController for all domains * - Keep a map of domainId and Pair(ParticipantDiscovery, EndpointDiscovery) * * - DiscoveryController for each domain, in which case I need a DiscoveryFactory * - Keep one ParticipantDiscovery and one EndpointDiscovery * * TODO Refactor: * - Move the discovery topics to a different module DCPSShared * * - DomainParticipantFactory writes to cache DomainParticipantAccess containing all domains and participants * * - Two approaches to link to RTPS: * - 1. Create a separate module DCPSShared and move topics and QoS to it, let DCPS and RTPS link it * - 2. Create an "interceptor" that serializes the topics before adding it to a new cache, which RTPS HistoryCache listens to. * * - 2 is the preferred choice for now. This makes it identical to all other topic handling (from DCPS point of view). Use a cache-writer approach. */ class DLL_STATE DiscoveryController : public Templates::ContextData<DiscoveryControllerState> , public RxData::ObjectObserver<Domain::DomainParticipantPtr> , public Runnable , public Templates::Lockable<Mutex> { private: DiscoveryController(); virtual ~DiscoveryController(); friend class Singleton<DiscoveryController>; public: static DiscoveryController& Instance(); void ObserveDomainCaches(DDS::Elements::DomainId domainId); private: /** * @brief run */ virtual void run(); public: virtual bool OnObjectCreated(Domain::DomainParticipantPtr data); virtual bool OnObjectDeleted(Domain::DomainParticipantPtr data); virtual bool OnObjectModified(Domain::DomainParticipantPtr data); private: void addDomainCacheObservers(const DDS::Elements::DomainId &domainId); void removeDomainCacheObservers(const DDS::Elements::DomainId &domainId); private: static Singleton<DiscoveryController> discoveryController_; //private: // BaseLib::Concurrent::ObserverConnector<RxData::CacheObserver, Cache> cacheObserverConnector_; }; //template <typename T> //class DCPSObjectManager : public RxData::ObjectObserver<T> //{ //public: // virtual bool OnObjectCreated(T data); // virtual bool OnObjectDeleted(T data); // virtual bool OnObjectModified(T data); //}; }} #endif
[ "intact.software.systems@gmail.com" ]
intact.software.systems@gmail.com
efc5fb1eb3497eed78d59a2db8c748df2a85ae33
52ca17dca8c628bbabb0f04504332c8fdac8e7ea
/rocksdb-3.10/util/murmurhash.cc
b4563f7957235bb510cedcfcaaf0dc643e081605
[ "BSD-3-Clause" ]
permissive
qinzuoyan/thirdparty
f610d43fe57133c832579e65ca46e71f1454f5c4
bba9e68347ad0dbffb6fa350948672babc0fcb50
refs/heads/master
2021-01-16T17:47:57.121882
2015-04-21T06:59:19
2015-04-21T06:59:19
33,612,579
0
0
null
2015-04-08T14:39:51
2015-04-08T14:39:51
null
UTF-8
C++
false
false
4,067
cc
// Copyright (c) 2013, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. // /* Murmurhash from http://sites.google.com/site/murmurhash/ All code is released to the public domain. For business purposes, Murmurhash is under the MIT license. */ #include "thirdparty/rocksdb-3.10/util/murmurhash.h" #if defined(__x86_64__) // ------------------------------------------------------------------- // // The same caveats as 32-bit MurmurHash2 apply here - beware of alignment // and endian-ness issues if used across multiple platforms. // // 64-bit hash for 64-bit platforms uint64_t MurmurHash64A ( const void * key, int len, unsigned int seed ) { const uint64_t m = 0xc6a4a7935bd1e995; const int r = 47; uint64_t h = seed ^ (len * m); const uint64_t * data = (const uint64_t *)key; const uint64_t * end = data + (len/8); while(data != end) { uint64_t k = *data++; k *= m; k ^= k >> r; k *= m; h ^= k; h *= m; } const unsigned char * data2 = (const unsigned char*)data; switch(len & 7) { case 7: h ^= ((uint64_t)data2[6]) << 48; case 6: h ^= ((uint64_t)data2[5]) << 40; case 5: h ^= ((uint64_t)data2[4]) << 32; case 4: h ^= ((uint64_t)data2[3]) << 24; case 3: h ^= ((uint64_t)data2[2]) << 16; case 2: h ^= ((uint64_t)data2[1]) << 8; case 1: h ^= ((uint64_t)data2[0]); h *= m; }; h ^= h >> r; h *= m; h ^= h >> r; return h; } #elif defined(__i386__) // ------------------------------------------------------------------- // // Note - This code makes a few assumptions about how your machine behaves - // // 1. We can read a 4-byte value from any address without crashing // 2. sizeof(int) == 4 // // And it has a few limitations - // // 1. It will not work incrementally. // 2. It will not produce the same results on little-endian and big-endian // machines. unsigned int MurmurHash2 ( const void * key, int len, unsigned int seed ) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. const unsigned int m = 0x5bd1e995; const int r = 24; // Initialize the hash to a 'random' value unsigned int h = seed ^ len; // Mix 4 bytes at a time into the hash const unsigned char * data = (const unsigned char *)key; while(len >= 4) { unsigned int k = *(unsigned int *)data; k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; data += 4; len -= 4; } // Handle the last few bytes of the input array switch(len) { case 3: h ^= data[2] << 16; case 2: h ^= data[1] << 8; case 1: h ^= data[0]; h *= m; }; // Do a few final mixes of the hash to ensure the last few // bytes are well-incorporated. h ^= h >> 13; h *= m; h ^= h >> 15; return h; } #else // ------------------------------------------------------------------- // // Same as MurmurHash2, but endian- and alignment-neutral. // Half the speed though, alas. unsigned int MurmurHashNeutral2 ( const void * key, int len, unsigned int seed ) { const unsigned int m = 0x5bd1e995; const int r = 24; unsigned int h = seed ^ len; const unsigned char * data = (const unsigned char *)key; while(len >= 4) { unsigned int k; k = data[0]; k |= data[1] << 8; k |= data[2] << 16; k |= data[3] << 24; k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; data += 4; len -= 4; } switch(len) { case 3: h ^= data[2] << 16; case 2: h ^= data[1] << 8; case 1: h ^= data[0]; h *= m; }; h ^= h >> 13; h *= m; h ^= h >> 15; return h; } #endif
[ "qinzuoyan@gmail.com" ]
qinzuoyan@gmail.com
5c1fb0ce858062b6f984f7c6e59171610946aed7
53fa0759b46ff7493df721a874bd8ce6c2d6e3b8
/catkin_ws/install/include/beginner_tutorials/AddTwoIntsRequest.h
99dae067a0b12db6ee6e00e147aef6ab8750a8fc
[ "MIT" ]
permissive
allenwxf/ROS-TUTORIAL
3367093da76f157be6b8516dc67ee6d90365c99f
9dfee042ea90cf3d6a6ae7f7200aa0c8f1a6b000
refs/heads/master
2020-04-07T02:07:52.204874
2019-01-15T13:04:01
2019-01-15T13:04:01
157,964,901
0
0
null
null
null
null
UTF-8
C++
false
false
5,417
h
// Generated by gencpp from file beginner_tutorials/AddTwoIntsRequest.msg // DO NOT EDIT! #ifndef BEGINNER_TUTORIALS_MESSAGE_ADDTWOINTSREQUEST_H #define BEGINNER_TUTORIALS_MESSAGE_ADDTWOINTSREQUEST_H #include <string> #include <vector> #include <map> #include <ros/types.h> #include <ros/serialization.h> #include <ros/builtin_message_traits.h> #include <ros/message_operations.h> namespace beginner_tutorials { template <class ContainerAllocator> struct AddTwoIntsRequest_ { typedef AddTwoIntsRequest_<ContainerAllocator> Type; AddTwoIntsRequest_() : a(0) , b(0) { } AddTwoIntsRequest_(const ContainerAllocator& _alloc) : a(0) , b(0) { (void)_alloc; } typedef int64_t _a_type; _a_type a; typedef int64_t _b_type; _b_type b; typedef boost::shared_ptr< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > Ptr; typedef boost::shared_ptr< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> const> ConstPtr; }; // struct AddTwoIntsRequest_ typedef ::beginner_tutorials::AddTwoIntsRequest_<std::allocator<void> > AddTwoIntsRequest; typedef boost::shared_ptr< ::beginner_tutorials::AddTwoIntsRequest > AddTwoIntsRequestPtr; typedef boost::shared_ptr< ::beginner_tutorials::AddTwoIntsRequest const> AddTwoIntsRequestConstPtr; // constants requiring out of line definition template<typename ContainerAllocator> std::ostream& operator<<(std::ostream& s, const ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> & v) { ros::message_operations::Printer< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> >::stream(s, "", v); return s; } } // namespace beginner_tutorials namespace ros { namespace message_traits { // BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False} // {'beginner_tutorials': ['/home/wxf/Workspace/catkin_ws/src/beginner_tutorials/msg'], 'std_msgs': ['/opt/ros/lunar/share/std_msgs/cmake/../msg']} // !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] template <class ContainerAllocator> struct IsFixedSize< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > : TrueType { }; template <class ContainerAllocator> struct IsFixedSize< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> const> : TrueType { }; template <class ContainerAllocator> struct IsMessage< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > : TrueType { }; template <class ContainerAllocator> struct IsMessage< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> const> : TrueType { }; template <class ContainerAllocator> struct HasHeader< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > : FalseType { }; template <class ContainerAllocator> struct HasHeader< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> const> : FalseType { }; template<class ContainerAllocator> struct MD5Sum< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > { static const char* value() { return "36d09b846be0b371c5f190354dd3153e"; } static const char* value(const ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator>&) { return value(); } static const uint64_t static_value1 = 0x36d09b846be0b371ULL; static const uint64_t static_value2 = 0xc5f190354dd3153eULL; }; template<class ContainerAllocator> struct DataType< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > { static const char* value() { return "beginner_tutorials/AddTwoIntsRequest"; } static const char* value(const ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator>&) { return value(); } }; template<class ContainerAllocator> struct Definition< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > { static const char* value() { return "int64 a\n\ int64 b\n\ "; } static const char* value(const ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator>&) { return value(); } }; } // namespace message_traits } // namespace ros namespace ros { namespace serialization { template<class ContainerAllocator> struct Serializer< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > { template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) { stream.next(m.a); stream.next(m.b); } ROS_DECLARE_ALLINONE_SERIALIZER }; // struct AddTwoIntsRequest_ } // namespace serialization } // namespace ros namespace ros { namespace message_operations { template<class ContainerAllocator> struct Printer< ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator> > { template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::beginner_tutorials::AddTwoIntsRequest_<ContainerAllocator>& v) { s << indent << "a: "; Printer<int64_t>::stream(s, indent + " ", v.a); s << indent << "b: "; Printer<int64_t>::stream(s, indent + " ", v.b); } }; } // namespace message_operations } // namespace ros #endif // BEGINNER_TUTORIALS_MESSAGE_ADDTWOINTSREQUEST_H
[ "wxf@hdp-test.com" ]
wxf@hdp-test.com
1de7363d3fb3fa5c793c4a2112360599f723c900
948df734bc05a4b816160067597f749913859340
/include/G2PField.hh
0070f7ea4b4004029d9c3f30d10a0d5d1cda0c70
[]
no_license
zhupengjia/g2prec
92c8f69eb27c6f99adadd72e5faacd3e9aba3b94
8c7d41705e1a2017ff25b1f595b25a6da042a949
refs/heads/master
2021-01-23T16:29:57.546245
2014-12-19T20:30:24
2014-12-19T20:30:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,529
hh
// -*- C++ -*- /* class G2PField * Generate field map for HallB magnets. * Calculate field strength of a particular point from the field map using Lagrange polynomial interpolation, default is 2nd order. * * Field map may have an angle respect to the lab coordinates. * Use SetEulerAngle() to set this angle and the program will rotate the field map to correct direction. */ // History: // Mar 2013, C. Gu, First public version. // Sep 2013, C. Gu, Put HallB field map into G2PField. // Feb 2014, C. Gu, Modified for G2PRec. // #ifndef G2P_FIELD_H #define G2P_FIELD_H #include <vector> #include "G2PAppBase.hh" using namespace std; class G2PField : public G2PAppBase { public: G2PField(); virtual ~G2PField(); virtual void GetField(const double* x, double* b); protected: virtual int Initialize(); virtual void Clear(Option_t* /*option*/ = ""); void SetRotationMatrix(); virtual int ReadMap(); virtual int CreateMap(); virtual int Interpolate(const double* x, double* b, int order); void TransLab2Field(const double* x, double* xout); void TransField2Lab(const double* b, double* bout); virtual int Configure(); const char* fMapFile; vector<vector<vector<double> > > fBField; double fOrigin[3]; double fZMin, fZMax; double fRMin, fRMax; double fZStep, fRStep; int nZ, nR; bool fRotation; double fEulerAngle[3]; double fRotationMatrix[2][3][3]; double fRatio; private: ClassDef(G2PField, 1) }; #endif
[ "guchao.pku@gmail.com" ]
guchao.pku@gmail.com
c6936538f8af030df34c7847894f8d81f92cb120
992c8fa8d4b881e9ffd2055d6d42b98f8ea85b9d
/bodymaxIndex.cpp
5cb0d4d59470becda35fed8a3e262f5d20f5636d
[]
no_license
jonadiazz/time-well-wasted
6ebdcd937a04a506c19c924e45346c20f8aea8e2
8cdc8eaa60ceb54bdbb9045f8f5028cd64e418ef
refs/heads/master
2021-01-01T18:29:12.758876
2015-01-30T00:55:27
2015-01-30T00:55:27
29,946,475
0
0
null
null
null
null
UTF-8
C++
false
false
149
cpp
#include <iostream> int main (void) { std::cout << "Enter your weight: " << std::endl; std::cout << "Enter your height: " << std::endl; }
[ "jonadiazz@hotmail.com" ]
jonadiazz@hotmail.com
5c075fd54d136b145d6fac45fcba3612f098d37b
b7f1b4df5d350e0edf55521172091c81f02f639e
/chrome/services/media_gallery_util/media_gallery_util_service.cc
ce3c337ab58cec5e331f3c743c933e19215883e6
[ "BSD-3-Clause" ]
permissive
blusno1/chromium-1
f13b84547474da4d2702341228167328d8cd3083
9dd22fe142b48f14765a36f69344ed4dbc289eb3
refs/heads/master
2023-05-17T23:50:16.605396
2018-01-12T19:39:49
2018-01-12T19:39:49
117,339,342
4
2
NOASSERTION
2020-07-17T07:35:37
2018-01-13T11:48:57
null
UTF-8
C++
false
false
1,526
cc
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/services/media_gallery_util/media_gallery_util_service.h" #include "build/build_config.h" #include "chrome/services/media_gallery_util/media_parser.h" #include "mojo/public/cpp/bindings/strong_binding.h" namespace { void OnMediaParserRequest( service_manager::ServiceContextRefFactory* ref_factory, chrome::mojom::MediaParserRequest request) { mojo::MakeStrongBinding( std::make_unique<MediaParser>(ref_factory->CreateRef()), std::move(request)); } } // namespace MediaGalleryUtilService::MediaGalleryUtilService() = default; MediaGalleryUtilService::~MediaGalleryUtilService() = default; std::unique_ptr<service_manager::Service> MediaGalleryUtilService::CreateService() { return std::make_unique<MediaGalleryUtilService>(); } void MediaGalleryUtilService::OnStart() { ref_factory_ = std::make_unique<service_manager::ServiceContextRefFactory>( base::Bind(&service_manager::ServiceContext::RequestQuit, base::Unretained(context()))); registry_.AddInterface(base::Bind(&OnMediaParserRequest, ref_factory_.get())); } void MediaGalleryUtilService::OnBindInterface( const service_manager::BindSourceInfo& source_info, const std::string& interface_name, mojo::ScopedMessagePipeHandle interface_pipe) { registry_.BindInterface(interface_name, std::move(interface_pipe)); }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
e0215a98eb838cdf62f2c8d092dc032bbd8fe1f5
68931b5729575ee9cd236f33fa9b604867aff705
/code/cli/buffer.cpp
924fa22cd08e2098a35a5106e5f45ee61d87c59f
[]
no_license
zorggn/zcdt
fc7d9d0fc898234c365b26c7551f7458b0fac9d7
dad9e4abd1640a11992ad1877b3ce4cd14adb86a
refs/heads/master
2016-08-07T09:38:04.382254
2012-11-14T19:10:58
2012-11-14T19:10:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,645
cpp
//implementation of the Atom buffer #include "buffer.h"; //constructor: allocates length Atoms for a buffer Buffer::Buffer(uint length) { this.length = length; this.index = 0; this.buffer = new (nothrow) Atom[this.length]; if (this.buffer == 0) { cerr << "Error: Cannot allocate memory block length " << this.length << " for buffer." << endl; //call Exit() or implement a try-catch block in the routines calling this and propagate an exception to those? } else { cout << "Created buffer; length of " << this.length << "Atoms." << endl; //only if one of the -w flags are checked; which? that's a todo. } } //destructor: deletes the buffer Buffer::~Buffer() { delete[] this.buffer; } //return the Atom from the list specified by the internal index Atom Buffer::getAtom() { return this.buffer[this.index]; } //return an Atom from the list specified by index Atom Buffer::getAtom(uint index) { return this.buffer[index % this.length]; } //set the current element at index as atom void Buffer::setAtom(Atom* atom) { this.buffer[this.index] = atom; } // get the length of the buffer void Buffer::getLength() { return length; } //set the length of the buffer void Buffer:setLength(uint length) { //check if the new and current lengths are the same or not if (this.length != length) { Buffer temp = Buffer(length); Buffer::swapBuffers(this,temp); temp.~Buffer(); //necessary? good practice? } } // get the current index of the buffer uint Buffer::getIndex() { return this.index; } // set the index to an integer (bounds-checked) void Buffer::setIndex(uint index) { this.index = index % this.length; }
[ "zorg@atw.hu" ]
zorg@atw.hu
a7878c5924be11d6f4b9abdc6bbc71562afbfdc5
bf569e5b23eb4799a540ff6765411c31ce1bccfa
/lab3/Constructor/Decorador herencia/Plantilla.h
55cd51201c1b465cc8d56cd1040e4c33dbe98aa7
[]
no_license
sebastianVUCR/LabsDiseno
af56f8efba3e474bb2f51e598d5debf5832b9b14
1da9651871b693bd7e64b26a7940ac8977c65c18
refs/heads/master
2022-11-13T06:25:49.128182
2020-07-14T06:11:24
2020-07-14T06:11:24
259,193,331
0
0
null
null
null
null
UTF-8
C++
false
false
228
h
#pragma once #include "Valor.h" template <class T> class Plantilla : public Valor { public: Plantilla() {} virtual ~Plantilla() {} virtual T getValor() = 0; virtual void setValor(T valor) = 0; protected: private: };
[ "sebastian.vargas.99@gmail.com" ]
sebastian.vargas.99@gmail.com
1fce500be0a045485266b38e5a15ca4773cba23a
4a8c93591269fba8e7f87ffacf2d1e18f049a682
/Uva/10034.cpp
636b95ff8cf160a68aab32acbf8b2040a5e79a20
[]
no_license
Pooh1223/Online-Judge
fd3c237b21bd07396e841b4d077a997c51383d8a
afb208ccc5ecc6f3fa42693d190dc64e19195ff6
refs/heads/master
2020-07-25T19:28:30.163074
2020-06-29T15:15:32
2020-06-29T15:15:32
208,401,769
0
0
null
null
null
null
UTF-8
C++
false
false
285
cpp
#include <bits/stdc++.h> using namespace std; double x[103]; double y[103]; vector<> int main(){ cin.tie(0); int t; cin >> t; while(t--){ int n; cin >> n; memset(x,0,sizeof(x)); memset(y,0,sizeof(y)); for(int i = 0;i < n;++i){ cin >> x[i] >> y[i]; } } return 0; }
[ "leo891223@gmail.com" ]
leo891223@gmail.com
00863f99989db7d6a89c457fee03a35f601827d4
64e25c9d67db2ce4b5abe1a980a070fb59a2f938
/clang/compute_sdk/docs/cmtutorial/linear_walker1.cpp
305ce0ee96e9e6d7d92b5bc30b93f165e4ff5f85
[ "NCSA", "MIT" ]
permissive
intel/cm-compiler
22d8b56baefc26d5576572f5aab6b3ecb3033300
9b2e628b788344088d8fcfd97d406db576f608af
refs/heads/cmc_monorepo_80
2023-08-28T13:09:41.523730
2023-08-04T23:23:23
2023-08-04T23:23:23
111,158,121
141
60
null
2023-05-01T21:17:30
2017-11-17T22:50:46
C++
UTF-8
C++
false
false
10,249
cpp
/*========================== begin_copyright_notice ============================ Copyright (C) 2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ #include <string> // The only CM runtime header file that you need is cm_rt.h. // It includes all of the CM runtime. #include "cm_rt.h" #include "cm_loadprogram.h" // Includes bitmap_helpers.h for bitmap file open/save/compare operations. #include "common/bitmap_helpers.h" // Include cm_rt_helpers.h to convert the integer return code returned from // the CM runtime to a meaningful string message. #include "common/cm_rt_helpers.h" // Includes isa_helpers.h to load the ISA file generated by the CM compiler. #include "common/isa_helpers.h" int main(int argc, char* argv[]) { // Loads an input image named "image_in.bmp". auto input_image = cm::util::bitmap::BitMap::load("linear_in.bmp"); // Gets the width and height of the input image. unsigned int width = input_image.getWidth(); unsigned int height = input_image.getHeight(); // Checks the value of width, height and bpp(bits per pixel) of the image. // Only images in 8-bit RGB format are supported. // Only images with width and height a multiple of 8 are supported. if (width&7 || height&7 || input_image.getBPP() != 24) { std::cerr << "Error: Only images in 8-bit RGB format with width and " << "height a multiple of 8 are supported.\n"; exit(1); } // Copies input image to output except for the data. auto output_image = input_image; // Sets image size in bytes. There are a total of width*height pixels and // each pixel occupies (out.getBPP()/8) bytes. unsigned int img_size = width*height*output_image.getBPP()/8; // Sets output to blank image. output_image.setData(new unsigned char[img_size]); // Creates a CmDevice from scratch. // Param device: pointer to the CmDevice object. // Param version: CM API version supported by the runtime library. CmDevice *device = nullptr; unsigned int version = 0; cm_result_check(::CreateCmDevice(device, version)); // The file linear_walker1_genx.isa is generated when the kernels in the file // linear_walker1_genx.cpp are compiled by the CM compiler. // Reads in the virtual ISA from "linear_walker1_genx.isa" to the code // buffer. std::string isa_code = cm::util::isa::loadFile("linear_walker1_genx.isa"); if (isa_code.size() == 0) { std::cerr << "Error: empty ISA binary.\n"; exit(1); } // Creates a CmProgram object consisting of the kernels loaded from the code // buffer. // Param isa_code.data(): Pointer to the code buffer containing the virtual // ISA. // Param isa_code.size(): Size in bytes of the code buffer containing the // virtual ISA. CmProgram *program = nullptr; cm_result_check(CmDevLoadProgram(device, const_cast<char*>(isa_code.data()), isa_code.size(), program)); // Creates the linear kernel. // Param program: CM Program from which the kernel is created. // Param "linear": The kernel name which should be no more than 256 bytes // including the null terminator. CmKernel *kernel = nullptr; cm_result_check(device->CreateKernel(program, "linear", kernel)); // Creates input surface with given width and height in pixels and format. // Sets surface format as CM_SURFACE_FORMAT_A8R8G8B8. For this format, each // pixel occupies 32 bits. // The input image is RGB format with 24 bits per pixel, and the surface // format is A8R8G8B8 with 32 bits per pixel. Therefore, the surface width // is (width*3/4) in pixels. CmSurface2D *input_surface = nullptr; cm_result_check(device->CreateSurface2D(width*3/4, height, CM_SURFACE_FORMAT_A8R8G8B8, input_surface)); // Copies system memory content to the input surface using the CPU. The // system memory content is the data of the input image. The size of data // copied is the size of data in the surface. cm_result_check(input_surface->WriteSurface(input_image.getData(), nullptr)); // Creates the output surface. The width, height and format is the same as // the input surface. CmSurface2D *output_surface = nullptr; cm_result_check(device->CreateSurface2D(width*3/4, height, CM_SURFACE_FORMAT_A8R8G8B8, output_surface)); // Each CmKernel can be executed by multiple concurrent threads. // Here, for "linear" kernel, each thread works on a block of 6x8 pixels. // The thread width is equal to input image width divided by 8. // The thread height is equal to input image height divided by 6. int thread_width = width/8; int thread_height = height/6; // Creates a CmThreadSpace object. // There are two usage models for the thread space. One is to define the // dependency between threads to run in the GPU. The other is to define a // thread space where each thread can get a pair of coordinates during // kernel execution. For this example, we use the latter usage model. CmThreadSpace *thread_space = nullptr; cm_result_check(device->CreateThreadSpace(thread_width, thread_height, thread_space)); // When a surface is created by the CmDevice a SurfaceIndex object is // created. This object contains a unique index value that is mapped to the // surface. // Gets the input surface index. SurfaceIndex *input_surface_idx = nullptr; cm_result_check(input_surface->GetIndex(input_surface_idx)); // Sets a per kernel argument. // Sets input surface index as the first argument of linear kernel. cm_result_check(kernel->SetKernelArg(0, sizeof(SurfaceIndex), input_surface_idx)); // Gets the output surface index. SurfaceIndex *output_surface_idx = nullptr; cm_result_check(output_surface->GetIndex(output_surface_idx)); // Sets output surface index as the second argument of linear kernel. cm_result_check(kernel->SetKernelArg(1, sizeof(SurfaceIndex), output_surface_idx)); // Creates a task queue. // The CmQueue is an in-order queue. Tasks get executed according to the // order they are enqueued. The next task does not start execution until the // current task finishes. CmQueue *cmd_queue = nullptr; cm_result_check(device->CreateQueue(cmd_queue)); // Creates a CmTask object. // The CmTask object is a container for CmKernel pointers. It is used to // enqueue the kernels for execution. CmTask *task = nullptr; cm_result_check(device->CreateTask(task)); // Adds a CmKernel pointer to CmTask. // This task has one kernel, "linear". cm_result_check(task->AddKernel(kernel)); // Launches the task on the GPU. Enqueue is a non-blocking call, i.e. the // function returns immediately without waiting for the GPU to start or // finish execution of the task. The runtime will query the HW status. If // the hardware is not busy, the runtime will submit the task to the // driver/HW; otherwise, the runtime will submit the task to the driver/HW // at another time. // An event, "sync_event", is created to track the status of the task. CmEvent *sync_event = nullptr; cm_result_check(cmd_queue->Enqueue(task, sync_event, thread_space)); // Destroys a CmTask object. // CmTask will be destroyed when CmDevice is destroyed. // Here, the application destroys the CmTask object by itself. cm_result_check(device->DestroyTask(task)); // Destroy a CmThreadSpace object. // CmThreadSpace will be destroyed when CmDevice is destroyed. // Here, the application destroys the CmThreadSpace object by itself. cm_result_check(device->DestroyThreadSpace(thread_space)); // Reads the output surface content to the system memory using the CPU. // The size of data copied is the size of data in Surface. // It is a blocking call. The function will not return until the copy // operation is completed. // The dependent event "sync_event" ensures that the reading of the surface // will not happen until its state becomes CM_STATUS_FINISHED. cm_result_check(output_surface->ReadSurface(output_image.getData(), sync_event)); // Queries the execution time of a task in the unit of nanoseconds. // The execution time is measured from the time the task started execution // in the GPU to the time when the task finished execution. UINT64 execution_time = 0; cm_result_check(sync_event->GetExecutionTime(execution_time)); std::cout << "Kernel linear execution time is " << execution_time << " nanoseconds" << std::endl; // Destroys the CmEvent. // CmEvent must be destroyed by the user explicitly. cm_result_check(cmd_queue->DestroyEvent(sync_event)); // Destroys the CmDevice. // Also destroys surfaces, kernels, tasks, thread spaces, and queues that // were created using this device instance that have not explicitly been // destroyed by calling the respective destroy functions. cm_result_check(::DestroyCmDevice(device)); // Saves the output image data into the file "linear_out.bmp". output_image.save("linear_out.bmp"); // Compares each pixel of output image with gold image. Set the tolerence of // each pixel difference as 5. If the difference of all pixel is within this // tolerance, the result is correct. Or else there is something wrong. bool passed = cm::util::bitmap::BitMap::checkResult("linear_out.bmp", "linear_gold_hw.bmp", 5); std::cout << (passed ? "PASSED" : "FAILED") << std::endl; return (passed ? 0 : -1); }
[ "konstantin.vladimirov@intel.com" ]
konstantin.vladimirov@intel.com
1d0ec7ad0ceaaf0cef3b0e73f53a924f7e4ad43b
1490797b49fbadcdc17d6ebf4463535e3aee55f4
/JS16_Bootloader/src/ApplicationFiles.cpp
485ad58469da326c8f10c70dda16f0a68fb1f03a
[]
no_license
qiaozhou/usbdm-applications
23347aa7a0aa101ac4cd30d88d4ce59f30de5c41
596a2a217f2ccc156890aa60540ec4423532e302
refs/heads/master
2020-05-20T09:46:38.162826
2012-08-20T00:20:02
2012-08-20T00:20:02
5,520,103
3
0
null
null
null
null
UTF-8
C++
false
false
8,808
cpp
/*! \file \brief Provides Access to Application files ApplicationFiles.cpp \verbatim USBDM Copyright (C) 2009 Peter O'Donoghue This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \endverbatim \verbatim Change History -================================================================================ | 16 Nov 2009 | Changes to allow wxWidgets dependencies to be localised - pgo +-------------+------------------------------------------------------------------ | 16 Nov 2009 | Created - pgo +================================================================================ \endverbatim */ #include <stdio.h> #include <sys/stat.h> #include "ICP.h" #ifdef useWxWidgets #include <wx/wx.h> #include <wx/stdpaths.h> #include <wx/filename.h> #ifdef _WIN32 #include <wx/msw/registry.h> #endif #else #include "wxPlugin.h" #endif #include "Log.h" #include "Common.h" #include "ApplicationFiles.h" using namespace std; #ifdef _WIN32 string getInstallationDir(void) { #ifdef useWxWidgets wxString path; wxRegKey key(wxRegKey::HKLM, "Software\\pgo\\USBDM"); if (key.Exists() && key.QueryValue("InstallationDirectory", path)) return string(path.c_str()); return string(); #else char buff[1000]; getInstallationDir(buff, sizeof(buff)); return string(buff); #endif } #endif string getDataDir(void) { #ifdef useWxWidgets return string(wxStandardPaths::Get().GetDataDir().ToAscii()); #else char buff[1000]; getDataDir(buff, sizeof(buff)); return string(buff); #endif } string getUserDataDir(void) { #ifdef useWxWidgets return string(wxStandardPaths::Get().GetUserDataDir().ToAscii()); #else char buff[1000]; getUserDataDir(buff, sizeof(buff)); return string(buff); #endif } #ifdef useWxWidgets char getPathSeparator(void) { return (char)(wxFileName::GetPathSeparator()); } #endif #ifdef WIN32 bool fileExists(string filePath) { DWORD attrib = GetFileAttributesA(filePath.c_str()); print("fileExists(%s) => attr=%X\n", filePath.c_str(), attrib); return (attrib != INVALID_FILE_ATTRIBUTES) && ((attrib & FILE_ATTRIBUTE_DIRECTORY) == 0); } bool dirExists(string filePath) { DWORD attrib = GetFileAttributesA(filePath.c_str()); return (attrib != INVALID_FILE_ATTRIBUTES) && ((attrib & FILE_ATTRIBUTE_DIRECTORY) != 0); } #else bool fileExists(string strFilename) { struct stat stFileInfo; int intStat; // Attempt to get the file attributes intStat = stat(strFilename.c_str(),&stFileInfo); return ((intStat == 0) && S_ISREG(stFileInfo.st_mode)); } bool dirExists(string filePath) { struct stat stFileInfo; int intStat; // Attempt to get the file attributes intStat = stat(filePath.c_str(),&stFileInfo); return ((intStat == 0) && S_ISDIR(stFileInfo.st_mode)); } #endif //! Opens configuration file //! //! @param filename - Name of file (without path) //! @param attributes - Attributes to use when opening the file. //! This should be one of "r", "w", "rt" or "wt" //! //! @return file handle or NULL on error //! //! @note Attempts to open readonly files from two locations: //! - Application directory (where the .exe is) //! - Application data directory (e.g. %APPDATA%/usbdm, $HOME/.usbdm) //! Files opened for writing only use the last directory. //! FILE *openApplicationFile(const string &filename, const string &attributes) { string configFilePath; FILE *configFile = NULL; // Try the Executable directory for readonly files if (attributes[0] == 'r') { configFilePath = getDataDir(); if (!configFilePath.empty()) { // Append filename configFilePath += getPathSeparator() + filename; // Open the file configFile = fopen(configFilePath.c_str(), attributes.c_str()); } } #ifdef WIN32 // Try the Path indicated by registry key if necessary if ((attributes[0] == 'r') && (configFile == NULL )) { configFilePath = getInstallationDir(); // fprintf(stderr, "openApplicationFile() - \"%s\"\n", (const char *)configFilePath.ToAscii()); if (!configFilePath.empty()) { // Append filename configFilePath += filename; // Open the file configFile = fopen(configFilePath.c_str(), attributes.c_str()); } } #endif // Try the Application Data directory if necessary if (configFile == NULL ) { configFilePath = getUserDataDir(); // fprintf(stderr, "openApplicationFile() - \"%s\"\n", (const char *)configFilePath.ToAscii()); if (!configFilePath.empty()) { if (!dirExists(configFilePath)) { // Doesn't exist - create it #ifdef WIN32 mkdir(configFilePath.c_str()); #else mkdir(configFilePath.c_str(), S_IRWXU|S_IRWXG|S_IRWXO); #endif } // Append filename configFilePath += getPathSeparator() + filename; // Open the file configFile = fopen(configFilePath.c_str(), attributes.c_str()); } } if (configFile != NULL) { print("openApplicationFile() - Opened \'%s\'\n", configFilePath.c_str()); } return configFile; } //! Check for existence of a configuration file //! //! @param filename - Name of file (without path) //! @param attributes - Attributes to use when opening the file. //! This should be one of "r", "w", "rt" or "wt" //! //! @return ICP_RC_OK if file exists //! //! @note Attempts to locate the file in two locations: //! - Application data directory (e.g. %APPDATA%/usbdm, $HOME/.usbdm) //! - Application directory (where the .exe is) //! int checkExistsApplicationFile(const string &filename, const string &attributes) { string configFilePath; // Try the Executable directory for readonly files if (attributes[0] == 'r') { configFilePath = getDataDir() + getPathSeparator() + filename; if (fileExists(configFilePath)) return ICP_RC_OK; } #ifdef WIN32 // Try the Path indicated by registry key if necessary if (attributes[0] == 'r') { configFilePath = getInstallationDir(); // fprintf(stderr, "openApplicationFile() - \"%s\"\n", (const char *)configFilePath.ToAscii()); if (!configFilePath.empty()) { // Append filename configFilePath += filename; if (fileExists(configFilePath)) return ICP_RC_OK; } } #endif // Try the Application Data directory configFilePath = getUserDataDir() + getPathSeparator() + filename;; if (fileExists(configFilePath)) return ICP_RC_OK; return ICP_RC_FILE_NOT_FOUND; } //! Returns the path to a configuration file //! //! @param filename - Name of file (without path) //! @param attributes - Attributes to use when opening the file. //! This should be one of "r", "w", "rt" or "wt" //! //! @return ICP_RC_OK if file exists //! //! @note Attempts to locate the file in two locations: //! - Application data directory (e.g. %APPDATA%/usbdm, $HOME/.usbdm) //! - Application directory (where the .exe is) //! string getApplicationFilePath(const string &filename, const string &attributes) { string configFilePath; // Try the Executable directory for readonly files if (attributes[0] == 'r') { configFilePath = getDataDir() + getPathSeparator() + filename; print("getApplicationFilePath() - trying %s\n", configFilePath.c_str()); if (fileExists(configFilePath)) return configFilePath; } #ifdef WIN32 // Try the Path indicated by registry key if necessary if (attributes[0] == 'r') { configFilePath = getInstallationDir()+ filename; print("getApplicationFilePath() - trying %s\n", configFilePath.c_str()); if (fileExists(configFilePath)) return configFilePath; } #endif // Try the Application Data directory configFilePath = getUserDataDir() + getPathSeparator() + filename;; print("getApplicationFilePath() - trying %s\n", configFilePath.c_str()); if (fileExists(configFilePath)) return configFilePath; return string(); }
[ "podonoghue@swin.edu.au" ]
podonoghue@swin.edu.au
a4dc085b41d0cda7aa949d23c5e6b5ce44b8c07a
23819413de400fa78bb813e62950682e57bb4dc0
/Rounds/Round-688/d.cpp
a665dc3c7142488e5b8e92cddca711834786cd11
[]
no_license
Manzood/CodeForces
56144f36d73cd35d2f8644235a1f1958b735f224
578ed25ac51921465062e4bbff168359093d6ab6
refs/heads/master
2023-08-31T16:09:55.279615
2023-08-20T13:42:49
2023-08-20T13:42:49
242,544,327
1
0
null
null
null
null
UTF-8
C++
false
false
1,188
cpp
#include "bits/stdc++.h" using namespace std; #define debug(x) cout << #x << " = " << x << endl; int main() { int t; cin >> t; while (t--) { long long k; scanf("%lld", &k); if (k < 2) { printf("-1\n"); continue; } k -= 2; vector <int> b; long long cur = 1; for (int i = 0; i < 63 && cur <= k; i++) { if (k & cur) b.push_back(1); else b.push_back(0); cur = cur << 1; } vector <int> ans; ans.push_back(1); // printf("Printing binary\n"); // for (auto x: b) { // printf("%d ", x); // } // printf("\nDone\n"); for (int i = 1; i < (int)b.size(); i++) { if (b[i] == 1) { for (int j = 0; j < i-1; j++) { ans.push_back(0); } ans.push_back(1); } } if ((int)ans.size() > 2000) printf("-1\n"); else { printf("%d\n", (int)ans.size()); for (auto x: ans) { printf("%d ", x); } printf("\n"); } } }
[ "manzood.naqvi@gmail.com" ]
manzood.naqvi@gmail.com
042b4bd35302dccf3366a32cc6f8ff5e347fad53
9100a962129d21f9f61a27339d9220d11130db55
/playground/function/function.cpp
452bc7afc38b4a0aac214e7691c79e3dd30fd176
[ "MIT" ]
permissive
llHoYall/Cpp_Playground
55aa03b1cd94542a4ca232839e8b792a610bf2bb
3f50237c7530e31be571e67ad2a627d1f33bbf51
refs/heads/master
2020-03-28T15:57:28.759632
2019-06-27T03:36:17
2019-06-27T03:36:17
148,643,106
0
0
null
null
null
null
UTF-8
C++
false
false
704
cpp
/******************************************************************************* * @brief Function in modern C++ * @author llHoYall <hoya128@gmail.com> * @version v1.0 * @history * 2018.12.23 Created. ******************************************************************************/ /* Include Headers -----------------------------------------------------------*/ #include <iostream> #include "first-class_function.h" #include "higher-order_function.h" #include "pure_function.h" #include "currying.h" /* Main Routine --------------------------------------------------------------*/ auto main() -> int { FirstClassFunction(); HigherOrderFunction(); PureFunction(); Currying(); return 0; }
[ "hoya128@gmail.com" ]
hoya128@gmail.com
5e7a35cde49e2eb20f760eed48091a153b9287bb
f3b5c4a5ce869dee94c3dfa8d110bab1b4be698b
/third_party/boost_1_48_0/boost/asio/local/connect_pair.hpp
a1a4d28bf0695efba678cec04019557a90842760
[ "BSL-1.0" ]
permissive
pan2za/ctrl
8f808fb4da117fce346ff3d54f80b4e3d6b86b52
1d49df03ec4577b014b7d7ef2557d76e795f6a1c
refs/heads/master
2021-01-22T23:16:48.002959
2015-06-17T06:13:36
2015-06-17T06:13:36
37,454,161
2
0
null
null
null
null
UTF-8
C++
false
false
3,426
hpp
// // local/connect_pair.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_LOCAL_CONNECT_PAIR_HPP #define BOOST_ASIO_LOCAL_CONNECT_PAIR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> #if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) \ || defined(GENERATING_DOCUMENTATION) #include <boost/asio/basic_socket.hpp> #include <boost/asio/detail/socket_ops.hpp> #include <boost/asio/detail/throw_error.hpp> #include <boost/asio/error.hpp> #include <boost/asio/local/basic_endpoint.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { namespace local { /// Create a pair of connected sockets. template <typename Protocol, typename SocketService1, typename SocketService2> void connect_pair( basic_socket<Protocol, SocketService1>& socket1, basic_socket<Protocol, SocketService2>& socket2); /// Create a pair of connected sockets. template <typename Protocol, typename SocketService1, typename SocketService2> boost::system::error_code connect_pair( basic_socket<Protocol, SocketService1>& socket1, basic_socket<Protocol, SocketService2>& socket2, boost::system::error_code& ec); #ifndef BOOST_NO_EXCEPTIONS template <typename Protocol, typename SocketService1, typename SocketService2> inline void connect_pair( basic_socket<Protocol, SocketService1>& socket1, basic_socket<Protocol, SocketService2>& socket2) { boost::system::error_code ec; connect_pair(socket1, socket2, ec); boost::asio::detail::throw_error(ec, "connect_pair"); } #endif template <typename Protocol, typename SocketService1, typename SocketService2> inline boost::system::error_code connect_pair( basic_socket<Protocol, SocketService1>& socket1, basic_socket<Protocol, SocketService2>& socket2, boost::system::error_code& ec) { // Check that this function is only being used with a UNIX domain socket. boost::asio::local::basic_endpoint<Protocol>* tmp = static_cast<typename Protocol::endpoint*>(0); (void)tmp; Protocol protocol; boost::asio::detail::socket_type sv[2]; if (boost::asio::detail::socket_ops::socketpair(protocol.family(), protocol.type(), protocol.protocol(), sv, ec) == boost::asio::detail::socket_error_retval) return ec; if (socket1.assign(protocol, sv[0], ec)) { boost::system::error_code temp_ec; boost::asio::detail::socket_ops::state_type state[2] = { 0, 0 }; boost::asio::detail::socket_ops::close(sv[0], state[0], true, temp_ec); boost::asio::detail::socket_ops::close(sv[1], state[1], true, temp_ec); return ec; } if (socket2.assign(protocol, sv[1], ec)) { boost::system::error_code temp_ec; socket1.close(temp_ec); boost::asio::detail::socket_ops::state_type state = 0; boost::asio::detail::socket_ops::close(sv[1], state, true, temp_ec); return ec; } return ec; } } // namespace local } // namespace asio } // namespace boost #include <boost/asio/detail/pop_options.hpp> #endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) // || defined(GENERATING_DOCUMENTATION) #endif // BOOST_ASIO_LOCAL_CONNECT_PAIR_HPP
[ "pan2za@live.com" ]
pan2za@live.com
bd762580596c86ab6d496220bbf0074bfa6c442a
15f1b1e98f99531c7f286ddf854b776ee140e14d
/Sort/BubblingSort.cpp
11fbeb3b7badc4f8d30b0d1b1a746d9821205bc9
[]
no_license
bright-dusty/lintcode-
7a59e5f341684e851fa2340dad81e63f5bed02f9
718bfd95fc0a0b6c42bc7acbbfc43b12ceebedd7
refs/heads/master
2021-04-27T04:37:15.114470
2018-03-11T05:06:07
2018-03-11T05:06:07
122,581,920
0
0
null
null
null
null
UTF-8
C++
false
false
252
cpp
#include <cstdlib> #include "swap.hpp" template <typename T> void _sort (T arr[], size_t n) { for (size_t i=0; i < n-1; i++) for (size_t j=0; j < n-1-i; j++) if (arr[j] > arr[j+1]) swap<T>(arr[j], arr[j+1]); }
[ "qj p" ]
qj p
6d16a4019fdcdf96202a3a651409991cae6da7e0
21b3663aaae0f7c5ab8c2c9d523bf23bc3d013e8
/sketch_nov20a/sketch_nov20a.ino
2c7a34ef7462fe0b2271618b83a1564a3242626e
[]
no_license
patpending/Arduino
394218fdcca010d18309902195f95fc281f1a85e
62151686fd6862231227a44e5d3e0f9800779c9c
refs/heads/master
2020-12-14T09:54:24.002089
2018-11-05T20:31:01
2018-11-05T20:31:01
95,476,719
0
0
null
null
null
null
UTF-8
C++
false
false
186
ino
void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: Serial.print("dsdasda"); delay(10000); }
[ "patrick.strobel@gmail.com" ]
patrick.strobel@gmail.com
72fb7e9b743de162b4cd127f5d02d1755fbed4cf
eab87b164a2e44e23df9935dcb1563a00f8f0221
/QController/comcpp/src/qqmlreadonlypropertymap.cpp
7578b5317f20142928d33f472b64c8eeb0f7f4cb
[]
no_license
BMValeev/science
6f140171c330fe535bdf5a8111757b8e384fb155
9f9bae33764bfc3afad96ab397f27525c25e1b28
refs/heads/master
2021-07-03T22:54:27.055596
2020-09-02T15:26:41
2020-09-02T15:26:41
161,135,578
0
0
null
null
null
null
UTF-8
C++
false
false
313
cpp
#include "qqmlreadonlypropertymap.h" QQmlReadonlyPropertyMap::QQmlReadonlyPropertyMap(QObject *parent) : QQmlPropertyMap(this, parent) { } QVariant QQmlReadonlyPropertyMap::updateValue(const QString &key, const QVariant &input) { // Prevent updates from QML Q_UNUSED(input) return value(key); }
[ "you@example.com" ]
you@example.com
9a54907fb8bb5314c0402b819e8afd130c13851b
4a19b7c7c3f06fb166d6f8ba3c08ac10cf20c601
/Source/HeadsUpDisplay.cpp
ab40dbd70e02a57e21ef5acd4897d80fbf8bdcb9
[ "MIT" ]
permissive
Trevor-Dych/The-God-Core
f3c6dd99cdb5acfab104c7147607837075e7d367
29b40cba0eab0608acd3ff6a4aff3435a2f71471
refs/heads/master
2021-01-18T05:17:25.077372
2015-09-09T23:03:56
2015-09-09T23:03:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,676
cpp
/*************************************************************\ * HeadsUpDisplay.cpp * * This file was created by Jeremy Greenburg * * As part of The God Core game for the University of * * Tennessee at Martin's University Scholars Organization * * * * This file contains the definition of the HeadsUpDisplay * * Class. For more information, see HeadsUpDisplay.h * \*************************************************************/ // Class Declaration #include "HeadsUpDisplay.h" // OpenGL API #include <gl\glew.h> #include <gl\glut.h> // For counting seconds #include <ctime> // For displaying Rectangles #include "Rectangle.h" // For displaying triangles #include "Triangle.h" using namespace std; void HeadsUpDisplay::prepare2D() { // Disable writing to the z buffer glDisable(GL_DEPTH_TEST); glDepthMask(GL_FALSE); // Disables lighting glDisable(GL_LIGHTING); // Create an orthogonal matrix to write on glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrtho(SCREENTOP, SCREENBOTTOM, SCREENRIGHT, SCREENLEFT, -1, 1); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); } void HeadsUpDisplay::prepare3D() { // Discards the orthogonal matrices glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); // Enables writing to the z buffer glEnable(GL_DEPTH_TEST); glDepthMask(GL_TRUE); // Renable lighting glEnable(GL_LIGHTING); } void HeadsUpDisplay::drawHelmetBounds() { // Helmet bounds are black float colors[4] = { 0, 0, 0, 1 }; // The top of the helmet float top_vertices[9] = { SCREENRIGHT / 5, SCREENTOP, -1, SCREENRIGHT / 2, 30, -1, 4 * SCREENRIGHT / 5, SCREENTOP, -1 }; // The left of the hemlet float left_vertices[9] = { SCREENLEFT, SCREENBOTTOM, -1, SCREENLEFT, SCREENBOTTOM / 2, -1, SCREENRIGHT / 20, 3 * SCREENBOTTOM / 4, -1 }; // The back of the helmet float right_vertices[9] = { SCREENRIGHT, SCREENBOTTOM, -1, SCREENRIGHT, SCREENBOTTOM / 2, -1, 19 * SCREENRIGHT / 20, 3 * SCREENBOTTOM / 4, -1 }; Triangle top_helm{ top_vertices, colors }; Triangle left_helm{ left_vertices, colors }; Triangle right_helm{ right_vertices, colors }; top_helm.Display2D(); left_helm.Display2D(); right_helm.Display2D(); } void HeadsUpDisplay::DisplayAlerts() { helmet.openFile(.5 * SCREENRIGHT, .5 * SCREENBOTTOM, 1, 1, 1, "suitAlerts.log", currentAlert); } void HeadsUpDisplay::dim() { static int startTime; static bool timeSet = false; if (dimNow) { if (!timeSet) { startTime = time(NULL); timeSet = true; } int currentTime = time(NULL); int timeElapsed = currentTime - startTime; if (timeElapsed < dimTime) { // A black square that grows more transparent as time passes float colors[4] = { 0, 0, 0, (float)(dimTime - timeElapsed) / dimTime }; float dimVert[12] = { SCREENLEFT, SCREENTOP, -1, SCREENLEFT, SCREENBOTTOM, -1, SCREENRIGHT, SCREENBOTTOM, -1, SCREENRIGHT, SCREENTOP, -1 }; Rectangle black{ dimVert, colors }; black.Display2D(); } else { dimNow = false; timeSet = false; } } } void HeadsUpDisplay::dark() { static int startTime; static bool timeSet = false; if (darkNow) { if (!timeSet) { startTime = time(NULL); timeSet = true; } int currentTime = time(NULL); int timeElapsed = currentTime - startTime; if (timeElapsed < darkTime) { // A black square that obscures vision float colors[4] = { 0, 0, 0, 1 }; float dimVert[12] = { SCREENLEFT, SCREENTOP, -1, SCREENLEFT, SCREENBOTTOM, -1, SCREENRIGHT, SCREENBOTTOM, -1, SCREENRIGHT, SCREENTOP, -1 }; Rectangle black{ dimVert, colors }; black.Display2D(); } else { darkNow = false; timeSet = false; } } } void HeadsUpDisplay::drawConsole() { float colors[4] = { .1, .1, .1, .9 }; float vertices[12] = { SCREENLEFT, SCREENTOP, -1, SCREENLEFT, SCREENBOTTOM / 5, -1, SCREENRIGHT, SCREENBOTTOM / 5, -1, SCREENRIGHT, SCREENTOP, -1 }; Rectangle console_tab{ vertices, colors }; console_tab.Display2D(); if (currentInput != "") { dev.activate(currentInput, currentText); currentInput.clear(); } else { dev.activate(currentText); } } void HeadsUpDisplay::drawInfoBox() { float colors[4] = { 0, 1, 1, .5 }; float vertices[12] = { SCREENLEFT, SCREENTOP, -1, SCREENLEFT, 40, -1, 50, 40, -1, 50, SCREENTOP, -1 }; Rectangle info{ vertices, colors }; info.Display2D(); } void HeadsUpDisplay::displayInfo(char* tag) { helmet.openFile(SCREENLEFT, SCREENTOP + 10, 1, 1, 1, "suitAlerts.log", "INFO-WELL"); } void HeadsUpDisplay::goDim(int time) { dimTime = time; dimNow = true; } void HeadsUpDisplay::goDark(int time) { darkTime = time; darkNow = true; } void HeadsUpDisplay::displayWarning(std::string warning) { currentAlert = warning; } void HeadsUpDisplay::printToConsole(std::string text) { currentText = text; } void HeadsUpDisplay::inputString(std::string text) { currentInput = text; } void HeadsUpDisplay::toggleConsole() { devConsole = !devConsole; } void HeadsUpDisplay::drawHUD() { drawHelmetBounds(); if (dimNow) { dim(); } else if (darkNow) { dark(); } drawInfoBox(); displayInfo("SUIT-WELL"); if (devConsole) { drawConsole(); } if (currentAlert != "") { DisplayAlerts(); } } string HeadsUpDisplay::getHist(int count) { return dev.getHist(count); } int HeadsUpDisplay::getHistNum() { return dev.getHistNum(); } void HeadsUpDisplay::DisplayHUD() { prepare2D(); drawHUD(); prepare3D(); }
[ "jrggb@yahoo.com" ]
jrggb@yahoo.com
aa52362135346c8b8b1b26733e846a33128649af
ae0f1fff140e24076442a26ad6236b3c5527e601
/NV8/bai1.cpp
ee59ae3aeddb2fd4bbbc9a1cf02102cf9a7c11e5
[]
no_license
jackychun2002/T2008M-LBEP
cd61ca8a04e92d7722d449b5d30b8b325bdff357
b2bfaf221d694c91654ddb42d5818b718c2909b5
refs/heads/master
2022-12-30T23:41:22.522590
2020-10-02T03:17:12
2020-10-02T03:17:12
293,971,004
0
0
null
null
null
null
UTF-8
C++
false
false
382
cpp
#include<stdio.h> int t(int n,int s=0){ if(n<2) return false; for(int i=2;i<=(n-1);i++){ if(n%i ==0){ return false; } return true; } } void C(int n){ int i=n+1; while(t(i)==false){ i++; } printf("%d",i); } int main(){ int n; do{ printf("nhap n :"); scanf("%d",&n); }while(n<=0); printf("So nguyen to lon hon n va gan n nhat: "); C(n); return 0; }
[ "chienbody2002@gmail.com" ]
chienbody2002@gmail.com
19964d9c87feea7f93783576bcf9e3220b9fdd51
e7be6f7963140443172518f8e0fd2a89056df3f7
/cocos2dx-store/Soomla/data/CCVirtualCurrencyStorage.cpp
1fdbfa0c7065fe0807fd9ac43d71799c690df44e
[ "Apache-2.0" ]
permissive
iscoolent/soomla-bundle
1a0e9dd8a6e64a032e1370078b68a2f17cd09d86
75e5da7fc1c44d7bc4f75a9eb55aca6ac23ad341
refs/heads/master
2022-12-08T06:27:19.271918
2020-08-28T15:05:56
2020-08-28T16:37:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,497
cpp
/* Copyright (C) 2012-2014 Soomla Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include "data/CCVirtualCurrencyStorage.h" #include "CCStoreEventDispatcher.h" #include "CCSoomlaUtils.h" #include "NativeImpl/CCNativeVirtualCurrencyStorage.h" namespace soomla { #define TAG "SOOMLA VirtualCurrencyStorage" static CCVirtualCurrencyStorage *s_SharedVirtualCurrencyStorage = NULL; CCVirtualCurrencyStorage *CCVirtualCurrencyStorage::getInstance() { if (!s_SharedVirtualCurrencyStorage) { #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) s_SharedVirtualCurrencyStorage = new CCNativeVirtualCurrencyStorage(); #else s_SharedVirtualCurrencyStorage = new CCVirtualCurrencyStorage(); #endif // s_SharedVirtualCurrencyStorage->retain(); } return s_SharedVirtualCurrencyStorage; } CCVirtualCurrencyStorage::CCVirtualCurrencyStorage() { } CCVirtualCurrencyStorage::~CCVirtualCurrencyStorage() { } const char* CCVirtualCurrencyStorage::keyBalance(const char *itemId) const { return keyCurrencyBalance(itemId); } void CCVirtualCurrencyStorage::postBalanceChangeEvent(CCVirtualItem *item, int balance, int amountAdded) { CCVirtualCurrency *virtualCurrency = dynamic_cast<CCVirtualCurrency *>(item); if (virtualCurrency == NULL) { CCSoomlaUtils::logError(TAG, cocos2d::__String::createWithFormat("Trying to post currency balance changed with a non VirtualCurrency item %s", item->getId()->getCString())->getCString()); return; } CCStoreEventDispatcher::getInstance()->onCurrencyBalanceChanged(virtualCurrency, balance, amountAdded); } const char *CCVirtualCurrencyStorage::keyCurrencyBalance(const char *itemId) { return cocos2d::__String::createWithFormat("currency.%s.balance", itemId)->getCString(); } #undef TAG }
[ "julien.jorge@stuff-o-matic.com" ]
julien.jorge@stuff-o-matic.com
075a2e8d7835c3556d1b659589404e319b1f281d
198ab1db1be319ca3b1438cee13483bdb06e752f
/tags/iris-0.1.17/src/core/AcceptSignalWatcher.cpp
4d70a9db65f971dc8e8304681cec91a58835b04e
[]
no_license
CommunicoPublic/iris
b11b366e244707d017ff55d6c952b7247d5ea1dc
b412f5db97ba7305f0b946e628709c1c6f976953
refs/heads/master
2020-05-30T10:04:24.953824
2015-06-30T10:02:39
2015-06-30T10:02:39
26,064,979
2
0
null
null
null
null
UTF-8
C++
false
false
4,123
cpp
/*- * Copyright (c) Iris Dev. team. All rights reserved. * See http://www.communico.pro/license for details. * */ #include "AcceptSignalWatcher.hpp" #include "AcceptLoopContext.hpp" #include "GlobalContext.hpp" #include "Logger.hpp" #include "MainLoopContext.hpp" #include "NetworkHandler.hpp" #include "NetworkEventWatcher.hpp" #include "ServiceConfig.hpp" #include "ServerClientTCPSSLSocket.hpp" namespace IRIS { // // Constructor // AcceptSignalWatcher::AcceptSignalWatcher(AcceptLoopContext * pIContext): IOAsyncWatcher(&(pIContext -> thread_loop)), pContext(pIContext) { StartWatch(); } #ifdef IRIS_TLS_SUPPORT // // Setup SSL // INT_32 AcceptSignalWatcher::SetupSSL() { STLW::vector<ServiceConfig> & oServiceConfig = pContext -> main_context.global_context.config.services; STLW::vector<ServiceConfig>::iterator itvServices = oServiceConfig.begin(); while (itvServices != oServiceConfig.end()) { // Check for SSL support if (itvServices -> enable_ssl_tls) { SSL_CTX * pSSLContext = NULL; for (UINT_32 iPos = 0; iPos < itvServices -> tls_cert_file.size(); ++iPos) { pContext -> main_context.global_context.error_log -> Debug("Adding certificate { `%s` `%s` } for service `%s`", itvServices -> tls_cert_file[iPos].c_str(), itvServices -> tls_key_file[iPos].c_str(), itvServices -> name.c_str()); pSSLContext = oSSLCore.AddContext(itvServices -> tls_cert_file[iPos], itvServices -> tls_key_file[iPos], itvServices -> dh_file, itvServices -> ciphers, itvServices -> name, itvServices -> use_tls, itvServices -> prefer_server_ciphers, *(pContext -> main_context.global_context.error_log)); if (pSSLContext == NULL) { pContext -> main_context.global_context.error_log -> Error("Setup of SSL/TLS data for service `%s` aborted", itvServices -> name.c_str()); return -1; } } mSSLServiceMap[itvServices -> name] = pSSLContext; } ++itvServices; } return 0; } #endif // IRIS_TLS_SUPPORT // // Watcher callback // void AcceptSignalWatcher::Callback(const UINT_32 iREvents) { STLW::vector<MainLoopContext::EventEntry> vClients; CRITICAL { MutexLocker oLocker(pContext -> main_context.mutex); // Copy all pending connections to internal vector STLW::queue<MainLoopContext::EventEntry> & oClients = pContext -> main_context.client_sockets; vClients.reserve(oClients.size()); while (!oClients.empty()) { MainLoopContext::EventEntry & oEntry = oClients.front(); vClients.push_back(oEntry); oClients.pop(); } } // Handle all new pending connections STLW::vector<MainLoopContext::EventEntry>::iterator itvClients = vClients.begin(); while (itvClients != vClients.end()) { MainLoopContext::EventEntry & oEntry = *itvClients; // Get network handler NetworkHandler * pHandler = static_cast<NetworkHandler *>(oEntry.service_config -> handler); // Setup SSL connection STLW::map<STLW::string, SSL_CTX *>::iterator itmSSLServiceMap = mSSLServiceMap.find(oEntry.service_config -> name); if (itmSSLServiceMap != mSSLServiceMap.end() && oEntry.socket -> IsSSL()) { dynamic_cast<ServerClientTCPSSLSocket *>(oEntry.socket) -> SetSSLContext(itmSSLServiceMap -> second); } // Create new connection watcher NetworkEventWatcher * pNetworkWatcher = pHandler -> NewConnection(pContext, oEntry.service_config, oEntry.socket); // Add new watcher pContext -> clients.AddWatcher(pNetworkWatcher); // And start watch pNetworkWatcher -> StartWatch(); ++itvClients; } } // // A destructor // AcceptSignalWatcher::~AcceptSignalWatcher() throw() { ;; } } // namespace IRIS // End.
[ "root@ubuntu.communco.pro" ]
root@ubuntu.communco.pro
de092a4ef3b7b450deeab404127625e27b073fd0
d73974bcf6836de3a481f1452c2624c18094a539
/src/Particle.hpp
86fc5e7959747bc8b258089f022364f8097292d9
[]
no_license
SexyParabola/Oscillo
8e4d78a5b9288b520565ade0fa0c9258604da311
e5ce9539e98a2cc165fb9ca28588f50aaf1c3360
refs/heads/master
2023-08-04T08:21:13.448953
2021-09-16T19:39:51
2021-09-16T19:39:51
249,865,757
0
0
null
null
null
null
UTF-8
C++
false
false
517
hpp
#pragma once #include <SFML/Graphics.hpp> class Particle { private: public: sf::Vector2f vel; sf::Vector2f acc; sf::CircleShape cir; double mass = 1.0f; Particle(sf::Vector2f P) { cir.setPosition( P ); } void tick() { // This here is the "BUG".. cir.setPosition( cir.getPosition().x + vel.x, cir.getPosition().y + vel.y ); // Swap these line of code to "fix" vel.x += acc.x; vel.y += acc.y; acc.x = 0; acc.y = 0; } void draw(sf::RenderWindow &window) { window.draw(cir); } };
[ "ultrahoodsense@gmail.com" ]
ultrahoodsense@gmail.com
622dd8fc926551a0a1f20501895de6eadaf24b1a
c65801f6dd31b0d4e30197266d60a6867f1e4459
/源.cpp
5f8d6dfbb23418a24ac33391c83da9fbcacc053e
[]
no_license
asLong72/afd
bcff0f01a2153ba418df4e3c18d8fabab869c9c8
b3f4f3e8d35aa33fef833924465883f3db6da4c6
refs/heads/master
2020-09-02T22:21:30.384550
2019-11-03T15:12:33
2019-11-03T15:12:33
219,319,682
0
0
null
null
null
null
ISO-8859-3
C++
false
false
4,096
cpp
#include <stdio.h> #include <math.h> int a, b, c, d, e; long l; char ch; double z, y, x, w; int T1(void) { scanf_s("%d%d%d", &a, &b, &c); if (a <= b && a <= c) { printf("%d\n", a); } else if (b <= a && b <= c) { printf("%d\n", b); } else { printf("%d\n", c); } return 0; } int T2(void) { int a; scanf_s("%d", &a); if (a < 0 || a>100) { printf("error!"); } else { a /= 10; switch (a) { case 10: putchar('A'); break; case 9: putchar('A'); break; case 8: putchar('B'); break; case 7: putchar('C'); break; case 6: putchar('D'); break; default: putchar('E'); break; } } return 0; } int T3(void) { scanf_s("%d", &a); if (a < 0) { printf("error!"); } if (0 != (a % 10)) { printf("%d", a % 10); } if (0 != (a % 100)) { printf("%d", (a % 100) / 10); } if (0 != (a % 1000)) { printf("%d", (a % 1000) / 100); } return 0; } int T4(void) { scanf_s("%d", &a); if (100000 >= a) { z = a * 0.1; } if (100000 >= a - 100000 && a - 100000 > 0) { a = a - 100000; z = (100000 * 0.1) + (a * 0.075); } if (200000 >= a - 200000 && a - 200000 > 0) { a = a - 200000; z = (100000 * 0.1) + (1000000 * 0.075) + (a * 0.05); } if (200000 >= a - 400000 && a - 400000 > 0) { a = a - 400000; z = (100000 * 0.1) + 1000000 * 0.075 + 200000 * 0.05 + a * 0.03; } if (400000 >= a - 600000 && a - 600000 > 0) { a = a - 600000; z = (100000 * 0.1) + 1000000 * 0.075 + 200000 * 0.05 + 20000 * 0.03 + a * 0.015; } if (a > 1000000) { l = a - 1000000; z = (100000 * 0.1) + 1000000 * 0.075 + 200000 * 0.05 + 20000 * 0.03 + 400000 * 0.015 + (l - 1000000) * 0.01; } printf("%.2f", z); return 0; } int T5(void) { scanf_s("&lf", &x); if (x < 1) { y = x * x + 2 * x + sin(x); } else if (x >= 1 && x <= 10) { y = 2 * x + 1; } else if (x > 10) { y = sqrt(x * x * x * 2 + 11); } printf("%.2f", y); return 0; } int T6(void) { scanf_s("%c", &ch); if ((ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122)) { printf("It is an alphabetic character."); } else if (ch >= 48 && ch <= 89) { printf("It is a digit."); } else { printf("£şIt is other character."); } return 0; } int T7(void) { start: scanf_s("%d%d%d", &a, &b, &c); if (a + b > c&& a + c > b&& c + b > a) { if (a == b && a == c) { printf("1\n"); } else if ((a == b && a != c) || (a == c && a != b) || (c == b && c != a)) { printf("2\n"); } else if ((a * a + b * b == c * c) || (a * a + c * c == b * b) || (c * c + b * b == a * a)) { printf("3\n"); } else { printf("0\n"); } } else { printf("error!\n"); } goto start; return 0; } int T8(void) { scanf_s("%lf", &z); if (a >= 0 && a <= 100) { printf("%d", (int)pow(z, 2.0)); } else { printf("-1"); } return 0; } int T9(void) { scanf_s("%lf", &z); if (a >= 0 && a <= 20) { printf("%d", (int)pow(z, 3.0)); } else { printf("-1"); } return 0; } int T10(void) { scanf_s("%d", &a); if (0 == (a % 4)) { if (0 == (a % 400)) printf("1\n"); else if ((0 == a % 4) && (0 != a % 100)) printf("1\n"); else if ((0 != a % 400) == (0 == a % 100)) printf("1\n"); } else { printf("0\n"); } return 0; } int T11(void) { scanf_s("%d", &a); if (a >= 1 && a <= 12) { if (a == 2) { printf("28\n"); } else if (a <= 7 && (a % 2) == 1) { printf("31\n"); } else if (a <= 7 && (a % 2) == 0) { printf("30\n"); } else if (a >= 8 && (a % 2) == 0) { printf("31\n"); } else if (a >= 8 && (a % 2) == 1) { printf("30\n"); } } else { printf("error!\n"); } return 0; } int T12(void) { float a, b, c; scanf_s("%f%f%f",&a,&b,&c); if (a!=0) { } return 0; } int T13(void) { return 0; } int T14(void) { return 0; } int T15(void) { return 0; } int T16(void) { return 0; } int T17(void) { return 0; } int T18(void) { return 0; } int T19(void) { return 0; } int T20(void) { return 0; } int main() { start: //T1(); //T2(); //T3(); //T4(); //T5(); //T6(); //T7(); //T8(); //T9(); //T10(); T11(); T12(); goto start; return 0; }
[ "1494854781@qq.com" ]
1494854781@qq.com
61f150e40f02cfaad57a55e21928151a04dd6b4f
ce18cf6bdb1a85a65a509597b4c0ec046b855186
/斐波那契数.cpp
9e7b3db09149123cea52e01ee33a5588ea9bb222
[]
no_license
elssm/leetcode
e12e39faff1da5afb234be08e7d9db85fbee58f8
a38103d2d93b34bc8bcf09f87c7ea698f99c4e36
refs/heads/master
2021-06-11T06:44:44.993905
2021-04-28T06:14:23
2021-04-28T06:14:23
171,072,054
3
0
null
null
null
null
UTF-8
C++
false
false
160
cpp
#include<stdio.h> int fib(int N) { if(N<=1) return N; else return fib(N-1)+fib(N-2); } int main(void){ int t=10; int s=fib(t); printf("%d\n",s); }
[ "329847986@qq.com" ]
329847986@qq.com
fac94be6c765f1100728978eba6f9b59ff3f79c4
6267120efd229c7d20dec7de0795bdb472a927dd
/LogicLayer/CasualGame/SFSendDBRequest.h
fde91a68d06fe89d3db9aacd7599cb72f97b8cd4
[]
no_license
wkawkfk/CGSF
77a1e643f164998772b371aaac777a30da1af9dd
919c68bcf27996f06dc25017cf003b4aa7b8785b
refs/heads/master
2020-12-25T12:17:22.557411
2012-11-30T13:08:33
2012-11-30T13:08:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
436
h
#pragma once class SFPlayer; class BasePacket; class SFSendDBRequest { public: static BOOL RequestLogin(SFPlayer* pPlayer); static BOOL SendRequest(int RequestMsg, DWORD PlayerSerial, BasePacket* pPacket); static SFMessage* GetInitMessage(int RequestMsg, DWORD PlayerSerial); static BOOL Send(SFMessage* pMessage); static void SendToLogic(BasePacket* pMessage); private: SFSendDBRequest(void){} ~SFSendDBRequest(void){} };
[ "juhang3@daum.net" ]
juhang3@daum.net
6675e010cf62cc622aaa1feb1d3030509b31d27c
60b040d794f1501085dbf78884ebb7f47e0fd61b
/DxEngine/source/TextureClass.h
98a972d8dbada5a3c6de4d5d3478a131b54c4d50
[]
no_license
Grave/DxEngine
08807836103727377d231e435e95d3282a240cc4
6f532c96ff9db04210244bee49b0dd4d7653aa6c
refs/heads/master
2021-01-19T04:50:54.330800
2014-07-30T19:21:41
2014-07-30T19:21:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
668
h
//////////////////////////////////////////////////////////////////////////////// // Filename: TextureClass.h //////////////////////////////////////////////////////////////////////////////// #pragma once #include "stdafx.h" //////////////////////////////////////////////////////////////////////////////// // Class name: TextureClass //////////////////////////////////////////////////////////////////////////////// class TextureClass { public: TextureClass(); TextureClass(const TextureClass&); ~TextureClass(); bool Initialize(ID3D11Device*, WCHAR*); void Shutdown(); ID3D11ShaderResourceView* GetTexture(); private: ID3D11ShaderResourceView* m_texture; };
[ "guilhermecsrodrigues@gmail.com" ]
guilhermecsrodrigues@gmail.com
fb654d15e2d0e513c8c7eda2b63811d4a496762d
cd697db374f06422b53f2319000f6591ed92e809
/JoystickInput.h
e38bb2b0ef29375c6681050d1b9ca37112317f21
[]
no_license
CML-lab/Utility_Task_cpp
d00b44104c07a9824415e7589a4e6a140873c73b
ea7a9dc830ed3d446ab0c930a5940fd8e1193df1
refs/heads/master
2023-07-15T13:23:32.918294
2021-08-25T18:02:51
2021-08-25T18:02:51
null
0
0
null
null
null
null
UTF-8
C++
false
false
750
h
#ifndef JOYSTICKINPUT_H #define JOYSTICKINPUT_H #pragma once #include "SDL.h" #include "InputDevice.h" static GLfloat jx; static GLfloat jy; static GLfloat jradius; static GLfloat jangle; // Handles joystick actions class JoystickInput : public InputDevice { public: JoystickInput() { } ~JoystickInput() { } //Initialize Joystick //bool InitJoystick(); // Gets the most recent frame of data from the joystick InputFrame GetFrame(); // Updates JoystickInput with new axes information. // event is an SDL_Event containing the updated information. static void ProcessEvent(SDL_Event event,SDL_Joystick *joystick); //close the joystick when done static void CloseJoystick(SDL_Joystick *joystick); }; #endif
[ "cognitivemotorlab@gmail.com" ]
cognitivemotorlab@gmail.com
df47736a6eebf57f80868d1e2ba600c79bed4ec8
5041bdc8ce649616b6dcf32aeade9ae27075ae2b
/net/http/mock_http_cache.h
917aa20db15d8cbe471da5a54fe079e3e18b43c3
[ "BSD-3-Clause" ]
permissive
aSeijiNagai/Readium-Chromium
a15a1ea421c797fab6e0876785f9ce4afb784e60
404328b0541dd3da835b288785aed080f73d85dd
refs/heads/master
2021-01-16T22:00:32.748245
2012-09-24T07:57:13
2012-09-24T07:57:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,310
h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This is a mock of the http cache and related testing classes. To be fair, it // is not really a mock http cache given that it uses the real implementation of // the http cache, but it has fake implementations of all required components, // so it is useful for unit tests at the http layer. #ifndef NET_HTTP_MOCK_HTTP_CACHE_H_ #define NET_HTTP_MOCK_HTTP_CACHE_H_ #include "base/hash_tables.h" #include "net/disk_cache/disk_cache.h" #include "net/http/http_cache.h" #include "net/http/http_transaction_unittest.h" //----------------------------------------------------------------------------- // Mock disk cache (a very basic memory cache implementation). class MockDiskEntry : public disk_cache::Entry, public base::RefCounted<MockDiskEntry> { public: MockDiskEntry(); explicit MockDiskEntry(const std::string& key); bool is_doomed() const { return doomed_; } virtual void Doom() OVERRIDE; virtual void Close() OVERRIDE; virtual std::string GetKey() const OVERRIDE; virtual base::Time GetLastUsed() const OVERRIDE; virtual base::Time GetLastModified() const OVERRIDE; virtual int32 GetDataSize(int index) const OVERRIDE; virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) OVERRIDE; virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback, bool truncate) OVERRIDE; virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) OVERRIDE; virtual int WriteSparseData( int64 offset, net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) OVERRIDE; virtual int GetAvailableRange( int64 offset, int len, int64* start, const net::CompletionCallback& callback) OVERRIDE; virtual bool CouldBeSparse() const OVERRIDE; virtual void CancelSparseIO() OVERRIDE; virtual int ReadyForSparseIO( const net::CompletionCallback& completion_callback) OVERRIDE; // Fail most subsequent requests. void set_fail_requests() { fail_requests_ = true; } // If |value| is true, don't deliver any completion callbacks until called // again with |value| set to false. Caution: remember to enable callbacks // again or all subsequent tests will fail. static void IgnoreCallbacks(bool value); private: friend class base::RefCounted<MockDiskEntry>; struct CallbackInfo; virtual ~MockDiskEntry(); // Unlike the callbacks for MockHttpTransaction, we want this one to run even // if the consumer called Close on the MockDiskEntry. We achieve that by // leveraging the fact that this class is reference counted. void CallbackLater(const net::CompletionCallback& callback, int result); void RunCallback(const net::CompletionCallback& callback, int result); // When |store| is true, stores the callback to be delivered later; otherwise // delivers any callback previously stored. static void StoreAndDeliverCallbacks(bool store, MockDiskEntry* entry, const net::CompletionCallback& callback, int result); static const int kNumCacheEntryDataIndices = 3; std::string key_; std::vector<char> data_[kNumCacheEntryDataIndices]; int test_mode_; bool doomed_; bool sparse_; bool fail_requests_; bool busy_; bool delayed_; static bool cancel_; static bool ignore_callbacks_; }; class MockDiskCache : public disk_cache::Backend { public: MockDiskCache(); virtual ~MockDiskCache(); virtual int32 GetEntryCount() const OVERRIDE; virtual int OpenEntry(const std::string& key, disk_cache::Entry** entry, const net::CompletionCallback& callback) OVERRIDE; virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry, const net::CompletionCallback& callback) OVERRIDE; virtual int DoomEntry(const std::string& key, const net::CompletionCallback& callback) OVERRIDE; virtual int DoomAllEntries(const net::CompletionCallback& callback) OVERRIDE; virtual int DoomEntriesBetween( const base::Time initial_time, const base::Time end_time, const net::CompletionCallback& callback) OVERRIDE; virtual int DoomEntriesSince( const base::Time initial_time, const net::CompletionCallback& callback) OVERRIDE; virtual int OpenNextEntry(void** iter, disk_cache::Entry** next_entry, const net::CompletionCallback& callback) OVERRIDE; virtual void EndEnumeration(void** iter) OVERRIDE; virtual void GetStats( std::vector<std::pair<std::string, std::string> >* stats) OVERRIDE; virtual void OnExternalCacheHit(const std::string& key) OVERRIDE; // Returns number of times a cache entry was successfully opened. int open_count() const { return open_count_; } // Returns number of times a cache entry was successfully created. int create_count() const { return create_count_; } // Fail any subsequent CreateEntry and OpenEntry. void set_fail_requests() { fail_requests_ = true; } // Return entries that fail some of their requests. void set_soft_failures(bool value) { soft_failures_ = value; } // Makes sure that CreateEntry is not called twice for a given key. void set_double_create_check(bool value) { double_create_check_ = value; } void ReleaseAll(); private: typedef base::hash_map<std::string, MockDiskEntry*> EntryMap; void CallbackLater(const net::CompletionCallback& callback, int result); EntryMap entries_; int open_count_; int create_count_; bool fail_requests_; bool soft_failures_; bool double_create_check_; }; class MockBackendFactory : public net::HttpCache::BackendFactory { public: virtual int CreateBackend(net::NetLog* net_log, disk_cache::Backend** backend, const net::CompletionCallback& callback) OVERRIDE; }; class MockHttpCache { public: MockHttpCache(); explicit MockHttpCache(net::HttpCache::BackendFactory* disk_cache_factory); net::HttpCache* http_cache() { return &http_cache_; } MockNetworkLayer* network_layer() { return static_cast<MockNetworkLayer*>(http_cache_.network_layer()); } MockDiskCache* disk_cache(); // Helper function for reading response info from the disk cache. static bool ReadResponseInfo(disk_cache::Entry* disk_entry, net::HttpResponseInfo* response_info, bool* response_truncated); // Helper function for writing response info into the disk cache. static bool WriteResponseInfo(disk_cache::Entry* disk_entry, const net::HttpResponseInfo* response_info, bool skip_transient_headers, bool response_truncated); // Helper function to synchronously open a backend entry. bool OpenBackendEntry(const std::string& key, disk_cache::Entry** entry); // Helper function to synchronously create a backend entry. bool CreateBackendEntry(const std::string& key, disk_cache::Entry** entry, net::NetLog* net_log); // Returns the test mode after considering the global override. static int GetTestMode(int test_mode); // Overrides the test mode for a given operation. Remember to reset it after // the test! (by setting test_mode to zero). static void SetTestMode(int test_mode); private: net::HttpCache http_cache_; }; // This version of the disk cache doesn't invoke CreateEntry callbacks. class MockDiskCacheNoCB : public MockDiskCache { virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry, const net::CompletionCallback& callback) OVERRIDE; }; class MockBackendNoCbFactory : public net::HttpCache::BackendFactory { public: virtual int CreateBackend(net::NetLog* net_log, disk_cache::Backend** backend, const net::CompletionCallback& callback) OVERRIDE; }; // This backend factory allows us to control the backend instantiation. class MockBlockingBackendFactory : public net::HttpCache::BackendFactory { public: MockBlockingBackendFactory(); virtual ~MockBlockingBackendFactory(); virtual int CreateBackend(net::NetLog* net_log, disk_cache::Backend** backend, const net::CompletionCallback& callback) OVERRIDE; // Completes the backend creation. Any blocked call will be notified via the // provided callback. void FinishCreation(); disk_cache::Backend** backend() { return backend_; } void set_fail(bool fail) { fail_ = fail; } const net::CompletionCallback& callback() { return callback_; } private: int Result() { return fail_ ? net::ERR_FAILED : net::OK; } disk_cache::Backend** backend_; net::CompletionCallback callback_; bool block_; bool fail_; }; #endif // NET_HTTP_MOCK_HTTP_CACHE_H_
[ "kerz@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c" ]
kerz@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c
b8d0dd5864d4ba541b9bd71486d3ce01b5bf766e
c8fc2703cce588d28dd9583e523f7f78378e3fd3
/practise/bfs_implementation.cpp
bae74fe03ebfdf534e28508da3d2548b0d098a17
[]
no_license
ngangwar962/C_and_Cpp_Programs
e4da2951b1a8c0091df26e363227488e279a9caa
396d4313d2451e073811c0657f068829db10bcd5
refs/heads/master
2020-06-19T14:20:19.749116
2019-08-10T16:54:09
2019-08-10T16:54:09
196,741,346
0
0
null
null
null
null
UTF-8
C++
false
false
1,086
cpp
#include<bits/stdc++.h> using namespace std; #define MAX 10000 bool visited[MAX]={0}; int level[MAX]={0}; int vertices; void addedge(vector<int> adj[],int v1,int v2) { adj[v1].push_back(v2); adj[v2].push_back(v1); return; } void printg(vector<int> adj[],int v) { cout<<v; int i; for(i=0;i<adj[v].size();i++) { cout<<"->"<<adj[v][i]; } cout<<"\n"; return; } void bfs(vector<int> adj[],int s) { int i; for(i=0;i<vertices;i++) { visited[i]=0; level[i]=-1; } queue<int> q; q.push(s); visited[s]=true; level[s]=0; while(!q.empty()) { int p=q.front(); q.pop(); vector<int>::iterator it; for(it=adj[p].begin();it!=adj[p].end();it++) { if(!visited[*it]) { q.push(*it); visited[*it]=true; level[*it]=level[p]+1; } } } return; } int main() { int i,j,k,edges; cin>>vertices; vector<int> adj[vertices]; cin>>edges; int v1,v2; for(i=0;i<edges;i++) { cin>>v1>>v2; addedge(adj,v1,v2); } for(i=0;i<vertices;i++) { printg(adj,i); } bfs(adj,0); for(i=0;i<vertices;i++) { cout<<level[i]<<" "; } cout<<"\n"; return 0; }
[ "ngangwar962@gmail.com" ]
ngangwar962@gmail.com
9026da2258e1cdc8fd8a7d80badd0af0f68b16c9
785df77400157c058a934069298568e47950e40b
/TnbSectPx/TnbLib/SectPx/Entities/Shape/Profile/SectPx_ProfileShape.hxx
8f2a1770ae21c8a68cd24e839fc439b288380e63
[]
no_license
amir5200fx/Tonb
cb108de09bf59c5c7e139435e0be008a888d99d5
ed679923dc4b2e69b12ffe621fc5a6c8e3652465
refs/heads/master
2023-08-31T08:59:00.366903
2023-08-31T07:42:24
2023-08-31T07:42:24
230,028,961
9
3
null
2023-07-20T16:53:31
2019-12-25T02:29:32
C++
UTF-8
C++
false
false
914
hxx
#pragma once #ifndef _SectPx_ProfileShape_Header #define _SectPx_ProfileShape_Header #include <SectPx_Shape.hxx> namespace tnbLib { // Forward Declarations class SectPx_TopoSegment; class SectPx_ProfileShape : public SectPx_Shape { /*Private Data*/ std::shared_ptr<SectPx_TopoSegment> theSegment_; public: SectPx_ProfileShape() {} SectPx_ProfileShape(const Standard_Integer theIndex, const word& theName); SectPx_ProfileShape(const std::shared_ptr<SectPx_TopoSegment>& theSegment); SectPx_ProfileShape(const Standard_Integer theIndex, const word& theName, const std::shared_ptr<SectPx_TopoSegment>& theSegment); const auto& Segment() const { return theSegment_; } void SetSegment(const std::shared_ptr<SectPx_TopoSegment>& theSegment) { theSegment_ = theSegment; } Standard_Boolean IsProfile() const override; }; } #endif // !_SectPx_ProfileShape_Header
[ "aasoleimani86@gmail.com" ]
aasoleimani86@gmail.com
eff3f1499c7bb4de6960b41387829e21eaf85fdc
3aa028649f6e9a26454a1caa4d0b89cbe341d660
/GTRACT/Cmdline/gtractCoRegAnatomy.cxx
58011354bcd488fb9255e5018f630c0abeb1c580
[]
no_license
jcfr/BRAINSStandAlone
2738b83213235c35148f291ad57d07bdeb30de07
db8a912bbd19734968e4cf83752cb1facdba10eb
refs/heads/master
2021-01-16T21:03:02.734435
2011-10-26T18:30:54
2011-10-26T18:30:54
2,634,574
0
1
null
null
null
null
UTF-8
C++
false
false
10,453
cxx
/*========================================================================= Program: GTRACT (Guided Tensor Restore Anatomical Connectivity Tractography) Module: $RCSfile: $ Language: C++ Date: $Date: 2010/05/03 14:53:40 $ Version: $Revision: 1.9 $ Copyright (c) University of Iowa Department of Radiology. All rights reserved. See GTRACT-Copyright.txt or http://mri.radiology.uiowa.edu/copyright/GTRACT-Copyright.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include <iostream> #include <fstream> #include <itkImage.h> #include <itkVectorIndexSelectionCastImageFilter.h> #include <itkThresholdImageFilter.h> #include <itkOrientImageFilter.h> #include "itkGtractImageIO.h" #include "BRAINSFitHelper.h" #include "gtractCoRegAnatomyCLP.h" #include "BRAINSThreadControl.h" int main(int argc, char *argv[]) { PARSE_ARGS; BRAINSUtils::SetThreadCount(numberOfThreads); itk::TransformFactory<itk::ScaleVersor3DTransform<double> >::RegisterTransform(); itk::TransformFactory<itk::ScaleVersor3DTransform<float> >::RegisterTransform(); std::vector<int> GridSize; GridSize.push_back( gridSize[0] ); GridSize.push_back( gridSize[1] ); GridSize.push_back( gridSize[2] ); bool debug = true; if( debug ) { std::cout << "=====================================================" << std::endl; std::cout << "Input Image: " << inputVolume << std::endl; std::cout << "Output Transform: " << outputTransformName << std::endl; std::cout << "Anatomical Image: " << inputAnatomicalVolume << std::endl; std::cout << "Iterations: " << numberOfIterations << std::endl; if( transformType == "Bspline" ) { std::cout << "Input Rigid Transform: " << inputRigidTransform << std::endl; // std::cout << "Grid Size: " << GridSize <<std::endl; // std::cout << "Border Size: " << borderSize <<std::endl; // std::cout << "Corrections: " << numberOfCorrections <<std::endl; // std::cout << "Evaluations: " << numberOfEvaluations <<std::endl; std::cout << "Histogram: " << numberOfHistogramBins << std::endl; std::cout << "Scale: " << spatialScale << std::endl; std::cout << "Convergence: " << convergence << std::endl; std::cout << "Gradient Tolerance: " << gradientTolerance << std::endl; std::cout << "Index: " << vectorIndex << std::endl; } else if( transformType == "Rigid" ) { std::cout << "Translation Scale: " << translationScale << std::endl; std::cout << "Maximum Step Length: " << maximumStepSize << std::endl; std::cout << "Minimum Step Length: " << minimumStepSize << std::endl; std::cout << "Relaxation Factor: " << relaxationFactor << std::endl; std::cout << "Samples: " << numberOfSamples << std::endl; std::cout << "Index: " << vectorIndex << std::endl; } // std::cout << "Bound X: " << boundX <<std::endl; // std::cout << "\tLower X Bound: " << xLowerBound <<std::endl; // std::cout << "\tUpper X Bound: " << xUpperBound <<std::endl; // std::cout << "Bound Y: " << boundY <<std::endl; // std::cout << "\tLower Y Bound: " << yLowerBound <<std::endl; // std::cout << "\tUpper Y Bound: " << yUpperBound <<std::endl; // std::cout << "Bound Z: " << boundZ <<std::endl; // std::cout << "\tLower Z Bound: " << zLowerBound <<std::endl; // std::cout << "\tUpper Z Bound: " << zUpperBound <<std::endl; std::cout << "=====================================================" << std::endl; } bool violated = false; if( inputVolume.size() == 0 ) { violated = true; std::cout << " --inputVolume Required! " << std::endl; } if( inputAnatomicalVolume.size() == 0 ) { violated = true; std::cout << " --inputAnatomicalVolume Required! " << std::endl; } if( transformType == "Bspline" ) { if( inputRigidTransform.size() == 0 ) { violated = true; std::cout << " --inputRigidTransform Required! " << std::endl; } } if( outputTransformName.size() == 0 ) { violated = true; std::cout << " --outputTransform Required! " << std::endl; } if( violated ) { exit(1); } // typedef signed short PixelType; typedef float PixelType; typedef itk::VectorImage<PixelType, 3> VectorImageType; typedef itk::ImageFileReader<VectorImageType, itk::DefaultConvertPixelTraits<PixelType> > VectorImageReaderType; VectorImageReaderType::Pointer vectorImageReader = VectorImageReaderType::New(); vectorImageReader->SetFileName( inputVolume ); try { vectorImageReader->Update(); } catch( itk::ExceptionObject & ex ) { std::cout << ex << std::endl; throw; } typedef itk::Image<PixelType, 3> AnatomicalImageType; typedef itk::ImageFileReader<AnatomicalImageType> AnatomicalImageReaderType; AnatomicalImageReaderType::Pointer anatomicalReader = AnatomicalImageReaderType::New(); anatomicalReader->SetFileName( inputAnatomicalVolume ); try { anatomicalReader->Update(); } catch( itk::ExceptionObject & ex ) { std::cout << ex << std::endl; throw; } /* Extract the Vector Image Index for Registration */ typedef itk::VectorIndexSelectionCastImageFilter<VectorImageType, AnatomicalImageType> VectorSelectFilterType; typedef VectorSelectFilterType::Pointer VectorSelectFilterPointer; VectorSelectFilterPointer selectIndexImageFilter = VectorSelectFilterType::New(); selectIndexImageFilter->SetIndex( vectorIndex ); selectIndexImageFilter->SetInput( vectorImageReader->GetOutput() ); try { selectIndexImageFilter->Update(); } catch( itk::ExceptionObject e ) { std::cout << e << std::endl; throw; } std::string localInitializeTransformMode = "Off"; if( ( (useCenterOfHeadAlign == true) + (useGeometryAlign == true) + (useMomentsAlign == true) ) > 1 ) { std::cout << "ERROR: Can only specify one of [useCenterOfHeadAlign | useGeometryAlign | useMomentsAlign ]" << std::endl; } if( useCenterOfHeadAlign == true ) { localInitializeTransformMode = "useCenterOfHeadAlign"; } if( useGeometryAlign == true ) { localInitializeTransformMode = "useGeometryAlign"; } if( useMomentsAlign == true ) { localInitializeTransformMode = "useMomentsAlign"; } typedef itk::BRAINSFitHelper RegisterFilterType; RegisterFilterType::Pointer registerImageFilter = RegisterFilterType::New(); if( transformType == "Rigid" ) { /* The Threshold Image Filter is used to produce the brain clipping mask. */ typedef itk::ThresholdImageFilter<AnatomicalImageType> ThresholdFilterType; const PixelType imageThresholdBelow = 100; ThresholdFilterType::Pointer brainOnlyFilter = ThresholdFilterType::New(); brainOnlyFilter->SetInput( selectIndexImageFilter->GetOutput() ); brainOnlyFilter->ThresholdBelow( imageThresholdBelow ); try { brainOnlyFilter->Update(); } catch( itk::ExceptionObject e ) { std::cout << e << std::endl; throw; } registerImageFilter->SetMovingVolume( brainOnlyFilter->GetOutput() ); } if( transformType == "Bspline" ) { typedef itk::OrientImageFilter<AnatomicalImageType, AnatomicalImageType> OrientFilterType; OrientFilterType::Pointer orientImageFilter = OrientFilterType::New(); // orientImageFilter->SetInput(brainOnlyFilter->GetOutput() ); orientImageFilter->SetInput( selectIndexImageFilter->GetOutput() ); orientImageFilter->SetDesiredCoordinateDirection( anatomicalReader->GetOutput()->GetDirection() ); orientImageFilter->UseImageDirectionOn(); try { orientImageFilter->Update(); } catch( itk::ExceptionObject e ) { std::cout << e << std::endl; throw; } registerImageFilter->SetMovingVolume( orientImageFilter->GetOutput() ); } std::vector<std::string> transformTypes; std::vector<int> iterations; iterations.push_back(numberOfIterations); if( transformType == "Bspline" ) { transformTypes.push_back("BSpline"); registerImageFilter->SetNumberOfSamples( anatomicalReader->GetOutput()->GetBufferedRegion().GetNumberOfPixels() / spatialScale); registerImageFilter->SetNumberOfHistogramBins(numberOfHistogramBins); registerImageFilter->SetSplineGridSize( gridSize ); registerImageFilter->SetCostFunctionConvergenceFactor( convergence ); registerImageFilter->SetProjectedGradientTolerance( gradientTolerance ); registerImageFilter->SetMaxBSplineDisplacement(maxBSplineDisplacement); registerImageFilter->SetInitializeTransformMode(localInitializeTransformMode); if( inputRigidTransform.size() > 0 ) { registerImageFilter->SetCurrentGenericTransform(itk::ReadTransformFromDisk(inputRigidTransform) ); } } if( transformType == "Rigid" ) { transformTypes.push_back("ScaleVersor3D"); std::vector<double> minStepLength; minStepLength.push_back( (double)minimumStepSize); registerImageFilter->SetTranslationScale( translationScale ); registerImageFilter->SetMaximumStepLength( maximumStepSize ); registerImageFilter->SetMinimumStepLength(minStepLength ); registerImageFilter->SetRelaxationFactor( relaxationFactor ); registerImageFilter->SetNumberOfSamples( numberOfSamples ); registerImageFilter->SetInitializeTransformMode(localInitializeTransformMode); } registerImageFilter->SetFixedVolume( anatomicalReader->GetOutput() ); registerImageFilter->SetTransformType(transformTypes); registerImageFilter->SetNumberOfIterations(iterations); try { registerImageFilter->StartRegistration(); } catch( itk::ExceptionObject & ex ) { std::cout << ex << std::endl; throw; } GenericTransformType::Pointer outputTransform = registerImageFilter->GetCurrentGenericTransform(); // WriteTransformToDisk(outputTransform.GetPointer(), outputTransformName); WriteTransformToDisk(outputTransform, outputTransformName); return EXIT_SUCCESS; }
[ "hans-johnson@uiowa.edu" ]
hans-johnson@uiowa.edu
9a22a4512f9e1f7427347f8d34ab42b4b4994bde
ed9393909378b8c54911a144429953bc237aadb7
/e-footbot/simulator/battery_sensor.cpp
1f44ac3b33cdace46eeea19f8c0576f6c7fe7ffb
[]
no_license
isvogor-foi/argos-customizations
714736175fa33aa7da850911f6c4a10890c8e54e
71425e63788d9f42a3274dea562325705137ad39
refs/heads/master
2021-01-01T06:16:07.996225
2017-08-18T19:32:57
2017-08-18T19:32:57
97,398,276
0
0
null
null
null
null
UTF-8
C++
false
false
11,629
cpp
#include "battery_sensor.h" #include <argos3/core/simulator/simulator.h> #include <argos3/core/simulator/entity/composable_entity.h> #include <argos3/core/simulator/entity/embodied_entity.h> #include <argos3/plugins/simulator/entities/wheeled_entity.h> #include <argos3/plugins/simulator/entities/led_equipped_entity.h> namespace argos { CBatterySensor::CBatterySensor() : //m_pcRNG(NULL), m_sDischargeType("non-linear"), m_pcBatteryEntity(NULL), m_pcEmbodiedEntity(NULL), m_pcLEDs(NULL), fStartingCapacity(0), simulation_tick_factor(0), m_cSpace(CSimulator::GetInstance().GetSpace()) { } void CBatterySensor::SetRobot(CComposableEntity& c_entity) { try { m_pcEmbodiedEntity = &(c_entity.GetComponent<CEmbodiedEntity>("body")); m_pcControllableEntity = &(c_entity.GetComponent<CControllableEntity> ("controller")); m_pcBatteryEntity = &(c_entity.GetComponent<CBatterySensorEquippedEntity>("battery")); m_pcWheels = &(c_entity.GetComponent<CWheeledEntity>("wheels")); m_pcLEDs = &(c_entity.GetComponent<CLEDEquippedEntity>("leds")); } catch(CARGoSException& ex) { THROW_ARGOSEXCEPTION_NESTED("Error setting differential steering actuator to entity \"" << c_entity.GetId() << "\"", ex); } } void CBatterySensor::InitCapacity() { m_bChargingState = false; m_bProcessingState = false; pcRNG = CRandom::CreateRNG("argos"); // default random instance // min * sec * simulation tick to convert from Ah to Atick simulation_tick_factor = 60 * 60 * CPhysicsEngine::GetInverseSimulationClockTick(); // for linear doesn't matter (only fConsumedCapacity matters) m_fSOC = m_pcBatteryEntity->GetStartingCapacity(); fNominalCapacity = m_pcBatteryEntity->GetNominalCapacity() * simulation_tick_factor; // for linear ok fStartingCapacity = fNominalCapacity * m_pcBatteryEntity->GetStartingCapacity(); fConsumedCapacity = fNominalCapacity - fStartingCapacity; if(m_pcBatteryEntity->GetRandomizeInitialSOC()){ float random = (float)(GetRandomInteger(m_pcBatteryEntity->GetStartingCapacityJitterMin(), m_pcBatteryEntity->GetStartingCapacityJitterMax(), pcRNG)) / 100.0f; fStartingCapacity = (m_pcBatteryEntity->GetNominalCapacity() * random) * simulation_tick_factor; fConsumedCapacity = fNominalCapacity - fStartingCapacity; } // add random jitter to battery consumption elements (idle, driving, processing) m_pcBatteryEntity->SetIdleCurrent(m_pcBatteryEntity->GetIdleCurrent() * (float)(GetRandomInteger(m_pcBatteryEntity->GetJitterPercentageMin(), m_pcBatteryEntity->GetJitterPercentageMax(), pcRNG)) / 100.0f); m_pcBatteryEntity->SetDriveCurrent(m_pcBatteryEntity->GetDriveCurrent() * (float)(GetRandomInteger(m_pcBatteryEntity->GetJitterPercentageMin(), m_pcBatteryEntity->GetJitterPercentageMax(), pcRNG)) / 100.0f); m_pcBatteryEntity->SetProcessingCurrent(m_pcBatteryEntity->GetProcessingCurrent() * (float)(GetRandomInteger(m_pcBatteryEntity->GetJitterPercentageMin(), m_pcBatteryEntity->GetJitterPercentageMax(), pcRNG)) / 100.0f); } void CBatterySensor::Init(TConfigurationNode & t_tree) { try { CCI_BatterySensor::Init(t_tree); m_pcBatteryEntity->Init(t_tree); CBatterySensor::InitCapacity(); // read XML attributes GetNodeAttributeOrDefault(t_tree, "discharge_type", m_sDischargeType, m_sDischargeType); m_bConvertCharge = false; m_bConvertDischarge = false; if(m_sDischargeType.compare("non-linear") == 0){ m_bConvertCharge = true; } // parameter cheatsheet (hardcoded voltages -> 1cell battery) // https://www.desmos.com/calculator/hycpcbwtbq std::vector<double> Xd(4), Yd(4); // normalize Ah to [0,1] range Xd[0]= 0.0 * fNominalCapacity; Yd[0]=4.2; Xd[1]= 0.25 * fNominalCapacity; Yd[1]=3.7; Xd[2]= 0.75 * fNominalCapacity; Yd[2]=3.2; Xd[3]= 1.0 * fNominalCapacity; Yd[3]=2.2; dischargeSplineFunction.set_points(Xd, Yd); std::vector<double> Xc(4), Yc(4); Xc[0]= 0.0 * fNominalCapacity; Yc[0]=4.2; Xc[1]= 0.1 * fNominalCapacity; Yc[1]=4.15; Xc[2]= 0.4 * fNominalCapacity; Yc[2]=3.8; Xc[3]= 1.0 * fNominalCapacity; Yc[3]=2.2; chargeSplineFunction.set_points(Xc,Yc); } catch (CARGoSException& ex) { THROW_ARGOSEXCEPTION_NESTED("Initialization error in default battery sensor", ex); } } void CBatterySensor::Update() { if(m_bChargingState){ Charging(); }else{ Discharging(); } CBatterySensor::UpdateLEDs(); } /* * Update LED Colors * The beacon color will is automatically updated to color between red and green gradient (from 0 to 100 respectively). * Depending on the robot actions, the surrounding LEDs will glow: * - WHITE default * - BLUE if robot is processing (regardless of it driving or not) * - YELLOW if robot is charging */ void CBatterySensor::UpdateLEDs() { if(m_bChargingState){ m_pcLEDs->SetAllLEDsColors(CColor::YELLOW); } else if (m_bProcessingState){ m_pcLEDs->SetAllLEDsColors(CColor::BLUE); } else { m_pcLEDs->SetAllLEDsColors(CColor::WHITE); } int accent_parameter = 0; if(m_fSOC >= 80){ accent_parameter = 20; }else if(m_fSOC <= 40){ accent_parameter = -15; } if(m_fSOC - 15 <= 0){ hsv_color = new HSVColor(0, 1.0f, 0.3f); }else{ hsv_color = new HSVColor(m_fSOC + accent_parameter, 1.0f, 0.3f); } RGBColor rgb_color = HSVColorToRGB(hsv_color); const CColor *color = new CColor((UInt8)(rgb_color.red), (UInt8)(rgb_color.green), (UInt8)(rgb_color.blue)); m_pcLEDs->GetLED(12).SetColor(*color); } void CBatterySensor::Charging() { if(m_sDischargeType.compare("linear") == 0){ //fConsumedCapacity -= charging_current / 60 / 60 / CPhysicsEngine::GetInverseSimulationClockTick(); fConsumedCapacity -= m_pcBatteryEntity->GetChargingCurrent(); m_fSOC = (1 - fConsumedCapacity / fNominalCapacity) * 100; }else{ fConsumedCapacity -= m_pcBatteryEntity->GetChargingCurrent(); if(m_bConvertCharge){ fConsumedCapacity = CBatterySensor::FindCapacity(fConsumedCapacity); m_bConvertCharge = false; m_bConvertDischarge = true; } m_fSOC = (chargeSplineFunction(fConsumedCapacity) - m_pcBatteryEntity->GetEmptyVoltage()) / (m_pcBatteryEntity->GetVoltage() - m_pcBatteryEntity->GetEmptyVoltage()) * 100; } if(m_fSOC >= 100){ m_fSOC = 100; fConsumedCapacity = 0; } } Real CBatterySensor::FindCapacity(Real capacity){ float TOLERANCE = 0.001; for(float i = 0.0; i <= fNominalCapacity; i+= 0.1){ float diff = 0; if(m_bConvertCharge){ diff = dischargeSplineFunction(capacity) - chargeSplineFunction(i); } else { diff = chargeSplineFunction(capacity) - dischargeSplineFunction(i); } if(diff < TOLERANCE && -diff < TOLERANCE){ return i; } } return 0; } void CBatterySensor::Discharging() { float totalCurrent = 0; Real driveCurrent = m_pcBatteryEntity->GetDriveCurrent(); // if wheels are spinning, add driving current consumption if(m_pcWheels->GetWheelVelocity(0) == 0 || m_pcWheels->GetWheelVelocity(1) == 0){ driveCurrent = driveCurrent / 2.0f; }else if(m_pcWheels->GetWheelVelocity(0) == 0 && m_pcWheels->GetWheelVelocity(1) == 0){ driveCurrent = 0.0f; } // check if processing, add processing current consumption if(m_bProcessingState){ totalCurrent = driveCurrent + m_pcBatteryEntity->GetIdleCurrent() + m_pcBatteryEntity->GetProcessingCurrent(); }else{ totalCurrent = driveCurrent + m_pcBatteryEntity->GetIdleCurrent(); } // calculate SOC based on one of two methods available (linear / non-linear) // this should be reprogrammed to use voltage only if(m_fSOC > 0){ fConsumedCapacity += totalCurrent; if(m_sDischargeType.compare("linear") == 0){ m_fSOC = (1 - fConsumedCapacity / fNominalCapacity) * 100; }else{ if(m_bConvertDischarge){ fConsumedCapacity = CBatterySensor::FindCapacity(fConsumedCapacity); m_bConvertDischarge = false; m_bConvertCharge = true; } m_fSOC = (dischargeSplineFunction(fConsumedCapacity) - m_pcBatteryEntity->GetEmptyVoltage()) / (m_pcBatteryEntity->GetVoltage() - m_pcBatteryEntity->GetEmptyVoltage()) * 100; } } else{ m_fSOC = 0; } } CBatterySensor::RGBColor CBatterySensor::HSVColorToRGB(CBatterySensor::HSVColor *color) { double red = 0; double green = 0; double blue = 0; if(color->saturation == 0){ red = color->value; green = color->value; blue = color->value; }else{ int hue_truncated = 0; double f, p, q, t; // get quarter in which the color is if(color->hue == 360){ color->hue = 0; }else{ color->hue /= 60; } hue_truncated = (int)(trunc(color->hue)); f = color->hue - hue_truncated; p = color->value * (1.0 - color->saturation); q = color->value * (1.0 - (color->saturation * f)); t = color->value * (1.0 - (color->saturation * (1.0 - f))); switch (hue_truncated){ case 0: red = color->value; green = t; blue = p; break; case 1: red = q; green = color->value; blue = p; break; case 2: red = p; green = color->value; blue = t; break; case 3: red = p; green = q; blue = color->value; break; case 4: red = t; green = p; blue = color->value; break; default: red = color->value; green = p; blue = q; break; } } return CBatterySensor::RGBColor((unsigned char)((red * 255)), (unsigned char)((green * 255)), (unsigned char)((blue * 255))); }; int CBatterySensor::GetRandomInteger(int min, int max, CRandom::CRNG* pcRNG){ CRange < UInt32 > cRange(min, max); int random = pcRNG->Uniform(cRange); return random; } void CBatterySensor::Reset() { } REGISTER_SENSOR(CBatterySensor, "battery", "default", "Ivan Svogor", "0.3", "Battery sensor for e-footbot (footbot copy with battery extensions)", "Currently some concerns are not separated, e.g. sensor enables setting state of charge and processing." "parameters should be in amp-hours (Ah) for capacity, and amps (A) for current", "Under development" ); } // end namespace
[ "isvogor@gmail.com" ]
isvogor@gmail.com
d4bfd69333bd935d49645a4c05cf117763bdb878
a28af655fbfcd2939fe50e30f8f5294f07c106d2
/Source/AudiusLib/Player/Playlist.h
611a0289347baaebffa5fb0acf1b3e01865b4a8f
[]
no_license
cnsuhao/Audius
d365dac2f0be7fcc844c913901013d3a8b47ca1e
22c3c61af6efdeb0ac92cc8fbad571e1694d4887
refs/heads/master
2021-05-26T16:59:25.928600
2012-10-06T14:51:20
2012-10-06T14:51:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,868
h
#pragma once //////////////////////////////////////////////////////////////////////////////////////// // File: Playlist.h //////////////////////////////////////////////////////////////////////////////////////// // Description: // // A thread safe list of songs to play. The music player has a reference to this list // and the player thread uses it as well to know what to play. // //////////////////////////////////////////////////////////////////////////////////////// #include "juce.h" #include "PlaylistEntry.h" class Playlist { public: Playlist(void) : _currentPosition(0) { } ~Playlist(void) { } // Add an entry to the play list void add(std::shared_ptr<PlaylistEntry> entry) { const ScopedLock l(_lock); _entries.push_back(entry); } // Clears the entire play list void clear() { const ScopedLock l(_lock); _entries.clear(); _currentPosition = 0; } // Retrieves the number of entries in the play list uint32 getCount() { const ScopedLock l(_lock); return _entries.size(); } // Advances the counter to the next entry if possible, or returns false if at end of list bool gotoNextEntry() { const ScopedLock l(_lock); if(_currentPosition >= _entries.size() - 1) return false; _currentPosition++; return true; } bool gotoPreviousEntry() { const ScopedLock l(_lock); if(_currentPosition <= 0) return false; _currentPosition--; return true; } // Inserts the entry at a certain position in the play list void insert(uint32 position, std::shared_ptr<PlaylistEntry> entry) { const ScopedLock l(_lock); jassert(position >= 0 && position <= _entries.size()); std::vector< std::shared_ptr<PlaylistEntry> >::iterator it = _entries.begin() + position; _entries.insert(it, entry); // Adjust current play position if(position <= _currentPosition) _currentPosition++; } // Gets the current play list entry std::shared_ptr<PlaylistEntry> getCurrentEntry() { const ScopedLock l(_lock); if(_currentPosition >= _entries.size()) return std::shared_ptr<PlaylistEntry>(); return _entries[_currentPosition]; } // Gets the current play list position uint32 getCurrentPosition() { return _currentPosition; } // Sets the current position of the playlist bool setCurrentPosition(uint32 position) { const ScopedLock l(_lock); if(position < 0 || position >= _entries.size()) return false; _currentPosition = position; return true; } std::shared_ptr<PlaylistEntry> getEntry(uint32 position) { const ScopedLock l(_lock); jassert(position >= 0 && position < _entries.size()); return _entries[position]; } private: std::vector< std::shared_ptr<PlaylistEntry> > _entries; uint32 _currentPosition; CriticalSection _lock; };
[ "pontus.munck@gmail.com" ]
pontus.munck@gmail.com
1302e85891fe478eb2fd2a415775bf71babf698c
96598dd5455dff1bf94a98799851237908631842
/Data Structures/week2_priority_queues_and_disjoint_sets/1_make_heap/build_heap.cpp
7e5897ae5ceec0bf4aea36b8329c738851dba6be
[ "MIT" ]
permissive
18Pranjul/Data-Structures-and-Algorithms-Specialization-Coursera
b31ed55edc76099eea28f861a49be75401fbe503
1d2f3a4ee390f0297de29de84205ef5f2a40f31d
refs/heads/master
2022-12-08T19:31:26.642032
2020-08-31T19:45:10
2020-08-31T19:45:10
288,704,669
0
0
null
null
null
null
UTF-8
C++
false
false
825
cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; typedef long long int ll; #define MOD 1000000007 #define MAX 1000000000000000000 #define ln "\n" vector <pair<ll,ll>> v; ll c=0; void heapify(ll a[],ll n,ll i) { ll min=i,l=2*i+1,r=2*i+2; if(l<n && a[min]>a[l]) min=l; if(r<n && a[min]>a[r]) min=r; if(min!=i) { swap(a[i],a[min]); v.push_back({i,min}); c++; heapify(a,n,min); } } void minheap(ll a[],ll n) { ll i; for(i=(n/2)-1;i>=0;i--) heapify(a,n,i); } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n,a[100005],i; cin>>n; for(i=0;i<n;i++) cin>>a[i]; minheap(a,n); cout<<c; for(i=0;i<c;i++) cout<<ln<<v[i].first<<" "<<v[i].second; return 0; }
[ "noreply@github.com" ]
18Pranjul.noreply@github.com
93e1bde93d50c752226de08e2071e77c34ef2f6a
15ae3c07d969f1e75bc2af9555cf3e952be9bfff
/analysis/pragma_before/pragma_719.hpp
958f49e784d8e32a0f2730c9d0389e5e60fba1e7
[]
no_license
marroko/generators
d2d1855d9183cbc32f9cd67bdae8232aba2d1131
9e80511155444f42f11f25063c0176cb3b6f0a66
refs/heads/master
2023-02-01T16:55:03.955738
2020-12-12T14:11:17
2020-12-12T14:11:17
316,802,086
0
0
null
null
null
null
UTF-8
C++
false
false
62
hpp
#ifndef FALYNYC_HPP #define FALYNYC_HPP #endif // FALYNYC_HPP
[ "marcus1.2.3@wp.pl" ]
marcus1.2.3@wp.pl
1efb8eadd478c066d4f3dab23a2b07aa6d1867fb
71ef8e94ca186e048e900f0e0d1401b25245bbfb
/Queue (array-based)/Queue.cpp
9aba1e67f3ecb790598d876969abbfa79402341e
[]
no_license
AmrBumadian/Data-Structures-Implementation
7c3cbf027c637b1a2d6ec56ffae8c167d9721372
814ad3d37fd2840cfbca097b3687d88e56507b7d
refs/heads/master
2023-02-11T05:01:57.388522
2021-01-09T05:59:41
2021-01-09T05:59:41
267,096,161
1
0
null
null
null
null
UTF-8
C++
false
false
2,759
cpp
#include <assert.h> #include <iostream> #include "Queue.h" using namespace std; template<class T> void Queue<T>::copy(const Queue<T> &other) { f = other.f; b = other.b; length = other.length; capacity = other.capacity; array = new T[capacity]; for (int i = 0; i < capacity; ++i) { array[i] = other.array[i]; } } template<class T> Queue<T>::Queue(int size) : length(0), capacity(size) { f = 0; b = capacity - 1; array = new T[capacity]; } template<class T> Queue<T>::Queue(const Queue<T> &other) { copy(other); } template<class T> Queue<T> &Queue<T>::operator=(const Queue<T> &other) { if (this != &other) { delete[] array; copy(other); } return *this; } template<class T> Queue<T>::~Queue() { delete[] array; } template<class T> void Queue<T>::push(T value) { if (length != capacity) { b = (b + 1) % capacity; // if b + 1 = capacity, go to the empty space in the front b = 0 array[b] = value; } else { cerr << "\nQueue is full" << endl; return; } ++length; } template<class T> T Queue<T>::pop() { if (length == 0) { cerr << "\nCannot remove from empty Queue" << endl; } else { T value = array[f]; f = (f + 1) % capacity; // discard this element and point to the next, if the next index == capacity point to the front of the array --length; return value; } } template<class T> T Queue<T>::front() { assert(length != 0); return array[f]; } template<class T> T Queue<T>::back() { assert(length != 0); return array[b]; } template<class T> int Queue<T>::size() { return length; } template<class T> bool Queue<T>::empty() { return (length == 0); } template<class T> void Queue<T>::clear() { delete[] array; capacity = 1; length = 0; array = new T[capacity]; } template<class T> bool Queue<T>::resize(int size) { // resize to bigger size only so elements won't be lost if (size < capacity) { cerr << "\ncannot make the Queue smaller\n"; return false; // cannot resize } T *temp = new T[size]; // allocate new capacity int i = 0, j = f; // pointers to copy the elements i for the new and j for the old while (j != b) { temp[i] = array[j]; ++i; j = (j + 1) % capacity; // make the pointer cycle through the array till it reach b } temp[i] = array[b]; // copy the element at b delete[] array; // delete the old array array = temp; // point the array pointer to the new array capacity = size; f = 0; // front is now the first index b = length - 1; // back is the last occupied index return true; // successfully resized; }
[ "35141856+AmrBumadian@users.noreply.github.com" ]
35141856+AmrBumadian@users.noreply.github.com