blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 3
264
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
85
| license_type
stringclasses 2
values | repo_name
stringlengths 5
140
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 905
values | visit_date
timestamp[us]date 2015-08-09 11:21:18
2023-09-06 10:45:07
| revision_date
timestamp[us]date 1997-09-14 05:04:47
2023-09-17 19:19:19
| committer_date
timestamp[us]date 1997-09-14 05:04:47
2023-09-06 06:22:19
| github_id
int64 3.89k
681M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us]date 2012-06-07 00:51:45
2023-09-14 21:58:39
⌀ | gha_created_at
timestamp[us]date 2008-03-27 23:40:48
2023-08-21 23:17:38
⌀ | gha_language
stringclasses 141
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
10.4M
| extension
stringclasses 115
values | content
stringlengths 3
10.4M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
158
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6edecc902c50ec515cb6ffbbb1062d114628dff5 | 52b799037c3deafd0b4b7bbead2405e15b01d0b4 | /include/CLMutex.h | 67725b5319e822118f6bceddbd9123a468522430 | [] | no_license | lskxl/LibExecutive | 24d265fe86c634d47330ede9af3cd8d6260928c2 | f81e6fa2a5c32679a43d53e70a6e64feb1404094 | refs/heads/master | 2021-01-22T09:46:54.147824 | 2013-06-14T15:52:01 | 2013-06-14T15:52:01 | 10,692,268 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 774 | h | #ifndef CLMutex_H
#define CLMutex_H
#include <pthread.h>
#include "CLStatus.h"
#include "CLMutexInterface.h"
#define MUTEX_USE_RECORD_LOCK 0
#define MUTEX_USE_RECORD_LOCK_AND_PTHREAD 1
#define MUTEX_USE_SHARED_PTHREAD 2
class CLMutex
{
public:
/*
构造函数和析构函数出错时,会抛出字符串类型异常
*/
CLMutex();
//需要保证pMutex指向的互斥量已经被初始化了
explicit CLMutex(pthread_mutex_t *pMutex);
CLMutex(const char *pstrFileName, int nType);
CLMutex(const char *pstrFileName, pthread_mutex_t *pMutex);
virtual ~CLMutex();
CLStatus Lock();
CLStatus Unlock();
CLMutexInterface *GetMutexInterface();
private:
CLMutex(const CLMutex&);
CLMutex& operator=(const CLMutex&);
private:
CLMutexInterface *m_pMutex;
};
#endif | [
"[email protected]"
] | |
4b30e0fd03e075a362303af84b07c5e298d741a8 | dc9d473871d027cf4127c84cdf58c6183a24e159 | /Edge.cpp | 8491540364b2a8f24d79eae1f993959a57809217 | [] | no_license | bretsko/GraphAlgorithms | d20a4412e809aace700bbc52b2bde8c8954e7b95 | fd8fe9123d0acc90ab53c9a5097f8e88b6f17519 | refs/heads/master | 2021-01-19T06:32:25.635405 | 2016-08-23T02:08:29 | 2016-08-23T02:08:29 | 65,428,769 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,621 | cpp |
#include "Edge.h"
#include "Vertex.h"
Edge::Edge(const VertexPtr &src, const VertexPtr &dest, u_int32_t weight)
: m_source (src),
m_destination(dest),
m_weight (weight)
{
}
const pair<VertexPtr, VertexPtr> Edge::getVertices() const
{
auto dest = m_destination.lock();
auto src = m_source.lock();
if(src && dest)
return {src, dest};
return pair<VertexPtr,VertexPtr>({nullptr, nullptr});;
}
const VertexPtr Edge::getDestination() const {
VertexPtr dest = m_destination.lock();
if(dest){
return dest;
}
return nullptr;
}
bool Edge::compareNamesUndirected(const Edge &edge) const
{
bool r1 = (getDestination()->getName() == edge.getDestination()->getName());
bool r2 = (getSource()->getName() == edge.getSource()->getName());
bool r3 = (getDestination()->getName() == edge.getSource()->getName());
bool r4 = (getSource()->getName() == edge.getDestination()->getName());
if((r1 && r2) || (r3 && r4)){
return true;
}
return false;
}
bool Edge::compareNamesDirected(const Edge &edge) const
{
bool r1 = (getDestination()->getName() == edge.getDestination()->getName());
bool r2 = (getSource()->getName() == edge.getSource()->getName());
if(r1 && r2) {
return true;
}
return false;
}
bool Edge::comparePtrsUndirected(const Edge &edge) const
{
bool r1 = (getDestination().get() == edge.getDestination().get());
bool r2 = (getSource().get() == edge.getSource().get());
bool r3 = (getDestination().get() == edge.getSource().get());
bool r4 = (getSource().get() == edge.getDestination().get());
if((r1 && r2) || (r3 && r4)){
return true;
}
return false;
}
bool Edge::comparePtrsDirected(const Edge &edge) const
{
bool r1 = (getDestination().get() == edge.getDestination().get());
bool r2 = (getSource().get() == edge.getSource().get());
if(r1 && r2){
return true;
}
return false;
}
const VertexPtr Edge::getSource() const{
VertexPtr src = m_source.lock();
if(src){
return src;
}
return nullptr;
}
void Edge::print(bool withWeights) const
{
VertexPtr src = m_source.lock();
VertexPtr dest = m_destination.lock();
if(withWeights){
cerr << src->getName() << " - " << dest->getName() << ", " << m_weight << endl;
}else{
cerr << src->getName() << " - " << dest->getName() << ", " << endl;
}
}
bool sortEdgesByWeight(const EdgePtr &l, const EdgePtr &r){
u_int32_t el = l->getWeight();
u_int32_t er = r->getWeight();
return ( el< er);
}
| [
"[email protected]"
] | |
213d8ef244ef1b3b1717d21a95ac9b29e6f3f94e | 0ed8901ba1b2d49b73ad08bd095b22f331ee99fa | /uv-test/net/net_cache_queue.cpp | 62a6f0dbe93952cd9f3c7620ed3b399253758a77 | [] | no_license | lw000/uv_demo | 6bdb20a210fa021122d7b8d0388102ba88cee3e8 | d389a297ed926a21ae80aab0d695eb8a1e725c8e | refs/heads/master | 2020-03-25T01:44:45.719930 | 2018-08-17T10:28:33 | 2018-08-17T10:28:33 | 143,254,338 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,558 | cpp | #include "net_cache_queue.h"
#include <algorithm>
///////////////////////////////////////////////////////////////////////////////////////////
CacheQueue::CacheQueue(void) {
}
CacheQueue::~CacheQueue(void) {
}
void CacheQueue::push(char* buf, int size)
{
if (buf == NULL) return;
if (size <= 0) return;
int i = 0;
char* p = buf;
while (i++ < size) {
_cq.push_back(*p++);
}
}
void CacheQueue::pop(int size)
{
if (size <= 0) return;
if (_cq.empty()) return;
if (size > _cq.size()) return;
std::vector<char>::iterator iter = _cq.erase(_cq.begin(), _cq.begin() + size);
if (iter != _cq.end()) {
}
}
void CacheQueue::copyto(char* buffer, int size) {
if (_cq.size() < size) {
return;
}
char* p = buffer;
int i = 0;
std::for_each(_cq.begin(), _cq.end(), [&p, &i, &size](char c) {
if (i++ < size) {
*p++ = c;
}
});
}
std::vector<char>* CacheQueue::copyto(std::vector<char>& dest, int size) {
if (_cq.size() < size)
{
return nullptr;
}
std::copy_n(_cq.begin(), size, dest.begin());
return &dest;
}
size_t CacheQueue::size() const
{
int l = 0;
{
l = _cq.size();
}
return l;
}
char* CacheQueue::front()
{
return _cq.data();
}
void CacheQueue::clear()
{
_cq.clear();
}
///////////////////////////////////////////////////////////////////////////////////////////
NewCacheQueue::NewCacheQueue(size_t capacity) {
this->_queue = lw_queue_init(capacity);
}
NewCacheQueue::~NewCacheQueue() {
this->clear();
lw_queue_dispose(this->_queue);
}
void NewCacheQueue::push(char c) {
lw_queue_add(this->_queue, new char(c));
}
void NewCacheQueue::push(const char* buf, int size) {
for (int i = 0; i < size; i++) {
lw_queue_add(this->_queue, new char(buf[i]));
}
}
char* NewCacheQueue::front() {
char* p = (char*)lw_queue_peek(this->_queue);
return p;
}
void NewCacheQueue::pop() {
char* p = (char*)lw_queue_remove(this->_queue);
delete p;
}
void NewCacheQueue::pop(int size) {
for (int i = 0; i < size; i++) {
char* p = (char*)lw_queue_remove(this->_queue);
delete p;
}
}
void NewCacheQueue::copyto(char* buffer, int size) {
for (int i = 0; i < size; i++) {
char* p = (char*)lw_queue_remove(this->_queue);
buffer[i] = *p;
delete p;
}
}
size_t NewCacheQueue::size() const {
return this->_queue->size;
}
void NewCacheQueue::clear() {
char* p = nullptr;
while ((p = (char*)lw_queue_remove(this->_queue)) != nullptr)
{
delete p;
}
}
| [
"[email protected]"
] | |
59aafb07cc905af85510aed4f615e4130c1be6d2 | 479dbae2b316b98f3ebce4ecb6a8408b68c6c7e6 | /04 - Calcular_idade.cpp | 58f405d8752e3f4549a6fc207e72d224f9300004 | [] | no_license | Bruno-morozini/Projetos_C | d4ee04220bc25f0ccd7e593b98776161b0df034b | 7ccfcb00a70e710c6faccd97def70b80e6091b99 | refs/heads/main | 2023-01-09T14:02:09.628303 | 2020-11-04T11:42:37 | 2020-11-04T11:42:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 579 | cpp |
/////Faça um algoritmo que receba o ano de nascimento de uma pessoa e o ano atual,
///calcule e mostre:
//a)a idade atual dessa pessoa.
//b)quantos anos ela terá em 2038.
#include<stdio.h>
int main()
{
int dataNasc, anoAtual, idadeAnoAtual, idadeano2038;
printf("Digite o Ano de Nascimento : ");
scanf("%d", &dataNasc);
printf("Digite o Ano Atual : ");
scanf("%d", &anoAtual);
idadeAnoAtual = anoAtual - dataNasc;
idadeano2038 = 2038 - dataNasc;
printf("\n Sua idade hoje é : %d", idadeAnoAtual);
printf("\n\n Sua idade em 2038 sera de : %d", idadeano2038);
}
| [
"[email protected]"
] | |
5e9b894bce557a9818c7419e27a6da802526c73a | b1ecf5efbcacbb274898e29e7ee542e59ef93916 | /AAA (CODE) Programming tools(Fuad)/segment tree/Count number of smallest elements in given range/Count number of smallest elements in given range.cpp | a1e2d325b676d121563a26ac1c8608ee878847c4 | [] | no_license | abufarhad/Programming | 92160c224578be116b2bb1e957ea105640a83ee6 | 282bf4df6c47817cb5d96ccee7dc2953438e8e11 | refs/heads/master | 2021-06-16T17:07:14.095691 | 2021-03-23T17:22:13 | 2021-03-23T17:22:13 | 180,426,830 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,929 | cpp | //https://www.geeksforgeeks.org/count-number-of-smallest-elements-in-given-range/
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define ull unsigned long long LL
#define scl(n) scanf("%lld", &n)
#define scf(n) scanf("%lf", &n)
#define sci(n) scanf("%d", &n)
#define scii(n,m) scanf("%d %d",&n,&m)
#define sciii(n,m,p) scanf("%d %d %d",&n,&m,&p)
#define MOD 1000000007
#define MODP 99999999999973LL
#define pb push_back
#define mp make_pair
#define pp pair<LL,LL>
#define memo(a,b) memset(a,b,sizeof(a))
#define INF 1e9
#define EPS 1e-8
#define Pi acos(-1.0)
LL bigmod(LL b, LL p, LL md){if(p==0) return 1;if(p%2==1){ return ((b%md)*bigmod(b,p-1,md))%md;} else {LL y=bigmod(b,p/2,md);return (y*y)%md;}}
#define N 100000
int arr[N];
struct info
{
int val;
int cnt;
} tree[4*N];
void init(int node, int b, int e )
{
if(b==e)
{
tree[node].cnt=1;
tree[node].val=arr[b];
return ;
}
int left=2*node;
int right=2*node+1;
int mid=(b+e)/2;
init(left,b,mid);
init(right,mid+1,e);
if(tree[left].val<tree[right].val)
{
tree[node].val=tree[left].val;
tree[node].cnt=tree[left].cnt;
}
else if(tree[left].val>tree[right].val)
{
tree[node].val=tree[right].val;
tree[node].cnt=tree[right].cnt;
}
else
{
tree[node].val=tree[left].val;
tree[node].cnt=tree[left].cnt+tree[right].cnt;
}
}
info query(int node,int b, int e, int i, int j)
{
if(b>j || e<i)
{
info dummy;
dummy.cnt=dummy.val=INT_MAX;
return dummy;
}
if(b>=i && e<=j)
{
return tree[node];
}
int left=2*node;
int right=2*node+1;
int mid=(b+e)/2;
info p1=query(left,b,mid,i,j);
info p2=query(right,mid+1,e,i,j);
if(p1.val<p2.val)
{
return p1;
}
else if(p2.val<p1.val)
{
return p2;
}
else
{
info merge_res;
merge_res.val=p1.val;
merge_res.cnt=p1.cnt+p2.cnt;
return merge_res;
}
}
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
cin>>arr[i];
init(1,1,n);
int q;
cin>>q;
while(q--)
{
int l,r;
cin>>l>>r;
info ans=query(1,1,n,l,r);
cout<<"min value : "<<ans.val<<" ase "<<ans.cnt<<" bar"<<endl;
}
}
/* LL dx[] = {1,-1,0,0} , dy[] = {0,0,1,-1}; */ // 4 Direction
/* LL dx[] = {1,-1,0,0,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1,1,-1}; */ // 8 Direction
/* LL dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1}; */ // Knight Direction
/* LL dx[] = {2,-2,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1}; */ // Hexagonal Direction
| [
"[email protected]"
] | |
bed78c9dca4f94c91cc3c6b135ccf0447b2bcd27 | 5849fee33a721a721976ce38263ca9da6a1fb611 | /examples/pursuit/tcs/prey_controller.cpp | 067ae46e25d1d28501143a963a01490352169b41 | [
"Apache-2.0"
] | permissive | PositronicsLab/tcs | 74894408947fae2a522b220bf18776591155f9d9 | c43bc3244b3c68cd1b42358afd18d5a0716d3e0f | refs/heads/master | 2021-01-12T08:15:47.320436 | 2014-08-15T23:09:34 | 2014-08-15T23:09:34 | 76,524,658 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,730 | cpp | #include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>
#include <atomic>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <tcs/log.h>
#include <tcs/time.h>
#include <tcs/os.h>
#include <tcs/notification.h>
#include <tcs/message.h>
#include <tcs/osthread.h>
#include "../channels.h"
#include "../experiment.h"
#include "../moby_xml.h"
#include "../moby_space.h"
#include "../moby_ship.h"
//-----------------------------------------------------------------------------
log_p info;
char spstr[512];
//-----------------------------------------------------------------------------
// Local helpers
static osthread_p mythread;
//std::atomic<int> quit;
static bool quit;
//-----------------------------------------------------------------------------
// Notification Overhead
static int write_fd;
static int read_fd;
notification_t command_note;
notification_t state_note;
notification_t yield_note;
notification_t server_note;
//-----------------------------------------------------------------------------
realtime_t t;
realtime_t dt;
//-----------------------------------------------------------------------------
client_message_t msg;
client_message_buffer_c msgbuffer;
//-----------------------------------------------------------------------------
moby_space_p space;
ship_p prey;
ship_p predator;
std::vector<double> prey_state;
std::vector<double> pred_state;
std::vector<double> prey_control;
//-----------------------------------------------------------------------------
// read( blocks process ) the notification sent back from the coordinator
void read( notification_t& note ) {
if( __read( read_fd, ¬e, sizeof(notification_t) ) == -1 ) {
// ERROR
//return false;
}
}
//-----------------------------------------------------------------------------
void write( notification_t& note ) {
char eno[16];
// update the timestamp on the note
note.ts = generate_timestamp();
ssize_t bytes_written;
os_error_e result;
result = __write( write_fd, ¬e, sizeof(notification_t), bytes_written );
if( result != OS_ERROR_NONE ) {
///*
if( result == OS_ERROR_PIPE )
sprintf( eno, "EPIPE" );
else if( result == OS_ERROR_AGAIN )
sprintf( eno, "EWOULDBLOCK" );
else if( result == OS_ERROR_BADF )
sprintf( eno, "EBADF" );
else if( result == OS_ERROR_DESTADDRREQ )
sprintf( eno, "EDESTADDRREQ" );
else if( result == OS_ERROR_DQUOT )
sprintf( eno, "EDQUOT" );
else if( result == OS_ERROR_FAULT )
sprintf( eno, "EFAULT" );
else if( result == OS_ERROR_FBIG )
sprintf( eno, "EFBIG" );
else if( result == OS_ERROR_INTR )
sprintf( eno, "EINTR" );
else if( result == OS_ERROR_INVAL )
sprintf( eno, "EINVAL" );
else if( result == OS_ERROR_IO )
sprintf( eno, "EIO" );
else if( result == OS_ERROR_NOSPC )
sprintf( eno, "ENOSPC" );
printf( "ERROR: (%s) failed making system call write(...) errno[%s]\n", mythread->name, eno );
//*/
}
}
//-----------------------------------------------------------------------------
void term_sighandler( int signum ) {
quit = true;
//quit.store( 1, std::memory_order_seq_cst );
}
//-----------------------------------------------------------------------------
void compute_command( void ) {
printf( "prey: time[%f], dtime[%f]\n", t, dt );
ship_c::compute_prey_command( pred_state, prey_state, prey_control, t, dt, space.get() );
}
//-----------------------------------------------------------------------------
// Request/Reply
void request_state( void ) {
//printf( "(client-process) %s requesting state\n", mythread->name );
// write the request information into the shared memory buffer
// send the notification to the coordinator
state_note.ts = generate_timestamp();
write( state_note );
// read( block ) the notification sent back from the coordinator
read( server_note );
if( server_note.source == notification_t::SERVER ) {
if( server_note.type == notification_t::READ ) {
// read data from the shared memory buffer
msgbuffer.read( msg );
//printf( "message: t[%f], dt[%f]\n", msg.header.t, msg.header.dt );
prey->time = msg.header.t;
prey->dtime = msg.header.dt;
for( unsigned i = 0; i < 7; i++ )
prey_state[i] = msg.prey_state.q[i];
for( unsigned i = 0; i < 6; i++ )
prey_state[i+7] = msg.prey_state.dq[i];
for( unsigned i = 0; i < 7; i++ )
pred_state[i] = msg.pred_state.q[i];
for( unsigned i = 0; i < 6; i++ )
pred_state[i+7] = msg.pred_state.dq[i];
}
}
//printf( "(client-process) %s received state\n", mythread->name );
//return true;
}
//-----------------------------------------------------------------------------
// Pub/Sub
bool publish_command( void ) {
//printf( "(client-process) %s publishing command\n", mythread->name );
// generate a timestamp
timestamp_t ts = generate_timestamp();
// put data in shared memory
msg.control.ts = ts;
for( unsigned i = 0; i < 6; i++ )
msg.control.u[i] = prey_control[i];
msgbuffer.write( msg );
// send the notification to the coordinator
command_note.ts = ts;
write( command_note );
// probably need to force a block here
return true;
}
//-----------------------------------------------------------------------------
// May be superfluous with above
void publish_yield( void ) {
//printf( "(client-process) %s yields\n", mythread->name );
// send the notification to the coordinator
yield_note.ts = generate_timestamp();
write( yield_note );
}
//-----------------------------------------------------------------------------
int init( int argc, char* argv[] ) {
mythread = osthread_p( new osthread_c( argv[0] ) );
printf( "%s is initializing\n", mythread->name );
quit = false;
//quit.store( 0, std::memory_order_seq_cst );
mythread->pid = getpid();
if( argc < 2 ) {
printf( "ERROR: client process[%s] was not given enough arguments\nExiting client process.\n", mythread->name );
exit( 1 );
}
// * install SIGTERM signal handler *
struct sigaction action;
memset( &action, 0, sizeof(struct sigaction) );
action.sa_handler = term_sighandler;
sigaction( SIGTERM, &action, NULL );
// close the coordinator side channels
__close( FD_TIMER_TO_COORDINATOR_READ_CHANNEL );
__close( FD_TIMER_TO_COORDINATOR_WRITE_CHANNEL );
__close( FD_WAKEUP_TO_COORDINATOR_READ_CHANNEL );
__close( FD_WAKEUP_TO_COORDINATOR_WRITE_CHANNEL );
__close( FD_PREYCONTROLLER_TO_COORDINATOR_READ_CHANNEL );
__close( FD_PREDCONTROLLER_TO_COORDINATOR_READ_CHANNEL );
__close( FD_PREDPLANNER_TO_COORDINATOR_READ_CHANNEL );
__close( FD_COORDINATOR_TO_PREYCONTROLLER_WRITE_CHANNEL );
__close( FD_COORDINATOR_TO_PREDCONTROLLER_WRITE_CHANNEL );
__close( FD_COORDINATOR_TO_PREDPLANNER_WRITE_CHANNEL );
// close the other channels that should not be accessed
__close( FD_PREDCONTROLLER_TO_COORDINATOR_WRITE_CHANNEL );
__close( FD_COORDINATOR_TO_PREDCONTROLLER_READ_CHANNEL );
__close( FD_PREDPLANNER_TO_COORDINATOR_WRITE_CHANNEL );
__close( FD_COORDINATOR_TO_PREDPLANNER_READ_CHANNEL );
read_fd = FD_COORDINATOR_TO_PREYCONTROLLER_READ_CHANNEL;
write_fd = FD_PREYCONTROLLER_TO_COORDINATOR_WRITE_CHANNEL;
//printf( "%s write_fd:%d; read_fd:%d\n", client_name.c_str(), write_fd, read_fd );
// * initialize shared memory *
msgbuffer = client_message_buffer_c( CLIENT_MESSAGE_BUFFER_NAME, CLIENT_MESSAGE_BUFFER_MUTEX_NAME, false );
if( msgbuffer.open( ) != client_message_buffer_c::ERROR_NONE ) {
sprintf( spstr, "(client-process.cpp) init() for %s failed calling client_msg_buffer_c.open(...)\n", mythread->name );
printf( "%s", spstr );
}
// build the notification prototypes
// - state notification -
state_note.source = notification_t::CLIENT;
state_note.type = notification_t::READ;
state_note.pid = mythread->pid;
// - command notification -
command_note.source = notification_t::CLIENT;
command_note.type = notification_t::WRITE;
command_note.pid = mythread->pid;
// - block notification -
yield_note.source = notification_t::CLIENT;
yield_note.type = notification_t::IDLE;
yield_note.pid = mythread->pid;
/*
if( strcmp( mythread->name, "pred-planner" ) == 0 )
yield_note.period = 0;
else
yield_note.period = max_cycles;
*/
//-------------------------
// read the initial state from the moby configuration file
init_moby_xml( argc, argv );
space = moby_space_p( new moby_space_c() );
space->read( READ_MAP );
//space->update();
prey = space->prey();
predator = space->predator();
prey_state.resize( 13 );
pred_state.resize( 13 );
prey_control.resize( 6 );
for( unsigned i = 0; i < 6; i++ )
prey_control[i] = 0;
t = 0;
dt = PREY_CONTROLLER_PERIOD_SEC;
printf( "%s has initialized\n", mythread->name );
return 0;
}
//-----------------------------------------------------------------------------
void shutdown( void ) {
// close the shared memory
msgbuffer.close();
// close the pipes
__close( read_fd );
__close( write_fd );
// print a parting message
printf( "client[%s]: shutting down\n", mythread->name );
}
//-----------------------------------------------------------------------------
int main( int argc, char* argv[] ) {
if( init( argc, argv ) != 0 )
//quit.store( 1, std::memory_order_seq_cst );
quit = true;
while( !quit ) {
t += dt;
//while( !quit.load( std::memory_order_seq_cst ) ) {
request_state();
compute_command();
publish_command();
publish_yield();
}
shutdown();
return 0;
}
| [
"james@PR2Lab-2.(none)"
] | james@PR2Lab-2.(none) |
01efde417b2605fb8b80f3c709d2b93cb57c5653 | 4b430686ae824c78604e15818c4b864778468ca1 | /Archive/Stroika_FINAL_for_STERL_1992/Library/Framework/Sources/CascadeMenuItem.cc | 4cbb9c1d164c9035391efe466dee531a3bd1a28b | [] | no_license | kjax/Stroika | 59d559cbbcfb9fbd619155daaf39f6805fa79e02 | 3994269f67cd9029b9adf62e93ec0a3bfae60b5f | refs/heads/master | 2021-01-17T23:05:33.441132 | 2012-07-22T04:32:58 | 2012-07-22T04:32:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,002 | cc | /* Copyright(c) Sophist Solutions Inc. 1990-1992. All rights reserved */
/*
* $Header: /fuji/lewis/RCS/CascadeMenuItem.cc,v 1.4 1992/09/08 15:34:00 lewis Exp $
*
* TODO:
* - This item should be enabled iff its submenu is enabled...
*
*
* Changes:
* $Log: CascadeMenuItem.cc,v $
* Revision 1.4 1992/09/08 15:34:00 lewis
* Renamed NULL -> Nil.
*
* Revision 1.3 1992/09/01 15:46:50 sterling
* Lots of Foundation changes.
*
* Revision 1.2 1992/07/21 20:12:43 sterling
* changed qGUI to qUI, supported qWinUI
*
* Revision 1.18 1992/04/24 08:56:12 lewis
* On Unrealize of motif cascademenuitem native must unrealize menu in addition to our widget.
*
* Revision 1.17 92/04/20 14:27:51 14:27:51 lewis (Lewis Pringle)
* Added typedef char* caddr_t; in #if qSnake && _POSIX_SOURCE since xutils.h the distribute not posix compliant.
* And got rid of some obsolete header includes for motif.
*
* Revision 1.16 92/04/02 17:41:32 17:41:32 lewis (Lewis Pringle)
* Added a couple of Requires that the menu being associated with the cascadeMenuItem is not already
* a subview someplace.
*
* Revision 1.15 92/04/02 13:07:21 13:07:21 lewis (Lewis Pringle)
* Instead of manually re-#defining symbols undefs in Intrinsic.h, we just re-include osrenamepre/post after that
* file. This is better because as we add more renames, its painfull having to update all these other places. Hopefully
* the entire hack can go away at some point.
*
* Revision 1.14 92/03/16 16:01:06 16:01:06 sterling (Sterling Wight)
* moved add to menubar, to fix race condition prob at construction time
*
* Revision 1.13 1992/03/10 00:03:06 lewis
* Use new conditional compile macro qXmToolkit instead of qMotifToolkit.
*
* Revision 1.12 1992/02/27 21:44:36 lewis
* Get rid of seperate CascadeMenuTitle implementations for mac and motif.
* Get rid of fNativeMenu
* Make the menutitle be a subview of the cascademenu item (mac and motif).
*
* Revision 1.11 1992/02/16 16:33:10 lewis
* Fixup includes.
*
* Revision 1.9 1992/02/14 03:00:26 lewis
* Use GetOwner () instead of (now defunct) fNativeOwner.
*
* Revision 1.8 1992/02/12 06:44:45 lewis
* Deleted workarounds for qMPW_SymbolTableOverflowProblem since it is now a fixed bug. Also, changed AbstractMenu* to
* Menu*.
*
* Revision 1.6 1992/02/11 00:52:53 lewis
* Moved toward support just 1 menu class - get rid of hack where CascadeMenuIte
* took different type args under different toolkits...
*
* Revision 1.5 1992/02/06 21:09:37 lewis
* Added workaround for qMPW_SymbolTableOverflowProblem bug.
*
* Revision 1.4 1992/02/04 16:51:00 lewis
* Override IsNativeItem for mac cascade item and say we are native.
*
* Revision 1.3 1992/02/04 02:31:45 lewis
* Added CascadeMenuItem class implementation.
*
* Revision 1.2 1992/02/03 23:30:58 lewis
* Added abstract base classes, and a concreate defining class CascaseMenuItem instead of
* #defines and typedefs.
*
* Revision 1.1 1992/02/03 22:30:35 lewis
* Initial revision
*
*
*/
#include <string.h>
#include "OSRenamePre.hh"
#if qMacToolkit
#include <Menus.h>
#elif qXtToolkit
#if qSnake && _POSIX_SOURCE
typedef char* caddr_t; // work around hp POSIX headers bug
#endif
#include <X11/Intrinsic.h>
#include "OSRenamePost.hh" // they undef a bunch of things we define
#include "OSRenamePre.hh" // so blast back!!!
#include <Xm/Xm.h>
#include <Xm/CascadeBG.h>
#endif /*Toolkit*/
#include "OSRenamePost.hh"
#include "Debug.hh"
#include "StreamUtils.hh"
#include "Menu.hh"
#include "MenuBar.hh"
#include "PullDownMenu.hh"
#include "CascadeMenuItem.hh"
// Consider putting this into the headers???
// Also, why AbstractPullDownMenuTitle instead of MenuTitle???
class CascadeMenuTitle : public AbstractPullDownMenuTitle {
public:
CascadeMenuTitle (Menu* menu);
~CascadeMenuTitle ();
protected:
override Boolean DoMenuSelection_ (const Point& startPt, MenuItem*& selected);
};
/*
********************************************************************************
***************************** AbstractCascadeMenuItem **************************
********************************************************************************
*/
AbstractCascadeMenuItem::AbstractCascadeMenuItem ():
MenuItem (CommandHandler::eCascadeItem)
{
}
/*
********************************************************************************
***************************** CascadeMenuItem_MacUI ***************************
********************************************************************************
*/
CascadeMenuItem_MacUI::CascadeMenuItem_MacUI ():
AbstractCascadeMenuItem ()
{
}
/*
********************************************************************************
***************************** CascadeMenuItem_MacUI ***************************
********************************************************************************
*/
CascadeMenuItem_MotifUI::CascadeMenuItem_MotifUI ():
AbstractCascadeMenuItem ()
{
}
#if qMacToolkit
/*
********************************************************************************
*************************** CascadeMenuItem_MacUI_Native **********************
********************************************************************************
*/
CascadeMenuItem_MacUI_Native::CascadeMenuItem_MacUI_Native (Menu* cascadeMenu):
CascadeMenuItem_MacUI (),
fMenuTitle (Nil)
{
RequireNotNil (cascadeMenu);
AddSubView (fMenuTitle = new CascadeMenuTitle (cascadeMenu));
}
CascadeMenuItem_MacUI_Native::~CascadeMenuItem_MacUI_Native ()
{
if (fMenuTitle != Nil) {
RemoveSubView (fMenuTitle);
}
delete fMenuTitle;
}
void CascadeMenuItem_MacUI_Native::UpdateOSRep_ ()
{
RequireNotNil (GetOwner ());
MenuItem::UpdateOSRep_ ();
osStr255 tmpStr;
::SetItem (GetOwner ()->GetOSRepresentation (), short (GetIndex ()), GetName ().ToPString (tmpStr, sizeof (tmpStr)));
// quick hack to get things working
short cmd = 0;
::GetItemCmd (GetOwner ()->GetOSRepresentation (), short (GetIndex ()), &cmd);
if (cmd != 0x1b) {
// must be first time
::InsertMenu (fMenuTitle->GetMenu ()->GetOSRepresentation (), -1);
MenuBar_MacUI_Native::sCascadeMenus.Append (fMenuTitle);
::SetItemCmd (GetOwner ()->GetOSRepresentation (), short (GetIndex ()), 0x1b);
::SetItemMark (GetOwner ()->GetOSRepresentation (), short (GetIndex ()), (*fMenuTitle->GetMenu ()->GetOSRepresentation ())->menuID);
}
}
Boolean CascadeMenuItem_MacUI_Native::IsNativeItem () const
{
return (True);
}
#elif qXmToolkit
/*
********************************************************************************
*********************** CascadeMenuItem_MotifUI_Native ************************
********************************************************************************
*/
CascadeMenuItem_MotifUI_Native::CascadeMenuItem_MotifUI_Native (Menu* cascadeMenu):
CascadeMenuItem_MotifUI (),
fMenuTitle (Nil),
fWidget (Nil)
{
RequireNotNil (cascadeMenu);
Require (cascadeMenu->GetParentView () == Nil); // not already installed someplaces...
AddSubView (fMenuTitle = new CascadeMenuTitle (cascadeMenu));
}
CascadeMenuItem_MotifUI_Native::~CascadeMenuItem_MotifUI_Native ()
{
if (fMenuTitle != Nil) {
RemoveSubView (fMenuTitle);
}
delete fMenuTitle;
}
void CascadeMenuItem_MotifUI_Native::Realize (osWidget* parent)
{
RequireNotNil (fMenuTitle);
RequireNotNil (fMenuTitle->GetMenu ());
Require (fWidget == Nil);
fMenuTitle->GetMenu ()->Realize (parent);
Arg args [1];
XtSetArg (args[0], XmNsubMenuId, fMenuTitle->GetMenu ()->GetOSRepresentation ());
char tmp[1000];
GetName ().ToCStringTrunc (tmp, sizeof (tmp));
osWidget* widget = ::XmCreateCascadeButtonGadget (parent, tmp, args, 1);
::XtManageChild (widget);
fWidget = widget;
EnsureNotNil (fWidget);
}
void CascadeMenuItem_MotifUI_Native::UnRealize ()
{
RequireNotNil (fMenuTitle);
RequireNotNil (fMenuTitle->GetMenu ());
fMenuTitle->GetMenu ()->UnRealize ();
if (fWidget != Nil) {
::XtDestroyWidget (fWidget);
fWidget = Nil;
}
}
osWidget* CascadeMenuItem_MotifUI_Native::GetWidget () const
{
return (fWidget);
}
void CascadeMenuItem_MotifUI_Native::UpdateOSRep_ ()
{
RequireNotNil (fWidget);
MenuItem::UpdateOSRep_ ();
char tmp[1000];
GetName ().ToCStringTrunc (tmp, sizeof (tmp));
Arg args [1];
XmString mStrTmp = ::XmStringCreate (tmp, XmSTRING_DEFAULT_CHARSET);
XtSetArg (args[0], XmNlabelString, mStrTmp);
::XtSetValues (fWidget, args, 1);
::XmStringFree (mStrTmp);
}
#endif /*Toolkit*/
/*
********************************************************************************
******************************** CascadeMenuItem *******************************
********************************************************************************
*/
CascadeMenuItem::CascadeMenuItem (Menu* cascadeMenu):
#if qMacToolkit
CascadeMenuItem_MacUI_Native (cascadeMenu)
#elif qXmToolkit
CascadeMenuItem_MotifUI_Native (cascadeMenu)
#endif
{
}
/*
********************************************************************************
******************************** CascadeMenuTitle ******************************
********************************************************************************
*/
CascadeMenuTitle::CascadeMenuTitle (Menu* menu):
AbstractPullDownMenuTitle (kEmptyString, menu, Nil)
{
RequireNotNil (menu);
Assert (menu->GetParentView () == this); // by now base class MenuTitle:: should have called SetMenu (menu)...
InstallMenu ();
}
CascadeMenuTitle::~CascadeMenuTitle ()
{
#if qMacToolkit
::DeleteMenu ((*GetMenu ()->GetOSRepresentation ())->menuID);
#endif
DeinstallMenu ();
#if qMacToolkit
MenuBar_MacUI_Native::sCascadeMenus.Remove (this);
#endif
}
Boolean CascadeMenuTitle::DoMenuSelection_ (const Point& startPt, MenuItem*& selected)
{
AssertNotReached ();
}
// For gnuemacs:
// Local Variables: ***
// mode:C++ ***
// tab-width:4 ***
// End: ***
| [
"[email protected]"
] | |
503dad65f1fbf1cbbe523ec0a8d6c48799a02309 | 3520e17080e793d3535442bf42d119ec975ab36f | /Applications/PaintBrush/SprayTool.cpp | 0ec2cd6bc3d68981324d032fc23a7526c5bc3af4 | [
"BSD-2-Clause"
] | permissive | F0xedb/serenity | 034f8b63dc36105d44a18d8f841a73d4ec920f88 | 5fb40b3ae53d83f0b718e2cc14dfc893d8a04c15 | refs/heads/master | 2020-07-10T13:30:28.022266 | 2019-09-13T12:12:59 | 2019-09-13T12:12:59 | 204,272,709 | 0 | 0 | BSD-2-Clause | 2019-10-09T17:50:50 | 2019-08-25T09:24:16 | C++ | UTF-8 | C++ | false | false | 2,416 | cpp | #include "SprayTool.h"
#include "PaintableWidget.h"
#include <AK/Queue.h>
#include <AK/SinglyLinkedList.h>
#include <LibGUI/GPainter.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GMenu.h>
#include <LibDraw/GraphicsBitmap.h>
#include <stdio.h>
#include <LibM/math.h>
SprayTool::SprayTool()
{
m_timer.on_timeout = [=]() {
paint_it();
};
m_timer.set_interval(200);
}
SprayTool::~SprayTool()
{
}
static double nrand()
{
return double(rand()) / double(RAND_MAX);
}
void SprayTool::paint_it()
{
GPainter painter(m_widget->bitmap());
auto& bitmap = m_widget->bitmap();
ASSERT(bitmap.bpp() == 32);
m_widget->update();
const double minimal_radius = 10;
const double base_radius = minimal_radius * m_thickness;
for (int i = 0; i < 100 + (nrand() * 800); i++) {
double radius = base_radius * nrand();
double angle = 2 * M_PI * nrand();
const int xpos = m_last_pos.x() + radius * cos(angle);
const int ypos = m_last_pos.y() - radius * sin(angle);
if (xpos < 0 || xpos >= bitmap.width())
continue;
if (ypos < 0 || ypos >= bitmap.height())
continue;
bitmap.set_pixel<GraphicsBitmap::Format::RGB32>(xpos, ypos, m_color);
}
}
void SprayTool::on_mousedown(GMouseEvent& event)
{
if (!m_widget->rect().contains(event.position()))
return;
m_color = m_widget->color_for(event);
m_last_pos = event.position();
m_timer.start();
paint_it();
}
void SprayTool::on_mousemove(GMouseEvent& event)
{
m_last_pos = event.position();
if (m_timer.is_active()) {
paint_it();
m_timer.restart(m_timer.interval());
}
}
void SprayTool::on_mouseup(GMouseEvent&)
{
m_timer.stop();
}
void SprayTool::on_contextmenu(GContextMenuEvent& event)
{
if (!m_context_menu) {
m_context_menu = make<GMenu>("SprayTool Context Menu");
m_context_menu->add_action(GAction::create("1", [this](auto&) {
m_thickness = 1;
}));
m_context_menu->add_action(GAction::create("2", [this](auto&) {
m_thickness = 2;
}));
m_context_menu->add_action(GAction::create("3", [this](auto&) {
m_thickness = 3;
}));
m_context_menu->add_action(GAction::create("4", [this](auto&) {
m_thickness = 4;
}));
}
m_context_menu->popup(event.screen_position());
}
| [
"[email protected]"
] | |
f2e207cff48effa7205dcb98d4a61d86d3156fef | 4fbe5144bafa402846e012a34204325488b91808 | /leetcode48_rotateImage.cpp | b274af0a4c1188bb9cb38a4ad9288fd2ba10a0c2 | [] | no_license | zhengxuLee/leetcode | 283b2f74424e04ba3f4d37030e3d6b4e64a296e7 | e24fe3454dc7de0ae102f2c392159057c23617ed | refs/heads/master | 2022-08-07T04:46:29.398751 | 2020-05-22T10:36:27 | 2020-05-22T10:36:27 | 265,794,117 | 0 | 0 | null | 2020-05-22T10:36:28 | 2020-05-21T08:22:15 | C++ | UTF-8 | C++ | false | false | 952 | cpp | #include "include.h"
/*
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Note:
You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
Example 1:
Given input matrix =
[
[1,2,3],
[4,5,6],
[7,8,9]
],
rotate the input matrix in-place such that it becomes:
[
[7,4,1],
[8,5,2],
[9,6,3]
]
Example 2:
Given input matrix =
[
[ 5, 1, 9,11],
[ 2, 4, 8,10],
[13, 3, 6, 7],
[15,14,12,16]
],
rotate the input matrix in-place such that it becomes:
[
[15,13, 2, 5],
[14, 3, 4, 1],
[12, 6, 8, 9],
[16, 7,10,11]
]
*/
void rotate(vector<vector<int>>& matrix)
{
if (matrix.empty())return;
int size = matrix.size();
for (int i = 0; i < size; ++i)
{
for (int j = 0; j < i; ++j)
{
swap(matrix[i][j], matrix[j][i]);
}
}
for (int k = 0; k < size; ++k)
{
reverse(matrix[k].begin(), matrix[k].end());
}
} | [
"[email protected]"
] | |
53c5b1d97ef796af57fda2a1a41972510acef222 | c776476e9d06b3779d744641e758ac3a2c15cddc | /examples/litmus/c/run-scripts/tmp_1/Z6.4+poonceonce+poreleaseacquire+fencembonceonce.c.cbmc_out.cpp | e556367be545f426e9adaecb22c6c34b5bf73cd6 | [] | no_license | ashutosh0gupta/llvm_bmc | aaac7961c723ba6f7ffd77a39559e0e52432eade | 0287c4fb180244e6b3c599a9902507f05c8a7234 | refs/heads/master | 2023-08-02T17:14:06.178723 | 2023-07-31T10:46:53 | 2023-07-31T10:46:53 | 143,100,825 | 3 | 4 | null | 2023-05-25T05:50:55 | 2018-08-01T03:47:00 | C++ | UTF-8 | C++ | false | false | 40,907 | cpp | // 0:vars:3
// 3:atom_1_X1_0:1
// 4:atom_2_X1_0:1
// 5:thr0:1
// 6:thr1:1
// 7:thr2:1
#define ADDRSIZE 8
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) {
char ret = __get_rng();
ASSUME(ret >= from && ret <= to);
return ret;
}
char get_rng_th( char from, char to ) {
char ret = __get_rng();
ASSUME(ret >= from && ret <= to);
return ret;
}
int main(int argc, char **argv) {
// declare arrays for intial value version in contexts
int meminit_[ADDRSIZE*NCONTEXT];
#define meminit(x,k) meminit_[(x)*NCONTEXT+k]
int coinit_[ADDRSIZE*NCONTEXT];
#define coinit(x,k) coinit_[(x)*NCONTEXT+k]
int deltainit_[ADDRSIZE*NCONTEXT];
#define deltainit(x,k) deltainit_[(x)*NCONTEXT+k]
// declare arrays for running value version in contexts
int mem_[ADDRSIZE*NCONTEXT];
#define mem(x,k) mem_[(x)*NCONTEXT+k]
int co_[ADDRSIZE*NCONTEXT];
#define co(x,k) co_[(x)*NCONTEXT+k]
int delta_[ADDRSIZE*NCONTEXT];
#define delta(x,k) delta_[(x)*NCONTEXT+k]
// declare arrays for local buffer and observed writes
int buff_[NPROC*ADDRSIZE];
#define buff(x,k) buff_[(x)*ADDRSIZE+k]
int pw_[NPROC*ADDRSIZE];
#define pw(x,k) pw_[(x)*ADDRSIZE+k]
// declare arrays for context stamps
char cr_[NPROC*ADDRSIZE];
#define cr(x,k) cr_[(x)*ADDRSIZE+k]
char iw_[NPROC*ADDRSIZE];
#define iw(x,k) iw_[(x)*ADDRSIZE+k]
char cw_[NPROC*ADDRSIZE];
#define cw(x,k) cw_[(x)*ADDRSIZE+k]
char cx_[NPROC*ADDRSIZE];
#define cx(x,k) cx_[(x)*ADDRSIZE+k]
char is_[NPROC*ADDRSIZE];
#define is(x,k) is_[(x)*ADDRSIZE+k]
char cs_[NPROC*ADDRSIZE];
#define cs(x,k) cs_[(x)*ADDRSIZE+k]
char crmax_[NPROC*ADDRSIZE];
#define crmax(x,k) crmax_[(x)*ADDRSIZE+k]
char sforbid_[ADDRSIZE*NCONTEXT];
#define sforbid(x,k) sforbid_[(x)*NCONTEXT+k]
// declare arrays for synchronizations
int cl[NPROC];
int cdy[NPROC];
int cds[NPROC];
int cdl[NPROC];
int cisb[NPROC];
int caddr[NPROC];
int cctrl[NPROC];
int cstart[NPROC];
int creturn[NPROC];
// declare arrays for contexts activity
int active[NCONTEXT];
int ctx_used[NCONTEXT];
int r0= 0;
char creg_r0;
int r1= 0;
char creg_r1;
int r2= 0;
char creg_r2;
int r3= 0;
char creg_r3;
int r4= 0;
char creg_r4;
int r5= 0;
char creg_r5;
int r6= 0;
char creg_r6;
int r7= 0;
char creg_r7;
int r8= 0;
char creg_r8;
int r9= 0;
char creg_r9;
int r10= 0;
char creg_r10;
int r11= 0;
char creg_r11;
char old_cctrl= 0;
char old_cr= 0;
char old_cdy= 0;
char old_cw= 0;
char new_creg= 0;
buff(0,0) = 0;
pw(0,0) = 0;
cr(0,0) = 0;
iw(0,0) = 0;
cw(0,0) = 0;
cx(0,0) = 0;
is(0,0) = 0;
cs(0,0) = 0;
crmax(0,0) = 0;
buff(0,1) = 0;
pw(0,1) = 0;
cr(0,1) = 0;
iw(0,1) = 0;
cw(0,1) = 0;
cx(0,1) = 0;
is(0,1) = 0;
cs(0,1) = 0;
crmax(0,1) = 0;
buff(0,2) = 0;
pw(0,2) = 0;
cr(0,2) = 0;
iw(0,2) = 0;
cw(0,2) = 0;
cx(0,2) = 0;
is(0,2) = 0;
cs(0,2) = 0;
crmax(0,2) = 0;
buff(0,3) = 0;
pw(0,3) = 0;
cr(0,3) = 0;
iw(0,3) = 0;
cw(0,3) = 0;
cx(0,3) = 0;
is(0,3) = 0;
cs(0,3) = 0;
crmax(0,3) = 0;
buff(0,4) = 0;
pw(0,4) = 0;
cr(0,4) = 0;
iw(0,4) = 0;
cw(0,4) = 0;
cx(0,4) = 0;
is(0,4) = 0;
cs(0,4) = 0;
crmax(0,4) = 0;
buff(0,5) = 0;
pw(0,5) = 0;
cr(0,5) = 0;
iw(0,5) = 0;
cw(0,5) = 0;
cx(0,5) = 0;
is(0,5) = 0;
cs(0,5) = 0;
crmax(0,5) = 0;
buff(0,6) = 0;
pw(0,6) = 0;
cr(0,6) = 0;
iw(0,6) = 0;
cw(0,6) = 0;
cx(0,6) = 0;
is(0,6) = 0;
cs(0,6) = 0;
crmax(0,6) = 0;
buff(0,7) = 0;
pw(0,7) = 0;
cr(0,7) = 0;
iw(0,7) = 0;
cw(0,7) = 0;
cx(0,7) = 0;
is(0,7) = 0;
cs(0,7) = 0;
crmax(0,7) = 0;
cl[0] = 0;
cdy[0] = 0;
cds[0] = 0;
cdl[0] = 0;
cisb[0] = 0;
caddr[0] = 0;
cctrl[0] = 0;
cstart[0] = get_rng(0,NCONTEXT-1);
creturn[0] = get_rng(0,NCONTEXT-1);
buff(1,0) = 0;
pw(1,0) = 0;
cr(1,0) = 0;
iw(1,0) = 0;
cw(1,0) = 0;
cx(1,0) = 0;
is(1,0) = 0;
cs(1,0) = 0;
crmax(1,0) = 0;
buff(1,1) = 0;
pw(1,1) = 0;
cr(1,1) = 0;
iw(1,1) = 0;
cw(1,1) = 0;
cx(1,1) = 0;
is(1,1) = 0;
cs(1,1) = 0;
crmax(1,1) = 0;
buff(1,2) = 0;
pw(1,2) = 0;
cr(1,2) = 0;
iw(1,2) = 0;
cw(1,2) = 0;
cx(1,2) = 0;
is(1,2) = 0;
cs(1,2) = 0;
crmax(1,2) = 0;
buff(1,3) = 0;
pw(1,3) = 0;
cr(1,3) = 0;
iw(1,3) = 0;
cw(1,3) = 0;
cx(1,3) = 0;
is(1,3) = 0;
cs(1,3) = 0;
crmax(1,3) = 0;
buff(1,4) = 0;
pw(1,4) = 0;
cr(1,4) = 0;
iw(1,4) = 0;
cw(1,4) = 0;
cx(1,4) = 0;
is(1,4) = 0;
cs(1,4) = 0;
crmax(1,4) = 0;
buff(1,5) = 0;
pw(1,5) = 0;
cr(1,5) = 0;
iw(1,5) = 0;
cw(1,5) = 0;
cx(1,5) = 0;
is(1,5) = 0;
cs(1,5) = 0;
crmax(1,5) = 0;
buff(1,6) = 0;
pw(1,6) = 0;
cr(1,6) = 0;
iw(1,6) = 0;
cw(1,6) = 0;
cx(1,6) = 0;
is(1,6) = 0;
cs(1,6) = 0;
crmax(1,6) = 0;
buff(1,7) = 0;
pw(1,7) = 0;
cr(1,7) = 0;
iw(1,7) = 0;
cw(1,7) = 0;
cx(1,7) = 0;
is(1,7) = 0;
cs(1,7) = 0;
crmax(1,7) = 0;
cl[1] = 0;
cdy[1] = 0;
cds[1] = 0;
cdl[1] = 0;
cisb[1] = 0;
caddr[1] = 0;
cctrl[1] = 0;
cstart[1] = get_rng(0,NCONTEXT-1);
creturn[1] = get_rng(0,NCONTEXT-1);
buff(2,0) = 0;
pw(2,0) = 0;
cr(2,0) = 0;
iw(2,0) = 0;
cw(2,0) = 0;
cx(2,0) = 0;
is(2,0) = 0;
cs(2,0) = 0;
crmax(2,0) = 0;
buff(2,1) = 0;
pw(2,1) = 0;
cr(2,1) = 0;
iw(2,1) = 0;
cw(2,1) = 0;
cx(2,1) = 0;
is(2,1) = 0;
cs(2,1) = 0;
crmax(2,1) = 0;
buff(2,2) = 0;
pw(2,2) = 0;
cr(2,2) = 0;
iw(2,2) = 0;
cw(2,2) = 0;
cx(2,2) = 0;
is(2,2) = 0;
cs(2,2) = 0;
crmax(2,2) = 0;
buff(2,3) = 0;
pw(2,3) = 0;
cr(2,3) = 0;
iw(2,3) = 0;
cw(2,3) = 0;
cx(2,3) = 0;
is(2,3) = 0;
cs(2,3) = 0;
crmax(2,3) = 0;
buff(2,4) = 0;
pw(2,4) = 0;
cr(2,4) = 0;
iw(2,4) = 0;
cw(2,4) = 0;
cx(2,4) = 0;
is(2,4) = 0;
cs(2,4) = 0;
crmax(2,4) = 0;
buff(2,5) = 0;
pw(2,5) = 0;
cr(2,5) = 0;
iw(2,5) = 0;
cw(2,5) = 0;
cx(2,5) = 0;
is(2,5) = 0;
cs(2,5) = 0;
crmax(2,5) = 0;
buff(2,6) = 0;
pw(2,6) = 0;
cr(2,6) = 0;
iw(2,6) = 0;
cw(2,6) = 0;
cx(2,6) = 0;
is(2,6) = 0;
cs(2,6) = 0;
crmax(2,6) = 0;
buff(2,7) = 0;
pw(2,7) = 0;
cr(2,7) = 0;
iw(2,7) = 0;
cw(2,7) = 0;
cx(2,7) = 0;
is(2,7) = 0;
cs(2,7) = 0;
crmax(2,7) = 0;
cl[2] = 0;
cdy[2] = 0;
cds[2] = 0;
cdl[2] = 0;
cisb[2] = 0;
caddr[2] = 0;
cctrl[2] = 0;
cstart[2] = get_rng(0,NCONTEXT-1);
creturn[2] = get_rng(0,NCONTEXT-1);
buff(3,0) = 0;
pw(3,0) = 0;
cr(3,0) = 0;
iw(3,0) = 0;
cw(3,0) = 0;
cx(3,0) = 0;
is(3,0) = 0;
cs(3,0) = 0;
crmax(3,0) = 0;
buff(3,1) = 0;
pw(3,1) = 0;
cr(3,1) = 0;
iw(3,1) = 0;
cw(3,1) = 0;
cx(3,1) = 0;
is(3,1) = 0;
cs(3,1) = 0;
crmax(3,1) = 0;
buff(3,2) = 0;
pw(3,2) = 0;
cr(3,2) = 0;
iw(3,2) = 0;
cw(3,2) = 0;
cx(3,2) = 0;
is(3,2) = 0;
cs(3,2) = 0;
crmax(3,2) = 0;
buff(3,3) = 0;
pw(3,3) = 0;
cr(3,3) = 0;
iw(3,3) = 0;
cw(3,3) = 0;
cx(3,3) = 0;
is(3,3) = 0;
cs(3,3) = 0;
crmax(3,3) = 0;
buff(3,4) = 0;
pw(3,4) = 0;
cr(3,4) = 0;
iw(3,4) = 0;
cw(3,4) = 0;
cx(3,4) = 0;
is(3,4) = 0;
cs(3,4) = 0;
crmax(3,4) = 0;
buff(3,5) = 0;
pw(3,5) = 0;
cr(3,5) = 0;
iw(3,5) = 0;
cw(3,5) = 0;
cx(3,5) = 0;
is(3,5) = 0;
cs(3,5) = 0;
crmax(3,5) = 0;
buff(3,6) = 0;
pw(3,6) = 0;
cr(3,6) = 0;
iw(3,6) = 0;
cw(3,6) = 0;
cx(3,6) = 0;
is(3,6) = 0;
cs(3,6) = 0;
crmax(3,6) = 0;
buff(3,7) = 0;
pw(3,7) = 0;
cr(3,7) = 0;
iw(3,7) = 0;
cw(3,7) = 0;
cx(3,7) = 0;
is(3,7) = 0;
cs(3,7) = 0;
crmax(3,7) = 0;
cl[3] = 0;
cdy[3] = 0;
cds[3] = 0;
cdl[3] = 0;
cisb[3] = 0;
caddr[3] = 0;
cctrl[3] = 0;
cstart[3] = get_rng(0,NCONTEXT-1);
creturn[3] = get_rng(0,NCONTEXT-1);
// Dumping initializations
mem(0+0,0) = 0;
mem(0+1,0) = 0;
mem(0+2,0) = 0;
mem(3+0,0) = 0;
mem(4+0,0) = 0;
mem(5+0,0) = 0;
mem(6+0,0) = 0;
mem(7+0,0) = 0;
// Dumping context matching equalities
co(0,0) = 0;
delta(0,0) = -1;
co(1,0) = 0;
delta(1,0) = -1;
co(2,0) = 0;
delta(2,0) = -1;
co(3,0) = 0;
delta(3,0) = -1;
co(4,0) = 0;
delta(4,0) = -1;
co(5,0) = 0;
delta(5,0) = -1;
co(6,0) = 0;
delta(6,0) = -1;
co(7,0) = 0;
delta(7,0) = -1;
// Dumping thread 1
int ret_thread_1 = 0;
cdy[1] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[1] >= cstart[1]);
T1BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !35, metadata !DIExpression()), !dbg !44
// br label %label_1, !dbg !45
goto T1BLOCK1;
T1BLOCK1:
// call void @llvm.dbg.label(metadata !43), !dbg !46
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 1), metadata !36, metadata !DIExpression()), !dbg !47
// call void @llvm.dbg.value(metadata i64 1, metadata !39, metadata !DIExpression()), !dbg !47
// store atomic i64 1, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !48
// ST: Guess
iw(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW
old_cw = cw(1,0+1*1);
cw(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM
// Check
ASSUME(active[iw(1,0+1*1)] == 1);
ASSUME(active[cw(1,0+1*1)] == 1);
ASSUME(sforbid(0+1*1,cw(1,0+1*1))== 0);
ASSUME(iw(1,0+1*1) >= 0);
ASSUME(iw(1,0+1*1) >= 0);
ASSUME(cw(1,0+1*1) >= iw(1,0+1*1));
ASSUME(cw(1,0+1*1) >= old_cw);
ASSUME(cw(1,0+1*1) >= cr(1,0+1*1));
ASSUME(cw(1,0+1*1) >= cl[1]);
ASSUME(cw(1,0+1*1) >= cisb[1]);
ASSUME(cw(1,0+1*1) >= cdy[1]);
ASSUME(cw(1,0+1*1) >= cdl[1]);
ASSUME(cw(1,0+1*1) >= cds[1]);
ASSUME(cw(1,0+1*1) >= cctrl[1]);
ASSUME(cw(1,0+1*1) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,0+1*1) = 1;
mem(0+1*1,cw(1,0+1*1)) = 1;
co(0+1*1,cw(1,0+1*1))+=1;
delta(0+1*1,cw(1,0+1*1)) = -1;
ASSUME(creturn[1] >= cw(1,0+1*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0), metadata !40, metadata !DIExpression()), !dbg !49
// call void @llvm.dbg.value(metadata i64 1, metadata !42, metadata !DIExpression()), !dbg !49
// store atomic i64 1, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !50
// ST: Guess
iw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW
old_cw = cw(1,0);
cw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM
// Check
ASSUME(active[iw(1,0)] == 1);
ASSUME(active[cw(1,0)] == 1);
ASSUME(sforbid(0,cw(1,0))== 0);
ASSUME(iw(1,0) >= 0);
ASSUME(iw(1,0) >= 0);
ASSUME(cw(1,0) >= iw(1,0));
ASSUME(cw(1,0) >= old_cw);
ASSUME(cw(1,0) >= cr(1,0));
ASSUME(cw(1,0) >= cl[1]);
ASSUME(cw(1,0) >= cisb[1]);
ASSUME(cw(1,0) >= cdy[1]);
ASSUME(cw(1,0) >= cdl[1]);
ASSUME(cw(1,0) >= cds[1]);
ASSUME(cw(1,0) >= cctrl[1]);
ASSUME(cw(1,0) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,0) = 1;
mem(0,cw(1,0)) = 1;
co(0,cw(1,0))+=1;
delta(0,cw(1,0)) = -1;
ASSUME(creturn[1] >= cw(1,0));
// ret i8* null, !dbg !51
ret_thread_1 = (- 1);
// Dumping thread 2
int ret_thread_2 = 0;
cdy[2] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[2] >= cstart[2]);
T2BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !54, metadata !DIExpression()), !dbg !68
// br label %label_2, !dbg !51
goto T2BLOCK1;
T2BLOCK1:
// call void @llvm.dbg.label(metadata !67), !dbg !70
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0), metadata !55, metadata !DIExpression()), !dbg !71
// call void @llvm.dbg.value(metadata i64 2, metadata !57, metadata !DIExpression()), !dbg !71
// store atomic i64 2, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0) release, align 8, !dbg !54
// ST: Guess
// : Release
iw(2,0) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW
old_cw = cw(2,0);
cw(2,0) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM
// Check
ASSUME(active[iw(2,0)] == 2);
ASSUME(active[cw(2,0)] == 2);
ASSUME(sforbid(0,cw(2,0))== 0);
ASSUME(iw(2,0) >= 0);
ASSUME(iw(2,0) >= 0);
ASSUME(cw(2,0) >= iw(2,0));
ASSUME(cw(2,0) >= old_cw);
ASSUME(cw(2,0) >= cr(2,0));
ASSUME(cw(2,0) >= cl[2]);
ASSUME(cw(2,0) >= cisb[2]);
ASSUME(cw(2,0) >= cdy[2]);
ASSUME(cw(2,0) >= cdl[2]);
ASSUME(cw(2,0) >= cds[2]);
ASSUME(cw(2,0) >= cctrl[2]);
ASSUME(cw(2,0) >= caddr[2]);
ASSUME(cw(2,0) >= cr(2,0+0));
ASSUME(cw(2,0) >= cr(2,0+1));
ASSUME(cw(2,0) >= cr(2,0+2));
ASSUME(cw(2,0) >= cr(2,3+0));
ASSUME(cw(2,0) >= cr(2,4+0));
ASSUME(cw(2,0) >= cr(2,5+0));
ASSUME(cw(2,0) >= cr(2,6+0));
ASSUME(cw(2,0) >= cr(2,7+0));
ASSUME(cw(2,0) >= cw(2,0+0));
ASSUME(cw(2,0) >= cw(2,0+1));
ASSUME(cw(2,0) >= cw(2,0+2));
ASSUME(cw(2,0) >= cw(2,3+0));
ASSUME(cw(2,0) >= cw(2,4+0));
ASSUME(cw(2,0) >= cw(2,5+0));
ASSUME(cw(2,0) >= cw(2,6+0));
ASSUME(cw(2,0) >= cw(2,7+0));
// Update
caddr[2] = max(caddr[2],0);
buff(2,0) = 2;
mem(0,cw(2,0)) = 2;
co(0,cw(2,0))+=1;
delta(0,cw(2,0)) = -1;
is(2,0) = iw(2,0);
cs(2,0) = cw(2,0);
ASSUME(creturn[2] >= cw(2,0));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 2), metadata !60, metadata !DIExpression()), !dbg !73
// %0 = load atomic i64, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 2) acquire, align 8, !dbg !56
// LD: Guess
// : Acquire
old_cr = cr(2,0+2*1);
cr(2,0+2*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM
// Check
ASSUME(active[cr(2,0+2*1)] == 2);
ASSUME(cr(2,0+2*1) >= iw(2,0+2*1));
ASSUME(cr(2,0+2*1) >= 0);
ASSUME(cr(2,0+2*1) >= cdy[2]);
ASSUME(cr(2,0+2*1) >= cisb[2]);
ASSUME(cr(2,0+2*1) >= cdl[2]);
ASSUME(cr(2,0+2*1) >= cl[2]);
ASSUME(cr(2,0+2*1) >= cx(2,0+2*1));
ASSUME(cr(2,0+2*1) >= cs(2,0+0));
ASSUME(cr(2,0+2*1) >= cs(2,0+1));
ASSUME(cr(2,0+2*1) >= cs(2,0+2));
ASSUME(cr(2,0+2*1) >= cs(2,3+0));
ASSUME(cr(2,0+2*1) >= cs(2,4+0));
ASSUME(cr(2,0+2*1) >= cs(2,5+0));
ASSUME(cr(2,0+2*1) >= cs(2,6+0));
ASSUME(cr(2,0+2*1) >= cs(2,7+0));
// Update
creg_r0 = cr(2,0+2*1);
crmax(2,0+2*1) = max(crmax(2,0+2*1),cr(2,0+2*1));
caddr[2] = max(caddr[2],0);
if(cr(2,0+2*1) < cw(2,0+2*1)) {
r0 = buff(2,0+2*1);
} else {
if(pw(2,0+2*1) != co(0+2*1,cr(2,0+2*1))) {
ASSUME(cr(2,0+2*1) >= old_cr);
}
pw(2,0+2*1) = co(0+2*1,cr(2,0+2*1));
r0 = mem(0+2*1,cr(2,0+2*1));
}
cl[2] = max(cl[2],cr(2,0+2*1));
ASSUME(creturn[2] >= cr(2,0+2*1));
// call void @llvm.dbg.value(metadata i64 %0, metadata !62, metadata !DIExpression()), !dbg !73
// %conv = trunc i64 %0 to i32, !dbg !57
// call void @llvm.dbg.value(metadata i32 %conv, metadata !58, metadata !DIExpression()), !dbg !68
// %cmp = icmp eq i32 %conv, 0, !dbg !58
// %conv1 = zext i1 %cmp to i32, !dbg !58
// call void @llvm.dbg.value(metadata i32 %conv1, metadata !63, metadata !DIExpression()), !dbg !68
// call void @llvm.dbg.value(metadata i64* @atom_1_X1_0, metadata !64, metadata !DIExpression()), !dbg !77
// %1 = zext i32 %conv1 to i64
// call void @llvm.dbg.value(metadata i64 %1, metadata !66, metadata !DIExpression()), !dbg !77
// store atomic i64 %1, i64* @atom_1_X1_0 seq_cst, align 8, !dbg !60
// ST: Guess
iw(2,3) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW
old_cw = cw(2,3);
cw(2,3) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM
// Check
ASSUME(active[iw(2,3)] == 2);
ASSUME(active[cw(2,3)] == 2);
ASSUME(sforbid(3,cw(2,3))== 0);
ASSUME(iw(2,3) >= max(creg_r0,0));
ASSUME(iw(2,3) >= 0);
ASSUME(cw(2,3) >= iw(2,3));
ASSUME(cw(2,3) >= old_cw);
ASSUME(cw(2,3) >= cr(2,3));
ASSUME(cw(2,3) >= cl[2]);
ASSUME(cw(2,3) >= cisb[2]);
ASSUME(cw(2,3) >= cdy[2]);
ASSUME(cw(2,3) >= cdl[2]);
ASSUME(cw(2,3) >= cds[2]);
ASSUME(cw(2,3) >= cctrl[2]);
ASSUME(cw(2,3) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,3) = (r0==0);
mem(3,cw(2,3)) = (r0==0);
co(3,cw(2,3))+=1;
delta(3,cw(2,3)) = -1;
ASSUME(creturn[2] >= cw(2,3));
// ret i8* null, !dbg !61
ret_thread_2 = (- 1);
// Dumping thread 3
int ret_thread_3 = 0;
cdy[3] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[3] >= cstart[3]);
T3BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !82, metadata !DIExpression()), !dbg !95
// br label %label_3, !dbg !51
goto T3BLOCK1;
T3BLOCK1:
// call void @llvm.dbg.label(metadata !94), !dbg !97
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 2), metadata !83, metadata !DIExpression()), !dbg !98
// call void @llvm.dbg.value(metadata i64 1, metadata !85, metadata !DIExpression()), !dbg !98
// store atomic i64 1, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 2) monotonic, align 8, !dbg !54
// ST: Guess
iw(3,0+2*1) = get_rng(0,NCONTEXT-1);// 3 ASSIGN STIW
old_cw = cw(3,0+2*1);
cw(3,0+2*1) = get_rng(0,NCONTEXT-1);// 3 ASSIGN STCOM
// Check
ASSUME(active[iw(3,0+2*1)] == 3);
ASSUME(active[cw(3,0+2*1)] == 3);
ASSUME(sforbid(0+2*1,cw(3,0+2*1))== 0);
ASSUME(iw(3,0+2*1) >= 0);
ASSUME(iw(3,0+2*1) >= 0);
ASSUME(cw(3,0+2*1) >= iw(3,0+2*1));
ASSUME(cw(3,0+2*1) >= old_cw);
ASSUME(cw(3,0+2*1) >= cr(3,0+2*1));
ASSUME(cw(3,0+2*1) >= cl[3]);
ASSUME(cw(3,0+2*1) >= cisb[3]);
ASSUME(cw(3,0+2*1) >= cdy[3]);
ASSUME(cw(3,0+2*1) >= cdl[3]);
ASSUME(cw(3,0+2*1) >= cds[3]);
ASSUME(cw(3,0+2*1) >= cctrl[3]);
ASSUME(cw(3,0+2*1) >= caddr[3]);
// Update
caddr[3] = max(caddr[3],0);
buff(3,0+2*1) = 1;
mem(0+2*1,cw(3,0+2*1)) = 1;
co(0+2*1,cw(3,0+2*1))+=1;
delta(0+2*1,cw(3,0+2*1)) = -1;
ASSUME(creturn[3] >= cw(3,0+2*1));
// call void (...) @dmbsy(), !dbg !55
// dumbsy: Guess
old_cdy = cdy[3];
cdy[3] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[3] >= old_cdy);
ASSUME(cdy[3] >= cisb[3]);
ASSUME(cdy[3] >= cdl[3]);
ASSUME(cdy[3] >= cds[3]);
ASSUME(cdy[3] >= cctrl[3]);
ASSUME(cdy[3] >= cw(3,0+0));
ASSUME(cdy[3] >= cw(3,0+1));
ASSUME(cdy[3] >= cw(3,0+2));
ASSUME(cdy[3] >= cw(3,3+0));
ASSUME(cdy[3] >= cw(3,4+0));
ASSUME(cdy[3] >= cw(3,5+0));
ASSUME(cdy[3] >= cw(3,6+0));
ASSUME(cdy[3] >= cw(3,7+0));
ASSUME(cdy[3] >= cr(3,0+0));
ASSUME(cdy[3] >= cr(3,0+1));
ASSUME(cdy[3] >= cr(3,0+2));
ASSUME(cdy[3] >= cr(3,3+0));
ASSUME(cdy[3] >= cr(3,4+0));
ASSUME(cdy[3] >= cr(3,5+0));
ASSUME(cdy[3] >= cr(3,6+0));
ASSUME(cdy[3] >= cr(3,7+0));
ASSUME(creturn[3] >= cdy[3]);
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 1), metadata !87, metadata !DIExpression()), !dbg !101
// %0 = load atomic i64, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !57
// LD: Guess
old_cr = cr(3,0+1*1);
cr(3,0+1*1) = get_rng(0,NCONTEXT-1);// 3 ASSIGN LDCOM
// Check
ASSUME(active[cr(3,0+1*1)] == 3);
ASSUME(cr(3,0+1*1) >= iw(3,0+1*1));
ASSUME(cr(3,0+1*1) >= 0);
ASSUME(cr(3,0+1*1) >= cdy[3]);
ASSUME(cr(3,0+1*1) >= cisb[3]);
ASSUME(cr(3,0+1*1) >= cdl[3]);
ASSUME(cr(3,0+1*1) >= cl[3]);
// Update
creg_r1 = cr(3,0+1*1);
crmax(3,0+1*1) = max(crmax(3,0+1*1),cr(3,0+1*1));
caddr[3] = max(caddr[3],0);
if(cr(3,0+1*1) < cw(3,0+1*1)) {
r1 = buff(3,0+1*1);
} else {
if(pw(3,0+1*1) != co(0+1*1,cr(3,0+1*1))) {
ASSUME(cr(3,0+1*1) >= old_cr);
}
pw(3,0+1*1) = co(0+1*1,cr(3,0+1*1));
r1 = mem(0+1*1,cr(3,0+1*1));
}
ASSUME(creturn[3] >= cr(3,0+1*1));
// call void @llvm.dbg.value(metadata i64 %0, metadata !89, metadata !DIExpression()), !dbg !101
// %conv = trunc i64 %0 to i32, !dbg !58
// call void @llvm.dbg.value(metadata i32 %conv, metadata !86, metadata !DIExpression()), !dbg !95
// %cmp = icmp eq i32 %conv, 0, !dbg !59
// %conv1 = zext i1 %cmp to i32, !dbg !59
// call void @llvm.dbg.value(metadata i32 %conv1, metadata !90, metadata !DIExpression()), !dbg !95
// call void @llvm.dbg.value(metadata i64* @atom_2_X1_0, metadata !91, metadata !DIExpression()), !dbg !105
// %1 = zext i32 %conv1 to i64
// call void @llvm.dbg.value(metadata i64 %1, metadata !93, metadata !DIExpression()), !dbg !105
// store atomic i64 %1, i64* @atom_2_X1_0 seq_cst, align 8, !dbg !61
// ST: Guess
iw(3,4) = get_rng(0,NCONTEXT-1);// 3 ASSIGN STIW
old_cw = cw(3,4);
cw(3,4) = get_rng(0,NCONTEXT-1);// 3 ASSIGN STCOM
// Check
ASSUME(active[iw(3,4)] == 3);
ASSUME(active[cw(3,4)] == 3);
ASSUME(sforbid(4,cw(3,4))== 0);
ASSUME(iw(3,4) >= max(creg_r1,0));
ASSUME(iw(3,4) >= 0);
ASSUME(cw(3,4) >= iw(3,4));
ASSUME(cw(3,4) >= old_cw);
ASSUME(cw(3,4) >= cr(3,4));
ASSUME(cw(3,4) >= cl[3]);
ASSUME(cw(3,4) >= cisb[3]);
ASSUME(cw(3,4) >= cdy[3]);
ASSUME(cw(3,4) >= cdl[3]);
ASSUME(cw(3,4) >= cds[3]);
ASSUME(cw(3,4) >= cctrl[3]);
ASSUME(cw(3,4) >= caddr[3]);
// Update
caddr[3] = max(caddr[3],0);
buff(3,4) = (r1==0);
mem(4,cw(3,4)) = (r1==0);
co(4,cw(3,4))+=1;
delta(4,cw(3,4)) = -1;
ASSUME(creturn[3] >= cw(3,4));
// ret i8* null, !dbg !62
ret_thread_3 = (- 1);
// Dumping thread 0
int ret_thread_0 = 0;
cdy[0] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[0] >= cstart[0]);
T0BLOCK0:
// %thr0 = alloca i64, align 8
// %thr1 = alloca i64, align 8
// %thr2 = alloca i64, align 8
// call void @llvm.dbg.value(metadata i32 %argc, metadata !115, metadata !DIExpression()), !dbg !153
// call void @llvm.dbg.value(metadata i8** %argv, metadata !116, metadata !DIExpression()), !dbg !153
// %0 = bitcast i64* %thr0 to i8*, !dbg !79
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) #7, !dbg !79
// call void @llvm.dbg.declare(metadata i64* %thr0, metadata !117, metadata !DIExpression()), !dbg !155
// %1 = bitcast i64* %thr1 to i8*, !dbg !81
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #7, !dbg !81
// call void @llvm.dbg.declare(metadata i64* %thr1, metadata !121, metadata !DIExpression()), !dbg !157
// %2 = bitcast i64* %thr2 to i8*, !dbg !83
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %2) #7, !dbg !83
// call void @llvm.dbg.declare(metadata i64* %thr2, metadata !122, metadata !DIExpression()), !dbg !159
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 2), metadata !123, metadata !DIExpression()), !dbg !160
// call void @llvm.dbg.value(metadata i64 0, metadata !125, metadata !DIExpression()), !dbg !160
// store atomic i64 0, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 2) monotonic, align 8, !dbg !86
// ST: Guess
iw(0,0+2*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW
old_cw = cw(0,0+2*1);
cw(0,0+2*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM
// Check
ASSUME(active[iw(0,0+2*1)] == 0);
ASSUME(active[cw(0,0+2*1)] == 0);
ASSUME(sforbid(0+2*1,cw(0,0+2*1))== 0);
ASSUME(iw(0,0+2*1) >= 0);
ASSUME(iw(0,0+2*1) >= 0);
ASSUME(cw(0,0+2*1) >= iw(0,0+2*1));
ASSUME(cw(0,0+2*1) >= old_cw);
ASSUME(cw(0,0+2*1) >= cr(0,0+2*1));
ASSUME(cw(0,0+2*1) >= cl[0]);
ASSUME(cw(0,0+2*1) >= cisb[0]);
ASSUME(cw(0,0+2*1) >= cdy[0]);
ASSUME(cw(0,0+2*1) >= cdl[0]);
ASSUME(cw(0,0+2*1) >= cds[0]);
ASSUME(cw(0,0+2*1) >= cctrl[0]);
ASSUME(cw(0,0+2*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+2*1) = 0;
mem(0+2*1,cw(0,0+2*1)) = 0;
co(0+2*1,cw(0,0+2*1))+=1;
delta(0+2*1,cw(0,0+2*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+2*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 1), metadata !126, metadata !DIExpression()), !dbg !162
// call void @llvm.dbg.value(metadata i64 0, metadata !128, metadata !DIExpression()), !dbg !162
// store atomic i64 0, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !88
// ST: Guess
iw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW
old_cw = cw(0,0+1*1);
cw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM
// Check
ASSUME(active[iw(0,0+1*1)] == 0);
ASSUME(active[cw(0,0+1*1)] == 0);
ASSUME(sforbid(0+1*1,cw(0,0+1*1))== 0);
ASSUME(iw(0,0+1*1) >= 0);
ASSUME(iw(0,0+1*1) >= 0);
ASSUME(cw(0,0+1*1) >= iw(0,0+1*1));
ASSUME(cw(0,0+1*1) >= old_cw);
ASSUME(cw(0,0+1*1) >= cr(0,0+1*1));
ASSUME(cw(0,0+1*1) >= cl[0]);
ASSUME(cw(0,0+1*1) >= cisb[0]);
ASSUME(cw(0,0+1*1) >= cdy[0]);
ASSUME(cw(0,0+1*1) >= cdl[0]);
ASSUME(cw(0,0+1*1) >= cds[0]);
ASSUME(cw(0,0+1*1) >= cctrl[0]);
ASSUME(cw(0,0+1*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+1*1) = 0;
mem(0+1*1,cw(0,0+1*1)) = 0;
co(0+1*1,cw(0,0+1*1))+=1;
delta(0+1*1,cw(0,0+1*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+1*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0), metadata !129, metadata !DIExpression()), !dbg !164
// call void @llvm.dbg.value(metadata i64 0, metadata !131, metadata !DIExpression()), !dbg !164
// store atomic i64 0, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !90
// ST: Guess
iw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW
old_cw = cw(0,0);
cw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM
// Check
ASSUME(active[iw(0,0)] == 0);
ASSUME(active[cw(0,0)] == 0);
ASSUME(sforbid(0,cw(0,0))== 0);
ASSUME(iw(0,0) >= 0);
ASSUME(iw(0,0) >= 0);
ASSUME(cw(0,0) >= iw(0,0));
ASSUME(cw(0,0) >= old_cw);
ASSUME(cw(0,0) >= cr(0,0));
ASSUME(cw(0,0) >= cl[0]);
ASSUME(cw(0,0) >= cisb[0]);
ASSUME(cw(0,0) >= cdy[0]);
ASSUME(cw(0,0) >= cdl[0]);
ASSUME(cw(0,0) >= cds[0]);
ASSUME(cw(0,0) >= cctrl[0]);
ASSUME(cw(0,0) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0) = 0;
mem(0,cw(0,0)) = 0;
co(0,cw(0,0))+=1;
delta(0,cw(0,0)) = -1;
ASSUME(creturn[0] >= cw(0,0));
// call void @llvm.dbg.value(metadata i64* @atom_1_X1_0, metadata !132, metadata !DIExpression()), !dbg !166
// call void @llvm.dbg.value(metadata i64 0, metadata !134, metadata !DIExpression()), !dbg !166
// store atomic i64 0, i64* @atom_1_X1_0 monotonic, align 8, !dbg !92
// ST: Guess
iw(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW
old_cw = cw(0,3);
cw(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM
// Check
ASSUME(active[iw(0,3)] == 0);
ASSUME(active[cw(0,3)] == 0);
ASSUME(sforbid(3,cw(0,3))== 0);
ASSUME(iw(0,3) >= 0);
ASSUME(iw(0,3) >= 0);
ASSUME(cw(0,3) >= iw(0,3));
ASSUME(cw(0,3) >= old_cw);
ASSUME(cw(0,3) >= cr(0,3));
ASSUME(cw(0,3) >= cl[0]);
ASSUME(cw(0,3) >= cisb[0]);
ASSUME(cw(0,3) >= cdy[0]);
ASSUME(cw(0,3) >= cdl[0]);
ASSUME(cw(0,3) >= cds[0]);
ASSUME(cw(0,3) >= cctrl[0]);
ASSUME(cw(0,3) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,3) = 0;
mem(3,cw(0,3)) = 0;
co(3,cw(0,3))+=1;
delta(3,cw(0,3)) = -1;
ASSUME(creturn[0] >= cw(0,3));
// call void @llvm.dbg.value(metadata i64* @atom_2_X1_0, metadata !135, metadata !DIExpression()), !dbg !168
// call void @llvm.dbg.value(metadata i64 0, metadata !137, metadata !DIExpression()), !dbg !168
// store atomic i64 0, i64* @atom_2_X1_0 monotonic, align 8, !dbg !94
// ST: Guess
iw(0,4) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW
old_cw = cw(0,4);
cw(0,4) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM
// Check
ASSUME(active[iw(0,4)] == 0);
ASSUME(active[cw(0,4)] == 0);
ASSUME(sforbid(4,cw(0,4))== 0);
ASSUME(iw(0,4) >= 0);
ASSUME(iw(0,4) >= 0);
ASSUME(cw(0,4) >= iw(0,4));
ASSUME(cw(0,4) >= old_cw);
ASSUME(cw(0,4) >= cr(0,4));
ASSUME(cw(0,4) >= cl[0]);
ASSUME(cw(0,4) >= cisb[0]);
ASSUME(cw(0,4) >= cdy[0]);
ASSUME(cw(0,4) >= cdl[0]);
ASSUME(cw(0,4) >= cds[0]);
ASSUME(cw(0,4) >= cctrl[0]);
ASSUME(cw(0,4) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,4) = 0;
mem(4,cw(0,4)) = 0;
co(4,cw(0,4))+=1;
delta(4,cw(0,4)) = -1;
ASSUME(creturn[0] >= cw(0,4));
// %call = call i32 @pthread_create(i64* noundef %thr0, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t0, i8* noundef null) #7, !dbg !95
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[1] >= cdy[0]);
// %call9 = call i32 @pthread_create(i64* noundef %thr1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t1, i8* noundef null) #7, !dbg !96
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[2] >= cdy[0]);
// %call10 = call i32 @pthread_create(i64* noundef %thr2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t2, i8* noundef null) #7, !dbg !97
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[3] >= cdy[0]);
// %3 = load i64, i64* %thr0, align 8, !dbg !98, !tbaa !99
// LD: Guess
old_cr = cr(0,5);
cr(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM
// Check
ASSUME(active[cr(0,5)] == 0);
ASSUME(cr(0,5) >= iw(0,5));
ASSUME(cr(0,5) >= 0);
ASSUME(cr(0,5) >= cdy[0]);
ASSUME(cr(0,5) >= cisb[0]);
ASSUME(cr(0,5) >= cdl[0]);
ASSUME(cr(0,5) >= cl[0]);
// Update
creg_r3 = cr(0,5);
crmax(0,5) = max(crmax(0,5),cr(0,5));
caddr[0] = max(caddr[0],0);
if(cr(0,5) < cw(0,5)) {
r3 = buff(0,5);
} else {
if(pw(0,5) != co(5,cr(0,5))) {
ASSUME(cr(0,5) >= old_cr);
}
pw(0,5) = co(5,cr(0,5));
r3 = mem(5,cr(0,5));
}
ASSUME(creturn[0] >= cr(0,5));
// %call11 = call i32 @pthread_join(i64 noundef %3, i8** noundef null), !dbg !103
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[1]);
// %4 = load i64, i64* %thr1, align 8, !dbg !104, !tbaa !99
// LD: Guess
old_cr = cr(0,6);
cr(0,6) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM
// Check
ASSUME(active[cr(0,6)] == 0);
ASSUME(cr(0,6) >= iw(0,6));
ASSUME(cr(0,6) >= 0);
ASSUME(cr(0,6) >= cdy[0]);
ASSUME(cr(0,6) >= cisb[0]);
ASSUME(cr(0,6) >= cdl[0]);
ASSUME(cr(0,6) >= cl[0]);
// Update
creg_r4 = cr(0,6);
crmax(0,6) = max(crmax(0,6),cr(0,6));
caddr[0] = max(caddr[0],0);
if(cr(0,6) < cw(0,6)) {
r4 = buff(0,6);
} else {
if(pw(0,6) != co(6,cr(0,6))) {
ASSUME(cr(0,6) >= old_cr);
}
pw(0,6) = co(6,cr(0,6));
r4 = mem(6,cr(0,6));
}
ASSUME(creturn[0] >= cr(0,6));
// %call12 = call i32 @pthread_join(i64 noundef %4, i8** noundef null), !dbg !105
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[2]);
// %5 = load i64, i64* %thr2, align 8, !dbg !106, !tbaa !99
// LD: Guess
old_cr = cr(0,7);
cr(0,7) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM
// Check
ASSUME(active[cr(0,7)] == 0);
ASSUME(cr(0,7) >= iw(0,7));
ASSUME(cr(0,7) >= 0);
ASSUME(cr(0,7) >= cdy[0]);
ASSUME(cr(0,7) >= cisb[0]);
ASSUME(cr(0,7) >= cdl[0]);
ASSUME(cr(0,7) >= cl[0]);
// Update
creg_r5 = cr(0,7);
crmax(0,7) = max(crmax(0,7),cr(0,7));
caddr[0] = max(caddr[0],0);
if(cr(0,7) < cw(0,7)) {
r5 = buff(0,7);
} else {
if(pw(0,7) != co(7,cr(0,7))) {
ASSUME(cr(0,7) >= old_cr);
}
pw(0,7) = co(7,cr(0,7));
r5 = mem(7,cr(0,7));
}
ASSUME(creturn[0] >= cr(0,7));
// %call13 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !107
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[3]);
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0), metadata !139, metadata !DIExpression()), !dbg !183
// %6 = load atomic i64, i64* getelementptr inbounds ([3 x i64], [3 x i64]* @vars, i64 0, i64 0) seq_cst, align 8, !dbg !109
// LD: Guess
old_cr = cr(0,0);
cr(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM
// Check
ASSUME(active[cr(0,0)] == 0);
ASSUME(cr(0,0) >= iw(0,0));
ASSUME(cr(0,0) >= 0);
ASSUME(cr(0,0) >= cdy[0]);
ASSUME(cr(0,0) >= cisb[0]);
ASSUME(cr(0,0) >= cdl[0]);
ASSUME(cr(0,0) >= cl[0]);
// Update
creg_r6 = cr(0,0);
crmax(0,0) = max(crmax(0,0),cr(0,0));
caddr[0] = max(caddr[0],0);
if(cr(0,0) < cw(0,0)) {
r6 = buff(0,0);
} else {
if(pw(0,0) != co(0,cr(0,0))) {
ASSUME(cr(0,0) >= old_cr);
}
pw(0,0) = co(0,cr(0,0));
r6 = mem(0,cr(0,0));
}
ASSUME(creturn[0] >= cr(0,0));
// call void @llvm.dbg.value(metadata i64 %6, metadata !141, metadata !DIExpression()), !dbg !183
// %conv = trunc i64 %6 to i32, !dbg !110
// call void @llvm.dbg.value(metadata i32 %conv, metadata !138, metadata !DIExpression()), !dbg !153
// %cmp = icmp eq i32 %conv, 2, !dbg !111
// %conv14 = zext i1 %cmp to i32, !dbg !111
// call void @llvm.dbg.value(metadata i32 %conv14, metadata !142, metadata !DIExpression()), !dbg !153
// call void @llvm.dbg.value(metadata i64* @atom_1_X1_0, metadata !144, metadata !DIExpression()), !dbg !187
// %7 = load atomic i64, i64* @atom_1_X1_0 seq_cst, align 8, !dbg !113
// LD: Guess
old_cr = cr(0,3);
cr(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM
// Check
ASSUME(active[cr(0,3)] == 0);
ASSUME(cr(0,3) >= iw(0,3));
ASSUME(cr(0,3) >= 0);
ASSUME(cr(0,3) >= cdy[0]);
ASSUME(cr(0,3) >= cisb[0]);
ASSUME(cr(0,3) >= cdl[0]);
ASSUME(cr(0,3) >= cl[0]);
// Update
creg_r7 = cr(0,3);
crmax(0,3) = max(crmax(0,3),cr(0,3));
caddr[0] = max(caddr[0],0);
if(cr(0,3) < cw(0,3)) {
r7 = buff(0,3);
} else {
if(pw(0,3) != co(3,cr(0,3))) {
ASSUME(cr(0,3) >= old_cr);
}
pw(0,3) = co(3,cr(0,3));
r7 = mem(3,cr(0,3));
}
ASSUME(creturn[0] >= cr(0,3));
// call void @llvm.dbg.value(metadata i64 %7, metadata !146, metadata !DIExpression()), !dbg !187
// %conv18 = trunc i64 %7 to i32, !dbg !114
// call void @llvm.dbg.value(metadata i32 %conv18, metadata !143, metadata !DIExpression()), !dbg !153
// call void @llvm.dbg.value(metadata i64* @atom_2_X1_0, metadata !148, metadata !DIExpression()), !dbg !190
// %8 = load atomic i64, i64* @atom_2_X1_0 seq_cst, align 8, !dbg !116
// LD: Guess
old_cr = cr(0,4);
cr(0,4) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM
// Check
ASSUME(active[cr(0,4)] == 0);
ASSUME(cr(0,4) >= iw(0,4));
ASSUME(cr(0,4) >= 0);
ASSUME(cr(0,4) >= cdy[0]);
ASSUME(cr(0,4) >= cisb[0]);
ASSUME(cr(0,4) >= cdl[0]);
ASSUME(cr(0,4) >= cl[0]);
// Update
creg_r8 = cr(0,4);
crmax(0,4) = max(crmax(0,4),cr(0,4));
caddr[0] = max(caddr[0],0);
if(cr(0,4) < cw(0,4)) {
r8 = buff(0,4);
} else {
if(pw(0,4) != co(4,cr(0,4))) {
ASSUME(cr(0,4) >= old_cr);
}
pw(0,4) = co(4,cr(0,4));
r8 = mem(4,cr(0,4));
}
ASSUME(creturn[0] >= cr(0,4));
// call void @llvm.dbg.value(metadata i64 %8, metadata !150, metadata !DIExpression()), !dbg !190
// %conv22 = trunc i64 %8 to i32, !dbg !117
// call void @llvm.dbg.value(metadata i32 %conv22, metadata !147, metadata !DIExpression()), !dbg !153
// %and = and i32 %conv18, %conv22, !dbg !118
creg_r9 = max(creg_r7,creg_r8);
ASSUME(active[creg_r9] == 0);
r9 = r7 & r8;
// call void @llvm.dbg.value(metadata i32 %and, metadata !151, metadata !DIExpression()), !dbg !153
// %and23 = and i32 %conv14, %and, !dbg !119
creg_r10 = max(max(creg_r6,0),creg_r9);
ASSUME(active[creg_r10] == 0);
r10 = (r6==2) & r9;
// call void @llvm.dbg.value(metadata i32 %and23, metadata !152, metadata !DIExpression()), !dbg !153
// %cmp24 = icmp eq i32 %and23, 1, !dbg !120
// br i1 %cmp24, label %if.then, label %if.end, !dbg !122
old_cctrl = cctrl[0];
cctrl[0] = get_rng(0,NCONTEXT-1);
ASSUME(cctrl[0] >= old_cctrl);
ASSUME(cctrl[0] >= creg_r10);
ASSUME(cctrl[0] >= 0);
if((r10==1)) {
goto T0BLOCK1;
} else {
goto T0BLOCK2;
}
T0BLOCK1:
// call void @__assert_fail(i8* noundef getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 noundef 69, i8* noundef getelementptr inbounds ([23 x i8], [23 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #8, !dbg !123
// unreachable, !dbg !123
r11 = 1;
T0BLOCK2:
// %9 = bitcast i64* %thr2 to i8*, !dbg !126
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %9) #7, !dbg !126
// %10 = bitcast i64* %thr1 to i8*, !dbg !126
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %10) #7, !dbg !126
// %11 = bitcast i64* %thr0 to i8*, !dbg !126
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %11) #7, !dbg !126
// ret i32 0, !dbg !127
ret_thread_0 = 0;
ASSERT(r11== 0);
}
| [
"[email protected]"
] | |
b3a2e0ba42ed3915efcb776a052db1a600c6754e | 8c226f6fbb9a74c5230f1ec5b72e54242d18a62a | /codechef/practice/beginner/GCD_and_LCM.cpp | 9676cbe9c66d857cd5965a580a978fbc79cdb8da | [] | no_license | ToDevelopersTeam/DS-Algos | 8ac23e2bc170ac5b5f032e49433b9fe7b3c926de | 5073c2c36d17569374f4736fc8f07379a111eafd | refs/heads/master | 2023-03-30T20:26:21.372008 | 2021-04-09T12:30:49 | 2021-04-09T12:30:49 | 522,973,009 | 0 | 0 | null | 2022-08-09T13:59:37 | 2022-08-09T13:59:36 | null | UTF-8 | C++ | false | false | 520 | cpp | #include <iostream>
using namespace std;
long int gcd(long int x, long int y)
{
long int r = 0, a, b;
a = (x > y) ? x : y;
b = (x < y) ? x : y;
r = b;
while (a % b != 0)
{
r = a % b;
a = b;
b = r;
}
return r;
}
long int lcm(long int x, long int y, long int hcf)
{
return x*y/hcf;
}
int main(int argc, char const *argv[])
{
long int t,a,b,hcf;
cin>>t;
while(t--)
{
cin>>a>>b;
hcf = gcd(a,b);
cout<<hcf<<" "<<lcm(a,b,hcf)<<endl;
}
return 0;
}
| [
"[email protected]"
] | |
860d9fd1acd8117a1f6c50b63ddf80ba0da59bab | aecc9af0c439a7b4297ccc0b4a68bbd251cb1418 | /rangeFeature/RangeImage/RangeImage/Writer.h | 37511be9ad290d8e10b65237457c718e516c2425 | [] | no_license | rising-turtle/modules | 1cfcf416aa037827e8b76a66ddf8c714440cdf61 | 3f1635e61b69c171055add722501afa4d9929756 | refs/heads/master | 2021-01-20T14:47:00.072376 | 2017-05-08T18:42:11 | 2017-05-08T18:42:11 | 90,655,785 | 0 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 744 | h | #ifndef WRITER_H
#define WRITER_H
#include "Macros3ds.h"
#include "Loader.h"
#include <iostream>
class C3DWriter: public C3DSModel
{
public:
C3DWriter();
C3DWriter(string file_name);
~C3DWriter();
void write(string file_name);
void output(ostream& out);
public:
bool WriteByte(BYTE);
bool WriteWord(WORD);
bool WriteUint(UINT);
bool WriteFloat(float);
bool WriteString(STRING& str);
void WriteChunk(tChunk chunk);
void WritePrimChunk(t3DModel *pModel, FILE* outf);
int WriteMatrial(tMaterial *pMat,FILE* outf,int n);
int WriteMeshObj(t3DObject *pObj, FILE* outf, int n);
public:
FILE *m_outFilePtr; // 3dsÎļþÖ¸Õë
public:
void testWrite(string file_name); //
};
#endif | [
"[email protected]"
] | |
9dc2ce869eee71eed0a357d1129b3af0d5759573 | 3f65c9d6fee8f0db05df34bc451fee7c327c19fa | /src/test/bswap_tests.cpp | 09e0f1fb4710a18234d128504635f5f2a0b47f6d | [
"MIT"
] | permissive | coin-lobby/coinlobby | 9f96340a402863a4d78941a3080fba1febe07b35 | 92999a66e79c9d393079a9f2366b8d45935a6785 | refs/heads/master | 2022-04-11T06:50:38.663456 | 2020-03-07T00:31:26 | 2020-03-07T00:31:26 | 229,361,165 | 0 | 0 | MIT | 2020-03-07T00:31:27 | 2019-12-21T01:35:21 | C++ | UTF-8 | C++ | false | false | 738 | cpp | // Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "compat/byteswap.h"
#include "test/test_coinlobby.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(bswap_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(bswap_tests)
{
// Sibling in bitcoin/src/qt/test/compattests.cpp
uint16_t u1 = 0x1234;
uint32_t u2 = 0x56789abc;
uint64_t u3 = 0xdef0123456789abc;
uint16_t e1 = 0x3412;
uint32_t e2 = 0xbc9a7856;
uint64_t e3 = 0xbc9a78563412f0de;
BOOST_CHECK(bswap_16(u1) == e1);
BOOST_CHECK(bswap_32(u2) == e2);
BOOST_CHECK(bswap_64(u3) == e3);
}
BOOST_AUTO_TEST_SUITE_END()
| [
"[email protected]"
] | |
aca9169933864033919ea2ff7c875d2e096ffc24 | 57d7fa3e8ad93cde6729655948d88a5eff8b3dba | /mainwindow.hpp | 65a9e88cffed162153bdff8ab26d231f1d598e9e | [] | no_license | faalbers/Qt6Spreadsheet | 9abfc5af85c7395a56584f1ce6ab7bee583675c0 | 7aabaa24dcb0b01c0c0997752f572d5fe31f5972 | refs/heads/master | 2023-06-24T23:12:41.333431 | 2021-07-28T20:51:34 | 2021-07-28T20:51:34 | 30,508,533 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,334 | hpp | #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include <QCloseEvent>
#include "finddialog.hpp"
#include "gotocelldialog.hpp"
#include "sortdialog.hpp"
#include "spreadsheet.hpp"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
void closeEvent(QCloseEvent *event);
private slots:
void newFile();
void open();
bool save();
bool saveAs();
void openRecentFile();
void find();
void goToCell();
void sort();
void about();
void updateStatusBar();
void spreadsheetModified();
private:
Ui::MainWindow *ui;
SpreadSheet *spreadsheet;
FindDialog *findDialog;
QMenu *fileMenu;
QAction *newAction;
QAction *openAction;
QAction *saveAction;
QAction *saveAsAction;
QAction *exitAction;
QAction *separatorAction;
enum { MaxRecentFiles = 5 };
QAction *recentFileActions[MaxRecentFiles];
QStringList recentFiles;
QString curFile;
QMenu *editMenu;
QAction *cutAction;
QAction *copyAction;
QAction *pasteAction;
QAction *deleteAction;
QMenu *selectSubMenu;
QAction *selectRowAction;
QAction *selectColumnAction;
QAction *selectAllAction;
QAction *findAction;
QAction *goToCellAction;
QMenu *toolsMenu;
QAction *recalculateAction;
QAction *sortAction;
QMenu *optionsMenu;
QAction *showGridAction;
QMenu *helpMenu;
QAction *aboutQtAction;
QToolBar *fileToolBar;
QToolBar *editToolBar;
QLabel *locationLabel;
QLabel *formulaLabel;
void createActions();
void createMenus();
void createContextMenu();
void createToolBars();
void createStatusBar();
void setCurrentFile(const QString &fileName);
bool okToContinue();
bool loadFile(const QString &fileName);
bool saveFile(const QString &fileName);
void writeSettings();
QString strippedName(const QString &fullFileName);
void updateRecentFileActions();
/*
void readSettings();
void writeSettings();
*/
};
#endif // MAINWINDOW_H
| [
"[email protected]"
] | |
e2c61a3321a65280168c2279b1e4ee932e58f86c | 51b16e2d745c2fdcc35e5e2f14ffe9136407689b | /C++/arrays/minmax.cpp | 53fbf36db85eb7360fc7d993b7d0384e83504bc8 | [] | no_license | anishashruti/Computer-programming | b54ab79c281b2068b340fc3f54bc8af37fdf7599 | 244b44916ff8087b1ce54f96e2c2d97fddd40816 | refs/heads/main | 2023-07-04T11:03:00.199696 | 2021-08-08T15:27:01 | 2021-08-08T15:27:01 | 379,686,669 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 419 | cpp | #include <bits/stdc++.h>
using namespace std;
void fastIO(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int main()
{
fastIO();
int sizeA;
int searchele;
int arr[20];
cin >> sizeA;
bool val = false;
for (int i = 0; i < sizeA;i++){
cin >> arr[i];
}
sort(arr,arr+sizeA);
cout << "Min -->" <<arr[0];
cout << "Max -->" << arr[sizeA - 1];
return 0;
} | [
"[email protected]"
] | |
193263ef24a396bda8703243d8b87e87ea4311ca | 95adc94a77acaef8b83d346e73c57a706b4f0450 | /algorithms/removing.cpp | 71bb30646909b8a6c8289b9e5eebe22b7b9d8b94 | [] | no_license | clawinshadow/CPP_STL | 17aa9b5358f5dac92bab4023339dd0edc5b95573 | 66f15e19b87608cdb6c3fce7ab524f333a12c533 | refs/heads/master | 2021-12-13T15:50:13.296471 | 2021-08-06T10:26:46 | 2021-08-06T10:26:46 | 240,185,734 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,703 | cpp | #include "removing.h"
#include "helper.h"
using namespace std;
namespace algorithms {
namespace removing {
void remove_certain_values()
{
/*
* ForwardIterator
remove (ForwardIterator beg, ForwardIterator end,
const T& value)
ForwardIterator
remove_if (ForwardIterator beg, ForwardIterator end,
UnaryPredicate op)
• remove() removes each element in the range [beg,end) that is equal to value.
• remove_if() removes each element in the range [beg,end) for which the unary predicate
op(elem)
yields true.
• Both algorithms return the logical new end of the modified sequence (the position after the last
element not removed).
• The algorithms overwrite “removed” elements by the following elements that were not removed.
• The order of elements that were not removed remains stable.
• Note that remove_if() usually copies the unary predicate inside the algorithm and uses it twice.
This may lead to problems if the predicate changes its state due to the function call.
• Due to modifications, you can’t use these algorithms for an associative or unordered container.
However, these containers provide a similar member function, erase()
• Lists provide an equivalent member function, remove(), which offers better performance be-
cause it relinks pointers instead of assigning element values
反正特别反常识的一点就是,这个remove并没有在物理上删除这些元素,只是逻辑上删除了
*/
vector<int> coll;
helper::INSERT_ELEMENTS(coll, 2, 6);
helper::INSERT_ELEMENTS(coll, 4, 9);
helper::INSERT_ELEMENTS(coll, 1, 7);
helper::PRINT_ELEMENT(coll, "coll: ");
auto pos = remove(coll.begin(), coll.end(), 5);
helper::PRINT_ELEMENT(coll, "coll size not changed: ");
coll.erase(pos, coll.end());
helper::PRINT_ELEMENT(coll, "coll size changed: ");
pos = remove_if(coll.begin(), coll.end(),
[] (int elem) -> bool {
return elem < 5;
});
coll.erase(pos, coll.end());
helper::PRINT_ELEMENT(coll, "coll remove elements less than 5: ");
/*
* OutputIterator
remove_copy (InputIterator sourceBeg, InputIterator sourceEnd,
OutputIterator destBeg,
const T& value)
OutputIterator
remove_copy_if (InputIterator sourceBeg, InputIterator sourceEnd,
OutputIterator destBeg,
UnaryPredicate op)
• remove_copy() is a combination of copy() and remove(). It copies each element in the source
range [sourceBeg,sourceEnd) that is not equal to value into the destination range starting with
destBeg.
• remove_copy_if() is a combination of copy() and remove_if(). It copies each element in
the source range [sourceBeg,sourceEnd) for which the unary predicate
op(elem)
yields false into the destination range starting with destBeg.
*/
}
void remove_duplicates()
{
/*
* ForwardIterator
unique (ForwardIterator beg, ForwardIterator end)
ForwardIterator
unique (ForwardIterator beg, ForwardIterator end,
BinaryPredicate op)
* • Both forms collapse consecutive equal elements by removing the following duplicates.
• The first form removes from the range [beg,end) all elements that are equal to the previous
elements. Thus, only when the elements in the sequence are sorted, or at least when all elements
of the same value are adjacent, does it remove all duplicates.
• The second form removes all elements that follow an element e and for which the binary predicate
op(e,elem)
yields true. In other words, the predicate is not used to compare an element with its predecessor;
the element is compared with the previous element that was not removed
• Both forms return the logical new end of the modified sequence (the position after the last element
not removed).
*/
list<int> coll = { 1, 4, 4, 6, 1, 2, 2, 3, 1, 6, 6, 6, 5, 7,
5, 4, 4 };
helper::PRINT_ELEMENT(coll, "coll: ");
auto pos = unique(coll.begin(), coll.end());
cout << "coll unique: ";
copy(coll.begin(), pos, ostream_iterator<int>(cout, " "));
cout << endl;
list<int> coll2 = { 1, 4, 4, 6, 1, 2, 2, 3, 1, 6, 6, 6, 5, 7,
5, 4, 4 };
// remove elements if there was a previous greater element
// 要注意的是:比如循环到2的时候,并不是将2与前面的1来比较,因为此时1已经被删掉了
// 它要比较的是前面的存活着的最后一个元素: 6
auto pos2 = unique(coll2.begin(), coll2.end(),
[] (int elem1, int elem2) -> bool {
return elem2 < elem1;
});
coll2.erase(pos2, coll2.end());
helper::PRINT_ELEMENT(coll2, "coll2 unique: ");
}
void Run()
{
/*
* The following algorithms remove elements from a range according to their value or to a criterion.
These algorithms, however, cannot change the number of elements.
The algorithms move logically only by overwriting “removed” elements with the following elements that were not removed.
They return the new logical end of the range (the position after the last element not removed)
*/
remove_certain_values();
remove_duplicates();
}
}
} | [
"[email protected]"
] | |
c724e81f370ed741494a841fd4bcb613566d4bdf | de63e31090e3e37afbcd5dc5d470423261f6516d | /arduino_prg/ncnu exercise/20181126_ex031/20181126_ex031.ino | 4a080f023c51d588e6db2b8e77d13a61445f713c | [] | no_license | s107328046Chen/ncnu107 | 7ffed8fa8f931ec8f432cb82d6b60082a3b86849 | 394f7eb8675a6a6fc0b1fd7de26bd5947deff332 | refs/heads/master | 2020-04-09T07:28:28.464781 | 2018-12-24T08:46:27 | 2018-12-24T08:46:27 | 160,157,157 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,951 | ino |
#define led1 9
#define led2 10
#define led3 11
const int buttonPin = 2;
int analogvalue = 0 ;
int buttonState =0 ;
//int lastbuttonState;
int analogPin = A0;
//unsigned long lastDebounceTime = 0;
//unsigned long debounceDelay = 50;
int mode = 0 ;
void setup() {
Serial.begin(9600);
Serial.println("Program Start");
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led3,OUTPUT);
pinMode(buttonPin,INPUT);
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
digitalWrite(led3,LOW);
}
void loop()
{
analogvalue = analogRead(analogPin);
buttonState = digitalRead(buttonPin) ;
//int reading = digitalRead(buttonPin);
// if (reading != lastbuttonState)
//{lastDebounceTime = millis();}
//if ((millis() - lastDebounceTime) > debounceDelay)
// {
// if (reading != buttonState)
// {
if (buttonState == 0)
{
mode ++ ;
Serial.println(mode) ;
if (mode > 2 )
{
mode = 0 ;
}
}
Serial.println(mode) ;
//}
// }
if(mode==0)
{
analogWrite(led1,analogvalue/4);
digitalWrite(led1,HIGH);
digitalWrite(led2,LOW);
digitalWrite(led3,LOW);
analogWrite(led1, analogvalue / 4);
Serial.println(analogvalue);
}
if(mode==1)
{
analogWrite(led2,analogvalue/4);
digitalWrite(led1,LOW);
digitalWrite(led2,HIGH);
digitalWrite(led3,LOW);
analogWrite(led2, analogvalue / 4);
Serial.println(analogvalue);
}
if(mode==2)
{
analogWrite(led3,analogvalue/4);
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
digitalWrite(led3,HIGH);
analogWrite(led3, analogvalue / 4);
Serial.println(analogvalue);
}
delay(200);
}
| [
"[email protected]"
] | |
e1100adf9c4ddc9245667d2cc791d8dd18e9b592 | a68509afd6cd9a961e255ade1ba2868c9fb152b6 | /src/CDB-inl.h | b96e0f2c0552a04aa7a51f3574f8f560351ff79c | [
"MIT"
] | permissive | gasteve/bitcoin | ee8b26b246f846ffc44380605c4a8c3d0bd198d9 | b5e79be9e7612c31403a2231ba03850f495ea9c1 | refs/heads/master | 2021-01-21T01:39:48.342065 | 2011-04-17T00:29:59 | 2011-04-17T00:29:59 | 1,413,583 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,492 | h | #include "serialize.h"
#include "CDataStream.h"
template<typename K, typename T>
bool CDB::Read(const K& key, T& value)
{
if (!pdb)
return false;
// Key
CDataStream ssKey(SER_DISK);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(&ssKey[0], ssKey.size());
// Read
Dbt datValue;
datValue.set_flags(DB_DBT_MALLOC);
int ret = pdb->get(GetTxn(), &datKey, &datValue, 0);
memset(datKey.get_data(), 0, datKey.get_size());
if (datValue.get_data() == NULL)
return false;
// Unserialize value
CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK);
ssValue >> value;
// Clear and free memory
memset(datValue.get_data(), 0, datValue.get_size());
free(datValue.get_data());
return (ret == 0);
}
template<typename K, typename T>
bool CDB::Write(const K& key, const T& value, bool fOverwrite)
{
if (!pdb)
return false;
if (fReadOnly)
assert(("Write called on database in read-only mode", false));
// Key
CDataStream ssKey(SER_DISK);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(&ssKey[0], ssKey.size());
// Value
CDataStream ssValue(SER_DISK);
ssValue.reserve(10000);
ssValue << value;
Dbt datValue(&ssValue[0], ssValue.size());
// Write
int ret = pdb->put(GetTxn(), &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE));
// Clear memory in case it was a private key
memset(datKey.get_data(), 0, datKey.get_size());
memset(datValue.get_data(), 0, datValue.get_size());
return (ret == 0);
}
template<typename K>
bool CDB::Erase(const K& key)
{
if (!pdb)
return false;
if (fReadOnly)
assert(("Erase called on database in read-only mode", false));
// Key
CDataStream ssKey(SER_DISK);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(&ssKey[0], ssKey.size());
// Erase
int ret = pdb->del(GetTxn(), &datKey, 0);
// Clear memory
memset(datKey.get_data(), 0, datKey.get_size());
return (ret == 0 || ret == DB_NOTFOUND);
}
template<typename K>
bool CDB::Exists(const K& key)
{
if (!pdb)
return false;
// Key
CDataStream ssKey(SER_DISK);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(&ssKey[0], ssKey.size());
// Exists
int ret = pdb->exists(GetTxn(), &datKey, 0);
// Clear memory
memset(datKey.get_data(), 0, datKey.get_size());
return (ret == 0);
}
| [
"[email protected]"
] | |
83d4a86ae6521e9c8926309927451305c927ac2c | b992efe3c450cf6c1ee49d6380e710f679c41f22 | /Common/EditLogB.h | de0d8d448affdb1c88089ff6ff328f778f62dcc8 | [] | no_license | RabbitThief/SerialPortMon | f88774f7275508f4169afe124e1795aa30557b75 | 86703d596390e5ecb20fb942c7df582780952b79 | refs/heads/master | 2022-11-22T03:44:26.149307 | 2020-07-14T01:49:59 | 2020-07-14T01:49:59 | 279,454,234 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 565 | h | #pragma once
#include <afxwin.h>
#include <vector>
#include <string>
#include "LockBlock.h"
using namespace std;
class CEditLogB : public CEdit
{
public:
CEditLogB();
virtual ~CEditLogB();
private:
bool _init;
int _maxLine;
int _textLength;
vector<string> _logList;
CBrush _brush;
CFont _font;
CLock _lock;
public:
int PrintLog (const char* msg);
void Update ();
void SetMaxLines (int maxLine) { _maxLine = maxLine; _init = false; }
DECLARE_MESSAGE_MAP()
protected:
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg void OnDestroy();
};
| [
"[email protected]"
] | |
56ec9faf3c886cee7f1af9f678768b1dc9bb571d | e5dad8e72f6c89011ae030f8076ac25c365f0b5f | /caret_command_operations/CommandSurfaceShrinkToProbVol.cxx | 9544394dcaebc163f346ce8a2fc1977e2f1c4dba | [] | no_license | djsperka/caret | f9a99dc5b88c4ab25edf8b1aa557fe51588c2652 | 153f8e334e0cbe37d14f78c52c935c074b796370 | refs/heads/master | 2023-07-15T19:34:16.565767 | 2020-03-07T00:29:29 | 2020-03-07T00:29:29 | 122,994,146 | 0 | 1 | null | 2018-02-26T16:06:03 | 2018-02-26T16:06:03 | null | UTF-8 | C++ | false | false | 12,569 | cxx | /*LICENSE_START*/
/*
* Copyright 1995-2002 Washington University School of Medicine
*
* http://brainmap.wustl.edu
*
* This file is part of CARET.
*
* CARET 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.
*
* CARET 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 CARET; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/*LICENSE_END*/
#include <iostream>
#include <cmath>
#include "CommandSurfaceShrinkToProbVol.h"
#include "FileFilters.h"
#include "ProgramParameters.h"
#include "ScriptBuilderParameters.h"
#include "BrainModelVolumeLigaseSegmentation.h"
#include "BrainSet.h"
#include "StringUtilities.h"
#include "BrainModelSurface.h"
#include "BrainModelSurfaceToVolumeSegmentationConverter.h"
#include "BrainModelVolumeGradient.h"
#include "VectorFile.h"
#include "VolumeFile.h"
/**
* constructor.
*/
CommandSurfaceShrinkToProbVol::CommandSurfaceShrinkToProbVol()
: CommandBase("-surface-shrink-to-prob-vol",
"SURFACE SHRINK TO PROBABILISTIC VOLUME")
{
}
/**
* destructor.
*/
CommandSurfaceShrinkToProbVol::~CommandSurfaceShrinkToProbVol()
{
}
/**
* get the script builder parameters.
*/
void
CommandSurfaceShrinkToProbVol::getScriptBuilderParameters(ScriptBuilderParameters& paramsOut) const
{
paramsOut.clear();
}
/**
* get full help information.
*/
QString
CommandSurfaceShrinkToProbVol::getHelpInformation() const
{
QString helpInfo =
(indent3 + getShortDescription() + "\n"
+ indent6 + parameters->getProgramNameWithoutPath() + " " + getOperationSwitch() + " \n"
+ indent9 + "<input-topo-file>\n"
+ indent9 + "<input-coord-file>\n"
+ indent9 + "<input-probabilistic-boundary-volume>\n"
+ indent9 + "<output-segmentation-volume>\n"
+ indent9 + "<output-volume-label>\n"
+ indent9 + "<iterations>\n"
+ indent9 + "\n"
+ indent9 + "Generate a segmentation by moving the surface inwards to probability peaks\n"
+ indent9 + "\n"
+ indent9 + " iterations number of times to grow inwards, each time a maximum of\n"
+ indent9 + " one erosion of the segmentation.\n"
+ indent9 + "\n");
return helpInfo;
}
/**
* execute the command.
*/
void
CommandSurfaceShrinkToProbVol::executeCommand() throw (BrainModelAlgorithmException,
CommandException,
FileException,
ProgramParametersException,
StatisticException)
{
const QString inputSurfaceTopoName =
parameters->getNextParameterAsString("Input Surface Topo Name");
const QString inputSurfaceCoordName =
parameters->getNextParameterAsString("Input Surface Coord Name");
const QString inputVolumeFileName =
parameters->getNextParameterAsString("Input Probabilistic Volume File Name");
const QString outputVolumeFileName =
parameters->getNextParameterAsString("Output Segmentation Volume File Name");
const QString outputVolumeLabel =
parameters->getNextParameterAsString("Output Segmentation Volume Label");
const int numberOfIterations =
parameters->getNextParameterAsInt("Number of Iterations");
checkForExcessiveParameters();
//
// Create a brain set
//
BrainSet brainSet(inputSurfaceTopoName, inputSurfaceCoordName);
//
// Read the input files
//
BrainModelSurface* inputSurf = brainSet.getBrainModelSurface(0);
inputSurf->computeNormals();
inputSurf->orientNormalsOut();
VolumeFile inputVol;
inputVol.readFile(inputVolumeFileName);
//
// Create output volume file
//
VolumeFile segVolume(inputVol);
segVolume.setVolumeType(VolumeFile::VOLUME_TYPE_SEGMENTATION);
segVolume.setFileComment(outputVolumeLabel);
int i, j, k, ti, tj, tk, max_i, max_j, max_k, total_nodes = inputSurf->getNumberOfNodes(), index;
inputVol.getDimensions(max_i, max_j, max_k);
//
// Generate initial segmentation from surface
//
BrainModelSurfaceToVolumeSegmentationConverter* bmsvsc = new BrainModelSurfaceToVolumeSegmentationConverter(&brainSet, inputSurf, &segVolume, true, false);
bmsvsc->execute();
delete bmsvsc;
//
// Take the gradient of the probability volume to get directionality easily, and the benefits of the filtering/unbiased directionality
//
VectorFile prob_grad(max_i, max_j, max_k);
BrainModelVolumeGradient* bmvg = new BrainModelVolumeGradient(&brainSet, 5, true, false, &inputVol, &segVolume, &prob_grad);
std::cout << "starting gradient" << std::endl;
bmvg->execute();
std::cout << "gradient done" << std::endl;
delete bmvg;
//
// Voxels not considered in the iteration and voxels that failed to erode, which will not erode with another test
//
VolumeFile voxelsToLeave, voxelsFailed(segVolume);
voxelsFailed.setAllVoxels(0.0f);
int coord_length = 3 * total_nodes;
float ii, ij, ik, min, temp, tempa, tempb, spacing[3], tempCoord[3], *coord = new float[coord_length];
const float* normals = inputSurf->getNormal(0);//silly hack to get flat array of normals
float thisVal, tempVec[3], tempFloat[3], avgspace, weight;
inputSurf->getCoordinateFile()->getAllCoordinates(coord);
inputVol.getSpacing(spacing);
avgspace = pow(spacing[0] * spacing[1] * spacing[2], 1.0f / 3.0f);//geometric average of spacing to estimate "1 voxel away" in stereotaxic space (mm)
for (int iter = 0; iter < numberOfIterations; ++iter)
{
voxelsToLeave = segVolume;
voxelsToLeave.doVolMorphOps(0, 1);//erode
for (i = 0; i < max_i; ++i)
{
for (j = 0; j < max_j; ++j)
{
for (k = 0; k < max_k; ++k)
{
if (segVolume.getVoxel(i, j, k) > 1.0f && voxelsToLeave.getVoxel(i, j, k) < 1.0f && voxelsFailed.getVoxel(i, j, k) < 1.0f)
{
//
// Voxel is in current segmentation, not in the eroded segmentation, and hasn't been tested before, so try it
//
inputVol.getVoxelCoordinate(i, j, k, tempCoord);
index = 0;
temp = coord[0] - tempCoord[0];
tempa = coord[1] - tempCoord[1];
tempb = coord[2] - tempCoord[2];
min = temp * temp + tempa * tempa + tempb * tempb;
//
// Find closest surface node
//
for (int node = 3; node < coord_length; node += 3)//NOTE: could be optimized by indexing to find closest node without searching all
{//however, that may weaken the stand that the closest node will always be found. Index by surface or volume?
temp = coord[node] - tempCoord[0];
tempa = coord[node + 1] - tempCoord[1];
tempb = coord[node + 2] - tempCoord[2];
temp = temp * temp + tempa * tempa + tempb * tempb;
if (temp < min)
{
min = temp;
index = node;
}
}
prob_grad.getVector(i, j, k, tempVec);
//
// Dot product of normal at closest node and vector at voxel
//
thisVal = normals[index] * tempVec[0] + normals[index + 1] * tempVec[1] + normals[index + 2] * tempVec[2];
//evaluate identical fitness calculation at other node, but using same normal
/*ti = i - (int)(normals[index] * 1.9999f);//HACK: multiply by 2, cast to int equals round to integer for (-1, 1)
tj = j - (int)(normals[index + 1] * 1.9999f);
tk = k - (int)(normals[index + 2] * 1.9999f);
inputVol.getVoxelCoordinate(ti, tj, tk, tempCoord);*///replaced by interpolation
/*tempCoord[0] -= normals[index] * avgspace;//coordinates used only for searching for closest node
tempCoord[1] -= normals[index + 1] * avgspace;
tempCoord[2] -= normals[index + 2] * avgspace;*///not used, because using the same normal as the testing voxel
//
// Interpolate the gradient vector at voxel by interpolating each component separately, with no curvature
//
tempVec[0] = tempVec[1] = tempVec[2] = 0.0f;
ii = i - normals[index] * avgspace / spacing[0];//"index" to interpolate, this is NOT a coordinate, adjusts the "one voxel away" vector back
ij = j - normals[index + 1] * avgspace / spacing[1];//into index space
ik = k - normals[index + 2] * avgspace / spacing[2];
for (ti = (int)floor(ii); ti <= (int)ceil(ii); ++ti)
{
for (tj = (int)floor(ij); tj <= (int)ceil(ij); ++tj)
{
for (tk = (int)floor(ik); tk <= (int)ceil(ik); ++tk)
{
prob_grad.getVector(ti, tj, tk, tempFloat);
weight = fabs(tempCoord[0] - ti) * fabs(tempCoord[1] - tj) * fabs(tempCoord[2] - tk);//linear weighting in all directions
tempVec[0] += tempFloat[0] * weight;
tempVec[1] += tempFloat[1] * weight;
tempVec[2] += tempFloat[2] * weight;
}
}
}
/*index = 0;//search for closest node to new coordinate is BAD with a capital BAD for thin white matter
temp = coord[0] - tempCoord[0];
tempa = coord[1] - tempCoord[1];
tempb = coord[2] - tempCoord[2];
min = temp * temp + tempa * tempa + tempb * tempb;
for (int node = 3; node < coord_length; node += 3)
{
temp = coord[node] - tempCoord[0];
tempa = coord[node + 1] - tempCoord[1];
tempb = coord[node + 2] - tempCoord[2];
temp = temp * temp + tempa * tempa + tempb * tempb;
if (temp < min)
{
min = temp;
index = node;
}
}*/
if (thisVal < 0.0f)//if the gradient says go inwards
{
//if the dot product of probability gradient and outward surface normal is farther from the peak than the neighbor voxel
//in the opposite direction from the surface normal, erode this voxel
//essentially, if following the inward normal would end up farther down the inside slope of the probability peak, dont erode
//NOTE: negative values mean gradient is inward (opposed to outward normals)
if (thisVal < -(normals[index] * tempVec[0] + normals[index + 1] * tempVec[1] + normals[index + 2] * tempVec[2]))
{
segVolume.setVoxel(i, j, k, 0, 0.0f);
} else {
voxelsFailed.setVoxel(i, j, k, 0, 255.0f);
}
} else {
//if the gradient says go outwards, but the next voxel says inwards or less strongly outwards, erode
//bad for thin white matter
/*if (normals[index] * tempVec[0] + normals[index + 1] * tempVec[1] + normals[index + 2] * tempVec[2] < thisVal)
{
segVolume.setVoxel(i, j, k, 0, 0.0f);
} else {*/
voxelsFailed.setVoxel(i, j, k, 0, 255.0f);
//}
}
}
}
}
}
}
//
// Write the file
//
segVolume.writeFile(outputVolumeFileName);
}
| [
"[email protected]"
] | |
46aa4138b4c6603504a6bf9263ba2265d7a5578c | 4b42fae3479a99b3a1f6e16922e92809a0945c82 | /chrome/browser/vr/renderers/web_vr_renderer.h | eb5adf03a82d6f23a41447d211004da8f66b1912 | [
"BSD-3-Clause"
] | permissive | Jtl12/browser-android-tabs | 5eed5fc4d6c978057c910b58c3ea0445bb619ee9 | f5406ad2a104d373062a86778d913e6b0a556e10 | refs/heads/master | 2023-04-02T05:20:33.277558 | 2018-07-20T12:56:19 | 2018-07-20T12:56:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 757 | h | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_VR_RENDERERS_WEB_VR_RENDERER_H_
#define CHROME_BROWSER_VR_RENDERERS_WEB_VR_RENDERER_H_
#include "base/macros.h"
#include "chrome/browser/vr/renderers/base_quad_renderer.h"
namespace vr {
// Renders a page-generated stereo VR view.
class WebVrRenderer : public BaseQuadRenderer {
public:
WebVrRenderer();
~WebVrRenderer() override;
void Draw(int texture_handle, float y_sign);
private:
GLuint texture_handle_;
GLuint y_sign_;
DISALLOW_COPY_AND_ASSIGN(WebVrRenderer);
};
} // namespace vr
#endif // CHROME_BROWSER_VR_RENDERERS_WEB_VR_RENDERER_H_
| [
"[email protected]"
] | |
53c7cc5a3617f5420ec453baed334e0f4fe14b86 | 5e6943ef0183cc59ab8392060472ccc561700c24 | /src/brick/test/metrics/user_action_tester.h | df60f89a80df606b06d8663a76ceab58b25a7032 | [] | no_license | israel-Liu/brick | 88b7ea62c79fc0fc250a60a482d81543c48ec795 | 9b4e4011df7c0bdede945d98bcd1e0a5ac535773 | refs/heads/master | 2022-04-20T10:00:47.049834 | 2020-04-24T03:32:07 | 2020-04-24T03:32:07 | 96,489,912 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,477 | h | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BRICK_TEST_METRICS_USER_ACTION_TESTER_H_
#define BRICK_TEST_METRICS_USER_ACTION_TESTER_H_
#include <map>
#include <string>
#include "brick/macros.h"
#include "brick/metrics/user_metrics.h"
namespace base {
// This class observes and collects user action notifications that are sent
// by the tests, so that they can be examined afterwards for correctness.
// Note: This class is NOT thread-safe.
class UserActionTester {
public:
UserActionTester();
~UserActionTester();
// Returns the number of times the given |user_action| occurred.
int GetActionCount(const std::string& user_action) const;
// Resets all user action counts to 0.
void ResetCounts();
private:
typedef std::map<std::string, int> UserActionCountMap;
// The callback that is notified when a user actions occurs.
void OnUserAction(const std::string& user_action);
// A map that tracks the number of times a user action has occurred.
UserActionCountMap count_map_;
// A test task runner used by user metrics.
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
// The callback that is added to the global action callback list.
base::ActionCallback action_callback_;
DISALLOW_COPY_AND_ASSIGN(UserActionTester);
};
} // namespace base
#endif // BRICK_TEST_METRICS_USER_ACTION_TESTER_H_
| [
"[email protected]"
] | |
fe573f30a248705f45779a712fd4792a9a9ddb27 | cb84d30a962790ab0c449be14c966d1b128329b6 | /2019/11/7/Untitled-1.cpp | d144dd547f7c8cb1c0edc8339536645fb3ff656c | [] | no_license | ShaoChenHeng/codeOfACM | 2c608858078c8d889874c3d345e8c1c97afcbf7c | cdc513b29628767a7b4649788578e5cae8a0e1dd | refs/heads/master | 2020-08-21T18:46:07.111481 | 2020-02-05T16:18:36 | 2020-02-05T16:18:36 | 216,220,940 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,077 | cpp | #pragma GCC opertime(2)
#pragma GCC opertime(3)
#include<bits/stdc++.h>
using namespace std;
const int N=2750133;
int n,cnt,a[N],b[N],prim[N],vis[N],xu[N];
void work(int n)
{
for(int i=2;i<=n;i++)
{
if(!vis[i])prim[++cnt]=i;
for(int j=1;j<=cnt;j++)
{
if(i*prim[j]>n)break;
vis[i*prim[j]]=1;
xu[i*prim[j]]=i;
if(i%prim[j]==0)break;
}
}
}
bool cmp(int a,int b)
{
if(vis[a]==0)
{
if(vis[b]==0)return a<b;
else return 0;
}
if(vis[b]==0)
{
return 1;
}
return a > b;
}
int main()
{
work(2750131);
cin>>n;
for(int i=1;i<=2*n;i++)
{
scanf("%d",&a[i]);
b[a[i]]++;
}
sort(a+1,a+2*n+1,cmp);
for ( int i = 1; i <= 2 * n; i ++ ) printf("%d ",a[i]);
/* for(int i=1;i<=2*n;i++)
{
if(b[a[i]])
{
printf("%d ",a[i]);
b[a[i]]--;
if(vis[a[i]]==0&&a[i]<=cnt)b[prim[a[i]]]--;
if(vis[a[i]])b[xu[a[i]]]--;
}
} */
return 0;
}
| [
"[email protected]"
] | |
b3890b826d37be33da1b60607daeb123b488ae9a | b206579e4098b2cfa376f7cc34743717c63f7cf3 | /Direct3DGame/16_HeightMap/SMap.cpp | 47f94097f340027b3ec1c896de80b2c76521aeee | [] | no_license | seoaplo/02_Direct3DGame | b4c1a751e72517dec06b1052830e7f27a69afebb | 88d4615ecc3bac7ffdce86ca4391104064567ca1 | refs/heads/master | 2021-11-28T05:07:04.367958 | 2021-09-05T13:50:56 | 2021-09-05T13:50:56 | 201,198,261 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 15,032 | cpp | #include "SMap.h"
DXGI_FORMAT SMap::MAKE_TYPELESS(DXGI_FORMAT format)
{
switch (format)
{
case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
case DXGI_FORMAT_R8G8B8A8_UNORM:
case DXGI_FORMAT_R8G8B8A8_UINT:
case DXGI_FORMAT_R8G8B8A8_SNORM:
case DXGI_FORMAT_R8G8B8A8_SINT:
return DXGI_FORMAT_R8G8B8A8_TYPELESS;
case DXGI_FORMAT_BC1_UNORM_SRGB:
case DXGI_FORMAT_BC1_UNORM:
return DXGI_FORMAT_BC1_TYPELESS;
case DXGI_FORMAT_BC2_UNORM_SRGB:
case DXGI_FORMAT_BC2_UNORM:
return DXGI_FORMAT_BC2_TYPELESS;
case DXGI_FORMAT_BC3_UNORM_SRGB:
case DXGI_FORMAT_BC3_UNORM:
return DXGI_FORMAT_BC3_TYPELESS;
}
return format;
}
DXGI_FORMAT SMap::MAKE_SRGB(DXGI_FORMAT format)
{
switch (format)
{
case DXGI_FORMAT_R8G8B8A8_TYPELESS:
case DXGI_FORMAT_R8G8B8A8_UNORM:
case DXGI_FORMAT_R8G8B8A8_UINT:
case DXGI_FORMAT_R8G8B8A8_SNORM:
case DXGI_FORMAT_R8G8B8A8_SINT:
return DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
case DXGI_FORMAT_BC1_TYPELESS:
case DXGI_FORMAT_BC1_UNORM:
return DXGI_FORMAT_BC1_UNORM_SRGB;
case DXGI_FORMAT_BC2_TYPELESS:
case DXGI_FORMAT_BC2_UNORM:
return DXGI_FORMAT_BC2_UNORM_SRGB;
case DXGI_FORMAT_BC3_TYPELESS:
case DXGI_FORMAT_BC3_UNORM:
return DXGI_FORMAT_BC3_UNORM_SRGB;
};
return format;
}
float SMap::GetHeight(float fPosX, float fPosZ)
{
// fPosX / fPosZ의 위치에 해당하는 높이맵셀을 찾는다.
// m_iNumCols와 m_iNumRows는 가로/세로의 실제 크기 값임
float fCellX = (float)(m_iNumSellCols * m_fSellDistance / 2.0f + fPosX);
float fCellZ = (float)(m_iNumSellRows * m_fSellDistance / 2.0f - fPosZ);
// 셀의 크기로 나누어 1단위의 값으로 바꾸어 높이맵 배열에 접근한다.
fCellX /= (float)m_fSellDistance;
fCellZ /= (float)m_fSellDistance;
// fCellX, fCellZ 값보다 작거나 같은 최대 정수( 소수부분을 잘라낸다.)
float fVertexCol = ::floorf(fCellX);
float fVertexRow = ::floorf(fCellZ);
// 높이맵 범위를 벗어나면 강제로 초기화 한다.
if (fVertexCol < 0.0f) fVertexCol = 0.0f;
if (fVertexRow < 0.0f) fVertexRow = 0.0f;
if ((float)(m_iNumCols - 2) < fVertexCol) fVertexCol = (float)(m_iNumCols - 2);
if ((float)(fVertexRow - 2) < fVertexRow) fVertexRow = (float)(fVertexRow - 2);
// 계산된 셀의 플랜을 구성하는 4개 정점의 높이값을 찾는다.
// A B
// *---*
// | / |
// *---*
// C D
float A = GetHeightmap((int)fVertexRow, (int)fVertexCol);
float B = GetHeightmap((int)fVertexRow, (int)fVertexCol + 1);
float C = GetHeightmap((int)fVertexRow + 1, (int)fVertexCol);
float D = GetHeightmap((int)fVertexRow + 1, (int)fVertexCol + 1);
// A정점의 위치에서 떨어진 값(변위값)을 계산한다.
float fDeltaX = fCellX - fVertexCol;
float fDeltaZ = fCellZ - fVertexRow;
// 보간작업을 위한 기준 페이스를 찾는다.
float fHeight = 0.0f;
// 윗페이스를 기준으로 보간한다.
if (fDeltaZ < (1.0f - fDeltaX))
{
float uy = B - A; // A -> B
float vy = C - A; // A -> C
// 두 정점의 높이값의 차이를 비교하여 델타X의 값에 따라 보간값을 찾는다.
fHeight = A + Lerp(0.0f, uy, fDeltaX) + Lerp(0.0f, vy, fDeltaZ);
}
// 아래페이스를 기준으로 보간한다.
else // DCB
{
float uy = C - D; // D -> C
float vy = B - D; // D -> B
// 두 정점의 높이값의 차이를 비교하여 델타Z의 값에 따라 보간값을 찾는다.
fHeight = D + Lerp(0.0f, uy, 1.0f - fDeltaX) + Lerp(0.0f, vy, 1.0 - fDeltaZ);
}
return fHeight;
}
float SMap::Lerp(float fStart, float fEnd, float fTangent)
{
return fStart - (fStart * fTangent) + (fEnd * fTangent);
}
D3DXVECTOR3 SMap::ComputeFaceNormal(DWORD dwIndex0, DWORD dwIndex1, DWORD dwIndex2)
{
D3DXVECTOR3 vNormal;
// 노말 벡터를 얻기 위해 얻는 삼각형의 엣지벡터
// DirectX는 왼손 좌표계를 사용하기 때문에 시계방향으로 외적을 진행하여야 한다.
D3DXVECTOR3 v0 = m_VertexList[dwIndex1].p - m_VertexList[dwIndex0].p;
D3DXVECTOR3 v1 = m_VertexList[dwIndex2].p - m_VertexList[dwIndex0].p;
D3DXVec3Cross(&vNormal, &v0, &v1);
D3DXVec3Normalize(&vNormal, &vNormal);
return vNormal;
}
HRESULT SMap::SetInputLayout()
{
HRESULT hr = S_OK;
D3D11_INPUT_ELEMENT_DESC layout[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 40, D3D11_INPUT_PER_VERTEX_DATA, 0 },
};
UINT numElements = sizeof(layout) / sizeof(layout[0]);
m_dxobj.g_pInputlayout.Attach(DXGame::CreateInputlayout(m_pDevice, m_dxobj.g_pVSBlob.Get()->GetBufferSize(),
m_dxobj.g_pVSBlob.Get()->GetBufferPointer(), layout, numElements));
return hr;
}
HRESULT SMap::CreateVertexBuffer()
{
HRESULT hr = S_OK;
m_dxobj.m_iVertexSize = sizeof(PNCT_VERTEX);
m_dxobj.m_iNumVertex = m_iNumVertices;
m_dxobj.g_pVertexBuffer.Attach(DXGame::CreateVertexBuffer(m_pDevice, &m_VertexList.at(0), m_dxobj.m_iNumVertex, m_dxobj.m_iVertexSize));
return hr;
}
HRESULT SMap::CreateIndexBuffer()
{
HRESULT hr = S_OK;
m_dxobj.m_iNumIndex = m_iNumFace * 3;//(m_iNumRows - 1)*(m_iNumCols - 1) * 2 * 3
m_dxobj.g_pIndexBuffer.Attach(DXGame::CreateIndexBuffer(m_pDevice, &m_IndexList.at(0), m_dxobj.m_iNumIndex, sizeof(DWORD)));
return hr;
}
bool SMap::CreateVertexData()
{
m_VertexList.resize(m_iNumVertices);
// Map의 원점이 되는 정점
int iHalfCols = m_iNumCols / 2;
int iHalfRows = m_iNumRows / 2;
// 정점과 정점 사이의 텍스쳐 좌표 증가값
float ftxOffsetU = 1.0f / (m_iNumCols - 1);
float ftxOffsetV = 1.0f / (m_iNumRows - 1);
for (int iRow = 0; iRow < m_iNumRows; iRow++)
{
for (int iCol = 0; iCol < m_iNumCols; iCol++)
{
int iVertexIndex = iRow * m_iNumCols + iCol;
m_VertexList[iVertexIndex].p.x = (iCol - iHalfCols) * m_fSellDistance;
m_VertexList[iVertexIndex].p.z = -(( iRow - iHalfRows) * m_fSellDistance);
m_VertexList[iVertexIndex].p.y = GetHeightOfVertex(iVertexIndex);
m_VertexList[iVertexIndex].n = GetNormalOfVertex(iVertexIndex);
m_VertexList[iVertexIndex].c = GetColorOfVertex(iVertexIndex);
m_VertexList[iVertexIndex].t = GetTextureOfVertex( ftxOffsetU * iCol, ftxOffsetV * iRow);
}
}
return true;
}
bool SMap::CreateIndexData()
{
m_IndexList.resize(m_iNumFace * 3);
int iCurIndex = 0;
for (int iRow = 0; iRow < m_iNumSellRows; iRow++)
{
for (int iCol = 0; iCol < m_iNumSellCols; iCol++)
{
//0 1 4
//2 3 5
int iNextRow = iRow + 1;
int iNextCol = iCol + 1;
m_IndexList[iCurIndex + 0] = iRow * m_iNumCols + iCol;
m_IndexList[iCurIndex + 1] = iRow * m_iNumCols + iNextCol;
m_IndexList[iCurIndex + 2] = iNextRow * m_iNumCols + iCol;
m_IndexList[iCurIndex + 3] = m_IndexList[iCurIndex + 2];
m_IndexList[iCurIndex + 4] = m_IndexList[iCurIndex + 1];
m_IndexList[iCurIndex + 5] = iNextRow * m_iNumCols + iNextCol;
iCurIndex += 6;
}
}
return true;
}
bool SMap::UpdateBuffer()
{
//=========================================================================================
// 페이스 노말 계산 및 이웃 페이스 인덱스 저장하여 정점 노말 계산
//=========================================================================================
InitFaceNormals();
GenNormalLookupTable();
CalcPerVertexNormalsFastLookup();
return true;
}
bool SMap::CreateMap(SMapDesc& MapDesc)
{
// 대용량의 사이즈를 지정한다. (pow(2.0f, 10.0f) + 1 이상)
if (MapDesc.iNumCols > 1025 || MapDesc.iNumRows > 1025)
{
MapDesc.iNumCols = 1025; // 정점개수 105만개,
MapDesc.iNumRows = 1025; // 페이스 개수 209만개
}
m_MapDesc = MapDesc;
m_iNumRows = MapDesc.iNumCols;
m_iNumCols = MapDesc.iNumRows;
m_iNumSellRows = m_iNumRows - 1;
m_iNumSellCols = m_iNumCols - 1;
m_iNumVertices = m_iNumRows * m_iNumCols;
m_iNumFace = m_iNumSellRows * m_iNumSellCols * 2;
m_fSellDistance = MapDesc.fSellDistance;
return true;
}
float SMap::GetHeightmap(int row, int col)
{
return m_VertexList[row * m_iNumRows + col].p.y * m_MapDesc.fScaleHeight;
}
float SMap::GetHeightOfVertex(UINT Index)
{
return 0.0f;
};
D3DXVECTOR3 SMap::GetNormalOfVertex(UINT Index)
{
return D3DXVECTOR3(0.0f, 1.0f, 0.0f);
};
D3DXVECTOR4 SMap::GetColorOfVertex(UINT Index)
{
return D3DXVECTOR4(1, 1, 1, 1.0f);
};
D3DXVECTOR2 SMap::GetTextureOfVertex(float fOffsetX, float fOffsetY)
{
return D3DXVECTOR2(fOffsetX, fOffsetY);
};
void SMap::CalcVertexColor(D3DXVECTOR3 vLightDir)
{
//=================================================================================
// 페이스 노말 계산 및 이웃 페이스 인덱스 저장하여 정점 노말 계산
//=================================================================================
for (int iRow = 0; iRow < m_iNumRows; iRow++)
{
for (int iCol = 0; iCol < m_iNumCols; iCol++)
{
//<vLightDir = 0, -1.0f, 0>
int iVertexIndex = iRow * m_iNumCols + iCol;
float fDot =
D3DXVec3Dot(&-vLightDir, &m_VertexList[iVertexIndex].n);
m_VertexList[iVertexIndex].c *= fDot;
m_VertexList[iVertexIndex].c.w = 1.0f;
}
}
}
bool SMap::ReLoadVBuffer()
{
CalcPerVertexNormalsFastLookup();
m_pContext->UpdateSubresource(m_dxobj.g_pVertexBuffer.Get(), 0, nullptr, m_VertexList.data(), 0, 0);
return true;
}
bool SMap::ReLoadIBuffer()
{
m_pContext->UpdateSubresource(m_dxobj.g_pIndexBuffer.Get(), 0, nullptr, m_IndexList.data(), 0, 0);
return true;
}
void SMap::UpdateIndexBuffer(ID3D11DeviceContext* pContext, DWORD* pdwIndexArray, int iFaceCount)
{
assert(pdwIndexArray);
m_iNumFace = iFaceCount;
m_dxobj.m_iNumIndex = m_iNumFace * 3;
pContext->UpdateSubresource(m_dxobj.g_pIndexBuffer.Get(), 0, nullptr, pdwIndexArray, 0, 0);
}
bool SMap::Init(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
m_pDevice = pDevice;
m_pContext = pContext;
D3DXMatrixIdentity(&m_matWorld);
D3DXMatrixIdentity(&m_matView);
D3DXMatrixIdentity(&m_matProj);
return true;
}
bool SMap::Frame()
{
return true;
}
bool SMap::Render(ID3D11DeviceContext* pContext)
{
PreRender(pContext);
PostRender(pContext);
return true;
}
bool SMap::Release()
{
if (m_pNormalLookupTable)
{
free(m_pNormalLookupTable);
m_pNormalLookupTable = nullptr;
}
if (m_pFaceNormals != nullptr)
{
delete m_pFaceNormals;
m_pFaceNormals = nullptr;
}
return true;
}
void SMap::InitFaceNormals()
{
m_pFaceNormals = new D3DXVECTOR3[m_iNumFace];
for (int iCount = 0; iCount < m_iNumFace; iCount++)
{
m_pFaceNormals[iCount] = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
}
}
bool SMap::Load(SMapDesc& MapDesc)
{
if (!CreateMap(MapDesc))
{
return false;
}
if (!SModel::Create(m_pDevice, m_pContext, MapDesc.strTextureFile.c_str(), MapDesc.strShaderFile.c_str()))
{
return false;
}
return true;
}
//==================================================================================
// 각 페이스가 가지고 있는 노말 벡터를 구하는 함수
//==================================================================================
void SMap::CalcFaceNormals()
{
// 모든 페이스를 순환한다.
int iFaceNomalNum = 0;
for (int iIndexCount = 0; iIndexCount < m_iNumFace * 3; iIndexCount += 3)
{
DWORD i0 = m_IndexList[iIndexCount];
DWORD i1 = m_IndexList[iIndexCount + 1];
DWORD i2 = m_IndexList[iIndexCount + 2];
m_pFaceNormals[iFaceNomalNum] = ComputeFaceNormal(i0, i1, i2);
iFaceNomalNum++;
}
}
//==================================================================================
// Create a face normal lookup table
//==================================================================================
void SMap::GenNormalLookupTable()
{
if (m_pNormalLookupTable != nullptr)
{
free(m_pNormalLookupTable);
m_pNormalLookupTable = nullptr;
}
// 1개의 정점을 공유하는 페이스들은 최대 6개를 공유할 수 있다.
// 버퍼 사이즈는 각 정점의 갯수에 6을 곱한만큼의 크기로 만들어야
// 각 정점에 인접하는 페이스를 저장할 수 있다.
int buffersize = m_iNumRows * m_iNumCols * 6;
m_pNormalLookupTable = (int*)malloc(sizeof(void*) * buffersize);
// 해당되지 않는 페이스는 -1로 표기할 것이기 때문에 -1로 초기화 시킨다.
memset(m_pNormalLookupTable, -1, sizeof(void*) * buffersize);
// 페이스의 개수 * 해당 페이스의 정점 * 정점에 인접하는 페이스의 개수
for (int iFaceCount = 0; iFaceCount < m_iNumFace; iFaceCount++)
{
for (int iFaceVertex = 0; iFaceVertex < 3; iFaceVertex++)
{
for (int iVetexFace = 0; iVetexFace < 6; iVetexFace++)
{
int vertex = m_IndexList[iFaceCount * 3 + iFaceVertex];
if (m_pNormalLookupTable[vertex * 6 + iVetexFace] == -1)
// 해당 정점에 인접한 페이스에 값이 들어가 있지 않을 경우
{
m_pNormalLookupTable[vertex * 6 + iVetexFace] = iFaceCount;
break;
}
}
}
}
}
//==================================================================================
// Compute vertex normals from the fast normal lookup table
//==================================================================================
void SMap::CalcPerVertexNormalsFastLookup()
{
// 각 페이스의 노말 벡터를 구한다.
CalcFaceNormals();
int iVertexFaceNum = 0;
// 정점들을 순환한다.
for (int iVertexNum = 0; iVertexNum < m_iNumVertices; iVertexNum++)
{
// 평균 노말을 구하기 위한 벡터
D3DXVECTOR3 avgNormal;
avgNormal = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
// 각 정점에 인접한 페이스의 노말 벡터를 확인한다.
for (iVertexFaceNum = 0; iVertexFaceNum < 6; iVertexFaceNum++)
{
int iTriangleIndex;
iTriangleIndex = m_pNormalLookupTable[iVertexNum * 6 + iVertexFaceNum];
// If the triangle index is valid, get the normal and average it in.
if (iTriangleIndex != -1)
{
avgNormal += m_pFaceNormals[iTriangleIndex];
}
else
break;
}
// 정점에 인접한 페이스 개수 만큼 나누어 정점 노말을 구한다.
_ASSERT(iVertexFaceNum > 0);
avgNormal.x /= (float)iVertexFaceNum;
avgNormal.y /= (float)iVertexFaceNum;
avgNormal.z /= (float)iVertexFaceNum;
D3DXVec3Normalize(&avgNormal, &avgNormal);
// 해당 정점의 노말 벡터를 업데이트 시킨다.
m_VertexList[iVertexNum].n.x = avgNormal.x;
m_VertexList[iVertexNum].n.y = avgNormal.y;
m_VertexList[iVertexNum].n.z = avgNormal.z;
}
//==================================================================================
// 페이스 노말 계산 및 이웃 페이스 인덱스 저장하여 정점 노말 계산
//==================================================================================
if (m_bStaticLight) CalcVertexColor(m_vLightDir);
}
SMap::SMap()
{
m_iNumFace = 0;
m_iDiffuseTex = 0;
m_iNumCols = 0;
m_iNumRows = 0;
m_pDevice = nullptr;
m_pNormalLookupTable = nullptr;
m_pFaceNormals = nullptr;
m_vLightDir = D3DXVECTOR3(0, -1, 0);
m_bStaticLight = false;
}
SMap::~SMap()
{
}
| [
"[email protected]"
] | |
6364ecd4ff348aa45104785fe382bbb34e5232b8 | 9cf0d68c3986d831ee180f4572ffd6c065c0732e | /experiment/old/int64_double.cpp | 44ad9016aa3820c9825a504673d98601168dae1a | [] | no_license | dipterix/lazyarray | 4a765086e53f3bd36115d944959d93c3b1d3a01d | 89ee74b23390190c528c5f20ca1d179899b6ed6c | refs/heads/master | 2023-07-08T17:04:48.315734 | 2023-06-21T05:32:02 | 2023-06-21T05:32:02 | 272,550,970 | 17 | 0 | null | 2020-11-30T05:19:58 | 2020-06-15T21:49:15 | C++ | UTF-8 | C++ | false | false | 1,315 | cpp | #include <Rcpp.h>
using namespace Rcpp;
SEXP int64t2Sexp(const std::vector<int64_t>& x) {
const R_xlen_t len = x.size();
SEXP re = PROTECT(Rf_allocVector(REALSXP, len));
std::memcpy(REAL(re), &(x[0]), len * sizeof(double));
Rf_setAttrib(re, wrap("class"), wrap("integer64"));
return re;
}
std::vector<int64_t> numericVector2Int64tVec(const NumericVector& x){
const R_xlen_t len = x.size();
std::vector<int64_t> re( len );
std::memcpy(&(re[0]), &(x[0]), len * sizeof(int64_t));
return(re);
}
int64_t doubleInt64t(const double& x){
int64_t re;
std::memcpy(&(re), &(x), sizeof(int64_t));
return(re);
}
double int64t2double(const int64_t& x){
double re;
std::memcpy(&(re), &(x), sizeof(double));
return(re);
}
NumericVector int64tVec2NumericVector(const std::vector<int64_t>& x){
const R_xlen_t len = x.size();
NumericVector re = no_init( len );
std::memcpy(&(re[0]), &(x[0]), len * sizeof(double));
return(re);
}
std::vector<int64_t> sexp2Int64tVec(SEXP x){
const R_xlen_t len = Rf_xlength(x);
std::vector<int64_t> re(len);
if(TYPEOF(x) == REALSXP){
std::memcpy(&(re[0]), REAL(x), len * sizeof(int64_t));
}else{
SEXP y = PROTECT(Rf_coerceVector(x, REALSXP));
std::memcpy(&(re[0]), REAL(y), len * sizeof(int64_t));
UNPROTECT(1);
}
return re;
}
| [
"[email protected]"
] | |
c25d11813c81884ce6e5c124b0201d4bf6de7fe8 | 256a688878ed861dcbb534d02e02210a1b5bf1fa | /Final/stack Linked_List/main.cpp | e3c599578327e3a353ad1b18c2a9595dd38d5626 | [] | no_license | kakanghosh/Data-Structure | 15555702726ef919ad27da82d9d8383dc4b620df | 8ad57c8cdf6b5ff0a0066fa47dd6b7988294474a | refs/heads/master | 2021-09-07T06:13:11.628034 | 2018-02-18T16:42:40 | 2018-02-18T16:42:40 | 121,969,576 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,745 | cpp | #include <iostream>
#include <stdlib.h>
using namespace std;
#define MAX 5
struct node
{
int data;
node *link;
};
class stacks
{
int nodeCounter;
node *start;
node *linkedList;
public:
// Constructor
stacks(){
nodeCounter = 0;
start = NULL;
}
// PUSH method
void push(int data)
{
if( nodeNumber(start) == MAX ){
cout << "\nStack OverFlow!!!" << endl;
}else if( isEmpty() ){
linkedList = newNode();
linkedList->data = data;
start = linkedList;
nodeCounter++;
cout <<endl<< data << " PUSHED in the stack!" << endl;
}else{
node *temp = newNode();
temp->data = data;
linkedList = start;
while( linkedList != NULL ){
if( linkedList->link == NULL ){
linkedList->link = temp;
break;
}
linkedList = linkedList->link;
}
nodeCounter++;
cout << endl << data << " PUSHED in the stack!" << endl;
}
}
// pop method
void pop(){
if( nodeCounter == 0 ){
cout << "\nStack UnderFlow!" << endl;
}else if(nodeCounter == 1){
cout << "\nPOPED from the stack!" << endl;
start = NULL;
nodeCounter--;
}else {
node *temp ;
linkedList = start;
while( linkedList != NULL ){
if( linkedList->link->link == NULL ) break;
linkedList = linkedList->link;
}
linkedList->link = NULL;
cout << "\nPOPED from the stack!" << endl;
nodeCounter--;
}
}
//Display node data
void display(){
linkedList = start;
if( linkedList == NULL ){
cout << "\nStack is Empty!" << endl;
}else{
cout << endl << "Data: ";
while( linkedList != NULL ){
cout << linkedList->data << " ";
linkedList = linkedList->link;
}
cout << endl;
}
}
// counting node number
int nodeNumber(node *start){
int counter = 0;
while( start != NULL ){
counter++;
start = start->link;
}
return counter;
}
// checking if the stack is empty??
bool isEmpty(){
if( nodeCounter == 0 )
return true;
else
return false;
}
private:
// return new node address
node* newNode(){
node *temp = new node;
temp->data = NULL;
temp->link = NULL;
return temp;
}
};
int main()
{
stacks *st = new stacks;
int choice;
bool flag = true;
int number;
while( flag ){
cout << "\n1. PUSH." << endl;
cout << "2. POP." << endl;
cout << "3. Display." << endl;
cout << "4. Exit." << endl;
cout << endl << "\nEnter choice: ";
cin >> choice;
system("cls");
switch( choice ){
case 1:
cout << "\nEnter number: ";
cin >> number;
st->push(number);
break;
case 2:
st->pop();
break;
case 3:
st->display();
break;
case 4:
flag = false;
break;
}
}
return 0;
}
| [
"[email protected]"
] | |
4c0ef0ae324d11261b246ee1a4144bdf4dfdc6d8 | 22e9144e9ca00d73e9a9d9e958fe1f04f511f9dd | /include/dll/neural/dyn_dense_layer.hpp | e3d6f54f3ce6ec2993ef3d6700fe00cd5c20daac | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | acknowledge/dll | e378c8d960df36e27b0f50a0d261bc6469cb80ad | 6ab90077bbfc93a4089c5a906dda039575fcc446 | refs/heads/master | 2021-01-12T05:34:23.360832 | 2016-12-22T09:58:06 | 2016-12-22T09:58:06 | 77,131,064 | 0 | 0 | null | 2016-12-22T09:22:35 | 2016-12-22T09:22:35 | null | UTF-8 | C++ | false | false | 424 | hpp | //=======================================================================
// Copyright (c) 2014-2016 Baptiste Wicht
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//=======================================================================
#pragma once
#include "dll/neural/dyn_dense_layer.inl"
#include "dll/neural/dyn_dense_desc.hpp"
| [
"[email protected]"
] | |
2d2037c305e68dc1f38da44fa6ca926139439df8 | 43e6e47d5b9f198bea1bec9929f60e01efc2436e | /detector_training/src/presence_advertiser.hpp | c919934ec0ea38807c88a41df26b4cdbe06c97c3 | [] | no_license | Phenix8/Gaze | 47e521db900700a1d65c7cbabfcf056ed7a8752e | ea7399c50f663d59dc29d7b2821dfc0a660291d5 | refs/heads/master | 2021-07-06T10:49:38.690155 | 2019-04-22T03:06:45 | 2019-04-22T03:06:45 | 86,724,244 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,425 | hpp | #ifndef PRESENCE_ADVERTISER_HPP
#define PRESENCE_ADVERTISER_HPP
#include "udp_broadcaster.hpp"
#include <thread>
#include <chrono>
class PresenceAdvertiser {
private:
std::thread thread;
UDPBroadcaster broadcaster;
bool started;
template <typename TYPE, typename PERIOD>
void advertisingLoop(
const std::string &interfaceName,
unsigned int port,
const std::string &message,
const std::chrono::duration<TYPE, PERIOD> &delay,
bool retryUntilInterfaceReady
) {
if (retryUntilInterfaceReady) {
while (!broadcaster.isOpen()) {
try {
broadcaster.open(interfaceName, port);
} catch (const std::exception &e) {
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
} else {
broadcaster.open(interfaceName, port);
}
while (started) {
broadcaster.broadcast(message);
std::this_thread::sleep_for(delay);
}
broadcaster.close();
}
public:
PresenceAdvertiser() {
started = false;
}
PresenceAdvertiser(
const std::string &interfaceName,
unsigned int port,
const std::string &message,
bool retryUntilInterfaceReady = false
) :PresenceAdvertiser() {
start(interfaceName, port, message, retryUntilInterfaceReady);
}
template <typename TYPE, typename PERIOD>
PresenceAdvertiser(
const std::string &interfaceName,
unsigned int port,
const std::string &message,
const std::chrono::duration<TYPE, PERIOD> &delay,
bool retryUntilInterfaceReady = false
) :PresenceAdvertiser() {
start(interfaceName, port, message, delay, retryUntilInterfaceReady);
}
void start(
const std::string &interfaceName,
unsigned int port,
const std::string &message,
bool retryUntilInterfaceReady = false
) {
start(interfaceName, port, message, std::chrono::seconds(10), retryUntilInterfaceReady);
}
template <typename TYPE, typename PERIOD>
void start(
const std::string &interfaceName,
unsigned int port,
const std::string &message,
const std::chrono::duration<TYPE, PERIOD> &delay,
bool retryUntilInterfaceReady = false
) {
if (started == true) {
throw std::runtime_error("Already started.");
}
started = true;
thread = std::thread(
&PresenceAdvertiser::advertisingLoop<TYPE, PERIOD>, this,
interfaceName, port, message, delay, retryUntilInterfaceReady
);
}
void stop() {
started = false;
thread.join();
}
};
#endif | [
"[email protected]"
] | |
f2865031e3b802aeceb69e52300bc48af5baf1e1 | cd4364d24c722b6a21d44b7a95e363e34d17c778 | /q1.cpp | 302769afce5012b30fb3a7f7ad765f001eb781c6 | [] | no_license | nsi319/Algos_Task1 | f0c350b5d93aae03e53ea55dbc85618e64ecf0b8 | 53755800623a25d5dfb77e8098bf55bdc182cc66 | refs/heads/master | 2020-06-04T09:51:47.720631 | 2019-06-14T16:25:24 | 2019-06-14T16:25:24 | 191,974,761 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 703 | cpp | #include <iostream>
#include <math.h>
using namespace std;
void con_binary(int n,int s){
char arr [106]=" ";
int i=0;
for(;i<s;i++){
if(n%2==1)
arr[s-i-1]='1';
else
arr[s-i-1]='0';
n=n/2;
}
arr[i]='\0';
for(int j=0;j<i;j++)
cout<<arr[j];
}
int main (){
char a[106];
int n,bin=0;
cout<<"String length"<<endl;
cin>>n;
cout<<"Enter the binary string of 1 and 0"<<endl;
for(int i=0;i<n;i++)
cin>>a[i];
for(int i=n-1;i>=0;i--)
if(a[i]=='1')
bin = pow(2,n-i-1) + bin ; // convert to binary
if(bin==pow(2,n-1)||bin==(pow(2,n)-1)||bin==(pow(2,n-1)+1))
cout<<"-1"<<endl;
else {
con_binary(bin+1,n);
cout<<" ";
con_binary(bin-1,n);
cout<<endl;
}
}
| [
"[email protected]"
] | |
82fe1a9e5ae54870290c33b2122debc8d42eaee6 | 33eaafc0b1b10e1ae97a67981fe740234bc5d592 | /tests/RandomSAT/z3-master/src/ast/used_symbols.h | 994e3321a035342d4d418c017cb5b8c623b6bed9 | [
"MIT"
] | permissive | akinanop/mvl-solver | 6c21bec03422bb2366f146cb02e6bf916eea6dd0 | bfcc5b243e43bddcc34aba9c34e67d820fc708c8 | refs/heads/master | 2021-01-16T23:30:46.413902 | 2021-01-10T16:53:23 | 2021-01-10T16:53:23 | 48,694,935 | 6 | 2 | null | 2016-08-30T10:47:25 | 2015-12-28T13:55:32 | C++ | UTF-8 | C++ | false | false | 3,047 | h | /*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
used_symbols.h
Abstract:
Collect the symbols used in an expression.
Author:
Leonardo de Moura (leonardo) 2011-01-11.
Revision History:
--*/
#ifndef USED_SYMBOLS_H_
#define USED_SYMBOLS_H_
#include"ast.h"
#include"hashtable.h"
#include"obj_hashtable.h"
struct do_nothing_rename_proc {
symbol operator()(symbol const & s) const { return s; }
};
/**
\brief Functor for collecting the symbols used in an expression.
*/
template<typename RENAME_PROC=do_nothing_rename_proc>
class used_symbols : public RENAME_PROC {
typedef hashtable<symbol, symbol_hash_proc, symbol_eq_proc> symbol_set;
symbol_set m_used;
obj_hashtable<expr> m_visited;
ptr_vector<expr> m_todo;
void found(symbol const & s) { m_used.insert(RENAME_PROC::operator()(s)); }
void visit(expr * n) {
if (!m_visited.contains(n)) {
m_visited.insert(n);
m_todo.push_back(n);
}
}
public:
used_symbols(RENAME_PROC const & p = RENAME_PROC()):
RENAME_PROC(p) {
}
void operator()(expr * n, bool ignore_quantifiers = false) {
m_visited.reset();
m_used.reset();
m_todo.reset();
visit(n);
while (!m_todo.empty()) {
n = m_todo.back();
m_todo.pop_back();
unsigned j;
switch (n->get_kind()) {
case AST_APP:
found(to_app(n)->get_decl()->get_name());
j = to_app(n)->get_num_args();
while (j > 0) {
--j;
visit(to_app(n)->get_arg(j));
}
break;
case AST_QUANTIFIER:
if (!ignore_quantifiers) {
found(to_quantifier(n)->get_qid());
unsigned num_decls = to_quantifier(n)->get_num_decls();
for (unsigned i = 0; i < num_decls; i++)
found(to_quantifier(n)->get_decl_name(i));
unsigned num_pats = to_quantifier(n)->get_num_patterns();
for (unsigned i = 0; i < num_pats; i++)
visit(to_quantifier(n)->get_pattern(i));
unsigned num_no_pats = to_quantifier(n)->get_num_no_patterns();
for (unsigned i = 0; i < num_no_pats; i++)
visit(to_quantifier(n)->get_no_pattern(i));
visit(to_quantifier(n)->get_expr());
}
break;
default:
break;
}
}
}
bool contains(symbol const & s) const { return m_used.contains(RENAME_PROC::operator()(s)); }
bool contains_core(symbol const & s) const { return m_used.contains(s); }
void insert(symbol const & s) { m_used.insert(RENAME_PROC::operator()(s)); }
void insert_core(symbol const & s) { m_used.insert(s); }
void erase_core(symbol const & s) { m_used.erase(s); }
};
#endif /* USED_SYMBOLS_H_ */
| [
"[email protected]"
] | |
6a47767a74ecd5c330d85cc9358f88da99962f6b | 097f47c14f8ce0152db2df8915bf4c82b5633976 | /FYP_matrix/installed-package-headers/google/cloud/vision/v1p3beta1/web_detection.pb.cc | 8b1bcdce470fa38adaa312d9261d43f988a9a993 | [] | no_license | BenjaminChia/Ben_FYP_RPi_Matrix | a1bbffa854be723e59f60358a1dbe7a44e0a1898 | 5a7952774e3f10ddc5ca56dccba82dba25471fd7 | refs/heads/master | 2020-03-29T07:10:53.329139 | 2018-09-21T00:54:08 | 2018-09-21T00:54:08 | 149,655,972 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | true | 98,764 | cc | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/vision/v1p3beta1/web_detection.proto
#include "google/cloud/vision/v1p3beta1/web_detection.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_WebDetection_WebEntity;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_WebDetection_WebImage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_WebDetection_WebLabel;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_WebDetection_WebPage;
} // namespace protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto
namespace google {
namespace cloud {
namespace vision {
namespace v1p3beta1 {
class WebDetection_WebEntityDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<WebDetection_WebEntity>
_instance;
} _WebDetection_WebEntity_default_instance_;
class WebDetection_WebImageDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<WebDetection_WebImage>
_instance;
} _WebDetection_WebImage_default_instance_;
class WebDetection_WebPageDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<WebDetection_WebPage>
_instance;
} _WebDetection_WebPage_default_instance_;
class WebDetection_WebLabelDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<WebDetection_WebLabel>
_instance;
} _WebDetection_WebLabel_default_instance_;
class WebDetectionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<WebDetection>
_instance;
} _WebDetection_default_instance_;
} // namespace v1p3beta1
} // namespace vision
} // namespace cloud
} // namespace google
namespace protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto {
static void InitDefaultsWebDetection_WebEntity() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::google::cloud::vision::v1p3beta1::_WebDetection_WebEntity_default_instance_;
new (ptr) ::google::cloud::vision::v1p3beta1::WebDetection_WebEntity();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::cloud::vision::v1p3beta1::WebDetection_WebEntity::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_WebDetection_WebEntity =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsWebDetection_WebEntity}, {}};
static void InitDefaultsWebDetection_WebImage() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::google::cloud::vision::v1p3beta1::_WebDetection_WebImage_default_instance_;
new (ptr) ::google::cloud::vision::v1p3beta1::WebDetection_WebImage();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::cloud::vision::v1p3beta1::WebDetection_WebImage::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_WebDetection_WebImage =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsWebDetection_WebImage}, {}};
static void InitDefaultsWebDetection_WebPage() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::google::cloud::vision::v1p3beta1::_WebDetection_WebPage_default_instance_;
new (ptr) ::google::cloud::vision::v1p3beta1::WebDetection_WebPage();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::cloud::vision::v1p3beta1::WebDetection_WebPage::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<1> scc_info_WebDetection_WebPage =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsWebDetection_WebPage}, {
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebImage.base,}};
static void InitDefaultsWebDetection_WebLabel() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::google::cloud::vision::v1p3beta1::_WebDetection_WebLabel_default_instance_;
new (ptr) ::google::cloud::vision::v1p3beta1::WebDetection_WebLabel();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::cloud::vision::v1p3beta1::WebDetection_WebLabel::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_WebDetection_WebLabel =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsWebDetection_WebLabel}, {}};
static void InitDefaultsWebDetection() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::google::cloud::vision::v1p3beta1::_WebDetection_default_instance_;
new (ptr) ::google::cloud::vision::v1p3beta1::WebDetection();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::cloud::vision::v1p3beta1::WebDetection::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<4> scc_info_WebDetection =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsWebDetection}, {
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebEntity.base,
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebImage.base,
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebPage.base,
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebLabel.base,}};
void InitDefaults() {
::google::protobuf::internal::InitSCC(&scc_info_WebDetection_WebEntity.base);
::google::protobuf::internal::InitSCC(&scc_info_WebDetection_WebImage.base);
::google::protobuf::internal::InitSCC(&scc_info_WebDetection_WebPage.base);
::google::protobuf::internal::InitSCC(&scc_info_WebDetection_WebLabel.base);
::google::protobuf::internal::InitSCC(&scc_info_WebDetection.base);
}
::google::protobuf::Metadata file_level_metadata[5];
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebEntity, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebEntity, entity_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebEntity, score_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebEntity, description_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebImage, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebImage, url_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebImage, score_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebPage, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebPage, url_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebPage, score_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebPage, page_title_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebPage, full_matching_images_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebPage, partial_matching_images_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebLabel, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebLabel, label_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection_WebLabel, language_code_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, web_entities_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, full_matching_images_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, partial_matching_images_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, pages_with_matching_images_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, visually_similar_images_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::cloud::vision::v1p3beta1::WebDetection, best_guess_labels_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::google::cloud::vision::v1p3beta1::WebDetection_WebEntity)},
{ 8, -1, sizeof(::google::cloud::vision::v1p3beta1::WebDetection_WebImage)},
{ 15, -1, sizeof(::google::cloud::vision::v1p3beta1::WebDetection_WebPage)},
{ 25, -1, sizeof(::google::cloud::vision::v1p3beta1::WebDetection_WebLabel)},
{ 32, -1, sizeof(::google::cloud::vision::v1p3beta1::WebDetection)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::google::cloud::vision::v1p3beta1::_WebDetection_WebEntity_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::cloud::vision::v1p3beta1::_WebDetection_WebImage_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::cloud::vision::v1p3beta1::_WebDetection_WebPage_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::cloud::vision::v1p3beta1::_WebDetection_WebLabel_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::cloud::vision::v1p3beta1::_WebDetection_default_instance_),
};
void protobuf_AssignDescriptors() {
AddDescriptors();
AssignDescriptors(
"google/cloud/vision/v1p3beta1/web_detection.proto", schemas, file_default_instances, TableStruct::offsets,
file_level_metadata, NULL, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static ::google::protobuf::internal::once_flag once;
::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
}
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n1google/cloud/vision/v1p3beta1/web_dete"
"ction.proto\022\035google.cloud.vision.v1p3bet"
"a1\032\034google/api/annotations.proto\"\214\007\n\014Web"
"Detection\022K\n\014web_entities\030\001 \003(\01325.google"
".cloud.vision.v1p3beta1.WebDetection.Web"
"Entity\022R\n\024full_matching_images\030\002 \003(\01324.g"
"oogle.cloud.vision.v1p3beta1.WebDetectio"
"n.WebImage\022U\n\027partial_matching_images\030\003 "
"\003(\01324.google.cloud.vision.v1p3beta1.WebD"
"etection.WebImage\022W\n\032pages_with_matching"
"_images\030\004 \003(\01323.google.cloud.vision.v1p3"
"beta1.WebDetection.WebPage\022U\n\027visually_s"
"imilar_images\030\006 \003(\01324.google.cloud.visio"
"n.v1p3beta1.WebDetection.WebImage\022O\n\021bes"
"t_guess_labels\030\010 \003(\01324.google.cloud.visi"
"on.v1p3beta1.WebDetection.WebLabel\032B\n\tWe"
"bEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001("
"\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebImage\022\013\n\003ur"
"l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007WebPage\022\013\n\003ur"
"l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001"
"(\t\022R\n\024full_matching_images\030\004 \003(\01324.googl"
"e.cloud.vision.v1p3beta1.WebDetection.We"
"bImage\022U\n\027partial_matching_images\030\005 \003(\0132"
"4.google.cloud.vision.v1p3beta1.WebDetec"
"tion.WebImage\0320\n\010WebLabel\022\r\n\005label\030\001 \001(\t"
"\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!com.google.c"
"loud.vision.v1p3beta1B\021WebDetectionProto"
"P\001ZCgoogle.golang.org/genproto/googleapi"
"s/cloud/vision/v1p3beta1;vision\370\001\001b\006prot"
"o3"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 1162);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/cloud/vision/v1p3beta1/web_detection.proto", &protobuf_RegisterTypes);
::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
}
void AddDescriptors() {
static ::google::protobuf::internal::once_flag once;
::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto
namespace google {
namespace cloud {
namespace vision {
namespace v1p3beta1 {
// ===================================================================
void WebDetection_WebEntity::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WebDetection_WebEntity::kEntityIdFieldNumber;
const int WebDetection_WebEntity::kScoreFieldNumber;
const int WebDetection_WebEntity::kDescriptionFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
WebDetection_WebEntity::WebDetection_WebEntity()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebEntity.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
}
WebDetection_WebEntity::WebDetection_WebEntity(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena) {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebEntity.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
}
WebDetection_WebEntity::WebDetection_WebEntity(const WebDetection_WebEntity& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
entity_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.entity_id().size() > 0) {
entity_id_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.entity_id(),
GetArenaNoVirtual());
}
description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.description().size() > 0) {
description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description(),
GetArenaNoVirtual());
}
score_ = from.score_;
// @@protoc_insertion_point(copy_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
}
void WebDetection_WebEntity::SharedCtor() {
entity_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
score_ = 0;
}
WebDetection_WebEntity::~WebDetection_WebEntity() {
// @@protoc_insertion_point(destructor:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
SharedDtor();
}
void WebDetection_WebEntity::SharedDtor() {
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
entity_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WebDetection_WebEntity::ArenaDtor(void* object) {
WebDetection_WebEntity* _this = reinterpret_cast< WebDetection_WebEntity* >(object);
(void)_this;
}
void WebDetection_WebEntity::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void WebDetection_WebEntity::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* WebDetection_WebEntity::descriptor() {
::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const WebDetection_WebEntity& WebDetection_WebEntity::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebEntity.base);
return *internal_default_instance();
}
void WebDetection_WebEntity::Clear() {
// @@protoc_insertion_point(message_clear_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
entity_id_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
score_ = 0;
_internal_metadata_.Clear();
}
bool WebDetection_WebEntity::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string entity_id = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_entity_id()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->entity_id().data(), static_cast<int>(this->entity_id().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebEntity.entity_id"));
} else {
goto handle_unusual;
}
break;
}
// float score = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &score_)));
} else {
goto handle_unusual;
}
break;
}
// string description = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_description()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->description().data(), static_cast<int>(this->description().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebEntity.description"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
return false;
#undef DO_
}
void WebDetection_WebEntity::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string entity_id = 1;
if (this->entity_id().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->entity_id().data(), static_cast<int>(this->entity_id().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebEntity.entity_id");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->entity_id(), output);
}
// float score = 2;
if (this->score() != 0) {
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->score(), output);
}
// string description = 3;
if (this->description().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->description().data(), static_cast<int>(this->description().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebEntity.description");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->description(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
}
::google::protobuf::uint8* WebDetection_WebEntity::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string entity_id = 1;
if (this->entity_id().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->entity_id().data(), static_cast<int>(this->entity_id().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebEntity.entity_id");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->entity_id(), target);
}
// float score = 2;
if (this->score() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->score(), target);
}
// string description = 3;
if (this->description().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->description().data(), static_cast<int>(this->description().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebEntity.description");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->description(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
return target;
}
size_t WebDetection_WebEntity::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string entity_id = 1;
if (this->entity_id().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->entity_id());
}
// string description = 3;
if (this->description().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->description());
}
// float score = 2;
if (this->score() != 0) {
total_size += 1 + 4;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WebDetection_WebEntity::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
GOOGLE_DCHECK_NE(&from, this);
const WebDetection_WebEntity* source =
::google::protobuf::internal::DynamicCastToGenerated<const WebDetection_WebEntity>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
MergeFrom(*source);
}
}
void WebDetection_WebEntity::MergeFrom(const WebDetection_WebEntity& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.entity_id().size() > 0) {
set_entity_id(from.entity_id());
}
if (from.description().size() > 0) {
set_description(from.description());
}
if (from.score() != 0) {
set_score(from.score());
}
}
void WebDetection_WebEntity::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WebDetection_WebEntity::CopyFrom(const WebDetection_WebEntity& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WebDetection_WebEntity::IsInitialized() const {
return true;
}
void WebDetection_WebEntity::Swap(WebDetection_WebEntity* other) {
if (other == this) return;
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
InternalSwap(other);
} else {
WebDetection_WebEntity* temp = New(GetArenaNoVirtual());
temp->MergeFrom(*other);
other->CopyFrom(*this);
InternalSwap(temp);
if (GetArenaNoVirtual() == NULL) {
delete temp;
}
}
}
void WebDetection_WebEntity::UnsafeArenaSwap(WebDetection_WebEntity* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
InternalSwap(other);
}
void WebDetection_WebEntity::InternalSwap(WebDetection_WebEntity* other) {
using std::swap;
entity_id_.Swap(&other->entity_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
description_.Swap(&other->description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(score_, other->score_);
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata WebDetection_WebEntity::GetMetadata() const {
protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void WebDetection_WebImage::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WebDetection_WebImage::kUrlFieldNumber;
const int WebDetection_WebImage::kScoreFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
WebDetection_WebImage::WebDetection_WebImage()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebImage.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
}
WebDetection_WebImage::WebDetection_WebImage(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena) {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebImage.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
}
WebDetection_WebImage::WebDetection_WebImage(const WebDetection_WebImage& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.url().size() > 0) {
url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.url(),
GetArenaNoVirtual());
}
score_ = from.score_;
// @@protoc_insertion_point(copy_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
}
void WebDetection_WebImage::SharedCtor() {
url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
score_ = 0;
}
WebDetection_WebImage::~WebDetection_WebImage() {
// @@protoc_insertion_point(destructor:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
SharedDtor();
}
void WebDetection_WebImage::SharedDtor() {
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WebDetection_WebImage::ArenaDtor(void* object) {
WebDetection_WebImage* _this = reinterpret_cast< WebDetection_WebImage* >(object);
(void)_this;
}
void WebDetection_WebImage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void WebDetection_WebImage::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* WebDetection_WebImage::descriptor() {
::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const WebDetection_WebImage& WebDetection_WebImage::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebImage.base);
return *internal_default_instance();
}
void WebDetection_WebImage::Clear() {
// @@protoc_insertion_point(message_clear_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
url_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
score_ = 0;
_internal_metadata_.Clear();
}
bool WebDetection_WebImage::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string url = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_url()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->url().data(), static_cast<int>(this->url().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebImage.url"));
} else {
goto handle_unusual;
}
break;
}
// float score = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &score_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
return false;
#undef DO_
}
void WebDetection_WebImage::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string url = 1;
if (this->url().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->url().data(), static_cast<int>(this->url().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebImage.url");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->url(), output);
}
// float score = 2;
if (this->score() != 0) {
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->score(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
}
::google::protobuf::uint8* WebDetection_WebImage::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string url = 1;
if (this->url().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->url().data(), static_cast<int>(this->url().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebImage.url");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->url(), target);
}
// float score = 2;
if (this->score() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->score(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
return target;
}
size_t WebDetection_WebImage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string url = 1;
if (this->url().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->url());
}
// float score = 2;
if (this->score() != 0) {
total_size += 1 + 4;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WebDetection_WebImage::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
GOOGLE_DCHECK_NE(&from, this);
const WebDetection_WebImage* source =
::google::protobuf::internal::DynamicCastToGenerated<const WebDetection_WebImage>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
MergeFrom(*source);
}
}
void WebDetection_WebImage::MergeFrom(const WebDetection_WebImage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.url().size() > 0) {
set_url(from.url());
}
if (from.score() != 0) {
set_score(from.score());
}
}
void WebDetection_WebImage::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WebDetection_WebImage::CopyFrom(const WebDetection_WebImage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebImage)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WebDetection_WebImage::IsInitialized() const {
return true;
}
void WebDetection_WebImage::Swap(WebDetection_WebImage* other) {
if (other == this) return;
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
InternalSwap(other);
} else {
WebDetection_WebImage* temp = New(GetArenaNoVirtual());
temp->MergeFrom(*other);
other->CopyFrom(*this);
InternalSwap(temp);
if (GetArenaNoVirtual() == NULL) {
delete temp;
}
}
}
void WebDetection_WebImage::UnsafeArenaSwap(WebDetection_WebImage* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
InternalSwap(other);
}
void WebDetection_WebImage::InternalSwap(WebDetection_WebImage* other) {
using std::swap;
url_.Swap(&other->url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(score_, other->score_);
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata WebDetection_WebImage::GetMetadata() const {
protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void WebDetection_WebPage::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WebDetection_WebPage::kUrlFieldNumber;
const int WebDetection_WebPage::kScoreFieldNumber;
const int WebDetection_WebPage::kPageTitleFieldNumber;
const int WebDetection_WebPage::kFullMatchingImagesFieldNumber;
const int WebDetection_WebPage::kPartialMatchingImagesFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
WebDetection_WebPage::WebDetection_WebPage()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebPage.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
}
WebDetection_WebPage::WebDetection_WebPage(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
full_matching_images_(arena),
partial_matching_images_(arena) {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebPage.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
}
WebDetection_WebPage::WebDetection_WebPage(const WebDetection_WebPage& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
full_matching_images_(from.full_matching_images_),
partial_matching_images_(from.partial_matching_images_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.url().size() > 0) {
url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.url(),
GetArenaNoVirtual());
}
page_title_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.page_title().size() > 0) {
page_title_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_title(),
GetArenaNoVirtual());
}
score_ = from.score_;
// @@protoc_insertion_point(copy_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
}
void WebDetection_WebPage::SharedCtor() {
url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_title_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
score_ = 0;
}
WebDetection_WebPage::~WebDetection_WebPage() {
// @@protoc_insertion_point(destructor:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
SharedDtor();
}
void WebDetection_WebPage::SharedDtor() {
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_title_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WebDetection_WebPage::ArenaDtor(void* object) {
WebDetection_WebPage* _this = reinterpret_cast< WebDetection_WebPage* >(object);
(void)_this;
}
void WebDetection_WebPage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void WebDetection_WebPage::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* WebDetection_WebPage::descriptor() {
::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const WebDetection_WebPage& WebDetection_WebPage::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebPage.base);
return *internal_default_instance();
}
void WebDetection_WebPage::Clear() {
// @@protoc_insertion_point(message_clear_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
full_matching_images_.Clear();
partial_matching_images_.Clear();
url_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
page_title_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
score_ = 0;
_internal_metadata_.Clear();
}
bool WebDetection_WebPage::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string url = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_url()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->url().data(), static_cast<int>(this->url().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebPage.url"));
} else {
goto handle_unusual;
}
break;
}
// float score = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &score_)));
} else {
goto handle_unusual;
}
break;
}
// string page_title = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_page_title()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->page_title().data(), static_cast<int>(this->page_title().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebPage.page_title"));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_full_matching_images()));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_partial_matching_images()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
return false;
#undef DO_
}
void WebDetection_WebPage::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string url = 1;
if (this->url().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->url().data(), static_cast<int>(this->url().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebPage.url");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->url(), output);
}
// float score = 2;
if (this->score() != 0) {
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->score(), output);
}
// string page_title = 3;
if (this->page_title().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->page_title().data(), static_cast<int>(this->page_title().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebPage.page_title");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->page_title(), output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->full_matching_images_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4,
this->full_matching_images(static_cast<int>(i)),
output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->partial_matching_images_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5,
this->partial_matching_images(static_cast<int>(i)),
output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
}
::google::protobuf::uint8* WebDetection_WebPage::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string url = 1;
if (this->url().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->url().data(), static_cast<int>(this->url().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebPage.url");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->url(), target);
}
// float score = 2;
if (this->score() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->score(), target);
}
// string page_title = 3;
if (this->page_title().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->page_title().data(), static_cast<int>(this->page_title().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebPage.page_title");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->page_title(), target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->full_matching_images_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
4, this->full_matching_images(static_cast<int>(i)), deterministic, target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->partial_matching_images_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->partial_matching_images(static_cast<int>(i)), deterministic, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
return target;
}
size_t WebDetection_WebPage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4;
{
unsigned int count = static_cast<unsigned int>(this->full_matching_images_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->full_matching_images(static_cast<int>(i)));
}
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5;
{
unsigned int count = static_cast<unsigned int>(this->partial_matching_images_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->partial_matching_images(static_cast<int>(i)));
}
}
// string url = 1;
if (this->url().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->url());
}
// string page_title = 3;
if (this->page_title().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->page_title());
}
// float score = 2;
if (this->score() != 0) {
total_size += 1 + 4;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WebDetection_WebPage::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
GOOGLE_DCHECK_NE(&from, this);
const WebDetection_WebPage* source =
::google::protobuf::internal::DynamicCastToGenerated<const WebDetection_WebPage>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
MergeFrom(*source);
}
}
void WebDetection_WebPage::MergeFrom(const WebDetection_WebPage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
full_matching_images_.MergeFrom(from.full_matching_images_);
partial_matching_images_.MergeFrom(from.partial_matching_images_);
if (from.url().size() > 0) {
set_url(from.url());
}
if (from.page_title().size() > 0) {
set_page_title(from.page_title());
}
if (from.score() != 0) {
set_score(from.score());
}
}
void WebDetection_WebPage::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WebDetection_WebPage::CopyFrom(const WebDetection_WebPage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebPage)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WebDetection_WebPage::IsInitialized() const {
return true;
}
void WebDetection_WebPage::Swap(WebDetection_WebPage* other) {
if (other == this) return;
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
InternalSwap(other);
} else {
WebDetection_WebPage* temp = New(GetArenaNoVirtual());
temp->MergeFrom(*other);
other->CopyFrom(*this);
InternalSwap(temp);
if (GetArenaNoVirtual() == NULL) {
delete temp;
}
}
}
void WebDetection_WebPage::UnsafeArenaSwap(WebDetection_WebPage* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
InternalSwap(other);
}
void WebDetection_WebPage::InternalSwap(WebDetection_WebPage* other) {
using std::swap;
CastToBase(&full_matching_images_)->InternalSwap(CastToBase(&other->full_matching_images_));
CastToBase(&partial_matching_images_)->InternalSwap(CastToBase(&other->partial_matching_images_));
url_.Swap(&other->url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
page_title_.Swap(&other->page_title_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(score_, other->score_);
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata WebDetection_WebPage::GetMetadata() const {
protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void WebDetection_WebLabel::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WebDetection_WebLabel::kLabelFieldNumber;
const int WebDetection_WebLabel::kLanguageCodeFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
WebDetection_WebLabel::WebDetection_WebLabel()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebLabel.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
}
WebDetection_WebLabel::WebDetection_WebLabel(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena) {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebLabel.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
}
WebDetection_WebLabel::WebDetection_WebLabel(const WebDetection_WebLabel& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.label().size() > 0) {
label_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.label(),
GetArenaNoVirtual());
}
language_code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.language_code().size() > 0) {
language_code_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.language_code(),
GetArenaNoVirtual());
}
// @@protoc_insertion_point(copy_constructor:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
}
void WebDetection_WebLabel::SharedCtor() {
label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
language_code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
WebDetection_WebLabel::~WebDetection_WebLabel() {
// @@protoc_insertion_point(destructor:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
SharedDtor();
}
void WebDetection_WebLabel::SharedDtor() {
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
language_code_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WebDetection_WebLabel::ArenaDtor(void* object) {
WebDetection_WebLabel* _this = reinterpret_cast< WebDetection_WebLabel* >(object);
(void)_this;
}
void WebDetection_WebLabel::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void WebDetection_WebLabel::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* WebDetection_WebLabel::descriptor() {
::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const WebDetection_WebLabel& WebDetection_WebLabel::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection_WebLabel.base);
return *internal_default_instance();
}
void WebDetection_WebLabel::Clear() {
// @@protoc_insertion_point(message_clear_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
label_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
language_code_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
_internal_metadata_.Clear();
}
bool WebDetection_WebLabel::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string label = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_label()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->label().data(), static_cast<int>(this->label().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebLabel.label"));
} else {
goto handle_unusual;
}
break;
}
// string language_code = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_language_code()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->language_code().data(), static_cast<int>(this->language_code().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.cloud.vision.v1p3beta1.WebDetection.WebLabel.language_code"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
return false;
#undef DO_
}
void WebDetection_WebLabel::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string label = 1;
if (this->label().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->label().data(), static_cast<int>(this->label().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebLabel.label");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->label(), output);
}
// string language_code = 2;
if (this->language_code().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->language_code().data(), static_cast<int>(this->language_code().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebLabel.language_code");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->language_code(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
}
::google::protobuf::uint8* WebDetection_WebLabel::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string label = 1;
if (this->label().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->label().data(), static_cast<int>(this->label().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebLabel.label");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->label(), target);
}
// string language_code = 2;
if (this->language_code().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->language_code().data(), static_cast<int>(this->language_code().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.cloud.vision.v1p3beta1.WebDetection.WebLabel.language_code");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->language_code(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
return target;
}
size_t WebDetection_WebLabel::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string label = 1;
if (this->label().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->label());
}
// string language_code = 2;
if (this->language_code().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->language_code());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WebDetection_WebLabel::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
GOOGLE_DCHECK_NE(&from, this);
const WebDetection_WebLabel* source =
::google::protobuf::internal::DynamicCastToGenerated<const WebDetection_WebLabel>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
MergeFrom(*source);
}
}
void WebDetection_WebLabel::MergeFrom(const WebDetection_WebLabel& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.label().size() > 0) {
set_label(from.label());
}
if (from.language_code().size() > 0) {
set_language_code(from.language_code());
}
}
void WebDetection_WebLabel::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WebDetection_WebLabel::CopyFrom(const WebDetection_WebLabel& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WebDetection_WebLabel::IsInitialized() const {
return true;
}
void WebDetection_WebLabel::Swap(WebDetection_WebLabel* other) {
if (other == this) return;
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
InternalSwap(other);
} else {
WebDetection_WebLabel* temp = New(GetArenaNoVirtual());
temp->MergeFrom(*other);
other->CopyFrom(*this);
InternalSwap(temp);
if (GetArenaNoVirtual() == NULL) {
delete temp;
}
}
}
void WebDetection_WebLabel::UnsafeArenaSwap(WebDetection_WebLabel* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
InternalSwap(other);
}
void WebDetection_WebLabel::InternalSwap(WebDetection_WebLabel* other) {
using std::swap;
label_.Swap(&other->label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
language_code_.Swap(&other->language_code_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata WebDetection_WebLabel::GetMetadata() const {
protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void WebDetection::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WebDetection::kWebEntitiesFieldNumber;
const int WebDetection::kFullMatchingImagesFieldNumber;
const int WebDetection::kPartialMatchingImagesFieldNumber;
const int WebDetection::kPagesWithMatchingImagesFieldNumber;
const int WebDetection::kVisuallySimilarImagesFieldNumber;
const int WebDetection::kBestGuessLabelsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
WebDetection::WebDetection()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.cloud.vision.v1p3beta1.WebDetection)
}
WebDetection::WebDetection(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
web_entities_(arena),
full_matching_images_(arena),
partial_matching_images_(arena),
pages_with_matching_images_(arena),
visually_similar_images_(arena),
best_guess_labels_(arena) {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.cloud.vision.v1p3beta1.WebDetection)
}
WebDetection::WebDetection(const WebDetection& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
web_entities_(from.web_entities_),
full_matching_images_(from.full_matching_images_),
partial_matching_images_(from.partial_matching_images_),
pages_with_matching_images_(from.pages_with_matching_images_),
visually_similar_images_(from.visually_similar_images_),
best_guess_labels_(from.best_guess_labels_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.cloud.vision.v1p3beta1.WebDetection)
}
void WebDetection::SharedCtor() {
}
WebDetection::~WebDetection() {
// @@protoc_insertion_point(destructor:google.cloud.vision.v1p3beta1.WebDetection)
SharedDtor();
}
void WebDetection::SharedDtor() {
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}
void WebDetection::ArenaDtor(void* object) {
WebDetection* _this = reinterpret_cast< WebDetection* >(object);
(void)_this;
}
void WebDetection::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void WebDetection::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* WebDetection::descriptor() {
::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const WebDetection& WebDetection::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::scc_info_WebDetection.base);
return *internal_default_instance();
}
void WebDetection::Clear() {
// @@protoc_insertion_point(message_clear_start:google.cloud.vision.v1p3beta1.WebDetection)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
web_entities_.Clear();
full_matching_images_.Clear();
partial_matching_images_.Clear();
pages_with_matching_images_.Clear();
visually_similar_images_.Clear();
best_guess_labels_.Clear();
_internal_metadata_.Clear();
}
bool WebDetection::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.cloud.vision.v1p3beta1.WebDetection)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_web_entities()));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_full_matching_images()));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_partial_matching_images()));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_pages_with_matching_images()));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_visually_similar_images()));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_best_guess_labels()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.cloud.vision.v1p3beta1.WebDetection)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.cloud.vision.v1p3beta1.WebDetection)
return false;
#undef DO_
}
void WebDetection::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.cloud.vision.v1p3beta1.WebDetection)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->web_entities_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1,
this->web_entities(static_cast<int>(i)),
output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->full_matching_images_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2,
this->full_matching_images(static_cast<int>(i)),
output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->partial_matching_images_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3,
this->partial_matching_images(static_cast<int>(i)),
output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->pages_with_matching_images_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4,
this->pages_with_matching_images(static_cast<int>(i)),
output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->visually_similar_images_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
6,
this->visually_similar_images(static_cast<int>(i)),
output);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->best_guess_labels_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
8,
this->best_guess_labels(static_cast<int>(i)),
output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.cloud.vision.v1p3beta1.WebDetection)
}
::google::protobuf::uint8* WebDetection::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.cloud.vision.v1p3beta1.WebDetection)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->web_entities_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, this->web_entities(static_cast<int>(i)), deterministic, target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->full_matching_images_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
2, this->full_matching_images(static_cast<int>(i)), deterministic, target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->partial_matching_images_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
3, this->partial_matching_images(static_cast<int>(i)), deterministic, target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->pages_with_matching_images_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
4, this->pages_with_matching_images(static_cast<int>(i)), deterministic, target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->visually_similar_images_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
6, this->visually_similar_images(static_cast<int>(i)), deterministic, target);
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->best_guess_labels_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
8, this->best_guess_labels(static_cast<int>(i)), deterministic, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.cloud.vision.v1p3beta1.WebDetection)
return target;
}
size_t WebDetection::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.cloud.vision.v1p3beta1.WebDetection)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1;
{
unsigned int count = static_cast<unsigned int>(this->web_entities_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->web_entities(static_cast<int>(i)));
}
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2;
{
unsigned int count = static_cast<unsigned int>(this->full_matching_images_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->full_matching_images(static_cast<int>(i)));
}
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3;
{
unsigned int count = static_cast<unsigned int>(this->partial_matching_images_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->partial_matching_images(static_cast<int>(i)));
}
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4;
{
unsigned int count = static_cast<unsigned int>(this->pages_with_matching_images_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->pages_with_matching_images(static_cast<int>(i)));
}
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6;
{
unsigned int count = static_cast<unsigned int>(this->visually_similar_images_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->visually_similar_images(static_cast<int>(i)));
}
}
// repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8;
{
unsigned int count = static_cast<unsigned int>(this->best_guess_labels_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->best_guess_labels(static_cast<int>(i)));
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WebDetection::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection)
GOOGLE_DCHECK_NE(&from, this);
const WebDetection* source =
::google::protobuf::internal::DynamicCastToGenerated<const WebDetection>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.cloud.vision.v1p3beta1.WebDetection)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.cloud.vision.v1p3beta1.WebDetection)
MergeFrom(*source);
}
}
void WebDetection::MergeFrom(const WebDetection& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.cloud.vision.v1p3beta1.WebDetection)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
web_entities_.MergeFrom(from.web_entities_);
full_matching_images_.MergeFrom(from.full_matching_images_);
partial_matching_images_.MergeFrom(from.partial_matching_images_);
pages_with_matching_images_.MergeFrom(from.pages_with_matching_images_);
visually_similar_images_.MergeFrom(from.visually_similar_images_);
best_guess_labels_.MergeFrom(from.best_guess_labels_);
}
void WebDetection::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WebDetection::CopyFrom(const WebDetection& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.cloud.vision.v1p3beta1.WebDetection)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WebDetection::IsInitialized() const {
return true;
}
void WebDetection::Swap(WebDetection* other) {
if (other == this) return;
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
InternalSwap(other);
} else {
WebDetection* temp = New(GetArenaNoVirtual());
temp->MergeFrom(*other);
other->CopyFrom(*this);
InternalSwap(temp);
if (GetArenaNoVirtual() == NULL) {
delete temp;
}
}
}
void WebDetection::UnsafeArenaSwap(WebDetection* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
InternalSwap(other);
}
void WebDetection::InternalSwap(WebDetection* other) {
using std::swap;
CastToBase(&web_entities_)->InternalSwap(CastToBase(&other->web_entities_));
CastToBase(&full_matching_images_)->InternalSwap(CastToBase(&other->full_matching_images_));
CastToBase(&partial_matching_images_)->InternalSwap(CastToBase(&other->partial_matching_images_));
CastToBase(&pages_with_matching_images_)->InternalSwap(CastToBase(&other->pages_with_matching_images_));
CastToBase(&visually_similar_images_)->InternalSwap(CastToBase(&other->visually_similar_images_));
CastToBase(&best_guess_labels_)->InternalSwap(CastToBase(&other->best_guess_labels_));
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata WebDetection::GetMetadata() const {
protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fcloud_2fvision_2fv1p3beta1_2fweb_5fdetection_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace v1p3beta1
} // namespace vision
} // namespace cloud
} // namespace google
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::cloud::vision::v1p3beta1::WebDetection_WebEntity* Arena::CreateMaybeMessage< ::google::cloud::vision::v1p3beta1::WebDetection_WebEntity >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::cloud::vision::v1p3beta1::WebDetection_WebEntity >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::cloud::vision::v1p3beta1::WebDetection_WebImage* Arena::CreateMaybeMessage< ::google::cloud::vision::v1p3beta1::WebDetection_WebImage >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::cloud::vision::v1p3beta1::WebDetection_WebImage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::cloud::vision::v1p3beta1::WebDetection_WebPage* Arena::CreateMaybeMessage< ::google::cloud::vision::v1p3beta1::WebDetection_WebPage >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::cloud::vision::v1p3beta1::WebDetection_WebPage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::cloud::vision::v1p3beta1::WebDetection_WebLabel* Arena::CreateMaybeMessage< ::google::cloud::vision::v1p3beta1::WebDetection_WebLabel >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::cloud::vision::v1p3beta1::WebDetection_WebLabel >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::cloud::vision::v1p3beta1::WebDetection* Arena::CreateMaybeMessage< ::google::cloud::vision::v1p3beta1::WebDetection >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::cloud::vision::v1p3beta1::WebDetection >(arena);
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
| [
"[email protected]"
] | |
c606c24b2f5ada10d7c52a2e4dfdf1e5a7c0c98d | 4612e46be4ccd2c05c67baa6359b7d0281fd5f1a | /platform/shared_library.cpp | 346a4222b7b5f434c25c81df829e9cb830e6e842 | [
"Apache-2.0"
] | permissive | RedBeard0531/mongo_utils | eed1e06c18cf6ff0e6f076fdfc8a71d5791bb95c | 402c2023df7d67609ce9da8e405bf13cdd270e20 | refs/heads/master | 2021-03-31T01:03:41.719260 | 2018-06-03T11:27:47 | 2018-06-03T11:27:47 | 124,802,061 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,109 | cpp | /**
* Copyright (C) 2015 MongoDB Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mongo/platform/basic.h"
#include "mongo/platform/shared_library.h"
namespace mongo {
typedef StatusWith<void (*)()> StatusWithFunc;
SharedLibrary::SharedLibrary(void* handle) : _handle(handle) {}
StatusWithFunc SharedLibrary::getFunction(StringData name) {
StatusWith<void*> s = getSymbol(name);
if (!s.isOK()) {
return StatusWithFunc(s.getStatus());
}
return StatusWithFunc(reinterpret_cast<void (*)()>(s.getValue()));
}
} // namespace mongo
| [
"[email protected]"
] | |
05c0aef4bf23254cf0bca41fe134b993afc1ca15 | 9e59d49a08fd1e7e9ea17744e77c7b040827e4c9 | /src/graphics/render-command.cpp | 80d3800b1b79494fe61f1151a7d7b76358c9bdf2 | [
"MIT"
] | permissive | guillaume-haerinck/cube-beast-editor | b39ded9e72535e676274cc9422e60bd43c09bb8f | 78c2db3e7f33a1944ef6202c8ae33f4008695153 | refs/heads/master | 2021-07-21T23:36:30.595074 | 2020-10-13T10:06:57 | 2020-10-13T10:06:57 | 223,377,434 | 8 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 26,470 | cpp | #include "render-command.h"
#include <spdlog/spdlog.h>
#include <debug_break/debug_break.h>
#include <stb_image/stb_image.h>
#include "graphics/gl-exception.h"
#include "graphics/constant-buffer.h"
RenderCommand::RenderCommand() {}
RenderCommand::~RenderCommand() {}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// FEATURES ////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::clear() const {
GLCall(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
}
void RenderCommand::enableDepthTest() const {
GLCall(glEnable(GL_DEPTH_TEST));
}
void RenderCommand::disableDepthTest() const {
GLCall(glDisable(GL_DEPTH_TEST));
}
void RenderCommand::enableFaceCulling() const {
GLCall(glEnable(GL_CULL_FACE));
}
void RenderCommand::enableDebugOutput() const {
#ifndef __EMSCRIPTEN__
if (GLAD_GL_KHR_debug) {
GLCall(glEnable(GL_DEBUG_OUTPUT_KHR));
GLCall(glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR));
GLCall(glDebugMessageCallbackKHR(glexp::messageCallback, 0)); // FIXME NvidiaNsight crashes if this function is called
// Disable notifications. Harmless messages about what is bound
GLCall(glDebugMessageControlKHR(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_NOTIFICATION_KHR, 0, nullptr, GL_FALSE));
} else {
spdlog::warn("[Glad] KHR_debug extension not supported. OpenGL debug info disabled");
}
#endif
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// CREATION ////////////////////////////////
///////////////////////////////////////////////////////////////////////////
AttributeBuffer RenderCommand::createAttributeBuffer(const void* vertices, unsigned int count, unsigned int stride, AttributeBufferUsage usage, AttributeBufferType type) const {
unsigned int id;
GLCall(glGenBuffers(1, &id));
GLCall(glBindBuffer(GL_ARRAY_BUFFER, id));
GLCall(glBufferData(GL_ARRAY_BUFFER, stride * count, vertices, attributeBufferUsageToOpenGLBaseType(usage)));
AttributeBuffer buffer = {};
buffer.bufferId = id;
buffer.byteWidth = stride * count;
buffer.count = count;
buffer.stride = stride;
buffer.type = type;
buffer.usage = usage;
return buffer;
}
VertexBuffer RenderCommand::createVertexBuffer(const PipelineInputDescription& description, AttributeBuffer* attributeBuffers) const {
GLuint va;
GLCall(glGenVertexArrays(1, &va));
GLCall(glBindVertexArray(va));
// Set layout
unsigned int vbIndex = 0;
unsigned int elementId = 0;
for (const auto& element : description) {
GLCall(glBindBuffer(GL_ARRAY_BUFFER, attributeBuffers[elementId].bufferId));
unsigned int iter = 1;
if (element.type == ShaderDataType::Mat3)
iter = 3;
else if (element.type == ShaderDataType::Mat4)
iter = 4;
for (unsigned int i = 0; i < iter; i++) {
GLCall(glEnableVertexAttribArray(vbIndex + i));
if (isShaderDataTypeIntegrer(element.type)) {
GLCall(glVertexAttribIPointer(
vbIndex + i,
element.getComponentCount() / iter,
shaderDataTypeToOpenGLBaseType(element.type),
element.size,
(const void*) ((element.size / iter) * i)
));
} else {
GLCall(glVertexAttribPointer(
vbIndex + i,
element.getComponentCount() / iter,
shaderDataTypeToOpenGLBaseType(element.type),
element.normalized ? GL_TRUE : GL_FALSE,
element.size,
(const void*) ((element.size / iter) * i)
));
}
if (element.usage == BufferElementUsage::PerInstance) {
GLCall(glVertexAttribDivisor(vbIndex + i, 1));
}
}
elementId++;
vbIndex += iter;
}
GLCall(glBindVertexArray(0));
VertexBuffer vb = {};
vb.vertexArrayId = va;
vb.buffers.assign(attributeBuffers, attributeBuffers + description.size());
return vb;
}
IndexBuffer RenderCommand::createIndexBuffer(const void* indices, unsigned int count, IndexBuffer::dataType type) const {
unsigned int id;
GLCall(glGenBuffers(1, &id));
GLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, id));
GLCall(glBufferData(GL_ELEMENT_ARRAY_BUFFER, count * sizeof(unsigned int), indices, GL_STATIC_DRAW));
IndexBuffer buffer = {};
buffer.bufferId = id;
buffer.count = count;
buffer.type = type;
return buffer;
}
ConstantBuffer RenderCommand::createConstantBuffer(const char* name, unsigned int bindingPoint, unsigned int byteWidth, void* data) const {
assert(byteWidth % 16 == 0 && "Constant Buffer byteWidth must be a multiple of 16 !");
unsigned int cbId = 0;
GLCall(glGenBuffers(1, &cbId));
GLCall(glBindBuffer(GL_UNIFORM_BUFFER, cbId));
GLCall(glBufferData(GL_UNIFORM_BUFFER, byteWidth, data, GL_DYNAMIC_COPY));
GLCall(glBindBuffer(GL_UNIFORM_BUFFER, 0));
ConstantBuffer cb = {};
cb.bufferId = cbId;
cb.byteWidth = byteWidth;
cb.bindingPoint = bindingPoint;
cb.name = name;
return cb;
}
Pipeline RenderCommand::createPipeline(const char* vsSrc, const char* fsSrc, const std::vector<ConstantBuffer>& cbs, const std::vector<std::string>& samplerNames) const {
// Compile vertex shader
unsigned int vsId = glCreateShader(GL_VERTEX_SHADER);
GLCall(glShaderSource(vsId, 1, &vsSrc, nullptr));
GLCall(glCompileShader(vsId));
if (!hasShaderCompiled(vsId, GL_VERTEX_SHADER)) {
spdlog::info("{}", vsSrc);
debug_break();
}
// Compile fragment shader
unsigned int fsId = glCreateShader(GL_FRAGMENT_SHADER);
GLCall(glShaderSource(fsId, 1, &fsSrc, nullptr));
GLCall(glCompileShader(fsId));
if (!hasShaderCompiled(fsId, GL_FRAGMENT_SHADER)) {
spdlog::info("\n{}", fsSrc);
debug_break();
}
// Compile pipeline
unsigned int programId = glCreateProgram();
GLCall(glAttachShader(programId, vsId));
GLCall(glAttachShader(programId, fsId));
GLCall(glLinkProgram(programId));
GLCall(glDeleteShader(vsId));
GLCall(glDeleteShader(fsId));
// Check fs and vs link errors
GLCall(glValidateProgram(programId));
unsigned int isLinked = 0;
GLCall(glGetProgramiv(programId, GL_LINK_STATUS, (int*)&isLinked));
if (isLinked == GL_FALSE) {
spdlog::error("[createPipeline] Cannot link shaders");
int length;
glGetProgramiv(programId, GL_INFO_LOG_LENGTH, &length);
if (length > 0) {
std::vector<char> message(length + 1);
glGetProgramInfoLog(programId, length, &length, &message[0]);
std::string e(message.begin(), message.end());
spdlog::error("{}", e);
} else {
spdlog::info("'{} /n /n {}'", vsSrc, fsSrc);
}
glDeleteProgram(programId);
debug_break();
assert(false);
}
// Link constant buffers
GLCall(glUseProgram(programId));
Pipeline sPipeline = {};
for (const ConstantBuffer& cb : cbs) {
unsigned int blockIndex = glGetUniformBlockIndex(programId, cb.name.c_str());
GLCall(glUniformBlockBinding(programId, blockIndex, cb.bindingPoint));
GLCall(glBindBufferBase(GL_UNIFORM_BUFFER, cb.bindingPoint, cb.bufferId));
sPipeline.cbNames.push_back(cb.name);
}
// Set samplers texture units to the order they were declared
for (size_t i = 0; i < samplerNames.size(); i++) {
int samplerLocation = glGetUniformLocation(programId, samplerNames.at(i).c_str());
if (samplerLocation != -1) {
GLCall(glUniform1i(samplerLocation, i));
} else {
spdlog::error("[createPipeline] Sampler '{}' doesn't exist, or is not used. It must affect the fragment shader output variable !", samplerNames.at(i));
debug_break();
assert(false && "Sampler name doesn't exist !");
}
}
// Unbind
GLCall(glUseProgram(0));
// Save to singleton components
sPipeline.programIndex = programId;
return sPipeline;
}
RenderTarget RenderCommand::createRenderTarget(const PipelineOutputDescription& description, const glm::ivec2& size) const {
// Create new framebuffer
unsigned int fb;
GLCall(glGenFramebuffers(1, &fb));
GLCall(glBindFramebuffer(GL_FRAMEBUFFER, fb));
unsigned int slot = 0;
RenderTarget rt;
for (const auto& target : description) {
unsigned int rbo;
unsigned int textureId;
switch (target.type) {
case RenderTargetType::Texture:
GLCall(glGenTextures(1, &textureId));
GLCall(glBindTexture(GL_TEXTURE_2D, textureId));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
rt.textureIds.push_back(textureId);
break;
case RenderTargetType::RenderBuffer:
GLCall(glGenRenderbuffers(1, &rbo));
GLCall(glBindRenderbuffer(GL_RENDERBUFFER, rbo));
rt.renderBufferIds.push_back(rbo);
break;
default:
spdlog::error("[createRenderTarget] Unknown render target type");
debug_break();
assert(false);
break;
}
switch (target.usage) {
case RenderTargetUsage::Color:
if (target.type == RenderTargetType::Texture) {
GLCall(glTexImage2D(GL_TEXTURE_2D, 0, renderTargetChannelsToOpenGLInternalFormat(target.channels, target.dataType), size.x, size.y, 0, renderTargetChannelsToOpenGLBaseFormat(target.channels), renderTargetDataTypeToOpenGLBaseType(target.dataType), 0));
GLCall(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + slot, GL_TEXTURE_2D, textureId, 0));
} else if (target.type == RenderTargetType::RenderBuffer) {
GLCall(glRenderbufferStorage(GL_RENDERBUFFER, renderTargetChannelsToOpenGLInternalFormat(target.channels, target.dataType), size.x, size.y));
GLCall(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + slot, GL_RENDERBUFFER, rbo));
}
slot++;
break;
case RenderTargetUsage::Depth:
if (target.type == RenderTargetType::Texture) {
GLCall(glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size.x, size.y, 0, GL_DEPTH_COMPONENT, renderTargetDataTypeToOpenGLBaseType(target.dataType), 0));
GLCall(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, textureId, 0));
} else if (target.type == RenderTargetType::RenderBuffer) {
GLCall(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size.x, size.y));
GLCall(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rbo));
}
break;
case RenderTargetUsage::DepthStencil:
if (target.type == RenderTargetType::Texture) {
GLCall(glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, size.x, size.y, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0));
GLCall(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, textureId, 0));
} else if (target.type == RenderTargetType::RenderBuffer) {
GLCall(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, size.x, size.y));
GLCall(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo));
}
break;
default:
spdlog::error("[createRenderTarget] Unknown render target usage");
debug_break();
assert(false);
break;
}
}
// Attach color targets to framebuffer
if (slot == 0) {
GLCall(glDrawBuffers(0, GL_NONE));
} else {
std::vector<unsigned int> attachments(slot);
for (unsigned int i = 0; i < slot; i++) {
attachments.at(i) = GL_COLOR_ATTACHMENT0 + i;
}
GLCall(glDrawBuffers(slot, attachments.data()));
}
// Check for errors
auto status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status!= GL_FRAMEBUFFER_COMPLETE) {
std::string detail = "";
switch (status) {
case GL_FRAMEBUFFER_UNDEFINED: detail = "undefined"; break;
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: detail = "Incomplete attachment"; break;
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: detail = "Incomplete missing attachment"; break;
case GL_FRAMEBUFFER_UNSUPPORTED: detail = "unsupported"; break;
case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: detail = "Incomplete multisample"; break;
default:
break;
}
spdlog::error("[createRenderTarget] FrameBuffer is not complete : {}", detail);
debug_break();
assert(false);
}
// Create pixel buffer object if there is one
PixelBuffer pb;
pb.bufferId = 0;
unsigned int readBufferSlot = 0;
for (const auto& item : description) {
if (item.operation == RenderTargetOperation::ReadPixel) {
pb.readBufferSlot = readBufferSlot;
GLCall(glGenBuffers(1, &pb.bufferId));
GLCall(glBindBuffer(GL_PIXEL_PACK_BUFFER, pb.bufferId));
GLCall(glBufferData(GL_PIXEL_PACK_BUFFER, sizeof(unsigned char) * 4, nullptr, GL_DYNAMIC_READ));
GLCall(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
break;
}
readBufferSlot++;
}
rt.pixelBuffer = pb;
// Unbind
GLCall(glBindRenderbuffer(GL_RENDERBUFFER, 0));
GLCall(glBindTexture(GL_TEXTURE_2D, 0));
GLCall(glBindFramebuffer(GL_FRAMEBUFFER, 0));
// Assign to singleton components
rt.frameBufferId = fb;
return rt;
}
Texture RenderCommand::createTexture(unsigned int slot, const unsigned char* data, unsigned int dataSize) const {
int width, height, bpp;
unsigned char* localBuffer = stbi_load_from_memory(data, dataSize, &width, &height, &bpp, 4);
if (!localBuffer) {
spdlog::critical("[Texture] Unable to open texture");
debug_break();
}
unsigned int id;
GLCall(glGenTextures(1, &id));
GLCall(glActiveTexture(GL_TEXTURE0 + slot));
GLCall(glBindTexture(GL_TEXTURE_2D, id));
const unsigned int numMipMap = 1;
GLCall(glTexStorage2D(GL_TEXTURE_2D, numMipMap, GL_RGBA8, width, height));
GLCall(glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, localBuffer));
GLCall(glGenerateMipmap(GL_TEXTURE_2D));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT));
GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT));
GLCall(glBindTexture(GL_TEXTURE_2D, 0)); // unbind
if (localBuffer) {
stbi_image_free(localBuffer);
}
// Return result
Texture texture = {};
texture.id = id;
texture.slot = slot;
return texture;
}
///////////////////////////////////////////////////////////////////////////
////////////////////////////////// BINDING ////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::bindVertexBuffer(const VertexBuffer& vb) const {
GLCall(glBindVertexArray(vb.vertexArrayId));
}
void RenderCommand::bindIndexBuffer(const IndexBuffer& ib) const {
GLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib.bufferId));
}
void RenderCommand::bindTexture(const Texture& tex) const {
GLCall(glActiveTexture(GL_TEXTURE0 + tex.slot));
GLCall(glBindTexture(GL_TEXTURE_2D, tex.id));
}
void RenderCommand::bindTextureIds(const std::vector<unsigned int>& textureIds) const {
for (size_t i = 0; i < textureIds.size(); i++) {
GLCall(glActiveTexture(GL_TEXTURE0 + i));
GLCall(glBindTexture(GL_TEXTURE_2D, textureIds.at(i)));
}
}
void RenderCommand::bindPipeline(const Pipeline& pipeline) const {
GLCall(glUseProgram(pipeline.programIndex));
}
void RenderCommand::bindRenderTarget(const RenderTarget rt) const {
GLCall(glBindFramebuffer(GL_FRAMEBUFFER, rt.frameBufferId));
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// UNBINDING ///////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::unbindRenderTarget() const {
GLCall(glBindFramebuffer(GL_FRAMEBUFFER, 0));
}
void RenderCommand::unbindVertexBuffer() const {
GLCall(glBindVertexArray(0));
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// UPDATING ////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::updateConstantBuffer(const ConstantBuffer& cb, const void* data, unsigned int dataByteWidth) const {
assert(dataByteWidth <= cb.byteWidth && "New attribute buffer data exceed the size of the allocated buffer");
GLCall(glBindBuffer(GL_UNIFORM_BUFFER, cb.bufferId));
GLCall(glBufferSubData(GL_UNIFORM_BUFFER, 0, dataByteWidth, data));
GLCall(glBindBuffer(GL_UNIFORM_BUFFER, 0));
}
void RenderCommand::updateAttributeBuffer(const AttributeBuffer& buffer, const void* data, unsigned int dataByteWidth) const {
assert(dataByteWidth < buffer.byteWidth && "New attribute buffer data exceed the size of the allocated buffer");
GLCall(glBindBuffer(GL_ARRAY_BUFFER, buffer.bufferId));
GLCall(glBufferSubData(GL_ARRAY_BUFFER, 0, dataByteWidth, data));
GLCall(glBindBuffer(GL_ARRAY_BUFFER, 0));
}
void RenderCommand::updateAttributeBufferAnySize(AttributeBuffer& buffer, const void* data, unsigned int dataByteWidth) const {
if (dataByteWidth >= buffer.byteWidth) {
GLCall(glBindBuffer(GL_ARRAY_BUFFER, buffer.bufferId));
GLCall(glBufferData(GL_ARRAY_BUFFER, dataByteWidth * 2, 0, attributeBufferUsageToOpenGLBaseType(buffer.usage)));
buffer.byteWidth = dataByteWidth * 2;
}
updateAttributeBuffer(buffer, data, dataByteWidth);
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// READING /////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::prepareReadPixelBuffer(PixelBuffer& buffer, const glm::ivec2& pixelPos) const {
buffer.pixelPos = pixelPos; // Temp time to fix wasm
GLCall(glBindBuffer(GL_PIXEL_PACK_BUFFER, buffer.bufferId));
GLCall(glReadBuffer(GL_COLOR_ATTACHMENT0 + buffer.readBufferSlot));
// TODO abstract GL_RGBA and UNSIGNED BYTE into pixelbuffer member data
GLCall(glReadPixels(pixelPos.x, pixelPos.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, 0));
GLCall(glReadBuffer(GL_NONE));
GLCall(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
}
unsigned char* RenderCommand::readPixelBuffer(const PixelBuffer& buffer) const {
static unsigned char pixel[4] = {0, 0, 0, 0};
unsigned char* ptr;
#ifndef __EMSCRIPTEN__
GLCall(glBindBuffer(GL_PIXEL_PACK_BUFFER, buffer.bufferId));
ptr = (unsigned char*) (glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, sizeof(unsigned char) * 4, GL_MAP_READ_BIT));
GLCall(glUnmapBuffer(GL_PIXEL_PACK_BUFFER));
if (ptr != nullptr) {
memcpy(pixel, ptr, sizeof(unsigned char) * 4);
}
GLCall(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
#else
// TODO use getBufferSubData
// glGetBufferSubData(GL_PIXEL_PACK_BUFFER, 0, &pixel, 0, sizeof(unsigned char) * 4);
GLCall(glReadBuffer(GL_COLOR_ATTACHMENT0 + buffer.readBufferSlot));
GLCall(glReadPixels(buffer.pixelPos.x, buffer.pixelPos.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel));
GLCall(glReadBuffer(GL_NONE));
#endif
// FIXME RenderDoc crashes with "Verify Buffer Access" enabled if pixel != {0, 0, 0, 0};
return pixel;
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// DRAWING /////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::drawLines(unsigned int count) const {
GLCall(glDrawArrays(GL_LINES, 0, count));
}
void RenderCommand::drawIndexed(unsigned int count, IndexBuffer::dataType type) const {
GLCall(glDrawElements(GL_TRIANGLES, count, indexBufferDataTypeToOpenGLBaseType(type), (void*) 0));
}
void RenderCommand::drawIndexedInstances(unsigned int indexCount, IndexBuffer::dataType type, unsigned int drawCount) const {
GLCall(glDrawElementsInstanced(GL_TRIANGLES, indexCount, indexBufferDataTypeToOpenGLBaseType(type), (void*)0, drawCount));
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////// DELETION ////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void RenderCommand::deleteRenderTarget(RenderTarget& rt) const {
if (rt.pixelBuffer.bufferId != 0)
GLCall(glDeleteBuffers(1, &rt.pixelBuffer.bufferId));
GLCall(glDeleteFramebuffers(1, &rt.frameBufferId));
GLCall(glDeleteRenderbuffers(rt.renderBufferIds.size(), rt.renderBufferIds.data()));
GLCall(glDeleteTextures(rt.textureIds.size(), rt.textureIds.data()));
rt.frameBufferId = 0;
rt.renderBufferIds.clear();
rt.textureIds.clear();
}
void RenderCommand::deleteVertexBuffer(VertexBuffer& vb) const {
GLCall(glDeleteVertexArrays(1, &vb.vertexArrayId));
for (auto buffer : vb.buffers) {
GLCall(glDeleteBuffers(1, &buffer.bufferId));
}
vb.vertexArrayId = 0;
vb.buffers.clear();
}
void RenderCommand::deleteConstantBuffer(ConstantBuffer& cb) const {
GLCall(glDeleteBuffers(1, &cb.bufferId));
cb.byteWidth = 0;
cb.bufferId = 0;
}
void RenderCommand::deleteIndexBuffer(IndexBuffer& ib) const {
GLCall(glDeleteBuffers(1, &ib.bufferId));
ib.bufferId = 0;
ib.count = 0;
}
void RenderCommand::deleteTexture(Texture& texture) const {
GLCall(glDeleteTextures(1, &texture.id));
texture.id = 0;
texture.slot = 0;
}
void RenderCommand::deletePipeline(Pipeline& pip) const {
GLCall(glDeleteProgram(pip.programIndex));
pip.programIndex = 0;
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////// PRIVATE METHODS /////////////////////////////
///////////////////////////////////////////////////////////////////////////
bool RenderCommand::hasShaderCompiled(unsigned int shaderId, unsigned int shaderType) const {
int result;
glGetShaderiv(shaderId, GL_COMPILE_STATUS, &result);
if (result == GL_FALSE) {
int length;
glGetShaderiv(shaderId, GL_INFO_LOG_LENGTH, &length);
char* message = (char*) alloca(length * sizeof(char));
glGetShaderInfoLog(shaderId, length, &length, message);
auto const typeString = [shaderType]() {
switch (shaderType) {
case GL_VERTEX_SHADER: return "vertex";
case GL_FRAGMENT_SHADER: return "fragment";
default: return "unknown type";
}
}();
spdlog::error("[Shader] Failed to compile {} shader", typeString);
spdlog::error("[Shader] {}", message);
GLCall(glDeleteShader(shaderId));
return false;
}
return true;
}
bool RenderCommand::isShaderDataTypeIntegrer(ShaderDataType type) const {
switch (type) {
case ShaderDataType::Float: return false;
case ShaderDataType::Float2: return false;
case ShaderDataType::Float3: return false;
case ShaderDataType::Float4: return false;
case ShaderDataType::Mat3: return false;
case ShaderDataType::Mat4: return false;
case ShaderDataType::Int: return true;
case ShaderDataType::Int2: return true;
case ShaderDataType::Int3: return true;
case ShaderDataType::Int4: return true;
case ShaderDataType::UInt: return true;
case ShaderDataType::Bool: return true;
}
assert(false && "Unknown ShaderDataType!");
return false;
}
GLenum RenderCommand::shaderDataTypeToOpenGLBaseType(ShaderDataType type) const {
switch (type) {
case ShaderDataType::Float: return GL_FLOAT;
case ShaderDataType::Float2: return GL_FLOAT;
case ShaderDataType::Float3: return GL_FLOAT;
case ShaderDataType::Float4: return GL_FLOAT;
case ShaderDataType::Mat3: return GL_FLOAT;
case ShaderDataType::Mat4: return GL_FLOAT;
case ShaderDataType::Int: return GL_INT;
case ShaderDataType::Int2: return GL_INT;
case ShaderDataType::Int3: return GL_INT;
case ShaderDataType::Int4: return GL_INT;
case ShaderDataType::UInt: return GL_UNSIGNED_INT;
case ShaderDataType::Bool: return GL_BOOL;
}
assert(false && "Unknown ShaderDataType!");
return 0;
}
GLenum RenderCommand::indexBufferDataTypeToOpenGLBaseType(IndexBuffer::dataType type) const {
switch (type) {
case IndexBuffer::dataType::UNSIGNED_BYTE : return GL_UNSIGNED_BYTE;
case IndexBuffer::dataType::UNSIGNED_SHORT : return GL_UNSIGNED_SHORT;
case IndexBuffer::dataType::UNSIGNED_INT : return GL_UNSIGNED_INT;
default: break;
}
assert(false && "Unknown indexBufferDataType!");
return 0;
}
GLenum RenderCommand::renderTargetChannelsToOpenGLInternalFormat(RenderTargetChannels channels, RenderTargetDataType dataType) const {
if (dataType == RenderTargetDataType::UCHAR) {
switch (channels) {
case RenderTargetChannels::R : return GL_R8;
case RenderTargetChannels::RG : return GL_RG8;
case RenderTargetChannels::RGB : return GL_RGB8;
case RenderTargetChannels::RGBA : return GL_RGBA8;
default: break;
}
} else if (dataType == RenderTargetDataType::FLOAT) {
switch (channels) {
case RenderTargetChannels::R : return GL_R16F;
case RenderTargetChannels::RG : return GL_RG16F;
case RenderTargetChannels::RGB : return GL_RGB16F;
case RenderTargetChannels::RGBA : return GL_RGBA16F;
default: break;
}
}
assert(false && "Unknown RenderTargetChannels type !");
return 0;
}
GLenum RenderCommand::renderTargetChannelsToOpenGLBaseFormat(RenderTargetChannels channels) const {
switch (channels) {
case RenderTargetChannels::R : return GL_RED;
case RenderTargetChannels::RG : return GL_RG;
case RenderTargetChannels::RGB : return GL_RGB;
case RenderTargetChannels::RGBA : return GL_RGBA;
default: break;
}
assert(false && "Unknown RenderTargetChannels type !");
return 0;
}
GLenum RenderCommand::renderTargetDataTypeToOpenGLBaseType(RenderTargetDataType dataType) const {
switch (dataType) {
case RenderTargetDataType::UCHAR : return GL_UNSIGNED_BYTE;
case RenderTargetDataType::USHORT : return GL_UNSIGNED_SHORT;
case RenderTargetDataType::UINT : return GL_UNSIGNED_INT;
case RenderTargetDataType::FLOAT : return GL_FLOAT;
default: break;
}
assert(false && "Unknown RenderTargetDataType !");
return 0;
}
GLenum RenderCommand::attributeBufferUsageToOpenGLBaseType(AttributeBufferUsage usage) const {
switch (usage) {
case AttributeBufferUsage::STATIC_DRAW: return GL_STATIC_DRAW;
case AttributeBufferUsage::DYNAMIC_DRAW: return GL_DYNAMIC_DRAW;
default:
break;
}
assert(false && "[createAttributeBuffer] Unknow usage");
return 0;
}
| [
"[email protected]"
] | |
ca20be33fa2f540752f513938ecc572ebae3275e | 1707be6d432614b0677a8faa45d41018dccd16ba | /weighting/include2/LbJpsiLAng.hh | 5f824c3c4dbc4d91b00b59b56468dd185a6e68f8 | [] | no_license | lucapescatore88/Lmumu | 429063e0af88d425292988baf0ba52d5c41d4d01 | 7c791b8289718da221df082bd9aff94ec45ab5a5 | refs/heads/master | 2021-01-22T01:34:05.206937 | 2015-07-01T21:05:48 | 2015-07-01T21:05:48 | 38,391,606 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,229 | hh | #ifndef LBJPSILANG_HH
#define LBJPSILANG_HH
#include "TComplex.h"
#include "TLorentzVector.h"
class LbJpsiLAng
{
public:
LbJpsiLAng();
LbJpsiLAng(double polarization, double as, double alphaB, double R0,
double R1, double apPhase=0, double amPhase=0, double bpPhase=0, double bmPhase=0);
~LbJpsiLAng() {};
double physicsRate(double cosTheta, double cosTheta1, double cosTheta2, double phi1, double phi2);
void setAlphabR0R1(double alphaB, double R0, double R1,
double apPhase=0, double amPhase=0, double bpPhase=0, double bmPhase=0);
void setPolarization(double polarization) {Pb=polarization;};
void setLambdaAsymmetry(double as) {alphaLambda=as;};
static void LbPsiRAngles(TLorentzVector initialProton, TLorentzVector pB,
TLorentzVector pJpsi, TLorentzVector pLambda, TLorentzVector pmp,
TLorentzVector pmm, TLorentzVector pp, TLorentzVector ppi, int pCharge,
double& cosTheta, double& cosThetaL, double& cosThetaB,
double& phiL, double& phiB, double& dphi);
void setVariation(int variation);
private:
double term0(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term1(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term2(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term3(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term4(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term5(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term6(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term7(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term8(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term9(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term10(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term11(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term12(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term13(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term14(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term15(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term16(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term17(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term18(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
double term19(TComplex ap, TComplex am, TComplex bp, TComplex bm, double Pb, double alphaLambda,
double cosTheta1, double cosTheta2, double phi1, double phi2, double cosTheta);
TComplex aplus, aminus, bplus, bminus;
double Pb, alphaLambda;
};
#endif
| [
"[email protected]"
] | |
2bfa5ff13add2df6d142c226f983cd416e390bce | f53891174b71e3b52497b3ab56b30ca7056ef1b7 | /drake/examples/user_libraries/geometry/Shape.hh | f8eb4f3278dbe0aa72444a7dadf5ccf4543311c9 | [
"Apache-2.0",
"AGPL-3.0-only"
] | permissive | infinit/elle | 050e0a3825a585add8899cf8dd8e25b0531c67ce | 1a8f3df18500a9854a514cbaf9824784293ca17a | refs/heads/master | 2023-09-04T01:15:06.820585 | 2022-09-17T08:43:45 | 2022-09-17T08:43:45 | 51,672,792 | 533 | 51 | Apache-2.0 | 2023-05-22T21:35:50 | 2016-02-14T00:38:23 | C++ | UTF-8 | C++ | false | false | 259 | hh | #ifndef GEOMETRY_COLOR_HH
# define GEOMETRY_COLOR_HH
# include <ostream>
namespace geometry
{
struct Shape
{
Shape();
virtual
~Shape();
};
}
std::ostream&
operator <<(std::ostream& out,
geometry::Shape const& color);
#endif
| [
"[email protected]"
] | |
be827abe2df162e1c742326d01e6f890bbf0509e | 74e74bb94cb6065eebccc52f4dcf63d4f09af4f7 | /old/ColorfulCookie.cpp | 87eead9e96e4a4e46abb639b27d64d3a6bbbd2d8 | [] | no_license | kssilveira/topcoder | 39f247e355285a29c3a859428830f40e06933e9a | 8acf4e459c0637bb98081f7469197d0a4b5cd9bf | refs/heads/master | 2021-01-22T14:38:34.267868 | 2012-04-02T01:41:59 | 2012-04-02T01:41:59 | 3,001,657 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,744 | cpp | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>
#define r(i, n) rb(i, 0, n)
#define rb(i, b, n) rbc(i, b, n, <)
#define re(i, n) rbe(i, 0, n)
#define rbe(i, b, n) rbc(i, b, n, <=)
#define rbc(i, b, n, c) for(int i = (b); i c ((int)(n)); i++)
#define ri r(i, n)
#define rj r(j, n)
#define rk r(k, n)
#define rim r(i, m)
#define rjm r(j, m)
#define rkm r(k, m)
#define s(v) ((int) v.size())
using namespace std;
class ColorfulCookie {
public:
int getMaximum(vector <int> cookies, int P1, int P2) {
int res;
return res;
}
// BEGIN CUT HERE
public:
void run_test(int Case) { if ((Case == -1) || (Case == 0)) test_case_0(); if ((Case == -1) || (Case == 1)) test_case_1(); if ((Case == -1) || (Case == 2)) test_case_2(); if ((Case == -1) || (Case == 3)) test_case_3(); }
private:
template <typename T> string print_array(const vector<T> &V) { ostringstream os; os << "{ "; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << '\"' << *iter << "\","; os << " }"; return os.str(); }
void verify_case(int Case, const int &Expected, const int &Received) { cerr << "Test Case #" << Case << "..."; if (Expected == Received) cerr << "PASSED" << endl; else { cerr << "FAILED" << endl; cerr << "\tExpected: \"" << Expected << '\"' << endl; cerr << "\tReceived: \"" << Received << '\"' << endl; } }
void test_case_0() { int Arr0[] = {100, 100}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arg1 = 50; int Arg2 = 50; int Arg3 = 200; verify_case(0, Arg3, getMaximum(Arg0, Arg1, Arg2)); }
void test_case_1() { int Arr0[] = {50, 250, 50}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arg1 = 50; int Arg2 = 100; int Arg3 = 300; verify_case(1, Arg3, getMaximum(Arg0, Arg1, Arg2)); }
void test_case_2() { int Arr0[] = {2000}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arg1 = 100; int Arg2 = 200; int Arg3 = 0; verify_case(2, Arg3, getMaximum(Arg0, Arg1, Arg2)); }
void test_case_3() { int Arr0[] = {123, 456, 789, 555}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arg1 = 58; int Arg2 = 158; int Arg3 = 1728; verify_case(3, Arg3, getMaximum(Arg0, Arg1, Arg2)); }
// END CUT HERE
};
// BEGIN CUT HERE
int main()
{
ColorfulCookie ___test;
___test.run_test(-1);
}
// END CUT HERE
| [
"[email protected]"
] | |
3d25e5c7de2ea595b68d7b0e222867ce18746b36 | 7b4014d1cee81a4fdc54bea33be0223389125ce2 | /Homework08/Debug/md5.h | 83414b46bf23c78cb87b163b07a33b4aab4f1243 | [] | no_license | christmas-tree/it4060-network-programming | affad60c8c2d5fefc0bab17e07b7fc70a8cf7b04 | b30f023f56928b41335c1260f512147487c11175 | refs/heads/master | 2022-11-19T00:27:41.053714 | 2020-07-11T14:52:53 | 2020-07-11T14:52:53 | 263,589,916 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,544 | h | #ifndef MD5_H
#define MD5_H
// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
// rights reserved.
// License to copy and use this software is granted provided that it
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
// Algorithm" in all material mentioning or referencing this software
// or this function.
//
// License is also granted to make and use derivative works provided
// that such works are identified as "derived from the RSA Data
// Security, Inc. MD5 Message-Digest Algorithm" in all material
// mentioning or referencing the derived work.
//
// RSA Data Security, Inc. makes no representations concerning either
// the merchantability of this software or the suitability of this
// software for any particular purpose. It is provided "as is"
// without express or implied warranty of any kind.
//
// These notices must be retained in any copies of any part of this
// documentation and/or software.
// The original md5 implementation avoids external libraries.
// This version has dependency on stdio.h for file input and
// string.h for memcpy.
#include <stdio.h>
#include <string.h>
#pragma region MD5 defines
// Constants for MD5Transform routine.
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// F, G, H and I are basic MD5 functions.
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
// ROTATE_LEFT rotates x left n bits.
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
// Rotation is separate from addition to prevent recomputation.
#define FF(a, b, c, d, x, s, ac) { \
(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) { \
(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) { \
(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#pragma endregion
typedef unsigned char BYTE;
// POINTER defines a generic pointer type
typedef unsigned char *POINTER;
// UINT2 defines a two byte word
typedef unsigned short int UINT2;
// UINT4 defines a four byte word
typedef unsigned long int UINT4;
// convenient object that wraps
// the C-functions for use in C++ only
class MD5
{
private:
struct __context_t {
UINT4 state[4]; /* state (ABCD) */
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} context;
#pragma region static helper functions
// The core of the MD5 algorithm is here.
// MD5 basic transformation. Transforms state based on block.
static void MD5Transform(UINT4 state[4], unsigned char block[64])
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode(x, block, 64);
/* Round 1 */
FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */
FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */
FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */
FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */
FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */
FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */
FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */
FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */
FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */
FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */
FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
/* Round 2 */
GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */
GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */
GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */
GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */
GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */
GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */
GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */
GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */
GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */
GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */
GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
/* Round 3 */
HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */
HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */
HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */
HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */
HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */
HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */
HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */
HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */
HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */
HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */
/* Round 4 */
II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */
II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */
II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */
II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */
II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */
II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */
II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */
II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */
II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */
II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
// Zeroize sensitive information.
memset((POINTER)x, 0, sizeof(x));
}
// Encodes input (UINT4) into output (unsigned char). Assumes len is
// a multiple of 4.
static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j + 1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j + 2] = (unsigned char)((input[i] >> 16) & 0xff);
output[j + 3] = (unsigned char)((input[i] >> 24) & 0xff);
}
}
// Decodes input (unsigned char) into output (UINT4). Assumes len is
// a multiple of 4.
static void Decode(UINT4 *output, unsigned char *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UINT4)input[j]) | (((UINT4)input[j + 1]) << 8) |
(((UINT4)input[j + 2]) << 16) | (((UINT4)input[j + 3]) << 24);
}
#pragma endregion
public:
// MAIN FUNCTIONS
MD5()
{
Init();
}
// MD5 initialization. Begins an MD5 operation, writing a new context.
void Init()
{
context.count[0] = context.count[1] = 0;
// Load magic initialization constants.
context.state[0] = 0x67452301;
context.state[1] = 0xefcdab89;
context.state[2] = 0x98badcfe;
context.state[3] = 0x10325476;
}
// MD5 block update operation. Continues an MD5 message-digest
// operation, processing another message block, and updating the
// context.
void Update(
unsigned char *input, // input block
unsigned int inputLen) // length of input block
{
unsigned int i, index, partLen;
// Compute number of bytes mod 64
index = (unsigned int)((context.count[0] >> 3) & 0x3F);
// Update number of bits
if ((context.count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context.count[1]++;
context.count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index;
// Transform as many times as possible.
if (inputLen >= partLen) {
memcpy((POINTER)&context.buffer[index], (POINTER)input, partLen);
MD5Transform(context.state, context.buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform(context.state, &input[i]);
index = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy((POINTER)&context.buffer[index], (POINTER)&input[i], inputLen - i);
}
// MD5 finalization. Ends an MD5 message-digest operation, writing the
// the message digest and zeroizing the context.
// Writes to digestRaw
void Final()
{
unsigned char bits[8];
unsigned int index, padLen;
// Save number of bits
Encode(bits, context.count, 8);
// Pad out to 56 mod 64.
index = (unsigned int)((context.count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
Update(PADDING, padLen);
// Append length (before padding)
Update(bits, 8);
// Store state in digest
Encode(digestRaw, context.state, 16);
// Zeroize sensitive information.
memset((POINTER)&context, 0, sizeof(context));
writeToString();
}
/// Buffer must be 32+1 (nul) = 33 chars long at least
void writeToString()
{
int pos;
for (pos = 0; pos < 16; pos++)
sprintf(digestChars + (pos * 2), "%02x", digestRaw[pos]);
}
public:
// an MD5 digest is a 16-byte number (32 hex digits)
BYTE digestRaw[16];
// This version of the digest is actually
// a "printf'd" version of the digest.
char digestChars[33];
/// Load a file from disk and digest it
// Digests a file and returns the result.
char* digestFile(char *filename)
{
Init();
FILE *file;
int len;
unsigned char buffer[1024];
if ((file = fopen(filename, "rb")) == NULL)
printf("%s can't be opened\n", filename);
else
{
while (len = fread(buffer, 1, 1024, file))
Update(buffer, len);
Final();
fclose(file);
}
return digestChars;
}
/// Digests a byte-array already in memory
char* digestMemory(BYTE *memchunk, int len)
{
Init();
Update(memchunk, len);
Final();
return digestChars;
}
// Digests a string and prints the result.
char* digestString(char *string)
{
Init();
Update((unsigned char*)string, strlen(string));
Final();
return digestChars;
}
};
#endif#pragma once
| [
"[email protected]"
] | |
91a9a77d15e79f068f2e670d653b8b5f85a6f1e7 | 8605b67192f218f04c03f351eac49623f751cff4 | /src/qt/bitcoin.cpp | b17c2b23f21b2d88c5cebfaf105e1fafefb74b4d | [
"MIT"
] | permissive | stakingcoin/stakingcoin | aedcb56c136b43fc4bf1373c6f1e6561c59a1999 | b011a8c844356ed767bcf830290db12f777697ec | refs/heads/master | 2021-08-19T14:06:36.898384 | 2017-11-26T15:01:29 | 2017-11-26T15:01:29 | 112,092,047 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,089 | cpp | /*
* W.J. van der Laan 2011-2012
*/
#include "bitcoingui.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#include "guiutil.h"
#include "guiconstants.h"
#include "init.h"
#include "ui_interface.h"
#include "qtipcserver.h"
#include <QApplication>
#include <QMessageBox>
#include <QTextCodec>
#include <QLocale>
#include <QTranslator>
#include <QSplashScreen>
#include <QLibraryInfo>
#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
#define _BITCOIN_QT_PLUGINS_INCLUDED
#define __INSURE__
#include <QtPlugin>
Q_IMPORT_PLUGIN(qcncodecs)
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)
Q_IMPORT_PLUGIN(qtaccessiblewidgets)
#endif
// Need a global reference for the notifications to find the GUI
static BitcoinGUI *guiref;
static QSplashScreen *splashref;
static void ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style)
{
// Message from network thread
if(guiref)
{
bool modal = (style & CClientUIInterface::MODAL);
// in case of modal message, use blocking connection to wait for user to click OK
QMetaObject::invokeMethod(guiref, "error",
modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection,
Q_ARG(QString, QString::fromStdString(caption)),
Q_ARG(QString, QString::fromStdString(message)),
Q_ARG(bool, modal));
}
else
{
printf("%s: %s\n", caption.c_str(), message.c_str());
fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str());
}
}
static bool ThreadSafeAskFee(int64_t nFeeRequired, const std::string& strCaption)
{
if(!guiref)
return false;
if(nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon)
return true;
bool payFee = false;
QMetaObject::invokeMethod(guiref, "askFee", GUIUtil::blockingGUIThreadConnection(),
Q_ARG(qint64, nFeeRequired),
Q_ARG(bool*, &payFee));
return payFee;
}
static void ThreadSafeHandleURI(const std::string& strURI)
{
if(!guiref)
return;
QMetaObject::invokeMethod(guiref, "handleURI", GUIUtil::blockingGUIThreadConnection(),
Q_ARG(QString, QString::fromStdString(strURI)));
}
static void InitMessage(const std::string &message)
{
if(splashref)
{
splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(232,186,63));
QApplication::instance()->processEvents();
}
}
static void QueueShutdown()
{
QMetaObject::invokeMethod(QCoreApplication::instance(), "quit", Qt::QueuedConnection);
}
/*
Translate string to current locale using Qt.
*/
static std::string Translate(const char* psz)
{
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
}
/* Handle runaway exceptions. Shows a message box with the problem and quits the program.
*/
static void handleRunawayException(std::exception *e)
{
PrintExceptionContinue(e, "Runaway exception");
QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. StakingCoin can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning));
exit(1);
}
#ifndef BITCOIN_QT_TEST
int main(int argc, char *argv[])
{
// Do this early as we don't want to bother initializing if we are just calling IPC
ipcScanRelay(argc, argv);
#if QT_VERSION < 0x050000
// Internal string conversion is all UTF-8
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
#endif
Q_INIT_RESOURCE(bitcoin);
QApplication app(argc, argv);
// Install global event filter that makes sure that long tooltips can be word-wrapped
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
// Command-line options take precedence:
ParseParameters(argc, argv);
// ... then bitcoin.conf:
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
// This message can not be translated, as translation is not initialized yet
// (which not yet possible because lang=XX can be overridden in bitcoin.conf in the data directory)
QMessageBox::critical(0, "StakingCoin",
QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return 1;
}
ReadConfigFile(mapArgs, mapMultiArgs);
// Application identification (must be set before OptionsModel is initialized,
// as it is used to locate QSettings)
app.setOrganizationName("StakingCoin");
//XXX app.setOrganizationDomain("");
if(GetBoolArg("-testnet")) // Separate UI settings for testnet
app.setApplicationName("StakingCoin-Qt-testnet");
else
app.setApplicationName("StakingCoin-Qt");
// ... then GUI settings:
OptionsModel optionsModel;
// Get desired locale (e.g. "de_DE") from command line or use system locale
QString lang_territory = QString::fromStdString(GetArg("-lang", QLocale::system().name().toStdString()));
QString lang = lang_territory;
// Convert to "de" only by truncating "_DE"
lang.truncate(lang_territory.lastIndexOf('_'));
QTranslator qtTranslatorBase, qtTranslator, translatorBase, translator;
// Load language files for configured locale:
// - First load the translator for the base language, without territory
// - Then load the more specific locale translator
// Load e.g. qt_de.qm
if (qtTranslatorBase.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(&qtTranslatorBase);
// Load e.g. qt_de_DE.qm
if (qtTranslator.load("qt_" + lang_territory, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(&qtTranslator);
// Load e.g. bitcoin_de.qm (shortcut "de" needs to be defined in bitcoin.qrc)
if (translatorBase.load(lang, ":/translations/"))
app.installTranslator(&translatorBase);
// Load e.g. bitcoin_de_DE.qm (shortcut "de_DE" needs to be defined in bitcoin.qrc)
if (translator.load(lang_territory, ":/translations/"))
app.installTranslator(&translator);
// Subscribe to global signals from core
uiInterface.ThreadSafeMessageBox.connect(ThreadSafeMessageBox);
uiInterface.ThreadSafeAskFee.connect(ThreadSafeAskFee);
uiInterface.ThreadSafeHandleURI.connect(ThreadSafeHandleURI);
uiInterface.InitMessage.connect(InitMessage);
uiInterface.QueueShutdown.connect(QueueShutdown);
uiInterface.Translate.connect(Translate);
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
// but before showing splash screen.
if (mapArgs.count("-?") || mapArgs.count("--help"))
{
GUIUtil::HelpMessageBox help;
help.showOrPrint();
return 1;
}
QSplashScreen splash(QPixmap(":/images/splash"), 0);
if (GetBoolArg("-splash", true) && !GetBoolArg("-min"))
{
splash.show();
splashref = &splash;
}
app.processEvents();
app.setQuitOnLastWindowClosed(false);
try
{
// Regenerate startup link, to fix links to old versions
if (GUIUtil::GetStartOnSystemStartup())
GUIUtil::SetStartOnSystemStartup(true);
BitcoinGUI window;
guiref = &window;
if(AppInit2())
{
{
// Put this in a block, so that the Model objects are cleaned up before
// calling Shutdown().
if (splashref)
splash.finish(&window);
ClientModel clientModel(&optionsModel);
WalletModel walletModel(pwalletMain, &optionsModel);
window.setClientModel(&clientModel);
window.setWalletModel(&walletModel);
// If -min option passed, start window minimized.
if(GetBoolArg("-min"))
{
window.showMinimized();
}
else
{
window.show();
}
// Place this here as guiref has to be defined if we don't want to lose URIs
ipcInit(argc, argv);
app.exec();
window.hide();
window.setClientModel(0);
window.setWalletModel(0);
guiref = 0;
}
// Shutdown the core and its threads, but don't exit Bitcoin-Qt here
Shutdown(NULL);
}
else
{
return 1;
}
} catch (std::exception& e) {
handleRunawayException(&e);
} catch (...) {
handleRunawayException(NULL);
}
return 0;
}
#endif // BITCOIN_QT_TEST
| [
"[email protected]"
] | |
7416a2201edfcb78ef5bb7df7676562988145cf5 | 2d9bca32b0050746790a7d5b4e2bb0853be163cc | /ex4/TestLFU.cpp | 4de08ec46357c622f1c10a41720795acbaa83564 | [] | no_license | lilachKelman/HujiOS | ad4f8b7549ede3dc32c4dc25fa27dc95e2ff8e7c | 39179009f443b7ab07410442269f2dbbba444f31 | refs/heads/master | 2023-01-08T01:38:25.044671 | 2020-11-11T14:08:07 | 2020-11-11T14:08:07 | 293,063,447 | 0 | 2 | null | 2020-09-05T11:37:28 | 2020-09-05T11:37:27 | null | UTF-8 | C++ | false | false | 4,033 | cpp |
#include <fstream>
#include <iostream>
#include <sys/stat.h>
#include <cstring>
#include "CacheFS.h"
void basicLFU()
{
bool ok = true;
// get the block size:
struct stat fi;
stat("/tmp", &fi);
size_t blockSize = (size_t) fi.st_blksize;
// create the files for the test:
std::ofstream outfile1("/tmp/LFU1.txt");
for (unsigned int i = 0; i < 5 * blockSize; i++)
{
outfile1 << "A";
}
outfile1.close();
std::ofstream outfile2("/tmp/LFU2.txt");
for (unsigned int i = 0; i < 5 * blockSize; i++)
{
outfile2 << "B";
}
outfile2.close();
std::ofstream eraser;
eraser.open("/tmp/LFU_cache.txt", std::ofstream::out | std::ofstream::trunc);
eraser.close();
eraser.open("/tmp/LFU_stats.txt", std::ofstream::out | std::ofstream::trunc);
eraser.close();
CacheFS_init(5, LFU, 0.1, 0.1);
int fd1 = CacheFS_open("/tmp/LFU1.txt");
int fd2 = CacheFS_open("/tmp/LFU2.txt");
char data[11];
// ramp up the frequency of these ones:
CacheFS_pread(fd1, &data, 10, 0 * blockSize);
CacheFS_pread(fd1, &data, 10, 1 * blockSize);
CacheFS_pread(fd1, &data, 10, 2 * blockSize);
CacheFS_pread(fd1, &data, 10, 3 * blockSize);
CacheFS_pread(fd1, &data, 10, 4 * blockSize);
CacheFS_pread(fd1, &data, 10, 0 * blockSize);
CacheFS_pread(fd1, &data, 10, 0 * blockSize);
CacheFS_pread(fd1, &data, 10, 0 * blockSize);
CacheFS_pread(fd1, &data, 10, 0 * blockSize);
CacheFS_pread(fd1, &data, 10, 2 * blockSize);
CacheFS_pread(fd1, &data, 10, 2 * blockSize);
CacheFS_pread(fd1, &data, 10, 2 * blockSize);
CacheFS_pread(fd1, &data, 10, 4 * blockSize);
CacheFS_pread(fd1, &data, 10, 4 * blockSize);
CacheFS_pread(fd1, &data, 10, 1 * blockSize);
CacheFS_print_cache("/tmp/LFU_cache.txt");
// these should all be misses:
CacheFS_pread(fd2, &data, 10, 0 * blockSize);
CacheFS_print_cache("/tmp/LFU_cache.txt");
CacheFS_pread(fd2, &data, 10, 1 * blockSize);
CacheFS_print_cache("/tmp/LFU_cache.txt");
CacheFS_pread(fd2, &data, 10, 0 * blockSize);
CacheFS_pread(fd2, &data, 10, 1 * blockSize);
CacheFS_pread(fd2, &data, 10, 0 * blockSize);
CacheFS_pread(fd2, &data, 10, 1 * blockSize);
CacheFS_pread(fd2, &data, 10, 0 * blockSize);
CacheFS_pread(fd2, &data, 10, 1 * blockSize);
CacheFS_pread(fd2, &data, 10, 0 * blockSize);
CacheFS_pread(fd2, &data, 10, 1 * blockSize);
// get the results:
CacheFS_print_stat("/tmp/LFU_stats.txt");
// review cache:
std::ifstream resultsFileInput;
resultsFileInput.open("/tmp/LFU_cache.txt");
char cacheResults[10000] = "\0";
if (resultsFileInput.is_open())
{
resultsFileInput.read(cacheResults, 10000);
char cacheCorrect[] = "/tmp/LFU1.txt 0\n/tmp/LFU1.txt "
"2\n/tmp/LFU1.txt 4\n/tmp/LFU1.txt 1\n/tmp/LFU1.txt"
" 3\n"
"/tmp/LFU1.txt 0\n/tmp/LFU1.txt "
"2\n/tmp/LFU1.txt 4\n/tmp/LFU1.txt 1\n/tmp/LFU2.txt"
" 0\n"
"/tmp/LFU1.txt 0\n/tmp/LFU1.txt "
"2\n/tmp/LFU1.txt 4\n/tmp/LFU1.txt 1\n/tmp/LFU2.txt"
" 1\n";
if (strcmp(cacheResults, cacheCorrect))
{ ok = false; }
}
resultsFileInput.close();
// review stats:
resultsFileInput.open("/tmp/LFU_stats.txt");
char statsResults[10000] = "\0";
if (resultsFileInput.is_open())
{
resultsFileInput.read(statsResults, 10000);
if (!(!strcmp(statsResults, "Hits number: 10.\nMisses number: 15.\n") ||
!strcmp(statsResults, "Hits number: 10\nMisses number: 15\n")))
{
ok = false;
}
}
resultsFileInput.close();
CacheFS_close(fd1);
CacheFS_close(fd2);
CacheFS_destroy();
if (ok)
{
std::cout << "Basic LFU Check Passed!\n";
}
else
{
std::cout << "Basic LFU Check Failed!\n";
}
}
int main()
{
basicLFU();
return 0;
} | [
"[email protected]"
] | |
25b2c2cf0e6c08a09d498ebdd647f676c9535d5c | 45d300db6d241ecc7ee0bda2d73afd011e97cf28 | /OTCDerivativesCalculatorModule/Project_Cpp/lib_static/xmlFactory/GenClass/RiskMonitor-0-1/CreditInstrument.cpp | 5a7b5a00ec01564c97ce7241d9362ff4aeea97b4 | [] | no_license | fagan2888/OTCDerivativesCalculatorModule | 50076076f5634ffc3b88c52ef68329415725e22d | e698e12660c0c2c0d6899eae55204d618d315532 | refs/heads/master | 2021-05-30T03:52:28.667409 | 2015-11-27T06:57:45 | 2015-11-27T06:57:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,352 | cpp | // CreditInstrument.cpp
#include "CreditInstrument.hpp"
#ifdef ConsolePrint
#include <iostream>
#endif
namespace FpmlSerialized {
CreditInstrument::CreditInstrument(TiXmlNode* xmlNode)
: ISerialized(xmlNode)
{
#ifdef ConsolePrint
std::string initialtap_ = FileManager::instance().tap_;
FileManager::instance().tap_.append(" ");
#endif
//issueInformationNode ----------------------------------------------------------------------------------------------------------------------
TiXmlElement* issueInformationNode = xmlNode->FirstChildElement("issueInformation");
if(issueInformationNode){issueInformationIsNull_ = false;}
else{issueInformationIsNull_ = true;}
#ifdef ConsolePrint
FileManager::instance().outFile_ << FileManager::instance().tap_.c_str() << "- issueInformationNode , address : " << issueInformationNode << std::endl;
#endif
if(issueInformationNode)
{
issueInformation_ = boost::shared_ptr<IssueInformation>(new IssueInformation(issueInformationNode));
}
//underlyingInformationNode ----------------------------------------------------------------------------------------------------------------------
TiXmlElement* underlyingInformationNode = xmlNode->FirstChildElement("underlyingInformation");
if(underlyingInformationNode){underlyingInformationIsNull_ = false;}
else{underlyingInformationIsNull_ = true;}
#ifdef ConsolePrint
FileManager::instance().outFile_ << FileManager::instance().tap_.c_str() << "- underlyingInformationNode , address : " << underlyingInformationNode << std::endl;
#endif
if(underlyingInformationNode)
{
underlyingInformation_ = boost::shared_ptr<UnderlyingInformation>(new UnderlyingInformation(underlyingInformationNode));
}
//creditPayoffInfoNode ----------------------------------------------------------------------------------------------------------------------
TiXmlElement* creditPayoffInfoNode = xmlNode->FirstChildElement("creditPayoffInfo");
if(creditPayoffInfoNode){creditPayoffInfoIsNull_ = false;}
else{creditPayoffInfoIsNull_ = true;}
#ifdef ConsolePrint
FileManager::instance().outFile_ << FileManager::instance().tap_.c_str() << "- creditPayoffInfoNode , address : " << creditPayoffInfoNode << std::endl;
#endif
if(creditPayoffInfoNode)
{
creditPayoffInfo_ = boost::shared_ptr<CreditPayoffInfo>(new CreditPayoffInfo(creditPayoffInfoNode));
}
#ifdef ConsolePrint
FileManager::instance().tap_ = initialtap_;
#endif
}
boost::shared_ptr<IssueInformation> CreditInstrument::getIssueInformation()
{
if(!this->issueInformationIsNull_){
return this->issueInformation_;
}else
{
QL_FAIL("null Ptr");
return boost::shared_ptr<IssueInformation>();
}
}
boost::shared_ptr<UnderlyingInformation> CreditInstrument::getUnderlyingInformation()
{
if(!this->underlyingInformationIsNull_){
return this->underlyingInformation_;
}else
{
QL_FAIL("null Ptr");
return boost::shared_ptr<UnderlyingInformation>();
}
}
boost::shared_ptr<CreditPayoffInfo> CreditInstrument::getCreditPayoffInfo()
{
if(!this->creditPayoffInfoIsNull_){
return this->creditPayoffInfo_;
}else
{
QL_FAIL("null Ptr");
return boost::shared_ptr<CreditPayoffInfo>();
}
}
}
| [
"[email protected]"
] | |
316fa4ed4457f569fba2981aa2e2481a518211b7 | b2b33b0ccd665d9576c42f622be1e27f6fdc8682 | /code/rahul/cow4.cpp | db00af56f8f7b1dd252b560bfcb4a36a397e23a4 | [] | no_license | philwil/fish | 8861170578e1e863e57794d632cdc2233ff19c81 | a1d887595840cc8eb2aa9ef2206d62df11d076a5 | refs/heads/master | 2020-03-29T20:55:03.110540 | 2019-09-10T11:42:48 | 2019-09-10T11:42:48 | 150,338,570 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,574 | cpp | /* cow4
* read a file containing
* locate the coords of B R and L
..........
..........
..........
..B.......
..........
.....R....
..........
..........
.....L....
..........
All we do here is add the cow class
and show how to subclass brown and black cows
the use of the virtual member is also shown so we can print all the cows
from the base cow class no matter what sub class they belong to.
*/
#include <iostream>
#include <iomanip>
#include <math.h>
#include <vector>
#include <string>
#include <fstream>
#include <stdlib.h>
using namespace std;
int g_debug = 0;
int g_clid = 1;
int g_cpid = 1;
class NumberList;
int writeToFile (string fileName, NumberList&nl) {
ofstream myfile;
myfile.open (fileName.c_str());
myfile << "Writing this to a file.\n";
myfile.close();
return 0;
}
// this is where we do all the work
// actually not used at the moment
int readFile(string fName) {
fName += ".txt";
fstream input(fName.c_str());
cout << " running readFile [" << fName<<"]"<< endl ;
//string cell[24];
string line;
int row = 0;
int idx = 0;
while (getline (input, line)) {
row++;
cout <<" line is [" << line<<"]" << endl;
idx = 0;
size_t pos = 0;
pos = line.find('B');
if (pos != string::npos) {
//Number*n = new Number();
//n->setName("Barn");
//n->setX(pos+1);
//n->setY(row);
//insertNumber (n);
//Barn = n;
}
pos = line.find('R');
if (pos != string::npos) {
//Number*n = new Number();
//n->setName("Rock");
//n->setX(pos+1);
//n->setY(row);
//insertNumber (n);
//Rock = n;
}
pos = line.find('L');
if (pos != string::npos) {
//Number*n = new Number();
//n->setName("Lake");
//n->setX(pos+1);
//n->setY(row);
//insertNumber (n);
//Lake = n;
}
}
return 0;
}
double doubleDist( int x1, int x2, int y1, int y2);
class cowPad;
// a cow link is a link between cowpads
// dist is dist to the target for the next cowPad
// level is the move we are on
// value is the supposed value of this link ie do the low ones first
// incX/incY are the modifications to the
// prev cowPad to the next one
// so create a cowPad and then create cowlinks for each direction
class cowLink {
public:
cowLink(cowPad *a, int x , int y) {
level=0;
prev = a;
next = NULL;
dist = 0.0;
value = 99;
incX= x;
incY= y;
id = g_clid++;
};
~cowLink() {};
double evalTarg(int tx, int ty);
int id;
int incX;
int incY;
int level;
int value;
double dist;
cowPad * prev;
cowPad * next;
cowPad * addCowPad( cowPad * c);
};
// some class test code
int g_id = 1;
class Cow {
public:
Cow() {
next=NULL;
name ="daisy";
color = "blue";
id = g_id++;
cout << " Cow constructor id: "<< id
<<" name :" << name
<< " color "<<color
<< endl;
}
~Cow() {
cout << " Cow destructor id:" <<id
<<" name :" << name
<< " color "<<color
<< endl;
}
virtual void showCow()
{
cout << " Cow showCow id: "<< id
<<" name :" << name
<< " color "<<color
<< endl;
};
Cow *next;
string name;
string color;
int id;
};
class brownCow: public Cow {
public:
brownCow() {
color = "brown";
cout << " brownCow constructor id: "<< id
<<" name :" << name
<< " color "<<color
<< endl;
}
~brownCow() {
cout << " brownCow destructor id:" <<id
<<" name :" << name
<< " color "<<color
<< endl;
}
void showCow()
{
cout << " brownCow showCow id: "<< id
<<" name :" << name
<< " color "<<color
<< endl;
};
};
class blackCow: public Cow {
public:
blackCow() {
color = "black";
cout << " blackCow constructor id: "<< id
<<" name :" << name
<< " color "<<color
<< endl;
}
~blackCow() {
cout << " blackCow destructor id:" <<id
<<" name :" << name
<< " color "<<color
<< endl;
}
void showCow()
{
cout << " blackCow showCow id: "<< id
<<" name :" << name
<< " color "<<color
<< endl;
};
};
Cow * g_cows = NULL;
void addCow( Cow * cow)
{
//if(g_cows)
// g_cows->next = cow;
cow->next = g_cows;
g_cows = cow;
}
void showCows()
{
cout << " Here are all the cows"<<endl;
Cow * c = g_cows;
while (c) {
c->showCow();
c = c->next;
}
}
class cowPad {
public:
cowPad( int xx = 0, int yy = 0) {
//constructor called
next = NULL;
prev = NULL;
N = NULL;//new cowLink(this, 0, -1);
S = NULL;//new cowLink(this, 0, 1);
E = NULL;//new cowLink(this, -1, 0);
W = NULL;//new cowLink(this, 1, 0);
x = xx;
y = yy;
//Nval = 99;
//Sval = 99;
//Eval = 99;
//Wval = 99;
level = 0;
id = ++g_cpid;
};
~cowPad() {
//destructor called
};
cowLink * N; //North
cowLink * S; //South
cowLink * E; //East
cowLink * W; //West
int x;
int y;
int level;
int id;
cowPad *prev;
cowPad *next;
void setxy (int xn, int yn) {
x = xn;
y = yn;
}
void showPad () {
cout<<"X is : "<<x<<" y is : "<<y<<endl;
if (N || S) {
if (N)
cout<<"N->val is : "<<N->value;
if (S)
cout <<" S->val is : "<<S->value;
cout<<endl;
}
if (E || W) {
if (E)
cout<<"E->val is : "<<E->value;
if(W)
cout <<" W->val is : "<<W->value;
cout <<endl;
}
}
};
// run eval to an arbitrary target
double cowLink::evalTarg(int tx, int ty)
{
double targ;
int xx = prev->x + incX;
int yy = prev->y + incY;
targ=doubleDist(xx,tx,yy,ty);
};
double doubleDist( int x1, int x2, int y1, int y2)
{
double d;
d = sqrt(pow(x1-x2,2) + pow(y1-y2,2));
return d;
}
int show_help() {
cout<<"(h) help -> show this help"<<endl;
cout<<"(l) lake -> add lake"<<endl;
cout<<"(b) barn -> add barn"<<endl;
cout<<"(r) rock -> add rock"<<endl;
cout<<"(a) add -> add a cow pad"<<endl;
cout<<"(e) eval -> eval links to dest"<<endl;
cout<<"(s) show -> show cowpads"<<endl;
cout<<"(p) picker -> run picker"<<endl;
cout<<"(q) quit -> quit"<<endl;
}
#define MAX_LEVELS 32
cowPad * g_cp = NULL;
cowPad * g_pick = NULL;
cowPad * g_lake = NULL;
cowPad * g_barn = NULL;
cowPad * g_rock = NULL;
cowPad * g_levels[MAX_LEVELS];
cowPad * g_level = NULL;
cowPad*cowLink::addCowPad(cowPad * cp)
{
cowPad *lp;
next = new cowPad(prev->x + incX, prev->y + incY);
next->level = prev->level+1;
lp = g_levels[next->level];
next->next = lp;
g_levels[next->level]=next;
}
cowPad *add_cowpad()
{
cowPad * cp;
cout<<"enter x location "<<endl;
int x;
cin>>x;
cout<<"enter y location "<<endl;
int y;
cin>>y;
cp = new cowPad(x,y);
if(g_cp == NULL) {
cp->next = NULL;
} else {
cp->next=g_cp;
}
g_cp = cp;
return cp;
}
cowPad * add_lake()
{
cowPad * cp;
cout<<"enter x location "<<endl;
int x;
cin>>x;
cout<<"enter y location "<<endl;
int y;
cin>>y;
cp = new cowPad(x,y);
g_lake = cp;
g_cp = g_lake;
g_levels[0] = g_lake;
g_lake->level = 0;
return cp;
}
cowPad * add_barn()
{
cowPad * cp;
cout<<"enter x location "<<endl;
int x;
cin>>x;
cout<<"enter y location "<<endl;
int y;
cin>>y;
cp = new cowPad(x,y);
g_barn = cp;
return cp;
}
cowPad * add_rock()
{
cowPad * cp;
cout<<"enter x location "<<endl;
int x;
cin>>x;
cout<<"enter y location "<<endl;
int y;
cin>>y;
cp = new cowPad(x,y);
g_rock = cp;
return cp;
}
int set_level()
{
cout<<"enter move level max(32) "<<endl;
int x;
cin>>x;
if (x < MAX_LEVELS) g_level = g_levels[x];
return x;
}
cowPad *picker();
// eval g_cp from this point to barn
int eval_cowpad ()
{
cowPad *cp;
cp = g_pick;
if(!cp) {
picker();
cp=g_pick;
}
if(!cp) {
cout << " picker found nothing" << endl;
return 0;
}
double doubleDist( int x1, int x2, int y1, int y2);
double e,w,n,s;
string best = "";
n = doubleDist(cp->x, g_barn->x, cp->y-1, g_barn->y);
s = doubleDist(cp->x, g_barn->x, cp->y+1, g_barn->y);
e = doubleDist(cp->x+1, g_barn->x, cp->y, g_barn->y);
w = doubleDist(cp->x-1, g_barn->x, cp->y, g_barn->y);
cout <<"dist North : " << n
<< endl;
cout <<"dist South : " << s
<< endl;
cout <<"dist East : " << e
<< endl;
cout <<"dist West : " << w
<< endl;
// disable things already evaluated
if(cp->N) n = 100;
if(cp->E) e = 100;
if(cp->W) w = 100;
if(cp->S) s = 100;
best = "None";
// simple test
if ((cp->W == NULL) && (w<=n) && (w <= s) && (w <= e) ) {
best = "West";
cout << "adding cowpad " << best<<endl;
cp->W = new cowLink(cp, -1, 0);
cp->W->addCowPad(cp);
}
else if ((cp->E == NULL) && (e<=n) && (e <= s) && (e <= w) ) {
best = "East";
cout << "adding cowpad " << best<<endl;
cp->E = new cowLink(cp, 1, 0);
cp->E->addCowPad(cp);
}
else if ((cp->S == NULL) && (s<=n) && (s <=e) && (s <= w) ) {
best = "South";
cout << "adding cowpad " << best<<endl;
cp->S = new cowLink(cp, 0, 1);
cp->S->addCowPad(cp);
}
else if ((cp->N == NULL) && (n<=s) && (n <= e) && (n <= w) ) {
best = "North";
cout << "adding cowpad " << best<<endl;
cp->N = new cowLink(cp, 0, -1);
cp->N->addCowPad(cp);
}
cout <<"Best is : " << best << endl;
cout <<"level : " << cp->level << endl;
}
cowPad *picker()
{
cowPad *cp = NULL;
//get the highest level with nodes left to allocate
for (int i = 1 ; i <= MAX_LEVELS; i++) {
cp = g_levels[MAX_LEVELS-i];
if (cp) {
while(cp) {
if((!cp->N) ||(!cp->S)||(!cp->E)||(!cp->W)) {
cout << " found level : " << cp->level<<" node id: "<< cp->id << endl;
return cp;
}
cp = cp->next;
}
}
}
return cp;
}
int set_test()
{
cowPad *cp = new cowPad(3,6);
g_rock = cp;
cp = new cowPad(3,3);
g_barn = cp;
cp = new cowPad(6,8);
g_lake = cp;
g_cp = g_lake;
g_levels[0] = g_lake;
g_lake->level = 0;
}
int run_picker()
{
cowPad *cp = picker();
g_pick = cp;
return 0;
}
int show_cowpads()
{
cowPad * cp = g_cp;
if (g_lake) {
cp = g_lake;
cout<<"Lake id: "<< cp->id;
cout<<" x: "<< cp->x;
cout<<" y: "<< cp->y << endl;
}
if (g_barn) {
cp = g_barn;
cout<<"Barn id: "<< cp->id;
cout<<" x: "<< cp->x;
cout<<" y: "<< cp->y << endl;
}
if (g_rock) {
cp = g_rock;
cout<<"Rock id: "<< cp->id;
cout<<" x: "<< cp->x;
cout<<" y: "<< cp->y << endl;
}
for (int i = 0 ; i < MAX_LEVELS; i++) {
cp = g_levels[i];
if (cp ) {
cout << "level :" << i << endl;
}
while (cp) {
cout<<"cp id: "<< cp->id;
cout<<" x: "<< cp->x;
cout<<" y: "<< cp->y << endl;
cp = cp->next;
}
}
}
int main_loop(/*NumberList &nl*/) {
string action;
string fName;
int done = 0;
while (!done) {
cout<<"What would you like to do? (h for help) "<<endl;
cin>>action;
if((action == "help") ||
(action == "h")) {
show_help();
}
else if((action == "quit") ||
(action == "q")) {
done = 1;
}
else if((action == "add") ||
(action == "a")) {
add_cowpad();
}
else if((action == "eval") ||
(action == "e")) {
eval_cowpad();
}
else if((action == "lake") ||
(action == "l")) {
add_lake();
}
else if((action == "barn") ||
(action == "b")) {
add_barn();
}
else if((action == "level") ||
(action == "l")) {
set_level();
}
else if((action == "rock") ||
(action == "r")) {
add_rock();
}
else if((action == "show") ||
(action == "s")) {
show_cowpads();
}
else if((action == "pick") ||
(action == "p")) {
run_picker();
}
}
return 1;
}
int set_up_levels()
{
for(int i = 0 ; i < MAX_LEVELS; i++) {
g_levels[i] = NULL;
}
g_level = NULL;
set_test();
}
int main() {
int rc;
string val;
Cow cow;
Cow *cowp;
brownCow bcow;
blackCow bkcow;
cowp =&bcow;
bcow.name = "belle";
bkcow.name = "blackie";
// show the base cow
cow.showCow();
// we use the overridden brown cow show even though its
// a pointer to Cow
cowp->showCow();
addCow(&cow);
addCow(&bcow);
addCow(&bkcow);
//NumberList nl;
set_up_levels();
main_loop(/*nl*/);
showCows();
return 0;
}
| [
"[email protected]"
] | |
bff10a6dc7d3f029e6b13e266aaec0de59985de4 | 4750fe54a18eac014c58cd581a9994b040e35d66 | /src/qt/openuridialog.cpp | 32ae7d54d8ab7dc4f0b2872d4e48dee8180ed210 | [
"MIT"
] | permissive | bitcoin-rush/bitcoinrush | b326b5c6a9efd68fac35d008df5363cf49931090 | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | refs/heads/master | 2020-06-07T06:02:13.111203 | 2019-06-21T12:04:04 | 2019-06-21T12:04:04 | 192,943,402 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,231 | cpp | // Copyright (c) 2011-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/openuridialog.h>
#include <qt/forms/ui_openuridialog.h>
#include <qt/guiutil.h>
#include <qt/walletmodel.h>
#include <QUrl>
OpenURIDialog::OpenURIDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::OpenURIDialog)
{
ui->setupUi(this);
ui->uriEdit->setPlaceholderText("bitcoinrush:");
}
OpenURIDialog::~OpenURIDialog()
{
delete ui;
}
QString OpenURIDialog::getURI()
{
return ui->uriEdit->text();
}
void OpenURIDialog::accept()
{
SendCoinsRecipient rcp;
if(GUIUtil::parseBitcoinrushURI(getURI(), &rcp))
{
/* Only accept value URIs */
QDialog::accept();
} else {
ui->uriEdit->setValid(false);
}
}
void OpenURIDialog::on_selectFileButton_clicked()
{
QString filename = GUIUtil::getOpenFileName(this, tr("Select payment request file to open"), "", "", nullptr);
if(filename.isEmpty())
return;
QUrl fileUri = QUrl::fromLocalFile(filename);
ui->uriEdit->setText("bitcoinrush:?r=" + QUrl::toPercentEncoding(fileUri.toString()));
}
| [
"[email protected]"
] | |
4e8ed251250376750f71631cb6b46f35037e7a3e | dd50d1a5a3c7e96e83e75f68c7a940f91275f206 | /source/tnn/interpreter/ncnn/layer_interpreter/detection_output_layer_interpreter.cc | 03c6da8b71898197439c26e74fc05bec0a54638c | [
"BSD-3-Clause"
] | permissive | bluaxe/TNN | 2bfdecc85ac4684e82032a86703eacaed5419ad6 | cafdb8792dc779236ec06dbeb65710073d27ebcd | refs/heads/master | 2023-03-19T02:55:39.007321 | 2021-03-04T02:59:18 | 2021-03-04T02:59:18 | 272,395,487 | 3 | 0 | NOASSERTION | 2020-12-30T08:10:31 | 2020-06-15T09:23:31 | C++ | UTF-8 | C++ | false | false | 2,927 | cc | // Tencent is pleased to support the open source community by making TNN available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// https://opensource.org/licenses/BSD-3-Clause
//
// 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 "tnn/interpreter/ncnn/layer_interpreter/abstract_layer_interpreter.h"
#include "tnn/interpreter/ncnn/ncnn_layer_type.h"
#include "tnn/interpreter/ncnn/ncnn_param_utils.h"
namespace TNN_NS {
namespace ncnn {
DECLARE_LAYER_INTERPRETER(DetectionOutput);
REGISTER_LAYER_INTERPRETER(DetectionOutput, DetectionOutput);
Status DetectionOutputLayerInterpreter::InterpretProto(std::string type_name, str_dict param_dict, LayerType& type,
LayerParam** param) {
type = ConvertNCNNLayerType(type_name);
DetectionOutputLayerParam* layer_param = new DetectionOutputLayerParam();
*param = layer_param;
auto p = param_dict;
int num_class = GetInt(p, 0, 0);
layer_param->num_classes = num_class;
layer_param->share_location = true; // ncnn does not have this controlled param
layer_param->variance_encoded_in_target = num_class == -233 ? true : false; //
layer_param->code_type = 2; // code_type == PriorBoxParameter_CodeType_CENTER_SIZE
layer_param->nms_param.nms_threshold = GetFloat(p, 1, 0.05f);
layer_param->nms_param.top_k = GetInt(p, 2, 300);
layer_param->keep_top_k = GetInt(p, 3, 100);
layer_param->confidence_threshold = GetFloat(p, 4, 0.5f);
layer_param->eta = 1.0f; // eta < 1.0 will enter a tnn branch while ncnn does not
layer_param->background_label_id = 0; // tnn will skip background_label_id class from 0, ncnn does that from 1
float variance = GetFloat(p, 5, -0.2f);
if (variance != -0.2f && num_class == -233) {
return Status(TNNERR_LAYER_ERR, "DetectionOutput Param is invalid: DetectionOutputLayerParam");
// this means ncnn will use variances param in param list while tnn does not have that
}
return TNN_OK;
}
Status DetectionOutputLayerInterpreter::InterpretResource(Deserializer& deserializer, std::shared_ptr<LayerInfo> info,
LayerResource** resource) {
return TNN_OK;
}
} // namespace ncnn
} // namespace TNN_NS | [
"[email protected]"
] | |
ea8b57465eea8813590ce609d4f1d6c584afb5ea | a3effde3c27c072090f0021bdae3306961eb2d92 | /Spoj/BOTTOM.cpp | f7217b481b111997b8698412dce26ec81d158e04 | [] | no_license | anmolgup/Competitive-programming-code | f4837522bf648c90847d971481f830a47722da29 | 329101c4e45be68192715c9a0718f148e541b58b | refs/heads/master | 2022-12-03T19:00:40.261727 | 2020-08-08T09:21:58 | 2020-08-08T09:21:58 | 286,011,774 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,088 | cpp | #include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int V, E;
vector<vector<int> > G;
vector<vector<int> > GD;
vector<vector<int> > res;
vector<int> sortOrder;
bool *marked;
int *reg;
int groupNo;
void dfs(int vertex){
if(marked[vertex])return;
marked[vertex] = true;
for(int i=0;i<G[vertex].size();++i) dfs(G[vertex][i]);
sortOrder.push_back(vertex);
}
void dfs2(int vertex){
if(marked[vertex])return;
marked[vertex] = true;
for(int i=0;i<GD[vertex].size();++i)dfs2(GD[vertex][i]);
res[groupNo].push_back(vertex);
reg[vertex] = groupNo;
}
int main(){
while(true){
scanf(" %d", &V);
if(V==0)break;
scanf(" %d", &E);
marked = new bool[V];
for(int i=0;i<V;++i)marked[i] = false;
reg = new int[V];
for(int i=0;i<V;++i)reg[i] = -1;
sortOrder.clear();
G.clear();
GD.clear();
res.clear();
groupNo = -1;
for(int i=0;i<V;++i){
vector<int> t,tt,ttt;
res.push_back(t);
G.push_back(tt);
GD.push_back(ttt);
}
if(E!=0){
for(int j=0;j<E;++j){
int from, to;
scanf(" %d %d", &from, &to);
from--;
to--;
G[from].push_back(to);
GD[to].push_back(from);
}
}
for(int i=0;i<V;++i)dfs(i);
for(int i=0;i<V;++i)marked[i] = false;
for(int i=sortOrder.size()-1;i>=0;--i){
if(!marked[sortOrder[i]])groupNo++;
dfs2(sortOrder[i]);
}
vector<int> ans;
for(int i=0;i<res.size();++i){
if(res[i].size()>1){
int group = i;
bool flag = true;
for(int j=0;j<res[i].size();++j){
for(int k=0;k<G[res[group][j]].size();++k){
if(reg[G[res[group][j]][k]]!=group){
flag = false;
break;
}
}
if(!flag)break;
}
if(flag){
for(int j=0;j<res[i].size();++j)ans.push_back(res[i][j]);
}
}else if(res[i].size()==1){
if(G[res[i][0]].size()==0)ans.push_back(res[i][0]);
else if(G[res[i][0]].size()==1 && G[res[i][0]][0]==res[i][0])ans.push_back(res[i][0]);
}
}
std::sort(ans.begin(), ans.end());
for(int i=0;i<ans.size();++i){
printf("%d ", ans[i]+1);
}
printf("\n");
}
| [
"[email protected]"
] | |
e939051c45df6d0c161ea31ebea1c0d2b8821f18 | 3ca79cbb6ff75a9a7b9c0f45a0214fa68d9a2b8e | /YDY_0607/man0623/sizecbar.cpp | b8a82f13aa5767b86d23f75651d53550e1251b83 | [] | no_license | QiYan1987/HubYZDprj | 9005e804c8806b618098a61abcec0f1908b9e110 | 9d87e67c3f2190ee15b5b460448d7b4cba8af08c | refs/heads/master | 2020-03-28T13:35:14.209972 | 2018-09-13T03:00:43 | 2018-09-13T03:00:43 | 148,408,127 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 40,724 | cpp | // sizecbar.cpp : implementation file
//
#include "stdafx.h"
#include "sizecbar.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////
// CSizingControlBar
IMPLEMENT_DYNAMIC(CSizingControlBar, baseCSizingControlBar);
CSizingControlBar::CSizingControlBar()
{
m_szMinHorz = CSize(33, 32);
m_szMinVert = CSize(33, 32);
m_szMinFloat = CSize(37, 32);
m_szHorz = CSize(200, 200);
m_szVert = CSize(200, 200);
m_szFloat = CSize(200, 200);
m_bTracking = FALSE;
m_bKeepSize = FALSE;
m_bParentSizing = FALSE;
m_cxEdge = 5;
m_bDragShowContent = FALSE;
m_nDockBarID = 0;
m_dwSCBStyle = 0;
}
CSizingControlBar::~CSizingControlBar()
{
}
BEGIN_MESSAGE_MAP(CSizingControlBar, baseCSizingControlBar)
//{{AFX_MSG_MAP(CSizingControlBar)
ON_WM_CREATE()
ON_WM_PAINT()
ON_WM_NCPAINT()
ON_WM_NCCALCSIZE()
ON_WM_WINDOWPOSCHANGING()
ON_WM_CAPTURECHANGED()
ON_WM_SETTINGCHANGE()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
ON_WM_NCLBUTTONDOWN()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONDBLCLK()
ON_WM_RBUTTONDOWN()
ON_WM_NCMOUSEMOVE()
ON_WM_NCHITTEST()
ON_WM_CLOSE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
ON_MESSAGE(WM_SETTEXT, OnSetText)
END_MESSAGE_MAP()
// old creation method, still here for compatibility reasons
BOOL CSizingControlBar::Create(LPCTSTR lpszWindowName, CWnd* pParentWnd,
CSize sizeDefault, BOOL bHasGripper,
UINT nID, DWORD dwStyle)
{
UNUSED_ALWAYS(bHasGripper);
m_szHorz = m_szVert = m_szFloat = sizeDefault;
return Create(lpszWindowName, pParentWnd, nID, dwStyle);
}
// preffered creation method
BOOL CSizingControlBar::Create(LPCTSTR lpszWindowName,
CWnd* pParentWnd, UINT nID,
DWORD dwStyle)
{
// must have a parent
ASSERT_VALID(pParentWnd);
// cannot be both fixed and dynamic
// (CBRS_SIZE_DYNAMIC is used for resizng when floating)
ASSERT (!((dwStyle & CBRS_SIZE_FIXED) &&
(dwStyle & CBRS_SIZE_DYNAMIC)));
m_dwStyle = dwStyle & CBRS_ALL; // save the control bar styles
// register and create the window - skip CControlBar::Create()
CString wndclass = ::AfxRegisterWndClass(CS_DBLCLKS,
::LoadCursor(NULL, IDC_ARROW),
::GetSysColorBrush(COLOR_BTNFACE), 0);
dwStyle &= ~CBRS_ALL; // keep only the generic window styles
dwStyle |= WS_CLIPCHILDREN; // prevents flashing
if (!CWnd::Create(wndclass, lpszWindowName, dwStyle,
CRect(0, 0, 0, 0), pParentWnd, nID))
return FALSE;
return TRUE;
}
/////////////////////////////////////////////////////////////////////////
// CSizingControlBar operations
#if defined(_SCB_REPLACE_MINIFRAME) && !defined(_SCB_MINIFRAME_CAPTION)
void CSizingControlBar::EnableDocking(DWORD dwDockStyle)
{
// must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
// cannot have the CBRS_FLOAT_MULTI style
ASSERT((dwDockStyle & CBRS_FLOAT_MULTI) == 0);
// the bar must have CBRS_SIZE_DYNAMIC style
ASSERT((m_dwStyle & CBRS_SIZE_DYNAMIC) != 0);
m_dwDockStyle = dwDockStyle;
if (m_pDockContext == NULL)
m_pDockContext = new CSCBDockContext(this);
// permanently wire the bar's owner to its current parent
if (m_hWndOwner == NULL)
m_hWndOwner = ::GetParent(m_hWnd);
}
#endif
/////////////////////////////////////////////////////////////////////////
// CSizingControlBar message handlers
int CSizingControlBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (baseCSizingControlBar::OnCreate(lpCreateStruct) == -1)
return -1;
// query SPI_GETDRAGFULLWINDOWS system parameter
// OnSettingChange() will update m_bDragShowContent
m_bDragShowContent = FALSE;
::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0,
&m_bDragShowContent, 0);
// uncomment this line if you want raised borders
// m_dwSCBStyle |= SCBS_SHOWEDGES;
return 0;
}
LRESULT CSizingControlBar::OnSetText(WPARAM wParam, LPARAM lParam)
{
UNUSED_ALWAYS(wParam);
LRESULT lResult = CWnd::Default();
if (IsFloating() &&
GetParentFrame()->IsKindOf(RUNTIME_CLASS(CMiniDockFrameWnd)))
{
m_pDockBar->SetWindowText((LPCTSTR) lParam); // update dockbar
GetParentFrame()->DelayRecalcLayout(); // refresh miniframe
}
return lResult;
}
const BOOL CSizingControlBar::IsFloating() const
{
return !IsHorzDocked() && !IsVertDocked();
}
const BOOL CSizingControlBar::IsHorzDocked() const
{
return (m_nDockBarID == AFX_IDW_DOCKBAR_TOP ||
m_nDockBarID == AFX_IDW_DOCKBAR_BOTTOM);
}
const BOOL CSizingControlBar::IsVertDocked() const
{
return (m_nDockBarID == AFX_IDW_DOCKBAR_LEFT ||
m_nDockBarID == AFX_IDW_DOCKBAR_RIGHT);
}
const BOOL CSizingControlBar::IsSideTracking() const
{
// don't call this when not tracking
ASSERT(m_bTracking && !IsFloating());
return (m_htEdge == HTLEFT || m_htEdge == HTRIGHT) ?
IsHorzDocked() : IsVertDocked();
}
CSize CSizingControlBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
{
if (bStretch) // the bar is stretched (is not the child of a dockbar)
if (bHorz)
return CSize(32767, m_szHorz.cy);
else
return CSize(m_szVert.cx, 32767);
// dirty cast - we need access to protected CDockBar members
CSCBDockBar* pDockBar = (CSCBDockBar*) m_pDockBar;
// force imediate RecalcDelayShow() for all sizing bars on the row
// with delayShow/delayHide flags set to avoid IsVisible() problems
CSCBArray arrSCBars;
GetRowSizingBars(arrSCBars);
AFX_SIZEPARENTPARAMS layout;
layout.hDWP = pDockBar->m_bLayoutQuery ?
NULL : ::BeginDeferWindowPos(arrSCBars.GetSize());
for (int i = 0; i < arrSCBars.GetSize(); i++)
if (arrSCBars[i]->m_nStateFlags & (delayHide|delayShow))
arrSCBars[i]->RecalcDelayShow(&layout);
if (layout.hDWP != NULL)
::EndDeferWindowPos(layout.hDWP);
// get available length
CRect rc = pDockBar->m_rectLayout;
if (rc.IsRectEmpty())
m_pDockSite->GetClientRect(&rc);
int nLengthTotal = bHorz ? rc.Width() + 2 : rc.Height() - 2;
if (IsVisible() && !IsFloating() &&
m_bParentSizing && arrSCBars[0] == this)
if (NegotiateSpace(nLengthTotal, (bHorz != FALSE)))
AlignControlBars();
m_bParentSizing = FALSE;
if (bHorz)
return CSize(max(m_szMinHorz.cx, m_szHorz.cx),
max(m_szMinHorz.cy, m_szHorz.cy));
return CSize(max(m_szMinVert.cx, m_szVert.cx),
max(m_szMinVert.cy, m_szVert.cy));
}
CSize CSizingControlBar::CalcDynamicLayout(int nLength, DWORD dwMode)
{
if (dwMode & (LM_HORZDOCK | LM_VERTDOCK)) // docked ?
{
if (nLength == -1)
m_bParentSizing = TRUE;
return baseCSizingControlBar::CalcDynamicLayout(nLength, dwMode);
}
if (dwMode & LM_MRUWIDTH) return m_szFloat;
if (dwMode & LM_COMMIT) return m_szFloat; // already committed
#ifndef _SCB_REPLACE_MINIFRAME
// check for dialgonal resizing hit test
int nHitTest = m_pDockContext->m_nHitTest;
if (IsFloating() &&
(nHitTest == HTTOPLEFT || nHitTest == HTBOTTOMLEFT ||
nHitTest == HTTOPRIGHT || nHitTest == HTBOTTOMRIGHT))
{
CPoint ptCursor;
::GetCursorPos(&ptCursor);
CRect rFrame, rBar;
GetParentFrame()->GetWindowRect(&rFrame);
GetWindowRect(&rBar);
if (nHitTest == HTTOPLEFT || nHitTest == HTBOTTOMLEFT)
{
m_szFloat.cx = rFrame.left + rBar.Width() - ptCursor.x;
m_pDockContext->m_rectFrameDragHorz.left =
min(ptCursor.x, rFrame.left + rBar.Width() - m_szMinFloat.cx);
}
if (nHitTest == HTTOPLEFT || nHitTest == HTTOPRIGHT)
{
m_szFloat.cy = rFrame.top + rBar.Height() - ptCursor.y;
m_pDockContext->m_rectFrameDragHorz.top =
min(ptCursor.y, rFrame.top + rBar.Height() - m_szMinFloat.cy);
}
if (nHitTest == HTTOPRIGHT || nHitTest == HTBOTTOMRIGHT)
m_szFloat.cx = rBar.Width() + ptCursor.x - rFrame.right;
if (nHitTest == HTBOTTOMLEFT || nHitTest == HTBOTTOMRIGHT)
m_szFloat.cy = rBar.Height() + ptCursor.y - rFrame.bottom;
}
else
#endif //_SCB_REPLACE_MINIFRAME
((dwMode & LM_LENGTHY) ? m_szFloat.cy : m_szFloat.cx) = nLength;
m_szFloat.cx = max(m_szFloat.cx, m_szMinFloat.cx);
m_szFloat.cy = max(m_szFloat.cy, m_szMinFloat.cy);
return m_szFloat;
}
void CSizingControlBar::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
{
// force non-client recalc if moved or resized
lpwndpos->flags |= SWP_FRAMECHANGED;
baseCSizingControlBar::OnWindowPosChanging(lpwndpos);
// find on which side are we docked
m_nDockBarID = GetParent()->GetDlgCtrlID();
if (!IsFloating())
if (lpwndpos->flags & SWP_SHOWWINDOW)
m_bKeepSize = TRUE;
}
/////////////////////////////////////////////////////////////////////////
// Mouse Handling
//
void CSizingControlBar::OnLButtonDown(UINT nFlags, CPoint point)
{
if (m_pDockBar != NULL)
{
// start the drag
ASSERT(m_pDockContext != NULL);
ClientToScreen(&point);
m_pDockContext->StartDrag(point);
}
else
CWnd::OnLButtonDown(nFlags, point);
}
void CSizingControlBar::OnLButtonDblClk(UINT nFlags, CPoint point)
{
if (m_pDockBar != NULL)
{
// toggle docking
ASSERT(m_pDockContext != NULL);
m_pDockContext->ToggleDocking();
}
else
CWnd::OnLButtonDblClk(nFlags, point);
}
void CSizingControlBar::OnNcLButtonDown(UINT nHitTest, CPoint point)
{
UNUSED_ALWAYS(point);
if (m_bTracking || IsFloating())
return;
if ((nHitTest >= HTSIZEFIRST) && (nHitTest <= HTSIZELAST))
StartTracking(nHitTest, point); // sizing edge hit
}
void CSizingControlBar::OnLButtonUp(UINT nFlags, CPoint point)
{
if (m_bTracking)
StopTracking();
baseCSizingControlBar::OnLButtonUp(nFlags, point);
}
void CSizingControlBar::OnRButtonDown(UINT nFlags, CPoint point)
{
if (m_bTracking)
StopTracking();
baseCSizingControlBar::OnRButtonDown(nFlags, point);
}
void CSizingControlBar::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_bTracking)
{
CPoint ptScreen = point;
ClientToScreen(&ptScreen);
OnTrackUpdateSize(ptScreen);
}
baseCSizingControlBar::OnMouseMove(nFlags, point);
}
void CSizingControlBar::OnCaptureChanged(CWnd *pWnd)
{
if (m_bTracking && (pWnd != this))
StopTracking();
baseCSizingControlBar::OnCaptureChanged(pWnd);
}
void CSizingControlBar::OnNcCalcSize(BOOL bCalcValidRects,
NCCALCSIZE_PARAMS FAR* lpncsp)
{
UNUSED_ALWAYS(bCalcValidRects);
#ifndef _SCB_REPLACE_MINIFRAME
// Enable diagonal resizing for floating miniframe
if (IsFloating())
{
CFrameWnd* pFrame = GetParentFrame();
if (pFrame != NULL &&
pFrame->IsKindOf(RUNTIME_CLASS(CMiniFrameWnd)))
{
DWORD dwStyle = ::GetWindowLong(pFrame->m_hWnd, GWL_STYLE);
if ((dwStyle & MFS_4THICKFRAME) != 0)
{
pFrame->ModifyStyle(MFS_4THICKFRAME, 0); // clear
GetParent()->ModifyStyle(0, WS_CLIPCHILDREN);
}
}
}
#endif _SCB_REPLACE_MINIFRAME
// compute the the client area
m_dwSCBStyle &= ~SCBS_EDGEALL;
// add resizing edges between bars on the same row
if (!IsFloating() && m_pDockBar != NULL)
{
CSCBArray arrSCBars;
int nThis;
GetRowSizingBars(arrSCBars, nThis);
BOOL bHorz = IsHorzDocked();
if (nThis > 0)
m_dwSCBStyle |= bHorz ? SCBS_EDGELEFT : SCBS_EDGETOP;
if (nThis < arrSCBars.GetUpperBound())
m_dwSCBStyle |= bHorz ? SCBS_EDGERIGHT : SCBS_EDGEBOTTOM;
}
NcCalcClient(&lpncsp->rgrc[0], m_nDockBarID);
}
void CSizingControlBar::NcCalcClient(LPRECT pRc, UINT nDockBarID)
{
CRect rc(pRc);
rc.DeflateRect(3, 5, 3, 3);
if (nDockBarID != AFX_IDW_DOCKBAR_FLOAT)
rc.DeflateRect(2, 0, 2, 2);
switch(nDockBarID)
{
case AFX_IDW_DOCKBAR_TOP:
m_dwSCBStyle |= SCBS_EDGEBOTTOM;
break;
case AFX_IDW_DOCKBAR_BOTTOM:
m_dwSCBStyle |= SCBS_EDGETOP;
break;
case AFX_IDW_DOCKBAR_LEFT:
m_dwSCBStyle |= SCBS_EDGERIGHT;
break;
case AFX_IDW_DOCKBAR_RIGHT:
m_dwSCBStyle |= SCBS_EDGELEFT;
break;
}
// make room for edges only if they will be painted
if (m_dwSCBStyle & SCBS_SHOWEDGES)
rc.DeflateRect(
(m_dwSCBStyle & SCBS_EDGELEFT) ? m_cxEdge : 0,
(m_dwSCBStyle & SCBS_EDGETOP) ? m_cxEdge : 0,
(m_dwSCBStyle & SCBS_EDGERIGHT) ? m_cxEdge : 0,
(m_dwSCBStyle & SCBS_EDGEBOTTOM) ? m_cxEdge : 0);
*pRc = rc;
}
void CSizingControlBar::OnNcPaint()
{
// get window DC that is clipped to the non-client area
CWindowDC dc(this);
CRect rcClient, rcBar;
GetClientRect(rcClient);
ClientToScreen(rcClient);
GetWindowRect(rcBar);
rcClient.OffsetRect(-rcBar.TopLeft());
rcBar.OffsetRect(-rcBar.TopLeft());
CDC mdc;
mdc.CreateCompatibleDC(&dc);
CBitmap bm;
bm.CreateCompatibleBitmap(&dc, rcBar.Width(), rcBar.Height());
CBitmap* pOldBm = mdc.SelectObject(&bm);
// draw borders in non-client area
CRect rcDraw = rcBar;
DrawBorders(&mdc, rcDraw);
// erase the NC background
mdc.FillRect(rcDraw, CBrush::FromHandle(
(HBRUSH) GetClassLong(m_hWnd, GCL_HBRBACKGROUND)));
if (m_dwSCBStyle & SCBS_SHOWEDGES)
{
CRect rcEdge; // paint the sizing edges
for (int i = 0; i < 4; i++)
if (GetEdgeRect(rcBar, GetEdgeHTCode(i), rcEdge))
mdc.Draw3dRect(rcEdge, ::GetSysColor(COLOR_BTNHIGHLIGHT),
::GetSysColor(COLOR_BTNSHADOW));
}
NcPaintGripper(&mdc, rcClient);
// client area is not our bussiness :)
dc.IntersectClipRect(rcBar);
dc.ExcludeClipRect(rcClient);
dc.BitBlt(0, 0, rcBar.Width(), rcBar.Height(), &mdc, 0, 0, SRCCOPY);
ReleaseDC(&dc);
mdc.SelectObject(pOldBm);
bm.DeleteObject();
mdc.DeleteDC();
}
void CSizingControlBar::NcPaintGripper(CDC* pDC, CRect rcClient)
{
UNUSED_ALWAYS(pDC);
UNUSED_ALWAYS(rcClient);
}
void CSizingControlBar::OnPaint()
{
// overridden to skip border painting based on clientrect
CPaintDC dc(this);
}
LRESULT CSizingControlBar::OnNcHitTest(CPoint point)
{
CRect rcBar, rcEdge;
GetWindowRect(rcBar);
if (!IsFloating())
for (int i = 0; i < 4; i++)
if (GetEdgeRect(rcBar, GetEdgeHTCode(i), rcEdge))
if (rcEdge.PtInRect(point))
return GetEdgeHTCode(i);
return HTCLIENT;
}
void CSizingControlBar::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
baseCSizingControlBar::OnSettingChange(uFlags, lpszSection);
m_bDragShowContent = FALSE;
::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0,
&m_bDragShowContent, 0); // update
}
void CSizingControlBar::OnSize(UINT nType, int cx, int cy)
{
UNUSED_ALWAYS(nType);
if ((m_dwSCBStyle & SCBS_SIZECHILD) != 0)
{
// automatic child resizing - only one child is allowed
CWnd* pWnd = GetWindow(GW_CHILD);
if (pWnd != NULL)
{
pWnd->MoveWindow(0, 0, cx, cy);
ASSERT(pWnd->GetWindow(GW_HWNDNEXT) == NULL);
}
}
}
void CSizingControlBar::OnClose()
{
// do nothing: protection against accidentally destruction by the
// child control (i.e. if user hits Esc in a child editctrl)
}
/////////////////////////////////////////////////////////////////////////
// CSizingControlBar implementation helpers
void CSizingControlBar::StartTracking(UINT nHitTest, CPoint point)
{
SetCapture();
// make sure no updates are pending
if (!m_bDragShowContent)
RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_UPDATENOW);
m_htEdge = nHitTest;
m_bTracking = TRUE;
BOOL bHorz = IsHorzDocked();
BOOL bHorzTracking = m_htEdge == HTLEFT || m_htEdge == HTRIGHT;
m_nTrackPosOld = bHorzTracking ? point.x : point.y;
CRect rcBar, rcEdge;
GetWindowRect(rcBar);
GetEdgeRect(rcBar, m_htEdge, rcEdge);
m_nTrackEdgeOfs = m_nTrackPosOld -
(bHorzTracking ? rcEdge.CenterPoint().x : rcEdge.CenterPoint().y);
CSCBArray arrSCBars;
int nThis;
GetRowSizingBars(arrSCBars, nThis);
m_nTrackPosMin = m_nTrackPosMax = m_nTrackPosOld;
if (!IsSideTracking())
{
// calc minwidth as the max minwidth of the sizing bars on row
int nMinWidth = bHorz ? m_szMinHorz.cy : m_szMinVert.cx;
for (int i = 0; i < arrSCBars.GetSize(); i++)
nMinWidth = max(nMinWidth, bHorz ?
arrSCBars[i]->m_szMinHorz.cy :
arrSCBars[i]->m_szMinVert.cx);
int nExcessWidth = (bHorz ? m_szHorz.cy : m_szVert.cx) - nMinWidth;
// the control bar cannot grow with more than the width of
// remaining client area of the mainframe
CRect rcT;
m_pDockSite->RepositionBars(0, 0xFFFF, AFX_IDW_PANE_FIRST,
reposQuery, &rcT, NULL, TRUE);
int nMaxWidth = bHorz ? rcT.Height() - 2 : rcT.Width() - 2;
BOOL bTopOrLeft = m_htEdge == HTTOP || m_htEdge == HTLEFT;
m_nTrackPosMin -= bTopOrLeft ? nMaxWidth : nExcessWidth;
m_nTrackPosMax += bTopOrLeft ? nExcessWidth : nMaxWidth;
}
else
{
// side tracking:
// max size is the actual size plus the amount the other
// sizing bars can be decreased until they reach their minsize
if (m_htEdge == HTBOTTOM || m_htEdge == HTRIGHT)
nThis++;
for (int i = 0; i < arrSCBars.GetSize(); i++)
{
CSizingControlBar* pBar = arrSCBars[i];
int nExcessWidth = bHorz ?
pBar->m_szHorz.cx - pBar->m_szMinHorz.cx :
pBar->m_szVert.cy - pBar->m_szMinVert.cy;
if (i < nThis)
m_nTrackPosMin -= nExcessWidth;
else
m_nTrackPosMax += nExcessWidth;
}
}
OnTrackInvertTracker(); // draw tracker
}
void CSizingControlBar::StopTracking()
{
OnTrackInvertTracker(); // erase tracker
m_bTracking = FALSE;
ReleaseCapture();
m_pDockSite->DelayRecalcLayout();
}
void CSizingControlBar::OnTrackUpdateSize(CPoint& point)
{
ASSERT(!IsFloating());
BOOL bHorzTrack = m_htEdge == HTLEFT || m_htEdge == HTRIGHT;
int nTrackPos = bHorzTrack ? point.x : point.y;
nTrackPos = max(m_nTrackPosMin, min(m_nTrackPosMax, nTrackPos));
int nDelta = nTrackPos - m_nTrackPosOld;
if (nDelta == 0)
return; // no pos change
OnTrackInvertTracker(); // erase tracker
m_nTrackPosOld = nTrackPos;
BOOL bHorz = IsHorzDocked();
CSize sizeNew = bHorz ? m_szHorz : m_szVert;
switch (m_htEdge)
{
case HTLEFT: sizeNew -= CSize(nDelta, 0); break;
case HTTOP: sizeNew -= CSize(0, nDelta); break;
case HTRIGHT: sizeNew += CSize(nDelta, 0); break;
case HTBOTTOM: sizeNew += CSize(0, nDelta); break;
}
CSCBArray arrSCBars;
int nThis;
GetRowSizingBars(arrSCBars, nThis);
if (!IsSideTracking())
for (int i = 0; i < arrSCBars.GetSize(); i++)
{
CSizingControlBar* pBar = arrSCBars[i];
// make same width (or height)
(bHorz ? pBar->m_szHorz.cy : pBar->m_szVert.cx) =
bHorz ? sizeNew.cy : sizeNew.cx;
}
else
{
int nGrowingBar = nThis;
BOOL bBefore = m_htEdge == HTTOP || m_htEdge == HTLEFT;
if (bBefore && nDelta > 0)
nGrowingBar--;
if (!bBefore && nDelta < 0)
nGrowingBar++;
if (nGrowingBar != nThis)
bBefore = !bBefore;
// nGrowing is growing
nDelta = abs(nDelta);
CSizingControlBar* pBar = arrSCBars[nGrowingBar];
(bHorz ? pBar->m_szHorz.cx : pBar->m_szVert.cy) += nDelta;
// the others are shrinking
int nFirst = bBefore ? nGrowingBar - 1 : nGrowingBar + 1;
int nLimit = bBefore ? -1 : arrSCBars.GetSize();
for (int i = nFirst; nDelta != 0 && i != nLimit; i += (bBefore ? -1 : 1))
{
CSizingControlBar* pBar = arrSCBars[i];
int nDeltaT = min(nDelta,
(bHorz ? pBar->m_szHorz.cx : pBar->m_szVert.cy) -
(bHorz ? pBar->m_szMinHorz.cx : pBar->m_szMinVert.cy));
(bHorz ? pBar->m_szHorz.cx : pBar->m_szVert.cy) -= nDeltaT;
nDelta -= nDeltaT;
}
}
OnTrackInvertTracker(); // redraw tracker at new pos
if (m_bDragShowContent)
m_pDockSite->DelayRecalcLayout();
}
void CSizingControlBar::OnTrackInvertTracker()
{
ASSERT(m_bTracking);
if (m_bDragShowContent)
return; // don't show tracker if DragFullWindows is on
BOOL bHorz = IsHorzDocked();
CRect rc, rcBar, rcDock, rcFrame;
GetWindowRect(rcBar);
m_pDockBar->GetWindowRect(rcDock);
m_pDockSite->GetWindowRect(rcFrame);
VERIFY(GetEdgeRect(rcBar, m_htEdge, rc));
if (!IsSideTracking())
rc = bHorz ?
CRect(rcDock.left + 1, rc.top, rcDock.right - 1, rc.bottom) :
CRect(rc.left, rcDock.top + 1, rc.right, rcDock.bottom - 1);
BOOL bHorzTracking = m_htEdge == HTLEFT || m_htEdge == HTRIGHT;
int nOfs = m_nTrackPosOld - m_nTrackEdgeOfs;
nOfs -= bHorzTracking ? rc.CenterPoint().x : rc.CenterPoint().y;
rc.OffsetRect(bHorzTracking ? nOfs : 0, bHorzTracking ? 0 : nOfs);
rc.OffsetRect(-rcFrame.TopLeft());
CDC *pDC = m_pDockSite->GetDCEx(NULL,
DCX_WINDOW | DCX_CACHE | DCX_LOCKWINDOWUPDATE);
CBrush* pBrush = CDC::GetHalftoneBrush();
CBrush* pBrushOld = pDC->SelectObject(pBrush);
pDC->PatBlt(rc.left, rc.top, rc.Width(), rc.Height(), PATINVERT);
pDC->SelectObject(pBrushOld);
m_pDockSite->ReleaseDC(pDC);
}
BOOL CSizingControlBar::GetEdgeRect(CRect rcWnd, UINT nHitTest,
CRect& rcEdge)
{
rcEdge = rcWnd;
if (m_dwSCBStyle & SCBS_SHOWEDGES)
rcEdge.DeflateRect(1, 1);
BOOL bHorz = IsHorzDocked();
switch (nHitTest)
{
case HTLEFT:
if (!(m_dwSCBStyle & SCBS_EDGELEFT)) return FALSE;
rcEdge.right = rcEdge.left + m_cxEdge;
rcEdge.DeflateRect(0, bHorz ? m_cxEdge: 0);
break;
case HTTOP:
if (!(m_dwSCBStyle & SCBS_EDGETOP)) return FALSE;
rcEdge.bottom = rcEdge.top + m_cxEdge;
rcEdge.DeflateRect(bHorz ? 0 : m_cxEdge, 0);
break;
case HTRIGHT:
if (!(m_dwSCBStyle & SCBS_EDGERIGHT)) return FALSE;
rcEdge.left = rcEdge.right - m_cxEdge;
rcEdge.DeflateRect(0, bHorz ? m_cxEdge: 0);
break;
case HTBOTTOM:
if (!(m_dwSCBStyle & SCBS_EDGEBOTTOM)) return FALSE;
rcEdge.top = rcEdge.bottom - m_cxEdge;
rcEdge.DeflateRect(bHorz ? 0 : m_cxEdge, 0);
break;
default:
ASSERT(FALSE); // invalid hit test code
}
return TRUE;
}
UINT CSizingControlBar::GetEdgeHTCode(int nEdge)
{
if (nEdge == 0) return HTLEFT;
if (nEdge == 1) return HTTOP;
if (nEdge == 2) return HTRIGHT;
if (nEdge == 3) return HTBOTTOM;
ASSERT(FALSE); // invalid edge code
return HTNOWHERE;
}
void CSizingControlBar::GetRowInfo(int& nFirst, int& nLast, int& nThis)
{
ASSERT_VALID(m_pDockBar); // verify bounds
nThis = m_pDockBar->FindBar(this);
ASSERT(nThis != -1);
int i, nBars = m_pDockBar->m_arrBars.GetSize();
// find the first and the last bar in row
for (nFirst = -1, i = nThis - 1; i >= 0 && nFirst == -1; i--)
if (m_pDockBar->m_arrBars[i] == NULL)
nFirst = i + 1;
for (nLast = -1, i = nThis + 1; i < nBars && nLast == -1; i++)
if (m_pDockBar->m_arrBars[i] == NULL)
nLast = i - 1;
ASSERT((nLast != -1) && (nFirst != -1));
}
void CSizingControlBar::GetRowSizingBars(CSCBArray& arrSCBars)
{
int nThis; // dummy
GetRowSizingBars(arrSCBars, nThis);
}
void CSizingControlBar::GetRowSizingBars(CSCBArray& arrSCBars, int& nThis)
{
arrSCBars.RemoveAll();
int nFirstT, nLastT, nThisT;
GetRowInfo(nFirstT, nLastT, nThisT);
nThis = -1;
for (int i = nFirstT; i <= nLastT; i++)
{
CSizingControlBar* pBar =
(CSizingControlBar*) m_pDockBar->m_arrBars[i];
if (HIWORD(pBar) == 0) continue; // placeholder
if (!pBar->IsVisible()) continue;
if (pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))
{
if (pBar == this)
nThis = arrSCBars.GetSize();
arrSCBars.Add(pBar);
}
}
}
BOOL CSizingControlBar::NegotiateSpace(int nLengthTotal, BOOL bHorz)
{
ASSERT(bHorz == IsHorzDocked());
int nFirst, nLast, nThis;
GetRowInfo(nFirst, nLast, nThis);
int nLengthAvail = nLengthTotal;
int nLengthActual = 0;
int nLengthMin = 2;
int nWidthMax = 0;
CSizingControlBar* pBar;
int i;
for (i = nFirst; i <= nLast; i++)
{
pBar = (CSizingControlBar*) m_pDockBar->m_arrBars[i];
if (HIWORD(pBar) == 0) continue; // placeholder
if (!pBar->IsVisible()) continue;
BOOL bIsSizingBar =
pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar));
int nLengthBar; // minimum length of the bar
if (bIsSizingBar)
nLengthBar = bHorz ? pBar->m_szMinHorz.cx - 2 :
pBar->m_szMinVert.cy - 2;
else
{
CRect rcBar;
pBar->GetWindowRect(&rcBar);
nLengthBar = bHorz ? rcBar.Width() - 2 : rcBar.Height() - 2;
}
nLengthMin += nLengthBar;
if (nLengthMin > nLengthTotal)
{
// split the row after fixed bar
if (i < nThis)
{
m_pDockBar->m_arrBars.InsertAt(i + 1,
(CControlBar*) NULL);
return FALSE;
}
// only this sizebar remains on the row, adjust it to minsize
if (i == nThis)
{
if (bHorz)
m_szHorz.cx = m_szMinHorz.cx;
else
m_szVert.cy = m_szMinVert.cy;
return TRUE; // the dockbar will split the row for us
}
// we have enough bars - go negotiate with them
m_pDockBar->m_arrBars.InsertAt(i, (CControlBar*) NULL);
nLast = i - 1;
break;
}
if (bIsSizingBar)
{
nLengthActual += bHorz ? pBar->m_szHorz.cx - 2 :
pBar->m_szVert.cy - 2;
nWidthMax = max(nWidthMax, bHorz ? pBar->m_szHorz.cy :
pBar->m_szVert.cx);
}
else
nLengthAvail -= nLengthBar;
}
CSCBArray arrSCBars;
GetRowSizingBars(arrSCBars);
int nNumBars = arrSCBars.GetSize();
int nDelta = nLengthAvail - nLengthActual;
// return faster when there is only one sizing bar per row (this one)
if (nNumBars == 1)
{
ASSERT(arrSCBars[0] == this);
if (nDelta == 0)
return TRUE;
m_bKeepSize = FALSE;
(bHorz ? m_szHorz.cx : m_szVert.cy) += nDelta;
return TRUE;
}
// make all the bars the same width
for (i = 0; i < nNumBars; i++)
if (bHorz)
arrSCBars[i]->m_szHorz.cy = nWidthMax;
else
arrSCBars[i]->m_szVert.cx = nWidthMax;
// distribute the difference between the bars,
// but don't shrink them below their minsizes
while (nDelta != 0)
{
int nDeltaOld = nDelta;
for (i = 0; i < nNumBars; i++)
{
pBar = arrSCBars[i];
int nLMin = bHorz ?
pBar->m_szMinHorz.cx : pBar->m_szMinVert.cy;
int nL = bHorz ? pBar->m_szHorz.cx : pBar->m_szVert.cy;
if ((nL == nLMin) && (nDelta < 0) || // already at min length
pBar->m_bKeepSize) // or wants to keep its size
continue;
// sign of nDelta
int nDelta2 = (nDelta == 0) ? 0 : ((nDelta < 0) ? -1 : 1);
(bHorz ? pBar->m_szHorz.cx : pBar->m_szVert.cy) += nDelta2;
nDelta -= nDelta2;
if (nDelta == 0) break;
}
// clear m_bKeepSize flags
if ((nDeltaOld == nDelta) || (nDelta == 0))
for (i = 0; i < nNumBars; i++)
arrSCBars[i]->m_bKeepSize = FALSE;
}
return TRUE;
}
void CSizingControlBar::AlignControlBars()
{
int nFirst, nLast, nThis;
GetRowInfo(nFirst, nLast, nThis);
BOOL bHorz = IsHorzDocked();
BOOL bNeedRecalc = FALSE;
int nAlign = bHorz ? -2 : 0;
CRect rc, rcDock;
m_pDockBar->GetWindowRect(&rcDock);
for (int i = nFirst; i <= nLast; i++)
{
CSizingControlBar* pBar =
(CSizingControlBar*) m_pDockBar->m_arrBars[i];
if (HIWORD(pBar) == 0) continue; // placeholder
if (!pBar->IsVisible()) continue;
pBar->GetWindowRect(&rc);
rc.OffsetRect(-rcDock.TopLeft());
if (pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))
rc = CRect(rc.TopLeft(),
bHorz ? pBar->m_szHorz : pBar->m_szVert);
if ((bHorz ? rc.left : rc.top) != nAlign)
{
if (!bHorz)
rc.OffsetRect(0, nAlign - rc.top - 2);
else if (m_nDockBarID == AFX_IDW_DOCKBAR_TOP)
rc.OffsetRect(nAlign - rc.left, -2);
else
rc.OffsetRect(nAlign - rc.left, 0);
pBar->MoveWindow(rc);
bNeedRecalc = TRUE;
}
nAlign += (bHorz ? rc.Width() : rc.Height()) - 2;
}
if (bNeedRecalc)
m_pDockSite->DelayRecalcLayout();
}
void CSizingControlBar::OnUpdateCmdUI(CFrameWnd* pTarget,
BOOL bDisableIfNoHndler)
{
UNUSED_ALWAYS(bDisableIfNoHndler);
UNUSED_ALWAYS(pTarget);
}
void CSizingControlBar::LoadState(LPCTSTR lpszProfileName)
{
ASSERT_VALID(this);
ASSERT(GetSafeHwnd()); // must be called after Create()
#if defined(_SCB_REPLACE_MINIFRAME) && !defined(_SCB_MINIFRAME_CAPTION)
// compensate the caption miscalculation in CFrameWnd::SetDockState()
CDockState state;
state.LoadState(lpszProfileName);
UINT nID = GetDlgCtrlID();
for (int i = 0; i < state.m_arrBarInfo.GetSize(); i++)
{
CControlBarInfo* pInfo = (CControlBarInfo*)state.m_arrBarInfo[i];
ASSERT(pInfo != NULL);
if (!pInfo->m_bFloating)
continue;
// this is a floating dockbar - check the ID array
for (int j = 0; j < pInfo->m_arrBarID.GetSize(); j++)
if ((DWORD) pInfo->m_arrBarID[j] == nID)
{
// found this bar - offset origin and save settings
pInfo->m_pointPos.x++;
pInfo->m_pointPos.y +=
::GetSystemMetrics(SM_CYSMCAPTION) + 1;
pInfo->SaveState(lpszProfileName, i);
}
}
#endif //_SCB_REPLACE_MINIFRAME && !_SCB_MINIFRAME_CAPTION
CWinApp* pApp = AfxGetApp();
TCHAR szSection[256];
wsprintf(szSection, _T("%s-SCBar-%d"), lpszProfileName,
GetDlgCtrlID());
m_szHorz.cx = max(m_szMinHorz.cx, (int) pApp->GetProfileInt(
szSection, _T("sizeHorzCX"), m_szHorz.cx));
m_szHorz.cy = max(m_szMinHorz.cy, (int) pApp->GetProfileInt(
szSection, _T("sizeHorzCY"), m_szHorz.cy));
m_szVert.cx = max(m_szMinVert.cx, (int) pApp->GetProfileInt(
szSection, _T("sizeVertCX"), m_szVert.cx));
m_szVert.cy = max(m_szMinVert.cy, (int) pApp->GetProfileInt(
szSection, _T("sizeVertCY"), m_szVert.cy));
m_szFloat.cx = max(m_szMinFloat.cx, (int) pApp->GetProfileInt(
szSection, _T("sizeFloatCX"), m_szFloat.cx));
m_szFloat.cy = max(m_szMinFloat.cy, (int) pApp->GetProfileInt(
szSection, _T("sizeFloatCY"), m_szFloat.cy));
}
void CSizingControlBar::SaveState(LPCTSTR lpszProfileName)
{
// place your SaveState or GlobalSaveState call in
// CMainFrame's OnClose() or DestroyWindow(), not in OnDestroy()
ASSERT_VALID(this);
ASSERT(GetSafeHwnd());
CWinApp* pApp = AfxGetApp();
TCHAR szSection[256];
wsprintf(szSection, _T("%s-SCBar-%d"), lpszProfileName,
GetDlgCtrlID());
pApp->WriteProfileInt(szSection, _T("sizeHorzCX"), m_szHorz.cx);
pApp->WriteProfileInt(szSection, _T("sizeHorzCY"), m_szHorz.cy);
pApp->WriteProfileInt(szSection, _T("sizeVertCX"), m_szVert.cx);
pApp->WriteProfileInt(szSection, _T("sizeVertCY"), m_szVert.cy);
pApp->WriteProfileInt(szSection, _T("sizeFloatCX"), m_szFloat.cx);
pApp->WriteProfileInt(szSection, _T("sizeFloatCY"), m_szFloat.cy);
}
void CSizingControlBar::GlobalLoadState(CFrameWnd* pFrame,
LPCTSTR lpszProfileName)
{
POSITION pos = pFrame->m_listControlBars.GetHeadPosition();
while (pos != NULL)
{
CSizingControlBar* pBar =
(CSizingControlBar*) pFrame->m_listControlBars.GetNext(pos);
ASSERT(pBar != NULL);
if (pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))
pBar->LoadState(lpszProfileName);
}
}
void CSizingControlBar::GlobalSaveState(CFrameWnd* pFrame,
LPCTSTR lpszProfileName)
{
POSITION pos = pFrame->m_listControlBars.GetHeadPosition();
while (pos != NULL)
{
CSizingControlBar* pBar =
(CSizingControlBar*) pFrame->m_listControlBars.GetNext(pos);
ASSERT(pBar != NULL);
if (pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))
pBar->SaveState(lpszProfileName);
}
}
#ifdef _SCB_REPLACE_MINIFRAME
#ifndef _SCB_MINIFRAME_CAPTION
/////////////////////////////////////////////////////////////////////////////
// CSCBDockContext Drag Operations
static void AdjustRectangle(CRect& rect, CPoint pt)
{
int nXOffset = (pt.x < rect.left) ? (pt.x - rect.left) :
(pt.x > rect.right) ? (pt.x - rect.right) : 0;
int nYOffset = (pt.y < rect.top) ? (pt.y - rect.top) :
(pt.y > rect.bottom) ? (pt.y - rect.bottom) : 0;
rect.OffsetRect(nXOffset, nYOffset);
}
void CSCBDockContext::StartDrag(CPoint pt)
{
ASSERT_VALID(m_pBar);
m_bDragging = TRUE;
InitLoop();
ASSERT((m_pBar->m_dwStyle & CBRS_SIZE_DYNAMIC) != 0);
// get true bar size (including borders)
CRect rect;
m_pBar->GetWindowRect(rect);
m_ptLast = pt;
CSize sizeHorz = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_HORZDOCK);
CSize sizeVert = m_pBar->CalcDynamicLayout(0, LM_VERTDOCK);
CSize sizeFloat = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH);
m_rectDragHorz = CRect(rect.TopLeft(), sizeHorz);
m_rectDragVert = CRect(rect.TopLeft(), sizeVert);
// calculate frame dragging rectangle
m_rectFrameDragHorz = CRect(rect.TopLeft(), sizeFloat);
#ifdef _MAC
CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz,
WS_THICKFRAME, WS_EX_FORCESIZEBOX);
#else
CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz, WS_THICKFRAME);
#endif
m_rectFrameDragHorz.DeflateRect(2, 2);
m_rectFrameDragVert = m_rectFrameDragHorz;
// adjust rectangles so that point is inside
AdjustRectangle(m_rectDragHorz, pt);
AdjustRectangle(m_rectDragVert, pt);
AdjustRectangle(m_rectFrameDragHorz, pt);
AdjustRectangle(m_rectFrameDragVert, pt);
// initialize tracking state and enter tracking loop
m_dwOverDockStyle = CanDock();
Move(pt); // call it here to handle special keys
Track();
}
#endif //_SCB_MINIFRAME_CAPTION
/////////////////////////////////////////////////////////////////////////////
// CSCBMiniDockFrameWnd
IMPLEMENT_DYNCREATE(CSCBMiniDockFrameWnd, baseCSCBMiniDockFrameWnd);
BEGIN_MESSAGE_MAP(CSCBMiniDockFrameWnd, baseCSCBMiniDockFrameWnd)
//{{AFX_MSG_MAP(CSCBMiniDockFrameWnd)
ON_WM_NCLBUTTONDOWN()
ON_WM_GETMINMAXINFO()
ON_WM_WINDOWPOSCHANGING()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CSCBMiniDockFrameWnd::Create(CWnd* pParent, DWORD dwBarStyle)
{
// set m_bInRecalcLayout to avoid flashing during creation
// RecalcLayout will be called once something is docked
m_bInRecalcLayout = TRUE;
DWORD dwStyle = WS_POPUP|WS_CAPTION|WS_SYSMENU|MFS_MOVEFRAME|
MFS_4THICKFRAME|MFS_SYNCACTIVE|MFS_BLOCKSYSMENU|
FWS_SNAPTOBARS;
if (dwBarStyle & CBRS_SIZE_DYNAMIC)
dwStyle &= ~MFS_MOVEFRAME;
DWORD dwExStyle = 0;
#ifdef _MAC
if (dwBarStyle & CBRS_SIZE_DYNAMIC)
dwExStyle |= WS_EX_FORCESIZEBOX;
else
dwStyle &= ~(MFS_MOVEFRAME|MFS_4THICKFRAME);
#endif
if (!CMiniFrameWnd::CreateEx(dwExStyle,
NULL, &afxChNil, dwStyle, rectDefault, pParent))
{
m_bInRecalcLayout = FALSE;
return FALSE;
}
dwStyle = dwBarStyle & (CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT) ?
CBRS_ALIGN_LEFT : CBRS_ALIGN_TOP;
dwStyle |= dwBarStyle & CBRS_FLOAT_MULTI;
CMenu* pSysMenu = GetSystemMenu(FALSE);
//pSysMenu->DeleteMenu(SC_SIZE, MF_BYCOMMAND);
CString strHide;
if (strHide.LoadString(AFX_IDS_HIDE))
{
pSysMenu->DeleteMenu(SC_CLOSE, MF_BYCOMMAND);
pSysMenu->AppendMenu(MF_STRING|MF_ENABLED, SC_CLOSE, strHide);
}
// must initially create with parent frame as parent
if (!m_wndDockBar.Create(pParent, WS_CHILD | WS_VISIBLE | dwStyle,
AFX_IDW_DOCKBAR_FLOAT))
{
m_bInRecalcLayout = FALSE;
return FALSE;
}
// set parent to CMiniDockFrameWnd
m_wndDockBar.SetParent(this);
m_bInRecalcLayout = FALSE;
return TRUE;
}
void CSCBMiniDockFrameWnd::OnNcLButtonDown(UINT nHitTest, CPoint point)
{
if (nHitTest == HTCAPTION || nHitTest == HTCLOSE)
{
baseCSCBMiniDockFrameWnd::OnNcLButtonDown(nHitTest, point);
return;
}
if (GetSizingControlBar() != NULL)
CMiniFrameWnd::OnNcLButtonDown(nHitTest, point);
else
baseCSCBMiniDockFrameWnd::OnNcLButtonDown(nHitTest, point);
}
CSizingControlBar* CSCBMiniDockFrameWnd::GetSizingControlBar()
{
CWnd* pWnd = GetWindow(GW_CHILD); // get the dockbar
if (pWnd == NULL)
return NULL;
pWnd = pWnd->GetWindow(GW_CHILD); // get the controlbar
if (pWnd == NULL)
return NULL;
if (!pWnd->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))
return NULL;
return (CSizingControlBar*) pWnd;
}
void CSCBMiniDockFrameWnd::OnSize(UINT nType, int cx, int cy)
{
CSizingControlBar* pBar = GetSizingControlBar();
if ((pBar != NULL) && (GetStyle() & MFS_4THICKFRAME) == 0
&& pBar->IsVisible())
pBar->m_szFloat = CSize(cx + 4, cy + 4);
baseCSCBMiniDockFrameWnd::OnSize(nType, cx, cy);
}
void CSCBMiniDockFrameWnd::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
baseCSCBMiniDockFrameWnd::OnGetMinMaxInfo(lpMMI);
CSizingControlBar* pBar = GetSizingControlBar();
if (pBar != NULL)
{
CRect r(CPoint(0, 0), pBar->m_szMinFloat - CSize(4, 4));
#ifndef _SCB_MINIFRAME_CAPTION
CMiniFrameWnd::CalcBorders(&r, WS_THICKFRAME);
#else
CMiniFrameWnd::CalcBorders(&r, WS_THICKFRAME|WS_CAPTION);
#endif //_SCB_MINIFRAME_CAPTION
lpMMI->ptMinTrackSize.x = r.Width();
lpMMI->ptMinTrackSize.y = r.Height();
}
}
void CSCBMiniDockFrameWnd::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
{
if ((GetStyle() & MFS_4THICKFRAME) != 0)
{
CSizingControlBar* pBar = GetSizingControlBar();
if (pBar != NULL)
{
lpwndpos->flags |= SWP_NOSIZE; // don't size this time
// prevents flicker
pBar->m_pDockBar->ModifyStyle(0, WS_CLIPCHILDREN);
// enable diagonal resizing
ModifyStyle(MFS_4THICKFRAME, 0);
#ifndef _SCB_MINIFRAME_CAPTION
// remove caption
ModifyStyle(WS_SYSMENU|WS_CAPTION, 0);
#endif
DelayRecalcLayout();
pBar->PostMessage(WM_NCPAINT);
}
}
CMiniFrameWnd::OnWindowPosChanging(lpwndpos);
}
#endif //_SCB_REPLACE_MINIFRAME
| [
"[email protected]"
] | |
329c89bf2ff84620ce957e6586008c0bfab42bab | f647d84e2dd4cd19a293b31e8f7ed7150db87d7b | /src/clientversion.cpp | fa5c02d30a06df6c10e91fc9a1e2eb5e10446a66 | [
"MIT"
] | permissive | v-core/v | 4d2e48ac35c2955a0f2c0066f50934c439a346d0 | f87e0fb859aae6aa7de8b3816093bf900fdcce42 | refs/heads/master | 2016-09-13T11:02:08.821961 | 2016-05-26T15:48:04 | 2016-05-26T15:48:04 | 59,747,904 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,990 | cpp | // Copyright (c) 2012-2014 The VCoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "clientversion.h"
#include "tinyformat.h"
#include <string>
/**
* Name of client reported in the 'version' message. Report the same name
* for both vcoind and bitcoin-core, to make it harder for attackers to
* target servers or GUI users specifically.
*/
const std::string CLIENT_NAME("Satoshi");
/**
* Client version number
*/
#define CLIENT_VERSION_SUFFIX ""
/**
* The following part of the code determines the CLIENT_BUILD variable.
* Several mechanisms are used for this:
* * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is
* generated by the build environment, possibly containing the output
* of git-describe in a macro called BUILD_DESC
* * secondly, if this is an exported version of the code, GIT_ARCHIVE will
* be defined (automatically using the export-subst git attribute), and
* GIT_COMMIT will contain the commit id.
* * then, three options exist for determining CLIENT_BUILD:
* * if BUILD_DESC is defined, use that literally (output of git-describe)
* * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit]
* * otherwise, use v[maj].[min].[rev].[build]-unk
* finally CLIENT_VERSION_SUFFIX is added
*/
//! First, include build.h if requested
#ifdef HAVE_BUILD_INFO
#include "build.h"
#endif
//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
#define GIT_ARCHIVE 1
#ifdef GIT_ARCHIVE
#define GIT_COMMIT_ID "9779e1e"
#define GIT_COMMIT_DATE "Mon, 11 Apr 2016 13:01:43 +0200"
#endif
#define BUILD_DESC_WITH_SUFFIX(maj, min, rev, build, suffix) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-" DO_STRINGIZE(suffix)
#define BUILD_DESC_FROM_COMMIT(maj, min, rev, build, commit) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit
#define BUILD_DESC_FROM_UNKNOWN(maj, min, rev, build) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk"
#ifndef BUILD_DESC
#ifdef BUILD_SUFFIX
#define BUILD_DESC BUILD_DESC_WITH_SUFFIX(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, BUILD_SUFFIX)
#elif defined(GIT_COMMIT_ID)
#define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID)
#else
#define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD)
#endif
#endif
#ifndef BUILD_DATE
#ifdef GIT_COMMIT_DATE
#define BUILD_DATE GIT_COMMIT_DATE
#else
#define BUILD_DATE __DATE__ ", " __TIME__
#endif
#endif
const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX);
const std::string CLIENT_DATE(BUILD_DATE);
static std::string FormatVersion(int nVersion)
{
if (nVersion % 100 == 0)
return strprintf("%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100);
else
return strprintf("%d.%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100, nVersion % 100);
}
std::string FormatFullVersion()
{
return CLIENT_BUILD;
}
/**
* Format the subversion field according to BIP 14 spec (https://github.com/vcoin/bips/blob/master/bip-0014.mediawiki)
*/
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
{
std::ostringstream ss;
ss << "/";
ss << name << ":" << FormatVersion(nClientVersion);
if (!comments.empty())
{
std::vector<std::string>::const_iterator it(comments.begin());
ss << "(" << *it;
for(++it; it != comments.end(); ++it)
ss << "; " << *it;
ss << ")";
}
ss << "/";
return ss.str();
}
| [
"[email protected]"
] | |
c25b384993c39b3671cdcc2307a2e8fe5e77f7cd | b9264aa2552272b19ca393ba818f9dcb8d91da10 | /hashmap/lib/seqan3/doc/tutorial/concepts/overloading_solution1.cpp | 1f524ee1e980a3bdf8c112711e5cc43d29d3f440 | [
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain",
"CC0-1.0",
"CC-BY-4.0",
"MIT"
] | permissive | eaasna/low-memory-prefilter | c29b3aeb76f70afc4f26da3d9f063b0bc2e251e0 | efa20dc8a95ce688d2a9d08773d120dff4cccbb6 | refs/heads/master | 2023-07-04T16:45:05.817237 | 2021-08-12T12:01:11 | 2021-08-12T12:01:11 | 383,427,746 | 0 | 0 | BSD-3-Clause | 2021-07-06T13:24:31 | 2021-07-06T10:22:54 | C++ | UTF-8 | C++ | false | false | 452 | cpp | #include <iostream> // for std::cout
#include <seqan3/alphabet/all.hpp> // include all alphabet headers
template <seqan3::alphabet t>
void print(t const v)
{
std::cout << "I am an alphabet and my value as char is: " << seqan3::to_char(v) << '\n';
}
int main()
{
using namespace seqan3::literals;
auto d = 'A'_dna5;
auto a = 'L'_aa27;
auto g = seqan3::gap{};
print(d);
print(a);
print(g);
}
| [
"[email protected]"
] | |
5d7fc224e6ad67e6d7f37c1b9ecffce4a796ca0c | fe6dc4be9803e52e0c4b777ad1f198a6656eb982 | /src/s2/base/port.h | 7733519e3cf0036dfc8540fab326a4836d4e877c | [
"Apache-2.0"
] | permissive | ianegordon/s2geometry | 22fdc70421a95bb597eabb6b74963f02d58fb57a | 95e14b4601be28b75a85765ec0db83443e2b3da5 | refs/heads/master | 2021-08-22T18:33:09.639816 | 2017-11-28T20:34:37 | 2017-11-28T20:34:37 | 112,672,953 | 0 | 0 | null | 2017-11-30T23:41:42 | 2017-11-30T23:41:42 | null | UTF-8 | C++ | false | false | 37,500 | h | // Copyright 2017 Google Inc. 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 S2_BASE_PORT_H_
#define S2_BASE_PORT_H_
// Users should still #include "base/port.h". Code in //third_party/absl/base
// is not visible for general use.
//
// This file contains things that are not used in third_party/absl but needed by
// - Platform specific requirement
// - MSVC
// - Utility macros
// - Endianness
// - Hash
// - Global variables
// - Type alias
// - Predefined system/language macros
// - Predefined system/language functions
// - Performance optimization (alignment, prefetch)
// - Obsolete
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include "s2/third_party/absl/base/config.h"
#include "s2/third_party/absl/base/integral_types.h"
#include "s2/third_party/absl/base/port.h" // IWYU pragma: export
#ifdef SWIG
%include "third_party/absl/base/port.h"
#endif
// -----------------------------------------------------------------------------
// MSVC Specific Requirements
// -----------------------------------------------------------------------------
#ifdef _MSC_VER /* if Visual C++ */
#include <winsock2.h> // Must come before <windows.h>
#include <intrin.h>
#include <process.h> // _getpid()
#include <windows.h>
#undef ERROR
#undef DELETE
// This compiler flag can be easily overlooked on MSVC.
// _CHAR_UNSIGNED gets set with the /J flag.
#ifndef _CHAR_UNSIGNED
#error chars must be unsigned! Use the /J flag on the compiler command line. // NOLINT
#endif
// Allow comparisons between signed and unsigned values.
//
// Lots of Google code uses this pattern:
// for (int i = 0; i < container.size(); ++i)
// Since size() returns an unsigned value, this warning would trigger
// frequently. Very few of these instances are actually bugs since containers
// rarely exceed MAX_INT items. Unfortunately, there are bugs related to
// signed-unsigned comparisons that have been missed because we disable this
// warning. For example:
// const long stop_time = os::GetMilliseconds() + kWaitTimeoutMillis;
// while (os::GetMilliseconds() <= stop_time) { ... }
#pragma warning(disable : 4018) // level 3
// Don't warn about unused local variables.
//
// extension to silence particular instances of this warning. There's no way
// to define ABSL_ATTRIBUTE_UNUSED to quiet particular instances of this warning
// in VC++, so we disable it globally. Currently, there aren't many false
// positives, so perhaps we can address those in the future and re-enable these
// warnings, which sometimes catch real bugs.
#pragma warning(disable : 4101) // level 3
// Allow initialization and assignment to a smaller type without warnings about
// possible loss of data.
//
// There is a distinct warning, 4267, that warns about size_t conversions to
// smaller types, but we don't currently disable that warning.
//
// Correct code can be written in such a way as to avoid false positives
// by making the conversion explicit, but Google code isn't usually that
// verbose. There are too many false positives to address at this time. Note
// that this warning triggers at levels 2, 3, and 4 depending on the specific
// type of conversion. By disabling it, we not only silence minor narrowing
// conversions but also serious ones.
#pragma warning(disable : 4244) // level 2, 3, and 4
// Allow silent truncation of double to float.
//
// Silencing this warning has caused us to miss some subtle bugs.
#pragma warning(disable : 4305) // level 1
// Allow a constant to be assigned to a type that is too small.
//
// I don't know why we allow this at all. I can't think of a case where this
// wouldn't be a bug, but enabling the warning breaks many builds today.
#pragma warning(disable : 4307) // level 2
// Allow passing the this pointer to an initializer even though it refers
// to an uninitialized object.
//
// Some observer implementations rely on saving the this pointer. Those are
// safe because the pointer is not dereferenced until after the object is fully
// constructed. This could however, obscure other instances. In the future, we
// should look into disabling this warning locally rather globally.
#pragma warning(disable : 4355) // level 1 and 4
// Allow implicit coercion from an integral type to a bool.
//
// These could be avoided by making the code more explicit, but that's never
// been the style here, so there would be many false positives. It's not
// obvious if a true positive would ever help to find an actual bug.
#pragma warning(disable : 4800) // level 3
#endif // _MSC_VER
// -----------------------------------------------------------------------------
// Utility Macros
// -----------------------------------------------------------------------------
// OS_IOS
#if defined(__APPLE__)
// traditionally defined OS_IOS themselves via other build systems, since mac
// TODO(user): Remove this when all toolchains make the proper defines.
#include <TargetConditionals.h>
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#ifndef OS_IOS
#define OS_IOS 1
#endif
#endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#endif // defined(__APPLE__)
// __GLIBC_PREREQ
#if defined OS_LINUX
// GLIBC-related macros.
#include <features.h>
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(a, b) 0 // not a GLIBC system
#endif
#endif // OS_LINUX
// STATIC_ANALYSIS
// Klocwork static analysis tool's C/C++ complier kwcc
#if defined(__KLOCWORK__)
#define STATIC_ANALYSIS
#endif // __KLOCWORK__
// SIZEOF_MEMBER, OFFSETOF_MEMBER
#define SIZEOF_MEMBER(t, f) sizeof(reinterpret_cast<t *>(4096)->f)
#define OFFSETOF_MEMBER(t, f) \
(reinterpret_cast<char *>(&(reinterpret_cast<t *>(16)->f)) - \
reinterpret_cast<char *>(16))
// LANG_CXX11
// GXX_EXPERIMENTAL_CXX0X is defined by gcc and clang up to at least
// gcc-4.7 and clang-3.1 (2011-12-13). __cplusplus was defined to 1
// in gcc before 4.7 (Crosstool 16) and clang before 3.1, but is
// defined according to the language version in effect thereafter.
// Microsoft Visual Studio 14 (2015) sets __cplusplus==199711 despite
// reasonably good C++11 support, so we set LANG_CXX for it and
// newer versions (_MSC_VER >= 1900).
#if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L || \
(defined(_MSC_VER) && _MSC_VER >= 1900))
// DEPRECATED: Do not key off LANG_CXX11. Instead, write more accurate condition
// that checks whether the C++ feature you need is available or missing, and
// define a more specific feature macro (GOOGLE_HAVE_FEATURE_FOO). You can check
// http://en.cppreference.com/w/cpp/compiler_support for compiler support on C++
// features.
// Define this to 1 if the code is compiled in C++11 mode; leave it
// undefined otherwise. Do NOT define it to 0 -- that causes
// '#ifdef LANG_CXX11' to behave differently from '#if LANG_CXX11'.
#define LANG_CXX11 1
#endif
// This sanity check can be removed when all references to
// LANG_CXX11 is removed from the code base.
#if defined(__cplusplus) && !defined(LANG_CXX11) && !defined(SWIG)
#error "LANG_CXX11 is required."
#endif
// GOOGLE_OBSCURE_SIGNAL
#if defined(__APPLE__)
// No SIGPWR on MacOSX. SIGINFO seems suitably obscure.
#define GOOGLE_OBSCURE_SIGNAL SIGINFO
#else
/* We use SIGPWR since that seems unlikely to be used for other reasons. */
#define GOOGLE_OBSCURE_SIGNAL SIGPWR
#endif
// ABSL_FUNC_PTR_TO_CHAR_PTR
// On some platforms, a "function pointer" points to a function descriptor
// rather than directly to the function itself.
// Use ABSL_FUNC_PTR_TO_CHAR_PTR(func) to get a char-pointer to the first
// instruction of the function func.
// TODO(b/30407660): Move this macro into Abseil when symbolizer is released in
// Abseil.
#if defined(__cplusplus)
#if (defined(__powerpc__) && !(_CALL_ELF > 1)) || defined(__ia64)
// use opd section for function descriptors on these platforms, the function
// address is the first word of the descriptor
namespace absl {
enum { kPlatformUsesOPDSections = 1 };
} // namespace absl
#define ABSL_FUNC_PTR_TO_CHAR_PTR(func) (reinterpret_cast<char **>(func)[0])
#else // not PPC or IA64
namespace absl {
enum { kPlatformUsesOPDSections = 0 };
} // namespace absl
#define ABSL_FUNC_PTR_TO_CHAR_PTR(func) (reinterpret_cast<char *>(func))
#endif // PPC or IA64
#endif // __cplusplus
// -----------------------------------------------------------------------------
// Utility Functions
// -----------------------------------------------------------------------------
// sized_delete
#ifdef __cplusplus
namespace base {
// We support C++14's sized deallocation for all C++ builds,
// though for other toolchains, we fall back to using delete.
inline void sized_delete(void *ptr, size_t size) {
#ifdef GOOGLE_HAVE_SIZED_DELETE
::operator delete(ptr, size);
#else
(void)size;
::operator delete(ptr);
#endif // GOOGLE_HAVE_SIZED_DELETE
}
inline void sized_delete_array(void *ptr, size_t size) {
#ifdef GOOGLE_HAVE_SIZED_DELETEARRAY
::operator delete[](ptr, size);
#else
(void) size;
::operator delete[](ptr);
#endif
}
} // namespace base
#endif // __cplusplus
// -----------------------------------------------------------------------------
// Endianness
// -----------------------------------------------------------------------------
// IS_LITTLE_ENDIAN, IS_BIG_ENDIAN
#if defined OS_LINUX || defined OS_ANDROID || defined(__ANDROID__)
// _BIG_ENDIAN
#include <endian.h>
#elif defined(__APPLE__)
// BIG_ENDIAN
#include <machine/endian.h> // NOLINT(build/include)
/* Let's try and follow the Linux convention */
#define __BYTE_ORDER BYTE_ORDER
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#define __BIG_ENDIAN BIG_ENDIAN
#endif
// defines __BYTE_ORDER for MSVC
#ifdef _MSC_VER
#define __BYTE_ORDER __LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN
#else
// define the macros IS_LITTLE_ENDIAN or IS_BIG_ENDIAN
// using the above endian definitions from endian.h if
// endian.h was included
#ifdef __BYTE_ORDER
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
#define IS_BIG_ENDIAN
#endif
#else // __BYTE_ORDER
#if defined(__LITTLE_ENDIAN__)
#define IS_LITTLE_ENDIAN
#elif defined(__BIG_ENDIAN__)
#define IS_BIG_ENDIAN
#endif
#endif // __BYTE_ORDER
#endif // _MSC_VER
// byte swap functions (bswap_16, bswap_32, bswap_64).
// The following guarantees declaration of the byte swap functions
#ifdef _MSC_VER
#include <cstdlib> // NOLINT(build/include)
#define bswap_16(x) _byteswap_ushort(x)
#define bswap_32(x) _byteswap_ulong(x)
#define bswap_64(x) _byteswap_uint64(x)
#elif defined(__APPLE__)
// Mac OS X / Darwin features
#include <libkern/OSByteOrder.h>
#define bswap_16(x) OSSwapInt16(x)
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)
#elif defined(__GLIBC__) || defined(__GENCLAVE__)
#include <byteswap.h> // IWYU pragma: export
#else
static inline uint16 bswap_16(uint16 x) {
#ifdef __cplusplus
return static_cast<uint16>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));
#else
return (uint16)(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8)); // NOLINT
#endif // __cplusplus
}
#define bswap_16(x) bswap_16(x)
static inline uint32 bswap_32(uint32 x) {
return (((x & 0xFF) << 24) |
((x & 0xFF00) << 8) |
((x & 0xFF0000) >> 8) |
((x & 0xFF000000) >> 24));
}
#define bswap_32(x) bswap_32(x)
static inline uint64 bswap_64(uint64 x) {
return (((x & GG_ULONGLONG(0xFF)) << 56) |
((x & GG_ULONGLONG(0xFF00)) << 40) |
((x & GG_ULONGLONG(0xFF0000)) << 24) |
((x & GG_ULONGLONG(0xFF000000)) << 8) |
((x & GG_ULONGLONG(0xFF00000000)) >> 8) |
((x & GG_ULONGLONG(0xFF0000000000)) >> 24) |
((x & GG_ULONGLONG(0xFF000000000000)) >> 40) |
((x & GG_ULONGLONG(0xFF00000000000000)) >> 56));
}
#define bswap_64(x) bswap_64(x)
#endif
// -----------------------------------------------------------------------------
// Hash
// -----------------------------------------------------------------------------
#ifdef __cplusplus
#ifdef STL_MSVC // not always the same as _MSC_VER
#include "s2/third_party/absl/base/internal/port_hash.inc"
#else
struct PortableHashBase {};
#endif // STL_MSVC
#endif // __cplusplus
// -----------------------------------------------------------------------------
// Global Variables
// -----------------------------------------------------------------------------
// PATH_SEPARATOR
// DEPRECATED: use absl::PathSeparator() instead.
// Define the OS's path separator
#ifdef __cplusplus // C won't merge duplicate const variables at link time
// Some headers provide a macro for this (GCC's system.h), remove it so that we
// can use our own.
#undef PATH_SEPARATOR
#if defined(_WIN32)
const char PATH_SEPARATOR = '\\';
#else
const char PATH_SEPARATOR = '/';
#endif // _WIN32
#endif // __cplusplus
// -----------------------------------------------------------------------------
// Type Alias
// -----------------------------------------------------------------------------
// uint, ushort, ulong
#if defined OS_LINUX
// The uint mess:
// mysql.h sets _GNU_SOURCE which sets __USE_MISC in <features.h>
// sys/types.h typedefs uint if __USE_MISC
// mysql typedefs uint if HAVE_UINT not set
// The following typedef is carefully considered, and should not cause
// any clashes
#if !defined(__USE_MISC)
#if !defined(HAVE_UINT)
#define HAVE_UINT 1
typedef unsigned int uint;
#endif // !HAVE_UINT
#if !defined(HAVE_USHORT)
#define HAVE_USHORT 1
typedef unsigned short ushort; // NOLINT
#endif // !HAVE_USHORT
#if !defined(HAVE_ULONG)
#define HAVE_ULONG 1
typedef unsigned long ulong; // NOLINT
#endif // !HAVE_ULONG
#endif // !__USE_MISC
#endif // OS_LINUX
#ifdef _MSC_VER /* if Visual C++ */
// VC++ doesn't understand "uint"
#ifndef HAVE_UINT
#define HAVE_UINT 1
typedef unsigned int uint;
#endif // !HAVE_UINT
#endif // _MSC_VER
#ifdef _MSC_VER
// uid_t
// MSVC doesn't have uid_t
typedef int uid_t;
// pid_t
// Defined all over the place.
typedef int pid_t;
#endif // _MSC_VER
// mode_t
#ifdef _MSC_VER
// From stat.h
typedef unsigned int mode_t;
#endif // _MSC_VER
// sig_t
#ifdef _MSC_VER
typedef void (*sig_t)(int);
#endif // _MSC_VER
// u_int16_t, int16_t
#ifdef _MSC_VER
// u_int16_t, int16_t don't exist in MSVC
typedef unsigned short u_int16_t; // NOLINT
typedef short int16_t; // NOLINT
#endif // _MSC_VER
// using std::hash
#ifdef _MSC_VER
#ifdef __cplusplus
// Define a minimal set of things typically available in the global
// namespace in Google code. ::string is handled elsewhere, and uniformly
// for all targets.
#include <functional>
using std::hash;
#endif // __cplusplus
#endif // _MSC_VER
// printf macros
// __STDC_FORMAT_MACROS must be defined before inttypes.h inclusion */
#if defined(__APPLE__)
/* From MacOSX's inttypes.h:
* "C++ implementations should define these macros only when
* __STDC_FORMAT_MACROS is defined before <inttypes.h> is included." */
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif /* __STDC_FORMAT_MACROS */
#endif /* __APPLE__ */
// printf macros for size_t, in the style of inttypes.h
#if defined(_LP64) || defined(__APPLE__)
#define __PRIS_PREFIX "z"
#else
#define __PRIS_PREFIX
#endif
// Use these macros after a % in a printf format string
// to get correct 32/64 bit behavior, like this:
// size_t size = records.size();
// printf("%" PRIuS "\n", size);
#define PRIdS __PRIS_PREFIX "d"
#define PRIxS __PRIS_PREFIX "x"
#define PRIuS __PRIS_PREFIX "u"
#define PRIXS __PRIS_PREFIX "X"
#define PRIoS __PRIS_PREFIX "o"
#define GPRIuPTHREAD "lu"
#define GPRIxPTHREAD "lx"
#define PRINTABLE_PTHREAD(pthreadt) pthreadt
#ifdef PTHREADS_REDHAT_WIN32
#include <pthread.h> // NOLINT(build/include)
#include <iosfwd> // NOLINT(build/include)
// pthread_t is not a simple integer or pointer on Win32
std::ostream &operator<<(std::ostream &out, const pthread_t &thread_id);
#endif
// -----------------------------------------------------------------------------
// Predefined System/Language Macros
// -----------------------------------------------------------------------------
// EXFULL
#if defined(__APPLE__)
// Linux has this in <linux/errno.h>
#define EXFULL ENOMEM // not really that great a translation...
#endif // __APPLE__
#ifdef _MSC_VER
// This actually belongs in errno.h but there's a name conflict in errno
// on WinNT. They (and a ton more) are also found in Winsock2.h, but
// if'd out under NT. We need this subset at minimum.
#define EXFULL ENOMEM // not really that great a translation...
#endif // _MSC_VER
// MSG_NOSIGNAL
#if defined(__APPLE__)
// Doesn't exist on OSX.
#define MSG_NOSIGNAL 0
#endif // __APPLE__
// __ptr_t
#if defined(__APPLE__)
// Linux has this in <sys/cdefs.h>
#define __ptr_t void *
#endif // __APPLE__
#ifdef _MSC_VER
// From glob.h
#define __ptr_t void *
#endif
// HUGE_VALF
#ifdef _MSC_VER
#include <cmath> // for HUGE_VAL
#ifndef HUGE_VALF
#define HUGE_VALF (static_cast<float>(HUGE_VAL))
#endif
#endif // _MSC_VER
// MAP_ANONYMOUS
#if defined(__APPLE__)
// For mmap, Linux defines both MAP_ANONYMOUS and MAP_ANON and says MAP_ANON is
// deprecated. In Darwin, MAP_ANON is all there is.
#if !defined MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif // !MAP_ANONYMOUS
#endif // __APPLE__
// PATH_MAX
// You say tomato, I say atotom
#ifdef _MSC_VER
#define PATH_MAX MAX_PATH
#endif
// -----------------------------------------------------------------------------
// Predefined System/Language Functions
// -----------------------------------------------------------------------------
// strnlen
#if defined(__APPLE__)
// Darwin doesn't have strnlen. No comment.
inline size_t strnlen(const char *s, size_t maxlen) {
const char* end = (const char *)memchr(s, '\0', maxlen);
if (end)
return end - s;
return maxlen;
}
#endif
// strtoq, strtouq, atoll
#ifdef _MSC_VER
#define strtoq _strtoi64
#define strtouq _strtoui64
#define atoll _atoi64
#endif // _MSC_VER
#ifdef _MSC_VER
// You say tomato, I say _tomato
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define strdup _strdup
#define tempnam _tempnam
#define chdir _chdir
#define getpid _getpid
#define getcwd _getcwd
#define putenv _putenv
#define timezone _timezone
#define tzname _tzname
#endif // _MSC_VER
// random, srandom
#ifdef _MSC_VER
// You say tomato, I say toma
inline int random() { return rand(); }
inline void srandom(unsigned int seed) { srand(seed); }
#endif // _MSC_VER
// bcopy, bzero
#ifdef _MSC_VER
// You say juxtapose, I say transpose
#define bcopy(s, d, n) memcpy(d, s, n)
// Really from <string.h>
inline void bzero(void *s, int n) { memset(s, 0, n); }
#endif // _MSC_VER
// gethostbyname
#if defined(OS_WINDOWS) || defined(__APPLE__)
// gethostbyname() *is* thread-safe for Windows native threads. It is also
// safe on Mac OS X and iOS, where it uses thread-local storage, even though the
// manpages claim otherwise. For details, see
// http://lists.apple.com/archives/Darwin-dev/2006/May/msg00008.html
#else
// gethostbyname() is not thread-safe. So disallow its use. People
// should either use the HostLookup::Lookup*() methods, or gethostbyname_r()
#define gethostbyname gethostbyname_is_not_thread_safe_DO_NOT_USE
#endif
// __has_extension
// Private implementation detail: __has_extension is useful to implement
// static_assert, and defining it for all toolchains avoids an extra level of
// nesting of #if/#ifdef/#ifndef.
#ifndef __has_extension
#define __has_extension(x) 0 // MSVC 10's preprocessor can't handle 'false'.
#endif
// -----------------------------------------------------------------------------
// Performance Optimization
// -----------------------------------------------------------------------------
// Alignment
// Unaligned APIs
// Portable handling of unaligned loads, stores, and copies.
// On some platforms, like ARM, the copy functions can be more efficient
// then a load and a store.
//
// It is possible to implement all of these these using constant-length memcpy
// calls, which is portable and will usually be inlined into simple loads and
// stores if the architecture supports it. However, such inlining usually
// happens in a pass that's quite late in compilation, which means the resulting
// loads and stores cannot participate in many other optimizations, leading to
// overall worse code.
// TODO(user): These APIs are forked in Abseil, see
// LLVM, we should reimplement these APIs with functions calling memcpy(), and
// maybe publish them in Abseil.
// The unaligned API is C++ only. The declarations use C++ features
// (namespaces, inline) which are absent or incompatible in C.
#if defined(__cplusplus)
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \
defined(MEMORY_SANITIZER)
// Consider we have an unaligned load/store of 4 bytes from address 0x...05.
// AddressSanitizer will treat it as a 3-byte access to the range 05:07 and
// will miss a bug if 08 is the first unaddressable byte.
// ThreadSanitizer will also treat this as a 3-byte access to 05:07 and will
// miss a race between this access and some other accesses to 08.
// MemorySanitizer will correctly propagate the shadow on unaligned stores
// and correctly report bugs on unaligned loads, but it may not properly
// update and report the origin of the uninitialized memory.
// For all three tools, replacing an unaligned access with a tool-specific
// callback solves the problem.
// Make sure uint16_t/uint32_t/uint64_t are defined.
#include <cstdint>
extern "C" {
uint16_t __sanitizer_unaligned_load16(const void *p);
uint32_t __sanitizer_unaligned_load32(const void *p);
uint64_t __sanitizer_unaligned_load64(const void *p);
void __sanitizer_unaligned_store16(void *p, uint16_t v);
void __sanitizer_unaligned_store32(void *p, uint32_t v);
void __sanitizer_unaligned_store64(void *p, uint64_t v);
} // extern "C"
inline uint16 UNALIGNED_LOAD16(const void *p) {
return __sanitizer_unaligned_load16(p);
}
inline uint32 UNALIGNED_LOAD32(const void *p) {
return __sanitizer_unaligned_load32(p);
}
inline uint64 UNALIGNED_LOAD64(const void *p) {
return __sanitizer_unaligned_load64(p);
}
inline void UNALIGNED_STORE16(void *p, uint16 v) {
__sanitizer_unaligned_store16(p, v);
}
inline void UNALIGNED_STORE32(void *p, uint32 v) {
__sanitizer_unaligned_store32(p, v);
}
inline void UNALIGNED_STORE64(void *p, uint64 v) {
__sanitizer_unaligned_store64(p, v);
}
#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386) || \
defined(_M_IX86) || defined(__ppc__) || defined(__PPC__) || \
defined(__ppc64__) || defined(__PPC64__)
// x86 and x86-64 can perform unaligned loads/stores directly;
// modern PowerPC hardware can also do unaligned integer loads and stores;
// but note: the FPU still sends unaligned loads and stores to a trap handler!
#define UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
#define UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
#define UNALIGNED_LOAD64(_p) (*reinterpret_cast<const uint64 *>(_p))
#define UNALIGNED_STORE16(_p, _val) (*reinterpret_cast<uint16 *>(_p) = (_val))
#define UNALIGNED_STORE32(_p, _val) (*reinterpret_cast<uint32 *>(_p) = (_val))
#define UNALIGNED_STORE64(_p, _val) (*reinterpret_cast<uint64 *>(_p) = (_val))
#elif defined(__arm__) && !defined(__ARM_ARCH_5__) && \
!defined(__ARM_ARCH_5T__) && !defined(__ARM_ARCH_5TE__) && \
!defined(__ARM_ARCH_5TEJ__) && !defined(__ARM_ARCH_6__) && \
!defined(__ARM_ARCH_6J__) && !defined(__ARM_ARCH_6K__) && \
!defined(__ARM_ARCH_6Z__) && !defined(__ARM_ARCH_6ZK__) && \
!defined(__ARM_ARCH_6T2__)
// ARMv7 and newer support native unaligned accesses, but only of 16-bit
// and 32-bit values (not 64-bit); older versions either raise a fatal signal,
// do an unaligned read and rotate the words around a bit, or do the reads very
// slowly (trip through kernel mode). There's no simple #define that says just
// “ARMv7 or higher”, so we have to filter away all ARMv5 and ARMv6
// sub-architectures. Newer gcc (>= 4.6) set an __ARM_FEATURE_ALIGNED #define,
// so in time, maybe we can move on to that.
//
// This is a mess, but there's not much we can do about it.
//
// To further complicate matters, only LDR instructions (single reads) are
// allowed to be unaligned, not LDRD (two reads) or LDM (many reads). Unless we
// explicitly tell the compiler that these accesses can be unaligned, it can and
// will combine accesses. On armcc, the way to signal this is done by accessing
// through the type (uint32 __packed *), but GCC has no such attribute
// (it ignores __attribute__((packed)) on individual variables). However,
// we can tell it that a _struct_ is unaligned, which has the same effect,
// so we do that.
namespace base {
namespace internal {
struct Unaligned16Struct {
uint16 value;
uint8 dummy; // To make the size non-power-of-two.
} ABSL_ATTRIBUTE_PACKED;
struct Unaligned32Struct {
uint32 value;
uint8 dummy; // To make the size non-power-of-two.
} ABSL_ATTRIBUTE_PACKED;
} // namespace internal
} // namespace base
#define UNALIGNED_LOAD16(_p) \
((reinterpret_cast<const ::base::internal::Unaligned16Struct *>(_p))->value)
#define UNALIGNED_LOAD32(_p) \
((reinterpret_cast<const ::base::internal::Unaligned32Struct *>(_p))->value)
#define UNALIGNED_STORE16(_p, _val) \
((reinterpret_cast< ::base::internal::Unaligned16Struct *>(_p))->value = \
(_val))
#define UNALIGNED_STORE32(_p, _val) \
((reinterpret_cast< ::base::internal::Unaligned32Struct *>(_p))->value = \
(_val))
// TODO(user): NEON supports unaligned 64-bit loads and stores.
// See if that would be more efficient on platforms supporting it,
// at least for copies.
inline uint64 UNALIGNED_LOAD64(const void *p) {
uint64 t;
memcpy(&t, p, sizeof t);
return t;
}
inline void UNALIGNED_STORE64(void *p, uint64 v) { memcpy(p, &v, sizeof v); }
#else
#define NEED_ALIGNED_LOADS
// These functions are provided for architectures that don't support
// unaligned loads and stores.
inline uint16 UNALIGNED_LOAD16(const void *p) {
uint16 t;
memcpy(&t, p, sizeof t);
return t;
}
inline uint32 UNALIGNED_LOAD32(const void *p) {
uint32 t;
memcpy(&t, p, sizeof t);
return t;
}
inline uint64 UNALIGNED_LOAD64(const void *p) {
uint64 t;
memcpy(&t, p, sizeof t);
return t;
}
inline void UNALIGNED_STORE16(void *p, uint16 v) { memcpy(p, &v, sizeof v); }
inline void UNALIGNED_STORE32(void *p, uint32 v) { memcpy(p, &v, sizeof v); }
inline void UNALIGNED_STORE64(void *p, uint64 v) { memcpy(p, &v, sizeof v); }
#endif
// The UNALIGNED_LOADW and UNALIGNED_STOREW macros load and store values
// of type uword_t.
#ifdef _LP64
#define UNALIGNED_LOADW(_p) UNALIGNED_LOAD64(_p)
#define UNALIGNED_STOREW(_p, _val) UNALIGNED_STORE64(_p, _val)
#else
#define UNALIGNED_LOADW(_p) UNALIGNED_LOAD32(_p)
#define UNALIGNED_STOREW(_p, _val) UNALIGNED_STORE32(_p, _val)
#endif
inline void UnalignedCopy16(const void *src, void *dst) {
UNALIGNED_STORE16(dst, UNALIGNED_LOAD16(src));
}
inline void UnalignedCopy32(const void *src, void *dst) {
UNALIGNED_STORE32(dst, UNALIGNED_LOAD32(src));
}
inline void UnalignedCopy64(const void *src, void *dst) {
if (sizeof(void *) == 8) {
UNALIGNED_STORE64(dst, UNALIGNED_LOAD64(src));
} else {
const char *src_char = reinterpret_cast<const char *>(src);
char *dst_char = reinterpret_cast<char *>(dst);
UNALIGNED_STORE32(dst_char, UNALIGNED_LOAD32(src_char));
UNALIGNED_STORE32(dst_char + 4, UNALIGNED_LOAD32(src_char + 4));
}
}
#endif // defined(__cplusplus), end of unaligned API
// aligned_malloc, aligned_free
#if defined(__ANDROID__) || defined(__GENCLAVE__)
#include <malloc.h> // for memalign()
#endif
// __GENCLAVE__ platform uses newlib without an underlying OS, which provides
// memalign, but not posix_memalign.
#if defined(__cplusplus) && \
(((defined(__GNUC__) || defined(__APPLE__) || \
defined(__NVCC__)) && \
!defined(SWIG)) || \
((__GNUC__ >= 3 || defined(__clang__)) && defined(__ANDROID__)) || \
defined(__GENCLAVE__))
inline void *aligned_malloc(size_t size, int minimum_alignment) {
#if defined(__ANDROID__) || defined(OS_ANDROID) || defined(__GENCLAVE__)
return memalign(minimum_alignment, size);
#else // !__ANDROID__ && !OS_ANDROID && !__GENCLAVE__
void *ptr = nullptr;
// posix_memalign requires that the requested alignment be at least
// sizeof(void*). In this case, fall back on malloc which should return memory
// aligned to at least the size of a pointer.
const int required_alignment = sizeof(void*);
if (minimum_alignment < required_alignment)
return malloc(size);
if (posix_memalign(&ptr, static_cast<size_t>(minimum_alignment), size) != 0)
return nullptr;
else
return ptr;
#endif
}
inline void aligned_free(void *aligned_memory) {
free(aligned_memory);
}
#elif defined(_MSC_VER) // MSVC
inline void *aligned_malloc(size_t size, int minimum_alignment) {
return _aligned_malloc(size, minimum_alignment);
}
inline void aligned_free(void *aligned_memory) {
_aligned_free(aligned_memory);
}
#endif // aligned_malloc, aligned_free
// ALIGNED_CHAR_ARRAY
//
// Provides a char array with the exact same alignment as another type. The
// first parameter must be a complete type, the second parameter is how many
// of that type to provide space for.
//
// ALIGNED_CHAR_ARRAY(struct stat, 16) storage_;
//
#if defined(__cplusplus)
#undef ALIGNED_CHAR_ARRAY
// Because MSVC and older GCCs require that the argument to their alignment
// construct to be a literal constant integer, we use a template instantiated
// at all the possible powers of two.
#ifndef SWIG
template<int alignment, int size> struct AlignType { };
template<int size> struct AlignType<0, size> { typedef char result[size]; };
#if defined(_MSC_VER)
#define BASE_PORT_H_ALIGN_ATTRIBUTE(X) __declspec(align(X))
#define BASE_PORT_H_ALIGN_OF(T) __alignof(T)
#elif defined(__GNUC__) || defined(__INTEL_COMPILER)
#define BASE_PORT_H_ALIGN_ATTRIBUTE(X) __attribute__((aligned(X)))
#define BASE_PORT_H_ALIGN_OF(T) __alignof__(T)
#endif
#if defined(BASE_PORT_H_ALIGN_ATTRIBUTE)
#define BASE_PORT_H_ALIGNTYPE_TEMPLATE(X) \
template<int size> struct AlignType<X, size> { \
typedef BASE_PORT_H_ALIGN_ATTRIBUTE(X) char result[size]; \
}
BASE_PORT_H_ALIGNTYPE_TEMPLATE(1);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(2);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(4);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(8);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(16);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(32);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(64);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(128);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(256);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(512);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(1024);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(2048);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(4096);
BASE_PORT_H_ALIGNTYPE_TEMPLATE(8192);
// Any larger and MSVC++ will complain.
#define ALIGNED_CHAR_ARRAY(T, Size) \
typename AlignType<BASE_PORT_H_ALIGN_OF(T), sizeof(T) * Size>::result
#undef BASE_PORT_H_ALIGNTYPE_TEMPLATE
#undef BASE_PORT_H_ALIGN_ATTRIBUTE
#else // defined(BASE_PORT_H_ALIGN_ATTRIBUTE)
#define ALIGNED_CHAR_ARRAY \
you_must_define_ALIGNED_CHAR_ARRAY_for_your_compiler_in_base_port_h
#endif // defined(BASE_PORT_H_ALIGN_ATTRIBUTE)
#else // !SWIG
// SWIG can't represent alignment and doesn't care about alignment on data
// members (it works fine without it).
template<typename Size>
struct AlignType { typedef char result[Size]; };
#define ALIGNED_CHAR_ARRAY(T, Size) AlignType<Size * sizeof(T)>::result
// Enough to parse with SWIG, will never be used by running code.
#define BASE_PORT_H_ALIGN_OF(Type) 16
#endif // !SWIG
#else // __cplusplus
#define ALIGNED_CHAR_ARRAY ALIGNED_CHAR_ARRAY_is_not_available_without_Cplusplus
#endif // __cplusplus
// Prefetch
#if (defined(__GNUC__) || defined(__APPLE__)) && \
!defined(SWIG)
#ifdef __cplusplus
#if defined(__GNUC__) || defined(__llvm__)
// Defined behavior on some of the uarchs:
// PREFETCH_HINT_T0:
// prefetch to all levels of the hierarchy (except on p4: prefetch to L2)
// PREFETCH_HINT_NTA:
// p4: fetch to L2, but limit to 1 way (out of the 8 ways)
// core: skip L2, go directly to L1
// k8 rev E and later: skip L2, can go to either of the 2-ways in L1
enum PrefetchHint {
PREFETCH_HINT_T0 = 3, // More temporal locality
PREFETCH_HINT_T1 = 2,
PREFETCH_HINT_T2 = 1, // Less temporal locality
PREFETCH_HINT_NTA = 0 // No temporal locality
};
#else
// prefetch is a no-op for this target. Feel free to add more sections above.
#endif
// The default behavior of prefetch is to speculatively load for read only. This
// is safe for all currently supported platforms. However, prefetch for store
// may have problems depending on the target platform (x86, PPC, arm). Check
// with the platforms team (platforms-servers@) before introducing any changes
// to this function to identify potential impact on current and future servers.
extern inline void prefetch(const void *x, int hint) {
#if defined(__llvm__)
// In the gcc version of prefetch(), hint is only a constant _after_ inlining
// (assumed to have been successful). llvm views things differently, and
// checks constant-ness _before_ inlining. This leads to compilation errors
// with using the other version of this code with llvm.
//
// One way round this is to use a switch statement to explicitly match
// prefetch hint enumerations, and invoke __builtin_prefetch for each valid
// value. llvm's optimization removes the switch and unused case statements
// after inlining, so that this boils down in the end to the same as for gcc;
// that is, a single inlined prefetchX instruction.
//
// Note that this version of prefetch() cannot verify constant-ness of hint.
// If client code calls prefetch() with a variable value for hint, it will
// receive the full expansion of the switch below, perhaps also not inlined.
// This should however not be a problem in the general case of well behaved
// caller code that uses the supplied prefetch hint enumerations.
switch (hint) {
case PREFETCH_HINT_T0:
__builtin_prefetch(x, 0, PREFETCH_HINT_T0);
break;
case PREFETCH_HINT_T1:
__builtin_prefetch(x, 0, PREFETCH_HINT_T1);
break;
case PREFETCH_HINT_T2:
__builtin_prefetch(x, 0, PREFETCH_HINT_T2);
break;
case PREFETCH_HINT_NTA:
__builtin_prefetch(x, 0, PREFETCH_HINT_NTA);
break;
default:
__builtin_prefetch(x);
break;
}
#elif defined(__GNUC__)
#if !defined(ARCH_PIII) || defined(__SSE__)
if (__builtin_constant_p(hint)) {
__builtin_prefetch(x, 0, hint);
} else {
// Defaults to PREFETCH_HINT_T0
__builtin_prefetch(x);
}
#else
// We want a __builtin_prefetch, but we build with the default -march=i386
// where __builtin_prefetch quietly turns into nothing.
// Once we crank up to -march=pentium3 or higher the __SSE__
// clause above will kick in with the builtin.
// -- mec 2006-06-06
if (hint == PREFETCH_HINT_NTA)
__asm__ __volatile__("prefetchnta (%0)" : : "r"(x));
#endif
#else
// You get no effect. Feel free to add more sections above.
#endif
}
// prefetch intrinsic (bring data to L1 without polluting L2 cache)
extern inline void prefetch(const void *x) { return prefetch(x, 0); }
#endif // ifdef __cplusplus
#else // not GCC
#if defined(__cplusplus)
extern inline void prefetch(const void *) {}
extern inline void prefetch(const void *, int) {}
#endif
#endif // Prefetch
// -----------------------------------------------------------------------------
// Obsolete (to be removed)
// -----------------------------------------------------------------------------
// FTELLO, FSEEKO
#if (defined(__GNUC__) || defined(__APPLE__)) && \
!defined(SWIG)
#define FTELLO ftello
#define FSEEKO fseeko
#else // not GCC
// These should be redefined appropriately if better alternatives to
// ftell/fseek exist in the compiler
#define FTELLO ftell
#define FSEEKO fseek
#endif // GCC
// __STD
// Our STL-like classes use __STD.
#if defined(__GNUC__) || defined(__APPLE__) || \
defined(_MSC_VER)
#define __STD std
#endif
// STREAM_SET, STREAM_SETF
#if defined __GNUC__
#define STREAM_SET(s, bit) (s).setstate(std::ios_base::bit)
#define STREAM_SETF(s, flag) (s).setf(std::ios_base::flag)
#else
#define STREAM_SET(s, bit) (s).set(std::ios::bit)
#define STREAM_SETF(s, flag) (s).setf(std::ios::flag)
#endif
// CompileAssert
#ifdef __cplusplus
// CompileAssert<T> is deprecated. Use static_assert instead.
template <bool>
struct CompileAssert {
};
#endif // __cplusplus
#endif // S2_BASE_PORT_H_
| [
"[email protected]"
] | |
ea04d7da15114a447bccdfc1fad9afabbdfa5a09 | 5d83739af703fb400857cecc69aadaf02e07f8d1 | /Archive2/38/200c9ea070beb5/main.cpp | 77374c1f7496df2cf1272db3bdce5d12fcee4f8b | [] | no_license | WhiZTiM/coliru | 3a6c4c0bdac566d1aa1c21818118ba70479b0f40 | 2c72c048846c082f943e6c7f9fa8d94aee76979f | refs/heads/master | 2021-01-01T05:10:33.812560 | 2015-08-24T19:09:22 | 2015-08-24T19:09:22 | 56,789,706 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,087 | cpp | #include <iostream>
#include <functional>
#include <utility>
struct Noisy
{
Noisy() { std::cout << "Noisy()" << std::endl; }
Noisy(const Noisy&) { std::cout << "Noisy(const Noisy&)" << std::endl; }
Noisy(Noisy&&) { std::cout << "Noisy(Noisy&&)" << std::endl; }
~Noisy() { std::cout << "~Noisy()" << std::endl; }
Noisy& operator=(const Noisy&) { std::cout << "operator=(const Noisy&)" << std::endl; return *this; }
Noisy& operator=(Noisy&&) { std::cout << "operator=(Noisy&&)" << std::endl; return *this; }
};
struct Base
{
int target(Noisy& a, Noisy b)
{
std::cout << "Base::target" << std::endl;
return 0;
}
};
Base* get_base() { static Base b; return &b; }
template <typename T, T t>
struct trap;
template <typename R, typename... Args, R(Base::*t)(Args...)>
struct trap<R(Base::*)(Args...), t>
{
static R call(Args... args)
{
return (get_base()->*t)(std::move<Args>(args)...); // WRONG!
}
};
int main()
{
auto f = &trap<decltype(&Base::target), &Base::target>::call;
Noisy a, b;
f(a, b);
}
| [
"francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df"
] | francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df |
3328d8fbc5cf6872a00dad8f8983974df0741ced | 978dc65142347b14b237dab27931bc99efd6f16b | /sw/wang/flearner.cpp | b1373118cb687d0800922007037cdf846f5aa81a | [] | no_license | kreikenbaum/wfcomplete | cdb8c0e4621970dc8657359e4766c62037cf8c75 | e638c8e0ec27e6d6e438df858918dfd1b7b4ecac | refs/heads/master | 2020-04-08T21:58:50.685075 | 2018-11-30T16:32:39 | 2018-11-30T16:32:39 | 159,766,085 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 22,650 | cpp | #include <iostream>
#include <fstream>
#include <cmath>
#include <string>
#include <string.h>
#include <sstream>
#include <time.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;
//Data parameters
int FEAT_NUM = 3736; //number of features
int SITE_NUM = 100; //number of monitored sites
int INST_NUM = 60; //number of instances per site for distance learning
int TEST_NUM = 30; //number of instances per site for kNN training/testing
int OPENTEST_NUM = 0; //number of open instances for kNN training/testing
int NEIGHBOUR_NUM = 1; //number of neighbors for kNN
const int RECOPOINTS_NUM = 5; //number of neighbors for distance learning
//Algorithmic Parameters
float POWER = 0.1; //not used in this code
//Only in old recommendation algorithm
const int RECOLIST_NUM = 10;
const int RECO_NUM = 1;
bool inarray(int ele, int* array, int len) {
for (int i = 0; i < len; i++) {
if (array[i] == ele)
return 1;
}
return 0;
}
void alg_init_weight(float** feat, float* weight) {
for (int i = 0; i < FEAT_NUM; i++) {
weight[i] = (rand() % 100) / 100.0 + 0.5;
}
/*float sum = 0;
for (int j = 0; j < FEAT_NUM; j++) {
if (abs(weight[j]) > sum) {
sum += abs(weight[j]);
}
}
for (int j = 0; j < FEAT_NUM; j++) {
weight[j] = weight[j]/sum * 1000;
}*/
}
// distance ?
// td mb ref: remove =power=
float dist(float* feat1, float* feat2, float* weight, float power) {
float toret = 0;
for (int i = 0; i < FEAT_NUM; i++) {
if (feat1[i] != -1 and feat2[i] != -1) {
toret += weight[i] * abs(feat1[i] - feat2[i]);
}
}
return toret;
}
void alg_recommend2(float** feat, float* weight, int start, int end) {
float* distlist = new float[SITE_NUM * INST_NUM];
int* recogoodlist = new int[RECOPOINTS_NUM];
int* recobadlist = new int[RECOPOINTS_NUM];
for (int i = start; i < end; i++) {
printf("\rLearning distance... %d (%d-%d)", i, start, end);
fflush(stdout);
int cur_site = i/INST_NUM;
int cur_inst = i % INST_NUM;
float pointbadness = 0;
float maxgooddist = 0;
for (int k = 0; k < SITE_NUM*INST_NUM; k++) {
distlist[k] = dist(feat[i], feat[k], weight, POWER);
}
float max = *max_element(distlist, distlist+SITE_NUM*INST_NUM);
distlist[i] = max;
for (int k = 0; k < RECOPOINTS_NUM; k++) {
int ind = min_element(distlist+cur_site*INST_NUM, distlist+(cur_site+1)*INST_NUM) - distlist;
if (distlist[ind] > maxgooddist) maxgooddist = distlist[ind];
distlist[ind] = max;
recogoodlist[k] = ind;
}
for (int k = 0; k < INST_NUM; k++) {
distlist[cur_site*INST_NUM+k] = max;
}
for (int k = 0; k < RECOPOINTS_NUM; k++) {
int ind = min_element(distlist, distlist+ SITE_NUM * INST_NUM) - distlist;
if (distlist[ind] <= maxgooddist) pointbadness += 1;
distlist[ind] = max;
recobadlist[k] = ind;
}
pointbadness /= float(RECOPOINTS_NUM);
pointbadness += 0.2;
/*
if (i == 0) {
float gooddist = 0;
float baddist = 0;
printf("Current point: %d\n", i);
printf("Bad points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recobadlist[k], dist(feat[i], feat[recobadlist[k]], weight, POWER));
baddist += dist(feat[i], feat[recobadlist[k]], weight, POWER);
}
printf("Good points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recogoodlist[k], dist(feat[i], feat[recogoodlist[k]], weight, POWER));
gooddist += dist(feat[i], feat[recogoodlist[k]], weight, POWER);
}
printf("Total bad distance: %f\n", baddist);
printf("Total good distance: %f\n", gooddist);
}*/
float* featdist = new float[FEAT_NUM];
for (int f = 0; f < FEAT_NUM; f++) {
featdist[f] = 0;
}
int* badlist = new int[FEAT_NUM];
int minbadlist = 0;
int countbadlist = 0;
//printf("%d ", badlist[3]);
for (int f = 0; f < FEAT_NUM; f++) {
if (weight[f] == 0) badlist[f] == 0;
else {
float maxgood = 0;
int countbad = 0;
for (int k = 0; k < RECOPOINTS_NUM; k++) {
float n = abs(feat[i][f] - feat[recogoodlist[k]][f]);
if (feat[i][f] == -1 or feat[recobadlist[k]][f] == -1)
n = 0;
if (n >= maxgood) maxgood = n;
}
for (int k = 0; k < RECOPOINTS_NUM; k++) {
float n = abs(feat[i][f] - feat[recobadlist[k]][f]);
if (feat[i][f] == -1 or feat[recobadlist[k]][f] == -1)
n = 0;
//if (f == 3) {
// printf("%d %d %f %f\n", i, k, n, maxgood);
//}
featdist[f] += n;
if (n <= maxgood) countbad += 1;
}
badlist[f] = countbad;
if (countbad < minbadlist) minbadlist = countbad;
}
}
for (int f = 0; f < FEAT_NUM; f++) {
if (badlist[f] != minbadlist) countbadlist += 1;
}
int* w0id = new int[countbadlist];
float* change = new float[countbadlist];
int temp = 0;
float C1 = 0;
float C2 = 0;
for (int f = 0; f < FEAT_NUM; f++) {
if (badlist[f] != minbadlist) {
w0id[temp] = f;
change[temp] = weight[f] * 0.01 * badlist[f]/float(RECOPOINTS_NUM) * pointbadness;
//if (change[temp] < 1.0/1000) change[temp] = weight[f];
C1 += change[temp] * featdist[f];
C2 += change[temp];
weight[f] -= change[temp];
temp += 1;
}
}
/*if (i == 0) {
printf("%d %f %f\n", countbadlist, C1, C2);
for (int f = 0; f < 30; f++) {
printf("%f %f\n", weight[f], featdist[f]);
}
}*/
float totalfd = 0;
for (int f = 0; f < FEAT_NUM; f++) {
if (badlist[f] == minbadlist and weight[f] > 0) {
totalfd += featdist[f];
}
}
for (int f = 0; f < FEAT_NUM; f++) {
if (badlist[f] == minbadlist and weight[f] > 0) {
weight[f] += C1/(totalfd);
}
}
/*if (i == 0) {
printf("%d %f %f\n", countbadlist, C1, C2);
for (int f = 0; f < 30; f++) {
printf("%f %f\n", weight[f], featdist[f]);
}
}*/
/*if (i == 0) {
float gooddist = 0;
float baddist = 0;
printf("Current point: %d\n", i);
printf("Bad points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recobadlist[k], dist(feat[i], feat[recobadlist[k]], weight, POWER));
baddist += dist(feat[i], feat[recobadlist[k]], weight, POWER);
}
printf("Good points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recogoodlist[k], dist(feat[i], feat[recogoodlist[k]], weight, POWER));
gooddist += dist(feat[i], feat[recogoodlist[k]], weight, POWER);
}
printf("Total bad distance: %f\n", baddist);
printf("Total good distance: %f\n", gooddist);
}*/
delete[] featdist;
delete[] w0id;
delete[] change;
delete[] badlist;
}
for (int j = 0; j < FEAT_NUM; j++) {
if (weight[j] > 0)
weight[j] *= (0.9 + (rand() % 100) / 500.0);
}
printf("\n");
delete[] distlist;
delete[] recobadlist;
delete[] recogoodlist;
}
//no longer used
void alg_recommend(float** feat, float* weight, float** reco) {
float* distlist = new float[SITE_NUM * INST_NUM];
int* recogoodlist = new int[RECOLIST_NUM];
int* recobadlist = new int[RECOLIST_NUM];
for (int i = 0; i < SITE_NUM * INST_NUM; i++) {
int cur_site = i/INST_NUM;
int cur_inst = i % INST_NUM;
for (int k = 0; k < SITE_NUM*INST_NUM; k++) {
distlist[k] = dist(feat[i], feat[k], weight, POWER);
}
float max = *max_element(distlist, distlist+SITE_NUM*INST_NUM);
distlist[i] = max;
for (int k = 0; k < RECOLIST_NUM; k++) {
int ind = min_element(distlist+cur_site*INST_NUM, distlist+(cur_site+1)*INST_NUM) - distlist;
distlist[ind] = max;
recogoodlist[k] = ind;
}
for (int k = 0; k < INST_NUM; k++) {
distlist[cur_site*INST_NUM+k] = max;
}
for (int k = 0; k < RECOLIST_NUM; k++) {
int ind = min_element(distlist, distlist+ SITE_NUM * INST_NUM) - distlist;
distlist[ind] = max;
recobadlist[k] = ind;
}
for (int f = 0; f < FEAT_NUM; f++) {
reco[i][f] = 0;
}
if (i == 0) {
float gooddist = 0;
float baddist = 0;
printf("Current point: %d\n", i);
printf("Bad points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recobadlist[k], dist(feat[i], feat[recobadlist[k]], weight, POWER));
baddist += dist(feat[i], feat[recobadlist[k]], weight, POWER);
}
printf("Good points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recogoodlist[k], dist(feat[i], feat[recogoodlist[k]], weight, POWER));
gooddist += dist(feat[i], feat[recogoodlist[k]], weight, POWER);
}
printf("Total bad distance: %f\n", baddist);
printf("Total good distance: %f\n", gooddist);
float* tempweight = new float[FEAT_NUM];
for (int f = 0; f < FEAT_NUM; f++) {
tempweight[f] = 0;
}
for (int k = 0; k < RECOPOINTS_NUM; k++) {
int ind1 = recobadlist[k];
int ind2 = recogoodlist[k];
//float dist1 = dist(feat[i], feat[ind1], weight, POWER);
//float dist2 = dist(feat[i], feat[ind2], weight, POWER);
for (int f = 0; f < FEAT_NUM; f++) {
tempweight[f] += abs(feat[i][f] - feat[ind1][f]);
tempweight[f] -= abs(feat[i][f] - feat[ind2][f]);
}
}
for (int f = 0; f < 25; f++) {
printf("Weight %d: Value %f, Change %f\n", f, weight[f], tempweight[f]);
}
float sumweight = 0;
for (int f = 0; f < FEAT_NUM; f++) {
if (tempweight[f] < 0) tempweight[f] = 0;
sumweight += abs(tempweight[f]);
}
for (int f = 0; f < FEAT_NUM; f++) {
tempweight[f] /= sumweight;
tempweight[f] += weight[f];
}
baddist = 0;
gooddist = 0;
printf("Bad points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recobadlist[k], dist(feat[i], feat[recobadlist[k]], tempweight, POWER));
baddist += dist(feat[i], feat[recobadlist[k]], tempweight, POWER);
}
printf("Good points:\n");
for (int k = 0; k < RECOPOINTS_NUM; k++) {
printf("%d, %f\n", recogoodlist[k], dist(feat[i], feat[recogoodlist[k]], tempweight, POWER));
gooddist += dist(feat[i], feat[recogoodlist[k]], tempweight, POWER);
}
printf("Total bad distance: %f\n", baddist);
printf("Total good distance: %f\n", gooddist);
delete[] tempweight;
}
for (int k = 0; k < RECOPOINTS_NUM; k++) {
int ind1 = recobadlist[k];
int ind2 = recogoodlist[k];
//float dist1 = dist(feat[i], feat[ind1], weight, POWER);
//float dist2 = dist(feat[i], feat[ind2], weight, POWER);
for (int f = 0; f < FEAT_NUM; f++) {
reco[i][f] += abs(feat[i][f] - feat[ind1][f]);
reco[i][f] -= abs(feat[i][f] - feat[ind2][f]);
}
}
/*
for (int rec = 0; rec < RECO_NUM; rec++) {
int ind1 = recobadlist[0];
int ind2 = recogoodlist[RECOLIST_NUM - rec - 1];
float dist1 = dist(feat[i], feat[ind1], weight, POWER);
float dist2 = dist(feat[i], feat[ind2], weight, POWER);
for (int k = 0; k < FEAT_NUM; k++) {
//recommend how the weight should change.
//positive: increase weight because it's useful. more positive if more useful.
//negative: decrease weight because it's not useful. more negative if less useful.
float div = dist2-dist1;
if (div < dist1/100)
div = dist1/100; //div = (abs(dist2-dist1)/(dist2-dist1)) * dist1/100;
reco[i + rec * INST_NUM * SITE_NUM][k] = (abs(feat[ind1][k] - feat[i][k]) - abs(feat[ind2][k] - feat[i][k]))/div;
}
}*/
/*
printf("Point: %d, features %f, %f, %f\n", i, feat[i][0], feat[i][1], feat[i][2]);
printf("Closest outside point: Ind %d, dist %f, features %f, %f, %f\n", ind1, dist1, feat[ind1][0], feat[ind1][1], feat[ind1][2]);
printf("Most distant inside point: Ind %d, dist %f, features %f, %f, %f\n", ind2, dist2, feat[ind2][0], feat[ind2][1], feat[ind2][2]);
for (int a = 0; a < 5; a++) {
printf("%d ", recobadlist[a]);
}
printf("\n---\n");
if (i == 137) {
for (int j = 0; j < SITE_NUM*INST_NUM; j++) {
printf("%f ", distlist[j]);
}
}
printf("\n");*/
}
delete[] distlist;
delete[] recobadlist;
delete[] recogoodlist;
}
//no longer used
void alg_mod_weight(float* weight, float** reco) {
float votesum = 0;
/*for (int i = 0; i < SITE_NUM*INST_NUM*RECO_NUM; i++) {
votesum = 0;
for (int j = 0; j < FEAT_NUM; j++) {
votesum += abs(reco[i][j]);
}
for (int j = 0; j < FEAT_NUM; j++) {
//reco[i][j] = reco[i][j] / votesum;
}
}*/
float* sumreco = new float[FEAT_NUM];
for (int i = 0; i < FEAT_NUM; i++){
sumreco[i] = 0;
}
for (int i = 0; i < SITE_NUM*INST_NUM*RECO_NUM; i++) {
for (int j = 0; j < FEAT_NUM; j++) {
//if (reco[i][j] > 1) reco[i][j] = 1;
//if (reco[i][j] < -1) reco[i][j] = -1;
sumreco[j] += reco[i][j];
}
}
for (int i = 0; i < FEAT_NUM; i++) {
sumreco[i] /= SITE_NUM*INST_NUM*RECO_NUM;
}
/*
for (int i = 0; i < 5; i++) {
printf("%f ", sumreco[i]);
}
printf("\n");
*/
for (int j = 0; j < FEAT_NUM; j++) {
weight[j] += sumreco[j] * 40;
if (weight[j] < 0) weight[j] = 0;
}
/*printf("Recommendations: ");
for (int j = 0; j < 5; j++) {
printf("%f ", sumreco[j]);
}
printf("\n");*/
for (int j = 0; j < FEAT_NUM; j++) {
if (weight[j] > 0)
weight[j] *= (0.5 + (rand() % 100) / 100.0);
}
float sum = 0;
for (int j = 0; j < FEAT_NUM; j++) {
if (abs(weight[j]) > sum) {
sum += abs(weight[j]);
}
}
for (int j = 0; j < FEAT_NUM; j++) {
weight[j] = weight[j]/sum;
}
delete[] sumreco;
}
//no longer used
void alg_change_weight(float* featdist, float* weight, int* w0id, float* change, int changenum) {
//Changes weight, keeping sum_k featdist[k]*weight[k] constant, weights between 0 and 1
//change assumed to be legal, weights assumed to be legal. change aways positive
//change legal if w0 >= average.
//featdist[weightnum] can't be the largest!
float C1 = 0;
float C2 = 0;
for (int i = 0; i < changenum; i++) {
C1 += featdist[w0id[i]] * change[i];
C2 += change[i];
weight[w0id[i]] -= change[i];
}
int w1choices = 0;
for (int i = 0; i < FEAT_NUM; i++) {
if (featdist[i] > C1/C2 and !inarray(i, w0id, changenum)) {
w1choices += 1;
}
}
int w1rand = (rand() % w1choices) + 1;
int w1id = 0;
int count = 0;
float w1 = 0;
for (int i = 0; i < FEAT_NUM; i++) {
if (featdist[i] > C1/C2 and !inarray(i, w0id, changenum)) count += 1;
if (w1rand == count) {
w1 = featdist[i];
w1id = i;
break;
}
}
float othersum = 0;
int othernum = 0;
for (int i = 0; i < FEAT_NUM; i++) {
if (!inarray(i, w0id, changenum) and featdist[i] != 0) {
othersum += featdist[i];
othernum += 1;
}
}
othersum /= othernum;
//solution:
float x1 = (C1 - othersum * C2)/(w1-othersum);
weight[w1id] += x1;
//printf("weight %d changed: now %f, increase %f\n", w1id, weight[w1id], x1);
float sum = 0;
for (int i = 0; i < FEAT_NUM; i++) {
if (!inarray(i, w0id, changenum) and featdist[i] != 0) {
weight[i] += (C2 - x1)/othernum;
//sum += featdist[i] * (C2-x1)/(FEAT_NUM-2);
}
}
}
void accuracy(float** closedfeat, float* weight, float** openfeat, float & tp, float & tn) {
tp = 0;
tn = 0;
float** feat = new float*[SITE_NUM * TEST_NUM + OPENTEST_NUM];
for (int i = 0; i < SITE_NUM*TEST_NUM; i++) {
feat[i] = closedfeat[i];
}
for (int i = 0; i < OPENTEST_NUM; i++) {
feat[i + SITE_NUM * TEST_NUM] = openfeat[i];
}
float* distlist = new float[SITE_NUM * TEST_NUM + OPENTEST_NUM];
int* classlist = new int[SITE_NUM + 1];
float* opendistlist = new float[OPENTEST_NUM];
// is == instance (runs over all)
for (int is = 0; is < SITE_NUM*TEST_NUM + OPENTEST_NUM; is++) {
printf("\rComputing accuracy... %d (%d-%d)", is, 0, SITE_NUM*TEST_NUM + OPENTEST_NUM);
fflush(stdout);
for (int i = 0; i < SITE_NUM+1; i++) {
classlist[i] = 0;
}
int maxclass = 0;
// determine distance to each element
for (int at = 0; at < SITE_NUM * TEST_NUM + OPENTEST_NUM; at++) {
distlist[at] = dist(feat[is], feat[at], weight, POWER);
}
float max = *max_element(distlist, distlist+SITE_NUM*TEST_NUM+OPENTEST_NUM);
// distlist[is] stores max value
distlist[is] = max;
// just once with default NEIGHBOUR_NUM==1:
for (int i = 0; i < NEIGHBOUR_NUM; i++) {
int ind = find(distlist, distlist + SITE_NUM*TEST_NUM+OPENTEST_NUM, *min_element(distlist, distlist+SITE_NUM*TEST_NUM+OPENTEST_NUM)) - distlist;
int classind = 0;
if (ind < SITE_NUM * TEST_NUM) {
classind = ind/TEST_NUM;
}
else {
classind = SITE_NUM;
}
classlist[classind] += 1;
if (classlist[classind] > maxclass) {
maxclass = classlist[classind];
}
distlist[ind] = max;
}
int trueclass = is/TEST_NUM;
// open world: one class for background
if (trueclass > SITE_NUM) trueclass = SITE_NUM;
int countclass = 0;
int hascorrect = 0;
int hasconsensus = 0;
for (int i = 0; i < SITE_NUM+1; i++) {
if (classlist[i] == NEIGHBOUR_NUM) {
hasconsensus = 1;
}
}
// will (almost) never happen with NEIGHBOUR_NUM==1
if (hasconsensus == 0) {
for (int i = 0; i < SITE_NUM; i++) {
classlist[i] = 0;
}
classlist[SITE_NUM] = 1;
maxclass = 1;
}
for (int i = 0; i < SITE_NUM+1; i++) {
if (classlist[i] == maxclass) {
countclass += 1;
if (i == trueclass) {
hascorrect = 1;
}
}
}
float thisacc = 0;
if (hascorrect == 1) {
thisacc = 1.0/countclass;
}
if (trueclass == SITE_NUM) {
tn += thisacc;
}
else {
tp += thisacc;
}
}
printf("\n");
delete[] distlist;
delete[] classlist;
delete[] opendistlist;
delete[] feat;
tp /= SITE_NUM*TEST_NUM;
if (OPENTEST_NUM > 0) tn /= OPENTEST_NUM;
else tn = 1;
}
int main(int argc, char** argv) {
int OPENTEST_list [12] = {0, 10, 50, 100, 200, 300, 500, 1000, 1500, 2000, 3000, 5000};
int NEIGHBOUR_list [12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15};
if(argc == 3 || argc == 6){
int OPENTEST_ind = atoi(argv[1]);
int NEIGHBOUR_ind = atoi(argv[2]);
OPENTEST_NUM = OPENTEST_list[OPENTEST_ind % 12];
NEIGHBOUR_NUM = NEIGHBOUR_list[NEIGHBOUR_ind % 12];
}
printf("checkpoint 0\n");
if(argc == 6){
SITE_NUM = atoi(argv[3]);
INST_NUM = atoi(argv[4]);
TEST_NUM = atoi(argv[5]);
}
srand(time(NULL));
float** feat = new float*[SITE_NUM*INST_NUM];
float** testfeat = new float*[SITE_NUM*TEST_NUM];
float** opentestfeat = new float*[OPENTEST_NUM];
for (int i = 0; i < SITE_NUM*INST_NUM; i++) {
feat[i] = new float[FEAT_NUM];
}
for (int i = 0; i < SITE_NUM*TEST_NUM; i++) {
testfeat[i] = new float[FEAT_NUM];
}
for (int i = 0; i < OPENTEST_NUM; i++) {
opentestfeat[i] = new float[FEAT_NUM];
}
printf("checkpoint 1\n");
for (int cur_site = 0; cur_site < SITE_NUM; cur_site++) {
int real_inst = 0;
for (int cur_inst = 0; cur_inst < INST_NUM; cur_inst++) {
int gotfile = 0;
ifstream fread;
while (gotfile == 0) {
ostringstream freadnamestream;
freadnamestream << "batch/" << cur_site << "-" << real_inst << "f";
string freadname = freadnamestream.str();
fread.open(freadname.c_str());
if (fread.is_open()) gotfile = 1;
real_inst++;
}
string str = "";
getline(fread, str);
fread.close();
string tempstr = "";
int feat_count = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] == ' ') {
if (tempstr.c_str()[1] == 'X') {
feat[cur_site * INST_NUM + cur_inst][feat_count] = -1;
}
else {
feat[cur_site * INST_NUM + cur_inst][feat_count] = atof(tempstr.c_str());
}
feat_count += 1;
tempstr = "";
}
else {
tempstr += str[i];
}
}
}
// printf("checkpoint 1.10\n");
for (int cur_inst = 0; cur_inst < TEST_NUM; cur_inst++) {
//printf("."); fflush(stdout);
int gotfile = 0;
ifstream fread;
string freadname;
while (gotfile == 0) {
ostringstream freadnamestream;
freadnamestream << "batch/" << cur_site << "-" << real_inst << "f";
freadname = freadnamestream.str();
//printf("%s\n", freadname.c_str()); fflush(stdout);
fread.open(freadname.c_str());
if (fread.is_open()) gotfile = 1;
real_inst++;
}
string str = "";
getline(fread, str);
fread.close();
string tempstr = "";
int feat_count = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] == ' ') {
if (tempstr.c_str()[1] == 'X') {
testfeat[cur_site * TEST_NUM + cur_inst][feat_count] = -1;
}
else {
testfeat[cur_site * TEST_NUM + cur_inst][feat_count] = atof(tempstr.c_str());
}
feat_count += 1;
tempstr = "";
}
else {
tempstr += str[i];
}
}
}
}
printf("checkpoint 2\n");
for (int cur_site = 0; cur_site < OPENTEST_NUM; cur_site++) {
int gotfile = 0;
ifstream fread;
string freadname;
while (gotfile == 0) {
ostringstream freadnamestream;
freadnamestream << "batch/" << cur_site << "f";
freadname = freadnamestream.str();
fread.open(freadname.c_str());
if (fread.is_open()) gotfile = 1;
}
string str = "";
getline(fread, str);
fread.close();
string tempstr = "";
int feat_count = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] == ' ') {
if (tempstr.c_str()[1] == 'X') {
opentestfeat[cur_site][feat_count] = -1;
}
else {
opentestfeat[cur_site][feat_count] = atof(tempstr.c_str());
}
feat_count += 1;
tempstr = "";
}
else {
tempstr += str[i];
}
}
}
float * weight = new float[FEAT_NUM];
float * value = new float[FEAT_NUM];
int TRIAL_NUM = 20;
int SUBROUND_NUM = 5;
float maxacc = 0;
alg_init_weight(feat, weight);
float * prevweight = new float[FEAT_NUM];
for (int i = 0; i < FEAT_NUM; i++) {
prevweight[i] = weight[i];
}
clock_t t1, t2;
alg_init_weight(feat, weight);
for (int trial = 0; trial < TRIAL_NUM; trial++) {
for (int subround = 0; subround < SUBROUND_NUM; subround++) {
int start = (SITE_NUM * INST_NUM)/SUBROUND_NUM * subround;
int end = (SITE_NUM * INST_NUM)/SUBROUND_NUM * (subround+1);
alg_recommend2(feat, weight, start, end);
float tp, tn;
// t1 = clock();
accuracy(testfeat, weight, opentestfeat, tp, tn);
// t2 = clock();
// printf("Time taken: %f\n", (float)(t2-t1)/(CLOCKS_PER_SEC));
if (tp > maxacc) maxacc = tp;
printf("Round %d-%d, accuracy: %f %f, best accuracy: %f\n", trial,subround,tp, tn, maxacc);
}
}
FILE * weightfile;
weightfile = fopen("weights", "w");
for (int i = 0; i < FEAT_NUM; i++) {
fprintf(weightfile, "%f ", weight[i] * 1000);
}
fclose(weightfile);
for (int i = 0; i < SITE_NUM * INST_NUM; i++) {
delete[] feat[i];
}
delete[] feat;
for (int i = 0; i < SITE_NUM * TEST_NUM; i++) {
delete[] testfeat[i];
}
delete[] testfeat;
for (int i = 0; i < OPENTEST_NUM; i++) {
delete[] opentestfeat[i];
}
delete[] opentestfeat;
delete[] prevweight;
delete[] weight;
delete[] value;
return 0;
}
| [
"[email protected]"
] | |
b705559b116edf8e202c08b561e2eedecaa081f8 | 4b535e8bdd9ff02162fea9ed2d3670cabe5eca86 | /Assignment 4 - Strategies for Game of Life/Life/LifeCustom.h | ba97bfda388178a85561d221a87118b8175f5017 | [] | no_license | ManOfCheese/OBOPASamWalet | 0c999fb521f6b4def1c7271795056e443608ad4e | 027e164b50fa4335159f7d50b5da4f06d40785b5 | refs/heads/master | 2022-05-03T14:08:29.805101 | 2022-03-16T14:47:31 | 2022-03-16T14:47:31 | 157,717,496 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 108 | h | #pragma once
#include "Life.h"
class LifeCustom : public Life {
public:
LifeCustom();
~LifeCustom();
};
| [
"[email protected]"
] | |
2eea0c50217ebc080ff81660b88f093d95bd72c9 | a999be76131f179e5a5a92e1529eefa626394594 | /Multi Level Inheritance.cpp | be654f8dbf16f6b0a9273b140abdc65e41178905 | [] | no_license | singh2010nidhi/Hackerrank-CPP | 6d31b5b53813196327a0c37f9511a220ef93ca91 | ed976fb3cdf0bd5c1a73fbdda391933032e99678 | refs/heads/master | 2022-11-18T02:07:55.088184 | 2020-06-22T07:55:22 | 2020-06-22T07:55:22 | 263,432,939 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 586 | cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
class Triangle{
public:
void triangle(){
cout<<"I am a triangle\n";
}
};
class Isosceles : public Triangle{
public:
void isosceles(){
cout<<"I am an isosceles triangle\n";
}
};
class Equilateral : public Isosceles{
public:
void equilateral()
{
cout<<"I am an equilateral triangle"<<endl;
}
};
int main(){
Equilateral eqr;
eqr.equilateral();
eqr.isosceles();
eqr.triangle();
return 0;
}
| [
"[email protected]"
] | |
549e3e0f9748ae5383545b6e691f4367512c7a4b | cb474159a32d47b58f01310e14c02dacc657cf3c | /project1/GroundTest/framework/frameworkinterfaceimplement.h | da423d25368f161b97ba80cb2dff64eb898785f5 | [] | no_license | ShmilyBluesky/ProjectFramework | 1d2d8a8c02c09034631cfc506927b35c933848d6 | 30e78c6be184f7a3a2d67c1c896ef32c54301905 | refs/heads/master | 2020-06-20T14:33:22.269538 | 2019-07-16T08:26:43 | 2019-07-16T08:26:43 | 197,152,141 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,121 | h | #ifndef FRAMEWORKINTERFACEIMPLEMENT_H
#define FRAMEWORKINTERFACEIMPLEMENT_H
#include <QObject>
#include "frameworkinterface.h"
class PluginsManager;
class FrameworkInterfaceImplement : public FrameworkInterface
{
public:
explicit FrameworkInterfaceImplement(PluginsManager *pluginManager);
~FrameworkInterfaceImplement();
// inherite from FrameworkInterface
virtual ProcessResult process(PluginID id, int iCmd,
const QVariant& arg1 = QVariant(),
const QVariant& arg2 = QVariant(),
const QVariant& arg3 = QVariant(),
const QVariant& arg4 = QVariant(),
const QVariant& arg5 = QVariant(),
const QVariant& arg6 = QVariant()); // 处理接口
virtual QVariant get(PluginID id, int iCmd,
const QVariant& arg = QVariant()); // 获取数据
signals:
public slots:
private:
PluginsManager *m_pluginManager; // 插件管理器
};
#endif // FRAMEWORKINTERFACEIMPLEMENT_H
| [
"[email protected]"
] | |
005d15ffec6540aefdc9c64c93bde5e4848042b9 | be3167504c0e32d7708e7d13725c2dbc9232f2cb | /mameppk/src/mame/includes/segas16a.h | f3d44fed851299b8c82f9ee1f166228f85e539c0 | [] | no_license | sysfce2/MAME-Plus-Plus-Kaillera | 83b52085dda65045d9f5e8a0b6f3977d75179e78 | 9692743849af5a808e217470abc46e813c9068a5 | refs/heads/master | 2023-08-10T06:12:47.451039 | 2016-08-01T09:44:21 | 2016-08-01T09:44:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,896 | h | // license:BSD-3-Clause
// copyright-holders:Aaron Giles
/***************************************************************************
Sega pre-System 16 & System 16A hardware
***************************************************************************/
#include "cpu/m68000/m68000.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/mcs51/mcs51.h"
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "machine/i8243.h"
#include "machine/nvram.h"
#include "machine/segaic16.h"
#include "sound/2151intf.h"
#include "video/segaic16.h"
#include "video/sega16sp.h"
// ======================> segas16a_state
class segas16a_state : public sega_16bit_common_base
{
public:
// construction/destruction
segas16a_state(const machine_config &mconfig, device_type type, const char *tag)
: sega_16bit_common_base(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_mcu(*this, "mcu"),
m_i8255(*this, "i8255"),
m_ymsnd(*this, "ymsnd"),
m_n7751(*this, "n7751"),
m_n7751_i8243(*this, "n7751_8243"),
m_nvram(*this, "nvram"),
m_segaic16vid(*this, "segaic16vid"),
m_sprites(*this, "sprites"),
m_workram(*this, "nvram"),
m_sound_decrypted_opcodes(*this, "sound_decrypted_opcodes"),
m_video_control(0),
m_mcu_control(0),
m_n7751_command(0),
m_n7751_rom_address(0),
m_last_buttons1(0),
m_last_buttons2(0),
m_read_port(0),
m_mj_input_num(0)
{ }
// PPI read/write callbacks
DECLARE_WRITE8_MEMBER( misc_control_w );
DECLARE_WRITE8_MEMBER( tilemap_sound_w );
// main CPU read/write handlers
DECLARE_READ16_MEMBER( standard_io_r );
DECLARE_WRITE16_MEMBER( standard_io_w );
DECLARE_READ16_MEMBER( misc_io_r );
DECLARE_WRITE16_MEMBER( misc_io_w );
// Z80 sound CPU read/write handlers
DECLARE_READ8_MEMBER( sound_data_r );
DECLARE_WRITE8_MEMBER( n7751_command_w );
DECLARE_WRITE8_MEMBER( n7751_control_w );
DECLARE_WRITE8_MEMBER( n7751_rom_offset_w );
// N7751 sound generator CPU read/write handlers
DECLARE_READ8_MEMBER( n7751_rom_r );
DECLARE_READ8_MEMBER( n7751_p2_r );
DECLARE_WRITE8_MEMBER( n7751_p2_w );
DECLARE_READ8_MEMBER( n7751_t1_r );
// I8751 MCU read/write handlers
DECLARE_WRITE8_MEMBER( mcu_control_w );
DECLARE_WRITE8_MEMBER( mcu_io_w );
DECLARE_READ8_MEMBER( mcu_io_r );
// I8751-related VBLANK interrupt handlers
INTERRUPT_GEN_MEMBER( mcu_irq_assert );
INTERRUPT_GEN_MEMBER( i8751_main_cpu_vblank );
// game-specific driver init
DECLARE_DRIVER_INIT(generic);
DECLARE_DRIVER_INIT(dumpmtmt);
DECLARE_DRIVER_INIT(quartet);
DECLARE_DRIVER_INIT(fantzonep);
DECLARE_DRIVER_INIT(sjryukoa);
DECLARE_DRIVER_INIT(aceattaca);
DECLARE_DRIVER_INIT(passsht16a);
DECLARE_DRIVER_INIT(mjleague);
DECLARE_DRIVER_INIT(sdi);
// video updates
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
// internal types
typedef delegate<void ()> i8751_sim_delegate;
typedef delegate<void (UINT8, UINT8)> lamp_changed_delegate;
// timer IDs
enum
{
TID_INIT_I8751,
TID_PPI_WRITE
};
// driver overrides
virtual void video_start();
virtual void machine_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
// I8751 simulations
void dumpmtmt_i8751_sim();
void quartet_i8751_sim();
// custom I/O handlers
DECLARE_READ16_MEMBER( aceattaca_custom_io_r );
DECLARE_READ16_MEMBER( mjleague_custom_io_r );
DECLARE_READ16_MEMBER( passsht16a_custom_io_r );
DECLARE_READ16_MEMBER( sdi_custom_io_r );
DECLARE_READ16_MEMBER( sjryuko_custom_io_r );
void sjryuko_lamp_changed_w(UINT8 changed, UINT8 newval);
// devices
required_device<m68000_device> m_maincpu;
required_device<z80_device> m_soundcpu;
optional_device<i8751_device> m_mcu;
required_device<i8255_device> m_i8255;
required_device<ym2151_device> m_ymsnd;
optional_device<n7751_device> m_n7751;
optional_device<i8243_device> m_n7751_i8243;
required_device<nvram_device> m_nvram;
required_device<segaic16_video_device> m_segaic16vid;
required_device<sega_sys16a_sprite_device> m_sprites;
// memory pointers
required_shared_ptr<UINT16> m_workram;
optional_shared_ptr<UINT8> m_sound_decrypted_opcodes;
// configuration
read16_delegate m_custom_io_r;
write16_delegate m_custom_io_w;
i8751_sim_delegate m_i8751_vblank_hook;
lamp_changed_delegate m_lamp_changed_w;
// internal state
UINT8 m_video_control;
UINT8 m_mcu_control;
UINT8 m_n7751_command;
UINT32 m_n7751_rom_address;
UINT8 m_last_buttons1;
UINT8 m_last_buttons2;
UINT8 m_read_port;
UINT8 m_mj_input_num;
};
| [
"mameppk@199a702f-54f1-4ac0-8451-560dfe28270b"
] | mameppk@199a702f-54f1-4ac0-8451-560dfe28270b |
c8d62c88a463bc042071917460f5c1c70832a2f1 | 75951ae26cab69d1c8796d205144d74fb61ebef7 | /ValkyrGameEngine/Common/objloader.hpp | f89b2842676fa9df18b8778409aad548a8c36f42 | [] | no_license | MatthewBoatright/ValkyrGameEngine | 4a203b5f12d7a20e0e2f49c5e95675772065dc95 | cc3e7c94392d7ace51edd0114f0643071562ca94 | refs/heads/master | 2021-01-10T17:01:33.267588 | 2016-03-05T03:33:23 | 2016-03-05T03:33:23 | 52,566,849 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 199 | hpp | #ifndef OBJLOADER_H
#define OBJLOADER_H
bool loadOBJ
(
const char * path,
std::vector<glm::vec3> & out_vertices,
std::vector<glm::vec2> & out_uvs,
std::vector<glm::vec3> & out_normals
);
#endif | [
"[email protected]"
] | |
bfceb1d33276643968cb6cacc1b99c78ca897c2e | 45f4bde7c580a04b462986937f340e267d5d5bb5 | /Programacion 1/Practicas/practica1/circulo.cpp | b9a73cf0cca828e0a2274ab11a7ac6d64faae32b | [] | no_license | cosimico/UZA | 41ac16b531dfda42acf7e132e9a03b85b5534426 | 0bdf9db7a52f81d984006af771cd454b62ece85b | refs/heads/master | 2021-06-09T13:05:03.810720 | 2016-11-18T18:56:40 | 2016-11-18T18:56:40 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 878 | cpp | #include <iostream>
#include <iomanip>
using namespace std;
/*
* Pre: r>=0.0
* Post: Escribe por pantalla en una línea el valor del radio y del área de un
* círculo de radio [r]
*/
void circulo (double r) {
const double PI = 3.1416;
cout << "El area de un circulo de radio " << fixed << setprecision(2) << r
<< " es igual a " << PI*r*r << endl;
}
/*
* Pre: ---
* Post: Pregunta al operador por el [Radio del circulo: ] y le informa en la
* línea siguiente del valor del radio y del área del círculo
*/
int main() {
/*
* Pregunta al operador y almacena su respuesta en r
*/
double r;
cout << "Radio del circulo: " << flush;
cin >> r;
/*
* Presenta por pantalla los datos del círculo de radio r
*/
circulo(r);
/*
* Concluye normalmente y devuelve un 0
*/
return 0;
} | [
"[email protected]"
] | |
bb3be31616ab2c49ea9fcec81eae3f4d334ff908 | 135f16f65206fda37479599a8fbb48e05534c17b | /Brbanje/src/Platform/OpenGl/OpenGlTexture.h | c946887d9b0dc9128939954174d9ccfd76791ecd | [] | no_license | Rustifan/Brbanje | a2951569b6ca9e67cf6916dd54c5dc4ec76d5f7f | f97713872cee4302e58a131d0c9e7f9532206e98 | refs/heads/main | 2023-05-26T10:42:36.743265 | 2021-06-10T17:58:55 | 2021-06-10T17:58:55 | 309,349,375 | 0 | 0 | null | 2020-11-03T12:17:52 | 2020-11-02T11:27:22 | C++ | UTF-8 | C++ | false | false | 956 | h | #pragma once
#include <string>
#include "Brbanje/Renderer/Texture.h"
#include "glad/glad.h"
namespace Brbanje
{
class OpenGlTexture2D : public Texture2D
{
private:
std::string m_FilePath;
uint32_t m_Width, m_Height;
uint32_t m_RendererID;
GLenum m_InternalFormat, m_DataFormat;
public:
OpenGlTexture2D(const std::string& fileName);
OpenGlTexture2D(uint32_t width, uint32_t height);
virtual ~OpenGlTexture2D();
virtual uint32_t GetWidth() const override { return m_Width; }
virtual uint32_t GetHeight()const override { return m_Height; }
virtual uint32_t GetRendererID()const override { return m_RendererID; }
virtual void Bind(uint32_t slot = 0) const override;
virtual void SetData(void* data, uint32_t size) const override;
virtual const std::string& GetFilePath()const override { return m_FilePath; }
virtual bool operator==(const Texture& other)override { return m_RendererID == other.GetRendererID(); }
};
} | [
"[email protected]"
] | |
10158485f3b369bd00bb405f6dce2560cc9d204a | 4fc0aee6a4ff7c83347935760b9b906dc8679666 | /GuiRasp/memory.cpp | eb26be20a73df70a5cd5984337c9cc88fab1bb86 | [] | no_license | cala21/CSCI-3308 | 0d91dfe6b4424c11581c5f5c6c74a02b020c0b57 | 2a9a89c796446dbefc05e1a40267dad35bad5091 | refs/heads/master | 2021-01-25T12:21:16.473871 | 2015-04-28T06:14:13 | 2015-04-28T06:14:13 | 29,986,966 | 0 | 2 | null | 2018-02-01T02:03:55 | 2015-01-28T20:33:09 | HTML | UTF-8 | C++ | false | false | 2,567 | cpp | #include "memory.h"
#include "ui_memory.h"
#include <boost/any.hpp>
#include <qcombobox.h>
#include <boost/filesystem.hpp>
#include <boost/operators.hpp>
#include <iostream>
using namespace boost::filesystem;
using namespace std;
/**
* @brief Memory::Memory
* @param parent
*/
QString *comboHelper(string myPath)
{
path volumePath (myPath);
space_info volumeSpace = space(volumePath);
quint64 FreeStorage = volumeSpace.available;
quint64 TotalStorage = volumeSpace.capacity;
QString *storage = new QString[2];
storage[0] = QString::number(FreeStorage/ 1073741824) + " GiB";
storage[1] = QString::number(TotalStorage / 1073741824) + " GiB";
return storage;
}
Memory::Memory(QWidget *parent) :
QDialog(parent),
ui(new Ui::Memory)
{
ui->setupUi(this);
connect(ui->BackMem,SIGNAL(clicked()),this->parent(),SLOT(show()));
connect(ui->BackMem,SIGNAL(clicked()),this,SLOT(hide()));
ui->volumeComboBox->addItem("home");
ui->volumeComboBox->addItem("RAID");
ui->BackMem->setStyleSheet("QPushButton{background: transparent;}");
ui->refreshButton->setStyleSheet("QPushButton{background: white;}");
connect(ui->volumeComboBox,SIGNAL(currentIndexChanged(QString)),this ,SLOT(update()));
connect(ui->refreshButton, SIGNAL(clicked()), this,SLOT(refresh()));
centerWindow();
refresh();
update();
}
Memory::~Memory()
{
delete ui;
}
void Memory::centerWindow()
{
QRect screenGeometry = QApplication::desktop()->screenGeometry();
int x = (screenGeometry.width()-320) / 2;
int y = (screenGeometry.height()-240) / 2;
this->move(x, y);
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
this->show();
}
void Memory::refresh()
{
ui->volumeComboBox->setCurrentIndex(0);
ui->rootPathLabel->setText("/home");
ui->bytesAvailableLabel->setText(comboHelper("/home")[0]);
ui->totalStorageLabel->setText(comboHelper("/home")[1]);
}
void Memory::update()
{
ui->deviceLabel->setText(ui->volumeComboBox->currentText());
if (ui->volumeComboBox->currentText() == "home")
{
ui->rootPathLabel->setText("/home");
ui->bytesAvailableLabel->setText(comboHelper("/home")[0]);
ui->totalStorageLabel->setText(comboHelper("/home")[1]);
}
if (ui->volumeComboBox->currentText() == "RAID")
{
ui->rootPathLabel->setText("/var/www/RAID");
ui->bytesAvailableLabel->setText(comboHelper("/var/www/RAID")[0]);
ui->totalStorageLabel->setText(comboHelper("/var/www/RAID")[1]);
}
}
| [
"[email protected]"
] | |
31e4f351a71a07a4663e74b5e67be6dd89228e19 | 112df47d8c113ff2da58e0c0c6a8ee4f0761fbc7 | /ZJ/Competition topic/b899/main.cpp | af5451f3cadcaf5c6fcc1b0b5853836c3cf90f6d | [] | no_license | OEmiliatanO/Competitive-code-record | 8287f140f56848bc238265e64cbe8b75faa1cba6 | 5b2ea33ab9ca82e3d0003a8716779c6297fa6888 | refs/heads/main | 2023-03-28T09:42:52.029814 | 2021-03-19T16:36:13 | 2021-03-19T16:36:13 | 349,481,199 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 456 | cpp | #include <cstdio>
using namespace std;
int x1,y1,x2,y2,x3,y3;
int a,b,c;
int main()
{
scanf("%d %d",&x1,&y1);
scanf("%d %d",&x2,&y2);
scanf("%d %d",&x3,&y3);
a=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
b=(x2-x3)*(x2-x3)+(y2-y3)*(y2-y3);
c=(x1-x3)*(x1-x3)+(y1-y3)*(y1-y3);
if(a>b&&a>c) printf("%d %d",x1+x2-x3,y1+y2-y3);
else if(b>c&&b>a) printf("%d %d",x2+x3-x1,y2+y3-y1);
else printf("%d %d",x1+x3-x2,y1+y3-y2);
return 0;
}
| [
"[email protected]"
] | |
fb67294a26164c907812da89a4853e24417fed0f | 36189ce91af736e76eb1af16b628166b83141df8 | /Tutorials/SRFQHDFoam/2D/rotor2D/0/Urel | 0224e7611fb8ae2050793cd8a5e439b3d8d0cf55 | [] | no_license | OneMoreProblem/QGDsolver | 6326cee56dd29cdacf756a34bd95fcc2a0f9af8a | 82a4d0dbcacb3be7add52e701463cdaafe24a941 | refs/heads/Dev-Optimization | 2021-06-04T12:29:51.874974 | 2020-06-23T07:49:58 | 2020-06-23T07:49:58 | 104,739,520 | 0 | 0 | null | 2017-09-25T11:05:06 | 2017-09-25T11:05:06 | null | UTF-8 | C++ | false | false | 1,400 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object Urel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
rotor
{
type noSlip;
}
freestream
{
//type SRFFreestreamVelocity;
//UInf (1 0 0);
//type fixedValue;
//value uniform (1 0 0);
type SRFVelocity;
relative false;
inletValue (1 0 0);
value uniform (0 0 0);
}
front
{
type empty;
}
back
{
type empty;
}
}
// ************************************************************************* //
| [
"[email protected]"
] | ||
28545e48a5ea1d52a77aa16180fd94c5c19bc579 | 964170ed8f181ef172656cae59bcb6058830cbac | /Include/BlackWolf.Lupus.Core/IPAddress.h | 3197da0f67456a1dd7632314dd7193ac10bd681b | [
"MIT"
] | permissive | Qazwar/lupus-core | 90d189fae2ba6dd24a9c67a1612aed5b8c390390 | ea5196b1b8663999f0a6fcfb5ee3dc5c01d48f32 | refs/heads/master | 2021-05-29T09:34:51.090803 | 2014-11-14T14:47:42 | 2014-11-14T14:47:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,492 | h | /**
* Copyright (C) 2014 David Wolf <[email protected]>
*
* This file is part of Lupus.
* Lupus 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.
*
* Lupus 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 Lupus. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "SocketEnum.h"
#include <vector>
#include <memory>
#include <cstdint>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
namespace Lupus {
namespace Net {
namespace Sockets {
class IPEndPoint;
//! Repräsentiert einen IP-Adresse
class LUPUSCORE_API IPAddress : public NonCopyable
{
public:
/*!
* Erstellt eine neue IP-Adresse anhand der übergenenen IPv4 Adresse.
* Das Format der Ganzzahl ist 0xSSTTUUVV -\> sss.ttt.uuu.vvv und sie
* wird in das entsrechende Netzwerkformat konvertiert.
*
* \param[in] ipv4 Ganzzahl die eine IPv4 Adresse beinhaltet.
*/
explicit IPAddress(uint32_t ipv4) NOEXCEPT;
/*!
* Dieser Konstruktor ruft IPAddress(address, 0) auf.
*
* \sa IPAddress::IPAddress(const std::vector<uint8_t>&, U64)
*
* \param[in] ipv6 Die IPv6 Adresse in Netzwerkformat.
*/
IPAddress(const std::vector<uint8_t>& ipv6) throw(std::length_error);
/*!
* Erstellt eine IP-Adresse anhand eines uint8_t-Buffers. Der uint8_t-Buffer
* muss exakt 16-uint8_t bzw 128-Bit umfassen. Falls der uint8_t-Buffer
* größer ist, dann werden die restlichen uint8_ts nach dem 16ten
* ignoriert.
*
* Die Adresse muss sich Big-Endian sein.
*
* \param[in] ipv6 Die IPv6 Adresse in Netzwerkformat.
* \param[in] scopeid Der Scope Identifier der IPv6 Adresse.
*/
IPAddress(const std::vector<uint8_t>& ipv6, uint32_t scopeid) throw(std::length_error);
/*!
* \sa IPAddress::IPAddress(const std::vector<uint8_t>&, size_t)
*/
IPAddress(std::initializer_list<uint8_t> ilist) throw(std::length_error);
virtual ~IPAddress() = default;
/*!
* Serialisiert die Adresse zu einem uint8_t-Buffer.
*
* \returns uint8_t-Buffer der serialisierten Adresse.
*/
virtual std::vector<uint8_t> Bytes() const NOEXCEPT;
/*!
* \returns Die Adressfamilie der IP-Adresse.
*/
virtual AddressFamily Family() const NOEXCEPT;
/*!
* \warning Methode ist noch nicht implementiert.
*/
virtual bool IsIPv6LinkLocal() const NOEXCEPT;
/*!
* \warning Methode ist noch nicht implementiert.
*/
virtual bool IsIPv6Multicast() const NOEXCEPT;
/*!
* \warning Methode ist noch nicht implementiert.
*/
virtual bool IsIPv6SiteLocal() const NOEXCEPT;
/*!
* \returns Den Scope Identifier der IPv6 Adresse.
*/
virtual uint32_t ScopeId() const throw(socket_error);
/*!
* Setzt den Scope Identifier der IPv6 Adresse.
*
* \param[in] value Der neue Wert des Scope Identifiers.
*/
virtual void ScopeId(uint32_t value) throw(socket_error);
/*!
* \returns Das Präsentationsformat der IP-Adresse.
*/
virtual String ToString() const;
/*!
* \returns TRUE wenn die IP-Adresse eine Loopback Adresse ist.
*/
static bool IsLoopback(std::shared_ptr<IPAddress> address) NOEXCEPT;
/*!
* Erstellt eine IP-Adresse anhand des gegebenen Präsentationsformat.
* IPv4 muss in dezimal und IPv6 in hexadezimal dargestellt werden.
*
* Bsp IPv4: 127.0.0.1
* Bsp IPv6: 0:0:0:0:0:0:0:1
*
* \param[in] ipString Das Präsentationsformat der IP-Adresse.
*/
static std::shared_ptr<IPAddress> Parse(const String& ipString) throw(std::invalid_argument);
/*!
* Ähnlich wie \sa IPAddress::Parse konvertiert diese Methode eine
* IP-Zeichenkette. Jedoch ist diese Methode Exception-Safe. Falls die
* Konvertierung dennoch fehlschlägt dann wird FALSE retouniert. Das
* Ergebniss wird in den Adresszeiger gespeichert.
*
* \param[in] ipString Das Präsentationsformat der IP-Adresse.
* \param[out] address Zeiger in dem das Ergebnis gespeichert
* wird.
*
* \returns TRUE wenn erfolgreich konvertiert wurde, bei einem Fehler
* FALSE.
*/
static bool TryParse(const String& ipString, std::shared_ptr<IPAddress>& address) NOEXCEPT;
static std::shared_ptr<IPAddress> Any();
static std::shared_ptr<IPAddress> Broadcast();
static std::shared_ptr<IPAddress> IPv6Any();
static std::shared_ptr<IPAddress> IPv6Loopback();
static std::shared_ptr<IPAddress> IPv6None();
static std::shared_ptr<IPAddress> Loopback();
static std::shared_ptr<IPAddress> None();
protected:
private:
static const std::shared_ptr<IPAddress> sAny; //!< Entspricht 0.0.0.0
static const std::shared_ptr<IPAddress> sBroadcast; //!< Entspricht 255.255.255.255
static const std::shared_ptr<IPAddress> sIPv6Any; //!< Entspricht 0:0:0:0:0:0:0:0
static const std::shared_ptr<IPAddress> sIPv6Loopback; //!< Entspricht ::1
static const std::shared_ptr<IPAddress> sIPv6None; //!< Entspricht 0:0:0:0:0:0:0:0
static const std::shared_ptr<IPAddress> sLoopback; //!< Entspricht 127.0.0.1
static const std::shared_ptr<IPAddress> sNone; //!< Entspricht 0.0.0.0
//! Standardkonstruktor ist nicht erlaubt.
IPAddress() = delete;
AddressFamily mFamily;
std::vector<uint8_t> mAddress;
uint32_t mScopeId = 0;
};
}
}
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
| [
"[email protected]"
] | |
c16e5f92c9f019d3f460dc561e256a468f2e4083 | 21553f6afd6b81ae8403549467230cdc378f32c9 | /arm/cortex/Freescale/MK22F25612/include/arch/reg/pmc.hpp | 8dc291edbfda994df9963a9eab1d1b892af3f250 | [] | no_license | digint/openmptl-reg-arm-cortex | 3246b68dcb60d4f7c95a46423563cab68cb02b5e | 88e105766edc9299348ccc8d2ff7a9c34cddacd3 | refs/heads/master | 2021-07-18T19:56:42.569685 | 2017-10-26T11:11:35 | 2017-10-26T11:11:35 | 108,407,162 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,204 | hpp | /*
* OpenMPTL - C++ Microprocessor Template Library
*
* This program is a derivative representation of a CMSIS System View
* Description (SVD) file, and is subject to the corresponding license
* (see "Freescale CMSIS-SVD License Agreement.pdf" in the parent directory).
*
* 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.
*/
////////////////////////////////////////////////////////////////////////
//
// Import from CMSIS-SVD: "Freescale/MK22F25612.svd"
//
// vendor: Freescale Semiconductor, Inc.
// vendorID: Freescale
// name: MK22F25612
// series: Kinetis_K
// version: 1.6
// description: MK22F25612 Freescale Microcontroller
// --------------------------------------------------------------------
//
// C++ Header file, containing architecture specific register
// declarations for use in OpenMPTL. It has been converted directly
// from a CMSIS-SVD file.
//
// https://digint.ch/openmptl
// https://github.com/posborne/cmsis-svd
//
#ifndef ARCH_REG_PMC_HPP_INCLUDED
#define ARCH_REG_PMC_HPP_INCLUDED
#warning "using untested register declarations"
#include <register.hpp>
namespace mptl {
/**
* Power Management Controller
*/
struct PMC
{
static constexpr reg_addr_t base_addr = 0x4007d000;
/**
* Low Voltage Detect Status And Control 1 register
*/
struct LVDSC1
: public reg< uint8_t, base_addr + 0, rw, 0x10 >
{
using type = reg< uint8_t, base_addr + 0, rw, 0x10 >;
using LVDV = regbits< type, 0, 2 >; /**< Low-Voltage Detect Voltage Select */
using LVDRE = regbits< type, 4, 1 >; /**< Low-Voltage Detect Reset Enable */
using LVDIE = regbits< type, 5, 1 >; /**< Low-Voltage Detect Interrupt Enable */
using LVDACK = regbits< type, 6, 1 >; /**< Low-Voltage Detect Acknowledge */
using LVDF = regbits< type, 7, 1 >; /**< Low-Voltage Detect Flag */
};
/**
* Low Voltage Detect Status And Control 2 register
*/
struct LVDSC2
: public reg< uint8_t, base_addr + 0x1, rw, 0 >
{
using type = reg< uint8_t, base_addr + 0x1, rw, 0 >;
using LVWV = regbits< type, 0, 2 >; /**< Low-Voltage Warning Voltage Select */
using LVWIE = regbits< type, 5, 1 >; /**< Low-Voltage Warning Interrupt Enable */
using LVWACK = regbits< type, 6, 1 >; /**< Low-Voltage Warning Acknowledge */
using LVWF = regbits< type, 7, 1 >; /**< Low-Voltage Warning Flag */
};
/**
* Regulator Status And Control register
*/
struct REGSC
: public reg< uint8_t, base_addr + 0x2, rw, 0x4 >
{
using type = reg< uint8_t, base_addr + 0x2, rw, 0x4 >;
using BGBE = regbits< type, 0, 1 >; /**< Bandgap Buffer Enable */
using REGONS = regbits< type, 2, 1 >; /**< Regulator In Run Regulation Status */
using ACKISO = regbits< type, 3, 1 >; /**< Acknowledge Isolation */
using BGEN = regbits< type, 4, 1 >; /**< Bandgap Enable In VLPx Operation */
};
};
} // namespace mptl
#endif // ARCH_REG_PMC_HPP_INCLUDED
| [
"[email protected]"
] | |
f4f1ef989339ade2600d2b51886f1451ff08a29a | 0e22f855599936608f76bd26665b8b52544c971e | /CloneLL.cpp | 63034c1a15e3a0744b74a3b4d7d09503ca8aeed1 | [] | no_license | jeevankhetwani/Coding-Practice | f443c40ae9e22fde0f2d755eb8ac0b4f02d3d57d | c3c3e868496012699e65c2ad731d40b7a2b7be40 | refs/heads/master | 2021-01-01T19:41:30.096084 | 2017-07-28T13:32:32 | 2017-07-28T13:32:32 | 98,651,988 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,224 | cpp | ////
//// Created by jeevan on 4/12/17.
////
//#include <iostream>
//using namespace std;
//
//class Node {
//public:
// int data;
// Node *next, *rand;
//
// Node(int d) : data(d), next(nullptr), rand(nullptr) {}
//};
//
//void cloneNode(Node *head) {
//
// Node *curr = head;
//
// while(curr) {
// Node *tmp = curr->next;
//
// Node *node = new Node(curr->data);
// node->next = tmp;
// curr->next = node;
//
// curr = tmp;
// }
//
//// copy rand links, cannot copy before since clone node is not created
// curr = head;
// while(curr) {
// curr->next->rand = curr->rand->next;
// curr = curr->next->next;
// }
//}
//
//Node* split(Node *head) {
//
// Node *curr1 = head, *head2 = head->next, *curr2 = head2;
//
//
// while(curr2->next) {
// curr1->next = curr1->next->next;
// curr2->next = curr2->next->next;
// curr1 = curr1->next;
// curr2 = curr2->next;
// }
//
// curr1->next = nullptr;
//
// return head2;
//}
//
//Node* cloneList(Node *head) {
//
// cloneNode(head);
// return split(head);
//
//}
//
//void print(Node *head) {
//
// while(head) {
// cout << "Data = " << head->data << ", Random = "
// << head->rand->data << endl;
// head = head->next;
// }
//
// cout << endl;
//}
//
//int main() {
//
// Node* start = new Node(1);
// start->next = new Node(2);
// start->next->next = new Node(3);
// start->next->next->next = new Node(4);
// start->next->next->next->next = new Node(5);
//
// // 1's random points to 3
// start->rand = start->next->next;
//
// // 2's random points to 1
// start->next->rand = start;
//
// // 3's and 4's random points to 5
// start->next->next->rand =
// start->next->next->next->next;
// start->next->next->next->rand =
// start->next->next->next->next;
//
// // 5's random points to 2
// start->next->next->next->next->rand =
// start->next;
//
// cout << "Original list : \n";
// print(start);
//
// cout << "\nCloned list : \n";
// Node *cloned_list = cloneList(start);
// print(cloned_list);
//
//
// return 0;
//}
| [
"[email protected]"
] | |
ecc402b3461770db64b0f643f2b8f422cbc11d03 | d0c6bd8b149b2cd012d3b7e046010916dd978af6 | /ZSC/config/Category/NeutralCookedMeats.hpp | bd3a83c8cfa22e3f9197b81d7657ebaadc1dfe28 | [] | no_license | hunk4423/DayZ_Epoch_13.Taviana | a6faad63d728d105678a70fb82c41a3a794c664e | 2250b7f4d47c4c76b170e3001794e9745af3340a | refs/heads/master | 2021-01-12T21:53:02.792823 | 2015-11-08T00:51:25 | 2015-11-08T00:51:25 | 45,762,241 | 0 | 1 | null | 2015-11-08T01:27:56 | 2015-11-08T01:27:55 | null | UTF-8 | C++ | false | false | 2,354 | hpp | class Category_686 {
class FoodbaconCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodbeefCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodchickenCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodmuttonCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodrabbitCooked { type = "trade_items"; buy[] ={600,"Coins"}; sell[] ={300,"Coins"};};
class ItemTroutCooked { type = "trade_items"; buy[] ={1000,"Coins"}; sell[] ={500,"Coins"};};
class ItemSeaBassCooked { type = "trade_items"; buy[] ={2000,"Coins"}; sell[] ={1000,"Coins"};};
class ItemTunaCooked { type = "trade_items"; buy[] ={3000,"Coins"}; sell[] ={1500,"Coins"};};
};
class Category_580 {
class FoodbaconCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodbeefCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodchickenCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodmuttonCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodrabbitCooked { type = "trade_items"; buy[] ={600,"Coins"}; sell[] ={300,"Coins"};};
class ItemTroutCooked { type = "trade_items"; buy[] ={1000,"Coins"}; sell[] ={500,"Coins"};};
class ItemSeaBassCooked { type = "trade_items"; buy[] ={2000,"Coins"}; sell[] ={1000,"Coins"};};
class ItemTunaCooked { type = "trade_items"; buy[] ={3000,"Coins"}; sell[] ={1500,"Coins"};};
};
class Category_634 {
class FoodbaconCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodbeefCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodchickenCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodmuttonCooked { type = "trade_items"; buy[] ={120,"Coins"}; sell[] ={60,"Coins"};};
class FoodrabbitCooked { type = "trade_items"; buy[] ={600,"Coins"}; sell[] ={300,"Coins"};};
class ItemTroutCooked { type = "trade_items"; buy[] ={1000,"Coins"}; sell[] ={500,"Coins"};};
class ItemSeaBassCooked { type = "trade_items"; buy[] ={2000,"Coins"}; sell[] ={1000,"Coins"};};
class ItemTunaCooked { type = "trade_items"; buy[] ={3000,"Coins"}; sell[] ={1500,"Coins"};};
}; | [
"[email protected]"
] | |
09a7f0fee5b0c10c1731b611d71dd9d4d485d36b | 1782241ce87709fc158d73b5fdc09dd30ec22ab6 | /90.Otros/ooml_rebel/src/libraries/core/Toroid.cpp | 7149e2053bc94ca31ef69ee0eb5a29e90492f53e | [] | no_license | jmartinz/3Dthings | fd00aedb176ae27978abbfe4e2f225b5e98da50d | f2e4be66760a9020633b4c424e7f498687a60bba | refs/heads/master | 2021-01-10T21:23:22.823294 | 2017-01-14T00:07:34 | 2017-01-14T00:07:34 | 7,644,332 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,057 | cpp | /**********************************************************************
*
* This code is part of the OOML project
* Authors: Juan Gonzalez-Gomez, Alberto Valero-Gomez
*
* OOML is licenced under the Common Creative License,
* Attribution-ShareAlike 3.0
*
* You are free:
* - to Share - to copy, distribute and transmit the work
* - to Remix - to adapt the work
*
* Under the following conditions:
* - Attribution. You must attribute the work in the manner specified
* by the author or licensor (but not in any way that suggests that
* they endorse you or your use of the work).
* - Share Alike. If you alter, transform, or build upon this work,
* you may distribute the resulting work only under the same or
* similar license to this one.
*
* Any of the above conditions can be waived if you get permission
* from the copyright holder. Nothing in this license impairs or
* restricts the author's moral rights.
*
* It 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.
**********************************************************************/
#include <iostream>
#include "Toroid.h"
using namespace std;
string Toroid::gen_scad(int indent) const
{
stringstream out;
out << spaces(indent);
out << "rotate_extrude(convexity=10, $fn=" << quality << ")" << endl;
out << " translate([" << in_r << ", 0, 0])" << endl;
out << " circle(" << sec_r << ", $fn=" << quality<<");";
return out.str();
}
void Toroid::print_ast(int indent) const
{
cout << "//- ";
spaces(indent);
//-- Print the Toroid's properties
cout << "TOROID("<< in_r << "," << sec_r << "," << quality << ")";
//-- Print the object's properties
print_properties();
}
Toroid& Toroid::clone() const
{
Toroid* toroid = new Toroid(in_r,sec_r,quality);
toroid->set_dynamic(true);
return *toroid;
}
| [
"[email protected]"
] | |
bfc75cc0fb14db3a8eaeeece73016859af039009 | c9a59d4ef11d04efd5a8bbd0e4e392c5ddc3d649 | /algorithm/STLUsageTest/testPriority_queue.h | 7656305f9f5dd17206837549ab0eb079a242d54a | [] | no_license | Moseasirius/Algorithm | ef9f3e66de340c1c650990b592c6cdb030676b51 | a445b4cc6b1a8d651d2c76c8f56d3c36baa34bcd | refs/heads/main | 2023-09-04T20:14:38.571827 | 2021-11-17T16:05:08 | 2021-11-17T16:05:08 | 380,462,054 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,446 | h | //
// Created by mozhenhai on 2021/8/6.
//
#ifndef STLUSAGETEST_TESTPRIORITY_QUEUE_H
#define STLUSAGETEST_TESTPRIORITY_QUEUE_H
#include <iostream>
#include <queue>
namespace TestPriorityQueque {
void testPriorityQueque() {
//priority_queue::empty()函数 功能:如果优先队列为空,则返回真
//priority_queue::pop()函数 功能:删除第一个元素
//priority_queue::push()函数 功能:加入一个元素
//priority_queue::size()函数 功能:返回优先队列中拥有的元素的个数
//priority_queue::top()函数 功能:返回优先队列中有最高优先级的元素
priority_queue<int> pq;
int sum(0);
for (int i = 0; i <= 11; i++) {
pq.push(i);
}
cout << pq.top() << endl;
while (!pq.empty()) {
sum += pq.top();
pq.pop();
}
cout << "total:" << sum << endl;
priority_queue<int> pq1;
pq1.push(1999);
pq1.push(2000);
pq1.push(1998);
pq1.push(2020);
cout << "size of pq1 :" << pq1.size() << endl;
cout << "popping out elements:";
while (!pq1.empty()) {
cout << " " << pq1.top();
pq1.pop();
}
cout << endl;
cout << "size of pq1 :" << pq1.size() << endl;
}
}
#endif //STLUSAGETEST_TESTPRIORITY_QUEUE_H
| [
"moseasirius.gmail.com"
] | moseasirius.gmail.com |
f46be65d2ded3b52c860c9f93ed939c01442de04 | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /chromecast/net/fake_stream_socket.h | 8c1bcbc2192fdb2f56cec500cf1cb9f3adf3af6c | [
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | C++ | false | false | 2,681 | h | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMECAST_NET_FAKE_STREAM_SOCKET_H_
#define CHROMECAST_NET_FAKE_STREAM_SOCKET_H_
#include <stdint.h>
#include <memory>
#include "base/macros.h"
#include "net/base/ip_endpoint.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/stream_socket.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
namespace chromecast {
class SocketBuffer;
// Fake StreamSocket that communicates with another instance in memory.
class FakeStreamSocket : public net::StreamSocket {
public:
FakeStreamSocket();
explicit FakeStreamSocket(const net::IPEndPoint& local_address);
~FakeStreamSocket() override;
// Sets the peer for this socket.
void SetPeer(FakeStreamSocket* peer);
// Enables/disables "bad sender mode", where Write() will always try to send
// less than the full buffer. Disabled by default.
void SetBadSenderMode(bool bad_sender);
// net::StreamSocket implementation:
int Read(net::IOBuffer* buf,
int buf_len,
net::CompletionOnceCallback callback) override;
int Write(
net::IOBuffer* buf,
int buf_len,
net::CompletionOnceCallback callback,
const net::NetworkTrafficAnnotationTag& traffic_annotation) override;
int SetReceiveBufferSize(int32_t size) override;
int SetSendBufferSize(int32_t size) override;
int Connect(net::CompletionOnceCallback callback) override;
void Disconnect() override;
bool IsConnected() const override;
bool IsConnectedAndIdle() const override;
int GetPeerAddress(net::IPEndPoint* address) const override;
int GetLocalAddress(net::IPEndPoint* address) const override;
const net::NetLogWithSource& NetLog() const override;
bool WasEverUsed() const override;
bool WasAlpnNegotiated() const override;
net::NextProto GetNegotiatedProtocol() const override;
bool GetSSLInfo(net::SSLInfo* ssl_info) override;
void GetConnectionAttempts(net::ConnectionAttempts* out) const override;
void ClearConnectionAttempts() override;
void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override;
int64_t GetTotalReceivedBytes() const override;
void ApplySocketTag(const net::SocketTag& tag) override;
private:
void RemoteDisconnected();
const net::IPEndPoint local_address_;
const std::unique_ptr<SocketBuffer> buffer_;
FakeStreamSocket* peer_;
net::NetLogWithSource net_log_;
bool bad_sender_mode_ = false;
DISALLOW_COPY_AND_ASSIGN(FakeStreamSocket);
};
} // namespace chromecast
#endif // CHROMECAST_NET_FAKE_STREAM_SOCKET_H_
| [
"[email protected]"
] | |
8d4e1a9fbb10a440c64e8bcf50a42cf855b7dae5 | 08b8cf38e1936e8cec27f84af0d3727321cec9c4 | /data/crawl/squid/hunk_5254.cpp | eba15a3185ab50ad13ebcad2b0802d8a3e66ff34 | [] | no_license | ccdxc/logSurvey | eaf28e9c2d6307140b17986d5c05106d1fd8e943 | 6b80226e1667c1e0760ab39160893ee19b0e9fb1 | refs/heads/master | 2022-01-07T21:31:55.446839 | 2018-04-21T14:12:43 | 2018-04-21T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,723 | cpp | #else
int
main(int argc, char **argv)
-#endif {
+#endif
+{
int errcount = 0;
-int n; /* # of GC'd objects */
-mode_t oldmask;
+ int n; /* # of GC'd objects */
+ mode_t oldmask;
#if HAVE_SBRK
-sbrk_start = sbrk(0);
+ sbrk_start = sbrk(0);
#endif
-debug_log = stderr;
+ debug_log = stderr;
-if (FD_SETSIZE < Squid_MaxFD)
- Squid_MaxFD = FD_SETSIZE;
+ if (FD_SETSIZE < Squid_MaxFD)
+ Squid_MaxFD = FD_SETSIZE;
#ifdef _SQUID_WIN32_
#ifdef USE_WIN32_SERVICE
-if (WIN32_Subsystem_Init(&argc, &argv))
- return;
+ if (WIN32_Subsystem_Init(&argc, &argv))
+ return;
#else
-{
- int WIN32_init_err;
+ {
+ int WIN32_init_err;
- if ((WIN32_init_err = WIN32_Subsystem_Init()))
- return WIN32_init_err;
-}
+ if ((WIN32_init_err = WIN32_Subsystem_Init()))
+ return WIN32_init_err;
+ }
#endif
#endif
-/* call mallopt() before anything else */
+ /* call mallopt() before anything else */
#if HAVE_MALLOPT
#ifdef M_GRAIN
-/* Round up all sizes to a multiple of this */
-mallopt(M_GRAIN, 16);
+ /* Round up all sizes to a multiple of this */
+ mallopt(M_GRAIN, 16);
#endif
#ifdef M_MXFAST
-/* biggest size that is considered a small block */
-mallopt(M_MXFAST, 256);
+ /* biggest size that is considered a small block */
+ mallopt(M_MXFAST, 256);
#endif
#ifdef M_NBLKS
-/* allocate this many small blocks at once */
-mallopt(M_NLBLKS, 32);
+ /* allocate this many small blocks at once */
+ mallopt(M_NLBLKS, 32);
#endif
#endif /* HAVE_MALLOPT */
-/*
- * The plan here is to set the umask to 007 (deny others for
- * read,write,execute), but only if the umask is not already
- * set. Unfortunately, there is no way to get the current
- * umask value without setting it.
- */
-oldmask = umask(S_IRWXO);
+ /*
+ * The plan here is to set the umask to 007 (deny others for
+ * read,write,execute), but only if the umask is not already
+ * set. Unfortunately, there is no way to get the current
+ * umask value without setting it.
+ */
+ oldmask = umask(S_IRWXO);
-if (oldmask)
- umask(oldmask);
+ if (oldmask)
+ umask(oldmask);
-memset(&local_addr, '\0', sizeof(struct in_addr));
+ memset(&local_addr, '\0', sizeof(struct in_addr));
-safe_inet_addr(localhost, &local_addr);
+ safe_inet_addr(localhost, &local_addr);
-memset(&any_addr, '\0', sizeof(struct in_addr));
+ memset(&any_addr, '\0', sizeof(struct in_addr));
-safe_inet_addr("0.0.0.0", &any_addr);
+ safe_inet_addr("0.0.0.0", &any_addr);
-memset(&no_addr, '\0', sizeof(struct in_addr));
+ memset(&no_addr, '\0', sizeof(struct in_addr));
-safe_inet_addr("255.255.255.255", &no_addr);
+ safe_inet_addr("255.255.255.255", &no_addr);
-squid_srandom(time(NULL));
+ squid_srandom(time(NULL));
-getCurrentTime();
+ getCurrentTime();
-squid_start = current_time;
+ squid_start = current_time;
-failure_notify = fatal_dump;
+ failure_notify = fatal_dump;
#if USE_WIN32_SERVICE
-WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000);
+ WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000);
#endif
-mainParseOptions(argc, argv);
+ mainParseOptions(argc, argv);
#if USE_WIN32_SERVICE
-if (opt_install_service) {
- WIN32_InstallService();
- return;
-}
+ if (opt_install_service) {
+ WIN32_InstallService();
+ return;
+ }
-if (opt_remove_service) {
- WIN32_RemoveService();
- return;
-}
+ if (opt_remove_service) {
+ WIN32_RemoveService();
+ return;
+ }
-if (opt_command_line) {
- WIN32_SetServiceCommandLine();
- return;
-}
+ if (opt_command_line) {
+ WIN32_SetServiceCommandLine();
+ return;
+ }
#endif
-/* parse configuration file
- * note: in "normal" case this used to be called from mainInitialize() */
-{
- int parse_err;
+ /* parse configuration file
+ * note: in "normal" case this used to be called from mainInitialize() */
+ {
+ int parse_err;
- if (!ConfigFile)
- ConfigFile = xstrdup(DefaultConfigFile);
+ if (!ConfigFile)
+ ConfigFile = xstrdup(DefaultConfigFile);
- assert(!configured_once);
+ assert(!configured_once);
#if USE_LEAKFINDER
- leakInit();
+ leakInit();
#endif
- Mem::Init();
+ Mem::Init();
- cbdataInit();
+ cbdataInit();
- eventInit(); /* eventInit() is required for config parsing */
+ eventInit(); /* eventInit() is required for config parsing */
- storeFsInit(); /* required for config parsing */
+ storeFsInit(); /* required for config parsing */
- authenticateSchemeInit(); /* required for config parsign */
+ authenticateSchemeInit(); /* required for config parsign */
- parse_err = parseConfigFile(ConfigFile);
+ parse_err = parseConfigFile(ConfigFile);
- if (opt_parse_cfg_only)
+ if (opt_parse_cfg_only)
#if USE_WIN32_SERVICE
- return;
+ return;
#else
- return parse_err;
+ return parse_err;
#endif
-}
-if (-1 == opt_send_signal)
- if (checkRunningPid())
- exit(1);
+ }
+ if (-1 == opt_send_signal)
+ if (checkRunningPid())
+ exit(1);
#if TEST_ACCESS
-comm_init();
+ comm_init();
-comm_select_init();
+ comm_select_init();
-mainInitialize();
+ mainInitialize();
-test_access();
+ test_access();
-return 0;
+ return 0;
#endif
-/* send signal to running copy and exit */
-if (opt_send_signal != -1) {
- /* chroot if configured to run inside chroot */
+ /* send signal to running copy and exit */
+ if (opt_send_signal != -1) {
+ /* chroot if configured to run inside chroot */
- if (Config.chroot_dir && chroot(Config.chroot_dir)) {
- fatal("failed to chroot");
- }
+ if (Config.chroot_dir && chroot(Config.chroot_dir)) {
+ fatal("failed to chroot");
+ }
- sendSignal();
- /* NOTREACHED */
-}
+ sendSignal();
+ /* NOTREACHED */
+ }
-if (opt_create_swap_dirs) {
- /* chroot if configured to run inside chroot */
+ if (opt_create_swap_dirs) {
+ /* chroot if configured to run inside chroot */
- if (Config.chroot_dir && chroot(Config.chroot_dir)) {
- fatal("failed to chroot");
- }
+ if (Config.chroot_dir && chroot(Config.chroot_dir)) {
+ fatal("failed to chroot");
+ }
- setEffectiveUser();
- debug(0, 0) ("Creating Swap Directories\n");
- storeCreateSwapDirectories();
+ setEffectiveUser();
+ debug(0, 0) ("Creating Swap Directories\n");
+ storeCreateSwapDirectories();
#if USE_WIN32_SERVICE
- return;
+ return;
#else
- return 0;
+ return 0;
#endif
-}
+ }
-if (!opt_no_daemon)
- watch_child(argv);
+ if (!opt_no_daemon)
+ watch_child(argv);
-setMaxFD();
+ setMaxFD();
-if (opt_catch_signals)
- for (n = Squid_MaxFD; n > 2; n--)
- close(n);
+ if (opt_catch_signals)
+ for (n = Squid_MaxFD; n > 2; n--)
+ close(n);
-/* init comm module */
-comm_init();
+ /* init comm module */
+ comm_init();
-comm_select_init();
+ comm_select_init();
-if (opt_no_daemon) {
- /* we have to init fdstat here. */
- fd_open(0, FD_LOG, "stdin");
- fd_open(1, FD_LOG, "stdout");
- fd_open(2, FD_LOG, "stderr");
-}
+ if (opt_no_daemon) {
+ /* we have to init fdstat here. */
+ fd_open(0, FD_LOG, "stdin");
+ fd_open(1, FD_LOG, "stdout");
+ fd_open(2, FD_LOG, "stderr");
+ }
#if USE_WIN32_SERVICE
-WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000);
+ WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000);
#endif
-mainInitialize();
+ mainInitialize();
#if USE_WIN32_SERVICE
-WIN32_svcstatusupdate(SERVICE_RUNNING, 0);
+ WIN32_svcstatusupdate(SERVICE_RUNNING, 0);
#endif
-/* main loop */
+ /* main loop */
-for (;;) {
- if (do_reconfigure) {
- mainReconfigure();
- do_reconfigure = 0;
- } else if (do_rotate) {
- mainRotate();
- do_rotate = 0;
- } else if (do_shutdown) {
- time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0;
- debug(1, 1) ("Preparing for shutdown after %d requests\n",
- statCounter.client_http.requests);
- debug(1, 1) ("Waiting %d seconds for active connections to finish\n",
- (int) wait);
- do_shutdown = 0;
- shutting_down = 1;
+ for (;;) {
+ if (do_reconfigure) {
+ mainReconfigure();
+ do_reconfigure = 0;
+ } else if (do_rotate) {
+ mainRotate();
+ do_rotate = 0;
+ } else if (do_shutdown) {
+ time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0;
+ debug(1, 1) ("Preparing for shutdown after %d requests\n",
+ statCounter.client_http.requests);
+ debug(1, 1) ("Waiting %d seconds for active connections to finish\n",
+ (int) wait);
+ do_shutdown = 0;
+ shutting_down = 1;
#if USE_WIN32_SERVICE
- WIN32_svcstatusupdate(SERVICE_STOP_PENDING, (wait + 1) * 1000);
+ WIN32_svcstatusupdate(SERVICE_STOP_PENDING, (wait + 1) * 1000);
#endif
- serverConnectionsClose();
+ serverConnectionsClose();
#if USE_DNSSERVERS
- dnsShutdown();
+ dnsShutdown();
#else
- idnsShutdown();
+ idnsShutdown();
#endif
- redirectShutdown();
- externalAclShutdown();
- eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1);
- }
+ redirectShutdown();
+ externalAclShutdown();
+ eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1);
+ }
- eventRun();
- int loop_delay = eventNextTime();
+ eventRun();
+ int loop_delay = eventNextTime();
- if (loop_delay < 0)
- loop_delay = 0;
+ if (loop_delay < 0)
+ loop_delay = 0;
- /* Attempt any pending storedir IO */
- storeDirCallback();
+ /* Attempt any pending storedir IO */
+ storeDirCallback();
- comm_calliocallback();
+ comm_calliocallback();
- switch (comm_select(loop_delay)) {
+ switch (comm_select(loop_delay)) {
- case COMM_OK:
- errcount = 0; /* reset if successful */
- break;
+ case COMM_OK:
+ errcount = 0; /* reset if successful */
+ break;
- case COMM_ERROR:
- errcount++;
- debug(1, 0) ("Select loop Error. Retry %d\n", errcount);
+ case COMM_ERROR:
+ errcount++;
+ debug(1, 0) ("Select loop Error. Retry %d\n", errcount);
- if (errcount == 10)
- fatal_dump("Select Loop failed!");
+ if (errcount == 10)
+ fatal_dump("Select Loop failed!");
- break;
+ break;
- case COMM_TIMEOUT:
- break;
+ case COMM_TIMEOUT:
+ break;
- case COMM_SHUTDOWN:
- SquidShutdown(NULL);
+ case COMM_SHUTDOWN:
+ SquidShutdown(NULL);
- break;
+ break;
- default:
- fatal_dump("MAIN: Internal error -- this should never happen.");
+ default:
+ fatal_dump("MAIN: Internal error -- this should never happen.");
- break;
+ break;
+ }
}
-}
-/* NOTREACHED */
+ /* NOTREACHED */
#if USE_WIN32_SERVICE
-return;
+ return;
#else
-return 0;
+ return 0;
#endif
} | [
"[email protected]"
] | |
3c6635ba9ca683cf9e3f8fb8065eb7266f6f0171 | e97ef07be160080c6fe8cf7fca9974fd1a596cd7 | /chapter-03/section-01/inflate.cc | c7214b926012c2ff10edfc46016c9590c2cf0031 | [] | no_license | 007kevin/usaco | 625d2e6ea4222cc84c496aeb99c904834e98661a | ea70ef13a870f2ee1fb638569ce7efbfe9b03635 | refs/heads/master | 2021-01-17T00:21:34.976328 | 2016-10-31T03:44:52 | 2016-10-31T03:44:52 | 51,709,758 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 889 | cc | /*
ID: min_j
LANG: C++
TASK: inflate
Date: 07/05/2015
Anaylsis:
I think we use dynamic programming to solve this
problem
*/
#include <iostream>
#include <fstream>
using namespace std;
//#define DEBUG
#define MAX 20001
int M,N;
struct cate{
int p,m;
};
cate pc[MAX];
int dp[MAX];
int main(){
ifstream fin("inflate.in");
ofstream fout("inflate.out");
fin>>M>>N;
int min,point,max=0;
for (int i = 0; i < N; ++i){
fin>>point;
fin>>min;
dp[min] = point;
pc[i].p = point;
pc[i].m = min;
}
for (int m = 0; m <= M; ++m){
if (dp[m]){
max = dp[m] > max ? dp[m] : max;
for (int p = 0; p < N; ++p){
if (dp[m+pc[p].m] < dp[m] + pc[p].p){
dp[m+pc[p].m] = dp[m] + pc[p].p ;
}
}
}
}
fout<<max<<endl;
#ifdef DEBUG
for (int i = 0; i <= M; ++i){
cout<<i<<": "<<dp[i]<<endl;
}
#endif
return 0;
}
| [
"[email protected]"
] | |
fa2c1e9ed2ec10f63c484aed491fb052f55d04d4 | 4b77ab97f97309fe75067059d230dd4250801938 | /src/Library/Materials/WardAnisotropicEllipticalGaussianBRDF.cpp | 43c3d326a6785c52c168e58651e48117d29ab2da | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | aravindkrishnaswamy/RISE | de862c1ab15fe2ed1bc620f3c3939430b801d54d | 297d0339a7f7acd1418e322a30a21f44c7dbbb1d | refs/heads/master | 2020-04-12T16:22:44.305654 | 2018-12-20T17:27:30 | 2018-12-20T17:27:30 | 162,610,783 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,695 | cpp | //////////////////////////////////////////////////////////////////////
//
// WardAnisotropicEllipticalGaussianBRDF.cpp
//
// Author: Aravind Krishnaswamy
// Date of Birth: June 12, 2002
// Tabs: 4
// Comments:
//
// License Information: Please see the attached LICENSE.TXT file
//
//////////////////////////////////////////////////////////////////////
#include "pch.h"
#include "WardAnisotropicEllipticalGaussianBRDF.h"
#include "../Utilities/GeometricUtilities.h"
#include "../Interfaces/ILog.h"
using namespace RISE;
using namespace RISE::Implementation;
WardAnisotropicEllipticalGaussianBRDF::WardAnisotropicEllipticalGaussianBRDF(
const IPainter& diffuse_,
const IPainter& specular_,
const IPainter& alphax_,
const IPainter& alphay_
) :
diffuse( diffuse_ ),
specular( specular_ ),
alphax( alphax_ ),
alphay( alphay_ )
{
diffuse.addref();
specular.addref();
alphax.addref();
alphay.addref();
}
WardAnisotropicEllipticalGaussianBRDF::~WardAnisotropicEllipticalGaussianBRDF( )
{
diffuse.release();
specular.release();
alphax.release();
alphay.release();
}
template< class T >
static void ComputeFactors(
T& diffuse,
T& specular,
const Vector3& vLightIn,
const RayIntersectionGeometric& ri,
const T& alphax,
const T& alphay
)
{
Vector3 l = Vector3Ops::Normalize(vLightIn); // light vector
Vector3 r = Vector3Ops::Normalize(-ri.ray.dir); // outgoing ray vector
const Vector3& n = ri.onb.w();
const Scalar nr = Vector3Ops::Dot(n,r);
const Scalar nl = Vector3Ops::Dot(n,l);
if( (nr >= 0) && (nl >= 0) ) {
diffuse = INV_PI;
const Vector3 h = Vector3Ops::Normalize(l+r);
const Scalar nh = Vector3Ops::Dot(n,h);
const Scalar phi = acos(Vector3Ops::Dot(ri.onb.u(),Vector3Ops::Normalize(h-(nh*n))));
const Scalar first = 1.0 / (sqrt(nr*nl));
const Scalar tanh = tan(acos(nh));
const T inside = (cos(phi)*cos(phi))/(alphax*alphax) + (sin(phi)*sin(phi))/(alphay*alphay);
const T second = exp( -(tanh*tanh)*inside );
const T third = 1.0 / (FOUR_PI*alphax*alphay);
specular = first*second*third;
}
}
RISEPel WardAnisotropicEllipticalGaussianBRDF::value( const Vector3& vLightIn, const RayIntersectionGeometric& ri ) const
{
RISEPel d, s;
ComputeFactors<RISEPel>( d, s, vLightIn, ri, alphax.GetColor(ri), alphay.GetColor(ri) );
return d*diffuse.GetColor(ri) + s*specular.GetColor(ri);
}
Scalar WardAnisotropicEllipticalGaussianBRDF::valueNM( const Vector3& vLightIn, const RayIntersectionGeometric& ri, const Scalar nm ) const
{
Scalar d=0, s=0;
ComputeFactors<Scalar>( d, s, vLightIn, ri, alphax.GetColorNM(ri,nm), alphay.GetColorNM(ri,nm) );
return d*diffuse.GetColorNM(ri,nm) + s*specular.GetColorNM(ri,nm);
}
| [
"[email protected]"
] | |
3ff32831cb48fe5cc8baf246651adea159cbca6a | 7afa020b6e0cc14608cff1c4d5cbf0d67de3ffe5 | /src/qt/intro.h | deed2f4bdd44c4f6ec19a6a830e1559688c07eed | [
"MIT"
] | permissive | bitcointest527/tesbit12 | f032d9d469dadb8045a92c96956a2967d82b7dee | 71ab5ef78e2c5dc5cf57ce853e4d64930a05947e | refs/heads/master | 2023-08-08T08:40:41.473951 | 2019-11-28T15:44:40 | 2019-11-28T15:44:40 | 224,683,941 | 0 | 0 | MIT | 2023-07-22T22:55:34 | 2019-11-28T15:40:04 | C | UTF-8 | C++ | false | false | 2,052 | h | // Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2019-2019 The bitcoinphantom Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef bitcoinphantom_QT_INTRO_H
#define bitcoinphantom_QT_INTRO_H
#include <QDialog>
#include <QMutex>
#include <QThread>
static const bool DEFAULT_CHOOSE_DATADIR = false;
class FreespaceChecker;
namespace interfaces {
class Node;
}
namespace Ui {
class Intro;
}
/** Introduction screen (pre-GUI startup).
Allows the user to choose a data directory,
in which the wallet and block chain will be stored.
*/
class Intro : public QDialog
{
Q_OBJECT
public:
explicit Intro(QWidget *parent = 0);
~Intro();
QString getDataDirectory();
void setDataDirectory(const QString &dataDir);
/**
* Determine data directory. Let the user choose if the current one doesn't exist.
*
* @returns true if a data directory was selected, false if the user cancelled the selection
* dialog.
*
* @note do NOT call global GetDataDir() before calling this function, this
* will cause the wrong path to be cached.
*/
static bool pickDataDirectory(interfaces::Node& node);
/**
* Determine default data directory for operating system.
*/
static QString getDefaultDataDirectory();
Q_SIGNALS:
void requestCheck();
void stopThread();
public Q_SLOTS:
void setStatus(int status, const QString &message, quint64 bytesAvailable);
private Q_SLOTS:
void on_dataDirectory_textChanged(const QString &arg1);
void on_ellipsisButton_clicked();
void on_dataDirDefault_clicked();
void on_dataDirCustom_clicked();
private:
Ui::Intro *ui;
QThread *thread;
QMutex mutex;
bool signalled;
QString pathToCheck;
void startThread();
void checkPath(const QString &dataDir);
QString getPathToCheck();
friend class FreespaceChecker;
};
#endif // bitcoinphantom_QT_INTRO_H
| [
"[email protected]"
] | |
e8b9cee410bd147ca1f617c7235d67b8b73d0744 | b33a9177edaaf6bf185ef20bf87d36eada719d4f | /qtbase/src/corelib/kernel/qtcore_eval.cpp | 60873b56168ca3958373f516545ed2b3d5180187 | [
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-commercial-license",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"GFDL-1.3-only",
"LicenseRef-scancode-qt-commercial-1.1",
"LGPL-3.0-only",
"LicenseRef-scancode-qt-company-exception-lgpl-2.1",
"GPL-1.0-or-later",
"GPL-3.0-only",
"BSD-3-Clause",
"LGPL-2.1-or-later",
"GPL-2.0-only",
"Qt-LGPL-exception-1.1",
"LicenseRef-scancode-digia-qt-preview",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-generic-exception"
] | permissive | wgnet/wds_qt | ab8c093b8c6eead9adf4057d843e00f04915d987 | 8db722fd367d2d0744decf99ac7bafaba8b8a3d3 | refs/heads/master | 2021-04-02T11:07:10.181067 | 2020-06-02T10:29:03 | 2020-06-02T10:34:19 | 248,267,925 | 1 | 0 | Apache-2.0 | 2020-04-30T12:16:53 | 2020-03-18T15:20:38 | null | UTF-8 | C++ | false | false | 17,845 | cpp | /****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcoreevent.h>
#include <qdatetime.h>
#include <qlibraryinfo.h>
#include <qobject.h>
#include <qcoreapplication.h>
#include <private/qcoreapplication_p.h>
#include "stdio.h"
#include "stdlib.h"
QT_BEGIN_NAMESPACE
#include "qconfig_eval.cpp"
static const char boilerplate_supported_but_time_limited[] =
"\nQt %1 Evaluation License\n"
"Copyright (C) 2016 The Qt Company Ltd.\n"
"This trial version may only be used for evaluation purposes\n"
"and will shut down after 120 minutes.\n"
"Registered to:\n"
" Licensee: %2\n\n"
"The evaluation expires in %4 days\n\n"
"Contact http://www.qt.io/contact-us for pricing and purchasing information.\n";
static const char boilerplate_supported[] =
"\nQt %1 Evaluation License\n"
"Copyright (C) 2016 The Qt Company Ltd.\n"
"This trial version may only be used for evaluation purposes\n"
"Registered to:\n"
" Licensee: %2\n\n"
"The evaluation expires in %4 days\n\n"
"Contact http://www.qt.io/contact-us for pricing and purchasing information.\n";
static const char boilerplate_expired[] =
"This software is using the trial version of the Qt GUI toolkit.\n"
"The trial period has expired. If you need more time to\n"
"evaluate Qt, or if you have any questions about Qt, contact us\n"
"at: http://www.qt.io/contact-us.\n\n";
static const char will_shutdown_1min[] =
"\nThe evaluation of Qt will SHUT DOWN in 1 minute.\n"
"Contact http://www.qt.io/contact-us for pricing and purchasing information.\n";
static const char will_shutdown_now[] =
"\nThe evaluation of Qt has now reached its automatic\n"
"timeout and will shut down.\n"
"Contact http://www.qt.io/contact-us for pricing and purchasing information.\n";
enum EvaluationStatus {
EvaluationNotSupported = 0,
EvaluationSupportedButTimeLimited,
EvaluationSupported
};
static EvaluationStatus qt_eval_is_supported()
{
const volatile char *const license_key = qt_eval_key_data + 12;
// fast fail
if (!qt_eval_key_data[0] || !*license_key)
return EvaluationNotSupported;
// is this an unsupported evaluation?
const volatile char *typecode = license_key;
int field = 2;
for ( ; field && *typecode; ++typecode)
if (*typecode == '-')
--field;
if (!field && typecode[1] == '4' && typecode[2] == 'M') {
if (typecode[0] == 'Q')
return EvaluationSupportedButTimeLimited;
else if (typecode[0] == 'R' || typecode[0] == 'Z')
return EvaluationSupported;
}
return EvaluationNotSupported;
}
static int qt_eval_days_left()
{
const volatile char *const expiry_date = qt_eval_expiry_date + 12;
QDate today = QDate::currentDate();
QDate lastday = QDate::fromString(
QString::fromLatin1(const_cast<const char*>(expiry_date)), Qt::ISODate);
return today.daysTo(lastday);
}
static bool qt_eval_is_expired()
{
return qt_eval_days_left() < 0;
}
static QString qt_eval_string()
{
const char *msg;
switch (qt_eval_is_supported()) {
case EvaluationSupportedButTimeLimited:
msg = boilerplate_supported_but_time_limited;
break;
case EvaluationSupported:
msg = boilerplate_supported;
break;
default:
return QString();
msg = 0;
}
return QString::fromLatin1(msg)
.arg(QLatin1String(QT_VERSION_STR))
.arg(QLibraryInfo::licensee())
.arg(qt_eval_days_left());
}
#define WARN_TIMEOUT 60 * 1000 * 119
#define KILL_DELAY 60 * 1000 * 1
class QCoreFuriCuri : public QObject
{
public:
int warn;
int kill;
QCoreFuriCuri() : QObject(), warn(-1), kill(-1)
{
if (qt_eval_is_supported() == EvaluationSupportedButTimeLimited) {
warn = startTimer(WARN_TIMEOUT);
kill = 0;
}
}
void timerEvent(QTimerEvent *e) {
if (e->timerId() == warn) {
killTimer(warn);
fprintf(stderr, "%s\n", will_shutdown_1min);
kill = startTimer(KILL_DELAY);
} else if (e->timerId() == kill) {
fprintf(stderr, "%s\n", will_shutdown_now);
QCoreApplication::instance()->quit();
}
}
};
#if defined(QT_BUILD_CORE_LIB) || defined (QT_BOOTSTRAPPED)
void qt_core_eval_init(QCoreApplicationPrivate::Type type)
{
if (type != QCoreApplicationPrivate::Tty)
return;
if (!qt_eval_is_supported())
return;
if (qt_eval_is_expired()) {
fprintf(stderr, "%s\n", boilerplate_expired);
exit(0);
} else {
fprintf(stderr, "%s\n", qPrintable(qt_eval_string()));
Q_UNUSED(new QCoreFuriCuri());
}
}
#endif
#ifdef QT_BUILD_WIDGETS_LIB
QT_BEGIN_INCLUDE_NAMESPACE
#include <qdialog.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qtimer.h>
#include <qapplication.h>
QT_END_INCLUDE_NAMESPACE
static const char * const qtlogo_eval_xpm[] = {
/* columns rows colors chars-per-pixel */
"46 55 174 2",
" c #002E02",
". c #00370D",
"X c #003A0E",
"o c #003710",
"O c #013C13",
"+ c #043E1A",
"@ c #084F0A",
"# c #0B520C",
"$ c #054413",
"% c #0C4C17",
"& c #07421D",
"* c #09451D",
"= c #0D491E",
"- c #125515",
"; c #13541A",
": c #17591B",
"> c #1B5C1D",
", c #1F611F",
"< c #20621E",
"1 c #337B1E",
"2 c #0B4521",
"3 c #0F4923",
"4 c #114B24",
"5 c #154D2A",
"6 c #175323",
"7 c #1C5924",
"8 c #1C532F",
"9 c #1E5432",
"0 c #245936",
"q c #265938",
"w c #295C3B",
"e c #246324",
"r c #266823",
"t c #2A6C24",
"y c #276628",
"u c #2D7026",
"i c #327427",
"p c #367927",
"a c #37782A",
"s c #397C2A",
"d c #2E613E",
"f c #336C37",
"g c #2F6040",
"h c #356545",
"j c #3C6B4E",
"k c #3F6C51",
"l c #406E4F",
"z c #406D52",
"x c #477457",
"c c #497557",
"v c #4B7857",
"b c #517B5E",
"n c #3C8423",
"m c #3E812C",
"M c #53A61D",
"N c #41862C",
"B c #458A2D",
"V c #498F2D",
"C c #479324",
"Z c #489226",
"A c #4D952C",
"S c #478B30",
"D c #488C30",
"F c #4D9232",
"G c #509632",
"H c #549A33",
"J c #589F35",
"K c #56A526",
"L c #57A821",
"P c #5BAA27",
"I c #57A32A",
"U c #5CA72E",
"Y c #5DAB2A",
"T c #5CA336",
"R c #60AD2E",
"E c #63B12D",
"W c #65AF35",
"Q c #62A53F",
"! c #65AE39",
"~ c #66B036",
"^ c #6AB437",
"/ c #67B138",
"( c #6AB339",
") c #6DB838",
"_ c #70BA3C",
"` c #4D8545",
"' c #4E8942",
"] c #548851",
"[ c #6FAF4A",
"{ c #6DB243",
"} c #71B546",
"| c #70B840",
" . c #73B648",
".. c #79BA4E",
"X. c #7CBB53",
"o. c #598266",
"O. c #62886D",
"+. c #6A8F75",
"@. c #6B9173",
"#. c #70937A",
"$. c #799F79",
"%. c #7BAF66",
"&. c #81BD5B",
"*. c #85BF60",
"=. c #85AC7F",
"-. c #8DBA7B",
";. c #87C061",
":. c #8AC364",
">. c #8DC46A",
",. c #90C56E",
"<. c #93C771",
"1. c #96CA73",
"2. c #9ACB7C",
"3. c #9FD07D",
"4. c #779981",
"5. c #7F9F89",
"6. c #809F88",
"7. c #82A18B",
"8. c #86A192",
"9. c #8DA994",
"0. c #8FA998",
"q. c #94AF9B",
"w. c #97B991",
"e. c #97B19E",
"r. c #9DB6A3",
"t. c #A3BCA7",
"y. c #A6BCAB",
"u. c #A9BEB1",
"i. c #9ECD81",
"p. c #A2CF85",
"a. c #A5D284",
"s. c #A6D189",
"d. c #A9D28E",
"f. c #ABD491",
"g. c #B1D797",
"h. c #B1D699",
"j. c #B5D89E",
"k. c #ADC5AC",
"l. c #B1CAAE",
"z. c #B9DAA3",
"x. c #BDDDA8",
"c. c #ADC1B4",
"v. c #B2C6B6",
"b. c #B5C6BC",
"n. c #B6C9BA",
"m. c #BCD1BA",
"M. c #C6E1B4",
"N. c #CDE5BD",
"B. c #C2D2C6",
"V. c #CADEC2",
"C. c #C6D3CC",
"Z. c #C8D7CB",
"A. c #CEDAD2",
"S. c #D2DDD4",
"D. c #D3E9C6",
"F. c #D7EBC9",
"G. c #D9EBCD",
"H. c #DEEED4",
"J. c #D6E0D9",
"K. c #DAE4DC",
"L. c #E0EFD7",
"P. c #E5F2DD",
"I. c #DFE8E0",
"U. c #E4EBE5",
"Y. c #E9EFEA",
"T. c #EDF4EB",
"R. c #F0FAE6",
"E. c #F1F8EC",
"W. c #EDF0F0",
"Q. c #F4F7F3",
"!. c #F6F9F4",
"~. c #F8FAF7",
"^. c #FEFEFE",
"/. c None",
/* pixels */
"/././././.c h ' Q / W _ &.p././././././././././././././././././././././././././././././././.",
"/././.4 O % Z ~ ~ W ~ W R U R R ( X.>.p././././././././././././././././././././././././././.",
"/./.. * = J _ ~ ~ ~ ~ ~ / / / / W W U P P U W .;.2././././././././././././././././././././.",
"/.= = & a ) W ~ ~ ~ ~ ~ / W / ~ ~ ~ ^ ( ( ^ ~ R R U P Y ~ .;.2././././././././././././././.",
"O.O = = T ^ W ~ ~ ~ ~ ~ ~ W W / W ~ ~ ~ ~ ~ ~ ~ ( ( ( ( ~ W Y Y Y Y W { &.1././././././././.",
"0 = * 7 ~ ~ ~ ~ ~ ~ ~ ~ ~ / / W ~ ~ ~ ~ ~ ~ ~ ~ W W W ~ ~ ~ ~ ( ( ( W W R U P U W { X.1.f./.",
"= = & e ^ W ~ ~ ~ ~ ~ ~ ~ ~ / / ~ ~ ~ ~ ~ ~ ~ ~ W ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ^ ( ( / ~ W R U U Y ",
"= = & e ^ W ~ ~ ~ ~ ~ ~ ~ ~ W W ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W ( W ~ ~ ~ ^ ^ ( ",
"= = * e ^ W ~ ~ ~ ~ ~ ~ / W / W ! ( / ~ W ^ ( ( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W ~ W W ~ ~ ~ ~ ~ ~ ",
"= = & e ^ ! ~ ~ ~ ~ ~ ~ W W ^ _ ~ K Y W W R P Y W ( ~ ~ ~ ~ ~ ~ ~ W / ~ ~ ~ ^ W ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ ~ ~ ~ ~ W ) W 1 ` w.V.L.H.D.z.,.~ Y ^ ~ ~ ~ ~ ~ W ~ ~ ~ ( ~ W W ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ ~ ~ ~ W ) V = 8.~.^.^.^.^.^.^.^.U.<.Y ~ ~ ~ ~ ~ W W ! ~ Y W ^ W ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ ~ ~ W ^ B O u.^.~.^.^.^.^.~.~.^.^.^.h.Y ^ ~ ~ ^ F $ k.R.G.1.Y / ~ ~ ~ ~ ~ ~ ",
"= = & e ^ ~ ~ ~ / W ( J X 7.^.~.^.^.^.^.^.^.^.^.^.^.^.s.Y / W ) a 2 U.^.^.d.U ( ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W / ~ ~ ~ ^ > w ~.^.^.^.^.^.F.%.v c.^.^.^.^.~.X.W ~ ^ > h ^.^.^.d.P ( ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ W ^ H o e.^.^.^.^.^.G.Y E n . y.^.^.^.^.M.Y ( ! $ @.^.~.^.f.U ( / ~ ~ W ~ ~ ",
"= = & e ^ W ~ W ! ) t 4 U.^.^.^.^.^.>.U ( _ , 9 ~.^.^.^.~...^ A y.^.~.^.s.M W Y ~ ~ ~ ~ ~ ",
"= 3 & e ^ W ~ ( ^ ( $ c ^.^.^.^.^.E.) ~ ~ ^ S o n.^.^.^.^.=.- l.v.Y.^.^.^.M.:.:.X.~ ~ ~ ~ ~ ",
"= = & e ^ ! W W ( J X 7.^.^.^.^.^.F.Y ( W ^ T X 6.^.^.~.^.c.. J.^.^.^.^.^.^.^.^.P.~ ~ ~ ~ ~ ",
"= = & r ^ W / W ) B o v.^.~.^.^.^.M.U / ~ ~ ! $ o.^.^.^.^.K.* S.^.^.^.^.^.^.^.^.P.~ ~ ~ ~ ~ ",
"= = & e ^ ! ~ W ) a + S.^.^.^.^.^.z.P ( W ~ ( % z ^.^.^.^.~.f t.U.^.^.^.^.~.^.^.P.~ ~ ~ ~ ~ ",
"* = & e ^ W ~ W ) t 3 Y.^.^.^.^.^.f.P ( ~ ~ ^ ; h ^.^.^.^.^.:.@ j ^.^.^.^.h.{ X.&.~ ~ ~ ~ ~ ",
"3 = & e ^ W ~ ~ ^ e 8 Q.^.^.^.^.^.s.P ~ ~ W ^ > 0 ~.^.^.^.^.1.# z ^.^.^.^.d.L W R ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ ^ > q ~.^.^.^.^.^.p.U ^ ~ W ) e 9 ~.^.^.^.^.3.# k ^.^.^.^.f.Y ( / ~ ~ ~ ~ ~ ",
"= = & e ^ W / W ^ > w ~.^.^.^.^.^.i.Y / ~ W ^ e 8 Q.^.^.^.^.a.# z ^.^.^.^.f.Y / ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W / W ^ > w ^.^.^.^.^.^.2.Y / ~ ~ ) e 8 Q.^.^.^.^.s.# z ^.^.^.^.d.P ( ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W W W ^ > q ^.^.^.^.^.^.p.Y / ~ ~ ^ e 9 Q.^.^.^.^.a.@ z ^.^.^.^.f.U / ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W / W ) 7 9 Q.^.^.^.^.^.a.P / ~ W ) , 9 Q.^.^.^.^.3.# z ^.^.~.^.f.P ^ ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W / W ) r 5 T.^.^.^.^.^.d.Y / ~ W ) > q ~.^.^.^.^.1.# k ^.^.^.^.f.Y ( ~ ~ ~ ~ ~ ~ ",
"= = & e ^ / / W ) i 2 I.^.^.^.^.^.h.P ( ~ W ( > g ^.^.^.^.^.:.# z ^.^.^.^.f.P / ~ ~ ~ ~ ~ ~ ",
"= = & e ( W / W ) m O Z.^.^.^.^.^.x.P / ~ ~ ( ; j ^.^.^.^.~.&.- k ^.^.~.^.f.P / ~ ~ ~ ~ ~ ~ ",
"= = & e ( W / W ) F o y.^.~.^.^.^.N.U ( ~ ~ W $ b ^.^.^.^.R._ - k ^.^.^.^.f.Y ( ~ ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ ^ J X 4.^.^.^.^.^.L.~ ~ W ^ T X #.^.^.^.^.F.~ ; j ^.^.^.^.f.U ( ~ ~ ~ ~ ~ ~ ",
"= = & e ^ ~ ~ ~ / ^ % l ^.^.^.^.^.!. .R ^ ^ G . r.^.~.^.^.j.E : j ^.^.^.^.f.P ) ( ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ W ) u = U.^.^.^.^.^.1.Y ! ) a & K.^.^.^.^.;.~ : j ^.^.~.^.z.M I I / ~ ~ W ~ ",
"= = & e ( W ~ ~ W ( G . q.^.^.^.^.^.D.U ^ ! X o.^.^.^.^.P.~ ^ > g ^.^.^.^.E.-.$.m.X.W ~ ~ ~ ",
"= = & e ^ / ~ ~ ^ ! ( > w ~.^.^.^.^.^.h.T > j T.^.^.~.^.a.Y _ i 3 U.^.^.^.^.^.^.^.X.R ~ ~ ~ ",
"= = & e ^ / ~ ~ W W ^ H . 9.^.~.^.^.^.^.K.C.~.^.^.^.^.H.W W ^ T . q.^.~.^.^.^.^.^.X.R ~ ~ ~ ",
"= = + e ^ W / ~ W W W ) m + B.^.~.^.^.^.^.^.^.^.^.^.E.X.Y ( W ^ B 6 y.^.^.^.E.D.2.( ~ ~ ~ ~ ",
"= = * e ^ ! / ! W ^ W W ) a 4 b.^.^.^.^.^.^.^.^.^.P...Y ( ! W ! ^ W Z [ *.X.{ Y U ~ ~ ~ ~ ~ ",
"= = & e ( W ~ ~ W / W / W ) A < +.A.~.^.^.^.^.!.p.W R ~ ~ ~ ~ ~ W / ) E U W W / ^ ~ ~ ~ ~ ~ ",
"= = & e ^ W ~ ~ / W / / / W ( _ Z X 6.^.^.^.^.E.W ~ ^ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ / ~ ~ ~ ~ ~ ~ ~ ~ ",
"= = & e ^ ~ ~ ~ W W / W ~ ~ ~ ~ ) ; h ^.^.^.^.^.d.M U ~ / ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W ",
"= = & e ^ W ~ ~ ^ W W / ~ ~ ~ W ) p + S.^.^.^.^.~.M.f. .W ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ .",
"= = & e ^ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W ( T O +.^.~.^.^.^.^.^.&.Y ( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W ( Y 2.",
"= = & e ( W ~ ~ ~ ~ ~ ~ ~ ~ ~ / W ) N + b.^.^.^.^.^.^.&.R ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W /.",
"= = & e ^ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W ^ N 7 r.W.^.^.^.!.X.W ~ ~ W ~ W ~ ~ ~ ~ ~ ~ / ( ( K p./.",
"= = & e ( W ~ ~ W ~ ~ ~ ~ ~ ~ ~ ~ ~ W ( W C Q &.:.X.| ~ ~ ~ ~ W ~ / ~ ( / ( ~ W E U P 1././.",
"= = + e ^ / / / ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W / ) ^ R Y W W ~ ~ ( / ( / W R Y Y U R ( X.,././././.",
"= = * e ( / ~ / ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W W W ! ( ( ( W W E U P Y W ( X.,.d./././././././././.",
"= = * e ( W ~ ~ ~ ~ W ! ~ W ~ W ~ ( ( / ^ W W U Y P W ( X.,.d./././././././././././././././.",
"8 $ * e ( W ~ ~ ~ ! ( ( ( / ( W R Y Y Y R ( X.>.d./././././././././././././././././././././.",
"/.d . y ^ / / / ( W Y Y P P W ( X.>.d./././././././././././././././././././././././././././.",
"/./.h : ^ R R R W ( X.<.f./././././././././././././././././././././././././././././././././.",
"/././.] _ *.3./././././././././././././././././././././././././././././././././././././././."
};
class EvalMessageBox : public QDialog
{
public:
EvalMessageBox(bool expired)
{
setWindowTitle(QLatin1String(" "));
QString str = expired ? QLatin1String(boilerplate_expired) : qt_eval_string();
str = str.trimmed();
QFrame *border = new QFrame(this);
QLabel *pixmap_label = new QLabel(border);
pixmap_label->setPixmap(QPixmap(qtlogo_eval_xpm));
pixmap_label->setAlignment(Qt::AlignTop);
QLabel *text_label = new QLabel(str, border);
QHBoxLayout *pm_and_text_layout = new QHBoxLayout();
pm_and_text_layout->addWidget(pixmap_label);
pm_and_text_layout->addWidget(text_label);
QVBoxLayout *master_layout = new QVBoxLayout(border);
master_layout->addLayout(pm_and_text_layout);
QVBoxLayout *border_layout = new QVBoxLayout(this);
border_layout->setMargin(0);
border_layout->addWidget(border);
if (expired) {
QPushButton *cmd = new QPushButton(QLatin1String("OK"), border);
cmd->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
cmd->setDefault(true);
QHBoxLayout *button_layout = new QHBoxLayout();
master_layout->addLayout(button_layout);
button_layout->addWidget(cmd);
connect(cmd, SIGNAL(clicked()), this, SLOT(close()));
} else {
border->setFrameShape(QFrame::WinPanel);
border->setFrameShadow(QFrame::Raised);
setParent(parentWidget(), Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
QTimer::singleShot(7000, this, SLOT(close()));
setAttribute(Qt::WA_DeleteOnClose);
setAttribute(Qt::WA_QuitOnClose, false);
}
setFixedSize(sizeHint());
}
};
class QGuiFuriCuri : public QCoreFuriCuri
{
public:
void timerEvent(QTimerEvent *e) {
if (e->timerId() == warn) {
killTimer(warn);
QMessageBox::information(0, QLatin1String("Automatic Timeout"), QLatin1String(will_shutdown_1min));
kill = startTimer(KILL_DELAY);
} else if (e->timerId() == kill) {
killTimer(kill);
QMessageBox::information(0, QLatin1String("Automatic Timeout"), QLatin1String(will_shutdown_now));
qApp->quit();
}
}
};
void qt_gui_eval_init(QCoreApplicationPrivate::Type type)
{
Q_UNUSED(type);
if (!qt_eval_is_supported())
return;
if (qt_eval_is_expired()) {
EvalMessageBox box(true);
box.exec();
::exit(0);
} else {
Q_UNUSED(new QGuiFuriCuri());
}
}
static QString qt_eval_title_prefix()
{
return QLatin1String("[Qt Evaluation] ");
}
QString qt_eval_adapt_window_title(const QString &title)
{
if (!qt_eval_is_supported())
return title;
return qt_eval_title_prefix() + title;
}
void qt_eval_init_widget(QWidget *w)
{
if (!qt_eval_is_supported())
return;
if (w->isTopLevel() && w->windowTitle().isEmpty() && w->windowType() != Qt::Desktop ) {
w->setWindowTitle(QLatin1String(" "));
}
}
#endif
QT_END_NAMESPACE
| [
"[email protected]"
] | |
ef312e979931e73e13d421444306966f69a12185 | 764fcb89efbd73817730aa61d7ef34b3fa087c0c | /regression/LogisticRegression.cpp | cee65f3b2d7a0d7b8700a3100ac33e900c374669 | [] | no_license | gpcr/rvtests | 48dca17e9881195ccd86be5cb6a77e871f185d63 | cb5b60e6da8769fbf6f16a74e1bcd4d4c7e8d83d | refs/heads/master | 2021-01-18T13:46:42.629633 | 2015-07-14T16:47:00 | 2015-07-14T16:47:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,455 | cpp | /////////////////////////////////////////////////////////////////////
// Rewritten by Xiaowei Zhan
//
// Original code is from:
// mach2dat/LogisticRegression.h
// (c) 2008 Yun Li
//
// March 15, 2008
//
#include "LogisticRegression.h"
#include <math.h>
#include "Eigen/Core"
#include <Eigen/Cholesky>
#include "EigenMatrixInterface.h"
// #include "MathSVD.h"
// #include "MathCholesky.h"
// #include "StringHash.h"
// #include "MathStats.h"
#include "gsl/gsl_cdf.h"
#ifdef DEBUG
// for debug usage
void printToFile(Vector& v, String fn, int index) {
String n;
n.printf("%s%d", fn.c_str(), index);
FILE* fp = fopen(n.c_str(), "wt");
for (int i = 0; i < v.Length(); i++) fprintf(fp, "%lf\n", v[i]);
fclose(fp);
}
// for debug usage
void printToFile(Matrix& m, String fn, int index) {
String n;
n.printf("%s%d", fn.c_str(), index);
FILE* fp = fopen(n.c_str(), "wt");
for (int i = 0; i < m.rows; i++) {
for (int j = 0; j < m.cols; j++) {
fprintf(fp, "%lf\t", m[i][j]);
}
fprintf(fp, "\n");
}
fclose(fp);
}
#endif
class LogisticRegression::WorkingData {
public:
Eigen::MatrixXd X;
Eigen::VectorXd r; // residual
Eigen::VectorXd eta; // X * beta
Eigen::VectorXd p;
Eigen::VectorXd V; // p * (1-p)
Eigen::MatrixXd D; // X' V X
Eigen::MatrixXd covB; // (X' V X)^(-1)
Eigen::VectorXd beta;
Eigen::VectorXd delta_beta;
Eigen::VectorXd y;
Eigen::VectorXd succ;
Eigen::VectorXd total;
};
LogisticRegression::LogisticRegression() { this->w = new WorkingData; }
LogisticRegression::~LogisticRegression() {
if (this->w) {
delete this->w;
this->w = NULL;
}
}
double LogisticRegression::GetDeviance() {
// int i1x, i1y, i2x, i2y;
// fprintf(stderr, "min[%d][%d] = %g, max[%d][%d] = %g\n",
// i1x, i1y, w->p.minCoeff(&i1x, &i1y),
// i2x, i2y, w->p.maxCoeff(&i2x, &i2y));
double ll = 0.0;
if (this->w->y.size()) {
ll = ((this->w->y.array() * this->w->p.array().log()) +
((1. - this->w->y.array()) * (1.0 - this->w->p.array()).log())).sum();
} else {
ll = ((this->w->succ.array() * this->w->p.array().log()) +
((this->w->total - this->w->succ).array() *
(1.0 - this->w->p.array()).log())).sum();
}
double deviance = -2.0 * ll;
return deviance;
}
double LogisticRegression::GetDeviance(Matrix& X, Vector& y) {
double ll = 0.0;
for (int i = 0; i < X.rows; i++) {
double t = 0.0;
for (int j = 0; j < X.cols; j++) t += B[j] * X[i][j];
double yhat = 1 / (1 + exp(-t));
ll += y[i] == 1 ? log(yhat) : log(1 - yhat);
}
double deviance = -2.0 * ll;
return deviance;
}
double LogisticRegression::GetDeviance(Matrix& X, Vector& succ, Vector& total) {
double ll = 0.0;
for (int i = 0; i < X.rows; i++) {
double t = 0.0;
for (int j = 0; j < X.cols; j++) t += B[j] * X[i][j];
double yhat = 1 / (1 + exp(-t));
ll += succ[i] * log(yhat) + (total[i] - succ[i]) * log(1 - yhat);
}
double deviance = -2.0 * ll;
return deviance;
}
Vector& LogisticRegression::GetAsyPvalue() {
int numCov = B.Length();
pValue.Dimension(B.Length());
for (int i = 0; i < numCov; i++) {
double Zstat = B[i] * B[i] / (covB[i][i]);
// pValue[i] = ndist(Zstat);
// if (pValue[i] >= 0.5){
// pValue[i] = 2*(1-pValue[i]);
// } else pValue[i] = 2*pValue[i];
pValue[i] = gsl_cdf_chisq_Q(Zstat, 1.0);
}
return (pValue);
}
void LogisticRegression::Reset(Matrix& X) {
int nr = X.rows;
int nc = X.cols;
B.Dimension(nc);
B.Zero();
covB.Dimension(nc, nc);
covB.Zero();
pValue.Dimension(nc);
pValue.Zero();
p.Dimension(nr);
V.Dimension(nr);
p.Zero();
V.Zero();
this->w->X.setZero(nr, nr);
this->w->beta.setZero(nc);
this->w->eta.setZero(nr);
this->w->p.setZero(nr);
this->w->V.setZero(nr);
this->w->D.setZero(nc, nc);
this->w->covB.setZero(nc, nc);
this->w->beta.setZero(nc);
this->w->delta_beta.setZero(nc);
this->w->y.setZero(0);
this->w->succ.setZero(0);
this->w->total.setZero(0);
// W.Dimension(nr);
// W.Zero();
// residuals.Dimension(nr);
// deltaB.Dimension(nc);
// D.Dimension(nc, nc);
// Dinv.Dimension(nc, nc);
// Dtwo.Dimension(nc, nr);
// XtV.Dimension(nc, nr);
}
bool LogisticRegression::FitLogisticModel(Matrix& X, Matrix& y, int rnrounds) {
if (y.cols != 1) {
fprintf(stderr, "%s:%d Use first column of y\n", __FILE__, __LINE__);
}
Vector v(X.rows);
for (int i = 0; i < X.rows; ++i) {
v[i] = y[i][0];
}
return this->FitLogisticModel(X, v, rnrounds);
};
bool LogisticRegression::FitLogisticModel(Matrix& X, Vector& succ,
Vector& total, int nrrounds) {
// make sure nrrounds >= 1
if (nrrounds <= 0) {
return false;
}
this->Reset(X);
G_to_Eigen(X, &this->w->X);
G_to_Eigen(succ, &this->w->succ);
G_to_Eigen(total, &this->w->total);
int rounds = 0;
double lastDeviance, currentDeviance;
const int nSample = this->w->X.rows();
// Newton-Raphson
while (rounds < nrrounds) {
// beta = beta + solve( t(X)%*%diag(p*(1-p)) %*%X) %*% t(X) %*% (Y-p);
this->w->eta = this->w->X * this->w->beta;
this->w->p = ((-this->w->eta.array()).exp() + 1.0).inverse();
this->w->V = this->w->p.array() * (1.0 - this->w->p.array()) *
this->w->total.array();
this->w->D = this->w->X.transpose() * this->w->V.asDiagonal() *
this->w->X; // X' V X
this->w->r =
this->w->X.transpose() *
(this->w->succ.array() - this->w->total.array() * this->w->p.array())
.matrix(); // X' (y-mu)
this->w->delta_beta = this->w->D.eval().llt().solve(this->w->r);
// const double rel = (this->w->D * this->w->delta_beta - this->w->r).norm()
// / this->w->r.norm();
// if ( this->w->r.norm() >0 && rel > 1e-6) {
double norm = (this->w->D * this->w->delta_beta - this->w->r).norm();
if (norm > 1e-3 * nSample) {
// cannot inverse
return false;
}
this->w->beta += this->w->delta_beta;
currentDeviance = this->GetDeviance();
if (rounds > 1 &&
fabs(currentDeviance - lastDeviance) < 1e-3) { // converged!
rounds = 0;
break;
}
if (std::fpclassify(currentDeviance) != FP_NORMAL) {
// probably separation happens
return false;
}
lastDeviance = currentDeviance;
rounds++;
}
if (rounds == nrrounds) {
printf("[ %s:%d ] Not enough iterations!", __FILE__, __LINE__);
return false;
}
this->w->covB = this->w->D.eval().llt().solve(
Eigen::MatrixXd::Identity(this->w->D.rows(), this->w->D.rows()));
Eigen_to_G(this->w->beta, &B);
Eigen_to_G(this->w->covB, &covB);
Eigen_to_G(this->w->p, &p);
Eigen_to_G(this->w->V, &V);
return true;
}
bool LogisticRegression::FitLogisticModel(Matrix& X, Vector& y, int nrrounds) {
this->Reset(X);
G_to_Eigen(X, &this->w->X);
G_to_Eigen(y, &this->w->y);
int rounds = 0;
double lastDeviance, currentDeviance;
// const int nSample = this->w->X.rows();
while (rounds < nrrounds) {
this->w->eta = this->w->X * this->w->beta;
this->w->p = (1.0 + (-this->w->eta.array()).exp()).inverse();
this->w->V = this->w->p.array() * (1.0 - this->w->p.array());
this->w->D = this->w->X.transpose() * this->w->V.asDiagonal() *
this->w->X; // X' V X
this->w->r =
this->w->X.transpose() * (this->w->y - this->w->p); // X' (y-mu)
this->w->delta_beta = this->w->D.eval().llt().solve(this->w->r);
// // output different norms, see which works
// fprintf(stderr, "norm[1] = %g\n", (this->w->D * this->w->delta_beta -
// this->w->r).norm());
// fprintf(stderr, "norm[2] = %s\n", (this->w->D *
// this->w->delta_beta).isApprox(this->w->r, 1e-3) ? "true": "false");
// fprintf(stderr, "norm[2] = %s\n", (this->w->D *
// this->w->delta_beta).isApprox(this->w->r, 1e-6) ? "true": "false");
// const double rel = (this->w->D * this->w->delta_beta - this->w->r).norm() /
// this->w->r.norm();
// fprintf(stderr, "rel = %g, norm1 = %g, norm2 = %g\n", rel, (this->w->D *
// this->w->delta_beta - this->w->r).norm(), this->w->r.norm());
// if ( this->w->r.norm() >0 && rel > 1e-6) {
// // cannot inverse
// // return false;
// }
#if 0
// D = X' V X (positive definite), so cholesky decomposition should always work
double norm = (this->w->D * this->w->delta_beta - this->w->r).norm();
if (norm > 1e-3 * nSample) { // very practical choice...
// cannot inverse
return false;
}
#endif
this->w->beta += this->w->delta_beta;
currentDeviance = this->GetDeviance();
// printf("%lf, %lf, %lf, %s\n", currentDeviance, lastDeviance,
// std::fabs(currentDeviance - lastDeviance),
// (rounds >1 && std::fabs(currentDeviance - lastDeviance) <
// 1e-3)?"true":"false");
if (rounds > 1 &&
std::fabs(currentDeviance - lastDeviance) < 1e-3) { // converged!
rounds = 0;
break;
}
if (std::fpclassify(currentDeviance) != FP_NORMAL) {
// probably separation happens
return false;
}
lastDeviance = currentDeviance;
rounds++;
}
if (rounds == nrrounds) {
printf("[ %s:%d ] Not enough iterations!\n", __FILE__, __LINE__);
printf("%lf, %lf, %lf, %s\n", currentDeviance, lastDeviance,
std::fabs(currentDeviance - lastDeviance),
(rounds > 1 && std::fabs(currentDeviance - lastDeviance) < 1e-3)
? "true"
: "false");
return false;
}
this->w->covB = this->w->D.eval().llt().solve(
Eigen::MatrixXd::Identity(this->w->D.rows(), this->w->D.rows()));
Eigen_to_G(this->w->beta, &B);
Eigen_to_G(this->w->covB, &covB);
Eigen_to_G(this->w->p, &p);
Eigen_to_G(this->w->V, &V);
return true;
}
// result = W - (W Z)*(Z' W Z)^(-1) * (Z' W)
int LogisticRegression::CalculateScaledWeight(Vector& w, Matrix& cov, Matrix* result) {
int n = w.Length();
Eigen::VectorXf W;
Eigen::MatrixXf Z;
// Eigen::MatrixXf W;
G_to_Eigen(w, &W);
G_to_Eigen(cov, &Z);
// W = Wvec.asDiagonal();
Eigen::MatrixXf res;
Eigen::MatrixXf zwz;
zwz.noalias() = (Z.transpose() * W.asDiagonal() * Z).eval().ldlt().solve(Eigen::MatrixXf::Identity(n, n));
Eigen::MatrixXf wz;
wz.noalias() = W.asDiagonal() * Z;
//res = W - (W *Z) * tmp * Z.transpose() * W;
res = - wz * zwz * wz.transpose();
res.diagonal() += W;
Eigen_to_G(res, result);
return 0;
}
| [
"[email protected]"
] | |
18b45525ac11b2896865cdb05fe5a4b6b087e890 | f7b8c37df7794b3ed5a72080d664cd9e2f309241 | /bin/PUReweighter.h | a70423f7c2d9d6226a305ebaa1c6df97e4294a4c | [] | no_license | gdimperi/JECGammaJet | a23eb21ae5e2c0d8dfcd5465f1df6b8d5c97a73d | cbae3c5d6e590157da99f635e3e2f6374698d8da | refs/heads/master | 2020-05-27T11:39:02.986176 | 2014-07-29T09:12:22 | 2014-07-29T09:12:22 | 14,828,560 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 509 | h | #include <string>
#include <TH1.h>
#include <map>
enum class PUProfile : uint8_t {
S6,
S7,
S10
};
class PUReweighter {
public:
PUReweighter(const std::string& dataFile, const std::string& mcFile);
PUReweighter(const std::string& dataFile, PUProfile profile = PUProfile::S10);
~PUReweighter() {
delete puHisto;
}
double weight(float interactions) const;
private:
void initPUProfiles();
TH1* puHisto;
std::map<PUProfile, std::vector<double>> mPUCoefs;
};
| [
"[email protected]"
] | |
b5158c76501d1933542e92aa0bd9c52119cb52fe | 1735fb3c533029b02a89f8f308c2011292a76b36 | /lab6/Cube.h | 3fa6790553f1549693620bcf05a60e7b3f1ac494 | [] | no_license | morozyto/ComputerGraphicsCourse | aa563c44500cf64b2d449d395c3ebf3212294b0e | 61b75a60151d10c8d73b34a8d0414b8ddb4ad763 | refs/heads/master | 2020-03-19T11:48:35.501472 | 2018-06-07T15:48:56 | 2018-06-07T15:48:56 | 136,477,135 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 293 | h | //
// Created by Tony Morozov on 17.05.2018.
//
#ifndef LAB6_CUBE_H
#define LAB6_CUBE_H
#include <GLFW/glfw3.h>
class Cube {
public:
Cube(double size);
void draw();
private:
double size;
void draw_edge(double *edge, double* colour, double* normal);
};
#endif //LAB6_CUBE_H
| [
"[email protected]"
] | |
1c558d2c8f35a499112079d9e3b5cbe60d4f5d93 | 470399ad42a23dc42bcef0a72e45fd1abd7d6ca1 | /source/YoloMouse/Share/Cursor/CursorBindings.cpp | 67406296f7afdb22fff4d3510b8cc723fd6a3192 | [
"Unlicense"
] | permissive | artisth/YoloMouse | 0993998b1adc3fe023add1ee8f2222e3edeeb92b | 982ad68a65f17f3926d713283f73ac858b6820e0 | refs/heads/master | 2022-05-26T17:43:17.692842 | 2019-08-24T01:05:05 | 2019-08-24T01:05:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,157 | cpp | #include <YoloMouse/Share/Cursor/CursorBindings.hpp>
namespace Yolomouse
{
// public
//-------------------------------------------------------------------------
CursorBindings::CursorBindings()
{
}
CursorBindings::~CursorBindings()
{
}
//-------------------------------------------------------------------------
CursorInfo* CursorBindings::GetBinding( Hash hash )
{
return _bindings.Get( hash );
}
const CursorBindings::BindingMap& CursorBindings::GetBindings() const
{
return _bindings;
}
CursorInfo& CursorBindings::GetDefaultBinding()
{
return _default_binding;
}
const CursorInfo& CursorBindings::GetDefaultBinding() const
{
return _default_binding;
}
//-------------------------------------------------------------------------
CursorInfo* CursorBindings::CreateBinding( Hash hash )
{
return &_bindings.Set( hash );
}
//-------------------------------------------------------------------------
Bool CursorBindings::RemoveBinding( Hash hash )
{
return _bindings.Remove( hash );
}
}
| [
"[email protected]"
] | |
72b14e9a494aed21665075ead044f6a4a037b090 | 4f737986d3cee71075e8f9adb5e90cc661333284 | /usaco/ch3/stamps.cpp | 9a51108bdcb8549780d3993b01c68b9d9830682b | [] | no_license | piyushmh/online-judge | ebb977f58ac934439281ef067a9e71e061e8775a | eac7b10922c9aa0022363ee26cd0d2ce81200008 | refs/heads/master | 2020-12-02T16:30:06.100863 | 2014-01-25T23:28:08 | 2014-01-25T23:28:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,934 | cpp | /*
ID: piyushi1
LANG: C++
TASK: stamps
*/
#include <stdio.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<fstream>
#include<string>
#include<sstream>
#include<map>
#include<memory.h>
#include<queue>
#include<set>
#include<assert.h>
#include<time.h>
#include<math.h>
#include<cstdlib>
//#include"graph.h" // https://github.com/codetrash/algorithms/blob/master/algorithms/src/graph/graph.h
using namespace std;
typedef vector<int>::iterator vit;
typedef pair<int,int> pii;
typedef pair<long,long> pll;
typedef vector<int> vi;
typedef long long ll;
#define rep(i,a) repab(i,0,a)
#define repab(i,a,b) repabc(i,a,b,1)
#define repabc(i,a,b,c) for(int i=a;i<b;i+=c)
#define foreach(i,a) for(typeof((a).begin()) i=(a).begin();i!=(a).end();i++)
#define FOR(i,a,b) for(int i = a; i<b; i++)
#define mod(x) ((x>0)?x:(-x))
//#define SS ({int x;scanf("%d",&x);x;})
#define mp make_pair
#define pb push_back
#define fill(a,i) (memset(a,i, sizeof(a)))
inline int SS(){int x; scanf("%d",&x); return x;}
#define EPS 10e-7
#define INF 1000000000
void fileInit(){
#ifdef DEBUG
freopen("input.txt","r", stdin);
#endif
#ifndef DEBUG
freopen("stamps.in","r", stdin);
freopen("stamps.out","w", stdout);
#endif
}
/* Global variable */
#define MAX 2000001
int K,N;
int dp[MAX];
int stamp[55];
/* End */
#define CLOCK
int main(){
#ifdef CLOCK
int start = clock();
#endif
fileInit();
/* Main code begins*/
K = SS();
N = SS();
FOR(i,0,N)
stamp[i] = SS();
//Here is a O(k*N*MAX) solution which goes out of memory and time both - http://ideone.com/xbzmx7
// O(MAX*N)
dp[0] = 0;
FOR(i,1,MAX){
dp[i] = INF;
FOR(j,0,N){
if((i-stamp[j])>=0){
dp[i] = min(dp[i], dp[i-stamp[j]]+1);
}
}
}
int i;
for(i=1; i< MAX; i++)
if(dp[i]>K)
break;
cout<<i-1<<endl;
/* Main code ends*/
#ifdef CLOCK
int end = clock();
cout<<endl<<((float)(end - start))/CLOCKS_PER_SEC;
#endif
return 0;
}
| [
"[email protected]"
] | |
f56b9439af9dd772010bbf2e4ef5d976fefba1e1 | caa8b85c782206db8bb66acb3457acd0e15dfc3d | /Kuplung/kuplung/rendering/methods/RenderingShadowMapping.cpp | c9baafe7447babcbdc1a4ebdca17d063c3880d60 | [
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] | permissive | supudo/Kuplung | 0f2f78b78f0ea14e26bd6e17eda5b90b6b4d76aa | f0e11934fde0675fa531e6dc263bedcc20a5ea1a | refs/heads/master | 2021-12-28T16:34:48.787437 | 2021-12-26T18:24:01 | 2021-12-26T18:24:01 | 49,070,720 | 17 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 54,840 | cpp | //
// RenderingShadowMapping.cpp
// Kuplung
//
// Created by Sergey Petrov on 12/2/15.
// Copyright © 2015 supudo.net. All rights reserved.
//
#include "RenderingShadowMapping.hpp"
#include "kuplung/utilities/imgui/imguizmo/ImGuizmo.h"
#include "kuplung/utilities/stb/stb_image_write.h"
#include <fstream>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/matrix_decompose.hpp>
RenderingShadowMapping::RenderingShadowMapping(ObjectsManager& managerObjects)
: managerObjects(managerObjects) {
this->GLSL_LightSourceNumber_Directional = 0;
this->GLSL_LightSourceNumber_Point = 0;
this->GLSL_LightSourceNumber_Spot = 0;
}
RenderingShadowMapping::~RenderingShadowMapping() {
// if (this->vboTextureAmbient > 0)
// glDeleteBuffers(1, &this->vboTextureAmbient);
// if (this->vboTextureDiffuse > 0)
// glDeleteBuffers(1, &this->vboTextureDiffuse);
// if (this->vboTextureSpecular > 0)
// glDeleteBuffers(1, &this->vboTextureSpecular);
// if (this->vboTextureSpecularExp > 0)
// glDeleteBuffers(1, &this->vboTextureSpecularExp);
// if (this->vboTextureDissolve > 0)
// glDeleteBuffers(1, &this->vboTextureDissolve);
// if (this->vboTextureBump > 0)
// glDeleteBuffers(1, &this->vboTextureBump);
// if (this->vboTextureDisplacement > 0)
// glDeleteBuffers(1, &this->vboTextureDisplacement);
GLint maxColorAttachments = 1;
glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &maxColorAttachments);
GLuint colorAttachment;
GLenum att = GL_COLOR_ATTACHMENT0;
for (colorAttachment = 0; colorAttachment < static_cast<GLuint>(maxColorAttachments); colorAttachment++) {
att += colorAttachment;
GLint param;
GLuint objName;
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, att, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, ¶m);
if (GL_RENDERBUFFER == param) {
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, att, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, ¶m);
objName = reinterpret_cast<GLuint*>(¶m)[0];
glDeleteRenderbuffers(1, &objName);
}
else if (GL_TEXTURE == param) {
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, att, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, ¶m);
objName = reinterpret_cast<GLuint*>(¶m)[0];
glDeleteTextures(1, &objName);
}
}
glDeleteProgram(this->shaderProgram);
glDeleteProgram(this->shaderProgramShadows);
for (size_t i = 0; i < this->mfLights_Directional.size(); i++) {
this->mfLights_Directional[i].reset();
}
for (size_t i = 0; i < this->mfLights_Point.size(); i++) {
this->mfLights_Point[i].reset();
}
for (size_t i = 0; i < this->mfLights_Spot.size(); i++) {
this->mfLights_Spot[i].reset();
}
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
}
bool RenderingShadowMapping::init() {
this->solidLight = std::make_unique<ModelFace_LightSource_Directional>();
this->GLSL_LightSourceNumber_Directional = 8;
this->GLSL_LightSourceNumber_Point = 4;
this->GLSL_LightSourceNumber_Spot = 4;
bool success = true;
success &= this->initShaderProgram();
return success;
}
bool RenderingShadowMapping::initShaderProgram() {
bool success = true;
// vertex shader
std::string shaderPath = Settings::Instance()->appFolder() + "/shaders/model_face.vert";
std::string shaderSourceVertex = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_vertex = shaderSourceVertex.c_str();
// tessellation control shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/model_face.tcs";
std::string shaderSourceTCS = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_tess_control = shaderSourceTCS.c_str();
// tessellation evaluation shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/model_face.tes";
std::string shaderSourceTES = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_tess_eval = shaderSourceTES.c_str();
// geometry shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/model_face.geom";
std::string shaderSourceGeometry = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_geometry = shaderSourceGeometry.c_str();
// fragment shader - parts
std::string shaderSourceFragment;
std::vector<std::string> fragFiles = { "vars", "effects", "lights", "shadow_mapping", "mapping", "misc", "pbr" };
for (size_t i = 0; i < fragFiles.size(); i++) {
shaderPath = Settings::Instance()->appFolder() + "/shaders/model_face_" + fragFiles[i] + ".frag";
shaderSourceFragment += Settings::Instance()->glUtils->readFile(shaderPath.c_str());
}
shaderPath = Settings::Instance()->appFolder() + "/shaders/model_face.frag";
shaderSourceFragment += Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_fragment = shaderSourceFragment.c_str();
this->shaderProgram = glCreateProgram();
bool shaderCompilation = true;
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_VERTEX_SHADER, shader_vertex);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_TESS_CONTROL_SHADER, shader_tess_control);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_TESS_EVALUATION_SHADER, shader_tess_eval);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_GEOMETRY_SHADER, shader_geometry);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_FRAGMENT_SHADER, shader_fragment);
if (!shaderCompilation)
return false;
glLinkProgram(this->shaderProgram);
GLint programSuccess = GL_TRUE;
glGetProgramiv(this->shaderProgram, GL_LINK_STATUS, &programSuccess);
if (programSuccess != GL_TRUE) {
Settings::Instance()->funcDoLog("[RenderingShadowMapping - initShaders] Error linking program " + std::to_string(this->shaderProgram) + "!");
Settings::Instance()->glUtils->printProgramLog(this->shaderProgram);
return success = false;
}
else {
#ifdef Def_Kuplung_OpenGL_4x
glPatchParameteri(GL_PATCH_VERTICES, 3);
#endif
glDetachShader(this->shaderProgramShadows, this->shaderShadowsVertex);
glDetachShader(this->shaderProgramShadows, this->shaderShadowsFragment);
glDeleteShader(this->shaderShadowsVertex);
glDeleteShader(this->shaderShadowsFragment);
this->glGS_GeomDisplacementLocation = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_displacementLocation");
this->glTCS_UseCullFace = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "tcs_UseCullFace");
this->glTCS_UseTessellation = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "tcs_UseTessellation");
this->glTCS_TessellationSubdivision = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "tcs_TessellationSubdivision");
this->glFS_AlphaBlending = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_alpha");
this->glFS_CelShading = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_celShading");
this->glFS_CameraPosition = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_cameraPosition");
this->glVS_IsBorder = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_isBorder");
this->glFS_OutlineColor = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_outlineColor");
this->glFS_UIAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_UIAmbient");
this->glFS_GammaCoeficient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_gammaCoeficient");
this->glFS_planeClose = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_planeClose");
this->glFS_planeFar = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_planeFar");
this->glFS_showDepthColor = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_showDepthColor");
this->glFS_ShadowPass = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_shadowPass");
this->glFS_DebugShadowTexture = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_debugShadowTexture");
this->glVS_MVPMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_MVPMatrix");
this->glFS_MMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_ModelMatrix");
this->glVS_WorldMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_WorldMatrix");
this->glFS_MVMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_MVMatrix");
this->glVS_NormalMatrix = glGetUniformLocation(this->shaderProgram, "vs_normalMatrix");
this->glFS_ScreenResX = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_screenResX");
this->glFS_ScreenResY = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_screenResY");
this->glMaterial_ParallaxMapping = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_userParallaxMapping");
this->glVS_shadowModelMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "shadow_model");
this->glFS_showShadows = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_showShadows");
this->glVS_LightSpaceMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "shadow_lightSpaceMatrix");
this->glFS_SamplerShadowMap = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "sampler_shadowMap");
this->gl_ModelViewSkin = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_modelViewSkin");
this->glFS_solidSkin_materialColor = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_materialColor");
this->solidLight->gl_InUse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.inUse");
this->solidLight->gl_Direction = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.direction");
this->solidLight->gl_Ambient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.ambient");
this->solidLight->gl_Diffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.diffuse");
this->solidLight->gl_Specular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.specular");
this->solidLight->gl_StrengthAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.strengthAmbient");
this->solidLight->gl_StrengthDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.strengthDiffuse");
this->solidLight->gl_StrengthSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.strengthSpecular");
// light - directional
for (unsigned int i = 0; i < this->GLSL_LightSourceNumber_Directional; i++) {
std::unique_ptr<ModelFace_LightSource_Directional> f = std::make_unique<ModelFace_LightSource_Directional>();
f->gl_InUse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].inUse").c_str());
f->gl_Direction = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].direction").c_str());
f->gl_Ambient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].ambient").c_str());
f->gl_Diffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].diffuse").c_str());
f->gl_Specular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].specular").c_str());
f->gl_StrengthAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].strengthAmbient").c_str());
f->gl_StrengthDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].strengthDiffuse").c_str());
f->gl_StrengthSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("directionalLights[" + std::to_string(i) + "].strengthSpecular").c_str());
this->mfLights_Directional.push_back(std::move(f));
}
// light - point
for (unsigned int i = 0; i < this->GLSL_LightSourceNumber_Point; i++) {
std::unique_ptr<ModelFace_LightSource_Point> f = std::make_unique<ModelFace_LightSource_Point>();
f->gl_InUse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].inUse").c_str());
f->gl_Position = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].position").c_str());
f->gl_Constant = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].constant").c_str());
f->gl_Linear = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].linear").c_str());
f->gl_Quadratic = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].quadratic").c_str());
f->gl_Ambient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].ambient").c_str());
f->gl_Diffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].diffuse").c_str());
f->gl_Specular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].specular").c_str());
f->gl_StrengthAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].strengthAmbient").c_str());
f->gl_StrengthDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].strengthDiffuse").c_str());
f->gl_StrengthSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("pointLights[" + std::to_string(i) + "].strengthSpecular").c_str());
this->mfLights_Point.push_back(std::move(f));
}
// light - spot
for (unsigned int i = 0; i < this->GLSL_LightSourceNumber_Spot; i++) {
std::unique_ptr<ModelFace_LightSource_Spot> f = std::make_unique<ModelFace_LightSource_Spot>();
f->gl_InUse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].inUse").c_str());
f->gl_Position = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].position").c_str());
f->gl_Direction = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].direction").c_str());
f->gl_CutOff = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].cutOff").c_str());
f->gl_OuterCutOff = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].outerCutOff").c_str());
f->gl_Constant = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].constant").c_str());
f->gl_Linear = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].linear").c_str());
f->gl_Quadratic = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].quadratic").c_str());
f->gl_Ambient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].ambient").c_str());
f->gl_Diffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].diffuse").c_str());
f->gl_Specular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].specular").c_str());
f->gl_StrengthAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].strengthAmbient").c_str());
f->gl_StrengthDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].strengthDiffuse").c_str());
f->gl_StrengthSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, ("spotLights[" + std::to_string(i) + "].strengthSpecular").c_str());
this->mfLights_Spot.push_back(std::move(f));
}
// material
this->glMaterial_Refraction = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.refraction");
this->glMaterial_SpecularExp = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.specularExp");
this->glMaterial_IlluminationModel = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.illumination_model");
this->glMaterial_HeightScale = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.heightScale");
this->glMaterial_Ambient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.ambient");
this->glMaterial_Diffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.diffuse");
this->glMaterial_Specular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.specular");
this->glMaterial_Emission = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.emission");
this->glMaterial_SamplerAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_ambient");
this->glMaterial_SamplerDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_diffuse");
this->glMaterial_SamplerSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_specular");
this->glMaterial_SamplerSpecularExp = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_specularExp");
this->glMaterial_SamplerDissolve = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_dissolve");
this->glMaterial_SamplerBump = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_bump");
this->glMaterial_SamplerDisplacement = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.sampler_displacement");
this->glMaterial_HasTextureAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_ambient");
this->glMaterial_HasTextureDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_diffuse");
this->glMaterial_HasTextureSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_specular");
this->glMaterial_HasTextureSpecularExp = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_specularExp");
this->glMaterial_HasTextureDissolve = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_dissolve");
this->glMaterial_HasTextureBump = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_bump");
this->glMaterial_HasTextureDisplacement = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "material.has_texture_displacement");
// effects - gaussian blur
this->glEffect_GB_W = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_GBlur.gauss_w");
this->glEffect_GB_Radius = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_GBlur.gauss_radius");
this->glEffect_GB_Mode = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_GBlur.gauss_mode");
// effects - bloom
this->glEffect_Bloom_doBloom = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.doBloom");
this->glEffect_Bloom_WeightA = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.bloom_WeightA");
this->glEffect_Bloom_WeightB = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.bloom_WeightB");
this->glEffect_Bloom_WeightC = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.bloom_WeightC");
this->glEffect_Bloom_WeightD = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.bloom_WeightD");
this->glEffect_Bloom_Vignette = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.bloom_Vignette");
this->glEffect_Bloom_VignetteAtt = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "effect_Bloom.bloom_VignetteAtt");
// effects - tone mapping
this->glEffect_ToneMapping_ACESFilmRec2020 = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_ACESFilmRec2020");
}
success &= this->initShadows();
success &= this->initShadowsDepth();
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
return success;
}
bool RenderingShadowMapping::initShadowsDepth() {
bool success = true;
success &= this->initShadowsDepthShader();
return success;
}
bool RenderingShadowMapping::initShadowsDepthShader() {
bool result = true;
std::string shaderPath = Settings::Instance()->appFolder() + "/shaders/shadows_debug_quad.vert";
std::string shaderSourceVertex = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_vertex = shaderSourceVertex.c_str();
shaderPath = Settings::Instance()->appFolder() + "/shaders/shadows_debug_quad_depth.frag";
std::string shaderSourceFragment = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_fragment = shaderSourceFragment.c_str();
this->shaderProgramDepth = glCreateProgram();
bool shaderCompilation = true;
shaderCompilation &= Settings::Instance()->glUtils->compileAndAttachShader(this->shaderProgramDepth, this->shaderDepthVertex, GL_VERTEX_SHADER, shader_vertex);
shaderCompilation &= Settings::Instance()->glUtils->compileAndAttachShader(this->shaderProgramDepth, this->shaderDepthFragment, GL_FRAGMENT_SHADER, shader_fragment);
if (!shaderCompilation)
return false;
glLinkProgram(this->shaderProgramDepth);
GLint programSuccess = GL_TRUE;
glGetProgramiv(this->shaderProgramDepth, GL_LINK_STATUS, &programSuccess);
if (programSuccess != GL_TRUE) {
Settings::Instance()->funcDoLog("Error linking program " + std::to_string(this->shaderProgramDepth) + "!\n");
Settings::Instance()->glUtils->printProgramLog(this->shaderProgramDepth);
return false;
}
else {
this->glDepth_Plane_Close = Settings::Instance()->glUtils->glGetUniformNoWarning(this->shaderProgramDepth, "near_plane");
this->glDepth_Plane_Far = Settings::Instance()->glUtils->glGetUniformNoWarning(this->shaderProgramDepth, "far_plane");
this->glDepth_SamplerTexture = Settings::Instance()->glUtils->glGetUniformNoWarning(this->shaderProgramDepth, "depthMap");
}
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
return result;
}
bool RenderingShadowMapping::initShadows() {
bool success = true;
success &= this->initShadowsShader();
success &= this->initShadowsBuffers();
return success;
}
bool RenderingShadowMapping::initShadowsShader() {
bool result = true;
std::string shaderPath = Settings::Instance()->appFolder() + "/shaders/shadow_mapping_depth.vert";
std::string shaderSourceVertex = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_vertex = shaderSourceVertex.c_str();
shaderPath = Settings::Instance()->appFolder() + "/shaders/shadow_mapping_depth.frag";
std::string shaderSourceFragment = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_fragment = shaderSourceFragment.c_str();
this->shaderProgramShadows = glCreateProgram();
bool shaderCompilation = true;
shaderCompilation &= Settings::Instance()->glUtils->compileAndAttachShader(this->shaderProgramShadows, this->shaderShadowsVertex, GL_VERTEX_SHADER, shader_vertex);
shaderCompilation &= Settings::Instance()->glUtils->compileAndAttachShader(this->shaderProgramShadows, this->shaderShadowsFragment, GL_FRAGMENT_SHADER, shader_fragment);
if (!shaderCompilation)
return false;
glLinkProgram(this->shaderProgramShadows);
GLint programSuccess = GL_TRUE;
glGetProgramiv(this->shaderProgramShadows, GL_LINK_STATUS, &programSuccess);
if (programSuccess != GL_TRUE) {
Settings::Instance()->funcDoLog("Error linking program " + std::to_string(this->shaderProgramShadows) + "!\n");
Settings::Instance()->glUtils->printProgramLog(this->shaderProgramShadows);
return false;
}
else {
this->glShadow_ModelMatrix = Settings::Instance()->glUtils->glGetUniformNoWarning(this->shaderProgramShadows, "shadow_model");
this->glShadow_LightSpaceMatrix = Settings::Instance()->glUtils->glGetUniformNoWarning(this->shaderProgramShadows, "shadow_lightSpaceMatrix");
}
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
return result;
}
bool RenderingShadowMapping::initShadowsBuffers() {
glGenFramebuffers(1, &this->fboDepthMap);
glGenTextures(1, &this->vboDepthMap);
glBindTexture(GL_TEXTURE_2D, this->vboDepthMap);
const int smapWidth = 1024; //Settings::Instance()->SDL_Window_Width;
const int smapHeight = 1024; //Settings::Instance()->SDL_Window_Height;
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, smapWidth, smapHeight, 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
GLfloat borderColor[] = { 1.0, 1.0, 1.0, 1.0 };
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
glBindFramebuffer(GL_FRAMEBUFFER, this->fboDepthMap);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, this->vboDepthMap, 0);
glDrawBuffer(GL_NONE);
glReadBuffer(GL_NONE);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
Settings::Instance()->funcDoLog("[RenderingShadowMapping] Can't create shadow framebuffer!");
return false;
}
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
return true;
}
void RenderingShadowMapping::render(const std::vector<ModelFaceData*>& meshModelFaces, const int& selectedModel) {
this->matrixProjection = this->managerObjects.matrixProjection;
this->matrixCamera = this->managerObjects.camera->matrixCamera;
this->vecCameraPosition = this->managerObjects.camera->cameraPosition;
this->uiAmbientLight = this->managerObjects.Setting_UIAmbientLight;
this->renderShadows(meshModelFaces, selectedModel);
this->renderModels(false, this->shaderProgram, meshModelFaces, selectedModel);
this->renderDepth();
}
void RenderingShadowMapping::renderShadows(const std::vector<ModelFaceData*>& meshModelFaces, const int& selectedModel) {
if (this->managerObjects.lightSources.size() > 0) {
//glm::vec4 vecpos = this->managerObjects.lightSources[0]->matrixModel[3];
//glm::vec3 lightPos = glm::vec3(vecpos.x, vecpos.y, vecpos.z);
glm::mat4 lightProjection = glm::ortho(-10.0f, 10.0f, -10.0f, 10.0f, this->managerObjects.Setting_PlaneClose, this->managerObjects.Setting_PlaneFar);
// TODO: PVS SA
//glm::mat4 matrixLightView = glm::lookAt(lightPos, this->managerObjects.camera->eyeSettings->View_Center, this->managerObjects.camera->eyeSettings->View_Up);
glm::mat4 matrixLightView = glm::translate(this->managerObjects.camera->matrixCamera, glm::vec3(-2, 2, 2));
this->matrixLightSpace = lightProjection * matrixLightView;
glUseProgram(this->shaderProgramShadows);
glViewport(0, 0, Settings::Instance()->SDL_DrawableSize_Width, Settings::Instance()->SDL_DrawableSize_Height);
glBindFramebuffer(GL_FRAMEBUFFER, this->fboDepthMap);
glClear(GL_DEPTH_BUFFER_BIT);
this->renderModels(true, this->shaderProgramShadows, meshModelFaces, selectedModel);
// for (size_t i=0; i<meshModelFaces.size(); i++) {
// ModelFaceData *mfd = meshModelFaces[i];
// glm::mat4 matrixModel = glm::mat4(1.0);
// matrixModel *= this->managerObjects.grid->matrixModel;
// // scale
// matrixModel = glm::scale(matrixModel, glm::vec3(mfd->scaleX->point, mfd->scaleY->point, mfd->scaleZ->point));
// // translate
// matrixModel = glm::translate(matrixModel, glm::vec3(mfd->positionX->point, mfd->positionY->point, mfd->positionZ->point));
// // rotate
// matrixModel = glm::translate(matrixModel, glm::vec3(0, 0, 0));
// matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateX->point), glm::vec3(1, 0, 0));
// matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateY->point), glm::vec3(0, 1, 0));
// matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateZ->point), glm::vec3(0, 0, 1));
// matrixModel = glm::translate(matrixModel, glm::vec3(0, 0, 0));
// glUniformMatrix4fv(this->glShadow_LightSpaceMatrix, 1, GL_FALSE, glm::value_ptr(this->matrixLightSpace));
// glUniformMatrix4fv(this->glShadow_ModelMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
// mfd->renderModel(true);
// }
glUseProgram(0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
}
void RenderingShadowMapping::renderDepth() {
glUseProgram(this->shaderProgramDepth);
glUniform1f(this->glDepth_Plane_Close, this->managerObjects.Setting_PlaneClose);
glUniform1f(this->glDepth_Plane_Far, this->managerObjects.Setting_PlaneFar);
glUniform1i(this->glDepth_SamplerTexture, 0);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, this->vboDepthMap);
if (this->depthQuadVAO == 0) {
const GLfloat quadVertices[] = {
// Positions // Texture Coords
-1.0f, 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
};
// Setup plane VAO
glGenVertexArrays(1, &this->depthQuadVAO);
glGenBuffers(1, &this->depthQuadVBO);
glBindVertexArray(this->depthQuadVAO);
glBindBuffer(GL_ARRAY_BUFFER, this->depthQuadVBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(quadVertices), &quadVertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), (GLvoid*)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), (GLvoid*)(3 * sizeof(GLfloat)));
}
glBindVertexArray(this->depthQuadVAO);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glBindVertexArray(0);
glUseProgram(0);
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
}
void RenderingShadowMapping::renderModels(const bool& isShadowPass, const GLuint& sProgram, const std::vector<ModelFaceData*>& meshModelFaces, const int& selectedModel) {
glUseProgram(sProgram);
int selectedModelID = -1;
for (size_t i = 0; i < meshModelFaces.size(); i++) {
ModelFaceData* mfd = meshModelFaces[i];
if (mfd->getOptionsSelected())
selectedModelID = static_cast<int>(i);
glm::mat4 matrixModel = glm::mat4(1.0);
matrixModel *= this->managerObjects.grid->matrixModel;
// scale
matrixModel = glm::scale(matrixModel, glm::vec3(mfd->scaleX->point, mfd->scaleY->point, mfd->scaleZ->point));
// translate
matrixModel = glm::translate(matrixModel, glm::vec3(mfd->positionX->point, mfd->positionY->point, mfd->positionZ->point));
// rotate
matrixModel = glm::translate(matrixModel, glm::vec3(0, 0, 0));
matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateX->point), glm::vec3(1, 0, 0));
matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateY->point), glm::vec3(0, 1, 0));
matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateZ->point), glm::vec3(0, 0, 1));
matrixModel = glm::translate(matrixModel, glm::vec3(0, 0, 0));
// if (this->managerObjects.lightSources.size() > 0) {
// this->managerObjects.matrixProjection = this->matrixLightSpace;
// this->matrixProjection = this->matrixLightSpace;
// glm::vec3 lightPos = glm::vec3(this->managerObjects.lightSources[0]->matrixModel[3].x, this->managerObjects.lightSources[0]->matrixModel[3].y, this->managerObjects.lightSources[0]->matrixModel[3].z);
// matrixModel = glm::lookAt(lightPos, glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, -1.0f, 0.0f));
// }
mfd->matrixGrid = this->managerObjects.grid->matrixModel;
mfd->matrixProjection = this->matrixProjection;
mfd->matrixCamera = this->matrixCamera;
mfd->matrixModel = matrixModel;
mfd->Setting_ModelViewSkin = this->managerObjects.viewModelSkin;
mfd->lightSources = this->managerObjects.lightSources;
mfd->setOptionsFOV(this->managerObjects.Setting_FOV);
mfd->setOptionsOutlineColor(this->managerObjects.Setting_OutlineColor);
mfd->setOptionsOutlineThickness(this->managerObjects.Setting_OutlineThickness);
mfd->setOptionsSelected(static_cast<int>(i) == selectedModel);
glm::mat4 mvpMatrix = this->matrixProjection * this->matrixCamera * matrixModel;
if (isShadowPass)
mvpMatrix = this->matrixLightSpace;
glUniformMatrix4fv(this->glVS_MVPMatrix, 1, GL_FALSE, glm::value_ptr(mvpMatrix));
if (isShadowPass) {
glUniformMatrix4fv(this->glVS_shadowModelMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glUniformMatrix4fv(this->glShadow_ModelMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glUniformMatrix4fv(this->glShadow_LightSpaceMatrix, 1, GL_FALSE, glm::value_ptr(this->matrixLightSpace));
}
glUniformMatrix4fv(this->glFS_MMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glm::mat4 matrixModelView = this->matrixCamera * matrixModel;
glUniformMatrix4fv(this->glFS_MVMatrix, 1, GL_FALSE, glm::value_ptr(matrixModelView));
glm::mat3 matrixNormal = glm::inverseTranspose(glm::mat3(this->matrixCamera * matrixModel));
glUniformMatrix3fv(this->glVS_NormalMatrix, 1, GL_FALSE, glm::value_ptr(matrixNormal));
glm::mat4 matrixWorld = matrixModel;
glUniformMatrix4fv(this->glVS_WorldMatrix, 1, GL_FALSE, glm::value_ptr(matrixWorld));
// blending
if (mfd->meshModel.ModelMaterial.Transparency < 1.0f || mfd->Setting_Alpha < 1.0f) {
glDisable(GL_DEPTH_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
if (mfd->meshModel.ModelMaterial.Transparency < 1.0f)
glUniform1f(this->glFS_AlphaBlending, mfd->meshModel.ModelMaterial.Transparency);
else
glUniform1f(this->glFS_AlphaBlending, mfd->Setting_Alpha);
}
else {
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glDisable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glUniform1f(this->glFS_AlphaBlending, 1.0);
}
// shadow pass
glUniform1i(this->glFS_ShadowPass, isShadowPass);
// depth color
float pc = 1.0f;
if (this->managerObjects.Setting_PlaneClose >= 1.0f)
pc = this->managerObjects.Setting_PlaneClose;
glUniform1f(this->glFS_planeClose, pc);
glUniform1f(this->glFS_planeFar, this->managerObjects.Setting_PlaneFar / 100.0f);
glUniform1i(this->glFS_showDepthColor, this->managerObjects.Setting_Rendering_Depth);
glUniform1i(this->glFS_DebugShadowTexture, this->managerObjects.Setting_DebugShadowTexture);
// tessellation
glUniform1i(this->glTCS_UseCullFace, mfd->Setting_UseCullFace);
glUniform1i(this->glTCS_UseTessellation, mfd->Setting_UseTessellation);
glUniform1i(this->glTCS_TessellationSubdivision, mfd->Setting_TessellationSubdivision);
// cel-shading
glUniform1i(this->glFS_CelShading, mfd->Setting_CelShading);
// camera position
glUniform3f(this->glFS_CameraPosition, this->vecCameraPosition.x, this->vecCameraPosition.y, this->vecCameraPosition.z);
// screen size
// glUniform1f(this->glFS_ScreenResX, Settings::Instance()->SDL_Window_Width);
// glUniform1f(this->glFS_ScreenResY, Settings::Instance()->SDL_Window_Height);
glUniform1f(this->glFS_ScreenResX, Settings::Instance()->SDL_DrawableSize_Width);
glUniform1f(this->glFS_ScreenResY, Settings::Instance()->SDL_DrawableSize_Height);
// Outline color
glm::vec4 outline_color = mfd->getOptionsOutlineColor();
glUniform3f(this->glFS_OutlineColor, outline_color.r, outline_color.g, outline_color.b);
// ambient color for editor
glUniform3f(this->glFS_UIAmbient, this->uiAmbientLight.r, this->uiAmbientLight.g, this->uiAmbientLight.b);
// geometry shader displacement
glUniform3f(this->glGS_GeomDisplacementLocation, mfd->displaceX->point, mfd->displaceY->point, mfd->displaceZ->point);
// mapping
glUniform1i(this->glMaterial_ParallaxMapping, mfd->Setting_ParallaxMapping);
// gamma correction
glUniform1f(this->glFS_GammaCoeficient, this->managerObjects.Setting_GammaCoeficient);
// render skin
glUniform1i(this->gl_ModelViewSkin, mfd->Setting_ModelViewSkin);
glUniform3f(this->glFS_solidSkin_materialColor, mfd->solidLightSkin_MaterialColor.r, mfd->solidLightSkin_MaterialColor.g, mfd->solidLightSkin_MaterialColor.b);
glUniform1i(this->solidLight->gl_InUse, 1);
glUniform3f(this->solidLight->gl_Direction, this->managerObjects.SolidLight_Direction.x, this->managerObjects.SolidLight_Direction.y, this->managerObjects.SolidLight_Direction.z);
glUniform3f(this->solidLight->gl_Ambient, this->managerObjects.SolidLight_Ambient.r, this->managerObjects.SolidLight_Ambient.g, this->managerObjects.SolidLight_Ambient.b);
glUniform3f(this->solidLight->gl_Diffuse, this->managerObjects.SolidLight_Diffuse.r, this->managerObjects.SolidLight_Diffuse.g, this->managerObjects.SolidLight_Diffuse.b);
glUniform3f(this->solidLight->gl_Specular, this->managerObjects.SolidLight_Specular.r, this->managerObjects.SolidLight_Specular.g, this->managerObjects.SolidLight_Specular.b);
glUniform1f(this->solidLight->gl_StrengthAmbient, this->managerObjects.SolidLight_Ambient_Strength);
glUniform1f(this->solidLight->gl_StrengthDiffuse, this->managerObjects.SolidLight_Diffuse_Strength);
glUniform1f(this->solidLight->gl_StrengthSpecular, this->managerObjects.SolidLight_Specular_Strength);
// lights
unsigned int lightsCount_Directional = 0;
unsigned int lightsCount_Point = 0;
unsigned int lightsCount_Spot = 0;
for (size_t j = 0; j < mfd->lightSources.size(); j++) {
Light* light = mfd->lightSources[j];
assert(light->type == LightSourceType_Directional || light->type == LightSourceType_Point || light->type == LightSourceType_Spot);
switch (light->type) {
case LightSourceType_Directional: {
if (lightsCount_Directional < this->GLSL_LightSourceNumber_Directional) {
const ModelFace_LightSource_Directional* f = this->mfLights_Directional[lightsCount_Directional].get();
glUniform1i(f->gl_InUse, 1);
// light
glUniform3f(f->gl_Direction, light->positionX->point, light->positionY->point, light->positionZ->point);
// color
const glm::vec3 c_ambient = light->ambient->color;
const glm::vec3 c_diffuse = light->diffuse->color;
const glm::vec3 c_specular = light->specular->color;
glUniform3f(f->gl_Ambient, c_ambient.r, c_ambient.g, c_ambient.b);
glUniform3f(f->gl_Diffuse, c_diffuse.r, c_diffuse.g, c_diffuse.b);
glUniform3f(f->gl_Specular, c_specular.r, c_specular.g, c_specular.b);
// light factors
glUniform1f(f->gl_StrengthAmbient, light->ambient->strength);
glUniform1f(f->gl_StrengthDiffuse, light->diffuse->strength);
glUniform1f(f->gl_StrengthSpecular, light->specular->strength);
lightsCount_Directional += 1;
}
break;
}
case LightSourceType_Point: {
if (lightsCount_Point < this->GLSL_LightSourceNumber_Point) {
const ModelFace_LightSource_Point* f = this->mfLights_Point[lightsCount_Point].get();
glUniform1i(f->gl_InUse, 1);
// light
glm::vec3 vec_pos = glm::vec3(light->matrixModel[3].x, light->matrixModel[3].y, light->matrixModel[3].z);
glUniform3f(f->gl_Position, vec_pos.x, vec_pos.y, vec_pos.z);
// factors
glUniform1f(f->gl_Constant, light->lConstant->point);
glUniform1f(f->gl_Linear, light->lLinear->point);
glUniform1f(f->gl_Quadratic, light->lQuadratic->point);
// color
glUniform3f(f->gl_Ambient, light->ambient->color.r, light->ambient->color.g, light->ambient->color.b);
glUniform3f(f->gl_Diffuse, light->diffuse->color.r, light->diffuse->color.g, light->diffuse->color.b);
glUniform3f(f->gl_Specular, light->specular->color.r, light->specular->color.g, light->specular->color.b);
// light factors
glUniform1f(f->gl_StrengthAmbient, light->ambient->strength);
glUniform1f(f->gl_StrengthDiffuse, light->diffuse->strength);
glUniform1f(f->gl_StrengthSpecular, light->specular->strength);
lightsCount_Point += 1;
}
break;
}
case LightSourceType_Spot: {
if (lightsCount_Spot < this->GLSL_LightSourceNumber_Spot) {
const ModelFace_LightSource_Spot* f = this->mfLights_Spot[lightsCount_Spot].get();
glUniform1i(f->gl_InUse, 1);
// light
glUniform3f(f->gl_Direction, light->positionX->point, light->positionY->point, light->positionZ->point);
glUniform3f(f->gl_Position, light->matrixModel[3].x, light->matrixModel[3].y, light->matrixModel[3].z);
// cutoff
glUniform1f(f->gl_CutOff, glm::cos(glm::radians(light->lCutOff->point)));
glUniform1f(f->gl_OuterCutOff, glm::cos(glm::radians(light->lOuterCutOff->point)));
// factors
glUniform1f(f->gl_Constant, light->lConstant->point);
glUniform1f(f->gl_Linear, light->lLinear->point);
glUniform1f(f->gl_Quadratic, light->lQuadratic->point);
// color
glUniform3f(f->gl_Ambient, light->ambient->color.r, light->ambient->color.g, light->ambient->color.b);
glUniform3f(f->gl_Diffuse, light->diffuse->color.r, light->diffuse->color.g, light->diffuse->color.b);
glUniform3f(f->gl_Specular, light->specular->color.r, light->specular->color.g, light->specular->color.b);
// light factors
glUniform1f(f->gl_StrengthAmbient, light->ambient->strength);
glUniform1f(f->gl_StrengthDiffuse, light->diffuse->strength);
glUniform1f(f->gl_StrengthSpecular, light->specular->strength);
lightsCount_Spot += 1;
}
break;
}
}
}
for (unsigned int j = lightsCount_Directional; j < this->GLSL_LightSourceNumber_Directional; j++) {
glUniform1i(this->mfLights_Directional[j]->gl_InUse, 0);
}
for (unsigned int j = lightsCount_Point; j < this->GLSL_LightSourceNumber_Point; j++) {
glUniform1i(this->mfLights_Point[j]->gl_InUse, 0);
}
for (unsigned int j = lightsCount_Spot; j < this->GLSL_LightSourceNumber_Spot; j++) {
glUniform1i(this->mfLights_Spot[j]->gl_InUse, 0);
}
// material
glUniform1f(this->glMaterial_Refraction, mfd->Setting_MaterialRefraction->point);
glUniform1f(this->glMaterial_SpecularExp, mfd->Setting_MaterialSpecularExp->point);
glUniform1i(this->glMaterial_IlluminationModel, static_cast<GLint>(mfd->materialIlluminationModel));
glUniform1f(this->glMaterial_HeightScale, mfd->displacementHeightScale->point);
const glm::vec3 c_Ambient = mfd->materialAmbient->color;
const glm::vec3 c_Diffuse = mfd->materialDiffuse->color;
const glm::vec3 c_Specular = mfd->materialSpecular->color;
const glm::vec3 c_Emission = mfd->materialEmission->color;
glUniform3f(this->glMaterial_Ambient, c_Ambient.r, c_Ambient.g, c_Ambient.b);
glUniform3f(this->glMaterial_Diffuse, c_Diffuse.r, c_Diffuse.g, c_Diffuse.b);
glUniform3f(this->glMaterial_Specular, c_Specular.r, c_Specular.g, c_Specular.b);
glUniform3f(this->glMaterial_Emission, c_Emission.r, c_Emission.g, c_Emission.b);
if (mfd->vboTextureAmbient > 0 && mfd->meshModel.ModelMaterial.TextureAmbient.UseTexture) {
glUniform1i(this->glMaterial_HasTextureAmbient, 1);
glUniform1i(this->glMaterial_SamplerAmbient, 0);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureAmbient);
}
else
glUniform1i(this->glMaterial_HasTextureAmbient, 0);
if (mfd->vboTextureDiffuse > 0 && mfd->meshModel.ModelMaterial.TextureDiffuse.UseTexture) {
glUniform1i(this->glMaterial_HasTextureDiffuse, 1);
glUniform1i(this->glMaterial_SamplerDiffuse, 1);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureDiffuse);
}
else
glUniform1i(this->glMaterial_HasTextureDiffuse, 0);
if (mfd->vboTextureSpecular > 0 && mfd->meshModel.ModelMaterial.TextureSpecular.UseTexture) {
glUniform1i(this->glMaterial_HasTextureSpecular, 1);
glUniform1i(this->glMaterial_SamplerSpecular, 2);
glActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureSpecular);
}
else
glUniform1i(this->glMaterial_HasTextureSpecular, 0);
if (mfd->vboTextureSpecularExp > 0 && mfd->meshModel.ModelMaterial.TextureSpecularExp.UseTexture) {
glUniform1i(this->glMaterial_HasTextureSpecularExp, 1);
glUniform1i(this->glMaterial_SamplerSpecularExp, 3);
glActiveTexture(GL_TEXTURE3);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureSpecularExp);
}
else
glUniform1i(this->glMaterial_HasTextureSpecularExp, 0);
if (mfd->vboTextureDissolve > 0 && mfd->meshModel.ModelMaterial.TextureDissolve.UseTexture) {
glUniform1i(this->glMaterial_HasTextureDissolve, 1);
glUniform1i(this->glMaterial_SamplerDissolve, 4);
glActiveTexture(GL_TEXTURE4);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureDissolve);
}
else
glUniform1i(this->glMaterial_HasTextureDissolve, 0);
if (mfd->vboTextureBump > 0 && mfd->meshModel.ModelMaterial.TextureBump.UseTexture) {
glUniform1i(this->glMaterial_HasTextureBump, 1);
glUniform1i(this->glMaterial_SamplerBump, 5);
glActiveTexture(GL_TEXTURE5);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureBump);
}
else
glUniform1i(this->glMaterial_HasTextureBump, 0);
if (mfd->vboTextureDisplacement > 0 && mfd->meshModel.ModelMaterial.TextureDisplacement.UseTexture) {
glUniform1i(this->glMaterial_HasTextureDisplacement, 1);
glUniform1i(this->glMaterial_SamplerDisplacement, 6);
glActiveTexture(GL_TEXTURE6);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureDisplacement);
}
else
glUniform1i(this->glMaterial_HasTextureDisplacement, 0);
// effects - gaussian blur
glUniform1i(this->glEffect_GB_Mode, mfd->Effect_GBlur_Mode - 1);
glUniform1f(this->glEffect_GB_W, mfd->Effect_GBlur_Width->point);
glUniform1f(this->glEffect_GB_Radius, mfd->Effect_GBlur_Radius->point);
// effects - bloom
// TODO: Bloom effect
glUniform1i(this->glEffect_Bloom_doBloom, mfd->Effect_Bloom_doBloom);
glUniform1f(this->glEffect_Bloom_WeightA, mfd->Effect_Bloom_WeightA);
glUniform1f(this->glEffect_Bloom_WeightB, mfd->Effect_Bloom_WeightB);
glUniform1f(this->glEffect_Bloom_WeightC, mfd->Effect_Bloom_WeightC);
glUniform1f(this->glEffect_Bloom_WeightD, mfd->Effect_Bloom_WeightD);
glUniform1f(this->glEffect_Bloom_Vignette, mfd->Effect_Bloom_Vignette);
glUniform1f(this->glEffect_Bloom_VignetteAtt, mfd->Effect_Bloom_VignetteAtt);
// effects - tone mapping
glUniform1i(this->glEffect_ToneMapping_ACESFilmRec2020, mfd->Effect_ToneMapping_ACESFilmRec2020);
// border
glUniform1f(this->glVS_IsBorder, 0.0);
glm::mat4 mtxModel;
// if (mfd->getOptionsSelected()) {
// glDisable(GL_DEPTH_TEST);
// glUniform1f(this->glVS_IsBorder, 1.0);
// mtxModel = glm::scale(matrixModel, glm::vec3(mfd->getOptionsOutlineThickness()));
// mvpMatrix = this->matrixProjection * this->matrixCamera * mtxModel;
// glUniformMatrix4fv(this->glVS_MVPMatrix, 1, GL_FALSE, glm::value_ptr(mvpMatrix));
// glUniformMatrix4fv(this->glFS_MMatrix, 1, GL_FALSE, glm::value_ptr(mtxModel));
// mfd->renderModel(true);
// glEnable(GL_DEPTH_TEST);
// }
// model draw
glUniform1f(this->glVS_IsBorder, 0.0);
mtxModel = glm::scale(matrixModel, glm::vec3(1.0, 1.0, 1.0));
glm::mat4 mvpMatrixDraw = this->matrixProjection * this->matrixCamera * mtxModel;
glUniformMatrix4fv(this->glVS_MVPMatrix, 1, GL_FALSE, glm::value_ptr(mvpMatrixDraw));
glUniformMatrix4fv(this->glFS_MMatrix, 1, GL_FALSE, glm::value_ptr(mtxModel));
// shadows
glUniform1i(this->glFS_showShadows, mfd->Setting_ShowShadows);
glUniformMatrix4fv(this->glShadow_ModelMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glUniformMatrix4fv(this->glShadow_LightSpaceMatrix, 1, GL_FALSE, glm::value_ptr(this->matrixLightSpace));
glUniformMatrix4fv(this->glVS_shadowModelMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glUniformMatrix4fv(this->glVS_LightSpaceMatrix, 1, GL_FALSE, glm::value_ptr(this->matrixLightSpace));
if (!isShadowPass && this->vboDepthMap > 0) {
glUniform1i(this->glFS_SamplerShadowMap, 7);
glActiveTexture(GL_TEXTURE7);
glBindTexture(GL_TEXTURE_2D, this->vboDepthMap);
}
mfd->vertexSphereVisible = this->managerObjects.Setting_VertexSphere_Visible;
mfd->vertexSphereRadius = this->managerObjects.Setting_VertexSphere_Radius;
mfd->vertexSphereSegments = this->managerObjects.Setting_VertexSphere_Segments;
mfd->vertexSphereColor = this->managerObjects.Setting_VertexSphere_Color;
mfd->vertexSphereIsSphere = this->managerObjects.Setting_VertexSphere_IsSphere;
mfd->vertexSphereShowWireframes = this->managerObjects.Setting_VertexSphere_ShowWireframes;
mfd->renderModel(true);
// edit mode wireframe
if (mfd->getOptionsSelected() && mfd->Setting_EditMode) {
mfd->Setting_Wireframe = true;
matrixModel = glm::scale(matrixModel, glm::vec3(mfd->scaleX->point + 0.01f, mfd->scaleY->point + 0.01f, mfd->scaleZ->point + 0.01f));
mvpMatrix = this->matrixProjection * this->matrixCamera * matrixModel;
matrixModelView = this->matrixCamera * matrixModel;
matrixNormal = glm::inverseTranspose(glm::mat3(this->matrixCamera * matrixModel));
matrixWorld = matrixModel;
glUniformMatrix4fv(this->glVS_MVPMatrix, 1, GL_FALSE, glm::value_ptr(mvpMatrix));
glUniformMatrix4fv(this->glFS_MMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glUniformMatrix4fv(this->glFS_MVMatrix, 1, GL_FALSE, glm::value_ptr(matrixModelView));
glUniformMatrix3fv(this->glVS_NormalMatrix, 1, GL_FALSE, glm::value_ptr(matrixNormal));
glUniformMatrix4fv(this->glVS_WorldMatrix, 1, GL_FALSE, glm::value_ptr(matrixWorld));
glUniform1i(this->gl_ModelViewSkin, ViewModelSkin_Solid);
//TODO: put in settings
glUniform3f(this->glFS_solidSkin_materialColor, 1.0f, 0.522f, 0.0f);
mfd->renderModel(true);
mfd->Setting_Wireframe = false;
}
}
// edit mode
if (this->managerObjects.VertexEditorMode != glm::vec3(0.0) && selectedModelID > -1) {
ImGuizmo::Enable(true);
ModelFaceData* mfd = meshModelFaces[selectedModelID];
glm::vec4 v0 = glm::vec4(this->managerObjects.VertexEditorMode, 1.0);
v0 = mfd->matrixModel * v0;
glm::mat4 matrixVertex = mfd->matrixModel;
matrixVertex[3] = v0;
glm::mat4 mtx = glm::mat4(1.0);
ImGuiIO& io = ImGui::GetIO();
ImGuizmo::SetRect(0, 0, io.DisplaySize.x, io.DisplaySize.y);
ImGuizmo::Manipulate(glm::value_ptr(this->managerObjects.camera->matrixCamera), glm::value_ptr(this->managerObjects.matrixProjection), ImGuizmo::TRANSLATE, ImGuizmo::WORLD, glm::value_ptr(matrixVertex), glm::value_ptr(mtx));
glm::vec3 scale;
glm::quat rotation;
glm::vec3 translation;
glm::vec3 skew;
glm::vec4 perspective;
glm::decompose(mtx, scale, rotation, translation, skew, perspective);
// glm::vec3 v = this->managerObjects.VertexEditorMode;
this->managerObjects.VertexEditorMode.x += translation.x;
this->managerObjects.VertexEditorMode.y += -1.0f * translation.y;
this->managerObjects.VertexEditorMode.z += translation.z;
if (this->managerObjects.Setting_GeometryEditMode == GeometryEditMode_Vertex)
mfd->meshModel.vertices[static_cast<size_t>(this->managerObjects.VertexEditorModeID)] = this->managerObjects.VertexEditorMode;
else if (this->managerObjects.Setting_GeometryEditMode == GeometryEditMode_Line) {
}
// else if (this->managerObjects.Setting_GeometryEditMode == GeometryEditMode_Face) {
// for (size_t i = 0; i < mfd->meshModel.vertices.size(); i++) {
// if (mfd->meshModel.vertices[i] == v)
// mfd->meshModel.vertices[i] = v;
// }
// }
// TODO(supudo): not good for drawing... reuploading the buffers again .... should find a better way - immediate draw, GL_STREAM_DRAW?
mfd->initBuffers();
mfd->Setting_EditMode = true;
}
glUseProgram(0);
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
}
| [
"[email protected]"
] | |
1e5b25e6e3c0b99a2213a361466046a309d89862 | 79ace29944e0ebfe344ead990b88e924a84aa86d | /miosix/arch/cortexM7_stm32f7/stm32f746zg_nucleo/interfaces-impl/bsp.cpp | 4255b80daaaf96a636c756f851239917c22a2d73 | [] | no_license | skyward-er/miosix-kernel | 9f75670c1c24db4e25cc9e118283491e7386d32e | 7ef13296f6bfdb70b74f54e2f49db848530e126a | refs/heads/master | 2023-08-30T20:05:11.514787 | 2023-08-29T14:09:13 | 2023-08-29T14:09:13 | 128,632,628 | 2 | 0 | null | 2018-04-08T11:09:05 | 2018-04-08T11:09:05 | null | UTF-8 | C++ | false | false | 4,420 | cpp | /***************************************************************************
* Copyright (C) 2018 by Terraneo Federico *
* *
* 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. *
* *
* As a special exception, if other files instantiate templates or use *
* macros or inline functions from this file, or you compile this file *
* and link it with other works to produce a work based on this file, *
* this file does not by itself cause the resulting work to be covered *
* by the GNU General Public License. However the source code for this *
* file must still be made available in accordance with the GNU General *
* Public License. This exception does not invalidate any other reasons *
* why a work based on this file might be covered by the GNU General *
* Public License. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/> *
***************************************************************************/
/***********************************************************************
* bsp.cpp Part of the Miosix Embedded OS.
* Board support package, this file initializes hardware.
************************************************************************/
#include "interfaces/bsp.h"
#include <inttypes.h>
#include <sys/ioctl.h>
#include <cstdlib>
#include "board_settings.h"
#include "config/miosix_settings.h"
#include "drivers/sd_stm32f2_f4_f7.h"
#include "drivers/serial.h"
#include "filesystem/console/console_device.h"
#include "filesystem/file_access.h"
#include "interfaces/arch_registers.h"
#include "interfaces/delays.h"
#include "interfaces/portability.h"
#include "kernel/kernel.h"
#include "kernel/logging.h"
#include "kernel/sync.h"
namespace miosix {
//
// Initialization
//
void IRQbspInit() {
// Enable all gpios
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN |
RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN |
RCC_AHB1ENR_GPIOEEN | RCC_AHB1ENR_GPIOFEN |
RCC_AHB1ENR_GPIOHEN;
RCC_SYNC();
GPIOA->OSPEEDR = 0xaaaaaaaa; // Default to 50MHz speed for all GPIOS
GPIOB->OSPEEDR = 0xaaaaaaaa;
GPIOC->OSPEEDR = 0xaaaaaaaa;
GPIOD->OSPEEDR = 0xaaaaaaaa;
GPIOE->OSPEEDR = 0xaaaaaaaa;
GPIOF->OSPEEDR = 0xaaaaaaaa;
GPIOH->OSPEEDR = 0xaaaaaaaa;
userLed1::mode(Mode::OUTPUT);
userLed2::mode(Mode::OUTPUT);
userLed3::mode(Mode::OUTPUT);
userBtn::mode(Mode::INPUT);
ledOn();
delayMs(100);
ledOff();
auto tx = Gpio<GPIOD_BASE, 8>::getPin();
tx.alternateFunction(7);
auto rx = Gpio<GPIOD_BASE, 9>::getPin();
rx.alternateFunction(7);
DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(
new STM32Serial(3, defaultSerialSpeed, tx, rx)));
}
void bspInit2() {
#ifdef WITH_FILESYSTEM
basicFilesystemSetup(SDIODriver::instance());
#endif // WITH_FILESYSTEM
}
//
// Shutdown and reboot
//
void shutdown() {
ioctl(STDOUT_FILENO, IOCTL_SYNC, 0);
#ifdef WITH_FILESYSTEM
FilesystemManager::instance().umountAll();
#endif // WITH_FILESYSTEM
disableInterrupts();
for (;;)
;
}
void reboot() {
ioctl(STDOUT_FILENO, IOCTL_SYNC, 0);
#ifdef WITH_FILESYSTEM
FilesystemManager::instance().umountAll();
#endif // WITH_FILESYSTEM
disableInterrupts();
miosix_private::IRQsystemReboot();
}
} // namespace miosix
| [
"[email protected]"
] | |
120ab33b8a3ca77677a7fda7bf3efe0a18aeeb95 | 1942a0d16bd48962e72aa21fad8d034fa9521a6c | /aws-cpp-sdk-clouddirectory/source/model/CreateDirectoryRequest.cpp | d5e8b5543c548209d6f92feceafd47b23979404a | [
"Apache-2.0",
"JSON",
"MIT"
] | permissive | yecol/aws-sdk-cpp | 1aff09a21cfe618e272c2c06d358cfa0fb07cecf | 0b1ea31e593d23b5db49ee39d0a11e5b98ab991e | refs/heads/master | 2021-01-20T02:53:53.557861 | 2018-02-11T11:14:58 | 2018-02-11T11:14:58 | 83,822,910 | 0 | 1 | null | 2017-03-03T17:17:00 | 2017-03-03T17:17:00 | null | UTF-8 | C++ | false | false | 1,523 | cpp | /*
* Copyright 2010-2016 Amazon.com, Inc. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 <aws/clouddirectory/model/CreateDirectoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudDirectory::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDirectoryRequest::CreateDirectoryRequest() :
m_nameHasBeenSet(false),
m_schemaArnHasBeenSet(false)
{
}
Aws::String CreateDirectoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload.WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDirectoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_schemaArnHasBeenSet)
{
ss << m_schemaArn;
headers.insert(Aws::Http::HeaderValuePair("x-amz-data-partition", ss.str()));
ss.str("");
}
return headers;
}
| [
"[email protected]"
] | |
0e5ffa70c4415e947658f3b32ef988a8e5d1d64a | 98b6c7cedf3ab2b09f16b854b70741475e07ab64 | /www.cplusplus.com-20180131/reference/unordered_set/unordered_multiset/bucket/bucket.cpp | 834e699c89a250725becf79e7016de64d911ea2b | [] | no_license | yull2310/book-code | 71ef42766acb81dde89ce4ae4eb13d1d61b20c65 | 86a3e5bddbc845f33c5f163c44e74966b8bfdde6 | refs/heads/master | 2023-03-17T16:35:40.741611 | 2019-03-05T08:38:51 | 2019-03-05T08:38:51 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 321 | cpp | // unordered_multiset::bucket
#include <iostream>
#include <string>
#include <unordered_set>
int main ()
{
std::unordered_multiset<std::string> myums =
{"water","sand","ice","water"};
for (const std::string& x: myums) {
std::cout << x << " is in bucket #" << myums.bucket(x) << std::endl;
}
return 0;
}
| [
"[email protected]"
] | |
a44b960c9548c2edda0e775d185032df1b342c89 | 457e4f3a594fcbfd4bc4926b76f2cabde6438e32 | /src/strat_z_vr_scout.h | 29e7d270e34f97cbb351d50ddf4115f21dc2efd6 | [] | no_license | tscmoo/tsc-bwai | a968f3621356ab47adc708079a3ca0cf9f86892a | 6c93fd0877da55b101c8b48a8ac5d7bce60561f6 | refs/heads/master | 2021-01-10T21:10:41.293712 | 2015-11-21T23:34:23 | 2015-11-21T23:34:23 | 28,252,875 | 61 | 8 | null | null | null | null | UTF-8 | C++ | false | false | 1,478 | h |
struct strat_z_vr_scout : strat_z_base {
virtual void init() override {
sleep_time = 8;
scouting::scout_supply = 20;
}
virtual bool tick() override {
if (opening_state == 0) {
if (my_resource_depots.size() != 1 || my_workers.size() != 4) opening_state = -1;
else {
build::add_build_task(0.0, unit_types::drone);
build::add_build_task(0.0, unit_types::drone);
build::add_build_task(0.0, unit_types::drone);
build::add_build_task(0.0, unit_types::drone);
build::add_build_task(0.0, unit_types::drone);
build::add_build_task(0.0, unit_types::overlord);
++opening_state;
}
} else if (opening_state != -1) {
if (bo_all_done()) {
opening_state = -1;
}
}
int scouts = 0;
if (start_locations.size() <= 2) {
if (current_used_total_supply >= 7) scouts = 1;
} else {
if (current_used_total_supply >= 6) scouts = 1;
if (current_used_total_supply >= 8) scouts = 2;
}
if ((int)scouting::all_scouts.size() < scouts) {
unit*scout_unit = get_best_score(my_workers, [&](unit*u) {
if (u->controller->action != unit_controller::action_gather) return std::numeric_limits<double>::infinity();
return 0.0;
}, std::numeric_limits<double>::infinity());
if (scout_unit) scouting::add_scout(scout_unit);
}
if (!players::opponent_player->random) {
rm_all_scouts();
}
return !players::opponent_player->random;
}
virtual bool build(buildpred::state&st) override {
return false;
}
};
| [
"[email protected]"
] | |
b53f0f2d47db0d54b92ad8ff3a7dce4f183ad115 | 04d489e9cfac15d77143db91d737ba9ca446d49d | /tests/playermock.hpp | d024e12fd64318c86af8367ee6a2da49b800c141 | [] | no_license | Super-Teachers/final_example | cc3ae649783e209a90d7e6bf345bf8b345053a8e | 8fca0a6d7942a394acc2f1c43f4c95d80af7fe5d | refs/heads/master | 2021-01-25T00:38:15.626379 | 2017-06-18T12:17:13 | 2017-06-18T12:17:13 | 94,684,480 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 386 | hpp | #ifndef PLAYERMOCK_HPP_FPEWSD05
#define PLAYERMOCK_HPP_FPEWSD05
#include <gmock/gmock.h>
#include "playerinterface.hpp"
struct PlayerMock : public PlayerInterface {
MOCK_METHOD1(play, void(const std::string&));
MOCK_METHOD0(stop, void());
MOCK_METHOD0(initialize, bool());
MOCK_METHOD0(dispatch, void());
};
#endif /* end of include guard: PLAYERMOCK_HPP_FPEWSD05 */
| [
"[email protected]"
] | |
c55404c88b63b87f62826724d899f8e4dbc35b5b | 62d96bb01f6442c342944ab6391970a3556c3b12 | /Code Source/Metodos.h | a018d67c7bffe3198a007cbb716996cce0b17c73 | [] | no_license | SergioEGGit/Project_Scrabble_Game_SEG | 8cc33029f74c03aee0a892ecba88a76c691d30e4 | 31973a47b882970807d05889142688de5cf366b4 | refs/heads/master | 2023-07-17T06:51:15.713485 | 2021-08-16T17:30:33 | 2021-08-16T17:30:33 | 247,125,747 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 3,969 | h | //------------------------------------------------------------------------------
#ifndef MetodosH
#define MetodosH
//------------------------------Librerias---------------------------------------
#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <string>
#include <windows.h>
#include <fstream>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include <cstring>
#include <DiccionarioLDC.h>
#include <FichasCola.h>
#include <RecorridosLS.h>
#include <JugadoresABB.h>
#include <FichasLS.h>
#include <JugadoresFichasLD.h>
#include <MatrizDispersa.h>
#include <ScoreBoardLS.h>
using namespace std;
//------------------------------------------------------------------------------
#endif
//-------------------------Definición Variables---------------------------------
namespace Variables
{
extern int AnchoPantalla;
extern int AltoPantalla;
extern int OpcionMenu;
extern int OpcionJugar;
extern int OpcionReporte;
extern string RutaArchivo;
extern int DimensionTablero;
extern string LetraColaFichas;
extern int PunteoColaFichas;
extern string NombreJugador;
extern int ContadorArbol;
extern string CadenaArbol;
extern string Jugador1;
extern string Jugador2;
extern bool TerminarJuego;
extern int ContadorReccorridos;
extern int OpcionOpcionesJuego;
extern bool ColaVacia;
extern string NombreReporte;
};
//--------------------------Definición Métodos----------------------------------
//-----------------------------------Varios----------------------------------
void Color(int Background, int Text);
void Fullscreen();
void Resolucion();
void SepararCadenaEliminar(string CadenaEliminar);
//------------------------------Menú------------------------------------
void MenuPrincipal();
void MenuJugar();
void MenuReporte();
void MenuOpcionesJuego();
//-----------------------------Marcos-----------------------------------
void gotoxy(int x, int y);
void MarcoMenu(int Col1, int Col2, int Fil1, int Fil2);
void MarcoArchivo(int Col1, int Col2, int Fil1, int Fil2);
void MarcoJugar(int Col1, int Col2, int Fil1, int Fil2);
void MarcoReportes(int Col1, int Col2, int Fil1, int Fil2);
void MarcoSalir(int Col1, int Col2, int Fil1, int Fil2);
//---------------------------Leer Archivos------------------------------
void LeerArchivo(MatrizDispersa<string> &MatrizDispersaMD, string RutaArchivo, ListaDLDC &ListaDiccionario, ListaFichas &ListaFichasDT);
//-------------------------Generar Fichas-------------------------------
void GenerarFichas(ColaFichas &Cabeza, ColaFichas &Cola);
//-----------------------------Jugar------------------------------------
void AgregarJugadores();
void LimparMatriz(MatrizDispersa<string> &MatrizDispersaMD, ListaFichas &ListaFichasTD);
void Jugar(ListaFichas &ListaFichasTD, ListaDLDC &ListaDiccionario, ScoreBoardLista &ScoreBoard, ArbolABB &Arbol, ListaLS &Lista, ListaLDJ &CabezaJugador1, ListaLDJ &CabezaJugador2, ListaLDJ &ColaJugador1, ListaLDJ &ColaJugador2, ColaFichas &FichasColaCabeza, ColaFichas &FichasColaCola, MatrizDispersa<string> &MatrizDispersaMD, int Contador);
//-----------------------------Reportes---------------------------------
void ReporteDiccionario(ListaDLDC &ListaDiccionario);
void ReporteColaFichas(ColaFichas &Cabeza);
void ReporteArbolPreOrden(ListaLS &Lista);
void ReporteArbolInOrden(ListaLS &Lista);
void ReporteArbolPostOrden(ListaLS &Lista);
void ReporteArbolBinarioBusqueda(ArbolABB &Arbol);
void ReporteJugadoresFichas1Reportes(ListaLDJ &Lista);
void ReporteJugadoresFichas1Juego(ListaLDJ &Lista);
void ReporteJugadoresFichas2Reportes(ListaLDJ &Lista);
void ReporteJugadoresFichas2Juego(ListaLDJ &Lista);
void ReporteListaSimpleOrdenadaScoreBoard(ScoreBoardLista &ScoreBoard);
void ReporteHistorialPuntajes(ScoreBoardLista &ScoreBoard, string Nombre);
| [
"[email protected]"
] | |
27a0c9e01e76df99b2da32a0b03c5edcac3c2f10 | 9d80b2ea287933af57f19d9e3ea422341f1576b8 | /include/hx/QuickVec.h | d0cfef0460379abf2813385acb2a10f6d2298653 | [] | no_license | larsiusprime/hxcpp | d9329246f24c74c45a516b53f93adf89bd902bf6 | c62d762d53b3294998792841f2eff72eac4ce384 | refs/heads/master | 2021-01-21T09:14:33.965140 | 2018-05-21T16:43:41 | 2018-05-21T16:43:41 | 29,712,187 | 0 | 0 | null | 2015-01-23T02:19:27 | 2015-01-23T02:19:27 | null | UTF-8 | C++ | false | false | 4,011 | h | #ifndef HX_QUICKVEC_INCLUDED
#define HX_QUICKVEC_INCLUDED
#include <stdlib.h>
namespace hx
{
template<typename T>
struct QuickVec
{
int mAlloc;
int mSize;
T *mPtr;
QuickVec() : mPtr(0), mAlloc(0), mSize(0) { }
~QuickVec()
{
if (mPtr)
free(mPtr);
}
inline void push(const T &inT)
{
if (mSize+1>mAlloc)
{
mAlloc = 10 + (mSize*3/2);
mPtr = (T *)realloc(mPtr,sizeof(T)*mAlloc);
}
mPtr[mSize++]=inT;
}
void setSize(int inSize)
{
if (inSize>mAlloc)
{
mAlloc = inSize;
mPtr = (T *)realloc(mPtr,sizeof(T)*mAlloc);
}
mSize = inSize;
}
bool safeReserveExtra(int inN)
{
int want = mSize + inN;
if (want>mAlloc)
{
int wantAlloc = 10 + (mSize*3/2);
if (wantAlloc<want)
wantAlloc = want;
T *newBuffer = (T *)malloc( sizeof(T)*wantAlloc );
if (!newBuffer)
return false;
mAlloc = wantAlloc;
if (mPtr)
{
memcpy(newBuffer, mPtr, mSize*sizeof(T));
free(mPtr);
}
mPtr = newBuffer;
}
return true;
}
inline void pop_back() { --mSize; }
inline T &back() { return mPtr[mSize-1]; }
inline T pop()
{
return mPtr[--mSize];
}
inline void qerase(int inPos)
{
--mSize;
mPtr[inPos] = mPtr[mSize];
}
inline void erase(int inPos)
{
--mSize;
if (mSize>inPos)
memmove(mPtr+inPos, mPtr+inPos+1, (mSize-inPos)*sizeof(T));
}
void zero() { memset(mPtr,0,mSize*sizeof(T) ); }
inline void qerase_val(T inVal)
{
for(int i=0;i<mSize;i++)
if (mPtr[i]==inVal)
{
--mSize;
mPtr[i] = mPtr[mSize];
return;
}
}
inline bool some_left() { return mSize; }
inline bool empty() const { return !mSize; }
inline void clear() { mSize = 0; }
inline int next()
{
if (mSize+1>=mAlloc)
{
mAlloc = 10 + (mSize*3/2);
mPtr = (T *)realloc(mPtr,sizeof(T)*mAlloc);
}
return mSize++;
}
inline int size() const { return mSize; }
inline T &operator[](int inIndex) { return mPtr[inIndex]; }
inline const T &operator[](int inIndex) const { return mPtr[inIndex]; }
private:
QuickVec(const QuickVec<T> &);
void operator =(const QuickVec<T> &);
};
template<typename T>
class QuickDeque
{
struct Slab
{
T mElems[1024];
};
QuickVec<Slab *> mSpare;
QuickVec<Slab *> mActive;
int mHeadPos;
int mTailPos;
Slab *mHead;
Slab *mTail;
public:
QuickDeque()
{
mHead = mTail = 0;
mHeadPos = 1024;
mTailPos = 1024;
}
~QuickDeque()
{
for(int i=0;i<mSpare.size();i++)
delete mSpare[i];
for(int i=0;i<mActive.size();i++)
delete mActive[i];
delete mHead;
if (mTail!=mHead)
delete mTail;
}
inline void push(T inObj)
{
if (mHeadPos<1024)
{
mHead->mElems[mHeadPos++] = inObj;
return;
}
if (mHead != mTail)
mActive.push(mHead);
mHead = mSpare.empty() ? new Slab : mSpare.pop();
mHead->mElems[0] = inObj;
mHeadPos = 1;
}
inline bool some_left() { return mHead!=mTail || mHeadPos!=mTailPos; }
inline T pop()
{
if (mTailPos<1024)
return mTail->mElems[mTailPos++];
if (mTail)
mSpare.push(mTail);
if (mActive.empty())
{
mTail = mHead;
}
else
{
mTail = mActive[0];
mActive.erase(0);
}
mTailPos = 1;
return mTail->mElems[0];
}
private:
QuickDeque(const QuickDeque<T> &);
void operator=(const QuickDeque<T> &);
};
} // end namespace hx
#endif
| [
"[email protected]"
] | |
2969a77e5300bac5245759bbeefcb08ac17095aa | 99224dbbfcd7558a31851c862fb8c1721703f338 | /exercises/sources/exercise09-2/02561-08_09/main-08_09.cpp | f6303a596c47af2d9e1faaf666d407f23f623b8b | [] | no_license | balabanmetin/DTU-02561-OpenGL-ComputerGraphics | 2b4c94d20443908171beab6f92c7a9762598f906 | f7d723cdc722552a0a27c647d526ae6cab1e6bb2 | refs/heads/master | 2021-01-23T08:56:27.394096 | 2014-01-18T13:05:48 | 2014-01-18T13:05:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,433 | cpp | // 02561-08-01 / 02561-09-01
#include <iostream>
#include <string>
#include <algorithm>
#include <GL/glew.h>
#include <GL/freeglut.h>
#include "Angel.h"
#include "ObjLoader.h"
#include "TextureLoader.h"
using namespace std;
using namespace Angel;
#define RADIAN_TO_DEGREE 57.2957795f
int WINDOW_WIDTH = 500;
int WINDOW_HEIGHT = 500;
int SHADOW_MAP_SIZE = 1024;
struct Shader {
GLuint shaderProgram;
GLuint projectionUniform,
modelUniform,
viewUniform,
lightViewProjectionUniform,
normalMatUniform,
textureUniform,
texture2Uniform,
pointLightPosUniform,
colorUniform,
clipPlaneUniform;
GLuint positionAttribute,
normalAttribute,
textureCoordinateAttribute;
};
struct MeshObject {
Shader shader;
GLuint vertexArrayObject;
vector<int> indices;
vec4 color;
MeshObject():color(1,1,1,1){}
MeshObject(Shader shader, GLuint vertexArrayObject, vector<int> indices)
:shader(shader),vertexArrayObject(vertexArrayObject),indices(indices),color(1,1,1,1){
}
};
vec3 teapotPosition;
vec3 lightPosition(0,300,0);
int shadow_type = 1; // 0 Flattening, 1 projected
bool draw_mirror = 1; // draw mirror
bool freeze = false;
bool debugShadowMap = false;
struct Vertex {
vec3 position;
vec3 normal;
vec2 textureCoordinate;
};
MeshObject planeObject;
MeshObject teapotObject;
float teapotBoundingRadius;
GLuint planeTextureId,
shadowmapTextureId;
GLuint frameBufferObject;
// spherical coordinates of camera position (angles in radian)
float sphericalPolarAngle = 45;
float sphericalElevationAngle = 45;
float sphericalRadius = 600;
vec2 mousePos;
vec4 clipPlane(0,-1,0,0);
// forward declaration
void loadShader();
void display();
vec3 sphericalToCartesian(float polarAngle, float elevationAngle, float radius);
GLuint createVertexBuffer(Vertex* vertices, int vertexCount);
string getFrameBufferStatusString(GLenum code);
void drawMeshObject(mat4 & projection, mat4 & model, mat4 & view, mat4 & lightViewProjection, MeshObject& meshObject);
mat4 getLightProjection() {
float d=length(teapotPosition-lightPosition);
// cout << d << " " << p << endl;
float theta = asin(teapotBoundingRadius/d)*RADIAN_TO_DEGREE;
// cout << theta << endl;
mat4 perspective = Perspective(2*theta, 1, 0.1, 400. );
return perspective;
}
mat4 getLightView() {
return LookAt(lightPosition, teapotPosition, vec3(0,1,0));
}
mat4 getLightViewProjection(){
return getLightProjection() * getLightView();
}
void updateProjShadowTexture() {
// todo bind framebuffer, set viewport to shadowmap and clear to white
glBindFramebuffer(GL_FRAMEBUFFER, frameBufferObject);
glViewport(0, 0, SHADOW_MAP_SIZE, SHADOW_MAP_SIZE);
glClearColor(1.0, 1.0, 1.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
vec4 old_color_of_teapot = teapotObject.color;
teapotObject.color=vec4(.0 , .0 , .0 , 1.0);
mat4 projection = getLightProjection();
mat4 view = getLightView();
mat4 lightViewProjection = getLightViewProjection();
mat4 model = Translate(teapotPosition);
drawMeshObject(projection, model, view, lightViewProjection, teapotObject);
// todo render black teapot
teapotObject.color=old_color_of_teapot;
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
// todo release framebuffer, setviewport to window
}
float computeRadius(vector<vec3> position) {
float maxRadius = 0;
for (int i=0;i<position.size();i++){
maxRadius = max(maxRadius,length(position[i]));
}
return maxRadius;
}
GLuint buildPlaneVertexBuffer() {
const int planeSize = 4;
Vertex planeData[planeSize] = {
{ vec3(-200, 0.0, -200 ), vec3(0,1,0), vec2(0,0) },
{ vec3(-200, 0.0, 200 ), vec3(0,1,0), vec2(0,1) },
{ vec3( 200, 0.0, 200 ), vec3(0,1,0), vec2(1,1) },
{ vec3( 200, 0.0, -200 ), vec3(0,1,0), vec2(1,0) }
};
return createVertexBuffer(planeData, planeSize);
}
vector<int> buildPlaneIndices() {
vector<int> res;
res.push_back(0);
res.push_back(1);
res.push_back(2);
res.push_back(0);
res.push_back(2);
res.push_back(3);
return res;
}
GLuint buildTexture(int width, int height) {
GLuint textureId;
// generate texture
glGenTextures(1, &textureId);
glBindTexture(GL_TEXTURE_2D, textureId);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
GLuint internalFormat = GL_RED;
GLuint format = GL_RED;
GLuint storageType = GL_UNSIGNED_BYTE;
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height,
0, format, storageType, NULL);
glBindTexture(GL_TEXTURE_2D, 0);
return textureId;
}
GLuint buildFrameBufferObject(int width, int height, GLuint textureId) {
GLuint framebufferObjectId,
renderBufferId;
glGenFramebuffers(1, &framebufferObjectId);
glGenRenderbuffers(1, &renderBufferId);
glBindRenderbuffer(GL_RENDERBUFFER, renderBufferId);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, width, height);
glBindFramebuffer(GL_FRAMEBUFFER, framebufferObjectId);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureId, 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, renderBufferId);
GLenum frameBufferRes = glCheckFramebufferStatus(GL_FRAMEBUFFER);
cout << getFrameBufferStatusString(frameBufferRes)<<endl;
glBindFramebuffer(GL_FRAMEBUFFER, 0);
return framebufferObjectId;
}
GLuint createVertexArrayObject(GLuint vertexBuffer, const Shader & shader) {
glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
GLuint vertexArrayObject;
glGenVertexArrays(1, &vertexArrayObject);
glBindVertexArray(vertexArrayObject);
glEnableVertexAttribArray(shader.positionAttribute);
glVertexAttribPointer(shader.positionAttribute, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (const GLvoid *)0);
if (shader.normalAttribute != GL_INVALID_INDEX) {
glEnableVertexAttribArray(shader.normalAttribute);
glVertexAttribPointer(shader.normalAttribute, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (const GLvoid *)sizeof(vec3));
}
if (shader.textureCoordinateAttribute != GL_INVALID_INDEX) {
glEnableVertexAttribArray(shader.textureCoordinateAttribute);
glVertexAttribPointer(shader.textureCoordinateAttribute, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (const GLvoid *)(sizeof(vec3)*2));
}
return vertexArrayObject;
}
GLuint createVertexBuffer(Vertex* vertices, int vertexCount) {
GLuint vertexBuffer;
glGenBuffers(1, &vertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(Vertex), vertices, GL_STATIC_DRAW);
return vertexBuffer;
}
GLuint loadMesh(char *filename, vector<int> &indices, float scale = 1.0){
vector<vec3> position;
vector<vec3> normal;
vector<vec2> uv;
loadObject(filename,position,indices,normal,uv, scale);
Vertex* vertexData = new Vertex[position.size()];
teapotBoundingRadius = computeRadius(position);
for (int i = 0; i < position.size(); i++) {
vertexData[i].position = position[i];
if (normal.size() > 0){
vertexData[i].normal = normal[i];
}
}
GLuint vertexBuffer = createVertexBuffer(vertexData, position.size());
delete [] vertexData;
return vertexBuffer;
}
Shader loadShader(const char* vertShader, const char* fragShader) {
Shader shader;
shader.shaderProgram = InitShader(vertShader, fragShader, "fragColor");
// get uniform locations
shader.projectionUniform = glGetUniformLocation(shader.shaderProgram, "projection");
shader.viewUniform = glGetUniformLocation(shader.shaderProgram, "view");
shader.modelUniform = glGetUniformLocation(shader.shaderProgram, "model");
shader.lightViewProjectionUniform = glGetUniformLocation(shader.shaderProgram, "lightViewProjection");
shader.textureUniform = glGetUniformLocation(shader.shaderProgram, "texture1");
shader.texture2Uniform = glGetUniformLocation(shader.shaderProgram, "texture2");
shader.pointLightPosUniform = glGetUniformLocation(shader.shaderProgram, "pointLightPos");
shader.colorUniform = glGetUniformLocation(shader.shaderProgram, "color");
shader.normalMatUniform = glGetUniformLocation(shader.shaderProgram, "normalMat");
shader.clipPlaneUniform = glGetUniformLocation(shader.shaderProgram, "clipPlane");
// get attribute locations
shader.positionAttribute = glGetAttribLocation(shader.shaderProgram, "position");
shader.normalAttribute = glGetAttribLocation(shader.shaderProgram, "normal");
shader.textureCoordinateAttribute = glGetAttribLocation(shader.shaderProgram, "textureCoordinate");
return shader;
}
void drawMeshObject(mat4 & projection, mat4 & model,mat4 & view, mat4 & lightViewProjection, MeshObject& meshObject) {
glUseProgram(meshObject.shader.shaderProgram);
if (meshObject.shader.projectionUniform != GL_INVALID_INDEX){
glUniformMatrix4fv(meshObject.shader.projectionUniform, 1, GL_TRUE, projection);
}
if (meshObject.shader.modelUniform != GL_INVALID_INDEX){
glUniformMatrix4fv(meshObject.shader.modelUniform, 1, GL_TRUE, model);
}
if (meshObject.shader.viewUniform != GL_INVALID_INDEX){
glUniformMatrix4fv(meshObject.shader.viewUniform, 1, GL_TRUE, view);
}
if (meshObject.shader.lightViewProjectionUniform!= GL_INVALID_INDEX){
glUniformMatrix4fv(meshObject.shader.lightViewProjectionUniform, 1, GL_TRUE, lightViewProjection);
}
if (meshObject.shader.normalMatUniform != GL_INVALID_INDEX) {
mat3 normalMat = Normal(model);
glUniformMatrix3fv(meshObject.shader.normalMatUniform, 1, GL_TRUE, normalMat);
}
if (meshObject.shader.pointLightPosUniform != GL_INVALID_INDEX) {
glUniform3fv(meshObject.shader.pointLightPosUniform, 1, lightPosition);
}
if (meshObject.shader.colorUniform != GL_INVALID_INDEX){
glUniform4fv(meshObject.shader.colorUniform, 1, meshObject.color);
}
if (meshObject.shader.clipPlaneUniform != GL_INVALID_INDEX){
glUniform4fv(meshObject.shader.clipPlaneUniform, 1, clipPlane);
}
if (meshObject.shader.textureUniform != GL_INVALID_INDEX){
// bind texture to texture slot 0 and set the uniform value
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, debugShadowMap?shadowmapTextureId:planeTextureId);
glUniform1i(meshObject.shader.textureUniform, 0);
}
if (meshObject.shader.texture2Uniform != GL_INVALID_INDEX){
// bind texture to texture slot 0 and set the uniform value
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, shadowmapTextureId);
glUniform1i(meshObject.shader.texture2Uniform, 1);
}
glBindVertexArray(meshObject.vertexArrayObject);
glDrawElements(GL_TRIANGLES, meshObject.indices.size(), GL_UNSIGNED_INT, &meshObject.indices[0]);
}
void drawMirror(mat4 &projection, mat4 &view) {
// todo implement
// glEnable (GL_BLEND);
// glBlendFunc(GL_ONE_MINUS_DST_ALPHA,GL_DST_ALPHA);
mat4 model = Scale (1, -1, 1) * Translate(teapotPosition);
lightPosition.y = -lightPosition.y;
teapotObject.color-=0.5;
drawMeshObject(projection, model, view, getLightViewProjection(),teapotObject);
teapotObject.color+=0.5;
lightPosition.y = -lightPosition.y;
// glDisable(GL_BLEND);
}
void drawPlane(mat4 projection, mat4 view) {
if (draw_mirror == 1) {
drawMirror(projection, view);
}
glEnable (GL_BLEND);
glBlendFunc(GL_ONE,GL_ONE);
mat4 model;
drawMeshObject(projection, model, view, getLightViewProjection(), planeObject);
glDisable(GL_BLEND);
//glDisable(GL_BLEND);
}
void display() {
// update teapot position
static int counter = 42;
teapotPosition.x = sin(counter / 180.0f * M_PI) * 120 + cos(counter / 70.0f * M_PI) * 50;
teapotPosition.y = cos(counter / 180.0f * M_PI) * 40 + sin(counter / 70.0f * M_PI) * 40;
teapotPosition.z = cos(counter / 180.0f * M_PI) * 120 + cos(counter / 70.0f * M_PI) * 50;
if (!freeze){
counter++;
}
if (shadow_type == 1) {
updateProjShadowTexture();
}
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
mat4 projection = Perspective(60,WINDOW_WIDTH/(float)WINDOW_HEIGHT,1.5,1000);
vec4 eye = sphericalToCartesian(sphericalPolarAngle, sphericalElevationAngle, sphericalRadius);
vec4 at(0,0,0,1);
vec4 up(0,1,0,0);
mat4 view = LookAt(eye, at, up);
drawPlane(projection, view);
mat4 model = Translate(teapotPosition);
drawMeshObject(projection, model, view, getLightViewProjection(),teapotObject);
glutSwapBuffers();
Angel::CheckError();
}
void reshape(int W, int H) {
WINDOW_WIDTH = W;
WINDOW_HEIGHT = H;
glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
}
void mouse(int button, int state, int x, int y) {
if (state==GLUT_DOWN) {
mousePos = vec2(x,y);
}
}
void mouseMovement(int x, int y){
float rotationSpeed = 0.01f;
vec2 newMousePos = vec2(x,y);
vec2 mousePosDelta = mousePos - newMousePos;
sphericalPolarAngle += mousePosDelta.x*rotationSpeed;
float rotate89Degrees = 89*DegreesToRadians;
sphericalElevationAngle = min(rotate89Degrees,max(-rotate89Degrees,sphericalElevationAngle + mousePosDelta.y*rotationSpeed));
mousePos = vec2(x,y);
}
void initPlaneTexture(){
const char* imagepath = "textures/xamp23.bmp";
unsigned int width, height;
unsigned char * data = loadBMPRaw(imagepath, width, height);
// Create one OpenGL texture
glGenTextures(1, &planeTextureId);
// "Bind" the newly created texture : all future texture functions will modify this texture
glBindTexture(GL_TEXTURE_2D, planeTextureId);
// Give the image to OpenGL
glTexImage2D(GL_TEXTURE_2D, 0,GL_RGB, width, height, 0, GL_BGR, GL_UNSIGNED_BYTE, data);
// Trilinear filtering.
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glGenerateMipmap(GL_TEXTURE_2D);
delete[] data;
}
void initMeshAndShader(){
vector<int> indices;
GLuint teapotVertexBuffer = loadMesh("meshes/teapot.obj", indices);
Shader shader = loadShader("diffuse.vert", "diffuse.frag");
GLuint vertexArrayObject = createVertexArrayObject(teapotVertexBuffer, shader);
teapotObject = MeshObject(
shader,
vertexArrayObject,
indices
);
Shader planeShader = loadShader("plane.vert", "plane.frag");
GLuint planeVertexBuffer = buildPlaneVertexBuffer();
planeObject = MeshObject(
planeShader,
createVertexArrayObject(planeVertexBuffer, planeShader),
buildPlaneIndices()
);
}
void keyPress(unsigned char key, int x, int y) {
switch (key){
case '\033':
exit(0);
break;
case 'f':
freeze = !freeze;
break;
case 'd':
debugShadowMap = !debugShadowMap;
break;
case 'm':
draw_mirror = !draw_mirror;
break;
}
}
void animate(int x) {
glutPostRedisplay();
glutTimerFunc(10, animate, 0);
}
void printMenu(){
// print key menu
cout << "Key shortcuts"<<endl;
cout << "f - toggle freeze"<<endl;
cout << "m - toggle mirror"<<endl;
cout << endl<<"Use mouse drag to rotate"<<endl;
}
int main(int argc, char* argv[]) {
glutInit(&argc, argv);
glutInitContextVersion(3, 1);
glutInitContextFlags(GLUT_FORWARD_COMPATIBLE);
glutInitContextProfile(GLUT_CORE_PROFILE);
glutSetOption(
GLUT_ACTION_ON_WINDOW_CLOSE,
GLUT_ACTION_GLUTMAINLOOP_RETURNS
);
glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_DEPTH|GLUT_STENCIL|GLUT_3_2_CORE_PROFILE);
glutCreateWindow("02561-08_09");
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutMotionFunc(mouseMovement);
glutTimerFunc(10, animate, 0);
glutKeyboardFunc(keyPress);
glutReshapeWindow(WINDOW_WIDTH, WINDOW_HEIGHT);
Angel::InitOpenGL();
printMenu();
shadowmapTextureId = buildTexture(SHADOW_MAP_SIZE, SHADOW_MAP_SIZE);
frameBufferObject = buildFrameBufferObject(SHADOW_MAP_SIZE, SHADOW_MAP_SIZE, shadowmapTextureId);
initMeshAndShader();
initPlaneTexture();
glEnable(GL_DEPTH_TEST);
Angel::CheckError();
glutMainLoop();
}
// Convert from spherical coordinates to cartesian coordinates
vec3 sphericalToCartesian(float polarAngle, float elevationAngle, float radius){
float a = radius * cos(elevationAngle);
vec3 cart;
cart.x = a * cos(polarAngle);
cart.y = radius * sin(elevationAngle);
cart.z = a * sin(polarAngle);
return cart;
}
string getFrameBufferStatusString(GLenum code){
switch (code){
case GL_FRAMEBUFFER_COMPLETE:
return "Framebuffer ok";
case GL_FRAMEBUFFER_UNDEFINED:
return "Framebuffer undefined";
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
return "Framebuffer incomplete attachment";
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
return "Framebuffer incomplete missing attachment";
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
return "Framebuffer incomplete read buffer";
case GL_FRAMEBUFFER_UNSUPPORTED:
return "Framebuffer unsupported";
case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
return "Framebuffer incomplete multisample";
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
return "FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER";
case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT:
return "FRAMEBUFFER_INCOMPLETE_FORMATS";
default:
return "Unknown framebuffer status ";
}
} | [
"[email protected]"
] | |
30eceff069ba72fb4eaaaf9a317778577f7b1a58 | 6f05f7d5a67b6bb87956a22b988067ec772ba966 | /data/test/cpp/72dc1a147801919d91aaadfef457ff2a66d96a37main.cpp | 72dc1a147801919d91aaadfef457ff2a66d96a37 | [
"MIT"
] | permissive | harshp8l/deep-learning-lang-detection | 93b6d24a38081597c610ecf9b1f3b92c7d669be5 | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | refs/heads/master | 2020-04-07T18:07:00.697994 | 2018-11-29T23:21:23 | 2018-11-29T23:21:23 | 158,597,498 | 0 | 0 | MIT | 2018-11-21T19:36:42 | 2018-11-21T19:36:41 | null | UTF-8 | C++ | false | false | 674 | cpp | #include <iostream>
#include "pctree.h"
int main() {
std::cout << "Hello, World!\n";
//Test Case
int rows = 5, cols = 6;
int** sample = new int*[rows];
for(int i=0;i<rows;i++) {
sample[i] = new int[cols];
}
for(int i=0;i<rows;i++) {
for(int j=0;j<cols;j++) {
sample[i][j] = 0;
}
}
sample[0][0]=1; sample[0][1]=1;
sample[1][1]=1; sample[1][2]=1;
sample[2][0]=1; sample[2][1]=1; sample[2][2]=1; sample[2][3]=1;
sample[3][3]=1; sample[3][4]=1; sample[3][5]=1;
sample[4][0]=1; sample[4][4]=1; sample[4][5]=1;
PCtree myTree(sample,rows,cols);
return 0;
}
| [
"[email protected]"
] | |
5e02cbc618083b839f73543d9b586dba035c28d9 | 2d359660d5b4f727a54a5492369324ad42e0099f | /cctest/main/startup.cc | 420bcfa5782cc7973e750f9d1dba1b8a905a06a4 | [
"Apache-2.0"
] | permissive | Saber-hh/cctest | 53d7955797e53f6a22dd3adaffcae56da54eca60 | 809b26109d54fee0988507650bd582a6de0dad0e | refs/heads/master | 2020-07-21T19:24:36.204532 | 2019-09-02T15:57:06 | 2019-09-02T15:57:06 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 147 | cc | #include "cctest/main/startup.h"
namespace cctest {
int run_all_tests(int /* argc */, char** /* argv */) {
return 0;
}
} // namespace cctest
| [
"[email protected]"
] | |
5284f9400da73d35c19ce552499d80a97464048f | a4f29d2168ba76782ed746b136a4e783bc14ba5c | /VideoSlicer/Main.cpp | 467700e70158a545191611f0dde29564c5c05f71 | [
"MIT"
] | permissive | daramkun/VideoSlicer | 7952f9b3d599c4647d0578fb1165125f5ac45397 | 5974649ad64cf424bca653868b6147efb382d738 | refs/heads/master | 2020-03-11T12:43:28.476855 | 2018-04-30T07:24:34 | 2018-04-30T07:24:34 | 130,005,377 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,647 | cpp | #define _CRT_SECURE_NO_WARNINGS
#ifdef _DEBUG
# define _CRTDBG_MAP_ALLOC
# include <cstdlib>
# include <crtdbg.h>
#endif
#include <string>
#include <Windows.h>
#include <CommCtrl.h>
#include <ShlObj.h>
#include <atlbase.h>
#include <VersionHelpers.h>
#include "Resources/resource.h"
#include "Video/VideoDecoder.h"
#include "Image/ImageEncoder.h"
#include "ThreadPool.h"
#pragma comment ( lib, "comctl32.lib" )
enum SAVEFILEFORMAT
{
SFF_PNG = 201,
SFF_JPEG_100 = 202,
SFF_JPEG_80 = 203,
SFF_JPEG_60 = 204,
};
std::wstring g_openedVideoFile;
std::wstring g_saveTo;
bool g_isStarted;
double g_progress;
HANDLE g_thread;
DWORD g_threadId;
SAVEFILEFORMAT g_saveFileFormat = SFF_JPEG_100;
std::wstring ConvertTimeStamp ( LONGLONG nanosec, LPCWSTR ext ) noexcept
{
UINT millisec = ( UINT ) ( nanosec / 10000 );
UINT hour = millisec / 1000 / 60 / 60;
millisec -= hour * 1000 * 60 * 60;
UINT minute = millisec / 1000 / 60;
millisec -= minute * 1000 * 60;
UINT second = millisec / 1000;
millisec -= second * 1000;
wchar_t temp [ 256 ];
wsprintf ( temp, TEXT ( "%02dː%02dː%02d˙%03d.%s" ), hour, minute, second, millisec, ext );
return temp;
}
void ErrorExit ( HWND owner, unsigned exitCode )
{
TaskDialog ( owner, nullptr, TEXT ( "오류" ), TEXT ( "오류가 발생했습니다." ),
TEXT ( "Windows가 N 또는 KN 에디션이면서 미디어 기능 팩이 설치되어 있지 않거나, 동영상 파일이 잘못된 것으로 보입니다." ),
TDCBF_OK_BUTTON, TD_ERROR_ICON, nullptr );
ExitProcess ( exitCode );
}
bool EncodingImageToFile ( IVideoSample * readedSample, LONGLONG readedTimeStamp,
UINT width, UINT height, UINT stride ) noexcept
{
CComPtr<IVideoSample> sample;
*&sample = readedSample;
BYTE * colorBuffer;
uint64_t colorBufferLength;
if ( FAILED ( sample->Lock ( ( LPVOID* ) &colorBuffer, &colorBufferLength ) ) )
return false;
std::wstring filename = ConvertTimeStamp ( readedTimeStamp, g_saveFileFormat == SFF_PNG ? TEXT ( "png" ) : TEXT ( "jpg" ) );
wchar_t outputPath [ MAX_PATH ];
PathCombine ( outputPath, g_saveTo.c_str (), filename.c_str () );
ImageEncoderSettings settings;
switch ( g_saveFileFormat )
{
case SFF_PNG:
settings.codecType = IEC_PNG;
settings.settings.png.interlace = false;
settings.settings.png.filtering = true;
break;
case SFF_JPEG_100:
settings.codecType = IEC_JPEG;
settings.settings.jpeg.quality = 1.0f;
settings.settings.jpeg.chromaSubsample = false;
break;
case SFF_JPEG_80:
settings.codecType = IEC_JPEG;
settings.settings.jpeg.quality = 0.8f;
settings.settings.jpeg.chromaSubsample = true;
break;
case SFF_JPEG_60:
settings.codecType = IEC_JPEG;
settings.settings.jpeg.quality = 0.6f;
settings.settings.jpeg.chromaSubsample = true;
break;
}
settings.imageProp.width = width;
settings.imageProp.height = height;
settings.imageProp.stride = stride;
if ( FAILED ( SaveImage ( outputPath, &settings, colorBuffer, colorBufferLength ) ) )
{
sample->Unlock ();
return false;
}
sample->Unlock ();
return true;
}
DWORD WINAPI DoSushi ( LPVOID ) noexcept
{
CComPtr<IVideoDecoder> videoDecoder;
//if ( FAILED ( CreateMediaFoundationVideoDecoder ( &videoDecoder ) ) )
if ( FAILED ( CreateFFmpegVideoDecoder ( &videoDecoder ) ) )
{
ErrorExit ( nullptr, -5 );
return -1;
}
if ( FAILED ( videoDecoder->Initialize ( g_openedVideoFile.c_str () ) ) )
{
ErrorExit ( nullptr, -5 );
return -1;
}
uint64_t duration;
if ( FAILED ( videoDecoder->GetDuration ( &duration ) ) )
{
ErrorExit ( nullptr, -5 );
return -1;
}
uint32_t width, height, stride;
if ( FAILED ( videoDecoder->GetVideoSize ( &width, &height, &stride ) ) )
{
ErrorExit ( nullptr, -5 );
return -1;
}
g_progress = 0;
g_isStarted = true;
{
ThreadPool threadPool ( std::thread::hardware_concurrency () );
while ( g_isStarted )
{
if ( threadPool.taskSize () >= std::thread::hardware_concurrency () * 4 )
{
Sleep ( 1 );
continue;
}
uint64_t readedTimeStamp = 0;
CComPtr<IVideoSample> readedSample;
if ( FAILED ( videoDecoder->ReadSample ( &readedSample, &readedTimeStamp ) ) )
continue;
if ( nullptr == readedSample )
break;
auto result = threadPool.enqueue ( EncodingImageToFile,
readedSample.Detach (), readedTimeStamp,
width, height, stride );
g_progress = ( readedTimeStamp / 10000 ) / ( double ) ( duration / 10000 );
}
}
g_progress = 1;
return 0;
}
int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE, LPSTR, int )
{
#ifdef _DEBUG
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
if ( !IsWindows7OrGreater () )
{
MessageBox ( nullptr, TEXT ( "이 프로그램은 Windows 7 이상만 대응하고 있습니다." ),
TEXT ( "오류" ), MB_OK );
return -1;
}
if ( FAILED ( CoInitializeEx ( nullptr, COINIT_APARTMENTTHREADED ) ) )
return -1;
HICON hIcon = LoadIcon ( hInstance, MAKEINTRESOURCE ( IDI_MAIN_ICON ) );
TASKDIALOG_BUTTON buttonArray [] =
{
{ 101, TEXT ( "동영상 선택하기" ) },
{ 102, TEXT ( "저장할 경로 지정하기" ) },
};
TASKDIALOG_BUTTON radioButtonArray [] =
{
{ 201, TEXT ( "PNG로 저장하기" ) },
{ 202, TEXT ( "JPEG로 저장하기(100% 화질)" ) },
{ 203, TEXT ( "JPEG로 저장하기(80% 화질)" ) },
{ 204, TEXT ( "JPEG로 저장하기(60% 화질)" ) },
};
TASKDIALOGCONFIG mainConfig = { 0, };
mainConfig.cbSize = sizeof ( TASKDIALOGCONFIG );
mainConfig.hInstance = hInstance;
mainConfig.hMainIcon = hIcon;
mainConfig.dwFlags = TDF_ENABLE_HYPERLINKS | TDF_USE_HICON_MAIN | TDF_USE_COMMAND_LINKS | TDF_SHOW_PROGRESS_BAR | TDF_CALLBACK_TIMER;
mainConfig.pszWindowTitle = TEXT ( "영상 회뜨는 프로그램" );
mainConfig.pszMainInstruction = TEXT ( "영상 회 떠드립니다." );
mainConfig.pszContent = TEXT ( "지정된 경로에 선택한 동영상을 회떠서 프레임 하나하나 이미지 파일로 정성스럽게 저장해드립니다. 확인 버튼을 누르면 회 뜨기가 시작됩니다." );
mainConfig.pszFooter = TEXT ( "이 프로그램은 Windows N/KN 에디션에서는 동작하지 않습니다. KN 및 N 에디션에서 구동하려면 아래 링크에서 소프트웨어를 설치해주세요.\n<A HREF=\"https://www.microsoft.com/ko-kr/download/details.aspx?id=16546\">Windows 7용 미디어 기능 팩</A>\n<A HREF=\"https://www.microsoft.com/ko-kr/download/details.aspx?id=40744\">Windows 8.1용 미디어 기능 팩</A>\n<A HREF=\"https://www.microsoft.com/ko-kr/download/details.aspx?id=48231\">Windows 10용 미디어 기능 팩</A>" );
mainConfig.pButtons = buttonArray;
mainConfig.cButtons = _countof ( buttonArray );
mainConfig.pRadioButtons = radioButtonArray;
mainConfig.cRadioButtons = _countof ( radioButtonArray );
mainConfig.nDefaultRadioButton = 202;
mainConfig.dwCommonButtons = TDCBF_OK_BUTTON | TDCBF_CANCEL_BUTTON;
mainConfig.pfCallback = [] ( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData ) -> HRESULT
{
switch ( msg )
{
case TDN_CREATED:
{
SendMessage ( hWnd, TDM_ENABLE_BUTTON, IDOK, FALSE );
SendMessage ( hWnd, TDM_ENABLE_BUTTON, 102, FALSE );
}
break;
case TDN_BUTTON_CLICKED:
{
if ( wParam == 101 )
{
CComPtr<IFileOpenDialog> dialog;
if ( FAILED ( CoCreateInstance ( CLSID_FileOpenDialog, nullptr, CLSCTX_ALL,
IID_IFileOpenDialog, ( void ** ) &dialog ) ) )
ErrorExit ( nullptr, -3 );
COMDLG_FILTERSPEC fileTypes [] =
{
{ TEXT ( "지원하는 모든 파일(*.mp4;*.m4v;*.avi;*.wmv)" ), TEXT ( "*.mp4;*.m4v;*.avi;*.wmv" ) },
};
dialog->SetFileTypes ( _countof ( fileTypes ), fileTypes );
dialog->SetOptions ( FOS_FILEMUSTEXIST | FOS_FORCEFILESYSTEM | FOS_NOTESTFILECREATE );
if ( FAILED ( dialog->Show ( hWnd ) ) )
return 2;
IShellItem * selectedItem;
if ( FAILED ( dialog->GetResult ( &selectedItem ) ) )
ErrorExit ( nullptr, -4 );
PWSTR filePath;
if ( FAILED ( selectedItem->GetDisplayName ( SIGDN_FILESYSPATH, &filePath ) ) )
{
ErrorExit ( nullptr, -4 );
return 0;
}
::g_openedVideoFile = filePath;
CoTaskMemFree ( filePath );
SendMessage ( hWnd, TDM_ENABLE_BUTTON, 101, FALSE );
SendMessage ( hWnd, TDM_ENABLE_BUTTON, 102, TRUE );
return 1;
}
else if ( wParam == 102 )
{
CComPtr<IFileOpenDialog> dialog;
if ( FAILED ( CoCreateInstance ( CLSID_FileOpenDialog, nullptr, CLSCTX_ALL,
IID_IFileOpenDialog, ( void ** ) &dialog ) ) )
ErrorExit ( nullptr, -3 );
dialog->SetOptions ( FOS_PATHMUSTEXIST | FOS_PICKFOLDERS | FOS_FORCEFILESYSTEM | FOS_NOTESTFILECREATE );
if ( FAILED ( dialog->Show ( hWnd ) ) )
return 2;
IShellItem * selectedItem;
if ( FAILED ( dialog->GetResult ( &selectedItem ) ) )
ErrorExit ( nullptr, -4 );
PWSTR filePath;
if ( FAILED ( selectedItem->GetDisplayName ( SIGDN_FILESYSPATH, &filePath ) ) )
{
ErrorExit ( nullptr, -4 );
return 0;
}
::g_saveTo = filePath;
CoTaskMemFree ( filePath );
SendMessage ( hWnd, TDM_ENABLE_BUTTON, 102, FALSE );
SendMessage ( hWnd, TDM_ENABLE_BUTTON, IDOK, TRUE );
return 1;
}
else if ( wParam == IDOK )
{
SendMessage ( hWnd, TDM_ENABLE_BUTTON, IDOK, FALSE );
::g_thread = CreateThread ( nullptr, 0, DoSushi, nullptr, 0, &g_threadId );
return 1;
}
else if ( wParam == IDCANCEL )
{
TASKDIALOGCONFIG askDialog = { 0, };
askDialog.cbSize = sizeof ( TASKDIALOGCONFIG );
askDialog.pszMainIcon = TD_WARNING_ICON;
askDialog.hwndParent = hWnd;
askDialog.pszWindowTitle = TEXT ( "질문" );
askDialog.pszMainInstruction = TEXT ( "종료하시겠습니까?" );
askDialog.pszContent = TEXT ( "진행 중이던 작업을 모두 잃게 됩니다." );
askDialog.dwCommonButtons = TDCBF_YES_BUTTON | TDCBF_NO_BUTTON;
int button;
HRESULT hr;
if ( FAILED ( hr = TaskDialogIndirect ( &askDialog, &button, nullptr, nullptr ) ) )
return 0;
if ( button == IDNO )
return 1;
if ( ::g_thread != NULL )
{
g_isStarted = false;
WaitForSingleObject ( g_thread, INFINITE );
}
}
}
break;
case TDN_RADIO_BUTTON_CLICKED:
{
::g_saveFileFormat = ( SAVEFILEFORMAT ) wParam;
}
break;
case TDN_HYPERLINK_CLICKED:
{
ShellExecute ( nullptr, TEXT ( "open" ), ( LPWSTR ) lParam,
nullptr, nullptr, SW_SHOW );
}
break;
case TDN_TIMER:
{
if ( !::g_isStarted )
return 1;
SendMessage ( hWnd, TDM_SET_PROGRESS_BAR_RANGE, 0, MAKELPARAM ( 0, 100 ) );
SendMessage ( hWnd, TDM_SET_PROGRESS_BAR_POS, ( WPARAM ) ( ::g_progress * 100 ), 0 );
if ( abs ( ::g_progress - 1 ) <= FLT_EPSILON )
{
TASKDIALOGCONFIG taskDialog = { 0, };
taskDialog.cbSize = sizeof ( TASKDIALOGCONFIG );
taskDialog.pszMainIcon = TD_INFORMATION_ICON;
taskDialog.pszWindowTitle = TEXT ( "안내" );
taskDialog.pszMainInstruction = TEXT ( "작업이 완료되었습니다." );
taskDialog.pszContent = TEXT ( "작업이 완료되어 프로그램을 종료합니다." );
taskDialog.dwCommonButtons = TDCBF_OK_BUTTON;
SendMessage ( hWnd, TDM_NAVIGATE_PAGE, 0, ( LPARAM ) &taskDialog );
}
}
break;
}
return 0;
};
if ( FAILED ( TaskDialogIndirect ( &mainConfig, nullptr, nullptr, nullptr ) ) )
return -2;
CoUninitialize ();
return 0;
} | [
"[email protected]"
] | |
b9b4204a1754214bf2b95bcaff8cad2e957c033f | e75cf3fc4e6569583270ac0f3626453c464fe020 | /Android/第三方完整APP源码/mogutt/TTServer/cpp/src/msg_server/HttpParserWrapper.h | 46cf2d8c4c44322ffdcc8232bf4ac950c5172656 | [] | no_license | hailongfeng/zhishiku | c87742e8819c1a234f68f3be48108b244e8a265f | b62bb845a88248855d118bc571634cc94f34efcb | refs/heads/master | 2022-12-26T00:00:48.455098 | 2020-02-26T09:22:05 | 2020-02-26T09:22:05 | 133,133,919 | 1 | 9 | null | 2022-12-16T00:35:57 | 2018-05-12T09:56:41 | Java | UTF-8 | C++ | false | false | 1,601 | h | //
// HttpPdu.h
// http_msg_server
//
// Created by jianqing.du on 13-9-29.
// Copyright (c) 2013年 ziteng. All rights reserved.
//
#ifndef http_msg_server_HttpParserWrapper_h
#define http_msg_server_HttpParserWrapper_h
#include "util.h"
#include "http_parser.h"
// extract url and content body from an ajax request
class CHttpParserWrapper {
public:
virtual ~CHttpParserWrapper() {}
static CHttpParserWrapper* GetInstance();
void ParseHttpContent(const char* buf, uint32_t len);
bool IsReadAll() { return m_read_all; }
uint32_t GetTotalLength() { return m_total_length; }
string& GetUrl() { return m_url; }
string& GetBodyContent() { return m_body_content; }
void SetUrl(const char* url, size_t length) { m_url.append(url, length); }
void SetBodyContent(const char* content, size_t length) { m_body_content.append(content, length); }
void SetTotalLength(uint32_t total_len) { m_total_length = total_len; }
void SetReadAll() { m_read_all = true; }
static int OnUrl(http_parser* parser, const char *at, size_t length);
static int OnHeadersComplete (http_parser* parser);
static int OnBody (http_parser* parser, const char *at, size_t length);
static int OnMessageComplete (http_parser* parser);
private:
CHttpParserWrapper();
private:
static CHttpParserWrapper* m_instance;
http_parser m_http_parser;
http_parser_settings m_settings;
bool m_read_all;
uint32_t m_total_length;
string m_url;
string m_body_content;
};
#endif
| [
"[email protected]"
] | |
3f6809e31443008a19162104a06308d945353ea7 | a97b9ad50e283b4e930ab59547806eb303b52c6f | /class/4nov_plate_kwSST/310/phi | 2ff9429f07d91d8ad1109abdda3d3ab95db46914 | [] | no_license | harrisbk/OpenFOAM_run | fdcd4f81bd3205764988ea95c25fd2a5c130841b | 9591c98336561bcfb3b7259617b5363aacf48067 | refs/heads/master | 2016-09-05T08:45:27.965608 | 2015-11-16T19:08:34 | 2015-11-16T19:08:34 | 42,883,543 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 236,711 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "310";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
internalField nonuniform List<scalar>
19800
(
0.000192365
2.29084e-09
0.000192359
5.3902e-09
0.000192352
7.76588e-09
0.000192342
9.67011e-09
0.000192331
1.12699e-08
0.000192318
1.26715e-08
0.000192304
1.39388e-08
0.000192289
1.51429e-08
0.000192273
1.63013e-08
0.000192255
1.74925e-08
0.000192237
1.86812e-08
0.000192217
2.00028e-08
0.000192195
2.12595e-08
0.000192173
2.27529e-08
0.000192149
2.34982e-08
0.000192125
2.42268e-08
0.000192105
1.95551e-08
0.000192093
1.21144e-08
0.00019213
-3.72063e-08
7.89177e-08
0.000192051
0.000197699
4.64289e-09
0.000197694
1.09261e-08
0.000197686
1.574e-08
0.000197676
1.95996e-08
0.000197664
2.28398e-08
0.000197651
2.56774e-08
0.000197637
2.82418e-08
0.000197622
3.0674e-08
0.000197605
3.30138e-08
0.000197587
3.54092e-08
0.000197568
3.78081e-08
0.000197547
4.04448e-08
0.000197526
4.30177e-08
0.000197502
4.60053e-08
0.000197478
4.80946e-08
0.000197451
5.05836e-08
0.000197423
4.83129e-08
0.000197384
5.03901e-08
0.0001973
4.68099e-08
1.66855e-07
0.000197212
0.000203182
7.05701e-09
0.000203176
1.66078e-08
0.000203168
2.39228e-08
0.000203158
2.97865e-08
0.000203146
3.47055e-08
0.000203133
3.90097e-08
0.000203118
4.28949e-08
0.000203102
4.65719e-08
0.000203085
5.01033e-08
0.000203067
5.37021e-08
0.000203047
5.73041e-08
0.000203027
6.12306e-08
0.000203004
6.51159e-08
0.000202981
6.96014e-08
0.000202956
7.33349e-08
0.000202928
7.81915e-08
0.000202896
8.03629e-08
0.000202855
9.08946e-08
0.000202795
1.0688e-07
1.90525e-07
0.000202772
0.000208817
9.53312e-09
0.000208811
2.24348e-08
0.000208802
3.23126e-08
0.000208792
4.02273e-08
0.00020878
4.68608e-08
0.000208766
5.26575e-08
0.000208751
5.78807e-08
0.000208735
6.28093e-08
0.000208717
6.75292e-08
0.000208699
7.23114e-08
0.000208679
7.70846e-08
0.000208658
8.2237e-08
0.000208636
8.73781e-08
0.000208612
9.32578e-08
0.000208587
9.86609e-08
0.000208559
1.05694e-07
0.000208528
1.118e-07
0.000208493
1.26194e-07
0.000208452
1.47051e-07
2.0166e-07
0.000208441
0.000214607
1.20709e-08
0.000214601
2.84062e-08
0.000214593
4.09071e-08
0.000214582
5.09174e-08
0.00021457
5.92971e-08
0.000214556
6.66069e-08
0.00021454
7.31779e-08
0.000214524
7.93545e-08
0.000214506
8.52452e-08
0.000214487
9.11699e-08
0.000214467
9.70537e-08
0.000214446
1.03328e-07
0.000214424
1.09602e-07
0.000214401
1.1666e-07
0.000214376
1.23474e-07
0.000214349
1.32009e-07
0.000214321
1.40499e-07
0.000214292
1.55296e-07
0.000214264
1.74738e-07
2.09678e-07
0.000214256
0.000220559
1.46697e-08
0.000220553
3.45201e-08
0.000220544
4.97027e-08
0.000220533
6.18503e-08
0.00022052
7.20041e-08
0.000220506
8.08416e-08
0.00022049
8.87619e-08
0.000220474
9.61708e-08
0.000220456
1.03199e-07
0.000220437
1.10203e-07
0.000220417
1.17108e-07
0.000220396
1.24357e-07
0.000220374
1.31575e-07
0.000220351
1.39503e-07
0.000220327
1.47278e-07
0.000220302
1.56486e-07
0.000220277
1.65805e-07
0.000220253
1.7906e-07
0.000220233
1.94629e-07
2.15922e-07
0.000220227
0.000226675
1.73288e-08
0.000226669
4.07742e-08
0.00022666
5.86948e-08
0.000226649
7.30181e-08
0.000226636
8.49693e-08
0.000226621
9.53424e-08
0.000226606
1.04604e-07
0.000226588
1.13217e-07
0.00022657
1.21333e-07
0.000226551
1.29332e-07
0.000226531
1.37137e-07
0.00022651
1.45179e-07
0.000226489
1.53095e-07
0.000226467
1.61519e-07
0.000226444
1.69711e-07
0.000226422
1.78781e-07
0.0002264
1.87649e-07
0.000226381
1.98286e-07
0.000226366
2.09179e-07
2.20791e-07
0.000226362
0.000232961
2.00469e-08
0.000232955
4.71652e-08
0.000232946
6.78776e-08
0.000232934
8.44114e-08
0.000232921
9.81776e-08
0.000232906
1.10087e-07
0.00023289
1.20673e-07
0.000232873
1.30449e-07
0.000232855
1.39584e-07
0.000232836
1.48472e-07
0.000232816
1.5703e-07
0.000232795
1.65649e-07
0.000232774
1.73976e-07
0.000232753
1.82494e-07
0.000232733
1.90541e-07
0.000232713
1.98771e-07
0.000232694
2.06245e-07
0.000232679
2.13754e-07
0.000232668
2.20021e-07
2.2463e-07
0.000232664
0.000239422
2.28226e-08
0.000239415
5.36892e-08
0.000239406
7.72439e-08
0.000239394
9.60185e-08
0.000239381
1.11612e-07
0.000239366
1.2505e-07
0.00023935
1.36932e-07
0.000239332
1.47816e-07
0.000239314
1.57888e-07
0.000239295
1.67537e-07
0.000239275
1.76675e-07
0.000239255
1.85634e-07
0.000239235
1.9406e-07
0.000239215
2.02271e-07
0.000239196
2.09653e-07
0.000239179
2.16485e-07
0.000239163
2.21945e-07
0.00023915
2.2618e-07
0.000239142
2.28236e-07
2.27653e-07
0.000239139
0.000246061
2.56539e-08
0.000246055
6.03412e-08
0.000246045
8.67851e-08
0.000246033
1.07826e-07
0.00024602
1.25252e-07
0.000246005
1.40203e-07
0.000245988
1.53342e-07
0.000245971
1.65267e-07
0.000245952
1.76173e-07
0.000245933
1.86439e-07
0.000245914
1.95966e-07
0.000245895
2.05011e-07
0.000245876
2.13219e-07
0.000245857
2.20745e-07
0.00024584
2.27014e-07
0.000245824
2.32044e-07
0.000245811
2.35136e-07
0.000245801
2.36172e-07
0.000245795
2.34539e-07
2.29999e-07
0.000245792
0.000252885
2.85386e-08
0.000252878
6.71153e-08
0.000252869
9.64913e-08
0.000252857
1.19819e-07
0.000252843
1.39076e-07
0.000252827
1.55515e-07
0.000252811
1.69862e-07
0.000252793
1.82744e-07
0.000252775
1.9437e-07
0.000252757
2.05093e-07
0.000252738
2.14803e-07
0.000252719
2.23677e-07
0.000252701
2.31357e-07
0.000252684
2.37862e-07
0.000252668
2.42661e-07
0.000252655
2.45621e-07
0.000252644
2.46194e-07
0.000252635
2.4422e-07
0.000252631
2.39405e-07
2.31774e-07
0.000252629
0.000259898
3.1474e-08
0.000259891
7.40047e-08
0.000259881
1.06351e-07
0.000259869
1.31979e-07
0.000259855
1.53059e-07
0.00025984
1.70952e-07
0.000259823
1.86445e-07
0.000259806
2.00192e-07
0.000259788
2.12408e-07
0.000259769
2.23416e-07
0.000259751
2.33094e-07
0.000259733
2.41544e-07
0.000259716
2.48408e-07
0.0002597
2.53607e-07
0.000259686
2.56669e-07
0.000259674
2.57408e-07
0.000259665
2.55447e-07
0.000259659
2.50707e-07
0.000259655
2.43166e-07
2.33066e-07
0.000259654
0.000267105
3.44571e-08
0.000267098
8.10014e-08
0.000267088
1.1635e-07
0.000267076
1.44288e-07
0.000267062
1.67174e-07
0.000267046
1.86477e-07
0.00026703
2.03045e-07
0.000267012
2.17549e-07
0.000266995
2.30214e-07
0.000266977
2.41327e-07
0.000266959
2.50759e-07
0.000266942
2.58543e-07
0.000266926
2.64335e-07
0.000266912
2.67997e-07
0.000266899
2.6914e-07
0.000266889
2.676e-07
0.000266881
2.6318e-07
0.000266876
2.55934e-07
0.000266873
2.46056e-07
2.33947e-07
0.000266872
0.000274513
3.74842e-08
0.000274506
8.80964e-08
0.000274495
1.26475e-07
0.000274483
1.56723e-07
0.000274469
1.8139e-07
0.000274453
2.02051e-07
0.000274437
2.1961e-07
0.000274419
2.34756e-07
0.000274402
2.47719e-07
0.000274384
2.58754e-07
0.000274368
2.67727e-07
0.000274351
2.74621e-07
0.000274337
2.79121e-07
0.000274324
2.81073e-07
0.000274313
2.80188e-07
0.000274304
2.76381e-07
0.000274297
2.69629e-07
0.000274293
2.60132e-07
0.000274291
2.48247e-07
2.34479e-07
0.00027429
0.000282125
4.05513e-08
0.000282118
9.52795e-08
0.000282108
1.36708e-07
0.000282095
1.6926e-07
0.000282081
1.95676e-07
0.000282066
2.17631e-07
0.000282049
2.3609e-07
0.000282032
2.51752e-07
0.000282015
2.64857e-07
0.000281998
2.7563e-07
0.000281982
2.83941e-07
0.000281967
2.89745e-07
0.000281953
2.92771e-07
0.000281941
2.92891e-07
0.000281932
2.89932e-07
0.000281924
2.83918e-07
0.000281919
2.7499e-07
0.000281915
2.63483e-07
0.000281914
2.49868e-07
2.34712e-07
0.000281913
0.000289949
4.3654e-08
0.000289942
1.02539e-07
0.000289932
1.47032e-07
0.000289919
1.81874e-07
0.000289905
2.09996e-07
0.000289889
2.33176e-07
0.000289873
2.52431e-07
0.000289856
2.68478e-07
0.000289839
2.81564e-07
0.000289823
2.91894e-07
0.000289808
2.99355e-07
0.000289794
3.03895e-07
0.000289781
3.05306e-07
0.00028977
3.03517e-07
0.000289762
2.98487e-07
0.000289755
2.9036e-07
0.000289751
2.79424e-07
0.000289748
2.66126e-07
0.000289747
2.51016e-07
2.34689e-07
0.000289747
0.00029799
4.67871e-08
0.000297983
1.09863e-07
0.000297972
1.57426e-07
0.00029796
1.94537e-07
0.000297945
2.24316e-07
0.00029793
2.48638e-07
0.000297914
2.68581e-07
0.000297897
2.84874e-07
0.000297881
2.9778e-07
0.000297865
3.07495e-07
0.000297851
3.13934e-07
0.000297838
3.17063e-07
0.000297826
3.16756e-07
0.000297817
3.13025e-07
0.000297809
3.05962e-07
0.000297804
2.95837e-07
0.0002978
2.83062e-07
0.000297798
2.68173e-07
0.000297797
2.51766e-07
2.34445e-07
0.000297798
0.000306254
4.9945e-08
0.000306246
1.17237e-07
0.000306236
1.67869e-07
0.000306223
2.07219e-07
0.000306209
2.38595e-07
0.000306194
2.63973e-07
0.000306178
2.84487e-07
0.000306162
3.00884e-07
0.000306146
3.13452e-07
0.000306131
3.2239e-07
0.000306118
3.27655e-07
0.000306105
3.29255e-07
0.000306095
3.27162e-07
0.000306086
3.21488e-07
0.00030608
3.12458e-07
0.000306075
3.00462e-07
0.000306072
2.86013e-07
0.000306071
2.69711e-07
0.00030607
2.52178e-07
2.34007e-07
0.000306071
0.000314747
5.31218e-08
0.000314739
1.24646e-07
0.000314729
1.78336e-07
0.000314716
2.19888e-07
0.000314702
2.52794e-07
0.000314687
2.79131e-07
0.000314671
3.00095e-07
0.000314656
3.16455e-07
0.000314641
3.28532e-07
0.000314626
3.36541e-07
0.000314614
3.40502e-07
0.000314602
3.40484e-07
0.000314593
3.36568e-07
0.000314586
3.28979e-07
0.00031458
3.18068e-07
0.000314576
3.04332e-07
0.000314574
2.88366e-07
0.000314573
2.70811e-07
0.000314572
2.52298e-07
2.33399e-07
0.000314573
0.000323475
5.63108e-08
0.000323468
1.32074e-07
0.000323457
1.88804e-07
0.000323445
2.32511e-07
0.000323431
2.66872e-07
0.000323416
2.94066e-07
0.000323401
3.15354e-07
0.000323385
3.31536e-07
0.000323371
3.42974e-07
0.000323358
3.49922e-07
0.000323346
3.5247e-07
0.000323335
3.50771e-07
0.000323327
3.45023e-07
0.00032332
3.35568e-07
0.000323315
3.22874e-07
0.000323312
3.07531e-07
0.00032331
2.90194e-07
0.00032331
2.71529e-07
0.00032331
2.52163e-07
2.32641e-07
0.000323311
0.000332446
5.9505e-08
0.000332438
1.39504e-07
0.000332428
1.99246e-07
0.000332415
2.45052e-07
0.000332402
2.80786e-07
0.000332387
3.0873e-07
0.000332372
3.30215e-07
0.000332357
3.4608e-07
0.000332344
3.56744e-07
0.000332331
3.6251e-07
0.00033232
3.6356e-07
0.000332311
3.60143e-07
0.000332303
3.52578e-07
0.000332297
3.41323e-07
0.000332293
3.26952e-07
0.000332291
3.10132e-07
0.000332289
2.91559e-07
0.000332289
2.71912e-07
0.000332289
2.51802e-07
2.31747e-07
0.00033229
0.000341665
6.26966e-08
0.000341658
1.46917e-07
0.000341647
2.09633e-07
0.000341635
2.57475e-07
0.000341621
2.94494e-07
0.000341607
3.23076e-07
0.000341593
3.44629e-07
0.000341579
3.60045e-07
0.000341565
3.69809e-07
0.000341554
3.74293e-07
0.000341543
3.73781e-07
0.000341535
3.6863e-07
0.000341528
3.59281e-07
0.000341523
3.46305e-07
0.00034152
3.30368e-07
0.000341518
3.12194e-07
0.000341517
2.92512e-07
0.000341517
2.71997e-07
0.000341517
2.51242e-07
2.30731e-07
0.000341518
0.00035114
6.58776e-08
0.000351133
1.54293e-07
0.000351123
2.19937e-07
0.00035111
2.69744e-07
0.000351097
3.07951e-07
0.000351083
3.37056e-07
0.000351069
3.58551e-07
0.000351056
3.73391e-07
0.000351043
3.82143e-07
0.000351032
3.85263e-07
0.000351023
3.83146e-07
0.000351015
3.76265e-07
0.000351009
3.65183e-07
0.000351005
3.50573e-07
0.000351002
3.33179e-07
0.000351001
3.13773e-07
0.000351
2.93096e-07
0.000351
2.71816e-07
0.000351001
2.505e-07
2.29602e-07
0.000351002
0.000360878
6.90394e-08
0.000360871
1.61612e-07
0.000360861
2.30127e-07
0.000360848
2.8182e-07
0.000360835
3.21115e-07
0.000360822
3.50626e-07
0.000360808
3.7194e-07
0.000360796
3.86087e-07
0.000360784
3.93728e-07
0.000360774
3.95417e-07
0.000360765
3.91672e-07
0.000360759
3.83083e-07
0.000360753
3.70331e-07
0.00036075
3.54179e-07
0.000360748
3.35438e-07
0.000360746
3.14912e-07
0.000360746
2.93347e-07
0.000360747
2.71395e-07
0.000360747
2.49596e-07
2.2837e-07
0.000360749
0.000370886
7.21733e-08
0.000370879
1.68853e-07
0.000370869
2.40173e-07
0.000370857
2.93665e-07
0.000370844
3.33942e-07
0.000370831
3.63742e-07
0.000370818
3.84755e-07
0.000370806
3.98101e-07
0.000370795
4.04547e-07
0.000370786
4.04759e-07
0.000370778
3.99379e-07
0.000370772
3.8912e-07
0.000370768
3.74769e-07
0.000370765
3.57172e-07
0.000370763
3.37192e-07
0.000370762
3.15652e-07
0.000370762
2.93296e-07
0.000370763
2.70755e-07
0.000370764
2.48541e-07
2.27042e-07
0.000370765
0.000381171
7.52697e-08
0.000381164
1.75993e-07
0.000381154
2.50041e-07
0.000381143
3.05239e-07
0.00038113
3.4639e-07
0.000381118
3.76364e-07
0.000381105
3.96963e-07
0.000381094
4.0941e-07
0.000381084
4.14593e-07
0.000381075
4.13296e-07
0.000381069
4.06292e-07
0.000381063
3.94411e-07
0.00038106
3.7854e-07
0.000381057
3.59596e-07
0.000381056
3.3848e-07
0.000381055
3.16027e-07
0.000381056
2.92969e-07
0.000381057
2.69916e-07
0.000381058
2.47348e-07
2.25624e-07
0.000381059
0.000391742
7.83191e-08
0.000391735
1.8301e-07
0.000391725
2.59701e-07
0.000391714
3.16505e-07
0.000391702
3.58419e-07
0.00039169
3.88451e-07
0.000391678
4.0853e-07
0.000391668
4.19994e-07
0.000391658
4.23859e-07
0.000391651
4.21038e-07
0.000391645
4.12435e-07
0.00039164
3.98991e-07
0.000391637
3.81685e-07
0.000391635
3.61491e-07
0.000391634
3.39338e-07
0.000391634
3.16065e-07
0.000391635
2.92389e-07
0.000391636
2.68893e-07
0.000391637
2.46027e-07
2.24121e-07
0.000391638
0.000402606
8.13117e-08
0.000402599
1.8988e-07
0.000402589
2.69118e-07
0.000402578
3.27424e-07
0.000402567
3.69989e-07
0.000402555
3.9997e-07
0.000402544
4.1943e-07
0.000402535
4.29838e-07
0.000402526
4.32345e-07
0.000402519
4.28e-07
0.000402514
4.17834e-07
0.00040251
4.02895e-07
0.000402507
3.8424e-07
0.000402506
3.62893e-07
0.000402505
3.39799e-07
0.000402506
3.15794e-07
0.000402507
2.91575e-07
0.000402508
2.67699e-07
0.000402509
2.44586e-07
2.22537e-07
0.000402511
0.000413771
8.42373e-08
0.000413764
1.9658e-07
0.000413755
2.78262e-07
0.000413744
3.37959e-07
0.000413733
3.81062e-07
0.000413722
4.10885e-07
0.000413712
4.29638e-07
0.000413703
4.38929e-07
0.000413695
4.40053e-07
0.000413689
4.34198e-07
0.000413684
4.22515e-07
0.000413681
4.06155e-07
0.000413679
3.86241e-07
0.000413678
3.63834e-07
0.000413678
3.39891e-07
0.000413679
3.15236e-07
0.00041368
2.90545e-07
0.000413681
2.66346e-07
0.000413683
2.43032e-07
2.20877e-07
0.000413684
0.000425245
8.70859e-08
0.000425239
2.03087e-07
0.00042523
2.871e-07
0.00042522
3.48074e-07
0.000425209
3.91603e-07
0.000425199
4.21168e-07
0.00042519
4.39135e-07
0.000425181
4.47261e-07
0.000425174
4.46991e-07
0.000425169
4.3965e-07
0.000425165
4.26507e-07
0.000425162
4.08803e-07
0.000425161
3.8772e-07
0.00042516
3.64345e-07
0.00042516
3.39639e-07
0.000425161
3.14411e-07
0.000425163
2.89313e-07
0.000425164
2.64845e-07
0.000425166
2.41372e-07
2.19143e-07
0.000425167
0.000437038
8.98472e-08
0.000437032
2.09378e-07
0.000437023
2.956e-07
0.000437014
3.57734e-07
0.000437004
4.01579e-07
0.000436994
4.30793e-07
0.000436985
4.47905e-07
0.000436978
4.54831e-07
0.000436972
4.53168e-07
0.000436967
4.44375e-07
0.000436964
4.29836e-07
0.000436962
4.1087e-07
0.000436961
3.88706e-07
0.00043696
3.64452e-07
0.000436961
3.39065e-07
0.000436962
3.13336e-07
0.000436964
2.87891e-07
0.000436965
2.63203e-07
0.000436967
2.3961e-07
2.17338e-07
0.000436969
0.000449158
9.25111e-08
0.000449152
2.15428e-07
0.000449144
3.03732e-07
0.000449135
3.66907e-07
0.000449125
4.10961e-07
0.000449117
4.39736e-07
0.000449109
4.55935e-07
0.000449102
4.61638e-07
0.000449096
4.58594e-07
0.000449092
4.48395e-07
0.00044909
4.32528e-07
0.000449088
4.12383e-07
0.000449088
3.89227e-07
0.000449088
3.6418e-07
0.000449089
3.38189e-07
0.00044909
3.12026e-07
0.000449092
2.86291e-07
0.000449093
2.61429e-07
0.000449095
2.37753e-07
2.15464e-07
0.000449097
0.000461614
9.50678e-08
0.000461608
2.21216e-07
0.000461601
3.11466e-07
0.000461592
3.75561e-07
0.000461583
4.1972e-07
0.000461575
4.47978e-07
0.000461568
4.63218e-07
0.000461562
4.67685e-07
0.000461557
4.63284e-07
0.000461554
4.51732e-07
0.000461552
4.34611e-07
0.000461551
4.1337e-07
0.000461551
3.8931e-07
0.000461551
3.63551e-07
0.000461552
3.37031e-07
0.000461554
3.10497e-07
0.000461556
2.84524e-07
0.000461558
2.5953e-07
0.00046156
2.35803e-07
2.13525e-07
0.000461561
0.000474416
9.75073e-08
0.00047441
2.2672e-07
0.000474403
3.18776e-07
0.000474395
3.83669e-07
0.000474387
4.27834e-07
0.000474379
4.55504e-07
0.000474373
4.69747e-07
0.000474367
4.72979e-07
0.000474363
4.67254e-07
0.000474361
4.54408e-07
0.000474359
4.36108e-07
0.000474359
4.13858e-07
0.000474359
3.88977e-07
0.00047436
3.62586e-07
0.000474361
3.35605e-07
0.000474363
3.0876e-07
0.000474365
2.82598e-07
0.000474367
2.57511e-07
0.000474369
2.33764e-07
2.11521e-07
0.000474371
0.000487572
9.98206e-08
0.000487567
2.31919e-07
0.00048756
3.25634e-07
0.000487553
3.91204e-07
0.000487545
4.35281e-07
0.000487538
4.62301e-07
0.000487533
4.75522e-07
0.000487528
4.77529e-07
0.000487525
4.70521e-07
0.000487523
4.56445e-07
0.000487522
4.37047e-07
0.000487522
4.13871e-07
0.000487523
3.88251e-07
0.000487524
3.61303e-07
0.000487526
3.33928e-07
0.000487527
3.06827e-07
0.00048753
2.80521e-07
0.000487532
2.55378e-07
0.000487534
2.31641e-07
2.09455e-07
0.000487536
0.000501094
1.01998e-07
0.000501089
2.36794e-07
0.000501082
3.32017e-07
0.000501075
3.98144e-07
0.000501069
4.42045e-07
0.000501063
4.68362e-07
0.000501058
4.80545e-07
0.000501054
4.81346e-07
0.000501051
4.73102e-07
0.00050105
4.57866e-07
0.000501049
4.3745e-07
0.00050105
4.13431e-07
0.000501051
3.87152e-07
0.000501052
3.59719e-07
0.000501054
3.32013e-07
0.000501057
3.04708e-07
0.000501059
2.78301e-07
0.000501061
2.53136e-07
0.000501063
2.29436e-07
2.07328e-07
0.000501065
0.00051499
1.04033e-07
0.000514985
2.41327e-07
0.00051498
3.37904e-07
0.000514973
4.04469e-07
0.000514967
4.48111e-07
0.000514962
4.73681e-07
0.000514958
4.84819e-07
0.000514954
4.84442e-07
0.000514953
4.75018e-07
0.000514952
4.58694e-07
0.000514952
4.3734e-07
0.000514953
4.12561e-07
0.000514954
3.857e-07
0.000514956
3.57851e-07
0.000514958
3.29872e-07
0.00051496
3.02413e-07
0.000514963
2.75945e-07
0.000514965
2.5079e-07
0.000514967
2.27152e-07
2.05141e-07
0.00051497
0.000529272
1.05916e-07
0.000529267
2.45501e-07
0.000529262
3.43274e-07
0.000529256
4.10163e-07
0.000529251
4.53469e-07
0.000529246
4.78257e-07
0.000529243
4.88353e-07
0.000529241
4.86832e-07
0.000529239
4.76288e-07
0.000529239
4.58952e-07
0.00052924
4.36741e-07
0.000529241
4.11281e-07
0.000529243
3.83912e-07
0.000529245
3.55713e-07
0.000529247
3.27516e-07
0.00052925
2.9995e-07
0.000529252
2.73458e-07
0.000529255
2.48344e-07
0.000529257
2.24791e-07
2.02897e-07
0.000529259
0.000543949
1.0764e-07
0.000543946
2.49301e-07
0.000543941
3.48112e-07
0.000543936
4.15211e-07
0.000543931
4.58113e-07
0.000543927
4.82092e-07
0.000543924
4.91156e-07
0.000543923
4.88534e-07
0.000543922
4.76933e-07
0.000543922
4.5866e-07
0.000543923
4.35674e-07
0.000543925
4.09611e-07
0.000543927
3.81806e-07
0.00054393
3.53318e-07
0.000543932
3.24957e-07
0.000543935
2.97326e-07
0.000543937
2.70848e-07
0.00054394
2.45802e-07
0.000543942
2.22357e-07
2.00597e-07
0.000543945
0.000559034
1.092e-07
0.000559031
2.52715e-07
0.000559027
3.52403e-07
0.000559022
4.19603e-07
0.000559018
4.6204e-07
0.000559015
4.8519e-07
0.000559013
4.9324e-07
0.000559012
4.89565e-07
0.000559012
4.76975e-07
0.000559013
4.57843e-07
0.000559014
4.3416e-07
0.000559016
4.07569e-07
0.000559019
3.79396e-07
0.000559021
3.50679e-07
0.000559024
3.22205e-07
0.000559027
2.94551e-07
0.00055903
2.68118e-07
0.000559032
2.43167e-07
0.000559035
2.19852e-07
1.98242e-07
0.000559037
0.000574537
1.10589e-07
0.000574534
2.55731e-07
0.000574531
3.56137e-07
0.000574527
4.23334e-07
0.000574524
4.65249e-07
0.000574521
4.87558e-07
0.00057452
4.9462e-07
0.00057452
4.89943e-07
0.00057452
4.76433e-07
0.000574521
4.5652e-07
0.000574523
4.32218e-07
0.000574526
4.05174e-07
0.000574528
3.76698e-07
0.000574531
3.47808e-07
0.000574534
3.19268e-07
0.000574537
2.91629e-07
0.00057454
2.65273e-07
0.000574543
2.40443e-07
0.000574545
2.17277e-07
1.95833e-07
0.000574548
0.00059047
1.11804e-07
0.000590468
2.58342e-07
0.000590465
3.59306e-07
0.000590462
4.26399e-07
0.000590459
4.67744e-07
0.000590457
4.89208e-07
0.000590457
4.95312e-07
0.000590457
4.8969e-07
0.000590458
4.75331e-07
0.00059046
4.54713e-07
0.000590462
4.29869e-07
0.000590465
4.02441e-07
0.000590468
3.73726e-07
0.000590471
3.44717e-07
0.000590474
3.16155e-07
0.000590477
2.88569e-07
0.00059048
2.6232e-07
0.000590483
2.37634e-07
0.000590486
2.14635e-07
1.93373e-07
0.000590488
0.000606845
1.12841e-07
0.000606843
2.60541e-07
0.00060684
3.61905e-07
0.000606838
4.28799e-07
0.000606836
4.69531e-07
0.000606835
4.90152e-07
0.000606835
4.95335e-07
0.000606836
4.88826e-07
0.000606838
4.7369e-07
0.00060684
4.52443e-07
0.000606843
4.27131e-07
0.000606846
3.99388e-07
0.000606849
3.70493e-07
0.000606852
3.41416e-07
0.000606856
3.12874e-07
0.000606859
2.85375e-07
0.000606862
2.59261e-07
0.000606865
2.34741e-07
0.000606868
2.11929e-07
1.90861e-07
0.00060687
0.000623674
1.13697e-07
0.000623673
2.62324e-07
0.00062367
3.63933e-07
0.000623669
4.30537e-07
0.000623668
4.70621e-07
0.000623667
4.90406e-07
0.000623668
4.94706e-07
0.000623669
4.87372e-07
0.000623672
4.71532e-07
0.000623674
4.49732e-07
0.000623677
4.24023e-07
0.000623681
3.9603e-07
0.000623684
3.67011e-07
0.000623688
3.37914e-07
0.000623691
3.09433e-07
0.000623695
2.82055e-07
0.000623698
2.56101e-07
0.000623701
2.3177e-07
0.000623703
2.0916e-07
1.883e-07
0.000623706
0.00064097
1.14372e-07
0.000640969
2.63688e-07
0.000640967
3.6539e-07
0.000640966
4.31619e-07
0.000640966
4.71024e-07
0.000640966
4.89986e-07
0.000640967
4.93449e-07
0.000640969
4.85352e-07
0.000640972
4.68879e-07
0.000640975
4.46598e-07
0.000640979
4.20562e-07
0.000640982
3.92382e-07
0.000640986
3.63294e-07
0.00064099
3.34223e-07
0.000640993
3.0584e-07
0.000640997
2.78613e-07
0.000641
2.52846e-07
0.000641003
2.28722e-07
0.000641006
2.0633e-07
1.85692e-07
0.000641008
0.000658745
1.14863e-07
0.000658744
2.64635e-07
0.000658743
3.6628e-07
0.000658743
4.32055e-07
0.000658743
4.70756e-07
0.000658744
4.88913e-07
0.000658746
4.91583e-07
0.000658749
4.82787e-07
0.000658752
4.65752e-07
0.000658755
4.43063e-07
0.000658759
4.16766e-07
0.000658763
3.88458e-07
0.000658767
3.59352e-07
0.000658771
3.30351e-07
0.000658775
3.02102e-07
0.000658778
2.75055e-07
0.000658782
2.49498e-07
0.000658785
2.256e-07
0.000658788
2.03442e-07
1.83037e-07
0.00065879
0.000677014
1.15172e-07
0.000677013
2.65168e-07
0.000677013
3.6661e-07
0.000677013
4.31856e-07
0.000677014
4.69834e-07
0.000677016
4.87206e-07
0.000677018
4.89133e-07
0.000677021
4.79702e-07
0.000677025
4.62175e-07
0.000677029
4.39145e-07
0.000677033
4.12652e-07
0.000677037
3.84272e-07
0.000677041
3.55197e-07
0.000677045
3.26307e-07
0.000677049
2.98226e-07
0.000677053
2.71386e-07
0.000677056
2.46061e-07
0.000677059
2.22408e-07
0.000677062
2.00498e-07
1.80337e-07
0.000677065
0.000695788
1.15301e-07
0.000695788
2.6529e-07
0.000695789
3.66391e-07
0.000695789
4.31038e-07
0.000695791
4.68278e-07
0.000695793
4.84889e-07
0.000695796
4.86122e-07
0.0006958
4.76119e-07
0.000695804
4.58168e-07
0.000695808
4.34864e-07
0.000695813
4.08236e-07
0.000695817
3.79839e-07
0.000695821
3.50842e-07
0.000695826
3.221e-07
0.00069583
2.94219e-07
0.000695833
2.67613e-07
0.000695837
2.42541e-07
0.00069584
2.19149e-07
0.000695843
1.97499e-07
1.77593e-07
0.000695846
0.000715084
1.15251e-07
0.000715084
2.6501e-07
0.000715085
3.65633e-07
0.000715086
4.29617e-07
0.000715089
4.66108e-07
0.000715091
4.81986e-07
0.000715095
4.82575e-07
0.000715099
4.72063e-07
0.000715103
4.53753e-07
0.000715108
4.3024e-07
0.000715113
4.03535e-07
0.000715117
3.75172e-07
0.000715122
3.46295e-07
0.000715126
3.17739e-07
0.000715131
2.90088e-07
0.000715134
2.6374e-07
0.000715138
2.3894e-07
0.000715141
2.15825e-07
0.000715144
1.9445e-07
1.74809e-07
0.000715147
0.000734915
1.15027e-07
0.000734915
2.64335e-07
0.000734916
3.64352e-07
0.000734918
4.27613e-07
0.000734921
4.63348e-07
0.000734925
4.78521e-07
0.000734929
4.78517e-07
0.000734933
4.67556e-07
0.000734938
4.48953e-07
0.000734943
4.25291e-07
0.000734948
3.98565e-07
0.000734953
3.70283e-07
0.000734958
3.41569e-07
0.000734962
3.13232e-07
0.000734966
2.8584e-07
0.00073497
2.59772e-07
0.000734974
2.35264e-07
0.000734977
2.12441e-07
0.00073498
1.91351e-07
1.71984e-07
0.000734983
0.000755295
1.14633e-07
0.000755296
2.63278e-07
0.000755298
3.62564e-07
0.0007553
4.25048e-07
0.000755304
4.60023e-07
0.000755308
4.7452e-07
0.000755312
4.73973e-07
0.000755317
4.62624e-07
0.000755322
4.43788e-07
0.000755328
4.20036e-07
0.000755333
3.9334e-07
0.000755338
3.65187e-07
0.000755343
3.36673e-07
0.000755348
3.08588e-07
0.000755352
2.8148e-07
0.000755356
2.55715e-07
0.00075536
2.31515e-07
0.000755363
2.08998e-07
0.000755366
1.88205e-07
1.69122e-07
0.000755369
0.000776241
1.14072e-07
0.000776242
2.6185e-07
0.000776244
3.60288e-07
0.000776248
4.21944e-07
0.000776251
4.56157e-07
0.000776256
4.70011e-07
0.000776261
4.6897e-07
0.000776266
4.5729e-07
0.000776272
4.3828e-07
0.000776277
4.14493e-07
0.000776283
3.87878e-07
0.000776288
3.59895e-07
0.000776293
3.31618e-07
0.000776298
3.03815e-07
0.000776302
2.77017e-07
0.000776306
2.51574e-07
0.00077631
2.27699e-07
0.000776314
2.05501e-07
0.000776317
1.85015e-07
1.66224e-07
0.00077632
0.000797767
1.13353e-07
0.000797769
2.60065e-07
0.000797772
3.57543e-07
0.000797775
4.18326e-07
0.00079778
4.51779e-07
0.000797785
4.6502e-07
0.00079779
4.63534e-07
0.000797796
4.51578e-07
0.000797802
4.32449e-07
0.000797808
4.0868e-07
0.000797813
3.82192e-07
0.000797819
3.54421e-07
0.000797824
3.26415e-07
0.000797829
2.98922e-07
0.000797833
2.72456e-07
0.000797838
2.47355e-07
0.000797842
2.23819e-07
0.000797845
2.01952e-07
0.000797848
1.81783e-07
1.63292e-07
0.000797851
0.000819891
1.1248e-07
0.000819893
2.57939e-07
0.000819896
3.54352e-07
0.0008199
4.14219e-07
0.000819905
4.46915e-07
0.00081991
4.59575e-07
0.000819916
4.57691e-07
0.000819922
4.45512e-07
0.000819929
4.26318e-07
0.000819935
4.02615e-07
0.00081994
3.76298e-07
0.000819946
3.48775e-07
0.000819951
3.21072e-07
0.000819956
2.93916e-07
0.000819961
2.67804e-07
0.000819965
2.43061e-07
0.000819969
2.1988e-07
0.000819973
1.98355e-07
0.000819976
1.78513e-07
1.60329e-07
0.000819979
0.000842628
1.11461e-07
0.00084263
2.55487e-07
0.000842634
3.50737e-07
0.000842638
4.09651e-07
0.000842644
4.41594e-07
0.00084265
4.53703e-07
0.000842656
4.51466e-07
0.000842662
4.39116e-07
0.000842669
4.19906e-07
0.000842675
3.96316e-07
0.000842681
3.70211e-07
0.000842687
3.42972e-07
0.000842692
3.15601e-07
0.000842697
2.88805e-07
0.000842702
2.63067e-07
0.000842707
2.387e-07
0.000842711
2.15885e-07
0.000842714
1.94714e-07
0.000842717
1.75206e-07
1.57336e-07
0.00084272
0.000865995
1.10303e-07
0.000865998
2.52728e-07
0.000866002
3.46722e-07
0.000866007
4.04649e-07
0.000866013
4.35845e-07
0.000866019
4.47434e-07
0.000866026
4.44886e-07
0.000866032
4.32412e-07
0.000866039
4.13233e-07
0.000866046
3.89799e-07
0.000866052
3.63944e-07
0.000866058
3.37022e-07
0.000866063
3.10011e-07
0.000866069
2.83598e-07
0.000866073
2.58253e-07
0.000866078
2.34275e-07
0.000866082
2.1184e-07
0.000866086
1.91031e-07
0.000866089
1.71866e-07
1.54316e-07
0.000866092
0.000890011
1.09014e-07
0.000890014
2.49678e-07
0.000890018
3.42332e-07
0.000890024
3.9924e-07
0.00089003
4.29696e-07
0.000890036
4.40795e-07
0.000890043
4.37978e-07
0.00089005
4.25423e-07
0.000890057
4.0632e-07
0.000890064
3.83082e-07
0.00089007
3.57513e-07
0.000890077
3.30937e-07
0.000890082
3.04311e-07
0.000890088
2.78303e-07
0.000890092
2.53367e-07
0.000890097
2.29793e-07
0.000890101
2.07748e-07
0.000890105
1.8731e-07
0.000890108
1.68495e-07
1.51271e-07
0.000890111
0.000914692
1.07603e-07
0.000914696
2.46358e-07
0.0009147
3.3759e-07
0.000914706
3.93454e-07
0.000914713
4.23177e-07
0.00091472
4.33813e-07
0.000914727
4.30766e-07
0.000914734
4.18173e-07
0.000914741
3.99186e-07
0.000914748
3.76182e-07
0.000914755
3.5093e-07
0.000914761
3.24729e-07
0.000914767
2.98511e-07
0.000914772
2.72927e-07
0.000914777
2.48415e-07
0.000914782
2.25258e-07
0.000914786
2.03613e-07
0.00091479
1.83556e-07
0.000914793
1.65097e-07
1.48204e-07
0.000914796
0.000940058
1.06077e-07
0.000940062
2.42784e-07
0.000940067
3.32524e-07
0.000940073
3.87317e-07
0.00094008
4.16316e-07
0.000940087
4.26516e-07
0.000940095
4.23275e-07
0.000940102
4.10684e-07
0.00094011
3.91851e-07
0.000940117
3.69114e-07
0.000940123
3.44211e-07
0.00094013
3.1841e-07
0.000940136
2.92621e-07
0.000940141
2.67477e-07
0.000940146
2.43405e-07
0.000940151
2.20675e-07
0.000940155
1.99441e-07
0.000940159
1.79771e-07
0.000940162
1.61674e-07
1.45117e-07
0.000940165
0.000966128
1.04445e-07
0.000966131
2.38977e-07
0.000966137
3.27157e-07
0.000966143
3.80859e-07
0.00096615
4.09141e-07
0.000966158
4.18932e-07
0.000966166
4.1553e-07
0.000966174
4.02976e-07
0.000966181
3.84332e-07
0.000966188
3.61895e-07
0.000966195
3.37367e-07
0.000966202
3.1199e-07
0.000966207
2.86649e-07
0.000966213
2.61963e-07
0.000966218
2.38343e-07
0.000966223
2.16051e-07
0.000966227
1.95235e-07
0.000966231
1.75959e-07
0.000966234
1.5823e-07
1.42013e-07
0.000966237
0.00099292
1.02716e-07
0.000992924
2.34956e-07
0.00099293
3.21516e-07
0.000992936
3.74107e-07
0.000992944
4.01681e-07
0.000992952
4.11086e-07
0.00099296
4.07555e-07
0.000992968
3.95072e-07
0.000992975
3.76649e-07
0.000992983
3.5454e-07
0.00099299
3.30413e-07
0.000992996
3.05479e-07
0.000993002
2.80605e-07
0.000993008
2.5639e-07
0.000993013
2.33234e-07
0.000993017
2.1139e-07
0.000993022
1.90999e-07
0.000993026
1.72123e-07
0.000993029
1.54766e-07
1.38894e-07
0.000993032
0.00102046
1.00898e-07
0.00102046
2.30739e-07
0.00102047
3.15624e-07
0.00102047
3.67089e-07
0.00102048
3.93962e-07
0.00102049
4.03004e-07
0.0010205
3.99374e-07
0.0010205
3.86992e-07
0.00102051
3.68819e-07
0.00102052
3.47064e-07
0.00102053
3.2336e-07
0.00102053
2.9889e-07
0.00102054
2.74498e-07
0.00102055
2.50767e-07
0.00102055
2.28085e-07
0.00102056
2.06697e-07
0.00102056
1.86738e-07
0.00102056
1.68268e-07
0.00102057
1.51287e-07
1.35762e-07
0.00102057
0.00104875
9.89998e-08
0.00104876
2.26345e-07
0.00104876
3.09507e-07
0.00104877
3.5983e-07
0.00104878
3.86012e-07
0.00104879
3.94711e-07
0.0010488
3.91008e-07
0.0010488
3.78756e-07
0.00104881
3.60859e-07
0.00104882
3.39482e-07
0.00104883
3.16221e-07
0.00104883
2.92232e-07
0.00104884
2.68336e-07
0.00104885
2.451e-07
0.00104885
2.22902e-07
0.00104886
2.01977e-07
0.00104886
1.82457e-07
0.00104886
1.64396e-07
0.00104887
1.47796e-07
1.32621e-07
0.00104887
0.00107784
9.70287e-08
0.00107784
2.21793e-07
0.00107785
3.03188e-07
0.00107786
3.52357e-07
0.00107786
3.77856e-07
0.00107787
3.86232e-07
0.00107788
3.8248e-07
0.00107789
3.70382e-07
0.0010779
3.52785e-07
0.00107791
3.31808e-07
0.00107791
3.09008e-07
0.00107792
2.85515e-07
0.00107793
2.62128e-07
0.00107793
2.39398e-07
0.00107794
2.1769e-07
0.00107794
1.97235e-07
0.00107795
1.78158e-07
0.00107795
1.60511e-07
0.00107795
1.44295e-07
1.29472e-07
0.00107796
0.00110773
9.49937e-08
0.00110773
2.17099e-07
0.00110774
2.96689e-07
0.00110775
3.44696e-07
0.00110776
3.69518e-07
0.00110776
3.7759e-07
0.00110777
3.73811e-07
0.00110778
3.6189e-07
0.00110779
3.44614e-07
0.0011078
3.24054e-07
0.0011078
3.01733e-07
0.00110781
2.78749e-07
0.00110782
2.55881e-07
0.00110782
2.33665e-07
0.00110783
2.12457e-07
0.00110783
1.92477e-07
0.00110784
1.73847e-07
0.00110784
1.56617e-07
0.00110784
1.40786e-07
1.26318e-07
0.00110785
0.00113845
9.29015e-08
0.00113845
2.1228e-07
0.00113846
2.90033e-07
0.00113847
3.36868e-07
0.00113847
3.61023e-07
0.00113848
3.68806e-07
0.00113849
3.6502e-07
0.0011385
3.53296e-07
0.00113851
3.3636e-07
0.00113852
3.16236e-07
0.00113852
2.94406e-07
0.00113853
2.71943e-07
0.00113854
2.49604e-07
0.00113854
2.2791e-07
0.00113855
2.07206e-07
0.00113855
1.87706e-07
0.00113856
1.69527e-07
0.00113856
1.52717e-07
0.00113857
1.37274e-07
1.23162e-07
0.00113857
0.00117002
9.07604e-08
0.00117002
2.07354e-07
0.00117003
2.83242e-07
0.00117004
3.28899e-07
0.00117005
3.52393e-07
0.00117006
3.59902e-07
0.00117006
3.56127e-07
0.00117007
3.44618e-07
0.00117008
3.28039e-07
0.00117009
3.08364e-07
0.0011701
2.87038e-07
0.0011701
2.65106e-07
0.00117011
2.43304e-07
0.00117012
2.22138e-07
0.00117012
2.01943e-07
0.00117013
1.82927e-07
0.00117013
1.65202e-07
0.00117013
1.48814e-07
0.00117014
1.33761e-07
1.20006e-07
0.00117014
0.00120246
8.85765e-08
0.00120247
2.02335e-07
0.00120248
2.76333e-07
0.00120248
3.20808e-07
0.00120249
3.43649e-07
0.0012025
3.50898e-07
0.00120251
3.47149e-07
0.00120252
3.35872e-07
0.00120253
3.19664e-07
0.00120254
3.0045e-07
0.00120254
2.79639e-07
0.00120255
2.58247e-07
0.00120256
2.36988e-07
0.00120256
2.16356e-07
0.00120257
1.96675e-07
0.00120257
1.78145e-07
0.00120258
1.60876e-07
0.00120258
1.44912e-07
0.00120258
1.30249e-07
1.16852e-07
0.00120259
0.00123581
8.63572e-08
0.00123582
1.97238e-07
0.00123582
2.69328e-07
0.00123583
3.12617e-07
0.00123584
3.34812e-07
0.00123585
3.41812e-07
0.00123586
3.38104e-07
0.00123587
3.27072e-07
0.00123588
3.11247e-07
0.00123588
2.92506e-07
0.00123589
2.72219e-07
0.0012359
2.51373e-07
0.0012359
2.30664e-07
0.00123591
2.10569e-07
0.00123591
1.91404e-07
0.00123592
1.73363e-07
0.00123592
1.56552e-07
0.00123593
1.41013e-07
0.00123593
1.26741e-07
1.13703e-07
0.00123593
0.00127008
8.4108e-08
0.00127009
1.92076e-07
0.00127009
2.62242e-07
0.0012701
3.04345e-07
0.00127011
3.259e-07
0.00127012
3.32663e-07
0.00127013
3.29007e-07
0.00127014
3.18232e-07
0.00127015
3.02802e-07
0.00127015
2.84542e-07
0.00127016
2.64786e-07
0.00127017
2.44492e-07
0.00127018
2.24337e-07
0.00127018
2.04783e-07
0.00127019
1.86137e-07
0.00127019
1.68587e-07
0.0012702
1.52234e-07
0.0012702
1.3712e-07
0.0012702
1.2324e-07
1.1056e-07
0.00127021
0.0013053
8.18354e-08
0.00130531
1.86862e-07
0.00130532
2.55093e-07
0.00130532
2.96008e-07
0.00130533
3.1693e-07
0.00130534
3.23465e-07
0.00130535
3.19874e-07
0.00130536
3.09365e-07
0.00130537
2.94339e-07
0.00130538
2.76568e-07
0.00130538
2.57348e-07
0.00130539
2.37611e-07
0.0013054
2.18013e-07
0.0013054
1.99003e-07
0.00130541
1.80877e-07
0.00130541
1.63818e-07
0.00130542
1.47925e-07
0.00130542
1.33236e-07
0.00130542
1.19747e-07
1.07425e-07
0.00130543
0.0013415
7.95439e-08
0.00134151
1.81609e-07
0.00134151
2.47895e-07
0.00134152
2.87624e-07
0.00134153
3.07919e-07
0.00134154
3.14235e-07
0.00134155
3.10717e-07
0.00134156
3.00484e-07
0.00134157
2.85868e-07
0.00134157
2.68593e-07
0.00134158
2.49914e-07
0.00134159
2.30737e-07
0.0013416
2.11699e-07
0.0013416
1.93234e-07
0.00134161
1.75629e-07
0.00134161
1.59062e-07
0.00134162
1.43628e-07
0.00134162
1.29364e-07
0.00134162
1.16266e-07
1.04301e-07
0.00134163
0.0013787
7.72394e-08
0.00137871
1.76325e-07
0.00137872
2.40663e-07
0.00137872
2.79207e-07
0.00137873
2.98881e-07
0.00137874
3.04986e-07
0.00137875
3.01549e-07
0.00137876
2.91599e-07
0.00137877
2.774e-07
0.00137878
2.60624e-07
0.00137878
2.4249e-07
0.00137879
2.23876e-07
0.0013788
2.05398e-07
0.0013788
1.87479e-07
0.00137881
1.70395e-07
0.00137881
1.5432e-07
0.00137882
1.39345e-07
0.00137882
1.25505e-07
0.00137882
1.12797e-07
1.01189e-07
0.00137883
0.00141694
7.49251e-08
0.00141694
1.71022e-07
0.00141695
2.33408e-07
0.00141696
2.7077e-07
0.00141697
2.89829e-07
0.00141698
2.95731e-07
0.00141699
2.92381e-07
0.00141699
2.8272e-07
0.001417
2.68942e-07
0.00141701
2.52669e-07
0.00141702
2.35083e-07
0.00141702
2.17033e-07
0.00141703
1.99117e-07
0.00141704
1.81743e-07
0.00141704
1.6518e-07
0.00141705
1.49596e-07
0.00141705
1.35078e-07
0.00141705
1.21662e-07
0.00141706
1.09343e-07
9.80903e-08
0.00141706
0.00145623
7.26063e-08
0.00145624
1.65708e-07
0.00145624
2.26142e-07
0.00145625
2.62326e-07
0.00145626
2.80776e-07
0.00145627
2.8648e-07
0.00145628
2.83223e-07
0.00145629
2.73855e-07
0.0014563
2.60503e-07
0.0014563
2.44736e-07
0.00145631
2.27698e-07
0.00145632
2.10212e-07
0.00145632
1.92858e-07
0.00145633
1.76029e-07
0.00145634
1.59987e-07
0.00145634
1.44892e-07
0.00145634
1.30831e-07
0.00145635
1.17837e-07
0.00145635
1.05905e-07
9.50066e-08
0.00145635
0.00149661
7.02852e-08
0.00149662
1.60389e-07
0.00149663
2.18874e-07
0.00149664
2.53884e-07
0.00149664
2.71731e-07
0.00149665
2.77242e-07
0.00149666
2.74083e-07
0.00149667
2.65013e-07
0.00149668
2.52088e-07
0.00149669
2.36828e-07
0.0014967
2.2034e-07
0.0014967
2.03419e-07
0.00149671
1.86625e-07
0.00149671
1.7034e-07
0.00149672
1.54817e-07
0.00149672
1.4021e-07
0.00149673
1.26604e-07
0.00149673
1.1403e-07
0.00149674
1.02485e-07
9.1939e-08
0.00149674
0.00153812
6.7966e-08
0.00153812
1.55074e-07
0.00153813
2.11613e-07
0.00153814
2.45455e-07
0.00153815
2.62703e-07
0.00153816
2.68026e-07
0.00153817
2.6497e-07
0.00153817
2.56199e-07
0.00153818
2.43704e-07
0.00153819
2.28951e-07
0.0015382
2.13012e-07
0.00153821
1.96655e-07
0.00153821
1.80421e-07
0.00153822
1.64679e-07
0.00153822
1.49673e-07
0.00153823
1.35553e-07
0.00153823
1.224e-07
0.00153823
1.10245e-07
0.00153824
9.90835e-08
8.88883e-08
0.00153824
0.00158077
6.56499e-08
0.00158078
1.49766e-07
0.00158078
2.04365e-07
0.00158079
2.37044e-07
0.0015808
2.53699e-07
0.00158081
2.58839e-07
0.00158082
2.55888e-07
0.00158083
2.47419e-07
0.00158084
2.35354e-07
0.00158085
2.2111e-07
0.00158085
2.05719e-07
0.00158086
1.89925e-07
0.00158087
1.74249e-07
0.00158087
1.59048e-07
0.00158088
1.44556e-07
0.00158088
1.30921e-07
0.00158088
1.18219e-07
0.00158089
1.0648e-07
0.00158089
9.57013e-08
8.58551e-08
0.0015809
0.00162461
6.33401e-08
0.00162461
1.44471e-07
0.00162462
1.97136e-07
0.00162463
2.28658e-07
0.00162464
2.44725e-07
0.00162465
2.49686e-07
0.00162466
2.46842e-07
0.00162467
2.38677e-07
0.00162467
2.27042e-07
0.00162468
2.13305e-07
0.00162469
1.98462e-07
0.0016247
1.83229e-07
0.0016247
1.68109e-07
0.00162471
1.53446e-07
0.00162471
1.39468e-07
0.00162472
1.26315e-07
0.00162472
1.14062e-07
0.00162473
1.02737e-07
0.00162473
9.23388e-08
8.28398e-08
0.00162473
0.00166966
6.10369e-08
0.00166967
1.39191e-07
0.00166967
1.8993e-07
0.00166968
2.20301e-07
0.00166969
2.35784e-07
0.0016697
2.40569e-07
0.00166971
2.37835e-07
0.00166972
2.29974e-07
0.00166973
2.1877e-07
0.00166973
2.0554e-07
0.00166974
1.91242e-07
0.00166975
1.76568e-07
0.00166975
1.62002e-07
0.00166976
1.47876e-07
0.00166977
1.34409e-07
0.00166977
1.21735e-07
0.00166977
1.09928e-07
0.00166978
9.90166e-08
0.00166978
8.89963e-08
7.98425e-08
0.00166978
0.00171596
5.87424e-08
0.00171597
1.33929e-07
0.00171598
1.82748e-07
0.00171599
2.11975e-07
0.00171599
2.26879e-07
0.001716
2.3149e-07
0.00171601
2.28868e-07
0.00171602
2.21312e-07
0.00171603
2.10538e-07
0.00171604
1.97813e-07
0.00171604
1.8406e-07
0.00171605
1.69943e-07
0.00171606
1.55929e-07
0.00171606
1.42337e-07
0.00171607
1.29378e-07
0.00171607
1.17182e-07
0.00171608
1.05819e-07
0.00171608
9.53174e-08
0.00171608
8.56733e-08
7.68629e-08
0.00171609
0.00176355
5.64558e-08
0.00176356
1.28684e-07
0.00176356
1.75592e-07
0.00176357
2.0368e-07
0.00176358
2.18009e-07
0.00176359
2.22451e-07
0.0017636
2.19941e-07
0.00176361
2.1269e-07
0.00176362
2.02346e-07
0.00176362
1.90125e-07
0.00176363
1.76915e-07
0.00176364
1.63353e-07
0.00176364
1.49888e-07
0.00176365
1.36828e-07
0.00176365
1.24374e-07
0.00176366
1.12653e-07
0.00176366
1.01733e-07
0.00176367
9.16391e-08
0.00176367
8.23692e-08
7.39003e-08
0.00176367
0.00181246
5.41782e-08
0.00181246
1.23457e-07
0.00181247
1.68461e-07
0.00181248
1.95415e-07
0.00181249
2.09173e-07
0.0018125
2.13447e-07
0.0018125
2.11051e-07
0.00181251
2.04106e-07
0.00181252
1.94191e-07
0.00181253
1.82473e-07
0.00181254
1.69803e-07
0.00181254
1.56794e-07
0.00181255
1.43877e-07
0.00181255
1.31346e-07
0.00181256
1.19396e-07
0.00181256
1.08148e-07
0.00181257
9.76678e-08
0.00181257
8.79801e-08
0.00181257
7.90827e-08
7.09535e-08
0.00181258
0.00186272
5.19072e-08
0.00186272
1.18243e-07
0.00186273
1.61349e-07
0.00186274
1.87175e-07
0.00186275
2.00366e-07
0.00186276
2.04474e-07
0.00186277
2.02194e-07
0.00186277
1.95555e-07
0.00186278
1.86068e-07
0.00186279
1.74852e-07
0.0018628
1.62722e-07
0.0018628
1.50265e-07
0.00186281
1.37893e-07
0.00186282
1.25889e-07
0.00186282
1.14441e-07
0.00186283
1.03664e-07
0.00186283
9.3622e-08
0.00186283
8.43387e-08
0.00186284
7.58119e-08
6.8021e-08
0.00186284
0.00191438
4.96424e-08
0.00191438
1.13041e-07
0.00191439
1.54253e-07
0.0019144
1.78954e-07
0.0019144
1.91581e-07
0.00191441
1.95526e-07
0.00191442
1.93363e-07
0.00191443
1.8703e-07
0.00191444
1.77972e-07
0.00191445
1.67257e-07
0.00191445
1.55666e-07
0.00191446
1.43759e-07
0.00191447
1.31931e-07
0.00191447
1.20454e-07
0.00191448
1.09506e-07
0.00191448
9.91984e-08
0.00191448
8.95927e-08
0.00191449
8.07121e-08
0.00191449
7.25546e-08
6.51006e-08
0.00191449
0.00196746
4.73802e-08
0.00196747
1.07842e-07
0.00196748
1.47163e-07
0.00196748
1.70742e-07
0.00196749
1.82807e-07
0.0019675
1.86592e-07
0.00196751
1.84547e-07
0.00196752
1.78522e-07
0.00196753
1.69893e-07
0.00196753
1.5968e-07
0.00196754
1.48627e-07
0.00196755
1.3727e-07
0.00196755
1.25985e-07
0.00196756
1.15033e-07
0.00196756
1.04584e-07
0.00196757
9.47453e-08
0.00196757
8.55753e-08
0.00196758
7.70966e-08
0.00196758
6.93076e-08
6.21896e-08
0.00196758
0.00202202
4.51172e-08
0.00202203
1.02637e-07
0.00202204
1.40067e-07
0.00202205
1.62526e-07
0.00202205
1.74031e-07
0.00202206
1.77657e-07
0.00202207
1.75734e-07
0.00202208
1.70019e-07
0.00202209
1.61821e-07
0.0020221
1.52111e-07
0.0020221
1.41597e-07
0.00202211
1.3079e-07
0.00202212
1.20049e-07
0.00202212
1.09621e-07
0.00202213
9.96711e-08
0.00202213
9.03004e-08
0.00202213
8.15653e-08
0.00202214
7.34877e-08
0.00202214
6.60665e-08
5.92839e-08
0.00202214
0.0020781
4.28482e-08
0.0020781
9.74157e-08
0.00207811
1.32949e-07
0.00207812
1.54286e-07
0.00207813
1.65234e-07
0.00207814
1.68704e-07
0.00207815
1.66905e-07
0.00207815
1.61502e-07
0.00207816
1.53738e-07
0.00207817
1.44532e-07
0.00207818
1.3456e-07
0.00207818
1.24304e-07
0.00207819
1.14108e-07
0.00207819
1.04206e-07
0.0020782
9.4756e-08
0.0020782
8.58545e-08
0.00207821
7.75553e-08
0.00207821
6.98797e-08
0.00207821
6.28268e-08
5.638e-08
0.00207822
0.00213573
4.05663e-08
0.00213573
9.21604e-08
0.00213574
1.25787e-07
0.00213575
1.45999e-07
0.00213576
1.5639e-07
0.00213577
1.59708e-07
0.00213577
1.58039e-07
0.00213578
1.52954e-07
0.00213579
1.45628e-07
0.0021358
1.36933e-07
0.00213581
1.27506e-07
0.00213581
1.17805e-07
0.00213582
1.08156e-07
0.00213582
9.87834e-08
0.00213583
8.98342e-08
0.00213583
8.14021e-08
0.00213584
7.3539e-08
0.00213584
6.62655e-08
0.00213584
5.95811e-08
5.34704e-08
0.00213585
0.00219495
3.82624e-08
0.00219496
8.68491e-08
0.00219497
1.18552e-07
0.00219498
1.37632e-07
0.00219498
1.47467e-07
0.00219499
1.50636e-07
0.002195
1.49101e-07
0.00219501
1.44339e-07
0.00219502
1.37458e-07
0.00219503
1.29279e-07
0.00219503
1.20402e-07
0.00219504
1.11261e-07
0.00219505
1.02165e-07
0.00219505
9.33255e-08
0.00219506
8.48824e-08
0.00219506
7.69256e-08
0.00219507
6.95036e-08
0.00219507
6.26363e-08
0.00219507
5.63237e-08
5.05516e-08
0.00219508
0.00225582
3.59244e-08
0.00225583
8.14528e-08
0.00225584
1.11205e-07
0.00225585
1.29144e-07
0.00225585
1.38422e-07
0.00225586
1.41451e-07
0.00225587
1.40061e-07
0.00225588
1.35637e-07
0.00225589
1.29214e-07
0.0022559
1.21563e-07
0.0022559
1.13247e-07
0.00225591
1.04676e-07
0.00225592
9.61389e-08
0.00225592
8.7837e-08
0.00225593
7.99032e-08
0.00225593
7.24217e-08
0.00225594
6.5441e-08
0.00225594
5.89805e-08
0.00225594
5.30407e-08
4.76087e-08
0.00225595
0.00231838
3.35354e-08
0.00231839
7.59307e-08
0.00231839
1.03694e-07
0.0023184
1.20475e-07
0.00231841
1.29195e-07
0.00231842
1.32087e-07
0.00231843
1.30852e-07
0.00231844
1.26773e-07
0.00231845
1.20818e-07
0.00231846
1.13705e-07
0.00231846
1.05962e-07
0.00231847
9.79719e-08
0.00231848
9.00072e-08
0.00231848
8.22563e-08
0.00231849
7.4845e-08
0.00231849
6.78551e-08
0.0023185
6.13292e-08
0.0023185
5.52866e-08
0.0023185
4.97282e-08
4.46429e-08
0.00231851
0.00238267
3.1073e-08
0.00238268
7.02272e-08
0.00238269
9.59463e-08
0.0023827
1.11551e-07
0.00238271
1.19717e-07
0.00238272
1.22493e-07
0.00238273
1.21441e-07
0.00238273
1.17741e-07
0.00238274
1.12286e-07
0.00238275
1.05738e-07
0.00238276
9.85894e-08
0.00238276
9.11968e-08
0.00238277
8.38151e-08
0.00238278
7.6622e-08
0.00238278
6.97364e-08
0.00238279
6.32328e-08
0.00238279
5.71586e-08
0.00238279
5.15324e-08
0.0023828
4.6356e-08
4.16195e-08
0.0023828
0.00244875
2.85044e-08
0.00244876
6.42614e-08
0.00244876
8.78581e-08
0.00244877
1.02254e-07
0.00244878
1.09859e-07
0.00244879
1.12524e-07
0.0024488
1.11663e-07
0.00244881
1.08355e-07
0.00244882
1.03414e-07
0.00244883
9.74527e-08
0.00244884
9.09235e-08
0.00244884
8.41571e-08
0.00244885
7.73897e-08
0.00244886
7.07864e-08
0.00244886
6.4459e-08
0.00244887
5.84832e-08
0.00244887
5.28943e-08
0.00244887
4.7711e-08
0.00244888
4.29366e-08
3.85632e-08
0.00244888
0.00251666
2.57819e-08
0.00251666
5.79163e-08
0.00251667
7.92899e-08
0.00251668
9.24559e-08
0.00251669
9.95296e-08
0.0025167
1.02143e-07
0.00251671
1.0155e-07
0.00251672
9.87096e-08
0.00251673
9.43523e-08
0.00251674
8.90307e-08
0.00251675
8.31584e-08
0.00251675
7.70403e-08
0.00251676
7.08976e-08
0.00251677
6.48863e-08
0.00251677
5.91115e-08
0.00251678
5.36373e-08
0.00251678
4.85154e-08
0.00251679
4.37645e-08
0.00251679
3.93883e-08
3.538e-08
0.00251679
0.00258645
2.28282e-08
0.00258646
5.10089e-08
0.00258646
7.00051e-08
0.00258648
8.18715e-08
0.00258649
8.83844e-08
0.0025865
9.09392e-08
0.00258651
9.06206e-08
0.00258652
8.82686e-08
0.00258653
8.45308e-08
0.00258654
7.99014e-08
0.00258655
7.47522e-08
0.00258655
6.93585e-08
0.00258656
6.39205e-08
0.00258657
5.85801e-08
0.00258657
5.34377e-08
0.00258658
4.85684e-08
0.00258658
4.39937e-08
0.00258659
3.97349e-08
0.00258659
3.57992e-08
3.21837e-08
0.00258659
0.00265818
1.95163e-08
0.00265818
4.32525e-08
0.00265819
5.97578e-08
0.0026582
7.03646e-08
0.00265822
7.64391e-08
0.00265823
7.91021e-08
0.00265824
7.92343e-08
0.00265825
7.75293e-08
0.00265826
7.45347e-08
0.00265827
7.06801e-08
0.00265828
6.62977e-08
0.00265829
6.16411e-08
0.00265829
5.6899e-08
0.0026583
5.2209e-08
0.00265831
4.76636e-08
0.00265831
4.33135e-08
0.00265832
3.92286e-08
0.00265832
3.54284e-08
0.00265832
3.19193e-08
2.86989e-08
0.00265833
0.00273189
1.57222e-08
0.0027319
3.40198e-08
0.00273191
4.77302e-08
0.00273193
5.69274e-08
0.00273194
6.25117e-08
0.00273195
6.52945e-08
0.00273197
6.59364e-08
0.00273198
6.49805e-08
0.00273199
6.28714e-08
0.002732
5.99662e-08
0.00273201
5.65463e-08
0.00273202
5.28294e-08
0.00273203
4.89813e-08
0.00273204
4.51249e-08
0.00273204
4.13563e-08
0.00273205
3.77635e-08
0.00273205
3.43415e-08
0.00273206
3.11202e-08
0.00273206
2.81163e-08
2.53357e-08
0.00273206
0.00280765
1.0754e-08
0.00280766
2.31403e-08
0.00280768
3.41003e-08
0.00280769
4.20302e-08
0.00280771
4.73819e-08
0.00280772
5.05845e-08
0.00280773
5.20191e-08
0.00280775
5.20433e-08
0.00280776
5.09825e-08
0.00280777
4.91215e-08
0.00280778
4.67012e-08
0.00280779
4.39197e-08
0.0028078
4.09353e-08
0.0028078
3.78709e-08
0.00280781
3.48087e-08
0.00280782
3.17802e-08
0.00280782
2.89035e-08
0.00280783
2.62e-08
0.00280783
2.36818e-08
2.13543e-08
0.00280784
0.00288552
0.00288553
0.00288555
0.00288557
0.00288559
0.00288561
0.00288563
0.00288564
0.00288566
0.00288567
0.00288568
0.00288569
0.0028857
0.00288571
0.00288572
0.00288572
0.00288573
0.00288573
0.00288573
0.00288574
0.000191404
6.47854e-07
0.000190925
4.78212e-07
0.00019048
4.45656e-07
0.000190067
4.13071e-07
0.000189666
4.00249e-07
0.000189268
3.98108e-07
0.00018887
3.98753e-07
0.000188469
4.00249e-07
0.000188067
4.01983e-07
0.000187664
4.03516e-07
0.000187259
4.04773e-07
0.000186853
4.05713e-07
0.000186447
4.06441e-07
0.00018604
4.06943e-07
0.000185633
4.07347e-07
0.000185225
4.07617e-07
0.000184817
4.07886e-07
0.000184409
4.08084e-07
0.000184001
4.08354e-07
0.000183592
4.08587e-07
0.000183183
4.08948e-07
0.000182774
4.09287e-07
0.000182364
4.09798e-07
0.000181954
4.10287e-07
0.000181543
4.10988e-07
0.000181131
4.11654e-07
0.000180718
4.12569e-07
0.000180305
4.13428e-07
0.00017989
4.14574e-07
0.000179475
4.15635e-07
0.000179058
4.17023e-07
0.00017864
4.18289e-07
0.00017822
4.19927e-07
0.000177798
4.21397e-07
0.000177375
4.2329e-07
0.00017695
4.24961e-07
0.000176523
4.27111e-07
0.000176094
4.28979e-07
0.000175662
4.31385e-07
0.000175229
4.33444e-07
0.000174793
4.36105e-07
0.000174355
4.38347e-07
0.000173913
4.41257e-07
0.00017347
4.43674e-07
0.000173023
4.46824e-07
0.000172573
4.49408e-07
0.000172121
4.52783e-07
0.000171665
4.55526e-07
0.000171206
4.59105e-07
0.000170744
4.61999e-07
0.000170278
4.65755e-07
0.000169809
4.68791e-07
0.000169337
4.72689e-07
0.000168861
4.7586e-07
0.000168381
4.79856e-07
0.000167898
4.83154e-07
0.000167411
4.87197e-07
0.00016692
4.90611e-07
0.000166425
4.94642e-07
0.000165927
4.98154e-07
0.000165425
5.02117e-07
0.00016492
5.05695e-07
0.00016441
5.09542e-07
0.000163897
5.13126e-07
0.00016338
5.16834e-07
0.00016286
5.20317e-07
0.000162336
5.23917e-07
0.000161809
5.27107e-07
0.000161278
5.30729e-07
0.000160745
5.33298e-07
0.000160207
5.37235e-07
0.000159669
5.38642e-07
0.000159125
5.43468e-07
0.000158582
5.42818e-07
0.000158033
5.49538e-07
0.000157487
5.45505e-07
0.000156932
5.55607e-07
0.000156385
5.46927e-07
0.000155826
5.58585e-07
5.68422e-07
0.000197404
4.56503e-07
0.00019741
4.71571e-07
0.000197376
4.79812e-07
0.000197302
4.87829e-07
0.000197206
4.95539e-07
0.000197101
5.03754e-07
0.000196988
5.11427e-07
0.00019687
5.18586e-07
0.000196746
5.25402e-07
0.000196618
5.31825e-07
0.000196485
5.37899e-07
0.000196347
5.4362e-07
0.000196204
5.4907e-07
0.000196057
5.54223e-07
0.000195905
5.59175e-07
0.000195749
5.63879e-07
0.000195588
5.68454e-07
0.000195424
5.72824e-07
0.000195255
5.77133e-07
0.000195082
5.81271e-07
0.000194906
5.85414e-07
0.000194725
5.89406e-07
0.000194542
5.9347e-07
0.000194355
5.97392e-07
0.000194164
6.01451e-07
0.000193971
6.05364e-07
0.000193774
6.09483e-07
0.000193574
6.13438e-07
0.00019337
6.17672e-07
0.000193164
6.2171e-07
0.000192955
6.26108e-07
0.000192743
6.30262e-07
0.000192528
6.34866e-07
0.000192311
6.39161e-07
0.00019209
6.44009e-07
0.000191866
6.48465e-07
0.00019164
6.53593e-07
0.000191411
6.58225e-07
0.000191178
6.63662e-07
0.000190943
6.6848e-07
0.000190705
6.74257e-07
0.000190464
6.79266e-07
0.00019022
6.85407e-07
0.000189973
6.90609e-07
0.000189723
6.97137e-07
0.00018947
7.02532e-07
0.000189213
7.09464e-07
0.000188954
7.15047e-07
0.00018869
7.22395e-07
0.000188424
7.28161e-07
0.000188154
7.3593e-07
0.000187881
7.4187e-07
0.000187604
7.5006e-07
0.000187323
7.56161e-07
0.000187038
7.64762e-07
0.00018675
7.71009e-07
0.000186458
7.80007e-07
0.000186162
7.86374e-07
0.000185861
7.95751e-07
0.000185557
8.02198e-07
0.000185247
8.11941e-07
0.000184934
8.18404e-07
0.000184615
8.28516e-07
0.000184293
8.34883e-07
0.000183965
8.45411e-07
0.000183634
8.51493e-07
0.000183295
8.62557e-07
0.000182954
8.68049e-07
0.000182605
8.799e-07
0.000182254
8.84312e-07
0.000181894
8.97397e-07
0.000181532
8.9999e-07
0.000181161
9.15046e-07
0.000180789
9.14753e-07
0.000180406
9.32828e-07
0.000180023
9.28484e-07
0.000179628
9.5048e-07
0.000179232
9.42653e-07
0.000178828
9.62828e-07
9.92234e-07
0.000202873
3.5567e-07
0.000202919
4.24863e-07
0.000202937
4.61961e-07
0.000202936
4.89394e-07
0.00020292
5.10811e-07
0.000202895
5.28644e-07
0.000202863
5.44155e-07
0.000202823
5.5814e-07
0.000202777
5.71079e-07
0.000202726
5.8317e-07
0.000202669
5.9458e-07
0.000202608
6.05399e-07
0.000202541
6.15744e-07
0.000202469
6.25642e-07
0.000202393
6.35195e-07
0.000202313
6.44391e-07
0.000202228
6.53337e-07
0.000202139
6.61988e-07
0.000202046
6.70467e-07
0.000201948
6.78694e-07
0.000201847
6.86821e-07
0.000201741
6.94724e-07
0.000201632
7.02599e-07
0.000201519
7.10263e-07
0.000201403
7.17972e-07
0.000201283
7.25472e-07
0.000201159
7.33094e-07
0.000201032
7.40492e-07
0.000200902
7.481e-07
0.000200768
7.55452e-07
0.000200631
7.63113e-07
0.000200491
7.70466e-07
0.000200347
7.78243e-07
0.000200201
7.85636e-07
0.000200051
7.9359e-07
0.000199899
8.01058e-07
0.000199743
8.09246e-07
0.000199584
8.16814e-07
0.000199423
8.25294e-07
0.000199258
8.32983e-07
0.000199091
8.41809e-07
0.00019892
8.49633e-07
0.000198747
8.5886e-07
0.000198571
8.66826e-07
0.000198391
8.76509e-07
0.000198209
8.84619e-07
0.000198024
8.94809e-07
0.000197836
9.03058e-07
0.000197645
9.13808e-07
0.000197451
9.22186e-07
0.000197253
9.33545e-07
0.000197053
9.42032e-07
0.000196849
9.54048e-07
0.000196642
9.62621e-07
0.000196432
9.75338e-07
0.000196219
9.8396e-07
0.000196001
9.97425e-07
0.000195782
1.00605e-06
0.000195557
1.02031e-06
0.00019533
1.02886e-06
0.000195098
1.04398e-06
0.000194864
1.05235e-06
0.000194625
1.06842e-06
0.000194383
1.07645e-06
0.000194135
1.09361e-06
0.000193885
1.10106e-06
0.000193628
1.11952e-06
0.00019337
1.12601e-06
0.000193104
1.14613e-06
0.000192837
1.15111e-06
0.000192561
1.17341e-06
0.000192285
1.17614e-06
0.000191999
1.20133e-06
0.000191713
1.20092e-06
0.000191416
1.22972e-06
0.000191119
1.22574e-06
0.000190811
1.25782e-06
0.0001905
1.25347e-06
0.000190183
1.27979e-06
1.3261e-06
0.000208487
3.09617e-07
0.000208531
3.81559e-07
0.000208562
4.30902e-07
0.000208582
4.68975e-07
0.000208593
4.99679e-07
0.000208597
5.25336e-07
0.000208593
5.47582e-07
0.000208584
5.67485e-07
0.000208569
5.8572e-07
0.00020855
6.02681e-07
0.000208526
6.1865e-07
0.000208497
6.33813e-07
0.000208465
6.48331e-07
0.000208428
6.62289e-07
0.000208387
6.75797e-07
0.000208343
6.88885e-07
0.000208294
7.01649e-07
0.000208242
7.14078e-07
0.000208187
7.26275e-07
0.000208127
7.38191e-07
0.000208064
7.49948e-07
0.000207997
7.61459e-07
0.000207927
7.7288e-07
0.000207853
7.84072e-07
0.000207776
7.95244e-07
0.000207695
8.06189e-07
0.000207611
8.17191e-07
0.000207524
8.27953e-07
0.000207433
8.38858e-07
0.000207339
8.49493e-07
0.000207242
8.60371e-07
0.000207141
8.70927e-07
0.000207037
8.81848e-07
0.000206931
8.92367e-07
0.000206821
9.03399e-07
0.000206708
9.13917e-07
0.000206592
9.2513e-07
0.000206473
9.35677e-07
0.000206351
9.47141e-07
0.000206227
9.57738e-07
0.000206099
9.69526e-07
0.000205968
9.80188e-07
0.000205835
9.92376e-07
0.000205699
1.00311e-06
0.000205559
1.01577e-06
0.000205417
1.02658e-06
0.000205272
1.0398e-06
0.000205125
1.05066e-06
0.000204974
1.06453e-06
0.000204821
1.07543e-06
0.000204664
1.09004e-06
0.000204505
1.10094e-06
0.000204343
1.11637e-06
0.000204179
1.12723e-06
0.00020401
1.14359e-06
0.00020384
1.15434e-06
0.000203666
1.17174e-06
0.000203489
1.18229e-06
0.000203309
1.20086e-06
0.000203127
1.21111e-06
0.00020294
1.23098e-06
0.000202751
1.24077e-06
0.000202557
1.26212e-06
0.000202363
1.27123e-06
0.000202162
1.29431e-06
0.000201961
1.30244e-06
0.000201753
1.32755e-06
0.000201544
1.33428e-06
0.000201328
1.36186e-06
0.000201113
1.36664e-06
0.000200889
1.39723e-06
0.000200666
1.39938e-06
0.000200434
1.43359e-06
0.000200202
1.43256e-06
0.000199961
1.47061e-06
0.00019972
1.46693e-06
0.000199471
1.50715e-06
0.000199217
1.50665e-06
0.00019896
1.53729e-06
1.59795e-06
0.00021428
2.85823e-07
0.000214312
3.49761e-07
0.000214341
4.01093e-07
0.000214367
4.43836e-07
0.000214386
4.79942e-07
0.000214401
5.10978e-07
0.00021441
5.38273e-07
0.000214415
5.62828e-07
0.000214415
5.85346e-07
0.000214411
6.063e-07
0.000214404
6.26039e-07
0.000214393
6.44805e-07
0.000214378
6.62797e-07
0.000214361
6.80142e-07
0.000214339
6.96964e-07
0.000214315
7.13325e-07
0.000214287
7.2932e-07
0.000214256
7.44966e-07
0.000214222
7.60349e-07
0.000214185
7.75453e-07
0.000214145
7.90374e-07
0.000214101
8.05056e-07
0.000214054
8.19622e-07
0.000214004
8.33971e-07
0.000213951
8.48268e-07
0.000213895
8.62355e-07
0.000213836
8.76458e-07
0.000213774
8.9034e-07
0.000213708
9.04317e-07
0.00021364
9.18046e-07
0.000213568
9.31963e-07
0.000213493
9.4558e-07
0.000213416
9.59504e-07
0.000213335
9.73048e-07
0.000213251
9.87046e-07
0.000213165
1.00055e-06
0.000213075
1.01469e-06
0.000212983
1.02818e-06
0.000212887
1.04254e-06
0.000212789
1.05603e-06
0.000212688
1.07069e-06
0.000212584
1.0842e-06
0.000212477
1.09925e-06
0.000212367
1.11276e-06
0.000212255
1.12829e-06
0.00021214
1.14181e-06
0.000212021
1.15793e-06
0.000211901
1.17143e-06
0.000211777
1.18824e-06
0.000211651
1.20168e-06
0.000211521
1.21931e-06
0.00021139
1.23264e-06
0.000211255
1.25123e-06
0.000211118
1.26437e-06
0.000210977
1.28407e-06
0.000210835
1.29693e-06
0.000210688
1.31791e-06
0.00021054
1.33035e-06
0.000210388
1.3528e-06
0.000210235
1.36468e-06
0.000210077
1.38882e-06
0.000209918
1.39992e-06
0.000209754
1.42602e-06
0.000209589
1.43606e-06
0.000209419
1.46445e-06
0.000209248
1.47308e-06
0.000209072
1.50416e-06
0.000208895
1.51092e-06
0.000208712
1.5452e-06
0.000208529
1.54952e-06
0.000208339
1.58755e-06
0.000208149
1.58889e-06
0.000207952
1.63111e-06
0.000207755
1.62926e-06
0.00020755
1.67543e-06
0.000207345
1.67186e-06
0.000207133
1.71906e-06
0.000206918
1.72194e-06
0.000206699
1.75644e-06
1.8279e-06
0.000220241
2.7238e-07
0.000220263
3.27418e-07
0.000220288
3.76392e-07
0.000220312
4.19876e-07
0.000220333
4.58342e-07
0.000220352
4.9251e-07
0.000220367
5.23208e-07
0.000220378
5.51177e-07
0.000220387
5.77008e-07
0.000220392
6.01153e-07
0.000220394
6.23963e-07
0.000220393
6.457e-07
0.000220389
6.66577e-07
0.000220383
6.86747e-07
0.000220373
7.06345e-07
0.000220361
7.25456e-07
0.000220346
7.44175e-07
0.000220329
7.62543e-07
0.000220309
7.80638e-07
0.000220285
7.98467e-07
0.00022026
8.16107e-07
0.000220231
8.33533e-07
0.0002202
8.50838e-07
0.000220166
8.67958e-07
0.000220129
8.85015e-07
0.00022009
9.01898e-07
0.000220047
9.18781e-07
0.000220002
9.35482e-07
0.000219954
9.52252e-07
0.000219904
9.68816e-07
0.00021985
9.85534e-07
0.000219794
1.002e-06
0.000219734
1.01872e-06
0.000219672
1.03512e-06
0.000219607
1.05191e-06
0.00021954
1.06826e-06
0.000219469
1.08519e-06
0.000219396
1.10152e-06
0.00021932
1.11865e-06
0.000219241
1.13496e-06
0.000219159
1.15239e-06
0.000219075
1.16869e-06
0.000218987
1.18649e-06
0.000218897
1.20278e-06
0.000218805
1.22106e-06
0.000218709
1.23731e-06
0.000218611
1.25619e-06
0.00021851
1.27236e-06
0.000218406
1.29197e-06
0.0002183
1.308e-06
0.000218191
1.3285e-06
0.000218079
1.34432e-06
0.000217964
1.36587e-06
0.000217847
1.38138e-06
0.000217727
1.40418e-06
0.000217605
1.41924e-06
0.000217479
1.4435e-06
0.000217352
1.45795e-06
0.000217221
1.48394e-06
0.000217088
1.49755e-06
0.000216951
1.52558e-06
0.000216813
1.53809e-06
0.00021667
1.56849e-06
0.000216527
1.57957e-06
0.000216379
1.61276e-06
0.00021623
1.62198e-06
0.000216075
1.65847e-06
0.000215921
1.66533e-06
0.00021576
1.70567e-06
0.0002156
1.70961e-06
0.000215434
1.75436e-06
0.000215268
1.75494e-06
0.000215094
1.8044e-06
0.000214922
1.80174e-06
0.000214742
1.85525e-06
0.000214562
1.85162e-06
0.000214376
1.90524e-06
0.000214187
1.91078e-06
0.000213994
1.94943e-06
2.02822e-06
0.000226369
2.64815e-07
0.000226385
3.11965e-07
0.000226404
3.56929e-07
0.000226425
3.98936e-07
0.000226446
4.37656e-07
0.000226465
4.73176e-07
0.000226482
5.05848e-07
0.000226497
5.36102e-07
0.00022651
5.6435e-07
0.00022652
5.9095e-07
0.000226528
6.16205e-07
0.000226533
6.4036e-07
0.000226536
6.63621e-07
0.000226537
6.86146e-07
0.000226535
7.08074e-07
0.000226531
7.29502e-07
0.000226525
7.50527e-07
0.000226516
7.71206e-07
0.000226505
7.91612e-07
0.000226492
8.11771e-07
0.000226476
8.31749e-07
0.000226458
8.51541e-07
0.000226438
8.71221e-07
0.000226415
8.90753e-07
0.00022639
9.1023e-07
0.000226362
9.29576e-07
0.000226332
9.48923e-07
0.000226299
9.68138e-07
0.000226264
9.87414e-07
0.000226227
1.00654e-06
0.000226186
1.0258e-06
0.000226143
1.04487e-06
0.000226098
1.06416e-06
0.00022605
1.0832e-06
0.000225999
1.10259e-06
0.000225946
1.12161e-06
0.00022589
1.14115e-06
0.000225831
1.16016e-06
0.00022577
1.17992e-06
0.000225706
1.19894e-06
0.000225639
1.21899e-06
0.00022557
1.23801e-06
0.000225498
1.25844e-06
0.000225423
1.27743e-06
0.000225346
1.29836e-06
0.000225266
1.3173e-06
0.000225184
1.33884e-06
0.000225098
1.35767e-06
0.00022501
1.37997e-06
0.00022492
1.39861e-06
0.000224826
1.42184e-06
0.00022473
1.44021e-06
0.000224632
1.46456e-06
0.000224531
1.48251e-06
0.000224427
1.50822e-06
0.00022432
1.52559e-06
0.000224211
1.55292e-06
0.000224099
1.5695e-06
0.000223984
1.59877e-06
0.000223868
1.61428e-06
0.000223747
1.64586e-06
0.000223625
1.65998e-06
0.0002235
1.6943e-06
0.000223373
1.70663e-06
0.000223241
1.74419e-06
0.000223109
1.75424e-06
0.000222972
1.79562e-06
0.000222834
1.80283e-06
0.000222691
1.84867e-06
0.000222548
1.85248e-06
0.000222399
1.90333e-06
0.000222251
1.90337e-06
0.000222096
1.95946e-06
0.000221942
1.95612e-06
0.00022178
2.01642e-06
0.000221619
2.01265e-06
0.000221452
2.07244e-06
0.000221283
2.07993e-06
0.000221109
2.12332e-06
2.2064e-06
0.000232668
2.60561e-07
0.000232679
3.01269e-07
0.000232694
3.41907e-07
0.000232711
3.81385e-07
0.00023273
4.19049e-07
0.000232749
4.54622e-07
0.000232766
4.88107e-07
0.000232783
5.19661e-07
0.000232798
5.49507e-07
0.000232811
5.77877e-07
0.000232822
6.04996e-07
0.000232831
6.31065e-07
0.000232839
6.5626e-07
0.000232844
6.8073e-07
0.000232847
7.04605e-07
0.000232849
7.27985e-07
0.000232849
7.50966e-07
0.000232846
7.73612e-07
0.000232842
7.95995e-07
0.000232835
8.18151e-07
0.000232827
8.40142e-07
0.000232817
8.61977e-07
0.000232804
8.83718e-07
0.000232789
9.05349e-07
0.000232773
9.26943e-07
0.000232754
9.48451e-07
0.000232733
9.69973e-07
0.00023271
9.91416e-07
0.000232684
1.01293e-06
0.000232656
1.03435e-06
0.000232626
1.0559e-06
0.000232594
1.07732e-06
0.000232559
1.09896e-06
0.000232522
1.12041e-06
0.000232482
1.14218e-06
0.00023244
1.16367e-06
0.000232395
1.18563e-06
0.000232348
1.20717e-06
0.000232299
1.22938e-06
0.000232247
1.25096e-06
0.000232193
1.27349e-06
0.000232135
1.2951e-06
0.000232076
1.31803e-06
0.000232014
1.33964e-06
0.000231949
1.36308e-06
0.000231882
1.38465e-06
0.000231812
1.40873e-06
0.000231739
1.43019e-06
0.000231664
1.45505e-06
0.000231586
1.47631e-06
0.000231506
1.50213e-06
0.000231423
1.52308e-06
0.000231338
1.55008e-06
0.00023125
1.57055e-06
0.000231159
1.599e-06
0.000231066
1.61878e-06
0.00023097
1.64898e-06
0.000230871
1.66783e-06
0.00023077
1.70014e-06
0.000230666
1.71773e-06
0.00023056
1.75259e-06
0.000230451
1.76853e-06
0.000230339
1.80644e-06
0.000230225
1.82026e-06
0.000230108
1.86181e-06
0.000229989
1.87296e-06
0.000229866
1.91881e-06
0.000229742
1.92667e-06
0.000229613
1.97753e-06
0.000229484
1.98152e-06
0.00022935
2.03796e-06
0.000229215
2.03776e-06
0.000229075
2.09996e-06
0.000228935
2.09614e-06
0.000228788
2.16283e-06
0.000228642
2.15889e-06
0.00022849
2.22476e-06
0.000228336
2.23354e-06
0.000228177
2.28236e-06
2.36724e-06
0.000239142
2.58092e-07
0.000239149
2.93743e-07
0.000239161
3.30368e-07
0.000239175
3.66981e-07
0.000239191
4.02881e-07
0.000239208
4.37641e-07
0.000239225
4.7106e-07
0.000239242
5.03101e-07
0.000239258
5.33823e-07
0.000239272
5.63338e-07
0.000239285
5.91781e-07
0.000239297
6.19291e-07
0.000239307
6.46004e-07
0.000239316
6.72044e-07
0.000239323
6.97521e-07
0.000239329
7.22532e-07
0.000239332
7.47163e-07
0.000239334
7.71481e-07
0.000239335
7.95554e-07
0.000239334
8.19426e-07
0.000239331
8.43153e-07
0.000239326
8.66755e-07
0.000239319
8.90287e-07
0.000239311
9.13746e-07
0.000239301
9.37191e-07
0.000239289
9.60595e-07
0.000239274
9.84036e-07
0.000239258
1.00745e-06
0.00023924
1.03095e-06
0.00023922
1.05441e-06
0.000239198
1.07801e-06
0.000239174
1.10156e-06
0.000239148
1.12532e-06
0.000239119
1.14896e-06
0.000239088
1.17291e-06
0.000239055
1.19667e-06
0.00023902
1.22086e-06
0.000238983
1.24474e-06
0.000238943
1.26922e-06
0.0002389
1.2932e-06
0.000238856
1.31805e-06
0.000238809
1.34211e-06
0.00023876
1.36739e-06
0.000238708
1.39151e-06
0.000238653
1.41733e-06
0.000238597
1.44144e-06
0.000238537
1.46792e-06
0.000238476
1.49195e-06
0.000238411
1.51924e-06
0.000238345
1.54309e-06
0.000238275
1.57139e-06
0.000238204
1.59491e-06
0.000238129
1.62443e-06
0.000238052
1.64745e-06
0.000237973
1.67849e-06
0.000237891
1.70076e-06
0.000237806
1.73364e-06
0.000237719
1.75488e-06
0.000237629
1.79002e-06
0.000237537
1.80984e-06
0.000237442
1.84774e-06
0.000237345
1.8657e-06
0.000237244
1.90691e-06
0.000237142
1.92247e-06
0.000237036
1.96767e-06
0.000236929
1.98021e-06
0.000236818
2.03014e-06
0.000236705
2.03899e-06
0.000236589
2.09442e-06
0.000236471
2.09893e-06
0.000236349
2.16051e-06
0.000236226
2.16039e-06
0.000236098
2.22827e-06
0.00023597
2.22422e-06
0.000235835
2.29698e-06
0.000235701
2.29287e-06
0.000235561
2.36485e-06
0.000235421
2.37434e-06
0.000235274
2.42923e-06
2.51396e-06
0.000245794
2.56537e-07
0.000245799
2.88267e-07
0.000245808
3.2142e-07
0.00024582
3.55229e-07
0.000245834
3.89078e-07
0.000245849
4.2252e-07
0.000245865
4.55267e-07
0.000245881
4.87168e-07
0.000245896
5.18168e-07
0.000245911
5.48278e-07
0.000245926
5.77551e-07
0.000245939
6.06064e-07
0.000245951
6.33904e-07
0.000245962
6.6116e-07
0.000245972
6.87921e-07
0.00024598
7.14265e-07
0.000245987
7.40269e-07
0.000245992
7.65995e-07
0.000245996
7.91506e-07
0.000245999
8.16846e-07
0.000246
8.42068e-07
0.000245999
8.67199e-07
0.000245997
8.92285e-07
0.000245994
9.17337e-07
0.000245989
9.42403e-07
0.000245982
9.67471e-07
0.000245973
9.92602e-07
0.000245963
1.01775e-06
0.000245951
1.04301e-06
0.000245937
1.0683e-06
0.000245921
1.09374e-06
0.000245904
1.11919e-06
0.000245884
1.14485e-06
0.000245863
1.17049e-06
0.000245839
1.19641e-06
0.000245813
1.22224e-06
0.000245786
1.24848e-06
0.000245756
1.2745e-06
0.000245724
1.30109e-06
0.00024569
1.32729e-06
0.000245654
1.3543e-06
0.000245615
1.38066e-06
0.000245575
1.40815e-06
0.000245531
1.43463e-06
0.000245486
1.46269e-06
0.000245438
1.48923e-06
0.000245388
1.51799e-06
0.000245336
1.5445e-06
0.000245281
1.57411e-06
0.000245223
1.60048e-06
0.000245164
1.63112e-06
0.000245101
1.65719e-06
0.000245037
1.6891e-06
0.00024497
1.71468e-06
0.0002449
1.74815e-06
0.000244828
1.77296e-06
0.000244753
1.80837e-06
0.000244676
1.83208e-06
0.000244596
1.86986e-06
0.000244514
1.89205e-06
0.000244429
1.93275e-06
0.000244341
1.95292e-06
0.000244251
1.99717e-06
0.000244159
2.0147e-06
0.000244063
2.06324e-06
0.000243966
2.07746e-06
0.000243865
2.1311e-06
0.000243763
2.14125e-06
0.000243656
2.20087e-06
0.000243549
2.20626e-06
0.000243437
2.27256e-06
0.000243325
2.27286e-06
0.000243207
2.34602e-06
0.000243089
2.34202e-06
0.000242965
2.42057e-06
0.000242842
2.41635e-06
0.000242712
2.49445e-06
0.000242583
2.50422e-06
0.000242446
2.56573e-06
2.64878e-06
0.00025263
2.55417e-07
0.000252634
2.8409e-07
0.000252641
3.14332e-07
0.000252651
3.45585e-07
0.000252663
3.77357e-07
0.000252676
4.09245e-07
0.00025269
4.4095e-07
0.000252705
4.72269e-07
0.00025272
5.03083e-07
0.000252735
5.33331e-07
0.00025275
5.63004e-07
0.000252764
5.92121e-07
0.000252777
6.20724e-07
0.000252789
6.48866e-07
0.0002528
6.76608e-07
0.000252811
7.04008e-07
0.00025282
7.31126e-07
0.000252828
7.58017e-07
0.000252835
7.84733e-07
0.00025284
8.11319e-07
0.000252844
8.3782e-07
0.000252847
8.64266e-07
0.000252849
8.907e-07
0.000252849
9.17137e-07
0.000252848
9.43618e-07
0.000252845
9.70144e-07
0.000252841
9.96762e-07
0.000252835
1.02345e-06
0.000252828
1.05027e-06
0.000252819
1.07717e-06
0.000252809
1.10425e-06
0.000252796
1.1314e-06
0.000252782
1.15878e-06
0.000252767
1.18621e-06
0.000252749
1.21393e-06
0.00025273
1.24164e-06
0.000252709
1.26974e-06
0.000252685
1.29773e-06
0.00025266
1.32625e-06
0.000252633
1.35451e-06
0.000252604
1.38351e-06
0.000252572
1.41201e-06
0.000252539
1.44155e-06
0.000252503
1.47026e-06
0.000252466
1.50042e-06
0.000252426
1.52927e-06
0.000252383
1.56017e-06
0.000252339
1.58907e-06
0.000252292
1.62085e-06
0.000252243
1.64967e-06
0.000252192
1.68253e-06
0.000252138
1.7111e-06
0.000252081
1.74527e-06
0.000252023
1.77337e-06
0.000251962
1.80916e-06
0.000251898
1.83651e-06
0.000251832
1.8743e-06
0.000251764
1.90053e-06
0.000251693
1.94078e-06
0.00025162
1.96544e-06
0.000251544
2.00874e-06
0.000251465
2.03126e-06
0.000251384
2.07831e-06
0.000251301
2.09802e-06
0.000251214
2.14961e-06
0.000251126
2.16576e-06
0.000251034
2.2228e-06
0.000250941
2.23456e-06
0.000250844
2.29799e-06
0.000250746
2.3046e-06
0.000250643
2.37523e-06
0.000250539
2.3763e-06
0.000250431
2.45438e-06
0.000250322
2.4507e-06
0.000250208
2.5348e-06
0.000250094
2.53055e-06
0.000249974
2.61479e-06
0.000249853
2.62451e-06
0.000249726
2.69303e-06
2.77331e-06
0.000259655
2.54474e-07
0.000259658
2.80726e-07
0.000259664
3.0855e-07
0.000259672
3.37555e-07
0.000259682
3.67363e-07
0.000259693
3.97641e-07
0.000259706
4.28115e-07
0.00025972
4.58575e-07
0.000259734
4.8887e-07
0.000259749
5.18903e-07
0.000259763
5.48619e-07
0.000259777
5.77995e-07
0.000259791
6.07035e-07
0.000259804
6.35758e-07
0.000259816
6.64197e-07
0.000259828
6.9239e-07
0.000259839
7.20378e-07
0.000259848
7.48204e-07
0.000259857
7.7591e-07
0.000259865
8.03533e-07
0.000259872
8.31113e-07
0.000259877
8.58681e-07
0.000259882
8.86273e-07
0.000259885
9.13907e-07
0.000259887
9.4162e-07
0.000259888
9.69419e-07
0.000259887
9.97343e-07
0.000259885
1.02538e-06
0.000259882
1.05359e-06
0.000259877
1.08192e-06
0.000259871
1.11046e-06
0.000259863
1.13913e-06
0.000259854
1.16805e-06
0.000259843
1.19708e-06
0.000259831
1.22642e-06
0.000259816
1.25583e-06
0.000259801
1.28563e-06
0.000259783
1.31541e-06
0.000259763
1.34571e-06
0.000259742
1.37585e-06
0.000259719
1.40669e-06
0.000259694
1.43718e-06
0.000259667
1.46863e-06
0.000259637
1.49941e-06
0.000259606
1.53154e-06
0.000259573
1.56256e-06
0.000259538
1.59547e-06
0.0002595
1.62663e-06
0.000259461
1.66047e-06
0.000259419
1.69163e-06
0.000259375
1.72658e-06
0.000259328
1.75758e-06
0.000259279
1.79388e-06
0.000259228
1.82447e-06
0.000259175
1.86243e-06
0.000259119
1.89231e-06
0.000259061
1.93233e-06
0.000259001
1.96111e-06
0.000258938
2.00368e-06
0.000258872
2.03086e-06
0.000258805
2.07659e-06
0.000258734
2.10158e-06
0.000258661
2.1512e-06
0.000258586
2.17326e-06
0.000258508
2.22765e-06
0.000258428
2.24595e-06
0.000258345
2.30608e-06
0.000258259
2.31972e-06
0.000258171
2.38664e-06
0.000258081
2.39478e-06
0.000257986
2.46939e-06
0.000257891
2.47155e-06
0.000257791
2.55422e-06
0.000257691
2.55113e-06
0.000257585
2.64053e-06
0.000257479
2.6364e-06
0.000257367
2.72674e-06
0.000257256
2.73618e-06
0.000257137
2.812e-06
2.88873e-06
0.000266873
2.53569e-07
0.000266876
2.77864e-07
0.000266881
3.03676e-07
0.000266888
3.30731e-07
0.000266896
3.58749e-07
0.000266907
3.87467e-07
0.000266918
4.16648e-07
0.000266931
4.46097e-07
0.000266944
4.75661e-07
0.000266957
5.05223e-07
0.000266971
5.34705e-07
0.000266985
5.64057e-07
0.000266999
5.93253e-07
0.000267013
6.22286e-07
0.000267026
6.51165e-07
0.000267038
6.79906e-07
0.00026705
7.08534e-07
0.000267061
7.37077e-07
0.000267071
7.65567e-07
0.000267081
7.94032e-07
0.000267089
8.22505e-07
0.000267097
8.51013e-07
0.000267104
8.79586e-07
0.00026711
9.08246e-07
0.000267114
9.37022e-07
0.000267118
9.65925e-07
0.00026712
9.9499e-07
0.000267121
1.02421e-06
0.000267121
1.05363e-06
0.00026712
1.08323e-06
0.000267117
1.11307e-06
0.000267113
1.14309e-06
0.000267108
1.17339e-06
0.000267101
1.20386e-06
0.000267093
1.23466e-06
0.000267083
1.2656e-06
0.000267072
1.29694e-06
0.000267059
1.32835e-06
0.000267044
1.36026e-06
0.000267028
1.39214e-06
0.00026701
1.42467e-06
0.00026699
1.45698e-06
0.000266969
1.49019e-06
0.000266945
1.5229e-06
0.00026692
1.55686e-06
0.000266892
1.58991e-06
0.000266863
1.6247e-06
0.000266832
1.65799e-06
0.000266799
1.69377e-06
0.000266763
1.72716e-06
0.000266726
1.76409e-06
0.000266686
1.79741e-06
0.000266644
1.83573e-06
0.0002666
1.86873e-06
0.000266553
1.90875e-06
0.000266504
1.94112e-06
0.000266454
1.98324e-06
0.0002664
2.01456e-06
0.000266344
2.05929e-06
0.000266286
2.08904e-06
0.000266226
2.13701e-06
0.000266163
2.16456e-06
0.000266098
2.21655e-06
0.00026603
2.2411e-06
0.000265959
2.29804e-06
0.000265887
2.31869e-06
0.000265811
2.38164e-06
0.000265733
2.39741e-06
0.000265652
2.4675e-06
0.00026557
2.47745e-06
0.000265483
2.55571e-06
0.000265396
2.55927e-06
0.000265304
2.6462e-06
0.000265211
2.64398e-06
0.000265113
2.73843e-06
0.000265015
2.73458e-06
0.000264911
2.83094e-06
0.000264807
2.83997e-06
0.000264696
2.92323e-06
2.99594e-06
0.000274291
2.52632e-07
0.000274294
2.75313e-07
0.000274298
2.99431e-07
0.000274304
3.24802e-07
0.000274312
3.51218e-07
0.000274321
3.78474e-07
0.000274331
4.06378e-07
0.000274342
4.34757e-07
0.000274354
4.63467e-07
0.000274367
4.92391e-07
0.00027438
5.2144e-07
0.000274394
5.50547e-07
0.000274408
5.7967e-07
0.000274421
6.08783e-07
0.000274434
6.37873e-07
0.000274447
6.66942e-07
0.00027446
6.95998e-07
0.000274472
7.25057e-07
0.000274483
7.54136e-07
0.000274494
7.83258e-07
0.000274504
8.12446e-07
0.000274513
8.41723e-07
0.000274522
8.71113e-07
0.00027453
9.00635e-07
0.000274536
9.30316e-07
0.000274542
9.60168e-07
0.000274547
9.90219e-07
0.00027455
1.02047e-06
0.000274553
1.05096e-06
0.000274555
1.08167e-06
0.000274555
1.11266e-06
0.000274554
1.14387e-06
0.000274552
1.1754e-06
0.000274549
1.20716e-06
0.000274544
1.23927e-06
0.000274538
1.27158e-06
0.000274531
1.30431e-06
0.000274522
1.33719e-06
0.000274512
1.37058e-06
0.0002745
1.40403e-06
0.000274487
1.43811e-06
0.000274472
1.4721e-06
0.000274455
1.50693e-06
0.000274436
1.54142e-06
0.000274416
1.57707e-06
0.000274394
1.61201e-06
0.00027437
1.64856e-06
0.000274344
1.68385e-06
0.000274317
1.72143e-06
0.000274287
1.75694e-06
0.000274255
1.79572e-06
0.000274221
1.83127e-06
0.000274186
1.87148e-06
0.000274147
1.90682e-06
0.000274107
1.94877e-06
0.000274065
1.98357e-06
0.000274021
2.02766e-06
0.000273974
2.0615e-06
0.000273925
2.10824e-06
0.000273873
2.14057e-06
0.000273819
2.19063e-06
0.000273763
2.22078e-06
0.000273705
2.27496e-06
0.000273644
2.30209e-06
0.000273581
2.36137e-06
0.000273515
2.38452e-06
0.000273446
2.45003e-06
0.000273376
2.46814e-06
0.000273302
2.54111e-06
0.000273226
2.55313e-06
0.000273147
2.63472e-06
0.000273067
2.63996e-06
0.000272982
2.73084e-06
0.000272896
2.72978e-06
0.000272806
2.829e-06
0.000272715
2.82562e-06
0.000272618
2.92787e-06
0.000272521
2.93648e-06
0.000272417
3.0272e-06
3.09564e-06
0.000281914
2.51631e-07
0.000281917
2.72951e-07
0.000281921
2.95628e-07
0.000281926
3.19537e-07
0.000281933
3.44526e-07
0.000281941
3.7044e-07
0.00028195
3.97122e-07
0.00028196
4.24429e-07
0.000281971
4.52231e-07
0.000281983
4.80418e-07
0.000281996
5.08899e-07
0.000282009
5.37603e-07
0.000282022
5.66476e-07
0.000282035
5.9548e-07
0.000282049
6.24591e-07
0.000282062
6.53796e-07
0.000282075
6.83091e-07
0.000282087
7.12479e-07
0.000282099
7.4197e-07
0.000282111
7.71575e-07
0.000282122
8.01311e-07
0.000282133
8.31195e-07
0.000282143
8.61244e-07
0.000282152
8.91477e-07
0.00028216
9.21913e-07
0.000282168
9.52566e-07
0.000282175
9.83459e-07
0.00028218
1.0146e-06
0.000282185
1.04601e-06
0.000282189
1.07769e-06
0.000282192
1.10968e-06
0.000282194
1.14196e-06
0.000282195
1.17457e-06
0.000282195
1.20747e-06
0.000282193
1.24074e-06
0.000282191
1.27429e-06
0.000282187
1.30827e-06
0.000282181
1.34248e-06
0.000282175
1.3772e-06
0.000282167
1.41207e-06
0.000282157
1.44757e-06
0.000282146
1.48309e-06
0.000282134
1.51941e-06
0.00028212
1.55555e-06
0.000282104
1.59276e-06
0.000282086
1.62945e-06
0.000282067
1.66763e-06
0.000282046
1.70478e-06
0.000282024
1.74405e-06
0.000281999
1.78155e-06
0.000281973
1.82207e-06
0.000281944
1.85973e-06
0.000281914
1.90172e-06
0.000281882
1.93929e-06
0.000281847
1.98306e-06
0.000281811
2.02021e-06
0.000281772
2.06615e-06
0.000281731
2.10245e-06
0.000281689
2.15109e-06
0.000281643
2.18597e-06
0.000281596
2.23797e-06
0.000281546
2.27074e-06
0.000281494
2.32693e-06
0.000281439
2.35672e-06
0.000281382
2.41813e-06
0.000281323
2.4439e-06
0.000281261
2.51174e-06
0.000281197
2.53236e-06
0.00028113
2.60794e-06
0.000281061
2.62226e-06
0.000280989
2.70688e-06
0.000280915
2.71406e-06
0.000280837
2.80857e-06
0.000280758
2.80894e-06
0.000280674
2.91265e-06
0.00028059
2.90997e-06
0.0002805
3.01791e-06
0.00028041
3.02614e-06
0.000280313
3.12423e-06
3.18836e-06
0.000289748
2.50549e-07
0.000289751
2.70704e-07
0.000289754
2.92139e-07
0.000289759
3.14769e-07
0.000289765
3.38488e-07
0.000289772
3.63177e-07
0.00028978
3.88714e-07
0.00028979
4.14979e-07
0.0002898
4.41861e-07
0.000289811
4.69261e-07
0.000289823
4.97092e-07
0.000289836
5.25283e-07
0.000289848
5.53777e-07
0.000289861
5.82528e-07
0.000289874
6.11505e-07
0.000289887
6.40685e-07
0.0002899
6.70056e-07
0.000289913
6.99612e-07
0.000289926
7.29352e-07
0.000289938
7.59282e-07
0.00028995
7.89411e-07
0.000289962
8.1975e-07
0.000289973
8.50311e-07
0.000289983
8.81109e-07
0.000289993
9.12159e-07
0.000290002
9.43474e-07
0.00029001
9.75073e-07
0.000290018
1.00696e-06
0.000290025
1.03917e-06
0.000290031
1.07169e-06
0.000290036
1.10455e-06
0.00029004
1.13774e-06
0.000290043
1.17131e-06
0.000290045
1.20521e-06
0.000290047
1.23953e-06
0.000290047
1.27417e-06
0.000290046
1.30927e-06
0.000290044
1.34467e-06
0.00029004
1.38059e-06
0.000290036
1.41675e-06
0.00029003
1.45353e-06
0.000290022
1.49045e-06
0.000290014
1.52813e-06
0.000290003
1.56576e-06
0.000289992
1.60441e-06
0.000289978
1.64272e-06
0.000289964
1.6824e-06
0.000289947
1.7213e-06
0.000289929
1.76213e-06
0.000289909
1.80149e-06
0.000289887
1.84363e-06
0.000289864
1.88328e-06
0.000289839
1.92694e-06
0.000289811
1.96664e-06
0.000289782
2.01211e-06
0.000289751
2.05152e-06
0.000289718
2.0992e-06
0.000289683
2.13789e-06
0.000289645
2.18829e-06
0.000289606
2.22569e-06
0.000289564
2.27949e-06
0.00028952
2.31487e-06
0.000289474
2.37293e-06
0.000289425
2.4054e-06
0.000289375
2.46877e-06
0.000289321
2.49724e-06
0.000289266
2.56719e-06
0.000289208
2.59045e-06
0.000289147
2.66839e-06
0.000289084
2.6852e-06
0.000289019
2.77256e-06
0.000288951
2.78193e-06
0.00028888
2.87977e-06
0.000288807
2.88181e-06
0.00028873
2.98973e-06
0.000288652
2.98797e-06
0.000288568
3.10137e-06
0.000288485
3.10934e-06
0.000288395
3.2146e-06
3.27456e-06
0.000297799
2.49385e-07
0.000297801
2.68525e-07
0.000297804
2.88875e-07
0.000297809
3.10378e-07
0.000297814
3.3296e-07
0.000297821
3.56534e-07
0.000297829
3.81005e-07
0.000297837
4.06276e-07
0.000297847
4.32254e-07
0.000297857
4.5885e-07
0.000297868
4.85987e-07
0.00029788
5.13596e-07
0.000297892
5.4162e-07
0.000297905
5.70012e-07
0.000297917
5.98736e-07
0.00029793
6.27763e-07
0.000297943
6.57074e-07
0.000297956
6.86657e-07
0.000297969
7.16507e-07
0.000297982
7.46621e-07
0.000297994
7.77002e-07
0.000298006
8.07656e-07
0.000298018
8.38593e-07
0.000298029
8.6982e-07
0.00029804
9.01352e-07
0.00029805
9.33197e-07
0.00029806
9.65372e-07
0.000298069
9.97884e-07
0.000298078
1.03075e-06
0.000298085
1.06398e-06
0.000298092
1.09759e-06
0.000298098
1.13158e-06
0.000298104
1.16598e-06
0.000298108
1.20076e-06
0.000298112
1.23599e-06
0.000298114
1.2716e-06
0.000298116
1.30769e-06
0.000298116
1.34415e-06
0.000298116
1.38115e-06
0.000298114
1.41847e-06
0.000298111
1.45641e-06
0.000298107
1.49458e-06
0.000298102
1.5335e-06
0.000298095
1.5725e-06
0.000298087
1.61247e-06
0.000298077
1.65225e-06
0.000298067
1.69333e-06
0.000298054
1.73382e-06
0.00029804
1.77611e-06
0.000298024
1.8172e-06
0.000298007
1.86085e-06
0.000297988
1.90237e-06
0.000297967
1.94759e-06
0.000297945
1.98929e-06
0.00029792
2.03636e-06
0.000297894
2.07793e-06
0.000297866
2.12723e-06
0.000297836
2.16823e-06
0.000297804
2.22027e-06
0.000297769
2.26013e-06
0.000297733
2.3156e-06
0.000297694
2.35357e-06
0.000297654
2.41334e-06
0.000297611
2.4485e-06
0.000297566
2.51365e-06
0.000297518
2.54489e-06
0.000297469
2.61674e-06
0.000297417
2.64276e-06
0.000297362
2.72282e-06
0.000297305
2.74227e-06
0.000297246
2.8321e-06
0.000297184
2.84386e-06
0.000297119
2.94473e-06
0.000297052
2.9487e-06
0.000296981
3.0605e-06
0.000296909
3.05992e-06
0.000296832
3.17849e-06
0.000296755
3.18637e-06
0.000296671
3.29851e-06
3.35458e-06
0.000306072
2.48138e-07
0.000306074
2.66385e-07
0.000306077
2.85776e-07
0.000306081
3.06277e-07
0.000306087
3.27838e-07
0.000306093
3.50395e-07
0.0003061
3.73878e-07
0.000306108
3.98208e-07
0.000306117
4.23309e-07
0.000306127
4.49106e-07
0.000306137
4.75529e-07
0.000306148
5.02516e-07
0.00030616
5.30012e-07
0.000306172
5.57969e-07
0.000306184
5.8635e-07
0.000306197
6.15124e-07
0.00030621
6.44268e-07
0.000306223
6.73765e-07
0.000306235
7.03604e-07
0.000306248
7.33779e-07
0.000306261
7.64289e-07
0.000306273
7.95135e-07
0.000306286
8.26321e-07
0.000306298
8.57854e-07
0.000306309
8.89744e-07
0.000306321
9.21997e-07
0.000306331
9.54626e-07
0.000306342
9.87639e-07
0.000306351
1.02105e-06
0.00030636
1.05487e-06
0.000306369
1.08911e-06
0.000306377
1.12377e-06
0.000306384
1.15888e-06
0.00030639
1.19442e-06
0.000306396
1.23044e-06
0.0003064
1.2669e-06
0.000306404
1.30387e-06
0.000306407
1.34127e-06
0.000306409
1.37923e-06
0.00030641
1.41757e-06
0.00030641
1.45655e-06
0.000306408
1.49585e-06
0.000306406
1.5359e-06
0.000306402
1.57613e-06
0.000306398
1.6173e-06
0.000306391
1.65843e-06
0.000306384
1.70078e-06
0.000306375
1.74275e-06
0.000306365
1.78638e-06
0.000306353
1.82907e-06
0.00030634
1.87412e-06
0.000306325
1.91738e-06
0.000306308
1.96404e-06
0.00030629
2.00764e-06
0.00030627
2.05619e-06
0.000306248
2.09981e-06
0.000306225
2.15062e-06
0.000306199
2.19384e-06
0.000306172
2.24742e-06
0.000306142
2.28965e-06
0.000306111
2.34667e-06
0.000306078
2.38718e-06
0.000306043
2.44852e-06
0.000306005
2.48637e-06
0.000305965
2.55314e-06
0.000305923
2.58716e-06
0.000305879
2.66073e-06
0.000305832
2.68958e-06
0.000305783
2.77153e-06
0.000305732
2.79377e-06
0.000305678
2.8858e-06
0.000305622
2.90014e-06
0.000305563
3.00373e-06
0.000305502
3.00987e-06
0.000305437
3.12522e-06
0.000305371
3.12607e-06
0.0003053
3.24947e-06
0.000305229
3.2575e-06
0.000305151
3.37617e-06
3.42872e-06
0.000314574
2.46811e-07
0.000314577
2.64263e-07
0.000314579
2.82799e-07
0.000314583
3.02402e-07
0.000314588
3.23039e-07
0.000314594
3.44667e-07
0.000314601
3.67233e-07
0.000314608
3.90677e-07
0.000314616
4.14938e-07
0.000314626
4.39952e-07
0.000314635
4.65659e-07
0.000314646
4.92003e-07
0.000314657
5.18933e-07
0.000314669
5.46404e-07
0.000314681
5.74379e-07
0.000314693
6.02824e-07
0.000314705
6.31716e-07
0.000314718
6.61034e-07
0.000314731
6.90765e-07
0.000314744
7.209e-07
0.000314757
7.51432e-07
0.00031477
7.8236e-07
0.000314782
8.13687e-07
0.000314795
8.45414e-07
0.000314807
8.77548e-07
0.000314819
9.10097e-07
0.00031483
9.43068e-07
0.000314841
9.76469e-07
0.000314852
1.01031e-06
0.000314862
1.0446e-06
0.000314872
1.07936e-06
0.000314881
1.11458e-06
0.00031489
1.15029e-06
0.000314898
1.18648e-06
0.000314905
1.22318e-06
0.000314912
1.26037e-06
0.000314917
1.29811e-06
0.000314922
1.33632e-06
0.000314926
1.37512e-06
0.00031493
1.41438e-06
0.000314932
1.45429e-06
0.000314933
1.49459e-06
0.000314933
1.53565e-06
0.000314933
1.57699e-06
0.000314931
1.61924e-06
0.000314927
1.6616e-06
0.000314923
1.70511e-06
0.000314917
1.74842e-06
0.000314911
1.79328e-06
0.000314902
1.83745e-06
0.000314893
1.88379e-06
0.000314881
1.92866e-06
0.000314869
1.97667e-06
0.000314854
2.02204e-06
0.000314838
2.07197e-06
0.000314821
2.11752e-06
0.000314802
2.16974e-06
0.00031478
2.21506e-06
0.000314758
2.27006e-06
0.000314733
2.31459e-06
0.000314706
2.37304e-06
0.000314678
2.41603e-06
0.000314647
2.47881e-06
0.000314614
2.5193e-06
0.00031458
2.58754e-06
0.000314543
2.62435e-06
0.000314504
2.69946e-06
0.000314462
2.73119e-06
0.000314419
2.81482e-06
0.000314373
2.83994e-06
0.000314325
2.93392e-06
0.000314274
2.951e-06
0.000314221
3.05702e-06
0.000314165
3.06553e-06
0.000314106
3.18412e-06
0.000314046
3.18665e-06
0.000313981
3.31452e-06
0.000313915
3.32296e-06
0.000313844
3.44771e-06
3.49723e-06
0.000323312
2.45408e-07
0.000323314
2.62147e-07
0.000323317
2.79915e-07
0.000323321
2.98706e-07
0.000323325
3.18504e-07
0.000323331
3.39279e-07
0.000323337
3.60994e-07
0.000323344
3.83605e-07
0.000323352
4.07063e-07
0.00032336
4.31317e-07
0.00032337
4.56315e-07
0.00032338
4.82009e-07
0.00032339
5.08353e-07
0.000323402
5.35304e-07
0.000323413
5.62826e-07
0.000323425
5.90888e-07
0.000323437
6.19463e-07
0.00032345
6.48531e-07
0.000323462
6.78075e-07
0.000323475
7.08084e-07
0.000323488
7.3855e-07
0.000323501
7.69469e-07
0.000323514
8.00839e-07
0.000323527
8.32663e-07
0.000323539
8.64943e-07
0.000323552
8.97685e-07
0.000323564
9.30895e-07
0.000323576
9.64581e-07
0.000323587
9.98752e-07
0.000323598
1.03342e-06
0.000323609
1.06858e-06
0.00032362
1.10426e-06
0.000323629
1.14046e-06
0.000323639
1.17719e-06
0.000323647
1.21446e-06
0.000323656
1.25227e-06
0.000323663
1.29066e-06
0.00032367
1.32958e-06
0.000323676
1.36912e-06
0.000323681
1.40917e-06
0.000323685
1.44989e-06
0.000323689
1.49109e-06
0.000323691
1.53304e-06
0.000323693
1.57538e-06
0.000323694
1.6186e-06
0.000323693
1.66206e-06
0.000323692
1.70662e-06
0.000323689
1.75115e-06
0.000323685
1.79714e-06
0.00032368
1.84265e-06
0.000323674
1.89018e-06
0.000323666
1.93654e-06
0.000323657
1.98578e-06
0.000323646
2.03279e-06
0.000323634
2.084e-06
0.00032362
2.13137e-06
0.000323605
2.18489e-06
0.000323588
2.23221e-06
0.000323569
2.28853e-06
0.000323548
2.33524e-06
0.000323526
2.39502e-06
0.000323502
2.44039e-06
0.000323476
2.5045e-06
0.000323448
2.54758e-06
0.000323419
2.61715e-06
0.000323386
2.65673e-06
0.000323352
2.7332e-06
0.000323316
2.76784e-06
0.000323278
2.85295e-06
0.000323237
2.88103e-06
0.000323194
2.97672e-06
0.000323148
2.99668e-06
0.0003231
3.10483e-06
0.00032305
3.11592e-06
0.000322997
3.23738e-06
0.000322941
3.24186e-06
0.000322882
3.37379e-06
0.000322822
3.38293e-06
0.000322757
3.51328e-06
3.56032e-06
0.000332292
2.43933e-07
0.000332294
2.60026e-07
0.000332297
2.77098e-07
0.0003323
2.95153e-07
0.000332304
3.14183e-07
0.00033231
3.34173e-07
0.000332315
3.55097e-07
0.000332322
3.76925e-07
0.00033233
3.99619e-07
0.000332338
4.23139e-07
0.000332347
4.47442e-07
0.000332356
4.72487e-07
0.000332366
4.98234e-07
0.000332377
5.24644e-07
0.000332388
5.51682e-07
0.0003324
5.7932e-07
0.000332412
6.0753e-07
0.000332424
6.36292e-07
0.000332436
6.65587e-07
0.000332449
6.95402e-07
0.000332462
7.25729e-07
0.000332475
7.56561e-07
0.000332488
7.87895e-07
0.000332501
8.1973e-07
0.000332513
8.52069e-07
0.000332526
8.84915e-07
0.000332539
9.18274e-07
0.000332551
9.52151e-07
0.000332563
9.86555e-07
0.000332575
1.02149e-06
0.000332587
1.05697e-06
0.000332598
1.09301e-06
0.000332609
1.1296e-06
0.00033262
1.16676e-06
0.00033263
1.20451e-06
0.000332639
1.24284e-06
0.000332648
1.28178e-06
0.000332656
1.3213e-06
0.000332664
1.36146e-06
0.000332671
1.4022e-06
0.000332677
1.44364e-06
0.000332682
1.48561e-06
0.000332687
1.52835e-06
0.000332691
1.57156e-06
0.000332694
1.61566e-06
0.000332696
1.6601e-06
0.000332697
1.7056e-06
0.000332697
1.75123e-06
0.000332696
1.79823e-06
0.000332693
1.84496e-06
0.00033269
1.89357e-06
0.000332685
1.9413e-06
0.000332679
1.99168e-06
0.000332672
2.0402e-06
0.000332663
2.09259e-06
0.000332653
2.14165e-06
0.000332642
2.19637e-06
0.000332628
2.24557e-06
0.000332614
2.3031e-06
0.000332597
2.3519e-06
0.000332579
2.41289e-06
0.000332559
2.46056e-06
0.000332538
2.52587e-06
0.000332514
2.57147e-06
0.000332489
2.64224e-06
0.000332461
2.68454e-06
0.000332432
2.76223e-06
0.0003324
2.79978e-06
0.000332367
2.88617e-06
0.00033233
2.91726e-06
0.000332293
3.01442e-06
0.000332252
3.03737e-06
0.000332209
3.14737e-06
0.000332164
3.16121e-06
0.000332116
3.2852e-06
0.000332066
3.29188e-06
0.000332013
3.42743e-06
0.000331958
3.4376e-06
0.000331898
3.57302e-06
3.61818e-06
0.00034152
2.42389e-07
0.000341522
2.57894e-07
0.000341525
2.74332e-07
0.000341528
2.91714e-07
0.000341532
3.1004e-07
0.000341537
3.29304e-07
0.000341543
3.49492e-07
0.000341549
3.70583e-07
0.000341556
3.92551e-07
0.000341564
4.15364e-07
0.000341573
4.3899e-07
0.000341582
4.63393e-07
0.000341591
4.88539e-07
0.000341602
5.14395e-07
0.000341612
5.40929e-07
0.000341624
5.68113e-07
0.000341635
5.95921e-07
0.000341647
6.24333e-07
0.000341659
6.5333e-07
0.000341672
6.82897e-07
0.000341685
7.13026e-07
0.000341697
7.43707e-07
0.00034171
7.74937e-07
0.000341723
8.06714e-07
0.000341736
8.39038e-07
0.000341749
8.71911e-07
0.000341762
9.05338e-07
0.000341775
9.39324e-07
0.000341788
9.73876e-07
0.0003418
1.009e-06
0.000341813
1.04471e-06
0.000341825
1.08101e-06
0.000341836
1.1179e-06
0.000341848
1.15541e-06
0.000341859
1.19353e-06
0.000341869
1.23228e-06
0.000341879
1.27167e-06
0.000341889
1.31169e-06
0.000341898
1.35239e-06
0.000341906
1.39371e-06
0.000341914
1.43575e-06
0.000341922
1.4784e-06
0.000341928
1.52182e-06
0.000341934
1.5658e-06
0.000341939
1.61066e-06
0.000341943
1.65597e-06
0.000341946
1.70232e-06
0.000341949
1.74892e-06
0.00034195
1.79683e-06
0.00034195
1.84467e-06
0.00034195
1.89425e-06
0.000341948
1.94322e-06
0.000341945
1.99463e-06
0.00034194
2.04455e-06
0.000341935
2.09801e-06
0.000341928
2.14863e-06
0.00034192
2.20446e-06
0.00034191
2.25541e-06
0.000341899
2.31407e-06
0.000341886
2.36482e-06
0.000341872
2.42693e-06
0.000341856
2.47679e-06
0.000341839
2.54319e-06
0.000341819
2.59122e-06
0.000341798
2.66307e-06
0.000341775
2.70804e-06
0.00034175
2.7868e-06
0.000341722
2.82722e-06
0.000341694
2.91473e-06
0.000341662
2.94884e-06
0.00034163
3.04726e-06
0.000341594
3.07327e-06
0.000341556
3.18485e-06
0.000341516
3.2016e-06
0.000341473
3.32776e-06
0.000341428
3.33688e-06
0.00034138
3.47562e-06
0.00034133
3.48714e-06
0.000341276
3.62705e-06
3.67096e-06
0.000351004
2.40779e-07
0.000351006
2.55745e-07
0.000351009
2.71603e-07
0.000351012
2.88366e-07
0.000351016
3.06043e-07
0.000351021
3.24635e-07
0.000351026
3.44136e-07
0.000351032
3.64534e-07
0.000351039
3.85811e-07
0.000351046
4.07946e-07
0.000351054
4.30914e-07
0.000351063
4.54686e-07
0.000351072
4.79234e-07
0.000351082
5.04529e-07
0.000351093
5.30544e-07
0.000351103
5.57253e-07
0.000351115
5.84632e-07
0.000351126
6.1266e-07
0.000351138
6.4132e-07
0.000351151
6.70596e-07
0.000351163
7.00478e-07
0.000351176
7.30957e-07
0.000351189
7.62027e-07
0.000351202
7.93685e-07
0.000351215
8.25931e-07
0.000351228
8.58766e-07
0.000351241
8.92193e-07
0.000351254
9.26217e-07
0.000351267
9.60844e-07
0.00035128
9.9608e-07
0.000351293
1.03194e-06
0.000351306
1.06842e-06
0.000351318
1.10553e-06
0.00035133
1.14329e-06
0.000351342
1.18171e-06
0.000351354
1.22078e-06
0.000351365
1.26054e-06
0.000351375
1.30096e-06
0.000351386
1.3421e-06
0.000351396
1.3839e-06
0.000351405
1.42646e-06
0.000351414
1.46967e-06
0.000351422
1.51369e-06
0.000351429
1.55832e-06
0.000351436
1.60385e-06
0.000351442
1.64991e-06
0.000351447
1.697e-06
0.000351452
1.74446e-06
0.000351455
1.79319e-06
0.000351458
1.84201e-06
0.00035146
1.89247e-06
0.000351461
1.94255e-06
0.00035146
1.9949e-06
0.000351459
2.04608e-06
0.000351456
2.10053e-06
0.000351452
2.15258e-06
0.000351447
2.20942e-06
0.000351441
2.262e-06
0.000351433
2.32167e-06
0.000351424
2.37427e-06
0.000351413
2.43739e-06
0.000351401
2.48933e-06
0.000351387
2.55672e-06
0.000351371
2.60707e-06
0.000351354
2.67988e-06
0.000351335
2.72744e-06
0.000351315
2.80713e-06
0.000351292
2.85038e-06
0.000351267
2.93884e-06
0.00035124
2.97598e-06
0.000351212
3.07545e-06
0.000351181
3.10459e-06
0.000351148
3.21746e-06
0.000351113
3.23727e-06
0.000351075
3.36523e-06
0.000351035
3.37703e-06
0.000350992
3.51848e-06
0.000350947
3.53171e-06
0.000350899
3.67551e-06
3.71882e-06
0.00036075
2.39106e-07
0.000360753
2.53576e-07
0.000360755
2.68899e-07
0.000360759
2.85092e-07
0.000360762
3.02169e-07
0.000360767
3.20135e-07
0.000360772
3.38993e-07
0.000360778
3.58738e-07
0.000360784
3.7936e-07
0.000360791
4.00845e-07
0.000360799
4.23176e-07
0.000360807
4.4633e-07
0.000360816
4.70285e-07
0.000360826
4.95019e-07
0.000360836
5.20506e-07
0.000360846
5.46725e-07
0.000360857
5.73653e-07
0.000360869
6.01271e-07
0.000360881
6.29563e-07
0.000360893
6.58512e-07
0.000360905
6.88108e-07
0.000360918
7.18341e-07
0.000360931
7.49205e-07
0.000360944
7.80695e-07
0.000360957
8.12811e-07
0.00036097
8.45552e-07
0.000360983
8.78921e-07
0.000360996
9.12921e-07
0.00036101
9.47559e-07
0.000361023
9.82841e-07
0.000361036
1.01877e-06
0.000361049
1.05537e-06
0.000361062
1.09263e-06
0.000361075
1.13057e-06
0.000361087
1.16919e-06
0.0003611
1.20852e-06
0.000361112
1.24855e-06
0.000361123
1.28929e-06
0.000361135
1.33078e-06
0.000361145
1.37298e-06
0.000361156
1.41595e-06
0.000361166
1.45964e-06
0.000361176
1.50415e-06
0.000361184
1.54935e-06
0.000361193
1.59544e-06
0.000361201
1.64215e-06
0.000361208
1.68988e-06
0.000361214
1.7381e-06
0.00036122
1.78754e-06
0.000361225
1.83722e-06
0.000361229
1.88847e-06
0.000361232
1.93954e-06
0.000361234
1.99273e-06
0.000361235
2.04505e-06
0.000361235
2.10038e-06
0.000361234
2.15374e-06
0.000361232
2.2115e-06
0.000361228
2.26557e-06
0.000361224
2.32617e-06
0.000361217
2.38048e-06
0.00036121
2.44452e-06
0.000361201
2.49841e-06
0.000361191
2.56669e-06
0.000361179
2.61927e-06
0.000361166
2.69292e-06
0.00036115
2.74297e-06
0.000361134
2.82347e-06
0.000361115
2.86949e-06
0.000361095
2.95873e-06
0.000361072
2.99889e-06
0.000361048
3.09919e-06
0.000361022
3.1315e-06
0.000360994
3.2454e-06
0.000360963
3.26838e-06
0.00036093
3.3978e-06
0.000360894
3.41249e-06
0.000360857
3.55618e-06
0.000360817
3.57146e-06
0.000360774
3.71854e-06
3.7619e-06
0.000370767
2.37371e-07
0.000370769
2.51383e-07
0.000370772
2.66211e-07
0.000370775
2.81876e-07
0.000370779
2.98395e-07
0.000370783
3.15779e-07
0.000370788
3.34035e-07
0.000370794
3.53164e-07
0.0003708
3.73164e-07
0.000370807
3.94026e-07
0.000370814
4.15741e-07
0.000370822
4.38292e-07
0.000370831
4.61664e-07
0.00037084
4.85837e-07
0.00037085
5.10793e-07
0.00037086
5.3651e-07
0.000370871
5.62972e-07
0.000370882
5.9016e-07
0.000370893
6.18057e-07
0.000370905
6.4665e-07
0.000370917
6.75927e-07
0.00037093
7.05879e-07
0.000370942
7.36498e-07
0.000370955
7.67779e-07
0.000370968
7.9972e-07
0.000370982
8.3232e-07
0.000370995
8.65581e-07
0.000371008
8.99506e-07
0.000371022
9.34101e-07
0.000371035
9.6937e-07
0.000371049
1.00532e-06
0.000371062
1.04196e-06
0.000371076
1.07931e-06
0.000371089
1.11735e-06
0.000371102
1.15613e-06
0.000371115
1.19562e-06
0.000371127
1.23586e-06
0.00037114
1.27685e-06
0.000371152
1.3186e-06
0.000371164
1.36111e-06
0.000371175
1.40442e-06
0.000371187
1.44849e-06
0.000371197
1.49341e-06
0.000371208
1.53907e-06
0.000371217
1.58564e-06
0.000371227
1.6329e-06
0.000371235
1.68118e-06
0.000371243
1.73004e-06
0.000371251
1.7801e-06
0.000371258
1.83054e-06
0.000371264
1.88247e-06
0.000371269
1.93442e-06
0.000371273
1.98835e-06
0.000371276
2.04169e-06
0.000371279
2.09781e-06
0.00037128
2.15235e-06
0.000371281
2.21093e-06
0.00037128
2.26637e-06
0.000371279
2.3278e-06
0.000371275
2.3837e-06
0.000371271
2.44855e-06
0.000371265
2.50427e-06
0.000371259
2.57335e-06
0.00037125
2.62802e-06
0.00037124
2.70241e-06
0.000371229
2.75486e-06
0.000371216
2.83603e-06
0.000371201
2.88475e-06
0.000371185
2.97462e-06
0.000371166
3.01775e-06
0.000371147
3.1187e-06
0.000371124
3.15419e-06
0.0003711
3.26887e-06
0.000371074
3.29512e-06
0.000371046
3.42564e-06
0.000371015
3.44342e-06
0.000370982
3.58887e-06
0.000370947
3.60654e-06
0.000370909
3.75626e-06
3.80032e-06
0.000381061
2.35577e-07
0.000381063
2.49163e-07
0.000381066
2.63532e-07
0.000381069
2.78706e-07
0.000381073
2.94705e-07
0.000381077
3.11544e-07
0.000381082
3.29234e-07
0.000381087
3.47782e-07
0.000381093
3.67191e-07
0.0003811
3.87458e-07
0.000381107
4.08579e-07
0.000381115
4.30544e-07
0.000381123
4.53342e-07
0.000381132
4.7696e-07
0.000381141
5.01382e-07
0.000381151
5.26593e-07
0.000381162
5.52577e-07
0.000381172
5.79317e-07
0.000381184
6.068e-07
0.000381195
6.35013e-07
0.000381207
6.63943e-07
0.00038122
6.93583e-07
0.000381232
7.23923e-07
0.000381245
7.54959e-07
0.000381258
7.86687e-07
0.000381271
8.19107e-07
0.000381285
8.52218e-07
0.000381298
8.86024e-07
0.000381312
9.20528e-07
0.000381325
9.55737e-07
0.000381339
9.91656e-07
0.000381353
1.02829e-06
0.000381366
1.06566e-06
0.00038138
1.10376e-06
0.000381393
1.14261e-06
0.000381407
1.18222e-06
0.00038142
1.2226e-06
0.000381433
1.26375e-06
0.000381446
1.3057e-06
0.000381459
1.34845e-06
0.000381471
1.39202e-06
0.000381483
1.43639e-06
0.000381495
1.48163e-06
0.000381506
1.52766e-06
0.000381517
1.57462e-06
0.000381528
1.62234e-06
0.000381538
1.67108e-06
0.000381548
1.72049e-06
0.000381557
1.77108e-06
0.000381565
1.82217e-06
0.000381573
1.87469e-06
0.00038158
1.9274e-06
0.000381586
1.98198e-06
0.000381592
2.03622e-06
0.000381596
2.09304e-06
0.0003816
2.14864e-06
0.000381603
2.20794e-06
0.000381605
2.26462e-06
0.000381606
2.32679e-06
0.000381605
2.38414e-06
0.000381604
2.44972e-06
0.000381601
2.50714e-06
0.000381598
2.57691e-06
0.000381592
2.63355e-06
0.000381586
2.70858e-06
0.000381578
2.76331e-06
0.000381569
2.84504e-06
0.000381557
2.89636e-06
0.000381545
2.98673e-06
0.00038153
3.03277e-06
0.000381514
3.13418e-06
0.000381496
3.17286e-06
0.000381477
3.28806e-06
0.000381454
3.31765e-06
0.000381431
3.44893e-06
0.000381404
3.46999e-06
0.000381376
3.61672e-06
0.000381346
3.63711e-06
0.000381313
3.78885e-06
3.83421e-06
0.00039164
2.33726e-07
0.000391643
2.46914e-07
0.000391645
2.60854e-07
0.000391648
2.7557e-07
0.000391652
2.91083e-07
0.000391656
3.07411e-07
0.000391661
3.2457e-07
0.000391666
3.42569e-07
0.000391672
3.61415e-07
0.000391678
3.81113e-07
0.000391685
4.01662e-07
0.000391692
4.23058e-07
0.000391701
4.45295e-07
0.000391709
4.68365e-07
0.000391718
4.92255e-07
0.000391728
5.16956e-07
0.000391738
5.42453e-07
0.000391749
5.68734e-07
0.00039176
5.95786e-07
0.000391771
6.23597e-07
0.000391783
6.52158e-07
0.000391795
6.81459e-07
0.000391807
7.11492e-07
0.00039182
7.42252e-07
0.000391833
7.73735e-07
0.000391846
8.05939e-07
0.00039186
8.38864e-07
0.000391873
8.72512e-07
0.000391887
9.06886e-07
0.0003919
9.41991e-07
0.000391914
9.77834e-07
0.000391928
1.01442e-06
0.000391942
1.05176e-06
0.000391956
1.08987e-06
0.00039197
1.12875e-06
0.000391984
1.16841e-06
0.000391997
1.20886e-06
0.000392011
1.25013e-06
0.000392024
1.29221e-06
0.000392038
1.33512e-06
0.000392051
1.37888e-06
0.000392064
1.42348e-06
0.000392076
1.46897e-06
0.000392089
1.5153e-06
0.000392101
1.56257e-06
0.000392113
1.61066e-06
0.000392124
1.65978e-06
0.000392135
1.70964e-06
0.000392145
1.76066e-06
0.000392155
1.8123e-06
0.000392164
1.86532e-06
0.000392173
1.9187e-06
0.000392181
1.97383e-06
0.000392189
2.02886e-06
0.000392195
2.08628e-06
0.000392201
2.14281e-06
0.000392206
2.20275e-06
0.00039221
2.26054e-06
0.000392214
2.32337e-06
0.000392216
2.38203e-06
0.000392217
2.44826e-06
0.000392217
2.50724e-06
0.000392217
2.57761e-06
0.000392214
2.63609e-06
0.000392211
2.71165e-06
0.000392206
2.76854e-06
0.0003922
2.85072e-06
0.000392192
2.90453e-06
0.000392183
2.99526e-06
0.000392172
3.04414e-06
0.00039216
3.14584e-06
0.000392146
3.18768e-06
0.00039213
3.30316e-06
0.000392112
3.33615e-06
0.000392093
3.46786e-06
0.000392071
3.49236e-06
0.000392047
3.63988e-06
0.000392021
3.66332e-06
0.000391994
3.81645e-06
3.86368e-06
0.000402513
2.31818e-07
0.000402515
2.44634e-07
0.000402518
2.58173e-07
0.000402521
2.7246e-07
0.000402524
2.87517e-07
0.000402528
3.03366e-07
0.000402533
3.20022e-07
0.000402538
3.37501e-07
0.000402544
3.55814e-07
0.00040255
3.74967e-07
0.000402556
3.94966e-07
0.000402564
4.15811e-07
0.000402571
4.375e-07
0.00040258
4.6003e-07
0.000402589
4.83393e-07
0.000402598
5.07582e-07
0.000402608
5.32588e-07
0.000402618
5.58399e-07
0.000402629
5.85007e-07
0.00040264
6.12401e-07
0.000402652
6.40572e-07
0.000402664
6.69511e-07
0.000402676
6.99212e-07
0.000402689
7.29669e-07
0.000402701
7.60877e-07
0.000402715
7.92835e-07
0.000402728
8.25542e-07
0.000402741
8.58998e-07
0.000402755
8.93207e-07
0.000402769
9.28173e-07
0.000402783
9.63901e-07
0.000402797
1.0004e-06
0.000402811
1.03767e-06
0.000402825
1.07574e-06
0.000402839
1.1146e-06
0.000402853
1.15426e-06
0.000402867
1.19475e-06
0.000402882
1.23607e-06
0.000402895
1.27823e-06
0.000402909
1.32125e-06
0.000402923
1.36514e-06
0.000402937
1.4099e-06
0.00040295
1.45557e-06
0.000402963
1.50212e-06
0.000402976
1.54964e-06
0.000402989
1.59801e-06
0.000403001
1.64743e-06
0.000403013
1.69766e-06
0.000403025
1.74904e-06
0.000403036
1.80113e-06
0.000403047
1.85457e-06
0.000403057
1.9085e-06
0.000403067
1.9641e-06
0.000403076
2.01981e-06
0.000403084
2.07774e-06
0.000403092
2.13509e-06
0.000403099
2.19558e-06
0.000403105
2.25436e-06
0.000403111
2.31774e-06
0.000403115
2.3776e-06
0.000403119
2.44437e-06
0.000403122
2.50478e-06
0.000403124
2.57566e-06
0.000403124
2.63585e-06
0.000403124
2.71185e-06
0.000403122
2.77076e-06
0.000403119
2.85329e-06
0.000403114
2.90948e-06
0.000403109
3.00044e-06
0.000403101
3.05207e-06
0.000403093
3.15389e-06
0.000403082
3.19884e-06
0.00040307
3.31438e-06
0.000403056
3.35079e-06
0.000403041
3.48261e-06
0.000403023
3.51069e-06
0.000403004
3.65855e-06
0.000402982
3.68532e-06
0.000402959
3.83924e-06
3.88888e-06
0.000413686
2.29854e-07
0.000413689
2.42321e-07
0.000413691
2.55483e-07
0.000413694
2.69367e-07
0.000413698
2.83996e-07
0.000413702
2.99392e-07
0.000413706
3.15575e-07
0.000413711
3.32561e-07
0.000413717
3.50365e-07
0.000413723
3.68998e-07
0.000413729
3.88467e-07
0.000413736
4.08779e-07
0.000413744
4.29935e-07
0.000413752
4.51935e-07
0.00041376
4.74777e-07
0.00041377
4.98457e-07
0.000413779
5.22968e-07
0.000413789
5.48304e-07
0.0004138
5.74457e-07
0.000413811
6.01419e-07
0.000413822
6.29182e-07
0.000413834
6.5774e-07
0.000413846
6.87087e-07
0.000413859
7.17216e-07
0.000413871
7.48124e-07
0.000413884
7.79808e-07
0.000413898
8.12268e-07
0.000413911
8.45503e-07
0.000413925
8.79515e-07
0.000413939
9.14309e-07
0.000413953
9.49889e-07
0.000413967
9.86262e-07
0.000413981
1.02343e-06
0.000413995
1.06142e-06
0.00041401
1.10022e-06
0.000414024
1.13985e-06
0.000414039
1.18032e-06
0.000414053
1.22165e-06
0.000414067
1.26384e-06
0.000414082
1.30691e-06
0.000414096
1.35088e-06
0.00041411
1.39575e-06
0.000414124
1.44154e-06
0.000414138
1.48825e-06
0.000414152
1.53594e-06
0.000414165
1.58454e-06
0.000414178
1.63418e-06
0.000414191
1.6847e-06
0.000414204
1.73636e-06
0.000414216
1.78882e-06
0.000414228
1.84259e-06
0.00041424
1.89698e-06
0.000414251
1.95298e-06
0.000414262
2.00925e-06
0.000414272
2.06762e-06
0.000414281
2.12567e-06
0.00041429
2.18663e-06
0.000414298
2.24627e-06
0.000414306
2.31013e-06
0.000414312
2.37104e-06
0.000414318
2.43828e-06
0.000414323
2.49998e-06
0.000414328
2.57129e-06
0.00041433
2.63304e-06
0.000414333
2.7094e-06
0.000414333
2.77019e-06
0.000414334
2.85297e-06
0.000414332
2.9114e-06
0.00041433
3.00247e-06
0.000414325
3.05675e-06
0.00041432
3.15853e-06
0.000414313
3.20655e-06
0.000414305
3.32193e-06
0.000414294
3.36178e-06
0.000414283
3.49338e-06
0.000414269
3.52515e-06
0.000414255
3.67291e-06
0.000414237
3.70328e-06
0.000414219
3.8574e-06
3.90992e-06
0.000425169
2.27836e-07
0.000425172
2.39973e-07
0.000425175
2.5278e-07
0.000425178
2.66284e-07
0.000425181
2.80509e-07
0.000425185
2.95478e-07
0.000425189
3.11213e-07
0.000425194
3.27732e-07
0.0004252
3.45051e-07
0.000425205
3.63186e-07
0.000425212
3.82146e-07
0.000425218
4.01942e-07
0.000425226
4.2258e-07
0.000425234
4.44062e-07
0.000425242
4.6639e-07
0.000425251
4.89564e-07
0.00042526
5.1358e-07
0.00042527
5.38436e-07
0.000425281
5.64127e-07
0.000425291
5.90646e-07
0.000425303
6.17988e-07
0.000425314
6.46148e-07
0.000425326
6.7512e-07
0.000425338
7.049e-07
0.000425351
7.35484e-07
0.000425364
7.66869e-07
0.000425377
7.99055e-07
0.000425391
8.32041e-07
0.000425404
8.65829e-07
0.000425418
9.00422e-07
0.000425432
9.35824e-07
0.000425447
9.7204e-07
0.000425461
1.00908e-06
0.000425475
1.04695e-06
0.00042549
1.08566e-06
0.000425505
1.12522e-06
0.000425519
1.16564e-06
0.000425534
1.20693e-06
0.000425549
1.24912e-06
0.000425563
1.2922e-06
0.000425578
1.33619e-06
0.000425593
1.38111e-06
0.000425607
1.42698e-06
0.000425622
1.47379e-06
0.000425636
1.5216e-06
0.00042565
1.57035e-06
0.000425664
1.62016e-06
0.000425678
1.67089e-06
0.000425692
1.72277e-06
0.000425705
1.77552e-06
0.000425718
1.82956e-06
0.000425731
1.88432e-06
0.000425743
1.94063e-06
0.000425755
1.99738e-06
0.000425766
2.05609e-06
0.000425777
2.11474e-06
0.000425788
2.17608e-06
0.000425798
2.23647e-06
0.000425807
2.30073e-06
0.000425816
2.36257e-06
0.000425824
2.4302e-06
0.000425831
2.49304e-06
0.000425837
2.5647e-06
0.000425842
2.62788e-06
0.000425847
2.7045e-06
0.00042585
2.76704e-06
0.000425853
2.84996e-06
0.000425854
2.91052e-06
0.000425855
3.00158e-06
0.000425854
3.05839e-06
0.000425852
3.15999e-06
0.000425848
3.21099e-06
0.000425844
3.32601e-06
0.000425836
3.36928e-06
0.000425829
3.50038e-06
0.000425818
3.53594e-06
0.000425808
3.68315e-06
0.000425794
3.71737e-06
0.00042578
3.87114e-06
3.92693e-06
0.000436971
2.25765e-07
0.000436973
2.3759e-07
0.000436976
2.50061e-07
0.000436979
2.63206e-07
0.000436982
2.77049e-07
0.000436986
2.91614e-07
0.000436991
3.06923e-07
0.000436995
3.22997e-07
0.000437001
3.39855e-07
0.000437006
3.57512e-07
0.000437012
3.75984e-07
0.000437019
3.95282e-07
0.000437026
4.15415e-07
0.000437034
4.36391e-07
0.000437042
4.58215e-07
0.000437051
4.80888e-07
0.00043706
5.04412e-07
0.00043707
5.28786e-07
0.00043708
5.54008e-07
0.00043709
5.80076e-07
0.000437101
6.06985e-07
0.000437113
6.34731e-07
0.000437124
6.63312e-07
0.000437137
6.92723e-07
0.000437149
7.22962e-07
0.000437162
7.54026e-07
0.000437175
7.85914e-07
0.000437189
8.18626e-07
0.000437202
8.52163e-07
0.000437216
8.86528e-07
0.00043723
9.21724e-07
0.000437245
9.57756e-07
0.000437259
9.94632e-07
0.000437274
1.03236e-06
0.000437288
1.07094e-06
0.000437303
1.1104e-06
0.000437318
1.15074e-06
0.000437333
1.19196e-06
0.000437348
1.2341e-06
0.000437363
1.27715e-06
0.000437378
1.32114e-06
0.000437393
1.36607e-06
0.000437408
1.41197e-06
0.000437423
1.45883e-06
0.000437438
1.50671e-06
0.000437453
1.55556e-06
0.000437467
1.60548e-06
0.000437482
1.65637e-06
0.000437496
1.7084e-06
0.000437511
1.76136e-06
0.000437524
1.8156e-06
0.000437538
1.87066e-06
0.000437552
1.9272e-06
0.000437565
1.98434e-06
0.000437577
2.04333e-06
0.00043759
2.10248e-06
0.000437602
2.16413e-06
0.000437613
2.22515e-06
0.000437624
2.28973e-06
0.000437634
2.35238e-06
0.000437644
2.42031e-06
0.000437653
2.48418e-06
0.000437661
2.5561e-06
0.000437669
2.62056e-06
0.000437676
2.69737e-06
0.000437681
2.76151e-06
0.000437687
2.84449e-06
0.00043769
2.90702e-06
0.000437694
2.99797e-06
0.000437695
3.0572e-06
0.000437697
3.15848e-06
0.000437695
3.21237e-06
0.000437694
3.32683e-06
0.00043769
3.37351e-06
0.000437687
3.50381e-06
0.00043768
3.54322e-06
0.000437673
3.6895e-06
0.000437663
3.72775e-06
0.000437653
3.88066e-06
3.94006e-06
0.000449099
2.2364e-07
0.000449102
2.35169e-07
0.000449104
2.47323e-07
0.000449107
2.60128e-07
0.000449111
2.73609e-07
0.000449115
2.8779e-07
0.000449119
3.02695e-07
0.000449124
3.18345e-07
0.000449129
3.34761e-07
0.000449134
3.51962e-07
0.00044914
3.69964e-07
0.000449147
3.88781e-07
0.000449154
4.08425e-07
0.000449161
4.28908e-07
0.000449169
4.50235e-07
0.000449178
4.72415e-07
0.000449187
4.9545e-07
0.000449196
5.19342e-07
0.000449206
5.44093e-07
0.000449216
5.69703e-07
0.000449227
5.96169e-07
0.000449238
6.2349e-07
0.00044925
6.51665e-07
0.000449262
6.8069e-07
0.000449275
7.10564e-07
0.000449287
7.41285e-07
0.0004493
7.72853e-07
0.000449314
8.05267e-07
0.000449327
8.38529e-07
0.000449341
8.7264e-07
0.000449355
9.07605e-07
0.00044937
9.43427e-07
0.000449384
9.80112e-07
0.000449399
1.01767e-06
0.000449414
1.0561e-06
0.000449429
1.09543e-06
0.000449444
1.13565e-06
0.000449459
1.17678e-06
0.000449474
1.21884e-06
0.00044949
1.26183e-06
0.000449505
1.30577e-06
0.00044952
1.35067e-06
0.000449536
1.39656e-06
0.000449551
1.44344e-06
0.000449566
1.49134e-06
0.000449582
1.54024e-06
0.000449597
1.59023e-06
0.000449612
1.64121e-06
0.000449627
1.69335e-06
0.000449642
1.74647e-06
0.000449657
1.80085e-06
0.000449671
1.85612e-06
0.000449686
1.91285e-06
0.0004497
1.97028e-06
0.000449714
2.0295e-06
0.000449727
2.08905e-06
0.00044974
2.15093e-06
0.000449753
2.21248e-06
0.000449765
2.27731e-06
0.000449777
2.34065e-06
0.000449789
2.40882e-06
0.000449799
2.47358e-06
0.00044981
2.54569e-06
0.000449819
2.6113e-06
0.000449828
2.68821e-06
0.000449836
2.75381e-06
0.000449843
2.83677e-06
0.000449849
2.90114e-06
0.000449855
2.99188e-06
0.000449859
3.05338e-06
0.000449864
3.15422e-06
0.000449865
3.21089e-06
0.000449867
3.32463e-06
0.000449866
3.37464e-06
0.000449866
3.5039e-06
0.000449862
3.5472e-06
0.000449859
3.69216e-06
0.000449852
3.73461e-06
0.000449847
3.88619e-06
3.94945e-06
0.000461564
2.21464e-07
0.000461566
2.32711e-07
0.000461569
2.44563e-07
0.000461572
2.57044e-07
0.000461575
2.70181e-07
0.000461579
2.83997e-07
0.000461583
2.98516e-07
0.000461588
3.13763e-07
0.000461593
3.29757e-07
0.000461598
3.4652e-07
0.000461604
3.64069e-07
0.000461611
3.82422e-07
0.000461617
4.01593e-07
0.000461625
4.21594e-07
0.000461633
4.42437e-07
0.000461641
4.6413e-07
0.00046165
4.86681e-07
0.000461659
5.10094e-07
0.000461669
5.34372e-07
0.000461679
5.59519e-07
0.000461689
5.85535e-07
0.0004617
6.12421e-07
0.000461712
6.40176e-07
0.000461724
6.68801e-07
0.000461736
6.98293e-07
0.000461749
7.28653e-07
0.000461762
7.59879e-07
0.000461775
7.91974e-07
0.000461789
8.24937e-07
0.000461802
8.58772e-07
0.000461817
8.9348e-07
0.000461831
9.29066e-07
0.000461846
9.65536e-07
0.00046186
1.0029e-06
0.000461875
1.04115e-06
0.00046189
1.08032e-06
0.000461906
1.1204e-06
0.000461921
1.16141e-06
0.000461936
1.20336e-06
0.000461952
1.24626e-06
0.000461968
1.29012e-06
0.000461983
1.33497e-06
0.000461999
1.38082e-06
0.000462015
1.42767e-06
0.000462031
1.47556e-06
0.000462046
1.52447e-06
0.000462062
1.57448e-06
0.000462078
1.62552e-06
0.000462094
1.67771e-06
0.000462109
1.73093e-06
0.000462125
1.7854e-06
0.00046214
1.84083e-06
0.000462155
1.89768e-06
0.00046217
1.95535e-06
0.000462185
2.01471e-06
0.000462199
2.07458e-06
0.000462213
2.13664e-06
0.000462227
2.19862e-06
0.000462241
2.26363e-06
0.000462254
2.32755e-06
0.000462267
2.39589e-06
0.000462279
2.46143e-06
0.000462291
2.53366e-06
0.000462302
2.60028e-06
0.000462313
2.67723e-06
0.000462323
2.74414e-06
0.000462333
2.827e-06
0.000462341
2.89306e-06
0.000462349
2.9835e-06
0.000462355
3.04714e-06
0.000462362
3.14742e-06
0.000462366
3.20676e-06
0.000462371
3.3196e-06
0.000462373
3.3729e-06
0.000462376
3.50088e-06
0.000462375
3.54807e-06
0.000462376
3.69136e-06
0.000462372
3.73813e-06
0.000462371
3.88796e-06
3.95525e-06
0.000474373
2.19235e-07
0.000474376
2.30215e-07
0.000474379
2.41778e-07
0.000474382
2.53951e-07
0.000474385
2.6676e-07
0.000474389
2.80228e-07
0.000474393
2.9438e-07
0.000474398
3.0924e-07
0.000474403
3.24831e-07
0.000474408
3.41173e-07
0.000474414
3.58287e-07
0.00047442
3.76192e-07
0.000474427
3.94903e-07
0.000474434
4.14437e-07
0.000474441
4.34805e-07
0.00047445
4.56021e-07
0.000474458
4.78093e-07
0.000474467
5.01029e-07
0.000474477
5.24836e-07
0.000474487
5.49517e-07
0.000474497
5.75078e-07
0.000474508
6.0152e-07
0.000474519
6.28846e-07
0.000474531
6.57056e-07
0.000474543
6.86151e-07
0.000474556
7.16132e-07
0.000474569
7.46999e-07
0.000474582
7.78754e-07
0.000474595
8.11397e-07
0.000474609
8.44932e-07
0.000474623
8.79361e-07
0.000474638
9.14688e-07
0.000474652
9.50918e-07
0.000474667
9.88058e-07
0.000474682
1.02611e-06
0.000474698
1.06509e-06
0.000474713
1.10501e-06
0.000474728
1.14587e-06
0.000474744
1.18768e-06
0.00047476
1.23047e-06
0.000474776
1.27423e-06
0.000474792
1.31899e-06
0.000474808
1.36477e-06
0.000474824
1.41156e-06
0.00047484
1.45941e-06
0.000474856
1.5083e-06
0.000474872
1.55829e-06
0.000474889
1.60934e-06
0.000474905
1.66155e-06
0.000474921
1.71482e-06
0.000474937
1.76934e-06
0.000474953
1.82488e-06
0.000474969
1.8818e-06
0.000474984
1.93963e-06
0.000475
1.9991e-06
0.000475015
2.05921e-06
0.000475031
2.12138e-06
0.000475046
2.18372e-06
0.00047506
2.24885e-06
0.000475075
2.31325e-06
0.000475089
2.3817e-06
0.000475102
2.44789e-06
0.000475116
2.52018e-06
0.000475128
2.58769e-06
0.000475141
2.66461e-06
0.000475153
2.7327e-06
0.000475164
2.81538e-06
0.000475174
2.88298e-06
0.000475185
2.97305e-06
0.000475193
3.03869e-06
0.000475202
3.1383e-06
0.000475209
3.20018e-06
0.000475216
3.31199e-06
0.000475221
3.36847e-06
0.000475227
3.49496e-06
0.000475229
3.54601e-06
0.000475233
3.68734e-06
0.000475233
3.73849e-06
0.000475234
3.88621e-06
3.95762e-06
0.000487538
2.16956e-07
0.000487541
2.27679e-07
0.000487543
2.38967e-07
0.000487547
2.50846e-07
0.00048755
2.63341e-07
0.000487554
2.76476e-07
0.000487558
2.90278e-07
0.000487562
3.04768e-07
0.000487567
3.19971e-07
0.000487572
3.3591e-07
0.000487578
3.52605e-07
0.000487584
3.70076e-07
0.000487591
3.88342e-07
0.000487598
4.07421e-07
0.000487605
4.27326e-07
0.000487613
4.48073e-07
0.000487622
4.69673e-07
0.000487631
4.92137e-07
0.00048764
5.15474e-07
0.00048765
5.3969e-07
0.00048766
5.64791e-07
0.000487671
5.90784e-07
0.000487682
6.17671e-07
0.000487694
6.45456e-07
0.000487706
6.7414e-07
0.000487718
7.03727e-07
0.000487731
7.34217e-07
0.000487744
7.65612e-07
0.000487757
7.97916e-07
0.000487771
8.3113e-07
0.000487785
8.65257e-07
0.0004878
9.00302e-07
0.000487814
9.3627e-07
0.000487829
9.73165e-07
0.000487844
1.011e-06
0.00048786
1.04977e-06
0.000487875
1.08949e-06
0.000487891
1.13018e-06
0.000487907
1.17184e-06
0.000487923
1.21448e-06
0.000487939
1.25812e-06
0.000487955
1.30276e-06
0.000487971
1.34844e-06
0.000487988
1.39515e-06
0.000488004
1.44293e-06
0.000488021
1.49177e-06
0.000488037
1.54171e-06
0.000488054
1.59274e-06
0.000488071
1.64494e-06
0.000488087
1.69822e-06
0.000488104
1.75274e-06
0.00048812
1.80834e-06
0.000488137
1.8653e-06
0.000488153
1.92323e-06
0.00048817
1.98275e-06
0.000488186
2.04304e-06
0.000488202
2.10529e-06
0.000488218
2.16789e-06
0.000488233
2.23309e-06
0.000488249
2.29789e-06
0.000488264
2.36639e-06
0.000488279
2.43313e-06
0.000488294
2.50542e-06
0.000488308
2.57369e-06
0.000488322
2.65053e-06
0.000488335
2.71966e-06
0.000488348
2.80211e-06
0.00048836
2.8711e-06
0.000488372
2.96072e-06
0.000488383
3.02821e-06
0.000488394
3.12706e-06
0.000488403
3.19136e-06
0.000488413
3.302e-06
0.00048842
3.36156e-06
0.000488428
3.48637e-06
0.000488433
3.54124e-06
0.00048844
3.68033e-06
0.000488443
3.73588e-06
0.000488448
3.88117e-06
3.95672e-06
0.000501068
2.14626e-07
0.00050107
2.25103e-07
0.000501073
2.36127e-07
0.000501076
2.47725e-07
0.00050108
2.5992e-07
0.000501083
2.72737e-07
0.000501087
2.86202e-07
0.000501092
3.00338e-07
0.000501097
3.15169e-07
0.000501102
3.30719e-07
0.000501107
3.4701e-07
0.000501113
3.64063e-07
0.00050112
3.81898e-07
0.000501127
4.00533e-07
0.000501134
4.19987e-07
0.000501142
4.40275e-07
0.00050115
4.61411e-07
0.000501159
4.83408e-07
0.000501168
5.06277e-07
0.000501178
5.30028e-07
0.000501188
5.54669e-07
0.000501198
5.80207e-07
0.000501209
6.06649e-07
0.000501221
6.33999e-07
0.000501233
6.62261e-07
0.000501245
6.91439e-07
0.000501258
7.21536e-07
0.000501271
7.52556e-07
0.000501284
7.84501e-07
0.000501298
8.17374e-07
0.000501312
8.51179e-07
0.000501326
8.8592e-07
0.000501341
9.21602e-07
0.000501356
9.58231e-07
0.000501371
9.95812e-07
0.000501387
1.03435e-06
0.000501402
1.07386e-06
0.000501418
1.11435e-06
0.000501434
1.15583e-06
0.00050145
1.19831e-06
0.000501467
1.24179e-06
0.000501483
1.28631e-06
0.0005015
1.33186e-06
0.000501516
1.37846e-06
0.000501533
1.42614e-06
0.00050155
1.4749e-06
0.000501567
1.52478e-06
0.000501584
1.57576e-06
0.000501601
1.6279e-06
0.000501618
1.68116e-06
0.000501635
1.73567e-06
0.000501652
1.79127e-06
0.000501669
1.84823e-06
0.000501686
1.90623e-06
0.000501703
1.96576e-06
0.00050172
2.02617e-06
0.000501737
2.08844e-06
0.000501754
2.15125e-06
0.00050177
2.21648e-06
0.000501787
2.28158e-06
0.000501803
2.35008e-06
0.000501819
2.41728e-06
0.000501835
2.48953e-06
0.00050185
2.55845e-06
0.000501865
2.63514e-06
0.00050188
2.70518e-06
0.000501894
2.78735e-06
0.000501908
2.8576e-06
0.000501922
2.94671e-06
0.000501934
3.0159e-06
0.000501947
3.11392e-06
0.000501958
3.18048e-06
0.00050197
3.28985e-06
0.00050198
3.35237e-06
0.000501991
3.47534e-06
0.000501998
3.53395e-06
0.000502008
3.67058e-06
0.000502013
3.7305e-06
0.000502021
3.87312e-06
3.95274e-06
0.000514972
2.12247e-07
0.000514975
2.22487e-07
0.000514977
2.33258e-07
0.000514981
2.44585e-07
0.000514984
2.56493e-07
0.000514988
2.69005e-07
0.000514992
2.82146e-07
0.000514996
2.95942e-07
0.000515001
3.10416e-07
0.000515006
3.25592e-07
0.000515012
3.41493e-07
0.000515018
3.58141e-07
0.000515024
3.75557e-07
0.000515031
3.93763e-07
0.000515038
4.12776e-07
0.000515046
4.32614e-07
0.000515054
4.53294e-07
0.000515062
4.7483e-07
0.000515071
4.97236e-07
0.000515081
5.20523e-07
0.000515091
5.44703e-07
0.000515101
5.69784e-07
0.000515112
5.95775e-07
0.000515123
6.22683e-07
0.000515135
6.50513e-07
0.000515147
6.79271e-07
0.00051516
7.08962e-07
0.000515173
7.39589e-07
0.000515186
7.71158e-07
0.0005152
8.03671e-07
0.000515214
8.37134e-07
0.000515228
8.7155e-07
0.000515243
9.06926e-07
0.000515258
9.43265e-07
0.000515273
9.80576e-07
0.000515289
1.01886e-06
0.000515304
1.05814e-06
0.00051532
1.09841e-06
0.000515336
1.13968e-06
0.000515353
1.18197e-06
0.000515369
1.22528e-06
0.000515386
1.26964e-06
0.000515403
1.31504e-06
0.00051542
1.36152e-06
0.000515437
1.40908e-06
0.000515454
1.45773e-06
0.000515471
1.50751e-06
0.000515489
1.55841e-06
0.000515506
1.61048e-06
0.000515523
1.6637e-06
0.000515541
1.71815e-06
0.000515559
1.77373e-06
0.000515576
1.83066e-06
0.000515594
1.88867e-06
0.000515611
1.94819e-06
0.000515629
2.00867e-06
0.000515646
2.07093e-06
0.000515664
2.13388e-06
0.000515681
2.19909e-06
0.000515698
2.26443e-06
0.000515715
2.3329e-06
0.000515732
2.40046e-06
0.000515749
2.47262e-06
0.000515765
2.54209e-06
0.000515782
2.6186e-06
0.000515798
2.68944e-06
0.000515814
2.77127e-06
0.000515829
2.84265e-06
0.000515844
2.93119e-06
0.000515858
3.00193e-06
0.000515873
3.09906e-06
0.000515886
3.16774e-06
0.0005159
3.27575e-06
0.000515911
3.34109e-06
0.000515924
3.4621e-06
0.000515934
3.52433e-06
0.000515946
3.65833e-06
0.000515954
3.72253e-06
0.000515965
3.86229e-06
3.94585e-06
0.000529262
2.09819e-07
0.000529264
2.19831e-07
0.000529267
2.30359e-07
0.00052927
2.41426e-07
0.000529274
2.53056e-07
0.000529277
2.65275e-07
0.000529282
2.78106e-07
0.000529286
2.91574e-07
0.000529291
3.05704e-07
0.000529296
3.20519e-07
0.000529301
3.36043e-07
0.000529307
3.523e-07
0.000529313
3.69311e-07
0.00052932
3.87098e-07
0.000529327
4.05681e-07
0.000529335
4.25079e-07
0.000529343
4.45311e-07
0.000529351
4.66393e-07
0.00052936
4.88341e-07
0.000529369
5.11168e-07
0.000529379
5.34887e-07
0.000529389
5.59509e-07
0.0005294
5.85046e-07
0.000529411
6.11505e-07
0.000529423
6.38895e-07
0.000529435
6.67223e-07
0.000529447
6.96494e-07
0.00052946
7.26716e-07
0.000529473
7.57892e-07
0.000529487
7.90028e-07
0.000529501
8.2313e-07
0.000529515
8.57202e-07
0.00052953
8.9225e-07
0.000529545
9.28279e-07
0.00052956
9.65296e-07
0.000529576
1.00331e-06
0.000529592
1.04232e-06
0.000529608
1.08235e-06
0.000529624
1.1234e-06
0.000529641
1.16547e-06
0.000529657
1.20859e-06
0.000529674
1.25277e-06
0.000529691
1.29801e-06
0.000529708
1.34433e-06
0.000529726
1.39175e-06
0.000529743
1.44027e-06
0.000529761
1.48994e-06
0.000529778
1.54073e-06
0.000529796
1.59271e-06
0.000529814
1.64584e-06
0.000529832
1.70022e-06
0.00052985
1.75575e-06
0.000529868
1.81262e-06
0.000529886
1.87062e-06
0.000529904
1.93009e-06
0.000529922
1.9906e-06
0.00052994
2.05282e-06
0.000529958
2.11585e-06
0.000529976
2.18102e-06
0.000529994
2.24653e-06
0.000530012
2.31493e-06
0.00053003
2.38277e-06
0.000530048
2.45482e-06
0.000530065
2.52473e-06
0.000530083
2.60104e-06
0.0005301
2.67255e-06
0.000530117
2.75402e-06
0.000530133
2.82638e-06
0.00053015
2.91433e-06
0.000530165
2.98648e-06
0.000530182
3.08267e-06
0.000530196
3.15331e-06
0.000530212
3.2599e-06
0.000530225
3.32791e-06
0.000530241
3.44685e-06
0.000530252
3.51257e-06
0.000530267
3.6438e-06
0.000530277
3.71216e-06
0.000530291
3.84892e-06
3.93623e-06
0.000543947
2.07342e-07
0.00054395
2.17134e-07
0.000543953
2.27427e-07
0.000543956
2.38244e-07
0.000543959
2.49608e-07
0.000543963
2.61544e-07
0.000543967
2.74076e-07
0.000543972
2.87229e-07
0.000543976
3.01026e-07
0.000543981
3.15493e-07
0.000543987
3.30653e-07
0.000543992
3.46531e-07
0.000543999
3.63148e-07
0.000544005
3.80528e-07
0.000544012
3.98692e-07
0.00054402
4.1766e-07
0.000544027
4.37453e-07
0.000544036
4.58088e-07
0.000544044
4.79583e-07
0.000544054
5.01953e-07
0.000544063
5.25213e-07
0.000544073
5.49377e-07
0.000544084
5.74456e-07
0.000544095
6.00463e-07
0.000544107
6.27406e-07
0.000544119
6.55294e-07
0.000544131
6.84136e-07
0.000544144
7.13938e-07
0.000544157
7.44708e-07
0.00054417
7.76451e-07
0.000544184
8.09174e-07
0.000544199
8.42883e-07
0.000544213
8.77584e-07
0.000544228
9.13282e-07
0.000544244
9.49985e-07
0.000544259
9.87699e-07
0.000544275
1.02643e-06
0.000544291
1.06619e-06
0.000544308
1.10699e-06
0.000544324
1.14884e-06
0.000544341
1.19174e-06
0.000544358
1.23571e-06
0.000544376
1.28076e-06
0.000544393
1.32691e-06
0.000544411
1.37416e-06
0.000544428
1.42254e-06
0.000544446
1.47206e-06
0.000544464
1.52274e-06
0.000544482
1.57459e-06
0.0005445
1.62763e-06
0.000544519
1.6819e-06
0.000544537
1.73737e-06
0.000544556
1.79415e-06
0.000544574
1.8521e-06
0.000544593
1.9115e-06
0.000544611
1.972e-06
0.00054463
2.03416e-06
0.000544649
2.09723e-06
0.000544667
2.16233e-06
0.000544686
2.22795e-06
0.000544705
2.29625e-06
0.000544723
2.36431e-06
0.000544742
2.43621e-06
0.00054476
2.50649e-06
0.000544778
2.58255e-06
0.000544796
2.65464e-06
0.000544815
2.73572e-06
0.000544832
2.80895e-06
0.00054485
2.89627e-06
0.000544867
2.96969e-06
0.000544885
3.0649e-06
0.000544901
3.13736e-06
0.000544918
3.24247e-06
0.000544933
3.31299e-06
0.00054495
3.4298e-06
0.000544964
3.49885e-06
0.00054498
3.62723e-06
0.000544993
3.69957e-06
0.000545009
3.83327e-06
3.92406e-06
0.00055904
2.04818e-07
0.000559042
2.14398e-07
0.000559045
2.24464e-07
0.000559049
2.35038e-07
0.000559052
2.46145e-07
0.000559056
2.57809e-07
0.00055906
2.70052e-07
0.000559064
2.829e-07
0.000559069
2.96377e-07
0.000559074
3.10507e-07
0.000559079
3.25315e-07
0.000559085
3.40825e-07
0.000559091
3.5706e-07
0.000559097
3.74044e-07
0.000559104
3.91799e-07
0.000559112
4.10347e-07
0.000559119
4.29709e-07
0.000559127
4.49905e-07
0.000559136
4.70953e-07
0.000559145
4.9287e-07
0.000559155
5.15674e-07
0.000559165
5.3938e-07
0.000559175
5.64001e-07
0.000559186
5.89552e-07
0.000559197
6.16042e-07
0.000559209
6.43484e-07
0.000559222
6.71887e-07
0.000559234
7.01259e-07
0.000559247
7.31609e-07
0.000559261
7.62945e-07
0.000559275
7.95273e-07
0.000559289
8.28601e-07
0.000559304
8.62935e-07
0.000559319
8.98283e-07
0.000559334
9.34651e-07
0.00055935
9.72046e-07
0.000559366
1.01048e-06
0.000559382
1.04995e-06
0.000559398
1.09048e-06
0.000559415
1.13207e-06
0.000559432
1.17473e-06
0.000559449
1.21847e-06
0.000559467
1.26332e-06
0.000559484
1.30927e-06
0.000559502
1.35634e-06
0.00055952
1.40455e-06
0.000559538
1.45391e-06
0.000559557
1.50443e-06
0.000559575
1.55616e-06
0.000559594
1.60907e-06
0.000559612
1.66322e-06
0.000559631
1.71859e-06
0.00055965
1.77526e-06
0.000559669
1.83315e-06
0.000559688
1.89245e-06
0.000559707
1.95291e-06
0.000559726
2.01498e-06
0.000559745
2.07806e-06
0.000559765
2.14306e-06
0.000559784
2.20874e-06
0.000559803
2.27693e-06
0.000559822
2.34515e-06
0.000559842
2.41687e-06
0.000559861
2.48744e-06
0.00055988
2.56324e-06
0.000559899
2.63581e-06
0.000559918
2.71648e-06
0.000559937
2.79046e-06
0.000559956
2.87713e-06
0.000559974
2.95169e-06
0.000559993
3.0459e-06
0.00056001
3.12002e-06
0.000560029
3.22363e-06
0.000560046
3.2965e-06
0.000560064
3.41114e-06
0.00056008
3.48333e-06
0.000560098
3.60882e-06
0.000560113
3.68493e-06
0.00056013
3.81554e-06
3.90953e-06
0.00057455
2.02247e-07
0.000574553
2.11621e-07
0.000574556
2.21467e-07
0.000574559
2.31808e-07
0.000574563
2.42666e-07
0.000574566
2.54066e-07
0.000574571
2.6603e-07
0.000574575
2.78583e-07
0.000574579
2.9175e-07
0.000574584
3.05554e-07
0.00057459
3.20021e-07
0.000574595
3.35174e-07
0.000574601
3.51038e-07
0.000574608
3.67637e-07
0.000574615
3.84994e-07
0.000574622
4.03131e-07
0.000574629
4.22071e-07
0.000574638
4.41835e-07
0.000574646
4.62442e-07
0.000574655
4.83912e-07
0.000574664
5.06263e-07
0.000574674
5.29512e-07
0.000574685
5.53676e-07
0.000574695
5.78768e-07
0.000574707
6.04803e-07
0.000574718
6.31792e-07
0.00057473
6.59748e-07
0.000574743
6.8868e-07
0.000574756
7.18599e-07
0.000574769
7.49513e-07
0.000574783
7.81432e-07
0.000574798
8.14362e-07
0.000574812
8.48312e-07
0.000574827
8.8329e-07
0.000574843
9.19303e-07
0.000574858
9.56359e-07
0.000574874
9.94466e-07
0.000574891
1.03363e-06
0.000574907
1.07387e-06
0.000574924
1.11518e-06
0.000574941
1.15758e-06
0.000574959
1.20108e-06
0.000574976
1.24569e-06
0.000574994
1.29142e-06
0.000575012
1.33828e-06
0.00057503
1.3863e-06
0.000575049
1.43548e-06
0.000575067
1.48584e-06
0.000575086
1.5374e-06
0.000575105
1.59017e-06
0.000575124
1.64419e-06
0.000575143
1.69943e-06
0.000575162
1.75598e-06
0.000575182
1.81377e-06
0.000575201
1.87296e-06
0.000575221
1.93336e-06
0.000575241
1.99532e-06
0.00057526
2.05836e-06
0.00057528
2.12325e-06
0.0005753
2.18895e-06
0.00057532
2.257e-06
0.00057534
2.32532e-06
0.00057536
2.39686e-06
0.000575379
2.46765e-06
0.000575399
2.54318e-06
0.000575419
2.61614e-06
0.000575439
2.69638e-06
0.000575459
2.77101e-06
0.000575479
2.85703e-06
0.000575498
2.9326e-06
0.000575518
3.02581e-06
0.000575537
3.10143e-06
0.000575557
3.20354e-06
0.000575575
3.27858e-06
0.000575595
3.39104e-06
0.000575612
3.46617e-06
0.000575632
3.58876e-06
0.000575648
3.6684e-06
0.000575668
3.79596e-06
3.89282e-06
0.000590491
1.9963e-07
0.000590493
2.08804e-07
0.000590497
2.18437e-07
0.0005905
2.28551e-07
0.000590503
2.39168e-07
0.000590507
2.50313e-07
0.000590511
2.62007e-07
0.000590515
2.74275e-07
0.00059052
2.87141e-07
0.000590525
3.0063e-07
0.00059053
3.14765e-07
0.000590536
3.29573e-07
0.000590542
3.45076e-07
0.000590548
3.613e-07
0.000590555
3.78268e-07
0.000590562
3.96003e-07
0.000590569
4.1453e-07
0.000590577
4.33869e-07
0.000590586
4.54042e-07
0.000590595
4.7507e-07
0.000590604
4.96973e-07
0.000590614
5.19768e-07
0.000590624
5.43474e-07
0.000590635
5.68108e-07
0.000590646
5.93683e-07
0.000590657
6.20215e-07
0.000590669
6.47717e-07
0.000590682
6.76201e-07
0.000590695
7.05679e-07
0.000590708
7.3616e-07
0.000590722
7.67655e-07
0.000590736
8.00173e-07
0.000590751
8.33723e-07
0.000590766
8.68313e-07
0.000590781
9.03952e-07
0.000590797
9.40648e-07
0.000590813
9.78411e-07
0.000590829
1.01725e-06
0.000590846
1.05717e-06
0.000590863
1.09818e-06
0.00059088
1.1403e-06
0.000590898
1.18353e-06
0.000590915
1.22788e-06
0.000590933
1.27337e-06
0.000590952
1.32001e-06
0.00059097
1.36781e-06
0.000590989
1.41679e-06
0.000591008
1.46697e-06
0.000591027
1.51835e-06
0.000591046
1.57095e-06
0.000591065
1.62481e-06
0.000591085
1.67991e-06
0.000591105
1.73632e-06
0.000591124
1.79399e-06
0.000591144
1.85305e-06
0.000591164
1.91335e-06
0.000591184
1.97518e-06
0.000591205
2.03817e-06
0.000591225
2.10292e-06
0.000591245
2.16862e-06
0.000591266
2.23651e-06
0.000591286
2.30489e-06
0.000591307
2.37623e-06
0.000591327
2.44717e-06
0.000591348
2.52242e-06
0.000591369
2.59569e-06
0.000591389
2.67551e-06
0.00059141
2.75069e-06
0.000591431
2.83605e-06
0.000591451
2.9125e-06
0.000591472
3.00472e-06
0.000591492
3.08171e-06
0.000591513
3.18231e-06
0.000591532
3.25935e-06
0.000591553
3.36965e-06
0.000591572
3.44751e-06
0.000591594
3.56725e-06
0.000591612
3.65013e-06
0.000591633
3.7747e-06
3.87408e-06
0.000606873
1.96968e-07
0.000606876
2.05947e-07
0.000606879
2.15373e-07
0.000606882
2.25267e-07
0.000606885
2.35651e-07
0.000606889
2.46547e-07
0.000606893
2.57979e-07
0.000606898
2.69971e-07
0.000606902
2.82546e-07
0.000606907
2.95728e-07
0.000606912
3.09542e-07
0.000606918
3.24013e-07
0.000606924
3.39165e-07
0.00060693
3.55024e-07
0.000606937
3.71612e-07
0.000606944
3.88956e-07
0.000606951
4.07077e-07
0.000606959
4.26e-07
0.000606967
4.45746e-07
0.000606976
4.66338e-07
0.000606985
4.87796e-07
0.000606995
5.1014e-07
0.000607005
5.33391e-07
0.000607016
5.57565e-07
0.000607027
5.8268e-07
0.000607038
6.08752e-07
0.00060705
6.35795e-07
0.000607062
6.63823e-07
0.000607075
6.9285e-07
0.000607088
7.22888e-07
0.000607102
7.53947e-07
0.000607116
7.86038e-07
0.000607131
8.19172e-07
0.000607146
8.53358e-07
0.000607161
8.88605e-07
0.000607177
9.24923e-07
0.000607193
9.6232e-07
0.000607209
1.00081e-06
0.000607226
1.04039e-06
0.000607243
1.08108e-06
0.000607261
1.12289e-06
0.000607278
1.16583e-06
0.000607296
1.20991e-06
0.000607315
1.25514e-06
0.000607333
1.30153e-06
0.000607352
1.3491e-06
0.000607371
1.39786e-06
0.00060739
1.44782e-06
0.000607409
1.499e-06
0.000607429
1.55142e-06
0.000607448
1.6051e-06
0.000607468
1.66003e-06
0.000607488
1.71629e-06
0.000607508
1.77381e-06
0.000607529
1.83273e-06
0.000607549
1.89291e-06
0.00060757
1.9546e-06
0.00060759
2.01749e-06
0.000607611
2.08211e-06
0.000607632
2.14775e-06
0.000607653
2.21548e-06
0.000607674
2.28387e-06
0.000607695
2.355e-06
0.000607717
2.42605e-06
0.000607738
2.50101e-06
0.000607759
2.57452e-06
0.000607781
2.65392e-06
0.000607802
2.72955e-06
0.000607824
2.81427e-06
0.000607845
2.89149e-06
0.000607867
2.98272e-06
0.000607887
3.06093e-06
0.00060791
3.16006e-06
0.00060793
3.23892e-06
0.000607953
3.3471e-06
0.000607973
3.42745e-06
0.000607996
3.54441e-06
0.000608015
3.63025e-06
0.000608038
3.75195e-06
3.85348e-06
0.000623709
1.94261e-07
0.000623712
2.03051e-07
0.000623715
2.12275e-07
0.000623718
2.21955e-07
0.000623722
2.32112e-07
0.000623725
2.42768e-07
0.000623729
2.53946e-07
0.000623734
2.65668e-07
0.000623738
2.7796e-07
0.000623743
2.90845e-07
0.000623748
3.04346e-07
0.000623754
3.1849e-07
0.00062376
3.33301e-07
0.000623766
3.48803e-07
0.000623773
3.65021e-07
0.00062378
3.81981e-07
0.000623787
3.99705e-07
0.000623795
4.18219e-07
0.000623803
4.37545e-07
0.000623812
4.57707e-07
0.000623821
4.78725e-07
0.00062383
5.00623e-07
0.00062384
5.2342e-07
0.000623851
5.47136e-07
0.000623861
5.7179e-07
0.000623873
5.97398e-07
0.000623885
6.23979e-07
0.000623897
6.51546e-07
0.00062391
6.80114e-07
0.000623923
7.09698e-07
0.000623936
7.4031e-07
0.00062395
7.71962e-07
0.000623965
8.04666e-07
0.00062398
8.38432e-07
0.000623995
8.7327e-07
0.000624011
9.09191e-07
0.000624027
9.46205e-07
0.000624044
9.84321e-07
0.00062406
1.02355e-06
0.000624078
1.0639e-06
0.000624095
1.10538e-06
0.000624113
1.14801e-06
0.000624131
1.19178e-06
0.000624149
1.23673e-06
0.000624168
1.28285e-06
0.000624187
1.33016e-06
0.000624206
1.37867e-06
0.000624226
1.4284e-06
0.000624245
1.47937e-06
0.000624265
1.53158e-06
0.000624285
1.58506e-06
0.000624305
1.63981e-06
0.000624326
1.69589e-06
0.000624346
1.75325e-06
0.000624367
1.812e-06
0.000624388
1.87204e-06
0.000624409
1.93357e-06
0.00062443
1.99635e-06
0.000624451
2.0608e-06
0.000624473
2.12637e-06
0.000624494
2.19393e-06
0.000624516
2.26229e-06
0.000624538
2.33321e-06
0.000624559
2.40431e-06
0.000624582
2.47898e-06
0.000624603
2.55267e-06
0.000624626
2.63165e-06
0.000624648
2.70765e-06
0.00062467
2.79174e-06
0.000624692
2.86962e-06
0.000624715
2.9599e-06
0.000624737
3.03918e-06
0.00062476
3.13689e-06
0.000624781
3.21737e-06
0.000624805
3.32351e-06
0.000624826
3.40612e-06
0.00062485
3.5204e-06
0.000624872
3.60888e-06
0.000624896
3.72784e-06
3.83116e-06
0.000641011
1.91512e-07
0.000641014
2.00116e-07
0.000641017
2.09144e-07
0.000641021
2.18615e-07
0.000641024
2.28551e-07
0.000641028
2.38973e-07
0.000641032
2.49903e-07
0.000641036
2.61365e-07
0.000641041
2.73381e-07
0.000641046
2.85976e-07
0.000641051
2.99173e-07
0.000641056
3.12999e-07
0.000641062
3.27476e-07
0.000641068
3.42631e-07
0.000641075
3.58488e-07
0.000641082
3.75071e-07
0.000641089
3.92407e-07
0.000641097
4.1052e-07
0.000641105
4.29433e-07
0.000641114
4.4917e-07
0.000641122
4.69755e-07
0.000641132
4.91209e-07
0.000641142
5.13556e-07
0.000641152
5.36816e-07
0.000641163
5.61008e-07
0.000641174
5.86152e-07
0.000641186
6.12266e-07
0.000641198
6.39367e-07
0.000641211
6.67472e-07
0.000641224
6.96594e-07
0.000641237
7.26749e-07
0.000641251
7.5795e-07
0.000641266
7.9021e-07
0.000641281
8.23541e-07
0.000641296
8.57955e-07
0.000641312
8.93462e-07
0.000641328
9.30073e-07
0.000641344
9.67799e-07
0.000641361
1.00665e-06
0.000641379
1.04664e-06
0.000641396
1.08777e-06
0.000641414
1.13006e-06
0.000641432
1.17352e-06
0.000641451
1.21815e-06
0.00064147
1.26398e-06
0.000641489
1.31101e-06
0.000641508
1.35926e-06
0.000641528
1.40874e-06
0.000641548
1.45946e-06
0.000641568
1.51144e-06
0.000641588
1.56471e-06
0.000641609
1.61925e-06
0.00064163
1.67513e-06
0.000641651
1.73231e-06
0.000641672
1.79087e-06
0.000641693
1.85075e-06
0.000641715
1.91211e-06
0.000641736
1.97476e-06
0.000641758
2.03903e-06
0.00064178
2.10449e-06
0.000641802
2.17186e-06
0.000641824
2.24016e-06
0.000641846
2.31086e-06
0.000641869
2.38197e-06
0.000641891
2.45634e-06
0.000641914
2.53016e-06
0.000641937
2.60872e-06
0.000641959
2.68502e-06
0.000641983
2.7685e-06
0.000642005
2.84694e-06
0.000642029
2.93629e-06
0.000642052
3.01652e-06
0.000642076
3.11285e-06
0.000642098
3.19478e-06
0.000642123
3.29896e-06
0.000642145
3.38358e-06
0.00064217
3.49532e-06
0.000642193
3.58611e-06
0.000642218
3.7025e-06
3.80724e-06
0.000658793
1.8872e-07
0.000658796
1.97144e-07
0.000658799
2.0598e-07
0.000658803
2.15247e-07
0.000658806
2.24967e-07
0.00065881
2.35161e-07
0.000658814
2.4585e-07
0.000658818
2.57057e-07
0.000658823
2.68805e-07
0.000658828
2.81118e-07
0.000658833
2.9402e-07
0.000658838
3.07534e-07
0.000658844
3.21687e-07
0.00065885
3.36502e-07
0.000658857
3.52005e-07
0.000658864
3.68222e-07
0.000658871
3.85177e-07
0.000658879
4.02896e-07
0.000658887
4.21402e-07
0.000658895
4.40722e-07
0.000658904
4.60878e-07
0.000658913
4.81894e-07
0.000658923
5.03794e-07
0.000658933
5.26599e-07
0.000658944
5.50331e-07
0.000658955
5.7501e-07
0.000658967
6.00656e-07
0.000658979
6.27287e-07
0.000658991
6.54921e-07
0.000659004
6.83575e-07
0.000659018
7.13265e-07
0.000659032
7.44004e-07
0.000659046
7.75809e-07
0.000659061
8.08692e-07
0.000659076
8.42665e-07
0.000659092
8.77742e-07
0.000659108
9.13934e-07
0.000659125
9.51251e-07
0.000659142
9.89706e-07
0.000659159
1.02931e-06
0.000659177
1.07007e-06
0.000659195
1.112e-06
0.000659213
1.15512e-06
0.000659232
1.19943e-06
0.000659251
1.24494e-06
0.00065927
1.29167e-06
0.00065929
1.33963e-06
0.00065931
1.38883e-06
0.00065933
1.43929e-06
0.00065935
1.49102e-06
0.000659371
1.54404e-06
0.000659392
1.59837e-06
0.000659413
1.65402e-06
0.000659434
1.71099e-06
0.000659456
1.76935e-06
0.000659478
1.82905e-06
0.000659499
1.89022e-06
0.000659521
1.9527e-06
0.000659544
2.01679e-06
0.000659566
2.08212e-06
0.000659589
2.14928e-06
0.000659611
2.2175e-06
0.000659634
2.28796e-06
0.000659657
2.35905e-06
0.00065968
2.43313e-06
0.000659703
2.50702e-06
0.000659727
2.58517e-06
0.00065975
2.6617e-06
0.000659774
2.74458e-06
0.000659798
2.82348e-06
0.000659822
2.91195e-06
0.000659846
2.99298e-06
0.00065987
3.088e-06
0.000659894
3.1712e-06
0.000659919
3.27352e-06
0.000659943
3.3599e-06
0.000659969
3.46926e-06
0.000659993
3.56204e-06
0.00066002
3.67603e-06
3.78186e-06
0.000677068
1.85888e-07
0.000677071
1.94134e-07
0.000677074
2.02782e-07
0.000677077
2.11851e-07
0.000677081
2.2136e-07
0.000677085
2.31331e-07
0.000677089
2.41785e-07
0.000677093
2.52744e-07
0.000677098
2.64231e-07
0.000677103
2.76268e-07
0.000677108
2.88881e-07
0.000677113
3.02092e-07
0.000677119
3.15928e-07
0.000677125
3.30412e-07
0.000677131
3.45569e-07
0.000677138
3.61427e-07
0.000677145
3.78008e-07
0.000677153
3.9534e-07
0.000677161
4.13448e-07
0.000677169
4.32355e-07
0.000677178
4.52088e-07
0.000677187
4.72671e-07
0.000677197
4.94127e-07
0.000677207
5.16481e-07
0.000677218
5.39754e-07
0.000677229
5.63968e-07
0.00067724
5.89145e-07
0.000677252
6.15303e-07
0.000677265
6.42463e-07
0.000677278
6.70642e-07
0.000677291
6.99859e-07
0.000677305
7.30128e-07
0.000677319
7.61466e-07
0.000677334
7.93889e-07
0.000677349
8.27408e-07
0.000677365
8.62039e-07
0.000677381
8.97794e-07
0.000677398
9.34686e-07
0.000677415
9.72726e-07
0.000677432
1.01193e-06
0.00067745
1.0523e-06
0.000677468
1.09385e-06
0.000677486
1.1366e-06
0.000677505
1.18056e-06
0.000677525
1.22573e-06
0.000677544
1.27213e-06
0.000677564
1.31978e-06
0.000677584
1.36869e-06
0.000677604
1.41886e-06
0.000677625
1.47032e-06
0.000677646
1.52308e-06
0.000677667
1.57715e-06
0.000677689
1.63257e-06
0.00067771
1.68931e-06
0.000677732
1.74745e-06
0.000677754
1.80695e-06
0.000677777
1.8679e-06
0.000677799
1.9302e-06
0.000677822
1.99408e-06
0.000677845
2.05926e-06
0.000677868
2.12621e-06
0.000677891
2.19431e-06
0.000677915
2.26453e-06
0.000677938
2.33555e-06
0.000677962
2.40933e-06
0.000677986
2.48325e-06
0.00067801
2.561e-06
0.000678034
2.63769e-06
0.000678058
2.72e-06
0.000678083
2.79927e-06
0.000678108
2.88689e-06
0.000678132
2.96861e-06
0.000678158
3.06239e-06
0.000678182
3.14668e-06
0.000678208
3.24725e-06
0.000678233
3.33515e-06
0.00067826
3.44227e-06
0.000678286
3.53674e-06
0.000678313
3.6485e-06
3.7551e-06
0.000695849
1.83016e-07
0.000695852
1.91089e-07
0.000695855
1.99553e-07
0.000695858
2.08427e-07
0.000695862
2.1773e-07
0.000695866
2.27484e-07
0.00069587
2.37708e-07
0.000695874
2.48424e-07
0.000695879
2.59655e-07
0.000695884
2.71424e-07
0.000695889
2.83755e-07
0.000695894
2.9667e-07
0.0006959
3.10195e-07
0.000695906
3.24355e-07
0.000695912
3.39175e-07
0.000695919
3.5468e-07
0.000695926
3.70896e-07
0.000695934
3.87848e-07
0.000695942
4.05563e-07
0.00069595
4.24065e-07
0.000695959
4.4338e-07
0.000695968
4.63534e-07
0.000695977
4.84552e-07
0.000695987
5.06457e-07
0.000695998
5.29273e-07
0.000696009
5.53023e-07
0.00069602
5.77729e-07
0.000696032
6.03413e-07
0.000696044
6.30096e-07
0.000696057
6.57796e-07
0.000696071
6.86532e-07
0.000696084
7.16323e-07
0.000696099
7.47186e-07
0.000696113
7.79136e-07
0.000696129
8.12189e-07
0.000696144
8.4636e-07
0.000696161
8.81663e-07
0.000696177
9.18111e-07
0.000696194
9.55718e-07
0.000696212
9.94495e-07
0.000696229
1.03446e-06
0.000696248
1.07561e-06
0.000696266
1.11797e-06
0.000696285
1.16156e-06
0.000696305
1.20637e-06
0.000696324
1.25243e-06
0.000696344
1.29974e-06
0.000696365
1.34832e-06
0.000696385
1.39819e-06
0.000696406
1.44935e-06
0.000696428
1.50183e-06
0.000696449
1.55563e-06
0.000696471
1.61078e-06
0.000696493
1.66728e-06
0.000696515
1.72517e-06
0.000696538
1.78444e-06
0.00069656
1.84516e-06
0.000696583
1.90726e-06
0.000696607
1.97092e-06
0.00069663
2.03592e-06
0.000696654
2.10264e-06
0.000696677
2.17059e-06
0.000696701
2.24056e-06
0.000696725
2.31149e-06
0.00069675
2.38497e-06
0.000696774
2.45886e-06
0.000696799
2.53622e-06
0.000696823
2.613e-06
0.000696849
2.69476e-06
0.000696874
2.77432e-06
0.000696899
2.86114e-06
0.000696925
2.94341e-06
0.000696951
3.03603e-06
0.000696976
3.12124e-06
0.000697003
3.22018e-06
0.000697029
3.30936e-06
0.000697057
3.41442e-06
0.000697084
3.51025e-06
0.000697112
3.61997e-06
3.72704e-06
0.00071515
1.80105e-07
0.000715153
1.88008e-07
0.000715156
1.96292e-07
0.00071516
2.04975e-07
0.000715163
2.14077e-07
0.000715167
2.23617e-07
0.000715171
2.33616e-07
0.000715176
2.44096e-07
0.00071518
2.55077e-07
0.000715185
2.66584e-07
0.00071519
2.78638e-07
0.000715196
2.91264e-07
0.000715201
3.04486e-07
0.000715207
3.18329e-07
0.000715214
3.32818e-07
0.000715221
3.47977e-07
0.000715228
3.63834e-07
0.000715235
3.80414e-07
0.000715243
3.97742e-07
0.000715251
4.15845e-07
0.00071526
4.34749e-07
0.000715269
4.54479e-07
0.000715278
4.75062e-07
0.000715288
4.96522e-07
0.000715299
5.18883e-07
0.000715309
5.42171e-07
0.000715321
5.66408e-07
0.000715333
5.91616e-07
0.000715345
6.17818e-07
0.000715358
6.45035e-07
0.000715371
6.73286e-07
0.000715385
7.02591e-07
0.000715399
7.32969e-07
0.000715413
7.64438e-07
0.000715429
7.97013e-07
0.000715444
8.30711e-07
0.00071546
8.65547e-07
0.000715477
9.01536e-07
0.000715494
9.38692e-07
0.000715511
9.77028e-07
0.000715529
1.01656e-06
0.000715548
1.05729e-06
0.000715566
1.09925e-06
0.000715586
1.14243e-06
0.000715605
1.18687e-06
0.000715625
1.23255e-06
0.000715645
1.27951e-06
0.000715666
1.32775e-06
0.000715687
1.37728e-06
0.000715708
1.42812e-06
0.000715729
1.48029e-06
0.000715751
1.5338e-06
0.000715773
1.58866e-06
0.000715796
1.64489e-06
0.000715818
1.70252e-06
0.000715841
1.76154e-06
0.000715864
1.82201e-06
0.000715888
1.88388e-06
0.000715911
1.9473e-06
0.000715935
2.01209e-06
0.000715959
2.07857e-06
0.000715984
2.14634e-06
0.000716008
2.21606e-06
0.000716033
2.28685e-06
0.000716058
2.36003e-06
0.000716083
2.43385e-06
0.000716108
2.51083e-06
0.000716133
2.58765e-06
0.000716159
2.66888e-06
0.000716185
2.74865e-06
0.000716211
2.83471e-06
0.000716237
2.91742e-06
0.000716264
3.00894e-06
0.000716291
3.0949e-06
0.000716319
3.19233e-06
0.000716345
3.28257e-06
0.000716374
3.38574e-06
0.000716402
3.48263e-06
0.000716431
3.59049e-06
3.69775e-06
0.000734986
1.77159e-07
0.000734989
1.84894e-07
0.000734993
1.93001e-07
0.000734996
2.01497e-07
0.000735
2.10401e-07
0.000735004
2.19732e-07
0.000735008
2.29511e-07
0.000735012
2.39759e-07
0.000735017
2.50496e-07
0.000735022
2.61745e-07
0.000735027
2.7353e-07
0.000735032
2.85872e-07
0.000735038
2.98798e-07
0.000735044
3.1233e-07
0.00073505
3.26494e-07
0.000735057
3.41315e-07
0.000735064
3.56819e-07
0.000735071
3.73033e-07
0.000735079
3.89981e-07
0.000735087
4.07691e-07
0.000735096
4.26189e-07
0.000735105
4.45501e-07
0.000735114
4.65653e-07
0.000735124
4.86672e-07
0.000735134
5.08582e-07
0.000735145
5.31409e-07
0.000735156
5.55176e-07
0.000735168
5.79909e-07
0.00073518
6.05629e-07
0.000735193
6.32359e-07
0.000735206
6.6012e-07
0.00073522
6.88934e-07
0.000735234
7.1882e-07
0.000735248
7.49797e-07
0.000735263
7.81883e-07
0.000735279
8.15096e-07
0.000735295
8.49452e-07
0.000735312
8.84967e-07
0.000735329
9.21656e-07
0.000735346
9.59533e-07
0.000735364
9.98613e-07
0.000735383
1.03891e-06
0.000735401
1.08044e-06
0.000735421
1.12321e-06
0.00073544
1.16723e-06
0.00073546
1.21252e-06
0.000735481
1.2591e-06
0.000735501
1.30697e-06
0.000735523
1.35615e-06
0.000735544
1.40665e-06
0.000735566
1.45849e-06
0.000735588
1.51168e-06
0.00073561
1.56623e-06
0.000735633
1.62216e-06
0.000735656
1.67951e-06
0.000735679
1.73825e-06
0.000735703
1.79845e-06
0.000735727
1.86007e-06
0.000735751
1.92323e-06
0.000735775
1.98779e-06
0.0007358
2.05401e-06
0.000735825
2.12158e-06
0.00073585
2.19102e-06
0.000735875
2.26165e-06
0.0007359
2.33452e-06
0.000735926
2.40824e-06
0.000735952
2.48484e-06
0.000735978
2.56164e-06
0.000736004
2.64236e-06
0.000736031
2.72225e-06
0.000736058
2.80759e-06
0.000736085
2.89064e-06
0.000736113
2.98114e-06
0.00073614
3.06769e-06
0.000736168
3.16372e-06
0.000736196
3.25479e-06
0.000736226
3.35623e-06
0.000736254
3.45392e-06
0.000736285
3.56007e-06
3.66729e-06
0.000755372
1.74177e-07
0.000755375
1.81748e-07
0.000755379
1.89681e-07
0.000755382
1.97993e-07
0.000755386
2.06702e-07
0.00075539
2.15829e-07
0.000755394
2.25392e-07
0.000755398
2.35412e-07
0.000755403
2.45909e-07
0.000755408
2.56907e-07
0.000755413
2.68427e-07
0.000755418
2.80492e-07
0.000755424
2.93126e-07
0.00075543
3.06354e-07
0.000755436
3.202e-07
0.000755443
3.34689e-07
0.00075545
3.49848e-07
0.000755457
3.65701e-07
0.000755465
3.82276e-07
0.000755473
3.99599e-07
0.000755481
4.17696e-07
0.00075549
4.36594e-07
0.000755499
4.56321e-07
0.000755509
4.76902e-07
0.000755519
4.98364e-07
0.00075553
5.20732e-07
0.000755541
5.44032e-07
0.000755553
5.68289e-07
0.000755565
5.93526e-07
0.000755578
6.19767e-07
0.000755591
6.47035e-07
0.000755604
6.75353e-07
0.000755618
7.0474e-07
0.000755633
7.35218e-07
0.000755648
7.66805e-07
0.000755664
7.99522e-07
0.00075568
8.33384e-07
0.000755696
8.68411e-07
0.000755713
9.04617e-07
0.000755731
9.4202e-07
0.000755749
9.80633e-07
0.000755767
1.02047e-06
0.000755786
1.06155e-06
0.000755805
1.10388e-06
0.000755825
1.14748e-06
0.000755845
1.19236e-06
0.000755866
1.23853e-06
0.000755887
1.28601e-06
0.000755908
1.33481e-06
0.00075593
1.38494e-06
0.000755952
1.43642e-06
0.000755974
1.48927e-06
0.000755997
1.54349e-06
0.00075602
1.59911e-06
0.000756044
1.65614e-06
0.000756067
1.71458e-06
0.000756091
1.77449e-06
0.000756115
1.83584e-06
0.00075614
1.89871e-06
0.000756165
1.96302e-06
0.00075619
2.02896e-06
0.000756215
2.09631e-06
0.000756241
2.16546e-06
0.000756266
2.23589e-06
0.000756292
2.30845e-06
0.000756319
2.38202e-06
0.000756345
2.45823e-06
0.000756372
2.53496e-06
0.000756399
2.61519e-06
0.000756426
2.69513e-06
0.000756454
2.77979e-06
0.000756482
2.86306e-06
0.00075651
2.95261e-06
0.000756538
3.03961e-06
0.000756568
3.13436e-06
0.000756596
3.22604e-06
0.000756627
3.3259e-06
0.000756656
3.42413e-06
0.000756688
3.52873e-06
3.6357e-06
0.000776323
1.71163e-07
0.000776326
1.78571e-07
0.000776329
1.86332e-07
0.000776333
1.94463e-07
0.000776337
2.02982e-07
0.000776341
2.11908e-07
0.000776345
2.21258e-07
0.000776349
2.31055e-07
0.000776354
2.41318e-07
0.000776359
2.52069e-07
0.000776364
2.63329e-07
0.000776369
2.75122e-07
0.000776375
2.87471e-07
0.000776381
3.004e-07
0.000776387
3.13934e-07
0.000776393
3.28097e-07
0.0007764
3.42915e-07
0.000776408
3.58415e-07
0.000776415
3.74622e-07
0.000776423
3.91563e-07
0.000776432
4.09265e-07
0.000776441
4.27756e-07
0.00077645
4.47061e-07
0.00077646
4.67209e-07
0.00077647
4.88226e-07
0.00077648
5.10139e-07
0.000776491
5.32973e-07
0.000776503
5.56754e-07
0.000776515
5.81508e-07
0.000776527
6.07259e-07
0.00077654
6.34031e-07
0.000776554
6.61847e-07
0.000776568
6.9073e-07
0.000776582
7.20701e-07
0.000776597
7.51782e-07
0.000776613
7.83992e-07
0.000776629
8.1735e-07
0.000776646
8.51875e-07
0.000776663
8.87585e-07
0.00077668
9.24496e-07
0.000776698
9.62624e-07
0.000776717
1.00199e-06
0.000776736
1.0426e-06
0.000776755
1.08447e-06
0.000776775
1.12762e-06
0.000776795
1.17206e-06
0.000776816
1.2178e-06
0.000776837
1.26487e-06
0.000776859
1.31327e-06
0.000776881
1.36301e-06
0.000776903
1.41411e-06
0.000776926
1.46659e-06
0.000776949
1.52046e-06
0.000776972
1.57573e-06
0.000776996
1.63242e-06
0.00077702
1.69055e-06
0.000777044
1.75014e-06
0.000777069
1.81118e-06
0.000777094
1.87375e-06
0.000777119
1.93778e-06
0.000777144
2.00343e-06
0.00077717
2.07052e-06
0.000777196
2.13937e-06
0.000777223
2.20957e-06
0.000777249
2.2818e-06
0.000777276
2.35518e-06
0.000777303
2.43101e-06
0.000777331
2.50763e-06
0.000777358
2.58737e-06
0.000777386
2.66729e-06
0.000777415
2.7513e-06
0.000777443
2.8347e-06
0.000777472
2.92337e-06
0.000777501
3.01065e-06
0.000777531
3.10423e-06
0.000777561
3.19632e-06
0.000777592
3.29477e-06
0.000777623
3.39328e-06
0.000777655
3.49647e-06
3.603e-06
0.000797854
1.68117e-07
0.000797857
1.75365e-07
0.000797861
1.82957e-07
0.000797864
1.9091e-07
0.000797868
1.99242e-07
0.000797872
2.07969e-07
0.000797876
2.17111e-07
0.000797881
2.26689e-07
0.000797885
2.36721e-07
0.00079789
2.47229e-07
0.000797895
2.58235e-07
0.0007979
2.69761e-07
0.000797906
2.8183e-07
0.000797912
2.94465e-07
0.000797918
3.07692e-07
0.000797925
3.21535e-07
0.000797932
3.3602e-07
0.000797939
3.51171e-07
0.000797947
3.67016e-07
0.000797955
3.83582e-07
0.000797963
4.00894e-07
0.000797972
4.18982e-07
0.000797981
4.37871e-07
0.000797991
4.5759e-07
0.000798001
4.78165e-07
0.000798011
4.99625e-07
0.000798022
5.21995e-07
0.000798034
5.45302e-07
0.000798045
5.69573e-07
0.000798058
5.94832e-07
0.000798071
6.21106e-07
0.000798084
6.48418e-07
0.000798098
6.76791e-07
0.000798113
7.0625e-07
0.000798128
7.36816e-07
0.000798143
7.6851e-07
0.000798159
8.01353e-07
0.000798176
8.35365e-07
0.000798193
8.70564e-07
0.00079821
9.06969e-07
0.000798228
9.44597e-07
0.000798247
9.83464e-07
0.000798266
1.02359e-06
0.000798285
1.06498e-06
0.000798305
1.10766e-06
0.000798326
1.15164e-06
0.000798346
1.19694e-06
0.000798368
1.24357e-06
0.000798389
1.29154e-06
0.000798412
1.34086e-06
0.000798434
1.39156e-06
0.000798457
1.44365e-06
0.00079848
1.49714e-06
0.000798504
1.55204e-06
0.000798528
1.60837e-06
0.000798553
1.66615e-06
0.000798577
1.7254e-06
0.000798602
1.78612e-06
0.000798628
1.84836e-06
0.000798653
1.91209e-06
0.000798679
1.97741e-06
0.000798706
2.04422e-06
0.000798732
2.11275e-06
0.000798759
2.18269e-06
0.000798786
2.25458e-06
0.000798814
2.32774e-06
0.000798842
2.40318e-06
0.00079887
2.47963e-06
0.000798898
2.55889e-06
0.000798927
2.63873e-06
0.000798956
2.72212e-06
0.000798985
2.80555e-06
0.000799015
2.89339e-06
0.000799045
2.98084e-06
0.000799076
3.07333e-06
0.000799106
3.16566e-06
0.000799138
3.26281e-06
0.00079917
3.3614e-06
0.000799203
3.46329e-06
3.56922e-06
0.000819982
1.65041e-07
0.000819986
1.72132e-07
0.000819989
1.79558e-07
0.000819992
1.87335e-07
0.000819996
1.95481e-07
0.00082
2.04014e-07
0.000820004
2.12951e-07
0.000820009
2.22313e-07
0.000820013
2.32118e-07
0.000820018
2.42388e-07
0.000820023
2.53144e-07
0.000820029
2.64407e-07
0.000820034
2.76201e-07
0.00082004
2.88548e-07
0.000820046
3.01474e-07
0.000820053
3.15002e-07
0.00082006
3.29158e-07
0.000820067
3.43967e-07
0.000820075
3.59456e-07
0.000820082
3.75651e-07
0.000820091
3.92579e-07
0.0008201
4.10268e-07
0.000820109
4.28746e-07
0.000820118
4.4804e-07
0.000820128
4.68178e-07
0.000820139
4.89188e-07
0.00082015
5.11096e-07
0.000820161
5.33931e-07
0.000820173
5.57719e-07
0.000820185
5.82487e-07
0.000820198
6.0826e-07
0.000820211
6.35065e-07
0.000820225
6.62926e-07
0.00082024
6.91866e-07
0.000820254
7.21911e-07
0.00082027
7.53081e-07
0.000820286
7.85399e-07
0.000820302
8.18886e-07
0.000820319
8.53563e-07
0.000820337
8.89447e-07
0.000820355
9.26559e-07
0.000820373
9.64915e-07
0.000820392
1.00453e-06
0.000820412
1.04543e-06
0.000820432
1.08762e-06
0.000820453
1.13112e-06
0.000820474
1.17595e-06
0.000820495
1.22211e-06
0.000820517
1.26963e-06
0.000820539
1.31852e-06
0.000820562
1.36879e-06
0.000820585
1.42046e-06
0.000820609
1.47354e-06
0.000820633
1.52805e-06
0.000820657
1.584e-06
0.000820682
1.6414e-06
0.000820707
1.70029e-06
0.000820733
1.76065e-06
0.000820758
1.82254e-06
0.000820784
1.88594e-06
0.000820811
1.95092e-06
0.000820838
2.01741e-06
0.000820865
2.0856e-06
0.000820892
2.15526e-06
0.00082092
2.22679e-06
0.000820948
2.29969e-06
0.000820977
2.37474e-06
0.000821005
2.45097e-06
0.000821034
2.52976e-06
0.000821064
2.60945e-06
0.000821094
2.69225e-06
0.000821124
2.77561e-06
0.000821154
2.86267e-06
0.000821185
2.95016e-06
0.000821217
3.04165e-06
0.000821248
3.13405e-06
0.000821281
3.23001e-06
0.000821314
3.32849e-06
0.000821348
3.42917e-06
3.53438e-06
0.000842724
1.61939e-07
0.000842727
1.68873e-07
0.00084273
1.76135e-07
0.000842734
1.83739e-07
0.000842738
1.91703e-07
0.000842742
2.00044e-07
0.000842746
2.08779e-07
0.00084275
2.17928e-07
0.000842755
2.27511e-07
0.00084276
2.37546e-07
0.000842765
2.48055e-07
0.00084277
2.59061e-07
0.000842776
2.70584e-07
0.000842782
2.82648e-07
0.000842788
2.95277e-07
0.000842794
3.08496e-07
0.000842801
3.22328e-07
0.000842808
3.368e-07
0.000842816
3.51938e-07
0.000842824
3.67767e-07
0.000842832
3.84316e-07
0.000842841
4.01612e-07
0.00084285
4.19683e-07
0.000842859
4.38557e-07
0.000842869
4.58261e-07
0.000842879
4.78824e-07
0.00084289
5.00274e-07
0.000842901
5.22638e-07
0.000842913
5.45945e-07
0.000842926
5.70221e-07
0.000842938
5.95494e-07
0.000842952
6.21789e-07
0.000842965
6.49133e-07
0.00084298
6.77551e-07
0.000842995
7.07068e-07
0.00084301
7.37707e-07
0.000843026
7.69492e-07
0.000843042
8.02444e-07
0.000843059
8.36586e-07
0.000843077
8.71937e-07
0.000843095
9.08518e-07
0.000843113
9.46347e-07
0.000843132
9.85443e-07
0.000843152
1.02582e-06
0.000843172
1.06751e-06
0.000843193
1.11051e-06
0.000843214
1.15484e-06
0.000843235
1.20052e-06
0.000843258
1.24757e-06
0.00084328
1.29599e-06
0.000843303
1.34581e-06
0.000843326
1.39703e-06
0.00084335
1.44968e-06
0.000843375
1.50377e-06
0.000843399
1.55931e-06
0.000843424
1.61631e-06
0.00084345
1.67481e-06
0.000843476
1.73479e-06
0.000843502
1.79631e-06
0.000843529
1.85934e-06
0.000843556
1.92397e-06
0.000843583
1.99011e-06
0.00084361
2.05794e-06
0.000843638
2.12728e-06
0.000843667
2.19843e-06
0.000843695
2.27104e-06
0.000843725
2.34568e-06
0.000843754
2.42166e-06
0.000843784
2.49997e-06
0.000843814
2.57945e-06
0.000843844
2.66166e-06
0.000843875
2.74489e-06
0.000843906
2.83121e-06
0.000843938
2.91861e-06
0.00084397
3.00917e-06
0.000844003
3.10149e-06
0.000844037
3.19636e-06
0.000844071
3.29456e-06
0.000844106
3.39411e-06
3.49848e-06
0.000866095
1.58811e-07
0.000866098
1.65591e-07
0.000866102
1.7269e-07
0.000866105
1.80124e-07
0.000866109
1.87908e-07
0.000866113
1.96059e-07
0.000866117
2.04596e-07
0.000866122
2.13536e-07
0.000866126
2.22898e-07
0.000866131
2.32703e-07
0.000866136
2.4297e-07
0.000866142
2.53721e-07
0.000866147
2.64978e-07
0.000866153
2.76764e-07
0.000866159
2.89101e-07
0.000866166
3.02014e-07
0.000866173
3.15528e-07
0.00086618
3.29668e-07
0.000866187
3.4446e-07
0.000866195
3.59929e-07
0.000866203
3.76104e-07
0.000866212
3.93012e-07
0.000866221
4.1068e-07
0.00086623
4.29138e-07
0.00086624
4.48412e-07
0.00086625
4.68532e-07
0.000866261
4.89526e-07
0.000866272
5.11422e-07
0.000866284
5.34249e-07
0.000866296
5.58034e-07
0.000866309
5.82805e-07
0.000866322
6.0859e-07
0.000866336
6.35415e-07
0.00086635
6.63307e-07
0.000866365
6.92291e-07
0.00086638
7.22392e-07
0.000866396
7.53636e-07
0.000866412
7.86044e-07
0.000866429
8.1964e-07
0.000866447
8.54446e-07
0.000866465
8.90482e-07
0.000866483
9.27769e-07
0.000866503
9.66327e-07
0.000866522
1.00617e-06
0.000866542
1.04733e-06
0.000866563
1.0898e-06
0.000866584
1.13362e-06
0.000866606
1.1788e-06
0.000866628
1.22535e-06
0.000866651
1.27328e-06
0.000866674
1.32263e-06
0.000866698
1.37338e-06
0.000866722
1.42557e-06
0.000866746
1.47921e-06
0.000866771
1.53432e-06
0.000866797
1.59089e-06
0.000866823
1.64897e-06
0.000866849
1.70855e-06
0.000866876
1.76967e-06
0.000866903
1.83231e-06
0.00086693
1.89655e-06
0.000866958
1.96232e-06
0.000866986
2.02977e-06
0.000867015
2.09875e-06
0.000867043
2.16951e-06
0.000867073
2.24179e-06
0.000867102
2.31601e-06
0.000867132
2.39168e-06
0.000867163
2.46951e-06
0.000867194
2.54873e-06
0.000867225
2.63037e-06
0.000867256
2.71338e-06
0.000867289
2.79899e-06
0.000867321
2.8862e-06
0.000867354
2.9759e-06
0.000867388
3.06799e-06
0.000867422
3.16185e-06
0.000867457
3.25962e-06
0.000867493
3.3581e-06
3.46153e-06
0.000890114
1.5566e-07
0.000890118
1.62288e-07
0.000890121
1.69226e-07
0.000890125
1.76491e-07
0.000890128
1.84097e-07
0.000890132
1.92062e-07
0.000890137
2.00402e-07
0.000890141
2.09136e-07
0.000890146
2.18282e-07
0.000890151
2.27859e-07
0.000890156
2.37888e-07
0.000890161
2.48389e-07
0.000890167
2.59383e-07
0.000890172
2.70894e-07
0.000890179
2.82945e-07
0.000890185
2.95557e-07
0.000890192
3.08758e-07
0.000890199
3.2257e-07
0.000890206
3.3702e-07
0.000890214
3.52135e-07
0.000890222
3.6794e-07
0.000890231
3.84464e-07
0.00089024
4.01735e-07
0.000890249
4.1978e-07
0.000890259
4.38629e-07
0.000890269
4.58309e-07
0.00089028
4.7885e-07
0.000890291
5.0028e-07
0.000890303
5.22628e-07
0.000890315
5.45923e-07
0.000890327
5.70193e-07
0.00089034
5.95466e-07
0.000890354
6.21771e-07
0.000890368
6.49133e-07
0.000890383
6.7758e-07
0.000890398
7.07139e-07
0.000890414
7.37833e-07
0.00089043
7.69689e-07
0.000890447
8.0273e-07
0.000890465
8.36979e-07
0.000890483
8.72458e-07
0.000890501
9.09189e-07
0.00089052
9.47192e-07
0.00089054
9.86488e-07
0.00089056
1.0271e-06
0.000890581
1.06903e-06
0.000890602
1.11232e-06
0.000890624
1.15696e-06
0.000890647
1.20299e-06
0.00089067
1.25042e-06
0.000890693
1.29926e-06
0.000890717
1.34952e-06
0.000890741
1.40123e-06
0.000890766
1.45439e-06
0.000890791
1.50903e-06
0.000890817
1.56516e-06
0.000890843
1.62279e-06
0.00089087
1.68194e-06
0.000890897
1.74262e-06
0.000890924
1.80485e-06
0.000890952
1.86867e-06
0.00089098
1.93405e-06
0.000891009
2.00108e-06
0.000891038
2.06969e-06
0.000891068
2.14003e-06
0.000891097
2.21194e-06
0.000891128
2.28572e-06
0.000891158
2.36105e-06
0.000891189
2.4384e-06
0.000891221
2.51729e-06
0.000891253
2.59837e-06
0.000891285
2.68108e-06
0.000891318
2.76601e-06
0.000891351
2.85294e-06
0.000891386
2.9418e-06
0.00089142
3.03355e-06
0.000891455
3.12646e-06
0.000891491
3.22367e-06
0.000891528
3.32112e-06
3.42353e-06
0.000914799
1.52489e-07
0.000914802
1.58965e-07
0.000914806
1.65745e-07
0.00091481
1.72843e-07
0.000914813
1.80274e-07
0.000914817
1.88054e-07
0.000914822
1.96201e-07
0.000914826
2.04731e-07
0.000914831
2.13663e-07
0.000914836
2.23016e-07
0.000914841
2.32809e-07
0.000914846
2.43063e-07
0.000914852
2.538e-07
0.000914857
2.6504e-07
0.000914863
2.76807e-07
0.00091487
2.89124e-07
0.000914877
3.02015e-07
0.000914884
3.15505e-07
0.000914891
3.29618e-07
0.000914899
3.44382e-07
0.000914907
3.59823e-07
0.000914916
3.75968e-07
0.000914924
3.92845e-07
0.000914934
4.10483e-07
0.000914943
4.28909e-07
0.000914954
4.48154e-07
0.000914964
4.68245e-07
0.000914975
4.89211e-07
0.000914987
5.11083e-07
0.000914999
5.33889e-07
0.000915011
5.57658e-07
0.000915024
5.82419e-07
0.000915038
6.08201e-07
0.000915052
6.35031e-07
0.000915067
6.62938e-07
0.000915082
6.91948e-07
0.000915098
7.22088e-07
0.000915114
7.53384e-07
0.000915131
7.8586e-07
0.000915148
8.19542e-07
0.000915166
8.54452e-07
0.000915185
8.90614e-07
0.000915204
9.28049e-07
0.000915224
9.66777e-07
0.000915244
1.00682e-06
0.000915265
1.0482e-06
0.000915286
1.09093e-06
0.000915308
1.13503e-06
0.000915331
1.18051e-06
0.000915354
1.2274e-06
0.000915377
1.27571e-06
0.000915401
1.32546e-06
0.000915426
1.37666e-06
0.000915451
1.42933e-06
0.000915476
1.48348e-06
0.000915502
1.53912e-06
0.000915529
1.59628e-06
0.000915556
1.65496e-06
0.000915583
1.71519e-06
0.000915611
1.77698e-06
0.00091564
1.84035e-06
0.000915668
1.9053e-06
0.000915698
1.9719e-06
0.000915727
2.04009e-06
0.000915757
2.10999e-06
0.000915788
2.1815e-06
0.000915818
2.25482e-06
0.00091585
2.32976e-06
0.000915882
2.40661e-06
0.000915914
2.48514e-06
0.000915946
2.56564e-06
0.00091598
2.64799e-06
0.000916013
2.73225e-06
0.000916047
2.81881e-06
0.000916082
2.90689e-06
0.000916118
2.99818e-06
0.000916154
3.09018e-06
0.000916191
3.18671e-06
0.000916229
3.28315e-06
3.38449e-06
0.000940168
1.49299e-07
0.000940172
1.55626e-07
0.000940175
1.62249e-07
0.000940179
1.69181e-07
0.000940183
1.76438e-07
0.000940187
1.84037e-07
0.000940191
1.91992e-07
0.000940195
2.00321e-07
0.0009402
2.09042e-07
0.000940205
2.18174e-07
0.00094021
2.27735e-07
0.000940215
2.37746e-07
0.000940221
2.48228e-07
0.000940226
2.59201e-07
0.000940233
2.70689e-07
0.000940239
2.82714e-07
0.000940246
2.953e-07
0.000940253
3.08471e-07
0.00094026
3.22252e-07
0.000940268
3.3667e-07
0.000940276
3.5175e-07
0.000940284
3.6752e-07
0.000940293
3.84009e-07
0.000940302
4.01243e-07
0.000940312
4.19251e-07
0.000940322
4.38063e-07
0.000940333
4.57707e-07
0.000940344
4.78214e-07
0.000940355
4.99611e-07
0.000940367
5.2193e-07
0.00094038
5.45199e-07
0.000940393
5.69448e-07
0.000940406
5.94707e-07
0.00094042
6.21003e-07
0.000940435
6.48366e-07
0.00094045
6.76824e-07
0.000940465
7.06403e-07
0.000940482
7.37132e-07
0.000940499
7.69037e-07
0.000940516
8.02141e-07
0.000940534
8.36472e-07
0.000940553
8.72051e-07
0.000940572
9.08903e-07
0.000940591
9.4705e-07
0.000940612
9.86512e-07
0.000940633
1.02731e-06
0.000940654
1.06947e-06
0.000940676
1.113e-06
0.000940699
1.15792e-06
0.000940722
1.20425e-06
0.000940746
1.25201e-06
0.00094077
1.30122e-06
0.000940795
1.35188e-06
0.00094082
1.40402e-06
0.000940846
1.45765e-06
0.000940872
1.51279e-06
0.000940899
1.56945e-06
0.000940926
1.62764e-06
0.000940954
1.68739e-06
0.000940982
1.7487e-06
0.000941011
1.8116e-06
0.00094104
1.87609e-06
0.00094107
1.94222e-06
0.0009411
2.00996e-06
0.000941131
2.0794e-06
0.000941162
2.15048e-06
0.000941193
2.22331e-06
0.000941225
2.29783e-06
0.000941258
2.37416e-06
0.00094129
2.45227e-06
0.000941324
2.53219e-06
0.000941358
2.61412e-06
0.000941392
2.69772e-06
0.000941427
2.78382e-06
0.000941463
2.87113e-06
0.000941499
2.96187e-06
0.000941536
3.05299e-06
0.000941574
3.14875e-06
0.000941613
3.2442e-06
3.3444e-06
0.00096624
1.46094e-07
0.000966244
1.52272e-07
0.000966247
1.58739e-07
0.000966251
1.65508e-07
0.000966255
1.72594e-07
0.000966259
1.80012e-07
0.000966263
1.87777e-07
0.000966268
1.95908e-07
0.000966272
2.04421e-07
0.000966277
2.13334e-07
0.000966282
2.22666e-07
0.000966287
2.32437e-07
0.000966293
2.42667e-07
0.000966299
2.53378e-07
0.000966305
2.6459e-07
0.000966311
2.76327e-07
0.000966318
2.88611e-07
0.000966325
3.01468e-07
0.000966332
3.14922e-07
0.00096634
3.28997e-07
0.000966348
3.43722e-07
0.000966356
3.59121e-07
0.000966365
3.75225e-07
0.000966374
3.92059e-07
0.000966384
4.09654e-07
0.000966394
4.28037e-07
0.000966404
4.47238e-07
0.000966415
4.67286e-07
0.000966427
4.88212e-07
0.000966439
5.10045e-07
0.000966451
5.32815e-07
0.000966464
5.56553e-07
0.000966477
5.81287e-07
0.000966491
6.07048e-07
0.000966506
6.33865e-07
0.000966521
6.61767e-07
0.000966536
6.90782e-07
0.000966553
7.20938e-07
0.000966569
7.52262e-07
0.000966587
7.84782e-07
0.000966605
8.18522e-07
0.000966623
8.53508e-07
0.000966642
8.89765e-07
0.000966662
9.27314e-07
0.000966682
9.6618e-07
0.000966703
1.00638e-06
0.000966725
1.04795e-06
0.000966747
1.09089e-06
0.00096677
1.13522e-06
0.000966793
1.18098e-06
0.000966817
1.22816e-06
0.000966841
1.2768e-06
0.000966866
1.3269e-06
0.000966892
1.37849e-06
0.000966918
1.43158e-06
0.000966944
1.48618e-06
0.000966972
1.54231e-06
0.000966999
1.59998e-06
0.000967027
1.65921e-06
0.000967056
1.72002e-06
0.000967085
1.78242e-06
0.000967115
1.84642e-06
0.000967145
1.91206e-06
0.000967176
1.97932e-06
0.000967207
2.04826e-06
0.000967238
2.11887e-06
0.000967271
2.1912e-06
0.000967303
2.26525e-06
0.000967336
2.34105e-06
0.00096737
2.41869e-06
0.000967404
2.49803e-06
0.000967439
2.57947e-06
0.000967474
2.66241e-06
0.00096751
2.74798e-06
0.000967546
2.83453e-06
0.000967584
2.92463e-06
0.000967622
3.01489e-06
0.000967661
3.10979e-06
0.000967701
3.20425e-06
3.30326e-06
0.000993035
1.42874e-07
0.000993039
1.48906e-07
0.000993042
1.55219e-07
0.000993046
1.61826e-07
0.00099305
1.68741e-07
0.000993054
1.75981e-07
0.000993058
1.8356e-07
0.000993062
1.91494e-07
0.000993067
1.99801e-07
0.000993072
2.08498e-07
0.000993077
2.17604e-07
0.000993082
2.27138e-07
0.000993088
2.3712e-07
0.000993094
2.4757e-07
0.0009931
2.5851e-07
0.000993106
2.69963e-07
0.000993113
2.8195e-07
0.00099312
2.94496e-07
0.000993127
3.07626e-07
0.000993135
3.21364e-07
0.000993143
3.35736e-07
0.000993151
3.5077e-07
0.00099316
3.66492e-07
0.000993169
3.82931e-07
0.000993178
4.00115e-07
0.000993188
4.18073e-07
0.000993199
4.36834e-07
0.00099321
4.56428e-07
0.000993221
4.76884e-07
0.000993233
4.98234e-07
0.000993245
5.20507e-07
0.000993258
5.43733e-07
0.000993271
5.67943e-07
0.000993285
5.93168e-07
0.0009933
6.19437e-07
0.000993314
6.4678e-07
0.00099333
6.75225e-07
0.000993346
7.04803e-07
0.000993363
7.35542e-07
0.00099338
7.67468e-07
0.000993398
8.00609e-07
0.000993417
8.34991e-07
0.000993436
8.70639e-07
0.000993456
9.07579e-07
0.000993476
9.45833e-07
0.000993497
9.85424e-07
0.000993518
1.02638e-06
0.000993541
1.06871e-06
0.000993563
1.11244e-06
0.000993587
1.15759e-06
0.000993611
1.20418e-06
0.000993635
1.25223e-06
0.00099366
1.30174e-06
0.000993686
1.35275e-06
0.000993713
1.40527e-06
0.000993739
1.4593e-06
0.000993767
1.51488e-06
0.000993795
1.572e-06
0.000993823
1.63069e-06
0.000993852
1.69096e-06
0.000993882
1.75283e-06
0.000993912
1.81631e-06
0.000993943
1.88142e-06
0.000993974
1.94818e-06
0.000994006
2.0166e-06
0.000994038
2.0867e-06
0.00099407
2.15849e-06
0.000994104
2.23204e-06
0.000994137
2.30728e-06
0.000994172
2.3844e-06
0.000994207
2.46314e-06
0.000994242
2.54405e-06
0.000994278
2.62631e-06
0.000994315
2.71129e-06
0.000994352
2.79708e-06
0.00099439
2.88647e-06
0.000994429
2.97586e-06
0.000994469
3.06985e-06
0.00099451
3.1633e-06
3.26108e-06
0.00102057
1.39644e-07
0.00102058
1.4553e-07
0.00102058
1.5169e-07
0.00102058
1.58136e-07
0.00102059
1.64884e-07
0.00102059
1.71947e-07
0.0010206
1.7934e-07
0.0010206
1.8708e-07
0.0010206
1.95184e-07
0.00102061
2.03668e-07
0.00102061
2.1255e-07
0.00102062
2.2185e-07
0.00102063
2.31586e-07
0.00102063
2.41779e-07
0.00102064
2.52451e-07
0.00102064
2.63622e-07
0.00102065
2.75316e-07
0.00102066
2.87556e-07
0.00102066
3.00365e-07
0.00102067
3.13769e-07
0.00102068
3.27793e-07
0.00102069
3.42465e-07
0.0010207
3.5781e-07
0.00102071
3.73857e-07
0.00102072
3.90635e-07
0.00102073
4.08171e-07
0.00102074
4.26495e-07
0.00102075
4.45637e-07
0.00102076
4.65627e-07
0.00102077
4.86495e-07
0.00102078
5.08272e-07
0.00102079
5.30988e-07
0.00102081
5.54675e-07
0.00102082
5.79363e-07
0.00102084
6.05082e-07
0.00102085
6.31864e-07
0.00102087
6.59737e-07
0.00102088
6.88732e-07
0.0010209
7.18878e-07
0.00102092
7.50204e-07
0.00102093
7.82737e-07
0.00102095
8.16505e-07
0.00102097
8.51534e-07
0.00102099
8.87851e-07
0.00102101
9.25479e-07
0.00102103
9.64443e-07
0.00102105
1.00477e-06
0.00102108
1.04647e-06
0.0010211
1.08958e-06
0.00102112
1.1341e-06
0.00102115
1.18007e-06
0.00102117
1.2275e-06
0.0010212
1.27641e-06
0.00102122
1.32682e-06
0.00102125
1.37873e-06
0.00102128
1.43218e-06
0.0010213
1.48716e-06
0.00102133
1.54371e-06
0.00102136
1.60183e-06
0.00102139
1.66153e-06
0.00102142
1.72284e-06
0.00102145
1.78577e-06
0.00102148
1.85033e-06
0.00102151
1.91653e-06
0.00102155
1.9844e-06
0.00102158
2.05396e-06
0.00102161
2.12519e-06
0.00102165
2.1982e-06
0.00102168
2.27285e-06
0.00102172
2.34942e-06
0.00102175
2.42753e-06
0.00102179
2.50785e-06
0.00102182
2.58942e-06
0.00102186
2.67375e-06
0.0010219
2.75877e-06
0.00102194
2.84739e-06
0.00102198
2.93591e-06
0.00102202
3.02891e-06
0.00102206
3.12135e-06
3.21786e-06
0.00104887
1.36405e-07
0.00104888
1.42147e-07
0.00104888
1.48155e-07
0.00104888
1.54442e-07
0.00104889
1.61023e-07
0.00104889
1.67911e-07
0.0010489
1.75121e-07
0.0010489
1.82669e-07
0.00104891
1.90571e-07
0.00104891
1.98844e-07
0.00104892
2.07505e-07
0.00104892
2.16573e-07
0.00104893
2.26067e-07
0.00104893
2.36007e-07
0.00104894
2.46413e-07
0.00104894
2.57306e-07
0.00104895
2.6871e-07
0.00104896
2.80646e-07
0.00104897
2.93139e-07
0.00104897
3.06213e-07
0.00104898
3.19893e-07
0.00104899
3.34206e-07
0.001049
3.49178e-07
0.00104901
3.64837e-07
0.00104902
3.81212e-07
0.00104903
3.9833e-07
0.00104904
4.1622e-07
0.00104905
4.34914e-07
0.00104906
4.5444e-07
0.00104907
4.74829e-07
0.00104908
4.96112e-07
0.00104909
5.18319e-07
0.00104911
5.41483e-07
0.00104912
5.65633e-07
0.00104914
5.90802e-07
0.00104915
6.1702e-07
0.00104917
6.44318e-07
0.00104918
6.72727e-07
0.0010492
7.02275e-07
0.00104922
7.32994e-07
0.00104923
7.64912e-07
0.00104925
7.98057e-07
0.00104927
8.32456e-07
0.00104929
8.68138e-07
0.00104931
9.05127e-07
0.00104933
9.43448e-07
0.00104935
9.83127e-07
0.00104938
1.02419e-06
0.0010494
1.06665e-06
0.00104942
1.11053e-06
0.00104945
1.15586e-06
0.00104947
1.20265e-06
0.0010495
1.25092e-06
0.00104952
1.3007e-06
0.00104955
1.35199e-06
0.00104958
1.40481e-06
0.00104961
1.45919e-06
0.00104963
1.51512e-06
0.00104966
1.57264e-06
0.00104969
1.63175e-06
0.00104972
1.69247e-06
0.00104975
1.75481e-06
0.00104979
1.81878e-06
0.00104982
1.88441e-06
0.00104985
1.95169e-06
0.00104988
2.02067e-06
0.00104992
2.09131e-06
0.00104995
2.16373e-06
0.00104999
2.23777e-06
0.00105002
2.31374e-06
0.00105006
2.3912e-06
0.0010501
2.47089e-06
0.00105013
2.55175e-06
0.00105017
2.63537e-06
0.00105021
2.71961e-06
0.00105025
2.80739e-06
0.00105029
2.89502e-06
0.00105033
2.98698e-06
0.00105038
3.07838e-06
3.17359e-06
0.00107796
1.3316e-07
0.00107796
1.38758e-07
0.00107797
1.44616e-07
0.00107797
1.50746e-07
0.00107797
1.57161e-07
0.00107798
1.63876e-07
0.00107798
1.70905e-07
0.00107799
1.78262e-07
0.00107799
1.85965e-07
0.001078
1.94029e-07
0.001078
2.02471e-07
0.00107801
2.1131e-07
0.00107801
2.20564e-07
0.00107802
2.30253e-07
0.00107802
2.40396e-07
0.00107803
2.51015e-07
0.00107804
2.62132e-07
0.00107804
2.73769e-07
0.00107805
2.85949e-07
0.00107806
2.98696e-07
0.00107807
3.12035e-07
0.00107807
3.25993e-07
0.00107808
3.40596e-07
0.00107809
3.55871e-07
0.0010781
3.71846e-07
0.00107811
3.88549e-07
0.00107812
4.0601e-07
0.00107813
4.24257e-07
0.00107814
4.43322e-07
0.00107815
4.63234e-07
0.00107817
4.84025e-07
0.00107818
5.05725e-07
0.00107819
5.28366e-07
0.00107821
5.5198e-07
0.00107822
5.76598e-07
0.00107823
6.02251e-07
0.00107825
6.28971e-07
0.00107827
6.56789e-07
0.00107828
6.85736e-07
0.0010783
7.15843e-07
0.00107832
7.47138e-07
0.00107834
7.79651e-07
0.00107835
8.13412e-07
0.00107837
8.48447e-07
0.00107839
8.84784e-07
0.00107842
9.22449e-07
0.00107844
9.61468e-07
0.00107846
1.00186e-06
0.00107848
1.04366e-06
0.00107851
1.08688e-06
0.00107853
1.13155e-06
0.00107856
1.17768e-06
0.00107858
1.22529e-06
0.00107861
1.27441e-06
0.00107863
1.32505e-06
0.00107866
1.37723e-06
0.00107869
1.43096e-06
0.00107872
1.48626e-06
0.00107875
1.54314e-06
0.00107878
1.60162e-06
0.00107881
1.66172e-06
0.00107884
1.72344e-06
0.00107887
1.78679e-06
0.00107891
1.85181e-06
0.00107894
1.91847e-06
0.00107897
1.98684e-06
0.00107901
2.05686e-06
0.00107904
2.12866e-06
0.00107908
2.20205e-06
0.00107911
2.27738e-06
0.00107915
2.35416e-06
0.00107919
2.43316e-06
0.00107923
2.5133e-06
0.00107927
2.59616e-06
0.00107931
2.67959e-06
0.00107935
2.76648e-06
0.00107939
2.85321e-06
0.00107943
2.94408e-06
0.00107948
3.03441e-06
3.12829e-06
0.00110785
1.29911e-07
0.00110785
1.35367e-07
0.00110786
1.41075e-07
0.00110786
1.47049e-07
0.00110787
1.53301e-07
0.00110787
1.59844e-07
0.00110787
1.66693e-07
0.00110788
1.73862e-07
0.00110788
1.81367e-07
0.00110789
1.89224e-07
0.00110789
1.9745e-07
0.0011079
2.06062e-07
0.0011079
2.15079e-07
0.00110791
2.24519e-07
0.00110792
2.34403e-07
0.00110792
2.44751e-07
0.00110793
2.55583e-07
0.00110793
2.66923e-07
0.00110794
2.78794e-07
0.00110795
2.91218e-07
0.00110796
3.0422e-07
0.00110797
3.17827e-07
0.00110797
3.32064e-07
0.00110798
3.46958e-07
0.00110799
3.62537e-07
0.001108
3.78829e-07
0.00110801
3.95863e-07
0.00110802
4.13668e-07
0.00110803
4.32274e-07
0.00110805
4.51712e-07
0.00110806
4.72012e-07
0.00110807
4.93207e-07
0.00110808
5.15327e-07
0.0011081
5.38404e-07
0.00110811
5.6247e-07
0.00110813
5.87558e-07
0.00110814
6.13698e-07
0.00110816
6.40923e-07
0.00110817
6.69264e-07
0.00110819
6.98753e-07
0.00110821
7.29419e-07
0.00110823
7.61293e-07
0.00110824
7.94406e-07
0.00110826
8.28785e-07
0.00110828
8.64458e-07
0.00110831
9.01454e-07
0.00110833
9.39797e-07
0.00110835
9.79515e-07
0.00110837
1.02063e-06
0.0011084
1.06317e-06
0.00110842
1.10715e-06
0.00110845
1.1526e-06
0.00110847
1.19953e-06
0.0011085
1.24797e-06
0.00110853
1.29793e-06
0.00110855
1.34943e-06
0.00110858
1.40249e-06
0.00110861
1.45713e-06
0.00110864
1.51335e-06
0.00110867
1.57117e-06
0.0011087
1.63061e-06
0.00110873
1.69168e-06
0.00110877
1.75438e-06
0.0011088
1.81875e-06
0.00110883
1.88476e-06
0.00110887
1.95248e-06
0.0011089
2.02184e-06
0.00110894
2.09298e-06
0.00110897
2.1657e-06
0.00110901
2.24035e-06
0.00110905
2.31642e-06
0.00110909
2.39469e-06
0.00110913
2.47407e-06
0.00110917
2.55612e-06
0.00110921
2.63872e-06
0.00110925
2.72467e-06
0.00110929
2.81046e-06
0.00110934
2.90021e-06
0.00110938
2.98943e-06
3.08195e-06
0.00113857
1.26661e-07
0.00113857
1.31975e-07
0.00113858
1.37535e-07
0.00113858
1.43354e-07
0.00113859
1.49443e-07
0.00113859
1.55816e-07
0.00113859
1.62487e-07
0.0011386
1.6947e-07
0.0011386
1.76779e-07
0.00113861
1.84432e-07
0.00113861
1.92443e-07
0.00113862
2.00831e-07
0.00113862
2.09613e-07
0.00113863
2.18807e-07
0.00113864
2.28434e-07
0.00113864
2.38513e-07
0.00113865
2.49065e-07
0.00113865
2.60111e-07
0.00113866
2.71675e-07
0.00113867
2.83779e-07
0.00113868
2.96448e-07
0.00113869
3.09707e-07
0.00113869
3.23581e-07
0.0011387
3.38098e-07
0.00113871
3.53285e-07
0.00113872
3.69169e-07
0.00113873
3.85779e-07
0.00113874
4.03144e-07
0.00113875
4.21295e-07
0.00113876
4.40261e-07
0.00113878
4.60073e-07
0.00113879
4.80764e-07
0.0011388
5.02364e-07
0.00113882
5.24905e-07
0.00113883
5.4842e-07
0.00113884
5.72941e-07
0.00113886
5.985e-07
0.00113888
6.2513e-07
0.00113889
6.52861e-07
0.00113891
6.81728e-07
0.00113893
7.1176e-07
0.00113894
7.42988e-07
0.00113896
7.75444e-07
0.00113898
8.09157e-07
0.001139
8.44156e-07
0.00113902
8.8047e-07
0.00113905
9.18125e-07
0.00113907
9.57149e-07
0.00113909
9.97566e-07
0.00113912
1.0394e-06
0.00113914
1.08268e-06
0.00113916
1.12742e-06
0.00113919
1.17365e-06
0.00113922
1.22139e-06
0.00113924
1.27064e-06
0.00113927
1.32145e-06
0.0011393
1.37381e-06
0.00113933
1.42774e-06
0.00113936
1.48327e-06
0.00113939
1.54041e-06
0.00113942
1.59916e-06
0.00113946
1.65954e-06
0.00113949
1.72156e-06
0.00113952
1.78525e-06
0.00113956
1.85057e-06
0.00113959
1.91761e-06
0.00113963
1.98628e-06
0.00113966
2.05672e-06
0.0011397
2.12873e-06
0.00113974
2.20265e-06
0.00113978
2.27798e-06
0.00113981
2.35548e-06
0.00113985
2.43407e-06
0.0011399
2.51526e-06
0.00113994
2.59701e-06
0.00113998
2.68197e-06
0.00114002
2.76679e-06
0.00114007
2.85537e-06
0.00114011
2.94346e-06
3.03458e-06
0.00117014
1.23411e-07
0.00117015
1.28585e-07
0.00117015
1.33999e-07
0.00117015
1.39664e-07
0.00117016
1.45592e-07
0.00117016
1.51796e-07
0.00117017
1.5829e-07
0.00117017
1.65088e-07
0.00117018
1.72203e-07
0.00117018
1.79653e-07
0.00117018
1.87452e-07
0.00117019
1.95618e-07
0.0011702
2.04167e-07
0.0011702
2.13119e-07
0.00117021
2.22491e-07
0.00117021
2.32304e-07
0.00117022
2.42577e-07
0.00117023
2.53334e-07
0.00117023
2.64594e-07
0.00117024
2.76381e-07
0.00117025
2.8872e-07
0.00117026
3.01634e-07
0.00117027
3.15149e-07
0.00117027
3.29292e-07
0.00117028
3.44089e-07
0.00117029
3.59568e-07
0.0011703
3.75758e-07
0.00117031
3.92687e-07
0.00117032
4.10384e-07
0.00117034
4.28881e-07
0.00117035
4.48208e-07
0.00117036
4.68397e-07
0.00117037
4.89478e-07
0.00117039
5.11485e-07
0.0011704
5.34449e-07
0.00117041
5.58403e-07
0.00117043
5.83379e-07
0.00117045
6.09411e-07
0.00117046
6.36531e-07
0.00117048
6.64771e-07
0.0011705
6.94163e-07
0.00117051
7.2474e-07
0.00117053
7.56532e-07
0.00117055
7.8957e-07
0.00117057
8.23885e-07
0.00117059
8.59504e-07
0.00117062
8.96458e-07
0.00117064
9.34774e-07
0.00117066
9.74477e-07
0.00117069
1.01559e-06
0.00117071
1.05815e-06
0.00117074
1.10217e-06
0.00117076
1.14767e-06
0.00117079
1.19467e-06
0.00117082
1.2432e-06
0.00117084
1.29328e-06
0.00117087
1.34491e-06
0.0011709
1.39813e-06
0.00117093
1.45293e-06
0.00117096
1.50934e-06
0.001171
1.56737e-06
0.00117103
1.62704e-06
0.00117106
1.68834e-06
0.00117109
1.75131e-06
0.00117113
1.81592e-06
0.00117116
1.88224e-06
0.0011712
1.95017e-06
0.00117124
2.01988e-06
0.00117128
2.09115e-06
0.00117131
2.1643e-06
0.00117135
2.23886e-06
0.00117139
2.31554e-06
0.00117143
2.39331e-06
0.00117148
2.4736e-06
0.00117152
2.55445e-06
0.00117156
2.63839e-06
0.00117161
2.72221e-06
0.00117165
2.80957e-06
0.0011717
2.8965e-06
2.9862e-06
0.00120259
1.20164e-07
0.00120259
1.25199e-07
0.0012026
1.30467e-07
0.0012026
1.3598e-07
0.00120261
1.41748e-07
0.00120261
1.47785e-07
0.00120261
1.54104e-07
0.00120262
1.60718e-07
0.00120262
1.67642e-07
0.00120263
1.7489e-07
0.00120263
1.82479e-07
0.00120264
1.90425e-07
0.00120264
1.98744e-07
0.00120265
2.07454e-07
0.00120265
2.16575e-07
0.00120266
2.26124e-07
0.00120267
2.36123e-07
0.00120267
2.46591e-07
0.00120268
2.57551e-07
0.00120269
2.69025e-07
0.0012027
2.81036e-07
0.0012027
2.93608e-07
0.00120271
3.06768e-07
0.00120272
3.2054e-07
0.00120273
3.34951e-07
0.00120274
3.50029e-07
0.00120275
3.65801e-07
0.00120276
3.82296e-07
0.00120277
3.99544e-07
0.00120278
4.17574e-07
0.00120279
4.36418e-07
0.00120281
4.56106e-07
0.00120282
4.7667e-07
0.00120283
4.98143e-07
0.00120285
5.20556e-07
0.00120286
5.43943e-07
0.00120288
5.68337e-07
0.00120289
5.93769e-07
0.00120291
6.20275e-07
0.00120292
6.47885e-07
0.00120294
6.76634e-07
0.00120296
7.06553e-07
0.00120298
7.37674e-07
0.001203
7.7003e-07
0.00120302
8.0365e-07
0.00120304
8.38565e-07
0.00120306
8.74805e-07
0.00120308
9.12399e-07
0.00120311
9.51373e-07
0.00120313
9.91754e-07
0.00120316
1.03357e-06
0.00120318
1.07684e-06
0.00120321
1.12159e-06
0.00120323
1.16785e-06
0.00120326
1.21562e-06
0.00120329
1.26494e-06
0.00120332
1.31583e-06
0.00120335
1.36829e-06
0.00120338
1.42234e-06
0.00120341
1.478e-06
0.00120344
1.53528e-06
0.00120348
1.59419e-06
0.00120351
1.65475e-06
0.00120354
1.71696e-06
0.00120358
1.78082e-06
0.00120361
1.84637e-06
0.00120365
1.91355e-06
0.00120369
1.98248e-06
0.00120373
2.05296e-06
0.00120377
2.12532e-06
0.00120381
2.19906e-06
0.00120385
2.27489e-06
0.00120389
2.35179e-06
0.00120393
2.43115e-06
0.00120397
2.51106e-06
0.00120402
2.59393e-06
0.00120406
2.67671e-06
0.00120411
2.76284e-06
0.00120416
2.84856e-06
2.93681e-06
0.00123594
1.16923e-07
0.00123594
1.2182e-07
0.00123594
1.26943e-07
0.00123595
1.32304e-07
0.00123595
1.37914e-07
0.00123596
1.43785e-07
0.00123596
1.4993e-07
0.00123596
1.56362e-07
0.00123597
1.63096e-07
0.00123597
1.70146e-07
0.00123598
1.77526e-07
0.00123598
1.85253e-07
0.00123599
1.93344e-07
0.001236
2.01816e-07
0.001236
2.10687e-07
0.00123601
2.19976e-07
0.00123601
2.29701e-07
0.00123602
2.39885e-07
0.00123603
2.50547e-07
0.00123603
2.6171e-07
0.00123604
2.73397e-07
0.00123605
2.85631e-07
0.00123606
2.98438e-07
0.00123607
3.11842e-07
0.00123608
3.25871e-07
0.00123609
3.4055e-07
0.0012361
3.55907e-07
0.00123611
3.71972e-07
0.00123612
3.88772e-07
0.00123613
4.06339e-07
0.00123614
4.24701e-07
0.00123615
4.43891e-07
0.00123616
4.6394e-07
0.00123618
4.84881e-07
0.00123619
5.06744e-07
0.00123621
5.29564e-07
0.00123622
5.53374e-07
0.00123624
5.78207e-07
0.00123625
6.04095e-07
0.00123627
6.31073e-07
0.00123629
6.59174e-07
0.00123631
6.8843e-07
0.00123632
7.18875e-07
0.00123634
7.5054e-07
0.00123636
7.83458e-07
0.00123638
8.17659e-07
0.00123641
8.53174e-07
0.00123643
8.90032e-07
0.00123645
9.28262e-07
0.00123648
9.67891e-07
0.0012365
1.00895e-06
0.00123653
1.05145e-06
0.00123655
1.09544e-06
0.00123658
1.14092e-06
0.00123661
1.18792e-06
0.00123663
1.23646e-06
0.00123666
1.28656e-06
0.00123669
1.33824e-06
0.00123673
1.39151e-06
0.00123676
1.44639e-06
0.00123679
1.50288e-06
0.00123682
1.56102e-06
0.00123686
1.62078e-06
0.00123689
1.68221e-06
0.00123693
1.74528e-06
0.00123696
1.81004e-06
0.001237
1.87641e-06
0.00123704
1.94453e-06
0.00123708
2.0142e-06
0.00123712
2.08571e-06
0.00123716
2.1586e-06
0.0012372
2.23353e-06
0.00123724
2.30954e-06
0.00123728
2.38791e-06
0.00123733
2.46686e-06
0.00123737
2.54862e-06
0.00123742
2.63033e-06
0.00123747
2.71517e-06
0.00123752
2.79965e-06
2.88642e-06
0.00127021
1.1369e-07
0.00127021
1.18449e-07
0.00127022
1.23429e-07
0.00127022
1.28639e-07
0.00127022
1.34092e-07
0.00127023
1.39798e-07
0.00127023
1.45771e-07
0.00127024
1.52023e-07
0.00127024
1.58568e-07
0.00127025
1.6542e-07
0.00127025
1.72594e-07
0.00127026
1.80105e-07
0.00127026
1.8797e-07
0.00127027
1.96206e-07
0.00127027
2.04829e-07
0.00127028
2.13859e-07
0.00127028
2.23315e-07
0.00127029
2.33216e-07
0.0012703
2.43583e-07
0.00127031
2.54438e-07
0.00127031
2.65804e-07
0.00127032
2.77702e-07
0.00127033
2.90159e-07
0.00127034
3.03199e-07
0.00127035
3.16848e-07
0.00127036
3.31132e-07
0.00127037
3.46078e-07
0.00127038
3.61714e-07
0.00127039
3.78071e-07
0.0012704
3.95175e-07
0.00127041
4.1306e-07
0.00127042
4.31754e-07
0.00127043
4.51289e-07
0.00127045
4.71698e-07
0.00127046
4.93013e-07
0.00127048
5.15267e-07
0.00127049
5.38493e-07
0.00127051
5.62724e-07
0.00127052
5.87994e-07
0.00127054
6.14337e-07
0.00127056
6.41787e-07
0.00127057
6.70376e-07
0.00127059
7.00139e-07
0.00127061
7.31107e-07
0.00127063
7.63314e-07
0.00127065
7.96791e-07
0.00127068
8.3157e-07
0.0012707
8.67681e-07
0.00127072
9.05153e-07
0.00127074
9.44016e-07
0.00127077
9.84296e-07
0.00127079
1.02602e-06
0.00127082
1.06921e-06
0.00127085
1.1139e-06
0.00127088
1.1601e-06
0.0012709
1.20784e-06
0.00127093
1.25714e-06
0.00127096
1.30801e-06
0.001271
1.36046e-06
0.00127103
1.41453e-06
0.00127106
1.47021e-06
0.00127109
1.52753e-06
0.00127113
1.58648e-06
0.00127116
1.64708e-06
0.0012712
1.70932e-06
0.00127124
1.77325e-06
0.00127127
1.83879e-06
0.00127131
1.90606e-06
0.00127135
1.97487e-06
0.00127139
2.04549e-06
0.00127143
2.1175e-06
0.00127147
2.19149e-06
0.00127152
2.26656e-06
0.00127156
2.34391e-06
0.00127161
2.42185e-06
0.00127165
2.50247e-06
0.0012717
2.58306e-06
0.00127175
2.6666e-06
0.0012718
2.74979e-06
2.83505e-06
0.00130543
1.10465e-07
0.00130543
1.15088e-07
0.00130544
1.19926e-07
0.00130544
1.24987e-07
0.00130545
1.30283e-07
0.00130545
1.35827e-07
0.00130545
1.41629e-07
0.00130546
1.47702e-07
0.00130546
1.5406e-07
0.00130547
1.60716e-07
0.00130547
1.67685e-07
0.00130548
1.74982e-07
0.00130548
1.82623e-07
0.00130549
1.90624e-07
0.00130549
1.99003e-07
0.0013055
2.07777e-07
0.00130551
2.16965e-07
0.00130551
2.26586e-07
0.00130552
2.36661e-07
0.00130553
2.47211e-07
0.00130553
2.58257e-07
0.00130554
2.69824e-07
0.00130555
2.81934e-07
0.00130556
2.94612e-07
0.00130557
3.07884e-07
0.00130558
3.21775e-07
0.00130559
3.36313e-07
0.0013056
3.51524e-07
0.00130561
3.67439e-07
0.00130562
3.84085e-07
0.00130563
4.01493e-07
0.00130564
4.19693e-07
0.00130566
4.38717e-07
0.00130567
4.58596e-07
0.00130568
4.79364e-07
0.0013057
5.01052e-07
0.00130571
5.23694e-07
0.00130573
5.47323e-07
0.00130574
5.71974e-07
0.00130576
5.9768e-07
0.00130578
6.24475e-07
0.00130579
6.52394e-07
0.00130581
6.81469e-07
0.00130583
7.11735e-07
0.00130585
7.43223e-07
0.00130587
7.75969e-07
0.00130589
8.10002e-07
0.00130592
8.45354e-07
0.00130594
8.82056e-07
0.00130596
9.20137e-07
0.00130599
9.59626e-07
0.00130601
1.00055e-06
0.00130604
1.04294e-06
0.00130607
1.08681e-06
0.0013061
1.13219e-06
0.00130612
1.1791e-06
0.00130615
1.22756e-06
0.00130618
1.27759e-06
0.00130622
1.32921e-06
0.00130625
1.38244e-06
0.00130628
1.43727e-06
0.00130631
1.49374e-06
0.00130635
1.55184e-06
0.00130638
1.61159e-06
0.00130642
1.67297e-06
0.00130646
1.73603e-06
0.0013065
1.80069e-06
0.00130654
1.86707e-06
0.00130658
1.93498e-06
0.00130662
2.00469e-06
0.00130666
2.07576e-06
0.0013067
2.14878e-06
0.00130674
2.22287e-06
0.00130679
2.29917e-06
0.00130683
2.37605e-06
0.00130688
2.45549e-06
0.00130693
2.53492e-06
0.00130698
2.61712e-06
0.00130703
2.69899e-06
2.78273e-06
0.00134163
1.07252e-07
0.00134163
1.1174e-07
0.00134164
1.16436e-07
0.00134164
1.21349e-07
0.00134164
1.26491e-07
0.00134165
1.31872e-07
0.00134165
1.37504e-07
0.00134166
1.434e-07
0.00134166
1.49573e-07
0.00134166
1.56035e-07
0.00134167
1.62801e-07
0.00134167
1.69886e-07
0.00134168
1.77305e-07
0.00134169
1.85073e-07
0.00134169
1.93209e-07
0.0013417
2.01729e-07
0.0013417
2.10651e-07
0.00134171
2.19995e-07
0.00134172
2.29781e-07
0.00134172
2.40028e-07
0.00134173
2.50758e-07
0.00134174
2.61995e-07
0.00134175
2.73761e-07
0.00134176
2.86081e-07
0.00134177
2.98978e-07
0.00134177
3.1248e-07
0.00134178
3.26612e-07
0.00134179
3.41402e-07
0.00134181
3.56877e-07
0.00134182
3.73067e-07
0.00134183
3.90001e-07
0.00134184
4.0771e-07
0.00134185
4.26224e-07
0.00134187
4.45576e-07
0.00134188
4.65796e-07
0.00134189
4.8692e-07
0.00134191
5.08978e-07
0.00134192
5.32005e-07
0.00134194
5.56036e-07
0.00134196
5.81103e-07
0.00134197
6.07242e-07
0.00134199
6.34486e-07
0.00134201
6.62869e-07
0.00134203
6.92427e-07
0.00134205
7.23191e-07
0.00134207
7.55196e-07
0.00134209
7.88474e-07
0.00134211
8.23057e-07
0.00134214
8.58977e-07
0.00134216
8.96263e-07
0.00134218
9.34946e-07
0.00134221
9.75053e-07
0.00134224
1.01661e-06
0.00134226
1.05965e-06
0.00134229
1.10419e-06
0.00134232
1.15025e-06
0.00134235
1.19785e-06
0.00134238
1.24702e-06
0.00134241
1.29778e-06
0.00134244
1.35013e-06
0.00134248
1.40409e-06
0.00134251
1.45968e-06
0.00134255
1.51689e-06
0.00134258
1.57575e-06
0.00134262
1.63623e-06
0.00134266
1.69839e-06
0.0013427
1.76214e-06
0.00134274
1.82759e-06
0.00134278
1.89457e-06
0.00134282
1.96332e-06
0.00134286
2.03342e-06
0.0013429
2.10543e-06
0.00134295
2.1785e-06
0.00134299
2.25369e-06
0.00134304
2.32949e-06
0.00134309
2.40771e-06
0.00134314
2.48595e-06
0.00134319
2.56677e-06
0.00134324
2.64729e-06
2.72947e-06
0.00137883
1.04051e-07
0.00137883
1.08405e-07
0.00137884
1.1296e-07
0.00137884
1.17727e-07
0.00137885
1.22715e-07
0.00137885
1.27935e-07
0.00137885
1.334e-07
0.00137886
1.3912e-07
0.00137886
1.45108e-07
0.00137887
1.51378e-07
0.00137887
1.57943e-07
0.00137888
1.64817e-07
0.00137888
1.72016e-07
0.00137889
1.79554e-07
0.00137889
1.87449e-07
0.0013789
1.95717e-07
0.00137891
2.04376e-07
0.00137891
2.13446e-07
0.00137892
2.22944e-07
0.00137893
2.32891e-07
0.00137893
2.43308e-07
0.00137894
2.54217e-07
0.00137895
2.65642e-07
0.00137896
2.77606e-07
0.00137897
2.90132e-07
0.00137898
3.03247e-07
0.00137899
3.16976e-07
0.001379
3.31347e-07
0.00137901
3.46386e-07
0.00137902
3.62122e-07
0.00137903
3.78585e-07
0.00137904
3.95804e-07
0.00137905
4.13811e-07
0.00137907
4.32636e-07
0.00137908
4.52312e-07
0.00137909
4.72871e-07
0.00137911
4.94347e-07
0.00137912
5.16772e-07
0.00137914
5.40181e-07
0.00137916
5.64609e-07
0.00137917
5.90088e-07
0.00137919
6.16655e-07
0.00137921
6.44343e-07
0.00137923
6.73187e-07
0.00137925
7.03221e-07
0.00137927
7.34478e-07
0.00137929
7.66993e-07
0.00137931
8.00797e-07
0.00137934
8.35924e-07
0.00137936
8.72403e-07
0.00137938
9.10265e-07
0.00137941
9.4954e-07
0.00137944
9.90255e-07
0.00137946
1.03244e-06
0.00137949
1.07611e-06
0.00137952
1.1213e-06
0.00137955
1.16803e-06
0.00137958
1.21631e-06
0.00137961
1.26617e-06
0.00137964
1.31762e-06
0.00137968
1.37067e-06
0.00137971
1.42535e-06
0.00137975
1.48164e-06
0.00137978
1.53958e-06
0.00137982
1.59913e-06
0.00137986
1.66035e-06
0.0013799
1.72315e-06
0.00137994
1.78764e-06
0.00137998
1.85364e-06
0.00138002
1.92139e-06
0.00138006
1.99049e-06
0.00138011
2.06144e-06
0.00138015
2.13345e-06
0.0013802
2.20752e-06
0.00138025
2.28218e-06
0.0013803
2.35915e-06
0.00138034
2.43615e-06
0.0013804
2.51557e-06
0.00138045
2.59469e-06
2.67529e-06
0.00141706
1.00865e-07
0.00141707
1.05086e-07
0.00141707
1.09502e-07
0.00141707
1.14122e-07
0.00141708
1.18958e-07
0.00141708
1.24019e-07
0.00141709
1.29317e-07
0.00141709
1.34862e-07
0.0014171
1.40668e-07
0.0014171
1.46747e-07
0.0014171
1.53112e-07
0.00141711
1.59778e-07
0.00141712
1.66758e-07
0.00141712
1.74068e-07
0.00141713
1.81724e-07
0.00141713
1.89742e-07
0.00141714
1.98141e-07
0.00141714
2.06937e-07
0.00141715
2.1615e-07
0.00141716
2.258e-07
0.00141717
2.35906e-07
0.00141717
2.46491e-07
0.00141718
2.57577e-07
0.00141719
2.69188e-07
0.0014172
2.81346e-07
0.00141721
2.94077e-07
0.00141722
3.07406e-07
0.00141723
3.2136e-07
0.00141724
3.35965e-07
0.00141725
3.5125e-07
0.00141726
3.67244e-07
0.00141727
3.83976e-07
0.00141728
4.01477e-07
0.0014173
4.19778e-07
0.00141731
4.3891e-07
0.00141733
4.58907e-07
0.00141734
4.798e-07
0.00141735
5.01623e-07
0.00141737
5.24411e-07
0.00141739
5.48198e-07
0.0014174
5.73017e-07
0.00141742
5.98904e-07
0.00141744
6.25893e-07
0.00141746
6.54019e-07
0.00141748
6.83317e-07
0.0014175
7.13821e-07
0.00141752
7.45564e-07
0.00141754
7.7858e-07
0.00141757
8.12903e-07
0.00141759
8.48563e-07
0.00141762
8.85591e-07
0.00141764
9.24019e-07
0.00141767
9.63874e-07
0.00141769
1.00518e-06
0.00141772
1.04797e-06
0.00141775
1.09227e-06
0.00141778
1.13809e-06
0.00141781
1.18547e-06
0.00141784
1.2344e-06
0.00141788
1.28493e-06
0.00141791
1.33705e-06
0.00141794
1.39078e-06
0.00141798
1.44612e-06
0.00141802
1.5031e-06
0.00141805
1.56169e-06
0.00141809
1.62193e-06
0.00141813
1.68375e-06
0.00141817
1.74724e-06
0.00141821
1.81223e-06
0.00141826
1.87894e-06
0.0014183
1.94699e-06
0.00141834
2.01685e-06
0.00141839
2.08776e-06
0.00141844
2.16065e-06
0.00141849
2.23415e-06
0.00141853
2.30984e-06
0.00141858
2.38556e-06
0.00141864
2.46354e-06
0.00141869
2.54123e-06
2.62022e-06
0.00145636
9.76945e-08
0.00145636
1.01783e-07
0.00145636
1.0606e-07
0.00145637
1.10537e-07
0.00145637
1.15221e-07
0.00145638
1.20124e-07
0.00145638
1.25256e-07
0.00145638
1.30628e-07
0.00145639
1.36253e-07
0.00145639
1.42143e-07
0.0014564
1.4831e-07
0.0014564
1.54768e-07
0.00145641
1.61532e-07
0.00145641
1.68615e-07
0.00145642
1.76035e-07
0.00145643
1.83806e-07
0.00145643
1.91945e-07
0.00145644
2.00471e-07
0.00145644
2.09402e-07
0.00145645
2.18756e-07
0.00145646
2.28554e-07
0.00145647
2.38817e-07
0.00145647
2.49567e-07
0.00145648
2.60827e-07
0.00145649
2.72619e-07
0.0014565
2.84969e-07
0.00145651
2.97901e-07
0.00145652
3.1144e-07
0.00145653
3.25615e-07
0.00145654
3.40451e-07
0.00145655
3.55979e-07
0.00145656
3.72226e-07
0.00145658
3.89224e-07
0.00145659
4.07002e-07
0.0014566
4.25592e-07
0.00145662
4.45027e-07
0.00145663
4.65339e-07
0.00145665
4.86561e-07
0.00145666
5.08727e-07
0.00145668
5.31871e-07
0.0014567
5.56029e-07
0.00145671
5.81233e-07
0.00145673
6.07521e-07
0.00145675
6.34925e-07
0.00145677
6.63482e-07
0.00145679
6.93226e-07
0.00145681
7.24191e-07
0.00145683
7.56412e-07
0.00145686
7.89921e-07
0.00145688
8.2475e-07
0.00145691
8.60933e-07
0.00145693
8.98499e-07
0.00145696
9.37478e-07
0.00145699
9.77899e-07
0.00145701
1.01979e-06
0.00145704
1.06317e-06
0.00145707
1.10807e-06
0.0014571
1.1545e-06
0.00145714
1.2025e-06
0.00145717
1.25207e-06
0.0014572
1.30322e-06
0.00145724
1.35598e-06
0.00145727
1.41035e-06
0.00145731
1.46634e-06
0.00145735
1.52392e-06
0.00145739
1.58315e-06
0.00145743
1.64395e-06
0.00145747
1.70641e-06
0.00145751
1.77035e-06
0.00145755
1.83598e-06
0.0014576
1.90295e-06
0.00145764
1.97168e-06
0.00145769
2.04146e-06
0.00145773
2.11314e-06
0.00145778
2.18542e-06
0.00145783
2.25979e-06
0.00145788
2.3342e-06
0.00145794
2.41072e-06
0.00145799
2.48694e-06
2.5643e-06
0.00149674
9.45407e-08
0.00149674
9.84978e-08
0.00149675
1.02638e-07
0.00149675
1.06971e-07
0.00149676
1.11505e-07
0.00149676
1.16251e-07
0.00149676
1.21218e-07
0.00149677
1.26419e-07
0.00149677
1.31865e-07
0.00149678
1.37566e-07
0.00149678
1.43537e-07
0.00149679
1.4979e-07
0.00149679
1.56338e-07
0.0014968
1.63197e-07
0.0014968
1.70382e-07
0.00149681
1.77907e-07
0.00149681
1.8579e-07
0.00149682
1.94048e-07
0.00149683
2.02698e-07
0.00149683
2.11759e-07
0.00149684
2.21252e-07
0.00149685
2.31195e-07
0.00149686
2.41612e-07
0.00149687
2.52523e-07
0.00149687
2.63953e-07
0.00149688
2.75924e-07
0.00149689
2.8846e-07
0.0014969
3.01589e-07
0.00149691
3.15335e-07
0.00149692
3.29725e-07
0.00149693
3.44789e-07
0.00149695
3.60554e-07
0.00149696
3.7705e-07
0.00149697
3.94307e-07
0.00149698
4.12357e-07
0.001497
4.31231e-07
0.00149701
4.50963e-07
0.00149703
4.71584e-07
0.00149704
4.93128e-07
0.00149706
5.15631e-07
0.00149708
5.39125e-07
0.00149709
5.63646e-07
0.00149711
5.89229e-07
0.00149713
6.15909e-07
0.00149715
6.43721e-07
0.00149717
6.72699e-07
0.00149719
7.0288e-07
0.00149722
7.34296e-07
0.00149724
7.66983e-07
0.00149726
8.00972e-07
0.00149729
8.36297e-07
0.00149731
8.72989e-07
0.00149734
9.11078e-07
0.00149737
9.50593e-07
0.00149739
9.91563e-07
0.00149742
1.03401e-06
0.00149745
1.07796e-06
0.00149748
1.12344e-06
0.00149752
1.17047e-06
0.00149755
1.21906e-06
0.00149758
1.26922e-06
0.00149762
1.32098e-06
0.00149765
1.37433e-06
0.00149769
1.4293e-06
0.00149773
1.48586e-06
0.00149777
1.54404e-06
0.00149781
1.60379e-06
0.00149785
1.66517e-06
0.00149789
1.72803e-06
0.00149794
1.79255e-06
0.00149798
1.85839e-06
0.00149803
1.92595e-06
0.00149807
1.99455e-06
0.00149812
2.06499e-06
0.00149817
2.13603e-06
0.00149822
2.20904e-06
0.00149827
2.2821e-06
0.00149833
2.35712e-06
0.00149838
2.43186e-06
2.50755e-06
0.00153824
9.14045e-08
0.00153825
9.52312e-08
0.00153825
9.92352e-08
0.00153825
1.03425e-07
0.00153826
1.0781e-07
0.00153826
1.124e-07
0.00153827
1.17205e-07
0.00153827
1.22236e-07
0.00153827
1.27503e-07
0.00153828
1.33018e-07
0.00153828
1.38794e-07
0.00153829
1.44843e-07
0.00153829
1.51178e-07
0.0015383
1.57815e-07
0.0015383
1.64766e-07
0.00153831
1.72048e-07
0.00153832
1.79676e-07
0.00153832
1.87667e-07
0.00153833
1.96039e-07
0.00153834
2.0481e-07
0.00153834
2.13999e-07
0.00153835
2.23625e-07
0.00153836
2.33711e-07
0.00153837
2.44277e-07
0.00153838
2.55345e-07
0.00153839
2.6694e-07
0.00153839
2.79085e-07
0.0015384
2.91804e-07
0.00153841
3.05124e-07
0.00153843
3.19071e-07
0.00153844
3.33673e-07
0.00153845
3.48958e-07
0.00153846
3.64954e-07
0.00153847
3.81693e-07
0.00153849
3.99204e-07
0.0015385
4.1752e-07
0.00153851
4.36672e-07
0.00153853
4.56693e-07
0.00153854
4.77616e-07
0.00153856
4.99476e-07
0.00153858
5.22307e-07
0.00153859
5.46142e-07
0.00153861
5.71019e-07
0.00153863
5.96971e-07
0.00153865
6.24034e-07
0.00153867
6.52243e-07
0.00153869
6.81633e-07
0.00153872
7.12238e-07
0.00153874
7.44094e-07
0.00153876
7.77234e-07
0.00153879
8.11691e-07
0.00153881
8.47496e-07
0.00153884
8.84681e-07
0.00153887
9.23277e-07
0.00153889
9.63309e-07
0.00153892
1.00481e-06
0.00153895
1.04779e-06
0.00153898
1.09229e-06
0.00153902
1.13833e-06
0.00153905
1.18591e-06
0.00153908
1.23506e-06
0.00153912
1.28579e-06
0.00153916
1.3381e-06
0.00153919
1.39202e-06
0.00153923
1.44751e-06
0.00153927
1.50462e-06
0.00153931
1.56327e-06
0.00153935
1.62355e-06
0.0015394
1.68529e-06
0.00153944
1.74866e-06
0.00153948
1.81334e-06
0.00153953
1.8797e-06
0.00153958
1.94709e-06
0.00153963
2.01625e-06
0.00153968
2.086e-06
0.00153973
2.15763e-06
0.00153978
2.2293e-06
0.00153984
2.3028e-06
0.00153989
2.376e-06
2.45002e-06
0.0015809
8.82865e-08
0.0015809
9.19838e-08
0.0015809
9.58525e-08
0.00158091
9.99011e-08
0.00158091
1.04138e-07
0.00158092
1.08574e-07
0.00158092
1.13217e-07
0.00158092
1.18078e-07
0.00158093
1.23169e-07
0.00158093
1.28499e-07
0.00158094
1.34081e-07
0.00158094
1.39928e-07
0.00158095
1.46052e-07
0.00158095
1.52467e-07
0.00158096
1.59187e-07
0.00158096
1.66227e-07
0.00158097
1.73603e-07
0.00158098
1.8133e-07
0.00158098
1.89426e-07
0.00158099
1.97908e-07
0.001581
2.06795e-07
0.001581
2.16107e-07
0.00158101
2.25864e-07
0.00158102
2.36087e-07
0.00158103
2.46797e-07
0.00158104
2.58018e-07
0.00158105
2.69773e-07
0.00158106
2.82086e-07
0.00158107
2.94982e-07
0.00158108
3.08488e-07
0.00158109
3.22631e-07
0.0015811
3.37437e-07
0.00158111
3.52937e-07
0.00158113
3.69159e-07
0.00158114
3.86134e-07
0.00158115
4.03892e-07
0.00158117
4.22466e-07
0.00158118
4.41887e-07
0.0015812
4.6219e-07
0.00158121
4.83407e-07
0.00158123
5.05574e-07
0.00158125
5.28723e-07
0.00158126
5.52891e-07
0.00158128
5.78113e-07
0.0015813
6.04423e-07
0.00158132
6.31858e-07
0.00158134
6.60453e-07
0.00158137
6.90241e-07
0.00158139
7.2126e-07
0.00158141
7.53541e-07
0.00158144
7.87119e-07
0.00158146
8.22027e-07
0.00158149
8.58296e-07
0.00158152
8.95957e-07
0.00158155
9.35038e-07
0.00158157
9.75567e-07
0.0015816
1.01757e-06
0.00158164
1.06107e-06
0.00158167
1.10609e-06
0.0015817
1.15264e-06
0.00158174
1.20075e-06
0.00158177
1.25043e-06
0.00158181
1.30167e-06
0.00158185
1.35451e-06
0.00158188
1.40891e-06
0.00158192
1.4649e-06
0.00158196
1.52244e-06
0.00158201
1.58157e-06
0.00158205
1.64215e-06
0.00158209
1.70435e-06
0.00158214
1.76783e-06
0.00158219
1.83296e-06
0.00158223
1.89909e-06
0.00158228
1.96694e-06
0.00158233
2.03537e-06
0.00158239
2.10558e-06
0.00158244
2.17583e-06
0.00158249
2.24779e-06
0.00158255
2.31943e-06
2.39174e-06
0.00162473
8.51871e-08
0.00162474
8.8756e-08
0.00162474
9.24904e-08
0.00162474
9.63985e-08
0.00162475
1.00489e-07
0.00162475
1.04771e-07
0.00162476
1.09254e-07
0.00162476
1.13947e-07
0.00162476
1.18862e-07
0.00162477
1.24009e-07
0.00162477
1.29399e-07
0.00162478
1.35045e-07
0.00162478
1.40959e-07
0.00162479
1.47155e-07
0.00162479
1.53645e-07
0.0016248
1.60445e-07
0.00162481
1.6757e-07
0.00162481
1.75035e-07
0.00162482
1.82857e-07
0.00162483
1.91053e-07
0.00162483
1.99641e-07
0.00162484
2.0864e-07
0.00162485
2.1807e-07
0.00162486
2.27952e-07
0.00162487
2.38307e-07
0.00162487
2.49157e-07
0.00162488
2.60524e-07
0.00162489
2.72433e-07
0.0016249
2.84909e-07
0.00162491
2.97976e-07
0.00162492
3.11661e-07
0.00162494
3.25992e-07
0.00162495
3.40997e-07
0.00162496
3.56704e-07
0.00162497
3.73143e-07
0.00162499
3.90346e-07
0.001625
4.08343e-07
0.00162502
4.27166e-07
0.00162503
4.46849e-07
0.00162505
4.67424e-07
0.00162506
4.88926e-07
0.00162508
5.11388e-07
0.0016251
5.34846e-07
0.00162512
5.59336e-07
0.00162514
5.84891e-07
0.00162516
6.11548e-07
0.00162518
6.39342e-07
0.0016252
6.68308e-07
0.00162522
6.98482e-07
0.00162525
7.29897e-07
0.00162527
7.62588e-07
0.0016253
7.96588e-07
0.00162532
8.31929e-07
0.00162535
8.68642e-07
0.00162538
9.06757e-07
0.00162541
9.46302e-07
0.00162544
9.87303e-07
0.00162547
1.02978e-06
0.0016255
1.07377e-06
0.00162554
1.11927e-06
0.00162557
1.16631e-06
0.00162561
1.21491e-06
0.00162564
1.26506e-06
0.00162568
1.31679e-06
0.00162572
1.37006e-06
0.00162576
1.42492e-06
0.0016258
1.4813e-06
0.00162584
1.53926e-06
0.00162589
1.59866e-06
0.00162593
1.65964e-06
0.00162598
1.72189e-06
0.00162602
1.78575e-06
0.00162607
1.8506e-06
0.00162612
1.9171e-06
0.00162617
1.98417e-06
0.00162623
2.05294e-06
0.00162628
2.12174e-06
0.00162634
2.19212e-06
0.00162639
2.26217e-06
2.33276e-06
0.00166979
8.21063e-08
0.00166979
8.55476e-08
0.00166979
8.91486e-08
0.0016698
9.29174e-08
0.0016698
9.68621e-08
0.0016698
1.00992e-07
0.00166981
1.05315e-07
0.00166981
1.09842e-07
0.00166982
1.14582e-07
0.00166982
1.19547e-07
0.00166983
1.24747e-07
0.00166983
1.30193e-07
0.00166984
1.35899e-07
0.00166984
1.41877e-07
0.00166985
1.48139e-07
0.00166985
1.54701e-07
0.00166986
1.61577e-07
0.00166986
1.68782e-07
0.00166987
1.76332e-07
0.00166988
1.84243e-07
0.00166989
1.92534e-07
0.00166989
2.01223e-07
0.0016699
2.10329e-07
0.00166991
2.19872e-07
0.00166992
2.29873e-07
0.00166993
2.40354e-07
0.00166993
2.51337e-07
0.00166994
2.62844e-07
0.00166995
2.74901e-07
0.00166996
2.87531e-07
0.00166998
3.00762e-07
0.00166999
3.14619e-07
0.00167
3.29131e-07
0.00167001
3.44325e-07
0.00167002
3.60232e-07
0.00167004
3.7688e-07
0.00167005
3.94302e-07
0.00167007
4.12528e-07
0.00167008
4.31591e-07
0.0016701
4.51524e-07
0.00167011
4.72362e-07
0.00167013
4.94137e-07
0.00167015
5.16884e-07
0.00167017
5.40639e-07
0.00167019
5.65437e-07
0.00167021
5.91313e-07
0.00167023
6.18302e-07
0.00167025
6.46441e-07
0.00167027
6.75764e-07
0.0016703
7.06306e-07
0.00167032
7.38102e-07
0.00167035
7.71185e-07
0.00167037
8.05587e-07
0.0016704
8.41341e-07
0.00167043
8.78476e-07
0.00167046
9.17021e-07
0.00167049
9.57003e-07
0.00167052
9.98448e-07
0.00167055
1.04138e-06
0.00167059
1.08581e-06
0.00167062
1.13177e-06
0.00167066
1.17926e-06
0.00167069
1.22829e-06
0.00167073
1.27888e-06
0.00167077
1.33101e-06
0.00167081
1.3847e-06
0.00167085
1.43989e-06
0.00167089
1.49665e-06
0.00167094
1.55483e-06
0.00167098
1.61456e-06
0.00167103
1.67555e-06
0.00167108
1.73811e-06
0.00167113
1.80165e-06
0.00167118
1.86677e-06
0.00167123
1.93246e-06
0.00167128
1.99975e-06
0.00167134
2.06707e-06
0.00167139
2.13585e-06
0.00167145
2.20428e-06
2.27313e-06
0.00171609
7.90437e-08
0.00171609
8.23583e-08
0.0017161
8.5827e-08
0.0017161
8.94573e-08
0.0017161
9.32573e-08
0.00171611
9.72354e-08
0.00171611
1.014e-07
0.00171611
1.05762e-07
0.00171612
1.10329e-07
0.00171612
1.15113e-07
0.00171613
1.20124e-07
0.00171613
1.25372e-07
0.00171614
1.30871e-07
0.00171614
1.36632e-07
0.00171615
1.42669e-07
0.00171615
1.48994e-07
0.00171616
1.55623e-07
0.00171617
1.62569e-07
0.00171617
1.69849e-07
0.00171618
1.77478e-07
0.00171619
1.85473e-07
0.00171619
1.93854e-07
0.0017162
2.02638e-07
0.00171621
2.11845e-07
0.00171622
2.21495e-07
0.00171623
2.31609e-07
0.00171624
2.42208e-07
0.00171625
2.53316e-07
0.00171626
2.64956e-07
0.00171627
2.77153e-07
0.00171628
2.89931e-07
0.00171629
3.03317e-07
0.0017163
3.17338e-07
0.00171631
3.32021e-07
0.00171632
3.47396e-07
0.00171634
3.63492e-07
0.00171635
3.8034e-07
0.00171637
3.9797e-07
0.00171638
4.16415e-07
0.0017164
4.35707e-07
0.00171641
4.5588e-07
0.00171643
4.76967e-07
0.00171645
4.99003e-07
0.00171647
5.22022e-07
0.00171649
5.4606e-07
0.00171651
5.71152e-07
0.00171653
5.97334e-07
0.00171655
6.24641e-07
0.00171657
6.53108e-07
0.0017166
6.82771e-07
0.00171662
7.13664e-07
0.00171665
7.45821e-07
0.00171667
7.79274e-07
0.0017167
8.14057e-07
0.00171673
8.502e-07
0.00171676
8.87733e-07
0.00171679
9.26682e-07
0.00171682
9.67074e-07
0.00171685
1.00893e-06
0.00171688
1.05227e-06
0.00171692
1.09712e-06
0.00171696
1.14349e-06
0.00171699
1.19138e-06
0.00171703
1.2408e-06
0.00171707
1.29176e-06
0.00171711
1.34425e-06
0.00171715
1.39824e-06
0.00171719
1.45376e-06
0.00171724
1.51069e-06
0.00171728
1.56915e-06
0.00171733
1.62885e-06
0.00171738
1.69008e-06
0.00171743
1.75227e-06
0.00171748
1.81599e-06
0.00171753
1.88026e-06
0.00171758
1.94606e-06
0.00171764
2.01186e-06
0.0017177
2.07902e-06
0.00171776
2.14581e-06
2.2129e-06
0.00176367
7.59987e-08
0.00176368
7.91875e-08
0.00176368
8.25246e-08
0.00176368
8.60173e-08
0.00176369
8.96735e-08
0.00176369
9.35013e-08
0.0017637
9.75093e-08
0.0017637
1.01706e-07
0.0017637
1.06102e-07
0.00176371
1.10706e-07
0.00176371
1.15528e-07
0.00176372
1.20581e-07
0.00176372
1.25874e-07
0.00176373
1.3142e-07
0.00176373
1.37232e-07
0.00176374
1.43323e-07
0.00176375
1.49705e-07
0.00176375
1.56395e-07
0.00176376
1.63406e-07
0.00176376
1.70755e-07
0.00176377
1.78457e-07
0.00176378
1.86531e-07
0.00176379
1.94995e-07
0.00176379
2.03867e-07
0.0017638
2.13168e-07
0.00176381
2.22917e-07
0.00176382
2.33136e-07
0.00176383
2.43847e-07
0.00176384
2.55073e-07
0.00176385
2.66838e-07
0.00176386
2.79165e-07
0.00176387
2.92082e-07
0.00176388
3.05614e-07
0.0017639
3.19789e-07
0.00176391
3.34634e-07
0.00176392
3.50179e-07
0.00176394
3.66454e-07
0.00176395
3.8349e-07
0.00176397
4.01317e-07
0.00176398
4.19969e-07
0.001764
4.39478e-07
0.00176401
4.59877e-07
0.00176403
4.812e-07
0.00176405
5.03483e-07
0.00176407
5.2676e-07
0.00176409
5.51066e-07
0.00176411
5.76437e-07
0.00176413
6.02908e-07
0.00176416
6.30515e-07
0.00176418
6.59293e-07
0.0017642
6.89276e-07
0.00176423
7.20499e-07
0.00176426
7.52996e-07
0.00176428
7.86798e-07
0.00176431
8.21938e-07
0.00176434
8.58444e-07
0.00176437
8.96346e-07
0.0017644
9.3567e-07
0.00176443
9.76438e-07
0.00176447
1.01867e-06
0.0017645
1.06239e-06
0.00176454
1.10761e-06
0.00176458
1.15434e-06
0.00176461
1.20258e-06
0.00176465
1.25233e-06
0.00176469
1.30361e-06
0.00176474
1.35636e-06
0.00176478
1.41063e-06
0.00176482
1.46628e-06
0.00176487
1.52344e-06
0.00176492
1.58182e-06
0.00176496
1.64169e-06
0.00176501
1.7025e-06
0.00176507
1.7648e-06
0.00176512
1.82762e-06
0.00176517
1.8919e-06
0.00176523
1.95617e-06
0.00176529
2.02169e-06
0.00176534
2.08681e-06
2.15213e-06
0.00181258
7.29701e-08
0.00181258
7.60338e-08
0.00181259
7.92401e-08
0.00181259
8.25962e-08
0.00181259
8.61095e-08
0.0018126
8.97879e-08
0.0018126
9.36396e-08
0.00181261
9.76733e-08
0.00181261
1.01898e-07
0.00181261
1.06323e-07
0.00181262
1.10959e-07
0.00181262
1.15816e-07
0.00181263
1.20906e-07
0.00181263
1.26238e-07
0.00181264
1.31827e-07
0.00181264
1.37684e-07
0.00181265
1.43822e-07
0.00181266
1.50257e-07
0.00181266
1.57001e-07
0.00181267
1.64071e-07
0.00181268
1.71482e-07
0.00181268
1.79251e-07
0.00181269
1.87397e-07
0.0018127
1.95937e-07
0.00181271
2.0489e-07
0.00181272
2.14277e-07
0.00181273
2.24117e-07
0.00181273
2.34433e-07
0.00181274
2.45247e-07
0.00181275
2.56581e-07
0.00181277
2.68461e-07
0.00181278
2.8091e-07
0.00181279
2.93955e-07
0.0018128
3.07623e-07
0.00181281
3.21941e-07
0.00181283
3.36937e-07
0.00181284
3.52641e-07
0.00181285
3.69083e-07
0.00181287
3.86295e-07
0.00181289
4.04307e-07
0.0018129
4.23152e-07
0.00181292
4.42863e-07
0.00181294
4.63474e-07
0.00181295
4.8502e-07
0.00181297
5.07534e-07
0.00181299
5.31052e-07
0.00181301
5.5561e-07
0.00181304
5.81242e-07
0.00181306
6.07984e-07
0.00181308
6.35872e-07
0.00181311
6.64939e-07
0.00181313
6.95222e-07
0.00181316
7.26754e-07
0.00181319
7.59566e-07
0.00181321
7.93693e-07
0.00181324
8.29163e-07
0.00181327
8.66005e-07
0.0018133
9.04246e-07
0.00181334
9.43911e-07
0.00181337
9.85022e-07
0.00181341
1.0276e-06
0.00181344
1.07165e-06
0.00181348
1.11719e-06
0.00181352
1.16423e-06
0.00181356
1.21276e-06
0.0018136
1.2628e-06
0.00181364
1.31429e-06
0.00181368
1.36727e-06
0.00181373
1.42163e-06
0.00181377
1.47745e-06
0.00181382
1.53449e-06
0.00181387
1.59298e-06
0.00181392
1.6524e-06
0.00181397
1.71324e-06
0.00181402
1.7746e-06
0.00181408
1.83734e-06
0.00181414
1.90004e-06
0.00181419
1.96391e-06
0.00181425
2.02735e-06
2.09088e-06
0.00186284
6.99563e-08
0.00186285
7.28956e-08
0.00186285
7.59719e-08
0.00186285
7.91921e-08
0.00186286
8.25633e-08
0.00186286
8.60932e-08
0.00186286
8.97896e-08
0.00186287
9.36609e-08
0.00186287
9.77159e-08
0.00186288
1.01964e-07
0.00186288
1.06414e-07
0.00186288
1.11077e-07
0.00186289
1.15963e-07
0.00186289
1.21083e-07
0.0018629
1.2645e-07
0.00186291
1.32075e-07
0.00186291
1.37971e-07
0.00186292
1.44151e-07
0.00186292
1.5063e-07
0.00186293
1.57423e-07
0.00186294
1.64544e-07
0.00186294
1.7201e-07
0.00186295
1.7984e-07
0.00186296
1.88049e-07
0.00186297
1.96657e-07
0.00186298
2.05683e-07
0.00186299
2.15147e-07
0.001863
2.2507e-07
0.00186301
2.35473e-07
0.00186302
2.4638e-07
0.00186303
2.57813e-07
0.00186304
2.69797e-07
0.00186305
2.82357e-07
0.00186306
2.9552e-07
0.00186307
3.09312e-07
0.00186309
3.23761e-07
0.0018631
3.38895e-07
0.00186311
3.54745e-07
0.00186313
3.71342e-07
0.00186315
3.88715e-07
0.00186316
4.06897e-07
0.00186318
4.25921e-07
0.0018632
4.45819e-07
0.00186321
4.66627e-07
0.00186323
4.88378e-07
0.00186325
5.11106e-07
0.00186327
5.34848e-07
0.0018633
5.59639e-07
0.00186332
5.85513e-07
0.00186334
6.12506e-07
0.00186337
6.40654e-07
0.00186339
6.6999e-07
0.00186342
7.0055e-07
0.00186344
7.32365e-07
0.00186347
7.65469e-07
0.0018635
7.99892e-07
0.00186353
8.35663e-07
0.00186356
8.72811e-07
0.0018636
9.11358e-07
0.00186363
9.5133e-07
0.00186367
9.92742e-07
0.0018637
1.03561e-06
0.00186374
1.07995e-06
0.00186378
1.12577e-06
0.00186382
1.17306e-06
0.00186386
1.22183e-06
0.0018639
1.27204e-06
0.00186394
1.32372e-06
0.00186399
1.37676e-06
0.00186403
1.43124e-06
0.00186408
1.48691e-06
0.00186413
1.544e-06
0.00186418
1.60199e-06
0.00186423
1.66137e-06
0.00186429
1.72124e-06
0.00186434
1.78242e-06
0.0018644
1.84355e-06
0.00186446
1.90575e-06
0.00186452
1.96749e-06
2.02922e-06
0.0019145
6.69549e-08
0.0019145
6.97705e-08
0.0019145
7.27174e-08
0.00191451
7.58024e-08
0.00191451
7.90323e-08
0.00191451
8.24143e-08
0.00191452
8.59563e-08
0.00191452
8.9666e-08
0.00191453
9.35521e-08
0.00191453
9.76233e-08
0.00191454
1.01889e-07
0.00191454
1.06359e-07
0.00191455
1.11043e-07
0.00191455
1.15952e-07
0.00191456
1.21098e-07
0.00191456
1.26492e-07
0.00191457
1.32146e-07
0.00191457
1.38074e-07
0.00191458
1.4429e-07
0.00191459
1.50806e-07
0.00191459
1.57639e-07
0.0019146
1.64805e-07
0.00191461
1.72319e-07
0.00191462
1.80199e-07
0.00191462
1.88464e-07
0.00191463
1.97131e-07
0.00191464
2.0622e-07
0.00191465
2.15752e-07
0.00191466
2.25747e-07
0.00191467
2.36227e-07
0.00191468
2.47216e-07
0.00191469
2.58736e-07
0.0019147
2.70814e-07
0.00191472
2.83473e-07
0.00191473
2.9674e-07
0.00191474
3.10643e-07
0.00191476
3.2521e-07
0.00191477
3.4047e-07
0.00191478
3.56452e-07
0.0019148
3.73187e-07
0.00191482
3.90707e-07
0.00191483
4.09044e-07
0.00191485
4.2823e-07
0.00191487
4.483e-07
0.00191489
4.69287e-07
0.00191491
4.91225e-07
0.00191493
5.1415e-07
0.00191495
5.38096e-07
0.00191497
5.63099e-07
0.001915
5.89195e-07
0.00191502
6.16418e-07
0.00191505
6.44803e-07
0.00191507
6.74384e-07
0.0019151
7.05195e-07
0.00191513
7.37269e-07
0.00191516
7.70636e-07
0.00191519
8.05327e-07
0.00191522
8.41369e-07
0.00191525
8.78787e-07
0.00191528
9.17607e-07
0.00191532
9.57844e-07
0.00191535
9.9952e-07
0.00191539
1.04264e-06
0.00191543
1.08722e-06
0.00191547
1.13325e-06
0.00191551
1.18074e-06
0.00191555
1.22965e-06
0.0019156
1.28001e-06
0.00191564
1.33171e-06
0.00191569
1.38482e-06
0.00191574
1.43911e-06
0.00191579
1.49478e-06
0.00191584
1.55134e-06
0.00191589
1.60924e-06
0.00191594
1.6676e-06
0.001916
1.72722e-06
0.00191605
1.78675e-06
0.00191611
1.84727e-06
0.00191617
1.9073e-06
1.96723e-06
0.00196759
6.39634e-08
0.00196759
6.66557e-08
0.00196759
6.94739e-08
0.0019676
7.24242e-08
0.0019676
7.55133e-08
0.0019676
7.87483e-08
0.00196761
8.21364e-08
0.00196761
8.56854e-08
0.00196761
8.94033e-08
0.00196762
9.32986e-08
0.00196762
9.73804e-08
0.00196763
1.01658e-07
0.00196763
1.06141e-07
0.00196764
1.1084e-07
0.00196764
1.15766e-07
0.00196765
1.2093e-07
0.00196766
1.26345e-07
0.00196766
1.32022e-07
0.00196767
1.37974e-07
0.00196767
1.44216e-07
0.00196768
1.50762e-07
0.00196769
1.57628e-07
0.0019677
1.64829e-07
0.0019677
1.72382e-07
0.00196771
1.80304e-07
0.00196772
1.88614e-07
0.00196773
1.9733e-07
0.00196774
2.06472e-07
0.00196775
2.1606e-07
0.00196776
2.26116e-07
0.00196777
2.36662e-07
0.00196778
2.47721e-07
0.00196779
2.59317e-07
0.0019678
2.71474e-07
0.00196782
2.84219e-07
0.00196783
2.97578e-07
0.00196784
3.11579e-07
0.00196786
3.26249e-07
0.00196787
3.41618e-07
0.00196789
3.57717e-07
0.0019679
3.74576e-07
0.00196792
3.92226e-07
0.00196794
4.107e-07
0.00196796
4.30032e-07
0.00196797
4.50254e-07
0.00196799
4.71401e-07
0.00196802
4.93507e-07
0.00196804
5.16608e-07
0.00196806
5.40738e-07
0.00196808
5.65933e-07
0.00196811
5.92227e-07
0.00196813
6.19656e-07
0.00196816
6.48255e-07
0.00196818
6.78056e-07
0.00196821
7.09092e-07
0.00196824
7.41396e-07
0.00196827
7.74998e-07
0.0019683
8.09925e-07
0.00196834
8.46205e-07
0.00196837
8.8386e-07
0.00196841
9.22912e-07
0.00196844
9.63378e-07
0.00196848
1.00527e-06
0.00196852
1.04859e-06
0.00196856
1.09335e-06
0.0019686
1.13955e-06
0.00196864
1.18714e-06
0.00196868
1.23617e-06
0.00196873
1.28651e-06
0.00196878
1.33825e-06
0.00196882
1.39114e-06
0.00196887
1.44537e-06
0.00196892
1.50049e-06
0.00196898
1.55689e-06
0.00196903
1.61374e-06
0.00196909
1.67178e-06
0.00196914
1.72972e-06
0.0019692
1.78855e-06
0.00196926
1.84685e-06
1.90497e-06
0.00202215
6.09775e-08
0.00202215
6.35469e-08
0.00202215
6.62366e-08
0.00202216
6.90527e-08
0.00202216
7.20016e-08
0.00202216
7.50899e-08
0.00202217
7.83247e-08
0.00202217
8.17134e-08
0.00202218
8.52638e-08
0.00202218
8.8984e-08
0.00202218
9.28827e-08
0.00202219
9.69687e-08
0.00202219
1.01252e-07
0.0020222
1.05741e-07
0.0020222
1.10449e-07
0.00202221
1.15384e-07
0.00202222
1.20559e-07
0.00202222
1.25986e-07
0.00202223
1.31677e-07
0.00202223
1.37646e-07
0.00202224
1.43906e-07
0.00202225
1.50473e-07
0.00202226
1.57361e-07
0.00202226
1.64588e-07
0.00202227
1.7217e-07
0.00202228
1.80124e-07
0.00202229
1.88468e-07
0.0020223
1.97222e-07
0.00202231
2.06405e-07
0.00202232
2.16038e-07
0.00202233
2.26143e-07
0.00202234
2.36742e-07
0.00202235
2.47858e-07
0.00202236
2.59515e-07
0.00202238
2.71739e-07
0.00202239
2.84556e-07
0.0020224
2.97991e-07
0.00202242
3.12073e-07
0.00202243
3.26831e-07
0.00202245
3.42294e-07
0.00202246
3.58492e-07
0.00202248
3.75457e-07
0.0020225
3.9322e-07
0.00202252
4.11813e-07
0.00202253
4.31271e-07
0.00202255
4.51626e-07
0.00202257
4.72913e-07
0.0020226
4.95167e-07
0.00202262
5.18422e-07
0.00202264
5.42713e-07
0.00202267
5.68077e-07
0.00202269
5.94546e-07
0.00202272
6.22157e-07
0.00202274
6.50943e-07
0.00202277
6.80937e-07
0.0020228
7.12171e-07
0.00202283
7.44677e-07
0.00202286
7.78482e-07
0.0020229
8.13614e-07
0.00202293
8.50097e-07
0.00202296
8.87952e-07
0.002023
9.27198e-07
0.00202304
9.67845e-07
0.00202308
1.00991e-06
0.00202312
1.05338e-06
0.00202316
1.09827e-06
0.0020232
1.14454e-06
0.00202324
1.19222e-06
0.00202329
1.24119e-06
0.00202334
1.29154e-06
0.00202338
1.34302e-06
0.00202343
1.39583e-06
0.00202349
1.44948e-06
0.00202354
1.50439e-06
0.00202359
1.55972e-06
0.00202365
1.61619e-06
0.0020237
1.67252e-06
0.00202376
1.72967e-06
0.00202382
1.78625e-06
1.84256e-06
0.00207822
5.79936e-08
0.00207822
6.04404e-08
0.00207823
6.30021e-08
0.00207823
6.56843e-08
0.00207823
6.84933e-08
0.00207824
7.14353e-08
0.00207824
7.45173e-08
0.00207825
7.77462e-08
0.00207825
8.11295e-08
0.00207825
8.4675e-08
0.00207826
8.8391e-08
0.00207826
9.22861e-08
0.00207827
9.63694e-08
0.00207827
1.0065e-07
0.00207828
1.05139e-07
0.00207828
1.09846e-07
0.00207829
1.14783e-07
0.0020783
1.1996e-07
0.0020783
1.25391e-07
0.00207831
1.31087e-07
0.00207832
1.37062e-07
0.00207832
1.43331e-07
0.00207833
1.49909e-07
0.00207834
1.56811e-07
0.00207835
1.64053e-07
0.00207835
1.71652e-07
0.00207836
1.79626e-07
0.00207837
1.87993e-07
0.00207838
1.96773e-07
0.00207839
2.05985e-07
0.0020784
2.1565e-07
0.00207841
2.2579e-07
0.00207843
2.36427e-07
0.00207844
2.47586e-07
0.00207845
2.5929e-07
0.00207846
2.71565e-07
0.00207848
2.84437e-07
0.00207849
2.97932e-07
0.0020785
3.1208e-07
0.00207852
3.26908e-07
0.00207854
3.42447e-07
0.00207855
3.58726e-07
0.00207857
3.75778e-07
0.00207859
3.93634e-07
0.00207861
4.12327e-07
0.00207863
4.3189e-07
0.00207865
4.52357e-07
0.00207867
4.73762e-07
0.00207869
4.96141e-07
0.00207871
5.19528e-07
0.00207874
5.43958e-07
0.00207876
5.69465e-07
0.00207879
5.96086e-07
0.00207882
6.23852e-07
0.00207885
6.52799e-07
0.00207887
6.82959e-07
0.0020789
7.14362e-07
0.00207894
7.47038e-07
0.00207897
7.81015e-07
0.002079
8.16319e-07
0.00207904
8.52969e-07
0.00207907
8.90987e-07
0.00207911
9.30384e-07
0.00207915
9.71174e-07
0.00207919
1.01335e-06
0.00207923
1.05693e-06
0.00207927
1.10187e-06
0.00207932
1.14819e-06
0.00207936
1.19579e-06
0.00207941
1.24475e-06
0.00207946
1.29482e-06
0.00207951
1.34618e-06
0.00207956
1.39838e-06
0.00207961
1.4518e-06
0.00207967
1.50561e-06
0.00207972
1.56051e-06
0.00207978
1.61524e-06
0.00207984
1.67071e-06
0.0020799
1.72557e-06
1.78007e-06
0.00213585
5.50039e-08
0.00213585
5.73282e-08
0.00213586
5.97618e-08
0.00213586
6.23102e-08
0.00213586
6.49793e-08
0.00213587
6.77752e-08
0.00213587
7.07044e-08
0.00213587
7.37736e-08
0.00213588
7.699e-08
0.00213588
8.03611e-08
0.00213589
8.38948e-08
0.00213589
8.75993e-08
0.0021359
9.14834e-08
0.0021359
9.55562e-08
0.00213591
9.98273e-08
0.00213591
1.04307e-07
0.00213592
1.09005e-07
0.00213593
1.13934e-07
0.00213593
1.19105e-07
0.00213594
1.24529e-07
0.00213594
1.30221e-07
0.00213595
1.36193e-07
0.00213596
1.4246e-07
0.00213597
1.49038e-07
0.00213598
1.55942e-07
0.00213598
1.63187e-07
0.00213599
1.70792e-07
0.002136
1.78773e-07
0.00213601
1.8715e-07
0.00213602
1.95942e-07
0.00213603
2.05168e-07
0.00213604
2.14851e-07
0.00213605
2.25011e-07
0.00213607
2.35673e-07
0.00213608
2.46858e-07
0.00213609
2.58593e-07
0.00213611
2.70902e-07
0.00213612
2.83812e-07
0.00213613
2.97351e-07
0.00213615
3.11545e-07
0.00213617
3.26425e-07
0.00213618
3.42021e-07
0.0021362
3.58362e-07
0.00213622
3.75481e-07
0.00213624
3.93409e-07
0.00213626
4.1218e-07
0.00213628
4.31827e-07
0.0021363
4.52384e-07
0.00213632
4.73885e-07
0.00213634
4.96366e-07
0.00213637
5.1986e-07
0.00213639
5.44404e-07
0.00213642
5.70031e-07
0.00213645
5.96775e-07
0.00213647
6.24672e-07
0.0021365
6.53752e-07
0.00213653
6.84049e-07
0.00213657
7.15592e-07
0.0021366
7.48409e-07
0.00213663
7.82527e-07
0.00213667
8.17968e-07
0.0021367
8.54752e-07
0.00213674
8.92892e-07
0.00213678
9.32404e-07
0.00213682
9.73282e-07
0.00213686
1.01554e-06
0.0021369
1.05914e-06
0.00213695
1.10411e-06
0.00213699
1.15034e-06
0.00213704
1.1979e-06
0.00213709
1.24656e-06
0.00213714
1.29649e-06
0.00213719
1.34724e-06
0.00213724
1.39917e-06
0.0021373
1.45148e-06
0.00213735
1.50482e-06
0.00213741
1.55797e-06
0.00213747
1.61178e-06
0.00213753
1.66492e-06
1.71763e-06
0.00219508
5.20054e-08
0.00219508
5.42072e-08
0.00219508
5.65127e-08
0.00219509
5.89273e-08
0.00219509
6.14566e-08
0.0021951
6.41064e-08
0.0021951
6.68829e-08
0.0021951
6.97925e-08
0.00219511
7.28422e-08
0.00219511
7.60389e-08
0.00219512
7.93903e-08
0.00219512
8.29044e-08
0.00219513
8.65893e-08
0.00219513
9.04539e-08
0.00219514
9.45075e-08
0.00219514
9.87595e-08
0.00219515
1.0322e-07
0.00219515
1.079e-07
0.00219516
1.12811e-07
0.00219517
1.17964e-07
0.00219517
1.23372e-07
0.00219518
1.29048e-07
0.00219519
1.35006e-07
0.0021952
1.4126e-07
0.0021952
1.47826e-07
0.00219521
1.54718e-07
0.00219522
1.61954e-07
0.00219523
1.69551e-07
0.00219524
1.77526e-07
0.00219525
1.85898e-07
0.00219526
1.94687e-07
0.00219527
2.03913e-07
0.00219528
2.13597e-07
0.00219529
2.23762e-07
0.00219531
2.3443e-07
0.00219532
2.45625e-07
0.00219533
2.57373e-07
0.00219535
2.69699e-07
0.00219536
2.82629e-07
0.00219538
2.9619e-07
0.00219539
3.10412e-07
0.00219541
3.25324e-07
0.00219543
3.40955e-07
0.00219545
3.57337e-07
0.00219546
3.74501e-07
0.00219548
3.9248e-07
0.0021955
4.11307e-07
0.00219553
4.31015e-07
0.00219555
4.51638e-07
0.00219557
4.73211e-07
0.0021956
4.95769e-07
0.00219562
5.19347e-07
0.00219565
5.43979e-07
0.00219567
5.69699e-07
0.0021957
5.96542e-07
0.00219573
6.24542e-07
0.00219576
6.53729e-07
0.00219579
6.84135e-07
0.00219583
7.15789e-07
0.00219586
7.48718e-07
0.00219589
7.82945e-07
0.00219593
8.18492e-07
0.00219597
8.55372e-07
0.00219601
8.93603e-07
0.00219605
9.33181e-07
0.00219609
9.7412e-07
0.00219613
1.01638e-06
0.00219618
1.06e-06
0.00219622
1.10486e-06
0.00219627
1.15103e-06
0.00219632
1.1983e-06
0.00219637
1.24681e-06
0.00219642
1.29612e-06
0.00219647
1.34659e-06
0.00219652
1.39741e-06
0.00219658
1.44922e-06
0.00219664
1.5008e-06
0.0021967
1.55299e-06
0.00219676
1.60443e-06
1.65535e-06
0.00225595
4.89821e-08
0.00225595
5.10607e-08
0.00225596
5.32375e-08
0.00225596
5.55178e-08
0.00225596
5.79068e-08
0.00225597
6.041e-08
0.00225597
6.30333e-08
0.00225597
6.5783e-08
0.00225598
6.86655e-08
0.00225598
7.16876e-08
0.00225599
7.48566e-08
0.00225599
7.81799e-08
0.002256
8.16657e-08
0.002256
8.53221e-08
0.00225601
8.91581e-08
0.00225601
9.31829e-08
0.00225602
9.74062e-08
0.00225602
1.01838e-07
0.00225603
1.0649e-07
0.00225604
1.11372e-07
0.00225604
1.16497e-07
0.00225605
1.21877e-07
0.00225606
1.27526e-07
0.00225607
1.33457e-07
0.00225607
1.39685e-07
0.00225608
1.46225e-07
0.00225609
1.53093e-07
0.0022561
1.60305e-07
0.00225611
1.67879e-07
0.00225612
1.75833e-07
0.00225613
1.84185e-07
0.00225614
1.92955e-07
0.00225615
2.02164e-07
0.00225617
2.11834e-07
0.00225618
2.21986e-07
0.00225619
2.32643e-07
0.00225621
2.4383e-07
0.00225622
2.55572e-07
0.00225623
2.67894e-07
0.00225625
2.80824e-07
0.00225627
2.94389e-07
0.00225628
3.08618e-07
0.0022563
3.2354e-07
0.00225632
3.39186e-07
0.00225634
3.55586e-07
0.00225636
3.72773e-07
0.00225638
3.90779e-07
0.0022564
4.09638e-07
0.00225642
4.29383e-07
0.00225644
4.50049e-07
0.00225647
4.7167e-07
0.00225649
4.9428e-07
0.00225652
5.17916e-07
0.00225655
5.4261e-07
0.00225657
5.68399e-07
0.0022566
5.95315e-07
0.00225663
6.23391e-07
0.00225667
6.52658e-07
0.0022567
6.83147e-07
0.00225673
7.14885e-07
0.00225677
7.47897e-07
0.0022568
7.82205e-07
0.00225684
8.17826e-07
0.00225688
8.54777e-07
0.00225692
8.93055e-07
0.00225696
9.32678e-07
0.002257
9.7361e-07
0.00225705
1.01588e-06
0.00225709
1.05938e-06
0.00225714
1.10418e-06
0.00225719
1.15006e-06
0.00225724
1.19717e-06
0.00225729
1.24508e-06
0.00225734
1.29411e-06
0.0022574
1.34348e-06
0.00225745
1.3938e-06
0.00225751
1.44385e-06
0.00225757
1.49444e-06
0.00225763
1.54421e-06
1.59339e-06
0.00231851
4.59367e-08
0.00231851
4.78919e-08
0.00231852
4.994e-08
0.00231852
5.20857e-08
0.00231852
5.43341e-08
0.00231853
5.66905e-08
0.00231853
5.91605e-08
0.00231853
6.17498e-08
0.00231854
6.44649e-08
0.00231854
6.7312e-08
0.00231855
7.02981e-08
0.00231855
7.34304e-08
0.00231856
7.67164e-08
0.00231856
8.01642e-08
0.00231857
8.37821e-08
0.00231857
8.7579e-08
0.00231858
9.15642e-08
0.00231858
9.57473e-08
0.00231859
1.00139e-07
0.0023186
1.04749e-07
0.0023186
1.0959e-07
0.00231861
1.14674e-07
0.00231862
1.20013e-07
0.00231863
1.25621e-07
0.00231864
1.31512e-07
0.00231864
1.37699e-07
0.00231865
1.44199e-07
0.00231866
1.51028e-07
0.00231867
1.582e-07
0.00231868
1.65735e-07
0.00231869
1.73651e-07
0.0023187
1.81966e-07
0.00231871
1.907e-07
0.00231873
1.99873e-07
0.00231874
2.09509e-07
0.00231875
2.19628e-07
0.00231877
2.30255e-07
0.00231878
2.41413e-07
0.00231879
2.53129e-07
0.00231881
2.65427e-07
0.00231883
2.78335e-07
0.00231884
2.91881e-07
0.00231886
3.06094e-07
0.00231888
3.21003e-07
0.0023189
3.36639e-07
0.00231892
3.53034e-07
0.00231894
3.7022e-07
0.00231896
3.88229e-07
0.00231898
4.07095e-07
0.002319
4.26853e-07
0.00231903
4.47536e-07
0.00231905
4.69179e-07
0.00231908
4.91817e-07
0.00231911
5.15485e-07
0.00231914
5.40218e-07
0.00231916
5.6605e-07
0.0023192
5.93014e-07
0.00231923
6.21142e-07
0.00231926
6.50465e-07
0.00231929
6.81013e-07
0.00231933
7.12809e-07
0.00231936
7.45882e-07
0.0023194
7.80244e-07
0.00231944
8.15919e-07
0.00231948
8.52903e-07
0.00231952
8.91218e-07
0.00231957
9.30828e-07
0.00231961
9.71763e-07
0.00231965
1.01392e-06
0.0023197
1.05737e-06
0.00231975
1.10189e-06
0.0023198
1.14764e-06
0.00231985
1.19417e-06
0.0023199
1.24181e-06
0.00231996
1.28978e-06
0.00232001
1.33866e-06
0.00232007
1.38723e-06
0.00232013
1.43629e-06
0.00232019
1.48444e-06
1.5319e-06
0.0023828
4.28318e-08
0.00238281
4.4662e-08
0.00238281
4.65796e-08
0.00238281
4.85893e-08
0.00238282
5.06957e-08
0.00238282
5.29039e-08
0.00238283
5.52191e-08
0.00238283
5.7647e-08
0.00238283
6.01935e-08
0.00238284
6.28647e-08
0.00238284
6.56671e-08
0.00238285
6.86076e-08
0.00238285
7.16934e-08
0.00238286
7.49322e-08
0.00238286
7.83319e-08
0.00238287
8.19009e-08
0.00238287
8.56481e-08
0.00238288
8.95828e-08
0.00238289
9.37149e-08
0.00238289
9.80545e-08
0.0023829
1.02613e-07
0.00238291
1.07401e-07
0.00238292
1.12431e-07
0.00238292
1.17716e-07
0.00238293
1.23269e-07
0.00238294
1.29105e-07
0.00238295
1.35237e-07
0.00238296
1.41682e-07
0.00238297
1.48454e-07
0.00238298
1.55571e-07
0.00238299
1.63051e-07
0.002383
1.70911e-07
0.00238301
1.7917e-07
0.00238302
1.8785e-07
0.00238304
1.9697e-07
0.00238305
2.06552e-07
0.00238306
2.16619e-07
0.00238308
2.27195e-07
0.00238309
2.38303e-07
0.00238311
2.49971e-07
0.00238312
2.62222e-07
0.00238314
2.75086e-07
0.00238316
2.8859e-07
0.00238318
3.02764e-07
0.0023832
3.17637e-07
0.00238322
3.3324e-07
0.00238324
3.49606e-07
0.00238326
3.66766e-07
0.00238328
3.84753e-07
0.0023833
4.03602e-07
0.00238333
4.23347e-07
0.00238335
4.44022e-07
0.00238338
4.65663e-07
0.00238341
4.88304e-07
0.00238343
5.11982e-07
0.00238346
5.36729e-07
0.00238349
5.62581e-07
0.00238353
5.8957e-07
0.00238356
6.17728e-07
0.00238359
6.47087e-07
0.00238363
6.77672e-07
0.00238366
7.09511e-07
0.0023837
7.42621e-07
0.00238374
7.77025e-07
0.00238378
8.12725e-07
0.00238382
8.49743e-07
0.00238386
8.88046e-07
0.00238391
9.27667e-07
0.00238395
9.68507e-07
0.002384
1.01064e-06
0.00238405
1.05383e-06
0.0023841
1.09826e-06
0.00238415
1.14346e-06
0.0023842
1.18978e-06
0.00238425
1.2364e-06
0.00238431
1.28393e-06
0.00238436
1.33109e-06
0.00238442
1.37871e-06
0.00238448
1.42529e-06
1.47109e-06
0.00244888
3.96962e-08
0.00244889
4.14014e-08
0.00244889
4.31886e-08
0.00244889
4.5062e-08
0.0024489
4.70262e-08
0.0024489
4.90858e-08
0.00244891
5.1246e-08
0.00244891
5.35119e-08
0.00244891
5.58892e-08
0.00244892
5.83836e-08
0.00244892
6.10014e-08
0.00244893
6.3749e-08
0.00244893
6.66334e-08
0.00244894
6.96616e-08
0.00244894
7.28414e-08
0.00244895
7.61806e-08
0.00244896
7.96877e-08
0.00244896
8.33715e-08
0.00244897
8.72414e-08
0.00244897
9.13072e-08
0.00244898
9.5579e-08
0.00244899
1.00069e-07
0.002449
1.04789e-07
0.002449
1.0975e-07
0.00244901
1.14965e-07
0.00244902
1.20447e-07
0.00244903
1.2621e-07
0.00244904
1.3227e-07
0.00244905
1.3864e-07
0.00244906
1.45338e-07
0.00244907
1.5238e-07
0.00244908
1.59784e-07
0.00244909
1.67568e-07
0.00244911
1.75751e-07
0.00244912
1.84354e-07
0.00244913
1.93398e-07
0.00244915
2.02904e-07
0.00244916
2.12896e-07
0.00244917
2.23397e-07
0.00244919
2.34431e-07
0.00244921
2.46025e-07
0.00244922
2.58206e-07
0.00244924
2.71e-07
0.00244926
2.84437e-07
0.00244928
2.98545e-07
0.0024493
3.13355e-07
0.00244932
3.28899e-07
0.00244934
3.45208e-07
0.00244936
3.62316e-07
0.00244939
3.80256e-07
0.00244941
3.99061e-07
0.00244944
4.18768e-07
0.00244946
4.39411e-07
0.00244949
4.61025e-07
0.00244952
4.83646e-07
0.00244955
5.0731e-07
0.00244958
5.3205e-07
0.00244961
5.57902e-07
0.00244964
5.84898e-07
0.00244968
6.13071e-07
0.00244971
6.42448e-07
0.00244975
6.7306e-07
0.00244979
7.04925e-07
0.00244982
7.3807e-07
0.00244986
7.72498e-07
0.00244991
8.08236e-07
0.00244995
8.45252e-07
0.00244999
8.83585e-07
0.00245004
9.23136e-07
0.00245008
9.63988e-07
0.00245013
1.0059e-06
0.00245018
1.04907e-06
0.00245023
1.093e-06
0.00245028
1.13809e-06
0.00245034
1.18344e-06
0.00245039
1.22973e-06
0.00245045
1.27559e-06
0.0024505
1.32187e-06
0.00245056
1.367e-06
1.41122e-06
0.0025168
3.64289e-08
0.0025168
3.80058e-08
0.0025168
3.96595e-08
0.00251681
4.13938e-08
0.00251681
4.3213e-08
0.00251681
4.51216e-08
0.00251682
4.71243e-08
0.00251682
4.92262e-08
0.00251683
5.14326e-08
0.00251683
5.37488e-08
0.00251684
5.61808e-08
0.00251684
5.87348e-08
0.00251685
6.14173e-08
0.00251685
6.4235e-08
0.00251686
6.71953e-08
0.00251686
7.03056e-08
0.00251687
7.35741e-08
0.00251688
7.70091e-08
0.00251688
8.06195e-08
0.00251689
8.44147e-08
0.0025169
8.84045e-08
0.0025169
9.25983e-08
0.00251691
9.70078e-08
0.00251692
1.01645e-07
0.00251693
1.06522e-07
0.00251694
1.11652e-07
0.00251695
1.17047e-07
0.00251696
1.22722e-07
0.00251697
1.28692e-07
0.00251698
1.34971e-07
0.00251699
1.41577e-07
0.002517
1.48525e-07
0.00251701
1.55834e-07
0.00251702
1.63523e-07
0.00251704
1.7161e-07
0.00251705
1.80116e-07
0.00251706
1.89062e-07
0.00251708
1.98471e-07
0.00251709
2.08365e-07
0.00251711
2.18768e-07
0.00251712
2.29705e-07
0.00251714
2.41203e-07
0.00251716
2.53287e-07
0.00251718
2.65987e-07
0.0025172
2.79331e-07
0.00251722
2.93349e-07
0.00251724
3.08071e-07
0.00251726
3.2353e-07
0.00251728
3.39758e-07
0.0025173
3.56788e-07
0.00251733
3.74655e-07
0.00251735
3.93393e-07
0.00251738
4.13038e-07
0.00251741
4.33626e-07
0.00251744
4.55192e-07
0.00251747
4.77772e-07
0.0025175
5.01403e-07
0.00251753
5.2612e-07
0.00251756
5.51957e-07
0.0025176
5.78948e-07
0.00251763
6.07123e-07
0.00251767
6.36515e-07
0.00251771
6.67145e-07
0.00251774
6.99044e-07
0.00251778
7.32216e-07
0.00251783
7.66694e-07
0.00251787
8.02448e-07
0.00251791
8.39526e-07
0.00251796
8.77826e-07
0.00251801
9.17447e-07
0.00251805
9.5814e-07
0.0025181
1.00012e-06
0.00251815
1.04287e-06
0.0025182
1.08682e-06
0.00251826
1.13103e-06
0.00251831
1.17622e-06
0.00251836
1.2209e-06
0.00251842
1.26604e-06
0.00251848
1.30981e-06
1.35257e-06
0.0025866
3.31549e-08
0.0025866
3.46048e-08
0.0025866
3.61256e-08
0.00258661
3.77212e-08
0.00258661
3.93956e-08
0.00258662
4.11531e-08
0.00258662
4.29982e-08
0.00258662
4.49353e-08
0.00258663
4.69696e-08
0.00258663
4.91061e-08
0.00258664
5.13505e-08
0.00258664
5.37084e-08
0.00258665
5.61861e-08
0.00258665
5.87898e-08
0.00258666
6.15265e-08
0.00258666
6.44031e-08
0.00258667
6.74274e-08
0.00258668
7.0607e-08
0.00258668
7.39506e-08
0.00258669
7.74667e-08
0.0025867
8.11646e-08
0.00258671
8.50567e-08
0.00258671
8.91528e-08
0.00258672
9.34627e-08
0.00258673
9.79982e-08
0.00258674
1.02771e-07
0.00258675
1.07795e-07
0.00258676
1.13081e-07
0.00258677
1.18646e-07
0.00258678
1.24503e-07
0.00258679
1.30668e-07
0.0025868
1.37157e-07
0.00258681
1.43987e-07
0.00258682
1.51176e-07
0.00258684
1.58743e-07
0.00258685
1.66707e-07
0.00258687
1.75088e-07
0.00258688
1.83909e-07
0.00258689
1.93191e-07
0.00258691
2.02958e-07
0.00258693
2.13234e-07
0.00258694
2.24045e-07
0.00258696
2.35416e-07
0.00258698
2.47375e-07
0.002587
2.59951e-07
0.00258702
2.73172e-07
0.00258704
2.87069e-07
0.00258706
3.01674e-07
0.00258709
3.1702e-07
0.00258711
3.33138e-07
0.00258713
3.50063e-07
0.00258716
3.67831e-07
0.00258719
3.86477e-07
0.00258721
4.06037e-07
0.00258724
4.26548e-07
0.00258727
4.48046e-07
0.0025873
4.70569e-07
0.00258734
4.94153e-07
0.00258737
5.18835e-07
0.0025874
5.44651e-07
0.00258744
5.71632e-07
0.00258747
5.99814e-07
0.00258751
6.29222e-07
0.00258755
6.59891e-07
0.00258759
6.91827e-07
0.00258763
7.25071e-07
0.00258768
7.59595e-07
0.00258772
7.95458e-07
0.00258777
8.32555e-07
0.00258781
8.71005e-07
0.00258786
9.10546e-07
0.00258791
9.51431e-07
0.00258796
9.93102e-07
0.00258801
1.03606e-06
0.00258806
1.07926e-06
0.00258811
1.12357e-06
0.00258817
1.16727e-06
0.00258822
1.21151e-06
0.00258828
1.25419e-06
1.29571e-06
0.00265833
2.95831e-08
0.00265833
3.09008e-08
0.00265834
3.22848e-08
0.00265834
3.37383e-08
0.00265835
3.5265e-08
0.00265835
3.68691e-08
0.00265835
3.85545e-08
0.00265836
4.03258e-08
0.00265836
4.21875e-08
0.00265837
4.41445e-08
0.00265837
4.62021e-08
0.00265838
4.83657e-08
0.00265839
5.0641e-08
0.00265839
5.30341e-08
0.0026584
5.55514e-08
0.0026584
5.81998e-08
0.00265841
6.09862e-08
0.00265842
6.39184e-08
0.00265842
6.70042e-08
0.00265843
7.02521e-08
0.00265844
7.3671e-08
0.00265845
7.72671e-08
0.00265845
8.10517e-08
0.00265846
8.50366e-08
0.00265847
8.92327e-08
0.00265848
9.36514e-08
0.00265849
9.83049e-08
0.0026585
1.03206e-07
0.00265851
1.08368e-07
0.00265852
1.13804e-07
0.00265853
1.19531e-07
0.00265854
1.25562e-07
0.00265856
1.31916e-07
0.00265857
1.38607e-07
0.00265858
1.45656e-07
0.00265859
1.5308e-07
0.00265861
1.60899e-07
0.00265862
1.69134e-07
0.00265864
1.77806e-07
0.00265865
1.86939e-07
0.00265867
1.96555e-07
0.00265869
2.0668e-07
0.00265871
2.17339e-07
0.00265873
2.28558e-07
0.00265875
2.40367e-07
0.00265877
2.52793e-07
0.00265879
2.65866e-07
0.00265881
2.79618e-07
0.00265883
2.94082e-07
0.00265886
3.09289e-07
0.00265888
3.25274e-07
0.00265891
3.42073e-07
0.00265893
3.59721e-07
0.00265896
3.78256e-07
0.00265899
3.97713e-07
0.00265902
4.18132e-07
0.00265905
4.39551e-07
0.00265908
4.62008e-07
0.00265912
4.85541e-07
0.00265915
5.10188e-07
0.00265919
5.35985e-07
0.00265922
5.6297e-07
0.00265926
5.91171e-07
0.0026593
6.20628e-07
0.00265934
6.51353e-07
0.00265938
6.83391e-07
0.00265943
7.1672e-07
0.00265947
7.51412e-07
0.00265951
7.87359e-07
0.00265956
8.24708e-07
0.00265961
8.63178e-07
0.00265966
9.03079e-07
0.00265971
9.4379e-07
0.00265976
9.85938e-07
0.00265981
1.0283e-06
0.00265986
1.07201e-06
0.00265991
1.11495e-06
0.00265996
1.15872e-06
0.00266002
1.20038e-06
1.24096e-06
0.00273207
2.61463e-08
0.00273207
2.73346e-08
0.00273207
2.85829e-08
0.00273208
2.98948e-08
0.00273208
3.12738e-08
0.00273209
3.27235e-08
0.00273209
3.42477e-08
0.00273209
3.58506e-08
0.0027321
3.75364e-08
0.0027321
3.93096e-08
0.00273211
4.1175e-08
0.00273211
4.31377e-08
0.00273212
4.52029e-08
0.00273213
4.73762e-08
0.00273213
4.96637e-08
0.00273214
5.20715e-08
0.00273214
5.46061e-08
0.00273215
5.72747e-08
0.00273216
6.00844e-08
0.00273216
6.30429e-08
0.00273217
6.61584e-08
0.00273218
6.94453e-08
0.00273219
7.29111e-08
0.0027322
7.65633e-08
0.00273221
8.04123e-08
0.00273221
8.44689e-08
0.00273222
8.87447e-08
0.00273223
9.32517e-08
0.00273224
9.80026e-08
0.00273226
1.03011e-07
0.00273227
1.08291e-07
0.00273228
1.13857e-07
0.00273229
1.19725e-07
0.0027323
1.25911e-07
0.00273232
1.32433e-07
0.00273233
1.39309e-07
0.00273234
1.46557e-07
0.00273236
1.54198e-07
0.00273238
1.62253e-07
0.00273239
1.70744e-07
0.00273241
1.79693e-07
0.00273243
1.89125e-07
0.00273244
1.99064e-07
0.00273246
2.09538e-07
0.00273248
2.20573e-07
0.0027325
2.32197e-07
0.00273252
2.44441e-07
0.00273255
2.57336e-07
0.00273257
2.70913e-07
0.00273259
2.85205e-07
0.00273262
3.00247e-07
0.00273265
3.16074e-07
0.00273267
3.32723e-07
0.0027327
3.50231e-07
0.00273273
3.68636e-07
0.00273276
3.87977e-07
0.00273279
4.08294e-07
0.00273282
4.29627e-07
0.00273286
4.52017e-07
0.00273289
4.75504e-07
0.00273293
5.00126e-07
0.00273296
5.25927e-07
0.002733
5.52937e-07
0.00273304
5.81202e-07
0.00273308
6.1074e-07
0.00273312
6.41604e-07
0.00273317
6.73777e-07
0.00273321
7.07345e-07
0.00273326
7.42202e-07
0.0027333
7.78524e-07
0.00273335
8.16014e-07
0.0027334
8.5505e-07
0.00273345
8.94944e-07
0.0027335
9.36479e-07
0.00273355
9.78241e-07
0.0027336
1.02168e-06
0.00273365
1.06424e-06
0.0027337
1.10808e-06
0.00273375
1.14963e-06
1.19009e-06
0.00280784
2.20847e-08
0.00280784
2.31476e-08
0.00280785
2.42662e-08
0.00280785
2.54433e-08
0.00280786
2.66819e-08
0.00280786
2.79853e-08
0.00280787
2.93572e-08
0.00280787
3.08013e-08
0.00280788
3.23215e-08
0.00280788
3.3922e-08
0.00280789
3.56074e-08
0.00280789
3.73822e-08
0.0028079
3.92514e-08
0.00280791
4.12204e-08
0.00280791
4.32947e-08
0.00280792
4.54802e-08
0.00280793
4.77834e-08
0.00280793
5.02109e-08
0.00280794
5.27698e-08
0.00280795
5.5468e-08
0.00280796
5.83137e-08
0.00280796
6.13065e-08
0.00280797
6.44589e-08
0.00280798
6.77841e-08
0.00280799
7.12917e-08
0.002808
7.4992e-08
0.00280801
7.88959e-08
0.00280802
8.30148e-08
0.00280803
8.73608e-08
0.00280804
9.19466e-08
0.00280805
9.67856e-08
0.00280807
1.01892e-07
0.00280808
1.07281e-07
0.00280809
1.12968e-07
0.0028081
1.18969e-07
0.00280812
1.25302e-07
0.00280813
1.31985e-07
0.00280815
1.39038e-07
0.00280816
1.46481e-07
0.00280818
1.54334e-07
0.0028082
1.62621e-07
0.00280821
1.71365e-07
0.00280823
1.80589e-07
0.00280825
1.90321e-07
0.00280827
2.00586e-07
0.00280829
2.11413e-07
0.00280831
2.22831e-07
0.00280834
2.34871e-07
0.00280836
2.47564e-07
0.00280838
2.60944e-07
0.00280841
2.75045e-07
0.00280844
2.89903e-07
0.00280846
3.05554e-07
0.00280849
3.22038e-07
0.00280852
3.39392e-07
0.00280855
3.57659e-07
0.00280858
3.76877e-07
0.00280862
3.97091e-07
0.00280865
4.18342e-07
0.00280868
4.40675e-07
0.00280872
4.64131e-07
0.00280876
4.88756e-07
0.0028088
5.14588e-07
0.00280883
5.41677e-07
0.00280888
5.70048e-07
0.00280892
5.99762e-07
0.00280896
6.30812e-07
0.002809
6.63293e-07
0.00280905
6.97115e-07
0.0028091
7.3247e-07
0.00280914
7.69074e-07
0.00280919
8.07346e-07
0.00280924
8.46582e-07
0.00280929
8.87695e-07
0.00280934
9.29118e-07
0.00280939
9.72713e-07
0.00280943
1.01528e-06
0.00280948
1.06012e-06
0.00280953
1.10111e-06
1.14303e-06
0.00288574
0.00288574
0.00288575
0.00288575
0.00288576
0.00288576
0.00288576
0.00288577
0.00288577
0.00288578
0.00288578
0.00288579
0.00288579
0.0028858
0.00288581
0.00288581
0.00288582
0.00288582
0.00288583
0.00288584
0.00288585
0.00288585
0.00288586
0.00288587
0.00288588
0.00288589
0.0028859
0.00288591
0.00288592
0.00288593
0.00288594
0.00288595
0.00288597
0.00288598
0.00288599
0.00288601
0.00288602
0.00288603
0.00288605
0.00288607
0.00288608
0.0028861
0.00288612
0.00288614
0.00288616
0.00288618
0.0028862
0.00288622
0.00288625
0.00288627
0.0028863
0.00288632
0.00288635
0.00288638
0.00288641
0.00288644
0.00288647
0.0028865
0.00288654
0.00288657
0.00288661
0.00288665
0.00288669
0.00288673
0.00288677
0.00288681
0.00288685
0.0028869
0.00288694
0.00288699
0.00288703
0.00288708
0.00288713
0.00288718
0.00288723
0.00288728
0.00288732
0.00288737
0.00288741
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<scalar>
100
(
-0.000192367
-0.000197702
-0.000203184
-0.000208819
-0.00021461
-0.000220561
-0.000226678
-0.000232964
-0.000239425
-0.000246064
-0.000252888
-0.000259901
-0.000267108
-0.000274516
-0.000282128
-0.000289952
-0.000297993
-0.000306257
-0.00031475
-0.000323478
-0.000332449
-0.000341668
-0.000351143
-0.000360881
-0.000370889
-0.000381174
-0.000391745
-0.000402609
-0.000413774
-0.000425248
-0.000437041
-0.000449161
-0.000461617
-0.000474418
-0.000487575
-0.000501096
-0.000514992
-0.000529274
-0.000543951
-0.000559036
-0.000574539
-0.000590472
-0.000606846
-0.000623675
-0.000640971
-0.000658746
-0.000677014
-0.000695789
-0.000715084
-0.000734914
-0.000755295
-0.00077624
-0.000797767
-0.00081989
-0.000842627
-0.000865994
-0.00089001
-0.000914691
-0.000940057
-0.000966126
-0.000992918
-0.00102045
-0.00104875
-0.00107784
-0.00110773
-0.00113844
-0.00117002
-0.00120246
-0.00123581
-0.00127008
-0.0013053
-0.0013415
-0.0013787
-0.00141693
-0.00145623
-0.00149661
-0.00153812
-0.00158077
-0.00162461
-0.00166966
-0.00171596
-0.00176355
-0.00181245
-0.00186272
-0.00191437
-0.00196746
-0.00202202
-0.0020781
-0.00213573
-0.00219495
-0.00225582
-0.00231838
-0.00238267
-0.00244875
-0.00251665
-0.00258645
-0.00265817
-0.00273189
-0.00280765
-0.00288551
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
100
(
0.000155258
0.000178404
0.00018985
0.000198688
0.000206469
0.000213794
0.000220931
0.000228016
0.000235127
0.000242311
0.000249602
0.000257021
0.000264588
0.000272317
0.000280221
0.000288308
0.000296591
0.000305077
0.000313775
0.000322694
0.00033184
0.000341224
0.000350851
0.000360731
0.000370871
0.000381279
0.000391964
0.000402934
0.000414197
0.000425763
0.00043764
0.000449838
0.000462365
0.000475232
0.000488449
0.000502025
0.000515972
0.0005303
0.000545021
0.000560145
0.000575685
0.000591652
0.000608059
0.000624918
0.000642242
0.000660045
0.00067834
0.00069714
0.00071646
0.000736315
0.000756719
0.000777688
0.000799237
0.000821383
0.000844142
0.00086753
0.000891566
0.000916268
0.000941653
0.000967742
0.000994553
0.00102211
0.00105042
0.00107952
0.00110943
0.00114016
0.00117175
0.00120421
0.00123757
0.00127185
0.00130708
0.00134329
0.0013805
0.00141875
0.00145805
0.00149844
0.00153995
0.00158261
0.00162645
0.00167151
0.00171782
0.00176541
0.00181431
0.00186458
0.00191624
0.00196933
0.00202389
0.00207996
0.00213759
0.00219682
0.00225769
0.00232025
0.00238454
0.00245062
0.00251854
0.00258833
0.00266007
0.0027338
0.00280958
0.00288745
)
;
}
wall
{
type calculated;
value nonuniform List<scalar>
100
(
0
7.54782e-09
1.57214e-08
2.27302e-08
2.81853e-08
3.21295e-08
3.47107e-08
3.61105e-08
3.65242e-08
3.61443e-08
3.515e-08
3.37011e-08
3.19353e-08
2.99676e-08
2.7904e-08
2.58626e-08
2.38061e-08
2.17874e-08
1.98441e-08
1.79995e-08
1.8669e-08
1.96075e-08
2.05948e-08
2.16343e-08
2.27287e-08
2.38811e-08
2.50945e-08
2.63723e-08
2.77181e-08
2.91354e-08
3.06283e-08
3.22009e-08
3.38575e-08
3.56028e-08
3.74418e-08
3.93797e-08
4.1422e-08
4.35746e-08
4.5844e-08
4.82367e-08
5.07601e-08
5.3435e-08
5.62654e-08
5.92545e-08
6.24113e-08
6.57456e-08
6.92676e-08
7.29879e-08
7.6918e-08
8.107e-08
8.54566e-08
9.00913e-08
9.49882e-08
1.00162e-07
1.0563e-07
1.11406e-07
1.17511e-07
1.23961e-07
1.30776e-07
1.37978e-07
1.45587e-07
1.53626e-07
1.6212e-07
1.71093e-07
1.80572e-07
1.90584e-07
2.01159e-07
2.12327e-07
2.24119e-07
2.3657e-07
2.49713e-07
2.63584e-07
2.78221e-07
2.93664e-07
3.09951e-07
3.27126e-07
3.45231e-07
3.6431e-07
3.84409e-07
4.05575e-07
4.27853e-07
4.51293e-07
4.7594e-07
5.01848e-07
5.29052e-07
5.57618e-07
5.87556e-07
6.18966e-07
6.51785e-07
6.86205e-07
7.21994e-07
7.59561e-07
7.9829e-07
8.39093e-07
8.80513e-07
9.24538e-07
9.67964e-07
1.01496e-06
1.05877e-06
1.10635e-06
)
;
}
center
{
type symmetry;
value uniform 0;
}
plate
{
type calculated;
value uniform 0;
}
defaultFaces
{
type empty;
value nonuniform 0();
}
}
// ************************************************************************* //
| [
"[email protected]"
] | ||
a4b6951e292a0705dfc8529ae56d22bc23702f06 | 4aad3dadb1f630ec091d98f748f79bd379f5d479 | /SDLAppTest/main.cpp | 2b120483443eb0cc99ca9a194d27330c31aa15e3 | [] | no_license | eriksvedang/SDLAppTest | 9e3b186d8d94fc408ab5f2dbbaad39c653a0b78e | 60abf0c4eaf71a0b7754cc31e8af4cb135b1c990 | refs/heads/master | 2021-03-12T19:36:48.977873 | 2015-04-29T07:19:47 | 2015-04-29T07:19:47 | 33,505,311 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,191 | cpp | #include <iostream>
#include <GL/glew.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "Boilerplate.h"
#include "ShaderLoader.h"
#include "ResourcePath.h"
#include "VboHelper.h"
void game3() {
Boilerplate::App app = Boilerplate::start(480, 480, "Game 3");
GLuint program = ShaderLoader::createProgram(getResourcePath("triangle.v", "glsl"),
getResourcePath("triangle.f", "glsl"));
float data[] = {
-0.8, 0.8, 0, 1, 0, 1,
0.8, 0.9, 0, 1, 1, 0,
0.0, -0.8, 0, 0, 1, 1,
-0.7, -0.7, 0, 1, 0, 1,
0.7, -0.7, 0, 1, 1, 0,
0.0, 0.7, 0, 0, 1, 1
};
float data2[] = {
-0.2, 0.8, 0, 1, 0, 1,
0.8, 0.2, 0, 1, 1, 0,
0.0, -0.8, 0, 0, 1, 1,
-0.7, -0.7, 0, 1, 0, 1,
0.2, -0.7, 0, 1, 1, 0,
0.0, 0.2, 0, 0, 1, 1
};
GLuint vao1, vao2;
glGenVertexArrays(1, &vao1);
glGenVertexArrays(1, &vao2);
glBindVertexArray(vao1);
GLuint vbo = VboHelper::makeVbo(sizeof(data), data);
GLint attribute_coord3d = ShaderLoader::getAttribute(program, "coord3d");
GLint attribute_color = ShaderLoader::getAttribute(program, "v_color");
GLint uniform_translate = glGetUniformLocation(program, "translate");
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glEnableVertexAttribArray(attribute_coord3d);
glEnableVertexAttribArray(attribute_color);
glVertexAttribPointer(attribute_coord3d, 3, GL_FLOAT, GL_FALSE,
sizeof(float) * 6, 0);
glVertexAttribPointer(attribute_color, 3, GL_FLOAT, GL_FALSE,
sizeof(float) * 6, (GLvoid*)(sizeof(float) * 3));
// VAO 2
glBindVertexArray(vao2);
GLuint vbo2 = VboHelper::makeVbo(sizeof(data2), data2);
glBindBuffer(GL_ARRAY_BUFFER, vbo2);
glEnableVertexAttribArray(attribute_coord3d);
glEnableVertexAttribArray(attribute_color);
glVertexAttribPointer(attribute_coord3d, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 6, 0);
glVertexAttribPointer(attribute_color, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 6, (GLvoid*)(sizeof(float) * 3));
//glDisableVertexAttribArray(attribute_coord3d);
//glDisableVertexAttribArray(attribute_color);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glClearColor(0.9, 1.0, 0.98, 1.0);
app.render = [&]() {
glUseProgram(program);
glClear(GL_COLOR_BUFFER_BIT);
glBindVertexArray(vao1);
glUniform3f(uniform_translate, 0.0, 0.0, 0.0);
glDrawArrays(GL_TRIANGLES, 0, 6);
glBindVertexArray(vao2);
glUniform3f(uniform_translate, 0.5, 0.0, 0.0);
glDrawArrays(GL_TRIANGLES, 0, 6);
glUniform3f(uniform_translate, 0.6, 0.0, 0.0);
glDrawArrays(GL_TRIANGLES, 0, 6);
glUniform3f(uniform_translate, 0.7, 0.0, 0.0);
glDrawArrays(GL_TRIANGLES, 0, 6);
};
app.tick = [&](float dt) {
};
Boilerplate::loop(app);
Boilerplate::stop(app);
}
int main() {
game3();
}
| [
"[email protected]"
] | |
855cb613ec23b8f614483779d9e847a115265ee4 | a19e90ff9731506909f8f3e9d557b3cddf8a2180 | /career_cup/missing_term_in_ap.cc | 714aebfdc96cd5aa121569b998f554f6c22dee98 | [] | no_license | smfaisal/leetcode_problems | 4df81310208578efada54d0c902862f37e857ed5 | 5a26dae6c774f746bea96f95bc24bacc9df4c384 | refs/heads/master | 2021-01-22T11:37:52.624298 | 2015-04-15T23:06:07 | 2015-04-15T23:06:07 | 34,022,857 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 409 | cc | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
vector<int> series;
cin >> N;
int t;
for (int i = 0; i < N; i++) {
cin >> t;
series.push_back(t);
}
int min_d = min(series[1]-series[0], series[2]-series[1]);
for (int i = 0; i < N-1; i++) {
if (series[i+1] != series[i]+min_d) {
cout << series[i]+min_d;
break;
}
}
return 0;
}
| [
"[email protected]"
] | |
a1ac7862c7044b1e6ae0e59fca2aa01af4fdda59 | 86033af5864fbd57c5ecbd61cb06e07c6cdc4208 | /src/vk/renderer/vk_atmoshere_renderer.cpp | ec2698200e24f644517ed114dc041cdc2f1736d5 | [
"MIT"
] | permissive | kuumies/vulkan_capabilities | b6bcbcc932cc5323cfe92bdf74760e45e9705f72 | 71ab131652861a6ca0061d85da5cfb7f688a14a7 | refs/heads/master | 2021-09-07T14:31:32.380097 | 2017-12-21T16:56:33 | 2017-12-21T16:56:33 | 109,518,601 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 20,657 | cpp | /* -------------------------------------------------------------------------- *
Antti Jumpponen <[email protected]>
The implementation of kuu::vk::AtmosphereRenderer class
* -------------------------------------------------------------------------- */
#pragma once
#include "vk_atmoshere_renderer.h"
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/mat4x4.hpp>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/string_cast.hpp>
#include <iostream>
#include "../vk_buffer.h"
#include "../vk_command.h"
#include "../vk_descriptor_set.h"
#include "../vk_image.h"
#include "../vk_mesh.h"
#include "../vk_pipeline.h"
#include "../vk_queue.h"
#include "../vk_image.h"
#include "../vk_image_layout_transition.h"
#include "../vk_render_pass.h"
#include "../vk_shader_module.h"
#include "../vk_texture.h"
#include "../../common/mesh.h"
namespace kuu
{
namespace vk
{
/* -------------------------------------------------------------------------- */
struct AtmosphereRenderer::Impl
{
// Input Vulkan handles
VkPhysicalDevice physicalDevice;
VkDevice device;
// Graphics queue.
uint32_t graphicsQueueFamilyIndex;
// Input texture cube
std::shared_ptr<TextureCube> textureCube;
// Dimensions of the texture cube.
VkExtent3D extent;
// Format of the texture cube.
VkFormat format;
// Parameters
AtmosphereRenderer::Params params;
};
/* -------------------------------------------------------------------------- */
AtmosphereRenderer::AtmosphereRenderer(
const VkPhysicalDevice& physicalDevice,
const VkDevice& device,
const uint32_t& graphicsQueueFamilyIndex)
: impl(std::make_shared<Impl>())
{
impl->physicalDevice = physicalDevice;
impl->device = device;
impl->graphicsQueueFamilyIndex = graphicsQueueFamilyIndex;
impl->format = VK_FORMAT_R32G32B32A32_SFLOAT;
impl->extent = { uint32_t(128), uint32_t(128), uint32_t(1) };
impl->textureCube = std::make_shared<TextureCube>(
physicalDevice,
device,
impl->extent,
impl->format,
VK_FILTER_LINEAR,
VK_FILTER_LINEAR,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
false);
}
void AtmosphereRenderer::setLightDir(const glm::vec3& lightDir)
{
impl->params.lightdir = glm::vec4(lightDir, 1.0);
}
void AtmosphereRenderer::render()
{
//--------------------------------------------------------------------------
// Quad mesh in NDC space.
std::vector<Vertex> vertices =
{
{ { 1, 1, 0 }, { 1, 1 } },
{ {-1, 1, 0 }, { 0, 1 } },
{ {-1, -1, 0 }, { 0, 0 } },
{ { 1, 1, 0 }, { 1, 1 } },
{ {-1, -1, 0 }, { 0, 0 } },
{ { 1, -1, 0 }, { 1, 0 } },
};
kuu::Mesh m;
for(const Vertex& v : vertices)
m.addVertex(v);
std::vector<float> vertexVector;
for (const Vertex& v : m.vertices)
{
vertexVector.push_back(v.pos.x);
vertexVector.push_back(v.pos.y);
vertexVector.push_back(v.pos.z);
vertexVector.push_back(v.texCoord.x);
vertexVector.push_back(v.texCoord.y);
}
std::shared_ptr<Mesh> mesh =
std::make_shared<Mesh>(
impl->physicalDevice,
impl->device);
mesh->setVertices(vertexVector);
mesh->setIndices(m.indices);
mesh->addVertexAttributeDescription(0, 0, VK_FORMAT_R32G32B32_SFLOAT, 0);
mesh->addVertexAttributeDescription(1, 0, VK_FORMAT_R32G32_SFLOAT, 3 * sizeof(float));
mesh->setVertexBindingDescription(0, 5 * sizeof(float), VK_VERTEX_INPUT_RATE_VERTEX);
if (!mesh->create())
return;
//--------------------------------------------------------------------------
// Shader modules.
const std::string vshFilePath = "shaders/atmosphere.vert.spv";
const std::string fshFilePath = "shaders/atmosphere.frag.spv";
std::shared_ptr<ShaderModule> vshModule =
std::make_shared<ShaderModule>(impl->device, vshFilePath);
vshModule->setStageName("main");
vshModule->setStage(VK_SHADER_STAGE_VERTEX_BIT);
if (!vshModule->create())
return;
std::shared_ptr<ShaderModule> fshModule =
std::make_shared<ShaderModule>(impl->device, fshFilePath);
fshModule->setStageName("main");
fshModule->setStage(VK_SHADER_STAGE_FRAGMENT_BIT);
if (!fshModule->create())
return;
//--------------------------------------------------------------------------
// Uniform buffer for atmosphere parameters.
auto pitchYaw = [](float pitch, float yaw) -> glm::quat
{
const float pitchRad = glm::radians(pitch);
const float yawRad = glm::radians(yaw);
glm::vec3 pitchAxis = glm::vec3(1.0f, 0.0f, 0.0f);
glm::vec3 yawAxis = glm::vec3(0.0f, 1.0f, 0.0f);
glm::quat out;
out = glm::angleAxis(yawRad, yawAxis) * out;
out = glm::angleAxis(pitchRad, pitchAxis) * out;
return out;
};
std::vector<glm::quat> faceRotations;
faceRotations.push_back(pitchYaw( 0.0f, 90.0f)); // pos x
faceRotations.push_back(pitchYaw( 0.0f, -90.0f)); // neg x
faceRotations.push_back(pitchYaw(-90.0f, 0.0f)); // pos y
faceRotations.push_back(pitchYaw( 90.0f, 0.0f)); // neg y
faceRotations.push_back(pitchYaw( 0.0f, 0.0f)); // neg z
faceRotations.push_back(pitchYaw( 0.0f, 180.0f)); // pos z
std::vector<glm::mat4> viewMatrices;
for (const glm::quat& faceRotation : faceRotations)
viewMatrices.push_back(glm::mat4_cast(faceRotation));
impl->params.viewport.x = float(impl->extent.width);
impl->params.viewport.y = float(impl->extent.height);
std::vector<std::shared_ptr<Buffer>> uniformBuffers;
for (int f = 0; f < 6; ++f)
{
std::shared_ptr<Buffer> paramsBuffer =
std::make_shared<Buffer>(impl->physicalDevice,
impl->device);
paramsBuffer->setSize(sizeof(Params));
paramsBuffer->setUsage(VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT);
paramsBuffer->setMemoryProperties(
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
if (!paramsBuffer->create())
return;
glm::mat4 projection = glm::perspective(float(M_PI / 2.0), 1.0f, 0.1f, 512.0f);
projection[1][1] *= -1;
const glm::mat4 invViewMatrix = glm::inverse(viewMatrices[f]);
const glm::mat4 invViewNormalMatrix =
glm::inverseTranspose(glm::mat3(invViewMatrix));
impl->params.inv_view_rot = invViewNormalMatrix;
impl->params.inv_proj = glm::inverse(projection);
paramsBuffer->copyHostVisible(&impl->params, paramsBuffer->size());
uniformBuffers.push_back(paramsBuffer);
}
//--------------------------------------------------------------------------
// Descriptor pool and descriptor sets
std::shared_ptr<DescriptorPool> descriptorPool =
std::make_shared<DescriptorPool>(impl->device);
descriptorPool->addTypeSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 6);
descriptorPool->setMaxCount(6);
if (!descriptorPool->create())
return;
std::vector<std::shared_ptr<DescriptorSets>> descriptorSets;
for (int f = 0; f < 6; ++f)
{
std::shared_ptr<DescriptorSets> descriptorSet =
std::make_shared<DescriptorSets>(impl->device,
descriptorPool->handle());
descriptorSet->addLayoutBinding(
0,
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1,
VK_SHADER_STAGE_FRAGMENT_BIT);
if (!descriptorSet->create())
return;
descriptorSet->writeUniformBuffer(
0, uniformBuffers[f]->handle(),
0, uniformBuffers[f]->size());
descriptorSets.push_back(descriptorSet);
}
//--------------------------------------------------------------------------
// Render pass
// Colorbuffer attachment description
VkAttachmentDescription colorAttachment;
colorAttachment.flags = 0;
colorAttachment.format = impl->format;
colorAttachment.samples = VK_SAMPLE_COUNT_1_BIT;
colorAttachment.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
colorAttachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
colorAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
colorAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
colorAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
colorAttachment.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
// Reference to first attachment (color)
VkAttachmentReference colorAttachmentRef;
colorAttachmentRef.attachment = 0;
colorAttachmentRef.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
// Subpass
VkSubpassDescription subpass;
subpass.flags = 0;
subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpass.inputAttachmentCount = 0;
subpass.pInputAttachments = NULL;
subpass.colorAttachmentCount = 1;
subpass.pColorAttachments = &colorAttachmentRef;
subpass.pResolveAttachments = NULL;
subpass.pDepthStencilAttachment = NULL;
subpass.preserveAttachmentCount = 0;
subpass.pPreserveAttachments = NULL;
// Subpass dependency
VkSubpassDependency dependency;
dependency.srcSubpass = VK_SUBPASS_EXTERNAL;
dependency.dstSubpass = 0;
dependency.srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
dependency.dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
dependency.srcAccessMask = 0;
dependency.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
dependency.dependencyFlags = 0;
VkRenderPassCreateInfo rpInfo;
rpInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
rpInfo.pNext = NULL;
rpInfo.flags = 0;
rpInfo.attachmentCount = 1;
rpInfo.pAttachments = &colorAttachment;
rpInfo.subpassCount = 1;
rpInfo.pSubpasses = &subpass;
rpInfo.dependencyCount = 1;
rpInfo.pDependencies = &dependency;
VkRenderPass renderPass = VK_NULL_HANDLE;
VkResult result =
vkCreateRenderPass(
impl->device,
&rpInfo,
NULL,
&renderPass);
if (result != VK_SUCCESS)
{
std::cerr << __FUNCTION__
<< ": render pass creation failed"
<< std::endl;
return;
}
//--------------------------------------------------------------------------
// Framebuffer
Image image(impl->physicalDevice, impl->device);
image.setType(VK_IMAGE_TYPE_2D);
image.setFormat(impl->format);
image.setExtent(impl->extent);
image.setUsage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT);
image.setMemoryProperty(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
image.setImageViewAspect(VK_IMAGE_ASPECT_COLOR_BIT);
if (!image.create())
return;
std::vector<VkImageView> attachments =
{ image.imageViewHandle() };
VkFramebufferCreateInfo fbInfo;
fbInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
fbInfo.pNext = NULL;
fbInfo.flags = 0;
fbInfo.renderPass = renderPass;
fbInfo.attachmentCount = uint32_t(attachments.size());
fbInfo.pAttachments = attachments.data();
fbInfo.width = impl->extent.width;
fbInfo.height = impl->extent.height;
fbInfo.layers = 1;
VkFramebuffer framebuffer = VK_NULL_HANDLE;
result = vkCreateFramebuffer(
impl->device,
&fbInfo,
NULL,
&framebuffer);
if (result != VK_SUCCESS)
{
std::cerr << __FUNCTION__
<< ": framebuffer creation failed"
<< std::endl;
return;
}
//--------------------------------------------------------------------------
// Pipeline
VkPipelineColorBlendAttachmentState colorBlend = {};
colorBlend.blendEnable = VK_FALSE;
colorBlend.colorWriteMask = 0xf;
float blendConstants[4] = { 0, 0, 0, 0 };
std::shared_ptr<Pipeline> pipeline =
std::make_shared<Pipeline>(impl->device);
pipeline->addShaderStage(vshModule->createInfo());
pipeline->addShaderStage(fshModule->createInfo());
pipeline->setVertexInputState(
{ mesh->vertexBindingDescription() },
mesh->vertexAttributeDescriptions() );
pipeline->setInputAssemblyState(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_FALSE);
pipeline->setViewportState(
{ { 0, 0, float(impl->extent.width), float(impl->extent.height), 0, 1 } },
{ { { 0, 0 }, { impl->extent.width, impl->extent.height } } } );
pipeline->setRasterizerState(
VK_POLYGON_MODE_FILL,
VK_CULL_MODE_NONE,
VK_FRONT_FACE_COUNTER_CLOCKWISE);
pipeline->setMultisampleState(VK_FALSE, VK_SAMPLE_COUNT_1_BIT);
pipeline->setDepthStencilState(VK_FALSE, VK_FALSE);
pipeline->setColorBlendingState(
VK_FALSE,
VK_LOGIC_OP_CLEAR,
{ colorBlend },
blendConstants);
std::vector<VkDescriptorSetLayout> descriptorSetLayouts;
for (int f = 0; f < 6; ++f)
descriptorSetLayouts.push_back(descriptorSets[f]->layoutHandle());
const std::vector<VkPushConstantRange> pushConstantRanges;
pipeline->setPipelineLayout(descriptorSetLayouts, pushConstantRanges);
pipeline->setDynamicState( { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR } );
pipeline->setRenderPass(renderPass);
if (!pipeline->create())
return;
//--------------------------------------------------------------------------
// Command pool
std::shared_ptr<CommandPool> graphicsCommandPool =
std::make_shared<CommandPool>(impl->device);
graphicsCommandPool->setQueueFamilyIndex(impl->graphicsQueueFamilyIndex);
if (!graphicsCommandPool->create())
return;
//--------------------------------------------------------------------------
// Record commands
VkCommandBuffer cmdBuf =
graphicsCommandPool->allocateBuffer(
VK_COMMAND_BUFFER_LEVEL_PRIMARY);
VkCommandBufferBeginInfo beginInfo;
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
beginInfo.pNext = NULL;
beginInfo.flags = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT;
beginInfo.pInheritanceInfo = NULL;
vkBeginCommandBuffer(cmdBuf, &beginInfo);
image_layout_transition::record(
cmdBuf,
image.imageHandle(),
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
VkImageSubresourceRange subresourceRange = {};
subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
subresourceRange.levelCount = 1;
subresourceRange.layerCount = 6;
image_layout_transition::record(
cmdBuf,
impl->textureCube->image,
VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
subresourceRange);
std::vector<VkClearValue> clearValues(1);
clearValues[0].color = { 0.1f, 0.1f, 0.1f, 1.0f };
for (uint32_t f = 0; f < 6; f++)
{
VkViewport viewport;
viewport.x = 0;
viewport.y = 0;
viewport.width = float(impl->extent.width);
viewport.height = float(impl->extent.height);
viewport.minDepth = 0.0f;
viewport.maxDepth = 1.0f;
vkCmdSetViewport(cmdBuf, 0, 1, &viewport);
VkRect2D scissor;
scissor.offset = {};
scissor.extent = { impl->extent.width, impl->extent.height };
vkCmdSetScissor(cmdBuf, 0, 1, &scissor);
VkRenderPassBeginInfo renderPassInfo;
renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
renderPassInfo.pNext = NULL;
renderPassInfo.renderPass = renderPass;
renderPassInfo.framebuffer = framebuffer;
renderPassInfo.renderArea.offset = { 0, 0 };
renderPassInfo.renderArea.extent = { impl->extent.width, impl->extent.height };
renderPassInfo.clearValueCount = uint32_t(clearValues.size());
renderPassInfo.pClearValues = clearValues.data();
vkCmdBeginRenderPass(
cmdBuf,
&renderPassInfo,
VK_SUBPASS_CONTENTS_INLINE);
VkDescriptorSet descriptorHandle = descriptorSets[f]->handle();
vkCmdBindDescriptorSets(
cmdBuf,
VK_PIPELINE_BIND_POINT_GRAPHICS,
pipeline->pipelineLayoutHandle(), 0, 1,
&descriptorHandle, 0, NULL);
vkCmdBindPipeline(
cmdBuf,
VK_PIPELINE_BIND_POINT_GRAPHICS,
pipeline->handle());
const VkBuffer vertexBuffer = mesh->vertexBufferHandle();
const VkDeviceSize offsets[1] = { 0 };
vkCmdBindVertexBuffers(
cmdBuf, 0, 1,
&vertexBuffer,
offsets);
const VkBuffer indexBuffer = mesh->indexBufferHandle();
vkCmdBindIndexBuffer(
cmdBuf,
indexBuffer,
0, VK_INDEX_TYPE_UINT32);
uint32_t indexCount = uint32_t(mesh->indices().size());
vkCmdDrawIndexed(
cmdBuf,
indexCount,
1, 0, 0, 1);
vkCmdEndRenderPass(cmdBuf);
image_layout_transition::record(
cmdBuf,
image.imageHandle(),
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
VkImageCopy copyRegion = {};
copyRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
copyRegion.srcSubresource.baseArrayLayer = 0;
copyRegion.srcSubresource.mipLevel = 0;
copyRegion.srcSubresource.layerCount = 1;
copyRegion.srcOffset = { 0, 0, 0 };
copyRegion.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
copyRegion.dstSubresource.baseArrayLayer = f;
copyRegion.dstSubresource.mipLevel = 0;
copyRegion.dstSubresource.layerCount = 1;
copyRegion.dstOffset = { 0, 0, 0 };
copyRegion.extent = impl->extent;
vkCmdCopyImage(
cmdBuf,
image.imageHandle(),
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
impl->textureCube->image,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
1,
©Region);
// Transform framebuffer color attachment back
image_layout_transition::record(
cmdBuf,
image.imageHandle(),
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
}
image_layout_transition::record(
cmdBuf,
impl->textureCube->image,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
subresourceRange);
result = vkEndCommandBuffer(cmdBuf);
if (result != VK_SUCCESS)
{
std::cerr << __FUNCTION__
<< ": render commands failed"
<< std::endl;
return;
}
//--------------------------------------------------------------------------
// Render
Queue graphicsQueue(impl->device, impl->graphicsQueueFamilyIndex, 0);
graphicsQueue.create();
graphicsQueue.submit(cmdBuf,
VK_NULL_HANDLE,
VK_NULL_HANDLE,
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);
graphicsQueue.waitIdle();
//--------------------------------------------------------------------------
// Clean up
vkDestroyFramebuffer(
impl->device,
framebuffer,
NULL);
vkDestroyRenderPass(
impl->device,
renderPass,
NULL);
}
std::shared_ptr<TextureCube> AtmosphereRenderer::textureCube() const
{ return impl->textureCube; }
} // namespace vk
} // namespace kuu
| [
"[email protected]"
] | |
1f91f088d1b912a373a63e0383403886a85b30cd | 677d7c8fd7af9a213675425375ca2f6c127a0950 | /lab4-5/Result.cpp | f43dd087127c992850391a7cbc35124169b3e5ca | [] | no_license | MRVolta-Ivan/patterns | 2b9aa0239f6ae8803053dee7a68749526dc97e65 | 7b5a004196543c976ed755942d71f6e4fa6641ee | refs/heads/main | 2023-02-22T03:14:49.460246 | 2021-01-28T12:58:44 | 2021-01-28T12:58:44 | 316,947,833 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 954 | cpp | #include "Result.h"
SEOResult::SEOResult()
{
count_letters = 0;
count_word = 0;
}
SEOResult::SEOResult(int _count_letters, int _count_word, vector<string> _keyword)
{
count_letters = _count_letters;
count_word = _count_word;
keyword = _keyword;
}
int SEOResult::GetCountLetters()
{
return count_letters;
}
int SEOResult::GetCountWord()
{
return count_word;
}
vector<string> SEOResult::GetKeyword()
{
return keyword;
}
OrtoResult::OrtoResult()
{
}
OrtoResult::OrtoResult(vector<string> _mistake_word)
{
mistake_word = _mistake_word;
}
vector<string> OrtoResult::GetMistakeWord()
{
return mistake_word;
}
CountSymbolResult::CountSymbolResult()
{
count_letter = 0;
count_symbol = 0;
}
CountSymbolResult::CountSymbolResult(int letter, int symbol)
{
count_letter = letter;
count_symbol = symbol;
}
int CountSymbolResult::GetCountLetter()
{
return count_letter;
}
int CountSymbolResult::GetCountSymbol()
{
return count_symbol;
}
| [
"[email protected]"
] | |
0c47d98bb893911f96ef3b1731a8550c245055de | 0ea2037de53a3564ce92b33df3db75229ae2ef5b | /SOURCE/initial/basic/0/nut | c7a613724288a1d6c6d45cefbd4a9733c1596dee | [] | no_license | MasterOfBinary/OpenFOAM-2D-VAWT | 0c8377ecb16c824796d9e7404738f4ac17274ef6 | 1e00a2f7ada7493812c761b454f84e0c2d1d7f29 | refs/heads/master | 2021-04-09T13:41:54.146390 | 2016-04-13T05:01:34 | 2016-04-13T05:01:34 | 52,127,117 | 0 | 0 | null | 2016-02-20T00:06:51 | 2016-02-20T00:06:50 | null | UTF-8 | C++ | false | false | 1,462 | /*--------------------------------*- 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 "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 1.94e-05;
boundaryField
{
blades
{
type nutUSpaldingWallFunction;
value uniform 0;
}
farfield
{
type freestream;
freestreamValue uniform 1.94e-05;
value uniform 1.94e-05;
}
ext_interface
{
type cyclicAMI;
value uniform 1.94e-05;
}
int_interface
{
type cyclicAMI;
value uniform 1.94e-05;
}
sides
{
type empty;
}
}
// ************************************************************************* //
| [
"[email protected]"
] | ||
2a835182855c3a1f12a042cc97e8b534f510b9d4 | de322ee3c27143b8c9b0d2a043bbe6b9366bd7aa | /ARMY.cpp | 48c62d39589ba10dea67b43437d5d1f6db846fb8 | [] | no_license | trivedipankaj/Spoj | a413688060cdcf735fc5cd84d865ddca0caf727b | 9dd6705a2ebf716a485b880d8b2021990ead0c59 | refs/heads/master | 2021-01-11T11:09:09.909414 | 2014-08-15T18:14:02 | 2014-08-15T18:14:02 | 22,998,578 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 864 | cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include <cstdio>
using namespace std;
main(){
int c; scanf("%d",&c);
while(c--){
int n,m;
scanf("%d %d",&n,&m);
int g[n],mg[m];
for(int i=0; i<n;i++) scanf("%d",&g[i]);
for(int i=0; i<m;i++) scanf("%d",&mg[i]);
sort(g,g+n); sort(mg,mg+m);
int i=0,j=0;
while( i<n && j<m){
if(g[i] < mg[j])
i++;
else if(g[i] >= mg[j])
j++;
}
if(i==n)
cout<<"MechaGodzilla\n";
else
cout<<"Godzilla\n";
}
}
| [
"[email protected]"
] | |
798b10d9d3bcecc62387d27ef8977b414d2cb2e8 | a5d4e67e63919d97f017ff905566f56a0c06e58e | /Game.h | 538684dbc256aea41ad39f8f182a9209dcda4b44 | [] | no_license | LexSheyn/SFML_01 | 3821b56a05947902162bc20d0809927a4df5db76 | 65fe86ce909d5825e70a4bda59a09c9abb2da165 | refs/heads/master | 2023-07-19T06:54:23.754897 | 2021-09-20T10:53:37 | 2021-09-20T10:53:37 | 408,406,200 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,524 | h | #pragma once
#include <iostream>
#include <vector>
#include <ctime>
#include <sstream>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
/*
Class that acts like a game engine.
Wrapper class.
*/
class Game
{
private:
//Variables
//Window
sf::RenderWindow* window;
sf::VideoMode videoMode;
sf::Event ev;
//Mouse positions
sf::Vector2i mousePosWindow;
sf::Vector2f mousePosView;
//Resoueces
sf::Font font;
sf::Font fontPoints;
sf::Font fontHealth;
//Text
sf::Text uiText;
sf::Text uiTextPoints;
sf::Text uiTextHealth;
//Colors
sf::Color color;
sf::Color VeryHard;
sf::Color Hard;
sf::Color Medium;
sf::Color Easy;
sf::Color VeryEasy;
//Game logic
bool endGame;
unsigned points;
int health;
float enemySize;
float enemySpawnTimer;
float enemySpawnTimerMax;
int maxEnemies;
bool mouseHeld;
//Game objects
std::vector<sf::RectangleShape> enemies;
sf::RectangleShape enemy;
//Private functions
void InitVariables();
void InitWindow();
void InitFonts();
void InitText();
void InitEnemies();
public:
//Constructors and Distructors
Game();
virtual ~Game();
//Accessors
const bool running() const;
const bool getEndGame() const;
//Functions
void spawnEnemy();
void pollEvents();
void updateMousePositions();
void updateText();
void updateEnemies();
void update();
void renderText(sf::RenderTarget& target);
void renderEnemies(sf::RenderTarget& target);
void render();
}; | [
"[email protected]"
] | |
17f16ef3317cc383730b0d904cacae9334246626 | d6b4bdf418ae6ab89b721a79f198de812311c783 | /tcss/include/tencentcloud/tcss/v20201101/model/DescribeNetworkFirewallPolicyListRequest.h | fcb42cf7095ea887ded35309f657811cbd2ca44c | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-cpp-intl-en | d0781d461e84eb81775c2145bacae13084561c15 | d403a6b1cf3456322bbdfb462b63e77b1e71f3dc | refs/heads/master | 2023-08-21T12:29:54.125071 | 2023-08-21T01:12:39 | 2023-08-21T01:12:39 | 277,769,407 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,675 | h | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TENCENTCLOUD_TCSS_V20201101_MODEL_DESCRIBENETWORKFIREWALLPOLICYLISTREQUEST_H_
#define TENCENTCLOUD_TCSS_V20201101_MODEL_DESCRIBENETWORKFIREWALLPOLICYLISTREQUEST_H_
#include <string>
#include <vector>
#include <map>
#include <tencentcloud/core/AbstractModel.h>
#include <tencentcloud/tcss/v20201101/model/ComplianceFilters.h>
namespace TencentCloud
{
namespace Tcss
{
namespace V20201101
{
namespace Model
{
/**
* DescribeNetworkFirewallPolicyList request structure.
*/
class DescribeNetworkFirewallPolicyListRequest : public AbstractModel
{
public:
DescribeNetworkFirewallPolicyListRequest();
~DescribeNetworkFirewallPolicyListRequest() = default;
std::string ToJsonString() const;
/**
* 获取Cluster ID
* @return ClusterId Cluster ID
*
*/
std::string GetClusterId() const;
/**
* 设置Cluster ID
* @param _clusterId Cluster ID
*
*/
void SetClusterId(const std::string& _clusterId);
/**
* 判断参数 ClusterId 是否已赋值
* @return ClusterId 是否已赋值
*
*/
bool ClusterIdHasBeenSet() const;
/**
* 获取Offset
* @return Offset Offset
*
*/
uint64_t GetOffset() const;
/**
* 设置Offset
* @param _offset Offset
*
*/
void SetOffset(const uint64_t& _offset);
/**
* 判断参数 Offset 是否已赋值
* @return Offset 是否已赋值
*
*/
bool OffsetHasBeenSet() const;
/**
* 获取Maximum number of records per query
* @return Limit Maximum number of records per query
*
*/
uint64_t GetLimit() const;
/**
* 设置Maximum number of records per query
* @param _limit Maximum number of records per query
*
*/
void SetLimit(const uint64_t& _limit);
/**
* 判断参数 Limit 是否已赋值
* @return Limit 是否已赋值
*
*/
bool LimitHasBeenSet() const;
/**
* 获取Name - String
Name. Valid values: `ClusterName`, `ClusterId`, `ClusterType`, `Region`, `ClusterCheckMode`, `ClusterAutoCheck`.
* @return Filters Name - String
Name. Valid values: `ClusterName`, `ClusterId`, `ClusterType`, `Region`, `ClusterCheckMode`, `ClusterAutoCheck`.
*
*/
std::vector<ComplianceFilters> GetFilters() const;
/**
* 设置Name - String
Name. Valid values: `ClusterName`, `ClusterId`, `ClusterType`, `Region`, `ClusterCheckMode`, `ClusterAutoCheck`.
* @param _filters Name - String
Name. Valid values: `ClusterName`, `ClusterId`, `ClusterType`, `Region`, `ClusterCheckMode`, `ClusterAutoCheck`.
*
*/
void SetFilters(const std::vector<ComplianceFilters>& _filters);
/**
* 判断参数 Filters 是否已赋值
* @return Filters 是否已赋值
*
*/
bool FiltersHasBeenSet() const;
/**
* 获取Sorting field
* @return By Sorting field
*
*/
std::string GetBy() const;
/**
* 设置Sorting field
* @param _by Sorting field
*
*/
void SetBy(const std::string& _by);
/**
* 判断参数 By 是否已赋值
* @return By 是否已赋值
*
*/
bool ByHasBeenSet() const;
/**
* 获取Sorting order. Valid values: `asc`, `desc`.
* @return Order Sorting order. Valid values: `asc`, `desc`.
*
*/
std::string GetOrder() const;
/**
* 设置Sorting order. Valid values: `asc`, `desc`.
* @param _order Sorting order. Valid values: `asc`, `desc`.
*
*/
void SetOrder(const std::string& _order);
/**
* 判断参数 Order 是否已赋值
* @return Order 是否已赋值
*
*/
bool OrderHasBeenSet() const;
private:
/**
* Cluster ID
*/
std::string m_clusterId;
bool m_clusterIdHasBeenSet;
/**
* Offset
*/
uint64_t m_offset;
bool m_offsetHasBeenSet;
/**
* Maximum number of records per query
*/
uint64_t m_limit;
bool m_limitHasBeenSet;
/**
* Name - String
Name. Valid values: `ClusterName`, `ClusterId`, `ClusterType`, `Region`, `ClusterCheckMode`, `ClusterAutoCheck`.
*/
std::vector<ComplianceFilters> m_filters;
bool m_filtersHasBeenSet;
/**
* Sorting field
*/
std::string m_by;
bool m_byHasBeenSet;
/**
* Sorting order. Valid values: `asc`, `desc`.
*/
std::string m_order;
bool m_orderHasBeenSet;
};
}
}
}
}
#endif // !TENCENTCLOUD_TCSS_V20201101_MODEL_DESCRIBENETWORKFIREWALLPOLICYLISTREQUEST_H_
| [
"[email protected]"
] | |
4448d6f851a2b1bc6248479e2a125f47dcdf9569 | 2c7387c7b72fcfd14961cdb5d3b6be0633e6ab29 | /Lab_2/MiniDictionaryTest/DictionaryTest.cpp | 5a3d24968c90ffcc3a554dc2d8f0abf2cf75a6e0 | [] | no_license | Relz/OOP | 90e2757078b152263d64b8c7478ac37276a252c0 | b31fb5dba16f4e564b8999c8e162323ecdd99403 | refs/heads/master | 2020-07-28T08:35:29.439160 | 2017-01-18T19:06:42 | 2017-01-18T19:06:42 | 67,879,402 | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 3,844 | cpp | #include "stdafx.h"
#include "..\MiniDictionary\Dictionary.h"
// Проверка наличия слова с переводом в словаре
bool IsWordExistsInDictionary(wstring const& word, wstring const& requiredTranslate, map<wstring, wstring> const& dictionary)
{
vector<wstring> translates;
if (FindWordInDictionary(word, dictionary, translates))
{
return (translates[0] == requiredTranslate);
}
return false;
}
// Функция ReadDictionaryFromFile
BOOST_AUTO_TEST_SUITE(FindWordInDictionary_function)
// Находит в словаре значение по ключу
BOOST_AUTO_TEST_CASE(return_value_by_key_in_dictionary)
{
map<wstring, wstring> dictionary = { { L"кот", L"cat" },{ L"яблоко", L"apple" } };
BOOST_CHECK(IsWordExistsInDictionary(L"кот", L"cat", dictionary));
BOOST_CHECK(IsWordExistsInDictionary(L"яблоко", L"apple", dictionary));
}
// Находит в словаре ключ по значению
BOOST_AUTO_TEST_CASE(return_key_by_value_in_dictionary)
{
map<wstring, wstring> dictionary = { { L"кот", L"cat" },{ L"яблоко", L"apple" } };
BOOST_CHECK(IsWordExistsInDictionary(L"cat", L"кот", dictionary));
BOOST_CHECK(IsWordExistsInDictionary(L"apple", L"яблоко", dictionary));
}
BOOST_AUTO_TEST_SUITE_END()
// Функция ReadDictionaryFromFile
BOOST_AUTO_TEST_SUITE(ReadDictionaryFromFile_function)
// Создает пустой словарь при чтении пустого файла
BOOST_AUTO_TEST_CASE(makes_empty_dictionary_from_empty_file)
{
wifstream dictionaryFile("empty_dictionary.txt");
map<wstring, wstring> dictionary;
ReadDictionaryFromFile(dictionaryFile, dictionary);
BOOST_CHECK_EQUAL(dictionary.size(), 0);
}
// Читает 2 слова(кот, яблоко) с их переводами(cat, apple) из файла в словарь
BOOST_AUTO_TEST_CASE(read_two_words_with_translates_from_file_to_dictionary)
{
wifstream dictionaryFile(L"dictionary_for_read_testing.txt");
map<wstring, wstring> dictionary;
ReadDictionaryFromFile(dictionaryFile, dictionary);
BOOST_CHECK_EQUAL(dictionary.size(), 2);
BOOST_CHECK(IsWordExistsInDictionary(L"кот", L"cat", dictionary));
BOOST_CHECK(IsWordExistsInDictionary(L"яблоко", L"apple", dictionary));
}
BOOST_AUTO_TEST_SUITE_END()
// Функция AddWordToDictionary
BOOST_AUTO_TEST_SUITE(AddWordToDictionary_function)
// Добавляет слово с переводом в словарь
BOOST_AUTO_TEST_CASE(adds_word_with_translation_to_dictionary)
{
map<wstring, wstring> dictionary;
AddWordToDictionary(L"туман", L"fog", dictionary);
BOOST_CHECK_EQUAL(dictionary.size(), 1);
BOOST_CHECK(IsWordExistsInDictionary(L"туман", L"fog", dictionary));
}
BOOST_AUTO_TEST_SUITE_END()
// Функция SaveDictionaryToFile
BOOST_AUTO_TEST_SUITE(SaveDictionaryToFile_function)
// Сохраняет словарь в файл
BOOST_AUTO_TEST_CASE(save_dictionary_to_file)
{
wofstream dictionaryFileOut(L"dictionary_for_write_testing.txt");
map<wstring, wstring> dictionary = { {L"яблоко", L"apple"}, {L"кот", L"cat"} };
SaveDictionaryToFile(dictionaryFileOut, dictionary);
wifstream dictionaryFileIn("dictionary_for_write_testring.txt");
ReadDictionaryFromFile(dictionaryFileIn, dictionary);
BOOST_CHECK_EQUAL(dictionary.size(), 2);
BOOST_CHECK(IsWordExistsInDictionary(L"яблоко", L"apple", dictionary));
BOOST_CHECK(IsWordExistsInDictionary(L"кот", L"cat", dictionary));
}
BOOST_AUTO_TEST_SUITE_END() | [
"[email protected]"
] |
Subsets and Splits