blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
1a9a429f2dcd81bd012aadd7be25efd781f68544
c78f01652444caa083ca75211bae6903d98363cb
/devel/include/mavlink/v2.0/common/mavlink_msg_camera_tracking_image_status.hpp
02aac857bb76d74f3f02c3d4f7e842d3e2b7f243
[ "Apache-2.0" ]
permissive
arijitnoobstar/UAVProjectileCatcher
9179980f8095652811b69b70930f65b17fbb4901
3c1bed80df167192cb4b971b58c891187628142e
refs/heads/master
2023-05-01T11:03:09.595821
2021-05-16T15:10:03
2021-05-16T15:10:03
341,154,017
19
7
null
null
null
null
UTF-8
C++
false
false
4,253
hpp
mavlink_msg_camera_tracking_image_status.hpp
// MESSAGE CAMERA_TRACKING_IMAGE_STATUS support class #pragma once namespace mavlink { namespace common { namespace msg { /** * @brief CAMERA_TRACKING_IMAGE_STATUS message * * Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval. */ struct CAMERA_TRACKING_IMAGE_STATUS : mavlink::Message { static constexpr msgid_t MSG_ID = 275; static constexpr size_t LENGTH = 31; static constexpr size_t MIN_LENGTH = 31; static constexpr uint8_t CRC_EXTRA = 126; static constexpr auto NAME = "CAMERA_TRACKING_IMAGE_STATUS"; uint8_t tracking_status; /*< Current tracking status */ uint8_t tracking_mode; /*< Current tracking mode */ uint8_t target_data; /*< Defines location of target data */ float point_x; /*< Current tracked point x value if CAMERA_TRACKING_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown */ float point_y; /*< Current tracked point y value if CAMERA_TRACKING_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown */ float radius; /*< Current tracked radius if CAMERA_TRACKING_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown */ float rec_top_x; /*< Current tracked rectangle top x value if CAMERA_TRACKING_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown */ float rec_top_y; /*< Current tracked rectangle top y value if CAMERA_TRACKING_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown */ float rec_bottom_x; /*< Current tracked rectangle bottom x value if CAMERA_TRACKING_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown */ float rec_bottom_y; /*< Current tracked rectangle bottom y value if CAMERA_TRACKING_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown */ inline std::string get_name(void) const override { return NAME; } inline Info get_message_info(void) const override { return { MSG_ID, LENGTH, MIN_LENGTH, CRC_EXTRA }; } inline std::string to_yaml(void) const override { std::stringstream ss; ss << NAME << ":" << std::endl; ss << " tracking_status: " << +tracking_status << std::endl; ss << " tracking_mode: " << +tracking_mode << std::endl; ss << " target_data: " << +target_data << std::endl; ss << " point_x: " << point_x << std::endl; ss << " point_y: " << point_y << std::endl; ss << " radius: " << radius << std::endl; ss << " rec_top_x: " << rec_top_x << std::endl; ss << " rec_top_y: " << rec_top_y << std::endl; ss << " rec_bottom_x: " << rec_bottom_x << std::endl; ss << " rec_bottom_y: " << rec_bottom_y << std::endl; return ss.str(); } inline void serialize(mavlink::MsgMap &map) const override { map.reset(MSG_ID, LENGTH); map << point_x; // offset: 0 map << point_y; // offset: 4 map << radius; // offset: 8 map << rec_top_x; // offset: 12 map << rec_top_y; // offset: 16 map << rec_bottom_x; // offset: 20 map << rec_bottom_y; // offset: 24 map << tracking_status; // offset: 28 map << tracking_mode; // offset: 29 map << target_data; // offset: 30 } inline void deserialize(mavlink::MsgMap &map) override { map >> point_x; // offset: 0 map >> point_y; // offset: 4 map >> radius; // offset: 8 map >> rec_top_x; // offset: 12 map >> rec_top_y; // offset: 16 map >> rec_bottom_x; // offset: 20 map >> rec_bottom_y; // offset: 24 map >> tracking_status; // offset: 28 map >> tracking_mode; // offset: 29 map >> target_data; // offset: 30 } }; } // namespace msg } // namespace common } // namespace mavlink
b945dc9428e14ba4e019e38e6339a9aa0ce3bc78
fa2c068f45390e0c398c14b2df0c6fcbf29b3907
/modules/aho/inl/pt_regex/lexrep/MatchCount.inl
0d5d66532abe7a972b117fdd9dd7310af0a2c445
[ "MIT" ]
permissive
mgoldenisc/iknow
445af5ff0a3670f8ee10174624fdc0138fe685e1
9326ba2425af1dc350948c7e9a11dadd5d8731a2
refs/heads/master
2023-07-07T00:24:44.948738
2021-07-14T18:29:40
2021-07-14T18:29:40
290,093,406
1
0
MIT
2020-08-25T02:37:17
2020-08-25T02:37:16
null
UTF-8
C++
false
false
49
inl
MatchCount.inl
0, 0,0,1,0,0,1,0,0,0,2,0,1,0,1,0,1, SmallCount()
ea394680e433f50ed85d60de8103b36a88b53938
91a882547e393d4c4946a6c2c99186b5f72122dd
/Source/XPSP1/NT/inetsrv/iis/iisrearc/core/wp/modules/static/dotrace.cxx
a1b5884430ae46c0f7620420385254774e3fbfef
[]
no_license
IAmAnubhavSaini/cryptoAlgorithm-nt5src
94f9b46f101b983954ac6e453d0cf8d02aa76fc7
d9e1cdeec650b9d6d3ce63f9f0abe50dabfaf9e2
refs/heads/master
2023-09-02T10:14:14.795579
2021-11-20T13:47:06
2021-11-20T13:47:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,997
cxx
dotrace.cxx
/*++ Copyright (c) 1998 Microsoft Corporation Module Name : DoTrace.cxx Abstract: Defines the functions for processing TRACE requests. Author: Murali R. Krishnan ( MuraliK ) 01-Dec-1998 Environment: Win32 - User Mode Project: IIS Worker Process (web service) --*/ /************************************************************ * Include Headers ************************************************************/ #include "precomp.hxx" /********************************************************************++ --********************************************************************/ ULONG ResizeResponseBuffer( BUFFER * pulResponseBuffer, ULONG cDataChunks ) { DWORD cbRequiredSize; cbRequiredSize = sizeof(UL_HTTP_RESPONSE_v1) + cDataChunks * sizeof(UL_DATA_CHUNK); if ( pulResponseBuffer->QuerySize() < cbRequiredSize) { if ( !pulResponseBuffer->Resize(cbRequiredSize)) { return ERROR_OUTOFMEMORY; } } return NO_ERROR; } /********************************************************************++ Routine Description: This function handles TRACE verb. It produces a plain echo and sends this out to the client. The resposne consists of two chunks: a) Usualy headers sent out by the server b) Request headers formatted by the server code and sent out as an echo to the client. On success an async operation will be queued and one can expect to receive the async io completion. Arguments: None Returns: ULONG --********************************************************************/ ULONG DoTRACEVerb( IWorkerRequest * pReq, BUFFER * pulResponseBuffer, BUFFER * pDataBuffer, PULONG pHttpStatus ) { DBG_ASSERT( NULL != pReq); DBG_ASSERT( NULL != pulResponseBuffer); DBG_ASSERT( NULL != pDataBuffer); ULONG rc, cbDataLen = 0; PUL_HTTP_REQUEST pulRequest = pReq->QueryHttpRequest(); PUL_HTTP_RESPONSE_v1 pulResponse; PUL_DATA_CHUNK pDataChunk; // // resize the response buffer appropriately // if ( NO_ERROR != (rc = ResizeResponseBuffer(pulResponseBuffer, 3))) { return rc; } // // Format the trace response for transmission. // pulResponse = (PUL_HTTP_RESPONSE_v1 ) (pulResponseBuffer->QueryPtr()); pulResponse->Flags = UL_HTTP_RESPONSE_FLAG_CALC_CONTENT_LENGTH; pulResponse->HeaderChunkCount = 1; pulResponse->EntityBodyChunkCount = (0 == pulRequest->EntityBodyLength) ? 1 : 2; pDataChunk = (PUL_DATA_CHUNK )(pulResponse + 1); FillDataChunkWithStringItem( pDataChunk, STITraceMessageHeaders); // // Reconstruct the request into the data buffer // rc = BuildEchoOfHttpRequest( pulRequest, pDataBuffer, cbDataLen); if (NO_ERROR != rc) { IF_DEBUG(ERROR) { DPERROR(( DBG_CONTEXT, rc, "Failed to create a trace of request headers.")); } return (rc); } pDataChunk[1].DataChunkType = UlDataChunkFromMemory; pDataChunk[1].FromMemory.pBuffer = pDataBuffer->QueryPtr(); pDataChunk[1].FromMemory.BufferLength = cbDataLen; // // ISSUE: Use original request buffer not the one modified by Filters. // if (0 != pulRequest->EntityBodyLength) { pDataChunk[2].DataChunkType = UlDataChunkFromMemory; pDataChunk[2].FromMemory.pBuffer = pulRequest->pEntityBody; pDataChunk[2].FromMemory.BufferLength = pulRequest->EntityBodyLength; } return rc; } // DoTRACEVerb() /********************************************************************++ Routine Description: Formats a trace response message and sends this out to the client. This is a temporary placeholder till other parts of infrastructure are developed. On success an async operation will be queued and one can expect to receive the async io completion. Arguments: None Returns: ULONG --********************************************************************/ ULONG SendTraceResponseAsHTML( IWorkerRequest * pReq, BUFFER * pulResponseBuffer, BUFFER * pDataBuffer ) { DBG_ASSERT( pReq != NULL); ULONG rc; PUL_HTTP_REQUEST pulRequest = pReq->QueryHttpRequest(); PUL_HTTP_RESPONSE_v1 pulResponse; PUL_DATA_CHUNK pDataChunk; // // resize the response buffer appropriately // if ( NO_ERROR != (rc = ResizeResponseBuffer(pulResponseBuffer, 4))) { return rc; } // // Format the trace response for transmission. // pulResponse = (PUL_HTTP_RESPONSE_v1) (pulResponseBuffer->QueryPtr()); pulResponse->Flags = (UL_HTTP_RESPONSE_FLAG_CALC_CONTENT_LENGTH | UL_HTTP_RESPONSE_FLAG_CALC_ETAG ); pulResponse->HeaderChunkCount = 1; pulResponse->EntityBodyChunkCount = 3; pDataChunk = (PUL_DATA_CHUNK )(pulResponse + 1); FillDataChunkWithStringItem( pDataChunk + 0, STITraceMessageHeadersHTML); FillDataChunkWithStringItem( pDataChunk + 1, STITraceMessageBodyStartHTML); if (!DumpHttpRequestAsHtml( pulRequest, pDataBuffer)) { rc = GetLastError(); IF_DEBUG(ERROR) { DBGPRINTF(( DBG_CONTEXT, "Failed to create a trace of request headers. Error=%08x\n", rc )); } return (rc); } pDataChunk[2].DataChunkType = UlDataChunkFromMemory; pDataChunk[2].FromMemory.pBuffer = pDataBuffer->QueryPtr(); pDataChunk[2].FromMemory.BufferLength = strlen((LPSTR) pDataBuffer->QueryPtr()); FillDataChunkWithStringItem( pDataChunk + 3, STITraceMessageBodyEndHTML); return rc; } // SendTraceResponseAsHTML() /********************************************************************++ Routine Description: This function handles all the verbs except ones that have specific functions. On success an async operation will be queued and one can expect to receive the async io completion. Arguments: None Returns: ULONG --********************************************************************/ ULONG DoDefaultVerb( IWorkerRequest * pReq, BUFFER * pulResponseBuffer, BUFFER * pDataBuffer, PULONG pHttpStatus ) { DBG_ASSERT( pReq != NULL); // // NYI: For now send back the trace of headers themselves // return SendTraceResponseAsHTML(pReq, pulResponseBuffer, pDataBuffer); } // DoDefaultVerb() /***************************** End of File ***************************/
517c71767c87cb29c6d0aa7a0562a10858413946
4af71707842810dfd2043e7b14fec38ba69b8a42
/xiaomiexingxing/Classes/Ui/ShopLayer.h
80e9106c16a87d665a0a8ca87511cb544586d01e
[]
no_license
lichuangGit/trunk
26563214a4087e2cbb000ddf187156aa7700b74a
1ce1d9bf40ae5e3c5a8eab2a19aca124d0f125f3
refs/heads/master
2021-01-10T08:09:37.627436
2015-12-07T09:52:50
2015-12-07T09:52:50
47,397,441
0
0
null
null
null
null
GB18030
C++
false
false
1,115
h
ShopLayer.h
#ifndef SHOPLAYER_H #define SHOPLAYER_H #include "StudioLayer.h" #include "GameDialogLayer.h" #include "Core/Helper.h" class ShopLayer : public StudioLayer { public: ShopLayer(); ~ShopLayer(); virtual bool init(); CREATE_FUNC(ShopLayer); void onEnter(); private: void initUI(); void onBtnClick(Ref *pSender, Widget::TouchEventType type); /* *功能: 弹窗 *param: *返回值: *作者: lichuang *日期:2015-11-22-18:23 */ void popOutDialog(PayType type); /* *功能: 支付回调 *param: *返回值: *作者: lichuang *日期:2015-11-2-16:57 */ void payDialogCallBack(int point, int result, std::map<int, int> _map); /* *功能: 更新物品数量,包括刷新页面显示 *param: *返回值: *作者: lichuang *日期:2015-10-17-15:12 */ void updateGoodsNumber(GoodsType type, int num); void onKeyReleased(EventKeyboard::KeyCode keycode, cocos2d::Event *event); private: Button *m_btnTwo; Button *m_btnFour; Button *m_btnSix; Button *m_btnTen; Button *m_btnClose; NumSprite *m_numSp; }; #endif
baa82dd6ee2dc47cee29b02d47f656329ed35453
15091a59693cc2d6ed967616e6c2f4dfb736bce0
/Maze.h
8b73a1707ba3102c80043c58889b0de8d2ff07a1
[]
no_license
ClassicalHero/MazeGeneratorAndSolver
56a892279dcbfd948534feeaeed73c7b77befb0a
ee6a3a1bf662e9f4786aabba9504adefbb16cc3f
refs/heads/main
2023-04-02T15:10:12.974591
2021-03-18T03:00:25
2021-03-18T03:00:25
348,224,612
0
0
null
null
null
null
UTF-8
C++
false
false
292
h
Maze.h
#include"Forest.h" #include<vector> class Maze { public: struct wall { int cell1; int cell2; bool up; }; void CreateWalls(int N); void RandPerm(); void UpDownWalls(); void PrintMaze(); ~Maze(); Maze(int x);//ctor Forest * grid; vector<wall> Walls; };
4ab557369b7fca46c5547702e7c8cd2aab7f5708
6ded2d148a50a4fb2afdda2cbd272595a0467540
/GenesisEngine/GenesisEngine/Renderer2dComponent.cpp
d1a79e230ea8bdd7b1351dfdd8ac18c613c9bf24
[]
no_license
KingWapo/GenesisEngine
3d8f7954b57f92e6bf2bde04ae29ad224ad83324
5675473573c6e918c1f420b32285e00c11563a4c
refs/heads/master
2016-09-06T16:30:46.247272
2015-04-23T20:27:13
2015-04-23T20:27:13
30,262,891
0
1
null
null
null
null
UTF-8
C++
false
false
768
cpp
Renderer2dComponent.cpp
#include "Renderer2dComponent.h" #include "Errors.h" #include "ResourceManager.h" #include <iostream> #include <string> const char *Renderer2dComponent::g_Name = "Renderer2dComponent"; void Renderer2dComponent::VUpdate(int deltaMs) { //spriteBatch.begin(); glm::vec4 pos(m_location.x, m_location.y, m_spriteSize.x, m_spriteSize.y); glm::vec4 uv(0.0f, 0.0f, 1.0f, 1.0f); static GLTexture texture = ResourceManager::getTexture(m_spriteLocation); Color color; color.r = 255; color.g = 255; color.b = 255; color.a = 255; //spriteBatch.draw(pos, uv, texture.id, 0.0f, color); //spriteBatch.end(); //spriteBatch.renderBatch(); } bool Renderer2dComponent::vInit() { return true; } /* TiXmlElement *Renderer2dComponent::VGenerateXml() { return NULL; } */
719deaf2d6245c2b3180fe840b257423afcbc265
5d3404096286830fab472bdf9f30842f0f13a6b6
/algospot/JumpGame/topdown.cpp
346f08d72f6ee1191107b6b24e9e7e952b8e926b
[]
no_license
YeongjinOh/Algorithm-practice
0d4b2ed00e6eebc46667435c3fdc47f8fb1ae886
871428eed1158ef85ff31930588aaeb3d69661d2
refs/heads/master
2021-01-23T13:42:54.361325
2018-03-17T12:47:38
2018-03-17T12:47:38
54,641,868
2
0
null
null
null
null
UTF-8
C++
false
false
726
cpp
topdown.cpp
#include <iostream> using namespace std; #define MAX_LEN 100 int nums[MAX_LEN][MAX_LEN]; int cache[MAX_LEN][MAX_LEN]; int n; bool jump(int i, int j) { if (i >= n || j >= n) return false; if (i == n-1 && j == n-1) return true; int &ret = cache[i][j]; if (ret != -1) return ret; return ret = jump(i+nums[i][j],j) || jump(i,j+nums[i][j]); } int main() { int C; cin >> C; while (C--) { cin >> n; for (int i=0; i<n; ++i) for (int j=0; j<n; ++j) cin >> nums[i][j]; memset(cache,-1,sizeof(cache)); if (jump(0,0)) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
11a6857a1ea9786a1eb8da26c83e83eafeaffc43
2eaf198cab76506045fcc4d312abd12afc9fc713
/src/test/rpc/KeyGeneration_test.cpp
735bae40bd88ff9bcb21cca3ccd69421c66c3ccf
[ "LicenseRef-scancode-free-unknown", "ISC" ]
permissive
XRPLF/rippled
26c378a72f65dde2ee9427a8a106505a60a3303d
300b7e078a4bc511f30b74509d416e5081ec3650
refs/heads/develop
2023-08-31T00:07:03.935167
2023-08-21T23:22:59
2023-08-21T23:23:06
2,724,167
267
126
ISC
2023-09-14T21:57:05
2011-11-07T04:40:15
C++
UTF-8
C++
false
false
30,119
cpp
KeyGeneration_test.cpp
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2015 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ //============================================================================== #include <ripple/basics/StringUtilities.h> #include <ripple/json/json_value.h> #include <ripple/json/json_writer.h> #include <ripple/protocol/ErrorCodes.h> #include <ripple/protocol/jss.h> #include <ripple/rpc/handlers/WalletPropose.h> #include <ripple/rpc/impl/RPCHelpers.h> #include <test/jtx/TestSuite.h> namespace ripple { namespace RPC { struct key_strings { char const* account_id; char const* master_key; char const* master_seed; char const* master_seed_hex; char const* public_key; char const* public_key_hex; char const* secret_key_hex; char const* passphrase; char const* passphrase_warning; }; namespace common { static char const* passphrase = "REINDEER FLOTILLA"; static char const* master_key = "SCAT BERN ISLE FOR ROIL BUS SOAK AQUA FREE FOR DRAM BRIG"; static char const* master_seed = "snMwVWs2hZzfDUF3p2tHZ3EgmyhFs"; static char const* master_seed_hex = "BE6A670A19B209E112146D0A7ED2AAD7"; } // namespace common static key_strings const secp256k1_strings = { "r4Vtj2jrfmTVZGfSP3gH9hQPMqFPQFin8f", common::master_key, common::master_seed, common::master_seed_hex, "aBQxK2YFNqzmAaXNczYcjqDjfiKkLsJUizsr1UBf44RCF8FHdrmX", "038AAE247B2344B1837FBED8F57389C8C11774510A3F7D784F2A09F0CB6843236C", "1949ECD889EA71324BC7A30C8E81F4E93CB73EE19D59E9082111E78CC3DDABC2", common::passphrase, "This wallet was generated using a user-supplied " "passphrase that has low entropy and is vulnerable " "to brute-force attacks.", }; static key_strings const ed25519_strings = { "r4qV6xTXerqaZav3MJfSY79ynmc1BSBev1", common::master_key, common::master_seed, common::master_seed_hex, "aKEQmgLMyZPMruJFejUuedp169LgW6DbJt1rej1DJ5hWUMH4pHJ7", "ED54C3F5BEDA8BD588B203D23A27398FAD9D20F88A974007D6994659CD7273FE1D", "77AAED2698D56D6676323629160F4EEF21CFD9EE3D0745CC78FA291461F98278", common::passphrase, "This wallet was generated using a user-supplied " "passphrase that has low entropy and is vulnerable " "to brute-force attacks.", }; static key_strings const strong_brain_strings = { "rBcvXmNb7KPkNdMkpckdWPpbvkWgcV3nir", "TED AVON CAVE HOUR BRAG JEFF RIFT NEAL TOLD FAT SEW SAN", "shKdhWka8hS7Es3bpctCZXBiAwfUN", "74BA8389B44F98CF41E795CD91F9C93F", "aBRL2sqVuzrsM6zikPB4v8UBHGn1aKkrsxhYEffhcQxB2LKyywE5", "03BD334FB9E06C58D69603E9922686528B18A754BC2F2E1ADA095FFE67DE952C64", "84262FB16AA25BE407174C7EDAB531220C30FA4D8A28AA9D564673FB3D34502C", "A4yKIRGdzrw0YQ$2%TFKYG9HP*&ok^!sy7E@RwICs", "This wallet was generated using a user-supplied " "passphrase. It may be vulnerable to brute-force " "attacks.", }; class WalletPropose_test : public ripple::TestSuite { public: void testRandomWallet(std::optional<std::string> const& keyType) { Json::Value params; if (keyType) params[jss::key_type] = *keyType; Json::Value result = walletPropose(params); BEAST_EXPECT(!contains_error(result)); BEAST_EXPECT(result.isMember(jss::account_id)); BEAST_EXPECT(result.isMember(jss::master_seed)); BEAST_EXPECT(result.isMember(jss::master_seed_hex)); BEAST_EXPECT(result.isMember(jss::public_key)); BEAST_EXPECT(result.isMember(jss::public_key_hex)); BEAST_EXPECT(result.isMember(jss::key_type)); expectEquals( result[jss::key_type], params.isMember(jss::key_type) ? params[jss::key_type] : "secp256k1"); BEAST_EXPECT(!result.isMember(jss::warning)); std::string seed = result[jss::master_seed].asString(); result = walletPropose(params); // We asked for two random seeds, so they shouldn't match. BEAST_EXPECT(result[jss::master_seed].asString() != seed); } Json::Value testSecretWallet(Json::Value const& params, key_strings const& s) { Json::Value result = walletPropose(params); BEAST_EXPECT(!contains_error(result)); expectEquals(result[jss::account_id], s.account_id); expectEquals(result[jss::master_seed], s.master_seed); expectEquals(result[jss::master_seed_hex], s.master_seed_hex); expectEquals(result[jss::public_key], s.public_key); expectEquals(result[jss::public_key_hex], s.public_key_hex); expectEquals( result[jss::key_type], params.isMember(jss::key_type) ? params[jss::key_type] : "secp256k1"); return result; } void testSeed( std::optional<std::string> const& keyType, key_strings const& strings) { testcase("seed"); Json::Value params; if (keyType) params[jss::key_type] = *keyType; params[jss::seed] = strings.master_seed; auto const wallet = testSecretWallet(params, strings); BEAST_EXPECT(!wallet.isMember(jss::warning)); } void testSeedHex( std::optional<std::string> const& keyType, key_strings const& strings) { testcase("seed_hex"); Json::Value params; if (keyType) params[jss::key_type] = *keyType; params[jss::seed_hex] = strings.master_seed_hex; auto const wallet = testSecretWallet(params, strings); BEAST_EXPECT(!wallet.isMember(jss::warning)); } void testLegacyPassphrase( char const* value, std::optional<std::string> const& keyType, key_strings const& strings) { Json::Value params; if (keyType) params[jss::key_type] = *keyType; params[jss::passphrase] = value; auto const wallet = testSecretWallet(params, strings); if (value == strings.passphrase) BEAST_EXPECT(wallet[jss::warning] == strings.passphrase_warning); else BEAST_EXPECT(!wallet.isMember(jss::warning)); } void testLegacyPassphrase( std::optional<std::string> const& keyType, key_strings const& strings) { testcase("passphrase"); testLegacyPassphrase(strings.passphrase, keyType, strings); testLegacyPassphrase(strings.master_key, keyType, strings); testLegacyPassphrase(strings.master_seed, keyType, strings); testLegacyPassphrase(strings.master_seed_hex, keyType, strings); } void testKeyType( std::optional<std::string> const& keyType, key_strings const& strings) { testcase(keyType ? *keyType : "no key_type"); testRandomWallet(keyType); testSeed(keyType, strings); testSeedHex(keyType, strings); testLegacyPassphrase(keyType, strings); Json::Value params; if (keyType) params[jss::key_type] = *keyType; params[jss::seed] = strings.master_seed; params[jss::seed_hex] = strings.master_seed_hex; // Secret fields are mutually exclusive. BEAST_EXPECT(contains_error(walletPropose(params))); } void testBadInput() { testcase("Bad inputs"); // Passing non-strings where strings are required { Json::Value params; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = 20160506; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT( result[jss::error_message] == "Invalid field 'passphrase', not string."); } { Json::Value params; params[jss::key_type] = "secp256k1"; params[jss::seed] = Json::objectValue; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT( result[jss::error_message] == "Invalid field 'seed', not string."); } { Json::Value params; params[jss::key_type] = "ed25519"; params[jss::seed_hex] = Json::arrayValue; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT( result[jss::error_message] == "Invalid field 'seed_hex', not string."); } // Specifying multiple items at once { Json::Value params; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = common::master_key; params[jss::seed_hex] = common::master_seed_hex; params[jss::seed] = common::master_seed; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT( result[jss::error_message] == "Exactly one of the following must be specified: passphrase, " "seed or seed_hex"); } // Specifying bad key types: { Json::Value params; params[jss::key_type] = "prime256v1"; params[jss::passphrase] = common::master_key; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT(result[jss::error_message] == "Invalid parameters."); } { Json::Value params; params[jss::key_type] = Json::objectValue; params[jss::seed_hex] = common::master_seed_hex; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT( result[jss::error_message] == "Invalid field 'key_type', not string."); } { Json::Value params; params[jss::key_type] = Json::arrayValue; params[jss::seed] = common::master_seed; auto result = walletPropose(params); BEAST_EXPECT(contains_error(result)); BEAST_EXPECT( result[jss::error_message] == "Invalid field 'key_type', not string."); } } void testKeypairForSignature( std::optional<std::string> keyType, key_strings const& strings) { testcase( "keypairForSignature - " + (keyType ? *keyType : "no key_type")); auto const publicKey = parseBase58<PublicKey>( TokenType::AccountPublic, strings.public_key); BEAST_EXPECT(publicKey); if (!keyType) { { Json::Value params; Json::Value error; params[jss::secret] = strings.master_seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(ret.first == publicKey); } { Json::Value params; Json::Value error; params[jss::secret] = strings.master_seed_hex; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(ret.first == publicKey); } { Json::Value params; Json::Value error; params[jss::secret] = strings.master_key; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(ret.first == publicKey); } keyType.emplace("secp256k1"); } { Json::Value params; Json::Value error; params[jss::key_type] = *keyType; params[jss::seed] = strings.master_seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(ret.first == publicKey); } { Json::Value params; Json::Value error; params[jss::key_type] = *keyType; params[jss::seed_hex] = strings.master_seed_hex; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(ret.first == publicKey); } { Json::Value params; Json::Value error; params[jss::key_type] = *keyType; params[jss::passphrase] = strings.master_key; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(ret.first == publicKey); } } void testKeypairForSignatureErrors() { // Specify invalid "secret" { Json::Value params; Json::Value error; params[jss::secret] = 314159265; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'secret', not string."); BEAST_EXPECT(ret.first.size() == 0); } { Json::Value params; Json::Value error; params[jss::secret] = Json::arrayValue; params[jss::secret].append("array:0"); auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'secret', not string."); BEAST_EXPECT(ret.first.size() == 0); } { Json::Value params; Json::Value error; params[jss::secret] = Json::objectValue; params[jss::secret]["string"] = "string"; params[jss::secret]["number"] = 702; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(ret.first.size() == 0); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'secret', not string."); } // Specify "secret" and "key_type" { Json::Value params; Json::Value error; params[jss::key_type] = "ed25519"; params[jss::secret] = common::master_seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "The secret field is not allowed if key_type is used."); BEAST_EXPECT(ret.first.size() == 0); } // Specify unknown or bad "key_type" { Json::Value params; Json::Value error; params[jss::key_type] = "prime256v1"; params[jss::passphrase] = common::master_key; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'key_type'."); BEAST_EXPECT(ret.first.size() == 0); } { Json::Value params; Json::Value error; params[jss::key_type] = Json::objectValue; params[jss::seed_hex] = common::master_seed_hex; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'key_type', not string."); BEAST_EXPECT(ret.first.size() == 0); } { Json::Value params; Json::Value error; params[jss::key_type] = Json::arrayValue; params[jss::seed] = common::master_seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'key_type', not string."); BEAST_EXPECT(ret.first.size() == 0); } // Specify non-string passphrase { // not a passphrase: number Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = 1234567890; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'passphrase', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a passphrase: object Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = Json::objectValue; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'passphrase', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a passphrase: array Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = Json::arrayValue; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'passphrase', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a passphrase: empty string Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = ""; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } // Specify non-string or invalid seed { // not a seed: number Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = 443556; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'seed', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a string: object Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = Json::objectValue; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'seed', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a string: array Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = Json::arrayValue; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'seed', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a seed: empty Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = ""; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } { // not a seed: invalid characters Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = "s M V s h z D F p t Z E m h s"; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } { // not a seed: random string Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = "pnnjkbnobnml43679nbvjdsklnbjs"; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } // Specify non-string or invalid seed_hex { // not a string: number Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = 443556; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'seed_hex', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a string: object Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = Json::objectValue; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'seed_hex', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // not a string: array Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = Json::arrayValue; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Invalid field 'seed_hex', not string."); BEAST_EXPECT(ret.first.size() == 0); } { // empty Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = ""; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } { // short Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = "A670A19B"; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } { // not hex Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = common::passphrase; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } { // overlong Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed_hex] = "BE6A670A19B209E112146D0A7ED2AAD72567D0FC913"; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT(error[jss::error_message] == "Disallowed seed."); BEAST_EXPECT(ret.first.size() == 0); } } void testRippleLibEd25519() { testcase("ripple-lib encoded Ed25519 keys"); auto test = [this](char const* seed, char const* addr) { { Json::Value params; Json::Value error; params[jss::passphrase] = seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(toBase58(calcAccountID(ret.first)) == addr); } { Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::passphrase] = seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Specified seed is for an Ed25519 wallet."); } { Json::Value params; Json::Value error; params[jss::key_type] = "ed25519"; params[jss::seed] = seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(!contains_error(error)); BEAST_EXPECT(ret.first.size() != 0); BEAST_EXPECT(toBase58(calcAccountID(ret.first)) == addr); } { Json::Value params; Json::Value error; params[jss::key_type] = "secp256k1"; params[jss::seed] = seed; auto ret = keypairForSignature(params, error); BEAST_EXPECT(contains_error(error)); BEAST_EXPECT( error[jss::error_message] == "Specified seed is for an Ed25519 wallet."); } }; test( "sEdVWZmeUDgQdMEFKTK9kYVX71FKB7o", "r34XnDB2zS11NZ1wKJzpU1mjWExGVugTaQ"); test( "sEd7zJoVnqg1FxB9EuaHC1AB5UPfHWz", "rDw51qRrBEeMw7Na1Nh79LN7HYZDo7nZFE"); test( "sEdSxVntbihdLyabbfttMCqsaaucVR9", "rwiyBDfAYegXZyaQcN2L1vAbKRYn2wNFMq"); test( "sEdSVwJjEXTYCztqDK4JD9WByH3otDX", "rQJ4hZzNGkLQhLtKPCmu1ywEw1ai2vgUJN"); test( "sEdV3jXjKuUoQTSr1Rb4yw8Kyn9r46U", "rERRw2Pxbau4tevE61V5vZUwD7Rus5Y6vW"); test( "sEdVeUZjuYT47Uy51FQCnzivsuWyiwB", "rszewT5gRjUgWNEmnfMjvVYzJCkhvWY32i"); test( "sEd7MHTewdw4tFYeS7rk7XT4qHiA9jH", "rBB2rvnf4ztwjgNhinFXQJ91nAZjkFgR3p"); test( "sEd7A5jFBSdWbNeKGriQvLr1thBScJh", "rLAXz8Nz7aDivz7PwThsLFqaKrizepNCdA"); test( "sEdVPU9M2uyzVNT4Yb5Dn4tUtYjbFAw", "rHbHRFPCxD5fnn98TBzsQHJ7SsRq7eHkRj"); test( "sEdVfF2zhAmS8gfMYzJ4yWBMeR4BZKc", "r9PsneKHcAE7kUfiTixomM5Mnwi28tCc7h"); test( "sEdTjRtcsQkwthDXUSLi9DHNyJcR8GW", "rM4soF4XS3wZrmLurvE6ZmudG16Lk5Dur5"); test( "sEdVNKeu1Lhpfh7Nf6tRDbxnmMyZ4Dv", "r4ZwJxq6FDtWjapDtCGhjG6mtNm1nWdJcD"); test( "sEd7bK4gf5BHJ1WbaEWx8pKMA9MLHpC", "rD6tnn51m4o1uXeEK9CFrZ3HR7DcFhiYnp"); test( "sEd7jCh3ppnQMsLdGcZ6TZayZaHhBLg", "rTcBkiRQ1EfFQ4FCCwqXNHpn1yUTAACkj"); test( "sEdTFJezurQwSJAbkLygj2gQXBut2wh", "rnXaMacNbRwcJddbbPbqdcpSUQcfzFmrR8"); test( "sEdSWajfQAAWFuDvVZF3AiGucReByLt", "rBJtow6V3GTdsWMamrxetRDwWs6wwTxcKa"); } void run() override { testKeyType(std::nullopt, secp256k1_strings); testKeyType(std::string("secp256k1"), secp256k1_strings); testKeyType(std::string("ed25519"), ed25519_strings); testKeyType(std::string("secp256k1"), strong_brain_strings); testBadInput(); testKeypairForSignature(std::nullopt, secp256k1_strings); testKeypairForSignature(std::string("secp256k1"), secp256k1_strings); testKeypairForSignature(std::string("ed25519"), ed25519_strings); testKeypairForSignature(std::string("secp256k1"), strong_brain_strings); testRippleLibEd25519(); testKeypairForSignatureErrors(); } }; BEAST_DEFINE_TESTSUITE(WalletPropose, ripple_basics, ripple); } // namespace RPC } // namespace ripple
526ff0530c09daa8b70376dbfe02ceb586ba6ee2
859315c4c995ac06210ae79ec3be5491ceae9a60
/source/compiler0/code_builder_lib/value.cpp
08351ead394a8fe893bfbf4993b86f264341aca0
[ "BSD-3-Clause" ]
permissive
Panzerschrek/U-00DC-Sprache
c1ce3b5ce889449bc3ac62daaac15a1fbd48038e
bf1a9f25a68098205bd0aaaad2107910f3b78594
refs/heads/master
2023-08-30T17:16:47.793552
2023-08-27T09:45:22
2023-08-27T09:45:22
57,440,134
50
6
BSD-3-Clause
2019-09-04T03:17:08
2016-04-30T12:04:46
C++
UTF-8
C++
false
false
10,373
cpp
value.cpp
#include "../../lex_synt_lib_common/assert.hpp" #include "class.hpp" #include "template_signature_param.hpp" #include "enum.hpp" #include "value.hpp" namespace U { // // FunctionVariable // bool FunctionVariable::VirtuallyEquals( const FunctionVariable& other ) const { U_ASSERT( this->is_this_call && other.is_this_call ); const FunctionType& l_type= this->type; const FunctionType& r_type= other.type; return l_type.return_type == r_type.return_type && l_type.return_value_type == r_type.return_value_type && l_type.return_references == r_type.return_references && l_type.references_pollution == r_type.references_pollution && l_type.unsafe == r_type.unsafe && l_type.calling_convention == r_type.calling_convention && l_type.params.size() == r_type.params.size() && l_type.params.size() > 0u && l_type.params.front().value_type == r_type.params.front().value_type && std::equal( l_type.params.begin() + 1, l_type.params.end(), r_type.params.begin() + 1 ); // Compare args, except first. } // // Variable // Variable::Variable( Type in_type, ValueType in_value_type, Location in_location, std::string in_name, llvm::Value* in_llvm_value, llvm::Constant* in_constexpr_value ) : type(std::move(in_type)) , llvm_value(in_llvm_value) , constexpr_value(in_constexpr_value) , name(std::move(in_name)) , value_type(in_value_type) , location(in_location) { } std::string ConstantVariableToString( const TemplateVariableArg& variable ) { if( variable.constexpr_value == nullptr ) return ""; if( const auto fundamental_type= variable.type.GetFundamentalType() ) { if( fundamental_type->fundamental_type == U_FundamentalType::bool_ ) return variable.constexpr_value->getUniqueInteger().isNullValue() ? "false" : "true"; else if( IsFloatingPoint( fundamental_type->fundamental_type ) ) { if( const auto constant_fp= llvm::dyn_cast<llvm::ConstantFP>( variable.constexpr_value ) ) { llvm::SmallString<256> str; constant_fp->getValueAPF().toString(str); if( fundamental_type->fundamental_type == U_FundamentalType::f32_ ) str+= "f"; return str.str().str(); } } else if( IsSignedInteger( fundamental_type->fundamental_type ) ) { std::string res= std::to_string( variable.constexpr_value->getUniqueInteger().getSExtValue() ); res+= fundamental_type->fundamental_type == U_FundamentalType::i32_ ? "" : GetFundamentalTypeName( fundamental_type->fundamental_type ); return res; } else if( IsUnsignedInteger( fundamental_type->fundamental_type ) ) { std::string res= std::to_string( variable.constexpr_value->getUniqueInteger().getZExtValue() ); res+= fundamental_type->fundamental_type == U_FundamentalType::u32_ ? "u" : GetFundamentalTypeName( fundamental_type->fundamental_type ); return res; } else if( IsChar( fundamental_type->fundamental_type ) ) { std::string res= std::to_string( variable.constexpr_value->getUniqueInteger().getZExtValue() ); if( fundamental_type->fundamental_type == U_FundamentalType::char8_ ) res+= "c8" ; if( fundamental_type->fundamental_type == U_FundamentalType::char16_ ) res+= "c16"; if( fundamental_type->fundamental_type == U_FundamentalType::char32_ ) res+= "c32"; return res; } else if( IsByte( fundamental_type->fundamental_type ) ) { std::string res; res+= GetFundamentalTypeName( fundamental_type->fundamental_type ); res+= "( "; res+= std::to_string( variable.constexpr_value->getUniqueInteger().getZExtValue() ); switch( fundamental_type->fundamental_type ) { case U_FundamentalType::byte8_ : res+= GetFundamentalTypeName( U_FundamentalType::u8_ ); break; case U_FundamentalType::byte16_ : res+= GetFundamentalTypeName( U_FundamentalType::u16_ ); break; case U_FundamentalType::byte32_ : res+= GetFundamentalTypeName( U_FundamentalType::u32_ ); break; case U_FundamentalType::byte64_ : res+= GetFundamentalTypeName( U_FundamentalType::u64_ ); break; case U_FundamentalType::byte128_: res+= GetFundamentalTypeName( U_FundamentalType::u128_ ); break; default: U_ASSERT(false); break; } res+= " )"; return res; } } else if( const auto enum_type= variable.type.GetEnumType() ) { const llvm::APInt num_value= variable.constexpr_value->getUniqueInteger(); std::string_view enum_member_name; enum_type->members.ForEachInThisScope( [&]( const std::string_view name, const NamesScopeValue& enum_member ) { if( const VariablePtr enum_variable= enum_member.value.GetVariable() ) { U_ASSERT( enum_variable->constexpr_value != nullptr ); if( enum_variable->constexpr_value->getUniqueInteger().getLimitedValue() == num_value ) enum_member_name= name; } }); std::string res= enum_type->members.ToString() + "::"; res+= enum_member_name; return res; } return ""; } // // ClassField // ClassField::ClassField( const ClassPtr in_class, Type in_type, const uint32_t in_index, const bool in_is_mutable, const bool in_is_reference ) : type(std::move(in_type)), class_(in_class), index(in_index), is_mutable(in_is_mutable), is_reference(in_is_reference) {} const std::string ClassField::c_generated_field_name= "_generated"; // // Value // static_assert( sizeof(Value) <= 56u, "Value is too heavy!" ); static_assert( sizeof(NamesScopeValue) <= 72u, "NamesScopeValue is too heavy!" ); Value::Value( VariablePtr variable ) { something_= std::move(variable); } Value::Value( VariableMutPtr variable ) { something_= std::move(variable); } Value::Value( OverloadedFunctionsSetPtr functions_set ) { something_= std::move(functions_set); } Value::Value( Type type ) { something_= std::move(type); } Value::Value( ClassFieldPtr class_field ) { something_= std::move( class_field ); } Value::Value( ThisOverloadedMethodsSet this_overloaded_methods_set ) { something_= std::move( this_overloaded_methods_set ); } Value::Value( NamesScopePtr namespace_ ) { U_ASSERT( namespace_ != nullptr ); something_= std::move(namespace_); } Value::Value( TypeTemplatesSet type_templates ) { something_= std::move(type_templates); } Value::Value( StaticAssert static_assert_ ) { something_= std::move(static_assert_); } Value::Value( Typedef typedef_ ) { something_= std::move(typedef_); } Value::Value( IncompleteGlobalVariable incomplete_global_variable ) { something_= std::move(incomplete_global_variable); } Value::Value( YetNotDeducedTemplateArg yet_not_deduced_template_arg ) { something_= std::move(yet_not_deduced_template_arg); } Value::Value( ErrorValue error_value ) { something_= std::move(error_value); } size_t Value::GetKindIndex() const { return something_.index(); } std::string_view Value::GetKindName() const { struct Visitor final { std::string_view operator()( const VariablePtr& ) const { return "variable"; } std::string_view operator()( const FunctionVariable& ) const { return "function variable"; } std::string_view operator()( const OverloadedFunctionsSetPtr& ) const { return "functions set"; } std::string_view operator()( const Type& ) const { return "typename"; } std::string_view operator()( const ClassFieldPtr& ) const { return "class field"; } std::string_view operator()( const ThisOverloadedMethodsSet& ) const { return "this + functions set"; } std::string_view operator()( const NamesScopePtr& ) const { return "namespace"; } std::string_view operator()( const TypeTemplatesSet& ) const { return "type templates set"; } std::string_view operator()( const StaticAssert& ) const { return "static assert"; } std::string_view operator()( const Typedef& ) const { return "incomplete typedef"; } std::string_view operator()( const IncompleteGlobalVariable& ) const { return "incomplete global variable"; } std::string_view operator()( const YetNotDeducedTemplateArg& ) const { return "yet not deduced template arg"; } std::string_view operator()( const ErrorValue& ) const { return "error value"; } }; return std::visit( Visitor(), something_ ); } VariablePtr Value::GetVariable() const { if( const auto ptr= std::get_if<VariablePtr>( &something_ ) ) return *ptr; return nullptr; } OverloadedFunctionsSetPtr Value::GetFunctionsSet() const { if( const auto ptr= std::get_if<OverloadedFunctionsSetPtr>( &something_ ) ) return *ptr; return nullptr; } Type* Value::GetTypeName() { return std::get_if<Type>( &something_ ); } const Type* Value::GetTypeName() const { return std::get_if<Type>( &something_ ); } ClassFieldPtr Value::GetClassField() const { if( const auto ptr= std::get_if<ClassFieldPtr>( &something_ ) ) return *ptr; return nullptr; } ThisOverloadedMethodsSet* Value::GetThisOverloadedMethodsSet() { return std::get_if<ThisOverloadedMethodsSet>( &something_ ); } const ThisOverloadedMethodsSet* Value::GetThisOverloadedMethodsSet() const { return std::get_if<ThisOverloadedMethodsSet>( &something_ ); } NamesScopePtr Value::GetNamespace() const { const NamesScopePtr* const namespace_= std::get_if<NamesScopePtr>( &something_ ); if( namespace_ == nullptr ) return nullptr; return *namespace_; } TypeTemplatesSet* Value::GetTypeTemplatesSet() { return std::get_if<TypeTemplatesSet>( &something_ ); } const TypeTemplatesSet* Value::GetTypeTemplatesSet() const { return std::get_if<TypeTemplatesSet>( &something_ ); } StaticAssert* Value::GetStaticAssert() { return std::get_if<StaticAssert>( &something_ ); } const StaticAssert* Value::GetStaticAssert() const { return std::get_if<StaticAssert>( &something_ ); } Typedef* Value::GetTypedef() { return std::get_if<Typedef>( &something_ ); } const Typedef* Value::GetTypedef() const { return std::get_if<Typedef>( &something_ ); } IncompleteGlobalVariable* Value::GetIncompleteGlobalVariable() { return std::get_if<IncompleteGlobalVariable>( &something_ ); } const IncompleteGlobalVariable* Value::GetIncompleteGlobalVariable() const { return std::get_if<IncompleteGlobalVariable>( &something_ ); } YetNotDeducedTemplateArg* Value::GetYetNotDeducedTemplateArg() { return std::get_if<YetNotDeducedTemplateArg>( &something_ ); } const YetNotDeducedTemplateArg* Value::GetYetNotDeducedTemplateArg() const { return std::get_if<YetNotDeducedTemplateArg>( &something_ ); } const ErrorValue* Value::GetErrorValue() const { return std::get_if<ErrorValue>( &something_ ); } } // namespace U
2d8c009a2688caaab63700b017d6d56cd7485a88
112edff83fd52f7cd2b217728ff0d322e9cc8fb1
/kasten/controllers/view/replace/replacetool.cpp
9d80cde3c5763ba2819ce80cb5ee9f8082e03712
[]
no_license
otilrac/okteta
839ee73dd9fae5ffa2d967d059e6cac421fcaf8e
89741587627c8e25cafe608e1b91284b66fd9d42
refs/heads/master
2023-05-06T04:23:15.194076
2021-05-29T01:16:30
2021-05-29T01:16:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,337
cpp
replacetool.cpp
/* This file is part of the Okteta Kasten module, made within the KDE community. SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org> SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #include "replacetool.hpp" // controller #include "replacejob.hpp" // Okteta Kasten gui #include <Kasten/Okteta/ByteArrayView> // Okteta Kasten core #include <Kasten/Okteta/ByteArrayDocument> // Okteta core #include <Okteta/AbstractByteArrayModel> // KF #include <KLocalizedString> namespace Kasten { ReplaceTool::ReplaceTool() { setObjectName(QStringLiteral("Replace")); } ReplaceTool::~ReplaceTool() = default; bool ReplaceTool::isApplyable() const { return (mByteArrayView && mByteArrayModel && !mByteArrayView->isReadOnly()) && !mReplaceJob; // const int newPosition = finalTargetOffset(); // return ( mByteArrayView && mByteArrayModel // && (0 <= newPosition) && (newPosition <= mByteArrayModel->size()) ); } QString ReplaceTool::title() const { return i18nc("@title", "Replace"); } bool ReplaceTool::hasSelectedData() const { return mByteArrayView->hasSelectedData(); } QString ReplaceTool::charCodingName() const { return mByteArrayView->charCodingName(); } void ReplaceTool::setTargetModel(AbstractModel* model) { const bool oldIsApplyable = isApplyable(); if (mByteArrayView) { mByteArrayView->disconnect(this); } if (mByteArrayModel) { mByteArrayModel->disconnect(this); } mByteArrayView = model ? model->findBaseModel<ByteArrayView*>() : nullptr; ByteArrayDocument* document = mByteArrayView ? qobject_cast<ByteArrayDocument*>(mByteArrayView->baseModel()) : nullptr; mByteArrayModel = document ? document->content() : nullptr; if (mByteArrayView && mByteArrayModel) { connect(mByteArrayView, &ByteArrayView::readOnlyChanged, this, &ReplaceTool::onReadOnlyChanged); // TODO: update isApplyable on cursor movement and size changes } const bool newIsApplyable = isApplyable(); if (oldIsApplyable != newIsApplyable) { Q_EMIT isApplyableChanged(newIsApplyable); } } void ReplaceTool::setUserQueryAgent(QObject* userQueryAgent) { mUserQueryAgent = userQueryAgent; } void ReplaceTool::setSearchData(const QByteArray& searchData) { // const bool oldIsApplyable = isApplyable(); mSearchData = searchData; // const bool newIsApplyable = isApplyable(); // if( oldIsApplyable != newIsApplyable ) // Q_EMIT isApplyableChanged( newIsApplyable ); } void ReplaceTool::setReplaceData(const QByteArray& replaceData) { // const bool oldIsApplyable = isApplyable(); mReplaceData = replaceData; // const bool newIsApplyable = isApplyable(); // if( oldIsApplyable != newIsApplyable ) // Q_EMIT isApplyableChanged( newIsApplyable ); } void ReplaceTool::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity) { // const bool oldIsApplyable = isApplyable(); mCaseSensitivity = caseSensitivity; // const bool newIsApplyable = isApplyable(); // if( oldIsApplyable != newIsApplyable ) // Q_EMIT isApplyableChanged( newIsApplyable ); } void ReplaceTool::setDoPrompt(bool doPrompt) { mDoPrompt = doPrompt; } void ReplaceTool::replace(FindDirection direction, bool fromCursor, bool inSelection) { Okteta::Address replaceRangeStartIndex; Okteta::Address replaceRangeEndIndex; if (inSelection) { const Okteta::AddressRange selection = mByteArrayView->selection(); if (!selection.isValid()) { mReplaceJob = nullptr; // nothing selected, so skip any search and finish now Q_EMIT finished(false, 0); return; } replaceRangeStartIndex = selection.start(); replaceRangeEndIndex = selection.end(); // TODO: support finding following selection direction direction = FindForward; } else { const Okteta::Address cursorPosition = mByteArrayView->cursorPosition(); if (fromCursor && (cursorPosition != 0)) { replaceRangeStartIndex = cursorPosition; replaceRangeEndIndex = cursorPosition - 1; } else { replaceRangeStartIndex = 0; replaceRangeEndIndex = mByteArrayModel->size() - 1; } } mReplaceJob = new ReplaceJob(mByteArrayView, mByteArrayModel, mUserQueryAgent, this); mReplaceJob->setSearchData(mSearchData); mReplaceJob->setReplaceData(mReplaceData); mReplaceJob->setCaseSensitivity(mCaseSensitivity); mReplaceJob->setDoPrompt(mDoPrompt); mReplaceJob->setRange(replaceRangeStartIndex, replaceRangeEndIndex, direction); connect(mReplaceJob, &ReplaceJob::finished, this, &ReplaceTool::onJobFinished); Q_EMIT isApplyableChanged(isApplyable()); mReplaceJob->start(); } void ReplaceTool::onReadOnlyChanged(bool isReadOnly) { Q_UNUSED(isReadOnly) // TODO: find out if isApplyable really changed, perhaps by caching the readonly state? Q_EMIT isApplyableChanged(isApplyable()); } void ReplaceTool::onJobFinished(bool previousFound, int noOfReplacements) { delete mReplaceJob; mReplaceJob = nullptr; Q_EMIT finished(previousFound, noOfReplacements); Q_EMIT isApplyableChanged(isApplyable()); } }
c24e8b29a061780d121521c9aa8042ea48f328ae
21666afd1aa0d305cec8a740dad6e5d06e0b6393
/src/nn.hpp
c949bc4ddb5aea6eeeee8571d47f3945cf9fcaa1
[ "BSD-2-Clause" ]
permissive
Knight-X/kinich
4f66e096919adf1b72d9ade06e552384517475df
2a679d92385e0b23c70a366e2df71991ea5c8f07
refs/heads/master
2021-01-20T14:34:36.198119
2017-05-12T09:15:59
2017-05-12T09:15:59
82,759,470
0
0
null
null
null
null
UTF-8
C++
false
false
1,656
hpp
nn.hpp
#pragma once #include <iostream> #include <memory> #include "graph.hpp" #include "layer.hpp" #include "nn_datatype.hpp" #include "lossfunc.hpp" #include "optimizer.hpp" #include "input.hpp" #include "gradient.hpp" #include "predict.hpp" namespace nn { class NNetwork { private: nn::Graph* nngraph; Optimizer* _optimizer; mean_square_root* _lossfunc; std::vector<nn_vec_t> forward_res; std::vector<nn_vec_t> backward_res; nn_vec_t output_delta; double mse = 0; int numsIncorrect = 0; public: //OptimizerMethod optimizer(); void init_weight(); void collect_error(nn_vec_t r, bool correct); void calculate_result(nn_size t, nn_size dim); int clampOutput(double x); void add(nn::baselayer* layer); nn::Graph* getGraph() { return nngraph; } NNetwork(nn::Graph* g, nn::Optimizer* o, mean_square_root* f) : nngraph(g), _optimizer(o), _lossfunc(f) { nn::input_layer l1 = nn::input_layer(); } nn_vec_t predict(const nn_vec_t& in); bool train(const std::vector<std::vector<nn_vec_t>>& in, const std::vector<std::vector<nn_vec_t>>& t, size_t batch_size, int epoch); void runTrainBatch(const std::vector<nn_vec_t>& in, const std::vector<nn_vec_t>& t, nn_size batch_size); const std::vector<nn_vec_t>& fprop(const std::vector<nn_vec_t>& in); const std::vector<nn_vec_t>& bprop(const std::vector<nn_vec_t>& in, const std::vector<nn_vec_t>& t); void update_weight(nn_size batch_size); nn::nn_vec_t output() { return output_delta; } }; }
534fc56aa78b808387c977e8c983871cecdaa794
70450f0c551adf47b450468e424f4f90bebfb58d
/phys-services/private/test/OMKey2MBIDTest.cxx
7f3b4fe00140fabb3d6869e2ffb2e6f272fbb2cb
[ "MIT" ]
permissive
hschwane/offline_production
ebd878c5ac45221b0631a78d9e996dea3909bacb
e14a6493782f613b8bbe64217559765d5213dc1e
refs/heads/master
2023-03-23T11:22:43.118222
2021-03-16T13:11:22
2021-03-16T13:11:22
280,381,714
0
0
MIT
2020-07-17T09:20:29
2020-07-17T09:20:29
null
UTF-8
C++
false
false
2,133
cxx
OMKey2MBIDTest.cxx
#include <I3Test.h> #include "phys-services/I3FileOMKey2MBID.h" #include <sstream> #include <iostream> using namespace std; // These tests look for a few specific mbids and OMKeys that // are in the test file. Checks that the mapping works correctly TEST_GROUP(OMKey2MBIDTest); TEST(0df7b060acad) { I3OMKey2MBIDPtr service; ENSURE(getenv("I3_SRC")); string infile(getenv("I3_SRC")); infile.append("/phys-services/resources/doms.txt"); service = I3OMKey2MBIDPtr(new I3FileOMKey2MBID(infile)); istringstream in; long long int innum; // spot check a few in.str("0df7b060acad"); in>>hex>>innum; cout<<service->GetMBID(OMKey(21,28))<<" =?= "<<innum<<endl; ENSURE(service->GetMBID(OMKey(21,34)) == innum,"0df7b060acad"); } TEST(8b9f35308e27) { I3OMKey2MBIDPtr service; ENSURE(getenv("I3_SRC")); string infile(getenv("I3_SRC")); infile.append("/phys-services/resources/doms.txt"); service = I3OMKey2MBIDPtr(new I3FileOMKey2MBID(infile)); istringstream in; long long int innum; in.str("8b9f35308e27"); in>>hex>>innum; cout<<service->GetMBID(OMKey(21,28))<<" =?= "<<innum<<endl; ENSURE(service->GetMBID(OMKey(21,28)) == innum,"8b9f35308e27"); } TEST(d52b66ab6861) { I3OMKey2MBIDPtr service; ENSURE(getenv("I3_SRC")); string infile(getenv("I3_SRC")); infile.append("/phys-services/resources/doms.txt"); service = I3OMKey2MBIDPtr(new I3FileOMKey2MBID(infile)); istringstream in; long long int innum; in.str("d52b66ab6861"); in>>hex>>innum; cout<<service->GetMBID(OMKey(21,28))<<" =?= "<<innum<<endl; ENSURE(service->GetMBID(OMKey(30,64)) == innum,"d52b66ab6861"); } //Test one on a 2006 string TEST(543c1369639d) { I3OMKey2MBIDPtr service; ENSURE(getenv("I3_SRC")); string infile(getenv("I3_SRC")); infile.append("/phys-services/resources/doms.txt"); service = I3OMKey2MBIDPtr(new I3FileOMKey2MBID(infile)); istringstream in; long long int innum; in.str("543c1369639d"); in>>hex>>innum; cout<<service->GetMBID(OMKey(21,28))<<" =?= "<<innum<<endl; ENSURE(service->GetMBID(OMKey(49,43)) == innum,"d52b66ab6861"); }
7bd7798367a417ea51fc1da51b8cd35bb7769f94
0290f5a239248d66334bb632722ed5f5031d409a
/OI/XX_submission/cen.cpp
f0822ecffd42c717bd3e76c9cbd9f5f82ef80992
[]
no_license
kkragoth-mimuw/cp-training
131e66e92a025e4cc6837c63d2ea4eb6651c1635
2083bcd268f4e6571343d2c6591d27d935b4fd13
refs/heads/master
2021-06-10T20:27:57.325633
2017-02-13T15:34:48
2017-02-13T15:34:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,408
cpp
cen.cpp
/*****************************************/ /* */ /* Olimpiada Informatyczna XX */ /* Etap: I */ /* Zadanie: Cennik (Cen) */ /* Autor: Piotr "renostr15h" Szulc */ /* */ /*****************************************/ #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <iostream> using namespace std; const int MAXN = 100000; const int TMAXN = 200000; const int INF = 100000001; int n, m, k, a, b; vector<int> V[MAXN+1]; vector<int> A; vector<int> B; int Queue[TMAXN]; int Head = 0; int Tail = 0; bool toskip = false; int dis_parz[MAXN+1]; int dis_nieparz[MAXN+1]; int ojc_parz[MAXN+1]; int ojc_nieparz[MAXN+1]; int main() { scanf("%d%d%d%d%d", &n, &m, &k, &a, &b); while(m--) { int v1, v2; scanf("%d%d", &v1, &v2); V[v1].push_back(v2); V[v2].push_back(v1); } for(int i = 1; i<=n; i++){ dis_parz[i] = INF; dis_nieparz[i] = INF; ojc_parz[i] = (-1) *i; ojc_nieparz[i] = (-1) *i; } dis_nieparz[k] = 0; dis_parz[k] = 0; ojc_nieparz[k] = 1; ojc_parz[k] = 1; int v = k; for(unsigned int i = 0; i < V[v].size();i++) { dis_nieparz[V[v][i]] = dis_parz[v] + 1; ojc_nieparz[V[v][i]] = v; Queue[Tail] = V[v][i]; Tail++; } dis_nieparz[v] = INF; dis_parz[v] = INF; while (Head != Tail) { int v = Queue[Head]; for(unsigned int i = 0; i < V[v].size();i++) { toskip = false; if (ojc_nieparz[V[v][i]] != ojc_nieparz[v] && ojc_nieparz[v] != V[v][i]) { if ( (dis_nieparz[v] != INF)&& (dis_nieparz[v] +1 < dis_parz[V[v][i]]) ) { dis_parz[V[v][i]] = dis_nieparz[v] + 1; ojc_parz[V[v][i]] = v; /* printf("Jestem w %d od w %d, disparz ustalam na %d, ojca parz na %d \n", V[v][i], v, dis_parz[V[v][i]], ojc_parz[V[v][i]]); */ Queue[Tail] = V[v][i]; Tail++; if (Tail == TMAXN-1) { Tail = 0; } } } if ((ojc_parz[V[v][i]] != ojc_parz[v]) || ((ojc_parz[V[v][i]] == ojc_parz[v]) && (V[v].size() != 2) || (V[V[v][i]].size() != 2))) { if (V[v].size() == V[V[v][i]].size()) { B.push_back(V[v][i]); A.push_back(v); for (unsigned int j = 0; j < V[v].size(); j++) { A.push_back(V[v][j]); B.push_back(V[V[v][i]][j]); } sort(A.begin(), A.end()); sort(B.begin(), B.end()); toskip = true; for (unsigned int j = 0; j < A.size(); j++) { if (A[j] != B[j]) { toskip = false; A.clear(); B.clear(); break; } } A.clear(); B.clear(); } if ( (dis_parz[v] != INF) && (dis_parz[v] +1 < dis_nieparz[V[v][i]]) && (!toskip) ) { dis_nieparz[V[v][i]] = dis_parz[v] + 1; ojc_nieparz[V[v][i]] = v; /* printf("Jestem w %d od w %d, disnieparz ustalam na %d, ojcanieparz na %d \n", V[v][i], v, dis_nieparz[V[v][i]], ojc_nieparz[V[v][i]]); */ Queue[Tail] = V[v][i]; Tail++; if (Tail == TMAXN-1) { Tail = 0; } } } } Head++; if (Head == TMAXN - 1) { Head = 0; } } /* for(int i = 1; i <=n; i++) { cout <<dis_parz[i] <<" "<< dis_nieparz[i] <<endl; } */ if (2*a > b) { for (int i = 1; i <= n; i++) { if (k == i) {printf("0\n"); continue;} printf("%d\n", min((dis_parz[i]/2) * b, (dis_nieparz[i]/2)* b + a)); } } else { for (int i = 1; i<=n; i++) { if (k == i) {printf("0\n"); continue;} printf("%d\n", min(dis_parz[i] *a , dis_nieparz[i]* a)); } } return 0; }
07d6d47d7507933fb11d0578b95941b4e067602c
af119118a67e43b360fa24a385c6e97ff7165add
/cplusplus/stl/deque.cpp
7d920b0907dd99bc7ba5f2a9711e112294b3db4f
[]
no_license
txgcwm/code_study
e03da3a29c3341c9c9ab53ea4a26928bf7a928ba
fe6313879df60bfa5ecc4fe8d995b1a7cb4607ef
refs/heads/master
2021-01-20T20:10:56.942126
2019-11-27T17:10:27
2019-11-27T17:10:27
64,046,593
1
2
null
null
null
null
UTF-8
C++
false
false
485
cpp
deque.cpp
#include <iostream> #include <deque> int main(int argc, char **argv) { int x; std::deque <char>charDeque; for (x = 0; x < 10; ++x) { charDeque.push_front(65 + x); } int size = charDeque.size(); for(x = 0; x < size; ++x) { std::deque <char>::iterator start = charDeque.begin(); std::deque <char>::iterator iter; for(iter = start; iter != charDeque.end(); iter++) { std::cout << *iter; } charDeque.erase(start); std::cout << std::endl; } return 0; }
f4c51dcf4c97e08740bf1e7db65789304aa59bd5
b5a5d23f4a7db09dc88436babed7c17eaf907fce
/src/math/point3.hpp
8ed66adc302e03e4c322ff2be54a1b5fb3a47a22
[]
no_license
0xd0d9e/anthracitarium
b22fc92469e59df68e1935f32d9975e8b2b69e65
803ecf724e08600814201df9b393438e9d24eaef
refs/heads/master
2021-01-10T19:23:27.344211
2011-06-18T20:53:23
2011-06-18T20:53:23
1,917,086
0
0
null
null
null
null
UTF-8
C++
false
false
4,657
hpp
point3.hpp
//author 0xd0d9e //encoding utf-8 #ifndef __QyMathPoint__ #define __QyMathPoint__ #ifndef QT_NO_DEBUG_STREAM #include <QtCore/QDebug> #endif #include <QtCore/QPointF> #include <QtCore/QRectF> //! \file Point3 declaration #ifndef QT_NO_DATASTREAM class QDataStream; #endif namespace Math { class Point3; inline bool operator == ( const Point3 & p1, const Point3 & p2 ); inline bool operator != ( const Point3 & p1, const Point3 & p2 ); //! \brief point x, y, z class Point3 : public QPointF { public: //! Constructor explicit Point3( const QPointF & pos, const qreal z = 0 ); explicit Point3( const qreal x = 0, const qreal y = 0, const qreal z = 0 ); //! return z coordinate inline qreal z() const; inline Point3 swapAxis() const; //! set z coordinate inline void setZ( qreal z ); //! set all coordinates inline void set( const qreal x = 0, const qreal y = 0, const qreal z = 0 ); //! \name operators inline Point3 & operator *= ( const qreal factor ); inline Point3 & operator += ( const Point3 & point ); inline Point3 & operator -= ( const Point3 & point ); inline Point3 & operator /= ( const qreal divisor ); //! @} friend inline bool operator == ( const Point3 &, const Point3 & ); friend inline bool operator != ( const Point3 &, const Point3 & ); static Point3 randomPoint( const QRectF & rect, const qreal top = 0, const qreal bottom = 0 ); private: qreal z_; }; // class Point3 /*! \name operators \relates Point3 */ inline bool operator == ( const Point3 & p1, const Point3 & p2 ); inline bool operator != ( const Point3 & p1, const Point3 & p2 ); inline const Point3 operator * ( const Point3 & point, const qreal factor ); inline const Point3 operator * ( const qreal factor, const Point3 & point ); inline const Point3 operator + ( const Point3 & p1, const Point3 & p2 ); inline const Point3 operator - ( const Point3 & p1, const Point3 & p2 ); inline const Point3 operator - ( const Point3 & point ); inline const Point3 operator / ( const Point3 & point, const qreal divisor ); #ifndef QT_NO_DATASTREAM QDataStream & operator << ( QDataStream & stream, const Point3 & point ); QDataStream & operator >> ( QDataStream & stream, Point3 & point ); #endif #ifndef QT_NO_DEBUG_STREAM QDebug operator << ( QDebug debug, const Point3 & point ); #endif //! @} inline qreal Point3::z() const { return z_; } inline Point3 Point3::swapAxis() const { return Point3( y(), x(), z() ); } inline void Point3::setZ( const qreal z ) { z_ = z; } inline void Point3::set( const qreal x, const qreal y, const qreal z ) { setX(x); setY(y); setZ(z); } inline Point3 & Point3::operator *= ( const qreal factor ) { QPointF::operator *= (factor); z_ *= factor; return *this; } inline Point3 & Point3::operator += ( const Point3 & point ) { QPointF::operator += (point); z_ += point.z_; return *this; } inline Point3 & Point3::operator -= ( const Point3 & point ) { QPointF::operator -= (point); z_ -= point.z_; return *this; } inline Point3 & Point3::operator /= ( const qreal divisor ) { QPointF::operator /= (divisor); z_ /= divisor; return *this; } // relates inline bool operator == ( const Point3 & p1, const Point3 & p2 ) { return qFuzzyCompare( p1.x() - p2.x(), 0 ) && qFuzzyCompare( p1.y() - p2.y(), 0 ) && qFuzzyCompare( p1.z_ - p2.z_, 0 ); } inline bool operator != ( const Point3 & p1, const Point3 & p2 ) { return !qFuzzyCompare( p1.x() - p2.x(), 0 ) || !qFuzzyCompare( p1.y() - p2.y(), 0 ) || !qFuzzyCompare( p1.z_ - p2.z_, 0 ); } inline const Point3 operator * ( const Point3 & point, const qreal factor ) { return Point3( point.x() * factor, point.y() * factor, point.z() * factor ); } inline const Point3 operator * ( const qreal factor, const Point3 & point ) { return Point3( point.x() * factor, point.y() * factor, point.z() * factor ); } inline const Point3 operator + ( const Point3 & p1, const Point3 & p2 ) { return Point3( p1.x() + p2.x(), p1.y() + p2.y(), p1.z() + p2.z() ); } inline const Point3 operator - ( const Point3 & p1, const Point3 & p2 ) { return Point3( p1.x() - p2.x(), p1.y() - p2.y(), p1.z() - p2.z() ); } inline const Point3 operator - ( const Point3 & point ) { return Point3( -point.x(), -point.y(), -point.z() ); } inline const Point3 operator / ( const Point3 & point, const qreal divisor ) { return Point3( point.x() / divisor, point.y() / divisor, point.z() / divisor ); } } // namespace Math Q_DECLARE_TYPEINFO( Math::Point3, Q_MOVABLE_TYPE ); #endif//__Point__
e4bdcb313aa1022d52cc81a4a15aa0d8308963fe
1fca267606e9a604e971fc3db603c467273fca7e
/Sphere.cpp
6397af37f6f24117faf46a97cc8e6a67d9fb1971
[]
no_license
cxhaizxm/BulletTestApp
862f7a4ea54282b8889070965a5e488858cadab3
38e4af981f13decd37a61b4f22bf0e17ec4a36ad
refs/heads/master
2021-01-14T10:52:23.958403
2015-02-25T08:33:00
2015-02-25T08:33:00
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,514
cpp
Sphere.cpp
#include "stdafx.h" #include "Sphere.h" // Creates a Sphere object, including the associated Bullet rigid // body, and sets its collision shape to a bullet sphere shape. // If the object is specified to be kinematic, then the appropriate setup // is done to the rigid body to make it kinematic within Bullet. // position: where to create the sphere. // radius: the radius of the sphere // density: the density of the sphere (which, with the radius, determines its mass) // isKinematic: flag to determine if this object will be kinematic or not Sphere::Sphere(double position[3], double radius, double density, bool isKinematic) { this->radius = radius; double mass = density * ((4.0 / 3.0) * PI * radius * radius * radius); btCollisionShape* sphereCollision = new btSphereShape(radius); btDefaultMotionState* sphereState = new btDefaultMotionState(btTransform(btQuaternion(0, 0, 0, 1), btVector3(position[0], position[1], position[2]))); btVector3 sphereInertia(0, 0, 0); sphereCollision->calculateLocalInertia(mass, sphereInertia); btRigidBody::btRigidBodyConstructionInfo sphereInfo(mass, sphereState, sphereCollision, sphereInertia); btRigidBody* rb = new btRigidBody(sphereInfo); // set the kinematic flag and set up the rigid body as kinematic if necessary setKinematic(isKinematic); if (isKinematic) { rb->setCollisionFlags(rb->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT); rb->setActivationState(DISABLE_DEACTIVATION); } // set the rigid body associated with this SceneObject. setRigidBody(rb); } Sphere::~Sphere() { } // Draws a blue-grey sphere in OpenGL of the appropriate radius // using the transform provided by Bullet. void Sphere::drawOpenGL() { // get the Bullet transform btTransform trans; getRigidBody()->getMotionState()->getWorldTransform(trans); // Bullet has a nice function for this GLfloat glTrans[16]; trans.getOpenGLMatrix(glTrans); glPushMatrix(); glMultMatrixf(glTrans); GLfloat ballColor[4] = { 0.75, 0.8, 0.95, 1.0 }; glMaterialfv(GL_FRONT, GL_DIFFUSE, ballColor); // I'm cheating a bit here and using the glutSolidSphere // I would need to do this with more standard OpenGL calls to make // this more portable. glutSolidSphere(radius, 30, 30); glPopMatrix(); } // Returns a string with extra information specific to // Sphere objects. std::string Sphere::getMoreInfo() const { std::string infoString = " == Sphere ==\n"; infoString += " radius = " + std::to_string(radius) + "\n"; return infoString; }
126f92940f315843233a20e7c3470dee2b722810
f5b4c6f0ec312cf4fc3daebc7a306f921793f0cd
/src/graphics/decal_draw_list.cc
a6f7ea1bde76742cf4e1a7438f8154d81bee8e5b
[]
no_license
thinkoid/openspace
2e88bafa79a8d89d5316f8a7b47d3a0ac4ea659c
c7f42aadf9c872a444766a9af9917356fcfb4a9b
refs/heads/master
2023-02-02T03:46:14.521442
2023-01-23T17:19:51
2023-01-23T17:19:51
148,841,322
0
0
null
null
null
null
UTF-8
C++
false
false
8,902
cc
decal_draw_list.cc
// -*- mode: c++; -*- #include "graphics/decal_draw_list.hh" #include "graphics/matrix.hh" #include "graphics/util/uniform_structs.hh" #include "light.hh" #include "render/3d.hh" #include "tracing/tracing.hh" namespace { // Discard any fragments where the angle to the direction to greater than 45° const float DECAL_ANGLE_CUTOFF = to_radians(45.f); const float DECAL_ANGLE_FADE_START = to_radians(30.f); vec3d BOX_VERTS[] = { { { { -0.5f, -0.5f, -0.5f } } }, { { { -0.5f, 0.5f, -0.5f } } }, { { { 0.5f, 0.5f, -0.5f } } }, { { { 0.5f, -0.5f, -0.5f } } }, { { { -0.5f, -0.5f, 0.5f } } }, { { { -0.5f, 0.5f, 0.5f } } }, { { { 0.5f, 0.5f, 0.5f } } }, { { { 0.5f, -0.5f, 0.5f } } } }; uint32_t BOX_FACES[] = { 7, 3, 4, 3, 0, 4, 2, 6, 1, 6, 5, 1, 7, 6, 3, 6, 2, 3, 0, 1, 4, 1, 5, 4, 6, 7, 4, 5, 6, 4, 3, 2, 0, 2, 1, 0, }; const size_t BOX_NUM_FACES = sizeof(BOX_FACES) / sizeof(BOX_FACES[0]); int box_vertex_buffer = -1; int box_index_buffer = -1; void init_buffers() { box_vertex_buffer = gr_create_buffer(BufferType::Vertex, BufferUsageHint::Static); gr_update_buffer_data(box_vertex_buffer, sizeof(BOX_VERTS), BOX_VERTS); box_index_buffer = gr_create_buffer(BufferType::Index, BufferUsageHint::Static); gr_update_buffer_data(box_index_buffer, sizeof(BOX_FACES), BOX_FACES); } bool check_box_in_view(const matrix4 &transform) { for (auto &point : BOX_VERTS) { vec3d pt; vm_vec_transform(&pt, &point, &transform, true); vec3d tmp; if (!g3_rotate_vector(&tmp, &pt)) { // This point lies in the view cone so we need to render it return true; } } return false; } } // namespace namespace graphics { /** * @brief Sorts Decals so that as many decals can be batched together as * possible * * This uses the bitmaps in the definitions to determine if two decals can be * rendered at the same time. Since we use texture arrays we can use the base * frame for batching which increases the number of draw calls that can be * batched together. * * @param left * @param right * @return */ bool decal_draw_list::sort_draws( const decal_draw_info &left, const decal_draw_info &right) { auto left_diffuse_base = bm_get_base_frame(left.draw_mat.get_texture_map(TM_BASE_TYPE)); auto right_diffuse_base = bm_get_base_frame(right.draw_mat.get_texture_map(TM_BASE_TYPE)); if (left_diffuse_base != right_diffuse_base) { return left_diffuse_base < right_diffuse_base; } auto left_glow_base = bm_get_base_frame(left.draw_mat.get_texture_map(TM_GLOW_TYPE)); auto right_glow_base = bm_get_base_frame(right.draw_mat.get_texture_map(TM_GLOW_TYPE)); if (left_glow_base != right_glow_base) { return left_glow_base < right_glow_base; } auto left_normal_base = bm_get_base_frame(left.draw_mat.get_texture_map(TM_NORMAL_TYPE)); auto right_normal_base = bm_get_base_frame(left.draw_mat.get_texture_map(TM_NORMAL_TYPE)); return left_normal_base < right_normal_base; } void decal_draw_list::globalInit() { init_buffers(); gr_maybe_create_shader(SDR_TYPE_DECAL, 0); gr_maybe_create_shader(SDR_TYPE_DECAL, SDR_FLAG_DECAL_USE_NORMAL_MAP); } void decal_draw_list::globalShutdown() { gr_delete_buffer(box_vertex_buffer); gr_delete_buffer(box_index_buffer); } decal_draw_list::decal_draw_list() { _buffer = gr_get_uniform_buffer(uniform_block_type::DecalInfo); auto &aligner = _buffer->aligner(); // Initialize header data auto header = aligner.getHeader< graphics::decal_globals >(); matrix4 invView; vm_inverse_matrix4(&gr_view_matrix, &invView); header->viewMatrix = gr_view_matrix; header->projMatrix = gr_projection_matrix; header->invViewMatrix = invView; vm_inverse_matrix4(&gr_projection_matrix, &header->invProjMatrix); header->viewportSize.x = (float)gr_screen.max_w; header->viewportSize.y = (float)gr_screen.max_h; header->ambientLight.xyz.x = gr_light_ambient[0] + gr_user_ambient; header->ambientLight.xyz.y = gr_light_ambient[1] + gr_user_ambient; header->ambientLight.xyz.z = gr_light_ambient[2] + gr_user_ambient; CLAMP(header->ambientLight.xyz.x, 0.02f, 1.0f); CLAMP(header->ambientLight.xyz.y, 0.02f, 1.0f); CLAMP(header->ambientLight.xyz.z, 0.02f, 1.0f); // Square the ambient part of the light to match the formula used in the // main model shader header->ambientLight.xyz.x *= header->ambientLight.xyz.x; header->ambientLight.xyz.y *= header->ambientLight.xyz.y; header->ambientLight.xyz.z *= header->ambientLight.xyz.z; header->ambientLight.xyz.x += gr_light_emission[0]; header->ambientLight.xyz.y += gr_light_emission[1]; header->ambientLight.xyz.z += gr_light_emission[2]; } decal_draw_list::~decal_draw_list() { _buffer->finished(); } void decal_draw_list::render() { GR_DEBUG_SCOPE("Render decals"); TRACE_SCOPE(tracing::RenderDecals); _buffer->submitData(); std::sort(_draws.begin(), _draws.end(), decal_draw_list::sort_draws); vertex_layout layout; layout.add_vertex_component( vertex_format_data::POSITION3, sizeof(vec3d), 0); indexed_vertex_source source; source.Vbuffer_handle = box_vertex_buffer; source.Ibuffer_handle = box_index_buffer; // Bind the global data only once gr_bind_uniform_buffer( uniform_block_type::DecalGlobals, 0, sizeof(graphics::decal_globals), _buffer->bufferHandle()); gr_screen.gf_start_decal_pass(); for (auto &draw : _draws) { GR_DEBUG_SCOPE("Draw single decal"); TRACE_SCOPE(tracing::RenderSingleDecal); gr_bind_uniform_buffer( uniform_block_type::DecalInfo, draw.uniform_offset, sizeof(graphics::decal_info), _buffer->bufferHandle()); gr_screen.gf_render_decals( &draw.draw_mat, PRIM_TYPE_TRIS, &layout, BOX_NUM_FACES, source); } gr_screen.gf_stop_decal_pass(); } void decal_draw_list::add_decal( int diffuse_bitmap, int glow_bitmap, int normal_bitmap, float /*decal_timer*/, const matrix4 &transform, float base_alpha) { if (!check_box_in_view(transform)) { // The decal box is not in view so we don't need to render it return; } auto &aligner = _buffer->aligner(); auto info = aligner.addTypedElement< graphics::decal_info >(); info->model_matrix = transform; // This is currently a constant but in the future this may be configurable // by the decals table info->normal_angle_cutoff = DECAL_ANGLE_CUTOFF; info->angle_fade_start = DECAL_ANGLE_FADE_START; info->alpha_scale = base_alpha; matrix transform_rot; vm_matrix4_get_orientation(&transform_rot, &transform); // The decal shader works in view-space so the direction also has to be // transformed into that space vm_vec_transform( &info->decal_direction, &transform_rot.vec.fvec, &gr_view_matrix, false); vm_inverse_matrix4(&info->model_matrix, &info->inv_model_matrix); info->diffuse_index = diffuse_bitmap < 0 ? -1 : bm_get_array_index(diffuse_bitmap); info->glow_index = glow_bitmap < 0 ? -1 : bm_get_array_index(glow_bitmap); info->normal_index = normal_bitmap < 0 ? -1 : bm_get_array_index(normal_bitmap); decal_draw_info current_draw; current_draw.uniform_offset = aligner.getCurrentOffset(); material_set_decal( &current_draw.draw_mat, bm_get_base_frame(diffuse_bitmap), bm_get_base_frame(glow_bitmap), bm_get_base_frame(normal_bitmap)); info->diffuse_blend_mode = current_draw.draw_mat.get_blend_mode(0) == ALPHA_BLEND_ADDITIVE ? 1 : 0; info->glow_blend_mode = current_draw.draw_mat.get_blend_mode(2) == ALPHA_BLEND_ADDITIVE ? 1 : 0; _draws.push_back(current_draw); } } // namespace graphics
fb44c1154ba7c8898bcdd30e14d07e54b3164455
67899479e67bab5df7fb2887c485421bf1eade2a
/2020/Day10.cpp
e2ac6aeb1a9fc521aad9a4e9bd42232cee41832f
[]
no_license
SephDB/Advent-of-Code
3d0220283f2dc9a37c7d6151a70ad6bf7d904fe9
ef43329d465fb4a12f611aa9205a2c6fdcadff04
refs/heads/master
2021-12-29T08:50:55.873445
2021-12-25T11:04:19
2021-12-25T11:04:19
227,999,498
6
0
null
null
null
null
UTF-8
C++
false
false
2,396
cpp
Day10.cpp
#include <iostream> #include <string_view> #include <array> #include <ranges> #include <map> #include <charconv> #include <numeric> #include <algorithm> template<typename F> void split(std::string_view in, char delim, F&& f) { std::size_t pos = 0; while((pos = in.find(delim)) != std::string_view::npos) { f(in.substr(0,pos)); in.remove_prefix(pos+1); } f(in); } unsigned int to_int(std::string_view s) { unsigned int ret; std::from_chars(s.begin(),s.end(),ret); return ret; } auto parse(std::string_view input) { std::vector<unsigned int> jolts; split(input,'\n',[&](std::string_view line) { jolts.push_back(to_int(line)); }); jolts.push_back(0); std::ranges::sort(jolts); jolts.push_back(jolts.back()+3); return jolts; } auto part1(const decltype(parse(""))& input) { struct Diff { std::array<int,3> diff = {0,0,0}; Diff(std::array<int,3> d) : diff(d) {} Diff(int a, int b) { diff[a-b-1] = 1; } Diff operator+(Diff o) { return std::array{diff[0]+o.diff[0],diff[1]+o.diff[1],diff[2]+o.diff[2]}; } }; auto d = std::inner_product(input.begin()+1,input.end(),input.begin(),Diff({0,0,0}),std::plus<>{},[](int a, int b){return Diff(a,b);}); return d.diff[0] * d.diff[2]; } auto part2(const decltype(parse(""))& input) { std::array<uint64_t,4> diff = {0,0,0,0}; auto get = [&diff](unsigned int a) -> uint64_t& {return diff[a%4];}; get(input.back()+1) = 1; int prev = input.back()+1; for(auto jolt : std::ranges::reverse_view(input)) { for(int i = jolt+1; i < prev; ++i) get(i) = 0; get(jolt) = get(jolt+1) + get(jolt+2) + get(jolt+3); prev = jolt; } return diff[0]; } void solution(std::string_view input) { auto in = parse(input); std::cout << "Part 1: " << part1(in) << '\n'; std::cout << "Part 2: " << part2(in) << '\n'; } std::string_view input = R"(147 174 118 103 67 33 96 28 43 22 16 138 75 148 35 6 10 169 129 115 21 52 58 79 46 7 139 104 91 51 172 57 49 126 95 149 125 123 112 30 78 44 37 167 157 29 173 98 36 63 111 160 18 8 9 159 179 72 110 2 53 150 17 81 97 108 102 56 135 166 168 163 1 25 3 158 101 132 144 45 140 34 156 178 105 68 153 80 82 59 50 122 69 85 109 40 124 119 94 88 13 180 177 133 66 134 60 141)"; int main() { solution(input); }
995476672f16386c4357be7c4642ab2630d07a1d
1f77f63fc4bcf538fc892f6a5ba54058367ed0e5
/src/base/executive/PlotInterface.cpp
a7e8238fa2c88ef3185bb404e4a1125d2ab551e3
[ "Apache-2.0" ]
permissive
ChristopherRabotin/GMAT
5f8211051b620562947443796fa85c80aed5a7cf
829b7c2c3c7ea73d759c338e7051f92f4f2f6f43
refs/heads/GMAT-2020a
2022-05-21T07:01:48.435641
2022-05-09T17:28:07
2022-05-09T17:28:07
84,392,259
24
10
Apache-2.0
2022-05-11T03:48:44
2017-03-09T03:09:20
C++
UTF-8
C++
false
false
46,260
cpp
PlotInterface.cpp
//$Id$ //------------------------------------------------------------------------------ // PlotInterface //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool // // Copyright (c) 2002 - 2020 United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. // All Other Rights Reserved. // // 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. // // Developed jointly by NASA/GSFC and Thinking Systems, Inc. under contract // number S-67573-G // // Author: Linda Jun // Created: 2003/12/18 // /** * Implements PlotInterface class. * This class updates OpenGL canvas, XY plot window */ //------------------------------------------------------------------------------ #include "PlotInterface.hpp" #include "MessageInterface.hpp" //#define DEBUG_PLOTIF_GL 1 //#define DEBUG_PLOTIF_GL_CREATE 1 //#define DEBUG_PLOTIF_GL_DELETE 1 //#define DEBUG_PLOTIF_GL_UPDATE 1 //#define DEBUG_PLOTIF_XY 1 //#define DEBUG_PLOTIF_XY_UPDATE 1 //#define DEBUG_RENAME 1 //--------------------------------- // static data //--------------------------------- PlotReceiver *PlotInterface::thePlotReceiver = NULL; //--------------------------------- // public functions //--------------------------------- //------------------------------------------------------------------------------ // void SetPlotReceiver(PlotReceiver *pr) //------------------------------------------------------------------------------ void PlotInterface::SetPlotReceiver(PlotReceiver *pr) { thePlotReceiver = pr; } //------------------------------------------------------------------------------ // PlotInterface() //------------------------------------------------------------------------------ PlotInterface::PlotInterface() { } //------------------------------------------------------------------------------ // ~PlotInterface() //------------------------------------------------------------------------------ PlotInterface::~PlotInterface() { } //------------------------------------------------------------------------------ // bool CreateGlPlotWindow(const std::string &plotName, ...) //------------------------------------------------------------------------------ /* * Creates OpenGlPlot window * * @param <plotName> plot name * @param <oldName> old plot name, this is needed for renaming plot * @param <x, y> position of the plot in screen coordinates * @param <w, h> size of the plot in screen coordinates * @param <drawEcPlane> true if draw ecliptic plane * @param <drawXyPlane> true if draw XY plane * @param <drawWirePlane> true if draw wire frame * @param <drawAxes> true if draw axes * @param <drawGrid> true if draw grid * @param <drawSunLine> true if draw earth sun lines * @param <overlapPlot> true if overlap plot without clearing the plot * @param <usevpInfo> true if use viewpoint info to draw plot * @param <numPtsToRedraw> number of points to redraw during the run */ //------------------------------------------------------------------------------ bool PlotInterface::CreateGlPlotWindow(const std::string &plotName, const std::string &oldName, Real positionX, Real positionY, Real width, Real height, bool isMaximized, Integer numPtsToRedraw) { #if DEBUG_PLOTIF_GL_CREATE MessageInterface::ShowMessage ("PI::CreateGlPlotWindow() %s entered, x = %12.10f, y = %12.10f, w = %12.10f, h = %12.10f," "thePlotReceiver=<%p>\n", plotName.c_str(), positionX, positionY, width, height, thePlotReceiver); #endif if (thePlotReceiver != NULL) return thePlotReceiver->CreateGlPlotWindow(plotName, oldName, positionX, positionY, width, height, isMaximized, numPtsToRedraw); return false; } //------------------------------------------------------------------------------ // void SetViewType(GmatPlot::ViewType view) //------------------------------------------------------------------------------ void PlotInterface::SetViewType(GmatPlot::ViewType view) { if (thePlotReceiver != NULL) thePlotReceiver->SetViewType(view); } //------------------------------------------------------------------------------ // void SetGlSolarSystem(const std::string &plotName, SolarSystem *ss) //------------------------------------------------------------------------------ void PlotInterface::SetGlSolarSystem(const std::string &plotName, SolarSystem *ss) { if (thePlotReceiver != NULL) thePlotReceiver->SetGlSolarSystem(plotName, ss); } //------------------------------------------------------------------------------ // void SetGlObject(const std::string &plotName, ... //------------------------------------------------------------------------------ void PlotInterface::SetGlObject(const std::string &plotName, const StringArray &objNames, //const UnsignedIntArray &objOrbitColors, const std::vector<SpacePoint*> &objArray) { if (thePlotReceiver != NULL) //thePlotReceiver->SetGlObject(plotName, objNames, objOrbitColors, objArray); thePlotReceiver->SetGlObject(plotName, objNames, objArray); } //------------------------------------------------------------------------------ // static void SetGlCoordSystem(const std::string &plotName, ... //------------------------------------------------------------------------------ void PlotInterface::SetGlCoordSystem(const std::string &plotName, CoordinateSystem *internalCs, CoordinateSystem *viewCs, CoordinateSystem *viewUpCs) { if (thePlotReceiver != NULL) thePlotReceiver->SetGlCoordSystem(plotName, internalCs, viewCs, viewUpCs); } //------------------------------------------------------------------------------ // void SetGl2dDrawingOption(const std::string &plotName, Integer footPrintOption) //------------------------------------------------------------------------------ void PlotInterface::SetGl2dDrawingOption(const std::string &plotName, const std::string &centralBodyName, const std::string &textureMap, Integer footPrintOption) { if (thePlotReceiver != NULL) thePlotReceiver-> SetGl2dDrawingOption(plotName, centralBodyName, textureMap, footPrintOption); } //------------------------------------------------------------------------------ // void SetGl3dDrawingOption(const std::string &plotName, bool drawEcPlane, ...) //------------------------------------------------------------------------------ void PlotInterface::SetGl3dDrawingOption(const std::string &plotName, bool showLabels, bool drawEcPlane, bool drawXyPlane, bool drawWireFrame, bool drawAxes, bool drawGrid, bool drawSunLine, bool overlapPlot, bool usevpInfo, bool drawStars, bool drawConstellations, Integer starCount) { if (thePlotReceiver != NULL) thePlotReceiver-> SetGl3dDrawingOption(plotName, showLabels, drawEcPlane, drawXyPlane, drawWireFrame, drawAxes, drawGrid, drawSunLine, overlapPlot, usevpInfo, drawStars, drawConstellations, starCount); } //------------------------------------------------------------------------------ // void SetGl3dViewOption(const std::string &plotName, SpacePoint *vpRefObj, ... //------------------------------------------------------------------------------ void PlotInterface::SetGl3dViewOption(const std::string &plotName, SpacePoint *vpRefObj, SpacePoint *vpVecObj, SpacePoint *vdObj, Real vsFactor, const Rvector3 &vpRefVec, const Rvector3 &vpVec, const Rvector3 &vdVec, const std::string &upAxis, bool usevpRefVec, bool usevpVec, bool usevdVec) { if (thePlotReceiver != NULL) thePlotReceiver->SetGl3dViewOption(plotName, vpRefObj, vpVecObj, vdObj, vsFactor, vpRefVec, vpVec, vdVec, upAxis, usevpRefVec, usevpVec, usevdVec); } //------------------------------------------------------------------------------ // void SetGlDrawOrbitFlag(const std::string &plotName, ... //------------------------------------------------------------------------------ void PlotInterface::SetGlDrawOrbitFlag(const std::string &plotName, const std::vector<bool> &drawArray) { if (thePlotReceiver != NULL) thePlotReceiver->SetGlDrawOrbitFlag(plotName, drawArray); } //------------------------------------------------------------------------------ // void SetGlShowObjectFlag(const std::string &plotName, ... //------------------------------------------------------------------------------ void PlotInterface::SetGlShowObjectFlag(const std::string &plotName, const std::vector<bool> &showArray) { if (thePlotReceiver != NULL) thePlotReceiver->SetGlShowObjectFlag(plotName, showArray); } //------------------------------------------------------------------------------ // void SetGlUpdateFrequency(const std::string &plotName, Integer updFreq) //------------------------------------------------------------------------------ void PlotInterface::SetGlUpdateFrequency(const std::string &plotName, Integer updFreq) { if (thePlotReceiver != NULL) thePlotReceiver->SetGlUpdateFrequency(plotName, updFreq); } //------------------------------------------------------------------------------ // bool IsThere(const std::string &plotName) //------------------------------------------------------------------------------ /* * Checks if OpenGlPlot exist. */ //------------------------------------------------------------------------------ bool PlotInterface::IsThere(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->IsThere(plotName); return false; } //------------------------------------------------------------------------------ // bool InitializeGlPlot(const std::string &plotName) //------------------------------------------------------------------------------ /* * Deletes OpenGlPlot by plot name. * * @param <plotName> name of plot to be deleted */ //------------------------------------------------------------------------------ bool PlotInterface::InitializeGlPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->InitializeGlPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool RefreshGlPlot(const std::string &plotName) //------------------------------------------------------------------------------ /* * Refreshes OpenGlPlot. */ //------------------------------------------------------------------------------ bool PlotInterface::RefreshGlPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->RefreshGlPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool DeleteGlPlot(const std::string &plotName) //------------------------------------------------------------------------------ /* * Deletes OpenGlPlot by plot name. * * @param <plotName> name of plot to be deleted */ //------------------------------------------------------------------------------ bool PlotInterface::DeleteGlPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->DeleteGlPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool SetGlEndOfRun(const std::string &plotName) //------------------------------------------------------------------------------ /* * Sets end of run flag to OpenGlPlot. */ //------------------------------------------------------------------------------ bool PlotInterface::SetGlEndOfRun(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->SetGlEndOfRun(plotName); return false; } //------------------------------------------------------------------------------ // bool UpdateGlPlot(const std::string &plotName, ... //------------------------------------------------------------------------------ /* * Buffers data and updates OpenGL plow window if updateCanvas is true */ //------------------------------------------------------------------------------ bool PlotInterface::UpdateGlPlot(const std::string &plotName, const std::string &oldName, const StringArray &scNames, const Real &time, const RealArray &posX, const RealArray &posY, const RealArray &posZ, const RealArray &velX, const RealArray &velY, const RealArray &velZ, //const UnsignedIntArray &scColors, const ColorMap &orbitColorMap, const ColorMap &targetColorMap, bool solving, Integer solverOption, bool updateCanvas, bool drawing, bool inFunction) { #if DEBUG_PLOTIF_GL_UPDATE MessageInterface::ShowMessage ("PI::UpdateGlPlot() '%s' entered, thePlotReceiver=<%p>\n", plotName.c_str(), thePlotReceiver); #endif if (thePlotReceiver != NULL) return thePlotReceiver->UpdateGlPlot(plotName, oldName, scNames, time, posX, posY, posZ, velX, velY, velZ, //scColors, orbitColorMap, targetColorMap, solving, solverOption, updateCanvas, drawing, inFunction); return false; } // end UpdateGlPlot() //------------------------------------------------------------------------------ // bool TakeGlAction(const std::string &plotName, const std::string &action) //------------------------------------------------------------------------------ bool PlotInterface::TakeGlAction(const std::string &plotName, const std::string &action) { if (thePlotReceiver != NULL) return thePlotReceiver->TakeGlAction(plotName, action); return false; } //------------------------------------------------------------------------------ // void PlotInterface::SetMaxGlDataPoints(const std::string &plotName, // Integer maxDataPoints) //------------------------------------------------------------------------------ /** * Passes a custom amount of data points to plot * * @param PlotName Name of the plot receiving the action * @param maxDataPoints The custom max setting of data points */ //------------------------------------------------------------------------------ void PlotInterface::SetMaxGlDataPoints(const std::string &plotName, Integer maxDataPoints) { if (thePlotReceiver != NULL) thePlotReceiver->SetMaxGlDataPoints(plotName, maxDataPoints); } //------------------------------------------------------------------------------ // bool CreateXyPlotWindow(const std::string &plotName, // const std::string &oldName, // const std::string &plotTitle, // const std::string &xAxisTitle, // const std::string &yAxisTitle, // bool drawGrid = false) //------------------------------------------------------------------------------ /* * Creates a XyPlot window. * * @param plotName Name of the plot * @param oldName Former name of the plot * @param x, y position of the plot in screen coordinates * @param w, h size of the plot in screen coordinates * @param plotTitle Title of the plot * @param xAxisTitle X-axis label for the plot * @param yAxisTitle Y-axis label for the plot * @param drawGrid Flag indicating if the grid lines should be drawn * * @return true on success, false is no plot was created */ //------------------------------------------------------------------------------ bool PlotInterface::CreateXyPlotWindow(const std::string &plotName, const std::string &oldName, Real positionX, Real positionY, Real width, Real height, bool isMaximized, const std::string &plotTitle, const std::string &xAxisTitle, const std::string &yAxisTitle, bool drawGrid, bool canSave) { if (thePlotReceiver != NULL) return thePlotReceiver->CreateXyPlotWindow(plotName, oldName, positionX, positionY, width, height, isMaximized, plotTitle, xAxisTitle, yAxisTitle, drawGrid, canSave); return false; } //------------------------------------------------------------------------------ // bool DeleteXyPlot(const std::string &plotName) //------------------------------------------------------------------------------ /* * Deletes a XyPlot by plot name. * * @param plotName name of plot to be deleted * * @return true on success, false is no plot was deleted */ //------------------------------------------------------------------------------ bool PlotInterface::DeleteXyPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->DeleteXyPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool AddXyPlotCurve(const std::string &plotName, int curveIndex, // const std::string &curveTitle, // UnsignedInt penColor) //------------------------------------------------------------------------------ /* * Adds a plot curve to an XY plow window. * * @param plotName The name of the plot that receives the new curve * @param curveIndex The index for the curve * @param curveTitle Label for the curve * @param penColor Default color for the curve * * @return true on success, false is no curve was added */ //------------------------------------------------------------------------------ bool PlotInterface::AddXyPlotCurve(const std::string &plotName, int curveIndex, const std::string &curveTitle, UnsignedInt penColor) { if (thePlotReceiver != NULL) return thePlotReceiver->AddXyPlotCurve(plotName, curveIndex, curveTitle, penColor); return false; } //------------------------------------------------------------------------------ // bool DeleteAllXyPlotCurves(const std::string &plotName, // const std::string &oldName) //------------------------------------------------------------------------------ /* * Deletes all plot curves in XY plow window. * * @param plotName The name of the plot that receives the new curve * @param oldName The previous name of the plot that receives the new curve * * @return true on success, false if no action was taken */ //------------------------------------------------------------------------------ bool PlotInterface::DeleteAllXyPlotCurves(const std::string &plotName, const std::string &oldName) { if (thePlotReceiver != NULL) return thePlotReceiver->DeleteAllXyPlotCurves(plotName, oldName); return false; } //------------------------------------------------------------------------------ // bool DeleteXyPlotCurve(const std::string &plotName, int curveIndex) //------------------------------------------------------------------------------ /* * Deletes a plot curve to XY plow window. * * @param plotName The name of the plot that receives the new curve * @param curveIndex Index of the curve that is to be deleted * * @return true on success, false if no curve was deleted */ //------------------------------------------------------------------------------ bool PlotInterface::DeleteXyPlotCurve(const std::string &plotName, int curveIndex) { if (thePlotReceiver != NULL) return thePlotReceiver->DeleteXyPlotCurve(plotName, curveIndex); return false; } //------------------------------------------------------------------------------ // void ClearXyPlotData(const std::string &plotName) //------------------------------------------------------------------------------ /** * Removes all data from the plot curves, leaving the curve containers in place * but empty. * * @param plotName The name of the plot that is being cleared */ //------------------------------------------------------------------------------ void PlotInterface::ClearXyPlotData(const std::string &plotName) { if (thePlotReceiver != NULL) thePlotReceiver->ClearXyPlotData(plotName); } //------------------------------------------------------------------------------ // void XyPlotPenUp(const std::string &plotName) //------------------------------------------------------------------------------ /** * Tells a plot to stop drawing received data. This method is idempotent. * * @param plotName The name of the plot that is being cleared */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotPenUp(const std::string &plotName) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotPenUp(plotName); } //------------------------------------------------------------------------------ // void XyPlotPenDown(const std::string &plotName) //------------------------------------------------------------------------------ /** * Tells a plot to resume drawing received data. This method is idempotent. * * @param plotName The name of the plot that is being cleared */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotPenDown(const std::string &plotName) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotPenDown(plotName); } //------------------------------------------------------------------------------ // void XyPlotDarken(const std::string &plotName, Integer factor, // Integer index = -1, Integer curveNumber = -1) //------------------------------------------------------------------------------ /** * Darkens a curve or plot by a specified amount * * @param plotName The plot that has the curves that need to darken * @param factor The darkening factor * @param index The starting point on the curve or curves that need darkening * (-1 for the next point) * @param curveNumber When darkening a single curve, its index (-1 for all * curves on the plot) */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotDarken(const std::string &plotName, Integer factor, Integer index, Integer curveNumber) { #ifdef DEBUG_XYSTYLE_CHANGES MessageInterface::ShowMessage("XyPlotDarken(%s, %d, %d, %d) called\n", plotName.c_str(), factor, index, curveNumber); #endif if (thePlotReceiver != NULL) thePlotReceiver->XyPlotDarken(plotName, factor, index, curveNumber); } //------------------------------------------------------------------------------ // void XyPlotLighten(const std::string &plotName, Integer factor, // Integer index = -1, Integer curveNumber = -1) //------------------------------------------------------------------------------ /** * Lightens a curve or plot by a specified amount * * @param plotName The plot that has the curves that need to lighten * @param factor The lightening factor * @param index The starting point on the curve or curves that need lightening * (-1 for the next point) * @param curveNumber When lightening a single curve, its index (-1 for all * curves on the plot) */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotLighten(const std::string &plotName, Integer factor, Integer index, Integer curveNumber) { #ifdef DEBUG_XYSTYLE_CHANGES MessageInterface::ShowMessage("XyPlotLighten(%s, %d, %d, %d) called\n", plotName.c_str(), factor, index, curveNumber); #endif if (thePlotReceiver != NULL) thePlotReceiver->XyPlotLighten(plotName, factor, index, curveNumber); } //------------------------------------------------------------------------------ // void XyPlotChangeWidth(const std::string &plotName, Integer index = -1, // Integer newWidth = 1, int forCurve = -1) //------------------------------------------------------------------------------ /** * Changes the line width for a curve. * * @param plotName The plot that contains the curve * @param index The index of the first point that gets the new width (currently * not used) * @param newWidth The new width * @param forCurve The index of the curve that is changing width. */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotChangeWidth(const std::string &plotName, Integer index, Integer newWidth, int forCurve) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotChangeWidth(plotName, index, newWidth, forCurve); } //------------------------------------------------------------------------------ // void XyPlotChangeStyle(const std::string &plotName, Integer index = -1, // Integer newStyle = 100, int forCurve = -1) //------------------------------------------------------------------------------ /** * Changes the line style for a curve. * * @param plotName The plot that contains the curve * @param index The index of the first point that gets the new width (currently * not used) * @param newStyle The new line style * @param forCurve The index of the curve that is changing style. */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotChangeStyle(const std::string &plotName, Integer index, Integer newStyle, int forCurve) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotChangeStyle(plotName, index, newStyle, forCurve); } //------------------------------------------------------------------------------ // void XyPlotMarkPoint(const std::string &plotName, Integer index, // Integer curveNumber) //------------------------------------------------------------------------------ /** * Marks a specific point on a specific curve of a XyPlot with an oversized X * * @param plotName The plot that contains the curve * @param index The index of the point that gets marked * @param curveNumber The index of the curve containing the point to mark. Set * curveNumber to -1 to mark all curves. */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotMarkPoint(const std::string &plotName, Integer index, Integer curveNumber) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotMarkPoint(plotName, index, curveNumber); } //------------------------------------------------------------------------------ // void XyPlotMarkBreak(const std::string &plotName, Integer index = -1, // Integer curveNumber = -1) //------------------------------------------------------------------------------ /** * Marks a specific point on a specific curve as a point where the curve may be * broken * * @param plotName The plot that contains the curve * @param index The index of the break point (-1 for the current point) * @param curveNumber The index of the curve containing the point to break * (-1 to mark all curves) */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotMarkBreak(const std::string &plotName, Integer index, Integer curveNumber) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotMarkBreak(plotName, index, curveNumber); } //------------------------------------------------------------------------------ // void XyPlotClearFromBreak(const std::string &plotName, // Integer startBreakNumber, Integer endBreakNumber = -1, // Integer curveNumber = -1) //------------------------------------------------------------------------------ /** * Breaks a curve at a break point, discarding the data between that break point * and a subsequent break point * * @param plotName The plot that contains the curve * @param startBreakNumber The index of the starting break point (-1 to start at * the current point) * @param endBreakNumber The index of the end break point (-1 to break to the * end of the curve) * @param curveNumber The index of the curve containing the point to break * (-1 to mark all curves) */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotClearFromBreak(const std::string &plotName, Integer startBreakNumber, Integer endBreakNumber, Integer curveNumber) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotClearFromBreak(plotName, startBreakNumber, endBreakNumber, curveNumber); } //------------------------------------------------------------------------------ // void XyPlotRescale(const std::string &plotName) //------------------------------------------------------------------------------ /** * Sends a rescale message to the plot * * @param plotName The plot that is to be rescaled */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotRescale(const std::string &plotName) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotRescale(plotName); } //------------------------------------------------------------------------------ // void XyPlotCurveSettings(const std::string &plotName, bool useLines, // Integer lineWidth, Integer lineStyle, bool useMarkers, // Integer markerSize, Integer marker, bool useHiLow, Integer forCurve) //------------------------------------------------------------------------------ /** * Sets the default settings for a curve * * @param plotName The name of the plot that contains the curve * @param useLines Flag that is set if the curve should have lines connecting * the curve points * @param lineWidth The width, in pixels, of all drawn lines * @param lineStyle The style of the lines * @param useMarkers Flag used to toggle on markers at each point on the curve * @param markerSize The size of the marker * @param marker The marker to be used * @param useHiLow Flag used to turn error bars on * @param forCurve The index of the curve receiving the settings */ //------------------------------------------------------------------------------ void PlotInterface::XyPlotCurveSettings(const std::string &plotName, bool useLines, Integer lineWidth, Integer lineStyle, bool useMarkers, Integer markerSize, Integer marker, bool useHiLow, Integer forCurve) { if (thePlotReceiver != NULL) thePlotReceiver->XyPlotCurveSettings(plotName, useLines, lineWidth, lineStyle, useMarkers, markerSize, marker, useHiLow, forCurve); } //------------------------------------------------------------------------------ // void SetXyPlotTitle(const std::string &plotName, // const std::string &plotTitle) //------------------------------------------------------------------------------ /** * Sets the title for a plot * * @param plotName The name of the plot * @param plotTitle The new title for the plot */ //------------------------------------------------------------------------------ void PlotInterface::SetXyPlotTitle(const std::string &plotName, const std::string &plotTitle) { if (thePlotReceiver != NULL) thePlotReceiver->SetXyPlotTitle(plotName, plotTitle); } //------------------------------------------------------------------------------ // void ShowXyPlotLegend(const std::string &plotName) //------------------------------------------------------------------------------ /** * Turns on display of the plot legend * * @param plotName The name of the plot */ //------------------------------------------------------------------------------ void PlotInterface::ShowXyPlotLegend(const std::string &plotName) { if (thePlotReceiver != NULL) thePlotReceiver->ShowXyPlotLegend(plotName); } //------------------------------------------------------------------------------ // bool RefreshXyPlot(const std::string &plotName) //------------------------------------------------------------------------------ /* * Refreshes all plot curves on a plot * * @param plotName The name of the plot * * @return true on success, false if nothing was refreshed */ //------------------------------------------------------------------------------ bool PlotInterface::RefreshXyPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->RefreshXyPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool UpdateXyPlot(const std::string &plotName, const std::string &oldName, // const Real &xval, const Rvector &yvals, // const std::string &plotTitle, // const std::string &xAxisTitle, // const std::string &yAxisTitle, bool updateCanvas, // bool drawGrid) //------------------------------------------------------------------------------ /* * Updates an XY plot window. * * @param plotName name of the xy plot * @param oldName Former name of the plot, or an empty string * @param xval x value * @param yvals y values, should be in the order of curve added * @param plotTitle The plot's Title * @param xAxisTitle The plot's X axis title * @param yAxisTitle The plot's Y axis title * @param updateCanvas Flag indicating if the canvas should update immediately * @param drawGrid flag indicating if the grid should be drawn * * @return true if an update occurred, false otherwise */ //------------------------------------------------------------------------------ bool PlotInterface::UpdateXyPlot(const std::string &plotName, const std::string &oldName, const Real &xval, const Rvector &yvals, const std::string &plotTitle, const std::string &xAxisTitle, const std::string &yAxisTitle, Integer solverOption, bool updateCanvas, bool drawGrid) { if (thePlotReceiver != NULL) return thePlotReceiver->UpdateXyPlot(plotName, oldName, xval, yvals, plotTitle, xAxisTitle, yAxisTitle, updateCanvas, drawGrid); return false; } //------------------------------------------------------------------------------ // bool UpdateXyPlotData(const std::string &plotName, const Real &xval, // const Rvector &yvals, const Rvector &hiError, const Rvector &lowError) //------------------------------------------------------------------------------ /** * Updates the data on a plot, passing in a set of y values for a given x, and * optionally the data used to draw error bars * * @param plotName The name of the plot receiving the data * @param xval The X value associated with the points * @param yvals The Y values associated with the points; these are assigned to * the curves indexed in the order contained in the array * @param hiError +sigma error data for the error bars * @param lowError -sigma error for the error bars; if no data is contained in * this array, the low error is assumed to have the same * magnitude as the high error * * @return true if the data was processed, false if not */ //------------------------------------------------------------------------------ bool PlotInterface::UpdateXyPlotData(const std::string &plotName, const Real &xval, const Rvector &yvals, const Rvector &hiError, const Rvector &lowError) { if (thePlotReceiver != NULL) return thePlotReceiver->UpdateXyPlotData(plotName, xval, yvals, &hiError, &lowError); return false; } //------------------------------------------------------------------------------ // bool UpdateXyPlotCurve(const std::string &plotName, Integer whichCurve, // const Real &xval, const Real &yval, const Real hi, const Real low) //------------------------------------------------------------------------------ /** * Adds a point to the plot data for a specific curve on a plot * * @param plotName The name of the plot receiving the data * @param whichCurve Index of the curve receiving the data * @param xval The X value associated with the point * @param yval The Y value associated with the points * @param hi +sigma error data for the point's error bar; only used if hi > 0.0 * @param low -sigma error for the point's error bar; if <= 0.0, the low error * is assumed to have the same magnitude as the high error * * @return true if the data was processed, false if not */ //------------------------------------------------------------------------------ bool PlotInterface::UpdateXyPlotCurve(const std::string &plotName, Integer whichCurve, const Real &xval, const Real &yval, const Real hi, const Real low) { if (thePlotReceiver != NULL) return thePlotReceiver->UpdateXyPlotCurve(plotName, whichCurve, xval, yval, hi, low); return false; } //------------------------------------------------------------------------------ // bool DeactivateXyPlot(const std::string &plotName) //------------------------------------------------------------------------------ /** * Disables redrawing for a plot. This method is used when a plot is receiving * a large amount of data all at once, so that the update performance doesn't * degrade. * * @param plotName The name of the plot receiving the data * * @return true is a plot received the message, false if not */ //------------------------------------------------------------------------------ bool PlotInterface::DeactivateXyPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->DeactivateXyPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool ActivateXyPlot(const std::string &plotName) //------------------------------------------------------------------------------ /** * Enables redrawing for a plot, and forces an immediate update. This method is * used to redraw a plot after it has been disabled and received a large amount * of data all at once. * * @param plotName The name of the plot receiving the data * * @return true is a plot received the message, false if not */ //------------------------------------------------------------------------------ bool PlotInterface::ActivateXyPlot(const std::string &plotName) { if (thePlotReceiver != NULL) return thePlotReceiver->ActivateXyPlot(plotName); return false; } //------------------------------------------------------------------------------ // bool TakeXYAction(const std::string& plotName, const std::string& action) //------------------------------------------------------------------------------ /** * Passes a custom acton to the XY plot * * @param PlotName Name of the plot receiving the action * param action The invoked action * * @return true if an action was taken, false if no action was invoked */ //------------------------------------------------------------------------------ bool PlotInterface::TakeXYAction(const std::string& plotName, const std::string& action) { if (thePlotReceiver != NULL) return thePlotReceiver->TakeXYAction(plotName, action); return false; } //------------------------------------------------------------------------------ // bool CreateDynamicDataDisplay(const std::string &plotName, // const std::string &oldName, // const std::string &plotTitle, // Real positionX, Real positionY, // Real width, Real height) //------------------------------------------------------------------------------ /** * Creates a DynamicDataDisplay window. * * @param plotName Name of the table * @param oldName Former name of the table * @param positionX, positionY position of the table in screen coordinates * @param w, h size of the table in screen coordinates * @param plotTitle Title of the table * * @return true on success, false when no table was created */ //------------------------------------------------------------------------------ bool PlotInterface::CreateDynamicDataDisplay(const std::string &plotName, const std::string &oldName, const std::string &plotTitle, Real positionX, Real positionY, Real width, Real height) { if (thePlotReceiver != NULL) return thePlotReceiver->CreateDynamicDataDisplay(plotName, oldName, plotTitle, positionX, positionY, width, height); return false; } //------------------------------------------------------------------------------ // bool SetDynamicDataTableSize(std::string &plotName, Integer maxRowCount, // Integer maxColCount) //------------------------------------------------------------------------------ /** * Sets the number of rows and columns of the DynamicDataDisplay * * @param plotName Name of the table * @param maxRowCount The number of rows required * @param maxColCount The number of columns required * * @return true on success, false when the table was not sized */ //------------------------------------------------------------------------------ bool PlotInterface::SetDynamicDataTableSize(const std::string &plotName, Integer maxRowCount, Integer maxColCount) { if (thePlotReceiver != NULL) return thePlotReceiver->SetDynamicDataTableSize(plotName, maxRowCount, maxColCount); return false; } //------------------------------------------------------------------------------ // bool UpdateDynamicDataDisplay(std::string &plotName, StringARray &paramNames // Rvector newData, Rvector rowIdxs) //------------------------------------------------------------------------------ /** * Updates the data being watched to their current values * * @param plotName Name of the table * @param paramNames The names of the parameters being watched * @param newData The new data used to update the parameter values being * displayed * @param rowIdxs The row indices for each of the parameters, used to place * the parameters in the desired locations * * @return true on success, false when the table was not sized */ //------------------------------------------------------------------------------ bool PlotInterface::UpdateDynamicDataDisplay(const std::string &plotName, std::vector<std::vector<DDD>> newData) { if (thePlotReceiver != NULL) return thePlotReceiver->UpdateDynamicDataDisplay(plotName, newData); return false; } //------------------------------------------------------------------------------ // bool DeleteDynamicData(const std::string &plotName, // const std::string &oldname) //------------------------------------------------------------------------------ /** * Deletes the grid of the specified DynamicDataDisplay * * @param plotName Name of the table * @param oldName Former name of the table * * @return true on success, false when the grid was not deleted */ //------------------------------------------------------------------------------ bool PlotInterface::DeleteDynamicData(const std::string &plotName, const std::string &oldName) { if (thePlotReceiver != NULL) return thePlotReceiver->DeleteDynamicData(plotName, oldName); return false; } bool PlotInterface::SetDynamicDataTextColor(const std::string &plotName, std::vector<std::vector<DDD>> newColors) { if (thePlotReceiver != NULL) return thePlotReceiver->SetDynamicDataTextColor(plotName, newColors); return false; }
73937de9a140acd2cb39b7923e274e95082b95de
be0282afa8dd436619c71d6118c9db455eaf1a29
/Intermediate/Build/Win64/Design3D/Inc/UnrealEd/EditorBrushBuilder.generated.h
913f9322f92eea01ea3031ef12749e9897d9c331
[]
no_license
Quant2017/Design3D
0f915580b222af40ab911021cceef5c26375d7f9
94a22386be4aa37aa0f546354cc62958820a4bf6
refs/heads/master
2022-04-23T10:44:12.398772
2020-04-22T01:02:39
2020-04-22T01:02:39
262,966,755
1
0
null
2020-05-11T07:12:37
2020-05-11T07:12:36
null
UTF-8
C++
false
false
4,511
h
EditorBrushBuilder.generated.h
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ===========================================================================*/ #include "UObject/ObjectMacros.h" #include "UObject/ScriptMacros.h" PRAGMA_DISABLE_DEPRECATION_WARNINGS #ifdef UNREALED_EditorBrushBuilder_generated_h #error "EditorBrushBuilder.generated.h already included, missing '#pragma once' in EditorBrushBuilder.h" #endif #define UNREALED_EditorBrushBuilder_generated_h #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_RPC_WRAPPERS #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_RPC_WRAPPERS_NO_PURE_DECLS #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_INCLASS_NO_PURE_DECLS \ private: \ static void StaticRegisterNativesUEditorBrushBuilder(); \ friend struct Z_Construct_UClass_UEditorBrushBuilder_Statics; \ public: \ DECLARE_CLASS(UEditorBrushBuilder, UBrushBuilder, COMPILED_IN_FLAGS(CLASS_Abstract), CASTCLASS_None, TEXT("/Script/UnrealEd"), UNREALED_API) \ DECLARE_SERIALIZER(UEditorBrushBuilder) #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_INCLASS \ private: \ static void StaticRegisterNativesUEditorBrushBuilder(); \ friend struct Z_Construct_UClass_UEditorBrushBuilder_Statics; \ public: \ DECLARE_CLASS(UEditorBrushBuilder, UBrushBuilder, COMPILED_IN_FLAGS(CLASS_Abstract), CASTCLASS_None, TEXT("/Script/UnrealEd"), UNREALED_API) \ DECLARE_SERIALIZER(UEditorBrushBuilder) #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_STANDARD_CONSTRUCTORS \ /** Standard constructor, called after all reflected properties have been initialized */ \ UNREALED_API UEditorBrushBuilder(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); \ DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UEditorBrushBuilder) \ DECLARE_VTABLE_PTR_HELPER_CTOR(UNREALED_API, UEditorBrushBuilder); \ DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UEditorBrushBuilder); \ private: \ /** Private move- and copy-constructors, should never be used */ \ UNREALED_API UEditorBrushBuilder(UEditorBrushBuilder&&); \ UNREALED_API UEditorBrushBuilder(const UEditorBrushBuilder&); \ public: #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_ENHANCED_CONSTRUCTORS \ private: \ /** Private move- and copy-constructors, should never be used */ \ UNREALED_API UEditorBrushBuilder(UEditorBrushBuilder&&); \ UNREALED_API UEditorBrushBuilder(const UEditorBrushBuilder&); \ public: \ DECLARE_VTABLE_PTR_HELPER_CTOR(UNREALED_API, UEditorBrushBuilder); \ DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UEditorBrushBuilder); \ DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UEditorBrushBuilder) #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_PRIVATE_PROPERTY_OFFSET #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_13_PROLOG #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_GENERATED_BODY_LEGACY \ PRAGMA_DISABLE_DEPRECATION_WARNINGS \ public: \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_PRIVATE_PROPERTY_OFFSET \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_RPC_WRAPPERS \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_INCLASS \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_STANDARD_CONSTRUCTORS \ public: \ PRAGMA_ENABLE_DEPRECATION_WARNINGS #define Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_GENERATED_BODY \ PRAGMA_DISABLE_DEPRECATION_WARNINGS \ public: \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_PRIVATE_PROPERTY_OFFSET \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_RPC_WRAPPERS_NO_PURE_DECLS \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_INCLASS_NO_PURE_DECLS \ Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h_17_ENHANCED_CONSTRUCTORS \ public: \ PRAGMA_ENABLE_DEPRECATION_WARNINGS template<> UNREALED_API UClass* StaticClass<class UEditorBrushBuilder>(); #undef CURRENT_FILE_ID #define CURRENT_FILE_ID Engine_Source_Editor_UnrealEd_Classes_Builders_EditorBrushBuilder_h PRAGMA_ENABLE_DEPRECATION_WARNINGS
49d91da614dc6bf87cfb0cd475a4ad99c9b6b20b
94a0a456d322a18ec175ab78e963737667b11880
/Main.cpp
c17952fef198b7819800b6d53a33f051e81222d0
[]
no_license
bo-ko/netdisc-client
44d880b4c907b6e1bd728bb56807fcf40a3fd8cb
9e4bad47ea5ca48ee7c837576cea5ce6a9cee9ee
refs/heads/master
2021-01-12T07:05:54.708004
2017-07-21T03:43:03
2017-07-21T03:43:03
76,910,664
0
0
null
null
null
null
UTF-8
C++
false
false
420
cpp
Main.cpp
#include "MainInterface.h" #include "LoginDlg.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); LoginDlg _Dlg; MainInterface _MainWidow; /* Use the Accepted signal to determine whether the login button was pressed */ if(_Dlg.exec()==QDialog::Accepted) { _MainWidow.show(); return a.exec(); } else { return 0; } }
bc77c57dcda492318fdf530db4a2c030cd25470f
26f9fdff3c246e3a68ff9b0bb4f8f0a9a67bce1c
/dynamic_OWSC (copy)/1.8/p
90b44c86feb151683463e1e328caaf042a855abe
[]
no_license
JBrakefield/My_olaFlow
6c0aaa0dda8d8e69c127281fc9484f3cded258ea
a812362928f2466f4e2632d2636dce97a0a3b9f6
refs/heads/master
2020-04-08T14:00:49.750205
2019-01-10T19:48:55
2019-01-10T19:48:55
159,418,163
0
0
null
null
null
null
UTF-8
C++
false
false
122,827
p
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "1.8"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField nonuniform List<scalar> 12160 ( 5284.13 5302.39 4630.13 5313.27 4648.42 3976.27 5324.53 4659.13 3994.57 3322.24 5336.9 4670.37 4005.02 3340.67 2668.66 5349.67 4682.81 4016.16 3350.45 2687.09 2014.46 5362.22 4695.62 4028.6 3361.71 2696.16 2033.32 1361.23 5374.46 4708.21 4041.57 3374.29 2707.22 2041.17 1380.25 706.534 5386.94 4720.36 4054.22 3387.42 2719.93 2052.36 1386.63 728.328 195.108 5400.96 4732.56 4066.19 3400.24 2733.37 2065.21 1397.39 732.58 206.571 1.84749 5418.28 4746.18 4077.85 3411.99 2746.43 2079.21 1410.55 743.247 207.757 1.12648 -6.61922 5440.62 4763.08 4090.65 3422.8 2757.95 2092.81 1425.26 756.96 213.74 1.54618 -6.8234 -7.47878 5469.12 4785.11 4106.7 3434.3 2767.61 2104.13 1439.54 773.26 223.536 2.72574 -6.81884 -7.48062 -8.22924 5503.81 4813.52 4128.1 3449 2777.27 2112.32 1450.74 789.703 236.772 5.43282 -6.81691 -7.49758 -8.19843 -8.79187 5543.69 4848.35 4156.32 3469.37 2790.05 2119.5 1457.19 801.83 251.758 9.15894 -6.79905 -7.4954 -8.16403 -8.79624 -9.52182 5586.91 4888.56 4191.51 3497.24 2808.96 2129.61 1461.07 806.704 262.651 14.6169 -6.78231 -7.50448 -8.15642 -8.81273 -9.51233 5631.21 4932.3 4232.55 3532.88 2836.35 2146.45 1467.6 806.752 266.387 19.677 -6.74434 -7.5172 -8.15775 -8.81793 -9.48809 5674.29 4977.19 4277.41 3575.02 2872.7 2173.11 1481.69 808.597 263.913 21.8856 -6.6725 -7.53106 -8.16551 -8.82307 -9.48001 5714.07 5020.86 4323.5 3621.52 2916.59 2210.28 1507.34 818.424 261.185 21.6668 -6.52458 -7.54519 -8.17814 -8.82662 -9.47908 5748.8 5061.17 4368.33 3669.52 2965.53 2256.24 1545.61 841.482 263.971 20.6507 -6.40133 -7.53791 -8.19228 -8.8312 -9.48231 5777.14 5096.35 4409.67 3716.16 3016.05 2308.12 1594.58 879.547 277.115 20.8381 -6.30869 -7.50268 -8.19156 -8.83646 -9.48471 5798.14 5125.05 4445.71 3759.07 3065.06 2362.28 1650.62 930.775 303.585 23.7568 -6.20959 -7.45747 -8.16623 -8.8318 -9.48798 5811.19 5146.33 4475.12 3796.44 3110.08 2414.52 1708.99 991.316 343.302 31.1422 -6.05042 -7.42098 -8.13175 -8.81667 -9.48867 5816.01 5159.6 4496.95 3826.89 3149.21 2462.28 1764.97 1055.06 393.844 44.0865 -5.71611 -7.41194 -8.10266 -8.8022 -9.4858 5812.6 5164.57 4510.64 3849.53 3181.07 2503.63 1815.87 1116.2 449.552 62.9552 -5.07288 -7.41929 -8.07781 -8.78666 -9.47554 5801.12 5161.26 4515.92 3863.84 3204.79 2537.23 1859.8 1171.2 504.862 86.6847 -3.69506 -7.43278 -8.0881 -8.77985 -9.47009 5781.95 5149.82 4512.83 3869.57 3219.91 2562.26 1895.41 1218.41 556.104 113.345 -1.28724 -7.45576 -8.11494 -8.78152 -9.46744 5755.66 5130.64 4501.5 3866.79 3226.26 2578.36 1921.98 1256.54 600.947 140.324 2.06179 -7.44831 -8.15592 -8.7937 -9.46848 5722.95 5104.26 4482.31 3855.62 3223.91 2585.45 1939.23 1284.82 637.499 165.401 6.04402 -7.40542 -8.20844 -8.81439 -9.47295 5684.62 5071.36 4455.8 3836.42 3212.98 2583.65 1947.19 1303.18 664.867 186.664 10.3508 -7.29252 -8.22786 -8.8305 -9.48063 5641.62 5032.74 4422.65 3809.68 3193.79 2573.05 1946.09 1311.99 682.85 203.232 14.4846 -7.12458 -8.24398 -8.85645 -9.49192 5594.87 4989.3 4383.7 3776.06 3166.8 2553.89 1935.92 1311.74 692.045 214.842 18.0327 -6.92427 -8.25174 -8.86965 -9.49282 5545.51 4942.38 4339.92 3736.29 3132.66 2526.59 1916.83 1302.21 692.836 221.238 20.7623 -6.72607 -8.25051 -8.87678 -9.49621 5494.55 4892.58 4291.8 3691.2 3092.17 2491.72 1889.24 1283.32 685.063 222.161 22.3628 -6.55921 -8.2454 -8.87845 -9.49852 5443.06 4841.19 4241.07 3642.44 3046.32 2450 1853.68 1255.31 668.171 217.783 22.5705 -6.4579 -8.24509 -8.87724 -9.49922 5391.95 4789.24 4188.67 3590.39 2995.43 2402.02 1810.95 1218.71 642.556 208.126 21.4719 -6.45087 -8.24731 -8.87762 -9.49908 5342.04 4737.69 4135.73 3536.6 2941.43 2349.57 1762.21 1173.89 608.899 193.477 19.2568 -6.53341 -8.25109 -8.88012 -9.49942 5294.02 4687.36 4083.25 3482.25 2885.49 2293.09 1706.67 1121.3 568.074 174.188 16.0896 -6.68326 -8.25931 -8.88285 -9.50059 5248.46 4638.95 4032.06 3428.42 2829.09 2234.57 1647.08 1064.58 521.222 151.142 12.2224 -6.87714 -8.27374 -8.88792 -9.50149 5205.83 4593.05 3982.87 3375.95 2773.34 2175.67 1585.1 1001.13 469.191 125.605 8.07004 -7.08529 -8.28921 -8.8955 -9.50284 4550.13 5140.94 3936.27 3325.58 2719.12 2117.61 1523.01 935.729 413.46 98.8196 3.99442 -7.27463 -8.3001 -8.90247 -9.50506 3892.75 4484.83 5061.64 3277.92 2667.13 2061.22 1462.1 871.521 358.276 72.6312 0.281655 -7.41821 -8.3055 -8.90617 -9.50717 3233.51 3826.66 4405.43 5030.68 2617.99 2007.19 1403.11 809.889 308.653 49.7804 -2.65792 -7.50587 -8.30976 -8.9045 -9.50835 2572.33 3166.25 3746.61 4374.16 4995.77 1956.16 1346.68 750.952 266.152 32.7455 -4.48819 -7.52402 -8.27601 -8.88724 -9.50836 1908.8 2503.47 3086.47 3715.68 4339.27 4979.65 1293.53 695.195 229.333 20.9034 -5.46385 -7.50788 -8.2381 -8.88346 -9.50998 1244.46 1837.52 2425.38 3053.55 3680.52 4323.5 4971.08 643.625 196.82 12.7229 -5.98488 -7.48484 -8.19684 -8.86428 -9.5025 596.988 1171.4 1759.68 2387.92 3019.45 3665.42 4313.71 4966.03 168.485 7.02031 -6.27294 -7.47001 -8.1648 -8.84289 -9.49779 144.018 529.262 1094.77 1718.81 2356.49 3005.49 3654.37 4308.93 4966.09 3.1537 -6.43763 -7.45798 -8.1432 -8.82572 -9.49297 0.51979 111.448 464.69 1054.73 1689.18 2344.39 2993.51 3648.52 4302.83 4964.23 -6.5371 -7.44545 -8.12965 -8.81392 -9.48819 -6.60016 -2.27202 84.6792 430.588 1027.05 1679.72 2332.49 2989.28 3636.23 4293.68 4944.74 -7.43325 -8.11995 -8.80586 -9.48437 -7.42158 -6.65432 -3.68846 71.6745 410.938 1022.56 1669.81 2330.58 2967.78 3600.15 4279.87 5091.58 -8.11228 -8.79962 -9.48136 -8.10471 -7.40193 -6.67725 -4.15044 65.1216 407.441 1013.12 1671.74 2308.88 2914.88 3569.69 4346.74 4689.32 5531.67 -8.79446 -9.47889 -8.7894 -8.09192 -7.39292 -6.68715 -4.2938 65.8636 407.105 1017.73 1658.6 2264.19 2852.69 3550.76 4099.18 4461.66 5209.6 5909.92 -9.47675 -9.47447 -8.78136 -8.08396 -7.38778 -6.68165 -4.14669 67.7944 414.723 1011.78 1633.41 2169.4 2804.82 3478.91 3978.85 4222.34 4922.52 5673.67 6357.47 -9.47135 -8.77467 -8.0812 -7.37914 -6.66151 -3.80727 72.2455 414.79 1006.81 1551.31 2148.21 2870.77 3456.36 3797.57 3950.38 4649.64 5400.9 6182.72 6898.26 -9.46731 -8.77064 -8.07561 -7.36056 -6.61841 -3.44959 73.9007 410.375 1004.12 1618.09 2303.6 2913.69 3350.14 3565.89 3658.83 4349.74 5117.55 5932.89 6763.73 7540.74 -9.46491 -8.76345 -8.05597 -7.32435 -6.53294 -2.74246 65.6246 438.501 1105.22 1754.6 2382.68 2874.41 3171.29 3322.47 3359.44 4025.2 4810.59 5666.31 6542.68 7424.21 8268.95 -9.46392 -8.75412 -8.02143 -7.25009 -6.39642 -3.12963 67.4865 543.828 1218.1 1853.19 2375.04 2763.04 2993.49 3060.51 2435.12 3677.13 2438.46 2351.52 2353.69 4442.48 5356.47 6309.81 7236.62 8159.04 9073.3 -9.45756 -8.73081 -7.95456 -7.138 -6.21413 -4.4344 116.766 626.311 1294.41 1851.66 2322.61 2633.33 2799.73 2798.91 2541.03 2310.75 3992.58 2544.53 2661.64 2664.21 2312.14 2191.54 2191.91 4927.23 5990.5 7028.76 8007.86 8969.75 9936.96 -9.44829 -8.68574 -7.83889 -7.03641 -6.09301 -4.24668 154.86 674.08 1296.11 1820.78 2227.69 2489.39 2587.01 2028.41 2026.9 1963.9 1965.16 2400.36 2191.85 4370.32 3483.59 2402.04 2477.24 2478.74 2185.35 2106.7 2101.17 5527.89 6712.47 7812.49 8834.47 9840.27 10847.8 -9.43186 -8.61645 -7.68767 -6.86847 -5.80236 -3.92308 172.012 701.189 1262.48 1743.75 2103.76 2315.3 1888.19 1889.66 1814.82 1816.38 1923.76 1921.58 1880.43 1877.16 2247.01 1854.15 1763.74 1864.03 1758.24 4916.06 3647.15 2262.22 2263.19 2287.86 2285.98 2240.91 2285 2279.98 1851.82 1766.13 1862.12 1756.77 1839.35 1648.41 1800.02 1734.91 1836.81 1646.96 1796.79 1731.84 6260.3 7530.83 8659.76 9713.87 10750.4 11798.7 -9.40797 -8.54044 -7.59195 -6.62848 -5.56832 -1.97296 195.581 665.294 1185.51 1630.75 1950.39 1727.82 1728.77 1623.52 1624.39 1821.12 1816.29 1755.99 1749.78 1593.39 1646.03 1664.6 1548.1 1634.44 1702.82 1644.28 1595.72 1664.98 1548.56 1634.24 1702.06 1517.15 1608.32 1529.3 1622.18 1517.86 1607.94 1529.74 1621.89 1885.15 1775.66 1876.04 1786.16 1766.85 1769.01 1780.39 1752.63 5645.39 4019.49 2345.3 2345.2 2274.07 2274.34 2022.14 2018 2063.89 2060.96 1883.47 1777.83 1874.31 1785.51 1888.24 1742.92 1921.73 1785.22 1886.39 1746.51 1919.78 1784.34 1767.47 1771.66 1781.03 1755.45 1759.47 1728.9 1759.07 1728.69 7109.91 8406.66 9557.43 10618.1 11679.3 12784.1 -9.38193 -8.49349 -7.58328 -6.61439 -5.09748 9.19072 179.573 610.726 1085.99 1502.14 1464.66 1465.23 1335.24 1335.8 1667.28 1661.52 1578.15 1572.39 1488.2 1575.21 1458.18 1543.96 1489.57 1575.13 1463.27 1544.62 1404.53 1491.55 1430.79 1516.18 1408.89 1491.72 1434.88 1516.4 1644.04 1595.21 1637.96 1669.06 1568.41 1596.03 1645.74 1596.86 1669.65 1638.17 1568.79 1596.11 1550.9 1568.62 1564.59 1586.37 1552.28 1569 1564.74 1586.44 1791.48 1780.96 1791.91 1775.74 1738.56 1736.9 1748.21 1727.89 6516.26 4695.76 2668.6 2667.75 2471.22 2469.68 2100.19 2094.31 2019.97 2015.02 1563.36 1659.78 1603.21 1701.31 1567.92 1661.01 1606.64 1702.15 1655.78 1747.17 1731.48 1639.8 1739.61 1823.27 1659.31 1746.27 1732.29 1642.69 1740.3 1823.05 1791.99 1782.58 1792.21 1778.06 1791.01 1760.42 1791.32 1761.86 1738.03 1738.29 1749.03 1725.45 1725.23 1703.51 1724.04 1700.74 8038.06 9321.2 10476.7 11530.2 12624.1 13793.5 -9.36714 -8.5552 -7.96005 -6.89369 -3.17499 23.8639 159.957 532.336 967.246 1150.96 1151.57 956.915 957.038 1417.17 1414.55 1273 1272.76 1362.53 1449.5 1314.25 1401.52 1365.22 1449.18 1318.87 1401.53 1233.81 1354.81 1272.6 1361.64 1235.55 1353.64 1275.63 1361.13 1518.6 1532.29 1488.34 1497.64 1520.52 1532.95 1489.78 1498.29 1442.1 1451.58 1466.43 1473.78 1445.14 1452.7 1467.03 1474.36 1751.03 1747.26 1758.52 1733.68 7529.52 5682.65 3308.28 3309.91 2942.63 2942.15 2469.78 2459.77 2258.19 2250.53 1625.64 1720.74 1593.62 1696.57 1631.53 1721.57 1600.62 1698.41 1540.64 1630.14 1562.55 1664.48 1546.18 1631.81 1571.24 1666.63 1552.26 1574.57 1587.7 1608.04 1558.73 1577.05 1592.15 1609.89 1679.45 1650.95 1685.18 1705.01 1624.63 1647.73 1682.23 1654.59 1686.32 1706.05 1628.1 1649.17 1751.37 1748.41 1759.05 1733.94 1726.41 1703.71 1726.73 1704.67 9002.01 10263.9 11391 12438.3 13593.3 14819.7 -9.40975 -8.94518 -9.17034 -7.32802 3.0253 37.0525 140.854 439.854 827.486 1093.06 1093.41 877.697 878.246 1349.02 1348.06 1216.74 1214.69 1393.31 1403.95 1345.38 1358.22 1395 1404.76 1346.89 1358.89 1223.02 1275.47 1293.11 1313 1223.18 1275.4 1293.85 1313.33 1424.2 1437.78 1428.99 1439.28 8593.95 6860.86 4204.59 4208.16 3706.37 3708.14 3038.42 3033.14 2712.97 2706.77 1890.31 2057.55 1822.82 1941.72 1885.73 2055.28 1823.92 1941.36 1687.83 1783.86 1766.12 1881.31 1689.77 1783.82 1769.3 1881.37 1615.44 1639.5 1571.88 1591.14 1621.15 1641.41 1576.57 1593.35 1530.64 1550.93 1555.86 1574.32 1537.9 1553.74 1561.5 1576.77 9986.04 11201.9 12279.3 13366.5 14582.5 15799.5 -9.57599 -9.85902 -11.1516 -5.97034 10.6891 44.5987 150.253 386.652 644.3 644.827 481.797 482.604 1051.88 1048.32 840.517 842.112 1144.75 1144.65 1196.1 1080.97 1143.99 1143.19 1195.7 1079.5 1083.56 954.368 1020.37 1018.17 1082.6 955.246 1019.57 1017.13 1373.95 1383.32 1322.45 1330.04 1377.15 1384.54 1324.64 1330.9 1228.88 1244.06 1281.64 1293.39 1230.99 1244.77 1282.2 1293.74 9646.62 8089.25 6249.13 3877.73 3880.11 3432.01 3428.64 2706.2 2703.76 2375.59 2372.66 1816.48 1898.25 1727.39 1803.71 1820.31 1898.8 1731.69 1804.87 1655.74 1692.23 1701.24 1752.74 1659.5 1693.7 1703.96 1753.65 1579.84 1611.45 1587.71 1613.76 10965.2 12091.9 13167.6 14306.4 15572.2 16535.5 -9.8728 -11.0132 -10.4647 -5.54675 13.1871 38.8499 165.001 352.589 592.694 590.762 412.257 411.497 871.783 935.223 877.829 783.708 872.943 934.446 876.703 783.65 804.212 801.355 1102.54 1146.77 1155.67 1097.63 1102.26 1147.39 1155.65 1096.6 1045.49 960.028 971.889 1037.45 1045.24 959.802 971.746 1037.01 1214.8 1228.81 1218.99 1229.95 10685.5 9271.67 7662.23 4845.86 4850.34 4159.24 4159.34 3599.49 3599.67 3150.97 3140.19 2143.45 2204.01 2323.7 2050.25 2146.49 2211.57 2325.64 2056.76 2030.54 1838.28 1892.96 1951.92 2031.85 1842.09 1894.23 1954.75 1758.05 1791.04 1680.71 1729.38 1763.65 1792.66 1683.61 1730.58 1611.51 1643.62 1649.45 1687.38 1616.12 1645.13 1652.1 1688.31 11879.7 12952.5 14057.2 15242.6 16343 -10.1978 -10.6587 -8.88235 -6.24561 5.95237 33.0421 126.407 236.525 236.763 190.633 191.958 492.048 529.93 400.202 449.555 492.184 529.54 401.355 449.271 373.37 372.958 875.82 890.792 814.91 769.776 875.441 890.598 814.653 769.978 584.441 629.746 670.633 706.549 585.525 629.335 670.516 706.193 1019.75 933.143 948.689 1004.25 1020.15 934.664 949.083 1006.16 11651.4 10399.8 8972.59 7414.98 4671.63 4661.75 3997.5 3986.66 3425.97 3412.85 2349.05 2508.44 2780.79 2552.53 2353.41 2508.73 2779.03 2551.55 2066.43 2149.06 2220.31 2000.29 2068.38 2156.43 2222.86 2005.42 1947.93 1755.93 1842.42 1884.48 1948.8 1756.8 1842.95 1885.89 1744.39 1793.62 1752.15 1795.66 12739.5 13810.2 14937 16023.6 -9.96624 -9.54942 -8.31106 -6.65537 -3.43027 14.5476 110.222 110.754 67.0735 67.2995 193.772 193.829 162.349 162.29 471.876 484.221 371.652 397.087 471.523 484.129 371.507 397.039 308.595 239.12 267.937 292.118 308.656 240.377 267.997 292.382 852.478 864.047 783.263 769.678 852.001 863.925 783.165 769.38 576.596 586.704 659.226 666.728 577.264 586.814 659.068 666.628 12534.7 11436.5 10189.8 8840.47 5831.26 5833.17 5178.04 5173.94 4460.31 4460.33 3051.53 3284.5 3315.63 3618.28 3058.73 3286.12 3334.3 3622.61 2828.08 3004.57 2589.77 2743.12 2520.18 2620.09 2844.41 3008.52 2598.82 2745.96 2521.56 2620.43 2290.61 2385.53 2294.53 2386.95 2064.74 2123.05 2178.42 2005.97 2067.71 2134.66 2181.87 2015.01 13586 14645.4 15696.6 -9.83003 -9.05457 -8.03834 -7.02135 -5.31813 7.49802 105.68 105.508 52.0848 51.9757 164.783 230.152 171.797 147.028 154.329 248.035 231.301 165.554 248.6 172.268 147.808 154.653 131.25 141.207 131.936 137.619 130.707 141.073 132.238 137.81 447.73 457.41 360.46 370 448.228 457.649 360.977 370.246 289.641 280.149 289.723 280.447 749.325 737.487 749.289 737.49 533.596 546.05 535.462 546.605 13384.9 12360.6 11299.4 10135.4 7042.98 7052.32 6424.08 6425.12 5800.94 5793.25 5073.47 5074.11 3763.89 3719.59 4060.9 3540.19 3458.82 3328.37 3767.18 3742.92 4067.34 3547.84 3461.95 3335.69 3085.28 3150.71 3093.17 3154.09 2829.58 2880.52 2618.5 2432.86 2690.71 2495.97 2841.52 2884.74 2621.67 2443.71 2692.06 2499.21 2256.44 2306.67 2264.35 2309.23 14398.2 15393 -9.77531 -8.84656 -7.90135 -6.8957 -6.31219 4.21084 4.08216 -4.149 -4.16817 104.91 104.336 47.6519 47.9053 210.88 156.832 154.386 219.722 152.712 153.583 212.441 157.226 220.415 154.745 153.009 153.645 123.15 126.649 139.059 141.042 123.417 127.29 139.215 140.991 332.385 343.26 333.219 343.473 14194.5 13223.7 12265 11287 10251.3 7054.37 7051.59 6477.71 6460.87 4913.82 5352.44 4686.39 4980.82 4940.72 5359.7 4704.75 4987.49 4114.14 3792.53 4369.32 4381.41 4652.51 3984.83 4130.08 3808.59 4375.35 4405.06 4659.6 3991.13 3701.51 3371.24 3630.14 3324.11 3704.02 3373.23 3635.91 3328.89 3077.89 3096.04 3086.87 3099.65 2865.08 2888.2 2442.22 2510.99 2877.97 2892.48 2449.04 2513.14 15134.9 -9.71371 -8.72618 -7.79811 -7.40057 -6.54011 -0.0990646 -0.18112 -3.3298 -3.34388 65.9525 95.3764 102.392 57.8903 66.2284 97.6849 102.574 58.9652 31.741 32.3783 126.51 125.398 141.822 146.022 128.031 125.742 141.506 145.107 14920.6 14040.9 13146.9 12280.4 11443.2 8231.11 8243.14 7585.05 7583.45 7023.5 7023.96 6469.05 6459.9 5059.07 5297.34 4860.95 4921.98 5074.56 5302.85 4872.52 4927.14 3926.54 4314.28 4025.25 4421.83 4574.41 4656.29 3942.61 4324.36 4426.06 4030.81 4582.27 4660.22 3422.3 3386.62 3423.86 3391.37 -9.62377 -8.66653 -8.00289 -7.42558 -4.83696 -4.83627 -5.26671 -5.28379 -3.29266 -3.29331 -4.25216 -4.25481 56.2336 83.2517 87.829 50.4498 56.5564 85.4699 88.3215 51.7524 4.90039 3.44852 26.169 29.3957 5.02854 3.50195 26.3809 29.5811 115.656 117.519 118.518 117.884 14776.4 13986.8 13187.7 12435.9 11735.5 8226.18 8225.34 7745.34 7728.22 7163.85 7147.5 6080.14 5414.3 5717.63 5588.19 6077.06 5412.33 5717.49 5583.04 5209.27 5299.63 4953.71 5005.76 5222.68 5304.28 4964.02 5010.04 -9.52619 -8.72705 -8.09288 -7.5293 -4.87831 -4.8618 -5.29445 -5.30243 4.54074 3.96175 -3.89167 -2.84519 -2.91482 -3.55581 4.56897 3.97411 -3.87855 -2.84034 -2.91275 -3.54051 -4.73291 -4.71241 60.3532 78.3256 87.2451 51.7708 60.4061 79.4587 87.5209 51.8004 20.1719 20.693 20.187 20.7406 14722.2 14049.5 13366.5 12754.8 9429.37 9439.35 8770.13 8771.97 8159.25 8174.85 7835.96 7820.68 6097.19 6651.37 6043.44 6347.91 5725.78 6025.45 6151.18 6665.79 6062.45 6355.5 5722.39 6024.65 5573.41 5659.97 5577.88 5661.76 5347.61 5414.74 5360.21 5418.44 -9.49249 -8.73117 -8.11897 -5.5088 -5.52199 -5.92887 -5.93652 -5.1471 -5.1236 -5.25826 -5.25917 1.03354 0.703147 -4.1857 -3.49363 -3.5928 -3.99546 1.01304 0.697408 -4.17181 -3.49144 -3.58496 -3.97181 -3.99085 -4.34886 -4.11046 -4.36355 -3.97994 -4.33557 -4.10113 -4.35954 14791.6 14246 13679.2 13211.1 9477.46 9472.65 9009.78 8989.36 8505.51 8494.28 6295.54 6644.84 7339.18 6603.01 6973.2 6768.6 7336.46 6604.86 6973.74 6767.47 6313.43 6651.34 6202.57 5892.94 6345.84 6006.45 6212.28 5904.72 6349.81 6010.32 5682.28 5744.15 5692.05 5746.86 -9.45978 -8.73788 -8.02875 -5.46254 -5.46162 -5.80664 -5.79916 -4.0589 -4.29758 -4.65241 -4.10925 -4.45305 -4.26815 -4.05388 -4.28308 -4.64827 -4.09514 -4.44377 -4.26056 -5.30076 -5.29063 -4.38291 -4.25705 -4.37243 -4.23321 -4.04185 -4.2436 -4.03046 -4.23742 14997.2 14575.5 14126.9 10600.7 10607.1 10037.8 10033.9 9565.29 9561.85 9152.19 9139.97 7278.1 7901.87 7119.37 7506.98 6862.75 7231.51 7316.49 6869.94 7234.44 7912.66 7136.52 7513.87 6520.59 6682.95 6768.76 6936.34 6773.29 6534.95 6938.09 6687.59 -9.42846 -8.65385 -7.83659 -5.35021 -5.34535 -5.61677 -5.61087 -4.08105 -4.24404 -4.34703 -3.96409 -4.21417 -4.08798 -4.07671 -4.23289 -4.34164 -3.94744 -4.20329 -4.07857 -4.42816 -4.79002 -4.08342 -4.41764 -4.43031 -4.79063 -4.08773 -4.41851 -4.07358 -4.20565 -4.06287 -4.19233 15316.4 15007 14679.3 10720.4 10716.9 10264.6 10247.2 9727.44 9724.37 7447.86 7829.21 8542.33 7785.4 8187.1 7906.58 7466.42 7835.78 8541.56 7780.44 8186.21 7904.91 7349.84 7047.8 7507.14 7226.35 7068.15 7232.97 7357.45 7510.39 -9.39923 -8.57622 -5.5288 -5.38968 -5.37298 -5.52629 -6.00783 -6.01541 -5.11149 -4.30847 -4.57197 -5.09899 -4.28058 -4.56577 -3.9784 -4.16508 -4.19903 -4.01277 -4.15293 -4.07007 -3.96169 -4.14915 -4.1991 -4.01045 -4.15168 -4.06928 -3.98662 -4.21055 -3.99304 -4.21147 15738 15495.5 15204.4 10884.7 10885.5 10368.2 10364.4 8273 8931.78 8238.64 8648.32 8037.29 8431.57 8306.57 8037.43 8432.84 8940.88 8256.83 8654.59 7678.73 7798.79 7944.47 8118.37 7694.34 7803.14 7952.78 8120.84 7521.88 7624.08 7533.13 7626.99 -9.38899 -8.50768 -5.16866 -5.40211 -5.15804 -5.39275 -5.82898 -5.82918 -3.88313 -3.90715 -4.15496 -4.16596 -4.42032 -4.17524 -4.11842 -4.55236 -3.89208 -3.89307 -4.15153 -4.14712 -4.41568 -4.17611 -4.11369 -4.54708 -4.04124 -3.93766 -4.03201 -3.92478 -3.96243 -4.11961 -3.96961 -4.11936 16209.5 15973.8 12017.7 10974.4 10959 12029.3 11442.5 11444.7 10423 8457.61 8899.92 10424.9 8485.4 8910.05 8171.28 8456.5 8310.11 8639.87 8185.66 8314.56 8469.84 8645.15 7772.12 7911.67 8027.3 8178.82 7788.25 7914.98 8041.35 8181.63 -9.37454 -8.45503 -4.93787 -4.26623 -3.94934 -5.33961 -4.93097 -4.26296 -3.9445 -5.32233 -5.81232 -5.80905 -3.80847 -3.77702 -3.78362 -3.9278 -3.92344 -3.92206 -3.81186 -3.78937 -3.77883 -3.92622 -3.92312 -3.92157 -4.02083 -3.91937 -4.01674 -3.91733 16695.5 16413 12079.2 10942.5 10940.7 12078.8 11650.2 11639.1 8785.82 8503.84 8902.54 8477.47 8895.05 9239.86 8772.08 9449.16 8801.75 8532.47 8913.67 8507.27 8906.13 9245.89 8807.19 9458.28 8267.99 8528.79 8387.04 8694.8 8270.97 8388.66 8543.09 8700.68 -9.36596 -6.1826 -5.7378 -5.72602 -6.18051 -6.6467 -6.65593 -4.0651 -4.10399 -3.64927 -3.92825 -3.82042 -4.46441 -3.79741 -4.06085 -5.2468 -3.95981 -4.30842 -4.07171 -4.10152 -3.65234 -3.92964 -3.81562 -4.46562 -3.82701 -4.07067 -5.23908 -3.97517 -4.31693 -3.69544 -3.66672 -3.78017 -3.80017 -3.70193 -3.66297 -3.78107 -3.7983 17161.9 16771.3 12185 11017.6 9440.58 8992.04 11021.4 9444.94 9002.69 12184.9 11664.6 11645.2 8718.78 9031.18 8534.54 8909.84 8733.46 9238.19 8741.31 9037.6 8556.54 8740.97 8917.73 9240.52 8367.29 8517.63 8375.98 8521.17 -9.38381 -5.76588 -6.1334 -5.74797 -6.13032 -6.63805 -6.65095 -3.55083 -3.69551 -3.80985 -3.70543 -3.69126 -3.88737 -4.26454 -3.9593 -4.23936 -3.9725 -4.26996 -4.49293 -4.55702 -4.88549 -3.55495 -3.71269 -3.7062 -3.81589 -3.7148 -3.8963 -3.97451 -4.27859 -4.24622 -3.99194 -4.27747 -4.49605 -4.53862 -4.87738 17527.2 13093.8 12237.5 12216.3 13110.9 12704.6 12688 9258.3 9440.09 8994.54 9433.93 9002.55 9935.92 9261.37 9748.93 9314.86 9444.71 9012.91 9441.28 9012.35 9959.41 9287.59 9758.4 11631.1 9443.14 9923.33 11627.7 9488.5 9938.96 8877.15 9060.85 9035.14 9283.11 8891.17 9062.65 9039.11 9285.05 -9.39668 -5.83463 -4.84934 -4.56863 -6.14438 -5.81613 -4.84232 -4.55582 -6.14231 -6.6123 -6.62299 -3.62584 -3.71962 -3.77963 -3.95954 -4.00586 -4.25249 -3.80687 -4.00225 -4.15101 -4.45261 -3.64246 -3.72571 -3.79965 -3.96835 -4.03608 -3.82437 -4.25103 -4.00907 -4.16169 -4.45239 17861.4 13141.8 12226.3 12196.3 13145.9 12773.6 12758.9 8996.62 9194.65 9287.23 9409.2 9460.81 9744.93 9012.94 9213.24 9293.04 9416.35 9486.08 9754.19 9851.03 9506.92 9907.52 9437.86 9883.48 10303.8 9777.3 10385.1 9865.67 9541.12 9921.64 9496.24 9902.84 10307.9 9795.53 10386.9 -9.52221 -6.5969 -6.60822 -5.82268 -4.83982 -4.68393 -4.89 -4.61301 -6.14597 -5.80939 -4.83491 -4.66961 -4.8828 -4.60551 -6.14915 -3.89759 -4.07175 -4.29244 -4.04344 -4.19145 -4.47594 -3.92599 -4.08995 -4.28849 -4.05248 -4.19789 -4.47537 18130.3 13160.3 12349.6 10458.1 10028.6 12301.9 10456.2 10023.5 13175.4 12825.7 12813.9 9292.77 9523.22 9535.03 9746.6 9313.6 9530.3 9554.86 9754.99 9743.56 10094.2 9581.85 9899.48 9769.57 10308 9767.43 10082.2 9600.05 9777.13 9909.35 10305.3 -9.4109 -6.58146 -6.57373 -6.59527 -6.5878 -5.79438 -4.9115 -4.69206 -4.90676 -4.70119 -4.34207 -4.5285 -6.15969 -5.78022 -4.90737 -4.68589 -4.90088 -4.696 -4.34209 -4.52897 -6.16131 -4.15029 -4.2841 -4.16146 -4.28722 18239.5 13197.2 13214.6 12386.8 10388.2 10010.5 10422.2 10005.4 12356.1 10398.3 10007.4 10417.4 10007.8 12856.7 12844.1 9857.1 9653.43 10118.5 9978.94 9789.64 10282.2 9892.77 9675.72 10111.2 9798.2 9989.88 10281 -9.49723 -6.55861 -6.61945 -6.57435 -6.63307 -6.16819 -6.1692 -5.79114 -4.89128 -4.67007 -4.88248 -4.67902 -4.5847 -4.37793 -4.56877 -4.38678 -4.20709 -4.36248 -5.77924 -4.88768 -4.67598 -4.88182 -4.67667 -4.58647 -4.38267 -4.57089 -4.39568 -4.22101 -4.36614 18252.3 13223.5 13220.3 13245.1 13246.3 12390.2 10465.5 9998.02 10438.1 10047.1 10094.1 10283.3 12365.6 10462 10008.7 10437.4 10040.7 10099.2 10285.6 12878.2 12867.6 9946.34 10055 9983.08 10065.2 -9.4671 -6.64611 -6.67544 -6.6605 -6.6878 -6.15733 -6.21807 -6.16346 -6.22214 -5.81564 -5.80562 -4.89033 -4.68122 -4.89104 -4.68088 -4.59796 -4.38278 -4.61317 -4.34554 -4.48909 -4.25155 -4.43245 -4.29612 -4.8885 -4.6876 -4.89039 -4.68287 -4.59816 -4.38956 -4.61471 -4.34644 -4.49403 -4.27402 -4.43945 -4.3145 18196.5 13213.5 13199.4 13238.6 13222.8 12879.3 12872.4 12393.2 10496.8 10039 10480.4 10080 10435.7 10087.9 10330.1 10174.4 9943.61 10066.3 12372 10477.9 10043.3 10478.9 10060.6 10434.9 10098.8 10333.2 10178.6 9975.69 10075.4 -9.51543 -6.7376 -6.81494 -6.74604 -6.82639 -6.25146 -6.30544 -6.25519 -6.30692 -5.83501 -5.8515 -5.82495 -5.84153 -4.89321 -4.68931 -4.90182 -4.683 -4.89192 -4.69117 -4.89919 -4.68554 -4.6395 -4.41527 -4.62237 -4.44395 -4.64266 -4.42648 -4.62568 -4.45538 17821.2 13172.8 13137.1 13191.2 13151.8 12867.5 12834.3 12863.6 12830.2 12417 12392 10585.8 10028.7 10513.7 10102.2 10455.4 10163.8 10399.1 10220.3 10228.8 9924.03 10097.8 9995.86 10571.5 10041.7 10514.2 10087.6 10449.9 10171.4 10399.3 10207.3 10230.4 9948.42 10104.5 10008.2 -8.73892 -9.53176 -6.33957 -6.41375 -6.34071 -6.41783 -5.87259 -5.94128 -5.8619 -5.92717 -4.90502 -4.6748 -4.88491 -4.69792 -4.89712 -4.69716 -4.88034 -4.69415 -4.90248 -4.67893 -4.88232 -4.70165 -4.89481 -4.69818 -4.87722 -4.69692 -4.65231 -4.51978 -4.70383 -4.45961 -4.6562 -4.52954 -4.70649 -4.47217 17318.1 13073.6 13013 13081.3 13021.9 12783.8 12738.6 12777.4 12730.6 12395.9 12319.7 12373 12302.8 10618.8 10137.6 10601.1 10141.6 10611.7 10130.1 10595.6 10130.2 10504.6 10131.6 10395.9 10173.2 10498.1 10139.3 10395.8 10163.7 -8.86622 -6.1217 -6.25133 -6.11274 -6.24577 -9.52668 -6.01106 -6.08283 -5.99218 -6.06787 -4.87979 -4.69593 -4.86177 -4.71824 -4.90585 -4.78511 -4.95068 -4.74335 -4.87541 -4.69448 -4.85797 -4.71272 -4.90053 -4.77791 -4.94558 -4.73701 -4.73599 -4.52745 -4.71675 -4.54937 -4.75403 -4.54327 -4.76403 -4.54185 -4.7387 -4.53527 -4.71915 -4.55736 -4.75617 -4.54408 -4.76383 -4.54609 16848.1 16470.8 12643.8 12485.4 12631.3 12473.6 12272.2 12239.5 12251.9 12216.9 10512.3 10124.6 10570.4 10077.8 10455.4 9963.89 10406.4 10028 10509.2 10118.8 10565.7 10074.3 10456.6 9987.84 10412.2 10033.5 10600.4 10252.6 10564.9 10240.1 10594.3 10258.7 10564.2 10231.8 -8.88758 -6.32777 -6.4294 -6.32975 -6.43748 -5.72215 -5.90575 -5.71583 -5.88594 -9.53463 -5.01507 -4.82394 -4.98673 -4.83317 -5.0822 -4.93181 -5.23177 -4.83536 -5.00768 -4.80643 -4.97834 -4.81974 -5.07523 -4.92716 -5.22788 -4.82366 -4.74928 -4.54848 -4.71772 -4.612 -4.74703 -4.6472 -4.78218 -4.61238 -4.74465 -4.54596 -4.71586 -4.60416 -4.7431 -4.63377 -4.7781 -4.60244 16372.1 16048 12073.5 12003.4 12040 11994.3 12179 12022.4 12146.8 11993.5 10364 9928.19 10369.7 9921.93 10369.6 9896.36 10368.2 9918.97 10363.2 9943.91 10373.1 9922.81 10368.4 9910.99 10369.2 9918.1 10485.4 10251.1 10531.4 10224.3 10420.6 10104 10341.3 10175.6 10485.7 10258.2 10532.1 10226.2 10422.4 10128.5 10348.8 10181.4 -8.29972 -8.91515 -5.94644 -6.05253 -5.93941 -6.04958 -4.56149 -4.72462 -4.71931 -4.55917 -4.76914 -4.95534 -4.77913 -5.11616 -4.61591 -4.88565 -4.57015 -4.71667 -4.72477 -4.57678 -4.77656 -4.9517 -4.78417 -5.11766 -4.62729 -4.89162 -9.54996 -4.79092 -4.6571 -4.79105 -4.64461 -4.81114 -4.61747 -4.78655 -4.64512 -4.78688 -4.63426 -4.8071 -4.60539 -4.57899 -4.39182 -4.57311 -4.41899 -4.57626 -4.40039 -4.57451 -4.41991 15926.8 15653.3 11900 11806.7 11899.6 11816.5 11467.7 11477.7 11460 11464.6 10301.9 9908.56 10352 9883.55 10346 9638.85 10230.6 9885.98 10298 9907.82 10349.1 9875.34 10345.4 9646.18 10228.4 9880.77 10212.5 10051.6 10267.8 9991.66 10223.5 9977.21 10206.1 9971.26 10214.9 10075.6 10275.5 10000.3 10224.1 9982.62 10208.1 9976.5 -8.35383 -5.85686 -5.9576 -5.84635 -5.95339 -8.92059 -5.68396 -5.79746 -5.67351 -5.79165 -4.48039 -4.36988 -4.57895 -4.54595 -4.38626 -4.55719 -4.55207 -4.83314 -4.3381 -4.60123 -4.49404 -4.37866 -4.58382 -4.54909 -4.39746 -4.56161 -4.55948 -4.8352 -4.34559 -4.60473 -9.56152 -4.51202 -4.3908 -4.52123 -4.41785 -4.50459 -4.38174 -4.51374 -4.40583 -4.52525 -4.42413 -4.50924 -4.39545 15512.6 15253 14927.7 11457.8 11274.3 11452.3 11281 9348.27 9708.49 9805.52 9271.69 9741.21 10156.8 9100.6 9751 9299.47 9763.96 9712.86 9390.82 9822.74 9334.29 9762.42 10159.4 9151.67 9768.01 9348.26 9783.06 10169.5 9981.29 10190 9975.37 10194.2 9948.24 10165.4 9980.58 10189.7 9963.05 10187.6 9923.58 10051.3 9803.19 10006.9 9771.33 10053.8 9822.22 10011.5 9786.33 -8.33218 -6.03826 -6.06934 -6.03545 -6.07359 -5.65529 -5.79951 -5.64924 -5.79676 -8.84801 -4.83094 -4.47573 -4.70722 -4.57735 -4.95235 -4.73411 -5.1351 -4.67452 -4.83148 -4.4791 -4.70835 -4.57985 -4.95409 -4.74385 -5.13661 -4.67726 -4.35572 -4.48985 -4.40667 -4.5813 -4.22531 -4.4927 -4.37757 -4.49745 -4.43026 -4.59019 -4.25046 -4.50273 -9.60759 15105.4 14801.1 14477.6 10792.3 10733 10777 10733 10830.3 10779.4 10835.8 10780.2 9577.1 9382.92 9649.04 9801.87 9369.98 9628.32 9164.35 9696.27 9350.17 9659.98 9621.63 9412.63 9815.97 9659.07 9383.3 9634.57 9188.94 9704.81 9374.87 9668.81 9940.85 9804.56 9980.01 9776.01 9878.23 9702.38 9943.98 9816.9 9982.61 9794.52 9883.71 9723.7 -7.66717 -8.17694 -5.81039 -5.77433 -5.80252 -5.77307 -4.53928 -4.51312 -4.73602 -4.56127 -4.80768 -4.85621 -4.61958 -4.99874 -4.57036 -4.87024 -4.55215 -4.51568 -4.74269 -4.57483 -4.81505 -4.86054 -4.62727 -5.00199 -4.5833 -4.87798 -8.7888 -4.59107 -4.35417 -4.589 -4.34285 -4.66081 -4.4012 -4.59268 -4.35874 -4.59043 -4.34192 -4.66566 -4.40815 -9.69895 14785.2 14392.9 13937.4 10585.6 10458.3 10582.4 10463.9 10267.7 10232 10267.6 10228.4 9288.93 8857.83 9325.86 8860.91 9302.79 8646.93 9309.67 8870.55 9294.92 8879.05 9334.06 8873.54 9310.35 8682.06 9317.67 8888.14 9440.79 9671.12 9063.72 9338.13 9190.29 9433.16 9487.96 9684.43 9081.93 9344.19 9207 9437.63 -7.42709 -5.24399 -5.12834 -5.24712 -5.13713 -8.0111 -5.37557 -5.34346 -5.36975 -5.34311 -4.5661 -4.41732 -4.70102 -4.63327 -4.45049 -4.66487 -4.43348 -4.74676 -4.40189 -4.66336 -4.58271 -4.4269 -4.70749 -4.63869 -4.46544 -4.67286 -4.44211 -4.75333 -4.41271 -4.67092 -8.79877 -4.61252 -4.46022 -4.61672 -4.47379 -9.82115 14598.3 14067.6 13473.5 12995 10130.9 9874.12 10112.3 9869.87 8382.88 8645.17 8749.45 8332.05 8730.6 9102.35 8173.83 8829.74 8324.08 8754.4 8663.2 8407.54 8759.19 8358 8740.59 9110.16 8206.32 8838.32 8351.08 8764.7 9089.7 8805.92 9143.8 8839.25 9080.02 8872.12 9093.06 8823.15 9150.73 8844.06 9085.89 8886.18 -6.10663 -7.25213 -4.62587 -4.7351 -4.61092 -4.73453 -7.93433 -4.58515 -4.25382 -4.54128 -4.21173 -4.9809 -4.58702 -4.2429 -4.53786 -4.21586 -4.95687 -4.34891 -4.53499 -4.2479 -4.40993 -4.25916 -4.43592 -4.36395 -4.54187 -4.26103 -4.41388 -4.26954 -4.43892 -9.00248 -9.83307 14540.1 13868.6 13153.6 12540.2 9308.98 9248.81 9306.65 9259.72 9592.96 9406.7 9587.1 9406.35 8591.63 8413.05 8585.95 8771.3 8379.06 8527.81 8115.15 8530.92 8314.09 8484.02 8618.22 8430.72 8781.73 8592.72 8391.52 8532.88 8129.77 8535.69 8323.89 8488.18 8889.89 8732.58 8898.79 8761.64 -6.08877 -3.27511 -3.21015 -3.28374 -3.21876 -6.91507 -4.04696 -4.09374 -4.03928 -4.09501 -8.16695 -4.24154 -3.97575 -4.2165 -3.98567 -3.72039 -4.05419 -3.8081 -4.0405 -4.23867 -3.97803 -4.21475 -3.97503 -3.72495 -4.05217 -3.81244 -4.04082 -4.0615 -4.24936 -4.07432 -4.24982 -9.18977 -9.88983 14580.7 13802.9 12987.8 12225.7 11509.2 8817.63 8603.2 8798.03 8602.54 8375.72 7877.98 8255.31 7754.53 8953.06 8375.37 7875.23 8255.36 7752.86 8945.66 8236.42 8349.52 8035.65 8190.16 8133.66 8232.44 8244.03 8352.25 8046.09 8193.19 8135.59 8233.86 5.30316 -4.64733 4.96659 5.86976 4.97646 5.89149 -7.04195 -1.70107 -2.29933 -2.48602 -1.29109 -3.63872 -3.86922 0.904802 -3.64945 -3.87286 -1.70449 -2.31203 -2.49062 -1.30007 0.929736 -8.30325 -3.97744 -3.83837 -4.06124 -3.85136 -3.73594 -3.95754 -3.9784 -3.84543 -4.06184 -3.85347 -3.74305 -3.96006 -9.46595 -10.0124 14722 13853.1 12957.8 12077 11246.5 8110.32 8101.81 8104.46 8116.07 8327.42 8025.64 8317.6 8033.64 8003.77 7794.73 7929.56 7618.66 7125.24 7752.14 7346.05 7738.06 8003.83 7798.62 7930.73 7616.64 7155.77 7758.4 7359.87 7742.54 7880.49 8021.47 7892.86 8023.76 18.5676 50.4095 66.4193 50.437 66.5426 3.172 51.7231 55.4744 51.6749 55.5298 -5.63862 2.82589 -1.3475 -3.31134 -1.17968 -3.4375 2.65531 20.1744 22.2882 19.0813 22.623 -3.32387 -3.44062 2.8294 -1.35558 -1.18117 2.67261 20.3433 22.3414 19.2515 22.7035 -8.69725 -3.92382 -3.77066 -3.92517 -3.77378 -10.2651 -10.3513 14941.2 14000 13036 12077.2 11121.2 10131.7 7652.79 7496.4 7632 7493.38 6984.12 7408.83 7215.59 6734.8 7107.22 6647.89 7722.99 6999.45 7413.88 7213.37 6743.76 7110.63 6647.34 7707.21 7667.21 7595.6 7750.33 7522.72 7273.91 7441.63 7670.49 7601.03 7750.63 7534.06 7279.02 7443.72 126.314 36.928 106.534 118.071 106.296 118.052 16.2523 40.9235 47.3432 77.531 67.4219 71.2637 68.4258 98.1461 41.2635 47.5599 77.4461 67.4826 71.2807 68.4808 97.9552 -4.05869 18.859 18.0293 39.9149 55.6332 18.9428 18.2422 40.2153 55.7767 -9.50381 -11.4724 -10.0291 15202.7 14203.8 13194.3 12177.6 11148.8 10046.9 6970.67 6984.42 6967.89 6994.35 7065.7 6937.04 7049.42 6936.31 6899.03 7106.05 6885.13 6647.47 6850.7 6481.08 5986.16 6528.78 6134.12 6474.74 6915.13 7111.02 6886.3 6656.92 6854.51 6484.62 6040.11 6544.19 6159.41 6484.69 7529.95 7401.44 7532.22 7409.35 339.277 141.853 42.7614 155.409 203.926 155.175 203.843 13.8194 67.7244 74.9269 104.858 98.5548 102.906 101.383 110.943 118.461 113.046 114.048 68.1704 75.0114 104.844 98.8196 102.882 101.384 111.14 118.485 113.044 114.06 -4.86199 -10.787 -10.0448 -9.65731 15504.1 14452.5 13391.7 12346.2 11281.1 10104.7 8786.84 6402.55 6389.02 6385.48 6389.61 5900.17 6205.27 5977.18 5624.68 5927.97 5494.63 6376.37 5918.47 6213.41 5975 5620.1 5926.92 5491.87 6370.73 6551.25 6356.32 6059.47 6196.79 6556.62 6373.18 6073.11 6203.52 358.588 225.996 225.777 376.76 442.945 375.967 443.715 124.497 31.4814 178.916 118.172 120.952 178.66 118.309 120.999 -0.273831 91.4338 96.0372 117.772 120.741 122.883 118.074 125.622 127.132 91.9149 96.0502 117.81 121.014 122.956 118.18 125.636 127.132 -6.50027 -9.30791 -9.07744 -9.45269 15830.7 14742.3 13612.9 12545.1 11477.4 10293.1 8923.88 7368.09 5754.56 5784.59 5745.13 5785.57 5778.13 5889.45 5637.91 5471.97 5576.68 5326.24 4860.22 5287.38 4984.68 5214.51 5789.31 5893.28 5638.7 5474.85 5577.73 5328.63 4885.51 5293.59 4998.15 5219.08 769.405 396.979 340.509 340.077 543.516 596.931 540.634 597.305 91.5466 15.0807 196.556 144.838 212.34 211.343 237.475 151.71 131.512 136.584 196.631 145.119 212.339 211.645 237.177 151.793 131.753 136.647 -4.41556 126.388 125.272 137.724 139.369 126.383 125.289 137.822 139.4 -7.03509 -8.12736 -8.62595 -9.38641 16150.8 15045.1 13856.3 12752.3 11689.3 10546.9 9205.02 7617.88 4622.03 5134.84 5129.28 4798.54 4610.7 4803.01 5041.8 4632.83 4938.13 5041.8 4653.4 4945.36 5580.4 5657.43 5183.84 5227.09 5307.86 5103.31 4772.97 4863.45 5590.3 5660.36 5187.75 5233.26 5309.85 5113.95 4785.2 4868.81 898.408 824.241 902.315 824.923 903.095 457.307 262.553 248.469 350.156 363.013 408.376 328.165 262.555 248.581 350.175 364.033 408.001 328.205 445.835 745.724 481.529 785.394 446.362 742.497 481.191 785.842 92.6369 2.20007 167.241 230.034 146.451 171.991 237.84 150.736 167.733 230.336 146.602 172.136 237.946 150.786 -5.63146 -6.80972 -7.63544 -8.49797 -9.37824 16342.6 15373.9 14103.2 12963.2 11893.6 10796.3 9550.65 8025.85 6162.83 4402.59 3909.41 4401.3 4067.86 3895.16 4069.32 3776.48 4067.65 3955.97 3709.09 4033.48 4324.42 4329.02 4605.28 4086.17 3791.89 4331.31 4357.6 4614.23 3962.2 3722.29 4037.7 4921.6 4854.32 4494.97 4589.74 4924.7 4861.72 4506.38 4594.61 1421.7 1002.38 1030.87 1090.29 1031.3 1090.96 508.639 315.647 306.456 431.421 419.865 315.869 306.908 431.545 420.111 536.176 578.065 617.474 651.148 713.077 755.572 821.41 731.489 989.524 541.64 578.908 622.109 652.077 712.89 755.482 821.371 734.207 985.653 120.169 -4.4939 280.047 288.226 280.743 288.508 -5.73465 -6.61484 -7.53723 -8.50287 -9.38828 15603 14380.6 13157.9 12076.4 11016.9 9856.98 8515.19 6762.95 3761.47 4092.51 3762.11 4095.97 3731.66 3501.76 3399.94 3277.09 3571.1 3270.39 3321.56 2963.88 3202.62 3735.07 3508.44 3404 3297.23 3575.49 3279.91 3475.79 2973.75 3307.99 3205.58 3477.25 3894.75 3585.99 4235.61 3667.86 4001.79 4352.2 3911.35 4246.64 3590.38 4356.92 4007.36 3670.08 1862.32 1542.92 1095.73 1206.89 1270.31 1206.72 1270.82 558.209 395.056 386.295 530.009 520.73 395.16 386.492 531.13 524.129 707.164 599.547 720.11 605.799 812.935 826.613 874.194 813.806 1146.05 706.739 601.185 719.879 606.478 811.696 826.302 874.06 816.728 1144.42 138.296 -5.90252 -5.65963 -6.60055 -7.60184 -8.54113 -9.40469 14616.3 13386.9 12232.8 11199.3 10107.9 8905.79 7446.53 5509.32 3294.09 3562.03 3290.35 3564.2 3331.71 3271.69 3078.41 3011.6 2741.7 2923.76 2487.33 2649.95 2400.45 2505.18 2680.23 2448.93 3334.38 3278.49 3081.18 3017.49 3026.46 2759.1 2928.31 2496.72 2652.8 2408.29 2508.02 2678.13 2445.5 3013.58 3329.31 3387.75 3334.32 3389.62 2225.63 2018.25 1397.73 1398.15 1655.06 1166.84 1348.73 1346.79 592.204 484.614 474.513 485.446 476.925 779.578 676.49 686.625 790.515 892.149 903.503 954.498 893.503 1270.8 1011.86 952.756 780.822 676.922 686.816 790.919 891.073 903.06 952.902 891.475 1270.16 1010.73 951.035 105.585 -5.59518 -5.79851 -6.71419 -7.69652 -8.59374 -9.42241 13587.9 12418.8 11339.3 10305.6 9200.04 7955.98 6388.97 4481.39 2895.7 3153.6 2890.46 3155.86 3034.45 3000.49 2807.54 2749.42 2531.18 2322.88 2606.5 2374.71 2183.82 2268 2397.27 2239.35 3035.79 3003.48 2810.76 2758.37 2563.71 2535.24 2333.62 2608.21 2378.06 2187.22 2269.44 2398.01 2244.83 2560.03 2483.91 2401.2 1644.41 1645.46 1561 1561.89 2139.32 1727.47 1193.41 1503.66 1496.92 544.605 849.844 861.016 956.228 963.031 1167.06 1070.03 1071.42 1121.03 1010.3 1284.24 1146.65 1198.73 853.195 862.105 956.248 962.989 1169.08 1069.38 1070.91 1120.85 1009.24 1283.15 1147 1198.78 82.2387 -5.42565 -5.87965 -6.85301 -7.80794 -8.65092 -9.43914 12578.1 11486 10447.3 9416.61 8309.36 7017.75 5488.06 3809.62 2770.53 2770.32 2552.73 2548.82 2818.28 2775.7 2317.82 2143.16 2380.23 2191.08 2008.63 2086.09 2199.98 2071.36 2820.8 2783.96 2188.98 1989.44 1902.76 2324.13 2150.26 2382.46 2193.5 2013.5 2087.91 2202.43 2080.87 2187.24 1992.27 1907.97 2657.77 2707.41 1786.31 1787.6 1722.42 1723.87 2546.22 1567.86 1562.24 2226.35 1756.65 1183.36 1198.25 1283.08 1201.84 1282.74 490.29 916.047 927.322 1014.16 1019.88 1074 1146 1080.58 1161.8 1209.58 1227.79 918.833 928.137 1014.07 1020.01 1075.34 1148.67 1162.75 1080.95 1210.28 1228.12 46.245 -5.21226 -6.04628 -7.01207 -7.91238 -8.70667 -9.45372 11603.1 10577.4 9566.65 8547.09 7444.61 6153.68 4763.5 3445.5 2501.98 2501.65 2299.07 2297.99 2282.95 2274.7 1965.93 2034.83 1843.06 1911.1 1712.12 1853.59 1646.52 1697.71 1776.96 1876.27 1616.5 1698.14 1973.77 2037.34 1847.17 1912.35 1707.87 1855.31 1649.34 1699.06 1780.61 1873.79 1620.71 1698.91 2952.23 1872.18 1869.76 1838.41 1839.64 2047.02 2235.94 2047.24 2237.85 2902.56 1689.37 1685.42 1643.55 1638.56 2670.65 1269.06 1352.51 1232.28 1316.59 1272.31 1352.53 1237.58 1316.82 2278.96 1758.55 1122.99 421.84 1128.47 1188.69 1140.35 1202.32 1258.31 1270.36 1132.52 1190.26 1203.05 1141.63 1259.47 1270.9 26.6711 -4.96025 -6.30296 -7.19817 -7.99798 -8.76153 -9.46583 10672.8 9687.06 8714.55 7719.5 6624.69 5417.06 4222.9 3267.78 2163.64 2163.78 2084.65 2085.09 2058.12 2051.09 1632.75 1740.9 1631.19 1739.46 1827.84 1890.18 1708.33 1771.26 1569.13 1545.89 1573.25 1627.45 1512.14 1572.77 1835.28 1892.28 1708.11 1771.67 1569.87 1550.03 1627.94 1574.63 1516.81 1573.88 3231.85 3231.22 1742.25 1930.2 1923.86 1740.32 1723.54 1720.17 2150.33 2305.63 2151.45 2308.74 3085.07 1364.14 1443.67 1341.27 1418.47 1364.71 1443.54 1344.19 1418.66 1305.86 1388.47 1324.15 1404.02 1309.84 1388.79 1326.81 1404.09 2784.88 1294.17 1302.94 1295.06 1303.45 2287.09 1682.52 1030.29 372.012 1239 1248.91 1240.52 1249.57 23.615 -4.87773 -6.52633 -7.3726 -8.05706 -8.79634 -9.47562 9781.3 8843.14 7907.2 6938.51 5899.64 4817.71 3840.12 2065.6 2066.41 2087.31 2085.03 2307.71 2516.52 2309.07 2519.28 1889.48 1884.34 1804.43 1800.39 1463.95 1550.2 1551.09 1659.83 1467.13 1550.9 1553.68 1659.65 1522.17 1454.11 1484.91 1566.82 1451.28 1502 1525.32 1458.38 1567.87 1486.27 1455.07 1503.08 3557.97 3535.95 3482.83 1462.9 1401.16 1466.09 1385.5 1470.18 1519.65 1491.05 1638.32 2002.5 1657.34 1562.5 1995.02 1654.4 1489.16 1635 1558.07 1459.8 1404.4 1466.94 1387.57 1470.64 1518.52 1376.42 1461.5 1378.99 1467.78 1377.87 1461.43 1381.46 1468.3 2235.51 2404.11 2236.96 2407.5 3268.75 1376.48 1389.98 1355.87 1366.62 1379.3 1391.05 1357.8 1367.43 1321.9 1330.15 1337.06 1343.62 1324.37 1331.09 1338.15 1344.28 2828.12 1278.01 1285.98 1280.11 1286.8 2202.84 1573.71 964.74 333.015 30.2851 -4.95976 -6.67708 -7.51214 -8.10536 -8.8189 -9.48389 8939.84 8054.94 7146.76 6221.55 5269.83 4329.69 1802.94 1799.2 1829.2 2086.53 1826.52 2081.15 1399.3 1484.58 1361.22 1451.6 1405.06 1485.51 1366.01 1452.54 1334 1411.77 1342.17 1431.09 1337.98 1412.91 1348.11 1432.31 1384.18 1419.51 1388.02 1421.03 1394.64 1426.04 1399.53 1427.47 3866.06 3913.11 3720.96 1437.26 1540.09 1405.31 1467.17 1435.68 1410.81 1430.53 1563.88 2054.72 1663.24 1579.95 1673.19 1575.92 2047.77 1660.48 1579.66 1670.42 1572.36 1562.65 1536.09 1441.73 1409.75 1468.7 1437.24 1414.17 1431.91 1394.64 1410.21 1405.05 1422.6 1398.23 1411.49 1407.81 1423.83 3376.39 1294.7 1306.22 1298.79 1307.49 2775.96 2068.75 1505.59 918.279 322.952 41.0783 -5.20598 -6.78891 -7.57446 -8.14244 -8.83257 -9.49077 8157.73 7332.31 6460.63 5587.39 4721.57 1368.24 1451.99 1386.11 1478 1371.27 1452.74 1388.23 1478.31 1431.99 1532.35 1497.65 1421.1 1512.67 1608.52 1557.12 1728.43 1700.46 1604.42 1434.29 1529.76 1498.05 1423.01 1512.95 1607.74 1559.82 1726.44 1698.29 1602.18 1328.75 1353.02 1295.27 1314.59 1334.33 1354.92 1298.82 1316.29 1290.93 1304.12 1315.41 1333.39 1295.91 1306.03 1318.9 1334.95 1310.55 1339.07 1314.89 1340.39 4149.47 4262.22 3908.02 1502.18 1556.47 1527.84 1566.78 1695.65 1587.74 1680.42 1603.39 1567.59 1575.85 1693.47 1587.99 1678.07 1601.02 1565.98 1565.8 1575.3 1553.84 1528.95 1506.71 3400.03 2712.29 2005.55 1483.33 889.602 326.597 47.128 -5.2634 -6.83996 -7.57308 -8.168 -8.84281 -9.49767 7445.68 6682.71 5859.68 5043.27 1332.01 1351 1356.32 1378.12 1336.07 1352.48 1358.53 1378.97 1452.68 1389.17 1558.84 1423.74 1476.64 1396.67 1424.65 1583.29 1455.68 1391.41 1555.65 1424.4 1477.61 1398.49 1425.39 1582.27 1278.49 1310.5 1285.62 1312.66 4397.78 4574.99 4028.81 1511.39 1525.68 1583.71 1574.32 1583.02 1570.47 1519.31 1530.95 1582.97 1572.36 1582.45 1567.94 1527.12 1525.06 1532.66 1516.67 3484.05 2677.6 2024.95 1481.34 874.373 326.793 45.7015 -5.48558 -6.88031 -7.55131 -8.18789 -8.85332 -9.50376 6817.13 6113.29 5337.2 1479.93 1499.41 1482.86 1500.05 4629.9 4857.51 4291.66 1518.53 1513.5 1524.54 1503.25 1519.47 1518.68 1526.04 1507.25 3460.17 2666.67 2076.47 1477.24 858.109 313.173 38.494 -5.7235 -6.91681 -7.54312 -8.2075 -8.86643 -9.50908 6285.45 5611 5040.64 5149.82 4221.12 3419.45 2701.47 2091.04 1462.46 832.394 288.391 26.0558 -5.80322 -6.9381 -7.55331 -8.23155 -8.87919 -9.51404 5847.09 4914.51 5469.9 4151.17 3398.18 2711.08 2080.63 1433.48 794.299 252.082 14.6736 -5.85519 -6.94926 -7.58147 -8.25611 -8.89193 -9.51761 4841.22 4093.72 3375.7 2705 2052.51 1393.04 744.479 211.04 7.76999 -6.00133 -6.97787 -7.61722 -8.28092 -8.90433 -9.52032 4769.18 4047.82 3349.66 2676.12 2010.45 1343.85 686.26 171.635 3.57399 -6.15379 -7.01882 -7.65132 -8.30471 -8.91562 -9.52243 4707.12 4003.73 3310.43 2632.56 1961.74 1288.56 626.703 142.953 0.959501 -6.2815 -7.06171 -7.68336 -8.32673 -8.92621 -9.52466 4649.2 3950.77 3261.41 2582.71 1907.04 1231.3 574.761 121.235 -0.775801 -6.37022 -7.10943 -7.71284 -8.34566 -8.93584 -9.52677 4588.37 3894.19 3207.16 2526.73 1851.01 1175.37 529.168 103.208 -1.96636 -6.43451 -7.15039 -7.73989 -8.36292 -8.94358 -9.5293 4525.15 3833.5 3148.22 2469.65 1794.21 1124.03 487.504 86.617 -2.75809 -6.49282 -7.17778 -7.76504 -8.37625 -8.95152 -9.53235 4457.94 3769.34 3087.74 2410.79 1739.45 1075.5 448 72.1565 -3.28822 -6.5567 -7.21041 -7.7818 -8.38734 -8.95685 -9.53592 4389.65 3704.51 3025.44 2352.94 1686.33 1028.15 411.737 60.5764 -3.64361 -6.60787 -7.23645 -7.7988 -8.39856 -8.96253 -9.54148 4319.83 3638.04 2963.8 2296.04 1634.96 983.35 380.87 52.8723 -3.788 -6.62293 -7.25246 -7.80438 -8.39951 -8.97496 -9.54993 4248.95 3572.16 2902.67 2240.81 1586.16 943.047 357.414 49.4674 -3.9169 -6.64624 -7.29173 -7.79777 -8.41039 -8.9983 -9.55795 4178.33 3506.57 2843.18 2187.79 1541.24 909.128 342.541 50.0263 -4.19853 -6.63935 -7.29218 -7.8127 -8.44418 -9.02723 -9.56583 4107.93 3442.43 2785.6 2137.99 1501.08 883.466 336.679 54.2797 -4.56323 -6.5853 -7.286 -7.86723 -8.49438 -9.05841 -9.57063 4038.82 3379.9 2730.76 2091.99 1467.06 865.423 337.443 56.6364 -4.75491 -6.56421 -7.33838 -7.95244 -8.54781 -9.0816 -9.57274 3971.13 3319.76 2679.08 2050.7 1438.83 853.459 336.357 54.3753 -4.90642 -6.67356 -7.4372 -8.04497 -8.58482 -9.09269 -9.57275 3905.61 3262.35 2631.06 2013.88 1414.95 841.806 327.522 43.7322 -5.22948 -6.83725 -7.55749 -8.1148 -8.60197 -9.0957 -9.56875 3842.55 3208 2586.58 1980.36 1392.98 824.326 307.351 32.382 -5.59432 -7.02622 -7.63983 -8.14604 -8.60867 -9.07872 -9.56631 3782.26 3156.71 2544.84 1948.52 1368.5 796.84 279.398 23.5556 -5.87596 -7.17994 -7.65838 -8.16107 -8.57643 -9.06332 -9.56699 3724.71 3107.83 2504.74 1915.64 1337.99 760.042 253.076 18.1878 -6.0913 -7.22285 -7.67693 -8.12242 -8.55326 -9.06043 -9.57109 3669.41 3060.59 2464.77 1880.1 1300.97 723.794 233.82 17.1128 -6.1515 -7.22199 -7.5936 -8.07978 -8.54778 -9.06622 -9.57738 3615.72 3013.77 2423.42 1840.72 1262.55 691.751 225.493 18.4117 -6.07368 -7.1839 -7.49161 -8.05237 -8.55948 -9.07891 -9.586 3562.61 2966.47 2379.75 1800.06 1227.41 671.748 228.41 22.7911 -5.77896 -7.07027 -7.48808 -8.05188 -8.58511 -9.10354 -9.6023 3509.39 2917.78 2335.16 1761.42 1199.97 664.877 239.602 31.4797 -5.15151 -7.00532 -7.52726 -8.08225 -8.63091 -9.1397 -9.61155 3455.1 2868.41 2291.75 1727.34 1182.23 665.398 255.263 40.4778 -5.02264 -7.00816 -7.56733 -8.15076 -8.71514 -9.15623 -9.62218 3400.19 2819.67 2251.13 1699.13 1169.39 669.779 260.527 36.6944 -5.22867 -7.0187 -7.65511 -8.27393 -8.76252 -9.13953 -9.60537 3345.62 2772.7 2214.06 1674.2 1156.35 666.475 244.79 26.0488 -5.44611 -7.19028 -7.841 -8.30902 -8.78363 -9.17214 -9.61009 3292.28 2727.89 2178.97 1648.33 1137.22 641.246 210.598 15.18 -5.81954 -7.42681 -7.96016 -8.25295 -8.76506 -9.20278 -9.60971 3240.45 2684.07 2142.55 1616.8 1102.65 590.494 165.785 8.66018 -6.23722 -7.52792 -7.94189 -8.30575 -8.80132 -9.20896 -9.59621 3189.16 2638.67 2100.78 1573.58 1046.38 517.648 125.778 4.016 -6.569 -7.36996 -7.92544 -8.39851 -8.80737 -9.16835 -9.59594 3136.15 2588.18 2049.51 1512.7 968.06 440.498 98.1279 1.16439 -6.6721 -7.39457 -8.00446 -8.4192 -8.73924 -9.16775 -9.60273 3078.22 2529.24 1983.64 1434.24 878.219 374.492 75.7449 -0.55338 -6.80959 -7.58081 -8.00523 -8.31463 -8.73886 -9.1893 -9.60783 3012.37 2457.62 1902.83 1343.48 792.398 325.244 56.8026 -2.33231 -6.9919 -7.62639 -7.87188 -8.30922 -8.77531 -9.20405 -9.59776 2934.73 2372.73 1809.9 1251.96 721.989 276.28 40.1414 -3.72233 -7.1177 -7.4694 -7.8789 -8.36261 -8.80079 -9.17309 -9.5861 2844.32 2275.55 1712.37 1166.82 648.85 218.09 25.1251 -5.39513 -6.9802 -7.44742 -7.94947 -8.39899 -8.74831 -9.13615 -9.57533 2741.78 2171.9 1615.6 1080.82 555.192 150.251 10.6259 -6.09502 -7.00252 -7.53777 -7.99849 -8.3251 -8.68496 -9.10999 -9.67203 2631.62 2066.36 1516.63 974.44 439.28 79.378 0.865411 -6.45791 -7.11502 -7.5943 -7.90359 -8.23398 -8.63467 -9.18164 -9.59527 2517.98 1956.91 1402.21 842.173 303.473 29.6671 -3.90708 -6.63312 -7.17638 -7.47838 -7.78509 -8.16125 -8.71256 -9.00935 2399.59 1833.55 1264.61 682.807 166.697 8.50936 -5.51736 -6.70752 -7.04445 -7.33047 -7.68529 -8.26557 -8.43244 2268.24 1691.5 1103.5 494.948 87.8619 2.31999 -5.69515 -6.55095 -6.88912 -7.23847 -7.8142 -7.81585 2118.04 1526.96 920.891 365.245 58.8495 1.36208 -5.51441 -6.40057 -6.78385 -7.37819 -7.08058 1948.47 1349.15 788.765 317.73 51.5825 1.34702 -5.38768 -6.32532 -6.933 -6.10476 1776 1217.08 742.231 307.44 51.2119 1.1783 -5.35902 -6.49572 -4.68454 1644.37 1169.18 732.04 307.672 49.772 0.522435 -5.50932 -2.36435 1595.54 1157.96 732.376 304.839 41.6728 -0.662481 2.12411 1583.37 1157.71 728.806 289.957 28.6239 10.9616 1582.57 1153.71 714.356 267.092 21.1601 1578.51 1139.06 692.362 240.332 1563.99 1117.45 664.986 1542.63 1090.38 1515.33 28.178 26.0638 13.584 34.681 38.2723 35.3341 47.3942 17.7993 15.8035 0.318791 34.8641 46.7642 61.8022 46.7194 55.5912 35.4596 85.7061 65.2386 18.6994 -0.123414 17.8088 13.7157 2.60155 -2.45077 28.5287 76.1436 57.6709 46.8786 124.453 67.4874 77.3048 93.6118 75.61 55.4927 26.4919 117.442 93.0594 1.018 18.7903 -0.124048 -2.56069 13.7141 13.8356 14.4791 -3.40261 -2.92859 -3.07728 -3.21207 -2.77827 81.8278 76.2125 57.8411 38.4721 127.561 124.287 124.425 180.066 77.4488 65.1887 97.0175 93.7059 75.7037 48.3427 137.307 121.719 1.03032 -2.90779 15.9669 0.305039 -2.56698 2.64792 14.6154 -3.4034 -2.94204 -3.08189 -3.21484 11.8635 -3.20012 -3.65335 -3.17395 -3.34087 -3.49117 -3.44456 81.8134 62.1261 46.8631 127.342 162.967 138.471 118.096 124.448 86.1966 179.731 67.5718 121.846 145.13 214.579 142.341 151.831 65.4608 57.6447 97.1283 65.8373 134.554 122.093 -2.91021 -3.57326 -2.46552 -2.78618 11.9373 -3.19988 -3.65404 -3.17465 -3.33997 -3.49335 6.47852 -2.9273 -4.41809 -3.73822 -3.54414 -3.65179 -3.61424 163.356 138.595 225.953 178.179 130.221 137.644 121.977 121.931 145.127 93.5698 214.052 142.775 151.918 120.852 138.847 185.375 299.919 137.322 143.878 58.1007 33.4439 132.734 -3.57536 -3.45198 6.5107 -2.94507 -4.41427 -3.74017 -3.55031 -3.65286 -3.61994 0.646977 -3.45533 -4.2681 -3.81071 -3.85911 -4.31961 -3.98549 -4.20922 -4.12691 -3.88344 -3.73918 178.33 225.984 130.666 364.973 245.17 205.827 83.2645 134.604 122.313 120.946 138.875 185.224 299.262 137.388 143.892 135.986 229.324 154.288 153.295 159.331 147.447 456.965 135.322 137.513 33.6316 10.0339 0.640529 -3.46962 -4.27786 -4.31771 -3.99181 -4.2119 -4.12684 -3.81437 -3.85988 -3.88411 -3.74147 -1.05116 -3.10411 -4.36819 -4.69058 -3.92158 -4.09713 -4.31602 -4.00202 -4.23161 -4.23184 245.412 206.094 364.534 83.8588 551.472 430.844 323.061 175.896 30.516 132.766 136.025 229.031 154.327 153.466 159.362 147.546 456.562 135.41 137.546 387.313 216.753 165.177 167.989 202.539 147.751 149.486 153.582 143.744 677.296 10.0653 1.28492 -1.05829 -3.1223 -4.3704 -4.68054 -4.31688 -4.01212 -3.92948 -4.23522 -4.09794 -4.23752 -0.932994 -2.44928 -4.08475 -4.6591 -4.11263 -4.33826 -4.19193 -4.41579 -4.46276 -4.31418 430.642 323.247 176.763 551.056 30.6516 781.907 664.713 544.045 348.473 95.405 6.15959 386.752 216.766 165.348 168.022 202.709 147.783 149.568 153.608 143.849 677.003 614.594 281.47 344.1 371.966 261.36 207.852 169.313 170.86 203.799 903.741 1.28284 -0.0411801 -0.935835 -2.459 -4.08962 -4.65207 -4.11317 -4.33557 -4.19328 -4.41401 -4.46543 -4.32622 -0.823724 -1.76702 -3.21913 -4.29358 -4.84907 -4.29284 -4.38215 -4.29877 -4.43266 -4.53762 -4.35365 664.261 543.736 349.264 96.0664 781.548 6.16638 1006.05 912.302 801.004 612.185 265.773 36.051 1.72694 613.464 281.573 345.839 372.269 261.872 208.058 169.504 170.935 204.287 903.571 836.154 601.405 441.403 480.783 535.227 271.942 352.88 359.385 266.556 209.299 206.339 1105.24 -0.0416985 -0.395824 -0.825527 -1.77102 -3.22583 -4.29447 -4.8438 -4.29828 -4.38262 -4.30699 -4.43493 -4.54195 -4.36685 -0.833994 -1.45388 -2.58157 -3.63961 -4.41371 -4.30665 -4.4842 -4.42432 -4.20069 -4.3554 -4.47451 -4.38744 -4.52418 912.103 800.439 612.413 266.838 36.1897 1006.11 1.72894 1204.76 1144.22 1054.71 897.873 565.948 157.95 11.7935 0.492343 835.826 601.116 442.598 480.839 534.997 272.182 353.669 359.739 267.027 209.534 206.968 1105.15 806.616 1035.8 562.955 442.433 452.079 529.506 269.515 352.621 361.059 264.677 1276.92 -0.39666 -0.392435 -0.835151 -1.4559 -2.58721 -3.64569 -4.4118 -4.31648 -4.48666 -4.42337 -4.20025 -4.36383 -4.47723 -4.39883 -4.5276 -0.858919 -1.3682 -2.1545 -3.15644 -4.05377 -4.64261 -4.41114 -4.50831 -4.40175 -4.28317 -4.43803 -4.59732 1144.38 1054.45 897.444 566.846 158.638 11.8171 1205.09 0.491812 1373.38 1339.16 1288.23 1178.46 908.541 452.392 80.8519 5.33161 0.2839 805.503 1035.3 563.199 443.695 452.555 530.182 269.807 353.715 361.502 265.39 1276.83 684.43 995.72 736.969 605.285 647.063 1209.75 538.739 437.513 444.241 527.214 1416.26 -0.393407 -0.34208 -0.859599 -1.36936 -2.15776 -3.16254 -4.05416 -4.63674 -4.41841 -4.51027 -4.40135 -4.28537 -4.44662 -4.60064 -0.941051 -1.32867 -1.90258 -2.74793 -3.58285 -4.33725 -4.02745 -4.22422 -4.17784 -4.33021 -4.40978 -4.53799 -4.46117 -4.33117 1339.57 1288.28 1177.99 909.151 453.488 81.1149 5.34021 1373.7 0.283089 1507.17 1496.91 1488.14 1433.02 1232.19 827.392 337.881 57.69 5.02192 0.212535 688.025 993.977 737.858 607.202 647.7 1208.81 539.518 438.93 444.765 529.277 1416.11 760.039 710.388 1167.91 813.684 826.887 888.005 726.18 622.263 635.888 1352.22 555.973 545.12 1520.34 -0.343363 -0.421099 -0.941396 -1.32916 -1.90455 -2.75229 -3.58649 -4.32887 -4.04088 -4.22754 -4.18627 -4.33278 -4.41501 -4.5406 -4.46438 -4.34025 -1.10931 -1.3794 -1.80602 -2.41957 -3.19533 -3.95702 -4.6711 -4.27399 -4.33513 -4.31625 -4.48081 -4.54387 -4.32132 1497.39 1488.43 1432.7 1232.23 828.275 338.834 57.9017 5.03366 1507.42 0.211603 1604.7 1620.79 1640.56 1634.33 1515.57 1190.16 721.098 299.434 58.8947 6.66792 0.406615 764.49 712.032 1165.37 814.868 833.577 889.722 726.761 623.538 636.432 1351.2 556.966 547.896 1520.41 786.18 971.325 1310.72 1042.33 895.815 956.822 800.391 847.464 861.758 1462.57 1590.14 -0.422234 -0.545205 -1.10841 -1.37922 -1.80737 -2.42366 -3.19966 -3.95201 -4.66885 -4.28922 -4.34033 -4.33362 -4.48638 -4.54607 -4.32919 -1.17323 -1.49907 -1.81493 -2.28428 -2.90239 -3.61595 -4.3258 -4.32446 -4.1001 -4.38902 -4.08645 -4.20333 -4.40432 1621.28 1640.92 1634.13 1515.24 1191.04 721.692 300.113 59.0804 6.68914 1605.1 0.405319 1666.96 1710.08 1748.55 1773.26 1741.28 1503.91 1098.27 666.86 290.953 72.3128 10.187 1.00955 788.921 977.183 1307.5 1043.63 902.172 958.529 801.475 851.868 863.486 1461.82 1590.47 1025.45 1006.9 1432.39 1103.76 1087.47 1170.81 1022.22 924.538 939.253 1537.16 1622.15 -0.545256 -0.294575 -1.17211 -1.49836 -1.81555 -2.28789 -2.90733 -3.61635 -4.31896 -4.32677 -4.12016 -4.39653 -4.09548 -4.23474 -4.4151 -1.05928 -1.58766 -1.85403 -2.24668 -2.75467 -3.38228 -4.0433 -4.19453 -3.8795 -4.06606 -4.00493 -4.36607 -4.12418 -4.41107 -4.16776 1710.62 1748.99 1773.29 1740.89 1504.16 1098.91 667.74 291.537 72.5617 10.2221 1667.61 1.00831 1765.61 1691.57 1826.68 1869.27 1896.24 1754.75 1420.12 1027.76 642.204 289.533 90.7136 16.1141 2.83084 1029.94 1009.29 1430.4 1104.57 1094.68 1172.72 1023.25 927.639 940.428 1536.92 1622.33 1065.65 1179.9 1269.06 1137.9 1223.34 1510.43 1081.42 1125.14 1139 1581.25 1630.3 -0.29483 0.364722 -1.05973 -1.5876 -1.85433 -2.2487 -2.75923 -3.38563 -4.03541 -4.19582 -3.89391 -4.06761 -4.01353 -4.37158 -4.14098 -4.41908 -4.18168 -1.53713 -0.849399 -0.515426 -0.527634 -0.79891 -1.89297 -2.25064 -2.69224 -3.22543 -3.85199 -4.42185 -4.26378 -4.03456 -4.13475 -4.12367 -4.44615 -4.28498 1827.15 1766.32 1869.48 1895.94 1754.47 1420.52 1028.49 643.004 290.098 91.0142 16.1694 1692.19 2.8232 1874.26 1783.81 1691.5 1931.38 1973.21 1926.72 1670.78 1347.46 986.049 604.706 309.411 112.418 26.0491 7.94616 1069.93 1184.07 1508.77 1270.17 1144.82 1225.31 1083.05 1129.86 1140.89 1580.93 1630.34 1071.44 1210.46 1224.4 1236.05 1301.67 1180.65 1192.14 1561.06 1245.88 1338.3 1082.68 1131.36 1142.1 1595.68 1641.43 0.361789 0.450055 -0.253971 -0.248822 0.723137 -1.53836 -0.850073 -0.51635 -0.528203 -0.800151 -1.89388 -2.25232 -2.69565 -3.22966 -3.85014 -4.41204 -4.26877 -4.05148 -4.13896 -4.13866 -4.45412 -4.3068 -1.88685 -1.14487 -1.28354 -1.39377 -1.05731 -0.591867 -0.293804 -0.268825 -0.59638 -2.26626 -2.66804 -3.14323 -3.6843 -4.30858 -4.08248 -4.26864 -3.98867 -4.1997 -4.401 -4.18973 -4.30874 -4.27765 1931.67 1874.82 1784.65 1973.08 1926.12 1670.68 1347.89 986.581 605.203 310.04 112.775 26.0869 1692.09 7.92699 1973.68 1887.22 1775.26 1692.39 2013.1 2011.67 1825.98 1596.4 1298.91 938.018 618.605 324.609 128.373 50.3343 9.58196 27.2787 31.7884 7.89862 1074.14 1214.16 1227.84 1558.56 1302.64 1250.4 1339.49 1237.4 1184.34 1193.68 1083.57 1135.04 1143.47 1595 1641.65 1260.31 1231.61 1271.26 1236.09 1184.12 1191 1276.65 1584.7 1368.58 1271.98 1359.2 1287.24 1301.01 1616.11 1658.69 0.448922 -0.254953 -0.249282 0.717665 1.02283 0.0461026 0.084482 1.3 -1.88899 -1.14578 -1.28531 -1.3949 -1.05872 -0.592255 -0.294443 -0.269001 -0.59767 -2.26811 -2.67104 -3.14677 -3.68518 -4.29794 -4.09635 -4.2727 -4.00042 -4.2012 -4.40757 -4.20545 -4.3142 -4.29509 -2.26699 -1.79161 -1.47907 -1.59705 -1.6665 -0.915187 -1.18713 -1.21689 -0.903544 -0.438666 -0.187216 -0.17353 -0.451887 -2.66014 -3.09281 -3.57769 -4.11411 -4.68403 -4.23049 -4.37917 -4.22302 -4.31035 -4.27854 -4.42807 2013.15 1974.03 1887.88 1776.11 2011.21 1825.49 1596.55 1299.34 938.29 619.099 325.354 128.804 50.3862 1693.09 9.56823 27.2447 31.7782 7.88094 2043.98 1989.11 1875.67 1764.51 1697.83 2052.76 1921.38 1746.61 1557.84 1247.65 944.105 603.904 327.541 152.24 68.6153 50.3945 53.8397 67.2546 9.10285 31.5667 35.142 9.52882 1263.39 1233.85 1284.43 1581.85 1370.42 1277.09 1360.33 1272.5 1290.86 1302.53 1237.07 1186.73 1192.1 1615.5 1658.94 1272.2 1276.49 1298.1 1328.04 1621 1384.09 1315.13 1401.98 1345.34 1313.17 1329.32 1286.97 1295.68 1636.64 1648.98 1.02019 0.0451632 0.0840645 1.29442 0.86975 0.101105 0.173777 1.0902 -2.26983 -1.79342 -1.48075 -1.59838 -1.66936 -0.91582 -1.18915 -1.21801 -0.90552 -0.439261 -0.187904 -0.173675 -0.45326 -2.66266 -3.09609 -3.57973 -4.10958 -4.68113 -4.24736 -4.38431 -4.23607 -4.31343 -4.28865 -4.43121 -2.69089 -1.97746 -2.01769 -2.15067 -1.84717 -1.7171 -1.44139 -1.49393 -1.65856 -0.66834 -1.00072 -0.918289 -0.722638 -3.06992 -3.50378 -3.98303 -4.49821 -4.47763 -4.16901 -4.42539 -4.23335 -4.31321 -4.46423 -4.31061 -4.45581 2052.54 2044.14 1989.56 1876.4 1765.39 1920.82 1746.29 1558.21 1247.8 944.407 604.462 328.244 152.528 68.65 50.4113 53.8566 67.3092 1698.7 9.11708 31.5387 35.1258 9.52359 2079.48 2063.68 1981.65 1858.59 1755.45 1668.84 1986.96 1818.99 1741.34 1508.35 1226.29 890.421 596.041 346.743 105.464 180.168 185.026 107.8 83.2886 59.5527 61.7332 87.9711 6.162 30.7254 28.1145 8.88461 1274.59 1306.8 1333.74 1618.29 1386.56 1324.37 1404.69 1347.58 1317.34 1331.06 1277.52 1290.71 1297.08 1636.33 1648.88 1351.64 1331.94 1346.81 1640.84 1438.68 1340.94 1430.22 1372.59 1372.03 1395.97 1345.4 1318.9 1330.19 1664.24 1600.9 0.867783 0.101493 0.173651 1.09121 -2.69464 -1.97937 -2.02126 -2.15233 -1.85064 -1.71886 -1.44393 -1.49475 -1.66204 -0.669295 -1.0039 -0.9199 -0.724866 -3.07284 -3.50663 -3.98187 -4.49252 -4.47623 -4.17236 -4.42465 -4.23308 -4.33228 -4.46987 -4.32787 -4.46054 -3.18289 -2.58608 -2.21666 -2.35623 -2.43382 -1.88328 -2.04641 -2.07036 -1.84645 -1.58722 -1.29436 -1.23173 -1.60297 -3.48361 -3.89498 -4.34024 -4.38003 -4.16807 -4.38869 -4.15414 -4.54306 -4.30399 -4.49762 -4.34012 1986.6 2079.45 2063.91 1982.13 1859.47 1756.54 1818.67 1741.48 1508.4 1226.25 890.672 596.551 347.138 105.546 180.321 185.233 107.921 83.2912 59.4835 61.7252 87.9973 1669.41 6.16525 30.7783 28.1367 8.88473 2040.34 2108.67 2069.8 1965.15 1841.9 1726.08 1612.4 1871.13 1826.7 1702.7 1479.02 1190.26 883.516 594.594 407.693 278.864 294.803 384.93 131.726 228.702 226.506 140.66 101.335 64.0365 61.2219 104.934 1356.04 1335.94 1637.86 1354.83 1441.12 1350.39 1432.98 1374.43 1376.71 1397.82 1346.94 1322.6 1331.64 1660.83 1600.64 1359.77 1399.66 1456.55 1395.67 1488.86 1471.28 1410.43 1471.43 1351.35 1432.6 1389.59 1418.11 1622.07 1384.25 1481.76 1515.63 -3.1875 -2.58848 -2.21928 -2.35804 -2.43769 -1.88526 -2.04903 -2.07197 -1.85019 -1.58795 -1.29791 -1.23333 -1.60616 -3.48715 -3.89546 -4.34173 -4.37439 -4.1672 -4.38604 -4.14768 -4.54004 -4.29913 -4.49542 -4.33492 -3.65863 -2.8808 -2.95982 -3.13351 -2.70605 -2.57042 -2.28361 -2.30119 -2.56308 -1.90202 -2.06773 -2.11873 -1.85988 -3.87337 -4.2562 -4.91517 -4.45214 -4.32282 -4.4664 -4.36983 1870.91 2040.17 2108.74 2070.12 1965.72 1842.88 1727 1826.46 1702.72 1478.86 1190.33 883.696 595.18 408.064 279.143 295.143 385.226 131.812 228.979 226.884 140.854 101.31 64.0633 61.2073 104.948 1612.55 1925.56 2096.79 2136.87 2067.32 1949.74 1813.41 1669.27 1524.13 1853.13 1815.79 1676.42 1463.87 1182.91 867.127 515.073 605.462 636.23 489.609 448.83 337.527 339.614 443.987 171.667 271.157 279.094 171.998 1367.26 1458.62 1401.12 1490.59 1470.86 1413.04 1472.29 1351.48 1405.11 1434.67 1394.41 1420.06 1620.6 1387.8 1482.15 1514.92 1388.46 1426.13 1446.75 1438.23 1472.37 1473.67 1455.94 1471.57 1566.66 1476.25 1381.07 1481.65 1380.27 1431.93 -3.66296 -2.88312 -2.96233 -3.13527 -2.70947 -2.5724 -2.28626 -2.30296 -2.56614 -1.90388 -2.07379 -2.12172 -1.8645 -3.87523 -4.25379 -4.89431 -4.44638 -4.31936 -4.46451 -4.35798 -4.0327 -3.21937 -3.37997 -3.54068 -3.26635 -2.88725 -3.20367 -3.21378 -2.88161 -2.69835 -2.32311 -2.34421 -2.69867 -4.22092 -4.72156 -4.27426 -4.54762 -4.31961 -4.60614 -4.5796 -4.39913 -4.58664 -4.42894 1852.97 1925.4 2096.75 2137.01 2067.74 1950.42 1814.35 1669.96 1815.73 1676.23 1463.52 1183.05 867.737 515.371 605.361 636.404 489.814 449.239 337.795 339.954 444.454 172.01 272.008 279.774 172.277 1524.07 1881.67 2006.07 2155.72 2161.14 2066.86 1926.08 1763.75 1594.67 1440.2 1861.41 1803.65 1678.75 1463.81 1157.73 892.337 717.66 755.947 844.14 558.182 660.563 674.925 549.468 503.624 380.448 392.832 489.6 1394.45 1428.28 1451.66 1442.75 1474.24 1475.16 1460.51 1473.33 1565.61 1476.7 1388.14 1483.22 1382.38 1429.74 1482.92 1466.61 1493.66 1487.25 1454.51 1470.8 1470.84 1453.26 1338.64 1428.72 1364.44 1467.75 1454.01 1347.54 -4.03645 -3.22115 -3.38178 -3.54299 -3.26937 -2.88782 -3.20328 -3.21251 -2.88345 -2.69946 -2.32869 -2.34674 -2.70085 -4.21745 -4.70176 -4.26962 -4.54365 -4.31404 -4.60201 -4.57562 -4.39798 -4.58571 -4.41856 -4.26093 -4.27364 -3.55641 -3.59702 -3.85836 -3.68025 -3.19422 -3.64786 -3.81596 -3.16208 -4.61439 -4.2334 -4.46829 -4.18525 -4.40703 -4.29733 -4.58211 -4.36292 -4.65817 1861.2 1881.53 2005.99 2155.75 2161.34 2067.35 1926.79 1764.66 1595.33 1803.48 1678.19 1463.77 1157.97 892.579 717.755 756.112 844.363 558.476 660.887 675.077 549.941 504.114 381.337 393.493 490.252 1440.11 1870.61 1926.55 2111.75 2225.53 2193.92 2060.71 1889.11 1697.5 1509.34 1370.91 1862.11 1829.22 1712.16 1472.05 1028.98 1108.74 1174.03 973.332 937.903 778.814 802.226 905.651 614.474 713.015 731.886 598.211 1486.78 1470.95 1494.91 1488.79 1461.67 1473.46 1471.52 1453.41 1341.35 1429.35 1366.24 1469.48 1458.59 1346.49 1490.6 1496.9 1372.93 1321.64 1407.09 1291.03 1278.77 1122.6 1242.15 1214.52 1466.59 1432.91 1454.62 1452.79 1496.33 1489.8 1130.88 1338.27 1225.31 -4.2653 -4.27013 -3.55758 -3.59747 -3.86151 -3.6833 -3.19375 -3.65715 -3.81684 -3.16409 -4.59425 -4.22914 -4.4658 -4.18904 -4.40742 -4.31056 -4.58484 -4.36165 -4.65891 -4.41285 -4.03553 -4.31755 -4.72534 -4.91368 -4.50795 -4.33777 -4.64384 -5.00932 -4.76398 -4.10044 -4.30656 -4.12631 -4.34391 -4.25351 -4.50984 -4.26469 -4.46057 1861.96 1870.44 1926.4 2111.72 2225.62 2194.2 2061.24 1889.87 1698.44 1510.02 1828.72 1711.72 1472.22 1029.33 1108.99 1174.47 973.834 938.129 779.042 802.259 906.106 614.795 714.134 732.224 598.916 1371.48 1862.45 1889.47 2041.46 2260.9 2314.12 2225.01 2055.5 1838.19 1626.28 1459.01 1348.36 1913.83 1906.38 1769.28 1449.03 1241.8 1313.66 1371.99 1081.93 1184.31 1227.64 1042.31 997.447 838.337 859.424 971.73 1497.82 1499.35 1373.84 1325.91 1408.32 1293.21 1280.12 1129.3 1243.81 1217.73 1467.38 1434.4 1455.17 1454.72 1498.08 1494.75 1337.49 1135.08 1226.56 1324.1 1410.66 1398.25 1427.58 1293.62 1361.68 1257.58 1232.61 1496.4 1487.87 1155.03 1250.39 1156.08 1241.38 1230.24 1165.55 1207.69 1133.36 -4.04254 -4.32027 -4.74737 -4.92329 -4.41381 -4.49701 -4.34717 -4.64976 -5.01464 -4.7722 -4.11751 -4.31106 -4.13445 -4.34623 -4.27141 -4.51183 -4.27853 -4.46314 -4.69788 -4.49962 -4.12902 -4.34095 -4.35812 -4.47958 -4.11512 -4.26732 -4.02854 -4.23385 -4.19626 -4.36013 -4.21817 -4.40151 -4.38132 -4.55745 1913.55 1862.34 1889.27 2041.4 2260.93 2314.27 2225.39 2055.99 1839.02 1627.2 1459.99 1905.73 1769.23 1449.58 1242.78 1314.25 1372.72 1082.09 1184.42 1227.87 1042.62 997.867 839.363 859.864 972.575 1349.91 1929.59 1897.09 1987.19 2275.08 2428.9 2402.33 2265.16 2035.84 1788.15 1583.3 1463.14 1434.73 2041.69 2021.2 1573.07 1610.89 1689.89 1493.19 1514.98 1324.68 1373.07 1462.07 1139.46 1252.5 1282.69 1110.78 1325.15 1411.14 1400.61 1428.45 1296.09 1363.49 1259.42 1237.52 1497.06 1489.92 1159.62 1251.71 1160.91 1243.12 1229.47 1167.77 1208.63 1133.83 1299.21 1279.57 1258.61 1231.89 1197.15 1229.57 1226.77 1263.95 1251.72 1220.58 1247.71 1149.51 -4.69876 -4.13522 -4.34373 -4.36822 -4.48416 -4.49315 -4.12373 -4.27002 -4.03487 -4.235 -4.21851 -4.36741 -4.23272 -4.40605 -4.38955 -4.56027 -5.08733 -4.51572 -4.77726 -4.3422 -4.59111 -4.1859 -4.16443 -4.2581 -4.33702 -4.30671 -4.32916 -4.34722 -4.48424 -4.36749 -4.51856 2041.08 1929.51 1897 1987.13 2275.08 2428.96 2402.54 2265.44 2036.43 1788.99 1584.42 1464.06 2021.64 1573.61 1611.38 1690.86 1493.95 1515.23 1324.53 1373.4 1462.46 1139.9 1254.81 1283.32 1111.66 1432.89 2111.97 1974.52 2011.57 2276.6 2545.44 2596.61 2503.99 2289.23 2019.95 1755.46 1602.43 1545.59 1558.16 2233.24 1909.9 1717.23 1797.98 1824.25 1654.12 1722.69 1785.13 1595.32 1566.91 1397.58 1426.9 1539.52 1300.7 1283.41 1260.47 1236.65 1202.71 1234.62 1228.81 1265.87 1250.81 1221.73 1248.2 1147.72 1291.73 1268.48 1218.92 1248.71 1286.4 1239.3 1354.15 1293.02 1324.15 1251.26 -5.08871 -4.5129 -4.35087 -4.59236 -4.19445 -4.16724 -4.7744 -4.2736 -4.34272 -4.3096 -4.32936 -4.35457 -4.48724 -4.37306 -4.52061 -4.4948 -4.98107 -4.44679 -4.72522 -4.61357 -4.48151 -4.16409 -4.40202 -4.25251 -4.2883 -4.27232 -4.36064 -4.47974 -4.38628 -4.48134 2234.07 2111.45 1974.48 2011.6 2276.58 2545.44 2596.69 2504.11 2289.55 2020.58 1756.59 1603.77 1545.85 1910.09 1718 1798.69 1824.95 1654.43 1723.05 1785.35 1596.48 1567.32 1399.08 1427.48 1539.99 1557.66 2418.14 2211.39 2146.31 2340.87 2651.73 2808.2 2768.2 2593.25 2313.07 2005.84 1781.58 1673.86 1671.5 1425.23 1314.95 1470.94 1432.26 1545.34 1440.73 2016.36 2028.11 2127.56 1926.07 2028.84 1843.08 1911.5 1956.62 1700.24 1800.46 1825.27 1674.45 1293.46 1272.85 1224.71 1253.86 1288.21 1241.31 1355.18 1296.86 1325.24 1254.92 1291.84 1317.12 1354.25 1401.42 -4.50617 -4.98371 -4.44717 -4.73087 -4.6094 -4.30194 -4.27617 -4.48462 -4.17136 -4.40451 -4.25923 -4.36201 -4.48033 -4.38349 -4.48107 -4.78233 -3.78069 -4.19917 -5.08477 -4.32158 -4.5528 -4.41 -4.22111 -4.10505 -4.30292 -4.05231 -4.4946 -4.1774 -4.40114 -4.2487 -4.74637 -4.8329 2418.33 2016.62 2028.38 2127.42 1927.06 2210.88 2146.14 2340.89 2651.68 2808.24 2768.28 2593.41 2313.41 2006.65 1783.07 1675.4 1669.16 2029.3 1842.69 1911.53 1957.26 1700.68 1803.73 1826.13 1675.24 1425.77 1316.62 1472.12 1438.47 1546.52 1444.76 2629.99 2373.25 2107.1 2232.08 2197.74 2455.42 2521.93 2800.09 3034.32 3047.95 2930.01 2666.99 2342.14 2046.3 1855.84 1778.77 1851.15 1479.86 1434.86 1539.31 1496.2 1593.54 1513.35 2147.57 2187.04 2276.31 2066.38 2061.25 1924.59 1945.24 2042.58 1298.22 1318.94 1356.8 1402.37 1411.4 1465.34 -4.79004 -3.78789 -4.20047 -5.0891 -4.32833 -4.55551 -4.40693 -4.22164 -4.10877 -4.3042 -4.05507 -4.76357 -4.83875 -4.49853 -4.19969 -4.40738 -4.25991 -3.21327 -3.58808 -3.5108 -4.01569 -4.23797 -2.85526 -4.09707 -4.6298 -4.62372 -4.06116 -3.8224 -3.94154 -3.92776 -4.24715 -4.14205 -4.32128 -4.09841 2628.55 2374.37 2108.09 2232.89 2199.32 2148.58 2188.55 2277.13 2068.81 2454.99 2521.85 2800.05 3034.38 3048 2930.1 2667.15 2342.59 2047.4 1857.75 1779.61 1851.15 2061.99 1927.17 1946.08 2044.32 1480.56 1436.79 1540.92 1499.6 1594.69 1517.53 3002.24 2914.73 2550.25 2277.41 2403.44 2405.91 2866.89 3048.65 3281.62 3374.34 3281.19 3073.9 2751.43 2400.48 2133.15 1966.51 1944.27 2151.27 1576.32 1532.06 1697.48 1637.27 1742.65 1639.42 2179.32 2261.46 2293.51 2157.34 1413.85 1466.13 -3.22512 -3.58839 -3.51593 -4.02363 -4.24097 -2.86328 -4.09405 -4.63662 -4.62699 -4.06161 -3.82433 -3.94215 -3.93006 -4.25133 -4.15566 -4.325 -4.11107 -2.2818 -4.14356 -3.82323 -3.143 -4.32941 -5.63629 -5.78248 -2.57904 -3.74436 -3.67118 -3.78765 -3.62043 -4.14522 -3.97988 -4.05671 -4.03323 3004.54 2913.2 2551.64 2276.65 2403.59 2409.15 2180.36 2266.64 2295.23 2159.66 2866.57 3048.54 3281.71 3374.36 3281.24 3073.98 2751.64 2401.1 2134.63 1968.45 1946.05 2152.69 1577.55 1535.37 1698.82 1641.44 1743.84 1642.73 2792.73 2970.39 2631.06 2755.42 3354.99 3328.78 2594.38 2385.44 2435.97 2524.22 3397.41 3593.75 3713.04 3671.2 3496.45 3216.57 2849.93 2520.98 2269.5 2155.26 2176.26 2201.09 2040.83 2063.84 2040.54 1767.42 1888.75 1832.58 1749.96 -2.28714 -4.14762 -3.81995 -3.1437 -4.33187 -5.62592 -5.77847 -2.5924 -3.74511 -3.66983 -3.78738 -3.62337 -4.15001 -3.99764 -4.06226 -4.04792 -1.75764 -1.00336 -1.05671 -0.433853 -0.386298 -3.79243 -3.63509 -3.59646 -3.41243 -3.56751 -3.46088 -3.04299 -3.87259 -3.91517 -3.80944 -3.81514 -3.88743 -3.75825 2796.38 2972.03 2636.19 2757.81 3353.84 3328.08 2595.78 2389.72 2437.65 2526.45 3397.13 3593.81 3713.05 3671.22 3496.5 3216.64 2850.15 2521.8 2271.36 2156.18 2184.47 2200.28 2045.4 2064.76 2043.31 1772.36 1890.37 1834.36 1755.56 3656.71 2877.01 3061.75 2734.42 2977.92 3770.28 3822.27 3945.02 4065.42 4066.61 3936.24 3700.4 3370.1 3002.56 2674.49 2472.97 2432.43 2604.35 2302.91 2182.43 1986.5 2023.29 2233 2195.9 -1.76445 -1.00425 -1.05772 -0.435394 -0.388833 -3.79561 -3.63112 -3.59724 -3.41269 -3.56758 -3.46377 -3.04642 -3.87483 -3.92692 -3.81357 -3.82975 -3.89198 -3.76919 0.584282 -3.74301 0.870482 0.914827 1.31046 1.28056 -0.224759 -3.52616 -3.36086 -3.50722 -3.3991 -3.36819 -2.88458 -3.11945 -3.2718 -3.67563 -3.60071 -3.62932 -3.64291 -2.97125 -3.85974 -3.14504 -0.108381 -4.40304 3658.79 2882.09 3063.73 2738.94 2980.3 3769.52 3822.02 3944.91 4065.44 4066.61 3936.26 3700.42 3370.23 3002.92 2675.9 2474.5 2430.55 2601.13 2303.69 2186.78 1992.4 2234.43 2025.29 2198.4 4112.87 3502.61 3190.81 3317.54 3294.98 3014.73 3177.24 4232.14 4322.67 4422.15 4443.92 4364.77 4182.69 3904.19 3556 3195.1 2911.85 2773.39 2846.83 2499.14 2767.87 2502.05 2608.67 2508.5 2463.59 0.580139 -3.75126 0.870995 0.914983 1.30922 1.27839 -0.221125 -3.52611 -3.36034 -3.50681 -3.40001 -3.36652 -2.89155 -3.11766 -3.27085 -3.67918 -3.61326 -3.63353 -3.65264 -2.99084 -3.87459 -3.14923 -0.105459 -4.42151 4.219 -1.95298 -4.132 3.16652 3.24955 3.42139 3.34209 2.89272 -3.61083 -3.61544 -3.5562 -3.58488 -3.52428 -3.55049 -3.38743 -3.36553 -3.25618 -4.39628 -3.42154 -3.28831 -3.44764 2.9788 -4.18508 4113.06 3503.33 3195.58 3319.49 3298.1 3022.91 3179.69 4231.15 4322.6 4422.12 4443.93 4364.76 4182.7 3904.21 3556.2 3195.82 2913.68 2776.11 2841.65 2499.7 2765.55 2504.4 2608.34 2509.99 2467.28 4324.54 4524.2 3603.6 3269.6 3433.87 3409.12 4668.59 4765.67 4809.41 4766.25 4637.33 4418.74 4126.6 3782.91 3454.72 3229.64 3179.09 3358.37 2778.32 2921.2 2770.11 2804.07 2699.39 2659.16 4.21513 -1.964 -4.15229 3.1688 3.25062 3.42158 3.34249 2.89743 -3.61107 -3.61592 -3.56656 -3.5877 -3.52673 -3.55396 -3.38871 -3.37281 -3.28 -4.40476 -3.42694 -3.31715 -3.45764 2.98167 -4.20362 9.63904 5.66852 5.56138 3.18548 -0.233765 -1.99397 5.70842 5.81928 5.92193 -3.66056 -3.60472 -3.52013 -3.5307 -3.71522 -4.70711 -3.85142 -3.65349 -3.81931 -3.61612 -3.61256 6.13443 -3.61237 4322.5 4524.19 3604.11 3270.23 3433.96 3409.9 4668.36 4765.87 4809.46 4766.13 4637.34 4418.76 4126.64 3783.35 3456.11 3232.08 3181.8 3352.99 2778.78 2920.74 2772.66 2804.58 2700.89 2663.92 4483.81 4739.67 4929.67 3756.78 3365.36 3585.09 3509.97 5061.13 5135.04 5135.86 5053.02 4895.43 4658.97 4369.53 4055.28 3793.44 3665.86 3709.06 3178.86 3311.57 3510.51 3190.51 3098.81 3146.05 2985.57 3041.81 9.6363 5.67015 5.56461 3.16284 -0.259519 -1.99665 5.7152 5.8217 5.92888 -3.66023 -3.60645 -3.52304 -3.53991 -4.70687 -3.72092 -3.85355 -3.66883 -3.82526 -3.62553 -3.61479 6.13909 -3.63223 17.1001 8.15267 10.2919 10.4688 7.99569 11.0379 10.3319 18.1308 15.0127 8.18532 8.3226 8.55976 -3.73478 -3.69382 -3.85931 -3.93329 -4.09151 -3.93405 -4.16869 -3.88064 -3.94292 -4.02599 -4.06934 -3.99389 -3.88906 -3.93031 -3.7712 -3.82959 8.83986 3.60842 -3.98064 -4.10018 4480.53 4738.1 4929.76 3758.07 3367.38 3584.82 3508.32 5061.47 5135.15 5135.75 5053.08 4895.42 4659.07 4369.74 4056.34 3795.78 3669.13 3709.75 3178.4 3310.9 3507.9 3186.79 3101.28 3146.79 2989.66 3043.32 4616.84 3762.26 3521.18 4913.97 5121.2 5293.21 3408.56 3582.79 5402.78 5450.69 5423.93 5324.15 5151.93 4917.61 4654.85 4394.56 4214.77 4192.11 4319.26 3500.79 3539.42 3694.8 3522.8 3348.67 3389.48 17.1021 8.1537 10.2912 10.469 7.99668 11.0009 10.33 18.0659 14.9731 8.19164 8.32461 8.57119 -3.73487 -3.69882 -3.8603 -4.09104 -3.92606 -4.16644 -3.88127 -3.94708 -4.01655 -4.06578 -3.92837 -3.98495 -3.89073 -3.92709 -3.77308 -3.82741 8.8456 3.55889 -3.9677 -4.09397 30.2366 14.5074 12.4616 12.6912 14.2496 27.2567 10.4834 10.6013 29.0872 50.2741 66.3171 54.2759 10.7321 -3.94456 -4.02697 -4.0597 -4.17696 -4.14579 -3.98849 -3.98616 -4.07487 -3.87353 -3.96883 10.9202 8.66686 17.9302 23.9803 8.98968 -3.73936 -4.00557 -4.07904 -3.34445 4618.54 3762.97 3522.78 4911.59 5121.1 5293.66 3405.93 3582.34 5402.8 5450.64 5424 5324.14 5151.91 4917.76 4655.27 4396.97 4218.33 4191.29 4312.18 3504.5 3540.76 3694.43 3522.93 3353.47 3391.21 4222.66 5022.57 4703.86 5278.46 5468.85 5616.32 3297.05 3436.71 5704.35 5733.55 5696.85 5590.25 5425.3 5208.62 4978.84 4793.85 4713.93 4804.42 4091.44 4457.38 4027.21 4166.37 3737.98 3811.62 3943.49 3895.66 30.2289 14.5117 12.4562 12.6911 14.2569 27.1991 10.4831 10.6022 29.1634 50.3683 66.2107 54.2138 10.7492 -3.93959 -4.01309 -4.0484 -4.13846 -4.16753 -3.98355 -3.96925 -4.06143 -3.87858 -3.96549 10.9261 8.63253 17.8315 23.8758 8.92904 -3.73579 -3.98283 -4.06925 -3.32485 62.6676 15.9721 18.1962 18.7506 15.7552 61.6372 14.3013 12.5172 12.6375 14.1703 59.994 105.717 145.58 123.26 87.4827 12.6368 -4.05906 -4.00913 -4.18533 -4.08217 12.7394 25.7371 -1.34506 29.6213 40.7411 20.1991 -0.809701 -4.22978 -4.08275 4221.97 5022.49 4702.15 5277.96 5469.3 5616.42 3305.92 3439.01 5704.34 5733.42 5696.87 5590.22 5425.33 5208.77 4980.29 4797.65 4718.18 4793.56 4101.53 4457.22 4032.4 4167.51 3746.13 3814.48 3945.92 3901.85 3285.5 3497.32 3266.79 3469.46 4286.06 5388.02 5110.32 4751.03 5614.56 5784.08 5909.33 5981.95 6003.03 5964.97 5870.79 5716.58 5528.6 5365.14 5252.38 5241.17 5358.38 4419.06 4583.99 4320.56 4379.28 4188.36 4120.67 62.6331 15.9787 18.1851 18.7477 15.7661 61.6195 14.3039 12.516 12.6379 14.176 60.1224 106.121 145.789 123.11 87.178 12.6569 -3.9928 -4.04718 -4.07422 -4.17686 12.7447 25.6862 -1.35311 29.5597 40.667 20.1068 -0.823931 -4.21807 -4.06052 121.684 65.2102 27.3 27.764 59.1492 113.027 15.6239 16.6038 16.8387 15.4597 107.338 14.2393 14.2419 177.171 222.755 208.273 159.143 78.762 93.1916 112.925 134.772 27.7651 2.51013 42.3633 54.8615 21.9308 4.1604 3288.36 3498.57 3273.59 3471.95 4285.42 5110.23 5388.84 4749.32 5614.95 5784.42 5909.54 5981.98 6003.13 5964.96 5870.76 5716.87 5529.33 5368.29 5258.03 5243.97 5355.58 4424.41 4585.69 4328.25 4381.95 4192.44 4130.69 3832.73 3135.58 3283.47 3098.86 3329.9 4283.41 5728.91 5485.58 5182.97 4736.39 5925.81 6075.36 6185.02 6250.71 6270.6 6241.95 6159.28 6037.5 5888.02 5776.51 5753.64 5791.53 5140.29 4848.12 4980.26 4934.57 4737.95 4777.66 121.718 65.2056 27.2115 27.7343 59.0501 113.092 15.6279 16.5981 16.838 15.4684 107.498 14.2403 14.2411 177.66 223.038 208.331 158.838 79.1873 93.3997 113.986 134.962 27.771 2.4832 42.6347 55.0184 21.9482 4.10768 268.107 100.579 119.374 124.126 94.7035 220.976 40.8542 19.8914 19.6571 40.4546 203.514 15.4446 16.3917 16.5197 15.4142 283.115 355.544 304.24 231.022 193.715 100.69 112.605 128.837 142.325 51.2107 58.6936 3836.75 3137.33 3285.09 3104.24 3333.09 4281.47 5486.43 5182.19 5729.86 4735.34 5926.5 6075.71 6185.29 6250.9 6270.64 6241.92 6159.36 6038.01 5890.48 5781.46 5757.33 5785.94 5139.39 4848.21 4980.14 4935.37 4741.47 4779.3 3799.91 3089.94 2916.24 3096.4 2894.58 2978.41 3051.39 4202 6042.89 5827.72 5568.5 5210.8 4693.73 6218.41 6353.33 6455.92 6520.13 6546.21 6526.84 6469.57 6370.52 6278.7 6241.32 6302.42 5354.24 5221.01 5670.33 5114.92 5298.54 5123.73 5176.8 5257.26 268.695 100.623 119.452 124.168 94.7917 221.624 40.8145 19.8473 19.642 40.333 203.934 15.4467 16.4015 16.5227 15.4163 283.904 356.193 304.409 230.756 193.123 101.375 112.999 129.464 142.341 51.6829 58.7195 557.835 254.91 172.205 178.485 249.785 455.022 96.767 136.002 140.081 91.0717 415.001 36.5781 19.8637 19.3358 39.4342 474.291 537.36 477.266 347.19 253.566 204.692 119.948 129.603 139.775 149.739 87.6942 95.1212 3798.53 3092.01 2919.58 3098.05 2898.14 2980.8 3052.69 4200.68 5828.44 5568.65 5210.32 6044.02 4693.1 6219 6353.67 6456.06 6520.22 6546.41 6526.79 6469.46 6372.06 6282.86 6246.99 6299.19 5351.64 5227.33 5666.8 5113.63 5300.27 5126.88 5177.66 5263.33 3347.67 3651.24 2916.02 2818.78 2965.27 2746.54 2822.82 2887.83 4084.1 6339.17 6141.79 5911.78 5616.2 5214.11 4653.48 6500.61 6628.93 6729.22 6797.71 6831.01 6827.62 6793.14 6736.15 6687 6699.92 6751.29 5505.91 5509.79 5729.19 5434.91 5571.58 5502 559.033 255.181 172.273 178.593 250.271 456.402 96.8147 136.208 140.173 91.1839 416.365 36.53 19.8498 19.3223 39.3457 475.716 538.375 477.611 347.214 252.927 204.347 121.228 129.813 140.989 149.955 88.9654 95.6264 841.893 355.889 467.461 483.365 347.89 745.768 241.549 189.262 188.009 247.525 717.83 91.1694 146.102 149.588 90.3691 742.249 775.005 715.019 545.57 370.966 263.45 172.197 186.523 156.717 164.866 139.476 144.792 127.427 130.858 3347.08 3649.92 2916.44 2819.06 2965.58 2746.01 2827.72 2889.75 4083.35 6142.85 5911.89 5616.37 5213.83 6339.79 4653.22 6501.14 6629.09 6729.32 6797.85 6830.99 6827.4 6794.04 6739.13 6693.24 6701.41 6741.32 5507.09 5516.82 5730.86 5440.04 5573.89 5508.56 3009.83 3162.46 3463.62 2671.68 2663.48 2760.76 2562.26 2650.64 2688.31 4004.62 6626.72 6440.3 6226.71 5969.07 5644.08 5197.36 4622.69 6781.2 6906.7 7010.23 7085.38 7130.17 7144.81 7133.38 7103.29 7109.06 7188.01 5922.2 6136.44 5975.76 6460.34 5784.61 5844.5 5906.67 5697.96 842.937 356.327 468.304 484.087 348.656 746.804 241.598 189.391 188.099 247.67 719.292 91.2488 146.496 149.752 90.5018 743.777 776.311 715.536 545.436 370.767 262.364 172.8 186.65 155.792 164.408 140.955 145.412 129.303 131.073 1082.96 723.687 582.619 608.672 687.381 1038.62 333.297 459.398 461.715 340.074 1025.8 275.817 205.904 208.411 277.496 1031.64 1065.69 998.253 824.801 597.051 401.264 281.731 181.643 190.901 164.572 147.672 169.107 150.351 3009.37 3161.5 3462.94 2672.56 2663.65 2761.11 2563.03 2653.98 2689.61 4004.26 6440.74 6227.31 5969 5644.12 5197.19 6627.3 4622.61 6781.47 6906.81 7010.27 7085.15 7130.18 7145.5 7135.96 7108.36 7115.31 7174.67 5932.2 6138.67 5987.82 6459.33 5787.13 5855.96 5910.67 5704.2 2710.92 2541.37 2438.37 2790.74 2939.77 3347.14 2518.4 2606.31 2502.46 2535.07 4013.56 6913.69 6732.3 6527.76 6289.41 6009.95 5640.58 5156.5 4575.87 7065.9 7192.69 7301.19 7385.77 7444.12 7475.71 7480.47 7491.51 7529.98 7556.95 6205.38 6268.86 6263.54 6501.31 6057.02 6120.41 1084.18 724.28 583.227 609.269 688.214 1039.36 333.39 459.76 462.154 340.376 1026.57 275.948 206.36 208.591 277.758 1032.97 1066.61 998.725 824.688 596.913 400.985 281.577 181.775 190.674 164.4 147.29 168.593 149.75 1321.97 822.76 879.793 930.231 778.855 1299.28 700.582 579.355 588.476 685.999 1297.02 358.823 479.495 476.182 365.743 1311.93 1336.38 1298.35 1131.64 874.511 631.014 454.194 239.19 257.989 345.101 298.247 195.308 206.507 170.128 176.552 2711.22 2542.54 2440.16 2790.27 2939.25 3346.77 2519.63 2606.85 2504.13 2535.94 4013.47 6732.68 6528.06 6289.68 6009.91 5640.53 5156.42 6914.05 4575.85 7066.06 7192.73 7301.12 7385.66 7444.7 7477.74 7485.88 7498.63 7530.07 7549.22 6209.44 6270.45 6267.63 6502.47 6065.01 6124.35 2465.95 2388.6 2200.19 2292.43 2301.12 2554.04 2590.68 2810.76 3387.05 2376.58 2457.19 2359.87 2387.84 4036.07 7205.06 7024.59 6824.82 6596.03 6338.39 6016.68 5600.66 5072.25 4478.05 7359.35 7489.97 7604.97 7699.52 7770.44 7814.51 7846.23 7852.37 7948.2 6780.37 6760.81 6997.77 6642.49 6369.61 6518.23 6549.02 6637.98 1323.19 823.425 880.779 930.866 779.889 1300 701.322 580.128 589.145 687.219 1297.7 358.899 480.483 476.558 366.021 1313.08 1337.12 1298.67 1131.6 874.308 630.581 454.221 239.604 258.142 345.063 298.458 195.175 205.265 170.484 176.043 1570.68 1143.09 976.931 1032.72 1077.01 1536.89 795.914 872.054 889.828 779.374 1545.25 695.109 591.382 596.564 690.942 1567.56 1594.23 1571 1443.72 1169.22 901.82 690.958 550.966 283.099 292.841 378.242 349.736 227.307 236.179 2466.84 2389.34 2199.46 2292.26 2301.35 2553.23 2590.35 2810.5 3386.97 2377.22 2457.78 2362.34 2388.85 4036.01 7025.02 6824.96 6596.18 6338.42 6016.66 5600.62 5072.23 7205.28 4478.05 7359.43 7489.93 7604.87 7699.93 7772 7819.28 7854.23 7859.71 7938.27 6780.06 6756.39 6995.03 6641.51 6381.56 6522.29 6557.27 6640.78 2263.36 2112.35 2093.16 2201.4 2001.29 2405.12 2259.65 2334.24 2404.21 2478.37 2839.5 3478.66 2234.82 2263.68 3994.16 7504.4 7322.55 7123 6899.03 6649.15 6354.84 5986.03 5512.65 4944.49 4311.71 7662.55 7799.53 7920.13 8023.27 8104.11 8170.23 8213.43 8196.52 7513.95 6919.5 7205.1 6980.36 6921.57 7021.36 7062.01 6815.31 1572.4 1143.87 977.399 1033.35 1077.98 1537.7 796.624 872.778 890.478 780.636 1545.82 695.935 593.094 597.421 692.253 1568.06 1594.59 1571.15 1443.51 1169.01 901.668 690.341 550.562 284.121 293.233 378.633 350.468 228.048 235.93 1817.26 1248.36 1279.97 1363.74 1174.03 1756.27 1085.44 964.534 985.775 1059.11 1761.98 777.584 858.526 857.3 777.008 1799.43 1831.8 1813.3 1722.7 1478.91 1181.13 949.001 777.98 546.899 630.549 481.823 518.222 327.611 336.907 419.379 408.655 2264.25 2113.1 2094.5 2202.12 2002.61 2404.52 2259.84 2334.88 2404.02 2478.2 2839.36 3478.56 2239.23 2265.16 3994.15 7322.8 7123.38 6899.13 6649.19 6354.83 5986.02 5512.63 4944.49 7504.53 4311.73 7662.54 7799.47 7920.34 8024.95 8108.29 8177.96 8221.92 8211.16 7507.22 6907.07 7198.2 6971.4 6923.18 7029.4 7065.1 6819.32 2049.9 2017.69 1809.12 1919.77 1904.23 2286.12 2104.93 2147.26 2215.67 2038.74 2314.78 2332.15 2477.67 2971.49 3514.92 2120.99 2145.47 3874.49 7815.24 7629.2 7428.7 7204.88 6957.89 6676.88 6339.36 5910.89 5383.18 4755.92 4084.46 7977.05 8118.52 8246.17 8356.62 8451.49 8533.14 8609.61 8684.67 7474.02 7149.64 7230.17 7209.66 1819.01 1249.36 1281.49 1364.88 1175.29 1757.04 1086.23 965.495 986.582 1060.49 1762.42 778.332 860.264 858.299 778.041 1799.77 1831.88 1813.16 1722.34 1478.67 1181.19 948.807 776.423 549.178 630.707 483.019 518.516 328.599 337.116 419.62 409.665 1597.5 1387.06 1478.12 1497.96 1960.56 1189.21 1259.86 1298.79 1156.72 1944.79 1038.16 943.425 944.934 1034.38 1982.09 2026.81 2024.01 1957.4 1761.22 1458.32 1211.63 1008.18 866.604 598.084 646.901 535.661 547.95 459.905 448.441 2051.68 2018.3 1810.08 1920.63 1905.03 2285.53 2105.61 2147.91 2216.34 2040.25 2314.67 2332 2477.56 2971.36 3514.91 2124.31 2146.72 3874.51 7629.49 7428.93 7205.01 6957.93 6676.89 6339.35 5910.88 5383.19 4755.97 7815.24 4084.53 7977.01 8118.88 8247.62 8360.4 8459.57 8542.01 8612.01 8672.01 7472.46 7155.78 7231.82 7206.98 1709.17 1706.92 1817.73 1603.97 2141.32 1993.9 1825.46 1883.61 1932.29 2278.26 2035.63 2011.99 2286.66 2318.84 2591.6 3088.35 3456.5 3680.12 8136.75 7948.79 7743.09 7518.62 7271.38 6995.79 6676.63 6284.82 5796.91 5197.92 4513.47 3807.74 8302.44 8449.17 8580.42 8699.2 8810.4 8917.42 9011.25 7621.15 7880.14 7536.36 7689.67 7586.51 7310 7440.91 7500.1 1598.58 1388.28 1479.19 1499.83 1960.91 1189.87 1260.63 1299.41 1157.93 1945.07 1039.29 946.104 946.29 1036.09 1982.29 2026.7 2023.64 1956.81 1760.95 1458.52 1211.65 1007.67 865.288 599.693 647.353 536.82 548.364 460.292 449.621 1529.85 1368.85 1411.56 1482.31 2091.76 1135.33 1227.19 1239.07 1127.76 2114.92 2164.56 2190.49 2157.22 1991.85 1724.07 1462.97 1238.66 1056.59 902.474 733.107 780.627 799.056 658.703 676.885 581.702 593.884 1710.31 1709.2 1818.92 1606.12 2141.28 1994.57 1826.71 1884.51 1933.38 2277.99 2036.62 2014.25 2286.65 2318.86 2591.55 3088.33 3456.52 3680.18 7948.7 7743.31 7518.73 7271.4 6995.8 6676.63 6284.8 5796.9 5198.08 4513.62 8136.74 3808.01 8302.75 8450.36 8583.91 8706.57 8820.06 8920.34 8997.64 7619.09 7875.76 7533.89 7686.17 7586.11 7318.7 7443.21 7500.25 1650.9 1713.95 1768.88 1598.42 2202.13 1924.94 1787.61 1814.46 1900.5 2278.14 2277.48 2384.66 2764.51 3097.85 3317.14 3433.95 8469.34 8278.05 8069.1 7842.44 7592.43 7319.53 7010.23 6643.61 6191.42 5631.61 4959.48 4223.11 3470.93 8637.56 8786.67 8927.01 9058.24 9185.73 9293.13 7718.78 7996.55 7823.68 8113.52 7869.17 7909.11 7665.67 7786.7 1530.98 1370.36 1412.49 1484.66 2091.8 1136.05 1229.58 1239.91 1129.34 2115.08 2164.28 2189.64 2156.4 1991.51 1724.29 1463.17 1238.49 1058.27 902.077 733.703 780.931 799.219 660.749 677.473 583.425 594.425 1465.1 1332.6 1350.28 1445.01 2203.61 2238.97 2292.12 2312.97 2187.97 1950.17 1692.55 1460.52 1268.43 1142.87 905.469 788.295 805.731 849.457 1652.01 1715.97 1770.03 1601.01 2201.98 1926.03 1792.12 1815.95 1903.39 2278.13 2277.51 2384.64 2764.46 3097.88 3317.23 3434.18 8278.03 8068.99 7842.55 7592.44 7319.55 7010.26 6643.59 6191.39 5631.54 4959.71 4223.36 8469.67 3471.35 8638.78 8790.16 8933.79 9067.48 9189 9275.21 7717.64 7993.26 7823.4 8110.59 7874.73 7910.33 7667.18 7785.23 1583.66 1675.12 1700.29 1560.46 2253.13 2283.46 2326.32 2551.96 2841.6 3021.58 3115.68 3128.07 8810.78 8616.44 8403.61 8174.78 7924 7651.44 7347.3 6998.47 6575.9 6055.47 5412.49 4675.31 3876.9 3116.23 8981.72 9133.75 9283.04 9432.06 9579.15 8056.59 8365.82 7927.42 8225.58 8022.78 8063.55 8136.62 8190.83 1466.58 1336.33 1351.59 1448.66 2203.7 2238.69 2290.8 2311.58 2187.46 1950.44 1693.04 1460.53 1268.21 1141.38 905.897 788.481 805.79 850.423 2274.54 2321.43 2405.87 2345.24 2134.52 1897.63 1662.56 1465.48 1316.43 1031.18 1103.69 951.997 1016.2 935.109 910.128 1585.05 1678.79 1701.84 1563.73 2253.12 2283.34 2326.16 2551.9 2841.61 3021.68 3115.9 3128.55 8617.04 8403.64 8175.05 7924.03 7651.4 7347.51 6998.5 6575.87 6055.43 5412.49 4675.6 3877.33 8812.55 3117.16 8985.43 9140.73 9291.43 9434.13 9550.79 8067.2 8365.26 7930.71 8223.87 8020.38 8062.56 8138.74 8191.48 2285.76 2315.05 2442.67 2669.27 2802.97 2867.55 2850.63 2801.22 9161.55 8965.06 8750.63 8515.79 8264.53 7992.97 7693.01 7353.8 6954.42 6472.25 5868.47 5152.65 4335.21 3509.48 2819.53 9332.89 9491.5 9654.63 9841.38 8174.95 8503.1 8198.5 8759.65 8337.46 8418.51 8231.09 8291.42 8255.31 8363.36 2274.25 2320.32 2404.55 2344.54 2134.69 1898.27 1662.98 1464.8 1315.31 1033.2 1104.18 953.978 1016.75 935.765 911.683 2316.9 2421.28 2449.12 2286.45 2066.96 1843.76 1640.95 1491.94 1096.36 1177.42 1135.47 1278.07 1104.55 1116.21 1023.27 1046.89 2285.52 2314.9 2442.56 2669.27 2803.06 2867.82 2851.1 2802.19 8967.34 8751.59 8516.07 8264.81 7993.06 7692.96 7354.06 6954.41 6472.19 5868.49 5152.75 4336 3510.42 9165.51 2821.2 9339.85 9500.93 9660.65 9821.14 8178.45 8502.65 8208.17 8759.66 8354.01 8424.14 8237.96 8293.74 8262.98 8366.24 2310.74 2393.03 2562.87 2656.66 2688.72 2645.03 2563.63 2520.57 9519.88 9324.39 9105.23 8868.9 8614.75 8342.25 8043.98 7713.83 7332.99 6881.84 6320.51 5643.48 4844.41 3977.07 3180.34 2550.97 9692.34 9858.11 10031.9 10085.7 8430.75 8567.86 8433.95 8720.67 8468.31 8580.92 8360.33 8467.68 2316.17 2420.06 2448.31 2286.52 2067.56 1844.49 1640.77 1489.17 1100.35 1178.58 1142.7 1279.57 1105.19 1116.56 1024.4 1047.16 2397.95 2490.89 2398.11 2207.91 1999.23 1795.78 1631.99 1506.35 1164.69 1177.3 1180.42 1255.51 2310.39 2392.85 2562.83 2656.75 2688.99 2645.48 2564.47 2522.14 9328.94 9107.7 8870.53 8615.22 8342.8 8044.4 7713.44 7333.1 6881.85 6320.72 5644.02 4845.16 3978.46 3182.26 9527.35 2553.36 9702.26 9866.35 10027.9 10082.9 8451.4 8574.96 8451.99 8727.89 8488.73 8588.46 8372.28 8472.25 2382.5 2509.76 2568.1 2569.37 2507.67 2395.83 2306.14 2288.93 9888.81 9687.82 9469.67 9229.61 8975.26 8701.01 8403.95 8077.55 7711.91 7285.71 6769.39 6136.04 5376.96 4511.02 3642.38 2912.03 2393.21 10062.3 10227.2 10371 8877.53 8829.23 9058.97 8737.92 8601.23 8751.46 8692.35 8821.09 2397.13 2490.08 2398.02 2208.45 1999.99 1796.27 1630.86 1506.96 1167.66 1178.52 1182.94 1256.57 2492.3 2461.62 2313.04 2125.85 1931.17 1758.89 1631.97 1320.96 1290.91 1379.59 1242.94 1177.09 1191.41 1223.95 1248.49 2382.04 2509.63 2568.21 2569.66 2508.14 2396.64 2307.47 2291.11 9696.74 9474.79 9233.26 8977.5 8702.16 8404.47 8078.07 7711.85 7286.23 6769.9 6136.93 5378.27 4512.61 3644.59 2914.77 9899.79 2395.72 10071 10228.9 10364.1 8881.63 8831.1 9059.91 8745.18 8621.74 8758.7 8711.86 8829.21 2491.52 2521.16 2500.08 2424.35 2295.03 2166.48 2093.07 2147.77 10267.1 10069.9 9838.15 9598.68 9342.19 9067.67 8772.33 8447.75 8092.93 7687.27 7207.78 6622.43 5920.49 5090.01 4194.19 3366.83 2709.12 2317.82 10437 10564.3 9280.41 8940.22 9204.23 9012.25 8992.67 8900.31 9020.6 8803.2 2491.81 2461.43 2313.53 2126.57 1931.75 1758.99 1631.14 1321.74 1296.54 1381.21 1244.86 1180.34 1192.56 1225.99 1249.31 2486.3 2381.52 2218.96 2037.6 1869.23 1730.27 1544.53 1357.63 1447.46 1386.46 1321.47 1360.48 1371.68 1307.63 1259.47 1274.61 2491.22 2521.24 2500.45 2424.91 2295.84 2167.65 2094.69 2149.62 10081 9847.91 9605.38 9347.01 9070.81 8773.87 8449.37 8094.36 7688.52 7209.28 6623.72 5922.4 5092.11 4196.81 3370.07 2711.29 10276.2 2317.9 10438.9 10559.8 9279.98 8941.3 9202.76 9017.22 8997.44 8912.91 9024.35 8815.4 2498.67 2462.35 2379.96 2244.55 2092.45 1972.41 1960.46 2103.89 10660 10466.8 10221 9973.9 9717.38 9442.49 9147.48 8825.66 8477.64 8085.57 7639.12 7101.09 6453.49 5679.85 4815.11 3934.86 3175.11 2642.02 2331.39 10781.5 9355.77 9174.8 9441.47 9087.24 9304.34 9072.34 9203.38 9185.78 2486.29 2381.83 2219.74 2038.33 1869.49 1731.59 1542.59 1354.81 1446.25 1382.91 1322.26 1364.52 1373.09 1309.42 1261.61 1275.32 2419.2 2282.18 2114.19 1953.47 1824.3 1751.56 1485.12 1406.36 1417.22 1397.95 1372.78 1381.45 2498.69 2462.78 2380.58 2245.41 2093.54 1973.78 1961.43 2103.19 10472.2 10230.9 9984.02 9725.8 9448.92 9152.43 8829.37 8480.87 8088.56 7641.8 7103.85 6456.25 5683.29 4818.27 3938.28 3177.14 2640.18 10658.2 2327.97 10775.2 9355.32 9177 9440.16 9093.43 9305.81 9083.41 9205.9 9190.81 2439.62 2357.3 2227.33 2070.7 1917.74 1840.61 1918.18 2137.62 11004.4 10903.8 10614.6 10360.4 10097.8 9824.69 9531.89 9210.96 8867.11 8485.79 8060.94 7563.27 6973.03 6265.65 5458.66 4579.37 3761.33 3108.63 2653.6 2102.14 2184.17 1989.41 2063.42 9645.73 9256.35 9528.85 9370.27 9380.85 9334.03 9452.06 9270.62 2419.59 2282.98 2115.06 1954.01 1824.02 1748.39 1485.5 1406.68 1417.61 1399.38 1378.17 1383.19 2320.98 2167.7 2016.17 1893.69 1813.73 1458.99 1561.76 1438.04 1525.61 1460.27 1417.55 1425.12 1433.47 2440.05 2357.94 2228.32 2071.75 1919.03 1841.4 1916.47 2132.47 10884.9 10612.8 10368.9 10108.7 9834.85 9540.58 9218.57 8872.63 8490.37 8065.59 7567.89 6977.22 6269.93 5462.96 4583.26 3762.2 3099.69 2646.75 10995.8 2107.21 2185.46 1998.96 2066.09 9645.35 9263.46 9528.75 9376.09 9383.1 9352.07 9457.54 9276.07 2342.69 2224.21 2078.97 1915.31 1787.82 1783.88 1942.63 1749.73 1832.23 1870.73 1945.24 11194.7 9737.64 9517.27 9798.86 9454.62 11015.6 10766 10490.4 10214.7 9925.45 9608.81 9266.12 8888.22 8477.67 8013.99 7476.2 6831.86 6085.97 5261.63 4436.57 3681.73 2715.61 2705.36 2838.73 2502.52 2262.12 2351.27 2406.5 2485.08 2561.54 2696.78 2192.86 2242.63 2077.6 2142.98 9676.55 9421.79 9542.02 9575.72 2321.82 2168.76 2016.85 1893.24 1810.68 1462.57 1562.57 1440.91 1526.45 1461.46 1421.5 1426.63 1436.76 2202.64 2062.64 1949.06 1873.2 1491.43 1603.26 1485.75 1669.87 1517.63 1537.88 1482.39 1504.05 1467.34 1446.69 2343.37 2225.23 2080.11 1916.45 1788.71 1782.56 1935.89 1758.69 1835.08 1879.81 1948.46 11190.5 10980.6 10761.3 10498.8 10225.2 9936.78 9619.86 9275.11 8895.73 8484.35 8020.2 7481.68 6837.46 6092.01 5265.25 4435.73 3676.15 2711.49 2702.77 2836.88 2494.75 2263.33 2350.98 2406.92 2484.49 2558.12 2694.93 9737.13 9517.99 9797.9 9459.66 2198.92 2244.76 2086.46 2145.91 9680.36 9452.26 9551.4 9589.76 2219.49 2096.28 1946.46 1791.24 1717.32 1787.51 1649.1 1741.39 1572.74 1671.62 1851.84 1919.32 1963.97 2029.77 9897.45 9581.45 9855.79 9695.56 9822.31 9358.7 9853.68 9678.92 9778.97 9707.51 9828.96 9667.38 9499.45 11199 9854.24 10893.3 10599.2 10328.6 10021.9 9679.77 9298.46 8895.7 8451.21 7955.68 7372.66 6693.88 5931.28 5151.9 4390.18 3422.87 2972.71 3115.08 3272.79 2825.13 2884.47 2337.38 2376.84 2655.17 2501.19 2723.79 2530.92 2203.75 2063.46 1949.08 1869.86 1495.15 1604.23 1492.82 1671.04 1519.64 1538.66 1484.47 1504.85 1468.25 1449.14 2095.04 1993.7 1924.97 1865.58 1534.83 1556.86 1515.03 1608.77 1533.93 1551.18 2220.55 2097.46 1947.39 1791.96 1717.05 1782.88 1655.4 1743.15 1576.98 1672.67 1857.83 1921.31 1973.44 2032.9 9899.82 9589.98 9858.13 9703.52 9828.3 9380.74 9858.34 9696.38 9503.07 11166.2 9854.99 10889.5 10607.3 10337.8 10033 9690.59 9308.43 8904.21 8458.38 7963.02 7378.46 6699.88 5936.87 5144.85 4379.05 3421.22 2979.19 3115.32 3272.46 2829.16 2885.95 2342.11 2378.41 2658.69 2504.31 2724.7 2531.99 9780.5 9716.22 9829.73 9677.13 2105.59 1986.26 1834.85 1712.27 1708.22 1471.61 1580.1 1506.45 1609.9 1758.62 1827.28 1671.56 1723.49 9929.91 9975.97 9733.68 9870.1 9871.89 9731.56 9898.16 9744.82 9564.72 11305.5 9910.67 9657.99 9977.63 10951.3 10734.1 10457.2 10108.5 9730.55 9315.37 8884.14 8411.02 7894.42 7282.68 6549.8 5851.64 5060.04 3736.79 3872.61 4029.13 3576.03 3427.67 3117.2 3139.58 3408.42 2916.22 2965.45 2676.98 2724.7 2096.02 1993.78 1923.61 1866.05 1537.46 1557.79 1516.66 1609.46 1535.15 1551.72 2017.03 1959.03 1923.82 1644.26 1560.17 1658.82 1550.2 1555.35 1573.4 1556.77 1594.13 2106.82 1987.15 1835.09 1712.38 1705.82 1474.57 1580.74 1509.72 1610.5 1767.01 1829.61 1679.06 1726.07 9935.18 9978.04 9748.93 9874.28 9887.52 9740.22 9907.76 9772.93 9567.16 11279.9 9910.02 9657.54 9977.4 10960.5 10735.1 10460.4 10115.9 9738.09 9323.65 8890.98 8416.82 7897.04 7285.01 6558.74 5844.76 5055.32 3732.86 3864.63 4024.84 3569.07 3428.02 3120.3 3140.99 3409.46 2926.15 2968.85 2683.84 2726.97 2013.52 1893.89 1756.07 1696.08 1437.62 1548.54 1425.35 1537.94 1557.14 1595.16 1601.01 1645.59 1761.58 1835.83 1733.22 1773.51 10103.1 9969.63 9983.7 9801.16 9753.79 11480.5 10086.6 9717.29 10032.8 9882.57 10055.7 11142.5 10899.1 10576.1 10159.3 9754.43 9328.97 8836.88 8357.92 7850.52 7226.95 6517.04 5018.33 5245.66 4608.06 4997.99 4598.02 4150.37 4309.52 4487.19 4942.34 4741.74 3743.71 4017.25 4036.47 3726.36 3476.11 3183 3208.63 3449.77 2017.61 1957.96 1922.23 1644.65 1562.62 1659.35 1551.31 1556.48 1573.88 1557.47 1594.47 1964.89 1938.57 1725.22 1593.72 1698.25 1621.55 1643.84 1625.66 1663.05 1587.16 2014.49 1893.98 1755.59 1694.66 1440.85 1549.33 1429.74 1539.1 1561.15 1596.45 1605.86 1647.31 1767.1 1837.34 1741.57 1776.17 10110 9987.98 9994.39 9836.61 9798.79 11460.9 10100.8 9712.44 10031.2 9909.19 10063.7 11135.4 10882 10565.3 10156.6 9755.39 9330.81 8839.58 8362.01 7838.15 7215.6 6503.69 5024.57 5246.09 4620.01 4998.34 4601 4159.31 4311.71 4493.65 4943.98 4746.81 3744.51 4020.82 4038.16 3729.63 3477.68 3191.45 3211.53 3454.45 1941.8 1829.08 1725.1 1415.8 1523.59 1409.3 1517.84 1521.95 1556.22 1510.25 1543.9 1613.87 1639.55 1650.87 1683.91 10197.1 10030.5 9859.72 9991.13 10311 10120.1 10193.5 9772.06 10181.9 9970.19 10226.6 10184.8 9952.28 10122.2 10087.6 10284.1 11183.6 9639.55 10002.7 10907 10518.5 10245.7 9753.48 9354.6 8693.67 8356.58 7721.51 6299.87 6230.8 6468.97 5843.38 5293.54 5493.01 5571.37 5724.91 5907.28 6145.56 5100.24 5167.4 4878.36 4531.54 4235.67 4256.07 4807.77 4480.91 3712.11 3674.98 1964.69 1936.29 1724.54 1595.01 1698.18 1621.09 1643.82 1625.77 1663.17 1587.59 1942.37 1730.15 1640.23 1747.63 1631.04 1718.63 1684.11 1707.5 1703.36 1941.98 1828.01 1723 1425.19 1526.32 1415.51 1519.78 1525.82 1557.64 1516.09 1546.13 1616.87 1640.68 1656.09 1685.76 10202.7 10046 9840.28 10007.1 10172.4 9946.66 10216.8 10310.9 10106.1 10184.9 9783.5 10189.3 9967.55 10126.1 10097.8 10287 11178.8 9621.01 9995.19 10881.4 10507.1 10223.9 9749.22 9339.18 8714.13 8348.58 7710.95 6291.18 6215.25 6461.28 5830.6 5295.92 5492.05 5570.16 5721.68 5898.16 6140.54 5106.88 5169.61 4881.27 4534.57 4245.7 4259.58 4814.79 4487.99 3714.29 3681.97 1893.83 1812.96 1421.47 1524.34 1444.38 1544.89 1504.21 1535.88 1491.91 1525.01 1564.76 1585.69 1578.03 1605.26 10039.3 9928.18 10160.7 10033.3 10216.1 10259.7 10048 10344.5 10129.4 10349.6 10018.8 9613.63 9986.56 9739.95 9914.61 9404.83 9945.13 9785.01 9418.56 9399.95 9732.83 9571.58 9161.66 9696.72 10503.9 9482.94 9136.64 10173.3 9712.86 9319.94 8865.95 7111.74 7384.66 6748.14 7266.59 6732.2 6404.93 6624.51 6589.19 7116 6850.72 6248.9 6326.55 5424.88 5440.19 5933.93 5699.7 5994.46 5703.73 5091.14 5154.29 1938.53 1730.21 1646.22 1748.57 1631.94 1718 1682.44 1706.89 1701.54 1789.51 1645.02 1754.49 1614.36 1713.22 1699.23 1715.97 1698.11 1729.29 1721.1 1892.83 1810.1 1431.98 1527.48 1454.7 1547.91 1511.31 1538.78 1498.36 1527.56 1567.5 1586.68 1585.18 1607.76 10037 10257 10152.9 10037 10210.1 10337.7 9919.11 10028.3 10136.5 10351.1 10016.3 9607.19 9980.83 9736.81 9919.61 9425.34 9948.53 9804.25 9434.83 9416.54 9737.76 9577.3 9162.48 9690.6 10492.9 9480.91 9136.56 10157.4 9697.36 9303.8 8848.37 7117.28 7385.67 6760.38 7266.94 6732.11 6402.47 6621.88 6589.17 7118.36 6856.55 6243.55 6324.03 5430.19 5441.57 5933.48 5704.28 5993.49 5705.17 5098.63 5157.29 1894.53 1526.36 1631.64 1473.98 1578.53 1509.76 1541.33 1504 1538.47 1535.56 1564.12 1528.76 1557.51 10102.1 9899.33 10235.2 10085.4 9959.09 10149.2 9920.5 9930.72 9801.95 9709.55 9579.6 9407.79 9666.96 9501.64 8827.2 9434.21 9082.44 9426.8 9051.7 9343.11 9100.1 9213.58 8852.69 9127.02 8746.95 8956.34 8955.44 8396.14 8041.87 8612.1 8347.16 8563.66 8476.81 8775.01 8287.22 8053.17 8186.74 7785.2 8154.07 8478.75 7306.73 7817.81 8081.72 7554.08 7538.72 7694.86 7212.29 7308.03 6953.88 6708.02 6502.25 6530.83 6879.16 6696.7 6190.89 6283.8 5364.56 5412.52 5920.87 5979.49 1788.68 1646.89 1754.35 1613.74 1713.89 1703.74 1717.47 1700.26 1728.53 1718.48 1715.37 1696.34 1709.71 1627.27 1726 1729.49 1734.03 1720.2 1892.38 1531.75 1633.24 1483.57 1581.19 1516.84 1544.24 1510.99 1541.32 1541.98 1566.71 1536.09 1560.29 10105.5 10233.1 9889.18 10080.8 9963.07 10148.3 9935.92 9931.12 9810.13 9732.43 9603.48 9421.5 9676.24 9507.13 8837.59 9341.32 9110.21 9216.68 9435.73 9094.44 9430.58 9059.97 8859.44 9128.58 8744.32 8953.75 8947.11 8382.86 8043.07 8607.6 8353.08 8563.99 8472.83 8771.64 8155.34 8477.93 8276.81 8043.42 8182.19 7773.59 7312.86 7553.39 7541.88 7693.44 7815.13 8078.54 7222.93 7312.04 6957.52 6707.32 6507.21 6532 6888.08 6694.01 6195.33 6285.26 5372.38 5415.17 5925.61 5981.03 1568.22 1679.73 1601.85 1701.2 1586.24 1625.34 1544.34 1579.96 9965.4 9883.96 9897.81 9713.93 9651.49 9389.71 9728.55 9548.45 9338.47 9267.3 9571.31 9379.34 9021.19 9173.71 8925.99 9028.06 8786.53 8873.33 8568.86 8417.83 8664.04 8505.96 8045.05 8249.22 8174.1 8367.75 7453.85 7833.18 7918.73 7498.58 7562.49 7638.5 7098.94 7245.23 6926.08 6425.77 6524.79 6845.78 1715.48 1697.7 1710.46 1627.98 1727 1732.83 1735.16 1722.59 1700.15 1727.68 1732.66 1671.19 1572.31 1680.77 1605.2 1702.25 1590.75 1627 1550.27 1582.4 9973.28 9910.74 9908.47 9744.74 9672.69 9401.86 9736.63 9553.29 9283.45 9032.72 9384.98 9178.2 9352.78 9576.95 8934.7 9030.69 8789.32 8874.06 8575.15 8424.6 8665.95 8507.96 8259.09 8370.3 8046.55 8173.65 7468.22 7503.77 7841.26 7571.91 7919.47 7640.56 7113.59 7250.99 6930.72 6439.86 6528.59 6855.83 1644.1 1689.29 1655.21 1691.32 9582.39 9707.1 8957.18 9195.98 8937.49 9039.42 8717.27 8915.28 8549.04 8359.89 8647.2 8524.5 1700.94 1727.53 1732.64 1673.34 1698.09 1672.44 1647.58 1690.44 1658.07 1692.34 9602.2 9714.32 8969.72 9200.76 8945.8 9041.83 8727.7 8918.36 8561.47 8370.03 8651.37 8527.8 1699 1674.81 ) ; boundaryField { inlet { type calculated; value nonuniform List<scalar> 15 ( 5284.13 4630.13 3976.27 3322.24 2668.66 2014.46 1361.23 706.534 195.108 1.84706 -6.61925 -7.47878 -8.22924 -8.79187 -9.52182 ) ; } outlet { type calculated; value nonuniform List<scalar> 15 ( 1515.33 1090.38 664.986 240.332 21.1601 10.9616 2.12411 -2.36435 -4.68454 -6.10476 -7.08058 -7.81585 -8.43244 -9.00935 -9.59527 ) ; } wall1 { type calculated; value nonuniform List<scalar> 170 ( 5611.13 5629.39 5640.27 5651.53 5663.9 5676.67 5689.22 5701.46 5713.94 5727.96 5745.28 5767.62 5796.12 5830.81 5870.69 5913.91 5958.21 6001.29 6041.07 6075.8 6104.14 6125.14 6138.19 6143.01 6139.6 6128.12 6108.95 6082.66 6049.95 6011.62 5968.62 5921.87 5872.51 5821.55 5770.06 5718.95 5669.04 5621.02 5575.46 5532.83 5467.94 5388.64 5357.68 5322.77 5306.65 5298.08 5293.03 5293.09 5291.23 5271.74 16535.5 15799.5 14819.7 13793.5 12784.1 11798.7 10847.8 9936.96 9073.3 8268.95 7540.74 6898.26 6357.47 5909.92 5531.67 16862.5 16670 16350.6 16023.6 15720 15461.9 15247.6 15103.4 15049.2 15118.6 15324.3 15643.6 16065.5 16537.5 17024.4 17492 17857.8 18192.6 18463.9 18574.7 18587.5 18530.1 18152.4 17648.7 17178.2 16701 16254.8 15840.1 15432.7 15112.4 14925.3 14867.1 14907.7 15049 15268.2 15529.7 15831.1 16157.7 16477.8 16669.6 16342.6 15603 14616.3 13587.9 12578.1 11603.1 10672.8 9781.3 8939.84 8157.73 7445.68 6817.13 6285.45 5847.09 5469.9 5240.5 5165.2 5091.13 5026.99 4966.96 4903.98 4838.58 4769.14 4698.59 4626.46 4553.23 4480.22 4407.39 4335.81 4265.59 4197.5 4131.83 4068.88 4008.62 3950.58 3894.08 3838.11 3781.99 3724.74 3666.82 3609.18 3552.72 3497.71 3443.18 3386.88 3325.6 3256.34 3175.23 3081.27 2975.13 2861.31 2743.94 2621.75 2486.53 2332.39 2161.02 1988.55 1856.92 1808.09 1795.92 1795.11 1791.06 1776.54 1755.18 1727.88 ) ; } atmosphere { type calculated; value nonuniform List<scalar> 140 ( -9.81 -9.81011 -9.81 -9.81039 -9.81061 -9.81125 -9.81105 -9.81071 -9.81016 -9.81 -9.81 -9.81 -9.81002 -9.81018 -9.81032 -9.81016 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81124 -9.81392 -9.81639 -9.81787 -9.81841 -9.81839 -9.81804 -9.81752 -9.81652 -9.81556 -9.81239 -9.81041 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81157 -9.919 -10.3677 -9.94902 -10.0872 -10.1161 -10.1591 -10.0924 -9.98244 -9.90081 -9.83869 -9.81228 -9.81017 -9.81016 -9.81002 -9.81 -9.81 -9.81922 -9.95671 -9.82823 -9.86356 -9.83821 -9.81872 -9.82734 -9.827 -9.86333 -9.8846 -9.93169 -10.0275 -10.1877 -10.3698 -10.2165 -9.93002 -10.0588 -10.6794 -10.0157 -9.81252 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81 -9.81052 -9.81311 -9.81633 -9.81956 -9.82149 -9.82255 -9.8225 -9.82167 -9.82002 -9.81765 -9.81573 -9.81443 -9.81393 -9.81465 -9.81555 -9.81827 -9.82249 -9.82562 -9.82543 -9.8237 -9.82163 -9.8187 -9.81599 -9.81419 -9.81625 -9.81915 -9.82153 -9.82249 -9.81979 -9.81276 -9.81096 -9.81003 -9.81077 -9.81 -9.81 -9.81 -9.81005 -9.81 -9.81 -9.81 -9.81 -9.81 -9.87241 -9.9188 ) ; } defaultFaces { type empty; } flap { type calculated; value nonuniform List<scalar> 368 ( 2628.41 2099.19 1653.73 1209.09 846.806 469.974 140.34 16.3318 10.7035 -0.249558 2795.99 2631.75 2212.97 2217.38 2283.02 2288.21 1946.39 1948.97 2102.5 1766.09 1770.59 1822.18 1825.45 1418.98 1420.47 1657.38 1312.93 1316.49 1273.38 1275.71 855.045 856.114 1211.26 930.194 932.784 727.947 729.074 391.597 392.488 848.49 581.31 582.968 281.524 282.389 71.2402 71.2478 470.932 199.505 199.977 36.2778 36.3251 0.133027 0.133538 140.737 19.2011 19.1932 -0.159019 -0.159546 -0.959672 -0.96262 16.3416 12.605 12.6248 -1.25693 -1.26021 -2.03957 -2.04533 10.7204 2.86358 2.86809 -2.2952 -2.3005 -3.6217 -3.6307 -0.246061 -4.30693 -4.31587 3263.85 3265.78 3175.96 3176.5 2800.88 2404.75 2409.04 2665.85 2480.56 2123.33 1990.26 1678.16 1539.25 1220.27 1111.27 837.686 766.207 463.004 357.573 143.161 85.4717 16.4634 15.3839 10.8931 8.53087 -0.14385 -3.80329 2860.77 2935.87 2667.16 2482.23 2241.54 2337.99 2243.02 2340.46 2315.24 2179.22 2316.97 2181.55 1967.37 2064.44 1968.21 2066.18 2124.58 1992.51 1792.33 1878.87 1793.81 1881.75 1847.41 1696.11 1848.27 1696.88 1448.92 1561.09 1449.5 1561.55 1679.7 1542.48 1329.5 1424.27 1330.71 1427.84 1304.08 1130.58 1304.74 1131.5 880.378 990.077 880.82 990.979 1221.19 1112.63 924.397 1019.46 925.696 1021.01 752.823 611.475 753.163 612.17 412.72 501.607 413.447 502.251 838.615 767.195 579.46 680.574 580.192 681.837 298.001 181.302 298.831 181.586 66.8259 113.049 66.804 113.045 463.302 357.833 202.222 270.435 202.383 270.689 32.3797 10.9099 32.4029 10.9068 0.20504 1.30701 0.204803 1.30737 143.315 85.5795 18.9795 36.4861 18.9698 36.3986 -0.147873 -0.412451 -0.148043 -0.413427 -0.836833 -0.679837 -0.838967 -0.68168 16.4668 15.3857 12.7132 14.2112 12.7186 14.21 -1.11281 -1.56984 -1.11466 -1.57265 -2.08347 -1.83033 -2.08655 -1.83462 10.8991 8.54211 2.93496 5.892 2.93765 5.89872 -2.31435 -2.67093 -2.31708 -2.67282 -3.75483 -3.13538 -3.75475 -3.13709 -0.141106 -3.80649 -4.57955 -4.70235 -4.58399 -4.70937 3483.38 3483.07 3339.89 3339.94 2862.68 2938.22 3283.19 3248.96 3286.35 3057.67 2455.4 2537.41 2457.09 2539.62 2989.5 2997.65 3257.79 2512.93 2013.49 1561.54 1116.65 758.716 350.856 85.4334 15.4115 8.80491 -3.88761 -5.6554 -5.53739 -3.64583 -4.05562 -3.65221 -3.97459 3008.53 3052.33 2513.8 2365.7 2366.7 2201.42 2202.46 2083.38 2084.13 2014.48 1902.8 1903.89 1722.37 1722.83 1589.05 1589.46 1562.93 1443.19 1444.63 1160.03 1160.49 1017.99 1018.41 1117.57 1017.63 1018.72 635.027 635.352 523.829 524.35 759.37 676.794 677.503 187.185 187.689 111.203 111.192 350.943 270.102 270.241 7.22154 7.23024 0.951395 0.94914 85.4983 33.9975 33.9437 -0.413192 -0.413784 -0.632006 -0.63313 15.4137 14.2117 14.2127 -1.47232 -1.47247 -1.84106 -1.8423 8.81068 6.08911 6.09364 -2.65701 -2.65883 -3.13759 -3.13719 -4.3597 -4.52291 -4.22002 -4.51132 -3.8899 -5.65101 -5.52657 -4.36168 -4.53333 -4.22363 -4.51706 -4.89573 -4.07056 -4.17286 -3.64453 -4.06041 -3.65305 -3.97529 -4.90019 -4.07074 -4.1773 3009.79 3388.46 3390.74 2607.65 2609.04 2956.14 3151.94 2953.78 2710.37 3154.37 2714.85 ) ; } AMI1 { type cyclicAMI; value nonuniform List<scalar> 1024 ( 338.588 1645.03 19.8154 227.758 -4.04626 9755.47 9376.13 8922.87 7054.33 9404.24 3374.3 8074.76 1237.67 3975.97 1493.62 1737.54 1737.62 418.69 420.07 1744.73 1746.96 164.151 164.546 339.359 148.991 1448.12 1452.71 33.7186 34.0712 1360.46 1365 20.0974 -4.0655 -4.07742 318.869 319.705 -4.46385 -4.47522 128.703 -4.20889 -4.22377 -4.40569 -4.41101 -4.12235 -4.10446 -4.44328 -4.03527 -3.59358 -3.60406 -3.8332 -3.63939 -3.85255 -4.18103 -3.98028 -4.1961 -4.24707 -4.44441 10117 10121.8 7320.24 7328.21 5147.7 3760.12 3770.32 8753.47 2228.63 6453.27 6467.16 1316.38 1322.22 6200.27 6208.03 1244.47 1394.26 1396.72 3218.82 3226.04 1448.97 1497.86 1504.28 2962.75 2973.4 1498.38 1611.79 949.409 1000.22 1010.68 937.225 634.107 721.115 733.323 623.006 350.622 263.119 1679.37 1581.88 1629.82 96.8539 92.2132 1317.87 1329.14 23.2116 -3.92932 -3.67001 -3.81282 -3.77213 587.859 170.667 235.03 168.291 -4.54087 -4.36523 -4.34123 -4.3213 -4.45513 -4.17982 -4.03085 -3.92486 -4.02169 -4.68469 -4.41643 -4.65358 -4.41855 10396.4 10089.1 9908.7 9721.27 9859.33 9571.04 9314.02 9489.72 9129.4 8799.97 9032.89 8532.62 10052 7180.56 6808.08 6954.95 9627.69 3053.57 3426.37 3003.45 8209.75 6862.69 7282.78 6979.61 1305.9 1266.83 4940.11 4048.84 1516.39 1503.62 1415.4 1396.36 1422.03 1392.94 1707.49 1614.16 1574.31 1576.87 1190.18 1191.18 1161.42 1162.74 950.328 1001.43 1011.26 940.115 855.537 778.763 791.619 842.984 856.875 780.952 792.441 846.734 1687.17 1749.42 1749.59 634.594 722.039 733.679 624.147 537.459 427.898 538.373 428.389 529.414 1752.76 1734.8 1753.6 1736.78 1709.74 1707.17 166.847 166.966 350.975 263.837 1582.64 1629.86 1598.51 1598.68 154.66 141.5 144.663 132.694 132.687 1460.26 1459.69 1461.76 121.676 96.9025 92.7113 121.914 67.1144 46.8438 59.0522 67.2476 46.997 59.6928 1369.51 1371.03 1165.54 1.47209 2.37982 -2.60085 -3.65327 -2.57121 -3.4866 23.3023 1041.32 1021.95 1041.62 -4.2787 -4.2802 -3.93034 -3.6745 -3.81519 -3.77533 -3.91758 -3.92599 588.364 328.526 328.731 -4.55582 -4.56255 -4.37719 -4.58283 -4.41722 -4.58737 -4.62038 156.294 156.018 170.887 168.868 156.045 156.133 145.943 -4.4569 -4.46364 -4.56383 -4.56684 -4.54747 -4.38406 -4.56569 -4.5695 -4.22885 -4.2566 39.0134 21.1009 39.3675 21.1442 -3.15181 -4.2416 -4.04273 -4.18954 -3.14593 -4.22606 -4.02293 -4.53015 -4.61416 -4.38832 -4.56796 -4.53268 -4.35599 -4.35977 -4.33125 -4.33415 -4.09399 -4.01757 -4.12535 -4.01747 -4.08215 -4.01121 -4.12275 -3.9632 -3.91527 -4.00808 -3.97983 -3.89215 -3.97603 -3.88993 -3.73456 -3.6722 -3.64966 -3.73494 -3.67531 -3.55722 -3.64998 -3.96366 -3.76967 -3.87919 -3.69712 -3.6762 -3.74617 -3.97017 -3.78421 -3.88509 -4.35199 -4.1292 -4.27373 -4.08006 -4.07133 -4.17768 -4.35619 -4.14153 -4.27748 -4.50687 -4.54523 -4.4341 -4.28763 -4.51074 -4.54546 -4.41562 -4.63018 -4.42825 -4.63264 -4.57466 -4.59261 -4.57736 -4.59558 -4.63222 -4.49381 -4.68595 -4.4271 -4.65629 -4.41954 -4.63118 -4.49034 10152.8 10150.6 10353.6 10397.7 10355.8 10093.9 8931.62 9038.05 8938.55 8366.75 8538.34 8369.82 7455.72 7517.89 7457.98 7522.29 9596.87 9705.35 9617.03 9730.1 10057.4 6763.32 6816.05 6766.75 6534.04 5761.38 5512.03 5770.11 5519.94 9241.46 9101.35 5210.25 4762.12 4206.28 3844.67 3848.26 8939.68 8943.93 3055.16 3428.2 3007.74 2727.97 2279.56 1851.07 1653.94 1714.17 1655.56 1715.04 1784.19 6578.66 6582.78 1438.09 1372.85 1412.02 1376.51 1413.2 1343.47 1345.17 6029.86 6325.02 6032.2 6328.06 1307.69 1268.97 1282.73 1257.51 1284.48 1261.86 4943.93 1365.93 1366.82 1422.55 1423.4 1423.22 3714.3 3246.34 3432.04 3248.91 3436.67 1468.66 1504.29 1506.89 1494.07 1508.95 1499.08 2993.8 2997.58 1517.63 1505.14 1494.06 1464.03 1407.48 1439.96 1430.66 1465.55 1412.33 1441.68 1435.19 1416.95 1400.61 1423.7 1396.65 1397.93 1358.46 1374.73 1378.8 1399.44 1361.82 1376.08 1382.8 1709.13 1766.38 1768.63 1300.32 1301.62 1331.17 1332.41 1596.32 148.859 1518.1 677.14 88.9029 -4.44934 -4.44564 -3.62453 -3.95737 -4.22543 10021.2 8501.79 9901.67 5142.98 4756.46 2004.34 7124.76 5111.89 1446.68 1501.77 1638.23 1600.01 1524.48 1530.62 1226.65 1228.55 1051.77 1054.2 1691.46 1689.97 199.84 200.413 1645.88 1565.41 1566.37 129.006 128.99 1519.46 1256.62 1162.8 1258.83 -2.55656 -3.47778 780.844 903.567 780.859 904.85 678.019 -4.28628 -4.29865 228.727 126.956 146.222 90.3893 2.87253 2.83165 -4.33894 -4.31462 -3.75473 -3.75744 -3.67149 -3.67563 -4.37786 -4.38287 -4.38622 -4.39555 9764.35 9780.9 9469.55 9767.06 9507.15 9104.78 9406 9119.15 8937.8 10051.7 10040.8 10080.2 10096.7 10042.5 8664.15 8689.79 8523.69 7064.31 6362.36 6376.21 8957.95 8965.77 8767.15 9276.93 9420.36 9295.58 3379.09 8268.63 8080.53 8275.92 2223.21 2458.8 2463.01 7844.77 7856.51 2010.86 7140.21 1555.03 1557.57 5399.51 5409.06 1295.57 1300.02 4260.75 4270.81 5121.51 1303.23 1306.71 3706.44 3987.89 1641 1267.8 1270 1623.67 1581.49 1561.34 1530.45 1550.63 1555.13 1533.77 1700.07 1640.89 1678.25 1667.34 267.348 154.618 141.396 144.631 1534.77 1517.6 1501.98 1.45242 2.37349 1118.29 1175.57 1126.85 690.34 795.518 575.661 -4.6162 95.3247 133.285 -4.46894 -4.17044 -3.97741 -4.61741 -4.39094 -4.57094 -3.6919 -3.66214 -3.74081 -4.07271 -4.05592 -4.17256 -4.42783 -4.27534 10161.7 10147.9 10403.3 10200.9 9946.16 9771.61 10024 8644.81 8391.38 7807.06 7898 7992.73 7675.53 9996.93 9926.22 6057.65 6158.26 9236.3 8975.62 4811.54 4474.6 4390.57 8703.74 8550.48 8386.94 2050.24 2277.72 1778.02 1435.23 1273.04 5172.64 4881.77 4513.7 1512.39 1467.98 2766.11 2721.14 1489.67 2161.56 2222.06 2272.2 2101.44 1670.19 1667.94 1624.92 1589.17 1547.64 1553.16 1554.33 1233.86 1180.63 1234.7 1183.01 1061.9 1149.95 1062.68 1153.88 1564.03 1537.53 1557.96 1540.54 1599.22 1616.96 1647.24 1571.76 1601.37 1620.91 1648.77 1576.98 1701.1 1644.53 1679.42 1670.18 1662.21 1687.98 1664.33 526.862 1743.06 1744 1719.36 1714.55 1718.62 1713.94 267.629 201.58 201.762 1679.66 1584.35 1569.37 1584.71 1569.77 138.148 129.889 138.26 129.929 1518.34 1535.31 1503.79 1458.83 1441.64 1443.8 120.23 120.262 1319.63 1329.89 1271.04 1271.76 1176.39 -2.60579 -3.65538 1118.19 1126.91 1023.34 924.525 925.007 795.506 -4.10738 -4.10475 690.57 577.303 452.045 438.775 452.365 439.826 -4.44514 -4.36368 -4.44784 -4.42838 235.501 150.114 148.591 133.682 -4.3354 -4.34164 -4.46178 -4.47206 42.5381 23.1044 96.2191 42.6027 23.128 1.76551 1.78451 -3.28055 -3.28532 -4.17709 -4.48174 -4.36313 -4.48665 -4.37473 -4.47156 -4.47556 -4.45824 -4.47858 -4.1611 -4.17194 -3.87801 -3.84089 -3.78319 -3.88108 -3.84133 -3.78611 -3.75058 -3.63582 -3.55432 -3.75108 -3.63726 -4.54993 -4.37125 -4.55136 -4.37148 -4.55605 -4.40382 -4.41243 -4.5592 -4.4122 -4.42169 -4.68194 -4.68052 9952.83 9956.85 9650.48 9634.15 9764.6 9910.71 9734.37 9861.56 9661.35 9650.86 9768.85 9301.3 9221.25 9411.18 9580.12 9325.24 9494.25 9305.19 9232.27 9414.58 9134.42 8812.64 10286.5 10261 9976.99 10202.9 10285.1 10256.1 10406.9 10142.9 10419.3 10141.5 10416.5 10337.1 10095.4 10333.2 10400.2 10085.1 10283.3 10133.3 10167.9 10158.2 10405.1 10288.8 10141.1 10208.2 9961.07 9782.12 10026.3 8821.51 8756.84 8830.01 8775.11 8252.74 8083.02 8157.02 8653.14 8406.29 8261.01 8083.4 8157.45 7806.55 7907.19 7994.54 7679.5 7643.83 7644.42 7184.03 6957.76 9781.42 9814.22 9930.34 9950.36 9735.7 9939.74 9815.8 9743.33 9824.7 10005.3 9946.82 9981.92 10202.9 6529.46 6602.2 6611.2 6068.39 6163.5 5859.02 5585.51 5208.76 5862.19 5588.05 9098.75 9455.02 9292.22 9098.91 9298 9461.47 9634.2 9113.97 8989.54 4478.4 4814 4400.11 4210.76 4129.67 4118.41 8560.98 8709.43 8554.32 8577.71 8395.9 8398.4 8210.66 8397.89 2726.15 2517.86 2682.42 2519.53 2688.21 7958.89 7585.9 7960.83 7680.44 7423.88 7520.32 7682.96 7435.25 7524.17 7596.93 2052.42 1852.93 1604.21 6872.96 6685.69 6796.76 6689.21 6798.1 7288.46 6983.85 1603.23 1483.91 1484.83 5949.79 5956.69 5454.98 5734.07 5687.17 5457.98 5736.44 5695.58 1277.86 1316.55 1318.29 4340.33 4576.24 4344.34 4521.41 4579.64 5176.17 4890.99 1323.27 1339.17 1381.32 1422.64 1324.6 1341.36 1383.28 3756.58 3759.22 4053.12 3465.2 3466.74 1513.11 1502.57 1504.2 2768.75 2728.98 2569.03 2371.13 2428.96 2520.07 2570.41 2377.17 2430.88 2524.08 2164.72 2229.01 2274.53 2111.51 2036.56 1881.72 1785.18 1946.73 1859.85 1975.95 2039.58 1885.74 1789.8 1948.25 1985.12 1353.3 1365.82 1356.76 1671.19 1672.54 1720.34 1861.17 1728.3 1274.23 1289.66 1275.13 1293.63 1321.06 1367.17 1324.18 ) ; } AMI2 { type cyclicAMI; value nonuniform List<scalar> 1040 ( 1734.82 1038.62 844.416 81.8141 -1.50054 -4.00524 -4.34046 -4.38427 -4.41467 -4.44243 9922.22 9749.33 8674.97 7594.77 5198.82 3914.8 2119.83 1492.18 1745.09 1736.78 1655.63 1656.1 1497.96 1504.25 1431.73 1436.21 1225.74 1229.28 1140.65 1123.98 928.143 929.625 832.52 836.261 844.88 774.544 776.647 205.589 206.683 170.17 170.617 122.591 124.891 82.9846 98.0108 -3.66914 -3.98499 -3.97042 -3.85624 -3.86267 -3.736 -3.73863 -4.46262 -4.4745 -4.03559 -3.55919 -4.16729 -4.18092 -4.20931 -4.23029 -4.36105 -4.37311 -4.33949 -4.3572 10112.9 10117.3 10146.7 10136.9 10153.1 10056.9 10164.3 10077.4 10017.4 8983.97 8998.41 9903.85 9932.42 9943.51 9764.55 9780.69 9760 8837.7 8016.65 8690.11 8538.12 8561.27 7847.6 7855.72 6767.01 6771.55 7776.68 6650.34 5665.42 5673.85 5550.93 5559.28 5314.95 5325.01 3926.35 3867.13 3879.33 2228.64 2235.44 2106.03 2111.84 1794.14 1798.28 2130.02 1971.11 1977.85 1724.92 1732.48 1747.14 1677.23 1679.98 1494.82 1499.9 1419.03 1421.43 1743.07 1727.12 1596.02 1611.49 1658.12 1560.19 1510.62 1496.39 1512.82 1494.94 1239.8 1048.44 1002.9 1013.2 765.635 862.843 290.949 300.094 157.157 160.179 158.78 154.272 90.348 37.6411 -1.07271 -4.02125 -4.11196 -4.53331 -3.70152 -4.56612 -4.38777 -4.56254 -4.55376 -4.39968 -4.56921 -4.64092 -4.42161 -4.67168 -4.62404 -4.44589 -4.6155 9751.85 9645.26 10044.6 9969.32 9896.2 9703.5 9466.22 9344.74 9537.4 9294.95 8851.28 8853.37 8398.31 8540.08 7420.87 7294.1 7516.14 7727.03 6289.17 6172.68 4876.35 5266.7 3984.43 3571.65 3637.62 2650.98 2601.35 2749.29 2179.13 1983.53 1444.96 1538.58 1577.62 1551.63 1602.34 1537.32 1565.11 1574.91 1753.19 1732.44 1743.99 1724.57 1684.96 1695.45 1685.15 1693.02 1506.98 1494.66 1509 1499.39 1463.88 1500.88 1465.34 1505.24 1596.11 1560.6 1590.22 1558.22 1575.88 1565.57 1590.44 1559.51 1576.35 1566.05 1511.38 1497.89 1513.41 1496.8 1452.99 1435.74 1453.81 1437.74 1308.84 1330.09 1331.08 1303.64 1240.02 1304.26 1241.06 1240.62 1194.92 1151.95 1195.87 1134.44 1112.23 1121.91 949.274 1014.38 949.798 845.144 846.494 933.815 765.654 863.055 751.689 668.147 655.407 668.426 656.426 548.489 787.422 788.216 488.083 345.766 359.292 262.862 272.886 263.548 272.918 210.182 210.28 172.302 172.425 156.756 160.49 159.27 154.296 124.018 125.7 132.267 37.9302 21.7172 2.52907 23.621 21.7695 2.48954 63.6096 64.1618 16.7629 -3.47698 -4.12609 -4.1881 -4.11719 -3.35419 -4.04985 -3.99449 -4.00762 -4.10727 -3.98898 -3.8904 -3.81948 -3.6674 -3.81973 -3.67217 -3.74893 -4.60951 -4.61415 -4.38463 -4.22092 -4.5391 -4.38465 -3.65979 -3.70681 -3.64505 -3.90882 -4.0404 -4.33029 -4.11234 -3.93357 -4.05688 -4.33405 -4.1246 -4.40337 -4.2703 -4.48439 -4.40961 -4.28671 -4.48914 -4.52826 -4.53101 -4.38486 -4.48358 -4.33752 -4.31278 -4.48867 -4.34757 -4.35765 -4.32565 10282 10047.1 10258.1 10280.6 10036.8 10253.4 10411.8 10122.8 10426.7 10306.5 10106.3 10381.2 10411.9 10114.9 10421.1 10253.5 10117.8 10331.3 10399.3 10161.1 10387.2 10260.3 10126.9 10334.2 10168.2 9909.9 10066.7 9244.83 8987.73 9138.79 9250.13 8994.02 9141.18 9620.48 9519.6 9693.83 9394.59 9627.01 9537.42 9700.79 9410.69 9473.48 9479.99 9999.16 9829.15 9782.73 9666.86 10007.5 9861.62 10050.4 9976.98 10194.1 9933.51 9937.36 9605.28 9429.85 9626.13 9897.99 9717.89 9624.26 9470.47 9469.96 9366.34 9544.58 9303.51 9081.5 8787.78 8980 8524.21 8540.88 8682.3 8318.08 8141.55 8502.7 8319.38 8142.91 8506.07 8856.31 8865.5 8685.3 8694.08 8736.2 8413.94 8546.02 8338.91 8144.61 7952.23 8341.54 8144.92 7953.49 6880.76 6882.78 7610.79 7874.81 7521.99 7425.33 7305.39 7613.76 7877.02 7533.17 7325.56 7202.24 7518.14 7726.71 7398.55 7327.99 7209.34 6911.24 6802.77 6497.26 6292.17 6180.67 5714.48 5915.42 5716.9 5922.37 6154.92 6060.54 5625.22 5770.97 5627.87 5779.73 4970.57 5374.15 4974.32 5377.36 4922 4600.4 4541.45 4603.66 4310.25 4383.95 4548.69 4878.67 4309.82 3655.42 3696.58 3395.26 3988.5 3954.57 3958.84 2652.57 2605.83 2837.32 2465.09 2278.5 2466.96 2280.8 2414.29 2755.71 2150.63 2341.02 2152.6 1872.09 1874.02 1939.76 1873.31 1877.67 1941.17 2182.3 1992.54 2047.1 2020.89 1793.55 2023.12 1800.13 1865.8 1701.39 1702.92 1775.53 1664.13 1665.13 1445.95 1403.21 1404.57 1580.19 1557.95 1572.99 1541.83 1528.07 1553.12 1516.36 1544.35 1535.28 1555.99 1522.47 1253.36 1604.44 1543.98 1567.74 1579.99 1646.84 1635.51 1672.33 1616.94 1648.38 1639.11 1673.49 1620.86 1364.87 1403.37 1753.96 1732.54 1708.05 1654.52 1709.07 1656.58 1503.38 1488.03 1505.02 1490.61 1444.43 1468.98 1445.26 1471.35 1269.63 1122.05 380.153 -3.66847 -4.16826 -3.62232 10134.7 10155.2 9996.5 8007.89 7764.46 6642.01 6353.27 1246.6 1441.3 1445.85 1304.87 1365.81 1370.29 1144.43 1271.82 1040.88 546.78 485.733 438.866 344.867 439.8 380.864 291.703 123.767 123.939 98.4339 16.9913 -4.14584 -3.99769 -4.02435 -1.51177 -3.36671 -3.55427 -3.6361 -4.37592 -4.3795 -4.41716 -4.39249 -4.42869 -4.4791 -4.42605 -4.47618 -4.44074 -4.3495 -4.34715 -4.37117 9129.46 9144.9 8822.9 9012.1 9026.52 7034.14 7050.67 7598.14 6900.45 6510.22 6367.16 5203.74 3361.17 3068.75 3366.47 3077.9 3001.3 3299.21 3005.04 2826.34 1590.05 1592.22 1594.82 1598.66 1495.27 1308.77 1314.4 1565.37 1736.01 1421.74 1415.36 1447.7 1396.43 1378.25 1360.54 1377.24 1364.97 1275.91 1232.8 1133.88 1112.29 1121.84 751.524 704.982 692.956 388.678 143.713 132.254 152.332 140.336 41.2485 23.5908 -4.29988 -4.14878 -4.01486 -3.88332 -3.74055 -3.92616 -4.34704 -4.40093 -4.5816 -3.68552 -3.63046 -4.0328 -4.4607 -4.45089 -4.27439 -4.47164 -4.20178 9892.32 9770.44 10193.4 10308.8 10116.2 10387.8 10397.5 10155.3 10385.9 10161.1 9898.76 9756.8 10063.3 9838.13 9010.53 8676.65 9075.8 8776.64 8709.74 8974.83 7391.24 6518.66 6149.6 6049.73 4822.01 4300.59 3648.74 4380.05 3694.3 2792.65 2574.97 2517.79 2044.13 1773.4 1399.08 1276.33 1311.24 1278.22 1344.7 1286.27 1306.82 1321.38 1745.25 1735.32 1715.21 1714.26 1612.62 1658.25 1505.53 1507.03 1527.57 1528.78 1420.18 1449.4 1423.41 1400.66 1415.98 1381.04 1400.49 1393.36 1417.53 1385.1 1402.02 1397.05 1453.82 1455.31 1379.6 1363.99 1378.62 1368.42 1329.57 1315.67 1319.01 1316.99 1330.81 1322.03 1374.74 1320.16 1376.25 1322.81 1289.7 1291.35 1153.22 1276.81 1234.67 1185.68 1187.87 1015.94 1034.15 1033.8 930.909 1049.16 1004.04 944.009 1013.77 943.08 560.799 561.314 705.311 693.791 496.444 597.697 587.097 497.269 598.445 589.031 448.575 359.167 448.911 215.562 147.483 220.63 216.103 147.612 220.844 388.976 300.416 151.997 145.047 149.967 144.744 90.7808 128.374 102.95 128.483 102.969 143.745 152.371 140.435 129.52 129.481 41.2986 1.26216 -3.48712 1.24132 72.389 37.1159 72.4708 37.5771 19.3543 49.0917 19.4224 49.281 -1.07666 -4.20125 -4.12875 -4.28954 -4.0028 -4.06376 -4.07475 -4.04894 -4.22029 -3.43153 -3.79301 -3.63341 -3.8848 -3.43537 -3.79495 -3.63985 -3.74366 -3.89418 -3.78401 -3.9158 -3.89529 -3.78749 -3.88893 -3.74795 -3.65878 -3.58848 -3.69015 -3.58796 -3.68971 -4.44987 -4.599 -4.4607 -4.391 -4.6027 -4.56479 -4.20316 -4.36152 -4.4118 -4.58747 -4.21507 -3.84651 -3.79757 -3.92892 -3.74642 -3.69007 -3.85248 -3.81298 -3.93458 -3.76088 -4.04066 -4.15108 -4.24895 -4.15663 -4.25273 -4.55005 -4.34364 -4.5365 -4.55101 -4.34515 -4.53726 -4.61488 -4.40585 -4.58411 -4.55648 -4.40836 -4.57198 -4.61781 -4.41517 -4.58713 -4.67173 -4.4462 -4.68305 -4.64326 -4.42748 -4.67368 -4.67027 -4.44559 -4.68357 -4.38624 -4.56352 -4.62279 -4.43971 -4.61216 -4.56077 -4.33646 -4.47421 -4.46616 -4.44708 -4.46915 -4.48174 -4.45145 -4.5223 -4.21824 -4.47096 -4.45774 -4.29003 -4.47779 -4.24556 -4.21679 -4.52995 -4.56811 9308.05 9288.11 9313.95 9307.02 9969.29 9902.6 9778.66 9979.38 10009.3 9769.71 10011.9 9738.16 9840.72 9743.33 9637.79 9375.22 9175.44 9197.31 9378.76 9201.63 9188.88 8196.46 8351.8 8200.86 8361.04 9014.01 8862.64 8871.15 8231.32 8072.84 8238.52 8072.8 7183.96 7189.93 7045.67 6799.55 7049.24 6620.21 6624.08 5991.12 5993.4 6523.28 5870.04 5873.25 4912.92 5268.25 4827.45 4569.06 4214.64 4497.46 4572.66 4225.05 4314.14 4506.33 3393.49 3096.81 3100.21 3577.56 3639.93 3294.36 3346.44 3050.08 3348.22 3051.54 2859.17 2862.83 2408.44 2794.66 2576.59 2521.91 2339.09 2281.73 2287.24 1863.84 1640.78 1660.9 1722.65 1641.68 1662.77 1723.6 1663.06 1667.16 1621.88 1633.02 1623.19 1635.79 1539.63 1402.11 1335.34 1367.51 1336.98 1371.91 1595.68 1598.06 1278.45 1313.01 1282.95 1284.58 1299.1 1320.02 1257.46 1286.29 1303.83 1321.87 1261.76 1345.72 1290.35 1308.37 1323.95 1410.81 1377.66 1411.6 1366.96 1403.99 1379.69 1745.43 1679.42 1680.21 1498.41 1499.14 1487.24 1487.9 ) ; } } // ************************************************************************* //
3c5876b6c6d3bfe1d38c9bf90c5bee6b0d808f64
293e7d3808fb394178b9286dd3ebbb7dd7f580f6
/FrameInfoList.cpp
0d11e6ed4959b229fca42810620ac155890179c5
[]
no_license
kevindady/BitrateViewer
0e88ebaa4d67ca1b30d607dad47b2187d8fd71a7
4bba8a4366560a8240d38c26a8bb3521925370bc
refs/heads/master
2016-09-08T01:35:51.948049
2014-12-18T10:27:29
2014-12-18T10:27:29
27,570,847
6
2
null
null
null
null
UTF-8
C++
false
false
3,934
cpp
FrameInfoList.cpp
#include "stdafx.h" CFrameInfoList::CFrameInfoList() : m_pFrameInfoList(NULL), m_bitrateDisplayMode(BITRATE_DISPLAY_FRAMESIZE) { }; BOOL CFrameInfoList::Init(HWND hListCtrl) { SubclassWindow(hListCtrl); if (IsWindow()) { SetUnicodeFormat(TRUE); SetViewType(LVS_REPORT); DWORD dwExtStyle = GetExtendedListViewStyle(); dwExtStyle |= LVS_EX_FULLROWSELECT; dwExtStyle &= ~LVS_EX_CHECKBOXES; SetExtendedListViewStyle(dwExtStyle); // Create list view columns InsertColumn(0, _T("PTS"), LVCFMT_LEFT, 150, 0); InsertColumn(1, _T("Time"), LVCFMT_RIGHT, 150, 1); InsertColumn(2, _T("Bitrate"), LVCFMT_LEFT, 150, 2); InsertColumn(3, _T("Key Frame"), LVCFMT_LEFT, 150, 3); InsertColumn(4, _T("Frame Duration"), LVCFMT_LEFT, 150, 3); return TRUE; } return FALSE; } BOOL CFrameInfoList::Uninit() { DeleteAllItems(); UnsubclassWindow(); return TRUE; } BOOL CFrameInfoList::AddListItem(StreamInfo *pStreamInfo, const std::vector<FrameBitrate > *pFrameInfoList) { m_streamInfo = *pStreamInfo; m_pFrameInfoList = pFrameInfoList; size_t count = (*m_pFrameInfoList).size(); if (count < 0) { return FALSE; } for (int i = count - 1; i >= 0; --i) { LVITEM lvItem; ZeroMemory(&lvItem, sizeof(lvItem)); //fill in the TV_ITEM structure for this item lvItem.mask = LVIF_PARAM | LVIF_TEXT; lvItem.lParam = (LPARAM)i; //text and images are done on a callback basis lvItem.pszText = LPSTR_TEXTCALLBACK; // insert list item int iRet = InsertItem(&lvItem); } return TRUE; } LRESULT CFrameInfoList::OnGetDispInfo(int idCtrl, LPNMHDR pnmh, BOOL &bHandled) { NMLVDISPINFO *pdi = (NMLVDISPINFO*)pnmh; LONG lItemIndex = (LONG)pdi->item.lParam; TCHAR str[MAX_PATH] = {0}; if (pdi->item.mask & LVIF_TEXT) { switch (pdi->item.iSubItem) { case 0: //PTS { _stprintf_s(str, MAX_PATH, _T("%I64d"), (*m_pFrameInfoList)[lItemIndex].pts); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } break; case 1: //Time { LONGLONG time = (LONGLONG)((av_q2d(m_streamInfo.time_base) * ((*m_pFrameInfoList)[lItemIndex].pts - (*m_pFrameInfoList)[0].pts)) * 10000000L); _stprintf_s(str, MAX_PATH, _T("%I64d"), time); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } break; case 2: //Bitrate { if (m_bitrateDisplayMode == BITRATE_DISPLAY_NORMAL) { int framerate = int((*m_pFrameInfoList)[lItemIndex].framesize * 8 * m_streamInfo.frame_rate); _stprintf_s(str, MAX_PATH, _T("%d"), framerate); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } else if (m_bitrateDisplayMode == BITRATE_DISPLAY_FRAMESIZE) { _stprintf_s(str, MAX_PATH, _T("%d (%d byte)"), (*m_pFrameInfoList)[lItemIndex].framesize * 8, (*m_pFrameInfoList)[lItemIndex].framesize); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } else if (m_bitrateDisplayMode == BITRATE_DISPLAY_FRAMESIZE_BIT) { _stprintf_s(str, MAX_PATH, _T("%d"), (*m_pFrameInfoList)[lItemIndex].framesize * 8); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } else if (m_bitrateDisplayMode == BITRATE_DISPLAY_FRAMESIZE_BYTE) { _stprintf_s(str, MAX_PATH, _T("%d"), (*m_pFrameInfoList)[lItemIndex].framesize); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } } break; case 3: // Key Frame { _stprintf_s(str, MAX_PATH, _T("%d"), (*m_pFrameInfoList)[lItemIndex].keyframe); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } break; case 4: // Frame Duration { LONGLONG time = (LONGLONG)((av_q2d(m_streamInfo.time_base) * (*m_pFrameInfoList)[lItemIndex].duration) * 10000000L); _stprintf_s(str, MAX_PATH, _T("%I64d"), time); lstrcpyn(pdi->item.pszText, str, pdi->item.cchTextMax); } break; } } return S_OK; } LRESULT CFrameInfoList::OnDeleteItem(int idCtrl, LPNMHDR pnmh, BOOL &bHandled) { return S_OK; }
de1d6732caf2b99fcd574483e0f00df8111075bd
c17ce740d078dade17be1531fc0bf2cff8529bf5
/sample_code/Chapter11/arrays.cpp
883b8351689bec46fad6e592122155bd5ec7e454
[]
no_license
CS1342-July2020/Lecture-Materials
3c52ba41ee9d8b06e8af06fe75ab6670b9069922
d0b54f63f56aca66c17de4964079322ee2247b5f
refs/heads/master
2022-11-25T00:14:08.818479
2020-07-23T01:38:34
2020-07-23T01:38:34
276,231,125
0
0
null
null
null
null
UTF-8
C++
false
false
318
cpp
arrays.cpp
#include <iostream> using namespace std; int main() { const int size = 3; int *array = new int[size] { 1, 2, 3 }; for (int i = 0; i < size; i++) { cout << array[i] << " "; } cout << endl; for (int i = 0; i < size; i++) { cout << *(array + i) << " "; } return 0; }
964b174aad6d2dc2a070eb604d6f12e0516395f0
92f0c6da042acdeaa7cb6e5e567e9960e1ee776a
/src/phoenix.cpp
7d036c1e77c6e8c0d7c3adfe39e30128fd4f289d
[]
no_license
sizhuangliu/Mystic_Crusaders
d53fb49c29a333644d4f168533194e24291a14c6
c70b9df322776c74b5eb2670598555f0776b5317
refs/heads/master
2020-05-29T13:00:36.060000
2019-04-25T19:45:57
2019-04-25T19:45:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,153
cpp
phoenix.cpp
#include "phoenix.h" #include "FireBall.h" #include <algorithm> #include <stdlib.h> #define _USE_MATH_DEFINES #include <math.h> SpriteSheet phoenix::texture; phoenix::phoenix(float hp, float damage, vec2 position, vec2 scale, float angle) { init(hp, damage, position, scale,angle); } bool phoenix::init(float hp, float damage, vec2 position, vec2 scale, float angle) { if (!texture.is_valid()) { if (!texture.load_from_file(textures_path("phoenix.png"))) { fprintf(stderr, "Failed to load phoenix texture!"); return false; } } // The position corresponds to the center of the texture texture.totalTiles = 11; // custom to current sprite sheet texture.subWidth = 192; // custom to current sprite sheet // The position corresponds to the center of the texture float wr = texture.subWidth * 0.5f; float hr = texture.height * 0.5f; texVertices[0].position = { -wr, +hr, -0.01f }; //vertices[0].texcoord = { 0.f, 1.f }; texVertices[1].position = { +wr, +hr, -0.01f }; //vertices[1].texcoord = { 1.f, 1.f, }; texVertices[2].position = { +wr, -hr, -0.01f }; //vertices[2].texcoord = { 1.f, 0.f }; texVertices[3].position = { -wr, -hr, -0.01f }; //vertices[3].texcoord = { 0.f, 0.f }; for (int i = 0; i <= texture.totalTiles; i++) { texture_locs.push_back((float)i * texture.subWidth / texture.width); } // counterclockwise as it's the default opengl front winding direction uint16_t indices[] = { 0, 3, 1, 1, 3, 2 }; // Clearing errors gl_flush_errors(); // Vertex Buffer creation glGenBuffers(1, &mesh.vbo); glBindBuffer(GL_ARRAY_BUFFER, mesh.vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(TexturedVertex) * 4, texVertices, GL_STATIC_DRAW); // Index Buffer creation glGenBuffers(1, &mesh.ibo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.ibo); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(uint16_t) * 6, indices, GL_STATIC_DRAW); // Vertex Array (Container for Vertex + Index buffer) glGenVertexArrays(1, &mesh.vao); if (gl_has_errors()) return false; // Loading shaders if (!effect.load_from_file(shader_path("textured.vs.glsl"), shader_path("textured.fs.glsl"))) return false; // Setting initial values, scale is negative to make it face the opposite way // 1.0 would be as big as the original texture max_hp = hp; m_scale = scale; m_rotation = 0; m_position = position; animation_time = 0.0f; m_hp = hp; first_time = true; projectile_damage = damage; particle_damage = 0.02f; elapsedTime = 0.f; m_angle = angle; death_animation_time = 0.f; num_particles = 20; last_used_particle = 0; emit_particles(); return true; } vec2 phoenix::get_bounding_box() { return { std::fabs(m_scale.x) * texture.subWidth, std::fabs(m_scale.y) * texture.height }; } vec2 phoenix::get_position() { return m_position; } void phoenix::set_position(vec2 position) { m_position = position; } void phoenix::shoot_projectiles(vec2 target_position, std::vector<Projectile*> & hero_projectiles) { vec2 shoot_direction = { target_position.x - m_position.x, target_position.y - m_position.y }; float angle = atan2(shoot_direction.y,shoot_direction.x); Fireball* fireball = new Fireball(angle, 400.f, projectile_damage); fireball->set_position(m_position); hero_projectiles.emplace_back(fireball); } void phoenix::attack(std::vector<Enemy_01> &m_enemys_01, std::vector<Enemy_02> &m_enemys_02, std::vector<Enemy_03> &m_enemys_03, std::vector<Projectile*> & hero_projectiles) { vec2 target_position = find_target(m_enemys_01, m_enemys_02, m_enemys_03); shoot_projectiles(target_position, hero_projectiles); } //find the closest enemy as the target to attack and return the enemies's position vec2 phoenix::find_target(std::vector<Enemy_01> &m_enemys_01, std::vector<Enemy_02> &m_enemys_02, std::vector<Enemy_03> &m_enemys_03) { float min_distance = std::numeric_limits<float>::infinity(); vec2 min_location = { 0.f,0.f }; for (auto & enemy01:m_enemys_01) { float dx = (m_position.x - enemy01.get_position().x) * (m_position.x - enemy01.get_position().x); float dy = (m_position.y - enemy01.get_position().y) * (m_position.y - enemy01.get_position().y); float distance = sqrtf(dx + dy); if (distance < min_distance) { min_distance = distance; min_location = enemy01.get_position(); } } for (auto & enemy : m_enemys_01) { float dx = (m_position.x - enemy.get_position().x) * (m_position.x - enemy.get_position().x); float dy = (m_position.y - enemy.get_position().y) * (m_position.y - enemy.get_position().y); float distance = sqrtf(dx + dy); if (distance < min_distance) { min_distance = distance; min_location = enemy.get_position(); } } for (auto & enemy : m_enemys_02) { float dx = (m_position.x - enemy.get_position().x) * (m_position.x - enemy.get_position().x); float dy = (m_position.y - enemy.get_position().y) * (m_position.y - enemy.get_position().y); float distance = sqrtf(dx + dy); if (distance < min_distance) { min_distance = distance; min_location = enemy.get_position(); } } for (auto & enemy : m_enemys_03) { float dx = (m_position.x - enemy.get_position().x) * (m_position.x - enemy.get_position().x); float dy = (m_position.y - enemy.get_position().y) * (m_position.y - enemy.get_position().y); float distance = sqrtf(dx + dy); if (distance < min_distance) { min_distance = distance; min_location = enemy.get_position(); } } return min_location; } void phoenix::destroy(bool reset) { if (!is_alive() || reset) { for (int i = 0; i < m_particles.size(); i++) { m_particles[i].destroy(); } m_particles.clear(); glDeleteVertexArrays(1, &mesh.vao); effect.release(); } glDeleteBuffers(1, &mesh.vbo); glDeleteBuffers(1, &mesh.ibo); } void phoenix::setTextureLocs(int index) { texVertices[0].texcoord = { texture_locs[index], 1.f }; //top left texVertices[1].texcoord = { texture_locs[index + 1], 1.f }; //top right texVertices[2].texcoord = { texture_locs[index + 1], 0.f }; //bottom right texVertices[3].texcoord = { texture_locs[index], 0.f }; //bottom left // counterclockwise as it's the default opengl front winding direction uint16_t indices[] = { 0, 3, 1, 1, 3, 2 }; // Clearing errors gl_flush_errors(); // Clear memory allocation if (!first_time) { destroy(false); } // Vertex Buffer creation glGenBuffers(1, &mesh.vbo); glBindBuffer(GL_ARRAY_BUFFER, mesh.vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(TexturedVertex) * 4, texVertices, GL_STATIC_DRAW); // Index Buffer creation glGenBuffers(1, &mesh.ibo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.ibo); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(uint16_t) * 6, indices, GL_STATIC_DRAW); first_time = false; } void phoenix::emit_particles() { vec2 range = get_bounding_box(); float left = m_position.x; float bottom = m_position.y; float step_to_right = range.x / 20; float step_to_top = range.y / 40; for (int i = 0; i < num_particles; i++) { particles p; float lifetime = 1.5f + (rand() % 100) / 100.f; //a slightly different lifetime for each particle float scale = float(rand() % 100) / 2000.f; int randomX = rand() % 10 - 5; int randomY = rand() % 30 - 15; vec2 initial_velocity = { 0.f,8.f }; vec2 position = { left + randomX*step_to_right, bottom + randomY*step_to_top }; p.init(lifetime, scale, position, initial_velocity); m_particles.emplace_back(p); } } void phoenix::respawn_particle(particles& particle) { vec2 range = get_bounding_box(); float left = m_position.x; float bottom = m_position.y; float step_to_right = range.x / 20; float step_to_top = range.y / 40; int randomX = rand() % 10 - 5; int randomY = rand() % 30 - 15; float lifetime = 1.5f + (rand() % 100) / 100.f; //a slightly different lifetime for each particle float scale = float(rand() % 100) / 2000.f; vec2 initial_velocity = { 0.f,8.f }; vec2 position = { left + randomX * step_to_right, bottom + randomY * step_to_top }; particle.set_position(position); particle.set_lifetime(lifetime); particle.set_velocity(initial_velocity); particle.set_scale(scale); particle.set_color_green(0.8f); } int phoenix::find_first_unused_particle() { for (int i = last_used_particle; i < num_particles; ++i) { float lt = m_particles[i].get_lifetime(); if (lt <= 0.0f) { last_used_particle = i; return i; } } for (GLuint i = 0; i < last_used_particle; ++i) { float life = m_particles[i].get_lifetime(); if (life <= 0.0f) { last_used_particle = i; return i; } } last_used_particle = 0; return 0; } void phoenix::change_hp(float d_hp) { m_hp += d_hp; m_hp = std::min(m_hp, max_hp); m_hp = std::max(0.1f, m_hp); } phoenix::~phoenix() { } bool phoenix::collide_with(Enemies &enemy) { float dx = m_position.x - enemy.get_position().x; float dy = m_position.y - enemy.get_position().y; float d_sq = dx * dx + dy * dy; float other_r = std::max(enemy.get_bounding_box().x, enemy.get_bounding_box().y); vec2 temp = get_bounding_box(); float my_r = std::max(temp.x, temp.y); float r = std::max(other_r, my_r); r *= 0.6f; if (d_sq < r * r) return true; return false; } bool phoenix::collide_with(Projectile & p) { float dx = m_position.x - p.get_position().x; float dy = m_position.y - p.get_position().y; float d_sq = dx * dx + dy * dy; float other_r = std::max(p.get_bounding_box().x, p.get_bounding_box().y); vec2 temp = get_bounding_box(); float my_r = std::max(temp.x, temp.y); float r = std::max(other_r, my_r); r *= 0.6f; if (d_sq < r * r) return true; return false; } float phoenix::get_angle() { return m_angle; } void phoenix::update(float ms, vec2 hero_position, std::vector<Enemy_01> &m_enemys_01, std::vector<Enemy_02> &m_enemys_02, std::vector<Enemy_03> &m_enemys_03, std::vector<Projectile*> & hero_projectiles) { //update the state of the phoenix float d_hp = -ms / 1000 * 5; //Decrease hp every second change_hp(d_hp); //decrease some amount of hp overtime float fire = float(rand() % 100); if (fire < 3.f) { attack(m_enemys_01, m_enemys_02, m_enemys_03, hero_projectiles); } //update phoenix position so that it follows the hero //vec2 dif = { hero_position.x - m_position.x, hero_position.y - m_position.y }; //float current_distance = sqrtf(dot(dif, dif)); //float wanted_distance = 100.f; //chase hero when they are too far away float radius = 150.f; m_angle += (ms / 1000) * M_PI * 0.2; float dx = cos(m_angle) * radius; float dy = sin(m_angle) * radius; m_position = { hero_position.x + dx, hero_position.y + dy }; //maintain the particle list for (int i = 0; i < num_particles; i++) { int unusedParticle = find_first_unused_particle(); respawn_particle(m_particles[unusedParticle]); } for (int i = 0; i < num_particles; i++) { particles &p = m_particles[i]; float lt = p.get_lifetime(); lt -= (ms / 1000); p.set_lifetime(lt); // reduce life if (p.get_lifetime() > 0.0f) { // particle is alive, thus update vec2 vel = p.get_velocity(); vec2 pos = p.get_position(); float g = p.get_color_green(); pos.x -= vel.x * 5 * (ms / 1000); pos.y -= vel.y * 5 * (ms / 1000); g -= 0.4 * (ms / 1000); p.set_position(pos); p.set_color_green(g); } } //animation float animation_speed = 0.2f; animation_time += animation_speed; if (elapsedTime < 500) { int curidx = 0; int numTiles = 5; curidx += (int)animation_time % numTiles; setTextureLocs(curidx); } else if (m_hp < 0.5f) { death_animation_time += animation_speed; int curidx = 8; int numTiles = 3; curidx += (int)death_animation_time % numTiles; setTextureLocs(curidx); } else { int curidx = 4; int numTiles = 4; curidx += (int)animation_time % numTiles; setTextureLocs(curidx); } elapsedTime += ms; } bool phoenix::is_alive() { return m_hp > 0.5f || death_animation_time < 3; } void phoenix::draw(const mat3 &projection) { //if it's in draw and the phoenix is not alive then its must be playing the death animation transform_begin(); transform_translate(m_position); transform_rotate(m_rotation); transform_scale(m_scale); transform_end(); // Setting shaders glUseProgram(effect.program); // Enabling alpha channel for textures glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_DEPTH_TEST); // Getting uniform locations for glUniform* calls GLint transform_uloc = glGetUniformLocation(effect.program, "transform"); GLint color_uloc = glGetUniformLocation(effect.program, "fcolor"); GLint projection_uloc = glGetUniformLocation(effect.program, "projection"); // Setting vertices and indices glBindVertexArray(mesh.vao); glBindBuffer(GL_ARRAY_BUFFER, mesh.vbo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.ibo); // Input data location as in the vertex buffer GLint in_position_loc = glGetAttribLocation(effect.program, "in_position"); GLint in_texcoord_loc = glGetAttribLocation(effect.program, "in_texcoord"); glEnableVertexAttribArray(in_position_loc); glEnableVertexAttribArray(in_texcoord_loc); glVertexAttribPointer(in_position_loc, 3, GL_FLOAT, GL_FALSE, sizeof(TexturedVertex), (void*)0); glVertexAttribPointer(in_texcoord_loc, 2, GL_FLOAT, GL_FALSE, sizeof(TexturedVertex), (void*)sizeof(vec3)); // Enabling and binding texture to slot 0 glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture.id); // Setting uniform values to the currently bound program glUniformMatrix3fv(transform_uloc, 1, GL_FALSE, (float*)&transform); float color[] = { 1.f, 1.f, 1.f }; glUniform3fv(color_uloc, 1, color); glUniformMatrix3fv(projection_uloc, 1, GL_FALSE, (float*)&projection); // Drawing! glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, nullptr); for (int i = 0; i < num_particles; i++) { m_particles[i].draw(projection); } }
b2efc716c04791231fbd76a80b6c764d281341fa
c712c82341b30aad4678f6fbc758d6d20bd84c37
/CAC_Source_1.7884/FzlNkzDialog.h
0577cc2db65f706ad5c37476ef0e3d1fb8d1288f
[]
no_license
governmentbg/EPEP_2019_d2
ab547c729021e1d625181e264bdf287703dcb46c
5e68240f15805c485505438b27de12bab56df91e
refs/heads/master
2022-12-26T10:00:41.766991
2020-09-28T13:55:30
2020-09-28T13:55:30
292,803,726
0
0
null
null
null
null
UTF-8
C++
false
false
622
h
FzlNkzDialog.h
class TfzlNkzDialog : public TEisDialog { public: TfzlNkzDialog(TWindow *parent, FZL *fzl, bool edit, int resId = IDD_FZL_NKZ); TStatic *nprnmrLabel; TStringFace *nprnmr; TStatic *fzlFaceLabel; TStatic *fzlegnLabel; TStringFace *fzlegn; TStatic *fzllncLabel; TStringFace *fzllnc; TStatic *fzlimecyrLabel; TStringFace *fzlimecyr; TStatic *fzlsLabel; TGroupListWindow *fzls; TButton *addFzl, *editFzl, *delFzl; TStatic *nkzsLabel; TGroupListWindow *nkzs; TButton *addNkz, *editNkz, *delNkz; };
fca38090038de782c850a239ea46572c3bf6b5c7
40655839c2c46fad50c203a13de4b11d1637f13a
/Console-Apps/Cpp-Learning-Project/src/AbstractFactory.cpp
50e043099a0827b1d7b9a3bfd5586c98ca7b4203
[ "MIT" ]
permissive
HemanthRj96/Hobby-Projects-Cpp
c0eff2f405a9e41262463a9657c1cba56042e500
3df702cdac8375efff62d8bb97faf58380b50ce5
refs/heads/main
2023-03-29T17:08:40.703379
2021-03-31T18:12:51
2021-03-31T18:12:51
336,176,576
0
0
null
null
null
null
UTF-8
C++
false
false
2,545
cpp
AbstractFactory.cpp
#include<iostream> using namespace std; // Abstract factory tutorial code /*/// PROBLEM /// Imagine that you're creating a furniture shop simulator.Your code consists of classes that represent : 1. A family of related products, say : Chair + Sofa + CoffeeTable. 2. Several variants of this family. For example, products Chair + Sofa + CoffeeTable are available in these variants : Modern, Victorian, ArtDeco. You need a way to create individual furniture objects so that they match other objects of the same family. Customers get quite mad when they receive non-matching furniture. Also, you don't want to change existing code when adding new products or families of products to the program. Furniture vendors update their catalogs very often, and you wouldn't want to change the core code each time it happens. */ // https://refactoring.guru/design-patterns/abstract-factory Check this link to see more in detail // Abstract for products class Product { public: virtual ~Product() {}; virtual void TheFunction() = 0; }; // Concrete product A class Product_A : public Product { public: virtual void TheFunction() override { cout << "This is product A" << endl; } }; // Concrete product B class Product_B : public Product { public: virtual void TheFunction() override { cout << "This is product B" << endl; } }; // Abstract for factory class Factory { public: virtual void FactoryType() const = 0; virtual Product_A* CreateProduct_A()const = 0; virtual Product_B* CreateProduct_B()const = 0; }; // Concrete factory A class Factory_A : public Factory { public: virtual void FactoryType() const override { cout << "This is factory A" << endl; } virtual Product_A* CreateProduct_A() const override { return new Product_A(); } virtual Product_B* CreateProduct_B() const override { return new Product_B(); } }; // Concrete factory B class Factory_B : public Factory { public: virtual void FactoryType() const override { cout << "This is factory B" << endl; } virtual Product_A* CreateProduct_A() const override { return new Product_A(); } virtual Product_B* CreateProduct_B() const override { return new Product_B(); } }; void GetFromFactory(const Factory& factory) { Product* product = nullptr; factory.FactoryType(); product = factory.CreateProduct_A(); product->TheFunction(); product = factory.CreateProduct_B(); product->TheFunction(); } void AbstractFactoryMain_() { Factory* factory = nullptr; factory = new Factory_A(); GetFromFactory(*factory); factory = new Factory_B(); GetFromFactory(*factory); }
8d429b43bf6b2933b2f97c961af9df8b90b4d1a1
c7956e41e04b1198d19869a8db33c299eca88d1d
/TOASU4_NEW/TOASU4_NEW/TOASU4_NEW.cpp
8dc1940a37325e30f657504c07823990cbbafe4b
[]
no_license
GiekoOlis/TOASU
a8df2f8d907e96769535d772095e9238532f2779
9e710ea8c9dcd7cf39f142f9ee7279cba93c8cc9
refs/heads/master
2021-08-07T12:37:03.526275
2020-09-30T16:10:09
2020-09-30T16:10:09
223,798,317
0
0
null
null
null
null
UTF-8
C++
false
false
926
cpp
TOASU4_NEW.cpp
 #include <iostream> #include <fstream> using namespace std; int main() { //setlocale(LC_ALL, "Rus"); int coef[2]; ifstream in("C:\\Users\\gieko\\source\\repos\\TOASU4_NEW\\TOASU4_NEW\\f.txt"); if (in.is_open()) { for (int i = 0; i < 2; i++) in >> coef[i]; int L = coef[0] ;//L - размер рюкзака int m = coef[1] + 1;// kolvo dostupnih predmetov //int k = coef[2];//nnumber line S_y (Y - budget) int** D = new int* [2]; int** Res = new int* [L + 1]; //create array D for (int i = 0; i <= m; i++) { D[i] = new int[2]; } //create array Res for (int i = 0; i <= m; i++) { Res[i] = new int[L+1]; } //read in file from array D for (int i = 1; i < m; i++) { for (int j = 0; j < 2; j++) { in >> D[i][j]; } } for (int i = 0; i < m; i++) { for (int j = 0; j < L; j++) { Res[i][j]=0; } } in.close(); } else { cout << "Not true way to file.."; } }
c293d77eb22ae985e21a02c0e2603c978ab8a40e
76016e9a343bc3767fc06d8fefc0ae53136acd23
/codeforces/ecf10/A.cpp
2aa53ce4bee0931d1a7c304b503ef344d412bf83
[]
no_license
ediston/AimRed
b3b7a6f0faddecdeda8e675f6f9f835d0f1e97f0
d2a33dc9489d35c330f2098bc4d72dc491769afb
refs/heads/master
2021-01-10T12:30:14.620139
2016-03-25T16:45:58
2016-03-25T16:45:58
54,678,830
0
0
null
null
null
null
UTF-8
C++
false
false
462
cpp
A.cpp
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; #define MP(x,y) make_pair(x,y) int main(){ int a, b, h1, h2; cin >> h1 >> h2 >> a >> b; if(h2 <= h1+8*a){ cout << 0 << endl; return 0; } if(b>=a){ cout << -1 << endl; return 0; } int days = h2 - h1 - 8*a; days = (days)/(12*(a-b)) + (days%(12*(a-b)) ? 1 : 0); cout << days << endl; return 0; }
f84b08f6ef07e90872cba9bf5d83443b4eb4cd6c
d9d6478d63fad8926b26c6c4936b70bf5af668a5
/SLIDING WINDOW/3..find-longest-substring-containing-k-distinct-characters.cpp
543e898af1a49f4eb3290a5fe88c7244f51189c6
[]
no_license
karanwadhwa03/DSA-Codes
4251e3c58c5f79f1513fe254ecc06be740c53265
9e0943c13cced3ff94f6d7d12a7a000a1bf65b1b
refs/heads/master
2023-03-02T15:14:38.826947
2021-02-11T19:25:38
2021-02-11T19:25:38
329,498,173
0
0
null
null
null
null
UTF-8
C++
false
false
621
cpp
3..find-longest-substring-containing-k-distinct-characters.cpp
//find-longest-substring-containing-k-distinct-characters #include<bits/stdc++.h> using namespace std; int main(){ string A = "abcbdbdbbdcdabd"; int k = 2; int n = A.length(); set<char> window; map<char,int> tmap; int start=0,end=0; int low=0; for(int i=0;i<n;i++){ tmap[A[i]]++; window.insert(A[i]); while(window.size()>k){ if(--tmap[A[low]]==0){ window.erase(A[low]); } low++; } if(i-low>end-start){ start=low; end=i; } } cout<<A.substr(start,end-start+1); }
04ad112913b13203db0a844de28641969f1411e6
785508e1dc2d9e08d7debecb7ea58e8a09fd61c0
/AnalogButtonManager.h
ca27f34fa912fabd766e27698d8e6376def4010c
[ "MIT" ]
permissive
dhanyweb/AnalogButtonManager
01564ea80077ea3024a38b6b2e9ed2f6ad865054
2484b967d0f8a79dc6d16517d79ddc6ce0283975
refs/heads/master
2020-07-10T21:28:43.990525
2013-11-22T03:27:48
2013-11-22T03:27:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
7,739
h
AnalogButtonManager.h
//------------------------------------------------------------------------- // // The MIT License (MIT) // // Copyright (c) 2013 Andrew Duncan // // 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. // //------------------------------------------------------------------------- #ifndef ANALOG_BUTTON_MANAGER_H #define ANALOG_BUTTON_MANAGER_H //------------------------------------------------------------------------- #if defined(ARDUINO) && ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include <inttypes.h> #include "AnalogButton.h" //------------------------------------------------------------------------- class AnalogButtonManagerInterface { public: virtual void manageButton(AnalogButton* ab) {} }; //------------------------------------------------------------------------- template<uint8_t NumberOfButtons> class AnalogButtonManager : public AnalogButtonManagerInterface { public: static const uint16_t defaultDebounceDelay = 40; static const uint16_t defaultRepeatDelay = 1000; static const uint8_t defaultSamplingInterval = 20; //--------------------------------------------------------------------- AnalogButtonManager( uint8_t analogPin) : _analogPin(analogPin), _debounceDelay(defaultDebounceDelay), _debounceCountDown(0), _repeatDelay(defaultRepeatDelay), _repeatCountDown(0), _previousReadTime(millis()), _samplingInterval(defaultSamplingInterval), _minButtonsValue(0), _maxButtonsValue(0), _activeButton(0), _pressedButton(0), _buttonsManaged(0) { pinMode(analogPin, INPUT); digitalWrite(analogPin, LOW); } //--------------------------------------------------------------------- uint16_t getDebounceDelay() const { return _debounceDelay; } void setDebounceDelay( uint16_t debounceDelay) { _debounceDelay = debounceDelay; } uint16_t getRepeatDelay() const { return _repeatDelay; } void setRepeatDelay( uint16_t repeatDelay) { _repeatDelay = repeatDelay; } uint8_t getSamplingInterval() const { return _samplingInterval; } void setSamplingInterval( uint8_t samplingInterval) { _samplingInterval = samplingInterval; } //--------------------------------------------------------------------- virtual void manageButton( AnalogButton* ab) { if (_buttonsManaged < NumberOfButtons) { if (_buttonsManaged == 0) { _minButtonsValue = ab->getLow(); _maxButtonsValue = ab->getHigh(); } else { if (_minButtonsValue > ab->getLow()) { _minButtonsValue = ab->getLow(); } if (_maxButtonsValue < ab->getHigh()) { _maxButtonsValue = ab->getHigh(); } } _buttons[_buttonsManaged++] = ab; } } //--------------------------------------------------------------------- void task() { uint32_t now = millis(); uint32_t elapsed = now - _previousReadTime; if (_previousReadTime > now) { elapsed = (0xFFFFFFFF - _previousReadTime) + now + 1; } if (elapsed < _samplingInterval) { return; } //----------------------------------------------------------------- if (_debounceCountDown > 0) { if (_debounceCountDown < elapsed) { _debounceCountDown = 0; } else { _debounceCountDown -= elapsed; } } if (_repeatCountDown > 0) { if (_repeatCountDown < elapsed) { _repeatCountDown = 0; } else { _repeatCountDown -= elapsed; } } //----------------------------------------------------------------- uint16_t value = analogRead(_analogPin); _previousReadTime = now; if ((value < _minButtonsValue) || (value > _maxButtonsValue)) { _activeButton = 0; if (_pressedButton) { _pressedButton->released(); _pressedButton = 0; } return; } //----------------------------------------------------------------- boolean buttonFound = false; for ( int8_t i = 0; (i < _buttonsManaged) && (not buttonFound); ++i) { if (value <= _buttons[i]->getHigh() && value >= _buttons[i]->getLow()) { buttonFound = true; if (_activeButton != _buttons[i]) { _debounceCountDown = _debounceDelay; _activeButton = _buttons[i]; if (_pressedButton) { _pressedButton->released(); _pressedButton = 0; } } else if ((not _pressedButton) && (_debounceCountDown == 0)) { _activeButton->pressed(); _pressedButton = _activeButton; _repeatCountDown = _repeatDelay; } else if (_pressedButton && (_repeatCountDown == 0)) { _pressedButton->repeated(); _debounceCountDown = _debounceDelay; _repeatCountDown = _repeatDelay; } } } if (not buttonFound) { _activeButton = 0; if (_pressedButton) { _pressedButton->released(); _pressedButton = 0; } } } //--------------------------------------------------------------------- private: uint8_t _analogPin; uint16_t _debounceDelay; uint32_t _debounceCountDown; uint16_t _repeatDelay; uint32_t _repeatCountDown; uint32_t _previousReadTime; uint8_t _samplingInterval; uint16_t _minButtonsValue; uint16_t _maxButtonsValue; AnalogButton* _activeButton; AnalogButton* _pressedButton; int8_t _buttonsManaged; AnalogButton* _buttons[NumberOfButtons]; }; //------------------------------------------------------------------------- #endif
b548f9cba25771217f9ca451b480ee50f7d1ef71
13b14c9c75143bf2eda87cb4a41006a52dd6f02b
/AOJ/0257/bit/0257.cpp
3f8f5dd74c99a4cdb2db40586225afb30144099c
[]
no_license
yutaka-watanobe/problem-solving
2c311ac856c79c20aef631938140118eb3bc3835
f0b92125494fbd3c8d203989ec9fef53f52ad4b4
refs/heads/master
2021-06-03T12:58:39.881107
2020-12-16T14:34:16
2020-12-16T14:34:16
94,963,754
0
1
null
null
null
null
UTF-8
C++
false
false
260
cpp
0257.cpp
#include<iostream> using namespace std; int main(){ int st = 0; int b; for ( int i = 0; i < 3; i++ ){ cin >> b; if ( b == 1 ) st += (1<<i); } if ( st >= 3 ) cout << "Open" << endl; else cout << "Close" << endl; return 0; }
1e94f8aa64e1315b4f3fc97c0f24f2084fef1084
10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94
/C++/design-an-ordered-stream.cpp
ed96183d9dfb5e5a8c4c0fd267c857a9e03399a2
[ "MIT" ]
permissive
kamyu104/LeetCode-Solutions
f54822059405ef4df737d2e9898b024f051fd525
4dc4e6642dc92f1983c13564cc0fd99917cab358
refs/heads/master
2023-09-02T13:48:26.830566
2023-08-28T10:11:12
2023-08-28T10:11:12
152,631,182
4,549
1,651
MIT
2023-05-31T06:10:33
2018-10-11T17:38:35
C++
UTF-8
C++
false
false
535
cpp
design-an-ordered-stream.cpp
// Time: O(1), amortized // Space: O(n) class OrderedStream { public: OrderedStream(int n) : i_(0) , values_(n) { } vector<string> insert(int id, string value) { --id; values_[id] = value; vector<string> result; if (id != i_) { return result; } while (i_ < size(values_) && !empty(values_[i_])) { result.emplace_back(values_[i_++]); } return result; } private: int i_; vector<string> values_; };
85947b49b8da230cec9671ed999faaeb07b5fca1
1da16e15826af3ebc16c775c262d3e0e4dcf6f2d
/Algorithms/Text_Justification.cpp
d178f18339ee378f33691f2c6d58671aa2f3e727
[]
no_license
fagan2888/LeetCode-4
a9045917b1470f4112b86879822c904ef0c99585
e5bda7170fd0da04904f54ee2cb890dcfcee89ea
refs/heads/master
2021-05-29T16:18:27.294928
2015-09-09T22:03:30
2015-09-09T22:03:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,395
cpp
Text_Justification.cpp
class Solution { public: vector<string> fullJustify(vector<string> &words, int L) { if (words.empty()) return words; vector<string> line, result; int total = 0; string tmp; for (int i = 0;i < words.size();i++) { if (line.size() == 0) { line.push_back(words[i]); total = words[i].size() + 1; } else { if (total + words[i].size() > L) { if (line.size() == 1) { tmp = line[0]; while (tmp.size() < L) tmp += ' '; result.push_back(tmp); line.clear(); line.push_back(words[i]); total = words[i].size() + 1; } else { vector<string> space(line.size() - 1); total -= line.size(); int cnt = 0; while (total < L) { space[cnt++ % space.size()] += ' '; total++; } tmp = line[0]; for (int i = 1;i < line.size();i++) { tmp += space[i - 1]; tmp += line[i]; } result.push_back(tmp); line.clear(); line.push_back(words[i]); total = words[i].size() + 1; } } else { line.push_back(words[i]); total += words[i].size() + 1; } } } if (line.size() > 0) { string tmp; tmp = line[0]; for (int i = 1;i < line.size();i++) { tmp += ' '; tmp += line[i]; } while (tmp.size() < L) tmp += ' '; result.push_back(tmp); } return result; } };
cb58cb2913a08cdb2752ccdc5357468fb79c11e7
62cb187a6d3b68dc5862bdea23d6c28b23f0f3a4
/GS_Seminar/seminar4/flatbuffers/GamePacket.hpp
015ca63e2c53c49aa762309e06f4a84816b16011
[]
no_license
insooneelife/GS_Seminar
b87b8b473522934f75d9359e134cf22a2414d4ea
cd4838fe50575264ca25b58bfc66359fcc5d8334
refs/heads/master
2022-06-07T03:37:18.304745
2022-05-20T09:45:50
2022-05-20T09:45:50
67,829,842
0
0
null
null
null
null
UHC
C++
false
false
3,674
hpp
GamePacket.hpp
#pragma once #include <cstdio> #include <cstdlib> #include <cstring> #include <sstream> #include <iostream> #include <iomanip> #include "flatbuffers\flatbuffers.h" class GamePacket { public: // header의 허용 길이 // HEADER_LENGTH 자리수까지 허용 enum { HEADER_LENGTH = 8 }; // header의 앞 4자리, body의 길이를 저장 enum { SIZE_HEADER_LENGTH = 4 }; // header의 뒤 4자리, body의 타입을 저장 enum { TYPE_HEADER_LENGTH = 4 }; // body의 허용 길이 // body는 flatbuffer와 호환 가능한 buffer를 사용 enum { MAX_BODY_LENGTH = 2048 }; GamePacket() : _body_length(0), _type(0) {} explicit GamePacket(int type) { setBodyLength(0); setType(type); encodeHeader(); } // 이전에 GameMessage를 통해 만들어진 data와 (header data + flatbuffer data) // 그 data의 길이를 이용한 생성자. GamePacket(const unsigned char* data_with_header, unsigned int length) { std::memcpy(getData(), data_with_header, length); decodeHeader(); } // flatbuffers를 이용한 GameMessage 생성자 // data가 직렬화 된 후의 builder와, // 이 builder가 어떤 data를 담고 있는지에 대한 type 인자를 넣어준다. GamePacket(const flatbuffers::FlatBufferBuilder& builder, int type) { setBodyLength(builder.GetSize()); setType(type); std::memcpy(getBody(), builder.GetBufferPointer(), _body_length); encodeHeader(); } const unsigned char* getData() const { return _data; } unsigned char* getData() { return _data; } unsigned int getLength() const { return HEADER_LENGTH + _body_length; } const unsigned char* getBody() const { return _data + HEADER_LENGTH; } unsigned char* getBody() { return _data + HEADER_LENGTH; } unsigned int getBodyLength() const { return _body_length; } unsigned int getType() const { return _type; } void setBodyLength(unsigned int new_length) { _body_length = new_length; if (_body_length > MAX_BODY_LENGTH) std::cout << "Body length is too big!" << std::endl; } void setType(unsigned int new_type) { _type = new_type; } // buffer에는 데이터가 저장되지만, 얼마만큼의 길이가 저장되었는지 알 방법이 없다. // 그러므로 header와 body를 분리하고, header 부분에 길이를 저장해 준다. // 이 함수는 header의 데이터를 길이로 변환해 주는 함수이다. // 또한 데이터의 header와 body의 길이가 다른 경우는 이상이 있는 경우이고 // 이를 return을 통해 알려준다. bool decodeHeader() { using namespace std; // For strncat and atoi. char size_header[SIZE_HEADER_LENGTH + 1]; memcpy(size_header, _data, SIZE_HEADER_LENGTH); _body_length = atoi(size_header); char type_header[TYPE_HEADER_LENGTH + 1]; memcpy(type_header, _data + SIZE_HEADER_LENGTH, TYPE_HEADER_LENGTH); _type = atoi(type_header); if (_body_length > MAX_BODY_LENGTH) { std::cout << "Body length is too big!" << std::endl; _body_length = 0; return false; } return true; } // 반대로 body의 길이만큼을 버퍼에 넣는 작업 // size header와 type header의 길이만큼의 여백을 두기 위해 setw를 사용한다. void encodeHeader() { std::stringstream ss; ss << std::setw(SIZE_HEADER_LENGTH) << _body_length; ss << std::setw(TYPE_HEADER_LENGTH) << _type; memcpy(_data, ss.str().c_str(), HEADER_LENGTH); } private: // 데이터의 몸체를 저장하는 변수 unsigned char _data[HEADER_LENGTH + MAX_BODY_LENGTH]; // 데이터의 길이를 저장하는 변수 unsigned int _body_length; // 데이터의 타입을 저장하는 변수 unsigned int _type; };
fed7a27b95c9e59ee415053e02ed58164f615ac6
46b55eb1a0a766c3f4e01b495a3099c8e3edd038
/srv_gen/cpp/include/epoc/Frecuencias.h
cd1f2fe9828f4f63eb22b5618686674fb4cba4a9
[]
no_license
carlosbulnes/epoc
8ba9352b69ce58ba712d9e3caae0ddec67754b49
77a4900f460e1208017309e18f51e254ce4baae8
refs/heads/master
2020-12-25T17:25:09.804577
2015-06-15T05:55:16
2015-06-15T05:55:16
31,882,134
0
0
null
2015-04-25T03:02:29
2015-03-09T06:08:43
C++
UTF-8
C++
false
false
7,886
h
Frecuencias.h
/* Auto-generated by genmsg_cpp for file /home/carlos/fuerte_workspace/sandbox/epoc/srv/Frecuencias.srv */ #ifndef EPOC_SERVICE_FRECUENCIAS_H #define EPOC_SERVICE_FRECUENCIAS_H #include <string> #include <vector> #include <map> #include <ostream> #include "ros/serialization.h" #include "ros/builtin_message_traits.h" #include "ros/message_operations.h" #include "ros/time.h" #include "ros/macros.h" #include "ros/assert.h" #include "ros/service_traits.h" namespace epoc { template <class ContainerAllocator> struct FrecuenciasRequest_ { typedef FrecuenciasRequest_<ContainerAllocator> Type; FrecuenciasRequest_() : sen() { sen.assign(0.0); } FrecuenciasRequest_(const ContainerAllocator& _alloc) : sen() { sen.assign(0.0); } typedef boost::array<double, 14> _sen_type; boost::array<double, 14> sen; typedef boost::shared_ptr< ::epoc::FrecuenciasRequest_<ContainerAllocator> > Ptr; typedef boost::shared_ptr< ::epoc::FrecuenciasRequest_<ContainerAllocator> const> ConstPtr; boost::shared_ptr<std::map<std::string, std::string> > __connection_header; }; // struct FrecuenciasRequest typedef ::epoc::FrecuenciasRequest_<std::allocator<void> > FrecuenciasRequest; typedef boost::shared_ptr< ::epoc::FrecuenciasRequest> FrecuenciasRequestPtr; typedef boost::shared_ptr< ::epoc::FrecuenciasRequest const> FrecuenciasRequestConstPtr; template <class ContainerAllocator> struct FrecuenciasResponse_ { typedef FrecuenciasResponse_<ContainerAllocator> Type; FrecuenciasResponse_() : a(0.0) { } FrecuenciasResponse_(const ContainerAllocator& _alloc) : a(0.0) { } typedef double _a_type; double a; typedef boost::shared_ptr< ::epoc::FrecuenciasResponse_<ContainerAllocator> > Ptr; typedef boost::shared_ptr< ::epoc::FrecuenciasResponse_<ContainerAllocator> const> ConstPtr; boost::shared_ptr<std::map<std::string, std::string> > __connection_header; }; // struct FrecuenciasResponse typedef ::epoc::FrecuenciasResponse_<std::allocator<void> > FrecuenciasResponse; typedef boost::shared_ptr< ::epoc::FrecuenciasResponse> FrecuenciasResponsePtr; typedef boost::shared_ptr< ::epoc::FrecuenciasResponse const> FrecuenciasResponseConstPtr; struct Frecuencias { typedef FrecuenciasRequest Request; typedef FrecuenciasResponse Response; Request request; Response response; typedef Request RequestType; typedef Response ResponseType; }; // struct Frecuencias } // namespace epoc namespace ros { namespace message_traits { template<class ContainerAllocator> struct IsMessage< ::epoc::FrecuenciasRequest_<ContainerAllocator> > : public TrueType {}; template<class ContainerAllocator> struct IsMessage< ::epoc::FrecuenciasRequest_<ContainerAllocator> const> : public TrueType {}; template<class ContainerAllocator> struct MD5Sum< ::epoc::FrecuenciasRequest_<ContainerAllocator> > { static const char* value() { return "2e3ee18be322543f7d0c29962cb75137"; } static const char* value(const ::epoc::FrecuenciasRequest_<ContainerAllocator> &) { return value(); } static const uint64_t static_value1 = 0x2e3ee18be322543fULL; static const uint64_t static_value2 = 0x7d0c29962cb75137ULL; }; template<class ContainerAllocator> struct DataType< ::epoc::FrecuenciasRequest_<ContainerAllocator> > { static const char* value() { return "epoc/FrecuenciasRequest"; } static const char* value(const ::epoc::FrecuenciasRequest_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct Definition< ::epoc::FrecuenciasRequest_<ContainerAllocator> > { static const char* value() { return "float64[14] sen\n\ \n\ "; } static const char* value(const ::epoc::FrecuenciasRequest_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct IsFixedSize< ::epoc::FrecuenciasRequest_<ContainerAllocator> > : public TrueType {}; } // namespace message_traits } // namespace ros namespace ros { namespace message_traits { template<class ContainerAllocator> struct IsMessage< ::epoc::FrecuenciasResponse_<ContainerAllocator> > : public TrueType {}; template<class ContainerAllocator> struct IsMessage< ::epoc::FrecuenciasResponse_<ContainerAllocator> const> : public TrueType {}; template<class ContainerAllocator> struct MD5Sum< ::epoc::FrecuenciasResponse_<ContainerAllocator> > { static const char* value() { return "8d59eeb6f47744097bbc77f6e8d9be14"; } static const char* value(const ::epoc::FrecuenciasResponse_<ContainerAllocator> &) { return value(); } static const uint64_t static_value1 = 0x8d59eeb6f4774409ULL; static const uint64_t static_value2 = 0x7bbc77f6e8d9be14ULL; }; template<class ContainerAllocator> struct DataType< ::epoc::FrecuenciasResponse_<ContainerAllocator> > { static const char* value() { return "epoc/FrecuenciasResponse"; } static const char* value(const ::epoc::FrecuenciasResponse_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct Definition< ::epoc::FrecuenciasResponse_<ContainerAllocator> > { static const char* value() { return "float64 a\n\ \n\ "; } static const char* value(const ::epoc::FrecuenciasResponse_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct IsFixedSize< ::epoc::FrecuenciasResponse_<ContainerAllocator> > : public TrueType {}; } // namespace message_traits } // namespace ros namespace ros { namespace serialization { template<class ContainerAllocator> struct Serializer< ::epoc::FrecuenciasRequest_<ContainerAllocator> > { template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) { stream.next(m.sen); } ROS_DECLARE_ALLINONE_SERIALIZER; }; // struct FrecuenciasRequest_ } // namespace serialization } // namespace ros namespace ros { namespace serialization { template<class ContainerAllocator> struct Serializer< ::epoc::FrecuenciasResponse_<ContainerAllocator> > { template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) { stream.next(m.a); } ROS_DECLARE_ALLINONE_SERIALIZER; }; // struct FrecuenciasResponse_ } // namespace serialization } // namespace ros namespace ros { namespace service_traits { template<> struct MD5Sum<epoc::Frecuencias> { static const char* value() { return "c12060a30a7682910d5c890d5372e100"; } static const char* value(const epoc::Frecuencias&) { return value(); } }; template<> struct DataType<epoc::Frecuencias> { static const char* value() { return "epoc/Frecuencias"; } static const char* value(const epoc::Frecuencias&) { return value(); } }; template<class ContainerAllocator> struct MD5Sum<epoc::FrecuenciasRequest_<ContainerAllocator> > { static const char* value() { return "c12060a30a7682910d5c890d5372e100"; } static const char* value(const epoc::FrecuenciasRequest_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct DataType<epoc::FrecuenciasRequest_<ContainerAllocator> > { static const char* value() { return "epoc/Frecuencias"; } static const char* value(const epoc::FrecuenciasRequest_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct MD5Sum<epoc::FrecuenciasResponse_<ContainerAllocator> > { static const char* value() { return "c12060a30a7682910d5c890d5372e100"; } static const char* value(const epoc::FrecuenciasResponse_<ContainerAllocator> &) { return value(); } }; template<class ContainerAllocator> struct DataType<epoc::FrecuenciasResponse_<ContainerAllocator> > { static const char* value() { return "epoc/Frecuencias"; } static const char* value(const epoc::FrecuenciasResponse_<ContainerAllocator> &) { return value(); } }; } // namespace service_traits } // namespace ros #endif // EPOC_SERVICE_FRECUENCIAS_H
228abc4c3fa5683bfdd62c4b97db4bef5158af8c
5acbe4bf01baaf5ddbc39e8d84a262fb357408b7
/Source/bwapi-clr-embedded/MonoBridge/Dll.cpp
b0e4eadd9f6a7732de07322b3a86ab705f947cba
[]
no_license
suegy/bwapi-mono-bridge2
ae737c8535091ab05de56905334d77a9edbeeb3f
6830bebfa09aa22d269ca6a768d407dff96dfe5d
refs/heads/master
2021-06-05T03:40:31.854566
2021-01-31T13:12:11
2021-01-31T13:12:11
32,186,770
15
3
null
null
null
null
UTF-8
C++
false
false
1,010
cpp
Dll.cpp
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <windows.h> #include <stdio.h> #include <tchar.h> #include <BWAPI.h> #include <string> #include "proxyAIModule.h" #include "Mono\Manager.h" using namespace std; wstring _dllDirectory; namespace BWAPI { Game* Broodwar; } BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { wchar_t* filename = new wchar_t[300]; GetModuleFileName((HMODULE) hModule, filename, 300); _dllDirectory = filename; _dllDirectory = _dllDirectory.substr(0, _dllDirectory.find_last_of('\\') + 1); BWAPI::BWAPI_init(); } break; case DLL_PROCESS_DETACH: break; } return TRUE; } extern "C" __declspec(dllexport) BWAPI::AIModule* newAIModule(BWAPI::Game* game) { BWAPI::Broodwar=game; Mono::Manager::GetInstance()->Init(_dllDirectory); return new proxyAIModule(); }
49e0e6f4b089fc72e2efb74111669ff9b81ca745
8abff2284b2d552bd45a7f3f6b97deb21b6be16d
/백준문제/10026(dfs).cpp
5ce215f726d900efd48535dd37e076bca1e4e4da
[]
no_license
Realhyeonwoo/study-algorithm
4cb43b89c242b12c5ae4bfed917f9696d6f68f34
e2f73583b34d6f4fc98c48140fa28d791e624480
refs/heads/master
2020-07-29T13:56:41.087057
2020-06-25T13:49:11
2020-06-25T13:49:11
209,330,552
0
0
null
null
null
null
UTF-8
C++
false
false
1,500
cpp
10026(dfs).cpp
#include<iostream> #include<cstring> using namespace std; int n; int map[100][100]; int backup[100][100]; bool visited[100][100] = {false, }; void copyMap(void) { for(int y=0; y<n; y++) { for(int x=0; x<n; x++) { backup[y][x] = map[y][x]; } } } void copyMap2(void) { for(int y=0; y<n; y++) { for(int x=0; x<n; x++) { if(map[y][x] == 3) { backup[y][x] = map[y][x]; } else { backup[y][x] = 1; } } } } void dfs(int y, int x, int color) { visited[y][x] = true; backup[y][x] = 0; int dy[] = {-1, 1, 0, 0}; int dx[] = {0, 0, -1, 1}; for(int dir=0; dir<4; dir++) { int ny = y + dy[dir]; int nx = x + dx[dir]; if(ny<0 || ny>=n || nx<0 || nx>=n) continue; if(visited[ny][nx] || backup[ny][nx] != color) continue; dfs(ny, nx, color); } } int main(void) { scanf("%d", &n); char temp; for(int y=0; y<n; y++) { for(int x=0; x<n; x++) { scanf("%1s", &temp); switch(temp) { case 'R': map[y][x] = 1; break; case 'G': map[y][x] = 2; break; case 'B': map[y][x] = 3; break; } } } copyMap(); int count = 0; for(int y=0; y<n; y++) { for(int x=0; x<n; x++) { if(backup[y][x] != 0) { count++; dfs(y, x, backup[y][x]); } } } copyMap2(); memset(visited, false, sizeof(visited)); int count2 = 0; for(int y=0; y<n; y++) { for(int x=0; x<n; x++) { if(backup[y][x] != 0) { count2++; dfs(y, x, backup[y][x]); } } } printf("%d %d \n", count, count2); return 0; }
c4bbccf00d6b912be2c9449a6f54ea5bf39818ab
240bfe1deb8041f03d5d968890e060486f26a95a
/lantern.ino
27081ec76197b0eb601f6aaeeff01dcf9fe78306
[]
no_license
swong838/lantern
d87d66f76726aca43917fc8be9ecf094973f5d1e
69e5b5690ca1cdb088ded4647a937e8c941b1a5b
refs/heads/master
2021-01-23T22:15:27.787665
2015-06-03T04:19:04
2015-06-03T04:19:04
35,131,623
0
0
null
2015-06-03T04:19:04
2015-05-06T00:51:09
Arduino
UTF-8
C++
false
false
4,727
ino
lantern.ino
#include <Adafruit_NeoPixel.h> #include <avr/power.h> /* LED info */ const int NUMPIXELS = 3, /* chip IO */ PIXEL_PIN = 1, /* modes */ STEADY = 0, FLARE = 1, GUTTER = 2, TICK_RATE = 10, LOW_B = 27, LOWISH_B = 36, MID_B = 75, HIGH_B = 200, MAX_B = 225; /* time */ const long RUNTIME = 14400000, // 4 hour time EXPIRE = millis() + RUNTIME; // permanently gutter out at this time long startTime = 0, // start prevTime = 0, // last clock tick() currentModeExpiry = 0; // time remaining in current mode /* instantiate Pixel object */ Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIXEL_PIN, NEO_GRB + NEO_KHZ800); /* operation mode*/ int mode = 0, pulseDuration = 0, // time remaining in current doIlluminate() action targetBrightness = 0, currentBrightness = 0, gutterPct = 0, flarePct = 6, steadyPct = 100 - gutterPct - flarePct; uint32_t getColorAndBrightnessFromRed(int red) { int green, blue; red = red % MAX_B; switch(mode) { case FLARE: green = red * .75; blue = red * .75; break; case GUTTER: blue = red * .5; green = blue * .4; red = blue * .45; break; default: green = red * .76; blue = red * .61; break; } return pixels.Color(red, green, blue); } void applyLighting(uint32_t targetColor) { int i; for(i=0; i < NUMPIXELS; i++) { pixels.setPixelColor(i, targetColor); } pixels.show(); } int getNewKeyBrightness() { int newBrightness; switch(mode) { case FLARE: newBrightness = random(MID_B, MAX_B); break; case GUTTER: newBrightness = random(LOW_B, LOWISH_B); break; default: newBrightness = random(HIGH_B, MAX_B); break; } return newBrightness; } void setModeRatios(){ long remainingLife = RUNTIME - (millis() - startTime); if (remainingLife < (RUNTIME/16)) { flarePct = 0; gutterPct = 100; steadyPct = 0; } else if(remainingLife < (RUNTIME/8)) { flarePct = 5; gutterPct = 25; steadyPct = 100 - flarePct - gutterPct; } else if(remainingLife < (RUNTIME/4)) { flarePct = 3; gutterPct = 7; steadyPct = 100 - flarePct - gutterPct; } } // return a code for a new mode int getNewMode() { int newMode = 0; int diceRoll = random(0, 100); if (diceRoll < steadyPct) { newMode = STEADY; } else if (diceRoll < flarePct) { newMode = FLARE; } else { newMode = GUTTER; } return newMode; } // figure out how long to stay in this mode long getModeDuration() { long duration = 0; switch(mode) { case FLARE: duration = random(500, 2000); break; case GUTTER: duration = random(2000, 5000); break; default: duration = random(18000, 30000); break; } return duration; } long getPulseDuration() { int pulse; switch(mode) { case FLARE: pulse = random(3, 6); break; case GUTTER: pulse = random(11, 15); break; default: pulse = random(45, 65); break; } return pulse; } void doIlluminate() { int delta = ((currentBrightness - targetBrightness) / pulseDuration) + 1, newRed = (currentBrightness - delta) % MAX_B; if (newRed <= 0 || newRed >= MAX_B || newRed == currentBrightness) { pulseDuration = 0; return; } else { currentBrightness = newRed; applyLighting(getColorAndBrightnessFromRed(newRed)); } } void setup() { randomSeed(analogRead(0)); #if defined (__AVR_ATtiny85__) if (F_CPU == 16000000) clock_prescale_set(clock_div_1); #endif // init neopixel library pixels.begin(); startTime = millis(); } void loop() { long currentTime = millis(); if (currentTime - prevTime > TICK_RATE) { prevTime = currentTime; if (currentModeExpiry <= currentTime) { setModeRatios(); mode = getNewMode(); currentModeExpiry = getModeDuration() + currentTime; pulseDuration = 0; } if (pulseDuration <= 0 || targetBrightness == currentBrightness) { pulseDuration = getPulseDuration(); targetBrightness = getNewKeyBrightness(); } doIlluminate(); pulseDuration--; } }
0162094514eca80422cd323536f6b23e57dd43eb
4753bc3fe56488aa0151279194eeb0d78e70c89c
/ABC81/C.cpp
822ba44f55423c08acec9a838585dedf049a7857
[]
no_license
juravrik/atcoder
bcf3d08e0640038b6b455d59c5617c17711b7b2b
30731cd45c73e53835434383fc8f8ea076fda22f
refs/heads/master
2020-03-28T07:15:52.220644
2019-09-16T06:49:43
2019-09-16T06:49:43
147,890,915
0
0
null
null
null
null
UTF-8
C++
false
false
538
cpp
C.cpp
#include<iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n,k,a, ans = 0; vector<int> lst; cin >> n >> k; for(int i = 0; i <= n; i++){ lst.push_back(0); } for(int i = 1; i <= n; i++){ cin >> a; lst[a]++; } sort(lst.begin(),lst.end()); int i = 0; for(i = 1; n - i >= k; i++){ if(lst[i] == 0){ continue; } ans += lst[i]; } cout << ans << endl; return 0; }
472b53753329a198ad23c3b3caf96aba15589a5f
e2d99638a72b570fdf611c3ec899e0b31dacfb9d
/MyInput/MyInput/LineCounter.cpp
2a25f88b09a26329ac297daa71a36b677429c4c5
[]
no_license
SigursteinnBjarni/School
a7a7e2f402933e8e6236dde6cb57efa05d226b58
0450a075f5f6adf5659b9a6ab0b95aa26a768e32
refs/heads/master
2016-09-06T18:49:26.571408
2015-08-28T16:45:49
2015-08-28T16:45:49
30,653,561
0
1
null
null
null
null
UTF-8
C++
false
false
178
cpp
LineCounter.cpp
#include "stdafx.h" #include "LineCounter.h" LineCounter::LineCounter(string path, ifstream infile) { m_path = path; m_inFile = infile; } LineCounter::~LineCounter() { }
06d9a11f123680e03697d3db6df259c6bb853f6e
70e5332463ef0da4702252ed3dcf7e2c8a61bba5
/include/Algorithms/PostProcessing/PostProcessor.h
98aeaa5440625ffcc7aad61cb7306144d7112a0e
[]
no_license
YuryUoL/AsKAlgorithm
8111587dc3ff94937aed354c57ce2c6f63c012d7
668b60d38c8f1f59fdcdfd5d9435ca4efd3235d8
refs/heads/master
2022-10-24T02:25:48.299802
2020-06-13T09:06:18
2020-06-13T09:06:18
268,553,339
1
0
null
null
null
null
UTF-8
C++
false
false
8,179
h
PostProcessor.h
#ifndef POSTPROCESSOR_H #define POSTPROCESSOR_H #include "Graph/Graph.h" #include <mlpack/core.hpp> #include "Algorithms/Convertors/npy.hpp" class PostProcessor { public: PostProcessor() {} static void CloudToNpy(std::string cloudout, arma::mat & cloud) { std::vector<std::vector<double>> cloudV(cloud.n_cols, std::vector<double>(cloud.n_rows)); for (int i = 0 ; i < cloud.n_cols; i++) { for (int j = 0; j < cloud.n_rows; j++) { cloudV[i][j] = cloud(j,i); } } std::vector<double> cloudVinv; PostProcessor::Convertor(cloudV, cloudVinv); const long unsigned leshape [] = {cloud.n_cols,cloud.n_rows}; npy::SaveArrayAsNumpy(cloudout, false, 2, leshape, cloudVinv); } static void GraphToNpy(std::string abstractGraph, std::string ConcreteGraph, std::string allocationOut, std::string pointIndicesOut, MyGraphType & G, std::vector<int> & allocation, std::vector<int> & origAlloc) { std::vector<std::vector<int>> edgeStructure(boost::num_edges(G), std::vector<int>(2)); std::vector<edge_descriptor> edges(boost::num_edges(G)); int dim = G[0].p.n_elem; std::vector<std::vector<double>> cloudV(boost::num_vertices(G), std::vector<double>(dim)); auto edgemass = boost::edges(G); int countt = 0; int maxDegree = 0; for (auto eit = edgemass.first; eit != edgemass.second; eit++) { edges[countt] = *eit; edgeStructure[countt][0] = boost::source(*eit,G); edgeStructure[countt][1] = boost::target(*eit,G); G[*eit].order = countt; countt++; } for (int i = 0; i < boost::num_vertices(G); i++) { int opq = boost::out_degree(i,G); maxDegree = std::max(maxDegree, opq); for (int j = 0; j < dim; j++) { cloudV[i][j] = G[i].p(j); } } std::vector<std::vector<int>> allocationArray(allocation.size(), std::vector<int>(maxDegree)); std::vector<std::vector<int>> pointAllocationArray(boost::num_vertices(G), std::vector<int>()); for (int i = 0; i < allocation.size(); i++) { pointAllocationArray[origAlloc[i]].push_back(i); int kk = boost::degree(allocation[i],G); int j = 0; auto bbb = boost::out_edges(allocation[i],G); for (auto it = bbb.first; it != bbb.second; it++) { allocationArray[i][j] = G[*it].order; j++; } for (int abc = j; abc < maxDegree; abc++) { allocationArray[i][abc] = allocationArray[i][0]; } } int maxSize = 0; for (int i = 0; i < boost::num_vertices(G); i++) { maxSize = std::max((int) pointAllocationArray[i].size(), maxSize); } for (int i = 0; i < boost::num_vertices(G); i++) { for (int j = pointAllocationArray[i].size(); j < maxSize; j++ ) { int kk = pointAllocationArray[i][0]; (pointAllocationArray[i]).push_back(kk); } } std::vector<int> edgeStructureReal; PostProcessor::Convertor(edgeStructure, edgeStructureReal); const long unsigned leshape [] = {boost::num_edges(G),2}; npy::SaveArrayAsNumpy(abstractGraph, false, 2, leshape, edgeStructureReal); std::vector<double> cloudVReal; PostProcessor::Convertor(cloudV, cloudVReal); const long unsigned leshapeTwo [] = {boost::num_vertices(G),dim}; npy::SaveArrayAsNumpy(ConcreteGraph, false, 2, leshapeTwo, cloudVReal); std::vector<int> allReal; PostProcessor::Convertor(allocationArray, allReal); const long unsigned leshapeThree [] = {allocation.size(),maxDegree}; npy::SaveArrayAsNumpy(allocationOut, false, 2, leshapeThree, allReal); std::vector<int> tmpAsdAsd; PostProcessor::Convertor(pointAllocationArray, tmpAsdAsd); const long unsigned leshapeFour [] = {boost::num_vertices(G),maxSize}; npy::SaveArrayAsNumpy(pointIndicesOut, false, 2, leshapeFour, tmpAsdAsd); } static void Convertor(std::vector<std::vector<double>> & in , std::vector<double> & out ) { //out.reserve(in.size() * in[0].size()); for (int i = 0; i < in.size(); i++) { for (int j = 0 ; j < in[i].size(); j++) { out.push_back(in[i][j]); } } } static void Convertor(std::vector<std::vector<int>> & in , std::vector<int> & out ) { //out.reserve(in.size() * in[0].size()); for (int i = 0; i < in.size(); i++) { for (int j = 0 ; j < in[i].size(); j++) { out.push_back(in[i][j]); } } } static void GraphToNpySimple(std::string abstractGraph, std::string ConcreteGraph, std::string allocationOut, MyGraphType & G, int numCloud) { std::vector<std::vector<int>> edgeStructure(boost::num_edges(G), std::vector<int>(2)); int dim = G[0].p.n_elem; auto edgemass = boost::edges(G); int countt = 0; for (auto eit = edgemass.first; eit != edgemass.second; eit++) { edgeStructure[countt][0] = boost::source(*eit,G); edgeStructure[countt][1] = boost::target(*eit,G); countt++; } const long unsigned leshape [] = {boost::num_edges(G),2}; //! Convertor(std::vector<std::vector<double>> & in , std::vector<double> & out ) std::vector<int> edgeStructureConv; PostProcessor::Convertor(edgeStructure , edgeStructureConv ); npy::SaveArrayAsNumpy(abstractGraph, false, 2, leshape, edgeStructureConv); std::vector<std::vector<double>> cloudV(boost::num_vertices(G), std::vector<double>(dim)); for (int i = 0; i < boost::num_vertices(G); i++) { for (int j = 0; j < dim; j++) { cloudV[i][j] = G[i].p(j); } } std::vector<double> cloudVConv; PostProcessor::Convertor(cloudV , cloudVConv ); const long unsigned leshapeTwo [] = {boost::num_vertices(G),dim}; npy::SaveArrayAsNumpy(ConcreteGraph, false, 2, leshapeTwo, cloudVConv); std::vector<std::vector<int>> allocationArray(numCloud, std::vector<int>(boost::num_edges(G))); for (int i = 0; i < numCloud; i++) { for (int j = 0; j < boost::num_edges(G); j++) { allocationArray[i][j] = j; } } std::vector<int> allocationArrayConv; PostProcessor::Convertor(allocationArray , allocationArrayConv ); const long unsigned leshapeThree [] = {numCloud, boost::num_edges(G)}; npy::SaveArrayAsNumpy(allocationOut, false, 2, leshapeThree, allocationArrayConv); } static void PostProcessSimple(std::string cloudout, std::string abstractGraph, std::string ConcreteGraph, std::string allocationOut, MyGraphType & G, arma::mat & cloud) { PostProcessor::CloudToNpy(cloudout, cloud); PostProcessor::GraphToNpySimple(abstractGraph, ConcreteGraph, allocationOut, G, cloud.n_cols); } // PostProcessor::PostProcess(this->cloudout, this->abstractGraphOut, this->concreateGraphOut, this->belonghoodOut, belonghood, G, Cloud); static void PostProcess(std::string cloudout, std::string abstractGraph, std::string ConcreteGraph, std::string allocationOut, std::string pointIndicesOut, MyGraphType & G, std::vector<int> & allocation, std::vector<int> & origAlloc, arma::mat & cloud) { PostProcessor::CloudToNpy(cloudout, cloud); PostProcessor::GraphToNpy(abstractGraph, ConcreteGraph, allocationOut, pointIndicesOut, G, allocation, origAlloc); // PostProcessor::GraphToNpy(abstractGraph, ConcreteGraph, allocationOut, G, allocation); } protected: private: }; #endif // POSTPROCESSOR_H
bb59f050f187565e1f29d8b17c285ed07fd7295b
9ac30f5474cab3460df50fcee31cd278d6fa6529
/Truffles/src/Commands/SolenoidToggle.cpp
31810d6febb6fb65d752b7fa1cb5bf57c1c3951f
[]
no_license
IronMustang3711/truffles
ea78998dd246921e25808e69698f70c634a33afd
ee89977deb9f5a3afe581edc712a6d972b0a6459
refs/heads/master
2021-01-11T15:50:26.104745
2017-03-17T23:17:51
2017-03-17T23:17:51
79,937,718
0
2
null
null
null
null
UTF-8
C++
false
false
347
cpp
SolenoidToggle.cpp
/* * SolenoidToggle.cpp * * Created on: Mar 6, 2017 * Author: jason */ #include "SolenoidToggle.h" #include <commands/InstantCommand.h> SolenoidToggle::SolenoidToggle(std::shared_ptr<Solenoid> ptr, std::string _name) : InstantCommand(_name), solenoid { ptr } { } void SolenoidToggle::Execute() { solenoid->Set(!solenoid->Get()); }
995fd017d93fe25d5f409e4586303520e56db5d8
ddf88474a14c12d9b9461b21ac3964a9ebbcd410
/Chapters/ClassesAndObjects/DataMembers.cpp
2033fecf38cf87d2257fa5d1e5c70685fc06d4c3
[]
no_license
tmurray19/CppEssentials
f0be6b8af86c11b2b33a9c4f3f144f4b507d99f9
7427215b7072cf314339f3adb01671e947c66dd7
refs/heads/master
2020-05-26T15:53:41.372417
2019-05-27T15:03:13
2019-05-27T15:03:13
188,294,469
0
0
null
null
null
null
UTF-8
C++
false
false
1,391
cpp
DataMembers.cpp
// You can create a class with either the class or the struct keyword // This also goes into accessors and mutators #include <cstdio> #include <string> using namespace std; // Structs default to public members struct testStruct { int iA; int iB; int iC; }; // Class defaults to private members class testClass { int iD; int iE; int iF; }; // The members in classes *should* be accessed and changed with accessors and mutators // like so class accessorsClass { // Initialise data members int intA = 0; string stringB = ""; int intC = 0; public: // Constructor accessorsClass(const int a, const string& b, const int intC) : intA(a), stringB(b), intC(3) {}; // Mutators void seta(const int a) { intA = a; } void setb(const string& b) { stringB = b; } void setc(const int c) { intC = c; } // Accessors int geta() const { return intA; } const string& getb() const { return stringB; } const char* getb_cstr() const { return stringB.c_str(); } int getc() const { return intC; } }; int dataMembers() { testStruct tS = { 1, 2, 3 }; testClass tC = {}; // This is legal, because a is a struct //a.iA = 4; // This is illegal, because b is a class //b.iA = 3; printf("iA is %d, iB is %d, iC is %d.\n", tS.iA, tS.iB, tS.iC); accessorsClass a(1, "two", 3); printf("intA is %d, stringB is %s, intC is %d.\n", a.geta(), a.getb_cstr(), a.getc()); return 0; return 0; }
1390bb0e674581e61611fbce774b8b1b2433f05e
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/vpc/src/v20170312/model/ModifyVpcAttributeRequest.cpp
26d861705a695d87a648a5b6cebd8fe31ea068c3
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp
9f5df8220eaaf72f7eaee07b2ede94f89313651f
42a76b812b81d1b52ec6a217fafc8faa135e06ca
refs/heads/master
2023-08-30T03:22:45.269556
2023-08-30T00:45:39
2023-08-30T00:45:39
188,991,963
55
37
Apache-2.0
2023-08-17T03:13:20
2019-05-28T08:56:08
C++
UTF-8
C++
false
false
5,440
cpp
ModifyVpcAttributeRequest.cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * 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 <tencentcloud/vpc/v20170312/model/ModifyVpcAttributeRequest.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using namespace TencentCloud::Vpc::V20170312::Model; using namespace std; ModifyVpcAttributeRequest::ModifyVpcAttributeRequest() : m_vpcIdHasBeenSet(false), m_vpcNameHasBeenSet(false), m_enableMulticastHasBeenSet(false), m_dnsServersHasBeenSet(false), m_domainNameHasBeenSet(false), m_enableCdcPublishHasBeenSet(false) { } string ModifyVpcAttributeRequest::ToJsonString() const { rapidjson::Document d; d.SetObject(); rapidjson::Document::AllocatorType& allocator = d.GetAllocator(); if (m_vpcIdHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "VpcId"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_vpcId.c_str(), allocator).Move(), allocator); } if (m_vpcNameHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "VpcName"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_vpcName.c_str(), allocator).Move(), allocator); } if (m_enableMulticastHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "EnableMulticast"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_enableMulticast.c_str(), allocator).Move(), allocator); } if (m_dnsServersHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "DnsServers"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); for (auto itr = m_dnsServers.begin(); itr != m_dnsServers.end(); ++itr) { d[key.c_str()].PushBack(rapidjson::Value().SetString((*itr).c_str(), allocator), allocator); } } if (m_domainNameHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "DomainName"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_domainName.c_str(), allocator).Move(), allocator); } if (m_enableCdcPublishHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "EnableCdcPublish"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, m_enableCdcPublish, allocator); } rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); d.Accept(writer); return buffer.GetString(); } string ModifyVpcAttributeRequest::GetVpcId() const { return m_vpcId; } void ModifyVpcAttributeRequest::SetVpcId(const string& _vpcId) { m_vpcId = _vpcId; m_vpcIdHasBeenSet = true; } bool ModifyVpcAttributeRequest::VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } string ModifyVpcAttributeRequest::GetVpcName() const { return m_vpcName; } void ModifyVpcAttributeRequest::SetVpcName(const string& _vpcName) { m_vpcName = _vpcName; m_vpcNameHasBeenSet = true; } bool ModifyVpcAttributeRequest::VpcNameHasBeenSet() const { return m_vpcNameHasBeenSet; } string ModifyVpcAttributeRequest::GetEnableMulticast() const { return m_enableMulticast; } void ModifyVpcAttributeRequest::SetEnableMulticast(const string& _enableMulticast) { m_enableMulticast = _enableMulticast; m_enableMulticastHasBeenSet = true; } bool ModifyVpcAttributeRequest::EnableMulticastHasBeenSet() const { return m_enableMulticastHasBeenSet; } vector<string> ModifyVpcAttributeRequest::GetDnsServers() const { return m_dnsServers; } void ModifyVpcAttributeRequest::SetDnsServers(const vector<string>& _dnsServers) { m_dnsServers = _dnsServers; m_dnsServersHasBeenSet = true; } bool ModifyVpcAttributeRequest::DnsServersHasBeenSet() const { return m_dnsServersHasBeenSet; } string ModifyVpcAttributeRequest::GetDomainName() const { return m_domainName; } void ModifyVpcAttributeRequest::SetDomainName(const string& _domainName) { m_domainName = _domainName; m_domainNameHasBeenSet = true; } bool ModifyVpcAttributeRequest::DomainNameHasBeenSet() const { return m_domainNameHasBeenSet; } bool ModifyVpcAttributeRequest::GetEnableCdcPublish() const { return m_enableCdcPublish; } void ModifyVpcAttributeRequest::SetEnableCdcPublish(const bool& _enableCdcPublish) { m_enableCdcPublish = _enableCdcPublish; m_enableCdcPublishHasBeenSet = true; } bool ModifyVpcAttributeRequest::EnableCdcPublishHasBeenSet() const { return m_enableCdcPublishHasBeenSet; }
211edadd21371b35f4d1108e046aa671e99ff404
7d016399123acf1f6064d9386bb4ed0c3a66990d
/CustomObject/QPerson.h
46f228b07e7ffb4a73cc9f99da753d517d75d823
[]
no_license
MarkChen16/QtDemo
ba6049529497ecb9bccf511824f056472fd17798
39fa89884789e02cf9d734c7062f1f8d9891605e
refs/heads/master
2020-04-18T02:02:36.230779
2019-03-01T09:05:43
2019-03-01T09:05:43
167,144,271
6
0
null
null
null
null
UTF-8
C++
false
false
1,365
h
QPerson.h
#pragma once #include <qobject.h> /* QT元对象系统的基类是QObject,可以支持在运行时获取对象类型所有的接口信息,包括类信息、函数、信号、槽、属性等等; QT元对象系统(MOS)的三大核心:信号/槽、运行时类型信息、动态属性; 注意:元对象类型在编译之前需要MOC预处理器转换成C++代码 */ class QPerson : public QObject { //使用信号、槽的类要包含Q_OBJECT宏 Q_OBJECT //定义类的信息 Q_CLASSINFO("author", "guiquan") Q_CLASSINFO("company", "dekey") Q_CLASSINFO("version", "1.1.0"); //定义类的属性 Q_PROPERTY(QString name READ name) //定义只读属性 Q_PROPERTY(int age READ age WRITE setAge NOTIFY ageChanged) //定义可读写属性,只指定改变时发射的信号 Q_PROPERTY(int score READ score WRITE setScore NOTIFY scoreChanged) //定义可读写属性,只指定改变时发射的信号 public: explicit QPerson(QString szName, int intAge, int intScore, QObject *parent = nullptr); virtual ~QPerson(); QString name(); int age(); void setAge(int value); void incAge(); int score(); void setScore(int value); signals: //定义两个信号(信号只有函数声明,不用实现) void ageChanged(int value); void scoreChanged(int score); private: QString m_name = ""; int m_age = 0; int m_score = 0; };
87bc26f0a4c6c11669e140b4a50d8cd06c6fc48b
7b257882453e1f5e21136c92f269b483b029bf2c
/Sources/Tests/IPC/UDPSocket_Test.cpp
95ea281bad0626738496df236ece2c0e48961f1f
[]
no_license
Aliar1st/MAL-master
3c5eb36538a5cc7abde8b6e2e935bcec17858d15
7b9f68fe418fdda626c3ab9b1b4e8e672e0227a2
refs/heads/master
2023-04-07T16:18:26.055604
2021-04-06T12:51:26
2021-04-06T12:58:27
355,187,108
0
0
null
null
null
null
UTF-8
C++
false
false
3,596
cpp
UDPSocket_Test.cpp
#include <gtest/gtest.h> #include "IPC/UDPSocket.h" #include "Socket_Test.h" namespace IPC_Tests { class UDPSocket_Test : public Socket_Test { protected: constexpr static const int UDP_SOCKET_PORT = 7523; UDPSocket socket; virtual Connection* getConnection() override { return &socket; } virtual Connection* mainThreadStart() override { [&]()->void {ASSERT_EQ(CONNECTION_RETURN_SUCCESS, socket.OpenBound(UDP_SOCKET_PORT));}(); return &socket; } virtual void mainThreadPreRead(Connection* mainThreadConnection) override { } virtual void mainThreadPostRead(Connection* mainThreadConnection) override { char* sourceAddress; socket_port_t sourcePort; socket.GetSourceAddress(&sourceAddress, &sourcePort); ASSERT_NE(nullptr, sourceAddress); ASSERT_NE(0, sourcePort); ASSERT_EQ(CONNECTION_RETURN_SUCCESS, socket.SetTargetAddress(sourceAddress, sourcePort)); delete[] sourceAddress; } virtual void mainThreadPostWrite(Connection* mainThreadConnection) override { } virtual void mainThreadEnd(Connection* mainThreadConnection) override { } virtual Connection* secondaryThreadStart(Connection* mainThreadConnection) override { UDPSocket* secondaryThreadSocket = new UDPSocket; [&]()->void {ASSERT_EQ(CONNECTION_RETURN_SUCCESS, secondaryThreadSocket->Open());}(); [&]()->void {ASSERT_EQ(CONNECTION_RETURN_SUCCESS, secondaryThreadSocket->SetTargetAddress("127.0.0.1", UDP_SOCKET_PORT));}(); return secondaryThreadSocket; } virtual void secondaryThreadPostWrite(Connection* secondaryThreadConnection, Connection* mainThreadConnection) override { } virtual void secondaryThreadPostRead(Connection* secondaryThreadConnection, Connection* mainThreadConnection) override { UDPSocket* secondaryThreadSocket = static_cast<UDPSocket*>(secondaryThreadConnection); char* sourceAddress; socket_port_t sourcePort; secondaryThreadSocket->GetSourceAddress(&sourceAddress, &sourcePort); ASSERT_NE(nullptr, sourceAddress); ASSERT_NE(0, sourcePort); delete[] sourceAddress; } virtual void secondaryThreadEnd(Connection* secondaryThreadConnection, Connection* mainThreadConnection) override { delete secondaryThreadConnection; } public: virtual void SetUp() override { } virtual void TearDown() override { } }; // ##### // TESTS // ##### TEST_F(UDPSocket_Test, InitialValues) { Socket_Test::InitialValues(); char* sourceAddress; socket_port_t sourcePort; socket.GetSourceAddress(&sourceAddress, &sourcePort); ASSERT_STREQ("", sourceAddress); ASSERT_EQ(static_cast<socket_port_t>(0), sourcePort); delete[] sourceAddress; } TEST_F(UDPSocket_Test, ManipulateUnopened) { Socket_Test::ManipulateUnopened(); ASSERT_EQ(CONNECTION_RETURN_ERROR_NOT_OPENED, socket.SetTargetAddress("", 0)); } TEST_F(UDPSocket_Test, Open) { ASSERT_EQ(CONNECTION_RETURN_SUCCESS, socket.Open()); ASSERT_TRUE(socket.IsOpened()); } TEST_F(UDPSocket_Test, OpenBound) { ASSERT_EQ(CONNECTION_RETURN_SUCCESS, socket.OpenBound(UDP_SOCKET_PORT)); ASSERT_TRUE(socket.IsOpened()); } TEST_F(UDPSocket_Test, ReadTimeout) { Socket_Test::ReadTimeout(); } TEST_F(UDPSocket_Test, ReadCancel) { Socket_Test::ReadCancel(); } TEST_F(UDPSocket_Test, ReadWriteArray) { Socket_Test::ReadWriteArray(); } TEST_F(UDPSocket_Test, ReadWriteSingle) { Socket_Test::ReadWriteSingle(); } TEST_F(UDPSocket_Test, ReadWriteString) { Socket_Test::ReadWriteString(); } TEST_F(UDPSocket_Test, IsError) { Socket_Test::IsError(); } }
9f15b86c5a8eff8ee5eb2d15054952cd5363f9e9
0934782cc900ef32616d3c5204bca05b2aa34032
/SDK/RC_WBP_RougeStatsScreen_parameters.hpp
27d560a84bea208ff637a828e5800c1eee006b08
[]
no_license
igromanru/RogueCompany-SDK-9-24-2020
da959376e5464e505486cf0df01fff71dde212cf
fcab8fd45cf256c6f521d94f295e2a76701c411d
refs/heads/master
2022-12-18T05:30:30.039119
2020-09-25T01:12:25
2020-09-25T01:12:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,598
hpp
RC_WBP_RougeStatsScreen_parameters.hpp
#pragma once // RogueCompany (4.24) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.RegisterScrollingInput struct UWBP_RougeStatsScreen_C_RegisterScrollingInput_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.NavigateBack struct UWBP_RougeStatsScreen_C_NavigateBack_Params { bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.GoBack struct UWBP_RougeStatsScreen_C_GoBack_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.TickScrolling struct UWBP_RougeStatsScreen_C_TickScrolling_Params { float* DeltaTime; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.ScrollReleased struct UWBP_RougeStatsScreen_C_ScrollReleased_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.ScrollDownPressed struct UWBP_RougeStatsScreen_C_ScrollDownPressed_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.ScrollUpPressed struct UWBP_RougeStatsScreen_C_ScrollUpPressed_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.SetupTabNavigation struct UWBP_RougeStatsScreen_C_SetupTabNavigation_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.GetPooledStatEntry struct UWBP_RougeStatsScreen_C_GetPooledStatEntry_Params { class UWBP_RogueStatsScreen_RogueEntry_C* StatEntry; // (Parm, OutParm, ZeroConstructor, InstancedReference, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.ReturnAllStatEntriesToPool struct UWBP_RougeStatsScreen_C_ReturnAllStatEntriesToPool_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.On_PnlStatEntries_SortCompareChildren_1 struct UWBP_RougeStatsScreen_C_On_PnlStatEntries_SortCompareChildren_1_Params { class UWidget** LHS; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) class UWidget** RHS; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.SelectStat struct UWBP_RougeStatsScreen_C_SelectStat_Params { EKSMercMasteryActivityType* ActivityType; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.AddStatTabs struct UWBP_RougeStatsScreen_C_AddStatTabs_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.Construct struct UWBP_RougeStatsScreen_C_Construct_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.Tick struct UWBP_RougeStatsScreen_C_Tick_Params { struct FGeometry* MyGeometry; // (BlueprintVisible, BlueprintReadOnly, Parm, IsPlainOldData) float* InDeltaTime; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.InitializeWidget struct UWBP_RougeStatsScreen_C_InitializeWidget_Params { class APUMG_HUD** HUD; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.BndEvt__KeyboardBackButton_K2Node_ComponentBoundEvent_2_OnBackButtonClicked__DelegateSignature struct UWBP_RougeStatsScreen_C_BndEvt__KeyboardBackButton_K2Node_ComponentBoundEvent_2_OnBackButtonClicked__DelegateSignature_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.InitializeWidgetNavigation struct UWBP_RougeStatsScreen_C_InitializeWidgetNavigation_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.InitializeWidgetButtonListeners struct UWBP_RougeStatsScreen_C_InitializeWidgetButtonListeners_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.OnShown struct UWBP_RougeStatsScreen_C_OnShown_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.OnBackPrompt struct UWBP_RougeStatsScreen_C_OnBackPrompt_Params { }; // Function WBP_RougeStatsScreen.WBP_RougeStatsScreen_C.ExecuteUbergraph_WBP_RougeStatsScreen struct UWBP_RougeStatsScreen_C_ExecuteUbergraph_WBP_RougeStatsScreen_Params { int* EntryPoint; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
10157161ac23288ed2b57d4c8bd36a40b4706c19
a85485b39ad5d79d7f37860ca9644ce88bfa4140
/src/main.cpp
84afa966e9f4d6f32831dd7665777ffdc57477fd
[]
no_license
YukiHaruna0824/VFX-HDRI
7e67c9c48c8e960a1aece67f1b02c6c0b499d61b
ca79ae701c5d39f82ed7747349276eedd9bdd816
refs/heads/master
2022-04-25T16:21:22.081652
2020-04-29T10:57:22
2020-04-29T10:57:22
256,172,489
0
0
null
null
null
null
UTF-8
C++
false
false
1,503
cpp
main.cpp
#include <iostream> #include "ImageUtils.h" #include "MTBUtils.h" #include <io.h> #include <direct.h> #include<opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> int main(int argc, char **argv) { if (argc < 2) { std::cout << "argument error !" << std::endl; return 0; } std::string inputFolder = argv[1]; std::string mtbFolder = "./mtb"; int n = _access(mtbFolder.c_str(), 0); if (n == -1) _mkdir(mtbFolder.c_str()); std::string radianceMapName = "./hdr.hdr"; std::string gCurveDataName = "./responseCurve.csv"; std::string ldr_imageName = "./ldr.jpg"; float lumin = 0.15; if (argc > 2) { lumin = std::stof(argv[2]); } int depth = 0; if (argc > 3) { depth = std::stof(argv[3]); } ImageUtils imgUtils; MTBUtils mtbUtils; //get image data imgUtils.parseImageInfo(inputFolder); std::vector<cv::Mat> images = imgUtils.getImages(); //image alignment mtbUtils.convertToMTB(images); mtbUtils.writeMtbImages(mtbFolder); mtbUtils.writeExImages(mtbFolder); mtbUtils.imageAlignment(images.size() / 2, depth); mtbUtils.writeAlignImages(mtbFolder); //convert to hdr std::vector<cv::Mat> alignImages = mtbUtils.getAlignImages(); imgUtils.setAlignImages(alignImages); imgUtils.gSamplePixel(225); imgUtils.gSolve(10); imgUtils.writeGCurveData(gCurveDataName); imgUtils.getRadianceMap(); imgUtils.writeHdr(radianceMapName); //tonemapping imgUtils.toneMappingByReinhard(lumin); imgUtils.writeLdrImage(ldr_imageName); return 0; }
79a47f534f0cec786df9fe36bb515e04a06e1df9
d01196cdfc4451c4e1c88343bdb1eb4db9c5ac18
/source/client/hud/hud.cpp
0d24356b40fa9cb86dabd39df619fc07dbb83401
[]
no_license
ferhan66h/Xash3D_ancient
7491cd4ff1c7d0b48300029db24d7e08ba96e88a
075e0a6dae12a0952065eb9b2954be4a8827c72f
refs/heads/master
2021-12-10T07:55:29.592432
2010-05-09T00:00:00
2016-07-30T17:37:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,524
cpp
hud.cpp
//======================================================================= // Copyright (C) XashXT Group 2007 //======================================================================= #include "extdll.h" #include "utils.h" #include "hud.h" #include "triangle_api.h" void CHud :: Init( void ) { InitMessages(); m_Zoom.Init(); // must be first m_Ammo.Init(); m_Health.Init(); m_SayText.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Redeemer.Init(); m_Message.Init(); m_Scoreboard.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); m_Menu.Init(); m_Sound.Init(); m_MOTD.Init(); MsgFunc_ResetHUD( 0, 0, NULL ); } CHud :: ~CHud( void ) { delete [] m_rghSprites; delete [] m_rgrcRects; delete [] m_rgszSpriteNames; m_Sound.Close(); if( m_pHudList ) { HUDLIST *pList; while( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; FREE( pList ); } m_pHudList = NULL; } } int CHud :: GetSpriteIndex( const char *SpriteName ) { // look through the loaded sprite name list for SpriteName for( int i = 0; i < m_iSpriteCount; i++ ) { if(!strncmp( SpriteName, m_rgszSpriteNames + (i * MAX_SPRITE_NAME_LENGTH), MAX_SPRITE_NAME_LENGTH )) return i; } return -1; // invalid sprite } void CHud :: VidInit( void ) { // ---------- // Load Sprites // --------- m_hsprCursor = 0; m_hHudError = 0; spot = NULL; // clear intermission spot Draw_VidInit (); ClearAllFades (); if( CVAR_GET_FLOAT( "hud_scale" )) m_scrinfo.iFlags = SCRINFO_VIRTUALSPACE; else m_scrinfo.iFlags = 0; // setup screen info GetScreenInfo( &m_scrinfo ); // Only load this once if ( !m_pSpriteList ) { // we need to load the hud.txt, and all sprites within m_pSpriteList = SPR_GetList( "scripts/hud.txt", &m_iSpriteCount ); if( m_pSpriteList ) { // allocated memory for sprite handle arrays m_rghSprites = new HSPRITE[m_iSpriteCount]; m_rgrcRects = new wrect_t[m_iSpriteCount]; m_rgszSpriteNames = new char[m_iSpriteCount * MAX_SPRITE_NAME_LENGTH]; client_sprite_t *p = m_pSpriteList; for ( int j = 0; j < m_iSpriteCount; j++ ) { m_rghSprites[j] = SPR_Load( p->szSprite ); m_rgrcRects[j] = p->rc; strncpy( &m_rgszSpriteNames[j * MAX_SPRITE_NAME_LENGTH], p->szName, MAX_SPRITE_NAME_LENGTH ); p++; } } else { ALERT( at_warning, "hud.txt couldn't load\n" ); CVAR_SET_FLOAT( "hud_draw", 0 ); return; } } else { // engine may be release unused shaders after reloading map or change level // loading them again here client_sprite_t *p = m_pSpriteList; for( int j = 0; j < m_iSpriteCount; j++ ) { m_rghSprites[j] = SPR_Load( p->szSprite ); p++; } } // assumption: number_1, number_2, etc, are all listed and loaded sequentially m_HUD_number_0 = GetSpriteIndex( "number_0" ); m_iFontHeight = GetSpriteRect( m_HUD_number_0 ).bottom - GetSpriteRect( m_HUD_number_0 ).top; // loading error sprite m_HUD_error = GetSpriteIndex( "error" ); m_hHudError = GetSprite( m_HUD_error ); m_Sound.VidInit(); m_Ammo.VidInit(); m_Health.VidInit(); m_Geiger.VidInit(); m_Train.VidInit(); m_Battery.VidInit(); m_Flash.VidInit(); m_Redeemer.VidInit(); m_Zoom.VidInit(); m_MOTD.VidInit(); m_Message.VidInit(); m_Scoreboard.VidInit(); m_StatusBar.VidInit(); m_DeathNotice.VidInit(); m_SayText.VidInit(); m_Menu.VidInit(); m_AmmoSecondary.VidInit(); m_TextMessage.VidInit(); m_StatusIcons.VidInit(); } void CHud :: Think( void ) { HUDLIST *pList = m_pHudList; while( pList ) { if (pList->p->m_iFlags & HUD_ACTIVE) pList->p->Think(); pList = pList->pNext; } // think about default fov float def_fov = CVAR_GET_FLOAT( "default_fov" ); if( m_flFOV == 0.0f ) m_flFOV = max( CVAR_GET_FLOAT( "default_fov" ), 90 ); // change sensitivity if( m_flFOV == def_fov ) { m_flMouseSensitivity = 0; } else { // set a new sensitivity that is proportional to the change from the FOV default m_flMouseSensitivity = CVAR_GET_FLOAT( "sensitivity" ) * ( m_flFOV / def_fov ); m_flMouseSensitivity *= CVAR_GET_FLOAT( "zoom_sensitivity_ratio" ); // apply zoom factor } } int CHud :: UpdateClientData( void ) { edict_t *pClient = GetLocalPlayer (); if( !pClient || pClient->v.health <= 0.0f ) return 0; // client is dead memcpy( m_vecOrigin, pClient->v.origin, sizeof( vec3_t )); memcpy( m_vecAngles, pClient->v.angles, sizeof( vec3_t )); // detect movetype m_iNoClip = (pClient->v.movetype == MOVETYPE_NOCLIP) ? 1 : 0; m_iKeyBits = CL_ButtonBits( 0 ); m_iWeaponBits = pClient->v.weapons; Think(); v_idlescale = m_iConcussionEffect; CL_ResetButtonBits( m_iKeyBits ); return 1; } int CHud :: Redraw( float flTime ) { m_fOldTime = m_flTime; // save time of previous redraw m_flTime = flTime; m_flTimeDelta = (double)m_flTime - m_fOldTime; static float m_flShotTime; // clock was reset, reset delta if( m_flTimeDelta < 0 ) m_flTimeDelta = 0; m_iDrawPlaque = 1; // clear plaque stuff // draw screen fade before hud DrawScreenFade(); // take a screenshot if the client's got the cvar set if( CVAR_GET_FLOAT( "hud_takesshots" )) { if( m_flTime > m_flShotTime ) { CLIENT_COMMAND( "screenshot\n" ); m_flShotTime = m_flTime + 0.04f; } } // redeemer hud stuff if( m_Redeemer.m_iHudMode > 0 ) { m_Redeemer.Draw( flTime ); return 1; } // custom view active, and flag "draw hud" isn't set if(( viewFlags & CAMERA_ON ) && !( viewFlags & DRAW_HUD )) return 1; if( CVAR_GET_FLOAT( "hud_draw" )) { HUDLIST *pList = m_pHudList; while( pList ) { if( !m_iIntermission ) { if(( pList->p->m_iFlags & HUD_ACTIVE ) && !(m_iHideHUDDisplay & HIDEHUD_ALL )) pList->p->Draw( flTime ); } else { // it's an intermission, so only draw hud elements // that are set to draw during intermissions if( pList->p->m_iFlags & HUD_INTERMISSION ) pList->p->Draw( flTime ); } pList = pList->pNext; } } return 1; } int CHud :: DrawHudString( int xpos, int ypos, int iMaxX, char *szIt, int r, int g, int b ) { // draw the string until we hit the null character or a newline character for( ; *szIt != 0 && *szIt != '\n'; szIt++ ) { int next = xpos + gHUD.m_scrinfo.charWidths[*szIt]; // variable-width fonts look cool if ( next > iMaxX ) return xpos; TextMessageDrawChar( xpos, ypos, *szIt, r, g, b ); xpos = next; } return xpos; } int CHud :: DrawHudNumberString( int xpos, int ypos, int iMinX, int iNumber, int r, int g, int b ) { char szString[32]; sprintf( szString, "%d", iNumber ); return DrawHudStringReverse( xpos, ypos, iMinX, szString, r, g, b ); } int CHud :: DrawHudStringReverse( int xpos, int ypos, int iMinX, char *szString, int r, int g, int b ) { // find the end of the string for ( char *szIt = szString; *szIt != 0; szIt++ ) { // we should count the length? } // iterate throug the string in reverse for( szIt--; szIt != (szString-1); szIt-- ) { int next = xpos - gHUD.m_scrinfo.charWidths[ *szIt ]; // variable-width fonts look cool if( next < iMinX ) return xpos; xpos = next; TextMessageDrawChar( xpos, ypos, *szIt, r, g, b ); } return xpos; } int CHud :: DrawHudNumber( int x, int y, int iFlags, int iNumber, int r, int g, int b ) { int iWidth = GetSpriteRect( m_HUD_number_0 ).right - GetSpriteRect( m_HUD_number_0 ).left; int k; if( iNumber > 0 ) { // SPR_Draw 100's if( iNumber >= 100 ) { k = iNumber / 100; SPR_Set(GetSprite(m_HUD_number_0 + k), r, g, b ); SPR_DrawAdditive( 0, x, y, &GetSpriteRect(m_HUD_number_0 + k)); x += iWidth; } else if( iFlags & DHN_3DIGITS ) { x += iWidth; } // SPR_Draw 10's if( iNumber >= 10 ) { k = (iNumber % 100)/10; SPR_Set(GetSprite(m_HUD_number_0 + k), r, g, b ); SPR_DrawAdditive( 0, x, y, &GetSpriteRect(m_HUD_number_0 + k)); x += iWidth; } else if( iFlags & (DHN_3DIGITS|DHN_2DIGITS)) { x += iWidth; } // SPR_Draw ones k = iNumber % 10; SPR_Set(GetSprite(m_HUD_number_0 + k), r, g, b ); SPR_DrawAdditive(0, x, y, &GetSpriteRect(m_HUD_number_0 + k)); x += iWidth; } else if( iFlags & DHN_DRAWZERO ) { SPR_Set(GetSprite(m_HUD_number_0), r, g, b ); // SPR_Draw 100's if( iFlags & DHN_3DIGITS ) { x += iWidth; } if( iFlags & (DHN_3DIGITS|DHN_2DIGITS)) x += iWidth; SPR_DrawAdditive( 0, x, y, &GetSpriteRect(m_HUD_number_0)); x += iWidth; } return x; } int CHud::GetNumWidth( int iNumber, int iFlags ) { if( iFlags & (DHN_3DIGITS)) return 3; if( iFlags & (DHN_2DIGITS)) return 2; if( iNumber <= 0 ) { if( iFlags & (DHN_DRAWZERO)) return 1; else return 0; } if( iNumber < 10 ) return 1; if( iNumber < 100 ) return 2; return 3; } void CHud::AddHudElem( CHudBase *phudelem ) { HUDLIST *pdl, *ptemp; if( !phudelem ) return; pdl = (HUDLIST *)CALLOC( sizeof( HUDLIST ), 1 ); pdl->p = phudelem; if( !m_pHudList ) { m_pHudList = pdl; return; } ptemp = m_pHudList; while( ptemp->pNext ) ptemp = ptemp->pNext; ptemp->pNext = pdl; }
bcb82d09e940c89879e1bd726cb21e1f4442ad57
016c4ca9ea582ac1f71bea5c485c5a74fa71d4e3
/ImageReconstruction/Master/Ellipse.cpp
4cb8b562fdbb709377052da80ddb25166c04ae06
[]
no_license
jackjoynson/MedicalImaging
bad71569f6af4c3b46c63f739fc920a7e1354e78
55bb413132d6770329d079b32e4dc2faeb1c4747
refs/heads/master
2021-05-11T07:10:21.083577
2018-03-17T11:04:36
2018-03-17T11:04:36
118,009,298
0
0
null
null
null
null
UTF-8
C++
false
false
272
cpp
Ellipse.cpp
#include "Ellipse.h" Ellipse::Ellipse(Vector3D center, Vector3D majorAxis, Vector3D minorAxis, double majorRadius, double minorRadius) { SetCenter(center); SetMajorAxis(majorAxis); SetMinorAxis(minorAxis); SetMajorRadius(majorRadius); SetMinorRadius(minorRadius); }
af8580b7ea35bed9cebf044cdeabb5ffddbb54a6
65fc85ed595c778e46973ddd24f6f75059f9e84e
/601 - 800/767. Reorganize String.cc
16469dce834478904e2cfec57855fb1aa8387237
[]
no_license
zzzmfps/LeetCode
a39c25ccfa5891c9ad895350b30f0f2e98cdc636
8d5576eb2b82a0b575634c14367527560c1ec5d5
refs/heads/master
2021-10-10T01:06:40.123201
2021-09-28T03:33:25
2021-09-28T03:33:25
122,027,173
0
0
null
null
null
null
UTF-8
C++
false
false
906
cc
767. Reorganize String.cc
// 4ms, 100.0%; 8.6MB, 100.0% #include <bits/stdc++.h> using namespace std; static int x = []() { ios_base::sync_with_stdio(false); cin.tie(nullptr); return 0; }(); class Solution { public: string reorganizeString(string &S) { unordered_map<char, int> count; for (const auto c : S) ++count[c]; string res = ""; char tmp = ' '; while (!count.empty()) { auto iter = max_element(count.begin(), count.end(), [tmp](const auto &x, const auto &y) { return (x.first == tmp) ? true : (y.first == tmp) ? false : x.second < y.second; }); if (tmp == iter->first) return ""; tmp = iter->first; res += tmp; if (iter->second == 1) { count.erase(iter); } else { --iter->second; } } return res; } };
1575a910a1dfc318c53aa65a8ba632df1f983b20
7bae87b1c9a07a1ff5c99427a83e8dc5833ebb99
/Assignment1/Assignment1/Test.cpp
d19e45525d214592b690b54a5fce280dc228dd68
[]
no_license
xianchen97/COMP_3512_Assignment1
0b5a941aa93cae81a108f2754b455981f02dce61
99f72bb67484f9cae95ac184c6e7f6c0216d144f
refs/heads/master
2021-04-09T17:05:51.775689
2018-03-22T06:55:07
2018-03-22T06:55:07
125,881,760
0
0
null
null
null
null
UTF-8
C++
false
false
863
cpp
Test.cpp
#include "PageRank.hpp" int main() { using std::cout; using std::endl; PageRank a = PageRank("c:\\test.txt"); a.importance(); a.print_prob_matrix(); a.generateQ(); cout << "\n"; a.print_matrix_Q(); a.transition(); a.multiply(); a.print_dynamical(); a.print_percent(); cout << "\nExpected Values: \n " << 0.3175 << "\n" << 0.3175 << "\n" << 0.3175 << "\n" << 0.476 << endl; PageRank b = PageRank("c:\\test2.txt"); b.importance(); b.print_prob_matrix(); b.generateQ(); cout << "\n"; b.print_matrix_Q(); b.transition(); b.multiply(); b.print_dynamical(); b.print_percent(); cout << "\nExpected Values: \n " << 0.130816 << "\n" << 0.268108 << "\n" << 0.018188 << "\n" << 0.054727 << "\n" << 0.108890 << "\n" << 0.079365 << "\n" << 0.128962 << "\n" << 0.015000 << "\n" << 0.123972 << "\n" << 0.071973 << "\n" << endl; system("pause"); }
2bbe9525181c4e3a402770616550fab5c07e4c17
08772fd735df9305fda64c07b64fb70ed3b5a4d5
/file.cpp
d979dbb7a22649a499585aa38603e0a0db9fc1fd
[]
no_license
KDE/stackfolder
cd38406c299af423a7099b38da68150adcf95bc1
24db0276a5f354e99f2009b7689a5e7a9433210b
refs/heads/master
2021-05-16T03:13:22.982407
2018-12-29T11:23:21
2018-12-29T11:23:21
42,733,792
2
0
null
null
null
null
UTF-8
C++
false
false
1,794
cpp
file.cpp
/* StackFolder * Copyright © 2012 ROSA <support@rosalab.ru> * License: GPLv2+ * Authors: Ural Mullabaev <ural.mullabaev@rosalab.ru> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "file.h" File::File(QObject *parent) : QObject(parent) { m_name = ""; m_iconName = ""; m_pixmap = 0; m_path = ""; } QString File::name() const { return m_name; } QString File::iconName() const { return m_iconName; } QPixmap File::pixmap() const { return m_pixmap; } QString File::path() const { return m_path; } void File::setName(const QString &str) { if(str != m_name){ m_name = str; emit nameChanged(); } } void File::setIconName(const QString &str) { if(str != m_iconName) { m_iconName = str; emit iconNameChanged(); } } void File::setPixmap(const QPixmap &px) { m_pixmap = px; emit pixmapChanged(); } void File::setPath(const QString &str) { if(str != m_path) { m_path = str; emit pathChanged(); } }
44da467c149ad8833041add04465c9df74abe9af
6d6d408af32b6ce6ef2529e65d7543d8d41082e3
/Chapter_15/hw_15_4_sales/src/sales.cpp
53d8aaaffdafe0caa4ecb23c999e4769898a23b9
[]
no_license
eugene-bogorodsk/S_Prata_Prime_C-_exercise
52e52b59e26bfb2f33a344a57c97b69b74ede060
1a6dd062e42ac4515df81f23bd425a5a85a05199
refs/heads/master
2020-08-28T22:51:08.657340
2019-12-19T08:50:58
2019-12-19T08:50:58
217,844,234
0
0
null
null
null
null
UTF-8
C++
false
false
1,651
cpp
sales.cpp
//============================================================================ // Name : sales.cpp // Author : // Version : implementation of Sales // Copyright : Your copyright notice // Description : listing 15.15 //============================================================================ #include <iostream> #include "sales.h" using std::string; Sales::bad_index::bad_index(int ix,const string& s): std::logic_error(s),bi(ix){} Sales::Sales(int yy) { year=yy; for(int i=0;i<MONTHS;++i) gross[i]=0; } Sales::Sales(int yy,const double* gr,int n) { year=yy; int lim=(n<MONTHS) ? n:MONTHS; int i; for(i=0;i<lim;++i) gross[i]=gr[i]; //for i>n and i<MONTHS for(;i<MONTHS;++i) gross[i]=0; } double Sales::operator[](int i) const { if(i<0 || i>=MONTHS) { Sales::bad_index* bi= new bad_index(i); throw bi; } return gross[i]; } double& Sales::operator [](int i) { if(i<0 || i>= MONTHS) { Sales::bad_index* bi= new bad_index(i); throw bi; } return gross[i]; } LabeledSales::nbad_index::nbad_index(const string& lb,int ix, const string& s): Sales::bad_index(ix,s) { lbl=lb; } LabeledSales::LabeledSales(const string& lb,int yy): Sales(yy) { label=lb; } LabeledSales::LabeledSales(const string& lb,int yy,const double* gr,int n): Sales(yy,gr,n) { label=lb; } double LabeledSales::operator[](int i) const { if(i<0 || i>=MONTHS) { Sales::bad_index *bi= new nbad_index(Label(),i); throw bi; } return Sales::operator[](i); } double& LabeledSales::operator[](int i) { if(i<0 || i>=MONTHS) { Sales::bad_index *bi= new nbad_index(Label(),i); throw bi; } return Sales::operator[](i); }
0f5c530a1c204725853b7f3847cedb8e300efd91
da5a910b3e7e2020dd499b6e8b47868c6eb89747
/Types of LL/Basic_QuickSort.cpp
7fe48d608756f5d11e93863d1f2a5901d8532169
[]
no_license
adni03/DSA-Program-Files
862513f30490dab5fa76bae943e2177ae7c678bc
e9ddecbc50859b6abd35e801d6b8cee65b44ebed
refs/heads/master
2020-05-25T01:56:52.929175
2019-05-20T04:21:09
2019-05-20T04:28:15
187,566,587
0
0
null
null
null
null
UTF-8
C++
false
false
724
cpp
Basic_QuickSort.cpp
//QUICK SORT #include<iostream> using namespace std; void swap(int &a, int &b) { int temp=0; temp=a; a=b; b=temp; } int part(int arr[], int low, int high) { int pivot=arr[high]; int i=low-1; for(int j=low; j<high; j++) { if(arr[j]<=pivot) { ++i; swap(arr[i],arr[j]); } } swap(arr[i+1],arr[high]); return (i+1); } void quicksort(int arr[], int low, int high) { int pi; if(low<high) { pi=part(arr,low,high); quicksort(arr,low,pi-1); quicksort(arr,pi+1,high); } } int main() { int a[6] = {16,17,4,33,2,55}; cout<<"Unsorted array : "; for(int i=0; i<6; i++){ cout<<a[i]<<" "; } quicksort(a,0,5); cout<<"\nSorted array is : "; for(int i=0; i<6; i++) cout<<a[i]<<" "; return 0; }
74a1b02382aed8944946edfe5f8714a30a5a5f88
56e1510b3019e935d7055777d45b6adcbce8caa7
/cpp/lib/gui/include/util.hpp
0e977a354da4eaff19c0bff8144b2fb41fd5ae41
[]
no_license
darfRaider/PendulumCart
f5da510df45a928e7355ff35cec1b0e10ea836f4
462fe10f6f3f12f53c7d5e763485ae3211d39dba
refs/heads/master
2022-11-06T22:14:26.672181
2020-07-19T19:11:32
2020-07-19T19:11:32
269,172,458
0
1
null
2020-07-01T12:07:38
2020-06-03T19:09:09
C++
UTF-8
C++
false
false
461
hpp
util.hpp
#ifndef UTIL_HPP #define UTIL_HPP #include <iostream> #include "QLineEdit" // Following definitions to keep track of input fields static const int N_TEST_FIELDS = 6; #define IDX_MASS_PENDULUM 0 #define IDX_MASS_CART 1 #define IDX_LENGTH 2 #define IDX_SIM_TIME 3 #define IDX_SIM_TIMESTEP 4 #define IDX_INT_TIMESTEP 5 // Test if Line value is valid bool isValidEntry(QLineEdit* ln); bool valuesAreValid(const bool* list); #endif
974ec7512e78b13a698911886a8af6ebb6e74262
32da723b5c759c98845249bb51332109014b4f62
/DesignAndAnalizeAlgorithmsCourse/FastAlgorithms/103.FacebookContest/BasicGeometry.cpp
f8bb3d41bfccd4a4858ff4caab8979d2265f23c9
[]
no_license
IliyanKafedzhiev/FacultyOfMathematicAndInformatic
b8a810ca1100cc0f39c1460f60eb014e4c0b5ffc
a2b05a9aa7e677609447c0311ee79552464434ce
refs/heads/master
2020-07-06T04:19:30.531000
2015-03-02T21:54:42
2015-03-02T21:54:42
18,809,355
1
0
null
null
null
null
UTF-8
C++
false
false
997
cpp
BasicGeometry.cpp
#include <iostream> #include <vector> #include <queue> #include <map> #include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <stdio.h> #include <deque> #include <queue> #include <stack> #include <assert.h> using namespace std; typedef long long ll; typedef long double ld; const ld eps = 1e-12; bool nula(ld x){ return x < eps && x > -eps; } int sign(ld x){ if (x < -eps)return-1; else if (x > eps)return 1; else return 0; } namespace Geometry { struct Point{ ld x, y; bool real; Point(ld _x = 0, ld _y = 0) :x(_x), y(_y), real(true){} ld dist2(const Point& p){ return (x - p.x)*(x - p.x) + (y - p.y)*(y - p.y); } ld dist(const Point& p){ return sqrt(dist2(p)); } static ld area(const Point& a, const Point& b, const Point& c) { return (a.x*b.y+b.x*c.y+c.x*a.y-a.y*b.x-b.y*c.x-c.y*a.x)*0.5; } }; } using namespace Geometry; int main() { Point a(0, 0), b(5, 0), c(0, 5); ld area = Point::area(a, b, c); assert(area == 12.5); return 0; }
ca23278576ad9b5c3fcc83ee2f8dddb5bedf083d
ebd837ade84fcd2acf66ec9137a9eab93b76ab26
/B62_Projet_1/h/RLEReader.h
87de875b7840ad6074d41f9bb4c9603e1960a239
[]
no_license
Alexandre-Gauthier/Game-of-Life
d85b2c3d9e1eef2765fca82e2476165cfeaa607e
7fd8417d19aa20b693e2b2ccb31c2c3af8c0eb35
refs/heads/master
2021-01-02T11:35:25.930047
2020-02-10T20:29:59
2020-02-10T20:29:59
239,605,435
0
0
null
null
null
null
ISO-8859-1
C++
false
false
1,434
h
RLEReader.h
//CoursB62 //Classe permettant la lecture de fichier RLE //Date de création : 10 Mars 2019 //Auteurs: // - Hugo Turgeon-Nozaki #ifndef RLE_READER_H #define RLE_READER_H #include <string> class Space; class Rule; class RLEReader { public: RLEReader(); ~RLEReader(); bool read(std::string const & fileName, Space & space, std::vector<Rule> & rule); bool isComment(std::string const & line); bool isSeparator(std::string const & line); bool regexCheck(std::string const & line, std::string const & regex); bool isStandardRLEFile(std::ifstream & stream, std::string & line); void setSize(std::string const & line); void setStartingPoint(int widht, int height); void modifyMultiplier(int & multiplier, char const & c); bool isNumber(char const & c); void treatCharcter(char const & c, Space & space); void addInactive(Space & space); void addActive(Space & space); void endOfRow(Space & space); void endOfFile(); private: const std::string commentRegex = "#[CcNORr] .*"; const std::string separatorRegex = "x = [0-9]*, y = [0-9]*(, rule = [Bb]?[0-9]*\\/[Ss]?[0-9]*)?"; char mLastChar; int mMultiplier, mCurrentXPosition, mStartingXPosition, mCurrentYPosition, mStartingYPosition, mFileXSize, mFileYSize; void setRule(std::string const & line, std::vector<Rule> & rule); char charToNumber(char c); bool mFileOver, mFileXSizeRespected, mFileYSizeRespected; int mLineCounter; }; #endif
b7612ea4d8eccc2e5504a13774d4902cbd206c38
3e0a92e3b52e751bc173e21d96bb8606241ee7fd
/ProblemPool/string_radix/radix.cpp
a0b99a564bbf5b4dc2d47c01501f30d6cc05e1eb
[]
no_license
socc-io/algostudy
17b923492fa93cb7ab8ac4e6611766a85d4afc36
70c6d249033f8e5bc2288a347e50cc5eeab85c1c
refs/heads/master
2023-03-03T13:12:19.875684
2023-02-19T09:45:23
2023-02-19T09:45:28
28,948,738
9
3
null
2016-01-24T07:31:11
2015-01-08T04:25:40
C++
UTF-8
C++
false
false
823
cpp
radix.cpp
#include <stdio.h> int main(){ int i,j; int d,r; int flag=0,tmp; int flag1 = 0; char ans[20000] = {0, }; scanf("%d %d",&d,&r); tmp = d; if(d == 1){ printf("1"); return 0; } while(tmp >= r){ tmp = tmp/r; flag++; } tmp = d; if(d < r){ if(d > 9) ans[flag1] = (d-10)+'A'; else ans[flag1] = d+'0'; printf("%c",ans[flag1]); return 0; } for(i=1;i<=flag;i++){ if(i < flag){ if(tmp % r > 9) ans[flag1] = (tmp%r-10)+'A'; else ans[flag1] = tmp%r+'0'; flag1++; tmp = tmp/r; } else if(i == flag){ if(tmp % r > 9) ans[flag1] = (tmp%r-10)+'A'; else ans[flag1] = tmp%r+'0'; flag1++; //ans[flag1] = tmp/r+'0'; if(tmp / r > 9) ans[flag1] = (tmp/r-10)+'A'; else ans[flag1] = tmp/r+'0'; } } for(j=flag1 ; j>=0 ; j--){ printf("%c",ans[j]); } return 0; }
d46a4a4ab1672ddcd4de9bb445783c8b3f6ce0ab
60ee4b43921e9063bc7751e3238888285d098566
/include/game.hpp
9be80c4e634dda6d5649dc9d18f1e7c60036fd06
[ "BSD-2-Clause" ]
permissive
rondojim/Role-Playing-Game
6da46e133e31de188536877fc21b331b36c7966d
4e13b8282fea42db4fbbd46f7a0db60e515f70d0
refs/heads/main
2023-03-21T02:40:21.334828
2021-03-12T16:27:54
2021-03-12T16:27:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,812
hpp
game.hpp
/* file: game.hpp */ #pragma once #define RESET "\033[0m" #define BLACK "\033[30m" /* Black */ #define RED "\033[31m" /* Red */ #define GREEN "\033[32m" /* Green */ #define YELLOW "\033[33m" /* Yellow */ #define BLUE "\033[34m" /* Blue */ #define MAGENTA "\033[35m" /* Magenta */ #define CYAN "\033[36m" /* Cyan */ #define WHITE "\033[37m" /* White */ #define BOLDBLACK "\033[1m\033[30m" /* Bold Black */ #define BOLDRED "\033[1m\033[31m" /* Bold Red */ #define BOLDGREEN "\033[1m\033[32m" /* Bold Green */ #define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */ #define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */ #define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */ #define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */ #define BOLDWHITE "\033[1m\033[37m" /* Bold White */ const unsigned int N = 10, M = 10; // grid dimensions enum gridSquare { nonAccessible, market, common }; /* ============================== Item ============================= */ class Item { protected: std::string name; double price; unsigned int minLvlRequired; public: Item(std::string, double, unsigned int); ~Item(); std::string getName() const { return name; } double getPrice() const { return price; } unsigned int getMinLvlRequired() const { return minLvlRequired; } void display(); }; /* ============================== Spell ============================= */ class Spell { protected: std::string name; double price; unsigned int minLvlRequired; double damage; unsigned int magicLvlRequired; public: Spell(std::string, double, unsigned int, double, unsigned int); ~Spell(); std::string getName() const { return name; } double getPrice() const { return price; } unsigned int getMinLvlRequired() const { return minLvlRequired; } double getDamage() const { return damage; } unsigned int getMagicLvlRequired() const { return magicLvlRequired; } void display(); }; /* ============================== Item Subclasses ============================= */ class Weapon : public Item { double damage; bool hands; // 1 or 2 hands required to use it. public: Weapon(std::string, double, int, double, bool); ~Weapon(); double getDamage() const { return damage; } bool getHands() const { return hands; } }; class Armor : public Item { double protectionLvl; public: Armor(std::string, double, int, double); ~Armor(); double getProtectionLvl() const { return protectionLvl; } }; class Potion : public Item { double gain; bool used; // one time use for the Potions so, when it is used, "used = true" public: Potion(std::string, double, int, double); ~Potion(); int getGain() const { return gain; } bool getUsed() const { return used; } }; /* ============================== Spell Subclasses ============================= */ class IceSpell : public Spell { public: IceSpell(std::string, double, int, double, int, double); ~IceSpell(); double attackingWeakness; // decrease in opponent's attacking damage for some rounds. it "weakens" the opponent's attacking power for some rounds }; class FireSpell : public Spell { public: FireSpell(std::string, double, int, double, int, double); ~FireSpell(); double defensiveWeakness; // it "weakens" the opponent's defensive power for some rounds }; class LightningSpell : public Spell { public: LightningSpell(std::string, double, int, double, int, double); ~LightningSpell(); double agilityWeakness; // it "weakens" the opponent's agility power for some rounds }; /* ============================== Grid ============================= */ class Grid { char Map[N][M]; // the actual Map char OriginalMap[N][M]; public: Grid(); ~Grid(); void displayMap(); void setMarket(int,int); void setNonAccessible(int,int); char getCell(int, int); void moveInGrid(int, int, int, int); }; class Hero; /* ============================== Market ============================= */ class Market { std::vector<Weapon*> weapons; std::vector<Armor*> armors; std::vector<Potion*> potions; std::vector<IceSpell*> iceSpells; std::vector<FireSpell*> fireSpells; std::vector<LightningSpell*> lightningSpells; public: Market(); ~Market(); void fillTheMarket(); void insertWeapon(Weapon*); void insertArmor(Armor*); void insertPotion(Potion*); void insertIceSpell(IceSpell*); void insertFireSpell(FireSpell*); void insertLightningSpell(LightningSpell*); void displayMenu(); void displayItems(); void displaySpells(); bool buy(Hero*, std::string); void sell(Hero*, std::string); }; /* ============================== Living ============================= */ class Living{ protected: std::string name; int lvl; double healthPower; int x, y; public: Living(std::string, int, double); ~Living(); std::string getName() const { return name; } int getLvl() const { return lvl; } double getHealthPower() const { return healthPower; } int getX() const { return x; } int getY() const { return y; } void incrHealth(double); void incrLvl(); void move(int, int); void displayStats() const; }; /* ============================== Living Subclasses ============================= */ /* ============================== Monster ============================= */ class Monster : public Living{ protected: double damage; // damage that causes to the opponent double armor; double missProb; // probability to avoid an attack // int roundsLeft; public: Monster(std::string, int, double, double, double, double); ~Monster(); double getDamage() const { return damage; } double getArmor() const { return armor; } double getMissProb() const { return missProb; } void attack(Living*) const; bool missed() const; void getAttacked(double); void reduceDamage(double); void reduceArmor(double); void reduceMissProb(double); }; /* ============================== Hero ============================= */ class Hero : public Living{ protected: double magicPower; double strength; double dexterity; double agility; double money; double experience; std::vector<Item*> Items; std::vector<Spell*> Spells; int szI, szS; public: Hero(std::string, int, double, double mgP, double str, double dex, double ag, double mon, double exp); ~Hero(); double getMagicPower() const { return magicPower; } double getStrength() const { return strength; } double getDexterity() const { return dexterity; } double getAgility() const { return agility; } double getMoney() const { return money; } double getExperience() const {return experience; } void levelUp(); double attack(Living*) const; bool missed(double) const; // if monster avoided an attack (based on missProb) void getAttacked(double); void buyItem(Item*); void buySpell(Spell*); void sellItem(std::string); void sellSpell(std::string); void checkInventory(); void equip(Armor*); void equip(Weapon*); void use(Potion*); void castSpell(Monster*); void incrMoney(double); void decrMoney(double); void incrExp(double); void incrMagic(double); void incrStrength(double); void addItem(Item*); void addItem(Spell*); bool potionExist(); int getszI() const; int getszS() const; }; /* ================================ Hero Subclasses ================================= */ class Warrior : public Hero{ public: Warrior(std::string nam, int L, double H, double mgP, double str, double dex, double ag, double mon, double exp); ~Warrior(); }; class Sorcerer : public Hero{ public: Sorcerer(std::string nam, int L, double H, double mgP, double str, double dex, double ag, double mon, double exp); ~Sorcerer(); }; class Paladin : public Hero{ public: Paladin(std::string nam, int L, double H, double mgP, double str, double dex, double ag, double mon, double exp); ~Paladin(); }; /* ============================== Monster Subclasses ================================= */ class Dragon : public Monster{ public: Dragon(std::string, int, double, double, double, double); ~Dragon(); }; class Exoskeleton : public Monster{ public: Exoskeleton(std::string, int, double, double, double, double); ~Exoskeleton(); }; class Spirit : public Monster{ public: Spirit(std::string nam, int L, double H, double dmg, double arm, double msP); ~Spirit(); }; extern std::map<std::string, Weapon*> allWeapons; extern std::map<std::string, Armor*> allArmors; extern std::map<std::string, Potion*> allPotions; extern std::map<std::string, IceSpell*> allIceSpells; extern std::map<std::string, FireSpell*> allFireSpells; extern std::map<std::string, LightningSpell*> allLightningSpells; /* =================================== End of file =================================== */
368d6b018c53ca90a0482efeb188595a855a5e9b
7d798725004e647ecd0b7e4c0ca20341aca982c0
/common/src/robot/cpp/curtin_ctre.cpp
d64cf8ac4dba811e464dfb5237a986f9caaf0e6b
[ "MIT" ]
permissive
Hazzer890/2019-DeepSpace
65281620e70a1a25e85d3352680dcbbc0084c127
b22d37761424e5c056d878d6febbe6ea38aa1a03
refs/heads/master
2020-04-15T14:43:47.604218
2019-01-18T05:44:45
2019-01-18T05:44:45
164,765,010
0
0
MIT
2019-02-09T06:09:16
2019-01-09T01:45:18
C++
UTF-8
C++
false
false
1,485
cpp
curtin_ctre.cpp
// Robot code harness for the curtinfrc::talon_srx. #include "curtin_ctre.h" using namespace curtinfrc; using namespace ctre::phoenix::motorcontrol; inline can::TalonSRX *native_srx(const talon_srx *srx) { return static_cast<can::TalonSRX *>(srx->_handle); } talon_srx::talon_srx(int port) { _handle = (void *)new can::TalonSRX(port); _port = port; } talon_srx::~talon_srx() { delete native_srx(this); } int talon_srx::get_port() { return native_srx(this)->GetDeviceID(); } void talon_srx::SetInverted(bool invert) { native_srx(this)->SetInverted(invert); } bool talon_srx::GetInverted() const { return native_srx(this)->GetInverted(); } void talon_srx::Disable() { native_srx(this)->NeutralOutput(); } void talon_srx::Set(double speed) { Set(control_mode::PercentOutput, speed); } void talon_srx::Set(talon_srx::control_mode mode, double value) { native_srx(this)->Set(mode, value); _value = value; } talon_srx::control_mode talon_srx::GetMode() { return native_srx(this)->GetControlMode(); } int talon_srx::GetSensorPosition() { return native_srx(this)->GetSelectedSensorPosition(); } int talon_srx::GetSensorVelocity() { return native_srx(this)->GetSelectedSensorVelocity(); } void talon_srx::load_config(talon_srx::configuration &config) { native_srx(this)->ConfigAllSettings(config); } talon_srx::configuration talon_srx::save_config() { talon_srx::configuration config; native_srx(this)->GetAllConfigs(config); return config; }
aff9573ddd24713a7acda277cf8eff5aeec22f83
b3237ad61a6f29c118106bce7b7c90af7f13696d
/4ºYear/2ºSemester/CACM/120 - Stacks Flapjacks/sol_stacks3.cpp
40d4383954979f1bed6a637b823ca69d938e9ff6
[]
no_license
FranFnGc/UPV_ComputerScience
b30bca3e59c44a9219f8e21a557f67893938410a
3b439baf17f91e05e4571c4d71073f303d9daa0d
refs/heads/master
2023-06-20T19:47:37.874669
2021-07-24T09:26:17
2021-07-24T09:26:17
428,739,883
1
0
null
null
null
null
UTF-8
C++
false
false
1,845
cpp
sol_stacks3.cpp
#include <iostream> #include <cstdio> #include <sstream> using namespace std; int main() { string line; while(getline(cin, line)) { stringstream sinput(line); int torre[1000], n_tortitas = 0; int lista_flips[1000], num_flips = 0; int i,j,k,aux; //PROCESAR EL INPUT while(sinput >> torre[n_tortitas]) n_tortitas++; printf("%d", torre[0]); for(i = 1; i < n_tortitas; i++) printf(" %d", torre[i]); printf("\n"); //ARREGLAR LA TORRE DE TORTITAS //Por cada una de las tortitas, colocamos la más grande al final. for(i = 0; i < n_tortitas; i++) { //obtenemos la tortita mas grande en el rango [0,ultima_tortita] int ultima_tortita = n_tortitas-i-1; int index = ultima_tortita; for(j = 0; j < n_tortitas-i; j++) { if(torre[index] < torre[j]) index = j; } //si la tortita esta ya bien colocada, continuamos con la siguiente iteracion if(index != ultima_tortita) { //hacemos el flip para colocar la tortita arriba (si no esta ya) if(index > 0) { lista_flips[num_flips++] = n_tortitas-index; for(j = 0, k = index; j < k; j++, k--) aux = torre[j], torre[j] = torre[k], torre[k] = aux; } //hacemos el flip para colocar la tortita en la posición que nos interesa lista_flips[num_flips++] = i+1; for(j = 0, k = ultima_tortita; j < k; j++, k--) aux = torre[j], torre[j] = torre[k], torre[k] = aux; } } for(i = 0; i < num_flips; i++) printf("%d ", lista_flips[i]); printf("0\n"); } return 0; }
14a95fe0cbd8efde3c9c431c53355751d9cf4b61
464aa9d7d6c4906b083e6c3da12341504b626404
/src/server/web/python/module_init.cpp
fec870cce14a392485fa63da2fa095f18784513e
[]
no_license
v2v3v4/BigWorld-Engine-2.0.1
3a6fdbb7e08a3e09bcf1fd82f06c1d3f29b84f7d
481e69a837a9f6d63f298a4f24d423b6329226c6
refs/heads/master
2023-01-13T03:49:54.244109
2022-12-25T14:21:30
2022-12-25T14:21:30
163,719,991
182
167
null
null
null
null
UTF-8
C++
false
false
4,314
cpp
module_init.cpp
/****************************************************************************** BigWorld Technology Copyright BigWorld Pty, Ltd. All Rights Reserved. Commercial in confidence. WARNING: This computer program is protected by copyright law and international treaties. Unauthorized use, reproduction or distribution of this program, or any portion of this program, may result in the imposition of civil and criminal penalties as provided by law. ******************************************************************************/ #include "Python.h" #include "osdefs.h" // need this for DELIM #include "entitydef/entity_description_map.hpp" #include "pyscript/py_import_paths.hpp" #include "resmgr/bwresource.hpp" #include "server/bwconfig.hpp" #include "server/bwservice.hpp" #include "web_integration.hpp" #include <string> extern int Math_token; extern int ResMgr_token; extern int PyScript_token; static int s_moduleTokens = Math_token | ResMgr_token | PyScript_token; extern int ChunkStationGraph_token; static int s_chunkStationGraphToken = ChunkStationGraph_token; extern int UserDataObjectLinkDataType_token; static int s_userDataObjectLinkDataType_token = UserDataObjectLinkDataType_token; DECLARE_DEBUG_COMPONENT( 0 ) namespace // anonymous { /** Finalisation function. */ PyObject * bigworld_fini_fn( PyObject * self, PyObject * args ); /** * Method definition for finalisation function. */ PyMethodDef s_bigworld_fini = { "_fini", /* char* ml_name */ bigworld_fini_fn, /* PyCFunction ml_meth */ METH_NOARGS, /* int ml_flags */ NULL, /* char * ml_doc */ }; /** * Finalisation function. */ PyObject * bigworld_fini_fn( PyObject * self, PyObject * args ) { delete WebIntegration::pInstance(); delete BWResource::pInstance(); Script::fini( /* shouldFinalise */ false ); TRACE_MSG( "BigWorld module unloaded\n" ); Py_RETURN_NONE; } } // namespace (anonymous) /** * Python dynamic extension module initialisation function. */ PyMODINIT_FUNC initBigWorld( void ) { new BWResource(); BWResource::init( 0, NULL ); BWConfig::init( 0, NULL ); Py_InitModule3( "BigWorld", NULL, "BigWorld Web Integration module." ); // hack to retain old sys.path // get new reference to sys module PyObjectPtr pSysModule( PyImport_ImportModule( "sys" ), PyObjectPtr::STEAL_REFERENCE ); if (!pSysModule) { PyErr_SetString( PyExc_ImportError, "Could not import module 'sys'!" ); return; } // get new reference to sys.path variable PyObjectPtr pPathList( PyObject_GetAttrString( pSysModule.get(), "path" ), PyObjectPtr::STEAL_REFERENCE ); if (!pPathList || !PySequence_Check( pPathList.get() )) { PyErr_SetString( PyExc_ImportError, "Could not find sys.path, or is not a sequence" ); return; } PyImportPaths pythonPaths; for (int i = 0; i < PySequence_Size( pPathList.get() ); ++i) { PyObjectPtr pPathString( PySequence_GetItem( pPathList.get(), i ), PyObjectPtr::STEAL_REFERENCE ); // Note that the Python interpreter hasn't been initialised at this // point, and so the builtin types haven't been initialised with the // right tp_flags, so we can't use PyString_Check to check that they // are strings. pythonPaths.addPath( PyString_AS_STRING( pPathString.get() ) ); } if (!Script::init( pythonPaths )) { PyErr_SetString( PyExc_ImportError, "Script::init failed\n" ); return; } // reset sys.path to old value pythonPaths.setDelimiter( DELIM ); PySys_SetPath( const_cast< char * >( pythonPaths.pathsAsString().c_str() ) ); // register finalisation function with atexit PyObjectPtr pAtExitModule( PyImport_ImportModule( "atexit" ), PyObjectPtr::STEAL_REFERENCE ); if (!pAtExitModule) { return; } PyObjectPtr pyCFunction( PyCFunction_New( &s_bigworld_fini, NULL ), PyObjectPtr::STEAL_REFERENCE ); if (!pyCFunction) { PyErr_SetString( PyExc_ImportError, "Could not create finalisation function object" ); return; } PyObjectPtr pResult( PyObject_CallMethod( pAtExitModule.get(), "register", "O", pyCFunction.get() ), PyObjectPtr::STEAL_REFERENCE ); if (!pResult) { return; } WebIntegration * pWebIntegration = new WebIntegration(); if (!pWebIntegration->init()) { // exception set in init on failure return; } START_MSG( "WebIntegrationModule" ); } // module_init.cpp
00cb64c208d162c27e0274bf258e81ce26b4b1ed
73e781e19f91787b38ac64818016bcf8e4db8a6d
/test_unit/main.cpp
6bd015a93b12b4982cb2162b7543574e446ea700
[]
no_license
LePelicaN/GUIOpenGL
e18cc579a860eefea378d6f84a9867e38a112096
b010b5ba3b266e38d6633abd23ccf981c8ee8ff1
refs/heads/master
2016-08-04T11:27:46.582285
2012-05-09T10:05:18
2012-05-09T10:05:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
202
cpp
main.cpp
#include <QtTest> #include <QApplication> #include "test_vertexArrays.hpp" int main( int argc, char *argv[] ) { QApplication app( argc, argv ); return QTest::qExec( new TestVertexArrays ); }
4a5eba32b388d1c18d6312040b97bdcac6523c65
9b2e727342b1e3765f784de32d364f4bcf90fbc9
/cloud/XMLParser/lib/spxml/spcanonxml.cpp
b2b0df40c5fa585a980aba47b02f002519ce367e
[ "Apache-2.0" ]
permissive
mc-b/IoTKitV3
d902afa147b47a9d614c34ff103c6bc359702b54
87d7a66a1730f71bc69110a214b1b2a18f22edcb
refs/heads/master
2021-08-29T05:54:10.115066
2021-08-10T15:59:19
2021-08-10T15:59:19
101,919,584
3
5
null
null
null
null
UTF-8
C++
false
false
4,111
cpp
spcanonxml.cpp
/* * Copyright 2007 Stephen Liu * LGPL, see http://code.google.com/p/spxml/ * For license terms, see the file COPYING along with this library. */ #include <string.h> #include "spcanonxml.hpp" #include "spxmlnode.hpp" #include "spxmlutils.hpp" #include "spxmlcodec.hpp" SP_CanonXmlBuffer :: SP_CanonXmlBuffer( const SP_XmlNode * node ) { mBuffer = new SP_XmlStringBuffer(); dump( node, mBuffer ); } SP_CanonXmlBuffer :: ~SP_CanonXmlBuffer() { if( NULL != mBuffer ) delete mBuffer; mBuffer = NULL; } const char * SP_CanonXmlBuffer :: getBuffer() const { return mBuffer->getBuffer(); } int SP_CanonXmlBuffer :: getSize() const { return mBuffer->getSize(); } void SP_CanonXmlBuffer :: canonEncode( const char * value, SP_XmlStringBuffer * buffer ) { SP_XmlStringBuffer temp; SP_XmlStringCodec::encode( "", value, &temp ); for( const char * pos = temp.getBuffer(); '\0' != *pos; pos++ ) { if( '\r' == *pos ) { } else if( '\n' == *pos ) { buffer->append( "&#10;" ); } else { buffer->append( *pos ); } } } void SP_CanonXmlBuffer :: dump( const SP_XmlNode * node, SP_XmlStringBuffer * buffer ) { if( NULL == node ) return; if( SP_XmlNode::eXMLDOC == node->getType() ) { SP_XmlDocument * document = static_cast<SP_XmlDocument*>((SP_XmlNode*)node); const SP_XmlNodeList * children = document->getChildren(); for( int j = 0; j < children->getLength(); j++ ) { dump( children->get( j ), buffer ); } } else if( SP_XmlNode::eCDATA == node->getType() ) { SP_XmlCDataNode * cdata = static_cast<SP_XmlCDataNode*>((SP_XmlNode*)node); canonEncode( cdata->getText(), buffer ); } else if( SP_XmlNode::ePI == node->getType() ) { SP_XmlPINode * piNode = static_cast<SP_XmlPINode*>((SP_XmlNode*)node); buffer->append( "<?" ); buffer->append( piNode->getTarget() ); if( '\0' != *( piNode->getTarget() ) ) buffer->append( ' ' ); buffer->append( piNode->getData() ); buffer->append( "?>" ); } else if( SP_XmlNode::eCOMMENT == node->getType() ) { // ignore } else if( SP_XmlNode::eELEMENT == node->getType() ) { dumpElement( node, buffer ); } else if( SP_XmlNode::eDOCDECL == node->getType() ) { // ignore } else if( SP_XmlNode::eDOCTYPE == node->getType() ) { // ignore } else { // ignore } } void SP_CanonXmlBuffer :: dumpElement( const SP_XmlNode * node, SP_XmlStringBuffer * buffer ) { if( NULL == node ) return; if( SP_XmlNode::eELEMENT == node->getType() ) { SP_XmlElementNode * element = static_cast<SP_XmlElementNode*>((SP_XmlNode*)node); buffer->append( "<" ); buffer->append( element->getName() ); int i = 0; SP_XmlArrayList attrList; for( i = 0; i < element->getAttrCount(); i++ ) { attrList.append( (void*)element->getAttr( i, NULL ) ); } attrList.sort( reinterpret_cast<int(*)(const void*, const void*)>(strcmp) ); const char * name = NULL, * value = NULL; for( i = 0; i < attrList.getCount(); i++ ) { name = (char*)attrList.getItem( i ); value = element->getAttrValue( name ); if( NULL != name && NULL != value ) { buffer->append( ' ' ); buffer->append( name ); buffer->append( "=\"" ); canonEncode( value, buffer ); buffer->append( "\"" ); } } const SP_XmlNodeList * children = element->getChildren(); buffer->append( ">" ); for( int j = 0; j < children->getLength(); j++ ) { dump( children->get( j ), buffer ); } buffer->append( "</" ); buffer->append( element->getName() ); buffer->append( ">" ); } else { dump( node, buffer ); } }
4ca3cca53598f8a4dbe10dca674152bbe4faf354
150936abf1a4ba3c9862631bbe45259256027d76
/BDHSGQG - Da Lat 2019/Day 7 - Mr. Dong/KSPS.cpp
a1033d15bd9b5f01f22a97552d4d588fb41af52e
[]
no_license
btdat2506/IT.CLA.K18---CP---btdat2506
4a6242c637b28b6126e294f5cb1802b7ea4ea850
3adc76eebf81c799e5f82dfb946752cb65866a55
refs/heads/master
2021-07-04T21:48:13.054696
2020-12-01T15:18:46
2020-12-01T15:18:46
205,774,038
1
1
null
2019-09-05T02:13:13
2019-09-02T04:01:48
C++
UTF-8
C++
false
false
658
cpp
KSPS.cpp
#include <bits/stdc++.h> using namespace std; #define ll int32_t #define For(i, a, b) for(ll i = a; i <= b; i++) bool kt = 0; ll p, q, m, n; string st, st1, st2; string to_str(ll x) { st2 = ""; kt = 1; while (x != 0 || kt == 1) { st2 += (char) ((x % 10) + '0'); x /= 10; if (x == 0) kt = 0; } reverse(st2.begin(), st2.end()); return st2; } int main() { freopen("KSPS.INP", "r", stdin); freopen("KSPS.OUT", "w", stdout); cin >> p >> q >> st1; st = to_str((ll) (p/q)); p %= q; For(i, 1, 2*(1e6)) { st += to_str((p * 10) / q); p = (p * 10) % q; } ll res = st.find(st1); if (res == -1) res = 0; else res++; cout << res << "\n"; }
07b111ae24ae8012987c70adef77f7559267a174
8ae31e5db1f7c25b6ce1c708655ab55c15dde14e
/比赛/2019暑假中山纪念中学模拟测/2019.08.20【NOIP提高组】模拟 B 组/T2 做梦/dream'.cpp
6ae83544e0dd16d8b2b8c7e4539279c996bb2a26
[]
no_license
LeverImmy/Codes
99786afd826ae786b5024a3a73c8f92af09aae5d
ca28e61f55977e5b45d6731bc993c66e09f716a3
refs/heads/master
2020-09-03T13:00:29.025752
2019-12-16T12:11:23
2019-12-16T12:11:23
219,466,644
1
0
null
null
null
null
UTF-8
C++
false
false
1,934
cpp
dream'.cpp
#pragma GCC optimize (2) #include <cstdio> #include <cctype> #include <algorithm> #include <cstring> #include <cmath> #include <iomanip> #include <queue> #include <iostream> #include <string> #define ll long long #define rgi register int #define il inline using namespace std; const int mod = 1e9 + 7; const int M = 100 + 10; int n, m; ll f[M]; struct Matrix { ll a[M][M]; void init() { for(rgi i = 2; i <= m; i += 2) a[i][i] = 1; } } BASE, ANS; il int read() { rgi f = 0, x = 0, ch; while(!isdigit(ch = getchar())) f |= ch == '-'; while(isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar(); return f ? -x : x; } il struct Matrix operator * (struct Matrix A, struct Matrix B) { struct Matrix C; memset(C.a, 0, sizeof(C.a)); // for(rgi i = 1; i <= m; ++i) // for(rgi j = 1; j <= m; ++j) // C.a[i][j] = 0; for(rgi i = 1; i <= m; ++i) for(rgi j = 1; j <= m; ++j) for(rgi k = 1; k <= m; ++k) C.a[i][j] = (C.a[i][j] + A.a[i][k] * B.a[k][j] % mod) % mod; return C; } il struct Matrix ksm(struct Matrix A, ll B) { struct Matrix C; for(rgi i = 2; i <= m; i += 2) C.a[i][i] = 1; while(B) { if(B & 1) C = C * A; A = A * A; B >>= 1; } return C; } int main() { n = read(), m = read(); // n = 1000000000, m = 100; f[2] = f[4] = 2; for(rgi i = 6; i <= m; i += 2) f[i] = f[i - 2] * 2 % mod;//ok for(rgi i = 2; i <= m; i += 2) { BASE.a[i + 2][i] = 1; BASE.a[i][m] = f[m - i + 2];//ok } if(n < m) { printf("%lld", f[n]); } else { ANS.init(); for(rgi k = 1; k <= n - m + 2; ++k) { for(rgi i = 2; i <= m; i += 2) { for(rgi j = 2; j <= m; j += 2) cout << ANS.a[i][j] << setw(11); cout << endl; } ANS = ANS * BASE; cout << endl; } // ANS = ksm(BASE, n - m + 1); // printf("%lld", ANS.a[m][m]); /*for(rgi i = 1; i <= m; ++i) { for(rgi j = 1; j <= m; ++j) cout << BASE.a[i][j] << " "; cout << endl; }*/ } return 0; }
33810f77dedf23240b69b6c86f1c9929099da57d
21055832aea9bf0caaa7d0a71cb7e85f842cd4d0
/Source/Runtime/ArrayWrapper.h
9e62df8cc3b6dd1abb1027fadca84bc382e01d00
[ "MIT" ]
permissive
JoinCAD/CPP-Reflection
0608d7c0a934249b6e6d65ed8d140ffe27a121a5
61163369b6b3b370c4ce726dbf8e60e441723821
refs/heads/master
2020-03-22T11:40:21.538330
2018-08-03T16:18:43
2018-08-03T16:18:43
139,987,273
0
0
MIT
2018-08-03T16:18:44
2018-07-06T13:15:52
C++
UTF-8
C++
false
false
1,067
h
ArrayWrapper.h
/* ---------------------------------------------------------------------------- ** Copyright (c) 2016 Austin Brunkhorst, All Rights Reserved. ** ** ArrayWrapper.h ** --------------------------------------------------------------------------*/ #pragma once #include "ArrayWrapperBase.h" namespace ursine { namespace meta { class Argument; class ArrayWrapper { public: ArrayWrapper(void); template<typename T> ArrayWrapper(Array<T> &rhs); template<typename T> ArrayWrapper(const Array<T> &rhs); Variant GetValue(size_t index) const; void SetValue(size_t index, const Argument &value); void Insert(size_t index, const Argument &value); void Remove(size_t index); size_t Size(void) const; bool IsValid(void) const; bool IsConst(void) const; private: bool m_isConst; ArrayWrapperBase *m_base; }; } } #include "Impl/ArrayWrapper.hpp"
a92879fdb18c71695e4b9070157d331c8c6e92a5
705600670db696e45bde0eb6a21d0e4b7365b8c5
/labyrinth/Game/Main.cpp
66abe3b880ef9d27e61a1bebe1ea963013fced3b
[]
no_license
SergeyIllyashenko/Labyrinthhh
c016a2eb2ee756596581071c11b531a3b83e4ef1
9f34d507faba739ea2d18474002f175ee29bb1f1
refs/heads/master
2020-12-24T17:26:47.483994
2014-06-23T19:10:54
2014-06-23T19:10:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,397
cpp
Main.cpp
#include <hge.h> #include <hgesprite.h> #include <hgevector.h> #include <List> #include "Clases.h" #include "menuitem.h" #include <iostream> #include <fstream> HGE* hge = NULL; //Background HTEXTURE g_tBackground = 0; HTEXTURE g_tEColors = 0; HTEXTURE g_tExit = 0; hgeSprite* g_sExit = NULL; hgeSprite* g_sBackground = NULL; hgeVector g_vBGPosition = hgeVector(0,0); //Player and Barrier c_player* Player1 = NULL; std::list<barrier*> Barriers; //Sounds HEFFECT g_eBGMusic = 0; HEFFECT g_MenueBGMusic = 0; HTEXTURE g_tExplosion = 0; HEFFECT g_eExplosion = 0; // Pointers to the HGE objects we will use hgeGUI *gui; hgeFont *fnt; hgeSprite *spr; HTEXTURE tcur; //Levels int lifes=5; int level=1; float left_time; bool show_message=false; char message[200]; void Save() { FILE *f; f = fopen("save.txt","w"); fprintf(f,"%d\n",lifes); fprintf(f, "%d\n", level); fprintf(f,"%d\n", left_time); fclose(f); } void Load() { std::ifstream load("save.txt") ; load >> lifes; load >> level; load >> left_time; left_time=left_time/100000000; if (left_time<0) { left_time=left_time*(-1); } } struct explosion { hgeAnimation* Animation; hgeVector Position; }; std::list<explosion> Explosions; void CreateExplosion(hgeVector Position); bool ActiveMenu=true; int lvlload; void init_level(int lvl); bool FrameFunc() { float delta = hge->Timer_GetDelta(); if (ActiveMenu) { int id; static int lastid=0; id=gui->Update(delta); if(id == -1) { switch(lastid) { case 1: ActiveMenu=false; lvlload=0; init_level(1); gui->Leave(); break; case 2: Save(); gui->Leave(); gui->Enter(); break; case 3: ActiveMenu=false; Load(); lvlload=1; init_level(level); gui->Leave(); break; case 4: ActiveMenu=false; if ((strcmp(message,"GAME OVER\npress Esc to go to menu...")==0)||(strcmp(message,"You are WIN"))==0) { strcpy(message, " "); lvlload=0; init_level(1); } gui->Leave(); break; case 5: return true; } } else if(id) { lastid=id; gui->Leave(); } } else if(!show_message) { left_time-=delta; if ((left_time<=0)||(lifes<=0)) { level--; show_message=true; if (level==0) { strcpy(message,"GAME OVER\npress Esc to go to menu..."); } else { strcpy(message,"You lose this level..."); } } if(hgeRect(720,520,770,570).Intersect(&Player1->GetBoundingBox())) { show_message=true; level++; if (level>10) { show_message=true; strcpy(message,"You are WIN"); } else strcpy(message,"Go to the next level"); } //Explosions for(std::list<explosion>::iterator i = Explosions.begin(); i != Explosions.end(); /**/) { if((*i).Animation->GetFrame() == 4) { delete (*i).Animation; i = Explosions.erase(i); } else { (*i).Animation->Update(delta); i++; } } Player1->Update(delta); for(std::list<barrier*>::iterator i = Barriers.begin(); i != Barriers.end(); i++) { (*i)->Update(delta); } for(std::list<barrier*>::iterator i = Barriers.begin(); i != Barriers.end(); i++) { if((*i)->GetBoundingBox().Intersect(&Player1->GetBoundingBox())) { CreateExplosion(Player1->GetPosition()); Player1->SetPosition(hgeVector(10,268)); Player1->SetVelocity(hgeVector(5,0)); lifes--; break; } } if (hge->Input_GetKeyState(HGEK_ESCAPE)) { ActiveMenu=true; gui->Enter(); } } else { delta=0; if (hge->Input_GetKeyState(HGEK_ESCAPE)) { ActiveMenu=true; gui->Enter(); } if ((hge->Input_GetKeyState(HGEK_ENTER))&&(show_message)&&(strcmp(message,"You are WIN")!=0)&&(strcmp(message,"GAME OVER\npress Esc to go to menu...")!=0)) { init_level(level); } } return false; } bool RenderFunc() { hge->Gfx_BeginScene(); hge->Gfx_Clear(0); g_sBackground->Render(g_vBGPosition.x,g_vBGPosition.y); Player1->Render(); for(std::list<barrier*>::iterator i = Barriers.begin(); i != Barriers.end(); i++) { (*i)->Render(); } //Explosions for(std::list<explosion>::iterator i = Explosions.begin(); i != Explosions.end(); i++) { (*i).Animation->Render((*i).Position.x, (*i).Position.y); } if (ActiveMenu) { hge->Gfx_Clear(0); g_sBackground->Render(g_vBGPosition.x,g_vBGPosition.y); gui->Render(); } else if (show_message) { hge->Gfx_Clear(0); fnt->SetColor(ARGB(255,100,0,255)); fnt->printf(400,250,HGETEXT_CENTER,"%s",message); } else { fnt->SetColor(ARGB(255,0,255,0)); fnt->printf(20,20,HGETEXT_LEFT,"Time Left %f\nLevel: %d\nLifes: %d",left_time,level,lifes); g_sExit->Render(750,550); } hge->Gfx_EndScene(); return false; } void Razvertka(int line,int from,int to=20) { for (int i=from;i<=to;i++) { c_barrier* Enemy = new c_barrier(hgeVector(135+i*30, 15+line*30), g_tEColors); Barriers.push_back(Enemy); } } void init_level(int lev) { Player1->SetPosition(hgeVector(10,268)); Player1->SetVelocity(hgeVector(5,0)); show_message=false; strcpy(message," "); for(std::list<barrier*>::iterator i = Barriers.begin(); i != Barriers.end(); /**/) { delete (*i); i = Barriers.erase(i); } for(std::list<explosion>::iterator i = Explosions.begin(); i != Explosions.end(); /**/) { i = Explosions.erase(i); } std::fstream file; if (lev==1) { if (lvlload==1) { Load(); file.open("levels/1.lvl"); } else { lifes=5; left_time=12; file.open("levels/1.lvl"); } } if (lev==2) { if (lvlload==1) { Load(); file.open("levels/2.lvl"); } else { lifes=4; left_time=60; file.open("levels/2.lvl"); } } if (lev==3) { if (lvlload==1) { Load(); file.open("levels/3.lvl"); } else { lifes=3; left_time=30; file.open("levels/3.lvl"); } } if (lev==4) { if (lvlload==1) { Load(); file.open("levels/4.lvl"); } else { lifes=2; left_time=30; file.open("levels/4.lvl"); } } if (lev==5) { if (lvlload==1) { Load(); file.open("levels/5.lvl"); } else { lifes=1; left_time=30; file.open("levels/5.lvl"); } } if (lev==6) { if (lvlload==1) { Load(); file.open("levels/1.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 150), g_tEColors,10,50,hgeVector(280, 350)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(300, 130), g_tEColors,30,70,hgeVector(280, 200)); Barriers.push_back(Enemy1); d_barrier* Enemy2 = new d_barrier(hgeVector(300, 220), g_tEColors,10,70,hgeVector(280, 280)); Barriers.push_back(Enemy2); d_barrier* Enemy3 = new d_barrier(hgeVector(450, 150), g_tEColors,30,70,hgeVector(200, 250)); Barriers.push_back(Enemy3); d_barrier* Enemy4 = new d_barrier(hgeVector(580, 220), g_tEColors,10,70,hgeVector(280, 280)); Barriers.push_back(Enemy4); d_barrier* Enemy5 = new d_barrier(hgeVector(620, 150), g_tEColors,10,50,hgeVector(200, 250)); Barriers.push_back(Enemy5); } else { lifes=5; left_time=30; file.open("levels/1.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 150), g_tEColors,10,50,hgeVector(280, 350)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(300, 130), g_tEColors,30,70,hgeVector(280, 200)); Barriers.push_back(Enemy1); d_barrier* Enemy2 = new d_barrier(hgeVector(300, 220), g_tEColors,10,70,hgeVector(280, 280)); Barriers.push_back(Enemy2); d_barrier* Enemy3 = new d_barrier(hgeVector(450, 150), g_tEColors,30,70,hgeVector(200, 250)); Barriers.push_back(Enemy3); d_barrier* Enemy4 = new d_barrier(hgeVector(580, 220), g_tEColors,10,70,hgeVector(280, 280)); Barriers.push_back(Enemy4); d_barrier* Enemy5 = new d_barrier(hgeVector(620, 150), g_tEColors,10,50,hgeVector(200, 250)); Barriers.push_back(Enemy5); } } if (lev==7) { if (lvlload==1) { Load(); file.open("levels/2.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 280), g_tEColors,10,50,hgeVector(280, 340)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(370, 150), g_tEColors,50,10,hgeVector(435, 170)); Barriers.push_back(Enemy1); } else { lifes=4; left_time=30; file.open("levels/2.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 280), g_tEColors,10,50,hgeVector(280, 340)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(370, 150), g_tEColors,50,10,hgeVector(435, 170)); Barriers.push_back(Enemy1); } } if (lev==8) { if (lvlload==1) { Load(); file.open("levels/3.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(320, 150), g_tEColors,50,10,hgeVector(400, 170)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(500, 0), g_tEColors,50,10,hgeVector(620, 40)); Barriers.push_back(Enemy1); } else { lifes=3; left_time=60; file.open("levels/3.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(320, 150), g_tEColors,50,10,hgeVector(400, 170)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(500, 0), g_tEColors,50,10,hgeVector(620, 40)); Barriers.push_back(Enemy1); } } if (lev==9) { if (lvlload==1) { Load(); file.open("levels/4.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 80), g_tEColors,10,50,hgeVector(280, 250)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(200, 260), g_tEColors,20,60,hgeVector(280, 430)); Barriers.push_back(Enemy1); d_barrier* Enemy2 = new d_barrier(hgeVector(200, 440), g_tEColors,30,70,hgeVector(280, 610)); Barriers.push_back(Enemy2); } else { lifes=2; left_time=45; file.open("levels/4.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 80), g_tEColors,10,50,hgeVector(280, 250)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(200, 260), g_tEColors,20,60,hgeVector(280, 430)); Barriers.push_back(Enemy1); d_barrier* Enemy2 = new d_barrier(hgeVector(200, 440), g_tEColors,30,70,hgeVector(280, 610)); Barriers.push_back(Enemy2); } } if (lev==10) { if (lvlload==1) { Load(); file.open("levels/5.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 30), g_tEColors,10,50,hgeVector(280, 150)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(200, 450), g_tEColors,50,10,hgeVector(300, 470)); Barriers.push_back(Enemy1); d_barrier* Enemy2 = new d_barrier(hgeVector(590, 150), g_tEColors,50,10,hgeVector(690, 190)); Barriers.push_back(Enemy2); d_barrier* Enemy3 = new d_barrier(hgeVector(590, 350), g_tEColors,80,30,hgeVector(700, 390)); Barriers.push_back(Enemy3); } else { lifes=1; left_time=50; file.open("levels/5.lvl"); d_barrier* Enemy = new d_barrier(hgeVector(200, 30), g_tEColors,10,50,hgeVector(280, 150)); Barriers.push_back(Enemy); d_barrier* Enemy1 = new d_barrier(hgeVector(200, 450), g_tEColors,50,10,hgeVector(300, 470)); Barriers.push_back(Enemy1); d_barrier* Enemy2 = new d_barrier(hgeVector(590, 150), g_tEColors,50,10,hgeVector(690, 190)); Barriers.push_back(Enemy2); d_barrier* Enemy3 = new d_barrier(hgeVector(590, 350), g_tEColors,80,30,hgeVector(700, 390)); Barriers.push_back(Enemy3); } } while (!file.eof()) { int a,b,c; file>>a>>b>>c; Razvertka(a,b,c); } file.close(); level=lev; } int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { hge = hgeCreate(HGE_VERSION); hge->System_SetState(HGE_FRAMEFUNC, FrameFunc); hge->System_SetState(HGE_RENDERFUNC, RenderFunc); hge->System_SetState(HGE_WINDOWED, true); hge->System_SetState(HGE_USESOUND, true); hge->System_SetState(HGE_FPS, HGEFPS_VSYNC); hge->System_SetState(HGE_TITLE, "Game Tutorial"); if(hge->System_Initiate()) { //Background g_tBackground = hge->Texture_Load("images/list2.jpg"); g_sBackground = new hgeSprite(g_tBackground, 0, 0, 1208, 777); g_vBGPosition = hgeVector(0, 0); //Player Player1 = new c_player(hgeVector(10, 268), hgeVector(5,0)); g_tEColors = hge->Texture_Load("images/12.png"); //Barriers init_level(1); //Explosion g_tExplosion = hge->Texture_Load("images/Explosion-Sprite-Sheet.png"); //Sounds g_eBGMusic = hge->Effect_Load("sounds/1.ogg"); g_MenueBGMusic = hge->Effect_Load("sounds/menu.mp3"); hge->Effect_PlayEx(g_eBGMusic, 40, 0, 0, true); g_eExplosion = hge->Effect_Load("sounds/21410__heigh-hoo__blow.aif"); //Sprite Exit g_tExit =hge->Texture_Load("images/Exit.png"); g_sExit =new hgeSprite(g_tExit,0,0,92,56); g_sExit->SetHotSpot(46,28); fnt=new hgeFont("font1.fnt"); fnt->SetColor(ARGB(255,255,0,0)); tcur=hge->Texture_Load("cursor.png"); spr= new hgeSprite(tcur,0,0,32,32); // Create and initialize the GUI gui=new hgeGUI(); gui->AddCtrl(new hgeGUIMenuItem(1,fnt,g_MenueBGMusic,400,120,0.0f,"new game")); gui->AddCtrl(new hgeGUIMenuItem(2,fnt,g_MenueBGMusic,400,200,0.1f,"save game")); gui->AddCtrl(new hgeGUIMenuItem(3,fnt,g_MenueBGMusic,400,280,0.2f,"load game")); gui->AddCtrl(new hgeGUIMenuItem(4,fnt,g_MenueBGMusic,400,360,0.3f,"continue game")); gui->AddCtrl(new hgeGUIMenuItem(5,fnt,g_MenueBGMusic,400,420,0.4f,"Exit")); gui->SetNavMode(HGEGUI_UPDOWN | HGEGUI_CYCLED); gui->SetCursor(spr); gui->SetFocus(1); gui->Enter(); hge->System_Start(); hge->Texture_Free(g_tExplosion); hge->Effect_Free(g_eExplosion); delete g_sBackground; delete Player1; //delete barriers for(std::list<barrier*>::iterator i = Barriers.begin(); i != Barriers.end(); /**/) { delete (*i); i = Barriers.erase(i); } hge->Texture_Free(g_tEColors); for(std::list<explosion>::iterator i = Explosions.begin(); i != Explosions.end(); /**/) { delete (*i).Animation; i = Explosions.erase(i); } } else { MessageBox(NULL, hge->System_GetErrorMessage(), "Error", MB_OK | MB_ICONERROR | MB_APPLMODAL); } hge->System_Shutdown(); hge->Release(); return 0; } void CreateExplosion(hgeVector Position) { explosion exp; exp.Animation = new hgeAnimation(g_tExplosion,5,10,0,0,118,118); exp.Animation->SetHotSpot(78,60); exp.Animation->Play(); exp.Position = Position; Explosions.push_back(exp); hge->Effect_PlayEx(g_eExplosion,100,0,hge->Random_Float(1,3)); }
bf56ce7d91fcaa1e40bd1d3ff3c2e24d1e2251d2
a944671fc881aad2f865907256038978fdd90af8
/CF1006E.cpp
c652780493e61e1f8280d965b3dc9274686c4581
[]
no_license
crablet/luogu
1f444532b5dadcbfc0a4e11450e57e78a2333557
25fd026b32da7bb2411fd130979378748c02fc5e
refs/heads/master
2021-04-27T15:09:07.483102
2019-11-16T15:10:38
2019-11-16T15:10:38
122,464,269
5
1
null
null
null
null
GB18030
C++
false
false
1,939
cpp
CF1006E.cpp
// 首先要明确一下,如果按照题意里的每次都DFS一下,肯定会T,而且第二个点就T了,别问我是怎么知道的 // 然后,我们其实只需要DFS一遍,记录下每个节点被DFS访问到的时刻,然后再记录一下一个节点后面能访问到的节点总数,用以判断是否存在u后k个元素 #include <iostream> #include <vector> #include <array> constexpr int MaxN = 200000 + 5; std::array<std::vector<int>, MaxN> G; std::array<int, MaxN> DFN{ 0 }, Size{ 0 }, Pos{ 0 }; // DFN[x]: 节点x被DFS访问到的时刻 // Size[x]: 节点x下方有多少个节点(包括它自己) // Pos[x]: DFS在x时刻访问到的节点编号 int Clock = 0; // DFS时钟 void DFS(int p) { Size[p] = 1; // 一开始节点p及其下方节点就只有自己一个 ++Clock; // DFS访问时刻加一 DFN[p] = Clock; // 记录下节点p被访问到的时刻 Pos[Clock] = p; // 记录下该时刻访问到的是节点p for (const auto &q : G[p]) // 遍历p的所有直接相接的子节点 { DFS(q); Size[p] += Size[q]; // p下方的节点数等于p的所有子节点下方的节点数之和 } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); int n, q; std::cin >> n >> q; for (int i = 2; i <= n; ++i) { int p; std::cin >> p; G[p].push_back(i); } DFS(1); // 从根节点进行一遍DFS while (q--) { int u, k; std::cin >> u >> k; if (Size[u] < k) // 如果节点u下方的所有节点数都没有k大,那么这个查询是失败的 { std::cout << -1 << std::endl; } else // 否则计算出u后k - 1个节点的编号,因为自身也算一个 { std::cout << Pos[DFN[u] + k - 1] << std::endl; } } return 0; }
a7df4615da624c977c381451c7995fadf9400c0b
184e03d9b1139e74c71b29edb902dad0132cf227
/练习代码/指针习题2.cpp
59d1e6066b2fb34155e150a033670e2a06edb6a8
[]
no_license
VestigesH/C
95909de75327741d283826ba0f5529f457e93b73
38010ca250869cb3a7f271286f975ac6790614d8
refs/heads/master
2020-06-16T14:06:30.762105
2020-03-30T02:18:08
2020-03-30T02:18:08
195,602,542
0
0
null
null
null
null
UTF-8
C++
false
false
111
cpp
指针习题2.cpp
#include <stdio.h> int main() { int m=1,n=2,*p=&m,*q=&n,*r; r=p;p=q;q=r; printf("%d,%d,%d,%d\n",m,n,p,q); }
b26111d4a3312584a0677f568c87d2c587b7be67
1ac04ddeae434c64fc10e2194a65c249d02129de
/src/codeforces/Friends_and_Gifts.cpp
30be4ba943ffd6c511a7e9b48268b36df12862a4
[]
no_license
VIPUL1306/cp_practice
f68de30c9d0af343d77ceda1397d14f22077b5d9
a439e8cdec79962be6a168cdd70bad848138d757
refs/heads/master
2023-09-03T01:49:54.492499
2020-10-01T05:03:22
2020-10-01T05:03:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
985
cpp
Friends_and_Gifts.cpp
// http://m1.codeforces.com/contest/1283/problem/C #include<bits/stdc++.h> #define ll long long int using namespace std; int main(){ // freopen("input.txt","r",stdin); ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); ll n; cin>>n; vector<ll> arr(n+1), empty,temp; map<int,int> temp_index, present; for(int i = 1;i<=n;i++){ cin>>arr[i]; if(arr[i]!=0) present[arr[i]] = 1; if(arr[i]==0) empty.push_back(i); } for(int i = 1;i<=n;i++){ if(present[i]!=1){ temp.push_back(i); } } int l = temp.size(); // for(auto x:temp) cout<<x<<" "; // cout<<endl; for(int i = 0,j = 0;i<empty.size();i++){ // cout<<i<<"\n"; // cout<<j<<" "<<empty[i]<<" "<<temp[j]<<"\n"; if(temp[j] == -1 || empty[i]==temp[j]){ i--; j = (j+1)%l; // cout<<j<<"\n"; continue; }else{ arr[empty[i]] = temp[j]; temp[j] = -1; j = (j+1)%l; } } for(int i = 1;i<arr.size();i++){ cout<<arr[i]<<" "; } cout<<"\n"; return 0; }
300454be43de4a37b6870192f3e51b94dd2cd2d5
ccd2c753f28e620893149e6df4f1167c5a388514
/mara/src/riemann_hlld-rmhd.cpp
0071df66da1c6e8f828aed94f48d658be9e80569
[]
no_license
wme7/python-mhd
52c90c02a61400f8a313422dc9e69e49919c7f0d
d4fb6c26e5f4d5e8af34617c3931d479b5557cc0
refs/heads/master
2021-01-10T02:17:39.593079
2015-06-08T21:35:00
2015-06-08T21:35:00
36,491,944
2
3
null
null
null
null
UTF-8
C++
false
false
19,176
cpp
riemann_hlld-rmhd.cpp
/*------------------------------------------------------------------------------ * FILE: riemann_hlld-rmhd.cpp * * AUTHOR: Jonathan Zrake, NYU CCPP: zrake@nyu.edu * * PURPOSE: Obtain the intercell flux between two constant states using a 5-wave * approximation. * * REFERENCES: Mignone, Ugliano, & Bodo (2008) A five-wave Harten–Lax–van Leer * Riemann solver for relativistic magnetohydrodynamics * *------------------------------------------------------------------------------ */ #include <cstdio> #include "nrsolver.hpp" #include "secant.hpp" #include "riemann_hlld-rmhd.hpp" #include "riemann_hllc.hpp" #include "config.h" static double PrimFromHllState[8]; static double ConsFromHllState[8]; static double FluxFromHllState[8]; int HlldRmhdRiemannSolver::NumberOfSuccess = 0; int HlldRmhdRiemannSolver::NumberOfFailure = 0; class HlldEquation48 : public EquationSystemBaseClass { private: enum { ddd, tau, Sx, Sy, Sz, Bx, By, Bz }; // Conserved enum { rho, pre, vx, vy, vz }; // Primitive struct HlldOuterwaveJumpState { double E,D; double B[3], m[3]; } ; struct HlldInnerwaveState { double U[8]; double B[3], v[3]; } ; const double *Pl, *Pr; double *Ul, *Ur; double *Fl, *Fr; const double ap, am; HlldOuterwaveJumpState L, R; public: HlldEquation48(const double *Pl, const double *Pr, double *Ul, double *Ur, double *Fl, double *Fr, double ap, double am); void Function(const double *x, double *y) const; void Jacobian(const double *x, double *J) const; void SampleSolution(double p21, double x2t, double *P) const; void ReconstructSolution(double p, double *U, double *F, double s) const; void PrintFunction(double p0, double p1) const; void PrintVariables(double p) const; double EstimateSolution(int attempt); private: void FillInnerWaveStates(double p, double *Kl, double *Kr, double *Bc, double &etaL, double &etaR, double &wL, double &wR, HlldInnerwaveState &aL, HlldInnerwaveState &aR) const; inline double dot(const double v[3], const double w[3]) const { return v[0]*w[0] + v[1]*w[1] + v[2]*w[2]; } inline double dot(const double v[3]) const { return v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; } public: class Failure : public std::exception { }; class NegativeIntermediatePressure : public Failure { public: virtual const char *what() const throw() { return "HLLD solver converged to a negative intermediate pressure."; } } ; class SuperLuminalWavespeed : public Failure { public: virtual const char *what() const throw() { return "HLLD solver found superluminal wave speeds."; } } ; class Equation54Violated : public Failure { public: virtual const char *what() const throw() { return "HLLD solver found unacceptable solution, see equation (54)."; } } ; class JumpInNormalBfield : public Failure { public: virtual const char *what() const throw() { return "HLLD solver found normal B-field was discontinuous."; } } ; class InfiniteIntermediatePressure : public Failure { public: virtual const char *what() const throw() { return "Newton-Rapheson solver hit infinite pressure."; } } ; class UnmatchedContactSpeed : public Failure { public: virtual const char *what() const throw() { return "HLLD found normal jump in velocities across the contact wave."; } } ; class DegenerateWaves : public Failure { public: virtual const char *what() const throw() { return "HLLD found some waves are degenerate, solution may be unreliable"; } } ; } ; int HlldRmhdRiemannSolver::IntercellFlux(const double *pl, const double *pr, double *u, double *f, double s, int dim) { AdiabaticIdealRmhd &fluid = Mara->GetFluid<AdiabaticIdealRmhd>(); // Convention here is that user input variables u,f,pl/pr are lower case, and // get indexed with B1,B2,B3 etc. Local variables U,F,Pl/Pr are input for HLLD // and get indexed with Bx,By,Bz etc. HLLD expects all intercell fluxes to be // normal to the x-axis, so we permute the input and output states. // --------------------------------------------------------------------------- int i; double epl, epr, eml, emr; double Ul[8], Ur[8]; double Pl[8], Pr[8]; double Fl[8], Fr[8]; int B1=0,B2=0,B3=0; int S1=0,S2=0,S3=0; int v1=0,v2=0,v3=0; switch (dim) { case 1: B1=Bx; B2=By; B3=Bz; S1=Sx; S2=Sy; S3=Sz; v1=vx; v2=vy; v3=vz; break; case 2: B1=By; B2=Bz; B3=Bx; S1=Sy; S2=Sz; S3=Sx; v1=vy; v2=vz; v3=vx; break; case 3: B1=Bz; B2=Bx; B3=By; S1=Sz; S2=Sx; S3=Sy; v1=vz; v2=vx; v3=vy; break; } Pl[pre] = pl[pre]; Pr[pre] = pr[pre]; Pl[rho] = pl[rho]; Pr[rho] = pr[rho]; Pl[vx ] = pl[v1]; Pr[vx ] = pr[v1]; Pl[vy ] = pl[v2]; Pr[vy ] = pr[v2]; Pl[vz ] = pl[v3]; Pr[vz ] = pr[v3]; Pl[Bx ] = pl[B1]; Pr[Bx ] = pr[B1]; Pl[By ] = pl[B2]; Pr[By ] = pr[B2]; Pl[Bz ] = pl[B3]; Pr[Bz ] = pr[B3]; Pl[Bx] = Pr[Bx] = 0.5*(pl[B1] + pr[B1]); // This is to prevent jumps in Bx if (fluid.PrimToCons(Pl, Ul)) return 1; if (fluid.PrimToCons(Pr, Ur)) return 1; fluid.FluxAndEigenvalues(Ul, Pl, Fl, &epl, &eml, 1); fluid.FluxAndEigenvalues(Ur, Pr, Fr, &epr, &emr, 1); const double am = (eml<emr) ? eml : emr; const double ap = (epl>epr) ? epl : epr; double ml = (fabs(am)<fabs(ap)) ? fabs(ap) : fabs(am); if (MaxLambda < ml) MaxLambda = ml; double *P_hll = PrimFromHllState; double *U_hll = ConsFromHllState; double *F_hll = FluxFromHllState; for (i=0; i<8; ++i) { P_hll[i] = 0.5*(Pl[i] + Pr[i]); U_hll[i] = (ap*Ur[i] - am*Ul[i] + (Fl[i] - Fr[i])) / (ap - am); F_hll[i] = (ap*Fl[i] - am*Fr[i] + ap*am*(Ur[i] - Ul[i])) / (ap - am); } const int hll_c2p_failed = fluid.ConsToPrim(U_hll, P_hll); double U[8], F[8]; HlldEquation48 eqn(Pl, Pr, Ul, Ur, Fl, Fr, ap, am); NewtonRaphesonSolver solver1(15, 1e-12); SecantMethodSolver solver2(15, 1e-12); int Attempt=0, HlldSuccess=0; double p_star; while (!hll_c2p_failed && Attempt < 3 && !HlldSuccess) { try { if (fabs(Pl[Bx]) < 1e-8 || fabs(Pr[Bx]) < 1e-8) { p_star = eqn.EstimateSolution(1); eqn.ReconstructSolution(p_star, U, F, s); } else { p_star = eqn.EstimateSolution(Attempt); solver1.Solve(eqn, &p_star); eqn.ReconstructSolution(p_star, U, F, s); } HlldSuccess = true; } catch (const HlldEquation48::Failure &e) { } catch (const NewtonRaphesonSolver::Failure &e) { } ++Attempt; } if (HlldSuccess) { ++NumberOfSuccess; // Flux / Conserved states rotated back // --------------------------------------------------------------------------- if (u) { u[ddd] = U[ddd]; u[tau] = U[tau]; u[S1 ] = U[Sx]; u[S2 ] = U[Sy]; u[S3 ] = U[Sz]; u[B1 ] = U[Bx]; u[B2 ] = U[By]; u[B3 ] = U[Bz]; } if (f) { f[ddd] = F[ddd]; f[tau] = F[tau]; f[S1 ] = F[Sx]; f[S2 ] = F[Sy]; f[S3 ] = F[Sz]; f[B1 ] = F[Bx]; f[B2 ] = F[By]; f[B3 ] = F[Bz]; } return 0; } else { ++NumberOfFailure; HllcRmhdRiemannSolver hllc; return hllc.IntercellFlux(pl, pr, u, f, s, dim); } } HlldEquation48::HlldEquation48(const double *Pl, const double *Pr, double *Ul, double *Ur, double *Fl, double *Fr, double ap, double am) : EquationSystemBaseClass(1), Pl(Pl), Pr(Pr), Ul(Ul), Ur(Ur), Fl(Fl), Fr(Fr), ap(ap), am(am) { // Change the convention of total energy to be consistent with Mignone // --------------------------------------------------------------------------- Ul[tau] += Ul[ddd]; // Change in convention of total energy Fl[tau] += Fl[ddd]; Ur[tau] += Ur[ddd]; Fr[tau] += Fr[ddd]; L.E = am*Ul[tau] - Fl[tau]; R.E = ap*Ur[tau] - Fr[tau]; L.D = am*Ul[ddd] - Fl[ddd]; R.D = ap*Ur[ddd] - Fr[ddd]; // Fill in the jump across the fast waves, eqn (12) // --------------------------------------------------------------------------- for (int k=0; k<3; ++k) { L.B[k] = am*Ul[Bx+k] - Fl[Bx+k]; R.B[k] = ap*Ur[Bx+k] - Fr[Bx+k]; L.m[k] = am*Ul[Sx+k] - Fl[Sx+k]; R.m[k] = ap*Ur[Sx+k] - Fr[Sx+k]; } } void HlldEquation48::Jacobian(const double *x, double *J) const { const double dp = 1e-8; const double p0 = x[0]-0.5*dp; const double p1 = x[0]+0.5*dp; double f0, f1; Function(&p0, &f0); Function(&p1, &f1); J[0] = (f1-f0)/dp; } void HlldEquation48::FillInnerWaveStates(double p, double *Kl, double *Kr, double *Bc, double &etaL, double &etaR, double &wL, double &wR, HlldInnerwaveState &aL, HlldInnerwaveState &aR) const /* -------------------------------------------------------------------------------------- Notes: - Kl(r) is the same in the aL(R) and cL(R) region. - Bc holds everywhere between the Alfven modes, it does not change across the contact. - In denominator of (45) Mignone is referring to the fast wavespeeds and L/R Bx value. -------------------------------------------------------------------------------------- */ { { double A = L.m[0] - am*L.E + p*(1 - am*am); double G = L.B[1]*L.B[1] + L.B[2]*L.B[2]; double C = L.B[1]*L.m[1] + L.B[2]*L.m[2]; double Q = -A - G + (Ul[Bx]*Ul[Bx])*(1 - am*am); double X = Ul[Bx]*(A*am*Ul[Bx] + C) - (A + G)*(am*p + L.E); if (fabs(X) < 1e-8) X = 1e-8; aL.v[0] = (Ul[Bx]*(A*Ul[Bx] + am*C) - (A + G)*(p + L.m[0])) / X; // eqn (23) aL.v[1] = (Q*L.m[1] + L.B[1]*(C + Ul[Bx]*(am*L.m[0] - L.E))) / X; // eqn (24) aL.v[2] = (Q*L.m[2] + L.B[2]*(C + Ul[Bx]*(am*L.m[0] - L.E))) / X; // eqn (25) aL.B[0] = (L.B[0] - Ul[Bx]*aL.v[0]) / (am - aL.v[0]); // eqn (21) aL.B[1] = (L.B[1] - Ul[Bx]*aL.v[1]) / (am - aL.v[0]); aL.B[2] = (L.B[2] - Ul[Bx]*aL.v[2]) / (am - aL.v[0]); } { double A = R.m[0] - ap*R.E + p*(1 - ap*ap); double G = R.B[1]*R.B[1] + R.B[2]*R.B[2]; double C = R.B[1]*R.m[1] + R.B[2]*R.m[2]; double Q = -A - G + (Ur[Bx]*Ur[Bx])*(1 - ap*ap); double X = Ur[Bx]*(A*ap*Ur[Bx] + C) - (A + G)*(ap*p + R.E); if (fabs(X) < 1e-8) X = 1e-8; aR.v[0] = (Ur[Bx]*(A*Ur[Bx] + ap*C) - (A + G)*(p + R.m[0])) / X; // eqn (23) aR.v[1] = (Q*R.m[1] + R.B[1]*(C + Ur[Bx]*(ap*R.m[0] - R.E))) / X; // eqn (24) aR.v[2] = (Q*R.m[2] + R.B[2]*(C + Ur[Bx]*(ap*R.m[0] - R.E))) / X; // eqn (25) aR.B[0] = (R.B[0] - Ur[Bx]*aR.v[0]) / (ap - aR.v[0]); // eqn (21) aR.B[1] = (R.B[1] - Ur[Bx]*aR.v[1]) / (ap - aR.v[0]); aR.B[2] = (R.B[2] - Ur[Bx]*aR.v[2]) / (ap - aR.v[0]); } wL = p + (L.E - dot(aL.v,L.m)) / (am - aL.v[0]); // eqn (31) wR = p + (R.E - dot(aR.v,R.m)) / (ap - aR.v[0]); if (wL<0) wL *= -1; if (wR<0) wR *= -1; etaL = -((Ul[Bx]>0)-(Ul[Bx]<0)) * sqrt(wL); etaR = +((Ur[Bx]>0)-(Ur[Bx]<0)) * sqrt(wR); for (int k=0; k<3; ++k) { Kl[k] = (L.m[k] + p*(k==0) + L.B[k]*etaL) / (am*p + L.E + Ul[Bx]*etaL); // eqn (43) Kr[k] = (R.m[k] + p*(k==0) + R.B[k]*etaR) / (ap*p + R.E + Ur[Bx]*etaR); Bc[k] = ((aR.B[k]*(Kr[0] - aR.v[0]) + aR.B[0]*aR.v[k]) - // eqn (45) (aL.B[k]*(Kl[0] - aL.v[0]) + aL.B[0]*aL.v[k])) / (Kr[0] - Kl[0]); // The following trick assures that the Bc's are not nan's. In the case of // the denominator of (45) being zero, the contact region also has zero // width and so it won't matter what Bc is set to. // ------------------------------------------------------------------------- if (fabs(Kr[0] - Kl[0]) < 1e-10) Bc[k] = 0.0; } } void HlldEquation48::Function(const double *x, double *y) const { const double &p = x[0]; if (fabs(Pl[Bx] - Pr[Bx]) > 1e-12) { throw JumpInNormalBfield(); } if (Mara_isinf_cxx(p)) { throw InfiniteIntermediatePressure(); } double Kl[3], Kr[3], Bc[3]; double etaL, etaR, wL, wR; HlldInnerwaveState aL, aR; FillInnerWaveStates(p, Kl, Kr, Bc, etaL, etaR, wL, wR, aL, aR); const double delK = Kr[0] - Kl[0]; const double Bch[3] = { Bc[0]*delK, Bc[1]*delK, Bc[2]*delK }; const double Yl = (1 - dot(Kl)) / (etaL*delK - dot(Kl, Bch)); const double Yr = (1 - dot(Kr)) / (etaR*delK - dot(Kr, Bch)); if (fabs(delK) < 1e-10) { *y = 0.0; } else if (fabs(Bc[0]) < 1e-10) { *y = delK; } else { *y = delK*(1 - Bc[0]*(Yr - Yl)); } } void HlldEquation48::ReconstructSolution (double p, double *U, double *F, double s) const { double Kl[3], Kr[3], Bc[3]; double etaL, etaR, wL, wR; HlldInnerwaveState aL, aR, cL, cR; FillInnerWaveStates(p, Kl, Kr, Bc, etaL, etaR, wL, wR, aL, aR); const double denomL = etaL - dot(Kl,Bc); const double denomR = etaR - dot(Kr,Bc); for (int k=0; k<3; ++k) { cL.v[k] = Kl[k] - Bc[k]*(1 - dot(Kl)) / denomL; // eqn (47) cR.v[k] = Kr[k] - Bc[k]*(1 - dot(Kr)) / denomR; if (fabs(denomL) < 1e-10) cL.v[k] = aL.v[k]; if (fabs(denomR) < 1e-10) cR.v[k] = aR.v[k]; } const double lamC = cR.v[0]; // speed of the contact wave (L/R equivalent) const double lmaL = Kl[0]; // speed of the L/R Alfven waves const double lmaR = Kr[0]; const double TOL = 1e-14; // positive tolerance ~ weaker rejection criterion if (p < 0.0) { throw NegativeIntermediatePressure(); } if (lmaL < -1.0 || lmaR > 1.0 || fabs(lamC) > 1.0) { throw SuperLuminalWavespeed(); } if (!((wL > p) && (aL.v[0] > am-TOL) && (cL.v[0] > lmaL-TOL))) { throw Equation54Violated(); } if (!((wR > p) && (aR.v[0] < ap+TOL) && (cR.v[0] < lmaR+TOL))) { throw Equation54Violated(); } if (fabs(cR.v[0] - cL.v[0]) > 1e-8) { throw UnmatchedContactSpeed(); } double denom; int i; // States between the fast and Alfven waves // --------------------------------------------------------------------------- if (fabs(denom = am - aL.v[0]) < 1e-8) { for (i=0; i<8; ++i) aL.U[i] = Ul[i]; } else { const double vB = dot(aL.v,aL.B); aL.U[ddd] = L.D / denom; aL.U[tau] = ( L.E + p*aL.v[0] - vB*aL.B[0]) / denom; aL.U[Sx ] = (aL.U[tau] + p)*aL.v[0] - vB*aL.B[0]; aL.U[Sy ] = (aL.U[tau] + p)*aL.v[1] - vB*aL.B[1]; aL.U[Sz ] = (aL.U[tau] + p)*aL.v[2] - vB*aL.B[2]; aL.U[Bx ] = aL.B[0]; aL.U[By ] = aL.B[1]; aL.U[Bz ] = aL.B[2]; } if (fabs(denom = ap - aR.v[0]) < 1e-8) { for (i=0; i<8; ++i) aR.U[i] = Ur[i]; } else { const double vB = dot(aR.v,aR.B); aR.U[ddd] = R.D / denom; aR.U[tau] = ( R.E + p*aR.v[0] - vB*aR.B[0]) / denom; aR.U[Sx ] = (aR.U[tau] + p)*aR.v[0] - vB*aR.B[0]; aR.U[Sy ] = (aR.U[tau] + p)*aR.v[1] - vB*aR.B[1]; aR.U[Sz ] = (aR.U[tau] + p)*aR.v[2] - vB*aR.B[2]; aR.U[Bx ] = aR.B[0]; aR.U[By ] = aR.B[1]; aR.U[Bz ] = aR.B[2]; } // States between the Alfven and contact waves // --------------------------------------------------------------------------- if (fabs(denom = lmaL - lamC) < 1e-8) { for (i=0; i<8; ++i) cL.U[i] = aL.U[i]; } else { const double vBc = dot(cL.v,Bc); cL.U[ddd] = aL.U[ddd] * (lmaL - aL.v[0]) / denom; cL.U[tau] = (lmaL*aL.U[tau] - aL.U[Sx] + p*lamC - vBc*Bc[0]) / denom; cL.U[Sx ] = (cL.U[tau] + p)*cL.v[0] - vBc*Bc[0]; cL.U[Sy ] = (cL.U[tau] + p)*cL.v[1] - vBc*Bc[1]; cL.U[Sz ] = (cL.U[tau] + p)*cL.v[2] - vBc*Bc[2]; cL.U[Bx ] = Bc[0]; cL.U[By ] = Bc[1]; cL.U[Bz ] = Bc[2]; } if (fabs(denom = lmaR - lamC) < 1e-8) { for (i=0; i<8; ++i) cR.U[i] = aR.U[i]; } else { const double vBc = dot(cR.v,Bc); cR.U[ddd] = aR.U[ddd] * (lmaR - aR.v[0]) / denom; cR.U[tau] = (lmaR*aR.U[tau] - aR.U[Sx] + p*lamC - vBc*Bc[0]) / denom; cR.U[Sx ] = (cR.U[tau] + p)*cR.v[0] - vBc*Bc[0]; cR.U[Sy ] = (cR.U[tau] + p)*cR.v[1] - vBc*Bc[1]; cR.U[Sz ] = (cR.U[tau] + p)*cR.v[2] - vBc*Bc[2]; cR.U[Bx ] = Bc[0]; cR.U[By ] = Bc[1]; cR.U[Bz ] = Bc[2]; } // All done, just fill in the flux F and the state U // --------------------------------------------------------------------------- if ( s<=am ) for (i=0; i<8; ++i) F[i] = Fl[i]; else if ( am<s && s<=lmaL) for (i=0; i<8; ++i) F[i] = Fl[i] + am*(aL.U[i]-Ul[i]); else if (lmaL<s && s<=lamC) for (i=0; i<8; ++i) F[i] = Fl[i] + am*(aL.U[i]-Ul[i]) + lmaL*(cL.U[i]-aL.U[i]); else if (lamC<s && s<=lmaR) for (i=0; i<8; ++i) F[i] = Fr[i] + ap*(aR.U[i]-Ur[i]) + lmaR*(cR.U[i]-aR.U[i]); else if (lmaR<s && s<=ap ) for (i=0; i<8; ++i) F[i] = Fr[i] + ap*(aR.U[i]-Ur[i]); else if ( ap<s ) for (i=0; i<8; ++i) F[i] = Fr[i]; if ( s<=am ) for (i=0; i<8; ++i) U[i] = Ul[i]; else if ( am<s && s<=lmaL) for (i=0; i<8; ++i) U[i] = aL.U[i]; else if (lmaL<s && s<=lamC) for (i=0; i<8; ++i) U[i] = cL.U[i]; else if (lamC<s && s<=lmaR) for (i=0; i<8; ++i) U[i] = cR.U[i]; else if (lmaR<s && s<=ap ) for (i=0; i<8; ++i) U[i] = aR.U[i]; else if ( ap<s ) for (i=0; i<8; ++i) U[i] = Ur[i]; F[tau] -= F[ddd]; U[tau] -= U[ddd]; } double HlldEquation48::EstimateSolution(int attempt) { // Try the HLL total pressure of the input states first // --------------------------------------------------------------------------- if (attempt == 0) { const double *P = PrimFromHllState; const double V2 = P[vx]*P[vx] + P[vy]*P[vy] + P[vz]*P[vz]; const double B2 = P[Bx]*P[Bx] + P[By]*P[By] + P[Bz]*P[Bz]; const double Bv = P[Bx]*P[vx] + P[By]*P[vy] + P[Bz]*P[vz]; const double W2 = 1.0 / (1.0 - V2); const double W = sqrt(W2); const double b0 = W*Bv; const double b2 = (B2 + b0*b0) / W2; return P[pre] + 0.5*b2; } // Next try equation (55) // --------------------------------------------------------------------------- else if (attempt == 1) { double *F_hll = FluxFromHllState; double *U_hll = ConsFromHllState; F_hll[tau] += F_hll[ddd]; U_hll[tau] += U_hll[ddd]; const double a = 1.0; const double b = U_hll[tau] - F_hll[Sx]; const double c = F_hll[tau] * U_hll[Sx] - U_hll[tau] * F_hll[Sx]; const double p1 = fabs((-b + sqrt(b*b - 4*a*c))/(2*a)); const double p2 = fabs((-b - sqrt(b*b - 4*a*c))/(2*a)); F_hll[tau] -= F_hll[ddd]; U_hll[tau] -= U_hll[ddd]; return (p1<p2) ? p1 : p2; } // Try p=0 until they give up // --------------------------------------------------------------------------- else return 0.0; } void HlldEquation48::PrintFunction(double p0, double p1) const { FILE *outf = fopen("eqn48.dat", "w"); const int NumP = 10000; const double dp = (p1-p0) / NumP; for (int i=0; i<NumP; ++i) { double p = p0 + i*dp; double eqn48; Function(&p, &eqn48); fprintf(outf, "%8.6f %8.6f\n", p, eqn48); } fclose(outf); }
489fa7ced0a7d059cb0a91be21c236bd8e81261d
d9f2430ec0c61e5cb69d01f3abd5667ab4c924c6
/Assignment 1 - Affine/AffineTest.cpp
a3b06fce8d5ad7f3f3c21ce9f3bdfe78813f6cec
[]
no_license
ProgrammingMoogle/Portfolio
d74aeff998386e6724ab133d8024b194688a6057
8e361dea4b9e523f57525fe2d049667618a6c24d
refs/heads/master
2020-03-27T04:03:17.361681
2018-08-23T22:30:11
2018-08-23T22:30:11
145,908,779
0
1
null
null
null
null
UTF-8
C++
false
false
1,186
cpp
AffineTest.cpp
// AffineTest.cpp // cs200 8/17 #include <iostream> #include <iomanip> #include <cmath> #include "Affine.h" using namespace std; ostream& operator<<(ostream& s, const Hcoord& v) { return s << '[' << v.x << ',' << v.y << ',' << v.w << ']'; } ostream& operator<<(ostream& s, const Affine& A) { s << '{'; for (int i=0; i < 3; ++i) { s << '{'; for (int j=0; j < 3; ++j) s << A[i][j] << ((j < 2) ? ',' : '}'); s << ((i < 2) ? ',' : '}'); } return s; } int main(void) { const Point O; const float pi = 4.0f*atan(1.0f); cout << fixed << setprecision(3); Vector v(4,-5); Affine A = translate(v) * scale(3); cout << A << endl; Point P(9,-2); Point Q = O + 3*(P-O) + v, R = A*P; cout << abs(R-Q) << endl; A = rotate(0.5f*pi) * translate(Vector(7,5)); cout << A << endl; P = Point(1,4); Affine B = translate(P-O) * rotate(1.5f*pi) * translate(O-P); cout << B << endl; Q = Point(5,8); Vector u = Q - P; cout << dot(u,B*Q-P) << endl; B = Affine(Vector(5,2),Vector(1,4),Point(4,4)); cout << B << endl; u = 3*P + 2*Q - 5*R; cout << u << endl; P = 3*P + 2*Q - 7*R; // this should fail ... return 0; }
10f6f8323bf380312f3aa2eefc948ab9ca412b13
14ca360109fe22fc4ac1323f1ebfdae6204bea3d
/P60OptometristStart.cpp
eac43eefd607ff316fec23adaf2efd3691b2c56b
[]
no_license
picoexperiment/PICOJarTracker
92ea62c3da7726d9e5c538fd4493d55ac2764526
0d0cc1d838154b1c05b5146798559c1379ef0ae3
refs/heads/master
2023-06-01T01:14:26.604187
2023-04-24T15:22:19
2023-04-24T15:22:19
243,135,202
0
0
null
2023-04-20T15:30:15
2020-02-26T00:50:06
C++
UTF-8
C++
false
false
10,160
cpp
P60OptometristStart.cpp
/* OpenCV code to find fiducial marks for * PICO Dark Matter search - the Geyser * * Written by Pitam Mitra for PICO Collaboration * * Latest Edit: 2014-07-11. See the HG Changelog */ #include <opencv2/opencv.hpp> //#include "opencv2/cudaimgproc.hpp" //#include <opencv/highgui/highgui.hpp> //#include <opencv2/core/core.hpp> /*C++ Stuff*/ #include <stdio.h> #include <string> #include <iostream> #include <vector> #include <algorithm> #include <assert.h> #include <stdlib.h> /* exit, EXIT_FAILURE */ /*Geyser Image Analysis Stuff*/ #include "ParseFolder/ParseFolder.hpp" //#include "common/CommonDatatypes.h" //#include "SQLiteDBstorage/imageAnalysisResults.hpp" #include "AnalyzerUnit.hpp" #include "PICOFormatWriter/PICOFormatWriterV2.hpp" #include "common/UtilityFunctions.hpp" #include "LoadTemplates.hpp" #include "ParseFolder/Parser.hpp" #include "ParseFolder/RawParser.hpp" #include "ParseFolder/ZipParser.hpp" #include <boost/program_options.hpp> namespace po = boost::program_options; const int evalEntropyThresholdFrames = 2; std::vector<int> badEvents; /*Workaround because fermi grid is using old gcc*/ bool BubblePosZsort(cv::RotatedRect a, cv::RotatedRect b) { return a.center.y<b.center.y; } bool eventNameOrderSort(std::string a, std::string b) { return std::stoi(a)<std::stoi(b); } void RunEachCameraAnalysisMachine(OutputWriter** P60Output, std::string AEventNumber, std::string ImgDir, int camera, std::vector<FiducialMark>& CameraTrackObjects, Parser* FileParser){ OutputWriter* Pico60Writer = *P60Output; //AnalyzerUnit *AnalyzerC0 = new AnalyzerUnit(EventList[evi], imageDir, 0, CameraTrackObjects0); /*EventID, imageDir and camera number*/ AnalyzerUnit *AnalyzerCGeneric = new AnalyzerUnit(AEventNumber, ImgDir, camera, CameraTrackObjects, FileParser); /*EventID, imageDir and camera number*/ /*We need the actual event number in case folders with events are missing*/ int actualEventNumber = atoi(AEventNumber.c_str()); /*Fancy coursors!*/ advance_cursor(); /*Exception handling - per camera*/ try { AnalyzerCGeneric->LoadFrameForFiducialTracking(); if (AnalyzerCGeneric->okToProceed) AnalyzerCGeneric->TrackAllFiducialMarks(); if (AnalyzerCGeneric->okToProceed) { AnalyzerCGeneric->CalculatePerspectiveShift(); Pico60Writer->stageMarkerOutput(AnalyzerCGeneric->TemplatePos, camera, actualEventNumber, AnalyzerCGeneric->HomographyMatrix); } else { Pico60Writer->stageMarkerOutputError(camera, -5, actualEventNumber); Pico60Writer->thisFrameFailedAnalysis[camera]=true; } /*The exception block for camera specific crashes. outputs -6 for the error*/ } catch (...) { Pico60Writer->stageMarkerOutputError(camera,-6, actualEventNumber); Pico60Writer->thisFrameFailedAnalysis[camera]=true; } delete AnalyzerCGeneric; advance_cursor(); } std::string usage(){ std::string msg( "Usage: P60Optometrist[-hz] [-t template_dir] -d data_dir -r run_ID -o out_dir\n" "Run the AutoBub3hs bubble finding algorithm on a PICO run\n\n" "Required arguments:\n" " -d, --data_dir = Dir\t\tpath to the directory in which the run folder/file is stored\n" " -r, --run_id = Str\t\trun ID, formatted as YYYYMMDD_*\n" " -o, --out_dir = Dir\t\tdirectory to write the output file to\n" " -t, --template_dir = Dir\tdirectory containing subfolders with template images per camera. Subdirectories should be names \"cam0\", \"cam1\", etc.\n\n" "Optional arguments:\n" " -h, --help\t\t\tgive this help message\n" " -z, --zip\t\t\tindicate the run is stored as a zip file; otherwise assumed to be in a directory\n" " -e, --event = Int\t\t\tprocess a single event rather than the whole run\n" ); return msg; } /*The main autobub code starts here*/ int main(int argc, char** argv) { std::string dataLoc; std::string run_number; std::string out_dir; std::string tem_dir; bool zipped = false; int event_user = -1; // generic options po::options_description generic("Arguments"); generic.add_options() ("help,h", "produce help message") ("zip,z", po::bool_switch(&zipped), "run is stored as a zip file") ("data_dir,d", po::value<std::string>(&dataLoc), "directory in which the run is stored") ("run_num,r", po::value<std::string>(&run_number), "run ID, formatted as YYYYMMDD_") ("out_dir,o", po::value<std::string>(&out_dir), "directory to write the output file to") ("template_dir,t", po::value<std::string>(&tem_dir), "directory containing the camera mask pictures") ("event,e", po::value<int>(&event_user), "specify a single event to process") ; // Parsing arguments po::variables_map vm; po::store(po::command_line_parser(argc, argv). options(generic).run(), vm); po::notify(vm); if (vm.count("help") | argc == 1){ std::cout << usage() << std::endl; return 1; } if (dataLoc.compare("") == 0 | run_number.compare("") == 0 | out_dir.compare("") == 0){ std::cerr << "Insufficient required arguments; use \"P60Optometrist -h\" to view required arguments" << std::endl; return -1; } printf("This is P60Optometrist perspective tracker, the bubble chamber or the camera movement tracker.\n"); if (dataLoc.find_last_of("/") != dataLoc.size()-1) dataLoc+="/"; if (out_dir.find_last_of("/") != out_dir.size()-1) out_dir+="/"; if (tem_dir.find_last_of("/") != tem_dir.size()-1) tem_dir+="/"; std::string eventDir=dataLoc+run_number+"/"; /* File parser stuff */ std::string imageFormat = "cam%d_image%u.png"; std::string imageFolder = "/Images/"; Parser *FileParser; /* The Parser reads directories/zip files and retreives image data */ if (zipped){ FileParser = new ZipParser(eventDir, imageFolder, imageFormat); } else { FileParser = new RawParser(eventDir, imageFolder, imageFormat); } /*Construct list of events*/ std::vector<std::string> EventList; int* EVstatuscode = 0; std::cout<<eventDir<<"\n"; try { //GetEventDirLists(eventDir.c_str(), EventList, EVstatuscode); FileParser->GetEventDirLists(EventList); /*Crash handler at the begining of the program - writes -5 if the folder could not be read*/ } catch (...) { std::cout<<"Failed to read the images from the run. Optometrist cannot continue.\n"; //PICO60Output->stageMarkerOutputError(CameraNumber,-5, -1); //PICO60Output->writeMarkerOutput(); return -5; } /*A sort is unnecessary at this level, but it is good practice and does not cost extra resources*/ std::sort(EventList.begin(), EventList.end(), eventNameOrderSort); /*Event list is now constructed*/ /*Declare the memory to load the templates in*/ //std::vector<cv::Mat> CameraTrackObjects0; //std::vector<cv::Mat> CameraTrackObjects1; //std::vector<cv::Mat> CameraTrackObjects2; //std::vector<cv::Mat> CameraTrackObjects3; //LoadTemplatesSingleCam(CameraTrackObjects0, 0, NMark0); //LoadTemplatesSingleCam(CameraTrackObjects1, 1, NMark1); //LoadTemplatesSingleCam(CameraTrackObjects2, 2, NMark2); //LoadTemplatesSingleCam(CameraTrackObjects3, 3, NMark3); /*New templates*/ std::vector<FiducialMark> CameraTrackObjects0; std::vector<FiducialMark> CameraTrackObjects1; std::vector<FiducialMark> CameraTrackObjects2; std::vector<FiducialMark> CameraTrackObjects3; int templLoadStatus = 0; templLoadStatus += LoadTemplatesConfig(0,CameraTrackObjects0, tem_dir); templLoadStatus += LoadTemplatesConfig(1,CameraTrackObjects1, tem_dir); templLoadStatus += LoadTemplatesConfig(2,CameraTrackObjects2, tem_dir); templLoadStatus += LoadTemplatesConfig(3,CameraTrackObjects3, tem_dir); if (templLoadStatus != 0){ std::cout << "Failed to load templates. Optometrist cannot continue." << std::endl; return -2; } /*I anticipate the object to become large with many bubbles, so I wanted it on the heap*/ OutputWriter *PICO60Output = new OutputWriter(out_dir, run_number); PICO60Output->writeHeader(CameraTrackObjects0.size(),CameraTrackObjects1.size(),CameraTrackObjects2.size(),CameraTrackObjects3.size()); /*Detect mode *Iterate through all the events in the list and detect bubbles in them one by one *A seprate procedure will store them to a file at the end */ for (int evi = 0; evi < EventList.size(); evi++) { if (event_user >= 0 && evi != event_user) continue; std::string imageDir=eventDir+EventList[evi]+"/Images/"; printf("\nProcessing event: %s / %d ... ", EventList[evi].c_str(), EventList.size()-1); /* for (int icam = 0; icam < 4; icam++){ Parser *tp = FileParser->clone(); RunEachCameraAnalysisMachine(&PICO60Output, EventList[evi], imageDir, icam, CameraTrackObjects0, tp); delete tp; } */ Parser *tp = FileParser->clone(); RunEachCameraAnalysisMachine(&PICO60Output, EventList[evi], imageDir, 0, CameraTrackObjects0, tp);//FileParser); RunEachCameraAnalysisMachine(&PICO60Output, EventList[evi], imageDir, 1, CameraTrackObjects1, tp);//FileParser); RunEachCameraAnalysisMachine(&PICO60Output, EventList[evi], imageDir, 2, CameraTrackObjects2, tp);//FileParser); RunEachCameraAnalysisMachine(&PICO60Output, EventList[evi], imageDir, 3, CameraTrackObjects3, tp);//FileParser); delete tp; /*Write and commit output after each iteration, so in the event of a crash, its not lost*/ PICO60Output->writeCameraOutput(EventList[evi]); } delete PICO60Output; delete FileParser; printf("P60Optometrist done analyzing this sequence. Thank you.\n"); return 0; }
29d88d765682ab2547d8f45b4719cb162901919d
02df0985b6d1bb907f5055aba0a0f35206992c10
/n为水仙花数/main.cpp
7eb1b972d600a2f05543814fab2e855366e0041f
[]
no_license
HCxiaozuoe/narcissistic-number
d7d4ba2f5fea59506b4392aff39f74580cbbce0a
3142924fde6b1fa174b626790513eed4d6e62c41
refs/heads/master
2021-09-10T05:32:30.300782
2018-03-21T05:45:27
2018-03-21T05:45:27
126,128,149
0
0
null
null
null
null
GB18030
C++
false
false
1,098
cpp
main.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int n; //the number of digits. int start,end; //表示N位数的 initial value and stop value int m; //待分解各位的数,及、即判断的数 int digit; //某个数位的值 int sum; //各位数的N次方的和 int i; //循环变量 cout<<"求n位数的自幂数,请输入位数:"; cin>>n; while(n>0) //大于0时计算 { start=pow(10,n-1); end=pow(10,n)-1; cout<<n<<"位自幂数:"; for(i=start;i<=end;i++) //从其实值得终止值逐个检验 { m=i; //将i赋给m sum=0; while(m!=0) {digit=m%10; //取低位数字 sum=sum+pow(digit,n); m=m/10; //十位成新个位 } if(sum==i) { cout<<i<<" "; } } break; } return 0; }
c97f73b709409b888802e976f1e3585ad35bb88c
af9f57e07b2c1407a0c1bf1b0f386d3e19f9d780
/GDP2019_20/RenderManager.h
dbd8bca15ecd456a8e44ba3b383984b9b58b1310
[ "MIT" ]
permissive
d01000100/gl_demo
9054e07e1d6fc6425e6c9334cfbb6bab2a67dcf0
5c0894b1fabf5727836757e7d44528c8b513d2d5
refs/heads/master
2020-08-09T06:35:52.440722
2020-03-22T03:50:04
2020-03-22T03:50:04
214,021,090
0
0
null
null
null
null
UTF-8
C++
false
false
1,401
h
RenderManager.h
#pragma once #include <glm/vec3.hpp> #include "cFBO.h" #include "GameItemFactory/iGameItem.h" #include "Scene.h" #include "util.h" #include "Camera.h" struct SceneDef { Scene* pScene; int width, height; std::string name, pathfile; bool isRendered = true; cFBO* pFBO; SceneDef() : pScene(nullptr), width(1600), height(800), pFBO(nullptr) {} }; struct RenderManager { static std::map<std::string, SceneDef*> mScenes; static SceneDef* sceneOnEdition; static void setUpCamera(Camera* camera); static void setUpCamera(glm::vec3, glm::vec3); static void setUpProjection(SceneDef* sceneData); static void drawEditor(SceneDef* sceneData); /* * Draw a scene stored in the map of scenes by name. * and output the result to a FBO or to the frame buffer if null. * a scene: (collection of game items: objects, lights, skybox) */ static bool deferredDraw( glm::vec3 eyePos, glm::vec3 cameraTarget, std::string sceneName, const std::map<std::string, glm::vec4>& shaderProps = {} ); static bool deferredDraw( Camera *camera, std::string sceneName, const std::map<std::string, glm::vec4>& shaderProps = {} ); /* * Get the FBO in which `sceneName` renders to. * Can be nullptr. */ static cFBO* getFBO(std::string sceneName); static bool renderStencilPortal( Camera* camera, std::string outerScene, std::string portalScene, std::string innerScene); };
5e89234354a6f9a748f772b241e7d8b439557b73
4ae3a9f815e4b57ca310bcd1a93e531fcf571326
/alibaba/编程测试.cpp
337f8dec75861d3659980f6d1c52af8438373a0a
[]
no_license
zhangji2015zhj/2019_job_hunting
b462fa8d67f5fe0b32e393e59c78b6d8fd75aac8
a8f5bddf8a366193b8647cd1f0514b541aaa20a1
refs/heads/master
2020-03-25T22:27:34.551576
2018-08-16T14:32:54
2018-08-16T14:32:54
144,224,639
0
0
null
null
null
null
UTF-8
C++
false
false
1,337
cpp
编程测试.cpp
#include <iostream> #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <fstream> #include <iomanip> #include <cmath> #include <cstdlib> #include <chrono> #include <iterator> using namespace std; vector<long long int> apple; void fun(long long int s) { return; } int main(int argc, char const *argv[]) { int m, n; cin >> n; // vector<int> time_cost(m+1); apple.resize(n + 1); apple[0] = 0; for (int i = 1; i <= n; i++) { cin >> apple[i]; apple[i] += apple[i - 1]; } cin >> m; while (m--) { /* code */ long long int apple_now; cin >> apple_now; cout<<lower_bound(apple.begin(), apple.end(), apple_now) - apple.begin(); // fun(apple_now); if (n != 0) { cout << endl; } } // while (n--) // { // string T; // cin >> T; // if (fun(T)) // { // cout << "yes"; // } // else // { // cout << "no"; // } // if (n != 0) // { // cout << endl; // } // } return 0; }
951b6b1d85a71d5689586322e75015ae09ec0149
acb84fb8d54724fac008a75711f926126e9a7dcd
/poj/poj2976.cpp
4efc302768e304ce12b673f969477e508230cc7a
[]
no_license
zrt/algorithm
ceb48825094642d9704c98a7817aa60c2f3ccdeb
dd56a1ba86270060791deb91532ab12f5028c7c2
refs/heads/master
2020-05-04T23:44:25.347482
2019-04-04T19:48:58
2019-04-04T19:48:58
179,553,878
1
0
null
null
null
null
UTF-8
C++
false
false
773
cpp
poj2976.cpp
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n,k; int a[1000],b[1000]; double c[1000]; bool jud(double mid){ for(int i=0;i<n;i++){ c[i]=(double)a[i]-(double)b[i]*mid; } double ret=0.0; sort(c,c+n); for(int p=k;p<n;p++){ ret+=c[p]; } if(ret>0.0){ return true; }else{ return false; } } int main(){ while(scanf("%d%d",&n,&k)==2&&n){ for(int i=0;i<n;i++){ scanf("%d",&a[i]); } for(int i=0;i<n;i++){ scanf("%d",&b[i]); } double l=0.0,r=1.0; for(int i=1;i<=100;i++){ double mid=(l+r)/2.0; if(jud(mid)){//true mid small false mid large l=mid; } else{ r=mid; } } printf("%.0f\n",l*100); } return 0; } //有序序列从小到大递增
7e074731366861fbd47db260222995a08376daac
d9961f5cf2c762698f3bcfdc465e17993d6a02dc
/src/game/game_object.h
fc567df4fb4f23045e62d7d5167f02177f3dad8c
[]
no_license
MisterMjirDeprecated/Platformer
b852133d5074715636bc3e96eae32c00c079252e
0953fca912a829ba02b7e51501f08b1989d1dfe8
refs/heads/master
2022-06-14T22:43:36.939841
2022-05-30T17:27:17
2022-05-30T17:27:17
230,000,419
0
0
null
null
null
null
UTF-8
C++
false
false
163
h
game_object.h
#ifndef GAME_OBJECT #define GAME_OBJECT class GameObject { public: virtual ~GameObject() {} virtual void update() = 0; virtual void draw() = 0; }; #endif
0fb51cdeebbe104ab95f84569ccbcc19e23553d2
f6199cdff5f7ca98f5d6d266354a2ea728b72624
/Practice/arrays/prac3.cpp
fda1cc944eb01ab03481c45a9a8e31c3ef4af64d
[]
no_license
rishika1802/interview_prep
0215b80d97d258593a6f2eec37e1722333a30691
7203cf4a290462e2347e91429b868922feac8587
refs/heads/master
2023-06-24T13:03:19.187886
2023-06-11T16:31:48
2023-06-11T16:31:48
216,331,791
0
0
null
null
null
null
UTF-8
C++
false
false
264
cpp
prac3.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int *arr=new int[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } int x; for(int i=0;i<n;i++){ int a=arr[i]%n; arr[a]+=n; } for(int i=0;i<n;i++){ if ((arr[i]/n) > 1) cout << i << " "; } return 0; }
99a4fa47830329b1fafb91c985de9061d4f87c0c
03700e2ff7e48ca17443bf8aa3611e634a0acdc8
/source/Kernel/HardwareAbstraction/Random/Random.cpp
36af8360b2661c52fcf110708614074c18b1d717
[]
no_license
Wannabe66/mx
432aac7b4ac7998e61fe2e432e54d9a03226e37a
f4f73da9bb7c2c0760de920ec2cb931846b90a31
refs/heads/master
2021-01-18T13:14:08.905424
2015-03-08T11:45:48
2015-03-08T11:45:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
666
cpp
Random.cpp
// Random.cpp // Copyright (c) 2014 - The Foreseeable Future, zhiayang@gmail.com // Licensed under Creative Commons Attribution ShareAlike 3.0 Unported. #include <stdint.h> #include <HardwareAbstraction/Random.hpp> namespace Kernel { namespace HardwareAbstraction { Random::Random(Random* dev) { this->ActualGen = dev; } Random::~Random() { } uint8_t Random::GenerateByte() { return this->ActualGen->GenerateByte(); } uint16_t Random::Generate16() { return this->ActualGen->Generate16(); } uint32_t Random::Generate32() { return this->ActualGen->Generate32(); } uint64_t Random::Generate64() { return this->ActualGen->Generate64(); } } }
e435d1d183ad984639aec6e758ba78350e8a97a3
ba0847f266358b9ed91e054382d5953e0dd50c46
/src/r.cpp
3715af530b0abc32f117eee3a2027510a21a8f8b
[]
no_license
Ryunyy/Turing
9ca261dc03815568e9c618a76941ada672614feb
ef1b1004252b52459d1c01e02e5b1c29cdd83ea6
refs/heads/master
2022-12-13T06:39:24.171483
2020-09-13T13:05:16
2020-09-13T13:05:16
275,322,748
2
0
null
null
null
null
UTF-8
C++
false
false
674
cpp
r.cpp
#include "incl.h" extern bool r_insp(vector<struct st> &rls, int N); int r(vector<struct st> &rls, int N) { int j, k = N; string q = ""; setlocale(LC_ALL, "RUS"); cout << endl << "Введите правила обработки. Для завершения ввода введите 'stop': " << endl << endl; z: N = k; for (j = 0; j < N; j++) { cin >> q; if (q != "stop") rls[j].fp = q; else { N = j; cout << endl; break; } cin >> rls[j].es; cin >> rls[j].ns; cin >> rls[j].mv; cin >> rls[j].np; } if (r_insp(rls, N)) goto z; return N; }
aa147b3805508b28f8b576aed52f5f7bd11aa545
d9b2f31c9e11afbe5dfe4d63d93c588034ba0ccc
/CppUnitTest/test/main.cpp
208b3bb9b862a59043e1374da9af3acdc6569935
[ "MIT" ]
permissive
richsposato/Hestia
5de9baac5a27d3623393ffc362dec44be80406bf
37de060663114ab173f8f82a034f16edb2eda649
refs/heads/master
2021-08-16T07:44:13.091972
2017-11-19T08:01:26
2017-11-19T08:01:26
106,369,018
1
1
null
null
null
null
UTF-8
C++
false
false
32,651
cpp
main.cpp
// ---------------------------------------------------------------------------- // The C++ Unit Test Library // Copyright (c) 2007 by Rich Sposato // // Permission to use, copy, modify, distribute and sell this software for any // purpose is hereby granted under the terms stated in the GNU Library Public // License, provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear in // supporting documentation. // // ---------------------------------------------------------------------------- // $Header: /cvsroot/hestia/CppUnitTest/test/main.cpp,v 1.28 2007/07/19 19:59:45 rich_sposato Exp $ // ---------------------------------------------------------------------------- #include "UnitTest.hpp" #include <assert.h> #include <iostream> #include "Thingy.hpp" using namespace std; // ---------------------------------------------------------------------------- void TestThingy1( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Test 1 Thingy"); Thingy justOne( 1 ); // Passing tests. UNIT_TEST( u, !justOne.IsZero() ); UNIT_TEST_WITH_MSG( u, !justOne.IsZero(), "This is not zero." ); UNIT_TEST_JUST_MSG( u, "You can output any message directly into the test results!" ); // Warning tests. UNIT_TEST_WARN( u, justOne.IsZero() ); UNIT_TEST_WARN( u, !justOne.IsZero() ); UNIT_TEST_WARN_MSG( u, justOne.IsZero(), "This is just a warning." ); UNIT_TEST_WARN_MSG( u, !justOne.IsZero(), "This is just a warning." ); // Failing tests. UNIT_TEST( u, justOne.IsZero() ); UNIT_TEST_WITH_MSG( u, justOne.IsZero(), "This is not zero." ); /** @par Using the tested expression - part 1. If you need to store the value of the tested expression, then you can call UnitTest::DoTest function directly instead of calling it through one of UNIT_TEST macros. Just assign UnitTest::DoTest's return value to a boolean variable. You can then use that variable later. */ bool passed = u->DoTest( __FILE__, __LINE__, u->Checked, justOne.IsZero(), "justOne.IsZero()" ); if ( !passed ) { UNIT_TEST_JUST_MSG( u, "Call to justOne.IsZero() failed!" ); } /** @par Using the tested expression - part 2. Another way to store the test result is to perform the test first, assign the result to a boolean variable. You can then call UNIT_TEST_WITH_MSG with the boolean variable. I recommend calling UNIT_TEST_WITH_MSG instead of just UNIT_TEST so the intent of the test is clear within the output. */ passed = justOne.IsZero(); UNIT_TEST_WITH_MSG( u, passed, "Call to justOne.IsZero() failed!" ); UNIT_TEST( u, justOne.ThrowsBadly( false ) ); UNIT_TEST( u, justOne.ThrowsBadly( true ) ); UNIT_TEST_WITH_MSG( u, justOne.ThrowsBadly( false ), "This should not throw!" ); UNIT_TEST_WITH_MSG( u, justOne.ThrowsBadly( true ), "This can throw!" ); } // ---------------------------------------------------------------------------- #ifndef UNIT_TEST_GOOD_THROW #define UNIT_TEST_GOOD_THROW( u, test ) \ try { \ u->DoTest( __FILE__, __LINE__, u->Checked, (test) && false, #test ); \ } catch ( const std::exception & ex ) { \ u->DoTest( __FILE__, __LINE__, u->Checked, true, #test, ex.what() ); \ } catch (...) { \ u->OnException( __FILE__, __LINE__, u->Checked, #test, 0 ); \ } #endif #ifndef UNIT_TEST_THROW_STUFF #define UNIT_TEST_THROW_STUFF( u, test ) \ try { \ u->DoTest( __FILE__, __LINE__, u->Checked, (test) && false, #test ); \ } catch ( const Stuff & e1 ) { \ u->DoTest( __FILE__, __LINE__, u->Checked, true, #test, e1.what() ); \ } catch ( const std::exception & e2 ) { \ u->OnException( __FILE__, __LINE__, u->Checked, #test, e2.what() ); \ } catch ( ... ) { \ u->OnException( __FILE__, __LINE__, u->Checked, #test, 0 ); \ } #endif // ---------------------------------------------------------------------------- void ExceptionTest( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Exception Test"); Thingy empty; UNIT_TEST( u, empty.ThrowsBadly( false ) ); UNIT_TEST( u, empty.ThrowsBadly( true ) ); /** @par Question: What If Throwing Is Good? What if I want a particular test to throw an exception? In this case, throwing a particular exception is correct behavior, and not throwing one is wrong behavior. Also, throwing a different type of exception is wrong. @par Answer: How To Catch Passing Throws. These steps demostrate how to setup unit tests that pass when throwing expected exceptions. These steps show how to make a macro similar to UNIT_TEST_GOOD_THROW shown above. -# Copy the macro and give it a unique name. -# Put the expected exception type within the first catch block - perhaps a name that reflects the type of exception the test will throw. -# Make sure the first call to unit->DoTest always fails by using the "(test) && false" expression. That way if the test returns without throwing an exception it will automatically fail. -# Set the test parameter inside the call to DoTest as true to indicate that the test passes. -# Optionally add a message to the unit->DoTest function by calling the what() function in the caught exception. -# Optionally add further catch blocks for each type of exception the test may throw. If an additional exception indicates a passing test, call unit->DoTest as described above. If an additional exception indicates a failing test, call unit->DoException so it gets counted as an unexpected exception rather than a mere failing test. -# Then add the catch-all block last. */ // This test does not throw and that is now considered a failing test. UNIT_TEST_GOOD_THROW( u, empty.ThrowsBadly( false ) ); // When this test throws a std::exception, the result is a pass. UNIT_TEST_GOOD_THROW( u, empty.ThrowsBadly( true ) ); // These tests don't throw and that is now considered a failing test. UNIT_TEST_THROW_STUFF( u, empty.ThrowsBadly( false, false ) ); UNIT_TEST_THROW_STUFF( u, empty.ThrowsBadly( false, true ) ); // This test throws, but throws the wrong type of exception. UNIT_TEST_THROW_STUFF( u, empty.ThrowsBadly( true, false ) ); // This ones throws the correct type of exception, so it passes. UNIT_TEST_THROW_STUFF( u, empty.ThrowsBadly( true, true ) ); } // ---------------------------------------------------------------------------- void TestThingy2( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Test 2 Thingys"); Thingy empty; Thingy negative( -1 ); Thingy positive( 1 ); // Passing tests. UNIT_TEST( u, empty == empty ); UNIT_TEST( u, empty != negative ); UNIT_TEST( u, empty != positive ); UNIT_TEST( u, negative == negative ); UNIT_TEST( u, negative != positive ); UNIT_TEST( u, negative != empty ); UNIT_TEST( u, positive == positive ); UNIT_TEST( u, positive != negative ); UNIT_TEST( u, positive != empty ); // Failing tests. UNIT_TEST( u, empty != empty ); UNIT_TEST( u, empty == negative ); UNIT_TEST( u, empty == positive ); UNIT_TEST( u, negative != negative ); UNIT_TEST( u, negative == positive ); UNIT_TEST( u, positive != positive ); UNIT_TEST( u, positive == empty ); } // ---------------------------------------------------------------------------- void PassingThingyTest( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Passing Test"); Thingy empty; Thingy negative( -1 ); // Passing tests. UNIT_TEST( u, empty == empty ); UNIT_TEST( u, empty != negative ); UNIT_TEST( u, negative == negative ); UNIT_TEST( u, negative != empty ); } // ---------------------------------------------------------------------------- void PassWithWarningsThingyTest( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Just Warnings Test"); Thingy empty; Thingy negative( -1 ); Thingy positive( 1 ); // Passing tests. UNIT_TEST( u, empty == empty ); UNIT_TEST( u, empty != negative ); UNIT_TEST( u, empty != positive ); UNIT_TEST( u, negative == negative ); UNIT_TEST( u, negative != positive ); UNIT_TEST( u, negative != empty ); UNIT_TEST( u, positive == positive ); UNIT_TEST( u, positive != negative ); UNIT_TEST( u, positive != empty ); // Warning tests. UNIT_TEST_WARN( u, empty != empty ); UNIT_TEST_WARN( u, empty == negative ); UNIT_TEST_WARN( u, empty == positive ); } // ---------------------------------------------------------------------------- void EmptyThingyTest( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Empty Thingy Test"); (void)u; } // ---------------------------------------------------------------------------- void FatalThingyTest( void ) { ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Fatal Thingy Test"); Thingy empty; UNIT_TEST_REQUIRE( u, empty != empty ); // If this shows up in output, then program did not exit on previous line. UNIT_TEST_WITH_MSG( u, false, "Why is this program still running?" ); } // ---------------------------------------------------------------------------- /** @class UnitTestAsserter @brief An example observer class which implements the UnitTestResultReceiver interface. @par Example This class demonstrates how programs can receive event notices from the UnitTestSet. This particular example merely asserts when a test fails. Other observers could display a message box to the user, start a debugger, send an email, or display messages onto a window. @par Notes An observer must return true when called if it wants to continue receiving event notifications. If it ever returns false or throws an exception, then UnitTestSet will stop calling it. */ class UnitTestAsserter : public ::ut::UnitTestResultReceiver { virtual bool Start( const char * ) { // These lines just check if UnitTestSet singleton will not allow host // program to add or remove a receiver while it notifies receivers of // events. ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); bool okay = uts.AddReceiver( this ); assert( !okay ); okay = uts.RemoveReceiver( this ); assert( !okay ); return true; } virtual bool ShowLine( const char * ) { // These lines demonstrate that host programs may not exercise unit // tests when the UnitTestSet singleton is calling observers. ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); ut::UnitTest * u = uts.AddUnitTest ("Test 1 Thingy"); Thingy justOne( 1 ); UNIT_TEST( u, !justOne.IsZero() ); UNIT_TEST_JUST_MSG( u, "You may not output messages when it is calling receivers!" ); return true; } virtual bool ShowTestLine( const ut::UnitTest * test, ::ut::TestResult::EnumType result, const char * fileName, unsigned int line, const char * expression, const char * message ) { (void)test; (void)fileName; (void)line; (void)expression; (void)message; if ( ( result != ut::TestResult::Passed ) && ( result != ut::TestResult::Warning ) ) { assert( false ); } return true; } }; // MainArgs ------------------------------------------------------------------- /** @class MainArgs @brief Parses command line arguements, determines if they are valid, and then makes the information encoded within the arguements available. */ class MainArgs { public: /** Parses through and validates the command line parameters. @param[in] argc Count of parameters. @param[in] argv Array of parameters. */ MainArgs( unsigned int argc, const char * const argv[] ); inline ~MainArgs( void ) {} void ShowHelp( void ) const; inline bool IsValid( void ) const { return m_valid; } inline bool DoShowHelp( void ) const { return m_doShowHelp; } inline bool DoOnlyPassingTest( void ) const { return m_doOnlyPassingTests; } inline bool DoNoTests( void ) const { return m_doNoTests; } inline bool DoFatalTest( void ) const { return m_doFatalTest; } inline bool DoAssertOnFail( void ) const { return m_doAssertOnFail; } inline bool DoRepeatTests( void ) const { return m_doRepeatTests; } inline bool DeleteAtExitTime( void ) const { return m_deleteAtExitTime; } inline bool DoMakeTableAtExitTime( void ) const { return m_tableAtExitTime; } ut::UnitTestSet::OutputOptions GetOutputOptions( void ) const { return static_cast< ut::UnitTestSet::OutputOptions > ( m_outputOptions ); } inline const char * GetHtmlFileName( void ) const { return m_htmlFileName; } inline const char * GetTextFileName( void ) const { return m_textFileName; } inline const char * GetXmlFileName( void ) const { return m_xmlFileName; } inline const char * GetExeName( void ) const { return m_exeName; } private: MainArgs( void ); MainArgs( const MainArgs & ); MainArgs & operator = ( const MainArgs & ); bool ParseOutputOptions( const char * ss ); bool m_valid; ///< True if all command line parameters are valid. bool m_doShowHelp; bool m_doFatalTest; bool m_doNoTests; bool m_doOnlyPassingTests; bool m_doAssertOnFail; bool m_doRepeatTests; bool m_tableAtExitTime; bool m_deleteAtExitTime; unsigned int m_outputOptions; const char * m_exeName; const char * m_xmlFileName; const char * m_htmlFileName; const char * m_textFileName; }; // ---------------------------------------------------------------------------- void MainArgs::ShowHelp( void ) const { cout << "Usage: " << m_exeName << endl; cout << " [-f] [-p] [-z] [-a] [-o:[ndhmptw]]" << endl; cout << " [-s] [-t:file] [-h:file] [-x:file] [-?] [--help]" << endl; cout << endl; cout << "Parameters: (order of parameters does not matter)" << endl; cout << " -f Do fatal tests. Causes program to end abruptly." << endl; cout << " Incompatible with -p and -z." << endl; cout << " -p Do only passing tests." << endl; cout << " Incompatible with -f and -z." << endl; cout << " -z Do not do any tests - just make summary table." << endl; cout << " Incompatible with -f, -p, and -r." << endl; cout << " -a Assert when test fails." << endl; cout << " -L Let singleton live at exit time, do not delete it." << endl; cout << " -o Set output options." << endl; cout << " n No extra output options." << endl; cout << " This is incompatible with any other output option." << endl; cout << " f Use full weekday names, not abbreviations." << endl; cout << " h Show headers for each unit test that fails." << endl; cout << " i Show test index in each unit test output line." << endl; cout << " m Show messages even if no test with message." << endl; cout << " p Show contents of passing tests." << endl; cout << " t Show beginning and ending timestamps." << endl; cout << " T Show summary table once tests are done." << endl; cout << " w Show failing warnings." << endl; cout << " d Show divider lines in table and sections." << endl; cout << " D Show default output options." << endl; cout << " You may combine this with other options." << endl; cout << " Default output option is same as -o:hmtTw." << endl; cout << " E Send test results to standard error." << endl; cout << " S Send test results to standard output." << endl; cout << " -t Send test results to text file." << endl; cout << " \"file\" is a partial file name." << endl; cout << " -h Send test results to HTML file." << endl; cout << " \"file\" is a partial file name for main HTML page." << endl; cout << " -x Send test results to xml file." << endl; cout << " \"file\" is a partial file name." << endl; cout << " -e Show summary table at program exit time." << endl; cout << " -r Show summary table and then repeat tests." << endl; cout << " Incompatible with -z." << endl; cout << " -? Show this help information." << endl; cout << " Help is mutually exclusive with any other arguement." << endl; cout << " --help Show this help information." << endl; } // ---------------------------------------------------------------------------- MainArgs::MainArgs( unsigned int argc, const char * const argv[] ) : m_valid( false ), m_doShowHelp( false ), m_doFatalTest( false ), m_doNoTests( false ), m_doOnlyPassingTests( false ), m_doAssertOnFail( false ), m_doRepeatTests( false ), m_tableAtExitTime( false ), m_deleteAtExitTime( true ), m_outputOptions( ut::UnitTestSet::Nothing ), m_exeName( argv[0] ), m_xmlFileName( NULL ), m_htmlFileName( NULL ), m_textFileName( NULL ) { if ( 1 == argc ) { return; } bool okay = true; bool parsedOutput = false; for ( unsigned int ii = 1; ( okay ) && ( ii < argc ); ++ii ) { const char * ss = argv[ ii ]; if ( ( NULL == ss ) || ( '-' != ss[0] ) ) { okay = false; break; } const unsigned int length = static_cast< unsigned int >( ::strlen( ss ) ); const char cc = ss[1]; switch ( cc ) { case '-': okay = ( ::strcmp( ss, "--help" ) == 0 ); if ( okay ) okay = !m_doShowHelp; if ( okay ) m_doShowHelp = true; break; case '?': okay = ( length == 2 ); if ( okay ) okay = !m_doShowHelp; if ( okay ) m_doShowHelp = true; break; case 'a': okay = ( length == 2 ); if ( okay ) okay = !m_doAssertOnFail; if ( okay ) m_doAssertOnFail = true; break; case 'e': okay = ( length == 2 ); if ( okay ) okay = !m_tableAtExitTime; if ( okay ) m_tableAtExitTime = true; break; case 'f': okay = ( length == 2 ); if ( okay ) okay = !m_doFatalTest; if ( okay ) m_doFatalTest = true; break; case 'h': okay = ( 3 < length ) && ( ':' == ss[2] ); if ( okay ) okay = ( NULL == m_htmlFileName ); if ( okay ) m_htmlFileName = ss + 3; break; case 'L': okay = ( length == 2 ); if ( okay ) okay = m_deleteAtExitTime; if ( okay ) m_deleteAtExitTime = false; break; case 'o': okay = ( 3 < length ) && ( ':' == ss[2] ); if ( okay ) okay = !parsedOutput; if ( okay ) okay = ParseOutputOptions (ss+3); parsedOutput = true; break; case 'p': okay = ( length == 2 ); if ( okay ) okay = !m_doOnlyPassingTests; if ( okay ) m_doOnlyPassingTests = true; break; case 'r': okay = ( length == 2 ); if ( okay ) okay = !m_doRepeatTests; if ( okay ) m_doRepeatTests = true; break; case 't': okay = ( 3 < length ) && ( ':' == ss[2] ); if ( okay ) okay = ( NULL == m_textFileName ); if ( okay ) m_textFileName = ss + 3; break; case 'x': okay = ( 3 < length ) && ( ':' == ss[2] ); if ( okay ) okay = ( NULL == m_xmlFileName ); if ( okay ) m_xmlFileName = ss + 3; break; case 'z': okay = ( length == 2 ); if ( okay ) okay = !m_doNoTests; if ( okay ) m_doNoTests = true; break; default: okay = false; break; } } const bool standardError = ( 0 != ( m_outputOptions & ut::UnitTestSet::SendToCerr ) ); const bool standardOutput = ( 0 != ( m_outputOptions |= ut::UnitTestSet::SendToCout ) ); const bool noOutput = ( !m_doFatalTest ) && ( NULL == m_xmlFileName ) && ( !standardError ) && ( !standardOutput ) && ( NULL == m_textFileName ) && ( NULL == m_htmlFileName ); if ( m_doShowHelp && okay ) { okay = noOutput; } else { if ( m_doOnlyPassingTests && m_doFatalTest ) okay = false; if ( m_doNoTests && m_doFatalTest ) okay = false; if ( m_doNoTests && m_doOnlyPassingTests ) okay = false; if ( m_doNoTests && m_doRepeatTests ) okay = false; if ( noOutput ) okay = false; } m_valid = okay; } // ---------------------------------------------------------------------------- bool MainArgs::ParseOutputOptions( const char * ss ) { bool okay = true; bool useDefault = false; bool useFullNames = false; bool showNothing = false; bool showHeader = false; bool showMessages = false; bool showPasses = false; bool showTimeStamp = false; bool showWarnings = false; bool showDividers = false; bool showIndexes = false; bool showSummaryTable = false; bool standardError = false; bool standardOutput = false; while ( okay && ( *ss != '\0' ) ) { const char cc = *ss; switch ( cc ) { case 'D': if ( useDefault ) okay = false; else useDefault = true; break; case 'd': if ( showDividers ) okay = false; else showDividers = true; break; case 'E': if ( standardError ) okay = false; else standardError = true; break; case 'S': if ( standardOutput ) okay = false; else standardOutput = true; break; case 'f': if ( useFullNames ) okay = false; else useFullNames = true; break; case 'i': if ( showIndexes ) okay = false; else showIndexes = true; break; case 'n': if ( showNothing ) okay = false; else showNothing = true; break; case 'h': if ( showHeader ) okay = false; else showHeader = true; break; case 'm': if ( showMessages ) okay = false; else showMessages = true; break; case 'p': if ( showPasses ) okay = false; else showPasses = true; break; case 't': if ( showTimeStamp ) okay = false; else showTimeStamp = true; break; case 'T': if ( showSummaryTable ) okay = false; else showSummaryTable = true; break; case 'w': if ( showWarnings ) okay = false; else showWarnings = true; break; default: okay = false; break; } ++ss; } const bool noOptions = ( !showTimeStamp ) && ( !showDividers ) && ( !showPasses ) && ( !showMessages ) && ( !showHeader ) && ( !showWarnings ); if ( showNothing ) okay = noOptions; if ( noOptions && ( !showNothing ) ) useDefault = true; if ( useDefault ) m_outputOptions = ut::UnitTestSet::Default; if ( showDividers ) m_outputOptions |= ut::UnitTestSet::Dividers; if ( useFullNames ) m_outputOptions |= ut::UnitTestSet::FullDayName; if ( showHeader ) m_outputOptions |= ut::UnitTestSet::Headers; if ( showMessages ) m_outputOptions |= ut::UnitTestSet::Messages; if ( showPasses ) m_outputOptions |= ut::UnitTestSet::Passes; if ( showTimeStamp ) m_outputOptions |= ut::UnitTestSet::TimeStamp; if ( showWarnings ) m_outputOptions |= ut::UnitTestSet::Warnings; if ( showIndexes ) m_outputOptions |= ut::UnitTestSet::AddTestIndex; if ( showSummaryTable ) m_outputOptions |= ut::UnitTestSet::SummaryTable; if ( standardError ) m_outputOptions |= ut::UnitTestSet::SendToCerr; if ( standardOutput ) m_outputOptions |= ut::UnitTestSet::SendToCout; return okay; } // ---------------------------------------------------------------------------- int main( unsigned int argc, const char * const argv[] ) { const MainArgs args( argc, argv ); if ( !args.IsValid() ) { cout << "Your command line arguements are invalid!" << endl; args.ShowHelp(); return 1; } if ( args.DoShowHelp() ) { args.ShowHelp(); return 0; } const bool deleteAtExitTime = args.DeleteAtExitTime(); const ut::UnitTestSet::OutputOptions options = args.GetOutputOptions(); const ut::UnitTestSet::ErrorState status = ut::UnitTestSet::Create( "Thingy Tests", args.GetTextFileName(), args.GetHtmlFileName(), args.GetXmlFileName(), options, deleteAtExitTime ); if ( ( status != ut::UnitTestSet::Success ) && ( status != ut::UnitTestSet::AlreadyExists ) ) { cout << "An error occurred when creating the UnitTestSet singleton!" << endl; return 2; } ut::UnitTestSet & uts = ut::UnitTestSet::GetIt(); if ( !uts.DoesOutputOption( options ) ) { cout << "The UnitTestSet singleton does not apply the same output " << "options requested." << endl; return 3; } bool okay = true; if ( args.DoAssertOnFail() ) { // The assertions here check if the functions to add and remove // receivers work properly. okay = uts.AddReceiver( NULL ); assert( !okay ); okay = uts.RemoveReceiver( NULL ); assert( !okay ); UnitTestAsserter * asserter = new UnitTestAsserter; okay = uts.AddReceiver( asserter ); assert( okay ); okay = uts.AddReceiver( asserter ); assert( okay ); okay = uts.RemoveReceiver( asserter ); assert( okay ); okay = uts.AddReceiver( asserter ); assert( okay ); } if ( args.DoNoTests() ) { if ( !args.DoMakeTableAtExitTime() ) { uts.OutputSummary(); } return 0; } PassingThingyTest(); PassWithWarningsThingyTest(); if ( !args.DoOnlyPassingTest() ) { TestThingy1(); TestThingy2(); EmptyThingyTest(); ExceptionTest(); if ( args.DoFatalTest() ) FatalThingyTest(); } if ( args.DoRepeatTests() ) { uts.OutputSummary(); PassingThingyTest(); PassWithWarningsThingyTest(); if ( !args.DoOnlyPassingTest() ) { TestThingy1(); TestThingy2(); EmptyThingyTest(); ExceptionTest(); if ( args.DoFatalTest() ) FatalThingyTest(); } } if ( !args.DoMakeTableAtExitTime() ) { uts.OutputSummary(); } return 0; } // ---------------------------------------------------------------------------- // $Log: main.cpp,v $ // Revision 1.28 2007/07/19 19:59:45 rich_sposato // Added output option to show summary table. // // Revision 1.27 2007/07/17 23:55:44 rich_sposato // Added ability to do unit tests safelt at exit time. // // Revision 1.26 2007/07/17 22:58:13 rich_sposato // Moved sendToCerr & sendToCout into OutputOptions enum family. // // Revision 1.25 2007/07/17 21:11:20 rich_sposato // Added ability to send test results to xml output file. // // Revision 1.24 2007/06/07 21:51:54 rich_sposato // Added output option to show unit test index in each result line. // // Revision 1.23 2007/06/07 20:38:24 rich_sposato // Renamed parameter. // // Revision 1.22 2007/06/07 17:16:41 rich_sposato // Added default output option. // // Revision 1.21 2007/06/07 01:37:45 rich_sposato // Added output option to show dividing lines in text. // // Revision 1.20 2007/06/04 20:44:08 rich_sposato // Added ability to send output to standard error. // // Revision 1.19 2007/06/02 00:05:59 rich_sposato // Minor change to usage message. // // Revision 1.18 2007/05/17 18:14:56 rich_sposato // Added output option so program can choose full weekday name, or just an // abbreviated name. // // Revision 1.17 2007/05/17 17:27:16 rich_sposato // Changed observer functions to no longer pure virtual, and added default // function bodies so child classes do not have to implement all functions, // just the ones they need. // // Revision 1.16 2007/04/25 20:45:01 rich_sposato // Added more example tests. Added more documentation comments. // // Revision 1.15 2007/04/04 00:15:33 rich_sposato // Added UnitTest which only fails with exceptions. // // Revision 1.14 2007/04/03 18:53:23 rich_sposato // Added more command line options. Added checks for re-entrancy. Added a // demostration test. // // Revision 1.13 2007/04/02 22:55:52 rich_sposato // Added ability to send test result info to external observers in addition to // text and html files. // // Revision 1.12 2007/03/21 23:13:16 rich_sposato // Various minor changes. // // Revision 1.11 2007/03/15 00:45:29 rich_sposato // Added ability to specify output behavior via command line args. // // Revision 1.10 2007/03/10 01:40:05 rich_sposato // Added ability to say that some tests are required. // // Revision 1.9 2007/03/09 23:44:32 rich_sposato // Added invariant checking. Added ability to test warnings. // // Revision 1.8 2007/03/09 18:22:55 rich_sposato // Added output option for messages. // // Revision 1.7 2007/03/09 01:53:48 rich_sposato // Added begin and end timestamps to output. // // Revision 1.6 2007/03/08 22:04:44 rich_sposato // Added ability to send messages directly to test results output. // // Revision 1.5 2007/03/08 18:33:35 rich_sposato // Changed return type of Create function from bool to enum. // // Revision 1.4 2007/03/08 18:18:13 rich_sposato // Converted UnitTestSet to a singleton. // // Revision 1.3 2007/03/08 01:56:36 rich_sposato // Now passes in partial names of html and text files. // // Revision 1.2 2007/03/07 22:56:30 rich_sposato // Added copyright notices and keywords. //
2ee80c9fb9e3360e926947d6f49942c410fed8dc
e43e448b9ed8149aa6e04eea054bcaedcd4b7244
/answers/UVa/10099.cpp
baab9f624b9e2bd2f2cf5bb5583d30b05784072e
[]
no_license
GustavoMA/notebook-competitions
10512b2c7e0298c7a11cb6923f9c85c91db49f90
8b16c0c7234c0c960e7d8e8c5710a2fcef0eb5d9
refs/heads/master
2021-01-19T00:49:32.643950
2016-06-27T01:15:54
2016-06-27T01:15:54
33,758,340
2
0
null
null
null
null
UTF-8
C++
false
false
3,214
cpp
10099.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ii> vii; #define pb push_back #define mp make_pair #define fi first #define sc second #define INF 1000000010 #define LINF 1000000000000000010 #define MAX_N 121 #define MOD7 1000000007 #define MOD9 1000000009 #define EPS 1e-4 //freopen ("in.txt", "r", stdin); //freopen ("out.txt","w", stdout); /** *** UVa - 10099 - The Tourist Guide *** http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1040 *** Tag: Minmax, Maximum Spanning Tree *** Author: Gustavo Monteiro Alves - GustavoMA **/ int p[MAX_N], rank[MAX_N], size[MAX_N]; inline void build_union_find(int n) { for (int i = 1; i <= n; i++) { p[i] = i; rank[i] = 0; size[i] = 1; } } int find(int n) { return (p[n] == n) ? n : (p[n] = find(p[n])); } bool is_same_set(int i, int j) { return find(i) == find(j); } void union_set(int i, int j) { if (!is_same_set(i, j)) { int x = find(i), y = find(j); if (rank[x] > rank[y]) { p[y] = x; size[x] += size[y]; } else { p[x] = y; size[y] += size[x]; if(rank[x] == rank[y]) rank[y]++; } } } int union_size(int n) { return size[find(n)]; } vector<pair<int, ii> > edges; vii maximum_tree[MAX_N]; vi used; int Kruskal(int n) { build_union_find(n); sort(edges.begin(), edges.end()); reverse(edges.begin(), edges.end()); int tot = 0; for (int i = 0; i < (int) edges.size(); i++) { int v = edges[i].sc.fi; int u = edges[i].sc.sc; int w = edges[i].fi; if (!is_same_set(v, u)) { tot += w; maximum_tree[v].pb(mp(u, w)); maximum_tree[u].pb(mp(v, w)); union_set(v, u); } } return tot; } int go; int dfs(int u) { used[u] = 1; if (u == go) return -1; int mn = INF; for (int i = 0; i < (int) maximum_tree[u].size(); i++) { if (!used[maximum_tree[u][i].fi]) { int x = dfs(maximum_tree[u][i].fi); if (x == -1) return maximum_tree[u][i].sc; if (x != -2) return min(x, maximum_tree[u][i].sc); } } return -2; } int main() { int n, m; int caso = 0; while(1) { edges.clear(); used.clear(); scanf(" %d %d", &n, &m); for (int i = 1 ; i <= n; i++) maximum_tree[i].clear(); if (!n && !m) break; used.assign(n+1, 0); for (int i=0 ; i < m; i++) { int a, b, c; scanf(" %d %d %d", &a, &b, &c); edges.pb(mp(c-1, mp(a,b))); } Kruskal(n); // for (int i = 1; i <= n; i++) { // cout << i << "-> "; // for (int j = 0; j < (int) maximum_tree[i].size(); j++) { // cout << "(" << maximum_tree[i][j].fi << ", " << maximum_tree[i][j].sc << ") "; // } // cout << endl; // } int from, p; scanf(" %d %d %d", &from, &go, &p); double ans = ceil((double) p / (double) dfs(from)); cout << "Scenario #" << ++caso << endl; cout << "Minimum Number of Trips = " << ans << endl<< endl; } }
ef2d45c9e2ced0e32278818f7aa51d7a3f216d57
c8256d80e0fa77e291af97463f42fe52c4b2a8b6
/ranker/main.cpp
9afcde182efb30e60d3edc8524850bae2effe928
[]
no_license
tszssong/Vehicle_ReID
f135ea8bf59d9956ed60bf3f7ce51c7b91304c1c
262c298058b690ff1faada12995b31af71319e7e
refs/heads/master
2020-07-10T13:16:33.091567
2017-10-10T12:04:17
2017-10-10T12:04:17
204,270,813
0
0
null
2019-08-25T09:04:55
2019-08-25T09:04:54
null
UTF-8
C++
false
false
3,243
cpp
main.cpp
#include "database.h" #include "mytimer.h" #include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <thread> #include <memory> #define PRINTVAL(e) std::cout << #e << "=" << (e) << std::endl; int main(int nArgCnt, char *ppArgs[]) { typedef float _DTYPE; CDatabase::DATATYPE dt; float fFactor = 1.0f; if (typeid(short) == typeid(_DTYPE)) { dt = CDatabase::DT_SHORT; fFactor = 32767.0f; } else if(typeid(float) == typeid(_DTYPE)) { dt = CDatabase::DT_FLOAT; fFactor = 1.0f; } int nCap = 500000; int nLen = 128; int nAvgCnt = 100; int nTops = 2; int nGpus = 1; for (int i = 1; i < nArgCnt; ++i) { switch (ppArgs[i][0]) { case 'n': nCap = atoi(ppArgs[i] + 1); break; case 'l': nLen = atoi(ppArgs[i] + 1); break; case 'a': nAvgCnt = atoi(ppArgs[i] + 1); break; case 't': nTops = atoi(ppArgs[i] + 1); break; case 'g': nGpus = atoi(ppArgs[i] + 1); break; default: std::cout << "Bad argument: " << ppArgs[i] << std::endl; } } if (nCap <= 0 || nLen <= 0 || nArgCnt <= 0 || nCap < nTops) { std::cout << "Bad argument!" << std::endl; return -1; } std::cout << "\n\tExecuting command: "; std::cout << ppArgs[0] << " n" << nCap << " l" << nLen; std::cout << " a" << nAvgCnt << " t" << nTops; std::cout << " g" << nGpus << std::endl << std::endl; std::cout << "(n)umber of items: " << nCap << std::endl; std::cout << "(l)ength of vector: " << nLen << std::endl; std::cout << "(a)verage count: " << nAvgCnt << std::endl; std::cout << "(t)ops: " << nTops << std::endl; std::cout << "(g)pus: " << nGpus << std::endl; std::cout << "\nInitializing and loading data..." << std::endl; CDatabase db(dt); db.Initialize(nCap + 4, nLen, 10, nGpus); std::vector<_DTYPE> items(nCap * nLen); std::vector<float> tmp(nLen); for (int i = 0; i < nCap; ++i) { float fDist = 0.0f; for (int l = 0; l < nLen; ++l) { tmp[l] = (float)std::rand() / (float)RAND_MAX; fDist += tmp[l] * tmp[l]; } fDist = fFactor / std::sqrt(fDist); for (int l = 0; l < nLen; ++l) { items[i * nLen + l] = (_DTYPE)(tmp[l] * fDist); } } std::vector<CDatabase::_ITYPE> ids(nCap); std::iota(ids.begin(), ids.end(), 0); //Create a thread to add items std::thread addTest([&](){ db.AddItems(items.data(), ids.data(), nCap); }); addTest.join(); std::cout << nCap << " itmes loaded." << std::endl; std::cout << "\nTesting..." << std::endl; double dTime = 0.0; //Create a thread to perform query auto QueryTestFunc = [&](){ std::vector<CDatabase::DIST> dists(nTops); std::vector<_DTYPE> query(nLen); for (int k = 0;; ++k) { int nQueryId = std::rand() % nCap; std::copy( items.begin() + nQueryId * nLen, items.begin() + (nQueryId + 1) * nLen, query.begin() ); db.QueryTopN(query.data(), dists.size(), dists.data()); if (nQueryId != dists[0].id) { std::cout << "QUERY ERROR!" << std::endl; exit(-1); } } }; std::vector<std::thread> queryThreads; for (int i = 0; i < 10; ++i) { queryThreads.push_back(std::thread(QueryTestFunc)); } for (int i = 0; i < 10; ++i) { queryThreads[i].join(); } std::cout << "YOU SHOULDN'T SEE THIS!" << std::endl; return 0; }
8e959071476a6f4621ae629e91f173a1bad08d9f
aef58e10fc610fa12e5453c4dd11f5b332d42578
/Headers/Editor/StateElement.h
034bb17afa2f106d472f08ba848ccc335e27d4e0
[]
no_license
lineatterobin/API
06fcd6f1ed801816d08d34f1f59e14a3e4d080fc
cb678fd5a46e66213fc75d74a4472e2d526d5b26
refs/heads/master
2021-01-17T22:47:53.126985
2016-03-18T17:09:02
2016-03-18T17:09:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
906
h
StateElement.h
/*! * \file StateElement.h * * \defgroup Editor * * \brief * * \details * * \author Clément Bossut * \author Théo de la Hogue * * \copyright This code is licensed under the terms of the "CeCILL-C" * http://www.cecill.info */ #pragma once namespace OSSIA { class StateElement { public: # pragma mark - # pragma mark Enumerations /*! type of element */ enum class Type { MESSAGE, //! \todo ALIAS to refer to another message, //! \todo QUERY to ask the value of an address, STATE, USER }; # pragma mark - # pragma mark Life cycle /*! destructor */ virtual ~StateElement(); # pragma mark - # pragma mark Execution /*! what to do at execution time */ virtual void launch() const = 0; # pragma mark - # pragma mark Accessors /*! get the type of the state element \return #Type of the state element */ virtual Type getType() const = 0; }; }
a6bc221225788a17815e14642344f9dc6bcbc2b2
7bb9aece9ed718391862570cc9cdf020e290db9c
/C++/Exercises/prev_assignment/A_star_with_heap/puzzle.cpp
2930d2e263b8eb0a3399c302956725e7470191e6
[]
no_license
mirodrig/codebank
b44e66af62740e88bad9f30d28e8e8469ed7dbd2
f73d29e2bcf9abea6a62158ae2cd4f6b4302369e
refs/heads/master
2021-01-16T20:04:06.554036
2017-09-25T02:45:18
2017-09-25T02:45:18
100,194,391
0
0
null
null
null
null
UTF-8
C++
false
false
1,109
cpp
puzzle.cpp
#include <iostream> #include <cstdlib> #include <deque> #include "board.h" #include "puzzle_heur.h" #include "puzzle_solver.h" int main(int argc, char *argv[]){ if(argc < 5){ cerr << "Usage: ./puzzle size initMoves seed heur" << endl; return 1; } int size, initMoves, seed, heur; size = atoi(argv[1]); initMoves = atoi(argv[2]); seed = atoi(argv[3]); heur = atoi(argv[4]); Board b(size, initMoves, seed); // starting Board PuzzleHeuristic* ph; if(heur == 0){ ph = new PuzzleBFSHeuristic; } else if(heur == 1){ ph = new PuzzleOutOfPlaceHeuristic; } else{ ph = new PuzzleManhattanHeuristic; } // gameplay implementation while(!b.solved()){ cout << b; cout << "Enter tile number to move or -1 for a cheat: "; int tile; cin >> tile; PuzzleSolver game(b, ph); if(tile == 0){ break; } else if(tile > 0){ b.move(tile); } else{ game.run(); } } if(b.solved()){ cout << b << "You win!" << endl; } else{ cout << "Goodbye" << endl; } delete ph; return 0; }
4502aec19e2d62789d9e4dc4a4c8dd1d9ee34417
fe0e89aa47eddbf133b54fbbe876b1dcef1cee13
/Source/FirstGame/Bullet.cpp
e9083a6a8fb4f806a82049acc85c2c4811bb7059
[]
no_license
Yasen-Alchev/ARPG-Demo
019d854bf49153a699cbe00e6e20768d65683fac
102e62361e82767ea8999e7d8d9d87d170b5c978
refs/heads/master
2023-07-20T02:05:38.364467
2021-09-02T03:18:50
2021-09-02T03:18:50
402,111,229
0
0
null
null
null
null
UTF-8
C++
false
false
6,100
cpp
Bullet.cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "Bullet.h" #include "Kismet/GameplayStatics.h" #include "FirstGamePlayerController.h" #include "Components/SphereComponent.h" #include "GameFramework/ProjectileMovementComponent.h" #include "Engine/World.h" #include "Engine/Engine.h" #include "Materials/Material.h" #include "Blueprint/UserWidget.h" #include "Kismet/KismetMathLibrary.h" #include "UObject/ConstructorHelpers.h" // Sets default values ABullet::ABullet() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; // Use a sphere as a simple collision representation. CollisionComponent = CreateDefaultSubobject<USphereComponent>(TEXT("SphereComponent")); // Set the sphere's collision profile name to "Projectile". CollisionComponent->BodyInstance.SetCollisionProfileName(TEXT("Projectile")); // Set the sphere's collision radius. CollisionComponent->InitSphereRadius(15.0f); CollisionComponent->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap); CollisionComponent->SetCollisionResponseToChannel(ECC_Visibility, ECR_Ignore); CollisionComponent->SetCollisionResponseToChannel(ECC_Camera, ECR_Ignore); CollisionComponent->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Block); CollisionComponent->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Block); // Set the root component to be the collision component. RootComponent = CollisionComponent; // Use this component to drive this projectile's movement. ProjectileMovementComponent = CreateDefaultSubobject<UProjectileMovementComponent>(TEXT("ProjectileMovementComponent")); ProjectileMovementComponent->SetUpdatedComponent(CollisionComponent); ProjectileMovementComponent->InitialSpeed = 350.0f; ProjectileMovementComponent->MaxSpeed = 350.0f; ProjectileMovementComponent->bRotationFollowsVelocity = true; ProjectileMovementComponent->bShouldBounce = false; ProjectileMovementComponent->Bounciness = 0.0f; ProjectileMovementComponent->ProjectileGravityScale = 0.0f; ProjectileMovementComponent->Friction = 0.0f; ProjectileMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("ProjectileMeshComponent")); ProjectileMeshComponent->SetConstraintMode(EDOFMode::XYPlane); ProjectileMeshComponent->SetEnableGravity(false); ProjectileMeshComponent->SetSimulatePhysics(false); ProjectileMeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); ProjectileMeshComponent->SetCollisionProfileName(TEXT("PhysicsActor")); ProjectileMeshComponent->SetupAttachment(RootComponent); ProjectileMeshComponent->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block); ProjectileMeshComponent->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Ignore); static ConstructorHelpers::FObjectFinder<UStaticMesh>Mesh(TEXT("StaticMesh'/Game/TopDownCPP/Blueprints/Bullet_FBX.Bullet_FBX'")); if (Mesh.Succeeded()) { ProjectileMeshComponent->SetStaticMesh(Mesh.Object); } static ConstructorHelpers::FObjectFinder<UMaterial>Material(TEXT("Material'/Game/TopDownCPP/Blueprints/Bullet_Material.Bullet_Material'")); if (Material.Succeeded()) { ProjectileMaterialInstance = UMaterialInstanceDynamic::Create(Material.Object, ProjectileMeshComponent); } ProjectileMeshComponent->SetMaterial(0, ProjectileMaterialInstance); ProjectileMeshComponent->SetRelativeScale3D(FVector(0.3f, 0.3f, 0.3f)); ProjectileMeshComponent->SetupAttachment(RootComponent); this->Tags.Add(FName("Bullet")); fDamage = 0.f; } // Called when the game starts or when spawned void ABullet::BeginPlay() { Super::BeginPlay(); // Event called when component hits something. CollisionComponent->OnComponentHit.AddDynamic(this, &ABullet::OnHit); CollisionComponent->OnComponentBeginOverlap.AddDynamic(this, &ABullet::OnBeginOverlap); } // Called every frame void ABullet::Tick(float DeltaTime) { Super::Tick(DeltaTime); } // Function that initializes the projectile's velocity in the shoot direction. void ABullet::FireInDirection(const FVector& ShootDirection) { //ProjectileMovementComponent->Velocity = FVector(ShootDirection.X, ShootDirection.Y, 0) * ProjectileMovementComponent->InitialSpeed; ProjectileMovementComponent->Velocity = ShootDirection * ProjectileMovementComponent->InitialSpeed; } // Function that is called when the projectile hits something. void ABullet::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult& Hit) { /* if (OtherActor != this && OtherActor->ActorHasTag("Enemy")) { GEngine->AddOnScreenDebugMessage(-1, 1.5f, FColor::Green, FString::Printf(TEXT("The bullet hit the actor!\n"))); OtherActor->TakeDamage(fDamage, FDamageEvent(), this->GetInstigatorController(), this); } */ //if (OtherActor != this && !OtherActor->ActorHasTag("Enemy") || !OtherActor->ActorHasTag("Bullet")) //if(!OtherActor->ActorHasTag("Enemy") && this->ActorHasTag("FireBall")) Destroy(); } void ABullet::OnBeginOverlap(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) { if (OtherActor->ActorHasTag("Enemy")) { if (this->ActorHasTag("FireBall")) { if (!EnemiesHitted.Contains(OtherActor)) { EnemiesHitted.Add(OtherActor); OtherActor->TakeDamage(fDamage, FDamageEvent(), this->GetInstigatorController(), this); } } else { OtherActor->TakeDamage(fDamage, FDamageEvent(), this->GetInstigatorController(), this); Destroy(); } } else { UWorld* World = this->GetWorld(); if (IsValid(World)) { AFirstGamePlayerController* Controller = Cast<AFirstGamePlayerController>(UGameplayStatics::GetPlayerController(World, 0)); if (IsValid(Controller)) { AActor* Pawn = Controller->GetPawn(); if (IsValid(Pawn)) { if (OtherActor != Pawn && !OtherActor->ActorHasTag("Bullet")) { Destroy(); } } } } } }
c8c3f82c61ae03007b2e8f0eeef64d0f5bf1c086
dd8c06cb013bed919314f0c1f751e9960f2b9a32
/OpenCV3/6.Imgproc/Imgproc_BoxFilter.cpp
cb26d256f68a487c44f5076b9bc8d4b8ffd24b6c
[]
no_license
sorakunn/OpenCV
c247fd3a328af2103f5515933ae5dfe05e0aa82c
d675428f8746b79e6b4334faae6dd5a97bffe5db
refs/heads/master
2020-12-02T07:52:33.700225
2017-08-01T14:52:55
2017-08-01T14:52:55
96,740,055
0
0
null
null
null
null
UTF-8
C++
false
false
783
cpp
Imgproc_BoxFilter.cpp
#include <opencv2\highgui\highgui.hpp> /* 方框滤波 */ #include <opencv2\imgproc\imgproc.hpp> /* boxFilter方法 */ #define WINDOW_NAME "方框模糊" using namespace cv; int g_nBoxFilterValue = 3; //轨迹条参数值 Mat g_srcImage,g_dstImage; void onTrackbar(int, void*){ boxFilter(g_srcImage, g_dstImage, -1, Size(g_nBoxFilterValue+1,g_nBoxFilterValue+1)); //注意滤波器Size不能小于(1,1) imshow("方框模糊",g_dstImage); } int main(){ //读取图片 g_srcImage = imread("test.jpg"); //创建滚动条 namedWindow(WINDOW_NAME); createTrackbar("邻域大小", WINDOW_NAME, &g_nBoxFilterValue, 40, onTrackbar); onTrackbar(g_nBoxFilterValue,0); //显示图片 imshow("原图",g_srcImage); imshow("方框模糊",g_dstImage); waitKey(0); return 0; }
ba4bd01e63d3541c38fadeee4d4d386520111bee
ca979dffe7290c4479a8a40ed875483c1236ccd2
/src/Channel.h
548d28427fdaa557a6453c6b18ac31ca53f8582d
[ "MIT" ]
permissive
neurodroid/tdmsreader
a6e6cdd5f54b71f2e4821e1b1bbfcdc1c8cd0698
4262f4fba4f90fc903b83426e5fa3a2ebff26cb0
refs/heads/master
2020-05-29T11:48:25.593002
2012-07-17T14:32:29
2012-07-17T14:32:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
632
h
Channel.h
#ifndef CHANNEL_H #define CHANNEL_H #include <vector> #include <string> class DataType; class DataArray; class Channel { public: typedef std::vector<const DataArray*> RawDataSequence; Channel(const std::string& name); const std::string& getName() const; void print(std::ostream &os) const; void setDataType(const DataType *type); void addRawData(const DataArray *data); unsigned int getDataCount() const; const DataArray* getData() const; private: const std::string name; RawDataSequence rawData; const DataType* dataType; unsigned int ndata; mutable DataArray *data; }; #endif
f1e2cba883197f7afc8a7f675140a5d69a20e18f
91448636f2526eb9e2c91b744fc7c0828cb23048
/markov/edge.cpp
29418bd0cb4b6e6f03a573cf59d6a43aec4d6a3e
[]
no_license
hef/strup
8d6c5fa0db0ab5f1bea51848b78efb97c6ba07ba
f2cd29d87a561821279c62ee244e2692be6824fb
refs/heads/master
2021-01-20T05:07:41.598132
2014-08-07T04:20:07
2014-08-07T04:20:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
116
cpp
edge.cpp
#include "edge.h" edge::edge(node* next) : next(next) , count(1) { } node* edge::getNext() { return next; }
758d9214b089133ac9ece8ef5bcc05c09bb7ef10
87f4fc172211b76406aa8d654f99f6eb9a3a898a
/fusion/include/fusion/definitions.h
d8cbe6ca3d29d0d0e5bce86d36f5b4e4374a8385
[]
no_license
rakeshshrestha31/fastfusion_ros
fae77f231ea4bf7a803b41a2d174079d3bf25520
a482541fe720986284d67349304a701c129910fd
refs/heads/master
2021-04-29T19:42:22.862314
2018-02-20T00:06:50
2018-02-20T00:06:50
121,582,793
0
0
null
2018-02-15T02:03:45
2018-02-15T02:03:45
null
UTF-8
C++
false
false
8,641
h
definitions.h
/* * definitions.h * * Created on: Feb 27, 2013 * Author: steinbrf */ #ifndef DEFINITIONS_H_ #define DEFINITIONS_H_ #define UNENDLICH std::numeric_limits<float>::infinity() //#define CRAPPY_LAPPY #define READ_DISTANCE_PER_BRICK //############################### CUDA ############################## #define TEXTUREOFFSET 0.5f #define FU_BW 16 #define FU_BH 16 #define FU_BS 256 //########################## Data Types #################################### #ifndef uint typedef unsigned int uint; #endif #ifndef uchar typedef unsigned char uchar; #endif #ifndef weighttype typedef float weighttype; #endif #ifndef sidetype typedef unsigned short sidetype; #endif #ifndef volumetype typedef unsigned int volumetype; #define VOLUMETYPE_MAX 4294967295 #endif #ifndef uchar typedef unsigned char uchar; #endif #ifndef colortype typedef unsigned short colortype; #define COLOR_MULTIPLICATOR 256 #endif #ifndef sidetype3 typedef struct sidetype3_{ sidetype x; sidetype y; sidetype z;} sidetype3; #endif //#ifndef sidetype4 //typedef struct sidetype4_{ sidetype x; sidetype y; sidetype z; sidetype s;} sidetype4; //#endif #ifndef colortype3 typedef struct colortype3_{ colortype x; colortype y; colortype z;} colortype3; #endif #ifndef camPamsFloat typedef struct camPamsFloat_{ camPamsFloat_( float pr11, float pr12, float pr13, float pr21, float pr22, float pr23, float pr31, float pr32, float pr33, float pt1, float pt2, float pt3, float pfx, float pfy, float pcx, float pcy){ r11 = pr11; r12 = pr12; r13 = pr13; r21 = pr21; r22 = pr22; r23 = pr23; r31 = pr31; r32 = pr32; r33 = pr33; t1 = pt1; t2 = pt2; t3 = pt3; fx = pfx; fy = pfy; cx = pcx; cy = pcy; } float r11; float r12; float r13; float r21; float r22; float r23; float r31; float r32; float r33; float t1; float t2; float t3; float fx; float fy; float cx; float cy; } camPamsFloat; #endif #ifndef __VECTOR_TYPES_H__ typedef struct float3_ { float x; float y; float z;} float3; #endif #ifndef __VECTOR_FUNCTIONS_H__ inline float3 make_float3(float px, float py, float pz){ float3 result; result.x = px; result.y = py; result.z = pz; return result;} #endif #ifndef __VECTOR_TYPES_H__ typedef struct int3_ { int x; int y; int z;} int3; #endif //############################ CPU ###################### //#define PREPROCESS_IMAGES #define USE_OPENMP_IMAGEBUFFERING //#define USE_OPENMP_TRAVERSAL #define USE_OPENMP_DISTANCEUPDATE #define USE_OPENMP_MARCHINGCUBES #define USE_OPENMP_MARCHINGCUBESSLOW //#define OPENMP_DYNAMIC #define OPENMP_THREADS 8 #define USE_SSE #define USE_THREADS false #define THREAD_MESHING true //############################ Loop Closure ###################### #define MAX_LOOP_CLOSURE_LEAVES 100000 #define MAX_NUMBER_POSES_PER_LOOP 50 //########################## Mutex ############################# #define MUTEXVALUE 4294967295 #define BRANCHINIT 4294967294 #define DEADBRANCH 4294967293 #define MAXCELLINDEX 343597383520 //#define MUTEXVALUE 1 #define MAXDEPTH 20 //########################### Tree #################################### //#define SIDELENGTH 64 //#define MAXLEAFNUMBER 512 // 8^3 //#define MAXINDEX 262144 //MAXLEAFNUMBER*BRICKLENGTH^3 //#define SIDELENGTH 128 //#define MAXLEAFNUMBER 4096 // 8^4 //#define MAXINDEX 2097152 //MAXLEAFNUMBER*BRICKLENGTH^3 //#define SIDELENGTH 256 //#define MAXLEAFNUMBER 32768 // 8^5 //#define MAXINDEX 16777216 //MAXLEAFNUMBER*BRICKLENGTH^3 //#define SIDELENGTH 512 //#define MAXLEAFNUMBER 262144 // 8^6 //#define MAXINDEX 134217728 //MAXLEAFNUMBER*BRICKLENGTH^3 //#define SIDELENGTH 1024 //#define MAXLEAFNUMBER 2097152 // 8^7 //#define MAXINDEX 1073741824 //MAXLEAFNUMBER*BRICKLENGTH^3 //#define SIDELENGTH 2048 ////#define MAXLEAFNUMBER 16777216 // 8^8 //#define MAXLEAFNUMBER 400000 // 8^8 #define SIDELENGTH 1024 //GTX 580 #define MAXLEAFNUMBER 10000000 //#define MAXINDEX 5120000000 #define MAXINDEX VOLUMETYPE_MAX //#define CHECK_MEMORY //For Tesla //#define MAXLEAFNUMBER 890000 //#define MAXINDEX 455680000 //#define RETRAVERSE_OUTLIERS //########################### Distance and Weighting Functions ############### //#define DEBUG_NO_MESHES #define MESHCELLINDICES_SPLIT //#define MESHCELLINDICES_COMPACT #ifdef MESHCELLINDICES_SPLIT #define BRANCHNEIGHBORHOOD_REFERECE #endif #if defined MESHCELLINDICES_SPLIT && not defined MESHCELLINDICES_COMPACT #define SWITCH_MESHCELLS_SPLIT #endif #if not defined MESHCELLINDICES_SPLIT && defined MESHCELLINDICES_COMPACT #undef SWITCH_MESHCELLS_SPLIT #endif #if defined MESHCELLINDICES_SPLIT && defined MESHCELLINDICES_COMPACT //#define SWITCH_MESHCELLS_SPLIT #endif #define MAXCAMDISTANCE 3.0 // Maximal distances to take into account #define MIN_WEIGHT_FOR_SURFACE 8.0 // Minimal accumulated weight in order to perform meshing #define ADD_WEIGHTS_TRANSITION_140424 #define FRUSTUM_FAR 1.0 /////////////////////////////////////////////////////////////////////////////////////////////////// // karrerm: 15.1.2016 //#define USE_NOISE_FOR_SCALE // Using the depth noise for brick scale #define REFERENCE_NOISE 0.025f // Reference Value for the brick scale using the noise values #define MIN_NOISE_LEVEL 0.008f // Minimal expected noise (used to scale noise dependent weighting) /////////////////////////////////////////////////////////////////////////////////////////////////// #define REFERENCE_DEPTH 1.0f //#define SCALE_VARIANCE //#define SCALE_DEVIATION //#define SCALE_LINEAR // Have scale depending on distance #define SCALE_CONSTANT // Have the same scale independent of distance //#define DISTANCE_POINT_FAST #define DISTANCE_POINT_TRUE //#define DISTANCE_PLANE //#define DISTANCE_TEST //#define DISTANCE_NORMAL #define DISTANCE_TRUNCATED #define ROUND_PROJECTED_POSITIONS_GPU //#define DISTANCETHRESHOLD 0.5f // stable //#define DISTANCETHRESHOLD 0.05f // current //#define DISTANCETHRESHOLD 0.02f // current #define DISTANCETHRESHOLD 0.002f // test //#define DISTANCETHRESHOLD 0.002f // test //#define DISTANCETHRESHOLD 1.0f #define BANDWIDTHFACTOR 1.0 #define BRICKLENGTH 8 //#define BANDWIDTH 10 //#define DEFAULT_SCALE 0.05 //#define DEFAULT_SCALE 0.01 #define DEFAULT_SCALE 0.005 //#define WEIGHT_ONE //#define WEIGHT_CONSTANT //#define WEIGHT_CONSTANT_NARROW #define WEIGHT_LINEAR //#define WEIGHT_LINEAR_NARROW //#define WEIGHT_GAUSS //#define WEIGHT_GAUSS_NARROW //#define DISTANCEWEIGHTSIGMA 0.05f // this is default #define DISTANCEWEIGHTSIGMA 0.05f #define DISTANCEWEIGHTEPSILON 0.008f //#define DISTANCEMINEXPWEIGHT 0.000001f // this is default #define DISTANCEMINEXPWEIGHT 0.005f #define WEIGHT_FACTOR 3.0f #define QUEUEALLLEAVESINFRUSTRUM false //#define NO_MEMORYCHECK #define ARRAY_OF_STRUCTS #define NEIGHBORS_USED 0 #define USE_MULTISCALE true #define LEAVES_LESS 4000 #define CHILDBRANCHSIZEFUNCTION 16 //#define CHILDBRANCHSIZEFUNCTION (8 + ((half>>1)>=_brickLength)*8) //#define SEQUENCE //#define TEDDY1 //#define TEDDY3 //#define FRANKFACE //#define FRANK //#define DESK //#define SYNTHETIC //#define FLIGHT1 #define OFFICE //#define ROOM1 //#define GARCHING1 //#define DEFAULTSCENE #if defined (FRANK) || defined (FRANKFACE) #define DEPTHSCALE 10000.0f #else #if defined (FLIGHT1) #define DEPTHSCALE 2617.80 #else #if defined (GARCHING1) #define DEPTHSCALE 1000.0f #else #if defined (SEQUENCE) #define DEPTHSCALE 5000.0f #else #define DEPTHSCALE 5000.0f #endif #endif #endif #endif //#ifndef DEBUG_OUTPUT_DEFINED //#define DEBUG_OUTPUT_DEFINED //#ifdef PRINT_DEBUG //#define DEBUG(X) (X) //#else //#define DEBUG(X) //#endif //#endif #ifndef DEBUG_OUTPUT_DEFINED #define DEBUG_OUTPUT_DEFINED #ifdef PRINT_DEBUG //#define WHERESTR "[file %s, line %d]: " //#define WHEREARG __FILE__, __LINE__ //#define DEBUGPRINT2(...) fprintf(stderr, __VA_ARGS__) //#define DEBUGPRINT(_fmt, ...) DEBUGPRINT2(WHERESTR _fmt, WHEREARG, __VA_ARGS__) #define eprintf( ...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) #endif #endif #define DEBUG bla //#define IMAGEINFINITE 1000000.0f //#define FILTERMODE cudaFilterModePoint //#define FUSIONHEIGHTFINITE (fabs(distance) < IMAGEINFINITE) //#define TRAVERSALHEIGHTFINITE (pz < IMAGEINFINITE) #define IMAGEINFINITE std::numeric_limits<float>::quiet_NaN() #define FILTERMODE cudaFilterModePoint #define FUSIONHEIGHTFINITECPU (std::isfinite(distance)) #define FUSIONHEIGHTFINITEGPU (isfinite(distance)) #define TRAVERSALHEIGHTFINITECPU (std::isfinite(pz)) #define TRAVERSALHEIGHTFINITEGPU (isfinite(pz)) #ifdef OWNAVX #define ALIGNED __attribute__ ((aligned (32))) #else #define ALIGNED __attribute__ ((aligned (16))) #endif #endif /* DEFINITIONS_H_ */
6c851a4ce7414faf7e8fea142201617e14ec2017
1459e0cca33ec629d871b5890314ff1d0aa56570
/programozas/evfolyamzh_vonat.cpp
8c8c3c6392d8be94f14fa44240f4b10e3a6c5512
[]
no_license
zlaval/ELTE_Prog
bac4a82ae4d322e443b82585618323142dbf35c6
7d3684e8e6f0fa1e086c44296e253e10cf9829c0
refs/heads/master
2023-03-25T11:44:35.782454
2022-12-19T19:39:49
2022-12-19T19:39:49
224,856,198
5
3
null
2023-03-13T21:49:23
2019-11-29T13:07:25
C++
UTF-8
C++
false
false
4,359
cpp
evfolyamzh_vonat.cpp
//missing edge case, only one/two station #include <iostream> using namespace std; void readData(); void calculateTravelTime(); void countStationsGoThrough(); void findStationStayMoreThenPrevious(); void findStationPassagesWithoutStop(); void findLongestPassageStopInEveryStation(); int departures[1000]; int arrivals[1000]; int stationCount; int main() { cin >> stationCount; readData(); calculateTravelTime(); countStationsGoThrough(); findStationStayMoreThenPrevious(); findStationPassagesWithoutStop(); findLongestPassageStopInEveryStation(); } void readData() { for (int i = 0; i < stationCount; i++) { cin >> arrivals[i] >> departures[i]; } } void calculateTravelTime() { int departTime; int arriveTime; for (int i = 0; i < stationCount; i++) { if (departures[i] == 0 && arrivals[i] != 0) { arriveTime = arrivals[i]; } else if (departures[i] != 0 && arrivals[i] == 0) { departTime = departures[i]; } } int travelTime = arriveTime - departTime; cout << "#" << endl; cout << travelTime << endl; } void countStationsGoThrough() { int count = 0; for (int i = 0; i < stationCount; i++) { if (departures[i] != 0 && departures[i] == arrivals[i]) { count++; } } cout << "#" << endl; cout << count << endl; } void findStationStayMoreThenPrevious() { int previousStopTime = -1; int results[1000]; int resultCount = 0; bool isNeverStopped = true; for (int i = 0; i < stationCount; i++) { int departure = departures[i]; int arrival = arrivals[i]; if (arrival != 0 && departure != 0 && departure != arrival) { isNeverStopped = false; int stopTime = departure - arrival; if (stopTime > previousStopTime && previousStopTime != -1) { results[resultCount++] = i + 1; } previousStopTime = stopTime; } } cout << "#" << endl; for (int i = 0; i < resultCount; i++) { cout << results[i] << " "; } if (isNeverStopped) { cout << -2; } else if (resultCount == 0) { cout << -1; } cout << endl; } void findStationPassagesWithoutStop() { cout << "#" << endl; int startIndex = -1; int endIndex = -1; for (int i = 0; i < stationCount; i++) { int departure = departures[i]; int arrival = arrivals[i]; if (arrival != 0 && departure != 0 && departure == arrival) { if (startIndex == -1) { startIndex = i + 1; endIndex = startIndex; } else { endIndex = i + 1; } } if (endIndex != -1 && departure != arrival) { cout << startIndex << " " << endIndex << endl; startIndex = -1; endIndex = -1; } } } void findLongestPassageStopInEveryStation() { int bestStart = -1; int bestEnd = -1; int actualStart = -1; int actualEnd = -1; bool stopped = false; for (int i = 0; i < stationCount; i++) { int departure = departures[i]; int arrival = arrivals[i]; if (arrival != 0 && departure != 0 && arrival != departure) { stopped = true; if (actualStart == -1) { actualStart = i + 1; actualEnd = actualStart; } else { actualEnd = i + 1; } } if (arrival != 0 && departure != 0 && arrival == departure) { if (actualEnd != -1) { int bestLength = bestEnd - bestStart; int actualLenth = actualEnd - actualStart; if (actualLenth > bestLength) { bestStart = actualStart; bestEnd = actualEnd; } actualStart = -1; actualEnd = -1; } } } cout << "#" << endl; if (!stopped) { cout << -1; } else if (bestEnd != -1) { cout << bestStart << " " << bestEnd; } }
45f2fe5ca0e13acf8c346dd5efddd643dadc565d
a90376f0a3a90dbbe2702a5265c42f7bb77a56b7
/customer.cpp
32e48fdf61f9e07109d93d353ded5401094e1bd5
[]
no_license
kudell1995/probable-tribble
b80d4eaa1c5bb1e2f5e95eeeb6c7a9368f3222ea
c9e2074a8957200964d70ce320aa2551c3c1929e
refs/heads/master
2020-03-28T10:01:54.997857
2018-09-11T08:30:30
2018-09-11T08:30:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
841
cpp
customer.cpp
#include "customer.h" #include <iostream> using namespace std; Customer::Customer() { // cout << "You must enter a name\n"; // delete object to clear up memory; } Customer::Customer(string n) { name = n; address = "unknown"; account_number = "unknown"; } Customer::Customer(string n, string add, string acct) { name = n; address = add; account_number = acct; } //TODO: short format: //Customer name: Alice //Address: 2 North Street string Customer::display_short()const { return "ding"; } //TODO: long format: // display customer info in format: //Alice, 2 North Street, 234-567 string Customer::display_all()const { return "dong"; } bool Customer::operator<(Customer right)const { } string Customer::get_name()const { return name; } // display customer info in format: //Alice, 2 North Street, 234-567
68116e8095376353677fcad228bcc315ffcd9a4c
2d743169a19328de3a1e2209d338ee00a97e1eb8
/src/cropeditor/drawing/ellipseitem.hpp
46c8678b1e9c10bf59c7b8092d6d973dfc9aeac7
[ "MIT" ]
permissive
Gurkengewuerz/KShare
c3a5a76e9cecdbef3760c50b488ebb3c01eb1509
befc5e5446fde1c2c4c0e3cbed4c89254a5fc0d2
refs/heads/master
2021-07-25T19:47:52.548625
2020-06-05T13:51:58
2020-06-05T13:51:58
185,391,751
17
3
MIT
2020-06-05T13:52:00
2019-05-07T11:54:48
C++
UTF-8
C++
false
false
501
hpp
ellipseitem.hpp
#ifndef ELLIPSEITEM_HPP #define ELLIPSEITEM_HPP #include "drawitem.hpp" class EllipseItem : public DrawItem { public: EllipseItem() { } QString name() override { return "Blur"; } ~EllipseItem() { } void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override; void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override { } private: QGraphicsEllipseItem *ellie = nullptr; QPointF initPos; }; #endif // ELLIPSEITEM_HPP
a54e3ec52ffbbd578bae947748a7d6215fc48eee
55101d33da38e5ad450c95f4fc775e2ddbf21017
/Classes/GuestMng.h
1a646518894cb883db6b2859d9c390fff7d4306e
[]
no_license
DYGames/Sushimasen
fef7e992dadfed2627451d92204b533f1912bfaa
81a5a1a7588c4b5b8c1f28a0b171866b97b12061
refs/heads/master
2021-01-17T14:10:14.652028
2017-03-06T14:28:11
2017-03-06T14:28:11
84,080,361
0
0
null
null
null
null
UTF-8
C++
false
false
563
h
GuestMng.h
#pragma once #include "stdafx.h" class Guest; class GuestMng { private: static GuestMng* _guestmnginstance; Layer* _guestLayer; int _hallGuest[N_HALL]; int _waitGuest[N_WAIT]; float _ctime; float _randtime; public: GuestMng(Node* parent); static GuestMng* getInstance(Node* parent); void setRightPosition(); void moveForwardWait(); void addGuest(); void init(Node* parent); void update(float dt, bool addchild); void touchBegan(Touch* touch); void updateGameMng(); void setHallGuest(int iter, int value); void clearGuest(); };
6dcbd7e79f30edbe6349eba5b963b70873bed138
d1dc915fd1108b5bf73ed844fa0dcb414bd4825e
/AGame/TextureLoad.h
36debd629a197377487e00c2e40a50843a7fbead
[]
no_license
WladWD/AndroidGame
1c359066951ca1d0393b3afc7c84508ef741726d
a145840c1abe0b03ac39da55212b7167afc33cd9
refs/heads/master
2021-01-13T03:34:17.980269
2019-03-04T22:03:23
2019-03-04T22:03:23
77,531,014
0
0
null
null
null
null
UTF-8
C++
false
false
810
h
TextureLoad.h
#include "MapResource.h" #include "ResourceBase.h" #include "LoadImageBase.h" #pragma once namespace Resource { class TextureLoad : public Load::LoadImageBase { MapResource *mapResource; //Resource::ResourceBase *resourceLoad; /////////////////////////////////////////////////////////////////////////////// Resource::GLTextureResource LoadFromResourceImage(const char *ResourceName); /////////////////////////////////////////////////////////////////////////////// public: TextureLoad(MapResource *mapResource, Resource::ResourceBase *resourceLoad); ~TextureLoad(); /////////////////////////////////////////////////////////////////////////////// uint32_t LoadFromResource(const char *ResourceName); /////////////////////////////////////////////////////////////////////////////// }; }
9c91dbb549e39bfc8756a22e8da6fb5c5ea8fbba
3bd2849bf455c6da8cc6835eb67d045e85d24c0a
/core/kernel.cc
a204cf40f313742467ea437fd8b999c9f0aacfaf
[]
no_license
nongli/OpenCL
f01a49da355335bead69ec84ad06de8bbf6d98fc
f55c646be306c5222afc4df8c04905d0f71c893a
refs/heads/master
2021-01-10T21:10:22.485099
2015-01-06T22:07:48
2015-01-06T22:10:00
28,702,370
0
0
null
null
null
null
UTF-8
C++
false
false
1,066
cc
kernel.cc
#include "context.h" using namespace std; Kernel::~Kernel() { if (kernel_ != NULL) clReleaseKernel(kernel_); } string Kernel::ToString(bool detail) const { stringstream ss; ss << "Kernel '" << fn_name_ << "'" << endl; if (detail) { ss << " MaxWorkGroupSize: " << max_work_group_size_ << endl; } return ss.str(); } bool Kernel::SetArg(int index, Buffer* buffer) { cl_int err = clSetKernelArg(kernel_, index, sizeof(cl_mem), &buffer->cl_buffer()); if (err < 0) { fprintf(stderr, "Could not set kernel argument: %s\n", Error(err)); return false; } return true; } bool Kernel::SetArg(int index, cl_uint v) { cl_int err = clSetKernelArg(kernel_, index, sizeof(v), &v); if (err < 0) { fprintf(stderr, "Could not set kernel argument: %s\n", Error(err)); return false; } return true; } bool Kernel::SetLocalArg(int index, size_t v) { cl_int err = clSetKernelArg(kernel_, index, v, NULL); if (err < 0) { fprintf(stderr, "Could not set kernel argument: %s\n", Error(err)); return false; } return true; }