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
1baf719819688d5d4ade431d3cbd0f58c8a8bcbc
c465ecbb983c4e01f07c0a609e7b2df9590e22e2
/header/flag.h
2ca033aef00c7265e1ed8b8fd01e26163b09bb93
[]
no_license
manishbista/Image-Segmentation
dc615d71489a05a47f83c709436e72eb7d701d72
37bae3dcf81135bd6398143d848a02ff690824d8
refs/heads/master
2021-07-03T22:45:13.449179
2017-09-26T05:37:14
2017-09-26T05:37:14
104,840,627
1
0
null
null
null
null
UTF-8
C++
false
false
1,066
h
flag.h
/***************************************************************************** Create a database of plausible command line arguments Each record in database if a Flag structure initialized to default values Command line arguments can change default values Using a dictionary, indexing the database is made easier *****************************************************************************/ #ifndef FLAG_H #define FLAG_H #include <string> #include <iostream> #include <vector> //template <class Type> struct Flag { std::string label; std::string* target; std::string info; Flag() : label("") {} Flag(std::string _label, std::string* _target, std::string _info): label(_label), target(_target), info(_info) {} void Display(); }; class FlagUsage { private: std::vector<Flag>* flagList; char** argv; int argc; void initializeFlags(); public: FlagUsage(std::vector<Flag>* _flagList, char** _argv, int _argc): flagList(_flagList), argv(_argv), argc(_argc) { FlagUsage::initializeFlags(); } }; #endif
c44bc7a37cb7f7331d738b8305b6169e67368296
b68301a8861b984412e8b6002e19baa92a8dfb42
/stack.cpp
f0f5a66114ecbcd15cc39a4eba7a8e254b783100
[]
no_license
makz21/stack-cpp
4beeaa8da184540a281b2f0366618d0894a2dae2
2bb3548f2e57c69ba36f700655e783f868f2f317
refs/heads/master
2020-03-07T07:52:49.295488
2018-03-30T00:28:32
2018-03-30T00:28:32
127,361,294
0
0
null
null
null
null
UTF-8
C++
false
false
1,079
cpp
stack.cpp
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <iostream> #include "stack.h" using namespace std; Stack::Stack() { this->rozmiar=2; this->dane= new int[this->rozmiar]; this->top=0; } Stack::~Stack() { delete [] dane; cout<< "Stos zostal usuniety"<<endl; } void Stack::clear() { this->top=0; cout<<"Stos zostal wyczyszczony"<<endl; } void Stack::push(int n){ if (this->top<this->rozmiar){ this->dane[this->top++]=n; } else{ cout<<"Stos zostal poszerzony i element zostal dodany"<<endl; int *noweDane = new int[this->rozmiar=this->rozmiar*2]; memcpy(noweDane, this->dane, this->top*sizeof(int)); delete [] dane; dane=noweDane; this->dane[this->top++]=n; } } int Stack::pop() { if(this->top>0) { return this->dane[--this->top]; } else { cout<<"Stos jest pusty!"<<endl; return-1; } } bool Stack::isEmpty() { if(this->top == 0) { return 1; } else { return 0; } }
e00d7a4886b9d7fbc5583d1547d31d11288c0771
7d132eae1c4d1e572f42869bf1da5b094c53c25b
/Assignments/hw5/linkedlist.h
a9f0a786a8a49f9dfac4a5b35a897196703307bd
[]
no_license
afreet220/CSCI104_DataStructure
bf8c83c3b61814daa3fbc550b152a2093ed5af35
fb05514608489a858ff36b33cfeec7e531c22b5c
refs/heads/master
2021-01-10T14:54:38.028428
2015-10-15T10:47:03
2015-10-15T10:47:03
44,303,931
0
0
null
null
null
null
UTF-8
C++
false
false
3,456
h
linkedlist.h
#ifndef LINKEDLIST_H #define LINKEDLIST_H #include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <exception> #include <cstddef> #include <stdexcept> #include "ilist.h" using namespace std; template <class T> struct Item { T value; Item<T> *prev, *next; }; template <class T> class LinkedList : public IList<T> { public: LinkedList (); // constructor virtual ~LinkedList (); // destructor int size () const; // returns the number of elements in the list void insert (int position, const T & val); void remove (int position); void set (int position, const T & val); T& get (int position); T const & get(int position) const; private: Item<T> *head; Item<T> *tail; int count; /* You may add further private data fields or helper methods if you choose. You should not alter the public signature. */ }; template <class T> LinkedList<T>::LinkedList() { count = 0; head = NULL; tail = NULL; } template <class T> LinkedList<T>::~LinkedList() { } template <class T> int LinkedList<T>::size() const { return count; } template <class T> void LinkedList<T>::insert (int position, const T & val) { Item<T>* nItem = new Item<T>(); nItem->value = val; nItem->prev = NULL; nItem->next = NULL; if (position <0 || position > size()) { throw runtime_error("position is not vaild"); } if (count == 0) { head = tail = nItem; count++; } else if (position == 0) { nItem->next = head; head->prev = nItem; head = nItem; count++; } else if (position == size()) { tail->next = nItem; nItem->prev = tail; tail = nItem; count++; } else { Item<T>* tmp = head; for (int i=0;i<position;i++) { tmp = tmp->next; } nItem->next = tmp; nItem->prev = tmp->prev; tmp->prev->next = nItem; tmp->prev = nItem; tmp = NULL; delete tmp; count++; } } template <class T> void LinkedList<T>::remove(int position) { if (position <0 || position > (size()-1)) { throw runtime_error("position is not vaild"); } if (count == 1) { head = NULL; tail = NULL; count--; } else if (position == 0) { head = head->next; head->prev = NULL; count--; } else if (position == count-1) { tail = tail->prev; tail->next = NULL; count--; } else { Item<T>* tmp = head; for (int i=0;i<position;i++) { tmp = tmp->next; } tmp->prev->next = tmp->next; tmp->next->prev = tmp->prev; delete tmp; count--; } } template <class T> void LinkedList<T>::set(int position,const T & val) { if (position <0 || position > (size()-1)) { throw runtime_error("position is not vaild"); } Item<T>* tmp = head; for (int i=0;i<position;i++) { tmp = tmp->next; } tmp->value = val; tmp = NULL; delete tmp; } template <class T> T& LinkedList<T>::get(int position) { if (position <0 || position > (size()-1)) { throw runtime_error("position is not vaild"); } Item<T>* tmp = head; for (int i=0;i<position;i++) { tmp = tmp->next; } return tmp->value; } template <class T> T const & LinkedList<T>::get(int position) const { if (position <0 || position > (size()-1)) { throw runtime_error("position is not vaild"); } Item<T>* tmp = head; for (int i=0;i<position;i++) { tmp = tmp->next; } return tmp->value; } #endif /* LINKEDLIST_H_ */
b92262af6b6c6bf85309b620c2b8ac52d82f261e
69ba43fe5715fe347f0ac90b756e593be378bac7
/stop_controlled_intersection_tactical_plugin/include/stop_controlled_intersection_plugin.hpp
92cd3da4ae5f3a64f69569682279dc1295b23ea2
[ "Apache-2.0" ]
permissive
usdot-fhwa-stol/carma-platform
b66a676e2226269a0e1b6cc71f6d64ddf1f1001f
54c8f4dda7ea5f42353e7dcf2934d5347e65a5d5
refs/heads/develop
2023-08-16T18:02:33.570984
2023-08-03T16:09:47
2023-08-03T16:09:47
154,219,652
195
81
null
2023-09-14T15:05:37
2018-10-22T21:27:52
C++
UTF-8
C++
false
false
8,933
hpp
stop_controlled_intersection_plugin.hpp
#pragma once /* * Copyright (C) 2022 LEIDOS. * * 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 <vector> #include <carma_planning_msgs/msg/trajectory_plan.hpp> #include <carma_planning_msgs/msg/trajectory_plan_point.hpp> #include <carma_planning_msgs/msg/plugin.hpp> #include <carma_guidance_plugins/tactical_plugin.hpp> #include <boost/shared_ptr.hpp> #include <boost/geometry.hpp> #include <carma_ros2_utils/carma_lifecycle_node.hpp> #include <carma_wm/Geometry.hpp> #include <carma_planning_msgs/srv/plan_trajectory.hpp> #include <carma_wm/WMListener.hpp> #include <functional> #include "stop_controlled_intersection_config.hpp" #include <unordered_set> #include <autoware_msgs/msg/lane.hpp> #include <rclcpp/rclcpp.hpp> #include <carma_planning_msgs/msg/maneuver.hpp> #include <basic_autonomy/basic_autonomy.hpp> #include <basic_autonomy/helper_functions.hpp> #include <basic_autonomy/log/log.hpp> #include <gtest/gtest_prod.h> /** * \brief Macro definition to enable easier access to fields shared across the maneuver types * \param mvr The maneuver object to invoke the accessors on * \param property The name of the field to access on the specific maneuver types. Must be shared by all extant maneuver types * \return Expands to an expression (in the form of chained ternary operators) that evalutes to the desired field */ #define GET_MANEUVER_PROPERTY(mvr, property)\ (((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN ? (mvr).intersection_transit_left_turn_maneuver.property :\ ((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN ? (mvr).intersection_transit_right_turn_maneuver.property :\ ((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT ? (mvr).intersection_transit_straight_maneuver.property :\ ((mvr).type == carma_planning_msgs::msg::Maneuver::LANE_FOLLOWING ? (mvr).lane_following_maneuver.property :\ throw std::invalid_argument("GET_MANEUVER_PROPERTY (property) called on maneuver with invalid type id " + std::to_string((mvr).type))))))) namespace stop_controlled_intersection_tactical_plugin { using PointSpeedPair = basic_autonomy::waypoint_generation::PointSpeedPair; /** * \brief Class containing primary business logic for the Stop Controlled Intersection Tactical Plugin * */ class StopControlledIntersectionTacticalPlugin : public carma_guidance_plugins::TacticalPlugin { public: // brief Constructor explicit StopControlledIntersectionTacticalPlugin(const rclcpp::NodeOptions &options); /** * \brief Converts a set of requested stop controlled intersection maneuvers to point speed limit pairs. * * \param maneuvers The list of maneuvers to convert * * \param wm Pointer to intialized world model for semantic map access * * \param state The current state of the vehicle * * \return List of centerline points paired with target speeds */ std::vector<PointSpeedPair> maneuvers_to_points(const std::vector<carma_planning_msgs::msg::Maneuver>& maneuvers, const carma_wm::WorldModelConstPtr& wm, const carma_planning_msgs::msg::VehicleState& state); /** * \brief Creates a speed profile according to case one of the stop controlled intersection, where the vehicle accelerates and then decelerates to a stop. * \param wm Pointer to intialized world model for semantic map access * * \param maneuvers The maneuver to being planned for. Maneuver meta-dara parameters are used to create the trajectory profile. * * \param route_geometry_points The geometry points along the route which are associated with a speed in this method. * * \param starting_speed The current speed of the vehicle at the time of the trajectory planning request * * \return List of centerline points paired with target speeds */ std::vector<PointSpeedPair> create_case_one_speed_profile(const carma_wm::WorldModelConstPtr& wm, const carma_planning_msgs::msg::Maneuver& maneuver, std::vector<lanelet::BasicPoint2d>& route_geometry_points, double starting_speed, const carma_planning_msgs::msg::VehicleState& states); /** * \brief Creates a speed profile according to case two of the stop controlled intersection, * where the vehicle first accelerates then cruises and finally decelerates to a stop. * \param wm Pointer to intialized world model for semantic map access * * \param maneuvers The maneuver to being planned for. Maneuver meta-dara parameters are used to create the trajectory profile. * * \param route_geometry_points The geometry points along the route which are associated with a speed in this method. * * \param starting_speed The current speed of the vehicle at the time of the trajectory planning request * * \return List of centerline points paired with speed limits */ std::vector<PointSpeedPair> create_case_two_speed_profile(const carma_wm::WorldModelConstPtr& wm, const carma_planning_msgs::msg::Maneuver& maneuver, std::vector<lanelet::BasicPoint2d>& route_geometry_points, double starting_speed); /** * \brief Creates a speed profile according to case three of the stop controlled intersection, * where the vehicle continuously decelerates to a stop. * \param wm Pointer to intialized world model for semantic map access * * \param maneuvers The maneuver to being planned for. Maneuver meta-dara parameters are used to create the trajectory profile. * * \param route_geometry_points The geometry points along the route which are associated with a speed in this method. * * \param starting_speed The current speed of the vehicle at the time of the trajectory planning request * * \return List of centerline points paired with speed limits */ std::vector<PointSpeedPair> create_case_three_speed_profile(const carma_wm::WorldModelConstPtr& wm, const carma_planning_msgs::msg::Maneuver& maneuver, std::vector<lanelet::BasicPoint2d>& route_geometry_points, double starting_speed); /** * \brief Method converts a list of lanelet centerline points and current vehicle state into a usable list of trajectory points for trajectory planning * * \param points The set of points that define the current lane the vehicle is in and are defined based on the request planning maneuvers. * These points must be in the same lane as the vehicle and must extend in front of it though it is fine if they also extend behind it. * \param state The current state of the vehicle * \param state_time The abosolute time which the provided vehicle state corresponds to * * \return A list of trajectory points to send to the carma planning stack */ std::vector<carma_planning_msgs::msg::TrajectoryPlanPoint> compose_trajectory_from_centerline( const std::vector<PointSpeedPair>& points, const carma_planning_msgs::msg::VehicleState& state, const rclcpp::Time& state_time); // overrides carma_ros2_utils::CallbackReturn on_configure_plugin() override; bool get_availability(); std::string get_version_id(); rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector<rclcpp::Parameter> &parameters); void plan_trajectory_callback( std::shared_ptr<rmw_request_id_t>, carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req, carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp) override; private: carma_wm::WorldModelConstPtr wm_; StopControlledIntersectionTacticalPluginConfig config_; std::string stop_controlled_intersection_strategy_ = "Carma/stop_controlled_intersection"; double epsilon_ = 0.001; //Small constant to compare (double) 0.0 with // Unit Test Accessors FRIEND_TEST(StopControlledIntersectionTacticalPlugin, TestSCIPlanning_case_one); FRIEND_TEST(StopControlledIntersectionTacticalPlugin, TestSCIPlanning_case_two); FRIEND_TEST(StopControlledIntersectionTacticalPlugin, TestSCIPlanning_case_three); }; } // namespace stop_controlled_intersection_tactical_plugin
d8e5a0ad64d5d9834d1b68e6183d5eb69f642c99
c64f6aba1b1d1c8ed1df28c57c99d081a3406ee7
/02ftp/c/client.cpp
0c0a6e67a5cc190d3337163a7a0f7862a18d0931
[]
no_license
Jiwenguan/Unix-Network-Programmming
893bcc51c42aa752fb5671cdeae6afcb73e4949a
06497210bdd7e4fbccf6039cf9b8176b4c11d118
refs/heads/master
2020-03-22T04:31:36.407067
2018-07-15T14:33:06
2018-07-15T14:33:06
139,504,292
0
0
null
null
null
null
UTF-8
C++
false
false
2,290
cpp
client.cpp
//******************************************************* //* @ author :Jiwenguan //* @ date :2018-07-03 //* @ brief :multi-process fundemantal-TCP-Programming //* //******************************************************* #include<iostream> #include<stdio.h> #include<stdlib.h> #include<sys/types.h> /* See NOTES */ #include<sys/socket.h> #include<sys/stat.h> #include<fcntl.h> #include<unistd.h> #include<string.h> #include<netinet/in.h> #include<arpa/inet.h> #include<fstream> #include<string.h> #include<string> using namespace std; typedef sockaddr_in SA4; typedef sockaddr SA; int main(int argc,char *argv[]){ int fd=socket(AF_INET,SOCK_STREAM,0); if(fd==-1){ perror("socket"); return -1; } //prepare network address SA4 addrC; addrC.sin_family=AF_INET; addrC.sin_port=8000; inet_pton(AF_INET,"127.0.0.1",&(addrC.sin_addr.s_addr)); //connect int c = connect(fd,(SA*)&addrC,sizeof(addrC)); if(c==-1){ perror("connect"); } char buff[1024]={0};//cin>>; char f[1024]={0}; while(1){ cout<<"请输入要下载到本地的文件路径,以回车结束,输exit 退出"<<endl; memset(buff,0,1024); memset(f,0,1024); cin>>buff; if(!strncmp(buff,"exit",4)){ cout<<"退出传输。。。"<<endl; break; } write(fd,buff,strlen(buff)); int m=read(fd,f,20); cout<<f<<endl; f[m]='\0'; if(strncmp(f,"file",4)){//如果没有这个文件 cout<<"远程没有该文件"<<endl; continue; } //将文件路径中名字提取出来, string tmp(buff); size_t pos = tmp.rfind('/'); string store; if(pos!=-1){ store = tmp.substr(pos+1); }else{ store=tmp; } cout<<"您的文件将存储在 "<<store<<" 中"<<endl; size_t ffd=open(store.c_str(),O_RDWR|O_CREAT|O_TRUNC,S_IRWXU); if(ffd==-1){ perror("open"); } while(1){ memset(f,0,1024); int r=read(fd,f,sizeof(f)-sizeof(f[0])); if(r <1023){ write(ffd,f,r); cout<<"读取结束。。。"<<endl; break; } write(ffd,f,r); } /*ofstream ofs(store.c_str(),ios::out); while(1){ int r =read(fd,f,sizeof(f)-sizeof(f[0])); f[r]='\0'; cout<<f<<"1"<<endl; if(r<=0)break; ofs.write(f,r); }*/ cout<<"文件传输完成"<<endl; close(ffd); //ofs.close(); } close(fd); return 0; }
2b0a70fbfb9d74d9c9b4edee9d3f7acb09655346
052cbc55389bee781ea74ea6c188d5a57c8dee48
/programming.in.th/1074.cpp
bb8fcccb66c03e8ddd86c5f65ad99694fa91b96d
[]
no_license
stank2010/code-competitive-programming
0be5d9aaca44cdd43f34945f231b87bf7241f181
33fb6740ea871437525e8e18ee137b02523b2a10
refs/heads/master
2020-05-30T20:54:53.759195
2019-06-03T13:31:36
2019-06-03T13:31:36
189,960,865
0
0
null
null
null
null
UTF-8
C++
false
false
1,605
cpp
1074.cpp
#include "stdio.h" int z[201][201],mark[201][201],r,c; char ei[201][201]; int count(int i,int j,int C) { return z[i+C][j+C]+z[i][j]-z[i+C][j]-z[i][j+C]; } int main() { scanf("%d %d ",&r,&c); for(int i=1;i<=r;i++) { scanf("%s",ei[i]); for(int j=c;j>0;j--) ei[i][j]=ei[i][j-1]; ei[i][0]=0; } for(int i=1;i<=r;i++) for(int j=1;j<=c;j++) { z[i][j]=z[i-1][j]+z[i][j-1]-z[i-1][j-1]; if(ei[i][j]=='x')z[i][j]++; } for(int i=1;i<=r;i++) for(int j=1;j<=c;j++) if(ei[i][j]=='x'&&ei[i][j-1]!='x'&&ei[i-1][j]!='x'&&ei[i-1][j-1]!='x') { int C=1; while(count(i-1,j-1,C)==C*C)C++; mark[i][j]=C-1; } else if(ei[i][j]=='x'&&ei[i][j+1]!='x'&&ei[i+1][j]!='x'&&ei[i+1][j+1]!='x') { int C=1; while(i-C>0&&j-C>0&&count(i-C,j-C,C)==C*C)C++; if(C-1 > mark[i-(C-2)][j-(C-2)])mark[i-(C-2)][j-(C-2)]=C-1; //printf("val= %d %d %d %d(%d %d)\n",mark[i-(C-1)][j-(C-1)],i-(C-1),j-(C-1),C,i,j); } /* else if(ei[i][j]=='x'&&ei[i][j-1]!='x'&&ei[i+1][j]!='x'&&ei[i+1][j-1]!='x') { int C=1; while(count(i-C,j-1,C)==C*C)C++; //printf("%d %d %d\n",i-(C-1),j,C); if(C-1>mark[i-(C-2)][j])mark[i-(C-2)][j]=C-1; } else if(ei[i][j]=='x'&&ei[i][j+1]!='x'&&ei[i-1][j]!='x'&&ei[i-1][j+1]!='x') { int C=1; while(count(i-1,j-C,C)==C*C)C++; if(C-1>mark[i][j-(C-2)])mark[i][j-(C-2)]=C-1; }*/ for(int i=1;i<=r;i++) for(int j=1;j<=c;j++) if(mark[i][j]>0) { printf("%d %d %d\n",i,j,mark[i][j]); } //puts("");for(int i=1;i<=r;i++,puts(""))for(int j=1;j<=c;j++)printf("%d ",mark[i][j]); return 0; }
c0339229afdf5d91f7b7269baa75c4c006c2d856
c61547f4ad16d3fd70750bd9916d4442a77d60f5
/src/garbage/PaperGarbage.cpp
7090a09fbe0085408ed9dae5a1daf3475ce5b35c
[]
no_license
CodecoolBP20171/cpp-waste-recycling-marcellBan
8ecfadf201a9276eee33cb52fffcb8779822013a
920c9580c0bb218a14d9b68815ba2ef1dd14b564
refs/heads/master
2021-05-16T00:22:45.104945
2017-10-22T11:38:39
2017-10-22T11:38:39
106,993,971
0
0
null
null
null
null
UTF-8
C++
false
false
262
cpp
PaperGarbage.cpp
#include "../../include/garbage/PaperGarbage.h" PaperGarbage::PaperGarbage(const std::string& name) : Garbage(name), isSqueezed(false) {} void PaperGarbage::squeeze() { isSqueezed = true; } bool PaperGarbage::IsSqueezed() const { return isSqueezed; }
7bcc838e92cc143470d323f36658ff3b2ab07941
2a34f1d14e6bd68cee1bb320fd0bb34ca9558886
/Problems/CodeForces/1300_KillEmAll.cpp
de97fbf755121a5631e4904f9f0505ad9a8107ef
[]
no_license
DevinLeamy/Competitive-Programming
840fc905ba872c476e4180274555770cf013d400
9c0fac489e238d98ba983606da4a0a6d7f519d13
refs/heads/master
2022-05-05T05:17:48.256661
2022-03-21T03:43:00
2022-03-21T03:43:00
199,560,255
2
0
null
null
null
null
UTF-8
C++
false
false
886
cpp
1300_KillEmAll.cpp
#include <iostream> using namespace std; int main() { int q, n, r, x; cin >> q; for (int i = 0; i < q; i++) { cin >> n >> r; int pos[n]; int distance = 0; int last = 0; for (int j = 0; j < n; j++) { cin >> x; pos[j] = x; } sort(pos, pos + n); int count = 0; int current = n-1; while (current != -1) { int back = pos[current]; if (back == last) { current--; continue; } else { if (back <= distance) { current--; } else { count++; current--; distance += r; last = back; } } } cout << count << endl; } return 0; }
5503ebc5e6521d0b9650f51919f816587b071332
7ed4ea9e4fd7f0d1683416a6023c39cca5536d42
/CSCE 1030/hw5.cpp
bcf03651d4bd3ea642bcc6d899db31ff41990244
[]
no_license
Daniel-McGartland/Portfolio
78be418e0bd9f3c1b9061a87db81dbc8a24a3d9d
c965271798e503c5e51b1eaa4acf32212d2b8ac6
refs/heads/master
2021-01-26T14:20:04.068329
2020-02-27T06:58:34
2020-02-27T06:58:34
243,448,198
1
0
null
null
null
null
UTF-8
C++
false
false
2,470
cpp
hw5.cpp
/* Author: Daniel McGartland(danielmcgartland@my.unt.edu) Date: 4/18/2016 Instructor: Dr. THompson Description: The first part of the 1030 crush game used to print out the board */ #include<iostream> #include<cstdlib> #include<ctime> void Introduction(); using namespace std; int main() { //print out for the header cout << "+---------------------------------------------------------+\n"; cout << "| Computer Science and Engineering |\n"; cout << "| CSCE 1030 - Computer Science I |\n"; cout << "| Daniel McGartland djm0265 DanielMcGartland@my.unt.edu |\n"; cout << "+---------------------------------------------------------+\n\n\n"; //function call for the intro message Introduction(); /*enum board1{}; const int SIZE = 9; board1 board[SIZE][SIZE]; */ //create the array the above was my attemp at enum char board[9][9]; char L_axis = 65;//for the letter on the left axis of the board //fill the array srand(time(NULL)); for(int i=0; i<9; i++) { for(int j=0; j < 9; j++) { board[i][j] = (rand()%6)+33; } } //board top elements cout << " 1 2 3 4 5 6 7 8 9\n"; cout << " ------------------\n"; //printing the array for(int i=0; i<9; i++) { cout << L_axis << "|"; L_axis++; for(int j=0; j<9; j++) { cout << board[i][j] << " "; } //right side boarder cout <<"|" << endl; } //board bottom elements cout <<" ------------------\n"; cout <<" Moves: 0 Score: 0";//this is a place holder for the second half of the assignment return 0; } /* function: introduction parameters: none return: none description: we need to have the intro message in a function */ void Introduction() { //print out for the introductory message cout << "-----------------------------------------------------------\n"; cout << " WELCOME TO 1030 CRUSH \n"; cout << " \n"; cout << " This program will randomly initialize your game board \n"; cout << " usinga set of 6 characters (!,\",#,$,%,&) that a player \n"; cout << " will then attempt to match a combination of 3 or more \n"; cout << " characters to gain points in a finite set of moves or time\n"; cout << "-----------------------------------------------------------\n\n"; cout << "1030 Crush Initializing.....\n"; return; }
fc3565b473f5494c9fcd79838e456375339bab1c
fe9d7a4b522f2e9fe72a1fa42ade02032a40fb6a
/LectureCreux.cpp
3747b356afac0d2d4eb925c7ebaf30a7462e123b
[]
no_license
alexBDG/ProjetSLPI
21a56d6d771db5b3028c987f6f4337efa20d713a
fe44382d16c2a24492281732827d1647a1a00de6
refs/heads/master
2020-05-27T07:37:38.035168
2019-05-25T07:19:58
2019-05-25T07:19:58
188,531,175
0
0
null
2019-05-25T07:02:37
2019-05-25T06:48:51
C++
UTF-8
C++
false
false
785
cpp
LectureCreux.cpp
#include <fstream> #include <string> #include "LectureCreux.h" using namespace Eigen; using namespace std; void Read(SparseMatrix<double> & matrix, string & source) { //Create the file: std::string file; file = "Matrices/" + source; // Open the file: std::ifstream fin(file); // Declare variables: int M, N, L; // Ignore headers and comments: while (fin.peek() == '%') fin.ignore(2048, '\n'); // Read defining parameters: fin >> M >> N >> L; // Create your matrix: matrix.resize(M,N); matrix.setZero(); // Creates the array of M*N size // Read the data for (int l = 0; l < L; l++) { int m, n; double data; fin >> m >> n >> data; matrix.coeffRef(m-1,n-1) = data; //matrix.coeffRef(n-1,m-1) = data; } fin.close(); }
dda235b8d8c2c6e4f84588e6105b384543a1ac93
cbc10a5991b64d525108d7548bb18b91535b4faa
/Source/Json/mdkJsonValue.hpp
963ee3bb19e4d712dd8f4ca0b28aedca52ac9ecf
[]
no_license
liangbright/MDK
f6da2166add4a5ad25cb632de79d13f6d982bf97
d3616f605f378f8e62d341b3dc1e232529faad89
refs/heads/master
2021-09-29T05:57:31.185048
2021-09-16T18:03:02
2021-09-16T18:03:02
121,717,423
2
1
null
null
null
null
UTF-8
C++
false
false
5,614
hpp
mdkJsonValue.hpp
#pragma once namespace mdk { template<int_max TempLength> JsonValue::JsonValue(DenseVector<int, TempLength> InputArray) { m_Type = TypeEnum::Type_Null; (*this) = std::move(InputArray); } template<int_max TempLength> JsonValue::JsonValue(DenseVector<long long, TempLength> InputArray) { m_Type = TypeEnum::Type_Null; (*this) = std::move(InputArray); } template<int_max TempLength> JsonValue::JsonValue(DenseVector<float, TempLength> InputArray) { m_Type = TypeEnum::Type_Null; (*this) = std::move(InputArray); } template<int_max TempLength> JsonValue::JsonValue(DenseVector<double, TempLength> InputArray) { m_Type = TypeEnum::Type_Null; (*this) = std::move(InputArray); } template<int_max TempLength> void JsonValue::operator=(const DenseVector<int, TempLength>& InputArray) { if (m_Type != TypeEnum::Type_IntArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<int>>(); (*TempPtr) = InputArray; (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_IntArray; } template<int_max TempLength> void JsonValue::operator=(DenseVector<int, TempLength>&& InputArray) { if (m_Type != TypeEnum::Type_IntArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<int>>(); (*TempPtr) = std::move(InputArray); (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_IntArray; } template<int_max TempLength> void JsonValue::operator=(const DenseVector<long long, TempLength>& InputArray) { if (m_Type != TypeEnum::Type_LongLongArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<long long>>(); (*TempPtr) = InputArray; (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_LongLongArray; } template<int_max TempLength> void JsonValue::operator=(DenseVector<long long, TempLength>&& InputArray) { if (m_Type != TypeEnum::Type_LongLongArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<long long>>(); (*TempPtr) = std::move(InputArray); (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_LongLongArray; } template<int_max TempLength> void JsonValue::operator=(const DenseVector<float, TempLength>& InputArray) { if (m_Type != TypeEnum::Type_FloatArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<float>>(); (*TempPtr) = InputArray; (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_FloatArray; } template<int_max TempLength> void JsonValue::operator=(DenseVector<float, TempLength>&& InputArray) { if (m_Type != TypeEnum::Type_FloatArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<float>>(); (*TempPtr) = std::move(InputArray); (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_FloatArray; } template<int_max TempLength> void JsonValue::operator=(const DenseVector<double, TempLength>& InputArray) { if (m_Type != TypeEnum::Type_DoubleArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<double>>(); (*TempPtr) = InputArray; (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_DoubleArray; } template<int_max TempLength> void JsonValue::operator=(DenseVector<double, TempLength>&& InputArray) { if (m_Type != TypeEnum::Type_DoubleArray) { this->m_OtherData.reset(); } auto TempPtr = std::make_unique<DenseMatrix<double>>(); (*TempPtr) = std::move(InputArray); (*TempPtr).Reshape(1, (*TempPtr).GetElementCount()); m_OtherData.reset(TempPtr.release()); m_Type = TypeEnum::Type_DoubleArray; } template<typename ScalarType> ScalarType JsonValue::ToScalar(ScalarType DefaultValue) const { switch (m_Type) { case TypeEnum::Type_Bool: return ScalarType(m_Scalar.Bool); case TypeEnum::Type_Int: return ScalarType(m_Scalar.Int); case TypeEnum::Type_LongLong: return ScalarType(m_Scalar.LongLong); case TypeEnum::Type_Float: return ScalarType(m_Scalar.Float); case TypeEnum::Type_Double: return ScalarType(m_Scalar.Double); default: return DefaultValue; } } template<typename ScalarType> DenseMatrix<ScalarType> JsonValue::ToScalarArray() const { DenseMatrix<ScalarType> OutputArray; switch (m_Type) { case TypeEnum::Type_IntArray: OutputArray.Copy(this->Ref_IntArray()); break; case TypeEnum::Type_LongLongArray: OutputArray.Copy(this->Ref_LongLongArray()); break; case TypeEnum::Type_FloatArray: OutputArray.Copy(this->Ref_FloatArray()); break; case TypeEnum::Type_DoubleArray: OutputArray.Copy(this->Ref_DoubleArray()); } OutputArray.Reshape(1, OutputArray.GetElementCount()); return OutputArray; } template<typename ScalarType> DenseMatrix<ScalarType> JsonValue::ToScalarArray(const DenseMatrix<ScalarType>& DefaultArray) const { DenseMatrix<ScalarType> OutputArray; switch (m_Type) { case TypeEnum::Type_IntArray: OutputArray.Copy(this->Ref_IntArray()); break; case TypeEnum::Type_LongLongArray: OutputArray.Copy(this->Ref_LongLongArray()); break; case TypeEnum::Type_FloatArray: OutputArray.Copy(this->Ref_FloatArray()); break; case TypeEnum::Type_DoubleArray: OutputArray.Copy(this->Ref_DoubleArray()); break; } OutputArray.Reshape(1, OutputArray.GetElementCount()); return DefaultArray; } }//namespace mdk
fe62d04e10f042c3889bfcb23dd0a850f23da631
cdaeec5dff08a6fee54f737631eb849853890cce
/sort_impls/maximum_gap.cc
f5a7c5c0160bd626016ed5c0cd00895fa567d3e8
[]
no_license
XiaotaoChen/coding-interview
f4dceedf0a9a199c5716b7fd223f503ba3afec3c
932311acf3145442a1c293230d949a843e0b61df
refs/heads/master
2023-05-12T07:23:18.116925
2023-05-04T14:02:55
2023-05-07T09:02:34
308,887,927
0
0
null
null
null
null
UTF-8
C++
false
false
4,217
cc
maximum_gap.cc
#include <vector> #include <algorithm> #include <unordered_set> #include <map> #include "../sorts.h" namespace sort { int maximumGap(std::vector<int>& nums) { int n = nums.size(); if (n<2) return 0; if (n==2) { int max = nums[0]>nums[1] ? nums[0]:nums[1]; int min = nums[0]<nums[1] ? nums[0]:nums[1]; return max-min; } int min = INT32_MAX; int max = INT32_MIN; std::unordered_set<int> set; for (int i=0; i<n;i++) { if (set.find(nums[i])!=set.end()) continue; set.insert(nums[i]); min = min<nums[i]? min: nums[i]; max = max>nums[i]? max: nums[i]; } if (set.size()==1) return 0; int bucketlength = (max - min)/(set.size()-1); int bucket_num = (max - min) / bucketlength + 1; std::vector<std::pair<int, int>> buckets(bucket_num, {INT32_MAX,INT32_MIN}); for (int i=0; i<n; i++) { int bucket_idx = (nums[i] - min) / bucketlength; buckets[bucket_idx].first = buckets[bucket_idx].first < nums[i]? buckets[bucket_idx].first : nums[i]; buckets[bucket_idx].second = buckets[bucket_idx].second > nums[i]? buckets[bucket_idx].second : nums[i]; } int maxgap = 0; int pre = -1; for (int i=0; i<buckets.size(); i++) { if (buckets[i].first!=INT32_MAX) { pre = i; break; } } for (int i=pre+1; i<buckets.size(); i++) { if (buckets[i].first == INT32_MAX) continue; int tmp = buckets[i].first - buckets[pre].second; maxgap = maxgap > tmp ? maxgap : tmp; pre = i; } return maxgap; } int maximumGap_v2(std::vector<int>& nums) { int n = nums.size(); if (n<2) return 0; std::map<int, int , std::less<int>> mp; for (int i=0; i<n; i++) { mp[nums[i]]++; } if (mp.size()==1) return 0; int maxgap = 0; int pre = (*mp.begin()).first; for (std::map<int ,int>::iterator iter = ++mp.begin(); iter!=mp.end(); iter++) { int curr = (*iter).first - pre; maxgap = maxgap > curr? maxgap: curr; pre = (*iter).first; } return maxgap; } int maximumGap_repeated(std::vector<int>& nums) { if (nums.size() < 2) return 0; int min = INT32_MAX; int max = INT32_MIN; for (int i=0; i<nums.size(); i++) { min = min < nums[i] ? min : nums[i]; max = max > nums[i] ? max : nums[i]; } // 桶间距 = 区间长度 / (n个数字划分出的区间个数) int gap = (max -min) / (nums.size()-1); int bucket_num = (max - min) / gap + 1; // 加1解决最大值的区间问题. 如nums=[2,4,6,8], gap=2, 不加1, bucket_num=3, bucket_nums的下标=[0,1,2], // 则最大值8映射bucket id时等于(8-2)/bucket_num=3, 不在bucket nums下标中,故多加一个bucket即可.其其实是解决开闭区间的问题:[2, 4), [4, 6), [6, 8) int buckets[bucket_num][2]; for (int i=0; i<bucket_num; i++) { buckets[i][0] = INT32_MAX; buckets[i][1] = INT32_MIN; } for (int i=0; i < nums.size(); i++) { int idx = nums[i]/gap; // 除的是区间长度,而不是桶个数 buckets[idx][0] = buckets[idx][0] < nums[i] ? buckets[idx][0] : nums[i]; buckets[idx][1] = buckets[idx][1] > nums[1] ? buckets[idx][1] : nums[i]; } // cal max gap int pre = -1; for (int i=0; i<bucket_num; i++) { if (buckets[i]!=0) { pre = i; break; } } int max_gap = 0; for (int i=pre+1; i < bucket_num; i++) { if (buckets[i][0]==INT32_MAX) continue; int gap = buckets[i][0] - buckets[pre][1]; max_gap = max_gap > gap ? max_gap : gap; pre = i; } return max_gap; } int maximumGap_v2_repeated(std::vector<int>& nums) { if (nums.size() < 2) return 0; std::map<int, int, std::less<int>> mp; for (int i=0; i<nums.size(); i++) { mp[nums[i]]++; } int max_gap = 0; auto pre = mp.begin(); for (auto iter=++mp.begin(); iter !=mp.end(); iter++) { int gap = iter->first - pre->first; max_gap = max_gap > gap ? max_gap : gap; pre = iter; } return max_gap; } } // namespace sort
d2df8e21409079303cc724cab783fc23d74debb7
342b8ab579b27aca7c00b37d7a8a1028a86635b9
/qt3DRenderer/objloader.h
687f5ba28a1f888db57220795a60906462b60b1b
[]
no_license
karlphillip/GraphicsProgramming
75c8f956c63394ab974eeee2ee671b12a72216b1
a2c82b95c585f29401e7a9a9c8e280c833855f05
refs/heads/master
2022-05-08T21:35:34.599259
2022-04-28T19:11:04
2022-04-28T19:11:04
7,362,541
170
76
null
2016-07-24T02:33:34
2012-12-29T03:33:10
C++
UTF-8
C++
false
false
183
h
objloader.h
#pragma once #include "mesh.h" #include <string> class OBJLoader { public: OBJLoader(const std::string& filename); Mesh mesh(); private: Mesh _mesh; };
3d7a139144540f30fa35a5ef54278f4941337be7
4df08a71e73fb06debae296caf126f6f2e8291ad
/lab01/UserInput.cpp
23c21838f42c75b656a94b5628a17d0c1e402d63
[]
no_license
EvanBrown96/560labs
60f985ea7ac32a59debe03a34eee630da4c069e1
9b2d9950c328580a226ea6468a7f2fbbc874a901
refs/heads/master
2020-04-18T21:55:19.074220
2019-05-07T03:55:11
2019-05-07T03:55:11
167,779,203
0
0
null
null
null
null
UTF-8
C++
false
false
3,288
cpp
UserInput.cpp
/** * @author: Evan Brown * @file: UserInput.cpp * @date: 1/26/19 * @brief: implementation of UserInput functions */ #include "UserInput.hpp" #include <iostream> #include <limits> #include "NumberParser.hpp" #include "exceptions/NumberParseError.hpp" UserInput::UserInput(const LinkedList<int>& startoff): ll(startoff){} void UserInput::clearCin(){ std::cin.clear(); std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); } void UserInput::start(){ choice = 0; while(true){ std::cout << "Choose one operation from the options below:\n\n"; std::cout << "\t1. Insert\n"; std::cout << "\t2. Delete\n"; std::cout << "\t3. Find smallest number\n"; std::cout << "\t4. Find largest number\n"; std::cout << "\t5. Average of numbers\n"; std::cout << "\t6. Merge2Lists\n"; std::cout << "\t7. Print\n"; std::cout << "\t8. Exit\n"; while(!(std::cin >> choice && choice > 0 && choice < 9)){ clearCin(); std::cout << "Invalid choice, try again: "; } if(choice == 8){ break; } switch(choice){ case 1: { userInsert(); break; } case 2: { userDelete(); break; } case 3: { userSmallest(); break; } case 4: { userLargest(); break; } case 5: { userAverage(); break; } case 6: { userMerge(); break; } default: { ll.print(); } } std::cout << "\n"; } std::cout << "Done!\n"; } void UserInput::userInsert(){ std::cout << "Enter number to insert: "; if(std::cin >> choice){ ll.insert(choice); } else{ clearCin(); std::cout << "Invalid number entered.\n"; } } void UserInput::userDelete(){ std::cout << "Enter number to be deleted: "; if(std::cin >> choice){ try{ ll.deleteVal(choice); std::cout << "Delete was successful.\n"; } catch(ValueNotFound<int>& err){ std::cout << "Delete failed. Number was not found in the list\n"; } } else{ clearCin(); std::cout << "Invalid number entered.\n"; } } void UserInput::userSmallest(){ try{ choice = ll.smallest(); std::cout << "Smallest number: " << choice << "\n"; } catch(EmptyList& err){ std::cout << "List is empty, so it has no smallest number.\n"; } } void UserInput::userLargest(){ try{ choice = ll.largest(); std::cout << "Largest number: " << choice << "\n"; } catch(EmptyList& err){ std::cout << "List is empty, so it has no largest number.\n"; } } void UserInput::userAverage(){ try{ choice = ll.average(); std::cout << "Average: " << choice << "\n"; } catch(EmptyList& err){ std::cout << "List is empty, so it has no average.\n"; } } void UserInput::userMerge(){ std::cout << "Enter new list to be merged:\n"; // clear any previous stuff in input buffer clearCin(); LinkedList<int> temp; try{ NumberParser::parse(std::cin, temp); } catch(NumberParseError& err){ std::cout << "Invalid number entered.\n"; clearCin(); return; } // merge the existing linked list with the entered linked list ll.merge2lists(temp); std::cout << "\nMerged "; ll.print(); }
695dda0214e4faa4b9a4d802ec6e4c04b3b682dc
f66d08afc3a54a78f6fdb7c494bc2624d70c5d25
/Code/CLN/src/complex/elem/division/cl_C_recip.cc
b8be663e22d383ee13752b04b24ac5ffdff9f3cc
[]
no_license
NBAlexis/GiNaCToolsVC
46310ae48cff80b104cc4231de0ed509116193d9
62a25e0b201436316ddd3d853c8c5e738d66f436
refs/heads/master
2021-04-26T23:56:43.627861
2018-03-09T19:15:53
2018-03-09T19:15:53
123,883,542
1
0
null
null
null
null
UTF-8
C++
false
false
3,341
cc
cl_C_recip.cc
// recip(). // General includes. #include "cln_private.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() // for GEN_F_OP2: #define NOMAP2(F,EXPR) \ cl_C_##F _tmp = EXPR; \ return complex_C(_tmp.realpart,_tmp.imagpart); #define MAP2(F,FN,EXPR) \ cl_C_##F _tmp = EXPR; \ return complex_C(FN(_tmp.realpart),FN(_tmp.imagpart)) const cl_N recip (const cl_N& x) { // Methode: // Falls x reell, klar. // Falls x=a+bi: // Falls a=0: 0+(-1/b)i. // Falls a und b beide rational sind: // c:=a*a+b*b, c:=1/c, liefere a*c+(-b*c)i. // Falls a oder b Floats sind: // Falls einer von beiden rational ist, runde ihn zum selben Float-Typ // wie der andere und führe das UP durch. // Falls beide Floats sind, erweitere auf den genaueren, führe das UP // durch und runde wieder auf den ungenaueren. // Das Ergebnis ist eine komplexe Zahl, da beide Komponenten Floats sind. // UP: [a,b Floats vom selben Typ] // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', // liefere die beiden Komponenten 2^(-e)*a'/c' und -2^(-e)*b'/c'. if (realp(x)) { DeclareType(cl_R,x); return recip(x); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); // x = a+bi if (rationalp(a)) { DeclareType(cl_RA,a); if (eq(a,0)) // (complex 0 (- (/ b))) return complex_C(0,-recip(b)); if (rationalp(b)) { DeclareType(cl_RA,b); // a,b beide rational var cl_RA c = recip(square(a)+square(b)); return complex_C(a*c,-b*c); } else { DeclareType(cl_F,b); // a rational, b Float floatcase(b , return complex_C(cl_C_recip(cl_RA_to_SF(a),b)); , return complex_C(cl_C_recip(cl_RA_to_FF(a),b)); , return complex_C(cl_C_recip(cl_RA_to_DF(a),b)); , return complex_C(cl_C_recip(cl_RA_to_LF(a,TheLfloat(b)->len),b)); ); } } else { DeclareType(cl_F,a); if (rationalp(b)) { DeclareType(cl_RA,b); // a Float, b rational floatcase(a , return complex_C(cl_C_recip(a,cl_RA_to_SF(b))); , return complex_C(cl_C_recip(a,cl_RA_to_FF(b))); , return complex_C(cl_C_recip(a,cl_RA_to_DF(b))); , return complex_C(cl_C_recip(a,cl_RA_to_LF(b,TheLfloat(a)->len))); ); } else { DeclareType(cl_F,b); // a,b Floats #ifndef CL_LF_PEDANTIC GEN_F_OP2(a,b,cl_C_recip,2,1,); // uses NOMAP2, MAP2. #else GEN_F_OP2(a,b,cl_C_recip,2,0,); // uses NOMAP2, MAP2. #endif } } } } } // namespace cln
8b9489e939b77b157aabf9e97de4c3f563ba329f
e6a6ce66b7e6adee1043c92bf6089ca562c6e4e8
/src_inoue/SimReAna.cpp
beb1acdc02b4951800967d32ede4b8f0ae025b4e
[]
no_license
HidemitsuAsano/E31ana
267c4f7a8717234e0fd67f03844e46ad61ed7da9
4c179ab966e9f791e1f113b6618491dede44e088
refs/heads/master
2023-04-04T23:18:25.517277
2023-03-17T00:46:31
2023-03-17T00:46:31
121,988,232
0
0
null
null
null
null
UTF-8
C++
false
false
5,547
cpp
SimReAna.cpp
#include <iostream> #include <string> #include <TString.h> #include <TTree.h> #include <TFile.h> #include <TRandom.h> #include "ConfMan.h" #include "KnuclRootData.h" #include "BeamLineHitMan.h" #include "BeamLineTrackMan.h" #include "CDSHitMan.h" #include "CDSTrackingMan.h" #include "SimDataMan.h" #include "AnaInfo.h" #include "MyHistFC.h" #include "MyMCTools.h" #include "MyHistCDS.h" using namespace std; int main(int argc, char** argv) { TString conffile; TString mcfile; TString datafile; TString outfile; if( argc==3 ){ std::cout<<" !!! "<<argv[0]<<" ${input_dir} ${outputfile}"<<std::endl; conffile = Form("%s/analyzer.conf", argv[1]); mcfile = Form("%s/test_mc.root", argv[1]); datafile = Form("%s/sim.root", argv[1]); outfile = argv[2]; } else if( argc==4 ){ conffile = Form("%s/analyzer.conf", argv[1]); mcfile = Form("%s/test_mc.root", argv[1]); datafile = Form("%s/%s", argv[1], argv[2]); outfile = argv[3]; } else if( argc==5 ){ conffile = argv[1]; mcfile = argv[3]; datafile = argv[4]; outfile = argv[2]; } else{ std::cout<<"input "<<argv[0]<<" ${input_dir} ${outputfile}"<<std::endl; std::cout<<"input "<<argv[0]<<" ${input_dir} ${readfile} ${outputfile}"<<std::endl; std::cout<<"input "<<argv[0]<<" ${conffile} ${input1} ${input2} ${outputfile}"<<std::endl; return 0; } ConfMan *confMan = new ConfMan((std::string)conffile); confMan-> Initialize(); ProtonArm::Initialize(confMan); std::cout<<"===== Geant Data Analysis Start ====="<<std::endl; std::cout<<"> Con fFile : "<<conffile<<std::endl; std::cout<<"> MC File : "<<mcfile<<std::endl; std::cout<<"> Data File : "<<datafile<<std::endl; std::cout<<"> Output File : "<<outfile<<std::endl; BeamLineHitMan *blMan = new BeamLineHitMan(); CDSHitMan *cdsMan = new CDSHitMan(); CDSTrackingMan *cdstrackMan = new CDSTrackingMan(); BeamLineTrackMan *bltrackMan = new BeamLineTrackMan(); TFile *f_mc = new TFile(mcfile); TTree *mcTree = (TTree*)f_mc-> Get("tree"); TTree *mcTree2 = (TTree*)f_mc-> Get("tree2"); MCData *mcData = new MCData(); ReactionData *reacData = new ReactionData(); DetectorData *detData = new DetectorData(); mcTree-> SetBranchAddress("MCData", &mcData); mcTree-> SetBranchAddress("ReactionData", &reacData); mcTree-> SetBranchAddress("DetectorData", &detData); TFile *f_data = new TFile(datafile); TTree *evTree = (TTree*)f_data->Get("EventTree"); evTree-> SetBranchAddress("CDSTrackingMan", &cdstrackMan); SimDataMan *simData = new SimDataMan(); TFile *of=new TFile(outfile, "recreate"); TTree *outTree=new TTree("EventTree", "EventTree"); AnaInfo *anaInfo=new AnaInfo(); outTree-> Branch("CDSTrackingMan", &cdstrackMan); outTree-> Branch("AnaInfo", &anaInfo); of-> cd(); if( mcTree->GetEntries()!=evTree->GetEntries() ){ cout<<"!!!!! mcTree evTree Entry dont match !!!!!"<<endl; // return 0; } for( int ev=0; ev<evTree->GetEntries(); ev++ ){ if( ev%1000==0 ) cout<<"> Event Number : "<<ev<<endl; mcTree->GetEntry(ev); evTree-> GetEntry(ev); simData->Convert(detData, confMan, blMan, cdsMan); bltrackMan-> DoTracking(blMan, confMan, true, true); BeamInfo beam; beam.SetPID(Beam_Kaon); beam.SetBLMan(blMan); beam.SetBLDC(bltrackMan); std::vector<HodoscopeLikeHit*> T0hits=MyTools::getHodo(blMan, CID_T0); if( T0hits.size()==1 ) beam.SetT0(T0hits[0]); if( bltrackMan->ntrackBPC()==1 ) beam.SetBPCid(0); if( bltrackMan->ntrackBLC2()==1 ) beam.SetBLC2id(0); TVector3 init_mom, init_pos; for( int i=0; i<mcData->trackSize(); i++ ){ if( mcData->track(i)->parentTrackID()==0 && mcData->track(i)->pdgID()==321 ){ init_pos=0.1*mcData->track(i)->vertex(); init_mom=0.001*mcData->track(i)->momentum(); } } beam.SetVtxMom(init_mom.Mag()); double D5mom=init_mom.Mag(); while( true ){ double beam_out, beam_tof; ELossTools::CalcElossBeamTGeo(beam.T0pos(), init_pos, D5mom, parMass[Beam_Kaon], beam_out, beam_tof); if( fabs(init_mom.Mag()-beam_out)<1.0e-8 ){ break; } D5mom += init_mom.Mag()-beam_out; } beam.SetD5mom(D5mom); if( T0hits.size()==1 && bltrackMan->ntrackBPC()==1 && bltrackMan->ntrackBLC2()==1 ) beam.SetFlag(true); anaInfo-> AddBeam(beam); if( anaInfo->beam(0)->flag() ){ for( int i=0; i<cdstrackMan->nTrack(); i++ ){ CDSTrack *track=cdstrackMan->Track(i); CDSInfo cds=MyTools::makeCDSInfo(i, cdsMan, cdstrackMan, anaInfo->beam(0), bltrackMan, confMan); anaInfo-> AddCDS(cds); } if( anaInfo->minDCA() ){ anaInfo->beam(0)-> SetVertex(anaInfo->minDCA()->vertexBeam()); } for( int i=0; i<cdstrackMan->nTrack(); i++ ){ for( int j=i+1; j<cdstrackMan->nTrack(); j++ ){ CDS2Info cds2=MyTools::makeCDS2Info(cdstrackMan, i, j, anaInfo); anaInfo-> AddCDS2(cds2); } } ForwardNeutralInfo fnInfo=MyTools::makeFN(blMan, anaInfo, NC_THRE); if( fnInfo.pid()==F_Gamma || fnInfo.pid()==F_Neutron ) anaInfo->AddNeutral(fnInfo); ForwardChargeInfo fcInfo=MyTools::makeFC(confMan, blMan, anaInfo); if( fcInfo.step()>1 ){ anaInfo->AddCharge(fcInfo); } } outTree->Fill(); blMan->Clear(); bltrackMan->Clear(); cdstrackMan->Clear(); cdsMan->Clear(); anaInfo->Clear(); } of-> Write(); of-> Close(); std::cout<<"===== Geant Data Analysis Finish ====="<<std::endl; }
ce56c336b4f87ee787c59ce7a61a5409502f0c5f
444a2443868fe7a72483b1a090c1312397a4c8de
/Contracts/EuropeanOptionContract.cpp
dc59786cf1b65404c0864604a384cf5bfbedd117
[]
no_license
daveysj/sjd
e2dd2aeef3422ef54309dd3d67c7537ceea913c8
f48abae6f2e8fc91d27961b8567be3d8f0eb62d9
refs/heads/master
2021-01-10T12:51:33.786317
2018-06-25T14:54:50
2018-06-25T14:55:28
51,246,593
0
0
null
null
null
null
UTF-8
C++
false
false
3,763
cpp
EuropeanOptionContract.cpp
#include "EuropeanOptionContract.h" namespace sjd { /*====================================================================================== EuropeanOption The simplest Black-Scholes Option Contract used to price Black options on futures or Black Scholes options. =======================================================================================*/ EuropeanOption::EuropeanOption(Date optionMaturity, Date optionSettlement, double strike, PutCall type, double volume, Date premiumPaymentDate, double premiumAmount, BuySell buySellInput) { constructorCommon(optionMaturity, optionSettlement, strike, type, volume, premiumPaymentDate, premiumAmount, buySellInput); } EuropeanOption::EuropeanOption(EuropeanOption &optionInput) { constructorCommon(optionInput.maturityDate, optionInput.settlementDate, optionInput.strike, optionInput.type, optionInput.volume, optionInput.premiumPaymentDate, optionInput.premiumAmount, optionInput.buySell); } void EuropeanOption::constructorCommon(Date optionMaturity, Date optionSettlement, double X, PutCall pc, double N, Date pDate, double pAmount, BuySell bs) { errorTracking = boost::shared_ptr<sjdTools::ErrorTracking>(new sjdTools::ErrorTracking("EuropeanOption")); setMaturityDate(optionMaturity); setSettlementDate(optionSettlement); setStrike(X); setVolume(N); setPremiumPaymentDate(pDate); setPremiumAmount(pAmount); setBuySell(bs); setType(pc); } EuropeanOption* EuropeanOption::clone() { EuropeanOption *ef = new EuropeanOption(*this); return ef; } void EuropeanOption::setType(PutCall pc) { SingleOptionContract::setType(pc); if (getType() == PUT) { option = boost::shared_ptr<Black76Option>(new Black76Put(0, 0, 0, 0)); } else { option = boost::shared_ptr<Black76Option>(new Black76Call(0, 0, 0, 0)); } } double EuropeanOption::getOptionValue(boost::shared_ptr<RatesEnvironment> re) { Date valueDate = re->getAnchorDate(); if (valueDate > getSettlementDate()) { return 0; } double premium = 0; double F = (re->getFRS())->getForward(getSettlementDate()); double df = (re->getDRS()->getDiscountFactor(getSettlementDate())); if (valueDate < getMaturityDate()) { double sd = (re->getVRS())->getStandardDeviation(getMaturityDate(), getStrike(), F); option->setParameters(F,strike,sd,df); premium += option->getPremium(); return premium * getVolume(); } return option->getPremiumAfterMaturity(F, df) * volume; } }
a24027ff9ae76c1ccb0a4cb3c9bc96357b7a7fa3
983096b0d798fc9e6aca12f9de686c898c4af0a8
/examples/examplePrintBuffer/printBuffer.cpp
7c40c417fcfc325228484a0475102d573c6ee82f
[ "BSD-3-Clause" ]
permissive
bstatcomp/RandomCL
90029d6e97ac3e1751d310618c4a9c3b0ced7c9f
7d216131128eece39839ec7b5a44cd3acc7b78ba
refs/heads/master
2021-06-12T13:40:47.477500
2020-04-08T07:39:34
2020-04-08T07:39:34
128,662,087
27
7
BSD-3-Clause
2019-04-28T19:16:30
2018-04-08T16:47:47
C++
UTF-8
C++
false
false
1,405
cpp
printBuffer.cpp
/* * This example shows how to generate an OpenCL buffer of random numbers. Here we transfer them to host and print them. */ #define CL_USE_DEPRECATED_OPENCL_1_2_APIS // cl.hpp #if defined(__APPLE__) || defined(__MACOSX) #include <OpenCL/cl.hpp> #else #include <CL/cl.hpp> #endif #include <chrono> #include <random> #include <iostream> #include <randomBuffer.h> using cl::Buffer; using cl::Program; using cl::Platform; using cl::Device; using cl::Kernel; using cl::Context; using cl::CommandQueue; using namespace std; #define PLATFORM 0 #define DEVICE 0 #define N_THREADS 128 #define NUM 2000 #ifdef _WIN32 #define GENERATOR_LOCATION "..\\..\\generators\\" #else #define GENERATOR_LOCATION "../../generators/" #endif int main(int argc, char* argv[]) { //prepare command queue vector<Platform> platforms; Platform::get(&platforms); vector<Device> devices; platforms[PLATFORM].getDevices(CL_DEVICE_TYPE_ALL, &devices); Device device = devices[DEVICE]; Context context({ device }); CommandQueue queue(context, device); //generate numbers randomCL::generatorLocation = GENERATOR_LOCATION; Buffer cl_res = randomCL::generateRandomBuffer(NUM, "tyche_i", queue, N_THREADS, 128, "double",12345); //transfer to host vector<cl_double> res(NUM); queue.enqueueReadBuffer(cl_res, true, 0, NUM * sizeof(cl_double), &res[0]); //print results for (cl_double num : res) { cout << num << " "; } }
407855a8c815afa24662cfc3cd914ca5fd94e20e
13439117c84cb138f36ab0a275a39edcc411528b
/IM-Common/Bean/UserInfo.cpp
da6de6b01179f9d58b5a84b32b249420e826f985
[]
no_license
chijinxina/IM-MiddleWare-CPP
ac16d9bcf3b2630547ffdb51f7b1b0860eac4ccc
7e0c5616e58ca43576916d7ac1d9bd32866db60b
refs/heads/master
2020-05-15T12:40:47.399090
2019-04-21T05:12:42
2019-04-21T05:12:42
182,273,075
1
0
null
null
null
null
UTF-8
C++
false
false
542
cpp
UserInfo.cpp
// // Created by chijinxin on 19-4-16. // #include <iostream> #include <string> #include <boost/format.hpp> #include "Bean/UserInfo.h" using namespace std; long UserInfo::getUserId() { return userId; } void UserInfo::setUserId(long userId) { userId = userId; } string UserInfo::getUserName() { return userName; } void UserInfo::setUserName(string userName) { userName = userName; } string UserInfo::toString() { boost::format fmt("UserInfo{ userId=%d, userName=%s }"); return (fmt % userId % userName).str(); }
2dfe9460cc097e1d2f5672de38a00a7893652165
6007d2cac908e2db297c9958716a10e394454e32
/1081B.cpp
3f5161d2db4082ad53264129b631495747e2ccc7
[]
no_license
riz1-ali/Codeforces_Solutions
c245201d467575fcfdaf9f341e152c5aef727da4
c19e45bbc65ab900aaaa8166b5fba1ac3321d18b
refs/heads/master
2020-04-05T09:29:27.662246
2019-05-10T18:24:32
2019-05-10T18:24:32
156,759,512
0
0
null
null
null
null
UTF-8
C++
false
false
1,041
cpp
1081B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef pair<ll,ll> pll; #define pb push_back #define mp make_pair #define f first #define s second #define gcd(a,b) __gcd(a,b) #define lpr(i,s,e) for(ll i=s;i>=e;i--) #define lpi(i,s,e) for(ll i=s;i<=e;i++) #define lp(n) for(ll i=0;i<n;i++) int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int n; cin>>n; int arr[n+1],ans[n+1]; vector<ll> type[n+1]; multiset<pll> ms; lpi(i,1,n) { cin>>arr[i]; ms.insert(mp(n-arr[i],i)); ans[i]=0; } ll ptr=0; while(!ms.empty()) { ptr++; auto it=*(ms.begin()); ll yy=it.f-1,zz; zz=it.f; type[ptr].pb(it.s); ms.erase(it); lpi(i,1,yy) { auto itx=ms.lower_bound({zz,0}); ll yz=itx->s; if(itx==ms.end() || itx->f!=zz) { cout<<"Impossible\n"; return 0; } type[ptr].pb(yz); ms.erase(itx); } } lpi(i,1,n) for(auto it:type[i]) ans[it]=i; cout<<"Possible\n"; lpi(i,1,n) cout<<ans[i]<<" "; cout<<endl; return 0; }
12c2898db0e976fa8c17e285386019c03785f859
2df36e037900945c55c1c94470cf0e7be36c55d8
/Kelp21/Kelp21/SceneOver.hpp
8dae9408d80cd0061c5c7cb09b77770d77b24859
[]
no_license
yutateno/AC21C
6bf81a3f8da1f402252844f2c6f48d161a65c11a
4879eda0c8eae57dcbb02c58481eb6b8fe594a39
refs/heads/main
2023-06-25T12:27:08.675948
2021-07-24T07:16:46
2021-07-24T07:16:46
389,026,809
0
0
null
null
null
null
UTF-8
C++
false
false
357
hpp
SceneOver.hpp
#pragma once #include "SceneBase.hpp" #include <memory> namespace scene { namespace over { class SceneOver : public SceneBase { public: SceneOver(); virtual ~SceneOver(); void init() override; void ctrl() override; void disp() override; void dest() override; private: struct Impl; std::unique_ptr<Impl> impl; }; } }
97647a0e4d5b6dec350d58cc0aa4e6fd30bf9d52
d37713fb5d15b6f79bc4c3ffe3135cda3b052a2e
/Vulkan2020/VulkanGraphicsInstance.h
a6e0318beda5819e99e40495f7204e0ec279a772
[]
no_license
xmagicn/Vulkan2020
81b7f1f576e3b2afc5127de67949a54f96cd1356
b84260866748c125e0d01afc7e5c4a6b1e8af958
refs/heads/master
2021-05-20T12:03:26.152917
2020-04-26T15:19:31
2020-04-26T15:19:31
252,228,079
0
0
null
2020-04-01T20:20:27
2020-04-01T16:24:48
C++
UTF-8
C++
false
false
7,331
h
VulkanGraphicsInstance.h
#pragma once #include "GraphicsInstance.h" #include <optional> #include <vector> #include <glm/glm.hpp> #include "vulkan/vulkan.h" class Texture; class Model; struct QueueFamilyIndices { std::optional<uint32_t> graphicsFamily; std::optional<uint32_t> presentFamily; bool IsComplete() { return graphicsFamily.has_value() && presentFamily.has_value(); } }; struct SwapChainSupportDetails { VkSurfaceCapabilitiesKHR capabilities; std::vector<VkSurfaceFormatKHR> formats; std::vector<VkPresentModeKHR> presentModes; }; struct UniformBufferObject { glm::mat4 model; glm::mat4 view; glm::mat4 proj; }; class VulkanGraphicsInstance : public GraphicsInstance { public: VulkanGraphicsInstance(); virtual ~VulkanGraphicsInstance(); void PreInitInstance( std::vector<const char*> requiredExtensions ); virtual void WaitForFrameComplete() override; virtual void ResizeFrame( unsigned int width, unsigned int height ) override; VkInstance* GetInstance() { return &vulkanInstance; } VkDevice* GetDevice() { return &vulkanDevice; } private: VulkanGraphicsInstance( const VulkanGraphicsInstance& ) = delete; VulkanGraphicsInstance& operator=( const VulkanGraphicsInstance& ) = delete; virtual bool InitInstanceInternal( RenderWindow* pRenderWindow ) override; virtual bool DestroyInstanceInternal() override; virtual void DrawFrameInternal() override; ///////////////////////////////////////// // VulkanAPI Functions ///////////////////////////////////////// ///////////////////////////////////////// // Initialization Functions ///////////////////////////////////////// void CreateInstance(); void RecreateSwapChain(); void PickPhysicalDevice(); bool IsDeviceSuitable( VkPhysicalDevice device ); VkSampleCountFlagBits GetMaxUsableSampleCount(); QueueFamilyIndices FindQueueFamilies( VkPhysicalDevice device ); bool CheckDeviceExtensionSupport( VkPhysicalDevice device ); SwapChainSupportDetails QuerySwapChainSupport( VkPhysicalDevice device ); void CreateLogicalDevice(); void CreateSwapChain(); VkSurfaceFormatKHR ChooseSwapSurfaceFormat( const std::vector<VkSurfaceFormatKHR>& availableFormats ); VkPresentModeKHR ChooseSwapPresentMode( const std::vector<VkPresentModeKHR>& availablePresentModes ); VkExtent2D ChooseSwapExtent( const VkSurfaceCapabilitiesKHR& capabilities ); public: VkImageView CreateImageView( VkImage image, VkFormat format, VkImageAspectFlags aspectFlags, uint32_t mipLevels ); private: void CreateImageViews(); void CreateRenderPass(); VkFormat FindDepthFormat(); VkFormat FindSupportedFormat( const std::vector<VkFormat>& candidates, VkImageTiling tiling, VkFormatFeatureFlags features ); void CreateDescriptorSetLayout(); void CreateGraphicsPipeline(); VkShaderModule CreateShaderModule( const std::vector<char>& code ); void CreateCommandPool(); void CreateColorResources(); public: void GenerateMipmaps( VkImage image, VkFormat imageFormat, int32_t texWidth, int32_t texHeight, uint32_t mipLevels ); void CreateImage( uint32_t width, uint32_t height, uint32_t mipLevels, VkSampleCountFlagBits numSamples, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFlags properties, VkImage& image, VkDeviceMemory& imageMemory ); private: uint32_t FindMemoryType( uint32_t typeFilter, VkMemoryPropertyFlags properties ); void CreateDepthResources(); bool HasStencilComponent( VkFormat format ); void CreateUniformBuffers(); void CreateDescriptorPool(); void CreateCommandBuffers(); void CreateSyncObjects(); ////////////////////////////// // Buffer Functions ////////////////////////////// public: void CreateBuffer( VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags properties, VkBuffer& buffer, VkDeviceMemory& bufferMemory ); void CopyBuffer( VkBuffer srcBuffer, VkBuffer dstBuffer, VkDeviceSize size ); void CopyBufferToImage( VkBuffer buffer, VkImage image, uint32_t width, uint32_t height ); ////////////////////////////// // Command Functions ////////////////////////////// VkCommandBuffer BeginSingleTimeCommands(); void EndSingleTimeCommands( VkCommandBuffer commandBuffer ); void TransitionImageLayout( VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout, uint32_t mipLevels ); void CreateFramebuffers(); void CreateDescriptorSets(); void CreateImageSamplerDescriptorSet( std::vector<VkDescriptorSet>& DescriptorSetVector, VkImageView TextureImageView, VkSampler TextureSampler ); ///////////////////////////////////////// // Cleanup Functions ///////////////////////////////////////// private: void CleanupSwapChain(); ///////////////////////////////////////// // Update Functions ///////////////////////////////////////// void UpdateUniformBuffer( uint32_t ); ///////////////////////////////////////// // Public Functions ///////////////////////////////////////// public: void InitializeModel( Model* pModel, const char* filename, const char* ptexname = "chaletTex.jpg" ); void FinalizeInit(); // TODO remove ///////////////////////////////////////// // Debug Functions ///////////////////////////////////////// private: #ifdef _DEBUG void SetupDebugMessenger(); bool CheckValidationLayerSupport(); void PopulateDebugMessengerCreateInfo( VkDebugUtilsMessengerCreateInfoEXT& createInfo ); VkResult CreateDebugUtilsMessengerEXT( VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pDebugMessenger ); void DestroyDebugUtilsMessengerEXT( VkInstance instance, VkDebugUtilsMessengerEXT debugMessenger, const VkAllocationCallbacks* pAllocator ); static VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback( VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* ); #endif bool bFrameBufferResized = false; uint32_t Width; uint32_t Height; VkInstance vulkanInstance; VkSurfaceKHR vulkanSurface; VkPhysicalDevice physicalDevice = VK_NULL_HANDLE; VkSampleCountFlagBits msaaSamples = VK_SAMPLE_COUNT_1_BIT; VkDevice vulkanDevice; VkQueue graphicsQueue; VkQueue presentQueue; VkSwapchainKHR swapChain; std::vector<VkImage> swapChainImages; VkFormat swapChainImageFormat; VkExtent2D swapChainExtent; std::vector<VkImageView> swapChainImageViews; std::vector<VkFramebuffer> swapChainFramebuffers; VkRenderPass renderPass; VkDescriptorSetLayout descriptorSetLayout; VkPipelineLayout pipelineLayout; VkPipeline graphicsPipeline; VkCommandPool commandPool; std::vector<VkCommandBuffer> commandBuffers; VkImage ColorImage; VkDeviceMemory ColorImageMemory; VkImageView ColorImageView; VkImage DepthImage; VkDeviceMemory DepthImageMemory; VkImageView DepthImageView; VkDescriptorPool DescriptorPool; std::vector<VkDescriptorSet> DescriptorSets; std::vector<VkBuffer> UniformBuffers; std::vector<VkDeviceMemory> UniformBuffersMemory; const int MAX_FRAMES_IN_FLIGHT = 2; std::vector<VkSemaphore> imageAvailableSemaphores; std::vector<VkSemaphore> renderFinishedSemaphores; std::vector<VkFence> inFlightFences; std::vector<VkFence> imagesInFlight; size_t currentFrame = 0; std::vector<const char*> extensions; std::vector<Model*> renderObjects; #ifdef _DEBUG VkDebugUtilsMessengerEXT debugMessenger; #endif };
1794c00372da64aafd9aa97482c1345c83701752
5c37ea718ca8b54d36b31442043d0b84f1abcd68
/projs/libdata_stream/tests/watch_test.cc
e8f70955ee82af6e39bc10a1a633ba78abd5e3b6
[]
no_license
yotamgi/dgx-autopilot
a109a3e020a7e31585da475fc4b2a51cb9496df0
e81818b2a1776a2695fac8b231e62b53652cda69
refs/heads/master
2021-01-25T08:54:56.571623
2014-06-11T20:35:42
2014-06-11T20:35:42
35,047,785
1
0
null
null
null
null
UTF-8
C++
false
false
1,812
cc
watch_test.cc
#ifndef WATCH_TEST_CC_ #define WATCH_TEST_CC_ #include <stream/util/lin_algebra.h> #include <stream/filters/watch_filter.h> #include <gtest/gtest.h> /** * Dummy generator for testing the integral. * Returns the time since creation in seconds */ class DummyWatchedGen : public stream::DataPopStream<int> { public: DummyWatchedGen():m_counter(0) {} int get_data() { return m_counter++; } private: size_t m_counter; }; /** * Dummy generator for testing the integral. * Returns vector with those values: * - x: constant 1.0 * - y: time since creation * - z: constant 1.0 */ class DummyWatchedVecGen : public stream::DataPopStream<lin_algebra::vec3f> { public: DummyWatchedVecGen():m_counter(0) {} lin_algebra::vec3f get_data() { lin_algebra::vec3f ans; ans[0] = (float) m_counter; ans[1] = (float) m_counter+1; ans[2] = (float) m_counter+2; return ans; } private: size_t m_counter; }; TEST(WatchTest, int_test) { boost::shared_ptr< stream::DataPopStream<int> > a(new DummyWatchedGen); stream::filters::WatchFilter<int> watch(a); boost::shared_ptr<stream::DataPopStream<int> > w = watch.get_watch_stream(); for (size_t i=0; i<100; i++) { int ans = watch.get_data(); for (size_t j=0; j<5; j++){ ASSERT_EQ(ans, w->get_data()); } } } TEST(WatchTest, vec_test) { boost::shared_ptr<stream::DataPopStream<lin_algebra::vec3f> > a(new DummyWatchedVecGen); stream::filters::WatchFilter<lin_algebra::vec3f> watch(a); boost::shared_ptr<stream::DataPopStream<lin_algebra::vec3f> > w = watch.get_watch_stream(); for (size_t i=0; i<100; i++) { lin_algebra::vec3f ans = watch.get_data(); ASSERT_NEAR(ans[0], w->get_data()[0], 0.001); ASSERT_NEAR(ans[1], w->get_data()[1], 0.001); ASSERT_NEAR(ans[2], w->get_data()[2], 0.001); } } #endif /* WATCH_TEST_CC_ */
915b691bbf5b8ac1224c9cb6f1006087a30693d5
17adb0e72c9dd190124a8d21171d9c8fcb23e333
/ui/CxDynObjs/FormatPage.cpp
a18431f0dae22c19d379ba6c678265337ec99c01
[ "MIT" ]
permissive
jafo2128/SuperCxHMI
16dc0abb56da80db0f207d9194a37258575276b5
5a5afe2de68dc9a0c06e2eec945a579467ef51ff
refs/heads/master
2020-04-01T16:30:20.771434
2016-02-06T00:40:53
2016-02-06T00:40:53
48,529,344
1
0
null
2015-12-24T06:45:45
2015-12-24T06:45:45
null
GB18030
C++
false
false
9,878
cpp
FormatPage.cpp
// FormatPage.cpp : Implementation of CFormatPage #include "stdafx.h" #include "CxDynObjs.h" #include "FormatPage.h" //获取页面类型 HRESULT CFormatPage::CrackPropertyType() { IDynamicFrm* pDynamicFrm = NULL; HRESULT hr = m_pPageSite->QueryInterface(IID_IDynamicFrm, (void **)&pDynamicFrm); if (FAILED(hr)) return hr; CDynamicPropInfo* pPropInfo = NULL; pDynamicFrm->get_PropertyInfo((long *)&pPropInfo); //获取接口属性的页面类型 m_pPropInfo = pPropInfo; pDynamicFrm->Release(); return S_OK; } HRESULT CFormatPage::SetPageSite(IPropertyPageSite *pPageSite) { HRESULT hr = IPropertyPageImpl<CFormatPage>::SetPageSite(pPageSite); if (FAILED(hr)) return hr; hr = CrackPropertyType(); return hr; } HRESULT CFormatPage::Apply(void) { for (UINT i = 0; i < m_nObjects; i++) { CComQIPtr<IFormatDynamic> spDynamic(m_ppUnk[i]); ATLASSERT(spDynamic != NULL); CComBSTR bstr; int nDataType; if (IsDlgButtonChecked(IDC_ENABLEFORMAT)) { //格式字符串 GetDlgItemText(IDC_FORMAT, (BSTR&)bstr); spDynamic->put_Format(bstr); nDataType = 0; } else { nDataType = ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_GETCURSEL, 0, 0); nDataType += 1; CComVariant varWholeDigits; CComVariant varDecimalDigits; if (nDataType == 1) { //总位数 GetDlgItemText(IDC_WHOLEDIGITS, (BSTR&)bstr); if (bstr.Length() == 0) { ::MessageBox(m_hWnd, _T("请输入数字位数!"), _T("提示"), MB_OK); ::SetFocus(GetDlgItem(IDC_WHOLEDIGITS)); return S_FALSE; } OnCreateExpression(&bstr, 2); varWholeDigits = bstr; //小数位数 GetDlgItemText(IDC_DECIMALDIGITS, (BSTR&)bstr); if (bstr.Length() == 0) { ::MessageBox(m_hWnd, _T("请输入小数位数!"), _T("提示"), MB_OK); ::SetFocus(GetDlgItem(IDC_DECIMALDIGITS)); return S_FALSE; } OnCreateExpression(&bstr, 2); varDecimalDigits = bstr; } else { //行数 GetDlgItemText(IDC_LINES, (BSTR&)bstr); if (bstr.Length() == 0) { ::MessageBox(m_hWnd, _T("请输入行数!"), _T("提示"), MB_OK); ::SetFocus(GetDlgItem(IDC_LINES)); return S_FALSE; } OnCreateExpression(&bstr, 2); varWholeDigits = bstr; //行字符数 GetDlgItemText(IDC_CHARSPERLINE, (BSTR&)bstr); if (bstr.Length() == 0) { ::MessageBox(m_hWnd, _T("请输入行字符数!"), _T("提示"), MB_OK); ::SetFocus(GetDlgItem(IDC_CHARSPERLINE)); return S_FALSE; } OnCreateExpression(&bstr, 2); varDecimalDigits = bstr; } //对齐 long nJustify = ::SendMessage(GetDlgItem(IDC_JUSTIFY), CB_GETCURSEL, 0, 0); spDynamic->SetNumericFormat(varWholeDigits, varDecimalDigits, nJustify); } spDynamic->put_SourceDataType(nDataType); BOOL b; if (m_pPropInfo->bSupportMouseInput) { b = ::SendMessage(GetDlgItem(IDC_ENABLEMOUSEINPUT), BM_GETCHECK, 0, 0L); spDynamic->put_EnableMouseInput(b); } } m_bDirty = FALSE; return S_OK; } HRESULT CFormatPage::HelperSetText(int nIDDlgItem, CComVariant &var) { USES_CONVERSION; if (var.vt != VT_BSTR) var.ChangeType(VT_BSTR); if (var.vt != VT_BSTR) return S_FALSE; SetDlgItemText(nIDDlgItem, W2T(var.bstrVal)); return S_OK; } HRESULT CFormatPage::SetObjects(ULONG nObjects, IUnknown **ppUnk) { USES_CONVERSION; //调用基类实现 HRESULT hr = IPropertyPageImpl<CFormatPage>::SetObjects(nObjects, ppUnk); if (SUCCEEDED(hr)) { CComQIPtr<IFormatDynamic> spDynamic(m_ppUnk[0]); ATLASSERT(spDynamic != NULL); int nDataType; spDynamic->get_SourceDataType(&nDataType); if (nDataType == 0) { ::SendMessage(GetDlgItem(IDC_ENABLEFORMAT), BM_SETCHECK, BST_CHECKED, 0); ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_SETCURSEL, 0, 0); } else { ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_SETCURSEL, nDataType - 1, 0); } CComBSTR bstr; spDynamic->get_Format(&bstr); SetDlgItemText(IDC_FORMAT, W2T(bstr)); CComVariant varWholeDigits; CComVariant varDecimalDigits; int nJustify; spDynamic->GetNumericFormat(&varWholeDigits, &varDecimalDigits, &nJustify); //总位数和小数位数 if (nDataType == 1) { if (varWholeDigits.vt == VT_BSTR) OnCreateExpression(&varWholeDigits.bstrVal, 1); HelperSetText(IDC_WHOLEDIGITS, varWholeDigits); if (varDecimalDigits.vt == VT_BSTR) OnCreateExpression(&varDecimalDigits.bstrVal, 1); HelperSetText(IDC_DECIMALDIGITS, varDecimalDigits); SetDlgItemText(IDC_LINES, "1"); SetDlgItemText(IDC_CHARSPERLINE, "10"); } //行数和行字符数 else if (nDataType == 2) { if (varWholeDigits.vt == VT_BSTR) OnCreateExpression(&varWholeDigits.bstrVal, 1); HelperSetText(IDC_LINES, varWholeDigits); if (varDecimalDigits.vt == VT_BSTR) OnCreateExpression(&varDecimalDigits.bstrVal, 1); HelperSetText(IDC_CHARSPERLINE, varDecimalDigits); SetDlgItemText(IDC_WHOLEDIGITS, "7"); SetDlgItemText(IDC_DECIMALDIGITS, "2"); } else { SetDlgItemText(IDC_LINES, "1"); SetDlgItemText(IDC_CHARSPERLINE, "10"); SetDlgItemText(IDC_WHOLEDIGITS, "7"); SetDlgItemText(IDC_DECIMALDIGITS, "2"); } //对齐 ::SendMessage(GetDlgItem(IDC_JUSTIFY), CB_SETCURSEL, nJustify, 0); BOOL bHandled; OnClickedFormat(0, 0, 0, bHandled); OnSelchangeDataType(0, 0, 0, bHandled); if (spDynamic != NULL) { BOOL b; if (m_pPropInfo->bSupportMouseInput) { spDynamic->get_EnableMouseInput(&b); ::SendMessage(GetDlgItem(IDC_ENABLEMOUSEINPUT), BM_SETCHECK, b, 0L); } else { ::ShowWindow(GetDlgItem(IDC_ENABLEMOUSEINPUT), SW_HIDE); } } } return hr; } LRESULT CFormatPage::OnClickedFormat(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { USES_CONVERSION; CComBSTR bstr; GetDlgItemText(IDC_FORMAT, (BSTR&)bstr); if (bstr.m_str == NULL || bstr == "") { bstr = "%s"; SetDlgItemText(IDC_FORMAT, W2T(bstr)); } if (IsDlgButtonChecked(IDC_ENABLEFORMAT)) { ::EnableWindow(GetDlgItem(IDC_FORMAT), true); ::EnableWindow(GetDlgItem(IDC_DATATYPE), false); ::EnableWindow(GetDlgItem(IDC_WHOLEDIGITS), false); ::EnableWindow(GetDlgItem(IDC_DECIMALDIGITS), false); ::EnableWindow(GetDlgItem(IDC_STATIC_LINES), false); ::EnableWindow(GetDlgItem(IDC_STATIC_CHARSPERLINE), false); ::EnableWindow(GetDlgItem(IDC_JUSTIFY), false); ::EnableWindow(GetDlgItem(IDC_PARA_EXP1), false); ::EnableWindow(GetDlgItem(IDC_PARA_EXP2), false); } else { ::EnableWindow(GetDlgItem(IDC_FORMAT), false); ::EnableWindow(GetDlgItem(IDC_DATATYPE), true); ::EnableWindow(GetDlgItem(IDC_WHOLEDIGITS), true); ::EnableWindow(GetDlgItem(IDC_DECIMALDIGITS), true); ::EnableWindow(GetDlgItem(IDC_STATIC_LINES), true); ::EnableWindow(GetDlgItem(IDC_STATIC_CHARSPERLINE), true); ::EnableWindow(GetDlgItem(IDC_JUSTIFY), true); ::EnableWindow(GetDlgItem(IDC_PARA_EXP1), true); ::EnableWindow(GetDlgItem(IDC_PARA_EXP2), true); } return S_OK; } LRESULT CFormatPage::OnSelchangeDataType(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { int n = ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_GETCURSEL, 0, 0); ::ShowWindow(GetDlgItem(IDC_STATIC_WHOLEDIGITS), n != 1); ::ShowWindow(GetDlgItem(IDC_STATIC_DECIMALDIGITS), n != 1); ::ShowWindow(GetDlgItem(IDC_STATIC_LINES), n == 1); ::ShowWindow(GetDlgItem(IDC_STATIC_CHARSPERLINE), n == 1); ::ShowWindow(GetDlgItem(IDC_WHOLEDIGITS), n != 1); ::ShowWindow(GetDlgItem(IDC_DECIMALDIGITS), n != 1); ::ShowWindow(GetDlgItem(IDC_LINES), n == 1); ::ShowWindow(GetDlgItem(IDC_CHARSPERLINE), n == 1); return 0; } LRESULT CFormatPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_T("数字")); ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_T("字符-数字")); ::SendMessage(GetDlgItem(IDC_JUSTIFY), CB_ADDSTRING, 0, (LPARAM)_T("左边")); ::SendMessage(GetDlgItem(IDC_JUSTIFY), CB_ADDSTRING, 0, (LPARAM)_T("居中")); ::SendMessage(GetDlgItem(IDC_JUSTIFY), CB_ADDSTRING, 0, (LPARAM)_T("右边")); return 0; } #include "../CxScripCrt/CxScripCrt.h" LRESULT CFormatPage::OnClickedExp1(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { USES_CONVERSION; int n = ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_GETCURSEL, 0, 0); CComBSTR bstr; UINT nIDText = (n == 0 ? IDC_WHOLEDIGITS : IDC_LINES); GetDlgItemText(nIDText, (BSTR&)bstr); if (OnCreateExpression(&bstr)) SetDlgItemText(nIDText, W2T(bstr)); return 0; } LRESULT CFormatPage::OnClickedExp2(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { USES_CONVERSION; int n = ::SendMessage(GetDlgItem(IDC_DATATYPE), CB_GETCURSEL, 0, 0); CComBSTR bstr; UINT nIDText = (n == 0 ? IDC_DECIMALDIGITS : IDC_CHARSPERLINE); GetDlgItemText(nIDText, (BSTR&)bstr); if (OnCreateExpression(&bstr)) SetDlgItemText(nIDText, W2T(bstr)); return 0; } BOOL CFormatPage::OnCreateExpression(BSTR* pbstr, int iFlag) { CComPtr<IDynamicFrm> spDynamicFrm; HRESULT hr = m_pPageSite->QueryInterface(IID_IDynamicFrm, (void **)&spDynamicFrm); if (SUCCEEDED(hr)) { CDynamicPropInfo* pPropInfo = NULL; spDynamicFrm->get_PropertyInfo((long *)&pPropInfo); if (pPropInfo != NULL && pPropInfo->pfnExpression) pPropInfo->pfnExpression(pbstr, iFlag); else if (iFlag == 0) spDynamicFrm->OnCreateExpression(pbstr); } else if (iFlag == 0) { CComPtr<ICxExpressionCreator> spExprCrt; HRESULT hr = spExprCrt.CoCreateInstance(CLSID_CxExpressionCreator); if (FAILED(hr)) return hr; spExprCrt->put_Expression(*pbstr); spExprCrt->AddGeneralSymbolPage(CX_ALL_SYMBOL); hr = spExprCrt->ShowDialog(); if (FAILED(hr)) return hr; if (*pbstr != NULL) SysFreeString(*pbstr); spExprCrt->get_Expression(pbstr); } return TRUE; }
cc22e87a9713e525d561f6a29ba3e74c7acb329f
3b4d5a328099f89522e5a87d7c7237cf2ad13237
/Embedded/Tonium/TIDE/CSerial/CSerial.cpp
4623c314ae56f7d6d39a7444f8719b4be4e4c859
[]
no_license
tonybillings/forfun
3f1b038e6bae284bd34843cc12770f2b30c35c2e
b1a3bd6cb3ed968c6db9fd658f45f5e3c9426dd5
refs/heads/master
2023-07-09T23:38:30.969870
2021-08-25T09:24:07
2021-08-25T09:24:07
384,669,404
0
0
null
null
null
null
UTF-8
C++
false
false
873
cpp
CSerial.cpp
#include "CSerial.h" extern "C" { namespace CSerial { static Serial* s_serial = nullptr; BOOL Init(UINT portNumber) { s_serial = new Serial(portNumber); return s_serial->IsConnected(); } BOOL Write(BYTE* data, UINT length) { if (s_serial != nullptr) return s_serial->WriteData(data, length); else return false; } BOOL ReadData(UINT bufferSize, LPVOID* buffer, LPDWORD bytesRead) { if (s_serial != nullptr) return s_serial->ReadData(bufferSize, buffer, bytesRead); } VOID ToggleDtr(UINT count) { if (s_serial != nullptr) s_serial->ToggleDtr(count); } VOID Close() { if (s_serial != nullptr) s_serial->Close(); } BOOL IsConnected() { if (s_serial != nullptr && s_serial->IsConnected()) return true; else return false; } } }
abcc9f423ee52ad642fdfdaa58ffd32b35c5c23e
15ad1ee19a4a2d37824fc24db45523937176e7fe
/src/RSTexture.h
516e386070c65b8648197fa04da5d05d4dbe826a
[]
no_license
NTimmons/MultiFocalStereoDisplay
21eae7a00d6cb508c478637854ee7d0c602eb31d
e2e1cb358234a36c448ea09f748e67069dd4f3a4
refs/heads/master
2021-01-21T04:31:16.080219
2016-06-23T13:03:59
2016-06-23T13:03:59
49,945,421
0
1
null
null
null
null
UTF-8
C++
false
false
231
h
RSTexture.h
#ifndef _INCL_TEXTURE #define _INCL_TEXTURE class Texture { public: Texture(): m_texture(-1){} void Init(std::string& _path); GLuint Get(){ return m_texture; } void Bind(GLenum _TextureUnit); GLuint m_texture; }; #endif
59e5d888ad8b5e34b388b7af59828e77d037d584
2364d95f600872bf7721e0e195f0999a2db886c1
/src/demo/src/demo.cpp
53ad9cc3139392d81390e9650818bfd134933b71
[]
no_license
Tingyiwanyan/rrt
28eb79c18aef88064717372946de0547b52d7a5c
59f1a2aece62550aa69097c72e797340da5f1dd4
refs/heads/master
2020-03-29T18:24:02.817085
2018-09-25T05:05:50
2018-09-25T05:05:50
150,210,116
0
0
null
null
null
null
UTF-8
C++
false
false
16,712
cpp
demo.cpp
/* For class E599 Special Topics in Autonomous Robotics ISE, Indiana University Lantao Liu 9/21/2017 */ #include "ros/ros.h" #include "std_msgs/String.h" #include <visualization_msgs/Marker.h> #include <sstream> #include<geometry_msgs/Pose.h> #include<stdio.h> #include<tf/tf.h> #include<tf/transform_datatypes.h> #include<iostream> #include<ctime> #include<cstdlib> #include<math.h> #include<vector> struct Node { double x; double y; double yaw; Node *parent; std::vector<Node*> child; Node(double x_,double y_, double yaw_) { x = x_; y = y_; yaw = yaw_; } Node(double x_,double y_, double yaw_, Node *parent_) { x = x_; y = y_; yaw = yaw_; parent = parent_; } }; void insert_node(Node *parent, double pos_x,double pos_y,double yaw) { std::cout<<"Im here in insert_node"<<std::endl; Node *node_new = new Node(pos_x,pos_y,yaw, parent); parent->child.push_back(node_new); }; Node* check_nearset_node(Node *root,double pos_x,double pos_y) { std::vector<Node*> queue; Node *nearest_node_link = root; double distance = std::sqrt(std::pow(root->x-pos_x,2)+std::pow(root->y-pos_y,2)); queue.push_back(root); while(queue.size()!=0) { for(int i=0; i<queue[0]->child.size();i++) { queue.push_back(queue[0]->child[i]); } double distance_temp = std::sqrt(std::pow(queue[0]->x-pos_x,2)+std::pow(queue[0]->y-pos_y,2)); if(distance_temp < distance) { distance = distance_temp; nearest_node_link = queue[0]; } queue.erase(queue.begin()); } return nearest_node_link; //std::cout<<"chile size is"<<root->child.size()<<std::endl; } int main(int argc, char **argv) { ros::init(argc, argv, "ros_demo"); //create a ros handle (pointer) so that you can call and use it ros::NodeHandle n; //in <>, it specified the type of the message to be published //in (), first param: topic name; second param: size of queued messages, at least 1 ros::Publisher chatter_pub = n.advertise<std_msgs::String>("some_chatter", 10); ros::Publisher marker_pub = n.advertise<visualization_msgs::Marker>("visualization_marker", 10); //each second, ros "spins" and draws 20 frames ros::Rate loop_rate(20); int frame_count = 0; float f = 0.0; Node* root = new Node(3, -3, 0,NULL); Node* temp_destination = root; static double step_size = 0.2; srand((unsigned)time(0)); double dist_to_goal=100; int index_path = 0; std::vector<visualization_msgs::Marker*> obst2s; int id_index = 0; while (ros::ok()) { if(dist_to_goal>0.2){ //first create a string typed (std_msgs) message std_msgs::String msg; std::stringstream ss; ss << "Frame index: " << frame_count; msg.data = ss.str(); ROS_INFO("%s", msg.data.c_str()); //printing on screen //publisher publishes messages, the msg type must be consistent with definition advertise<>(); chatter_pub.publish(msg); /******************** From here, we are defining and drawing two obstacles in the workspace **************************/ // define two obstacles static visualization_msgs::Marker obst1, obst2,obst3,obst4; // Set obst1 and obst2 as a Cube and Cylinder, respectively obst1.type = visualization_msgs::Marker::CUBE; //obst2.type = visualization_msgs::Marker::CYLINDER; obst2.type = visualization_msgs::Marker::CUBE; obst3.type = visualization_msgs::Marker::CUBE; obst4.type = visualization_msgs::Marker::CUBE; // Set the frame ID and timestamp. See the TF tutorials for information on these. obst1.header.frame_id = obst2.header.frame_id = obst3.header.frame_id=obst4.header.frame_id="map"; //NOTE: this should be "paired" to the frame_id entry in Rviz obst1.header.stamp = obst2.header.stamp = obst3.header.stamp = obst4.header.stamp = ros::Time::now(); // Set the namespace and id obst1.ns = obst2.ns = obst3.ns= obst4.ns = "obstacles"; obst1.id = 0; obst2.id = 1; obst3.id = 2; obst4.id = 3; // Set the marker action. Options are ADD, DELETE, and new in ROS Indigo: 3 (DELETEALL) obst1.action = obst2.action = obst3.action = obst4.action = visualization_msgs::Marker::ADD; // Set the scale of the marker obst1.scale.x = 6.0; obst1.scale.y = 0.5; obst1.scale.z = 0.0; //1x1x1 here means each side of the cube is 1m long obst3.scale.x = 6.0; obst3.scale.y = 0.5; obst3.scale.z = 0.0; obst4.scale.x = 6.0; obst4.scale.y = 0.5; obst4.scale.z = 0.0; obst2.scale.x = 0.3; obst2.scale.y = 0.1; obst2.scale.z = 0.1; //1x1x1 here means the cylinder as diameter 1m and height 1m // Set the pose of the marker. since a side of the obstacle obst1 is 1m as defined above, now we place the obst1 center at (1, 2, 0.5). z-axis is height obst1.pose.position.x = 2; obst1.pose.position.y = 2; obst1.pose.position.z = 0.0; obst3.pose.position.x = -2; obst3.pose.position.y = 0; obst3.pose.position.z = 0.0; obst4.pose.position.x = 2; obst4.pose.position.y = -2; obst4.pose.position.z = 0.0; tf::Quaternion q_orig, q_rot, q_new,q_vehicle; double r1=3.14159; double yaw = 0, yaw_vehicle = 0; q_rot = tf::createQuaternionFromRPY(0,0,yaw); q_vehicle = tf::createQuaternionFromRPY(0,0,yaw_vehicle); q_rot.normalize(); q_vehicle.normalize(); //tf::Quaternion q(2,3,4,1); //tf::Matrix3x3 m(q); tf::Matrix3x3 m1(q_rot); tf::Matrix3x3 m2(q_vehicle); //double roll,pitch,yaw,roll1,pitch1,yaw1; //m.getRPY(roll,pitch,yaw); //m1.getRPY(roll1,pitch1,yaw1); obst1.pose.orientation.x = q_rot.x(); obst1.pose.orientation.y = q_rot.y(); obst1.pose.orientation.z = q_rot.z(); obst1.pose.orientation.w = q_rot.w(); obst3.pose.orientation.x = q_rot.x(); obst3.pose.orientation.y = q_rot.y(); obst3.pose.orientation.z = q_rot.z(); obst3.pose.orientation.w = q_rot.w(); obst4.pose.orientation.x = q_rot.x(); obst4.pose.orientation.y = q_rot.y(); obst4.pose.orientation.z = q_rot.z(); obst4.pose.orientation.w = q_rot.w(); obst2.pose.orientation.x = q_vehicle.x(); obst2.pose.orientation.y = q_vehicle.y(); obst2.pose.orientation.z = q_vehicle.z(); obst2.pose.orientation.w = q_vehicle.w(); //obst1.pose.orientation.x = 0.0; //obst1.pose.orientation.y = 0.0; //obst1.pose.orientation.z = 0.0; //obst1.pose.orientation.w = 1.0; //(x, y, z, w) is a quaternion, ignore it here (quaternion can be converted to angle and converted back, ros can do it) obst2.pose.position.x = 3; obst2.pose.position.y = -3; obst2.pose.position.z = 0.0; //obst2.pose.orientation = obst1.pose.orientation; // Set the color red, green, blue. if not set, by default the value is 0 obst1.color.r = 0.0f; obst1.color.g = 1.0f; obst1.color.b = 0.0f; obst1.color.a = 1.0; //be sure to set alpha to something non-zero, otherwise it is transparent obst2.color.r = 1.0f; obst2.color.g = 1.0f; obst2.color.b = 0.0f; obst2.color.a = 1.0; obst3.color.r = 0.0f; obst3.color.g = 1.0f; obst3.color.b = 0.0f; obst3.color.a = 1.0; obst4.color.r = 0.0f; obst4.color.g = 1.0f; obst4.color.b = 0.0f; obst4.color.a = 1.0; obst1.lifetime = obst2.lifetime = obst3.lifetime = obst4.lifetime = ros::Duration(); double diam_veh = std::sqrt(std::pow(obst2.scale.x/2.0,2)+std::pow(obst2.scale.y/2.0,2)); // publish these messages to ROS system marker_pub.publish(obst1); marker_pub.publish(obst2); marker_pub.publish(obst3); marker_pub.publish(obst4); static visualization_msgs::Marker rob; static visualization_msgs::Marker path; rob.type = visualization_msgs::Marker::SPHERE; path.type = visualization_msgs::Marker::LINE_STRIP; rob.header.frame_id = path.header.frame_id = "map"; //NOTE: this should be "paired" to the frame_id entry in Rviz, the default setting in Rviz is "map" rob.header.stamp = path.header.stamp = ros::Time::now(); rob.ns = path.ns = "rob"; rob.id = 0; path.id = 1; rob.action = path.action = visualization_msgs::Marker::ADD; rob.lifetime = path.lifetime = ros::Duration(); rob.scale.x = rob.scale.y = 0.2; rob.scale.z = 0.1; rob.color.r = 1.0f; rob.color.g = 0.5f; rob.color.b = 0.5f; rob.color.a = 1.0; // path line strip is blue path.color.b = 1.0; path.color.a = 1.0; path.scale.x = 0.02; path.pose.orientation.w = 1.0; rob.pose.position.x = 4.0; rob.pose.position.y = 4.0; rob.pose.position.z = 0.0; int num_slice2 = 200; // divide a circle into segments static int slice_index2 = 0; /************************* From here, we are using points, lines, to draw a tree structure *** ******************/ //we use static here since we want to incrementally add contents in these mesgs, otherwise contents in these msgs will be cleaned in every ros spin. static visualization_msgs::Marker vertices; static visualization_msgs::Marker edges; vertices.type = visualization_msgs::Marker::POINTS; edges.type = visualization_msgs::Marker::LINE_LIST; vertices.header.frame_id = edges.header.frame_id = "map"; vertices.header.stamp = edges.header.stamp = ros::Time::now(); vertices.ns = edges.ns = "vertices_and_lines"; vertices.action = edges.action = visualization_msgs::Marker::ADD; vertices.pose.orientation.w = edges.pose.orientation.w = 1.0; vertices.id = 0; edges.id = 1; // POINTS markers use x and y scale for width/height respectively vertices.scale.x = 0.05; vertices.scale.y = 0.05; // LINE_STRIP/LINE_LIST markers use only the x component of scale, for the line width edges.scale.x = 0.02; //tune it yourself // Points are green vertices.color.g = 1.0f; vertices.color.a = 1.0; // Line list is red edges.color.r = 1.0; edges.color.a = 1.0; geometry_msgs::Point p0; // root vertex geometry_msgs::Point p1; //srand((unsigned)time(0)); double random_integer_x; double random_integer_y; random_integer_x = ((rand()%100)+1.0-50.0)/10.0; random_integer_y = ((rand()%100)+1.0-50.0)/10.0; //p0.x = random_integer_x; //p0.y = random_integer_y; p0.z = 0; Node *temp = check_nearset_node(root,random_integer_x,random_integer_y); temp_destination = temp; p0.x = temp->x; p0.y = temp->y; double vector_x = random_integer_x - temp->x; double vector_y = random_integer_y - temp->y; double norm_ = std::sqrt(vector_x*vector_x+vector_y*vector_y); vector_x = (vector_x/norm_)*step_size; vector_y = (vector_y/norm_)*step_size; double new_pos_x = temp->x + vector_x; double new_pos_y = temp->y + vector_y; double dist_obj_veh_x_1 = std::abs(obst1.pose.position.x-new_pos_x); double dist_obj_veh_y_1 = std::abs(obst1.pose.position.y-new_pos_y); double dist_obj_veh_x_3 = std::abs(obst3.pose.position.x-new_pos_x); double dist_obj_veh_y_3 = std::abs(obst3.pose.position.y-new_pos_y); double dist_obj_veh_x_4 = std::abs(obst4.pose.position.x-new_pos_x); double dist_obj_veh_y_4 = std::abs(obst4.pose.position.y-new_pos_y); if((dist_obj_veh_x_1 > diam_veh+obst1.scale.x/2.0 || dist_obj_veh_y_1 > diam_veh+obst1.scale.y/2.0) &&(dist_obj_veh_x_3 > diam_veh+obst3.scale.x/2.0 || dist_obj_veh_y_3 > diam_veh+obst3.scale.y/2.0) &&(dist_obj_veh_x_4 > diam_veh+obst4.scale.x/2.0 || dist_obj_veh_y_4 > diam_veh+obst4.scale.y/2.0) ) { double norm_ = std::sqrt(vector_x*vector_x+vector_y*vector_y); double cos_ = vector_x/norm_; double yaw_new = acos(cos_); p1.x = new_pos_x; p1.y = new_pos_y; p1.z = 0; insert_node(temp, new_pos_x,new_pos_y,yaw_new); std::cout<<"random_x is"<<random_integer_x<<std::endl; std::cout<<"random_y is"<<random_integer_y<<std::endl; std::cout<<"node_x is"<<temp->x<<std::endl; std::cout<<"node_y is"<<temp->y<<std::endl; std::cout<<"new_x is"<<p1.x<<std::endl; std::cout<<"new_y is"<<p1.y<<std::endl; int num_slice = 20; // e.g., to create 20 edges float length = 1; //length of each edge edges.points.push_back(p0); edges.points.push_back(p1); static int slice_index = 0; int herz = 10; //every 10 ROS frames we draw an edge //publish msgs vertices.points.push_back(p1); marker_pub.publish(vertices); marker_pub.publish(edges); dist_to_goal = std::sqrt(std::pow(new_pos_x-rob.pose.position.x,2)+std::pow(new_pos_y-rob.pose.position.y,2)); std::cout<<"dist_to_goal"<<dist_to_goal<<std::endl; } /******************** From here, we are defining and drawing a simple robot **************************/ // a simple sphere represents a robot /* if(frame_count % 2 == 0 && path.points.size() <= num_slice2) //update every 2 ROS frames { geometry_msgs::Point p; float angle = slice_index2*2*M_PI/num_slice2; slice_index2 ++ ; p.x = 4 * cos(angle) - 0.5; //some random circular trajectory, with radius 4, and offset (-0.5, 1, .05) p.y = 4 * sin(angle) + 1.0; p.z = 0.05; rob.pose.position = p; path.points.push_back(p); //for drawing path, which is line strip type } */ //path.points.push_back(p1); marker_pub.publish(rob); //marker_pub.publish(path); /******************** To here, we finished displaying our components **************************/ // check if there is a subscriber. Here our subscriber will be Rviz while (marker_pub.getNumSubscribers() < 1) { if (!ros::ok()) { return 0; } ROS_WARN_ONCE("Please run Rviz in another terminal."); sleep(1); } //++frame_count; } else { std::vector<Node*> move_sequence; Node *trace_back = temp_destination->child[temp_destination->child.size()-1]; move_sequence.push_back(trace_back); while(trace_back->parent != NULL) { trace_back = trace_back->parent; move_sequence.push_back(trace_back); } //index_path = move_sequence.size(); std::cout<<"move_sequence_size"<<move_sequence.size()<<std::endl; //for(int j = 0;j<move_sequence.size();j++) //{ // std::cout<<"move_sequnce "<<j<<std::endl; // std::cout<<"x "<<move_sequence[j]->x<<std::endl<<"y "<<move_sequence[j]->y<<std::endl<<"yaw "<<move_sequence[j]->yaw<<std::endl; // } std::cout<<"index is "<<index_path<<std::endl; //return 0; if(frame_count % 2 == 0 && index_path < move_sequence.size()) //update every 2 ROS frames { /* static visualization_msgs::Marker path; path.type = visualization_msgs::Marker::LINE_STRIP; path.header.frame_id = "map"; path.header.stamp = ros::Time::now(); path.ns = "rob"; path.id = 1; path.action = visualization_msgs::Marker::ADD; path.lifetime = ros::Duration(); path.color.b = 1.0; path.color.a = 1.0; path.scale.x = 0.02; path.pose.orientation.w = 1.0; */ static visualization_msgs::Marker *obst2 = new visualization_msgs::Marker; obst2->type = visualization_msgs::Marker::CUBE; obst2->header.frame_id = "map"; obst2->ns = "obstacles1"; obst2->id = id_index; obst2->action = visualization_msgs::Marker::ADD; obst2->pose.position.x = move_sequence[move_sequence.size()-1-index_path]->x; obst2->pose.position.y = move_sequence[move_sequence.size()-1-index_path]->y; obst2->pose.position.z = 0.0; obst2->scale.x = 0.3; obst2->scale.y = 0.1; obst2->scale.z = 0.1; obst2->header.stamp = ros::Time::now(); obst2->lifetime = ros::Duration(); obst2->color.r = 1.0f; obst2->color.g = 1.0f; obst2->color.b = 0.0f; obst2->color.a = 1.0; tf::Quaternion q_vehicle_path; q_vehicle_path = tf::createQuaternionFromRPY(0,0,move_sequence[move_sequence.size()-1-index_path]->yaw); tf::Matrix3x3 m3(q_vehicle_path); obst2->pose.orientation.x = q_vehicle_path.x(); obst2->pose.orientation.y = q_vehicle_path.y(); obst2->pose.orientation.z = q_vehicle_path.z(); obst2->pose.orientation.w = q_vehicle_path.w(); index_path = index_path + 1; //marker_pub.publish(obst2); obst2s.push_back(obst2); id_index = id_index + 1; std::cout<<"obst2s size is "<<obst2s.size()<<std::endl; for(int k=0;k<obst2s.size();k++) { marker_pub.publish(*obst2s[k]); } } if(index_path == move_sequence.size()-1) { return 0; } } //ros spins, force ROS frame to refresh/update once ros::spinOnce(); loop_rate.sleep(); ++frame_count; } return 0; }
554cfcf6cba6191fb23447addc11f2f0e03c25ab
6ba38fe94e7ea5146c633f56f59c0c3278d695a7
/plugins/core/DriftingGratingStimulus/DriftingGratingStimulus.h
e94625d3c5bad5528ae1bd726f68aa292510e923
[ "MIT" ]
permissive
mworks/mworks
b49b721c2c5c0471180516892649fe3bd753a326
abf78fc91a44b99a97cf0eafb29e68ca3b7a08c7
refs/heads/master
2023-09-05T20:04:58.434227
2023-08-30T01:08:09
2023-08-30T01:08:09
2,356,013
14
11
null
2012-10-03T17:48:45
2011-09-09T14:55:57
C++
UTF-8
C++
false
false
2,874
h
DriftingGratingStimulus.h
/* * DriftingGratingStimulus.h * MWorksCore * * Created by bkennedy on 8/26/08. * Copyright 2008 MIT. All rights reserved. * */ #ifndef DRIFTING_GRATNG_STIMULUS_H #define DRIFTING_GRATNG_STIMULUS_H #include "DriftingGratingStimulusShaderTypes.h" using namespace mw::drifting_grating_stimulus; BEGIN_NAMESPACE_MW using DriftingGratingStimulusBase = DynamicStimulusBase<ColoredTransformStimulus>; class DriftingGratingStimulus : public DriftingGratingStimulusBase { public: static const std::string DIRECTION; static const std::string CENTRAL_STARTING_PHASE; static const std::string STARTING_PHASE; static const std::string FREQUENCY; static const std::string SPEED; static const std::string COMPUTE_PHASE_INCREMENTALLY; static const std::string GRATING_TYPE; static const std::string MASK; static const std::string INVERTED; static const std::string STD_DEV; static const std::string MEAN; static const std::string NORMALIZED; static void describeComponent(ComponentInfo &info); explicit DriftingGratingStimulus(const ParameterValueMap &parameters); Datum getCurrentAnnounceDrawData() override; private: static GratingType gratingTypeFromName(const std::string &name); static MaskType maskTypeFromName(const std::string &name); void loadMetal(MetalDisplay &display) override; void drawMetal(MetalDisplay &display) override; void configureBlending(MTLRenderPipelineColorAttachmentDescriptor *colorAttachment) const override; simd::float4x4 getCurrentMVPMatrix(const simd::float4x4 &projectionMatrix) const override; void stopPlaying() override; const boost::shared_ptr<Variable> direction_in_degrees; const boost::shared_ptr<Variable> central_starting_phase; const boost::shared_ptr<Variable> starting_phase; const boost::shared_ptr<Variable> spatial_frequency; const boost::shared_ptr<Variable> speed; const bool computePhaseIncrementally; const boost::shared_ptr<Variable> gratingTypeName; const boost::shared_ptr<Variable> maskTypeName; const boost::shared_ptr<Variable> inverted; const boost::shared_ptr<Variable> std_dev; const boost::shared_ptr<Variable> mean; const boost::shared_ptr<Variable> normalized; double current_direction_in_degrees, current_starting_phase, current_spatial_frequency, current_speed; std::string current_grating_type_name; GratingType current_grating_type; std::string current_mask_type_name; MaskType current_mask_type; bool current_grating_is_mask, current_inverted; double current_std_dev, current_mean; bool current_normalized; double lastElapsedSeconds; double last_phase; double displayWidth, displayHeight; }; END_NAMESPACE_MW #endif /* DRIFTING_GRATNG_STIMULUS_H */
53a8d4b2e640097aa4d98266294bb65cf2c8a8c8
1634d4f09e2db354cf9befa24e5340ff092fd9db
/Wonderland/Wonderland/Editor/Modules/VulkanWrapper/Resource/Texture/Texture Backup/VWTextureGroupManager.h
0bb62cb46896acea1105f42cb24d81a89ac84ed4
[ "MIT" ]
permissive
RodrigoHolztrattner/Wonderland
cd5a977bec96fda1851119a8de47b40b74bd85b7
ffb71d47c1725e7cd537e2d1380962b5dfdc3d75
refs/heads/master
2021-01-10T15:29:21.940124
2017-10-01T17:12:57
2017-10-01T17:12:57
84,469,251
4
1
null
null
null
null
ISO-8859-1
C++
false
false
4,381
h
VWTextureGroupManager.h
//////////////////////////////////////////////////////////////////////////////// // Filename: VWTextureGroupManager.h //////////////////////////////////////////////////////////////////////////////// #pragma once ////////////// // INCLUDES // ////////////// #define GLFW_INCLUDE_VULKAN #include <GLFW/glfw3.h> #include "..\..\..\NamespaceDefinitions.h" #include "..\..\..\HashedString.h" #include "..\..\..\Reference.h" #include "..\..\Resource\HoardResourceManager.h" #include "..\..\Resource\HoardResourceIndexLoader.h" #include "..\..\Material\VWDescriptorSetCreator.h" #include "VWTextureGroup.h" #include "VWTextureGroupRequest.h" #include "VWTextureGroupVault.h" #include "VWTextureGroupIndex.h" #include <vector> #include <map> #include <array> #include <list> #include <functional> /////////////// // NAMESPACE // /////////////// ///////////// // DEFINES // ///////////// //////////// // GLOBAL // //////////// /////////////// // NAMESPACE // /////////////// // Just another graphic wrapper NamespaceBegin(VulkanWrapper) //////////////// // FORWARDING // //////////////// class VWContext; class VWTexture; //////////////// // STRUCTURES // //////////////// /* - Temos o texture group index, onde ficam todas as informações de como cada texture group é formado (quais imagens, tamanhos, mipmaps, informações de criação, etc). - Quando queremos um group, usamos a hashed string do nome do mesmo. - Verificamos primeiro se ele se encontra na memória, caso afirmativo seguimos pegando a referencia do vault e tal... - Caso não esteja, procuramos o index referente ao grupo e solicitamos o recurso (ou os recursos). - Como foi definido que usaremos um map para o texture group, podemos ler os dados do index do disco e criar novos em runtime. */ /* - Varias solicitações de texture group são feitas por vários objetos durante o update de uma instancia de App - No final do update, essas requisições são enfileiradas e são processadas: : Caso o texture group já esteja na memória : - Apenas alteramos a referência e aumentamos o contador de referencia. : Caso o texture group não esteja na memória : - Ou o texture group ainda não fez nada. -> O mesmo é criado, é adicionado na memória, é feita a solicitação de carregamento do recurso e é adicionado na lista para ser gerado. - Ou o texture group está esperando o carregamento do recurso. -> Adicionamos um wake call para o recurso apontando para a referencia solicitante. - Ou o texture group está na lista de espera para ser gerado. -> Em algum momento no update faremos a verificação que ele pode ser gerado e - Ou o texture group está sendo gerado. */ //////////////////////////////////////////////////////////////////////////////// // Class name: VWTextureGroupManager //////////////////////////////////////////////////////////////////////////////// class VWTextureGroupManager : public VWDescriptorSetCreator { public: ////////////////// // CONSTRUCTORS // public: ////////// // Constructor / destructor VWTextureGroupManager(); ~VWTextureGroupManager(); ////////////////// // MAIN METHODS // public: ////////// // Initialize bool Initialize(VWContext* _graphicContext, HoardResourceIndexLoader<VWTextureGroupIndex>* _textureGroupIndexLoaderRef, uint32_t _totalWorkerThreads); // Release this image void Release(); public: // Request a texture group void RequestTextureGroup(Reference::Blob<VWTextureGroup>* _textureGroupReference, HashedStringIdentifier _groupIdentifier); // Process texture group requests void ProcessTextureGroupRequestQueues(HoardResourceManager* _resourceManager); private: // Process a texture group request void ProcessTextureGroupRequest(HoardResourceManager* _resourceManager, VWTextureGroupRequest& _textureGroupRequest); /////////////// // VARIABLES // private: ////// // The total number of worker threads we are using uint32_t m_TotalWorkerThreads; // Our texture group requests std::vector<VWTextureGroupRequest>* m_TextureGroupRequests; // Our texture group vault VWTextureGroupVault m_TextureGroupVault; // The texture index loader reference HoardResourceIndexLoader<VWTextureGroupIndex>* m_TextureGroupIndexLoader; // Our texture groups // std::map<std::string, VWTextureGroup> m_TextureGroups; }; // Just another graphic wrapper NamespaceEnd(VulkanWrapper)
6c5403dc284dd8c0c2b0257d87672316149125fc
301ff6c5bb236d4cda81bc2a17d372ab57684521
/3.cpp
0cfefa06022a40b5229fe882b90626eef9215642
[]
no_license
pl187746/ZPI_lab
b7fdedd4e6eceb18dce6fc663ed138d0fc702f24
1b28e431bdd93591de2b32f1830948d9b286253c
refs/heads/master
2021-01-10T06:21:15.051425
2016-03-23T14:35:00
2016-03-23T14:35:00
54,560,472
0
0
null
null
null
null
UTF-8
C++
false
false
90
cpp
3.cpp
#include „myio.h” #include <stdlib.h> int main() { 123; printf(„Hello World!”); }
a3745640c65a99a4127fc0e5591328ce5f551a03
d68ffa160ccec781ff76863494723a56ec533a59
/Board.h
d5a1b5f112b7d130780d3374d1ed318c431093a0
[]
no_license
RyanMa1/BattleShipwithAI
6c3492e44a451962e3e9022c2ff04a1ff0097cdc
4ab99e6a8aa60fea8b74812544ff6aa9c3cfba7a
refs/heads/master
2022-12-15T04:51:44.387817
2020-09-04T04:38:10
2020-09-04T04:38:10
287,325,225
0
0
null
null
null
null
UTF-8
C++
false
false
2,008
h
Board.h
// // Created by matth on 6/9/2019. // #ifndef BATTLESHIP_BOARD_H #define BATTLESHIP_BOARD_H #include <vector> #include <string> #include "ShipPlacement.h" namespace BattleShip{ class Move; class Board { public: explicit Board(const int &rowSize, const int &columnSize); Board() = default; int getNumRows() const; int getNumCols() const; bool canPlaceShipAt(ShipPlacement &shipPlacement); bool overlap(ShipPlacement &shipPlacement); void addShip(char symbol, ShipPlacement &shipPlacement); bool inBoundsBoatSet(ShipPlacement &shipPlacement); std::vector<std::string> &getFiringBoard(); const std::vector<std::string> &getPlacementBoard() const; bool inBoundsFire(const int &row, const int &col) const; bool isBetween(const int &row, const int &col, const int &boardSize) const; void setBoat(const int &row, const int &col, const int &boatSize, const char &val, const char &orient); void setBoatHoriz(const int &row, const int &colStart, const int &shipSize, const char &val); void setBoatVert(const int &row, const int &col, const int &shipSize, const char &val); void displayFiringBoard() const; void displayShipPlacement() const; void setFire(const int &row, const int &col, const char &val); bool checkHit(const int & row, const int &col); const char& at(const int &row, const int& col) const; const char getBlankChar() const; using iterator = std::vector<std::string>::iterator; using const_iterator = std::vector<std::string>::const_iterator; iterator begin(); iterator end(); const_iterator cbegin() const; const_iterator cend() const; void updatePlacementBoard(Move &move); private: std::vector<std::string> firingBoard; std::vector<std::string> placementBoard; const char blankChar = '*'; }; } #endif //BATTLESHIP_BOARD_H
41986edba736c4142717e31ceae59859d2dc265f
36a59d835eef613ff3637acbbf50dbcdf259c86c
/Practise exam/p3/book.h
87866b12c43b91be902c1882ce863706ef5b9c71
[]
no_license
dragikamov/Programming_in_Cpp_I
680a7640a86a78a898e44f5e971fb1994312d12e
9c61700a1047cc41a8fa4a82e3caba6478c34c65
refs/heads/master
2020-04-26T17:49:14.837413
2019-03-04T10:38:46
2019-03-04T10:38:46
173,725,167
0
0
null
null
null
null
UTF-8
C++
false
false
1,471
h
book.h
/* CH08-320142 p3.h Dragi Kamov d.kamov@jacobs-university.de */ class Book { private: const char* title; int pages; public: Book(const Book&); Book(const char* t, int p); Book(); void setTitle(char*); void setPages(int); const char* getTitle(); int getPages(); void print(); }; Book::Book(const Book& a) { title=a.title; pages=a.pages; } Book::Book(const char* t, int p) { title=t; pages=p; } Book::Book() { std::cout<<"Empty constructor called:"<<std::endl; } void Book::setTitle(char* t) { title=t; } void Book::setPages(int p) { pages=p; } const char* Book::getTitle() { return title; } int Book::getPages() { return pages; } void Book::print() { std::cout<<"Title: "<<title<<std::endl; std::cout<<"Pages: "<<pages<<std::endl; } /* Compiler-created copy constructor does a bit-copy. It is better for the programmer to provide his own version for the class because he can choose which information he is going to copy, because in some situations we would not be needed to copy all information in a way to save memory and time. */ /* P.4 Explanation Private informations can only be accessed by that class and if other classes are introduced and they want to access those informations they would not be able to. And if in a class we use protected other classes can access the informations from that class. */
ef288ed2f9927518037beaf4409a6a0ef679d99a
4b318c53495ae93100c087d0a01c76d5be82f230
/include/rmm/mr/device/cuda_async_view_memory_resource.hpp
806ace807414c1e1c49817a6cfd9715ddba312b5
[ "Apache-2.0" ]
permissive
rapidsai/rmm
78798d1bbf103f090fe1463671fc3282cf7c2f91
93e616ac02850cc4671a8bdf9b3d2d6673346eec
refs/heads/branch-23.10
2023-09-04T04:23:12.035933
2023-09-01T17:24:33
2023-09-01T17:24:33
160,453,496
364
188
Apache-2.0
2023-09-13T16:21:05
2018-12-05T03:13:32
C++
UTF-8
C++
false
false
5,894
hpp
cuda_async_view_memory_resource.hpp
/* * Copyright (c) 2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <rmm/cuda_device.hpp> #include <rmm/cuda_stream_view.hpp> #include <rmm/detail/cuda_util.hpp> #include <rmm/detail/dynamic_load_runtime.hpp> #include <rmm/detail/error.hpp> #include <rmm/mr/device/device_memory_resource.hpp> #include <rmm/detail/thrust_namespace.h> #include <thrust/optional.h> #include <cuda_runtime_api.h> #include <cstddef> #include <limits> #if CUDART_VERSION >= 11020 // 11.2 introduced cudaMallocAsync #define RMM_CUDA_MALLOC_ASYNC_SUPPORT #endif namespace rmm::mr { /** * @brief `device_memory_resource` derived class that uses `cudaMallocAsync`/`cudaFreeAsync` for * allocation/deallocation. */ class cuda_async_view_memory_resource final : public device_memory_resource { public: #ifdef RMM_CUDA_MALLOC_ASYNC_SUPPORT /** * @brief Constructs a cuda_async_view_memory_resource which uses an existing CUDA memory pool. * The provided pool is not owned by cuda_async_view_memory_resource and must remain valid * during the lifetime of the memory resource. * * @throws rmm::runtime_error if the CUDA version does not support `cudaMallocAsync` * * @param valid_pool_handle Handle to a CUDA memory pool which will be used to * serve allocation requests. */ cuda_async_view_memory_resource(cudaMemPool_t valid_pool_handle) : cuda_pool_handle_{[valid_pool_handle]() { RMM_EXPECTS(nullptr != valid_pool_handle, "Unexpected null pool handle."); return valid_pool_handle; }()} { // Check if cudaMallocAsync Memory pool supported auto const device = rmm::detail::current_device(); int cuda_pool_supported{}; auto result = cudaDeviceGetAttribute(&cuda_pool_supported, cudaDevAttrMemoryPoolsSupported, device.value()); RMM_EXPECTS(result == cudaSuccess && cuda_pool_supported, "cudaMallocAsync not supported with this CUDA driver/runtime version"); } #endif #ifdef RMM_CUDA_MALLOC_ASYNC_SUPPORT /** * @brief Returns the underlying native handle to the CUDA pool * */ [[nodiscard]] cudaMemPool_t pool_handle() const noexcept { return cuda_pool_handle_; } #endif cuda_async_view_memory_resource() = default; cuda_async_view_memory_resource(cuda_async_view_memory_resource const&) = default; ///< @default_copy_constructor cuda_async_view_memory_resource(cuda_async_view_memory_resource&&) = default; ///< @default_move_constructor cuda_async_view_memory_resource& operator=(cuda_async_view_memory_resource const&) = default; ///< @default_copy_assignment{cuda_async_view_memory_resource} cuda_async_view_memory_resource& operator=(cuda_async_view_memory_resource&&) = default; ///< @default_move_assignment{cuda_async_view_memory_resource} /** * @brief Query whether the resource supports use of non-null CUDA streams for * allocation/deallocation. `cuda_memory_resource` does not support streams. * * @returns bool true */ [[nodiscard]] bool supports_streams() const noexcept override { return true; } /** * @brief Query whether the resource supports the get_mem_info API. * * @return true */ [[nodiscard]] bool supports_get_mem_info() const noexcept override { return false; } private: #ifdef RMM_CUDA_MALLOC_ASYNC_SUPPORT cudaMemPool_t cuda_pool_handle_{}; #endif /** * @brief Allocates memory of size at least `bytes` using cudaMalloc. * * The returned pointer has at least 256B alignment. * * @throws `rmm::bad_alloc` if the requested allocation could not be fulfilled * * @param bytes The size, in bytes, of the allocation * @return void* Pointer to the newly allocated memory */ void* do_allocate(std::size_t bytes, rmm::cuda_stream_view stream) override { void* ptr{nullptr}; #ifdef RMM_CUDA_MALLOC_ASYNC_SUPPORT if (bytes > 0) { RMM_CUDA_TRY_ALLOC(rmm::detail::async_alloc::cudaMallocFromPoolAsync( &ptr, bytes, pool_handle(), stream.value())); } #else (void)bytes; (void)stream; #endif return ptr; } /** * @brief Deallocate memory pointed to by \p p. * * @throws Nothing. * * @param p Pointer to be deallocated */ void do_deallocate(void* ptr, std::size_t, rmm::cuda_stream_view stream) override { #ifdef RMM_CUDA_MALLOC_ASYNC_SUPPORT if (ptr != nullptr) { RMM_ASSERT_CUDA_SUCCESS(rmm::detail::async_alloc::cudaFreeAsync(ptr, stream.value())); } #else (void)ptr; (void)stream; #endif } /** * @brief Compare this resource to another. * * @throws Nothing. * * @param other The other resource to compare to * @return true If the two resources are equivalent * @return false If the two resources are not equal */ [[nodiscard]] bool do_is_equal(device_memory_resource const& other) const noexcept override { return dynamic_cast<cuda_async_view_memory_resource const*>(&other) != nullptr; } /** * @brief Get free and available memory for memory resource * * @throws `rmm::cuda_error` if unable to retrieve memory info. * * @return std::pair contaiing free_size and total_size of memory */ [[nodiscard]] std::pair<std::size_t, std::size_t> do_get_mem_info( rmm::cuda_stream_view) const override { return std::make_pair(0, 0); } }; } // namespace rmm::mr
60b8e5aef2222f230564b7e7d7061c3a848fd1e8
fbf49ac1585c87725a0f5edcb80f1fe7a6c2041f
/SDK/Sub_Npc012_01_classes.h
f5305be8e10c4322d9539c28a0c1d64aa2142cf3
[]
no_license
zanzo420/DBZ-Kakarot-SDK
d5a69cd4b147d23538b496b7fa7ba4802fccf7ac
73c2a97080c7ebedc7d538f72ee21b50627f2e74
refs/heads/master
2021-02-12T21:14:07.098275
2020-03-16T10:07:00
2020-03-16T10:07:00
244,631,123
0
1
null
null
null
null
UTF-8
C++
false
false
2,305
h
Sub_Npc012_01_classes.h
#pragma once // Name: DBZKakarot, Version: 1.0.3 #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- // Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Sub_Npc012_01.Sub_Npc012_01_C // 0x0038 (0x04F8 - 0x04C0) class ASub_Npc012_01_C : public AQuestGeneral_BP_C { public: struct FPointerToUberGraphFrame UberGraphFrame; // 0x04C0(0x0008) (ZeroConstructor, Transient, DuplicateTransient) struct FName quest_id; // 0x04C8(0x0008) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) struct FName Sub_Npc012_01_Client; // 0x04D0(0x0008) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) TArray<struct FName> eventItemAccessPoints; // 0x04D8(0x0010) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance) bool canceled; // 0x04E8(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData00[0x7]; // 0x04E9(0x0007) MISSED OFFSET struct FName CrossTalkId; // 0x04F0(0x0008) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass Sub_Npc012_01.Sub_Npc012_01_C"); return ptr; } void UserConstructionScript(); void PhaseEvent(); void OnCancelSubQuest(); void OnCancelSubQuestTransition(); void OnAddedItem(const struct FName& ItemId); void OnOpenSimpleTalk(const struct FName& SimpleTalkId, const struct FName& messageId); void OnIngameBegan(); void ExecuteUbergraph_Sub_Npc012_01(int EntryPoint); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
290650ecdb3134191311db7146b823f3828fb76e
9fcad3b48ad1f7f945c4e1b92a72eae304f4c9c3
/Day 4/Peak Index in a Mountain Array.cpp
c8d1704fa833553bf61ef4adbc19e5e872f5114d
[]
no_license
Aayushi-25/DS-A-Assignments
03ef2efcd6b493fb38d1314160cb7f24d659c6e6
f95f0add9c074d8521377dbf6c199893f77ba62b
refs/heads/main
2023-06-13T04:44:19.669488
2021-07-05T18:44:02
2021-07-05T18:44:02
382,390,091
0
0
null
null
null
null
UTF-8
C++
false
false
493
cpp
Peak Index in a Mountain Array.cpp
class Solution { public: int peakIndexInMountainArray(vector<int>& arr) { int l=1, mid, pos; int h=arr.size()-2; while(l<=h) { mid=l+((h-l)/2); if(arr[mid-1]<arr[mid] && arr[mid+1]<arr[mid]) { pos=mid; break; } else if(arr[mid]>arr[mid-1]) l=mid+1; else h=mid-1; } return pos; } };
080f7d66a166f02996d882f7e2c311f8af5d1ac6
b93cda7e5d90fb5a84c24603619671c1767ba3dc
/pku/1160/5685594_AC_32MS_960K.cpp
6f6b2b760b5252c8bc2896e7fbf77965f317d005
[]
no_license
denofiend/acm
e7008ff49bf6bea0042dabf94bbae05ebc28fe8a
409910ca43c888c0e2734699f982ff67b6613699
refs/heads/master
2022-11-23T14:51:02.445949
2020-07-31T11:42:24
2020-07-31T11:42:24
284,022,401
0
0
null
null
null
null
UTF-8
C++
false
false
1,727
cpp
5685594_AC_32MS_960K.cpp
// // #include <iostream> #include <map> #include <set> #include <vector> #include <string> #include <math.h> #include <algorithm> #include <queue> using namespace std; template <class T> void out(T x, int n){ for(int i = 0; i < n; ++i) cout << x[i] << ' '; cout << endl; } template <class T> void out(T x, int n, int m){ for(int i = 0; i < n; ++i) out(x[i], m); cout << endl; } #define OUT(x) (cout << #x << " = " << x << endl) #define FOR(i, a, b) for(int i = (int)a; i < (int)b; ++i) #define REP(i, b) FOR(i, 0, b) #define FORD(i, a, b) for(int i = (int)a; i >= (int)b; --i) #include<iostream> #include<algorithm> using namespace std; int x[320]; int dp[320][32]; int f[320][320]; int s[320][320]; int main() { int i,j,k; int v,p; scanf("%d%d",&v,&p); for(i=1;i<=v;++i) scanf("%d",&x[i]); for(i=1;i<=v;++i) { for(j=i+1;j<=v;++j) { f[i][j]=0; int s=(i+j)/2; for(k=i;k<=j;++k) f[i][j]+=abs(x[s]-x[k]); } } memset(dp,-1,sizeof(dp)); for(i=1;i<=v;++i) { dp[i][1]=f[1][i]; s[i][1]=1; } for(j=2;j<=p;++j) { for(k=s[v][j-1];k<v;++k) { if(dp[v][j]==-1||dp[k][j-1]+f[k+1][v]<dp[v][j]) { dp[v][j]=dp[k][j-1]+f[k+1][v]; s[v][j]=k; } } for(i=v-1;i>0;--i) { for(k=s[i][j-1];k<=s[i+1][j];++k) if(dp[i][j]==-1||dp[k][j-1]+f[k+1][i]<dp[i][j]) { dp[i][j]=dp[k][j-1]+f[k+1][i]; s[i][j]=k; } } } printf("%d\n",dp[v][p]); return 0; }
67ef6106008b134ba97f464f52f8b7164f0a12d1
76a672b8c58de9f331278edfae8d27ee321b705e
/stack/max rectangle in binary matrix.cpp
147df69854375ce558a86ac444ff0f279405799b
[]
no_license
rishabhgoyal777/ds
b8e817a428929f07b7395e37c80c265c31416be9
7864a56447c018bf37e3d33d0a456615730b67e3
refs/heads/main
2023-06-24T17:22:52.154691
2021-07-23T08:06:44
2021-07-23T08:06:44
337,030,761
0
0
null
null
null
null
UTF-8
C++
false
false
2,843
cpp
max rectangle in binary matrix.cpp
vector<int> nextSmallerleft(int arr[], int n){ stack<int> s; vector<int> v; for(int i=0;i<n;i++){ if(s.empty()){ v.push_back(-1); s.push(i); } else{ if(arr[i] <= arr[s.top()]){ while(!s.empty() && arr[i] <= arr[s.top()]){ s.pop(); } if(s.empty()) v.push_back(-1); else v.push_back(s.top()); s.push(i); } else{ v.push_back(s.top()); s.push(i); } } } return v; } vector<int> nextSmallerright(int arr[], int n){ vector<int> v; stack<int> s; for(int i=n-1;i>=0;i--){ if(s.empty()){ v.push_back(n); s.push(i); } else{ if(arr[i] <= arr[s.top()]){ while(!s.empty() && arr[i] <= arr[s.top()]){ s.pop(); } if(s.empty()) v.push_back(n); else v.push_back(s.top()); s.push(i); } else{ v.push_back(s.top()); s.push(i); } } } reverse(v.begin(), v.end()); return v; } int getMaxArea(int arr[], int n){ vector<int> left=nextSmallerleft(arr,n); vector<int> right=nextSmallerright(arr,n); vector<int> width; int mx=0; int temp=0; for(int i=0;i<n;i++){ temp=(right[i]-left[i]-1)*arr[i]; mx=max(mx,temp); } return mx; } int maxArea(int M[MAX][MAX], int n, int m) { int temp=0; int ans=0; ans=getMaxArea(M[0],m); for(int i=1;i<n;i++){ for(int j=0;j<m;j++){ if(M[i][j]==1) M[i][j]=M[i-1][j]+1; else M[i][j]=0; } temp=getMaxArea(M[i],m); ans=max(ans,temp); } return ans; } // int mxhist(int a[], int n){ // stack<int> s; int i=0;int area,mx=0; // while(i<n){ // if(s.empty() || a[i]>=a[s.top()]){ // s.push(i); i++; // } // else{ // int p= s.top(); s.pop(); // area= a[p] *( s.empty()? i : i-s.top()-1); // mx=max(area,mx); // } // } // while(!s.empty()){ // int p= s.top(); s.pop(); // area= a[p] *( s.empty()? i : i-s.top()-1); // mx=max(area,mx); // // } // return mx; // } // // int maxArea(int M[MAX][MAX], int n, int m) { // int ans,maxans=0; // ans= mxhist(M[0],m); // maxans=max(ans,maxans); // for(int i=1;i<n;i++){ // for(int j=0;j<m;j++){ // if(M[i][j]==1) // M[i][j]=M[i-1][j]+1; // else M[i][j]=0;} // ans=mxhist(M[i],m); // maxans=max(ans,maxans); // } // return maxans;}
14f96ffec0145b9a1c63e77bf2182c2c422fd237
a88b6f2a3ff12b0a6d5842984ab6c1f68ef5d38b
/flasmo-2a/flasmo-2a/flasmo-2a/deck.h
c6faff10116bd068d3955b443bdd4cf3cec928a0
[]
no_license
rsmookler/Optimization_Methods
ab7bc83cecf93b10c0cfd12ef629f729c9662cb3
583a5a722d876dda0a8ede2c2b281f71e006ede2
refs/heads/master
2016-09-01T20:11:00.731634
2014-11-25T00:56:13
2014-11-25T00:56:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,136
h
deck.h
// Rob Smookler, Sean Flaherty // Project 2A //This file contains the class declaration for deck, //as well as its constructor (which creates a deck with //all 52 cards in order) and a print operator that prints //all cards in the deck. #include "d_nodel.h" class deck { public: deck(); //Constructor friend ostream& operator << (ostream& ostr, deck& d); //Print all cards in deck private: node<card>* front; //Pointer to first card in deck }; deck::deck() //Creates a deck with 52 cards. The order is as follows: //C(1-13), D(1-13), H(1-13), S(1-13). Each card is linked //to the next card in the deck. { //Front of the deck is initially set to null front = NULL; for(int x = 4; x >= 1; x--) { //Character to hold suit of a card char s; //Switch that decides the suit of a card based on iteration of outside loop switch (x) { case 1: s = 'c'; break; case 2: s = 'd'; break; case 3: s = 'h'; break; case 4: s = 's'; break; }//end switch for(int y = 13; y >= 1; y--) { //Create a card with the determined suit and value card c(y, s); //Add this card to the front of the deck and make it the new front node<card>* newCard = new node<card> (c, front); front = newCard; }//end for } //end for } //end deck ostream& operator << (ostream& ostr, deck& d) //For each card in the deck, add its suit and value to an output stream. //While the current card is linked to another, continue to iterate. //When no cards remain, the output stream is returned to be printed. { //Create a card node that starts at the front of the deck node<card>* curr = d.front; //While the current card has values, add it to the output and continue while(curr != NULL) { ostr << curr->nodeValue << "\n"; curr = curr -> next; } return ostr; }//end operator //End of header file.
2f2fe491f3ddc1b57caffd0321cd383ef04fa436
b53bdc4576f948e6066bbead8a93451fa1598726
/Luogu/ShengXuan/P4099.cpp
4a9a547a5a3a2f0e0706d5ccbef8f62e3a5e0b6a
[]
no_license
Clouder0/AlgorithmPractice
da2e28cb60d19fe7a99e9f3d1ba99810897244a4
42faedfd9eb49d6df3d8031d883784c3514a7e8b
refs/heads/main
2023-07-08T11:07:17.631345
2023-07-06T12:15:33
2023-07-06T12:15:33
236,957,049
0
0
null
null
null
null
UTF-8
C++
false
false
2,208
cpp
P4099.cpp
#include <cstdio> #include <algorithm> #include <cstring> using namespace std; const int maxn = 1100; int T, n; struct node { int to, next, val; } E[maxn << 1]; int head[maxn], tot; inline void addE(int x, int y, int z) { E[++tot].next = head[x], head[x] = tot, E[tot].to = y, E[tot].val = z; } const int mod = 1e9 + 7; inline int add(int x, int y) { int res = x + y; return res >= mod ? res - mod : res; } inline int mul(int x, int y) { return 1ll * x * y % mod; } int C[maxn][maxn]; int size[maxn], f[maxn][maxn], g[maxn]; void dfs(int u, int fa) { size[u] = 1, f[u][1] = 1; for(int p = head[u]; p; p = E[p].next) { int v = E[p].to; if (v == fa) continue; dfs(v, u); for (int i = 1; i <= size[u]; ++i) g[i] = 0; if (E[p].val) { for(int i = size[u]; i; --i) for(int k = 0; k <= size[v]; ++k) g[i + k] = add(g[i + k], mul(f[v][k], mul(f[u][i], mul(C[i + k - 1][k], C[size[u] + size[v] - i - k][size[v] - k])))); } else { for(int i = size[u]; i; --i) for(int k = 0; k <= size[v]; ++k) g[i + k] = add(g[i + k], mul(add(f[v][size[v]], mod - f[v][k]), mul(f[u][i], mul(C[i + k - 1][k], C[size[u] + size[v] - i - k][size[v] - k])))); } size[u] += size[v]; for(int i = 1;i<=size[u];++i) f[u][i] = g[i]; } for (int i = 1; i <= size[u]; ++i) f[u][i] = add(f[u][i], f[u][i - 1]); } int main() { scanf("%d", &T); C[0][0] = 1; for (int i = 1; i <= 1000; ++i) { C[i][0] = 1; for (int j = 1; j <= 1000; ++j) C[i][j] = add(C[i - 1][j], C[i - 1][j - 1]); } while(T--) { memset(f, 0, sizeof(f)); memset(head, 0, sizeof(head)); tot = 0; scanf("%d", &n); for (int i = 1, u, v; i < n; ++i) { char opt[3]; scanf("%d %s %d", &u, opt, &v); ++u, ++v; if (opt[0] == '<') addE(u, v, 0), addE(v, u, 1); else addE(u, v, 1), addE(v, u, 0); } dfs(1, 0); printf("%d\n", f[1][n]); } return 0; }
a4f2b367659a65c9bd1b2554933e4f3f78375149
c579423f9bf2a50bd4639501ff105bd5d81db597
/cpp_01/ex06/HumanB.hpp
ad9bb0b50d698998dee1510d3758ac5283661ebb
[]
no_license
alilin2508/42_cpp_piscine
ff1b817aa3ce91446bb6a995a54cc75c017e850e
c69b5046f4585bdc921848e6aeb02815b7db0aa1
refs/heads/master
2023-05-06T08:05:14.331994
2021-06-04T12:00:12
2021-06-04T12:00:12
357,240,660
0
0
null
null
null
null
UTF-8
C++
false
false
311
hpp
HumanB.hpp
#ifndef HUMANB_HPP # define HUMANB_HPP #include <iostream> #include <iomanip> #include <string> #include "Weapon.hpp" class HumanB { public: HumanB(std::string const &name); ~HumanB(); void setWeapon(Weapon const &weapon); void attack(); private: std::string name; Weapon const *weapon; }; #endif
34feb74653360816530e2e1a20d9a59115f01e62
35aacddb88021428045c09cf46b96484523442bd
/atcoder/Codefes17B/d3.cpp
2e6604108c26385603480ffc0eb21abf65c6f44d
[]
no_license
takuwwwo/Procon
87c82116188498edb4fc449eed71b7734143548a
2cae1ce423201a80a627d7f720afe9a23a66a238
refs/heads/master
2021-04-09T13:23:23.671236
2020-04-07T16:33:43
2020-04-07T16:33:43
125,596,652
0
0
null
null
null
null
UTF-8
C++
false
false
700
cpp
d3.cpp
#include<stdio.h> #include<vector> #include<algorithm> #include<string> #include<iostream> using namespace std; int dp[1000000]; int main() { int num; scanf("%d", &num); string s; cin >> s; s = "0" + s + "0"; for (int i = 1; i < s.size() - 1; i++) { dp[i + 1] = max(dp[i + 1], dp[i]); if (s[i - 1] == '1'&&s[i] == '0'&&s[i + 1] == '1') { int a = i - 1, b = i + 1; for (;;) { if (s[a] == '0')break; dp[i + 1] = max(dp[i + 1], dp[a - 1] + (i - a)); a--; } for (;;) { if (s[b] == '0')break; dp[b] = max(dp[b], dp[i - 2] + (b - i)); b++; } } } printf("%d\n", dp[s.size() - 1]); }
f69a9922fadb1e142aed7e8724e1070bb4e00672
9404da276ed7892cf512145af2acefde2500de81
/codeforces-solution/437c.cpp
f2852792fb0c377738900a509a0d4a1a6b9f41d3
[]
no_license
ankit0905/codeforces-hackerrank-solutions
e61cb64065ced0184a8b7c3596c228ad0b0742e2
d5bc51be22c6e0e24fced12e57f84d408b726eb1
refs/heads/master
2021-01-13T03:38:17.820667
2017-10-22T20:33:51
2017-10-22T20:33:51
77,300,030
2
1
null
2017-10-28T17:56:11
2016-12-24T20:59:25
C++
UTF-8
C++
false
false
1,449
cpp
437c.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <queue> #include <algorithm> using namespace std; #define ll long long int #define pii pair<int,int> #define pll pair<ll,ll> #define mp make_pair #define pb push_back #define fi first #define se second #define _cin ios_base::sync_with_stdio(0); cin.tie(0); #define all(x) (x).begin(), (x).end() #define INF 2147483647 #define SIZE 1000004 ll mod = 1000000007; int mat[1003][1003] = {0}; int tot[1003]={0}, fl[1003] = {0}; int main() { int n,m; cin >> n >> m; int val[n]; for(int i=1; i<=n; i++)cin >> val[i]; for(int i=0; i<m; i++){ int a,b; cin >> a >> b; mat[a][b] = mat[b][a] = 1; tot[a] += val[b]; tot[b] += val[a]; } int ans = 0; for(int i=1; i<=n; i++){ //cout << "i = " << i << " " << tot[i] << endl; } while(true){ int idx = -1, ma = -1; for(int i=1; i<=n; i++){ if(fl[i] == 1) continue; if(val[i] > ma){ ma = val[i]; idx = i; } else if(val[i] == ma && tot[i] < tot[ma]){ idx = i; } } //cout << idx << " " << ma << endl; if(ma == -1 || idx == -1) break; fl[idx] = 1; //cout << ma << " " << tot[idx] << " " << ans << endl; ans += tot[idx]; for(int i=1; i<=n; i++){ if(mat[idx][i] == 1){ tot[i] -= val[idx]; } } } cout << ans << endl; return 0; }
609198b1ed2ba7dac8359dd77d6e090d75331e4c
6df7c00ab1d309f769ea429719151add11d69f5e
/src/LCM/utils/mortar/Moertel_PnodeT.hpp
8ced0d7244f911ffe2e57e0e94ceea76dd950e89
[ "BSD-2-Clause" ]
permissive
yangyang14641/Albany
7e1af3c2f8d85686226aafad53b2aed25a1d8b3b
572de52e682e925998cad37fb195afb0c66db02c
refs/heads/master
2020-03-22T17:32:51.173450
2018-07-09T23:38:08
2018-07-09T23:38:08
140,401,192
4
0
null
null
null
null
UTF-8
C++
false
false
4,214
hpp
Moertel_PnodeT.hpp
//*****************************************************************// // Albany 3.0: Copyright 2016 Sandia Corporation // // This Software is released under the BSD license detailed // // in the file "license.txt" in the top-level Albany directory // //*****************************************************************// #ifndef MOERTEL_PROJECTNODET_HPP #define MOERTEL_PROJECTNODET_HPP #include <ctime> #include <iostream> #include <iomanip> #include "Moertel_NodeT.hpp" // ---------- User Defined Includes ---------- /*! \brief MOERTEL: namespace of the Moertel package The Moertel package depends on \ref Epetra, \ref EpetraExt, \ref Teuchos, \ref Amesos, \ref ML and \ref AztecOO:<br> Use at least the following lines in the configure of Trilinos:<br> \code --enable-moertel --enable-epetra --enable-epetraext --enable-teuchos --enable-ml --enable-aztecoo --enable-aztecoo-teuchos --enable-amesos \endcode */ namespace MoertelT { // forward declarations MOERTEL_TEMPLATE_STATEMENT class InterfaceT; MOERTEL_TEMPLATE_STATEMENT class SegmentT; /*! \class ProjectedNode \brief <b> A class to handle the projection of a node onto some segment </b> The \ref MOERTEL::ProjectedNode class supports the ostream& operator << \author Glen Hansen (gahanse@sandia.gov) */ MOERTEL_TEMPLATE_STATEMENT class ProjectedNodeT : public MoertelT::MOERTEL_TEMPLATE_CLASS(NodeT) { public: // @{ \name Constructors and destructor /*! \brief Constructor Constructs an instance of this class.<br> Note that this is \b not a collective call as nodes shall only have one owning process. \param basenode : the node this class is the projection of \param xi : local coordinates of the projection in the segment its projected onto \param pseg : Segment this projection is located in */ explicit ProjectedNodeT(const MoertelT::MOERTEL_TEMPLATE_CLASS(NodeT)& basenode, const double* xi, MoertelT::SEGMENT_TEMPLATE_CLASS(SegmentT)* pseg); /*! \brief Constructor (case of orthogonal projection only) Constructs an instance of this class.<br> Note that this is \b not a collective call as nodes shall only have one owning process. \param basenode : the node this class is the projection of \param xi : local coordinates of the projection in the segment its projected onto \param pseg : Segment this projection is located in \param orthseg : id of segment this projection is orthogonal to which might be different from pseg */ explicit ProjectedNodeT(const MoertelT::MOERTEL_TEMPLATE_CLASS(NodeT)& basenode, const double* xi, MoertelT::SEGMENT_TEMPLATE_CLASS(SegmentT)* pseg, int orthseg); /*! \brief Copy-Constructor */ ProjectedNodeT(MoertelT::MOERTEL_TEMPLATE_CLASS(ProjectedNodeT)& old); /*! \brief Destructor */ virtual ~ProjectedNodeT(); //@} // @{ \name Public members /*! \brief Print this ProjectedNode and its Node */ bool Print() const; /*! \brief Return view of the local coordinates of the projection in the segment */ double* Xi() { return xi_; } /*! \brief Return pointer to segment this projection is in */ MoertelT::SEGMENT_TEMPLATE_CLASS(SegmentT)* Segment() { return pseg_; } /*! \brief Return id of segment this projection is orthogonal to (might be different from \ref Segment() ) */ int OrthoSegment() { return orthseg_; } //@} protected: // don't want = operator ProjectedNodeT operator = (const MoertelT::MOERTEL_TEMPLATE_CLASS(ProjectedNodeT)& old); protected: double xi_[2]; // local coordinates of this projected node on pseg_; MoertelT::SEGMENT_TEMPLATE_CLASS(SegmentT)* pseg_; // segment this projected node is on int orthseg_; // id of segment this projection is orthogonal to // (used only in orth. projection, otherwise -1) }; } // namespace MOERTEL // << operator MOERTEL_TEMPLATE_STATEMENT std::ostream& operator << (std::ostream& os, const Moertel::MOERTEL_TEMPLATE_CLASS(ProjectedNodeT)& pnode); #ifndef HAVE_MOERTEL_EXPLICIT_INSTANTIATION #include "Moertel_PnodeT_Def.hpp" #endif #endif // MOERTEL_PROJECTNODE_H
cd28b2f1811496e0d5334572d612cb529a58160d
c47d0cfd87e34d00844a1ee3857306eeeedec304
/src/engine/filesystem.hpp
6a6e17fa4584ef5ae5ed9edaa08b5fa5aa72a5bc
[ "MIT" ]
permissive
Spirrwell/Mod-Engine
d2c8f859f3fdf4d33ae1108a9450a1732d03f0f3
9b9c7e3d6e14450d8a3f807bca8a9244f6e8b23d
refs/heads/master
2021-04-04T22:58:55.516913
2020-03-30T09:56:33
2020-03-30T09:56:33
248,499,086
2
0
null
null
null
null
UTF-8
C++
false
false
2,780
hpp
filesystem.hpp
#ifndef FILESYSTEM_HPP #define FILESYSTEM_HPP #include <filesystem> #include "memory.hpp" #include "enginesystem.hpp" #include "commandlinesystem.hpp" #include <fstream> #include <string> #include <vector> #include <unordered_map> #include <limits> class Mount; struct MountFileHandle { operator bool() const { return is_valid(); } bool is_valid() const { return ( file ); } FILE *file = nullptr; size_t start = 0; size_t end = 0; }; class FileSystem : public EngineSystem { public: void configure( Engine *engine ) override; void unconfigure( Engine *engine ) override; std::filesystem::path GetGameDir() const { return gameDir; } std::filesystem::path GetGameBinDir() const { return gameBinDir; } // This is FSearchPath in case we include windows headers which has a 'SearchPath' definition yuck struct FSearchPath { bool isMount() const { return mount.get() != nullptr; } std::filesystem::path abspath; std::string pathid; unique_ptr< Mount > mount; }; struct MountFindResult { operator bool() const { return is_valid(); } bool is_valid() const { return ( index != InvalidIndex() ); } size_t index = InvalidIndex(); static size_t constexpr InvalidIndex() { return std::numeric_limits< size_t >::max(); } }; struct FindResult { operator bool() const { return is_valid(); } bool is_valid() const { return ( searchPath && !relpath.empty() ); } FSearchPath *searchPath = nullptr; std::filesystem::path relpath; MountFindResult mountFindResult; }; // Reads the entire contents of a file to a buffer, returns false on failure and 'buffer' will be emptied bool ReadToBuffer( const std::filesystem::path &relpath, const std::string &pathid, std::vector< char > &buffer ); // Cheks if a file exists in our filesystem given a relative path bool Exists( const std::filesystem::path &relpath ) const; bool Exists( const std::filesystem::path &relpath, const std::string &pathid ) const; // Attempts to find an existing file in our filesystem and returns a "FindResult" with information about our findings given a relative path FindResult FindFile( const std::filesystem::path &relpath, const std::string &pathid ) const; // Mounts paths as search paths when looking up files in our filesystem void AddSearchPath( const std::filesystem::path &path, const std::string &pathid ); void AddSearchPathVPK( const std::filesystem::path &vpkpath, const std::string &pathid ); private: std::vector< FSearchPath* > GetAllUniqueSearchPaths() const; unique_ptr< Mount > LoadVPK( const std::filesystem::path &path ); std::unordered_map< std::string, std::vector< FSearchPath* > > searchPaths; // Maps path id to a search path std::filesystem::path gameDir; std::filesystem::path gameBinDir; }; #endif // FILESYSTEM_HPP
7314bef208c573edf306af40fc04e4e746d29162
3c84c1ba90a0161050a51589927033d82980d912
/modern_cpp/override_identifier.cpp
e1a894c30ddd5b9ffff70e854de12ffe59807cef
[ "MIT" ]
permissive
oceanwavechina/cpp_programming
ec3a7a87de5defabb1bba6410b018cd7fb0de678
ee66e56da0b8c9c89af1cdf59941dbb17d13ff04
refs/heads/master
2021-11-26T21:13:07.794193
2021-09-24T08:41:10
2021-09-24T08:41:10
180,057,812
0
0
null
null
null
null
UTF-8
C++
false
false
2,462
cpp
override_identifier.cpp
#include <iostream> #include <vector> #include <string> using namespace std; /* override 是一个标识符,不是一个关键字。 被 override 修饰的函数,编译器会检查确定重写了基类中的对应函数。 防止出现,我们想重写,但是因为类型传错了,反而新定义了一个新的函数 */ // c++ 03 class Dog { public: virtual void A(int) { cout << "Base Dog::A(int)" << endl; } virtual void B() const { cout << "Base Dog::B() const" << endl; } }; class YellowDog: public Dog { public: virtual void A(float) { // create a new function cout << "YellowDog::A(float)" << endl; } virtual void B() { // create a new function cout << "YellowDog::B()" << endl; } }; // c++ 11 class Cat { public: virtual void A(int) { cout << "Base Cat::A(int)" << endl; } virtual void B() const { cout << "Base Cat::B() const" << endl; } virtual void C() { cout << "Base Cat::C() const" << endl; } }; class BlueCat: public Cat { public: /* following functions will got compile error 因为我们指定了 override 关键字,但是基类中并没有对应的函数签名 */ // virtual void A(float) override { // cout << "BlueCat::A(float)" << endl; // } // virtual void B() { cout << "BlueCat::B()" << endl; } virtual void C() override { cout << "BulueCat::C() const" << endl; } }; int main(int argc, char const *argv[]) { Dog* p_base_dog = new Dog; p_base_dog->A(1); p_base_dog->B(); cout << endl; Dog* p_yellow_dog = new YellowDog; // 以下两个调用的都是基类的方法,因为子类签名变了,但是编译器确没有提示我们 p_yellow_dog->A(1); p_yellow_dog->B(); cout << endl; Cat* p_base_cat = new Cat; p_base_cat->A(1); p_base_cat->B(); cout << endl; Cat* p_cat = new BlueCat; p_cat->A(1); p_cat->B(); // 注意这里并没有调用 BlueCat 的 B() 函数,因为并没有重写:差了一个 const 导致签名不一样 p_cat->C(); // 这个调用的是子类的函数,因为签名一样,函数重写成功了 return 0; } /* Base Dog::A(int) Base Dog::B() const Base Dog::A(int) Base Dog::B() const Base Cat::A(int) Base Cat::B() const Base Cat::A(int) Base Cat::B() const BulueCat::C() const */
fae427b1ee84248ffba5b9af7bf4c6471256ff0c
d0ed215723b098cda9951a527829d2adcb265a42
/tipslabel.cpp
0a3c0324f7e46abc6abd28bc278d989f8d2daa2e
[]
no_license
ferv3455/Wargroove
0416aa3877b4a0b40ac33c581587815a0adadc1e
604a8a8cb2af3ec367ca64999bd4341b09ae7686
refs/heads/main
2023-07-17T13:21:16.303786
2021-09-12T15:43:41
2021-09-12T15:43:41
402,091,699
0
0
null
null
null
null
UTF-8
C++
false
false
1,082
cpp
tipslabel.cpp
#include "tipslabel.h" #include <QFontDatabase> TipsLabel::TipsLabel(const QString &text, QWidget *parent) : QLabel(parent), m_nOpacity(500) { // Formatting QFont font(QFontDatabase::applicationFontFamilies(0).at(0), 16, QFont::Normal); setFont(font); setFixedHeight(80); setMargin(20); // Initialize timer m_timer = new QTimer(this); connect(m_timer, &QTimer::timeout, this, &TipsLabel::updateBackground); // Popup label popup(text); } void TipsLabel::popup(const QString &text) { setText(text); m_nOpacity = 500; updateBackground(); show(); m_timer->start(30); } void TipsLabel::updateBackground() { if (m_nOpacity <= 0) { hide(); m_timer->stop(); return; } m_nOpacity -= 10; if (m_nOpacity > 250) { setStyleSheet("color:rgba(255,255,255,255); background-color:rgba(45,45,45,255);"); } else { setStyleSheet(QString("color:rgba(255,255,255,%1); background-color:rgba(45,45,45,%1);").arg(QString::number(m_nOpacity))); } }
cb80f311cf225eccb4ef9d4744c7b16bf217f324
332e0c3c2189c73c51a9422ab4f9e07ed7d5134e
/10161.cpp
573e53a63a3d3b9fb60c87e8eb89cda7ae05c03f
[]
no_license
ksaveljev/UVa-online-judge
352a05c9d12440337c2a0ba5a5f1c8aa1dc72357
006961a966004f744f5780a6a81108c0b79c3c18
refs/heads/master
2023-05-24T23:08:48.502908
2023-05-16T10:37:37
2023-05-16T10:37:37
1,566,701
112
80
null
2017-01-10T14:55:46
2011-04-04T11:43:53
C++
UTF-8
C++
false
false
698
cpp
10161.cpp
#include <iostream> #include <cmath> using namespace std; int main(void) { int n; while (cin >> n) { if (n == 0) break; int tmp = sqrt(n); int left = n - tmp * tmp; if (tmp % 2 == 0) { if (tmp * tmp == n) { cout << tmp << " 1" << endl; } else { if (left < tmp + 1) { cout << tmp + 1 << " " << left << endl; } else { cout << tmp+1 - (left - tmp - 1) << " " << tmp + 1 << endl; } } } else { if (tmp * tmp == n) { cout << "1 " << tmp << endl; } else { if (left < tmp + 1) { cout << left << " " << tmp + 1 << endl; } else { cout << tmp + 1 << " " << tmp + 1 - (left - tmp - 1) << endl; } } } } return 0; }
0d0194dce719deb95bd4221f1afca34d2ff7146e
711561384157a2918cb83437daf4ac223b9ff97b
/src/capnzerowrapper.cpp
b7c89b691fb51bc9faa61191481571e26e879ee0
[]
no_license
alica-labs/capnzerowrapper
49d28e4836bdb6fdadd8f65eb3233cda5676bb2e
5401c3ac99164954e90bb0cf885a33aaca35f96e
refs/heads/master
2022-09-21T07:36:50.348462
2019-09-24T11:27:35
2019-09-24T11:27:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
999
cpp
capnzerowrapper.cpp
// // Created by link9 on 02.07.19. // #include <iostream> #include <capnzero/CapnZero.h> #include <zmq.h> #include <thread> #include "capnzerowrapper.h" bool running = true; void recv_msg(void* socket) { while(running) { std::cout << "received: " << receiveSerializedMessage(socket, capnzero::Protocol::UDP) << std::endl; } } int main(int argc, char** argv) { void* ctx = zmq_ctx_new(); // sub void* sub_socket = zmq_socket(ctx, ZMQ_DISH); int timeout(500); zmq_setsockopt(sub_socket, ZMQ_RCVTIMEO, &timeout, sizeof(timeout)); zmq_join(sub_socket, "MCGroup"); zmq_bind(sub_socket, "udp://224.0.0.1:5555"); std::thread* t = new std::thread(&recv_msg, sub_socket); t->join(); // pub void* socket = zmq_socket(ctx, ZMQ_RADIO); zmq_connect(socket, "udp://224.0.0.1:5555"); sendMessage(socket, capnzero::Protocol::UDP, "MCGroup", "Hello World man!"); std::cout << "sent \"Hello World man!\"" << std::endl; return 0; }
937b68252efce425bd5a0e38124d00a573377223
19a0062318a7a0d98b69396ac139387e2520ce9e
/Public Files/OctreeNode.cpp
d30856f48a9433726bedc416601e1a8ddd7906a0
[]
no_license
WestonJMarshall/Full-Tiltadillo-Public-Files
1d0e191ab0200feb81275a0eb3e5a8d9666f42e7
5c61fb7b0b127481bbb03e09f4c50c3c13d5648e
refs/heads/main
2023-02-02T19:47:11.805127
2020-12-19T21:11:02
2020-12-19T21:11:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,852
cpp
OctreeNode.cpp
#include "OctreeNode.h" using namespace Simplex; /////////////////////////////////////// //constructor and the big 3 list<int> OctreeNode::OctantIdList; OctreeNode::OctreeNode(int subdivisionLevelIn, vector3 maxCoordinatesIn, vector3 minCoordinatesIn) { subdivisionLevel = subdivisionLevelIn; maxCoordinates = maxCoordinatesIn; minCoordinates = minCoordinatesIn; widthSizes = ((maxCoordinates - minCoordinates) / 2); entityArraySize = 0; m_mEntityArray = nullptr; m_pMeshMngr = MeshManager::GetInstance(); //gets a valid ID as no ID will be size of list octantID = OctantIdList.size(); OctantIdList.push_back(octantID); } OctreeNode::OctreeNode(OctreeNode const& a_pOther) { subdivisionLevel = a_pOther.subdivisionLevel; maxCoordinates = a_pOther.maxCoordinates; minCoordinates = a_pOther.minCoordinates; //copies tree nodes for (int i = 0; i < 8; i++) { octreeNodeArray.push_back(a_pOther.octreeNodeArray.at(i)); } //copies entity list if (a_pOther.m_mEntityArray != nullptr) { m_mEntityArray = new PEntity[a_pOther.entityArraySize]; for (int i = 0; i < a_pOther.entityArraySize; i++) { m_mEntityArray[i] = a_pOther.m_mEntityArray[i]; } entityArraySize = a_pOther.entityArraySize; } } OctreeNode& OctreeNode::operator=(OctreeNode const& a_pOther) { return *this; } OctreeNode::~OctreeNode(void) { for (int i = octreeNodeArray.size() - 1; i >= 0; i--) { delete octreeNodeArray.at(i); octreeNodeArray.pop_back(); } delete[] m_mEntityArray; m_mEntityArray = nullptr; m_pMeshMngr = nullptr; OctantIdList.remove(octantID);//free up ID } //////////////////////////////////////// /* * To be called in MyEntityManager's Update * * Will check if all nodes are in root node and resize if needed, * move entities to correct node as entity moves, * and subdivide further if a node gets too many entities. */ void Simplex::OctreeNode::UpdateTree(int maxLevel) { //checks to see if any entity is out of bounds in root node. //If so, we need to remake entire tree in a new larger size. if (subdivisionLevel == 0) { for (int i = 0; i < entityArraySize; i++) { if (!IsEntityInBoundary(m_mEntityArray[i])) { RecreateTree(m_mEntityArray, entityArraySize, maxLevel); //tree is remade and so we don't need to continue with rest of code return; } } } //adds/removes entities to and from subnodes for (int i = entityArraySize -1; i >= 0; i--) { if (m_mEntityArray[i]->GetRigidBody()->GetGravity()) { for (int nodeIndex = 0; nodeIndex < octreeNodeArray.size(); nodeIndex++) { //entity thinks it is in subnode but actually is not in the subnode if (m_mEntityArray[i]->IsInDimension(octreeNodeArray[nodeIndex]->octantID) && !octreeNodeArray[nodeIndex]->IsEntityInBoundary(m_mEntityArray[i])) { octreeNodeArray[nodeIndex]->RemoveEntity( octreeNodeArray[nodeIndex]->GetEntityIndex(m_mEntityArray[i]->GetUniqueID())); //subnode doesn't have enough entities to have subdivisions //so clear the subnode's subnode list if (octreeNodeArray[nodeIndex]->entityArraySize < 3) { octreeNodeArray[nodeIndex]->ClearSubnodes(); } } //entity thinks it is not in subnode but actually is in the subnode else if (!m_mEntityArray[i]->IsInDimension(octreeNodeArray[nodeIndex]->octantID) && octreeNodeArray[nodeIndex]->IsEntityInBoundary(m_mEntityArray[i])) { octreeNodeArray[nodeIndex]->AddEntity(m_mEntityArray[i]); //subnode has too many entities so clear the subnode's subnode list //so we can subdivide further if needed if (octreeNodeArray[nodeIndex]->entityArraySize > 2) { octreeNodeArray[nodeIndex]->ClearSubnodes(); } } } } } //repeat for subnodes so they can check to see if entity moved around inside them //within their own subnodes for (int nodeIndex = 0; nodeIndex < octreeNodeArray.size(); nodeIndex++) { //if subnode has more than 2 entities but no subdivisions, subdivide if (octreeNodeArray[nodeIndex]->entityArraySize > 2 && octreeNodeArray[nodeIndex]->octreeNodeArray.size() == 0) { octreeNodeArray[nodeIndex]->CreateSubdivisions(maxLevel); } octreeNodeArray[nodeIndex]->UpdateTree(maxLevel); } } /* * Will try to subdivide if it is a leaf node but if not, then it'll have the 8 nodes attempt to subdivide instead. */ void OctreeNode::CreateSubdivisions(int targetLevel) { //if (octantID == 0) { // for (int i = 0; i < entityArraySize; i++) { // //clears the dimensions at root node so the entities gets new updated value of what octant they are in // m_mEntityArray[i]->ClearDimensionSet(); // } //} for (int i = 0; i < entityArraySize; i++) { //tells entities what octant it is in m_mEntityArray[i]->AddDimension(octantID); } //if the current node is the target level, ends the recursion and delete subnodes since this is the new leaf node // // Was testing code to make octree subdivide on its own to min octant but was slow // || (targetLevel == -1 && subdivisionLevel <= 3 && entityArraySize <= 3) if (subdivisionLevel == targetLevel) { ClearSubnodes(); return; } //if this is a leaf node, attempt to create subdivisions to reach targetLevel if (octreeNodeArray.size() == 0) { //if greater than 1, we do have to subdivide into 8 more sections if (entityArraySize > 1) { //new bounding size of node //does bottom first in counterclockwise fashion and then top nodes //remember, I add widthSize to the end of the max parameter so (min+minwidth ) + mindwidth = max //It is messy looking but as simple as I can do for now octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, minCoordinates + widthSizes, minCoordinates)); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y, minCoordinates.z) + widthSizes, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y, minCoordinates.z))); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y, minCoordinates.z + widthSizes.z) + widthSizes, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y, minCoordinates.z + widthSizes.z))); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x, minCoordinates.y, minCoordinates.z + widthSizes.z) + widthSizes, vector3(minCoordinates.x, minCoordinates.y, minCoordinates.z + widthSizes.z))); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x, minCoordinates.y + widthSizes.y, minCoordinates.z) + widthSizes, vector3(minCoordinates.x, minCoordinates.y + widthSizes.y, minCoordinates.z))); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y + widthSizes.y, minCoordinates.z) + widthSizes, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y + widthSizes.y, minCoordinates.z))); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y + widthSizes.y, minCoordinates.z + widthSizes.z) + widthSizes, vector3(minCoordinates.x + widthSizes.x, minCoordinates.y + widthSizes.y, minCoordinates.z + widthSizes.z))); octreeNodeArray.push_back(new OctreeNode(subdivisionLevel + 1, vector3(minCoordinates.x, minCoordinates.y + widthSizes.y, minCoordinates.z + widthSizes.z) + widthSizes, vector3(minCoordinates.x, minCoordinates.y + widthSizes.y, minCoordinates.z + widthSizes.z))); //checks to see if entity is colliding with node and if so, add it to the node's list for (int nodeIndex = 0; nodeIndex < 8; nodeIndex++) { for (int entityIndex = 0; entityIndex < entityArraySize; entityIndex++) { //will not add entity if it isn't inside this node if (octreeNodeArray[nodeIndex]->IsEntityInBoundary(m_mEntityArray[entityIndex])) { //attempts to add the entity to the subnode octreeNodeArray[nodeIndex]->AddEntity(m_mEntityArray[entityIndex]); } } } for (int i = 0; i < octreeNodeArray.size(); i++) { octreeNodeArray[i]->CreateSubdivisions(targetLevel); } } } //if it is not a leaf node, then have the subnodes try to subdivide to targetLevel else { for (int i = 0; i < octreeNodeArray.size(); i++) { octreeNodeArray[i]->CreateSubdivisions(targetLevel); } } } void OctreeNode::AddToRenderList(bool a_bOutline, int octantIdToOutline) { if (octantIdToOutline == -1 || octantIdToOutline == octantID) { //shows outline if (a_bOutline) { m_pMeshMngr->AddWireCubeToRenderList(glm::translate(IDENTITY_M4, minCoordinates + widthSizes) * glm::scale(widthSizes * 2.0f), C_RED); } } for (int i = 0; i < octreeNodeArray.size(); i++) { octreeNodeArray[i]->AddToRenderList(a_bOutline, octantIdToOutline); } } bool OctreeNode::IsEntityInBoundary(MyEntity* entityToCheck) { vector3 entityCenter = entityToCheck->GetRigidBody()->GetCenterGlobal(); vector3 entityHalfWidth = entityToCheck->GetRigidBody()->GetHalfWidth(); //we are in a way, expanding out the boundary of this node by the entity's halfwidth so we can //check for entities whose rigibodies barely makes it inside the node's boundary. if ((entityCenter.x > minCoordinates.x - entityHalfWidth.x && entityCenter.x < maxCoordinates.x + entityHalfWidth.x) && (entityCenter.y > minCoordinates.y - entityHalfWidth.y && entityCenter.y < maxCoordinates.y + entityHalfWidth.y) && (entityCenter.z > minCoordinates.z - entityHalfWidth.z && entityCenter.z < maxCoordinates.z + entityHalfWidth.z)) { return true; } return false; } /* * Code is nearly the same as the AddEntity method in MyEntityManager.cpp * Only this time we pass in a pointer to the entity as it is already made in MyEntityManager * * Entities added gets added to all subnodes that it is inside of so we do not need to remake all nodes. */ void OctreeNode::AddEntity(MyEntity* entityToAdd) { //entity is being added to tell it what octant it just got in entityToAdd->AddDimension(octantID); //Create a temporal entity to store the object MyEntity* pTemp = entityToAdd; //if entity exists if (pTemp->IsInitialized()) { //create a new temp array with one extra entry PEntity* tempArray = new PEntity[entityArraySize + 1]; //start from 0 to the current count uint uCount = 0; for (uint i = 0; i < entityArraySize; ++i) { tempArray[uCount] = m_mEntityArray[i]; ++uCount; } tempArray[uCount] = pTemp; //if there was an older array delete if (m_mEntityArray) { delete[] m_mEntityArray; } //make the member pointer the temp pointer m_mEntityArray = tempArray; //add one entity to the count ++entityArraySize; //now has subnodes attempt to add the entity for (int i = 0; i < octreeNodeArray.size(); i++) { if (octreeNodeArray[i]->IsEntityInBoundary(entityToAdd)) { octreeNodeArray[i]->AddEntity(entityToAdd); } } } } /* * Removes entity from this node any any subnode * And tells entity to forget this node in its dimension list */ void OctreeNode::RemoveEntity(uint a_uIndex) { //if the list is empty or index is -1 return if (entityArraySize == 0 || a_uIndex == -1) return; // if out of bounds choose the last one if (a_uIndex >= entityArraySize) a_uIndex = entityArraySize - 1; // if the entity is not the very last we swap it for the last one if (a_uIndex != entityArraySize - 1) { std::swap(m_mEntityArray[a_uIndex], m_mEntityArray[entityArraySize - 1]); } PEntity tempEntity = m_mEntityArray[entityArraySize - 1]; tempEntity->RemoveDimension(octantID); //create a new temp array with one less entry PEntity* tempArray = new PEntity[entityArraySize - 1]; //start from 0 to the current count for (uint i = 0; i < entityArraySize - 1; ++i) { tempArray[i] = m_mEntityArray[i]; } //if there was an older array delete if (m_mEntityArray) { delete[] m_mEntityArray; } //make the member pointer the temp pointer m_mEntityArray = tempArray; --entityArraySize; //repeat removal for every subnode if the entity thinks it is still in it //even though it is not in this main node for (int nodeIndex = 0; nodeIndex < octreeNodeArray.size(); nodeIndex++) { for (int i = entityArraySize - 1; i >= 0; i--) { if (m_mEntityArray[i]->IsInDimension(octreeNodeArray[nodeIndex]->octantID)) { octreeNodeArray[nodeIndex]->RemoveEntity(GetEntityIndex(tempEntity->GetUniqueID())); } } } } /* * Deletes all subnodes */ void OctreeNode::ClearSubnodes() { for (int i = octreeNodeArray.size() - 1; i >= 0; i--) { delete octreeNodeArray.at(i); octreeNodeArray.pop_back(); } } /* * finds entity index in this node */ int OctreeNode::GetEntityIndex(String a_sUniqueID) { //look one by one for the specified unique id for (uint uIndex = 0; uIndex < entityArraySize; ++uIndex) { if (a_sUniqueID == m_mEntityArray[uIndex]->GetUniqueID()) return uIndex; } //if not found return -1 return -1; } /* * To be called when an entity is removed */ void OctreeNode::RecreateTree(PEntity* m_mEntityArrayIn, int arraySize, int targetLevel) { //sets array of all entities for this node for (int i = octreeNodeArray.size() - 1; i >= 0; i--) { delete octreeNodeArray.at(i); octreeNodeArray.pop_back(); } m_mEntityArray = m_mEntityArrayIn; entityArraySize = arraySize; //reset octree size to start at first entity coordinates if (m_mEntityArray[0] != NULL) { maxCoordinates = minCoordinates = m_mEntityArray[0]->GetRigidBody()->GetCenterGlobal(); } // Resize this root node to fit all entities that this holds before subdividing more if needed // Subnodes will not call this method and instead are just perfect octants of parent node. for (int entityIndex = 0; entityIndex < arraySize; entityIndex++) { //adds root node to entity after resetting dimensions m_mEntityArray[entityIndex]->ClearDimensionSet(); m_mEntityArray[entityIndex]->AddDimension(octantID); vector3 entityVect = m_mEntityArray[entityIndex]->GetRigidBody()->GetCenterGlobal(); maxCoordinates = vector3( glm::max(maxCoordinates.x, entityVect.x), glm::max(maxCoordinates.y, entityVect.y), glm::max(maxCoordinates.z, entityVect.z)); minCoordinates = vector3( glm::min(minCoordinates.x, entityVect.x), glm::min(minCoordinates.y, entityVect.y), glm::min(minCoordinates.z, entityVect.z)); } //enclose a slightly larger area to reduce needing to remake tree later if objects move vector3 extraSize = vector3(10, 10, 10); minCoordinates -= extraSize; maxCoordinates += extraSize; widthSizes = ((maxCoordinates - minCoordinates) / 2); CreateSubdivisions(targetLevel); } int Simplex::OctreeNode::OctreeSize(void) { return OctantIdList.size(); }
61e8b2e74a624c475fa60caa17a8cf7922637406
d5a8c6bfc9258d1f4533946a0afd83eeb62b6232
/图像灰度的分段线性拉伸.cpp
ca0cbab615bfd955183a879bc1c118314e2a4c07
[]
no_license
BestBlade/Divided_Linear_Strength
b9747ea17a1713dc5eb2ec35460af38054deee1e
bdb09a86e7440cbcb9a81848bbcd143642ca64d1
refs/heads/main
2022-12-29T23:01:29.693967
2020-10-16T01:21:38
2020-10-16T01:21:38
304,486,757
0
0
null
null
null
null
UTF-8
C++
false
false
1,534
cpp
图像灰度的分段线性拉伸.cpp
#include <iostream> #include<opencv2/core/core.hpp> #include<opencv2/highgui/highgui.hpp> #include"opencv2/imgproc/imgproc.hpp" #include <stdio.h> using namespace std; using namespace cv; int matchArray(float array[], float target) { float val = 500; for (int i = 0; i < 256; i++) { float temp = abs(array[i] - target); if (val >= temp) { val = temp; continue; } else { return i; } } return -1; } Mat dividedLinearStrength(Mat img) { int img_cnt[256] = { 0 }; for (int x = 0; x < img.rows; x++) { for (int y = 0; y < img.cols; y++) { img_cnt[img.at<uchar>(x, y)]++; } } float img_cdf[256] = { 0 }; for (int i = 0; i < 256; i++) { img_cdf[i] = img_cnt[i] / float(img.rows * img.cols); if (i == 0) { continue; } img_cdf[i] += img_cdf[i - 1]; } int start = matchArray(img_cdf, 0.05); int end = matchArray(img_cdf, 0.95); Mat res(img.rows, img.cols, img.type()); for (int x = 0; x < res.rows; x++) { for (int y = 0; y < res.cols; y++) { if (img.at<uchar>(x, y) < start) { res.at<uchar>(x, y) = 0; } else if (img.at<uchar>(x, y) >= end) { res.at<uchar>(x, y) = 255; } else { res.at<uchar>(x, y) = (img.at<uchar>(x, y) - start) * 243 / (end - start) + 1; } } } return res; } int main() { Mat img = imread("C://Users//Chrysanthemum//Desktop//1.png",0); Mat res = dividedLinearStrength(img); // // imshow("origin pic", img); imshow("result pic", res); waitKey(); }
cbf254702199e1c5ea0a0f2985c918bec2709c90
05159e869e4b457d78a6f3bc75424557e74d3c23
/google_code_jam/2015_google_code_jam/qualification_round/C/main.cpp
084d3c582a1f70a45b5b546e53d95b9f82d246e8
[]
no_license
yuliy/sport_programming
71b1c15939540561528e4d29eed8d2d90669b54c
758a3497adaf314a69f7a8a0d0ffd3f9a0f3f2aa
refs/heads/master
2023-06-23T05:14:26.548770
2023-06-14T22:32:17
2023-06-14T22:32:17
64,036,584
2
0
null
null
null
null
UTF-8
C++
false
false
4,612
cpp
main.cpp
#include <stdio.h> #include <iostream> #include <vector> #include <deque> #include <cstring> #include <string> #include <map> #include <set> #include <list> #include <algorithm> using namespace std; static const bool DBG = false; static const int MAXSZ = 10001; struct TQuat { static const int E = 0; static const int I = 1; static const int J = 2; static const int K = 3; bool Minus; int Value; TQuat() : Minus(false), Value(E) {} TQuat(bool minus, int val) : Minus(minus), Value(val) {} explicit TQuat(char ch) : Minus(false) { switch(ch) { case 'i': Value = TQuat::I; break; case 'j': Value = TQuat::J; break; case 'k': Value = TQuat::K; break; default: throw string("TQuat char initialization failed!"); } } bool operator==(const TQuat& other) const { return (Minus == other.Minus) && (Value == other.Value); } }; std::ostream& operator<<(std::ostream& os, const TQuat& q) { if (q.Minus) { os << "-"; } switch (q.Value) { case TQuat::E: { os << "1"; } break; case TQuat::I: { os << "i"; } break; case TQuat::J: { os << "j"; } break; case TQuat::K: { os << "k"; } break; } return os; } static TQuat Product(int a, int b) { switch (a) { case TQuat::E: { switch (b) { case TQuat::E: return TQuat(false, TQuat::E); case TQuat::I: return TQuat(false, TQuat::I); case TQuat::J: return TQuat(false, TQuat::J); case TQuat::K: return TQuat(false, TQuat::K); } } break; case TQuat::I: { switch (b) { case TQuat::E: return TQuat(false, TQuat::I); case TQuat::I: return TQuat(true, TQuat::E); case TQuat::J: return TQuat(false, TQuat::K); case TQuat::K: return TQuat(true, TQuat::J); } } break; case TQuat::J: { switch (b) { case TQuat::E: return TQuat(false, TQuat::J); case TQuat::I: return TQuat(true, TQuat::K); case TQuat::J: return TQuat(true, TQuat::E); case TQuat::K: return TQuat(false, TQuat::I); } } break; case TQuat::K: { switch (b) { case TQuat::E: return TQuat(false, TQuat::K); case TQuat::I: return TQuat(false, TQuat::J); case TQuat::J: return TQuat(true, TQuat::I); case TQuat::K: return TQuat(true, TQuat::E); } } break; } throw string("Product calculation failed!"); } static TQuat Product(TQuat a, TQuat b) { TQuat res = Product(a.Value, b.Value); if ((a.Minus && !b.Minus) || (!a.Minus && b.Minus)) { res.Minus = !res.Minus; } return res; } // Precomp[i][j] is a product of [si, sj) TQuat Precomp[MAXSZ][MAXSZ]; static void CalcPrecomp(const string& s) { const int sz = s.size(); if (DBG) { cout << "sz=" << sz << endl; } vector<TQuat> seq; for (auto ch : s) { seq.push_back(TQuat(ch)); } for (int i = 0; i <= sz; ++i) { Precomp[i][i] = TQuat(false, TQuat::E); } for (int i = 0; i <= sz; ++i) { for (int j = i + 1; j <= sz; ++j) { Precomp[i][j] = Product(Precomp[i][j-1], seq[j-1]); if (DBG) { cout << "(" << i << ";" << j << "): " << Precomp[i][j] << endl; } } } } static void ExtendString(string& s, int X) { string tmp = s; for (int i = 1; i < X; ++i) { s += tmp; } } // Intervals: // [0; d1) // [d1; d2) // [d2; sz) static bool CanSplit(const string& s, int d1, int d2, int sz) { const TQuat& v1 = Precomp[0][d1]; const TQuat& v2 = Precomp[d1][d2]; const TQuat& v3 = Precomp[d2][sz]; if (DBG) { cout << "\tcurrent: " << v1 << " " << v2 << " " << v3 << endl; } return (v1 == TQuat(false, TQuat::I)) && (v2 == TQuat(false, TQuat::J)) && (v3 == TQuat(false, TQuat::K)); } static bool CanSplit(const string& s) { const int sz = s.size(); for (int d1 = 1; d1 < (sz-1); ++d1) { for (int d2 = d1 + 1; d2 < (sz-0); ++d2) { if (CanSplit(s, d1, d2, sz)) return true; } } return false; } static string SolveSingleCase() { int L, X; scanf("%d %d", &L, &X); string s; cin >> s; ExtendString(s, X); CalcPrecomp(s); return CanSplit(s) ? "YES" : "NO"; } int main() { int numberOfTests = 0; cin >> numberOfTests; for (int i = 1; i <= numberOfTests; ++i) { cout << "Case #" << i << ": " << SolveSingleCase() << endl; } return 0; }
d294e24a67e9cb61e6aa05a00d9184184393f9b7
cde07033bb41d4a15e5cdb41faed66baabc4aa06
/karabiner-elements-extra-tools/hid_system_client/hid_system_client.hpp
c8fe9daee29e091fe98541c3148b14217d555ab5
[]
no_license
Mathuv/Files
584eeb0fe11caa76f37dae8f0cac242f199dd1fd
3ff5b7f9f83cda596bbd7edb6915108759da9aa6
refs/heads/master
2020-06-14T17:14:00.924450
2019-05-19T11:13:11
2019-05-19T11:13:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,275
hpp
hid_system_client.hpp
#pragma once #include <IOKit/hidsystem/IOHIDParameter.h> #include <IOKit/hidsystem/IOHIDShared.h> #include <optional> #include <pqrs/osx/iokit_service_monitor.hpp> class hid_system_client final : pqrs::dispatcher::extra::dispatcher_client { public: // Signals (invoked from the shared dispatcher thread) nod::signal<void(std::optional<bool>)> caps_lock_state_changed; // Methods hid_system_client(const hid_system_client&) = delete; // Note: // OS X shares IOHIDSystem among all input devices even the serial_number of IOHIDSystem is same with the one of the input device. // // Example: // The matched_callback always contains only one IOHIDSystem even if the following devices are connected. // * Apple Internal Keyboard / Track // * HHKB-BT // * org.pqrs.driver.VirtualHIDKeyboard // // The IOHIDSystem object's serial_number is one of the connected devices. // // But the IOHIDSystem object is shared by all input devices. // Thus, the IOHIDGetModifierLockState returns true if caps lock is on in one device. hid_system_client(void) : dispatcher_client(), caps_lock_state_check_timer_(*this) { if (auto matching_dictionary = IOServiceNameMatching(kIOHIDSystemClass)) { service_monitor_ = std::make_unique<pqrs::osx::iokit_service_monitor>(weak_dispatcher_, matching_dictionary); service_monitor_->service_matched.connect([this](auto&& registry_entry_id, auto&& service_ptr) { close_connection(); // Use the last matched service. open_connection(service_ptr); }); service_monitor_->service_terminated.connect([this](auto&& registry_entry_id) { close_connection(); // Use the next service service_monitor_->async_invoke_service_matched(); }); service_monitor_->async_start(); CFRelease(matching_dictionary); } } virtual ~hid_system_client(void) { detach_from_dispatcher([this] { caps_lock_state_check_timer_.stop(); close_connection(); service_monitor_ = nullptr; }); } void async_start_caps_lock_check_timer(std::chrono::milliseconds interval) { enqueue_to_dispatcher([this, interval] { last_caps_lock_state_ = std::nullopt; caps_lock_state_check_timer_.start( [this] { auto s = get_modifier_lock_state(kIOHIDCapsLockState); if (last_caps_lock_state_ != s) { last_caps_lock_state_ = s; enqueue_to_dispatcher([this, s] { caps_lock_state_changed(s); }); } }, interval); }); } void async_set_caps_lock_state(bool state) { enqueue_to_dispatcher([this, state] { set_modifier_lock_state(kIOHIDCapsLockState, state); }); } private: // This method is executed in the dispatcher thread. void open_connection(pqrs::osx::iokit_object_ptr s) { if (!connect_) { service_ = s; io_connect_t c; pqrs::osx::iokit_return r = IOServiceOpen(*service_, mach_task_self(), kIOHIDParamConnectType, &c); if (r) { connect_ = c; } } } // This method is executed in the dispatcher thread. void close_connection(void) { if (connect_) { IOServiceClose(*connect_); connect_.reset(); } service_.reset(); } // This method is executed in the dispatcher thread. std::optional<bool> get_modifier_lock_state(int selector) { if (!connect_) { return std::nullopt; } bool state = false; pqrs::osx::iokit_return r = IOHIDGetModifierLockState(*connect_, selector, &state); if (!r) { return std::nullopt; } return state; } // This method is executed in the dispatcher thread. void set_modifier_lock_state(int selector, bool state) { if (!connect_) { return; } IOHIDSetModifierLockState(*connect_, selector, state); } std::unique_ptr<pqrs::osx::iokit_service_monitor> service_monitor_; pqrs::osx::iokit_object_ptr service_; pqrs::osx::iokit_object_ptr connect_; pqrs::dispatcher::extra::timer caps_lock_state_check_timer_; std::optional<bool> last_caps_lock_state_; };
9fcb05af8da05ce73298a4372a46103cc9c77fae
a53fc969c4e4838b338ac978e1e06d96c9a5ef7f
/src/components/utils/include/utils/file_system.h
b24eaf33dc878375b496d4ef08d3a71284cdb850
[]
no_license
LuxoftSDL/sdl_core_winport
8dbe4ccca656469f9193c92fdfa871d577639b15
d7a522bf71b6daf76f4fa9e5d8c7e4a7087ffbc1
refs/heads/develop
2016-08-12T18:08:20.570661
2016-04-07T07:23:32
2016-04-07T07:23:32
44,124,645
2
10
null
2016-06-06T09:43:51
2015-10-12T17:59:45
C++
UTF-8
C++
false
false
9,118
h
file_system.h
/* * Copyright (c) 2016, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the * distribution. * * Neither the name of the Ford Motor Company nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_ #define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_ #include <string.h> #include <stdint.h> #include <string> #include <vector> #include <iostream> namespace file_system { typedef uint64_t FileSizeType; const std::string kCurrentDirectoryEntry = "."; const std::string kParentDirectoryEntry = ".."; /** * @brief Get available disc space. * @param utf8_path path to directory * @return free disc space. */ FileSizeType GetAvailableDiskSpace(const std::string& utf8_path); /* * @brief Get size of current directory * @param utf8_path path to directory */ FileSizeType DirectorySize(const std::string& utf8_path); /* * @brief Get size of current file * @param utf8_path path to file * @return size of file, return 0 if file not exist */ FileSizeType FileSize(const std::string& utf8_path); /** * @brief Creates directory * @param utf8_path path to directory * @return path to created directory. */ std::string CreateDirectory(const std::string& utf8_path); /** * @brief Creates directory recursively * @param utf8_path full path to directory * @return return true if directory was created or already exist */ bool CreateDirectoryRecursively(const std::string& utf8_path); /** * @brief Is directory exist * @param utf8_path path to directory * @return returns true if directory is exists. */ bool DirectoryExists(const std::string& utf8_path); /** * @brief Is file exist * @param utf8_path path to file * @return returns true if file is exists. */ bool FileExists(const std::string& utf8_path); /** * @brief Writes to file * * @remark - create file if it doesn't exist * @param utf8_path path to file * @param data data to write * @return returns true if the operation is successfully. */ bool Write(const std::string& utf8_path, const std::vector<uint8_t>& data, std::ios_base::openmode mode = std::ios_base::out); /** * @brief Opens file stream for writing * @param utf8_path path to file to write data to * @return returns pointer to opened stream in case of success; * otherwise returns NULL */ std::ofstream* Open(const std::string& utf8_path, std::ios_base::openmode mode = std::ios_base::out); /** * @brief Writes to file stream * @param file_stream file stream to be written to * @param data data to be written to file * @param data_size size of data to be written to file * @return returns true if the operation is successfully. */ bool Write(std::ofstream* const file_stream, const uint8_t* data, std::size_t data_size); /** * @brief Closes file stream * @param file_stream file stream to be closed */ void Close(std::ofstream* file_stream); /** * @brief Returns current working directory path * @return Current working directory path */ std::string CurrentWorkingDirectory(); /** * @brief Removes file * * @param utf8_path path to file * @return returns true if the file is successfully deleted. */ bool DeleteFile(const std::string& utf8_path); /** * @brief Removes directory. * * @param utf8_path path to directory. * @param is_recursively true if you need delete directory recursively, * otherwise false. * @return returns true if the directory is successfully deleted. */ bool RemoveDirectory(const std::string& utf8_path, bool is_recursively); /** * @brief Checks access rights for file or directory * * @param utf8_path Path to file or directory * @param access_rights Access rights to be checked * @return True if file or directory has requested rights, false otherwise */ bool IsAccessible(const std::string& utf8_path, int32_t access_rights); /** * @brief Check access rights for writing * * @param utf8_path path to file or folder * @return returns true if has access rights. */ bool IsWritingAllowed(const std::string& utf8_path); /** * @brief Check access rights for reading * * @param utf8_path path to file. * @return returns true if file has access rights. */ bool IsReadingAllowed(const std::string& utf8_path); /** * @brief Lists all files in given directory * * @param utf8_path path to directory. * @return returns list of files. */ std::vector<std::string> ListFiles(const std::string& utf8_path); /** * @brief Creates or overwrites file with given binary contents * @param utf8_path path to the file * @param data data to be written into the file * @returns true if file write succeeded */ bool WriteBinaryFile(const std::string& utf8_path, const std::vector<uint8_t>& data); /** * @brief Reads from file * * @param utf8_path path to file * @param result read data * @return returns true if the operation is successfully. */ bool ReadBinaryFile(const std::string& utf8_path, std::vector<uint8_t>& result); bool ReadFile(const std::string& utf8_path, std::string& result); /** * @brief Convert special symbols in system path to percent-encoded * * @param utf8_path path to file * @return returns converted path. */ const std::string ConvertPathForURL(const std::string& utf8_path); /** * @brief Create empty file * * @param utf8_path path to file * @return if result success return true */ bool CreateFile(const std::string& utf8_path); /** * @brief Get modification time of file * @param utf8_path Path to file * @return Modification time in seconds */ uint64_t GetFileModificationTime(const std::string& utf8_path); /** * @brief Copy file from source to destination * * @param utf8_src_path Source file path * @param utf8_dst_path Destination file path * @return if result success return true */ bool CopyFile(const std::string& utf8_src_path, const std::string& utf8_dst_path); /** * @brief Move file from source to destination * * @param utf8_src_path Source file path * @param utf8_dst_path Destination file path * @return if result success return true */ bool MoveFile(const std::string& utf8_src_path, const std::string& utf8_dst_path); /** * @brief Removes files and subdirectories of specified directory * @param utf8_path Path to directory */ void RemoveDirectoryContent(const std::string& utf8_path); /** * @brief Checks if path is relative or not * @param utf8_path Path to check * @return True if path is relative, otherwise false */ bool IsRelativePath(const std::string& utf8_path); /** * @brief Returns platform specific path delimiter * @return Delimiter string */ std::string GetPathDelimiter(); /** * @brief Concatenates strings to platform specific path * @param utf8_path Strings to be concatenated * @return Concatenated path string */ std::string ConcatPath(const std::string& utf8_path1, const std::string& utf8_path2); std::string ConcatPath(const std::string& utf8_path1, const std::string& utf8_path2, const std::string& utf8_path3); /** * @brief Concatenates path to current working directory path * @param utf8_path Path to be concatenated * @return Concatenated path string */ std::string ConcatCurrentWorkingPath(const std::string& utf8_path); /** * @brief Retrieves file name from path by * removing all before last path delimiter * @param utf8_path Path to process * @return File name without path */ std::string RetrieveFileNameFromPath(const std::string& utf8_path); } // namespace file_system #endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_
a4ea2f69e2ca4c9ef0cda241ee5807f6ee51a8bc
3282ccae547452b96c4409e6b5a447f34b8fdf64
/SimModel_Python_API/simmodel_swig/SimModel_Dll_lib/framework/SimMaterial_GlazingMaterial_Blind.cxx
5a082d2fc38fea932b6d87fab00a3c789c346a1d
[ "MIT" ]
permissive
EnEff-BIM/EnEffBIM-Framework
c8bde8178bb9ed7d5e3e5cdf6d469a009bcb52de
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
refs/heads/master
2021-01-18T00:16:06.546875
2017-04-18T08:03:40
2017-04-18T08:03:40
28,960,534
3
0
null
2017-04-18T08:03:40
2015-01-08T10:19:18
C++
UTF-8
C++
false
false
54,276
cxx
SimMaterial_GlazingMaterial_Blind.cxx
// Copyright (c) 2005-2014 Code Synthesis Tools CC // // This program was generated by CodeSynthesis XSD, an XML Schema to // C++ data binding compiler. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // In addition, as a special exception, Code Synthesis Tools CC gives // permission to link this program with the Xerces-C++ library (or with // modified versions of Xerces-C++ that use the same license as Xerces-C++), // and distribute linked combinations including the two. You must obey // the GNU General Public License version 2 in all respects for all of // the code used other than Xerces-C++. If you modify this copy of the // program, you may extend this exception to your version of the program, // but you are not obligated to do so. If you do not wish to do so, delete // this exception statement from your version. // // Furthermore, Code Synthesis Tools CC makes a special exception for // the Free/Libre and Open Source Software (FLOSS) which is described // in the accompanying FLOSSE file. // // Begin prologue. // // // End prologue. #include <xsd/cxx/pre.hxx> #include "SimMaterial_GlazingMaterial_Blind.hxx" namespace schema { namespace simxml { namespace ResourcesGeneral { // SimMaterial_GlazingMaterial_Blind // const SimMaterial_GlazingMaterial_Blind::SimMaterial_Name_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_Name () const { return this->SimMaterial_Name_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_Name_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_Name () { return this->SimMaterial_Name_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_Name (const SimMaterial_Name_type& x) { this->SimMaterial_Name_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_Name (const SimMaterial_Name_optional& x) { this->SimMaterial_Name_ = x; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_Name (::std::auto_ptr< SimMaterial_Name_type > x) { this->SimMaterial_Name_.set (x); } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatWidth_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatWidth () const { return this->SimMaterial_SlatWidth_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatWidth_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatWidth () { return this->SimMaterial_SlatWidth_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatWidth (const SimMaterial_SlatWidth_type& x) { this->SimMaterial_SlatWidth_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatWidth (const SimMaterial_SlatWidth_optional& x) { this->SimMaterial_SlatWidth_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatThick_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatThick () const { return this->SimMaterial_SlatThick_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatThick_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatThick () { return this->SimMaterial_SlatThick_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatThick (const SimMaterial_SlatThick_type& x) { this->SimMaterial_SlatThick_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatThick (const SimMaterial_SlatThick_optional& x) { this->SimMaterial_SlatThick_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatAngle_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatAngle () const { return this->SimMaterial_SlatAngle_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatAngle_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatAngle () { return this->SimMaterial_SlatAngle_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatAngle (const SimMaterial_SlatAngle_type& x) { this->SimMaterial_SlatAngle_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatAngle (const SimMaterial_SlatAngle_optional& x) { this->SimMaterial_SlatAngle_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatCond_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatCond () const { return this->SimMaterial_SlatCond_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatCond_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatCond () { return this->SimMaterial_SlatCond_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatCond (const SimMaterial_SlatCond_type& x) { this->SimMaterial_SlatCond_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatCond (const SimMaterial_SlatCond_optional& x) { this->SimMaterial_SlatCond_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatOrientation_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatOrientation () const { return this->SimMaterial_SlatOrientation_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatOrientation_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatOrientation () { return this->SimMaterial_SlatOrientation_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatOrientation (const SimMaterial_SlatOrientation_type& x) { this->SimMaterial_SlatOrientation_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatOrientation (const SimMaterial_SlatOrientation_optional& x) { this->SimMaterial_SlatOrientation_ = x; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatOrientation (::std::auto_ptr< SimMaterial_SlatOrientation_type > x) { this->SimMaterial_SlatOrientation_.set (x); } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatSeparation_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatSeparation () const { return this->SimMaterial_SlatSeparation_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatSeparation_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatSeparation () { return this->SimMaterial_SlatSeparation_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatSeparation (const SimMaterial_SlatSeparation_type& x) { this->SimMaterial_SlatSeparation_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatSeparation (const SimMaterial_SlatSeparation_optional& x) { this->SimMaterial_SlatSeparation_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatBeamSolarTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamSolarTrans () const { return this->SimMaterial_SlatBeamSolarTrans_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatBeamSolarTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamSolarTrans () { return this->SimMaterial_SlatBeamSolarTrans_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamSolarTrans (const SimMaterial_SlatBeamSolarTrans_type& x) { this->SimMaterial_SlatBeamSolarTrans_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamSolarTrans (const SimMaterial_SlatBeamSolarTrans_optional& x) { this->SimMaterial_SlatBeamSolarTrans_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatBeamSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamSolarReflect () const { return this->SimMaterial_FrontSideSlatBeamSolarReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatBeamSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamSolarReflect () { return this->SimMaterial_FrontSideSlatBeamSolarReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamSolarReflect (const SimMaterial_FrontSideSlatBeamSolarReflect_type& x) { this->SimMaterial_FrontSideSlatBeamSolarReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamSolarReflect (const SimMaterial_FrontSideSlatBeamSolarReflect_optional& x) { this->SimMaterial_FrontSideSlatBeamSolarReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatBeamSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamSolarReflect () const { return this->SimMaterial_BackSideSlatBeamSolarReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatBeamSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamSolarReflect () { return this->SimMaterial_BackSideSlatBeamSolarReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamSolarReflect (const SimMaterial_BackSideSlatBeamSolarReflect_type& x) { this->SimMaterial_BackSideSlatBeamSolarReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamSolarReflect (const SimMaterial_BackSideSlatBeamSolarReflect_optional& x) { this->SimMaterial_BackSideSlatBeamSolarReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatDiffuseSolarTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseSolarTrans () const { return this->SimMaterial_SlatDiffuseSolarTrans_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatDiffuseSolarTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseSolarTrans () { return this->SimMaterial_SlatDiffuseSolarTrans_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseSolarTrans (const SimMaterial_SlatDiffuseSolarTrans_type& x) { this->SimMaterial_SlatDiffuseSolarTrans_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseSolarTrans (const SimMaterial_SlatDiffuseSolarTrans_optional& x) { this->SimMaterial_SlatDiffuseSolarTrans_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatDiffuseSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseSolarReflect () const { return this->SimMaterial_FrontSideSlatDiffuseSolarReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatDiffuseSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseSolarReflect () { return this->SimMaterial_FrontSideSlatDiffuseSolarReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseSolarReflect (const SimMaterial_FrontSideSlatDiffuseSolarReflect_type& x) { this->SimMaterial_FrontSideSlatDiffuseSolarReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseSolarReflect (const SimMaterial_FrontSideSlatDiffuseSolarReflect_optional& x) { this->SimMaterial_FrontSideSlatDiffuseSolarReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatDiffuseSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseSolarReflect () const { return this->SimMaterial_BackSideSlatDiffuseSolarReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatDiffuseSolarReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseSolarReflect () { return this->SimMaterial_BackSideSlatDiffuseSolarReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseSolarReflect (const SimMaterial_BackSideSlatDiffuseSolarReflect_type& x) { this->SimMaterial_BackSideSlatDiffuseSolarReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseSolarReflect (const SimMaterial_BackSideSlatDiffuseSolarReflect_optional& x) { this->SimMaterial_BackSideSlatDiffuseSolarReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatBeamVisTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamVisTrans () const { return this->SimMaterial_SlatBeamVisTrans_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatBeamVisTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamVisTrans () { return this->SimMaterial_SlatBeamVisTrans_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamVisTrans (const SimMaterial_SlatBeamVisTrans_type& x) { this->SimMaterial_SlatBeamVisTrans_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatBeamVisTrans (const SimMaterial_SlatBeamVisTrans_optional& x) { this->SimMaterial_SlatBeamVisTrans_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatBeamVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamVisReflect () const { return this->SimMaterial_FrontSideSlatBeamVisReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatBeamVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamVisReflect () { return this->SimMaterial_FrontSideSlatBeamVisReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamVisReflect (const SimMaterial_FrontSideSlatBeamVisReflect_type& x) { this->SimMaterial_FrontSideSlatBeamVisReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatBeamVisReflect (const SimMaterial_FrontSideSlatBeamVisReflect_optional& x) { this->SimMaterial_FrontSideSlatBeamVisReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatBeamVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamVisReflect () const { return this->SimMaterial_BackSideSlatBeamVisReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatBeamVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamVisReflect () { return this->SimMaterial_BackSideSlatBeamVisReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamVisReflect (const SimMaterial_BackSideSlatBeamVisReflect_type& x) { this->SimMaterial_BackSideSlatBeamVisReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatBeamVisReflect (const SimMaterial_BackSideSlatBeamVisReflect_optional& x) { this->SimMaterial_BackSideSlatBeamVisReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatDiffuseVisTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseVisTrans () const { return this->SimMaterial_SlatDiffuseVisTrans_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatDiffuseVisTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseVisTrans () { return this->SimMaterial_SlatDiffuseVisTrans_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseVisTrans (const SimMaterial_SlatDiffuseVisTrans_type& x) { this->SimMaterial_SlatDiffuseVisTrans_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatDiffuseVisTrans (const SimMaterial_SlatDiffuseVisTrans_optional& x) { this->SimMaterial_SlatDiffuseVisTrans_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatDiffuseVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseVisReflect () const { return this->SimMaterial_FrontSideSlatDiffuseVisReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatDiffuseVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseVisReflect () { return this->SimMaterial_FrontSideSlatDiffuseVisReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseVisReflect (const SimMaterial_FrontSideSlatDiffuseVisReflect_type& x) { this->SimMaterial_FrontSideSlatDiffuseVisReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatDiffuseVisReflect (const SimMaterial_FrontSideSlatDiffuseVisReflect_optional& x) { this->SimMaterial_FrontSideSlatDiffuseVisReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatDiffuseVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseVisReflect () const { return this->SimMaterial_BackSideSlatDiffuseVisReflect_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatDiffuseVisReflect_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseVisReflect () { return this->SimMaterial_BackSideSlatDiffuseVisReflect_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseVisReflect (const SimMaterial_BackSideSlatDiffuseVisReflect_type& x) { this->SimMaterial_BackSideSlatDiffuseVisReflect_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatDiffuseVisReflect (const SimMaterial_BackSideSlatDiffuseVisReflect_optional& x) { this->SimMaterial_BackSideSlatDiffuseVisReflect_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatInfraredHemisphTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatInfraredHemisphTrans () const { return this->SimMaterial_SlatInfraredHemisphTrans_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_SlatInfraredHemisphTrans_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatInfraredHemisphTrans () { return this->SimMaterial_SlatInfraredHemisphTrans_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatInfraredHemisphTrans (const SimMaterial_SlatInfraredHemisphTrans_type& x) { this->SimMaterial_SlatInfraredHemisphTrans_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_SlatInfraredHemisphTrans (const SimMaterial_SlatInfraredHemisphTrans_optional& x) { this->SimMaterial_SlatInfraredHemisphTrans_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatInfraredHemisphEmis_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatInfraredHemisphEmis () const { return this->SimMaterial_FrontSideSlatInfraredHemisphEmis_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_FrontSideSlatInfraredHemisphEmis_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatInfraredHemisphEmis () { return this->SimMaterial_FrontSideSlatInfraredHemisphEmis_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatInfraredHemisphEmis (const SimMaterial_FrontSideSlatInfraredHemisphEmis_type& x) { this->SimMaterial_FrontSideSlatInfraredHemisphEmis_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_FrontSideSlatInfraredHemisphEmis (const SimMaterial_FrontSideSlatInfraredHemisphEmis_optional& x) { this->SimMaterial_FrontSideSlatInfraredHemisphEmis_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatInfraredHemisphEmis_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatInfraredHemisphEmis () const { return this->SimMaterial_BackSideSlatInfraredHemisphEmis_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BackSideSlatInfraredHemisphEmis_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatInfraredHemisphEmis () { return this->SimMaterial_BackSideSlatInfraredHemisphEmis_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatInfraredHemisphEmis (const SimMaterial_BackSideSlatInfraredHemisphEmis_type& x) { this->SimMaterial_BackSideSlatInfraredHemisphEmis_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BackSideSlatInfraredHemisphEmis (const SimMaterial_BackSideSlatInfraredHemisphEmis_optional& x) { this->SimMaterial_BackSideSlatInfraredHemisphEmis_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindToGlassDist_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindToGlassDist () const { return this->SimMaterial_BlindToGlassDist_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindToGlassDist_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindToGlassDist () { return this->SimMaterial_BlindToGlassDist_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindToGlassDist (const SimMaterial_BlindToGlassDist_type& x) { this->SimMaterial_BlindToGlassDist_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindToGlassDist (const SimMaterial_BlindToGlassDist_optional& x) { this->SimMaterial_BlindToGlassDist_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindTopOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindTopOpngMult () const { return this->SimMaterial_BlindTopOpngMult_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindTopOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindTopOpngMult () { return this->SimMaterial_BlindTopOpngMult_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindTopOpngMult (const SimMaterial_BlindTopOpngMult_type& x) { this->SimMaterial_BlindTopOpngMult_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindTopOpngMult (const SimMaterial_BlindTopOpngMult_optional& x) { this->SimMaterial_BlindTopOpngMult_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindBotOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindBotOpngMult () const { return this->SimMaterial_BlindBotOpngMult_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindBotOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindBotOpngMult () { return this->SimMaterial_BlindBotOpngMult_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindBotOpngMult (const SimMaterial_BlindBotOpngMult_type& x) { this->SimMaterial_BlindBotOpngMult_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindBotOpngMult (const SimMaterial_BlindBotOpngMult_optional& x) { this->SimMaterial_BlindBotOpngMult_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindLeftSideOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindLeftSideOpngMult () const { return this->SimMaterial_BlindLeftSideOpngMult_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindLeftSideOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindLeftSideOpngMult () { return this->SimMaterial_BlindLeftSideOpngMult_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindLeftSideOpngMult (const SimMaterial_BlindLeftSideOpngMult_type& x) { this->SimMaterial_BlindLeftSideOpngMult_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindLeftSideOpngMult (const SimMaterial_BlindLeftSideOpngMult_optional& x) { this->SimMaterial_BlindLeftSideOpngMult_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindRightSideOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindRightSideOpngMult () const { return this->SimMaterial_BlindRightSideOpngMult_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_BlindRightSideOpngMult_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindRightSideOpngMult () { return this->SimMaterial_BlindRightSideOpngMult_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindRightSideOpngMult (const SimMaterial_BlindRightSideOpngMult_type& x) { this->SimMaterial_BlindRightSideOpngMult_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_BlindRightSideOpngMult (const SimMaterial_BlindRightSideOpngMult_optional& x) { this->SimMaterial_BlindRightSideOpngMult_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_MinSlatAngle_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_MinSlatAngle () const { return this->SimMaterial_MinSlatAngle_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_MinSlatAngle_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_MinSlatAngle () { return this->SimMaterial_MinSlatAngle_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_MinSlatAngle (const SimMaterial_MinSlatAngle_type& x) { this->SimMaterial_MinSlatAngle_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_MinSlatAngle (const SimMaterial_MinSlatAngle_optional& x) { this->SimMaterial_MinSlatAngle_ = x; } const SimMaterial_GlazingMaterial_Blind::SimMaterial_MaxSlatAngle_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_MaxSlatAngle () const { return this->SimMaterial_MaxSlatAngle_; } SimMaterial_GlazingMaterial_Blind::SimMaterial_MaxSlatAngle_optional& SimMaterial_GlazingMaterial_Blind:: SimMaterial_MaxSlatAngle () { return this->SimMaterial_MaxSlatAngle_; } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_MaxSlatAngle (const SimMaterial_MaxSlatAngle_type& x) { this->SimMaterial_MaxSlatAngle_.set (x); } void SimMaterial_GlazingMaterial_Blind:: SimMaterial_MaxSlatAngle (const SimMaterial_MaxSlatAngle_optional& x) { this->SimMaterial_MaxSlatAngle_ = x; } } } } #include <xsd/cxx/xml/dom/parsing-source.hxx> #include <xsd/cxx/tree/type-factory-map.hxx> namespace _xsd { static const ::xsd::cxx::tree::type_factory_plate< 0, char > type_factory_plate_init; } namespace schema { namespace simxml { namespace ResourcesGeneral { // SimMaterial_GlazingMaterial_Blind // SimMaterial_GlazingMaterial_Blind:: SimMaterial_GlazingMaterial_Blind () : ::schema::simxml::ResourcesGeneral::SimMaterial_GlazingMaterial (), SimMaterial_Name_ (this), SimMaterial_SlatWidth_ (this), SimMaterial_SlatThick_ (this), SimMaterial_SlatAngle_ (this), SimMaterial_SlatCond_ (this), SimMaterial_SlatOrientation_ (this), SimMaterial_SlatSeparation_ (this), SimMaterial_SlatBeamSolarTrans_ (this), SimMaterial_FrontSideSlatBeamSolarReflect_ (this), SimMaterial_BackSideSlatBeamSolarReflect_ (this), SimMaterial_SlatDiffuseSolarTrans_ (this), SimMaterial_FrontSideSlatDiffuseSolarReflect_ (this), SimMaterial_BackSideSlatDiffuseSolarReflect_ (this), SimMaterial_SlatBeamVisTrans_ (this), SimMaterial_FrontSideSlatBeamVisReflect_ (this), SimMaterial_BackSideSlatBeamVisReflect_ (this), SimMaterial_SlatDiffuseVisTrans_ (this), SimMaterial_FrontSideSlatDiffuseVisReflect_ (this), SimMaterial_BackSideSlatDiffuseVisReflect_ (this), SimMaterial_SlatInfraredHemisphTrans_ (this), SimMaterial_FrontSideSlatInfraredHemisphEmis_ (this), SimMaterial_BackSideSlatInfraredHemisphEmis_ (this), SimMaterial_BlindToGlassDist_ (this), SimMaterial_BlindTopOpngMult_ (this), SimMaterial_BlindBotOpngMult_ (this), SimMaterial_BlindLeftSideOpngMult_ (this), SimMaterial_BlindRightSideOpngMult_ (this), SimMaterial_MinSlatAngle_ (this), SimMaterial_MaxSlatAngle_ (this) { } SimMaterial_GlazingMaterial_Blind:: SimMaterial_GlazingMaterial_Blind (const RefId_type& RefId) : ::schema::simxml::ResourcesGeneral::SimMaterial_GlazingMaterial (RefId), SimMaterial_Name_ (this), SimMaterial_SlatWidth_ (this), SimMaterial_SlatThick_ (this), SimMaterial_SlatAngle_ (this), SimMaterial_SlatCond_ (this), SimMaterial_SlatOrientation_ (this), SimMaterial_SlatSeparation_ (this), SimMaterial_SlatBeamSolarTrans_ (this), SimMaterial_FrontSideSlatBeamSolarReflect_ (this), SimMaterial_BackSideSlatBeamSolarReflect_ (this), SimMaterial_SlatDiffuseSolarTrans_ (this), SimMaterial_FrontSideSlatDiffuseSolarReflect_ (this), SimMaterial_BackSideSlatDiffuseSolarReflect_ (this), SimMaterial_SlatBeamVisTrans_ (this), SimMaterial_FrontSideSlatBeamVisReflect_ (this), SimMaterial_BackSideSlatBeamVisReflect_ (this), SimMaterial_SlatDiffuseVisTrans_ (this), SimMaterial_FrontSideSlatDiffuseVisReflect_ (this), SimMaterial_BackSideSlatDiffuseVisReflect_ (this), SimMaterial_SlatInfraredHemisphTrans_ (this), SimMaterial_FrontSideSlatInfraredHemisphEmis_ (this), SimMaterial_BackSideSlatInfraredHemisphEmis_ (this), SimMaterial_BlindToGlassDist_ (this), SimMaterial_BlindTopOpngMult_ (this), SimMaterial_BlindBotOpngMult_ (this), SimMaterial_BlindLeftSideOpngMult_ (this), SimMaterial_BlindRightSideOpngMult_ (this), SimMaterial_MinSlatAngle_ (this), SimMaterial_MaxSlatAngle_ (this) { } SimMaterial_GlazingMaterial_Blind:: SimMaterial_GlazingMaterial_Blind (const SimMaterial_GlazingMaterial_Blind& x, ::xml_schema::flags f, ::xml_schema::container* c) : ::schema::simxml::ResourcesGeneral::SimMaterial_GlazingMaterial (x, f, c), SimMaterial_Name_ (x.SimMaterial_Name_, f, this), SimMaterial_SlatWidth_ (x.SimMaterial_SlatWidth_, f, this), SimMaterial_SlatThick_ (x.SimMaterial_SlatThick_, f, this), SimMaterial_SlatAngle_ (x.SimMaterial_SlatAngle_, f, this), SimMaterial_SlatCond_ (x.SimMaterial_SlatCond_, f, this), SimMaterial_SlatOrientation_ (x.SimMaterial_SlatOrientation_, f, this), SimMaterial_SlatSeparation_ (x.SimMaterial_SlatSeparation_, f, this), SimMaterial_SlatBeamSolarTrans_ (x.SimMaterial_SlatBeamSolarTrans_, f, this), SimMaterial_FrontSideSlatBeamSolarReflect_ (x.SimMaterial_FrontSideSlatBeamSolarReflect_, f, this), SimMaterial_BackSideSlatBeamSolarReflect_ (x.SimMaterial_BackSideSlatBeamSolarReflect_, f, this), SimMaterial_SlatDiffuseSolarTrans_ (x.SimMaterial_SlatDiffuseSolarTrans_, f, this), SimMaterial_FrontSideSlatDiffuseSolarReflect_ (x.SimMaterial_FrontSideSlatDiffuseSolarReflect_, f, this), SimMaterial_BackSideSlatDiffuseSolarReflect_ (x.SimMaterial_BackSideSlatDiffuseSolarReflect_, f, this), SimMaterial_SlatBeamVisTrans_ (x.SimMaterial_SlatBeamVisTrans_, f, this), SimMaterial_FrontSideSlatBeamVisReflect_ (x.SimMaterial_FrontSideSlatBeamVisReflect_, f, this), SimMaterial_BackSideSlatBeamVisReflect_ (x.SimMaterial_BackSideSlatBeamVisReflect_, f, this), SimMaterial_SlatDiffuseVisTrans_ (x.SimMaterial_SlatDiffuseVisTrans_, f, this), SimMaterial_FrontSideSlatDiffuseVisReflect_ (x.SimMaterial_FrontSideSlatDiffuseVisReflect_, f, this), SimMaterial_BackSideSlatDiffuseVisReflect_ (x.SimMaterial_BackSideSlatDiffuseVisReflect_, f, this), SimMaterial_SlatInfraredHemisphTrans_ (x.SimMaterial_SlatInfraredHemisphTrans_, f, this), SimMaterial_FrontSideSlatInfraredHemisphEmis_ (x.SimMaterial_FrontSideSlatInfraredHemisphEmis_, f, this), SimMaterial_BackSideSlatInfraredHemisphEmis_ (x.SimMaterial_BackSideSlatInfraredHemisphEmis_, f, this), SimMaterial_BlindToGlassDist_ (x.SimMaterial_BlindToGlassDist_, f, this), SimMaterial_BlindTopOpngMult_ (x.SimMaterial_BlindTopOpngMult_, f, this), SimMaterial_BlindBotOpngMult_ (x.SimMaterial_BlindBotOpngMult_, f, this), SimMaterial_BlindLeftSideOpngMult_ (x.SimMaterial_BlindLeftSideOpngMult_, f, this), SimMaterial_BlindRightSideOpngMult_ (x.SimMaterial_BlindRightSideOpngMult_, f, this), SimMaterial_MinSlatAngle_ (x.SimMaterial_MinSlatAngle_, f, this), SimMaterial_MaxSlatAngle_ (x.SimMaterial_MaxSlatAngle_, f, this) { } SimMaterial_GlazingMaterial_Blind:: SimMaterial_GlazingMaterial_Blind (const ::xercesc::DOMElement& e, ::xml_schema::flags f, ::xml_schema::container* c) : ::schema::simxml::ResourcesGeneral::SimMaterial_GlazingMaterial (e, f | ::xml_schema::flags::base, c), SimMaterial_Name_ (this), SimMaterial_SlatWidth_ (this), SimMaterial_SlatThick_ (this), SimMaterial_SlatAngle_ (this), SimMaterial_SlatCond_ (this), SimMaterial_SlatOrientation_ (this), SimMaterial_SlatSeparation_ (this), SimMaterial_SlatBeamSolarTrans_ (this), SimMaterial_FrontSideSlatBeamSolarReflect_ (this), SimMaterial_BackSideSlatBeamSolarReflect_ (this), SimMaterial_SlatDiffuseSolarTrans_ (this), SimMaterial_FrontSideSlatDiffuseSolarReflect_ (this), SimMaterial_BackSideSlatDiffuseSolarReflect_ (this), SimMaterial_SlatBeamVisTrans_ (this), SimMaterial_FrontSideSlatBeamVisReflect_ (this), SimMaterial_BackSideSlatBeamVisReflect_ (this), SimMaterial_SlatDiffuseVisTrans_ (this), SimMaterial_FrontSideSlatDiffuseVisReflect_ (this), SimMaterial_BackSideSlatDiffuseVisReflect_ (this), SimMaterial_SlatInfraredHemisphTrans_ (this), SimMaterial_FrontSideSlatInfraredHemisphEmis_ (this), SimMaterial_BackSideSlatInfraredHemisphEmis_ (this), SimMaterial_BlindToGlassDist_ (this), SimMaterial_BlindTopOpngMult_ (this), SimMaterial_BlindBotOpngMult_ (this), SimMaterial_BlindLeftSideOpngMult_ (this), SimMaterial_BlindRightSideOpngMult_ (this), SimMaterial_MinSlatAngle_ (this), SimMaterial_MaxSlatAngle_ (this) { if ((f & ::xml_schema::flags::base) == 0) { ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); this->parse (p, f); } } void SimMaterial_GlazingMaterial_Blind:: parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { this->::schema::simxml::ResourcesGeneral::SimMaterial_GlazingMaterial::parse (p, f); for (; p.more_content (); p.next_content (false)) { const ::xercesc::DOMElement& i (p.cur_element ()); const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); // SimMaterial_Name // if (n.name () == "SimMaterial_Name" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { ::std::auto_ptr< SimMaterial_Name_type > r ( SimMaterial_Name_traits::create (i, f, this)); if (!this->SimMaterial_Name_) { this->SimMaterial_Name_.set (r); continue; } } // SimMaterial_SlatWidth // if (n.name () == "SimMaterial_SlatWidth" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatWidth_) { this->SimMaterial_SlatWidth_.set (SimMaterial_SlatWidth_traits::create (i, f, this)); continue; } } // SimMaterial_SlatThick // if (n.name () == "SimMaterial_SlatThick" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatThick_) { this->SimMaterial_SlatThick_.set (SimMaterial_SlatThick_traits::create (i, f, this)); continue; } } // SimMaterial_SlatAngle // if (n.name () == "SimMaterial_SlatAngle" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatAngle_) { this->SimMaterial_SlatAngle_.set (SimMaterial_SlatAngle_traits::create (i, f, this)); continue; } } // SimMaterial_SlatCond // if (n.name () == "SimMaterial_SlatCond" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatCond_) { this->SimMaterial_SlatCond_.set (SimMaterial_SlatCond_traits::create (i, f, this)); continue; } } // SimMaterial_SlatOrientation // if (n.name () == "SimMaterial_SlatOrientation" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { ::std::auto_ptr< SimMaterial_SlatOrientation_type > r ( SimMaterial_SlatOrientation_traits::create (i, f, this)); if (!this->SimMaterial_SlatOrientation_) { this->SimMaterial_SlatOrientation_.set (r); continue; } } // SimMaterial_SlatSeparation // if (n.name () == "SimMaterial_SlatSeparation" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatSeparation_) { this->SimMaterial_SlatSeparation_.set (SimMaterial_SlatSeparation_traits::create (i, f, this)); continue; } } // SimMaterial_SlatBeamSolarTrans // if (n.name () == "SimMaterial_SlatBeamSolarTrans" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatBeamSolarTrans_) { this->SimMaterial_SlatBeamSolarTrans_.set (SimMaterial_SlatBeamSolarTrans_traits::create (i, f, this)); continue; } } // SimMaterial_FrontSideSlatBeamSolarReflect // if (n.name () == "SimMaterial_FrontSideSlatBeamSolarReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_FrontSideSlatBeamSolarReflect_) { this->SimMaterial_FrontSideSlatBeamSolarReflect_.set (SimMaterial_FrontSideSlatBeamSolarReflect_traits::create (i, f, this)); continue; } } // SimMaterial_BackSideSlatBeamSolarReflect // if (n.name () == "SimMaterial_BackSideSlatBeamSolarReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BackSideSlatBeamSolarReflect_) { this->SimMaterial_BackSideSlatBeamSolarReflect_.set (SimMaterial_BackSideSlatBeamSolarReflect_traits::create (i, f, this)); continue; } } // SimMaterial_SlatDiffuseSolarTrans // if (n.name () == "SimMaterial_SlatDiffuseSolarTrans" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatDiffuseSolarTrans_) { this->SimMaterial_SlatDiffuseSolarTrans_.set (SimMaterial_SlatDiffuseSolarTrans_traits::create (i, f, this)); continue; } } // SimMaterial_FrontSideSlatDiffuseSolarReflect // if (n.name () == "SimMaterial_FrontSideSlatDiffuseSolarReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_FrontSideSlatDiffuseSolarReflect_) { this->SimMaterial_FrontSideSlatDiffuseSolarReflect_.set (SimMaterial_FrontSideSlatDiffuseSolarReflect_traits::create (i, f, this)); continue; } } // SimMaterial_BackSideSlatDiffuseSolarReflect // if (n.name () == "SimMaterial_BackSideSlatDiffuseSolarReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BackSideSlatDiffuseSolarReflect_) { this->SimMaterial_BackSideSlatDiffuseSolarReflect_.set (SimMaterial_BackSideSlatDiffuseSolarReflect_traits::create (i, f, this)); continue; } } // SimMaterial_SlatBeamVisTrans // if (n.name () == "SimMaterial_SlatBeamVisTrans" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatBeamVisTrans_) { this->SimMaterial_SlatBeamVisTrans_.set (SimMaterial_SlatBeamVisTrans_traits::create (i, f, this)); continue; } } // SimMaterial_FrontSideSlatBeamVisReflect // if (n.name () == "SimMaterial_FrontSideSlatBeamVisReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_FrontSideSlatBeamVisReflect_) { this->SimMaterial_FrontSideSlatBeamVisReflect_.set (SimMaterial_FrontSideSlatBeamVisReflect_traits::create (i, f, this)); continue; } } // SimMaterial_BackSideSlatBeamVisReflect // if (n.name () == "SimMaterial_BackSideSlatBeamVisReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BackSideSlatBeamVisReflect_) { this->SimMaterial_BackSideSlatBeamVisReflect_.set (SimMaterial_BackSideSlatBeamVisReflect_traits::create (i, f, this)); continue; } } // SimMaterial_SlatDiffuseVisTrans // if (n.name () == "SimMaterial_SlatDiffuseVisTrans" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatDiffuseVisTrans_) { this->SimMaterial_SlatDiffuseVisTrans_.set (SimMaterial_SlatDiffuseVisTrans_traits::create (i, f, this)); continue; } } // SimMaterial_FrontSideSlatDiffuseVisReflect // if (n.name () == "SimMaterial_FrontSideSlatDiffuseVisReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_FrontSideSlatDiffuseVisReflect_) { this->SimMaterial_FrontSideSlatDiffuseVisReflect_.set (SimMaterial_FrontSideSlatDiffuseVisReflect_traits::create (i, f, this)); continue; } } // SimMaterial_BackSideSlatDiffuseVisReflect // if (n.name () == "SimMaterial_BackSideSlatDiffuseVisReflect" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BackSideSlatDiffuseVisReflect_) { this->SimMaterial_BackSideSlatDiffuseVisReflect_.set (SimMaterial_BackSideSlatDiffuseVisReflect_traits::create (i, f, this)); continue; } } // SimMaterial_SlatInfraredHemisphTrans // if (n.name () == "SimMaterial_SlatInfraredHemisphTrans" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_SlatInfraredHemisphTrans_) { this->SimMaterial_SlatInfraredHemisphTrans_.set (SimMaterial_SlatInfraredHemisphTrans_traits::create (i, f, this)); continue; } } // SimMaterial_FrontSideSlatInfraredHemisphEmis // if (n.name () == "SimMaterial_FrontSideSlatInfraredHemisphEmis" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_FrontSideSlatInfraredHemisphEmis_) { this->SimMaterial_FrontSideSlatInfraredHemisphEmis_.set (SimMaterial_FrontSideSlatInfraredHemisphEmis_traits::create (i, f, this)); continue; } } // SimMaterial_BackSideSlatInfraredHemisphEmis // if (n.name () == "SimMaterial_BackSideSlatInfraredHemisphEmis" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BackSideSlatInfraredHemisphEmis_) { this->SimMaterial_BackSideSlatInfraredHemisphEmis_.set (SimMaterial_BackSideSlatInfraredHemisphEmis_traits::create (i, f, this)); continue; } } // SimMaterial_BlindToGlassDist // if (n.name () == "SimMaterial_BlindToGlassDist" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BlindToGlassDist_) { this->SimMaterial_BlindToGlassDist_.set (SimMaterial_BlindToGlassDist_traits::create (i, f, this)); continue; } } // SimMaterial_BlindTopOpngMult // if (n.name () == "SimMaterial_BlindTopOpngMult" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BlindTopOpngMult_) { this->SimMaterial_BlindTopOpngMult_.set (SimMaterial_BlindTopOpngMult_traits::create (i, f, this)); continue; } } // SimMaterial_BlindBotOpngMult // if (n.name () == "SimMaterial_BlindBotOpngMult" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BlindBotOpngMult_) { this->SimMaterial_BlindBotOpngMult_.set (SimMaterial_BlindBotOpngMult_traits::create (i, f, this)); continue; } } // SimMaterial_BlindLeftSideOpngMult // if (n.name () == "SimMaterial_BlindLeftSideOpngMult" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BlindLeftSideOpngMult_) { this->SimMaterial_BlindLeftSideOpngMult_.set (SimMaterial_BlindLeftSideOpngMult_traits::create (i, f, this)); continue; } } // SimMaterial_BlindRightSideOpngMult // if (n.name () == "SimMaterial_BlindRightSideOpngMult" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_BlindRightSideOpngMult_) { this->SimMaterial_BlindRightSideOpngMult_.set (SimMaterial_BlindRightSideOpngMult_traits::create (i, f, this)); continue; } } // SimMaterial_MinSlatAngle // if (n.name () == "SimMaterial_MinSlatAngle" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_MinSlatAngle_) { this->SimMaterial_MinSlatAngle_.set (SimMaterial_MinSlatAngle_traits::create (i, f, this)); continue; } } // SimMaterial_MaxSlatAngle // if (n.name () == "SimMaterial_MaxSlatAngle" && n.namespace_ () == "http://d-alchemy.com/schema/simxml/ResourcesGeneral") { if (!this->SimMaterial_MaxSlatAngle_) { this->SimMaterial_MaxSlatAngle_.set (SimMaterial_MaxSlatAngle_traits::create (i, f, this)); continue; } } break; } } SimMaterial_GlazingMaterial_Blind* SimMaterial_GlazingMaterial_Blind:: _clone (::xml_schema::flags f, ::xml_schema::container* c) const { return new class SimMaterial_GlazingMaterial_Blind (*this, f, c); } SimMaterial_GlazingMaterial_Blind& SimMaterial_GlazingMaterial_Blind:: operator= (const SimMaterial_GlazingMaterial_Blind& x) { if (this != &x) { static_cast< ::schema::simxml::ResourcesGeneral::SimMaterial_GlazingMaterial& > (*this) = x; this->SimMaterial_Name_ = x.SimMaterial_Name_; this->SimMaterial_SlatWidth_ = x.SimMaterial_SlatWidth_; this->SimMaterial_SlatThick_ = x.SimMaterial_SlatThick_; this->SimMaterial_SlatAngle_ = x.SimMaterial_SlatAngle_; this->SimMaterial_SlatCond_ = x.SimMaterial_SlatCond_; this->SimMaterial_SlatOrientation_ = x.SimMaterial_SlatOrientation_; this->SimMaterial_SlatSeparation_ = x.SimMaterial_SlatSeparation_; this->SimMaterial_SlatBeamSolarTrans_ = x.SimMaterial_SlatBeamSolarTrans_; this->SimMaterial_FrontSideSlatBeamSolarReflect_ = x.SimMaterial_FrontSideSlatBeamSolarReflect_; this->SimMaterial_BackSideSlatBeamSolarReflect_ = x.SimMaterial_BackSideSlatBeamSolarReflect_; this->SimMaterial_SlatDiffuseSolarTrans_ = x.SimMaterial_SlatDiffuseSolarTrans_; this->SimMaterial_FrontSideSlatDiffuseSolarReflect_ = x.SimMaterial_FrontSideSlatDiffuseSolarReflect_; this->SimMaterial_BackSideSlatDiffuseSolarReflect_ = x.SimMaterial_BackSideSlatDiffuseSolarReflect_; this->SimMaterial_SlatBeamVisTrans_ = x.SimMaterial_SlatBeamVisTrans_; this->SimMaterial_FrontSideSlatBeamVisReflect_ = x.SimMaterial_FrontSideSlatBeamVisReflect_; this->SimMaterial_BackSideSlatBeamVisReflect_ = x.SimMaterial_BackSideSlatBeamVisReflect_; this->SimMaterial_SlatDiffuseVisTrans_ = x.SimMaterial_SlatDiffuseVisTrans_; this->SimMaterial_FrontSideSlatDiffuseVisReflect_ = x.SimMaterial_FrontSideSlatDiffuseVisReflect_; this->SimMaterial_BackSideSlatDiffuseVisReflect_ = x.SimMaterial_BackSideSlatDiffuseVisReflect_; this->SimMaterial_SlatInfraredHemisphTrans_ = x.SimMaterial_SlatInfraredHemisphTrans_; this->SimMaterial_FrontSideSlatInfraredHemisphEmis_ = x.SimMaterial_FrontSideSlatInfraredHemisphEmis_; this->SimMaterial_BackSideSlatInfraredHemisphEmis_ = x.SimMaterial_BackSideSlatInfraredHemisphEmis_; this->SimMaterial_BlindToGlassDist_ = x.SimMaterial_BlindToGlassDist_; this->SimMaterial_BlindTopOpngMult_ = x.SimMaterial_BlindTopOpngMult_; this->SimMaterial_BlindBotOpngMult_ = x.SimMaterial_BlindBotOpngMult_; this->SimMaterial_BlindLeftSideOpngMult_ = x.SimMaterial_BlindLeftSideOpngMult_; this->SimMaterial_BlindRightSideOpngMult_ = x.SimMaterial_BlindRightSideOpngMult_; this->SimMaterial_MinSlatAngle_ = x.SimMaterial_MinSlatAngle_; this->SimMaterial_MaxSlatAngle_ = x.SimMaterial_MaxSlatAngle_; } return *this; } SimMaterial_GlazingMaterial_Blind:: ~SimMaterial_GlazingMaterial_Blind () { } } } } #include <istream> #include <xsd/cxx/xml/sax/std-input-source.hxx> #include <xsd/cxx/tree/error-handler.hxx> namespace schema { namespace simxml { namespace ResourcesGeneral { } } } #include <xsd/cxx/post.hxx> // Begin epilogue. // // // End epilogue.
d2ece29319b5f26a4ecb903a091d70d313612e12
e96fe1ab0876ac1dc6319bb85b10f88781a8d626
/src/pixled.h
40324ab12ce4437e0c49e49a4dfabb78ccf56e5d
[]
no_license
pixled/pixled-lib
a1a088eb6bd33d829b1c4b60b3616c028d5d635f
b8177ac6e2791701d1cee0df719431039bedf658
refs/heads/master
2023-06-29T09:22:32.902805
2021-07-25T19:38:04
2021-07-25T19:38:04
263,389,821
2
0
null
null
null
null
UTF-8
C++
false
false
7,089
h
pixled.h
#include "pixled/animation/animation.h" #include "pixled/arithmetic/arithmetic.h" #include "pixled/chroma/chroma.h" #include "pixled/conditional/conditional.h" #include "pixled/random/random.h" #include "pixled/mapping/mapping.h" #include "pixled/chrono/chrono.h" #include "pixled/output.h" #include "pixled/runtime.h" /** * Main pixled namespace. */ namespace pixled { using namespace chroma; using namespace animation; using namespace arithmetic; using namespace conditional; using namespace geometry; using namespace mapping; using namespace random; using namespace signal; using namespace chrono; /** * @example pixled/function/function.cpp * * A pixled::Function example usage. A pixled::Function::call() helper * function example usage is also presented. */ /** * Namespace containing animation related functions. */ namespace animation { /** * @example pixled/animation/rainbow.cpp * * A basic pixled::animation::Rainbow usage example. * * rainbow.gif | rainbow_dyn_b.gif * ----------------|------------------ * ![Rainbow](rainbow.gif) | ![Dynamic Rainbow](rainbow_dyn_b.gif) * */ /** * @example pixled/animation/blink.cpp * * A pixled::animation::Blink usage example. * * blink_color.gif | blink_rainbow.gif * ----------------|------------------ * ![Blink Color](blink_color.gif) | ![Blink Rainbow](blink_rainbow.gif) * */ /** * @example pixled/animation/blooming.cpp * * A pixled::animation::Blooming usage example. * * blooming_rainbow.gif | dynamic_blooming_rainbow.gif * ----------------|------------------ * ![Blooming Rainbow](blooming_rainbow.gif) | ![Dynamic Blooming Rainbow](dynamic_blooming_rainbow.gif) * */ /** * @example pixled/animation/linear_unit_wave.cpp * * A pixled::animation::LinearUnitWave usage example. * * basic_linear_unit_wave.gif | rainbow_linear_unit_wave.gif * ----------------------------|------------------------------ * ![Basic Linear Unit Wave](basic_linear_unit_wave.gif) | ![Rainbow Linear * Unit Wave](rainbow_linear_unit_wave.gif) * */ /** * @example pixled/animation/radial_unit_wave.cpp * * A pixled::animation::RadialUnitWave usage example. * * basic_radial_unit_wave.gif | rainbow_radial_unit_wave.gif * ----------------------------|------------------------------ * ![Basic Radial Unit Wave](basic_radial_unit_wave.gif) | ![Rainbow Radial * Unit Wave](rainbow_radial_unit_wave.gif) * */ /** * @example pixled/animation/sequence.cpp * * A pixled::animation::Sequence usage example. * * sequence.gif || * -------------|| * ![Sequence](sequence.gif) || * */ } /** * Namespace containing arithmetic operators definitions adapted to * \Functions. * * In order to use the defined operators with \Functions, it is **required** * to import the pixled namespace with a `using namespace pixled` * statement. */ namespace arithmetic { } /** * Namesapce containing geometric functions. */ namespace geometry { /** * @example pixled/geometry/index.cpp * * A led index based animation example. * * index.gif || * ----------|| * ![Index](index.gif) || * */ } /** * Namespace containing random generators and distributions. */ namespace random { /** * @example pixled/random/uniform.cpp * * A pixled::random::UniformDistribution usage example. * * random_uniform_t.gif | random_uniform_xy_t.gif | random_uniform_xy_t_hue.gif * --------------|------------------|---------------------- * ![RandomT](random_uniform_t.gif) | ![RandomXYT](random_uniform_xy_t.gif) | ![RandoRandomXYT with hue](random_uniform_xy_t_hue.gif) * */ /** * @example pixled/random/normal.cpp * * A pixled::random::NormalDistribution usage example. * * random_normal_t.gif | random_normal_xy_t.gif | random_normal_xy_t_hue.gif * --------------|------------------|---------------------- * ![RandomT](random_normal_t.gif) | ![RandomXYT](random_normal_xy_t.gif) | ![RandoRandomXYT with hue](random_normal_xy_t_hue.gif) * */ } /** * Namespace containing comparison operators and the If statement. */ namespace conditional { /** * @example pixled/conditional/conditional.cpp * * Demonstrates the If statement usage. * * conditional_eq.gif | conditional_less_greater.gif | * -------------------|| * ![Conditionnal Equal](conditional_eq.gif) | ![Conditionnal Less * Greater](conditional_less_greater.gif) | * */ } /** * Namespace containing wave functions. */ namespace signal { /** * @example pixled/signal/sine.cpp * * Demonstrates the pixled::signal::Sine usage. * * sine_t.gif | sine_x.gif | sine_x_t.gif | sine_radial_t.gif * -----------|------------|--------------|------------------ * ![Sine T](sine_t.gif) | ![Sine X](sine_x.gif) | ![Sine X T](sine_x_t.gif) | ![Sine Radial T](sine_radial_t.gif) * */ /** * @example pixled/signal/triangle.cpp * * A (relatively advanced) pixled::signal::Triangle example. But the * Triangle function can be used exactly the same way as Sine, so also * see the pixled/signal/sine.cpp example. * * insane_triangle_ratial_t.gif || * -----------------------------|| * ![Insane Triangle Ratial T](insane_triangle_radial_t.gif) || * */ /** * @example pixled/signal/square.cpp * * Demonstrates the pixled::signal::Square usage. * * square_t.gif | square_x.gif | square_x_t.gif | square_radial_t.gif * -----------|------------|--------------|------------------ * ![Square T](square_t.gif) | ![Square X](square_x.gif) | ![Square X T](square_x_t.gif) | ![Square Radial T](square_radial_t.gif) * */ /** * @example pixled/signal/sawtooth.cpp * * Demonstrates the pixled::signal::Sawtooth usage. * * sawtooth_t.gif | sawtooth_x.gif | sawtooth_x_t.gif | sawtooth_radial_t.gif * -----------|------------|--------------|------------------ * ![Sawtooth T](sawtooth_t.gif) | ![Sawtooth X](sawtooth_x.gif) | ![Sawtooth X T](sawtooth_x_t.gif) | ![Sawtooth Radial T](sawtooth_radial_t.gif) * */ } } /** * @mainpage pixled-lib API documentation * * Pixled is a generic, modern and cross-platform C++11 led animation * generation library based on functionnal programming language concepts. * * This documentation describes detailed and low-level features of the * pixled-lib API. In order to get started, you might have a look to the * [pixled wiki](https://github.com/pixled/pixled-lib/wiki). * * This documentation is however a good complement to the wiki, due to the * numerous examples referenced for many features, especially for items in the * pixled::animation and pixled::geometry namespaces. * * ![Sine Radial T](sine_radial_t.gif) ![Square Radial T](square_radial_t.gif) ![Insane Triangle](insane_triangle_radial_t.gif) * * ![Random Normal Hue](random_normal_xy_t_hue.gif) ![Sine XT](sine_x_t.gif) ![Sine T](sine_t.gif) */
9bb0cd6bcc2c5e703f626ad46527ceb023dfa8e9
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5708284669460480_0/C++/misha100896/main.cpp
173719c4a4ad4abce268c8b4843af2947a6819f5
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
3,190
cpp
main.cpp
#include <bits/stdc++.h> using namespace std; int t, k, l, s; string a, b; long double bukv[26]; long double dp[101][101], dp1[101][101]; long double LL; bool DP[101][101]; long double f(int r1) { for (int i = 0; i < r1; ++i) if (b[i] != b[i + 1]) return 0; return 1; } int main() { freopen("aaa.in","r",stdin); freopen("output.txt","w",stdout); cin >> t; for (int j = 0; j < t; ++j) { cin >> k >> l >> s >> a >> b; memset(bukv, 0, sizeof(bukv)); for (int i = 0; i < k; ++i) ++bukv[(int)(a[i] - 'A')]; memset(dp, 0, sizeof(dp)); LL = 0; for (int i = 0; i < 26; ++i) if (i != int(b[0] - 'A')) LL += bukv[i] / k; memset(DP, false, sizeof(DP)); for (int i1 = 0; i1 <= l; ++i1) for (int j1 = 0; j1 < 26; ++j1) { DP[i1][j1] = true; for (int z = 0; z < l; ++z) if (int(b[z] - 'A') == j1) { int zz = z - 1, kol = i1; while (zz >= 0 && kol > 0 && b[zz] == b[kol - 1]) { --zz; --kol; } if (zz < 0) { DP[i1][j1] = false; break; } } } dp[0][0] = 1; for (int i = 0; i < s; ++i) { for (int i1 = 0; i1 < 101; ++i1) for (int j1 = 0; j1 < 101; ++j1) { dp1[i1][j1] = dp[i1][j1]; dp[i1][j1] = 0; } for (int i1 = 0; i1 <= l; ++i1) for (int j1 = 0; j1 <= s; ++j1) { if (i1 == 0) { for (int z = 0; z <= l; ++z) for (int zz = 0; zz < 26; ++zz) if (DP[z][zz]) dp[i1][j1] += dp1[z][j1] * bukv[zz] / k; continue; } if (i1 == l) { dp[i1][j1 + 1] += dp1[i1 - 1][j1] * bukv[b[l - 1] - 'A'] / k + f(l - 1) * dp1[i1][j1] * bukv[b[l - 1] - 'A'] / k; continue; } dp[i1][j1] += dp1[i1 - 1][j1] * bukv[b[i1 - 1] - 'A'] / k + f(i1 - 1) * (1 - f(i1)) * dp1[i1][j1] * bukv[b[i1 - 1] - 'A'] / k; } } int z = 0; for (int i1 =0; i1 <= l; ++i1) for (int j1 = 0; j1 <= s; ++j1) if (dp[i1][j1] != 0) z = j1; long double rez = 0; for (int i1 = 0; i1 <= l; ++i1) for (int j1 = 0; j1 < z; ++j1) rez += dp[i1][j1] * (z - j1); cout << fixed << setprecision(10); if (s > 7) rez = 9; cout << "Case #" << j + 1 << ": " << rez << '\n'; } return 0; }
38bf78d4b8076c93ac33168b5fbb9ddc3d471cdd
2fe616179636487f86167fa7d1283f3c8fba18b9
/src/FedTree/DP/differential_privacy.cpp
f767c0177f4e4531bdc828d9c9fdbb5b91c1183f
[]
no_license
JerryLife/DeltaBoost
7da9191c07bb3289d87f022b18b04fd89a8e2edd
75e8a7c0a822e26ac0db49355a1a4560e10b3b06
refs/heads/main
2023-08-14T02:09:49.231963
2023-07-30T06:48:44
2023-07-30T06:48:44
672,458,205
2
0
null
2023-07-30T06:39:33
2023-07-30T06:39:32
null
UTF-8
C++
false
false
4,269
cpp
differential_privacy.cpp
// // Created by Tianyuan Fu on 14/3/21. // #include "FedTree/DP/differential_privacy.h" #include "FedTree/Tree/GBDTparam.h" #include <numeric> #include <random> #include <math.h> void DifferentialPrivacy::init(FLParam flparam) { GBDTParam gbdt_param = flparam.gbdt_param; this->lambda = gbdt_param.lambda; this->delta_g = 3 * this->max_gradient * this->max_gradient; this->delta_v = this->max_gradient / (1.0+this->lambda); this->privacy_budget = flparam.privacy_budget; this->privacy_budget_per_tree = this->privacy_budget / gbdt_param.n_trees; this->privacy_budget_leaf_nodes = this->privacy_budget_per_tree / 2.0; this->privacy_budget_internal_nodes = this->privacy_budget_per_tree / 2.0 / gbdt_param.depth; } /** * calculates p value based on gain value for each split point * @param gain - gain values of all split points in the level * @param prob_exponent - exponent for the probability mass; the probability mass is exp(prob_exponent[i]) */ void DifferentialPrivacy::compute_split_point_probability(SyncArray<float_type> &gain, SyncArray<float_type> &prob_exponent) { auto prob_exponent_data = prob_exponent.host_data(); auto gain_data = gain.host_data(); for(int i = 0; i < gain.size(); i ++) { prob_exponent_data[i] = this->privacy_budget_internal_nodes * gain_data[i] / 2 / delta_g; // LOG(INFO) << "budget" << this->privacy_budget_internal_nodes; // LOG(INFO) << "gain" << gain_data[i]; } } /** * exponential mechanism: randomly selects split point based on p value * @param prob_exponent - exponent for the probability mass; the probability mass is exp(prob_exponent[i]) * @param gain - gain values of all split points in the level * @param best_idx_gain - mapping from the node index to the gain of split point; containing all the node in the level */ void DifferentialPrivacy::exponential_select_split_point(SyncArray<float_type> &prob_exponent, SyncArray<float_type> &gain, SyncArray<int_float> &best_idx_gain, int n_nodes_in_level, int n_bins) { // initialize randomization std::random_device device; std::mt19937 generator(device()); std::uniform_real_distribution<> distribution(0.0, 1.0); auto prob_exponent_data = prob_exponent.host_data(); auto gain_data = gain.host_data(); auto best_idx_gain_data = best_idx_gain.host_data(); vector<float> probability(n_bins * n_nodes_in_level); for(int i = 0; i < n_nodes_in_level; i ++) { int start = i * n_bins; int end = start + n_bins - 1; // Given the probability exponent: a, b, c, d // The probability[0] can be calculated by exp(a)/(exp(a)+exp(b)+exp(c)+exp(d)) // To avoid overflow, calculation will be done in 1/(exp(a-a)+exp(b-a)+exp(c-a)+exp(d-a)) // Probability value with respect to the bin will be stored in probability vector for(int j = start; j <= end; j ++) { float curr_exponent = prob_exponent_data[j]; float prob_sum_denominator = 0; for(int k = start; k <= end; k ++) { prob_sum_denominator += exp(prob_exponent_data[k] - curr_exponent); } probability[j] = 1.0 / prob_sum_denominator; } float random_sample = distribution(generator); float partial_sum = 0; for(int j = start; j <= end; j ++) { partial_sum += probability[j]; if(partial_sum > random_sample) { best_idx_gain_data[i] = thrust::make_tuple(j, gain_data[j]); break; } } } } /** * add Laplace noise to the data * @param node - the leaf node which noise are to be added */ void DifferentialPrivacy::laplace_add_noise(Tree::TreeNode &node) { // a Laplace(0, b) variable can be generated by the difference of two i.i.d Exponential(1/b) variables float b = this->delta_v/privacy_budget_leaf_nodes; std::random_device device; std::mt19937 generator(device()); std::exponential_distribution<double> distribution(1.0/b); double noise = distribution(generator) - distribution(generator); node.base_weight += noise; }
7edbc409aab72a210888e93bf385e00ff2580800
c747e6208cf1782cb92aa830f4b10a673867ea75
/Flight.h
45781bae0b55d06dbd9c61b67eb1869350faabe8
[]
no_license
tom-wr/FMP2
3d909b77c47ee19dd2934690689785473d124218
c2d2059715c5e9181cf430b543e0ae306b46af23
refs/heads/master
2016-09-06T13:31:33.589837
2013-12-12T16:28:35
2013-12-12T16:28:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,804
h
Flight.h
/** Flight class holds it's own flight information and passenger lists. */ #ifndef FLIGHT_H_ #define FLIGHT_H_ #include <string> #include <vector> #include "WaitingList.h" #include "BookedList.h" #include "Date.h" #include "View.h" using namespace std; class Flight { public: /** * Flight constructor. * @param flightNumber string& - flight number. * @param capacity int - capacity of flight. * @param date Date& - date of flight. */ Flight(string& _flightNumber, int _capacity, Date& _date); /** * adds a passenger to the booked list given the required seat type. * @param passenger Passenger* - pointer to passenger to add. * @param seat const Seat::Type - seat type indicating which list to add passenger to. */ void addPassengerToBookedList(Passenger* passenger, const Seat::Type seat); /** * adds a passenger to the waiting list given the required seat type. * @param passenger Passenger* - pointer to passenger to add. * @param seat const Seat::Type - seat type indicating which list to add passenger to. */ void addPassengerToWaitingList(Passenger* passenger, const Seat::Type seat); /** * remove passenger from flight. * @param name string& - name of passenger to remove. */ void removePassenger(string& name); /** * checks seat is available in booked list for given seat type. * @param seat Seat::Type - seat type to be check if available. */ bool checkSeatIsAvailable(Seat::Type seat); /** * searches for a passenger on the flight based on their name. * @param passengerName string& - name of passenger to be searched for. */ bool searchForPassenger(string& passengerName); /** * getter for flight number. * @return const string& - flight number of flight. */ string& getFlightNumber(void); /** * getter for flight capacity. * @return const int - capacity of flight. */ const int getCapacity(void) const; /** * getter for flight date. * @return Date& - date of flight. */ Date& getDate(void); /** * getter for waiting list. * @return WaitingList* - pointer to waiting list of flight. */ WaitingList* getWaitingList(void); /** * getter for booked list. * @return BookedList* - pointer to booked list of flight. */ BookedList* getBookedList(void); private: // flight number string flightNumber; // flight capacity int capacity; // flight date Date date; // lists for the flight WaitingList waitingList; BookedList bookedList; /* * checks if the first class booked list is full/ * @return bool - true if first class list is full / false if not full */ bool firstIsFull(void); /* * checks if the economy class booked list is full/ * @return bool - true if economy class list is full / false if not full */ bool economyIsFull(void); }; #endif /* FLIGHT_H_ */
609cff77ad735d6da1f3124ab5d1feb9042673c2
1a88c2e7da8b5695867805678b2c6b2c092d0d67
/src/animation.cpp
3876e928f5289c7ff5727cf82e6d032ef3b9c11d
[]
no_license
chen-yd18/MergeForMelon
0794943db2b38c9f07db4bd93bf02649737331c5
d8f5b5a46b3d32ea5bca48a2d08a3f1e79bfff8c
refs/heads/main
2023-05-10T05:49:10.216486
2021-06-11T06:17:36
2021-06-11T06:17:36
359,419,205
1
0
null
null
null
null
UTF-8
C++
false
false
1,472
cpp
animation.cpp
#include "animation.h" #include "window_const.h" #include "fruit.h" extern Texture2D goldenLight; extern Texture2D bigWatermelon; WatermelonAnimation generateWatermelonAnimation() { return (WatermelonAnimation){totalFrames}; } void drawWatermelonAnimation(WatermelonAnimation *anim) { Vector2 lightPosition = (Vector2){WINDOW_WIDTH/2 - 2*fruitRadius[_WATERMELON], WINDOW_HEIGHT*0.8*anim->remainingFrames/totalFrames - 2*fruitRadius[_WATERMELON]}; Vector2 melonPosition = (Vector2){WINDOW_WIDTH/2 - fruitRadius[_WATERMELON], WINDOW_HEIGHT*0.8*anim->remainingFrames/totalFrames - fruitRadius[_WATERMELON]}; DrawTextureEx(goldenLight, lightPosition, 0, 2*fruitRadius[_WATERMELON]/goldenLightRadius, WHITE); DrawTextureEx(bigWatermelon, melonPosition, 0, 1, WHITE); anim->remainingFrames--; } JuiceAnimation createJuiceAnimation(double X, double Y, int pretype, int totalFrames) { double CenterX = X; double CenterY = Y; int type = pretype; int remainingFrames = totalFrames; return (JuiceAnimation){CenterX, CenterY, type, remainingFrames}; } extern Texture2D textureJuice[11]; void drawJuiceAnimation(JuiceAnimation *anim) { Vector2 position = (Vector2){anim->centerX-fruitRadius[anim->type], anim->centerY-fruitRadius[anim->type]}; DrawTextureEx(textureJuice[anim->type], position, 0, 2.0*fruitRadius[anim->type]/juiceHeight, WHITE); anim->remainingFrames--; }
89940a0973038878c716b3d10a037a9ff4a2e227
2b2ef610805167b38ee1095a7b960dc82bb176d2
/Src/GIS/tile/terrainquadtree.cpp
108f81cda8d6fdbeac65ec54bde17963d1c7ae20
[ "MIT" ]
permissive
imgui-works/Car-Navigation_gis_gps_map_terrain
0533aca4e6ec6bc49100009b0601e6acd5dcd0eb
4b9a33f9a386d5e9355b174962d6b5b756dfc477
refs/heads/master
2023-06-14T07:11:13.860022
2021-07-11T01:01:46
2021-07-11T01:01:46
null
0
0
null
null
null
null
UHC
C++
false
false
30,823
cpp
terrainquadtree.cpp
#include "stdafx.h" #include "terrainquadtree.h" using namespace graphic; cQuadTileManager *cTerrainQuadTree::m_tileMgr = nullptr; // sQuadData sQuadData::sQuadData() { ZeroMemory(level, sizeof(level)); tile = NULL; } // // Quad Tree Traverse Stack Memory (no multithread safe!!) struct sData { sRectf rect; int level; sQuadTreeNode<sQuadData> *node; }; sData g_stack[1024]; // cTerrainQuadTree::cTerrainQuadTree() : m_showQuadTree(false) , m_showTexture(true) , m_showTile(true) , m_showFacility(true) , m_showWireframe(false) , m_isLight(true) , m_isCalcResDistribution(false) , m_showQuadCount(0) , m_isShowLevel(false) , m_isShowLoc(false) , m_isShowPoi1(true) , m_isShowPoi2(false) , m_isShowDistribute(true) , m_isRenderOptimize(false) , m_optimizeLevel(cQuadTree<sQuadData>::MAX_LEVEL) , m_techniqType(4) , m_distributeType(0) , m_fps(0) , m_calcOptimizeTime(0) , m_t0(0) , m_t1(0) , m_t2(0) , m_nodeBuffer(NULL) , m_distanceLevelOffset(20) , m_tileRenderFlag(0x01 | 0x02) { m_techName[0] = "Light"; m_techName[1] = "NoTexture"; m_techName[2] = "Heightmap"; m_techName[3] = "Light_Heightmap"; m_techName[4] = "Unlit"; m_techName[5] = "Wireframe"; m_txtColor = Vector3(1, 0, 0); if (!m_tileMgr) m_tileMgr = new cQuadTileManager(); } cTerrainQuadTree::cTerrainQuadTree(sRectf &rect) { if (!m_tileMgr) m_tileMgr = new cQuadTileManager(); } cTerrainQuadTree::~cTerrainQuadTree() { SAFE_DELETE(m_tileMgr); Clear(); } bool cTerrainQuadTree::Create(graphic::cRenderer &renderer , const bool isResDistriubution) { sVertexNormTex vtx; vtx.p = Vector3(0, 0, 0); vtx.n = Vector3(0, 1, 0); vtx.u = 0; vtx.v = 0; m_vtxBuff.Create(renderer, 1, sizeof(sVertexNormTex), &vtx); const StrPath fileName = cResourceManager::Get()->GetResourceFilePath( "shader11/tess-pos-norm-tex.fxo"); if (!m_shader.Create(renderer, fileName, "Unlit" , eVertexType::POSITION | eVertexType::NORMAL | eVertexType::TEXTURE0)) { return false; } m_mtrl.InitWhite(); m_mtrl.m_specular = Vector4(0, 0, 0, 1); // root node 10 x 5 tiles sRectf rootRect = sRectf::Rect(0, 0, 1 << cQuadTree<sQuadData>::MAX_LEVEL, 1 << cQuadTree<sQuadData>::MAX_LEVEL); m_qtree.m_rootRect = sRectf::Rect(0, 0, rootRect.right*10, rootRect.bottom*5); m_text.Create(renderer, 18.f, true, "Consolas"); ReadResourceTDistribution("../Media/WorldTerrain/ResFiles/res_texture_distribution.txt"); ReadResourceHDistribution("../Media/WorldTerrain/ResFiles/res_height_distribution.txt"); m_timer.Create(); return true; } // lonLat : 카메라가 가르키는 위경도 void cTerrainQuadTree::Update(graphic::cRenderer &renderer, const Vector2d &camLonLat, const float deltaSeconds) { const double t0 = m_timer.GetSeconds(); m_tileMgr->Update(renderer, *this, camLonLat, deltaSeconds); const double t1 = m_timer.GetSeconds(); m_t2 = t1 - t0; } void cTerrainQuadTree::Render(graphic::cRenderer &renderer , const float deltaSeconds , const graphic::cFrustum &frustum , const Ray &ray , const Ray &mouseRay ) { // 렌더링 최적화. // fps가 낮으면, 더 적게 렌더링한다. // 출력하는 최대 Quad Level을 낮추면, 더 적게 렌더링한다. if (m_isRenderOptimize) { m_calcOptimizeTime += deltaSeconds; if (m_calcOptimizeTime > 1.f) { m_calcOptimizeTime = 0; m_fps = renderer.m_fps; if (renderer.m_fps < 20) m_optimizeLevel = max(1, m_optimizeLevel - 1); else if (renderer.m_fps > 30) m_optimizeLevel = min((int)cQuadTree<sQuadData>::MAX_LEVEL, m_optimizeLevel + 1); } } const double t0 = m_timer.GetSeconds(); BuildQuadTree(frustum, ray); const double t1 = m_timer.GetSeconds(); m_t0 = t1 - t0; if (m_showTexture) RenderTessellation(renderer, deltaSeconds, frustum); const double t2 = m_timer.GetSeconds(); m_t1 = t2 - t1; if (m_showWireframe) RenderWireframe(renderer, deltaSeconds, frustum); if (m_showFacility) RenderFacility(renderer, deltaSeconds, frustum); if (m_showQuadTree) RenderQuad(renderer, deltaSeconds, frustum, mouseRay); if (m_isShowDistribute) RenderResDistribution(renderer, deltaSeconds, frustum, m_distributeType); } void cTerrainQuadTree::BuildQuadTree(const graphic::cFrustum &frustum , const Ray &ray) { m_qtree.Clear(false); if (!m_nodeBuffer) m_nodeBuffer = new sQuadTreeNode<sQuadData>[1024 * 2]; for (int i = 0; i < 50; ++i) { m_nodeBuffer[i].parent = NULL; m_nodeBuffer[i].children[0] = NULL; m_nodeBuffer[i].children[1] = NULL; m_nodeBuffer[i].children[2] = NULL; m_nodeBuffer[i].children[3] = NULL; m_nodeBuffer[i].data.tile = NULL; } int nodeCnt = 0; for (int x = 0; x < 10; ++x) { for (int y = 0; y < 5; ++y) { sQuadTreeNode<sQuadData> *node = &m_nodeBuffer[nodeCnt++]; node->xLoc = x; node->yLoc = y; node->level = 0; m_qtree.Insert(node); } } int sp = 0; for (auto &node : m_qtree.m_roots) { sRectf rect = m_qtree.GetNodeRect(node); g_stack[sp++] = { rect, node->level, node }; } while (sp > 0) { const sRectf rect = g_stack[sp - 1].rect; const int lv = g_stack[sp - 1].level; sQuadTreeNode<sQuadData> *parentNode = g_stack[sp - 1].node; --sp; //const float maxH = GetMaximumHeight(parentNode); const float maxH = parentNode ? m_tileMgr->GetMaximumHeight(parentNode->level , parentNode->xLoc, parentNode->yLoc) : cHeightmap2::DEFAULT_H; if (!IsContain(frustum, rect, maxH)) continue; const float hw = rect.Width() / 2.f; const float hh = rect.Height() / 2.f; const bool isMinSize = hw < 1.f; if (isMinSize) continue; bool isSkipThisNode = false; { const Vector3 center = Vector3(rect.Center().x, maxH, rect.Center().y); const float distance = center.Distance(ray.orig); const int curLevel = GetLevel(distance); isSkipThisNode = (lv >= curLevel); } Vector3 childPoint[4]; // Rect의 꼭지점 4개 childPoint[0] = Vector3(rect.left, 0, rect.top); childPoint[1] = Vector3(rect.right, 0, rect.top); childPoint[2] = Vector3(rect.left, 0, rect.bottom); childPoint[3] = Vector3(rect.right, 0, rect.bottom); bool isChildShow = false; if (isSkipThisNode && (hw > 2.f)) // test child node distance { for (int i = 0; i < 4; ++i) { const float distance = childPoint[i].Distance(ray.orig); const int curLevel = GetLevel(distance); if (lv < curLevel) { isChildShow = true; break; } } } if (isSkipThisNode && !isChildShow) continue; for (int i = nodeCnt; i < nodeCnt + 4; ++i) { m_nodeBuffer[i].parent = NULL; m_nodeBuffer[i].children[0] = NULL; m_nodeBuffer[i].children[1] = NULL; m_nodeBuffer[i].children[2] = NULL; m_nodeBuffer[i].children[3] = NULL; m_nodeBuffer[i].data.tile = NULL; } sQuadTreeNode<sQuadData> *pp[4] = { &m_nodeBuffer[nodeCnt] , &m_nodeBuffer[nodeCnt + 1] , &m_nodeBuffer[nodeCnt + 2] , &m_nodeBuffer[nodeCnt + 3] }; m_qtree.InsertChildren(parentNode, pp); nodeCnt += 4; //m_qtree.InsertChildren(parentNode); g_stack[sp++] = { sRectf::Rect(rect.left, rect.top, hw, hh), lv+1, parentNode->children[0] }; g_stack[sp++] = { sRectf::Rect(rect.left + hw, rect.top, hw, hh), lv+1, parentNode->children[1] }; g_stack[sp++] = { sRectf::Rect(rect.left, rect.top + hh, hw, hh), lv+1, parentNode->children[2] }; g_stack[sp++] = { sRectf::Rect(rect.left + hw, rect.top + hh, hw, hh), lv+1, parentNode->children[3] }; assert(sp < 1024); } } // 지형 출력 void cTerrainQuadTree::RenderTessellation(graphic::cRenderer &renderer , const float deltaSeconds , const graphic::cFrustum &frustum ) { m_shader.SetTechnique(m_techName[m_techniqType]); m_shader.Begin(); m_shader.BeginPass(renderer, 0); renderer.m_cbLight.Update(renderer, 1); renderer.m_cbMaterial = m_mtrl.GetMaterial(); renderer.m_cbMaterial.Update(renderer, 2); int sp = 0; for (auto &node : m_qtree.m_roots) { sRectf rect = m_qtree.GetNodeRect(node); g_stack[sp++] = { rect, node->level, node }; } while (sp > 0) { sQuadTreeNode<sQuadData> *node = g_stack[sp - 1].node; --sp; const float maxH = node? m_tileMgr->GetMaximumHeight(node->level , node->xLoc, node->yLoc) : cHeightmap2::DEFAULT_H; const sRectf rect = m_qtree.GetNodeRect(node); if (!IsContain(frustum, rect, maxH)) continue; // leaf node? if (!node->children[0] || (m_showWireframe && (node->level > 8))) { cQuadTile *tile = m_tileMgr->GetTile(renderer, node->level, node->xLoc, node->yLoc, rect); tile->m_renderFlag = m_tileRenderFlag; node->data.tile = tile; m_tileMgr->LoadResource(renderer, *this, *tile, node->level, node->xLoc, node->yLoc, rect); if (m_showTile) tile->Render(renderer, deltaSeconds, node->data.level); if (m_isShowPoi1 || m_isShowPoi2) tile->RenderPoi(renderer, deltaSeconds, m_isShowPoi1, m_isShowPoi2); } else { const sRectf rect = m_qtree.GetNodeRect(node); cQuadTile *tile = m_tileMgr->GetTile(renderer, node->level, node->xLoc, node->yLoc, rect); tile->m_renderFlag = m_tileRenderFlag; node->data.tile = tile; m_tileMgr->LoadResource(renderer, *this, *tile, node->level, node->xLoc, node->yLoc, rect); if (m_isShowPoi1 || m_isShowPoi2) tile->RenderPoi(renderer, deltaSeconds, m_isShowPoi1, m_isShowPoi2); for (int i = 0; i < 4; ++i) if (node->children[i]) g_stack[sp++].node = node->children[i]; } } renderer.UnbindShaderAll(); } // 지형 출력 void cTerrainQuadTree::RenderWireframe(graphic::cRenderer &renderer , const float deltaSeconds , const graphic::cFrustum &frustum) { CommonStates states(renderer.GetDevice()); renderer.GetDevContext()->RSSetState(states.Wireframe()); m_shader.SetTechnique(m_techName[5]); m_shader.Begin(); m_shader.BeginPass(renderer, 0); renderer.m_cbLight.Update(renderer, 1); // wire color renderer.m_cbMaterial = m_mtrl.GetMaterial(); const Vector4 diffuse = m_showTile ? Vector4(0, 0, 0, 1) : Vector4(1, 1, 1, 1); renderer.m_cbMaterial.m_v->diffuse = XMVectorSet(diffuse.x, diffuse.y, diffuse.z, diffuse.w); renderer.m_cbMaterial.Update(renderer, 2); int sp = 0; for (auto &node : m_qtree.m_roots) { sRectf rect = m_qtree.GetNodeRect(node); g_stack[sp++] = { rect, node->level, node }; } while (sp > 0) { sQuadTreeNode<sQuadData> *node = g_stack[sp - 1].node; --sp; const float maxH = node ? m_tileMgr->GetMaximumHeight(node->level , node->xLoc, node->yLoc) : cHeightmap2::DEFAULT_H; const sRectf rect = m_qtree.GetNodeRect(node); if (!IsContain(frustum, rect, maxH)) continue; // leaf node? if (!node->children[0] || (node->level > 8)) { if ((node->level > 6) || !m_showTile) { cQuadTile *tile = m_tileMgr->GetTile(renderer, node->level, node->xLoc, node->yLoc, rect); tile->Render(renderer, deltaSeconds, node->data.level); } } else { for (int i = 0; i < 4; ++i) if (node->children[i]) g_stack[sp++].node = node->children[i]; } } renderer.UnbindShaderAll(); } // 건물출력 void cTerrainQuadTree::RenderFacility(graphic::cRenderer &renderer , const float deltaSeconds , const graphic::cFrustum &frustum) { int sp = 0; for (auto &node : m_qtree.m_roots) { sRectf rect = m_qtree.GetNodeRect(node); g_stack[sp++] = { rect, node->level, node }; } while (sp > 0) { sQuadTreeNode<sQuadData> *node = g_stack[sp - 1].node; --sp; const float maxH = node ? m_tileMgr->GetMaximumHeight(node->level , node->xLoc, node->yLoc) : cHeightmap2::DEFAULT_H; const sRectf rect = m_qtree.GetNodeRect(node); if (!IsContain(frustum, rect, maxH)) continue; // leaf node? if (!node->children[0]) { cQuadTile *tile = m_tileMgr->GetTile(renderer, node->level, node->xLoc, node->yLoc, rect); tile->RenderFacility(renderer, deltaSeconds); } else { const sRectf rect = m_qtree.GetNodeRect(node); cQuadTile *tile = m_tileMgr->GetTile(renderer, node->level, node->xLoc, node->yLoc, rect); for (int i = 0; i < 4; ++i) if (node->children[i]) g_stack[sp++].node = node->children[i]; } } renderer.UnbindShaderAll(); } // QaudTree 정보를 출력한다. // QuadRect, Level, xLoc, yLoc void cTerrainQuadTree::RenderQuad(graphic::cRenderer &renderer , const float deltaSeconds , const graphic::cFrustum &frustum , const Ray &ray) { cShader11 *shader = renderer.m_shaderMgr.FindShader(eVertexType::POSITION); assert(shader); shader->SetTechnique("Light");// "Unlit"); shader->Begin(); shader->BeginPass(renderer, 0); struct sInfo { sRectf r; sQuadTreeNode<sQuadData> *node; }; sInfo showRects[512]; int showRectCnt = 0; vector<std::pair<sRectf, cColor>> ars; m_showQuadCount = 0; int sp = 0; for (auto &node : m_qtree.m_roots) { sRectf rect = m_qtree.GetNodeRect(node); g_stack[sp++] = { rect, node->level, node }; } // Render Quad-Tree while (sp > 0) { sQuadTreeNode<sQuadData> *node = g_stack[sp - 1].node; --sp; const float maxH = node ? m_tileMgr->GetMaximumHeight(node->level , node->xLoc, node->yLoc) : cHeightmap2::DEFAULT_H; const sRectf rect = m_qtree.GetNodeRect(node); const bool isShow = IsContain(frustum, rect, maxH); if (!isShow) continue; // leaf node? if (!node->children[0]) { cQuadTile *tile = m_tileMgr->GetTile(renderer, node->level, node->xLoc, node->yLoc, rect); if (tile) { //if (tile->m_facility && tile->m_facilityIndex) //{ // const Vector3 norm = tile->m_facilityIndex->m_objs[0].normal; // const Vector3 p0 = tile->m_mod.m_transform.pos; // const Vector3 p1 = tile->m_mod.m_transform.pos + norm * 1.f; // renderer.m_dbgLine.SetLine(p0, p1, 0.01f); // renderer.m_dbgLine.Render(renderer); //} } RenderRect3D(renderer, deltaSeconds, rect, cColor::BLACK); //if (isShow && (showRectCnt < ARRAYSIZE(showRects))) if (showRectCnt < ARRAYSIZE(showRects)) { showRects[showRectCnt].r = rect; showRects[showRectCnt].node = node; showRectCnt++; } //if (isShow) ++m_showQuadCount; } else { for (int i = 0; i < 4; ++i) if (node->children[i]) g_stack[sp++].node = node->children[i]; } } // Render Show QuadNode for (int i = 0; i < showRectCnt; ++i) { const sRectf &rect = showRects[i].r; RenderRect3D(renderer, deltaSeconds, rect, cColor::WHITE); } // Render north, south, west, east quad node Plane ground(Vector3(0, 1, 0), 0); const Vector3 relPos = ground.Pick(ray.orig, ray.dir); const Vector3 globalPos = m_qtree.GetGlobalPos(relPos); if (sQuadTreeNode<sQuadData> *node = m_qtree.GetNode(sRectf::Rect(globalPos.x, globalPos.z, 0, 0))) { const sRectf rect = m_qtree.GetNodeRect(node); ars.push_back({ rect, cColor::WHITE }); if (sQuadTreeNode<sQuadData> *north = m_qtree.GetNorthNeighbor(node)) { const sRectf r = m_qtree.GetNodeRect(north); ars.push_back({ r, cColor::RED }); } if (sQuadTreeNode<sQuadData> *east = m_qtree.GetEastNeighbor(node)) { const sRectf r = m_qtree.GetNodeRect(east); ars.push_back({ r, cColor::GREEN }); } if (sQuadTreeNode<sQuadData> *south = m_qtree.GetSouthNeighbor(node)) { const sRectf r = m_qtree.GetNodeRect(south); ars.push_back({ r, cColor::BLUE }); } if (sQuadTreeNode<sQuadData> *west = m_qtree.GetWestNeighbor(node)) { const sRectf r = m_qtree.GetNodeRect(west); ars.push_back({ r, cColor::YELLOW }); } } for (auto &data : ars) { const sRectf &r = data.first; CommonStates state(renderer.GetDevice()); renderer.GetDevContext()->RSSetState(state.CullNone()); renderer.GetDevContext()->OMSetDepthStencilState(state.DepthNone(), 0); RenderRect3D(renderer, deltaSeconds, r, data.second); renderer.GetDevContext()->OMSetDepthStencilState(state.DepthDefault(), 0); renderer.GetDevContext()->RSSetState(state.CullCounterClockwise()); } // Render Show QuadNode if (m_isShowLevel || m_isShowLoc) { FW1FontWrapper::CFW1StateSaver stateSaver; stateSaver.saveCurrentState(renderer.GetDevContext()); for (int i = 0; i < showRectCnt; ++i) { const sRectf &rect = showRects[i].r; const Vector3 offset = Vector3(rect.Width()*0.1f, 0, -rect.Height()*0.1f); const Vector2 pos = GetMainCamera().GetScreenPos(Vector3(rect.left, 0, rect.bottom) + offset); m_text.SetColor(cColor(m_txtColor)); if (m_isShowLevel) { WStr32 strLv; strLv.Format(L"%d", showRects[i].node->level); m_text.SetText(strLv.c_str()); m_text.Render(renderer, pos.x, pos.y, false, false); } if (m_isShowLoc) { WStr32 strLoc; strLoc.Format(L"xyLoc = {%d, %d}", showRects[i].node->xLoc, showRects[i].node->yLoc); m_text.SetText(strLoc.c_str()); m_text.Render(renderer, pos.x, pos.y+20, false, false); if (showRects[i].node->data.tile && showRects[i].node->data.tile->m_replaceHeightLv >= 0) { strLoc.Format(L"rep h = %d", showRects[i].node->data.tile->m_replaceHeightLv); m_text.SetText(strLoc.c_str()); m_text.Render(renderer, pos.x, pos.y + 40, false, false); } } } stateSaver.restoreSavedState(); } } // resType: 0=texture, 1=heightmap void cTerrainQuadTree::RenderResDistribution(graphic::cRenderer &renderer , const float deltaSeconds , const graphic::cFrustum &frustum , const int resType) { const Vector3 eyePos = GetMainCamera().GetEyePos(); CommonStates state(renderer.GetDevice()); renderer.GetDevContext()->OMSetDepthStencilState(state.DepthNone(), 0); renderer.m_dbgBox.m_color = (0==resType)? cColor::RED : cColor::BLUE; renderer.m_dbgBox.SetBox(Transform()); int cnt = 0; XMMATRIX tms[256]; vector<Vector3> &distrib = (0 == resType) ? m_resTDistribute : m_resHDistribute; for (uint i=0; i < distrib.size(); ++i) { auto &vtx = distrib[i]; if (!frustum.IsIn(vtx)) continue; Transform tfm; tfm.pos = vtx; const float dist = vtx.Distance(eyePos); tfm.scale = Vector3(1, 1, 1) * max(0.1f, (dist * 0.003f)); tms[cnt++] = tfm.GetMatrixXM(); if (cnt >= 256) { renderer.m_dbgBox.RenderInstancing(renderer, cnt, tms); cnt = 0; } } if (cnt > 0) renderer.m_dbgBox.RenderInstancing(renderer, cnt, tms); renderer.GetDevContext()->OMSetDepthStencilState(state.DepthDefault(), 0); } void cTerrainQuadTree::RenderRect3D(graphic::cRenderer &renderer , const float deltaSeconds , const sRectf &rect , const cColor &color ) { Vector3 lines[] = { Vector3(rect.left, 0, rect.top) , Vector3(rect.right, 0, rect.top) , Vector3(rect.right, 0, rect.bottom) , Vector3(rect.left, 0, rect.bottom) , Vector3(rect.left, 0, rect.top) }; renderer.m_rect3D.SetRect(renderer, lines, 5); renderer.m_cbPerFrame.m_v->mWorld = XMIdentity; renderer.m_cbPerFrame.Update(renderer); const Vector4 c = color.GetColor(); renderer.m_cbMaterial.m_v->diffuse = XMVectorSet(c.x, c.y, c.z, c.w); renderer.m_cbMaterial.Update(renderer, 2); renderer.m_rect3D.m_vtxBuff.Bind(renderer); renderer.GetDevContext()->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP); renderer.GetDevContext()->Draw(renderer.m_rect3D.m_lineCount, 0); } // node의 가장 높은 높이를 리턴한다. // tile이 없으면, 부모노드를 검색해서 리턴한다. //float cTerrainQuadTree::GetMaximumHeight(const sQuadTreeNode<sQuadData> *node) //{ // RETV(!node, cHeightmap::DEFAULT_H); // // const cQuadTile *tile = m_tileMgr->FindTile(node->level, node->xLoc, node->yLoc); // if (tile && tile->m_hmap) // return max(cHeightmap::DEFAULT_H, tile->m_hmap->m_maxHeight); // // RETV(node->level <= 1, cHeightmap::DEFAULT_H); // // const int xLoc = node->xLoc >> 1; // const int yLoc = node->yLoc >> 1; // auto parent = m_qtree.GetNode(node->level-1, xLoc, yLoc); // return GetMaximumHeight(parent); //} // 다른 레벨의 쿼드가 인접해 있을 때, 테셀레이션을 이용해서, 마주보는 엣지의 버텍스 갯수를 맞춰준다. // 맞닿아 있는 쿼드의 외곽 테셀레이션 계수를 동일하게 해서, 이음새가 생기지 않게 한다. // When other levels of quads are adjacent, use tessellation to match the number of vertices in the facing edge. // Make the outer tessellation coefficients of the quads equal, so that no seams occur. void cTerrainQuadTree::CalcSeamlessLevel() { m_loopCount = 0; int sp = 0; for (auto &node : m_qtree.m_roots) { sRectf rect = m_qtree.GetNodeRect(node); g_stack[sp++] = { rect, 15, node }; } while (sp > 0) { sQuadTreeNode<sQuadData> *node = g_stack[sp - 1].node; --sp; ++m_loopCount; // leaf node? if (!node->children[0]) { if (sQuadTreeNode<sQuadData> *north = m_qtree.GetNorthNeighbor(node)) CalcQuadEdgeLevel(node, north, eDirection::NORTH); else node->data.level[eDirection::NORTH] = node->level; if (sQuadTreeNode<sQuadData> *east = m_qtree.GetEastNeighbor(node)) CalcQuadEdgeLevel(node, east, eDirection::EAST); else node->data.level[eDirection::EAST] = node->level; if (sQuadTreeNode<sQuadData> *south = m_qtree.GetSouthNeighbor(node)) CalcQuadEdgeLevel(node, south, eDirection::SOUTH); else node->data.level[eDirection::SOUTH] = node->level; if (sQuadTreeNode<sQuadData> *west = m_qtree.GetWestNeighbor(node)) CalcQuadEdgeLevel(node, west, eDirection::WEST); else node->data.level[eDirection::WEST] = node->level; } else { for (int i = 0; i < 4; ++i) if (node->children[i]) g_stack[sp++].node = node->children[i]; } } } // 다른 쿼드와 맞물릴 때, 높은 레벨의 쿼드를 배열에 저장한다. // 테셀레이션에서, 자신의 레벨과, 엣지의 레벨을 비교해, 테셀레이션 팩터를 계산한다. // Save high-level quads to the array when they are mingled with other quads. // In tessellation, compute the tessellation factor by comparing its level with the level of the edge. void cTerrainQuadTree::CalcQuadEdgeLevel(sQuadTreeNode<sQuadData> *from, sQuadTreeNode<sQuadData> *to , const eDirection::Enum dir) { //eDirection::Enum oppDir = GetOpposite(dir); //if (from->data.level[dir] < from->level) // from->data.level[dir] = from->level; //if (to->data.level[oppDir] < from->data.level[dir]) // to->data.level[oppDir] = from->data.level[dir]; //if (from->data.level[dir] < to->data.level[oppDir]) // from->data.level[dir] = to->data.level[oppDir]; //from->data.level[dir] = to->level; if (from->data.level[dir] < to->level) from->data.level[dir] = to->level; } eDirection::Enum cTerrainQuadTree::GetOpposite(const eDirection::Enum type) { switch (type) { case eDirection::NORTH: return eDirection::SOUTH; case eDirection::EAST: return eDirection::WEST; case eDirection::SOUTH: return eDirection::NORTH; case eDirection::WEST: return eDirection::EAST; default: assert(0); return eDirection::SOUTH; } } // frustum 안에 rect가 포함되면 true를 리턴한다. inline bool cTerrainQuadTree::IsContain(const graphic::cFrustum &frustum, const sRectf &rect , const float maxH) { const float hw = rect.Width() / 2.f; const float hh = rect.Height() / 2.f; const float height = std::max(maxH, 2.f); const Vector3 center = Vector3(rect.Center().x, 0, rect.Center().y); cBoundingBox bbox; //bbox.SetBoundingBox(center + Vector3(0,hh,0), Vector3(hw, hh, hh), Quaternion()); //bbox.SetBoundingBox(center + Vector3(0, 0, 0), Vector3(hw, hh*4, hh), Quaternion()); bbox.SetBoundingBox(center + Vector3(0, height / 2.f, 0) , Vector3(hw, height / 2.f, hh) , Quaternion()); const bool reval = frustum.FrustumAABBIntersect(bbox); return reval; } // 카메라와 거리에 따라, 쿼드 레벨을 계산한다. inline int cTerrainQuadTree::GetLevel(const float distance) { int dist = (int)distance - m_distanceLevelOffset; #define CALC(lv) \ if ((dist >>= 1) < 1) \ { \ if (!m_isRenderOptimize)\ return lv; \ else if (m_optimizeLevel >= lv) \ return lv; \ } CALC(cQuadTree<sQuadData>::MAX_LEVEL); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 1); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 2); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 3); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 4); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 5); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 6); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 7); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 8); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 9); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 10); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 11); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 12); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 13); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 14); CALC(cQuadTree<sQuadData>::MAX_LEVEL - 15); return 0; } // 텍스쳐 리소스 분포 파일을 읽는다. bool cTerrainQuadTree::ReadResourceTDistribution(const char *fileName) { m_resTDistribute.clear(); using namespace std; ifstream ifs(fileName); if (!ifs.is_open()) return false; string line; while (getline(ifs, line)) { stringstream ss(line); Vector3 pos; ss >> pos.x >> pos.z; m_resTDistribute.push_back(pos); } return true; } // 높이맵 리소스 분포 파일을 읽는다. bool cTerrainQuadTree::ReadResourceHDistribution(const char *fileName) { m_resHDistribute.clear(); using namespace std; ifstream ifs(fileName); if (!ifs.is_open()) return false; string line; while (getline(ifs, line)) { stringstream ss(line); Vector3 pos; ss >> pos.x >> pos.z; m_resHDistribute.push_back(pos); } return true; } // 마우스 위치의 경위도를 계산해 리턴한다. (높이 연산 제외) // 쿼드트리를 탐색하며 계산한다. // return : long,lat 경위도 Vector2d cTerrainQuadTree::GetLongLat(const Ray &ray) { const Plane ground(Vector3(0, 1, 0), 0); const Vector3 relPos = ground.Pick(ray.orig, ray.dir); return GetWGS84(relPos); } // 경위도에 해당하는 3D 위치를 리턴한다. (relation coordinate) Vector3 cTerrainQuadTree::Get3DPos(const Vector2d &lonLat) { const Vector3 globalPos = gis::WGS842Pos(lonLat); Vector3 relPos = gis::GetRelationPos(globalPos); const sQuadTreeNode<sQuadData> *node = m_qtree.GetNode(sRectf::Rect(globalPos.x, globalPos.z, 0,0)); if (node && !node->data.tile) node = m_qtree.GetNode(node->level-1, node->xLoc>>1, node->yLoc>>1); if (node && node->data.tile) { cQuadTile *tile = node->data.tile; const float u = (relPos.x - tile->m_rect.left) / tile->m_rect.Width(); const float v = 1.f + ((tile->m_rect.top - relPos.z) / tile->m_rect.Height()); relPos.y = tile->GetHeight(Vector2(u, v)) * 2500.f; } return relPos; } // 경위도에 해당하는 3D 위치를 리턴한다. (상대좌표계) // lonLat에 해당하는 파일이 로드되지 않았다면, 파일을 로딩한다. // 속도가 느릴 수 있다. // 높이맵 파일은 로딩하지만, 렌더링을 위한 텍스쳐를 생성하지 않기 때문에, 높이 정보만 // 얻어온 후, 제거해야 문제가 없다. Vector3 cTerrainQuadTree::Get3DPosPrecise(graphic::cRenderer &renderer, const Vector2d &lonLat) { const Vector3 globalPos = gis::WGS842Pos(lonLat); Vector3 relPos = gis::GetRelationPos(globalPos); sRectf rect = sRectf::Rect(globalPos.x, globalPos.z, 0, 0); const auto result = m_qtree.GetNodeLevel(rect); if (std::get<0>(result) < 0) return relPos; // too much file loading, clear all if (m_tileMgr->m_loader1.m_files.size() > 1000) m_tileMgr->Clear(); int level = std::get<0>(result); int x = std::get<1>(result); int y = std::get<2>(result); while (level >= 0) { rect = m_qtree.GetNodeRect(level, x, y); cQuadTile *tile = m_tileMgr->GetTile(renderer, level, x, y, rect); if (!tile) break; if (!tile->m_hmap && m_tileMgr->LoadHeightMapDirect(renderer, *tile, *this, level, x, y, rect)) { // insert heightmap fileloader for clear memory const StrPath fileName = cHeightmap2::GetFileName(g_mediaDemDir, level, x, y); typedef graphic::cFileLoader2<2000, 10, sHeightmapArgs2> FileLoaderType; FileLoaderType::sChunk chunk; chunk.accessTime = 0.f; chunk.state = FileLoaderType::COMPLETE; chunk.data = tile->m_hmap; m_tileMgr->m_loader1.m_files.insert({ fileName.GetHashCode(), chunk }); } if (tile->m_hmap) { const float u = (relPos.x - tile->m_rect.left) / tile->m_rect.Width(); const float v = 1.f + (tile->m_rect.top - relPos.z) / tile->m_rect.Height(); relPos.y = tile->GetHeight(Vector2(u, v)) * 2500.f; break; } x >>= 1; y >>= 1; level--; } return relPos; } // 3D 좌표에 해당하는 경위도를 리턴한다. // 3D 좌표의 높이값은 무시된다. // return: long-lat (경위도) Vector2d cTerrainQuadTree::GetWGS84(const Vector3 &relPos) { const Vector3 globalPos = m_qtree.GetGlobalPos(relPos); const sQuadTreeNode<sQuadData> *node = m_qtree.GetNode(sRectf::Rect(globalPos.x, globalPos.z, 0, 0)); if (!node) return {0,0}; const sRectf rect = m_qtree.GetNodeRect(node); const Vector2d lonLat1 = gis::TileLoc2WGS84(node->level, node->xLoc, node->yLoc); const Vector2d lonLat2 = gis::TileLoc2WGS84(node->level, node->xLoc + 1, node->yLoc + 1); Vector2d lonLat = gis::Pos2WGS84(relPos, lonLat1, lonLat2, rect); return lonLat; } // pos 위치의 지형 높이를 리턴한다. // pos.xy = xz 평면 좌표 float cTerrainQuadTree::GetHeight(const Vector2 &relPos) { //const Vector3 relPos = Vector3(pos.x, 0, pos.y); const Vector3 globalPos = m_qtree.GetGlobalPos(Vector3(relPos.x, 0, relPos.y)); const sQuadTreeNode<sQuadData> *node = m_qtree.GetNode(sRectf::Rect(globalPos.x, globalPos.z, 0, 0)); if (!node) return 0.f; const sQuadTreeNode<sQuadData> *p = node; const cQuadTile *tile = NULL; while (p && !tile) { tile = p->data.tile; p = p->parent; } if (!tile) return 0.f; const float u = (tile->m_rect.left - relPos.x) / tile->m_rect.Width(); const float v = (tile->m_rect.top - relPos.y) / tile->m_rect.Height(); return tile->GetHeight(Vector2(u, v)) * 2500.f; } std::pair<bool, Vector3> cTerrainQuadTree::Pick(const Ray &ray) { sQuadTreeNode<sQuadData> *pnode = NULL; // parent node for (auto &node : m_qtree.m_roots) { if (!node->data.tile) continue; auto result = node->data.tile->Pick(ray); if (result.first) { pnode = node; break; } } RETV(!pnode, std::make_pair(false, Vector3(0,0,0))); const Ray newRay(ray.orig - ray.dir*1000.f, ray.dir); sQuadTreeNode<sQuadData> *pickNode = NULL; for (int i=0; i < 4; ++i) { // is Leaf? if (!pnode->children[0]) { pickNode = pnode; break; } auto &node = pnode->children[i]; if (!node->data.tile) continue; auto result = node->data.tile->Pick(newRay); if (!result.first) continue; pnode = node; i = -1; // because ++i } if (!pickNode) pickNode = pnode; RETV(!pickNode, std::make_pair(false, Vector3(0, 0, 0))); // detail picking pickNode return pickNode->data.tile->Pick(newRay); } void cTerrainQuadTree::Clear() { if (m_tileMgr) m_tileMgr->Clear(); m_qtree.Clear(false); SAFE_DELETEA(m_nodeBuffer); }
5f28b7d56a7b7ee81c1a12823571db707b07e76b
3ac6a4e5ae8c31f1049017c35356b56d11b8a50a
/Shader.h
9615758870a752c752eb4c147d22f51e827483b7
[]
no_license
ulfbiallas/cpp-voxel-terrain
9303002990a4dc80f9826bf86b6693cfa705eadd
5178e34b4ccd070ca9e78424bfec3e7f53138a3c
refs/heads/master
2021-01-23T19:40:56.659236
2015-04-13T20:26:00
2015-04-13T20:26:00
32,674,200
1
0
null
2015-04-08T19:42:02
2015-03-22T12:13:43
C++
UTF-8
C++
false
false
351
h
Shader.h
#ifndef SHADER_H #define SHADER_H #include <windows.h> #include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <cstdlib> #include <iostream> #include <vector> #include "ShaderCode.h" class Shader { public: Shader(); GLuint getProgram(); private: GLuint vertexShader, fragmentShader, shaderProgram; }; #endif
97c2f032b54d29b4d419c1ff1797be312ffde494
84f6156aed2b2450ea1edeb4efdb5829aa454f61
/beecrowd/1477.cpp
0cf36ebaaf958c8e5102e6a40980f31ee09fd837
[]
no_license
IvanIsCoding/OlympiadSolutions
39b1e9728553e60fcb03e235b2e09e2376fb6899
d7cbe82f6c3aa0e1bf36b9d517401543e37c429c
refs/heads/master
2022-07-02T09:29:30.903478
2022-06-18T21:05:22
2022-06-18T21:05:22
131,602,431
70
16
null
null
null
null
UTF-8
C++
false
false
6,169
cpp
1477.cpp
// Ivan Carvalho // Solution to https://www.beecrowd.com.br/judge/problems/view/1477 #include <cstdio> #include <cstring> #define MAXN 100010 int homem[3 * MAXN], elefante[3 * MAXN], rato[3 * MAXN], lazy[3 * MAXN]; void build(int pos, int left, int right) { if (left == right) { homem[pos] = 1; return; } int mid = (left + right) / 2; build(2 * pos, left, mid); build(2 * pos + 1, mid + 1, right); homem[pos] = homem[2 * pos] + homem[2 * pos + 1]; } void update(int pos, int left, int right, int i, int j) { if (lazy[pos] != 0) { if (lazy[pos] == 1) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldrato; elefante[pos] = oldhomem; rato[pos] = oldelefante; } if (lazy[pos] == 2) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldelefante; elefante[pos] = oldrato; rato[pos] = oldhomem; } if (left != right) { lazy[2 * pos] += lazy[pos]; lazy[2 * pos] %= 3; lazy[2 * pos + 1] += lazy[pos]; lazy[2 * pos + 1] %= 3; } lazy[pos] = 0; } if (left > right || left > j || right < i) return; if (left >= i && right <= j) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldrato; elefante[pos] = oldhomem; rato[pos] = oldelefante; if (left != right) { lazy[2 * pos]++; lazy[2 * pos] %= 3; lazy[2 * pos + 1]++; lazy[2 * pos + 1] %= 3; } return; } int mid = (left + right) / 2; update(2 * pos, left, mid, i, j); update(2 * pos + 1, mid + 1, right, i, j); homem[pos] = homem[2 * pos] + homem[2 * pos + 1]; elefante[pos] = elefante[2 * pos] + elefante[2 * pos + 1]; rato[pos] = rato[2 * pos] + rato[2 * pos + 1]; } int query_homem(int pos, int left, int right, int i, int j) { if (lazy[pos] != 0) { if (lazy[pos] == 1) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldrato; elefante[pos] = oldhomem; rato[pos] = oldelefante; } if (lazy[pos] == 2) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldelefante; elefante[pos] = oldrato; rato[pos] = oldhomem; } if (left != right) { lazy[2 * pos] += lazy[pos]; lazy[2 * pos] %= 3; lazy[2 * pos + 1] += lazy[pos]; lazy[2 * pos + 1] %= 3; } lazy[pos] = 0; } if (left > right || left > j || right < i) return 0; if (left >= i && right <= j) { return homem[pos]; } int mid = (left + right) / 2; return query_homem(2 * pos, left, mid, i, j) + query_homem(2 * pos + 1, mid + 1, right, i, j); } int query_elefante(int pos, int left, int right, int i, int j) { if (lazy[pos] != 0) { if (lazy[pos] == 1) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldrato; elefante[pos] = oldhomem; rato[pos] = oldelefante; } if (lazy[pos] == 2) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldelefante; elefante[pos] = oldrato; rato[pos] = oldhomem; } if (left != right) { lazy[2 * pos] += lazy[pos]; lazy[2 * pos] %= 3; lazy[2 * pos + 1] += lazy[pos]; lazy[2 * pos + 1] %= 3; } lazy[pos] = 0; } if (left > right || left > j || right < i) return 0; if (left >= i && right <= j) { return elefante[pos]; } int mid = (left + right) / 2; return query_elefante(2 * pos, left, mid, i, j) + query_elefante(2 * pos + 1, mid + 1, right, i, j); } int query_rato(int pos, int left, int right, int i, int j) { if (lazy[pos] != 0) { if (lazy[pos] == 1) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldrato; elefante[pos] = oldhomem; rato[pos] = oldelefante; } if (lazy[pos] == 2) { int oldhomem = homem[pos]; int oldelefante = elefante[pos]; int oldrato = rato[pos]; homem[pos] = oldelefante; elefante[pos] = oldrato; rato[pos] = oldhomem; } if (left != right) { lazy[2 * pos] += lazy[pos]; lazy[2 * pos] %= 3; lazy[2 * pos + 1] += lazy[pos]; lazy[2 * pos + 1] %= 3; } lazy[pos] = 0; } if (left > right || left > j || right < i) return 0; if (left >= i && right <= j) { return rato[pos]; } int mid = (left + right) / 2; return query_rato(2 * pos, left, mid, i, j) + query_rato(2 * pos + 1, mid + 1, right, i, j); } int main() { int n, q; while (scanf("%d %d", &n, &q) != EOF) { memset(homem, 0, sizeof(homem)); memset(lazy, 0, sizeof(lazy)); memset(rato, 0, sizeof(rato)); memset(elefante, 0, sizeof(elefante)); build(1, 1, n); while (q--) { char op; int a, b; getchar(); scanf("%c %d %d", &op, &a, &b); if (op == 'M') update(1, 1, n, a, b); if (op == 'C') printf("%d %d %d\n", query_homem(1, 1, n, a, b), query_elefante(1, 1, n, a, b), query_rato(1, 1, n, a, b)); } printf("\n"); } return 0; }
0c8fcb32e339f7224669aa27d5e492e609868727
d2937ca31ffdb5100211fe5f600dfa7061e2b30a
/test/test_svr_revert/test.cpp
de4937531dceb7cf9aff956338a9a6f130d40694
[]
no_license
yiliangwu880/access_svr
91177aedcf6170c17091d56839d67304aad7aa45
d3c2e12ad20b155d8e3e20040652b7a517724a2e
refs/heads/master
2022-05-02T17:12:04.935168
2022-03-02T07:52:57
2022-03-02T07:52:57
214,926,444
0
0
null
null
null
null
UTF-8
C++
false
false
5,692
cpp
test.cpp
/* 测试 svr 连接断开,恢复。步骤: svr1 ,svr2 连接acc client认证,设置uin. svr2断开,重连。 svr2 会话,uin恢复。 */ #include <string> #include "libevent_cpp/include/include_all.h" #include "svr_util/include/su_mgr.h" #include "svr_util/include/single_progress.h" #include "svr_util/include/read_cfg.h" #include "unit_test.h" #include "../acc_driver/include/acc_driver.h" #include "cfg.h" #include "base_follow.h" using namespace std; using namespace su; using namespace acc; using namespace lc; namespace { static const uint32 CMD_VERIFY = 1; static const uint64 UIN = 11; class FollowMgr; //connect to acc client class Acc2Client : public BaseClient { public: Acc2Client() { m_follow = nullptr; } FollowMgr *m_follow; virtual void OnRecvMsg(uint32 cmd, const std::string &msg) override final; virtual void OnConnected() override final; virtual void OnDisconnected() override final; }; class Svr : public ADFacadeMgr { public: Svr() { m_follow = nullptr; m_svr_id = 0; } virtual ~Svr() {}; FollowMgr *m_follow; uint16 m_svr_id; virtual void OnRegResult(uint16 svr_id); virtual void OnRevVerifyReq(const SessionId &id, uint32 cmd, const char *msg, uint16 msg_len); //当设置uin virtual void OnRevBroadcastUinToSession(uint64 uin); //client认证成功,创建会话。 概念类似 新socket连接客户端 virtual void OnClientConnect(const Session &session); }; class FollowMgr { public: enum class State { WAIT_REG, //svr1 ,svr2 连接acc WAIT_CLIENT_VERIFY,//client认证 WAIT_SET_UIN_OK, //设置uin WAIT_SVR2_RECON, //svr2断开,重连,等连接成功 WAIT_SVR2_REVERT, //svr2 会话,uin恢复。 END, }; State m_state; Acc2Client m_client; Svr m_svr1; Svr *m_p_svr2; lc::Timer m_tm; uint32 m_reg_cnt; SessionId m_sid; public: FollowMgr() { m_state = State::WAIT_REG; m_client.m_follow = this; m_svr1.m_follow = this; m_svr1.m_svr_id = 1; m_reg_cnt = 0; } void Init(); void ReconSvr2(); void InitNewSvr2(); }; void Acc2Client::OnRecvMsg(uint32 cmd, const std::string &msg) { if (cmd == CMD_VERIFY) { UNIT_INFO("client verify ok"); UNIT_ASSERT(m_follow->m_state == FollowMgr::State::WAIT_CLIENT_VERIFY); m_follow->m_state = FollowMgr::State::WAIT_SET_UIN_OK; UNIT_ASSERT(m_follow->m_sid.cid != 0); m_follow->m_svr1.BroadcastUinToSession(m_follow->m_sid, UIN); } } void Acc2Client::OnConnected() { UNIT_INFO("Acc2Client::OnConnected"); SendStr(CMD_VERIFY, ""); } void Acc2Client::OnDisconnected() { UNIT_INFO("client discon, try again"); } void FollowMgr::Init() { std::vector<Addr> inner_vec = CfgMgr::Ins().m_inner_vec; inner_vec.resize(1); m_svr1.Init(inner_vec, 1, true); m_p_svr2 = new Svr; m_p_svr2->m_follow = this; m_p_svr2->m_svr_id = 2; m_p_svr2->Init(inner_vec, 2); } void FollowMgr::ReconSvr2() { static auto f = [&]() { UNIT_INFO("WAIT_SVR2_RECON this=%p", this); UNIT_ASSERT(m_state == FollowMgr::State::WAIT_SET_UIN_OK); m_state = FollowMgr::State::WAIT_SVR2_RECON; UNIT_ASSERT(m_p_svr2); delete m_p_svr2; m_p_svr2 = nullptr; m_tm.StopTimer(); m_tm.StartTimer(1 * 1000, std::bind(&FollowMgr::InitNewSvr2, this)); }; m_tm.StopTimer(); m_tm.StartTimer(1, f);//等下调用,第一安全,第二等acc释放旧的svr2注册信息。 } void FollowMgr::InitNewSvr2() { UNIT_ASSERT(nullptr == m_p_svr2); m_p_svr2 = new Svr; m_p_svr2->m_follow = this; m_p_svr2->m_svr_id = 2; std::vector<Addr> inner_vec = CfgMgr::Ins().m_inner_vec; inner_vec.resize(1); m_p_svr2->Init(inner_vec, 2); UNIT_INFO("re init svr2, m_state =%d this=%p", m_state, this); } void Svr::OnRegResult(uint16 svr_id) { if (FollowMgr::State::WAIT_REG == m_follow->m_state) { UNIT_INFO("first reg ok"); m_follow->m_reg_cnt++; if (m_follow->m_reg_cnt==2) { m_follow->m_state = FollowMgr::State::WAIT_CLIENT_VERIFY; const std::vector<Addr> &ex_vec = CfgMgr::Ins().m_ex_vec; UNIT_ASSERT(ex_vec.size() > 1); UNIT_INFO("client connect acc1 port=%d", ex_vec[0].port); m_follow->m_client.ConnectInit(ex_vec[0].ip.c_str(), ex_vec[0].port); return; } } else if (FollowMgr::State::WAIT_SVR2_RECON == m_follow->m_state) { UNIT_INFO("WAIT_SVR2_RECON ok"); m_follow->m_state = FollowMgr::State::WAIT_SVR2_REVERT; } else { UNIT_ASSERT(false); } } void Svr::OnRevVerifyReq(const SessionId &id, uint32 cmd, const char *msg, uint16 msg_len) { UNIT_ASSERT(CMD_VERIFY == cmd); string s(msg, msg_len); string rsp_msg = "verify_ok"; m_follow->m_sid = id; ReqVerifyRet(id, true, CMD_VERIFY, rsp_msg.c_str(), rsp_msg.length()); } void Svr::OnRevBroadcastUinToSession(uint64 uin) { UNIT_ASSERT(m_follow->m_state == FollowMgr::State::WAIT_SET_UIN_OK); UNIT_ASSERT(m_svr_id == 2); m_follow->ReconSvr2(); } void Svr::OnClientConnect(const Session &session) { UNIT_INFO("OnClientConnect m_svr_id=%d m_follow->m_state=%d", m_svr_id, m_follow->m_state); if (m_svr_id == 2 && m_follow->m_state == FollowMgr::State::WAIT_SVR2_REVERT) { UNIT_INFO("revert session uin=%llx", session.uin); UNIT_ASSERT(session.uin == UIN); UNIT_ASSERT(session.id.cid == m_follow->m_sid.cid); UNIT_ASSERT(session.id.cid != 0); m_follow->m_state = FollowMgr::State::END; EventMgr::Ins().StopDispatch(); } } } UNITTEST(test_svr_revert) { UNIT_ASSERT(CfgMgr::Ins().Init()); FollowMgr follow; follow.Init(); EventMgr::Ins().Dispatch(); UNIT_INFO("--------------------test_add_acc end--------------------"); }
5293a3fcae5448cc5324d30077fcdf059166e698
f82a97d9f06676c5dfdfac09440493d803859a6e
/libvmaf/src/third_party/ptools/Examples/baseline_test.cc
e19f26295a8abb07aa315ac58fef25f95663fb81
[ "BSD-3-Clause", "Apache-2.0", "LGPL-3.0-or-later" ]
permissive
weizhou-geek/vmaf
0694e6c45777e7286fe474d5b2f7835dd3df674a
d5978d15f7c413e8aa78c891ce43291ead3fa287
refs/heads/master
2020-09-26T13:21:35.827002
2019-11-21T21:54:02
2019-12-04T00:04:29
226,263,006
2
0
Apache-2.0
2019-12-06T06:37:56
2019-12-06T06:37:55
null
UTF-8
C++
false
false
1,012
cc
baseline_test.cc
#include "components.h" // time baseline_test 20000 65536 // 13.848u 0.789s 0:08.15 179.3% 0+0k 0+0io 0pf+0w // 14.152u 0.248s 0:07.91 181.9% 0+0k 0+0io 0pf+0w // 14.126u 0.246s 0:07.93 181.0% 0+0k 0+0io 0pf+0w // time ./baseline_test 200 4194304 // 9.191u 5.654s 0:10.75 138.0% 0+0k 0+0io 0pf+0w // 9.218u 5.046s 0:10.18 139.9% 0+0k 0+0io 0pf+0w int main (int argc, char**argv) { if (argc!=3) { cerr << "usage:" << argv[0] << " iterations packetsize " << endl; exit(1); } int_8 iterations = atoi(argv[1]); int_8 length = atoi(argv[2]); // create Constant c("constant"); c.set("iter", iterations); c.set("DataLength", length); MaxMin mm("maxmin"); mm.set("iter", iterations); // connect CQ* a = new CQ(4); c.connect(0, a); mm.connect(a, 0); // start mm.start(); c.start(); // Wait for everyone to finish mm.wait(); c.wait(); cout << "Max = " << mm.get("Max") << endl; cout << "Min = " << mm.get("Min") << endl; delete a; }
9292a6ba3402a97115a5b235f99981bfb976bf5d
ba96d7f21540bd7504e61954f01a6d77f88dea6f
/build/Android/Debug/app/src/main/jni/_root.Haslaamispaivak-6d39802e.cpp
51bf6f20d5e1be98d8a1ca0462db024ebad1a9a4
[]
no_license
GetSomefi/haslaamispaivakirja
096ff35fe55e3155293e0030c91b4bbeafd512c7
9ba6766987da4af3b662e33835231b5b88a452b3
refs/heads/master
2020-03-21T19:54:24.148074
2018-11-09T06:44:18
2018-11-09T06:44:18
138,976,977
0
0
null
null
null
null
UTF-8
C++
false
false
6,628
cpp
_root.Haslaamispaivak-6d39802e.cpp
// This file was generated based on '/Users/petervirtanen/OneDrive/Fuse projektit/Häsläämispäiväkirja/.uno/ux15/Häsläämispäiväkirja.unoproj.g.uno'. // WARNING: Changes might be lost if you edit this file directly. #include <_root.BasicSwipeToggleBig.h> #include <_root.Haslaamispaivak-6d39802e.h> #include <Uno.Bool.h> #include <Uno.Float.h> #include <Uno.Object.h> #include <Uno.String.h> #include <Uno.Type.h> #include <Uno.UX.IPropertyListener.h> #include <Uno.UX.PropertyObject.h> #include <Uno.UX.Selector.h> static uString* STRINGS[1]; static uType* TYPES[2]; namespace g{ // internal sealed class Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width :61 // { // static generated Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width() :61 static void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__cctor__fn(uType* __type) { Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::Singleton_ = Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::New1(); Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::_name_ = ::g::Uno::UX::Selector__op_Implicit1(::STRINGS[0/*"Width"*/]); } static void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width_build(uType* type) { ::STRINGS[0] = uString::Const("Width"); ::TYPES[0] = ::g::BasicSwipeToggleBig_typeof(); ::TYPES[1] = ::g::Uno::Type_typeof(); type->SetFields(0, ::g::Uno::UX::PropertyAccessor_typeof(), (uintptr_t)&Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::Singleton_, uFieldFlagsStatic, ::g::Uno::UX::Selector_typeof(), (uintptr_t)&Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::_name_, uFieldFlagsStatic); } ::g::Uno::UX::PropertyAccessor_type* Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width_typeof() { static uSStrong< ::g::Uno::UX::PropertyAccessor_type*> type; if (type != NULL) return type; uTypeOptions options; options.BaseDefinition = ::g::Uno::UX::PropertyAccessor_typeof(); options.FieldCount = 2; options.ObjectSize = sizeof(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width); options.TypeSize = sizeof(::g::Uno::UX::PropertyAccessor_type); type = (::g::Uno::UX::PropertyAccessor_type*)uClassType::New("Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width", options); type->fp_build_ = Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width_build; type->fp_ctor_ = (void*)Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__New1_fn; type->fp_cctor_ = Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__cctor__fn; type->fp_GetAsObject = (void(*)(::g::Uno::UX::PropertyAccessor*, ::g::Uno::UX::PropertyObject*, uObject**))Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__GetAsObject_fn; type->fp_get_Name = (void(*)(::g::Uno::UX::PropertyAccessor*, ::g::Uno::UX::Selector*))Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__get_Name_fn; type->fp_get_PropertyType = (void(*)(::g::Uno::UX::PropertyAccessor*, uType**))Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__get_PropertyType_fn; type->fp_SetAsObject = (void(*)(::g::Uno::UX::PropertyAccessor*, ::g::Uno::UX::PropertyObject*, uObject*, uObject*))Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__SetAsObject_fn; type->fp_get_SupportsOriginSetter = (void(*)(::g::Uno::UX::PropertyAccessor*, bool*))Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__get_SupportsOriginSetter_fn; return type; } // public generated Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width() :61 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__ctor_1_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* __this) { __this->ctor_1(); } // public override sealed object GetAsObject(Uno.UX.PropertyObject obj) :67 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__GetAsObject_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* __this, ::g::Uno::UX::PropertyObject* obj, uObject** __retval) { return *__retval = uBox(::g::Uno::Float_typeof(), uPtr(uCast< ::g::BasicSwipeToggleBig*>(obj, ::TYPES[0/*BasicSwipeToggleBig*/]))->Width1()), void(); } // public override sealed Uno.UX.Selector get_Name() :64 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__get_Name_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* __this, ::g::Uno::UX::Selector* __retval) { return *__retval = Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::_name_, void(); } // public generated Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width New() :61 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__New1_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width** __retval) { *__retval = Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::New1(); } // public override sealed Uno.Type get_PropertyType() :66 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__get_PropertyType_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* __this, uType** __retval) { return *__retval = ::g::Uno::Float_typeof(), void(); } // public override sealed void SetAsObject(Uno.UX.PropertyObject obj, object v, Uno.UX.IPropertyListener origin) :68 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__SetAsObject_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* __this, ::g::Uno::UX::PropertyObject* obj, uObject* v, uObject* origin) { uPtr(uCast< ::g::BasicSwipeToggleBig*>(obj, ::TYPES[0/*BasicSwipeToggleBig*/]))->SetWidth(uUnbox<float>(::g::Uno::Float_typeof(), v), origin); } // public override sealed bool get_SupportsOriginSetter() :69 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width__get_SupportsOriginSetter_fn(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* __this, bool* __retval) { return *__retval = true, void(); } uSStrong< ::g::Uno::UX::PropertyAccessor*> Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::Singleton_; ::g::Uno::UX::Selector Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::_name_; // public generated Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width() [instance] :61 void Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::ctor_1() { ctor_(); } // public generated Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width New() [static] :61 Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width::New1() { Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width* obj1 = (Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width*)uNew(Haslaamispaivakirja_accessor_BasicSwipeToggleBig_Width_typeof()); obj1->ctor_1(); return obj1; } // } } // ::g
d903e8d92f277e292345901206bfd129511c34ef
6b6c3c08e1c70f1189e5ff5297fae81e4f39f006
/GroveGas/GroveGasSensor/GroveGasSensor.ino
ce92046a7a6d27a64989d93bdd8f4c446a7cb88a
[]
no_license
nryytty/uni-galileo
27ee417c9ee8bbba433e993212c5a10163f780b7
6228299f4f1e90a6fd7d8cb31114b732896fb0d3
refs/heads/master
2016-09-06T00:03:11.693992
2015-01-05T08:37:21
2015-01-05T08:37:21
28,804,036
0
0
null
null
null
null
UTF-8
C++
false
false
1,376
ino
GroveGasSensor.ino
/* Grove Gas sensor http://www.seeedstudio.com/wiki/Grove_-_Gas_Sensor Uses http://playground.arduino.cc/Main/RunningMedian for median sudo chmod a+rw /dev/ttyACM0 cu -l /dev/ttyACM0 -s 115200 */ #include "RunningMedian.h" #define Vref 4.95 const int LED_PIN = 13; const int GAS_SENSOR_PIN = A0; int counter = 0; RunningMedian<float,32> median; void setup() { pinMode(LED_PIN, OUTPUT); pinMode(GAS_SENSOR_PIN,INPUT); Serial.begin(9600); } void loop() { counter++; // Turn led on to indicate about operation digitalWrite(LED_PIN, HIGH); // Statistical float _median; float _avg; float _min; float _max; // Read data int sensorValue = analogRead(GAS_SENSOR_PIN); float vol=(float)sensorValue/1023*Vref; median.add(vol); // Read statistical values median.getMedian(_median); median.getAverage(_avg); median.getLowest(_min); median.getHighest(_max); // print Serial.print(counter); Serial.print(":GAS: "); Serial.print(vol); Serial.print(" (median:"); Serial.print(_median); Serial.print("/avg:"); Serial.print(_avg); Serial.print("/min:"); Serial.print(_min); Serial.print("/max:"); Serial.print(_max); Serial.println(")"); // Led off delay(100); digitalWrite(LED_PIN, LOW); delay(400); }
50334fc92288f95813a80f9d7572b5274e159329
351dc9210818ee17b9df088d7e6e614fa2094cbe
/src/Helper/MotorHelper.h
e1513d1ef631fb8573b25188a613b2dce869be4f
[]
no_license
FinnFlaschka1504/ArduinoUI
086e69d00d1bd0039a9de9c3c6f51bcc5fae4f92
e112812c9c02b674fc471a5838689e7dda48be17
refs/heads/master
2023-04-21T23:13:06.365043
2021-05-09T00:34:17
2021-05-09T00:34:17
359,147,331
0
0
null
null
null
null
UTF-8
C++
false
false
866
h
MotorHelper.h
class CustomStepper; enum MOTOR_CONTROL_MODE { SPEED, POSITION, MANUELL }; class MH { public: static CustomStepper stepperSlide; // (Type:driver, STEP, DIR) static CustomStepper stepperPan; // (Type:driver, STEP, DIR) static CustomStepper stepperTilt; // (Type:driver, STEP, DIR) static MultiStepper stepperControl; static MOTOR_CONTROL_MODE motorControlMode; // mit methode setzen um max speed zurücksetzen static void init(); static void initTimer(); static void moveToPosition(long position[3], int time); static void resetSpeed(); static void resetMaxSpeed(); }; // ----------------------- class CustomStepper : public AccelStepper { public: CustomStepper(uint8_t interface = AccelStepper::FULL4WIRE, uint8_t pin1 = 2, uint8_t pin2 = 3) : AccelStepper(interface, pin1, pin2) {}; void performStep(); };
e3dd3bff750db415374bea1146f6cc392be08ce8
540c04254075b9fb22685a73487531f4c0b3e3ac
/lib-dmx/src/h3/multi/dmx.cpp
9caf97307b3057033ad016aeabb155b89cff546b
[ "MIT" ]
permissive
vanvught/rpidmx512
197573217fc2c0c3673d6727d199c10e528a9fac
f27ae141d14c1d1cb9e0b62a291356ae0780c99f
refs/heads/master
2023-08-08T02:06:52.200184
2023-05-19T12:44:48
2023-05-19T12:44:48
15,496,962
380
125
MIT
2023-05-19T12:47:24
2013-12-28T18:27:20
C++
UTF-8
C++
false
false
30,910
cpp
dmx.cpp
/** * @file dmx.cpp * */ /* Copyright (C) 2018-2022 by Arjan van Vught mailto:info@orangepi-dmx.nl * * 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. */ #if __GNUC__ > 8 # pragma GCC target ("general-regs-only") #endif #include <cstdint> #include <cstring> #include <algorithm> #include <cassert> #include "dmx.h" #include "h3/dmx_config.h" #include "./../dmx_internal.h" #include "arm/arm.h" #include "arm/synchronize.h" #include "arm/gic.h" #include "h3.h" #include "h3_uart.h" #include "h3_hs_timer.h" #include "h3_dma.h" #include "h3_ccu.h" #include "h3_gpio.h" #include "h3_timer.h" #include "irq_timer.h" #include "rdm.h" #include "rdm_e120.h" #include "debug.h" using namespace dmx; extern "C" { int console_error(const char*); } #ifndef ALIGNED # define ALIGNED __attribute__ ((aligned (4))) #endif static constexpr auto DMX_DATA_OUT_INDEX = (1U << 2); enum class TxRxState { IDLE = 0, PRE_BREAK, BREAK, MAB, DMXDATA, RDMDATA, CHECKSUMH, CHECKSUML, RDMDISC, DMXINTER }; enum class UartState { IDLE = 0, TX, RX }; struct TDmxMultiData { uint8_t data[buffer::SIZE]; // multiple of uint32_t uint32_t nLength; }; struct TCoherentRegion { struct sunxi_dma_lli lli[dmxmulti::max::OUT]; struct TDmxMultiData dmx_data[dmxmulti::max::OUT][DMX_DATA_OUT_INDEX] ALIGNED; }; struct TRdmMultiData { uint8_t data[RDM_DATA_BUFFER_SIZE]; uint16_t nChecksum; // This must be uint16_t uint16_t _padding; uint32_t nIndex; uint32_t nDiscIndex; }; static volatile TxRxState s_tReceiveState[dmxmulti::max::OUT] ALIGNED; #if defined(ORANGE_PI) static constexpr uint8_t s_nDmxDataDirectionGpioPin[dmxmulti::max::OUT] = { 0, GPIO_DMX_DATA_DIRECTION_OUT_C, GPIO_DMX_DATA_DIRECTION_OUT_B, 0 }; #else static constexpr uint8_t s_nDmxDataDirectionGpioPin[dmxmulti::max::OUT] = { GPIO_DMX_DATA_DIRECTION_OUT_D, GPIO_DMX_DATA_DIRECTION_OUT_A, GPIO_DMX_DATA_DIRECTION_OUT_B, GPIO_DMX_DATA_DIRECTION_OUT_C }; #endif // DMX TX static uint32_t s_nDmxTransmistBreakTimeINTV; static uint32_t s_nDmxTransmitMabTimeINTV; static uint32_t s_nDmxTransmitPeriodINTV; static struct TCoherentRegion *s_pCoherentRegion; static volatile uint32_t s_nDmxDataWriteIndex[dmxmulti::max::OUT]; static volatile uint32_t s_nDmxDataReadIndex[dmxmulti::max::OUT]; static volatile TxRxState s_tDmxSendState ALIGNED; // DMX RX static volatile struct Data s_aDmxData[dmxmulti::max::IN][buffer::INDEX_ENTRIES] ALIGNED; static volatile uint32_t s_nDmxDataBufferIndexHead[dmxmulti::max::IN]; static volatile uint32_t s_nDmxDataBufferIndexTail[dmxmulti::max::IN]; static volatile uint32_t s_nDmxDataIndex[dmxmulti::max::IN]; static volatile uint32_t s_nDmxUpdatesPerSecond[dmxmulti::max::IN]; static volatile uint32_t s_nDmxPackets[dmxmulti::max::IN]; static volatile uint32_t s_nDmxPacketsPrevious[dmxmulti::max::IN]; // RDM static volatile uint32_t sv_RdmDataReceiveEnd; static struct TRdmMultiData s_aRdmData[dmxmulti::max::OUT][RDM_DATA_BUFFER_INDEX_ENTRIES] ALIGNED; static struct TRdmMultiData *s_pRdmDataCurrent[dmxmulti::max::OUT] ALIGNED; static volatile uint32_t s_nRdmDataWriteIndex[dmxmulti::max::OUT]; static volatile uint32_t s_nRdmDataReadIndex[dmxmulti::max::OUT]; static volatile UartState s_UartState[dmxmulti::max::OUT] ALIGNED; static char CONSOLE_ERROR[] ALIGNED = "DMXDATA %\n"; static constexpr auto CONSOLE_ERROR_LENGTH = (sizeof(CONSOLE_ERROR) / sizeof(CONSOLE_ERROR[0])); static void irq_timer0_dmx_multi_sender(__attribute__((unused))uint32_t clo) { #ifdef LOGIC_ANALYZER h3_gpio_set(6); #endif switch (s_tDmxSendState) { case TxRxState::IDLE: case TxRxState::DMXINTER: H3_TIMER->TMR0_INTV = s_nDmxTransmistBreakTimeINTV; H3_TIMER->TMR0_CTRL |= (TIMER_CTRL_EN_START | TIMER_CTRL_RELOAD); // 0x3; if (s_UartState[1] == UartState::TX) { H3_UART1->LCR = UART_LCR_8_N_2 | UART_LCR_BC; } if (s_UartState[2] == UartState::TX) { H3_UART2->LCR = UART_LCR_8_N_2 | UART_LCR_BC; } #if defined (ORANGE_PI_ONE) if (s_UartState[3] == UartState::TX) { H3_UART3->LCR = UART_LCR_8_N_2 | UART_LCR_BC; } # ifndef DO_NOT_USE_UART0 if (s_UartState[0] == UartState::TX) { H3_UART0->LCR = UART_LCR_8_N_2 | UART_LCR_BC; } # endif #endif if (s_nDmxDataWriteIndex[1] != s_nDmxDataReadIndex[1]) { s_nDmxDataReadIndex[1] = (s_nDmxDataReadIndex[1] + 1) & (DMX_DATA_OUT_INDEX - 1); s_pCoherentRegion->lli[1].src = reinterpret_cast<uint32_t>(&s_pCoherentRegion->dmx_data[1][s_nDmxDataReadIndex[1]].data[0]); s_pCoherentRegion->lli[1].len = s_pCoherentRegion->dmx_data[1][s_nDmxDataReadIndex[1]].nLength; } if (s_nDmxDataWriteIndex[2] != s_nDmxDataReadIndex[2]) { s_nDmxDataReadIndex[2] = (s_nDmxDataReadIndex[2] + 1) & (DMX_DATA_OUT_INDEX - 1); s_pCoherentRegion->lli[2].src = reinterpret_cast<uint32_t>(&s_pCoherentRegion->dmx_data[2][s_nDmxDataReadIndex[2]].data[0]); s_pCoherentRegion->lli[2].len = s_pCoherentRegion->dmx_data[2][s_nDmxDataReadIndex[2]].nLength; } #if defined (ORANGE_PI_ONE) if (s_nDmxDataWriteIndex[3] != s_nDmxDataReadIndex[3]) { s_nDmxDataReadIndex[3] = (s_nDmxDataReadIndex[3] + 1) & (DMX_DATA_OUT_INDEX - 1); s_pCoherentRegion->lli[3].src = reinterpret_cast<uint32_t>(&s_pCoherentRegion->dmx_data[3][s_nDmxDataReadIndex[3]].data[0]); s_pCoherentRegion->lli[3].len = s_pCoherentRegion->dmx_data[3][s_nDmxDataReadIndex[3]].nLength; } # ifndef DO_NOT_USE_UART0 if (s_nDmxDataWriteIndex[0] != s_nDmxDataReadIndex[0]) { s_nDmxDataReadIndex[0] = (s_nDmxDataReadIndex[0] + 1) & (DMX_DATA_OUT_INDEX - 1); s_pCoherentRegion->lli[0].src = reinterpret_cast<uint32_t>(&s_pCoherentRegion->dmx_data[0][s_nDmxDataReadIndex[0]].data[0]); s_pCoherentRegion->lli[0].len = s_pCoherentRegion->dmx_data[0][s_nDmxDataReadIndex[0]].nLength; } # endif #endif s_tDmxSendState = TxRxState::BREAK; break; case TxRxState::BREAK: H3_TIMER->TMR0_INTV = s_nDmxTransmitMabTimeINTV; H3_TIMER->TMR0_CTRL |= (TIMER_CTRL_EN_START | TIMER_CTRL_RELOAD); // 0x3; if (s_UartState[1] == UartState::TX) { H3_UART1->LCR = UART_LCR_8_N_2; } if (s_UartState[2] == UartState::TX) { H3_UART2->LCR = UART_LCR_8_N_2; } #if defined (ORANGE_PI_ONE) if (s_UartState[3] == UartState::TX) { H3_UART3->LCR = UART_LCR_8_N_2; } # ifndef DO_NOT_USE_UART0 if (s_UartState[0] == UartState::TX) { H3_UART0->LCR = UART_LCR_8_N_2; } # endif #endif s_tDmxSendState = TxRxState::MAB; break; case TxRxState::MAB: H3_TIMER->TMR0_INTV = s_nDmxTransmitPeriodINTV; H3_TIMER->TMR0_CTRL |= (TIMER_CTRL_EN_START | TIMER_CTRL_RELOAD); // 0x3; if (s_UartState[1] == UartState::TX) { H3_DMA_CHL1->DESC_ADDR = reinterpret_cast<uint32_t>(&s_pCoherentRegion->lli[1]); H3_DMA_CHL1->EN = DMA_CHAN_ENABLE_START; } if (s_UartState[2] == UartState::TX) { H3_DMA_CHL2->DESC_ADDR = reinterpret_cast<uint32_t>(&s_pCoherentRegion->lli[2]); H3_DMA_CHL2->EN = DMA_CHAN_ENABLE_START; } #if defined (ORANGE_PI_ONE) if (s_UartState[3] == UartState::TX) { H3_DMA_CHL3->DESC_ADDR = reinterpret_cast<uint32_t>(&s_pCoherentRegion->lli[3]); H3_DMA_CHL3->EN = DMA_CHAN_ENABLE_START; } # ifndef DO_NOT_USE_UART0 if (s_UartState[0] == UartState::TX) { H3_DMA_CHL0->DESC_ADDR = reinterpret_cast<uint32_t>(&s_pCoherentRegion->lli[0]); H3_DMA_CHL0->EN = DMA_CHAN_ENABLE_START; } # endif #endif isb(); s_tDmxSendState = TxRxState::DMXINTER; break; default: assert(0); __builtin_unreachable(); break; } #ifdef LOGIC_ANALYZER h3_gpio_clr(6); #endif } #include <cstdio> static void fiq_in_handler(const uint32_t nUart, const H3_UART_TypeDef *pUart, const uint32_t nIIR) { #ifdef LOGIC_ANALYZER h3_gpio_set(3); #endif uint32_t nIndex; isb(); if (pUart->LSR & (UART_LSR_BI | UART_LSR_FE | UART_LSR_FIFOERR)) { s_tReceiveState[nUart] = TxRxState::PRE_BREAK; } auto nRFL = pUart->RFL; while(nRFL--) { while ((pUart->LSR & UART_LSR_DR) != UART_LSR_DR) ; const auto nData = static_cast<uint8_t>(pUart->O00.RBR); dmb(); switch (s_tReceiveState[nUart]) { case TxRxState::IDLE: s_pRdmDataCurrent[nUart]->data[0] = nData; s_pRdmDataCurrent[nUart]->nIndex = 1; s_tReceiveState[nUart] = TxRxState::RDMDISC; break; case TxRxState::PRE_BREAK: s_tReceiveState[nUart] = TxRxState::BREAK; break; case TxRxState::BREAK: switch (nData) { case START_CODE: s_tReceiveState[nUart] = TxRxState::DMXDATA; s_aDmxData[nUart][s_nDmxDataBufferIndexHead[nUart]].Data[0] = START_CODE; s_nDmxDataIndex[nUart] = 1; s_nDmxPackets[nUart]++; break; case E120_SC_RDM: s_pRdmDataCurrent[nUart]->data[0] = E120_SC_RDM; s_pRdmDataCurrent[nUart]->nChecksum = E120_SC_RDM; s_pRdmDataCurrent[nUart]->nIndex = 1; s_tReceiveState[nUart] = TxRxState::RDMDATA; break; default: s_tReceiveState[nUart] = TxRxState::IDLE; break; } break; case TxRxState::DMXDATA: s_aDmxData[nUart][s_nDmxDataBufferIndexHead[nUart]].Data[s_nDmxDataIndex[nUart]] = nData; s_nDmxDataIndex[nUart]++; if (s_nDmxDataIndex[nUart] > max::CHANNELS) { s_tReceiveState[nUart] = TxRxState::IDLE; s_aDmxData[nUart][s_nDmxDataBufferIndexHead[nUart]].Statistics.nSlotsInPacket = max::CHANNELS; s_nDmxDataBufferIndexHead[nUart] = (s_nDmxDataBufferIndexHead[nUart] + 1) & buffer::INDEX_MASK; return; } break; case TxRxState::RDMDATA: if (s_pRdmDataCurrent[nUart]->nIndex > RDM_DATA_BUFFER_SIZE) { s_tReceiveState[nUart] = TxRxState::IDLE; } else { nIndex = s_pRdmDataCurrent[nUart]->nIndex; s_pRdmDataCurrent[nUart]->data[nIndex] = nData; s_pRdmDataCurrent[nUart]->nIndex++; s_pRdmDataCurrent[nUart]->nChecksum = static_cast<uint16_t>(s_pRdmDataCurrent[nUart]->nChecksum + nData); const auto *p = reinterpret_cast<struct TRdmMessage *>(&s_pRdmDataCurrent[nUart]->data[0]); if (s_pRdmDataCurrent[nUart]->nIndex == p->message_length) { s_tReceiveState[nUart] = TxRxState::CHECKSUMH; } } break; case TxRxState::CHECKSUMH: nIndex = s_pRdmDataCurrent[nUart]->nIndex; s_pRdmDataCurrent[nUart]->data[nIndex] = nData; s_pRdmDataCurrent[nUart]->nIndex++; s_pRdmDataCurrent[nUart]->nChecksum = static_cast<uint16_t>(s_pRdmDataCurrent[nUart]->nChecksum - static_cast<uint16_t>(nData << 8)); s_tReceiveState[nUart] = TxRxState::CHECKSUML; break; case TxRxState::CHECKSUML: { nIndex = s_pRdmDataCurrent[nUart]->nIndex; s_pRdmDataCurrent[nUart]->data[nIndex] = nData; s_pRdmDataCurrent[nUart]->nIndex++; s_pRdmDataCurrent[nUart]->nChecksum = static_cast<uint16_t>(s_pRdmDataCurrent[nUart]->nChecksum - nData); const auto *p = reinterpret_cast<struct TRdmMessage *>(&s_aRdmData[nUart][s_nRdmDataWriteIndex[nUart]].data[0]); if ((s_aRdmData[nUart][s_nRdmDataWriteIndex[nUart]].nChecksum == 0) && (p->sub_start_code == E120_SC_SUB_MESSAGE)) { s_nRdmDataWriteIndex[nUart] = (s_nRdmDataWriteIndex[nUart] + 1) & RDM_DATA_BUFFER_INDEX_MASK; s_pRdmDataCurrent[nUart] = &s_aRdmData[nUart][s_nRdmDataWriteIndex[nUart]]; sv_RdmDataReceiveEnd = h3_hs_timer_lo_us();; dmb(); } s_tReceiveState[nUart] = TxRxState::IDLE; } break; case TxRxState::RDMDISC: nIndex = s_pRdmDataCurrent[nUart]->nIndex; if (nIndex < 24) { s_pRdmDataCurrent[nUart]->data[nIndex] = nData; s_pRdmDataCurrent[nUart]->nIndex++; } break; default: s_tReceiveState[nUart] = TxRxState::IDLE; break; } } if (((pUart->USR & UART_USR_BUSY) == 0) && ((nIIR & UART_IIR_IID_TIME_OUT) == UART_IIR_IID_TIME_OUT)) { if (s_tReceiveState[nUart] == TxRxState::DMXDATA) { s_tReceiveState[nUart] = TxRxState::IDLE; s_aDmxData[nUart][s_nDmxDataBufferIndexHead[nUart]].Statistics.nSlotsInPacket = s_nDmxDataIndex[nUart] - 1; s_nDmxDataBufferIndexHead[nUart] = (s_nDmxDataBufferIndexHead[nUart] + 1) & buffer::INDEX_MASK; } if (s_tReceiveState[nUart] == TxRxState::RDMDISC) { s_tReceiveState[nUart] = TxRxState::IDLE; s_nRdmDataWriteIndex[nUart] = (s_nRdmDataWriteIndex[nUart] + 1) & RDM_DATA_BUFFER_INDEX_MASK; s_pRdmDataCurrent[nUart] = &s_aRdmData[nUart][s_nRdmDataWriteIndex[nUart]]; sv_RdmDataReceiveEnd = h3_hs_timer_lo_us();; dmb(); h3_gpio_clr(10); } } #ifdef LOGIC_ANALYZER h3_gpio_clr(3); #endif } static void __attribute__((interrupt("FIQ"))) fiq_dmx_multi(void) { dmb(); #ifdef LOGIC_ANALYZER h3_gpio_set(3); #endif auto nIIR = H3_UART1->O08.IIR; if (nIIR & UART_IIR_IID_RD) { fiq_in_handler(1, reinterpret_cast<H3_UART_TypeDef *>(H3_UART1_BASE), nIIR); H3_GIC_CPUIF->EOI = H3_UART1_IRQn; gic_unpend(H3_UART1_IRQn); } nIIR = H3_UART2->O08.IIR; if (nIIR & UART_IIR_IID_RD) { fiq_in_handler(2, reinterpret_cast<H3_UART_TypeDef *>(H3_UART2_BASE), nIIR); H3_GIC_CPUIF->EOI = H3_UART2_IRQn; gic_unpend(H3_UART2_IRQn); } #if defined (ORANGE_PI_ONE) nIIR = H3_UART3->O08.IIR; if (nIIR & UART_IIR_IID_RD) { fiq_in_handler(3, reinterpret_cast<H3_UART_TypeDef *>(H3_UART3_BASE), nIIR); H3_GIC_CPUIF->EOI = H3_UART3_IRQn; gic_unpend(H3_UART3_IRQn); } # ifndef DO_NOT_USE_UART0 nIIR = H3_UART0->O08.IIR; if (nIIR & UART_IIR_IID_RD) { fiq_in_handler(0, reinterpret_cast<H3_UART_TypeDef *>(H3_UART0_BASE), nIIR); H3_GIC_CPUIF->EOI = H3_UART0_IRQn; gic_unpend(H3_UART0_IRQn); } # endif #endif #ifdef LOGIC_ANALYZER h3_gpio_clr(3); #endif dmb(); } static void irq_timer1_dmx_receive(__attribute__((unused)) uint32_t clo) { for (uint32_t i = 0; i < dmxmulti::max::IN; i++) { s_nDmxUpdatesPerSecond[i] = s_nDmxPackets[i] - s_nDmxPacketsPrevious[i]; s_nDmxPacketsPrevious[i] = s_nDmxPackets[i]; } } static void uart_config(uint32_t nUart) { H3_UART_TypeDef *p = nullptr; if (nUart == 1) { p = reinterpret_cast<H3_UART_TypeDef *>(H3_UART1_BASE); uint32_t value = H3_PIO_PORTG->CFG0; // PG6, TX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PG6_SELECT_CFG0_SHIFT)); value |= H3_PG6_SELECT_UART1_TX << PG6_SELECT_CFG0_SHIFT; // PG7, RX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PG7_SELECT_CFG0_SHIFT)); value |= H3_PG7_SELECT_UART1_RX << PG7_SELECT_CFG0_SHIFT; H3_PIO_PORTG->CFG0 = value; H3_CCU->BUS_SOFT_RESET4 |= CCU_BUS_SOFT_RESET4_UART1; H3_CCU->BUS_CLK_GATING3 |= CCU_BUS_CLK_GATING3_UART1; } else if (nUart == 2) { p = reinterpret_cast<H3_UART_TypeDef *>(H3_UART2_BASE); uint32_t value = H3_PIO_PORTA->CFG0; // PA0, TX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PA0_SELECT_CFG0_SHIFT)); value |= H3_PA0_SELECT_UART2_TX << PA0_SELECT_CFG0_SHIFT; // PA1, RX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PA1_SELECT_CFG0_SHIFT)); value |= H3_PA1_SELECT_UART2_RX << PA1_SELECT_CFG0_SHIFT; H3_PIO_PORTA->CFG0 = value; H3_CCU->BUS_SOFT_RESET4 |= CCU_BUS_SOFT_RESET4_UART2; H3_CCU->BUS_CLK_GATING3 |= CCU_BUS_CLK_GATING3_UART2; } #if defined (ORANGE_PI_ONE) else if (nUart == 3) { p = reinterpret_cast<H3_UART_TypeDef *>(H3_UART3_BASE); uint32_t value = H3_PIO_PORTA->CFG1; // PA13, TX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PA13_SELECT_CFG1_SHIFT)); value |= H3_PA13_SELECT_UART3_TX << PA13_SELECT_CFG1_SHIFT; // PA14, RX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PA14_SELECT_CFG1_SHIFT)); value |= H3_PA14_SELECT_UART3_RX << PA14_SELECT_CFG1_SHIFT; H3_PIO_PORTA->CFG1 = value; H3_CCU->BUS_SOFT_RESET4 |= CCU_BUS_SOFT_RESET4_UART3; H3_CCU->BUS_CLK_GATING3 |= CCU_BUS_CLK_GATING3_UART3; } # ifndef DO_NOT_USE_UART0 else if (nUart == 0) { p = reinterpret_cast<H3_UART_TypeDef *>(H3_UART0_BASE); uint32_t value = H3_PIO_PORTA->CFG0; // PA4, TX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PA4_SELECT_CFG0_SHIFT)); value |= H3_PA4_SELECT_UART0_TX << PA4_SELECT_CFG0_SHIFT; // PA5, RX value &= static_cast<uint32_t>(~(GPIO_SELECT_MASK << PA5_SELECT_CFG0_SHIFT)); value |= H3_PA5_SELECT_UART0_RX << PA5_SELECT_CFG0_SHIFT; H3_PIO_PORTA->CFG0 = value; H3_CCU->BUS_SOFT_RESET4 |= CCU_BUS_SOFT_RESET4_UART0; H3_CCU->BUS_CLK_GATING3 |= CCU_BUS_CLK_GATING3_UART0; } # endif #endif assert(p != nullptr); if (p != nullptr) { p->O08.FCR = 0; p->LCR = UART_LCR_DLAB; p->O00.DLL = BAUD_250000_L; p->O04.DLH = BAUD_250000_H; p->O04.IER = 0; p->LCR = UART_LCR_8_N_2; } isb(); } static void UartEnableFifoTx(uint32_t nUart) { // DMX TX auto *pUart = _get_uart(nUart); assert(pUart != nullptr); if (pUart != nullptr) { pUart->O08.FCR = UART_FCR_EFIFO | UART_FCR_TRESET; pUart->O04.IER = 0; isb(); } } static void UartEnableFifoRx(uint32_t nUart) { // RDM RX auto *pUart = _get_uart(nUart); assert(pUart != nullptr); if (pUart != nullptr) { pUart->O08.FCR = UART_FCR_EFIFO | UART_FCR_RRESET | UART_FCR_TRIG1; pUart->O04.IER = UART_IER_ERBFI; isb(); } } Dmx *Dmx::s_pThis = nullptr; Dmx::Dmx() { DEBUG_ENTRY assert(s_pThis == nullptr); s_pThis = this; // DMX TX s_pCoherentRegion = reinterpret_cast<struct TCoherentRegion *>(H3_MEM_COHERENT_REGION + MEGABYTE/2); s_nDmxTransmistBreakTimeINTV = transmit::BREAK_TIME_MIN * 12 ; s_nDmxTransmitMabTimeINTV = transmit::MAB_TIME_MIN * 12 ; s_nDmxTransmitPeriodINTV = (transmit::PERIOD_DEFAULT * 12) - (transmit::MAB_TIME_MIN * 12) - (transmit::BREAK_TIME_MIN * 12); s_tDmxSendState = TxRxState::IDLE; for (uint32_t i = 0; i < dmxmulti::max::OUT; i++) { // DMX TX ClearData(i); s_nDmxDataWriteIndex[i] = 0; s_nDmxDataReadIndex[i] = 0; m_nDmxTransmissionLength[i] = 0; // DMA UART TX auto *lli = &s_pCoherentRegion->lli[i]; H3_UART_TypeDef *p = _get_uart(i); lli->cfg = DMA_CHAN_CFG_DST_IO_MODE | DMA_CHAN_CFG_SRC_LINEAR_MODE | DMA_CHAN_CFG_SRC_DRQ(DRQSRC_SDRAM) | DMA_CHAN_CFG_DST_DRQ(i + DRQDST_UART0TX); lli->src = reinterpret_cast<uint32_t>(&s_pCoherentRegion->dmx_data[i][s_nDmxDataReadIndex[i]].data[0]); lli->dst = reinterpret_cast<uint32_t>(&p->O00.THR); lli->len = s_pCoherentRegion->dmx_data[i][s_nDmxDataReadIndex[i]].nLength; lli->para = DMA_NORMAL_WAIT; lli->p_lli_next = DMA_LLI_LAST_ITEM; // m_tDmxPortDirection[i] = PortDirection::INP; // s_UartState[i] = UartState::IDLE; // RDM RX s_nRdmDataWriteIndex[i] = 0; s_nRdmDataReadIndex[i] = 0; s_pRdmDataCurrent[i] = &s_aRdmData[i][0]; s_tReceiveState[i] = TxRxState::IDLE; // DMX RX s_nDmxDataBufferIndexHead[i] = 0; s_nDmxDataBufferIndexTail[i] = 0; s_nDmxDataIndex[i] = 0; s_nDmxUpdatesPerSecond[i] = 0; s_nDmxPackets[i] = 0; s_nDmxPacketsPrevious[i] = 0; } #ifdef LOGIC_ANALYZER h3_gpio_fsel(3, GPIO_FSEL_OUTPUT); h3_gpio_clr(3); h3_gpio_fsel(6, GPIO_FSEL_OUTPUT); h3_gpio_clr(6); h3_gpio_fsel(10, GPIO_FSEL_OUTPUT); h3_gpio_clr(10); #endif /* * OPIZERO OPIONE OUT PORT * - UART1 1 0 * UART2 UART2 2 1 * UART1 UART3 3 2 * - UART0 4 3 */ h3_gpio_fsel(s_nDmxDataDirectionGpioPin[1], GPIO_FSEL_OUTPUT); h3_gpio_clr(s_nDmxDataDirectionGpioPin[1]); // 0 = input, 1 = output h3_gpio_fsel(s_nDmxDataDirectionGpioPin[2], GPIO_FSEL_OUTPUT); h3_gpio_clr(s_nDmxDataDirectionGpioPin[2]); // 0 = input, 1 = output #if defined (ORANGE_PI_ONE) h3_gpio_fsel(s_nDmxDataDirectionGpioPin[3], GPIO_FSEL_OUTPUT); h3_gpio_clr(s_nDmxDataDirectionGpioPin[3]); // 0 = input, 1 = output h3_gpio_fsel(s_nDmxDataDirectionGpioPin[0], GPIO_FSEL_OUTPUT); h3_gpio_clr(s_nDmxDataDirectionGpioPin[0]); // 0 = input, 1 = output #endif uart_config(1); uart_config(2); #if defined (ORANGE_PI_ONE) uart_config(3); # ifndef DO_NOT_USE_UART0 uart_config(0); # endif #endif __disable_fiq(); arm_install_handler(reinterpret_cast<unsigned>(fiq_dmx_multi), ARM_VECTOR(ARM_VECTOR_FIQ)); gic_fiq_config(H3_UART1_IRQn, GIC_CORE0); gic_fiq_config(H3_UART2_IRQn, GIC_CORE0); #if defined (ORANGE_PI_ONE) gic_fiq_config(H3_UART3_IRQn, GIC_CORE0); # ifndef DO_NOT_USE_UART0 gic_fiq_config(H3_UART0_IRQn, GIC_CORE0); # endif #endif UartEnableFifoTx(1); UartEnableFifoTx(2); #if defined (ORANGE_PI_ONE) UartEnableFifoTx(3); # ifndef DO_NOT_USE_UART0 UartEnableFifoTx(0); # endif #endif irq_timer_init(); irq_timer_set(IRQ_TIMER_0, irq_timer0_dmx_multi_sender); irq_timer_set(IRQ_TIMER_1, irq_timer1_dmx_receive); H3_TIMER->TMR0_CTRL |= TIMER_CTRL_SINGLE_MODE; H3_TIMER->TMR0_INTV = 12000; // Wait 1ms H3_TIMER->TMR0_CTRL |= (TIMER_CTRL_EN_START | TIMER_CTRL_RELOAD); // 0x3; H3_TIMER->TMR1_INTV = 0xB71B00; // 1 second H3_TIMER->TMR1_CTRL &= ~(TIMER_CTRL_SINGLE_MODE); H3_TIMER->TMR1_CTRL |= (TIMER_CTRL_EN_START | TIMER_CTRL_RELOAD); H3_CCU->BUS_SOFT_RESET0 |= CCU_BUS_SOFT_RESET0_DMA; H3_CCU->BUS_CLK_GATING0 |= CCU_BUS_CLK_GATING0_DMA; #if 0 H3_DMA->IRQ_PEND0 |= H3_DMA->IRQ_PEND0; H3_DMA->IRQ_PEND1 |= H3_DMA->IRQ_PEND1; H3_DMA->IRQ_EN0 = DMA_IRQ_EN0_DMA0_PKG_IRQ_EN | DMA_IRQ_EN0_DMA1_PKG_IRQ_EN | DMA_IRQ_EN0_DMA2_PKG_IRQ_EN | DMA_IRQ_EN0_DMA3_PKG_IRQ_EN; #endif isb(); __enable_fiq(); DEBUG_EXIT } void Dmx::SetPortDirection(uint32_t nPortIndex, PortDirection tPortDirection, bool bEnableData) { assert(nPortIndex < dmxmulti::max::OUT); DEBUG_PRINTF("nPort=%d, tPortDirection=%d, bEnableData=%d", nPortIndex, tPortDirection, bEnableData); const auto nUart = _port_to_uart(nPortIndex); if (tPortDirection != m_tDmxPortDirection[nUart]) { StopData(nUart, nPortIndex); switch (tPortDirection) { case PortDirection::OUTP: h3_gpio_set(s_nDmxDataDirectionGpioPin[nUart]); // 0 = input, 1 = output m_tDmxPortDirection[nUart] = PortDirection::OUTP; break; case PortDirection::INP: h3_gpio_clr(s_nDmxDataDirectionGpioPin[nUart]); // 0 = input, 1 = output m_tDmxPortDirection[nUart] = PortDirection::INP; break; default: assert(0); __builtin_unreachable(); break; } } else if (!bEnableData) { StopData(nUart, nPortIndex); } if (bEnableData) { StartData(nUart, nPortIndex); } } void Dmx::ClearData(uint32_t nUart) { for (uint32_t j = 0; j < DMX_DATA_OUT_INDEX; j++) { auto *p = &s_pCoherentRegion->dmx_data[nUart][j]; auto *p32 = reinterpret_cast<uint32_t *>(p->data); for (uint32_t i = 0; i < buffer::SIZE / 4; i++) { *p32++ = 0; } p->nLength = 513; // Including START Code } } void Dmx::StartData(uint32_t nUart, __attribute__((unused)) uint32_t nPortIndex) { assert(s_UartState[nUart] == UartState::IDLE); switch (m_tDmxPortDirection[nUart]) { case PortDirection::OUTP: UartEnableFifoTx(nUart); s_UartState[nUart] = UartState::TX; dmb(); break; case PortDirection::INP: { auto *p = _get_uart(nUart); assert(p != nullptr); if (p != nullptr) { while (!(p->USR & UART_USR_TFE)) ; } UartEnableFifoRx(nUart); s_tReceiveState[nUart] = TxRxState::IDLE; s_UartState[nUart] = UartState::RX; dmb(); break; } default: assert(0); __builtin_unreachable(); break; } } void Dmx::StopData(uint32_t nUart, __attribute__((unused)) uint32_t nPortIndex) { assert(nUart < dmxmulti::max::OUT); dmb(); if (s_UartState[nUart] == UartState::IDLE) { return; } auto *pUart = _get_uart(nUart); assert(pUart != nullptr); if (m_tDmxPortDirection[nUart] == PortDirection::OUTP) { auto IsIdle = false; do { dmb(); if (s_tDmxSendState == TxRxState::DMXINTER) { while (!(pUart->USR & UART_USR_TFE)) ; IsIdle = true; } } while (!IsIdle); } else if (m_tDmxPortDirection[nUart] == PortDirection::INP) { pUart->O08.FCR = 0; pUart->O04.IER = 0; s_tReceiveState[nUart] = TxRxState::IDLE; } s_UartState[nUart] = UartState::IDLE; dmb(); } // DMX Send void Dmx::SetDmxBreakTime(uint32_t nBreakTime) { DEBUG_PRINTF("nBreakTime=%u", nBreakTime); m_nDmxTransmitBreakTime = std::max(transmit::BREAK_TIME_MIN, nBreakTime); s_nDmxTransmistBreakTimeINTV = m_nDmxTransmitBreakTime * 12; // SetDmxPeriodTime(m_nDmxTransmitPeriodRequested); } void Dmx::SetDmxMabTime(uint32_t nMabTime) { DEBUG_PRINTF("nMabTime=%u", nMabTime); m_nDmxTransmitMabTime = std::min(std::max(transmit::MAB_TIME_MIN, nMabTime), transmit::MAB_TIME_MAX); s_nDmxTransmitMabTimeINTV = m_nDmxTransmitMabTime * 12; // SetDmxPeriodTime(m_nDmxTransmitPeriodRequested); } void Dmx::SetDmxPeriodTime(uint32_t nPeriod) { DEBUG_ENTRY DEBUG_PRINTF("nPeriod=%u", nPeriod); m_nDmxTransmitPeriodRequested = nPeriod; auto nLengthMax = m_nDmxTransmissionLength[0]; DEBUG_PRINTF("nLengthMax=%u", nLengthMax); for (uint32_t i = 1; i < dmxmulti::max::OUT; i++) { if (m_nDmxTransmissionLength[i] > nLengthMax) { nLengthMax = m_nDmxTransmissionLength[i]; } } const auto nPackageLengthMicroSeconds = m_nDmxTransmitBreakTime + m_nDmxTransmitMabTime + (nLengthMax * 44) + 44; if (nPeriod != 0) { if (nPeriod < nPackageLengthMicroSeconds) { m_nDmxTransmitPeriod = std::max(transmit::BREAK_TO_BREAK_TIME_MIN, nPackageLengthMicroSeconds + 44); } else { m_nDmxTransmitPeriod = nPeriod; } } else { m_nDmxTransmitPeriod = std::max(transmit::BREAK_TO_BREAK_TIME_MIN, nPackageLengthMicroSeconds + 44); } s_nDmxTransmitPeriodINTV = (m_nDmxTransmitPeriod * 12) - s_nDmxTransmistBreakTimeINTV - s_nDmxTransmitMabTimeINTV; DEBUG_PRINTF("nPeriod=%u, nLengthMax=%u, m_nDmxTransmitPeriod=%u", nPeriod, nLengthMax, m_nDmxTransmitPeriod); DEBUG_ENTRY } void Dmx::SetDmxSlots(uint16_t nSlots) { DEBUG_ENTRY DEBUG_PRINTF("nSlots=%u", nSlots); if ((nSlots >= 2) && (nSlots <= dmx::max::CHANNELS)) { m_nDmxTransmitSlots = nSlots; for (uint32_t i = 0; i < dmxmulti::max::OUT; i++) { if (m_nDmxTransmissionLength[i] != 0) { m_nDmxTransmissionLength[i] = std::min(m_nDmxTransmissionLength[i], static_cast<uint32_t>(nSlots)); DEBUG_PRINTF("m_nDmxTransmissionLength[%u]=%u", i, m_nDmxTransmissionLength[i]); } } SetDmxPeriodTime(m_nDmxTransmitPeriodRequested); } DEBUG_EXIT } void Dmx::SetPortSendDataWithoutSC(uint32_t nPortIndex, const uint8_t *pData, uint32_t nLength) { assert(pData != 0); assert(nLength != 0); const auto nUart = _port_to_uart(nPortIndex); assert(nUart < dmxmulti::max::OUT); const auto nNext = (s_nDmxDataWriteIndex[nUart] + 1) & (DMX_DATA_OUT_INDEX - 1); auto *p = &s_pCoherentRegion->dmx_data[nUart][nNext]; auto *pDst = p->data; nLength = std::min(nLength, static_cast<uint32_t>(m_nDmxTransmitSlots)); p->nLength = nLength + 1U; __builtin_prefetch(pData); memcpy(&pDst[1], pData, nLength); // DEBUG_PRINTF("nLength=%u, m_nDmxTransmissionLength[%u]=%u", nLength, nUart, m_nDmxTransmissionLength[nUart]); if (nLength != m_nDmxTransmissionLength[nUart]) { m_nDmxTransmissionLength[nUart] = nLength; SetDmxPeriodTime(m_nDmxTransmitPeriodRequested); } s_nDmxDataWriteIndex[nUart] = nNext; } void Dmx::Blackout() { DEBUG_ENTRY for (uint32_t nPortIndex = 0; nPortIndex < dmxmulti::max::OUT; nPortIndex++) { const auto nUart = _port_to_uart(nPortIndex); if (s_UartState[nUart] != UartState::TX) { continue; } assert(nUart < dmxmulti::max::OUT); const auto nNext = (s_nDmxDataWriteIndex[nUart] + 1) & (DMX_DATA_OUT_INDEX - 1); auto *p = &s_pCoherentRegion->dmx_data[nUart][nNext]; auto *p32 = reinterpret_cast<uint32_t *>(p->data); for (uint32_t i = 0; i < buffer::SIZE / 4; i++) { *p32++ = 0; } p->data[0] = dmx::START_CODE; s_nDmxDataWriteIndex[nUart] = nNext; } DEBUG_EXIT } void Dmx::FullOn() { DEBUG_ENTRY for (uint32_t nPortIndex = 0; nPortIndex < dmxmulti::max::OUT; nPortIndex++) { const auto nUart = _port_to_uart(nPortIndex); if (s_UartState[nUart] != UartState::TX) { continue; } assert(nUart < dmxmulti::max::OUT); const auto nNext = (s_nDmxDataWriteIndex[nUart] + 1) & (DMX_DATA_OUT_INDEX - 1); auto *p = &s_pCoherentRegion->dmx_data[nUart][nNext]; auto *p32 = reinterpret_cast<uint32_t *>(p->data); for (uint32_t i = 0; i < buffer::SIZE / 4; i++) { *p32++ = static_cast<uint32_t>(~0); } p->data[0] = dmx::START_CODE; s_nDmxDataWriteIndex[nUart] = nNext; } DEBUG_EXIT } // DMX Receive const uint8_t *Dmx::GetDmxAvailable(uint32_t nPortIndex) { const auto nUart = _port_to_uart(nPortIndex); dmb(); if (s_nDmxDataBufferIndexHead[nUart] == s_nDmxDataBufferIndexTail[nUart]) { return nullptr; } else { const auto *p = const_cast<const uint8_t *>(s_aDmxData[nUart][s_nDmxDataBufferIndexTail[nUart]].Data); s_nDmxDataBufferIndexTail[nUart] = (s_nDmxDataBufferIndexTail[nUart] + 1) & buffer::INDEX_MASK; return p; } } uint32_t Dmx::GetUpdatesPerSecond(uint32_t nPortIndex) { const auto uart = _port_to_uart(nPortIndex); dmb(); return s_nDmxUpdatesPerSecond[uart]; } // RDM uint32_t Dmx::RdmGetDateReceivedEnd() { return sv_RdmDataReceiveEnd; } // RDM Send void Dmx::RdmSendRaw(uint32_t nPortIndex, const uint8_t* pRdmData, uint32_t nLength) { assert(nPortIndex < dmxmulti::max::OUT); assert(pRdmData != nullptr); assert(nLength != 0); auto *p = _get_uart(_port_to_uart(nPortIndex)); assert(p != nullptr); while (!(p->LSR & UART_LSR_TEMT)) ; p->LCR = UART_LCR_8_N_2 | UART_LCR_BC; udelay(RDM_TRANSMIT_BREAK_TIME); p->LCR = UART_LCR_8_N_2; udelay(RDM_TRANSMIT_MAB_TIME); for (uint32_t i = 0; i < nLength; i++) { while (!(p->LSR & UART_LSR_THRE)) ; p->O00.THR = pRdmData[i]; } while ((p->USR & UART_USR_BUSY) == UART_USR_BUSY) { static_cast<void>(EXT_UART->O00.RBR); } } // RDM Receive const uint8_t *Dmx::RdmReceive(uint32_t nPortIndex) { assert(nPortIndex < dmxmulti::max::OUT); const auto nUart = _port_to_uart(nPortIndex); dmb(); if (s_nRdmDataWriteIndex[nUart] == s_nRdmDataReadIndex[nUart]) { return nullptr; } else { const auto *p = &s_aRdmData[nUart][s_nRdmDataReadIndex[nUart]].data[0]; s_nRdmDataReadIndex[nUart] = (s_nRdmDataReadIndex[nUart] + 1) & RDM_DATA_BUFFER_INDEX_MASK; return p; } } const uint8_t *Dmx::RdmReceiveTimeOut(uint32_t nPortIndex, uint16_t nTimeOut) { assert(nPortIndex < dmxmulti::max::OUT); uint8_t *p = nullptr; const auto nMicros = H3_TIMER->AVS_CNT1; do { if ((p = const_cast<uint8_t*>(RdmReceive(nPortIndex))) != nullptr) { return p; } } while ((H3_TIMER->AVS_CNT1 - nMicros) < nTimeOut); return p; }
f59d3a362fa72e8ee90dfd2b6db0be655a2cab70
df3c3b71f84304607b9b595cfc1d925a4604f477
/abc097/b/main.cpp
e466e2abde53a20335eeefe1e7242f8f6b95c461
[]
no_license
yuuki1036/atcoder
79946a618e9f467dd08ebd22a4e6255c2b19ce94
5ce116c52e375c9a7c90f4e046832958066b6c66
refs/heads/master
2023-08-01T14:32:16.431357
2021-09-13T14:21:51
2021-09-13T14:21:51
290,467,849
0
0
null
null
null
null
UTF-8
C++
false
false
300
cpp
main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int x; cin >> x; ll ans = 1; for(int i=1; i<=100; ++i){ for(int j=2; j<=10; ++j){ long long res = pow(i, j); if(res <= x) ans = max(ans, res); else break; } } cout << ans << endl; }
9e40c84cc9934244691a11410f6d70f3cb1d8571
1376919677619ee636ce13d285d9a34bc5d96742
/loginwindow.cpp
482ff599c20bc66f983808b2dc4afc7e30b115f9
[]
no_license
alexYamaoka/CS1C-qt-shapes
f4a35851b62711ef72013e73a08f3026c4298a69
c7a55146481b65ee3836ccf0d3280d1be89cd32a
refs/heads/master
2020-06-24T13:11:35.610905
2019-07-25T04:57:23
2019-07-25T04:57:23
196,100,794
0
0
null
2019-07-10T00:09:13
2019-07-10T00:09:12
null
UTF-8
C++
false
false
1,973
cpp
loginwindow.cpp
#include "loginwindow.h" #include "ui_loginwindow.h" bool adminAccessGranted = false; loginWindow::loginWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::loginWindow) { ui->setupUi(this); ui->errorMessage->setText("Guest account granted (default)..."); } loginWindow::~loginWindow() { delete ui; } // Albert Le // 7/23/19 8:19 pm lastest edit // Opens a login window, allowing the user to enter // a username and password and to click on an "Enter" // button. If username and password are not the correct // login information, it will output an error message. // It defaults the user to a guest account. If they enter // the correct username and pw, then it will output an // "Admin access granted" message, and then the user can // exit the login window. Updates the global variable // adminAccessGranted to true so that MainWindow knows // the user has admin access. void loginWindow::on_loginButton_clicked() { if (ui->usernameInput->toPlainText() == "qtAdmin" && ui->passwordInput->toPlainText() == "qtPW") { ui->errorMessage->setText("Admin access granted...\n Use 'temp' and 'pw' to login as guest"); // updates global variable to be true so communicate to MainWindow that user has admin access adminAccessGranted = true; } else if (ui->usernameInput->toPlainText() == "temp" && ui->passwordInput->toPlainText() == "pw") { ui->errorMessage->setText("Logged in as guest"); adminAccessGranted = false; } else { if (!adminAccessGranted) { ui->errorMessage->setText("Incorrect login for admin access. \n(logged in as guest)"); } else { ui->errorMessage->setText("Use 'temp' and 'pw' to go back to guest \n(logged in as admin)"); } } } void loginWindow::on_closeWindow_clicked() { this->close(); }
bdc4ba6f25fac579ca675b2991bbef7299c1df7a
142e542c645b58a73d5381170fd3ee154623f961
/kythe/cxx/indexer/cxx/testdata/function/function_overload.cc
d8995e81ff7b56805adb2da11338f7b99b31982e
[ "Apache-2.0" ]
permissive
mcanthony/kythe
226ea028d7124c58cfe2839cf14d4915c2b26a90
ded11436a91e9948439c64c2eda87b8cbd23acfc
refs/heads/master
2021-01-15T12:53:41.421627
2015-10-13T18:25:24
2015-10-13T18:25:24
44,242,375
1
0
null
2015-10-14T11:08:22
2015-10-14T11:08:22
null
UTF-8
C++
false
false
266
cc
function_overload.cc
// Checks that function overloads are recorded. //- @F defines/binding FnFI void F(int X) { } //- @F defines/binding FnFF void F(float Y) { } //- FnFI param.0 IntX //- FnFF param.0 FloatY //- IntX named vname("X:F#n",_,_,_,_) //- FloatY named vname("Y:F#n",_,_,_,_)
dee3dd681be2c22fc9548f8f91d9a51522a10abe
e6581e760f20a75a0c2135e10f9bf2d0b1dabd37
/Code Framework/Actions/MOVE.h
c4c0723881476a6f515efd492145199cff85f429
[]
no_license
tokaalokda/LogicSimulator
74f4d86c3381e600e00a19e9d05b0edcb26ea3d9
6093d6d242801c0f8764b5c16889e0b9c12a153e
refs/heads/main
2023-04-06T09:37:37.428674
2023-03-21T09:19:43
2023-03-21T09:19:43
321,353,472
0
0
null
null
null
null
UTF-8
C++
false
false
511
h
MOVE.h
#ifndef _MOVE_ #define _MOVE_ #include "action.h" #include "..\Components\Component.h" #include "..\Components\OutputPin.h" #include "..\Components\InputPin.h" class Move : public Action { private: //Get a Pointer to the user Interfaces UI* pUI = pManager->GetUI(); window* pWind = pUI->getpWind(); int Cx, Cy; public: Move(ApplicationManager* pApp); virtual ~Move(void); Component* deleted; //Execute action (code depends on action type) virtual void Execute(); }; #endif
ad491006aa944c9a2da0c32afc68751a8e359dde
c8b482b1828222c76b5fb1594ebceecd430e5bab
/Source/PL3DS.Gui/include/PL3DS.Gui/Dialogs/LocalizeDialog.h
fb1110df7c914cc0b0161bd9ea39eed5de9e113f
[]
no_license
osipyonok/PointLocationIn3DSubdivision
f900a781f6d9c024dc1a35e95719c84360bac5a2
74d74ea608ac4896230f1d7fb27a318eb1344eca
refs/heads/master
2020-12-02T23:46:29.431618
2020-05-10T17:17:33
2020-05-10T17:17:33
231,157,639
0
0
null
null
null
null
UTF-8
C++
false
false
1,602
h
LocalizeDialog.h
#pragma once #include <QDialog> #include <Math.Core/Point3D.h> #include <Rendering.Core/IRenderable.h> #include <memory> class QString; namespace UI { namespace Details { class PointPreviewRenderable : public Rendering::IRenderable { Q_OBJECT public: PointPreviewRenderable(); ~PointPreviewRenderable() override; std::unique_ptr<Qt3DCore::QComponent> GetMaterial() const override; std::unique_ptr<Qt3DCore::QTransform> GetTransformation() const; std::unique_ptr<Qt3DCore::QComponent> GetRenderer() const; void SetColor(const QColor& i_color) override; QColor GetColor() const override; const TransformMatrix& GetTransform() const override; void Transform(const TransformMatrix& i_transform) override; std::vector<Rendering::IRenderable*> GetNestedRenderables() const override; void SetPoint(const Point3D& i_point); private: Point3D m_position; std::vector<std::unique_ptr<Rendering::IRenderable>> m_renderables; }; } class LocalizeDialog : public QDialog { Q_OBJECT public: explicit LocalizeDialog(QDialog* ip_parent = nullptr); ~LocalizeDialog() override; private: void _InitVoxelBased(); void _InitKDTreeBased(); void _InitOcTreeBased(); void _UpdateSliders(); void _LogMessage(const QString& i_str) const; struct Impl; std::unique_ptr<Impl> mp_impl; }; }
367d0884d194edc95e9d9612043a24d1e7bdfef8
13432503a27e2d6eb6636f62403bb9ddf0d89111
/Emoticon/EmoticonMainWgt.h
7f4e51871e5b34799cb131f3cfba22d91a098743
[ "MIT" ]
permissive
startalkIM/startalk_pc
0fa0d1a010c0f7706571dee29921ecf5b557edf4
1c51f376f0915229b44f4e71b3ead6278ee639a4
refs/heads/master
2022-07-28T13:31:03.355674
2021-12-14T02:57:10
2021-12-14T02:57:10
219,650,148
30
22
MIT
2021-10-16T02:15:33
2019-11-05T03:31:28
C++
UTF-8
C++
false
false
3,817
h
EmoticonMainWgt.h
#if _MSC_VER >= 1600 #pragma execution_character_set("utf-8") #endif #ifndef _EmoticonMainWgt_H_ #define _EmoticonMainWgt_H_ #include "CustomUi/UShadowWnd.h" #include <QMap> #include <QPair> #include <QMutexLocker> #include "emoticon_global.h" #include "EmoticonStruct.h" #include "include/CommonStrcut.h" #include "entity/im_config.h" class QStackedWidget; class QPushButton; class EmoIconWgt; class EmoPreviewWgt; class QToolButton; class QTableWidget; class EmoMsgManager; class EmoticonManager; class EmoMsgListener; class EmoIcon; class EMOTICON_EXPORT EmoticonMainWgt : public UShadowDialog { Q_OBJECT private: EmoticonMainWgt(); public: static EmoticonMainWgt *instance(); ~EmoticonMainWgt() override; public: void setConversionId(const QString &conversionId); QString downloadEmoticon(const QString &pkgId, const QString &shortCut); QString getEmoticonLocalFilePath(const QString &pkgId, const QString &shortCut); void removeLocalEmoticon(const QString &pkgid, const QString &iconPath); ArStNetEmoticon getNetEmoticonInfo(); void downloadNetEmoticon(const QString &pkgId); void updateDownloadNetEmotiocnProcess(const std::string &key, double dtotal, double dnow); void installEmoticon(const QString &pkgId); void init(); // 更新收藏 void updateCollectionConfig(const std::vector<st::entity::ImConfig>& arConfigs); void updateCollectionConfig(const std::map<std::string, std::string> &deleteData, const std::vector<st::entity::ImConfig>& arImConfig); Q_SIGNALS: void readLocalEmoticons(); void sendEmoticon(const QString &, const QString &, bool, const std::string&); void sgInsertEmoticon(const QString &, const QString &, const QString&, const QString&); // void sendCollectionImage(const QString &, const QString &, const QString); void updateProcessSignal(const QString &, double, double); void addLocalEmoSignal(const QString &); void installedEmotion(const QString &); void installEmoticonError(const QString &); void removeEmoticon(const QString &); void setTurnPageBtnEnableSignal(); // void updateConllectionSignal(); // void sgGotNetEmo(); protected: void focusOutEvent(QFocusEvent *e) override; void mousePressEvent(QMouseEvent *e) override; void initUi(); void initLocalEmoticon(); void getLocalEmoticon(); void addMyCollection(); // void updateCollection(); void initDefaultEmo(); private: void bindBtnTableWgt(EmoIcon *btn, QTableWidget *wgt); void addEmoticon(const StEmoticon &stEmo); bool readEmoticonXml(const QString &xmlPath, StEmoticon &stEmoticon); void onEmoticonItemClick(int row, int col); // void onCollectionItemClick(int row, int col); void setTurnPageBtnEnable(); void turnLeft(); void turnRight(); void onSettingBtnClick(); void addLocalEmoticon(const QString &pkgId); void onRemoveEmoticon(const QString &pkgId); void getNetEmoticon(); void onRemoveCollection(const QString&); private: QMap<QString, QPair<EmoIcon *, QTableWidget *> > _mapBtnTableWgt; QMap<QString, StEmoticon> _mapEmoticonInfos; QString _strConversionId; ArStNetEmoticon _arNetEmoInfo; // std::map<UnorderMapKey, std::string> _mapCollections; std::map<std::string, std::string> _collections; // StEmoticon _collectionEmo; private: EmoPreviewWgt *_pStackEmoWgt{}; EmoIconWgt *_pStackIconWgt{}; QPushButton *_pBtnLeftPage{}; QPushButton *_pBtnRightPage{}; QPushButton *_pBtnSetting{}; EmoMsgManager *_pMessageManager; EmoMsgListener *_pMessageListener; EmoticonManager *_pManager; QMutex _mutex; }; #endif//_EmoticonMainWgt_H_
d74f8c67aaa489ca777a4ebc6a78029b804d7c65
ac3b1252621e7bd0bb7ebbd80d74c8a14b463413
/VE280_InClassEx/415.add-strings.cpp
3e277776c8df3c4c463d7b464ad958c8d720b502
[ "MIT" ]
permissive
PeterQiu0516/LeetCode
838622f6678caa897f19f3d342af8108f5e8c5d1
b692a67b434767dea6bb786b423664202d1d8219
refs/heads/master
2020-12-18T22:33:25.614382
2020-12-11T11:03:07
2020-12-11T11:03:07
235,539,028
1
0
null
null
null
null
UTF-8
C++
false
false
996
cpp
415.add-strings.cpp
/* * @lc app=leetcode id=415 lang=cpp * * [415] Add Strings */ // @lc code=start class Solution { public: string addStrings(string num1, string num2) { int n1 = num1.size(), n2 = num2.size(); int int1[5100] = {}; int int2[5100] = {}; int ans[5101] = {}; for (int i = 0; i < n1; i++) { int1[5099 - i] = (int)(num1[n1 - 1 - i] - '0'); } for (int i = 0; i < n2; i++) { int2[5099 - i] = (int)(num2[n2 - 1 - i] - '0'); } int pass = 0, digit = max(n1, n2); for (int i = 5099, j = 0; j < digit; j++) { ans[i - j + 1] = (pass + int1[i - j] + int2[i - j]) % 10; pass = (pass + int1[i - j] + int2[i - j]) / 10; } if (pass) ans[5100 - digit++] = 1; string s; for (int i = 5100 - digit + 1; i <= 5100; i++) s.push_back(char(ans[i] + '0')); return s; } }; // @lc code=end
dfaf53f092a76931dcfb63b4b43083fe962e621e
d86ed55d6db57a1b573c32853aecd677d350f732
/main.cpp
0258bd8ef76c85280bd03f52c4f0a9cc625f652c
[]
no_license
rocioparra/eda-tp3-roomba
23d1d0cdd911bd91ae406402280ad16e3c537972
7e127d5a99dda6b1c605a8cce3cdf33f682366cd
refs/heads/master
2021-01-23T03:33:32.589074
2017-03-30T19:06:50
2017-03-30T19:06:50
86,088,925
0
0
null
2017-03-27T01:06:51
2017-03-24T16:30:39
C++
ISO-8859-1
C++
false
false
6,954
cpp
main.cpp
/* Instituto Tecnológico de Buenos Aires 22.08 - Algoritmos y estructura de datos Trabajo práctico n° 3: Robots Autores: Díaz, Ian Cruz - legajo 57.515 Parra, Rocío - legajo 57.669 Stewart Harris, María Luz - legajo 57.676 Fecha de entrega: jueves 30 de marzo de 2017 */ #include <iostream> #include <chrono> #include <thread> #include <string> #include <cstdint> #include "Simulation.h" #include "Graphics.h" #include "GraphicMode2.h" #include "myAudio.h" extern "C" { #include "parseCmdLine.h" #include "moreString.h" } // MODOS: show once muestra una simulacion graficamente, average muestra un grafico del promedio de ticks para un piso con // distintos numeros de robots #define SHOW_ONCE 1 #define AVERAGE 2 // CONSTANTES MODO 2: #define CICLES 1000 //numero de veces que repite la simulacion para calcular el promedio de ticks #define MAX_ROBOTS 100 //maximo numero de robots para el que se calcula el promedio de ticks #define MIN_DIFF 0.1 //minima diferencia que debe haber entre dos promedios consecutivos para seguir calculando promedios #define N_AUDIO_SAMPLES 1 //cuantas pistas de audio se utilizan en este programa (solo la musica de fondo) using namespace std; int32_t check (char * _key, char * _value, void * userData); //predeclaracion: callback para el parser //donde se guardaran los datos recibidos por linea de comando typedef struct { uint32_t width; uint32_t height; uint32_t mode; uint32_t robotN; } userData_t; int32_t main(int32_t argc, char * argv[]) { srand(time(NULL)); userData_t ud = {0, 0, 0, 0}; //datos recibidos por el usuario: todo debe empezar en 0, que no es un dato valido para //ninguna opcion, ya que despues sabemos que no se recibio un dato si sigue en 0 if((parseCmdLine(argc, argv, check, &ud)) == PARSER_ERROR) { //si no se reciben datos validos por linea de comando, no se puede continuar cout << "Invalid parameters. Keep in mind that:" << endl << "- all parameters must be positive integers" << endl << "- Mode can only be 1 (show once) or 2 (mean average)" << endl; return -1; } if( !ud.height || !ud.width || (!ud.robotN && ud.mode == SHOW_ONCE) ) // si no se recibieron las medidas del piso, o si no se recibieron los robots para el modo 1, // no se puede realizar la simulacion. al quedar el modo en 0, se avanzara a la parte de error ud.mode = 0; if(ud.mode == SHOW_ONCE) { //MODO 1 Graphics g(ud.width, ud.height); //inicializar la parte grafica if ( !g.isValid() ) { cout << "Error: allegro was not properly initialized" << endl; return -1; } MyAudio a(N_AUDIO_SAMPLES); //inicializar el audio sampleID bgMusic = a.loadSample("DiscoMusic.wav"); //cargar la musica de fondo Simulation s(ud.robotN, ud.width, ud.height, &g); //inicializar la simulacion if( bgMusic == NULL ) { cout << "Error: could not load audio sample" << endl; g.destructor(); return -1; } else if ( !s.isValid() ) { cout << "Error: parameters exceeded the maximum (width <= 100, height <=70)" << endl; g.destructor(); a.destructor(); return -1; } a.playSampleLooped(bgMusic); //encender la musica de fondo while(!s.nextSimulationStep()); //realizar y mostrar la simulacion g.showTickCount(s.getTickCount()); //pop-up que indica los ticks s.destroy(); //destruir todo a.stopSamples(); g.destructor(); a.destructor(); } else if (ud.mode == AVERAGE) { //MODO 2 double meanTicks[MAX_ROBOTS]; //promedios uint32_t n, i; //contadores: robots, ciclos memset(meanTicks, 0, sizeof(meanTicks)); //inicializo todo el arreglo en 0 for (n = 0; n < MAX_ROBOTS && ( n<=1 || (meanTicks[n-2] - meanTicks[n-1] > (double)MIN_DIFF)); n++) { //se prueba desde 1 robot a 100 robots, o hasta que los promedios den casi lo mismo para dos //numeros de robots consecutivos cout << "Simulating "<< n+1 << " robots"<< endl; for(i = 0; i < CICLES; i++) { //para cada numero de robots, simular 1000 veces Simulation s(n+1, ud.width, ud.height); if ( !s.isValid() ) { cout << "Error: parameters exceeded the maximum (0<width<=100" <<", 0<height <=70, 0<robots, mode = 1 or mode =2)" << endl; return -1; } while(!s.nextSimulationStep()); //realizar la simulacion (no muestra nada) meanTicks[n] += double (s.getTickCount()); //va sumando los ticks s.destroy(); } meanTicks[n]/=CICLES; //obtiene el promedio de ticks de las simulaciones hechas } GraphicMode2 g(n); if ( !g.isValid() ) { cout << "Error: allegro was not properly initialized" << endl; return -1; } g.drawAllBars(meanTicks); //grafica los resultados obtenidos g.showChanges(); this_thread::sleep_for(chrono::seconds(5)); //muestra los resultados por 5 segundos g.destructor(); } else { //parametros no validos cout << "Error: invalid or insufficient parameters. Keep in mind that:" << endl << "- all parameters must be positive integers" << endl << "- Mode can only be 1 (show once) or 2 (mean average)" << endl << "- Robots must be explicit for mode 1" << endl << "- Width, Height and Mode must always be explicit" << endl; return -1; } return EXIT_SUCCESS; } int32_t check (char * _key, char * _value, void * userData) { if (_key == NULL || _value == NULL || userData == NULL) //el programa roomba solo recibe opciones como argumento return false; int32_t isUInt; uint32_t valueNumber = getUnsInt(_value, &isUInt); if ( !isUInt || valueNumber == 0 ) //verificar que se la conversion se hizo bien y que el value no era 0 return false; //como todos los values de este programa son uints > 0 , si es otra cosa es error //notese que la func. strtol devolvera 0 si no habia un int string key(_key); //pasar a string por simplicidad en el codigo userData_t * ud = (userData_t *) userData; int32_t status = false; //status cambiara a true si se verifica que se recibio algo valido // Se procede a verificar que la key sea una de las validas y a guardar el valor donde corresponda. // El control de cuales son los parametros maximos que se puede recibir lo hara la simulacion, esta //funcion solo verifica que los numeros sean mayores a 0 y que el modo sea valido. if (key == "Width") { ud->width = valueNumber; status = true; } else if (key == "Height") { ud->height = valueNumber; status = true; } else if (key == "Robots") { ud->robotN = valueNumber; status = true; } else if (key == "Mode") { if ( valueNumber <=2 ) { //modo puede ser solo 1 o 2 ud->mode = valueNumber; status = true; } } return status; }
107c050bdee60f5a506b48d695bea18a69c77237
5fa92e7456501ed0ed306f6925b7c7a628eb440f
/俄罗斯方块/MyMap.cpp
04f3a3256be53573e0fd09807c6b89668c05568b
[]
no_license
yuantangjin/C-
f56058c22d3a8e344817be7a099ece39721a450f
bec84b0beaeb74ac343b627a34b20df5e1a2be9c
refs/heads/master
2023-07-11T07:31:44.686828
2021-08-13T14:41:50
2021-08-13T14:41:50
394,821,156
0
0
null
null
null
null
GB18030
C++
false
false
1,875
cpp
MyMap.cpp
#include "stdafx.h" #include "MyMap.h" CMyMap::CMyMap() { loadimage(&image[0], "1.jpg", IMG_WID, IMG_HEI); loadimage(&image[1], "2.jpg", IMG_WID, IMG_HEI); _zeroMap(); } CMyMap::~CMyMap() { } void CMyMap::initMap() { //清空地图 _zeroMap(); //最上面和最下面一行 for (int i = 0;i < MAP_ROW;i += MAP_ROW - 1) { for (size_t j = 0; j < MAP_COL; j++) { m_mapArr[i][j] = map_franme; } } //最左面和最右面一列 for (int i = 0;i < MAP_COL;i += MAP_COL - 1) { for (int j = 1;j < MAP_ROW - 1;j++) { m_mapArr[j][i] = map_franme; } } //for (int i = 0;i < MAP_ROW;i++) { // for (size_t j = 0; j < MAP_COL; j++) // { // if (i == 0 || i == MAP_ROW - 1 || j == 0 || j = MAP_COL - 1) // m_mapArr[i][j] = map_franme; // else // m_mapArr[i][j] = map_null; // } //} } void CMyMap::drawMap() { BeginBatchDraw(); for (int i = 0;i < MAP_ROW;i++) { for (int j = 0;j < MAP_COL;j++) { switch (m_mapArr[i][j]) { case map_franme: //printf("* "); putimage(j * IMG_WID, i * IMG_HEI, &image[0]); break; case map_null: //printf(" "); break; case map_block: //printf("# "); putimage(j * IMG_WID, i * IMG_HEI, &image[1]); break; } } printf("\n"); } EndBatchDraw(); } void CMyMap::_zeroMap() { memset(m_mapArr, 0, sizeof(char) * MAP_ROW * MAP_COL); } void CMyMap::setMapVal(int row, int col, int val) { m_mapArr[row][col] = val; } int CMyMap::clearNum() { int num = 0;//用于计分 for (size_t i = MAP_ROW-2; i >= 4; i--) { bool isClear = true; for (size_t j = 1; j < MAP_COL-1; j++) { if (m_mapArr[i][j] == map_null) { isClear = false; break; } } if (isClear) { num++; for (size_t m = i; m >= 4; m--) { for (int n = 1;n < MAP_COL - 1;n++) { m_mapArr[m][n] = m_mapArr[m - 1][n]; } } i++; } } return 0; }
9ce501cae60a203380d077d4d06414b0a9c67c32
71d3678b339645ba70f44ca029d214cfbb3327a9
/src/model/model.cpp
c57248a60c74d621b04f75b42a889272d36e412a
[ "Apache-2.0" ]
permissive
QthCN/opsguide_ogp
1a62789d66b93ededfcbb9a616d7a1b880034a29
64ea1b9682d9275f0bf2c38bf4dcae868f0c4bfd
refs/heads/master
2021-05-24T04:01:29.137979
2020-08-20T00:37:36
2020-08-20T00:37:36
63,672,580
1
1
null
null
null
null
UTF-8
C++
false
false
23,320
cpp
model.cpp
// // Created by thuanqin on 16/6/1. // #include "model/model.h" #include "mysql_connection.h" #include "cppconn/driver.h" #include "cppconn/exception.h" #include "cppconn/resultset.h" #include "cppconn/prepared_statement.h" #include "cppconn/statement.h" #include "common/log.h" #include "common/md5.h" #define SQLQUERY_BEGIN sql::Connection *conn = nullptr;\ conn = get_conn();\ conn->setAutoCommit(0);\ sql::Statement *stmt = nullptr;\ sql::ResultSet *res = nullptr;\ sql::PreparedStatement *pstmt = nullptr;\ try { #define SQLQUERY_CLEAR_RESOURCE if (stmt != nullptr) {delete stmt;}\ if (res != nullptr) {delete res;}\ if (pstmt != nullptr) {delete pstmt;}\ if (conn != nullptr) {close_conn(conn);} #define SQLQUERY_END } catch (sql::SQLException &e) {\ LOG_ERROR("SQLException: " << e.what() << " MySQL error code: " << e.getErrorCode() << " SQLState: " << e.getSQLState())\ if (stmt != nullptr) {delete stmt;}\ if (res != nullptr) {delete res;}\ if (pstmt != nullptr) {delete pstmt;}\ if (conn != nullptr) {close_conn(conn);}\ throw e;} template<typename PTR> void delete_ptr(PTR p) { if (*p != nullptr) { delete *p; *p = nullptr; } } sql::Connection *ModelMgr::get_conn() { try { auto driver = get_driver_instance(); auto conn = driver->connect(mysql_address, mysql_user, mysql_password); conn->setSchema(mysql_schema); return conn; } catch (sql::SQLException &e) { LOG_ERROR("" << e.what()) throw e; } } void ModelMgr::close_conn(sql::Connection *conn) { if (conn == nullptr) { return; } conn->commit(); conn->close(); delete conn; } std::vector<machine_apps_info_model_ptr> ModelMgr::get_machine_apps_info() { SQLQUERY_BEGIN stmt = conn->createStatement(); res = stmt->executeQuery("SELECT MACHINE_APP_LIST.id AS machine_app_list_id," "MACHINE_APP_LIST.ip_address," "MACHINE_APP_LIST.app_id AS app_id," "MACHINE_APP_LIST.version_id AS version_id," "MACHINE_APP_LIST.runtime_name AS runtime_name," "APP_VERSIONS.version," "APP_LIST.name AS app_name " "FROM MACHINE_APP_LIST, APP_VERSIONS, APP_LIST " "WHERE MACHINE_APP_LIST.version_id=APP_VERSIONS.id " "AND MACHINE_APP_LIST.app_id=APP_LIST.id " "ORDER BY MACHINE_APP_LIST.id DESC"); std::vector<machine_apps_info_model_ptr> result; while (res->next()) { auto record = std::make_shared<MachineAppsInfoModel>(); record->set_machine_app_list_id(res->getInt("machine_app_list_id")); record->set_ip_address(res->getString("ip_address")); record->set_app_id(res->getInt("app_id")); record->set_version_id(res->getInt("version_id")); record->set_version(res->getString("version")); record->set_name(res->getString("app_name")); record->set_runtime_name(res->getString("runtime_name")); result.push_back(record); } delete_ptr(&res); for (auto &record: result) { auto uniq_id = record->get_machine_app_list_id(); // cfg_ports pstmt = conn->prepareStatement("SELECT private_port, public_port, type " "FROM PUBLISH_APP_CFG_PORTS " "WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); res = pstmt->executeQuery(); while (res->next()) { auto cfg_port = std::make_shared<PublishAppCfgPortsModel>(); cfg_port->set_uniq_id(uniq_id); cfg_port->set_private_port(res->getInt("private_port")); cfg_port->set_public_port(res->getInt("public_port")); cfg_port->set_type(res->getString("type")); record->get_cfg_ports().push_back(cfg_port); } delete_ptr(&res); delete_ptr(&pstmt); // cfg_volumes pstmt = conn->prepareStatement("SELECT docker_volume, host_volume " "FROM PUBLISH_APP_CFG_VOLUMES " "WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); res = pstmt->executeQuery(); while (res->next()) { auto cfg_volume = std::make_shared<PublishAppCfgVolumesModel>(); cfg_volume->set_uniq_id(uniq_id); cfg_volume->set_docker_volume(res->getString("docker_volume")); cfg_volume->set_host_volume(res->getString("host_volume")); record->get_cfg_volumes().push_back(cfg_volume); } delete_ptr(&res); delete_ptr(&pstmt); // cfg_dns pstmt = conn->prepareStatement("SELECT dns, address " "FROM PUBLISH_APP_CFG_DNS " "WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); res = pstmt->executeQuery(); while (res->next()) { auto cfg_dns = std::make_shared<PublishAppCfgDnsModel>(); cfg_dns->set_uniq_id(uniq_id); cfg_dns->set_dns(res->getString("dns")); cfg_dns->set_address(res->getString("address")); record->get_cfg_dns().push_back(cfg_dns); } delete_ptr(&res); delete_ptr(&pstmt); // cfg_extra_cmd pstmt = conn->prepareStatement("SELECT extra_cmd " "FROM PUBLISH_APP_CFG_EXTRA_CMD " "WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); res = pstmt->executeQuery(); while (res->next()) { auto cfg_extra_cmd = std::make_shared<PublishAppCfgExtraCmdModel>(); cfg_extra_cmd->set_uniq_id(uniq_id); cfg_extra_cmd->set_extra_cmd(res->getString("extra_cmd")); record->set_cfg_extra_cmd(cfg_extra_cmd); } delete_ptr(&res); delete_ptr(&pstmt); // hints pstmt = conn->prepareStatement("SELECT item, value " "FROM PUBLISH_APP_HINTS " "WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); res = pstmt->executeQuery(); while (res->next()) { auto hint = std::make_shared<PublishAppHintsModel>(); hint->set_item(res->getString("item")); hint->set_value(res->getString("value")); record->get_hints().push_back(hint); } } SQLQUERY_CLEAR_RESOURCE return result; SQLQUERY_END } std::vector<application_model_ptr> ModelMgr::get_applications() { SQLQUERY_BEGIN stmt = conn->createStatement(); res = stmt->executeQuery("SELECT id, source, name, description " "FROM APP_LIST " "ORDER BY id DESC"); std::vector<application_model_ptr> result; while (res->next()) { auto record = std::make_shared<ApplicationModel>(); record->set_id(res->getInt("id")); record->set_source(res->getString("source")); record->set_name(res->getString("name")); record->set_description(res->getString("description")); result.push_back(record); } SQLQUERY_CLEAR_RESOURCE return result; SQLQUERY_END } std::vector<app_versions_model_ptr> ModelMgr::get_app_versions_by_app_id(int app_id) { SQLQUERY_BEGIN pstmt = conn->prepareStatement("SELECT id, app_id, version, registe_time, description " "FROM APP_VERSIONS WHERE app_id=? " "ORDER BY id DESC"); pstmt->setInt(1, app_id); res = pstmt->executeQuery(); std::vector<app_versions_model_ptr> result; while (res->next()) { auto record = std::make_shared<AppVersionsModel>(); record->set_id(res->getInt("id")); record->set_app_id(res->getInt("app_id")); record->set_version(res->getString("version")); record->set_registe_time(res->getString("registe_time")); record->set_description(res->getString("description")); result.push_back(record); } SQLQUERY_CLEAR_RESOURCE return result; SQLQUERY_END } void ModelMgr::add_app(std::string app_name, std::string app_source, std::string app_desc, std::string app_version, std::string app_version_desc, int *app_id, int *version_id, std::string *registe_time) { SQLQUERY_BEGIN stmt = conn->createStatement(); stmt->execute("LOCK TABLES APP_LIST WRITE, APP_VERSIONS WRITE"); pstmt = conn->prepareStatement("SELECT APP_VERSIONS.id FROM APP_LIST, APP_VERSIONS " "WHERE APP_LIST.id=APP_VERSIONS.app_id " "AND APP_LIST.name=? " "AND APP_VERSIONS.version=?"); pstmt->setString(1, app_name); pstmt->setString(2, app_version); res = pstmt->executeQuery(); if (res->next()) { LOG_ERROR("application with name: " << app_name << " and version: " << app_version << " already exist.") stmt->execute("UNLOCK TABLES"); SQLQUERY_CLEAR_RESOURCE throw std::runtime_error("application with name: " + app_name + " and version: " + app_version + " already exist."); } else { delete_ptr(&pstmt); delete_ptr(&res); pstmt = conn->prepareStatement("SELECT id FROM APP_LIST WHERE name=? "); pstmt->setString(1, app_name); res = pstmt->executeQuery(); if (res->next() == false) { delete_ptr(&pstmt); delete_ptr(&res); pstmt = conn->prepareStatement("INSERT INTO APP_LIST(source, name, description) VALUES (?, ?, ?)"); pstmt->setString(1, app_source); pstmt->setString(2, app_name); pstmt->setString(3, app_desc); pstmt->execute(); delete_ptr(&pstmt); } pstmt = conn->prepareStatement("SELECT id FROM APP_LIST WHERE name=? "); pstmt->setString(1, app_name); res = pstmt->executeQuery(); res->next(); *app_id = res->getInt("id"); delete_ptr(&pstmt); delete_ptr(&res); pstmt = conn->prepareStatement("INSERT INTO APP_VERSIONS(app_id, version, registe_time, description) " "VALUES (?, ?, NOW(), ?)"); pstmt->setInt(1, *app_id); pstmt->setString(2, app_version); pstmt->setString(3, app_version_desc); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("SELECT id, registe_time FROM APP_VERSIONS " "WHERE app_id=? AND version=?"); pstmt->setInt(1, *app_id); pstmt->setString(2, app_version); res = pstmt->executeQuery(); res->next(); *version_id = res->getInt("id"); *registe_time = res->getString("registe_time"); stmt->execute("UNLOCK TABLES"); SQLQUERY_CLEAR_RESOURCE } SQLQUERY_END } void ModelMgr::bind_app(std::string ip_address, int app_id, int version_id, std::string runtime_name, std::vector<publish_app_cfg_ports_model_ptr> cfg_ports, std::vector<publish_app_cfg_volumes_model_ptr> cfg_volumes, std::vector<publish_app_cfg_dns_model_ptr> cfg_dns, publish_app_cfg_extra_cmd_model_ptr cfg_extra_cmd, std::vector<publish_app_hints_model_ptr> hints, int *uniq_id) { SQLQUERY_BEGIN stmt = conn->createStatement(); stmt->execute("LOCK TABLES MACHINE_APP_LIST WRITE, PUBLISH_APP_HINTS WRITE, " "PUBLISH_APP_CFG_PORTS WRITE, " "PUBLISH_APP_CFG_VOLUMES WRITE, " "PUBLISH_APP_CFG_DNS WRITE, " "PUBLISH_APP_CFG_EXTRA_CMD WRITE"); pstmt = conn->prepareStatement("INSERT INTO MACHINE_APP_LIST(ip_address, app_id, version_id, runtime_name) " "VALUES (?, ?, ?, ?)"); pstmt->setString(1, ip_address); pstmt->setInt(2, app_id); pstmt->setInt(3, version_id); pstmt->setString(4, runtime_name); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("SELECT LAST_INSERT_ID() AS id"); res = pstmt->executeQuery(); res->next(); *uniq_id = res->getInt("id"); delete_ptr(&pstmt); delete_ptr(&res); // cfg_ports for (auto &cfg_port: cfg_ports) { pstmt = conn->prepareStatement("INSERT INTO PUBLISH_APP_CFG_PORTS(uniq_id, private_port, public_port, " "type) VALUES (?, ?, ?, ?)"); pstmt->setInt(1, *uniq_id); pstmt->setInt(2, cfg_port->get_private_port()); pstmt->setInt(3, cfg_port->get_public_port()); pstmt->setString(4, cfg_port->get_type()); pstmt->execute(); delete_ptr(&pstmt); } // cfg_volumes for (auto &cfg_volume: cfg_volumes) { pstmt = conn->prepareStatement("INSERT INTO PUBLISH_APP_CFG_VOLUMES(uniq_id, docker_volume, host_volume) " "VALUES (?, ?, ?)"); pstmt->setInt(1, *uniq_id); pstmt->setString(2, cfg_volume->get_docker_volume()); pstmt->setString(3, cfg_volume->get_host_volume()); pstmt->execute(); delete_ptr(&pstmt); } // cfg_dns for (auto &cfg_dns_: cfg_dns) { pstmt = conn->prepareStatement("INSERT INTO PUBLISH_APP_CFG_DNS(uniq_id, dns, address) " "VALUES (?, ?, ?)"); pstmt->setInt(1, *uniq_id); pstmt->setString(2, cfg_dns_->get_dns()); pstmt->setString(3, cfg_dns_->get_address()); pstmt->execute(); delete_ptr(&pstmt); } // cfg_extra_cmd if (cfg_extra_cmd != nullptr) { pstmt = conn->prepareStatement("INSERT INTO PUBLISH_APP_CFG_EXTRA_CMD(uniq_id, extra_cmd) " "VALUES(?, ?)"); pstmt->setInt(1, *uniq_id); pstmt->setString(2, cfg_extra_cmd->get_extra_cmd()); pstmt->execute(); delete_ptr(&pstmt); } // hints for (auto &hint: hints) { pstmt = conn->prepareStatement("INSERT INTO PUBLISH_APP_HINTS(uniq_id, item, value) " "VALUES(?, ?, ?)"); pstmt->setInt(1, *uniq_id); pstmt->setString(2, hint->get_item()); pstmt->setString(3, hint->get_value()); pstmt->execute(); delete_ptr(&pstmt); } stmt->execute("UNLOCK TABLES"); SQLQUERY_CLEAR_RESOURCE SQLQUERY_END } void ModelMgr::remove_version(int uniq_id) { SQLQUERY_BEGIN pstmt = conn->prepareStatement("DELETE FROM MACHINE_APP_LIST WHERE id=?"); pstmt->setInt(1, uniq_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("DELETE FROM PUBLISH_APP_CFG_DNS WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("DELETE FROM PUBLISH_APP_CFG_EXTRA_CMD WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("DELETE FROM PUBLISH_APP_CFG_PORTS WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("DELETE FROM PUBLISH_APP_CFG_VOLUMES WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("DELETE FROM PUBLISH_APP_HINTS WHERE uniq_id=?"); pstmt->setInt(1, uniq_id); pstmt->execute(); SQLQUERY_CLEAR_RESOURCE SQLQUERY_END } void ModelMgr::update_version(int uniq_id, int new_version_id, std::string new_runtime_name) { SQLQUERY_BEGIN pstmt = conn->prepareStatement("UPDATE MACHINE_APP_LIST SET version_id=?, " "runtime_name=? WHERE id=?"); pstmt->setInt(1, new_version_id); pstmt->setString(2, new_runtime_name); pstmt->setInt(3, uniq_id); pstmt->execute(); SQLQUERY_CLEAR_RESOURCE SQLQUERY_END } std::vector<service_model_ptr> ModelMgr::list_services() { SQLQUERY_BEGIN stmt = conn->createStatement(); res = stmt->executeQuery("SELECT id, service_type, app_id FROM SERVICES"); std::vector<service_model_ptr> services; while (res->next()) { auto service_model = std::make_shared<ServiceModel>(); service_model->set_service_type(res->getString("service_type")); service_model->set_id(res->getInt("id")); service_model->set_app_id(res->getInt("app_id")); services.push_back(service_model); } delete_ptr(&res); for(auto s: services) { auto service_id = s->get_id(); pstmt = conn->prepareStatement("SELECT service_port, private_port FROM SERVICE_PORTSERVICE " "WHERE service_id=?"); pstmt->setInt(1, service_id); res = pstmt->executeQuery(); while (res->next()) { if (res->getInt("service_port") == -1) { s->set_private_port(-1); } else { s->set_private_port(res->getInt("private_port")); } s->set_service_port(res->getInt("service_port")); } } SQLQUERY_CLEAR_RESOURCE return services; SQLQUERY_END } void ModelMgr::remove_service(int service_id) { SQLQUERY_BEGIN pstmt = conn->prepareStatement("DELETE FROM SERVICE_PORTSERVICE WHERE service_id=?"); pstmt->setInt(1, service_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("DELETE FROM SERVICES WHERE id=?"); pstmt->setInt(1, service_id); pstmt->execute(); SQLQUERY_CLEAR_RESOURCE SQLQUERY_END } void ModelMgr::add_port_service(std::string service_type, int app_id, int service_port, int private_port, int *service_id) { SQLQUERY_BEGIN stmt = conn->createStatement(); stmt->execute("LOCK TABLES SERVICES WRITE, " "SERVICE_PORTSERVICE WRITE"); pstmt = conn->prepareStatement("INSERT INTO SERVICES(service_type, app_id) VALUES(?, ?)"); pstmt->setString(1, service_type); pstmt->setInt(2, app_id); pstmt->execute(); delete_ptr(&pstmt); pstmt = conn->prepareStatement("SELECT LAST_INSERT_ID() AS id"); res = pstmt->executeQuery(); res->next(); *service_id = res->getInt("id"); delete_ptr(&pstmt); delete_ptr(&res); pstmt = conn->prepareStatement("INSERT INTO SERVICE_PORTSERVICE(service_id, service_port, private_port) " "VALUES(?, ?, ?)"); pstmt->setInt(1, *service_id); pstmt->setInt(2, service_port); pstmt->setInt(3, private_port); pstmt->execute(); stmt->execute("UNLOCK TABLES"); SQLQUERY_CLEAR_RESOURCE SQLQUERY_END } std::vector<appcfg_model_ptr> ModelMgr::get_app_cfgs() { MD5 md5; SQLQUERY_BEGIN stmt = conn->createStatement(); res = stmt->executeQuery("SELECT CFG.id, CFG.app_id, CFG.path, CFG.content, APP_LIST.name FROM CFG, APP_LIST " "WHERE CFG.app_id=APP_LIST.id"); std::vector<appcfg_model_ptr> appcfgs; while (res->next()) { auto appcfg_model = std::make_shared<APPCfgModel>(); appcfg_model->set_id(res->getInt("id")); appcfg_model->set_app_id(res->getInt("app_id")); appcfg_model->set_path(res->getString("path")); appcfg_model->set_content(res->getString("content")); appcfg_model->set_app_name(res->getString("name")); std::string content = appcfg_model->get_content(); appcfg_model->set_md5(md5.digestString(content.c_str())); appcfgs.push_back(appcfg_model); } SQLQUERY_CLEAR_RESOURCE return appcfgs; SQLQUERY_END } void ModelMgr::update_appcfg(int app_id, std::string path, std::string content) { SQLQUERY_BEGIN pstmt = conn->prepareStatement("SELECT id FROM CFG WHERE app_id=?"); pstmt->setInt(1, app_id); res = pstmt->executeQuery(); if (res->next() == false) { // CFG中没有该app的配置信息,则插入一个空记录 delete_ptr(&pstmt); delete_ptr(&res); pstmt = conn->prepareStatement("INSERT INTO CFG(app_id, path, content) VALUES(?, '', '')"); pstmt->setInt(1, app_id); pstmt->execute(); delete_ptr(&pstmt); } else { delete_ptr(&pstmt); delete_ptr(&res); } pstmt = conn->prepareStatement("UPDATE CFG SET path=?, content=? WHERE app_id=?"); pstmt->setString(1, path); pstmt->setString(2, content); pstmt->setInt(3, app_id); pstmt->execute(); SQLQUERY_CLEAR_RESOURCE SQLQUERY_END }
1e446c84a48f518d8ed0f56ff0d5471ece0e3b26
74a4883200055cd1c32f61fb71e54efdcfdf72aa
/cpp/328. Odd Even Linked List.cpp
23ddc04f2ce075b31369bd5c388ce5e7b974c8ba
[]
no_license
jackymxp/leetcode-solution
247af392f0b7c2b6b27cab19b7d79bf7eac27c6f
a0ab3ee4f3d5673209454b4b98b6bde0a7eb45d4
refs/heads/master
2021-06-30T21:55:39.174762
2020-12-26T04:17:42
2020-12-26T04:17:42
206,824,577
0
0
null
null
null
null
UTF-8
C++
false
false
881
cpp
328. Odd Even Linked List.cpp
#include "ListNode.h" /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* oddEvenList(ListNode* head) { if(!head || !head->next) return head; ListNode* evenNode = head->next; ListNode* oddNode = head; ListNode* p = head; while(p) { ListNode* pNext = p->next; if(pNext) p->next = pNext->next; p = pNext; } p = oddNode; while(p->next) p = p->next; p->next = evenNode; return oddNode; } }; int main(void) { Solution s; vector<int> arr = {1,2,3,4,5,6}; ListNode* l = createList(arr); ListNode* res = s.oddEvenList(l); cout << res << endl; }
b649a998a8ff7c21e2c4168657bd72cbfff5af57
c2547772411eb435f7dbff9fde8a6cbe21e91099
/src/ut/mock_alarm_scheduler.h
4fc8fe4a3b82713a1b89b15c12ad7245ab1f7e0d
[]
no_license
ClearwaterCore/clearwater-snmp-handlers
1a91d04df088cb5f9b4ec700ad2da8f1522bc175
889ec5e34967300b73e02275442cbb71fc27107d
refs/heads/master
2020-12-24T09:56:49.947024
2017-06-26T08:01:13
2017-06-26T08:01:13
22,438,990
0
0
null
2017-10-10T16:00:03
2014-07-30T18:01:55
C++
UTF-8
C++
false
false
993
h
mock_alarm_scheduler.h
/** * @file mock_alarm_scheduler.h * * Copyright (C) Metaswitch Networks 2017 * If license terms are provided to you in a COPYING file in the root directory * of the source code repository by which you are accessing this code, then * the license outlined in that COPYING file applies to your use. * Otherwise no rights are granted except for those provided to you by * Metaswitch Networks in a separate written agreement. */ #ifndef MOCK_ALARM_SCHEDULER_H__ #define MOCK_ALARM_SCHEDULER_H__ #include "gmock/gmock.h" #include "alarm_scheduler.hpp" class MockAlarmScheduler : public AlarmScheduler { public: MockAlarmScheduler(AlarmTableDefs* alarm_table_defs, std::set<NotificationType> snmp_notifications) : AlarmScheduler(alarm_table_defs, snmp_notifications, "hostname1") {} MOCK_METHOD2(issue_alarm, void(const std::string& issuer, const std::string& identifier)); MOCK_METHOD0(sync_alarms, void()); }; #endif
a728ef3eff2eac6351867c52ecde4c4ff53233b5
bd5bc7146f852fc3bddbfa0ad818911e2f1b379a
/test/test_unit/src/app/common_test.cpp
35f3ca08e2be3fd964e2eb408eb1342734580270
[ "MIT" ]
permissive
CosmicSharts/ccapi
ac6c8ffc43973081e77ae33d433ed8ef1cdfdefc
8a1a89dcaf41b5a23b317efb492b6d7665b125c9
refs/heads/master
2023-08-23T17:06:50.119893
2021-10-30T02:07:07
2021-10-30T02:07:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
863
cpp
common_test.cpp
#include "app/common.h" #include "gtest/gtest.h" namespace ccapi { TEST(AppUtilTest, linearInterpolate) { EXPECT_DOUBLE_EQ( AppUtil::linearInterpolate(0.5, 0.00005, 0.975609756097560953950090909090909090911614, 0.00010000000000000000479, 0.910732082043367723592741658), 0.00009317952657378995); } TEST(AppUtilTest, roundInputRoundUp_1) { EXPECT_EQ(AppUtil::roundInput(34359.212874750002811, "0.01", true), "34359.22"); } TEST(AppUtilTest, roundInputRoundDown_1) { EXPECT_EQ(AppUtil::roundInput(34359.212874750002811, "0.01", false), "34359.21"); } TEST(AppUtilTest, roundInputRoundUp_2) { EXPECT_EQ(AppUtil::roundInput(0.097499008778091811322, "0.00000001", true), "0.09749901"); } TEST(AppUtilTest, roundInputRoundDown_2) { EXPECT_EQ(AppUtil::roundInput(0.097499008778091811322, "0.00000001", false), "0.09749900"); } } /* namespace ccapi */
26e51ac3994c57fddc9dc8a35217b8a6b667b57f
b269392cc4727b226e15b3f08e9efb41a7f4b048
/UVaLive/UVaLive 3905.cpp
48a74e03db0febd86c1645b0f507ca69f99d2188
[]
no_license
ThoseBygones/ACM_Code
edbc31b95077e75d3b17277d843cc24b6223cc0c
2e8afd599b8065ae52b925653f6ea79c51a1818f
refs/heads/master
2022-11-12T08:23:55.232349
2022-10-30T14:17:23
2022-10-30T14:17:23
91,112,483
1
0
null
null
null
null
GB18030
C++
false
false
2,468
cpp
UVaLive 3905.cpp
#include <iostream> #include <algorithm> #define MAXN 100005 #define INF 1e9+7 using namespace std; //确定区间的左右边界(点) void checkRange(int xy, int ab, int wh, double &left, double &right) { if(ab==0) { if(xy<=0 || xy>=wh) //该方向速度为零,且该方向不在范围内,则不会进入相机范围 right=left-1; } else if(ab>0) { left=max(left,-(double)xy/ab); //求左端点,因为速度方向为正,求进入范围的时刻则需要在初始坐标xy前加个负号 right=min(right,(double)(wh-xy)/ab); //求右端点 } else { left=max(left,(double)(wh-xy)/ab); //求左端点 right=min(right,-(double)xy/ab); //求右端点,因为速度方向为负,求离开范围的时刻则需要在初始坐标xy前加个负号 } } struct MeteorStatus { double x; //位置坐标 int status; //0表示左边界点,1表示右边界点 bool operator < (const MeteorStatus& a) const { if(x==a.x) return status>a.status; //若某一个区间的右边界与另一个左边界重合,则先处理右边界,避免重复计算出错 return x<a.x; } } ms[MAXN*2]; int main() { int t; cin >> t; while(t--) { int w,h,n,pt=0; //用于计算存入结构体的左、右边界的数量 cin >> w >> h >> n; for(int i=0; i<n; i++) { int x,y,a,b; //X=x+at,Y=y+bt,0<X<w,0<Y<h,t>=0 cin >> x >> y >> a >> b; double left=0,right=INF; //右边界初始值设定为int的最大值 checkRange(x,a,w,left,right); //确认x坐标的左右区间 checkRange(y,b,h,left,right); //确认y坐标的左右区间 //综合后形成完整的区间 if(left<right) { ms[pt++]=(MeteorStatus){left,0}; //记录左边界 ms[pt++]=(MeteorStatus){right,1}; //记录右边界 } } sort(ms,ms+pt); //排序,从左到右 int cnt=0,ans=0; for(int i=0; i<pt; i++) { if(ms[i].status==0) //如果是左边界,计数+1且更新进入相机范围最大流星数 { cnt++; ans=max(ans,cnt); } else //如果是右边界,计数-1 cnt--; } cout << ans << endl; } return 0; }
63a022ac7f9ad891947d094902523787d1cfbe48
5052fa69ce211c463867e5f201e7147e8bfa279f
/trees/everthing_about_tree.cpp
f85ce55f6f6546a602b3fa5c214e22bfa6fd04d9
[]
no_license
Lalit-garg/DataStructures
c58f9d30b776ec37a1bb59fb202c5348ca37da49
85c21709e9350c71e77a7ab93efe9d29740c830f
refs/heads/master
2022-11-24T15:18:29.753957
2020-08-01T20:11:16
2020-08-01T20:11:16
279,565,107
0
0
null
null
null
null
UTF-8
C++
false
false
3,100
cpp
everthing_about_tree.cpp
#include<bits/stdc++.h> using namespace std; template <typename T> class treenode { public: T data; vector<treenode<T>*> children; treenode(T data) { this->data=data; } ~treenode() { for(int i=0;i<children.size();i++) { delete children[i]; } } }; void printlevel(treenode<int>* root) { queue<treenode<int>*> q; q.push(root); while(q.size()!=0) { treenode<int>* temp=q.front(); cout<<temp->data<<endl; q.pop(); for(int i=0;i<temp->children.size();i++) { q.push(temp->children[i]); } cout<<endl; } } void printtree(treenode<int>* root) { if(root==NULL) return; cout<<root->data<<":"; for(int i=0;i<root->children.size();i++) cout<<root->children[i]->data<<","; cout<<endl; for(int i=0;i<root->children.size();i++) printtree(root->children[i]); } treenode<int>* takeinput() { int rootdata; cout<<"Enter Data-"; cin>>rootdata; treenode<int>* root=new treenode<int>(rootdata); int n; cout<<endl<<"Enter num. of children of "<<rootdata<<"-"; cin>>n; for(int i=0;i<n;i++) { treenode<int>* child=takeinput(); root->children.push_back(child); } return root; } treenode<int>* takeinputlevelwise() { int rootdata; cout<<"Enter Data-"; cin>>rootdata; treenode<int>* root=new treenode<int>(rootdata); queue<treenode<int>*> q; q.push(root); while(q.size()!=0) { treenode<int>* front=q.front(); q.pop(); int n; cout<<endl<<"Enter num. of children of "<<front->data<<"-"; cin>>n; for(int i=0;i<n;i++) { int cdata; cout<<"Enter "<<i<<"th child of "<<front->data<<endl; cin>>cdata; treenode<int>* child=new treenode<int>(cdata); front->children.push_back(child); q.push(child); } } return root; } int count(treenode<int>* root) { int ans=1; for(int i=0;i<root->children.size();i++) ans+=count(root->children[i]); return ans; } int height(treenode<int>* root) { int x=0; if(root->children.size()==0) return 1; else for(int i=0;i<root->children.size();i++) { int x1=height(root->children[i]); x=max(x,x1); } return x+1; } void depth(treenode<int>* root,int k) { if(k==0) { cout<<root->data<<endl; return; } else { for(int i=0;i<root->children.size();i++) { depth(root->children[i],k-1); } } } int countleaf(treenode<int>* root) { int ans; if(root->children.size()==0) { ans=1; } else { ans=0; } for(int i=0;i<root->children.size();i++) ans+=countleaf(root->children[i]); return ans; } int main() { /* treenode<int>* root=new treenode<int>(1); treenode<int>* node1=new treenode<int>(2); treenode<int>* node2=new treenode<int>(3); root->children.push_back(node1); root->children.push_back(node2); */ treenode<int>* root=takeinputlevelwise(); printtree(root); cout<<endl<<endl; cout<<"Elements in level order-"<<endl; printlevel(root); cout<<endl<<"No. of nodes-"<<count(root); cout<<endl<<"Height of tree-"<<height(root)<<endl; cout<<"Enter Depth till you want to print element-"; int k; cin>>k; cout<<"Elements are:"<<endl; depth(root,k); cout<<"No.of leaf nodes-"<<countleaf(root); delete root; return 0; }
70e8c887af5a1dbf3fbed77e92ce7ab58020181b
a7da2bd63dc8578c51bf663895e67f0c0540fecc
/LoS.cpp
cabd1a2ac04dcb4c6e18467456131906516e28d6
[]
no_license
tranngocphu/kb3dcpp
7b824c2da4f85b88087d85179b70c51a0e024913
f19301b803658245c13ab23b1f4d11ed0bb8f387
refs/heads/master
2020-07-14T13:54:32.130039
2019-08-30T07:37:27
2019-08-30T07:37:27
205,329,945
0
0
null
null
null
null
UTF-8
C++
false
false
963
cpp
LoS.cpp
/* * LoS.cpp * Release: KB3D++-3.a (03/28/08) * * Contact: Cesar Munoz (munoz@nianet.org) * National Institute of Aerospace * http://research.nianet.org/fm-at-nia/KB3D * * Unit conventions are explained in KB3D.cpp * * This file provides the function * vertical_recovery */ #include <cmath> #include "Util.h" #include "CD3D.h" #include "KB3D.h" #include "LoS.h" // Breaks symmetry when vertical speed is zero int break_vz_symm(double sx, double sy, double sz) { if (sz > 0) return 1; return break_vz_symm(sx,sy,sz); } int sign_vz(double sx, double sy, double sz, double vz) { if (sz*vz >= 0 && vz != 0) return sign(vz); return break_vz_symm(sx,sy,sz); } double vertical_recovery(double sx, double sy, double sz, double voz, double viz, double H,double t) { double vz = voz - viz; double nvz = (sign_vz(sx,sy,sz,vz)*H - sz)/t; if (sz*vz >= 0 && fabs(vz) >= fabs(nvz)) return vz+viz; return nvz+viz; }
5546535df372e709e49a9fa3b55459589d409324
66fc8c4bc510fb90a823f47e1bd45b45bfe2da30
/Snake_v2/SnakeHead.cpp
bf016bb8159ee5f25d7fe11824997d8e37af84ed
[]
no_license
naitoramu/SFML_Games
41679937d473cc94891dc2f673118327f19869d1
e2e187c2bcd68315f4e9f4884fc4d21f8b96d951
refs/heads/master
2022-05-23T12:32:06.763974
2020-03-28T19:19:09
2020-03-28T19:19:09
245,515,309
1
0
null
null
null
null
UTF-8
C++
false
false
1,880
cpp
SnakeHead.cpp
#include "SnakeHead.hpp" #include "SnakeBody.hpp" #include <iostream> using namespace sf; void SnakeHead::granice(){ lim_l = (width - width_p) / 2; lim_g = (height - height_p) / 2; lim_r = lim_l + width_p; lim_d = lim_g + height_p; } SnakeHead::SnakeHead(){} SnakeHead::SnakeHead(int sx, int sy, int wspx, int wspy, int h, int w, int scene_size){ size_x = sx; size_y = sy; x = wspx; y = wspy; height = h; width = w; height_p = scene_size; width_p = scene_size; setSize(sf::Vector2f(size_x, size_y)); setOrigin(size_x / 2, size_y / 2); setFillColor(sf::Color(35, 45, 20)); setPosition(x, y); granice(); } void SnakeHead::sterowanie(int z){ if (z - previous_z != 2 && z - previous_z != -2) previous_z = z; } void SnakeHead::newPosition(){ setPosition(x, y); } void SnakeHead::move(){ if (previous_z == 4){ x += size_x; newPosition(); } else if (previous_z == 2){ x -= size_x; newPosition(); } else if (previous_z == 1){ y += size_y; newPosition(); } else if (previous_z == 3){ y -= size_y; newPosition(); } } bool SnakeHead::kolizja(SnakeBody* body, int segmenty){ int a = 1, i = 0; if (((x < lim_l) || (x > lim_r) || (y < lim_g) || (y > lim_d)) && i == 0){ //setPosition(body[0].getPosition()); std::cout << "Kolizja!" << std::endl; return true; } else if ((x < lim_l) || (x > lim_r) || (y < lim_g) || (y > lim_d)) a = 0; if (a){ for (; i < segmenty; i++){ if (getPosition() == body[i].getPosition()) break; } } if (i == segmenty){ return false; } else{ std::cout << "Kolizja!" << std::endl; //setPosition(body[0].getPosition()); return true; } }
35ee388b010951fd0ec31e0c5a1827ea5392da8c
87724112bc297303b4ed5c06de7c1628487197f2
/DemoLib2/net/data/GameEventDataType.hpp
677d25b696a98190f2e48dfc1f8ba93c19df20d8
[ "MIT" ]
permissive
PazerOP/DemoLib2
3ade03a6588d76d40e4db48ef0d4296a39ccad7d
7377f87654ce9bf6487d6b7ce7050cec8e76894e
refs/heads/master
2021-07-19T04:30:48.617072
2020-04-26T22:00:59
2020-04-26T22:00:59
139,382,124
15
2
null
null
null
null
UTF-8
C++
false
false
512
hpp
GameEventDataType.hpp
#pragma once #include <cstdint> #include <ostream> enum class GameEventDataType : uint_fast8_t { Local = 0, // Not networked String, // Zero terminated ASCII string Float, // Float 32 bit Long, // Signed int 32 bit Short, // Signed int 16 bit Byte, // Unsigned int 8 bit Bool, // Unsigned int 1 bit }; const char* EnumToString(GameEventDataType type); inline std::ostream& operator<<(std::ostream& os, const GameEventDataType& cmd) { return os << EnumToString(cmd); }
86159632a632ce82380e37ee4a0e659fc79b90a0
dccd1058e723b6617148824dc0243dbec4c9bd48
/codeforces/1213F.cpp
9b281e9b2e1c51bdb87fb71e4138c38e900373fd
[]
no_license
imulan/procon
488e49de3bcbab36c624290cf9e370abfc8735bf
2a86f47614fe0c34e403ffb35108705522785092
refs/heads/master
2021-05-22T09:24:19.691191
2021-01-02T14:27:13
2021-01-02T14:27:13
46,834,567
7
1
null
null
null
null
UTF-8
C++
false
false
1,518
cpp
1213F.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int i=0;i<(int)(n);++i) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;} template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;} int main(){ int n,k; cin >>n >>k; vector<int> p(n),q(n); rep(i,n){ cin >>p[i]; --p[i]; } rep(i,n){ cin >>q[i]; --q[i]; } vector<int> b; int s = 0; while(s<n){ int i = s; set<int> P,Q; while(i<n){ if(p[i] != q[i]){ P.insert(p[i]); Q.insert(q[i]); if(Q.count(p[i])) P.erase(p[i]); if(P.count(q[i])) P.erase(q[i]); } // dbg(i); // for(int x:P) cout << x+1 << " "; // cout << "\n"; ++i; if(P.empty()) break; } b.pb(i); s = i; } int B = b.size(); if(B>=k){ string ans(n,'?'); int pre = 0; rep(i,B){ char c = 'a' + min(i,k-1); for(int j=pre; j<b[i]; ++j) ans[p[j]] = c; pre = b[i]; } cout << "YES\n"; cout << ans << "\n"; } else cout << "NO\n"; return 0; }
8746eefc685999697c48f2650b8fb0bff07936da
dfc4d0ae87d50a34441c80a690955126001f36a4
/~2015.11/6359.cpp
c415ff4ea3c44eeb9623766150bc35ecb1437cc7
[]
no_license
fakerainjw/ProblemSolving
48c2e83f414f3ea9a9b8e182ff94842b4f9453ae
402c06a1d64ee287e39a74282acc1f0c7714d8fe
refs/heads/master
2023-07-08T07:33:18.003061
2016-08-01T13:16:07
2016-08-01T13:16:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
419
cpp
6359.cpp
#include <iostream> #include <cstring> using namespace std; int space[101]; int main(void) { int test; int N; cin>>test; for (int i=0;i<test;i++) { memset(space,0,sizeof(space)); cin>>N; for (int i=1;i<=N;i++) { for (int ptr=i;ptr<=N;ptr+=i) space[ptr]^=1; } int cnt=0; for (int i=1;i<=N;i++) if (space[i]==1) cnt++; cout<<cnt<<endl; } return 0; }
3677a3c724e80c707e2ed3e0e06839526a3ca1ce
902ea50f2af62e54977baffcf11f73f18519cd9e
/剑指offer/快速排序.cpp
82007d2ab639deb54935ce0fbc4c32737e95a80f
[]
no_license
dh434/leetcode
80f1436106edd83d38d50d7e21005eaaa4096ac1
28ea3e3d5215b23120b9477e31c5727252e19e33
refs/heads/master
2020-06-05T16:49:17.023493
2019-11-17T12:55:58
2019-11-17T12:55:58
192,487,558
1
0
null
null
null
null
UTF-8
C++
false
false
1,267
cpp
快速排序.cpp
#include<iostream> #include <stack> #include <vector> #include <deque> #include <list> #include <string> #include <queue> #include <stdio.h> #include <time.h> #include <windows.h> #include <exception> using namespace std; int randomInRange(int start,int end) { srand (time(NULL)); return rand() % (end-start+1) + start; } void Swap(int* num1,int* num2) { int temp=*num1; *num1=*num2; *num2=temp; } int Partition(int data[], int start, int end , int length){ if(data == NULL || length <= 0 || start < 0 || end >= length) throw new std::exception("Invalid Parameters"); int index = randomInRange(start,end); Swap(&data[end], &data[index]); int small = -1; for(int i = 0;i<length;++i){ if(data[i] < data[index]){ ++small; if(small != i){ Swap(&data[i], &data[small]); } } } ++small; Swap(&data[small], &data[end]); return small; } void QuickQort(int data[], int length, int start, int end){ if (start == end) return ; int index = Partition(data, length, start, end); if(index > start) QuickQort(data,length, start,index-1); if(index < end) QuickQort(data,length, index+1, end); }
8748ec2343493a6ae7bbc61a6dd3c87d19f44f04
c2254dde19328b5dcb929bbff5496fb62639392d
/timeutil.cpp
5436f25d1c1a3f78befdb7124a6cecb0eddc23d2
[]
no_license
f4exb/dsdcc
29bdc2a171aab48a6803d6e6c087c566323cee97
64e759009158eb8e4c446a10ab70c546aa664795
refs/heads/master
2023-05-05T11:26:54.869004
2023-04-26T06:40:25
2023-04-26T06:40:25
56,724,297
271
63
null
2023-04-26T06:40:26
2016-04-20T22:09:49
C++
UTF-8
C++
false
false
1,946
cpp
timeutil.cpp
/////////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2018 Edouard Griffiths, F4EXB // // // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation as version 3 of the License, or // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License V3 for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program. If not, see <http://www.gnu.org/licenses/>. // /////////////////////////////////////////////////////////////////////////////////// #include "timeutil.h" namespace DSDcc { uint64_t TimeUtil::nowms() { auto now = std::chrono::system_clock::now(); auto now_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(now); auto epoch = now_ms.time_since_epoch(); auto value = std::chrono::duration_cast<std::chrono::milliseconds>(epoch); return value.count(); } uint64_t TimeUtil::nowus() { auto now = std::chrono::system_clock::now(); auto now_ms = std::chrono::time_point_cast<std::chrono::microseconds>(now); auto epoch = now_ms.time_since_epoch(); auto value = std::chrono::duration_cast<std::chrono::microseconds>(epoch); return value.count(); } } // namespace DSDcc
62a92756d649f2842a498dc8c333114e6cd6e1f4
e7e2ecb3ca0f94286f31ee7481f605642de82d93
/C++ assignment/C++ GameLoop/C++ GameLoop/Sound.h
ec3b3a7df4ab24700f697e83c206be1300f5479a
[]
no_license
Birmingham-City-Uni/cmp5327-c-programming-for-games-assessment-AntonioMihaiDima
543a93102f4db03db7a7cdc89b3c950c4362dd15
100b064a152f0f0e2f34fd96518d89c2f57cb90a
refs/heads/master
2022-03-28T20:30:33.126552
2020-01-12T20:28:30
2020-01-12T20:28:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
327
h
Sound.h
#pragma once #pragma comment (lib,"winmm.lib") #include <Windows.h> #include <mmsystem.h> #include <mmeapi.h> #include <stdio.h> #include <string> #include <iostream> #include <fstream> class AudioManager { public: void PlayMusic() { PlaySound(TEXT("background.wav"), NULL, SND_ASYNC | SND_LOOP); } private: };
5ebf4b4d6de27fc82c859aa7483b014fe75091a0
7a2ad865667f282a953c7729fa9147c260cae4ff
/code/src/voxel.cpp
67d4271b52d19a57165ce5a4716a53b9ceaced9a
[]
no_license
LiUWaterFlow/WaterFlow
76e8cbe4afa8984647c4a8f693b8a4e8ec78b57e
381d445644d053166596c18979cf58a30a7ad6a1
refs/heads/master
2021-01-01T16:45:22.380567
2015-12-21T22:57:52
2015-12-21T22:57:52
42,055,669
7
4
null
2015-12-10T12:27:56
2015-09-07T13:53:46
C
UTF-8
C++
false
false
13,742
cpp
voxel.cpp
#include "voxel.h" #include "GL_utilities.h" #include <iostream> #include "gtc/type_ptr.hpp" #include "GL_utilities.h" #include "glm.hpp" void Voxelgrid::rehash(){ hashSize = hashSize*2; std::vector<voxel*>* tempTable = new std::vector<voxel*>((int)hashSize,nullptr); numCollisions = 0; numInTable = 0; std::cout << "Rehash Triggered: " << hashSize << std::endl; for (std::vector<voxel*>::iterator it = hashTable->begin(); it!=hashTable->end(); ++it){ if(*it != nullptr){ voxel* temp = *it; int64_t hashPos = hashFunc(temp->x,temp->y,temp->z,hashSize); if(tempTable->at(hashPos) == nullptr){ tempTable->at(hashPos) = *it; numInTable++; }else{ numCollisions++; hashPos++; int numLinearRepeat = 0; hashPos = hashPos % hashSize; while (tempTable->at(hashPos) != nullptr) { hashPos++; hashPos = hashPos % hashSize; numLinearRepeat++; } numInTable++; tempTable->at(hashPos) = *it; } } } delete hashTable; hashTable = tempTable; std::cout << "rehash finished" << std::endl; } int64_t Voxelgrid::hashFunc(int64_t x, int64_t y, int64_t z,int64_t inHashSize){ return std::abs((((73856093 * x) + (19349663 * y) + (83492791 * z)) % inHashSize)); } void Voxelgrid::hashAdd(int16_t x, int16_t y, int16_t z,bool filled, float a, float b){ voxel* temp = new voxel; temp->filled = filled; temp->x = x; temp->y = y; temp->z = z; temp->a = a; temp->b = b; int64_t hashPos = hashFunc(x,y,z,hashSize); if(hashTable->at(hashPos) == nullptr){ hashTable->at(hashPos) = temp; numInTable++; }else{ numCollisions++; hashPos++; int numLinearRepeat = 0; hashPos = hashPos % hashSize; while(hashTable->at(hashPos) != nullptr && numLinearRepeat < 100000){ hashPos++; hashPos = hashPos % hashSize; numLinearRepeat++; } if (numLinearRepeat > 90000) { rehash(); hashAdd(x, y, z, filled, a, b); return; } numInTable++; hashTable->at(hashPos) = temp; } if((float)numCollisions/(float)numInTable > rehashTresh){ rehash(); } } voxel* Voxelgrid::hashGet(int16_t x, int16_t y, int16_t z){ int64_t hashPos = hashFunc(x,y,z,hashSize); if(hashTable->at(hashPos) != nullptr){ while(hashTable->at(hashPos) != nullptr && !isEqualPoint(hashTable->at(hashPos),x,y,z)){ hashPos++; hashPos = hashPos % hashSize; } return hashTable->at(hashPos); }else{ return nullptr; } } bool Voxelgrid::isEqualPoint(voxel* vox,short int x, short int y,short int z){ return (vox->x == x && vox->y == y && vox->z == z); } void Voxelgrid::hashInit() { this->hashTable = new std::vector<voxel*>((int)hashSize, nullptr); } neighs* Voxelgrid::getNeighbourhoodHash(int16_t x, int16_t y, int16_t z) { neighs* neigh = new neighs(); for (size_t i = 0; i < 27; i++) { neigh->voxs[i] = hashGet(x + xoff[i],y+yoff[i],z+zoff[i]); } return neigh; } neighs* Voxelgrid::getNeighbourhood(int16_t x, int16_t y, int16_t z) { neighs* neigh = new neighs(); for (size_t i = 0; i < 27; i++) { neigh->voxs[i] = getVoxel(x + xoff[i], y + yoff[i], z + zoff[i]); } return neigh; } /* ----------------------------------------------------------------- Voxelgrid - Create the initial vector strutcture. */ Voxelgrid::Voxelgrid(DataHandler* dataHandler,int64_t hashSize){ this->hashSize = hashSize; this->rehashTresh = 0.75; this->numInTable = 0; this->numCollisions = 0; this->voxels = new std::vector<std::vector<std::vector<voxel*>*>*>; this->datahandler = dataHandler; this->width = dataHandler->getDataWidth(); this->height = dataHandler->getDataHeight(); this->waterHeight = new std::vector<GLint>(width*height, -1); int i = 0; for (int x = -1; x < 2; x++) { for (int y = -1; y < 2; y++) { for (int z = -1; z < 2; z++) { xoff[i] = x; yoff[i] = y; zoff[i] = z; i++; } } } } /* ----------------------------------------------------------------- Voxelgrid - Destructor, ensure destruction of all pointer structures */ Voxelgrid::~Voxelgrid(){ for (GLuint x = 0; x < voxels->size(); x++) { if(voxels->at(x) != nullptr){ for (GLuint y = 0; y < voxels->at(x)->size(); y++) { if(voxels->at(x)->at(y) != nullptr){ for (GLuint z = 0; z < voxels->at(x)->at(y)->size(); z++) { if( voxels->at(x)->at(y)->at(z) != nullptr){ delete voxels->at(x)->at(y)->at(z); } } delete voxels->at(x)->at(y); } } delete voxels->at(x); } } delete voxels; delete voxelPositions; } /* ----------------------------------------------------------------- setVoxel take a x,y,z coordinate where the voxel will be created (or modified) with the values ax, bx. */ void Voxelgrid::setVoxel(int16_t x, int16_t y, int16_t z, bool filledx, float ax, float bx) { GLuint xorig = x; GLuint yorig = y; GLuint zorig = z; setHeight(xorig, yorig, zorig); x += 10; y += 10; z += 10; //if x is not in table. Create y and z tables, resize x, and //point to children (y,z); if(voxels->size() < (unsigned int)x+1){ std::vector<voxel*>* tempZ = new std::vector<voxel*>(z+1); std::vector<std::vector<voxel*>*>* tempY = new std::vector<std::vector<voxel*>*>(y+1); voxels->resize(x+1,nullptr); (*voxels)[x] = tempY; (*(*voxels)[x])[y] = tempZ; } //if y is not in table. Create z table, resize y, and //point to childtable z; Note that existence of y table is //managed by the first part of the if-statement else if((*voxels)[x] != nullptr && (*voxels)[x]->size() < (unsigned int)y+1){ std::vector<voxel*>* tempZ = new std::vector<voxel*>(z+1); (*voxels)[x]->resize(y+1,nullptr); (*(*voxels)[x])[y] = tempZ; } //if z is not large enough resize. Note that existence of z table is //managed by the first two parts of the if-statement else if((*voxels)[x] != nullptr && (*(*voxels)[x])[y] != nullptr && (*(*voxels)[x])[y]->size() < (unsigned int)z+1){ (*(*voxels)[x])[y]->resize(z+1,nullptr); } //If x is large enough but does not contain a table at position x //create and insert relevant tables. if((*voxels)[x] == nullptr){ std::vector<voxel*>* tempZ = new std::vector<voxel*>(z+1); std::vector<std::vector<voxel*>*>* tempY = new std::vector<std::vector<voxel*>*>(y+1); (*voxels)[x] = tempY; (*(*voxels)[x])[y] = tempZ; } //If y is large enough but does not contain a table at position y //create and insert relevant tables. else if((*(*voxels)[x])[y] == nullptr){ std::vector<voxel*>* tempZ = new std::vector<voxel*>(z+1); (*(*voxels)[x])[y] = tempZ; } //If there is already a voxel at position x,y,z, delete this in //preperation for new insertion. else if((*(*(*voxels)[x])[y])[z] != nullptr){ delete (*(*(*voxels)[x])[y])[z]; } //create and insert the new voxel. voxel* temp = new voxel; temp->filled = filledx; temp->a = ax; temp->b = bx; temp->x = xorig; temp->y = yorig; temp->z = zorig; (*(*(*voxels)[x])[y])[z] = temp; } /* ----------------------------------------------------------------- Get voxel at x,y,z. This function returns a pointer to the struct. If no voxel is present it returns a nullptr. */ voxel* Voxelgrid::getVoxel(int16_t x, int16_t y, int16_t z) { x += 10; y += 10; z += 10; //std::cout << "In getVoxel, size of vector voxels is: " << voxels->size() << std::endl; //std::cout << "Voxels at x is empty" << std::endl; //ensure table existance and table size, if either fails return nullptr. if (voxels->size() < (unsigned int)x + 1 || (*voxels)[x] == nullptr) { //std::cout << "In first if in get_Voxel" << std::endl; return nullptr; } //ensure table existance and table size, if either fails return nullptr. else if ((*voxels)[x]->size() < (unsigned int)y + 1 || (*(*voxels)[x])[y] == nullptr) { //std::cout << "In second if in get_Voxel" << std::endl; return nullptr; } //ensure table existance and table size, if either fails return nullptr. else if ((*(*voxels)[x])[y]->size() < (unsigned int)z + 1 || (*(*(*voxels)[x])[y])[z] == nullptr) { return nullptr; } //Existance is ensured, return pointer at location x,y,z //std::cout << "Just before returning voxel in get_Voxel" << std::endl; return (voxel*)(*(*(*voxels)[x])[y])[z]; } /* FloodFill function creates a vector queue. Tests if the first voxel coordinates are above land, if so its coordinates are added to the queue vector and the struct for the voxel is creatd using setVoxel. While there are still coordinates in the queue, the neighboring voxels' coordinates relative to the current coordinates (last position in queue) are added to the queue and a corresponding struct is created with setVoxel. As each element in the queue is processed the voxels beneath the current voxel are filled. */ void Voxelgrid::FloodFill(int x, int z, int height, bool fillDown){ std::vector<std::vector<int>> queue; std::cout << x << std::endl; if (datahandler->giveHeight((GLfloat)x, (GLfloat)z) < (GLfloat)height) { queue.push_back({x, z}); setVoxel(x, height, z, true, 0, 0); } int temp_x, temp_z; int height_test; int terrain_height; /* While queue is not empty, keep processing queue from back to front. */ while(queue.size() > 0){ temp_x = queue.back().at(0); temp_z = queue.back().at(1); queue.pop_back(); /* Fill voxels beneath current voxel */ height_test = height; terrain_height = (int)datahandler->giveHeight((GLfloat)temp_x, (GLfloat)temp_z); if(fillDown){ while(height_test > terrain_height && height_test >= 0){ setVoxel(temp_x, height_test, temp_z, true, 0, 0); height_test--; } } /* Checking voxels adjacent to current voxel and adding their coordinates to the queue if they are inside the terrain, above land and have not yet been added to the queue. Before coordinates are added the struct is created. Struct existance (!= nullptr) thus equivalent to voxel added to cue as used in if-statement. */ // temp_x + 1 < datahandler->getDataWidth() -1 dye to giveHeight not able to give height and edge!!! if (temp_x + 1 < datahandler->getDataWidth() - 1 && datahandler->giveHeight((GLfloat)(temp_x + 1), (GLfloat)temp_z) < height && getVoxel(temp_x + 1, height, temp_z) == nullptr) { setVoxel(temp_x + 1, height, temp_z, true, 0, 0); queue.push_back({ temp_x + 1,temp_z }); } if (temp_x - 1 > 0 && datahandler->giveHeight((GLfloat)(temp_x - 1), (GLfloat)temp_z) < height && getVoxel(temp_x - 1, height, temp_z) == nullptr) { setVoxel(temp_x - 1, height, temp_z, true, 0, 0); queue.push_back({ temp_x - 1, temp_z }); } if (temp_z + 1 < datahandler->getDataHeight() - 1 && datahandler->giveHeight((GLfloat)temp_x, (GLfloat)(temp_z + 1)) < height && getVoxel(temp_x, height, temp_z + 1) == nullptr) { setVoxel(temp_x, height, temp_z + 1, true, 0, 0); queue.push_back({ temp_x,temp_z + 1 }); } if (temp_z - 1 > 0 && datahandler->giveHeight((GLfloat)temp_x, (GLfloat)(temp_z - 1)) < height && getVoxel(temp_x, height, temp_z - 1) == nullptr) { setVoxel(temp_x, height, temp_z - 1, true, 0, 0); queue.push_back({ temp_x, temp_z - 1 }); } } } std::vector<GLuint> *Voxelgrid::getVoxelPositions() { std::vector<GLuint> *positions = new std::vector<GLuint>; GLint tempH = 0; for (GLuint x = 0; x < width; x++) { for (GLuint z = 0; z < height; z++) { tempH = getHeight(x, z); if (tempH != -1) { positions->push_back(x); positions->push_back((GLuint)tempH); positions->push_back(z); } } } return positions; } void Voxelgrid::initDraw() { voxelPositions = getVoxelPositions(); numVoxels = (GLuint)voxelPositions->size() / 3; voxelShader = loadShadersG("src/shaders/simplevoxels.vert", "src/shaders/simplevoxels.frag", "src/shaders/simplevoxels.geom"); glGenBuffers(1, &voxelBuffer); glBindBuffer(GL_ARRAY_BUFFER, voxelBuffer); glBufferData(GL_ARRAY_BUFFER, numVoxels * 3 * sizeof(GLuint), voxelPositions->data(), GL_STATIC_COPY); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, voxelBuffer); glGenVertexArrays(1, &voxelVAO); glBindVertexArray(voxelVAO); GLuint posAttrib = glGetAttribLocation(voxelShader, "posValue"); glEnableVertexAttribArray(posAttrib); glVertexAttribPointer(posAttrib, 3, GL_UNSIGNED_INT, GL_FALSE, 0, 0); glBindVertexArray(0); glBindBuffer(GL_ARRAY_BUFFER, 0); } void Voxelgrid::updateVoxelrender() { delete voxelPositions; voxelPositions = getVoxelPositions(); numVoxels = (GLuint)voxelPositions->size() / 3; glBindBuffer(GL_ARRAY_BUFFER, voxelBuffer); glBufferData(GL_ARRAY_BUFFER, numVoxels * 3 * sizeof(GLuint), voxelPositions->data(), GL_STATIC_COPY); glBindBuffer(GL_ARRAY_BUFFER, 0); } void Voxelgrid::drawVoxels(glm::mat4 projectionMatrix, glm::mat4 viewMatrix) { glUseProgram(voxelShader); glBindBuffer(GL_ARRAY_BUFFER, voxelBuffer); glBindVertexArray(voxelVAO); glUniformMatrix4fv(glGetUniformLocation(voxelShader, "VTPMatrix"), 1, GL_FALSE, glm::value_ptr(projectionMatrix)); glUniformMatrix4fv(glGetUniformLocation(voxelShader, "WTVMatrix"), 1, GL_FALSE, glm::value_ptr(viewMatrix)); if (numVoxels > 0) { glDrawArrays(GL_POINTS, 0, numVoxels); } glBindVertexArray(0); glBindBuffer(GL_ARRAY_BUFFER, 0); printError("Voxel Draw Billboards"); } void Voxelgrid::setHeight(int16_t x, int16_t y, int16_t z) { GLint curHeight = getHeight(x, z); if( y > curHeight ){ waterHeight->at(x + z*width) = y; } } GLint Voxelgrid::getHeight(int16_t x, int16_t z) { return waterHeight->at(x + z*width); } std::vector<GLint>* Voxelgrid::getHeightMap() { return waterHeight; }
0972c1e9800101a08e18d1b23a8872b9d98643ce
4ed7dd878a2b34bace1fd91a49106eebe570a360
/BZOJ/BZOJ3551.cpp
5b311a00c7bde7171c4d3a6edb3a13045590226a
[]
no_license
mayukuner/AC
fb63be04a1fcf7f3af080aa50bf7c6e0e070b1b9
c21b2970b7288d7b36cbed468101446c615e79ff
refs/heads/master
2020-12-15T02:38:51.758676
2017-10-11T13:01:11
2017-10-11T13:01:11
46,971,415
3
1
null
null
null
null
UTF-8
C++
false
false
2,473
cpp
BZOJ3551.cpp
#include<stdio.h> #include<algorithm> #include<cstring> #include<vector> #include<stdlib.h> #include<map> #include<set> #define REP(i,b,e) for(int i=b; i<=e; i++) #define RREP(i,b,e) for(int i=b; i>=e; i--) #define INF (1<<30) using namespace std; #define M 500010 #define N 100010 int n,m,q,md,b[N]; int pa[N<<1]; int findset(int u){ if(pa[u]!=u)pa[u]=findset(pa[u]); return pa[u]; } int le[N<<1],pe[N<<1],ev[N<<1],ecnt; void addEdge(int u,int v){ ecnt++; pe[ecnt]=le[u]; le[u]=ecnt; ev[ecnt]=v; } #define SZ 4000000 #define mid ((l+r)>>1) int sumv[SZ],lc[SZ],rc[SZ],root[N],sz; void insert(int &o,int &p,int l,int r,int &x){ o=++sz; sumv[o]=sumv[p]+1; if(l==r)return; if(x<=mid){ rc[o]=rc[p]; insert(lc[o],lc[p],l,mid,x); }else{ lc[o]=lc[p]; insert(rc[o],rc[p],mid+1,r,x); } } int query(int &o,int &p,int l,int r,int k){ if(sumv[o]-sumv[p]<k)return 0; if(l==r)return l; int rs=sumv[rc[o]]-sumv[rc[p]]; if(k<=rs)return query(rc[o],rc[p],mid+1,r,k); else return query(lc[o],lc[p],l,mid,k-rs); } #define LOG 18 int anc[N<<1][LOG]; int lft[N<<1],rgt[N<<1],cnt=1,val[N<<1]; void dfs(int u){ REP(i,1,LOG-1) anc[u][i]=anc[anc[u][i-1]][i-1]; lft[u]=cnt; if(u<=n){ insert(root[cnt],root[cnt-1],1,md,val[u]); cnt++; } for(int i=le[u]; i; i=pe[i]){ int &v=ev[i]; anc[v][0]=u; dfs(v); } rgt[u]=cnt-1; } int findTop(int u,int x){ RREP(i,LOG-1,0) if(val[anc[u][i]]<=x) u=anc[u][i]; return u; } struct E{int u,v,d;bool operator<(const E& rhs)const{return d<rhs.d;}}e[M]; int psz; int main(){ #ifdef QWERTIER freopen("in","r",stdin); freopen("out","w",stdout); #endif scanf("%d%d%d",&n,&m,&q); REP(i,1,n){ scanf("%d",&val[i]); b[i]=val[i]; } sort(b+1,b+n+1); md=unique(b+1,b+n+1)-b-1; REP(i,1,n)val[i]=lower_bound(b+1,b+md+1,val[i])-b; REP(i,1,n)pa[i]=i; REP(i,1,m)scanf("%d%d%d",&e[i].u,&e[i].v,&e[i].d); sort(e+1,e+m+1); psz=n; REP(i,1,m){ int u=e[i].u,v=e[i].v; if(findset(u)==findset(v))continue; u=findset(u),v=findset(v); pa[u]=pa[v]=++psz; pa[psz]=psz; val[psz]=e[i].d; addEdge(psz,u); addEdge(psz,v); } val[0]=INF; REP(i,1,n)if(!lft[i])dfs(findset(i)); b[0]=-1; int ans=0; while(q--){ int u,x,k; scanf("%d%d%d",&u,&x,&k); u^=ans;x^=ans;k^=ans; u=findTop(u,x); ans=b[query(root[rgt[u]],root[lft[u]-1],1,md,k)]; printf("%d\n",ans); if(ans<0)ans=0; } return 0; }
bc1c2cea1ea1f47b88eb3f63d05483764d57ff6a
2aed63d9aa027419b797e56b508417789a604a8b
/injector2degHex/case_interFoam_3mm/processor1/0.5/alphaPhi0.water
ef444a47bca37195879edec93aae477a2a746a01
[]
no_license
icl-rocketry/injectorCFDModelling
70137f1c6574240c7202638c3713102a3e1e9fd8
96591cf2cf3cd4cbd64536d8ae47ed8080ed9016
refs/heads/main
2023-08-25T03:30:59.244137
2021-10-09T21:04:45
2021-10-09T21:04:45
322,369,673
3
5
null
null
null
null
UTF-8
C++
false
false
148,460
water
alphaPhi0.water
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class surfaceScalarField; location "0.5"; object alphaPhi0.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 3 -1 0 0 0 0]; oriented oriented; internalField nonuniform List<scalar> 8048 ( 2.20753e-12 -7.56792e-09 -5.26284e-15 6.74544e-11 -2.48694e-08 -3.49464e-15 -1.45852e-09 -4.607e-08 -8.56425e-15 -3.59188e-09 -5.27753e-08 -1.69053e-14 -5.52627e-09 -6.25848e-08 -2.47293e-14 -7.12717e-09 -7.52384e-08 -1.1771e-14 -7.4934e-09 -8.68076e-08 -1.47194e-14 -8.9792e-08 -6.99024e-15 1.35248e-12 -7.56927e-09 -4.15071e-15 2.05341e-11 -2.48886e-08 -8.58088e-15 -1.48969e-09 -4.45598e-08 -1.39286e-14 -3.37615e-09 -5.08888e-08 -2.47694e-14 -5.20101e-09 -6.07599e-08 -1.87563e-14 -6.49516e-09 -7.39442e-08 -2.53236e-15 -6.35196e-09 -8.69507e-08 -2.06387e-14 -4.4826e-09 -9.16613e-08 4.67229e-14 1.28775e-09 -7.65856e-08 1.64433e-14 1.09334e-09 -3.75319e-08 -1.50407e-14 -1.88832e-10 -3.11601e-08 -1.8491e-14 -2.27905e-11 -4.76576e-09 -1.60047e-15 -4.57321e-12 -2.40476e-10 -8.6433e-17 -5.67708e-13 -2.72125e-11 -7.84791e-18 -2.69359e-12 -7.87644e-19 5.29648e-13 -7.5698e-09 -2.56641e-15 -2.4885e-11 -2.48632e-08 -7.24195e-15 -1.49847e-09 -4.30862e-08 -5.80142e-15 -3.33033e-09 -4.9057e-08 -1.49316e-14 -5.20928e-09 -5.88809e-08 -1.79765e-14 -6.31591e-09 -7.28376e-08 6.17128e-17 -5.96783e-09 -8.72987e-08 -6.91815e-15 -4.53342e-09 -9.30956e-08 2.18353e-14 -2.28399e-10 -8.08907e-08 -2.46484e-15 3.04227e-09 -4.08126e-08 -1.90465e-14 2.31073e-10 -3.21039e-08 -2.42847e-14 -1.84904e-11 -1.07334e-08 -4.02454e-15 -3.968e-12 -4.7493e-10 -1.47095e-16 -5.39853e-13 -3.5606e-11 -1.07117e-17 -3.31481e-12 -1.01258e-18 -3.04057e-13 -7.56949e-09 -6.08799e-15 -6.83491e-11 -2.47951e-08 -7.45059e-15 -1.52718e-09 -4.16274e-08 -1.33181e-14 -3.37385e-09 -4.72103e-08 -1.39637e-14 -5.12375e-09 -5.7131e-08 1.15666e-16 -5.7317e-09 -7.22296e-08 -9.87909e-15 -4.88147e-09 -8.81487e-08 -8.77764e-15 -3.0579e-09 -9.49192e-08 4.23322e-14 6.89644e-10 -8.46384e-08 -2.01495e-14 5.61545e-09 -4.57385e-08 4.21698e-15 2.05026e-09 -3.01455e-08 -3.9715e-14 4.05896e-11 -1.78977e-08 -8.50656e-15 -2.34488e-12 -1.44801e-09 -3.45445e-16 -4.43771e-13 -5.59455e-11 -1.62389e-17 -4.15535e-12 -1.22204e-18 -9.84882e-13 -7.56851e-09 -1.90153e-16 -1.08956e-10 -2.46871e-08 -6.60907e-15 -1.55298e-09 -4.01834e-08 -1.30347e-14 -3.30969e-09 -4.54536e-08 -8.60737e-15 -4.53146e-09 -5.59092e-08 -2.58356e-15 -4.17501e-09 -7.2586e-08 -1.07486e-14 -2.34612e-09 -8.99773e-08 -2.22351e-14 4.64207e-10 -9.77297e-08 1.84489e-14 4.34439e-09 -8.85185e-08 -3.39852e-14 9.37025e-09 -5.07644e-08 4.18109e-15 4.53041e-09 -2.59172e-08 -3.60258e-14 8.60983e-10 -2.26567e-08 -1.19055e-14 6.12616e-12 -4.15945e-09 -1.06764e-15 -2.2723e-13 -1.39164e-10 -3.57107e-17 -5.79033e-12 -1.53647e-18 -1.60728e-12 -7.5669e-09 -6.42359e-15 -1.44481e-10 -2.45442e-08 -8.62546e-15 -1.53626e-09 -3.87917e-08 -1.4259e-14 -2.99653e-09 -4.39933e-08 -1.14231e-14 -3.2788e-09 -5.56269e-08 -6.59899e-15 -1.59694e-09 -7.42679e-08 3.47684e-15 1.44893e-09 -9.30231e-08 4.1465e-15 5.42336e-09 -1.01704e-07 -4.20329e-15 9.80392e-09 -9.2899e-08 -1.73217e-14 1.43738e-08 -5.53343e-08 1.15223e-14 7.79459e-09 -1.95221e-08 -3.61899e-15 2.68379e-09 -2.34206e-08 -1.40858e-14 1.27836e-10 -8.48789e-09 -2.60934e-15 4.701e-13 -4.59793e-10 -1.16701e-16 -1.13092e-11 -2.54109e-18 -1.94456e-12 -7.56496e-09 -1.57642e-17 -1.70856e-10 -2.43753e-08 -7.286e-15 -1.44502e-09 -3.75175e-08 -7.86005e-15 -2.37524e-09 -4.3063e-08 -6.05697e-15 -1.42237e-09 -5.65798e-08 -7.19461e-15 1.64438e-09 -7.73347e-08 -5.38504e-15 5.8116e-09 -9.71898e-08 -7.87966e-15 1.06578e-08 -1.06551e-07 3.96011e-15 1.52901e-08 -9.75312e-08 3.84024e-15 1.95199e-08 -5.95642e-08 3.09138e-14 1.20527e-08 -1.20707e-08 2.19271e-15 5.21038e-09 -1.99362e-08 -2.5279e-14 6.45089e-10 -1.27279e-08 -5.32746e-15 7.35814e-12 -1.32297e-09 -3.83866e-16 -3.12815e-11 -6.2899e-18 -2.17866e-12 -7.56278e-09 -3.53976e-15 -1.8555e-10 -2.41919e-08 -8.75875e-15 -1.26865e-09 -3.64344e-08 -8.52633e-15 -1.46644e-09 -4.28652e-08 -8.23191e-15 8.07467e-10 -5.88537e-08 -3.93902e-15 4.9602e-09 -8.14875e-08 -3.70523e-15 9.90712e-09 -1.02136e-07 3.74868e-15 1.51141e-08 -1.11758e-07 -1.01473e-14 1.9473e-08 -1.0189e-07 -1.97713e-14 2.33563e-08 -6.34476e-08 2.25147e-14 1.68369e-08 -5.55137e-09 1.52822e-14 7.87313e-09 -1.25901e-08 -4.46753e-14 1.78428e-09 -1.50386e-08 -9.00653e-15 4.5814e-11 -2.86649e-09 -9.63205e-16 -9.14531e-11 -1.82702e-17 -2.1288e-12 -7.56066e-09 -1.61088e-15 -1.86667e-10 -2.40074e-08 -5.02276e-15 -1.00542e-09 -3.56157e-08 -1.16968e-14 -3.43414e-10 -4.35272e-08 -7.66996e-15 3.02111e-09 -6.22182e-08 -3.10906e-15 7.75778e-09 -8.62242e-08 -6.5387e-15 1.29143e-08 -1.07293e-07 -4.70044e-15 1.78682e-08 -1.16712e-07 3.3604e-14 2.15149e-08 -1.05537e-07 3.66831e-14 2.47764e-08 -6.67093e-08 8.70057e-14 2.04884e-08 -1.26372e-09 1.52107e-13 1.01051e-08 -2.9146e-09 -5.1047e-14 3.33488e-09 -1.47855e-08 -9.10578e-15 1.74976e-10 -4.75583e-09 -1.55734e-15 -2.33543e-10 -5.54293e-17 -1.72476e-12 -7.55894e-09 6.9011e-16 -1.75888e-10 -2.38332e-08 -6.04487e-15 -6.78053e-10 -3.51136e-08 -1.01318e-14 8.33487e-10 -4.50387e-08 -9.12924e-17 4.7933e-09 -6.6178e-08 -1.56274e-14 9.52475e-09 -9.09557e-08 5.08329e-15 1.42521e-08 -1.1202e-07 5.53868e-14 1.83811e-08 -1.20841e-07 -9.53756e-14 2.09385e-08 -1.08095e-07 -7.43006e-14 2.3044e-08 -6.88148e-08 -3.85063e-14 2.11035e-08 6.7643e-10 -1.95533e-14 1.14178e-08 6.46657e-09 -3.56343e-14 4.79766e-09 -1.26093e-08 -1.05405e-14 4.49549e-10 -6.40636e-09 -2.26317e-15 -4.89657e-10 -1.42443e-16 -9.63736e-13 -7.55797e-09 -4.33199e-15 -1.56199e-10 -2.3678e-08 -4.85121e-15 -3.35544e-10 -3.49343e-08 -1.54225e-14 1.83149e-09 -4.72056e-08 -5.52197e-15 5.82612e-09 -7.01726e-08 -9.07944e-15 1.00003e-08 -9.51299e-08 8.14675e-15 1.38325e-08 -1.15852e-07 5.54405e-14 1.67795e-08 -1.23788e-07 -8.34581e-14 1.80191e-08 -1.09334e-07 -7.46523e-14 1.86293e-08 -6.9425e-08 -1.05024e-14 1.83154e-08 9.90194e-10 8.58518e-14 1.14722e-08 1.31707e-08 7.70923e-15 5.77878e-09 -9.75527e-09 -7.78844e-15 8.47939e-10 -7.43667e-09 -2.22998e-15 -8.46769e-10 -2.83403e-16 1.47013e-13 -7.55813e-09 3.2775e-16 -1.30573e-10 -2.35473e-08 -3.90766e-15 -2.93028e-11 -3.50355e-08 -1.66245e-14 2.46817e-09 -4.97031e-08 -4.57209e-16 6.02163e-09 -7.37261e-08 -1.12714e-14 9.32142e-09 -9.84298e-08 -3.1352e-15 1.2088e-08 -1.18619e-07 3.70363e-14 1.38032e-08 -1.25503e-07 -7.89741e-14 1.37719e-08 -1.09303e-07 -4.72938e-14 1.29757e-08 -6.86289e-08 -5.94752e-14 1.35806e-08 3.85158e-10 3.67298e-14 1.04014e-08 1.62812e-08 -1.5304e-15 6.16696e-09 -7.31485e-09 3.48473e-16 1.27478e-09 -7.83427e-09 -2.22227e-15 -1.24695e-09 -5.21234e-16 1.32444e-12 -7.55944e-09 -5.47687e-15 -1.02028e-10 -2.34439e-08 -7.47915e-15 2.12727e-10 -3.53503e-08 -8.77085e-15 2.70214e-09 -5.21925e-08 6.50385e-16 5.5413e-09 -7.65653e-08 -3.31931e-15 7.93139e-09 -1.0082e-07 1.00817e-14 9.7331e-09 -1.20421e-07 6.21343e-14 1.04433e-08 -1.26213e-07 -9.78861e-14 9.48034e-09 -1.0834e-07 -4.18558e-14 7.71094e-09 -6.68595e-08 -8.65666e-14 8.8128e-09 -7.16748e-10 1.22495e-14 8.80863e-09 1.62473e-08 -1.65074e-14 6.10023e-09 -5.77576e-09 1.10271e-14 1.63911e-09 -7.79754e-09 -1.74415e-15 -1.621e-09 -7.33267e-16 2.60912e-12 -7.56206e-09 -1.82717e-16 -7.25419e-11 -2.33687e-08 -1.54741e-15 3.8851e-10 -3.58113e-08 -2.05128e-14 2.61476e-09 -5.44187e-08 -3.13507e-15 4.70756e-09 -7.86582e-08 1.46713e-14 6.34506e-09 -1.02457e-07 -4.84751e-14 7.43408e-09 -1.2151e-07 -4.17759e-14 7.51464e-09 -1.26294e-07 -1.70219e-14 6.11353e-09 -1.06939e-07 -1.25843e-14 3.95611e-09 -6.47021e-08 -1.31346e-13 5.4189e-09 -2.17956e-09 -3.78624e-14 7.37521e-09 1.42667e-08 -1.49334e-14 5.81319e-09 -5.0262e-09 1.5127e-14 1.90296e-09 -7.52255e-09 -1.34864e-15 -1.9154e-09 -9.41749e-16 3.67198e-12 -7.56572e-09 -4.27384e-15 -4.40123e-11 -2.33211e-08 -6.46791e-15 5.08996e-10 -3.63644e-08 -8.7426e-15 2.34826e-09 -5.62579e-08 6.286e-15 3.82405e-09 -8.01341e-08 2.07095e-14 4.93209e-09 -1.03566e-07 -3.50443e-14 5.595e-09 -1.22173e-07 -1.70106e-14 5.42372e-09 -1.26123e-07 -2.17376e-14 4.05554e-09 -1.05571e-07 2.04137e-14 2.10187e-09 -6.27485e-08 -1.52045e-13 3.77567e-09 -3.85331e-09 -8.20879e-14 6.42888e-09 1.15955e-08 -1.93538e-14 5.47974e-09 -4.68808e-09 1.18776e-14 2.06674e-09 -7.11886e-09 -1.59922e-15 -2.09981e-09 -1.1113e-15 4.60901e-12 -7.57033e-09 -7.79296e-16 -1.77996e-11 -2.32986e-08 -4.55841e-15 5.88786e-10 -3.6971e-08 -8.43424e-15 2.03133e-09 -5.77004e-08 -3.68089e-15 3.07302e-09 -8.11758e-08 -9.36247e-15 3.85011e-09 -1.04343e-07 -1.20617e-14 4.31907e-09 -1.22642e-07 -1.59818e-14 4.16243e-09 -1.25966e-07 -1.2927e-14 3.10645e-09 -1.04515e-07 1.136e-14 1.70361e-09 -6.13457e-08 -1.0303e-13 3.48259e-09 -5.63228e-09 -5.71173e-14 5.9169e-09 9.14582e-09 -5.13013e-15 5.16474e-09 -4.42961e-09 8.26381e-15 2.14015e-09 -6.63077e-09 -1.47356e-15 -2.16593e-09 -1.12954e-15 5.37171e-12 -7.5757e-09 -3.72026e-15 4.05823e-12 -2.32973e-08 -4.5547e-15 6.37234e-10 -3.76041e-08 -7.96555e-15 1.73904e-09 -5.88022e-08 2.37683e-17 2.50568e-09 -8.19425e-08 -1.39292e-14 3.09107e-09 -1.04928e-07 -1.57663e-14 3.50825e-09 -1.23059e-07 -1.505e-14 3.48769e-09 -1.25945e-07 -1.13957e-14 2.8033e-09 -1.03831e-07 -5.55154e-15 1.98528e-09 -6.05276e-08 -4.16369e-14 3.75011e-09 -7.39711e-09 -4.04749e-14 5.6015e-09 7.28037e-09 -8.52024e-15 4.85449e-09 -4.10186e-09 3.26498e-15 2.12865e-09 -6.08059e-09 -1.97423e-15 -2.12146e-09 -1.15803e-15 6.04516e-12 -7.58175e-09 -3.91288e-16 1.93559e-11 -2.33106e-08 -5.44844e-15 6.55042e-10 -3.82398e-08 -5.64548e-15 1.49393e-09 -5.96411e-08 -2.30822e-17 2.09303e-09 -8.25417e-08 -1.20654e-14 2.57017e-09 -1.05405e-07 -1.66981e-14 2.99679e-09 -1.23486e-07 -1.10103e-14 3.12325e-09 -1.26072e-07 -5.97967e-15 2.72854e-09 -1.03436e-07 -1.92042e-14 2.30575e-09 -6.01048e-08 6.40864e-15 3.94428e-09 -9.03551e-09 -1.28638e-14 5.27227e-09 5.93895e-09 -2.87559e-14 4.51156e-09 -3.70604e-09 -2.58139e-15 2.03441e-09 -5.47549e-09 -2.40295e-15 -1.96547e-09 -1.19521e-15 6.60783e-12 -7.58835e-09 -2.43425e-15 2.75397e-11 -2.33316e-08 -3.34586e-15 6.41434e-10 -3.88537e-08 -9.37788e-15 1.29117e-09 -6.02908e-08 -2.43229e-15 1.78324e-09 -8.30338e-08 -1.70437e-14 2.19643e-09 -1.05818e-07 -2.25152e-14 2.64331e-09 -1.23932e-07 -9.45928e-15 2.87665e-09 -1.26305e-07 -6.25626e-15 2.65144e-09 -1.03211e-07 -2.67676e-14 2.38255e-09 -5.98359e-08 2.56435e-14 3.81566e-09 -1.04685e-08 -6.49218e-15 4.83667e-09 4.90529e-09 -2.8139e-14 4.1117e-09 -3.3053e-09 6.32106e-18 1.86361e-09 -4.8619e-09 -1.76451e-15 -1.74835e-09 -1.11454e-15 7.0952e-12 -7.59545e-09 -8.37807e-16 2.98872e-11 -2.33543e-08 -3.81006e-15 5.9941e-10 -3.94232e-08 -9.90621e-15 1.1183e-09 -6.08097e-08 -5.39359e-15 1.53366e-09 -8.34492e-08 -1.30413e-14 1.9056e-09 -1.0619e-07 -2.35586e-14 2.36406e-09 -1.24391e-07 -7.49799e-15 2.65973e-09 -1.26601e-07 -2.76248e-15 2.51109e-09 -1.03062e-07 -2.36977e-14 2.22694e-09 -5.95518e-08 2.45871e-14 3.41702e-09 -1.16584e-08 5.59854e-15 4.3035e-09 4.00691e-09 -3.13844e-14 3.65427e-09 -2.94552e-09 6.13973e-16 1.63514e-09 -4.27093e-09 -1.49028e-15 -1.51311e-09 -1.04572e-15 7.49595e-12 -7.60295e-09 -2.32288e-15 3.00033e-11 -2.33768e-08 -4.3966e-15 5.39374e-10 -3.99326e-08 -8.70466e-15 9.68806e-10 -6.12391e-08 -3.844e-15 1.3223e-09 -8.38027e-08 -1.47089e-14 1.66486e-09 -1.06533e-07 -2.62284e-14 2.12408e-09 -1.2485e-07 -3.24538e-15 2.45213e-09 -1.26929e-07 -3.7498e-15 2.32993e-09 -1.0294e-07 -2.63348e-14 1.95711e-09 -5.9179e-08 6.18182e-15 2.90019e-09 -1.26014e-08 1.88531e-15 3.71936e-09 3.17668e-09 -2.85977e-14 3.15159e-09 -2.63505e-09 1.33586e-15 1.36411e-09 -3.70343e-09 -1.36912e-15 -1.26325e-09 -9.42713e-16 7.87711e-12 -7.61082e-09 -1.60978e-15 3.1905e-11 -2.34009e-08 -8.12147e-16 4.7372e-10 -4.03744e-08 -1.15394e-14 8.40024e-10 -6.16054e-08 -5.99431e-15 1.13998e-09 -8.41027e-08 -1.56892e-14 1.46005e-09 -1.06853e-07 -1.98481e-14 1.91332e-09 -1.25303e-07 9.13917e-16 2.25869e-09 -1.27274e-07 -1.38293e-15 2.14372e-09 -1.02825e-07 -1.5151e-14 1.66948e-09 -5.87048e-08 -1.08476e-14 2.38007e-09 -1.33119e-08 5.99838e-15 3.12509e-09 2.42155e-09 -2.31852e-14 2.62261e-09 -2.35854e-09 1.26575e-15 1.07281e-09 -3.17178e-09 -1.16327e-15 -1.02365e-09 -8.19365e-16 8.21061e-12 -7.61903e-09 -2.47714e-15 3.85337e-11 -2.34312e-08 -3.09692e-15 4.13961e-10 -4.07498e-08 -9.37008e-15 7.32889e-10 -6.19243e-08 -4.83006e-15 9.85274e-10 -8.43551e-08 -1.40382e-14 1.2865e-09 -1.07154e-07 -2.15962e-14 1.73043e-09 -1.25747e-07 -6.10883e-15 2.08616e-09 -1.2763e-07 -9.05082e-15 1.97292e-09 -1.02712e-07 -1.59151e-14 1.40405e-09 -5.8136e-08 -2.79972e-14 1.89829e-09 -1.3806e-08 7.2536e-15 2.54103e-09 1.76991e-09 -2.86135e-14 2.08567e-09 -2.09619e-09 9.16959e-16 7.81984e-10 -2.68118e-09 -8.59786e-16 -8.08853e-10 -6.67151e-16 8.50989e-12 -7.62754e-09 -1.73568e-15 5.02352e-11 -2.3473e-08 -2.09565e-15 3.65883e-10 -4.10654e-08 -8.2247e-15 6.45957e-10 -6.22043e-08 -7.01896e-15 8.55869e-10 -8.4565e-08 -1.505e-14 1.14013e-09 -1.07438e-07 -1.11522e-14 1.57311e-09 -1.2618e-07 -1.07011e-14 1.93518e-09 -1.27992e-07 -1.05131e-14 1.82127e-09 -1.02598e-07 -1.12654e-14 1.16144e-09 -5.74761e-08 -3.68049e-14 1.45001e-09 -1.40945e-08 3.67428e-15 1.97386e-09 1.2386e-09 -2.28391e-14 1.55618e-09 -1.83529e-09 1.53346e-15 5.08e-10 -2.2337e-09 -6.4514e-16 -6.25694e-10 -4.88476e-16 8.76958e-12 -7.63631e-09 -2.49437e-15 6.51913e-11 -2.35294e-08 -1.94298e-15 3.30876e-10 -4.13311e-08 -1.00721e-14 5.7685e-10 -6.24503e-08 -9.20216e-15 7.49217e-10 -8.47374e-08 -1.59074e-14 1.01711e-09 -1.07706e-07 -1.02651e-14 1.43813e-09 -1.26601e-07 -1.35573e-14 1.80312e-09 -1.28357e-07 -1.0766e-14 1.68597e-09 -1.0248e-07 5.07024e-15 9.31643e-10 -5.67218e-08 -3.48118e-14 1.02119e-09 -1.41839e-08 -3.31572e-15 1.42701e-09 8.26987e-10 -1.62864e-14 1.04695e-09 -1.57177e-09 2.18439e-15 2.6201e-10 -1.83021e-09 -5.14483e-16 -4.73418e-10 -3.94616e-16 9.0079e-12 -7.64532e-09 -1.33538e-15 8.01369e-11 -2.36005e-08 -4.64307e-15 3.06291e-10 -4.15572e-08 -7.99699e-15 5.2086e-10 -6.26649e-08 -9.43484e-15 6.60611e-10 -8.48772e-08 -7.92509e-15 9.12445e-10 -1.07958e-07 -1.3554e-14 1.32124e-09 -1.2701e-07 -1.84239e-14 1.6867e-09 -1.28723e-07 -1.61711e-14 1.56425e-09 -1.02358e-07 -6.30885e-15 7.07819e-10 -5.58653e-08 -3.41597e-14 6.03202e-10 -1.40793e-08 -2.47517e-14 9.04474e-10 5.21839e-10 -6.59495e-15 5.68243e-10 -1.30795e-09 3.25358e-15 5.01137e-11 1.24661e-16 -2.6264e-16 9.20904e-12 -7.65453e-09 -1.84886e-15 9.20954e-11 -2.36834e-08 -4.45181e-15 2.88584e-10 -4.17537e-08 -9.89798e-15 4.73792e-10 -6.285e-08 -1.15214e-14 5.85802e-10 -8.49892e-08 -1.00536e-14 8.22159e-10 -1.08194e-07 -1.12456e-14 1.21938e-09 -1.27407e-07 -1.51384e-14 1.5843e-09 -1.29088e-07 -1.22615e-14 1.45684e-09 -1.0223e-07 -2.07216e-15 4.91337e-10 -5.48997e-08 -3.44171e-15 1.98108e-10 -1.37861e-08 -1.38277e-14 4.1157e-10 3.06564e-10 -1.48531e-15 -1.04858e-09 4.71781e-15 9.39989e-12 -7.66393e-09 -1.50385e-15 9.88169e-11 -2.37728e-08 -3.78785e-15 2.74002e-10 -4.19289e-08 -9.96029e-15 4.316e-10 -6.30076e-08 -1.16465e-14 5.20845e-10 -8.50784e-08 -7.52286e-15 7.42901e-10 -1.08417e-07 -1.02606e-14 1.13034e-09 -1.27795e-07 -1.55323e-14 1.49546e-09 -1.29453e-07 -1.04169e-14 1.36616e-09 -1.02101e-07 1.98548e-15 2.87518e-10 -5.3821e-08 7.05158e-16 -1.86727e-10 -1.33114e-08 -7.29675e-15 -4.62957e-11 1.66402e-10 -9.40078e-15 -7.98731e-10 8.21667e-16 9.61785e-12 -7.67355e-09 -1.91933e-15 9.96216e-11 -2.38628e-08 -4.46791e-15 2.60295e-10 -4.20896e-08 -7.93893e-15 3.92013e-10 -6.31393e-08 -1.17701e-14 4.63136e-10 -8.51495e-08 -5.67296e-15 6.72523e-10 -1.08626e-07 -8.19181e-15 1.05291e-09 -1.28175e-07 -1.64363e-14 1.42041e-09 -1.2982e-07 -1.31002e-14 1.29509e-09 -1.01976e-07 -7.74754e-15 1.0147e-10 -5.26273e-08 -4.70088e-15 -5.57579e-10 -1.26523e-08 -5.52973e-15 -4.6726e-10 8.16073e-11 -1.00749e-14 -5.66769e-10 -3.87566e-16 9.87316e-12 -7.68342e-09 -1.67234e-15 9.50762e-11 -2.39481e-08 -4.06781e-15 2.45942e-10 -4.22404e-08 -1.1171e-14 3.53223e-10 -6.32466e-08 -1.24606e-14 4.10128e-10 -8.52064e-08 -1.21271e-14 6.08541e-10 -1.08824e-07 -1.12959e-14 9.84792e-10 -1.28551e-07 -1.40367e-14 1.35697e-09 -1.30193e-07 -1.43836e-14 1.24091e-09 -1.0186e-07 -9.7671e-15 -7.5508e-11 -5.13109e-08 1.09481e-14 -9.32439e-10 -1.17953e-08 -5.62376e-14 -8.5974e-10 2.20203e-11 -1.46479e-14 -3.65868e-10 1.23628e-15 1.01019e-11 -7.69352e-09 -1.80804e-15 8.66197e-11 -2.40246e-08 -5.49447e-15 2.30636e-10 -4.23844e-08 -7.84465e-15 3.14798e-10 -6.33308e-08 -1.0381e-14 3.60526e-10 -8.52522e-08 -7.03744e-15 5.49388e-10 -1.09013e-07 -9.68769e-15 9.24108e-10 -1.28926e-07 -1.62543e-14 1.30262e-09 -1.30571e-07 -9.85212e-15 1.19924e-09 -1.01756e-07 -6.13784e-15 -2.49356e-10 -4.98624e-08 1.97038e-14 -1.30156e-09 -1.07427e-08 -1.18752e-13 -1.22095e-09 -3.31392e-11 -1.44592e-14 -2.01249e-10 2.58375e-15 1.02379e-11 -7.70376e-09 -1.86685e-15 7.60079e-11 -2.40903e-08 -4.72971e-15 2.14239e-10 -4.25226e-08 -7.32728e-15 2.76352e-10 -6.33929e-08 -1.22913e-14 3.12936e-10 -8.52887e-08 -1.38851e-14 4.93651e-10 -1.09194e-07 -1.17802e-14 8.69983e-10 -1.29302e-07 -1.05165e-14 1.25652e-09 -1.30958e-07 -1.70916e-14 1.17016e-09 -1.0167e-07 -3.23208e-15 -4.07837e-10 -4.82844e-08 1.49443e-14 -1.65588e-09 -9.49357e-09 -1.48986e-13 -1.54999e-09 -9.40042e-11 -1.55572e-14 -7.27418e-11 1.41074e-15 1.0174e-11 -7.71394e-09 -2.0477e-15 6.46215e-11 -2.41448e-08 -5.83212e-15 1.96725e-10 -4.26547e-08 -6.34395e-15 2.37701e-10 -6.34339e-08 -9.97566e-15 2.66121e-10 -8.53171e-08 -1.25756e-14 4.40037e-10 -1.09368e-07 -1.07772e-14 8.21289e-10 -1.29684e-07 -7.88619e-15 1.2186e-09 -1.31355e-07 -2.07656e-14 1.16679e-09 -1.01618e-07 -1.23047e-14 -5.01488e-10 -4.66161e-08 1.90857e-14 -1.94407e-09 -8.04774e-09 -1.42559e-13 -1.82947e-09 -1.35506e-10 -2.53196e-14 3.44958e-11 -1.66587e-15 9.75711e-12 -7.72369e-09 -1.87559e-15 5.3305e-11 -2.41883e-08 -5.88474e-15 1.77713e-10 -4.27791e-08 -6.70637e-15 1.97806e-10 -6.34539e-08 -1.02934e-14 2.17353e-10 -8.53367e-08 -1.36084e-14 3.85239e-10 -1.09536e-07 -1.57138e-14 7.72465e-10 -1.30071e-07 -1.54138e-14 1.18198e-09 -1.31764e-07 -9.49944e-15 1.18499e-09 -1.01621e-07 -5.73957e-15 -5.12967e-10 -4.49182e-08 1.4888e-14 -2.11517e-09 -6.4363e-09 -3.36457e-14 -2.03513e-09 -1.06434e-10 -6.98008e-15 1.231e-10 -1.07764e-15 8.85791e-12 -7.73255e-09 -2.02588e-15 4.23719e-11 -2.42219e-08 -6.2051e-15 1.56581e-10 -4.28934e-08 -6.27016e-15 1.55039e-10 -6.34524e-08 -9.76335e-15 1.6318e-10 -8.53448e-08 -1.56024e-14 3.24066e-10 -1.09697e-07 -1.42893e-14 7.12895e-10 -1.3046e-07 -1.12313e-14 1.13833e-09 -1.3219e-07 -1.17945e-14 1.2371e-09 -1.0172e-07 -7.17725e-15 -2.31273e-10 -4.34498e-08 -3.08759e-14 -2.12435e-09 -4.52327e-09 1.23954e-13 -2.12985e-09 4.68454e-11 2.09897e-14 1.64831e-10 -7.80421e-16 7.42111e-12 -7.73997e-09 -2.14404e-15 3.16547e-11 -2.42461e-08 -6.32537e-15 1.32017e-10 -4.29937e-08 -6.19088e-15 1.05865e-10 -6.34262e-08 -1.00216e-14 9.71558e-11 -8.5336e-08 -1.44738e-14 2.44424e-10 -1.09844e-07 -1.54607e-14 6.20332e-10 -1.30836e-07 -1.21555e-14 1.0513e-09 -1.32621e-07 -1.19617e-14 1.17743e-09 -1.01846e-07 -9.43353e-15 1.85432e-10 -4.24577e-08 -2.05076e-14 -1.8057e-09 -2.49926e-09 8.64221e-14 -1.79925e-09 2.13597e-10 1.77361e-14 1.71034e-10 -1.95154e-16 5.40836e-12 -7.74538e-09 -2.22083e-15 2.0996e-11 -2.42617e-08 -6.29499e-15 1.03046e-10 -4.30758e-08 -5.69637e-15 4.72339e-11 -6.33704e-08 -9.56117e-15 1.24898e-11 -8.53013e-08 -1.38562e-14 1.28975e-10 -1.09961e-07 -1.34363e-14 4.68603e-10 -1.31175e-07 -1.01594e-14 9.08019e-10 -1.3306e-07 -7.3474e-15 1.04501e-09 -1.01983e-07 -1.09734e-14 9.28518e-10 -4.23412e-08 -1.68058e-15 -1.52691e-09 4.6876e-15 -1.04222e-09 -5.44e-17 -1.13559e-15 3.22776e-12 -7.74861e-09 -2.20678e-15 1.25225e-11 -2.4271e-08 -6.6562e-15 7.45735e-11 -4.31378e-08 -6.6157e-15 -1.1464e-11 -6.32844e-08 -1.12287e-14 -7.6328e-11 -8.52364e-08 -1.29634e-14 -6.54274e-12 -1.1003e-07 -1.26515e-14 2.59816e-10 -1.31442e-07 -1.18419e-14 5.76575e-10 -1.33377e-07 -8.09573e-15 2.78351e-10 -1.01685e-07 -9.53105e-15 -4.20629e-08 -8.95364e-15 1.50959e-12 -7.75012e-09 -2.30714e-15 8.82428e-12 -2.42783e-08 -5.91247e-15 5.33921e-11 -4.31824e-08 -6.56747e-15 -5.39239e-11 -6.31771e-08 -9.29987e-15 -1.33491e-10 -8.51568e-08 -1.11059e-14 -8.0791e-11 -1.10083e-07 -1.32906e-14 1.79577e-10 -1.31702e-07 -1.26724e-14 4.99843e-10 -1.33697e-07 -1.04141e-14 3.15881e-10 -1.01501e-07 -7.37146e-15 -4.1747e-08 -8.89735e-16 3.68734e-13 -7.75048e-09 -2.26966e-15 9.37049e-12 -2.42873e-08 -6.76341e-15 3.81239e-11 -4.32111e-08 -6.35256e-15 -8.41653e-11 -6.30548e-08 -1.07707e-14 -1.70118e-10 -8.50708e-08 -1.12254e-14 -1.23139e-10 -1.1013e-07 -1.39627e-14 1.40978e-10 -1.31966e-07 -1.17031e-14 4.78778e-10 -1.34035e-07 -1.49684e-14 3.58628e-10 -1.01381e-07 -4.89618e-15 -4.13884e-08 2.11516e-15 -2.53812e-13 -7.75023e-09 -2.40129e-15 1.28761e-11 -2.43004e-08 -6.05224e-15 2.70504e-11 -4.32253e-08 -5.95773e-15 -1.04619e-10 -6.29232e-08 -1.0767e-14 -1.89883e-10 -8.49855e-08 -9.48761e-15 -1.40731e-10 -1.10179e-07 -1.29902e-14 1.31532e-10 -1.32238e-07 -2.06694e-14 4.88399e-10 -1.34392e-07 -2.2993e-14 3.82482e-10 -1.01275e-07 -2.21149e-14 -4.10058e-08 -6.56205e-15 -4.31305e-13 -7.7498e-09 -2.46311e-15 1.77563e-11 -2.43186e-08 -6.12618e-15 1.81366e-11 -4.32257e-08 -5.95291e-15 -1.18501e-10 -6.27865e-08 -9.63274e-15 -1.98466e-10 -8.49055e-08 -1.16384e-14 -1.43471e-10 -1.10234e-07 -2.23644e-14 1.38376e-10 -1.3252e-07 -5.05123e-15 5.10683e-10 -1.34764e-07 -1.11972e-14 4.0613e-10 -1.0117e-07 6.94695e-16 -4.05997e-08 3.20571e-14 -3.00808e-13 -7.7495e-09 -2.6345e-15 2.2103e-11 -2.4341e-08 -4.80341e-15 9.16428e-12 -4.32128e-08 -5.26359e-15 -1.28627e-10 -6.26487e-08 -9.95577e-15 -1.99575e-10 -8.48346e-08 -1.24979e-14 -1.36104e-10 -1.10298e-07 -2.28975e-14 1.562e-10 -1.32812e-07 -7.04626e-15 5.42477e-10 -1.35151e-07 -1.20302e-14 4.34024e-10 -1.01062e-07 -1.834e-15 -4.01656e-08 2.49311e-14 5.74597e-14 -7.74956e-09 -2.63156e-15 2.45456e-11 -2.43655e-08 -6.95976e-15 -1.03321e-12 -4.31872e-08 -6.68393e-15 -1.36585e-10 -6.25132e-08 -1.24072e-14 -1.95656e-10 -8.47755e-08 -8.71513e-15 -1.21887e-10 -1.10372e-07 -1.08986e-14 1.81571e-10 -1.33116e-07 -1.4543e-14 5.80812e-10 -1.3555e-07 -1.41048e-14 4.65185e-10 -1.00946e-07 -1.32695e-14 -3.97004e-08 4.43816e-14 5.45144e-13 -7.7501e-09 -2.77332e-15 2.40265e-11 -2.4389e-08 -5.36725e-15 -1.33178e-11 -4.31498e-08 -5.45048e-15 -1.43446e-10 -6.2383e-08 -1.39302e-14 -1.88284e-10 -8.47306e-08 -1.12043e-14 -1.0283e-10 -1.10457e-07 -1.39876e-14 2.12615e-10 -1.33431e-07 -1.19249e-14 6.24525e-10 -1.35962e-07 -1.23438e-14 4.99539e-10 -1.00821e-07 -9.60434e-15 -3.92009e-08 3.44372e-14 1.12616e-12 -7.75123e-09 -2.9034e-15 2.04352e-11 -2.44083e-08 -6.63463e-15 -2.71467e-11 -4.31022e-08 -7.36622e-15 -1.48886e-10 -6.22613e-08 -1.12247e-14 -1.77455e-10 -8.47021e-08 -1.08714e-14 -7.89967e-11 -1.10555e-07 -1.36553e-14 2.49133e-10 -1.33759e-07 -1.1424e-14 6.73658e-10 -1.36386e-07 -1.11652e-14 5.37615e-10 -1.00685e-07 -9.45539e-15 -3.86633e-08 5.93128e-15 1.76187e-12 -7.75299e-09 -2.89995e-15 1.42717e-11 -2.44208e-08 -6.60723e-15 -4.17687e-11 -4.30462e-08 -6.87786e-15 -1.52369e-10 -6.21507e-08 -1.29436e-14 -1.62897e-10 -8.46915e-08 -1.13799e-14 -5.01345e-11 -1.10668e-07 -1.33789e-14 2.91347e-10 -1.34101e-07 -1.2906e-14 7.2862e-10 -1.36824e-07 -8.6586e-15 5.79716e-10 -1.00536e-07 -8.48175e-15 -3.80836e-08 -1.95298e-14 2.44478e-12 -7.75544e-09 -3.13072e-15 6.87559e-12 -2.44252e-08 -6.82614e-15 -5.56122e-11 -4.29837e-08 -7.02577e-15 -1.52387e-10 -6.20539e-08 -1.29542e-14 -1.43505e-10 -8.47004e-08 -1.2953e-14 -1.53608e-11 -1.10796e-07 -1.43131e-14 3.40047e-10 -1.34456e-07 -1.16548e-14 7.90143e-10 -1.37274e-07 -1.13141e-14 6.261e-10 -1.00372e-07 -5.63119e-15 -3.74575e-08 -3.87314e-14 3.17935e-12 -7.75862e-09 -2.95486e-15 -8.3738e-14 -2.4422e-08 -7.59107e-15 -6.70703e-11 -4.29167e-08 -8.108e-15 -1.47452e-10 -6.19736e-08 -1.28478e-14 -1.18005e-10 -8.47299e-08 -1.29819e-14 2.64067e-11 -1.10941e-07 -1.37242e-14 3.9654e-10 -1.34826e-07 -1.15841e-14 8.59419e-10 -1.37737e-07 -1.00531e-14 6.7733e-10 -1.0019e-07 -1.64087e-15 -3.67802e-08 -3.72504e-14 3.97892e-12 -7.7626e-09 -3.06516e-15 -4.70178e-12 -2.44133e-08 -7.93747e-15 -7.42474e-11 -4.28472e-08 -7.53045e-15 -1.35761e-10 -6.19121e-08 -1.27913e-14 -8.47692e-11 -8.47809e-08 -1.35737e-14 7.64809e-11 -1.11102e-07 -1.21859e-14 4.62478e-10 -1.35212e-07 -1.17502e-14 9.37905e-10 -1.38212e-07 -1.03601e-14 7.34638e-10 -9.9987e-08 -8.27737e-15 -3.60456e-08 -1.84505e-14 4.87448e-12 -7.76747e-09 -2.85061e-15 -5.379e-12 -2.4403e-08 -8.87899e-15 -7.57736e-11 -4.27768e-08 -8.64094e-15 -1.16095e-10 -6.18717e-08 -1.26877e-14 -4.28586e-11 -8.48541e-08 -1.35931e-14 1.35941e-10 -1.11281e-07 -1.07158e-14 5.39103e-10 -1.35615e-07 -2.08667e-14 1.02664e-09 -1.38699e-07 -2.08727e-14 7.99014e-10 -9.97593e-08 -4.01112e-14 -3.52466e-08 -1.55307e-14 5.89132e-12 -7.77336e-09 -3.42122e-15 -8.47589e-13 -2.43963e-08 -7.91664e-15 -7.04773e-11 -4.27071e-08 -7.67431e-15 -8.71332e-11 -6.18551e-08 -1.31686e-14 8.86787e-12 -8.49501e-08 -1.4702e-14 2.06156e-10 -1.11478e-07 -2.44241e-14 6.2725e-10 -1.36037e-07 5.60879e-15 1.12584e-09 -1.39198e-07 -2.24595e-15 8.6962e-10 -9.95031e-08 -1.04981e-14 -3.43769e-08 1.168e-14 7.06949e-12 -7.78043e-09 -3.26197e-15 9.29374e-12 -2.43985e-08 -8.7079e-15 -5.82601e-11 -4.26396e-08 -8.37438e-15 -4.90284e-11 -6.18644e-08 -1.27228e-14 6.88062e-11 -8.50679e-08 -1.44376e-14 2.86673e-10 -1.11696e-07 -2.33545e-14 7.26782e-10 -1.36477e-07 -1.08329e-15 1.23627e-09 -1.39708e-07 -7.27324e-15 9.47335e-10 -9.92142e-08 -8.18036e-16 -3.34296e-08 -4.04863e-14 8.43214e-12 -7.78887e-09 -3.47703e-15 2.46638e-11 -2.44147e-08 -8.27483e-15 -3.92533e-11 -4.25757e-08 -7.69145e-15 -1.98651e-12 -6.19017e-08 -1.29699e-14 1.37922e-10 -8.52078e-08 -1.50803e-14 3.7836e-10 -1.11937e-07 -2.3058e-14 8.3902e-10 -1.36937e-07 -4.82856e-15 1.35925e-09 -1.40228e-07 -8.81251e-15 1.03372e-09 -9.88887e-08 -3.0954e-15 -3.23959e-08 -2.39397e-14 1.0006e-11 -7.79887e-09 -3.31155e-15 4.38987e-11 -2.44486e-08 -8.88962e-15 -1.45162e-11 -4.25172e-08 -8.61588e-15 5.2922e-11 -6.19691e-08 -1.23661e-14 2.15356e-10 -8.53702e-08 -1.68243e-14 4.80571e-10 -1.12202e-07 -2.79335e-14 9.63626e-10 -1.3742e-07 -3.7796e-15 1.4946e-09 -1.40759e-07 -7.67833e-15 1.1284e-09 -9.85225e-08 -3.37497e-15 -3.12675e-08 -2.6459e-15 1.1788e-11 -7.81066e-09 -3.92276e-15 6.48191e-11 -2.45017e-08 -7.55177e-15 1.4731e-11 -4.24671e-08 -9.20048e-15 1.13985e-10 -6.20684e-08 -1.61445e-14 3.00066e-10 -8.55563e-08 -8.67676e-15 5.92296e-10 -1.12494e-07 -9.30308e-15 1.10008e-09 -1.37928e-07 -1.6912e-14 1.64231e-09 -1.41301e-07 -1.02455e-14 1.23168e-09 -9.81119e-08 -4.57181e-15 -3.00358e-08 9.07215e-16 1.37668e-11 -7.82443e-09 -3.67922e-15 8.44983e-11 -2.45724e-08 -8.66758e-15 4.64136e-11 -4.2429e-08 -1.01006e-14 1.79006e-10 -6.2201e-08 -1.61475e-14 3.90445e-10 -8.57678e-08 -1.02218e-14 7.12362e-10 -1.12816e-07 -1.33243e-14 1.24814e-09 -1.38464e-07 -1.5238e-14 1.80239e-09 -1.41855e-07 -9.66043e-15 1.34403e-09 -9.76535e-08 -1.04708e-15 -2.86918e-08 -8.46732e-16 1.59059e-11 -7.84033e-09 -3.96643e-15 1.00164e-10 -2.46566e-08 -8.55236e-15 7.89892e-11 -4.24079e-08 -9.58409e-15 2.46391e-10 -6.23684e-08 -1.61053e-14 4.85168e-10 -8.60065e-08 -1.13233e-14 8.3919e-10 -1.1317e-07 -1.23357e-14 1.40649e-09 -1.39031e-07 -1.58904e-14 1.9743e-09 -1.42423e-07 -1.04588e-14 1.46537e-09 -9.71445e-08 -7.56148e-16 -2.72264e-08 -2.77723e-15 1.81613e-11 -7.8585e-09 -3.96723e-15 1.09492e-10 -2.4748e-08 -9.49939e-15 1.11031e-10 -4.24094e-08 -1.05557e-14 3.14202e-10 -6.25716e-08 -1.62868e-14 5.82807e-10 -8.62752e-08 -1.15178e-14 9.71673e-10 -1.13559e-07 -1.25424e-14 1.57431e-09 -1.39634e-07 -1.51981e-14 2.15771e-09 -1.43006e-07 -1.159e-14 1.59587e-09 -9.65827e-08 -2.07363e-15 -2.56306e-08 -1.96622e-15 2.04625e-11 -7.87896e-09 -5.02715e-15 1.11426e-10 -2.48389e-08 -9.73371e-15 1.42211e-10 -4.24402e-08 -1.01787e-14 3.81506e-10 -6.28109e-08 -1.62176e-14 6.82281e-10 -8.65759e-08 -1.11771e-14 1.10854e-09 -1.13985e-07 -1.28602e-14 1.7505e-09 -1.40276e-07 -1.41898e-14 2.3522e-09 -1.43608e-07 -1.29742e-14 1.73578e-09 -9.59663e-08 -4.64017e-15 -2.38948e-08 -2.43956e-15 2.27378e-11 -7.9017e-09 -5.32154e-15 1.06139e-10 -2.49223e-08 -1.0401e-14 1.72439e-10 -4.25064e-08 -1.03678e-14 4.47364e-10 -6.30858e-08 -1.5235e-14 7.82129e-10 -8.69107e-08 -1.02563e-14 1.24812e-09 -1.14451e-07 -1.30486e-14 1.93337e-09 -1.40961e-07 -1.52188e-14 2.55693e-09 -1.44232e-07 -1.40052e-14 1.8853e-09 -9.52946e-08 -8.54231e-15 -2.20095e-08 -2.00766e-15 2.48882e-11 -7.92659e-09 -5.53113e-15 9.52807e-11 -2.49927e-08 -1.17129e-14 2.02316e-10 -4.26135e-08 -9.18907e-15 5.11125e-10 -6.33946e-08 -1.18143e-14 8.80577e-10 -8.72802e-08 -1.39054e-14 1.38815e-09 -1.14959e-07 -1.31011e-14 2.12036e-09 -1.41693e-07 -1.48576e-14 2.7705e-09 -1.44882e-07 -1.01115e-14 2.04483e-09 -9.4569e-08 -8.78421e-15 -1.99646e-08 -2.82439e-15 2.67457e-11 -7.95333e-09 -5.73951e-15 8.11397e-11 -2.50471e-08 -1.29596e-14 2.31806e-10 -4.27641e-08 -8.69013e-15 5.71245e-10 -6.3734e-08 -1.09347e-14 9.74518e-10 -8.76834e-08 -1.34451e-14 1.52437e-09 -1.15509e-07 -1.33396e-14 2.30654e-09 -1.42475e-07 -1.555e-14 2.98977e-09 -1.45565e-07 -8.43232e-15 2.21457e-09 -9.37938e-08 -7.22017e-15 -1.77501e-08 3.43416e-15 2.80597e-11 -7.98139e-09 -6.5451e-15 6.63548e-11 -2.50854e-08 -1.34182e-14 2.6008e-10 -4.29579e-08 -9.32e-15 6.24469e-10 -6.40984e-08 -1.01943e-14 1.05794e-09 -8.81169e-08 -1.31068e-14 1.64894e-09 -1.161e-07 -1.54866e-14 2.48303e-09 -1.43309e-07 -1.30698e-14 3.2087e-09 -1.46291e-07 -1.1024e-14 2.39446e-09 -9.29795e-08 -7.73757e-15 -1.53556e-08 1.1079e-14 2.84047e-11 -8.0098e-09 -6.87899e-15 5.26879e-11 -2.51097e-08 -1.47786e-14 2.84042e-10 -4.31892e-08 -9.55834e-15 6.6441e-10 -6.44788e-08 -8.28565e-15 1.12024e-09 -8.85727e-08 -1.28173e-14 1.74773e-09 -1.16727e-07 -1.47108e-14 2.63379e-09 -1.44195e-07 -1.25934e-14 3.41592e-09 -1.47073e-07 -1.1195e-14 2.58349e-09 -9.21471e-08 -7.48351e-15 -1.27721e-08 3.2051e-14 2.70894e-11 -8.03689e-09 -7.66687e-15 4.04814e-11 -2.51231e-08 -1.51206e-14 2.97797e-10 -4.34465e-08 -8.7535e-15 6.79819e-10 -6.48608e-08 -9.45308e-15 1.14366e-09 -8.90366e-08 -1.42806e-14 1.79664e-09 -1.1738e-07 -1.37558e-14 2.73142e-09 -1.4513e-07 -1.41332e-14 3.5914e-09 -1.47933e-07 -9.88875e-15 2.78122e-09 -9.13369e-08 -5.9629e-15 -9.99088e-09 3.78137e-14 2.30159e-11 -8.05991e-09 -8.5741e-15 2.70328e-11 -2.51271e-08 -1.45187e-14 2.90258e-10 -4.37097e-08 -8.1225e-15 6.51224e-10 -6.52217e-08 -6.70065e-15 1.09856e-09 -8.94839e-08 -1.34595e-14 1.75511e-09 -1.18037e-07 -1.41866e-14 2.7297e-09 -1.46105e-07 -2.09561e-14 3.69934e-09 -1.48902e-07 -1.7674e-14 2.97825e-09 -9.06158e-08 -3.01392e-14 -7.01277e-09 -1.45075e-14 1.45291e-11 -8.07443e-09 -9.8779e-15 5.74741e-12 -2.51183e-08 -1.63802e-14 2.44154e-10 -4.39481e-08 -7.40175e-15 5.48427e-10 -6.5526e-08 -6.23009e-15 9.38527e-10 -8.9874e-08 -1.3494e-14 1.55738e-09 -1.18656e-07 -2.34222e-14 2.55257e-09 -1.471e-07 5.29623e-16 3.68306e-09 -1.50033e-07 -5.93442e-15 3.18454e-09 -9.01173e-08 -1.22722e-14 -3.8281e-09 -3.89032e-14 -8.78928e-13 -8.07356e-09 -1.1339e-14 -3.55809e-11 -2.50836e-08 -1.39619e-14 1.32326e-10 -4.41161e-08 -4.76135e-15 3.24658e-10 -6.57183e-08 -6.23488e-15 5.91548e-10 -9.01409e-08 -1.31331e-14 1.09909e-09 -1.19163e-07 -2.38784e-14 2.0741e-09 -1.48075e-07 -6.24803e-15 3.42953e-09 -1.51388e-07 -9.45006e-15 3.34778e-09 -9.00356e-08 -9.35425e-15 -4.80309e-10 -5.79571e-14 -2.68243e-11 -8.04673e-09 -1.28144e-14 -1.15072e-10 -2.49954e-08 -1.45663e-14 -8.27709e-11 -4.41484e-08 -4.36971e-15 -8.54574e-11 -6.57156e-08 -3.22379e-15 -4.86729e-11 -9.01776e-08 -1.43995e-14 2.19133e-10 -1.19431e-07 -2.14995e-14 1.09761e-09 -1.48953e-07 -6.37874e-15 2.76996e-09 -1.53061e-07 -8.84998e-15 3.4859e-09 -9.07515e-08 -7.47845e-15 3.00558e-09 -2.006e-14 -6.79722e-11 -7.97876e-09 -1.46337e-14 -2.56398e-10 -2.4807e-08 -1.27552e-14 -4.49972e-10 -4.39548e-08 -1.55665e-15 -7.6796e-10 -6.53977e-08 -2.40934e-15 -1.12966e-09 -8.98159e-08 -1.62612e-14 -1.32932e-09 -1.19231e-07 -2.49181e-14 -7.14742e-10 -1.49568e-07 -6.12549e-15 1.35024e-09 -1.55126e-07 -7.93518e-15 3.35371e-09 -9.2755e-08 -5.67149e-15 6.35929e-09 -6.85301e-15 -1.29744e-10 -7.84901e-09 -1.63081e-14 -4.87373e-10 -2.44493e-08 -1.24218e-14 -1.02821e-09 -4.34139e-08 -4.97911e-16 -1.83179e-09 -6.45941e-08 -4.91504e-15 -2.83959e-09 -8.88081e-08 -1.19269e-14 -3.85778e-09 -1.18213e-07 -1.27762e-14 -3.85046e-09 -1.49575e-07 -1.20517e-14 -1.31145e-09 -1.57665e-07 -1.14623e-14 2.75406e-09 -9.68205e-08 -7.09703e-15 9.11334e-09 -4.78278e-15 -2.17732e-10 -7.63128e-09 -1.82405e-14 -8.36705e-10 -2.38303e-08 -1.1664e-14 -1.88123e-09 -4.23694e-08 4.5665e-16 -3.40371e-09 -6.30716e-08 -3.00821e-15 -5.40062e-09 -8.68112e-08 -1.35371e-14 -7.75031e-09 -1.15864e-07 -1.50529e-14 -9.02236e-09 -1.48303e-07 -1.01719e-14 -6.1214e-09 -1.60566e-07 -9.59068e-15 8.93545e-10 -1.03835e-07 -4.73209e-15 1.00069e-08 -3.03902e-15 -3.34392e-10 -7.29689e-09 -2.01405e-14 -1.3181e-09 -2.28466e-08 -1.14679e-14 -3.04227e-09 -4.06453e-08 1.80859e-15 -5.55932e-09 -6.05545e-08 -1.75785e-15 -8.95884e-09 -8.34116e-08 -1.43801e-14 -1.33191e-08 -1.11503e-07 -1.53201e-14 -1.70009e-08 -1.44621e-07 -1.12111e-14 -1.45381e-08 -1.63029e-07 -7.56716e-15 -3.0956e-09 -1.15278e-07 -3.29262e-15 6.91124e-09 2.29096e-15 -4.75337e-10 -6.82155e-09 -2.18623e-14 -1.91431e-09 -2.14077e-08 -1.284e-14 -4.47622e-09 -3.80833e-08 1.42411e-15 -8.2545e-09 -5.67763e-08 -1.84984e-16 -1.34817e-08 -7.81844e-08 -1.37861e-14 -2.06299e-08 -1.04355e-07 -1.54014e-14 -2.85183e-08 -1.36733e-07 -1.21797e-14 -2.91931e-08 -1.62354e-07 -6.74534e-15 -1.12338e-08 -1.33237e-07 -4.36279e-15 -4.3226e-09 3.91133e-15 -6.27513e-10 -6.19404e-09 -2.33123e-14 -2.57566e-09 -1.94595e-08 -1.36173e-14 -6.09176e-09 -3.45672e-08 2.12795e-15 -1.1374e-08 -5.1494e-08 -6.74286e-17 -1.88416e-08 -7.07168e-08 -1.20497e-14 -2.94107e-08 -9.37858e-08 -1.64501e-14 -4.32057e-08 -1.22938e-07 -1.32784e-14 -5.28671e-08 -1.52692e-07 -8.70336e-15 -3.69174e-08 -1.49187e-07 -7.27769e-15 -4.12399e-08 -2.71676e-16 -7.70956e-10 -5.42308e-09 -2.40538e-14 -3.20583e-09 -1.70246e-08 -1.58822e-14 -7.64827e-09 -3.01248e-08 2.31045e-15 -1.44796e-08 -4.46626e-08 3.71065e-15 -2.44027e-08 -6.07936e-08 -8.73775e-15 -3.87995e-08 -7.93891e-08 -1.46837e-14 -5.94207e-08 -1.02317e-07 -1.204e-14 -8.31985e-08 -1.28914e-07 -9.25687e-15 -8.51257e-08 -1.4726e-07 -1.12187e-14 -1.26365e-07 -1.48482e-14 -8.12819e-10 -4.61026e-09 -2.34138e-14 -3.40211e-09 -1.44353e-08 -1.77023e-14 -8.16008e-09 -2.53668e-08 4.95285e-16 -1.55996e-08 -3.72231e-08 5.70932e-15 -2.66253e-08 -4.97678e-08 -9.0806e-15 -4.32269e-08 -6.27874e-08 -1.51169e-14 -6.93563e-08 -7.6188e-08 -1.39513e-14 -1.0843e-07 -8.98402e-08 -8.57489e-15 -1.56687e-07 -9.90033e-08 -2.14337e-14 -1.99577e-07 -8.34752e-08 8.99981e-15 -1.5555e-07 -4.40259e-08 -1.08547e-15 -1.20917e-07 -3.46345e-08 -7.90517e-15 -9.74185e-08 -2.34978e-08 -4.78691e-15 -7.93696e-08 -1.8049e-08 -4.62809e-15 -6.53146e-08 -1.40549e-08 -3.59427e-15 -5.3871e-08 -1.14435e-08 -3.32213e-15 -9.50847e-09 -3.57336e-15 -7.37279e-10 -3.87298e-09 -2.22393e-14 -3.06512e-09 -1.21075e-08 -1.92172e-14 -7.24744e-09 -2.11845e-08 6.42862e-16 -1.3549e-08 -3.09216e-08 8.80057e-15 -2.22576e-08 -4.10591e-08 -3.88598e-15 -3.38829e-08 -5.1162e-08 -1.1336e-14 -4.95939e-08 -6.04771e-08 -1.50776e-14 -7.09058e-08 -6.8528e-08 -1.17571e-14 -9.6864e-08 -7.30453e-08 -2.51723e-14 -1.13941e-07 -6.63974e-08 1.40674e-15 -1.07191e-07 -5.07758e-08 -1.32849e-14 -1.00207e-07 -4.1619e-08 -8.59857e-15 -9.01134e-08 -3.35915e-08 -6.92319e-15 -8.00425e-08 -2.812e-08 -7.34348e-15 -7.0448e-08 -2.36493e-08 -6.35648e-15 -6.15746e-08 -2.03169e-08 -6.1674e-15 -1.76453e-08 -6.39726e-15 -6.48054e-10 -3.22493e-09 -1.99939e-14 -2.69158e-09 -1.00639e-08 -2.09024e-14 -6.34335e-09 -1.75327e-08 -1.15864e-15 -1.18119e-08 -2.54531e-08 8.93826e-15 -1.92995e-08 -3.35715e-08 -6.44529e-15 -2.88859e-08 -4.15755e-08 -9.22025e-15 -4.04852e-08 -4.8878e-08 -5.29302e-15 -5.44222e-08 -5.45908e-08 -9.36207e-15 -7.03007e-08 -5.7167e-08 -2.97857e-15 -8.18419e-08 -5.4856e-08 -9.9317e-15 -8.31735e-08 -4.9444e-08 -7.69782e-15 -8.0529e-08 -4.4264e-08 -6.36934e-15 -7.5412e-08 -3.87083e-08 -6.56883e-15 -6.94317e-08 -3.41004e-08 -6.63392e-15 -6.30266e-08 -3.00544e-08 -6.8734e-15 -5.6617e-08 -2.67264e-08 -6.745e-15 -2.39211e-08 -7.08755e-15 -5.35871e-10 -2.68906e-09 -1.74109e-14 -2.21483e-09 -8.38497e-09 -2.18591e-14 -5.17665e-09 -1.45709e-08 -5.82952e-15 -9.5318e-09 -2.1098e-08 9.42729e-15 -1.53833e-08 -2.77199e-08 2.26147e-16 -2.28238e-08 -3.41349e-08 -4.8776e-15 -3.17223e-08 -3.99797e-08 -6.63702e-15 -4.14833e-08 -4.48296e-08 -1.36301e-14 -5.08242e-08 -4.78263e-08 -1.1248e-14 -5.76928e-08 -4.79872e-08 -1.35464e-14 -6.11655e-08 -4.59712e-08 -6.98086e-15 -6.21768e-08 -4.3253e-08 -8.21616e-15 -6.08369e-08 -4.00481e-08 -6.00482e-15 -5.8054e-08 -3.68833e-08 -6.5378e-15 -5.42748e-08 -3.38336e-08 -6.46661e-15 -4.99418e-08 -3.10593e-08 -6.6252e-15 -2.85557e-08 -7.14417e-15 -4.2853e-10 -2.26053e-09 -1.47452e-14 -1.76655e-09 -7.04695e-09 -2.23997e-14 -4.11132e-09 -1.22261e-08 -1.07902e-14 -7.52157e-09 -1.76877e-08 1.07191e-14 -1.19966e-08 -2.32449e-08 -1.30592e-15 -1.74758e-08 -2.86557e-08 -2.71578e-15 -2.38404e-08 -3.36152e-08 -5.88521e-15 -3.08982e-08 -3.77717e-08 -1.25617e-14 -3.80016e-08 -4.0723e-08 -9.03042e-15 -4.38111e-08 -4.21775e-08 -1.05756e-14 -4.74931e-08 -4.22891e-08 -8.49485e-15 -4.9303e-08 -4.14434e-08 -8.56266e-15 -4.945e-08 -3.99009e-08 -6.47439e-15 -4.83184e-08 -3.80149e-08 -6.98356e-15 -4.61961e-08 -3.59559e-08 -6.129e-15 -4.3371e-08 -3.38844e-08 -6.63534e-15 -3.18714e-08 -7.05205e-15 -3.42443e-10 -1.91808e-09 -1.21921e-14 -1.40787e-09 -5.98152e-09 -2.18295e-14 -3.26203e-09 -1.0372e-08 -1.43552e-14 -5.94295e-09 -1.50068e-08 7.67212e-15 -9.44442e-09 -1.97433e-08 1.21956e-16 -1.37018e-08 -2.43983e-08 -4.52722e-16 -1.85465e-08 -2.87705e-08 -3.02861e-15 -2.36864e-08 -3.26317e-08 -9.5505e-15 -2.87026e-08 -3.57068e-08 -6.21113e-15 -3.30946e-08 -3.77855e-08 -8.8376e-15 -3.64919e-08 -3.88917e-08 -8.30014e-15 -3.87394e-08 -3.91962e-08 -8.3054e-15 -3.97908e-08 -3.88494e-08 -6.84159e-15 -3.97721e-08 -3.80337e-08 -7.33016e-15 -3.88326e-08 -3.68953e-08 -6.55737e-15 -3.71556e-08 -3.55614e-08 -6.99571e-15 -3.41225e-08 -6.95427e-15 -2.65537e-10 -1.65255e-09 -9.50623e-15 -1.09003e-09 -5.15702e-09 -2.06298e-14 -2.51865e-09 -8.94336e-09 -1.74365e-14 -4.57464e-09 -1.29508e-08 3.49689e-15 -7.24201e-09 -1.7076e-08 7.12708e-15 -1.04648e-08 -2.11755e-08 -4.33152e-15 -1.41389e-08 -2.50965e-08 -4.8864e-15 -1.80971e-08 -2.86734e-08 -5.55022e-15 -2.20648e-08 -3.17392e-08 -7.61783e-15 -2.56808e-08 -3.41695e-08 -9.00117e-15 -2.86592e-08 -3.59133e-08 -7.98966e-15 -3.08566e-08 -3.69989e-08 -8.48834e-15 -3.22078e-08 -3.7498e-08 -6.7311e-15 -3.27343e-08 -3.75073e-08 -6.9853e-15 -3.24982e-08 -3.71314e-08 -6.45003e-15 -3.15957e-08 -3.64639e-08 -7.06514e-15 -3.55868e-08 -6.86172e-15 -2.09492e-10 -1.44305e-09 -7.22679e-15 -8.58826e-10 -4.50769e-09 -1.70991e-14 -1.97917e-09 -7.82302e-09 -1.77909e-14 -3.58615e-09 -1.13438e-08 -1.75986e-15 -5.6654e-09 -1.49967e-08 8.16766e-15 -8.16774e-09 -1.86731e-08 -2.32241e-15 -1.1003e-08 -2.22613e-08 -4.37337e-15 -1.40383e-08 -2.5638e-08 -5.34109e-15 -1.71013e-08 -2.86762e-08 -6.13108e-15 -1.99957e-08 -3.12751e-08 -7.34388e-15 -2.2537e-08 -3.33719e-08 -6.49541e-15 -2.45812e-08 -3.49549e-08 -7.28534e-15 -2.60342e-08 -3.6045e-08 -6.09801e-15 -2.68611e-08 -3.66805e-08 -6.08551e-15 -2.7069e-08 -3.69235e-08 -6.21872e-15 -2.66997e-08 -3.68331e-08 -6.84624e-15 -3.64722e-08 -6.73278e-15 -1.62377e-10 -1.28068e-09 -5.42183e-15 -6.65326e-10 -4.00473e-09 -1.35169e-14 -1.53155e-09 -6.95679e-09 -1.81696e-14 -2.77327e-09 -1.01021e-08 -3.50998e-15 -4.38154e-09 -1.33884e-08 7.00915e-15 -6.32225e-09 -1.67324e-08 -2.72369e-16 -8.5347e-09 -2.00489e-08 -3.9714e-15 -1.09291e-08 -2.32436e-08 -4.59777e-15 -1.33841e-08 -2.62212e-08 -4.12232e-15 -1.5757e-08 -2.89021e-08 -7.09227e-15 -1.79104e-08 -3.12185e-08 -6.57927e-15 -1.97305e-08 -3.31348e-08 -6.90207e-15 -2.11327e-08 -3.46428e-08 -6.70544e-15 -2.2067e-08 -3.57461e-08 -6.13754e-15 -2.25143e-08 -3.64762e-08 -6.67387e-15 -2.2483e-08 -3.68644e-08 -6.76279e-15 -3.69535e-08 -6.72968e-15 -1.28031e-10 -1.15264e-09 -4.43112e-15 -5.24262e-10 -3.6085e-09 -1.08379e-14 -1.2051e-09 -6.27595e-09 -1.70483e-14 -2.17929e-09 -9.12792e-09 -5.5986e-15 -3.44052e-09 -1.21272e-08 5.14003e-15 -4.96307e-09 -1.52099e-08 -7.74668e-16 -6.70172e-09 -1.83103e-08 -4.11005e-15 -8.59157e-09 -2.13537e-08 -4.5979e-15 -1.05499e-08 -2.42629e-08 -3.25782e-15 -1.24818e-08 -2.69702e-08 -6.41485e-15 -1.42887e-08 -2.94116e-08 -5.77224e-15 -1.58793e-08 -3.15444e-08 -5.97306e-15 -1.71772e-08 -3.33448e-08 -6.3202e-15 -1.81277e-08 -3.47956e-08 -5.7372e-15 -1.86984e-08 -3.59055e-08 -6.33144e-15 -1.88786e-08 -3.66842e-08 -6.54372e-15 -3.71561e-08 -6.66248e-15 -1.00256e-10 -1.05239e-09 -3.63507e-15 -4.10488e-10 -3.29827e-09 -8.66583e-15 -9.4334e-10 -5.74309e-09 -1.53131e-14 -1.70618e-09 -8.36508e-09 -6.42709e-15 -2.6962e-09 -1.11371e-08 5.35008e-15 -3.89627e-09 -1.40098e-08 -9.42437e-16 -5.27498e-09 -1.69316e-08 -4.14776e-15 -6.7862e-09 -1.98425e-08 -4.3341e-15 -8.36998e-09 -2.26791e-08 -4.69823e-15 -9.95621e-09 -2.5384e-08 -5.24406e-15 -1.14707e-08 -2.78971e-08 -5.86544e-15 -1.28419e-08 -3.01732e-08 -5.87411e-15 -1.40065e-08 -3.21802e-08 -5.79916e-15 -1.49135e-08 -3.38886e-08 -5.92058e-15 -1.55271e-08 -3.52919e-08 -5.96366e-15 -1.5827e-08 -3.63842e-08 -6.67064e-15 -1.58081e-08 -3.71749e-08 -5.16734e-15 -1.54782e-08 -3.76783e-08 -5.09172e-15 -3.79128e-08 -5.51727e-15 -7.9531e-11 -9.72857e-10 -3.10491e-15 -3.25518e-10 -3.05228e-09 -7.46377e-15 -7.47616e-10 -5.321e-09 -1.33455e-14 -1.35149e-09 -7.76121e-09 -7.78982e-15 -2.13579e-09 -1.03528e-08 4.19827e-15 -3.08853e-09 -1.3057e-08 -5.24614e-17 -4.18727e-09 -1.58328e-08 -3.44179e-15 -5.39882e-09 -1.86309e-08 -3.70416e-15 -6.68024e-09 -2.13977e-08 -3.91694e-15 -7.98088e-09 -2.40833e-08 -4.8442e-15 -9.24527e-09 -2.66327e-08 -5.62385e-15 -1.04174e-08 -2.90011e-08 -6.03076e-15 -1.14445e-08 -3.1153e-08 -6.12675e-15 -1.22813e-08 -3.30518e-08 -6.30956e-15 -1.28922e-08 -3.4681e-08 -6.28099e-15 -1.3253e-08 -3.60234e-08 -6.71063e-15 -1.33512e-08 -3.70767e-08 -5.35462e-15 -1.31853e-08 -3.78442e-08 -5.40313e-15 -3.83348e-08 -5.59815e-15 -6.30428e-11 -9.09814e-10 -2.61086e-15 -2.5801e-10 -2.85731e-09 -6.22572e-15 -5.92614e-10 -4.98639e-09 -1.14645e-14 -1.07166e-09 -7.28217e-09 -8.25343e-15 -1.6952e-09 -9.72927e-09 2.63305e-15 -2.45538e-09 -1.22969e-08 7.19121e-16 -3.33651e-09 -1.49517e-08 -3.22466e-15 -4.31456e-09 -1.76529e-08 -3.89901e-15 -5.35785e-09 -2.03545e-08 -4.02781e-15 -6.42841e-09 -2.30127e-08 -4.73747e-15 -7.48385e-09 -2.55773e-08 -5.6374e-15 -8.48024e-09 -2.80048e-08 -6.66387e-15 -9.3747e-09 -3.02585e-08 -4.28188e-15 -1.01284e-08 -3.22981e-08 -4.62657e-15 -1.07086e-08 -3.41008e-08 -4.80844e-15 -1.10906e-08 -3.56414e-08 -4.77674e-15 -1.12583e-08 -3.6909e-08 -5.16519e-15 -1.12045e-08 -3.7898e-08 -5.16691e-15 -3.8609e-08 -5.61174e-15 -5.04313e-11 -8.59383e-10 -2.2138e-15 -2.06338e-10 -2.7014e-09 -5.20188e-15 -4.73843e-10 -4.71888e-09 -9.60027e-15 -8.5683e-10 -6.89919e-09 -8.34164e-15 -1.35589e-09 -9.2302e-09 1.00662e-15 -1.96575e-09 -1.1687e-08 5.88578e-16 -2.67532e-09 -1.42422e-08 -3.13278e-15 -3.46714e-09 -1.6861e-08 -3.77396e-15 -4.31795e-09 -1.95037e-08 -3.85963e-15 -5.19937e-09 -2.21313e-08 -4.33988e-15 -6.07903e-09 -2.46976e-08 -5.17745e-15 -6.9224e-09 -2.71615e-08 -6.46935e-15 -7.69468e-09 -2.94862e-08 -4.46613e-15 -8.36304e-09 -3.16298e-08 -5.08728e-15 -8.8984e-09 -3.35654e-08 -5.2678e-15 -9.27706e-09 -3.52627e-08 -5.11454e-15 -9.48179e-09 -3.67043e-08 -5.35788e-15 -9.50231e-09 -3.78774e-08 -5.23708e-15 -3.87761e-08 -5.69711e-15 -4.04143e-11 -8.18969e-10 -1.83154e-15 -1.65327e-10 -2.57649e-09 -4.31109e-15 -3.79723e-10 -4.50449e-09 -8.04315e-15 -6.86894e-10 -6.59202e-09 -7.24507e-15 -1.08785e-09 -8.82924e-09 8.55371e-16 -1.57918e-09 -1.11957e-08 2.70992e-16 -2.15313e-09 -1.36682e-08 -3.07165e-15 -2.79693e-09 -1.62172e-08 -4.0492e-15 -3.49324e-09 -1.88074e-08 -3.89435e-15 -4.22051e-09 -2.1404e-08 -4.33645e-15 -4.95373e-09 -2.39644e-08 -5.05857e-15 -5.66571e-09 -2.64495e-08 -6.40927e-15 -6.32833e-09 -2.88235e-08 -4.55108e-15 -6.9142e-09 -3.10439e-08 -5.24349e-15 -7.39813e-09 -3.30815e-08 -5.40995e-15 -7.75845e-09 -3.49024e-08 -5.23813e-15 -7.97814e-09 -3.64846e-08 -5.40912e-15 -8.04553e-09 -3.78101e-08 -5.23043e-15 -3.88672e-08 -5.56342e-15 -3.25938e-11 -7.86375e-10 -1.53037e-15 -1.33301e-10 -2.47578e-09 -3.53108e-15 -3.0616e-10 -4.33163e-09 -6.58669e-15 -5.53896e-10 -6.34429e-09 -6.92439e-15 -8.77619e-10 -8.50551e-09 -1.51111e-16 -1.27512e-09 -1.07982e-08 -9.65294e-17 -1.74093e-09 -1.32024e-08 -3.13794e-15 -2.26571e-09 -1.56924e-08 -3.84699e-15 -2.83654e-09 -1.82365e-08 -3.92042e-15 -3.43703e-09 -2.08035e-08 -4.76719e-15 -4.04786e-09 -2.33535e-08 -5.50271e-15 -4.64753e-09 -2.58499e-08 -6.73922e-15 -5.21334e-09 -2.82577e-08 -4.7188e-15 -5.72259e-09 -3.05347e-08 -5.32769e-15 -6.15372e-09 -3.26503e-08 -5.49699e-15 -6.48743e-09 -3.45687e-08 -5.3421e-15 -6.70771e-09 -3.62643e-08 -5.47356e-15 -6.80256e-09 -3.77152e-08 -5.21438e-15 -3.89054e-08 -5.49968e-15 -2.63477e-11 -7.60027e-10 -1.27138e-15 -1.07733e-10 -2.3944e-09 -2.86799e-15 -2.47473e-10 -4.19188e-09 -5.39267e-15 -4.47867e-10 -6.1439e-09 -6.13616e-15 -7.10064e-10 -8.24332e-09 -7.86434e-16 -1.0327e-09 -1.04755e-08 -3.46999e-16 -1.41193e-09 -1.28232e-08 -3.18497e-15 -1.84092e-09 -1.52635e-08 -4.48161e-15 -2.30995e-09 -1.77675e-08 -3.01564e-15 -2.80646e-09 -2.0307e-08 -3.75037e-15 -3.31539e-09 -2.28446e-08 -4.14291e-15 -3.81973e-09 -2.53456e-08 -4.75471e-15 -4.30116e-09 -2.77763e-08 -5.26919e-15 -4.74095e-09 -3.00949e-08 -5.50915e-15 -5.12084e-09 -3.22704e-08 -5.60737e-15 -5.42397e-09 -3.42656e-08 -5.44049e-15 -5.63575e-09 -3.60525e-08 -5.56681e-15 -5.74454e-09 -3.76064e-08 -5.21959e-15 -3.89077e-08 -5.45399e-15 -2.13892e-11 -7.38638e-10 -1.05729e-15 -8.74351e-11 -2.32835e-09 -2.39402e-15 -2.00852e-10 -4.07847e-09 -4.25456e-15 -3.63564e-10 -5.9812e-09 -5.40241e-15 -5.76658e-10 -8.03022e-09 -1.22745e-15 -8.39308e-10 -1.02129e-08 -6.55871e-16 -1.14884e-09 -1.25137e-08 -3.07633e-15 -1.50021e-09 -1.49121e-08 -4.31682e-15 -1.88612e-09 -1.73816e-08 -3.14147e-15 -2.29694e-09 -1.98961e-08 -4.31992e-15 -2.72089e-09 -2.24206e-08 -4.65155e-15 -3.14445e-09 -2.4922e-08 -5.12182e-15 -3.55287e-09 -2.73678e-08 -5.50695e-15 -3.93071e-09 -2.9717e-08 -5.53994e-15 -4.26264e-09 -3.19385e-08 -5.62981e-15 -4.53407e-09 -3.39941e-08 -5.49738e-15 -4.73199e-09 -3.58546e-08 -5.65351e-15 -4.8455e-09 -3.74929e-08 -5.2796e-15 -3.88869e-08 -5.41936e-15 -1.73968e-11 -7.21241e-10 -9.15924e-16 -7.10972e-11 -2.27465e-09 -2.00044e-15 -1.63339e-10 -3.98622e-09 -3.46441e-15 -2.95743e-10 -5.8488e-09 -4.41552e-15 -4.69321e-10 -7.85665e-09 -1.51301e-15 -6.83617e-10 -9.99859e-09 -1.09483e-15 -9.36782e-10 -1.22605e-08 -3.06839e-15 -1.22512e-09 -1.46238e-08 -4.6018e-15 -1.54311e-09 -1.70636e-08 -3.53171e-15 -1.8833e-09 -1.95559e-08 -4.54467e-15 -2.23646e-09 -2.20675e-08 -4.82811e-15 -2.59183e-09 -2.45666e-08 -5.19046e-15 -2.93748e-09 -2.70222e-08 -5.77655e-15 -3.26075e-09 -2.93938e-08 -5.7072e-15 -3.54881e-09 -3.16504e-08 -5.75974e-15 -3.78917e-09 -3.37538e-08 -5.6158e-15 -3.9704e-09 -3.56733e-08 -5.71709e-15 -4.08254e-09 -3.73808e-08 -5.36976e-15 -3.88518e-08 -5.47548e-15 -1.41864e-11 -7.07054e-10 -7.80392e-16 -5.79628e-11 -2.23087e-09 -1.65948e-15 -1.3317e-10 -3.91101e-09 -2.76911e-15 -2.41162e-10 -5.74081e-09 -3.9107e-15 -3.82848e-10 -7.71496e-09 -1.81796e-15 -5.58015e-10 -9.82342e-09 -1.29033e-15 -7.65406e-10 -1.20531e-08 -2.90812e-15 -1.00231e-09 -1.43869e-08 -4.39344e-15 -1.26455e-09 -1.68014e-08 -3.47633e-15 -1.54636e-09 -1.92741e-08 -4.52142e-15 -1.84047e-09 -2.17734e-08 -4.811e-15 -2.13829e-09 -2.42688e-08 -5.19457e-15 -2.43019e-09 -2.67303e-08 -5.8913e-15 -2.70578e-09 -2.91182e-08 -5.83061e-15 -2.95436e-09 -3.14019e-08 -5.80738e-15 -3.16533e-09 -3.35428e-08 -5.62537e-15 -3.32873e-09 -3.55099e-08 -5.72423e-15 -3.43565e-09 -3.72739e-08 -5.42204e-15 -3.88087e-08 -5.51116e-15 -1.15802e-11 -6.95474e-10 -6.61574e-16 -4.73032e-11 -2.19515e-09 -1.39422e-15 -1.08684e-10 -3.84963e-09 -2.27822e-15 -1.96866e-10 -5.65263e-09 -3.33039e-15 -3.12656e-10 -7.59917e-09 -1.85441e-15 -4.56006e-10 -9.68006e-09 -1.42992e-15 -6.26091e-10 -1.1883e-08 -2.95907e-15 -8.2093e-10 -1.4192e-08 -4.34503e-15 -1.03734e-09 -1.6585e-08 -3.66927e-15 -1.27084e-09 -1.90406e-08 -4.75788e-15 -1.51569e-09 -2.15285e-08 -5.04225e-15 -1.76502e-09 -2.40195e-08 -5.40211e-15 -2.01103e-09 -2.64843e-08 -6.06528e-15 -2.24523e-09 -2.8884e-08 -6.04621e-15 -2.45871e-09 -3.11884e-08 -5.98562e-15 -2.64254e-09 -3.3359e-08 -5.76309e-15 -2.78809e-09 -3.53644e-08 -5.80561e-15 -2.8875e-09 -3.71744e-08 -5.51763e-15 -3.87623e-08 -5.59078e-15 -9.46215e-12 -6.86012e-10 -5.3828e-16 -3.86409e-11 -2.16597e-09 -1.10233e-15 -8.87854e-11 -3.79948e-09 -1.9937e-15 -1.60852e-10 -5.58057e-09 -2.76599e-15 -2.55555e-10 -7.50447e-09 -1.93517e-15 -3.72952e-10 -9.56266e-09 -1.64465e-15 -5.12529e-10 -1.17434e-08 -2.96975e-15 -6.72838e-10 -1.40317e-08 -4.20455e-15 -8.51454e-10 -1.64063e-08 -3.5638e-15 -1.04488e-09 -1.88472e-08 -4.71267e-15 -1.24857e-09 -2.13248e-08 -4.95086e-15 -1.45703e-09 -2.38111e-08 -5.34065e-15 -1.66394e-09 -2.62774e-08 -5.88697e-15 -1.86236e-09 -2.86856e-08 -5.95616e-15 -2.04492e-09 -3.10058e-08 -5.98411e-15 -2.20407e-09 -3.31998e-08 -5.80536e-15 -2.33246e-09 -3.5236e-08 -5.85181e-15 -2.42317e-09 -3.70837e-08 -5.56003e-15 -3.87154e-08 -5.60647e-15 -7.73058e-12 -6.78281e-10 -4.18635e-16 -3.15617e-11 -2.14214e-09 -9.37907e-16 -7.25225e-11 -3.75852e-09 -1.67027e-15 -1.31417e-10 -5.52167e-09 -2.69811e-15 -2.08867e-10 -7.42703e-09 -2.02254e-15 -3.05013e-10 -9.46651e-09 -1.72726e-15 -4.19561e-10 -1.16289e-08 -2.94613e-15 -5.51458e-10 -1.38998e-08 -4.29557e-15 -6.98842e-10 -1.62589e-08 -3.5416e-15 -8.58979e-10 -1.86871e-08 -4.86886e-15 -1.02826e-09 -2.11556e-08 -4.97819e-15 -1.20227e-09 -2.3637e-08 -5.26222e-15 -1.37592e-09 -2.61037e-08 -5.73395e-15 -1.54352e-09 -2.8518e-08 -5.83725e-15 -1.69899e-09 -3.08504e-08 -5.9496e-15 -1.836e-09 -3.30628e-08 -5.86591e-15 -1.9483e-09 -3.51237e-08 -5.91791e-15 -2.02986e-09 -3.70022e-08 -5.61376e-15 -3.86701e-08 -5.68266e-15 -6.31307e-12 -6.71968e-10 -3.37467e-16 -2.57683e-11 -2.12269e-09 -8.16111e-16 -5.92111e-11 -3.72508e-09 -1.59773e-15 -1.07312e-10 -5.47357e-09 -2.39952e-15 -1.70618e-10 -7.36373e-09 -2.09354e-15 -2.49318e-10 -9.3878e-09 -1.87605e-15 -3.43274e-10 -1.15349e-08 -2.97243e-15 -4.51721e-10 -1.37914e-08 -4.07652e-15 -5.73224e-10 -1.61374e-08 -3.21164e-15 -7.05641e-10 -1.85547e-08 -4.70128e-15 -8.46102e-10 -2.10151e-08 -4.79798e-15 -9.9107e-10 -2.34921e-08 -4.97287e-15 -1.13642e-09 -2.59584e-08 -5.39658e-15 -1.27753e-09 -2.83768e-08 -5.6262e-15 -1.40939e-09 -3.07185e-08 -5.80271e-15 -1.52671e-09 -3.29455e-08 -5.81811e-15 -1.62419e-09 -3.50262e-08 -5.93508e-15 -1.69664e-09 -3.69297e-08 -5.59269e-15 -3.86275e-08 -5.64578e-15 -5.14686e-12 -6.66822e-10 -2.9522e-16 -2.10036e-11 -2.10683e-09 -7.74075e-16 -4.82647e-11 -3.69781e-09 -1.40524e-15 -8.74915e-11 -5.43435e-09 -2.27822e-15 -1.39162e-10 -7.31206e-09 -2.07481e-15 -2.03497e-10 -9.32346e-09 -2.14637e-15 -2.80467e-10 -1.1458e-08 -3.0674e-15 -3.69515e-10 -1.37023e-08 -4.02644e-15 -4.6953e-10 -1.60374e-08 -3.35478e-15 -5.78823e-10 -1.84454e-08 -4.74113e-15 -6.95116e-10 -2.08988e-08 -4.79286e-15 -8.15579e-10 -2.33716e-08 -5.04236e-15 -9.36876e-10 -2.58371e-08 -5.25109e-15 -1.05526e-09 -2.82585e-08 -5.6781e-15 -1.16661e-09 -3.06071e-08 -5.75468e-15 -1.26653e-09 -3.28455e-08 -5.80095e-15 -1.35054e-09 -3.49422e-08 -5.94703e-15 -1.4142e-09 -3.68661e-08 -5.62287e-15 -3.85884e-08 -5.69166e-15 -4.18593e-12 -6.62636e-10 -2.64657e-16 -1.70782e-11 -2.09394e-09 -7.06242e-16 -3.92488e-11 -3.67564e-09 -1.38623e-15 -7.11627e-11 -5.40244e-09 -1.94439e-15 -1.13238e-10 -7.27e-09 -1.92111e-15 -1.65722e-10 -9.27097e-09 -2.3745e-15 -2.2865e-10 -1.1395e-08 -3.15238e-15 -3.01612e-10 -1.36294e-08 -3.80372e-15 -3.8374e-10 -1.59553e-08 -3.23822e-15 -4.73705e-10 -1.83554e-08 -4.69488e-15 -5.697e-10 -2.08028e-08 -4.7858e-15 -6.69464e-10 -2.32718e-08 -4.83391e-15 -7.70315e-10 -2.57362e-08 -5.03875e-15 -8.69217e-10 -2.81596e-08 -5.5113e-15 -9.62788e-10 -3.05136e-08 -5.64768e-15 -1.04739e-09 -3.27609e-08 -5.67852e-15 -1.11928e-09 -3.48703e-08 -5.86701e-15 -1.17466e-09 -3.68107e-08 -5.57577e-15 -3.85532e-08 -5.65806e-15 -3.39223e-12 -6.59244e-10 -2.47531e-16 -1.38371e-11 -2.08349e-09 -6.94591e-16 -3.18033e-11 -3.65767e-09 -1.1986e-15 -5.76751e-11 -5.37657e-09 -1.94559e-15 -9.18219e-11 -7.23586e-09 -2.19947e-15 -1.34509e-10 -9.22827e-09 -2.56699e-15 -1.85801e-10 -1.13437e-08 -3.11414e-15 -2.45392e-10 -1.35698e-08 -3.50939e-15 -3.12603e-10 -1.58881e-08 -3.64642e-15 -3.86384e-10 -1.82816e-08 -4.18998e-15 -4.65307e-10 -2.07239e-08 -4.59895e-15 -5.47579e-10 -2.31896e-08 -4.74419e-15 -6.31049e-10 -2.56528e-08 -4.99798e-15 -7.13259e-10 -2.80774e-08 -5.43467e-15 -7.91452e-10 -3.04354e-08 -5.62913e-15 -8.62628e-10 -3.26898e-08 -5.66671e-15 -9.23663e-10 -3.48093e-08 -5.83006e-15 -9.71356e-10 -3.6763e-08 -5.58069e-15 -3.8522e-08 -5.728e-15 -2.7363e-12 -6.56507e-10 -2.35654e-16 -1.11594e-11 -2.07507e-09 -6.71429e-16 -2.56499e-11 -3.64318e-09 -1.22497e-15 -4.65221e-11 -5.3557e-09 -1.69156e-15 -7.41133e-11 -7.20828e-09 -2.02022e-15 -1.0869e-10 -9.19369e-09 -2.69166e-15 -1.50325e-10 -1.13021e-08 -3.13195e-15 -1.98778e-10 -1.35213e-08 -3.34179e-15 -2.53518e-10 -1.58333e-08 -3.70165e-15 -3.13722e-10 -1.82214e-08 -4.08813e-15 -3.78272e-10 -2.06593e-08 -4.52716e-15 -4.45751e-10 -2.31221e-08 -4.74329e-15 -5.14444e-10 -2.55841e-08 -5.06218e-15 -5.82364e-10 -2.80094e-08 -5.37433e-15 -6.47271e-10 -3.03705e-08 -5.58817e-15 -7.06705e-10 -3.26303e-08 -5.65617e-15 -7.58071e-10 -3.47579e-08 -5.77631e-15 -7.98685e-10 -3.67224e-08 -5.56472e-15 -3.84948e-08 -5.69163e-15 -2.19331e-12 -6.54314e-10 -2.264e-16 -8.94309e-12 -2.06832e-09 -6.66382e-16 -2.05566e-11 -3.63157e-09 -1.14543e-15 -3.72949e-11 -5.33896e-09 -1.65047e-15 -5.94667e-11 -7.18611e-09 -1.98222e-15 -8.73213e-11 -9.16583e-09 -2.72592e-15 -1.20921e-10 -1.12685e-08 -3.16935e-15 -1.60074e-10 -1.34821e-08 -3.49744e-15 -2.04371e-10 -1.5789e-08 -3.66299e-15 -2.53178e-10 -1.81726e-08 -4.09058e-15 -3.05622e-10 -2.06069e-08 -4.59176e-15 -3.60592e-10 -2.30671e-08 -4.85998e-15 -4.16728e-10 -2.55279e-08 -5.02641e-15 -4.72426e-10 -2.79537e-08 -5.29317e-15 -5.25873e-10 -3.0317e-08 -5.49419e-15 -5.75059e-10 -3.25811e-08 -5.54128e-15 -6.17843e-10 -3.47152e-08 -5.76975e-15 -6.51986e-10 -3.66882e-08 -5.57662e-15 -3.84716e-08 -5.68096e-15 -1.74358e-12 -6.5257e-10 -2.17998e-16 -7.10739e-12 -2.06296e-09 -6.26027e-16 -1.63376e-11 -3.62234e-09 -1.13703e-15 -2.96566e-11 -5.32564e-09 -1.71854e-15 -4.73466e-11 -7.16842e-09 -2.00181e-15 -6.96228e-11 -9.14355e-09 -2.64241e-15 -9.65276e-11 -1.12416e-08 -3.07766e-15 -1.27909e-10 -1.34508e-08 -3.4165e-15 -1.63458e-10 -1.57535e-08 -3.59466e-15 -2.02697e-10 -1.81334e-08 -4.09782e-15 -2.44952e-10 -2.05646e-08 -4.54528e-15 -2.89356e-10 -2.30227e-08 -4.94098e-15 -3.34835e-10 -2.54824e-08 -5.10564e-15 -3.80096e-10 -2.79085e-08 -5.30647e-15 -4.23677e-10 -3.02735e-08 -5.481e-15 -4.63944e-10 -3.25409e-08 -5.53517e-15 -4.99138e-10 -3.468e-08 -5.72714e-15 -5.27399e-10 -3.666e-08 -5.56393e-15 -3.84522e-08 -5.64798e-15 -1.37184e-12 -6.51199e-10 -2.1302e-16 -5.58988e-12 -2.05874e-09 -6.28719e-16 -1.28507e-11 -3.61508e-09 -1.11771e-15 -2.33464e-11 -5.31514e-09 -1.55866e-15 -3.7332e-11 -7.15444e-09 -1.98667e-15 -5.49739e-11 -9.12591e-09 -2.6134e-15 -7.62937e-11 -1.12203e-08 -3.13448e-15 -1.01178e-10 -1.34259e-08 -3.53194e-15 -1.29408e-10 -1.57252e-08 -3.6563e-15 -1.60627e-10 -1.81021e-08 -4.19797e-15 -1.94322e-10 -2.05309e-08 -4.60512e-15 -2.29819e-10 -2.29872e-08 -5.07652e-15 -2.66273e-10 -2.5446e-08 -5.2169e-15 -3.02646e-10 -2.78721e-08 -5.32616e-15 -3.37763e-10 -3.02383e-08 -5.48343e-15 -3.70298e-10 -3.25083e-08 -5.51905e-15 -3.9881e-10 -3.46515e-08 -5.73612e-15 -4.21761e-10 -3.6637e-08 -5.60297e-15 -3.84364e-08 -5.7247e-15 -1.0649e-12 -6.50134e-10 -2.09042e-16 -4.33839e-12 -2.05547e-09 -6.18718e-16 -9.97589e-12 -3.60944e-09 -1.1051e-15 -1.81461e-11 -5.30697e-09 -1.61646e-15 -2.90678e-11 -7.14352e-09 -2.03787e-15 -4.28546e-11 -9.11212e-09 -2.56279e-15 -5.95181e-11 -1.12036e-08 -3.0813e-15 -7.89854e-11 -1.34064e-08 -3.55514e-15 -1.0111e-10 -1.57031e-08 -3.54828e-15 -1.25632e-10 -1.80776e-08 -4.11327e-15 -1.52164e-10 -2.05044e-08 -4.50443e-15 -1.80184e-10 -2.29592e-08 -5.01363e-15 -2.09027e-10 -2.54171e-08 -5.15454e-15 -2.37866e-10 -2.78433e-08 -5.26069e-15 -2.65758e-10 -3.02104e-08 -5.41769e-15 -2.91628e-10 -3.24825e-08 -5.42974e-15 -3.14297e-10 -3.46288e-08 -5.68065e-15 -3.32493e-10 -3.66188e-08 -5.51263e-15 -3.8424e-08 -5.61005e-15 -8.13442e-13 -6.4932e-10 -2.08069e-16 -3.31254e-12 -2.05297e-09 -6.08892e-16 -7.62123e-12 -3.60513e-09 -1.11791e-15 -1.3885e-11 -5.3007e-09 -1.58712e-15 -2.22778e-11 -7.13512e-09 -2.06689e-15 -3.28642e-11 -9.10153e-09 -2.56994e-15 -4.56611e-11 -1.11908e-08 -3.10291e-15 -6.06322e-11 -1.33914e-08 -3.4199e-15 -7.76926e-11 -1.5686e-08 -3.89796e-15 -9.6651e-11 -1.80587e-08 -4.40703e-15 -1.1722e-10 -2.04838e-08 -4.80586e-15 -1.39002e-10 -2.29375e-08 -5.55808e-15 -1.61466e-10 -2.53947e-08 -5.16893e-15 -1.83962e-10 -2.78208e-08 -5.36281e-15 -2.05733e-10 -3.01887e-08 -5.49444e-15 -2.25907e-10 -3.24623e-08 -5.45742e-15 -2.43518e-10 -3.46112e-08 -5.70212e-15 -2.57511e-10 -3.66048e-08 -5.51761e-15 -3.84148e-08 -5.65895e-15 -6.06731e-13 -6.48714e-10 -2.0502e-16 -2.46966e-12 -2.05111e-09 -6.15952e-16 -5.68743e-12 -3.60191e-09 -1.09413e-15 -1.03866e-11 -5.29601e-09 -1.62745e-15 -1.66907e-11 -7.12882e-09 -2.10011e-15 -2.4635e-11 -9.09358e-09 -2.57839e-15 -3.42506e-11 -1.11812e-08 -3.11191e-15 -4.5532e-11 -1.33802e-08 -3.47621e-15 -5.84337e-11 -1.56731e-08 -3.82742e-15 -7.28191e-11 -1.80443e-08 -4.38313e-15 -8.84767e-11 -2.04681e-08 -4.76375e-15 -1.05101e-10 -2.29208e-08 -5.4059e-15 -1.22277e-10 -2.53775e-08 -5.03921e-15 -1.39489e-10 -2.78036e-08 -5.18217e-15 -1.56133e-10 -3.0172e-08 -5.40323e-15 -1.715e-10 -3.24469e-08 -5.34443e-15 -1.84793e-10 -3.45979e-08 -5.63031e-15 -1.95132e-10 -3.65945e-08 -5.42671e-15 -3.84083e-08 -5.49516e-15 -4.42362e-13 -6.48271e-10 -2.05283e-16 -1.79829e-12 -2.04975e-09 -6.17902e-16 -4.14727e-12 -3.59956e-09 -1.1125e-15 -7.58701e-12 -5.29257e-09 -1.55475e-15 -1.21896e-11 -7.12422e-09 -2.12579e-15 -1.79815e-11 -9.08779e-09 -2.65469e-15 -2.50107e-11 -1.11742e-08 -3.05171e-15 -3.32954e-11 -1.33719e-08 -3.58397e-15 -4.28167e-11 -1.56636e-08 -3.95987e-15 -5.34821e-11 -1.80336e-08 -4.49598e-15 -6.51392e-11 -2.04565e-08 -4.93734e-15 -7.75557e-11 -2.29084e-08 -5.41584e-15 -9.04069e-11 -2.53646e-08 -5.10419e-15 -1.03285e-10 -2.77907e-08 -5.13735e-15 -1.15705e-10 -3.01596e-08 -5.42215e-15 -1.27086e-10 -3.24355e-08 -5.38897e-15 -1.36764e-10 -3.45882e-08 -5.69659e-15 -1.44e-10 -3.65873e-08 -5.53462e-15 -3.84043e-08 -5.5726e-15 -3.07982e-13 -6.47963e-10 -2.045e-16 -1.25197e-12 -2.04881e-09 -6.1351e-16 -2.89706e-12 -3.59792e-09 -1.11343e-15 -5.31085e-12 -5.29015e-09 -1.60949e-15 -8.53254e-12 -7.12099e-09 -2.17568e-15 -1.26031e-11 -9.08372e-09 -2.65155e-15 -1.75842e-11 -1.11692e-08 -3.03259e-15 -2.3504e-11 -1.3366e-08 -3.6092e-15 -3.03567e-11 -1.56568e-08 -4.00093e-15 -3.80797e-11 -1.80259e-08 -4.5313e-15 -4.65613e-11 -2.0448e-08 -4.96205e-15 -5.56248e-11 -2.28994e-08 -5.33207e-15 -6.50188e-11 -2.53552e-08 -5.01963e-15 -7.44224e-11 -2.77813e-08 -5.09207e-15 -8.34433e-11 -3.01506e-08 -5.33634e-15 -9.16029e-11 -3.24274e-08 -5.39224e-15 -9.83439e-11 -3.45815e-08 -5.66877e-15 -1.03032e-10 -3.65826e-08 -5.52493e-15 -3.84024e-08 -5.53782e-15 -2.11116e-13 -6.47752e-10 -2.06424e-16 -8.56974e-13 -2.04816e-09 -6.15093e-16 -1.98365e-12 -3.59679e-09 -1.11465e-15 -3.62162e-12 -5.28852e-09 -1.63925e-15 -5.79399e-12 -7.11881e-09 -2.20542e-15 -8.55098e-12 -9.08097e-09 -2.58011e-15 -1.1957e-11 -1.11658e-08 -3.1328e-15 -1.60438e-11 -1.33619e-08 -3.69708e-15 -2.08184e-11 -1.5652e-08 -4.15785e-15 -2.62486e-11 -1.80205e-08 -4.60084e-15 -3.22592e-11 -2.0442e-08 -4.98739e-15 -3.87208e-11 -2.28929e-08 -5.32503e-15 -4.5439e-11 -2.53485e-08 -5.03653e-15 -5.21592e-11 -2.77746e-08 -5.20261e-15 -5.85546e-11 -3.01442e-08 -5.33446e-15 -6.42223e-11 -3.24217e-08 -5.45394e-15 -6.86819e-11 -3.4577e-08 -5.63198e-15 -7.13778e-11 -3.65799e-08 -5.45932e-15 -3.84021e-08 -5.529e-15 -1.29259e-13 -6.47623e-10 -2.08611e-16 -5.26765e-13 -2.04776e-09 -6.05341e-16 -1.22312e-12 -3.59609e-09 -1.14037e-15 -2.23384e-12 -5.28751e-09 -1.64394e-15 -3.59918e-12 -7.11745e-09 -2.185e-15 -5.38064e-12 -9.07919e-09 -2.65521e-15 -7.64148e-12 -1.11635e-08 -3.11815e-15 -1.04159e-11 -1.33591e-08 -3.5613e-15 -1.3717e-11 -1.56487e-08 -4.09182e-15 -1.7525e-11 -1.80167e-08 -4.29502e-15 -2.17832e-11 -2.04378e-08 -4.70247e-15 -2.63918e-11 -2.28883e-08 -5.3612e-15 -3.11889e-11 -2.53437e-08 -5.0349e-15 -3.59689e-11 -2.77698e-08 -5.27425e-15 -4.04522e-11 -3.01397e-08 -5.35713e-15 -4.4294e-11 -3.24179e-08 -5.45644e-15 -4.70739e-11 -3.45742e-08 -5.59108e-15 -4.82969e-11 -3.65786e-08 -5.42533e-15 -3.8403e-08 -5.59026e-15 -8.86531e-14 -6.47534e-10 -2.08233e-16 -3.5929e-13 -2.04749e-09 -6.34466e-16 -8.20196e-13 -3.59563e-09 -1.08005e-15 -1.48393e-12 -5.28684e-09 -1.73382e-15 -2.39278e-12 -7.11654e-09 -2.23265e-15 -3.59539e-12 -9.07799e-09 -2.63488e-15 -5.13939e-12 -1.1162e-08 -3.23074e-15 -7.05627e-12 -1.33572e-08 -3.82653e-15 -9.36208e-12 -1.56464e-08 -4.13317e-15 -1.20544e-11 -1.8014e-08 -4.39667e-15 -1.50969e-11 -2.04347e-08 -4.76179e-15 -1.84191e-11 -2.2885e-08 -5.26494e-15 -2.18947e-11 -2.53402e-08 -5.26545e-15 -2.53523e-11 -2.77663e-08 -5.37798e-15 -2.85498e-11 -3.01365e-08 -5.54457e-15 -3.11808e-11 -3.24152e-08 -5.61961e-15 -3.28637e-11 -3.45726e-08 -5.64501e-15 -3.31418e-11 -3.65784e-08 -5.54564e-15 -3.84047e-08 -5.70354e-15 -4.90685e-14 -2.06186e-16 -2.00375e-13 -6.29756e-16 -4.65106e-13 -1.14035e-15 -8.69911e-13 -1.56476e-15 -1.46087e-12 -2.10318e-15 -2.28682e-12 -2.47661e-15 -3.3987e-12 -3.1749e-15 -4.8367e-12 -3.52456e-15 -6.62781e-12 -3.84583e-15 -8.78262e-12 -4.70267e-15 -1.12717e-11 -4.93914e-15 -1.40328e-11 -5.06586e-15 -1.69574e-11 -5.16379e-15 -1.98792e-11 -5.12745e-15 -2.25698e-11 -5.42598e-15 -2.47351e-11 -5.5733e-15 -2.60067e-11 -5.61529e-15 -2.59423e-11 -5.56945e-15 -5.43097e-15 2.20759e-12 -7.56791e-09 6.74541e-11 -2.48694e-08 -1.45852e-09 -4.607e-08 -3.59189e-09 -5.27752e-08 -5.52627e-09 -6.25848e-08 -7.12714e-09 -7.52384e-08 -7.49341e-09 -8.68073e-08 -8.97922e-08 1.35298e-12 -7.56926e-09 2.05345e-11 -2.48886e-08 -1.48968e-09 -4.45598e-08 -3.37616e-09 -5.08888e-08 -5.20102e-09 -6.07599e-08 -6.49514e-09 -7.39443e-08 -6.35199e-09 -8.69505e-08 -4.48262e-09 -9.16615e-08 1.28777e-09 -7.65857e-08 1.09338e-09 -3.75319e-08 -1.88832e-10 -3.11601e-08 -2.27904e-11 -4.76575e-09 -4.57317e-12 -2.40475e-10 -5.67704e-13 -2.72122e-11 -2.69357e-12 5.29909e-13 -7.56979e-09 -2.48847e-11 -2.48632e-08 -1.49846e-09 -4.30862e-08 -3.33033e-09 -4.90569e-08 -5.20929e-09 -5.8881e-08 -6.31589e-09 -7.28376e-08 -5.96784e-09 -8.72985e-08 -4.53342e-09 -9.30958e-08 -2.28383e-10 -8.08908e-08 3.04249e-09 -4.08126e-08 2.31073e-10 -3.21039e-08 -1.84903e-11 -1.07334e-08 -3.96797e-12 -4.74929e-10 -5.39849e-13 -3.56058e-11 -3.31478e-12 -3.03903e-13 -7.5695e-09 -6.83488e-11 -2.47952e-08 -1.52717e-09 -4.16274e-08 -3.37385e-09 -4.72102e-08 -5.12375e-09 -5.7131e-08 -5.73169e-09 -7.22297e-08 -4.88148e-09 -8.81486e-08 -3.05791e-09 -9.49194e-08 6.89648e-10 -8.46384e-08 5.61559e-09 -4.57385e-08 2.05026e-09 -3.01455e-08 4.05895e-11 -1.78976e-08 -2.34486e-12 -1.44801e-09 -4.43768e-13 -5.59451e-11 -4.15532e-12 -9.84917e-13 -7.56851e-09 -1.08956e-10 -2.46872e-08 -1.55297e-09 -4.01834e-08 -3.30969e-09 -4.54535e-08 -4.53146e-09 -5.59092e-08 -4.175e-09 -7.25861e-08 -2.34612e-09 -8.99774e-08 4.642e-10 -9.77298e-08 4.34439e-09 -8.85187e-08 9.37032e-09 -5.07644e-08 4.53041e-09 -2.59172e-08 8.60982e-10 -2.26567e-08 6.12615e-12 -4.15945e-09 -2.27228e-13 -1.39164e-10 -5.79029e-12 -1.60727e-12 -7.56691e-09 -1.4448e-10 -2.45443e-08 -1.53626e-09 -3.87916e-08 -2.99653e-09 -4.39932e-08 -3.2788e-09 -5.56269e-08 -1.59694e-09 -7.4268e-08 1.44893e-09 -9.30232e-08 5.42336e-09 -1.01704e-07 9.80392e-09 -9.28992e-08 1.43739e-08 -5.53343e-08 7.79461e-09 -1.95221e-08 2.68379e-09 -2.34206e-08 1.27836e-10 -8.48789e-09 4.70099e-13 -4.59793e-10 -1.13092e-11 -1.94476e-12 -7.56496e-09 -1.70856e-10 -2.43754e-08 -1.44502e-09 -3.75174e-08 -2.37524e-09 -4.30629e-08 -1.42237e-09 -5.65798e-08 1.64438e-09 -7.73348e-08 5.81161e-09 -9.71902e-08 1.06578e-08 -1.06551e-07 1.52901e-08 -9.75315e-08 1.952e-08 -5.95642e-08 1.20529e-08 -1.20707e-08 5.21038e-09 -1.99362e-08 6.45091e-10 -1.27279e-08 7.35816e-12 -1.32297e-09 -3.12815e-11 -2.17898e-12 -7.56278e-09 -1.85549e-10 -2.41921e-08 -1.26864e-09 -3.64343e-08 -1.46644e-09 -4.28651e-08 8.07467e-10 -5.88537e-08 4.9602e-09 -8.14875e-08 9.90717e-09 -1.02137e-07 1.51141e-08 -1.11758e-07 1.9473e-08 -1.0189e-07 2.33563e-08 -6.34477e-08 1.6837e-08 -5.55127e-09 7.87319e-09 -1.25903e-08 1.7843e-09 -1.50388e-08 4.58141e-11 -2.8665e-09 -9.14532e-11 -2.12908e-12 -7.56065e-09 -1.86666e-10 -2.40075e-08 -1.00542e-09 -3.56156e-08 -3.43413e-10 -4.35271e-08 3.02111e-09 -6.22182e-08 7.75779e-09 -8.62242e-08 1.29144e-08 -1.07293e-07 1.78683e-08 -1.16712e-07 2.1515e-08 -1.05537e-07 2.47766e-08 -6.67093e-08 2.04892e-08 -1.26366e-09 1.01053e-08 -2.91456e-09 3.33491e-09 -1.47857e-08 1.74976e-10 -4.75587e-09 -2.33543e-10 -1.72517e-12 -7.55892e-09 -1.75887e-10 -2.38333e-08 -6.78052e-10 -3.51134e-08 8.33486e-10 -4.50386e-08 4.7933e-09 -6.61781e-08 9.52475e-09 -9.09557e-08 1.42522e-08 -1.12021e-07 1.8381e-08 -1.20841e-07 2.09385e-08 -1.08095e-07 2.3044e-08 -6.88151e-08 2.11034e-08 6.76535e-10 1.14179e-08 6.46668e-09 4.79774e-09 -1.26094e-08 4.4955e-10 -6.40639e-09 -4.89658e-10 -9.63931e-13 -7.55797e-09 -1.56199e-10 -2.36781e-08 -3.35544e-10 -3.49341e-08 1.83148e-09 -4.72056e-08 5.82612e-09 -7.01727e-08 1.00003e-08 -9.51299e-08 1.38326e-08 -1.15853e-07 1.67794e-08 -1.23788e-07 1.80191e-08 -1.09334e-07 1.86293e-08 -6.94254e-08 1.83155e-08 9.90382e-10 1.14723e-08 1.31709e-08 5.77884e-09 -9.75535e-09 8.47941e-10 -7.4367e-09 -8.46768e-10 1.46809e-13 -7.55811e-09 -1.30573e-10 -2.35474e-08 -2.93033e-11 -3.50354e-08 2.46817e-09 -4.9703e-08 6.02164e-09 -7.37262e-08 9.32142e-09 -9.84297e-08 1.20881e-08 -1.18619e-07 1.38032e-08 -1.25503e-07 1.37719e-08 -1.09303e-07 1.29757e-08 -6.86292e-08 1.35808e-08 3.85348e-10 1.04015e-08 1.62814e-08 6.167e-09 -7.31488e-09 1.27479e-09 -7.83429e-09 -1.24695e-09 1.32452e-12 -7.55944e-09 -1.02027e-10 -2.3444e-08 2.12725e-10 -3.53501e-08 2.70214e-09 -5.21924e-08 5.54131e-09 -7.65655e-08 7.93139e-09 -1.0082e-07 9.73312e-09 -1.20421e-07 1.04433e-08 -1.26213e-07 9.48031e-09 -1.0834e-07 7.71093e-09 -6.68598e-08 8.81282e-09 -7.16498e-10 8.80866e-09 1.62474e-08 6.10026e-09 -5.77578e-09 1.63911e-09 -7.79756e-09 -1.62099e-09 2.60926e-12 -7.56205e-09 -7.25424e-11 -2.33689e-08 3.88507e-10 -3.58112e-08 2.61476e-09 -5.44186e-08 4.70757e-09 -7.86583e-08 6.34505e-09 -1.02457e-07 7.43408e-09 -1.2151e-07 7.51466e-09 -1.26294e-07 6.11357e-09 -1.06939e-07 3.95614e-09 -6.47024e-08 5.41889e-09 -2.17933e-09 7.37522e-09 1.42667e-08 5.81322e-09 -5.02622e-09 1.90296e-09 -7.52256e-09 -1.91539e-09 3.67222e-12 -7.56572e-09 -4.40125e-11 -2.33212e-08 5.08993e-10 -3.63642e-08 2.34826e-09 -5.62579e-08 3.82406e-09 -8.0134e-08 4.93208e-09 -1.03565e-07 5.595e-09 -1.22173e-07 5.42373e-09 -1.26123e-07 4.05562e-09 -1.05571e-07 2.10196e-09 -6.27486e-08 3.77566e-09 -3.85318e-09 6.42887e-09 1.15954e-08 5.47977e-09 -4.68809e-09 2.06674e-09 -7.11885e-09 -2.0998e-09 4.60914e-12 -7.57033e-09 -1.77998e-11 -2.32988e-08 5.88783e-10 -3.69708e-08 2.03133e-09 -5.77004e-08 3.07302e-09 -8.11758e-08 3.85011e-09 -1.04343e-07 4.31907e-09 -1.22642e-07 4.16244e-09 -1.25966e-07 3.10649e-09 -1.04515e-07 1.70365e-09 -6.13458e-08 3.48258e-09 -5.6322e-09 5.9169e-09 9.14578e-09 5.16475e-09 -4.4296e-09 2.14014e-09 -6.63075e-09 -2.16592e-09 5.37179e-12 -7.57571e-09 4.05816e-12 -2.32974e-08 6.37231e-10 -3.7604e-08 1.73904e-09 -5.88021e-08 2.50568e-09 -8.19425e-08 3.09107e-09 -1.04928e-07 3.50825e-09 -1.23059e-07 3.48769e-09 -1.25946e-07 2.80331e-09 -1.03831e-07 1.9853e-09 -6.05277e-08 3.7501e-09 -7.39703e-09 5.60149e-09 7.28031e-09 4.85448e-09 -4.10186e-09 2.12863e-09 -6.08058e-09 -2.12144e-09 6.04533e-12 -7.58175e-09 1.9356e-11 -2.33107e-08 6.5504e-10 -3.82397e-08 1.49393e-09 -5.9641e-08 2.09303e-09 -8.25416e-08 2.57017e-09 -1.05405e-07 2.99679e-09 -1.23486e-07 3.12325e-09 -1.26072e-07 2.72854e-09 -1.03436e-07 2.30575e-09 -6.01049e-08 3.94427e-09 -9.03542e-09 5.27225e-09 5.93888e-09 4.51156e-09 -3.70603e-09 2.03439e-09 -5.47547e-09 -1.96546e-09 6.60791e-12 -7.58836e-09 2.75399e-11 -2.33317e-08 6.41432e-10 -3.88536e-08 1.29117e-09 -6.02907e-08 1.78324e-09 -8.30337e-08 2.19643e-09 -1.05818e-07 2.64331e-09 -1.23933e-07 2.87665e-09 -1.26305e-07 2.65143e-09 -1.03211e-07 2.38255e-09 -5.9836e-08 3.81565e-09 -1.04684e-08 4.83665e-09 4.90522e-09 4.1117e-09 -3.30529e-09 1.8636e-09 -4.86187e-09 -1.74834e-09 7.09518e-12 -7.59545e-09 2.98875e-11 -2.33544e-08 5.99408e-10 -3.94231e-08 1.1183e-09 -6.08096e-08 1.53366e-09 -8.34491e-08 1.9056e-09 -1.0619e-07 2.36406e-09 -1.24391e-07 2.65973e-09 -1.26601e-07 2.51109e-09 -1.03062e-07 2.22694e-09 -5.95519e-08 3.41702e-09 -1.16583e-08 4.30348e-09 4.00682e-09 3.65426e-09 -2.94551e-09 1.63513e-09 -4.27091e-09 -1.51311e-09 7.4959e-12 -7.60295e-09 3.00038e-11 -2.3377e-08 5.39372e-10 -3.99325e-08 9.68805e-10 -6.1239e-08 1.3223e-09 -8.38026e-08 1.66486e-09 -1.06533e-07 2.12409e-09 -1.2485e-07 2.45214e-09 -1.26929e-07 2.32993e-09 -1.0294e-07 1.95711e-09 -5.91791e-08 2.90019e-09 -1.26013e-08 3.71934e-09 3.17659e-09 3.15158e-09 -2.63504e-09 1.3641e-09 -3.70341e-09 -1.26324e-09 7.87721e-12 -7.61083e-09 3.19048e-11 -2.3401e-08 4.73719e-10 -4.03743e-08 8.40023e-10 -6.16053e-08 1.13998e-09 -8.41026e-08 1.46005e-09 -1.06853e-07 1.91333e-09 -1.25303e-07 2.2587e-09 -1.27274e-07 2.14372e-09 -1.02825e-07 1.66949e-09 -5.87049e-08 2.38007e-09 -1.33118e-08 3.12507e-09 2.42148e-09 2.6226e-09 -2.35853e-09 1.0728e-09 -3.17177e-09 -1.02365e-09 8.21071e-12 -7.61904e-09 3.85336e-11 -2.34313e-08 4.1396e-10 -4.07497e-08 7.32889e-10 -6.19242e-08 9.85273e-10 -8.4355e-08 1.2865e-09 -1.07154e-07 1.73043e-09 -1.25747e-07 2.08616e-09 -1.2763e-07 1.97292e-09 -1.02712e-07 1.40406e-09 -5.8136e-08 1.89828e-09 -1.38059e-08 2.54102e-09 1.76983e-09 2.08566e-09 -2.09618e-09 7.81982e-10 -2.68117e-09 -8.08853e-10 8.50995e-12 -7.62755e-09 5.02351e-11 -2.3473e-08 3.65882e-10 -4.10654e-08 6.45956e-10 -6.22043e-08 8.55868e-10 -8.4565e-08 1.14013e-09 -1.07439e-07 1.57311e-09 -1.2618e-07 1.93518e-09 -1.27992e-07 1.82127e-09 -1.02598e-07 1.16145e-09 -5.74762e-08 1.45001e-09 -1.40943e-08 1.97384e-09 1.23853e-09 1.55617e-09 -1.83528e-09 5.08e-10 -2.2337e-09 -6.25693e-10 8.76958e-12 -7.63632e-09 6.51913e-11 -2.35294e-08 3.30876e-10 -4.13311e-08 5.76849e-10 -6.24502e-08 7.49217e-10 -8.47373e-08 1.01711e-09 -1.07706e-07 1.43813e-09 -1.26601e-07 1.80312e-09 -1.28357e-07 1.68598e-09 -1.0248e-07 9.31661e-10 -5.67218e-08 1.02119e-09 -1.41838e-08 1.427e-09 8.26923e-10 1.04695e-09 -1.57177e-09 2.6201e-10 -1.83021e-09 -4.73417e-10 9.00795e-12 -7.64533e-09 8.01369e-11 -2.36006e-08 3.06291e-10 -4.15572e-08 5.2086e-10 -6.26648e-08 6.60611e-10 -8.48771e-08 9.12446e-10 -1.07958e-07 1.32124e-09 -1.2701e-07 1.6867e-09 -1.28723e-07 1.56425e-09 -1.02358e-07 7.07824e-10 -5.58654e-08 6.03199e-10 -1.40792e-08 9.04468e-10 5.21785e-10 5.68243e-10 -1.30795e-09 5.01136e-11 9.20905e-12 -7.65454e-09 9.20954e-11 -2.36834e-08 2.88584e-10 -4.17537e-08 4.73792e-10 -6.285e-08 5.85802e-10 -8.49891e-08 8.2216e-10 -1.08195e-07 1.21938e-09 -1.27407e-07 1.5843e-09 -1.29088e-07 1.45683e-09 -1.02231e-07 4.91327e-10 -5.48998e-08 1.98106e-10 -1.37859e-08 4.11566e-10 3.06518e-10 -1.04858e-09 9.39989e-12 -7.66394e-09 9.88169e-11 -2.37729e-08 2.74002e-10 -4.19289e-08 4.316e-10 -6.30076e-08 5.20845e-10 -8.50783e-08 7.42901e-10 -1.08417e-07 1.13034e-09 -1.27795e-07 1.49547e-09 -1.29453e-07 1.36616e-09 -1.02101e-07 2.87516e-10 -5.38211e-08 -1.86765e-10 -1.33113e-08 -4.6289e-11 1.66347e-10 -7.9873e-10 9.61779e-12 -7.67356e-09 9.96216e-11 -2.38629e-08 2.60295e-10 -4.20896e-08 3.92013e-10 -6.31393e-08 4.63136e-10 -8.51494e-08 6.72523e-10 -1.08626e-07 1.05291e-09 -1.28175e-07 1.42041e-09 -1.2982e-07 1.29509e-09 -1.01976e-07 1.01463e-10 -5.26274e-08 -5.57562e-10 -1.26522e-08 -4.67248e-10 8.15411e-11 -5.66768e-10 9.87321e-12 -7.68343e-09 9.50763e-11 -2.39481e-08 2.45941e-10 -4.22404e-08 3.53222e-10 -6.32466e-08 4.10127e-10 -8.52063e-08 6.08541e-10 -1.08824e-07 9.84791e-10 -1.28551e-07 1.35697e-09 -1.30193e-07 1.24091e-09 -1.0186e-07 -7.54812e-11 -5.1311e-08 -9.32461e-10 -1.17952e-08 -8.59734e-10 2.19569e-11 -3.65868e-10 1.0102e-11 -7.69353e-09 8.66197e-11 -2.40246e-08 2.30636e-10 -4.23844e-08 3.14798e-10 -6.33308e-08 3.60526e-10 -8.52521e-08 5.49388e-10 -1.09013e-07 9.24108e-10 -1.28926e-07 1.30262e-09 -1.30571e-07 1.19925e-09 -1.01757e-07 -2.49297e-10 -4.98623e-08 -1.3015e-09 -1.07427e-08 -1.22095e-09 -3.31898e-11 -2.01249e-10 1.02379e-11 -7.70377e-09 7.6008e-11 -2.40903e-08 2.14239e-10 -4.25227e-08 2.76353e-10 -6.33929e-08 3.12936e-10 -8.52886e-08 4.93651e-10 -1.09194e-07 8.69983e-10 -1.29302e-07 1.25651e-09 -1.30958e-07 1.17016e-09 -1.0167e-07 -4.07787e-10 -4.82843e-08 -1.65582e-09 -9.4936e-09 -1.54999e-09 -9.40391e-11 -7.27421e-11 1.01739e-11 -7.71394e-09 6.46215e-11 -2.41448e-08 1.96726e-10 -4.26548e-08 2.37701e-10 -6.34339e-08 2.66121e-10 -8.5317e-08 4.40039e-10 -1.09368e-07 8.2129e-10 -1.29684e-07 1.21859e-09 -1.31355e-07 1.16677e-09 -1.01618e-07 -5.01466e-10 -4.6616e-08 -1.94401e-09 -8.04781e-09 -1.82946e-09 -1.3553e-10 3.44957e-11 9.7571e-12 -7.7237e-09 5.33051e-11 -2.41883e-08 1.77713e-10 -4.27792e-08 1.97806e-10 -6.3454e-08 2.17353e-10 -8.53366e-08 3.85239e-10 -1.09536e-07 7.72465e-10 -1.30071e-07 1.18199e-09 -1.31765e-07 1.18499e-09 -1.01621e-07 -5.12951e-10 -4.4918e-08 -2.11513e-09 -6.43638e-09 -2.03512e-09 -1.06447e-10 1.231e-10 8.8579e-12 -7.73256e-09 4.23719e-11 -2.42219e-08 1.56582e-10 -4.28934e-08 1.55039e-10 -6.34524e-08 1.6318e-10 -8.53447e-08 3.24066e-10 -1.09697e-07 7.12896e-10 -1.3046e-07 1.13833e-09 -1.3219e-07 1.23711e-09 -1.0172e-07 -2.31311e-10 -4.34497e-08 -2.12438e-09 -4.52334e-09 -2.12984e-09 4.68396e-11 1.6483e-10 7.42109e-12 -7.73998e-09 3.16547e-11 -2.42461e-08 1.32018e-10 -4.29938e-08 1.05865e-10 -6.34263e-08 9.71562e-11 -8.5336e-08 2.44424e-10 -1.09844e-07 6.20333e-10 -1.30836e-07 1.0513e-09 -1.32621e-07 1.17743e-09 -1.01846e-07 1.85415e-10 -4.24577e-08 -1.80572e-09 -2.49927e-09 -1.79925e-09 2.13595e-10 1.71034e-10 5.40835e-12 -7.74539e-09 2.0996e-11 -2.42617e-08 1.03046e-10 -4.30758e-08 4.72339e-11 -6.33705e-08 1.24899e-11 -8.53012e-08 1.28975e-10 -1.09961e-07 4.68604e-10 -1.31175e-07 9.08021e-10 -1.3306e-07 1.04501e-09 -1.01983e-07 9.28517e-10 -4.23412e-08 -1.5269e-09 -1.04222e-09 3.22775e-12 -7.74861e-09 1.25225e-11 -2.4271e-08 7.45737e-11 -4.31379e-08 -1.14639e-11 -6.32844e-08 -7.63281e-11 -8.52364e-08 -6.54267e-12 -1.1003e-07 2.59817e-10 -1.31442e-07 5.76578e-10 -1.33377e-07 2.78353e-10 -1.01685e-07 -4.20629e-08 1.50956e-12 -7.75012e-09 8.82424e-12 -2.42783e-08 5.33922e-11 -4.31824e-08 -5.3924e-11 -6.31771e-08 -1.33491e-10 -8.51568e-08 -8.07921e-11 -1.10083e-07 1.79576e-10 -1.31702e-07 4.99843e-10 -1.33697e-07 3.15881e-10 -1.01501e-07 -4.1747e-08 3.68724e-13 -7.75049e-09 9.37049e-12 -2.42873e-08 3.81239e-11 -4.32112e-08 -8.41653e-11 -6.30548e-08 -1.70118e-10 -8.50708e-08 -1.23139e-10 -1.1013e-07 1.40978e-10 -1.31966e-07 4.78775e-10 -1.34035e-07 3.58624e-10 -1.01381e-07 -4.13884e-08 -2.53834e-13 -7.75024e-09 1.2876e-11 -2.43004e-08 2.70502e-11 -4.32254e-08 -1.04619e-10 -6.29232e-08 -1.89883e-10 -8.49855e-08 -1.40732e-10 -1.10179e-07 1.31531e-10 -1.32238e-07 4.88392e-10 -1.34392e-07 3.82449e-10 -1.01275e-07 -4.10059e-08 -4.31284e-13 -7.74981e-09 1.77564e-11 -2.43186e-08 1.81367e-11 -4.32258e-08 -1.18501e-10 -6.27865e-08 -1.98465e-10 -8.49055e-08 -1.43471e-10 -1.10234e-07 1.38376e-10 -1.3252e-07 5.10684e-10 -1.34764e-07 4.06124e-10 -1.0117e-07 -4.05997e-08 -3.00857e-13 -7.74951e-09 2.21029e-11 -2.4341e-08 9.1642e-12 -4.32128e-08 -1.28627e-10 -6.26487e-08 -1.99575e-10 -8.48346e-08 -1.36102e-10 -1.10298e-07 1.56203e-10 -1.32813e-07 5.42484e-10 -1.35151e-07 4.34037e-10 -1.01062e-07 -4.01657e-08 5.75096e-14 -7.74956e-09 2.45457e-11 -2.43655e-08 -1.03338e-12 -4.31872e-08 -1.36585e-10 -6.25132e-08 -1.95656e-10 -8.47755e-08 -1.21886e-10 -1.10372e-07 1.81571e-10 -1.33116e-07 5.80811e-10 -1.3555e-07 4.65166e-10 -1.00946e-07 -3.97005e-08 5.45152e-13 -7.75011e-09 2.40265e-11 -2.4389e-08 -1.33184e-11 -4.31499e-08 -1.43447e-10 -6.2383e-08 -1.88284e-10 -8.47307e-08 -1.0283e-10 -1.10457e-07 2.12615e-10 -1.33431e-07 6.24524e-10 -1.35962e-07 4.99534e-10 -1.00821e-07 -3.9201e-08 1.12619e-12 -7.75124e-09 2.04353e-11 -2.44083e-08 -2.71464e-11 -4.31023e-08 -1.48886e-10 -6.22613e-08 -1.77455e-10 -8.47021e-08 -7.89965e-11 -1.10556e-07 2.49133e-10 -1.3376e-07 6.73659e-10 -1.36386e-07 5.37615e-10 -1.00685e-07 -3.86634e-08 1.76189e-12 -7.753e-09 1.42717e-11 -2.44208e-08 -4.17687e-11 -4.30462e-08 -1.52369e-10 -6.21507e-08 -1.62897e-10 -8.46915e-08 -5.01349e-11 -1.10668e-07 2.91347e-10 -1.34101e-07 7.28621e-10 -1.36824e-07 5.79717e-10 -1.00536e-07 -3.80837e-08 2.44481e-12 -7.75545e-09 6.87564e-12 -2.44252e-08 -5.56121e-11 -4.29838e-08 -1.52387e-10 -6.20539e-08 -1.43505e-10 -8.47004e-08 -1.53604e-11 -1.10796e-07 3.40048e-10 -1.34456e-07 7.90146e-10 -1.37274e-07 6.26113e-10 -1.00372e-07 -3.74576e-08 3.17938e-12 -7.75863e-09 -8.37054e-14 -2.4422e-08 -6.70705e-11 -4.29168e-08 -1.47452e-10 -6.19736e-08 -1.18005e-10 -8.47299e-08 2.64056e-11 -1.10941e-07 3.96539e-10 -1.34827e-07 8.59422e-10 -1.37737e-07 6.77353e-10 -1.0019e-07 -3.67802e-08 3.97894e-12 -7.76261e-09 -4.70175e-12 -2.44133e-08 -7.42474e-11 -4.28472e-08 -1.35761e-10 -6.19121e-08 -8.47693e-11 -8.47809e-08 7.64814e-11 -1.11102e-07 4.62479e-10 -1.35212e-07 9.37908e-10 -1.38212e-07 7.34653e-10 -9.9987e-08 -3.60456e-08 4.87451e-12 -7.76748e-09 -5.37898e-12 -2.4403e-08 -7.57737e-11 -4.27768e-08 -1.16095e-10 -6.18717e-08 -4.28589e-11 -8.48541e-08 1.35939e-10 -1.11281e-07 5.391e-10 -1.35616e-07 1.02663e-09 -1.387e-07 7.98977e-10 -9.97594e-08 -3.52467e-08 5.89136e-12 -7.77337e-09 -8.47544e-13 -2.43963e-08 -7.04774e-11 -4.27072e-08 -8.71334e-11 -6.18551e-08 8.8676e-12 -8.49501e-08 2.06157e-10 -1.11478e-07 6.27251e-10 -1.36037e-07 1.12584e-09 -1.39198e-07 8.69613e-10 -9.95032e-08 -3.4377e-08 7.06954e-12 -7.78044e-09 9.29372e-12 -2.43985e-08 -5.82605e-11 -4.26396e-08 -4.90292e-11 -6.18643e-08 6.88053e-11 -8.50679e-08 2.86675e-10 -1.11696e-07 7.26787e-10 -1.36477e-07 1.23628e-09 -1.39708e-07 9.47377e-10 -9.92142e-08 -3.34296e-08 8.43216e-12 -7.78888e-09 2.46639e-11 -2.44147e-08 -3.92533e-11 -4.25757e-08 -1.9867e-12 -6.19016e-08 1.37922e-10 -8.52078e-08 3.78361e-10 -1.11937e-07 8.39022e-10 -1.36937e-07 1.35925e-09 -1.40228e-07 1.03373e-09 -9.88887e-08 -3.23959e-08 1.0006e-11 -7.79888e-09 4.38986e-11 -2.44486e-08 -1.45164e-11 -4.25173e-08 5.29206e-11 -6.19691e-08 2.15355e-10 -8.53703e-08 4.80572e-10 -1.12202e-07 9.63627e-10 -1.3742e-07 1.4946e-09 -1.40759e-07 1.1284e-09 -9.85225e-08 -3.12675e-08 1.17881e-11 -7.81067e-09 6.48189e-11 -2.45016e-08 1.47305e-11 -4.24672e-08 1.13984e-10 -6.20684e-08 3.00066e-10 -8.55564e-08 5.92297e-10 -1.12494e-07 1.10008e-09 -1.37928e-07 1.64231e-09 -1.41301e-07 1.23168e-09 -9.81119e-08 -3.00358e-08 1.37668e-11 -7.82444e-09 8.44981e-11 -2.45724e-08 4.64129e-11 -4.24291e-08 1.79005e-10 -6.2201e-08 3.90446e-10 -8.57678e-08 7.12363e-10 -1.12816e-07 1.24814e-09 -1.38464e-07 1.80239e-09 -1.41855e-07 1.34403e-09 -9.76535e-08 -2.86918e-08 1.59059e-11 -7.84034e-09 1.00164e-10 -2.46566e-08 7.89887e-11 -4.24079e-08 2.4639e-10 -6.23684e-08 4.85168e-10 -8.60066e-08 8.39191e-10 -1.1317e-07 1.40649e-09 -1.39031e-07 1.9743e-09 -1.42423e-07 1.46537e-09 -9.71446e-08 -2.72264e-08 1.81613e-11 -7.8585e-09 1.09491e-10 -2.4748e-08 1.1103e-10 -4.24094e-08 3.14201e-10 -6.25716e-08 5.82808e-10 -8.62752e-08 9.71674e-10 -1.13559e-07 1.57431e-09 -1.39634e-07 2.15771e-09 -1.43007e-07 1.59587e-09 -9.65827e-08 -2.56305e-08 2.04627e-11 -7.87897e-09 1.11427e-10 -2.48389e-08 1.4221e-10 -4.24402e-08 3.81506e-10 -6.28109e-08 6.82281e-10 -8.65759e-08 1.10854e-09 -1.13985e-07 1.7505e-09 -1.40276e-07 2.3522e-09 -1.43608e-07 1.73578e-09 -9.59663e-08 -2.38948e-08 2.2738e-11 -7.90171e-09 1.06138e-10 -2.49223e-08 1.72437e-10 -4.25065e-08 4.47364e-10 -6.30858e-08 7.82129e-10 -8.69107e-08 1.24812e-09 -1.14451e-07 1.93337e-09 -1.40961e-07 2.55693e-09 -1.44232e-07 1.8853e-09 -9.52947e-08 -2.20095e-08 2.48882e-11 -7.9266e-09 9.52808e-11 -2.49927e-08 2.02316e-10 -4.26135e-08 5.11125e-10 -6.33946e-08 8.80577e-10 -8.72802e-08 1.38815e-09 -1.14959e-07 2.12036e-09 -1.41693e-07 2.7705e-09 -1.44882e-07 2.04484e-09 -9.4569e-08 -1.99646e-08 2.67457e-11 -7.95334e-09 8.11397e-11 -2.50471e-08 2.31806e-10 -4.27642e-08 5.71245e-10 -6.37341e-08 9.74518e-10 -8.76834e-08 1.52437e-09 -1.15509e-07 2.30655e-09 -1.42475e-07 2.98978e-09 -1.45565e-07 2.21457e-09 -9.37938e-08 -1.775e-08 2.80597e-11 -7.9814e-09 6.63548e-11 -2.50854e-08 2.6008e-10 -4.29579e-08 6.24469e-10 -6.40984e-08 1.05794e-09 -8.81169e-08 1.64894e-09 -1.161e-07 2.48303e-09 -1.43309e-07 3.2087e-09 -1.46291e-07 2.39446e-09 -9.29796e-08 -1.53556e-08 2.84047e-11 -8.0098e-09 5.26879e-11 -2.51097e-08 2.84042e-10 -4.31893e-08 6.64411e-10 -6.44788e-08 1.12024e-09 -8.85727e-08 1.74773e-09 -1.16727e-07 2.63379e-09 -1.44196e-07 3.41593e-09 -1.47073e-07 2.58349e-09 -9.21471e-08 -1.27721e-08 2.70894e-11 -8.03689e-09 4.04815e-11 -2.51231e-08 2.97798e-10 -4.34466e-08 6.7982e-10 -6.48608e-08 1.14366e-09 -8.90366e-08 1.79664e-09 -1.1738e-07 2.73142e-09 -1.4513e-07 3.59139e-09 -1.47933e-07 2.78122e-09 -9.13369e-08 -9.99088e-09 2.30159e-11 -8.05991e-09 2.70327e-11 -2.51271e-08 2.90259e-10 -4.37098e-08 6.51224e-10 -6.52218e-08 1.09856e-09 -8.94839e-08 1.75511e-09 -1.18037e-07 2.7297e-09 -1.46105e-07 3.69934e-09 -1.48903e-07 2.97823e-09 -9.06159e-08 -7.01275e-09 1.45291e-11 -8.07444e-09 5.74741e-12 -2.51184e-08 2.44154e-10 -4.39482e-08 5.48427e-10 -6.5526e-08 9.38527e-10 -8.9874e-08 1.55738e-09 -1.18656e-07 2.55258e-09 -1.471e-07 3.68307e-09 -1.50033e-07 3.18455e-09 -9.01173e-08 -3.82808e-09 -8.78961e-13 -8.07356e-09 -3.5581e-11 -2.50836e-08 1.32327e-10 -4.41161e-08 3.24658e-10 -6.57184e-08 5.91548e-10 -9.01409e-08 1.09909e-09 -1.19163e-07 2.07411e-09 -1.48075e-07 3.42954e-09 -1.51389e-07 3.34781e-09 -9.00356e-08 -4.80308e-10 -2.68243e-11 -8.04673e-09 -1.15073e-10 -2.49954e-08 -8.27711e-11 -4.41484e-08 -8.54581e-11 -6.57157e-08 -4.86743e-11 -9.01777e-08 2.19134e-10 -1.19431e-07 1.09761e-09 -1.48953e-07 2.76996e-09 -1.53061e-07 3.4859e-09 -9.07515e-08 3.00558e-09 -6.79723e-11 -7.97876e-09 -2.56399e-10 -2.4807e-08 -4.49972e-10 -4.39549e-08 -7.67961e-10 -6.53977e-08 -1.12966e-09 -8.9816e-08 -1.32932e-09 -1.19231e-07 -7.14742e-10 -1.49568e-07 1.35024e-09 -1.55126e-07 3.35371e-09 -9.2755e-08 6.35928e-09 -1.29744e-10 -7.84901e-09 -4.87374e-10 -2.44493e-08 -1.02821e-09 -4.3414e-08 -1.83179e-09 -6.45941e-08 -2.83959e-09 -8.88081e-08 -3.85778e-09 -1.18213e-07 -3.85047e-09 -1.49575e-07 -1.31145e-09 -1.57665e-07 2.75406e-09 -9.68205e-08 9.11333e-09 -2.17732e-10 -7.63128e-09 -8.36707e-10 -2.38304e-08 -1.88123e-09 -4.23695e-08 -3.40371e-09 -6.30716e-08 -5.40062e-09 -8.68112e-08 -7.75031e-09 -1.15864e-07 -9.02237e-09 -1.48303e-07 -6.1214e-09 -1.60566e-07 8.93545e-10 -1.03835e-07 1.00069e-08 -3.34392e-10 -7.29689e-09 -1.3181e-09 -2.28466e-08 -3.04227e-09 -4.06453e-08 -5.55932e-09 -6.05546e-08 -8.95884e-09 -8.34117e-08 -1.33191e-08 -1.11503e-07 -1.70009e-08 -1.44622e-07 -1.45381e-08 -1.63029e-07 -3.0956e-09 -1.15278e-07 6.91123e-09 -4.75337e-10 -6.82155e-09 -1.91431e-09 -2.14077e-08 -4.47622e-09 -3.80834e-08 -8.25451e-09 -5.67763e-08 -1.34817e-08 -7.81845e-08 -2.06299e-08 -1.04355e-07 -2.85183e-08 -1.36733e-07 -2.91931e-08 -1.62354e-07 -1.12338e-08 -1.33237e-07 -4.32261e-09 -6.27514e-10 -6.19404e-09 -2.57566e-09 -1.94595e-08 -6.09176e-09 -3.45673e-08 -1.1374e-08 -5.1494e-08 -1.88416e-08 -7.07168e-08 -2.94107e-08 -9.37859e-08 -4.32057e-08 -1.22938e-07 -5.28671e-08 -1.52692e-07 -3.69174e-08 -1.49187e-07 -4.12399e-08 -7.70957e-10 -5.42308e-09 -3.20584e-09 -1.70246e-08 -7.64827e-09 -3.01249e-08 -1.44796e-08 -4.46627e-08 -2.44028e-08 -6.07936e-08 -3.87995e-08 -7.93891e-08 -5.94207e-08 -1.02317e-07 -8.31985e-08 -1.28914e-07 -8.51257e-08 -1.4726e-07 -1.26365e-07 -8.12819e-10 -4.61026e-09 -3.40211e-09 -1.44353e-08 -8.16008e-09 -2.53669e-08 -1.55996e-08 -3.72231e-08 -2.66254e-08 -4.97678e-08 -4.3227e-08 -6.27874e-08 -6.93563e-08 -7.6188e-08 -1.0843e-07 -8.98402e-08 -1.56687e-07 -9.90033e-08 -1.99577e-07 -8.34752e-08 -1.55551e-07 -4.40259e-08 -1.20917e-07 -3.46345e-08 -9.74185e-08 -2.34979e-08 -7.93696e-08 -1.8049e-08 -6.53146e-08 -1.40549e-08 -5.3871e-08 -1.14435e-08 -9.50848e-09 -7.37279e-10 -3.87298e-09 -3.06512e-09 -1.21075e-08 -7.24745e-09 -2.11845e-08 -1.3549e-08 -3.09216e-08 -2.22576e-08 -4.10591e-08 -3.38829e-08 -5.1162e-08 -4.95939e-08 -6.04772e-08 -7.09058e-08 -6.8528e-08 -9.6864e-08 -7.30454e-08 -1.13941e-07 -6.63974e-08 -1.07191e-07 -5.07758e-08 -1.00207e-07 -4.1619e-08 -9.01135e-08 -3.35915e-08 -8.00425e-08 -2.812e-08 -7.0448e-08 -2.36493e-08 -6.15746e-08 -2.03169e-08 -1.76453e-08 -6.48054e-10 -3.22493e-09 -2.69158e-09 -1.00639e-08 -6.34335e-09 -1.75328e-08 -1.18119e-08 -2.54531e-08 -1.92995e-08 -3.35715e-08 -2.8886e-08 -4.15756e-08 -4.04852e-08 -4.88781e-08 -5.44222e-08 -5.45908e-08 -7.03007e-08 -5.71671e-08 -8.18419e-08 -5.4856e-08 -8.31736e-08 -4.9444e-08 -8.0529e-08 -4.4264e-08 -7.5412e-08 -3.87083e-08 -6.94317e-08 -3.41004e-08 -6.30266e-08 -3.00544e-08 -5.6617e-08 -2.67264e-08 -2.39211e-08 -5.35871e-10 -2.68906e-09 -2.21483e-09 -8.38498e-09 -5.17666e-09 -1.45709e-08 -9.5318e-09 -2.1098e-08 -1.53833e-08 -2.77199e-08 -2.28238e-08 -3.4135e-08 -3.17223e-08 -3.99797e-08 -4.14833e-08 -4.48296e-08 -5.08242e-08 -4.78263e-08 -5.76929e-08 -4.79872e-08 -6.11656e-08 -4.59712e-08 -6.21768e-08 -4.32531e-08 -6.08369e-08 -4.00481e-08 -5.8054e-08 -3.68833e-08 -5.42748e-08 -3.38336e-08 -4.99418e-08 -3.10593e-08 -2.85557e-08 -4.28531e-10 -2.26053e-09 -1.76655e-09 -7.04695e-09 -4.11132e-09 -1.22262e-08 -7.52157e-09 -1.76877e-08 -1.19966e-08 -2.32449e-08 -1.74758e-08 -2.86557e-08 -2.38404e-08 -3.36152e-08 -3.08982e-08 -3.77717e-08 -3.80017e-08 -4.0723e-08 -4.38112e-08 -4.21775e-08 -4.74932e-08 -4.22892e-08 -4.93031e-08 -4.14434e-08 -4.94501e-08 -3.9901e-08 -4.83185e-08 -3.8015e-08 -4.61961e-08 -3.59559e-08 -4.3371e-08 -3.38844e-08 -3.18714e-08 -3.42443e-10 -1.91808e-09 -1.40787e-09 -5.98152e-09 -3.26203e-09 -1.0372e-08 -5.94295e-09 -1.50068e-08 -9.44443e-09 -1.97434e-08 -1.37019e-08 -2.43983e-08 -1.85465e-08 -2.87705e-08 -2.36864e-08 -3.26317e-08 -2.87026e-08 -3.57068e-08 -3.30946e-08 -3.77855e-08 -3.64919e-08 -3.88918e-08 -3.87394e-08 -3.91962e-08 -3.97908e-08 -3.88494e-08 -3.97721e-08 -3.80338e-08 -3.88326e-08 -3.68953e-08 -3.71556e-08 -3.55615e-08 -3.41226e-08 -2.65537e-10 -1.65255e-09 -1.09003e-09 -5.15702e-09 -2.51865e-09 -8.94337e-09 -4.57464e-09 -1.29508e-08 -7.24201e-09 -1.7076e-08 -1.04648e-08 -2.11755e-08 -1.41389e-08 -2.50965e-08 -1.80971e-08 -2.86734e-08 -2.20648e-08 -3.17392e-08 -2.56808e-08 -3.41695e-08 -2.86592e-08 -3.59133e-08 -3.08566e-08 -3.69989e-08 -3.22079e-08 -3.74981e-08 -3.27343e-08 -3.75073e-08 -3.24982e-08 -3.71314e-08 -3.15957e-08 -3.64639e-08 -3.55868e-08 -2.09492e-10 -1.44305e-09 -8.58827e-10 -4.50769e-09 -1.97917e-09 -7.82303e-09 -3.58616e-09 -1.13438e-08 -5.6654e-09 -1.49967e-08 -8.16774e-09 -1.86731e-08 -1.1003e-08 -2.22613e-08 -1.40383e-08 -2.5638e-08 -1.71013e-08 -2.86762e-08 -1.99957e-08 -3.12751e-08 -2.2537e-08 -3.33719e-08 -2.45812e-08 -3.49549e-08 -2.60342e-08 -3.6045e-08 -2.68611e-08 -3.66805e-08 -2.7069e-08 -3.69235e-08 -2.66997e-08 -3.68331e-08 -3.64722e-08 -1.62377e-10 -1.28068e-09 -6.65326e-10 -4.00474e-09 -1.53155e-09 -6.9568e-09 -2.77328e-09 -1.01021e-08 -4.38154e-09 -1.33884e-08 -6.32226e-09 -1.67324e-08 -8.5347e-09 -2.00489e-08 -1.09291e-08 -2.32436e-08 -1.33841e-08 -2.62212e-08 -1.5757e-08 -2.89021e-08 -1.79104e-08 -3.12185e-08 -1.97305e-08 -3.31349e-08 -2.11327e-08 -3.46428e-08 -2.2067e-08 -3.57462e-08 -2.25143e-08 -3.64762e-08 -2.2483e-08 -3.68644e-08 -3.69535e-08 -1.28031e-10 -1.15265e-09 -5.24262e-10 -3.6085e-09 -1.2051e-09 -6.27595e-09 -2.17929e-09 -9.12794e-09 -3.44052e-09 -1.21272e-08 -4.96307e-09 -1.52098e-08 -6.70173e-09 -1.83103e-08 -8.59157e-09 -2.13537e-08 -1.05499e-08 -2.42629e-08 -1.24818e-08 -2.69702e-08 -1.42887e-08 -2.94116e-08 -1.58793e-08 -3.15444e-08 -1.71772e-08 -3.33448e-08 -1.81277e-08 -3.47956e-08 -1.86984e-08 -3.59055e-08 -1.88786e-08 -3.66842e-08 -3.71561e-08 -1.00256e-10 -1.05239e-09 -4.10488e-10 -3.29827e-09 -9.43343e-10 -5.7431e-09 -1.70618e-09 -8.36511e-09 -2.6962e-09 -1.11371e-08 -3.89627e-09 -1.40098e-08 -5.27498e-09 -1.69316e-08 -6.7862e-09 -1.98425e-08 -8.36998e-09 -2.26791e-08 -9.95621e-09 -2.5384e-08 -1.14707e-08 -2.78971e-08 -1.28419e-08 -3.01732e-08 -1.40065e-08 -3.21802e-08 -1.49135e-08 -3.38886e-08 -1.55271e-08 -3.52919e-08 -1.5827e-08 -3.63842e-08 -1.58082e-08 -3.71749e-08 -1.54782e-08 -3.76784e-08 -3.79129e-08 -7.9531e-11 -9.72858e-10 -3.25518e-10 -3.05228e-09 -7.47618e-10 -5.321e-09 -1.35149e-09 -7.76124e-09 -2.13579e-09 -1.03528e-08 -3.08853e-09 -1.3057e-08 -4.18727e-09 -1.58328e-08 -5.39882e-09 -1.86309e-08 -6.68024e-09 -2.13977e-08 -7.98088e-09 -2.40833e-08 -9.24527e-09 -2.66327e-08 -1.04174e-08 -2.90011e-08 -1.14445e-08 -3.1153e-08 -1.22813e-08 -3.30518e-08 -1.28922e-08 -3.4681e-08 -1.3253e-08 -3.60234e-08 -1.33512e-08 -3.70767e-08 -1.31853e-08 -3.78442e-08 -3.83348e-08 -6.30429e-11 -9.09815e-10 -2.5801e-10 -2.85731e-09 -5.92616e-10 -4.98639e-09 -1.07166e-09 -7.2822e-09 -1.6952e-09 -9.72929e-09 -2.45538e-09 -1.22969e-08 -3.33652e-09 -1.49517e-08 -4.31456e-09 -1.76529e-08 -5.35785e-09 -2.03545e-08 -6.42841e-09 -2.30127e-08 -7.48385e-09 -2.55773e-08 -8.48024e-09 -2.80048e-08 -9.3747e-09 -3.02585e-08 -1.01284e-08 -3.22981e-08 -1.07086e-08 -3.41008e-08 -1.10906e-08 -3.56414e-08 -1.12583e-08 -3.6909e-08 -1.12046e-08 -3.7898e-08 -3.8609e-08 -5.04313e-11 -8.59383e-10 -2.06338e-10 -2.70141e-09 -4.73845e-10 -4.71888e-09 -8.56832e-10 -6.89921e-09 -1.35589e-09 -9.23022e-09 -1.96575e-09 -1.1687e-08 -2.67532e-09 -1.42422e-08 -3.46714e-09 -1.6861e-08 -4.31795e-09 -1.95037e-08 -5.19937e-09 -2.21313e-08 -6.07903e-09 -2.46976e-08 -6.9224e-09 -2.71615e-08 -7.69469e-09 -2.94862e-08 -8.36304e-09 -3.16298e-08 -8.89841e-09 -3.35654e-08 -9.27706e-09 -3.52628e-08 -9.4818e-09 -3.67043e-08 -9.50232e-09 -3.78775e-08 -3.87761e-08 -4.04143e-11 -8.18969e-10 -1.65327e-10 -2.57649e-09 -3.79725e-10 -4.50448e-09 -6.86895e-10 -6.59204e-09 -1.08785e-09 -8.82926e-09 -1.57919e-09 -1.11957e-08 -2.15313e-09 -1.36682e-08 -2.79693e-09 -1.62172e-08 -3.49324e-09 -1.88074e-08 -4.22051e-09 -2.1404e-08 -4.95373e-09 -2.39644e-08 -5.66571e-09 -2.64495e-08 -6.32833e-09 -2.88236e-08 -6.91421e-09 -3.10439e-08 -7.39813e-09 -3.30815e-08 -7.75845e-09 -3.49024e-08 -7.97815e-09 -3.64846e-08 -8.04553e-09 -3.78101e-08 -3.88672e-08 -3.25938e-11 -7.86375e-10 -1.33301e-10 -2.47579e-09 -3.06161e-10 -4.33162e-09 -5.53898e-10 -6.34431e-09 -8.77618e-10 -8.50554e-09 -1.27512e-09 -1.07982e-08 -1.74093e-09 -1.32024e-08 -2.26571e-09 -1.56925e-08 -2.83654e-09 -1.82365e-08 -3.43703e-09 -2.08035e-08 -4.04786e-09 -2.33535e-08 -4.64753e-09 -2.58499e-08 -5.21334e-09 -2.82577e-08 -5.72259e-09 -3.05347e-08 -6.15372e-09 -3.26503e-08 -6.48743e-09 -3.45687e-08 -6.70771e-09 -3.62643e-08 -6.80257e-09 -3.77152e-08 -3.89054e-08 -2.63477e-11 -7.60027e-10 -1.07733e-10 -2.3944e-09 -2.47474e-10 -4.19188e-09 -4.47868e-10 -6.14392e-09 -7.10062e-10 -8.24334e-09 -1.0327e-09 -1.04755e-08 -1.41193e-09 -1.28232e-08 -1.84092e-09 -1.52635e-08 -2.30995e-09 -1.77675e-08 -2.80646e-09 -2.0307e-08 -3.31539e-09 -2.28446e-08 -3.81973e-09 -2.53456e-08 -4.30116e-09 -2.77763e-08 -4.74095e-09 -3.00949e-08 -5.12085e-09 -3.22704e-08 -5.42398e-09 -3.42656e-08 -5.63576e-09 -3.60525e-08 -5.74454e-09 -3.76064e-08 -3.89078e-08 -2.13892e-11 -7.38638e-10 -8.7435e-11 -2.32835e-09 -2.00852e-10 -4.07846e-09 -3.63565e-10 -5.98121e-09 -5.76657e-10 -8.03025e-09 -8.39308e-10 -1.02129e-08 -1.14884e-09 -1.25136e-08 -1.50021e-09 -1.49121e-08 -1.88612e-09 -1.73816e-08 -2.29694e-09 -1.98961e-08 -2.72089e-09 -2.24207e-08 -3.14445e-09 -2.4922e-08 -3.55287e-09 -2.73679e-08 -3.93072e-09 -2.9717e-08 -4.26264e-09 -3.19385e-08 -4.53407e-09 -3.39941e-08 -4.73199e-09 -3.58546e-08 -4.8455e-09 -3.74929e-08 -3.88869e-08 -1.73969e-11 -7.21241e-10 -7.10971e-11 -2.27465e-09 -1.6334e-10 -3.98622e-09 -2.95744e-10 -5.84881e-09 -4.6932e-10 -7.85667e-09 -6.83617e-10 -9.99857e-09 -9.36782e-10 -1.22605e-08 -1.22512e-09 -1.46238e-08 -1.54311e-09 -1.70636e-08 -1.8833e-09 -1.95559e-08 -2.23646e-09 -2.20675e-08 -2.59183e-09 -2.45666e-08 -2.93748e-09 -2.70222e-08 -3.26076e-09 -2.93938e-08 -3.54881e-09 -3.16505e-08 -3.78918e-09 -3.37538e-08 -3.9704e-09 -3.56734e-08 -4.08254e-09 -3.73808e-08 -3.88518e-08 -1.41865e-11 -7.07055e-10 -5.79627e-11 -2.23088e-09 -1.3317e-10 -3.91101e-09 -2.41163e-10 -5.74082e-09 -3.82847e-10 -7.71498e-09 -5.58014e-10 -9.8234e-09 -7.65406e-10 -1.20531e-08 -1.00231e-09 -1.43869e-08 -1.26455e-09 -1.68014e-08 -1.54636e-09 -1.92741e-08 -1.84047e-09 -2.17734e-08 -2.13829e-09 -2.42688e-08 -2.43019e-09 -2.67303e-08 -2.70578e-09 -2.91182e-08 -2.95436e-09 -3.14019e-08 -3.16533e-09 -3.35428e-08 -3.32873e-09 -3.551e-08 -3.43565e-09 -3.72739e-08 -3.88088e-08 -1.15802e-11 -6.95475e-10 -4.73031e-11 -2.19515e-09 -1.08685e-10 -3.84963e-09 -1.96866e-10 -5.65264e-09 -3.12655e-10 -7.59919e-09 -4.56006e-10 -9.68005e-09 -6.26091e-10 -1.1883e-08 -8.2093e-10 -1.4192e-08 -1.03734e-09 -1.6585e-08 -1.27084e-09 -1.90406e-08 -1.51569e-09 -2.15285e-08 -1.76502e-09 -2.40195e-08 -2.01103e-09 -2.64843e-08 -2.24523e-09 -2.8884e-08 -2.45872e-09 -3.11884e-08 -2.64254e-09 -3.3359e-08 -2.7881e-09 -3.53644e-08 -2.8875e-09 -3.71745e-08 -3.87623e-08 -9.46217e-12 -6.86012e-10 -3.86409e-11 -2.16598e-09 -8.87855e-11 -3.79948e-09 -1.60853e-10 -5.58057e-09 -2.55555e-10 -7.50449e-09 -3.72952e-10 -9.56265e-09 -5.12529e-10 -1.17434e-08 -6.72838e-10 -1.40317e-08 -8.51454e-10 -1.64063e-08 -1.04488e-09 -1.88472e-08 -1.24858e-09 -2.13248e-08 -1.45703e-09 -2.38111e-08 -1.66394e-09 -2.62774e-08 -1.86236e-09 -2.86856e-08 -2.04492e-09 -3.10058e-08 -2.20407e-09 -3.31998e-08 -2.33246e-09 -3.5236e-08 -2.42317e-09 -3.70838e-08 -3.87154e-08 -7.73059e-12 -6.78282e-10 -3.15616e-11 -2.14215e-09 -7.25225e-11 -3.75852e-09 -1.31417e-10 -5.52168e-09 -2.08867e-10 -7.42705e-09 -3.05013e-10 -9.4665e-09 -4.19561e-10 -1.16289e-08 -5.51458e-10 -1.38998e-08 -6.98842e-10 -1.62589e-08 -8.58979e-10 -1.86871e-08 -1.02826e-09 -2.11556e-08 -1.20227e-09 -2.36371e-08 -1.37592e-09 -2.61037e-08 -1.54352e-09 -2.8518e-08 -1.69899e-09 -3.08504e-08 -1.836e-09 -3.30628e-08 -1.9483e-09 -3.51237e-08 -2.02986e-09 -3.70022e-08 -3.86701e-08 -6.31308e-12 -6.71969e-10 -2.57683e-11 -2.12269e-09 -5.92111e-11 -3.72507e-09 -1.07312e-10 -5.47358e-09 -1.70617e-10 -7.36375e-09 -2.49318e-10 -9.38779e-09 -3.43274e-10 -1.15349e-08 -4.51721e-10 -1.37914e-08 -5.73224e-10 -1.61374e-08 -7.05641e-10 -1.85547e-08 -8.46103e-10 -2.10151e-08 -9.91071e-10 -2.34921e-08 -1.13642e-09 -2.59584e-08 -1.27753e-09 -2.83769e-08 -1.40939e-09 -3.07185e-08 -1.52671e-09 -3.29455e-08 -1.62419e-09 -3.50262e-08 -1.69664e-09 -3.69297e-08 -3.86275e-08 -5.14686e-12 -6.66822e-10 -2.10036e-11 -2.10683e-09 -4.82647e-11 -3.69781e-09 -8.74917e-11 -5.43435e-09 -1.39161e-10 -7.31208e-09 -2.03497e-10 -9.32345e-09 -2.80467e-10 -1.1458e-08 -3.69515e-10 -1.37023e-08 -4.6953e-10 -1.60374e-08 -5.78823e-10 -1.84454e-08 -6.95117e-10 -2.08988e-08 -8.15579e-10 -2.33716e-08 -9.36877e-10 -2.58371e-08 -1.05526e-09 -2.82585e-08 -1.16661e-09 -3.06072e-08 -1.26653e-09 -3.28456e-08 -1.35054e-09 -3.49422e-08 -1.4142e-09 -3.68661e-08 -3.85884e-08 -4.18593e-12 -6.62636e-10 -1.70782e-11 -2.09394e-09 -3.92488e-11 -3.67564e-09 -7.11629e-11 -5.40244e-09 -1.13238e-10 -7.27001e-09 -1.65722e-10 -9.27096e-09 -2.2865e-10 -1.1395e-08 -3.01612e-10 -1.36294e-08 -3.8374e-10 -1.59553e-08 -4.73705e-10 -1.83554e-08 -5.69701e-10 -2.08028e-08 -6.69464e-10 -2.32719e-08 -7.70316e-10 -2.57362e-08 -8.69217e-10 -2.81596e-08 -9.62788e-10 -3.05136e-08 -1.04739e-09 -3.2761e-08 -1.11928e-09 -3.48704e-08 -1.17466e-09 -3.68107e-08 -3.85532e-08 -3.39223e-12 -6.59244e-10 -1.38371e-11 -2.0835e-09 -3.18033e-11 -3.65767e-09 -5.76752e-11 -5.37657e-09 -9.18218e-11 -7.23587e-09 -1.34508e-10 -9.22827e-09 -1.85801e-10 -1.13437e-08 -2.45392e-10 -1.35698e-08 -3.12604e-10 -1.58881e-08 -3.86384e-10 -1.82816e-08 -4.65308e-10 -2.07239e-08 -5.47579e-10 -2.31896e-08 -6.31049e-10 -2.56528e-08 -7.13259e-10 -2.80774e-08 -7.91452e-10 -3.04354e-08 -8.62629e-10 -3.26898e-08 -9.23663e-10 -3.48093e-08 -9.71356e-10 -3.6763e-08 -3.8522e-08 -2.7363e-12 -6.56508e-10 -1.11594e-11 -2.07507e-09 -2.56499e-11 -3.64318e-09 -4.65221e-11 -5.3557e-09 -7.41133e-11 -7.20828e-09 -1.0869e-10 -9.19369e-09 -1.50325e-10 -1.13021e-08 -1.98778e-10 -1.35213e-08 -2.53518e-10 -1.58333e-08 -3.13723e-10 -1.82214e-08 -3.78273e-10 -2.06593e-08 -4.45751e-10 -2.31221e-08 -5.14444e-10 -2.55841e-08 -5.82365e-10 -2.80095e-08 -6.47271e-10 -3.03705e-08 -7.06705e-10 -3.26303e-08 -7.58071e-10 -3.4758e-08 -7.98685e-10 -3.67224e-08 -3.84948e-08 -2.19331e-12 -6.54314e-10 -8.94309e-12 -2.06832e-09 -2.05566e-11 -3.63157e-09 -3.72949e-11 -5.33896e-09 -5.94667e-11 -7.18611e-09 -8.73213e-11 -9.16583e-09 -1.20921e-10 -1.12685e-08 -1.60074e-10 -1.34822e-08 -2.04371e-10 -1.5789e-08 -2.53178e-10 -1.81726e-08 -3.05622e-10 -2.06069e-08 -3.60592e-10 -2.30672e-08 -4.16728e-10 -2.55279e-08 -4.72426e-10 -2.79538e-08 -5.25873e-10 -3.0317e-08 -5.75059e-10 -3.25812e-08 -6.17843e-10 -3.47152e-08 -6.51986e-10 -3.66882e-08 -3.84716e-08 -1.74358e-12 -6.52571e-10 -7.10739e-12 -2.06296e-09 -1.63376e-11 -3.62234e-09 -2.96566e-11 -5.32564e-09 -4.73466e-11 -7.16842e-09 -6.96228e-11 -9.14356e-09 -9.65276e-11 -1.12416e-08 -1.27909e-10 -1.34508e-08 -1.63459e-10 -1.57535e-08 -2.02697e-10 -1.81334e-08 -2.44953e-10 -2.05646e-08 -2.89356e-10 -2.30228e-08 -3.34835e-10 -2.54824e-08 -3.80096e-10 -2.79085e-08 -4.23677e-10 -3.02735e-08 -4.63944e-10 -3.25409e-08 -4.99138e-10 -3.468e-08 -5.27399e-10 -3.666e-08 -3.84522e-08 -1.37184e-12 -6.51199e-10 -5.58988e-12 -2.05874e-09 -1.28507e-11 -3.61508e-09 -2.33464e-11 -5.31514e-09 -3.7332e-11 -7.15444e-09 -5.49739e-11 -9.12591e-09 -7.62937e-11 -1.12203e-08 -1.01178e-10 -1.34259e-08 -1.29408e-10 -1.57252e-08 -1.60627e-10 -1.81021e-08 -1.94322e-10 -2.05309e-08 -2.29819e-10 -2.29873e-08 -2.66273e-10 -2.5446e-08 -3.02646e-10 -2.78721e-08 -3.37763e-10 -3.02383e-08 -3.70299e-10 -3.25083e-08 -3.9881e-10 -3.46515e-08 -4.21761e-10 -3.6637e-08 -3.84364e-08 -1.0649e-12 -6.50134e-10 -4.33839e-12 -2.05547e-09 -9.97589e-12 -3.60944e-09 -1.81461e-11 -5.30697e-09 -2.90678e-11 -7.14352e-09 -4.28546e-11 -9.11213e-09 -5.95181e-11 -1.12036e-08 -7.89855e-11 -1.34064e-08 -1.0111e-10 -1.57031e-08 -1.25632e-10 -1.80776e-08 -1.52164e-10 -2.05044e-08 -1.80184e-10 -2.29592e-08 -2.09028e-10 -2.54171e-08 -2.37866e-10 -2.78433e-08 -2.65758e-10 -3.02105e-08 -2.91628e-10 -3.24825e-08 -3.14297e-10 -3.46288e-08 -3.32493e-10 -3.66188e-08 -3.8424e-08 -8.13443e-13 -6.49321e-10 -3.31254e-12 -2.05297e-09 -7.62124e-12 -3.60513e-09 -1.3885e-11 -5.30071e-09 -2.22778e-11 -7.13512e-09 -3.28642e-11 -9.10154e-09 -4.56611e-11 -1.11908e-08 -6.06322e-11 -1.33915e-08 -7.76926e-11 -1.5686e-08 -9.66509e-11 -1.80587e-08 -1.1722e-10 -2.04838e-08 -1.39002e-10 -2.29375e-08 -1.61466e-10 -2.53947e-08 -1.83963e-10 -2.78208e-08 -2.05733e-10 -3.01887e-08 -2.25907e-10 -3.24623e-08 -2.43518e-10 -3.46112e-08 -2.57511e-10 -3.66048e-08 -3.84148e-08 -6.06732e-13 -6.48714e-10 -2.46967e-12 -2.05111e-09 -5.68743e-12 -3.60191e-09 -1.03866e-11 -5.29601e-09 -1.66907e-11 -7.12882e-09 -2.4635e-11 -9.09359e-09 -3.42506e-11 -1.11812e-08 -4.5532e-11 -1.33802e-08 -5.84337e-11 -1.56731e-08 -7.28191e-11 -1.80443e-08 -8.84766e-11 -2.04682e-08 -1.05101e-10 -2.29209e-08 -1.22277e-10 -2.53775e-08 -1.39489e-10 -2.78036e-08 -1.56133e-10 -3.0172e-08 -1.715e-10 -3.24469e-08 -1.84793e-10 -3.45979e-08 -1.95132e-10 -3.65945e-08 -3.84083e-08 -4.42362e-13 -6.48271e-10 -1.79829e-12 -2.04975e-09 -4.14728e-12 -3.59956e-09 -7.58702e-12 -5.29257e-09 -1.21896e-11 -7.12422e-09 -1.79815e-11 -9.0878e-09 -2.50107e-11 -1.11742e-08 -3.32954e-11 -1.33719e-08 -4.28167e-11 -1.56636e-08 -5.3482e-11 -1.80336e-08 -6.51392e-11 -2.04565e-08 -7.75557e-11 -2.29084e-08 -9.04069e-11 -2.53646e-08 -1.03285e-10 -2.77907e-08 -1.15705e-10 -3.01596e-08 -1.27085e-10 -3.24356e-08 -1.36764e-10 -3.45882e-08 -1.44e-10 -3.65873e-08 -3.84044e-08 -3.07982e-13 -6.47963e-10 -1.25197e-12 -2.04881e-09 -2.89706e-12 -3.59792e-09 -5.31085e-12 -5.29016e-09 -8.53254e-12 -7.12099e-09 -1.26031e-11 -9.08373e-09 -1.75842e-11 -1.11692e-08 -2.3504e-11 -1.3366e-08 -3.03567e-11 -1.56568e-08 -3.80796e-11 -1.80259e-08 -4.65612e-11 -2.0448e-08 -5.56248e-11 -2.28994e-08 -6.50188e-11 -2.53552e-08 -7.44223e-11 -2.77813e-08 -8.34433e-11 -3.01506e-08 -9.16028e-11 -3.24274e-08 -9.83438e-11 -3.45815e-08 -1.03032e-10 -3.65826e-08 -3.84024e-08 -2.11116e-13 -6.47752e-10 -8.56973e-13 -2.04816e-09 -1.98365e-12 -3.59679e-09 -3.62161e-12 -5.28852e-09 -5.79399e-12 -7.11882e-09 -8.55097e-12 -9.08098e-09 -1.1957e-11 -1.11658e-08 -1.60438e-11 -1.33619e-08 -2.08184e-11 -1.5652e-08 -2.62486e-11 -1.80205e-08 -3.22591e-11 -2.0442e-08 -3.87208e-11 -2.28929e-08 -4.54391e-11 -2.53485e-08 -5.21591e-11 -2.77746e-08 -5.85546e-11 -3.01442e-08 -6.42223e-11 -3.24217e-08 -6.86819e-11 -3.4577e-08 -7.13778e-11 -3.65799e-08 -3.84021e-08 -1.2926e-13 -6.47623e-10 -5.26766e-13 -2.04777e-09 -1.22311e-12 -3.5961e-09 -2.23382e-12 -5.28751e-09 -3.59916e-12 -7.11745e-09 -5.3806e-12 -9.0792e-09 -7.64145e-12 -1.11635e-08 -1.04159e-11 -1.33591e-08 -1.37169e-11 -1.56487e-08 -1.75249e-11 -1.80167e-08 -2.17831e-11 -2.04378e-08 -2.63917e-11 -2.28883e-08 -3.11889e-11 -2.53437e-08 -3.59688e-11 -2.77698e-08 -4.04521e-11 -3.01397e-08 -4.4294e-11 -3.24179e-08 -4.70738e-11 -3.45742e-08 -4.82969e-11 -3.65787e-08 -3.8403e-08 -8.86534e-14 -6.47534e-10 -3.59292e-13 -2.04749e-09 -8.20196e-13 -3.59563e-09 -1.48392e-12 -5.28685e-09 -2.39277e-12 -7.11654e-09 -3.59537e-12 -9.07799e-09 -5.13937e-12 -1.1162e-08 -7.05626e-12 -1.33572e-08 -9.36207e-12 -1.56464e-08 -1.20543e-11 -1.8014e-08 -1.50968e-11 -2.04347e-08 -1.84191e-11 -2.2885e-08 -2.18947e-11 -2.53403e-08 -2.53523e-11 -2.77663e-08 -2.85498e-11 -3.01365e-08 -3.11808e-11 -3.24153e-08 -3.28636e-11 -3.45726e-08 -3.31418e-11 -3.65784e-08 -3.84047e-08 -4.90662e-14 -2.00358e-13 -4.6507e-13 -8.6985e-13 -1.46078e-12 -2.28671e-12 -3.39857e-12 -4.83657e-12 -6.62768e-12 -8.78248e-12 -1.12715e-11 -1.40327e-11 -1.69574e-11 -1.98791e-11 -2.25698e-11 -2.47351e-11 -2.60067e-11 -2.59423e-11 ) ; boundaryField { inlet { type calculated; value nonuniform List<scalar> 38 ( -6.47485e-10 -6.47485e-10 -2.04734e-09 -2.04734e-09 -3.59537e-09 -3.59537e-09 -5.28644e-09 -5.28644e-09 -7.11595e-09 -7.11595e-09 -9.07716e-09 -9.07717e-09 -1.11609e-08 -1.11609e-08 -1.33558e-08 -1.33558e-08 -1.56446e-08 -1.56446e-08 -1.80118e-08 -1.80118e-08 -2.04322e-08 -2.04322e-08 -2.28822e-08 -2.28822e-08 -2.53373e-08 -2.53373e-08 -2.77634e-08 -2.77634e-08 -3.01338e-08 -3.01338e-08 -3.24131e-08 -3.24131e-08 -3.45713e-08 -3.45713e-08 -3.65784e-08 -3.65784e-08 -3.84066e-08 -3.84066e-08 ) ; } outlet { type calculated; value nonuniform List<scalar> 0(); } walls { type calculated; value uniform 0; } side1 { type cyclic; value nonuniform List<scalar> 1666 ( -1.28339e-15 -2.13829e-15 -3.59471e-15 1.33336e-16 -5.50902e-15 9.45592e-16 -5.20692e-15 -1.30557e-15 -3.14543e-15 -4.97179e-15 1.27641e-16 -4.31884e-15 1.54405e-15 -3.78356e-15 5.63146e-16 -2.88104e-15 2.52196e-16 -2.25664e-15 -2.65344e-16 -1.97653e-15 -5.88815e-16 -1.43908e-15 -8.03527e-16 -1.79888e-15 -1.18849e-15 -2.08353e-15 -1.70024e-15 -2.25427e-15 -1.91141e-15 -2.04564e-15 -2.01943e-15 -2.09327e-15 -1.99e-15 -2.22576e-15 -2.17156e-15 -2.17843e-15 -2.20614e-15 -2.33036e-15 -2.33888e-15 -2.47536e-15 -2.43991e-15 -2.48979e-15 -2.40438e-15 -2.48847e-15 -2.42316e-15 -2.377e-15 -2.4707e-15 -2.35979e-15 -2.68091e-15 -2.75041e-15 -3.17334e-15 -2.83401e-15 -3.24895e-15 -3.32428e-15 -3.81585e-15 -3.55055e-15 -4.18625e-15 -4.35267e-15 -4.86538e-15 -4.37647e-15 -4.77196e-15 -5.38759e-15 -6.17048e-15 -6.57168e-15 -7.64025e-15 -8.4728e-15 -9.56198e-15 -1.05951e-14 -1.17518e-14 -1.32455e-14 -1.46966e-14 -1.65517e-14 -1.8282e-14 -2.00977e-14 -2.17903e-14 -2.3419e-14 -2.39835e-14 -2.37324e-14 -2.18792e-14 -1.98532e-14 -1.69862e-14 -1.45589e-14 -1.1986e-14 -9.54346e-15 -7.29166e-15 -5.42171e-15 -4.42849e-15 -3.62283e-15 -3.09504e-15 -2.58832e-15 -2.20412e-15 -1.83773e-15 -1.53619e-15 -1.26641e-15 -1.06001e-15 -9.12954e-16 -7.76414e-16 -6.54015e-16 -5.39368e-16 -4.25103e-16 -3.42308e-16 -2.98759e-16 -2.67662e-16 -2.50336e-16 -2.37884e-16 -2.27084e-16 -2.20783e-16 -2.14864e-16 -2.10485e-16 -2.05917e-16 -2.0592e-16 -2.04277e-16 -2.03381e-16 -2.0178e-16 -2.01481e-16 -2.04658e-16 -2.07361e-16 -7.04911e-15 -1.63194e-15 -2.27937e-15 -2.14771e-15 -3.74373e-15 -1.89858e-15 -3.7213e-15 -2.37402e-15 -6.61661e-15 -5.57196e-15 -6.71962e-15 -7.21419e-15 -2.55156e-15 -8.88802e-15 -4.31805e-15 -6.23924e-15 -6.87479e-15 -5.71021e-15 -8.8094e-15 -9.38052e-15 -8.13482e-15 -1.14194e-14 -9.10583e-15 -9.38706e-15 -8.84641e-15 -5.64196e-15 -5.52484e-15 -6.08147e-15 -5.49393e-15 -6.17082e-15 -5.25596e-15 -6.56566e-15 -6.05922e-15 -6.538e-15 -6.60208e-15 -6.70896e-15 -6.79682e-15 -6.37113e-15 -6.95665e-15 -5.88464e-15 -6.25405e-15 -5.91838e-15 -7.15179e-15 -5.20531e-15 -7.28359e-15 -6.84522e-15 -7.80974e-15 -8.59667e-15 -8.7107e-15 -9.08892e-15 -8.63155e-15 -9.82599e-15 -8.9465e-15 -9.08382e-15 -8.00959e-15 -8.88384e-15 -7.45409e-15 -7.74225e-15 -7.64468e-15 -8.91967e-15 -1.00024e-14 -1.06354e-14 -1.1261e-14 -1.24815e-14 -1.24194e-14 -1.29958e-14 -1.4113e-14 -1.24689e-14 -1.44396e-14 -1.31669e-14 -1.40996e-14 -1.37015e-14 -1.41986e-14 -1.53987e-14 -1.67908e-14 -2.05138e-14 -2.30498e-14 -2.53422e-14 -2.59513e-14 -2.65006e-14 -2.67988e-14 -2.62316e-14 -2.53572e-14 -2.24326e-14 -1.88971e-14 -1.51084e-14 -1.23884e-14 -9.89724e-15 -8.39712e-15 -7.14102e-15 -5.86135e-15 -4.72625e-15 -3.87638e-15 -3.2411e-15 -2.63124e-15 -2.19958e-15 -1.83658e-15 -1.53636e-15 -1.33058e-15 -1.0887e-15 -9.56746e-16 -8.61293e-16 -8.17615e-16 -7.46853e-16 -7.1265e-16 -6.77992e-16 -6.79822e-16 -6.4977e-16 -6.42151e-16 -6.45056e-16 -6.29384e-16 -6.30559e-16 -6.32989e-16 -6.37331e-16 -6.54249e-16 -6.35174e-16 -6.41774e-16 -9.24514e-15 -9.10969e-15 -2.23817e-14 -1.91413e-14 -2.17336e-14 -1.8871e-14 -2.2664e-14 -1.95513e-14 -1.54706e-14 -1.6757e-14 -1.15966e-14 -1.00165e-14 -1.56413e-14 -4.22861e-16 -8.48509e-15 -6.34843e-15 -5.1493e-15 -6.11094e-15 -1.83597e-15 -1.14854e-15 -2.43719e-15 1.41252e-16 -2.45134e-15 -3.88623e-15 -2.42721e-15 -4.64643e-15 -2.92454e-15 -2.80775e-15 -4.59747e-15 -1.16113e-15 -4.14667e-15 -4.31489e-15 -5.00192e-15 -4.51756e-15 -4.97773e-15 -5.18601e-15 -5.89184e-15 -5.21664e-15 -5.45723e-15 -5.84569e-15 -6.37299e-15 -6.59102e-15 -7.65844e-15 -6.81907e-15 -8.74255e-15 -7.64127e-15 -9.02493e-15 -9.77194e-15 -9.51654e-15 -1.08068e-14 -1.02346e-14 -1.15969e-14 -1.11826e-14 -1.20993e-14 -1.13538e-14 -1.09577e-14 -1.01427e-14 -1.05171e-14 -9.07028e-15 -8.84691e-15 -8.07544e-15 -8.72698e-15 -8.75037e-15 -7.77705e-15 -7.1109e-15 -7.16737e-15 -6.45024e-15 -5.23119e-15 -5.42569e-15 -3.30941e-15 -3.80499e-15 -2.98187e-15 -2.66692e-15 -3.64107e-15 -3.72542e-15 -5.75108e-15 -7.80361e-15 -7.05039e-15 -9.06753e-15 -1.10987e-14 -1.34479e-14 -1.57786e-14 -1.90562e-14 -2.05947e-14 -2.09508e-14 -1.99117e-14 -1.81909e-14 -1.63035e-14 -1.43809e-14 -1.22959e-14 -1.02976e-14 -8.40562e-15 -6.96603e-15 -5.62021e-15 -4.52844e-15 -3.5972e-15 -2.92329e-15 -2.40027e-15 -1.86851e-15 -1.67692e-15 -1.50553e-15 -1.4346e-15 -1.23747e-15 -1.26001e-15 -1.16019e-15 -1.14568e-15 -1.10937e-15 -1.10059e-15 -1.09605e-15 -1.07908e-15 -1.1028e-15 -1.08e-15 -1.09083e-15 -1.10502e-15 -1.09561e-15 -1.16372e-15 -1.10106e-15 -1.40497e-14 -2.9102e-15 -9.6732e-15 -8.37287e-15 -1.17233e-14 -6.26136e-15 -9.69245e-15 -5.80315e-15 -5.76216e-15 -1.29373e-14 -6.59705e-15 -1.08129e-14 -1.11534e-14 -6.96411e-15 -1.79562e-14 -8.78631e-15 -1.29434e-14 -1.31985e-14 -1.10301e-14 -8.30168e-15 -1.03498e-14 -8.55878e-15 -1.0219e-14 -8.51964e-15 -6.87002e-15 -7.05641e-15 -5.45501e-15 -5.75596e-15 -6.029e-15 -5.72499e-15 -8.10209e-15 -6.59523e-15 -9.32431e-15 -9.44001e-15 -1.03747e-14 -1.04679e-14 -1.12331e-14 -9.85406e-15 -1.20712e-14 -1.09058e-14 -1.1226e-14 -1.27068e-14 -1.27143e-14 -1.05413e-14 -9.27237e-15 -1.23411e-14 -1.10692e-14 -1.14118e-14 -1.17053e-14 -1.17157e-14 -1.15485e-14 -1.0725e-14 -1.08986e-14 -1.06441e-14 -1.15733e-14 -8.44532e-15 -9.0817e-15 -9.44366e-15 -9.21421e-15 -8.89546e-15 -9.26449e-15 -1.17313e-14 -1.16633e-14 -1.15133e-14 -1.2389e-14 -9.94708e-15 -1.10934e-14 -9.62522e-15 -7.36561e-15 -7.80877e-15 -5.49302e-15 7.59114e-16 3.48151e-15 7.57959e-15 1.18969e-14 1.82399e-14 2.15779e-14 2.5811e-14 2.48487e-14 2.53704e-14 2.23103e-14 1.65398e-14 1.34957e-14 8.80426e-15 5.13906e-15 -1.35095e-16 -2.72597e-15 -5.10403e-15 -6.03776e-15 -6.96099e-15 -6.62581e-15 -6.95163e-15 -6.04051e-15 -5.49378e-15 -4.81888e-15 -4.40932e-15 -3.61166e-15 -3.149e-15 -2.87541e-15 -2.34991e-15 -2.27563e-15 -1.97923e-15 -1.96553e-15 -1.73169e-15 -1.82905e-15 -1.70153e-15 -1.52886e-15 -1.64604e-15 -1.56228e-15 -1.57702e-15 -1.54361e-15 -1.63591e-15 -1.6064e-15 -1.59715e-15 -1.6132e-15 -1.55142e-15 -1.76065e-15 -2.94629e-14 -3.08184e-14 -2.89222e-14 -4.36544e-14 -3.56755e-14 -2.53427e-14 -1.84661e-14 -1.36458e-14 -4.33068e-15 1.66049e-14 1.51974e-14 1.95234e-14 9.23268e-15 -1.1417e-14 -2.13423e-14 3.45275e-15 4.28315e-15 3.4926e-16 3.43293e-15 -1.84684e-15 -1.56008e-15 -1.71962e-15 -4.18442e-15 -4.03718e-15 -3.99672e-15 -1.23239e-14 -1.07161e-14 -1.37866e-14 -1.62536e-14 -1.00523e-14 -1.57335e-14 -9.24708e-15 -1.10705e-14 -1.05492e-14 -9.05375e-15 -1.05744e-14 -1.15384e-14 -1.26561e-14 -1.45209e-14 -1.42794e-14 -1.58651e-14 -1.35793e-14 -1.27198e-14 -1.66668e-14 -1.43782e-14 -1.4918e-14 -1.46063e-14 -1.31486e-14 -1.31204e-14 -1.24517e-14 -1.23738e-14 -1.12921e-14 -1.16618e-14 -1.10952e-14 -9.28282e-15 -1.74441e-14 -1.507e-14 -1.33601e-14 -1.24287e-14 -1.20694e-14 -1.24324e-14 -8.46608e-15 -8.73236e-15 -9.09473e-15 -9.54106e-15 -8.34349e-15 -9.49772e-15 -1.00187e-14 -1.14777e-14 -1.2525e-14 -1.45379e-14 -2.47147e-14 -3.15477e-14 -4.2404e-14 -5.72673e-14 -7.458e-14 -9.25994e-14 -9.51249e-14 -8.31085e-14 -6.44591e-14 -4.97519e-14 -3.27155e-14 -2.30343e-14 -1.96213e-14 -1.44896e-14 -8.7275e-15 -5.09592e-15 -4.47239e-15 -3.80969e-15 -3.57114e-15 -3.20737e-15 -3.97181e-15 -3.44352e-15 -3.4348e-15 -3.50696e-15 -3.41945e-15 -3.20626e-15 -3.10958e-15 -2.9765e-15 -2.84187e-15 -2.79581e-15 -2.80357e-15 -2.87118e-15 -2.54896e-15 -2.65991e-15 -2.55858e-15 -2.37499e-15 -2.30724e-15 -2.22779e-15 -2.19054e-15 -2.17031e-15 -2.16855e-15 -2.13859e-15 -2.10802e-15 -2.12136e-15 -2.09027e-15 -2.25777e-15 -2.7947e-14 -3.50345e-14 -3.3398e-14 -1.56638e-14 -8.85408e-15 -2.00514e-14 -8.36694e-15 -4.69999e-15 4.38198e-15 -7.26152e-16 -4.84783e-15 -1.3779e-15 -2.18241e-14 3.11991e-14 1.6883e-14 -6.60069e-15 -4.69865e-15 -5.18037e-15 -9.04908e-16 -2.96561e-16 2.47345e-15 -3.39994e-15 -2.06704e-15 -1.29843e-14 -1.45021e-14 -1.11033e-14 -1.33e-14 -1.43017e-14 -1.65673e-14 -1.3066e-14 -1.46223e-14 -1.25851e-14 -1.37184e-14 -8.95016e-15 -1.0557e-14 -9.77774e-15 -1.2227e-14 -1.31392e-14 -1.22128e-14 -1.13651e-14 -1.23995e-14 -3.8202e-15 -3.70192e-15 -1.56263e-14 -1.2835e-14 -1.32369e-14 -1.3458e-14 -1.23747e-14 -1.27943e-14 -1.42222e-14 -1.57348e-14 -2.95339e-15 -4.18165e-15 -4.59513e-15 2.50524e-16 -1.73035e-14 -1.32106e-14 -1.42396e-14 -1.41988e-14 -1.42608e-14 -1.46233e-14 -1.52273e-14 -1.54395e-14 -1.32283e-14 -1.33567e-14 -1.34768e-14 -1.26744e-14 -4.45586e-15 -5.02345e-15 -8.53646e-15 -6.92001e-15 -2.09348e-14 -2.23607e-14 -2.72836e-14 -3.47245e-14 -4.03834e-14 -4.98364e-14 -5.12951e-14 -4.5728e-14 -4.06272e-14 -3.21702e-14 -2.57763e-14 -2.21975e-14 -1.17849e-14 -9.03056e-15 -7.87297e-15 -5.22765e-15 -3.11114e-15 -1.91457e-15 -1.21561e-15 -9.7714e-16 -8.29849e-16 -1.03235e-15 -1.24979e-15 -1.45488e-15 -1.51353e-15 -1.73018e-15 -1.91809e-15 -2.04773e-15 -2.26747e-15 -2.43377e-15 -2.51993e-15 -2.49879e-15 -2.42315e-15 -2.37357e-15 -2.36972e-15 -2.45312e-15 -2.49177e-15 -2.55498e-15 -2.58705e-15 -2.63357e-15 -2.609e-15 -2.66571e-15 -2.81695e-15 -2.80425e-15 -2.78299e-15 -2.90046e-15 2.38044e-14 3.76458e-14 3.03342e-14 3.44613e-14 4.35454e-14 7.08386e-15 7.35567e-15 -2.00732e-14 -2.53507e-14 -9.74894e-14 -1.11761e-13 -1.04745e-13 -1.31203e-13 -1.86895e-14 -3.29117e-14 -2.49225e-14 -1.94741e-14 -2.23932e-14 -2.36563e-14 -2.42542e-14 -2.67208e-14 -3.0193e-14 -2.39382e-14 -2.00851e-14 -1.77798e-14 -1.2271e-14 -1.41242e-14 -1.19524e-14 -8.81072e-15 -1.04025e-14 -1.01455e-14 -1.98368e-14 -2.33268e-14 -1.27632e-14 -1.61436e-14 -1.4134e-14 -1.46606e-14 -1.1734e-14 -1.04664e-14 -1.20352e-14 -5.83675e-15 -2.56891e-14 -2.44104e-14 -1.23838e-14 -1.29951e-14 -1.29787e-14 -1.13236e-14 -1.27459e-14 -1.27725e-14 -1.28121e-14 -4.53052e-15 -3.28536e-14 -2.77393e-14 -2.42869e-14 -2.67702e-14 -1.46707e-14 -1.75345e-14 -1.71898e-14 -1.77531e-14 -1.88192e-14 -1.81202e-14 -1.85193e-14 -1.75011e-14 -1.93144e-14 -1.89054e-14 -1.70788e-14 -1.06426e-14 -3.2837e-14 -2.51592e-14 -2.15844e-14 -1.61712e-14 -8.25049e-16 1.2082e-14 3.49744e-14 5.73374e-14 9.19885e-14 1.20488e-13 1.39813e-13 1.05168e-13 7.70693e-14 6.36887e-14 4.93709e-14 3.68578e-14 2.90048e-14 2.27803e-14 1.74456e-14 1.34086e-14 9.87399e-15 6.64402e-15 4.62069e-15 3.06003e-15 1.79368e-15 8.6292e-16 1.29437e-16 -4.65056e-16 -8.31893e-16 -1.29149e-15 -1.52045e-15 -1.7857e-15 -2.04513e-15 -2.21871e-15 -2.28448e-15 -2.31303e-15 -2.42994e-15 -2.47149e-15 -2.51806e-15 -2.70997e-15 -2.74615e-15 -2.87053e-15 -2.90324e-15 -2.93422e-15 -3.02071e-15 -3.11781e-15 -3.14662e-15 -3.2483e-15 -3.12977e-15 -3.16457e-15 -1.14511e-15 -3.99223e-14 -7.5287e-15 -1.63152e-14 1.10104e-14 3.57018e-14 2.261e-14 3.29199e-14 -1.11054e-14 1.19419e-13 1.03729e-13 8.90886e-14 9.42916e-14 7.91066e-15 1.42685e-14 8.74827e-15 5.35272e-15 -3.48453e-15 -4.36263e-15 -7.71159e-15 -8.90806e-15 -1.18239e-14 -4.00147e-15 -5.54605e-15 -4.7207e-15 3.12715e-15 4.19871e-16 -3.05321e-15 -4.13222e-15 -6.16703e-15 -9.36869e-15 5.28008e-16 2.17676e-15 -1.42129e-14 -1.18239e-14 -6.64504e-15 -9.48324e-15 -1.02388e-14 -1.15851e-14 -1.17033e-14 -8.39703e-15 -2.22441e-14 -1.66501e-14 -7.88191e-15 -6.80779e-15 -7.50915e-15 -1.09593e-14 -9.41567e-15 -1.12385e-14 -1.05388e-14 4.69097e-18 -1.89423e-14 -1.20763e-14 -7.91618e-15 -8.10199e-15 -4.96249e-15 -5.28943e-15 -4.4252e-15 -3.40117e-15 -2.28466e-15 -1.33875e-15 -4.92233e-15 -5.73163e-15 -1.5682e-15 1.15967e-15 1.3717e-15 5.65037e-15 -1.02458e-14 -6.32989e-15 -7.41296e-15 -1.3515e-14 -2.07385e-14 -4.25956e-14 -7.90315e-14 -1.49034e-13 -2.08826e-13 -3.01307e-13 -3.29414e-13 -2.28751e-13 -1.88166e-13 -1.45752e-13 -1.07606e-13 -8.36995e-14 -6.63189e-14 -5.04914e-14 -3.95907e-14 -3.06353e-14 -2.45286e-14 -2.08931e-14 -1.72477e-14 -1.46386e-14 -1.22074e-14 -1.07219e-14 -8.81486e-15 -7.99247e-15 -6.84872e-15 -6.34364e-15 -5.78616e-15 -5.40822e-15 -4.83513e-15 -4.59223e-15 -4.20493e-15 -4.06749e-15 -4.13143e-15 -4.12208e-15 -3.81704e-15 -3.8254e-15 -3.68491e-15 -3.6546e-15 -3.80724e-15 -3.79151e-15 -3.71822e-15 -3.73382e-15 -3.67571e-15 -3.79767e-15 -3.50253e-15 -3.78624e-15 1.82931e-14 6.30703e-15 3.41611e-15 2.69682e-14 1.46737e-15 -5.19404e-14 -6.55888e-14 -1.63273e-13 -4.75506e-14 -4.11093e-14 -6.73396e-14 -5.56991e-14 -5.20944e-14 -6.25354e-14 -4.31937e-14 -2.716e-14 -2.12423e-14 -1.96662e-14 -1.93472e-14 -9.49503e-15 -1.51165e-14 -1.30974e-14 -1.55035e-14 -2.73284e-14 -2.85558e-15 1.17803e-15 -5.38554e-15 -5.54157e-15 -1.26628e-14 -1.59319e-14 -1.1624e-14 -1.87659e-15 -1.82185e-14 -1.99285e-14 -1.55604e-14 -1.37812e-14 -1.30501e-14 -1.12016e-14 -6.21854e-15 1.6561e-14 -9.71077e-15 -7.76622e-15 4.76805e-15 -4.99868e-15 -1.05555e-14 -1.3701e-14 -1.77026e-14 -2.47336e-14 -2.15981e-14 6.47876e-15 -2.7797e-14 -3.28457e-14 -1.66367e-14 -1.02652e-14 -5.96925e-15 -7.58468e-15 -7.8311e-15 -9.07007e-15 -1.14676e-14 -1.39666e-14 -1.83556e-14 -1.97688e-14 -1.71363e-14 -1.82555e-14 -2.41686e-14 -8.54627e-15 -3.49473e-14 -3.06061e-14 -1.86398e-14 -1.49872e-14 -8.22491e-15 1.68772e-15 2.41566e-14 7.67386e-14 1.54307e-13 3.02073e-13 3.63682e-13 2.29669e-13 1.4636e-13 1.10769e-13 7.88763e-14 5.69568e-14 4.55723e-14 3.45891e-14 2.54335e-14 1.92745e-14 1.68612e-14 1.25324e-14 9.70821e-15 7.12854e-15 5.18851e-15 3.63834e-15 1.39838e-15 1.68334e-16 -7.02766e-16 -1.73777e-15 -2.29688e-15 -2.9236e-15 -3.24877e-15 -3.73936e-15 -3.64735e-15 -3.75447e-15 -3.32664e-15 -3.28519e-15 -3.38205e-15 -3.58279e-15 -3.68296e-15 -3.90159e-15 -3.64701e-15 -3.88168e-15 -3.92382e-15 -4.04143e-15 -4.05239e-15 -4.19593e-15 -4.1135e-15 -4.36885e-15 -2.68967e-14 -2.89566e-14 -3.81596e-14 -9.07762e-16 2.77326e-14 7.3274e-14 1.30779e-13 6.87468e-14 2.15427e-13 7.33805e-14 -2.67199e-14 -7.82617e-14 -1.58232e-13 -1.8923e-13 -1.33313e-13 -5.13257e-14 5.09674e-15 3.23379e-14 2.56641e-14 1.09747e-14 -7.62174e-15 -2.34942e-14 -4.16653e-14 -5.71386e-14 -2.73397e-14 -1.78748e-14 -1.01101e-14 -1.19573e-15 -2.10639e-14 -4.60273e-14 -4.70225e-14 -2.79253e-14 -6.95499e-15 4.99404e-14 3.35777e-14 4.06318e-15 5.76021e-15 -3.03548e-15 -4.93231e-15 2.61864e-14 -1.80318e-15 3.38458e-14 4.81374e-14 3.01588e-14 6.88145e-15 -2.0484e-14 -3.70039e-14 -3.74404e-14 -1.85603e-14 2.30596e-14 -3.22304e-14 -3.17635e-14 -2.42522e-14 -4.56571e-15 5.01767e-16 -1.32151e-15 -2.89237e-16 -1.93613e-15 -2.01497e-15 -2.22128e-15 1.71816e-15 3.92123e-15 1.65431e-14 3.18675e-14 3.87041e-14 1.06287e-15 -6.88051e-14 -3.05587e-14 -1.06829e-14 1.40878e-15 9.50495e-15 1.34194e-14 2.85387e-14 4.05431e-14 -2.858e-14 -3.06799e-13 -5.75149e-13 -3.37305e-13 -2.32178e-13 -1.64759e-13 -1.29521e-13 -1.00296e-13 -7.70825e-14 -6.01853e-14 -4.81021e-14 -3.83429e-14 -3.22287e-14 -2.65812e-14 -2.19771e-14 -1.86845e-14 -1.57411e-14 -1.29023e-14 -1.19856e-14 -9.99756e-15 -8.922e-15 -8.40093e-15 -7.7243e-15 -7.42095e-15 -6.79899e-15 -6.3755e-15 -5.76871e-15 -5.29627e-15 -5.31406e-15 -4.96737e-15 -4.68356e-15 -4.65463e-15 -4.63483e-15 -4.75114e-15 -4.46334e-15 -4.56311e-15 -4.60677e-15 -4.65306e-15 -4.53786e-15 -4.76991e-15 -4.6104e-15 -4.27915e-15 -1.08366e-14 -7.80569e-15 1.08853e-14 1.73592e-14 -4.13922e-16 8.12123e-15 2.46008e-14 -7.31624e-14 1.41923e-13 1.86948e-14 1.35401e-14 -4.01971e-15 1.05638e-14 3.08432e-14 -2.28366e-15 -1.97282e-14 -3.69607e-14 -3.08002e-14 -3.15499e-14 -1.9086e-14 -1.75232e-14 -2.09601e-14 -2.24767e-14 -1.95461e-14 -2.07652e-15 -6.65556e-15 -7.31217e-15 -1.5347e-14 -3.0728e-14 -6.99266e-14 -1.01184e-13 -1.10298e-13 -5.10994e-14 9.24093e-14 5.68775e-14 -9.88652e-15 -2.97206e-13 -1.86786e-13 -1.48757e-13 -1.11694e-13 -8.86899e-14 -7.12483e-14 -5.6819e-14 -4.62127e-14 -3.6753e-14 -3.05235e-14 -2.49429e-14 -2.08426e-14 -1.7348e-14 -1.50352e-14 -1.29192e-14 -1.06258e-14 -1.04903e-14 -8.81146e-15 -7.9487e-15 -7.6728e-15 -7.18701e-15 -6.94333e-15 -6.54e-15 -6.26978e-15 -5.82774e-15 -5.44614e-15 -5.30741e-15 -5.09001e-15 -4.79907e-15 -4.80688e-15 -4.84967e-15 -5.02071e-15 -4.76485e-15 -4.91809e-15 -4.89744e-15 -4.93215e-15 -4.8395e-15 -5.03237e-15 -4.93299e-15 -4.74877e-15 -3.71434e-16 -2.12572e-15 -7.20687e-15 -1.78211e-14 -3.08942e-14 -3.66186e-14 -3.58655e-14 -4.2028e-14 -5.2843e-14 -8.71832e-14 -5.39848e-14 -2.06462e-14 -1.63183e-14 -1.15815e-14 -2.45674e-14 -2.8099e-14 -1.45717e-14 -1.59317e-14 -1.44286e-14 -1.11374e-14 -9.27297e-15 -3.91316e-15 -2.53397e-15 -3.14757e-15 -5.98259e-15 -3.4923e-15 -1.56547e-15 -4.1638e-15 8.00892e-15 1.83788e-14 1.3248e-14 1.18239e-14 4.10448e-15 8.82493e-15 1.17939e-14 8.85988e-15 6.50746e-13 5.31999e-13 4.26048e-13 3.27943e-13 2.57202e-13 1.98313e-13 1.563e-13 1.24109e-13 9.83002e-14 7.66375e-14 6.18682e-14 4.95342e-14 4.03422e-14 3.2152e-14 2.57351e-14 2.0897e-14 1.46135e-14 1.14614e-14 8.50115e-15 5.8888e-15 3.96863e-15 2.28756e-15 1.10565e-15 1.50973e-16 -3.41659e-16 -1.04157e-15 -1.74659e-15 -2.37996e-15 -2.84629e-15 -3.35668e-15 -3.81822e-15 -4.27405e-15 -3.90444e-15 -4.22883e-15 -4.47531e-15 -4.7908e-15 -4.92911e-15 -4.94933e-15 -5.07239e-15 -5.29495e-15 -1.37386e-16 -2.18229e-16 -4.67642e-16 -1.02015e-15 -1.24138e-15 8.26055e-16 6.08069e-15 9.80286e-15 1.53695e-14 1.64963e-14 1.12004e-14 1.53277e-15 -3.54257e-15 4.08415e-16 4.1575e-15 6.53819e-15 1.05518e-14 7.83228e-15 5.22889e-15 2.39671e-15 1.31862e-15 9.44479e-16 -6.21945e-16 -2.29743e-15 -3.72927e-15 -5.35065e-15 -2.77738e-15 -2.99101e-15 -5.22355e-15 -6.63162e-15 -6.84525e-15 -5.89546e-15 -6.32264e-15 -2.92116e-15 -1.72712e-15 -5.46043e-16 -2.80916e-13 -2.61746e-13 -2.17489e-13 -1.76141e-13 -1.43624e-13 -1.17544e-13 -9.58224e-14 -7.90692e-14 -6.35384e-14 -5.26254e-14 -4.41883e-14 -3.63713e-14 -3.24961e-14 -2.74149e-14 -2.33103e-14 -1.99635e-14 -1.6903e-14 -1.47494e-14 -1.30474e-14 -1.20561e-14 -1.09401e-14 -1.00316e-14 -9.10338e-15 -8.42621e-15 -7.69485e-15 -7.19546e-15 -6.73159e-15 -6.33762e-15 -6.16037e-15 -5.95016e-15 -5.74755e-15 -5.71485e-15 -5.5937e-15 -5.6468e-15 -5.55652e-15 -5.64381e-15 -5.61501e-15 -5.60603e-15 -5.37731e-15 -5.47681e-15 -6.05891e-18 -9.52305e-18 -1.621e-17 -3.43032e-17 -1.06749e-16 -3.26158e-16 -8.24568e-16 -1.89959e-15 -3.10112e-15 -4.86059e-15 -6.05228e-15 -7.18402e-15 -7.78725e-15 -7.21381e-15 -6.79866e-15 -5.90365e-15 -4.94297e-15 -4.82745e-15 -4.48142e-15 -3.99198e-15 -3.42943e-15 -2.89006e-15 -2.32849e-15 -1.74756e-15 -1.67213e-15 5.30434e-14 4.96755e-14 4.11818e-14 3.38346e-14 2.71294e-14 2.12521e-14 1.60659e-14 1.14394e-14 8.65509e-15 6.05111e-15 4.46149e-15 3.4064e-15 5.29459e-16 -2.45691e-16 -1.02996e-15 -1.69156e-15 -2.17974e-15 -2.78744e-15 -3.28935e-15 -3.86765e-15 -4.27294e-15 -4.71391e-15 -4.88253e-15 -4.97846e-15 -4.7939e-15 -4.86365e-15 -4.88462e-15 -4.92397e-15 -5.02827e-15 -5.06205e-15 -5.08323e-15 -5.17812e-15 -5.11275e-15 -5.35921e-15 -5.47986e-15 -5.58542e-15 -5.49425e-15 -5.41689e-15 -5.31899e-15 -5.58561e-15 -7.71839e-19 -9.48943e-19 -1.27392e-18 -1.78348e-18 -2.8422e-18 -6.42607e-18 -1.66684e-17 -3.39511e-17 -5.24401e-17 -7.47543e-17 -4.18517e-17 -4.48014e-17 -2.25361e-17 2.73875e-17 -9.40225e-21 3.71235e-17 1.32495e-16 1.48761e-16 1.81238e-16 1.83516e-16 1.7242e-16 1.27837e-16 4.44751e-17 3.15102e-17 -2.99971e-17 -6.03134e-14 -6.66619e-14 -6.00861e-14 -5.2068e-14 -4.51085e-14 -3.84708e-14 -3.31052e-14 -2.84576e-14 -2.38462e-14 -2.05989e-14 -1.78268e-14 -1.48206e-14 -1.4269e-14 -1.23337e-14 -1.1055e-14 -1.00413e-14 -9.26284e-15 -8.69248e-15 -8.16865e-15 -7.87347e-15 -7.52957e-15 -7.35926e-15 -7.12048e-15 -6.87301e-15 -6.50768e-15 -6.27122e-15 -6.04244e-15 -5.92482e-15 -5.90576e-15 -5.79573e-15 -5.66922e-15 -5.65385e-15 -5.55774e-15 -5.70132e-15 -5.70513e-15 -5.72853e-15 -5.6635e-15 -5.60613e-15 -5.41152e-15 -5.53574e-15 -4.86452e-14 -5.69017e-14 -5.28267e-14 -4.68941e-14 -4.10796e-14 -3.55105e-14 -3.08565e-14 -2.69004e-14 -2.33185e-14 -2.03772e-14 -1.74753e-14 -1.49394e-14 -1.4799e-14 -1.27448e-14 -1.14053e-14 -1.03997e-14 -9.6237e-15 -9.02776e-15 -8.46345e-15 -8.11105e-15 -7.7306e-15 -7.51504e-15 -7.26516e-15 -7.0523e-15 -6.73731e-15 -6.51126e-15 -6.23615e-15 -6.04053e-15 -5.99793e-15 -5.87546e-15 -5.7987e-15 -5.83466e-15 -5.77683e-15 -5.87716e-15 -5.81871e-15 -5.78718e-15 -5.6951e-15 -5.67772e-15 -5.52394e-15 -5.58712e-15 -2.80102e-14 -3.55174e-14 -3.41899e-14 -3.10649e-14 -2.78372e-14 -2.48867e-14 -2.2267e-14 -1.99163e-14 -1.76481e-14 -1.56905e-14 -1.55071e-14 -1.36949e-14 -1.23721e-14 -1.08121e-14 -9.70079e-15 -8.89061e-15 -8.26549e-15 -7.81732e-15 -7.49651e-15 -7.29909e-15 -7.07956e-15 -6.9264e-15 -6.74734e-15 -6.58838e-15 -6.40584e-15 -6.27401e-15 -6.08617e-15 -5.93709e-15 -5.77374e-15 -5.70209e-15 -5.63187e-15 -5.66685e-15 -5.66853e-15 -5.79096e-15 -5.72499e-15 -5.67981e-15 -5.63908e-15 -5.6428e-15 -5.58722e-15 -5.6266e-15 -1.56472e-15 -2.01661e-15 -2.77396e-15 -3.05871e-15 -3.28485e-15 -3.51363e-15 -3.75832e-15 -4.01256e-15 -4.28372e-15 -4.59333e-15 -4.81457e-15 -5.02041e-15 -5.14682e-15 -5.29029e-15 -5.33872e-15 -5.43376e-15 -5.4535e-15 -5.47751e-15 -5.46211e-15 -5.47224e-15 -5.44641e-15 -5.56759e-15 -5.60287e-15 -5.73043e-15 -5.63893e-15 -5.64901e-15 -5.71401e-15 -5.75283e-15 -5.64601e-15 -5.63999e-15 -2.54435e-14 -2.26272e-14 -2.01107e-14 -1.77861e-14 -1.59e-14 -1.41541e-14 -1.2715e-14 -1.15108e-14 -1.05701e-14 -9.83599e-15 -9.21668e-15 -8.70591e-15 -8.1748e-15 -7.82085e-15 -7.43747e-15 -7.19373e-15 -6.88111e-15 -6.66971e-15 -6.42146e-15 -6.21175e-15 -5.96329e-15 -5.98987e-15 -5.90346e-15 -6.03294e-15 -5.85495e-15 -5.76649e-15 -5.70694e-15 -5.61336e-15 -5.48431e-15 -5.76201e-15 ) ; } side2 { type cyclic; value nonuniform List<scalar> 1666 ( 1.28339e-15 2.13829e-15 3.59471e-15 -1.33336e-16 5.50902e-15 -9.45592e-16 5.20692e-15 1.30557e-15 3.14543e-15 4.97179e-15 -1.27641e-16 4.31884e-15 -1.54405e-15 3.78356e-15 -5.63146e-16 2.88104e-15 -2.52196e-16 2.25664e-15 2.65344e-16 1.97653e-15 5.88815e-16 1.43908e-15 8.03527e-16 1.79888e-15 1.18849e-15 2.08353e-15 1.70024e-15 2.25427e-15 1.91141e-15 2.04564e-15 2.01943e-15 2.09327e-15 1.99e-15 2.22576e-15 2.17156e-15 2.17843e-15 2.20614e-15 2.33036e-15 2.33888e-15 2.47536e-15 2.43991e-15 2.48979e-15 2.40438e-15 2.48847e-15 2.42316e-15 2.377e-15 2.4707e-15 2.35979e-15 2.68091e-15 2.75041e-15 3.17334e-15 2.83401e-15 3.24895e-15 3.32428e-15 3.81585e-15 3.55055e-15 4.18625e-15 4.35267e-15 4.86538e-15 4.37647e-15 4.77196e-15 5.38759e-15 6.17048e-15 6.57168e-15 7.64025e-15 8.4728e-15 9.56198e-15 1.05951e-14 1.17518e-14 1.32455e-14 1.46966e-14 1.65517e-14 1.8282e-14 2.00977e-14 2.17903e-14 2.3419e-14 2.39835e-14 2.37324e-14 2.18792e-14 1.98532e-14 1.69862e-14 1.45589e-14 1.1986e-14 9.54346e-15 7.29166e-15 5.42171e-15 4.42849e-15 3.62283e-15 3.09504e-15 2.58832e-15 2.20412e-15 1.83773e-15 1.53619e-15 1.26641e-15 1.06001e-15 9.12954e-16 7.76414e-16 6.54015e-16 5.39368e-16 4.25103e-16 3.42308e-16 2.98759e-16 2.67662e-16 2.50336e-16 2.37884e-16 2.27084e-16 2.20783e-16 2.14864e-16 2.10485e-16 2.05917e-16 2.0592e-16 2.04277e-16 2.03381e-16 2.0178e-16 2.01481e-16 2.04658e-16 2.07361e-16 7.90839e-15 3.0685e-15 4.19211e-15 4.38846e-15 6.1494e-15 4.25962e-15 5.87389e-15 4.14591e-15 7.96689e-15 6.56989e-15 7.53995e-15 8.03374e-15 3.46248e-15 9.86648e-15 5.22441e-15 6.90118e-15 7.14942e-15 5.53305e-15 8.21667e-15 8.48656e-15 7.09758e-15 1.03984e-14 8.2453e-15 8.78166e-15 8.5404e-15 5.62616e-15 5.75106e-15 6.47491e-15 5.97131e-15 6.65515e-15 5.68632e-15 6.90321e-15 6.28369e-15 6.64364e-15 6.59221e-15 6.59313e-15 6.58891e-15 6.0986e-15 6.66125e-15 5.60666e-15 6.02333e-15 5.7538e-15 7.05625e-15 5.16913e-15 7.28312e-15 6.85323e-15 7.80005e-15 8.55237e-15 8.62783e-15 8.98106e-15 8.52924e-15 9.77477e-15 8.9985e-15 9.29183e-15 8.4152e-15 9.50827e-15 8.28812e-15 8.74552e-15 8.74569e-15 1.00276e-14 1.10167e-14 1.14673e-14 1.18424e-14 1.27788e-14 1.24313e-14 1.27503e-14 1.36499e-14 1.18131e-14 1.35555e-14 1.19196e-14 1.22087e-14 1.07138e-14 9.48995e-15 8.2637e-15 6.60943e-15 6.95633e-15 6.28208e-15 7.6038e-15 9.8712e-15 1.23583e-14 1.51109e-14 1.68854e-14 1.78877e-14 1.66391e-14 1.4325e-14 1.15637e-14 9.59301e-15 7.70803e-15 6.66054e-15 5.76456e-15 4.76036e-15 3.84414e-15 3.16509e-15 2.66626e-15 2.16465e-15 1.82018e-15 1.52726e-15 1.28393e-15 1.12437e-15 9.20261e-16 8.19225e-16 7.49205e-16 7.26471e-16 6.73001e-16 6.53087e-16 6.30269e-16 6.4188e-16 6.19938e-16 6.19e-16 6.27391e-16 6.162e-16 6.20964e-16 6.26312e-16 6.32774e-16 6.5146e-16 6.33256e-16 6.40707e-16 8.97244e-15 8.12963e-15 2.07951e-14 1.70742e-14 1.93144e-14 1.62461e-14 2.0013e-14 1.70527e-14 1.32372e-14 1.47982e-14 9.86509e-15 8.46287e-15 1.42434e-14 -7.54973e-16 7.61784e-15 5.87738e-15 5.1138e-15 6.47745e-15 2.50824e-15 2.00424e-15 3.34224e-15 7.53938e-16 3.26452e-15 4.63081e-15 3.09679e-15 5.25381e-15 3.46925e-15 3.3054e-15 5.06529e-15 1.59623e-15 4.55275e-15 4.70104e-15 5.3729e-15 4.87532e-15 5.32273e-15 5.51312e-15 6.19212e-15 5.489e-15 5.7124e-15 6.09232e-15 6.61464e-15 6.82769e-15 7.88446e-15 7.02726e-15 8.92469e-15 7.79054e-15 9.13755e-15 9.84873e-15 9.56216e-15 1.08301e-14 1.02463e-14 1.1609e-14 1.1205e-14 1.21403e-14 1.14185e-14 1.10482e-14 1.02569e-14 1.06519e-14 9.22289e-15 9.01859e-15 8.27308e-15 8.96471e-15 9.04078e-15 8.13437e-15 7.54022e-15 7.66068e-15 6.96988e-15 5.70184e-15 5.71211e-15 3.2015e-15 2.99742e-15 1.0709e-15 -8.81913e-16 -2.09864e-15 -4.70417e-15 -5.67574e-15 -6.49418e-15 -8.17133e-15 -4.59293e-15 -9.27404e-16 3.61279e-15 7.9554e-15 1.28347e-14 1.57847e-14 1.71658e-14 1.69815e-14 1.58833e-14 1.4497e-14 1.29487e-14 1.11607e-14 9.38985e-15 7.67833e-15 6.37966e-15 5.14632e-15 4.14386e-15 3.2845e-15 2.66837e-15 2.19224e-15 1.6986e-15 1.53813e-15 1.39221e-15 1.34225e-15 1.16238e-15 1.19916e-15 1.1111e-15 1.10634e-15 1.07811e-15 1.076e-15 1.07696e-15 1.06451e-15 1.09194e-15 1.0721e-15 1.08533e-15 1.10125e-15 1.09329e-15 1.16215e-15 1.10018e-15 2.53416e-14 1.28873e-14 1.88044e-14 1.69031e-14 1.99192e-14 1.40235e-14 1.67544e-14 1.1715e-14 9.95195e-15 1.48269e-14 5.88108e-15 7.74518e-15 6.33149e-15 1.21513e-15 1.18013e-14 3.01822e-15 7.64278e-15 8.5732e-15 7.12895e-15 5.0725e-15 7.67506e-15 6.34535e-15 8.33377e-15 6.86413e-15 5.35949e-15 5.6298e-15 4.10356e-15 4.44888e-15 4.76736e-15 4.5437e-15 6.98211e-15 5.58674e-15 8.42367e-15 8.67428e-15 9.75973e-15 1.00225e-14 1.0976e-14 9.77831e-15 1.21357e-14 1.1077e-14 1.14778e-14 1.30212e-14 1.30825e-14 1.09589e-14 9.74129e-15 1.28617e-14 1.16395e-14 1.20254e-14 1.23512e-14 1.23725e-14 1.21888e-14 1.13137e-14 1.13987e-14 1.10159e-14 1.17829e-14 8.46069e-15 8.88632e-15 9.02685e-15 8.58059e-15 8.05716e-15 8.26008e-15 1.05455e-14 1.03479e-14 1.00959e-14 1.09107e-14 8.47157e-15 9.72113e-15 8.52861e-15 6.82948e-15 8.2854e-15 7.67265e-15 4.0256e-15 5.32357e-15 6.65323e-15 9.06723e-15 1.04228e-14 1.45418e-14 1.28559e-14 9.2174e-15 4.397e-15 1.87941e-15 2.59244e-15 1.67339e-15 2.90236e-15 4.05078e-15 7.24272e-15 8.31429e-15 9.47913e-15 9.50322e-15 9.70814e-15 8.82214e-15 8.71206e-15 7.45986e-15 6.64118e-15 5.75018e-15 5.16681e-15 4.22924e-15 3.65306e-15 3.28724e-15 2.68619e-15 2.55023e-15 2.20305e-15 2.14759e-15 1.87921e-15 1.94805e-15 1.7969e-15 1.60465e-15 1.70566e-15 1.60856e-15 1.61239e-15 1.57003e-15 1.6552e-15 1.6199e-15 1.60639e-15 1.6189e-15 1.55521e-15 1.76284e-15 -2.29674e-15 -9.61987e-16 -5.50271e-15 5.90649e-15 -1.29596e-15 -6.15278e-15 -2.84456e-15 6.38173e-15 1.33471e-14 6.98153e-15 1.82689e-14 1.79464e-14 2.67913e-14 4.33826e-14 4.75177e-14 1.65302e-14 1.18717e-14 1.33325e-14 8.66097e-15 1.25225e-14 1.10584e-14 1.01164e-14 1.1673e-14 1.05017e-14 9.52327e-15 1.72983e-14 1.4986e-14 1.74633e-14 1.94031e-14 1.27004e-14 1.79782e-14 1.10948e-14 1.25879e-14 1.17538e-14 9.9429e-15 1.11052e-14 1.15887e-14 1.21856e-14 1.36974e-14 1.32288e-14 1.46861e-14 1.23474e-14 1.14789e-14 1.5443e-14 1.32058e-14 1.38213e-14 1.36153e-14 1.23037e-14 1.2469e-14 1.20511e-14 1.22784e-14 1.15585e-14 1.2345e-14 1.22393e-14 1.09204e-14 1.9644e-14 1.78152e-14 1.66938e-14 1.6383e-14 1.66776e-14 1.77284e-14 1.44894e-14 1.54879e-14 1.65476e-14 1.75575e-14 1.66468e-14 1.75867e-14 1.70493e-14 1.60941e-14 1.26842e-14 7.55627e-15 6.11538e-15 -3.73468e-15 -1.57762e-14 -2.97212e-14 -4.5976e-14 -6.20142e-14 -7.29782e-14 -6.12772e-14 -6.11958e-14 -5.10532e-14 -4.65308e-14 -3.94684e-14 -2.83964e-14 -2.31062e-14 -2.03432e-14 -1.77397e-14 -1.34069e-14 -1.03493e-14 -7.65969e-15 -5.77305e-15 -3.22991e-15 -2.36373e-15 -1.262e-15 -3.07882e-16 3.15877e-16 6.76396e-16 1.04385e-15 1.28861e-15 1.46282e-15 1.66964e-15 1.88499e-15 2.12315e-15 1.94361e-15 2.17136e-15 2.16677e-15 2.06334e-15 2.06179e-15 2.03687e-15 2.04429e-15 2.06078e-15 2.08852e-15 2.08257e-15 2.06991e-15 2.09777e-15 2.07462e-15 2.24839e-15 1.12649e-14 1.97733e-14 1.90095e-14 2.95503e-15 -1.01786e-15 1.4491e-14 8.91439e-15 1.15709e-14 8.0348e-15 1.77616e-14 2.3785e-14 1.94394e-14 3.85179e-14 -1.80855e-14 -6.34957e-15 1.50124e-14 1.14101e-14 1.06506e-14 5.51135e-15 4.15337e-15 7.76589e-16 6.1601e-15 4.44098e-15 1.50618e-14 1.635e-14 1.27626e-14 1.48113e-14 1.56874e-14 1.78433e-14 1.42193e-14 1.56674e-14 1.35151e-14 1.45343e-14 9.63101e-15 1.10823e-14 1.00913e-14 1.22742e-14 1.29099e-14 1.18177e-14 1.08677e-14 1.18479e-14 3.24589e-15 3.12756e-15 1.50638e-14 1.22972e-14 1.27287e-14 1.29902e-14 1.19597e-14 1.24478e-14 1.39637e-14 1.55885e-14 2.94914e-15 4.34397e-15 4.95022e-15 3.22295e-16 1.81125e-14 1.42705e-14 1.55594e-14 1.57793e-14 1.60979e-14 1.67053e-14 1.75381e-14 1.7957e-14 1.59174e-14 1.6159e-14 1.62946e-14 1.53303e-14 6.66431e-15 6.3058e-15 8.13312e-15 3.62498e-15 1.29583e-14 7.26044e-15 2.09105e-15 -5.63202e-15 -1.32294e-14 -2.04357e-14 -2.61954e-14 -1.75121e-14 -1.40143e-14 -1.11614e-14 -7.82662e-15 -4.4919e-15 -8.34156e-15 -6.70359e-15 -4.30298e-15 -4.32827e-15 -4.38945e-15 -4.0302e-15 -3.50156e-15 -2.79662e-15 -2.20062e-15 -1.41207e-15 -7.28496e-16 -1.52262e-16 2.06189e-16 6.62754e-16 1.04602e-15 1.33476e-15 1.68432e-15 1.95735e-15 2.13138e-15 2.18258e-15 2.16681e-15 2.16667e-15 2.20363e-15 2.32071e-15 2.38726e-15 2.47354e-15 2.5246e-15 2.58677e-15 2.57483e-15 2.64178e-15 2.80071e-15 2.79408e-15 2.77621e-15 2.89624e-15 1.41928e-14 -7.88932e-16 7.00806e-15 3.21557e-16 -1.95181e-14 -2.9696e-15 -2.74292e-14 -2.16019e-14 -3.39873e-14 2.54112e-14 3.91726e-14 3.9465e-14 7.63902e-14 -2.05689e-14 3.38411e-15 2.28231e-15 1.56682e-15 6.88395e-15 9.91845e-15 1.18989e-14 1.5486e-14 2.00431e-14 1.503e-14 1.22368e-14 1.07833e-14 6.1754e-15 8.52838e-15 6.93383e-15 4.42716e-15 6.35046e-15 6.61514e-15 1.63761e-14 2.02174e-14 1.00683e-14 1.37824e-14 1.21596e-14 1.3225e-14 1.10941e-14 1.02427e-14 1.20202e-14 5.87936e-15 2.57053e-14 2.43301e-14 1.21641e-14 1.2606e-14 1.23905e-14 1.05075e-14 1.1669e-14 1.13989e-14 1.11081e-14 2.43367e-15 3.01979e-14 2.46173e-14 2.06202e-14 2.24736e-14 9.79928e-15 1.18963e-14 1.07188e-14 1.03839e-14 1.04813e-14 8.76293e-15 8.07914e-15 5.97511e-15 6.71076e-15 5.39913e-15 2.9931e-15 -3.36965e-15 1.90914e-14 1.45829e-14 1.68497e-14 2.2013e-14 2.39508e-14 4.08379e-14 6.14977e-14 8.18953e-14 1.14539e-13 1.46672e-13 1.61598e-13 1.23836e-13 1.15807e-13 8.85626e-14 6.53715e-14 5.34109e-14 3.97252e-14 3.08583e-14 2.4099e-14 1.92026e-14 1.57517e-14 1.36809e-14 1.1553e-14 9.89609e-15 8.62397e-15 7.55266e-15 6.68945e-15 6.00993e-15 5.3498e-15 4.98135e-15 4.53651e-15 4.25337e-15 4.06432e-15 3.86967e-15 3.63244e-15 3.41117e-15 3.32107e-15 3.19215e-15 3.09725e-15 3.17233e-15 3.11139e-15 3.15547e-15 3.1218e-15 3.09812e-15 3.14034e-15 3.20181e-15 3.2037e-15 3.28455e-15 3.15409e-15 3.18031e-15 -6.89281e-14 -9.17572e-15 -2.80723e-14 -5.39324e-15 -8.81512e-15 -1.13189e-15 4.35554e-14 6.24192e-14 1.31781e-13 6.11972e-15 1.36895e-14 1.05997e-14 -1.60221e-14 4.86093e-14 2.73463e-14 2.36437e-14 2.11252e-14 2.69756e-14 2.5227e-14 2.68828e-14 2.62447e-14 2.78084e-14 1.81215e-14 1.85281e-14 1.67962e-14 7.72289e-15 9.77717e-15 1.27965e-14 1.34727e-14 1.52471e-14 1.82078e-14 7.72677e-15 6.1563e-15 2.25122e-14 1.9921e-14 1.4095e-14 1.53925e-14 1.35982e-14 1.42372e-14 1.40688e-14 1.06056e-14 2.46745e-14 1.92124e-14 1.05923e-14 9.7656e-15 1.07737e-14 1.45752e-14 1.34172e-14 1.57039e-14 1.55683e-14 5.65253e-15 2.56293e-14 1.93994e-14 1.61589e-14 1.73205e-14 1.51982e-14 1.66558e-14 1.6996e-14 1.72027e-14 1.72771e-14 1.76373e-14 2.25831e-14 2.48818e-14 2.16158e-14 1.96532e-14 2.00292e-14 1.51304e-14 3.03889e-14 2.1986e-14 1.52821e-14 7.16886e-15 -9.96153e-15 -2.93633e-14 -6.24721e-14 -1.2978e-13 -1.90128e-13 -2.78603e-13 -3.0123e-13 -2.08628e-13 -1.59049e-13 -1.24722e-13 -9.40025e-14 -7.22086e-14 -5.25397e-14 -4.06826e-14 -3.20333e-14 -2.57001e-14 -1.97108e-14 -1.43922e-14 -1.09048e-14 -7.95647e-15 -5.99271e-15 -4.00743e-15 -3.12731e-15 -1.73182e-15 -1.05609e-15 -1.22988e-16 4.90067e-16 1.06141e-15 1.28238e-15 1.6774e-15 1.82322e-15 2.12203e-15 2.54971e-15 2.84067e-15 2.78605e-15 3.00189e-15 3.0338e-15 3.14641e-15 3.41727e-15 3.49882e-15 3.50437e-15 3.58311e-15 3.57299e-15 3.73137e-15 3.45778e-15 3.75614e-15 -1.50277e-14 1.3381e-14 1.44226e-14 -2.80349e-14 -3.38474e-14 -1.18767e-14 -2.41204e-14 4.93484e-14 -6.28352e-14 -5.73364e-14 -8.52043e-15 9.91102e-16 1.33197e-14 3.26463e-14 2.03679e-14 8.37246e-15 4.88235e-15 4.92258e-15 4.9225e-15 -3.54321e-15 2.53665e-15 1.35004e-15 4.32518e-15 1.60397e-14 -6.72034e-15 -1.05023e-14 -3.31178e-15 -3.20437e-15 4.80185e-15 8.18792e-15 4.00641e-15 -5.31713e-15 1.11696e-14 1.37521e-14 1.06275e-14 9.78178e-15 9.78307e-15 7.83573e-15 2.80109e-15 -2.02068e-14 5.58907e-15 3.7145e-15 -9.16094e-15 6.00915e-16 5.70071e-15 8.48005e-15 1.20309e-14 1.85212e-14 1.49508e-14 -1.33276e-14 2.02576e-14 2.45699e-14 7.61067e-15 1.01284e-15 -4.04545e-15 -3.32185e-15 -4.04683e-15 -3.85931e-15 -2.58015e-15 -1.2939e-15 1.79101e-15 1.39891e-15 -2.4863e-15 -2.90603e-15 1.05565e-15 -1.58894e-14 8.34644e-15 4.03183e-15 -7.53623e-15 -7.66795e-15 -4.7869e-15 7.62523e-15 3.19397e-14 8.6891e-14 1.66889e-13 3.15304e-13 3.62332e-13 2.16872e-13 1.83065e-13 1.32853e-13 1.02382e-13 8.06101e-14 5.97682e-14 4.69982e-14 3.82402e-14 3.08362e-14 2.27711e-14 1.90456e-14 1.55652e-14 1.32069e-14 1.12345e-14 9.67908e-15 9.44916e-15 8.70687e-15 7.9359e-15 7.67068e-15 7.15338e-15 6.91202e-15 6.51911e-15 6.4292e-15 5.84143e-15 5.54732e-15 4.78197e-15 4.46418e-15 4.3321e-15 4.3426e-15 4.28411e-15 4.37165e-15 4.00741e-15 4.1526e-15 4.12211e-15 4.18178e-15 4.14846e-15 4.25886e-15 4.15631e-15 4.39869e-15 4.22361e-14 5.48e-14 8.04079e-14 6.98732e-14 6.89461e-14 4.69164e-14 3.46401e-15 6.49703e-14 -7.78051e-14 2.74436e-14 9.5729e-14 1.2138e-13 1.82997e-13 2.04431e-13 1.45524e-13 6.35792e-14 8.32044e-15 -1.97382e-14 -1.38814e-14 -2.14352e-16 1.73985e-14 3.2299e-14 4.96643e-14 6.44634e-14 3.38415e-14 2.40005e-14 1.59826e-14 6.35785e-15 2.6607e-14 5.14293e-14 5.22447e-14 3.36962e-14 1.27721e-14 -4.13283e-14 -2.24417e-14 7.87161e-15 -5.81603e-15 2.7313e-15 4.99744e-15 -2.60715e-14 1.93075e-15 -3.36843e-14 -4.79357e-14 -2.99103e-14 -6.56985e-15 2.08775e-14 3.75015e-14 3.80641e-14 1.93332e-14 -2.18289e-14 3.36019e-14 3.31087e-14 2.5836e-14 6.40875e-15 1.57577e-15 3.66642e-15 2.82047e-15 4.7746e-15 5.08883e-15 5.66053e-15 1.92126e-15 -4.05261e-17 -1.24709e-14 -2.75506e-14 -3.40015e-14 4.14422e-15 7.50386e-14 3.78409e-14 2.07781e-14 1.23737e-14 1.08937e-14 1.63546e-14 2.10641e-14 3.96567e-14 -2.384e-14 -3.23797e-13 -5.11481e-13 -2.87932e-13 -2.18574e-13 -1.55988e-13 -1.12305e-13 -8.16036e-14 -6.33519e-14 -4.69843e-14 -3.74332e-14 -2.83499e-14 -2.15056e-14 -1.63881e-14 -1.25553e-14 -9.19229e-15 -6.84635e-15 -5.4564e-15 -2.99335e-15 -2.23687e-15 -1.0845e-15 1.8552e-16 9.8464e-16 1.8753e-15 2.24721e-15 2.63684e-15 2.7092e-15 2.7978e-15 3.27083e-15 3.30968e-15 3.34667e-15 3.58479e-15 3.78745e-15 4.08853e-15 3.95411e-15 4.17966e-15 4.32543e-15 4.45306e-15 4.40031e-15 4.67851e-15 4.54779e-15 4.23426e-15 8.88853e-15 1.12955e-14 3.98205e-16 4.20165e-15 3.8104e-14 5.02701e-14 5.62256e-14 1.79024e-13 -3.52336e-14 6.33798e-14 4.1696e-14 3.94117e-14 4.00554e-15 -2.39096e-14 7.69886e-15 2.63783e-14 4.65036e-14 4.1256e-14 4.17605e-14 2.76568e-14 2.47196e-14 2.65785e-14 2.64559e-14 2.19519e-14 3.10433e-15 6.46784e-15 5.93597e-15 1.26285e-14 2.71458e-14 6.51784e-14 9.51436e-14 1.03324e-13 4.35023e-14 -9.90807e-14 -6.2249e-14 5.11249e-15 -2.68381e-13 -1.82732e-13 -1.34158e-13 -9.37905e-14 -7.12188e-14 -5.30439e-14 -4.01665e-14 -2.96592e-14 -2.3053e-14 -1.71746e-14 -1.32183e-14 -9.82491e-15 -7.40652e-15 -5.03034e-15 -3.39686e-15 -2.64377e-15 -4.23641e-16 -1.02438e-16 6.41816e-16 1.6671e-15 2.23844e-15 2.86852e-15 3.18733e-15 3.51246e-15 3.56523e-15 3.59418e-15 3.79514e-15 3.86157e-15 3.80764e-15 4.01236e-15 4.21967e-15 4.52797e-15 4.38544e-15 4.63177e-15 4.6869e-15 4.78185e-15 4.73559e-15 4.96248e-15 4.88471e-15 4.71319e-15 2.51294e-15 4.13593e-15 3.96353e-15 -9.7193e-16 -1.30769e-14 -4.08589e-14 -7.64331e-14 -1.00324e-13 -1.07301e-13 -6.61376e-14 -7.73556e-14 -8.56276e-14 -6.77187e-14 -6.31935e-14 -4.12602e-14 -3.5691e-14 -4.95364e-14 -4.24959e-14 -3.76435e-14 -3.31047e-14 -2.82744e-14 -2.72505e-14 -2.19828e-14 -1.48897e-14 -5.03898e-15 -2.1547e-15 1.0366e-15 8.23765e-15 8.12651e-16 -4.10976e-15 4.63819e-15 8.82754e-15 1.92316e-14 1.68294e-14 1.00146e-14 6.32891e-15 6.6054e-13 5.49243e-13 4.43365e-13 3.4014e-13 2.70356e-13 2.12977e-13 1.70148e-13 1.38881e-13 1.12073e-13 9.06173e-14 7.46488e-14 6.10935e-14 4.97323e-14 4.10688e-14 3.41113e-14 2.80634e-14 2.56152e-14 2.16033e-14 1.87133e-14 1.65346e-14 1.45173e-14 1.29172e-14 1.14213e-14 1.01987e-14 8.7777e-15 7.99756e-15 7.4454e-15 7.01745e-15 6.59672e-15 6.36455e-15 6.20585e-15 6.14533e-15 5.33994e-15 5.3166e-15 5.27772e-15 5.36642e-15 5.32922e-15 5.22099e-15 5.26156e-15 5.43795e-15 2.3893e-17 9.83685e-17 3.95665e-16 1.55563e-15 4.49733e-15 8.75872e-15 1.3029e-14 1.96706e-14 2.26424e-14 2.63918e-14 3.24888e-14 4.03569e-14 4.23336e-14 3.52773e-14 2.89106e-14 2.40615e-14 1.73405e-14 1.77165e-14 1.75535e-14 1.75444e-14 1.5443e-14 1.25834e-14 1.10017e-14 9.63215e-15 8.17974e-15 7.06633e-15 1.97965e-15 -2.11057e-18 2.39034e-16 -7.15144e-17 -1.32384e-15 -3.50854e-15 -3.97189e-15 -7.5853e-15 -6.92545e-15 -3.51938e-15 -2.70168e-13 -2.44086e-13 -2.01108e-13 -1.60379e-13 -1.28248e-13 -1.02351e-13 -8.10281e-14 -6.36184e-14 -5.06484e-14 -3.9914e-14 -3.14616e-14 -2.52138e-14 -1.78005e-14 -1.37668e-14 -1.04728e-14 -7.80125e-15 -5.94523e-15 -4.09641e-15 -2.36834e-15 -7.9097e-16 3.41636e-16 1.25602e-15 1.85876e-15 2.46724e-15 2.76571e-15 3.15652e-15 3.4275e-15 3.63795e-15 3.97539e-15 4.19574e-15 4.35341e-15 4.62087e-15 4.74905e-15 5.00727e-15 5.08407e-15 5.30402e-15 5.37779e-15 5.44362e-15 5.26365e-15 5.38926e-15 1.03557e-17 1.37598e-17 2.00113e-17 3.60861e-17 9.16078e-17 2.12847e-16 3.87568e-16 8.00807e-16 1.07498e-15 1.86845e-15 2.27012e-15 2.87957e-15 3.20724e-15 2.54253e-15 2.16745e-15 1.42691e-15 7.42332e-16 9.74599e-16 1.07476e-15 1.09559e-15 1.07762e-15 1.08834e-15 1.05869e-15 9.73386e-16 1.34448e-15 6.0531e-14 6.33983e-14 5.64197e-14 4.76121e-14 3.98639e-14 3.37971e-14 2.89067e-14 2.52286e-14 2.12885e-14 1.84353e-14 1.55853e-14 1.30277e-14 1.31853e-14 1.14464e-14 1.01992e-14 9.27201e-15 8.43916e-15 7.96924e-15 7.58061e-15 7.42342e-15 7.21783e-15 7.15513e-15 6.90356e-15 6.64981e-15 6.17267e-15 5.99835e-15 5.81493e-15 5.68301e-15 5.64353e-15 5.55671e-15 5.47684e-15 5.48735e-15 5.35176e-15 5.54051e-15 5.61415e-15 5.68222e-15 5.56195e-15 5.46348e-15 5.35178e-15 5.61129e-15 1.59317e-19 3.44104e-19 7.25308e-19 1.36518e-18 2.71579e-18 7.58912e-18 2.43158e-17 6.53973e-17 1.45493e-16 2.82845e-16 4.12605e-16 6.01775e-16 7.62445e-16 8.69885e-16 1.01048e-15 1.02747e-15 9.17968e-16 8.20525e-16 6.58364e-16 4.92176e-16 3.2888e-16 2.02379e-16 1.36506e-16 2.70181e-17 -6.02895e-18 -5.33908e-14 -5.35422e-14 -4.67099e-14 -3.8736e-14 -3.14075e-14 -2.52456e-14 -1.98096e-14 -1.53177e-14 -1.23427e-14 -9.30187e-15 -6.89123e-15 -5.60339e-15 -2.67216e-15 -1.68436e-15 -5.61568e-16 5.09098e-16 1.27041e-15 2.04479e-15 2.64512e-15 3.28083e-15 3.71484e-15 4.18905e-15 4.4895e-15 4.69274e-15 4.70498e-15 4.78491e-15 4.82184e-15 4.92739e-15 5.09598e-15 5.14377e-15 5.14979e-15 5.24534e-15 5.24163e-15 5.46138e-15 5.52733e-15 5.60021e-15 5.57346e-15 5.54397e-15 5.36766e-15 5.5011e-15 -4.34567e-14 -4.5766e-14 -4.05206e-14 -3.46145e-14 -2.90929e-14 -2.40942e-14 -1.94681e-14 -1.53488e-14 -1.20509e-14 -9.16992e-15 -7.17306e-15 -5.59155e-15 -2.45255e-15 -1.575e-15 -5.36413e-16 4.81047e-16 1.32784e-15 2.10651e-15 2.70113e-15 3.29585e-15 3.71905e-15 4.17283e-15 4.4849e-15 4.74261e-15 4.8236e-15 4.92993e-15 4.93534e-15 4.97598e-15 5.13232e-15 5.17759e-15 5.24199e-15 5.39627e-15 5.43734e-15 5.61912e-15 5.62748e-15 5.64926e-15 5.59834e-15 5.61087e-15 5.47678e-15 5.54966e-15 -2.50271e-14 -2.68851e-14 -2.39653e-14 -2.08244e-14 -1.76776e-14 -1.4477e-14 -1.1479e-14 -8.81967e-15 -6.69614e-15 -4.86492e-15 -1.97567e-15 -1.00342e-15 -4.03792e-17 4.95726e-16 1.06632e-15 1.65807e-15 2.20748e-15 2.74263e-15 3.24714e-15 3.73947e-15 4.10296e-15 4.43937e-15 4.67316e-15 4.86135e-15 4.97185e-15 5.08644e-15 5.10726e-15 5.1343e-15 5.12017e-15 5.17431e-15 5.21041e-15 5.33463e-15 5.41112e-15 5.59545e-15 5.58018e-15 5.57548e-15 5.56601e-15 5.59251e-15 5.55191e-15 5.59855e-15 1.18443e-14 1.06506e-14 1.00836e-14 9.21108e-15 8.46889e-15 7.87756e-15 7.43079e-15 7.10163e-15 6.8801e-15 6.7749e-15 6.64468e-15 6.55391e-15 6.42927e-15 6.36105e-15 6.22991e-15 6.17334e-15 6.06444e-15 5.9794e-15 5.87099e-15 5.80312e-15 5.71085e-15 5.77617e-15 5.76447e-15 5.85318e-15 5.72956e-15 5.71408e-15 5.75935e-15 5.78376e-15 5.66745e-15 5.65692e-15 -1.33577e-14 -1.06968e-14 -8.32445e-15 -6.41428e-15 -4.65926e-15 -3.22033e-15 -2.04561e-15 -9.18825e-16 4.22068e-17 1.00084e-15 1.75256e-15 2.41989e-15 2.90748e-15 3.40359e-15 3.75221e-15 4.12781e-15 4.3449e-15 4.58427e-15 4.71513e-15 4.83077e-15 4.86005e-15 5.1188e-15 5.22911e-15 5.52185e-15 5.47886e-15 5.49827e-15 5.52221e-15 5.48954e-15 5.40044e-15 5.69674e-15 ) ; } procBoundary1to0 { type processor; value nonuniform List<scalar> 76 ( -4.37905e-14 -4.24904e-14 -3.84631e-14 -2.9691e-14 -1.41369e-14 1.79833e-14 2.29109e-13 1.20114e-12 4.58169e-12 1.33138e-11 3.03458e-11 5.64624e-11 8.93616e-11 1.24149e-10 1.54411e-10 1.73741e-10 1.77345e-10 1.64135e-10 1.38899e-10 1.05781e-10 7.11205e-11 4.00212e-11 1.52495e-11 -2.94366e-13 -1.46741e-09 -1.5439e-12 -3.52655e-10 1.28065e-10 -2.36617e-10 -5.36128e-10 -7.87157e-10 -9.96959e-10 -1.1747e-09 -1.32707e-09 -1.43571e-09 -1.44072e-09 -1.14195e-09 -4.61586e-10 -4.37901e-14 -4.24901e-14 -3.84628e-14 -2.96907e-14 -1.41367e-14 1.79832e-14 2.29109e-13 1.20113e-12 4.58168e-12 1.33138e-11 3.03456e-11 5.64621e-11 8.9361e-11 1.24149e-10 1.5441e-10 1.7374e-10 1.77343e-10 1.64134e-10 1.38898e-10 1.05781e-10 7.11204e-11 4.00212e-11 1.52495e-11 -2.94364e-13 -1.46741e-09 -1.54389e-12 -3.52653e-10 1.28065e-10 -2.36616e-10 -5.36127e-10 -7.87156e-10 -9.96958e-10 -1.1747e-09 -1.32706e-09 -1.4357e-09 -1.44071e-09 -1.14195e-09 -4.61585e-10 ) ; } procBoundary1to2 { type processor; value nonuniform List<scalar> 84 ( -4.43625e-08 -5.34377e-08 -5.03412e-08 -4.53072e-08 -4.00552e-08 -3.49044e-08 -3.01315e-08 -2.58142e-08 -2.20017e-08 -1.86761e-08 3.73484e-08 3.72899e-08 -1.48552e-08 -1.27633e-08 -1.09304e-08 -9.33518e-09 -7.95445e-09 -6.76439e-09 -5.74214e-09 -4.86636e-09 -4.11766e-09 -3.47865e-09 -2.93394e-09 -2.47005e-09 -2.0752e-09 -1.73921e-09 -1.45328e-09 -1.20988e-09 -1.00255e-09 -8.25855e-10 -6.75211e-10 -5.46817e-10 -4.37552e-10 -3.44882e-10 -2.66765e-10 -2.01567e-10 -1.47977e-10 -1.04955e-10 -7.16775e-11 -4.73909e-11 -3.14795e-11 -2.40187e-11 -4.43625e-08 -5.34377e-08 -5.03412e-08 -4.53072e-08 -4.00553e-08 -3.49044e-08 -3.01315e-08 -2.58142e-08 -2.20017e-08 -1.86761e-08 3.73484e-08 3.72899e-08 -1.48552e-08 -1.27633e-08 -1.09304e-08 -9.33518e-09 -7.95445e-09 -6.76439e-09 -5.74214e-09 -4.86636e-09 -4.11766e-09 -3.47865e-09 -2.93394e-09 -2.47005e-09 -2.0752e-09 -1.73921e-09 -1.45328e-09 -1.20988e-09 -1.00255e-09 -8.25855e-10 -6.75211e-10 -5.46817e-10 -4.37553e-10 -3.44882e-10 -2.66765e-10 -2.01567e-10 -1.47977e-10 -1.04955e-10 -7.16774e-11 -4.73909e-11 -3.14795e-11 -2.40186e-11 ) ; } procBoundary1to4 { type processor; value nonuniform List<scalar> 32 ( 7.56571e-09 2.48042e-08 4.7596e-08 5.49087e-08 6.45193e-08 7.68393e-08 8.71739e-08 8.73021e-08 -5.00319e-09 7.08152e-08 3.75979e-08 2.60657e-08 2.04889e-09 1.65006e-10 2.18583e-11 2.23166e-12 7.5657e-09 2.48042e-08 4.7596e-08 5.49086e-08 6.45193e-08 7.68393e-08 8.71735e-08 8.73022e-08 -5.0032e-09 7.08153e-08 3.75981e-08 2.60657e-08 2.04888e-09 1.65005e-10 2.18581e-11 2.23164e-12 ) ; } } // ************************************************************************* //
19b2c35d92cd42e37ddbbd1da531f21d6c01d56e
8108fe1b8f46daa413a961bf1e2268b89649894c
/1164/1164.cpp
93583f67e81d4ac3e8e75c8fc17a18eaf56f0bcb
[]
no_license
gutorc92/uri
d2542671750066c7590d78386492bb1ba67b3c65
788df2249172f661bf31141109c52cdbefc1b25e
refs/heads/master
2021-06-04T11:54:24.231645
2018-01-11T17:42:57
2018-01-11T17:42:57
34,925,710
0
0
null
null
null
null
UTF-8
C++
false
false
525
cpp
1164.cpp
#include<iostream> #include<cmath> #include<stdio.h> #include<algorithm> using namespace std; int main(int argc, char * argv[]){ int n, total; long int t; std::cin >> n; for(int i = 0; i < n; i++){ std::cin >> t; total = 0; for(int j = 1; j < t; j++){ if(t % j == 0) total += j; } if( total == t){ std::cout << t << " eh perfeito" << std::endl; }else{ std::cout << t << " nao eh perfeito" << std::endl; } } }
58d04c20ed663e73037e99ea9e7e0e830049b342
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/ckafka/src/v20190819/model/AclRuleInfo.cpp
cbfd8f742b952ed225c25583d88351b302b8b3e4
[ "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,056
cpp
AclRuleInfo.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/ckafka/v20190819/model/AclRuleInfo.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Ckafka::V20190819::Model; using namespace std; AclRuleInfo::AclRuleInfo() : m_operationHasBeenSet(false), m_permissionTypeHasBeenSet(false), m_hostHasBeenSet(false), m_principalHasBeenSet(false) { } CoreInternalOutcome AclRuleInfo::Deserialize(const rapidjson::Value &value) { string requestId = ""; if (value.HasMember("Operation") && !value["Operation"].IsNull()) { if (!value["Operation"].IsString()) { return CoreInternalOutcome(Core::Error("response `AclRuleInfo.Operation` IsString=false incorrectly").SetRequestId(requestId)); } m_operation = string(value["Operation"].GetString()); m_operationHasBeenSet = true; } if (value.HasMember("PermissionType") && !value["PermissionType"].IsNull()) { if (!value["PermissionType"].IsString()) { return CoreInternalOutcome(Core::Error("response `AclRuleInfo.PermissionType` IsString=false incorrectly").SetRequestId(requestId)); } m_permissionType = string(value["PermissionType"].GetString()); m_permissionTypeHasBeenSet = true; } if (value.HasMember("Host") && !value["Host"].IsNull()) { if (!value["Host"].IsString()) { return CoreInternalOutcome(Core::Error("response `AclRuleInfo.Host` IsString=false incorrectly").SetRequestId(requestId)); } m_host = string(value["Host"].GetString()); m_hostHasBeenSet = true; } if (value.HasMember("Principal") && !value["Principal"].IsNull()) { if (!value["Principal"].IsString()) { return CoreInternalOutcome(Core::Error("response `AclRuleInfo.Principal` IsString=false incorrectly").SetRequestId(requestId)); } m_principal = string(value["Principal"].GetString()); m_principalHasBeenSet = true; } return CoreInternalOutcome(true); } void AclRuleInfo::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const { if (m_operationHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Operation"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_operation.c_str(), allocator).Move(), allocator); } if (m_permissionTypeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PermissionType"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_permissionType.c_str(), allocator).Move(), allocator); } if (m_hostHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Host"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_host.c_str(), allocator).Move(), allocator); } if (m_principalHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Principal"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_principal.c_str(), allocator).Move(), allocator); } } string AclRuleInfo::GetOperation() const { return m_operation; } void AclRuleInfo::SetOperation(const string& _operation) { m_operation = _operation; m_operationHasBeenSet = true; } bool AclRuleInfo::OperationHasBeenSet() const { return m_operationHasBeenSet; } string AclRuleInfo::GetPermissionType() const { return m_permissionType; } void AclRuleInfo::SetPermissionType(const string& _permissionType) { m_permissionType = _permissionType; m_permissionTypeHasBeenSet = true; } bool AclRuleInfo::PermissionTypeHasBeenSet() const { return m_permissionTypeHasBeenSet; } string AclRuleInfo::GetHost() const { return m_host; } void AclRuleInfo::SetHost(const string& _host) { m_host = _host; m_hostHasBeenSet = true; } bool AclRuleInfo::HostHasBeenSet() const { return m_hostHasBeenSet; } string AclRuleInfo::GetPrincipal() const { return m_principal; } void AclRuleInfo::SetPrincipal(const string& _principal) { m_principal = _principal; m_principalHasBeenSet = true; } bool AclRuleInfo::PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
8aadabad9aebf23eb8594a6924ad8613ccb81c0b
129f39703b10b5684825ce8626d3a4e908970fad
/source/core/slang-process-util.cpp
99c81ee5cb8d1ad0f74e5bc3e41c4e94069406e4
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
shader-slang/slang
80f417524c9e023ff6e4f4b0210964bf46c76278
f94b2f7a328a898c5e3dc1389d08e0b7ce6e092e
refs/heads/master
2023-08-19T03:17:26.436967
2023-08-18T19:48:46
2023-08-18T19:48:46
93,882,897
1,269
117
MIT
2023-09-14T20:57:11
2017-06-09T17:42:49
C++
UTF-8
C++
false
false
2,750
cpp
slang-process-util.cpp
// slang-process-util.cpp #include "slang-process-util.h" #include "slang-string.h" #include "slang-string-escape-util.h" #include "slang-string-util.h" #include "../../slang-com-helper.h" namespace Slang { /* static */SlangResult ProcessUtil::execute(const CommandLine& commandLine, ExecuteResult& outExecuteResult) { RefPtr<Process> process; SLANG_RETURN_ON_FAIL(Process::create(commandLine, 0, process)); SLANG_RETURN_ON_FAIL(readUntilTermination(process, outExecuteResult)); return SLANG_OK; } static Index _getCount(List<Byte>* buf) { return buf ? buf->getCount() : 0; } // We may want something more sophisticated here, if bytes is something other than ascii/utf8 static String _getText(const ConstArrayView<Byte>& bytes) { StringBuilder buf; StringUtil::appendStandardLines(UnownedStringSlice((const char*)bytes.begin(), (const char*)bytes.end()), buf); return buf.produceString(); } /* static */SlangResult ProcessUtil::readUntilTermination(Process* process, ExecuteResult& outExecuteResult) { List<Byte> stdOut; List<Byte> stdError; SLANG_RETURN_ON_FAIL(readUntilTermination(process, &stdOut, &stdError)); // Get the return code outExecuteResult.resultCode = ExecuteResult::ResultCode(process->getReturnValue()); outExecuteResult.standardOutput = _getText(stdOut.getArrayView()); outExecuteResult.standardError = _getText(stdError.getArrayView()); return SLANG_OK; } /* static */SlangResult ProcessUtil::readUntilTermination(Process* process, List<Byte>* outStdOut, List<Byte>* outStdError) { Stream* stdOutStream = process->getStream(StdStreamType::Out); Stream* stdErrorStream = process->getStream(StdStreamType::ErrorOut); while (!process->isTerminated()) { const auto preCount = _getCount(outStdOut) + _getCount(outStdError); SLANG_RETURN_ON_FAIL(StreamUtil::readOrDiscard(stdOutStream, 0, outStdOut)); if (stdErrorStream) SLANG_RETURN_ON_FAIL(StreamUtil::readOrDiscard(stdErrorStream, 0, outStdError)); const auto postCount = _getCount(outStdOut) + _getCount(outStdError); // If nothing was read, we can yield if (preCount == postCount) { Process::sleepCurrentThread(0); } } // Read anything remaining for(;;) { const auto preCount = _getCount(outStdOut) + _getCount(outStdError); StreamUtil::readOrDiscard(stdOutStream, 0, outStdOut); if (stdErrorStream) StreamUtil::readOrDiscard(stdErrorStream, 0, outStdError); const auto postCount = _getCount(outStdOut) + _getCount(outStdError); if (preCount == postCount) break; } return SLANG_OK; } } // namespace Slang
4bfde2e081af362f901fad253162069d1049741c
a3da88064ce11eef6094078db7cecf40facda99b
/lib/SystemProfiler.cc
9f08883b7156bd3e48992df2f35c9b3e6436bae6
[ "MIT" ]
permissive
readablesystems/sto
e472d4eb6669a6cef5d1bf60a2ca5d5de0e6aaff
e477fd6abc9f084583366213441499a6b969162d
refs/heads/master
2023-04-03T10:41:51.484877
2021-09-28T23:51:48
2021-09-28T23:51:48
121,050,178
48
23
MIT
2022-08-25T10:54:08
2018-02-10T20:11:13
C++
UTF-8
C++
false
false
1,630
cc
SystemProfiler.cc
#include "SystemProfiler.hh" namespace Profiler { pid_t spawn(const std::string &name, perf_mode mode) { std::stringstream ss; ss << getpid(); auto profile_name = name + ((mode == perf_mode::record) ? ".data" : ".txt"); pid_t pid = fork(); if (pid == 0) { int console = open("/dev/null", O_RDWR); always_assert(console > 0); always_assert(dup2(console, STDOUT_FILENO) != -1); always_assert(dup2(console, STDERR_FILENO) != -1); if (mode == perf_mode::record) { exit(execl("/usr/bin/perf", "perf", "record", "-g", "-o", profile_name.c_str(), "-p", ss.str().c_str(), nullptr)); } else if (mode == perf_mode::counters) { exit(execl("/usr/bin/perf", "perf", "stat", "-e", "cycles,cache-misses,cache-references,L1-dcache-loads,L1-dcache-load-misses," "context-switches,cpu-migrations,page-faults,branch-instructions,branch-misses," "dTLB-load-misses,dTLB-loads", "-o", profile_name.c_str(), "-p", ss.str().c_str(), nullptr)); } } return pid; } bool stop(pid_t pid) { if (kill(pid, SIGINT) != 0) return false; if (waitpid(pid, nullptr, 0) != pid) return false; return true; } void profile(const std::string &name, std::function<void(void)> profilee) { pid_t pid = spawn(name, perf_mode::record); profilee(); bool ok = stop(pid); always_assert(ok); } void profile(std::function<void(void)> profilee) { profile("perf", profilee); } }
fdecdd90a730ea253ab9a9c8ac9dd53d9ad66e65
e5edb7d63fb5700ca2228780bbb9cae7aec3f93a
/src/libalgo/source/exceptions/ErrorMathZeroDevision.cpp
362d1f2a883745d885f60c0c313a68c890cc6a1b
[]
no_license
moravianlibrary/libalgo
14e5660447de0a2f627541194625e762adf0a157
d32946f5a4bf5103225a3b8808e21ecae34bbef0
refs/heads/master
2020-12-11T05:56:08.283005
2015-07-01T20:53:13
2015-07-09T06:39:00
25,161,574
0
0
null
null
null
null
UTF-8
C++
false
false
35
cpp
ErrorMathZeroDevision.cpp
#include "ErrorMathZeroDevision.h"
6b8c811f5ed260a84fafc44277e600d3f4ba4275
2ca3ad74c1b5416b2748353d23710eed63539bb0
/Src/Lokapala/Raptor/CommunicationSingletonInitiallize.cpp
3527d23e91e42c7c49a19877512fdb44b9769159
[]
no_license
sjp38/lokapala
5ced19e534bd7067aeace0b38ee80b87dfc7faed
dfa51d28845815cfccd39941c802faaec9233a6e
refs/heads/master
2021-01-15T16:10:23.884841
2009-06-03T14:56:50
2009-06-03T14:56:50
32,124,140
0
0
null
null
null
null
UTF-8
C++
false
false
518
cpp
CommunicationSingletonInitiallize.cpp
/**@file CommunicationSingletonInitiallize.cpp * @brief CCM의 모든 싱글톤의 초기화를 해준다. * @author siva */ #include "stdafx.h" #include "CommunicationFacade.h" #include "CommunicationManager.h" #include "CCDecisionSD.h" #include "CCMessengerSD.h" CCommunicationFacade *CCommunicationFacade::m_instance = NULL; CCommunicationManager *CCommunicationManager::m_instance = NULL; CCCDecisionSD *CCCDecisionSD::m_instance = NULL; CCCMessengerSD *CCCMessengerSD::m_instance = NULL;