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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7c5bb14442786769527f40d01cfb20a81998912
|
6e98a5d1588baaff7870316210c8033631fd7d3c
|
/libraries/chain/include/scorum/chain/dba/db_accessor_fwd.hpp
|
b9cc15984a23730cbd170677fd6995e4376f299c
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
scorum/scorum
|
f2ca45a678e46638d1bd0ebe868bed0431a53492
|
f660e3f8ead05f90e412f4d83f92e34ada13a61b
|
refs/heads/develop
| 2022-08-16T19:09:03.918951
| 2022-06-09T08:45:52
| 2022-06-09T10:04:56
| 106,838,543
| 57
| 30
|
NOASSERTION
| 2023-08-31T15:33:27
| 2017-10-13T15:01:17
|
C++
|
UTF-8
|
C++
| false
| false
| 112
|
hpp
|
db_accessor_fwd.hpp
|
#pragma once
namespace scorum {
namespace chain {
namespace dba {
template <typename> class db_accessor;
}
}
}
|
a5253ee04424fe1bb54298fb016805c70321a5f6
|
d0f116d7eb90c5f07f11977a40f391ee539da974
|
/src/smooth.hpp
|
1840c7faa6da88393bea8374532c4510b356454d
|
[] |
no_license
|
rising-turtle/torso_extract
|
0c4e25ab1454ba4e197db5463ac76acec7aa0215
|
52c1522289624697f2f8bdfbafcd50351df3952a
|
refs/heads/master
| 2021-01-19T23:02:46.101163
| 2019-02-13T14:38:00
| 2019-02-13T14:38:00
| 88,912,818
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 897
|
hpp
|
smooth.hpp
|
/*
* Oct. 27 2017, He Zhang, hxzhang1@ualr.edu
*
* Smooth the input , mean filter first
*
* */
#include <iostream>
template<typename T, int L>
CSmooth<T,L>::CSmooth()
{
assert(L >= 1);
}
template<typename T, int L>
CSmooth<T,L>::~CSmooth()
{}
template<typename T, int L>
void CSmooth<T,L>::push(T e)
{
mv_raw.push_back(e);
if(mv_raw.size() > L)
{
mv_raw.pop_front();
}
// cout <<"mv_raw.size() = "<<mv_raw.size()<<" L = "<<L<<endl;
}
template<typename T, int L>
T CSmooth<T,L>::pop()
{
int N = mv_raw.size();
assert(N > 0);
typename deque<T>::iterator it = mv_raw.begin();
T sum = 0;
while(it != mv_raw.end())
{
sum += (*it);
++it;
}
return (sum)/(T)(N);
}
template<typename T, int L>
void CSmooth<T,L>::clear()
{
mv_raw.clear();
}
template<typename T, int L>
bool CSmooth<T,L>::empty()
{
return (mv_raw.size() == 0);
}
|
930e2d39bc3c14db0841dfedf256c7ac373fbd40
|
7295ba4177fbc9e248b2bf8c3b51a033acb5d307
|
/t7_slg_pc/slg2Doc.cpp
|
3d568fccc26120de3413b841f61a0c4a7e1e25f9
|
[] |
no_license
|
BelousovYaroslav/slg_m3a
|
f0019c882a995e45272c12e26775f229bba1604a
|
6c916e89e0c96d2b251e8b0a56eecb6b342dc312
|
refs/heads/master
| 2016-09-08T05:06:01.683945
| 2015-06-19T08:45:47
| 2015-06-19T08:45:47
| 37,605,779
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,774
|
cpp
|
slg2Doc.cpp
|
// slg2Doc.cpp : implementation of the CSlg2Doc class
//
#include "stdafx.h"
#include "slg2.h"
#include "slg2Doc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSlg2Doc
IMPLEMENT_DYNCREATE(CSlg2Doc, CDocument)
BEGIN_MESSAGE_MAP(CSlg2Doc, CDocument)
//{{AFX_MSG_MAP(CSlg2Doc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSlg2Doc construction/destruction
CSlg2Doc::CSlg2Doc()
{
// TODO: add one-time construction code here
}
CSlg2Doc::~CSlg2Doc()
{
}
BOOL CSlg2Doc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
CString tmps;
tmps.LoadString( IDS_STR_VER);
this->SetTitle( tmps);
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CSlg2Doc serialization
void CSlg2Doc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CSlg2Doc diagnostics
#ifdef _DEBUG
void CSlg2Doc::AssertValid() const
{
CDocument::AssertValid();
}
void CSlg2Doc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSlg2Doc commands
|
a76ba5803ce1e8e7440552d6ca54d9a306cb6a92
|
3e0aa5238ba5741736929687d91147b0f0cf1cf4
|
/src/setpoint_flocking1.cpp
|
c90bc628e723b2896381c5dc556e3ac1755108b4
|
[] |
no_license
|
risingsunho/px4_swarm
|
356e34d95458d17d74ef5e605ec46769aabb91c0
|
acc861b28635ed87961eac9040263d81b2b8f0b4
|
refs/heads/master
| 2021-08-29T14:33:04.789503
| 2017-10-26T09:22:18
| 2017-10-26T09:22:18
| 108,140,357
| 5
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,768
|
cpp
|
setpoint_flocking1.cpp
|
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <stdio.h>
#include "geometry_msgs/PoseStamped.h"
#include "geometry_msgs/Vector3Stamped.h"
#include <geometry_msgs/Vector3.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/State.h>
#include <mavros_msgs/CommandBool.h>
#include "sensor_msgs/NavSatFix.h"
#include "math.h"
#define longtolatscale 0.8004163362410785091197462331483
#define lattolongscale 1.2493498129938325118272112550467
#define ZeropointX 126.865995
#define ZeropointY 37.6005335
mavros_msgs::State current_state;
geometry_msgs::PoseStamped msg;
geometry_msgs::Vector3 U1pose;
geometry_msgs::Vector3 U2pose;
geometry_msgs::Vector3 U3pose;
geometry_msgs::Vector3 Alignment;
geometry_msgs::Vector3 Coh;
geometry_msgs::Vector3 Sep;
geometry_msgs::Vector3 direction;
ros::Publisher chatter_pub;
float speed=1;
float height=0;
geometry_msgs::Vector3 GPStoWorldCoordinate(sensor_msgs::NavSatFix gps)
{
geometry_msgs::Vector3 tmp;
tmp.x=(gps.longitude-ZeropointX)*longtolatscale;
tmp.y=gps.latitude-ZeropointY;
tmp.x=tmp.x*8000;
tmp.y=tmp.y*8000;
return tmp;
}
void receivePose(geometry_msgs::PoseStamped vel){
height = vel.pose.position.z;
}
void state_cb(const mavros_msgs::State::ConstPtr& msg)
{
current_state = *msg;
}
geometry_msgs::Vector3 normalize(geometry_msgs::Vector3 vec)
{
geometry_msgs::Vector3 tmp;
float size=sqrt(vec.x*vec.x+vec.y*vec.y);
tmp.x=vec.x/size;
tmp.y=vec.y/size;
return tmp;
}
geometry_msgs::Vector3 CalDirection(geometry_msgs::Vector3 origin,geometry_msgs::Vector3 desired)
{
geometry_msgs::Vector3 translated;
//float Gx=(desired.x+origin.x)/2;
//float Gy=(desired.y+origin.y)/2;
float Gx=desired.x;
float Gy=desired.y; //목표의 월드 좌표
float Cx=origin.x;
float Cy=origin.y; //드론의 월드 좌표
translated.x = (Gx - Cx)*speed;
translated.y = (Gy - Cy)*speed;
return translated;
}
geometry_msgs::Vector3 VecPlus2(geometry_msgs::Vector3 A,geometry_msgs::Vector3 B)
{
geometry_msgs::Vector3 sum;
sum.x=A.x+B.x;
sum.y=A.y+B.y;
return sum;
}
geometry_msgs::Vector3 VecPlus3(geometry_msgs::Vector3 A,geometry_msgs::Vector3 B,geometry_msgs::Vector3 C)
{
geometry_msgs::Vector3 sum;
sum.x=A.x+B.x+C.x;
sum.y=A.y+B.y+C.y;
return sum;
}
void ReceiveGPS1(sensor_msgs::NavSatFix vel)
{
U1pose=GPStoWorldCoordinate(vel);
}
void ReceiveGPS2(sensor_msgs::NavSatFix vel)
{
U2pose=GPStoWorldCoordinate(vel);
}
void ReceiveGPS3(sensor_msgs::NavSatFix vel)
{
U3pose=GPStoWorldCoordinate(vel);
geometry_msgs::Vector3 U2desire;
geometry_msgs::Vector3 tmpdir;
Alignment=normalize(Alignment);
Coh.x=VecPlus3(U1pose,U2pose,U3pose).x/3;
Coh.y=VecPlus3(U1pose,U2pose,U3pose).y/3;
Coh=CalDirection(U2pose,Coh);
Coh=normalize(Coh);
//Coh.x=(U1pose.x+U2pose.x+U3pose.x)/3;
//Coh.y=(U1pose.y+U2pose.y+U3pose.y)/3;
Sep=VecPlus2(CalDirection(U3pose,U2pose),CalDirection(U1pose,U2pose));
Sep=normalize(Sep);
//Sep.x=CalDirection(U2pose,U3pose).x+CalDirection(U1pose,U3pose).x;
//Sep.y=CalDirection(U2pose,U3pose).y+CalDirection(U1pose,U3pose).y;
tmpdir=VecPlus3(Alignment,Coh,Sep);
msg.pose.position.x+=tmpdir.x/10;
msg.pose.position.y+=tmpdir.y/10;
msg.pose.position.z = 5;
chatter_pub.publish(msg);
}
void ReceiveDirection(geometry_msgs::Vector3 vel)
{
Alignment=vel;
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "setpoint_flocking1");
ros::NodeHandle n;
//UAV1
ros::Subscriber manual_sub=n.subscribe("/direction", 1, ReceiveDirection);
chatter_pub = n.advertise<geometry_msgs::PoseStamped>("/mavros2/setpoint_position/local",100);
ros::Subscriber state_sub = n.subscribe<mavros_msgs::State>("/mavros2/state", 10, state_cb);
ros::ServiceClient arming_client = n.serviceClient<mavros_msgs::CommandBool>("/mavros2/cmd/arming");
ros::ServiceClient set_mode_client = n.serviceClient<mavros_msgs::SetMode>("/mavros2/set_mode");
ros::Subscriber gps_sub1=n.subscribe("/mavros1/global_position/global", 1, ReceiveGPS1);
ros::Subscriber gps_sub2=n.subscribe("/mavros2/global_position/global", 1, ReceiveGPS2);
ros::Subscriber gps_sub3=n.subscribe("/mavros3/global_position/global", 1, ReceiveGPS3);
ros::Subscriber takeoff_client = n.subscribe<geometry_msgs::PoseStamped>("/mavros2/local_position/pose",1,receivePose);
//the setpoint publishing rate MUST be faster than 2Hz
ros::Rate rate(20.0);
// wait for FCU connection
while(ros::ok() && current_state.connected){
ros::spinOnce();
rate.sleep();
}
ros::Rate loop_rate(20);
msg.pose.position.x = 0;
msg.pose.position.y = 0;
msg.pose.position.z = 5;
mavros_msgs::SetMode offb_set_mode;
offb_set_mode.request.custom_mode = "OFFBOARD";
mavros_msgs::CommandBool arm_cmd;
arm_cmd.request.value = true;
ros::Time last_request = ros::Time::now();
while(ros::ok()){
if( current_state.mode != "OFFBOARD" && (ros::Time::now() - last_request > ros::Duration(5.0)))
{
if( set_mode_client.call(offb_set_mode) && offb_set_mode.response.success)
{
ROS_INFO("Offboard enabled");
}
last_request = ros::Time::now();
}
else
{
if( !current_state.armed && (ros::Time::now() - last_request > ros::Duration(5.0)))
{
if( arming_client.call(arm_cmd) && arm_cmd.response.success)
{
ROS_INFO("Vehicle armed");
}
last_request = ros::Time::now();
}
}
ros::spinOnce();
loop_rate.sleep();
}
return 0;
}
|
e531905507171343a6fbd9e301626c2736650490
|
1e7995b70c4809adb4f603d7e537ebb64234f773
|
/variadicTemplates.cpp
|
5cadc013b69da23adb2dd59f6afbdef125a6735b
|
[
"MIT"
] |
permissive
|
bruennijs/ise.cppworkshop
|
420aaecb6b4f95ebe80f62c25ad7e0fdc995efa5
|
c54a60ad3468f83aeb45b347657b3f246d7190cc
|
refs/heads/master
| 2020-06-06T04:24:08.913519
| 2015-03-06T17:02:09
| 2015-03-06T17:02:09
| 30,956,520
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 86
|
cpp
|
variadicTemplates.cpp
|
template<typename T, ...>
void printf(T obj, std::string s1)
{
}
int main() {
pei
}
|
1f8af2f1196c04f175f8d2a52268bab01e221de9
|
abd3c8f909565f914de2c93eb8e091938b1fcc49
|
/modules/camera/src/bin/o3d3xx-imager-types.cpp
|
b2c6e83d1478a2dd0b09dcee551d9fd57c7cd578
|
[
"Apache-2.0"
] |
permissive
|
ifm/libo3d3xx
|
fd2682ae105fedab81d8165d3394b22f5897d0d4
|
89d26a524bceee2f6ed20d9adf28414096635aa1
|
refs/heads/master
| 2023-04-13T14:34:38.380396
| 2021-04-15T11:28:17
| 2021-04-15T11:28:17
| 24,420,973
| 10
| 8
|
Apache-2.0
| 2019-11-06T16:37:46
| 2014-09-24T15:36:06
|
C++
|
UTF-8
|
C++
| false
| false
| 3,773
|
cpp
|
o3d3xx-imager-types.cpp
|
/*
* Copyright (C) 2015 Love Park Robotics, LLC
*
* 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 distribted 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 <algorithm>
#include <exception>
#include <iostream>
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include <boost/program_options.hpp>
#include "o3d3xx_camera.h"
//
// Lists available imagers and (optionally) their configurable parameters.
//
namespace po = boost::program_options;
int main(int argc, const char** argv)
{
std::string camera_ip;
std::uint32_t xmlrpc_port;
std::string password;
bool verbose;
try
{
o3d3xx::CmdLineOpts opts("o3d3xx Imager Types");
po::options_description im_opts("Imager Types");
im_opts.add_options()
("params,p",
po::value<bool>()->default_value(false),
"Include tunable parameters for each imager type");
opts.visible.add(im_opts);
if (! opts.Parse(argc, argv, &camera_ip, &xmlrpc_port, &password))
{
return 0;
}
verbose = opts.vm["params"].as<bool>();
o3d3xx::Camera::Ptr cam =
std::make_shared<o3d3xx::Camera>(camera_ip, xmlrpc_port, password);
cam->RequestSession();
cam->SetOperatingMode(o3d3xx::Camera::operating_mode::EDIT);
o3d3xx::DeviceConfig::Ptr dev = cam->GetDeviceConfig();
cam->EditApplication(dev->ActiveApplication());
std::vector<std::string> imager_types = cam->GetAvailableImagerTypes();
std::sort(imager_types.begin(), imager_types.end());
for (auto& type : imager_types)
{
std::cout << type << std::endl;
if (verbose)
{
cam->ChangeImagerType(type);
std::unordered_map<std::string, std::string> params =
cam->GetImagerParameters();
std::unordered_map<std::string,
std::unordered_map<std::string,
std::string> > limits =
cam->GetImagerParameterLimits();
std::map<std::string, std::string>
params_sorted(params.begin(), params.end());
for (auto it = params_sorted.begin();
it != params_sorted.end(); ++it)
{
std::cout << "\t" << it->first << ": ";
try
{
std::unordered_map<std::string, std::string>
param_limits = limits.at(it->first);
std::cout << "[min=" << param_limits.at("min")
<< ", max=" << param_limits.at("max")
<< "]";
}
catch (const std::out_of_range& ex)
{
// no limits defined for this parameter
std::cout << "no limits defined";
}
std::cout << std::endl;
}
std::cout << std::endl;
}
}
cam->StopEditingApplication();
}
catch (const std::exception& ex)
{
std::cerr << "Failed to list available imagers: "
<< ex.what() << std::endl;
return 1;
}
return 0;
}
|
e97eeec8e1fe03fce0c3af8881bf81b7d50a8d93
|
5608b925503c7407b7b176a96bd2db94bb51ef7e
|
/downward/src/search/pdbs/explicit_projection.h
|
b4c8e03f6cc426a0cdd6f6d96688e805ae29b5be
|
[] |
no_license
|
ramonpereira/PlanningLP
|
9713a3cc95862abb80f87e774630b1ceb944c977
|
081a22eab2bc1a4d16c1ac0c5aa9a20162111992
|
refs/heads/master
| 2022-09-20T10:42:29.908843
| 2020-05-16T14:46:47
| 2020-05-16T14:46:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,436
|
h
|
explicit_projection.h
|
#ifndef PDBS_EXPLICIT_PROJECTION_H
#define PDBS_EXPLICIT_PROJECTION_H
#include "types.h"
#include "../abstract_task.h"
#include "../task_proxy.h"
#include <vector>
namespace pdbs {
struct Transition {
int source;
int target;
int op_id;
Transition(int source, int target, int op_id)
: source(source), target(target), op_id(op_id) {}
};
struct AbstractTransitionSystem {
int num_states;
int initial_state;
std::vector<int> goal_states;
std::vector<Transition> state_changing_transitions;
std::vector<Transition> self_loops;
std::vector<int> self_loops_on_all_states;
};
class AbstractionFunction {
std::vector<int> pattern;
std::vector<int> hash_multipliers;
std::vector<int> index_translation;
public:
AbstractionFunction(const Pattern &pattern,
const std::vector<int> &hash_multipliers);
AbstractionFunction(const AbstractionFunction &other,
std::vector<int> &&index_translation);
int get_abstract_state(const State &state) const;
};
std::pair<AbstractionFunction, AbstractTransitionSystem> project_task(
const AbstractTask &task, const Pattern &pattern,
bool remove_dead_states = true, bool use_mutexes = false,
const std::vector<std::vector<int>> &partial_merge_states =
std::vector<std::vector<int>>());
void dump(const AbstractTransitionSystem &ts);
} // namespace pdbs
#endif
|
9948be132e63e744ebd772bf33c9dc08e66d0d2a
|
200b7d0f3fed76c0dc42422d837560a96c3958a9
|
/InterviewBit/trees/lowestcommonancestorofbinarytree.cpp
|
6251d04b8ba11669b1c0b9f10e35fb43deacc12c
|
[] |
no_license
|
Arjunkhera/Competitive_Programming
|
99b7f15bed4e2639ea040a4d8cb5f8ee1a0e8a7e
|
f8f2a9ce9b5c78ccb9e8ef722ffc537edeefdb3b
|
refs/heads/master
| 2021-06-06T13:21:57.471859
| 2018-08-02T08:18:47
| 2018-08-02T08:18:47
| 107,667,379
| 3
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,039
|
cpp
|
lowestcommonancestorofbinarytree.cpp
|
// leetcode question 236
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
struct tree{
int data;
tree* left;
tree* right;
tree(int dat):data(dat),left(nullptr),right(nullptr){}
};
// input elements level wise
void readLevelOrder(tree* &root){
std::queue<tree*> nodes;
int dat;
std::cin>>dat;
// empty tree
if(dat == -1)
return;
root = new tree(dat);
nodes.push(root);
tree* temp = nullptr;
tree* child = nullptr;
while(!nodes.empty()){
temp = nodes.front();
nodes.pop();
// check for left child
std::cin>>dat;
if(dat != -1){
child = new tree(dat);
temp->left = child;
nodes.push(child);
}
// check for right child
std::cin>>dat;
if(dat != -1){
child = new tree(dat);
temp->right = child;
nodes.push(child);
}
}
}
// display has various methods
void displayInOrder(tree* root){
if(root == nullptr)
return;
displayInOrder(root->left);
std::cout<<root->data<<" ";
displayInOrder(root->right);
}
bool findnode(TreeNode* root,int candidate,vector<int> &answer){
if(root == nullptr) return false;
if(root->val == candidate) return true;
answer.push_back(0);
if(findnode(root->left,candidate,answer)) return true;
answer.pop_back(); answer.push_back(1);
if(findnode(root->right,candidate,answer)) return true;
answer.pop_back();
return false;
}
// solution function
tree* lowestCommonAncestor(tree* root,tree* p,tree* q){
vector<int> a,b; TreeNode* temp = root;
if(!findnode(root,p,a)) return -1;
if(!findnode(root,q,b)) return -1;
// cout<<a<<endl; cout<<b<<endl;
for(int i = 0;i < a.size() && i < b.size() && a[i] == b[i]; i++){
if(a[i] == 0) temp = temp->left; else temp = temp->right;
}
return temp->val;
}
int main(){
tree* root = nullptr;
readLevelOrder(root);
tree* t1; tree* t2;
tree* answer = lowestCommonAncestor(root,t1,t2);
cout<<answer->data<<endl;
return 0;
}
// 4 3 7 2 5 6 9 -1 -1 -1 -1 -1 -1 -1 -1
|
de2a1800e134a08d9216323558f94fe46dbca70b
|
c14adcddc1e9c0c9195ea3c064f1414c943adec9
|
/InterviewBit/ReduceTheString.cpp
|
0d5aa38c2d79769c96466b6a92b679fdc4bcb34e
|
[] |
no_license
|
gagandeepahuja09/Strings
|
0622d452c39344ace5018d195939c09caa6f868c
|
5ba75291bf2c2eebb0fe4372fd36abda7f6324cf
|
refs/heads/master
| 2020-05-04T15:25:46.279687
| 2020-04-05T10:40:39
| 2020-04-05T10:40:39
| 179,240,509
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 805
|
cpp
|
ReduceTheString.cpp
|
/*
Reduce the string
Given a string A consisting of lowercase English alphabets. Reduce the string to its shortest length by doing any number of operations (possibly zero). In one operation selects a pair of adjacent letters in the string that match and deletes them. For example the string bcaa is shortened to bc in one operation.
Find and return the string by reducing it to its shortest length. if the resultant string is empty return "empty".*/
string Solution::solve(string A) {
stack<char> stk;
for(int i = 0; i < A.size(); i++) {
if(stk.empty() || stk.top() != A[i]) {
stk.push(A[i]);
}
else
stk.pop();
}
string s;
while(!stk.empty()) {
s = stk.top() + s;
stk.pop();
}
return s == "" ? "empty" : s;
}
|
76b03d50a71f89f1c39ad9b52a0c52910cfda4ba
|
9d8c776aea1da184e2bd6fe5fbba511e4ea66e0a
|
/ROSPackages/rtabmap_helper/src/mapdata_to_pointcloud.cpp
|
495f71c8674d4ff740dc49a3dfb6bb27ce883691
|
[] |
no_license
|
PascalLiPooKim/unity-with-ros-interface
|
63f8d44caf496c5811aceb8c59a481b026e59a4c
|
96151a579addf22b7c5208934879a7bc6f373705
|
refs/heads/main
| 2023-07-19T00:29:24.773203
| 2021-06-20T09:47:50
| 2021-06-20T09:47:50
| 376,250,345
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,363
|
cpp
|
mapdata_to_pointcloud.cpp
|
#include <ros/ros.h>
#include "std_msgs/Header.h"
#include "sensor_msgs/PointCloud2.h"
#include <tf/transform_listener.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "cv_bridge/cv_bridge.h"
#include "rtabmap/core/util3d.h"
#include "rtabmap/core/Compression.h"
#include "rtabmap/core/Signature.h"
#include <rtabmap/core/Graph.h>
#include "rtabmap_ros/MsgConversion.h"
#include "rtabmap_ros/MapData.h"
#include "rtabmap_ros/NodeData.h"
#include "rtabmap_ros/MapGraph.h"
#include <rtabmap_helper/PointCloudMapData.h>
#include <rtabmap_helper/PointCloudNodeData.h>
#include "pcl_conversions/pcl_conversions.h"
#include <pcl/point_types.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/common/transforms.h>
#include <pcl/registration/icp.h>
#include <pcl/common/io.h>
#include "pcl_ros/point_cloud.h"
#include <pcl_ros/transforms.h>
#include <algorithm>
class MapdataToPointcloud{
private:
tf::TransformListener* tfListener;
ros::Subscriber map_data_sub;
ros::Publisher pcl_pub;
ros::Publisher pcl_mapdata_pub;
std::string pcl_mapdata_topic;
std::string pcl_data_topic;
double voxelsize;
std_msgs::Header header;
float fx;
float fy;
float cx;
float cy;
float fx_inv;
float fy_inv;
std::map<int, pcl::PointCloud<pcl::PointXYZRGB>> cloud_dict;
ros::Publisher pcl_map_debug;
pcl::PointCloud<pcl::PointXYZRGB> cloud_aggregate;
pcl::PointCloud<pcl::PointXYZRGB> cloud_aggregate_icp;
pcl::PointCloud<pcl::PointXYZRGB> cloud_alligned;
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_out;
bool isIcpReady = false;
union RGBValue
{
struct
{
unsigned char Blue;
unsigned char Green;
unsigned char Red;
unsigned char Alpha;
};
float float_value;
std::uint32_t long_value;
};
public:
MapdataToPointcloud(ros::NodeHandle *nh){
tfListener = new tf::TransformListener;
nh->param<std::string>("pcl_mapdata_topic", pcl_mapdata_topic, "/rtabmap_helper/pcl_mapdata");
nh->param<std::string>("pcl_data_topic", pcl_data_topic, "/rtabmap_helper/pcl_frame");
nh->param<double>("voxelsize", voxelsize, 0.05d);
ROS_INFO_STREAM("PointCloud data topic set to: " << pcl_data_topic);
ROS_INFO_STREAM("PointCloud map data topic set to: " << pcl_mapdata_topic);
ROS_INFO("Voxelsize set to: %.2f", (float)voxelsize);
map_data_sub = nh->subscribe("/rtabmap/mapData", 100, &MapdataToPointcloud::mapdata_callback, this);
pcl_pub = nh->advertise<sensor_msgs::PointCloud2>(pcl_data_topic, 100);
pcl_mapdata_pub = nh->advertise<rtabmap_helper::PointCloudMapData>(pcl_mapdata_topic, 100);
pcl_map_debug = nh->advertise<sensor_msgs::PointCloud2>("/rtabmap_helper/pcl_debug", 100);
}
void print4x4Matrix (const Eigen::Matrix4d & matrix)
{
printf ("Rotation matrix :\n");
printf (" | %6.3f %6.3f %6.3f | \n", matrix (0, 0), matrix (0, 1), matrix (0, 2));
printf ("R = | %6.3f %6.3f %6.3f | \n", matrix (1, 0), matrix (1, 1), matrix (1, 2));
printf (" | %6.3f %6.3f %6.3f | \n", matrix (2, 0), matrix (2, 1), matrix (2, 2));
printf ("Translation vector :\n");
printf ("t = < %6.3f, %6.3f, %6.3f >\n\n", matrix (0, 3), matrix (1, 3), matrix (2, 3));
}
void mapdata_callback(const rtabmap_ros::MapData& msg){
header = msg.header;
//Uncompress images
cv::Mat rgb_image_compressed = cv::Mat(msg.nodes[0].image);
cv::Mat depth_image_compressed = cv::Mat(msg.nodes[0].depth);
cv::Mat rgb_image;
cv::Mat depth_image;
rgb_image = rtabmap::uncompressImage(rgb_image_compressed);
depth_image = rtabmap::uncompressImage(depth_image_compressed);
//Assign camera variables from message
fx = msg.nodes[0].fx[0];
fy = msg.nodes[0].fy[0];
cx = msg.nodes[0].cx[0];
cy = msg.nodes[0].cy[0];
fx_inv = 1.0f / fx;
fy_inv = 1.0f / fy;
//Obtain pointcloud from rgb and depth image
if(depth_image.size().width != 0 || depth_image.size().height != 0
|| rgb_image.size().width != 0 || rgb_image.size().height != 0){
ROS_INFO("Received new frame [id: %d]", msg.nodes[0].id);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_rtab = cloudRGBFromRtabmap(msg.nodes[0]);
pcl_conversions::toPCL(msg.header, cloud_rtab->header);
//Apply voxelfilter to downsample pointcloud
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_filtered (new pcl::PointCloud<pcl::PointXYZRGB>);
VoxelFilter(cloud_rtab, cloud_filtered, (float)voxelsize);
cloud_dict.insert(std::make_pair(msg.nodes[0].id, *cloud_filtered));
//Transforming cloud into correct position for frame publisher
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_transformed (new pcl::PointCloud<pcl::PointXYZRGB>);
int index;
for (int i = 0; i < msg.graph.posesId.size(); i++){
if(msg.graph.posesId[i] == msg.nodes[0].id){
index = i;
}
}
Eigen::Vector3f map_position = Eigen::Vector3f(msg.graph.poses[index].position.x, msg.graph.poses[index].position.y, msg.graph.poses[index].position.z);
Eigen::Quaternionf map_rotation = Eigen::Quaternionf(msg.graph.poses[index].orientation.w, msg.graph.poses[index].orientation.x,
msg.graph.poses[index].orientation.y, msg.graph.poses[index].orientation.z);
pcl::transformPointCloud(*cloud_filtered, *cloud_transformed, map_position, map_rotation);
//Generating custom message and assigning variables
rtabmap_helper::PointCloudMapData pcl_mapdata;
rtabmap_helper::PointCloudNodeData pcl_nodedata;
sensor_msgs::PointCloud2 ros_cloud;
pcl::toROSMsg(*cloud_filtered, ros_cloud);
//Filtering poses
std::map<int, rtabmap::Transform> poses;
for(unsigned int i=0; i<msg.graph.posesId.size() && i<msg.graph.poses.size(); ++i){
poses.insert(std::make_pair(msg.graph.posesId[i], rtabmap_ros::transformFromPoseMsg(msg.graph.poses[i])));
}
poses = rtabmap::graph::radiusPosesFiltering(poses,0.0f, 30.0f*CV_PI/180.0);
std::vector<int> posesId;
std::vector<geometry_msgs::Pose> ros_poses;
for (std::map<int, rtabmap::Transform>::iterator it=poses.begin(); it != poses.end(); ++it){
geometry_msgs::Pose ros_pose;
rtabmap_ros::transformToPoseMsg(it->second, ros_pose);
posesId.push_back(it->first);
ros_poses.push_back(ros_pose);
}
// //Constructing aggregate pointcloud
// pcl::PointCloud<pcl::PointXYZRGB> cloud_aggregate;
// for(unsigned int i=0; i<posesId.size() && i<ros_poses.size(); ++i){
// if(cloud_dict.find(posesId[i])!=cloud_dict.end()){
// pcl::PointCloud<pcl::PointXYZRGB> cloud_step;
// pcl::PointCloud<pcl::PointXYZRGB> cloud_step_transformed;
// cloud_step = cloud_dict.find(posesId[i])->second;
// Eigen::Vector3f map_position = Eigen::Vector3f(ros_poses[i].position.x, ros_poses[i].position.y, ros_poses[i].position.z);
// Eigen::Quaternionf map_rotation = Eigen::Quaternionf(ros_poses[i].orientation.w, ros_poses[i].orientation.x,
// ros_poses[i].orientation.y, ros_poses[i].orientation.z);
// pcl::transformPointCloud(cloud_step, cloud_step_transformed, map_position, map_rotation);
// cloud_aggregate += cloud_step_transformed;
// }
// }
// pcl_conversions::toPCL(msg.header, cloud_aggregate.header);
//Constructing ROS messages
pcl_nodedata.id = msg.nodes[0].id;
pcl_nodedata.mapId = msg.nodes[0].mapId;
pcl_nodedata.weight = msg.nodes[0].weight;
pcl_nodedata.stamp = msg.nodes[0].stamp;
pcl_nodedata.label = msg.nodes[0].label;
pcl_nodedata.nodeData = ros_cloud;
pcl_nodedata.localTransform = msg.nodes[0].localTransform;
pcl_mapdata.graph = msg.graph;
pcl_mapdata.graph.posesId = posesId;
pcl_mapdata.graph.poses = ros_poses;
pcl_mapdata.header = header;
pcl_mapdata.nodes.push_back(pcl_nodedata);
//Publishing Messages
pcl_pub.publish(cloud_transformed);
pcl_mapdata_pub.publish(pcl_mapdata);
//pcl_map_debug.publish(cloud_aggregate);
}
else{
ROS_INFO("Recieved empty frame, Skipping.");
}
}
pcl::PointCloud<pcl::PointXYZRGB>::Ptr convertToXYZRGBPointCloud(cv::Mat &image, cv::Mat &depth){
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGB>);
pcl_conversions::toPCL(header, cloud->header);
cloud->width = image.size().width;
cloud->height = image.size().height;
cloud->points.resize (cloud->height * cloud->width);
//Getting data buffer from images
uint8_t* rgb_buffer = (uint8_t*)image.data;
float* depth_buffer = (float*)depth.data;
//Variables for depth loop
unsigned step = cloud->width / depth.size().width;
unsigned skip = cloud->width - (depth.size().width * step);
unsigned value_idx = 0;
unsigned point_idx = 0;
//Depth image -> assigning positions of points
for (unsigned v = 0; v < depth.size().height; ++v, point_idx += skip){
for (unsigned u = 0; u < depth.size().width; ++u, ++value_idx, point_idx += step){
pcl::PointXYZRGB& pt = (*cloud)[point_idx];
if(!isnan(depth_buffer[point_idx])){
pt.z = depth_buffer[value_idx];
pt.x = (static_cast<float> (u) - cx) * pt.z * fx_inv;
pt.y = (static_cast<float> (v) - cy) * pt.z * fy_inv;
}
else
{
pt.z = 0.0f;
pt.y = 0.0f;
pt.x = 0.0f;
}
}
}
//Variables for RGB loop
step = cloud->width / depth.size().width;
skip = cloud->width - (depth.size().width * step);
value_idx = 0;
point_idx = 0;
RGBValue color;
color.Alpha = 0xff;
//Colour image -> assigning colours of points
for (unsigned yIdx = 0; yIdx < image.size().height; ++yIdx, point_idx += skip){
for (unsigned xIdx = 0; xIdx < image.size().width; ++xIdx, point_idx += step, value_idx += 3){
pcl::PointXYZRGB& pt = (*cloud)[point_idx];
color.Blue = rgb_buffer[value_idx];
color.Green = rgb_buffer[value_idx + 1];
color.Red = rgb_buffer[value_idx + 2];
pt.rgba = color.long_value;
}
}
return cloud;
}
// if(isIcpReady){
// ROS_INFO("Applying ICP");
// pcl::IterativeClosestPoint<pcl::PointXYZRGB, pcl::PointXYZRGB> icp;
// pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_aggregate_ptr (new pcl::PointCloud<pcl::PointXYZRGB>);
// pcl::copyPointCloud(cloud_aggregate_icp, *cloud_aggregate_ptr);
// // Set the input source and target
// icp.setInputSource (cloud_filtered_transformed);
// icp.setInputTarget (cloud_aggregate_ptr);
// icp.setMaxCorrespondenceDistance (0.05);
// icp.setRANSACOutlierRejectionThreshold(0.10);
// // Set the maximum number of iterations (criterion 1)
// icp.setMaximumIterations (500);
// // Set the transformation epsilon (criterion 2)
// icp.setTransformationEpsilon (1e-9);
// // Set the euclidean distance difference epsilon (criterion 3)
// icp.setEuclideanFitnessEpsilon (1);
// icp.align (cloud_alligned);
// if (icp.hasConverged ()){
// ROS_INFO("ICP Converged");
// Eigen::Matrix4f transformation_matrix = icp.getFinalTransformation();
// print4x4Matrix (transformation_matrix.cast<double>());
// }
// pcl::PointCloud<pcl::PointXYZRGB> transformed_target_cloud;
// Eigen::Matrix4f transformation_matrix = icp.getFinalTransformation();
// pcl::transformPointCloud(*cloud_filtered_transformed, transformed_target_cloud, transformation_matrix);
// cloud_aggregate_icp += transformed_target_cloud;
// sensor_msgs::PointCloud2 ros_aggregate_icp;
// cloud_aggregate_icp.header.frame_id = "/map";
// pcl::toROSMsg(cloud_aggregate_icp, ros_aggregate_icp);
// pcl_map_debug_icp.publish(ros_aggregate_icp);
// }
// else{
// ROS_INFO("cloud_aggregate has no points; Creating");
// cloud_aggregate_icp += *cloud_filtered_transformed;
// isIcpReady = true;
// }
pcl::PointCloud<pcl::PointXYZRGB> cloudICP(pcl::PointCloud<pcl::PointXYZRGB>::Ptr input_src, pcl::PointCloud<pcl::PointXYZRGB>::Ptr input_target){
pcl::IterativeClosestPoint<pcl::PointXYZRGB, pcl::PointXYZRGB> icp;
// Set the input source and target
icp.setInputSource (input_src);
icp.setInputTarget (input_target);
icp.setMaxCorrespondenceDistance (0.05);
icp.setRANSACOutlierRejectionThreshold(0.10);
// Set the maximum number of iterations (criterion 1)
icp.setMaximumIterations (500);
// Set the transformation epsilon (criterion 2)
icp.setTransformationEpsilon (1e-9);
// Set the euclidean distance difference epsilon (criterion 3)
icp.setEuclideanFitnessEpsilon (1);
icp.align (cloud_alligned);
pcl::PointCloud<pcl::PointXYZRGB> transformed_target;
if (icp.hasConverged ()){
Eigen::Matrix4f transformation_matrix = icp.getFinalTransformation();
pcl::PointCloud<pcl::PointXYZRGB> transformed_target_cloud;
pcl::transformPointCloud(*input_target, transformed_target, transformation_matrix);
}
return transformed_target;
}
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudRGBFromRtabmap(rtabmap_ros::NodeData node){
rtabmap::Signature s = rtabmap_ros::nodeDataFromROS(node);
cv::Mat image, depth;
rtabmap::LaserScan scan;
s.sensorData().uncompressData(true?&image:0, true?&depth:0, false?&scan:0);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
pcl::IndicesPtr validIndices(new std::vector<int>);
cloud = rtabmap::util3d::cloudRGBFromSensorData(
s.sensorData(),
1,
999.0f,
0.5f,
validIndices.get());
ROS_INFO_STREAM(cloud->header.frame_id);
return cloud;
}
void VoxelFilter(pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_input, pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_output, float voxel_size){
pcl::VoxelGrid<pcl::PointXYZRGB> sor;
sor.setInputCloud (cloud_input);
sor.setLeafSize (voxel_size, voxel_size, voxel_size);
sor.filter (*cloud_output);
}
pcl::PointCloud<pcl::PointXYZRGB>::Ptr PointCloudTransform(pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_input, std::string frameid_input, pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_output, std::string frameid_output){
tf::StampedTransform transform;
try{
tfListener->lookupTransform(frameid_input, frameid_output,
ros::Time(0), transform);
}
catch (tf::TransformException &ex) {
ROS_ERROR("%s","No Transform Found");
return cloud_input;
}
pcl_ros::transformPointCloud(*cloud_input, *cloud_output, transform);
return cloud_output;
}
};
int main(int argc, char **argv){
ROS_INFO("Started Node");
ros::init(argc, argv, "rtabmap_helper");
ros::NodeHandle nh;
MapdataToPointcloud mdtpc = MapdataToPointcloud(&nh);
ros::spin();
}
|
5f3dd8c218d86557fac0effdfea273e080472f67
|
a58a958143ba0421f6e9464b1b137a8c5ca3bbf8
|
/MySolutions/1-c-increment/increment.cpp
|
3123b718c8ca6cfab7865e73f07a95f3b03d26d4
|
[
"MIT"
] |
permissive
|
nukex1122/-Competitive-Programmer-s-Core-Skills-Coursera-
|
6fb3bc79e033fa0a5f8843f21d54425629072808
|
600cd2b78ad1593dc8b1bd18f84fc2b7d35366cc
|
refs/heads/master
| 2020-08-17T05:02:55.504360
| 2019-10-16T18:28:05
| 2019-10-16T18:28:05
| 215,612,278
| 0
| 0
|
MIT
| 2019-10-16T18:02:39
| 2019-10-16T18:02:39
| null |
UTF-8
|
C++
| false
| false
| 304
|
cpp
|
increment.cpp
|
using namespace std;
#include <bits/stdc++.h>
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
int l,flag;
cin>>s;
l = s.length();
flag=0;
for(auto x:s){
if(x!='9'){
flag=1;
break;
}
}
if(flag) cout<<l<<"\n";
else cout<<(l+1)<<"\n";
return 0;
}
|
0332b2a4abb092e948bd30606b763ded48043b15
|
518ad5ca97f0972455297e719a14b8ada9a97d6b
|
/invaders v2/ResourceManager.cpp
|
11962e6109efd8cc43292f5dca53bd5fcd4c468e
|
[] |
no_license
|
DariusL/invaders2
|
e2258fe6c7d3f423705a2c782c8fefa282d4da44
|
1e5d0a4648dce5794fcb693462ee6f3ffe70b48d
|
refs/heads/master
| 2021-01-13T03:53:19.211223
| 2014-09-29T16:01:55
| 2014-09-29T16:01:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,479
|
cpp
|
ResourceManager.cpp
|
#include "includes.h"
#include "ResourceManager.h"
#include "DDSTextureLoader.h"
using namespace e;
ResourceManager *ResourceManager::handle;
ResourceManager::ResourceManager(ID3D11Device *device, bool loadCompute)
:letters(GetModelsFromOBJ(L"Resources\\text.obj"))
{
handle = this;
VertexType vt;
Geometry<VertexType> plane;
vt.position = XMFLOAT3(-0.5f, -0.5f, 0.0f); // Bottom left.
plane.Add(vt);
vt.position = XMFLOAT3(-0.5f, 0.5f, 0.0f); // Top left
plane.Add(vt);
vt.position = XMFLOAT3(0.5f, -0.5f, 0.0f); // Bottom right.
plane.Add(vt);
vt.position = XMFLOAT3(0.5f, 0.5f, 0.0f); // Top right.
plane.Add(vt);
plane.indices.push_back(1);
plane.indices.push_back(2);
plane.indices.push_back(0);
plane.indices.push_back(1);
plane.indices.push_back(3);
plane.indices.push_back(2);
models.emplace_back(device, plane);
models.emplace_back(device, GetModelFromOBJ(L"Resources\\player.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\enemy1.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\enemy2.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\enemy3.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\enemy4.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\enemy5.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\enemy6.obj"));
models.emplace_back(device, GetModelFromOBJ(L"Resources\\bullet.obj"));
Level *level = new Level();
level->gridWidth = 11;
level->gridHeight = 5;
for (int i = 0; i < level->gridHeight * level->gridWidth; i++)
{
level->enemies.push_back(MODEL::MODEL_PLAYER);
}
levels.push_back(shared_ptr<Level>(level));
shaders.push_back(make_unique<ColorShader>(L"Shaders\\ColorVertex.cso", L"Shaders\\ColorPixel.cso"));
shaders.push_back(make_unique<ColorInstancedShader>(L"Shaders\\ColorInstancedVertex.cso", L"Shaders\\ColorInstancedPixel.cso"));
shaders.push_back(make_unique<GlobalDiffuseShader>(L"Shaders\\GlobalDiffuseVertex.cso", L"Shaders\\GlobalDiffusePixel.cso"));
shaders.push_back(make_unique<GlobalSpecularShader>(L"Shaders\\GlobalSpecularVertex.cso", L"Shaders\\GlobalSpecularPixel.cso"));
shaders.push_back(make_unique<TextureShader>(L"Shaders\\TextureVertex.cso", L"Shaders\\TexturePixel.cso"));
if (loadCompute)
{
computeShaders.push_back(make_unique<CelComputeShader>(L"Shaders\\CelCompute.cso"));
computeShaders.push_back(make_unique<UpSampleComputeShader>(L"Shaders\\UpSampleCompute.cso"));
computeShaders.push_back(make_unique<DownSampleComputeShader>(L"Shaders\\DownSampleCompute.cso"));
computeShaders.push_back(make_unique<HorizontalBlurComputeShader>(L"Shaders\\BlurCompute.cso"));
computeShaders.push_back(make_unique<VerticalBlurComputeShader>(L"Shaders\\BlurCompute.cso"));
computeShaders.push_back(make_unique<FilterDownSampleShader>(L"Shaders\\FilterDownSampleCompute.cso"));
computeShaders.push_back(make_unique<TexelSumComputeShader>(L"Shaders\\TexelSumCompute.cso"));
computeShaders.push_back(make_unique<CopyComputeShader>(L"Shaders\\CopyCompute.cso"));
}
for (auto &shader : shaders)
shader->Init(device);
for (auto &shader : computeShaders)
shader->Init(device);
}
Geometry<VertexType> ResourceManager::GetModelFromOBJ(wstring filename, bool invert)
{
ifstream in(filename, ios::binary);
Geometry<VertexType> g;
string input;
float x, y, z;
AssertBool(in.is_open(), L"File " + filename + L" not found");
while (!in.eof())
{
in >> input;
if (input == "#")
{
in.ignore(200, '\n');
continue;
}
if (input == "v")
{
in >> x >> y >> z;
g.Add(x, y, -z);
}
else if (input == "f")
{
string blob;
getline(in, blob, '\n');
auto fvert = GetVerticesFromFace(blob);
if (!invert)
{
Utils::Reverse(fvert);
}
for (auto &vertex : fvert)
{
g.indices.push_back(vertex.vertex);
}
}
}
return g;
}
unordered_map<char, Geometry<VertexType>> ResourceManager::GetModelsFromOBJ(wstring filename)
{
unordered_map<char, Geometry<VertexType>> ret;
ifstream in(filename, ios::binary);
Geometry<VertexType> g;
string input;
float x, y, z;
int voff = 1;
string name;
bool object = false;
AssertBool(in.is_open(), L"File " + filename + L" not found");
while (!in.eof())
{
in >> input;
if (object)
{
if (input == "f")
{
string blob;
getline(in, blob, '\n');
auto fvert = GetVerticesFromFace(blob, voff);
Utils::Reverse(fvert);
for (auto &vertex : fvert)
{
g.indices.push_back(vertex.vertex);
}
}
else
{
if (name == "_")
name.length();
object = false;
voff += g.vertices.size();
g.Center();
ret.emplace(name[0], move(g));
in.ignore(200, '\n');
}
}
else
{
if (input == "#" || input == "vt" || input == "vn")
{
in.ignore(200, '\n');
}
else if (input == "v")
{
in >> x >> y >> z;
g.Add(x, y, -z);
}
else if (input == "g")
{
in >> name;
object = true;
}
}
}
return ret;
}
Geometry<NormalVertexType> ResourceManager::GetNormalModelFromOBJ(wstring filename, bool invert)
{
Geometry<NormalVertexType> g;
ifstream in(filename, ios::binary);
vector<XMFLOAT3> normals;
string input;
float x, y, z;
AssertBool(in.is_open(), L"File " + filename + L" not found");
while (!in.eof())
{
in >> input;
if (input == "#")
{
in.ignore(200, '\n');
continue;
}
if (input == "v")
{
in >> x >> y >> z;
g.Add(x, y, -z);
}
else if (input == "vn")
{
in >> x >> y >> z;
normals.emplace_back(x, y, -z);
}
else if (input == "f")
{
string blob;
getline(in, blob, '\n');
auto fvert = GetVerticesFromFace(blob);
if (!invert)
{
Utils::Reverse(fvert);
}
for (auto &vertex : fvert)
{
g.vertices[vertex.vertex].normal = normals[vertex.normal];
g.indices.push_back(vertex.vertex);
}
}
}
return g;
}
vector<ResourceManager::FaceVertex> ResourceManager::GetVerticesFromFace(string &line, int voff, int noff, int toff)
{
vector<FaceVertex> ret;
int ind1 = 0, ind2 = 0;
for (int i = 0; i < 3; i++)
{
ind2 = line.find(' ', ind1 + 1);
ret.push_back(GetVertexFromString(line.substr(ind1, ind2 - ind1), voff, noff, toff));
ind1 = ++ind2;
}
return ret;
}
ResourceManager::FaceVertex ResourceManager::GetVertexFromString(string &vertex, int voff, int noff, int toff)
{
FaceVertex ret;
string temp;
int ind1 = 0, ind2 = 0;
ind1 = vertex.find('/');
temp = vertex.substr(0, ind1);
ret.vertex = temp.length() > 0 ? stoi(temp) - voff : -1;
ind2 = vertex.find('/', ind1 + 1);
temp = vertex.substr(ind1 + 1, ind2 - ind1 - 1);
ret.tex = temp.length() > 0 ? stoi(temp) - toff : -1;
temp = vertex.substr(ind2 + 1);
ret.normal = temp.length() > 0 ? stoi(temp) - noff : -1;
return ret;
}
ComPtr<ID3D11ShaderResourceView> ResourceManager::GetTextureFromFile(wstring filename, ID3D11Device *device)
{
ComPtr<ID3D11ShaderResourceView> ret;
Assert(CreateDDSTextureFromFile(device, filename.c_str(), NULL, &ret));
return ret;
}
e::vector<e::wstring> ResourceManager::ListFiles(e::wstring dir)
{
using namespace e;
e::vector<e::wstring> ret;
WIN32_FIND_DATA ffd;
auto handle = FindFirstFile((dir + wstring(L"*")).c_str(), &ffd);
if (handle == INVALID_HANDLE_VALUE)
return ret;
do
{
wstring name = ffd.cFileName;
if (Utils::EndsWith(name, L".wav"))
ret.push_back(dir + ffd.cFileName);
}
while (FindNextFile(handle, &ffd));
FindClose(handle);
return ret;
}
|
b37841e72fb305f30156c03bd6ee7d11a62c16ac
|
48d79f14fc307022913217b4dd1ea3abbaa01c65
|
/background subtraction/yuening/ball.cpp
|
22f5be0da87989cb67b8df97f0f99ce98ed8043b
|
[] |
no_license
|
zmykevin/SPP2_Kevin
|
506d2e12f456f470b2383bc27cd106d5c3d250ed
|
6aa11db1d267a2a1f0c1b38c6604bc80fb757b83
|
refs/heads/master
| 2020-04-06T03:40:48.392814
| 2015-12-15T05:19:00
| 2015-12-15T05:19:00
| 38,252,741
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,212
|
cpp
|
ball.cpp
|
#include "ball.h"
Ball::Ball(int init_width, int init_height, int init_radius, double init_speed, double init_theta){
THRESH = 5;
RADIUS = init_radius;
speed = init_speed;
theta = init_theta;
l_theta = init_theta;
ll_theta = init_theta;
center.x = init_width;
center.y = init_height;
mode = 255;
dangle = 2*PI/(double)NUM_POINTS;
for (int i = 0; i < NUM_POINTS; i++){
Circle_x[i] = RADIUS*cos(dangle*i);
Circle_y[i] = RADIUS*sin(dangle*i);
}
}
Mat Ball::updateBall(Mat image_frame, Mat subtraction){
int height = image_frame.rows;
int width = image_frame.cols;
Mat n_image = image_frame.clone();
Mat n_subtraction;
medianBlur(subtraction, n_subtraction, 5);
medianBlur(subtraction, subtraction, 5);
// imshow("blurred subtraction", subtraction);
// waitKey(0);
double dx = cos(theta);
double dy = sin(theta);
int num_hit = 0;
double total_angle_idx = 0;
double next_x = center.x + speed*dx;
double next_y = center.y + speed*dy;
vector<int> idx_list;
int countNum = 0;
for (int i = 0; i<NUM_POINTS; i++){
if ((round(next_x + Circle_x[i])<0)||
(round(next_x + Circle_x[i])>=width)||
(round(next_y + Circle_y[i])<0)||
(round(next_y + Circle_y[i])>=height)){
total_angle_idx+=i;
idx_list.push_back(i);
// cout << i <<endl;
num_hit++;
}
else{
// Vec3b intensity = image.at<Vec3b>(next_y + Circle_y[i], next_x + Circle_x[i]);
// if (max(max(intensity[0],intensity[1]),intensity[2]) == 255){
Scalar intensity = n_subtraction.at<uchar>(next_y + Circle_y[i], next_x + Circle_x[i]);
if (intensity[0] == mode){
total_angle_idx+=i;
idx_list.push_back(i);
// cout << i <<endl;
num_hit++;
countNum++;
}
}
}
// Two cases: if hit, if not hit.
// If not hit
if (num_hit == 0){
center.x = next_x;
center.y = next_y;
circle(n_image, center, RADIUS, 0,-1);
circle(n_subtraction, center, RADIUS, 255,-1);
}
// If hit
else if (countNum == NUM_POINTS){
center.x = next_x;
center.y = next_y;
circle(n_image, center, RADIUS, 0,-1);
mode = 255 - mode;
cout<<"Yes"<<endl;
}
else{
double alpha = (double)total_angle_idx/(double)num_hit;
// alpha = (double)idx_list[num_hit/2];
double error = 0;
for (int i = 0; i<num_hit; i++){
error += abs(idx_list[i] - alpha);
}
if (error/num_hit>THRESH){
total_angle_idx = 0;
for (int i = 0; i<num_hit; i++){
if (idx_list[i] > NUM_POINTS*1/2){
total_angle_idx += idx_list[i] - NUM_POINTS;
}
else{
total_angle_idx += idx_list[i];
}
}
alpha = (double)total_angle_idx/(double)num_hit;
}
ll_theta = l_theta;
l_theta = theta;
theta = 2*alpha*dangle - theta - PI;
while (theta<0){
theta+=2*PI;
}
while (theta>=2*PI){
theta-=2*PI;
}
// cout<< ll_theta<<endl;
// cout<< l_theta<<endl;
// cout<< theta <<endl;
if (abs(ll_theta - theta)<0.0001){
//TODO: Make the range smaller than 360
theta +=((double)(rand()%360))/360*PI;
// cout<<"Yes"<<endl;
// cout<<theta<<endl;
}
// These four lines are dangerous
// dx = cos(theta);
// dy = sin(theta);
// next_x = center.x + speed*dx;
// next_y = center.y + speed*dy;
// int flag = 0;
// for (int i = 0; i<NUM_POINTS; i++){
// if ((round(next_x + Circle_x[i])<0)||
// (round(next_x + Circle_x[i])>=width)||
// (round(next_y + Circle_y[i])<0)||
// (round(next_y + Circle_y[i])>=height)){
// flag++;
// }
// }
// while (flag){
// theta +=((double)(rand()%360))/360*PI;
// cout<<"Yes"<<endl;
// dx = cos(theta);
// dy = sin(theta);
// next_x = center.x + speed*dx;
// next_y = center.y + speed*dy;
// flag = 0;
// for (int i = 0; i<NUM_POINTS; i++){
// if ((round(next_x + Circle_x[i])<0)||
// (round(next_x + Circle_x[i])>=width)||
// (round(next_y + Circle_y[i])<0)||
// (round(next_y + Circle_y[i])>=height)){
// flag++;
// }
// }
// }
circle(n_image, center, RADIUS, 255,-1);
circle(n_subtraction, center, RADIUS, 255,-1);
// cout<<"num_hit: "<<num_hit<<endl;
// cout<<"total_angle_idx "<<total_angle_idx<<endl;
// cout<<"alpha: "<<alpha<<endl;
// cout<<"theta is: "<<theta/PI*180<<endl;
}
return n_subtraction;
}
|
89759637d755ab0122a52c60c1566168bede2237
|
859785282e385c49c7a6ad11a233e7f5a9d0c9e7
|
/c++/Flatten-Binary-Tree-to-Linked-List.cpp
|
6b880fea87f4c3170573a22802c5734fb4d67b1d
|
[] |
no_license
|
tejeswinegi/DSA-Solved-Problems
|
eaacfd939ef08208f73854c2bae2b4e739d6c4c5
|
9c4947fecea1f8b66ee2405c2d537961465ea479
|
refs/heads/master
| 2023-08-30T19:49:06.935389
| 2021-10-06T02:07:47
| 2021-10-06T02:07:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 484
|
cpp
|
Flatten-Binary-Tree-to-Linked-List.cpp
|
class Solution {
public:
void flatten(TreeNode* root) {
if(root==NULL) return;
flatten(root->left);
flatten(root->right);
TreeNode* lNode = root->left;
TreeNode* rNode = root->right;
if(lNode==NULL) return;
root->right = lNode;
root->left = NULL;
while(lNode->right != NULL) lNode = lNode->right;
lNode->right = rNode;
return;
}
};
|
695df1435a98cd4cdea748702905697970ae54ea
|
1f9b5c9a950b6df166085edf262ad063746c6d8b
|
/CORE/PathFinding/SearchNode.cpp
|
57f3f4919355a69ac997593c488c7bc798e8f706
|
[
"MIT"
] |
permissive
|
Parseus/pixfight
|
fb5b936939752333f67a54454f91f8e4904b07c9
|
b1f134b5e969e2da9ae66653f9e29da77bb6f28f
|
refs/heads/master
| 2021-06-03T23:45:53.310829
| 2018-07-23T09:52:22
| 2018-07-23T09:52:22
| 172,204,446
| 1
| 0
|
MIT
| 2019-02-23T11:05:58
| 2019-02-23T11:05:57
| null |
UTF-8
|
C++
| false
| false
| 3,748
|
cpp
|
SearchNode.cpp
|
//
// SearchNode.cpp
// PixFight
//
// Created by Marcin Małysz on 05/01/2018.
// Copyright © 2018 Marcin Małysz. All rights reserved.
//
#include "SearchNode.hpp"
#include <math.h>
TTile** _mapwsk = nullptr;
int MAP_WIDTH = 0;
int MAP_HEIGHT = 0;
int GetMap( int x, int y ) {
if ( x < 0 || x >= (MAP_WIDTH-1) ||
y < 0 || y >= (MAP_HEIGHT-1) ) {
return 9;
}
return (_mapwsk[x][y].Lock || _mapwsk[x][y].tempLock) ? 9 : _mapwsk[x][y].Cost;
}
bool SearchNode::IsSameState( SearchNode &rhs ) {
// same state in a maze search is simply when (x,y) are the same
if ( (x == rhs.x) && (y == rhs.y)) {
return true;
}
else {
return false;
}
}
void SearchNode::PrintNodeInfo() {
std::cout<<"Node position : ( " << x << ", " << y << ")" << std::endl;
}
// Here's the heuristic function that estimates the distance from a Node
// to the Goal.
float SearchNode::GoalDistanceEstimate( SearchNode &nodeGoal ) {
float xd = fabs(float(((float)x - (float)nodeGoal.x)));
float yd = fabs(float(((float)y - (float)nodeGoal.y)));
return sqrtf(xd + yd);
}
bool SearchNode::IsGoal( SearchNode &nodeGoal ) {
if ((x == nodeGoal.x) && (y == nodeGoal.y)) {
return true;
}
return false;
}
// This generates the successors to the given Node. It uses a helper function called
// AddSuccessor to give the successors to the AStar class. The A* specific initialisation
// is done for each node internally, so here you just set the state information that
// is specific to the application
bool SearchNode::GetSuccessors( AStarSearch<SearchNode> *astarsearch, SearchNode *parent_node )
{
int parent_x = -1;
int parent_y = -1;
if( parent_node )
{
parent_x = parent_node->x;
parent_y = parent_node->y;
}
SearchNode NewNode;
// push each possible move except allowing the search to go backwards
if ((GetMap( x+1, y ) < 9) && !((parent_x == x+1) && (parent_y == y))) {
NewNode = SearchNode( x+1, y);
astarsearch->AddSuccessor( NewNode );
}
if ((GetMap( x-1, y) < 9) && !((parent_x == x-1) && (parent_y == y))) {
NewNode = SearchNode( x-1, y);
astarsearch->AddSuccessor( NewNode );
}
if (x % 2) {
//not even
if ((GetMap( x+1, y+1 ) < 9) && !((parent_x == x+1) && (parent_y == y+1))) {
NewNode = SearchNode( x+1, y+1);
astarsearch->AddSuccessor( NewNode );
}
if ((GetMap( x-1, y+1) < 9) && !((parent_x == x-1) && (parent_y == y+1))) {
NewNode = SearchNode( x-1, y+1);
astarsearch->AddSuccessor( NewNode );
}
}
else {
//even
if ((GetMap( x+1, y-1 ) < 9) && !((parent_x == x+1) && (parent_y == y-1))) {
NewNode = SearchNode( x+1, y-1);
astarsearch->AddSuccessor( NewNode );
}
if ((GetMap( x-1, y-1) < 9) && !((parent_x == x-1) && (parent_y == y-1))) {
NewNode = SearchNode( x-1, y-1);
astarsearch->AddSuccessor( NewNode );
}
}
if ((GetMap( x+2, y ) < 9) && !((parent_x == x+2) && (parent_y == y))) {
NewNode = SearchNode( x+2, y );
astarsearch->AddSuccessor( NewNode );
}
if ((GetMap( x-2, y ) < 9) && !((parent_x == x-2) && (parent_y == y))) {
NewNode = SearchNode( x-2, y );
astarsearch->AddSuccessor( NewNode );
}
return true;
}
// given this node, what does it cost to move to successor. In the case
// of our map the answer is the map terrain value at this node since that is
// conceptually where we're moving
float SearchNode::GetCost(SearchNode & successor) {
return (float)GetMap( x, y );
}
|
3474efcf4b1ab64e459f1f7aa943171d80e31557
|
1ce136fc96c31d77c90b536b576911bf6d663961
|
/source/utility.hpp
|
52af52cb596a42d626e4aee4815f50edae87c994
|
[] |
no_license
|
michaelhelvey/cpp-json-parser
|
9e52a263709709550b54236a17338e5cc2b01eca
|
0b978ae53bdca02f3b145cc88e1cf2bdc48c954f
|
refs/heads/master
| 2023-04-15T03:03:45.136457
| 2021-04-30T22:35:33
| 2021-04-30T22:35:33
| 362,969,871
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 683
|
hpp
|
utility.hpp
|
#include <cassert>
#include <optional>
#include <array>
#include <algorithm>
#define ASSERT_UNREACHABLE() assert(false && "Unreachable code reached.")
// H/T Jason Turner for teaching me this one
template<typename Key, typename Value, std::size_t Size>
struct ConstMap {
std::array<std::pair<Key, Value>, Size> data;
// intentionally linear search for GCC optimizations
[[nodiscard]] constexpr std::optional<Value>
maybe_at(const Key& key) const
{
const auto itr = std::find_if(begin(data), end(data),
[&key](const auto& v) { return v.first == key; });
if (itr != end(data)) {
return std::optional<Value>(itr->second);
} else {
return std::nullopt;
}
}
};
|
5ea6a90c318f819a07be44e17098339f31c83b99
|
d70bc150251f13ba0da021778016dfc437a74d95
|
/pluriNotes/AbstractNote.h
|
6f225dae89de4ce09fe25adf5e704cd6d9f36dff
|
[] |
no_license
|
ThomasCaud/pluriNotes
|
4d564246d39d6bc1719792a85b8c948a68e3506c
|
ec0383a2801c11f2238b4e750fd5b45033d7631d
|
refs/heads/master
| 2020-04-27T21:15:02.857396
| 2019-03-09T12:09:09
| 2019-03-09T12:09:09
| 174,689,482
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
C++
| false
| false
| 729
|
h
|
AbstractNote.h
|
#ifndef ABSTRACTNOTE_H
#define ABSTRACTNOTE_H
#include <string>
#include <Enumeration.h>
/**
* @brief The AbstractNote class est une classe abstraite permettant de gérer les attributs et méthodes communs aux différents types de notes
*/
class AbstractNote
{
public:
AbstractNote():title(""){}
AbstractNote(const std::string& t):title(t){}
const std::string getTitle()const{return title;}
void setTitle(const std::string& t){title=t;}
virtual void display()const=0;
virtual Enumeration::typeNote getTypeNote()const=0;
virtual QString getNameTypeNote()const=0;
virtual QString getAllQString()const=0;
virtual ~AbstractNote(){}
private:
std::string title;
};
#endif // ABSTRACTNOTE_H
|
55c94c55f0b1484188ede293ec3f518734b4e72d
|
402b909aa9fda3da15817b5dda6b45f811f064f0
|
/LeetCode/easy/507_Math.cpp
|
c3ff8ebf4c398ee2a48747935cca185ae9b00151
|
[] |
no_license
|
lihzzz/leetcode-C
|
897821102dfbafb164b2fa9f91fa2ca575774e8b
|
dd6f61eb6fc51d1d26b15898f043eb404f8c40e7
|
refs/heads/master
| 2021-01-19T16:59:13.646500
| 2018-09-20T14:57:56
| 2018-09-20T14:57:56
| 101,031,110
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,010
|
cpp
|
507_Math.cpp
|
//
// Created by lh on 2017/9/28.
//
#include <set>
#include <numeric>
using std::accumulate;
using std::set;
//class Solution {
//public:
// bool checkPerfectNumber(int num) {
// if(!num || num == 1)
// return false;
// set<int> m ;
// int sum = 0;
// for (int i = 1; i*i <num; ++i) {
// if(m.count(i))
// break;
// if(num % i != 0)
// continue;
// int a = num / i;
// if(a != num){
// m.insert(a);
// }
// m.insert(i);
// }
// for(auto a:m)
// sum += a;
// return num == sum;
// }
//};
class Solution {
public:
bool checkPerfectNumber(int num) {
if(!num)
return false;
int sum = 1;
for (int i = 2; i*i <num ; ++i) {
if(num % i == 0) sum += (i + num/i);
if(i*i == num) sum -= i;
if(sum > num)break;
}
return sum == num;
}
};
|
b9e3ce4bd793dbd3b11d6f5b5492491f589eba78
|
2aa75176e93bc5cee6e3c66a82acf3701af56678
|
/c++/basic/copy_swap/copy_swap.cpp
|
0bde83447bf2588d7f14cae57ab0d19d591a26f8
|
[] |
no_license
|
dedowsdi/journey
|
5d5c11a5e2c143f031ad2d801c731c2ca381c18a
|
0e9f1dd34a6bb7d5c9c8225ef1595a8cfd188593
|
refs/heads/master
| 2021-06-02T00:31:44.925551
| 2020-10-05T06:14:08
| 2020-10-05T06:14:08
| 116,079,146
| 12
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,270
|
cpp
|
copy_swap.cpp
|
#include <iostream>
struct Data
{
bool b;
int i;
float f;
};
class Resource
{
protected:
Data* mData;
public:
// custom swap.
// another way(suggest by effective c++) to do this is define swap as menber,
// then add a nonmenber swap in the same namespace, a specialization swap for
// this type in std namespace(in case someone use std::swap for this type), if
// this class is a template, use overload (in class namespace, not in std)
// instead of specialization.
friend void swap(Resource& r0, Resource& r1) noexcept // most of time, no throw
{
std::swap(r0.mData, r1.mData);
}
Resource()
{
mData = new Data();
}
~Resource()
{
if(mData)
delete mData;
}
// deep copy
Resource(const Resource& r)
{
mData = new Data(*r.mData);
}
// in order to discard original data, we use pass by value, the parameter
// object will help us to deal with original data, if you pass parameter by r
// value, no copy exists during parameter init.
Resource& operator=(Resource r)
{
using std::swap;
swap(*this, r);
return *this;
}
// move operator for c++11
Resource(Resource&& r)
{
using std::swap;
swap(*this, r);
}
};
int main(int argc, char *argv[])
{
return 0;
}
|
0fb964a984ca479e7394e871e07194d154562a08
|
f6f88ed8f2bf7a46bf0dcbbe8bc641b7e26583de
|
/TemaCurs21_OrdonareArray/Header.cpp
|
829158524812ab10f8c4411d0d1babc482c503d0
|
[] |
no_license
|
sorin83/TemaCurs21_OrdonareArray
|
83b10ff9fabc40fee0697c9706c4b8d9bd397a99
|
573eb2c88f4fbd5b67967e7a4f6082fe4dc10e4d
|
refs/heads/master
| 2023-07-25T17:03:49.026319
| 2021-09-05T20:42:03
| 2021-09-05T20:42:03
| 403,408,827
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 148
|
cpp
|
Header.cpp
|
#include "Header.h"
void elementeMari(int array[], int size)
{
for (int i = 0; i < size; i++)
{
std::cout << array[i] << std::endl;
}
}
|
a2ed2e39ea3885bcec40289b11f29774a05169b8
|
8c89782663a343f7c3d362573620f79d275a6142
|
/src/10000/10263.cpp17.cpp
|
7b861ada946bd852f9ee95efe1c611e6b10379d5
|
[
"MIT"
] |
permissive
|
upple/BOJ
|
14a8c8e372131b9a50ba7c1e7428ba7e57b4702d
|
e6dbf9fd17fa2b458c6a781d803123b14c18e6f1
|
refs/heads/master
| 2021-06-21T07:17:57.974279
| 2019-06-28T17:56:30
| 2019-06-28T17:56:30
| 128,779,781
| 13
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 426
|
cpp
|
10263.cpp17.cpp
|
#include <iostream>
#include <queue>
#include <algorithm>
using namespace std;
int main()
{
int n;
cin >> n;
priority_queue<int> pq;
for (int i = 0; i < n; i++)
{
int x;
cin >> x;
pq.push(x);
}
int cnt = 0, ans=999999999;
while (1)
{
int x = pq.top();
pq.pop();
if (pq.empty())
{
ans = min(ans, cnt + 1);
break;
}
ans = min({ ans, cnt + 1 + pq.top(), cnt + x });
cnt++;
}
cout << ans;
}
|
66d0215f82f92c177b4c09b56b9a21f31156e568
|
1593b8975b5ac78c9e00d199aa0bf3c2de40f155
|
/gazebo/physics/bullet/BulletJoint.hh
|
b1a25406d40fde461f64b3cd224b37bbad9825af
|
[
"Apache-2.0"
] |
permissive
|
kesaribath47/gazebo-deb
|
3e0da13ec54f33cc8036623bb8bba2d4a4f46150
|
456da84cfb7b0bdac53241f6c4e86ffe1becfa7d
|
refs/heads/master
| 2021-01-22T23:15:52.075857
| 2013-07-12T18:22:26
| 2013-07-12T18:22:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,383
|
hh
|
BulletJoint.hh
|
/*
* Copyright 2012 Open Source Robotics Foundation
*
* 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.
*
*/
/* Desc: The base Bullet joint class
* Author: Nate Koenig, Andrew Howard
* Date: 21 May 2003
*/
#ifndef _BULLETJOINT_HH_
#define _BULLETJOINT_HH_
#include <boost/any.hpp>
#include <string>
#include "physics/bullet/BulletPhysics.hh"
#include "physics/Joint.hh"
namespace gazebo
{
namespace physics
{
/// \ingroup gazebo_physics
/// \addtogroup gazebo_physics_bullet Bullet Physics
/// \{
/// \brief Base class for all joints
class BulletJoint : public Joint
{
/// \brief Constructor
public: BulletJoint(BasePtr _parent);
/// \brief Destructor
public: virtual ~BulletJoint();
/// \brief Load a BulletJoint
public: virtual void Load(sdf::ElementPtr _sdf);
/// \brief Reset the joint
public: virtual void Reset();
/// \brief Get the body to which the joint is attached
/// according the _index
public: LinkPtr GetJointLink(int _index) const;
/// \brief Determines of the two bodies are connected by a joint
public: bool AreConnected(LinkPtr _one, LinkPtr _two) const;
/// \brief Detach this joint from all bodies
public: virtual void Detach();
/// \brief Set the anchor point
public: virtual void SetAnchor(int /*index*/,
const gazebo::math::Vector3 & /*anchor*/)
{
gzerr << "Not implement in Bullet\n";
}
/// \brief Set the joint damping
public: virtual void SetDamping(int /*index*/,
const double /*damping*/)
{
gzerr << "Not implement in Bullet\n";
}
/// \brief Get the anchor point
public: virtual math::Vector3 GetAnchor(int /*_index*/) const
{
gzerr << "Not implement in Bullet\n";
return math::Vector3();
}
/// \brief Get the force the joint applies to the first body
/// \param index The index of the body(0 or 1)
public: virtual math::Vector3 GetLinkForce(unsigned int /*_index*/) const
{
gzerr << "Not implement in Bullet\n";
return math::Vector3();
}
/// \brief Get the torque the joint applies to the first body
/// \param index The index of the body(0 or 1)
public: virtual math::Vector3 GetLinkTorque(unsigned int /*_index*/) const
{
gzerr << "Not implement in Bullet\n";
return math::Vector3();
}
/// \brief Set a parameter for the joint
public: virtual void SetAttribute(Attribute, int /*_index*/,
double /*_value*/)
{
gzerr << "Not implement in Bullet\n";
}
// Documentation inherited.
public: virtual void SetAttribute(const std::string &/*_key*/,
int /*_index*/,
const boost::any &/*_value*/)
{
gzerr << "Not implement in Bullet\n";
}
// Documentation inherited.
public: virtual double GetAttribute(const std::string &/*_key*/,
unsigned int /*_index*/)
{
gzerr << "Not implement in Bullet\n";
return 0;
}
protected: btTypedConstraint *constraint;
protected: btDynamicsWorld *bulletWorld;
// Documentation inherited.
public: virtual JointWrench GetForceTorque(int _index);
// Documentation inherited.
public: virtual JointWrench GetForceTorque(unsigned int _index);
};
/// \}
}
}
#endif
|
c8d21c57b6a37daf3e14cabd27bc99c7070724af
|
1dba6c4c1f27c06a97880a64403a02657e9da74e
|
/msvcore/crossplatform/io.cpp
|
42dd4cf1595ca008a7694f6872dd5a3d7e896983
|
[] |
no_license
|
darkprof83/opensource
|
a41bf23d711b4bc67b8192040e843634cd98e80e
|
7d8266d02e66993c4b96e691d43c8b9d63d7e822
|
refs/heads/master
| 2020-03-07T23:28:12.193967
| 2016-11-21T11:28:09
| 2016-11-21T11:28:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 18,884
|
cpp
|
io.cpp
|
#ifdef WIN32
#ifndef WINCE
HANDLE _std_input_handle = GetStdHandle(STD_INPUT_HANDLE);
HANDLE _std_output_handle = GetStdHandle(STD_OUTPUT_HANDLE);
void MsvAllocConsole(){
AllocConsole();
_std_input_handle = GetStdHandle(STD_INPUT_HANDLE);
_std_output_handle = GetStdHandle(STD_OUTPUT_HANDLE);
}
#endif
#endif
///////////////////////////////////////////////////////////////////////////////////// Print
#ifdef USEMSV_TCPPRINT
int ConnectPort(VString lip, int port);
MString msvuse_tcpprint; SOCKET msvuse_tcpprint_sock=0;
#endif
#ifdef USEMSV_FILEPRINT
MString msvuse_fileprint="msvuse_fileprint.log"; HFILE msvuse_fileprint_sock=0;
#endif
#ifdef USEMSV_LOGPRINT
SendDataL msvuse_logprint;
int msvuse_logprint_getsz(){ return msvuse_logprint.size(); }
int msvuse_logprint_get(unsigned char * data, unsigned int sz){ int rd=msvuse_logprint.Get(data, sz); msvuse_logprint.Del(rd); return rd; }
#endif
inline int print(const VString &line){ if(!line) return 0;
#ifdef USEMSV_TCPPRINT
if(msvuse_tcpprint && msvuse_tcpprint_sock==0){
msvuse_tcpprint_sock=ConnectPort(msvuse_tcpprint, 0);
if(!msvuse_tcpprint_sock) msvuse_tcpprint_sock=-1;
}
if(msvuse_tcpprint_sock>0) send(msvuse_tcpprint_sock, line, line, 0);
#endif
#ifdef USEMSV_FILEPRINT
if(msvuse_fileprint && msvuse_fileprint_sock==0){
msvuse_fileprint_sock=CreateFile(msvuse_fileprint, O_CREAT|O_RDWR, S_IREAD|S_IWRITE);
if(ishandle(msvuse_fileprint_sock)) SetEndOfFile(msvuse_fileprint_sock);
if(!msvuse_fileprint_sock) msvuse_fileprint_sock=-1;
}
if(msvuse_fileprint_sock>0) WriteFile(msvuse_fileprint_sock, line, line);
#endif
#ifdef USEMSV_LOGPRINT
msvuse_logprint.Set(line); if(msvuse_logprint.size()>S1M) msvuse_logprint.Del(msvuse_logprint.size()%S1M);
#endif
#ifdef USEMSV_ANDROID_LOGPRINT
__android_log_print(ANDROID_LOG_INFO, USEMSV_ANDROID_LOGPRINT, MString(line));
#endif
#ifdef WIN32
DWORD wr;
return WriteFile(_std_output_handle, line, line, &wr, 0); //printf(line);
#else
return write(1, line, line);
#endif
}
// multiprint
inline int print(const VString &l1, const VString &l2){
int r=print(l1); r=print(l2) && r; return r;
}
inline int print(const VString &l1, const VString &l2, const VString &l3){
int r=print(l1); r=print(l2) && r; r=print(l3) && r; return r;
}
inline int print(const VString &l1, const VString &l2, const VString &l3, const VString &l4){
int r=print(l1); r=print(l2) && r; r=print(l3) && r; r=print(l4) && r; return r;
}
inline int print(const VString &l1, const VString &l2, const VString &l3, const VString &l4, const VString &l5
, const VString &l6=VString(), const VString &l7=VString(), const VString &l8=VString(), const VString &l9=VString(), const VString &l10=VString()){
int r=print(l1); r=print(l2) && r; r=print(l3) && r; r=print(l4) && r; r=print(l5) && r;
r=print(l6) && r; r=print(l7) && r; r=print(l8) && r; r=print(l9) && r; r=print(l10) && r; return r;
}
// Global Error
int globalerror(){
int error=0;
print("\r\nGLOBALERROR\r\n");
return 0;
}
int globalerror(const char*line){
int error=0;
print("\r\nGLOBALERROR: "); print(line); print("\r\n");
return 0;
}
///////////////////////////////////////////////////////////////////////////////////// Logs
// define TIME is 32768 = (S32K)
#define LOGS_TIME_DEF S32K
// Usage: Open(file); SetOutput(YOUDEF_1|YOUDEF_2|YOUDEF_3|LOGS_TIME_DEF, YOUDEF_3); LogTime(TYPE_ID) or LogMod(TYPE_ID); Log(TEXT);
// if(SetOutput() types == LogMod(TYPE_ID)) Log(TEXT) -> WriteToFile();
class Logs{
protected:
// data
HFILE fl; // open file
// options
int outf, outp; // output: file, print()
MString tmf, tmp; // time: file, print()
// realtime
int logtype; bool logtime;
public:
Logs(){ fl=0; outf=0; outp=0; logtype=0; logtime=0; }
~Logs(){ Init(); }
void Init(){
if(ishandle(fl)) CloseHandle(fl); fl=0;
outf=0; outp=0; logtype=0; logtime=0;
tmf="d.m.Y H:i:s";
}
int Open(VString file){
if(ishandle(fl)) CloseHandle(fl);
fl=CreateFile(file, O_CREAT|O_RDWR|O_APPEND, S_IREAD|S_IWRITE);
if(!ishandle(fl)){ fl=0; return 0; }
return 1;
}
int Close(){ if(ishandle(fl)) CloseHandle(fl); fl=0; return 1; }
void SetOutput(int f, int p=0){ outf=f; outp=p; }
void SetTime(VString f, VString p=VString()){ tmf=f; tmp=p; } // NOT ACTIVE
void LogType(int type){ logtype=type; }
void LogTime(int type=0){
//void LogMod(int type=0){ CONFIG_LOG_T=type; }
//void LogTime(int type=0){
//time_t rawtime; time(&rawtime);
//VString t=ctime(&rawtime);
MTime mt;
MString t=mt.date(tmf);
if(type) logtype=type;
logtime=1;
Log(t, ": ");
logtime=0;
return ;
}
int Log(VString line){
if(ishandle(fl)){
if((outf&logtype) && logtime <= (outf&LOGS_TIME_DEF)!=0) WriteFile(fl, line, line);
}
if(outp&logtype && logtime <= (outp&LOGS_TIME_DEF)!=0) print(line);
return 1;
}
int Log(const VString &l1, const VString &l2, const VString &l3=VString(), const VString &l4=VString(), const VString &l5=VString()
, const VString &l6=VString(), const VString &l7=VString(), const VString &l8=VString(), const VString &l9=VString(), const VString &l10=VString()){
int r=Log(l1); r=Log(l2) && r; r=Log(l3) && r; r=Log(l4) && r; r=Log(l5) && r;
r=Log(l6) && r; r=Log(l7) && r; r=Log(l8) && r; r=Log(l9) && r; r=Log(l10) && r; return r;
}
};
///////////////////////////////////////////////////////////////////////////////////// File IO
TString LoadFile(VString file){ if(!file) return TString();
TString ret; // *file.end()==0 ? file : MString(file)
HFILE fl; fl=CreateFile(file, O_RDONLY, S_IREAD| S_IWRITE);
if(fl==-1) return TString();
ret.Reserv(GetFileSize(fl));
unsigned int rd=ReadFile(fl, ret, ret);
CloseHandle(fl);
if(rd!=ret.size()) return TString(); //ret.str(0, rd);
else return ret;
}
bool IsFile(VString file){
HFILE fl; fl=CreateFile(file, O_RDONLY, S_IREAD| S_IWRITE);
if(!ishandle(fl)) return 0;
CloseHandle(fl); return 1;
}
unsigned int SaveFile(VString file, VString data){
if(!file)
return 0;
HFILE fl; fl=CreateFile(file, O_RDWR|O_CREAT, S_IREAD| S_IWRITE); // | S_IRGRP | S_IROTH
if(fl==-1) return 0;
unsigned int wr=WriteFile(fl, data, data); SetEndOfFile(fl);
CloseHandle(fl);
return wr;
}
unsigned int SaveFileAppend(VString file, VString data){
HFILE fl; fl=CreateFile(file, O_RDWR|O_CREAT, S_IREAD| S_IWRITE); // | S_IRGRP | S_IROTH
if(fl==-1) return 0;
SetFilePointer(fl, 0, FILE_END);
unsigned int wr=WriteFile(fl, data, data);// SetEndOfFile(fl);
CloseHandle(fl);
return wr;
}
class AHFILE{
HFILE hfile;
public:
AHFILE(HFILE h){
hfile=h;
}
operator HFILE(){
return hfile;
}
~AHFILE(){
if(ishandle(hfile))
CloseHandle(hfile);
}
};
bool MakeDir(VString path, VString fold){
#ifdef __GNUC__
#define MAKEDIRSLASH "/"
#else
#define MAKEDIRSLASH "\\"
#endif
MString rfold=Replace(fold, "\\", "/"); fold=rfold;
VString o, t=fold, lo; MString tmp;
while(t){
o=PartLine(t, t, "/");
o.sz=o.endu()-fold.data; o.data=fold;// if(lo==o) break;
tmp.Add(path, path ? "/" : "", o);
MkDir(tmp);
lo=o;
}
return 1;
/*ExplodeLine el; explodem(el, fold, "/");
for(unsigned int i=0; i<el.size(); i++){
path+=MString(el.el(i))+MAKEDIRSLASH;
MkDir(path);
}*/
return 1;
}
class VSi{ public:
VString key;
sstat64 stt;
bool isdir(){ return (stt.st_mode&S_IFMT)==S_IFDIR; }
bool islink(){ return (stt.st_mode&S_IFMT)==S_IFLNK; }
int64 size(){ return stt.st_size; }
};
#include "../list/IMatrix.cpp"
#include "sort.cpp"
#include "ef.cpp"
#define READDIRSZ 64
class Readdir{
HLString ls;
VSiLine line;
public:
int Clear(){ ls.Clear(); return 1;}
int Add(VString file, sstat64 &stt){
if(line.size==line.asize()) line.Add(READDIRSZ);
//VString fn=file;
line.n().key.set(&ls.el(ls.addnf(file, file)), file); line.n().stt=stt; line.size++;
return line.size;
}
int ReadDir(MString dir){
ls.Clear(); line.Clear(); sstat64 stt; /*lsstat64 st;*/ VString path, fn; int fs=0; unsigned int pos;
char bf[S2K]; if(dir.size()>S2K-3) return 0; //memcpy(bf, dir, dir);
MSVEF ef; ef.fcmp=1; // ILink il; il.Ilink(dir); if(!il.file){ dir+"*"; il.file="*";}
//if(_TSYS==TSYS_WIN){ wcslash(dir); dir+="*.*"; }
// normal path for find
path.set(bf, normalpath(bf, S2K, dir, dir.size()));
while(path.sz>0){ if(*(path.end()-1)=='/' || *(path.end()-1)=='\\') break; path.sz--; fs++; }
ef.Read(VString(path.pos(path.sz), fs));
if(_TSYS==TSYS_WIN){ path.data[path.sz++]='*'; path.data[path.sz++]='.'; path.data[path.sz++]='*'; } path.data[path.sz]=0;
#ifdef WIN32 //int ReadDir(MString dir, ISLine &list){
HANDLE find_handle; WIN32_FIND_DATA ff; char* d=(char*)&bf;
find_handle=FindFirstFile(MODUNICODE(path),&ff);
if(find_handle==INVALID_HANDLE_VALUE) return 0;
#else
DIR *d=opendir(path ? MString(path) : "./"); if(!d) return 0;
#endif
while(path.sz>0){ if(*(path.end()-1)=='/' || *(path.end()-1)=='\\') break; path.sz--; }
while(d){
#ifdef WIN32
if(fn.data) if(!FindNextFile(find_handle, &ff)) break;
#ifdef UNICODE // #unicode
MString fnuni=MODLPWSTR_R(ff.cFileName); fn=fnuni;
#else
fn=MODLPWSTR(ff.cFileName);
#endif // #e unicode
#else
struct dirent *dr=readdir(d); if(!dr) break; fn=dr->d_name;
#endif
if(fn!="."){
if(path.sz+fn.sz+1>=S1K) break;
if(fs){ pos=0; if(!ef.rts(fn, pos)) continue; }
memcpy(path.end(), fn, fn); *(path.end()+fn.sz)=0;
if(lstat64(path, &stt)) break;
//else{ stat64tomstat(stt, st); }
if(line.size==line.asize()) line.Add(READDIRSZ);
line.n().key.set(&ls.el(ls.addnf(fn, fn)), fn); line.n().stt=stt;
//line.n().is=(ff.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)>0;
//line.n().size=ff.nFileSizeLow;
line.size++;
} //list.insert(ff.cFileName, ();
}
#ifdef WIN32
FindClose(find_handle);
#else
closedir(d);
#endif
return 1;}
/*
#else
//int ReadDir(MString dir, ISLine &list){
DIR *d=opendir(dir);
while(1){
struct dirent *dr=readdir(d);
if (stat(dr->d_name, &stt)) continue;
if(line.size==line.asize()) line.Add(READDIRSZ);
VString fn=dr->d_name;
line.n().key.set(&ls.el(ls.addnf(fn, fn), fn); line.n().stt=stt;
//line.n().is=stt.st_mode&S_IFDIR;
line.size++;
// int sz=strlen(&dr->d_name);
// if(sz>=0 && sz<=255) list.insert(&dr->d_name, stt.st_mode&S_IFDIR);
}
closedir(d);
#endif*/
#define RD_NOP S1M
#define RDS_NAME 1
#define RRDS_UNAME 2
int Resort(int type=RD_NOP|RDS_NAME){
//HLString tls; VSiLine tline; tline.Add(line.size); memcpy(tline.data, line.data, line.size*sizeof(VSi));
if(type&RD_NOP){
for(unsigned int i=0; i<line.size; i++){
if(line.data[i].key=="."){ memcpy(&line.data[i], &line.data[i+1], (line.size-i)*sizeof(VSi)); line.size--; } }
}
myfastsort_VSiLine(line);
for(unsigned int i=0; i<line.size; i++){
if(line.data[i].key==".."){
VSi vs=line.data[i];
memcpy(&line.data[1], &line.data[0], (i)*sizeof(VSi)); // line.size--;
line.data[0]=vs;
}
}
return 1;
}
void operator=(Readdir &rd){
for(unsigned int i=0; i<rd.size(); i++){
Add(rd[i].key, rd[i].stt);
}
return ;
}
VSi& operator[](int p){ return line[p]; }
operator unsigned int(){ return line.size; }
unsigned int size(){ return line.size; }
};
// ReadStorage
int ReadStorage(ISLine& isli, MString path, MString as, int type=0){
ISLine isl;
if(as) wcslash(as); wcslash(path);// MSCR cach;
//ReadDir(path, "*.*", isl); DISLine*dsl=isl._a, *dl;
Readdir rd; rd.ReadDir(path+"/*.*");
// if(dsl) dsl=dsl->_n; if(!as) dsl=isl._a;
//while(dsl){
for(int i=0; i<rd.size(); i++){
//if(dsl->s=='.' || dsl->s==".." ) {dl=dsl; dsl=dsl->_n; isl.del(dl); continue; }
if(rd[i].key=='.' || rd[i].key==".." ){ /*dl=dsl; dsl=dsl->_n; isl.del(dl);*/ continue; }
if(rd[i].isdir()){
if(type&1) isli.insert(as+rd[i].key, 1);
ReadStorage(isli, path+rd[i].key, as+rd[i].key, type); /*dl=dsl; dsl=dsl->_n; isl.del(dl);*/ continue;
}
isli.insert(as+rd[i].key, 0);
// dsl=dsl->_n;
}
return 1;
}
// Renew File
class RenewFile{
unsigned int ltime;
unsigned int sz, tm;
VString file;
public:
unsigned int reload;
RenewFile(){ sz=0; tm=0; ltime=0; reload=30; }
RenewFile(VString fl){ sz=0; tm=0; ltime=0; reload=30; file=fl;}
void SetFile(VString f){ file=f; }
bool IsNew(){ return IsNewTime() && IsNewFile(); }
bool IsNewTime(){
if(ltime+reload>=time()) return 0;
ltime=time(); return 1;
}
bool IsNewFile(const VString&file){
sstat64 stt=GetFileInfo(file);
if(!stt.st_size || stt.st_size==sz && stt.st_mtime==tm) return 0;
sz=stt.st_size; tm=stt.st_mtime; return 1;
}
bool IsNewFile(){
sstat64 stt=GetFileInfo(file);
if(!stt.st_size || stt.st_size==sz && stt.st_mtime==tm) return 0;
sz=stt.st_size; tm=stt.st_mtime; return 1;
}
};
// GetWindowsDirectory
MString GetWindowsDirectory(){
MString ret;
#ifdef WIN32
#ifdef UNICODE
ret.Reserv(S2K);
int s=::GetWindowsDirectory((LPWSTR)ret.rchar(), ret.size()/2);
return stoc((unsigned short*)ret.rchar(), s);
#else
ret.Reserv(1024); ret=ret.str(0, GetWindowsDirectory(ret, ret.size()));
#endif
#endif
return ret;
}
MString windows_directory=GetWindowsDirectory();
// MTGet
TULine mimetypes;
#define MIMETYPE_HTML "text/html"
#define MIMETYPE_CTHTML "Content-Type: text/html"
VString defmimeypes="application/mac-binhex40 hqx\r\n\
application/mac-compactpro cpt\r\n\
application/msword doc\r\n\
application/octet-stream bin dms lha lzh exe class so dll\r\n\
application/oda oda\r\n\
application/pdf pdf\r\n\
application/postscript ai eps ps\r\n\
application/smil smi smil\r\n\
application/vnd.mif mif\r\n\
application/vnd.ms-excel xls\r\n\
application/vnd.ms-powerpoint ppt\r\n\
application/vnd.wap.wbxml wbxml\r\n\
application/vnd.wap.wmlc wmlc\r\n\
application/vnd.wap.wmlscriptc wmlsc\r\n\
application/x-bcpio bcpio\r\n\
application/x-cdlink vcd\r\n\
application/x-cpio cpio\r\n\
application/x-csh csh\r\n\
application/x-director dcr dir dxr\r\n\
application/x-dvi dvi\r\n\
application/x-futuresplash spl\r\n\
application/x-gtar gtar\r\n\
application/x-hdf hdf\r\n\
application/x-javascript js\r\n\
application/x-koan skp skd skt skm\r\n\
application/x-latex latex\r\n\
application/x-netcdf nc cdf\r\n\
application/x-sh sh\r\n\
application/x-shar shar\r\n\
application/x-shockwave-flash swf\r\n\
application/x-stuffit sit\r\n\
application/x-tar tar\r\n\
application/x-tcl tcl\r\n\
application/x-tex tex\r\n\
application/x-texinfo texinfo texi\r\n\
application/x-ustar ustar\r\n\
application/x-wais-source src\r\n\
application/xhtml+xml xhtml xht\r\n\
application/zip zip\r\n\
audio/basic au snd\r\n\
audio/midi mid midi kar\r\n\
audio/mpeg mpga mp2 mp3\r\n\
audio/x-aiff aif aiff aifc\r\n\
audio/x-mpegurl m3u\r\n\
audio/x-pn-realaudio ram rm\r\n\
audio/x-pn-realaudio-plugin rpm\r\n\
audio/x-realaudio ra\r\n\
audio/x-wav wav\r\n\
chemical/x-pdb pdb\r\n\
chemical/x-xyz xyz\r\n\
image/bmp bmp\r\n\
image/gif gif\r\n\
image/ief ief\r\n\
image/jpeg jpeg jpg jpe\r\n\
image/png png\r\n\
image/tiff tiff tif\r\n\
image/vnd.djvu djvu djv\r\n\
image/vnd.wap.wbmp wbmp\r\n\
image/x-cmu-raster ras\r\n\
image/x-rgb rgb\r\n\
image/x-xbitmap xbm\r\n\
image/x-xpixmap xpm\r\n\
image/x-xwindowdump xwd\r\n\
model/iges igs iges\r\n\
model/mesh msh mesh silo\r\n\
model/vrml wrl vrml\r\n\
text/css css\r\n\
text/html html htm\r\n\
text/plain asc txt\r\n\
text/richtext rtx\r\n\
text/rtf rtf\r\n\
text/sgml sgml sgm\r\n\
text/vnd.wap.wml wml\r\n\
text/vnd.wap.wmlscript wmls\r\n\
text/x-setext etx\r\n\
text/xml xml xsl\r\n\
video/mpeg mpeg mpg mpe\r\n\
video/quicktime qt mov\r\n\
video/vnd.mpegurl mxu\r\n\
video/x-msvideo avi\r\n\
video/x-sgi-movie movie\r\n\
";
struct TVS{
VString k, v;
};
TVS defmimeypes_data[S1K]; int defmimeypes_sz=0;
unsigned int MTLoad(const MString& file){
VString line=defmimeypes, o, t, t2;
int cnt=0;
// do 1
while(line){
o=PartLine(line, line, "\r\n");
o=PartLine(t, t, "\t");
while(t){ t=PartLine(t, t, "\t"); cnt++; }
}
if(sizeof(defmimeypes_data)/sizeof(TVS)<cnt){ globalerror("msvio.h: MTLoad() count is > buffer"); return 0; }
// do 2
line=defmimeypes;
while(line){
o=PartLine(line, line, "\r\n");
o=PartLine(t, t, "\t");
while(t){ t2=PartLine(t, t, "\t"); defmimeypes_data[cnt].k=o; defmimeypes_data[cnt].v=t2; cnt++; }
}
defmimeypes_sz=cnt;
return cnt;
}
VString MTGet(const VString &line){
for(int i=0; i<defmimeypes_sz; i++){
if(line==defmimeypes_data[i].v) return defmimeypes_data[i].k;
}
return "text/html";
}
//MString MTGet(const MString& s){ MString ret=mimetypes.Find(s); if(ret) return ret; return "text/html"; }
// NormalPath
VString NormalPath(VString path){
unsigned char*line=(unsigned char*)path.uchar(), *ln=line, *to=line+path.size(), *ret=ln; unsigned int r;
int c=0;//, m=0;
while(line<to){
switch(*line){
case '/': case '\\': // 1
if(line>ln){ memcpy(ret, ln, line-ln); ret+=line-ln; ln=line; }
if(ret>path.uchar() && ( *(ret-1)=='\\' || *(ret-1)=='/')){ ln=line+1; }
else{ *ret++=*line; ln=line+1; c|=1; }
//if(c&1) {ln=line; m=1;}
//else {
//if(line+1<to && line>ln && *line=='/' && *(line+1)=='/' && *(line-1)==':') {line++;}
//else {
//if(m && line+1>ln) memcpy(ret, ln, line-ln); ret+=line-ln; ln=line; c|=1;}
//}
break;
case '.': // 2
if(ret==path.uchar() || ( *(ret-1)=='\\' || *(ret-1)=='/')){ r=0; c=0;
if(line>ln){ memcpy(ret, ln, line-ln); ret+=line-ln; ln=line; }
while(line < to && *line=='.'){ *line++; r++; }
if(*line=='\\' || *line=='/' || line>=to){
if(r==1) ln=line+1;
else{
if(ret-1>path.uchar()) ret--; //while(ret>path.uchar() && (*(ret-1)!='\\' || *ret!='/')) ret--; ret--;
while(ret>path.uchar() && *(ret-1)!='\\' && *(ret-1)!='/') ret--;
ln=line+1;
}
}
}
//if(c>=3) {ln=line; m=1;}
//else if(c)
//else if(c==2) {c=3;}
//{if(m && line>ln) memcpy(ret, ln, line-ln); ret+=line-ln; ln=line; c|=2;}
break;
case '?': if(line>ln) memcpy(ret, ln, line-ln); ret+=line-ln; ln=line;
while(ret && *(ret-1)==32 && ret>path.uchar()) ret--;
if(line>ln+1) {memcpy(ret, ln, line-ln); ret+=line-ln;} line=to-1;
break;
case '%':
if(line>ln) memcpy(ret, ln, line-ln); ret+=line-ln;
line++; if(*line>='0' && *line<='9') *ret=(*line-'0')*16; else if(*line>='A' && *line<='F') *ret=(*line-'A'+10)*16; else *ln=0;
line++; if(*line>='0' && *line<='9') *ret+=(*line-'0'); else if(*line>='A' && *line<='F') *ret+=(*line-'A'+10);
if(*ret=='.') { if(c>=3) ret--; c|=2;} else if(*ret=='\\' || *ret=='/') { if(c&1) ret--; c|=1;} else c=0;
// is utf
if(*ret>127 && ret>path.uchar()) if(((*(ret)&192)==128) && (*(ret-1)&224)==192)
{r=((*(ret-1)&31)<<6)+(*(ret)&63); *(ret-1)=stoc(r); ret--;}
if(*ret<32) *ret=' '; ln=line+1; ret++;// m=1;
break;
default : if(*line<32) *line=' '; c=0; break;
} line++; }
if(line>ln) memcpy(ret, ln, line-ln); ret+=line-ln;
while(ret && *(ret-1)==32 && ret>path.uchar()) ret--;
if(path.size()==ret-path.uchar()) return path; //if(!m) return path;
return path.str(0, ret-path.uchar());
}
|
5229e0ff77c2f3226eca3c7d06d780c908cb494e
|
a32c0a62e18681eb41c9bd048db92b3f190985d3
|
/src/Editor/GUI/EditableCellTable.hpp
|
01ab251d2e401d1edbc535f14601219217754844
|
[] |
no_license
|
benreid24/Ignus-Cor
|
5cf90222848a58546f73ca597872d29bc2d9d06d
|
67e94ea3f0352315a02fab55e5b5adbe93d93da2
|
refs/heads/master
| 2021-01-22T06:19:39.209515
| 2020-01-02T02:34:26
| 2020-01-02T02:34:26
| 92,540,078
| 0
| 0
| null | 2020-01-02T02:34:28
| 2017-05-26T18:57:01
|
C++
|
UTF-8
|
C++
| false
| false
| 1,773
|
hpp
|
EditableCellTable.hpp
|
#ifndef EDITABLECELLTABLE_HPP
#define EDITABLECELLTABLE_HPP
#include <SFGUI/Widgets.hpp>
#include <vector>
#include <string>
/**
* Built on top of CellTable. Allows editing
*
* \ingroup Editor
*/
class EditableCellTable {
public:
/**
* Initializes GUI elements
*/
EditableCellTable(sfg::Desktop& dk, sfg::Widget::Ptr parent,
const std::vector<std::string>& colNames, const std::string& typeName = "Row", int width = 0);
/**
* Clears all rows
*/
void clear();
/**
* Appends a row with the given column values, or empty
*/
void appendRow(const std::vector<std::string>& values);
/**
* Returns all row values
*/
std::vector<std::vector<std::string> > getAllValues();
/**
* Show or hide the table
*/
void show(bool show);
/**
* Updates the table
*/
void update();
/**
* Adds the container to the given parent
*/
void addToParent(sfg::Box::Ptr parent);
private:
sfg::Desktop& desktop;
std::vector<sfg::Label::Ptr> headerRow;
sfg::Widget::Ptr parent;
sfg::Box::Ptr container;
sfg::ScrolledWindow::Ptr box;
sfg::Table::Ptr table;
sfg::Button::Ptr appendBut;
bool appendPressed;
int delUuid;
struct Row {
int uuid;
std::vector<sfg::Entry::Ptr> entries;
sfg::Button::Ptr delBut;
typedef std::shared_ptr<Row> Ptr;
static Ptr create() { return Ptr(new Row()); }
private:
Row() = default;
Row(const Row&) = delete;
Row& operator=(const Row&) = delete;
};
std::vector<Row::Ptr> rows;
std::string typeName;
int nextUuid;
/**
* Refreshes all GUI elements
*/
void refreshGui();
};
#endif // EDITABLECELLTABLE_HPP
|
0d9e5071dba8df87d3f2cb63be32bcb962dc2c0b
|
afb7006e47e70c1deb2ddb205f06eaf67de3df72
|
/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h
|
808a566723a1f2c7912f9c4fd9be3a7951c336ad
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
marco-c/gecko-dev-wordified
|
a66383f85db33911b6312dd094c36f88c55d2e2c
|
3509ec45ecc9e536d04a3f6a43a82ec09c08dff6
|
refs/heads/master
| 2023-08-10T16:37:56.660204
| 2023-08-01T00:39:54
| 2023-08-01T00:39:54
| 211,297,590
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,665
|
h
|
link_uniform_block_active_visitor.h
|
/
*
*
Copyright
2013
Intel
Corporation
*
*
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
(
including
the
next
*
paragraph
)
shall
be
included
in
all
copies
or
substantial
portions
of
the
*
Software
.
*
*
THE
SOFTWARE
IS
PROVIDED
"
AS
IS
"
WITHOUT
WARRANTY
OF
ANY
KIND
EXPRESS
OR
*
IMPLIED
INCLUDING
BUT
NOT
LIMITED
TO
THE
WARRANTIES
OF
MERCHANTABILITY
*
FITNESS
FOR
A
PARTICULAR
PURPOSE
AND
NONINFRINGEMENT
.
IN
NO
EVENT
SHALL
*
THE
AUTHORS
OR
COPYRIGHT
HOLDERS
BE
LIABLE
FOR
ANY
CLAIM
DAMAGES
OR
OTHER
*
LIABILITY
WHETHER
IN
AN
ACTION
OF
CONTRACT
TORT
OR
OTHERWISE
ARISING
*
FROM
OUT
OF
OR
IN
CONNECTION
WITH
THE
SOFTWARE
OR
THE
USE
OR
OTHER
*
DEALINGS
IN
THE
SOFTWARE
.
*
/
#
ifndef
LINK_UNIFORM_BLOCK_ACTIVE_VISITOR_H
#
define
LINK_UNIFORM_BLOCK_ACTIVE_VISITOR_H
#
include
"
ir
.
h
"
#
include
"
util
/
hash_table
.
h
"
struct
uniform_block_array_elements
{
unsigned
*
array_elements
;
unsigned
num_array_elements
;
/
*
*
*
Size
of
the
array
before
array
-
trimming
optimizations
.
*
*
Locations
are
only
assigned
to
active
array
elements
but
the
location
*
values
are
calculated
as
if
all
elements
are
active
.
The
total
number
*
of
elements
in
an
array
including
the
elements
in
arrays
of
arrays
before
*
inactive
elements
are
removed
is
needed
to
be
perform
that
calculation
.
*
/
unsigned
aoa_size
;
ir_dereference_array
*
ir
;
struct
uniform_block_array_elements
*
array
;
}
;
struct
link_uniform_block_active
{
const
glsl_type
*
type
;
ir_variable
*
var
;
struct
uniform_block_array_elements
*
array
;
unsigned
binding
;
bool
has_instance_name
;
bool
has_binding
;
bool
is_shader_storage
;
}
;
class
link_uniform_block_active_visitor
:
public
ir_hierarchical_visitor
{
public
:
link_uniform_block_active_visitor
(
void
*
mem_ctx
struct
hash_table
*
ht
struct
gl_shader_program
*
prog
)
:
success
(
true
)
prog
(
prog
)
ht
(
ht
)
mem_ctx
(
mem_ctx
)
{
/
*
empty
*
/
}
virtual
ir_visitor_status
visit_enter
(
ir_dereference_array
*
)
;
virtual
ir_visitor_status
visit
(
ir_dereference_variable
*
)
;
virtual
ir_visitor_status
visit
(
ir_variable
*
)
;
bool
success
;
private
:
struct
gl_shader_program
*
prog
;
struct
hash_table
*
ht
;
void
*
mem_ctx
;
}
;
#
endif
/
*
LINK_UNIFORM_BLOCK_ACTIVE_VISITOR_H
*
/
|
6b8a5367b325ebbd6d7a652dce176c21c939211d
|
90beaf6c9e091f5aaa40c3b24bff498a0ed5055a
|
/compiler/include/byteir/Transforms/GraphClusteringByDevice.h
|
472c6aa3dd4f7d164ca06b4f3f9788e67eff16b1
|
[
"Apache-2.0",
"NCSA",
"LicenseRef-scancode-generic-cla",
"LLVM-exception",
"BSD-2-Clause",
"MIT"
] |
permissive
|
bytedance/byteir
|
cf1d9bc27ec8e9f7ea92ff449cbedf470f90115c
|
0e7673074c9d9a299717bb3379cb774c9921f72c
|
refs/heads/main
| 2023-08-31T04:42:44.536710
| 2023-08-30T20:14:22
| 2023-08-30T20:14:22
| 598,267,148
| 208
| 16
|
NOASSERTION
| 2023-09-13T21:50:19
| 2023-02-06T18:51:31
|
MLIR
|
UTF-8
|
C++
| false
| false
| 1,900
|
h
|
GraphClusteringByDevice.h
|
//===- GraphClusteringByDevice.h ------------------------------*--- C++ -*-===//
//
// Copyright 2022 ByteDance Ltd. and/or its affiliates. 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.
//
//===----------------------------------------------------------------------===//
#ifndef BYTEIR_TRANSFORMS_GRAPHCLUSTERINGBYDEVICE_H
#define BYTEIR_TRANSFORMS_GRAPHCLUSTERINGBYDEVICE_H
#include "byteir/Transforms/GraphClusteringAlgo.h"
#include "mlir/Pass/Pass.h"
#include <memory>
namespace mlir {
class ModuleOp;
constexpr StringRef getHostAnchorName() { return "__byteir_host_device__"; }
// Currently the usage of the pass is limited and it may not work correctly in
// non-tensor level dialects. Before this pass, user need to add `device = host`
// attribute to those operations that could only be run on host. Then this pass
// will cluster the host ops and their recursive producers into a host function,
// the other ops will be clustered into a device function.
std::unique_ptr<OperationPass<ModuleOp>> createGraphClusteringByDevicePass(
std::string attrName = "device", std::string device = "test",
std::string deviceAnchorName = "__byteir_test_device__",
bool dupNonSplat = false, bool dupOutputs = false,
GraphClusteringAlgo clusterAlgo = GraphClusteringAlgo::kFallback);
} // namespace mlir
#endif // BYTEIR_TRANSFORMS_GRAPHCLUSTERINGBYDEVICE_H
|
143de1e6c5a856ade0438336f5ba3d0b6eca9fac
|
52e60083e37a888a2c812cca515cc5c0ba0b3e89
|
/main.cpp
|
068f6d7e41defc0d751688a1e3a48e25cb208f0a
|
[] |
no_license
|
yinshangqing/test_log
|
0e2384b6048932f100ad14d3f8ad8703845f19c3
|
6a0ae368adffdd83b3c6a137cde469ac33aca82e
|
refs/heads/master
| 2021-04-24T20:57:28.412160
| 2018-01-11T08:39:06
| 2018-01-11T08:39:06
| 117,072,817
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 218
|
cpp
|
main.cpp
|
#include "widget.h"
#include <QApplication>
#include "log.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
test_debug("haoyun shi dou bi");
Widget w;
w.show();
return a.exec();
}
|
3c86e262b649b1f982f576a07c026854bc17eb52
|
101f77ba71c885165474f203b0caa9078800cdfa
|
/make/util.h
|
6ca236906034e44ddfa3924095396cd69b92e999
|
[] |
no_license
|
siwangqishiq/cplus
|
d8b161265ea77833147016e3c725ce16181322cf
|
512b751a4416f8ee1bbeb8a5aad6494600ca68cc
|
refs/heads/master
| 2020-03-19T03:57:12.457023
| 2018-12-29T09:43:54
| 2018-12-29T09:43:54
| 135,778,666
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 132
|
h
|
util.h
|
#ifndef __util_h__
#define __util_h__
#include "sub.h"
class Util{
private:
Mod m;
public:
int giveMeMoney();
};
#endif
|
45799689b8ac638c16f571f90c2c648c8add48c8
|
1c9cd09c4e07205cb5b2b499134d29c72fe2d9f0
|
/吃豆人/GObject.h
|
37e55fd9636b6236490f8e5eebdc665f5a0039de
|
[] |
no_license
|
llty123/pacman
|
ef3a33b29200f0a5192714ee89db9f7600279ad1
|
a6cdff3a392660c8ee0a838daffb63402226f915
|
refs/heads/master
| 2023-06-16T10:25:07.655502
| 2021-07-13T23:08:04
| 2021-07-13T23:08:04
| 383,790,751
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 3,279
|
h
|
GObject.h
|
#pragma once
#include"framework.h"
#include <wtypes.h>
#include<time.h>
#include "GMap.h"
#define PLAYERSPEED 4 //玩家速度
#define ENEMYSPEED 4 //敌人速度
#define LEGCOUNTS 100 //敌人腿的数量
#define DISTANCE 10 //图形范围
#define BLUE_ALERT 8 //蓝色警戒范围
#define D_OFFSET 2 //绘图误差
#define RD (DISTANCE+D_OFFSET) //绘图范围
//方向枚举
enum TWARDS {LEFT,RIGHT,UP,DOWN,OVER};
//class POINT
//{
//public:
//
// int x;
// int y;
//};
class Gobject
{
protected:
int mX;
int mY;
TWARDS twcommand;//方向指令缓存
int dRow;//物体所在逻辑矩阵的行
int dArray;//物体所在逻辑矩阵的列
int speed;//物体的速度
TWARDS tw;//朝向
int frame;//帧数
POINT point;//中心坐标
bool Collision();//逻辑碰撞检测
bool Achive();//判断物体是否到达逻辑坐标位置
virtual void AchieveCtrl();//到达逻辑点后更新数据
int PtTransfrom(int k);//将物体在屏幕上的坐标转变为行列坐标
public:
void virtual SetPosition(int Row, int Array);
void virtual DrawBlank(HDC& hdc);
void virtual Draw(HDC& hdc) = 0;//绘制对象
static Gmap* pStage;//指向地图类的指针,使所有物体可以使用同样的地图
Gobject(int Row, int Array)//对物体类进行初始化
{
frame = 1;
pStage = NULL;
this->dRow = Row;
this->dArray = Array;
this->point.y = dRow * pStage->LD + pStage->LD / 2;
this->point.x = dArray * pStage->LD + pStage->LD / 2;
this->mX = point.x;
this->mY = point.y;
//tw = LEFT;
//twcommand = LEFT;
}
void virtual action() = 0;//防止物体类被实例化
int GetRow()//获得物体所在行数
{
return dRow;
}
int GetArray()//获得物体所在列数
{
return dArray;
}
};
class PacMan :public Gobject//"大嘴“的类
{
protected:
//virtual void AchiveCtrl();
public:
POINT GetPos();
TWARDS GetTw()//返回大嘴的方向状态
{
return tw;
}
bool Win();
void Draw(HDC& hdc);
void SetTwCommands(TWARDS command);
void Over();
PacMan(int x, int y) :Gobject(x, y)
{
this->speed = PLAYERSPEED;
twcommand = tw = LEFT;
}
void action();
void AchieveCtrl();
};
class Enermy :public Gobject//敌人的类
{
protected:
void Catch();
void virtual MakeDecision(bool b) = 0;//敌人的行为函数
COLORREF color;
public:
static PacMan* player;//指向玩家的指针,使敌人可以知晓”大嘴“的位置信息
void virtual Draw(HDC& hdc);
Enermy(int x, int y) :Gobject(x, y)
{
this->speed = ENEMYSPEED;
tw = LEFT;
twcommand = UP;
color = RGB(0, 0, 0);
}
void virtual action();
};
class RedOne :public Enermy//松散型敌人(随机移动)
{
protected:
void MakeDecision(bool b);
public:
//void Draw(HDC& hdc);
RedOne(int x, int y) :Enermy(x, y)
{
color = RGB(255, 0, 0);
}
};
class BlueOne :public Enermy//守卫型敌人(追踪玩家)
{
protected:
void MakeDecision(bool b);
public:
//void Draw(HDC& hdc);
BlueOne(int x, int y) :Enermy(x, y)
{
color = RGB(0, 0, 255);
}
};
class YellowOne :public Enermy//扰乱型敌人(与守卫型相似,但行为模式不同)
{
protected:
void MakeDecision(bool b);
public:
//void Draw(HDC& hdc);
YellowOne(int x, int y) :Enermy(x, y)
{
color = RGB(200,200,100);
}
};
|
cdcff4edba1f0cc86efb6931947a23d8f5eed6d8
|
d01ff1ced13138bd25984af64e65c9e44572521f
|
/Sensor/SensorFinal/SensorFinal.ino
|
a82c0d30743fc073eba52ddb441825963c25ce1c
|
[] |
no_license
|
krishnayoga/robotika
|
a33de4f56ff2eb11e3c7049dac6d71159be1084e
|
69d6fc31c87006c1ee0ceb5f4b32f2c896738bc0
|
refs/heads/master
| 2020-04-13T10:52:35.517466
| 2018-12-27T02:17:43
| 2018-12-27T02:17:43
| 163,155,947
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,775
|
ino
|
SensorFinal.ino
|
#include "RTClib.h"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "DHT.h"
#include <SPI.h>
#include <SD.h>
#include <MPU9255.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
RTC_Millis rtc;
MPU9255 mpu;
#define LM35pin 0
#define LDRpin 1
#define GPpin 2
#define IRextpin 7
#define Inductivepin 6
#define IRLpin 5
#define PIRpin 4
#define IRpairpin 3
#define DHTpin 2
#define DHTTYPE DHT22
DHT dht(DHTpin, DHTTYPE);
#define I2C_LCD 0x27
#define SRFAddress 0x70
#define RTCAddress 0x68
#define byte uint8_t
char daysOfTheWeek[7][12] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
const int chipSelect = 10;
String dataString = "";
//String dataString2 = "";
int sensor='1';
void waktu()
{
DateTime now = rtc.now();
lcd.setCursor(0,0);
lcd.print(now.hour(), DEC);
lcd.print(':');
lcd.print(now.minute(), DEC);
lcd.print(':');
lcd.print(now.second(), DEC);
lcd.print(now.day(), DEC);
lcd.print(now.month(), DEC);
lcd.print(now.year(), DEC);
}
void setup()
{
//SDCard
Serial.begin(9600);
while (!Serial)
{
;
}
Serial.print("Initializing SD card...");
if (!SD.begin(chipSelect))
{
Serial.println("Card failed, or not present");
return;
}
Serial.println("card initialized.");
Serial.begin(9600);
lcd.begin();
dht.begin();
Wire.begin();
mpu.init();
// Serial.begin(115200);
rtc.begin(DateTime(F(__DATE__), F(__TIME__)));
}
void loop()
{
//LM35 Temperature
float readLM35 = analogRead(LM35pin);
float mv = (readLM35/1024.0)*5000;
float cel = mv/10;
// Serial.print("LM35 : ");
// Serial.print(cel);
// Serial.print(" C");
//LDR
float readLDR = analogRead(LDRpin);
// Serial.print(" LDR : ");
// Serial.print(readLDR);
//GP
float readGP = analogRead(GPpin);
// Serial.print(" GP : ");
// Serial.print(readGP);
//IRpair
int readIRpair = digitalRead(IRpairpin);
// Serial.print(" IRpair : ");
// if(readIRpair == LOW)
// {
// Serial.print("ON");
// }
// else
// {
// Serial.print("-");
// }
//PIR
int readPIR;
readPIR = digitalRead(PIRpin);
// Serial.print(" PIR : ");
// if(readPIR == HIGH)
// {
// Serial.print("ON");
// }
// else
// {
// Serial.print("-");
// }
//IRL
int readIRL = digitalRead(IRLpin);
// Serial.print(" IRL : ");
// if(readIRL == HIGH)
// {
// Serial.print("ON");
// }
// else
// {
// Serial.print("-");
// }
//Inductive
int readInd = digitalRead(Inductivepin);
// Serial.print(" Ind : ");
// if(readInd == HIGH)
// {
// Serial.print("ON");
// }
// else
// {
// Serial.print("-");
// }
//IRext
int readIRext = digitalRead(IRextpin);
// Serial.print(" IRext : ");
// if(readIRext == LOW)
// {
// Serial.print("ON");
// }
// else
// {
// Serial.print("-");
// }
//SRF
byte byteHigh, byteLow;
int distance;
Wire.beginTransmission(SRFAddress);
Wire.write(byte(0x00));
Wire.write(byte(0x51));
Wire.endTransmission();
Wire.beginTransmission(SRFAddress);
Wire.write(byte(0x02));
Wire.endTransmission();
Wire.requestFrom(SRFAddress, 2);
while(Wire.available() < 2);
byteHigh = Wire.read();
byteLow = Wire.read();
distance = ((byteHigh<<8) + byteLow);
// Serial.print(" $Distance, ");
// Serial.print(distance, DEC);
//DHT()
int readDHT = digitalRead(DHTpin);
int chk;
float hum; // humidity
float temp; // temperature
hum = dht.readHumidity();
temp = dht.readTemperature();
// Serial.print(" Humidity: ");
// Serial.print(hum);
// Serial.print(" %, Tempt: ");
// Serial.print(temp);
// Serial.println(" Celcius ");
//MPU-Gyro
mpu.read_acc();
mpu.read_gyro();
mpu.read_mag();
float ax=mpu.ax;
float ay=mpu.ay;
float az=mpu.az;
float gx=mpu.gx;
float gy=mpu.gy;
float gz=mpu.gz;
float mx=mpu.mx;
float my=mpu.my;
float mz=mpu.mz;
//Acceleration
ax=ax/16384;
ay=ay/16384;
az=(az/16384);
//Gyroscope
gx=gx/131;
gy=gy/131;
gz=gz/131;
//Magnetic Flux
const float cal=0.06;
mx=mx*cal;
my=my*cal;
mz=mz*cal;
mx=mx/0.6;
my=my/0.6;
mz=mz/0.6;
String dataString="";
// dataString+=String(now.day()) + "/" + String(now.month()) + "/" + String(now.year()) + "--" + String(now.hour()) + ":" + String(now.minute()) + ":" + String(now.second());
dataString+="LM35: " + String(cel) + " C" + " | ";
dataString+="LDR: " + String(readLDR) + " | ";
dataString+="GP: " + String(readGP) + " | ";
dataString+="IRpair: ";
if(readIRpair == LOW)
{
dataString+="ON";
}
else
{
dataString+=("-");
}
dataString+=" | ";
dataString+="PIR: ";
if(readPIR == HIGH)
{
dataString+="ON";
}
else
{
dataString+=("-");
}
dataString+=" | ";
dataString+="IRL: ";
if(readIRL == HIGH)
{
dataString+="ON";
}
else
{
dataString+=("-");
}
dataString+=" | ";
dataString+="Inductive= ";
if(readInd == LOW)
{
dataString+="ON";
}
else
{
dataString+=("-");
}
dataString+=" | ";
dataString+="IRext: ";
if(readIRext == LOW)
{
dataString+="ON";
}
else
{
dataString+=("-");
}
dataString+=" | ";
dataString+="SRF: " + String(distance) + " | ";
//DHT
dataString+="Humidity: " + String(hum) + " % - ";
dataString+="Temp: " + String(temp) + " C";
dataString+=" | ";
// String dataString2="";
// //Acceleration
// dataString2+="Acceleration: ";
// dataString2+=String(ax) + " / ";
// dataString2+=String(ay) + " / ";
// dataString2+=String(az);
// //Gyroscope
// dataString2+="Gyroscope: ";
// dataString2+=String(gx) + " / ";
// dataString2+=String(gy) + " / ";
// dataString2+=String(gz);
// //Magnetic Flux
// dataString2+="Magnetic Flux: ";
// dataString2+=String(mx) + " / ";
// dataString2+=String(my) + " / ";
// dataString2+=String(mz);
//CASE SENSOR
//LM35
switch(sensor)
{
case '1':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print("LM35 : ");
lcd.print(cel);
lcd.print(" C");
break;
//LDR
case '2':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" LDR : ");
lcd.print(readLDR);
break;
//GP
case '3':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" GP : ");
lcd.print(readGP);
break;
//IRpair
case '4':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" IRpair : ");
if(readIRpair == LOW)
{
lcd.print("ON");
}
else
{
lcd.print("-");
}
break;
//PIR
case '5':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" PIR : ");
if(readPIR == HIGH)
{
lcd.print("ON");
}
else
{
lcd.print("-");
}
break;
//IRL
case '6':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" IRL : ");
if(readIRL == HIGH)
{
lcd.print("ON");
}
else
{
lcd.print("-");
}
break;
//Inductive
case '7':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" Ind : ");
if(readInd == HIGH)
{
lcd.print("ON");
}
else
{
lcd.print("-");
}
break;
//IRext
case '8':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(" IRext : ");
if(readIRext == LOW)
{
lcd.print("ON");
}
else
{
lcd.print("-");
}
break;
//SRF
case '9':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print("Distance : ");
lcd.print(distance, DEC);
break;
//DHT
case 'q':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(hum);
lcd.print("% ");
lcd.print(temp);
lcd.println("C ");
// lcd.scrollDisplayLeft();
break;
//MPU - Gyro (Accel)
case 'w':
lcd.clear();
// waktu();
lcd.setCursor(0,1);
lcd.print(ax);
lcd.print(" ");
lcd.print(ay);
lcd.print(" ");
lcd.print(az);
break;
//MPU - Gyro (Gyroscope)
case 'e':
lcd.clear();
waktu();
lcd.setCursor(0,1);
lcd.print(gx);
lcd.print(" ");
lcd.print(gy);
lcd.print(" ");
lcd.print(gz);
break;
//MPU - Gyro (Magnetic Flux)
case 'r':
lcd.clear();
waktu();
lcd.print(mx);
lcd.print(" ");
lcd.print(my);
lcd.print(" ");
lcd.print(mz);
break;
case '0':
lcd.clear();
// lcd.setCursor(0,0);
// lcd.print("Distance : ");
// lcd.print(distance,DEC);
// lcd.clear();
lcd.setCursor(0,1);
lcd.print(" LDR : ");
lcd.print(readLDR);
break;
default :
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Pilihan Tampilan");
lcd.setCursor(0, 1);
lcd.print("1 to 9 or q to r");
break;
}
if (Serial.available() > 0)
{
sensor = Serial.read();
}
//SDCard
File dataFile = SD.open("lala1.txt", FILE_WRITE);
if (dataFile)
{
dataFile.println(dataString);
//dataFile.println(dataString2);
dataFile.close();
Serial.println(dataString);
//Serial.println(dataString2);
}
else
{
Serial.println("error opening uji.txt");
}
delay(100);
}
|
acec8b9bfa95f484dc73129cb0842c371dbb9d12
|
2236b83cf9fe64effdc49466b779dc3f64dbdd7e
|
/studies/01 Programmiertechnik 1/Aufgabe5/schritt2/Notenspiegel.cpp
|
000f1d00b8ce54c437e84b389b1462a3b6e73500
|
[] |
no_license
|
jtammen/grab-bag
|
32605561299c231178702622c40eb3cfbe0ad3cc
|
f7dfeba354339624a22880ac5c34ce7b1e9bb530
|
refs/heads/master
| 2020-05-01T13:49:59.464686
| 2012-06-03T18:34:22
| 2012-06-03T18:34:22
| 4,511,109
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,562
|
cpp
|
Notenspiegel.cpp
|
//
// Notenspiegel.cpp
//
// Programmiertechnik Uebungsaufgabe 5: Klasse Notenspiegel
//
// Autor: H.Drachenfels
// Erstellt am: 25.05.2004
//
#include "Notenspiegel.h"
#include <iostream>
Notenspiegel::Notenspiegel (char **namePtr)
{
namePtr_ = namePtr;
}
Notenspiegel::~Notenspiegel ()
{
FachNote *fachNotePtr;
while ((fachNotePtr = dieFachNoten_.entfernen()) != 0)
{
delete fachNotePtr;
}
}
void Notenspiegel::einlesen ()
{
std::cerr << "Fach und Note eingeben (Ende mit Strg-d):\n";
for (;;)
{
//------------------------------------ Fach und Note einlesen und pruefen
char fach[40];
int ganze;
int zehntel;
char komma;
std::cin >> fach;
std::cin >> ganze >> komma >> zehntel;
if (std::cin.eof() || std::cin.bad())
{
std::cerr << "Eingabeende\n";
return;
}
if (std::cin.fail())
{
std::cerr << "Keine Zahl: ";
std::cin.clear();
char c;
while (std::cin.get(c) && c != '\n' && c != ' ' && c != '\t')
{
std::cerr << c;
}
std::cerr << '\n';
continue;
}
try
{
FachNote *fachNotePtr = new FachNote(fach, ganze, zehntel);
if (komma != ',' && komma != '.')
{
std::cerr << "Falsche Eingabe: "
<< fach << ' ' << ganze << komma << zehntel
<< '\n';
delete fachNotePtr;
continue;
}
//----------------------------------------------- in Notenliste eintragen
dieFachNoten_.einfuegen(fachNotePtr);
}
catch (FalscheNote)
{
std::cout << "Falsche Eingabe, gefangen durch FalscheNote!\n";
}
}
}
void Notenspiegel::htmlAusgeben () const
{
std::cout <<
"<HTML>\n"
"<HEAD>\n"
"<TITLE>Notenspiegel</TITLE>\n"
"</HEAD>\n"
"<BODY>\n"
"<H2>Notenspiegel<BR><HR></H2>\n"
"<P>\n"
"<B>Student:</B><BR>\n";
for (char **p = namePtr_; *p != 0; p++)
{
std::cout << *p << '\n';
}
std::cout <<
"</P>\n"
"<P>\n"
"<TABLE WIDTH=\"100%\">\n"
"<TR><TH ALIGN=\"LEFT\">Fach:</TH><TH ALIGN=\"LEFT\">Note:</TH></TR>\n";
for (FachNote *p = dieFachNoten_.getErsteFachNote();
p != 0;
p = p->getNaechsteFachNote())
{
std::cout <<
"<TR>"
"<TD>" << p->getFach() << "</TD>"
"<TD>" << p->inWorten() << "</TD>"
"<TD>" << p->getGanze() << ',' << p->getZehntel() << "</TD>"
"</TR>\n";
}
std::cout <<
"</TABLE>\n"
"</P>\n"
"<HR NOSHADE>\n"
"</BODY>\n"
"</HTML>\n";
}
|
3b492cc3f19183d6d149923ec44c67e7e7cbdf34
|
67563a4436b914654dd441eb2e1915bbd41aa8ca
|
/Common/Util/src/bill.cpp
|
72b9bbb295e96ff3b228cb4e707e5cadddcea446
|
[
"Apache-2.0"
] |
permissive
|
PKO-Community-Sources/ClientSide-Sources
|
1cab923af538ffe9d9cb9154b14dd3e0a903ca14
|
ddbcd293d6ef3f58ff02290c02382cbb7e0939a2
|
refs/heads/main
| 2023-05-13T00:15:04.162386
| 2021-06-02T15:35:36
| 2021-06-02T15:35:36
| 372,753,278
| 3
| 0
|
Apache-2.0
| 2021-06-02T15:26:17
| 2021-06-01T08:17:07
|
C++
|
GB18030
|
C++
| false
| false
| 24,497
|
cpp
|
bill.cpp
|
#include "util.h"
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <exception>
#include "md5.h"
#include "comutil.h"
//#import <msxml2.dll> raw_interfaces_only
#include "PAI.h"
#include "BTI.h"
#pragma comment(lib, "pai.lib")
#pragma comment(lib, "bti.lib")
#pragma comment(lib, "comsupp.lib")
CPAI::CPAI()
{
// add by jampe
_bstr_t strIP = "202.159.139.231";
ipPAI_Init(&strIP.GetBSTR());
}
int CPAI::Login(char const* name, char const* pwd)
{
LONG lret;
unsigned char chMD5_PWD[18];
unsigned char lpBuf[8];
_bstr_t strName;
_bstr_t strMD5_PWD;
_bstr_t strServer;
//wchar_t temp[100];
strName=name;
strMD5_PWD="";
strServer="";
strcpy((char*)chMD5_PWD, pwd);
strMD5_PWD=(char*)chMD5_PWD;
//MD5Compute((unsigned char*)pwd,chMD5_PWD);
//for (int i=0;i<16;i++)
//{
// //itoa(chMD5_PWD[i],(char*)lpBuf,16);
// sprintf((char*)lpBuf,"%.2x",chMD5_PWD[i]);
// strMD5_PWD+=(char*)lpBuf;
//}
//strMd5_PWD[16]=strMd5_PWD[17]=0;
//mbstowcs(temp, (char*)strMd5_PWD, 99);
//BSTR bstrPwd = ::SysAllocString(temp);
//BSTR bstrSvr = ::SysAllocString(L"");
lret = ipPAI_Login(0, cCode_OSBP, 7063, &strName.GetBSTR(), &strMD5_PWD.GetBSTR(), &strServer.GetBSTR());
//::SysFreeString(bstrSvr);
//::SysFreeString(bstrPwd);
//::SysFreeString(bstrName);
return lret;
}
std::string CPAI::GetPassport()
{
return ipPAI_Passport();
}
// add by jampe
std::string CPAI::LastError()
{
return ipPAI_Reply();
}
// end add
#include <string>
#include <map>
#ifdef WIN32
#include <winsock.h>
#else
#include <netinet/in.h> // sin_*
#endif
//END includes and defines
namespace HTTP {
/**
* Use HTTP::GetRequest to send a HTTP/1.1 GET request and receive text or even binary data.\n
* Initialize with connect(), send the request by calling request() and obtaion
* the data with getHeader() and getData(). You might want to use getError() if an error occures.
* For further information look at the following example.
* \n\n
* Example:
* @code
* std::string data, header;
* HTTP::GetRequest gr;
* gr.setUserAgent("HTTPTool/1.1");
* gr.addHeader("Accept", "image/jpegn");
* gr.addHeader("header1", "value1");
*
* if ( gr.connect( "www.google.de", 80 ) ) {
* if ( gr.request( "index.html" ) ) {
* while ( gr.process() );
* // you may want to update a progress bar with gr.getRawSize();
* }
* }
*
* if ( gr.success() ) {
* header = gr.getHeader();
* data = gr.getData();
* } else {
* cout << gr.getError();
* }
* // now do something with data and header using getData() and getHeader()
* @endcode
*
* @note getFooter() is not supported right now, because it is rarely used.
* @author Dominik Haumann
* @version 0.4
* @todo: LOCATION? -> imho, this should be done by the user :-)
*/
class GetRequest {
public:
/**
* standard constructor
*/
GetRequest();
/**
* destructor
*/
virtual ~GetRequest();
/**
* set the user agent (UA)
*/
void setUserAgent(const std::string& ua);
/**
* get user agent (UA)
*/
std::string getUserAgent() const;
/**
* add a header entry like "Content-Length" etc. This header
* will be sent to the server with the request.
* @param key the key
* @param value the value
*/
void addHeader(const std::string& key, const std::string& value);
/**
* see above
* @param key the key
* @param value the value
*/
void addHeader(const std::string& key, int value);
/**
* remove all headers.
*/
void clearHeaders();
/**
* reset headers, user agent and setup the object for a new connection
*/
void reset();
/**
* connect to a server
* @param host IP or DNS (eg 80.123.23.120 or www.google.de)
* @param port port (usually port 80)
* @return true on success
*/
bool connect(const std::string& host, int port);
/**
* initialize HTTP GET request
* @param page rest of URL (eg. index.html)
* @return true on success
*/
bool request(const std::string& page);
/**
* continue to get data
* @return true, if the transfer is not finished, otherwise false
*/
bool process();
/**
* get header from the answer the server returned.
* @attention Do not mistake it with addHeader which is used to send
* the request.
* @return header of request
*/
std::string getHeader() const;
/**
* get a value out of the header
* @param key key of header
* @return value of key (string) or "" if not found
*/
std::string getHeaderAsString(const std::string& key) const;
/**
* get a value out of the header
* @param key key of header
* @return value of key (int)
*/
int getHeaderAsInt(const std::string& key) const;
/**
* @return size of header
*/
unsigned int getHeaderSize() const;
/**
* get data, this may be text or binary
* @return data as std::string
*/
std::string getData() const;
/**
* @return get size of data
*/
unsigned int getDataSize() const;
/**
* get footer
* @return footer of request
*/
std::string getFooter() const;
/**
* @return size of footer
*/
unsigned int getFooterSize() const;
/**
* get all data without any modifications
* @return raw data as std::string
*/
std::string getRaw() const;
/**
* during the process get the growing size with this function
* @return size of raw data
*/
unsigned int getRawSize() const;
/**
* get error message set by setError()
* @return error message
*/
std::string getError() const;
/**
* get status of the transfer
* @return true, if transfer was successful
*/
bool success() const;
protected:
/**
* set error message returned by getError()
* @param message error message
*/
void setError(std::string message);
/**
* remove headers and footers
* @return true on success
*/
bool splitData();
/**
* if the transfer was chunked, remove the size infos
* @return true on success
*/
bool postProcessData();
/**
* get size of one chunk (helper function for postProcessData)
* @param n position to begin search
* @param source string to search in
* @return size, or std::string::npos if invalid
*/
unsigned int findSize(unsigned int n, const std::string& source) const;
/**
* check, whether this is a chunked transfer
* @return true, if chunked transfer
*/
bool isChunkedTransfer() const;
/**
* If the transfer mode is 'chunked' and stepping through the sizes
* ends with the '0' we definitely have reached the end of the data
* transfer and may stop recieving more data.
* @note this is necessary because otherwise we have a delay of ~5 seconds
* in which our app is not responding. So this is actually a HACK to
* make it work smoothly :)
*/
bool isTransferFinished() const;
/**
* the exact length is given by "Content-Length: "
* @return content length
*/
unsigned int getContentLength() const;
private:
std::string m_data; ///< contains the requested data
std::string m_header; ///< contains the header information
std::string m_footer; ///< contains the footer information
std::string m_rawdata; ///< contains the raw server answer
std::string m_errorMessage; ///< contains the error message
bool m_success; ///< flag, if transfer was successful
std::string m_host; ///< host as string (www.google.de or IP address)
std::map <std::string, std::string> m_additionalHeader; ///< additional header infos
std::string m_useragent; ///< user agent (eg. "Mozilla/5.0");
sockaddr_in server; ///< server struct including host and port
int sock; ///< socket
};
}
#include <sstream>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#ifndef WIN32
// unix/linux header files
//#include <tcpd.h> // sockaddr_in
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#define closesocket(s) close(s)
#endif
// debug
#include <iostream>
//END includes
namespace HTTP {
//BEGIN GetRequest
GetRequest::GetRequest()
{
m_useragent = "";
}
GetRequest::~GetRequest() { }
void GetRequest::setUserAgent(const std::string& ua)
{
m_useragent = ua;
}
std::string GetRequest::getUserAgent() const
{
return m_useragent;
}
void GetRequest::addHeader(const std::string& key, const std::string& value)
{
m_additionalHeader[key] = value;
}
void GetRequest::addHeader(const std::string& key, int value)
{
// int to string
std::string str;
std::stringstream ss;
ss << value;
ss >> str;
addHeader(key, str);
}
void GetRequest::clearHeaders()
{
m_additionalHeader.clear();
}
void GetRequest::reset()
{
m_useragent = "";
clearHeaders();
}
bool GetRequest::connect(const std::string& host, int port)
{
m_success = true;
m_host = host;
unsigned long addr;
struct hostent *host_info;
#ifdef WIN32
// initialize TCP for Windows ("winsock")
short wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD (1, 1);
if (WSAStartup (wVersionRequested, &wsaData) != 0) {
setError("HTTP request error: failed to init windows sockets\n");
m_success = false;
return false;
}
#endif
// create socket
sock = socket( PF_INET, SOCK_STREAM, 0);
if (sock < 0) {
setError("HTTP request error: failed to create socket.");
m_success = false;
return false;
}
// create socked address of the server
// it is: type, IP-Address and port number
memset(&server, 0, sizeof (server));
if ((addr = inet_addr(host.c_str())) != INADDR_NONE) {
// host is a numeric IP address
memcpy((char *)&server.sin_addr, &addr, sizeof(addr));
} else {
// convert servername to IP address
host_info = gethostbyname(host.c_str());
if (host_info == 0L) {
setError("HTTP request error: unknown server: " + host + "\n");
m_success = false;
return false;
}
memcpy((char *)&server.sin_addr, host_info->h_addr, host_info->h_length);
}
server.sin_family = AF_INET;
server.sin_port = htons(port);
return true;
}
bool GetRequest::request(const std::string& page)
{
m_success = true;
m_header = "";
m_data = "";
m_rawdata = "";
m_rawdata.reserve( 1048576 ); // reserve 1 MB
setError("HTTP request: no error occured.");
char buffer[8192];
// connect to server
if ( ::connect(sock, (struct sockaddr*)&server, sizeof(server)) < 0 ) {
setError("HTTP request error: cannot connect to server");
m_success = false;
return false;
}
// create and send HTTP GET request
std::string cmd = "GET /" + page + " HTTP/1.1\r\n"
"Host: " + m_host;
if ( m_useragent.size() > 0 ) {
cmd += "\r\nUser-Agent: " + m_useragent;
}
std::map <std::string, std::string>::iterator it = m_additionalHeader.begin();
while ( it != m_additionalHeader.end() ) {
cmd += "\r\n" + it->first + ": " + it->second;
it++;
}
// add empty line
cmd += "\n\n";
sprintf(buffer, cmd.c_str());
send(sock, buffer, strlen(buffer), 0);
return true;
}
bool GetRequest::process( )
{
int count;
char buffer[8192];
// get server answer
count = recv(sock, buffer, sizeof(buffer), 0);
// NOTE: use append, because this way we support binary data!
m_rawdata.append(buffer, count);
// check if we have reached the end of the http-stream
if (count == 0 || isTransferFinished())
{
// close connection and socket
closesocket(sock);
// split data from response
m_success = splitData();
return false;
}
return true;
}
bool GetRequest::success() const
{
return m_success;
}
//BEGIN getter
std::string GetRequest::getHeader() const
{
return m_header;
}
std::string GetRequest::getHeaderAsString(const std::string& key) const
{
if (m_header.size() > 0) {
unsigned int pos = m_header.find("\r\n" + key + ": ", 0);
if (pos == std::string::npos) return "";
pos += 4 + key.size();
unsigned int end = m_rawdata.find("\r\n", pos);
if (end == std::string::npos) return "";
return m_header.substr(pos, end - pos);
}
return "";
}
int GetRequest::getHeaderAsInt(const std::string& key) const
{
std::string str = getHeaderAsString(key);
if (str.size() == 0) {
return 0;
} else {
int value;
std::stringstream ss;
ss << str;
ss >> value;
return value;
}
}
std::string GetRequest::getData() const
{
return m_data;
}
std::string GetRequest::getFooter() const
{
return m_footer;
}
std::string GetRequest::getRaw() const
{
return m_rawdata;
}
unsigned int GetRequest::getHeaderSize() const
{
return m_header.size();
}
unsigned int GetRequest::getDataSize() const
{
return m_data.size();
}
unsigned int GetRequest::getFooterSize() const
{
return m_footer.size();
}
unsigned int GetRequest::getRawSize() const
{
return m_rawdata.size();
}
std::string GetRequest::getError() const
{
return m_errorMessage;
}
//END getter
void GetRequest::setError(std::string message)
{
m_errorMessage = message;
}
bool GetRequest::isChunkedTransfer() const
{
return ( m_rawdata.find("\r\nContent-Length: ", 0) == std::string::npos );
}
bool GetRequest::isTransferFinished() const
{
if ( !isChunkedTransfer() ) return false;
// now find the first empty line, as this marks is the end of the header \r\n\r\n
unsigned int pos = m_rawdata.find("\r\n\r\n", 0);
if (pos == std::string::npos) return false;
pos += 4;
unsigned int size;
// now enter the loop and step through all the chunks, until
// the last chunk is marked with 0. If we find that, all data
// was transferred and we return true.
while ( (size = findSize(pos, m_rawdata)) != std::string::npos ) {
if ( size == 0 ) return true;
// move pos over the chunked-info-line
pos = m_rawdata.find("\r\n", pos);
if (pos == std::string::npos) return false;
pos += 2;
pos += size + 2;
}
return false;
}
unsigned int GetRequest::getContentLength() const
{
unsigned int pos = m_rawdata.find("\r\nContent-Length: ", 0) + 18; // 18 == strlen("\r\nContent-Length: ");
unsigned int end = m_rawdata.find("\r\n", pos);
std::string tmp = m_rawdata.substr(pos, end - pos);
return atoi( tmp.c_str() );
}
bool GetRequest::postProcessData()
{
// in detail, the chunked BNF
// Chunked-Body = *chunk
// last-chunk
// trailer
// CRLF
// chunk = chunk-size [ chunk-extension ] CRLF
// chunk-data CRLF
// chunk-size = 1*HEX
// last-chunk = 1*("0") [ chunk-extension ] CRLF
// chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
// chunk-ext-name = token
// chunk-ext-val = token | quoted-string
// chunk-data = chunk-size(OCTET)
// trailer = *(entity-header CRLF)
unsigned int size, pos, prev;
size = findSize(0, m_data);
if (size == std::string::npos) {
m_success = false;
return false;
}
// remove the first line
pos = m_data.find("\r\n", 0);
if (pos == std::string::npos) {
m_success = false;
return false;
}
pos += 2;
m_data = m_data.erase(0, pos);
prev = pos = size;
// delete crlf from first chunk
m_data = m_data.erase(pos, 2);
while (true) {
size = findSize(pos, m_data);
if (size == std::string::npos) {
m_success = false;
return false;
} else if (size == 0) {
// last chunk
m_data = m_data.erase(pos, std::string::npos);
m_success = true;
return true;
}
// remove the line
pos = m_data.find("\r\n", pos);
if (pos == std::string::npos) {
m_success = false;
return false;
}
pos += 2;
m_data = m_data.erase(prev, pos - prev);
pos = prev + size;
prev = pos;
// delete crlf from this chunk
m_data = m_data.erase(pos, 2);
}
// never happens
return true;
}
unsigned int GetRequest::findSize(unsigned int n, const std::string& source) const
{
unsigned int end, crlf, semicolon, size;
crlf = source.find("\r\n", n);
if (crlf == std::string::npos)
return std::string::npos;
semicolon = source.find(";", n);
if (semicolon == std::string::npos)
semicolon = crlf;
if (semicolon < crlf)
end = semicolon;
else
end = crlf;
std::stringstream ss;
ss << source.substr(n, end - n);
ss.setf(std::ios_base::hex, std::ios_base::basefield); // hex is the format
ss >> size;
// std::cout << "findSize(" << n << ") == " << size << " (" << source.substr(n, end - n) << ")" << std::endl;
return size;
}
bool GetRequest::splitData()
{
// info: http://www.jmarshall.com/easy/http/
//
// if we know the size, we can copy the amount of data.
// otherwise we use the chuked transfer.
//
// chunked transfer:
// Part A
// HTTP/1.1 200 OK
// Date: Fri, 31 Dec 1999 23:59:59 GMT
// Content-Type: text/plain
// Transfer-Encoding: chunked
//
// Part B
// 1a; ignore-stuff-here
// part C
// abcdefghijklmnopqrstuvwxyz
// 10
// 1234567890abcdef
// Part D
// \r\n0\r\n
// some-footer: some-value
// another-footer: another-value
// [blank line here]
if ( !isChunkedTransfer() ) {
// get the exact length of data
unsigned int size = getContentLength();
unsigned int pos = m_rawdata.find("\r\n\r\n", 0);
if (pos == std::string::npos) {
setError("HTTP request error: no header information available");
m_success = false;
return false;
}
pos += 4;
// split header
m_header = m_rawdata.substr(0, pos);
// remove header from m_data
m_data = m_rawdata.substr(pos, size);
m_footer = ""; // :)
} else {
// face part A: extract the header
// find empty line
unsigned int pos = m_rawdata.find("\r\n\r\n", 0);
if (pos == std::string::npos) {
setError("HTTP request error: no valid header found (chunked)");
m_success = false;
return false;
} else {
m_header = m_rawdata.substr(0, pos + 2);
}
pos += 4;
// face part D: extract footer
unsigned int end = m_rawdata.rfind("\r\n0", std::string::npos);
if (end == std::string::npos) {
setError("HTTP request error: no valid footer found (chunked)");
m_success = false;
return false;
} else {
// ha! we got footer
end += 2;
end = m_rawdata.find("\r\n", end);
if (end == std::string::npos) {
setError("HTTP request error: no valid footer found (chunked*)");
m_success = false;
return false;
}
end += 2;
m_footer = m_rawdata.substr(end, std::string::npos);
}
// copy data part to m_data
m_data = m_rawdata.substr(pos, end - pos);
// face part B and C
// chunked means that we have many chunks with size/body.
// what we do now, is to remove all sizes, eg. \r\nsize\r\n
if (!postProcessData()) {
setError("HTTP request error: the data part seems to be corrupted (chunked)");
m_success = false;
return false;
}
}
return true;
}
//END GetRequest
}
int PSS_GetCredit(char const* section, char const* name, std::string& strErr)
{
int rc = 0;
char buf[200];
HTTP::GetRequest gr;
sprintf(buf, "moliyo/checklogin2kop.aspx?memberpk=%s&productfk=%s", name, section);
// if (gr.connect("61.152.115.74", 80)) {
//if (gr.connect("192.168.11.72", 8080)) {
if (gr.connect("61.152.115.184", 8080)) {
if (gr.request(buf)) {
while (gr.process()) {}
rc = atoi(gr.getData().c_str()); // Data 主体就是返回值
} else {
rc = 1;
}
} else {
rc = 2;
}
switch (rc)
{
case 0: strErr = "succeed"; break;
case 1: strErr = "send login account failed, please retry later"; break;
case 2: strErr = "can't connect account server, please retry later"; break;
case -1: strErr = "System is error! please retry later"; break;
case -2: strErr = "can't connect bill system! please retry later"; break;
case -3: strErr = "un activation subarea"; break;
case -4: strErr = "point is't enough , please bug point first!"; break;
default: strErr = "query failed, please retry later"; break;
// Modify by lark.li2008
/*case 0: strErr = "成功"; break;
case 1: strErr = "发送帐号登录请求失败,请稍后重试"; break;
case 2: strErr = "无法连接帐号服务器,请稍后重试"; break;
case -1: strErr = "系统出现故障,请稍后重试"; break;
case -2: strErr = "连接帐务系统失败,请稍后重试"; break;
case -3: strErr = "未激活游戏分区"; break;
case -4: strErr = "点数不足,请先充值"; break;
default: strErr = "查询过程出现未知错误,请稍后重试"; break;*/
}
return rc;
}
|
edfc7e606ce4af7f3a0c513719e71e9949ed9e86
|
b367fe5f0c2c50846b002b59472c50453e1629bc
|
/xbox_leak_may_2020/xbox trunk/xbox/private/test/directx/d3d/conf/Cubemap/Utility.cpp
|
2157550ea89ea4ad51b709c885987e07d74578b4
|
[] |
no_license
|
sgzwiz/xbox_leak_may_2020
|
11b441502a659c8da8a1aa199f89f6236dd59325
|
fd00b4b3b2abb1ea6ef9ac64b755419741a3af00
|
refs/heads/master
| 2022-12-23T16:14:54.706755
| 2020-09-27T18:24:48
| 2020-09-27T18:24:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,798
|
cpp
|
Utility.cpp
|
//#define D3D_OVERLOADS
#include "d3dlocus.h"
#include "cd3dtest.h"
#include "3dmath.h"
#include "Cubemap.h"
bool CCubemap::BltCubicTexture(void)
{
/*
// Blt from source sysmem to vidmem method
POINT Pt = {0,0};
for (int i=0;i<6;i++)
{
for (int j=0;j<m_paSysTexture->m_pSrcSurface->GetNumAttachedSurfaces();j++)
{
CDirectDrawSurface * pSurface = m_paTexture->m_pSrcSurface->GetCubicSurface(i)->GetAttachedSurface(j);
CDirectDrawSurface * pSysSurface = m_paSysTexture->m_pSrcSurface->GetCubicSurface(i)->GetAttachedSurface(j);
// Blt from source sysmem to source target method
if (!pSurface->Blt(pSysSurface,Pt))
{
WriteToLog("Source Blt(%d) failed with HResult = %s.",i,GetHResultString(GetLastError()).c_str());
RELEASE(pSurface);
RELEASE(pSysSurface);
return false;
}
RELEASE(pSurface);
RELEASE(pSysSurface);
if (NULL != m_pRefTarget)
{
CDirectDrawSurface * pSurface = m_paTexture->m_pRefSurface->GetCubicSurface(i)->GetAttachedSurface(j);
CDirectDrawSurface * pSysSurface = m_paSysTexture->m_pRefSurface->GetCubicSurface(i)->GetAttachedSurface(j);
// Blt from ref sysmem to ref target method
if (!pSurface->Blt(pSysSurface,Pt))
{
WriteToLog("Reference Blt(%d) failed with HResult = %s.",i,GetHResultString(GetLastError()).c_str());
RELEASE(pSurface);
RELEASE(pSysSurface);
return false;
}
RELEASE(pSurface);
RELEASE(pSysSurface);
}
}
}
*/
return true;
}
|
285c35ce9156e6266d77d1637e66b3631950d86f
|
6e0afb7107531039af5115bfa1c656ab359a739d
|
/svn/gui/slider.cpp
|
97b73945136d35001959f17e3bd888b341ac4329
|
[] |
no_license
|
valgaba/vimar
|
6be439463dfa496436103370193d601b9d45ad35
|
69fa958e1720d4312c24beb6e15c802987bca2fa
|
refs/heads/master
| 2022-06-17T19:44:16.380735
| 2020-05-14T14:03:39
| 2020-05-14T14:03:39
| 259,447,195
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,960
|
cpp
|
slider.cpp
|
/* This file is part of IRadit.
Copyright 2020, Victor Algaba <victor@radit.org> www.radit.org
IRadit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Iradit 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 Iradit. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QDebug>
#include "gui/slider.h"
Slider::Slider(QWidget *parent):QSlider(parent){
this->setOrientation(Qt::Horizontal);
this->setCursor(QCursor(Qt::PointingHandCursor)); //cambiamos el cursor
// para ver bien los colores del control he cambiado el estylo del padre(algo raro)
this->parentWidget()->setStyleSheet(QString::fromUtf8("background-color: rgb(51, 59, 79);" ));
this->setStyleSheet(QString::fromUtf8(" QSlider::groove:horizontal {\n"
"border: 1px solid #ffffff;\n"
"height: 8px;\n"
"background: none;\n"
"margin: 2px 0;\n}"
"QSlider::handle:horizontal {\n"
"background: #ffffff;\n"
"width:18px;\n"
"margin: -1px 0;\n"
"border-radius: 5px;\n}"
));
}
Slider::~Slider(){}
|
fb4386079d6108f6bed1c93b88b88f77ce9146ee
|
1558823dc262eb742acaeaeda87a7a31f5b9ed3a
|
/OpenGL Shaders/OpenGL Shaders/ClientGame.h
|
57fb649d8b3ae09e889ad25d3beb0297bca2cba9
|
[] |
no_license
|
OlivierLindenbergh/Eindproject
|
be7df9c2bb62fcda701ac0f0ad3340a11dc79154
|
0ae8b57e26f0cb3ff8087342d4f6a6b4e74ba606
|
refs/heads/master
| 2020-07-24T02:04:57.054548
| 2017-01-24T23:49:16
| 2017-01-24T23:49:16
| 73,798,435
| 0
| 0
| null | 2017-01-24T23:49:17
| 2016-11-15T09:35:11
|
HTML
|
UTF-8
|
C++
| false
| false
| 2,315
|
h
|
ClientGame.h
|
#pragma once
#include "NetworkHeader.h"
#include "Header.h"
#include "networkData.h"
#include "ClientNetwork.h"
#include "Player.h"
#include "Enemy.h"
extern void(*networkUpdateFunction)(void);
extern void SendInitData();
extern void SendLobbyData();
extern void SendGameData();
// My Client
extern playerData myPlayerData;
// All clients
extern playerData allClients[MAX_LOBBYSIZE];
// All enemies
extern enemyData allEnemies[MAX_ENEMIES];
class ClientGame
{
public:
// Constructor
ClientGame();
// Constructor
// Connect to the server on ipAddress and port
ClientGame(const char ipAddress[39], char port[5]);
// Destructor
~ClientGame();
// Update the client with server data.
void updateClient();
// Disconnect from the server.
void disconnect();
// Update the playerdata of own player
void setPlayerData(Player &player);
// Update the player with specified playerData
void getPlayerData(Player &player, int index);
// Update the player of own playerData
void getPlayerData(Player &player);
// Update the enemy with specified enemyData index
void getEnemyData(Enemy &enem, int index);
// Send playerData to the server.
// This function is only to be send during the game
void sendPlayerData();
// Send a lobbyUpdate packet to the server
// This function is only to be send during the lobby
void sendLobbyUpdate();
// Send an heartbeat response packet to the server
void sendHeartbeatPacket();
// Add an actionType to the next packet send to the server.
void addActionType(actionTypes type);
bool hasActionType();
// Get the network error.
// Resets to 0 after call
std::vector<networkingErrors> getErrors();
// ClientNetwork that controls the connection to the server.
ClientNetwork* network;
bool gameStarting,
gameStarted;
bool networkConnected;
// The startTimer
float lobbyTimer;
// My Client
playerData myPlayerData;
// All clients
playerData allClients[MAX_LOBBYSIZE];
// All enemies
enemyData allEnemies[MAX_ENEMIES];
// The actual lobbysize
unsigned int actualLobbySize;
private:
// Error checking
std::vector<networkingErrors> errors;
// Network buffer
char network_data[MAX_PACKET_SIZE];
// Action types to be send in next packet
std::vector<actionTypes> nextActionTypes;
// My ClientID
unsigned int myClientID;
};
|
3ba9afeb9ea05213c3b4a1375dc5e0db92640ead
|
995def04ef88081ee265cf35bd5997f15cc27847
|
/Source/dataframe.cpp
|
3c667f6b84f1c3ec9f91f235a6b5cac36606a530
|
[] |
no_license
|
sprkrd/rise-implementation
|
f850f386786de014d3583b2cf07fad6877169224
|
cf68697027e5c1de72408dd39b0fdebaa9f4de38
|
refs/heads/master
| 2021-07-24T23:48:47.086633
| 2017-11-03T12:28:01
| 2017-11-03T12:28:01
| 108,530,157
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 11,680
|
cpp
|
dataframe.cpp
|
#include "dataframe.h"
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <set>
namespace rise
{
namespace /* Utils for internal usage */
{
void push_column(std::vector<CsvRow>& table, int column)
{
for (CsvRow& row : table)
{
for (int idx = column+1; idx < row.size(); ++idx)
{
std::swap(row[idx-1], row[idx]);
}
}
}
void intersect(const std::set<int>& s1, const std::set<int>& s2, std::set<int>& intersection)
{
intersection.clear();
const std::set<int>& s1_ = s1.size() < s2.size()? s1 : s2;
const std::set<int>& s2_ = &s1_ != &s1? s1 : s2;
for (int x : s1_)
{
if (s2_.count(x)) intersection.insert(x);
}
}
} /* end anonymous namespace */
Dataframe::Dataframe() {}
Dataframe::Dataframe(const std::string& datafile, const std::string& metafile, char delim)
{
int target_column = read_metadata(metafile);
CsvReader reader(datafile, delim);
std::vector<CsvRow> raw_database;
CsvRow row;
while (reader.next_row(row))
{
if (row.size() != xmeta_.size()+1) throw RiseException("Inconsistent number of columns");
raw_database.push_back(row);
}
/* move target column to last column */
push_column(raw_database, target_column);
/* transform raw data to internal representation */
fill_database(raw_database);
/* fill metainformation about attributes (i.e. domains) */
fill_domains();
}
void Dataframe::init_lu(NDistance type, double q)
{
switch (type)
{
case GODEL: init_godel(); break;
case SVDM: init_svdm(q); break;
case KL: init_kl(); break;
}
}
int Dataframe::get_number_of_missing_values() const
{
int count = 0;
for (const Instance& instance : database_)
{
for (const Attribute::Ptr& value : instance.get_x())
{
if (not value) ++count;
}
}
return count;
}
void Dataframe::shuffle()
{
for (int idx = 0; idx < (int)database_.size(); ++idx)
{
int jdx = rand() % database_.size();
std::swap(database_[idx], database_[jdx]);
}
}
void Dataframe::conditional_probs(int column, std::map<CategoryPair, double>& results) const
{
std::map<std::string, std::set<int>> filt_by_attr;
std::map<std::string, std::set<int>> filt_by_class;
auto ameta = std::dynamic_pointer_cast<NominalAttributeMeta>(xmeta_[column]);
auto cmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(ymeta_);
for (const std::string& attr_value : ameta->get_domain())
{
filter(column, attr_value, filt_by_attr[attr_value]);
}
for (const std::string& class_value : cmeta->get_domain())
{
int y_column = get_number_of_x_attributes() + 1;
filter(y_column, class_value, filt_by_class[class_value]);
}
for (const std::string& attr_value : ameta->get_domain())
{
for (const std::string& class_value : cmeta->get_domain())
{
std::set<int> intersection;
intersect(filt_by_attr[attr_value], filt_by_class[class_value], intersection);
double num = intersection.size();
double den = filt_by_attr[attr_value].size();
results[std::make_pair(attr_value, class_value)] = num/den;
}
}
}
void Dataframe::split(int fold_idx, int k, Dataframe& train, Dataframe& val) const
{
int n_records = get_number_of_records();
int fold_max_size = n_records / k;
int val_start = fold_idx*fold_max_size;
int val_end = fold_idx == k-1? n_records : (fold_idx+1)*fold_max_size;
train.database_.clear();
val.database_.clear();
train.xmeta_ = val.xmeta_ = xmeta_;
train.ymeta_ = val.ymeta_ = ymeta_;
train.database_.reserve(n_records - (val_end - val_start));
val.database_.reserve(val_end - val_start);
for (int idx = 0; idx < val_start; ++idx)
{
train.database_.push_back(database_[idx]);
}
for (int idx = val_end; idx < n_records; ++idx)
{
train.database_.push_back(database_[idx]);
}
for (int idx = val_start; idx < val_end; ++idx)
{
val.database_.push_back(database_[idx]);
}
}
std::string Dataframe::to_str() const
{
std::ostringstream oss;
int n_records = get_number_of_records();
int n_attr = get_number_of_x_attributes();
int n_missing = get_number_of_missing_values();
double p_missing = (100.0*n_missing)/(n_records*n_attr);
oss << "#Records: " << n_records << '\n'
<< "#Attributes: " << n_attr << " + 1 target class\n"
<< "#Missing values: " << n_missing << " (" << p_missing << "%)\n"
<< "Attributes' description:\n";
for (int idx = 0; idx < n_attr; ++idx)
{
oss << " " << (idx+1) << ". " << *xmeta_[idx] << '\n';
}
oss << " " << (n_attr+1) << ". " << *ymeta_ << " (target) \n";
if (database_.size() < 25)
{
oss << "Database:\n";
for (const Instance& instance : database_)
{
oss << instance << '\n';
}
}
else
{
oss << "Database excerpt:\n"
<< database_[0] << '\n'
<< database_[1] << '\n'
<< "...\n"
<< database_.back();
}
return oss.str();
}
int Dataframe::read_metadata(const std::string& metafile)
{
std::ifstream in(metafile);
if (not in) throw RiseException(std::string("Cannot read metafile: ") + metafile);
int n_columns;
if (not (in >> n_columns)) throw RiseException("Cannot read number of columns from metafile");
if (n_columns < 2) throw RiseException("There must be at least two columns");
std::vector<AttributeMeta::Ptr> all_meta(n_columns);
for (int idx = 0; idx < n_columns; ++idx)
{
std::string attr_type, attr_name;
if (not (in >> attr_type >> attr_name))
{
throw RiseException("The metafile does not define all the attributes");
}
if (attr_type == "Real")
{
all_meta[idx] = std::make_shared<RealAttributeMeta>(attr_name);
}
else if (attr_type == "Nominal")
{
all_meta[idx] = std::make_shared<NominalAttributeMeta>(attr_name);
}
else
{
throw RiseException(std::string("Unknown attribute type: ") + attr_type +
" (must be either \"Real\" or \"Nominal\")");
}
}
std::string target_attribute;
int target_column = -1;
if (not (in >> target_attribute)) throw RiseException("Cannot read target attribute");
for (int idx = 0; idx < all_meta.size(); ++idx)
{
if (all_meta[idx]->get_name() == target_attribute)
{
target_column = idx;
ymeta_ = all_meta[idx];
}
else xmeta_.push_back(all_meta[idx]);
}
if (target_column < 0)
{
throw RiseException(std::string("Cannot find target's name: ") + target_attribute);
}
if (not std::dynamic_pointer_cast<NominalAttributeMeta>(ymeta_))
{
throw RiseException(std::string("Specified target attribute (") + target_attribute +
") is not nominal");
}
return target_column;
}
void Dataframe::fill_database(const std::vector<CsvRow>& raw_data)
{
database_.reserve(raw_data.size());
for (const CsvRow& row : raw_data)
{
int idx = database_.size();
std::vector<Attribute::Ptr> x;
x.reserve(xmeta_.size());
Attribute::Ptr y = NominalAttribute::create(row.back());
for (int idx = 0; idx < xmeta_.size(); ++idx)
{
if (std::dynamic_pointer_cast<RealAttributeMeta>(xmeta_[idx]))
{
x.push_back(RealAttribute::create(row[idx]));
}
else
{
x.push_back(NominalAttribute::create(row[idx]));
}
}
database_.push_back(Instance(idx, x, y));
}
}
void Dataframe::fill_domains()
{
for (int column = 0; column < xmeta_.size()+1; ++column)
{
AttributeMeta::Ptr& meta = column < xmeta_.size()? xmeta_[column] : ymeta_;
if (auto nmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(meta))
{
std::set<std::string> domain_set;
for (const Instance& instance : database_)
{
const Attribute::Ptr& attr = column < xmeta_.size()? instance.get_x()[column] :
instance.get_y();
auto nattr = std::dynamic_pointer_cast<NominalAttribute>(attr);
if (nattr) domain_set.insert(nattr->get_category());
}
nmeta->set_domain(domain_set);
}
else if (auto rmeta = std::dynamic_pointer_cast<RealAttributeMeta>(meta))
{
double lo = std::numeric_limits<double>::infinity();
double up = -lo;
for (const Instance& instance : database_)
{
const Attribute::Ptr& attr = column < xmeta_.size()? instance.get_x()[column] :
instance.get_y();
auto rattr = std::dynamic_pointer_cast<RealAttribute>(attr);
if (rattr)
{
double number = rattr->get_number();
if (number < lo) lo = number;
if (number > up) up = number;
}
}
rmeta->set_lower_bound(lo);
rmeta->set_upper_bound(up);
}
}
}
void Dataframe::filter(int column, const std::string& category, std::set<int>& instances) const
{
instances.clear();
int nx_columns = get_number_of_x_attributes();
for (int idx = 0; idx < database_.size(); ++idx)
{
const Attribute::Ptr& attribute = column < nx_columns?
database_[idx].get_x()[column] : database_[idx].get_y();
if (auto nattr = std::dynamic_pointer_cast<NominalAttribute>(attribute))
{
if (nattr->get_category() == category) instances.insert(idx);
}
}
}
void Dataframe::init_godel()
{
for (const auto& meta : xmeta_)
{
if (auto nmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(meta))
{
std::map<CategoryPair, double> lu;
for (const std::string& v1 : nmeta->get_domain())
{
for (const std::string& v2 : nmeta->get_domain())
{
lu[std::make_pair(v1, v2)] = v1 == v2? 0 : 1;
}
}
nmeta->set_lookup(lu);
}
}
}
void Dataframe::init_svdm(double q)
{
for (int idx = 0; idx < xmeta_.size(); ++idx)
{
if (auto nmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(xmeta_[idx]))
{
auto cmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(ymeta_);
std::map<CategoryPair, double> lu;
std::map<CategoryPair, double> cp;
conditional_probs(idx, cp);
for (const std::string& v1 : nmeta->get_domain())
{
for (const std::string& v2 : nmeta->get_domain())
{
auto v = std::make_pair(v1, v2);
for (const std::string& c : cmeta->get_domain())
{
auto p1 = std::make_pair(v1,c);
auto p2 = std::make_pair(v2,c);
lu[v] += std::pow(std::fabs(cp[p1]-cp[p2]), q);
}
lu[v] /= cmeta->get_domain().size();
}
}
nmeta->set_lookup(lu);
}
}
}
void Dataframe::init_kl()
{
for (int idx = 0; idx < xmeta_.size(); ++idx)
{
if (auto nmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(xmeta_[idx]))
{
auto cmeta = std::dynamic_pointer_cast<NominalAttributeMeta>(ymeta_);
std::map<CategoryPair, double> lu;
std::map<CategoryPair, double> cp;
conditional_probs(idx, cp);
for (const std::string& v1 : nmeta->get_domain())
{
for (const std::string& v2 : nmeta->get_domain())
{
auto v = std::make_pair(v1, v2);
for (const std::string& c : cmeta->get_domain())
{
auto p1 = std::make_pair(v1,c);
auto p2 = std::make_pair(v2,c);
if (cp[p1] > 0)
{
if (cp[p2] > 0) lu[v] -= cp[p1]*std::log2(cp[p2]/cp[p1]);
else
{
lu[v] = std::numeric_limits<double>::infinity();
break;
}
}
}
lu[v] = (1 - std::exp(-lu[v]))/(1 + std::exp(-lu[v]));
}
}
nmeta->set_lookup(lu);
}
}
}
} /* end namespace rise */
|
13183ec8b9560c195398b96abad700765d5c3fef
|
51e708d16e5f64eaf0bc637d707e24d47b7c5467
|
/cpp/leetcode/array/27.cpp
|
db54ef91d5578a43d83cc77c6659726a51923374
|
[] |
no_license
|
zhufangda/Exercise
|
214c03b180aa0e80f0a8a5c5478e17949782e763
|
c03c127187080005ce3ea9affffbd18e82479ec7
|
refs/heads/master
| 2023-06-18T19:31:26.157519
| 2023-06-15T10:56:56
| 2023-06-15T10:56:56
| 140,619,580
| 0
| 0
| null | 2020-10-13T17:43:59
| 2018-07-11T19:26:56
|
Jupyter Notebook
|
UTF-8
|
C++
| false
| false
| 987
|
cpp
|
27.cpp
|
#include <vector>
#include "common/print.h"
// 27. Remove Element
int removeElement(std::vector<int>& nums, int val) {
auto end = -1; // index of last elemet for new array
int size = 0;
for(int i=0; i< nums.size(); i++){
if(nums[i]==val){
continue;
}
end++;
nums[end] = nums[i];
size ++;
}
return size;
}
int main(){
std::vector<int> input {1,2,3,4,5,6,6,7,8};
int size = removeElement(input, 6);
PrintContainer(input);
std::cout << "size = " << size << std::endl;;
input = {};
size = removeElement(input, 6);
PrintContainer(input);
std::cout << "size = " << size << std::endl;;
input = {0,0,0,0,0,0};
size = removeElement(input, 0);
PrintContainer(input);
std::cout << "size = " << size << std::endl;;
input = {2,0,6,7,0,1};
size = removeElement(input, 0);
PrintContainer(input);
std::cout << "size = " << size << std::endl;;
return 1;
}
|
3f7d7094cde1742a6c96e6ea94db029540ea92ef
|
c502c8d4780c30060aea0fbd82c79eae0a632ddd
|
/Node.cpp
|
a364591549e6d1075ecbfb6d59f2f6da8c20f68c
|
[] |
no_license
|
LordHoboDojo/project2
|
54e58d6443abe7747ceb37617faa4d591ff5f7d6
|
d9fa737121cb86e0af0cffc20d562b2d7e49b61d
|
refs/heads/master
| 2022-12-28T05:14:24.351281
| 2020-10-12T19:56:58
| 2020-10-12T19:57:47
| 301,248,878
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 68
|
cpp
|
Node.cpp
|
//
// Created by Shaunak Kulkarni on 10/4/20.
//
#include "Node.h"
|
5724f948d8d5043fbdfa1729bd73f99bc156367f
|
23219fbe8197fb0abc12e491e067b49764b59ae2
|
/Mapper/StreamMgr.cpp
|
418c43b5101688462d714b0e16253bbdc63d2007
|
[] |
no_license
|
kooiot/rdc
|
d5332f7a8a1f58cede8c518a332bdb0cf354d943
|
a2809c339f41aecfe097a72336ffdd6df741c783
|
refs/heads/master
| 2020-05-21T13:29:54.148866
| 2016-11-28T14:18:13
| 2016-11-28T14:18:13
| 61,816,205
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,923
|
cpp
|
StreamMgr.cpp
|
#include "StreamMgr.h"
#include <cassert>
#include "SerialStream.h"
#include "TestStream.h"
#include "PluginStream.h"
#include "NetStream.h"
extern CPluginLoader g_PluginLoader;
class AutoLock {
public:
std::mutex & m_Lock;
AutoLock(std::mutex& lock) : m_Lock(lock) {
m_Lock.lock();
}
~AutoLock() {
m_Lock.unlock();
}
};
StreamMgr::StreamMgr(uv_loop_t * uv_loop)
: m_UVLoop(uv_loop), m_ClientHost(NULL), m_pThread(NULL), m_bAbort(false)
{
memset(m_Peers, 0, sizeof(ENetPeer*) * RC_MAX_CONNECTION);
memset(m_StreamServers, 0, sizeof(StreamProcess*) * RC_MAX_CONNECTION);
}
StreamMgr::~StreamMgr()
{
}
bool StreamMgr::Init()
{
m_bAbort = false;
m_ClientHost = enet_host_create(NULL, RC_MAX_CONNECTION, RC_MAX_CONNECTION + 1, 0, 0);
if (m_ClientHost == NULL)
{
fprintf(stderr,
"An error occurred while trying to create an ENet client host.\n");
return false;
}
m_pThread = new std::thread([this]() {
ENetEvent event;
while (!m_bAbort) {
if (enet_host_service(m_ClientHost, &event, 500) > 0)
{
switch (event.type)
{
case ENET_EVENT_TYPE_CONNECT:
printf("Connection to %d:%d succeeded.\n",
event.peer->address.host,
event.peer->address.port);
OnConnected(event.peer);
break;
case ENET_EVENT_TYPE_RECEIVE:
printf("A packet of length %llu was received from %ld on channel %u.\n",
event.packet->dataLength,
(long)event.peer->data,
event.channelID);
//putc('+', stderr);
OnData(event.peer, event.channelID, event.packet->data, event.packet->dataLength);
/* Clean up the packet now that we're done using it. */
enet_packet_destroy(event.packet);
break;
case ENET_EVENT_TYPE_DISCONNECT:
printf("ENet peer disconnected, count %ld event.data %d.\n", (long)event.peer->data, event.data);
OnDisconnected(event.peer);
}
}
ProcessPending();
}
enet_host_destroy(m_ClientHost);
});
m_PortMgr.Init();
return true;
}
bool StreamMgr::Close()
{
// TODO: Close all connections
m_bAbort = true;
if (m_pThread && m_pThread->joinable())
m_pThread->join();
return false;
}
bool StreamMgr::OnConnected(ENetPeer * peer)
{
fprintf(stdout, "ENet Peer connected!.\n");
AutoLock lock(m_Lock);
std::map<ENetPeer*, std::list<IStreamPort*>>::iterator ptr = m_PendingPorts.find(peer);
if (ptr == m_PendingPorts.end())
return true;
std::list<IStreamPort*>::iterator lptr = ptr->second.begin();
for (; lptr != ptr->second.end(); ++lptr) {
(*lptr)->Open();
}
m_PendingPorts.erase(peer);
return true;
}
void StreamMgr::OnDisconnected(ENetPeer * peer)
{
StreamProcess sp;
int nIndex = -1;
{
AutoLock lock(m_Lock);
for (int i = 0; i < RC_MAX_CONNECTION; ++i) {
if (m_Peers[i] == peer) {
nIndex = i;
memcpy(&sp, m_StreamServers[i], sizeof(StreamProcess));
break;
}
}
}
if (nIndex == -1) {
return;
}
for (int i = 0; i < RC_MAX_CONNECTION; ++i) {
Destroy(sp, i);
}
}
bool StreamMgr::OnData(ENetPeer* peer, int channel, void * data, size_t len)
{
if (channel == RC_MAX_CONNECTION) {
return true;
}
AutoLock lock(m_Lock);
std::pair<ENetPeer*, int> key = std::make_pair(peer, channel);
PeerChannel2PortMap::iterator ptr = m_PeerChannel2Port.find(key);
if (ptr == m_PeerChannel2Port.end()) {
fprintf(stderr, "No StreamPort for enet peer channel.\n");
return false;
}
IStreamPort* port = ptr->second;
int rc = port->OnClientData(data, len);
if (rc < 0)
return false;
return true;
}
//bool StreamMgr::OnEvent(StreamEvent event)
//{
// return false;
//}
int StreamMgr::Create(const StreamProcess& StreamServer, const ConnectionInfo & info)
{
AutoLock lock(m_Lock);
int i = 0;
// Search for same enet connection
for (; i < RC_MAX_CONNECTION; ++i) {
if (m_StreamServers[i] == NULL)
continue;
if (m_StreamServers[i]->Index == StreamServer.Index
&& 0 == strcmp(m_StreamServers[i]->StreamIP, StreamServer.StreamIP)
&& m_StreamServers[i]->Port == StreamServer.Port)
{
break;
}
}
// Search for free enet peer
if (i >= RC_MAX_CONNECTION) {
i = 0;
for (; i < RC_MAX_CONNECTION; ++i) {
if (m_Peers[i] == NULL)
break;
}
}
if (i >= RC_MAX_CONNECTION) {
fprintf(stderr, "Rearch max connection!!!.\n");
return -1;
}
ENetPeer* peer = NULL;
if (m_StreamServers[i] == NULL) // New Connection
{
ENetAddress address;
enet_address_set_host(&address, StreamServer.StreamIP);
address.port = StreamServer.Port;
int nData = ((MAPPER_TYPE & 0xFFFF) << 16) + (StreamServer.Index & 0xFFFF);
peer = enet_host_connect(m_ClientHost, &address, RC_MAX_CONNECTION + 1, nData);
if (peer == NULL)
{
fprintf(stderr,
"No available peers for initiating an ENet connection.\n");
return -1;
}
long& count = *(long*)&peer->data;
count = 1;
m_StreamServers[i] = new StreamProcess(StreamServer);
m_Peers[i] = peer;
}
else
{
// The connection is built and used by other channel.
peer = m_Peers[i];
long& count = *(long*)&peer->data;
count++;
}
IStreamPort* pPort = NULL;
StreamPortInfo spi;
spi.Mgr = this;
spi.ConnInfo = info;
spi.Peer = peer;
spi.Mask = StreamServer.Mask;
switch (info.Type) {
case CT_SERIAL:
pPort = new SerialStream(spi);
printf("Serial Port\n");
break;
case CT_TCPC:
case CT_TCPS:
case CT_UDP:
pPort = new NetStream(m_PortMgr, spi);
printf("UDP Port\n");
break;
case CT_PLUGIN:
pPort = new PluginStream(g_PluginLoader, spi);
printf("Plugin Port\n");
break;
default:
pPort = new TestStream(spi);
printf("Test Port\n");
break;
}
if (!pPort) {
return -1;
}
if (peer->state != ENET_PEER_STATE_CONNECTED) {
printf("Add Pending Port\n");
m_PendingPorts[peer].push_back(pPort);
}
else {
printf("Open Port\n");
pPort->Open();
}
m_PortInfo[pPort] = info;
m_PeerChannel2Port[std::make_pair(peer, info.Channel)] = pPort;
return 0;
}
int StreamMgr::Destroy(const StreamProcess& StreamServer, int channel)
{
AutoLock lock(m_Lock);
for (int i = 0; i < RC_MAX_CONNECTION; ++i) {
if (m_StreamServers[i] == NULL)
continue;
if (m_StreamServers[i]->Index == StreamServer.Index
&& 0 == strcmp(m_StreamServers[i]->StreamIP, StreamServer.StreamIP)
&& m_StreamServers[i]->Port == StreamServer.Port)
{
IStreamPort* pPort = m_PeerChannel2Port[std::make_pair(m_Peers[i], channel)];
if (pPort) {
m_PendingClosePorts.push_back(pPort);
return 0;
}
break;
}
}
return -1;
}
int StreamMgr::CloseStream(IStreamPort * port)
{
AutoLock lock(m_Lock);
m_PendingClosePorts.push_back(port);
return 0;
}
int StreamMgr::_CloseStream(IStreamPort * port)
{
port->Close();
PeerChannel2PortMap::iterator ptr = m_PeerChannel2Port.begin();
for (; ptr != m_PeerChannel2Port.end(); ++ptr) {
if (ptr->second == port) {
break;
}
}
if (ptr != m_PeerChannel2Port.end()) {
int index = 0;
for (; index < RC_MAX_CONNECTION; ++index) {
if (m_Peers[index] == ptr->first.first) {
long& count = *(long*)&m_Peers[index]->data;
count--;
if (count <= 0) {
m_PendingClose.push_back(index);
}
}
}
m_PeerChannel2Port.erase(ptr);
m_PortInfo.erase(port);
}
m_PendingDelete.push_back(port);
return 0;
}
int StreamMgr::ProcessPending()
{
AutoLock lock(m_Lock);
std::list<int>::iterator ptr = m_PendingClose.begin();
for (; ptr != m_PendingClose.end(); ++ptr) {
int i = *ptr;
if (!m_Peers[i]) {
printf("What happed!!! my GOD!!!!\n");
if (m_StreamServers[i]) {
printf("StreamServer[i] is not empty\n");
}
continue;
}
enet_peer_disconnect_later(m_Peers[i], 0);
delete m_StreamServers[i];
m_StreamServers[i] = NULL;
m_Peers[i] = NULL;
}
m_PendingClose.clear();
std::list<IStreamPort*>::iterator pp = m_PendingDelete.begin();
for (; pp != m_PendingDelete.end(); ++pp) {
delete *pp;
}
m_PendingDelete.clear();
for (auto & pPort : m_PendingClosePorts) {
_CloseStream(pPort);
}
m_PendingClosePorts.clear();
return 0;
}
|
5f8171414dc6654c720d35ee91bb3a105810e035
|
5c09a68e01be442e7184e8a40b32305504ad3aae
|
/plugins/sample/sample-mutator-context/mutator-context.cpp
|
e5c0cf696b63ba8066cb36f086df9b9d70a979e9
|
[] |
no_license
|
jakobluettgau/feign
|
8178ff99d7fb3da6abc97f5a9715ccffed9ae040
|
0c735283923253a6cb51a28fe4d3299cc2a2a86f
|
refs/heads/master
| 2016-09-10T14:59:51.370767
| 2015-03-06T12:18:01
| 2015-03-06T12:18:01
| 17,636,101
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,375
|
cpp
|
mutator-context.cpp
|
#include <stdio.h>
#include <list>
#include <feign.h>
// some data
////////////
// Activity: { status , provider , offset , layer , size , data* , stats* }
Activity a0 = { 0 , -1 , 1 , 5 , 0 , NULL , NULL }; // sample
// provide some information about the plugin
////////////////////////////////////////////
Plugin plugin = {
.name = "sample-mutator-context",
.version = NULL,
.intents = FEIGN_MUTATOR_CONTEXT,
};
// implement handlers
/////////////////////
Plugin * init() {
// do some initialisation
printf("Hello sample plugin!\n");
// return plugin
return &plugin;
}
int mutate_context(std::list<Activity*>::iterator iter, std::list<Activity*>::iterator end, std::list<Activity*> list) {
CDEBUG("mutate_context");
Activity * activity = (*iter);
int check_num = 5;
int last = NULL;
while ( iter != end && check_num > 0 )
{
printf("m: activity->layer = %d, check_num = %d\n", activity->layer, check_num);
last = activity->layer;
iter++;
/*
activity = (*iter);
// insert after 4 if not followed by 5
if ( last == 4 && activity->layer != 5 ) {
list.insert(iter, &a0);
}
*/
check_num--;
}
//activity = (*it);
//printf("f: activity->layer = %d\n", activity->layer);
/*
if ( activity->layer == 1 )
return NULL;
else
return activity;
*/
return 0;
}
int finalize() {
return 0;
}
|
751d13c80a0e2300604fc1263ee6d0589ac9d830
|
1e1b3f702bdf6c0544ae27a321c8ebe605434ee4
|
/Chapter6/Sample127/FindDlgDemo/FindDlgDemoDlg.h
|
8841e08f2b37c5b4253db6af315382fdf7b18eb5
|
[] |
no_license
|
Aque1228556367/Visual_Cpp_By_Example
|
63e3d67e734b7d95385a329e4a1641e7b1727084
|
41f903d8c9938e7800d89fcff31b182bfc1c4f45
|
refs/heads/master
| 2021-03-12T20:36:56.780300
| 2015-05-08T02:05:46
| 2015-05-08T02:05:46
| 35,171,152
| 2
| 2
| null | null | null | null |
GB18030
|
C++
| false
| false
| 1,538
|
h
|
FindDlgDemoDlg.h
|
// FindDlgDemoDlg.h : header file
//
#if !defined(AFX_FINDDLGDEMODLG_H__DDC59574_D290_4471_BC7F_B7B2E44C86A2__INCLUDED_)
#define AFX_FINDDLGDEMODLG_H__DDC59574_D290_4471_BC7F_B7B2E44C86A2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CFindDlgDemoDlg dialog
class CFindDlgDemoDlg : public CDialog
{
// Construction
public:
CFindDlgDemoDlg(CWnd* pParent = NULL); // standard constructor
CFindReplaceDialog *pFindReplaceDlg; //查找替换对话框
int pos;//记录查找字符串位置
int curpos;
// Dialog Data
//{{AFX_DATA(CFindDlgDemoDlg)
enum { IDD = IDD_FINDDLGDEMO_DIALOG };
CEdit m_ctlEdit;
CString m_str;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFindDlgDemoDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
afx_msg LRESULT OnFindReplace(WPARAM, LPARAM lParam);//回调函数
// Generated message map functions
//{{AFX_MSG(CFindDlgDemoDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnFind();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FINDDLGDEMODLG_H__DDC59574_D290_4471_BC7F_B7B2E44C86A2__INCLUDED_)
|
3cdb49fb36f3fb73065fe7cbbba8bf5bf7915f85
|
49056ae6d866d98f09cf50014cf2ae9533b469f4
|
/程序设计/应该正确的 (1).cpp
|
ed41674724312096bfa748e1bd0f61c5008cffbd
|
[] |
no_license
|
Benjaminyuan/HUST-CS
|
50efdf32d957b6194fd91b056edd70840a28e2bf
|
469ffd0f2bc0c4ce32c30f5cfc0c85662b2265aa
|
refs/heads/master
| 2021-01-05T01:01:39.895010
| 2020-05-07T12:23:00
| 2020-05-07T12:23:00
| 240,821,436
| 2
| 0
| null | 2020-03-30T15:52:06
| 2020-02-16T02:50:51
|
C++
|
UTF-8
|
C++
| false
| false
| 48,248
|
cpp
|
应该正确的 (1).cpp
|
#pragma warning(disable:4996)
#pragma warning(disable:6031)
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<time.h>
#include<algorithm>
using namespace std;
#define TRUE 1
#define FALSE 0
#define OK 2
#define ERROR -1
int* value;//记录变元的值
int* occurtimes;//记录变元出现次数
int* backtrack;//记录是否访问过变元
int* positivetimes; //记录变元出现的正状态次数
int* negativetimes;//记录变元出现的负状态次数
int linenumbers;//记录子句的行数
int variablenumbers;//记录初始文字的种类数
typedef struct Node {
int name;
struct Node* next;
}Node;//邻接表的节点,用于记录文字
typedef struct Line {
struct Node* firstnode;//指向第一个邻接的节点
struct Line* nextline;//指向下一行子句
}Line;
typedef struct ShuduLine {
int v[9][9];
struct ShuduLine* next;
}ShuduLine;
Line* CreatCNF(char* cnfpath)
{
Line* cnf = (Line*)malloc(sizeof(Line));
cnf->firstnode = NULL; cnf->nextline = NULL;//初始化
FILE* fp;
fp = fopen(cnfpath, "r");
if (fp == NULL) {
printf("打开失败\n");
return NULL;
}
char x;//用于储存读取到的信息
while ((x = fgetc(fp)) == 'c')
{
while ((x = fgetc(fp)) != '\n')
; //跳过注释部分
}
int i, k;
for (i = 0; i < 5; i++) {
x = fgetc(fp);
}//移动到行数和变元数
fscanf(fp, "%d", &variablenumbers);
fscanf(fp, "%d", &linenumbers);
//对相关信息进行初始化
value = (int*)calloc(variablenumbers + 1, sizeof(int));
occurtimes = (int*)calloc(variablenumbers + 1, sizeof(int));
backtrack = (int*)calloc(variablenumbers + 1, sizeof(int));
for (i = 0; i < variablenumbers + 1; i++) {
backtrack[i] = 0;//0代表还未访问,1代表已经访问
}
positivetimes = (int*)calloc(variablenumbers + 1, sizeof(int));
negativetimes = (int*)calloc(variablenumbers + 1, sizeof(int));
//到此截止
Node* head1, * tail1, * p;
Line* tail2, * q;
tail2 = cnf;
for (i = 0; i < linenumbers; i++) {
fscanf(fp, "%d", &k);
if (k != 0) {
head1 = (Node*)malloc(sizeof(Node));
if (head1 == NULL) {
printf("分配空间错误\n");
return NULL;
}
head1->name = k;
head1->next = NULL;
occurtimes[abs(k)]++;
if (k > 0) positivetimes[abs(k)]++;
else negativetimes[abs(k)]++;
tail1 = head1;
}//创建第一个结点
else continue;
while (fscanf(fp, "%d", &k) && k != 0) {
p = (Node*)malloc(sizeof(Node));
if (p == NULL) {
printf("分配空间错误\n");
return NULL;
}
p->name = k;
p->next = NULL;
occurtimes[abs(k)]++;
if (k > 0) positivetimes[abs(k)]++;
else negativetimes[abs(k)]++;
tail1->next = p;
tail1 = p;
}
//将生成的链表连接到表头节点上
if (i == 0) {//第一行时特殊处理
cnf->firstnode = head1;
cnf->nextline = NULL;
}
else {
q = (Line*)malloc(sizeof(Line));
if (q == NULL) {
printf("空间分配错误\n");
return NULL;
}
q->firstnode = head1;
q->nextline = NULL;
tail2->nextline = q;
tail2 = q;
}
}
fclose(fp);
return cnf;
}
void DesplayFile(Line* s)
/*用于展示所读取CNF文件的数值*/
{
Line* linep;
Node* nodep;
int count = 0;
if (s == NULL) {
printf("子句集为空\n");
return;
}
linep = s;
while (linep) {
nodep = linep->firstnode;
printf("%d:", ++count);
while (nodep) {
printf("%d ", nodep->name);
nodep = nodep->next;
}
putchar('\n');
linep = linep->nextline;
}
putchar('\n');
}
void AnalyzeFile(Line* s)
/*对文件进行解析*/
{
Line* linep;
Node* nodep;
int count;
if (s == NULL) {
printf("子句集为空\n");
return;
}
linep = s;
while (linep) {
count = 0;//初始化
nodep = linep->firstnode;
while (nodep) {
if (count == 0) {
if (nodep->name > 0)
printf("%d ", nodep->name);
else
printf("!%d ", abs(nodep->name));
}
else {
if (nodep->name > 0)
printf("V %d ", nodep->name);
else
printf("V !%d", abs(nodep->name));
}
count++;
nodep = nodep->next;
}
putchar('\n');
linep = linep->nextline;
}
}
int JudgeSingle(Line* s, int* positivetimes, int* negativetimes)
/*判断子句集中是否存在单子句子,若存在单子句,
则返回出现次数最多的单子句;若不存在单子句,则返回0*/
{
int max;//用于记录单子句的正负乘积出现次数的最大值
Line* linep = s;
typedef struct record {
int name;
struct record* next;
}record;//将子句集中的单子句用链表串联记录
record* head, * tail, * p, * q;
head = (record*)malloc(sizeof(record));//为了方便,以有头结点的链表进行储存
if (head == NULL) {
printf("分配空间失败\n");
return ERROR;
}
head->next = NULL;
tail = head;
if (s == NULL) {//子句集为空,不存在单子句
return 0;
}
while (linep)
{
if (linep->firstnode != NULL)
{//当读取到的子句不是空子句时
if (linep->firstnode->next == NULL)//说明该子句是单子句
{
p = (record*)malloc(sizeof(record));
if (p == NULL) {
printf("分配空间错误\n");
return ERROR;
}
p->name = linep->firstnode->name;
p->next = NULL;
tail->next = p;
tail = p;
//将单子句放到链表中记录
}
}
linep = linep->nextline;
}
if (head->next == NULL) {//说明没有单子句
return 0;
}
p = head->next;
max = -1;
int recordName = 0;
while (p)
{
if (p->name > 0) {//当为文字为正时
if (positivetimes[p->name] > max) {
max = positivetimes[p->name];
recordName = p->name;
}
}
else {//当文字为负时
if (negativetimes[abs(p->name)] > max) {
max = negativetimes[abs(p->name)];
recordName = p->name;
}
}
p = p->next;
}//以上进行完后,recordName储存的是出现次数最多的文字
/*销毁为了记录单子句而建立的链表*/
if (head->next == NULL)
free(head);
else
{
p = head->next;
q = p->next;
while (p)
{
free(p);
p = q;
if (p) q = p->next;
}
free(head);
}
return recordName;
}
bool JudgeEmptyGather(Line* s)
/*判断子句集是否为空*/
{
if (s == NULL)
return 1;
else return 0;
}
bool JudgeEmptyWords(Line* s)
/*判断是否存在空子句*/
{
Line* p;
if (s == NULL) {//子句集为空,没有空子句
return 0;
}
p = s;
while (p)
{
if (p->firstnode == NULL)
return 1;
p = p->nextline;
}
return 0;
}
int InsertVariable(Line*& s, int xname, int* positivetimes, int* negativetimes, int* occurtimes)
/*向子句集中插入单个变元*/
{
//将该变元插入子句集中
Line* linep;
Node* nodep;
nodep = (Node*)malloc(sizeof(Node));
if (nodep == NULL) {
printf("分配空间失败\n");
return ERROR;
}
nodep->name = xname; nodep->next = NULL;
linep = (Line*)malloc(sizeof(Line));
if (linep == NULL) {
printf("分配空间失败\n");
return ERROR;
}
linep->firstnode = nodep;
linep->nextline = s;
s = linep;
//插入操作到此为止,下面需要更改记录子句集信息的数组的值
//根据DPLL算法的具体情况,插入的文字只能是子句集中已有的文字
//因此省略插入新文字的情况
occurtimes[abs(xname)]++;
if (xname > 0)
{
positivetimes[xname]++;
}
else {
negativetimes[abs(xname)]++;
}
linenumbers++;
return OK;
}
void DelLine(Line*& s, Line* p, int* positivetimes, int* negativetimes, int* occurtimes)
/*从子句集s中删除指定的子句p*/
{
Node* nodep1 = NULL, * nodep2 = NULL;
Line* linep;
if (s == NULL) {
printf("子句集为空\n");
return;
}
if (s == p)
{//说明要删除的是第一条子句,需要特殊处理
nodep1 = p->firstnode;
if (nodep1 != NULL)
nodep2 = nodep1->next;
while (nodep1)
{//删除表结点
occurtimes[abs(nodep1->name)]--;//总的出现次数
if (nodep1->name > 0) {//正值或者负值出现次数
positivetimes[nodep1->name]--;
}
else {
negativetimes[abs(nodep1->name)]--;
}
free(nodep1);
nodep1 = nodep2;
if (nodep1 != NULL)
nodep2 = nodep1->next;
else
break;
}
s = p->nextline;
free(p);//删除头结点
linenumbers--;
}
else
{//要删除的不是第一条子句
nodep1 = p->firstnode;
if (nodep1 != NULL)
nodep2 = nodep1->next;
while (nodep1) {//删除表结点
occurtimes[abs(nodep1->name)]--;//总的出现次数
if (nodep1->name > 0)
{//正值或者负值出现次数
positivetimes[nodep1->name]--;
}
else
{
negativetimes[abs(nodep1->name)]--;
}
free(nodep1);
nodep1 = nodep2;
if (nodep1 != NULL)
nodep2 = nodep1->next;
else
break;
}//end of while
linep = s;
while (linep->nextline != p)
linep = linep->nextline;//将linep移动到p之前
linep->nextline = p->nextline;
free(p);//删除头结点
linenumbers--;
}//end of else
}
void DelWords(Line*& s, int xname, int* positivetimes, int* negativetimes, int* occurtimes)
/*删除子句集中所有包含单子句xname的子句(包括其本身)*/
{
if (s == NULL) {
printf("S为空集\n");
return;
}
Line* linep1, * linep2;//linep1指向正在检查的行,
//为了保证删除一行后还能找到下一行,需要用line2暂时保存下一行的地址
Node* nodep1;
linep1 = s; linep2 = linep1->nextline;
while (linep1)
{
nodep1 = linep1->firstnode;
while (nodep1)
{
if (nodep1->name == xname)
{
DelLine(s, linep1, positivetimes, negativetimes, occurtimes);//该行子句包含文字xname,需要将该行子句删除
break;
}
else
nodep1 = nodep1->next;
}
//列指针linep1移动到下一行
linep1 = linep2;
if (linep1 != NULL)
{
linep2 = linep1->nextline;
}//end of if
}//end of while
}
void DelWord(Line* s, int xname, int* positivetimes, int* negativetimes, int* occurtimes)
/*删除语句集中包含文字xname的部分(并非是将整个语句都删除,只删除语句中的xname),
与DelWords有区别!!!此操作可能产生空语句!!*/
{
Line* linep; Node* p, * q;
if (s == NULL) {
printf("语句集为空\n");
return;
}
linep = s;
while (linep)
{
q = linep->firstnode;
p = NULL;
while (q)
{
while (q != NULL && q->name != xname)
{
p = q;
q = q->next;
}
if (q && linep->firstnode == q)
{//说明要删除的是首节点
linep->firstnode = q->next;
free(q);
occurtimes[abs(xname)]--;
if (xname > 0) positivetimes[abs(xname)]--;
else negativetimes[abs(xname)]--;
q = linep->firstnode;
}
else
{//要删除的点不是首节点
if (q)
{
p->next = q->next;
free(q);
occurtimes[abs(xname)]--;
if (xname > 0) positivetimes[abs(xname)]--;
else negativetimes[abs(xname)]--;
q = p->next;
}
}
}
linep = linep->nextline;
}
}
void SingleWords(Line*& s, int xname, int* positivetimes, int* negativetimes, int* occurtimes)
/*利用单子句xname进行化简*/
{
value[abs(xname)] = xname > 0 ? 1 : 0;
DelWords(s, xname, positivetimes, negativetimes, occurtimes);/*从S中删除所有包含L的子句,包括单子句本身得到子句集S1.*/
if (JudgeEmptyGather(s) != 1) {//如果子句集S不为空,则对每个子句去掉-xname。
DelWord(s, -xname, positivetimes, negativetimes, occurtimes);
}
}
int SelectVariable(int* backtrack, int* positivetimes, int* negativetimes)
/*基于某种策略选取变元v,策略就是选取剩余文字中出现次数最多的那个,
若返回0,说明不存在文字*/
{
int i, max = -1, c = 0;//max用于记录出现最多的次数,c用于记录相应的文字值
for (i = 1; i < variablenumbers + 1; i++)
{
if (backtrack[i] == 0)
{//说明还未被选中
if (positivetimes[i] > negativetimes[i])
{
if (positivetimes[i] > max) {
max = positivetimes[i];
c = i;
}
}
else
{
if (negativetimes[i] > max) {
max = negativetimes[i];
c = -i;
}
}
}
}
return c;
}
Line* CopyGather(Line* s)
/*比照集合s复制一个集合,返回重新复制集合的头指针*/
{
if (s == NULL) return NULL;
Line* t, * linep1, * linep2, * q;
Node* nodep, * head, * tail, * p;
int i;
t = (Line*)malloc(sizeof(Line));
if (t == NULL) {
printf("分配空间错误\n");
return NULL;
}
t->firstnode = NULL; t->nextline = NULL;
linep2 = t;
linep1 = s;
for (i = 0; linep1 != NULL; i++)
{
head = tail = NULL;
nodep = linep1->firstnode;
//生成第一个表结点需要特殊处理。
if (nodep != NULL)
{//不为空时,生成第一个表结点
head = (Node*)malloc(sizeof(Node));
if (head == NULL) {
printf("分配空间错误\n");
return NULL;
}
head->name = nodep->name;
head->next = NULL;
tail = head;
nodep = nodep->next;
}
while (nodep != NULL)
{//生成完该行的其余表结点
p = (Node*)malloc(sizeof(Node));
if (p == NULL) {
printf("分配空间错误\n");
return NULL;
}
p->name = nodep->name;
p->next = NULL;
tail->next = p;
tail = p;
nodep = nodep->next;
}
//将生成的表结点连接到相应的头结点上
if (i == 0)
{//第一行子句特殊处理
t->firstnode = head;
t->nextline = NULL;
}
else
{
q = (Line*)malloc(sizeof(Line));
if (q == NULL) {
printf("分配空间错误\n");
return NULL;
}
q->firstnode = head;
if (q == NULL) {
printf("分配空间错误\n");
return NULL;
}
q->nextline = NULL;
linep2->nextline = q;
linep2 = q;
}
linep1 = linep1->nextline;
}
return t;
}
int* CopyShuzu(int* old_shuzu)
/*复制数组,如果复制成功则返回新数组的首地址,否则返回空指针*/
{
int* new_shuzu;
int i;
new_shuzu = (int*)malloc((variablenumbers + 1) * sizeof(int));
if (new_shuzu == NULL)
{
printf("分配空间失败\n");
return NULL;
}
for (i = 1; i < variablenumbers + 1; i++)
{
new_shuzu[i] = old_shuzu[i];
}
return new_shuzu;
}
void PrintValue()
{
int i;
for (i = 1; i < variablenumbers + 1; i++)
{
printf("%2d =%2d ", i, value[i]);
if (i % 5 == 0)
{
putchar('\n');
}
}
}
int Seekchunwenzi(Line* S)//找到纯文字
{
int* literal = (int*)calloc(variablenumbers + 1, sizeof(int));
if (literal == NULL)
{
return -2;
}
Line* L = S;
while (L != NULL)
{
Node* c = L->firstnode;
while (c != NULL)
{
int f = literal[abs(c->name)];
if (f == 0)
{
literal[abs(c->name)] = c->name > 0 ? 1 : -1;
}
else if (f == -1 && (c->name) > 0)//此时有多个文字且正负不一致
{
literal[abs(c->name)] = 2;
}
else if (f == 1 && (c->name) < 0)
{
literal[abs(c->name)] = 2;
}
c = c->next;
}
L = L->nextline;
}
int i;
for (i = 1; i < variablenumbers + 1; i++) //遍历找到第一个纯文字
{
if (literal[i] == -1 || literal[i] == 1)
{
int j = literal[i];
free(literal);
return i * j;
}
}
return 0;
}
void DestroyGather(Line* s)
/*清除邻接表内存*/
{
Line* linep1, * linep2;
Node* nodep1, * nodep2;
if (s == NULL)
return;
linep1 = s;
linep2 = linep1->nextline;
while (linep1)
{
nodep1 = linep1->firstnode;
nodep2 = NULL;
if (nodep1 != NULL)
nodep2 = nodep1->next;
while (nodep1)
{
free(nodep1);
nodep1 = nodep2;
if (nodep1)
nodep2 = nodep1->next;
}//删除该行的表结点
linep1 = linep2;
if (linep1)
linep2 = linep1->nextline;
}
}
int xcount = 0;
int DPLL(Line*& s, int* backtrack, int* positivetimes, int* negativetimes, int* occurtimes)
/*DPLL核心算法,s为公式对应的子句集。若其满足,返回TRUE(1);否则返回FALSE(0)。
如果求解过程出现状况,没能最终求解,则返回-1*/
{
int v;
Line* t;
int i;
/*单子句化简规则*/
printf("%-8d\b\b\b\b\b\b\b\b", ++xcount);
while (v = JudgeSingle(s, positivetimes, negativetimes))//若S中存在单子句,则将出现次数最多的单子句赋值给v。
{
SingleWords(s, v, positivetimes, negativetimes, occurtimes);//执行化简
for (i = 1; i < variablenumbers + 1; i++)
{//说明这些变元已经被删除掉了
if (occurtimes[i] == 0)
backtrack[i] = 1;
}
if (JudgeEmptyGather(s))//S为空集,则返回TRUE
{
return TRUE;
}
else if (JudgeEmptyWords(s))//S中有空子句,说明不可满足,返回FALSE
{
return FALSE;
}
}
/*纯文字消除规则*/
while (v = Seekchunwenzi(s))
{
value[abs(v)] = v > 0 ? 1 : 0;
DelWords(s, v, positivetimes, negativetimes, occurtimes);
for (i = 1; i < variablenumbers + 1; i++)
{
if (occurtimes[i] == 0)
backtrack[i] = 1;//代表该变元已经被完全删除
}
if (JudgeEmptyGather(s))//S为空集,则返回TRUE
{
return TRUE;
}
}
//printf("%d\n", ++dpll_count);
//DesplayFile(s);
t = CopyGather(s);
int* newbacktrack, * newpositive, * newnegative, * newoccur;
newbacktrack = CopyShuzu(backtrack);
newpositive = CopyShuzu(positivetimes);
newnegative = CopyShuzu(negativetimes);
newoccur = CopyShuzu(occurtimes);
/*下面是分裂策略*/
v = SelectVariable(backtrack, positivetimes, negativetimes);//选取出现次数最多的变元
if (v == 0)//正常情况下V肯定不会等于0
return -1;
if (InsertVariable(s, v, positivetimes, negativetimes, occurtimes) == ERROR)
{
printf("插入v时出现异常\n");
return -1;
}
//DesplayFile(s);
if (DPLL(s, backtrack, positivetimes, negativetimes, occurtimes) == TRUE)
{
free(newbacktrack);
free(newpositive);
free(newnegative);
free(newoccur);
return TRUE;
}
DestroyGather(s);//清空内存
s = t;
if (InsertVariable(s, -v, newpositive, newnegative, newoccur) == ERROR)
{
printf("插入v时出现异常\n");
return -1;
}
if (DPLL(s, newbacktrack, newpositive, newnegative, newoccur) == TRUE)
{
free(newbacktrack);
free(newpositive);
free(newnegative);
free(newoccur);
return TRUE;
}
return -1;
}
int TestCorrect(Line* s)
/*根据已生成的value表测试语句集是否已经满足*/
{
Line* linep = s;
Node* nodep;
int count1, count2;
count1 = count2 = 0;
if (s == NULL)
{
printf("子句集为空\n");
return ERROR;
}
while (linep)
{
nodep = linep->firstnode;
while (nodep)
{
if (nodep->name > 0)
{
if (value[nodep->name] == 1)
{
count1++; break;//如果发现该行有一个文字为正则说明该行成立
} //count1用来计数成立的行数
}
else
{
if (value[abs(nodep->name)] == 0)
{
count1++; break;
}
}
nodep = nodep->next;
}
count2++;//count2用来记录总行数
linep = linep->nextline;
}
if (count2 == count1) {
printf("\n经检验,value表可以使得子句集成立\n");
return OK;
}
else {
printf("value表错误\n");
return ERROR;
}
}
void ChangeName(char* filename)
/*改变文件名字的后缀*/
{
int i;
for (i = 0; filename[i] != '.'; i++)
;
filename[++i] = 'r';
filename[++i] = 'e';
filename[++i] = 's';
}
int StoreToFile(char* filename, int status, double time)
{
FILE* fp;
int i;
fp = fopen(filename, "w");
if (fp == NULL)
{
printf("文件创建失败\n");
return ERROR;
}
if (status == FALSE)
{
fprintf(fp, "s 0\n");
fprintf(fp, "t %lf", time * 1000);
}
else if (status == TRUE)
{
fprintf(fp, "s 1\n");
fprintf(fp, "v ");
for (i = 1; i < variablenumbers + 1; i++)
{
if (value[i] > 0)
{
fprintf(fp, "%d ", i);
}
else
{
fprintf(fp, "%d ", -i);
}
}
fprintf(fp, "\nt %lf", time * 1000);
}
else
{
fprintf(fp, "s -1\nt %lf", time * 1000);
}
fclose(fp);
return OK;
}
/*以下为数独部分*/
int transtoVariable(int i, int j)
/*将棋盘的不同位置转换为变量(仅适用于6*6棋盘,后续有待进一步改进)*/
{
return (i - 1) * 8 + j;
}
void HangAppendWords3(Line*& tail, int i, int j, int& appendv)//调用时appendv初始值为64
/*限制条件3,第i行和第j行不能完全一样,用来给子句集添加附加语句*/
{
int x;
Node* nhead, * ntail, * np;
for (x = 1; x <= 8; x++)
{
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(i, x);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(j, x);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(i, x);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = transtoVariable(j, x);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = appendv;
nhead->next->next->next = NULL;
tail->firstnode = nhead;//添加完结尾为0的子句
//例:15710= ?51∧?71
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(i, x);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(j, x);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(i, x);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = 0 - transtoVariable(j, x);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = appendv;
nhead->next->next->next = NULL;//添加完结尾为1的子句
//例:15711= 51∧71
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - (appendv - 2);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - (appendv - 1);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = (appendv - 2);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = (appendv - 1);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = 0 - appendv;
nhead->next->next->next = NULL;
tail->firstnode = nhead;
//添加完更高一级的子句
//例:1571= 15711∨15710
}
//以下添加最高级别的子句
//例:157= ?[1571∧1572∧…∧1578]
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
int v[9];
for (i = 1; i <= 8; i++)
v[i] = appendv - 1 - (i - 1) * 3;//v[i]中储存的都是低一级别的附加变元
nhead = (Node*)malloc(sizeof(Node));
ntail = nhead;
nhead->name = -appendv;
for (i = 1; i <= 8; i++)
{
np = (Node*)malloc(sizeof(Node));
np->name = -v[i];
np->next = NULL;
ntail->next = np;
ntail = ntail->next;
}
tail->firstnode = nhead;
for (i = 1; i <= 8; i++)
{
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = appendv;
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = v[i];
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = NULL;
}//添加完成
}
void LieAppendWords3(Line*& tail, int i, int j, int& appendv)\
/*限制条件3,第i列和第j列不能完全一样,用来给子句集添加附加语句*/
{
int x;
Node* nhead, * ntail, * np;
for (x = 1; x <= 8; x++)
{
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(x, i);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(x, j);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(x, i);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = transtoVariable(x, j);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = appendv;
nhead->next->next->next = NULL;
tail->firstnode = nhead;//添加完结尾为0的子句
//例:15710= ?51∧?71
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(x, i);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(x, j);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = -appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(x, i);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = 0 - transtoVariable(x, j);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = appendv;
nhead->next->next->next = NULL;//添加完结尾为1的子句
tail->firstnode = nhead; //例:15711= 51∧71
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - (appendv - 2);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - (appendv - 1);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = appendv;
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = (appendv - 2);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = (appendv - 1);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = 0 - appendv;
nhead->next->next->next = NULL;
tail->firstnode = nhead;
//添加完更高一级的子句
//例:1571= 15711∨15710
}
//以下添加最高级别的子句
//例:157= ?[1571∧1572∧…∧1578]
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
appendv++;
int v[9];
for (i = 1; i <= 8; i++)
v[i] = appendv - 1 - (i - 1) * 3;//v[i]中储存的都是低一级别的附加变元
nhead = (Node*)malloc(sizeof(Node));
ntail = nhead;
nhead->name = -appendv;
for (i = 1; i <= 8; i++)
{
np = (Node*)malloc(sizeof(Node));
np->name = -v[i];
np->next = NULL;
ntail->next = np;
ntail = ntail->next;
}
tail->firstnode = nhead;
for (i = 1; i <= 8; i++)
{
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = appendv;
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = v[i];
nhead->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = NULL;
}//添加完成
}
void AppendWords1(Line*& tail)
/*根据约束1来增加子句(同时增加行约束和列约束)*/
{
int i, j;
Node* nhead;
for (i = 1; i <= 8; i++)//先处理行约束
{//i代表行
for (j = 1; j <= 6; j++)
{//j代表列
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(i, j);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = transtoVariable(i, j + 1);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = transtoVariable(i, j + 2);
nhead->next->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(i, j);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = 0 - transtoVariable(i, j + 1);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = 0 - transtoVariable(i, j + 2);
nhead->next->next->next = NULL;
tail->firstnode = nhead;
}
}
for (j = 1; j <= 8; j++)//再处理列约束
{//j代表列数
for (i = 1; i <= 6; i++)
{//i代表行数
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = transtoVariable(i, j);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = transtoVariable(i + 1, j);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = transtoVariable(i + 2, j);
nhead->next->next->next = NULL;
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - transtoVariable(i, j);
nhead->next = (Node*)malloc(sizeof(Node));
nhead->next->name = 0 - transtoVariable(i + 1, j);
nhead->next->next = (Node*)malloc(sizeof(Node));
nhead->next->next->name = 0 - transtoVariable(i + 2, j);
nhead->next->next->next = NULL;
tail->firstnode = nhead;
}
}
tail->nextline = NULL;
}
void helpAppendWords2(Line*& tail, int* v)
/*辅助完成约束2的生成
tail仍然是尾指针,
v是指向储存该行可以取的5个变元的数组的指针*/
{
int i;
Node* nhead, * ntail, * p;
tail->nextline = (Line*)malloc(sizeof(Node));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = v[1];
ntail = nhead;
for (i = 2; i <= 5; i++)
{
p = (Node*)malloc(sizeof(Node));
p->name = v[i];
p->next = NULL;
ntail->next = p;
ntail = ntail->next;
}
tail->firstnode = nhead;
tail->nextline = (Line*)malloc(sizeof(Node));
tail = tail->nextline;
nhead = (Node*)malloc(sizeof(Node));
nhead->name = 0 - v[1];
ntail = nhead;
for (i = 2; i <= 5; i++)
{
p = (Node*)malloc(sizeof(Node));
p->name = 0 - v[i];
p->next = NULL;
ntail->next = p;
ntail = ntail->next;
}
tail->firstnode = nhead;
}
void AppendWords2(Line*& tail)
/*约束2,需要保证每行(每列)任取出5个元素,
至少有一个1和一个0*/
{
int i, j, a, b, c, count, k;
int v[6];
for (i = 1; i <= 8; i++)//先考虑行约束
{//i代表行数
for (a = 1; a <= 6; a++)
{//a,b代表在第i行中不取的那两个列坐标
for (b = a + 1; b <= 7; b++)
{
for (c = b + 1; c <= 8; c++)
{
count = 1;
for (j = 1; j <= 8; j++)
{//j代表列数
if (j != a && j != b && j != c)
v[count++] = transtoVariable(i, j);
}//进行完此次for循环后,数组v中储存有该行可以取的5个变元
helpAppendWords2(tail, v);
}
}
}
}
for (j = 1; j <= 8; j++)//再考虑列约束
{//j代表列数
for (a = 1; a <= 6; a++)
{
for (b = a + 1; b <= 7; b++)
{
for (c = b + 1; c <= 8; c++)
{
count = 1;
for (i = 1; i <= 8; i++)
{//i代表行数
if (i != a && i != b && i != c)
v[count++] = transtoVariable(i, j);
}//进行完此次for循环后,数组v中储存有该行可以取的5个变元
helpAppendWords2(tail, v);
}
}
}
}
tail->nextline = NULL;
}
void AppendWords(Line*& tail)
{
int i, j, appendv;
AppendWords1(tail);
AppendWords2(tail);
appendv = 64;
for (i = 1; i <= 7; i++)
for (j = i + 1; j <= 8; j++)
{
HangAppendWords3(tail, i, j, appendv);
}
for (i = 1; i <= 7; i++)
for (j = i + 1; j <= 8; j++)
{
LieAppendWords3(tail, i, j, appendv);
}
tail->nextline = NULL;
}
int ReadShudu(Line*& s, int v[][9])
/*读取数独矩阵,建立邻接表,返回值为邻接表的行数*/
{
Line* head, * tail;
Node* nhead;
int i, j, linenumber = 0;
head = (Line*)malloc(sizeof(Line));
tail = head;//为了生成方便,暂时保留头结点
for (i = 1; i <= 8; i++)
for (j = 1; j <= 8; j++)
{
if (v[i][j] == 1)
{
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
tail->nextline = NULL;
tail->firstnode = (Node*)malloc(sizeof(Node));
tail->firstnode->name = transtoVariable(i, j);
tail->firstnode->next = NULL;
}
else if (v[i][j] == 0)
{
tail->nextline = (Line*)malloc(sizeof(Line));
tail = tail->nextline;
tail->nextline = NULL;
tail->firstnode = (Node*)malloc(sizeof(Node));
tail->firstnode->name = 0 - transtoVariable(i, j);
tail->firstnode->next = NULL;
}
else//此时v[i][j]==-1
;//不进行任何操作
}
AppendWords(tail);
tail->nextline = NULL;
tail = head->nextline;
while (tail)
{
linenumber++;
tail = tail->nextline;
}
s = head->nextline;
free(head);
return linenumber;
}
int TransferToFile(Line* s, int linenumbers)
{
FILE* fp;
Line* linep;
Node* nodep;
char filepath[20];
printf("请输入要存入的文件名\n");
scanf("%s", filepath);
fp = fopen(filepath, "w");
if (fp == NULL)
{
printf("文件打开失败\n");
return ERROR;
}
fprintf(fp, "c\n");
fprintf(fp, "p cnf %d %d\n", 1464, linenumbers);
linep = s;
while (linep)
{
nodep = linep->firstnode;
while (nodep)
{
fprintf(fp, "%d ", nodep->name);
nodep = nodep->next;
}
fprintf(fp, "0\n");
linep = linep->nextline;
}
fclose(fp);
return OK;
}
void WriteShudu(int v[][9])
/**根据value表填写8*8的数独**/
{
int variable, i, j;
for (variable = 1; variable <= 64; variable++)
{
j = variable % 8;
if (j == 0) j = 8;
i = (variable - j) / 8 + 1;
if (value[variable] == 1)
v[i][j] = 1;
else if (value[variable] == 0)
v[i][j] = 0;
}
}
int CheckKeyWord(int v[][9], int x, int y)
/*检查在数独中新填入数据的正确性,x,y分别为新填入数据的行坐标和列坐标*/
{
int count1 = 0, count0 = 0;
int i, j;
for (i = x, j = 1; j <= 8; j++)
{//检查该行1,0的数量是否超标
if (v[i][j] == 1)
count1++;
else if (v[i][j] == 0)
count0++;
}
if (count1 > 4 || count0 > 4)
return FALSE;
count1 = count0 = 0;
for (i = 1, j = y; i <= 8; i++)
{//检查该列1,0的数量是否超标
if (v[i][j] == 1)
count1++;
else if (v[i][j] == 0)
count0++;
}
if (count1 > 4 || count0 > 4)
return FALSE;
//检查该行填入的数字是否造成了连续三个数字相同
switch (y)
{
case 1:
if (v[x][y] == v[x][y + 1] && v[x][y] == v[x][y + 2])
return FALSE;
break;
case 8:
if (v[x][y] == v[x][y - 1] && v[x][y] == v[x][y - 2])
return FALSE;
break;
case 3:
case 4:
case 5:
case 6:
if (v[x][y] == v[x][y + 1] && v[x][y] == v[x][y - 1])
return FALSE;
if (v[x][y] == v[x][y + 1] && v[x][y] == v[x][y + 2])
return FALSE;
if (v[x][y] == v[x][y - 1] && v[x][y] == v[x][y - 2])
return FALSE;
break;
case 2:
if (v[x][y] == v[x][y + 1] && v[x][y] == v[x][y - 1])
return FALSE;
if (v[x][y] == v[x][y + 1] && v[x][y] == v[x][y + 2])
return FALSE;
break;
case 7:
if (v[x][y] == v[x][y + 1] && v[x][y] == v[x][y - 1])
return FALSE;
if (v[x][y] == v[x][y - 1] && v[x][y] == v[x][y - 2])
return FALSE;
break;
}
//检查该列填入的数字是否造成了连续三个数字相同
switch (x)
{
case 1:
if (v[x][y] == v[x + 1][y] && v[x][y] == v[x + 2][y])
return FALSE;
break;
case 8:
if (v[x][y] == v[x - 1][y] && v[x][y] == v[x - 2][y])
return FALSE;
break;
case 3:
case 4:
case 5:
case 6:
if (v[x][y] == v[x + 1][y] && v[x][y] == v[x - 1][y])
return FALSE;
if (v[x][y] == v[x + 1][y] && v[x][y] == v[x + 2][y])
return FALSE;
if (v[x][y] == v[x - 1][y] && v[x][y] == v[x - 2][y])
return FALSE;
break;
case 2:
if (v[x][y] == v[x + 1][y] && v[x][y] == v[x - 1][y])
return FALSE;
if (v[x][y] == v[x + 1][y] && v[x][y] == v[x + 2][y])
return FALSE;
break;
case 7:
if (v[x][y] == v[x + 1][y] && v[x][y] == v[x - 1][y])
return FALSE;
if (v[x][y] == v[x - 1][y] && v[x][y] == v[x - 2][y])
return FALSE;
break;
}
int countx;
if (x >= 2 && y == 8)//判断该填入的数字有没有造成两个行的内容完全一样
{
for (i = 1; i < x; i++)
{
countx = 0;
for (j = 1; j <= 8; j++)
{
if (v[i][j] == v[x][j])
countx++;
}
if (countx == 8)
return FALSE;
}
}
if (x == 8 && y >= 2)//判断填入的数字有没有造成两个列内容完全一样
{
for (j = 1; j < y; j++)
{
countx = 0;
for (i = 1; i <= 8; i++)
{
if (v[i][j] == v[i][y])
countx++;
}
if (countx == 8)
return FALSE;
}
}
return TRUE;
}
int SolveShudu(ShuduLine* s, int x, int y, int& count)
{
int i, j, check, a, b;
ShuduLine* shudup;
while (x <= 8 && s->v[x][y] != -1)//从上往下找找到第一个为-1的空
{
y++;
if (y == 9) //搜索完一行
{
x++;
y = 1;
}
}
if (x > 8)
{//说明没有空缺的位置
shudup = (ShuduLine*)malloc(sizeof(ShuduLine));
if (shudup == NULL)
{
printf("数独空间分配失败\n");
return ERROR;
}
for (a = 1; a <= 8; a++)
for (b = 1; b <= 8; b++)
shudup->v[a][b] = s->v[a][b];
shudup->next = s->next;
s->next = shudup;
count++;
return TRUE;
}
for (i = 0; i <= 1; i++)
{
s->v[x][y] = i;
if ((check = CheckKeyWord(s->v, x, y)) == TRUE)
{
if (x == 8 && y == 8)
{
shudup = (ShuduLine*)malloc(sizeof(ShuduLine));
if (shudup == NULL)
{
printf("数独空间分配失败\n");
return ERROR;
}
for (a = 1; a <= 8; a++)
for (b = 1; b <= 8; b++)
shudup->v[a][b] = s->v[a][b];
shudup->next = s->next;
s->next = shudup;
s->v[x][y] = -1;
count++;
return TRUE;
}
else
{
if (y == 8)
SolveShudu(s, x + 1, 1, count);
else
SolveShudu(s, x, y + 1, count);
}
}
}
s->v[x][y] = -1;
return FALSE;
}
void CountResult(ShuduLine* s, int& count)
{
count = 0;
SolveShudu(s, 1, 1, count);
ShuduLine* p, * q;
p = s->next; q = NULL;
if (p)
{
q = p->next;
}
while (p)
{//清除掉多余的数独链
free(p);
p = q;
if (p)
{
q = p->next;
}
}
s->next = NULL;
}
void RandomCreat(int(*a)[9])
/*随机生成一个6*6的数独*/
{
ShuduLine* s, * p, * q;
int i, j, variable, count1, count0, count_result;
s = (ShuduLine*)malloc(sizeof(ShuduLine));
if (s == NULL)
{
printf("空间分配失败\n");
return;
}
s->next = NULL;
srand(unsigned(time(NULL))); /* 产生random_shuffle的随机数种子 */
for (int i = 1; i <= 8; ++i)
for (int j = 1; j <= 8; ++j)
s->v[i][j] = -1;
count1 = count0 = count_result = 0;
for (i = 1; i <= 2; i++)
{
s->v[1][i] = rand() % 2;
if (s->v[1][i] == 1)
count1++;
else
count0++;
}
for (i = 3; i <= 8; i++)
{
variable = rand() % 2;
if (variable == s->v[1][i - 1] && variable == s->v[1][i - 2])
{
if (variable == 1)
{
s->v[1][i] = 0;
count0++;
}
else
{
s->v[1][i] = 1;
count1++;
}
}
else if (count1 == 4)
{
s->v[1][i] = 0;
count0++;
}
else if (count0 == 4)
{
s->v[1][i] = 1;
count1++;
}
else
{
s->v[1][i] = variable;
if (variable) count1++;
else count0++;
}
}
SolveShudu(s, 2, 1, count_result);
int rank;
if (count_result == 0)
rank = 1;
else
rank = rand() % count_result + 1;
p = s;
for (i = 1; i <= rank; i++)
p = p->next;//p指向的是随机生成的完整的棋盘
for (i = 1; i <= 8; i++)//给数独棋盘赋值
for (j = 1; j <= 8; j++)
a[i][j] = p->v[i][j];
p = s; q = p->next;
while (p)
{//清理生成的数独链
free(p);
p = q;
if (p)
q = p->next;
}
}
void WaDong(int(*a)[9])
{
ShuduLine* s;
int i, j, x, y, flag = 0, k, result;
s = (ShuduLine*)malloc(sizeof(ShuduLine));
if (s == NULL) {
printf("空间生成失败\n");
return;
}
for (i = 1; i <= 8; i++)
for (j = 1; j <= 8; j++)
s->v[i][j] = a[i][j];
s->next = NULL;
srand(unsigned(time(NULL))); // 产生random_shuffle的随机数种子
x = rand() % 8 + 1;
y = rand() % 8 + 1;
s->v[x][y] = -1;//先试探性的挖一个孔
while (1)
{
CountResult(s, result);
if (result > 1)
{
s->v[x][y] = k;
flag++;
if (flag > 5)
{
break;
}
}
else
{
do {
x = rand() % 8 + 1;
y = rand() % 8 + 1;
} while (s->v[x][y] == -1);
k = s->v[x][y]; //此时(x,y)不为0,记录下这个值,为了预防挖掉该空后导致结果不唯一,还需要把该空填上
s->v[x][y] = -1;
}
}
for (i = 1; i <= 8; i++)
for (j = 1; j <= 8; j++)
a[i][j] = s->v[i][j];
}
int main(void)
{
int op = 1;
int a = 0;
while (op)
{
system("cls");
printf("\n\n");
printf("------------------请输入你要进行的操作------------\n");
printf(" 1.使用DPLL求解SAT问题\n");
printf(" 2.基于SAT求解的求解01数独问题\n");
printf(" 0. Exit\n");
printf("-------------------------------------------------\n");
printf("请选择你的操作:");
scanf("%d", &op);
switch (op)
{
case 1:
int status;
Line* cnf1, * cnf2;
char filename[20];
double t;
printf("请输入要读取的文件\n");
scanf("%s", filename);
getchar();
cnf1 = CreatCNF(filename);
printf("\n是否要展示所读取文件的内容?\n");
printf("1:是\n0:否\n");
scanf("%d", &a);
if (a == 1)
{
DesplayFile(cnf1);
}
printf("\n是否要解析读取的文件?\n");
printf("1:是\n0:否\n");
scanf("%d", &a);
if (a == 1)
{
AnalyzeFile(cnf1);
}
cnf2 = CopyGather(cnf1);
clock_t start, finish;
start = clock();
status = DPLL(cnf1, backtrack, positivetimes, negativetimes, occurtimes);
finish = clock();
t = (double)(finish - start) / CLOCKS_PER_SEC;
if (status == TRUE)
{
printf("求解成功\n");
}
else if (status == FALSE)
{
printf("该语句集无解\n");
}
else if (status == -1)
{
printf("结果不确定\n");
}
printf("求解用时%f s\n", t);
if (status == TRUE)
{
printf("\n是否需要打印各个变元的取值?\n");
printf("1:是\n0:否\n");
scanf("%d", &a);
if (a == 1)
PrintValue();
putchar('\n');
printf("\n是否需要检验结果的正确性?\n");
printf("1:是\n0:否\n");
scanf("%d", &a);
getchar();
if (a == 1)
TestCorrect(cnf2);
}
printf("\n是否要对结果进行保存?\n");
printf("1:是\n0:否\n");
scanf("%d", &a);
getchar();
if (a == 1)
{
ChangeName(filename);
if (StoreToFile(filename, status, t) == OK)
printf("存入成功\n");
else
printf("存入失败\n");
}
free(positivetimes);
free(negativetimes);
free(occurtimes);
free(backtrack);
DestroyGather(cnf1);
DestroyGather(cnf2);
system("pause");
break;
case 2:
Line * s1, * s2;
int v[9][9];
int b,linenumber;
RandomCreat(v);
WaDong(v);
int i, j;
for(i=1;i<=8;i++)
for (j = 1; j <= 8; j++)
{
if (v[i][j] != -1)
printf("%2d", v[i][j]);
else printf(" *");
if (j % 8 == 0)
putchar('\n');
}
linenumber=ReadShudu(s1, v);
printf("\n生成的棋盘已经被转化为SAT问题。是否需要展示转化的邻接表的内容?\n");
printf("1:是\n0:否\n");
scanf("%d", &b);
if (b == 1)
{
DesplayFile(s1);
}
printf("\n是否需要解析邻接表?\n");
printf("1:是\n0:否\n");
scanf("%d", &b);
if (b == 1)
{
AnalyzeFile(s1);
}
printf("\n要保存生成的邻接表还是数独求解?\n");
printf("1:保存邻接表\n0:数独求解\n");
scanf("%d", &b);
if (b == 1)
{
if (TransferToFile(s1, linenumber) == OK)
{
printf("存入成功\n");
}
else
{
printf("存入失败\n");
}
}
else if (b == 0)
{
Line* linep; Node* nodep;
variablenumbers = 1464;
value = (int*)calloc(variablenumbers + 1, sizeof(int));
occurtimes = (int*)calloc(variablenumbers + 1, sizeof(int));
backtrack = (int*)calloc(variablenumbers + 1, sizeof(int));
for (i = 0; i < variablenumbers + 1; i++) {
backtrack[i] = 0;//0代表还未访问,1代表已经访问
}
positivetimes = (int*)calloc(variablenumbers + 1, sizeof(int));
negativetimes = (int*)calloc(variablenumbers + 1, sizeof(int));
linep = s1;
while (linep)
{
nodep = linep->firstnode;
while (nodep)
{
occurtimes[abs(nodep->name)]++;
if (nodep->name > 0)
positivetimes[nodep->name]++;
else
negativetimes[abs(nodep->name)]++;
nodep = nodep->next;
}
linep = linep->nextline;
}
if (DPLL(s1, backtrack, positivetimes, negativetimes, occurtimes) == TRUE)
{
printf("求解完毕,结果如下\n");
WriteShudu(v);
for (i = 1; i <= 8; i++)
for (j = 1; j <= 8; j++)
{
printf("%2d", v[i][j]);
if (j % 8 == 0)
putchar('\n');
}
}
else
{
printf("求解失败\n");
}
free(backtrack);
free(positivetimes);
free(negativetimes);
free(occurtimes);
DestroyGather(s1);
}
else
{
printf("请输入合法的数字\n");
}
getchar(); getchar();
break;
case 0:
break;
default:
printf("请输入合法的数字\n");
getchar(); getchar();
break;
}//end of switch
}
}
|
9b8336370533cd96ca83830917897b88305c5406
|
bd53700618de7140c4bd177fb3fb8019aa534dce
|
/Leetcode/Spiral_Matrix.cpp
|
634679224fec8d4034e529028ac56b758f1d138a
|
[] |
no_license
|
duttaANI/AL_Lab
|
2b85f1ed38577d388ecbbdebef2168f486446981
|
d10d7316d3bad944a60644e4485d4699a19c9388
|
refs/heads/master
| 2022-09-24T18:22:16.545599
| 2022-09-18T17:15:46
| 2022-09-18T17:15:46
| 238,336,390
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 981
|
cpp
|
Spiral_Matrix.cpp
|
class Solution {
public:
vector<int> spiralOrder(vector<vector<int>>& matrix) {
vector<int> ans ;
if(matrix.size()==0)
return ans;
int R = matrix.size(); int C = matrix[0].size();
vector<vector<int>> seen ( R , vector<int> (C));
int dr[4] = {0, 1, 0, -1}; // dir row
int dc[4] = {1, 0, -1, 0}; // dir col
int r=0,c=0,di=0;
for(int i=0; i < R*C;++i)
{
ans.push_back(matrix[r][c]);
seen[r][c] = true;
int cr = r + dr[di]; // current row
int cc = c + dc[di]; // current col
if(0 <= cr && cr<R && 0<=cc && cc<C && !seen[cr][cc])
{
r = cr;
c = cc;
}
else
{
di = (di + 1)%4;
r = r + dr[di];
c = c + dc[di];
}
}
return ans;
}
};
|
2470ed2110dce2fd2b66e83292832958f2513fc6
|
22729f0eb84230e5becbca11fb86707f61f81516
|
/unit-tests/algo/d2rgb/test-reproduction.cpp
|
2e758b4a5ee567b72a19a297fd462f0ebf3fb682
|
[
"GPL-1.0-or-later",
"OFL-1.1",
"GPL-2.0-only",
"GPL-3.0-only",
"BSL-1.0",
"MIT",
"Apache-2.0",
"LGPL-2.1-only",
"LicenseRef-scancode-public-domain",
"Zlib",
"BSD-2-Clause",
"BSD-3-Clause",
"BSD-1-Clause",
"Unlicense"
] |
permissive
|
lips-hci/ae400-realsense-sdk
|
742cc375d421ee41c04d1934b5bec23d607f39ed
|
2554f30bdcbf71b5b7279fef494176f3fbd6c6c7
|
refs/heads/master
| 2023-04-27T01:57:34.504808
| 2023-03-21T09:21:34
| 2023-04-13T06:11:17
| 227,797,796
| 9
| 4
|
Apache-2.0
| 2023-08-25T07:42:36
| 2019-12-13T08:59:00
|
C++
|
UTF-8
|
C++
| false
| false
| 11,557
|
cpp
|
test-reproduction.cpp
|
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2020 Intel Corporation. All Rights Reserved.
//#cmake:add-file ../../../src/algo/depth-to-rgb-calibration/*.cpp
//#cmake:add-file ../../../src/algo/thermal-loop/*.cpp
// We have our own main
#define NO_CATCH_CONFIG_MAIN
//#define CATCH_CONFIG_RUNNER
#define DISABLE_LOG_TO_STDOUT
#include "d2rgb-common.h"
template< typename T >
void read_binary_file( char const * dir, char const * bin, T * data )
{
std::string filename = join( dir, bin );
AC_LOG( DEBUG, "... " << filename );
std::fstream f = std::fstream( filename, std::ios::in | std::ios::binary );
if( ! f )
throw std::runtime_error( "failed to read file:\n" + filename );
f.seekg( 0, f.end );
size_t cb = f.tellg();
f.seekg( 0, f.beg );
if( cb != sizeof( T ) )
throw std::runtime_error( to_string()
<< "file size (" << cb << ") does not match data size (" << sizeof(T) << "): " << filename );
std::vector< T > vec( cb / sizeof( T ));
f.read( (char*) data, cb );
f.close();
}
struct old_algo_calib
{
algo::matrix_3x3 rot;
algo::translation trans;
double __fx, __fy, __ppx, __ppy; // not in new calib!
algo::k_matrix k_mat;
int width, height;
rs2_distortion model;
double coeffs[5];
operator algo::calib() const
{
algo::calib c;
c.rot = rot;
c.trans = trans;
c.k_mat = k_mat;
c.width = width;
c.height = height;
c.model = model;
for( auto x = 0; x < 5; ++x )
c.coeffs[x] = coeffs[x];
return c;
}
};
class custom_ac_logger : public ac_logger
{
typedef ac_logger super;
std::string _codes;
public:
custom_ac_logger() {}
std::string const & get_codes() const { return _codes; }
void reset() { _codes.clear(); }
protected:
void on_log( char severity, char const * message ) override
{
super::on_log( severity, message );
// parse it for keyword
auto cch = strlen( message );
if( cch < 4 || message[cch - 1] != ']' )
return;
char const * end = message + cch - 1;
char const * start = end - 1;
while( *start != '[' )
{
if( *start == ' ' )
return;
if( --start == message )
return;
}
if( start[-1] != ' ' )
return;
// parse it for parameters
char const * param = message;
std::string values;
while( param < start )
{
if( *param == '{' && ++param < start )
{
char const * param_end = param;
while( *param_end != '}' && param_end < start )
++param_end;
if( param_end == start || param_end - param < 1 )
break;
char const * value = param_end + 1;
char const * value_end = value;
while( *value_end != ' ' )
++value_end;
if( value_end == value )
break;
if( value_end - value > 1 && strchr( ".;", value_end[-1] ))
--value_end;
std::string param_name( param, param_end - param );
std::string param_value( value, value_end - value );
if( ! values.empty() )
values += ' ';
values += param_name;
values += '=';
values += param_value;
param = value_end;
}
++param;
}
std::string code( start + 1, end - start - 1 );
if( ! values.empty() )
code += '[' + values + ']';
if( ! _codes.empty() )
_codes += ' ';
_codes += code;
}
};
int main( int argc, char * argv[] )
{
custom_ac_logger logger;
bool ok = true;
bool debug_mode = false;
// Each of the arguments is the path to a directory to simulate
// We skip argv[0] which is the path to the executable
// We don't complain if no arguments -- that's how we'll run as part of unit-testing
for( int i = 1; i < argc; ++i )
{
try
{
char const * dir = argv[i];
if( !strcmp( dir, "--version" ) )
{
// The build number is only available within Jenkins and so we have to hard-
// code it ><
std::cout << RS2_API_VERSION_STR << ".2158" << std::endl;
continue;
}
if( ! strcmp( dir, "--debug" ) || ! strcmp( dir, "-d" ) )
{
debug_mode = true;
continue;
}
std::cout << "Processing: " << dir << " ..." << std::endl;
algo::calib calibration;
try
{
read_binary_file( dir, "rgb.calib", &calibration );
}
catch( std::exception const & e )
{
std::cout << "!! failed: " << e.what() << std::endl;
old_algo_calib old_calibration;
read_binary_file( dir, "rgb.calib", &old_calibration );
calibration = old_calibration;
}
camera_params camera;
camera.rgb = calibration.get_intrinsics();
camera.extrinsics = calibration.get_extrinsics();
algo::rs2_intrinsics_double d_intr; // intrinsics written in double!
read_binary_file( dir, "depth.intrinsics", &d_intr );
camera.z = d_intr;
read_binary_file( dir, "depth.units", &camera.z_units );
read_binary_file( dir, "cal.info", &camera.cal_info );
read_binary_file( dir, "cal.registers", &camera.cal_regs );
read_binary_file( dir, "dsm.params", &camera.dsm_params );
if( camera.cal_regs.EXTLdsmXoffset < 0. || camera.cal_regs.EXTLdsmXoffset > 100000.
|| camera.cal_regs.EXTLdsmXscale < 0. || camera.cal_regs.EXTLdsmXscale > 100000.
|| camera.cal_regs.EXTLdsmYoffset < 0 || camera.cal_regs.EXTLdsmYoffset > 100000.
|| camera.cal_regs.EXTLdsmYscale < 0 || camera.cal_regs.EXTLdsmYscale > 100000. )
{
throw std::invalid_argument( "cal.registers file is malformed! (hexdump -v -e '4/ \"%f \"')" );
}
algo::optimizer::settings settings;
try
{
read_binary_file( dir, "settings", &settings );
}
catch( std::exception const & e )
{
std::cout << "!! failed: " << e.what() << " -> assuming [MANUAL LONG 9 @40degC]" << std::endl;
settings.digital_gain = RS2_DIGITAL_GAIN_HIGH;
settings.hum_temp = 40;
settings.is_manual_trigger = true;
settings.receiver_gain = 9;
}
// If both the raw intrinsics (pre-thermal) and the thermal table exist, apply a thermal
// manipulation. Otherwise just take the final intrinsics from rgb.calib.
try
{
rs2_intrinsics raw_rgb_intr;
read_binary_file( dir, "raw_rgb.intrinsics", &raw_rgb_intr );
auto vec = read_vector_from< byte >( join( dir, "rgb_thermal_table" ) );
thermal::l500::thermal_calibration_table thermal_table( vec );
auto scale = thermal_table.get_thermal_scale( settings.hum_temp );
AC_LOG( DEBUG, "Thermal {scale}" << scale << " [TH]" );
raw_rgb_intr.fx = float( raw_rgb_intr.fx * scale );
raw_rgb_intr.fy = float( raw_rgb_intr.fy * scale );
camera.rgb = raw_rgb_intr;
}
catch( std::exception const & )
{
AC_LOG( ERROR, "Could not read raw_rgb.intrinsics or rgb_thermal_table; using rgb.calib [NO-THERMAL]" );
}
algo::optimizer cal( settings, debug_mode );
std::string status;
{
memory_profiler profiler;
init_algo( cal,
dir,
"rgb.raw",
"rgb_prev.raw",
"rgb_last_successful.raw",
"ir.raw",
"depth.raw",
camera,
&profiler );
status = logger.get_codes();
logger.reset();
profiler.section( "is_scene_valid" );
if( ! cal.is_scene_valid() )
{
TRACE( "-E- SCENE_INVALID" );
if( ! status.empty() )
status += ' ';
status += "SCENE_INVALID";
}
profiler.section_end();
profiler.section( "optimize" );
size_t n_iteration = cal.optimize();
profiler.section_end();
std::string results;
profiler.section( "is_valid_results" );
if( ! cal.is_valid_results() )
{
TRACE( "NOT VALID\n" );
results = "BAD_RESULT";
}
else
{
results = "SUCCESSFUL";
}
profiler.section_end();
if( ! logger.get_codes().empty() )
{
if( ! status.empty() )
status += ' ';
status += logger.get_codes();
logger.reset();
}
if( ! status.empty() )
status += ' ';
status += results;
}
TRACE( "\n___\nRESULTS: (" << RS2_API_VERSION_STR << " build 2158)" );
auto intr = cal.get_calibration().get_intrinsics();
intr.model = RS2_DISTORTION_INVERSE_BROWN_CONRADY; // restore LRS model
auto extr = cal.get_calibration().get_extrinsics();
AC_LOG( DEBUG, AC_D_PREC << "intr" << (rs2_intrinsics)intr );
AC_LOG( DEBUG, AC_D_PREC << "extr" << (rs2_extrinsics)extr );
AC_LOG( DEBUG, AC_D_PREC << "dsm" << cal.get_dsm_params() );
try
{
algo::validate_dsm_params( cal.get_dsm_params() );
}
catch( librealsense::invalid_value_exception const & e )
{
AC_LOG( ERROR, "Exception: " << e.what() );
if( ! status.empty() )
status += ' ';
status += logger.get_codes();
logger.reset();
}
TRACE( "\n___\nVS:" );
AC_LOG( DEBUG, AC_D_PREC << "intr" << (rs2_intrinsics)calibration.get_intrinsics() );
AC_LOG( DEBUG, AC_D_PREC << "extr" << (rs2_extrinsics)calibration.get_extrinsics() );
AC_LOG( DEBUG, AC_D_PREC << "dsm" << camera.dsm_params );
TRACE( "\n___\nSTATUS: " + status );
}
catch( std::exception const & e )
{
std::cerr << "\n___\ncaught exception: " << e.what() << std::endl;
ok = false;
}
catch( ... )
{
std::cerr << "\n___\ncaught unknown exception!" << std::endl;
ok = false;
}
}
return ! ok;
}
|
b1309dc4718727f028758262ada40f97d5a5834c
|
88f3fe8a0fd64a36f4bba69aa8fd8e41a6feea64
|
/src/util/string/StrBuffer.h
|
b7ae13c0eff55cced0cfb2571d507655594a8cb0
|
[] |
no_license
|
AltropInc/alt
|
0fa30bd2e5194d0b0e4832f8dce89177c4c00b62
|
831fc4e19d74364da03ba02cf9ac643afc0adaa3
|
refs/heads/master
| 2023-09-04T18:52:38.873358
| 2023-09-03T13:17:33
| 2023-09-03T13:17:33
| 249,748,618
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,851
|
h
|
StrBuffer.h
|
#pragma once
//**************************************************************************
// Copyright (c) 2020-present, Altrop Software Inc. and Contributors.
// SPDX-License-Identifier: BSL-1.0
//**************************************************************************
/**
* @file StrBuffer.h
* @library alt_util
* @brief definition of various buffers for a string:
* - StrBuf: wrapper of a c string to provide some common interface as in
* std::string and some other interface for the usage in ALT string utils
* - StrFixed: a string in a fixed length
* - StrRef: a const reference to a c string
* - StrRefInLength: a const reference to a c string in a fixed length
*/
#include <string>
#include <cstring>
#include <tuple>
#include <cstddef> // for size_t
namespace alt {
class StrBuf
{
public:
StrBuf (char* buffer, size_t sz, size_t filled=0)
: buffer_(buffer)
, capacity_(sz)
, tail_(filled)
{}
StrBuf (std::string & buffer, size_t filled=0)
: buffer_(&buffer[0])
, capacity_(buffer.length())
, tail_(filled)
{ }
size_t length() const { return tail_; }
bool empty() const { return tail_==0; }
bool overflowed() const { return tail_==capacity_; }
bool operator==(const StrBuf &other) const
{ return tail_==other.tail_ && ::strncmp(buffer_, other.buffer_, tail_); }
const char* c_str() const
{
if (tail_ < capacity_) *const_cast<char*>(buffer_+tail_) ='\0';
return buffer_;
}
void terminate() const
{
if (tail_ < capacity_) *const_cast<char*>(buffer_+tail_) ='\0';
}
void clear() { tail_ = 0; }
void resize(size_t sz, char fill=0)
{
if (tail_ >= sz) tail_ = sz;
else if (sz < capacity_)
{
while (tail_ < sz) buffer_[tail_++] = fill;
}
}
void push_back (char val) { if (tail_ < capacity_) buffer_[tail_++] = val; }
void pop_back () { if (tail_>0) --tail_; }
const char& back () const { return tail_>0 ? buffer_[tail_-1] : buffer_[0]; }
char& back () { return tail_>0 ? buffer_[tail_-1] : buffer_[0]; }
StrBuf& append (const char* val)
{
if (val) while (tail_ < capacity_ && *val) buffer_[tail_++] = *val++;
return *this;
}
StrBuf& append (const char* val, size_t n)
{
if (val) while (tail_ < capacity_ && *val && n--) buffer_[tail_++] = *val++;
return *this;
}
StrBuf& append (const std::string val)
{ append(val.c_str(), val.length()); return *this; }
StrBuf& append (size_t repeat, char val)
{
while (tail_ < capacity_ && repeat--) buffer_[tail_++] = val;
return *this;
}
StrBuf& appendUntil (const char* val, char terminator)
{
if (val) while (tail_ < capacity_ && *val!=terminator) buffer_[tail_++] = *val++;
return *this;
}
StrBuf& appendPostPadding (const char* val, size_t n, char padding)
{
if (val) while (tail_ < capacity_ && *val && n) { buffer_[tail_++] = *val++; --n; }
while (tail_ < capacity_ && n--) buffer_[tail_++] = padding;
return *this;
}
StrBuf& appendPrePadding (const char* val, size_t val_len, size_t n, char padding)
{
size_t free_space = capacity_ - tail_;
while (free_space-- > val_len && n > val_len) { buffer_[tail_++] = padding; --n; }
if (val) while (tail_ < capacity_ && *val && n--) buffer_[tail_++] = *val++;
return *this;
}
private:
char* buffer_;
size_t capacity_;
size_t tail_;
};
// These are implemented in StrUtils
size_t strHash(const char * str);
size_t strHash(const char * str, size_t length);
size_t strHash (const char *str, size_t length, size_t seed);
template <size_t N>
class StrFixed
{
public:
StrFixed() { buffer_[0]='\0'; buffer_[N]='\0'; };
StrFixed (const char* str)
{
StrBuf (buffer_, N).append(str).terminate();
}
StrFixed (const char* str, size_t length)
{
StrBuf (buffer_, N).append(str, length).terminate();
}
StrFixed (const std::string& str)
{
StrBuf (buffer_, N).append(str.c_str(), str.length()).terminate();
}
template<size_t M>
StrFixed (const StrFixed<M>& str)
{
StrBuf (buffer_, N).append(str.c_str(), M).terminate();
}
const char* c_str() const
{
return buffer_;
}
const char* toString() const
{
return buffer_;
}
size_t length() const
{
return std::strlen(buffer_);
}
constexpr size_t capacity() const
{
return N;
}
bool operator==(const StrFixed &other) const
{ return ::strcmp(buffer_, other.buffer_)==0; }
template < typename T>
StrFixed& append (const T& str) const
{
StrBuf (buffer_, N).append(str.c_str()).terminate();
return *this;
}
size_t hash() const
{
return strHash(buffer_);
}
private:
char buffer_[N+1];
};
class StrRef
{
public:
StrRef (const char* buffer)
: buffer_(buffer)
{}
StrRef () {}
void reset(const char* buffer) { buffer_=buffer; }
size_t length() const { return buffer_ ? std::strlen(buffer_) : 0; }
const char* c_str() const { return buffer_; }
bool operator==(const StrRef &other) const
{ return std::strcmp(buffer_, other.buffer_)==0; }
size_t hash() const
{
return strHash(buffer_);
}
private:
const char* buffer_ { nullptr };
};
class StrRefInLength
{
public:
StrRefInLength (const char* buffer)
: buffer_(buffer)
, length_(buffer ? std::strlen(buffer) : 0)
{}
StrRefInLength (const char* buffer, size_t length)
: buffer_(buffer)
, length_(length)
{}
StrRefInLength (const std::string & str)
: buffer_(str.c_str())
, length_(str.length())
{}
StrRefInLength ()
{}
size_t length() const { return length_; }
const char* c_str() const { return buffer_; }
bool operator==(const StrRefInLength &other) const
{ return length_==other.length_ && std::strncmp(buffer_, other.buffer_, length_)==0; }
size_t hash() const
{
return strHash(buffer_, length_);
}
private:
const char* buffer_ { nullptr };
size_t length_ { 0 };
};
} // namespace alt
namespace std {
/*
template <> template <size_t N>
struct hash<alt::StrFixed<N>>
{
size_t operator()(const alt::StrFixed<N>& key) const noexcept
{
return key.hash();
}
};
*/
template <>
struct hash<alt::StrRef>
{
size_t operator()(const alt::StrRef& key) const noexcept
{
return key.hash();
}
};
template <>
struct hash<alt::StrRefInLength>
{
size_t operator()(const alt::StrRefInLength& key) const noexcept
{
return key.hash();
}
};
} // namespace std
|
4da9ac05aba09f16a9e59741bdc356d04667fbc6
|
8a10cd81b6ef28958011dfc364ea8695361e52ba
|
/lasersensorTest.ino
|
7987b9053528beac2d015c7d314a88c2d860da6b
|
[] |
no_license
|
dowel-art/lasersensorTest
|
ebece20c5990238790f51c46a959a9e8970bccdc
|
0d1297f6ca7ce3a270afe28a1c45c3faf4d6a2e6
|
refs/heads/main
| 2023-02-07T01:39:49.405820
| 2020-12-31T13:38:45
| 2020-12-31T13:38:45
| 325,733,031
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 920
|
ino
|
lasersensorTest.ino
|
/*
Dowel
レーザセンサ テスト用プログラム
20.12.31 Thu.
*/
#include "define.h"
bool sensorState[NUM_SENSOR];
void setup() {
pinMode(PIN_LASERSENSOR_U, INPUT_PULLUP);
pinMode(PIN_LASERSENSOR_D, INPUT_PULLUP);
pinMode(PIN_LED_G, OUTPUT);
pinMode(PIN_LED_R, OUTPUT);
Serial.begin(BAUDRATE);
}
//センサ状態表示
void dump(bool *state) {
for (int i = 0; i < NUM_SENSOR; i++) {
Serial.print(state[i]);
Serial.print(" ");
}
Serial.println();
}
//LED出力
void led(bool *state) {
if (state[0]) digitalWrite(PIN_LED_G, HIGH);
else digitalWrite(PIN_LED_G, LOW);
if (state[1]) digitalWrite(PIN_LED_R, HIGH);
else digitalWrite(PIN_LED_R, LOW);
}
void loop() {
sensorState[0] = digitalRead(PIN_LASERSENSOR_U);
sensorState[1] = digitalRead(PIN_LASERSENSOR_D);
dump(sensorState);
led(sensorState);
delay(10);
}
|
f07d800df5600a153c1a28e9516c63f37c245e2f
|
a227997e9c9be4b0159edc6a1f06e63836a4a7f3
|
/dataconnector/src/distributed-data-connector/ddc/base/src/cache.cpp
|
e1c8089b7f46968fc9b3b3d146a2def80f732ece
|
[
"Apache-2.0"
] |
permissive
|
vertica/r-dataconnector
|
893f8221bc04910aa3121dd518549e0996ef8491
|
ba110fdac21c3c43bab0eab03a6a35d4e709dc7f
|
refs/heads/master
| 2020-05-20T05:55:09.306043
| 2016-01-19T16:29:16
| 2016-01-19T16:29:16
| 40,138,460
| 7
| 2
| null | 2016-01-20T16:01:41
| 2015-08-03T17:28:48
|
C++
|
UTF-8
|
C++
| false
| false
| 1,116
|
cpp
|
cache.cpp
|
/*
(c) Copyright 2015 Hewlett Packard Enterprise Development LP
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 "cache.h"
namespace base {
void Cache::set(const std::string &key, const boost::any &value) {
map_[key] = value;
}
boost::any Cache::get(const std::string &key) {
if (map_.find(key) == map_.end()) {
std::ostringstream os;
os << "key " << key << " not found in the case";
throw std::runtime_error(os.str());
}
return map_[key];
}
bool Cache::contains(const std::string &key) {
return map_.find(key) != map_.end();
}
} // namespace base
|
e88d002a6081c6b32564ea1d6192f2deb9655cac
|
7e61c3983acf94ee4e7716e80b361f6e9894f21f
|
/Laboratorium1/src/Rectangle.cpp
|
41cc7e814d58ac8f25b21084ff12f9f95e966320
|
[] |
no_license
|
iKatha/Shapes
|
2d1d41a1937de66b6ee266e2af3b929a89648755
|
cd81912cc029a4e17ba72b203243df220a8d8b6b
|
refs/heads/master
| 2021-01-22T11:20:55.048870
| 2017-06-08T12:03:35
| 2017-06-08T12:03:35
| 92,684,193
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 550
|
cpp
|
Rectangle.cpp
|
/*
* Rectangle.cpp
*
* Created on: 12.05.2017
* Author: Kasia
*/
#include "Rectangle.h"
#include <cmath>
#include <stdlib.h>
Rectangle::Rectangle(const double & width, const double & height):width(width),height(height) {
}
Rectangle::Rectangle(const double & width, const double & height,const Point & p):Shape(p),width(width),height(height) {
}
Rectangle::~Rectangle() {
}
bool Rectangle::isIn(const Point & p)const{
Point t = p-position;
return ((abs(t.getX()) < width/2) && (abs(t.getY()) < height/2));
}
|
54c42d5b6c7f928f87269a1ca2b4d0f5f1bd4f6f
|
4861fb8b88a6535defbc69f65608463b3b732bdf
|
/amazonquestion to sort even digits at even.cpp
|
8a1c976b3822ad50b95745091d614692f896a9c5
|
[
"MIT"
] |
permissive
|
harnoorsinghdev/Problems-to-ask
|
cb4fdbf96097d174ba3212468070424bb0a1de70
|
735cbe8781f1114d4ea891ea81152273f7ecc83f
|
refs/heads/master
| 2021-01-25T13:51:35.895733
| 2018-08-24T19:45:22
| 2018-08-24T19:45:22
| 123,624,387
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 892
|
cpp
|
amazonquestion to sort even digits at even.cpp
| ERROR: type should be string, got "https://practice.geeksforgeeks.org/problems/even-and-odd-elements-at-even-and-odd-positions/0\n\n#include <iostream>\n using namespace std;\n\nint main() {\n int t, n, a[8000], i, j, x, ele, b;\n cin >> t;\n for (x = 0; x < t; x++)\n {\n cin >> n;\n for (i = 0; i < n; i++)\n {\n cin >> a[i];\n }\n for (i = 0; i < n; i++)\n {\n b = i % 2;\n if (b == a[i] % 2) continue;\n j = i+1;\n for ( ;j < n; j++)\n {\n if (a[j] % 2 == b) break;\n }\n if (j == n) break;\n ele = a[j];\n for ( ;j > i; j--)\n {\n a[j] = a[j-1];\n }\n a[j] = ele;\n i++;\n }\n for (i = 0; i < n; i++)\n {\n cout << a[i] << \" \";\n }\n cout << endl;\n }\n\t//code\n\treturn 0;\n}\n"
|
e85dfa9cf7a7062fa1554a725162dea0236b90f1
|
67ac478ade23318ce9ad77281c4f5200a5aaed59
|
/riot_api/include/riot_api/serverBD.h
|
d2ea41c9fedaa10e4c8308f5784ed7493dd5bdf6
|
[] |
no_license
|
oubenal/riot_api
|
e426ab7d7546b41bd23b38f71e6c63de3a3e2379
|
97529f61a86de08f14aeb849b145146c6658bf01
|
refs/heads/master
| 2021-01-01T18:59:26.554399
| 2017-11-27T17:34:17
| 2017-11-27T17:34:17
| 98,481,109
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,394
|
h
|
serverBD.h
|
#pragma once
#include <cppconn/connection.h>
#include <cppconn/driver.h>
#include <cppconn/resultset.h>
#include "RiotObject.h"
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
#include "LEA_Project.h"
#define _HOST "localhost"
#define _USER "root"
#define _PASS "r4yzAnm5"
#define _DB "riot_api"
namespace Helper
{
inline void assignValue(bool& var, const sql::ResultSet* result_set, const std::string&& column_name)
{
var = result_set->getBoolean(column_name);
}
inline void assignValue(int& var, const sql::ResultSet* result_set, const std::string&& column_name)
{
var = result_set->getInt(column_name);
}
inline void assignValue(long long& var, const sql::ResultSet* result_set, const std::string&& column_name)
{
var = result_set->getInt64(column_name);
}
inline void assignValue(double& var, const sql::ResultSet* result_set, const std::string&& column_name)
{
var = result_set->getDouble(column_name);
}
inline void assignValue(std::string& var, const sql::ResultSet* result_set, const std::string&& column_name)
{
var = result_set->getString(column_name);
}
inline void setStatment(sql::PreparedStatement &prep_stmt, int pos, const bool& val)
{
prep_stmt.setInt(pos, val);
}
inline void setStatment(sql::PreparedStatement &prep_stmt, int pos, const int& val)
{
prep_stmt.setInt(pos, val);
}
inline void setStatment(sql::PreparedStatement &prep_stmt, int pos, const long long& val)
{
prep_stmt.setInt64(pos, val);
}
inline void setStatment(sql::PreparedStatement &prep_stmt, int pos, const double&val)
{
prep_stmt.setDouble(pos, val);
}
inline void setStatment(sql::PreparedStatement &prep_stmt, int pos, const std::string& val)
{
prep_stmt.setString(pos, val);
}
}
class ServerBD
{
public:
static ServerBD* getInstance()
{
static ServerBD serverBD;
return &serverBD;
}
int getFromDBSummonerByName(const std::string& name, Riot::Summoner& summoner) const;
void setInDBSummoner(const Riot::Summoner& summoner) const;
int getFromDBLeaguesBySummonerId(int64_t id, std::list<Riot::LeaguePosition>& league_positions) const;
void setInDBLeagues(const std::list<Riot::LeaguePosition>& league_positions) const;
int getFromDBMatchReference(int64_t accountId, Riot::Matchlist& match_history) const;
void setInDBMatchReference(int64_t accountId, const Riot::Matchlist& match_history) const;
int getFromDBParticipantStats(int64_t gameId, Riot::Match& match) const;
void setInDBParticipantsStats(const Riot::Match& match) const;
int getFromDBMatch(int64_t gameId, Riot::Match& match) const;
void setInDBMatch(const Riot::Match& match) const;
std::string loadKeyChampById(int champion_id) const;
int getFromDBChampionStats(int64_t accountId, std::map<int, LEA_Project::ChampionStats>& champions_stats) const;
void setInDBChampionStats(int64_t accountId, const std::map<int, LEA_Project::ChampionStats>& champions_stats) const;
int getListChampions(std::map<int, Riot::Champion>& champion_list) const;
private:
ServerBD();// default constructor available only to members or friends of this class
ServerBD(const ServerBD &old) = delete; // disallow copy constructor
const ServerBD &operator=(const ServerBD &old) = delete; //disallow assignment operator
~ServerBD();
private: // private data for an instance of this class
sql::Driver *driver;
sql::Connection *con;
};
|
a5f774fb86be8895b78b98bba0e532ab87683f06
|
7f67919b5f5e087e8a26eacd8d5d1c1f94224cc6
|
/src/backends/cl/ClBackendDefaultAllocator.hpp
|
300f56000064c57ff03ae0e5bbd4f6e7d6ae8c94
|
[
"BSD-3-Clause",
"CC0-1.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
ARM-software/armnn
|
11f0b169291ade6a08cbef1e87b32000aeed4767
|
49f609d9e633f52fcdc98e6e06178e618597e87d
|
refs/heads/branches/armnn_23_05
| 2023-09-04T07:02:43.218253
| 2023-05-15T10:24:43
| 2023-05-15T16:08:53
| 124,536,178
| 1,053
| 329
|
MIT
| 2023-05-22T23:28:55
| 2018-03-09T12:11:48
|
C++
|
UTF-8
|
C++
| false
| false
| 1,392
|
hpp
|
ClBackendDefaultAllocator.hpp
|
//
// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <cstddef>
#include <memory>
#include <armnn/MemorySources.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
namespace armnn
{
/** Default Memory Allocator class returned from IBackendInternal::GetDefaultAllocator(MemorySource) */
class ClBackendDefaultAllocator : public armnn::ICustomAllocator
{
public:
ClBackendDefaultAllocator() = default;
void* allocate(size_t size, size_t alignment = 0) override
{
IgnoreUnused(alignment);
cl_mem buf{ clCreateBuffer(arm_compute::CLScheduler::get().context().get(),
CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE,
size,
nullptr,
nullptr)};
return static_cast<void *>(buf);
}
void free(void* ptr) override
{
ARM_COMPUTE_ERROR_ON(ptr == nullptr);
clReleaseMemObject(static_cast<cl_mem>(ptr));
}
armnn::MemorySource GetMemorySourceType() override
{
return armnn::MemorySource::Gralloc;
}
void* GetMemoryRegionAtOffset(void* buffer, size_t offset, size_t alignment = 0) override
{
IgnoreUnused(alignment);
return static_cast<char*>(buffer) + offset;
}
};
} // namespace armnn
|
bb1e3fb5d98aef6f366655f802796a11c0ba3d9c
|
3f4f66560c936cf7c59139b48d183700cbbc6fce
|
/trunk/3dParty/QMapControl/tilemapadapter.h
|
700fd3f1b304cf5cd510b354206acbe6c658240b
|
[] |
no_license
|
BackupTheBerlios/qtfarm-svn
|
15c62e68f45b8ca70ec0035994024c2e6be90906
|
99239c1ce4c81dafd60d17536b098255cee88a08
|
refs/heads/master
| 2020-04-04T01:06:50.021447
| 2008-06-21T13:20:47
| 2008-06-21T13:20:47
| 40,804,471
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,970
|
h
|
tilemapadapter.h
|
/***************************************************************************
* Copyright (C) 2007 by Kai Winter *
* kaiwinter@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef TILEMAPADAPTER_H
#define TILEMAPADAPTER_H
#include "mapadapter.h"
namespace qmapcontrol
{
//! MapAdapter for servers with image tiles
/*!
* Use this derived MapAdapter to display maps from OpenStreetMap
* @author Kai Winter <kaiwinter@gmx.de>
*/
class TileMapAdapter : public MapAdapter
{
Q_OBJECT
public:
//! constructor
/*!
* Sample of a correct initialization of a MapAdapter:<br/>
* TileMapAdapter* ta = new TileMapAdapter("192.168.8.1", "/img/img_cache.php/%1/%2/%3.png", 256, 0,17);<br/>
* The placeholders %1, %2, %3 stands for x, y, z<br/>
* The minZoom is 0 (means the whole world is visible). The maxZoom is 17 (means it is zoomed in to the max)
* @param host The servers URL
* @param serverPath The path to the tiles with placeholders
* @param tilesize the size of the tiles
* @param minZoom the minimum zoom level
* @param maxZoom the maximum zoom level
*/
TileMapAdapter(const QString& host, const QString& serverPath, int tilesize, int minZoom = 0, int maxZoom = 17);
virtual ~TileMapAdapter();
virtual QPoint coordinateToDisplay(const QPointF&) const;
virtual QPointF displayToCoordinate(const QPoint&) const;
qreal PI;
protected:
qreal rad_deg(qreal) const;
qreal deg_rad(qreal) const;
virtual bool isValid(int x, int y, int z) const;
virtual void zoom_in();
virtual void zoom_out();
virtual QString query(int x, int y, int z) const;
virtual int tilesonzoomlevel(int zoomlevel) const;
virtual int xoffset(int x) const;
virtual int yoffset(int y) const;
};
}
#endif
|
7613f940347c82231aaf78331c685b1c147c0f47
|
f800a2e27fe5684e0b38005c7be26d7f633da514
|
/agar.io/Field.hpp
|
6107708c70facbd4ded016f4fb4fd30d9e34a664
|
[
"MIT"
] |
permissive
|
xiziyi/c-big_project
|
8ed56d774e1a1dfdb7d2ddc77b1d1a73991363e4
|
bcd1fd8016d79f669f07ecca42c8c4fab8d319e8
|
refs/heads/master
| 2021-01-19T16:26:36.839504
| 2017-06-21T17:03:17
| 2017-06-21T17:03:17
| 88,264,406
| 1
| 1
| null | 2017-06-20T13:02:07
| 2017-04-14T12:06:22
|
C++
|
WINDOWS-1251
|
C++
| false
| false
| 1,175
|
hpp
|
Field.hpp
|
#pragma once
#include "declarations.hpp"
#include <vector>
#include <SFML\Graphics.hpp>
#include "Unit.hpp"
using namespace std;
using namespace sf;
class Field
{
private:
Vector2<size_t> size;
vector<Cell *> cells;
vector<Fraction *> fractions;
vector<Pellet *> pellets;
vector<Virus *> viruses;
public:
void Update(Time mls);
void Draw(RenderWindow& window, const Player& player);
// Все игроки вмещаются на поле
void Draw(RenderWindow& window);
void AddUnit(Unit *unit);
bool DeleteUnit(const Unit *unit);
void DeleteUnit(const Unit *unit, size_t position);
bool ZeroizeUnit(const Unit *unit);
void ZeroizeUnit(const Unit *unit, size_t position);
void Load(FILE *input);
void Save(FILE *output);
vector<Cell *>& GetCells();
vector<Fraction *>& GetFractions();
vector<Pellet *>& GetPellets();
vector<Virus *>& GetViruses();
const vector<Cell *>& GetCells() const;
const vector<Fraction *>& GetFractions() const;
const vector<Pellet *>& GetPellets() const;
const vector<Virus *>& GetViruses() const;
explicit Field(Vector2<size_t> size);
Vector2<size_t> GetSize() const;
void leadPositionAndSpeed(Unit* unit);
};
|
bb6fa6ca282cafce7d8eaba93167b038ddc7cfb2
|
8f50c262f89d3dc4f15f2f67eb76e686b8f808f5
|
/Control/AthenaServices/src/AthIncFirerAlg.cxx
|
683394c6a8adfdc86c61cb6e2bf76edd09b0c519
|
[
"Apache-2.0"
] |
permissive
|
strigazi/athena
|
2d099e6aab4a94ab8b636ae681736da4e13ac5c9
|
354f92551294f7be678aebcd7b9d67d2c4448176
|
refs/heads/master
| 2022-12-09T02:05:30.632208
| 2020-09-03T14:03:18
| 2020-09-03T14:03:18
| 292,587,480
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,222
|
cxx
|
AthIncFirerAlg.cxx
|
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "AthIncFirerAlg.h"
#include "GaudiKernel/IIncidentSvc.h"
#include "GaudiKernel/Incident.h"
#include "AthenaKernel/errorcheck.h"
AthIncFirerAlg::AthIncFirerAlg( const std::string& name, ISvcLocator* pSvcLocator ):AthReentrantAlgorithm(name,pSvcLocator),m_Serial(false){
declareProperty("Incidents",m_incLists,"Incidents to fire");
declareProperty("FireSerial",m_Serial,"Whether to fire serial incidents");
}
StatusCode AthIncFirerAlg::initialize(){
m_incSvc = service("IncidentSvc",true);
//Copied from CPUCruncher.cpp
if (m_incLists.value().size()==0){
ATH_MSG_ERROR("Need to have at least one incident defined!" <<name());
return StatusCode::FAILURE;
}
return StatusCode::SUCCESS;
}
StatusCode AthIncFirerAlg::execute(const EventContext& ctx)const {
auto ctxcp=ctx;
for(auto & i:m_incLists.value()){
ATH_MSG_VERBOSE("Firing incident "<<i);
m_incSvc->fireIncident(std::make_unique<Incident>(name(),i,ctxcp));
if (m_Serial.value()) m_incSvc->fireIncident(Incident(name(),i,ctxcp));
}
return StatusCode::SUCCESS;
}
StatusCode AthIncFirerAlg::finalize(){
return StatusCode::SUCCESS;
}
|
a6bf39933941075390a17516661aeeeb5675278c
|
5b885600120e8ea9ccf945f6465ce5928d7fa55f
|
/src/base/objs/UniversalGroundMap/unitTest.cpp
|
f02ca3b69f0595067b86894cdfe525d58d19a73b
|
[
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] |
permissive
|
hassanjallow/isis3
|
b2f2156a104ded38f7b3867f18b35a759d8987db
|
712187cfbcdc6093b7b45b4ef0b4eb87dc09a7de
|
refs/heads/master
| 2021-05-27T16:44:07.006539
| 2010-03-19T16:47:37
| 2010-03-19T16:47:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,181
|
cpp
|
unitTest.cpp
|
#include <iostream>
#include <iomanip>
#include "iException.h"
#include "UniversalGroundMap.h"
#include "Camera.h"
#include "Pvl.h"
#include "Preference.h"
using namespace std;
int main (int argc, char *argv[]) {
Isis::Preference::Preferences(true);
try{
cout << "UnitTest for Universal Ground Map" << endl;
cout << " Testing Camera Model..." << endl;
Isis::Pvl p("$viking2/testData/f348b26.cub");
Isis::UniversalGroundMap ugm(p);;
cout << setprecision(9);
cout << "Is Projection? = " << ugm.HasProjection() << endl << endl;
// Test all four corners to make sure the conversions are right
ugm.SetImage(1.0, 1.0);
cout << "For (1.0, 1.0) ..." << endl;
cout << "Universal Latitude = " << ugm.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm.UniversalLongitude() << endl;
ugm.SetUniversalGround(ugm.UniversalLatitude(), ugm.UniversalLongitude());
cout << "Sample = " << ugm.Sample() << endl;
cout << "Line = " << ugm.Line() << endl << endl;
ugm.SetImage(1204, 1.0);
cout << "For (1204, 1.0) ..." << endl;
cout << "Universal Latitude = " << ugm.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm.UniversalLongitude() << endl;
ugm.SetUniversalGround(ugm.UniversalLatitude(), ugm.UniversalLongitude());
cout << "Sample = " << ugm.Sample() << endl;
cout << "Line = " << ugm.Line() << endl << endl;
ugm.SetImage(1.0, 1056);
cout << "For (1.0, 1056) ..." << endl;
cout << "Universal Latitude = " << ugm.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm.UniversalLongitude() << endl;
ugm.SetUniversalGround(ugm.UniversalLatitude(), ugm.UniversalLongitude());
cout << "Sample = " << ugm.Sample() << endl;
cout << "Line = " << ugm.Line() << endl << endl;
ugm.SetImage(1204, 1056);
cout << "For (1204, 1056) ..." << endl;
cout << "Universal Latitude = " << ugm.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm.UniversalLongitude() << endl;
ugm.SetUniversalGround(ugm.UniversalLatitude(), ugm.UniversalLongitude());
cout << "Sample = " << ugm.Sample() << endl;
cout << "Line = " << ugm.Line() << endl << endl;
cout << " Testing Projection..." << endl;
Isis::Pvl p2("$base/dems/molaMarsPlanetaryRadius0001.cub");
Isis::UniversalGroundMap ugm2(p2);
cout << "Is Projection? = " << ugm2.HasProjection() << endl << endl;
// Test all four corners to make sure the conversions are right
ugm2.SetImage(1.0, 1.0);
cout << "For (1.0, 1.0) ..." << endl;
cout << "Universal Latitude = " << ugm2.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm2.UniversalLongitude() << endl;
ugm2.SetUniversalGround(ugm2.UniversalLatitude(), ugm2.UniversalLongitude());
cout << "Sample = " << ugm2.Sample() << endl;
cout << "Line = " << ugm2.Line() << endl << endl;
ugm2.SetImage(23040, 1.0);
cout << "For (23040, 1.0) ..." << endl;
cout << "Universal Latitude = " << ugm2.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm2.UniversalLongitude() << endl;
ugm2.SetUniversalGround(ugm2.UniversalLatitude(), ugm2.UniversalLongitude());
cout << "Sample = " << ugm2.Sample() << endl;
cout << "Line = " << ugm2.Line() << endl << endl;
ugm2.SetImage(1.0, 11520);
cout << "For (1.0, 11520) ..." << endl;
cout << "Universal Latitude = " << ugm2.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm2.UniversalLongitude() << endl;
ugm2.SetUniversalGround(ugm2.UniversalLatitude(), ugm2.UniversalLongitude());
cout << "Sample = " << ugm2.Sample() << endl;
cout << "Line = " << ugm2.Line() << endl << endl;
ugm2.SetImage(23040, 11520);
cout << "For (23040, 11520) ..." << endl;
cout << "Universal Latitude = " << ugm2.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm2.UniversalLongitude() << endl;
ugm2.SetUniversalGround(ugm2.UniversalLatitude(), ugm2.UniversalLongitude());
cout << "Sample = " << ugm2.Sample() << endl;
cout << "Line = " << ugm2.Line() << endl << endl;
cout << " Testing Camera Model and Projection..." << endl;
Isis::Pvl p3("$mgs/testData/m0402852.cub");
Isis::UniversalGroundMap ugm3(p3);
cout << "Is Projection? = " << ugm3.HasProjection() << endl << endl;
// Test all four corners to make sure the conversions are right
ugm3.SetImage(1.0, 1.0);
cout << "For (1.0, 1.0) ..." << endl;
cout << "Universal Latitude = " << ugm3.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm3.UniversalLongitude() << endl;
ugm3.SetUniversalGround(ugm3.UniversalLatitude(), ugm3.UniversalLongitude());
cout << "Sample = " << ugm3.Sample() << endl;
cout << "Line = " << ugm3.Line() << endl << endl;
ugm3.SetImage(1721, 1.0);
cout << "For (1721, 1.0) ..." << endl;
cout << "Universal Latitude = " << ugm3.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm3.UniversalLongitude() << endl;
ugm3.SetUniversalGround(ugm3.UniversalLatitude(), ugm3.UniversalLongitude());
cout << "Sample = " << ugm3.Sample() << endl;
cout << "Line = " << ugm3.Line() << endl << endl;
ugm3.SetImage(1.0, 667);
cout << "For (1.0, 667) ..." << endl;
cout << "Universal Latitude = " << ugm3.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm3.UniversalLongitude() << endl;
ugm3.SetUniversalGround(ugm3.UniversalLatitude(), ugm3.UniversalLongitude());
cout << "Sample = " << ugm3.Sample() << endl;
cout << "Line = " << ugm3.Line() << endl << endl;
ugm3.SetImage(1721, 667);
cout << "For (1721, 667) ..." << endl;
cout << "Universal Latitude = " << ugm3.UniversalLatitude() << endl;
cout << "Universal Longitude = " << ugm3.UniversalLongitude() << endl;
ugm3.SetUniversalGround(ugm3.UniversalLatitude(), ugm3.UniversalLongitude());
cout << "Sample = " << ugm3.Sample() << endl;
cout << "Line = " << ugm3.Line() << endl << endl;
}
catch (Isis::iException &e) {
e.Report();
}
}
|
a20b2fe24fabcb40dbc969eb8fad8f0c3f6218b9
|
978932fa84bf452ec2d1da5ec95008d650734c97
|
/SLCodingTest/GeeksforGeeks/Sen_StringArrayTop10.cpp
|
8be322a4e384c83bc716fc854015e97cd1ea7a61
|
[
"MIT"
] |
permissive
|
SenonLi/CodingOlineJudge
|
d138891dab403a3fb5e5ba2a1b55c8c15fbd4ad7
|
b22b842cd51e0a8a9950a9b4d8b1e3c8ed3ac675
|
refs/heads/master
| 2021-01-12T17:06:01.592888
| 2018-12-23T04:59:14
| 2018-12-23T04:59:14
| 71,503,112
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,241
|
cpp
|
Sen_StringArrayTop10.cpp
|
#include "Sen_StringArrayTop10.h"
Sen_StringArrayTop10::Sen_StringArrayTop10()
{
}
Sen_StringArrayTop10::~Sen_StringArrayTop10()
{
}
void Sen_StringArrayTop10::reverseStringAlphabet(std::string &alphabetString)
{
int head = 0, tail = alphabetString.length() - 1;
char temp;
while (head < tail) {
if (!isAlphabet(alphabetString[head])) head++; // locate a head alphabet;
else if (!isAlphabet(alphabetString[tail])) tail--; // locate a tail alphabet;
else { // swap if already find both alphabets of on the head and on the tail
temp = alphabetString[tail];
alphabetString[tail--] = alphabetString[head];
alphabetString[head++] = temp;
}
}
}
bool Sen_StringArrayTop10::isPalindrome(std::string str, int low, int high)
{
while (low < high)
{
if (str[low] != str[high])
return false;
low++;
high--;
}
return true;
}
void Sen_StringArrayTop10::allPalPartUtil(std::vector<std::vector<std::string> > &allPart
, std::vector<std::string> &currPart, int start, int n, std::string str)
{
// If 'start' has reached len
if (start >= n)
{
allPart.push_back(currPart);
return;
}
// Pick all possible ending points for substrings
for (int i = start; i<n; i++)
{
// If substring str[start..i] is palindrome
if (isPalindrome(str, start, i))
{
// Add the substring to result (one push, one pop, to make currPart alive)
currPart.push_back(str.substr(start, i - start + 1));
// Recur for remaining remaining substring
allPalPartUtil(allPart, currPart, i + 1, n, str);
// Remove substring str[start..i] from current
// (one push, one pop, to make currPart alive)
currPart.pop_back();
}
}
}
void Sen_StringArrayTop10::allPalPartitions(std::string str)
{
int n = str.length();
// To Store all palindromic partitions
std::vector<std::vector<std::string> > allPart;
// To store current palindromic partition
std::vector<std::string> currPart;
// Call recursive function to generate all partiions
// and store in allPart
allPalPartUtil(allPart, currPart, 0, n, str);
// Print all partitions generated by above call
for (int i = 0; i< allPart.size(); i++)
{
for (int j = 0; j<allPart[i].size(); j++)
std::cout << allPart[i][j] << " ";
std::cout << "\n";
}
}
|
bb78ee532884e62af4f91164d3cf727255823fe7
|
7c51106180099970efda4ac9bf2013150ca5e3fa
|
/src/main.cpp
|
bda1115512efd8b9dcd430bb45336b3b854c634d
|
[] |
no_license
|
pielet/Hair-DER
|
096d52647396de9451f2cc97262a4e67e12f36ea
|
d0d36a236bc4807b48bca5097fd53c43db9df3fc
|
refs/heads/master
| 2020-07-03T09:13:03.671469
| 2020-06-28T06:14:29
| 2020-06-28T06:14:29
| 201,862,956
| 5
| 2
| null | 2019-08-25T01:58:22
| 2019-08-12T05:21:58
|
C++
|
UTF-8
|
C++
| false
| false
| 9,388
|
cpp
|
main.cpp
|
// #define OUTPUT_PNG
#include <iostream>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <AntTweakBar.h>
#include <png++/png.hpp>
#include "Shader.h"
#include "MathDefs.h"
#include "Simulator.h"
#include "Camera.h"
// file path
const std::string modelPath = "assets/sample-1.xml";
const std::string transPath = "assets/transform.dat";
const std::string vertexShader = "assets/TransformVertexShader.vertexshader";
const std::string fragmentShader = "assets/ColorFragmentShader.fragmentshader";
const std::string outputDir = "assets/output/";
// window size
const int width = 1024;
const int height = 768;
// AntTweatBar: GLFW -> GLFW3
inline void TwEventKeyGLFW3(GLFWwindow* window, int key, int scancode, int action, int mods)
{ TwEventKeyGLFW(key, action); }
inline void TwEventCharGLFW3(GLFWwindow* window, unsigned int codepoint)
{ TwEventCharGLFW(codepoint, GLFW_PRESS); }
inline void TwWindowSizeGLFW3(GLFWwindow* window, int width, int height)
{ TwWindowSize(width, height); }
// GLFW callback to Camera callback
inline void CameraMouseButton(GLFWwindow* window, int button, int action, int mods) {
Camera* cam = (Camera*) glfwGetWindowUserPointer(window);
if (cam) cam->mouse_button_callback(button, action);
};
inline void CameraCursorPos(GLFWwindow* window, double xpos, double ypos) {
Camera* cam = (Camera*) glfwGetWindowUserPointer(window);
if (cam) cam->cursor_position_callback(xpos, ypos);
};
inline void CameraScroll(GLFWwindow* window, double xoffset, double yoffset) {
Camera* cam = (Camera*) glfwGetWindowUserPointer(window);
if (cam) cam->scroll_callback(yoffset);
};
bool savePNG(const uint8_t* pixel, int step);
int main(){
/********************** Initialize GLFW *************************/
if (!glfwInit())
{
std::cerr << "Failed to initialize GLFW\n";
getchar();
return -1;
}
glfwWindowHint(GLFW_SAMPLES, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// Open a window and create its OpenGL context
GLFWwindow* window = glfwCreateWindow(width, height, "Hair-DER", NULL, NULL);
if (window == NULL) {
std::cerr << "Failed to open GLFW window.\n";
getchar();
glfwTerminate();
return -1;
}
glfwMakeContextCurrent( window );
// Ensure we can capture the escape key being pressed below
glfwSetInputMode(window, GLFW_STICKY_KEYS, GL_TRUE);
/*********************** Initialize AntTweakBar ********************/
TwInit(TW_OPENGL_CORE, NULL);
TwWindowSize(width, height);
/********************** Initialize scene ************************/
Simulator* sim = new Simulator(modelPath, transPath);
Camera* camera = sim->getCamera();
glfwSetWindowUserPointer(window, camera);
int numParticle = sim->getNumParticle();
int numStrand = sim->getNumStrand();
const std::vector<int>& startIndex = sim->getStartIndex();
std::cout << "Strands: " << numStrand
<< "\nTotal particle: " << numParticle << std::endl;
// Bind callback function
glfwSetKeyCallback( window, TwEventKeyGLFW3 );
glfwSetMouseButtonCallback( window, CameraMouseButton);
glfwSetCharCallback( window, TwEventCharGLFW3 );
glfwSetCursorPosCallback( window, CameraCursorPos );
glfwSetScrollCallback( window, CameraScroll );
/*********************** Initialize GLEW **************************/
glewExperimental = true; // Needed for core profile
if (glewInit() != GLEW_OK) {
std::cerr << "Failed to initialize GLEW\n";
getchar();
glfwTerminate();
return -1;
}
// Enable depth test
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
GLuint VertexArrayID;
glGenVertexArrays(1, &VertexArrayID);
glBindVertexArray(VertexArrayID);
// Create and compile GLSL program from the shaders
GLuint programID = LoadShaders(vertexShader.c_str(), fragmentShader.c_str());
// prepare buffer & bind data
GLuint MatrixID = glGetUniformLocation(programID, "MVP");
Matrix4s projection = camera->perspective(camera->radians(45.0), double(width) / height, 0.1, 100.0);
Matrix4s view = camera->getLookAt();
Matrix4s MVP = projection * view;
GLfloat* g_Dof_buffer_data = sim->getBuffer();
GLfloat* g_color_buffer_data = new GLfloat[3 * numParticle];
for (int i = 0; i < numStrand; ++i) {
Vector3f color = Vector3f::Random();
for (int j = startIndex[i]; j < startIndex[i + 1]; ++j) {
g_color_buffer_data[3 * j] = color(0);
g_color_buffer_data[3 * j + 1] = color(1);
g_color_buffer_data[3 * j + 2] = color(2);
}
}
// grid data ...
float interval = 0.2f;
int numGrid = 10;
float range = interval * numGrid;
GLfloat* g_grid_data = new GLfloat[2 * (numGrid * 2 + 1) * 12 + 12];
Vector3f color;
for (int i = 0; i < 2 * numGrid + 1; ++i) {
if (i == numGrid) color = Vector3f(.6f, .3f, .3f);
else color = Vector3f(.25, .25, .25);
float base = i * interval - range;
int idx = 12 * i;
g_grid_data[idx] = g_grid_data[idx + 6] = base;
g_grid_data[idx + 1] = g_grid_data[idx + 7] = 0;
g_grid_data[idx + 2] = -range;
g_grid_data[idx + 8] = range;
for (int j = 3; j < 6; ++j) {
g_grid_data[idx + j] = g_grid_data[idx + 6 + j] = color(j - 3);
}
idx += (numGrid * 2 + 1) * 12;
g_grid_data[idx] = -range;
g_grid_data[idx + 6] = range;
g_grid_data[idx + 1] = g_grid_data[idx + 7] = 0;
g_grid_data[idx + 2] = g_grid_data[idx + 8] = base;
for (int j = 3; j < 6; ++j) {
g_grid_data[idx + j] = g_grid_data[idx + 6 + j] = color(j - 3);
}
}
int idx = 2 * (numGrid * 2 + 1) * 12;
g_grid_data[idx] = g_grid_data[idx + 2] = g_grid_data[idx + 6] = g_grid_data[idx + 8] = 0;
g_grid_data[idx + 1] = -range;
g_grid_data[idx + 7] = range;
color = Vector3f(.6f, .3f, .3f);
for (int j = 3; j < 6; ++j) {
g_grid_data[idx + j] = g_grid_data[idx + 6 + j] = color(j - 3);
}
GLuint vertexbuffer;
glGenBuffers(1, &vertexbuffer);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * numParticle, g_Dof_buffer_data, GL_DYNAMIC_DRAW);
GLuint colorbuffer;
glGenBuffers(1, &colorbuffer);
glBindBuffer(GL_ARRAY_BUFFER, colorbuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * numParticle, g_color_buffer_data, GL_STATIC_DRAW);
GLuint gridbuffer;
glGenBuffers(1, &gridbuffer);
glBindBuffer(GL_ARRAY_BUFFER, gridbuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * (2 * (numGrid * 2 + 1) * 12 + 12), g_grid_data, GL_STATIC_DRAW);
uint8_t* pixel = new uint8_t[height * width * 3];
/************************* Main loop ***************************/
while ( !(sim->isQuit()) && glfwWindowShouldClose(window) == 0 ) {
// Clear the screen
// glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glUseProgram(programID);
view = camera->getLookAt();
MVP = projection * view;
Matrix4f f_mvp = MVP.cast<float>();
glUniformMatrix4fv(MatrixID, 1, GL_FALSE, f_mvp.data()); // column-major order, must be float
// 1rst attribute buffer : vertices
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLdouble) * 3 * numParticle, g_Dof_buffer_data, GL_DYNAMIC_DRAW);
glVertexAttribPointer(
0, // attribute. No particular reason for 0, but must match the layout in the shader.
3, // size
GL_FLOAT, // type
GL_FALSE, // normalized?
0, // stride
(void*)0 // array buffer offset
);
// 2nd attricute buffer: colors
glEnableVertexAttribArray(1);
glBindBuffer(GL_ARRAY_BUFFER, colorbuffer);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
// Draw the hair strand !
for (int i = 0; i < numStrand; ++i) {
glDrawArrays(GL_LINE_STRIP, startIndex[i], startIndex[i + 1] - startIndex[i]);
}
glBindBuffer(GL_ARRAY_BUFFER, gridbuffer);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (void*)0);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (void*)(3 * sizeof(GLfloat)));
glDrawArrays(GL_LINES, 0, 4 * (numGrid * 2 + 1) + 2);
glDisableVertexAttribArray(0);
glDisableVertexAttribArray(1);
#ifdef OUTPUT_PNG
if (sim->shouldSave()) {
glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*)pixel);
savePNG(pixel, sim->getStep());
sim->shouldSave() = false;
}
#endif
TwDraw();
// Swap buffers
glfwSwapBuffers(window);
glfwPollEvents();
};
/************************** clear up and exit *************************/
delete sim;
delete [] pixel;
// Cleanup VBO and shader
glDeleteBuffers(1, &vertexbuffer);
glDeleteBuffers(1, &colorbuffer);
glDeleteBuffers(1, &gridbuffer);
glDeleteProgram(programID);
glDeleteVertexArrays(1, &VertexArrayID);
// Close OpenGL window and terminate GLFW nand AntTweakBar
glfwTerminate();
return 0;
}
bool savePNG(const uint8_t* pixel, int step) {
png::image<png::rgb_pixel> image(width, height);
int idx = 0;
for (int y = height - 1; y >= 0; --y) { // inverse
for (int x = 0; x < width; ++x) {
image[y][x] = png::rgb_pixel(pixel[idx], pixel[idx + 1], pixel[idx + 2]);
idx += 3;
}
}
std::stringstream ss;
ss << outputDir << step << ".PNG";
image.write(ss.str());
return true;
}
|
41e3c0e0decb069c29b8d849b901a016bb482262
|
dce8e139b2a15b88e0663388809550d65ed24141
|
/triggers/time_v1/time_trigger.cpp
|
c8db0342a17e326e9dc9d42cce1006f067df872b
|
[] |
no_license
|
alexdrozdov/asr-fsm-mental-fsm
|
fd87aea8f9debd33019532d3aa46339437f0181f
|
eccb10ac1722be5bebed5249c3ab08d2e85540b5
|
refs/heads/master
| 2021-01-02T08:33:11.160444
| 2014-09-02T08:40:21
| 2014-09-02T08:40:21
| 40,648,864
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,756
|
cpp
|
time_trigger.cpp
|
/*
* time_trigger.cpp
*
* Created on: 11.06.2011
* Author: drozdov
*/
#include <stdlib.h>
#include <iostream>
#include "base_trigger.h"
#include "time_trigger.h"
#include "mental_fsm.h"
#include "xml_support.h"
#include "trigger_tree.h"
#include "mental_fsm_ext.h"
using namespace std;
CTimeTrigger::CTimeTrigger(string file_name) : CBaseTrigger() {
xmlConfigPtr xml = CreateXmlConfig((char*)file_name.c_str());
if (NULL == xml) {
cout << "CTimeTrigger::CTimeTrigger error: couldn`t load file <" << file_name << ">" << endl;
return;
}
values.resize(5);
prev_values.resize(5);
//Инициализируем предыдущие значения так, чтобы они вызвали срабатывание всех зависимых триггеров при первой же обработке
for (int i=0;i<5;i++) {
prev_values[i] = -10;
}
string latch_type = xmlGetStringValue(xml,"/trigger/latch");
string direction = xmlGetStringValue(xml,"/trigger/count/direction");
string stop_type = xmlGetStringValue(xml,"/trigger/stop/type");
string sense = xmlGetStringValue(xml,"/trigger/sense/event");
szTriggerName = xmlGetStringValue(xml,"/trigger/name");
trig_up_threshold = xmlGetDoubleValue(xml,"/trigger/sense/max",0);
trig_down_threshold = xmlGetDoubleValue(xml,"/trigger/sense/min",0);
up_time = (int)((long long)xmlGetDelayUsValue(xml,"/trigger/count/up", -1) * (long long)fsm->GetLocalSamplerate() / 1000000LL);
down_time = (int)((long long)xmlGetDelayUsValue(xml,"/trigger/count/down", -1) * (long long)fsm->GetLocalSamplerate() / 1000000LL);
if ("combinational" == latch_type) {
latch = combinational;
} else if ("triggered" == latch_type) {
latch = triggered;
} else {
cout << "CTimeTrigger::CTimeTrigger error: unknown latch type " << latch_type << endl;
latch = combinational;
}
if ("up" == direction) {
mode = count_up;
} else if ("down" == direction) {
mode = count_down;
} else if ("updown" == direction) {
mode = count_up_down;
} else {
cout << "CTimeTrigger::CTimeTrigger error: unknown count direction " << direction << endl;
mode = count_up;
}
if ("once" == stop_type) {
circle = loop_once;
} else if ("infinite" == stop_type) {
circle = loop_infinite;
} else if ("count" == stop_type) {
circle = loop_count;
} else {
cout << "CTimeTrigger::CTimeTrigger error: unknown count loop " << stop_type << endl;
circle = loop_once;
}
if ("trigup" == sense) {
sense = sense_trigup;
} else if ("trigdown" == sense) {
sense = sense_trigdown;
} else if ("trigrange" == sense) {
sense = sense_trigrange;
} else {
cout << "CTimeTrigger::CTimeTrigger error: unknown trigger sense " << sense << endl;
sense = sense_trigup;
}
anchs.resize(1);
anchs[0] = NULL;
enabled = xmlGetBooleanValue(xml,"/trigger/enabled",false);
input_state = timetrigger_in_unknown;
trigger_stopped = false;
was_trigged = false;
//Инициализируем запись об этом триггере для дерева триггеров
tree_leaf = new trigger_tree_leaf;
tree_leaf->distance = 0;
tree_leaf->trigger = this;
trigger_tree->RegisterChildTrigger(tree_leaf);
fsm->RegisterTrigger(this);
fsm->RegisterTimeTrigger(this);
touched = false;
dump_enabled = false;
dump_to_file = false;
}
int CTimeTrigger::BindTo(trig_inout_spec* self, trig_inout_spec* other) {
if (NULL==self || NULL==other) {
cout << "CTimeTrigger::BindTo error - zero pointers received" << endl;
return -1;
}
//Проверяем спецификацию выхода этого триггера
if (self->trigger != this) {
cout << "CTimeTrigger::BindTo error - wrong pointer self. Differs from real pointer to this class" << endl;
return 1;
}
if (inout_out != self->inout) {
cout << "CTimeTrigger::BindTo error - wrong output specification" << endl;
return 1;
}
if (self->offs >= (int)values.size()) {
cout << "CTimeTrigger::BindTo error - output out of range" << endl;
return 1;
}
//Проверяем спецификацию вязываемого триггера
if (NULL == other->trigger) {
cout << "CTimeTrigger::BindTo error - zero pointer other." << endl;
return 1;
}
if (inout_out == other->inout) {
cout << "CTimeTrigger::BindTo error - wrong input specification" << endl;
return 1;
}
//if (other->offs > other->trigger->GetExtendedOutsCount()) {
// cout << "CTimeTrigger::BindFrom error - output out of range" << endl;
// return 1;
//}
//Проверяем, что этого триггера нет в списке зависимых триггеров
vector<trig_inout_spec*>::iterator it;
for ( it=self->trigger->deps.begin() ; it < self->trigger->deps.end(); it++ ) {
trig_inout_spec* tis = *it;
if (tis->trigger == other->trigger) {
cout << "CTimeTrigger::BindTo warning - " << self->trigger->szTriggerName << " was already binded to " << other->trigger->szTriggerName << endl;
return 1;
}
}
self->trigger->deps.push_back(other);
return 0;
}
int CTimeTrigger::BindFrom(trig_inout_spec* self, trig_inout_spec* other) {
if (NULL==self || NULL==other) {
cout << "CTimeTrigger::BindFrom error - zero pointers received" << endl;
return -1;
}
//Проверяем спецификацию входа этого триггера
if (self->trigger != this) {
cout << "CTimeTrigger::BindFrom error - wrong pointer self. Differs from real pointer to this class" << endl;
return 1;
}
if (inout_in != self->inout) {
cout << "CTimeTrigger::BindFrom error - wrong input specification" << endl;
return 1;
}
if (self->offs > 0) {
cout << "CTimeTrigger::BindFrom error - input out of range" << endl;
return 1;
}
//Проверяем спецификацию вязываемого триггера
if (NULL == other->trigger) {
cout << "CTimeTrigger::BindFrom error - zero pointer other." << endl;
return 1;
}
if (inout_out != other->inout) {
cout << "CTimeTrigger::BindFrom error - wrong output specification" << endl;
return 1;
}
if (other->offs > other->trigger->GetExtendedOutsCount()) {
cout << "CTimeTrigger::BindFrom error - output out of range" << endl;
return 1;
}
//Проверки на правильность данных прошли успешно.
if (anchs[0] != NULL) {
cout << "CTimeTrigger::BindFrom warning - already was binded" << endl;
}
anchs[0] = other;
return 0;
}
int CTimeTrigger::GetExtendedOutsCount() {
return (int)values.size();
}
bool CTimeTrigger::GetEnabled() {
return enabled;
}
void CTimeTrigger::SetEnabled(bool b) {
enabled = b;
if (!b) {
//Триггер отключен. Соответственно сбрасываем его защелку
was_trigged = false;
trigger_stopped = false;
}
}
double CTimeTrigger::GetIntegralState() {
return value;
}
double CTimeTrigger::GetExtendedState(int nExtender) {
if (nExtender<0 || nExtender >= (int)values.size()) {
cout << "CTimeTrigger::GetExtendedState error - index out of range in " << szTriggerName << endl;
return -1;
}
return values[nExtender];
}
void CTimeTrigger::ProcessAnchestors() {
if (!enabled || anchs.size()<1) {
//Работа триггера запрещена или нет ни одного предка
return;
}
if (trigger_stopped) {
return;
}
//Определяем входное значение триггера
trig_inout_spec *anch = anchs[0];
double input_value = anch->trigger->GetExtendedState(anch->offs);
//Определяем, в какое новое состояние перейдет триггер.
int new_input_state = timetrigger_in_unknown;
if (input_value < trig_down_threshold) {
new_input_state = timetrigger_in_underflow;
} else if (trig_down_threshold <= input_value && input_value < trig_up_threshold) {
new_input_state = timetrigger_in_inrange;
} else if (trig_up_threshold <= input_value) {
new_input_state = timetrigger_in_overflow;
} else {
new_input_state = timetrigger_in_unknown;
}
if (timetrigger_in_unknown == input_state) {
//Предыдущее состояние триггера было неопределено. Просто устанавливаем
//первое определенное состояние и выходим из обработчика
input_state = new_input_state;
return;
}
//Решаем, что делать
bool new_was_trigged = false;
if (sense_trigup==sense && timetrigger_in_overflow==new_input_state) {
//Триггер сработал
new_was_trigged = true;
} else if (sense_trigdown==sense && timetrigger_in_underflow==new_input_state) {
//Триггер сработал
new_was_trigged = true;
} else if (sense_trigrange==sense && timetrigger_in_inrange==new_input_state) {
//Триггер сработал
new_was_trigged = true;
}
input_state = new_input_state;
if (dump_enabled && dump_to_file) {
dump_stream << "TIME " << fsm->GetCurrentTime() << " INPUTS " << input_value << " STATE ";
switch (input_state) {
case timetrigger_in_unknown:
dump_stream << "timetrigger_in_unknown ";
break;
case timetrigger_in_underflow:
dump_stream << "timetrigger_in_underflow ";
break;
case timetrigger_in_inrange:
dump_stream << "timetrigger_in_inrange ";
break;
case timetrigger_in_overflow:
dump_stream << "timetrigger_in_overflow ";
break;
}
} else if (dump_enabled) {
cout << szTriggerName << " TIME " << fsm->GetCurrentTime() << " INPUTS " << input_value << " STATE ";
switch (input_state) {
case timetrigger_in_unknown:
cout << "timetrigger_in_unknown ";
break;
case timetrigger_in_underflow:
cout << "timetrigger_in_underflow ";
break;
case timetrigger_in_inrange:
cout << "timetrigger_in_inrange ";
break;
case timetrigger_in_overflow:
cout << "timetrigger_in_overflow ";
break;
}
}
if (!was_trigged && new_was_trigged) {
//Триггер только что сработал. Устанавливаем его парамтры в исходное состояние
was_trigged = true;
values[TIMETRIGGER_DIRECT] = 0;
values[TIMETRIGGER_DIRECT_PR] = -1;
values[TIMETRIGGER_REVERSE_PR] = -1;
values[TIMETRIGGER_DIRECT_FL] = -1;
values[TIMETRIGGER_REVERSE_FL] = -1;
time_start = fsm->GetCurrentTime();
//Направление выбирается в соответсвии с режимом работы
switch (mode) {
case count_up:
direction = count_up;
time_uptrig = time_start + up_time;
break;
case count_down:
direction = count_down;
time_downtrig = time_start + down_time;
break;
case count_up_down:
direction = count_up;
time_uptrig = time_start + up_time;
break;
default:
return;
}
handle_values_differences();
return;
} else if (was_trigged && !new_was_trigged) {
//Триггер был в активном состоянии, но его вход перешел в неактивное.
//Для триггера ничего не меняется, если на его входе стояла защелка
//Если вход был комбинационным, то триггер должен сформировать сигнал о невыполнении счета
if (combinational == latch) {
//Комбинационный
if (count_up == direction) {
values[TIMETRIGGER_DIRECT] = 0;
values[TIMETRIGGER_DIRECT_PR] = -1;
values[TIMETRIGGER_REVERSE_PR] = -1;
values[TIMETRIGGER_DIRECT_FL] = 1; // Сработал
values[TIMETRIGGER_REVERSE_FL] = -1;
} else if (count_down == direction) {
values[TIMETRIGGER_DIRECT] = 0;
values[TIMETRIGGER_DIRECT_PR] = -1;
values[TIMETRIGGER_REVERSE_PR] = -1;
values[TIMETRIGGER_DIRECT_FL] = -1;
values[TIMETRIGGER_REVERSE_FL] = 1; // Сработал
}
handle_values_differences();
was_trigged = false;
return;
}
}
//Работа триггера однозначно разрешена. Рассчитываем его выходные состояния
long long cur_time = fsm->GetCurrentTime();
if (count_up == direction) {
//Выполняется счет вверх. Значит, используется время time_uptrig
values[TIMETRIGGER_DIRECT_PR] = (double)(cur_time-time_start) / (double)up_time;
values[TIMETRIGGER_REVERSE_PR] = -1;
values[TIMETRIGGER_DIRECT_FL] = -1;
values[TIMETRIGGER_REVERSE_FL] = -1;
if (cur_time >= time_uptrig) {
//Досчитано.
if (values[TIMETRIGGER_DIRECT] < 1.0) {
values[TIMETRIGGER_DIRECT] = 1.0; //В соответствии со спецификацией устанавливаем в 1
}
if (count_up == mode) {
//Режим счета вверх. Проверяем необходимость остановки работы триггера
if (loop_once == circle) {
//Действительно. Надо было один раз досчитать до максимального значения.
trigger_stopped = true;
} else if (loop_count == circle ) {
cout << "CTimeTrigger::ProcessAnchestors error - count mode wasnt implemented" << endl;
exit(5);
}
//Определяем момент следующего срабатывания триггера
time_start = cur_time;
time_uptrig = time_start + up_time;
} else if (count_up_down == mode) {
//Досчитали до верхней границы, меняем направление счета
direction = count_down;
//Определяем момент следующего срабатывания триггера
time_start = cur_time;
time_uptrig = time_start + down_time;
}
}
} else if (count_down == direction) {
//Выполняется счет вверх. Значит, используется время time_uptrig
values[TIMETRIGGER_DIRECT_PR] = -1;
values[TIMETRIGGER_REVERSE_PR] = (double)(cur_time-time_start) / (double)down_time;
values[TIMETRIGGER_DIRECT_FL] = -1;
values[TIMETRIGGER_REVERSE_FL] = -1;
if (cur_time >= time_downtrig) {
//Досчитано.
if (count_down == mode) {
//Режим счета вниз. Проверяем необходимость остановки работы триггера
if (loop_once == circle) {
//Действительно. Надо было один раз досчитать до минимального значения.
trigger_stopped = true;
} else if (loop_count == circle ) {
cout << "CTimeTrigger::ProcessAnchestors error - count mode wasnt implemented" << endl;
exit(5);
}
//Определяем момент следующего срабатывания триггера
time_start = cur_time;
time_uptrig = time_start + down_time;
} else if (count_up_down == mode) {
//Досчитали до верхней границы, меняем направление счета
//Режим счета вверх-вниз. Проверяем необходимость остановки работы триггера
if (loop_once == circle) {
//Действительно. Надо было один раз досчитать до минимального значения.
trigger_stopped = true;
} else if (loop_count == circle) {
cout << "CTimeTrigger::ProcessAnchestors error - count mode wasnt implemented" << endl;
exit(5);
} else {
//Останавливать триггер не надо. Меняем направление счета
direction = count_up;
}
//Определяем момент следующего срабатывания триггера
time_start = cur_time;
time_uptrig = time_start + up_time;
}
}
}
handle_values_differences();
}
void CTimeTrigger::handle_values_differences() {
if (dump_enabled && dump_to_file) {
dump_stream << " OUTS ";
for (int i=0;i<5;i++) {
dump_stream << values[i] << " ";
}
dump_stream << endl;
} else if (dump_enabled) {
cout << " OUTS ";
for (int i=0;i<5;i++) {
cout << values[i] << " ";
}
cout << endl;
}
for (int i=0;i<5;i++) {
if (values[i] != prev_values[i]) {
prev_values[i] = values[i];
vector<trig_inout_spec*>::iterator it;
for (it=deps.begin();it<deps.end();it++) {
trig_inout_spec* tis = *it;
if (tis->offs != 0) {
continue;
}
//Помечаем триггер, зависящий от этого входа, как требующий обработки
tis->trigger->AddToDynamicTree();
}
}
}
}
CTimeTrigger* load_time_trigger(std::string filename) {
return new CTimeTrigger(filename);
}
|
3736f9aaefceba564dce164768f3db71b107f20f
|
6feb8aa34251d97f458962eaab8e0506be1ba0b2
|
/mainwin.cpp
|
f128e61204ac92aa7c371ebb9e8f0b5fc665baf8
|
[] |
no_license
|
Prabishan/Donut-Express
|
0268182775967a611dfadf05ed9a04b867e5172e
|
71bd5398d1cfce9b293a9882e91894172fdaac3c
|
refs/heads/master
| 2020-04-04T14:23:39.515074
| 2018-11-27T05:49:45
| 2018-11-27T05:49:45
| 155,997,643
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 25,034
|
cpp
|
mainwin.cpp
|
#include "mainwin.h"
#include "java.h"
#include "donut.h"
#include "customer.h"
#include <ostream>
#include <sstream>
#include <fstream>
#include <iostream>
#include <regex>
Mainwin::Mainwin() : _store{Store{"JADE"}} {
// /////////////////
// G U I S E T U P
// /////////////////
set_title("Java and Donut Express (JADE)");
set_icon_from_file("window_logo.png");
set_default_size(900, 600);
// Put a vertical box container as the Window contents
Gtk::Box *vbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 0));
add(*vbox);
// ///////
// M E N U
// Add a menu bar as the top item in the vertical box
Gtk::MenuBar *menubar = Gtk::manage(new Gtk::MenuBar());
vbox->pack_start(*menubar, Gtk::PACK_SHRINK, 0);
// F I L E
// Create a File menu and add to the menu bar
Gtk::MenuItem *menuitem_file = Gtk::manage(new Gtk::MenuItem("_File", true));
menubar->append(*menuitem_file);
Gtk::Menu *filemenu = Gtk::manage(new Gtk::Menu());
menuitem_file->set_submenu(*filemenu);
// S A V E
// Append Save to the File menu
Gtk::MenuItem *menuitem_save = Gtk::manage(new Gtk::MenuItem("_Save", true));
menuitem_save->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_save_click));
filemenu->append(*menuitem_save);
// L O A D
// Append Load to the File menu
Gtk::MenuItem *menuitem_load = Gtk::manage(new Gtk::MenuItem("_Load", true));
menuitem_load->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_load_click));
filemenu->append(*menuitem_load);
// Q U I T
// Append Quit to the File menu
Gtk::MenuItem *menuitem_quit = Gtk::manage(new Gtk::MenuItem("_Quit", true));
menuitem_quit->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_quit_click));
filemenu->append(*menuitem_quit);
// V I E W
// Create a View menu and add to the menu bar
Gtk::MenuItem *menuitem_view = Gtk::manage(new Gtk::MenuItem("_View", true));
menubar->append(*menuitem_view);
Gtk::Menu *viewmenu = Gtk::manage(new Gtk::Menu());
menuitem_view->set_submenu(*viewmenu);
// A L L O R D E R S
// Append All Orders to the File menu
Gtk::MenuItem *menuitem_all_orders = Gtk::manage(new Gtk::MenuItem("All _Orders", true));
menuitem_all_orders->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_view_orders_click));
viewmenu->append(*menuitem_all_orders);
// A L L P R O D U C T S
// Append All Products to the File menu
Gtk::MenuItem *menuitem_all_products = Gtk::manage(new Gtk::MenuItem("_All Products", true));
menuitem_all_products->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_view_products_click));
viewmenu->append(*menuitem_all_products);
// L I S T C U S T O M E R S
// Append List Customers to the View menu
Gtk::MenuItem *menuitem_list_customers = Gtk::manage(new Gtk::MenuItem("_Customers", true));
menuitem_list_customers->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_list_customers_click));
viewmenu->append(*menuitem_list_customers);
// C R E A T E
// Create a Create menu and add to the menu bar
Gtk::MenuItem *menuitem_create = Gtk::manage(new Gtk::MenuItem("_Create", true));
menubar->append(*menuitem_create);
Gtk::Menu *createmenu = Gtk::manage(new Gtk::Menu());
menuitem_create->set_submenu(*createmenu);
// N E W O R D E R
// Append Order to the Create menu
Gtk::MenuItem *menuitem_new_orders = Gtk::manage(new Gtk::MenuItem("_Order", true));
menuitem_new_orders->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_create_order_click));
createmenu->append(*menuitem_new_orders);
// N E W C O F F E E
// Append New Coffee to the Create menu
menuitem_new_coffee = Gtk::manage(new Gtk::MenuItem("_Coffee", true));
menuitem_new_coffee->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_create_coffee_click));
createmenu->append(*menuitem_new_coffee);
// N E W D O N U T
// Append New Donut to the Create menu
menuitem_new_donut = Gtk::manage(new Gtk::MenuItem("_Donut", true));
menuitem_new_donut->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_create_donut_click));
createmenu->append(*menuitem_new_donut);
// N E W C U S T O M E R
// Append New Customer to the Create menu
Gtk::MenuItem *menuitem_new_customer = Gtk::manage(new Gtk::MenuItem("_Customer", true));
menuitem_new_customer->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_new_customer_click));
createmenu->append(*menuitem_new_customer);
// P R O C E S S
// Create a Process menu and add to the menu bar
Gtk::MenuItem *menuitem_process = Gtk::manage(new Gtk::MenuItem("_Process", true));
menubar->append(*menuitem_process);
Gtk::Menu *process_menu = Gtk::manage(new Gtk::Menu());
menuitem_process->set_submenu(*process_menu);
//Append Fill to the Process menu
menuitem_fill = Gtk::manage(new Gtk::MenuItem("_Fill Order", true));
menuitem_fill->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_fill_click));
process_menu->append(*menuitem_fill);
//Append pay to the Process menu
menuitem_pay = Gtk::manage(new Gtk::MenuItem("_Pay Order", true));
menuitem_pay->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_pay_click));
process_menu->append(*menuitem_pay);
//Append Delete to the Process menu
Gtk::MenuItem *menuitem_delete = Gtk::manage(new Gtk::MenuItem("_Delete Order", true));
menuitem_delete->signal_activate().connect(sigc::mem_fun(*this, &Mainwin::on_delete_click));
process_menu->append(*menuitem_delete);
// H E L P
// Create a Help menu and add to the menu bar
Gtk::MenuItem *menuitem_help =
Gtk::manage(new Gtk::MenuItem("_Help", true));
menubar->append(*menuitem_help);
Gtk::Menu *helpmenu = Gtk::manage(new Gtk::Menu());
menuitem_help->set_submenu(*helpmenu);
// A B O U T
// Append About to the Help menu
Gtk::MenuItem *menuitem_about = Gtk::manage(new Gtk::MenuItem("About", true));
menuitem_about->signal_activate().connect(
sigc::mem_fun(*this, &Mainwin::on_about_click));
helpmenu->append(*menuitem_about);
// /////////////
// T O O L B A R
// Add a toolbar to the vertical box below the menu
Gtk::Toolbar *toolbar = Gtk::manage(new Gtk::Toolbar);
vbox->add(*toolbar);
// P R O D U C T S
//
// V I E W A L L O R D E R S
// View all orders currently defined
Gtk::Image* view_orders_image = Gtk::manage(new Gtk::Image{"list_orders.png"});
Gtk::ToolButton *view_orders_button = Gtk::manage(new Gtk::ToolButton{*view_orders_image});
view_orders_button->set_tooltip_markup("View all orders");
view_orders_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_view_orders_click));
toolbar->append(*view_orders_button);
// C R E A T E O R D E R
// Create a new order
Gtk::Image* create_order_image = Gtk::manage(new Gtk::Image{"create_order.png"});
Gtk::ToolButton *create_order_button = Gtk::manage(new Gtk::ToolButton{*create_order_image});
create_order_button->set_tooltip_markup("Create a new order");
create_order_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_create_order_click));
toolbar->append(*create_order_button);
Gtk::SeparatorToolItem *sep0 = Gtk::manage(new Gtk::SeparatorToolItem());
toolbar->append(*sep0);
// F I L L O R D E R
// Fill a order
Gtk::Image* fill_order_image = Gtk::manage(new Gtk::Image{"fill_order.png"});
Gtk::ToolButton *fill_order_button = Gtk::manage(new Gtk::ToolButton{*fill_order_image});
fill_order_button->set_tooltip_markup("Fill Order");
fill_order_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_fill_click));
toolbar->append(*fill_order_button);
// P A Y O R D E R
// Pay a order
Gtk::Image* pay_order_image = Gtk::manage(new Gtk::Image{"pay_order.png"});
Gtk::ToolButton *pay_order_button = Gtk::manage(new Gtk::ToolButton{*pay_order_image});
pay_order_button->set_tooltip_markup("Pay Order");
pay_order_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_pay_click));
toolbar->append(*pay_order_button);
// D E l E T E O R D E R
// Delete a order
Gtk::Image* delete_order_image = Gtk::manage(new Gtk::Image{"delete_order.png"});
Gtk::ToolButton *delete_order_button = Gtk::manage(new Gtk::ToolButton{*delete_order_image});
delete_order_button->set_tooltip_markup("Delete Order");
delete_order_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_delete_click));
toolbar->append(*delete_order_button);
Gtk::SeparatorToolItem *sep2 = Gtk::manage(new Gtk::SeparatorToolItem());
toolbar->append(*sep2);
// V I E W A L L P R O D U C T S
// View all products currently defined
Gtk::Image* view_all_image = Gtk::manage(new Gtk::Image{"list_products.png"});
Gtk::ToolButton *view_all_button = Gtk::manage(new Gtk::ToolButton{*view_all_image});
view_all_button->set_tooltip_markup("View all products");
view_all_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_view_products_click));
toolbar->append(*view_all_button);
// N E W J A V A
// Create a new Java type
Gtk::Image* new_java_image = Gtk::manage(new Gtk::Image{"new_java.png"});
Gtk::ToolButton *new_java_button = Gtk::manage(new Gtk::ToolButton{*new_java_image});
new_java_button->set_tooltip_markup("Create new Coffee");
new_java_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_create_coffee_click));
toolbar->append(*new_java_button);
// N E W D O N U T
// Create a new Donut type
Gtk::Image* new_donut_image = Gtk::manage(new Gtk::Image{"new_donut.png"});
Gtk::ToolButton *new_donut_button = Gtk::manage(new Gtk::ToolButton{*new_donut_image});
new_donut_button->set_tooltip_markup("Create new Donut");
new_donut_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_create_donut_click));
toolbar->append(*new_donut_button);
Gtk::SeparatorToolItem *sep1 = Gtk::manage(new Gtk::SeparatorToolItem());
toolbar->append(*sep1);
// C U S T O M E R S
//
// L I S T C U S T O M E R S
// List customers icon
Gtk::Image *list_customers_image = Gtk::manage(new Gtk::Image{"list_customers.png"});
Gtk::ToolButton *list_customers_button = Gtk::manage(new Gtk::ToolButton(*list_customers_image));
list_customers_button->set_tooltip_markup("List all customers");
list_customers_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_list_customers_click));
toolbar->append(*list_customers_button);
// N E W C U S T O M E R
// Add a new customer icon
Gtk::Image *new_customer_image = Gtk::manage(new Gtk::Image{"new_customer.png"});
Gtk::ToolButton *new_customer_button = Gtk::manage(new Gtk::ToolButton(*new_customer_image));
new_customer_button->set_tooltip_markup("Create a new customer");
new_customer_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_new_customer_click));
toolbar->append(*new_customer_button);
Gtk::SeparatorToolItem *sep3 = Gtk::manage(new Gtk::SeparatorToolItem());
toolbar->append(*sep3);
// N E W R O L E
// Add a New Role Icon
Gtk::Image *select_role_image = Gtk::manage(new Gtk::Image{"select_role.png"});
Gtk::ToolButton *select_role_button = Gtk::manage(new Gtk::ToolButton(*select_role_image));
select_role_button->set_tooltip_markup("Select New Role");
select_role_button->signal_clicked().connect(sigc::mem_fun(*this, &Mainwin::on_select_role_click));
toolbar->append(*select_role_button);
// M A I N A R E A
Gtk::Label* main_area = Gtk::manage(new Gtk::Label);
main_area->set_hexpand(true);
main_area->set_vexpand(true);
vbox->add(*main_area);
// S T A T U S B A R D I S P L A Y
// Provide a status bar for program messages
msg = Gtk::manage(new Gtk::Label());
msg->set_hexpand(true);
vbox->add(*msg);
// Make the box and everything in it visible
vbox->show_all();
on_select_role_click();
}
Mainwin::~Mainwin() { }
// /////////////////
// C A L L B A C K S
// /////////////////
void Mainwin::on_view_orders_click() { // Select an order to view
msg->set_text("");
Gtk::Dialog *dialog = new Gtk::Dialog{"Select an Order", *this};
// Show selected order
Gtk::Label l_current;
dialog->get_vbox()->pack_start(l_current, Gtk::PACK_SHRINK);
// List orders
Gtk::HBox b_orders;
Gtk::Label l_orders{"Order:"};
l_orders.set_width_chars(15);
b_orders.pack_start(l_orders, Gtk::PACK_SHRINK);
Gtk::ComboBoxText c_orders;
for(int i=0; i<_store.number_of_orders(); ++i) {
c_orders.append(std::to_string(i));
}
b_orders.pack_start(c_orders, Gtk::PACK_SHRINK);
dialog->get_vbox()->pack_start(b_orders, Gtk::PACK_SHRINK);
// Show dialog
dialog->add_button("Close", 0);
dialog->add_button("Show", 1);
dialog->show_all();
int result; // of the dialog (1 = OK)
while (true) {
result = dialog->run();
if (result == 0) {delete dialog; return;}
l_current.set_text(_store.order_to_string(c_orders.get_active_row_number()));
}
}
void Mainwin::on_view_products_click() { // View all products
msg->set_text("");
std::ostringstream oss;
oss << _store << std::endl;
Gtk::MessageDialog d{*this, "List of Products"};
d.set_secondary_text(oss.str());
int result = d.run();
}
void Mainwin::on_new_customer_click() {
Gtk::Dialog *dialog = new Gtk::Dialog("Create a Customer", *this);
// Name
Gtk::HBox b_name;
Gtk::Label l_name{"Name:"};
l_name.set_width_chars(15);
b_name.pack_start(l_name, Gtk::PACK_SHRINK);
Gtk::Entry e_name;
e_name.set_max_length(50);
b_name.pack_start(e_name, Gtk::PACK_SHRINK);
dialog->get_vbox()->pack_start(b_name, Gtk::PACK_SHRINK);
// Phone Number
Gtk::HBox b_phone;
Gtk::Label l_phone{"Phone:"};
l_phone.set_width_chars(15);
b_phone.pack_start(l_phone, Gtk::PACK_SHRINK);
Gtk::Entry e_phone;
e_phone.set_max_length(50);
b_phone.pack_start(e_phone, Gtk::PACK_SHRINK);
dialog->get_vbox()->pack_start(b_phone, Gtk::PACK_SHRINK);
// Show dialog
dialog->add_button("Cancel", 0);
dialog->add_button("Create", 1);
dialog->show_all();
int result;
std::string name, phone;
std::regex re_phone{"[(]?(\\d{3,3}[-)])?\\d{3,3}-\\d{4,4}"};
bool fail = true; // set to true if any data is invalid
while (fail) {
fail = false; // optimist!
result = dialog->run();
if (result != 1) {delete dialog; return;}
name = e_name.get_text();
if (name.size() == 0) {
e_name.set_text("### Invalid ###");
fail = true;
}
phone = e_phone.get_text();
if(!std::regex_match(phone,re_phone)) {
e_phone.set_text("### Invalid ###");
fail = true;
}
}
Customer* customer = new Customer{name, phone};
_store.add_customer(customer);
delete dialog;
}
void Mainwin::on_list_customers_click() {
msg->set_text("");
std::ostringstream oss;
for (int i=0; i<_store.number_of_customers(); ++i) {
oss << _store.customer_to_string(i) << std::endl;
}
Gtk::MessageDialog d{*this, "List of Customers"};
d.set_secondary_text(oss.str());
int result = d.run();
}
void Mainwin::on_save_click() {
Gtk::Dialog dlg{"Enter File Name", *this};
dlg.set_default_size(250,10);
Gtk::Entry e;
dlg.get_vbox()->pack_start(e, Gtk::PACK_SHRINK);
dlg.add_button("Save", 1);
dlg.show_all();
dlg.run();
bool valid_data = false;
while(!valid_data) {
if(e.get_text()=="" || e.get_text() == "*Invalid Name*") {
valid_data = false;
e.set_text("*Invalid Name*");
dlg.run();
} else valid_data = true;
}
std::string s = e.get_text() + ".txt";
dlg.close();
try {
std::ofstream ofs{s,std::ofstream::out};
_store.save(ofs);
} catch (std::exception& e) {
Gtk::MessageDialog dialog{*this, "Unable to save "+ s};
dialog.set_secondary_text(e.what());
dialog.run();
dialog.close();
}
}
void Mainwin::on_load_click() {
Gtk::FileChooserDialog dialog("Please choose a file", Gtk::FILE_CHOOSER_ACTION_OPEN);
dialog.set_transient_for(*this);
//Add response buttons the the dialog:
dialog.add_button("_Cancel", Gtk::RESPONSE_CANCEL);
dialog.add_button("_Open", Gtk::RESPONSE_OK);
//Show the dialog and wait for a user response:
int result = dialog.run();
std::string filename;
//Handle the response:
switch(result)
{
case(Gtk::RESPONSE_OK):
{
std::cout << "Open clicked." << std::endl;
//Notice that this is a std::string, not a Glib::ustring.
filename = dialog.get_filename();
std::cout << "File selected: " << filename << std::endl;
break;
}
case(Gtk::RESPONSE_CANCEL):
{
std::cout << "Cancel clicked." << std::endl;
break;
}
default:
{
std::cout << "Unexpected button clicked." << std::endl;
break;
}
}
try {
std::ifstream ifs{filename, std::ifstream::in};
// all_pnl.push_back(emp.get_pnl_report());
Store new_str{ifs};
_store = new_str;
} catch (std::exception& e) {
Gtk::MessageDialog dialog{*this, "Unable to open file"};
dialog.set_secondary_text(e.what());
dialog.run();
dialog.close();
}
}
void Mainwin::on_select_role_click(){
Glib::ustring s = "Active Person: ";
std::vector<std::string> names;
names.push_back("Owner");
names.push_back("Manager");
names.push_back("Server");
names.push_back("Customer");
int role = select_from_vector(names, "Role");
// if(role == -1) close();
/* if(role == 0){
s = s + "Owner";
//menuitem_new->set_sensitive(true);;
menuitem_file->set_sensitive(true);
menuitem_save->set_sensitive(true);
menuitem_load->set_sensitive(true);
menuitem_quit->set_sensitive(true);
menuitem_view->set_sensitive(true);;
menuitem_all_orders->set_sensitive(true);
menuitem_all_products->set_sensitive(true);
menuitem_list_customers->set_sensitive(true);
menuitem_create->set_sensitive(true);
menuitem_new_orders->set_sensitive(true);
menuitem_new_coffee->set_sensitive(true);
menuitem_new_donut->set_sensitive(true);
menuitem_new_customer->set_sensitive(true);
menuitem_process->set_sensitive(true);
menuitem_fill->set_sensitive(true);
menuitem_pay->set_sensitive(true);
menuitem_delete->set_sensitive(true);
menuitem_about->set_sensitive(true);
view_orders_button->set_sensitive(true);
create_order_button->set_sensitive(true);
fill_order_button->set_sensitive(true);
pay_order_button->set_sensitive(true);
delete_order_button->set_sensitive(true);
view_all_button->set_sensitive(true);
new_java_button->set_sensitive(true);
new_donut_button->set_sensitive(true);
list_customers_button->set_sensitive(true);
new_customer_button->set_sensitive(true);
select_role_button->set_sensitive(true);
//break;
}/*
case 1: {
s += "Manager";
//menuitem_new->set_sensitive(true);;
menuitem_save->hide();
menuitem_load->hide();
menuitem_quit->set_sensitive(true);;
menuitem_view->set_sensitive(true);;
menuitem_all_orders->set_sensitive(true);;
menuitem_all_products->set_sensitive(true);;
menuitem_list_customers->set_sensitive(true);;
menuitem_create->set_sensitive(true);;
menuitem_new_orders->set_sensitive(true);;
menuitem_new_coffee->set_sensitive(true);;
menuitem_new_donut->set_sensitive(true);;
menuitem_new_customer->set_sensitive(true);;
menuitem_process->set_sensitive(true);;
menuitem_fill->set_sensitive(true);;
menuitem_pay->set_sensitive(true);;
menuitem_delete->set_sensitive(true);;
menuitem_about->set_sensitive(true);;
view_orders_button->set_sensitive(true);;
create_order_button->set_sensitive(true);;
fill_order_button->set_sensitive(true);;
pay_order_button->set_sensitive(true);;
delete_order_button->set_sensitive(true);;
view_all_button->set_sensitive(true);;
new_java_button->set_sensitive(true);;
new_donut_button->set_sensitive(true);;
list_customers_button->set_sensitive(true);;
new_customer_button->set_sensitive(true);;
select_role_button->set_sensitive(true);;
break;
}
case 2: {
s += "Server";
//menuitem_new->set_sensitive(true);;
menuitem_save->hide();
menuitem_load->hide();
menuitem_quit->set_sensitive(true);;
menuitem_view->set_sensitive(true);;
menuitem_all_orders->set_sensitive(true);;
menuitem_all_products->set_sensitive(true);;
menuitem_list_customers->set_sensitive(true);;
menuitem_create->set_sensitive(true);;
menuitem_new_orders->hide();
menuitem_new_coffee->set_sensitive(true);;
menuitem_new_donut->set_sensitive(true);;
menuitem_new_customer->hide();
menuitem_process->set_sensitive(true);;
menuitem_fill->set_sensitive(true);;
menuitem_pay->set_sensitive(true);;
menuitem_delete->set_sensitive(true);;
menuitem_about->set_sensitive(true);;
view_orders_button->set_sensitive(true);;
create_order_button->hide();
fill_order_button->set_sensitive(true);;
pay_order_button->set_sensitive(true);;
delete_order_button->set_sensitive(true);;
view_all_button->set_sensitive(true);;
new_java_button->set_sensitive(true);;
new_donut_button->set_sensitive(true);;
list_customers_button->set_sensitive(true);;
new_customer_button->hide();
select_role_button->set_sensitive(true);;
break;
}
case 3: {
s = "Customer";
menuitem_save->hide();
menuitem_load->hide();
menuitem_quit->set_sensitive(true);;
menuitem_view->set_sensitive(true);;
menuitem_all_orders->hide();
menuitem_all_products->set_sensitive(true);;
menuitem_list_customers->hide();
menuitem_create->hide();
menuitem_new_orders->hide();
menuitem_new_coffee->hide();
menuitem_new_donut->hide();
menuitem_new_customer->hide();
menuitem_process->hide();
menuitem_fill->hide();
menuitem_pay->hide();
menuitem_delete->hide();
menuitem_about->set_sensitive(true);;
view_orders_button->hide();
create_order_button->hide();
fill_order_button->hide();
pay_order_button->hide();
delete_order_button->hide();
view_all_button->set_sensitive(true);;
new_java_button->hide();
new_donut_button->hide();
list_customers_button->hide();
new_customer_button->hide();
select_role_button->set_sensitive(true);;
break;
}
default : std::cerr << "Invalid Choice" << '\n'; break;
}*/
}
// /////////
// Help Menu
void Mainwin::on_about_click() {
Gtk::AboutDialog dialog{};
dialog.set_transient_for(*this);
dialog.set_program_name("Java and Donut Express");
auto logo = Gdk::Pixbuf::create_from_file("logo.png");
dialog.set_logo(logo);
dialog.set_version("Version 0.2.0");
dialog.set_copyright("Copyright 2018");
dialog.set_license_type(Gtk::License::LICENSE_GPL_3_0);
std::vector< Glib::ustring > authors = {"George F. Rice"};
dialog.set_authors(authors);
std::vector< Glib::ustring > artists = {
"JADE Logo is licensed under the Creative Commons Attribution Share-Alike 3.0 License by SaxDeux https://commons.wikimedia.org/wiki/File:Logo_JADE.png",
"Flat Coffee Cup Icon is licensed under the Creative Commons Attribution 3.0 License by superawesomevectors http://fav.me/dbf6otc",
"Donut Icon is public domain by Hazmat2 via Hyju https://en.wikipedia.org/wiki/File:Simpsons_Donut.svg",
"Person Icon is licensed under the Creative Commons 0 (Public Domain) License by Clker-Free-Vector-Images https://pixabay.com/en/man-user-profile-person-icon-42934/"
};
dialog.set_artists(artists);
dialog.run();
}
void Mainwin::on_quit_click() { // Exit the program
close();
}
// /////////////////
// U T I L I T I E S
// /////////////////
|
fe62a188eaef70b2e212c6103f2c95af80e4eb85
|
57810a196e205b21f410b9bfcd574e0f964b2a8f
|
/GameCode/PlaneWar/NbPattern.cpp
|
39df55c8f20b328686d82cd881271cc5cb26c980
|
[] |
no_license
|
lockezhan/PlaneWarGame
|
0a9a6d7ca7f309a4ae4e3bf38043284a6e3e82d4
|
bcfe06c97c127c6e733e1b2c3f74f8d1a94a4110
|
refs/heads/main
| 2023-03-15T19:20:26.424566
| 2020-11-14T08:17:25
| 2020-11-14T08:17:25
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 930
|
cpp
|
NbPattern.cpp
|
//CNbPattern.cpp : 实现文件
//
#include "stdafx.h"
#include "NbPattern.h"
#include "resource.h"
#include <mmsystem.h>
//图像链表
CImageList CNbPattern::m_Image[3];
//构造
CNbPattern::CNbPattern()
{
//键位置
m_ptPos.x = 3;
m_ptPos.y = GAME_HEIGHT - NB_HEIGHT*2;
}
//析构
CNbPattern::~CNbPattern()
{
}
//加载图像
BOOL CNbPattern::LoadImage()
{
return CGameObject::LoadImage( m_Image[on], IDB_NBON, RGB(0, 0, 0), NB_WIDTH, NB_HEIGHT, 0)
&& CGameObject::LoadImage( m_Image[off], IDB_NBOFF, RGB(0, 0, 0), NB_WIDTH, NB_HEIGHT, 0);
}
//绘图
BOOL CNbPattern::Draw(CDC *pDC, BOOL bPattern)
{
//无敌时
if (bPattern) {
m_Image[on].Draw(pDC, 0, m_ptPos, ILD_TRANSPARENT);
}
//游戏进行时
else {
m_Image[off].Draw(pDC, 0, m_ptPos, ILD_TRANSPARENT);
}
return TRUE;
}
//获得矩形
CRect CNbPattern::GetRect()
{
return CRect(m_ptPos, CPoint(m_ptPos.x + NB_WIDTH, m_ptPos.y + NB_HEIGHT));
}
|
2b28e6f367e85de56fe9aa3060e673502e51c8f7
|
79be97302e0d1195aaa01f52e5fa1da540ea112f
|
/core/lib/include/memoria/core/memory/smart_ptrs.hpp
|
5900c9ef11bd2e980d77082a2e23fc454b210f13
|
[
"Apache-2.0"
] |
permissive
|
victor-smirnov/memoria
|
8df7430c89b83ff9c93706dcf6100b3830c5f83a
|
fd203b5b081849c1a1db2d7f26b75bfd1d760a18
|
refs/heads/master
| 2023-05-12T20:52:19.828284
| 2023-05-01T00:02:46
| 2023-05-01T00:02:46
| 245,055,297
| 11
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,601
|
hpp
|
smart_ptrs.hpp
|
// Copyright 2018 Victor Smirnov
//
// 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 <memoria/core/types.hpp>
#include <boost/smart_ptr.hpp>
#include <boost/smart_ptr/local_shared_ptr.hpp>
#include <boost/smart_ptr/make_local_shared.hpp>
#include <boost/smart_ptr/atomic_shared_ptr.hpp>
namespace memoria {
static inline int32_t current_cpu() {return 0;}
static inline int32_t number_of_cpus() {return 1;}
template <typename T>
using SharedPtr = boost::shared_ptr<T>;
template <typename T>
using LocalSharedPtr = boost::local_shared_ptr<T>;
template <typename T, typename... Args>
auto MakeShared(Args&&... args) {
return boost::make_shared<T>(std::forward<Args>(args)...);
}
template <typename T, typename... Args>
auto MakeSharedAt(int cpu, Args&&... args) {
return boost::make_shared<T>(std::forward<Args>(args)...);
}
template <typename T, typename... Args>
auto MakeLocalShared(Args&&... args) {
return boost::make_local_shared<T>(std::forward<Args>(args)...);
}
template <typename T, typename Allocator, typename... Args>
auto AllocateShared(const Allocator& alloc, Args&&... args) {
return boost::allocate_shared<T>(alloc, std::forward<Args>(args)...);
}
template <typename T, typename Allocator, typename... Args>
auto AllocateSharedAt(int32_t cpu, const Allocator& alloc, Args&&... args) {
return boost::allocate_shared<T>(alloc, std::forward<Args>(args)...);
}
template <typename T, typename Allocator, typename... Args>
auto AllocateLocalShared(const Allocator& alloc, Args&&... args) {
return boost::allocate_local_shared<T>(alloc, std::forward<Args>(args)...);
}
template <typename T>
using EnableSharedFromThis = boost::enable_shared_from_this<T>;
using EnableSharedFromRaw = boost::enable_shared_from_raw;
template <typename T>
using WeakPtr = boost::weak_ptr<T>;
template<typename T, typename U>
boost::shared_ptr<T> StaticPointerCast( const boost::shared_ptr<U>& r ) noexcept {
return boost::static_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::shared_ptr<T> StaticPointerCast( boost::shared_ptr<U>&& r ) noexcept {
return boost::static_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::shared_ptr<T> DynamicPointerCast( const boost::shared_ptr<U>& r ) noexcept {
return boost::dynamic_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::shared_ptr<T> DynamicPointerCast( boost::shared_ptr<U>&& r ) noexcept {
return boost::dynamic_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::shared_ptr<T> ReinterpretPointerCast( const boost::shared_ptr<U>& r ) noexcept {
return boost::reinterpret_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::shared_ptr<T> ReinterpretPointerCast( boost::shared_ptr<U>&& r ) noexcept {
return boost::reinterpret_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::shared_ptr<T> ConstPointerCast( const boost::shared_ptr<U>& r ) noexcept {
return boost::const_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::shared_ptr<T> ConstPointerCast( boost::shared_ptr<U>&& r ) noexcept {
return boost::const_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::local_shared_ptr<T> StaticPointerCast( const boost::local_shared_ptr<U>& r ) noexcept {
return boost::static_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::local_shared_ptr<T> StaticPointerCast( boost::local_shared_ptr<U>&& r ) noexcept {
return boost::static_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::local_shared_ptr<T> DynamicPointerCast( const boost::local_shared_ptr<U>& r ) noexcept {
return boost::dynamic_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::local_shared_ptr<T> DynamicPointerCast( boost::local_shared_ptr<U>&& r ) noexcept {
return boost::dynamic_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::local_shared_ptr<T> ReinterpretPointerCast( const boost::local_shared_ptr<U>& r ) noexcept {
return boost::reinterpret_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::local_shared_ptr<T> ReinterpretPointerCast( boost::local_shared_ptr<U>&& r ) noexcept {
return boost::reinterpret_pointer_cast<T>(std::move(r));
}
template<typename T, typename U>
boost::local_shared_ptr<T> ConstPointerCast( const boost::local_shared_ptr<U>& r ) noexcept {
return boost::const_pointer_cast<T>(r);
}
template<typename T, typename U>
boost::local_shared_ptr<T> ConstPointerCast( boost::local_shared_ptr<U>&& r ) noexcept {
return boost::const_pointer_cast<T>(std::move(r));
}
template <typename T, typename DtrT>
class ScopedDtr {
T* ptr_;
DtrT dtr_;
public:
ScopedDtr(T* ptr, DtrT dtr = [](T* ptr) { delete ptr; }) :
ptr_(ptr), dtr_(std::move(dtr))
{}
ScopedDtr(ScopedDtr&& other) :
ptr_(other.ptr_), dtr_(std::move(other.dtr_))
{
other.ptr_ = nullptr;
}
ScopedDtr(const ScopedDtr&) = delete;
~ScopedDtr() noexcept {
if (ptr_) dtr_(ptr_);
}
ScopedDtr& operator=(ScopedDtr&& other)
{
if (&other != this)
{
if (ptr_) {
dtr_(ptr_);
}
ptr_ = other.ptr_;
other.ptr_ = nullptr;
dtr_ = std::move(other.dtr_);
}
return this;
}
template <typename TT, typename FFn>
bool operator==(const ScopedDtr<TT, FFn>& other) const {
return ptr_ == other.get();
}
T* operator->() const {
return ptr_;
}
T* get() const {
return ptr_;
}
operator bool() const {
return ptr_ != nullptr;
}
};
template <typename T, typename Fn>
auto MakeScopedDtr(T* ptr, Fn&& dtr) {
return ScopedDtr<T, Fn>(ptr, std::forward<Fn>(dtr));
}
template <typename DtrT>
class OnScopeExit {
DtrT dtr_;
public:
OnScopeExit(DtrT&& dtr) :
dtr_(std::move(dtr))
{}
OnScopeExit(OnScopeExit&& other): dtr_(std::move(other.dtr_)) {}
OnScopeExit(const OnScopeExit&) = delete;
~OnScopeExit() noexcept {
dtr_();
}
};
template <typename Fn>
auto MakeOnScopeExit(Fn&& dtr) {
return OnScopeExit<Fn>(std::forward<Fn>(dtr));
}
}
|
8b7f9e85254ef5afabbb7179f1c4357dadc4fa38
|
6b87b7c63bd932627cee48ad52a9f040eb0a0074
|
/__EXPREP___loopfree.cpp
|
23897611bdef855d2d6f87fe77824a399f45e68d
|
[] |
no_license
|
Ujjwal120/MyC-
|
40c5b05529766873f204e288fda69f578a71b258
|
72493b7ce6236065ccd75081899acc22f8d1337e
|
refs/heads/main
| 2023-06-08T04:57:42.172749
| 2021-07-02T12:23:13
| 2021-07-02T12:23:13
| 326,197,244
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,114
|
cpp
|
__EXPREP___loopfree.cpp
|
// 1.15 sec sol
#pragma GCC optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
#ifndef LOCAL
#define endl '\n'
#endif
#define fr(i, a, b) for(int i = a; i <= b; i++)
#define rf(i, a, b) for(int i = a; i >= b; i--)
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
typedef long long ll;
void sc() {}
template <typename Head, typename... Tail>
void sc(Head &H, Tail &... T) { cin >> H; sc(T...); }
#ifdef LOCAL
#define debug(...) cerr << "[L:" << __LINE__ << "][" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
// -- Mint template (https://github.com/the-tourist/algo/blob/master/numeric/mint.cpp)
template <typename T>
T inverse(T a, T m) {
T u = 0, v = 1;
while (a != 0) {
T t = m / a;
m -= t * a; swap(a, m);
u -= t * v; swap(u, v);
}
assert(m == 1);
return u;
}
template <typename T>
class Modular {
public:
using Type = typename decay<decltype(T::value)>::type;
constexpr Modular() : value() {}
template <typename U>
Modular(const U& x) {
value = normalize(x);
}
template <typename U>
static Type normalize(const U& x) {
Type v;
if (-mod() <= x && x < mod()) v = static_cast<Type>(x);
else v = static_cast<Type>(x % mod());
if (v < 0) v += mod();
return v;
}
const Type& operator()() const { return value; }
template <typename U>
explicit operator U() const { return static_cast<U>(value); }
constexpr static Type mod() { return T::value; }
Modular& operator+=(const Modular& other) { if ((value += other.value) >= mod()) value -= mod(); return *this; }
Modular& operator-=(const Modular& other) { if ((value -= other.value) < 0) value += mod(); return *this; }
template <typename U> Modular& operator+=(const U& other) { return *this += Modular(other); }
template <typename U> Modular& operator-=(const U& other) { return *this -= Modular(other); }
Modular& operator++() { return *this += 1; }
Modular& operator--() { return *this -= 1; }
Modular operator++(int) { Modular result(*this); *this += 1; return result; }
Modular operator--(int) { Modular result(*this); *this -= 1; return result; }
Modular operator-() const { return Modular(-value); }
template <typename U = T>
typename enable_if<is_same<typename Modular<U>::Type, int>::value, Modular>::type& operator*=(const Modular& rhs) {
#ifdef _WIN32
uint64_t x = static_cast<int64_t>(value) * static_cast<int64_t>(rhs.value);
uint32_t xh = static_cast<uint32_t>(x >> 32), xl = static_cast<uint32_t>(x), d, m;
asm(
"divl %4; \n\t"
: "=a" (d), "=d" (m)
: "d" (xh), "a" (xl), "r" (mod())
);
value = m;
#else
value = normalize(static_cast<int64_t>(value) * static_cast<int64_t>(rhs.value));
#endif
return *this;
}
template <typename U = T>
typename enable_if<is_same<typename Modular<U>::Type, int64_t>::value, Modular>::type& operator*=(const Modular& rhs) {
int64_t q = static_cast<int64_t>(static_cast<long double>(value) * rhs.value / mod());
value = normalize(value * rhs.value - q * mod());
return *this;
}
template <typename U = T>
typename enable_if<!is_integral<typename Modular<U>::Type>::value, Modular>::type& operator*=(const Modular& rhs) {
value = normalize(value * rhs.value);
return *this;
}
Modular& operator/=(const Modular& other) { return *this *= Modular(inverse(other.value, mod())); }
template <typename U>
friend const Modular<U>& abs(const Modular<U>& v) { return v; }
template <typename U>
friend bool operator==(const Modular<U>& lhs, const Modular<U>& rhs);
template <typename U>
friend bool operator<(const Modular<U>& lhs, const Modular<U>& rhs);
template <typename U>
friend std::istream& operator>>(std::istream& stream, Modular<U>& number);
private:
Type value;
};
template <typename T> bool operator==(const Modular<T>& lhs, const Modular<T>& rhs) { return lhs.value == rhs.value; }
template <typename T, typename U> bool operator==(const Modular<T>& lhs, U rhs) { return lhs == Modular<T>(rhs); }
template <typename T, typename U> bool operator==(U lhs, const Modular<T>& rhs) { return Modular<T>(lhs) == rhs; }
template <typename T> bool operator!=(const Modular<T>& lhs, const Modular<T>& rhs) { return !(lhs == rhs); }
template <typename T, typename U> bool operator!=(const Modular<T>& lhs, U rhs) { return !(lhs == rhs); }
template <typename T, typename U> bool operator!=(U lhs, const Modular<T>& rhs) { return !(lhs == rhs); }
template <typename T> bool operator<(const Modular<T>& lhs, const Modular<T>& rhs) { return lhs.value < rhs.value; }
template <typename T> Modular<T> operator+(const Modular<T>& lhs, const Modular<T>& rhs) { return Modular<T>(lhs) += rhs; }
template <typename T, typename U> Modular<T> operator+(const Modular<T>& lhs, U rhs) { return Modular<T>(lhs) += rhs; }
template <typename T, typename U> Modular<T> operator+(U lhs, const Modular<T>& rhs) { return Modular<T>(lhs) += rhs; }
template <typename T> Modular<T> operator-(const Modular<T>& lhs, const Modular<T>& rhs) { return Modular<T>(lhs) -= rhs; }
template <typename T, typename U> Modular<T> operator-(const Modular<T>& lhs, U rhs) { return Modular<T>(lhs) -= rhs; }
template <typename T, typename U> Modular<T> operator-(U lhs, const Modular<T>& rhs) { return Modular<T>(lhs) -= rhs; }
template <typename T> Modular<T> operator*(const Modular<T>& lhs, const Modular<T>& rhs) { return Modular<T>(lhs) *= rhs; }
template <typename T, typename U> Modular<T> operator*(const Modular<T>& lhs, U rhs) { return Modular<T>(lhs) *= rhs; }
template <typename T, typename U> Modular<T> operator*(U lhs, const Modular<T>& rhs) { return Modular<T>(lhs) *= rhs; }
template <typename T> Modular<T> operator/(const Modular<T>& lhs, const Modular<T>& rhs) { return Modular<T>(lhs) /= rhs; }
template <typename T, typename U> Modular<T> operator/(const Modular<T>& lhs, U rhs) { return Modular<T>(lhs) /= rhs; }
template <typename T, typename U> Modular<T> operator/(U lhs, const Modular<T>& rhs) { return Modular<T>(lhs) /= rhs; }
template<typename T, typename U>
Modular<T> power(const Modular<T>& a, const U& b) {
assert(b >= 0);
Modular<T> x = a, res = 1;
U p = b;
while (p > 0) {
if (p & 1) res *= x;
x *= x;
p >>= 1;
}
return res;
}
template <typename T>
bool IsZero(const Modular<T>& number) {
return number() == 0;
}
template <typename T>
string to_string(const Modular<T>& number) {
return to_string(number());
}
template <typename T>
std::ostream& operator<<(std::ostream& stream, const Modular<T>& number) {
return stream << number();
}
template <typename T>
std::istream& operator>>(std::istream& stream, Modular<T>& number) {
typename common_type<typename Modular<T>::Type, int64_t>::type x;
stream >> x;
number.value = Modular<T>::normalize(x);
return stream;
}
/*
using ModType = int;
struct VarMod { static ModType value; };
ModType VarMod::value;
ModType& md = VarMod::value;
using Mint = Modular<VarMod>;
*/
constexpr int md = 998244353;
using Mint = Modular<std::integral_constant<decay<decltype(md)>::type, md>>;
Mint pwr(Mint a, ll k) {
Mint ans = 1;
while(k) {
if(k & 1) ans = ans * a;
a = a * a;
k >>= 1;
}
return ans;
}
// -- SUFFIX ARRAY START
/*
Characters should be in range (0, char_bound - 1)
For strings, use char_bound = 256
*/
template <typename T>
vector<int> suffix_array(int n, const T &s, int char_bound) {
vector<int> a(n);
if (n == 0) {
return a;
}
if (char_bound != -1) {
vector<int> aux(char_bound, 0);
for (int i = 0; i < n; i++) {
aux[s[i]]++;
}
int sum = 0;
for (int i = 0; i < char_bound; i++) {
int add = aux[i];
aux[i] = sum;
sum += add;
}
for (int i = 0; i < n; i++) {
a[aux[s[i]]++] = i;
}
} else {
iota(a.begin(), a.end(), 0);
sort(a.begin(), a.end(), [&s](int i, int j) { return s[i] < s[j]; });
}
vector<int> sorted_by_second(n);
vector<int> ptr_group(n);
vector<int> new_group(n);
vector<int> group(n);
group[a[0]] = 0;
for (int i = 1; i < n; i++) {
group[a[i]] = group[a[i - 1]] + (!(s[a[i]] == s[a[i - 1]]));
}
int cnt = group[a[n - 1]] + 1;
int step = 1;
while (cnt < n) {
int at = 0;
for (int i = n - step; i < n; i++) {
sorted_by_second[at++] = i;
}
for (int i = 0; i < n; i++) {
if (a[i] - step >= 0) {
sorted_by_second[at++] = a[i] - step;
}
}
for (int i = n - 1; i >= 0; i--) {
ptr_group[group[a[i]]] = i;
}
for (int i = 0; i < n; i++) {
int x = sorted_by_second[i];
a[ptr_group[group[x]]++] = x;
}
new_group[a[0]] = 0;
for (int i = 1; i < n; i++) {
if (group[a[i]] != group[a[i - 1]]) {
new_group[a[i]] = new_group[a[i - 1]] + 1;
} else {
int pre = (a[i - 1] + step >= n ? -1 : group[a[i - 1] + step]);
int cur = (a[i] + step >= n ? -1 : group[a[i] + step]);
new_group[a[i]] = new_group[a[i - 1]] + (pre != cur);
}
}
swap(group, new_group);
cnt = group[a[n - 1]] + 1;
step <<= 1;
}
return a;
}
template <typename T>
vector<int> suffix_array(const T &s, int char_bound) {
return suffix_array((int) s.size(), s, char_bound);
}
template <typename T>
vector<int> build_lcp(int n, const T &s, const vector<int> &sa) {
assert((int) sa.size() == n);
vector<int> pos(n);
for (int i = 0; i < n; i++) {
pos[sa[i]] = i;
}
vector<int> lcp(max(n - 1, 0));
int k = 0;
for (int i = 0; i < n; i++) {
k = max(k - 1, 0);
if (pos[i] == n - 1) {
k = 0;
} else {
int j = sa[pos[i] + 1];
while (i + k < n && j + k < n && s[i + k] == s[j + k]) {
k++;
}
lcp[pos[i]] = k;
}
}
return lcp;
}
template <typename T>
vector<int> build_lcp(const T &s, const vector<int> &sa) {
return build_lcp((int) s.size(), s, sa);
}
template<typename T, size_t N>
struct SuffixArray {
vector<int> sa, lcp;
int n;
void init(int nn, const T &s, int char_bound) {
assert(N >= sz(s));
n = nn;
sa = suffix_array(s, char_bound);
lcp = build_lcp(s, sa);
}
};
// -- SUFFIX ARRAY END
// -- SPARSE SEGTREE START
const int NN = 4e7 + 5;
struct node {
int l, r;
pair<Mint, Mint> val;
} tr[NN];
int tot = 0;
const int N = 5e5 + 5;
int version[N];
SuffixArray<string, N> S;
Mint pre[N], w[N];
int n;
pair<Mint, Mint> query(int nd,int s,int e,int l,int r) { // sum query in segtree
if(s > r || e < l || !nd) return {0, 0};
else if(l <= s && e <= r) {
return tr[nd].val;
}
int m = (s + e) >> 1;
auto p1 = query(tr[nd].l, s, m, l, r);
auto p2 = query(tr[nd].r, m + 1, e, l, r);
return {p1.fi + p2.fi, p1.se + p2.se};
}
void merge(int &nd1,int nd2) { // merge two segtrees
if(!nd1 || !nd2) {
nd1 |= nd2;
return;
}
tr[nd1].val.fi += tr[nd2].val.fi;
tr[nd1].val.se += tr[nd2].val.se;
merge(tr[nd1].l, tr[nd2].l);
merge(tr[nd1].r, tr[nd2].r);
}
void upd(int &nd,int s,int e,int idx) { // for initializing segtrees
if(!nd) nd = ++tot;
tr[nd].val = {1, pre[idx - 1]};
if(s == e) return;
int m = (s + e) >> 1;
if(idx <= m)
upd(tr[nd].l, s, m, idx);
else
upd(tr[nd].r, m + 1, e, idx);
}
// -- SPARSE SEGTREE END
// -- DSU START
int dsu[N];
Mint cur = 0;
vector<int> pos[N]; // maintains the indexes of the suffix array in each component
int root(int u) {
return ((u == dsu[u]) ? u : dsu[u] = root(dsu[u]));
}
void uni(int u,int v) { // for merging two components
u = root(u), v = root(v);
if(sz(pos[u]) > sz(pos[v])) swap(u, v);
dsu[u] = v;
for(int i : pos[u]) {
auto p1 = query(version[v], 1, n, i + 1, n);
cur += p1.se - p1.fi * pre[i - 1];
auto p2 = tr[version[v]].val;
p2.fi -= p1.fi;
p2.se -= p1.se;
cur += p2.fi * pre[i - 1] - p2.se;
pos[v].pb(i);
}
pos[u].clear();
merge(version[v], version[u]); // merge the second segtree into the first
}
// -- DSU END
void solve() {
cur = 0;
while(tot > 0) {
tr[tot].l = tr[tot].r = 0;
tr[tot].val = {0, 0};
tot--;
}
string s;
sc(s);
n = sz(s);
S.init(sz(s), s, 256);
fr(i, 0, 25) sc(w[i]);
fr(i, 1, n) pre[i] = pre[i - 1] + w[s[i - 1] - 'a'];
fr(i, 1, n) {
dsu[i] = i;
pos[i] = {S.sa[i - 1] + 1};
version[i] = 0;
upd(version[i], 1, n, S.sa[i - 1] + 1);
}
vector<pair<int,int>> v;
fr(i, 0, sz(S.lcp) - 1) v.eb(S.lcp[i], i + 1);
sort(all(v));
reverse(all(v));
int pt = 0;
Mint ans = 0;
rf(l, n, 1) {
while(pt < sz(v) && v[pt].fi == l) {
uni(v[pt].se, v[pt].se + 1);
pt++;
}
ans += cur;
}
Mint sum = 0;
fr(i, 1, n) { // for handling |R| = |T|
ans += pre[i] * i - sum;
sum += pre[i];
}
ans = ((ans * 2) / (n * 1LL * (n + 1)));
cout << ans << endl;
}
int main() {
ios :: sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
cin >> t;
for(int tt = 1; tt <= t; tt++) {
solve();
}
return 0;
}
|
1a42618a027ec411d97c8a04a3059e899317b44b
|
be0282afa8dd436619c71d6118c9db455eaf1a29
|
/Intermediate/Build/Win64/Design3D/Inc/UnrealEd/MaterialStatsOptions.generated.h
|
39db784ae98bd4d16f5da4772caf20f1b68dd7b9
|
[] |
no_license
|
Quant2017/Design3D
|
0f915580b222af40ab911021cceef5c26375d7f9
|
94a22386be4aa37aa0f546354cc62958820a4bf6
|
refs/heads/master
| 2022-04-23T10:44:12.398772
| 2020-04-22T01:02:39
| 2020-04-22T01:02:39
| 262,966,755
| 1
| 0
| null | 2020-05-11T07:12:37
| 2020-05-11T07:12:36
| null |
UTF-8
|
C++
| false
| false
| 5,113
|
h
|
MaterialStatsOptions.generated.h
|
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
===========================================================================*/
#include "UObject/ObjectMacros.h"
#include "UObject/ScriptMacros.h"
PRAGMA_DISABLE_DEPRECATION_WARNINGS
#ifdef UNREALED_MaterialStatsOptions_generated_h
#error "MaterialStatsOptions.generated.h already included, missing '#pragma once' in MaterialStatsOptions.h"
#endif
#define UNREALED_MaterialStatsOptions_generated_h
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_RPC_WRAPPERS
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_RPC_WRAPPERS_NO_PURE_DECLS
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_INCLASS_NO_PURE_DECLS \
private: \
static void StaticRegisterNativesUMaterialStatsOptions(); \
friend struct Z_Construct_UClass_UMaterialStatsOptions_Statics; \
public: \
DECLARE_CLASS(UMaterialStatsOptions, UObject, COMPILED_IN_FLAGS(0 | CLASS_Config), CASTCLASS_None, TEXT("/Script/UnrealEd"), NO_API) \
DECLARE_SERIALIZER(UMaterialStatsOptions) \
static const TCHAR* StaticConfigName() {return TEXT("EditorPerProjectUserSettings");} \
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_INCLASS \
private: \
static void StaticRegisterNativesUMaterialStatsOptions(); \
friend struct Z_Construct_UClass_UMaterialStatsOptions_Statics; \
public: \
DECLARE_CLASS(UMaterialStatsOptions, UObject, COMPILED_IN_FLAGS(0 | CLASS_Config), CASTCLASS_None, TEXT("/Script/UnrealEd"), NO_API) \
DECLARE_SERIALIZER(UMaterialStatsOptions) \
static const TCHAR* StaticConfigName() {return TEXT("EditorPerProjectUserSettings");} \
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_STANDARD_CONSTRUCTORS \
/** Standard constructor, called after all reflected properties have been initialized */ \
NO_API UMaterialStatsOptions(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); \
DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UMaterialStatsOptions) \
DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, UMaterialStatsOptions); \
DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UMaterialStatsOptions); \
private: \
/** Private move- and copy-constructors, should never be used */ \
NO_API UMaterialStatsOptions(UMaterialStatsOptions&&); \
NO_API UMaterialStatsOptions(const UMaterialStatsOptions&); \
public:
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_ENHANCED_CONSTRUCTORS \
/** Standard constructor, called after all reflected properties have been initialized */ \
NO_API UMaterialStatsOptions(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()) : Super(ObjectInitializer) { }; \
private: \
/** Private move- and copy-constructors, should never be used */ \
NO_API UMaterialStatsOptions(UMaterialStatsOptions&&); \
NO_API UMaterialStatsOptions(const UMaterialStatsOptions&); \
public: \
DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, UMaterialStatsOptions); \
DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UMaterialStatsOptions); \
DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UMaterialStatsOptions)
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_PRIVATE_PROPERTY_OFFSET
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_17_PROLOG
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_GENERATED_BODY_LEGACY \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_PRIVATE_PROPERTY_OFFSET \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_RPC_WRAPPERS \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_INCLASS \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_STANDARD_CONSTRUCTORS \
public: \
PRAGMA_ENABLE_DEPRECATION_WARNINGS
#define Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_GENERATED_BODY \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_PRIVATE_PROPERTY_OFFSET \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_RPC_WRAPPERS_NO_PURE_DECLS \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_INCLASS_NO_PURE_DECLS \
Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h_20_ENHANCED_CONSTRUCTORS \
static_assert(false, "Unknown access specifier for GENERATED_BODY() macro in class MaterialStatsOptions."); \
PRAGMA_ENABLE_DEPRECATION_WARNINGS
template<> UNREALED_API UClass* StaticClass<class UMaterialStatsOptions>();
#undef CURRENT_FILE_ID
#define CURRENT_FILE_ID Engine_Source_Editor_UnrealEd_Classes_Preferences_MaterialStatsOptions_h
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
1bdd0693ddb496eea8519085ecbfe6a725933902
|
883409877f109af6cbfb254cd7a4e9f9dee9d2fe
|
/WeeklyCode/week8/Best Time to Buy and Sell Stock II/linjingjian.cpp
|
4998ba04a53edb0f75b4378ba45e1966aa771d1f
|
[] |
no_license
|
coderfengyun/TCSE2012
|
f83b0256d7b1a7c8b906d6ca52c6b5cdfd6cd578
|
43aee67600f1a3c2f29922e827d05e6c6e8a9364
|
refs/heads/master
| 2021-01-22T20:34:40.911809
| 2014-09-30T03:09:34
| 2014-09-30T03:09:34
| 18,791,865
| 2
| 2
| null | 2014-05-13T09:27:44
| 2014-04-15T07:52:36
|
Java
|
UTF-8
|
C++
| false
| false
| 454
|
cpp
|
linjingjian.cpp
|
class Solution {
public:
int maxProfit(vector<int> &prices) {
if(prices.size() == 0) return 0;
prices.push_back(0);
int first=0, ans=0, n=prices.size();
for(int i=1; i<n; i++)
{
if(prices[i] < prices[first]){ first = i; continue;}
if(i!=n && prices[i]<= prices[i+1]) continue;
ans += prices[i] - prices[first];
first = i+1;
}
return ans;
}
};
|
3498ab79a7bcb1c8b0fd829f2b0e6965b9e917ef
|
46e1ec2efbe78bc84b36236bd77379a8d3449ffb
|
/observer.h
|
59e6042626be925646bfc272a6946cb2cd9e0fa3
|
[] |
no_license
|
nt7nguye/biquadris
|
5e2e1f7468983a820e058af770ee9427ec9182a8
|
62f20f1a244e22db0d0f1255452d04a2cddd8761
|
refs/heads/master
| 2023-08-07T08:20:40.763015
| 2021-09-16T00:59:44
| 2021-09-16T00:59:44
| 406,970,184
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 190
|
h
|
observer.h
|
#ifndef OBSERVER_H
#define OBSERVER_H
// Simple observer (as described in lecture)
class Observer {
public:
virtual void notify() = 0;
virtual ~Observer() = default;
};
#endif
|
5c9ede9b518c337ffb95472ba7e69e808ec8e97e
|
38b9daafe39f937b39eefc30501939fd47f7e668
|
/tutorials/2WayCouplingOceanWave3D/EvalResults180628-fully/25.4/p
|
869e0eda6450e6baccdbde88569775cc8ec8099a
|
[] |
no_license
|
rubynuaa/2-way-coupling
|
3a292840d9f56255f38c5e31c6b30fcb52d9e1cf
|
a820b57dd2cac1170b937f8411bc861392d8fbaa
|
refs/heads/master
| 2020-04-08T18:49:53.047796
| 2018-08-29T14:22:18
| 2018-08-29T14:22:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 186,778
|
p
|
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "25.4";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField nonuniform List<scalar>
21420
(
3616.77
3633.7
3652.52
3673.2
3695.69
3719.98
3746.03
3773.72
3802.95
3833.6
3865.43
3898.1
3931.62
3965.65
3999.8
4033.68
4066.88
4099.03
4129.71
4158.51
4185.07
4208.99
4229.92
4247.55
4261.62
4271.9
4278.24
4280.48
4278.35
4272.13
4262
4248.05
4230.51
4209.66
4185.77
4159.18
4130.3
4099.52
4067.24
4033.88
3999.85
3965.53
3931.27
3897.6
3865.94
3834.2
3803.56
3774.27
3746.49
3720.36
3695.95
3673.3
3652.43
3633.35
3616.03
3600.45
3586.58
3574.36
3563.78
3554.78
3547.33
3541.39
3536.93
3533.86
3532.18
3532.41
3534.17
3537.44
3542.25
3548.59
3556.5
3566
3577.12
3589.88
3604.28
3620.33
3638.04
3657.41
3678.42
3701.06
3725.26
3750.98
3778.2
3806.82
3836.77
3867.93
3894.67
3926.94
3959.54
3992.19
4024.58
4056.38
4087.18
4116.63
4144.32
4169.87
4192.89
4213.05
4230.02
4243.52
4253.3
4259.2
4261.04
4258.81
4252.48
4242.14
4227.87
4209.85
4188.34
4163.64
4136.09
4106.08
4074.06
4040.47
4005.79
3970.49
3935.02
3899.82
3865.28
3831.74
3799.48
3768.77
3739.78
3712.66
3687.5
3664.34
3643.21
3624.09
3606.95
3591.73
3578.37
3566.8
3556.93
3548.69
3541.99
3536.76
3532.92
3530.42
3529.2
3529.23
3530.45
3532.86
3536.45
3541.24
3547.25
3554.51
3563.09
3573.03
3584.4
3597.27
3611.7
3627.77
3645.51
3664.97
3686.14
3709.02
3733.57
3759.71
3787.34
3816.35
3846.54
3877.92
3909.83
3942.17
3974.63
4006.83
4038.39
4068.88
4097.9
4125
4149.8
4171.89
4190.93
4206.63
4218.71
4226.98
4231.31
4231.57
4227.86
4220.15
4208.59
4193.33
4174.61
4152.7
4127.94
4100.67
4071.28
4040.18
4007.78
3974.51
3940.77
3906.94
3873.39
3840.45
3808.5
3777.59
3748
3719.9
3693.4
3668.58
3645.49
3624.14
3604.56
3586.72
3570.61
3556.21
3543.48
3532.4
3522.92
3515.02
3508.67
3503.82
3500.42
3498.49
3497.99
3498.85
3501.08
3504.66
3509.59
3515.85
3523.46
3532.41
3542.72
3554.41
3567.5
3582.01
3597.97
3615.39
3634.31
3654.72
3676.62
3699.98
3724.76
3750.9
3778.29
3806.84
3836.26
3866.39
3896.99
3927.79
3958.46
3988.68
4018.07
4046.27
4072.9
4097.55
4119.88
4139.52
4156.15
4169.48
4179.27
4185.34
4187.55
4185.76
4180.08
4170.54
4157.2
4140.27
4119.98
4096.63
4070.57
4042.16
4011.82
3979.98
3947.07
3913.54
3879.8
3846.28
3813.35
3781.36
3750.77
3721.88
3694.47
3668.79
3644.96
3623.08
3603.16
3585.22
3569.22
3555.1
3542.79
3532.23
3523.29
3515.9
3509.96
3505.38
3502.09
3500
3499.12
3499.49
3500.94
3503.74
3507.89
3513.4
3520.28
3528.55
3538.23
3549.36
3561.95
3576.03
3591.63
3608.75
3627.42
3647.63
3669.35
3692.59
3717.3
3743.4
3770.74
3799.17
3828.73
3859.2
3890.33
3921.84
3953.49
3984.99
4016.02
4046.26
4075.37
4103.02
4128.9
4152.65
4173.99
4192.62
4208.25
4220.64
4229.58
4234.89
4236.32
4233.9
4227.47
4217.13
4203.02
4185.29
4164.18
4140.01
4113.09
4083.82
4052.65
4020.05
3986.46
3952.42
3918.39
3884.87
3852.26
3821.45
3792.07
3763.6
3736.74
3711.74
3688.72
3667.74
3648.81
3631.92
3617.03
3604.05
3592.87
3518.59
3535.52
3554.34
3575.02
3597.51
3621.8
3647.85
3675.54
3704.78
3735.43
3767.27
3799.95
3833.48
3867.52
3901.68
3935.58
3968.79
4000.96
4031.66
4060.48
4087.05
4111
4131.94
4149.58
4163.66
4173.95
4180.3
4182.55
4180.4
4174.18
4164.04
4150.08
4132.53
4111.66
4087.76
4061.15
4032.26
4001.46
3969.15
3935.78
3901.73
3867.4
3833.13
3799.44
3767.77
3736.03
3705.38
3676.09
3648.31
3622.18
3597.77
3575.12
3554.25
3535.17
3517.86
3502.28
3488.41
3476.2
3465.61
3456.62
3449.17
3443.23
3438.77
3435.71
3434.03
3434.26
3436.01
3439.28
3444.09
3450.43
3458.34
3467.84
3478.96
3491.71
3506.11
3522.16
3539.87
3559.24
3580.25
3602.89
3627.09
3652.81
3680.03
3708.65
3738.6
3769.76
3796.54
3828.81
3861.42
3894.07
3926.48
3958.29
3989.11
4018.57
4046.28
4071.85
4094.89
4115.07
4132.05
4145.56
4155.35
4161.26
4163.1
4160.86
4154.54
4144.19
4129.91
4111.88
4090.36
4065.63
4038.06
4008.04
3975.99
3942.38
3907.68
3872.37
3836.88
3801.67
3767.11
3733.56
3701.3
3670.58
3641.59
3614.47
3589.3
3566.15
3545.02
3525.9
3508.77
3493.55
3480.2
3468.63
3458.77
3450.53
3443.83
3438.6
3434.77
3432.26
3431.06
3431.08
3432.3
3434.71
3438.3
3443.09
3449.1
3456.36
3464.94
3474.87
3486.24
3499.1
3513.54
3529.6
3547.34
3566.79
3587.96
3610.84
3635.39
3661.53
3689.17
3718.18
3748.38
3779.77
3811.69
3844.04
3876.51
3908.73
3940.3
3970.82
3999.85
4026.98
4051.78
4073.89
4092.96
4108.66
4120.75
4129.03
4133.37
4133.64
4129.91
4122.2
4110.63
4095.36
4076.62
4054.7
4029.92
4002.63
3973.22
3942.11
3909.69
3876.41
3842.65
3808.81
3775.24
3742.29
3710.34
3679.42
3649.83
3621.72
3595.22
3570.4
3547.31
3525.97
3506.38
3488.55
3472.44
3458.04
3445.31
3434.23
3424.76
3416.86
3410.51
3405.66
3402.27
3400.33
3399.83
3400.7
3402.92
3406.51
3411.44
3417.7
3425.3
3434.26
3444.56
3456.25
3469.34
3483.85
3499.8
3517.23
3536.14
3556.55
3578.45
3601.81
3626.59
3652.73
3680.13
3708.68
3738.11
3768.25
3798.86
3829.66
3860.35
3890.59
3920
3948.21
3974.85
3999.53
4021.87
4041.53
4058.17
4071.51
4081.32
4087.39
4089.61
4087.82
4082.13
4072.59
4059.23
4042.29
4021.99
3998.63
3972.54
3944.12
3913.76
3881.89
3848.97
3815.42
3781.67
3748.13
3715.19
3683.19
3652.6
3623.7
3596.29
3570.61
3546.77
3524.89
3504.98
3487.04
3471.04
3456.93
3444.63
3434.06
3425.13
3417.74
3411.81
3407.23
3403.94
3401.86
3400.98
3401.34
3402.79
3405.59
3409.74
3415.25
3422.13
3430.4
3440.08
3451.2
3463.79
3477.87
3493.46
3510.58
3529.25
3549.46
3571.18
3594.42
3619.13
3645.24
3672.57
3701.02
3730.58
3761.06
3792.19
3823.71
3855.38
3886.88
3917.93
3948.19
3977.3
4004.98
4030.87
4054.64
4075.99
4094.63
4110.27
4122.68
4131.62
4136.94
4138.38
4135.94
4129.52
4119.18
4105.05
4087.31
4066.19
4042
4015.06
3985.77
3954.58
3921.96
3888.35
3854.29
3820.25
3786.71
3754.09
3723.28
3693.89
3665.41
3638.55
3613.55
3590.53
3569.55
3550.62
3533.73
3518.85
3505.87
3494.7
3420.34
3437.27
3456.08
3476.75
3499.25
3523.54
3549.59
3577.29
3606.53
3637.19
3669.05
3701.74
3735.29
3769.35
3803.55
3837.47
3870.72
3902.92
3933.66
3962.52
3989.13
4013.1
4034.08
4051.75
4065.85
4076.16
4082.52
4084.8
4082.62
4076.38
4066.23
4052.25
4034.68
4013.77
3989.83
3963.19
3934.26
3903.42
3871.08
3837.68
3803.6
3769.24
3734.94
3701.24
3669.54
3637.79
3607.13
3577.83
3550.05
3523.91
3499.5
3476.86
3456
3436.92
3419.61
3404.04
3390.17
3377.96
3367.39
3358.39
3350.95
3345.01
3340.55
3337.49
3335.83
3336.05
3337.8
3341.07
3345.87
3352.22
3360.12
3369.61
3380.73
3393.48
3407.88
3423.93
3441.64
3461
3482.01
3504.65
3528.85
3554.57
3581.79
3610.41
3640.36
3671.51
3698.38
3730.65
3763.27
3795.95
3828.38
3860.22
3891.07
3920.57
3948.32
3973.92
3996.99
4017.2
4034.21
4047.74
4057.56
4063.47
4065.34
4063.08
4056.75
4046.39
4032.09
4014.04
3992.48
3967.72
3940.11
3910.05
3877.96
3844.31
3809.58
3774.22
3738.7
3703.46
3668.89
3635.31
3603.04
3572.31
3543.31
3516.19
3491.02
3467.87
3446.74
3427.63
3410.5
3395.3
3381.95
3370.39
3360.54
3352.3
3345.61
3340.39
3336.56
3334.06
3332.86
3332.89
3334.11
3336.52
3340.11
3344.89
3350.9
3358.16
3366.72
3376.65
3388.01
3400.87
3415.3
3431.36
3449.09
3468.54
3489.71
3512.59
3537.14
3563.28
3590.93
3619.95
3650.16
3681.56
3713.5
3745.88
3778.38
3810.62
3842.23
3872.78
3901.85
3929.02
3953.86
3976.01
3995.1
4010.83
4022.94
4031.24
4035.58
4035.87
4032.11
4024.39
4012.81
3997.52
3978.76
3956.8
3931.98
3904.66
3875.21
3844.06
3811.61
3778.29
3744.5
3710.63
3677.05
3644.08
3612.11
3581.18
3551.58
3523.47
3496.96
3472.14
3449.05
3427.71
3408.13
3390.3
3374.2
3359.8
3347.08
3336
3326.53
3318.64
3312.29
3307.44
3304.05
3302.13
3301.62
3302.49
3304.72
3308.3
3313.23
3319.49
3327.09
3336.04
3346.35
3358.03
3371.12
3385.62
3401.58
3418.99
3437.9
3458.31
3480.21
3503.57
3528.36
3554.5
3581.9
3610.46
3639.91
3670.06
3700.7
3731.52
3762.24
3792.5
3821.94
3850.19
3876.87
3901.58
3923.95
3943.64
3960.31
3973.68
3983.5
3989.59
3991.82
3990.03
3984.33
3974.77
3961.41
3944.44
3924.11
3900.71
3874.59
3846.12
3815.73
3783.82
3750.87
3717.28
3683.5
3649.93
3616.97
3584.95
3554.35
3525.44
3498.02
3472.34
3448.5
3426.63
3406.72
3388.79
3372.79
3358.69
3346.39
3335.84
3326.91
3319.53
3313.6
3309.04
3305.75
3303.67
3302.8
3303.16
3304.6
3307.39
3311.54
3317.05
3323.93
3332.19
3341.87
3352.99
3365.57
3379.65
3395.24
3412.36
3431.02
3451.22
3472.94
3496.18
3520.89
3547
3574.35
3602.8
3632.37
3662.87
3694.02
3725.56
3757.25
3788.78
3819.85
3850.13
3879.28
3906.98
3932.9
3956.7
3978.08
3996.75
4012.42
4024.84
4033.8
4039.13
4040.6
4038.14
4031.71
4021.36
4007.22
3989.45
3968.3
3944.08
3917.1
3887.77
3856.54
3823.88
3790.24
3756.13
3722.06
3688.49
3655.84
3625.03
3595.62
3567.13
3540.27
3515.27
3492.24
3471.26
3452.34
3435.47
3420.59
3407.62
3396.46
3322.02
3338.93
3357.74
3378.41
3400.9
3425.2
3451.25
3478.95
3508.21
3538.89
3570.76
3603.48
3637.06
3671.16
3705.39
3739.37
3772.66
3804.92
3835.71
3864.62
3891.28
3915.31
3936.34
3954.05
3968.18
3978.52
3984.89
3987.2
3984.99
3978.74
3968.56
3954.55
3936.94
3915.99
3892
3865.31
3836.32
3805.43
3773.03
3739.57
3705.45
3671.05
3636.71
3602.98
3571.24
3539.47
3508.8
3479.49
3451.7
3425.57
3401.15
3378.51
3357.66
3338.59
3321.29
3305.73
3291.86
3279.67
3269.09
3260.11
3252.66
3246.73
3242.28
3239.22
3237.57
3237.78
3239.53
3242.8
3247.6
3253.94
3261.84
3271.33
3282.44
3295.19
3309.58
3325.63
3343.33
3362.69
3383.71
3406.34
3430.54
3456.26
3483.48
3512.11
3542.05
3573.19
3600.21
3632.47
3665.11
3697.81
3730.29
3762.17
3793.07
3822.62
3850.41
3876.07
3899.19
3919.45
3936.5
3950.07
3959.91
3965.84
3967.73
3965.45
3959.12
3948.74
3934.41
3916.32
3894.72
3869.91
3842.24
3812.12
3779.97
3746.26
3711.47
3676.05
3640.49
3605.2
3570.59
3536.99
3504.69
3473.95
3444.94
3417.81
3392.65
3369.5
3348.38
3329.28
3312.16
3296.97
3283.63
3272.08
3262.24
3254.02
3247.34
3242.12
3238.3
3235.81
3234.62
3234.64
3235.86
3238.27
3241.86
3246.64
3252.64
3259.9
3268.46
3278.38
3289.73
3302.57
3316.99
3333.04
3350.77
3370.21
3391.37
3414.25
3438.81
3464.96
3492.61
3521.65
3551.88
3583.31
3615.27
3647.69
3680.23
3712.52
3744.18
3774.78
3803.91
3831.13
3856.03
3878.23
3897.37
3913.14
3925.28
3933.59
3937.95
3938.25
3934.47
3926.74
3915.13
3899.81
3881
3859
3834.13
3806.75
3777.25
3746.04
3713.55
3680.17
3646.34
3612.43
3578.81
3545.8
3513.82
3482.86
3453.25
3425.13
3398.62
3373.8
3350.71
3329.38
3309.81
3291.98
3275.88
3261.49
3248.78
3237.7
3228.24
3220.35
3214
3209.16
3205.78
3203.86
3203.36
3204.22
3206.46
3210.04
3214.97
3221.23
3228.83
3237.78
3248.08
3259.76
3272.84
3287.33
3303.28
3320.7
3339.6
3360
3381.9
3405.26
3430.05
3456.2
3483.61
3512.19
3541.65
3571.84
3602.5
3633.36
3664.12
3694.42
3723.92
3752.22
3778.94
3803.7
3826.13
3845.86
3862.58
3875.98
3885.83
3891.94
3894.18
3892.41
3886.68
3877.11
3863.71
3846.71
3826.33
3802.89
3776.71
3748.19
3717.73
3685.77
3652.76
3619.12
3585.29
3551.69
3518.69
3486.64
3456.02
3427.1
3399.67
3373.98
3350.15
3328.28
3308.37
3290.45
3274.47
3260.38
3248.09
3237.55
3228.64
3221.27
3215.35
3210.79
3207.51
3205.44
3204.57
3204.92
3206.35
3209.15
3213.3
3218.8
3225.68
3233.94
3243.6
3254.72
3267.29
3281.37
3296.95
3314.06
3332.72
3352.92
3374.64
3397.87
3422.59
3448.7
3476.05
3504.53
3534.12
3564.63
3595.81
3627.38
3659.1
3690.67
3721.78
3752.11
3781.3
3809.04
3835.01
3858.85
3880.28
3898.98
3914.69
3927.14
3936.13
3941.47
3942.97
3940.48
3934.06
3923.69
3909.51
3891.71
3870.52
3846.24
3819.22
3789.82
3758.53
3725.81
3692.11
3657.95
3623.82
3590.21
3557.53
3526.71
3497.27
3468.77
3441.9
3416.89
3393.87
3372.89
3353.98
3337.11
3322.25
3309.29
3298.14
3223.61
3240.52
3259.32
3279.99
3302.47
3326.77
3352.83
3380.54
3409.81
3440.51
3472.41
3505.16
3538.78
3572.93
3607.22
3641.26
3674.62
3706.94
3737.81
3766.79
3793.52
3817.62
3838.71
3856.48
3870.66
3881.03
3887.43
3889.75
3887.54
3881.26
3871.04
3856.99
3839.32
3818.31
3794.26
3767.49
3738.43
3707.46
3675
3641.47
3607.29
3572.83
3538.44
3504.67
3472.88
3441.08
3410.39
3381.07
3353.28
3327.13
3302.73
3280.09
3259.24
3240.18
3222.89
3207.34
3193.49
3181.3
3170.74
3161.76
3154.32
3148.4
3143.94
3140.89
3139.25
3139.46
3141.21
3144.47
3149.26
3155.6
3163.5
3172.98
3184.08
3196.83
3211.22
3227.26
3244.96
3264.32
3285.33
3307.96
3332.16
3357.89
3385.1
3413.73
3443.67
3474.79
3502.01
3534.26
3566.92
3599.66
3632.19
3664.13
3695.09
3724.71
3752.58
3778.3
3801.5
3821.81
3838.92
3852.54
3862.41
3868.37
3870.27
3868
3861.65
3851.24
3836.87
3818.73
3797.07
3772.19
3744.44
3714.24
3682.01
3648.22
3613.35
3577.87
3542.23
3506.89
3472.23
3438.59
3406.27
3375.5
3346.48
3319.35
3294.18
3271.04
3249.93
3230.84
3213.74
3198.56
3185.24
3173.71
3163.88
3155.67
3149
3143.8
3139.99
3137.51
3136.32
3136.35
3137.58
3139.99
3143.57
3148.35
3154.34
3161.59
3170.13
3180.04
3191.38
3204.21
3218.62
3234.65
3252.37
3271.8
3292.97
3315.84
3340.4
3366.56
3394.23
3423.28
3453.53
3485
3517
3549.47
3582.06
3614.42
3646.14
3676.82
3706.02
3733.32
3758.29
3780.55
3799.75
3815.58
3827.76
3836.11
3840.48
3840.79
3836.99
3829.24
3817.6
3802.22
3783.36
3761.3
3736.36
3708.91
3679.34
3648.06
3615.49
3582.05
3548.15
3514.19
3480.52
3447.46
3415.47
3384.48
3354.85
3326.72
3300.21
3275.38
3252.3
3230.97
3211.4
3193.58
3177.5
3163.11
3150.41
3139.34
3129.89
3122
3115.66
3110.83
3107.46
3105.54
3105.03
3105.91
3108.14
3111.73
3116.66
3122.91
3130.51
3139.45
3149.75
3161.42
3174.49
3188.99
3204.93
3222.33
3241.23
3261.63
3283.52
3306.88
3331.68
3357.83
3385.26
3413.86
3443.35
3473.57
3504.27
3535.18
3565.99
3596.35
3625.91
3654.28
3681.07
3705.9
3728.39
3748.19
3764.96
3778.41
3788.31
3794.44
3796.69
3794.93
3789.19
3779.59
3766.16
3749.1
3728.67
3705.15
3678.9
3650.31
3619.77
3587.74
3554.65
3520.94
3487.05
3453.39
3420.34
3388.26
3357.62
3328.68
3301.24
3275.54
3251.71
3229.84
3209.95
3192.04
3176.07
3161.99
3149.72
3139.2
3130.3
3122.95
3117.04
3112.49
3109.22
3107.16
3106.3
3106.64
3108.06
3110.86
3115.01
3120.51
3127.37
3135.62
3145.29
3156.39
3168.96
3183.02
3198.6
3215.7
3234.36
3254.55
3276.26
3299.5
3324.21
3350.33
3377.7
3406.19
3435.8
3466.35
3497.56
3529.17
3560.94
3592.55
3623.72
3654.1
3683.35
3711.16
3737.18
3761.09
3782.57
3801.32
3817.08
3829.58
3838.6
3843.96
3845.48
3842.99
3836.55
3826.15
3811.94
3794.1
3772.84
3748.5
3721.4
3691.93
3660.56
3627.75
3593.97
3559.74
3525.54
3491.88
3459.15
3428.32
3398.84
3370.32
3343.43
3318.42
3295.4
3274.43
3255.53
3238.68
3223.82
3210.88
3199.75
3125.14
3142.03
3160.82
3181.48
3203.96
3228.26
3254.32
3282.05
3311.34
3342.06
3374
3406.79
3440.46
3474.67
3509.03
3543.15
3576.59
3609
3639.96
3669.03
3695.85
3720.04
3741.21
3759.04
3773.28
3783.69
3790.12
3792.46
3790.24
3783.93
3773.67
3759.56
3741.83
3720.74
3696.6
3669.75
3640.59
3609.53
3576.98
3543.36
3509.1
3474.57
3440.13
3406.31
3374.45
3342.62
3311.91
3282.57
3254.76
3228.62
3204.21
3181.58
3160.75
3141.7
3124.42
3108.88
3095.05
3082.87
3072.32
3063.35
3055.92
3050
3045.55
3042.51
3040.88
3041.09
3042.83
3046.08
3050.87
3057.2
3065.09
3074.57
3085.67
3098.4
3112.79
3128.82
3146.52
3165.87
3186.88
3209.51
3233.71
3259.44
3286.66
3315.29
3345.23
3376.31
3403.79
3436.02
3468.7
3501.5
3534.09
3566.1
3597.15
3626.85
3654.81
3680.62
3703.9
3724.29
3741.47
3755.15
3765.07
3771.06
3772.97
3770.71
3764.34
3753.89
3739.47
3721.27
3699.53
3674.56
3646.73
3616.42
3584.09
3550.2
3515.23
3479.66
3443.94
3408.52
3373.81
3340.12
3307.76
3276.97
3247.93
3220.79
3195.63
3172.49
3151.39
3132.32
3115.23
3100.07
3086.77
3075.26
3065.45
3057.26
3050.61
3045.42
3041.63
3039.16
3037.98
3038.01
3039.24
3041.65
3045.23
3050.01
3055.99
3063.22
3071.76
3081.65
3092.97
3105.78
3120.17
3136.19
3153.9
3173.32
3194.48
3217.36
3241.92
3268.09
3295.77
3324.84
3355.12
3386.65
3418.69
3451.21
3483.87
3516.31
3548.12
3578.89
3608.18
3635.57
3660.64
3682.99
3702.27
3718.15
3730.39
3738.77
3743.17
3743.48
3739.68
3731.9
3720.2
3704.77
3685.84
3663.7
3638.67
3611.13
3581.47
3550.09
3517.44
3483.92
3449.94
3415.91
3382.18
3349.07
3317.05
3286.02
3256.37
3228.23
3201.71
3176.89
3153.8
3132.48
3112.92
3095.11
3079.04
3064.66
3051.97
3040.91
3031.47
3023.6
3017.26
3012.44
3009.07
3007.16
3006.66
3007.54
3009.78
3013.36
3018.29
3024.54
3032.14
3041.07
3051.36
3063.03
3076.09
3090.57
3106.5
3123.9
3142.79
3163.18
3185.07
3208.43
3233.23
3259.4
3286.84
3315.48
3345
3375.26
3406.01
3436.98
3467.85
3498.29
3527.93
3556.38
3583.26
3608.17
3630.75
3650.63
3667.47
3680.99
3690.93
3697.1
3699.36
3697.61
3691.86
3682.22
3668.74
3651.62
3631.11
3607.51
3581.17
3552.48
3521.85
3489.72
3456.54
3422.74
3388.77
3355.04
3321.93
3289.81
3259.15
3230.18
3202.72
3177.02
3153.19
3131.32
3111.44
3093.54
3077.59
3063.54
3051.29
3040.78
3031.91
3024.57
3018.68
3014.14
3010.88
3008.84
3007.98
3008.32
3009.73
3012.52
3016.67
3022.16
3029.02
3037.26
3046.91
3058.01
3070.57
3084.62
3100.19
3117.28
3135.92
3156.11
3177.82
3201.05
3225.77
3251.9
3279.28
3307.8
3337.44
3368.02
3399.28
3430.93
3462.76
3494.44
3525.67
3556.12
3585.44
3613.32
3639.43
3663.4
3684.95
3703.77
3719.59
3732.14
3741.2
3746.59
3748.14
3745.65
3739.2
3728.76
3714.51
3696.6
3675.27
3650.84
3623.65
3594.08
3562.61
3529.7
3495.82
3461.5
3427.22
3393.48
3360.7
3329.85
3300.32
3271.78
3244.88
3219.86
3196.84
3175.88
3156.99
3140.15
3125.32
3112.4
3101.29
3026.58
3043.47
3062.24
3082.89
3105.37
3129.67
3155.74
3183.48
3212.8
3243.55
3275.52
3308.37
3342.1
3376.38
3410.83
3445.03
3478.58
3511.09
3542.15
3571.33
3598.27
3622.56
3643.82
3661.74
3676.04
3686.51
3692.97
3695.33
3693.1
3686.76
3676.44
3662.27
3644.46
3623.28
3599.04
3572.07
3542.81
3511.64
3478.97
3445.26
3410.9
3376.28
3341.77
3307.89
3275.95
3244.09
3213.35
3183.99
3156.17
3130.02
3105.62
3083
3062.17
3043.14
3025.88
3010.35
2996.53
2984.37
2973.83
2964.88
2957.46
2951.55
2947.11
2944.07
2942.45
2942.66
2944.39
2947.64
2952.43
2958.75
2966.63
2976.1
2987.18
2999.91
3014.29
3030.32
3048.01
3067.36
3088.36
3110.99
3135.19
3160.92
3188.15
3216.78
3246.71
3277.77
3305.53
3337.75
3370.46
3403.32
3435.99
3468.09
3499.24
3529.04
3557.1
3583.02
3606.4
3626.89
3644.15
3657.9
3667.88
3673.9
3675.83
3673.58
3667.19
3656.7
3642.21
3623.93
3602.11
3577.03
3549.08
3518.66
3486.2
3452.19
3417.1
3381.42
3345.61
3310.1
3275.32
3241.57
3209.16
3178.34
3149.29
3122.14
3096.98
3073.85
3052.77
3033.71
3016.64
3001.51
2988.23
2976.74
2966.95
2958.79
2952.16
2946.99
2943.21
2940.76
2939.58
2939.63
2940.86
2943.27
2946.85
2951.61
2957.59
2964.81
2973.32
2983.2
2994.5
3007.29
3021.66
3037.66
3055.35
3074.77
3095.92
3118.79
3143.35
3169.54
3197.24
3226.34
3256.64
3288.24
3320.33
3352.93
3385.67
3418.2
3450.11
3480.99
3510.4
3537.9
3563.08
3585.53
3604.9
3620.87
3633.17
3641.6
3646.01
3646.33
3642.52
3634.7
3622.95
3607.45
3588.44
3566.2
3541.07
3513.42
3483.64
3452.16
3419.4
3385.78
3351.71
3317.6
3283.8
3250.62
3218.56
3187.49
3157.82
3129.66
3103.13
3078.31
3055.23
3033.92
3014.37
2996.57
2980.51
2966.15
2953.46
2942.42
2932.99
2925.13
2918.8
2913.99
2910.63
2908.73
2908.23
2909.11
2911.35
2914.94
2919.87
2926.12
2933.71
2942.64
2952.92
2964.58
2977.63
2992.1
3008.02
3025.4
3044.28
3064.67
3086.55
3109.92
3134.72
3160.9
3188.36
3217.04
3246.6
3276.9
3307.71
3338.75
3369.71
3400.24
3429.97
3458.52
3485.5
3510.52
3533.2
3553.17
3570.1
3583.69
3593.69
3599.9
3602.18
3600.44
3594.68
3584.99
3571.46
3554.26
3533.67
3509.97
3483.52
3454.7
3423.96
3391.71
3358.42
3324.52
3290.46
3256.64
3223.46
3191.29
3160.6
3131.6
3104.12
3078.41
3054.58
3032.72
3012.85
2994.97
2979.04
2965.01
2952.79
2942.31
2933.45
2926.14
2920.27
2915.75
2912.5
2910.47
2909.62
2909.94
2911.35
2914.14
2918.28
2923.76
2930.61
2938.84
2948.48
2959.57
2972.11
2986.16
3001.71
3018.79
3037.43
3057.6
3079.3
3102.53
3127.26
3153.4
3180.8
3209.34
3239.02
3269.65
3300.95
3332.67
3364.56
3396.31
3427.62
3458.16
3487.57
3515.54
3541.74
3565.8
3587.44
3606.34
3622.23
3634.84
3643.95
3649.38
3650.95
3648.47
3641.99
3631.52
3617.21
3599.22
3577.81
3553.28
3525.97
3496.28
3464.69
3431.66
3397.66
3363.23
3328.85
3295.02
3262.18
3231.31
3201.72
3173.15
3146.23
3121.2
3098.19
3077.24
3058.37
3041.55
3026.74
3013.85
3002.76
2927.95
2944.82
2963.59
2984.22
3006.7
3031
3057.08
3084.84
3114.17
3144.96
3176.98
3209.89
3243.68
3278.05
3312.6
3346.91
3380.58
3413.21
3444.4
3473.71
3500.77
3525.18
3546.55
3564.57
3578.95
3589.48
3595.98
3598.36
3596.11
3589.73
3579.36
3565.11
3547.21
3525.92
3501.56
3474.47
3445.08
3413.78
3380.98
3347.15
3312.68
3277.96
3243.36
3209.42
3177.38
3145.48
3114.71
3085.32
3057.49
3031.34
3006.94
2984.33
2963.52
2944.5
2927.26
2911.75
2897.95
2885.81
2875.29
2866.35
2858.94
2853.04
2848.6
2845.57
2843.96
2844.17
2845.9
2849.15
2853.92
2860.23
2868.1
2877.56
2888.64
2901.36
2915.73
2931.75
2949.44
2968.78
2989.78
3012.4
3036.61
3062.34
3089.56
3118.2
3148.13
3179.16
3207.24
3239.45
3272.2
3305.13
3337.89
3370.09
3401.35
3431.28
3459.46
3485.5
3509
3529.6
3546.96
3560.79
3570.84
3576.91
3578.85
3576.61
3570.19
3559.65
3545.1
3526.73
3504.79
3479.6
3451.52
3420.95
3388.35
3354.2
3318.97
3283.16
3247.23
3211.62
3176.77
3142.95
3110.49
3079.63
3050.56
3023.4
2998.24
2975.12
2954.05
2935.02
2917.97
2902.87
2889.62
2878.16
2868.4
2860.25
2853.65
2848.5
2844.75
2842.31
2841.14
2841.2
2842.43
2844.84
2848.42
2853.17
2859.13
2866.34
2874.84
2884.69
2895.96
2908.73
2923.08
2939.06
2956.73
2976.13
2997.27
3020.15
3044.72
3070.91
3098.64
3127.77
3158.11
3189.78
3221.93
3254.61
3287.45
3320.09
3352.12
3383.13
3412.67
3440.3
3465.6
3488.18
3507.66
3523.72
3536.1
3544.57
3549.02
3549.34
3545.52
3537.65
3525.84
3510.26
3491.15
3468.8
3443.55
3415.77
3385.87
3354.25
3321.37
3287.63
3253.46
3219.25
3185.36
3152.12
3120
3088.89
3059.19
3031.01
3004.48
2979.65
2956.58
2935.27
2915.74
2897.95
2881.9
2867.56
2854.89
2843.86
2834.44
2826.59
2820.28
2815.48
2812.14
2810.24
2809.75
2810.63
2812.88
2816.47
2821.39
2827.64
2835.23
2844.15
2854.42
2866.07
2879.11
2893.57
2909.47
2926.84
2945.71
2966.09
2987.96
3011.33
3036.14
3062.34
3089.82
3118.54
3148.14
3178.5
3209.39
3240.51
3271.55
3302.19
3332.03
3360.7
3387.8
3412.95
3435.74
3455.83
3472.86
3486.53
3496.6
3502.86
3505.17
3503.43
3497.65
3487.92
3474.31
3457.03
3436.33
3412.51
3385.93
3356.99
3326.1
3293.72
3260.3
3226.28
3192.1
3158.19
3124.93
3092.69
3061.97
3032.94
3005.44
2979.71
2955.88
2934.03
2914.18
2896.32
2880.42
2866.41
2854.22
2843.77
2834.94
2827.66
2821.81
2817.31
2814.08
2812.06
2811.21
2811.53
2812.92
2815.71
2819.84
2825.32
2832.16
2840.37
2850
2861.07
2873.6
2887.63
2903.17
2920.24
2938.86
2959.02
2980.72
3003.94
3028.68
3054.83
3082.26
3110.83
3140.55
3171.23
3202.59
3234.38
3266.35
3298.19
3329.59
3360.23
3389.74
3417.82
3444.11
3468.28
3490.02
3509.01
3524.99
3537.68
3546.85
3552.32
3553.91
3551.44
3544.93
3534.42
3520.04
3501.97
3480.45
3455.8
3428.36
3398.53
3366.8
3333.63
3299.49
3264.93
3230.43
3196.49
3163.6
3132.68
3103.03
3074.43
3047.49
3022.45
2999.44
2978.51
2959.65
2942.86
2928.08
2915.21
2904.16
2829.25
2846.1
2864.85
2885.47
2907.94
2932.24
2958.33
2986.11
3015.48
3046.3
3078.37
3111.35
3145.23
3179.69
3214.35
3248.79
3282.59
3315.36
3346.69
3376.15
3403.35
3427.91
3449.41
3467.54
3482.01
3492.6
3499.15
3501.55
3499.29
3492.87
3482.42
3468.09
3450.08
3428.67
3404.17
3376.94
3347.39
3315.95
3283.01
3249.04
3214.44
3179.61
3144.92
3110.89
3078.75
3046.8
3015.99
2986.58
2958.73
2932.58
2908.18
2885.58
2864.78
2845.78
2828.56
2813.08
2799.3
2787.18
2776.68
2767.75
2760.36
2754.47
2750.04
2747.02
2745.41
2745.62
2747.35
2750.59
2755.35
2761.65
2769.52
2778.97
2790.03
2802.74
2817.1
2833.11
2850.79
2870.13
2891.12
2913.74
2937.95
2963.69
2990.91
3019.56
3049.49
3080.49
3108.9
3141.11
3173.91
3206.93
3239.79
3272.11
3303.5
3333.57
3361.89
3388.07
3411.71
3432.43
3449.91
3463.83
3473.95
3480.07
3482.04
3479.8
3473.36
3462.76
3448.13
3429.66
3407.6
3382.27
3354.03
3323.3
3290.54
3256.22
3220.84
3184.88
3148.82
3113.09
3078.15
3044.25
3011.73
2980.83
2951.74
2924.57
2899.41
2876.3
2855.25
2836.24
2819.22
2804.15
2790.93
2779.5
2769.77
2761.66
2755.08
2749.96
2746.23
2743.81
2742.66
2742.72
2743.96
2746.37
2749.94
2754.69
2760.63
2767.82
2776.29
2786.12
2797.37
2810.11
2824.43
2840.39
2858.03
2877.42
2898.55
2921.43
2946
2972.21
2999.96
3029.13
3059.52
3091.25
3123.49
3156.26
3189.21
3221.97
3254.14
3285.29
3314.98
3342.77
3368.22
3390.94
3410.54
3426.71
3439.17
3447.71
3452.19
3452.51
3448.68
3440.76
3428.88
3413.2
3393.98
3371.5
3346.11
3318.19
3288.13
3256.38
3223.35
3189.47
3155.18
3120.86
3086.88
3053.57
3021.36
2990.22
2960.48
2932.28
2905.74
2880.91
2857.85
2836.55
2817.03
2799.26
2783.23
2768.9
2756.25
2745.24
2735.83
2728
2721.7
2716.91
2713.58
2711.69
2711.21
2712.1
2714.35
2717.94
2722.86
2729.11
2736.69
2745.6
2755.86
2767.5
2780.53
2794.97
2810.86
2828.21
2847.07
2867.43
2889.31
2912.67
2937.49
2963.7
2991.21
3019.98
3049.63
3080.06
3111.02
3142.24
3173.39
3204.14
3234.11
3262.92
3290.16
3315.45
3338.38
3358.59
3375.74
3389.51
3399.65
3405.97
3408.31
3406.57
3400.78
3390.99
3377.31
3359.93
3339.11
3315.15
3288.42
3259.32
3228.28
3195.75
3162.18
3128.02
3093.71
3059.69
3026.33
2994.03
2963.27
2934.2
2906.67
2880.93
2857.1
2835.26
2815.43
2797.59
2781.72
2767.74
2755.58
2745.17
2736.37
2729.12
2723.3
2718.82
2715.6
2713.6
2712.75
2713.06
2714.46
2717.24
2721.36
2726.82
2733.65
2741.85
2751.46
2762.52
2775.04
2789.05
2804.57
2821.62
2840.23
2860.38
2882.06
2905.29
2930.02
2956.19
2983.65
3012.25
3042.02
3072.76
3104.19
3136.06
3168.12
3200.05
3231.56
3262.31
3291.94
3320.14
3346.56
3370.85
3392.7
3411.8
3427.87
3440.65
3449.89
3455.4
3457.03
3454.56
3448.03
3437.46
3423
3404.84
3383.2
3358.42
3330.83
3300.84
3268.94
3235.6
3201.31
3166.6
3131.96
3097.91
3064.94
3033.97
3004.26
2975.62
2948.65
2923.61
2900.6
2879.68
2860.85
2844.08
2829.33
2816.5
2805.48
2730.47
2747.3
2766.03
2786.64
2809.1
2833.4
2859.5
2887.3
2916.7
2947.57
2979.7
3012.75
3046.72
3081.3
3116.09
3150.67
3184.61
3217.54
3249.03
3278.65
3306.02
3330.74
3352.38
3370.64
3385.21
3395.88
3402.48
3404.9
3402.62
3396.15
3385.63
3371.21
3353.07
3331.52
3306.87
3279.47
3249.76
3218.15
3185.05
3150.92
3116.18
3081.22
3046.43
3012.31
2980.05
2948.05
2917.19
2887.75
2859.89
2833.73
2809.33
2786.74
2765.97
2746.99
2729.79
2714.34
2700.58
2688.48
2678
2669.1
2661.72
2655.84
2651.43
2648.42
2646.81
2647.02
2648.75
2651.98
2656.73
2663.02
2670.87
2680.31
2691.36
2704.05
2718.4
2734.41
2752.08
2771.41
2792.4
2815.01
2839.22
2864.96
2892.19
2920.84
2950.78
2981.76
3010.52
3042.73
3075.59
3108.71
3141.68
3174.14
3205.68
3235.9
3264.38
3290.72
3314.51
3335.38
3352.98
3367.02
3377.22
3383.4
3385.4
3383.16
3376.69
3366.02
3351.3
3332.72
3310.52
3285.03
3256.61
3225.7
3192.76
3158.25
3122.7
3086.57
3050.36
3014.5
2979.46
2945.47
2912.88
2881.94
2852.82
2825.64
2800.48
2777.39
2756.36
2737.38
2720.39
2705.35
2692.17
2680.77
2671.08
2663
2656.46
2651.36
2647.65
2645.26
2644.12
2644.19
2645.44
2647.85
2651.41
2656.15
2662.08
2669.25
2677.7
2687.49
2698.71
2711.42
2725.71
2741.64
2759.26
2778.63
2799.76
2822.62
2847.21
2873.43
2901.22
2930.43
2960.89
2992.65
3024.99
3057.87
3090.95
3123.85
3156.18
3187.49
3217.36
3245.31
3270.93
3293.8
3313.54
3329.83
3342.39
3351
3355.51
3355.85
3351.99
3344.02
3332.06
3316.27
3296.92
3274.3
3248.75
3220.67
3190.44
3158.52
3125.33
3091.31
3056.87
3022.43
2988.35
2954.96
2922.66
2891.47
2861.69
2833.48
2806.92
2782.09
2759.03
2737.75
2718.25
2700.5
2684.48
2670.18
2657.54
2646.55
2637.16
2629.35
2623.07
2618.29
2614.97
2613.09
2612.62
2613.52
2615.77
2619.36
2624.28
2630.53
2638.1
2647
2657.25
2668.87
2681.88
2696.31
2712.18
2729.52
2748.36
2768.71
2790.58
2813.94
2838.77
2865
2892.53
2921.37
2951.07
2981.57
3012.63
3043.95
3075.22
3106.11
3136.22
3165.18
3192.58
3218.02
3241.1
3261.46
3278.74
3292.62
3302.86
3309.24
3311.61
3309.88
3304.06
3294.21
3280.44
3262.95
3241.99
3217.88
3190.99
3161.71
3130.49
3097.79
3064.05
3029.73
2995.29
2961.13
2927.66
2895.29
2864.49
2835.37
2807.82
2782.06
2758.23
2736.41
2716.59
2698.78
2682.94
2669
2656.88
2646.5
2637.75
2630.52
2624.73
2620.28
2617.08
2615.09
2614.25
2614.56
2615.94
2618.72
2622.83
2628.28
2635.09
2643.28
2652.87
2663.91
2676.41
2690.4
2705.91
2722.94
2741.53
2761.67
2783.34
2806.56
2831.3
2857.49
2884.98
2913.61
2943.43
2974.24
3005.76
3037.71
3069.87
3101.92
3133.55
3164.42
3194.18
3222.52
3249.07
3273.5
3295.47
3314.7
3330.88
3343.75
3353.07
3358.64
3360.3
3357.84
3351.28
3340.65
3326.1
3307.83
3286.06
3261.12
3233.36
3203.19
3171.1
3137.59
3103.11
3068.23
3033.45
2999.26
2966.21
2935.19
2905.41
2876.72
2849.72
2824.67
2801.67
2780.76
2761.96
2745.22
2730.51
2717.71
2706.73
2631.61
2648.42
2667.13
2687.72
2710.18
2734.48
2760.59
2788.42
2817.85
2848.77
2880.96
2914.1
2948.17
2982.86
3017.8
3052.54
3086.65
3119.75
3151.42
3181.23
3208.78
3233.67
3255.48
3273.87
3288.57
3299.32
3305.97
3308.42
3306.12
3299.6
3288.99
3274.46
3256.19
3234.49
3209.66
3182.08
3152.19
3120.38
3087.1
3052.8
3017.9
2982.8
2947.89
2913.66
2881.28
2849.22
2818.31
2788.84
2760.96
2734.79
2710.4
2687.83
2667.07
2648.12
2630.95
2615.52
2601.79
2589.72
2579.26
2570.38
2563.02
2557.16
2552.75
2549.76
2548.15
2548.37
2550.09
2553.31
2558.05
2564.32
2572.16
2581.59
2592.62
2605.3
2619.64
2635.64
2653.3
2672.62
2693.6
2716.21
2740.42
2766.17
2793.4
2822.06
2852.01
2882.99
2912.08
2944.31
2977.24
3010.47
3043.58
3076.18
3107.89
3138.28
3166.94
3193.46
3217.42
3238.44
3256.19
3270.35
3280.65
3286.89
3288.92
3286.69
3280.17
3269.44
3254.62
3235.9
3213.55
3187.88
3159.28
3128.16
3095.01
3060.3
3024.55
2988.24
2951.86
2915.85
2880.7
2846.61
2813.95
2782.96
2753.81
2726.62
2701.47
2678.39
2657.38
2638.43
2621.48
2606.47
2593.34
2581.98
2572.33
2564.28
2557.77
2552.71
2549.03
2546.66
2545.54
2545.62
2546.87
2549.28
2552.84
2557.56
2563.48
2570.62
2579.04
2588.81
2599.99
2612.67
2626.92
2642.82
2660.42
2679.77
2700.88
2723.74
2748.33
2774.58
2802.39
2831.65
2862.18
2894
2926.45
2959.45
2992.67
3025.73
3058.23
3089.73
3119.78
3147.92
3173.73
3196.77
3216.68
3233.1
3245.76
3254.45
3259
3259.35
3255.47
3247.44
3235.38
3219.48
3199.98
3177.2
3151.48
3123.21
3092.8
3060.69
3027.32
2993.13
2958.55
2923.97
2889.77
2856.28
2823.88
2792.64
2762.83
2734.59
2708.02
2683.19
2660.14
2638.88
2619.39
2601.66
2585.67
2571.38
2558.77
2547.79
2538.43
2530.63
2524.37
2519.6
2516.3
2514.44
2513.97
2514.88
2517.14
2520.73
2525.65
2531.89
2539.45
2548.35
2558.58
2570.19
2583.18
2597.59
2613.43
2630.76
2649.58
2669.92
2691.77
2715.14
2739.98
2766.23
2793.78
2822.7
2852.46
2883.04
2914.19
2945.63
2977.04
3008.07
3038.35
3067.48
3095.05
3120.67
3143.92
3164.44
3181.86
3195.87
3206.21
3212.66
3215.06
3213.34
3207.5
3197.58
3183.72
3166.1
3144.99
3120.71
3093.62
3064.15
3032.74
2999.84
2965.91
2931.43
2896.82
2862.52
2828.93
2796.46
2765.64
2736.47
2708.88
2683.11
2659.28
2637.47
2617.67
2599.9
2584.09
2570.19
2558.11
2547.77
2539.06
2531.88
2526.12
2521.69
2518.52
2516.54
2515.71
2516
2517.39
2520.15
2524.25
2529.69
2536.48
2544.65
2554.22
2565.24
2577.72
2591.7
2607.18
2624.19
2642.76
2662.88
2684.54
2707.76
2732.51
2758.71
2786.24
2814.91
2844.79
2875.67
2907.28
2939.34
2971.61
3003.77
3035.53
3066.55
3096.46
3124.95
3151.66
3176.23
3198.35
3217.71
3234.01
3246.99
3256.39
3262.03
3263.72
3261.27
3254.67
3243.98
3229.34
3210.95
3189.02
3163.91
3135.96
3105.59
3073.3
3039.58
3004.91
2969.84
2934.88
2900.54
2867.4
2836.33
2806.47
2777.73
2750.7
2725.64
2702.64
2681.75
2662.98
2646.28
2631.6
2618.85
2607.91
2532.68
2549.46
2568.15
2588.73
2611.17
2635.47
2661.6
2689.45
2718.93
2749.89
2782.15
2815.39
2849.56
2884.4
2919.49
2954.4
2988.69
3021.99
3053.86
3083.87
3111.62
3136.71
3158.69
3177.24
3192.06
3202.91
3209.62
3212.1
3209.77
3203.2
3192.5
3177.85
3159.43
3137.55
3112.54
3084.76
3054.66
3022.65
2989.17
2954.68
2919.6
2884.34
2849.3
2814.96
2782.44
2750.31
2719.36
2689.85
2661.95
2635.77
2611.39
2588.83
2568.1
2549.17
2532.03
2516.64
2502.94
2490.89
2480.46
2471.6
2464.26
2458.42
2454.02
2451.04
2449.44
2449.66
2451.38
2454.59
2459.31
2465.57
2473.4
2482.8
2493.82
2506.49
2520.81
2536.8
2554.45
2573.76
2594.74
2617.34
2641.55
2667.3
2694.55
2723.22
2753.17
2784.16
2813.58
2845.85
2878.87
2912.21
2945.46
2978.23
3010.12
3040.71
3069.57
3096.27
3120.42
3141.63
3159.53
3173.82
3184.23
3190.54
3192.6
3190.38
3183.83
3173.01
3158.08
3139.22
3116.7
3090.83
3062.02
3030.68
2997.3
2962.36
2926.39
2889.88
2853.32
2817.15
2781.86
2747.67
2714.93
2683.89
2654.71
2627.5
2602.35
2579.29
2558.31
2539.39
2522.49
2507.52
2494.43
2483.12
2473.51
2465.5
2459.03
2454
2450.35
2448.01
2446.91
2447
2448.26
2450.67
2454.22
2458.93
2464.83
2471.94
2480.34
2490.06
2501.21
2513.85
2528.06
2543.93
2561.5
2580.82
2601.92
2624.78
2649.38
2675.65
2703.5
2732.81
2763.42
2795.29
2827.86
2861
2894.37
2927.6
2960.29
2991.99
3022.25
3050.61
3076.62
3099.85
3119.93
3136.5
3149.29
3158.05
3162.66
3163.01
3159.1
3151.01
3138.85
3122.82
3103.17
3080.2
3054.29
3025.82
2995.2
2962.89
2929.32
2894.95
2860.19
2825.46
2791.14
2757.55
2725.04
2693.74
2663.88
2635.62
2609.04
2584.21
2561.17
2539.92
2520.45
2502.75
2486.78
2472.51
2459.92
2448.97
2439.63
2431.85
2425.61
2420.86
2417.58
2415.73
2415.27
2416.19
2418.45
2422.04
2426.96
2433.2
2440.75
2449.64
2459.86
2471.45
2484.42
2498.8
2514.63
2531.93
2550.73
2571.06
2592.9
2616.27
2641.12
2667.39
2694.96
2723.97
2753.79
2784.46
2815.72
2847.29
2878.85
2910.04
2940.5
2969.81
2997.58
3023.39
3046.83
3067.53
3085.11
3099.26
3109.71
3116.23
3118.68
3116.97
3111.09
3101.1
3087.13
3069.37
3048.09
3023.62
2996.34
2966.65
2935.02
2901.91
2867.78
2833.09
2798.31
2763.86
2730.12
2697.55
2666.72
2637.48
2609.85
2584.06
2560.24
2538.44
2518.67
2500.93
2485.16
2471.31
2459.28
2448.99
2440.32
2433.18
2427.45
2423.06
2419.91
2417.94
2417.11
2417.41
2418.78
2421.54
2425.63
2431.05
2437.82
2445.97
2455.52
2466.52
2478.98
2492.93
2508.39
2525.38
2543.93
2564.03
2585.68
2608.89
2633.64
2659.87
2687.44
2716.15
2746.1
2777.06
2808.76
2840.93
2873.32
2905.62
2937.53
2968.7
2998.78
3027.43
3054.31
3079.04
3101.32
3120.83
3137.27
3150.36
3159.86
3165.56
3167.3
3164.86
3158.23
3147.46
3132.72
3114.19
3092.09
3066.79
3038.64
3008.05
2975.53
2941.58
2906.69
2871.42
2836.26
2801.75
2768.48
2737.41
2707.45
2678.65
2651.58
2626.51
2603.52
2582.65
2563.91
2547.25
2532.61
2519.91
2509.02
2433.67
2450.42
2469.08
2489.65
2512.08
2536.38
2562.52
2590.4
2619.92
2650.94
2683.27
2716.61
2750.91
2785.89
2821.16
2856.26
2890.75
2924.25
2956.35
2986.57
3014.55
3039.85
3062.03
3080.75
3095.71
3106.66
3113.43
3115.94
3113.59
3106.95
3096.16
3081.37
3062.79
3040.73
3015.51
2987.51
2957.18
2924.95
2891.24
2856.54
2821.28
2785.85
2750.66
2716.19
2683.53
2651.33
2620.32
2590.77
2562.85
2536.67
2512.29
2489.75
2469.04
2450.15
2433.04
2417.68
2404.01
2392
2381.59
2372.76
2365.44
2359.61
2355.24
2352.26
2350.67
2350.89
2352.61
2355.81
2360.52
2366.76
2374.57
2383.96
2394.96
2407.61
2421.92
2437.89
2455.53
2474.83
2495.8
2518.4
2542.61
2568.37
2595.62
2624.31
2654.27
2685.28
2715.03
2747.34
2780.46
2813.93
2847.34
2880.3
2912.38
2943.18
2972.25
2999.18
3023.53
3044.93
3063.01
3077.45
3087.96
3094.36
3096.46
3094.23
3087.64
3076.74
3061.69
3042.67
3019.96
2993.88
2964.83
2933.25
2899.62
2864.43
2828.22
2791.49
2754.73
2718.39
2682.95
2648.65
2615.83
2584.72
2555.51
2528.29
2503.15
2480.1
2459.15
2440.27
2423.41
2408.49
2395.45
2384.18
2374.62
2366.66
2360.23
2355.24
2351.62
2349.31
2348.23
2348.34
2349.61
2352.01
2355.56
2360.25
2366.13
2373.22
2381.57
2391.26
2402.36
2414.96
2429.13
2444.96
2462.5
2481.8
2502.88
2525.74
2550.35
2576.64
2604.52
2633.89
2664.58
2696.52
2729.22
2762.51
2796.05
2829.47
2862.36
2894.28
2924.77
2953.36
2979.6
3003.05
3023.31
3040.05
3052.96
3061.82
3066.48
3066.84
3062.9
3054.73
3042.46
3026.29
3006.46
2983.31
2957.18
2928.49
2897.65
2865.11
2831.33
2796.75
2761.81
2726.92
2692.45
2658.74
2626.14
2594.77
2564.86
2536.56
2509.97
2485.15
2462.12
2440.88
2421.44
2403.76
2387.81
2373.58
2361.01
2350.09
2340.77
2333.01
2326.79
2322.06
2318.8
2316.96
2316.52
2317.44
2319.71
2323.3
2328.22
2334.45
2342
2350.87
2361.07
2372.64
2385.6
2399.96
2415.76
2433.03
2451.81
2472.12
2493.96
2517.32
2542.19
2568.48
2596.08
2625.17
2655.06
2685.83
2717.22
2748.92
2780.64
2812.02
2842.66
2872.18
2900.16
2926.18
2949.84
2970.72
2988.48
3002.78
3013.35
3019.97
3022.46
3020.76
3014.84
3004.78
2990.69
2972.77
2951.31
2926.63
2899.12
2869.2
2837.33
2803.98
2769.63
2734.74
2699.77
2665.13
2631.25
2598.54
2567.73
2538.41
2510.73
2484.93
2461.11
2439.32
2419.59
2401.88
2386.16
2372.35
2360.37
2350.13
2341.51
2334.42
2328.74
2324.37
2321.25
2319.3
2318.48
2318.76
2320.14
2322.88
2326.96
2332.36
2339.11
2347.24
2356.76
2367.74
2380.17
2394.1
2409.54
2426.5
2445.03
2465.11
2486.74
2509.95
2534.71
2560.95
2588.57
2617.32
2647.34
2678.39
2710.2
2742.49
2775.02
2807.47
2839.53
2870.88
2901.13
2929.96
2957.02
2981.94
3004.39
3024.06
3040.65
3053.88
3063.48
3069.26
3071.03
3068.6
3061.93
3051.09
3036.23
3017.55
2995.27
2969.77
2941.38
2910.55
2877.78
2843.58
2808.45
2772.96
2737.59
2702.89
2669.46
2638.43
2608.35
2579.47
2552.37
2527.28
2504.3
2483.46
2464.75
2448.13
2433.55
2420.89
2410.05
2334.59
2351.31
2369.94
2390.48
2412.9
2437.2
2463.36
2491.27
2520.84
2551.92
2584.33
2617.78
2652.2
2687.34
2722.8
2758.11
2792.82
2826.55
2858.87
2889.34
2917.56
2943.09
2965.49
2984.4
2999.51
3010.57
3017.41
3019.95
3017.56
3010.87
2999.97
2985.04
2966.28
2944.01
2918.57
2890.33
2859.75
2827.28
2793.33
2758.41
2722.93
2687.32
2651.98
2617.36
2584.56
2552.28
2521.2
2491.6
2463.66
2437.47
2413.11
2390.58
2369.9
2351.04
2333.97
2318.65
2305.02
2293.04
2282.67
2273.86
2266.57
2260.76
2256.4
2253.44
2251.85
2252.07
2253.78
2256.97
2261.66
2267.88
2275.68
2285.05
2296.03
2308.66
2322.96
2338.91
2356.54
2375.83
2396.79
2419.39
2443.6
2469.37
2496.63
2525.32
2555.31
2586.35
2616.42
2648.79
2682.02
2715.64
2749.22
2782.37
2814.67
2845.7
2875.01
2902.16
2926.74
2948.35
2966.62
2981.21
2991.86
2998.34
3000.48
2998.26
2991.62
2980.63
2965.45
2946.26
2923.34
2897.03
2867.73
2835.88
2801.97
2766.52
2730.04
2693.07
2656.1
2619.58
2583.97
2549.54
2516.63
2485.47
2456.21
2428.99
2403.85
2380.82
2359.91
2341.07
2324.25
2309.38
2296.39
2285.18
2275.67
2267.76
2261.37
2256.43
2252.84
2250.56
2249.51
2249.63
2250.9
2253.31
2256.85
2261.53
2267.38
2274.44
2282.76
2292.4
2303.46
2316.01
2330.14
2345.92
2363.43
2382.7
2403.77
2426.62
2451.23
2477.55
2505.47
2534.9
2565.67
2597.7
2630.54
2663.98
2697.7
2731.32
2764.44
2796.61
2827.35
2856.19
2882.67
2906.35
2926.82
2943.73
2956.79
2965.75
2970.46
2970.83
2966.86
2958.61
2946.22
2929.89
2909.88
2886.52
2860.16
2831.22
2800.14
2767.36
2733.34
2698.54
2663.4
2628.33
2593.71
2559.87
2527.16
2495.71
2465.76
2437.43
2410.83
2386
2362.98
2341.77
2322.35
2304.7
2288.78
2274.57
2262.04
2251.14
2241.84
2234.11
2227.91
2223.21
2219.96
2218.14
2217.71
2218.64
2220.92
2224.51
2229.43
2235.65
2243.19
2252.05
2262.24
2273.79
2286.71
2301.05
2316.82
2334.07
2352.83
2373.12
2394.94
2418.31
2443.18
2469.5
2497.16
2526.29
2556.27
2587.16
2618.67
2650.53
2682.43
2713.99
2744.85
2774.59
2802.8
2829.05
2852.93
2874.03
2891.98
2906.45
2917.15
2923.86
2926.4
2924.71
2918.75
2908.6
2894.38
2876.31
2854.64
2829.74
2801.98
2771.81
2739.68
2706.07
2671.47
2636.36
2601.18
2566.36
2532.31
2499.44
2468.68
2439.26
2411.53
2385.7
2361.89
2340.12
2320.42
2302.75
2287.08
2273.33
2261.4
2251.22
2242.66
2235.61
2229.97
2225.64
2222.55
2220.61
2219.79
2220.08
2221.44
2224.18
2228.24
2233.62
2240.35
2248.45
2257.95
2268.9
2281.31
2295.21
2310.62
2327.56
2346.06
2366.12
2387.73
2410.93
2435.7
2461.97
2489.63
2518.43
2548.53
2579.68
2611.6
2644.02
2676.69
2709.3
2741.54
2773.07
2803.51
2832.55
2859.81
2884.92
2907.55
2927.4
2944.16
2957.53
2967.24
2973.1
2974.93
2972.51
2965.79
2954.87
2939.88
2921.04
2898.57
2872.83
2844.2
2813.1
2780.06
2745.59
2710.2
2674.46
2638.87
2603.95
2570.34
2539.4
2509.17
2480.21
2453.05
2427.95
2404.98
2384.17
2365.5
2348.93
2334.4
2321.8
2311.02
2235.42
2252.11
2270.71
2291.23
2313.64
2337.94
2364.11
2392.06
2421.68
2452.83
2485.31
2518.88
2553.44
2588.76
2624.42
2659.95
2694.89
2728.87
2761.45
2792.18
2820.65
2846.44
2869.07
2888.18
2903.46
2914.64
2921.55
2924.11
2921.71
2914.95
2903.93
2888.84
2869.89
2847.41
2821.72
2793.22
2762.38
2729.63
2695.43
2660.26
2624.55
2588.74
2553.23
2518.48
2485.51
2453.14
2421.99
2392.35
2364.39
2338.19
2313.83
2291.33
2270.69
2251.86
2234.83
2219.54
2205.96
2194.02
2183.67
2174.89
2167.63
2161.84
2157.5
2154.55
2152.97
2153.2
2154.9
2158.07
2162.75
2168.95
2176.72
2186.08
2197.04
2209.65
2223.93
2239.87
2257.48
2276.76
2297.72
2320.3
2344.52
2370.29
2397.57
2426.28
2456.29
2487.37
2517.75
2550.19
2583.54
2617.32
2651.08
2684.45
2716.99
2748.26
2777.82
2805.23
2830.06
2851.89
2870.36
2885.13
2895.91
2902.49
2904.68
2902.45
2895.76
2884.68
2869.35
2849.98
2826.84
2800.28
2770.7
2738.56
2704.35
2668.61
2631.86
2594.62
2557.42
2520.69
2484.91
2450.35
2417.34
2386.11
2356.82
2329.58
2304.45
2281.45
2260.57
2241.77
2225.01
2210.2
2197.26
2186.11
2176.65
2168.8
2162.46
2157.55
2154.01
2151.76
2150.73
2150.88
2152.16
2154.56
2158.09
2162.76
2168.58
2175.61
2183.89
2193.49
2204.49
2216.99
2231.07
2246.81
2264.28
2283.52
2304.57
2327.42
2352.04
2378.38
2406.34
2435.84
2466.7
2498.82
2531.8
2565.41
2599.33
2633.17
2666.53
2698.96
2729.97
2759.08
2785.83
2809.76
2830.45
2847.56
2860.77
2869.84
2874.61
2874.99
2870.98
2862.65
2850.13
2833.64
2813.42
2789.82
2763.22
2734.02
2702.67
2669.63
2635.36
2600.32
2564.96
2529.7
2494.91
2460.94
2428.11
2396.58
2366.57
2338.21
2311.6
2286.77
2263.77
2242.58
2223.18
2205.56
2189.67
2175.5
2162.99
2152.12
2142.85
2135.15
2128.97
2124.29
2121.06
2119.26
2118.85
2119.79
2122.07
2125.67
2130.58
2136.8
2144.33
2153.17
2163.34
2174.87
2187.77
2202.08
2217.82
2235.04
2253.77
2274.04
2295.85
2319.22
2344.1
2370.45
2398.17
2427.34
2457.43
2488.43
2520.08
2552.11
2584.19
2615.97
2647.06
2677.04
2705.5
2732
2756.12
2777.45
2795.61
2810.26
2821.1
2827.91
2830.51
2828.82
2822.82
2812.58
2798.23
2779.97
2758.09
2732.94
2704.92
2674.46
2642.05
2608.17
2573.31
2537.95
2502.54
2467.52
2433.29
2400.24
2369.56
2340.02
2312.23
2286.39
2262.58
2240.84
2221.17
2203.54
2187.92
2174.23
2162.36
2152.24
2143.74
2136.75
2131.16
2126.87
2123.8
2121.88
2121.07
2121.34
2122.71
2125.44
2129.48
2134.83
2141.54
2149.61
2159.09
2170.01
2182.39
2196.26
2211.64
2228.55
2247.02
2267.05
2288.65
2311.85
2336.62
2362.92
2390.63
2419.47
2449.65
2480.91
2512.96
2545.52
2578.35
2611.13
2643.55
2675.28
2705.94
2735.18
2762.66
2787.98
2810.82
2830.86
2847.79
2861.31
2871.15
2877.1
2878.98
2876.57
2869.81
2858.79
2843.67
2824.65
2801.97
2775.99
2747.09
2715.7
2682.36
2647.6
2611.93
2575.93
2540.09
2504.94
2471.1
2440.31
2409.91
2380.84
2353.64
2328.53
2305.57
2284.79
2266.16
2249.64
2235.17
2222.63
2211.91
2136.19
2152.84
2171.41
2191.9
2214.29
2238.59
2264.77
2292.76
2322.44
2353.66
2386.23
2419.92
2454.62
2490.13
2526.02
2561.79
2596.98
2631.21
2664.07
2695.08
2723.84
2749.9
2772.78
2792.11
2807.56
2818.87
2825.86
2828.44
2826.02
2819.18
2808.04
2792.78
2773.63
2750.91
2724.95
2696.18
2665.05
2632.02
2597.54
2562.11
2526.15
2490.13
2454.43
2419.53
2386.4
2353.93
2322.7
2293.02
2265.02
2238.82
2214.48
2192
2171.39
2152.6
2135.61
2120.37
2106.82
2094.92
2084.62
2075.87
2068.63
2062.87
2058.54
2055.62
2054.04
2054.27
2055.96
2059.12
2063.78
2069.96
2077.71
2087.04
2097.99
2110.58
2124.83
2140.75
2158.36
2177.63
2198.57
2221.15
2245.36
2271.15
2298.43
2327.16
2357.2
2388.33
2419.01
2451.55
2485.03
2518.97
2552.94
2586.54
2619.33
2650.87
2680.7
2708.38
2733.47
2755.55
2774.24
2789.2
2800.13
2806.81
2809.05
2806.82
2800.07
2788.88
2773.4
2753.83
2730.45
2703.62
2673.74
2641.29
2606.77
2570.71
2533.65
2496.14
2458.68
2421.75
2385.78
2351.08
2317.96
2286.66
2257.33
2230.08
2204.95
2181.98
2161.14
2142.39
2125.68
2110.93
2098.06
2086.97
2077.57
2069.77
2063.48
2058.63
2055.13
2052.91
2051.92
2052.08
2053.36
2055.77
2059.29
2063.94
2069.74
2076.73
2084.96
2094.51
2105.46
2117.91
2131.93
2147.62
2165.05
2184.26
2205.29
2228.13
2252.76
2279.12
2307.14
2336.7
2367.65
2399.88
2433.01
2466.8
2500.93
2535.01
2568.63
2601.34
2632.64
2662.04
2689.08
2713.28
2734.22
2751.53
2764.91
2774.09
2778.93
2779.32
2775.27
2766.85
2754.19
2737.51
2717.08
2693.23
2666.36
2636.88
2605.24
2571.92
2537.38
2502.09
2466.49
2431.02
2396.05
2361.94
2328.98
2297.37
2267.3
2238.91
2212.28
2187.46
2164.47
2143.3
2123.94
2106.35
2090.49
2076.35
2063.88
2053.04
2043.8
2036.12
2029.97
2025.32
2022.11
2020.33
2019.93
2020.88
2023.17
2026.77
2031.68
2037.89
2045.41
2054.24
2064.39
2075.89
2088.77
2103.04
2118.75
2135.94
2154.65
2174.89
2196.69
2220.05
2244.95
2271.33
2299.11
2328.32
2358.53
2389.65
2421.46
2453.66
2485.95
2517.95
2549.28
2579.52
2608.25
2635.02
2659.4
2680.98
2699.36
2714.2
2725.2
2732.12
2734.78
2733.1
2727.06
2716.72
2702.21
2683.76
2661.65
2636.23
2607.92
2577.17
2544.46
2510.28
2475.14
2439.51
2403.86
2368.63
2334.21
2300.94
2270.38
2240.7
2212.84
2186.98
2163.17
2141.46
2121.83
2104.25
2088.69
2075.06
2063.26
2053.2
2044.76
2037.83
2032.3
2028.05
2025.01
2023.11
2022.3
2022.57
2023.93
2026.64
2030.67
2036
2042.68
2050.72
2060.16
2071.06
2083.41
2097.25
2112.6
2129.48
2147.92
2167.92
2189.5
2212.69
2237.47
2263.79
2291.55
2320.44
2350.72
2382.09
2414.27
2446.98
2479.98
2512.94
2545.57
2577.51
2608.39
2637.87
2665.58
2691.12
2714.18
2734.43
2751.55
2765.24
2775.21
2781.26
2783.2
2780.79
2773.98
2762.87
2747.61
2728.39
2705.48
2679.24
2650.05
2618.35
2584.7
2549.62
2513.65
2477.36
2441.26
2405.85
2371.73
2341.18
2310.55
2281.37
2254.13
2229.01
2206.06
2185.31
2166.72
2150.26
2135.85
2123.38
2112.73
2036.87
2053.48
2072.02
2092.48
2114.86
2139.15
2165.35
2193.37
2223.11
2254.41
2287.07
2320.89
2355.74
2391.45
2427.58
2463.61
2499.07
2533.58
2566.73
2598.04
2627.1
2653.46
2676.61
2696.17
2711.81
2723.26
2730.33
2732.92
2730.5
2723.58
2712.31
2696.87
2677.49
2654.51
2628.28
2599.21
2567.77
2534.44
2499.66
2463.94
2427.73
2391.47
2355.57
2320.51
2287.21
2254.63
2223.33
2193.59
2165.57
2139.36
2115.03
2092.58
2072
2053.26
2036.32
2021.12
2007.63
1995.77
1985.5
1976.79
1969.58
1963.84
1959.53
1956.62
1955.06
1955.29
1956.97
1960.12
1964.75
1970.91
1978.64
1987.95
1998.87
2011.43
2025.67
2041.57
2059.16
2078.42
2099.35
2121.92
2146.14
2171.93
2199.23
2227.98
2258.05
2289.23
2320.22
2352.85
2386.48
2420.6
2454.79
2488.64
2521.7
2553.52
2583.65
2611.62
2636.99
2659.33
2678.26
2693.42
2704.5
2711.29
2713.6
2711.36
2704.55
2693.25
2677.6
2657.82
2634.19
2607.06
2576.87
2544.08
2509.22
2472.82
2435.44
2397.63
2359.9
2322.73
2286.57
2251.72
2218.49
2187.11
2157.74
2130.48
2105.36
2082.42
2061.62
2042.92
2026.27
2011.59
1998.78
1987.76
1978.43
1970.69
1964.45
1959.65
1956.2
1954.02
1953.05
1953.23
1954.53
1956.93
1960.44
1965.07
1970.84
1977.79
1985.98
1995.48
2006.37
2018.75
2032.72
2048.36
2065.74
2084.92
2105.93
2128.76
2153.4
2179.79
2207.85
2237.48
2268.53
2300.87
2334.17
2368.16
2402.5
2436.84
2470.74
2503.75
2535.36
2565.08
2592.42
2616.91
2638.11
2655.65
2669.2
2678.51
2683.42
2683.83
2679.73
2671.21
2658.4
2641.53
2620.86
2596.75
2569.58
2539.8
2507.86
2474.23
2439.4
2403.84
2367.99
2332.29
2297.14
2262.87
2229.78
2198.08
2167.95
2139.52
2112.88
2088.06
2065.09
2043.95
2024.62
2007.06
1991.24
1977.13
1964.7
1953.89
1944.68
1937.03
1930.91
1926.29
1923.11
1921.34
1920.96
1921.93
1924.22
1927.82
1932.73
1938.94
1946.44
1955.25
1965.38
1976.86
1989.7
2003.95
2019.62
2036.78
2055.45
2075.67
2097.45
2120.81
2145.72
2172.14
2199.98
2229.24
2259.56
2290.82
2322.79
2355.18
2387.68
2419.93
2451.52
2482.04
2511.05
2538.11
2562.77
2584.62
2603.24
2618.29
2629.46
2636.49
2639.22
2637.55
2631.46
2621.01
2606.35
2587.68
2565.32
2539.62
2511
2479.93
2446.9
2412.4
2376.96
2341.05
2305.14
2269.68
2235.05
2201.55
2171.11
2141.28
2113.36
2087.48
2063.68
2041.99
2022.4
2004.88
1989.38
1975.81
1964.09
1954.1
1945.73
1938.87
1933.38
1929.18
1926.17
1924.29
1923.49
1923.74
1925.1
1927.81
1931.81
1937.12
1943.77
1951.78
1961.19
1972.05
1984.37
1998.18
2013.49
2030.34
2048.74
2068.72
2090.27
2113.45
2138.24
2164.6
2192.41
2221.35
2251.72
2283.22
2315.54
2348.41
2381.59
2414.75
2447.58
2479.76
2510.88
2540.6
2568.56
2594.35
2617.64
2638.11
2655.43
2669.3
2679.42
2685.57
2687.58
2685.17
2678.32
2667.1
2651.68
2632.26
2609.1
2582.58
2553.07
2521.05
2487.05
2451.64
2415.35
2378.76
2342.37
2306.68
2272.22
2242.03
2211.11
2181.81
2154.51
2129.38
2106.45
2085.74
2067.2
2050.8
2036.46
2024.06
2013.47
1937.48
1954.05
1972.54
1992.98
2015.34
2039.63
2065.85
2093.9
2123.71
2155.09
2187.84
2221.8
2256.8
2292.73
2329.12
2365.43
2401.17
2435.98
2469.44
2501.07
2530.45
2557.12
2580.56
2600.37
2616.22
2627.82
2634.98
2637.56
2635.15
2628.14
2616.72
2601.1
2581.48
2558.23
2531.7
2502.3
2470.54
2436.88
2401.78
2365.76
2329.27
2292.77
2256.65
2221.43
2187.96
2155.26
2123.87
2094.08
2066.03
2039.82
2015.5
1993.08
1972.54
1953.84
1936.95
1921.81
1908.36
1896.54
1886.32
1877.64
1870.46
1864.75
1860.47
1857.58
1856.03
1856.25
1857.92
1861.05
1865.67
1871.8
1879.5
1888.79
1899.68
1912.23
1926.44
1942.32
1959.89
1979.14
2000.06
2022.62
2046.84
2072.64
2099.96
2128.74
2158.84
2190.08
2221.36
2254.11
2287.89
2322.21
2356.63
2390.74
2424.09
2456.21
2486.65
2514.94
2540.61
2563.23
2582.41
2597.79
2609.04
2615.95
2618.33
2616.08
2609.2
2597.78
2581.95
2561.94
2538.04
2510.6
2480.07
2446.92
2411.69
2374.93
2337.21
2299.08
2261.06
2223.65
2187.27
2152.26
2118.92
2087.46
2058.05
2030.77
2005.67
1982.76
1962.01
1943.37
1926.78
1912.17
1899.43
1888.48
1879.22
1871.54
1865.36
1860.61
1857.21
1855.08
1854.14
1854.34
1855.65
1858.05
1861.55
1866.16
1871.9
1878.81
1886.95
1896.39
1907.22
1919.54
1933.44
1949.02
1966.36
1985.5
2006.48
2029.31
2053.95
2080.37
2108.48
2138.19
2169.34
2201.8
2235.27
2269.46
2304.05
2338.65
2372.85
2406.18
2438.13
2468.18
2495.85
2520.65
2542.13
2559.91
2573.65
2583.1
2588.08
2588.5
2584.36
2575.73
2562.77
2545.68
2524.76
2500.36
2472.89
2442.79
2410.52
2376.57
2341.42
2305.57
2269.45
2233.52
2198.16
2163.73
2130.51
2098.71
2068.51
2040.05
2013.39
1988.58
1965.63
1944.52
1925.22
1907.7
1891.92
1877.85
1865.45
1854.68
1845.5
1837.89
1831.79
1827.2
1824.04
1822.3
1821.94
1822.91
1825.22
1828.82
1833.72
1839.92
1847.42
1856.21
1866.32
1877.77
1890.58
1904.79
1920.43
1937.55
1956.19
1976.38
1998.14
2021.5
2046.42
2072.87
2100.77
2130.1
2160.54
2191.94
2224.08
2256.67
2289.4
2321.9
2353.77
2384.59
2413.91
2441.27
2466.24
2488.37
2507.25
2522.52
2533.87
2541.03
2543.83
2542.16
2536.02
2525.46
2510.63
2491.74
2469.11
2443.11
2414.16
2382.74
2349.36
2314.53
2278.76
2242.55
2206.37
2170.67
2135.81
2102.07
2071.77
2041.76
2013.78
1987.89
1964.1
1942.44
1922.89
1905.43
1889.99
1876.5
1864.85
1854.94
1846.64
1839.85
1834.42
1830.27
1827.29
1825.43
1824.63
1824.87
1826.24
1828.93
1832.91
1838.18
1844.8
1852.78
1862.16
1872.98
1885.27
1899.05
1914.32
1931.13
1949.5
1969.44
1990.97
2014.14
2038.94
2065.33
2093.2
2122.18
2152.66
2184.29
2216.77
2249.81
2283.18
2316.54
2349.6
2382.02
2413.4
2443.39
2471.61
2497.66
2521.2
2541.91
2559.44
2573.5
2583.78
2590.04
2592.12
2589.71
2582.81
2571.49
2555.89
2536.26
2512.84
2486.01
2456.18
2423.79
2389.43
2353.66
2317.02
2280.11
2243.43
2207.44
2172.58
2142.82
2111.56
2082.14
2054.79
2029.65
2006.74
1986.07
1967.59
1951.25
1936.98
1924.66
1914.15
1838.01
1854.53
1872.99
1893.39
1915.73
1940.01
1966.25
1994.34
2024.22
2055.69
2088.55
2122.63
2157.8
2193.96
2230.63
2267.23
2303.27
2338.39
2372.18
2404.16
2433.88
2460.89
2484.64
2504.72
2520.79
2532.54
2539.79
2542.39
2539.97
2532.87
2521.3
2505.46
2485.6
2462.06
2435.21
2405.47
2373.36
2339.35
2303.92
2267.57
2230.78
2194.02
2157.66
2122.28
2088.62
2055.8
2024.32
1994.47
1966.39
1940.18
1915.88
1893.49
1872.99
1854.35
1837.51
1822.42
1809.02
1797.26
1787.08
1778.43
1771.29
1765.61
1761.35
1758.48
1756.94
1757.17
1758.82
1761.93
1766.52
1772.63
1780.3
1789.56
1800.43
1812.95
1827.14
1843
1860.56
1879.79
1900.7
1923.25
1947.47
1973.28
2000.62
2029.42
2059.57
2090.86
2122.44
2155.31
2189.25
2223.78
2258.46
2292.85
2326.5
2358.95
2389.72
2418.34
2444.33
2467.26
2486.7
2502.31
2513.75
2520.78
2523.24
2520.97
2514.03
2502.47
2486.46
2466.21
2442.01
2414.24
2383.35
2349.82
2314.2
2277.06
2238.96
2200.49
2162.17
2124.49
2087.9
2052.72
2019.25
1987.71
1958.26
1930.97
1905.88
1883
1862.3
1843.72
1827.21
1812.67
1800
1789.12
1779.94
1772.33
1766.22
1761.52
1758.17
1756.09
1755.19
1755.41
1756.72
1759.13
1762.61
1767.2
1772.91
1779.78
1787.86
1797.24
1808
1820.25
1834.09
1849.61
1866.89
1886
1906.95
1929.77
1954.43
1980.87
2009.04
2038.81
2070.08
2102.67
2136.32
2170.72
2205.56
2240.45
2274.97
2308.64
2340.94
2371.36
2399.37
2424.5
2446.28
2464.32
2478.27
2487.86
2492.91
2493.35
2489.16
2480.42
2467.28
2449.97
2428.78
2404.08
2376.28
2345.83
2313.22
2278.92
2243.45
2207.28
2170.88
2134.7
2099.13
2064.51
2031.15
1999.25
1968.99
1940.49
1913.82
1889.01
1866.08
1845
1825.75
1808.27
1792.52
1778.49
1766.13
1755.4
1746.26
1738.68
1732.62
1728.05
1724.92
1723.2
1722.86
1723.85
1726.16
1729.77
1734.67
1740.86
1748.34
1757.11
1767.2
1778.62
1791.4
1805.57
1821.17
1838.25
1856.86
1877.02
1898.76
1922.1
1947.04
1973.53
2001.49
2030.89
2061.45
2093
2125.32
2158.13
2191.1
2223.87
2256.04
2287.17
2316.82
2344.51
2369.8
2392.23
2411.39
2426.9
2438.44
2445.74
2448.6
2446.95
2440.75
2430.07
2415.06
2395.93
2373.01
2346.69
2317.39
2285.61
2251.86
2216.67
2180.55
2144.02
2107.55
2071.59
2036.51
2002.51
1972.33
1942.15
1914.11
1888.2
1864.42
1842.8
1823.3
1805.89
1790.53
1777.11
1765.54
1755.71
1747.5
1740.77
1735.41
1731.31
1728.37
1726.53
1725.74
1725.96
1727.33
1730.01
1733.96
1739.2
1745.79
1753.73
1763.07
1773.86
1786.11
1799.85
1815.09
1831.86
1850.19
1870.09
1891.59
1914.75
1939.56
1965.98
1993.92
2022.94
2053.54
2085.31
2117.95
2151.17
2184.74
2218.33
2251.63
2284.31
2315.96
2346.23
2374.73
2401.05
2424.86
2445.82
2463.58
2477.85
2488.29
2494.67
2496.82
2494.42
2487.47
2476.02
2460.25
2440.39
2416.68
2389.54
2359.35
2326.59
2291.84
2255.68
2218.67
2181.43
2144.44
2108.13
2072.84
2043.53
2011.91
1982.36
1954.96
1929.82
1906.94
1886.3
1867.88
1851.61
1837.42
1825.18
1814.75
1738.46
1754.94
1773.35
1793.71
1816.03
1840.31
1866.56
1894.7
1924.65
1956.22
1989.18
2023.39
2058.73
2095.14
2132.11
2169.02
2205.38
2240.83
2274.97
2307.31
2337.4
2364.77
2388.85
2409.21
2425.51
2437.43
2444.78
2447.41
2444.96
2437.77
2426.03
2409.98
2389.85
2366
2338.81
2308.7
2276.22
2241.84
2206.05
2169.37
2132.27
2095.22
2058.61
2023.07
1989.21
1956.25
1924.68
1894.78
1866.67
1840.45
1816.17
1793.82
1773.37
1754.77
1737.99
1722.96
1709.62
1697.9
1687.77
1679.17
1672.06
1666.4
1662.17
1659.32
1657.81
1658.03
1659.67
1662.75
1667.32
1673.4
1681.04
1690.27
1701.12
1713.61
1727.77
1743.61
1761.15
1780.37
1801.26
1823.81
1848.02
1873.84
1901.2
1930.04
1960.23
1991.59
2023.45
2056.45
2090.57
2125.33
2160.27
2194.96
2228.93
2261.73
2292.86
2321.82
2348.15
2371.4
2391.14
2406.98
2418.61
2425.79
2428.31
2426.04
2419.02
2407.33
2391.12
2370.61
2346.1
2317.99
2286.7
2252.77
2216.73
2179.18
2140.7
2101.86
2063.22
2025.27
1988.44
1953.08
1919.48
1887.86
1858.36
1831.06
1806
1783.15
1762.5
1743.99
1727.55
1713.09
1700.5
1689.7
1680.6
1673.06
1667.01
1662.38
1659.09
1657.05
1656.19
1656.43
1657.76
1660.16
1663.63
1668.2
1673.88
1680.7
1688.73
1698.04
1708.73
1720.91
1734.67
1750.12
1767.35
1786.41
1807.34
1830.15
1854.81
1881.29
1909.5
1939.36
1970.73
2003.47
2037.31
2071.94
2107.04
2142.23
2177.09
2211.12
2243.8
2274.6
2302.99
2328.47
2350.57
2368.88
2383.04
2392.78
2397.93
2398.37
2394.13
2385.27
2371.95
2354.4
2332.93
2307.9
2279.75
2248.94
2215.95
2181.3
2145.47
2108.97
2072.28
2035.83
2000.03
1965.23
1931.72
1899.71
1869.38
1840.84
1814.15
1789.36
1766.45
1745.41
1726.19
1708.76
1693.05
1679.06
1666.74
1656.05
1646.95
1639.4
1633.38
1628.84
1625.74
1624.05
1623.73
1624.73
1627.05
1630.66
1635.56
1641.74
1649.21
1657.96
1668.02
1679.42
1692.16
1706.29
1721.84
1738.88
1757.45
1777.58
1799.3
1822.63
1847.58
1874.11
1902.13
1931.61
1962.3
1994.01
2026.51
2059.55
2092.78
2125.84
2158.32
2189.79
2219.78
2247.82
2273.45
2296.2
2315.66
2331.42
2343.16
2350.61
2353.55
2351.91
2345.65
2334.85
2319.63
2300.26
2277.03
2250.36
2220.69
2188.52
2154.38
2118.81
2082.33
2045.45
2008.68
1972.45
1937.13
1902.92
1872.73
1842.42
1814.34
1788.41
1764.65
1743.06
1723.62
1706.28
1690.98
1677.65
1666.17
1656.43
1648.3
1641.65
1636.36
1632.3
1629.41
1627.59
1626.8
1627
1628.38
1631.04
1634.96
1640.17
1646.72
1654.63
1663.93
1674.68
1686.89
1700.6
1715.79
1732.52
1750.81
1770.67
1792.14
1815.28
1840.1
1866.56
1894.57
1923.62
1954.36
1986.28
2019.08
2052.49
2086.28
2120.1
2153.65
2186.6
2218.55
2249.11
2277.91
2304.52
2328.61
2349.84
2367.85
2382.33
2392.96
2399.46
2401.69
2399.3
2392.29
2380.72
2364.76
2344.65
2320.65
2293.16
2262.59
2229.43
2194.27
2157.7
2120.3
2082.7
2045.38
2008.76
1973.06
1944.1
1912.13
1882.47
1855.03
1829.88
1807.03
1786.44
1768.08
1751.89
1737.78
1725.62
1715.28
1638.83
1655.27
1673.63
1693.95
1716.24
1740.51
1766.79
1794.97
1824.99
1856.66
1889.73
1924.07
1959.59
1996.27
2033.56
2070.8
2107.5
2143.29
2177.8
2210.52
2241
2268.75
2293.18
2313.85
2330.39
2342.49
2349.95
2352.63
2350.14
2342.83
2330.92
2314.64
2294.22
2270.05
2242.5
2212.01
2179.13
2144.36
2108.19
2071.14
2033.71
1996.37
1959.49
1923.79
1889.72
1856.63
1824.95
1794.98
1766.85
1740.63
1716.37
1694.05
1673.65
1655.12
1638.39
1623.42
1610.14
1598.48
1588.4
1579.84
1572.77
1567.15
1562.94
1560.12
1558.62
1558.84
1560.46
1563.52
1568.06
1574.11
1581.72
1590.92
1601.74
1614.21
1628.34
1644.16
1661.68
1680.88
1701.76
1724.3
1748.5
1774.33
1801.72
1830.59
1860.83
1892.27
1924.38
1957.53
1991.85
2026.84
2062.07
2097.06
2131.39
2164.54
2196.05
2225.39
2252.08
2275.67
2295.71
2311.81
2323.65
2330.97
2333.57
2331.29
2324.2
2312.36
2295.94
2275.15
2250.32
2221.83
2190.13
2155.77
2119.3
2081.31
2042.41
2003.19
1964.21
1925.96
1888.9
1853.35
1819.61
1787.9
1758.36
1731.06
1706
1683.2
1662.61
1644.17
1627.8
1613.43
1600.93
1590.21
1581.19
1573.74
1567.75
1563.18
1559.95
1557.96
1557.14
1557.41
1558.75
1561.14
1564.61
1569.15
1574.8
1581.56
1589.53
1598.78
1609.39
1621.49
1635.18
1650.56
1667.73
1686.75
1707.64
1730.44
1755.11
1781.61
1809.88
1839.83
1871.31
1904.19
1938.24
1973.11
2008.48
2044
2079.21
2113.63
2146.71
2177.91
2206.7
2232.55
2254.99
2273.58
2287.98
2297.88
2303.11
2303.57
2299.27
2290.29
2276.77
2258.97
2237.2
2211.83
2183.31
2152.11
2118.73
2083.69
2047.49
2010.64
1973.63
1936.9
1900.86
1865.86
1832.2
1800.08
1769.68
1741.1
1714.4
1689.62
1666.74
1645.73
1626.56
1609.17
1593.51
1579.57
1567.29
1556.64
1547.58
1540.07
1534.08
1529.58
1526.51
1524.85
1524.55
1525.56
1527.89
1531.5
1536.4
1542.57
1550.02
1558.76
1568.79
1580.15
1592.86
1606.94
1622.45
1639.44
1657.97
1678.06
1699.76
1723.09
1748.05
1774.61
1802.7
1832.26
1863.09
1894.96
1927.66
1960.93
1994.43
2027.8
2060.62
2092.44
2122.79
2151.2
2177.19
2200.29
2220.06
2236.09
2248.05
2255.65
2258.68
2257.04
2250.73
2239.78
2224.37
2204.72
2181.17
2154.13
2124.07
2091.49
2056.93
2020.95
1984.09
1946.85
1909.75
1873.24
1837.69
1803.33
1772.96
1742.59
1714.46
1688.52
1664.78
1643.24
1623.85
1606.58
1591.36
1578.11
1566.73
1557.08
1549.04
1542.47
1537.25
1533.26
1530.4
1528.61
1527.83
1528
1529.38
1532.03
1535.92
1541.1
1547.61
1555.47
1564.73
1575.45
1587.62
1601.28
1616.44
1633.11
1651.35
1671.18
1692.62
1715.74
1740.56
1767.06
1795.16
1824.22
1855.1
1887.18
1920.16
1953.77
1987.79
2021.85
2055.67
2088.91
2121.16
2152.04
2181.16
2208.08
2232.46
2253.97
2272.25
2286.96
2297.77
2304.41
2306.72
2304.35
2297.27
2285.57
2269.41
2249.04
2224.72
2196.87
2165.91
2132.32
2096.72
2059.71
2021.9
1983.93
1946.26
1909.34
1873.32
1844.43
1812.23
1782.46
1754.98
1729.84
1707.01
1686.48
1668.18
1652.07
1638.05
1625.99
1615.74
1539.12
1555.51
1573.82
1594.09
1616.36
1640.62
1666.92
1695.14
1725.25
1757.03
1790.21
1824.69
1860.37
1897.34
1934.97
1972.57
2009.61
2045.76
2080.66
2113.79
2144.68
2172.84
2197.65
2218.64
2235.43
2247.72
2255.3
2258.03
2255.48
2248.06
2235.96
2219.44
2198.73
2174.21
2146.27
2115.38
2082.09
2046.9
2010.33
1972.9
1935.13
1897.47
1860.32
1824.43
1790.15
1756.91
1725.13
1695.1
1666.93
1640.71
1616.47
1594.2
1573.86
1555.38
1538.72
1523.82
1510.6
1499
1488.97
1480.46
1473.42
1467.83
1463.65
1460.85
1459.38
1459.59
1461.19
1464.23
1468.74
1474.76
1482.34
1491.51
1502.29
1514.73
1528.84
1544.63
1562.13
1581.32
1602.18
1624.71
1648.91
1674.75
1702.16
1731.07
1761.36
1792.9
1825.23
1858.55
1893.07
1928.33
1963.84
1999.17
2033.86
2067.4
2099.3
2129.04
2156.12
2180.06
2200.42
2216.8
2228.86
2236.33
2239
2236.72
2229.55
2217.56
2200.91
2179.84
2154.66
2125.77
2093.64
2058.82
2021.89
1983.44
1944.1
1904.48
1865.14
1826.58
1789.26
1753.51
1719.64
1687.84
1658.25
1630.94
1605.91
1583.15
1562.62
1544.25
1527.98
1513.69
1501.28
1490.65
1481.72
1474.35
1468.44
1463.93
1460.76
1458.83
1458.05
1458.35
1459.69
1462.09
1465.54
1470.06
1475.67
1482.38
1490.29
1499.46
1509.99
1522.01
1535.61
1550.92
1568.03
1586.99
1607.86
1630.64
1655.32
1681.85
1710.18
1740.21
1771.81
1804.85
1839.11
1874.22
1909.89
1945.74
1981.33
2016.15
2049.66
2081.29
2110.49
2136.74
2159.54
2178.44
2193.08
2203.16
2208.48
2208.96
2204.6
2195.48
2181.76
2163.69
2141.59
2115.86
2086.95
2055.34
2021.55
1986.09
1949.5
1912.28
1874.94
1837.92
1801.63
1766.43
1732.6
1700.36
1669.88
1641.26
1614.56
1589.79
1566.94
1545.97
1526.85
1509.51
1493.9
1480
1467.77
1457.16
1448.14
1440.67
1434.72
1430.25
1427.22
1425.58
1425.31
1426.34
1428.67
1432.29
1437.18
1443.35
1450.78
1459.5
1469.51
1480.83
1493.5
1507.54
1522.99
1539.94
1558.42
1578.48
1600.14
1623.46
1648.43
1675.03
1703.18
1732.83
1763.8
1795.85
1828.76
1862.27
1896.06
1929.75
1962.92
1995.12
2025.86
2054.66
2081.03
2104.49
2124.59
2140.91
2153.1
2160.86
2163.97
2162.35
2155.97
2144.89
2129.25
2109.32
2085.43
2058
2027.52
1994.5
1959.5
1923.1
1885.83
1848.22
1810.78
1773.96
1738.18
1703.71
1673.01
1642.65
1614.48
1588.54
1564.82
1543.32
1523.99
1506.79
1491.66
1478.51
1467.22
1457.67
1449.73
1443.25
1438.1
1434.17
1431.36
1429.59
1428.81
1428.96
1430.35
1432.97
1436.83
1441.97
1448.44
1456.26
1465.48
1476.15
1488.29
1501.9
1517.01
1533.64
1551.83
1571.61
1593.01
1616.12
1640.94
1667.47
1695.67
1724.75
1755.79
1788.03
1821.19
1855.02
1889.27
1923.59
1957.68
1991.23
2023.81
2055.02
2084.47
2111.71
2136.41
2158.22
2176.78
2191.73
2202.75
2209.53
2211.92
2209.56
2202.43
2190.58
2174.21
2153.57
2128.91
2100.68
2069.29
2035.25
1999.19
1961.72
1923.48
1885.11
1847.09
1809.87
1773.59
1744.55
1712.2
1682.34
1654.83
1629.69
1606.9
1586.41
1568.19
1552.17
1538.25
1526.28
1516.13
1439.33
1455.68
1473.93
1494.15
1516.4
1540.63
1566.95
1595.23
1625.42
1657.31
1690.61
1725.22
1761.07
1798.36
1836.35
1874.32
1911.73
1948.25
1983.56
2017.12
2048.45
2077.03
2102.24
2123.57
2140.64
2153.13
2160.83
2163.64
2161.01
2153.46
2141.17
2124.39
2103.37
2078.48
2050.14
2018.81
1985.09
1949.46
1912.47
1874.64
1836.5
1798.51
1761.07
1724.99
1690.5
1657.1
1625.22
1595.12
1566.92
1540.7
1516.49
1494.26
1473.98
1455.56
1438.97
1424.14
1410.99
1399.45
1389.47
1381.01
1374.01
1368.46
1364.31
1361.54
1360.1
1360.3
1361.88
1364.89
1369.37
1375.36
1382.9
1392.03
1402.78
1415.19
1429.27
1445.03
1462.51
1481.68
1502.52
1525.05
1549.24
1575.09
1602.53
1631.48
1661.83
1693.47
1726.01
1759.51
1794.25
1829.77
1865.6
1901.28
1936.35
1970.3
2002.62
2032.77
2060.25
2084.58
2105.28
2121.95
2134.24
2141.86
2144.62
2142.33
2135.07
2122.92
2106.04
2084.67
2059.12
2029.82
1997.23
1961.93
1924.5
1885.57
1845.77
1805.72
1766
1727.12
1689.53
1653.58
1619.55
1587.66
1558.03
1530.72
1505.71
1483
1462.54
1444.25
1428.06
1413.87
1401.55
1391.02
1382.18
1374.9
1369.06
1364.63
1361.52
1359.65
1358.92
1359.25
1360.6
1362.99
1366.43
1370.93
1376.5
1383.16
1390.99
1400.08
1410.53
1422.46
1435.97
1451.2
1468.24
1487.16
1507.99
1530.75
1555.44
1582.01
1610.39
1640.5
1672.23
1705.42
1739.91
1775.28
1811.26
1847.47
1883.45
1918.7
1952.65
1984.74
2014.38
2041.05
2064.22
2083.45
2098.35
2108.61
2114.03
2114.52
2110.1
2100.84
2086.9
2068.55
2046.11
2020
1990.67
1958.63
1924.4
1888.51
1851.51
1813.9
1776.21
1738.88
1702.32
1666.91
1632.91
1600.56
1570
1541.34
1514.63
1489.87
1467.05
1446.13
1427.06
1409.77
1394.21
1380.36
1368.18
1357.62
1348.64
1341.21
1335.3
1330.87
1327.87
1326.27
1326.02
1327.07
1329.41
1333.03
1337.92
1344.07
1351.49
1360.18
1370.17
1381.45
1394.08
1408.07
1423.47
1440.37
1458.8
1478.81
1500.45
1523.75
1548.73
1575.37
1603.59
1633.33
1664.45
1696.67
1729.8
1763.58
1797.67
1831.69
1865.23
1897.82
1928.97
1958.19
1984.96
2008.8
2029.26
2045.88
2058.31
2066.24
2069.45
2067.85
2061.4
2050.16
2034.29
2014.06
1989.8
1961.97
1931.04
1897.56
1862.1
1825.24
1787.55
1749.54
1711.74
1674.62
1638.59
1604.01
1572.96
1542.59
1514.4
1488.45
1464.76
1443.3
1424.04
1406.92
1391.88
1378.83
1367.64
1358.2
1350.36
1343.97
1338.91
1335.04
1332.27
1330.53
1329.76
1329.89
1331.28
1333.88
1337.7
1342.8
1349.23
1357
1366.17
1376.8
1388.89
1402.46
1417.53
1434.1
1452.24
1471.97
1493.33
1516.42
1541.24
1567.81
1596.11
1625.19
1656.4
1688.82
1722.17
1756.22
1790.72
1825.31
1859.69
1893.57
1926.49
1958.05
1987.85
2015.43
2040.46
2062.59
2081.43
2096.65
2107.87
2114.81
2117.3
2114.95
2107.75
2095.76
2079.16
2058.23
2033.22
2004.58
1972.75
1938.23
1901.68
1863.73
1825.02
1786.24
1747.86
1710.33
1673.89
1644.45
1612.03
1582.1
1554.56
1529.43
1506.68
1486.25
1468.11
1452.18
1438.36
1426.49
1416.44
1339.47
1355.77
1373.95
1394.12
1416.34
1440.55
1466.89
1495.22
1525.5
1557.52
1590.93
1625.68
1661.68
1699.31
1737.7
1776.06
1813.85
1850.75
1886.49
1920.51
1952.3
1981.34
2006.96
2028.65
2046.01
2058.71
2066.53
2069.41
2066.71
2059.03
2046.55
2029.5
2008.14
1982.86
1954.09
1922.32
1888.13
1852.05
1814.6
1776.36
1737.83
1699.49
1661.77
1625.47
1590.76
1557.2
1525.2
1495.04
1466.81
1440.59
1416.41
1394.24
1374.01
1355.67
1339.15
1324.39
1311.31
1299.84
1289.92
1281.5
1274.55
1269.03
1264.91
1262.18
1260.76
1260.95
1262.51
1265.49
1269.93
1275.89
1283.39
1292.49
1303.21
1315.58
1329.63
1345.37
1362.82
1381.97
1402.8
1425.32
1449.5
1475.36
1502.82
1531.81
1562.24
1593.97
1626.71
1660.4
1695.38
1731.18
1767.33
1803.39
1838.86
1873.23
1905.99
1936.58
1964.49
1989.22
2010.28
2027.25
2039.79
2047.59
2050.42
2048.14
2040.79
2028.47
2011.34
1989.64
1963.71
1933.96
1900.89
1865.08
1827.14
1787.7
1747.41
1706.91
1666.8
1627.57
1589.71
1553.54
1519.36
1487.38
1457.7
1430.39
1405.41
1382.75
1362.36
1344.16
1328.06
1313.97
1301.75
1291.32
1282.58
1275.39
1269.63
1265.27
1262.23
1260.43
1259.75
1260.1
1261.46
1263.85
1267.27
1271.75
1277.28
1283.88
1291.64
1300.65
1311.01
1322.84
1336.26
1351.41
1368.38
1387.23
1408.03
1430.78
1455.47
1482.07
1510.51
1540.71
1572.56
1605.92
1640.65
1676.29
1712.58
1749.16
1785.56
1821.26
1855.69
1888.25
1918.36
1945.47
1969.04
1988.62
2003.79
2014.24
2019.76
2020.27
2015.78
2006.37
1992.2
1973.55
1950.76
1924.24
1894.47
1861.98
1827.29
1790.95
1753.51
1715.5
1677.43
1639.77
1602.95
1567.31
1533.14
1500.66
1470.02
1441.32
1414.6
1389.86
1367.08
1346.21
1327.19
1309.95
1294.45
1280.65
1268.52
1258.01
1249.08
1241.69
1235.82
1231.43
1228.47
1226.9
1226.68
1227.74
1230.09
1233.72
1238.6
1244.74
1252.15
1260.82
1270.77
1282.02
1294.6
1308.54
1323.88
1340.72
1359.11
1379.07
1400.67
1423.96
1448.95
1475.63
1503.91
1533.75
1565.03
1597.43
1630.79
1664.84
1699.25
1733.62
1767.55
1800.56
1832.14
1861.78
1888.98
1913.23
1934.06
1951
1963.69
1971.8
1975.11
1973.52
1967
1955.6
1939.49
1918.94
1894.3
1866.03
1834.64
1800.67
1764.72
1727.39
1689.25
1650.82
1612.65
1575.2
1538.91
1504.2
1472.81
1442.43
1414.21
1388.27
1364.6
1343.2
1324.01
1306.97
1292.02
1279.07
1268
1258.66
1250.93
1244.65
1239.67
1235.86
1233.15
1231.44
1230.67
1230.77
1232.17
1234.74
1238.52
1243.58
1249.96
1257.68
1266.81
1277.4
1289.44
1302.96
1317.97
1334.5
1352.58
1372.25
1393.57
1416.63
1441.46
1468.06
1496.47
1525.55
1556.95
1589.54
1623.1
1657.38
1692.14
1727.01
1761.7
1795.91
1829.2
1861.13
1891.29
1919.23
1944.6
1967.07
1986.22
2001.71
2013.16
2020.26
2022.85
2020.51
2013.24
2001.1
1984.27
1963.03
1937.65
1908.58
1876.28
1841.26
1804.18
1765.72
1726.53
1687.31
1648.56
1610.72
1574.21
1544.12
1511.72
1481.74
1454.17
1429.06
1406.35
1385.99
1367.93
1352.1
1338.38
1326.63
1316.68
1239.52
1255.78
1273.89
1294
1316.19
1340.37
1366.73
1395.12
1425.49
1457.64
1491.17
1526.06
1562.21
1600.2
1639.01
1677.78
1715.96
1753.27
1789.45
1823.96
1856.22
1885.74
1911.81
1933.88
1951.55
1964.46
1972.42
1975.36
1972.59
1964.79
1952.09
1934.75
1913.04
1887.35
1858.14
1825.88
1791.21
1754.65
1716.74
1678.06
1639.12
1600.41
1562.4
1525.87
1490.93
1457.21
1425.09
1394.86
1366.6
1340.39
1316.24
1294.12
1273.96
1255.69
1239.25
1224.57
1211.56
1200.16
1190.3
1181.94
1175.03
1169.54
1165.46
1162.76
1161.38
1161.55
1163.08
1166.03
1170.44
1176.36
1183.83
1192.88
1203.56
1215.91
1229.92
1245.63
1263.06
1282.19
1303
1325.51
1349.68
1375.55
1403.04
1432.07
1462.57
1494.42
1527.34
1561.22
1596.45
1632.55
1669.04
1705.48
1741.38
1776.2
1809.43
1840.48
1868.84
1893.98
1915.42
1932.72
1945.51
1953.49
1956.43
1954.13
1946.68
1934.18
1916.79
1894.76
1868.43
1838.21
1804.64
1768.29
1729.8
1689.82
1649.02
1608.06
1567.52
1527.94
1489.78
1453.39
1419.06
1386.98
1357.26
1329.95
1305.01
1282.4
1262.08
1243.97
1227.98
1213.99
1201.88
1191.55
1182.92
1175.83
1170.15
1165.85
1162.89
1161.16
1160.53
1160.91
1162.28
1164.67
1168.08
1172.53
1178.02
1184.56
1192.24
1201.16
1211.42
1223.15
1236.47
1251.54
1268.43
1287.22
1307.98
1330.71
1355.41
1382.04
1410.54
1440.83
1472.81
1506.34
1541.32
1577.24
1613.87
1650.83
1687.67
1723.84
1758.77
1791.83
1822.43
1850
1874
1893.94
1909.4
1920.05
1925.68
1926.21
1921.64
1912.08
1897.67
1878.7
1855.53
1828.59
1798.36
1765.39
1730.21
1693.4
1655.5
1617.06
1578.61
1540.61
1503.5
1467.62
1433.27
1400.66
1369.95
1341.21
1314.49
1289.76
1267.02
1246.2
1227.24
1210.07
1194.61
1180.86
1168.8
1158.34
1149.45
1142.11
1136.28
1131.93
1129.01
1127.47
1127.28
1128.36
1130.72
1134.35
1139.23
1145.36
1152.75
1161.4
1171.31
1182.52
1195.06
1208.94
1224.23
1241.01
1259.34
1279.26
1300.82
1324.09
1349.09
1375.81
1404.16
1434.09
1465.54
1498.13
1531.72
1566.06
1600.79
1635.54
1669.88
1703.32
1735.35
1765.45
1793.1
1817.78
1838.99
1856.27
1869.23
1877.54
1880.95
1879.38
1872.78
1861.22
1844.85
1823.96
1798.92
1770.2
1738.31
1703.83
1667.37
1629.54
1590.93
1552.06
1513.49
1475.7
1439.14
1404.28
1372.57
1342.17
1313.92
1287.98
1264.35
1243
1223.88
1206.93
1192.08
1179.24
1168.28
1159.07
1151.46
1145.27
1140.38
1136.65
1133.98
1132.3
1131.55
1131.62
1133.02
1135.56
1139.3
1144.31
1150.64
1158.31
1167.39
1177.93
1189.93
1203.4
1218.36
1234.83
1252.84
1272.46
1293.74
1316.77
1341.59
1368.23
1396.73
1425.85
1457.43
1490.21
1523.97
1558.5
1593.53
1628.7
1663.7
1698.27
1731.93
1764.25
1794.8
1823.11
1848.85
1871.66
1891.14
1906.92
1918.6
1925.88
1928.57
1926.24
1918.9
1906.61
1889.53
1867.96
1842.2
1812.68
1779.88
1744.34
1706.71
1667.7
1628.01
1588.34
1549.19
1511.04
1474.47
1443.65
1411.29
1381.25
1353.67
1328.58
1305.92
1285.63
1267.65
1251.92
1238.33
1226.69
1216.85
1139.48
1155.71
1173.75
1193.79
1215.94
1240.09
1266.47
1294.92
1325.39
1357.69
1391.33
1426.36
1462.62
1501.03
1540.28
1579.49
1618.08
1655.79
1692.45
1727.46
1760.23
1790.26
1816.8
1839.27
1857.25
1870.4
1878.49
1881.48
1878.65
1870.71
1857.79
1840.16
1818.07
1791.96
1762.27
1729.52
1694.33
1657.27
1618.87
1579.73
1540.37
1501.28
1462.94
1426.19
1391.01
1357.11
1324.88
1294.58
1266.29
1240.08
1215.98
1193.92
1173.83
1155.63
1139.27
1124.67
1111.75
1100.42
1090.62
1082.32
1075.45
1070
1065.95
1063.28
1061.94
1062.1
1063.6
1066.52
1070.89
1076.77
1084.2
1093.21
1103.86
1116.16
1130.14
1145.83
1163.23
1182.34
1203.13
1225.62
1249.79
1275.67
1303.18
1332.26
1362.82
1394.8
1427.89
1461.97
1497.47
1533.87
1570.73
1607.57
1643.91
1679.21
1712.92
1744.46
1773.29
1798.88
1820.71
1838.35
1851.41
1859.59
1862.62
1860.31
1852.76
1840.08
1822.42
1800.03
1773.27
1742.57
1708.45
1671.55
1632.49
1591.94
1550.6
1509.14
1468.17
1428.22
1389.76
1353.14
1318.64
1286.46
1256.7
1229.4
1204.5
1181.94
1161.7
1143.7
1127.81
1113.93
1101.93
1091.71
1083.18
1076.2
1070.61
1066.38
1063.5
1061.84
1061.28
1061.69
1063.07
1065.44
1068.84
1073.26
1078.71
1085.19
1092.79
1101.61
1111.78
1123.4
1136.62
1151.58
1168.4
1187.12
1207.84
1230.55
1255.25
1281.91
1310.47
1340.86
1372.98
1406.67
1441.92
1478.13
1515.1
1552.48
1589.77
1626.43
1661.88
1695.48
1726.6
1754.66
1779.1
1799.42
1815.19
1826.05
1831.79
1832.33
1827.69
1817.96
1803.3
1784
1760.43
1733.04
1702.33
1668.85
1633.17
1595.85
1557.48
1518.59
1479.73
1441.38
1403.97
1367.85
1333.32
1300.57
1269.77
1241
1214.27
1189.57
1166.87
1146.11
1127.21
1110.1
1094.7
1081.01
1069
1058.59
1049.76
1042.47
1036.68
1032.38
1029.49
1027.99
1027.84
1028.93
1031.3
1034.93
1039.81
1045.93
1053.3
1061.92
1071.81
1082.98
1095.46
1109.29
1124.51
1141.23
1159.5
1179.36
1200.88
1224.13
1249.14
1275.9
1304.31
1334.34
1365.98
1398.75
1432.59
1467.23
1502.31
1537.44
1572.21
1606.1
1638.61
1669.19
1697.31
1722.44
1744.06
1761.7
1774.95
1783.45
1786.98
1785.42
1778.75
1767.01
1750.37
1729.12
1703.66
1674.46
1642.05
1607.03
1570.03
1531.68
1492.57
1453.25
1414.27
1376.12
1339.28
1304.24
1272.24
1241.79
1213.52
1187.58
1163.99
1142.7
1123.66
1106.81
1092.06
1079.34
1068.5
1059.41
1051.92
1045.85
1041.05
1037.39
1034.78
1033.13
1032.39
1032.43
1033.84
1036.34
1040.03
1044.99
1051.27
1058.89
1067.92
1078.41
1090.36
1103.78
1118.68
1135.09
1153.04
1172.59
1193.82
1216.82
1241.63
1268.3
1296.86
1326.12
1357.85
1390.81
1424.79
1459.57
1494.89
1530.36
1565.68
1600.62
1634.69
1667.42
1698.37
1727.07
1753.18
1776.37
1796.19
1812.27
1824.21
1831.67
1834.47
1832.16
1824.74
1812.28
1794.94
1773.04
1746.86
1716.87
1683.56
1647.46
1609.25
1569.67
1529.44
1489.31
1449.75
1411.27
1374.6
1343.07
1310.72
1280.64
1253.05
1227.99
1205.38
1185.16
1167.27
1151.66
1138.19
1126.67
1116.95
1039.37
1055.56
1073.52
1093.48
1115.61
1139.7
1166.12
1194.63
1225.19
1257.65
1291.42
1326.58
1362.92
1401.78
1441.52
1481.18
1520.19
1558.32
1595.46
1631.02
1664.31
1694.88
1721.92
1744.81
1763.13
1776.52
1784.75
1787.76
1784.9
1776.82
1763.67
1745.72
1723.24
1696.68
1666.5
1633.22
1597.5
1559.9
1520.99
1481.37
1441.56
1402.07
1363.4
1326.44
1291.01
1256.92
1224.56
1194.19
1165.88
1139.68
1115.62
1093.62
1073.61
1055.49
1039.22
1024.71
1011.86
1000.61
990.882
982.632
975.815
970.404
966.385
963.76
962.47
962.603
964.074
966.952
971.282
977.121
984.504
993.478
1004.08
1016.35
1030.29
1045.95
1063.32
1082.41
1103.19
1125.66
1149.83
1175.71
1203.25
1232.37
1263.01
1295.11
1328.37
1362.66
1398.43
1435.16
1472.38
1509.65
1546.45
1582.25
1616.47
1648.52
1677.84
1703.9
1726.15
1744.15
1757.49
1765.87
1769.05
1766.69
1759.03
1746.16
1728.21
1705.45
1678.24
1647.03
1612.35
1574.85
1535.19
1494.05
1452.14
1410.17
1368.74
1328.4
1289.63
1252.77
1218.11
1185.82
1156.03
1128.74
1103.88
1081.39
1061.23
1043.33
1027.55
1013.79
1001.91
991.797
983.387
976.518
971.015
966.858
964.059
962.485
961.979
962.419
963.808
966.175
969.555
973.956
979.361
985.769
993.285
1002.01
1012.07
1023.58
1036.68
1051.55
1068.28
1086.94
1107.61
1130.3
1155
1181.7
1210.31
1240.8
1273.05
1306.92
1342.44
1378.95
1416.28
1454.08
1491.85
1529.04
1565.04
1599.19
1630.85
1659.42
1684.34
1705.07
1721.15
1732.23
1738.1
1738.66
1733.93
1724.03
1709.1
1689.45
1665.47
1637.6
1606.38
1572.38
1536.16
1498.32
1459.45
1420.08
1380.81
1342.08
1304.36
1267.99
1233.26
1200.38
1169.5
1140.7
1113.97
1089.29
1066.64
1045.94
1027.11
1010.06
994.723
981.087
969.137
958.788
950.002
942.758
937.019
932.76
929.921
928.461
928.337
929.448
931.824
935.463
940.332
946.446
953.797
962.392
972.244
983.37
995.806
1009.57
1024.72
1041.38
1059.59
1079.39
1100.86
1124.08
1149.1
1175.9
1204.39
1234.51
1266.34
1299.31
1333.4
1368.35
1403.78
1439.32
1474.54
1508.91
1541.91
1573
1601.61
1627.21
1649.27
1667.28
1680.84
1689.55
1693.2
1691.65
1684.9
1672.98
1656.06
1634.44
1608.53
1578.82
1545.87
1510.29
1472.71
1433.81
1394.2
1354.4
1314.98
1276.45
1239.32
1204.08
1171.81
1141.3
1113.01
1087.08
1063.53
1042.31
1023.36
1006.6
991.957
979.361
968.653
959.693
952.336
946.379
941.682
938.1
935.542
933.927
933.205
933.225
934.622
937.083
940.717
945.625
951.857
959.418
968.392
978.834
990.731
1004.1
1018.94
1035.28
1053.16
1072.65
1093.82
1116.78
1141.58
1168.28
1196.86
1226.35
1258.19
1291.35
1325.55
1360.6
1396.21
1432
1467.66
1502.99
1537.48
1570.64
1602
1631.11
1657.62
1681.19
1701.38
1717.78
1729.98
1737.63
1740.55
1738.25
1730.76
1718.12
1700.51
1678.26
1651.65
1621.16
1587.3
1550.62
1511.8
1471.62
1430.84
1390.21
1350.22
1311.43
1274.59
1242.41
1210.03
1179.9
1152.31
1127.28
1104.74
1084.6
1066.8
1051.31
1037.96
1026.57
1016.98
939.162
955.338
973.202
993.078
1015.18
1039.21
1065.66
1094.23
1124.89
1157.54
1191.41
1226.71
1263.09
1302.47
1342.72
1382.86
1422.3
1460.85
1498.51
1534.63
1568.48
1599.61
1627.17
1650.51
1669.19
1682.82
1691.19
1694.2
1691.34
1683.11
1669.71
1651.44
1628.55
1601.51
1570.81
1536.98
1500.7
1462.55
1423.1
1382.98
1342.71
1302.8
1263.75
1226.61
1190.91
1156.62
1124.14
1093.7
1065.36
1039.17
1015.16
993.232
973.299
955.27
939.093
924.671
911.914
900.741
891.082
882.89
876.124
870.751
866.763
864.181
862.959
863.053
864.489
867.33
871.615
877.412
884.749
893.679
904.242
916.465
930.375
946.001
963.345
982.409
1003.18
1025.62
1049.78
1075.68
1103.23
1132.4
1163.11
1195.33
1228.77
1263.27
1299.33
1336.39
1374.01
1411.71
1449.01
1485.32
1520.07
1552.66
1582.5
1609.05
1631.74
1650.11
1663.76
1672.34
1675.64
1673.26
1665.5
1652.41
1634.16
1611.02
1583.34
1551.59
1516.33
1478.2
1437.92
1396.15
1353.64
1311.13
1269.23
1228.49
1189.39
1152.29
1117.46
1085.07
1055.23
1027.96
1003.15
980.724
960.657
942.866
927.213
913.568
901.807
891.816
883.525
876.779
871.368
867.279
864.565
863.081
862.645
863.112
864.511
866.866
870.231
874.61
879.971
886.304
893.728
902.355
912.302
923.692
936.673
951.438
968.072
986.66
1007.29
1029.95
1054.65
1081.38
1110.06
1140.64
1173.03
1207.07
1242.9
1279.7
1317.41
1355.65
1393.93
1431.65
1468.23
1502.97
1535.2
1564.31
1589.71
1610.87
1627.3
1638.61
1644.6
1645.17
1640.36
1630.27
1615.07
1595.05
1570.63
1542.26
1510.51
1475.96
1439.18
1400.8
1361.4
1321.54
1281.82
1242.71
1204.67
1168.03
1133.11
1100.09
1069.13
1040.29
1013.56
988.909
966.313
945.688
926.921
909.94
894.67
881.091
869.204
858.916
850.183
842.99
837.3
833.087
830.293
828.875
828.786
829.915
832.299
835.944
840.807
846.91
854.242
862.809
872.625
883.707
896.092
909.787
924.869
941.454
959.601
979.344
1000.76
1023.95
1048.97
1075.82
1104.37
1134.59
1166.63
1199.79
1234.14
1269.42
1305.22
1341.19
1376.87
1411.74
1445.26
1476.87
1506
1532.1
1554.62
1573.03
1586.9
1595.84
1599.6
1598.08
1591.24
1579.13
1561.91
1539.9
1513.52
1483.28
1449.76
1413.58
1375.41
1335.94
1295.79
1255.49
1215.62
1176.7
1139.25
1103.79
1071.27
1040.71
1012.39
986.468
962.97
941.82
922.956
906.298
891.774
879.308
868.735
859.913
852.695
846.862
842.268
838.767
836.265
834.686
833.983
833.997
835.372
837.783
841.358
846.211
852.388
859.889
868.804
879.19
891.045
904.353
919.133
935.4
953.214
972.632
993.742
1016.66
1041.45
1068.17
1096.77
1126.49
1158.47
1191.82
1226.24
1261.57
1297.5
1333.61
1369.62
1405.35
1440.29
1473.9
1505.7
1535.23
1562.15
1586.13
1606.69
1623.43
1635.91
1643.77
1646.81
1644.53
1636.96
1624.14
1606.24
1583.62
1556.56
1525.55
1491.12
1453.83
1414.37
1373.55
1332.18
1291.05
1250.62
1211.49
1174.44
1141.66
1109.22
1079.04
1051.44
1026.46
1003.98
983.923
966.222
950.864
937.654
926.396
916.935
838.869
855.041
872.799
892.579
914.661
938.611
965.092
993.734
1024.48
1057.35
1091.33
1126.77
1163.11
1203.08
1243.89
1284.52
1324.41
1363.37
1401.57
1438.29
1472.71
1504.45
1532.57
1556.38
1575.42
1589.31
1597.83
1600.84
1597.97
1589.59
1575.93
1557.31
1533.99
1506.46
1475.21
1440.81
1403.95
1365.22
1325.2
1284.56
1243.8
1203.47
1164
1126.73
1090.72
1056.22
1023.61
993.106
964.731
938.564
914.601
892.753
872.906
854.965
838.886
824.561
811.896
800.805
791.221
783.089
776.376
771.042
767.085
764.546
763.415
763.453
764.85
767.652
771.89
777.643
784.93
793.814
804.336
816.516
830.384
845.981
863.297
882.337
903.087
925.505
949.657
975.566
1003.15
1032.36
1063.13
1095.47
1129.11
1163.82
1200.17
1237.59
1275.6
1313.76
1351.57
1388.42
1423.73
1456.88
1487.26
1514.32
1537.47
1556.24
1570.2
1579.01
1582.47
1580.03
1572.15
1558.86
1540.3
1516.75
1488.58
1456.27
1420.38
1381.61
1340.67
1298.24
1255.11
1212.04
1169.65
1128.48
1089.04
1051.68
1016.68
984.187
954.314
927.069
902.313
879.956
859.983
842.312
826.787
813.267
801.636
791.768
783.603
776.986
771.673
767.647
765.019
763.635
763.277
763.767
765.177
767.519
770.866
775.225
780.541
786.798
794.123
802.642
812.475
823.735
836.588
851.243
867.782
886.29
906.867
929.509
954.209
980.966
1009.7
1040.38
1072.92
1107.12
1143.27
1180.38
1218.48
1257.18
1295.98
1334.27
1371.46
1406.81
1439.64
1469.31
1495.23
1516.84
1533.62
1545.18
1551.29
1551.89
1546.98
1536.7
1521.21
1500.81
1475.92
1447.04
1414.73
1379.6
1342.23
1303.28
1263.33
1222.97
1182.79
1143.27
1104.9
1067.99
1032.86
999.694
968.648
939.783
913.062
888.437
865.897
845.349
826.658
809.747
794.545
781.027
769.207
758.983
750.304
743.162
737.523
733.357
730.61
729.237
729.186
730.334
732.725
736.376
741.234
747.324
754.637
763.174
772.954
783.991
796.323
809.946
824.952
841.461
859.538
879.216
900.574
923.721
948.754
975.639
1004.26
1034.57
1066.83
1100.19
1134.81
1170.43
1206.62
1243.02
1279.2
1314.59
1348.66
1380.82
1410.49
1437.11
1460.1
1478.92
1493.13
1502.31
1506.2
1504.7
1497.78
1485.46
1467.93
1445.51
1418.63
1387.84
1353.72
1316.93
1278.13
1238.05
1197.35
1156.53
1116.19
1076.87
1039.08
1003.39
970.631
939.999
911.664
885.752
862.307
841.235
822.466
805.914
791.51
779.181
768.749
760.073
753.002
747.299
742.813
739.397
736.955
735.412
734.726
734.757
736.092
738.443
741.954
746.749
752.869
760.307
769.162
779.499
791.299
804.549
819.262
835.457
853.192
872.537
893.579
916.451
941.222
967.967
996.594
1026.55
1058.67
1092.23
1126.88
1162.5
1198.76
1235.21
1271.56
1307.72
1343.13
1377.21
1409.46
1439.43
1466.78
1491.18
1512.14
1529.23
1542
1550.09
1553.25
1550.99
1543.33
1530.33
1512.14
1489.13
1461.59
1430.03
1395.01
1357.09
1316.95
1275.46
1233.48
1191.82
1150.93
1111.43
1074.14
1040.81
1008.28
978.035
950.449
925.519
903.118
883.146
865.544
850.328
837.263
826.145
816.819
738.486
754.671
772.308
791.98
814.049
837.892
864.424
893.136
923.963
957.086
991.162
1026.75
1062.96
1103.63
1145.03
1186.17
1226.51
1265.89
1304.65
1342.01
1377.02
1409.4
1438.1
1462.4
1481.82
1495.99
1504.66
1507.71
1504.79
1496.25
1482.32
1463.34
1439.57
1411.52
1379.71
1344.7
1307.22
1267.89
1227.29
1186.1
1144.84
1104.06
1064.12
1026.78
990.429
955.708
922.97
892.4
863.996
837.85
813.945
792.181
772.427
754.578
738.603
724.379
711.81
700.806
691.3
683.232
676.572
671.278
667.349
664.854
663.843
663.803
665.157
667.917
672.107
677.813
685.049
693.884
704.364
716.497
730.32
745.887
763.174
782.192
802.922
825.31
849.453
875.376
902.979
932.23
963.069
995.518
1029.36
1064.29
1100.94
1138.73
1177.15
1215.8
1254.14
1291.54
1327.45
1361.18
1392.13
1419.72
1443.36
1462.54
1476.83
1485.87
1489.48
1487
1479.01
1465.5
1446.61
1422.63
1393.96
1361.05
1324.51
1285.06
1243.43
1200.31
1156.53
1112.87
1069.96
1028.36
988.568
950.947
915.769
883.177
853.272
826.058
801.368
779.085
759.209
741.671
726.283
712.895
701.395
691.655
683.618
677.138
671.929
667.961
665.422
664.148
663.876
664.388
665.807
668.134
671.459
675.803
681.075
687.251
694.471
702.877
712.589
723.713
736.43
750.967
767.405
785.829
806.356
828.97
853.669
880.456
909.245
940.032
972.716
1007.07
1043.58
1080.99
1119.5
1158.68
1198.01
1236.9
1274.72
1310.71
1344.16
1374.43
1400.9
1422.97
1440.12
1451.94
1458.19
1458.8
1453.8
1443.33
1427.53
1406.73
1381.35
1351.93
1319.03
1283.29
1245.31
1205.77
1165.24
1124.34
1083.68
1043.75
1005.03
967.836
932.502
899.188
868.057
839.17
812.46
787.868
765.391
744.927
726.321
709.484
694.354
680.9
669.147
658.987
650.365
643.275
637.686
633.571
630.872
629.549
629.539
630.705
633.104
636.76
641.612
647.689
654.984
663.488
673.23
684.221
696.5
710.046
724.971
741.401
759.403
779.014
800.305
823.408
848.446
875.376
904.072
934.456
966.957
1000.5
1035.41
1071.38
1107.97
1144.83
1181.51
1217.45
1252.09
1284.83
1315.07
1342.23
1365.73
1384.98
1399.55
1408.98
1413
1411.52
1404.51
1391.99
1374.13
1351.28
1323.89
1292.51
1257.76
1220.31
1180.85
1140.15
1098.87
1057.51
1016.67
976.931
938.788
902.85
869.872
839.174
810.818
784.923
761.537
740.551
721.884
705.445
691.165
678.981
668.697
660.173
653.258
647.691
643.318
639.989
637.609
636.103
635.437
635.522
636.78
639.062
642.505
647.238
653.3
660.671
669.461
679.74
691.497
704.684
719.328
735.444
753.098
772.364
793.334
816.154
840.9
867.674
896.331
926.502
958.785
992.565
1027.44
1063.37
1099.97
1136.77
1173.48
1210.09
1245.99
1280.56
1313.28
1343.7
1371.5
1396.35
1417.73
1435.19
1448.27
1456.58
1459.88
1457.63
1449.9
1436.7
1418.19
1394.78
1366.74
1334.61
1298.98
1260.39
1219.53
1177.35
1134.72
1092.52
1051.15
1011.26
973.704
939.856
907.209
876.899
849.33
824.461
802.143
782.263
764.762
749.699
736.789
725.817
716.631
638.008
654.232
671.731
691.278
713.347
737.05
763.649
792.438
823.319
856.746
890.911
926.64
962.631
1004.1
1046.13
1087.81
1128.62
1168.38
1207.74
1245.78
1281.41
1314.45
1343.78
1368.59
1388.42
1402.86
1411.7
1414.81
1411.81
1403.1
1388.89
1369.53
1345.3
1316.69
1284.29
1248.64
1210.53
1170.57
1129.35
1087.6
1045.82
1004.58
964.131
926.761
890.032
855.081
822.215
791.583
763.151
737.03
713.19
691.518
671.86
654.107
638.243
624.126
611.658
600.744
591.318
583.316
576.711
571.458
567.557
565.101
564.205
564.101
565.41
568.127
572.265
577.924
585.104
593.888
604.325
616.41
630.187
645.722
662.978
681.976
702.684
725.038
749.168
775.111
802.737
832.028
862.926
895.483
929.531
964.686
1001.65
1039.81
1078.67
1117.81
1156.71
1194.7
1231.23
1265.57
1297.12
1325.27
1349.41
1369.03
1383.66
1392.94
1396.68
1394.17
1386.06
1372.32
1353.09
1328.67
1299.46
1265.94
1228.71
1188.55
1146.2
1102.37
1057.9
1013.64
970.195
928.137
887.988
850.098
814.744
782.05
752.116
724.943
700.328
678.124
658.348
640.947
625.703
612.448
601.083
591.473
583.572
577.239
572.144
568.228
565.773
564.622
564.447
564.978
566.405
568.714
572.013
576.347
581.574
587.663
594.772
603.059
612.647
623.629
636.2
650.614
666.945
685.279
705.75
728.336
753.031
779.844
808.685
839.575
872.412
906.926
943.778
981.52
1020.45
1060.12
1100.03
1139.53
1178.03
1214.69
1248.78
1279.67
1306.72
1329.29
1346.83
1358.91
1365.29
1365.92
1360.81
1350.14
1334.03
1312.79
1286.91
1256.91
1223.41
1187.04
1148.42
1108.26
1067.14
1025.67
984.516
944.153
905.078
867.593
832.05
798.586
767.371
738.468
711.773
687.216
664.807
644.435
625.919
609.155
594.096
580.708
569.022
558.928
550.367
543.333
537.8
533.738
531.086
529.816
529.849
531.034
533.44
537.101
541.946
548.01
555.287
563.754
573.456
584.402
596.625
610.089
624.928
641.274
659.199
678.74
699.955
723.007
748.051
775.026
803.8
834.267
866.995
900.744
935.948
972.272
1009.29
1046.61
1083.83
1120.34
1155.57
1188.91
1219.74
1247.48
1271.5
1291.21
1306.16
1315.84
1320
1318.54
1311.44
1298.7
1280.5
1257.19
1229.25
1197.27
1161.86
1123.74
1083.59
1042.24
1000.36
958.435
917.084
876.902
838.395
802.196
769.009
738.247
709.874
683.998
660.675
639.781
621.219
604.895
590.745
578.717
568.585
560.222
553.47
548.046
543.793
540.554
538.237
536.769
536.116
536.291
537.437
539.644
543.01
547.678
553.681
560.981
569.703
579.932
591.638
604.756
619.332
635.361
652.931
672.114
693.003
715.766
740.483
767.288
795.981
826.357
858.823
892.83
927.943
964.19
1001.15
1038.31
1075.37
1112.45
1148.87
1183.96
1217.17
1248.06
1276.31
1301.63
1323.46
1341.3
1354.7
1363.25
1366.7
1364.47
1356.65
1343.26
1324.42
1300.59
1272.03
1239.29
1203.01
1163.74
1122.12
1079.2
1035.89
993.141
951.274
910.981
873.125
838.792
806.014
775.623
748.083
723.284
701.056
681.275
663.873
648.978
636.232
625.411
616.371
537.434
553.725
571.068
590.467
612.554
636.079
662.766
691.639
722.541
756.334
790.575
826.383
862.149
904.513
947.197
989.442
1030.72
1070.86
1110.83
1149.61
1185.85
1219.62
1249.59
1274.95
1295.19
1309.93
1318.93
1322.14
1319.03
1310.14
1295.64
1275.89
1251.16
1221.98
1188.96
1152.65
1113.88
1073.26
1031.4
989.06
946.744
905.02
864.039
826.656
789.523
754.335
721.344
690.653
662.191
636.1
612.331
590.76
571.206
553.551
537.804
523.8
511.438
500.619
491.275
483.345
476.794
471.582
467.71
465.287
464.519
464.344
465.608
468.282
472.364
477.976
485.096
493.824
504.219
516.255
529.98
545.482
562.706
581.685
602.37
624.686
648.798
674.765
702.411
731.742
762.695
795.361
829.598
864.995
902.289
940.835
980.133
1019.79
1059.26
1097.87
1135.04
1170.02
1202.19
1230.93
1255.61
1275.67
1290.67
1300.2
1304.17
1301.54
1293.32
1279.34
1259.76
1234.88
1205.12
1170.96
1133.01
1092.1
1049.01
1004.43
959.241
914.34
870.341
827.803
787.281
749.116
713.589
680.797
650.84
623.721
599.187
577.064
557.387
540.13
525.04
511.927
500.704
491.236
483.478
477.301
472.33
468.457
466.078
465.079
465.004
465.539
466.972
469.263
472.532
476.861
482.045
488.041
495.032
503.193
512.653
523.485
535.9
550.187
566.407
584.644
605.058
627.613
652.301
679.141
708.029
739.02
772.019
806.721
843.844
881.951
921.322
961.497
1002
1042.15
1081.34
1118.72
1153.48
1185.03
1212.67
1235.77
1253.72
1266.09
1272.6
1273.24
1268.04
1257.15
1240.7
1219.03
1192.63
1162.02
1127.88
1090.86
1051.57
1010.76
969.016
926.971
885.29
844.479
805.04
767.254
731.5
697.884
666.579
637.668
610.985
586.468
564.131
543.861
525.439
508.748
493.764
480.452
468.843
458.82
450.323
443.347
437.87
433.866
431.251
430.049
430.128
431.327
433.741
437.406
442.245
448.296
455.554
463.979
473.639
484.54
496.705
510.082
524.831
541.088
558.933
578.398
599.527
622.518
647.567
674.586
703.44
734.044
766.889
800.899
836.409
873.114
910.56
948.375
986.144
1023.24
1059.09
1093.06
1124.51
1152.84
1177.42
1197.6
1212.95
1222.9
1227.21
1225.76
1218.58
1205.6
1187.04
1163.26
1134.76
1102.14
1066.06
1027.22
986.351
944.317
901.821
859.311
817.431
776.784
737.899
701.42
668.036
637.208
608.816
582.958
559.703
538.91
520.463
504.257
490.245
478.38
468.402
460.205
453.623
448.351
444.223
441.077
438.821
437.391
436.754
436.98
438.054
440.175
443.464
448.071
454.015
461.237
469.888
480.069
491.721
504.767
519.271
535.21
552.689
571.787
592.588
615.287
639.968
666.81
695.545
726.104
758.776
793.024
828.369
864.952
902.284
939.82
977.227
1014.8
1051.77
1087.41
1121.11
1152.49
1181.22
1207.03
1229.32
1247.56
1261.3
1270.11
1273.71
1271.5
1263.59
1249.99
1230.81
1206.54
1177.44
1144.07
1107.12
1067.14
1024.72
981.015
937.004
893.685
851.291
810.591
772.39
737.61
704.689
674.203
646.704
621.985
599.858
580.182
562.875
548.164
535.592
524.929
516.04
436.759
453.152
470.316
489.541
511.669
534.967
561.774
590.741
621.615
655.859
690.159
725.981
761.481
804.863
848.237
891.068
932.817
973.29
1013.93
1053.49
1090.36
1124.89
1155.56
1181.47
1202.16
1217.2
1226.37
1229.65
1226.44
1217.38
1202.57
1182.41
1157.17
1127.39
1093.71
1056.72
1017.25
975.946
933.421
890.478
847.601
805.391
763.866
726.439
688.891
653.464
620.353
589.61
561.117
535.062
511.372
489.913
470.469
452.913
437.292
423.406
411.153
400.433
391.175
383.319
376.823
371.651
367.806
365.405
364.754
364.528
365.749
368.385
372.408
377.967
385.024
393.693
404.044
416.03
429.7
445.169
462.361
481.322
501.983
524.257
548.347
574.343
602.012
631.382
662.388
695.164
729.573
765.242
802.874
841.82
881.576
921.77
961.845
1001.09
1038.92
1074.56
1107.38
1136.73
1161.95
1182.5
1197.88
1207.66
1211.6
1209.11
1200.78
1186.56
1166.61
1141.25
1110.9
1076.07
1037.37
995.68
951.814
906.438
860.497
814.942
770.377
727.35
686.459
648.017
612.322
579.434
549.463
522.409
497.966
475.931
456.356
439.254
424.332
411.369
400.292
390.97
383.36
377.339
372.499
368.666
366.352
365.531
365.553
366.082
367.518
369.784
373.018
377.354
382.505
388.393
395.263
403.29
412.617
423.29
435.544
449.698
465.8
483.938
504.287
526.811
551.487
578.351
607.282
638.379
671.547
706.479
743.788
782.32
822.152
862.845
903.962
944.772
984.697
1022.81
1058.28
1090.51
1118.79
1142.42
1160.81
1173.48
1180.13
1180.76
1175.45
1164.35
1147.56
1125.43
1098.46
1067.22
1032.42
994.708
954.721
913.243
870.848
828.197
785.979
744.71
704.9
666.818
630.85
597.087
565.693
536.788
510.13
485.66
463.404
443.246
424.93
408.313
393.405
380.172
368.645
358.691
350.258
343.341
337.919
333.975
331.388
330.266
330.394
331.597
334.022
337.69
342.522
348.557
355.79
364.181
373.787
384.643
396.75
410.033
424.683
440.848
458.607
477.99
499.026
521.942
546.995
574.056
602.983
633.734
666.679
700.951
736.778
773.88
811.778
850.103
888.444
926.162
962.653
997.277
1029.38
1058.33
1083.49
1104.17
1119.94
1130.17
1134.62
1133.19
1125.92
1112.71
1093.76
1069.49
1040.39
1007.1
970.301
930.729
889.096
846.353
803.228
760.109
717.681
676.56
637.281
600.515
566.954
536.07
507.671
481.846
458.666
437.984
419.655
403.564
389.693
378.002
368.182
360.16
353.758
348.647
344.648
341.596
339.397
338.006
337.386
337.731
338.658
340.669
343.872
348.409
354.286
361.425
370.013
380.141
391.751
404.717
419.146
434.989
452.374
471.381
492.085
514.713
539.351
566.237
595.013
625.745
658.642
693.145
728.718
765.655
803.382
841.303
879.048
917.146
954.694
990.902
1025.11
1057
1086.21
1112.55
1135.31
1153.98
1168.08
1177.15
1180.91
1178.72
1170.72
1156.92
1137.37
1112.65
1082.98
1048.95
1011.3
970.586
927.311
882.794
838.04
794.143
751.2
710.098
671.487
636.303
603.23
572.633
545.192
520.566
498.547
478.982
461.764
447.259
434.87
424.371
415.637
335.98
352.508
369.474
388.491
410.696
433.703
460.677
489.746
520.523
555.329
589.666
625.431
660.59
705.159
749.25
792.693
834.923
875.671
917.025
957.439
994.924
1030.28
1061.68
1088.18
1109.31
1124.68
1134.02
1137.34
1134.05
1124.81
1109.68
1089.1
1063.31
1032.91
998.552
960.847
920.657
878.64
835.414
791.851
748.385
705.693
663.654
626.061
588.132
552.466
519.245
488.458
459.926
433.915
410.309
388.97
369.642
352.185
336.697
322.934
310.797
300.178
291.011
283.236
276.797
271.663
267.837
265.451
264.94
264.661
265.837
268.437
272.396
277.902
284.896
293.504
303.811
315.744
329.353
344.787
361.945
380.884
401.522
423.747
447.805
473.839
501.53
530.935
561.985
594.874
629.429
665.405
703.363
742.709
782.946
823.695
864.407
904.32
942.853
979.189
1012.68
1042.67
1068.48
1089.52
1105.29
1115.33
1119.5
1116.89
1108.46
1093.98
1073.64
1047.78
1016.83
981.292
941.823
899.315
854.652
808.461
761.738
715.518
670.374
626.835
585.57
546.832
510.96
477.963
447.979
420.997
396.658
374.717
355.248
338.317
323.578
310.774
299.847
290.678
283.227
277.369
272.665
268.872
266.612
265.97
266.122
266.63
268.05
270.29
273.488
277.847
282.961
288.745
295.48
303.364
312.551
323.058
335.142
349.157
365.138
383.171
403.443
425.929
450.589
477.468
506.429
537.63
570.967
606.124
643.612
682.579
722.893
764.114
805.884
847.394
888.087
926.966
963.166
996.103
1025.05
1049.26
1068.09
1081.07
1087.87
1088.51
1083.09
1071.76
1054.6
1031.99
1004.45
972.53
937.055
898.632
857.909
815.743
772.683
729.403
686.632
644.889
604.704
566.332
530.127
496.202
464.704
435.801
409.157
384.725
362.554
342.533
324.35
307.815
292.982
279.841
268.409
258.531
250.165
243.313
237.945
234.061
231.481
230.374
230.654
231.861
234.299
237.975
242.796
248.814
256.01
264.375
273.923
284.735
296.788
309.965
324.511
340.583
358.252
377.547
398.48
421.305
446.353
473.461
502.453
533.339
566.392
600.916
637.061
674.564
712.925
751.771
790.703
829.053
866.231
901.53
934.317
963.915
989.691
1010.9
1027.12
1037.64
1042.25
1040.83
1033.48
1020.02
1000.69
975.897
946.17
912.191
874.642
834.313
791.882
748.402
704.636
660.883
617.888
576.291
536.591
499.511
465.776
434.821
406.405
380.602
357.497
336.94
318.745
302.784
289.067
277.552
267.88
260.032
253.813
248.868
244.998
242.036
239.898
238.55
237.915
238.117
239.175
241.118
244.237
248.702
254.51
261.577
270.102
280.185
291.735
304.615
318.968
334.703
351.99
370.905
391.497
414.046
438.632
465.571
494.372
525.286
558.419
593.193
628.986
666.296
704.44
742.76
780.822
819.477
857.636
894.445
929.176
961.582
991.297
1018.18
1041.45
1060.56
1075.02
1084.38
1088.31
1086.13
1078.05
1064.04
1044.11
1018.92
988.652
953.925
915.555
874.088
829.901
784.529
738.994
694.515
650.997
609.469
570.444
534.861
501.637
470.903
443.544
419.023
397.124
377.678
360.536
346.262
334.066
323.736
315.162
235.091
251.774
268.537
287.295
309.639
332.269
359.475
388.657
419.241
454.756
489.093
524.722
559.448
605.412
650.235
694.322
737.04
777.982
820.107
861.452
899.532
935.773
967.946
995.055
1016.66
1032.36
1041.87
1045.2
1041.87
1032.45
1016.99
995.957
969.608
938.546
903.483
865.028
824.089
781.333
737.375
693.176
649.092
605.928
563.526
525.4
487.245
451.337
418.012
387.189
358.61
332.652
309.142
287.943
268.765
251.4
236.056
222.416
210.4
199.886
190.812
183.122
176.746
171.652
167.851
165.487
165.385
164.771
165.884
168.438
172.334
177.802
184.733
193.28
203.536
215.413
228.95
244.353
261.479
280.403
301.016
323.178
347.192
373.271
400.978
430.415
461.494
494.499
529.181
565.485
603.769
643.519
684.25
725.565
766.932
807.538
846.808
883.869
918.067
948.723
975.142
996.71
1012.9
1023.21
1027.6
1024.88
1016.36
1001.61
980.877
954.498
922.93
886.663
846.381
803.02
757.531
710.475
662.922
616.002
570.257
526.18
484.538
445.497
409.456
376.364
346.395
319.537
295.335
273.502
254.164
237.424
222.879
210.241
199.463
190.442
183.149
177.427
172.879
169.107
166.915
166.442
166.716
167.159
168.561
170.782
173.961
178.353
183.407
189.109
195.702
203.435
212.477
222.815
234.729
248.608
264.468
282.394
302.583
325.027
349.667
376.557
405.528
436.813
470.326
505.682
543.357
582.75
623.555
665.309
707.753
749.99
791.489
831.174
868.128
901.82
931.454
956.26
975.569
988.885
995.82
996.412
990.92
979.365
961.827
938.731
910.572
877.947
841.773
802.617
761.114
718.237
674.492
630.538
587.196
544.952
504.368
465.678
429.22
395.159
363.576
334.728
308.136
283.792
261.749
241.888
223.865
207.426
192.668
179.628
168.312
158.524
150.243
143.479
138.19
134.396
131.883
131.249
131.261
132.324
134.703
138.323
143.091
149.082
156.251
164.57
174.071
184.837
196.839
209.906
224.345
240.323
257.91
277.11
297.926
320.645
345.679
372.829
401.889
432.88
466.059
500.829
537.3
575.216
614.048
653.425
692.967
731.965
769.85
805.845
839.338
869.614
896.023
917.784
934.472
945.311
950.078
948.656
941.235
927.538
907.794
882.461
852.081
817.385
779.042
737.929
694.649
650.382
605.97
561.55
517.948
475.849
435.689
398.288
364.449
333.481
305.099
279.366
256.381
235.986
217.955
202.137
188.6
177.303
167.799
160.152
154.123
149.339
145.573
142.652
140.535
139.199
138.547
138.826
139.906
141.618
144.591
148.951
154.691
161.675
170.118
180.163
191.665
204.441
218.718
234.331
251.526
270.351
290.825
313.289
337.815
364.819
393.627
424.73
458.106
493.171
529.166
566.871
605.458
644.192
682.539
721.793
760.597
798.04
833.297
866.241
896.464
923.93
947.734
967.296
982.145
991.793
995.913
993.746
985.574
971.349
951.021
925.345
894.457
858.997
819.877
777.648
732.482
686.218
639.857
594.801
550.672
508.699
469.255
433.279
399.911
369.01
341.761
317.359
295.588
276.269
259.175
245.172
233.181
223.025
214.617
134.033
150.881
167.548
185.969
208.513
230.621
258.157
287.481
317.729
354.153
388.442
423.855
458.005
505.633
551.192
595.964
639.179
680.196
723.17
765.544
804.173
841.386
874.373
902.114
924.211
940.252
949.926
953.224
949.89
940.292
924.481
902.99
876.047
844.296
808.501
769.263
727.549
684.022
639.298
594.449
549.716
506.095
463.451
424.468
386.218
350.063
316.666
285.836
257.247
231.351
207.937
186.891
167.863
150.649
135.477
122.059
110.339
100.217
91.6541
84.6095
79.0133
74.7802
71.8288
70.1736
70.1155
70.2669
71.5011
73.8162
77.1865
81.8984
87.9056
95.4307
104.67
115.652
128.536
143.71
160.87
179.838
200.453
222.543
246.531
272.677
300.39
329.852
360.939
394.049
428.844
465.496
504.124
544.3
585.529
627.433
669.481
710.791
750.83
788.637
823.562
854.907
881.965
904.086
920.706
931.282
935.461
933.041
924.441
909.43
888.277
861.353
829.139
792.104
750.969
706.705
660.364
612.405
564.012
516.392
470.058
425.444
383.463
344.164
308.02
274.896
244.989
218.331
194.345
172.675
153.56
137.199
123.156
111.132
101.101
92.915
86.4967
81.4576
77.6587
74.9521
73.6262
73.1153
73.2808
73.6487
74.9831
76.8789
79.6691
83.3949
87.6745
92.5964
98.3628
105.226
113.428
123.031
134.413
148.072
163.809
181.627
201.75
224.16
248.778
275.684
304.652
335.984
369.674
405.194
443.062
482.886
524.182
566.466
609.593
652.573
694.903
735.437
773.162
807.65
838.022
863.45
883.255
896.928
903.999
904.522
898.959
887.173
869.232
845.628
816.832
783.454
746.559
706.65
664.32
620.719
576.265
531.615
487.7
444.961
403.979
365.025
328.374
294.241
262.631
233.906
207.422
183.203
161.365
141.802
124.226
108.412
94.5368
82.7416
73.0381
65.1151
58.8665
54.0543
50.413
47.8397
46.1416
45.2873
45.3353
46.2134
47.9377
50.5669
54.0614
58.68
64.4453
71.2846
79.2595
88.5387
99.163
111.013
124.553
140.068
157.57
176.681
197.355
219.962
244.999
272.166
301.298
332.357
365.657
400.659
437.456
475.8
515.117
555.038
595.22
634.892
673.514
710.23
744.463
775.443
802.512
824.845
842.022
853.192
858.12
856.671
849.198
835.236
815.058
789.154
758.083
722.64
683.462
641.558
597.374
552.311
507.288
462.199
417.997
375.44
334.855
297.175
263.336
232.365
204.13
178.503
155.714
135.704
118.256
103.238
90.8139
80.8649
72.78
66.5908
61.909
58.3026
55.499
53.2351
51.5938
50.543
49.7685
49.5938
50.3836
51.5582
53.7667
57.1848
61.9065
67.7568
74.9341
83.6444
93.8373
105.396
118.734
133.809
150.899
169.647
190.02
212.396
236.833
263.967
292.75
324.071
357.704
393.095
429.262
467.382
506.438
545.603
584.185
624.089
663.576
701.69
737.475
770.974
801.713
829.795
854.157
874.192
889.443
899.401
903.715
901.56
893.306
878.858
858.109
831.936
800.395
764.164
724.269
681.272
635.049
587.856
540.616
494.999
450.211
407.795
367.925
331.552
298.04
266.907
239.821
215.576
193.957
174.791
157.742
144.034
132.241
122.253
114.01
40.7769
53.2268
68.9714
86.2733
107.692
128.794
156.905
186.308
215.915
253.413
287.719
322.835
356.168
405.842
452.122
497.631
541.354
582.282
626.205
669.729
708.829
747.117
780.961
809.357
831.961
848.359
858.201
861.449
858.126
848.344
832.166
810.197
782.633
750.162
713.604
673.549
631.032
586.707
541.18
495.671
450.254
406.173
363.181
323.479
285.113
248.761
215.319
184.49
155.897
130.18
107.232
87.3079
70.4532
57.3923
47.5846
39.3338
32.4147
26.7173
22.1629
18.6692
16.1311
14.4048
13.3573
12.9139
12.8531
13.1961
13.9036
14.9863
16.493
18.5826
21.3124
24.8628
29.5122
35.4728
43.2115
53.6274
67.1606
83.215
101.539
122.088
145.624
171.961
199.712
229.219
260.317
293.468
328.468
365.428
404.412
445.023
486.76
529.274
572.033
614.066
654.913
693.49
729.169
761.23
788.942
811.646
828.719
839.57
843.686
841.406
832.728
817.432
795.837
768.344
735.463
697.621
655.61
610.425
563.245
514.377
465.14
416.824
369.921
324.754
282.561
243.128
206.93
173.778
144.059
118.085
95.4794
76.3962
61.5018
50.4503
41.5583
34.3612
28.7085
24.3362
21.1158
18.555
16.7981
16.0845
15.9419
15.4527
15.0604
15.3496
16.0431
16.9372
18.233
19.7686
21.6007
23.8486
26.6392
30.1163
34.512
40.0814
47.3519
57.2058
69.8451
84.9115
102.762
123.705
147.886
174.826
203.783
235.163
269.03
304.676
342.747
382.974
424.791
467.603
511.427
555.156
598.339
639.761
678.272
713.571
744.719
770.795
791.117
805.185
812.399
812.808
807.208
795.186
776.803
752.689
723.224
689.032
651.418
610.731
567.543
523.219
478.059
432.723
388.27
345.088
303.778
264.614
227.759
193.508
161.862
133.451
107.809
85.5006
67.3537
53.4371
42.0866
32.5547
24.7606
18.7482
14.3643
11.2702
9.19529
7.76052
6.74954
6.04828
5.60272
5.36565
5.35489
5.58526
6.06155
6.83895
7.92581
9.5174
11.6987
14.4242
17.7755
21.9114
27.0495
33.2262
41.0979
51.3899
64.8918
80.8997
98.9898
119.848
144.34
171.538
200.711
231.843
265.252
300.455
337.554
376.325
416.125
456.597
497.44
537.794
577.19
614.642
649.658
681.369
709.128
732.063
749.751
761.269
766.372
764.861
757.358
743.13
722.498
695.999
664.212
628.022
587.975
545.309
500.186
454.348
408.778
363.02
318.263
275.256
234.213
196.162
162.297
131.515
104.315
81.0692
62.8553
49.2809
38.3482
29.5774
22.8508
17.9387
14.2884
11.81
10.1515
8.95754
8.06669
7.29465
6.72341
6.32374
5.87798
5.64706
5.76651
6.1573
6.88899
8.10502
9.93481
12.3151
15.3238
19.1223
23.8001
29.4598
36.6533
45.9257
58.4498
74.0142
91.749
112.159
135.716
163.006
191.596
223.145
257.182
292.933
329.257
367.83
407.399
447.006
485.747
526.365
566.572
605.399
641.708
675.782
707.036
735.778
760.725
781.249
796.919
807.204
811.717
809.579
801.244
786.567
765.376
738.694
706.47
669.424
628.727
584.97
537.591
489.436
441.262
395.124
349.61
306.764
266.317
229.662
196.112
164.701
137.913
113.763
92.2494
73.1832
56.2066
47.7456
41.673
36.6199
32.4481
-0.696715
1.22223
8.62939
17.1232
27.1865
38.2033
61.1369
87.3266
114.135
152.654
187.032
221.668
253.681
306.029
352.997
399.349
443.591
484.2
529.205
574.03
613.475
652.974
687.717
716.787
739.916
756.688
766.697
769.864
766.581
756.606
740.046
717.586
689.365
656.146
618.788
577.886
534.535
489.39
443.024
396.835
350.68
306.158
262.764
222.609
184.051
147.429
114.252
84.6668
60.5587
43.8518
30.2885
19.6994
12.2323
7.86655
5.55595
3.86267
2.60819
1.71944
1.1296
0.77868
0.601712
0.526236
0.507987
0.520947
0.533429
0.557786
0.601724
0.655066
0.732256
0.861153
1.05721
1.37527
1.91438
2.83215
4.45498
7.3711
12.3613
19.1482
27.8499
39.0892
54.7574
76.2466
100.704
128.55
159.521
192.771
228.052
265.302
304.645
345.667
387.925
431.071
474.561
517.342
559.037
598.424
634.881
667.691
696.083
719.393
736.94
748.083
752.087
749.972
741.226
725.631
703.576
675.493
641.95
603.283
560.396
514.253
466.232
416.362
366.28
317.378
269.989
224.277
181.781
142.153
106.773
76.753
54.459
37.975
25.1703
15.8922
10.2631
7.26161
5.14756
3.63794
2.5948
1.87094
1.39846
1.0057
0.792943
0.876342
0.981791
0.783358
0.656381
0.682332
0.761314
0.894643
1.04239
1.07179
1.16823
1.36508
1.67591
2.13415
2.81674
3.88634
5.6343
8.66681
13.4597
19.8399
28.3774
40.078
56.6595
78.8475
104.511
134.433
168.404
204.134
242.419
282.993
325.362
368.701
413.248
457.74
501.804
544.145
583.488
619.609
651.569
678.325
699.157
713.644
721.001
721.104
715.616
703.363
684.496
659.881
629.722
594.651
556.344
514.888
470.787
425.79
379.935
333.856
288.907
245.191
203.48
164.021
127.286
94.619
67.5379
47.8441
32.2309
20.2551
12.305
8.00824
5.2362
3.22102
1.83391
0.995327
0.561237
0.430863
0.439253
0.432594
0.424469
0.417941
0.412605
0.406641
0.403972
0.409394
0.42152
0.445085
0.47717
0.527936
0.60363
0.71815
0.900276
1.20073
1.71987
2.56692
4.08565
6.77466
11.5194
18.1841
26.5618
37.8065
54.0885
76.2035
101.982
131.518
164.917
200.288
237.661
276.843
317.102
358.126
399.654
440.691
480.892
519.089
554.924
587.396
615.872
639.439
657.653
669.545
674.837
673.227
665.721
651.207
630.125
602.993
570.476
533.534
492.548
449.162
402.978
356.322
310.221
263.626
218.229
174.637
133.342
96.6102
67.687
46.384
30.1193
18.079
10.7099
6.9665
4.4388
2.68169
1.55186
0.894785
0.52556
0.38599
0.410657
0.458657
0.500051
0.520398
0.523275
0.522197
0.473856
0.432872
0.419409
0.412001
0.418371
0.432088
0.460605
0.510655
0.593275
0.745287
1.02361
1.52617
2.51299
4.4135
8.18467
14.5248
22.4055
32.67
46.9247
68.1731
93.0629
122.4
156.598
192.535
228.935
268.164
308.304
348.41
387.218
428.634
469.589
509.175
545.992
580.663
612.427
641.882
667.44
688.467
704.575
715.204
719.928
717.801
709.395
694.479
672.823
645.625
612.682
574.774
533.246
488.757
440.097
390.972
341.778
295.12
248.79
205.661
164.615
127.883
94.0311
62.0809
44.4881
32.2156
21.4754
12.2474
5.1698
3.15805
2.42925
1.99488
1.57016
-0.810873
-1.13526
-1.21546
-1.24895
-1.21661
-0.999417
4.70746
17.3044
30.8465
58.9732
88.6642
121.475
150.27
206.116
253.68
301.104
345.91
385.902
432.166
478.483
518.079
558.966
594.647
624.407
648.079
665.243
675.423
678.454
675.265
665.083
648.126
625.158
596.245
562.247
524.053
482.277
438.064
392.064
344.817
297.933
251.121
206.206
162.408
121.868
84.3176
54.3881
34.1996
18.3655
8.97781
4.88278
2.29355
0.81552
0.337072
0.290789
0.264304
0.244483
0.22966
0.218003
0.209846
0.207158
0.204885
0.200648
0.197087
0.194172
0.191613
0.190666
0.190567
0.191156
0.193388
0.197466
0.203215
0.211966
0.225823
0.246938
0.285425
0.359081
0.51136
0.857056
1.65454
3.46019
7.61741
16.0205
27.3177
42.9138
65.6712
94.3846
127.68
165.087
204.84
246.249
288.995
332.785
377.029
420.559
463.139
503.374
540.639
574.234
603.346
627.301
645.357
656.83
661.046
658.771
649.955
634.042
611.512
582.838
548.598
509.044
465.181
418
369.167
318.299
267.328
217.656
169.608
123.623
83.6499
53.0999
31.2673
15.9362
8.1279
4.18459
1.8038
0.598116
0.267562
0.241425
0.224524
0.2178
0.213308
0.209056
0.204325
0.200797
0.197532
0.195476
0.201816
0.197302
0.19098
0.189238
0.189845
0.196017
0.208351
0.205258
0.20306
0.206001
0.213459
0.227175
0.246951
0.275414
0.318507
0.406737
0.568739
0.909332
1.71203
3.64214
8.22474
17.01
29.0954
46.8373
73.4305
105.116
142.149
183.046
225.866
269.762
314.998
360.243
405.25
448.517
488.729
525.72
558.532
586.026
607.384
622.321
629.841
629.722
624.236
611.744
592.348
567.224
536.364
500.323
461.307
419.093
373.906
328.247
281.554
234.504
189.077
144.951
104.104
69.4128
43.8838
24.8177
12.2207
6.4637
3.13011
1.17516
0.358819
0.247198
0.269392
0.250548
0.232752
0.21772
0.19507
0.184551
0.189769
0.190373
0.188363
0.18663
0.185132
0.184111
0.183626
0.184092
0.184591
0.185155
0.187271
0.190068
0.194047
0.198933
0.205146
0.212386
0.223299
0.240189
0.275044
0.341795
0.481555
0.797114
1.48327
3.17563
7.38033
15.9271
27.9258
45.0564
70.7245
101.965
137.934
177.453
218.069
259.658
301.866
343.581
384.606
423.553
460.221
493.498
522.71
546.955
565.71
578.008
583.518
581.727
574.272
559.447
537.882
510.052
476.746
438.975
396.952
352.78
305.322
257.76
210.992
163.601
118.373
78.0904
47.5703
25.6249
12.2437
6.07665
2.73434
0.917754
0.311061
0.27438
0.274627
0.25518
0.238492
0.228681
0.204804
0.182805
0.185084
0.194778
0.201938
0.205977
0.206546
0.21139
0.207719
0.199266
0.195387
0.19289
0.1911
0.187269
0.183365
0.180512
0.178047
0.176223
0.176332
0.179112
0.187715
0.205485
0.249935
0.380111
0.721129
1.68482
4.48149
11.8121
23.1251
38.5097
63.0866
94.4434
128.741
168.463
208.893
249.703
288.476
330.871
372.63
413.043
450.33
485.622
517.877
548.107
574.303
595.847
612.414
623.4
628.342
626.228
617.763
602.595
580.452
552.731
519.033
480.207
437.821
392.667
342.555
292.398
242.128
195.234
148.026
104.456
62.7852
39.4918
22.2924
8.98952
4.23141
2.81121
1.8221
1.44954
1.33591
1.23473
1.1969
1.12439
0.994876
-0.903862
-1.15993
-1.23862
-1.27396
-1.25392
-1.25276
-1.41292
-1.38935
-1.28268
3.59263
18.3442
37.9724
55.4388
107.328
154.872
202.675
248.298
287.195
335.069
383.14
422.601
465.113
501.757
532.219
556.454
574.03
584.387
587.18
584.183
573.776
556.41
532.916
503.272
468.466
429.403
386.723
341.593
294.712
246.703
199.168
151.76
106.511
65.6969
38.7587
18.2708
7.41166
3.05306
0.724256
0.3408
0.270579
0.222564
0.187695
0.185311
0.164315
0.148736
0.135635
0.124835
0.115662
0.10889
0.105072
0.101514
0.0967574
0.0927925
0.089277
0.0860599
0.0845918
0.0832886
0.0827818
0.083315
0.0841809
0.0854434
0.0870573
0.0888974
0.0900647
0.0922443
0.0959297
0.101552
0.112337
0.132964
0.175586
0.279106
0.587921
1.48987
4.16734
11.5483
24.0962
42.3501
70.5994
106.269
146.89
190.092
234.499
279.523
323.752
367.272
408.318
446.433
480.823
510.667
535.306
553.903
565.733
569.782
567.657
558.79
542.529
519.439
490.084
455.083
414.592
369.693
321.348
271.606
219.567
167.559
117.816
73.7126
41.191
18.9546
7.59879
2.79073
0.60916
0.206723
0.171769
0.142704
0.122901
0.130787
0.121398
0.112968
0.105923
0.100545
0.096444
0.0936738
0.0925917
0.0909637
0.0851406
0.0802967
0.0813499
0.0834592
0.08261
0.0811384
0.0784509
0.077932
0.0819506
0.0850536
0.0862594
0.0862691
0.0876144
0.0910002
0.0953342
0.0997824
0.107327
0.116389
0.123662
0.135086
0.16491
0.276011
0.607462
1.65127
5.13296
14.6635
29.4533
52.5112
86.6581
126.744
170.969
216.813
262.741
308.729
352.928
393.978
431.886
465.583
493.821
515.762
531.182
538.892
538.307
533.02
520.261
500.226
474.619
442.948
405.8
366.062
322.928
276.51
230.123
182.556
134.994
91.2794
55.5572
29.9003
12.8949
5.45721
1.83434
0.346231
0.185693
0.202134
0.1688
0.128115
0.09074
0.0979445
0.103534
0.105141
0.103015
0.089414
0.0809703
0.0847749
0.0861326
0.0848482
0.0835306
0.0822138
0.0814305
0.0810617
0.0813045
0.081525
0.0815175
0.0827654
0.0842883
0.0863858
0.0887049
0.090652
0.0915492
0.0916355
0.091497
0.0921718
0.0978021
0.107157
0.117649
0.129723
0.157322
0.246822
0.536456
1.48925
4.67068
13.6362
28.007
49.808
82.2133
119.723
161.328
204.164
246.508
288.351
328.067
365.579
399.678
429.642
454.593
473.893
486.615
492.355
490.313
482.935
467.746
445.623
416.993
382.829
344.118
300.943
255.886
207.022
158.798
112.247
69.3902
38.2866
16.6142
6.3811
1.99754
0.40082
0.228847
0.214467
0.172756
0.14831
0.119403
0.120401
0.12047
0.119091
0.116522
0.0993629
0.0813953
0.0820079
0.0893119
0.0944043
0.0960966
0.0927486
0.0882671
0.0887308
0.0903979
0.0902503
0.0892729
0.0876221
0.0840472
0.0797097
0.0758734
0.0722338
0.0677905
0.0632862
0.0591951
0.0531296
0.0457126
0.035801
0.0287844
0.0255194
0.0256289
0.0503597
0.145193
0.602693
2.44908
9.55373
23.7788
42.9255
73.7849
110.373
151.259
189.411
232.787
275.611
316.968
354.713
390.666
423.376
454.457
481.314
503.386
520.434
531.788
536.946
534.862
526.351
510.907
488.26
460.015
425.525
385.727
342.436
296.681
244.845
193.99
142.736
95.1797
50.9763
27.4391
10.1909
4.31894
2.07442
1.58743
1.47832
1.40352
1.3201
1.2576
1.17458
1.0893
1.0479
0.980485
0.875916
-0.986899
-1.18866
-1.26679
-1.30277
-1.29263
-1.30419
-1.42298
-1.41525
-1.41155
-1.54248
-1.52518
-0.614005
11.0278
29.8031
63.2353
105.228
151.282
187.812
237.793
287.993
326.956
371.442
409.058
440.226
465.041
483.054
493.6
496.141
493.345
482.684
464.895
440.861
410.448
374.802
334.811
291.207
245.122
197.561
148.91
100.764
58.0115
29.8382
11.2257
3.97081
0.777641
0.340548
0.253121
0.180246
0.156402
0.128107
0.102252
0.080204
0.0768163
0.0597057
0.0455817
0.0333915
0.0232207
0.0146328
0.0082679
0.00441093
0.000848505
-0.00357607
-0.00737633
-0.0107281
-0.0134788
-0.0150906
-0.0163985
-0.0170213
-0.0165965
-0.015895
-0.0148771
-0.013506
-0.0121657
-0.0115184
-0.010446
-0.00891598
-0.00722836
-0.00496918
-0.00254833
0.000855649
0.00606599
0.0166091
0.0351486
0.0955892
0.287987
1.02028
3.90957
13.5478
30.2818
56.2652
93.5563
136.382
182.192
226.998
271.53
313.323
352.329
387.549
418.073
443.413
462.549
474.747
478.62
476.583
467.635
450.941
427.232
397.163
361.289
319.822
273.657
223.932
173.33
120.75
72.3448
37.6959
14.5032
4.70226
0.925655
0.153989
0.0953703
0.0633214
0.044002
0.0395281
0.0297274
0.0192405
0.0255523
0.0187792
0.0114495
0.00520394
0.000215254
-0.00355739
-0.00637003
-0.00769478
-0.00923877
-0.0136884
-0.0180231
-0.0180086
-0.0164638
-0.0171712
-0.0184507
-0.0211027
-0.0215382
-0.0178519
-0.0147128
-0.01361
-0.0136295
-0.0126423
-0.0100158
-0.00662385
-0.00329511
0.00208386
0.00797869
0.00883998
0.00569663
0.000941978
0.00616859
0.0172866
0.0344646
0.100694
0.368193
1.5582
6.7208
20.6095
42.366
76.965
119.353
165.437
212.287
257.382
299.259
338.131
372.744
401.713
424.244
440.191
448.088
447.03
441.953
428.83
408.009
381.971
349.349
310.936
270.493
226.223
178.645
132.184
86.3981
49.2413
23.214
8.44349
2.66903
0.406635
0.141254
0.125246
0.0702836
0.0148687
0.0260275
0.0329446
0.0167595
-0.0102023
-0.00591573
0.000672263
0.00352542
0.00171723
-0.00952534
-0.0168939
-0.0144378
-0.0132724
-0.0144666
-0.0157465
-0.0170222
-0.0177574
-0.0179591
-0.0177657
-0.0175605
-0.0175512
-0.0163566
-0.014894
-0.0128582
-0.0107257
-0.00902982
-0.00840379
-0.00852961
-0.00920723
-0.00910354
-0.00530546
0.000524717
0.00461795
0.00487977
0.00196606
0.00469853
0.0139291
0.0269128
0.0777828
0.311817
1.35183
5.92048
18.7271
38.2232
69.1314
107.804
149.542
192.132
232.541
270.948
305.873
336.619
362.313
382.152
395.315
401.323
399.033
391.742
376.105
353.384
323.872
288.809
249.047
204.768
159.133
109.99
67.0012
35.3017
13.2525
4.34033
0.832919
0.203368
0.153048
0.0922258
0.0414619
0.0469457
0.0449442
0.0364069
0.016113
0.0163743
0.0173977
0.0167622
0.013974
-0.0009931
-0.0164501
-0.0166817
-0.010639
-0.00613929
-0.0047706
-0.00772034
-0.0116667
-0.0124607
-0.0109775
-0.0100634
-0.0101499
-0.0119702
-0.0153643
-0.0195504
-0.0232961
-0.0270085
-0.0313813
-0.0357906
-0.0402587
-0.0462255
-0.0540413
-0.0640101
-0.0733802
-0.0803476
-0.0908595
-0.104885
-0.119009
-0.128622
-0.128294
-0.0596209
0.47326
3.1749
14.2682
32.2966
60.4085
93.674
135.216
178.543
220.68
259.03
295.743
328.892
360.939
388.479
411.085
428.637
440.368
445.692
443.728
435.15
419.405
396.248
367.483
332.149
291.263
246.978
201.136
147.508
95.4115
48.9685
22.9987
7.00332
2.74681
1.67533
1.53463
1.42419
1.36395
1.28984
1.22783
1.15698
1.09846
1.02279
0.94576
0.901675
0.838698
0.752979
-1.06195
-1.22205
-1.29675
-1.33289
-1.33063
-1.34752
-1.44251
-1.44426
-1.45132
-1.55461
-1.54666
-1.59369
-1.5691
-1.19201
7.16666
28.5703
61.67
93.6968
140.822
193.01
230.741
277.921
316.528
348.426
373.842
392.322
403.079
405.386
402.755
391.816
373.584
348.997
317.754
281.174
240.269
195.936
148.919
100.727
56.7723
26.8665
8.78819
2.37063
0.475776
0.288151
0.189582
0.128333
0.0959894
0.05842
0.0413408
0.0185873
-0.00402218
-0.0229354
-0.0287408
-0.0438635
-0.0570284
-0.0685404
-0.0782066
-0.0863301
-0.0924006
-0.0963069
-0.0998593
-0.103958
-0.107532
-0.110689
-0.113377
-0.114841
-0.116029
-0.116574
-0.116252
-0.115608
-0.114708
-0.113466
-0.112223
-0.111496
-0.110448
-0.109072
-0.107505
-0.105617
-0.103854
-0.101828
-0.0997937
-0.0977299
-0.0991686
-0.0950947
-0.0870464
-0.070658
-0.0128957
0.239782
1.58696
7.97147
24.101
49.2076
87.8407
130.51
175.866
218.359
258.213
294.348
325.565
351.624
371.32
383.907
388.02
385.686
376.643
359.492
335.117
304.327
267.473
225.091
177.735
127.311
79.3367
40.6824
14.349
3.98214
0.488408
0.0409631
-0.0127515
-0.0444191
-0.0467246
-0.0532305
-0.0625449
-0.0654539
-0.0726816
-0.0805335
-0.0768139
-0.0824445
-0.0890568
-0.0948332
-0.0995668
-0.103144
-0.105936
-0.107576
-0.109216
-0.112685
-0.116533
-0.117056
-0.116033
-0.116774
-0.117985
-0.120271
-0.120452
-0.116572
-0.113929
-0.113094
-0.113116
-0.112139
-0.1096
-0.106244
-0.102906
-0.0975853
-0.0920692
-0.0918274
-0.0953649
-0.100307
-0.0984348
-0.0951444
-0.0966497
-0.0965162
-0.0902933
-0.067259
0.0207712
0.571681
3.82152
16.4578
38.3326
73.3172
116.612
161.957
204.351
244.291
279.862
309.601
332.754
349.299
357.352
356.112
351.174
337.608
315.881
289.528
255.798
216.104
175.325
130.411
84.5858
48.7528
21.364
6.91066
1.57485
0.160562
0.0790721
0.00894786
-0.0528935
-0.0495317
-0.0565953
-0.0893527
-0.0810561
-0.0729203
-0.0852279
-0.106978
-0.105063
-0.0993596
-0.0967257
-0.0988257
-0.108447
-0.114959
-0.113479
-0.112649
-0.113708
-0.11503
-0.116269
-0.11687
-0.116833
-0.116721
-0.116584
-0.116472
-0.1154
-0.11389
-0.111919
-0.109883
-0.108305
-0.10772
-0.107756
-0.108436
-0.107885
-0.10438
-0.0993844
-0.0954929
-0.0957233
-0.0988221
-0.0983376
-0.0961971
-0.0993406
-0.104589
-0.0995326
-0.0814926
-0.00770813
0.432253
2.89135
13.2522
31.9343
60.3577
97.9303
137.059
176.249
211.961
243.464
269.973
290.368
304.032
310.395
308.228
300.928
284.742
261.372
230.942
195.114
154.718
110.488
69.2349
35.1712
12.7161
3.78412
0.555726
0.121593
0.034113
-0.0304579
-0.0339889
-0.0377184
-0.0662348
-0.0608901
-0.0598983
-0.0666656
-0.0827755
-0.083748
-0.0834481
-0.0845787
-0.0879947
-0.101315
-0.114966
-0.115745
-0.110616
-0.106597
-0.105356
-0.10782
-0.110692
-0.111567
-0.110406
-0.109558
-0.109815
-0.111498
-0.114685
-0.118726
-0.122402
-0.125976
-0.130177
-0.134481
-0.13889
-0.144593
-0.151961
-0.16131
-0.169913
-0.177423
-0.188032
-0.201886
-0.2166
-0.232858
-0.253573
-0.272831
-0.288996
-0.281294
-0.147421
1.16116
8.49662
25.6438
49.2195
84.8397
125.069
163.455
200.78
234.209
267.516
295.784
318.937
337.022
349.152
354.624
352.825
344.164
328.111
304.401
275.073
238.841
196.926
151.74
106.229
53.5077
24.1022
6.28055
2.19268
1.57041
1.41226
1.36978
1.30401
1.23371
1.18658
1.12253
1.06358
0.998471
0.941458
0.871668
0.801179
0.755911
0.697477
0.62665
-1.13066
-1.25855
-1.32836
-1.36411
-1.36805
-1.3887
-1.4652
-1.47369
-1.48714
-1.56811
-1.57084
-1.60306
-1.60193
-1.60636
-1.64251
-1.14409
7.03141
30.3289
53.8641
100.268
134.357
184.405
224.011
256.784
282.84
301.839
312.841
314.905
312.427
301.173
282.458
257.266
225.175
187.723
146.087
101.119
57.5978
27.5819
8.30969
1.8752
0.406119
0.197361
0.140603
0.0827799
0.0440553
0.00596991
-0.0201072
-0.0500128
-0.06754
-0.088361
-0.109214
-0.126481
-0.133917
-0.147511
-0.159761
-0.170584
-0.179723
-0.187358
-0.193113
-0.196998
-0.200481
-0.204303
-0.207667
-0.210639
-0.213203
-0.214566
-0.215659
-0.216189
-0.21593
-0.215347
-0.214546
-0.21342
-0.21229
-0.211532
-0.210529
-0.209272
-0.207755
-0.206024
-0.204341
-0.202497
-0.200726
-0.198816
-0.200239
-0.198342
-0.195921
-0.19688
-0.19635
-0.192175
-0.167883
-0.0447868
0.757891
5.74002
21.8181
45.9518
83.7521
123.838
164.141
201.111
233.03
259.849
280.168
293.217
298.421
295.345
286.117
268.452
243.4
211.921
174.353
131.622
85.8833
46.4039
18.0598
4.78156
0.495875
-0.048071
-0.105911
-0.148724
-0.15347
-0.157874
-0.154825
-0.157806
-0.164654
-0.167761
-0.174189
-0.180655
-0.178711
-0.18356
-0.189559
-0.194958
-0.199482
-0.202977
-0.205821
-0.207624
-0.209278
-0.212236
-0.215601
-0.216353
-0.215753
-0.216397
-0.217524
-0.219437
-0.219552
-0.215962
-0.213571
-0.212855
-0.212697
-0.211698
-0.209322
-0.206085
-0.20268
-0.197476
-0.192503
-0.192367
-0.195867
-0.200032
-0.198652
-0.196162
-0.197757
-0.19945
-0.199891
-0.1997
-0.204793
-0.193535
-0.137555
0.198261
2.85836
15.1838
37.4762
71.8302
110.261
150.379
186.837
217.253
241.109
258.379
266.594
265.475
260.617
246.434
223.749
197.39
162.75
122.492
83.9787
48.9095
21.1057
6.89601
1.41081
0.0920882
-0.0588761
-0.110462
-0.133072
-0.137297
-0.163751
-0.159422
-0.162863
-0.187028
-0.181688
-0.175727
-0.186396
-0.204295
-0.203957
-0.199335
-0.197242
-0.199583
-0.207798
-0.213518
-0.212784
-0.21235
-0.213208
-0.214532
-0.215696
-0.216165
-0.216231
-0.215957
-0.215917
-0.215674
-0.214767
-0.213228
-0.211365
-0.209363
-0.207981
-0.207308
-0.207312
-0.207891
-0.207057
-0.203734
-0.199245
-0.195494
-0.195582
-0.19822
-0.198042
-0.196906
-0.200328
-0.206229
-0.207075
-0.208451
-0.214756
-0.207754
-0.165339
0.062221
1.69741
9.93853
27.2104
51.6129
84.9005
118.597
150.267
177.55
198.453
212.634
219.329
216.82
209.899
193.255
169.556
138.744
103.436
67.3627
36.3525
14.1096
4.0269
0.55679
0.040341
-0.0547552
-0.134627
-0.145647
-0.153427
-0.146962
-0.14561
-0.165874
-0.162965
-0.162484
-0.168665
-0.181841
-0.183918
-0.184446
-0.186035
-0.189913
-0.201709
-0.213854
-0.214989
-0.210659
-0.207067
-0.205886
-0.207966
-0.210349
-0.210546
-0.209659
-0.20892
-0.209435
-0.211208
-0.214106
-0.218012
-0.221499
-0.224986
-0.229021
-0.233188
-0.237543
-0.242988
-0.249986
-0.258532
-0.266786
-0.274183
-0.284471
-0.296956
-0.311151
-0.326784
-0.346921
-0.366162
-0.390732
-0.409864
-0.441752
-0.45522
-0.433456
0.221042
4.99352
20.2987
43.2866
72.8076
107.042
139.822
174.269
203.193
226.873
245.55
258.146
263.732
262.167
253.378
237.005
212.631
182.866
145.835
102.862
58.5327
30.2805
7.22947
2.15686
1.38242
1.28428
1.24326
1.18486
1.16926
1.12008
1.06252
1.01547
0.956713
0.900448
0.840121
0.784957
0.720373
0.65561
0.610356
0.556445
0.49743
-1.1943
-1.29714
-1.36134
-1.39624
-1.40492
-1.42771
-1.49038
-1.50361
-1.52146
-1.58652
-1.59312
-1.62455
-1.62531
-1.64073
-1.65418
-1.60252
-1.63983
-0.920732
8.32521
30.6325
48.0913
92.9891
132.464
165.473
192.017
211.565
222.873
224.659
222.357
210.727
191.539
165.816
132.935
94.8763
56.5828
28.579
8.60626
1.93814
0.336001
0.131651
0.0646301
-0.00160768
-0.0102287
-0.0460494
-0.0731584
-0.106591
-0.131251
-0.158105
-0.176055
-0.195289
-0.214497
-0.230448
-0.238741
-0.251118
-0.262506
-0.272652
-0.281269
-0.288446
-0.293907
-0.297719
-0.301109
-0.304669
-0.307825
-0.310607
-0.313042
-0.31432
-0.315334
-0.31584
-0.315645
-0.315124
-0.314399
-0.313386
-0.31237
-0.311638
-0.310704
-0.309568
-0.308115
-0.306528
-0.304945
-0.303214
-0.301643
-0.299909
-0.300913
-0.299392
-0.297481
-0.298463
-0.299423
-0.3021
-0.306974
-0.310027
-0.298378
-0.216981
0.45178
4.84566
20.4747
42.6138
74.9222
109.086
140.694
168.211
189.098
202.573
207.756
204.567
195.557
177.564
152.221
120.685
84.8062
50.6773
22.1531
6.3511
0.870486
-0.0973636
-0.190733
-0.25481
-0.258553
-0.265467
-0.262306
-0.261964
-0.258718
-0.260925
-0.266479
-0.269692
-0.275516
-0.281081
-0.280579
-0.285009
-0.290479
-0.295522
-0.299816
-0.303169
-0.305888
-0.30772
-0.309362
-0.312044
-0.315202
-0.315865
-0.315555
-0.316102
-0.31716
-0.318808
-0.318807
-0.315728
-0.313476
-0.31281
-0.312527
-0.311528
-0.309297
-0.306232
-0.302834
-0.297964
-0.293708
-0.293438
-0.296577
-0.300092
-0.299077
-0.296931
-0.297872
-0.29937
-0.300293
-0.301465
-0.308255
-0.310065
-0.312267
-0.320581
-0.277313
0.0306619
2.70537
15.0304
34.251
63.4499
96.1058
125.254
149.473
167.52
175.627
173.725
169.968
155.434
132.268
106.974
74.8444
44.4832
21.1641
7.26202
1.48128
0.0273334
-0.137323
-0.228106
-0.264092
-0.253598
-0.250493
-0.247854
-0.264598
-0.262275
-0.266053
-0.28481
-0.282034
-0.278402
-0.287784
-0.302569
-0.303343
-0.299818
-0.298192
-0.30053
-0.307511
-0.3125
-0.312338
-0.312198
-0.312955
-0.314222
-0.315311
-0.315948
-0.316074
-0.315515
-0.315491
-0.315174
-0.31437
-0.312936
-0.311158
-0.309256
-0.308065
-0.307339
-0.307327
-0.307698
-0.306723
-0.303664
-0.299475
-0.296194
-0.296028
-0.298069
-0.298214
-0.29746
-0.300603
-0.305666
-0.307214
-0.309816
-0.317549
-0.320795
-0.323873
-0.33427
-0.307149
-0.14702
0.968774
6.88313
21.3479
40.1049
63.9333
88.0997
107.624
121.646
128.463
126.543
120.289
103.708
81.5806
56.3697
32.8211
13.8156
4.421
0.695661
0.00598558
-0.151656
-0.251342
-0.255338
-0.26289
-0.258732
-0.257824
-0.250904
-0.249945
-0.265603
-0.264822
-0.265271
-0.271067
-0.281893
-0.284607
-0.285727
-0.287631
-0.2917
-0.302086
-0.312692
-0.314075
-0.310583
-0.307436
-0.306363
-0.308187
-0.310294
-0.309839
-0.309197
-0.308532
-0.30916
-0.310981
-0.313764
-0.317404
-0.320745
-0.324088
-0.327916
-0.331865
-0.336091
-0.341314
-0.347914
-0.355817
-0.363597
-0.370946
-0.38079
-0.392564
-0.405769
-0.420814
-0.439097
-0.458354
-0.479846
-0.501495
-0.531016
-0.564712
-0.598103
-0.605343
-0.605728
-0.321858
2.69792
14.6692
32.5791
53.4832
83.8928
111.495
135.216
154.368
167.37
172.902
171.767
162.845
146.209
121.141
90.945
55.5885
28.2487
9.53974
2.38426
1.07693
1.04158
1.03933
1.03557
1.03453
0.999344
0.98705
0.943091
0.891868
0.845689
0.791273
0.737793
0.681648
0.628704
0.568803
0.50923
0.464877
0.415356
0.365797
-1.25385
-1.33709
-1.39545
-1.4292
-1.44132
-1.46505
-1.51724
-1.53348
-1.55391
-1.6074
-1.61726
-1.64598
-1.64593
-1.6639
-1.66981
-1.64288
-1.65252
-1.58115
-1.56471
-0.834616
8.51395
26.4269
50.3639
77.6615
102.229
121.855
133.416
134.774
132.617
120.628
101.092
75.6381
48.3299
24.7605
8.3577
1.9217
0.212779
0.0339816
-0.0191293
-0.078647
-0.0926103
-0.131051
-0.133898
-0.163486
-0.187695
-0.218287
-0.241803
-0.266386
-0.284175
-0.302138
-0.31986
-0.334479
-0.34326
-0.354639
-0.365229
-0.374722
-0.382825
-0.389558
-0.394727
-0.398441
-0.401717
-0.405038
-0.407988
-0.410586
-0.412909
-0.414088
-0.415042
-0.415504
-0.415358
-0.414892
-0.414238
-0.413331
-0.412415
-0.411718
-0.410857
-0.409842
-0.408482
-0.407055
-0.405605
-0.404068
-0.402692
-0.401196
-0.401845
-0.400461
-0.398915
-0.399748
-0.40083
-0.403857
-0.408836
-0.414904
-0.421798
-0.433647
-0.429768
-0.363331
0.256958
4.07084
17.035
34.6814
56.7999
80.6291
99.8573
112.749
117.692
115.79
107.065
89.5504
67.065
43.9827
21.9942
7.65286
1.50863
-0.085743
-0.29679
-0.379522
-0.377703
-0.378243
-0.370602
-0.370229
-0.365736
-0.364493
-0.361788
-0.363603
-0.368528
-0.371982
-0.377326
-0.382184
-0.382619
-0.386627
-0.391589
-0.396261
-0.400286
-0.403471
-0.40604
-0.407856
-0.409477
-0.411939
-0.414658
-0.415436
-0.415357
-0.415858
-0.416812
-0.418209
-0.418094
-0.415482
-0.413453
-0.412788
-0.412419
-0.41142
-0.409329
-0.406465
-0.40319
-0.398737
-0.395123
-0.394947
-0.397702
-0.400682
-0.39968
-0.39792
-0.398417
-0.399635
-0.400491
-0.401734
-0.407735
-0.410578
-0.415742
-0.430972
-0.43939
-0.445858
-0.399145
-0.0736694
2.06616
12.2101
28.2606
45.9073
64.6185
80.7652
87.2742
87.3267
83.4443
70.1314
51.9361
35.4437
17.3043
6.33027
1.43006
0.0301556
-0.21338
-0.342776
-0.386978
-0.381766
-0.379713
-0.363375
-0.355294
-0.352252
-0.36485
-0.364733
-0.369162
-0.384065
-0.383074
-0.381146
-0.389327
-0.401545
-0.403035
-0.40044
-0.399258
-0.401503
-0.407419
-0.411771
-0.412033
-0.412092
-0.412818
-0.413989
-0.415011
-0.415687
-0.415697
-0.415205
-0.415177
-0.414843
-0.414066
-0.412764
-0.411102
-0.409377
-0.408258
-0.407563
-0.407532
-0.407737
-0.406669
-0.404003
-0.400254
-0.397361
-0.397129
-0.398597
-0.398792
-0.398255
-0.401222
-0.405571
-0.407182
-0.410014
-0.416755
-0.420843
-0.426595
-0.441761
-0.448441
-0.45705
-0.447328
-0.337389
0.309797
3.56431
12.4918
24.1074
34.7873
43.8713
49.1318
48.6063
44.137
33.4022
20.9148
9.89043
3.73269
0.70294
-0.0345924
-0.267427
-0.389929
-0.386749
-0.389609
-0.373766
-0.368562
-0.361551
-0.359424
-0.354207
-0.354132
-0.366416
-0.367041
-0.368212
-0.373567
-0.382584
-0.385631
-0.387157
-0.389275
-0.393381
-0.402526
-0.411681
-0.413257
-0.410508
-0.407792
-0.406819
-0.408403
-0.410095
-0.409636
-0.408962
-0.40838
-0.409091
-0.410921
-0.413562
-0.417016
-0.420096
-0.423262
-0.426874
-0.430623
-0.434677
-0.439665
-0.445846
-0.453154
-0.460437
-0.467587
-0.476932
-0.487964
-0.500413
-0.514741
-0.531912
-0.550162
-0.570059
-0.591112
-0.618779
-0.648803
-0.682954
-0.696516
-0.729839
-0.755173
-0.744786
-0.670463
0.381503
7.31587
20.7839
35.1279
50.2708
66.0641
77.7358
83.2659
81.9599
73.1684
57.8856
40.5095
23.1431
8.07137
2.12578
0.867414
0.706207
0.71811
0.773952
0.821026
0.845045
0.847749
0.820096
0.80654
0.766562
0.720401
0.676032
0.625731
0.575156
0.522888
0.472514
0.417
0.362177
0.319371
0.274051
0.23213
-1.31009
-1.37788
-1.43048
-1.46285
-1.47731
-1.50116
-1.54531
-1.56329
-1.5849
-1.6297
-1.64159
-1.66791
-1.66673
-1.68639
-1.6845
-1.66287
-1.66827
-1.59904
-1.58478
-1.49967
-1.36179
-1.12073
3.61171
17.5306
30.2718
40.9905
47.9504
50.2716
47.9981
41.3914
29.9344
15.3004
5.46594
1.16048
-0.0333578
-0.129034
-0.145066
-0.188899
-0.18391
-0.213072
-0.219632
-0.248188
-0.254024
-0.279776
-0.302088
-0.330054
-0.352387
-0.374669
-0.392014
-0.408886
-0.425268
-0.438677
-0.447673
-0.458184
-0.468011
-0.476859
-0.484442
-0.490733
-0.495602
-0.499187
-0.502324
-0.50542
-0.508159
-0.510575
-0.512718
-0.513857
-0.51476
-0.515203
-0.515075
-0.514668
-0.514087
-0.513284
-0.512465
-0.511803
-0.51102
-0.510119
-0.508847
-0.507568
-0.506242
-0.504871
-0.503637
-0.502325
-0.5028
-0.501689
-0.500571
-0.501479
-0.502503
-0.505159
-0.509538
-0.515788
-0.523743
-0.536249
-0.548386
-0.565845
-0.567813
-0.508696
-0.0589839
2.2378
9.44821
20.3896
30.7541
38.7009
42.267
41.363
35.5501
25.0818
13.5875
5.87271
1.3996
-0.152836
-0.391161
-0.494677
-0.521189
-0.515755
-0.49477
-0.484358
-0.474406
-0.472325
-0.468332
-0.467011
-0.465036
-0.466757
-0.471022
-0.474459
-0.479301
-0.483579
-0.484634
-0.48828
-0.49277
-0.497079
-0.500824
-0.503832
-0.506251
-0.508023
-0.509611
-0.511884
-0.514305
-0.515072
-0.515132
-0.515624
-0.51649
-0.517662
-0.517485
-0.515251
-0.513494
-0.512785
-0.512352
-0.511387
-0.50942
-0.506797
-0.503699
-0.499657
-0.496537
-0.49644
-0.498819
-0.501349
-0.500643
-0.499363
-0.499652
-0.500427
-0.501132
-0.502463
-0.507646
-0.510519
-0.51637
-0.530436
-0.541314
-0.555987
-0.565804
-0.570116
-0.532149
-0.266137
1.14622
5.32039
12.5187
20.7179
23.6961
23.1963
21.4147
14.9573
8.22747
3.87377
0.929269
-0.0641416
-0.358205
-0.484571
-0.523482
-0.512798
-0.507911
-0.49219
-0.48171
-0.466374
-0.458734
-0.456496
-0.466252
-0.467549
-0.472229
-0.484192
-0.484441
-0.483771
-0.490891
-0.501036
-0.502916
-0.501091
-0.500307
-0.502418
-0.507453
-0.511246
-0.511802
-0.51202
-0.512712
-0.513791
-0.514745
-0.515485
-0.515468
-0.514959
-0.514923
-0.514582
-0.513829
-0.512638
-0.511098
-0.509565
-0.508502
-0.50788
-0.50779
-0.507858
-0.506787
-0.50443
-0.501137
-0.49855
-0.498376
-0.499398
-0.499837
-0.499776
-0.502246
-0.505921
-0.507562
-0.510547
-0.516298
-0.520162
-0.526596
-0.540329
-0.548813
-0.562812
-0.578142
-0.588199
-0.588353
-0.532622
-0.268743
0.572136
2.31277
4.64244
6.63709
6.42411
5.47256
3.29865
1.12559
0.0345374
-0.241687
-0.412984
-0.522027
-0.545837
-0.546838
-0.511211
-0.496089
-0.477565
-0.470552
-0.464053
-0.461776
-0.457854
-0.458313
-0.468028
-0.469498
-0.47117
-0.476073
-0.483669
-0.48685
-0.488653
-0.490909
-0.494953
-0.502997
-0.510873
-0.512571
-0.510434
-0.508134
-0.507282
-0.508611
-0.510021
-0.50968
-0.508943
-0.508455
-0.5092
-0.510924
-0.513371
-0.516556
-0.519451
-0.522438
-0.525826
-0.529366
-0.533242
-0.537972
-0.543777
-0.550538
-0.55739
-0.564283
-0.573106
-0.583429
-0.595106
-0.608618
-0.624602
-0.641822
-0.660592
-0.680976
-0.70621
-0.733513
-0.765218
-0.780534
-0.811399
-0.832939
-0.848524
-0.873484
-0.874444
-0.858364
-0.80586
-0.0124298
3.8719
10.9893
16.5445
19.5644
18.7645
13.8954
7.38812
3.33306
0.960542
0.287623
0.299604
0.423311
0.457185
0.512455
0.584846
0.633681
0.659641
0.663315
0.64142
0.626868
0.590464
0.548635
0.506569
0.460008
0.412496
0.363893
0.31632
0.264973
0.214559
0.17376
0.132428
0.0967381
-1.36362
-1.41916
-1.46626
-1.49702
-1.51296
-1.53638
-1.57425
-1.59302
-1.61486
-1.6517
-1.66592
-1.69008
-1.68882
-1.70503
-1.70094
-1.68719
-1.68684
-1.63036
-1.60758
-1.52516
-1.43674
-1.4427
-1.35567
-1.21836
-1.08922
-0.539738
0.70717
1.54736
2.48229
2.53702
1.31945
-0.213971
-0.337914
-0.374511
-0.347936
-0.334082
-0.308368
-0.324365
-0.314961
-0.333976
-0.341781
-0.364451
-0.372946
-0.395774
-0.41642
-0.441932
-0.463027
-0.483224
-0.499901
-0.515664
-0.530755
-0.543091
-0.552011
-0.561727
-0.570821
-0.579034
-0.586098
-0.591954
-0.596523
-0.599951
-0.602934
-0.605813
-0.60835
-0.610576
-0.612478
-0.613634
-0.614477
-0.614928
-0.614816
-0.614468
-0.613953
-0.613235
-0.61251
-0.611884
-0.611177
-0.610392
-0.609212
-0.608058
-0.606861
-0.605641
-0.604531
-0.60342
-0.603698
-0.602787
-0.601996
-0.602828
-0.603919
-0.60668
-0.611064
-0.616762
-0.624236
-0.635235
-0.648708
-0.667284
-0.684096
-0.703246
-0.709445
-0.673151
-0.477281
0.188551
1.63268
3.45441
4.57248
4.3788
3.26046
1.37021
-0.0550557
-0.449833
-0.556168
-0.650667
-0.687161
-0.664071
-0.64178
-0.62137
-0.597944
-0.586188
-0.577213
-0.574708
-0.571214
-0.569907
-0.568411
-0.569999
-0.573684
-0.576992
-0.581355
-0.585157
-0.586607
-0.589935
-0.594
-0.597961
-0.601424
-0.604248
-0.606514
-0.608221
-0.609764
-0.611851
-0.614047
-0.614788
-0.614915
-0.615385
-0.616192
-0.617144
-0.61693
-0.615029
-0.61347
-0.612787
-0.612287
-0.611361
-0.609522
-0.607153
-0.604256
-0.600642
-0.597944
-0.597797
-0.599961
-0.602015
-0.601614
-0.600622
-0.600871
-0.601615
-0.60252
-0.604088
-0.608201
-0.611071
-0.617228
-0.629855
-0.640575
-0.654916
-0.666275
-0.682168
-0.698442
-0.708807
-0.681519
-0.536349
-0.23147
0.551218
0.927216
0.860672
0.510854
0.0254141
-0.313821
-0.475068
-0.554592
-0.638809
-0.677662
-0.6723
-0.65395
-0.625201
-0.609109
-0.593236
-0.582674
-0.56958
-0.562651
-0.560872
-0.568449
-0.570527
-0.575197
-0.584916
-0.58598
-0.58623
-0.592444
-0.600909
-0.602969
-0.601775
-0.601315
-0.603284
-0.607582
-0.610882
-0.611637
-0.611969
-0.612629
-0.613615
-0.614511
-0.615428
-0.615187
-0.614732
-0.614652
-0.614326
-0.613613
-0.61253
-0.611111
-0.609731
-0.608769
-0.608175
-0.608056
-0.607978
-0.606993
-0.604855
-0.60197
-0.599748
-0.599452
-0.600287
-0.600855
-0.601106
-0.603401
-0.606675
-0.608617
-0.611564
-0.616426
-0.620037
-0.626831
-0.63871
-0.647651
-0.660934
-0.676785
-0.690805
-0.707812
-0.723512
-0.736947
-0.742939
-0.746308
-0.739027
-0.748064
-0.712187
-0.705014
-0.62113
-0.642541
-0.677098
-0.701873
-0.707628
-0.695454
-0.671722
-0.652211
-0.61449
-0.596864
-0.580461
-0.57319
-0.567127
-0.56474
-0.56166
-0.562419
-0.570157
-0.572107
-0.574096
-0.578562
-0.585028
-0.588212
-0.590187
-0.592513
-0.596418
-0.603491
-0.61028
-0.612012
-0.610379
-0.608452
-0.607709
-0.608839
-0.610039
-0.609726
-0.609052
-0.608646
-0.609361
-0.610959
-0.613213
-0.616136
-0.618827
-0.621625
-0.624797
-0.628127
-0.631808
-0.636272
-0.641669
-0.64792
-0.654313
-0.660915
-0.669198
-0.678872
-0.689814
-0.702511
-0.717407
-0.733513
-0.751024
-0.77049
-0.793574
-0.819148
-0.847738
-0.863839
-0.890244
-0.910694
-0.924171
-0.950335
-0.952061
-0.96032
-0.988055
-0.946572
-0.89746
-0.867981
-0.800408
-0.572527
-0.385113
-0.452341
-0.344408
-0.301894
-0.212363
-0.040079
0.0734528
0.212328
0.275947
0.336223
0.404953
0.451969
0.474412
0.4802
0.462702
0.447786
0.414693
0.37668
0.33719
0.294149
0.249794
0.204709
0.160098
0.112734
0.0664585
0.027988
-0.00957358
-0.0401257
-1.41493
-1.46068
-1.50262
-1.53155
-1.54833
-1.57092
-1.60379
-1.62269
-1.64413
-1.6744
-1.69024
-1.71212
-1.7121
-1.72441
-1.72165
-1.71133
-1.70674
-1.66038
-1.62855
-1.56002
-1.48072
-1.4825
-1.39667
-1.28162
-1.21381
-1.10534
-1.00182
-0.930929
-0.820969
-0.71655
-0.674411
-0.620225
-0.552215
-0.534151
-0.491709
-0.467218
-0.439458
-0.44555
-0.439345
-0.453265
-0.462618
-0.481304
-0.491347
-0.511634
-0.530682
-0.553877
-0.573639
-0.591993
-0.607776
-0.622441
-0.636299
-0.647652
-0.656306
-0.665276
-0.673661
-0.681248
-0.687793
-0.69322
-0.697483
-0.700732
-0.703545
-0.706214
-0.708556
-0.71059
-0.712249
-0.713422
-0.714213
-0.714656
-0.714592
-0.714286
-0.713844
-0.713198
-0.712555
-0.711975
-0.711318
-0.710626
-0.709557
-0.708539
-0.707472
-0.706383
-0.705399
-0.704507
-0.704646
-0.703914
-0.703403
-0.704176
-0.705281
-0.707989
-0.712014
-0.717485
-0.724819
-0.735177
-0.747773
-0.764117
-0.781267
-0.80185
-0.820034
-0.837021
-0.852025
-0.864467
-0.873564
-0.876395
-0.873763
-0.867232
-0.830706
-0.808037
-0.81971
-0.835071
-0.836525
-0.820087
-0.80791
-0.771947
-0.742208
-0.720329
-0.699529
-0.688455
-0.680286
-0.67742
-0.674253
-0.672954
-0.671797
-0.673233
-0.676429
-0.679552
-0.683475
-0.686871
-0.688549
-0.691596
-0.69527
-0.698886
-0.702074
-0.704707
-0.706816
-0.708441
-0.709927
-0.711833
-0.713771
-0.7145
-0.714708
-0.715145
-0.715877
-0.71665
-0.716405
-0.714804
-0.713431
-0.712754
-0.712242
-0.71133
-0.70969
-0.707542
-0.704894
-0.701707
-0.69947
-0.69921
-0.701091
-0.702765
-0.702574
-0.70183
-0.701957
-0.702738
-0.703556
-0.705293
-0.708966
-0.71221
-0.718479
-0.729399
-0.739828
-0.752888
-0.765115
-0.781444
-0.799952
-0.818083
-0.837778
-0.848595
-0.848398
-0.86293
-0.855728
-0.829433
-0.8443
-0.83743
-0.827557
-0.8317
-0.837444
-0.820305
-0.805778
-0.780908
-0.753647
-0.724845
-0.70865
-0.694677
-0.684501
-0.673047
-0.666671
-0.665183
-0.67112
-0.673581
-0.678087
-0.686071
-0.687654
-0.68854
-0.693969
-0.701068
-0.703192
-0.702482
-0.702287
-0.704107
-0.707771
-0.710651
-0.711526
-0.711932
-0.712565
-0.713451
-0.714273
-0.71486
-0.714837
-0.7145
-0.714399
-0.714087
-0.713434
-0.712438
-0.711161
-0.709923
-0.709049
-0.7085
-0.708338
-0.708199
-0.707254
-0.705386
-0.702853
-0.70098
-0.700584
-0.701268
-0.701876
-0.702226
-0.704494
-0.707182
-0.709378
-0.712119
-0.716688
-0.720464
-0.72704
-0.73744
-0.74662
-0.758736
-0.774508
-0.789096
-0.80549
-0.821164
-0.834222
-0.842324
-0.849256
-0.852106
-0.853207
-0.853143
-0.851634
-0.863907
-0.863731
-0.857766
-0.845561
-0.829036
-0.801534
-0.770464
-0.748295
-0.715736
-0.698502
-0.683634
-0.676107
-0.670427
-0.668002
-0.66553
-0.666422
-0.672641
-0.67483
-0.67699
-0.681044
-0.686588
-0.689688
-0.691749
-0.694087
-0.697793
-0.704008
-0.709871
-0.711573
-0.710356
-0.708754
-0.708114
-0.709073
-0.710105
-0.709794
-0.709207
-0.708877
-0.709555
-0.711012
-0.713069
-0.715736
-0.718233
-0.720844
-0.723794
-0.72691
-0.730385
-0.73456
-0.739575
-0.745339
-0.751289
-0.757547
-0.765285
-0.774268
-0.784466
-0.796325
-0.810145
-0.825122
-0.84149
-0.859976
-0.88109
-0.904511
-0.930639
-0.946594
-0.970439
-0.988729
-1.00201
-1.02576
-1.02805
-1.0358
-1.05889
-1.02106
-0.980621
-0.964639
-0.936744
-0.888887
-0.79673
-0.652592
-0.519531
-0.458973
-0.364404
-0.20387
-0.0886906
0.0403962
0.105498
0.164959
0.226555
0.271653
0.291934
0.297963
0.283926
0.269177
0.239189
0.204626
0.167865
0.128189
0.0870347
0.0453658
0.0038246
-0.0397052
-0.0820571
-0.117981
-0.151987
-0.178253
-1.46441
-1.50227
-1.53945
-1.56639
-1.58347
-1.60497
-1.63377
-1.65232
-1.67292
-1.69859
-1.71451
-1.73413
-1.7348
-1.74598
-1.74384
-1.73514
-1.728
-1.6887
-1.65469
-1.5953
-1.52569
-1.51652
-1.43939
-1.34052
-1.27503
-1.17388
-1.0803
-1.0097
-0.913669
-0.827452
-0.788824
-0.732259
-0.674763
-0.652132
-0.612595
-0.587392
-0.564072
-0.56515
-0.562412
-0.57303
-0.582933
-0.598589
-0.609283
-0.62736
-0.644894
-0.665888
-0.684203
-0.70091
-0.715662
-0.729227
-0.741901
-0.752325
-0.760578
-0.768831
-0.776527
-0.783497
-0.789525
-0.794525
-0.798479
-0.801531
-0.80416
-0.806623
-0.808773
-0.810617
-0.812062
-0.813221
-0.813974
-0.814386
-0.814375
-0.814095
-0.813732
-0.813146
-0.812601
-0.812089
-0.811466
-0.81084
-0.80987
-0.808999
-0.808126
-0.807128
-0.806308
-0.805605
-0.805722
-0.805171
-0.804846
-0.805683
-0.806823
-0.809439
-0.813226
-0.818419
-0.825286
-0.834698
-0.846507
-0.861547
-0.877686
-0.895803
-0.913444
-0.929917
-0.944709
-0.957235
-0.96604
-0.969079
-0.966638
-0.962755
-0.966958
-0.965445
-0.963988
-0.958163
-0.947238
-0.921636
-0.901316
-0.867484
-0.840046
-0.820063
-0.801567
-0.790854
-0.783295
-0.780196
-0.777335
-0.776051
-0.775164
-0.776435
-0.779224
-0.782124
-0.785637
-0.788683
-0.790467
-0.79325
-0.796564
-0.799845
-0.802761
-0.805194
-0.807148
-0.808677
-0.810089
-0.811828
-0.813578
-0.814239
-0.8145
-0.814907
-0.815559
-0.816199
-0.815934
-0.814578
-0.813396
-0.812743
-0.812231
-0.811367
-0.809898
-0.807959
-0.80558
-0.802806
-0.800931
-0.800784
-0.802338
-0.803784
-0.803695
-0.803151
-0.803282
-0.804029
-0.804886
-0.806492
-0.809845
-0.81299
-0.819143
-0.82872
-0.839133
-0.850819
-0.862724
-0.878463
-0.89617
-0.913595
-0.932423
-0.94471
-0.951197
-0.964971
-0.966565
-0.959113
-0.956054
-0.964387
-0.959146
-0.951067
-0.94683
-0.925528
-0.901829
-0.875632
-0.850113
-0.824732
-0.809223
-0.79636
-0.786538
-0.776459
-0.770667
-0.769378
-0.774052
-0.776667
-0.780898
-0.787523
-0.789421
-0.79071
-0.795461
-0.801445
-0.803533
-0.8032
-0.803216
-0.804876
-0.808004
-0.810524
-0.811451
-0.81191
-0.812511
-0.81331
-0.814056
-0.814604
-0.814598
-0.8143
-0.81419
-0.813884
-0.813296
-0.812383
-0.811246
-0.810149
-0.80936
-0.808878
-0.808699
-0.808537
-0.80767
-0.806047
-0.803876
-0.802267
-0.801967
-0.802521
-0.803104
-0.803629
-0.805732
-0.808108
-0.810344
-0.812849
-0.816951
-0.820614
-0.82686
-0.836275
-0.845104
-0.856519
-0.871174
-0.885732
-0.90121
-0.916622
-0.928909
-0.937675
-0.945009
-0.949296
-0.950511
-0.949827
-0.95164
-0.964418
-0.966466
-0.959234
-0.943641
-0.923124
-0.895802
-0.866909
-0.845346
-0.816998
-0.800186
-0.786546
-0.779099
-0.773808
-0.771401
-0.769393
-0.770328
-0.77536
-0.777627
-0.77985
-0.783517
-0.788298
-0.791249
-0.793326
-0.795626
-0.799097
-0.80455
-0.809612
-0.811239
-0.810357
-0.809038
-0.8085
-0.809311
-0.810174
-0.809879
-0.809373
-0.809102
-0.809735
-0.811059
-0.812926
-0.815307
-0.81764
-0.820062
-0.822794
-0.825697
-0.828952
-0.832845
-0.837468
-0.842764
-0.848277
-0.854167
-0.861352
-0.869671
-0.87914
-0.890133
-0.902888
-0.916752
-0.931916
-0.949279
-0.968605
-0.990001
-1.01371
-1.02939
-1.0506
-1.06745
-1.08014
-1.10184
-1.10386
-1.11044
-1.1277
-1.09639
-1.06102
-1.04472
-1.0174
-0.970817
-0.883916
-0.755675
-0.641335
-0.579537
-0.490841
-0.34907
-0.240439
-0.123131
-0.0621617
-0.0079377
0.0502552
0.0922874
0.111789
0.116586
0.105212
0.0909796
0.0638989
0.0325188
-0.00142789
-0.0378497
-0.0757873
-0.114115
-0.152516
-0.192332
-0.230933
-0.26417
-0.294821
-0.31747
-1.51236
-1.54382
-1.57663
-1.6015
-1.61841
-1.63865
-1.66405
-1.68189
-1.70141
-1.72358
-1.73886
-1.75627
-1.75746
-1.76732
-1.76574
-1.75914
-1.75047
-1.71675
-1.68287
-1.63106
-1.56937
-1.55459
-1.48385
-1.39657
-1.33304
-1.2421
-1.15762
-1.09072
-1.00587
-0.929123
-0.891572
-0.839747
-0.789127
-0.764577
-0.729909
-0.705673
-0.687339
-0.685667
-0.684746
-0.692958
-0.70271
-0.71608
-0.726876
-0.742985
-0.75904
-0.777948
-0.79475
-0.809931
-0.823568
-0.836028
-0.847557
-0.857086
-0.86484
-0.872394
-0.879417
-0.885777
-0.89129
-0.895867
-0.899508
-0.902344
-0.90478
-0.907038
-0.909001
-0.910657
-0.911912
-0.913035
-0.913755
-0.914126
-0.914145
-0.913907
-0.913579
-0.913059
-0.912612
-0.912174
-0.911612
-0.911034
-0.910214
-0.909462
-0.908741
-0.907912
-0.907255
-0.906726
-0.906861
-0.906493
-0.906316
-0.907234
-0.908443
-0.910946
-0.914563
-0.919453
-0.925916
-0.934549
-0.945483
-0.959071
-0.97393
-0.990487
-1.00674
-1.02195
-1.03562
-1.04761
-1.05593
-1.05903
-1.05746
-1.05437
-1.05771
-1.05858
-1.05675
-1.04956
-1.03678
-1.01285
-0.992631
-0.963428
-0.938692
-0.919994
-0.903261
-0.89311
-0.886179
-0.883019
-0.880425
-0.879196
-0.878503
-0.879627
-0.882054
-0.884712
-0.887836
-0.890569
-0.892371
-0.894897
-0.897872
-0.900833
-0.903481
-0.905705
-0.907503
-0.908928
-0.91025
-0.911829
-0.913395
-0.914
-0.914283
-0.914659
-0.915241
-0.915769
-0.915499
-0.914356
-0.913327
-0.912732
-0.912222
-0.911439
-0.910106
-0.908389
-0.906256
-0.903867
-0.902287
-0.902232
-0.903557
-0.904846
-0.904915
-0.904582
-0.904786
-0.905494
-0.906357
-0.90789
-0.910987
-0.914161
-0.92
-0.928709
-0.938344
-0.949357
-0.960384
-0.975253
-0.991328
-1.00751
-1.02504
-1.037
-1.04466
-1.0569
-1.05742
-1.05426
-1.05187
-1.05598
-1.05479
-1.04454
-1.03725
-1.01768
-0.994771
-0.970719
-0.94739
-0.92462
-0.909768
-0.897919
-0.888687
-0.879823
-0.874618
-0.873469
-0.877171
-0.879771
-0.883672
-0.889216
-0.891252
-0.892787
-0.896945
-0.901994
-0.903988
-0.90394
-0.904103
-0.905606
-0.908283
-0.910478
-0.911412
-0.911899
-0.912464
-0.913182
-0.913862
-0.914631
-0.91439
-0.914107
-0.913988
-0.913685
-0.913153
-0.912329
-0.911325
-0.910351
-0.909656
-0.909223
-0.909061
-0.908871
-0.908114
-0.906703
-0.904864
-0.903508
-0.903276
-0.90381
-0.904409
-0.905149
-0.907087
-0.909258
-0.911414
-0.913789
-0.91748
-0.921158
-0.927074
-0.935572
-0.943985
-0.95464
-0.967873
-0.981741
-0.996099
-1.01037
-1.02185
-1.03055
-1.03752
-1.04172
-1.04298
-1.0415
-1.04595
-1.05609
-1.05842
-1.05068
-1.03517
-1.01508
-0.989863
-0.963422
-0.942562
-0.917598
-0.901684
-0.889277
-0.88213
-0.877237
-0.874909
-0.873242
-0.874156
-0.87825
-0.880484
-0.882678
-0.88598
-0.890115
-0.89288
-0.894916
-0.897134
-0.900341
-0.905114
-0.90948
-0.911006
-0.910392
-0.909319
-0.908866
-0.909554
-0.910256
-0.910002
-0.909556
-0.909338
-0.909921
-0.911118
-0.912798
-0.914941
-0.917078
-0.919306
-0.921817
-0.924498
-0.927526
-0.931112
-0.935355
-0.940198
-0.945273
-0.950764
-0.957385
-0.965043
-0.973773
-0.983901
-0.995613
-1.00835
-1.02235
-1.0385
-1.0561
-1.07557
-1.09708
-1.1121
-1.131
-1.14633
-1.15838
-1.17811
-1.18017
-1.18582
-1.19856
-1.1716
-1.14035
-1.12369
-1.09709
-1.05267
-0.974785
-0.862233
-0.76023
-0.698891
-0.615329
-0.491194
-0.391329
-0.286141
-0.227573
-0.178836
-0.124354
-0.0881151
-0.0680566
-0.0641274
-0.0733845
-0.0868539
-0.111211
-0.139607
-0.170702
-0.203951
-0.238675
-0.273715
-0.308932
-0.345134
-0.380125
-0.410589
-0.438072
-0.457628
-1.55905
-1.58525
-1.61406
-1.63683
-1.65321
-1.67205
-1.69453
-1.71142
-1.72954
-1.74901
-1.76362
-1.77867
-1.78053
-1.78867
-1.78858
-1.78308
-1.77395
-1.74473
-1.71236
-1.66665
-1.61207
-1.59336
-1.52965
-1.4536
-1.39316
-1.31108
-1.23521
-1.17246
-1.09729
-1.02984
-0.993152
-0.946496
-0.902107
-0.877564
-0.847851
-0.824278
-0.809683
-0.806267
-0.806375
-0.812938
-0.822177
-0.833717
-0.844205
-0.858529
-0.873122
-0.890045
-0.905305
-0.919033
-0.9315
-0.942849
-0.953265
-0.961918
-0.969101
-0.975966
-0.982327
-0.988085
-0.993085
-0.997241
-1.00056
-1.00317
-1.00541
-1.00746
-1.00924
-1.01071
-1.01179
-1.01286
-1.01354
-1.01388
-1.01393
-1.01373
-1.01342
-1.01298
-1.0126
-1.01223
-1.01176
-1.0112
-1.01061
-1.01
-1.00927
-1.00874
-1.00821
-1.00784
-1.00804
-1.00783
-1.0078
-1.00872
-1.01
-1.0124
-1.01581
-1.02044
-1.02646
-1.03439
-1.04447
-1.05659
-1.07013
-1.08496
-1.09955
-1.11343
-1.12591
-1.13679
-1.14436
-1.14732
-1.1461
-1.14348
-1.14616
-1.14681
-1.14445
-1.13704
-1.1248
-1.10405
-1.08505
-1.05937
-1.03689
-1.01964
-1.00469
-0.995284
-0.988962
-0.98587
-0.983506
-0.982357
-0.981802
-0.982792
-0.984893
-0.987293
-0.990058
-0.992495
-0.994249
-0.996535
-0.999184
-1.00183
-1.00422
-1.00624
-1.00787
-1.00919
-1.01041
-1.01183
-1.01321
-1.01377
-1.01406
-1.01441
-1.01492
-1.01536
-1.0151
-1.01414
-1.01325
-1.01271
-1.01223
-1.01153
-1.01034
-1.00884
-1.00696
-1.00494
-1.00366
-1.00364
-1.00481
-1.00594
-1.00614
-1.00598
-1.00622
-1.00695
-1.00785
-1.00944
-1.0123
-1.01538
-1.02079
-1.02875
-1.0376
-1.04772
-1.05789
-1.07137
-1.08619
-1.10072
-1.11676
-1.12789
-1.13542
-1.14631
-1.14625
-1.14455
-1.14325
-1.14487
-1.14448
-1.13465
-1.12643
-1.10901
-1.08799
-1.06583
-1.04441
-1.02408
-1.01026
-0.99948
-0.990949
-0.983172
-0.978519
-0.977474
-0.980421
-0.982886
-0.986421
-0.991082
-0.993132
-0.994779
-0.998404
-1.00267
-1.00453
-1.00468
-1.00495
-1.0063
-1.00858
-1.01049
-1.0114
-1.01189
-1.01241
-1.01305
-1.01366
-1.01413
-1.0141
-1.01389
-1.01378
-1.01349
-1.01302
-1.01228
-1.0114
-1.01055
-1.00995
-1.00956
-1.00943
-1.00923
-1.00859
-1.00739
-1.00586
-1.00474
-1.00456
-1.0051
-1.00572
-1.00656
-1.00837
-1.01034
-1.01246
-1.01476
-1.01811
-1.02165
-1.02709
-1.03481
-1.0428
-1.05262
-1.06465
-1.07756
-1.09059
-1.1035
-1.11402
-1.12208
-1.12838
-1.13225
-1.13323
-1.13207
-1.13775
-1.14589
-1.14796
-1.14058
-1.1258
-1.10663
-1.08334
-1.05926
-1.03969
-1.01781
-1.00311
-0.991923
-0.985163
-0.980677
-0.978462
-0.977053
-0.977896
-0.981244
-0.983371
-0.985473
-0.988427
-0.992001
-0.994553
-0.996504
-0.998605
-1.00153
-1.00569
-1.00945
-1.01085
-1.01045
-1.00958
-1.0092
-1.00978
-1.01036
-1.01013
-1.00974
-1.00957
-1.0101
-1.01117
-1.01267
-1.01455
-1.01652
-1.01855
-1.02084
-1.02331
-1.0261
-1.02939
-1.03325
-1.03765
-1.04229
-1.04736
-1.05342
-1.06041
-1.0684
-1.07766
-1.08832
-1.09995
-1.11274
-1.12761
-1.1436
-1.16114
-1.18058
-1.19475
-1.2116
-1.2254
-1.23656
-1.25449
-1.25631
-1.26106
-1.27024
-1.24718
-1.21989
-1.20332
-1.17759
-1.13536
-1.06529
-0.967344
-0.877063
-0.818151
-0.74058
-0.631548
-0.540701
-0.44853
-0.391631
-0.347311
-0.298882
-0.269096
-0.247438
-0.24429
-0.251828
-0.26437
-0.286165
-0.31173
-0.339967
-0.370104
-0.401627
-0.433419
-0.465427
-0.498098
-0.529595
-0.557239
-0.581723
-0.5986
-1.60468
-1.62654
-1.65169
-1.67234
-1.68788
-1.70523
-1.72516
-1.74092
-1.7575
-1.77441
-1.7888
-1.80214
-1.80526
-1.81079
-1.81252
-1.80713
-1.79823
-1.77279
-1.74263
-1.70233
-1.65423
-1.63345
-1.57634
-1.50982
-1.4535
-1.38013
-1.31261
-1.25481
-1.18853
-1.1295
-1.09463
-1.05264
-1.01526
-0.991794
-0.966638
-0.942651
-0.931133
-0.926894
-0.92756
-0.932915
-0.941408
-0.951421
-0.961314
-0.973992
-0.987132
-1.00216
-1.01587
-1.02819
-1.03946
-1.04969
-1.05902
-1.06681
-1.07337
-1.07955
-1.08526
-1.09042
-1.09491
-1.09864
-1.10165
-1.10402
-1.10604
-1.10788
-1.10949
-1.11078
-1.11169
-1.1127
-1.11334
-1.11364
-1.11373
-1.11356
-1.11328
-1.11291
-1.11261
-1.11231
-1.11193
-1.11144
-1.11101
-1.11057
-1.10987
-1.10956
-1.10917
-1.10892
-1.1092
-1.10916
-1.10926
-1.11016
-1.1115
-1.11381
-1.11703
-1.1214
-1.12693
-1.13419
-1.14336
-1.15409
-1.16633
-1.17935
-1.19226
-1.20447
-1.21545
-1.22502
-1.23163
-1.23429
-1.23335
-1.23143
-1.23325
-1.23356
-1.23114
-1.2243
-1.21305
-1.19491
-1.17723
-1.15473
-1.13472
-1.11914
-1.10593
-1.09736
-1.09164
-1.08869
-1.08656
-1.08549
-1.08505
-1.08591
-1.08773
-1.08987
-1.0923
-1.09446
-1.09611
-1.09816
-1.10051
-1.10286
-1.10498
-1.10679
-1.10826
-1.10945
-1.11057
-1.11184
-1.11307
-1.11355
-1.11385
-1.11416
-1.11462
-1.11497
-1.11473
-1.11394
-1.11317
-1.1127
-1.11225
-1.11163
-1.11059
-1.1093
-1.10769
-1.10602
-1.10501
-1.10506
-1.1061
-1.1071
-1.10739
-1.1074
-1.10771
-1.10846
-1.1094
-1.11098
-1.11366
-1.11665
-1.12175
-1.12883
-1.13684
-1.14581
-1.15521
-1.16719
-1.18036
-1.19347
-1.20758
-1.21757
-1.22469
-1.23382
-1.23404
-1.23302
-1.23228
-1.23265
-1.23238
-1.22371
-1.21521
-1.19963
-1.18051
-1.16048
-1.14124
-1.12331
-1.11072
-1.101
-1.09324
-1.08644
-1.08232
-1.08136
-1.0837
-1.08598
-1.08913
-1.09305
-1.09504
-1.09669
-1.09984
-1.10344
-1.10514
-1.10542
-1.10576
-1.10695
-1.1089
-1.11055
-1.1114
-1.11188
-1.11237
-1.11293
-1.11346
-1.11393
-1.11387
-1.1137
-1.11358
-1.11332
-1.1129
-1.11225
-1.1115
-1.11076
-1.11025
-1.10992
-1.10982
-1.10964
-1.10911
-1.10811
-1.10686
-1.10599
-1.1059
-1.10644
-1.10709
-1.108
-1.10969
-1.11153
-1.11355
-1.11575
-1.11886
-1.1223
-1.12728
-1.13421
-1.14148
-1.15034
-1.16109
-1.17283
-1.18454
-1.19603
-1.20542
-1.21267
-1.21821
-1.22167
-1.22225
-1.22171
-1.22728
-1.23431
-1.23611
-1.22911
-1.21524
-1.19734
-1.17626
-1.15473
-1.13685
-1.11776
-1.10442
-1.09441
-1.08815
-1.08407
-1.082
-1.08081
-1.08157
-1.08431
-1.08628
-1.08825
-1.09087
-1.09395
-1.09627
-1.0981
-1.10005
-1.10269
-1.10629
-1.10951
-1.11077
-1.11052
-1.10983
-1.10952
-1.10999
-1.11047
-1.11027
-1.10994
-1.1098
-1.11027
-1.11123
-1.11256
-1.11421
-1.11598
-1.11782
-1.11989
-1.12212
-1.12467
-1.12765
-1.13114
-1.1351
-1.13931
-1.14394
-1.14943
-1.15576
-1.16301
-1.17139
-1.18102
-1.19152
-1.20313
-1.21669
-1.2311
-1.24678
-1.26424
-1.2774
-1.2923
-1.30464
-1.31491
-1.32979
-1.33248
-1.33642
-1.34276
-1.32294
-1.29908
-1.28306
-1.25875
-1.21883
-1.15713
-1.0719
-0.992595
-0.93722
-0.866099
-0.771079
-0.689073
-0.608636
-0.555905
-0.515461
-0.472745
-0.447198
-0.426308
-0.423981
-0.4301
-0.44161
-0.460987
-0.483836
-0.509227
-0.536299
-0.564641
-0.593217
-0.622003
-0.651211
-0.679308
-0.704114
-0.725751
-0.740275
-1.64942
-1.66765
-1.68945
-1.70797
-1.72246
-1.73826
-1.75589
-1.77039
-1.78552
-1.80049
-1.8138
-1.82467
-1.82996
-1.83515
-1.83551
-1.83139
-1.82318
-1.80102
-1.77354
-1.73814
-1.69608
-1.67467
-1.62389
-1.56604
-1.51449
-1.4495
-1.38988
-1.33753
-1.27979
-1.22854
-1.19612
-1.15858
-1.12718
-1.10569
-1.0839
-1.06089
-1.05204
-1.0475
-1.04843
-1.05286
-1.06048
-1.06917
-1.07827
-1.0894
-1.10109
-1.1143
-1.12646
-1.1374
-1.14744
-1.15655
-1.16482
-1.17174
-1.17764
-1.18314
-1.1882
-1.19278
-1.19676
-1.20007
-1.20275
-1.20487
-1.20668
-1.20832
-1.20974
-1.21087
-1.2116
-1.21256
-1.21313
-1.21342
-1.21351
-1.21338
-1.21315
-1.21284
-1.21261
-1.21238
-1.21211
-1.21175
-1.21139
-1.21107
-1.21052
-1.21034
-1.21009
-1.20998
-1.2103
-1.21042
-1.21069
-1.21155
-1.21295
-1.21517
-1.21821
-1.22231
-1.22739
-1.23396
-1.24224
-1.2516
-1.26251
-1.2738
-1.28501
-1.29551
-1.30488
-1.31294
-1.31845
-1.32063
-1.31977
-1.31814
-1.31951
-1.31965
-1.3173
-1.31111
-1.30092
-1.28521
-1.26927
-1.24986
-1.23236
-1.21854
-1.207
-1.19933
-1.19424
-1.19149
-1.18959
-1.18863
-1.18827
-1.18902
-1.19058
-1.19245
-1.19456
-1.19646
-1.19798
-1.19979
-1.20184
-1.2039
-1.20577
-1.20736
-1.20867
-1.20973
-1.21073
-1.21185
-1.21291
-1.21334
-1.21363
-1.21391
-1.21431
-1.2146
-1.21437
-1.21373
-1.21309
-1.21268
-1.21228
-1.21174
-1.21085
-1.20977
-1.20841
-1.20707
-1.2063
-1.20643
-1.20737
-1.20829
-1.20865
-1.2088
-1.20918
-1.20996
-1.21094
-1.21254
-1.21504
-1.21796
-1.22265
-1.22896
-1.23608
-1.24409
-1.25254
-1.26309
-1.27458
-1.28601
-1.29809
-1.30672
-1.31315
-1.32047
-1.32089
-1.32023
-1.31961
-1.3196
-1.31911
-1.31158
-1.30334
-1.28961
-1.2726
-1.25492
-1.23799
-1.22236
-1.21109
-1.20245
-1.1955
-1.18962
-1.18601
-1.18515
-1.18701
-1.18906
-1.19182
-1.19512
-1.19697
-1.19857
-1.20127
-1.2043
-1.20582
-1.20618
-1.20654
-1.20759
-1.20923
-1.21065
-1.21143
-1.21189
-1.21232
-1.21281
-1.21328
-1.21368
-1.21364
-1.2135
-1.21339
-1.21316
-1.21279
-1.21223
-1.21159
-1.21097
-1.21054
-1.21027
-1.2102
-1.21006
-1.20963
-1.20883
-1.20784
-1.20719
-1.2072
-1.20775
-1.20844
-1.20941
-1.211
-1.21271
-1.21464
-1.21674
-1.21959
-1.22289
-1.22748
-1.23365
-1.24022
-1.24819
-1.25765
-1.26796
-1.27819
-1.28812
-1.29629
-1.30257
-1.30728
-1.31021
-1.3105
-1.31045
-1.31533
-1.32152
-1.32292
-1.31645
-1.30377
-1.28757
-1.26893
-1.24999
-1.234
-1.21749
-1.2056
-1.19676
-1.19108
-1.18743
-1.18554
-1.18453
-1.18519
-1.18744
-1.18922
-1.19101
-1.1933
-1.19595
-1.19802
-1.1997
-1.20147
-1.20381
-1.2069
-1.20963
-1.21076
-1.21062
-1.21008
-1.20982
-1.21021
-1.2106
-1.21043
-1.21013
-1.21003
-1.21045
-1.21129
-1.21245
-1.21388
-1.21545
-1.21709
-1.21893
-1.22095
-1.22325
-1.22591
-1.22903
-1.23257
-1.23634
-1.24052
-1.24544
-1.2511
-1.25761
-1.26512
-1.27372
-1.2831
-1.29349
-1.30571
-1.31861
-1.33243
-1.34801
-1.36002
-1.37312
-1.38406
-1.39287
-1.40457
-1.40866
-1.41182
-1.41595
-1.39893
-1.3782
-1.36299
-1.34048
-1.30367
-1.24999
-1.17659
-1.10737
-1.05652
-0.992323
-0.910366
-0.837539
-0.767519
-0.719657
-0.683371
-0.646216
-0.623431
-0.606567
-0.603251
-0.608194
-0.618611
-0.635693
-0.65592
-0.678485
-0.702531
-0.727714
-0.753096
-0.778656
-0.804461
-0.829235
-0.851202
-0.870125
-0.882558
-1.69343
-1.70858
-1.72729
-1.74371
-1.75695
-1.77116
-1.78668
-1.79984
-1.81338
-1.82685
-1.83847
-1.84636
-1.85243
-1.85919
-1.85716
-1.85624
-1.84882
-1.82948
-1.80493
-1.77416
-1.73775
-1.7167
-1.67206
-1.62213
-1.57586
-1.51905
-1.4671
-1.42053
-1.37095
-1.32712
-1.29779
-1.26509
-1.23819
-1.21866
-1.19986
-1.1805
-1.17252
-1.16799
-1.16902
-1.1727
-1.1794
-1.18689
-1.19507
-1.20473
-1.21498
-1.22644
-1.23706
-1.24663
-1.25544
-1.26343
-1.27064
-1.27671
-1.28192
-1.28674
-1.29116
-1.29515
-1.29863
-1.30153
-1.30388
-1.30575
-1.30733
-1.30876
-1.30999
-1.31097
-1.31154
-1.31243
-1.31294
-1.31321
-1.3133
-1.3132
-1.31301
-1.31277
-1.31261
-1.31246
-1.31228
-1.31205
-1.31178
-1.31156
-1.31117
-1.31111
-1.31098
-1.31102
-1.31136
-1.31163
-1.31205
-1.31295
-1.31437
-1.31651
-1.31935
-1.32314
-1.32774
-1.3336
-1.341
-1.34904
-1.35856
-1.36813
-1.37767
-1.38645
-1.39419
-1.40073
-1.40505
-1.40663
-1.40576
-1.40427
-1.40531
-1.40531
-1.40311
-1.39762
-1.38868
-1.37532
-1.36139
-1.34491
-1.32988
-1.31787
-1.30794
-1.30122
-1.29676
-1.29428
-1.29261
-1.29176
-1.29147
-1.29211
-1.29342
-1.29504
-1.29684
-1.29847
-1.29984
-1.30141
-1.30317
-1.30494
-1.30656
-1.30794
-1.30908
-1.31001
-1.31089
-1.31186
-1.31267
-1.31314
-1.31341
-1.31366
-1.314
-1.31425
-1.31405
-1.31354
-1.31301
-1.31267
-1.31233
-1.31188
-1.31114
-1.31026
-1.30917
-1.30814
-1.3076
-1.30781
-1.30868
-1.30952
-1.30995
-1.3102
-1.31065
-1.31146
-1.31248
-1.31405
-1.31638
-1.31916
-1.32344
-1.32903
-1.33533
-1.34236
-1.34978
-1.35881
-1.3686
-1.37829
-1.38838
-1.39556
-1.40104
-1.40677
-1.40716
-1.40665
-1.40606
-1.4059
-1.40515
-1.3987
-1.39117
-1.37933
-1.36453
-1.34929
-1.33466
-1.32125
-1.31139
-1.30386
-1.29777
-1.29274
-1.28964
-1.28888
-1.29035
-1.29213
-1.29451
-1.29726
-1.29893
-1.3004
-1.3027
-1.30521
-1.30655
-1.30694
-1.3073
-1.30821
-1.30958
-1.31078
-1.31147
-1.31189
-1.31227
-1.3127
-1.31309
-1.31329
-1.3134
-1.31329
-1.3132
-1.313
-1.31269
-1.31221
-1.31169
-1.31117
-1.31083
-1.31063
-1.3106
-1.3105
-1.31019
-1.30958
-1.30884
-1.30839
-1.3085
-1.30908
-1.30981
-1.3108
-1.31229
-1.3139
-1.31572
-1.31774
-1.32036
-1.32341
-1.32756
-1.33303
-1.33885
-1.34588
-1.35404
-1.36292
-1.37164
-1.37995
-1.38681
-1.392
-1.39582
-1.39812
-1.39819
-1.39842
-1.4025
-1.40781
-1.40881
-1.40302
-1.39179
-1.37757
-1.36145
-1.34511
-1.33113
-1.31704
-1.30667
-1.299
-1.29396
-1.29075
-1.28907
-1.28822
-1.28878
-1.2906
-1.29218
-1.29377
-1.29574
-1.29799
-1.29979
-1.3013
-1.30287
-1.30491
-1.30752
-1.30982
-1.31081
-1.31074
-1.31031
-1.3101
-1.31041
-1.31073
-1.31058
-1.31033
-1.31025
-1.31062
-1.31135
-1.31235
-1.31357
-1.31493
-1.31637
-1.318
-1.31978
-1.32183
-1.32418
-1.32693
-1.33004
-1.33338
-1.3371
-1.34145
-1.34645
-1.3522
-1.35883
-1.36642
-1.37463
-1.3838
-1.39467
-1.40606
-1.41803
-1.43183
-1.44268
-1.45415
-1.46387
-1.47063
-1.48046
-1.48496
-1.4873
-1.48967
-1.4751
-1.45722
-1.44314
-1.42278
-1.38997
-1.34351
-1.28109
-1.2216
-1.17592
-1.11926
-1.04932
-0.98568
-0.925488
-0.882934
-0.851008
-0.819466
-0.798543
-0.787858
-0.782032
-0.786113
-0.795405
-0.810298
-0.827977
-0.847743
-0.868793
-0.890841
-0.913049
-0.935383
-0.957832
-0.979348
-0.998488
-1.01481
-1.02536
-1.73683
-1.74934
-1.76518
-1.77953
-1.79138
-1.80397
-1.81757
-1.82932
-1.84127
-1.85274
-1.86348
-1.86929
-1.87438
-1.88101
-1.88042
-1.88028
-1.87459
-1.85829
-1.83708
-1.8105
-1.77928
-1.75951
-1.72075
-1.67823
-1.6376
-1.58878
-1.54428
-1.50383
-1.46209
-1.4253
-1.39956
-1.37177
-1.34899
-1.33168
-1.31575
-1.30251
-1.29268
-1.2884
-1.28946
-1.2925
-1.29826
-1.30464
-1.3118
-1.32005
-1.32886
-1.33862
-1.34771
-1.35592
-1.36349
-1.37035
-1.37652
-1.38173
-1.38623
-1.39036
-1.39415
-1.39755
-1.40052
-1.403
-1.40502
-1.40662
-1.40799
-1.40921
-1.41025
-1.41108
-1.41155
-1.41231
-1.41275
-1.41299
-1.41309
-1.413
-1.41286
-1.41268
-1.41261
-1.41255
-1.41248
-1.41237
-1.41217
-1.41206
-1.41183
-1.41188
-1.41186
-1.41204
-1.41243
-1.41282
-1.41339
-1.41435
-1.41578
-1.41783
-1.42045
-1.4239
-1.42801
-1.43315
-1.43967
-1.44648
-1.45458
-1.46245
-1.47029
-1.47734
-1.48345
-1.48846
-1.49159
-1.49251
-1.49154
-1.49023
-1.49091
-1.4908
-1.48883
-1.48414
-1.47656
-1.46547
-1.45364
-1.4399
-1.42729
-1.41711
-1.40876
-1.40302
-1.39921
-1.39704
-1.39561
-1.39487
-1.39464
-1.39517
-1.39626
-1.39762
-1.39913
-1.40051
-1.4017
-1.40303
-1.40451
-1.406
-1.40737
-1.40854
-1.40951
-1.4103
-1.41106
-1.41188
-1.41263
-1.41298
-1.4132
-1.41342
-1.41371
-1.41391
-1.41375
-1.41336
-1.41294
-1.41268
-1.41239
-1.41206
-1.41147
-1.4108
-1.40997
-1.40923
-1.4089
-1.40919
-1.41001
-1.4108
-1.41129
-1.41165
-1.41217
-1.41301
-1.41405
-1.41558
-1.41774
-1.42035
-1.42421
-1.4291
-1.4346
-1.44065
-1.44698
-1.4545
-1.46252
-1.47045
-1.47856
-1.48422
-1.4886
-1.49285
-1.49306
-1.49255
-1.49198
-1.49174
-1.49088
-1.48547
-1.4789
-1.46895
-1.4564
-1.4436
-1.43128
-1.42002
-1.41162
-1.40521
-1.40001
-1.3958
-1.39319
-1.39253
-1.39367
-1.39518
-1.39719
-1.39944
-1.4009
-1.4022
-1.40412
-1.40617
-1.40731
-1.4077
-1.40804
-1.40881
-1.40993
-1.41093
-1.41153
-1.4119
-1.41223
-1.41258
-1.41292
-1.41311
-1.41319
-1.4131
-1.41302
-1.41286
-1.4126
-1.41221
-1.41179
-1.41139
-1.41114
-1.41101
-1.41103
-1.41099
-1.4108
-1.41037
-1.40988
-1.40962
-1.40984
-1.41046
-1.41122
-1.41222
-1.41362
-1.41513
-1.41682
-1.41873
-1.42113
-1.42394
-1.42766
-1.43243
-1.43752
-1.44355
-1.45041
-1.45778
-1.46492
-1.47163
-1.47709
-1.48114
-1.48402
-1.48565
-1.48548
-1.48578
-1.48911
-1.49348
-1.49413
-1.48913
-1.47953
-1.46744
-1.45387
-1.44012
-1.42824
-1.41648
-1.40766
-1.40115
-1.3968
-1.39405
-1.39258
-1.39187
-1.39234
-1.3938
-1.39515
-1.39652
-1.39818
-1.40005
-1.40159
-1.4029
-1.40426
-1.40599
-1.40815
-1.41004
-1.4109
-1.41087
-1.41054
-1.41038
-1.41062
-1.41087
-1.41074
-1.41054
-1.41048
-1.4108
-1.41141
-1.41225
-1.41329
-1.41444
-1.41567
-1.41707
-1.41862
-1.42042
-1.42244
-1.42482
-1.42751
-1.43041
-1.43365
-1.43742
-1.44175
-1.44673
-1.45248
-1.45902
-1.46607
-1.47405
-1.48363
-1.49367
-1.50383
-1.5159
-1.52547
-1.53532
-1.54408
-1.54931
-1.55702
-1.56149
-1.56287
-1.56383
-1.55145
-1.5362
-1.52349
-1.50556
-1.47711
-1.43768
-1.38555
-1.33539
-1.29548
-1.24669
-1.18801
-1.13359
-1.08273
-1.04583
-1.01841
-0.992291
-0.973198
-0.966781
-0.960189
-0.963862
-0.97203
-0.984824
-1.00001
-1.017
-1.03508
-1.05402
-1.07307
-1.09218
-1.11131
-1.12962
-1.14595
-1.15977
-1.1686
-1.77972
-1.78994
-1.80311
-1.81541
-1.82578
-1.83667
-1.84828
-1.85856
-1.86898
-1.87864
-1.88824
-1.89314
-1.89732
-1.90346
-1.90457
-1.90338
-1.89934
-1.88676
-1.86929
-1.84691
-1.82105
-1.80305
-1.76985
-1.73437
-1.69964
-1.65864
-1.62142
-1.58733
-1.55311
-1.52309
-1.5013
-1.47835
-1.45955
-1.44483
-1.43147
-1.42293
-1.41293
-1.409
-1.40974
-1.4122
-1.41701
-1.42233
-1.42842
-1.43529
-1.44266
-1.45076
-1.45834
-1.46519
-1.47152
-1.47725
-1.48239
-1.48675
-1.49052
-1.49397
-1.49712
-1.49995
-1.50242
-1.50449
-1.50617
-1.50752
-1.50866
-1.50967
-1.51053
-1.5112
-1.51162
-1.5122
-1.51257
-1.51278
-1.51288
-1.51284
-1.51275
-1.51264
-1.51266
-1.51267
-1.51269
-1.5127
-1.51256
-1.51254
-1.51246
-1.51261
-1.51272
-1.51303
-1.5135
-1.51401
-1.51472
-1.51575
-1.51719
-1.51917
-1.52157
-1.52467
-1.52831
-1.53279
-1.53832
-1.54391
-1.55055
-1.55679
-1.56293
-1.56826
-1.57273
-1.57622
-1.57816
-1.57839
-1.57726
-1.57607
-1.57645
-1.57629
-1.57462
-1.57078
-1.56459
-1.55566
-1.54595
-1.53486
-1.52461
-1.51627
-1.50947
-1.50473
-1.5016
-1.49977
-1.49859
-1.49797
-1.4978
-1.49822
-1.4991
-1.50021
-1.50144
-1.50257
-1.50356
-1.50465
-1.50586
-1.50708
-1.50819
-1.50915
-1.50995
-1.5106
-1.51123
-1.51191
-1.51271
-1.51282
-1.513
-1.51318
-1.51343
-1.51359
-1.51347
-1.51318
-1.51286
-1.51268
-1.51246
-1.51224
-1.5118
-1.51133
-1.51076
-1.51029
-1.51016
-1.51054
-1.51133
-1.5121
-1.51265
-1.51311
-1.51372
-1.5146
-1.5157
-1.51721
-1.51922
-1.52165
-1.52506
-1.52924
-1.53387
-1.53887
-1.54409
-1.5501
-1.55637
-1.56253
-1.56871
-1.57285
-1.57602
-1.57887
-1.57875
-1.57815
-1.57759
-1.57733
-1.57649
-1.57208
-1.5666
-1.55853
-1.54825
-1.53786
-1.52784
-1.51869
-1.51178
-1.5065
-1.50222
-1.4988
-1.49668
-1.49612
-1.497
-1.49824
-1.49986
-1.50165
-1.50288
-1.50399
-1.50553
-1.50718
-1.50812
-1.50846
-1.50877
-1.5094
-1.5103
-1.5111
-1.51159
-1.51191
-1.51218
-1.51247
-1.51275
-1.51303
-1.51299
-1.51292
-1.51285
-1.51272
-1.51252
-1.51222
-1.5119
-1.5116
-1.51144
-1.51138
-1.51146
-1.51148
-1.51142
-1.51117
-1.5109
-1.51085
-1.51118
-1.51186
-1.51267
-1.51369
-1.51502
-1.51645
-1.51803
-1.51979
-1.52197
-1.52452
-1.52778
-1.53185
-1.53618
-1.54119
-1.54675
-1.5526
-1.55816
-1.56324
-1.56725
-1.5701
-1.572
-1.57295
-1.57252
-1.57274
-1.57534
-1.57879
-1.57916
-1.57502
-1.56715
-1.55727
-1.54626
-1.5351
-1.52533
-1.51579
-1.50855
-1.5032
-1.49959
-1.49731
-1.49607
-1.4955
-1.49588
-1.49701
-1.49813
-1.49927
-1.50063
-1.50214
-1.50341
-1.50451
-1.50564
-1.50705
-1.5088
-1.51031
-1.51102
-1.51101
-1.51077
-1.51064
-1.51083
-1.51102
-1.51091
-1.51075
-1.5107
-1.51097
-1.51148
-1.51216
-1.51301
-1.51394
-1.51496
-1.51613
-1.51745
-1.519
-1.5207
-1.5227
-1.52499
-1.52744
-1.53021
-1.5334
-1.53707
-1.54133
-1.54622
-1.55181
-1.5579
-1.56477
-1.57307
-1.58164
-1.5904
-1.60028
-1.60819
-1.61624
-1.62406
-1.62872
-1.63419
-1.63761
-1.63865
-1.63834
-1.62793
-1.61514
-1.60398
-1.58864
-1.5648
-1.53225
-1.48987
-1.44875
-1.41506
-1.37435
-1.32644
-1.28124
-1.23934
-1.20837
-1.18558
-1.16508
-1.15006
-1.14384
-1.13777
-1.1414
-1.1485
-1.15928
-1.17202
-1.18627
-1.2014
-1.21724
-1.23314
-1.24903
-1.26488
-1.28003
-1.29357
-1.30497
-1.31222
-1.82219
-1.8304
-1.84104
-1.8512
-1.85996
-1.86902
-1.87838
-1.887
-1.89572
-1.90388
-1.91183
-1.91732
-1.92077
-1.92545
-1.92671
-1.92673
-1.92246
-1.91301
-1.8992
-1.88183
-1.86167
-1.8462
-1.81923
-1.79056
-1.76192
-1.72864
-1.6986
-1.67105
-1.64429
-1.62085
-1.6033
-1.58507
-1.57015
-1.55819
-1.54727
-1.54044
-1.53363
-1.5302
-1.53033
-1.53223
-1.53606
-1.54032
-1.54526
-1.55076
-1.55667
-1.56311
-1.56915
-1.57463
-1.5797
-1.58428
-1.58838
-1.59187
-1.59489
-1.59765
-1.60016
-1.6024
-1.60436
-1.606
-1.60735
-1.60841
-1.60932
-1.61012
-1.6108
-1.61134
-1.61161
-1.6121
-1.6124
-1.61259
-1.61271
-1.6127
-1.61268
-1.61265
-1.61271
-1.61275
-1.61282
-1.6129
-1.61288
-1.61297
-1.61303
-1.61329
-1.61354
-1.614
-1.61456
-1.61521
-1.61605
-1.61713
-1.61859
-1.62049
-1.62271
-1.62551
-1.6287
-1.63254
-1.63711
-1.64153
-1.64667
-1.65129
-1.65568
-1.65928
-1.66208
-1.66405
-1.6648
-1.66432
-1.66297
-1.66182
-1.66201
-1.66184
-1.66051
-1.65751
-1.6527
-1.64583
-1.6383
-1.62978
-1.62186
-1.61537
-1.61011
-1.6064
-1.60395
-1.60249
-1.60157
-1.60108
-1.60095
-1.60128
-1.60196
-1.60282
-1.60377
-1.60465
-1.60543
-1.60628
-1.60722
-1.60816
-1.60903
-1.60977
-1.61039
-1.61091
-1.6114
-1.61194
-1.6127
-1.61266
-1.61279
-1.61294
-1.61314
-1.61327
-1.61318
-1.61298
-1.61276
-1.61264
-1.61251
-1.61237
-1.61209
-1.61181
-1.61147
-1.61125
-1.61134
-1.61181
-1.61259
-1.61335
-1.61395
-1.61449
-1.61519
-1.61612
-1.61727
-1.61876
-1.62067
-1.62294
-1.62594
-1.62946
-1.63325
-1.63722
-1.64125
-1.64573
-1.65026
-1.65465
-1.65887
-1.66149
-1.6634
-1.66492
-1.66438
-1.66359
-1.66304
-1.66279
-1.66204
-1.65864
-1.65435
-1.64814
-1.64013
-1.63211
-1.62435
-1.61728
-1.61188
-1.60776
-1.60441
-1.60177
-1.60012
-1.59968
-1.60033
-1.60129
-1.60255
-1.60391
-1.60489
-1.60577
-1.60697
-1.60822
-1.60895
-1.60924
-1.6095
-1.60999
-1.61067
-1.61128
-1.61167
-1.61193
-1.61214
-1.61237
-1.61259
-1.61296
-1.6128
-1.61273
-1.61268
-1.61258
-1.61243
-1.61221
-1.61199
-1.61179
-1.61171
-1.61171
-1.61184
-1.61194
-1.61199
-1.61191
-1.61186
-1.61199
-1.61244
-1.61318
-1.61404
-1.61509
-1.61636
-1.61772
-1.61921
-1.62087
-1.62286
-1.62515
-1.62798
-1.63137
-1.63492
-1.63889
-1.64315
-1.64747
-1.65142
-1.65486
-1.6574
-1.659
-1.65989
-1.66013
-1.6594
-1.65944
-1.66134
-1.66392
-1.66409
-1.66085
-1.65479
-1.64714
-1.63863
-1.63
-1.62238
-1.615
-1.60937
-1.6052
-1.60234
-1.60055
-1.59956
-1.59912
-1.59941
-1.60026
-1.60114
-1.60203
-1.60309
-1.60425
-1.60525
-1.60612
-1.60701
-1.60812
-1.60945
-1.6106
-1.61116
-1.61117
-1.61099
-1.61089
-1.61103
-1.61116
-1.61108
-1.61096
-1.61093
-1.61114
-1.61153
-1.61207
-1.61269
-1.61345
-1.61427
-1.61523
-1.61633
-1.61764
-1.619
-1.62065
-1.62252
-1.62454
-1.62683
-1.62947
-1.6325
-1.63602
-1.64005
-1.64469
-1.64986
-1.6555
-1.66213
-1.66883
-1.67641
-1.68378
-1.68987
-1.69621
-1.70261
-1.70751
-1.71065
-1.71243
-1.7139
-1.71312
-1.70455
-1.6941
-1.68467
-1.67205
-1.65322
-1.62741
-1.59438
-1.56208
-1.53498
-1.50253
-1.46495
-1.42892
-1.39585
-1.37119
-1.35306
-1.3374
-1.32789
-1.31985
-1.31607
-1.3192
-1.32514
-1.33387
-1.34415
-1.35559
-1.36773
-1.3805
-1.39328
-1.40595
-1.41853
-1.43055
-1.44132
-1.45037
-1.45614
-1.86434
-1.87073
-1.87898
-1.88687
-1.89391
-1.90112
-1.90842
-1.91533
-1.92235
-1.92896
-1.93543
-1.94096
-1.94381
-1.94719
-1.94864
-1.94973
-1.9461
-1.93906
-1.92862
-1.91574
-1.90045
-1.8885
-1.86871
-1.84671
-1.82435
-1.7987
-1.7757
-1.75477
-1.73503
-1.71799
-1.70488
-1.69139
-1.68046
-1.67161
-1.66338
-1.65799
-1.654
-1.65152
-1.65137
-1.65277
-1.65557
-1.65873
-1.66244
-1.66654
-1.67093
-1.67568
-1.68015
-1.68421
-1.68797
-1.69137
-1.69442
-1.69701
-1.69927
-1.70132
-1.70317
-1.70483
-1.70627
-1.70749
-1.7085
-1.7093
-1.70999
-1.71059
-1.71109
-1.71149
-1.71181
-1.71206
-1.71226
-1.71239
-1.71249
-1.71252
-1.71255
-1.7126
-1.71268
-1.71276
-1.71287
-1.71299
-1.71322
-1.71345
-1.71367
-1.71407
-1.71446
-1.71505
-1.71571
-1.71647
-1.71741
-1.71851
-1.71995
-1.72173
-1.72375
-1.72625
-1.72898
-1.7322
-1.73592
-1.73922
-1.74293
-1.74597
-1.74866
-1.75052
-1.75162
-1.75204
-1.75156
-1.75033
-1.74871
-1.74755
-1.7476
-1.74746
-1.7465
-1.74436
-1.74092
-1.73606
-1.73071
-1.72469
-1.71907
-1.71445
-1.7107
-1.70803
-1.70627
-1.70522
-1.70456
-1.7042
-1.70412
-1.70435
-1.70482
-1.70544
-1.70611
-1.70674
-1.7073
-1.70791
-1.70858
-1.70925
-1.70987
-1.7104
-1.71085
-1.71122
-1.71157
-1.71195
-1.71254
-1.71248
-1.71257
-1.71268
-1.71283
-1.71294
-1.71289
-1.71277
-1.71264
-1.71259
-1.71254
-1.71249
-1.71237
-1.71227
-1.71216
-1.71218
-1.71246
-1.71302
-1.71381
-1.71455
-1.71519
-1.71581
-1.71657
-1.71754
-1.71871
-1.72017
-1.72196
-1.72405
-1.72667
-1.72956
-1.73257
-1.73555
-1.73842
-1.74145
-1.74427
-1.74693
-1.74923
-1.75026
-1.75082
-1.75106
-1.75002
-1.74898
-1.74844
-1.74823
-1.74765
-1.74525
-1.74217
-1.73777
-1.73206
-1.72636
-1.72086
-1.71581
-1.71195
-1.709
-1.70659
-1.70472
-1.70354
-1.70322
-1.70366
-1.70435
-1.70524
-1.70621
-1.70691
-1.70756
-1.7084
-1.70928
-1.70981
-1.71003
-1.71022
-1.71057
-1.71105
-1.71148
-1.71176
-1.71195
-1.7121
-1.71226
-1.71242
-1.71274
-1.71258
-1.71253
-1.71249
-1.71243
-1.71234
-1.7122
-1.71207
-1.71196
-1.71196
-1.71203
-1.7122
-1.71237
-1.71253
-1.71263
-1.71276
-1.71307
-1.71363
-1.71443
-1.71533
-1.71639
-1.7176
-1.71887
-1.72026
-1.72179
-1.72359
-1.72563
-1.72805
-1.73082
-1.73362
-1.7366
-1.73962
-1.74249
-1.74482
-1.74665
-1.74768
-1.74798
-1.7478
-1.74728
-1.74622
-1.74601
-1.74725
-1.749
-1.74907
-1.74677
-1.74248
-1.73704
-1.731
-1.72485
-1.71943
-1.71418
-1.71015
-1.70715
-1.70508
-1.70379
-1.70305
-1.70273
-1.70293
-1.70352
-1.70415
-1.70479
-1.70555
-1.70638
-1.7071
-1.70773
-1.70838
-1.70917
-1.71011
-1.71092
-1.71132
-1.71133
-1.71121
-1.71114
-1.71123
-1.7113
-1.71124
-1.71115
-1.71114
-1.71132
-1.71161
-1.71201
-1.71256
-1.71303
-1.71363
-1.71435
-1.71518
-1.71617
-1.71721
-1.71847
-1.7199
-1.72146
-1.72323
-1.72529
-1.72765
-1.73038
-1.73349
-1.73708
-1.74116
-1.74545
-1.75021
-1.75517
-1.76115
-1.76654
-1.77108
-1.77586
-1.78066
-1.78483
-1.78648
-1.78725
-1.78833
-1.78804
-1.78122
-1.77302
-1.76539
-1.75555
-1.74143
-1.72238
-1.69837
-1.67475
-1.65452
-1.63041
-1.60292
-1.57666
-1.55271
-1.53484
-1.5215
-1.50917
-1.50341
-1.49624
-1.49602
-1.49795
-1.5025
-1.50906
-1.51677
-1.5253
-1.53434
-1.54389
-1.55343
-1.56287
-1.57223
-1.58115
-1.58917
-1.59592
-1.6003
-1.90623
-1.91103
-1.91713
-1.92299
-1.92844
-1.93406
-1.93979
-1.94532
-1.95101
-1.95647
-1.96189
-1.96683
-1.96995
-1.97347
-1.97562
-1.97716
-1.97559
-1.97109
-1.964
-1.95483
-1.94348
-1.93448
-1.92027
-1.90421
-1.88754
-1.86891
-1.85287
-1.83875
-1.82668
-1.8161
-1.80777
-1.79928
-1.79239
-1.78674
-1.78148
-1.77798
-1.7755
-1.77401
-1.7739
-1.77477
-1.77651
-1.7785
-1.78086
-1.78346
-1.78624
-1.78922
-1.79203
-1.79459
-1.79695
-1.7991
-1.80101
-1.80265
-1.80407
-1.80535
-1.8065
-1.80753
-1.80843
-1.80918
-1.80979
-1.81029
-1.81071
-1.81108
-1.81138
-1.81164
-1.81172
-1.81186
-1.812
-1.81211
-1.81222
-1.81233
-1.81247
-1.81263
-1.8128
-1.813
-1.81323
-1.81348
-1.81387
-1.81424
-1.81463
-1.81515
-1.81566
-1.81636
-1.81708
-1.81792
-1.81892
-1.82003
-1.82142
-1.82302
-1.8248
-1.82696
-1.82919
-1.83173
-1.83447
-1.83668
-1.83899
-1.84051
-1.84152
-1.84171
-1.84117
-1.84009
-1.8384
-1.83641
-1.83448
-1.83328
-1.83327
-1.83317
-1.83259
-1.83131
-1.82927
-1.82639
-1.8232
-1.81962
-1.81626
-1.8135
-1.81125
-1.80965
-1.80858
-1.80794
-1.80754
-1.80732
-1.80728
-1.80741
-1.80769
-1.80806
-1.80846
-1.80884
-1.80918
-1.80954
-1.80995
-1.81035
-1.81072
-1.81104
-1.81131
-1.81153
-1.81174
-1.81196
-1.81212
-1.81225
-1.81232
-1.8124
-1.81251
-1.8126
-1.81259
-1.81255
-1.81252
-1.81254
-1.81257
-1.81263
-1.81266
-1.81276
-1.81289
-1.81316
-1.81364
-1.8143
-1.81509
-1.81582
-1.8165
-1.81718
-1.81801
-1.81902
-1.8202
-1.82163
-1.82328
-1.82516
-1.82737
-1.82961
-1.83181
-1.83374
-1.83546
-1.8371
-1.83822
-1.83917
-1.83962
-1.83905
-1.83824
-1.83725
-1.83566
-1.83435
-1.83383
-1.83369
-1.83332
-1.83189
-1.83005
-1.82741
-1.82401
-1.82062
-1.81736
-1.8143
-1.812
-1.81022
-1.80877
-1.80764
-1.80694
-1.80675
-1.807
-1.80741
-1.80795
-1.80853
-1.80894
-1.80934
-1.80984
-1.81036
-1.81068
-1.81082
-1.81094
-1.81114
-1.81143
-1.81169
-1.81186
-1.81197
-1.81206
-1.81215
-1.81224
-1.81229
-1.8123
-1.81228
-1.81227
-1.81225
-1.81222
-1.81216
-1.81213
-1.81213
-1.81221
-1.81235
-1.81259
-1.81284
-1.81311
-1.81338
-1.81372
-1.8142
-1.81488
-1.81575
-1.81669
-1.81775
-1.8189
-1.82007
-1.82134
-1.82272
-1.8243
-1.82606
-1.82806
-1.83018
-1.83222
-1.83416
-1.83596
-1.83744
-1.83819
-1.83842
-1.83795
-1.83695
-1.83571
-1.83441
-1.83302
-1.83249
-1.83313
-1.83413
-1.83415
-1.83278
-1.8302
-1.82695
-1.82337
-1.81971
-1.81648
-1.81333
-1.8109
-1.80908
-1.80782
-1.80703
-1.80657
-1.80637
-1.80649
-1.80683
-1.80721
-1.8076
-1.80806
-1.80856
-1.809
-1.80938
-1.80977
-1.81024
-1.8108
-1.81128
-1.81151
-1.81152
-1.81145
-1.81141
-1.81146
-1.81149
-1.81146
-1.81141
-1.81141
-1.81154
-1.8117
-1.81194
-1.81212
-1.81243
-1.81281
-1.81329
-1.81387
-1.81456
-1.81541
-1.81636
-1.81744
-1.81863
-1.82
-1.82159
-1.82342
-1.82552
-1.82789
-1.83065
-1.83375
-1.83697
-1.84047
-1.84413
-1.8484
-1.85241
-1.85554
-1.85883
-1.862
-1.86417
-1.86515
-1.86495
-1.86467
-1.86386
-1.85827
-1.85196
-1.84625
-1.83943
-1.831
-1.81867
-1.80366
-1.78887
-1.77595
-1.76047
-1.7431
-1.72713
-1.71245
-1.70137
-1.69296
-1.68449
-1.68091
-1.67686
-1.6779
-1.67892
-1.68184
-1.68602
-1.69092
-1.69633
-1.70206
-1.70802
-1.71404
-1.72012
-1.72616
-1.73193
-1.73716
-1.74162
-1.74464
-1.94555
-1.94859
-1.95222
-1.95585
-1.95943
-1.96321
-1.96711
-1.97104
-1.97515
-1.97923
-1.98338
-1.98748
-1.99085
-1.99427
-1.99704
-1.99935
-1.99989
-1.99847
-1.99557
-1.99117
-1.98502
-1.97959
-1.97109
-1.96179
-1.95163
-1.94037
-1.93093
-1.92277
-1.9166
-1.9112
-1.9066
-1.90224
-1.89866
-1.89582
-1.89337
-1.89179
-1.89081
-1.89039
-1.89064
-1.89135
-1.89245
-1.89369
-1.89511
-1.8966
-1.89814
-1.89972
-1.9012
-1.90256
-1.90382
-1.90496
-1.90598
-1.90686
-1.90763
-1.90833
-1.90894
-1.90949
-1.90996
-1.91036
-1.91069
-1.91098
-1.91122
-1.91144
-1.91163
-1.91179
-1.91174
-1.91191
-1.91205
-1.91219
-1.91234
-1.91254
-1.91276
-1.91301
-1.91329
-1.9136
-1.91396
-1.91436
-1.91483
-1.91532
-1.91584
-1.91648
-1.9171
-1.91791
-1.9187
-1.91963
-1.92073
-1.92185
-1.92322
-1.92471
-1.92625
-1.92807
-1.92971
-1.9315
-1.93311
-1.93404
-1.93473
-1.93451
-1.93372
-1.9321
-1.92986
-1.92731
-1.92453
-1.92201
-1.92005
-1.91907
-1.91904
-1.91901
-1.91882
-1.9184
-1.91773
-1.91678
-1.91572
-1.91454
-1.91343
-1.91251
-1.91176
-1.91122
-1.91086
-1.91065
-1.91051
-1.91044
-1.91042
-1.91047
-1.91056
-1.91068
-1.91082
-1.91094
-1.91106
-1.91118
-1.91131
-1.91145
-1.91157
-1.91168
-1.91177
-1.91184
-1.91191
-1.91198
-1.91196
-1.91206
-1.91211
-1.91217
-1.91225
-1.91231
-1.91234
-1.91239
-1.91246
-1.91258
-1.91269
-1.91287
-1.91307
-1.91339
-1.91379
-1.91435
-1.91507
-1.91586
-1.91667
-1.9174
-1.91814
-1.91892
-1.91984
-1.92093
-1.92215
-1.92356
-1.9251
-1.92673
-1.9285
-1.92996
-1.93123
-1.93197
-1.93235
-1.93232
-1.93154
-1.93057
-1.92906
-1.92698
-1.92492
-1.92287
-1.92095
-1.91963
-1.91925
-1.9192
-1.91908
-1.9186
-1.918
-1.91713
-1.916
-1.91487
-1.9138
-1.91278
-1.912
-1.91141
-1.91093
-1.91055
-1.91031
-1.91025
-1.91033
-1.91047
-1.91065
-1.91084
-1.91098
-1.91111
-1.91128
-1.91145
-1.91156
-1.91161
-1.91165
-1.91171
-1.91181
-1.91189
-1.91195
-1.91199
-1.91202
-1.91205
-1.91207
-1.91203
-1.91208
-1.91208
-1.9121
-1.91212
-1.91216
-1.91219
-1.91226
-1.91237
-1.91255
-1.91278
-1.91309
-1.91344
-1.91386
-1.91432
-1.91489
-1.91558
-1.91642
-1.91739
-1.91839
-1.91949
-1.9206
-1.92168
-1.92285
-1.92406
-1.92542
-1.92686
-1.92836
-1.92975
-1.93089
-1.93166
-1.93204
-1.93185
-1.9308
-1.92931
-1.9273
-1.92509
-1.92294
-1.92108
-1.91956
-1.9189
-1.91901
-1.91933
-1.91935
-1.9189
-1.91805
-1.91696
-1.91579
-1.91457
-1.9135
-1.91245
-1.91163
-1.91102
-1.91059
-1.91032
-1.91015
-1.91008
-1.91011
-1.91022
-1.91034
-1.91046
-1.91061
-1.91077
-1.91091
-1.91103
-1.91116
-1.91131
-1.91148
-1.91163
-1.91169
-1.91168
-1.91164
-1.91161
-1.91161
-1.91158
-1.91154
-1.91151
-1.91153
-1.9116
-1.91171
-1.91187
-1.91186
-1.91217
-1.9125
-1.91293
-1.91345
-1.91405
-1.91479
-1.91559
-1.9165
-1.91748
-1.91862
-1.91989
-1.92133
-1.92296
-1.92473
-1.92675
-1.9289
-1.93108
-1.93351
-1.93584
-1.93837
-1.94086
-1.94252
-1.94423
-1.94558
-1.94582
-1.9459
-1.94478
-1.94328
-1.9413
-1.93691
-1.93239
-1.9282
-1.92359
-1.91887
-1.91226
-1.90503
-1.89799
-1.8916
-1.88419
-1.8763
-1.86934
-1.8631
-1.85844
-1.85513
-1.85221
-1.8513
-1.85058
-1.85166
-1.85302
-1.85514
-1.85775
-1.86063
-1.86368
-1.86682
-1.86996
-1.87311
-1.87627
-1.87936
-1.88229
-1.88496
-1.88731
-1.88912
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<scalar>
60
(
3616.77
3518.59
3420.34
3322.02
3223.61
3125.14
3026.58
2927.95
2829.25
2730.47
2631.61
2532.68
2433.67
2334.59
2235.42
2136.19
2036.87
1937.48
1838.01
1738.46
1638.83
1539.12
1439.33
1339.47
1239.52
1139.48
1039.37
939.162
838.869
738.486
638.008
537.434
436.759
335.98
235.091
134.033
40.7769
-0.696715
-0.810873
-0.903862
-0.986899
-1.06195
-1.13066
-1.1943
-1.25385
-1.31009
-1.36362
-1.41493
-1.46441
-1.51236
-1.55905
-1.60468
-1.64942
-1.69343
-1.73683
-1.77972
-1.82219
-1.86434
-1.90623
-1.94555
)
;
}
bottom
{
type calculated;
value nonuniform List<scalar>
357
(
3665.82
3682.75
3701.57
3722.25
3744.74
3769.03
3795.08
3822.77
3852
3882.65
3914.48
3947.15
3980.67
4014.7
4048.85
4082.73
4115.93
4148.08
4178.76
4207.56
4234.12
4258.04
4278.97
4296.6
4310.67
4320.95
4327.29
4329.53
4327.4
4321.18
4311.05
4297.1
4279.56
4258.71
4234.82
4208.23
4179.35
4148.57
4116.29
4082.93
4048.9
4014.58
3980.32
3946.65
3914.99
3883.25
3852.61
3823.32
3795.54
3769.41
3745
3722.35
3701.48
3682.4
3665.08
3649.5
3635.63
3623.41
3612.83
3603.83
3596.38
3590.44
3585.98
3582.91
3581.23
3581.46
3583.22
3586.49
3591.3
3597.64
3605.55
3615.05
3626.17
3638.93
3653.33
3669.38
3687.09
3706.46
3727.47
3750.11
3774.31
3800.03
3827.25
3855.87
3885.82
3916.98
3943.72
3975.99
4008.59
4041.24
4073.63
4105.43
4136.23
4165.68
4193.37
4218.92
4241.95
4262.1
4279.07
4292.57
4302.35
4308.25
4310.09
4307.86
4301.53
4291.19
4276.92
4258.9
4237.39
4212.69
4185.14
4155.13
4123.11
4089.52
4054.84
4019.54
3984.07
3948.87
3914.33
3880.79
3848.53
3817.82
3788.83
3761.71
3736.55
3713.39
3692.26
3673.14
3656
3640.78
3627.43
3615.85
3605.98
3597.74
3591.04
3585.81
3581.97
3579.47
3578.25
3578.28
3579.5
3581.91
3585.5
3590.29
3596.3
3603.56
3612.14
3622.08
3633.45
3646.32
3660.75
3676.82
3694.56
3714.02
3735.19
3758.07
3782.62
3808.76
3836.39
3865.4
3895.59
3926.97
3958.88
3991.22
4023.68
4055.88
4087.44
4117.93
4146.95
4174.05
4198.85
4220.94
4239.98
4255.68
4267.76
4276.03
4280.36
4280.62
4276.91
4269.2
4257.64
4242.38
4223.66
4201.75
4176.99
4149.72
4120.33
4089.23
4056.83
4023.56
3989.82
3955.99
3922.44
3889.5
3857.55
3826.64
3797.05
3768.95
3742.45
3717.63
3694.54
3673.2
3653.61
3635.77
3619.66
3605.26
3592.53
3581.45
3571.97
3564.07
3557.72
3552.87
3549.47
3547.54
3547.04
3547.9
3550.13
3553.71
3558.64
3564.91
3572.51
3581.46
3591.77
3603.46
3616.55
3631.06
3647.02
3664.44
3683.36
3703.77
3725.67
3749.03
3773.81
3799.95
3827.34
3855.89
3885.31
3915.44
3946.04
3976.84
4007.51
4037.73
4067.13
4095.33
4121.95
4146.6
4168.93
4188.57
4205.2
4218.53
4228.32
4234.39
4236.6
4234.82
4229.13
4219.59
4206.25
4189.32
4169.03
4145.69
4119.62
4091.21
4060.87
4029.03
3996.12
3962.59
3928.85
3895.33
3862.4
3830.41
3799.82
3770.93
3743.52
3717.84
3694.01
3672.13
3652.21
3634.27
3618.27
3604.15
3591.84
3581.28
3572.34
3564.95
3559.01
3554.43
3551.14
3549.05
3548.17
3548.54
3549.99
3552.79
3556.94
3562.45
3569.33
3577.6
3587.28
3598.41
3611
3625.08
3640.68
3657.8
3676.47
3696.68
3718.4
3741.64
3766.35
3792.45
3819.79
3848.22
3877.78
3908.25
3939.38
3970.89
4002.54
4034.04
4065.07
4095.31
4124.42
4152.07
4177.95
4201.7
4223.04
4241.67
4257.3
4269.69
4278.63
4283.94
4285.37
4282.95
4276.52
4266.18
4252.07
4234.34
4213.23
4189.06
4162.14
4132.87
4101.7
4069.1
4035.51
4001.47
3967.44
3933.92
3901.31
3870.5
3841.12
3812.65
3785.79
3760.79
3737.77
3716.79
3697.86
3680.97
3666.08
3653.1
3641.92
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
60
(
3592.87
3494.7
3396.46
3298.14
3199.75
3101.29
3002.76
2904.16
2805.48
2706.73
2607.91
2509.02
2410.05
2311.02
2211.91
2112.73
2013.47
1914.15
1814.75
1715.28
1615.74
1516.13
1416.44
1316.68
1216.85
1116.95
1016.98
916.935
816.819
716.631
616.371
516.04
415.637
315.162
214.617
114.01
32.4481
1.57016
0.994876
0.875916
0.752979
0.62665
0.49743
0.365797
0.23213
0.0967381
-0.0401257
-0.178253
-0.31747
-0.457628
-0.5986
-0.740275
-0.882558
-1.02536
-1.1686
-1.31222
-1.45614
-1.6003
-1.74464
-1.88912
)
;
}
atmosphere
{
type calculated;
value nonuniform List<scalar>
357
(
-1.96308
-1.96333
-1.96368
-1.96407
-1.96452
-1.96506
-1.96568
-1.9664
-1.96722
-1.96814
-1.96918
-1.97033
-1.97147
-1.97273
-1.97395
-1.97515
-1.97605
-1.97647
-1.97655
-1.97618
-1.97522
-1.97429
-1.97247
-1.97045
-1.9681
-1.96553
-1.96359
-1.96234
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.96201
-1.96207
-1.96217
-1.96231
-1.96251
-1.96275
-1.96304
-1.96337
-1.96376
-1.9642
-1.96469
-1.96522
-1.9658
-1.96645
-1.96719
-1.96792
-1.96885
-1.96973
-1.97077
-1.97199
-1.97319
-1.97461
-1.97608
-1.97749
-1.97911
-1.98034
-1.9816
-1.98249
-1.98257
-1.98214
-1.98069
-1.97875
-1.97608
-1.97299
-1.96986
-1.96684
-1.96437
-1.9627
-1.96202
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.96201
-1.96205
-1.9621
-1.96216
-1.96222
-1.96228
-1.96238
-1.96251
-1.96269
-1.96286
-1.96312
-1.96344
-1.96391
-1.96451
-1.96527
-1.96614
-1.96702
-1.96787
-1.96861
-1.9694
-1.97025
-1.97126
-1.97241
-1.97369
-1.97512
-1.97661
-1.97809
-1.97956
-1.98047
-1.98112
-1.98106
-1.98056
-1.97945
-1.9775
-1.97539
-1.97279
-1.96999
-1.96745
-1.96508
-1.96328
-1.96222
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.96202
-1.96206
-1.96211
-1.96218
-1.96228
-1.96241
-1.96259
-1.96284
-1.96314
-1.96352
-1.96394
-1.96446
-1.96507
-1.9658
-1.96664
-1.96759
-1.96865
-1.96971
-1.97084
-1.97193
-1.97298
-1.9741
-1.97522
-1.97644
-1.97767
-1.97884
-1.97973
-1.98029
-1.98029
-1.97975
-1.97841
-1.97628
-1.97381
-1.97103
-1.96836
-1.96592
-1.96399
-1.96265
-1.96209
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.96205
-1.96219
-1.9624
-1.96268
-1.96301
-1.96338
-1.9638
-1.96427
-1.96476
-1.96534
-1.96595
-1.96663
-1.96738
-1.96815
-1.96901
-1.96986
-1.97065
-1.97156
-1.97226
-1.97295
-1.97364
-1.97378
-1.97394
-1.97379
-1.97299
-1.97242
-1.97121
-1.96986
-1.96843
-1.96653
-1.96489
-1.96356
-1.96254
-1.96202
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
-1.962
)
;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
|
|
132f7c45bd3cd3b5fb1d0e8518c7186661be5ea4
|
1d04ac19a317a8efd5306a50ad7bdeb3882dcc52
|
/main.cpp
|
a8487b95c63403fdea94d81b885388635f3b2912
|
[
"MIT"
] |
permissive
|
GaryChristiansen42/GoMonteCarlo
|
432d788427efe49670bf03567a552ec5d6efc615
|
9b7d9028accac2243d81d39c4b9d0e73e8b37876
|
refs/heads/master
| 2021-01-20T10:14:11.637308
| 2019-02-24T02:15:30
| 2019-02-24T02:15:30
| 15,364,245
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,317
|
cpp
|
main.cpp
|
#include <assert.h>
#include <time.h>
#include <cstdlib>
#include <cstdio>
#include <string>
#include "UCT.h"
#include "Common.h"
const std::string patternsFile3x3 = "patterns3x3.pat";
const std::string patternsFile5x5 = "patterns5x5.pat";
UCTNode *root;
int main() {
printf("Go MonteCarloAI\n");
int numSimulations = 0;
float millaSecondsToThink = 15000;
auto b = new Board();
b->init();
UCTNode *currentNode;
root = new UCTNode(-1, -1, nullptr);
UCTNode::rootState = b;
currentNode = root;
b->show();
Patterns patterns;
// patterns.init(patternsFile3x3, patternsFile5x5);
GameResult result = None;
while (!b->isGameOver(&result)) {
if (b->turn == White) {
computerMove(¤tNode, b, numSimulations, millaSecondsToThink, nullptr); // &patterns);
} else {
// computerMove(¤tNode, b, numSimulations, millaSecondsToThink, nullptr); // &patterns);
playerMove(¤tNode, b);
// randomMove(¤tNode, b);
}
b->show();
}
if (result == Draw) {
printf("Draw\n");
} else if (static_cast<Player>(result) == Black) {
printf("Black Won\n");
} else {
printf("White Won\n");
}
float score = 0;
score = b->getTaylorScore(0.5);
printf("\nScore: %f\n", score);
delete currentNode;
delete b;
return 0;
}
|
a024549ac1311ce4906938d4aa0774e0aa7fd359
|
8e5202116dda09b2b43b6a87ea61265ed78e9dcf
|
/rmf_traffic/include/rmf_traffic/schedule/Change.hpp
|
34d177c3da596d111995812c87c454b5f47ec516
|
[
"Apache-2.0"
] |
permissive
|
CLOBOT-Co-Ltd/rmf_traffic
|
2391c465f9d20dbc646eb519a99df76fb5e81df0
|
f1432d8db96db9d69246e10f4c1fe3593f2ed069
|
refs/heads/main
| 2023-08-19T14:29:29.265096
| 2021-09-02T06:18:37
| 2021-09-02T06:18:37
| 404,172,946
| 2
| 0
|
Apache-2.0
| 2021-09-14T06:59:09
| 2021-09-08T01:29:17
| null |
UTF-8
|
C++
| false
| false
| 4,869
|
hpp
|
Change.hpp
|
/*
* Copyright (C) 2020 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef RMF_TRAFFIC__SCHEDULE__CHANGE_HPP
#define RMF_TRAFFIC__SCHEDULE__CHANGE_HPP
#include <rmf_traffic/schedule/Itinerary.hpp>
#include <rmf_traffic/schedule/Participant.hpp>
#include <rmf_traffic/schedule/Version.hpp>
#include <rmf_utils/macros.hpp>
namespace rmf_traffic {
namespace schedule {
//==============================================================================
/// A class that describes a change within the schedule
class Change
{
public:
//============================================================================
/// The API for an Add change
class Add
{
public:
/// A description of an addition
struct Item
{
/// The ID of the route being added
RouteId id;
/// The information for the route being added
ConstRoutePtr route;
};
/// Add a set of routes
Add(std::vector<Item> additions);
/// A reference to the Trajectory that was inserted.
const std::vector<Item>& items() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//============================================================================
/// The API for a Delay change
class Delay
{
public:
/// Add a delay
///
/// \param[in] duration
/// The duration of that delay.
Delay(Duration duration);
/// The duration of the delay.
Duration duration() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//============================================================================
/// A class that describes an erasing change.
class Erase
{
public:
/// Constructor
///
/// \param[in] id
/// The ID of the route that should be erased
Erase(std::vector<RouteId> ids);
const std::vector<RouteId>& ids() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//============================================================================
/// A class that describes a participant registration.
class RegisterParticipant
{
public:
/// Constructor
///
/// \param[in] id
/// The ID of the participant
///
/// \param[in] description
/// The description of the participant
RegisterParticipant(
ParticipantId id,
ParticipantDescription description);
/// The ID for the participant
ParticipantId id() const;
/// The description of the participant
const ParticipantDescription& description() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//============================================================================
/// A class that specifies a participant to unregister.
class UnregisterParticipant
{
public:
/// Constructor
///
/// \param[in] id
/// The ID of the participant that is being unregistered.
UnregisterParticipant(ParticipantId id);
/// The ID for the participant
ParticipantId id() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//============================================================================
/// A class that describes update in the participant info
class UpdateParticipantInfo
{
public:
/// Constructor
///
/// \param[in] id
/// The ID of the participant that is being unregistered.
UpdateParticipantInfo(ParticipantId id, ParticipantDescription desc);
/// The ID for the participant
ParticipantId id() const;
/// Description for participants
ParticipantDescription description() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//============================================================================
/// A class that describes a culling.
class Cull
{
public:
/// Constructor
///
/// \param[in] time
/// The time before which all routes should be culled
Cull(Time time);
Time time() const;
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
};
} // namespace schedule
} // namespace rmf_traffic
#endif // RMF_TRAFFIC__SCHEDULE__CHANGE_HPP
|
754f270a0a9740194f5b4b4e0259fb0cb9ab9833
|
c590f001d351f8668fefa2414f9de89c86bb3573
|
/rover_libs/Rover.cpp
|
9ed7e8180211e819db68d1e0ac5546f91225dbcf
|
[] |
no_license
|
CarneyC/rover_project
|
986384a4b550b2e4e086607b570a8c238681843f
|
0b97fba9b6f9bc65189e025cf740c7f45cc1dd23
|
refs/heads/master
| 2020-03-17T03:37:32.972070
| 2018-05-16T02:13:12
| 2018-05-16T02:13:12
| 133,243,513
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,101
|
cpp
|
Rover.cpp
|
/*
Rover.cpp
*/
#include <Arduino.h>
#include "Rover.h"
#include "Motor.h"
#include "Action.h"
Rover::Rover(Motor *leftMotor, Motor *rightMotor, bool debug) {
_leftMotor = leftMotor;
_rightMotor = rightMotor;
_debug = debug;
}
/*
Directional Controls
*/
void Rover::forward() {
setAction(Action::Forward);
}
void Rover::reverse() {
setAction(Action::Reverse);
}
void Rover::left() {
setAction(Action::Left);
}
void Rover::right() {
setAction(Action::Right);
}
void Rover::stop() {
setAction(Action::Stop);
}
/*
For controlling rover direction w/ debugging / State tracking
Will return false if same action is being performed.
*/
bool Rover::setAction(Action action) {
if (_lastAction == action) return false;
String direction;
switch (action) {
case Action::None:
return false;
case Action::Forward:
_forward();
direction = "Going Forward...";
break;
case Action::Reverse:
_reverse();
direction = "Reversing...";
break;
case Action::Left:
_left();
direction = "Turning Left...";
break;
case Action::Right:
_right();
direction = "Turning Right...";
break;
case Action::Stop:
_stop();
direction = "Stopping...";
break;
}
if (_debug) {
uint32_t end = millis();
if (_begin) {
// Serial.print("Last action elapsed time (ms): ");
// Serial.println(end - _begin);
}
_begin = end;
if (direction) Serial.println(direction);
}
_lastAction = action;
return true;
}
Action Rover::lastAction() {
return _lastAction;
}
/*
Directional Controls Helper Methods
Will not perform any action, if same method is used in succession
*/
void Rover::_forward() {
_leftMotor->forward();
_rightMotor->forward();
}
void Rover::_reverse() {
_leftMotor->reverse();
_rightMotor->reverse();
}
void Rover::_left() {
_leftMotor->reverse();
_rightMotor->forward();
}
void Rover::_right() {
_leftMotor->forward();
_rightMotor->reverse();
}
void Rover::_stop() {
_leftMotor->stop();
_rightMotor->stop();
}
|
ff55f9b303ececf1c6cedc7468215d2f51b3fba6
|
edd275e1e970319e88b7b267ef9367202c3fe5c6
|
/11953-Battleships.cpp
|
bc73cee8aa412d41353551824c2277a78fd800d7
|
[] |
no_license
|
israanagy/UVA-SOLUTIONS
|
19cee5d6bcfe782587de78b0829740e2230372d8
|
930339f525a69fa276ba7d03236a94e2e672a009
|
refs/heads/master
| 2020-03-14T01:29:16.014881
| 2016-02-03T18:09:20
| 2016-02-03T18:09:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,432
|
cpp
|
11953-Battleships.cpp
|
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<vector>
#define SZ 101
using namespace std;
vector<char>v;
char grid[SZ][SZ];
int m,n,cnt;
int x[]= {-1,0,0,1};
int y[]= {0,-1,1,0};
void dfs(int i,int j);
int main()
{
int u,t,i,j,k,flag;
char l;
scanf("%d",&t);
for(u=1;u<=t;u++)
{
cnt=0;
v.clear();
cin>>m;
for(i=0; i<m; i++)
scanf("%s",&grid[i]);
for(i=0; i<m; i++)
{
for(j=0; j<m; j++)
{
flag=0;
if(grid[i][j]=='x' || grid[i][j]=='@')
{
dfs(i,j);
k=v.size();
while(!v.empty())
{
l=v[--k];
v.pop_back();
if(l=='x')
flag=1;
}
if(flag==1)
cnt++;
}
}
}
cout<<"Case "<<u<<": "<<cnt<<endl;
}
return 0;
}
void dfs(int i,int j)
{
int a,b,c;
if(i<m && j<m && i>-1 && j>-1)
{
if(grid[i][j]=='x' || grid[i][j]=='@')
{
v.push_back(grid[i][j]);
grid[i][j]='.';
for(a=0; a<4; a++)
{
b=i+x[a];
c=j+y[a];
dfs(b,c);
}
}
}
return;
}
|
d64b5e5102a37d955d9f0d55e044be01102f32c1
|
2d9a39e04d03ffb8002d1c788c9e5726a90ea343
|
/src/property/editors/pixmapeditor.h
|
e1b0cce645eb1696adbee84c01ee9c11de3d4929
|
[] |
no_license
|
Gris87/ObjectController
|
099d5c7598d4b96cf9950de6d60fd270354d4eef
|
02dd66a0d212f2203e3ffc3562ee712c293a7ab2
|
refs/heads/master
| 2021-01-17T17:04:36.070839
| 2013-04-19T11:55:14
| 2013-04-19T11:55:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 833
|
h
|
pixmapeditor.h
|
#ifndef PIXMAPEDITOR_H
#define PIXMAPEDITOR_H
#include "customeditor.h"
#include <QPixmap>
namespace Ui {
class DialogEditor;
}
class PixmapEditor : public CustomEditor
{
Q_OBJECT
public:
enum DataType
{
PIXMAP,
IMAGE,
BITMAP
};
explicit PixmapEditor(QWidget *parent = 0);
~PixmapEditor();
void setIcon(const QIcon &aIcon);
void setValue(const QPixmap &aValue);
void setValue(const QImage &aValue);
void setValue(const QBitmap &aValue);
void handleAttributes(const PropertyAttributes *aAttributes);
protected:
DataType mDataType;
void putFocus();
void selectText();
private:
Ui::DialogEditor *ui;
QPixmap mValue;
const PropertyAttributes *mAttributes;
private slots:
void on_editButton_clicked();
};
#endif // PIXMAPEDITOR_H
|
707a18f5850d182a703f5661bc20c40e2169cf1a
|
661b53cf079a44e1b5e87ce55891f2c0f0847bbe
|
/RTLS190715/location.h
|
b43183a8223f041b5ece8199f96baf0e13ed98a6
|
[] |
no_license
|
Wxin96/RTLS
|
b50cd26a2df5802a1b4f0dba5ceccc005f05cf8f
|
e98ad9d60faf2aab6ba0840b4a7acade90215161
|
refs/heads/master
| 2023-04-21T07:44:12.882934
| 2021-05-11T03:43:11
| 2021-05-11T03:43:11
| 335,216,033
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 780
|
h
|
location.h
|
#ifndef LOCATION_H
#define LOCATION_H
#include <QWidget>
#include <QTimer>
#include <QCheckBox>
#include "trilateration.h"
class Location : public QWidget
{
Q_OBJECT
public:
explicit Location(QWidget *parent = nullptr);
signals:
public slots:
void handleTimeout(); //超时处理函数
void QCheckBox_toggled();
private:
QTimer *timer;
QCheckBox *Cbox_t[8];
void paintEvent(QPaintEvent *);
void paint_xy(int width,int height);
void paint_grid(int width,int height, int xn,int yn);
void paint_point(double x, double y, int id, bool flag);
void paint_anchor();
void paint_tag();
void paint_rect();
// 标签显示标志位
unsigned char tag_flag = 0;
// 圆心
int Ox;
int Oy;
};
#endif // LOCATION_H
|
80fb37be5ae8174c86a8469e2fa6ab0605ca2104
|
7d5074e124e8144c57c136b1e1ad6ab94304017a
|
/src/graphic/mesh.hpp
|
b0510f165ca8a1d466136c2641b56f7df16473d4
|
[] |
no_license
|
Thanduriel/wimp_s
|
3ced5abf3b989ce1752713a3d12107123a086a15
|
adb27d2777c6a98bd19370379ea9dc672613e7cc
|
refs/heads/master
| 2021-06-26T06:37:38.877709
| 2020-07-06T16:57:33
| 2020-07-06T16:57:33
| 90,191,659
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,060
|
hpp
|
mesh.hpp
|
#pragma once
#include <unordered_map>
#include "core/texture.hpp"
#include "core/vertexbuffer.hpp"
#include "utils/meshloader.hpp"
namespace Graphic {
class RawMesh
{
public:
RawMesh(const std::string& _pFile);
struct Vertex
{
ei::Vec3 position;
ei::Vec3 normal;
ei::Vec2 textureCoords;
};
void Load(std::istream& _stream, size_t _numVertices);
VertexArrayBuffer m_vertices;
std::unordered_map<std::string, ei::Vec3> m_sockets;
std::string m_textureName; //< the texture that is linked in the mesh file
Utils::MeshInfo m_meshBounds;
};
class Mesh
{
public:
Mesh(const std::string& _pFile, const std::string& _texture = "");
void Draw() const;
// Returns the radius of the minimum sized sphere
// positioned at point 0, that contains all vertices.
const Utils::MeshInfo& GetMeshBounds() const { return m_geometry.m_meshBounds; }
const ei::Vec3& GetSocket(const std::string& _name) const;
private:
const RawMesh& m_geometry;
Texture* m_texture;
friend class Resources; // to allow preloading
};
}
|
b6065b7d36fa17a57a3ee27a5cf744dd404de8b8
|
3e1100ed62af341f5fbc987f3a6133bf3cef23e3
|
/SPL-1/GroupMenu.cpp
|
660060312b91884a575e843c234ca1825b20b46c
|
[] |
no_license
|
Muktar16/SPL1
|
2124c0715e0be82e868530e29d5c17eaff8b0f07
|
c6f253249f73466724d706e7e7bf5ffe5b30170a
|
refs/heads/master
| 2021-11-17T13:59:26.742382
| 2021-08-29T05:42:21
| 2021-08-29T05:42:21
| 239,709,600
| 3
| 0
| null | 2020-02-15T13:57:24
| 2020-02-11T08:14:46
|
C++
|
UTF-8
|
C++
| false
| false
| 5,676
|
cpp
|
GroupMenu.cpp
|
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include"header.h"
void groupMenu()
{
//initilizing a window to get input data
initGraph("Getting input for grouped data",0,0,-3,-3);
char tempString[100];
moveto(0,0);
newLine();
setcolor(LIGHTGREEN);
outtext("Enter Number of classes or Groups: ");
getGrString(tempString);
int n = atoi(tempString);
double LB[n],UB[n];//LB=Lower Boundary, UB=Upper Boundary
int F[n];//Frequency of each class
int maxy = getmaxy();
newLine();
for(int i=0;i<n;i++)
{
char temp[20];
if(gety()>=maxy-150)
{
cleardevice();
moveto(0,0);
newLine();
}
else
{
newLine();
newLine();
}
sprintf(temp,"CLASS-%d:",i+1);
outtext(temp);
newLine();
outtext("Enter Lower Boundery: ");
getGrString(temp);
LB[i]=atoi(temp);
newLine();
outtext("Enter Upper Boundery: ");
getGrString(temp);
UB[i]=atoi(temp);
newLine();
outtext("Frequency: ");
getGrString(temp);
F[i]=atoi(temp);
}
closegraph();
while(1)
{
initGraph("Msin Menu Window",0,0,-3,-3);
setcolor(LIGHTCYAN);
settextstyle(BOLD_FONT,HORIZ_DIR,5);
outtextxy(510,20,"CHOOSE AN OPTION");
setcolor(8);
rectangle(500,100,905,130);//Display frequency distribution table
rectangle(500,160,905,190);//Display final results
rectangle(500,220,905,280);//Display Frequency Distribution Table and Final Results
rectangle(500,310,905,340);//Display Frequency Polygon
rectangle(500,370,905,400);//Display ogive
rectangle(500,430,905,460);//Display pie Chart
rectangle(500,490,905,520);//Display Histogram
rectangle(500,550,905,580);//Back to main menu
rectangle(500,610,905,640);//Exit
setcolor(LIGHTBLUE);
settextstyle(BOLD_FONT,HORIZ_DIR,1);
outtextxy(505,105,"Display Frequency Distribution Table");
outtextxy(580,165,"Display final results");
outtextxy(535,225,"Display Frequency Distribution");
outtextxy(575,255,"table and Final Results");
outtextxy(565,315,"Display Frequency Polygon");
outtextxy(630,375,"Display Ogive");
outtextxy(605,435,"Display pie Chart");
outtextxy(605,495,"Display Histogram");
outtextxy(605,555,"Back to Main Menu");
setcolor(RED);
outtextxy(685,615,"Exit");
delay(500);
POINT position;
position.x=0;
position.y=0;
int x,y;
while(1)
{
if(GetKeyState(VK_LBUTTON)&0x8000) GetCursorPos(&position);
x = position.x;
y = position.y;
if(x>=500&&x<=905 && y>=100&&y<=140)
{
closegraph();
system("cls||clear");
printFDtable(LB,UB,F,n);
cout<<"\n\n\t\t\t\t\t\t\tPress Any Key To Continue..............";
_getch();
break;
}
else if(x>=500&&x<=905 && y>=160&&y<=200)
{
closegraph();
system("cls||clear");
printf("\n\n\n\n\n\n\n\n\n");
printFinalResults(LB,UB,F,n);
cout<<"\n\n\t\t\t\t\t\t\tPress Any Key To Continue..............";
_getch();
break;
}
else if(x>=500&&x<=905 && y>=220&&y<=290)
{
closegraph();
system("cls||clear");
printFDtable(LB,UB,F,n);
printf("\n\n\n");
printFinalResults(LB,UB,F,n);
cout<<"\n\n\n\t\t\t\t\t\t\tPress Any Key To Continue..............";
_getch();
break;
}
else if(x>=500&&x<=905 && y>=310&&y<=350)
{
closegraph();
system("cls||clear");
printFrequencyPolygon(LB,UB,F,n);
break;
}
else if(x>=500&&x<=905 && y>=370&&y<=410)
{
closegraph();
system("cls||clear");
printOgive(LB,UB,F,n);
break;
}
else if(x>=500&&x<=905 && y>=430&&y<=470)
{
closegraph();
system("cls||clear");
printPieChart(F,n);
break;
}
else if(x>=500&&x<=905 && y>=490&&y<=530)
{
closegraph();
system("cls||clear");
printHistogram(LB,UB,F,n);
break;
}
else if(x>=500&&x<=905 && y>=550&&y<=590)
{
closegraph();
system("cls||clear");
main_menu();
return;
}
else if(x>=500&&x<=905 && y>=610&&y<=650)
{
cleardevice();
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(LIGHTGREEN);
outtextxy(getmaxx()/2-150,getmaxy()/2,"THANK YOU");
delay(2000);
closegraph();
exit(0);
}
else
{
continue;
}
}
}
return;
}
|
4fb7a692fc4e323c91b12182bd1fbee0e190c2b6
|
1187264d0baba88299eb7bc27eca0ae0e931212c
|
/toolkit/crashreporter/google-breakpad/src/processor/testdata/linux_test_app.cc
|
5ca40819a69a2b9512e512d356d7edb66727b83a
|
[
"FSFUL",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
c3358/gecko-dev-comments-removed
|
2d3be3e27948e3f3be85b85bfbae5f7cc374ab53
|
33a3f2865853f8e4fe6f11c0aa78380fc2f7f679
|
refs/heads/master
| 2023-04-14T05:00:35.369189
| 2019-07-27T14:34:45
| 2019-07-27T14:34:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 867
|
cc
|
linux_test_app.cc
|
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <string>
#include "client/linux/handler/exception_handler.h"
#include "third_party/lss/linux_syscall_support.h"
namespace {
static bool callback(const char *dump_path, const char *id,
void *context,
bool succeeded) {
if (succeeded) {
printf("dump guid is %s\n", id);
} else {
printf("dump failed\n");
}
fflush(stdout);
return succeeded;
}
static void CrashFunction() {
int *i = reinterpret_cast<int*>(0x45);
*i = 5;
}
}
int main(int argc, char **argv) {
google_breakpad::ExceptionHandler eh(".", NULL, callback, NULL, true);
if (!eh.WriteMinidump()) {
printf("Failed to generate on-demand minidump\n");
}
CrashFunction();
printf("did not crash?\n");
return 0;
}
|
34cadbdca8f17e5895b655e5444aa9bcf0dcb4d9
|
abd329d24761e93574e612955ecda71151a82aa8
|
/Post/Post/_Config.cpp
|
1a734b8da1c71878de00005a195d20d3f805c1ab
|
[
"MIT"
] |
permissive
|
stackprobe/Post
|
0c9ba9aaa4252e3a4c476eb61befa52014b712e0
|
d3a9432f9570551ef233a24949e6db21f6308583
|
refs/heads/master
| 2021-07-15T11:46:40.055455
| 2021-05-07T17:45:28
| 2021-05-07T17:45:28
| 100,010,277
| 0
| 0
| null | null | null | null |
SHIFT_JIS
|
C++
| false
| false
| 2,184
|
cpp
|
_Config.cpp
|
#include "all.h"
#define RTTE_LENMAX 1000
// ---- items ----
__int64 DiskFreeMin = 2000000000;
int CopyBuffSize = 20000000;
// ----
static int ConfLineNo;
static char *ReadConfLine(FILE *fp)
{
for(; ; )
{
char *line = readLine(fp);
errorCase_m(!line, "read eof @ config-file");
ConfLineNo++;
if(line[0] == '\0') // 空行
continue;
if(line[0] == ';') // コメント行
continue;
cout("confLine(%d): %s\n", ConfLineNo, line);
return line;
}
}
static int ToInt_x(char *line, int minval, int maxval)
{
errorCase(maxval < minval);
int value;
if(!_stricmp(line, "IMAX"))
value = IMAX;
else
value = atoi(line);
errorCase_m(!m_isRange(value, minval, maxval), "out of range @ config-file");
memFree(line);
return value;
}
void LoadConfig(void)
{
// ---- set default ----
// none
// ----
LOGPOS();
char *confFile = (char *)memAlloc(strlen(getSelfFile()) + 100);
strcpy(confFile, getSelfFile());
strcpy(strchr(confFile, '\0') - 3, "conf");
if(existFile(confFile))
{
LOGPOS();
FILE *fp = fileOpen(confFile, "rt");
ConfLineNo = 0;
// ---- read items ----
DiskFreeMin = ToInt_x(ReadConfLine(fp), 1, IMAX);
DiskFreeMin *= 1000000;
CopyBuffSize = ToInt_x(ReadConfLine(fp), 1, 100);
CopyBuffSize *= 1000000;
// ----
fileClose(fp);
}
memFree(confFile);
cout("DiskFreeMin: %I64d\n", DiskFreeMin);
cout("CopyBuffSize: %d\n", CopyBuffSize);
}
__int64 GetReqContentLengthMax(void)
{
static __int64 ret = 9220000000000000001;
static int retLoaded;
if(!retLoaded)
{
char *clmFile = (char *)memAlloc(strlen(getSelfFile()) + 100);
strcpy(clmFile, getSelfFile());
strcpy(strchr(clmFile, '\0') - 7, "utFile.dat");
if(existFile(clmFile))
{
FILE *fp = fileOpen(clmFile, "rb");
memFree(readLine(fp)); // 1行目
ret = _atoi64(readLine(fp)); // 2行目 == UploadDirSizeMax
m_range(ret, 1, I64_TOO_BIG);
fileClose(fp);
cout("rclm_orig: %I64d\n", ret);
// margin
{
uint64 tmp = ret;
tmp += 1000000;
tmp += tmp / 2;
m_minim(tmp, I64_TOO_BIG);
ret = (__int64)tmp;
}
}
memFree(clmFile);
}
cout("ReqContentLengthMax: %I64d\n", ret);
return ret;
}
|
d0a97bde8066b08b60dc1b928dd683e474010ec9
|
b9e81049058e1f8f0821521c1b2846d91257e235
|
/owl/graphics/image_temp.hpp
|
876a579d64d3bf80f89c816b0b1264817bf61c06
|
[
"MIT"
] |
permissive
|
soerenkoenig/owl
|
3b984ffd3218097bbdb9c821433465618b4bf519
|
ab10054514a7a5b12a6b81665b3b264cfe37b0f3
|
refs/heads/master
| 2021-09-11T00:20:10.265063
| 2018-04-04T23:25:21
| 2018-04-04T23:25:21
| 106,728,239
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 10,939
|
hpp
|
image_temp.hpp
|
//
// .___.
// {o,o}
// ./)_)
// owl --"-"---
//
// Copyright © 2017 Sören König. All rights reserved.
//
#pragma once
#include <algorithm>
#include <array>
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
#include <exception>
#include "owl/utils/file_utils.hpp"
#include "owl/utils/buffer.hpp"
#define STBI_NO_STDIO
#define STB_IMAGE_IMPLEMENTATION
//#define STB_IMAGE_STATIC
#define STB_IMAGE_INLINE
#include "stb/stb_image.h"
#define STB_IMAGE_RESIZE_IMPLEMENTATION
//#define STB_IMAGE_RESIZE_STATIC
#define STB_IMAGE_RESIZE_INLINE
#include "stb/stb_image_resize.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
//#define STB_IMAGE_WRITE_STATIC
#define STB_IMAGE_WRITE_INLINE
#include "stb/stb_image_write.h"
namespace owl
{
namespace graphics
{
class image_error : public std::exception
{
public:
explicit image_error(const std::string &msg)
: msg_(msg)
{}
const char *what() const throw() override
{
return msg_.c_str();
}
private:
std::string msg_;
};
/*
namespace detail {
template <typename T>
typename std::enable_if<std::is_unsigned<T>::value, T>::type saturated_sub(
T s1, T s2) {
return s1 > s2 ? static_cast<T>(s1 - s2) : 0;
}
template <typename T>
typename std::enable_if<!std::is_unsigned<T>::value, T>::type saturated_sub(
T s1, T s2) {
return static_cast<T>(s1 - s2);
}
inline void resize_image_core(const uint8_t *src,
int srcw,
int srch,
uint8_t *dst,
int dstw,
int dsth,
int channels) {
stbir_resize_uint8(src, srcw, srch, 0, dst, dstw, dsth, 0, channels);
}
inline void resize_image_core(const float *src,
int srcw,
int srch,
float *dst,
int dstw,
int dsth,
int channels) {
stbir_resize_float(src, srcw, srch, 0, dst, dstw, dsth, 0, channels);
}
} // namespace detail*/
enum class image_type
{
grayscale, ///< load image and convert automatically to 8-bit grayscale
rgb, ///< load image and keep original color channels
bgr
};
void writer(void *context, void *data, int size)
{
utils::buffer& buf = *reinterpret_cast<utils::buffer*>(context);
buf.append(utils::buffer(data,size,false));
}
/**
* Simple image utility class
*/
template <typename T = unsigned char>
class image {
public:
typedef T intensity_t;
typedef typename std::vector<intensity_t>::iterator iterator;
typedef typename std::vector<intensity_t>::const_iterator const_iterator;
image() : width_(0), height_(0), depth_(1) {}
/**
* create image from raw pointer
*/
image(const intensity_t *data, size_t width, size_t height, image_type type = image_type::rgb)
: width_(width),
height_(height),
depth_(type == image_type::grayscale ? 1 : 3),
type_(type),
data_(depth_ * width_ * height_, 0)
{
std::copy(data, data + width * height * depth_, data_.data());
}
template <typename U>
image(const image<U> &rhs)
: width_(rhs.width()),
height_(rhs.height()),
depth_(rhs.depth()),
type_(rhs.type()),
data_(rhs.shape().size())
{
std::transform(rhs.begin(), rhs.end(), data_.begin(),
[](T src) { return static_cast<intensity_t>(src); });
}
image(const std::string &path, image_type type = image_type::rgb)
{
utils::buffer buf;
if(!owl::utils::file_exists(path))
throw image_error("image file does not exist: " + path);
if(!owl::utils::read_file(path, buf))
throw image_error("failed to load image from file: " + path);
int w;
int h;
int d;
stbi_uc *input_pixels = stbi_load_from_memory(buf.data(),(int)buf.size(), &w, &h, &d, STBI_rgb);
if(input_pixels == nullptr)
{
throw image_error("failed to open image:" +
std::string(stbi_failure_reason()));
}
width_ = w;
height_ = h;
depth_ = type == image_type::grayscale ? 1 : 3;
type_ = type;
data_.resize(width_ * height_ * depth_);
// reorder to HxWxD -> DxHxW
from_rgb(input_pixels, input_pixels + data_.size());
stbi_image_free(input_pixels);
}
bool save_jpg(const std::string &path, int quality = 96) const
{
// std::string extension = owl::utils::file_extension(path);
utils::buffer buf;
int ret = stbi_write_jpg_to_func(&writer, &buf, static_cast<int>(width_),
static_cast<int>(height_), 3, data(), quality);
if(ret == 0)
return false;
return utils::write_file(path, buf);
}
bool save_bmp(const std::string &path) const
{
utils::buffer buf;
int ret = stbi_write_bmp_to_func(&writer,&buf, static_cast<int>(width_),
static_cast<int>(height_),3, data());
if(ret == 0)
return false;
return utils::write_file(path, buf);
}
bool save_png(const std::string &path) const
{
utils::buffer buf;
int ret = stbi_write_png_to_func(&writer, static_cast<int>(width_),
static_cast<int>(height_), 3,
data(), 0);
if(ret == 0)
return false;
return utils::write_file(path, buf);
}
// stbi_image_free(image);
/* if (extension == "png")
{
ret = stbi_write_png(path.c_str(), static_cast<int>(width_),
static_cast<int>(height_), static_cast<int>(depth_),
(const void *)&buf[0], 0);
}
else if(extension =="bmp")
{
ret = stbi_write_bmp(path.c_str(), static_cast<int>(width_),
static_cast<int>(height_), static_cast<int>(depth_),
(const void *)&buf[0]);
}
*/
void resize(size_t width, size_t height)
{
data_.resize(width * height * depth_);
width_ = width;
height_ = height;
// depth_ = depth;
}
void fill(intensity_t value) { std::fill(data_.begin(), data_.end(), value); }
intensity_t operator()(size_t x, size_t y, size_t z = 0)
{
return data_[z * width_ * height_ + y * width_ + x];
}
intensity_t &at(size_t x, size_t y, size_t z = 0)
{
return data_.at(z * width_ * height_ + y * width_ + x);
}
const intensity_t &operator()(size_t x, size_t y, size_t z = 0) const
{
return data_[z * width_ * height_ + y * width_ + x];
}
const intensity_t &at(size_t x, size_t y, size_t z = 0) const
{
return data_.at(z * width_ * height_ + y * width_ + x);
}
bool empty() const { return data_.empty(); }
iterator begin() { return data_.begin(); }
iterator end() { return data_.end(); }
const_iterator begin() const { return data_.begin(); }
const_iterator end() const { return data_.end(); }
intensity_t &operator[](std::size_t idx) { return data_[idx]; }
const intensity_t &operator[](std::size_t idx) const { return data_[idx]; }
size_t width() const { return width_; }
size_t height() const { return height_; }
size_t depth() const { return depth_; }
image_type type() const { return type_; }
size_t size() const { return width_ * height_ *depth_; }
const auto* data() const { return data_.data(); }
auto* data() { return data_.data(); }
template <typename U>
std::vector<U> to_rgb() const
{
if (depth_ == 1) {
return std::vector<U>(data_.begin(), data_.end());
} else {
std::vector<U> buf(size());
auto order = depth_order(type_);
auto dst = buf.begin();
for (size_t y = 0; y < height_; y++)
for (size_t x = 0; x < width_; x++)
for (size_t i = 0; i < depth_; i++)
*dst++ = static_cast<U>(at(x, y, order[i]));
return buf;
}
}
template <typename Iter>
void from_rgb(Iter begin, Iter end)
{
if (depth_ == 1) {
std::copy(begin, end, data_.begin());
} else {
auto order = depth_order(type_);
assert(std::distance(begin, end) == static_cast<int>(data_.size()));
for (size_t y = 0; y < height_; y++)
for (size_t x = 0; x < width_; x++)
for (size_t i = 0; i < depth_; i++)
at(x, y, order[i]) = static_cast<intensity_t>(*begin++);
}
}
private:
std::array<size_t, 3> depth_order(image_type img) const
{
if (img == image_type::rgb) {
return {{0, 1, 2}};
} else {
assert(img == image_type::bgr);
return {{2, 1, 0}};
}
}
size_t width_;
size_t height_;
size_t depth_;
image_type type_;
std::vector<intensity_t> data_;
};
/**
* resize image into width x height
* This function use Mitchell-Netrevalli filter with B=1/3, C=1/3 for
* downsampling, and
* and cubic spline algorithm for upsampling.
template <typename T>
inline image<T> resize_image(const image<T> &src, int width, int height) {
image<T> resized(shape3d(width, height, src.depth()), src.type());
std::vector<T> src_rgb = src.template to_rgb<T>();
std::vector<T> dst_rgb(resized.shape().size());
detail::resize_image_core(&src_rgb[0], static_cast<int>(src.width()),
static_cast<int>(src.height()), &dst_rgb[0], width,
height, static_cast<int>(src.depth()));
resized.from_rgb(dst_rgb.begin(), dst_rgb.end());
return resized;
}
// dst[x,y,d] = lhs[x,y,d] - rhs[x,y,d]
template <typename T>
image<T> subtract_image(const image<T> &lhs, const image<T> &rhs) {
if (lhs.shape() != rhs.shape()) {
throw nn_error("Shapes of lhs/rhs must be same. lhs:" +
to_string(lhs.shape()) + ",rhs:" + to_string(rhs.shape()));
}
image<T> dst(lhs.shape(), lhs.type());
auto dstit = dst.begin();
auto lhsit = lhs.begin();
auto rhsit = rhs.begin();
for (; dstit != dst.end(); ++dstit, ++lhsit, ++rhsit)
{
*dstit = detail::saturated_sub(*lhsit, *rhsit);
}
return dst;
}
template <typename T>
image<T> subtract_scalar(const image<T> &lhs, const image<T> &rhs) {
if (lhs.depth() != rhs.depth()) {
throw nn_error("Depth of lhs/rhs must be same. lhs:" +
to_string(lhs.depth()) + ",rhs:" + to_string(rhs.depth()));
}
if (rhs.width() != 1 || rhs.height() != 1) {
throw nn_error("rhs must be 1x1xN");
}
image<T> dst(lhs.shape(), lhs.type());
auto dstit = dst.begin();
auto lhsit = lhs.begin();
auto rhsit = rhs.begin();
for (size_t i = 0; i < lhs.depth(); i++, ++rhsit) {
for (size_t j = 0; j < lhs.width() * lhs.height(); j++, ++dstit, ++lhsit) {
*dstit = detail::saturated_sub(*lhsit, *rhsit);
}
}
return dst;
}*/
}
}
|
bf2ea0a8ad50eed63720d6f1bd9457a081802b6f
|
0a97d34e8e0348ad54b69ecbaed381ef9ddd7592
|
/include/ffmpeg_image_transport/ffmpeg_publisher.h
|
8e8710718879279c5725602e5f6babcac65cf669
|
[
"Apache-2.0"
] |
permissive
|
daniilidis-group/ffmpeg_image_transport
|
2f29d574e3b6777b19385b03973bfb240f207104
|
46bef773bb86149dc706cdb080755d534ef880f6
|
refs/heads/master
| 2023-03-13T03:12:30.810810
| 2023-02-21T00:13:05
| 2023-02-21T00:13:05
| 157,615,538
| 40
| 11
| null | 2022-05-10T11:47:54
| 2018-11-14T21:49:11
|
C++
|
UTF-8
|
C++
| false
| false
| 2,421
|
h
|
ffmpeg_publisher.h
|
/* -*-c++-*--------------------------------------------------------------------
* 2018 Bernd Pfrommer bernd.pfrommer@gmail.com
*/
#pragma once
#include "ffmpeg_image_transport_msgs/FFMPEGPacket.h"
#include "ffmpeg_image_transport/ffmpeg_encoder.h"
#include "ffmpeg_image_transport/EncoderDynConfig.h"
#include <image_transport/simple_publisher_plugin.h>
#include <dynamic_reconfigure/server.h>
#include <mutex>
#include <memory>
namespace ffmpeg_image_transport {
typedef image_transport::SimplePublisherPlugin<
ffmpeg_image_transport_msgs::FFMPEGPacket> FFMPEGPublisherPlugin;
class FFMPEGPublisher : public FFMPEGPublisherPlugin {
typedef std::unique_lock<std::recursive_mutex> Lock;
using FFMPEGPacketConstPtr = ffmpeg_image_transport_msgs::FFMPEGPacketConstPtr;
public:
virtual std::string getTransportName() const override {
return "ffmpeg";
}
void configure(EncoderDynConfig& config, int level);
protected:
// override to set up reconfigure server
virtual void advertiseImpl(ros::NodeHandle &nh,
const std::string &base_topic,
uint32_t queue_size,
const image_transport::SubscriberStatusCallback
&user_connect_cb,
const image_transport::SubscriberStatusCallback
&user_disconnect_cb,
const ros::VoidPtr &tracked_object,
bool latch) override;
void publish(const sensor_msgs::Image& message,
const PublishFn& publish_fn) const override;
void connectCallback(const ros::SingleSubscriberPublisher &pub) override;
void disconnectCallback(const ros::SingleSubscriberPublisher &pub) override;
private:
void packetReady(const FFMPEGPacketConstPtr &pkt);
void setCodecFromConfig(const EncoderDynConfig &cfg);
void initConfigServer();
// variables ---------
typedef dynamic_reconfigure::Server<EncoderDynConfig> ConfigServer;
std::shared_ptr<ros::NodeHandle> nh_;
std::shared_ptr<ConfigServer> configServer_;
const PublishFn *publishFunction_{NULL};
FFMPEGEncoder encoder_;
unsigned int frameCounter_{0};
EncoderDynConfig config_;
std::recursive_mutex configMutex_;
};
}
|
ed5d8dbe6cd1f6d4b0a4013175d8c81fd2295a8b
|
8191b10c144b42ea0cd8f343d66e214e264b5c34
|
/manage/customer.cpp
|
1eaeeb1938895ea72ff6a4726da6a426ac63bf68
|
[] |
no_license
|
niwa3/NewRM
|
87cf7ba8d3d46c020108aa7422376200352e64aa
|
29d152bb301714f1115d1492b8265905acde527c
|
refs/heads/master
| 2021-01-23T07:44:44.123428
| 2018-01-30T06:22:18
| 2018-01-30T06:37:53
| 86,441,620
| 0
| 0
| null | 2018-02-09T05:54:46
| 2017-03-28T09:33:57
|
JavaScript
|
UTF-8
|
C++
| false
| false
| 1,894
|
cpp
|
customer.cpp
|
#include "manage.h"
//============CustomerManageFuncs============
CustomerManageFuncs::CustomerManageFuncs(std::string filename)
{
std::ifstream db_conf(filename.c_str(), std::ios::in);
std::string reading_line_buffer;
std::vector<std::string> conf;
std::string dbname;
std::string user;
std::string password;
while(std::getline(db_conf, reading_line_buffer)){
std::cout<<reading_line_buffer<<std::endl;
std::string separated_string_buffer;
std::istringstream line_separater(reading_line_buffer);
while(std::getline(line_separater, separated_string_buffer, '=')){
std::istringstream separated_word(separated_string_buffer);
std::string tmp_conf;
separated_word>>tmp_conf;
conf.push_back(tmp_conf);
}
}
for(std::vector<std::string>::iterator itr = conf.begin(); itr!=conf.end(); itr++){
if(*itr=="dbname")dbname=*(itr+1);
else if(*itr=="username")user=*(itr+1);
else if(*itr=="password")password=*(itr+1);
}
c_dao.reset(new CustomerInfoDao(dbname,user,password));
}
int CustomerManageFuncs::register_Cinfo(
int l_id,
std::string last_name,
std::string first_name,
std::string birthday,
std::string phone_num,
std::string e_mail_addr)
{
return c_dao->put(l_id, last_name, first_name, birthday, phone_num, e_mail_addr);
}
std::vector<CustomerInfo> CustomerManageFuncs::fetch_Cinfo_by_l_id(int l_id)
{
std::vector<CustomerInfo> cus_info_from_db;
if (c_dao->fetch("where l_id="+std::to_string(l_id), cus_info_from_db)){return cus_info_from_db;}
else return cus_info_from_db;
}
bool CustomerManageFuncs::update_Cinfo_by_c_id(int c_id, std::string set_attr){
return c_dao->update(set_attr, "id = " + std::to_string(c_id));
}
bool CustomerManageFuncs::delete_Cinfo_by_c_id(int c_id){
return c_dao->del("id = "+std::to_string(c_id));
}
//=========================================
|
95a6d936805b02188018e60a57608c1a00b78803
|
4e50fdff0d24766bc2a01aa511e4734715ff5cf6
|
/Win32Project1/render/shaderscontainer.cpp
|
f4ab1a82c667e77a9b96ec57b2752c95fd69f01d
|
[] |
no_license
|
GPUWorks/Tiny3D
|
e21465d3921fca8fc71bb48141bffdc573eb3ae6
|
72155449644b4046dbe09f18a9cd59f2953e0f57
|
refs/heads/master
| 2020-03-19T17:21:48.664089
| 2018-05-24T08:50:17
| 2018-05-24T08:51:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,665
|
cpp
|
shaderscontainer.cpp
|
#include "shaderscontainer.h"
#define PHONG_VERT "shader/phong.vert"
#define PHONG_FRAG "shader/phong.frag"
#define PHONG_INS_VERT "shader/phong_ins.vert"
#define PHONG_INS_FRAG "shader/phong_ins.frag"
#define BONE_VERT "shader/bone.vert"
#define BONE_FRAG "shader/bone.frag"
#define PHONG_SHADOW_VERT "shader/phong_shadow.vert"
#define PHONG_SHADOW_INS_VERT "shader/phong_shadow_ins.vert"
#define PHONG_SHADOW_FRAG "shader/phong_shadow.frag"
#define PHONG_SHADOW_LOW_VERT "shader/phong_shadow_low.vert"
#define PHONG_SHADOW_LOW_INS_VERT "shader/phong_shadow_low_ins.vert"
#define PHONG_SHADOW_LOW_FRAG "shader/phong_shadow_low.frag"
#define BONE_SHADOW_VERT "shader/bone_shadow.vert"
#define BONE_SHADOW_FRAG "shader/bone_shadow.frag"
#define SKY_VERT "shader/sky.vert"
#define SKY_FRAG "shader/sky.frag"
#define DEFERRED_VERT "shader/deferred.vert"
#define DEFERRED_FRAG "shader/deferred.frag"
#define TERRAIN_VERT "shader/terrain.vert"
#define TERRAIN_FRAG "shader/terrain.frag"
void SetupShaders(Render* render) {
Shader* phong=render->shaders->addShader("phong",PHONG_VERT,PHONG_FRAG);
render->useShader(phong);
phong->setSampler("texture",0);
phong->setInt("useShadow", 0);
Shader* phongIns = render->shaders->addShader("phong_ins", PHONG_INS_VERT, PHONG_INS_FRAG);
render->useShader(phongIns);
phongIns->setSampler("texture", 0);
phongIns->setInt("useShadow", 0);
Shader* terrain = render->shaders->addShader("terrain", TERRAIN_VERT, TERRAIN_FRAG);
render->useShader(terrain);
terrain->setSampler("texture", 0);
terrain->setInt("useShadow", 0);
Shader* bone=render->shaders->addShader("bone",BONE_VERT,BONE_FRAG);
render->useShader(bone);
bone->setSampler("texture",0);
render->shaders->addShader("phong_s", PHONG_SHADOW_VERT, PHONG_SHADOW_FRAG);
render->shaders->addShader("phong_sl", PHONG_SHADOW_LOW_VERT, PHONG_SHADOW_LOW_FRAG);
render->shaders->addShader("phong_s_ins", PHONG_SHADOW_INS_VERT, PHONG_SHADOW_FRAG);
render->shaders->addShader("phong_sl_ins", PHONG_SHADOW_LOW_INS_VERT, PHONG_SHADOW_LOW_FRAG);
render->shaders->addShader("bone_s", BONE_SHADOW_VERT, BONE_SHADOW_FRAG);
Shader* sky=render->shaders->addShader("sky",SKY_VERT,SKY_FRAG);
render->useShader(sky);
sky->setSampler("textureSky",0);
Shader* deferred = render->shaders->addShader("deferred", DEFERRED_VERT, DEFERRED_FRAG);
render->useShader(deferred);
deferred->setSampler("texBuffer", 0);
deferred->setSampler("colorBuffer", 1);
deferred->setSampler("normalBuffer", 2);
deferred->setSampler("depthBuffer", 3);
deferred->setSampler("depthBufferNear", 4);
deferred->setSampler("depthBufferMid", 5);
deferred->setSampler("depthBufferFar", 6);
}
|
92435ee2ab7b77fb41379707d17ff8df59252bd6
|
c5cb9f46558c568420f3a8002b07ee82abe1d303
|
/c++/tuan 2/code/BAI01/cPhanSo.cpp
|
4e04e2a14f0a4bd5e7df926fb072814999658829
|
[] |
no_license
|
phuocpro1969/C-Full
|
5336eede0a781b89c0f7451206a91c8d5f31c274
|
49e22400e157129cb04392f7cf3c9642f423f727
|
refs/heads/master
| 2020-05-23T14:27:14.979008
| 2019-05-15T20:18:17
| 2019-05-15T20:18:17
| 186,802,313
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,643
|
cpp
|
cPhanSo.cpp
|
#include "cPhanSo.h"
#include <iostream>
#include <math.h>
using namespace std;
cPhanSo::cPhanSo()
{
settuso(0);
setmauso(1);
}
cPhanSo::cPhanSo(int t, int m)
{
if (m != 0)
{
settuso(t);
setmauso(m);
}
}
int cPhanSo::gettuso()
{
return cPhanSo::ituso;
}
int cPhanSo::getmauso()
{
return cPhanSo::imauso;
}
void cPhanSo::settuso(int t)
{
cPhanSo::ituso = t;
}
void cPhanSo::setmauso(int m)
{
if (m != 0)
cPhanSo::imauso = m;
}
void cPhanSo::nhapps()
{
int t, m;
cout << "Nhap gia tri phan so" << endl;
cout << "Nhap tu so : ";
cin >> t;
cout << "Nhap mau so : ";
cin >> m;
if (m != 0)
{
settuso(t);
setmauso(m);
}
}
void cPhanSo::xuatps()
{
cout << "Phan so : " << ituso << "/" << imauso << endl;
}
cPhanSo cPhanSo::congps(cPhanSo ps2)
{
cPhanSo kq;
kq.ituso = ituso * ps2.imauso + imauso * ps2.ituso;
kq.imauso = imauso * ps2.imauso;
return kq;
}
cPhanSo cPhanSo::trups(cPhanSo ps2)
{
cPhanSo kq;
kq.ituso = ituso * ps2.imauso - imauso * ps2.ituso;
kq.imauso = imauso * ps2.imauso;
return kq;
}
cPhanSo cPhanSo::nhanps(cPhanSo ps2)
{
cPhanSo kq;
kq.ituso = ituso * ps2.ituso;
kq.imauso = imauso * ps2.imauso;
return kq;
}
cPhanSo cPhanSo::chiaps(cPhanSo ps2)
{
cPhanSo kq;
kq.ituso = ituso * ps2.imauso ;
kq.imauso = imauso * ps2.ituso;
return kq;
}
int ucln(int a, int b)
{
a = abs(a);
b = abs(b);
if (a == 0 || b == 0)
return a + b;
while (a != b)
{
if (a > b)
a -= b;
else
b -= a;
}
return a;
}
cPhanSo cPhanSo::rutgonps()
{
int uc = ucln(ituso, imauso);
cPhanSo kq;
kq.ituso = ituso / uc;
kq.imauso = imauso / uc;
return kq;
}
cPhanSo::~cPhanSo()
{
}
|
e1a8c463f7fb561909b3fe760e4756c522b0c713
|
4536012f9fb2791e33686836b08effe113323c26
|
/src/bad_apple.cpp
|
0dfc9eea5996e276254b2b3861bc0f589822c703
|
[] |
no_license
|
w-dee/dotmatrix_64x48_fw_5.0
|
48c3ac8e5c8188118f83beee7ce5f65db1777e31
|
f2f23eaecdf1b2a31e4a070c63c9235e9d04573d
|
refs/heads/master
| 2021-12-16T11:22:49.606477
| 2021-12-14T07:57:27
| 2021-12-14T07:57:27
| 250,133,584
| 0
| 1
| null | 2021-06-14T12:36:54
| 2020-03-26T01:39:22
|
C++
|
UTF-8
|
C++
| false
| false
| 4,620
|
cpp
|
bad_apple.cpp
|
#include <Arduino.h>
#include <stdlib.h>
#include <esp_partition.h>
#include <string.h>
#include <esp_system.h>
#include "frame_buffer.h"
#include "ambient.h"
static spi_flash_mmap_handle_t mmap_handle = 0; // mmap handle
static uint32_t start_address_in_flash = 0; // data start address in flash
static uint32_t mapped_start_address_in_data = 0; // currently mapped address in data
static const uint8_t * mapped_address_head = nullptr;
static uint32_t movie_size = 0; // movie size
#define MMAP_BLOCK_SIZE (65536UL*2)
#define MMAP_ACCESS_SIZE 8192
/**
* ensure the given address is accessible from the program.
* the address space accessible is gurannteed at least 8kiB from the starting address.
* */
static const uint8_t * ensure_access(uint32_t address)
{
// because spi_flash_mmap can map only a small space,
// we have to do some caching here.
// check the requested address is within current scope
if(mapped_address_head && address >= mapped_start_address_in_data &&
(address+MMAP_ACCESS_SIZE) <= (mapped_start_address_in_data+MMAP_BLOCK_SIZE))
{
// within current space;
return address - mapped_start_address_in_data + mapped_address_head;
}
// not in current address space
// remap
if(mmap_handle) { spi_flash_munmap(mmap_handle); mmap_handle = 0; }
mapped_start_address_in_data = address / 65536 * 65536;
uint32_t map_start_address = start_address_in_flash + mapped_start_address_in_data;
if(ESP_OK != spi_flash_mmap(map_start_address, MMAP_BLOCK_SIZE, SPI_FLASH_MMAP_DATA,
(const void**)&mapped_address_head, &mmap_handle))
{
printf("BAD APPLE: mmap failed in flash address 0x%lx\n", (long)map_start_address);
}
// return the address
return mapped_address_head - mapped_start_address_in_data + address;
}
/**
* decode thread
* */
static void decode_task(void *arg)
{
for(;;)
{
uint32_t addr = 12; // skip signatures
while(addr < movie_size)
{
const uint8_t * ptr, *start_ptr;
ptr = start_ptr = ensure_access(addr);
// expand the buffer
uint8_t * exp_buf = (uint8_t*) get_bg_frame_buffer().array();
int out_pos = 0;
while(out_pos < 64*48)
{
if(*ptr & 0x80)
{
// running
uint8_t len = *ptr & 0x7f;
++ptr;
uint8_t val = *ptr;
++ptr;
while(len--)
exp_buf[out_pos++] = val;
}
else
{
// non-running
uint8_t len = *ptr;
++ptr;
while(len--)
exp_buf[out_pos++] = *(ptr++);
}
}
addr += ptr - start_ptr;
frame_buffer_flip();
delay(33); // TODO: precious timing control
}
}
}
static bool running = false;
bool bad_apple()
{
// initialize bad_apple
if(running) return true;
// find data start address
const esp_partition_t * part =
esp_partition_find_first((esp_partition_type_t)0x40,
(esp_partition_subtype_t)0, NULL);
if(part == nullptr)
{
// no font0 partition
return false;
}
// read signature
struct sig_t
{
uint8_t sig[8];
uint32_t size;
} sig;
if(ESP_OK != spi_flash_read(part->address, &sig, sizeof(sig))) return false;
if(memcmp(sig.sig, "BADAPPLE\0", 8)) return false; // singnature mismatch
printf("\n\nBAD APPLE: signature found at 0x%lx, length %d\n", (long)part->address, sig.size);
start_address_in_flash = part->address;
movie_size = sig.size; // including signature
// check ...
for(int i = 0; i < 1024; ++i)
{
uint32_t address = esp_random() % sig.size;
address &= ~3;
uint8_t data[4];
spi_flash_read(part->address + address, data, 4);
const uint8_t *access = ensure_access(address);
if(memcmp(access, data, 4))
{
printf("BAD APPLE: sanity check failed at flash address 0x%lx, data address 0x%lx\n",
(long)part->address + address, (long)address);
return false;
}
}
printf("BAD APPLE: flash sanity check passed\n");
// spawn decode thread
running = true;
xTaskCreatePinnedToCore(decode_task, "BadApple decoder", 4096, NULL, 1, NULL, 0);
sensors_set_brightness_always_max(false);
return true;
}
|
0037b281e866901ffdac604d22ed3e37ae61e7a8
|
ea4ef513acd742054bd5ed9a31442ef1b88784c7
|
/CCProtonPi0/NTupleAnalysis/makeClass/Truth/Truth_Branch.h
|
03e69d4f81fec16d9ad7c51d8fd2a6841dd47b14
|
[] |
no_license
|
Rgalindo85/CCProtonPi0
|
c44866ac961011758682b505fa959dad3befebde
|
dd94f21925a48d73ec7fa02653e5df6e570d2165
|
refs/heads/master
| 2020-07-26T08:30:15.736316
| 2016-12-19T16:26:52
| 2016-12-19T16:26:52
| 73,726,869
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 64,921
|
h
|
Truth_Branch.h
|
//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Sat Feb 6 09:48:06 2016 by ROOT version 5.34/05
// from TChain Truth/
//////////////////////////////////////////////////////////
#ifndef Truth_Branch_h
#define Truth_Branch_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
// Header file for the classes stored in the TTree if any.
// Fixed size dimensions of array or collections stored in the TTree if any.
class Truth_Branch {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Declaration of leaf types
Double_t eventID;
Bool_t truth_has_physics_event;
Bool_t truth_isGamma1_conv_inside;
Bool_t truth_isGamma2_conv_inside;
Bool_t truth_isSignal;
Bool_t truth_isFidVol;
Bool_t truth_isNC;
Bool_t truth_ReconstructEvent;
Bool_t truth_isBckg_NoPi0;
Bool_t truth_isBckg_SinglePi0;
Bool_t truth_isBckg_MultiPi0;
Bool_t truth_isBckg_NC;
Bool_t truth_isBckg_AntiNeutrino;
Bool_t truth_isBckg_QELike;
Bool_t truth_isBckg_SingleChargedPion;
Bool_t truth_isBckg_SingleChargedPion_ChargeExchanged;
Bool_t truth_isBckg_DoublePionWithPi0;
Bool_t truth_isBckg_DoublePionWithoutPi0;
Bool_t truth_isBckg_MultiPionWithPi0;
Bool_t truth_isBckg_MultiPionWithoutPi0;
Bool_t truth_isBckg_Other;
Bool_t truth_isBckg_withMichel;
Int_t truth_Bckg_nOther;
Int_t truth_Bckg_nPi0_Primary;
Int_t truth_Bckg_nPi0_Secondary;
Int_t truth_Bckg_nPi0_Total;
Int_t truth_Bckg_nPiCharged;
Int_t truth_Bckg_nPiCharged_ChargeExchanged;
Int_t truth_N_FSParticles;
Int_t truth_N_other;
Int_t truth_N_pi0;
Int_t truth_N_proton;
Int_t truth_N_trueMichelElectrons;
Int_t truth_OneShower_evis_most_pdg;
Int_t truth_Rejected_unused_evis_most_pdg;
Int_t truth_ThreeShower_s1_evis_most_pdg;
Int_t truth_ThreeShower_s2_evis_most_pdg;
Int_t truth_ThreeShower_s3_evis_most_pdg;
Int_t truth_blob1_evis_most_pdg;
Int_t truth_blob2_evis_most_pdg;
Int_t truth_dispersed_unused_evis_most_pdg;
Int_t truth_pi0_GrandMother;
Int_t truth_pi0_GrandMotherStatus;
Int_t truth_pi0_Mother;
Int_t truth_pi0_MotherStatus;
Int_t truth_pi0_status;
Int_t truth_target_material;
Int_t truth_vertex_module;
Int_t truth_vertex_plane;
Int_t truth_vertex_unused_evis_most_pdg;
Double_t truth_OneShower_evis_muon;
Double_t truth_OneShower_evis_neutron;
Double_t truth_OneShower_evis_piminus;
Double_t truth_OneShower_evis_piplus;
Double_t truth_OneShower_evis_pizero;
Double_t truth_OneShower_evis_proton;
Double_t truth_OneShower_evis_total_norm;
Double_t truth_OneShower_evis_total_truth;
Double_t truth_Rejected_unused_evis_total_norm;
Double_t truth_Rejected_unused_evis_total_truth;
Double_t truth_ThreeShower_s1_evis_muon;
Double_t truth_ThreeShower_s1_evis_neutron;
Double_t truth_ThreeShower_s1_evis_piminus;
Double_t truth_ThreeShower_s1_evis_piplus;
Double_t truth_ThreeShower_s1_evis_pizero;
Double_t truth_ThreeShower_s1_evis_proton;
Double_t truth_ThreeShower_s1_evis_total_norm;
Double_t truth_ThreeShower_s1_evis_total_truth;
Double_t truth_ThreeShower_s2_evis_muon;
Double_t truth_ThreeShower_s2_evis_neutron;
Double_t truth_ThreeShower_s2_evis_piminus;
Double_t truth_ThreeShower_s2_evis_piplus;
Double_t truth_ThreeShower_s2_evis_pizero;
Double_t truth_ThreeShower_s2_evis_proton;
Double_t truth_ThreeShower_s2_evis_total_norm;
Double_t truth_ThreeShower_s2_evis_total_truth;
Double_t truth_ThreeShower_s3_evis_muon;
Double_t truth_ThreeShower_s3_evis_neutron;
Double_t truth_ThreeShower_s3_evis_piminus;
Double_t truth_ThreeShower_s3_evis_piplus;
Double_t truth_ThreeShower_s3_evis_pizero;
Double_t truth_ThreeShower_s3_evis_proton;
Double_t truth_ThreeShower_s3_evis_total_norm;
Double_t truth_ThreeShower_s3_evis_total_truth;
Double_t truth_allClusters_evis_pizero;
Double_t truth_blob1_evis_muon;
Double_t truth_blob1_evis_neutron;
Double_t truth_blob1_evis_piminus;
Double_t truth_blob1_evis_piplus;
Double_t truth_blob1_evis_pizero;
Double_t truth_blob1_evis_proton;
Double_t truth_blob1_evis_total_norm;
Double_t truth_blob1_evis_total_truth;
Double_t truth_blob2_evis_muon;
Double_t truth_blob2_evis_neutron;
Double_t truth_blob2_evis_piminus;
Double_t truth_blob2_evis_piplus;
Double_t truth_blob2_evis_pizero;
Double_t truth_blob2_evis_proton;
Double_t truth_blob2_evis_total_norm;
Double_t truth_blob2_evis_total_truth;
Double_t truth_dispersed_unused_evis_gamma;
Double_t truth_dispersed_unused_evis_muon;
Double_t truth_dispersed_unused_evis_neutron;
Double_t truth_dispersed_unused_evis_piminus;
Double_t truth_dispersed_unused_evis_piplus;
Double_t truth_dispersed_unused_evis_pizero;
Double_t truth_dispersed_unused_evis_proton;
Double_t truth_dispersed_unused_evis_total_norm;
Double_t truth_dispersed_unused_evis_total_truth;
Double_t truth_ecal_unused_evis_muon;
Double_t truth_ecal_unused_evis_neutron;
Double_t truth_ecal_unused_evis_piminus;
Double_t truth_ecal_unused_evis_piplus;
Double_t truth_ecal_unused_evis_pizero;
Double_t truth_ecal_unused_evis_proton;
Double_t truth_ecal_unused_evis_total_norm;
Double_t truth_ecal_unused_evis_total_truth;
Double_t truth_eventID;
Double_t truth_hcal_unused_evis_muon;
Double_t truth_hcal_unused_evis_neutron;
Double_t truth_hcal_unused_evis_piminus;
Double_t truth_hcal_unused_evis_piplus;
Double_t truth_hcal_unused_evis_pizero;
Double_t truth_hcal_unused_evis_proton;
Double_t truth_hcal_unused_evis_total_norm;
Double_t truth_hcal_unused_evis_total_truth;
Double_t truth_michelElectron_E;
Double_t truth_michelElectron_P;
Double_t truth_michelMuon_P;
Double_t truth_michelMuon_end_dist_vtx;
Double_t truth_michelMuon_length;
Double_t truth_michelPion_P;
Double_t truth_michelPion_begin_dist_vtx;
Double_t truth_michelPion_length;
Double_t truth_muon_P;
Double_t truth_muon_theta;
Double_t truth_other_unused_evis_muon;
Double_t truth_other_unused_evis_neutron;
Double_t truth_other_unused_evis_piminus;
Double_t truth_other_unused_evis_piplus;
Double_t truth_other_unused_evis_pizero;
Double_t truth_other_unused_evis_proton;
Double_t truth_other_unused_evis_total_norm;
Double_t truth_other_unused_evis_total_truth;
Double_t truth_pi0_P;
Double_t truth_pi0_theta;
Double_t truth_proton_P;
Double_t truth_proton_theta;
Double_t truth_total_captured_evis_pizero;
Double_t truth_total_captured_evis_total_norm;
Double_t truth_total_captured_evis_total_truth;
Double_t truth_vertex_unused_evis_gamma;
Double_t truth_vertex_unused_evis_muon;
Double_t truth_vertex_unused_evis_neutron;
Double_t truth_vertex_unused_evis_piminus;
Double_t truth_vertex_unused_evis_piplus;
Double_t truth_vertex_unused_evis_pizero;
Double_t truth_vertex_unused_evis_proton;
Double_t truth_vertex_unused_evis_total_norm;
Double_t truth_vertex_unused_evis_total_truth;
Double_t truth_gamma1_4P[4];
Double_t truth_gamma1_final_pos[3];
Double_t truth_gamma1_init_pos[3];
Double_t truth_gamma2_4P[4];
Double_t truth_gamma2_final_pos[3];
Double_t truth_gamma2_init_pos[3];
Int_t genie_wgt_n_shifts;
Double_t truth_genie_wgt_AGKYxF1pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_AhtBY[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_BhtBY[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_CCQEPauliSupViaKF[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_CV1uBY[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_CV2uBY[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_EtaNCEL[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrAbs_N[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrAbs_pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrCEx_N[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrCEx_pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrElas_N[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrElas_pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrInel_N[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrInel_pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrPiProd_N[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_FrPiProd_pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MFP_N[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MFP_pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MaCCQE[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MaCCQEshape[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MaNCEL[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MaRES[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_MvRES[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_NormCCQE[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_NormCCRES[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_NormDISCC[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_NormNCRES[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_RDecBR1gamma[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_Rvn1pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_Rvn2pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_Rvp1pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_Rvp2pi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_Theta_Delta2Npi[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_VecFFCCQEshape[7]; //[genie_wgt_n_shifts]
Double_t truth_genie_wgt_shifts[7]; //[genie_wgt_n_shifts]
Double_t truth_michelMuon_endPoint[3];
Double_t truth_muon_4P[4];
Double_t truth_pi0_4P[4];
Double_t truth_proton_4P[4];
Int_t mc_run;
Int_t mc_subrun;
Int_t mc_nInteractions;
Int_t mc_MIState;
Double_t mc_pot;
Int_t mc_beamConfig;
Int_t mc_processType;
Int_t mc_nthEvtInSpill;
Int_t mc_nthEvtInFile;
Int_t mc_intType;
Int_t mc_current;
Int_t mc_charm;
Double_t mc_weight;
Double_t mc_XSec;
Double_t mc_diffXSec;
Int_t mc_incoming;
Double_t mc_fluxDriverProb;
Int_t mc_targetNucleus;
Int_t mc_targetZ;
Int_t mc_targetA;
Int_t mc_targetNucleon;
Int_t mc_struckQuark;
Int_t mc_seaQuark;
Int_t mc_resID;
Int_t mc_primaryLepton;
Double_t mc_incomingE;
Double_t mc_Bjorkenx;
Double_t mc_Bjorkeny;
Double_t mc_Q2;
Double_t mc_nuT;
Double_t mc_w;
Double_t mc_vtx[4];
Double_t mc_incomingPartVec[4];
Double_t mc_initNucVec[4];
Double_t mc_primFSLepton[4];
Int_t mc_nFSPart;
Double_t mc_FSPartPx[106]; //[mc_nFSPart]
Double_t mc_FSPartPy[106]; //[mc_nFSPart]
Double_t mc_FSPartPz[106]; //[mc_nFSPart]
Double_t mc_FSPartE[106]; //[mc_nFSPart]
Int_t mc_FSPartPDG[106]; //[mc_nFSPart]
Int_t mc_er_nPart;
Int_t mc_er_ID[134]; //[mc_er_nPart]
Int_t mc_er_status[134]; //[mc_er_nPart]
Double_t mc_er_posInNucX[134]; //[mc_er_nPart]
Double_t mc_er_posInNucY[134]; //[mc_er_nPart]
Double_t mc_er_posInNucZ[134]; //[mc_er_nPart]
Double_t mc_er_Px[134]; //[mc_er_nPart]
Double_t mc_er_Py[134]; //[mc_er_nPart]
Double_t mc_er_Pz[134]; //[mc_er_nPart]
Double_t mc_er_E[134]; //[mc_er_nPart]
Int_t mc_er_FD[134]; //[mc_er_nPart]
Int_t mc_er_LD[134]; //[mc_er_nPart]
Int_t mc_er_mother[134]; //[mc_er_nPart]
Int_t mc_fr_nNuAncestorIDs;
Int_t mc_fr_nuAncestorIDs[6]; //[mc_fr_nNuAncestorIDs]
Int_t mc_fr_nuParentID;
Int_t mc_fr_decMode;
Double_t mc_fr_primProtonVtx[3];
Double_t mc_fr_primProtonP[4];
Double_t mc_fr_nuParentDecVtx[3];
Double_t mc_fr_nuParentProdVtx[3];
Double_t mc_fr_nuParentProdP[4];
Double_t mc_cvweight_total;
Double_t wgt;
Double_t mc_cvweight_totalFlux;
Double_t mc_cvweight_totalXsec;
Double_t mc_ppfx1_cvweight;
Double_t mc_gen1_cvweight_total;
Double_t gen1_wgt;
Double_t mc_gen1_cvweight_totalFlux;
Double_t mc_gen1_cvweight_NA49;
Int_t mc_wgt_Flux_BeamFocus_sz;
Double_t mc_wgt_Flux_BeamFocus[100]; //[mc_wgt_Flux_BeamFocus_sz]
Int_t mc_wgt_gen1_Flux_Tertiary_sz;
Double_t mc_wgt_gen1_Flux_Tertiary[100]; //[mc_wgt_gen1_Flux_Tertiary_sz]
Int_t mc_wgt_gen1_Flux_NA49_sz;
Double_t mc_wgt_gen1_Flux_NA49[100]; //[mc_wgt_gen1_Flux_NA49_sz]
Int_t mc_wgt_Norm_sz;
Double_t mc_wgt_Norm[1]; //[mc_wgt_Norm_sz]
Int_t mc_wgt_ppfx1_Total_sz;
Double_t mc_wgt_ppfx1_Total[100]; //[mc_wgt_ppfx1_Total_sz]
// List of branches
TBranch *b_eventID; //!
TBranch *b_truth_has_physics_event; //!
TBranch *b_truth_isGamma1_conv_inside; //!
TBranch *b_truth_isGamma2_conv_inside; //!
TBranch *b_truth_isSignal; //!
TBranch *b_truth_isFidVol; //!
TBranch *b_truth_isNC; //!
TBranch *b_truth_ReconstructEvent; //!
TBranch *b_truth_isBckg_NoPi0; //!
TBranch *b_truth_isBckg_SinglePi0; //!
TBranch *b_truth_isBckg_MultiPi0; //!
TBranch *b_truth_isBckg_NC; //!
TBranch *b_truth_isBckg_AntiNeutrino; //!
TBranch *b_truth_isBckg_QELike; //!
TBranch *b_truth_isBckg_SingleChargedPion; //!
TBranch *b_truth_isBckg_SingleChargedPion_ChargeExchanged; //!
TBranch *b_truth_isBckg_DoublePionWithPi0; //!
TBranch *b_truth_isBckg_DoublePionWithoutPi0; //!
TBranch *b_truth_isBckg_MultiPionWithPi0; //!
TBranch *b_truth_isBckg_MultiPionWithoutPi0; //!
TBranch *b_truth_isBckg_Other; //!
TBranch *b_truth_isBckg_withMichel; //!
TBranch *b_truth_Bckg_nOther; //!
TBranch *b_truth_Bckg_nPi0_Primary; //!
TBranch *b_truth_Bckg_nPi0_Secondary; //!
TBranch *b_truth_Bckg_nPi0_Total; //!
TBranch *b_truth_Bckg_nPiCharged; //!
TBranch *b_truth_Bckg_nPiCharged_ChargeExchanged; //!
TBranch *b_truth_N_FSParticles; //!
TBranch *b_truth_N_other; //!
TBranch *b_truth_N_pi0; //!
TBranch *b_truth_N_proton; //!
TBranch *b_truth_N_trueMichelElectrons; //!
TBranch *b_truth_OneShower_evis_most_pdg; //!
TBranch *b_truth_Rejected_unused_evis_most_pdg; //!
TBranch *b_truth_ThreeShower_s1_evis_most_pdg; //!
TBranch *b_truth_ThreeShower_s2_evis_most_pdg; //!
TBranch *b_truth_ThreeShower_s3_evis_most_pdg; //!
TBranch *b_truth_blob1_evis_most_pdg; //!
TBranch *b_truth_blob2_evis_most_pdg; //!
TBranch *b_truth_dispersed_unused_evis_most_pdg; //!
TBranch *b_truth_pi0_GrandMother; //!
TBranch *b_truth_pi0_GrandMotherStatus; //!
TBranch *b_truth_pi0_Mother; //!
TBranch *b_truth_pi0_MotherStatus; //!
TBranch *b_truth_pi0_status; //!
TBranch *b_truth_target_material; //!
TBranch *b_truth_vertex_module; //!
TBranch *b_truth_vertex_plane; //!
TBranch *b_truth_vertex_unused_evis_most_pdg; //!
TBranch *b_truth_OneShower_evis_muon; //!
TBranch *b_truth_OneShower_evis_neutron; //!
TBranch *b_truth_OneShower_evis_piminus; //!
TBranch *b_truth_OneShower_evis_piplus; //!
TBranch *b_truth_OneShower_evis_pizero; //!
TBranch *b_truth_OneShower_evis_proton; //!
TBranch *b_truth_OneShower_evis_total_norm; //!
TBranch *b_truth_OneShower_evis_total_truth; //!
TBranch *b_truth_Rejected_unused_evis_total_norm; //!
TBranch *b_truth_Rejected_unused_evis_total_truth; //!
TBranch *b_truth_ThreeShower_s1_evis_muon; //!
TBranch *b_truth_ThreeShower_s1_evis_neutron; //!
TBranch *b_truth_ThreeShower_s1_evis_piminus; //!
TBranch *b_truth_ThreeShower_s1_evis_piplus; //!
TBranch *b_truth_ThreeShower_s1_evis_pizero; //!
TBranch *b_truth_ThreeShower_s1_evis_proton; //!
TBranch *b_truth_ThreeShower_s1_evis_total_norm; //!
TBranch *b_truth_ThreeShower_s1_evis_total_truth; //!
TBranch *b_truth_ThreeShower_s2_evis_muon; //!
TBranch *b_truth_ThreeShower_s2_evis_neutron; //!
TBranch *b_truth_ThreeShower_s2_evis_piminus; //!
TBranch *b_truth_ThreeShower_s2_evis_piplus; //!
TBranch *b_truth_ThreeShower_s2_evis_pizero; //!
TBranch *b_truth_ThreeShower_s2_evis_proton; //!
TBranch *b_truth_ThreeShower_s2_evis_total_norm; //!
TBranch *b_truth_ThreeShower_s2_evis_total_truth; //!
TBranch *b_truth_ThreeShower_s3_evis_muon; //!
TBranch *b_truth_ThreeShower_s3_evis_neutron; //!
TBranch *b_truth_ThreeShower_s3_evis_piminus; //!
TBranch *b_truth_ThreeShower_s3_evis_piplus; //!
TBranch *b_truth_ThreeShower_s3_evis_pizero; //!
TBranch *b_truth_ThreeShower_s3_evis_proton; //!
TBranch *b_truth_ThreeShower_s3_evis_total_norm; //!
TBranch *b_truth_ThreeShower_s3_evis_total_truth; //!
TBranch *b_truth_allClusters_evis_pizero; //!
TBranch *b_truth_blob1_evis_muon; //!
TBranch *b_truth_blob1_evis_neutron; //!
TBranch *b_truth_blob1_evis_piminus; //!
TBranch *b_truth_blob1_evis_piplus; //!
TBranch *b_truth_blob1_evis_pizero; //!
TBranch *b_truth_blob1_evis_proton; //!
TBranch *b_truth_blob1_evis_total_norm; //!
TBranch *b_truth_blob1_evis_total_truth; //!
TBranch *b_truth_blob2_evis_muon; //!
TBranch *b_truth_blob2_evis_neutron; //!
TBranch *b_truth_blob2_evis_piminus; //!
TBranch *b_truth_blob2_evis_piplus; //!
TBranch *b_truth_blob2_evis_pizero; //!
TBranch *b_truth_blob2_evis_proton; //!
TBranch *b_truth_blob2_evis_total_norm; //!
TBranch *b_truth_blob2_evis_total_truth; //!
TBranch *b_truth_dispersed_unused_evis_gamma; //!
TBranch *b_truth_dispersed_unused_evis_muon; //!
TBranch *b_truth_dispersed_unused_evis_neutron; //!
TBranch *b_truth_dispersed_unused_evis_piminus; //!
TBranch *b_truth_dispersed_unused_evis_piplus; //!
TBranch *b_truth_dispersed_unused_evis_pizero; //!
TBranch *b_truth_dispersed_unused_evis_proton; //!
TBranch *b_truth_dispersed_unused_evis_total_norm; //!
TBranch *b_truth_dispersed_unused_evis_total_truth; //!
TBranch *b_truth_ecal_unused_evis_muon; //!
TBranch *b_truth_ecal_unused_evis_neutron; //!
TBranch *b_truth_ecal_unused_evis_piminus; //!
TBranch *b_truth_ecal_unused_evis_piplus; //!
TBranch *b_truth_ecal_unused_evis_pizero; //!
TBranch *b_truth_ecal_unused_evis_proton; //!
TBranch *b_truth_ecal_unused_evis_total_norm; //!
TBranch *b_truth_ecal_unused_evis_total_truth; //!
TBranch *b_truth_eventID; //!
TBranch *b_truth_hcal_unused_evis_muon; //!
TBranch *b_truth_hcal_unused_evis_neutron; //!
TBranch *b_truth_hcal_unused_evis_piminus; //!
TBranch *b_truth_hcal_unused_evis_piplus; //!
TBranch *b_truth_hcal_unused_evis_pizero; //!
TBranch *b_truth_hcal_unused_evis_proton; //!
TBranch *b_truth_hcal_unused_evis_total_norm; //!
TBranch *b_truth_hcal_unused_evis_total_truth; //!
TBranch *b_truth_michelElectron_E; //!
TBranch *b_truth_michelElectron_P; //!
TBranch *b_truth_michelMuon_P; //!
TBranch *b_truth_michelMuon_end_dist_vtx; //!
TBranch *b_truth_michelMuon_length; //!
TBranch *b_truth_michelPion_P; //!
TBranch *b_truth_michelPion_begin_dist_vtx; //!
TBranch *b_truth_michelPion_length; //!
TBranch *b_truth_muon_P; //!
TBranch *b_truth_muon_theta; //!
TBranch *b_truth_other_unused_evis_muon; //!
TBranch *b_truth_other_unused_evis_neutron; //!
TBranch *b_truth_other_unused_evis_piminus; //!
TBranch *b_truth_other_unused_evis_piplus; //!
TBranch *b_truth_other_unused_evis_pizero; //!
TBranch *b_truth_other_unused_evis_proton; //!
TBranch *b_truth_other_unused_evis_total_norm; //!
TBranch *b_truth_other_unused_evis_total_truth; //!
TBranch *b_truth_pi0_P; //!
TBranch *b_truth_pi0_theta; //!
TBranch *b_truth_proton_P; //!
TBranch *b_truth_proton_theta; //!
TBranch *b_truth_total_captured_evis_pizero; //!
TBranch *b_truth_total_captured_evis_total_norm; //!
TBranch *b_truth_total_captured_evis_total_truth; //!
TBranch *b_truth_vertex_unused_evis_gamma; //!
TBranch *b_truth_vertex_unused_evis_muon; //!
TBranch *b_truth_vertex_unused_evis_neutron; //!
TBranch *b_truth_vertex_unused_evis_piminus; //!
TBranch *b_truth_vertex_unused_evis_piplus; //!
TBranch *b_truth_vertex_unused_evis_pizero; //!
TBranch *b_truth_vertex_unused_evis_proton; //!
TBranch *b_truth_vertex_unused_evis_total_norm; //!
TBranch *b_truth_vertex_unused_evis_total_truth; //!
TBranch *b_truth_gamma1_4P; //!
TBranch *b_truth_gamma1_final_pos; //!
TBranch *b_truth_gamma1_init_pos; //!
TBranch *b_truth_gamma2_4P; //!
TBranch *b_truth_gamma2_final_pos; //!
TBranch *b_truth_gamma2_init_pos; //!
TBranch *b_genie_wgt_n_shifts; //!
TBranch *b_truth_genie_wgt_AGKYxF1pi; //!
TBranch *b_truth_genie_wgt_AhtBY; //!
TBranch *b_truth_genie_wgt_BhtBY; //!
TBranch *b_truth_genie_wgt_CCQEPauliSupViaKF; //!
TBranch *b_truth_genie_wgt_CV1uBY; //!
TBranch *b_truth_genie_wgt_CV2uBY; //!
TBranch *b_truth_genie_wgt_EtaNCEL; //!
TBranch *b_truth_genie_wgt_FrAbs_N; //!
TBranch *b_truth_genie_wgt_FrAbs_pi; //!
TBranch *b_truth_genie_wgt_FrCEx_N; //!
TBranch *b_truth_genie_wgt_FrCEx_pi; //!
TBranch *b_truth_genie_wgt_FrElas_N; //!
TBranch *b_truth_genie_wgt_FrElas_pi; //!
TBranch *b_truth_genie_wgt_FrInel_N; //!
TBranch *b_truth_genie_wgt_FrInel_pi; //!
TBranch *b_truth_genie_wgt_FrPiProd_N; //!
TBranch *b_truth_genie_wgt_FrPiProd_pi; //!
TBranch *b_truth_genie_wgt_MFP_N; //!
TBranch *b_truth_genie_wgt_MFP_pi; //!
TBranch *b_truth_genie_wgt_MaCCQE; //!
TBranch *b_truth_genie_wgt_MaCCQEshape; //!
TBranch *b_truth_genie_wgt_MaNCEL; //!
TBranch *b_truth_genie_wgt_MaRES; //!
TBranch *b_truth_genie_wgt_MvRES; //!
TBranch *b_truth_genie_wgt_NormCCQE; //!
TBranch *b_truth_genie_wgt_NormCCRES; //!
TBranch *b_truth_genie_wgt_NormDISCC; //!
TBranch *b_truth_genie_wgt_NormNCRES; //!
TBranch *b_truth_genie_wgt_RDecBR1gamma; //!
TBranch *b_truth_genie_wgt_Rvn1pi; //!
TBranch *b_truth_genie_wgt_Rvn2pi; //!
TBranch *b_truth_genie_wgt_Rvp1pi; //!
TBranch *b_truth_genie_wgt_Rvp2pi; //!
TBranch *b_truth_genie_wgt_Theta_Delta2Npi; //!
TBranch *b_truth_genie_wgt_VecFFCCQEshape; //!
TBranch *b_truth_genie_wgt_shifts; //!
TBranch *b_truth_michelMuon_endPoint; //!
TBranch *b_truth_muon_4P; //!
TBranch *b_truth_pi0_4P; //!
TBranch *b_truth_proton_4P; //!
TBranch *b_mc_run; //!
TBranch *b_mc_subrun; //!
TBranch *b_mc_nInteractions; //!
TBranch *b_mc_MIState; //!
TBranch *b_mc_pot; //!
TBranch *b_mc_beamConfig; //!
TBranch *b_mc_processType; //!
TBranch *b_mc_nthEvtInSpill; //!
TBranch *b_mc_nthEvtInFile; //!
TBranch *b_mc_intType; //!
TBranch *b_mc_current; //!
TBranch *b_mc_charm; //!
TBranch *b_mc_weight; //!
TBranch *b_mc_XSec; //!
TBranch *b_mc_diffXSec; //!
TBranch *b_mc_incoming; //!
TBranch *b_mc_fluxDriverProb; //!
TBranch *b_mc_targetNucleus; //!
TBranch *b_mc_targetZ; //!
TBranch *b_mc_targetA; //!
TBranch *b_mc_targetNucleon; //!
TBranch *b_mc_struckQuark; //!
TBranch *b_mc_seaQuark; //!
TBranch *b_mc_resID; //!
TBranch *b_mc_primaryLepton; //!
TBranch *b_mc_incomingE; //!
TBranch *b_mc_Bjorkenx; //!
TBranch *b_mc_Bjorkeny; //!
TBranch *b_mc_Q2; //!
TBranch *b_mc_nuT; //!
TBranch *b_mc_w; //!
TBranch *b_mc_vtx; //!
TBranch *b_mc_incomingPartVec; //!
TBranch *b_mc_initNucVec; //!
TBranch *b_mc_primFSLepton; //!
TBranch *b_mc_nFSPart; //!
TBranch *b_mc_FSPartPx; //!
TBranch *b_mc_FSPartPy; //!
TBranch *b_mc_FSPartPz; //!
TBranch *b_mc_FSPartE; //!
TBranch *b_mc_FSPartPDG; //!
TBranch *b_mc_er_nPart; //!
TBranch *b_mc_er_ID; //!
TBranch *b_mc_er_status; //!
TBranch *b_mc_er_posInNucX; //!
TBranch *b_mc_er_posInNucY; //!
TBranch *b_mc_er_posInNucZ; //!
TBranch *b_mc_er_Px; //!
TBranch *b_mc_er_Py; //!
TBranch *b_mc_er_Pz; //!
TBranch *b_mc_er_E; //!
TBranch *b_mc_er_FD; //!
TBranch *b_mc_er_LD; //!
TBranch *b_mc_er_mother; //!
TBranch *b_mc_fr_nNuAncestorIDs; //!
TBranch *b_mc_fr_nuAncestorIDs; //!
TBranch *b_mc_fr_nuParentID; //!
TBranch *b_mc_fr_decMode; //!
TBranch *b_mc_fr_primProtonVtx; //!
TBranch *b_mc_fr_primProtonP; //!
TBranch *b_mc_fr_nuParentDecVtx; //!
TBranch *b_mc_fr_nuParentProdVtx; //!
TBranch *b_mc_fr_nuParentProdP; //!
TBranch *b_mc_cvweight_total; //!
TBranch *b_wgt; //!
TBranch *b_mc_cvweight_totalFlux; //!
TBranch *b_mc_cvweight_totalXsec; //!
TBranch *b_mc_ppfx1_cvweight; //!
TBranch *b_mc_gen1_cvweight_total; //!
TBranch *b_gen1_wgt; //!
TBranch *b_mc_gen1_cvweight_totalFlux; //!
TBranch *b_mc_gen1_cvweight_NA49; //!
TBranch *b_mc_wgt_Flux_BeamFocus_sz; //!
TBranch *b_mc_wgt_Flux_BeamFocus; //!
TBranch *b_mc_wgt_gen1_Flux_Tertiary_sz; //!
TBranch *b_mc_wgt_gen1_Flux_Tertiary; //!
TBranch *b_mc_wgt_gen1_Flux_NA49_sz; //!
TBranch *b_mc_wgt_gen1_Flux_NA49; //!
TBranch *b_mc_wgt_Norm_sz; //!
TBranch *b_mc_wgt_Norm; //!
TBranch *b_mc_wgt_ppfx1_Total_sz; //!
TBranch *b_mc_wgt_ppfx1_Total; //!
Truth_Branch(TTree *tree=0);
virtual ~Truth_Branch();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop();
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
};
#endif
#ifdef Truth_Branch_cxx
Truth_Branch::Truth_Branch(TTree *tree) : fChain(0)
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
if (tree == 0) {
#ifdef SINGLE_TREE
// The following code should be used if you want this class to access
// a single tree instead of a chain
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("Memory Directory");
if (!f || !f->IsOpen()) {
f = new TFile("Memory Directory");
}
f->GetObject("Truth",tree);
#else // SINGLE_TREE
// The following code should be used if you want this class to access a chain
// of trees.
TChain * chain = new TChain("Truth","");
chain->Add("/minerva/data/users/oaltinok/CCProtonPi0/MC/v2_55/test/nogrid/central_value/minerva/ana/v10r8p7/00/01/02/00/SIM_minerva_00010200_Subruns_0034_CCProtonPi0_Ana_Tuple_v10r8p7-oaltinok.root/Truth");
tree = chain;
#endif // SINGLE_TREE
}
Init(tree);
}
Truth_Branch::~Truth_Branch()
{
if (!fChain) return;
delete fChain->GetCurrentFile();
}
Int_t Truth_Branch::GetEntry(Long64_t entry)
{
// Read contents of entry.
if (!fChain) return 0;
return fChain->GetEntry(entry);
}
Long64_t Truth_Branch::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry);
if (centry < 0) return centry;
if (fChain->GetTreeNumber() != fCurrent) {
fCurrent = fChain->GetTreeNumber();
Notify();
}
return centry;
}
void Truth_Branch::Init(TTree *tree)
{
// The Init() function is called when the selector needs to initialize
// a new tree or chain. Typically here the branch addresses and branch
// pointers of the tree will be set.
// It is normally not necessary to make changes to the generated
// code, but the routine can be extended by the user if needed.
// Init() will be called many times when running on PROOF
// (once per file to be processed).
// Set branch addresses and branch pointers
if (!tree) return;
fChain = tree;
fCurrent = -1;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("eventID", &eventID, &b_eventID);
fChain->SetBranchAddress("truth_has_physics_event", &truth_has_physics_event, &b_truth_has_physics_event);
fChain->SetBranchAddress("truth_isGamma1_conv_inside", &truth_isGamma1_conv_inside, &b_truth_isGamma1_conv_inside);
fChain->SetBranchAddress("truth_isGamma2_conv_inside", &truth_isGamma2_conv_inside, &b_truth_isGamma2_conv_inside);
fChain->SetBranchAddress("truth_isSignal", &truth_isSignal, &b_truth_isSignal);
fChain->SetBranchAddress("truth_isFidVol", &truth_isFidVol, &b_truth_isFidVol);
fChain->SetBranchAddress("truth_isNC", &truth_isNC, &b_truth_isNC);
fChain->SetBranchAddress("truth_ReconstructEvent", &truth_ReconstructEvent, &b_truth_ReconstructEvent);
fChain->SetBranchAddress("truth_isBckg_NoPi0", &truth_isBckg_NoPi0, &b_truth_isBckg_NoPi0);
fChain->SetBranchAddress("truth_isBckg_SinglePi0", &truth_isBckg_SinglePi0, &b_truth_isBckg_SinglePi0);
fChain->SetBranchAddress("truth_isBckg_MultiPi0", &truth_isBckg_MultiPi0, &b_truth_isBckg_MultiPi0);
fChain->SetBranchAddress("truth_isBckg_NC", &truth_isBckg_NC, &b_truth_isBckg_NC);
fChain->SetBranchAddress("truth_isBckg_AntiNeutrino", &truth_isBckg_AntiNeutrino, &b_truth_isBckg_AntiNeutrino);
fChain->SetBranchAddress("truth_isBckg_QELike", &truth_isBckg_QELike, &b_truth_isBckg_QELike);
fChain->SetBranchAddress("truth_isBckg_SingleChargedPion", &truth_isBckg_SingleChargedPion, &b_truth_isBckg_SingleChargedPion);
fChain->SetBranchAddress("truth_isBckg_SingleChargedPion_ChargeExchanged", &truth_isBckg_SingleChargedPion_ChargeExchanged, &b_truth_isBckg_SingleChargedPion_ChargeExchanged);
fChain->SetBranchAddress("truth_isBckg_DoublePionWithPi0", &truth_isBckg_DoublePionWithPi0, &b_truth_isBckg_DoublePionWithPi0);
fChain->SetBranchAddress("truth_isBckg_DoublePionWithoutPi0", &truth_isBckg_DoublePionWithoutPi0, &b_truth_isBckg_DoublePionWithoutPi0);
fChain->SetBranchAddress("truth_isBckg_MultiPionWithPi0", &truth_isBckg_MultiPionWithPi0, &b_truth_isBckg_MultiPionWithPi0);
fChain->SetBranchAddress("truth_isBckg_MultiPionWithoutPi0", &truth_isBckg_MultiPionWithoutPi0, &b_truth_isBckg_MultiPionWithoutPi0);
fChain->SetBranchAddress("truth_isBckg_Other", &truth_isBckg_Other, &b_truth_isBckg_Other);
fChain->SetBranchAddress("truth_isBckg_withMichel", &truth_isBckg_withMichel, &b_truth_isBckg_withMichel);
fChain->SetBranchAddress("truth_Bckg_nOther", &truth_Bckg_nOther, &b_truth_Bckg_nOther);
fChain->SetBranchAddress("truth_Bckg_nPi0_Primary", &truth_Bckg_nPi0_Primary, &b_truth_Bckg_nPi0_Primary);
fChain->SetBranchAddress("truth_Bckg_nPi0_Secondary", &truth_Bckg_nPi0_Secondary, &b_truth_Bckg_nPi0_Secondary);
fChain->SetBranchAddress("truth_Bckg_nPi0_Total", &truth_Bckg_nPi0_Total, &b_truth_Bckg_nPi0_Total);
fChain->SetBranchAddress("truth_Bckg_nPiCharged", &truth_Bckg_nPiCharged, &b_truth_Bckg_nPiCharged);
fChain->SetBranchAddress("truth_Bckg_nPiCharged_ChargeExchanged", &truth_Bckg_nPiCharged_ChargeExchanged, &b_truth_Bckg_nPiCharged_ChargeExchanged);
fChain->SetBranchAddress("truth_N_FSParticles", &truth_N_FSParticles, &b_truth_N_FSParticles);
fChain->SetBranchAddress("truth_N_other", &truth_N_other, &b_truth_N_other);
fChain->SetBranchAddress("truth_N_pi0", &truth_N_pi0, &b_truth_N_pi0);
fChain->SetBranchAddress("truth_N_proton", &truth_N_proton, &b_truth_N_proton);
fChain->SetBranchAddress("truth_N_trueMichelElectrons", &truth_N_trueMichelElectrons, &b_truth_N_trueMichelElectrons);
fChain->SetBranchAddress("truth_OneShower_evis_most_pdg", &truth_OneShower_evis_most_pdg, &b_truth_OneShower_evis_most_pdg);
fChain->SetBranchAddress("truth_Rejected_unused_evis_most_pdg", &truth_Rejected_unused_evis_most_pdg, &b_truth_Rejected_unused_evis_most_pdg);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_most_pdg", &truth_ThreeShower_s1_evis_most_pdg, &b_truth_ThreeShower_s1_evis_most_pdg);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_most_pdg", &truth_ThreeShower_s2_evis_most_pdg, &b_truth_ThreeShower_s2_evis_most_pdg);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_most_pdg", &truth_ThreeShower_s3_evis_most_pdg, &b_truth_ThreeShower_s3_evis_most_pdg);
fChain->SetBranchAddress("truth_blob1_evis_most_pdg", &truth_blob1_evis_most_pdg, &b_truth_blob1_evis_most_pdg);
fChain->SetBranchAddress("truth_blob2_evis_most_pdg", &truth_blob2_evis_most_pdg, &b_truth_blob2_evis_most_pdg);
fChain->SetBranchAddress("truth_dispersed_unused_evis_most_pdg", &truth_dispersed_unused_evis_most_pdg, &b_truth_dispersed_unused_evis_most_pdg);
fChain->SetBranchAddress("truth_pi0_GrandMother", &truth_pi0_GrandMother, &b_truth_pi0_GrandMother);
fChain->SetBranchAddress("truth_pi0_GrandMotherStatus", &truth_pi0_GrandMotherStatus, &b_truth_pi0_GrandMotherStatus);
fChain->SetBranchAddress("truth_pi0_Mother", &truth_pi0_Mother, &b_truth_pi0_Mother);
fChain->SetBranchAddress("truth_pi0_MotherStatus", &truth_pi0_MotherStatus, &b_truth_pi0_MotherStatus);
fChain->SetBranchAddress("truth_pi0_status", &truth_pi0_status, &b_truth_pi0_status);
fChain->SetBranchAddress("truth_target_material", &truth_target_material, &b_truth_target_material);
fChain->SetBranchAddress("truth_vertex_module", &truth_vertex_module, &b_truth_vertex_module);
fChain->SetBranchAddress("truth_vertex_plane", &truth_vertex_plane, &b_truth_vertex_plane);
fChain->SetBranchAddress("truth_vertex_unused_evis_most_pdg", &truth_vertex_unused_evis_most_pdg, &b_truth_vertex_unused_evis_most_pdg);
fChain->SetBranchAddress("truth_OneShower_evis_muon", &truth_OneShower_evis_muon, &b_truth_OneShower_evis_muon);
fChain->SetBranchAddress("truth_OneShower_evis_neutron", &truth_OneShower_evis_neutron, &b_truth_OneShower_evis_neutron);
fChain->SetBranchAddress("truth_OneShower_evis_piminus", &truth_OneShower_evis_piminus, &b_truth_OneShower_evis_piminus);
fChain->SetBranchAddress("truth_OneShower_evis_piplus", &truth_OneShower_evis_piplus, &b_truth_OneShower_evis_piplus);
fChain->SetBranchAddress("truth_OneShower_evis_pizero", &truth_OneShower_evis_pizero, &b_truth_OneShower_evis_pizero);
fChain->SetBranchAddress("truth_OneShower_evis_proton", &truth_OneShower_evis_proton, &b_truth_OneShower_evis_proton);
fChain->SetBranchAddress("truth_OneShower_evis_total_norm", &truth_OneShower_evis_total_norm, &b_truth_OneShower_evis_total_norm);
fChain->SetBranchAddress("truth_OneShower_evis_total_truth", &truth_OneShower_evis_total_truth, &b_truth_OneShower_evis_total_truth);
fChain->SetBranchAddress("truth_Rejected_unused_evis_total_norm", &truth_Rejected_unused_evis_total_norm, &b_truth_Rejected_unused_evis_total_norm);
fChain->SetBranchAddress("truth_Rejected_unused_evis_total_truth", &truth_Rejected_unused_evis_total_truth, &b_truth_Rejected_unused_evis_total_truth);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_muon", &truth_ThreeShower_s1_evis_muon, &b_truth_ThreeShower_s1_evis_muon);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_neutron", &truth_ThreeShower_s1_evis_neutron, &b_truth_ThreeShower_s1_evis_neutron);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_piminus", &truth_ThreeShower_s1_evis_piminus, &b_truth_ThreeShower_s1_evis_piminus);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_piplus", &truth_ThreeShower_s1_evis_piplus, &b_truth_ThreeShower_s1_evis_piplus);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_pizero", &truth_ThreeShower_s1_evis_pizero, &b_truth_ThreeShower_s1_evis_pizero);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_proton", &truth_ThreeShower_s1_evis_proton, &b_truth_ThreeShower_s1_evis_proton);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_total_norm", &truth_ThreeShower_s1_evis_total_norm, &b_truth_ThreeShower_s1_evis_total_norm);
fChain->SetBranchAddress("truth_ThreeShower_s1_evis_total_truth", &truth_ThreeShower_s1_evis_total_truth, &b_truth_ThreeShower_s1_evis_total_truth);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_muon", &truth_ThreeShower_s2_evis_muon, &b_truth_ThreeShower_s2_evis_muon);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_neutron", &truth_ThreeShower_s2_evis_neutron, &b_truth_ThreeShower_s2_evis_neutron);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_piminus", &truth_ThreeShower_s2_evis_piminus, &b_truth_ThreeShower_s2_evis_piminus);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_piplus", &truth_ThreeShower_s2_evis_piplus, &b_truth_ThreeShower_s2_evis_piplus);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_pizero", &truth_ThreeShower_s2_evis_pizero, &b_truth_ThreeShower_s2_evis_pizero);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_proton", &truth_ThreeShower_s2_evis_proton, &b_truth_ThreeShower_s2_evis_proton);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_total_norm", &truth_ThreeShower_s2_evis_total_norm, &b_truth_ThreeShower_s2_evis_total_norm);
fChain->SetBranchAddress("truth_ThreeShower_s2_evis_total_truth", &truth_ThreeShower_s2_evis_total_truth, &b_truth_ThreeShower_s2_evis_total_truth);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_muon", &truth_ThreeShower_s3_evis_muon, &b_truth_ThreeShower_s3_evis_muon);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_neutron", &truth_ThreeShower_s3_evis_neutron, &b_truth_ThreeShower_s3_evis_neutron);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_piminus", &truth_ThreeShower_s3_evis_piminus, &b_truth_ThreeShower_s3_evis_piminus);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_piplus", &truth_ThreeShower_s3_evis_piplus, &b_truth_ThreeShower_s3_evis_piplus);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_pizero", &truth_ThreeShower_s3_evis_pizero, &b_truth_ThreeShower_s3_evis_pizero);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_proton", &truth_ThreeShower_s3_evis_proton, &b_truth_ThreeShower_s3_evis_proton);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_total_norm", &truth_ThreeShower_s3_evis_total_norm, &b_truth_ThreeShower_s3_evis_total_norm);
fChain->SetBranchAddress("truth_ThreeShower_s3_evis_total_truth", &truth_ThreeShower_s3_evis_total_truth, &b_truth_ThreeShower_s3_evis_total_truth);
fChain->SetBranchAddress("truth_allClusters_evis_pizero", &truth_allClusters_evis_pizero, &b_truth_allClusters_evis_pizero);
fChain->SetBranchAddress("truth_blob1_evis_muon", &truth_blob1_evis_muon, &b_truth_blob1_evis_muon);
fChain->SetBranchAddress("truth_blob1_evis_neutron", &truth_blob1_evis_neutron, &b_truth_blob1_evis_neutron);
fChain->SetBranchAddress("truth_blob1_evis_piminus", &truth_blob1_evis_piminus, &b_truth_blob1_evis_piminus);
fChain->SetBranchAddress("truth_blob1_evis_piplus", &truth_blob1_evis_piplus, &b_truth_blob1_evis_piplus);
fChain->SetBranchAddress("truth_blob1_evis_pizero", &truth_blob1_evis_pizero, &b_truth_blob1_evis_pizero);
fChain->SetBranchAddress("truth_blob1_evis_proton", &truth_blob1_evis_proton, &b_truth_blob1_evis_proton);
fChain->SetBranchAddress("truth_blob1_evis_total_norm", &truth_blob1_evis_total_norm, &b_truth_blob1_evis_total_norm);
fChain->SetBranchAddress("truth_blob1_evis_total_truth", &truth_blob1_evis_total_truth, &b_truth_blob1_evis_total_truth);
fChain->SetBranchAddress("truth_blob2_evis_muon", &truth_blob2_evis_muon, &b_truth_blob2_evis_muon);
fChain->SetBranchAddress("truth_blob2_evis_neutron", &truth_blob2_evis_neutron, &b_truth_blob2_evis_neutron);
fChain->SetBranchAddress("truth_blob2_evis_piminus", &truth_blob2_evis_piminus, &b_truth_blob2_evis_piminus);
fChain->SetBranchAddress("truth_blob2_evis_piplus", &truth_blob2_evis_piplus, &b_truth_blob2_evis_piplus);
fChain->SetBranchAddress("truth_blob2_evis_pizero", &truth_blob2_evis_pizero, &b_truth_blob2_evis_pizero);
fChain->SetBranchAddress("truth_blob2_evis_proton", &truth_blob2_evis_proton, &b_truth_blob2_evis_proton);
fChain->SetBranchAddress("truth_blob2_evis_total_norm", &truth_blob2_evis_total_norm, &b_truth_blob2_evis_total_norm);
fChain->SetBranchAddress("truth_blob2_evis_total_truth", &truth_blob2_evis_total_truth, &b_truth_blob2_evis_total_truth);
fChain->SetBranchAddress("truth_dispersed_unused_evis_gamma", &truth_dispersed_unused_evis_gamma, &b_truth_dispersed_unused_evis_gamma);
fChain->SetBranchAddress("truth_dispersed_unused_evis_muon", &truth_dispersed_unused_evis_muon, &b_truth_dispersed_unused_evis_muon);
fChain->SetBranchAddress("truth_dispersed_unused_evis_neutron", &truth_dispersed_unused_evis_neutron, &b_truth_dispersed_unused_evis_neutron);
fChain->SetBranchAddress("truth_dispersed_unused_evis_piminus", &truth_dispersed_unused_evis_piminus, &b_truth_dispersed_unused_evis_piminus);
fChain->SetBranchAddress("truth_dispersed_unused_evis_piplus", &truth_dispersed_unused_evis_piplus, &b_truth_dispersed_unused_evis_piplus);
fChain->SetBranchAddress("truth_dispersed_unused_evis_pizero", &truth_dispersed_unused_evis_pizero, &b_truth_dispersed_unused_evis_pizero);
fChain->SetBranchAddress("truth_dispersed_unused_evis_proton", &truth_dispersed_unused_evis_proton, &b_truth_dispersed_unused_evis_proton);
fChain->SetBranchAddress("truth_dispersed_unused_evis_total_norm", &truth_dispersed_unused_evis_total_norm, &b_truth_dispersed_unused_evis_total_norm);
fChain->SetBranchAddress("truth_dispersed_unused_evis_total_truth", &truth_dispersed_unused_evis_total_truth, &b_truth_dispersed_unused_evis_total_truth);
fChain->SetBranchAddress("truth_ecal_unused_evis_muon", &truth_ecal_unused_evis_muon, &b_truth_ecal_unused_evis_muon);
fChain->SetBranchAddress("truth_ecal_unused_evis_neutron", &truth_ecal_unused_evis_neutron, &b_truth_ecal_unused_evis_neutron);
fChain->SetBranchAddress("truth_ecal_unused_evis_piminus", &truth_ecal_unused_evis_piminus, &b_truth_ecal_unused_evis_piminus);
fChain->SetBranchAddress("truth_ecal_unused_evis_piplus", &truth_ecal_unused_evis_piplus, &b_truth_ecal_unused_evis_piplus);
fChain->SetBranchAddress("truth_ecal_unused_evis_pizero", &truth_ecal_unused_evis_pizero, &b_truth_ecal_unused_evis_pizero);
fChain->SetBranchAddress("truth_ecal_unused_evis_proton", &truth_ecal_unused_evis_proton, &b_truth_ecal_unused_evis_proton);
fChain->SetBranchAddress("truth_ecal_unused_evis_total_norm", &truth_ecal_unused_evis_total_norm, &b_truth_ecal_unused_evis_total_norm);
fChain->SetBranchAddress("truth_ecal_unused_evis_total_truth", &truth_ecal_unused_evis_total_truth, &b_truth_ecal_unused_evis_total_truth);
fChain->SetBranchAddress("truth_eventID", &truth_eventID, &b_truth_eventID);
fChain->SetBranchAddress("truth_hcal_unused_evis_muon", &truth_hcal_unused_evis_muon, &b_truth_hcal_unused_evis_muon);
fChain->SetBranchAddress("truth_hcal_unused_evis_neutron", &truth_hcal_unused_evis_neutron, &b_truth_hcal_unused_evis_neutron);
fChain->SetBranchAddress("truth_hcal_unused_evis_piminus", &truth_hcal_unused_evis_piminus, &b_truth_hcal_unused_evis_piminus);
fChain->SetBranchAddress("truth_hcal_unused_evis_piplus", &truth_hcal_unused_evis_piplus, &b_truth_hcal_unused_evis_piplus);
fChain->SetBranchAddress("truth_hcal_unused_evis_pizero", &truth_hcal_unused_evis_pizero, &b_truth_hcal_unused_evis_pizero);
fChain->SetBranchAddress("truth_hcal_unused_evis_proton", &truth_hcal_unused_evis_proton, &b_truth_hcal_unused_evis_proton);
fChain->SetBranchAddress("truth_hcal_unused_evis_total_norm", &truth_hcal_unused_evis_total_norm, &b_truth_hcal_unused_evis_total_norm);
fChain->SetBranchAddress("truth_hcal_unused_evis_total_truth", &truth_hcal_unused_evis_total_truth, &b_truth_hcal_unused_evis_total_truth);
fChain->SetBranchAddress("truth_michelElectron_E", &truth_michelElectron_E, &b_truth_michelElectron_E);
fChain->SetBranchAddress("truth_michelElectron_P", &truth_michelElectron_P, &b_truth_michelElectron_P);
fChain->SetBranchAddress("truth_michelMuon_P", &truth_michelMuon_P, &b_truth_michelMuon_P);
fChain->SetBranchAddress("truth_michelMuon_end_dist_vtx", &truth_michelMuon_end_dist_vtx, &b_truth_michelMuon_end_dist_vtx);
fChain->SetBranchAddress("truth_michelMuon_length", &truth_michelMuon_length, &b_truth_michelMuon_length);
fChain->SetBranchAddress("truth_michelPion_P", &truth_michelPion_P, &b_truth_michelPion_P);
fChain->SetBranchAddress("truth_michelPion_begin_dist_vtx", &truth_michelPion_begin_dist_vtx, &b_truth_michelPion_begin_dist_vtx);
fChain->SetBranchAddress("truth_michelPion_length", &truth_michelPion_length, &b_truth_michelPion_length);
fChain->SetBranchAddress("truth_muon_P", &truth_muon_P, &b_truth_muon_P);
fChain->SetBranchAddress("truth_muon_theta", &truth_muon_theta, &b_truth_muon_theta);
fChain->SetBranchAddress("truth_other_unused_evis_muon", &truth_other_unused_evis_muon, &b_truth_other_unused_evis_muon);
fChain->SetBranchAddress("truth_other_unused_evis_neutron", &truth_other_unused_evis_neutron, &b_truth_other_unused_evis_neutron);
fChain->SetBranchAddress("truth_other_unused_evis_piminus", &truth_other_unused_evis_piminus, &b_truth_other_unused_evis_piminus);
fChain->SetBranchAddress("truth_other_unused_evis_piplus", &truth_other_unused_evis_piplus, &b_truth_other_unused_evis_piplus);
fChain->SetBranchAddress("truth_other_unused_evis_pizero", &truth_other_unused_evis_pizero, &b_truth_other_unused_evis_pizero);
fChain->SetBranchAddress("truth_other_unused_evis_proton", &truth_other_unused_evis_proton, &b_truth_other_unused_evis_proton);
fChain->SetBranchAddress("truth_other_unused_evis_total_norm", &truth_other_unused_evis_total_norm, &b_truth_other_unused_evis_total_norm);
fChain->SetBranchAddress("truth_other_unused_evis_total_truth", &truth_other_unused_evis_total_truth, &b_truth_other_unused_evis_total_truth);
fChain->SetBranchAddress("truth_pi0_P", &truth_pi0_P, &b_truth_pi0_P);
fChain->SetBranchAddress("truth_pi0_theta", &truth_pi0_theta, &b_truth_pi0_theta);
fChain->SetBranchAddress("truth_proton_P", &truth_proton_P, &b_truth_proton_P);
fChain->SetBranchAddress("truth_proton_theta", &truth_proton_theta, &b_truth_proton_theta);
fChain->SetBranchAddress("truth_total_captured_evis_pizero", &truth_total_captured_evis_pizero, &b_truth_total_captured_evis_pizero);
fChain->SetBranchAddress("truth_total_captured_evis_total_norm", &truth_total_captured_evis_total_norm, &b_truth_total_captured_evis_total_norm);
fChain->SetBranchAddress("truth_total_captured_evis_total_truth", &truth_total_captured_evis_total_truth, &b_truth_total_captured_evis_total_truth);
fChain->SetBranchAddress("truth_vertex_unused_evis_gamma", &truth_vertex_unused_evis_gamma, &b_truth_vertex_unused_evis_gamma);
fChain->SetBranchAddress("truth_vertex_unused_evis_muon", &truth_vertex_unused_evis_muon, &b_truth_vertex_unused_evis_muon);
fChain->SetBranchAddress("truth_vertex_unused_evis_neutron", &truth_vertex_unused_evis_neutron, &b_truth_vertex_unused_evis_neutron);
fChain->SetBranchAddress("truth_vertex_unused_evis_piminus", &truth_vertex_unused_evis_piminus, &b_truth_vertex_unused_evis_piminus);
fChain->SetBranchAddress("truth_vertex_unused_evis_piplus", &truth_vertex_unused_evis_piplus, &b_truth_vertex_unused_evis_piplus);
fChain->SetBranchAddress("truth_vertex_unused_evis_pizero", &truth_vertex_unused_evis_pizero, &b_truth_vertex_unused_evis_pizero);
fChain->SetBranchAddress("truth_vertex_unused_evis_proton", &truth_vertex_unused_evis_proton, &b_truth_vertex_unused_evis_proton);
fChain->SetBranchAddress("truth_vertex_unused_evis_total_norm", &truth_vertex_unused_evis_total_norm, &b_truth_vertex_unused_evis_total_norm);
fChain->SetBranchAddress("truth_vertex_unused_evis_total_truth", &truth_vertex_unused_evis_total_truth, &b_truth_vertex_unused_evis_total_truth);
fChain->SetBranchAddress("truth_gamma1_4P", truth_gamma1_4P, &b_truth_gamma1_4P);
fChain->SetBranchAddress("truth_gamma1_final_pos", truth_gamma1_final_pos, &b_truth_gamma1_final_pos);
fChain->SetBranchAddress("truth_gamma1_init_pos", truth_gamma1_init_pos, &b_truth_gamma1_init_pos);
fChain->SetBranchAddress("truth_gamma2_4P", truth_gamma2_4P, &b_truth_gamma2_4P);
fChain->SetBranchAddress("truth_gamma2_final_pos", truth_gamma2_final_pos, &b_truth_gamma2_final_pos);
fChain->SetBranchAddress("truth_gamma2_init_pos", truth_gamma2_init_pos, &b_truth_gamma2_init_pos);
fChain->SetBranchAddress("genie_wgt_n_shifts", &genie_wgt_n_shifts, &b_genie_wgt_n_shifts);
fChain->SetBranchAddress("truth_genie_wgt_AGKYxF1pi", truth_genie_wgt_AGKYxF1pi, &b_truth_genie_wgt_AGKYxF1pi);
fChain->SetBranchAddress("truth_genie_wgt_AhtBY", truth_genie_wgt_AhtBY, &b_truth_genie_wgt_AhtBY);
fChain->SetBranchAddress("truth_genie_wgt_BhtBY", truth_genie_wgt_BhtBY, &b_truth_genie_wgt_BhtBY);
fChain->SetBranchAddress("truth_genie_wgt_CCQEPauliSupViaKF", truth_genie_wgt_CCQEPauliSupViaKF, &b_truth_genie_wgt_CCQEPauliSupViaKF);
fChain->SetBranchAddress("truth_genie_wgt_CV1uBY", truth_genie_wgt_CV1uBY, &b_truth_genie_wgt_CV1uBY);
fChain->SetBranchAddress("truth_genie_wgt_CV2uBY", truth_genie_wgt_CV2uBY, &b_truth_genie_wgt_CV2uBY);
fChain->SetBranchAddress("truth_genie_wgt_EtaNCEL", truth_genie_wgt_EtaNCEL, &b_truth_genie_wgt_EtaNCEL);
fChain->SetBranchAddress("truth_genie_wgt_FrAbs_N", truth_genie_wgt_FrAbs_N, &b_truth_genie_wgt_FrAbs_N);
fChain->SetBranchAddress("truth_genie_wgt_FrAbs_pi", truth_genie_wgt_FrAbs_pi, &b_truth_genie_wgt_FrAbs_pi);
fChain->SetBranchAddress("truth_genie_wgt_FrCEx_N", truth_genie_wgt_FrCEx_N, &b_truth_genie_wgt_FrCEx_N);
fChain->SetBranchAddress("truth_genie_wgt_FrCEx_pi", truth_genie_wgt_FrCEx_pi, &b_truth_genie_wgt_FrCEx_pi);
fChain->SetBranchAddress("truth_genie_wgt_FrElas_N", truth_genie_wgt_FrElas_N, &b_truth_genie_wgt_FrElas_N);
fChain->SetBranchAddress("truth_genie_wgt_FrElas_pi", truth_genie_wgt_FrElas_pi, &b_truth_genie_wgt_FrElas_pi);
fChain->SetBranchAddress("truth_genie_wgt_FrInel_N", truth_genie_wgt_FrInel_N, &b_truth_genie_wgt_FrInel_N);
fChain->SetBranchAddress("truth_genie_wgt_FrInel_pi", truth_genie_wgt_FrInel_pi, &b_truth_genie_wgt_FrInel_pi);
fChain->SetBranchAddress("truth_genie_wgt_FrPiProd_N", truth_genie_wgt_FrPiProd_N, &b_truth_genie_wgt_FrPiProd_N);
fChain->SetBranchAddress("truth_genie_wgt_FrPiProd_pi", truth_genie_wgt_FrPiProd_pi, &b_truth_genie_wgt_FrPiProd_pi);
fChain->SetBranchAddress("truth_genie_wgt_MFP_N", truth_genie_wgt_MFP_N, &b_truth_genie_wgt_MFP_N);
fChain->SetBranchAddress("truth_genie_wgt_MFP_pi", truth_genie_wgt_MFP_pi, &b_truth_genie_wgt_MFP_pi);
fChain->SetBranchAddress("truth_genie_wgt_MaCCQE", truth_genie_wgt_MaCCQE, &b_truth_genie_wgt_MaCCQE);
fChain->SetBranchAddress("truth_genie_wgt_MaCCQEshape", truth_genie_wgt_MaCCQEshape, &b_truth_genie_wgt_MaCCQEshape);
fChain->SetBranchAddress("truth_genie_wgt_MaNCEL", truth_genie_wgt_MaNCEL, &b_truth_genie_wgt_MaNCEL);
fChain->SetBranchAddress("truth_genie_wgt_MaRES", truth_genie_wgt_MaRES, &b_truth_genie_wgt_MaRES);
fChain->SetBranchAddress("truth_genie_wgt_MvRES", truth_genie_wgt_MvRES, &b_truth_genie_wgt_MvRES);
fChain->SetBranchAddress("truth_genie_wgt_NormCCQE", truth_genie_wgt_NormCCQE, &b_truth_genie_wgt_NormCCQE);
fChain->SetBranchAddress("truth_genie_wgt_NormCCRES", truth_genie_wgt_NormCCRES, &b_truth_genie_wgt_NormCCRES);
fChain->SetBranchAddress("truth_genie_wgt_NormDISCC", truth_genie_wgt_NormDISCC, &b_truth_genie_wgt_NormDISCC);
fChain->SetBranchAddress("truth_genie_wgt_NormNCRES", truth_genie_wgt_NormNCRES, &b_truth_genie_wgt_NormNCRES);
fChain->SetBranchAddress("truth_genie_wgt_RDecBR1gamma", truth_genie_wgt_RDecBR1gamma, &b_truth_genie_wgt_RDecBR1gamma);
fChain->SetBranchAddress("truth_genie_wgt_Rvn1pi", truth_genie_wgt_Rvn1pi, &b_truth_genie_wgt_Rvn1pi);
fChain->SetBranchAddress("truth_genie_wgt_Rvn2pi", truth_genie_wgt_Rvn2pi, &b_truth_genie_wgt_Rvn2pi);
fChain->SetBranchAddress("truth_genie_wgt_Rvp1pi", truth_genie_wgt_Rvp1pi, &b_truth_genie_wgt_Rvp1pi);
fChain->SetBranchAddress("truth_genie_wgt_Rvp2pi", truth_genie_wgt_Rvp2pi, &b_truth_genie_wgt_Rvp2pi);
fChain->SetBranchAddress("truth_genie_wgt_Theta_Delta2Npi", truth_genie_wgt_Theta_Delta2Npi, &b_truth_genie_wgt_Theta_Delta2Npi);
fChain->SetBranchAddress("truth_genie_wgt_VecFFCCQEshape", truth_genie_wgt_VecFFCCQEshape, &b_truth_genie_wgt_VecFFCCQEshape);
fChain->SetBranchAddress("truth_genie_wgt_shifts", truth_genie_wgt_shifts, &b_truth_genie_wgt_shifts);
fChain->SetBranchAddress("truth_michelMuon_endPoint", truth_michelMuon_endPoint, &b_truth_michelMuon_endPoint);
fChain->SetBranchAddress("truth_muon_4P", truth_muon_4P, &b_truth_muon_4P);
fChain->SetBranchAddress("truth_pi0_4P", truth_pi0_4P, &b_truth_pi0_4P);
fChain->SetBranchAddress("truth_proton_4P", truth_proton_4P, &b_truth_proton_4P);
fChain->SetBranchAddress("mc_run", &mc_run, &b_mc_run);
fChain->SetBranchAddress("mc_subrun", &mc_subrun, &b_mc_subrun);
fChain->SetBranchAddress("mc_nInteractions", &mc_nInteractions, &b_mc_nInteractions);
fChain->SetBranchAddress("mc_MIState", &mc_MIState, &b_mc_MIState);
fChain->SetBranchAddress("mc_pot", &mc_pot, &b_mc_pot);
fChain->SetBranchAddress("mc_beamConfig", &mc_beamConfig, &b_mc_beamConfig);
fChain->SetBranchAddress("mc_processType", &mc_processType, &b_mc_processType);
fChain->SetBranchAddress("mc_nthEvtInSpill", &mc_nthEvtInSpill, &b_mc_nthEvtInSpill);
fChain->SetBranchAddress("mc_nthEvtInFile", &mc_nthEvtInFile, &b_mc_nthEvtInFile);
fChain->SetBranchAddress("mc_intType", &mc_intType, &b_mc_intType);
fChain->SetBranchAddress("mc_current", &mc_current, &b_mc_current);
fChain->SetBranchAddress("mc_charm", &mc_charm, &b_mc_charm);
fChain->SetBranchAddress("mc_weight", &mc_weight, &b_mc_weight);
fChain->SetBranchAddress("mc_XSec", &mc_XSec, &b_mc_XSec);
fChain->SetBranchAddress("mc_diffXSec", &mc_diffXSec, &b_mc_diffXSec);
fChain->SetBranchAddress("mc_incoming", &mc_incoming, &b_mc_incoming);
fChain->SetBranchAddress("mc_fluxDriverProb", &mc_fluxDriverProb, &b_mc_fluxDriverProb);
fChain->SetBranchAddress("mc_targetNucleus", &mc_targetNucleus, &b_mc_targetNucleus);
fChain->SetBranchAddress("mc_targetZ", &mc_targetZ, &b_mc_targetZ);
fChain->SetBranchAddress("mc_targetA", &mc_targetA, &b_mc_targetA);
fChain->SetBranchAddress("mc_targetNucleon", &mc_targetNucleon, &b_mc_targetNucleon);
fChain->SetBranchAddress("mc_struckQuark", &mc_struckQuark, &b_mc_struckQuark);
fChain->SetBranchAddress("mc_seaQuark", &mc_seaQuark, &b_mc_seaQuark);
fChain->SetBranchAddress("mc_resID", &mc_resID, &b_mc_resID);
fChain->SetBranchAddress("mc_primaryLepton", &mc_primaryLepton, &b_mc_primaryLepton);
fChain->SetBranchAddress("mc_incomingE", &mc_incomingE, &b_mc_incomingE);
fChain->SetBranchAddress("mc_Bjorkenx", &mc_Bjorkenx, &b_mc_Bjorkenx);
fChain->SetBranchAddress("mc_Bjorkeny", &mc_Bjorkeny, &b_mc_Bjorkeny);
fChain->SetBranchAddress("mc_Q2", &mc_Q2, &b_mc_Q2);
fChain->SetBranchAddress("mc_nuT", &mc_nuT, &b_mc_nuT);
fChain->SetBranchAddress("mc_w", &mc_w, &b_mc_w);
fChain->SetBranchAddress("mc_vtx", mc_vtx, &b_mc_vtx);
fChain->SetBranchAddress("mc_incomingPartVec", mc_incomingPartVec, &b_mc_incomingPartVec);
fChain->SetBranchAddress("mc_initNucVec", mc_initNucVec, &b_mc_initNucVec);
fChain->SetBranchAddress("mc_primFSLepton", mc_primFSLepton, &b_mc_primFSLepton);
fChain->SetBranchAddress("mc_nFSPart", &mc_nFSPart, &b_mc_nFSPart);
fChain->SetBranchAddress("mc_FSPartPx", mc_FSPartPx, &b_mc_FSPartPx);
fChain->SetBranchAddress("mc_FSPartPy", mc_FSPartPy, &b_mc_FSPartPy);
fChain->SetBranchAddress("mc_FSPartPz", mc_FSPartPz, &b_mc_FSPartPz);
fChain->SetBranchAddress("mc_FSPartE", mc_FSPartE, &b_mc_FSPartE);
fChain->SetBranchAddress("mc_FSPartPDG", mc_FSPartPDG, &b_mc_FSPartPDG);
fChain->SetBranchAddress("mc_er_nPart", &mc_er_nPart, &b_mc_er_nPart);
fChain->SetBranchAddress("mc_er_ID", mc_er_ID, &b_mc_er_ID);
fChain->SetBranchAddress("mc_er_status", mc_er_status, &b_mc_er_status);
fChain->SetBranchAddress("mc_er_posInNucX", mc_er_posInNucX, &b_mc_er_posInNucX);
fChain->SetBranchAddress("mc_er_posInNucY", mc_er_posInNucY, &b_mc_er_posInNucY);
fChain->SetBranchAddress("mc_er_posInNucZ", mc_er_posInNucZ, &b_mc_er_posInNucZ);
fChain->SetBranchAddress("mc_er_Px", mc_er_Px, &b_mc_er_Px);
fChain->SetBranchAddress("mc_er_Py", mc_er_Py, &b_mc_er_Py);
fChain->SetBranchAddress("mc_er_Pz", mc_er_Pz, &b_mc_er_Pz);
fChain->SetBranchAddress("mc_er_E", mc_er_E, &b_mc_er_E);
fChain->SetBranchAddress("mc_er_FD", mc_er_FD, &b_mc_er_FD);
fChain->SetBranchAddress("mc_er_LD", mc_er_LD, &b_mc_er_LD);
fChain->SetBranchAddress("mc_er_mother", mc_er_mother, &b_mc_er_mother);
fChain->SetBranchAddress("mc_fr_nNuAncestorIDs", &mc_fr_nNuAncestorIDs, &b_mc_fr_nNuAncestorIDs);
fChain->SetBranchAddress("mc_fr_nuAncestorIDs", mc_fr_nuAncestorIDs, &b_mc_fr_nuAncestorIDs);
fChain->SetBranchAddress("mc_fr_nuParentID", &mc_fr_nuParentID, &b_mc_fr_nuParentID);
fChain->SetBranchAddress("mc_fr_decMode", &mc_fr_decMode, &b_mc_fr_decMode);
fChain->SetBranchAddress("mc_fr_primProtonVtx", mc_fr_primProtonVtx, &b_mc_fr_primProtonVtx);
fChain->SetBranchAddress("mc_fr_primProtonP", mc_fr_primProtonP, &b_mc_fr_primProtonP);
fChain->SetBranchAddress("mc_fr_nuParentDecVtx", mc_fr_nuParentDecVtx, &b_mc_fr_nuParentDecVtx);
fChain->SetBranchAddress("mc_fr_nuParentProdVtx", mc_fr_nuParentProdVtx, &b_mc_fr_nuParentProdVtx);
fChain->SetBranchAddress("mc_fr_nuParentProdP", mc_fr_nuParentProdP, &b_mc_fr_nuParentProdP);
fChain->SetBranchAddress("mc_cvweight_total", &mc_cvweight_total, &b_mc_cvweight_total);
fChain->SetBranchAddress("wgt", &wgt, &b_wgt);
fChain->SetBranchAddress("mc_cvweight_totalFlux", &mc_cvweight_totalFlux, &b_mc_cvweight_totalFlux);
fChain->SetBranchAddress("mc_cvweight_totalXsec", &mc_cvweight_totalXsec, &b_mc_cvweight_totalXsec);
fChain->SetBranchAddress("mc_ppfx1_cvweight", &mc_ppfx1_cvweight, &b_mc_ppfx1_cvweight);
fChain->SetBranchAddress("mc_gen1_cvweight_total", &mc_gen1_cvweight_total, &b_mc_gen1_cvweight_total);
fChain->SetBranchAddress("gen1_wgt", &gen1_wgt, &b_gen1_wgt);
fChain->SetBranchAddress("mc_gen1_cvweight_totalFlux", &mc_gen1_cvweight_totalFlux, &b_mc_gen1_cvweight_totalFlux);
fChain->SetBranchAddress("mc_gen1_cvweight_NA49", &mc_gen1_cvweight_NA49, &b_mc_gen1_cvweight_NA49);
fChain->SetBranchAddress("mc_wgt_Flux_BeamFocus_sz", &mc_wgt_Flux_BeamFocus_sz, &b_mc_wgt_Flux_BeamFocus_sz);
fChain->SetBranchAddress("mc_wgt_Flux_BeamFocus", mc_wgt_Flux_BeamFocus, &b_mc_wgt_Flux_BeamFocus);
fChain->SetBranchAddress("mc_wgt_gen1_Flux_Tertiary_sz", &mc_wgt_gen1_Flux_Tertiary_sz, &b_mc_wgt_gen1_Flux_Tertiary_sz);
fChain->SetBranchAddress("mc_wgt_gen1_Flux_Tertiary", mc_wgt_gen1_Flux_Tertiary, &b_mc_wgt_gen1_Flux_Tertiary);
fChain->SetBranchAddress("mc_wgt_gen1_Flux_NA49_sz", &mc_wgt_gen1_Flux_NA49_sz, &b_mc_wgt_gen1_Flux_NA49_sz);
fChain->SetBranchAddress("mc_wgt_gen1_Flux_NA49", mc_wgt_gen1_Flux_NA49, &b_mc_wgt_gen1_Flux_NA49);
fChain->SetBranchAddress("mc_wgt_Norm_sz", &mc_wgt_Norm_sz, &b_mc_wgt_Norm_sz);
fChain->SetBranchAddress("mc_wgt_Norm", &mc_wgt_Norm, &b_mc_wgt_Norm);
fChain->SetBranchAddress("mc_wgt_ppfx1_Total_sz", &mc_wgt_ppfx1_Total_sz, &b_mc_wgt_ppfx1_Total_sz);
fChain->SetBranchAddress("mc_wgt_ppfx1_Total", mc_wgt_ppfx1_Total, &b_mc_wgt_ppfx1_Total);
Notify();
}
Bool_t Truth_Branch::Notify()
{
// The Notify() function is called when a new file is opened. This
// can be either for a new TTree in a TChain or when when a new TTree
// is started when using PROOF. It is normally not necessary to make changes
// to the generated code, but the routine can be extended by the
// user if needed. The return value is currently not used.
return kTRUE;
}
void Truth_Branch::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
if (!fChain) return;
fChain->Show(entry);
}
Int_t Truth_Branch::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns 1 if entry is accepted.
// returns -1 otherwise.
return 1;
}
#endif // #ifdef Truth_Branch_cxx
|
e14f13edcfde39cc19684f298eb956697c2d63df
|
a3d6556180e74af7b555f8d47d3fea55b94bcbda
|
/services/device/serial/serial_device_enumerator.h
|
a659f8eddce95d40f1eb2a6562328cba7834bd06
|
[
"BSD-3-Clause"
] |
permissive
|
chromium/chromium
|
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
|
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
|
refs/heads/main
| 2023-08-24T00:35:12.585945
| 2023-08-23T22:01:11
| 2023-08-23T22:01:11
| 120,360,765
| 17,408
| 7,102
|
BSD-3-Clause
| 2023-09-10T23:44:27
| 2018-02-05T20:55:32
| null |
UTF-8
|
C++
| false
| false
| 2,030
|
h
|
serial_device_enumerator.h
|
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_H_
#define SERVICES_DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_H_
#include <map>
#include <memory>
#include <vector>
#include "base/observer_list.h"
#include "base/sequence_checker.h"
#include "base/task/single_thread_task_runner.h"
#include "base/unguessable_token.h"
#include "services/device/public/mojom/serial.mojom.h"
#include "services/device/serial/serial_io_handler.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace base {
class FilePath;
}
namespace device {
// Discovers and enumerates serial devices available to the host.
class SerialDeviceEnumerator {
public:
class Observer : public base::CheckedObserver {
public:
virtual void OnPortAdded(const mojom::SerialPortInfo& port) = 0;
virtual void OnPortRemoved(const mojom::SerialPortInfo& port) = 0;
};
static std::unique_ptr<SerialDeviceEnumerator> Create(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
SerialDeviceEnumerator();
virtual ~SerialDeviceEnumerator();
std::vector<mojom::SerialPortInfoPtr> GetDevices();
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
absl::optional<base::FilePath> GetPathFromToken(
const base::UnguessableToken& token,
bool use_alternate_path);
protected:
// These helper methods take care of managing |ports_| and notifying
// observers. |port|s passed to AddPort() must be unique and the |token|
// passed to RemovePort() must have previously been added.
void AddPort(mojom::SerialPortInfoPtr port);
void RemovePort(base::UnguessableToken token);
SEQUENCE_CHECKER(sequence_checker_);
private:
std::map<base::UnguessableToken, mojom::SerialPortInfoPtr> ports_;
base::ObserverList<Observer> observer_list_;
};
} // namespace device
#endif // SERVICES_DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_H_
|
bbbd54dc27d1f40583e9856fcef4bf150c3da0b1
|
817dc9bebf0d278fcf474f31a77cb23ada61056c
|
/QL/CommonClass/ClassDB/DBStyle_FileInfo_V.cpp
|
7476942431237ade885454a4ffc7e7be852d66b3
|
[] |
no_license
|
dudugi/NewForTortoise
|
6f7d82cea00b49af3c38f1e332937ce3edf894b4
|
685ba32e8d7ee16c22f115b681a21f3d4e3fddf8
|
refs/heads/master
| 2022-02-08T11:56:42.102049
| 2022-01-25T07:02:47
| 2022-01-25T07:02:47
| 196,016,007
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,916
|
cpp
|
DBStyle_FileInfo_V.cpp
|
#include "StdAfx.h"
#include "DBKeyDef.h"
#include "DBStyle_FileInfo_V.h"
#include "DBKeyDef_V.h"
IMPLEMENT_SERIAL(CDBStyle_FileInfo_VData, CDataMid, 1)
CDBStyle_FileInfo_VData::CDBStyle_FileInfo_VData(void)
{
ResetData();
}
CDBStyle_FileInfo_VData::~CDBStyle_FileInfo_VData(void)
{
}
void CDBStyle_FileInfo_VData::ResetData()
{
m_ID = 0;
m_nFileID = 0;
m_strStyleNo = _T("");
m_nFileType = 0;
m_strRelativePath = _T("");
m_strUploadUserID = _T("");
m_strUploadTime = _T("");
m_strFileMD5 = _T("");
m_strFileName = _T("");
m_strFileExtension = _T("");
m_nFileSize = 0;
m_strRemark = _T("");
m_nSort = 1;
m_nParam_FileType = -1;
m_nParam_WholeType= 0;
m_strParam_Size = _T("");
SetDataType(DAT_STYLE_FILEINFO);
}
void CDBStyle_FileInfo_VData::Copy( CDBStyle_FileInfo_VData *pData )
{
ASSERT(pData != NULL);
CDataMid::Copy(pData);
m_ID = pData->m_ID ;
m_nFileID = pData->m_nFileID ;
m_strStyleNo = pData->m_strStyleNo ;
m_nFileType = pData->m_nFileType ;
m_strRelativePath = pData->m_strRelativePath ;
m_strUploadUserID = pData->m_strUploadUserID ;
m_strUploadTime = pData->m_strUploadTime ;
m_strFileMD5 = pData->m_strFileMD5 ;
m_strFileName = pData->m_strFileName ;
m_strFileExtension = pData->m_strFileExtension ;
m_nFileSize = pData->m_nFileSize ;
m_strRemark = pData->m_strRemark ;
m_nSort = pData->m_nSort ;
m_nParam_FileType = pData->m_nParam_FileType ;
m_nParam_WholeType = pData->m_nParam_WholeType ;
m_strParam_Size = pData->m_strParam_Size ;
}
BOOL CDBStyle_FileInfo_VData::GetAllDBInfo( CADOConn *pADOConn)
{
ASSERT(pADOConn);
m_ID = pADOConn->GetValueInt64 (DBStyleFileInfo_V_key_ID );
m_nFileID = pADOConn->GetValueInt64 (DBStyleFileInfo_V_key_nFileID );
m_strStyleNo = pADOConn->GetValueString(DBStyleFileInfo_V_key_cStyleNo );
m_nFileType = pADOConn->GetValueInt64 (DBStyleFileInfo_V_key_nFileType );
m_strRelativePath = pADOConn->GetValueString(DBStyleFileInfo_V_key_cRelativePath );
m_strRelativePath.MakeLower(); //ͳһСд by duchen
m_strUploadUserID = pADOConn->GetValueString(DBStyleFileInfo_V_key_cUploadUserID );
m_strUploadTime = pADOConn->GetValueString(DBStyleFileInfo_V_key_cUploadTime );
m_strFileMD5 = pADOConn->GetValueString(DBStyleFileInfo_V_key_cFileMD5 );
m_strFileName = pADOConn->GetValueString(DBStyleFileInfo_V_key_cFileName );
m_strFileExtension= pADOConn->GetValueString(DBStyleFileInfo_V_key_cFileExtension );
m_nFileSize = pADOConn->GetValueInt64 (DBStyleFileInfo_V_key_nFileSize );
m_strRemark = pADOConn->GetValueString(DBStyleFileInfo_V_key_cRemark );
m_nSort = pADOConn->GetValueInt (DBStyleFileInfo_V_key_nSort );
m_nParam_FileType = pADOConn->GetValueInt (DBStyleFileInfo_V_key_nParam_FileType );
m_nParam_WholeType= pADOConn->GetValueInt (DBStyleFileInfo_V_key_nParam_WholeType);
m_strParam_Size = pADOConn->GetValueString(DBStyleFileInfo_V_key_cParam_Size );
return TRUE;
}
void CDBStyle_FileInfo_VList::GetStyleFileInfo(CADOConn* pAdo,CString strStyleNo,vector<CDBStyle_FileInfo_VData*>& vecFileInfo)
{
ASSERT(pAdo != nullptr);
ASSERT(!strStyleNo.IsEmpty());
vecFileInfo.clear();
CString strSql;
strSql.Format(_T("select * from V_StyleFileInfo where cStyleNo = '%s'"),strStyleNo);
pAdo->GetRecordSet(strSql);
while(!pAdo->adoEOF())
{
CDBStyle_FileInfo_VData* pData = new CDBStyle_FileInfo_VData;
pData->GetAllDBInfo(pAdo);
vecFileInfo.push_back(pData);
pAdo->MoveNext();
}
}
|
5adb4535e3a567f70df91a4ab902ffb558f58770
|
02b69d6b238fbff43eebfcc3c1af9936fa234659
|
/SRC/NAS/EMM/Attach.cpp
|
0d9814895e14caa3501e87e7967eb8e8bda21f2f
|
[
"Apache-2.0",
"BSD-3-Clause",
"BSD-2-Clause-Views",
"BSD-2-Clause"
] |
permissive
|
RECONet/RECO
|
3c90c0ebbbf821fdf141d7b5b34e52f584daa1e6
|
7cee52bdb50a6fee99734ad88ae42b65c75b2000
|
refs/heads/master
| 2021-06-24T08:21:46.919032
| 2018-06-09T16:48:12
| 2018-06-09T16:48:12
| 133,645,814
| 12
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 79,301
|
cpp
|
Attach.cpp
|
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You 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.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*****************************************************************************
Source Attach.c
Version 0.1
Date 2012/12/04
Product NAS stack
Subsystem EPS Mobility Management
Author Frederic Maurel
Description Defines the attach related EMM procedure executed by the
Non-Access Stratum.
To get internet connectivity from the network, the network
have to know about the UE. When the UE is switched on, it
has to initiate the attach procedure to get initial access
to the network and register its presence to the Evolved
Packet Core (EPC) network in order to receive EPS services.
As a result of a successful attach procedure, a context is
created for the UE in the MME, and a default bearer is esta-
blished between the UE and the PDN-GW. The UE gets the home
agent IPv4 and IPv6 addresses and full connectivity to the
IP network.
The network may also initiate the activation of additional
dedicated bearers for the support of a specific service.
*****************************************************************************/
#include <pthread.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include "bstrlib.h"
#include "gcc_diag.h"
#include "dynamic_memory_check.h"
#include "assertions.h"
#include "log.h"
#include "msc.h"
#include "common_types.h"
#include "nas_timer.h"
#include "3gpp_24.008.h"
#include "3gpp_36.401.h"
#include "3gpp_29.274.h"
#include "conversions.h"
#include "3gpp_requirements_24.301.h"
#include "nas_message.h"
#include "as_message.h"
#include "mme_app_ue_context.hpp"
#include "emm_proc.h"
#include "networkDef.h"
#include "emm_sap.h"
#include "mme_api.h"
//#include "emm_data.h"
#include "esm_proc.h"
#include "esm_sapDef.h"
#include "esm_sap.h"
#include "emm_cause.h"
#include "NasSecurityAlgorithms.h"
#include "mme_config.h"
#include "nas_itti_messaging.h"
#include "mme_app_defs.h"
#include "nas_config.h"
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/
/****************************************************************************/
/******************* L O C A L D E F I N I T I O N S *******************/
/****************************************************************************/
/* String representation of the EPS attach type */
static const char *_emm_attach_type_str[] = {
"EPS", "IMSI", "EMERGENCY", "RESERVED"
};
/*
--------------------------------------------------------------------------
Internal data handled by the attach procedure in the MME
--------------------------------------------------------------------------
*/
/*
Timer handlers
*/
static void *_emm_attach_t3450_handler (void *);
/*
Functions that may initiate EMM common procedures
*/
static int _emm_attach_identify (emm_context_t *emm_context);
static int _emm_attach_security (emm_context_t *emm_context);
static int _emm_attach (emm_context_t *emm_context);
/*
Abnormal case attach procedures
*/
static int _emm_attach_release (emm_context_t *emm_context);
int _emm_attach_reject (emm_context_t *emm_context);
static int _emm_attach_abort (emm_context_t *emm_context);
static int _emm_attach_have_changed (
const emm_context_t * ctx,
emm_proc_attach_type_t type,
ksi_t ksi,
guti_t * guti,
imsi_t * imsi,
imei_t * imei,
const ue_network_capability_t * const ue_network_capability,
const ms_network_capability_t * const ms_network_capability);
static int _emm_attach_update (
emm_context_t * ctx,
mme_ue_s1ap_id_t ue_id,
emm_proc_attach_type_t type,
ksi_t ksi,
bool is_native_guti,
guti_t * guti,
imsi_t * imsi,
imei_t * imei,
const tai_t * const originating_tai,
const ue_network_capability_t * const ue_network_capability,
const ms_network_capability_t * const ms_network_capability,
const_bstring esm_msg_pP);
static int _emm_attach_accept (emm_context_t * emm_context);
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
/*
--------------------------------------------------------------------------
Attach procedure executed by the MME
--------------------------------------------------------------------------
*/
/****************************************************************************
** **
** Name: emm_proc_attach_request() **
** **
** Description: Performs the UE requested attach procedure **
** **
** 3GPP TS 24.301, section 5.5.1.2.3 **
** The network may initiate EMM common procedures, e.g. the **
** identification, authentication and security mode control **
** procedures during the attach procedure, depending on the **
** information received in the ATTACH REQUEST message (e.g. **
** IMSI, GUTI and KSI). **
** **
** Inputs: ue_id: UE lower layer identifier **
** type: Type of the requested attach **
** native_ksi: true if the security context is of type **
** native (for KSIASME) **
** ksi: The NAS ket sey identifier **
** native_guti: true if the provided GUTI is native GUTI **
** guti: The GUTI if provided by the UE **
** imsi: The IMSI if provided by the UE **
** imei: The IMEI if provided by the UE **
** last_visited_registered_tai: Identifies the last visited tracking area **
** the UE is registered to **
** eea: Supported EPS encryption algorithms **
** eia: Supported EPS integrity algorithms **
** esm_msg_pP: PDN connectivity request ESM message **
** Others: _emm_data **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: _emm_data **
** **
***************************************************************************/
int
emm_proc_attach_request (
enb_s1ap_id_key_t enb_ue_s1ap_id_key,
mme_ue_s1ap_id_t ue_id,
const bool is_initial,
const emm_proc_attach_type_t type,
const bool is_native_ksi,
const ksi_t ksi,
const bool is_native_guti,
guti_t * guti,
imsi_t * imsi,
imei_t * imei,
tai_t * last_visited_registered_tai,
const tai_t * const originating_tai,
const ecgi_t * const originating_ecgi,
const ue_network_capability_t * const ue_network_capability,
const ms_network_capability_t * const ms_network_capability,
const_bstring esm_msg_pP,
const nas_message_decode_status_t * const decode_status)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
int rc = RETURNerror;
ue_mm_context_t ue_ctx;
emm_fsm_state_t fsm_state = EMM_DEREGISTERED;
bool create_new_emm_ctxt = false;
bool duplicate_enb_context_detected = false;
ue_mm_context_t * ue_mm_context = NULL;
imsi64_t imsi64 = INVALID_IMSI64;
if (imsi) {
imsi64 = imsi_to_imsi64(imsi);
}
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC ATTACH - EPS attach type = %s (%d) initial %u requested (ue_id=" MME_UE_S1AP_ID_FMT ")\n",
_emm_attach_type_str[type], type, is_initial, ue_id);
/*
* Initialize the temporary UE context
*/
/*
* Get the UE's EMM context if it exists
*/
// if ue_id is valid (sent by eNB), we should always find the context
if (INVALID_MME_UE_S1AP_ID != ue_id) {
ue_mm_context = mme_ue_context_exists_mme_ue_s1ap_id (&mme_app_desc.mme_ue_contexts, ue_id);
} else {
if (guti) { // no need for && (is_native_guti)
ue_mm_context = mme_ue_context_exists_guti (&mme_app_desc.mme_ue_contexts, guti);
if (ue_mm_context) {
ue_id = ue_mm_context->mme_ue_s1ap_id;
if (ue_mm_context->enb_s1ap_id_key != enb_ue_s1ap_id_key) {
duplicate_enb_context_detected = true;
OAILOG_TRACE (LOG_NAS_EMM,
"EMM-PROC - Found old ue_mm_context enb_ue_s1ap_id " ENB_UE_S1AP_ID_FMT " mme_ue_s1ap_id " MME_UE_S1AP_ID_FMT " matching GUTI in ATTACH_REQUEST\n",
ue_mm_context->enb_ue_s1ap_id, ue_mm_context->mme_ue_s1ap_id);
}
}
}
if ((!ue_mm_context) && (imsi)) {
ue_mm_context = mme_ue_context_exists_imsi (&mme_app_desc.mme_ue_contexts, imsi64);
if (ue_mm_context) {
ue_id = ue_mm_context->mme_ue_s1ap_id;
if (ue_mm_context->enb_s1ap_id_key != enb_ue_s1ap_id_key) {
OAILOG_TRACE (LOG_NAS_EMM, "EMM-PROC - Found old ue_mm_context matching IMSI in ATTACH_REQUEST\n");
duplicate_enb_context_detected = true;
OAILOG_TRACE (LOG_NAS_EMM,
"EMM-PROC - Found old ue_mm_context enb_ue_s1ap_id " ENB_UE_S1AP_ID_FMT " mme_ue_s1ap_id " MME_UE_S1AP_ID_FMT " matching IMSI in ATTACH_REQUEST\n",
ue_mm_context->enb_ue_s1ap_id, ue_mm_context->mme_ue_s1ap_id);
}
}
}
if (!ue_mm_context) {
ue_mm_context = mme_ue_context_exists_enb_ue_s1ap_id (&mme_app_desc.mme_ue_contexts, enb_ue_s1ap_id_key);
if (ue_mm_context) {
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Found old ue_mm_context matching enb_ue_s1ap_id in ATTACH_REQUEST...very suspicious\n");
ue_id = emm_ctx_get_new_ue_id(&ue_mm_context->emm_context);
mme_api_notified_new_ue_s1ap_id_association (ue_mm_context->enb_ue_s1ap_id, originating_ecgi->cell_identity.enb_id, ue_id);
}
}
}
if (duplicate_enb_context_detected) {
if (is_initial) {
// remove new context
ue_mm_context = mme_api_duplicate_enb_ue_s1ap_id_detected (enb_ue_s1ap_id_key,ue_mm_context->mme_ue_s1ap_id, REMOVE_NEW_CONTEXT);
duplicate_enb_context_detected = false; // Problem solved
OAILOG_TRACE (LOG_NAS_EMM,
"EMM-PROC - ue_mm_context now enb_ue_s1ap_id " ENB_UE_S1AP_ID_FMT " mme_ue_s1ap_id " MME_UE_S1AP_ID_FMT "\n",
ue_mm_context->enb_ue_s1ap_id, ue_mm_context->mme_ue_s1ap_id);
}
}
memset (&ue_ctx, 0, sizeof (ue_mm_context_t));
ue_ctx.emm_context.is_dynamic = false;
ue_ctx.mme_ue_s1ap_id = ue_id;
/*
* Requirement MME24.301R10_5.5.1.1_1
* MME not configured to support attach for emergency bearer services
* shall reject any request to attach with an attach type set to "EPS
* emergency attach".
*/
if (!(_emm_data.conf.eps_network_feature_support & EPS_NETWORK_FEATURE_SUPPORT_EMERGENCY_BEARER_SERVICES_IN_S1_MODE_SUPPORTED) &&
(type == EMM_ATTACH_TYPE_EMERGENCY)) {
REQUIREMENT_3GPP_24_301(R10_5_5_1__1);
ue_ctx.emm_context.emm_cause = EMM_CAUSE_IMEI_NOT_ACCEPTED;
/*
* Do not accept the UE to attach for emergency services
*/
rc = _emm_attach_reject (&ue_ctx.emm_context);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
fsm_state = emm_fsm_get_state (&ue_mm_context->emm_context);
if (ue_mm_context) {
if (emm_ctx_is_common_procedure_running(&ue_mm_context->emm_context, EMM_CTXT_COMMON_PROC_SMC)) {
REQUIREMENT_3GPP_24_301(R10_5_4_3_7_c);
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
emm_sap.primitive = EMMREG_PROC_ABORT;
emm_sap.u.emm_reg.ue_id = ue_mm_context->mme_ue_s1ap_id;
emm_sap.u.emm_reg.ctx = &ue_mm_context->emm_context;
// TODOdata->notify_failure = true;
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_EMM_MME, NULL, 0, "0 EMMREG_PROC_ABORT (SMC) ue id " MME_UE_S1AP_ID_FMT " ", ue_mm_context->mme_ue_s1ap_id);
rc = emm_sap_send (&emm_sap);
}
if (emm_ctx_is_common_procedure_running(&ue_mm_context->emm_context, EMM_CTXT_COMMON_PROC_IDENT)) {
if (emm_ctx_is_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH)) {
if (emm_ctx_is_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_ACCEPT_SENT | EMM_CTXT_SPEC_PROC_ATTACH_REJECT_SENT)) {
REQUIREMENT_3GPP_24_301(R10_5_4_4_6_c); // continue
} else {
if (_emm_attach_have_changed(&ue_mm_context->emm_context, type, ksi, guti, imsi, imei,
ue_network_capability, ms_network_capability)) {
REQUIREMENT_3GPP_24_301(R10_5_4_4_6_d__1);
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
emm_sap.primitive = EMMREG_PROC_ABORT;
emm_sap.u.emm_reg.ue_id = ue_mm_context->mme_ue_s1ap_id;
emm_sap.u.emm_reg.ctx = &ue_mm_context->emm_context;
// TODOdata->notify_failure = true;
rc = emm_sap_send (&emm_sap);
emm_context_silently_reset_procedures(&ue_mm_context->emm_context);
} else {
REQUIREMENT_3GPP_24_301(R10_5_4_4_6_d__2);
// No need to report an error
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNok);
}
}
} else {
REQUIREMENT_3GPP_24_301(R10_5_4_4_6_c); // continue
}
}
}
if ((ue_mm_context) && (EMM_REGISTERED == fsm_state)) {
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_f);
if (ue_mm_context->emm_context.is_has_been_attached) {
OAILOG_TRACE (LOG_NAS_EMM, "EMM-PROC - the new ATTACH REQUEST is progressed\n");
emm_context_silently_reset_procedures(&ue_mm_context->emm_context); // TEST
emm_fsm_set_state(ue_id, &ue_mm_context->emm_context, EMM_DEREGISTERED);
// "TODO think about emm_context_remove"
//ue_mm_context = emm_context_remove (&_emm_data, ue_mm_context);
if (duplicate_enb_context_detected) {
OAILOG_TRACE (LOG_NAS_EMM, "EMM-PROC - Warning for developper: this has been thought as a case that cannot happen\n");
ue_mm_context = mme_api_duplicate_enb_ue_s1ap_id_detected (enb_ue_s1ap_id_key,ue_mm_context->mme_ue_s1ap_id, REMOVE_OLD_CONTEXT);
}
emm_init_context(&ue_mm_context->emm_context, false);
}
} else if ((ue_mm_context) && emm_ctx_is_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH | EMM_CTXT_SPEC_PROC_ATTACH_ACCEPT_SENT)) {// && (!ue_mm_context->is_attach_complete_received): implicit
ue_mm_context->emm_context.num_attach_request++;
if (_emm_attach_have_changed(&ue_mm_context->emm_context, type, ksi, guti, imsi, imei, ue_network_capability, ms_network_capability)) {
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Attach parameters have changed\n");
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_d__1);
/*
* If one or more of the information elements in the ATTACH REQUEST message differ from the ones
* received within the previous ATTACH REQUEST message, the previously initiated attach procedure shall
* be aborted if the ATTACH COMPLETE message has not been received and the new attach procedure shall
* be progressed;
*/
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
emm_sap.primitive = EMMREG_PROC_ABORT;
emm_sap.u.emm_reg.ue_id = ue_mm_context->mme_ue_s1ap_id;
emm_sap.u.emm_reg.ctx = &ue_mm_context->emm_context;
rc = emm_sap_send (&emm_sap);
if (RETURNerror == rc) {
emm_ctx_unmark_specific_procedure_running(&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_REJECT_SENT);
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - sent of ATTACH REJECT failed\n");
} else {
emm_ctx_mark_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_REJECT_SENT);
}
if (duplicate_enb_context_detected) {
ue_mm_context = mme_api_duplicate_enb_ue_s1ap_id_detected (enb_ue_s1ap_id_key,ue_mm_context->mme_ue_s1ap_id, REMOVE_OLD_CONTEXT);
}
} else {
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_d__2);
/*
* - if the information elements do not differ, then the ATTACH ACCEPT message shall be resent and the timer
* T3450 shall be restarted if an ATTACH COMPLETE message is expected. In that case, the retransmission
* counter related to T3450 is not incremented.
*/
_emm_attach_accept(&ue_mm_context->emm_context);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNok);
}
} else if ((ue_mm_context) && (0 < ue_mm_context->emm_context.num_attach_request) &&
(emm_ctx_is_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH)) &&
(!emm_ctx_is_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_ACCEPT_SENT)) &&
(!emm_ctx_is_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_REJECT_SENT))) {
ue_mm_context->emm_context.num_attach_request++;
if (_emm_attach_have_changed(&ue_mm_context->emm_context, type, ksi, guti, imsi, imei, ue_network_capability, ms_network_capability)) {
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Attach parameters have changed\n");
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_e__1);
/*
* If one or more of the information elements in the ATTACH REQUEST message differs from the ones
* received within the previous ATTACH REQUEST message, the previously initiated attach procedure shall
* be aborted and the new attach procedure shall be executed;
*/
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
emm_sap.primitive = EMMREG_PROC_ABORT;
emm_sap.u.emm_reg.ue_id = ue_id;
emm_sap.u.emm_reg.ctx = &ue_mm_context->emm_context;
rc = emm_sap_send (&emm_sap);
if (RETURNerror == rc) {
emm_ctx_unmark_specific_procedure_running(&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_REJECT_SENT);
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - sent of ATTACH REJECT failed\n");
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
} else {
emm_ctx_mark_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH_REJECT_SENT);
}
if (duplicate_enb_context_detected) {
ue_mm_context = mme_api_duplicate_enb_ue_s1ap_id_detected (enb_ue_s1ap_id_key,ue_mm_context->mme_ue_s1ap_id, REMOVE_NEW_CONTEXT);
}
} else {
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_e__2);
/*
* if the information elements do not differ, then the network shall continue with the previous attach procedure
* and shall ignore the second ATTACH REQUEST message.
*/
//is_attach_procedure_progressed = false; // for clarity
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Received duplicated Attach Request\n");
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNok);
}
} else { //else ((ue_mm_context) && ((EMM_DEREGISTERED < fsm_state ) && (EMM_REGISTERED != fsm_state)))
if (!ue_mm_context) {
create_new_emm_ctxt = true;
} else {
ue_mm_context->emm_context.num_attach_request++;
if (duplicate_enb_context_detected) {
ue_mm_context = mme_api_duplicate_enb_ue_s1ap_id_detected (enb_ue_s1ap_id_key,ue_mm_context->mme_ue_s1ap_id,REMOVE_OLD_CONTEXT);
}
}
}
if (create_new_emm_ctxt) {
AssertFatal(0, "Should not go here now");
// /*
// * Create UE's EMM context
// */
// ue_mm_context = (ue_mm_context_t *) calloc (1, sizeof (ue_mm_context_t));
//
// if (!ue_mm_context) {
// OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Failed to create EMM context\n");
// ue_ctx.emm_context.emm_cause = EMM_CAUSE_ILLEGAL_UE;
// /*
// * Do not accept the UE to attach to the network
// */
// rc = _emm_attach_reject (&ue_ctx);
// OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
// }
// ue_mm_context->mme_ue_s1ap_id = emm_ctx_get_new_ue_id(&ue_mm_context->emm_context);
// ue_id = ue_mm_context->mme_ue_s1ap_id;
// OAILOG_NOTICE (LOG_NAS_EMM, "EMM-PROC - Create EMM context ue_id = " MME_UE_S1AP_ID_FMT "\n", ue_id);
// emm_context->is_dynamic = true;
// bdestroy_wrapper (&emm_context->esm_msg);
// emm_context->emm_cause = EMM_CAUSE_SUCCESS;
// emm_context->_emm_fsm_status = EMM_INVALID;
// emm_context->T3450.id = NAS_TIMER_INACTIVE_ID;
// emm_context->T3450.sec = nas_config.t3450_sec;
// emm_context->T3460.id = NAS_TIMER_INACTIVE_ID;
// emm_context->T3460.sec = nas_config.t3460_sec;
// emm_context->T3470.id = NAS_TIMER_INACTIVE_ID;
// emm_context->T3470.sec = nas_config.t3470_sec;
// emm_fsm_set_status (ue_id, &ue_mm_context->emm_context, EMM_DEREGISTERED);
//
// emm_ctx_clear_guti(&ue_mm_context->emm_context);
// emm_ctx_clear_old_guti(&ue_mm_context->emm_context);
// emm_ctx_clear_imsi(&ue_mm_context->emm_context);
// emm_ctx_clear_imei(&ue_mm_context->emm_context);
// emm_ctx_clear_imeisv(&ue_mm_context->emm_context);
// emm_ctx_clear_lvr_tai(&ue_mm_context->emm_context);
// emm_ctx_clear_security(&ue_mm_context->emm_context);
// emm_ctx_clear_non_current_security(&ue_mm_context->emm_context);
// emm_ctx_clear_auth_vectors(&ue_mm_context->emm_context);
// emm_ctx_clear_ms_nw_cap(&ue_mm_context->emm_context);
// emm_ctx_clear_ue_nw_cap_ie(&ue_mm_context->emm_context);
// emm_ctx_clear_current_drx_parameter(&ue_mm_context->emm_context);
// emm_ctx_clear_pending_current_drx_parameter(&ue_mm_context->emm_context);
// emm_ctx_clear_eps_bearer_context_status(&ue_mm_context->emm_context);
//
// mme_api_notified_new_ue_s1ap_id_association (ue_mm_context->enb_ue_s1ap_id, originating_ecgi->cell_identity.enb_id, ue_mm_context->mme_ue_s1ap_id);
}
#warning "Quick workaround for MWCDEMO2017 define DEMOMWC2017"
#define DEMOMWC2017 1
#if defined(DEMOMWC2017)
emm_ctx_clear_attribute_valid(&ue_mm_context->emm_context, EMM_CTXT_MEMBER_AUTH_VECTORS);
#endif
if (!ue_mm_context->emm_context.specific_proc) {
ue_mm_context->emm_context.specific_proc = (emm_specific_procedure_data_t *) calloc (1, sizeof (*ue_mm_context->emm_context.specific_proc));
if (ue_mm_context->emm_context.specific_proc ) {
/*
* Setup ongoing EMM procedure callback functions
*/
rc = emm_proc_specific_initialize (&ue_mm_context->emm_context, EMM_SPECIFIC_PROC_TYPE_ATTACH, ue_mm_context->emm_context.specific_proc, NULL, NULL, _emm_attach_abort);
emm_ctx_mark_specific_procedure_running (&ue_mm_context->emm_context, EMM_CTXT_SPEC_PROC_ATTACH);
ue_mm_context->emm_context.specific_proc->arg.u.attach_data.ue_id = ue_id;
if (rc != RETURNok) {
OAILOG_WARNING (LOG_NAS_EMM, "Failed to initialize EMM callback functions");
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNerror);
}
}
}
if (last_visited_registered_tai) {
emm_ctx_set_valid_lvr_tai(&ue_mm_context->emm_context, last_visited_registered_tai);
} else {
emm_ctx_clear_lvr_tai(&ue_mm_context->emm_context);
}
/*
* Update the EMM context with the current attach procedure parameters
*/
rc = _emm_attach_update (&ue_mm_context->emm_context, ue_id, type, ksi, is_native_guti, guti, imsi, imei, originating_tai,
ue_network_capability, ms_network_capability, esm_msg_pP);
if (rc != RETURNok) {
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Failed to update EMM context\n");
/*
* Do not accept the UE to attach to the network
*/
ue_mm_context->emm_context.emm_cause = EMM_CAUSE_ILLEGAL_UE;
rc = _emm_attach_reject (&ue_mm_context->emm_context);
} else {
/*
* Performs the sequence: UE identification, authentication, security mode
*/
rc = _emm_attach_identify (&ue_mm_context->emm_context);
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: emm_proc_attach_reject() **
** **
** Description: Performs the protocol error abnormal case **
** **
** 3GPP TS 24.301, section 5.5.1.2.7, case b **
** If the ATTACH REQUEST message is received with a protocol **
** error, the network shall return an ATTACH REJECT message. **
** **
** Inputs: ue_id: UE lower layer identifier **
** emm_cause: EMM cause code to be reported **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: _emm_data **
** **
***************************************************************************/
int
emm_proc_attach_reject (
mme_ue_s1ap_id_t ue_id,
emm_cause_t emm_cause)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
int rc = RETURNerror;
/*
* Create temporary UE context
*/
ue_mm_context_t ue_ctx;
memset (&ue_ctx, 0, sizeof (ue_mm_context_t));
ue_ctx.emm_context.is_dynamic = false;
ue_ctx.mme_ue_s1ap_id = ue_id;
/*
* Update the EMM cause code
*/
if (ue_id > 0) {
ue_ctx.emm_context.emm_cause = emm_cause;
} else {
ue_ctx.emm_context.emm_cause = EMM_CAUSE_ILLEGAL_UE;
}
/*
* Do not accept attach request with protocol error
*/
rc = _emm_attach_reject (&ue_ctx.emm_context);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: emm_proc_attach_complete() **
** **
** Description: Terminates the attach procedure upon receiving Attach **
** Complete message from the UE. **
** **
** 3GPP TS 24.301, section 5.5.1.2.4 **
** Upon receiving an ATTACH COMPLETE message, the MME shall **
** stop timer T3450, enter state EMM-REGISTERED and consider **
** the GUTI sent in the ATTACH ACCEPT message as valid. **
** **
** Inputs: ue_id: UE lower layer identifier **
** esm_msg_pP: Activate default EPS bearer context accept **
** ESM message **
** Others: _emm_data **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: _emm_data, T3450 **
** **
***************************************************************************/
int
emm_proc_attach_complete (
mme_ue_s1ap_id_t ue_id,
const_bstring esm_msg_pP)
{
ue_mm_context_t *ue_mm_context = NULL;
int rc = RETURNerror;
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
esm_sap_t esm_sap;
memset(&esm_sap, 0, sizeof(esm_sap_t));
OAILOG_FUNC_IN (LOG_NAS_EMM);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC - EPS attach complete (ue_id=" MME_UE_S1AP_ID_FMT ")\n", ue_id);
/*
* Get the UE context
*/
ue_mm_context = mme_ue_context_exists_mme_ue_s1ap_id (&mme_app_desc.mme_ue_contexts, ue_id);
if (ue_mm_context) {
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__20);
/*
* Release retransmission timer parameters
*/
/*
* Upon receiving an ATTACH COMPLETE message, the MME shall stop timer T3450
*/
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC - Stop timer T3450 (%lx)\n", ue_mm_context->emm_context.T3450.id);
ue_mm_context->emm_context.T3450.id = nas_timer_stop (ue_mm_context->emm_context.T3450.id);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3450 stopped UE " MME_UE_S1AP_ID_FMT " ", ue_id);
emm_proc_specific_cleanup(&ue_mm_context->emm_context.specific_proc);
/*
* Upon receiving an ATTACH COMPLETE message, the MME shall enter state EMM-REGISTERED
* and consider the GUTI sent in the ATTACH ACCEPT message as valid.
*/
emm_ctx_set_attribute_valid(&ue_mm_context->emm_context, EMM_CTXT_MEMBER_GUTI);
//OAI_GCC_DIAG_OFF(int-to-pointer-cast);
mme_ue_context_update_coll_keys ( &mme_app_desc.mme_ue_contexts, ue_mm_context, ue_mm_context->enb_s1ap_id_key, ue_mm_context->mme_ue_s1ap_id,
ue_mm_context->emm_context._imsi64, ue_mm_context->mme_teid_s11, &ue_mm_context->emm_context._guti);
//OAI_GCC_DIAG_ON(int-to-pointer-cast);
emm_ctx_clear_old_guti(&ue_mm_context->emm_context);
/*
* Forward the Activate Default EPS Bearer Context Accept message
* to the EPS session management sublayer
*/
esm_sap.primitive = ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_CNF;
esm_sap.is_standalone = false;
esm_sap.ue_id = ue_id;
esm_sap.recv = esm_msg_pP;
esm_sap.ctx = &ue_mm_context->emm_context;
rc = esm_sap_send (&esm_sap);
} else {
OAILOG_ERROR (LOG_NAS_EMM, "EMM-PROC - No EMM context exists\n");
}
if ((rc != RETURNerror) && (esm_sap.err == ESM_SAP_SUCCESS)) {
/*
* Set the network attachment indicator
*/
ue_mm_context->emm_context.is_attached = true;
ue_mm_context->emm_context.is_has_been_attached = true;
/*
* Notify EMM that attach procedure has successfully completed
*/
emm_sap.primitive = EMMREG_ATTACH_CNF;
emm_sap.u.emm_reg.ue_id = ue_id;
emm_sap.u.emm_reg.ctx = &ue_mm_context->emm_context;
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_EMM_MME, NULL, 0, "0 EMMREG_ATTACH_CNF ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
rc = emm_sap_send (&emm_sap);
} else if (esm_sap.err != ESM_SAP_DISCARDED) {
/*
* Notify EMM that attach procedure failed
*/
emm_sap.primitive = EMMREG_ATTACH_REJ;
emm_sap.u.emm_reg.ue_id = ue_id;
emm_sap.u.emm_reg.ctx = &ue_mm_context->emm_context;
rc = emm_sap_send (&emm_sap);
} else {
/*
* ESM procedure failed and, received message has been discarded or
* Status message has been returned; ignore ESM procedure failure
*/
rc = RETURNok;
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/****************************************************************************/
/********************* L O C A L F U N C T I O N S *********************/
/****************************************************************************/
/*
* --------------------------------------------------------------------------
* Timer handlers
* --------------------------------------------------------------------------
*/
/*
*
* Name: _emm_attach_t3450_handler()
*
* Description: T3450 timeout handler
*
* 3GPP TS 24.301, section 5.5.1.2.7, case c
* On the first expiry of the timer T3450, the network shall
* retransmit the ATTACH ACCEPT message and shall reset and
* restart timer T3450. This retransmission is repeated four
* times, i.e. on the fifth expiry of timer T3450, the at-
* tach procedure shall be aborted and the MME enters state
* EMM-DEREGISTERED.
*
* Inputs: args: handler parameters
* Others: None
*
* Outputs: None
* Return: None
* Others: None
*
*/
static void *_emm_attach_t3450_handler (void *args)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
emm_context_t *emm_context = (emm_context_t *) (args);
if (emm_context) {
emm_context->T3450.id = NAS_TIMER_INACTIVE_ID;
}
if (emm_ctx_is_specific_procedure_running (emm_context, EMM_CTXT_SPEC_PROC_ATTACH)){
attach_data_t *data = &emm_context->specific_proc->arg.u.attach_data;
/*
* Increment the retransmission counter
*/
data->retransmission_count += 1;
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - T3450 timer expired, retransmission " "counter = %d\n", data->retransmission_count);
if (data->retransmission_count < ATTACH_COUNTER_MAX) {
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_c__1);
/*
* On the first expiry of the timer, the network shall retransmit the ATTACH ACCEPT message and shall reset and
* restart timer T3450.
*/
_emm_attach_accept (emm_context);
} else {
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_c__2);
/*
* Abort the attach procedure
*/
_emm_attach_abort (emm_context);
}
// TODO REQUIREMENT_3GPP_24_301(R10_5_5_1_2_7_c__3) not coded
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, NULL);
}
/*
* --------------------------------------------------------------------------
* Abnormal cases in the MME
* --------------------------------------------------------------------------
*/
/*
*
* Name: _emm_attach_release()
*
* Description: Releases the UE context data.
*
* Inputs: args: Data to be released
* Others: None
*
* Outputs: None
* Return: None
* Others: None
*
*/
static int _emm_attach_release (emm_context_t *emm_context)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
int rc = RETURNerror;
if (emm_context) {
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Release UE context data (ue_id=" MME_UE_S1AP_ID_FMT ")\n", ue_id);
emm_ctx_clear_old_guti(emm_context);
emm_ctx_clear_guti(emm_context);
emm_ctx_clear_imsi(emm_context);
emm_ctx_clear_imei(emm_context);
emm_ctx_clear_auth_vectors(emm_context);
emm_ctx_clear_security(emm_context);
emm_ctx_clear_non_current_security(emm_context);
bdestroy_wrapper (&emm_context->esm_msg);
/*
* Stop timer T3450
*/
if (emm_context->T3450.id != NAS_TIMER_INACTIVE_ID) {
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC - Stop timer T3450 (%lx)\n", emm_context->T3450.id);
emm_context->T3450.id = nas_timer_stop (emm_context->T3450.id);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3450 stopped UE " MME_UE_S1AP_ID_FMT " ", ue_id);
}
/*
* Stop timer T3460
*/
if (emm_context->T3460.id != NAS_TIMER_INACTIVE_ID) {
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC - Stop timer T3460 (%lx)\n", emm_context->T3460.id);
emm_context->T3460.id = nas_timer_stop (emm_context->T3460.id);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3460 stopped UE " MME_UE_S1AP_ID_FMT " ", ue_id);
}
/*
* Stop timer T3470
*/
if (emm_context->T3470.id != NAS_TIMER_INACTIVE_ID) {
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC - Stop timer T3470 (%lx)\n", emm_context->T3470.id);
emm_context->T3470.id = nas_timer_stop (emm_context->T3470.id);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3470 stopped UE " MME_UE_S1AP_ID_FMT " ", ue_id);
}
/*
* Release the EMM context
*/
#warning "TODO think about emm_context_remove"
// emm_context_remove (&_emm_data, ue_mm_context);
/*
* Notify EMM that the attach procedure is aborted
*/
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_EMM_MME, NULL, 0, "0 EMMREG_PROC_ABORT ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
emm_sap.primitive = EMMREG_PROC_ABORT;
emm_sap.u.emm_reg.ue_id = ue_id;
emm_sap.u.emm_reg.ctx = emm_context;
rc = emm_sap_send (&emm_sap);
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/*
*
* Name: _emm_attach_reject()
*
* Description: Performs the attach procedure not accepted by the network.
*
* 3GPP TS 24.301, section 5.5.1.2.5
* If the attach request cannot be accepted by the network,
* the MME shall send an ATTACH REJECT message to the UE in-
* including an appropriate EMM cause value.
*
* Inputs: args: UE context data
* Others: None
*
* Outputs: None
* Return: RETURNok, RETURNerror
* Others: None
*
*/
int _emm_attach_reject (emm_context_t *emm_context)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
int rc = RETURNerror;
if (emm_context) {
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - EMM attach procedure not accepted " "by the network (ue_id=" MME_UE_S1AP_ID_FMT ", cause=%d)\n",
ue_id, emm_context->emm_cause);
/*
* Notify EMM-AS SAP that Attach Reject message has to be sent
* onto the network
*/
emm_sap.primitive = EMMAS_ESTABLISH_REJ;
emm_sap.u.emm_as.u.establish.ue_id = ue_id;
emm_sap.u.emm_as.u.establish.eps_id.guti = NULL;
if (emm_context->emm_cause == EMM_CAUSE_SUCCESS) {
emm_context->emm_cause = EMM_CAUSE_ILLEGAL_UE;
}
emm_sap.u.emm_as.u.establish.emm_cause = emm_context->emm_cause;
emm_sap.u.emm_as.u.establish.nas_info = EMM_AS_NAS_INFO_ATTACH;
if (emm_context->emm_cause != EMM_CAUSE_ESM_FAILURE) {
emm_sap.u.emm_as.u.establish.nas_msg = NULL;
} else if (emm_context->esm_msg) {
emm_sap.u.emm_as.u.establish.nas_msg = emm_context->esm_msg;
} else {
OAILOG_ERROR (LOG_NAS_EMM, "EMM-PROC - ESM message is missing\n");
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNerror);
}
/*
* Setup EPS NAS security data
*/
emm_as_set_security_data (&emm_sap.u.emm_as.u.establish.sctx, &emm_context->_security, false, true);
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_EMM_MME, NULL, 0, "0 EMMAS_ESTABLISH_REJ ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
rc = emm_sap_send (&emm_sap);
/*
* Release the UE context, even if the network failed to send the
* ATTACH REJECT message
*/
if (emm_context->is_dynamic) {
rc = _emm_attach_release (emm_context);
}
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/*
*
* Name: _emm_attach_abort()
*
* Description: Aborts the attach procedure
*
* Inputs: args: Attach procedure data to be released
* Others: None
*
* Outputs: None
* Return: RETURNok, RETURNerror
* Others: T3450
*
*/
static int _emm_attach_abort (emm_context_t *emm_context)
{
int rc = RETURNerror;
OAILOG_FUNC_IN (LOG_NAS_EMM);
if (emm_ctx_is_specific_procedure_running (emm_context, EMM_CTXT_SPEC_PROC_ATTACH)) {
attach_data_t *data = &emm_context->specific_proc->arg.u.attach_data;
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
esm_sap_t esm_sap;
memset(&esm_sap, 0, sizeof(esm_sap_t));
OAILOG_WARNING (LOG_NAS_EMM, "EMM-PROC - Abort the attach procedure (ue_id=" MME_UE_S1AP_ID_FMT ")\n", ue_id);
AssertFatal(EMM_SPECIFIC_PROC_TYPE_ATTACH == emm_context->specific_proc->type, "Mismatch in specific proc arg type %d UE id" MME_UE_S1AP_ID_FMT "\n",
emm_context->specific_proc->type, ue_id);
AssertFatal(ue_id == data->ue_id, "Mismatch in UE ids: ctx UE id" MME_UE_S1AP_ID_FMT " data UE id" MME_UE_S1AP_ID_FMT "\n", ue_id, data->ue_id);
/*
* Stop timer T3450
*/
if (emm_context->T3450.id != NAS_TIMER_INACTIVE_ID) {
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC - Stop timer T3450 (%lx)\n", emm_context->T3450.id);
emm_context->T3450.id = nas_timer_stop (emm_context->T3450.id);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3450 stopped UE " MME_UE_S1AP_ID_FMT " ", ue_id);
}
/*
* Release retransmission timer parameters
*/
bdestroy_wrapper (&data->esm_msg);
/*
* Notify ESM that the network locally refused PDN connectivity
* to the UE
*/
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_ESM_MME, NULL, 0, "0 ESM_PDN_CONNECTIVITY_REJ ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
esm_sap.primitive = ESM_PDN_CONNECTIVITY_REJ;
esm_sap.ue_id = ue_id;
esm_sap.ctx = emm_context;
esm_sap.recv = NULL;
rc = esm_sap_send (&esm_sap);
if (rc != RETURNerror) {
/*
* Notify EMM that EPS attach procedure failed
*/
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_ESM_MME, NULL, 0, "0 EMMREG_ATTACH_REJ ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
emm_sap.primitive = EMMREG_ATTACH_REJ;
emm_sap.u.emm_reg.ue_id = ue_id;
emm_sap.u.emm_reg.ctx = emm_context;
rc = emm_sap_send (&emm_sap);
if (rc != RETURNerror) {
/*
* Release the UE context
*/
rc = _emm_attach_release (emm_context);
}
}
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/*
* --------------------------------------------------------------------------
* Functions that may initiate EMM common procedures
* --------------------------------------------------------------------------
*/
/*
* Name: _emm_attach_identify()
*
* Description: Performs UE's identification. May initiates identification, authentication and security mode control EMM common procedures.
*
* Inputs: args: Identification argument parameters
* Others: None
*
* Outputs: None
* Return: RETURNok, RETURNerror
* Others: _emm_data
*
*/
static int _emm_attach_identify (emm_context_t *emm_context)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
int rc = RETURNerror;
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_3__1);
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
OAILOG_INFO (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Identify incoming UE using %s\n",
ue_id,
IS_EMM_CTXT_VALID_IMSI(emm_context) ? "IMSI" :
IS_EMM_CTXT_PRESENT_GUTI(emm_context) ? "GUTI" :
IS_EMM_CTXT_VALID_IMEI(emm_context) ? "IMEI" : "none");
/*
* UE's identification
* -------------------
*/
if (IS_EMM_CTXT_PRESENT_IMSI(emm_context)) {
// The UE identifies itself using an IMSI
if (!IS_EMM_CTXT_PRESENT_AUTH_VECTORS(emm_context)) {
// Ask upper layer to fetch new security context
plmn_t visited_plmn = {0};
visited_plmn.mcc_digit1 = emm_context->originating_tai.mcc_digit1;
visited_plmn.mcc_digit2 = emm_context->originating_tai.mcc_digit2;
visited_plmn.mcc_digit3 = emm_context->originating_tai.mcc_digit3;
visited_plmn.mnc_digit1 = emm_context->originating_tai.mnc_digit1;
visited_plmn.mnc_digit2 = emm_context->originating_tai.mnc_digit2;
visited_plmn.mnc_digit3 = emm_context->originating_tai.mnc_digit3;
nas_itti_auth_info_req (ue_id, &emm_context->_imsi, true, &visited_plmn, MAX_EPS_AUTH_VECTORS, NULL);
rc = RETURNok;
} else {
ksi_t eksi = 0;
int vindex = 0;
if (emm_context->_security.eksi != KSI_NO_KEY_AVAILABLE) {
REQUIREMENT_3GPP_24_301(R10_5_4_2_4__2);
eksi = (emm_context->_security.eksi + 1) % (EKSI_MAX_VALUE + 1);
}
for (vindex = 0; vindex < MAX_EPS_AUTH_VECTORS; vindex++) {
if (IS_EMM_CTXT_PRESENT_AUTH_VECTOR(emm_context, vindex)) {
break;
}
}
// eksi should always be 0
/*if (!IS_EMM_CTXT_PRESENT_AUTH_VECTORS(ue_mm_context)) {
// Ask upper layer to fetch new security context
nas_itti_auth_info_req (ue_mm_context->mme_ue_s1ap_id, ue_mm_context->_imsi64, true, &ue_mm_context->originating_tai.plmn, MAX_EPS_AUTH_VECTORS, NULL);
rc = RETURNok;
} else */{
emm_ctx_set_security_vector_index(emm_context, vindex);
rc = emm_proc_authentication (emm_context, ue_id, eksi,
emm_context->_vector[vindex].rand, emm_context->_vector[vindex].autn, emm_attach_security, _emm_attach_reject, NULL);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
}
} else if (IS_EMM_CTXT_PRESENT_GUTI(emm_context)) {
// The UE identifies itself using a GUTI
//LG Force identification here
emm_ctx_clear_attribute_valid(emm_context, EMM_CTXT_MEMBER_AUTH_VECTORS);
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Failed to identify the UE using provided GUTI (tmsi=%u)\n",
ue_id, emm_context->_guti.m_tmsi);
/*
* 3GPP TS 24.401, Figure 5.3.2.1-1, point 4
* The UE was attempting to attach to the network using a GUTI
* that is not known by the network; the MME shall initiate an
* identification procedure to retrieve the IMSI from the UE.
*/
rc = emm_proc_identification (emm_context, EMM_IDENT_TYPE_IMSI, _emm_attach_identify, _emm_attach_release, _emm_attach_release);
if (rc != RETURNok) {
// Failed to initiate the identification procedure
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT "EMM-PROC - Failed to initiate identification procedure\n", ue_id);
emm_context->emm_cause = EMM_CAUSE_ILLEGAL_UE;
// Do not accept the UE to attach to the network
rc = _emm_attach_reject (emm_context);
}
// Relevant callback will be executed when identification
// procedure completes
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
} else if (IS_EMM_CTXT_PRESENT_OLD_GUTI(emm_context)) {
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Force to identify the UE using provided old GUTI "GUTI_FMT"\n",
ue_id, GUTI_ARG(&emm_context->_old_guti));
/*
* 3GPP TS 24.401, Figure 5.3.2.1-1, point 4
* The UE was attempting to attach to the network using a GUTI
* that is not known by the network; the MME shall initiate an
* identification procedure to retrieve the IMSI from the UE.
*/
rc = emm_proc_identification (emm_context, EMM_IDENT_TYPE_IMSI, _emm_attach_identify, _emm_attach_release, _emm_attach_release);
if (rc != RETURNok) {
// Failed to initiate the identification procedure
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT "EMM-PROC - Failed to initiate identification procedure\n", ue_id);
emm_context->emm_cause = EMM_CAUSE_ILLEGAL_UE;
// Do not accept the UE to attach to the network
rc = _emm_attach_reject (emm_context);
}
// Relevant callback will be executed when identification
// procedure completes
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
} else if ((IS_EMM_CTXT_VALID_IMEI(emm_context)) && (emm_context->is_emergency)) {
/*
* The UE is attempting to attach to the network for emergency
* services using an IMEI
*/
AssertFatal(0 != 0, "TODO emergency services...");
if (rc != RETURNok) {
emm_ctx_clear_auth_vectors(emm_context);
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - " "Failed to identify the UE using provided IMEI\n", ue_id);
emm_context->emm_cause = EMM_CAUSE_IMEI_NOT_ACCEPTED;
}
} else {
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - UE's identity is not available\n", ue_id);
emm_context->emm_cause = EMM_CAUSE_ILLEGAL_UE;
}
/*
* UE's authentication
* -------------------
*/
if (rc != RETURNerror) {
if (IS_EMM_CTXT_VALID_SECURITY(emm_context)) {
/*
* A security context exists for the UE in the network;
* proceed with the attach procedure.
*/
rc = _emm_attach (emm_context);
} else if ((emm_context->is_emergency) && (_emm_data.conf.features & MME_API_UNAUTHENTICATED_IMSI)) {
/*
* 3GPP TS 24.301, section 5.5.1.2.3
* 3GPP TS 24.401, Figure 5.3.2.1-1, point 5a
* MME configured to support Emergency Attach for unauthenticated
* IMSIs may choose to skip the authentication procedure even if
* no EPS security context is available and proceed directly to the
* execution of the security mode control procedure.
*/
rc = _emm_attach_security (emm_context);
}
}
if (rc != RETURNok) {
// Do not accept the UE to attach to the network
rc = _emm_attach_reject (emm_context);
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: _emm_attach_security() **
** **
** Description: Initiates security mode control EMM common procedure. **
** **
** Inputs: args: security argument parameters **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: _emm_data **
** **
***************************************************************************/
#ifdef __cplusplus
extern "C"{
#endif
int emm_attach_security (struct emm_context_s *emm_context)
{
return _emm_attach_security (emm_context);
}
#ifdef __cplusplus
}
#endif
//------------------------------------------------------------------------------
static int _emm_attach_security (emm_context_t *emm_context)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
int rc = RETURNerror;
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_3__1);
OAILOG_INFO (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Setup NAS security\n", ue_id);
/*
* Create new NAS security context
*/
emm_ctx_clear_security(emm_context);
/*
* Initialize the security mode control procedure
*/
rc = emm_proc_security_mode_control (ue_id, emm_context->ue_ksi,
_emm_attach, _emm_attach_release, _emm_attach_release);
if (rc != RETURNok) {
/*
* Failed to initiate the security mode control procedure
*/
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT "EMM-PROC - Failed to initiate security mode control procedure\n", ue_id);
emm_context->emm_cause = EMM_CAUSE_ILLEGAL_UE;
/*
* Do not accept the UE to attach to the network
*/
rc = _emm_attach_reject (emm_context);
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/*
--------------------------------------------------------------------------
MME specific local functions
--------------------------------------------------------------------------
*/
/****************************************************************************
** **
** Name: _emm_attach() **
** **
** Description: Performs the attach signalling procedure while a context **
** exists for the incoming UE in the network. **
** **
** 3GPP TS 24.301, section 5.5.1.2.4 **
** Upon receiving the ATTACH REQUEST message, the MME shall **
** send an ATTACH ACCEPT message to the UE and start timer **
** T3450. **
** **
** Inputs: args: attach argument parameters **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: _emm_data **
** **
***************************************************************************/
static int _emm_attach (emm_context_t *emm_context)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
esm_sap_t esm_sap;
memset(&esm_sap, 0, sizeof(esm_sap_t));
int rc = RETURNerror;
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
OAILOG_INFO (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Attach UE \n", ue_id);
/*
* 3GPP TS 24.401, Figure 5.3.2.1-1, point 5a
* At this point, all NAS messages shall be protected by the NAS security
* functions (integrity and ciphering) indicated by the MME unless the UE
* is emergency attached and not successfully authenticated.
*/
/*
* Notify ESM that PDN connectivity is requested
*/
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_ESM_MME, NULL, 0, "0 ESM_PDN_CONNECTIVITY_REQ ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
esm_sap.primitive = ESM_PDN_CONNECTIVITY_REQ;
esm_sap.is_standalone = false;
esm_sap.ue_id = ue_id;
esm_sap.ctx = emm_context;
esm_sap.recv = emm_context->esm_msg;
rc = esm_sap_send (&esm_sap);
if ((rc != RETURNerror) && (esm_sap.err == ESM_SAP_SUCCESS)) {
/*
* The attach request is accepted by the network
*/
/*
* Delete the stored UE radio capability information, if any
*/
/*
* Store the UE network capability
*/
/*
* Assign the TAI list the UE is registered to
*/
/*
* Allocate parameters of the retransmission timer callback
*/
rc = RETURNok;
} else if (esm_sap.err != ESM_SAP_DISCARDED) {
/*
* The attach procedure failed due to an ESM procedure failure
*/
emm_context->emm_cause = EMM_CAUSE_ESM_FAILURE;
/*
* Setup the ESM message container to include PDN Connectivity Reject
* message within the Attach Reject message
*/
bdestroy_wrapper (&emm_context->esm_msg);
emm_context->esm_msg = esm_sap.send;
rc = _emm_attach_reject (emm_context);
} else {
/*
* ESM procedure failed and, received message has been discarded or
* Status message has been returned; ignore ESM procedure failure
*/
rc = RETURNok;
}
if (rc != RETURNok) {
/*
* The attach procedure failed
*/
OAILOG_WARNING (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Failed to respond to Attach Request\n", ue_id);
emm_context->emm_cause = EMM_CAUSE_PROTOCOL_ERROR;
/*
* Do not accept the UE to attach to the network
*/
rc = _emm_attach_reject (emm_context);
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
#ifdef __cplusplus
extern "C"{
#endif
int emm_cn_wrapper_attach_accept (emm_context_t * emm_context)
{
return _emm_attach_accept (emm_context);
}
#ifdef __cplusplus
}
#endif
/****************************************************************************
** **
** Name: _emm_attach_accept() **
** **
** Description: Sends ATTACH ACCEPT message and start timer T3450 **
** **
** Inputs: data: Attach accept retransmission data **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: T3450 **
** **
***************************************************************************/
static int _emm_attach_accept (emm_context_t * emm_context)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
emm_sap_t emm_sap;
memset(&emm_sap, 0, sizeof(emm_sap_t));
int rc = RETURNerror;
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
// may be caused by timer not stopped when deleted context
if (emm_context) {
/*
* Notify EMM-AS SAP that Attach Accept message together with an Activate
* Default EPS Bearer Context Request message has to be sent to the UE
*/
emm_sap.primitive = EMMAS_ESTABLISH_CNF;
emm_sap.u.emm_as.u.establish.ue_id = ue_id;
emm_sap.u.emm_as.u.establish.nas_info = EMM_AS_NAS_INFO_ATTACH;
NO_REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__3);
//----------------------------------------
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__4);
emm_ctx_set_attribute_valid(emm_context, EMM_CTXT_MEMBER_UE_NETWORK_CAPABILITY_IE);
emm_ctx_set_attribute_valid(emm_context, EMM_CTXT_MEMBER_MS_NETWORK_CAPABILITY_IE);
//----------------------------------------
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__5);
emm_ctx_set_valid_current_drx_parameter(emm_context, &emm_context->_pending_drx_parameter);
emm_ctx_clear_pending_current_drx_parameter(emm_context);
//----------------------------------------
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__9);
// the set of emm_sap.u.emm_as.u.establish.new_guti is for including the GUTI in the attach accept message
//ONLY ONE MME NOW NO S10
if (!IS_EMM_CTXT_PRESENT_GUTI(emm_context)) {
// Sure it is an unknown GUTI in this MME
guti_t old_guti = emm_context->_old_guti;
guti_t guti;
guti.gummei.plmn = {0};
guti.gummei.mme_gid = 0;
guti.gummei.mme_code = 0;
guti.m_tmsi = INVALID_M_TMSI;
clear_guti(&guti);
rc = mme_api_new_guti (&emm_context->_imsi, &old_guti, &guti, &emm_context->originating_tai, &emm_context->_tai_list);
if ( RETURNok == rc) {
emm_ctx_set_guti(emm_context, &guti);
emm_ctx_set_attribute_valid(emm_context, EMM_CTXT_MEMBER_TAI_LIST);
//----------------------------------------
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__6);
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__10);
memcpy(&emm_sap.u.emm_as.u.establish.tai_list, &emm_context->_tai_list, sizeof(tai_list_t));
} else {
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNerror);
}
}
emm_sap.u.emm_as.u.establish.eps_id.guti = &emm_context->_guti;
if (!IS_EMM_CTXT_VALID_GUTI(emm_context) &&
IS_EMM_CTXT_PRESENT_GUTI(emm_context) &&
IS_EMM_CTXT_PRESENT_OLD_GUTI(emm_context)) {
/*
* Implicit GUTI reallocation;
* include the new assigned GUTI in the Attach Accept message
*/
OAILOG_INFO (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Implicit GUTI reallocation, include the new assigned GUTI in the Attach Accept message\n",
ue_id);
emm_sap.u.emm_as.u.establish.new_guti = &emm_context->_guti;
} else if (!IS_EMM_CTXT_VALID_GUTI(emm_context) &&
IS_EMM_CTXT_PRESENT_GUTI(emm_context)) {
/*
* include the new assigned GUTI in the Attach Accept message
*/
OAILOG_INFO (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - Include the new assigned GUTI in the Attach Accept message\n", ue_id);
emm_sap.u.emm_as.u.establish.new_guti = &emm_context->_guti;
} else { // IS_EMM_CTXT_VALID_GUTI(ue_mm_context) is true
emm_sap.u.emm_as.u.establish.new_guti = NULL;
}
//----------------------------------------
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__14);
emm_sap.u.emm_as.u.establish.eps_network_feature_support = &_emm_data.conf.eps_network_feature_support;
/*
* Setup EPS NAS security data
*/
emm_as_set_security_data (&emm_sap.u.emm_as.u.establish.sctx, &emm_context->_security, false, true);
emm_sap.u.emm_as.u.establish.encryption = emm_context->_security.selected_algorithms.encryption;
emm_sap.u.emm_as.u.establish.integrity = emm_context->_security.selected_algorithms.integrity;
OAILOG_DEBUG (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - encryption = 0x%X (0x%X)\n",
ue_id, emm_sap.u.emm_as.u.establish.encryption, emm_context->_security.selected_algorithms.encryption);
OAILOG_DEBUG (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - integrity = 0x%X (0x%X)\n",
ue_id, emm_sap.u.emm_as.u.establish.integrity, emm_context->_security.selected_algorithms.integrity);
/*
* Get the activate default EPS bearer context request message to
* transfer within the ESM container of the attach accept message
*/
attach_data_t *attach_data = &emm_context->specific_proc->arg.u.attach_data;
emm_sap.u.emm_as.u.establish.nas_msg = attach_data->esm_msg;
OAILOG_TRACE (LOG_NAS_EMM, "ue_id=" MME_UE_S1AP_ID_FMT " EMM-PROC - nas_msg src size = %d nas_msg dst size = %d \n",
ue_id, blength(attach_data->esm_msg), blength(emm_sap.u.emm_as.u.establish.nas_msg));
// Send T3402
emm_sap.u.emm_as.u.establish.t3402 = &nas_config.t3402_min;
REQUIREMENT_3GPP_24_301(R10_5_5_1_2_4__2);
MSC_LOG_TX_MESSAGE (MSC_NAS_EMM_MME, MSC_NAS_EMM_MME, NULL, 0, "0 EMMAS_ESTABLISH_CNF ue id " MME_UE_S1AP_ID_FMT " ", ue_id);
rc = emm_sap_send (&emm_sap);
if (RETURNerror != rc) {
if (emm_context->T3450.id != NAS_TIMER_INACTIVE_ID) {
/*
* Re-start T3450 timer
*/
emm_context->T3450.id = nas_timer_stop (emm_context->T3450.id);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3450 stopped UE " MME_UE_S1AP_ID_FMT "", ue_id);
}
/*
* Start T3450 timer
*/
emm_context->T3450.id = nas_timer_start (emm_context->T3450.sec, 0 /*usec*/,_emm_attach_t3450_handler, emm_context);
MSC_LOG_EVENT (MSC_NAS_EMM_MME, "T3450 started UE " MME_UE_S1AP_ID_FMT " ", ue_id);
OAILOG_INFO (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT "Timer T3450 (%lx) expires in %ld seconds\n",
ue_id, emm_context->T3450.id, emm_context->T3450.sec);
}
} else {
OAILOG_WARNING (LOG_NAS_EMM, "ue_mm_context NULL\n");
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: _emm_attach_have_changed() **
** **
** Description: Check whether the given attach parameters differs from **
** those previously stored when the attach procedure has **
** been initiated. **
** **
** Inputs: ctx: EMM context of the UE in the network **
** type: Type of the requested attach **
** ksi: Security ket sey identifier **
** guti: The GUTI provided by the UE **
** imsi: The IMSI provided by the UE **
** imei: The IMEI provided by the UE **
** eea: Supported EPS encryption algorithms **
** eia: Supported EPS integrity algorithms **
** Others: None **
** **
** Outputs: None **
** Return: true if at least one of the parameters **
** differs; false otherwise. **
** Others: None **
** **
***************************************************************************/
static int
_emm_attach_have_changed (
const emm_context_t * emm_context,
emm_proc_attach_type_t type,
ksi_t ksi,
guti_t * guti,
imsi_t * imsi,
imei_t * imei,
const ue_network_capability_t * const ue_network_capability,
const ms_network_capability_t * const ms_network_capability)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context)->mme_ue_s1ap_id;
/*
* Emergency bearer services indicator
*/
if ((type == EMM_ATTACH_TYPE_EMERGENCY) != emm_context->is_emergency) {
OAILOG_DEBUG (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: type EMM_ATTACH_TYPE_EMERGENCY \n", ue_id);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
/*
* Security key set identifier
*/
if (ksi != emm_context->ue_ksi) {
OAILOG_DEBUG (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: ue_ksi %d -> %d \n", ue_id, emm_context->ue_ksi, ksi);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
/*
* Supported EPS encryption algorithms
*/
if (memcmp(ue_network_capability, &emm_context->_ue_network_capability, sizeof(emm_context->_ue_network_capability))) {
OAILOG_DEBUG (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: UE network capabilities \n", ue_id);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
// optional IE
if (ms_network_capability) {
if (IS_EMM_CTXT_PRESENT_MS_NETWORK_CAPABILITY(emm_context)) {
if (memcmp(ms_network_capability, &emm_context->_ms_network_capability, sizeof(emm_context->_ms_network_capability))) {
OAILOG_DEBUG (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: MS network capabilities \n", ue_id);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
} else {
OAILOG_DEBUG (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: MS network capabilities \n", ue_id);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
} else {
if (IS_EMM_CTXT_PRESENT_MS_NETWORK_CAPABILITY(emm_context)) {
OAILOG_DEBUG (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: MS network capabilities \n", ue_id);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
}
/*
* The GUTI if provided by the UE
*/
if ((guti) && (!IS_EMM_CTXT_PRESENT_OLD_GUTI(emm_context))) {
OAILOG_INFO (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: guti None -> " GUTI_FMT "\n", ue_id, GUTI_ARG(guti));
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
if ((!guti) && (IS_EMM_CTXT_PRESENT_GUTI(emm_context))) {
OAILOG_INFO (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: guti " GUTI_FMT " -> None\n", ue_id, GUTI_ARG(&emm_context->_guti));
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
if ((guti) && (IS_EMM_CTXT_PRESENT_GUTI(emm_context))) {
if (guti->m_tmsi != emm_context->_guti.m_tmsi) {
OAILOG_INFO (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: guti/tmsi " GUTI_FMT " -> " GUTI_FMT "\n",
ue_id, GUTI_ARG(&emm_context->_guti), GUTI_ARG(guti));
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
if ((guti->gummei.mme_code != emm_context->_guti.gummei.mme_code) ||
(guti->gummei.mme_gid != emm_context->_guti.gummei.mme_gid) ||
(guti->gummei.plmn.mcc_digit1 != emm_context->_guti.gummei.plmn.mcc_digit1) ||
(guti->gummei.plmn.mcc_digit2 != emm_context->_guti.gummei.plmn.mcc_digit2) ||
(guti->gummei.plmn.mcc_digit3 != emm_context->_guti.gummei.plmn.mcc_digit3) ||
(guti->gummei.plmn.mnc_digit1 != emm_context->_guti.gummei.plmn.mnc_digit1) ||
(guti->gummei.plmn.mnc_digit2 != emm_context->_guti.gummei.plmn.mnc_digit2) ||
(guti->gummei.plmn.mnc_digit3 != emm_context->_guti.gummei.plmn.mnc_digit3)) {
OAILOG_INFO (LOG_NAS_EMM, "UE " MME_UE_S1AP_ID_FMT " attach changed: guti/tmsi " GUTI_FMT " -> " GUTI_FMT "\n",
ue_id, GUTI_ARG(&emm_context->_guti), GUTI_ARG(guti));
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
}
/*
* The IMSI if provided by the UE
*/
if ((imsi) && (!IS_EMM_CTXT_VALID_IMSI(emm_context))) {
char imsi_str[16];
IMSI_TO_STRING (imsi, imsi_str, 16);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC _emm_attach_have_changed: imsi %s/NULL (ctxt)\n", imsi_str);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
/* Bad test
if ((!imsi) && (IS_EMM_CTXT_VALID_IMSI(emm_context))) {
char imsi_str[16];
IMSI_TO_STRING (&emm_context->_imsi, imsi_str, 16);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC _emm_attach_have_changed: imsi NULL/%s (ctxt)\n", imsi_str);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
} */
if ((imsi) && (IS_EMM_CTXT_VALID_IMSI(emm_context))) {
if (memcmp (imsi, &emm_context->_imsi, sizeof (emm_context->_imsi)) != 0) {
char imsi_str[16];
char imsi2_str[16];
IMSI_TO_STRING (imsi, imsi_str, 16);
IMSI_TO_STRING (&emm_context->_imsi, imsi2_str, 16);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC _emm_attach_have_changed: imsi %s/%s (ctxt)\n", imsi_str, imsi2_str);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
}
/*
* The IMEI if provided by the UE
*/
if ((imei) && (!IS_EMM_CTXT_VALID_IMEI(emm_context))) {
char imei_str[16];
IMEI_TO_STRING (imei, imei_str, 16);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC _emm_attach_have_changed: imei %s/NULL (ctxt)\n", imei_str);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
if ((!imei) && (IS_EMM_CTXT_VALID_IMEI(emm_context))) {
char imei_str[16];
IMEI_TO_STRING (&emm_context->_imei, imei_str, 16);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC _emm_attach_have_changed: imei NULL/%s (ctxt)\n", imei_str);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
if ((imei) && (IS_EMM_CTXT_VALID_IMEI(emm_context))) {
if (memcmp (imei, &emm_context->_imei, sizeof (emm_context->_imei)) != 0) {
char imei_str[16];
char imei2_str[16];
IMEI_TO_STRING (imei, imei_str, 16);
IMEI_TO_STRING (&emm_context->_imei, imei2_str, 16);
OAILOG_INFO (LOG_NAS_EMM, "EMM-PROC _emm_attach_have_changed: imei %s/%s (ctxt)\n", imei_str, imei2_str);
OAILOG_FUNC_RETURN (LOG_NAS_EMM, true);
}
}
OAILOG_FUNC_RETURN (LOG_NAS_EMM, false);
}
/****************************************************************************
** **
** Name: _emm_attach_update() **
** **
** Description: Update the EMM context with the given attach procedure **
** parameters. **
** **
** Inputs: ue_id: UE lower layer identifier **
** type: Type of the requested attach **
** ksi: Security ket sey identifier **
** guti: The GUTI provided by the UE **
** imsi: The IMSI provided by the UE **
** imei: The IMEI provided by the UE **
** eea: Supported EPS encryption algorithms **
** originating_tai Originating TAI (from eNB TAI) **
** eia: Supported EPS integrity algorithms **
** esm_msg_pP: ESM message contained with the attach re- **
** quest **
** Others: None **
** **
** Outputs: ctx: EMM context of the UE in the network **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
static int
_emm_attach_update (
emm_context_t * emm_context,
mme_ue_s1ap_id_t ue_id,
emm_proc_attach_type_t type,
ksi_t ksi,
bool is_native_guti,
guti_t * guti,
imsi_t * imsi,
imei_t * imei,
const tai_t * const originating_tai,
const ue_network_capability_t * const ue_network_capability,
const ms_network_capability_t * const ms_network_capability,
const_bstring esm_msg_pP)
{
OAILOG_FUNC_IN (LOG_NAS_EMM);
ue_mm_context_t *ue_mm_context = PARENT_STRUCT(emm_context, ue_mm_context_t, emm_context);
/*
* UE identifier
*/
if ((INVALID_MME_UE_S1AP_ID == ue_mm_context->mme_ue_s1ap_id) && (ue_mm_context->mme_ue_s1ap_id != ue_id)) {
mme_api_notified_new_ue_s1ap_id_association (ue_mm_context->enb_ue_s1ap_id, ue_mm_context->e_utran_cgi.cell_identity.enb_id, ue_id);
}
ue_mm_context->mme_ue_s1ap_id = ue_id;
/*
* Emergency bearer services indicator
*/
emm_context->is_emergency = (type == EMM_ATTACH_TYPE_EMERGENCY);
/*
* Security key set identifier
*/
if (emm_context->ue_ksi != ksi) {
OAILOG_TRACE (LOG_NAS_EMM, "UE id " MME_UE_S1AP_ID_FMT " Update ue ksi %d -> %d\n", ue_mm_context->mme_ue_s1ap_id, emm_context->ue_ksi, ksi);
emm_context->ue_ksi = ksi;
}
/*
* Supported EPS encryption algorithms
*/
if (ue_network_capability) {
emm_ctx_set_valid_ue_nw_cap(emm_context, ue_network_capability);
}
if (ms_network_capability) {
emm_ctx_set_valid_ms_nw_cap(emm_context, ms_network_capability);
} else {
// optional IE
emm_ctx_clear_ms_nw_cap(emm_context);
}
emm_context->originating_tai = *originating_tai;
/*
* The GUTI if provided by the UE
*/
if (guti) {
if (memcmp(guti, &emm_context->_old_guti, sizeof(emm_context->_old_guti))) {
//TODO remove previous guti entry in coll if was present
emm_ctx_set_old_guti(emm_context, guti);
// emm_context_add_old_guti (&_emm_data, ctx); changed into ->
mme_ue_context_update_coll_keys (&mme_app_desc.mme_ue_contexts, ue_mm_context ,
ue_mm_context->enb_s1ap_id_key,
ue_mm_context->mme_ue_s1ap_id,
emm_context->_imsi64,
ue_mm_context->mme_teid_s11, &emm_context->_old_guti);
}
}
/*
* The IMSI if provided by the UE
*/
if (imsi) {
imsi64_t new_imsi64 = imsi_to_imsi64(imsi);
if (new_imsi64 != emm_context->_imsi64) {
emm_ctx_set_valid_imsi(emm_context, imsi, new_imsi64);
//emm_context_add_imsi (&_emm_data, ctx); changed into ->
mme_ue_context_update_coll_keys (&mme_app_desc.mme_ue_contexts, ue_mm_context ,
ue_mm_context->enb_s1ap_id_key,
ue_mm_context->mme_ue_s1ap_id,
emm_context->_imsi64,
ue_mm_context->mme_teid_s11, NULL);
}
}
/*
* The IMEI if provided by the UE
*/
if (imei) {
emm_ctx_set_valid_imei(emm_context, imei);
}
/*
* The ESM message contained within the attach request
*/
if (esm_msg_pP) {
bdestroy_wrapper (&emm_context->esm_msg);
if (!(emm_context->esm_msg = bstrcpy(esm_msg_pP))) {
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNerror);
}
}
/*
* Attachment indicator
*/
emm_context->is_attached = false;
OAILOG_FUNC_RETURN (LOG_NAS_EMM, RETURNok);
}
|
0438b779646ae441a003bc3aa3bcee5bdd17e1c8
|
04ed6f13412ffb92d495ce80d4f45a2eb763656c
|
/GraphLib/Include/Iterators/TCDFSIterator.hpp
|
8e364541dbb4ce2686ef1929a8b67b4abb6216cb
|
[] |
no_license
|
Konstilio/GraphLibrary
|
c63525cbafdb983b5f188117e05181b79456e871
|
65609a2e20e99d80782353cbeea8e4201df11aa4
|
refs/heads/master
| 2021-01-10T16:47:29.698993
| 2020-12-06T04:00:13
| 2020-12-06T04:00:13
| 54,824,664
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,315
|
hpp
|
TCDFSIterator.hpp
|
//
// Header.h
// GraphLibrary
//
// Created by Aleksander Konstantinov on 3/26/16.
// Copyright © 2016 Aleksander Konstantinov. All rights reserved.
//
#ifndef CDFSIterator_hpp
#define CDFSIterator_hpp
#include "TCDFSIterator.h"
#include "TCVertexIterator.h"
template<class Graph>
TCDFSIterator<Graph>::TCDFSIterator()
: m_pGraph(nullptr)
, m_Vertex(0)
, m_Stack()
, m_Used()
{
}
template<class Graph>
TCDFSIterator<Graph>::TCDFSIterator(Graph const &_Graph, uint32_t Vertex)
: m_pGraph(&_Graph)
, m_Vertex(Vertex)
, m_Used(_Graph.Vertexes(), false)
{
m_Used[m_Vertex] = true;
m_Stack.push_back(m_Vertex);
}
template<class Graph>
bool TCDFSIterator<Graph>::HasNext() const noexcept
{
return !m_Stack.empty();
}
template<class Graph>
uint32_t TCDFSIterator<Graph>::Next()
{
uint32_t ret = m_Stack[m_Stack.size() - 1];
m_Stack.pop_back();
fp_ProcessVertex(ret);
return ret;
}
template<class Graph>
void TCDFSIterator<Graph>::fp_ProcessVertex(uint32_t _Vertex)
{
TCVertexIterator<Graph> VertexIt(*m_pGraph, _Vertex);
while (VertexIt.HasNext()) {
auto curr = VertexIt.Next();
if (!m_Used[curr])
{
m_Used[curr] = true;
m_Stack.push_back(curr);
}
}
}
#endif //CDFSIterator_hpp
|
b1f31e6c245e8703bbc6c5068f12fd0df72d2021
|
73e3fac48969080c40492440760cf069ddc4688f
|
/Practice Files/squareofnnumbers.cpp
|
b27d8af16a18116e20a01dc1120fb6fe90c8c24f
|
[] |
no_license
|
m-samik/c_programs
|
05fb06b823f8c9652d45c8bfcce6d3e64537f401
|
474a568cc4866cf7078ec3b2b57999873245a6f7
|
refs/heads/main
| 2023-02-10T08:05:09.077717
| 2021-01-10T10:59:07
| 2021-01-10T10:59:07
| 318,461,947
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 226
|
cpp
|
squareofnnumbers.cpp
|
#include <stdio.h>
int num,i,p=1;
int main()
{
printf("Enter Number : ");
scanf("%d",&num);
for (i=1 ; i<=10 ; i++)
{
p=p*num;
printf("%d ki power %d = %d\n",num,i,p);
}
return 0;
}
|
736a804320d3bd07de4bb20806871f824a6144cd
|
d47079ccd87c8d12589926b1f6833781ffc829ba
|
/arduino_serial_communication_send_receive/arduino_serial_communication_send_receive.ino
|
2697769500d07dd86bb8354bbc0c82db48234fa0
|
[] |
no_license
|
DavideFarina96/MIS_Project
|
0c4533b21aa37ab7a14dd335c42ca79a60438946
|
84e8e78d64d70fb6b9df2de8246696ccd528ed3c
|
refs/heads/master
| 2022-04-06T16:31:44.205355
| 2020-02-10T13:48:03
| 2020-02-10T13:48:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,347
|
ino
|
arduino_serial_communication_send_receive.ino
|
/**
*
* This sketch reads multiple analog and digital sensors as well as the IMU, and sends the values on the serial port.
* This sketch also receives meessages from the serial port in the format [string,number], and then
* associates to this messages a certain behavior (e.g, triggering a vibration motor pattern)
*
* The analog sensors values are filtered with a butterworth lowpass filter.
* The filtering is achieved by means of the library https://github.com/tttapa/Filters
* The coefficients for the filter are calculated using the tools: http://www.exstrom.com/journal/sigproc/
*
*
* Author: Luca Turchet
* Date: 30/05/2019
*
*
*
*
**/
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
#include <EEPROM.h>
#include <IIRFilter.h>
#include <string.h>
#define BAUD_RATE 115200 //NOTE: on the Teensy this is meaningless as the Teensy always transmits data at the full USB speed
/* Variables for incoming messages *************************************************************/
const byte MAX_LENGTH_MESSAGE = 64;
char received_message[MAX_LENGTH_MESSAGE];
char START_MARKER = '[';
char END_MARKER = ']';
boolean new_message_received = false;
/* Digital outputs *************************************************************/
const uint16_t motor_up_pin = 7;
const uint16_t motor_down_pin = 8;
const uint16_t motor_left_pin = 9;
const uint16_t motor_right_pin = 10;
unsigned long motor_up_last_debounce_time = 0;
unsigned long motor_down_last_debounce_time = 0;
unsigned long motor_left_last_debounce_time = 0;
unsigned long motor_right_last_debounce_time = 0;
unsigned long debounce_delay = 50; // the debounce time; increase if the output flickers
/* Analog inputs ******************************************************************************************/
#define ANALOG_BIT_RESOLUTION 12 // Only for Teensy
//static const unsigned long ANALOG_PERIOD_MILLISECS = 1; // E.g. 4 milliseconds per sample for 250 Hz
//static const unsigned long ANALOG_ANALOG_PERIOD_MICROSECS = 1000 * PERIOD_MILLISECS;
//static const float ANALOG_SAMPLING_FREQUENCY = 1.0e3f / PERIOD_MILLISECS;
#define ANALOG_PERIOD_MICROSECS 1000
static uint32_t analog_last_read = 0;
uint16_t analog_input0_pin = 2;
uint16_t analog_input0 = 0;
uint16_t analog_input0_lp_filtered = 0;
uint16_t previous_analog_input0_lp_filtered = 0;
// 50 Hz Butterworth low-pass
double a_lp_50Hz[] = {1.000000000000, -3.180638548875, 3.861194348994, -2.112155355111, 0.438265142262};
double b_lp_50Hz[] = {0.000416599204407, 0.001666396817626, 0.002499595226440, 0.001666396817626, 0.000416599204407};
IIRFilter lp_analog_input0(b_lp_50Hz, a_lp_50Hz);
//Thresholds for each sensor
uint16_t analog_input0_threshold = 5;
/** Functions for handling received messages ***********************************************************************/
void receive_message() {
static boolean reception_in_progress = false;
static byte ndx = 0;
char rcv_char;
while (Serial.available() > 0 && new_message_received == false) {
rcv_char = Serial.read();
Serial.println(rcv_char);
if (reception_in_progress == true) {
if (rcv_char!= END_MARKER) {
received_message[ndx] = rcv_char;
ndx++;
if (ndx >= MAX_LENGTH_MESSAGE) {
ndx = MAX_LENGTH_MESSAGE - 1;
}
}
else {
received_message[ndx] = '\0'; // terminate the string
reception_in_progress = false;
ndx = 0;
new_message_received = true;
}
}
else if (rcv_char == START_MARKER) {
reception_in_progress = true;
}
}
if (new_message_received) {
handle_received_message(received_message);
new_message_received = false;
}
}
void handle_received_message(char *received_message) {
//Serial.print("received_message: ");
//Serial.println(received_message);
char *all_tokens[2]; //NOTE: the message is composed by 2 tokens: command and value
const char delimiters[5] = {START_MARKER, ',', ' ', END_MARKER,'\0'};
int i = 0;
all_tokens[i] = strtok(received_message, delimiters);
while (i < 2 && all_tokens[i] != NULL) {
all_tokens[++i] = strtok(NULL, delimiters);
}
char *command = all_tokens[0];
char *value_str = all_tokens[1];
int value = 0;
sscanf(value_str, "%d", &value);
if (strcmp(command,"motor_up_pattern") == 0) {
/*
Serial.print("activating message 1: ");
Serial.print(command);
Serial.print(" ");
Serial.print(value);
Serial.println(" ");
*/
analogWrite(motor_up_pin, value);
}
if (strcmp(command,"motor_down_pattern") == 0) {
analogWrite(motor_down_pin, value);
}
if (strcmp(command,"motor_left_pattern") == 0) {
analogWrite(motor_left_pin, value);
}
if (strcmp(command,"motor_right_pattern") == 0) {
analogWrite(motor_right_pin, value);
}
}
/**************************************************************************************************************/
void setup() {
Serial.begin(BAUD_RATE);
while(!Serial);
/* Setup of the digital sensors ******************************************************************************/
pinMode(motor_up_pin, OUTPUT);
pinMode(motor_down_pin, OUTPUT);
pinMode(motor_left_pin, OUTPUT);
pinMode(motor_right_pin, OUTPUT);
digitalWrite(motor_up_pin, LOW);
digitalWrite(motor_down_pin, LOW);
digitalWrite(motor_left_pin, LOW);
digitalWrite(motor_right_pin, LOW);
/* Setup of the analog sensors ******************************************************************************/
analogReadResolution(ANALOG_BIT_RESOLUTION); // Only for Teensy
}
/****************************************************************************************************/
void loop() {
receive_message();
/* Loop for the analog and digital sensors ******************************************************************************/
if (micros() - analog_last_read >= ANALOG_PERIOD_MICROSECS) {
analog_last_read += ANALOG_PERIOD_MICROSECS;
/* Loop for the analog sensors ******************************************************************************/
analog_input0 = analogRead(analog_input0_pin);
analog_input0_lp_filtered = (uint16_t)lp_analog_input0.filter((double)analog_input0);
// Apply thresholds to the filtered signal
analog_input0_lp_filtered = (analog_input0_lp_filtered < analog_input0_threshold) ? 0 : analog_input0_lp_filtered;
//Plot on the Serial Plotter the unfiltered sensors values
/*
Serial.print(analog_input0);
Serial.print(" ");
Serial.print(analog_input1);
Serial.print(" ");
Serial.print(analog_input2);
Serial.print(" ");
Serial.println(analog_input3);
*/
//Plot on the Serial Plotter the filtered sensors values
/*
Serial.print(analog_input0_lp_filtered);
Serial.print(" ");
Serial.print(analog_input1_lp_filtered);
Serial.print(" ");
Serial.print(analog_input2_lp_filtered);
Serial.print(" ");
Serial.println(analog_input3_lp_filtered);
*/
// Send the sensor value to the serial port only if it has changed
if(analog_input0_lp_filtered != previous_analog_input0_lp_filtered){
Serial.print("a0, ");
Serial.println(analog_input0_lp_filtered);
//Serial.print(analog_input0);
//Serial.print(" ");
//Serial.println(analog_input0_lp_filtered);
previous_analog_input0_lp_filtered = analog_input0_lp_filtered;
}
/*if (analog_input0_lp_filtered > 50) {
//Serial.println("Motor ON");
analogWrite(motor_up_pin, analog_input0_lp_filtered);
analogWrite(motor_down_pin, analog_input0_lp_filtered);
analogWrite(motor_left_pin, analog_input0_lp_filtered);
analogWrite(motor_right_pin, analog_input0_lp_filtered);
}
else {
//Serial.println("Motor OFF");
analogWrite(motor_up_pin, 0);
analogWrite(motor_down_pin, 0);
analogWrite(motor_left_pin, 0);
analogWrite(motor_right_pin, 0);
}*/
} // End of the section processing the analog sensors with the set sample rate for them
}
|
bb87772a2678685562fb5e2e68f50e752774efe2
|
b72f635071934c4d0b4f026092d52413b7436e31
|
/widget.h
|
f0b601991d0ff80d970da7785dc30d268735f631
|
[] |
no_license
|
DatabasesWorks/Book-Store-Report
|
d4cd1c5362a6a50578e0aac206b51191aec78d2d
|
e2b6a75a29711311834cf3451829fe73ff515ea4
|
refs/heads/master
| 2020-11-28T12:12:37.764939
| 2018-03-25T09:08:54
| 2018-03-25T09:08:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,126
|
h
|
widget.h
|
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QSqlDatabase>
#include <QTableWidget>
#include <QLabel>
#include <QPushButton>
class MainMenu;
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *par = nullptr);
~Widget();
void booksShow();
void ordersShow();
void publishersShow();
void purchaseShow();
void cartsShow();
void buyersShow();
void notPurchasedRequest();
void numberOfPurchasedRequest(int count, int sign);
void mostOrderedRequest();
void notPurchasedReports();
void numberOfPurchasedReports(int count, int sign);
void mostOrderedReports();
void booksReports();
private:
void updateSettingTable();
void clearTable();
private slots:
void addEntry();
void clickedEntry(QModelIndex index);
void updateTable();
void searchEntry();
void clickedBack();
private:
QSqlDatabase database;
QTableWidget* table;
QString nameDatabaseIsShow = "";
QLineEdit* search;
QLabel* name;
MainMenu* widget;
QPushButton* addButton;
int signL, countL;
};
#endif // WIDGET_H
|
bfff954485e4d13238defc20cb0af5f03eb01ffe
|
010df4bf55cead8a0dfff23cf5adcf49578b26c1
|
/DEMO/Success standalone surgeon Exp 7b master slave DEMO 25 Mar 16/Success standalone surgeon demo Jan 20 T1/Exchange.cpp
|
f1a47fa2ee029797b0d3c1548acafca754bede82
|
[] |
no_license
|
snake2510/First-demo
|
cdc27594dbb1916eeec9cadc728bad1edb6d6dbf
|
98ff2b0d9461604a1f5dfeca9872d79a3503a04d
|
refs/heads/master
| 2021-01-19T05:25:52.725996
| 2016-08-01T16:49:08
| 2016-08-01T16:49:08
| 64,684,364
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,858
|
cpp
|
Exchange.cpp
|
// modified to get pos and vel
#include "Exchange.h"
void Exchange::Move(String^ message)
{
Xs = message;
Ys = message;
}
double Exchange::Max1s()
{
//Maxon one linear motion
double scale1 = 0.01*29.3; // scaling factor for velocity (60.0*1000.0*y)/(R*1); R = 2048.0;
double xCopy;
Monitor::Enter(this);
static string s3;
MarshalString3(Xs, s3);
int index1;
int index2;
// modified to get pos and vel
std::string search_str1 = std::string("a");
std::string search_str2 = std::string("b");
index1 = s3.find_first_of(search_str1);
index2 = s3.find_first_of(search_str2);
std::string str1 = s3.substr(1, index2 - 1);
xCopy = atof(str1.c_str());
Monitor::Exit(this);
//cout << xCopy;
return (scale1*xCopy);
}
double Exchange::Max2s()
{
//Maxon two rotary motion
double scale2 = 0.04*29.3; // scaling factor for velocity double R=2048.0; 0.04*29.3
double yCopy;
Monitor::Enter(this);
static string s3;
MarshalString4(Ys, s3);
int index2;
int index3;
std::string search_str2 = std::string("b");
std::string search_str3 = std::string("c");
index2 = s3.find_first_of(search_str2);
index3 = s3.find_first_of(search_str3);
std::string str2 = s3.substr(index2 + 1, index3 - 1);
yCopy = atof(str2.c_str());
Monitor::Exit(this);
return (scale2*yCopy);
}
double Exchange::Max1pos()
{
//Maxon one linear motion
double scale3 = 0.015;
// resolution of encoder count 2048
// circumference 2*pi*r where r= 5mm
// 1 count = 2*pi*r/2048 = 0.015mm
double xpCopy;
Monitor::Enter(this);
static string s3;
MarshalString5(Xs, s3);
int index3;
int index4;
std::string search_str3 = std::string("c");
std::string search_str4 = std::string("d");
index3 = s3.find_first_of(search_str3);
index4 = s3.find_first_of(search_str4);
std::string str3 = s3.substr(index3 + 1, index4 - 1);
xpCopy = atof(str3.c_str());
Monitor::Exit(this);
return (scale3*xpCopy);
}
void Exchange::MoveTorque(double zor)
{
Monitor::Enter(this);
Z = zor;
Monitor::Exit(this);
}
double Exchange::Max3()
{
double zCopy;
Monitor::Enter(this);
zCopy = Z;
Monitor::Exit(this);
return zCopy;
}
void Exchange::MarshalString3(String ^ s, string& os)
{
using namespace Runtime::InteropServices;
const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer();
os = chars;
Marshal::FreeHGlobal(IntPtr((void*)chars));
}
void Exchange::MarshalString4(String ^ s, string& os)
{
using namespace Runtime::InteropServices;
const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer();
os = chars;
Marshal::FreeHGlobal(IntPtr((void*)chars));
}
void Exchange::MarshalString5(String ^ s, string& os)
{
using namespace Runtime::InteropServices;
const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer();
os = chars;
Marshal::FreeHGlobal(IntPtr((void*)chars));
}
|
44071c27180cf2f190656ad368bac481aff71c45
|
6530dc1b27c3f8729f92ae039b4fe832f1e15627
|
/src/game_objects/Snake.cpp
|
6cd94a5e7942418423d72fe0c42d7dc4385e1e7e
|
[] |
no_license
|
artn-dev/SnakeGame
|
6cc3d8354d1b111f1f63092788c465ba9e7c7002
|
555fd372816ee1077f1d955b64b9f91b75e9c9d3
|
refs/heads/main
| 2023-06-17T06:54:23.592912
| 2021-07-15T13:55:03
| 2021-07-15T13:55:03
| 348,891,913
| 0
| 0
| null | 2021-07-15T13:55:04
| 2021-03-18T00:30:59
|
C
|
UTF-8
|
C++
| false
| false
| 1,750
|
cpp
|
Snake.cpp
|
#include "Snake.h"
#include <iostream>
glm::vec4 Snake::SEGMENT_COLORS[4] = {
{ 51.0f / 255.0f, 102.0f / 255.0f, 0.0f / 255.0f, 1.0f },
{ 64.0f / 255.0f, 128.0f / 255.0f, 0.0f / 255.0f, 1.0f },
{ 102.0f / 255.0f, 204.0f / 255.0f, 0.0f / 255.0f, 1.0f },
{ 128.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f },
};
Snake::Snake(const glm::vec2& position)
{
segments_.push_back({ position, SEGMENT_COLORS[segments_.size() % 4], 4.0f });
direction = { 1.0f, 0.0f };
}
void Snake::move()
{
for (size_t i = segments_.size() - 1; i > 0; i--)
segments_[i].position = segments_[i - 1].position;
segments_[0].position = segments_[0].position + direction;
}
void Snake::grow()
{
glm::vec2 position = segments_[segments_.size() - 1].position;
segments_.push_back({ position, SEGMENT_COLORS[segments_.size() % 4], 4.0f });
}
const Quad* Snake::segments() const
{
return segments_.data();
}
size_t Snake::size() const
{
return segments_.size();
}
void Snake::on_notify(int key, int action)
{
if (action != GLFW_PRESS)
return ;
switch (key) {
case GLFW_KEY_A:
direction = { -1.0f, 0.0f };
break;
case GLFW_KEY_D:
direction = { 1.0f, 0.0f };
break;
case GLFW_KEY_W:
direction = { 0.0f, -1.0f };
break;
case GLFW_KEY_S:
direction = { 0.0f, 1.0f };
break;
}
}
void Snake::set_render_data(Quad*& data, unsigned int& amount)
{
data = segments_.data();
amount = static_cast<unsigned int>(segments_.size());
}
|
8836b0a742ae29e7c0433707ceaea1d53786f6e7
|
d3efa74ebc0cbd403044f07736fda83b6d2f1c48
|
/720/InsertSort/InsertSort.cpp
|
0f3958ac336856f76620f85c17d66545535fadff
|
[] |
no_license
|
zhuweigit/Report
|
98f18294a14938a12ced8d9bec0383c5093b71b9
|
3004547e784f41dccdb78847954e12611b54212a
|
refs/heads/master
| 2022-11-26T17:52:53.790362
| 2020-08-07T01:51:48
| 2020-08-07T01:51:48
| 284,693,942
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 1,056
|
cpp
|
InsertSort.cpp
|
#include<iostream>
using namespace std;
#define MAXSIZE 10
#define ENDLESS 121221221
//冒泡排序法
struct SqList //顺序存储表
{
int ans[MAXSIZE]; //存储结果
int Length; //实际长度
SqList() { Length = MAXSIZE; };
};
void Swap(SqList* L, int i, int j)
{
int temp = L->ans[i];
L->ans[i] = L->ans[j];
L->ans[j] = temp;
}
void Cout(SqList*L)
{
for (int i = 0; i < L->Length; i++)
cout << L->ans[i] << " ";
cout << endl;
}
void InsertSort(SqList* L) //插入排序
{
int i, j,value;
for (i = 0; i < L->Length-1; i++)
{
value = L->ans[i+1];
for (j = i + 1; value < L->ans[j - 1] && j>0;j-- ) //需要挪动顺序
{
L->ans[j] = L->ans[j-1]; //将前面那个元素往后面挪
}
L->ans[j]= value; //将i所在的值挪到j-1留的空地去
}
cout << "插入排序法排序: \n";
Cout(L);
}
int main()
{
SqList* sql = new SqList();
cout << "请输入" << MAXSIZE << " 个" << endl;
for (int i = 0; i < MAXSIZE; i++)
{
cin >> sql->ans[i];
}
InsertSort(sql);
}
|
b35d01b8319445ff7ea983dd2981a995d1579b12
|
ddc64df81fde5e1014a8efb72a25218c527cb7b5
|
/ldr/ldr.ino
|
16847a4b789b8ad3cd32c88fde8a8b1386fafb6f
|
[] |
no_license
|
fhmunna/rEPaRDUINO
|
f2d034bfb15817c121caa674e33410c28a8070cb
|
4d8d2b0cd32a4531c77bd693d26bde13967d1e87
|
refs/heads/master
| 2021-09-01T19:32:47.380086
| 2017-12-28T12:59:02
| 2017-12-28T12:59:02
| 98,703,214
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 594
|
ino
|
ldr.ino
|
int inputPin = 0; //Pin for Photo resistor
int outputPin=11; //Pin for LED
int outputPin1=10;
void setup()
{
Serial.begin(9600); //Begin serial communcation
pinMode( outputPin, OUTPUT );
}
void loop()
{
Serial.println(analogRead(inputPin));
int reading = analogRead(inputPin);
if(reading > 90) { //Value here depends on the brightness of the room and how you want to calibrate it.
analogWrite(outputPin1, analogRead(inputPin));
analogWrite(outputPin, analogRead(inputPin) );
} else {
analogWrite(outputPin1, 0);
analogWrite(outputPin, 0);
}
}
|
da4fa2fe32e59f6edff8684beb1205df475bf8aa
|
bd699773381e6ef33be7ca3f149e8a9eb9aecc5d
|
/include/Serializer.hpp
|
d2ef474688ec6ca0606901ea5e9e28c7a2383d7b
|
[] |
no_license
|
kenpusney/ropto
|
037defbdbce2c85fcb50b280f3bc9344f0446734
|
8022e43129757af366585fe7941312c2164bfd06
|
refs/heads/master
| 2021-01-10T08:18:19.916502
| 2016-03-16T02:51:35
| 2016-03-16T02:51:35
| 45,727,153
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,452
|
hpp
|
Serializer.hpp
|
#ifndef ropto_Serializer_hpp
#define ropto_Serializer_hpp
#include "ByteStream.hpp"
#include <type_traits>
namespace ropto
{
struct dummy_t {};
template<class T, bool pod = std::is_pod<T>::value,
bool integral = std::is_integral<T>::value,
bool floating = std::is_floating_point<T>::value>
class serializer;
template<class T>
T read(byte_stream& stream)
{
return serializer<T>::from_bytes(stream);
}
template<class T>
dummy_t write(const T& value, byte_stream& stream)
{
serializer<T>::to_bytes(value, stream);
return {};
}
template<class T>
dummy_t read(T& value, byte_stream& stream)
{
value = read<T>(stream);
return {};
}
template<class... Args>
void dummy(const Args&... dummy) {}
template<class... Args>
void write(byte_stream& stream,Args&... args)
{
dummy(write(args, stream)...);
}
template<class... Args>
void read(byte_stream& stream, Args&... args)
{
dummy(read(args, stream)...);
}
template<class T>
byte_stream& operator<<(byte_stream& stream, const T& value)
{
write(value, stream);
return stream;
}
template<class T>
byte_stream& operator>>(byte_stream& stream, T& value)
{
read(stream, value);
return stream;
}
}
#endif
|
bf61c116e4b6e26e3115185e76d859007976089a
|
f6c6f045cda60a91b86bcf60f4ba6478ed95573e
|
/Graph Algorithms/Cycle Finding.cpp
|
9022f932f02de275db4cd6a545586804054f8bf3
|
[] |
no_license
|
JitenWhatever/CSES-Problem-Set
|
d029d06c0433cbb3bc99b0293e55e4c9b5d553af
|
09166d2c1f48d28ced71de8d5fa028a7f5007ab6
|
refs/heads/master
| 2023-08-29T22:16:18.147687
| 2021-10-30T10:49:27
| 2021-10-30T10:49:27
| 281,456,432
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,531
|
cpp
|
Cycle Finding.cpp
|
/*
Time limit: 1.00 s Memory limit: 512 MB
You are given a directed graph, and your task is to find out if it contains a negative cycle, and also give an example of such a cycle.
Input
The first input line has two integers n and m: the number of nodes and edges. The nodes are numbered 1,2,…,n.
After this, the input has m lines describing the edges. Each line has three integers a, b, and c: there is an edge from node a to node b whose length is c.
Output
If the graph contains a negative cycle, print first "YES", and then the nodes in the cycle in their correct order.
If there are several negative cycles, you can print any of them. If there are no negative cycles, print "NO".
Constraints
1≤n≤2500
1≤m≤5000
1≤a,b≤n
−10^9≤c≤10^9
Example
Input:
4 5
1 2 1
2 4 1
3 1 1
4 1 -3
4 3 -2
Output:
YES
1 2 4 1
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF=1e17;
int main(){
ll n, m, u, v, w;
cin>>n>>m;
vector<vector<pair<ll, ll>>> graph(n);
for(int edge = 0; edge < m; ++edge) {
cin>>u>>v>>w;
--u;
--v;
graph[u].push_back({v, w});
}
vector<ll> dist(n, INF);
vector<int> par(n, -1);
dist[0] = 0;
vector<bool> visi(n, false);
for(int k = 0; k < n; ++k) {
for(int node = 0; node < n; ++node) {
for(pair<ll, ll> nbr : graph[node]) {
if(dist[node] + nbr.second < dist[nbr.first]) {
dist[nbr.first] = dist[node] + nbr.second ;
par[nbr.first] = node;
if(k == n - 1) {
cout<<"YES\n";
while(!visi[node]) {
visi[node] = true;
node = par[node];
}
vector<ll> path;
path.push_back(node);
while(path[0] != par[node]) {
node = par[node];
path.push_back(node);
}
path.push_back(path[0]);
reverse(path.begin(), path.end());
for(ll p : path) {
cout<<p + 1<<" ";
}
return 0;
}
}
}
}
}
cout<<"NO\n";
return 0;
}
|
0c5e8ba1c9cca72e47d59947f77f236c5a4ec853
|
995bb403417f0db5d238307cf5e9720216768126
|
/Include/TileLayer.h
|
03a2c5b79a34049f5772a2715cf04d18fd8767dd
|
[
"MIT"
] |
permissive
|
TylerSandman/marvin
|
5d7a6fac73a7135430fd9fd6a0ed120d9d1c348b
|
ef422fcc2bcecf91e4c0a52c6e19673fe688baf1
|
refs/heads/master
| 2020-05-18T19:35:27.607374
| 2014-07-05T02:44:05
| 2014-07-05T02:44:05
| 19,409,480
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 309
|
h
|
TileLayer.h
|
#pragma once
#include <SFML/Graphics.hpp>
#include <vector>
#include <string>
#include "Tile.h"
namespace tiled{
struct TileLayer{
public:
tiled::TileGrid tiles;
std::string name;
bool visible;
double opacity;
};
typedef std::vector<TileLayer> TileLayers;
}
|
57771cfb53286c49231438fbab13e52ac174f768
|
5d3d47380c7a6e2e4b56ff1f73700b55fd74750e
|
/src/Sand.hpp
|
2085cf73ac19ed683b4cfedc454ca19b4118b226
|
[] |
no_license
|
CreativeCodingASB/u1-project-1-Nathansbud
|
c056c1e65e29c8fb8d1f32cd6d1d657902c34ef9
|
bdcc3476613e3d61be0d0012ac2ecaa6dbbc6e21
|
refs/heads/master
| 2021-01-11T14:17:30.939977
| 2017-03-02T18:47:20
| 2017-03-02T18:47:20
| 81,309,345
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 486
|
hpp
|
Sand.hpp
|
//
// Sand.hpp
// U1-Project-1-Nathansbud
//
// Created by Zack Amiton on 2/15/17.
//
//
#ifndef Sand_hpp
#define Sand_hpp
#include <stdio.h>
#include "ofMain.h"
class Sand
{
public:
Sand(ofVec2f mousePos);
~Sand();
void Draw();
void Update();
void Move();
void SetPos(ofVec2f sandPos);
void SetColor();
int GetRadius() {return radius;}
ofVec2f GetPos() {return sandPos;}
ofVec2f grav;
private:
ofVec2f sandPos;
int radius = 5;
};
#endif /* Sand_hpp */
|
84e701b0bd7bfb61e5fcb7a66577063258573c72
|
724cb73a1a93b9a4b78ac8ff0fc249854e8154ae
|
/421/solution.cpp
|
e0c0e6f4d0cdad7782ae677adb87654ea0493e6c
|
[] |
no_license
|
nikitaunity/project_euler
|
9d68cd83fb160e259be4893719c018ca65cbf291
|
9ef1279abb670bbba4fbc5438801b008ac788af0
|
refs/heads/main
| 2023-02-18T14:45:01.087050
| 2021-01-23T22:34:14
| 2021-01-23T22:34:14
| 325,356,193
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,680
|
cpp
|
solution.cpp
|
#include <iostream>
#include <vector>
#include <cstdlib>
#include <chrono>
uint64_t calculatePowerByModulo(uint64_t base, uint64_t power,
const uint64_t& modulo) {
uint64_t exponent = 1;
while (power) {
if (power & 1) {
exponent *= base;
exponent %= modulo;
--power;
} else {
base *= base;
base %= modulo;
power >>= 1;
}
}
return exponent;
}
std::vector<bool> generateSieve(const size_t& max_value) {
size_t required_size = (max_value + 1) >> 1;
std::vector<bool> sieve(required_size, true);
sieve[0] = false; // 1 is not prime
size_t current_index = 1;
while ((current_index << 1) * (current_index + 1) < required_size) {
if (sieve[current_index]) {
auto prime_number = (current_index << 1) + 1;
for (auto prime_multiplicator = current_index + prime_number;
prime_multiplicator < required_size;
prime_multiplicator += prime_number) {
sieve[prime_multiplicator] = false;
}
}
current_index += 1;
}
return sieve;
}
std::vector<uint64_t> generatePrimeNumbers(const std::vector<bool>& sieve) {
std::vector<uint64_t> prime_numbers = {2};
for (uint64_t index = 0; index < sieve.size(); ++index) {
if (sieve[index]) {
prime_numbers.push_back((index << 1) + 1);
}
}
return prime_numbers;
}
std::vector<uint64_t> returnDistinctPrimeFactors(
uint64_t number,
const std::vector<bool> &sieve,
const std::vector<uint64_t>& prime_numbers) {
std::vector<uint64_t> prime_factors;
for (int current_prime_index = -1; number > 1; ++current_prime_index) {
if (current_prime_index >= 0 && sieve[number >> 1]) {
prime_factors.push_back(number);
return prime_factors;
} else {
uint64_t prime_number = (current_prime_index >= 0)
? prime_numbers[current_prime_index]
: 2;
if (number % prime_number == 0) {
while (number % prime_number == 0) {
number /= prime_number;
}
prime_factors.push_back(prime_number);
}
}
}
return prime_factors;
}
uint64_t calculateMinimalPrimitiveRootByPrimeModulo(
const uint64_t& prime_number,
const std::vector<bool> &sieve,
const std::vector<uint64_t>& prime_numbers) {
if (prime_number == 2) {
return 1;
}
auto required_powers = returnDistinctPrimeFactors(prime_number - 1,
sieve, prime_numbers);
for (size_t index = 0; index < required_powers.size(); ++index) {
required_powers[index] = (prime_number - 1) / required_powers[index];
}
bool is_found = false;
for (uint64_t candidate = 2; candidate < prime_number; ++candidate) {
is_found = true;
for (const auto& power: required_powers) {
if (calculatePowerByModulo(candidate, power, prime_number) == 1) {
is_found = false;
break;
}
}
if (is_found) {
return candidate;
}
}
return 0;
}
uint64_t calculateNumberOfDivisibleByPrime(
const uint64_t& prime_number,
const uint64_t& max_number,
const std::vector<bool> &sieve,
const std::vector<uint64_t>& prime_numbers) {
uint64_t answer = prime_number * ((max_number + 1) / prime_number);
if ((prime_number < 7) || (prime_number % 3 != 1 && prime_number % 5 != 1)) {
return answer;
}
uint64_t primitive_root = calculateMinimalPrimitiveRootByPrimeModulo(
prime_number, sieve, prime_numbers);
uint64_t roots = 15;
if (prime_number % 3 == 1) {
if (prime_number % 5 == 1) {
roots = 15;
} else {
roots = 3;
}
} else {
roots = 5;
}
uint64_t required_power = (prime_number - 1) / roots;
auto first_residual = calculatePowerByModulo(primitive_root,
required_power,
prime_number);
auto current_residual = first_residual;
for (uint64_t root_number = 0; root_number + 1 < roots; ++root_number) {
answer += prime_number * ((max_number + current_residual) / prime_number);
current_residual = (current_residual * first_residual) % prime_number;
}
return answer;
}
int main(int argc, char** argv) {
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
if (argc != 3) {
std::cout << "Please provide 2 parameters N and M (limit for primes)...\n";
return 1;
}
uint64_t max_prime = static_cast<uint64_t>(std::atoll(argv[2]));
uint64_t max_number = static_cast<uint64_t>(std::atoll(argv[1]));
auto sieve = generateSieve(static_cast<size_t>(max_prime));
auto prime_numbers = generatePrimeNumbers(sieve);
uint64_t answer = 0;
for (const auto& prime_number: prime_numbers) {
answer += calculateNumberOfDivisibleByPrime(
prime_number, max_number, sieve, prime_numbers
);
}
std::cout << answer << '\n';
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
std::cout << "Time difference = " <<
static_cast<float>(std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count()) / 1000.0 <<
"[s]" << '\n';
return 0;
}
|
8328e312ed86704f1f31de02007cd03370ca7fae
|
e7e6ae3522ed9455e1bf540f8ab544d1d1b6c45e
|
/searching-sorting/116-productArrayPuzzle.cpp
|
dc2b39b966408df9d01a39506a7264213ba184dd
|
[] |
no_license
|
pathadeTush/Problems-450
|
ce90610f9771bc19856f03b7306d1be624f6674f
|
e1059f529e01f3e64b602d1c8510e35fd46a8641
|
refs/heads/master
| 2023-08-16T07:20:25.525033
| 2021-10-22T17:41:37
| 2021-10-22T17:41:37
| 420,187,799
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,363
|
cpp
|
116-productArrayPuzzle.cpp
|
/*
Product array puzzle
Easy Accuracy: 47.32% Submissions: 36809 Points: 2
Given an array nums[] of size n, construct a Product Array P (of same size n) such that P[i] is equal to the product of all the elements of nums except nums[i].
Example 1:
Input:
n = 5
nums[] = {10, 3, 5, 6, 2}
Output:
180 600 360 300 900
Explanation:
For i=0, P[i] = 3*5*6*2 = 180.
For i=1, P[i] = 10*5*6*2 = 600.
For i=2, P[i] = 10*3*6*2 = 360.
For i=3, P[i] = 10*3*5*2 = 300.
For i=4, P[i] = 10*3*5*6 = 900.
Example 2:
Input:
n = 2
nums[] = {12,0}
Output:
0 12
Your Task:
You do not have to read input. Your task is to complete the function productExceptSelf() that takes array nums[] and n as input parameters and returns a list of n integers denoting the product array P. If the array has only one element the returned list should should contains one value i.e {1}
Note: Try to solve this problem without using the division operation.
Expected Time Complexity: O(n)
Expected Auxiliary Space: O(n)
Constraints:
1 <= n <= 1000
0 <= numsi <= 200
Array may contain duplicates.
*/
class Solution
{
public:
// nums: given vector
// return the Product vector P that hold product except self at each index
vector<long long int> productExceptSelf(vector<long long int> &arr, int n)
{
if (n == 1)
{
arr[0] = 1;
return arr;
}
long long int allProduct = 1;
int zeroCount = 0, zeroIndex;
for (int i = 0; i < n; i++)
{
if (arr[i])
allProduct *= arr[i];
else
{
zeroCount++;
zeroIndex = i;
}
if (zeroCount > 1)
break;
}
// if more then 1 zeros are present
if (zeroCount > 1)
{
for (int i = 0; i < n; i++)
arr[i] = 0;
}
// if exactly 1 zero present
else if (zeroCount == 1)
{
for (int i = 0; i < n; i++)
{
if (i == zeroIndex)
arr[i] = allProduct;
else
arr[i] = 0;
}
}
// if no zeros present
else
{
for (int i = 0; i < n; i++)
arr[i] = allProduct / arr[i];
}
return arr;
}
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.