blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2 values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 10.4M | extension stringclasses 122 values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68b063c05b58401b587f3b637518effe6b5774c0 | 53a7e8efe42e6235a2314ead09e17e7f7d7beaec | /two_pointers/189_rotate_array.cpp | fe7dee387d21ac2843b5118fd69bbc8f806e7a3a | [] | no_license | YunfeiZHAO/leetcode | 3aa4805034b515af9d9313435efe0bc120f8749c | eaa4bfd5261a842f7252a3520f24b01ac1350cdd | refs/heads/master | 2023-05-12T07:23:55.699011 | 2023-05-01T17:55:10 | 2023-05-01T17:55:10 | 193,263,082 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 828 | cpp | #include <iostream>
#include <vector>
using namespace std;
/**
* Given an array, rotate the array to the right by k steps, where k is non-negative.
*/
// O(n) extra space
void rotate1(vector<int>& nums, int k) {
int l = nums.size();
vector<int> r(l);
for(int i=0; i<l; i++) {
r[(i+k) % l] = nums[i];
}
nums = r;
}
// O(1) extra space, reverse() is O(1) extra memory
void rotate2(vector<int>& nums, int k) {
int l = nums.size();
k = k % l;
reverse(nums.begin(), nums.end());
reverse(nums.begin(), nums.begin() + k);
reverse(nums.begin() + k, nums.end());
}
int main() {
int k = 0;
vector<int> nums = {-3,1,5,6};
//vector<int> nums = {-1};
rotate2(nums, k);
cout << "result: ";
for (const auto& i: nums) {cout << i << ' ';}
return 0;
}
| [
"yunfei.zhao@ubisoft.com"
] | yunfei.zhao@ubisoft.com |
085f2389ed81bb124ac0516b2b98199928409207 | 15b322d609ed38de5392b67fc578fbbd22a4b7d0 | /TextArt/BADA/FUiIClipboard.h | dd083bac980c4adbec40a6484d2038cf912bde06 | [] | no_license | Vizantiec/Bada | 7725bb06cecb72267218220bec05a99879fc2087 | 51a3f544c8e0193dbf374d3a8042d867dbca9818 | refs/heads/master | 2016-09-11T02:18:26.326902 | 2013-12-23T10:22:35 | 2013-12-23T10:22:35 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,864 | h | //
// Copyright (c) 2011 Samsung Electronics Co., Ltd.
// All rights reserved.
// This software contains confidential and proprietary information
// of Samsung Electronics Co., Ltd.
// The user of this software agrees not to disclose, disseminate or copy such
// Confidential Information and shall use the software only in accordance with
// the terms of the license agreement the user entered into with Samsung.
//
/**
* @file FUiIClipboard.h
* @brief This is the header file for the %IClipboard interface.
*
* This header file contains the declarations of the %IClipboard class and its helper classes.
*/
#ifndef _FUI_ICLIPBOARD_H_
#define _FUI_ICLIPBOARD_H_
// include
#include "FUiClipboardItem.h"
namespace Osp { namespace Ui {
/**
* @internal
* @interface IClipboard
* @brief This interface defines the operations of IClipboard.
* @since 2.0
*
* The IClipboard interface defines the operations of clipboard. This is internal.
*/
class _EXPORT_UI_ IClipboard
{
// Lifecycle
public:
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* This is the destructor for this class.
* @since 2.0
*/
virtual ~IClipboard(void) {};
// Operation
public:
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* Copies the specified item to the system Clipboard.
*
* @since 2.0
* @return An error code
* @param[in] item The item to be saved in the system clipboard
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error occurred.
* @remarks The method returns E_INVALID_ARG if the specified item is
* not constructed. @n
* For the text and image data type, the data itself is copied
* by the method and kept by the system clipboard.
*/
virtual result CopyItem(const ClipboardItem& item) = 0;
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* Gets a collection of items that matches the specified data types from the
* system clipboard.
*
* @since 2.0
* @return The pointer to an IList which contains a collection of ClipboardItem. @n
* @c null, if an error occurs.
* @param[in] dataTypes The types of items. Multiple data types can be
* combined using bitwise OR (Osp::Ui::ClipboardDataType).
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The items of the specified data are not found.
* @exception E_OUT_OF_MEMORY Insufficient memory.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method. @n
* This method returns the pointer to an IList which contains
* a collection of ClipboardItem. The returned pointer to IList
* and all elements in IList must be deleted by applications. @n
* The items in IList are sorted in the reverse order in which
* they are copied to the system clipboard. So, the first
* item in IList is the latest one among them. @n
* @c dataType can be a combination of ClipboardDataType.
*/
virtual Osp::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes) = 0;
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* Gets the latest item for the specified data types from the system clipboard.
*
* @since 2.0
* @return The pointer to a ClipboardItem @n
* @c null, if an error occurs.
* @param[in] dataTypes The types of items. Multiple data types can be
* combined using bitwise OR (Osp::Ui::ClipboardDataType).
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The item of the specified data types is not found.
* @exception E_OUT_OF_MEMORY Insufficient memory.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method. @n
* This method returns the pointer to a ClipboardItem. The
* returned ClipboardItem must be deleted by applications. @n
* If there is no matched item in the system clipboard, this method
* returns @c null. @n
* @c dataType can be a combination of ClipboardDataType.
*/
virtual Osp::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes) = 0;
// Reserves
protected:
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* The following method is reserved, and their names can be changed
* at any time without prior notice.
*
* @since 2.0
*/
virtual void Clipboard_Reserved1 (void) { }
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* The following method is reserved, and their names can be changed
* at any time without prior notice.
*
* @since 2.0
*/
virtual void Clipboard_Reserved2 (void) { }
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* The following method is reserved, and their names can be changed
* at any time without prior notice.
*
* @since 2.0
*/
virtual void Clipboard_Reserved3 (void) { }
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* The following method is reserved, and their names can be changed
* at any time without prior notice.
*
* @since 2.0
*/
virtual void Clipboard_Reserved4 (void) { }
/**
* @internal
* This method is for internal use only. The bada platform team is not
* responsible for any behavioral correctness, consistency, and
* security-related issues that might arise after using this method.
*
* The following method is reserved, and their names can be changed
* at any time without prior notice.
*
* @since 2.0
*/
virtual void Clipboard_Reserved5 (void) { }
};
};};//Osp::Ui
#endif //_FUI_ICLIPBOARD_H_
| [
"us@mobigear.ru"
] | us@mobigear.ru |
f35c5b719a2e002969b9a03edc738a60a8866059 | c049528f984f99ae783bcef9d26e57f63c337d77 | /Agents/MTConnectAgent1_3/MTConnectAgent/agent/agent.cpp | 973e8f8f1a403e9a064f0ce4b4cec90dead4c0b2 | [] | no_license | Maroooney/MTConnectToolbox | 9537f109ab265b2d690d56c4d8e833ee4c2edba7 | 15d9f830b14d7521277431dcd1c08b8af44a3c07 | refs/heads/master | 2020-03-30T10:47:54.670294 | 2018-06-07T16:30:06 | 2018-06-07T16:30:06 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 47,595 | cpp | /*
* Copyright Copyright 2012, System Insights, 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 "agent.hpp"
#include "dlib/logger.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <sstream>
#include <stdexcept>
#include <dlib/tokenizer.h>
#include <dlib/misc_api.h>
#include <dlib/array.h>
#include <dlib/dir_nav.h>
#include <dlib/config_reader.h>
#include <dlib/queue.h>
using namespace std;
static const string sUnavailable("UNAVAILABLE");
static const string sConditionUnavailable("UNAVAILABLE|||");
static const string sAvailable("AVAILABLE");
static dlib::logger sLogger("agent");
/* Agent public methods */
Agent::Agent(const string& configXmlPath, int aBufferSize, int aMaxAssets, int aCheckpointFreq)
: mPutEnabled(false), mLogStreamData(false)
{
mMimeTypes["xsl"] = "text/xsl";
mMimeTypes["xml"] = "text/xml";
mMimeTypes["css"] = "text/css";
mMimeTypes["xsd"] = "text/xml";
mMimeTypes["jpg"] = "image/jpeg";
mMimeTypes["jpeg"] = "image/jpeg";
mMimeTypes["png"] = "image/png";
mMimeTypes["ico"] = "image/x-icon";
try
{
// Load the configuration for the Agent
mXmlParser = new XmlParser();
mDevices = mXmlParser->parseFile(configXmlPath);
std::vector<Device *>::iterator device;
std::set<std::string> uuids;
for (device = mDevices.begin(); device != mDevices.end(); ++device)
{
if (uuids.count((*device)->getUuid()) > 0)
throw runtime_error("Duplicate UUID: " + (*device)->getUuid());
uuids.insert((*device)->getUuid());
(*device)->resolveReferences();
}
}
catch (runtime_error & e)
{
sLogger << LFATAL << "Error loading xml configuration: " + configXmlPath;
sLogger << LFATAL << "Error detail: " << e.what();
cerr << e.what() << endl;
throw e;
}
catch (exception &f)
{
sLogger << LFATAL << "Error loading xml configuration: " + configXmlPath;
sLogger << LFATAL << "Error detail: " << f.what();
cerr << f.what() << endl;
throw f;
}
// Grab data from configuration
string time = getCurrentTime(GMT_UV_SEC);
// Unique id number for agent instance
mInstanceId = getCurrentTimeInSec();
// Sequence number and sliding buffer for data
mSequence = 1;
mSlidingBufferSize = 1 << aBufferSize;
mSlidingBuffer = new sliding_buffer_kernel_1<ComponentEventPtr>();
mSlidingBuffer->set_size(aBufferSize);
mCheckpointFreq = aCheckpointFreq;
mCheckpointCount = (mSlidingBufferSize / aCheckpointFreq) + 1;
// Asset sliding buffer
mMaxAssets = aMaxAssets;
// Create the checkpoints at a regular frequency
mCheckpoints = new Checkpoint[mCheckpointCount];
// Mutex used for synchronized access to sliding buffer and sequence number
mSequenceLock = new dlib::mutex;
mAssetLock = new dlib::mutex;
// Add the devices to the device map and create availability and
// asset changed events if they don't exist
std::vector<Device *>::iterator device;
for (device = mDevices.begin(); device != mDevices.end(); ++device)
{
mDeviceMap[(*device)->getName()] = *device;
// Make sure we have two device level data items:
// 1. Availability
// 2. AssetChanged
if ((*device)->getAvailability() == NULL)
{
// Create availability data item and add it to the device.
std::map<string,string> attrs;
attrs["type"] = "AVAILABILITY";
attrs["id"] = (*device)->getId() + "_avail";
attrs["category"] = "EVENT";
DataItem *di = new DataItem(attrs);
di->setComponent(*(*device));
(*device)->addDataItem(*di);
(*device)->addDeviceDataItem(*di);
(*device)->mAvailabilityAdded = true;
}
int major, minor;
char c;
stringstream ss(XmlPrinter::getSchemaVersion());
ss >> major >> c >> minor;
if ((*device)->getAssetChanged() == NULL && (major > 1 || (major == 1 && minor >= 2)))
{
// Create asset change data item and add it to the device.
std::map<string,string> attrs;
attrs["type"] = "ASSET_CHANGED";
attrs["id"] = (*device)->getId() + "_asset_chg";
attrs["category"] = "EVENT";
DataItem *di = new DataItem(attrs);
di->setComponent(*(*device));
(*device)->addDataItem(*di);
(*device)->addDeviceDataItem(*di);
}
if ((*device)->getAssetRemoved() == NULL && (major > 1 || (major == 1 && minor >= 3)))
{
// Create asset removed data item and add it to the device.
std::map<string,string> attrs;
attrs["type"] = "ASSET_REMOVED";
attrs["id"] = (*device)->getId() + "_asset_rem";
attrs["category"] = "EVENT";
DataItem *di = new DataItem(attrs);
di->setComponent(*(*device));
(*device)->addDataItem(*di);
(*device)->addDeviceDataItem(*di);
}
}
// Reload the document for path resolution
mXmlParser->loadDocument(XmlPrinter::printProbe(mInstanceId, mSlidingBufferSize,
mMaxAssets,
mAssets.size(),
mSequence, mDevices));
/* Initialize the id mapping for the devices and set all data items to UNAVAILABLE */
for (device = mDevices.begin(); device != mDevices.end(); ++device)
{
const std::map<string, DataItem*> &items = (*device)->getDeviceDataItems();
std::map<string, DataItem *>::const_iterator item;
for (item = items.begin(); item != items.end(); ++item)
{
// Check for single valued constrained data items.
DataItem *d = item->second;
const string *value = &sUnavailable;
if (d->isCondition()) {
value = &sConditionUnavailable;
} else if (d->hasConstraints()) {
std::vector<std::string> &values = d->getConstrainedValues();
if (values.size() == 1)
value = &values[0];
}
addToBuffer(d, *value, time);
if (mDataItemMap.count(d->getId()) == 0)
mDataItemMap[d->getId()] = d;
else {
sLogger << LFATAL << "Duplicate DataItem id " << d->getId() <<
" for device: " << (*device)->getName() << " and data item name: " <<
d->getName();
exit(1);
}
}
}
}
Agent::~Agent()
{
delete mSlidingBuffer;
delete mSequenceLock;
delete mAssetLock;
delete mXmlParser;
delete[] mCheckpoints;
}
void Agent::start()
{
try {
// Start all the adapters
std::vector<Adapter*>::iterator iter;
for (iter = mAdapters.begin(); iter != mAdapters.end(); iter++) {
(*iter)->start();
}
// Start the server. This blocks until the server stops.
server_http::start();
}
catch (dlib::socket_error &e) {
sLogger << LFATAL << "Cannot start server: " << e.what();
exit(1);
}
}
void Agent::clear()
{
// Stop all adapter threads...
std::vector<Adapter *>::iterator iter;
sLogger << LINFO << "Shutting down adapters";
// Deletes adapter and waits for it to exit.
for (iter = mAdapters.begin(); iter != mAdapters.end(); iter++) {
(*iter)->stop();
}
sLogger << LINFO << "Shutting down server";
server::http_1a::clear();
sLogger << LINFO << "Shutting completed";
for (iter = mAdapters.begin(); iter != mAdapters.end(); iter++) {
delete (*iter);
}
mAdapters.clear();
}
// Register a file
void Agent::registerFile(const string &aUri, const string &aPath)
{
try {
directory dir(aPath);
queue<file>::kernel_1a files;
dir.get_files(files);
files.reset();
string baseUri = aUri;
if (*baseUri.rbegin() != '/') baseUri.append(1, '/');
while (files.move_next()) {
file &file = files.element();
string name = file.name();
string uri = baseUri + name;
mFileMap.insert(pair<string,string>(uri, file.full_name()));
// Check if the file name maps to a standard MTConnect schema file.
if (name.find("MTConnect") == 0 && name.substr(name.length() - 4, 4) == ".xsd" &&
XmlPrinter::getSchemaVersion() == name.substr(name.length() - 7, 3)) {
string version = name.substr(name.length() - 7, 3);
if (name.substr(9, 5) == "Error") {
string urn = "urn:mtconnect.org:MTConnectError:" + XmlPrinter::getSchemaVersion();
XmlPrinter::addErrorNamespace(urn, uri, "m");
} else if (name.substr(9, 7) == "Devices") {
string urn = "urn:mtconnect.org:MTConnectDevices:" + XmlPrinter::getSchemaVersion();
XmlPrinter::addDevicesNamespace(urn, uri, "m");
} else if (name.substr(9, 6) == "Assets") {
string urn = "urn:mtconnect.org:MTConnectAssets:" + XmlPrinter::getSchemaVersion();
XmlPrinter::addAssetsNamespace(urn, uri, "m");
} else if (name.substr(9, 7) == "Streams") {
string urn = "urn:mtconnect.org:MTConnectStreams:" + XmlPrinter::getSchemaVersion();
XmlPrinter::addStreamsNamespace(urn, uri, "m");
}
}
}
}
catch (directory::dir_not_found e) {
sLogger << LDEBUG << "registerFile: Path " << aPath << " is not a directory: "
<< e.what() << ", trying as a file";
try {
file file(aPath);
mFileMap.insert(pair<string,string>(aUri, aPath));
} catch (file::file_not_found e) {
sLogger << LERROR << "Cannot register file: " << aPath << ": " << e.what();
}
}
}
// Methods for service
const string Agent::on_request (const incoming_things& incoming,
outgoing_things& outgoing)
{
string result;
outgoing.headers["Content-Type"] = "text/xml";
try
{
sLogger << LDEBUG << "Request: " << incoming.request_type << " " <<
incoming.path << " from " << incoming.foreign_ip << ":" << incoming.foreign_port;
if (mPutEnabled)
{
if ((incoming.request_type == "PUT" || incoming.request_type == "POST") &&
!mPutAllowedHosts.empty() && mPutAllowedHosts.count(incoming.foreign_ip) == 0)
{
return printError("UNSUPPORTED",
"HTTP PUT is not allowed from " + incoming.foreign_ip);
}
if (incoming.request_type != "GET" && incoming.request_type != "PUT" &&
incoming.request_type != "POST") {
return printError("UNSUPPORTED",
"Only the HTTP GET and PUT requests are supported");
}
}
else
{
if (incoming.request_type != "GET") {
return printError("UNSUPPORTED",
"Only the HTTP GET request is supported");
}
}
// Parse the URL path looking for '/'
string path = incoming.path;
size_t qm = path.find_last_of('?');
if (qm != string::npos)
path = path.substr(0, qm);
if (isFile(path)) {
return handleFile(path, outgoing);
}
string::size_type loc1 = path.find("/", 1);
string::size_type end = (path[path.length()-1] == '/') ?
path.length() - 1 : string::npos;
string first = path.substr(1, loc1-1);
string call, device;
if (first == "assets" || first == "asset")
{
string list;
if (loc1 != string::npos)
list = path.substr(loc1 + 1);
if (incoming.request_type == "GET")
result = handleAssets(*outgoing.out, incoming.queries, list);
else
result = storeAsset(*outgoing.out, incoming.queries, list, incoming.body);
}
else
{
// If a '/' was found
if (loc1 < end)
{
// Look for another '/'
string::size_type loc2 = path.find("/", loc1+1);
if (loc2 == end)
{
device = first;
call = path.substr(loc1+1, loc2-loc1-1);
}
else
{
// Path is too long
return printError("UNSUPPORTED", "The following path is invalid: " + path);
}
}
else
{
// Try to handle the call
call = first;
}
if (incoming.request_type == "GET")
result = handleCall(*outgoing.out, path, incoming.queries, call, device);
else
result = handlePut(*outgoing.out, path, incoming.queries, call, device);
}
}
catch (exception & e)
{
printError("SERVER_EXCEPTION",(string) e.what());
}
return result;
}
Adapter * Agent::addAdapter(const string& aDeviceName,
const string& aHost,
const unsigned int aPort,
bool aStart,
int aLegacyTimeout
)
{
Adapter *adapter = new Adapter(aDeviceName, aHost, aPort, aLegacyTimeout);
adapter->setAgent(*this);
mAdapters.push_back(adapter);
Device *dev = mDeviceMap[aDeviceName];
if (dev != NULL && dev->mAvailabilityAdded)
adapter->setAutoAvailable(true);
if (aStart)
adapter->start();
return adapter;
}
unsigned int Agent::addToBuffer(DataItem *dataItem,
const string& value,
string time
)
{
if (dataItem == NULL) return 0;
dlib::auto_mutex lock(*mSequenceLock);
uint64_t seqNum = mSequence++;
ComponentEvent *event = new ComponentEvent(*dataItem, seqNum,
time, value);
(*mSlidingBuffer)[seqNum] = event;
mLatest.addComponentEvent(event);
event->unrefer();
// Special case for the first event in the series to prime the first checkpoint.
if (seqNum == 1) {
mFirst.addComponentEvent(event);
}
// Checkpoint management
int index = mSlidingBuffer->get_element_id(seqNum);
if (mCheckpointCount > 0 && index % mCheckpointFreq == 0) {
// Copy the checkpoint from the current into the slot
mCheckpoints[index / mCheckpointFreq].copy(mLatest);
}
// See if the next sequence has an event. If the event exists it
// should be added to the first checkpoint.
if ((*mSlidingBuffer)[mSequence] != NULL)
{
// Keep the last checkpoint up to date with the last.
mFirst.addComponentEvent((*mSlidingBuffer)[mSequence]);
}
dataItem->signalObservers(seqNum);
return seqNum;
}
bool Agent::addAsset(Device *aDevice, const string &aId, const string &aAsset,
const string &aType, const string &aTime)
{
// Check to make sure the values are present
if (aType.empty() || aAsset.empty() || aId.empty()) {
sLogger << LWARN << "Asset '" << aId << "' missing required type, id, or body. Asset is rejected.";
return false;
}
string time;
if (aTime.empty())
time = getCurrentTime(GMT_UV_SEC);
else
time = aTime;
AssetPtr ptr;
// Lock the asset addition to protect from multithreaded collisions. Releaes
// before we add the event so we don't cause a race condition.
{
dlib::auto_mutex lock(*mAssetLock);
try {
ptr = mXmlParser->parseAsset(aId, aType, aAsset);
}
catch (runtime_error &e) {
sLogger << LERROR << "addAsset: Error parsing asset: " << aAsset << "\n" << e.what();
return false;
}
if (ptr.getObject() == NULL)
{
sLogger << LERROR << "addAssete: Error parsing asset";
return false;
}
AssetPtr *old = &mAssetMap[aId];
if (!ptr->isRemoved())
{
if (old->getObject() != NULL)
mAssets.remove(old);
else
mAssetCounts[aType] += 1;
} else if (old->getObject() == NULL) {
sLogger << LWARN << "Cannot remove non-existent asset";
return false;
}
if (ptr.getObject() == NULL) {
sLogger << LWARN << "Asset could not be created";
return false;
} else {
ptr->setAssetId(aId);
ptr->setTimestamp(time);
ptr->setDeviceUuid(aDevice->getUuid());
}
// Check for overflow
if (mAssets.size() >= mMaxAssets)
{
AssetPtr oldref(*mAssets.front());
mAssetCounts[oldref->getType()] -= 1;
mAssets.pop_front();
mAssetMap.erase(oldref->getAssetId());
// Add secondary keys
AssetKeys &keys = oldref->getKeys();
AssetKeys::iterator iter;
for (iter = keys.begin(); iter != keys.end(); iter++)
{
AssetIndex &index = mAssetIndices[iter->first];
index.erase(iter->second);
}
}
mAssetMap[aId] = ptr;
if (!ptr->isRemoved())
{
AssetPtr &newPtr = mAssetMap[aId];
mAssets.push_back(&newPtr);
}
// Add secondary keys
AssetKeys &keys = ptr->getKeys();
AssetKeys::iterator iter;
for (iter = keys.begin(); iter != keys.end(); iter++)
{
AssetIndex &index = mAssetIndices[iter->first];
index[iter->second] = ptr;
}
}
// Generate an asset chnaged event.
if (ptr->isRemoved())
addToBuffer(aDevice->getAssetRemoved(), aType + "|" + aId, time);
else
addToBuffer(aDevice->getAssetChanged(), aType + "|" + aId, time);
return true;
}
bool Agent::updateAsset(Device *aDevice, const std::string &aId, AssetChangeList &aList,
const string &aTime)
{
AssetPtr asset;
string time;
if (aTime.empty())
time = getCurrentTime(GMT_UV_SEC);
else
time = aTime;
{
dlib::auto_mutex lock(*mAssetLock);
asset = mAssetMap[aId];
if (asset.getObject() == NULL)
return false;
if (asset->getType() != "CuttingTool" && asset->getType() != "CuttingToolArchitype")
return false;
CuttingToolPtr tool((CuttingTool*) asset.getObject());
try {
AssetChangeList::iterator iter;
for (iter = aList.begin(); iter != aList.end(); ++iter)
{
if (iter->first == "xml") {
mXmlParser->updateAsset(asset, asset->getType(), iter->second);
} else {
tool->updateValue(iter->first, iter->second);
}
}
}
catch (runtime_error &e) {
sLogger << LERROR << "updateAsset: Error parsing asset: " << asset << "\n" << e.what();
return false;
}
// Move it to the front of the queue
mAssets.remove(&asset);
mAssets.push_back(&asset);
tool->setTimestamp(aTime);
tool->setDeviceUuid(aDevice->getUuid());
tool->changed();
}
addToBuffer(aDevice->getAssetChanged(), asset->getType() + "|" + aId, time);
return true;
}
bool Agent::removeAsset(Device *aDevice, const std::string &aId, const string &aTime)
{
AssetPtr asset;
string time;
if (aTime.empty())
time = getCurrentTime(GMT_UV_SEC);
else
time = aTime;
{
dlib::auto_mutex lock(*mAssetLock);
asset = mAssetMap[aId];
if (asset.getObject() == NULL)
return false;
asset->setRemoved(true);
asset->setTimestamp(aTime);
}
addToBuffer(aDevice->getAssetRemoved(), asset->getType() + "|" + aId, time);
return true;
}
/* Add values for related data items UNAVAILABLE */
void Agent::disconnected(Adapter *anAdapter, std::vector<Device*> aDevices)
{
string time = getCurrentTime(GMT_UV_SEC);
sLogger << LDEBUG << "Disconnected from adapter, setting all values to UNAVAILABLE";
std::vector<Device*>::iterator iter;
for (iter = aDevices.begin(); iter != aDevices.end(); ++iter) {
std::map<std::string, DataItem *> dataItems = (*iter)->getDeviceDataItems();
std::map<std::string, DataItem*>::iterator dataItemAssoc;
for (dataItemAssoc = dataItems.begin(); dataItemAssoc != dataItems.end(); ++dataItemAssoc)
{
DataItem *dataItem = (*dataItemAssoc).second;
if (dataItem != NULL && (dataItem->getDataSource() == anAdapter ||
(anAdapter->isAutoAvailable() &&
dataItem->getDataSource() == NULL &&
dataItem->getType() == "AVAILABILITY")))
{
ComponentEventPtr *ptr = mLatest.getEventPtr(dataItem->getId());
if (ptr != NULL) {
const string *value = NULL;
if (dataItem->isCondition()) {
if ((*ptr)->getLevel() != ComponentEvent::UNAVAILABLE)
value = &sConditionUnavailable;
} else if (dataItem->hasConstraints()) {
std::vector<std::string> &values = dataItem->getConstrainedValues();
if (values.size() > 1 && (*ptr)->getValue() != sUnavailable)
value = &sUnavailable;
} else if ((*ptr)->getValue() != sUnavailable) {
value = &sUnavailable;
}
if (value != NULL)
addToBuffer(dataItem, *value, time);
}
} else if (dataItem == NULL) {
sLogger << LWARN << "No data Item for " << (*dataItemAssoc).first;
}
}
}
}
void Agent::connected(Adapter *anAdapter, std::vector<Device*> aDevices)
{
if (anAdapter->isAutoAvailable()) {
string time = getCurrentTime(GMT_UV_SEC);
std::vector<Device*>::iterator iter;
for (iter = aDevices.begin(); iter != aDevices.end(); ++iter) {
sLogger << LDEBUG << "Connected to adapter, setting all Availability data items to AVAILABLE";
if ((*iter)->getAvailability() != NULL)
{
sLogger << LDEBUG << "Adding availabilty event for " << (*iter)->getAvailability()->getId();
addToBuffer((*iter)->getAvailability(), sAvailable, time);
}
else
{
sLogger << LDEBUG << "Cannot find availability for " << (*iter)->getName();
}
}
}
}
/* Agent protected methods */
string Agent::handleCall(ostream& out,
const string& path,
const key_value_map& queries,
const string& call,
const string& device)
{
try {
string deviceName;
if (!device.empty())
{
deviceName = device;
}
if (call == "current")
{
const string path = queries[(string) "path"];
string result;
int freq = checkAndGetParam(queries, "frequency", NO_FREQ,
FASTEST_FREQ, false,SLOWEST_FREQ);
// Check for 1.2 conversion to interval
if (freq == NO_FREQ)
freq = checkAndGetParam(queries, "interval", NO_FREQ,
FASTEST_FREQ, false, SLOWEST_FREQ);
uint64_t at = checkAndGetParam64(queries, "at", NO_START, getFirstSequence(), true,
mSequence - 1);
int heartbeat = checkAndGetParam(queries, "heartbeat", 10000, 10, true, 600000);
if (freq != NO_FREQ && at != NO_START) {
return printError("INVALID_REQUEST", "You cannot specify both the at and frequency arguments to a current request");
}
return handleStream(out, devicesAndPath(path, deviceName), true,
freq, at, 0, heartbeat);
}
else if (call == "probe" || call.empty())
{
return handleProbe(deviceName);
}
else if (call == "sample")
{
string path = queries[(string) "path"];
string result;
int count = checkAndGetParam(queries, "count", DEFAULT_COUNT,
1, true, mSlidingBufferSize);
int freq = checkAndGetParam(queries, "frequency", NO_FREQ,
FASTEST_FREQ, false, SLOWEST_FREQ);
// Check for 1.2 conversion to interval
if (freq == NO_FREQ)
freq = checkAndGetParam(queries, "interval", NO_FREQ,
FASTEST_FREQ, false, SLOWEST_FREQ);
uint64 start = checkAndGetParam64(queries, "start", NO_START, getFirstSequence(),
true, mSequence);
if (start == NO_START) // If there was no data in queries
{
start = checkAndGetParam64(queries, "from", 1,
getFirstSequence(), true, mSequence);
}
int heartbeat = checkAndGetParam(queries, "heartbeat", 10000, 10, true, 600000);
return handleStream(out, devicesAndPath(path, deviceName), false,
freq, start, count, heartbeat);
}
else if ((mDeviceMap[call] != NULL) && device.empty())
{
return handleProbe(call);
}
else
{
return printError("UNSUPPORTED",
"The following path is invalid: " + path);
}
}
catch (ParameterError &aError)
{
return printError(aError.mCode, aError.mMessage);
}
}
/* Agent protected methods */
string Agent::handlePut(
ostream& out,
const string& path,
const key_value_map& queries,
const string& adapter,
const string& deviceName
)
{
string device = deviceName;
if (device.empty() && adapter.empty())
{
return printError("UNSUPPORTED",
"Device must be specified for PUT");
} else if (device.empty()) {
device = adapter;
}
Device *dev = mDeviceMap[device];
if (dev == NULL) {
string message = ((string) "Cannot find device: ") + device;
return printError("UNSUPPORTED", message);
}
// First check if this is an adapter put or a data put...
if (queries["_type"] == "command")
{
std::vector<Adapter*>::iterator adpt;
for (adpt = dev->mAdapters.begin(); adpt != dev->mAdapters.end(); adpt++) {
key_value_map::const_iterator kv;
for (kv = queries.begin(); kv != queries.end(); kv++) {
string command = kv->first + "=" + kv->second;
sLogger << LDEBUG << "Sending command '" << command << "' to " << device;
(*adpt)->sendCommand(command);
}
}
}
else
{
string time = queries["time"];
if (time.empty())
time = getCurrentTime(GMT_UV_SEC);
key_value_map::const_iterator kv;
for (kv = queries.begin(); kv != queries.end(); kv++) {
if (kv->first != "time")
{
DataItem *di = dev->getDeviceDataItem(kv->first);
if (di != NULL)
addToBuffer(di, kv->second, time);
else
sLogger << LWARN << "(" << device << ") Could not find data item: " << kv->first;
}
}
}
return "<success/>";
}
string Agent::handleProbe(const string& name)
{
std::vector<Device *> mDeviceList;
if (!name.empty())
{
Device * device = getDeviceByName(name);
if (device == NULL)
{
return printError("NO_DEVICE",
"Could not find the device '" + name + "'");
}
else
{
mDeviceList.push_back(device);
}
}
else
{
mDeviceList = mDevices;
}
return XmlPrinter::printProbe(mInstanceId, mSlidingBufferSize, mSequence,
mMaxAssets, mAssets.size(),
mDeviceList, &mAssetCounts);
}
string Agent::handleStream(
ostream& out,
const string& path,
bool current,
unsigned int frequency,
uint64_t start,
unsigned int count,
unsigned int aHb
)
{
std::set<string> filter;
try
{
mXmlParser->getDataItems(filter, path);
}
catch (exception& e)
{
return printError("INVALID_XPATH", e.what());
}
if (filter.empty())
{
return printError("INVALID_XPATH",
"The path could not be parsed. Invalid syntax: " + path);
}
// Check if there is a frequency to stream data or not
if (frequency != (unsigned) NO_FREQ)
{
streamData(out, filter, current, frequency, start, count, aHb);
return "";
}
else
{
uint64_t end;
bool endOfBuffer;
if (current)
return fetchCurrentData(filter, start);
else
return fetchSampleData(filter, start, count, end, endOfBuffer);
}
}
std::string Agent::handleAssets(std::ostream& aOut,
const key_value_map& aQueries,
const std::string& aList)
{
using namespace dlib;
std::vector<AssetPtr> assets;
if (!aList.empty())
{
auto_mutex lock(*mAssetLock);
istringstream str(aList);
tokenizer_kernel_1 tok;
tok.set_stream(str);
tok.set_identifier_token(tok.lowercase_letters() + tok.uppercase_letters() +
tok.numbers() + "_.@$%&^:+-_=",
tok.lowercase_letters() + tok.uppercase_letters() +
tok.numbers() + "_.@$%&^:+-_=");
int type;
string token;
for (tok.get_token(type, token); type != tok.END_OF_FILE; tok.get_token(type, token))
{
if (type == tok.IDENTIFIER)
{
AssetPtr ptr = mAssetMap[token];
if (ptr.getObject() == NULL)
return XmlPrinter::printError(mInstanceId, 0, 0, "ASSET_NOT_FOUND",
(string) "Could not find asset: " + token);
assets.push_back(ptr);
}
}
}
else
{
auto_mutex lock(*mAssetLock);
// Return all asssets, first check if there is a type attribute
string type = aQueries["type"];
bool removed = (aQueries.count("removed") > 0 && aQueries["removed"] == "true");
int count = checkAndGetParam(aQueries, "count", mAssets.size(),
1, false, NO_VALUE32);
list<AssetPtr*>::reverse_iterator iter;
for (iter = mAssets.rbegin(); iter != mAssets.rend() && count > 0; ++iter, --count)
{
if ((type.empty() || type == (**iter)->getType()) && (removed || !(**iter)->isRemoved())) {
assets.push_back(**iter);
}
}
}
return XmlPrinter::printAssets(mInstanceId, mMaxAssets, mAssets.size(), assets);
}
// Store an asset in the map by asset # and use the circular buffer as
// an LRU. Check if we're removing an existing asset and clean up the
// map, and then store this asset.
std::string Agent::storeAsset(std::ostream& aOut,
const key_value_map& aQueries,
const std::string& aId,
const std::string& aBody)
{
string name = aQueries["device"];
string type = aQueries["type"];
Device *device = NULL;
if (!name.empty()) device = mDeviceMap[name];
// If the device was not found or was not provided, use the default device.
if (device == NULL) device = mDevices[0];
if (addAsset(device, aId, aBody, type))
return "<success/>";
else
return "<failure/>";
}
string Agent::handleFile(const string &aUri, outgoing_things& aOutgoing)
{
// Get the mime type for the file.
bool unknown = true;
size_t last = aUri.find_last_of("./");
string contentType;
if (last != string::npos && aUri[last] == '.')
{
string ext = aUri.substr(last + 1);
if (mMimeTypes.count(ext) > 0)
{
contentType = mMimeTypes[ext];
unknown = false;
}
}
if (unknown)
contentType = "application/octet-stream";
// Check if the file is cached
RefCountedPtr<CachedFile> cachedFile;
std::map<string, RefCountedPtr<CachedFile> >::iterator cached = mFileCache.find(aUri);
if (cached != mFileCache.end())
cachedFile = cached->second;
else
{
std::map<string,string>::iterator file = mFileMap.find(aUri);
// Should never happen
if (file == mFileMap.end()) {
aOutgoing.http_return = 404;
aOutgoing.http_return_status = "File not found";
return "";
}
const char *path = file->second.c_str();
struct stat fs;
int res = stat(path, &fs);
if (res != 0) {
aOutgoing.http_return = 404;
aOutgoing.http_return_status = "File not found";
return "";
}
int fd = open(path, O_RDONLY | O_BINARY);
if (res < 0) {
aOutgoing.http_return = 404;
aOutgoing.http_return_status = "File not found";
return "";
}
cachedFile.setObject(new CachedFile(fs.st_size), true);
int bytes = read(fd, cachedFile->mBuffer, fs.st_size);
close(fd);
if (bytes < fs.st_size) {
aOutgoing.http_return = 404;
aOutgoing.http_return_status = "File not found";
return "";
}
// If this is a small file, cache it.
if (bytes <= SMALL_FILE) {
mFileCache.insert(pair<string, RefCountedPtr<CachedFile> >(aUri, cachedFile));
}
}
(*aOutgoing.out) << "HTTP/1.1 200 OK\r\n"
"Date: " << getCurrentTime(HUM_READ) << "\r\n"
"Server: MTConnectAgent\r\n"
"Connection: close\r\n"
"Content-Length: " << cachedFile->mSize << "\r\n"
"Expires: " << getCurrentTime(time(NULL) + 60 * 60 * 24, 0, HUM_READ) << "\r\n"
"Content-Type: " << contentType << "\r\n\r\n";
aOutgoing.out->write(cachedFile->mBuffer, cachedFile->mSize);
aOutgoing.out->setstate(ios::badbit);
return "";
}
void Agent::streamData(ostream& out,
std::set<string> &aFilter,
bool current,
unsigned int aInterval,
uint64_t start,
unsigned int count,
unsigned int aHeartbeat
)
{
// Create header
string boundary = md5(intToString(time(NULL)));
ofstream log;
if (mLogStreamData)
{
string filename = "Stream_" + getCurrentTime(LOCAL) + "_" +
int64ToString((uint64_t) dlib::get_thread_id()) + ".log";
log.open(filename.c_str());
}
out << "HTTP/1.1 200 OK\r\n"
"Date: " << getCurrentTime(HUM_READ) << "\r\n"
"Server: MTConnectAgent\r\n"
"Expires: -1\r\n"
"Connection: close\r\n"
"Cache-Control: private, max-age=0\r\n"
"Content-Type: multipart/x-mixed-replace;boundary=" << boundary << "\r\n"
"Transfer-Encoding: chunked\r\n\r\n";
// This object will automatically clean up all the observer from the
// signalers in an exception proof manor.
ChangeObserver observer;
// Add observers
std::set<string>::iterator iter;
for (iter = aFilter.begin(); iter != aFilter.end(); ++iter)
mDataItemMap[*iter]->addObserver(&observer);
uint64_t interMicros = aInterval * 1000;
uint64_t firstSeq = getFirstSequence();
if (start < firstSeq)
start = firstSeq;
try {
// Loop until the user closes the connection
timestamper ts;
while (out.good())
{
// Remember when we started this grab...
uint64_t last = ts.get_timestamp();
// Fetch sample data now resets the observer while holding the sequence
// mutex to make sure that a new event will be recorded in the observer
// when it returns.
string content;
uint64_t end;
bool endOfBuffer = true;
if (current) {
content = fetchCurrentData(aFilter, NO_START);
} else {
// Check if we're falling too far behind. If we are, generate an
// MTConnectError and return.
if (start < getFirstSequence()) {
sLogger << LWARN << "Client fell too far behind, disconnecting";
throw ParameterError("OUT_OF_RANGE", "Client can't keep up with event stream, disconnecting");
} else {
// end and endOfBuffer are set during the fetch sample data while the
// mutex is held. This removed the race to check if we are at the end of
// the bufffer and setting the next start to the last sequence number
// sent.
content = fetchSampleData(aFilter, start, count, end,
endOfBuffer, &observer);
}
if (mLogStreamData)
log << content << endl;
}
ostringstream str;
// Make sure we're terminated with a <cr><nl>
content.append("\r\n");
out.setf(ios::dec, ios::basefield);
str << "--" << boundary << "\r\n"
"Content-type: text/xml\r\n"
"Content-length: " << content.length() << "\r\n\r\n"
<< content;
string chunk = str.str();
out.setf(ios::hex, ios::basefield);
out << chunk.length() << "\r\n";
out << chunk << "\r\n";
out.flush();
// Wait for up to frequency ms for something to arrive... Don't wait if
// we are not at the end of the buffer. Just put the next set after aInterval
// has elapsed. Check also if in the intervening time between the last fetch
// and now. If so, we just spin through and wait the next interval.
// Even if we are at the end of the buffer, or within range. If we are filtering,
// we will need to make sure we are not spinning when there are no valid events
// to be reported. we will waste cycles spinning on the end of the buffer when
// we should be in a heartbeat wait as well.
if (!endOfBuffer) {
// If we're not at the end of the buffer, move to the end of the previous set and
// begin filtering from where we left off.
start = end;
// For replaying of events, we will stream as fast as we can with a 1ms sleep
// to allow other threads to run.
dlib::sleep(1);
} else {
uint64 delta;
if (!current) {
// Busy wait to make sure the signal was actually signaled. We have observed that
// a signal can occur in rare conditions where there are multiple threads listening
// on separate condition variables and this pops out too soon. This will make sure
// observer was actually signaled and instead of throwing an error will wait again
// for the remaining hartbeat interval.
delta = (ts.get_timestamp() - last) / 1000;
while (delta < aHeartbeat &&
observer.wait(aHeartbeat - delta) &&
!observer.wasSignaled()) {
delta = (ts.get_timestamp() - last) / 1000;
}
{
dlib::auto_mutex lock(*mSequenceLock);
// Make sure the observer was signaled!
if (!observer.wasSignaled()) {
// If nothing came out during the last wait, we may have still have advanced
// the sequence number. We should reset the start to something closer to the
// current sequence. If we lock the sequence lock, we can check if the observer
// was signaled between the time the wait timed out and the mutex was locked.
// Otherwise, nothing has arrived and we set to the next sequence number to
// the next sequence number to be allocated and continue.
start = mSequence;
} else {
// Get the sequence # signaled in the observer when the earliest event arrived.
// This will allow the next set of data to be pulled. Any later events will have
// greater sequence numbers, so this should not cause a problem. Also, signaled
// sequence numbers can only decrease, never increase.
start = observer.getSequence();
}
}
}
// Now wait the remainder if we triggered before the timer was up.
delta = ts.get_timestamp() - last;
if (delta < interMicros) {
// Sleep the remainder
dlib::sleep((interMicros - delta) / 1000);
}
}
}
}
catch (ParameterError &aError)
{
sLogger << LINFO << "Caught a parameter error.";
if (out.good()) {
ostringstream str;
string content = printError(aError.mCode, aError.mMessage);
str << "--" << boundary << "\r\n"
"Content-type: text/xml\r\n"
"Content-length: " << content.length() << "\r\n\r\n"
<< content;
string chunk = str.str();
out.setf(ios::hex, ios::basefield);
out << chunk.length() << "\r\n";
out << chunk << "\r\n";
out.flush();
}
}
catch (...)
{
sLogger << LWARN << "Error occurred during streaming data";
if (out.good()) {
ostringstream str;
string content = printError("INTERNAL_ERROR", "Unknown error occurred during streaming");
str << "--" << boundary << "\r\n"
"Content-type: text/xml\r\n"
"Content-length: " << content.length() << "\r\n\r\n"
<< content;
string chunk = str.str();
out.setf(ios::hex, ios::basefield);
out << chunk.length() << "\r\n";
out << chunk;
out.flush();
}
}
out.setstate(ios::badbit);
// Observer is auto removed from signalers
}
string Agent::fetchCurrentData(std::set<string> &aFilter, uint64_t at)
{
ComponentEventPtrArray events;
uint64_t firstSeq, seq;
{
dlib::auto_mutex lock(*mSequenceLock);
firstSeq = getFirstSequence();
seq = mSequence;
if (at == NO_START)
{
mLatest.getComponentEvents(events, &aFilter);
}
else
{
long pos = (long) mSlidingBuffer->get_element_id(at);
long first = (long) mSlidingBuffer->get_element_id(firstSeq);
long checkIndex = pos / mCheckpointFreq;
long closestCp = checkIndex * mCheckpointFreq;
unsigned long index;
Checkpoint *ref;
// Compute the closest checkpoint. If the checkpoint is after the
// first checkpoint and before the next incremental checkpoint,
// use first.
if (first > closestCp && pos >= first)
{
ref = &mFirst;
// The checkpoint is inclusive of the "first" event. So we add one
// so we don't duplicate effort.
index = first + 1;
}
else
{
index = closestCp + 1;
ref = &mCheckpoints[checkIndex];
}
Checkpoint check(*ref, &aFilter);
// Roll forward from the checkpoint.
for (; index <= (unsigned long) pos; index++) {
check.addComponentEvent(((*mSlidingBuffer)[(unsigned long)index]).getObject());
}
check.getComponentEvents(events);
}
}
string toReturn = XmlPrinter::printSample(mInstanceId, mSlidingBufferSize,
seq, firstSeq, mSequence - 1, events);
return toReturn;
}
string Agent::fetchSampleData(std::set<string> &aFilter,
uint64_t start, unsigned int count, uint64_t &end,
bool &endOfBuffer, ChangeObserver *aObserver)
{
ComponentEventPtrArray results;
uint64_t firstSeq;
{
dlib::auto_mutex lock(*mSequenceLock);
firstSeq = (mSequence > mSlidingBufferSize) ?
mSequence - mSlidingBufferSize : 1;
// START SHOULD BE BETWEEN 0 AND SEQUENCE NUMBER
start = (start <= firstSeq) ? firstSeq : start;
uint64_t i;
for (i = start; results.size() < count && i < mSequence; i++)
{
// Filter out according to if it exists in the list
const string &dataId = (*mSlidingBuffer)[i]->getDataItem()->getId();
if (aFilter.count(dataId) > 0)
{
ComponentEventPtr event = (*mSlidingBuffer)[i];
results.push_back(event);
}
}
end = i;
if (i >= mSequence)
endOfBuffer = true;
else
endOfBuffer = false;
if (aObserver != NULL) aObserver->reset();
}
return XmlPrinter::printSample(mInstanceId, mSlidingBufferSize, end,
firstSeq, mSequence - 1, results);
}
string Agent::printError(const string& errorCode, const string& text)
{
sLogger << LDEBUG << "Returning error " << errorCode << ": " << text;
return XmlPrinter::printError(mInstanceId, mSlidingBufferSize, mSequence,
errorCode, text);
}
string Agent::devicesAndPath(const string& path, const string& device)
{
string dataPath = "";
if (!device.empty())
{
string prefix = "//Devices/Device[@name=\"" + device + "\"]";
if (!path.empty())
{
istringstream toParse(path);
string token;
// Prefix path (i.e. "path1|path2" => "{prefix}path1|{prefix}path2")
while (getline(toParse, token, '|'))
{
dataPath += prefix + token + "|";
}
dataPath.erase(dataPath.length()-1);
}
else
{
dataPath = prefix;
}
}
else
{
dataPath = (!path.empty()) ? path : "//Devices/Device";
}
return dataPath;
}
int Agent::checkAndGetParam(const key_value_map& queries,
const string& param,
const int defaultValue,
const int minValue,
bool minError,
const int maxValue)
{
if (queries.count(param) == 0)
{
return defaultValue;
}
if (queries[param].empty())
{
throw ParameterError("QUERY_ERROR", "'" + param + "' cannot be empty.");
}
if (!isNonNegativeInteger(queries[param]))
{
throw ParameterError("OUT_OF_RANGE",
"'" + param + "' must be a positive integer.");
}
long int value = strtol(queries[param].c_str(), NULL, 10);
if (minValue != NO_VALUE32 && value < minValue)
{
if (minError)
{
throw ParameterError("OUT_OF_RANGE",
"'" + param + "' must be greater than or equal to " + intToString(minValue) + ".");
}
return minValue;
}
if (maxValue != NO_VALUE32 && value > maxValue)
{
throw ParameterError("OUT_OF_RANGE",
"'" + param + "' must be less than or equal to " + intToString(maxValue) + ".");
}
return value;
}
uint64_t Agent::checkAndGetParam64(const key_value_map& queries,
const string& param,
const uint64_t defaultValue,
const uint64_t minValue,
bool minError,
const uint64_t maxValue)
{
if (queries.count(param) == 0)
{
return defaultValue;
}
if (queries[param].empty())
{
throw ParameterError("QUERY_ERROR", "'" + param + "' cannot be empty.");
}
if (!isNonNegativeInteger(queries[param]))
{
throw ParameterError("OUT_OF_RANGE",
"'" + param + "' must be a positive integer.");
}
uint64_t value = strtoull(queries[param].c_str(), NULL, 10);
if (minValue != NO_VALUE64 && value < minValue)
{
if (minError)
{
throw ParameterError("OUT_OF_RANGE",
"'" + param + "' must be greater than or equal to " + intToString(minValue) + ".");
}
return minValue;
}
if (maxValue != NO_VALUE64 && value > maxValue)
{
throw ParameterError("OUT_OF_RANGE",
"'" + param + "' must be less than or equal to " + intToString(maxValue) + ".");
}
return value;
}
DataItem * Agent::getDataItemByName(const string& device, const string& name)
{
Device *dev = mDeviceMap[device];
return (dev) ? dev->getDeviceDataItem(name) : NULL;
}
void Agent::updateDom(Device *aDevice)
{
mXmlParser->updateDevice(aDevice);
}
| [
"michalos@woodsy.el.nist.gov"
] | michalos@woodsy.el.nist.gov |
d87098fc80d2e15db5fda4bb7bfe50dea23792a5 | c26b3f1cb425ff5069b04c02b8e36b106bea4549 | /Tests/DiligentCoreAPITest/include/InlineShaders/TessellationTestHLSL.h | a94beb5c99655c67094be3798535873807921aa6 | [
"Apache-2.0"
] | permissive | englercj/DiligentCore | eea42b7cf34e1d8f0ec28bddfae3fe26765cf767 | 8151bc6df37372eb91011edede9ffbb258ebeab6 | refs/heads/master | 2023-08-01T11:30:56.298617 | 2020-05-22T23:19:39 | 2020-05-22T23:19:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,178 | h | /*
* Copyright 2019-2020 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* 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.
*
* In no event and under no legal theory, whether in tort (including negligence),
* contract, or otherwise, unless required by applicable law (such as deliberate
* and grossly negligent acts) or agreed to in writing, shall any Contributor be
* liable for any damages, including any direct, indirect, special, incidental,
* or consequential damages of any character arising as a result of this License or
* out of the use or inability to use the software (including but not limited to damages
* for loss of goodwill, work stoppage, computer failure or malfunction, or any and
* all other commercial damages or losses), even if such Contributor has been advised
* of the possibility of such damages.
*/
#include <string>
namespace
{
namespace HLSL
{
// clang-format off
const std::string TessTest_VS{
R"(
struct VSOutput
{
float4 f4Position : SV_Position;
float3 f3Color : COLOR;
};
void main(uint uiVertexId : SV_VertexID,
out VSOutput Out)
{
float4 Positions[2];
Positions[0] = float4(-0.5, -0.5, 0.0, 1.0);
Positions[1] = float4(+0.5, +0.5, 0.0, 1.0);
float3 Color[2];
Color[0] = float3(0.5, 0.0, 0.0);
Color[1] = float3(0.0, 0.0, 0.5);
Out.f4Position = Positions[uiVertexId];
Out.f3Color = Color[uiVertexId];
}
)"
};
const std::string TessTest_HS{
R"(
struct VSOutput
{
float4 f4Position : SV_Position;
float3 f3Color : COLOR;
};
struct HS_CONSTANT_DATA_OUTPUT
{
float Edges[4] : SV_TessFactor;
float Inside[2] : SV_InsideTessFactor;
};
HS_CONSTANT_DATA_OUTPUT ConstantHS(InputPatch<VSOutput, 1> p,
uint BlockID : SV_PrimitiveID)
{
HS_CONSTANT_DATA_OUTPUT Factors;
Factors.Edges[0] = 2.5;
Factors.Edges[1] = 4.25;
Factors.Edges[2] = 5.75;
Factors.Edges[3] = 7.5;
Factors.Inside[0] = 6.75;
Factors.Inside[1] = 7.25;
return Factors;
}
struct HSOutput
{
float4 Position : POS;
float3 Color : COL;
};
[domain("quad")]
[partitioning("fractional_even")]
[outputtopology("triangle_ccw")]
[outputcontrolpoints(1)]
[patchconstantfunc("ConstantHS")]
[maxtessfactor( (float)(32.0 + 2.0) )]
HSOutput main(InputPatch<VSOutput, 1> inputPatch, uint uCPID : SV_OutputControlPointID)
{
HSOutput Out;
Out.Position = inputPatch[uCPID].f4Position;
Out.Color = inputPatch[uCPID].f3Color;
return Out;
}
)"
};
const std::string TessTest_DS{
R"(
struct DSOutput
{
float4 f4Position : SV_Position;
float3 f3Color : COLOR;
};
struct HS_CONSTANT_DATA_OUTPUT
{
float Edges[4] : SV_TessFactor;
float Inside[2] : SV_InsideTessFactor;
};
struct HSOutput
{
float4 Position : POS;
float3 Color : COL;
};
[domain("quad")]
/* partitioning = fractional_even,
outputtopology = triangle_ccw */
void main( HS_CONSTANT_DATA_OUTPUT Input,
float2 QuadUV : SV_DomainLocation,
OutputPatch<HSOutput, 1> QuadPatch,
out DSOutput Out)
{
Out.f4Position.xy = QuadPatch[0].Position.xy + (QuadUV.xy - float2(0.5, 0.5)) * 0.875;
Out.f4Position.zw = QuadPatch[0].Position.zw;
Out.f3Color = QuadPatch[0].Color + float3(QuadUV.xy, 1.0 - QuadUV.x * QuadUV.y) * 0.75;
}
)"
};
const std::string TessTest_PS{
R"(
struct DSOutput
{
float4 f4Position : SV_Position;
float3 f3Color : COLOR;
};
void main(DSOutput In,
out float4 Color : SV_Target)
{
Color = float4(In.f3Color, 1.0);
}
)"
};
// clang-format on
} // namespace HLSL
} // namespace
| [
"assiduous@diligentgraphics.com"
] | assiduous@diligentgraphics.com |
72c270d128db526f8fa806a0913a656343c3df61 | 7764b7dc4af929e13a05ba37d932005eb110010f | /Prac3.1/State.h | a029641aea503517f8dc46daa6c8666afa2c8902 | [] | no_license | Scott-Klein/DSA-Prac3 | 4092debecbd0f8737f9d86a9c230f80bddcaa498 | 9dd1d1cde57e3616df798acdd150339356c53906 | refs/heads/master | 2021-02-26T21:06:38.116002 | 2020-03-09T06:58:16 | 2020-03-09T06:58:16 | 245,553,377 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 89 | h | #pragma once
class State
{
private:
public:
int list[10];
int Size = 9;
State();
};
| [
"scotty.klei@gmail.com"
] | scotty.klei@gmail.com |
45746ab68f2d8a0650fffc5a9f6bfe82a1a8fb76 | 36655882886da9fa852d1db652a6163299c2ad36 | /SpaJam2016/Photon-SDK/Android/Demos/demo_memory/src/LoadBalancingListener.h | d333ffc2a48a77b55dbb4a8823d2abe81cc6386b | [] | no_license | HidehikoKondo/FlashMob | 37789da1345b9e719c7d39a916013f1beeb9cfa8 | b8b803153be9a7a5f0ad163c6d704ff7b17514c4 | refs/heads/master | 2023-02-15T14:23:31.039876 | 2017-11-03T08:06:53 | 2017-11-03T08:06:53 | 326,894,274 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,814 | h | #pragma once
#include "LoadBalancing-cpp/inc/Client.h"
#include "BaseView.h"
#include "OutputListener.h"
class Game;
// Also used as main controlling object
class LoadBalancingListener : public ExitGames::LoadBalancing::Listener
{
public:
LoadBalancingListener();
~LoadBalancingListener();
void init(ExitGames::LoadBalancing::Client* pLbc, BaseView* pView);
void connect(const ExitGames::Common::JString& userName);
bool leave(void);
void service(void);
void createRoom(const ExitGames::Common::JString& userName);
void click(int tileIdx);
void querySavedRoomList();
void joinRoom(const ExitGames::Common::JString& gameId);
void joinSavedRoom(const ExitGames::Common::JString& gameId);
void joinRandomRoom(void);
void suspendRoom(void);
void abandonRoom(void);
int getNextPlayer(int fromPlayer);
ExitGames::LoadBalancing::Client* getClient();
private:
//From LoadBalancing::LoadBalancingListener
// receive and print out Photon LoadBalancing debug out here
virtual void debugReturn(int debugLevel, const ExitGames::Common::JString& string);
// implement your error-handling here
virtual void connectionErrorReturn(int errorCode);
virtual void clientErrorReturn(int errorCode);
virtual void warningReturn(int warningCode);
virtual void serverErrorReturn(int errorCode);
// events, triggered by certain operations of all players in the same room
virtual void joinRoomEventAction(int playerNr, const ExitGames::Common::JVector<int>& playernrs, const ExitGames::LoadBalancing::Player& player);
virtual void leaveRoomEventAction(int playerNr, bool isInactive);
virtual void customEventAction(int playerNr, nByte eventCode, const ExitGames::Common::Object& eventContent);
// callbacks for operations on PhotonLoadBalancing server
virtual void connectReturn(int errorCode, const ExitGames::Common::JString& errorString);
virtual void disconnectReturn(void);
virtual void createRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
virtual void joinOrCreateRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
virtual void joinRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
virtual void joinRandomRoomReturn(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties, const ExitGames::Common::Hashtable& playerProperties, int errorCode, const ExitGames::Common::JString& errorString);
virtual void leaveRoomReturn(int errorCode, const ExitGames::Common::JString& errorString);
virtual void gotQueuedReturn(void);
virtual void joinLobbyReturn(void);
virtual void leaveLobbyReturn(void);
virtual void onRoomListUpdate(void);
virtual void onRoomPropertiesChange(const ExitGames::Common::Hashtable& changes);
virtual void webRpcReturn(int errorCode, const ExitGames::Common::JString& errorString, const ExitGames::Common::JString& uriPath, int resultCode, const ExitGames::Common::Dictionary<ExitGames::Common::Object, ExitGames::Common::Object>& data);
void updateState(void);
void afterRoomJoined(int localPlayerNr, const ExitGames::Common::Hashtable& gameProperties);
ExitGames::Common::Logger mLogger;
ExitGames::LoadBalancing::Client* mpLbc;
BaseView* mpView;
Game* mpGame;
ExitGames::Common::Dictionary<ExitGames::Common::JString, ExitGames::Common::Dictionary<ExitGames::Common::Object, ExitGames::Common::Object> > mSavedRoomList;
};
| [
"takashi.ohsaka@gmail.com"
] | takashi.ohsaka@gmail.com |
230980d0549c3d12745037cfebeb42f73e5a0044 | 9bbb290eb606ee03fc43e1c1f84ac96b2eb1d030 | /main.cpp | 30424e60cdf4838519dee2d0d7f218cf4e22e38b | [] | no_license | lev-gevorgyan/type_traits | 6e2f0b0d546e846228b6b08036f2486d3c778215 | ba42f7ad719ed64164ae5a8e64986eb29e716718 | refs/heads/master | 2023-05-04T08:32:12.361015 | 2021-06-02T05:39:34 | 2021-06-02T05:39:34 | 373,052,176 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 179 | cpp | #include <iostream>
#include "is_void.hpp"
int main() {
std::cout << std::boolalpha << is_void<int>::value << std::endl << is_void<void>::value << std::endl;
return 0;
} | [
"lev.gevorgyan001@gmail.com"
] | lev.gevorgyan001@gmail.com |
affd830a78c7faa4383a6dd1254f908b0b7ab0c9 | e6eafb81baed9f58e6b54c6413b48a69a32219e7 | /ExamOOP2.h | ae1ffa65f354cf11b7aa0cce2ff0597d1b52d9d3 | [] | no_license | dianaelena12/Issue-Tracker | f682347e55f2c0b96da3f09602884c7044942902 | cc78ce3a9d1be991b00479ded2c7cc263e71cf64 | refs/heads/master | 2020-03-22T11:02:43.453047 | 2018-07-06T06:55:16 | 2018-07-06T06:55:16 | 139,942,758 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 206 | h | #pragma once
#include <QtWidgets/QMainWindow>
#include "ui_ExamOOP2.h"
class ExamOOP2 : public QMainWindow
{
Q_OBJECT
public:
ExamOOP2(QWidget *parent = Q_NULLPTR);
private:
Ui::ExamOOP2Class ui;
};
| [
"dianablueski@gmail.com"
] | dianablueski@gmail.com |
2af37546ce94c27e1729539c9126ed9b66fd09f5 | dadf8e6f3c1adef539a5ad409ce09726886182a7 | /airplay/src/toeBox2DBox.cpp | 3e2e15c2d1d888d2faf37db4c7933f2cc9c06654 | [] | no_license | sarthakpandit/toe | 63f59ea09f2c1454c1270d55b3b4534feedc7ae3 | 196aa1e71e9f22f2ecfded1c3da141e7a75b5c2b | refs/heads/master | 2021-01-10T04:04:45.575806 | 2011-06-09T12:56:05 | 2011-06-09T12:56:05 | 53,861,788 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,169 | cpp | #include <Box2D\Box2D.h>
#include <IwTextParserITX.h>
#include "toeBox2DBox.h"
#include "toeBox2DWorld.h"
using namespace TinyOpenEngine;
//Instantiate the default factory function for a named class
IW_CLASS_FACTORY(CtoeBox2DBox);
//This macro is required within some source file for every class derived from CIwManaged. It implements essential functionality
IW_MANAGED_IMPLEMENT(CtoeBox2DBox);
//Constructor
CtoeBox2DBox::CtoeBox2DBox()
{
//IwDebugTraceLinePrintf("CtoeBox2DBox(0x%08X)",this);
width = 10;
height = 10;
center = b2Vec2_zero;
angle = 0;
}
//Desctructor
CtoeBox2DBox::~CtoeBox2DBox()
{
//IwDebugTraceLinePrintf("~CtoeBox2DBox(0x%08X)",this);
}
void CtoeBox2DBox::CreateShape(b2Body* groundBody)
{
b2PolygonShape dynamicBox;
CtoeBox2DWorld*w = GetBox2DWorld();
b2Vec2 size = w->GetBox2DPosition(CIwVec3((int32)width,(int32)height,0));
dynamicBox.SetAsBox(size.x*0.5f, size.y*0.5f, center, angle);
b2FixtureDef fixtureDef;
fixtureDef.shape = &dynamicBox;
fixtureDef.density = density;
fixtureDef.friction = friction;
fixtureDef.restitution = restitution;
fixtureDef.isSensor = isSensor;
fixtureDef.filter.categoryBits = categoryBits;
fixtureDef.filter.maskBits = maskBits;
fixtureDef.filter.groupIndex = groupIndex;
fixture = groundBody->CreateFixture(&fixtureDef);
}
//Reads/writes a binary file using @a IwSerialise interface.
void CtoeBox2DBox::Serialise ()
{
CtoeBox2DSingleShape::Serialise();
IwSerialiseFloat(width);
IwSerialiseFloat(height);
IwSerialiseFloat(center.x);
IwSerialiseFloat(center.y);
IwSerialiseFloat(angle);
}
#ifdef IW_BUILD_RESOURCES
//Parses from text file: parses attribute/value pair.
bool CtoeBox2DBox::ParseAttribute(CIwTextParserITX* pParser, const char* pAttrName)
{
if (!stricmp(pAttrName,"width"))
{
pParser->ReadFloat(&width);
return true;
}
if (!stricmp(pAttrName,"height"))
{
pParser->ReadFloat(&height);
return true;
}
if (!stricmp(pAttrName,"angle"))
{
pParser->ReadFloat(&angle);
return true;
}
return CtoeBox2DSingleShape::ParseAttribute(pParser,pAttrName);
}
#endif | [
"gamemaster@101gr.com"
] | gamemaster@101gr.com |
12a4026fda71fc9ebc5c2c2c5d7e24ccfcff857c | a20c2be110d9a6828b16dbaa4b45d41458d654f6 | /source/FPointCommandLineOption.cpp | 662da7cede91d7123291e81c15a9b12c908a9f45 | [] | no_license | fstafforte/libcmdlineparser | 0ce76584f00252f192535b7f6d60a639c8f5192c | 07ca5696a4022119a08d1547023b4b9fa866a541 | refs/heads/master | 2021-01-10T11:07:30.523871 | 2017-09-08T09:43:31 | 2017-09-08T09:43:31 | 46,618,564 | 1 | 0 | null | 2017-09-08T09:43:33 | 2015-11-21T14:27:30 | C++ | UTF-8 | C++ | false | false | 1,967 | cpp | #include <FPointCommandLineOption.h>
#include <cstdlib>
/** @brief Floating point option constructor only a command line parser can call it
* @param shortForm a character used to identify an option in a short form\n
* i.g "-t"
* @param longForm a string used to identify an option in a long form\n
* i.g "--tollerance"
* @param mandatoryOption a boolean value to set an option as mandatory
**/
FPointCommandLineOption::FPointCommandLineOption(char shortForm, const string& longForm, bool mandatoryOption)
: CommandLineOption(shortForm, longForm, CommandLineOption::FPOINT, mandatoryOption, true) {
}
/** @brief Floating point option constructor only a command line parser can call it
*
* @param longForm a string used to identify an option in a long form\n
* i.g "--tollerance"
* @param mandatoryOption a boolean value to set an option as mandatory
**/
FPointCommandLineOption::FPointCommandLineOption(const string& longForm, bool mandatoryOption)
: CommandLineOption('\0', longForm, CommandLineOption::FPOINT, mandatoryOption, true) {
}
/** @brief Floating point option destructor
**/
FPointCommandLineOption::~FPointCommandLineOption() {
}
/**
* @return The option value as a floating point value (double)\n
* i.g. "--tollerance=123.45 or -t 123.45"
**/
double FPointCommandLineOption::getValue() const {
char* endptr = NULL;
return strtod(this->argument.c_str(), &endptr);
}
/** @brief Reimplemented from CommandLineOption::checkArgument\n
* this method return true if the argument passed is a string representing a numeric value\n
* i.g "--tollerance=123.45" or -t 123.45. Intger value are ammitted "--tollerance 1000"
* @param arg comman dline option argument
* @return true if argument is a valid floating point number
**/
bool FPointCommandLineOption::checkArgument(const string& arg) const {
char* endptr = NULL;
strtod(arg.c_str(), &endptr);
return ('\0' == *endptr);
}
| [
"f.stafforte@gamil.com"
] | f.stafforte@gamil.com |
fc8bb996af746c537c5d5f9c5e1f855f73e957cd | 913fe8925cc456e48667365526627e5ca6926759 | /1203.cpp | a1e999baa9a82239b9bffcffafc3ca33ae506e1a | [] | no_license | mddmdcvb2013/ACMTimus | e8ac1b1191d69a5bb3fa246262b45e7796467150 | a772a587feee615d1543aac54bc7909e9c048b68 | refs/heads/master | 2020-03-09T16:16:55.353347 | 2019-04-04T01:51:37 | 2019-04-04T01:51:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 457 | cpp | #include <iostream>
#include <algorithm>
using namespace std;
struct hui
{
int s, e;
}wuli[100010];
bool cmp(hui a, hui b)
{
return a.e<b.e;
}
int main()
{
int n, t;
scanf("%d", &n);
int i;
for (i = 0;i < n;i++)
{
scanf("%d%d", &wuli[i].s, &wuli[i].e);
}
sort(wuli, wuli+n, cmp);
int et = wuli[0].e;
int counter = 1;
for (i = 1; i<n; i++)
{
if (wuli[i].s>et)
{
counter++;
et = wuli[i].e;
}
}
printf("%d\n", counter);
} | [
"noreply@github.com"
] | mddmdcvb2013.noreply@github.com |
dae3898c294044bfecf119fdf31b9d50ca5bfe4c | e9b44f123d9ebe49552133d5a131ea098c5d7047 | /Source/Scenes/LitWaves/LitWavesFrameResource.cpp | 6b43c0560cbb8abb9c8e839f78b9893173b93d5f | [] | no_license | nameless323/DX12Samples | 676be81f83c2a5df99d1de4bc6d99fe8364f1bff | d9d97d2bf90270b962335388d4e5769c5db42705 | refs/heads/master | 2021-01-23T22:15:53.974720 | 2016-10-08T17:35:55 | 2016-10-08T17:35:55 | 58,257,224 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 744 | cpp | #include "LitWavesFrameResource.h"
namespace DX12Samples
{
LitWavesFrameResource::LitWavesFrameResource(ID3D12Device* device, UINT passCount, UINT objectCount, UINT materialCount, UINT waveVertCount)
{
ThrowIfFailed(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(CmdListAlloc.GetAddressOf())));
PassCB = std::make_unique<UploadBuffer<PassConstants>>(device, passCount, true);
MaterialCB = std::make_unique<UploadBuffer<MaterialConstants>>(device, materialCount, true);
ObjectCB = std::make_unique<UploadBuffer<ObjectConstants>>(device, objectCount, true);
WavesVB = std::make_unique<UploadBuffer<Vertex>>(device, waveVertCount, false);
}
LitWavesFrameResource::~LitWavesFrameResource()
{
}
} | [
"nameless323@gmail.com"
] | nameless323@gmail.com |
f29b52e7dc3896aee4c26b3cf3bb76b2d46a5ca5 | 8681c91756b2941035db515b621e32480d35ec11 | /Editors/ECore/Editor/du_sphere_part.cpp | dc00e6f74f04181d327bbcdea56c3b09a2f7baf5 | [] | no_license | MaoZeDongXiJinping/xray-2212 | 1f3206c803c5fbc506114606424e2e834ffc51c0 | e143f01368c67b997f4be0dcdafb22f792bf485c | refs/heads/main | 2023-07-17T09:53:01.301852 | 2021-09-06T17:00:23 | 2021-09-06T17:00:23 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,928 | cpp | //---------------------------------------------------------------------------
#include "stdafx.h"
#pragma hdrstop
#include "du_sphere_part.h"
//---------------------------------------------------------------------------
#pragma warning(disable:4305)
Fvector du_sphere_part_vertices[DU_SPHERE_PART_NUMVERTEX]=
{
- .288675 ,- .288675 ,.288675,
.288675 ,- .288675 ,.288675,
- .288675 , .288675 ,.288675,
.288675 , .288675 ,.288675,
.000000 , .000000 ,.500000,
.000000 ,- .353553 ,.353553,
.353553 , .000000 ,.353553,
.000000 , .353553 ,.353553,
- .353553 , .000000 ,.353553,
- .204124 ,- .204124 ,.408248,
.204124 ,- .204124 ,.408248,
.204124 , .204124 ,.408248,
- .204124 , .204124 ,.408248,
- .166667 ,- .333333 ,.333333,
.000000 ,- .223607 ,.447214,
- .223607 , .000000 ,.447214,
- .333333 ,- .166667 ,.333333,
.333333 ,- .166667 ,.333333,
.223607 , .000000 ,.447214,
.166667 ,- .333333 ,.333333,
.166667 , .333333 ,.333333,
.000000 , .223607 ,.447214,
.333333 , .166667 ,.333333,
- .333333 , .166667 ,.333333,
- .166667 , .333333 ,.333333,
- .257248 ,- .257248 ,.342997,
- .098058 ,- .294174 ,.392232,
- .117851 ,- .117851 ,.471405,
- .294174 ,- .098058 ,.392232,
.257248 ,- .257248 ,.342997,
.294174 ,- .098058 ,.392232,
.117851 ,- .117851 ,.471405,
.098058 ,- .294174 ,.392232,
.257248 , .257248 ,.342997,
.098058 , .294174 ,.392232,
.117851 , .117851 ,.471405,
.294174 , .098058 ,.392232,
- .257248 , .257248 ,.342997,
- .294174 , .098058 ,.392232,
- .117851 , .117851 ,.471405,
- .098058 , .294174 ,.392232,
- .234261 ,- .312348 ,.312348,
- .185695 ,- .278543 ,.371391,
- .278543 ,- .185695 ,.371391,
- .312348 ,- .234261 ,.312348,
.000000 ,- .300000 ,.400000,
- .109109 ,- .218218 ,.436436,
- .087039 ,- .348155 ,.348155,
- .121268 , .000000 ,.485071,
- .218218 ,- .109109 ,.436436,
.000000 ,- .121268 ,.485071,
- .348155 ,- .087039 ,.348155,
- .300000 , .000000 ,.400000,
.312348 ,- .234261 ,.312348,
.278543 ,- .185695 ,.371391,
.185695 ,- .278543 ,.371391,
.234261 ,- .312348 ,.312348,
.300000 , .000000 ,.400000,
.218218 ,- .109109 ,.436436,
.348155 ,- .087039 ,.348155,
.109109 ,- .218218 ,.436436,
.121268 , .000000 ,.485071,
.087039 ,- .348155 ,.348155,
.234261 , .312348 ,.312348,
.185695 , .278543 ,.371391,
.278543 , .185695 ,.371391,
.312348 , .234261 ,.312348,
.000000 , .300000 ,.400000,
.109109 , .218218 ,.436436,
.087039 , .348155 ,.348155,
.218218 , .109109 ,.436436,
.000000 , .121268 ,.485071,
.348155 , .087039 ,.348155,
- .312348 , .234261 ,.312348,
- .278543 , .185695 ,.371391,
- .185695 , .278543 ,.371391,
- .234261 , .312348 ,.312348,
- .218218 , .109109 ,.436436,
- .348155 , .087039 ,.348155,
- .109109 , .218218 ,.436436,
- .087039 , .348155 ,.348155,
.000000 , .000000 ,.000000
};
u16 du_sphere_part_faces[DU_SPHERE_PART_NUMFACES*3]=
{
0, 41, 25,
25, 44, 0,
13, 42, 25,
25, 41, 13,
9, 43, 25,
25, 42, 9,
16, 44, 25,
25, 43, 16,
5, 45, 26,
26, 47, 5,
14, 46, 26,
26, 45, 14,
9, 42, 26,
26, 46, 9,
13, 47, 26,
26, 42, 13,
4, 48, 27,
27, 50, 4,
15, 49, 27,
27, 48, 15,
9, 46, 27,
27, 49, 9,
14, 50, 27,
27, 46, 14,
8, 51, 28,
28, 52, 8,
16, 43, 28,
28, 51, 16,
9, 49, 28,
28, 43, 9,
15, 52, 28,
28, 49, 15,
1, 53, 29,
29, 56, 1,
17, 54, 29,
29, 53, 17,
10, 55, 29,
29, 54, 10,
19, 56, 29,
29, 55, 19,
6, 57, 30,
30, 59, 6,
18, 58, 30,
30, 57, 18,
10, 54, 30,
30, 58, 10,
17, 59, 30,
30, 54, 17,
4, 50, 31,
31, 61, 4,
14, 60, 31,
31, 50, 14,
10, 58, 31,
31, 60, 10,
18, 61, 31,
31, 58, 18,
5, 62, 32,
32, 45, 5,
19, 55, 32,
32, 62, 19,
10, 60, 32,
32, 55, 10,
14, 45, 32,
32, 60, 14,
3, 63, 33,
33, 66, 3,
20, 64, 33,
33, 63, 20,
11, 65, 33,
33, 64, 11,
22, 66, 33,
33, 65, 22,
7, 67, 34,
34, 69, 7,
21, 68, 34,
34, 67, 21,
11, 64, 34,
34, 68, 11,
20, 69, 34,
34, 64, 20,
4, 61, 35,
35, 71, 4,
18, 70, 35,
35, 61, 18,
11, 68, 35,
35, 70, 11,
21, 71, 35,
35, 68, 21,
6, 72, 36,
36, 57, 6,
22, 65, 36,
36, 72, 22,
11, 70, 36,
36, 65, 11,
18, 57, 36,
36, 70, 18,
2, 73, 37,
37, 76, 2,
23, 74, 37,
37, 73, 23,
12, 75, 37,
37, 74, 12,
24, 76, 37,
37, 75, 24,
8, 52, 38,
38, 78, 8,
15, 77, 38,
38, 52, 15,
12, 74, 38,
38, 77, 12,
23, 78, 38,
38, 74, 23,
4, 71, 39,
39, 48, 4,
21, 79, 39,
39, 71, 21,
12, 77, 39,
39, 79, 12,
15, 48, 39,
39, 77, 15,
7, 80, 40,
40, 67, 7,
24, 75, 40,
40, 80, 24,
12, 79, 40,
40, 75, 12,
21, 67, 40,
40, 79, 21,
41, 0, 81,
0, 44, 81,
13, 41, 81,
44, 16, 81,
5, 47, 81,
47, 13, 81,
51, 8, 81,
16, 51, 81,
53, 1, 81,
1, 56, 81,
17, 53, 81,
56, 19, 81,
6, 59, 81,
59, 17, 81,
62, 5, 81,
19, 62, 81,
63, 3, 81,
3, 66, 81,
20, 63, 81,
66, 22, 81,
7, 69, 81,
69, 20, 81,
72, 6, 81,
22, 72, 81,
73, 2, 81,
2, 76, 81,
23, 73, 81,
76, 24, 81,
8, 78, 81,
78, 23, 81,
80, 7, 81,
24, 80, 81,
};
u16 du_sphere_part_lines[DU_SPHERE_PART_NUMLINES*2]=
{
0,41,
0,44,
0,81,
1,53,
1,56,
1,81,
2,73,
2,76,
2,81,
3,63,
3,66,
3,81,
4,48,
4,50,
4,61,
4,71,
5,45,
5,47,
5,62,
5,81,
6,57,
6,59,
6,72,
6,81,
7,67,
7,69,
7,80,
7,81,
8,51,
8,52,
8,78,
8,81,
9,42,
9,43,
9,46,
9,49,
10,54,
10,55,
10,58,
10,60,
11,64,
11,65,
11,68,
11,70,
12,74,
12,75,
12,77,
12,79,
13,41,
13,42,
13,47,
13,81,
14,45,
14,46,
14,50,
14,60,
15,48,
15,49,
15,52,
15,77,
16,43,
16,44,
16,51,
16,81,
17,53,
17,54,
17,59,
17,81,
18,57,
18,58,
18,61,
18,70,
19,55,
19,56,
19,62,
19,81,
20,63,
20,64,
20,69,
20,81,
21,67,
21,68,
21,71,
21,79,
22,65,
22,66,
22,72,
22,81,
23,73,
23,74,
23,78,
23,81,
24,75,
24,76,
24,80,
24,81,
25,41,
25,42,
25,43,
25,44,
26,42,
26,45,
26,46,
26,47,
27,46,
27,48,
27,49,
27,50,
28,43,
28,49,
28,51,
28,52,
29,53,
29,54,
29,55,
29,56,
30,54,
30,57,
30,58,
30,59,
31,50,
31,58,
31,60,
31,61,
32,45,
32,55,
32,60,
32,62,
33,63,
33,64,
33,65,
33,66,
34,64,
34,67,
34,68,
34,69,
35,61,
35,68,
35,70,
35,71,
36,57,
36,65,
36,70,
36,72,
37,73,
37,74,
37,75,
37,76,
38,52,
38,74,
38,77,
38,78,
39,48,
39,71,
39,77,
39,79,
40,67,
40,75,
40,79,
40,80,
41,81,
44,81,
47,81,
51,81,
53,81,
56,81,
59,81,
62,81,
63,81,
66,81,
69,81,
72,81,
73,81,
76,81,
78,81,
80,81,
};
| [
"47507219+ugozapad@users.noreply.github.com"
] | 47507219+ugozapad@users.noreply.github.com |
e08f34edad7df6b52c439ba93d57489a329430e9 | 9f520bcbde8a70e14d5870fd9a88c0989a8fcd61 | /pitzDaily/81/phi | 1b0a26543a81cf951361c3efa8736e6330d8ef16 | [] | no_license | asAmrita/adjoinShapOptimization | 6d47c89fb14d090941da706bd7c39004f515cfea | 079cbec87529be37f81cca3ea8b28c50b9ceb8c5 | refs/heads/master | 2020-08-06T21:32:45.429939 | 2019-10-06T09:58:20 | 2019-10-06T09:58:20 | 213,144,901 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 233,313 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "81";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
oriented oriented;
internalField nonuniform List<scalar>
12640
(
-1.82168253905e-07
1.86347745525e-07
-3.59419580915e-07
1.8133002669e-07
-5.25687519972e-07
1.6960166217e-07
-6.69873182105e-07
1.47264651106e-07
-7.67979441694e-07
1.0086658242e-07
-8.10428829987e-07
4.49853274164e-08
-8.24893438221e-07
1.68052555638e-08
-8.82288467282e-07
5.95481491564e-08
-9.87735776684e-07
1.07654566438e-07
-1.08353995343e-06
9.78723442198e-08
-1.17257769922e-06
9.08424138229e-08
-1.28369201921e-06
1.12848797539e-07
-1.38379041334e-06
1.01781483719e-07
-1.45665839567e-06
7.44537894731e-08
-1.51533121035e-06
6.01297486899e-08
-1.59341525205e-06
7.94164354583e-08
-1.67720356995e-06
8.51040766299e-08
-1.73678460098e-06
6.08604271858e-08
-1.76316575101e-06
2.76627885668e-08
-1.76707086169e-06
5.25229077952e-09
-1.79508597578e-06
2.94414275134e-08
-1.86370510603e-06
7.0088428544e-08
-1.95228637917e-06
9.00717914324e-08
-2.05051113676e-06
9.96597228389e-08
-2.14319603997e-06
9.40418800289e-08
-2.22473561189e-06
8.28635253974e-08
-2.30808676922e-06
8.46683788649e-08
-2.38561211807e-06
7.8828882573e-08
-2.44844399905e-06
6.41108409217e-08
-2.49882234096e-06
5.16218397521e-08
-2.55504165972e-06
5.74322598164e-08
-2.61037319149e-06
5.65179282376e-08
-2.64594000461e-06
3.67803899658e-08
-2.68461522405e-06
3.99133577789e-08
-2.71601992318e-06
3.26800118657e-08
-2.73790876716e-06
2.32753696998e-08
-2.7710988847e-06
3.46065393035e-08
-2.79901775466e-06
2.92818548946e-08
-2.81803218448e-06
2.04254616234e-08
-2.87526004882e-06
5.88095972359e-08
-3.07532414523e-06
2.01723163797e-07
-3.30731329432e-06
2.33488239453e-07
-3.41922594287e-06
1.13389049685e-07
-3.47252414411e-06
5.47436006858e-08
-3.49764745789e-06
2.65946500495e-08
-3.49112205038e-06
-5.03728988551e-09
-3.45463774687e-06
-3.49685036895e-08
-3.38632615382e-06
-6.68290692442e-08
-3.31025331074e-06
-7.45775487385e-08
-3.30075705049e-06
-7.97491069912e-09
-3.43061342548e-06
1.31395974713e-07
-3.56393227702e-06
1.35034454665e-07
-3.42493449583e-06
-1.37036124499e-07
-3.1649237908e-06
-2.57721334854e-07
-2.83712097453e-06
-3.25654547517e-07
-2.36896775145e-06
-4.66279477578e-07
-2.0011466912e-06
-3.65903611539e-07
-1.83033631569e-06
-1.68685718567e-07
-1.67401215358e-06
-1.54013889994e-07
-1.51009356586e-06
-1.61505496676e-07
-1.42610642177e-06
-8.15036362552e-08
-1.30739899979e-06
-1.16146339791e-07
-9.9545059073e-07
-3.0908865994e-07
-7.5305932728e-07
-2.40454662836e-07
-5.70734475374e-07
-1.81165135721e-07
-4.265542761e-07
-1.43350042942e-07
-2.90035643457e-07
-1.35793303917e-07
-1.47362413998e-07
-1.41885061676e-07
2.23835358583e-09
-1.48689904379e-07
1.5296200974e-07
-1.49673394526e-07
2.88697528283e-07
-1.34614394767e-07
3.91903409942e-07
-1.02097388053e-07
4.52621395732e-07
-5.95966395461e-08
4.66151465392e-07
-1.23730504123e-08
4.45696244388e-07
2.15893552459e-08
3.99643311667e-07
4.71414062776e-08
3.52144411465e-07
4.86087601949e-08
2.66523974768e-07
8.67045949863e-08
1.68709835424e-07
1.00043338428e-07
1.69956971677e-07
-8.66853096227e-08
2.75878924055e-07
-2.01556491065e-07
2.99107770635e-07
-3.16061622566e-07
2.86678266126e-07
-4.44010533108e-07
2.77368753612e-07
-6.33229068537e-07
2.92361358684e-07
-7.98093627172e-07
2.1228956666e-07
-8.94968660999e-07
1.16116353479e-07
-9.74538450749e-07
1.41652685244e-07
-1.05623755257e-06
1.9175031788e-07
-1.15380617724e-06
1.97654990657e-07
-1.25054889435e-06
1.895809436e-07
-1.32267001628e-06
1.86780306736e-07
-1.38876074527e-06
1.69498690045e-07
-1.45909240931e-06
1.46315626761e-07
-1.52988683352e-06
1.32364031982e-07
-1.61230751407e-06
1.63274436315e-07
-1.66982857932e-06
1.43889031933e-07
-1.65188797959e-06
4.41573194607e-08
-1.62680103943e-06
3.76613571814e-09
-1.64457015414e-06
2.43117975571e-08
-1.70658439104e-06
9.29155952014e-08
-1.83219985306e-06
1.97284882534e-07
-1.96589601275e-06
2.25297391007e-07
-2.05023980219e-06
1.85480239342e-07
-2.13085756544e-06
1.76051080569e-07
-2.23742090622e-06
1.90800960526e-07
-2.32432262633e-06
1.72922953271e-07
-2.38863929547e-06
1.44475906386e-07
-2.44446851494e-06
1.21242967052e-07
-2.4931258255e-06
1.0154775633e-07
-2.5265436591e-06
9.20823126876e-08
-2.55135982455e-06
8.25224585865e-08
-2.55814693645e-06
4.47798717443e-08
-2.57142424745e-06
5.44298336031e-08
-2.62404621234e-06
8.65865889766e-08
-2.63802884352e-06
3.86277487864e-08
-2.65106985419e-06
4.90756976833e-08
-2.7230848527e-06
1.02649635482e-07
-2.82196655473e-06
1.20794784636e-07
-2.87741135003e-06
1.15943118029e-07
-2.65856171402e-06
-1.54144505661e-08
-2.34772477761e-06
-7.6002234176e-08
-2.26966480521e-06
3.65880837618e-08
-2.29996035743e-06
8.62612727235e-08
-2.37254901218e-06
1.00431063393e-07
-2.48282635034e-06
1.06503234646e-07
-2.60641067885e-06
8.99534417951e-08
-2.74128769535e-06
6.94193610759e-08
-2.85747388856e-06
4.30850105694e-08
-2.84634162435e-06
-1.75857688967e-08
-2.64449847409e-06
-6.8907855043e-08
-2.4645466049e-06
-4.34825792264e-08
-2.76246820698e-06
1.6256013027e-07
-3.05578293974e-06
3.76926883053e-08
-3.04825751414e-06
-3.3123195154e-07
-3.15636343886e-06
-3.56009583603e-07
-3.23383746004e-06
-2.85658846628e-07
-3.11521177482e-06
-2.84219913117e-07
-2.93909252944e-06
-3.26765201058e-07
-2.65849250094e-06
-4.38524306981e-07
-2.06717301431e-06
-6.69322298718e-07
-1.51418415595e-06
-6.66173395461e-07
-1.10252833453e-06
-7.1759338848e-07
-8.13387808593e-07
-5.27635290983e-07
-5.9807634111e-07
-3.95281391896e-07
-4.22047499533e-07
-3.1858874668e-07
-2.7508618769e-07
-2.82025575938e-07
-1.31573445716e-07
-2.84614038055e-07
2.02485417553e-08
-2.99598288363e-07
1.73871809868e-07
-3.02282561826e-07
3.08566429564e-07
-2.6823909144e-07
4.06222186895e-07
-1.9869033525e-07
4.71935078922e-07
-1.2420839986e-07
5.13886747845e-07
-5.31258201416e-08
5.19499719796e-07
1.72352802581e-08
4.95797997507e-07
7.21112627801e-08
4.32894905591e-07
1.12908522772e-07
3.42899681638e-07
1.78379748118e-07
1.89882920257e-07
2.54732376199e-07
3.61866613052e-07
-1.21912583291e-07
3.99670319484e-07
-1.66344178028e-07
3.46148880971e-07
-3.32363387075e-07
4.55309169364e-07
-5.46788541347e-07
4.94346880146e-07
-7.32661883008e-07
4.80579535811e-07
-8.0729796563e-07
2.88878038525e-07
-8.3907630716e-07
1.50085655614e-07
-9.25929389214e-07
2.3100646674e-07
-1.03267046796e-06
3.00973751089e-07
-1.13992089219e-06
3.07171300531e-07
-1.23914189791e-06
2.90762909469e-07
-1.31784617795e-06
2.67179012682e-07
-1.38430820625e-06
2.37492890428e-07
-1.45177753347e-06
2.15235465423e-07
-1.47963586921e-06
1.61609447249e-07
-1.36586846296e-06
5.07437491016e-08
-1.1999454491e-06
-2.10326226487e-08
-1.15622190078e-06
1.37703790105e-09
-1.22175570152e-06
7.03604585787e-08
-1.427632621e-06
2.31506053784e-07
-1.68726265426e-06
3.54105096209e-07
-1.83529605189e-06
3.46911825747e-07
-1.9217404772e-06
3.13247426395e-07
-2.04732317395e-06
3.12521665022e-07
-2.16646268674e-06
2.96605332435e-07
-2.24460434698e-06
2.70306536237e-07
-2.30644352768e-06
2.36086118268e-07
-2.36426320235e-06
2.0359987318e-07
-2.40963547021e-06
1.67887128293e-07
-2.45260772539e-06
1.45763290213e-07
-2.46937838762e-06
1.10046365478e-07
-2.47287851615e-06
8.71846695138e-08
-2.49695268448e-06
7.00265376244e-08
-2.43979199361e-06
-1.49271920692e-09
-2.40261012321e-06
5.06474342754e-08
-2.49470271072e-06
1.32044176082e-07
-2.51273850844e-06
6.85179096557e-08
-2.53902357963e-06
1.30325181831e-07
-2.7427452285e-06
3.26035311892e-07
-2.98851822986e-06
3.63459018316e-07
-3.21726953548e-06
2.15156797908e-07
-3.38425735345e-06
9.27508872682e-08
-3.45184461493e-06
1.05858638553e-07
-3.49326847796e-06
1.29346696902e-07
-3.52704643091e-06
1.35843664737e-07
-3.54891499638e-06
1.3001741749e-07
-3.56758702569e-06
1.10266957329e-07
-3.58102532013e-06
8.45329130129e-08
-3.58827471581e-06
5.2049874652e-08
-3.61023915833e-06
6.19189533572e-09
-3.64324956864e-06
-3.40183577058e-08
-3.63000503415e-06
-5.47722928315e-08
-3.38529423637e-06
-8.01334296221e-08
-3.12384682347e-06
-2.2181841488e-07
-3.17284235769e-06
-2.80268741231e-07
-3.27518157414e-06
-2.51283668672e-07
-3.2348881911e-06
-3.23133809068e-07
-3.09762975465e-06
-4.18357490566e-07
-2.90554754755e-06
-5.15532613416e-07
-2.66421441549e-06
-6.76369435168e-07
-2.43021918566e-06
-8.99836477115e-07
-1.98631090014e-06
-1.10642051541e-06
-1.36714191668e-06
-1.33338250131e-06
-8.68810260675e-07
-1.02418506597e-06
-5.98810677124e-07
-6.64202964766e-07
-4.31027169691e-07
-4.85550889376e-07
-2.69634015789e-07
-4.42681323373e-07
-1.08967555103e-07
-4.44525252307e-07
4.90416060977e-08
-4.56778611864e-07
2.03732361074e-07
-4.56058625533e-07
3.46967345601e-07
-4.10494531941e-07
4.72967897807e-07
-3.23632738421e-07
5.66881869645e-07
-2.16950597435e-07
6.03847678492e-07
-8.88275838269e-08
5.88814972099e-07
3.35914168769e-08
5.40124058821e-07
1.22217500423e-07
4.68575487821e-07
1.85792081178e-07
3.77238588984e-07
2.70999714639e-07
1.76258358129e-07
4.58560884163e-07
5.38531607284e-07
-8.26078425317e-08
4.84900813136e-07
-9.25545303606e-08
3.57721189412e-07
-3.08218608827e-07
6.73542167393e-07
-4.66946003111e-07
6.55523731408e-07
-4.25411754089e-07
4.4073003985e-07
-3.19879207146e-07
1.84148589185e-07
-4.58434995722e-07
2.89942160009e-07
-7.47381126597e-07
5.2229833995e-07
-9.62297697735e-07
5.18350196543e-07
-1.1021537907e-06
4.49181253781e-07
-1.22071139653e-06
4.11169922872e-07
-1.3115725497e-06
3.59605881313e-07
-1.3452203872e-06
2.72504106001e-07
-1.25828927452e-06
1.29486618737e-07
-1.1038551573e-06
8.22642734679e-09
-1.03507236868e-06
-1.70142424278e-08
-1.08040658344e-06
2.53262242032e-08
-1.2340173516e-06
1.56157451948e-07
-1.49492855642e-06
3.32695988073e-07
-1.69131613105e-06
4.29469983808e-07
-1.77321383567e-06
4.37582857311e-07
-1.86777818833e-06
4.43050536186e-07
-1.98404845091e-06
4.31052063095e-07
-2.07510830231e-06
4.05034378032e-07
-2.14973579709e-06
3.72602402765e-07
-2.21149924801e-06
3.33383606277e-07
-2.27412804235e-06
2.99986052556e-07
-2.32399958314e-06
2.54730380845e-07
-2.37284483037e-06
2.17955322637e-07
-2.39390287858e-06
1.68007861594e-07
-2.42043623153e-06
1.37729545449e-07
-2.40786320257e-06
7.57269966967e-08
-2.33860532824e-06
1.90058473702e-09
-2.39960787459e-06
6.0756950987e-08
-2.42600535132e-06
7.83607541698e-08
-2.44850682889e-06
1.55899605412e-07
-2.70003011519e-06
3.21553399064e-07
-2.97057355187e-06
4.0253627633e-07
-3.07930279233e-06
4.36495788137e-07
-3.12288026085e-06
4.08777329896e-07
-3.21440091155e-06
3.08428133427e-07
-3.33712213969e-06
2.17189687849e-07
-3.41992311292e-06
1.90351916472e-07
-3.47466028552e-06
1.85745674988e-07
-3.51484578475e-06
1.7768775037e-07
-3.54469860909e-06
1.61519510341e-07
-3.56953649963e-06
1.36769450297e-07
-3.58934078887e-06
1.06015449326e-07
-3.60392417015e-06
6.83626831483e-08
-3.61701044822e-06
2.1070649615e-08
-3.61733220641e-06
-3.18123339196e-08
-3.57879340561e-06
-9.13463194378e-08
-3.48952447222e-06
-1.67396723274e-07
-3.44298451668e-06
-2.66305158605e-07
-3.40456391164e-06
-3.1648494896e-07
-3.308423022e-06
-3.44941557823e-07
-3.18788818488e-06
-4.40865356462e-07
-3.02833338668e-06
-5.74809233703e-07
-2.81630670528e-06
-7.24245681854e-07
-2.57232153066e-06
-9.17038432347e-07
-2.30300861972e-06
-1.16584863408e-06
-1.94954626969e-06
-1.45662379849e-06
-1.55010944616e-06
-1.73030418689e-06
-1.02622423392e-06
-1.54623014638e-06
-6.81084774841e-07
-1.00812929408e-06
-4.47102586336e-07
-7.18702319135e-07
-2.54825027234e-07
-6.34249852196e-07
-7.47544484939e-08
-6.23890189443e-07
9.96447515361e-08
-6.30432737779e-07
2.77825343369e-07
-6.33388395899e-07
4.55986413665e-07
-5.87662668713e-07
5.91551656275e-07
-4.58069257308e-07
6.4033355241e-07
-2.64572938269e-07
6.3205255214e-07
-7.9364192589e-08
6.01903310748e-07
6.50057729104e-08
5.30415914775e-07
1.95019953733e-07
4.07975439468e-07
3.09509841496e-07
2.90137030585e-07
3.90192296609e-07
1.54396154386e-07
5.94805513908e-07
6.94270482242e-07
-2.0303107661e-09
4.87692340023e-07
-8.77182199553e-08
4.44853652161e-07
-2.68917335056e-07
8.56736585181e-07
-3.44057615419e-07
7.3223265596e-07
-2.71072485952e-07
3.68811277488e-07
-3.36661735344e-07
2.50698614326e-07
-5.70559014557e-07
5.25592473624e-07
-7.71813917795e-07
7.25788665872e-07
-9.10796026427e-07
6.59544223543e-07
-1.044853078e-06
5.8513729412e-07
-1.164986101e-06
5.32899207596e-07
-1.17387465736e-06
3.69756277265e-07
-1.06105625634e-06
1.60665168437e-07
-9.80674358861e-07
5.00360311104e-08
-1.01281304038e-06
4.14263552865e-08
-1.12564189605e-06
9.69840954037e-08
-1.3236132782e-06
2.24668304248e-07
-1.54440229781e-06
3.7851927571e-07
-1.64785391948e-06
4.37733577309e-07
-1.67987263761e-06
4.63033045476e-07
-1.77114239286e-06
5.30425136792e-07
-1.88184287353e-06
5.55325655809e-07
-1.97660876053e-06
5.27303320389e-07
-2.05160690485e-06
4.81416673043e-07
-2.11686513882e-06
4.39182829739e-07
-2.18456898403e-06
4.02335967826e-07
-2.22532183511e-06
3.41968211517e-07
-2.27614581735e-06
3.0673636618e-07
-2.29835084491e-06
2.41317611602e-07
-2.32804956176e-06
1.98838689964e-07
-2.31360686022e-06
1.24360994137e-07
-2.32354458615e-06
8.67370989783e-08
-2.42298797127e-06
1.02518744495e-07
-2.40744176635e-06
4.65234083071e-08
-2.49372238624e-06
1.66045784259e-07
-2.71943597404e-06
3.83204474437e-07
-2.89167689239e-06
4.95471865762e-07
-3.01306717287e-06
5.25644033877e-07
-3.08389110311e-06
5.09038029374e-07
-3.13768214516e-06
4.64286284149e-07
-3.21887876539e-06
3.91333918132e-07
-3.31812712639e-06
3.18134131139e-07
-3.40022957913e-06
2.74125590818e-07
-3.46134654284e-06
2.48521545349e-07
-3.50815165195e-06
2.26140996565e-07
-3.5455672033e-06
2.00588258671e-07
-3.57686694494e-06
1.69728816522e-07
-3.60226669304e-06
1.33099089121e-07
-3.62000369859e-06
8.78213977023e-08
-3.62727790577e-06
3.01388134897e-08
-3.61619256163e-06
-4.10283572237e-08
-3.5792085813e-06
-1.26384807367e-07
-3.5221078659e-06
-2.22482128743e-07
-3.47078651996e-06
-3.15515833996e-07
-3.40331770335e-06
-3.81667632099e-07
-3.29428287176e-06
-4.51449523853e-07
-3.15428084188e-06
-5.77966939313e-07
-2.97278555493e-06
-7.53083886793e-07
-2.75227461419e-06
-9.41446914775e-07
-2.52026826861e-06
-1.14583841436e-06
-2.2759402174e-06
-1.40716717195e-06
-2.01387804245e-06
-1.71610653161e-06
-1.7839892449e-06
-1.95788967667e-06
-1.16893843685e-06
-2.15938678557e-06
-8.06045851001e-07
-1.36984572255e-06
-5.23386014417e-07
-1.00048806823e-06
-2.64869878354e-07
-8.92055299355e-07
-3.50723592448e-08
-8.53055667654e-07
1.74140783526e-07
-8.38958678091e-07
3.87734385492e-07
-8.46157439729e-07
5.83070182436e-07
-7.81971442713e-07
6.76920986504e-07
-5.5084635049e-07
6.94663835658e-07
-2.81240670615e-07
6.92319965485e-07
-7.58824417828e-08
6.5126594295e-07
1.0734196269e-07
5.50442633747e-07
2.97178925576e-07
4.35330753041e-07
4.25578395837e-07
3.05748375355e-07
5.20393984679e-07
1.45243876825e-07
7.57520563204e-07
8.39580136503e-07
2.4655937805e-09
4.8645275629e-07
-1.29140958654e-07
5.77549186193e-07
-2.11538200532e-07
9.40719498205e-07
-2.35144670944e-07
7.5716243598e-07
-2.05279924738e-07
3.39699850487e-07
-4.05518015379e-07
4.52202205623e-07
-6.64561970345e-07
7.86623235692e-07
-7.69297215232e-07
8.3262899065e-07
-8.679935102e-07
7.59964078827e-07
-9.42715840444e-07
6.61505494836e-07
-9.32267524557e-07
5.23752469494e-07
-8.12582820664e-07
2.50867500688e-07
-7.84518168104e-07
1.33374256032e-07
-8.55737952198e-07
1.22184725618e-07
-9.90536613114e-07
1.77360943518e-07
-1.21692542836e-06
3.24820612346e-07
-1.45730415505e-06
4.66675319247e-07
-1.53945085428e-06
4.62215860139e-07
-1.55396823681e-06
4.53734774237e-07
-1.66545332703e-06
5.76092598728e-07
-1.78553659603e-06
6.52113003339e-07
-1.86945181298e-06
6.40757080455e-07
-1.94538483469e-06
6.04666215096e-07
-2.02533780191e-06
5.62714178136e-07
-2.09421681977e-06
5.09308946288e-07
-2.10404532922e-06
4.13346451304e-07
-2.15398390899e-06
3.93035803049e-07
-2.17382442062e-06
3.27690757805e-07
-2.20146980787e-06
2.70064121755e-07
-2.16973303656e-06
1.68130587242e-07
-2.15719622849e-06
1.1282950417e-07
-2.18856529201e-06
1.19189863305e-07
-2.20162380954e-06
1.16714817106e-07
-2.39712988633e-06
2.4337503899e-07
-2.64683601806e-06
4.17386702197e-07
-2.82490804988e-06
5.63003042884e-07
-2.93621996964e-06
6.08513305856e-07
-3.01169093014e-06
6.02835088954e-07
-3.07419679427e-06
5.73254771946e-07
-3.1389126354e-06
5.30699892503e-07
-3.2174220381e-06
4.71528400125e-07
-3.30507927796e-06
4.0746063512e-07
-3.38459269128e-06
3.55295374471e-07
-3.44969789915e-06
3.15270074803e-07
-3.50256070235e-06
2.80643052523e-07
-3.5465296474e-06
2.46197773601e-07
-3.58383420062e-06
2.08686630562e-07
-3.61354043581e-06
1.64481046114e-07
-3.63252292554e-06
1.08517843462e-07
-3.63703519592e-06
3.64226466828e-08
-3.62306276031e-06
-5.31509092278e-08
-3.58965313019e-06
-1.57868829458e-07
-3.54131988204e-06
-2.68799209354e-07
-3.48217834872e-06
-3.72508971378e-07
-3.39642923092e-06
-4.65086956609e-07
-3.27058785363e-06
-5.74677989605e-07
-3.11451858135e-06
-7.31138545582e-07
-2.94482192892e-06
-9.19605572777e-07
-2.76953455853e-06
-1.11328405513e-06
-2.59634469112e-06
-1.31574747909e-06
-2.40083763579e-06
-1.59988467106e-06
-2.12709986247e-06
-1.98753396576e-06
-1.88397895118e-06
-2.19914992715e-06
-1.38898937603e-06
-2.6526476114e-06
-8.89990550911e-07
-1.86760823924e-06
-5.85247223534e-07
-1.30440807174e-06
-2.75031315448e-07
-1.20159946561e-06
1.86083296157e-08
-1.14605134435e-06
2.88356441737e-07
-1.10805621835e-06
5.39519179389e-07
-1.0964994707e-06
7.01113960923e-07
-9.42624816912e-07
7.56417533229e-07
-6.05150654709e-07
7.91912283255e-07
-3.15701179387e-07
7.96217778332e-07
-7.90235690647e-08
7.39505250993e-07
1.65317923932e-07
6.26844104709e-07
4.10956480155e-07
4.89672180323e-07
5.63788577332e-07
3.42278233211e-07
6.69182925467e-07
1.74874409836e-07
9.2501111181e-07
1.01582228983e-06
-4.41618561085e-08
5.31220467426e-07
-2.21620798615e-07
7.56187703689e-07
-2.86347806982e-07
1.0066324699e-06
-2.08190656799e-07
6.80091513771e-07
-2.60530571111e-07
3.92982954059e-07
-5.29554195189e-07
7.22887478926e-07
-6.78094049895e-07
9.37191440043e-07
-7.50358198592e-07
9.06472467358e-07
-7.85509983887e-07
7.96758315422e-07
-8.51738744482e-07
7.2884780541e-07
-7.78090900641e-07
4.51058578277e-07
-7.18195305038e-07
1.91649964159e-07
-7.77602501268e-07
1.93633753708e-07
-8.75564397682e-07
2.21225328244e-07
-1.07355002166e-06
3.76722564293e-07
-1.32297348581e-06
5.75840258263e-07
-1.39970179452e-06
5.44914132573e-07
-1.39840022282e-06
4.6230695623e-07
-1.52619801862e-06
5.83065314654e-07
-1.67223411535e-06
7.23766042859e-07
-1.76945265568e-06
7.5087960946e-07
-1.84855178636e-06
7.21343948522e-07
-1.922407325e-06
6.79919131586e-07
-1.96624528298e-06
6.07795270213e-07
-1.98017920857e-06
5.24427087087e-07
-2.00848277833e-06
4.42725942455e-07
-2.01217781052e-06
3.97832946388e-07
-2.04548338865e-06
3.62017659421e-07
-2.03914008656e-06
2.64715736785e-07
-2.0064816901e-06
1.36395158107e-07
-2.05324372605e-06
1.60650048095e-07
-2.12510732798e-06
1.92125761966e-07
-2.24929838552e-06
2.42142035078e-07
-2.46340005016e-06
4.58989664331e-07
-2.71993955825e-06
6.75668707724e-07
-2.85273870779e-06
6.97565079901e-07
-2.93013856953e-06
6.87643913813e-07
-2.99540625017e-06
6.69812006645e-07
-3.06298399316e-06
6.4252978358e-07
-3.13425873196e-06
6.03659301686e-07
-3.21226277541e-06
5.5120027174e-07
-3.2947092275e-06
4.91559235627e-07
-3.3723123124e-06
4.34534844181e-07
-3.43991759109e-06
3.84500500497e-07
-3.49776618678e-06
3.40110759123e-07
-3.54775999618e-06
2.97813558169e-07
-3.59040859592e-06
2.52969728855e-07
-3.62351013643e-06
1.9923793399e-07
-3.64349254266e-06
1.30194252017e-07
-3.64725505358e-06
4.1930014826e-08
-3.63297249577e-06
-6.56218892287e-08
-3.6009530846e-06
-1.87990552319e-07
-3.55222753034e-06
-3.15526282141e-07
-3.48344057688e-06
-4.39148441048e-07
-3.38319494252e-06
-5.63005664686e-07
-3.24659677971e-06
-7.08737163827e-07
-3.08910506715e-06
-8.856997001e-07
-2.94447322889e-06
-1.06062565424e-06
-2.86482836758e-06
-1.18936264623e-06
-2.85409304085e-06
-1.3232586518e-06
-2.86637936634e-06
-1.58485436654e-06
-2.83940847497e-06
-2.01239610697e-06
-2.48261305165e-06
-2.5541021794e-06
-1.95797612442e-06
-3.17547442173e-06
-1.04765762913e-06
-2.77675769509e-06
-6.35674842587e-07
-1.71562170973e-06
-2.65092545772e-07
-1.57148589285e-06
1.05439762871e-07
-1.51597146975e-06
4.38976542222e-07
-1.44092284395e-06
6.85297163836e-07
-1.34209480425e-06
8.05288978604e-07
-1.06173750979e-06
8.84358641104e-07
-6.83316437239e-07
9.47731292024e-07
-3.78023204907e-07
9.47629458165e-07
-7.77445260125e-08
8.69390008838e-07
2.44767809043e-07
7.51412197666e-07
5.3013720105e-07
5.8349280543e-07
7.32675500361e-07
3.94949792787e-07
8.58237115852e-07
2.178561382e-07
1.10466707443e-06
1.23362499957e-06
-8.97960393719e-08
6.22255799717e-07
-2.66784244125e-07
9.34313850687e-07
-2.70891524804e-07
1.01199430078e-06
-1.41525929172e-07
5.51435348492e-07
-3.13970072349e-07
5.6652106719e-07
-5.61351837542e-07
9.72090155671e-07
-6.42927992043e-07
1.02033494175e-06
-7.21373084977e-07
9.86501030541e-07
-6.76414424049e-07
7.52732337346e-07
-6.75528036081e-07
7.29108332594e-07
-5.97982031599e-07
3.74098019705e-07
-6.90377065701e-07
2.84820496896e-07
-7.72462830274e-07
2.76668266334e-07
-9.23668508666e-07
3.73592458358e-07
-1.15474388876e-06
6.09378491243e-07
-1.26181753436e-06
6.84490815973e-07
-1.25499759637e-06
5.3937782404e-07
-1.37348478905e-06
5.82186025398e-07
-1.53841358848e-06
7.49615977246e-07
-1.64572704994e-06
8.3269919443e-07
-1.72437852867e-06
8.3107595505e-07
-1.79845224027e-06
7.96854807325e-07
-1.88377440039e-06
7.665120997e-07
-1.95534712241e-06
6.80594662234e-07
-1.94468525991e-06
5.14816976011e-07
-1.98395348625e-06
4.83041867728e-07
-1.98486727131e-06
3.99756691622e-07
-1.93569018235e-06
3.13840284081e-07
-1.92609038367e-06
2.5601123234e-07
-2.07484017738e-06
2.86133275935e-07
-2.14553860894e-06
2.32430021032e-07
-2.13790843554e-06
1.85672843459e-07
-2.34653727824e-06
4.5216581949e-07
-2.62275886125e-06
7.36914081763e-07
-2.74708788759e-06
8.01752677671e-07
-2.83378755724e-06
7.8600741715e-07
-2.90595447471e-06
7.61530958302e-07
-2.9757473442e-06
7.41304969149e-07
-3.04928460997e-06
7.17754934566e-07
-3.12574392025e-06
6.81793694138e-07
-3.20449554101e-06
6.31607225848e-07
-3.28445410901e-06
5.73152368358e-07
-3.36148630407e-06
5.13184252865e-07
-3.43160619177e-06
4.56225338744e-07
-3.49399307129e-06
4.04095979133e-07
-3.54933487905e-06
3.54756102641e-07
-3.5966064146e-06
3.01850494928e-07
-3.63256396091e-06
2.36827491499e-07
-3.65376697841e-06
1.53054319412e-07
-3.65804833909e-06
4.79172702354e-08
-3.64442309136e-06
-7.7479711084e-08
-3.61249656256e-06
-2.18073788868e-07
-3.56034134188e-06
-3.65721343629e-07
-3.48213885393e-06
-5.15245006541e-07
-3.37084121604e-06
-6.72043827588e-07
-3.22953416151e-06
-8.47475249064e-07
-3.08247232881e-06
-1.02956615115e-06
-2.98834998385e-06
-1.15133621897e-06
-3.04152718396e-06
-1.13219299085e-06
-3.23489419371e-06
-1.12635369355e-06
-3.43031132606e-06
-1.38690100831e-06
-3.43048921197e-06
-2.01030150608e-06
-3.19765393379e-06
-2.78532651958e-06
-2.86255209501e-06
-3.50917664771e-06
-1.80031643693e-06
-3.83775235232e-06
-7.90091507398e-07
-2.72495825977e-06
-2.36781588467e-07
-2.12410286979e-06
2.15286482425e-07
-1.96725706379e-06
5.79103949181e-07
-1.80410824205e-06
8.10216469479e-07
-1.57242928356e-06
9.49876124629e-07
-1.2006381773e-06
1.08127761789e-06
-8.13789330751e-07
1.16063656147e-06
-4.56338783857e-07
1.15056396609e-06
-6.65184423903e-08
1.0585383717e-06
3.37992829145e-07
9.18812711889e-07
6.70945990225e-07
7.22204315433e-07
9.30427884409e-07
4.71312260752e-07
1.11088119723e-06
2.48012284461e-07
1.3278365442e-06
1.48333353257e-06
-1.2752954789e-07
7.50630813086e-07
-2.70015253141e-07
1.07800896216e-06
-2.06269033541e-07
9.49068578066e-07
-1.97895398972e-07
5.43809399114e-07
-4.26171496855e-07
7.96030756255e-07
-5.24566848041e-07
1.07202967014e-06
-5.96756170605e-07
1.09387449647e-06
-6.58684918163e-07
1.0494983832e-06
-6.42413461011e-07
7.37461429462e-07
-6.3928807052e-07
7.26855289419e-07
-6.30254595727e-07
3.6576026517e-07
-7.04296122016e-07
3.59637803234e-07
-8.02845859252e-07
3.76274519363e-07
-9.95706543681e-07
5.67884930564e-07
-1.20780138702e-06
8.22962501649e-07
-1.22541674337e-06
7.03474459894e-07
-1.25258573604e-06
5.67830943945e-07
-1.38405771365e-06
7.15164633646e-07
-1.51893681132e-06
8.86124616457e-07
-1.60909650969e-06
9.24475596859e-07
-1.67654350886e-06
9.00068490703e-07
-1.71998786752e-06
8.41584057355e-07
-1.75312015582e-06
8.00879683466e-07
-1.7828674878e-06
7.11321458e-07
-1.80496980206e-06
5.37859400461e-07
-1.8313556811e-06
5.10437496623e-07
-1.89550586927e-06
4.64793684878e-07
-1.97297159826e-06
3.92297776818e-07
-2.04154804163e-06
3.25484425567e-07
-2.07490573067e-06
3.204837012e-07
-2.15408765773e-06
3.1269769725e-07
-2.36922107087e-06
4.02194215319e-07
-2.54186386932e-06
6.26450231613e-07
-2.65605292018e-06
8.52847840518e-07
-2.73407682968e-06
8.81510348336e-07
-2.80658204101e-06
8.6023185293e-07
-2.88035528545e-06
8.37010430636e-07
-2.95437384024e-06
8.17017621506e-07
-3.0311321149e-06
7.96195377136e-07
-3.11117305062e-06
7.63497887467e-07
-3.1926345646e-06
7.14708632804e-07
-3.27328813692e-06
6.55420757557e-07
-3.35119973048e-06
5.92689929994e-07
-3.42442695385e-06
5.31031120958e-07
-3.49144961488e-06
4.72689564087e-07
-3.55128659171e-06
4.16162281497e-07
-3.60216637518e-06
3.54306889216e-07
-3.64077627872e-06
2.77020852037e-07
-3.66390004879e-06
1.77793032177e-07
-3.66996380683e-06
5.56256996828e-08
-3.65834474329e-06
-8.73965005188e-08
-3.6275616025e-06
-2.4707713072e-07
-3.57324436037e-06
-4.18135669321e-07
-3.48823932468e-06
-5.98244886859e-07
-3.36795119455e-06
-7.90145411034e-07
-3.21897610362e-06
-9.93890753835e-07
-3.07545763415e-06
-1.17008086146e-06
-3.05429911306e-06
-1.16816118053e-06
-3.39181963248e-06
-7.90829974897e-07
-3.94253360138e-06
-5.72003062122e-07
-4.23766992701e-06
-1.08933237205e-06
-4.13153737746e-06
-2.11491636989e-06
-3.85497281598e-06
-3.06073743433e-06
-3.51454593602e-06
-3.84854424004e-06
-2.87379103803e-06
-4.47731498481e-06
-1.40737664006e-06
-4.19038184717e-06
-1.73453308158e-07
-3.35691238297e-06
3.60013479157e-07
-2.50001482324e-06
7.25617642403e-07
-2.16880863378e-06
9.68991459017e-07
-1.81507471534e-06
1.17037769852e-06
-1.40121693346e-06
1.35025982257e-06
-9.92815271428e-07
1.43347225757e-06
-5.38530042164e-07
1.40495105523e-06
-3.68835308128e-08
1.29436504807e-06
4.49733631642e-07
1.11739968973e-06
8.49152499653e-07
8.79496264048e-07
1.16946245865e-06
5.69330369874e-07
1.42155902354e-06
2.75003756895e-07
1.62525752154e-06
1.75819132736e-06
-1.62904314048e-07
9.1500263898e-07
-2.85733607627e-07
1.20222470405e-06
-1.88385564222e-07
8.52636493303e-07
-2.54580770757e-07
6.10793724218e-07
-4.64402894802e-07
1.00708866068e-06
-4.66732632953e-07
1.07542265589e-06
-5.37077515474e-07
1.16554091708e-06
-5.24756058689e-07
1.03802597848e-06
-5.73736969061e-07
7.87238338389e-07
-5.3020294613e-07
6.84075258561e-07
-6.07138365253e-07
4.4335302619e-07
-7.0375614228e-07
4.5720921627e-07
-8.18498806865e-07
4.92054667548e-07
-1.00612020483e-06
7.5686626264e-07
-1.10606350895e-06
9.24425159576e-07
-1.08325638593e-06
6.81782286281e-07
-1.19832438081e-06
6.84176560091e-07
-1.35039155057e-06
8.68762189984e-07
-1.47003305111e-06
1.00739194635e-06
-1.56733361398e-06
1.02335377287e-06
-1.64151887178e-06
9.75588022546e-07
-1.70785270127e-06
9.09281764997e-07
-1.71969668915e-06
8.13822918812e-07
-1.71864415275e-06
7.1124231705e-07
-1.79899255066e-06
6.19125282367e-07
-1.7991156314e-06
5.11438243151e-07
-1.75446593525e-06
4.21054180339e-07
-1.75352976229e-06
3.92189692337e-07
-1.85662979755e-06
4.29527008751e-07
-2.01135296122e-06
4.76198690024e-07
-2.14821796063e-06
4.50722913068e-07
-2.29578180032e-06
5.51156311128e-07
-2.53335251166e-06
8.65784462552e-07
-2.63732462242e-06
9.58561055134e-07
-2.70607542302e-06
9.51959067766e-07
-2.77908455909e-06
9.34931919261e-07
-2.85566118453e-06
9.15283619446e-07
-2.93234514475e-06
8.95392394334e-07
-3.01026717065e-06
8.75792667711e-07
-3.09193650779e-06
8.46821351214e-07
-3.17605285648e-06
8.00449804945e-07
-3.25949490749e-06
7.40457583511e-07
-3.34022652848e-06
6.74990945139e-07
-3.41714950514e-06
6.09505890878e-07
-3.48907905448e-06
5.46161996468e-07
-3.55384168351e-06
4.82465267692e-07
-3.60805277804e-06
4.10054038366e-07
-3.64863766516e-06
3.19151808335e-07
-3.67395371456e-06
2.04657156097e-07
-3.68339428374e-06
6.66444783199e-08
-3.67653613257e-06
-9.26319198836e-08
-3.65110615184e-06
-2.70824410171e-07
-3.59990924004e-06
-4.675642197e-07
-3.51223569388e-06
-6.84056971466e-07
-3.38167414935e-06
-9.1858596887e-07
-3.21197514603e-06
-1.16102690133e-06
-3.05540204921e-06
-1.3230816169e-06
-3.20981900907e-06
-1.01035147615e-06
-4.27474110516e-06
2.80697418674e-07
-5.3170251919e-06
4.74203113544e-07
-5.36559655186e-06
-1.03885926152e-06
-4.9716836988e-06
-2.5076292923e-06
-4.48802141167e-06
-3.54349787584e-06
-4.02418078954e-06
-4.31160860481e-06
-3.63641038585e-06
-4.86403730814e-06
-2.59758680956e-06
-5.2277279298e-06
-8.36012081526e-07
-5.11720672275e-06
4.7096387633e-07
-3.80564948414e-06
8.716084528e-07
-2.56851372482e-06
1.17658436058e-06
-2.11925137027e-06
1.46619576747e-06
-1.689894741e-06
1.68924386515e-06
-1.21499646073e-06
1.76913818819e-06
-6.17535069652e-07
1.71948368541e-06
1.3776913166e-08
1.56863458462e-06
6.01681649764e-07
1.33334126056e-06
1.08560929628e-06
1.03165233286e-06
1.47239962203e-06
6.76568732544e-07
1.77870133785e-06
3.18263386894e-07
1.98318703663e-06
2.07824778069e-06
-1.62339329787e-07
1.07816301289e-06
-2.45642992507e-07
1.28627607146e-06
-1.9650613484e-07
8.04056674973e-07
-3.39916094165e-07
7.54972808122e-07
-3.85304814418e-07
1.05356327262e-06
-4.1532855058e-07
1.10669482e-06
-4.85663117929e-07
1.23660236794e-06
-4.23106239549e-07
9.76657872622e-07
-5.50563634936e-07
9.15295346267e-07
-5.1134839786e-07
6.45500544514e-07
-6.02435498032e-07
5.35196525691e-07
-7.02237447635e-07
5.5779597136e-07
-8.31093213302e-07
6.22138580014e-07
-1.01412136452e-06
9.41287507555e-07
-1.05669062238e-06
9.6820512488e-07
-1.06042092624e-06
6.86609987891e-07
-1.17179259396e-06
7.96883375444e-07
-1.30683849601e-06
1.00535346961e-06
-1.40731369886e-06
1.10942996366e-06
-1.49327671905e-06
1.11070923509e-06
-1.57515426212e-06
1.0589438593e-06
-1.70958264375e-06
1.04483060284e-06
-1.71982212384e-06
8.25158130658e-07
-1.68467078168e-06
6.77153537368e-07
-1.65715044822e-06
5.92385786402e-07
-1.67855279036e-06
5.33703012845e-07
-1.80710238596e-06
5.50517562366e-07
-1.92437927621e-06
5.10384223904e-07
-1.95144033449e-06
4.57658530241e-07
-1.89353540877e-06
4.19328306936e-07
-1.97151662871e-06
5.29921005281e-07
-2.27565454557e-06
8.56835680866e-07
-2.50055965855e-06
1.09243117556e-06
-2.59151162197e-06
1.05119972982e-06
-2.66753252568e-06
1.02963828256e-06
-2.74501168809e-06
1.01408244348e-06
-2.82497848139e-06
9.96932551507e-07
-2.90499691361e-06
9.77093936549e-07
-2.98467031377e-06
9.57140351407e-07
-3.06761090029e-06
9.31406174387e-07
-3.15507095548e-06
8.89513198681e-07
-3.24285066922e-06
8.29805054288e-07
-3.32763935317e-06
7.61319711457e-07
-3.40917000211e-06
6.92557917014e-07
-3.4865334139e-06
6.2503496207e-07
-3.55632938494e-06
5.53761561826e-07
-3.61407446774e-06
4.69291223094e-07
-3.65701870743e-06
3.63572152312e-07
-3.68506115918e-06
2.34173803774e-07
-3.69930179663e-06
8.23764367758e-08
-3.70101326774e-06
-8.94340520611e-08
-3.68836124052e-06
-2.81928616194e-07
-3.65001322599e-06
-5.04334033179e-07
-3.56852603769e-06
-7.63753409101e-07
-3.43365846255e-06
-1.05134569853e-06
-3.25520248541e-06
-1.33674312429e-06
-3.27094870633e-06
-1.30412768708e-06
-4.69816736763e-06
4.24630502247e-07
-6.74104826391e-06
2.33074917428e-06
-7.04603842782e-06
7.8275558145e-07
-6.3902943921e-06
-1.69307768213e-06
-5.66817514041e-06
-3.22869510699e-06
-4.98420982735e-06
-4.22671416454e-06
-4.35779113269e-06
-4.9367827428e-06
-3.68896761241e-06
-5.53166238667e-06
-2.95034312058e-06
-5.9646699711e-06
-1.78268243168e-06
-6.28243751975e-06
2.54938462824e-07
-5.84105310657e-06
9.67513257811e-07
-3.27992082446e-06
1.42968148603e-06
-2.58002962327e-06
1.81990979139e-06
-2.07905051809e-06
2.09648247842e-06
-1.49054423255e-06
2.1676975177e-06
-6.87862467198e-07
2.09838265225e-06
8.40352716926e-08
1.88351257622e-06
8.17707861951e-07
1.56399484742e-06
1.40631357935e-06
1.19667497131e-06
1.84078270742e-06
7.9925150358e-07
2.17638011278e-06
3.91723514055e-07
2.39402083944e-06
2.46950835511e-06
-1.21601276235e-07
1.20132224312e-06
-1.66829903222e-07
1.33276742212e-06
-2.31511571713e-07
8.69401773717e-07
-3.44871821561e-07
8.69119693438e-07
-2.753050119e-07
9.84842950176e-07
-3.6966374007e-07
1.2017429624e-06
-4.60575384711e-07
1.32895787703e-06
-3.90645131656e-07
9.07141124797e-07
-5.39516989548e-07
1.06524378091e-06
-5.4412035209e-07
6.50672750544e-07
-6.11121844982e-07
6.02876850187e-07
-7.01964656716e-07
6.49695699775e-07
-8.33631292127e-07
7.54681591454e-07
-1.01292087596e-06
1.12194029233e-06
-9.80365211609e-07
9.36775524825e-07
-1.01120336508e-06
7.1845548482e-07
-1.13447584228e-06
9.2144292241e-07
-1.25774958405e-06
1.13009602529e-06
-1.34551282516e-06
1.19865461012e-06
-1.4174286666e-06
1.18412545457e-06
-1.48898754803e-06
1.13162442735e-06
-1.59186462586e-06
1.14898588069e-06
-1.64188895211e-06
8.76180973412e-07
-1.64577419975e-06
6.81914473088e-07
-1.67109426013e-06
6.18617633787e-07
-1.76345039666e-06
6.26874844184e-07
-1.78090470771e-06
5.68872124032e-07
-1.76238900012e-06
4.92790841702e-07
-1.87272565599e-06
5.69025454549e-07
-2.04406583906e-06
5.91921228999e-07
-2.20341754406e-06
6.90630082852e-07
-2.40602378791e-06
1.06115025687e-06
-2.46258828863e-06
1.15063849813e-06
-2.54043763128e-06
1.1306625214e-06
-2.62018444094e-06
1.11100722596e-06
-2.69947737941e-06
1.09501484192e-06
-2.78419656759e-06
1.08331235293e-06
-2.87283552308e-06
1.06740033782e-06
-2.95898177346e-06
1.04494476841e-06
-3.04248464867e-06
1.01653860264e-06
-3.12864660319e-06
9.7725953102e-07
-3.21939528741e-06
9.2209567569e-07
-3.31083523745e-06
8.54265665577e-07
-3.39921075718e-06
7.82427539887e-07
-3.48297826037e-06
7.10283017892e-07
-3.55844804847e-06
6.30699848268e-07
-3.62048983736e-06
5.32772643699e-07
-3.66662387593e-06
4.11127086518e-07
-3.69822492839e-06
2.67172956686e-07
-3.71907862729e-06
1.04599056528e-07
-3.73437632689e-06
-7.27749162485e-08
-3.74405238361e-06
-2.70895267623e-07
-3.7334473747e-06
-5.13570498597e-07
-3.68120314517e-06
-8.14499697869e-07
-3.5849114262e-06
-1.14534544797e-06
-3.58082225295e-06
-1.33817435052e-06
-5.01478698494e-06
1.35285254283e-07
-7.99075258785e-06
3.40868913626e-06
-8.99944568216e-06
3.35059230547e-06
-8.08507467835e-06
-1.29408839058e-07
-7.08346229865e-06
-2.69334256086e-06
-6.13348892846e-06
-4.17787792382e-06
-5.28683384593e-06
-5.07224171122e-06
-4.55163432625e-06
-5.67073561967e-06
-3.69682686803e-06
-6.38456388277e-06
-2.78425166711e-06
-6.87477923596e-06
-1.90896537375e-06
-7.1549719972e-06
-4.41979400251e-07
-7.30497679564e-06
9.37573024519e-07
-4.65716043088e-06
1.72255581209e-06
-3.36320805345e-06
2.25673749648e-06
-2.61131821151e-06
2.59897374103e-06
-1.83130099419e-06
2.62519985459e-06
-7.13158482222e-07
2.53223970283e-06
1.77654068898e-07
2.22813500375e-06
1.12271153242e-06
1.81038543318e-06
1.82533720557e-06
1.38160647396e-06
2.27062407924e-06
9.18124787415e-07
2.64184627538e-06
4.56340449186e-07
2.8546711019e-06
2.92763184416e-06
-7.71261623362e-08
1.27911415114e-06
-8.17859267535e-08
1.33810213698e-06
-2.56130312622e-07
1.04452217903e-06
-3.05550162808e-07
9.19171256327e-07
-2.90592038393e-07
9.70649500742e-07
-3.79496012862e-07
1.29188462094e-06
-4.2870685567e-07
1.37857892638e-06
-3.97670917353e-07
8.7709819488e-07
-5.19914708784e-07
1.18798319551e-06
-5.44205274552e-07
6.75550881011e-07
-6.07686273733e-07
6.67104999437e-07
-6.88481747608e-07
7.3120127423e-07
-7.95816673047e-07
8.63300794326e-07
-8.92206451161e-07
1.21919960554e-06
-8.25508461014e-07
8.70840363855e-07
-9.35587201766e-07
8.29505148351e-07
-1.08531458141e-06
1.07242224167e-06
-1.20008626008e-06
1.24624140556e-06
-1.28094279578e-06
1.28088389551e-06
-1.34479154129e-06
1.24918739222e-06
-1.41419186629e-06
1.20248625707e-06
-1.47354058368e-06
1.20942470886e-06
-1.4568679226e-06
8.60261722122e-07
-1.49065841455e-06
7.16536102632e-07
-1.61165087628e-06
7.40513693339e-07
-1.60697214883e-06
6.22936600041e-07
-1.60522718106e-06
5.6795151212e-07
-1.69994721221e-06
5.88483925732e-07
-1.72961935001e-06
5.99763673403e-07
-1.79531281314e-06
6.58759036857e-07
-2.10373289233e-06
1.0005010965e-06
-2.3319121376e-06
1.29093299488e-06
-2.41280839914e-06
1.2330759378e-06
-2.48954160604e-06
1.20894178905e-06
-2.57417737133e-06
1.19721825411e-06
-2.65747536353e-06
1.17992311612e-06
-2.73766418317e-06
1.16513662319e-06
-2.82316880178e-06
1.15454778621e-06
-2.91764944281e-06
1.14105855293e-06
-3.01273287639e-06
1.11323119153e-06
-3.10274872218e-06
1.06884089641e-06
-3.19310060218e-06
1.01395221053e-06
-3.28789042849e-06
9.50544159632e-07
-3.38457527097e-06
8.80578370607e-07
-3.47749663561e-06
8.04657997894e-07
-3.5602750998e-06
7.14893362932e-07
-3.62773842821e-06
6.01627740731e-07
-3.67834350055e-06
4.63059139857e-07
-3.71496615393e-06
3.0508144794e-07
-3.7441451264e-06
1.34968494522e-07
-3.77666348853e-06
-3.91062956905e-08
-3.81562933978e-06
-2.31011548057e-07
-3.84579931792e-06
-4.82496394757e-07
-3.84064801751e-06
-8.17986298627e-07
-3.8184863027e-06
-1.16573511903e-06
-4.32746387358e-06
-8.25820719183e-07
-8.63856436574e-06
4.45406551915e-06
-1.16985921219e-05
6.47925128911e-06
-1.02806454343e-05
1.93898291245e-06
-8.92183761972e-06
-1.48613825434e-06
-7.69494049785e-06
-3.91919979305e-06
-6.42340575179e-06
-5.44888965779e-06
-5.4441349685e-06
-6.05078093291e-06
-4.75523419471e-06
-6.35824170768e-06
-3.65681106626e-06
-7.4812192816e-06
-2.54132793472e-06
-7.9884679051e-06
-1.57787698574e-06
-8.11563278307e-06
-9.98323962999e-07
-7.88182902398e-06
7.9031193803e-07
-6.44272145643e-06
2.2246147061e-06
-4.7944209564e-06
2.8596928249e-06
-3.24427216846e-06
3.34683334254e-06
-2.31716727137e-06
3.21444217444e-06
-5.80398233968e-07
3.12060238898e-06
2.72356365499e-07
2.65192347836e-06
1.59336887458e-06
2.06738880657e-06
2.41141720866e-06
1.582491701e-06
2.7567882738e-06
9.97071854283e-07
3.22703201699e-06
4.8553206809e-07
3.36949571425e-06
3.41212288168e-06
-8.94025430268e-08
1.37006763807e-06
-1.48855502862e-07
1.39890862189e-06
-2.1192174318e-07
1.10832663995e-06
-2.55015626215e-07
9.63062162164e-07
-3.11779188029e-07
1.02818139644e-06
-4.00387941595e-07
1.38114569359e-06
-4.22090234078e-07
1.40136801748e-06
-4.70073173475e-07
9.25363650799e-07
-5.09789570229e-07
1.22854119104e-06
-5.36965937419e-07
7.03197757505e-07
-6.01046233617e-07
7.31825414935e-07
-6.75915687676e-07
8.07051140847e-07
-7.71237171976e-07
9.59265991052e-07
-8.34817256521e-07
1.28394468465e-06
-8.35263045714e-07
8.72035712125e-07
-9.38744205054e-07
9.33894128312e-07
-1.05834701648e-06
1.19320154524e-06
-1.14704940923e-06
1.33618995796e-06
-1.21462601263e-06
1.34968785543e-06
-1.27618543467e-06
1.31206073513e-06
-1.3457140565e-06
1.27310570395e-06
-1.38430571636e-06
1.24920049846e-06
-1.44225138615e-06
9.19087340551e-07
-1.55820262394e-06
8.33264999975e-07
-1.56512424672e-06
7.48195543779e-07
-1.59550141875e-06
6.54087975915e-07
-1.71478909845e-06
6.88023795069e-07
-1.74641628282e-06
6.21130900571e-07
-1.76707406415e-06
6.21514101803e-07
-2.01914121309e-06
9.12181578028e-07
-2.27694061695e-06
1.25987169989e-06
-2.30808817733e-06
1.3235759341e-06
-2.37076663881e-06
1.29722372515e-06
-2.44688835155e-06
1.28655794692e-06
-2.52220007003e-06
1.27406717234e-06
-2.59942362085e-06
1.25871393031e-06
-2.68885884002e-06
1.2561730079e-06
-2.77827185782e-06
1.24557087419e-06
-2.86818459838e-06
1.23256710697e-06
-2.96571914107e-06
1.21233239385e-06
-3.0658033524e-06
1.17045388528e-06
-3.16270494298e-06
1.1123520302e-06
-3.26097494796e-06
1.05027646421e-06
-3.36477653264e-06
9.85821242254e-07
-3.46943479598e-06
9.10739521471e-07
-3.56382026025e-06
8.106806595e-07
-3.64057464391e-06
6.796904593e-07
-3.69566361548e-06
5.19426807433e-07
-3.73401304129e-06
3.4457280848e-07
-3.77352779775e-06
1.75566736973e-07
-3.82792319303e-06
1.60791981071e-08
-3.89984405752e-06
-1.58407255725e-07
-3.98751957605e-06
-3.93940911083e-07
-4.09390211253e-06
-7.10434743506e-07
-4.57182996192e-06
-6.85755358187e-07
-7.73027524094e-06
2.33755302553e-06
-1.3512621948e-05
1.02437672942e-05
-1.46884469139e-05
7.66193682173e-06
-1.24724795774e-05
-2.71668490287e-07
-9.59367234713e-06
-4.36322077677e-06
-8.32802910568e-06
-5.18428789456e-06
-6.51433331616e-06
-7.26201180066e-06
-5.47485010918e-06
-7.08933297432e-06
-4.94294498908e-06
-6.88894527952e-06
-2.59427228626e-06
-9.82793533498e-06
-4.11256851918e-07
-1.01688443252e-05
1.44115159351e-06
-9.96574414267e-06
2.54559860043e-06
-8.98279358269e-06
3.16666542628e-06
-7.05864133258e-06
3.02226086122e-06
-4.6437312958e-06
3.95654884506e-06
-4.17356580515e-06
4.57699327612e-06
-2.9364256041e-06
3.84083798179e-06
1.56746734062e-07
4.0345087821e-06
8.07547302563e-08
3.2522065441e-06
2.37786229547e-06
2.27388901364e-06
3.3923769276e-06
1.82791219491e-06
3.20430675122e-06
1.048341062e-06
4.00834027058e-06
4.87187078603e-07
3.92851894077e-06
3.90084014673e-06
-9.97243560531e-08
1.47027209915e-06
-1.86858168799e-07
1.48626176102e-06
-9.66606174724e-08
1.01878447889e-06
-1.95609937401e-07
1.0625995159e-06
-3.11891952564e-07
1.14526000885e-06
-4.09113227936e-07
1.47934249421e-06
-4.31549973404e-07
1.42430583214e-06
-5.44871192252e-07
1.03934747833e-06
-4.78683810166e-07
1.16277540597e-06
-5.21998208112e-07
7.47026352494e-07
-5.94800000028e-07
8.05288893509e-07
-6.72117878724e-07
8.85050482367e-07
-7.70873796438e-07
1.05915420005e-06
-8.18292927437e-07
1.33205576125e-06
-8.55437416362e-07
9.09929275095e-07
-9.5238100917e-07
1.03179465962e-06
-1.04361241677e-06
1.28551696715e-06
-1.10713498383e-06
1.40086322607e-06
-1.16471590844e-06
1.40838472036e-06
-1.22571576486e-06
1.3741074013e-06
-1.28859248651e-06
1.33727593078e-06
-1.32637387067e-06
1.2881732681e-06
-1.42596487564e-06
1.01950627705e-06
-1.44886858915e-06
8.5683909556e-07
-1.43730466027e-06
7.37343750201e-07
-1.56683303561e-06
7.84369751599e-07
-1.61814700082e-06
7.40066437903e-07
-1.7735490861e-06
7.77398474442e-07
-2.01459716123e-06
8.63898180884e-07
-2.18887176486e-06
1.08796723783e-06
-2.25316865243e-06
1.32569056883e-06
-2.29467456297e-06
1.3665473897e-06
-2.3517138628e-06
1.35571335321e-06
-2.40164098327e-06
1.33793794473e-06
-2.46523056071e-06
1.33914586503e-06
-2.54280938159e-06
1.33782307044e-06
-2.62653559876e-06
1.34144858821e-06
-2.71770115267e-06
1.33829321146e-06
-2.81588972814e-06
1.33230713677e-06
-2.91318587436e-06
1.31116140276e-06
-3.01499530666e-06
1.27376615379e-06
-3.12012285432e-06
1.21895913931e-06
-3.22670646549e-06
1.15831237144e-06
-3.34011244856e-06
1.10067577651e-06
-3.46278956691e-06
1.03481552674e-06
-3.57622797145e-06
9.25402828418e-07
-3.65698680208e-06
7.61723929942e-07
-3.70034643161e-06
5.6390834775e-07
-3.74022417492e-06
3.85497854841e-07
-3.80553787549e-06
2.41662014223e-07
-3.88310951206e-06
9.42584553696e-08
-3.96755292364e-06
-7.36691673461e-08
-4.07093760076e-06
-2.90224194764e-07
-4.10601260584e-06
-6.75050171572e-07
-3.97623067659e-06
-8.13782315634e-07
-8.36053004729e-06
6.72631125768e-06
-1.16944404927e-05
1.35839701117e-05
-1.18058248424e-05
7.77387398826e-06
-1.11774076903e-05
-8.98117938391e-07
-9.94935515451e-06
-5.59088500189e-06
-9.6444354891e-06
-5.48834862609e-06
-4.81935926607e-06
-1.20847523584e-05
8.73357613277e-07
-1.27797576342e-05
1.1434220709e-05
-1.74464167755e-05
2.44419858092e-05
-2.28305571986e-05
3.68642770613e-05
-2.25869247759e-05
4.69482447573e-05
-2.00454746118e-05
5.34347156948e-05
-1.54642927531e-05
5.50686008894e-05
-8.6844539915e-06
4.96624295422e-05
7.73826710411e-07
3.03767821663e-05
1.51220586846e-05
9.96083280314e-06
1.74814139578e-05
4.02539373084e-06
6.09491324175e-06
5.14729784701e-06
-1.03869260554e-06
4.03693891037e-06
3.49136077131e-06
2.24204780566e-06
5.18918310957e-06
2.27597597692e-06
3.17085374182e-06
1.00079094324e-06
5.28251391763e-06
4.31080576072e-07
4.50113689512e-06
4.33082026443e-06
-8.08261436958e-08
1.55218411912e-06
-1.48014633733e-07
1.55466199065e-06
-9.96457407417e-08
9.70821414964e-07
-1.77534101722e-07
1.14126380278e-06
-3.23060396744e-07
1.29152531751e-06
-3.95214647655e-07
1.55230776254e-06
-4.03158991092e-07
1.43290216676e-06
-5.15633681912e-07
1.15228356538e-06
-4.24121288599e-07
1.07176548006e-06
-5.06453079937e-07
8.2979484141e-07
-5.9234492688e-07
8.91848649757e-07
-6.7890906936e-07
9.72373611559e-07
-7.90092972603e-07
1.17095939976e-06
-8.11197451276e-07
1.3541463052e-06
-8.597394199e-07
9.59181756847e-07
-9.56862063656e-07
1.12977162009e-06
-1.0312317253e-06
1.36091590721e-06
-1.07702171055e-06
1.44763112545e-06
-1.12710192903e-06
1.45948692638e-06
-1.18212754451e-06
1.43022622621e-06
-1.23784389819e-06
1.39403893313e-06
-1.2908627061e-06
1.34226149201e-06
-1.40963373057e-06
1.13932807565e-06
-1.45429442368e-06
9.0219880946e-07
-1.54591392097e-06
8.29615696835e-07
-1.57101404457e-06
8.10141794002e-07
-1.5782354474e-06
7.48056314142e-07
-1.62833621859e-06
8.28468320129e-07
-1.72226217504e-06
9.58955441981e-07
-1.98816043273e-06
1.35540434937e-06
-2.1524523914e-06
1.49152407431e-06
-2.23789427568e-06
1.45342244607e-06
-2.28644960855e-06
1.40566296832e-06
-2.34620550059e-06
1.399118262e-06
-2.41609410345e-06
1.41047202617e-06
-2.49043003047e-06
1.41362539729e-06
-2.56847473322e-06
1.42098808609e-06
-2.65583231143e-06
1.4271479754e-06
-2.75010375525e-06
1.42807099747e-06
-2.84969484621e-06
1.41223761361e-06
-2.95511116405e-06
1.38067051212e-06
-3.07214195261e-06
1.33746652343e-06
-3.19027461521e-06
1.2778848443e-06
-3.30787378348e-06
1.21962450133e-06
-3.4306644574e-06
1.15889247918e-06
-3.53979357874e-06
1.03579580905e-06
-3.61026779467e-06
8.33320803163e-07
-3.65304704339e-06
6.07666066319e-07
-3.7109513338e-06
4.44194526097e-07
-3.78399933594e-06
3.15350208445e-07
-3.86754572207e-06
1.78070173083e-07
-3.96366163472e-06
2.23554978525e-08
-4.14917735175e-06
-1.05150623499e-07
-4.70517811862e-06
-1.18113692219e-07
-5.67571173947e-06
1.59082393787e-07
-9.09035732026e-06
1.01481431531e-05
-1.14380025803e-05
1.59309314557e-05
-1.29685302908e-05
9.30687076516e-06
-1.28505123758e-05
-1.01638181527e-06
-8.73256149356e-06
-9.70815781877e-06
3.87437266276e-07
-1.46060146432e-05
1.61142600845e-05
-2.78067891187e-05
3.63846787122e-05
-3.30463021957e-05
5.5145493967e-05
-3.62041569385e-05
7.01845241242e-05
-3.78668826178e-05
8.38240214432e-05
-3.62238866993e-05
9.5618260092e-05
-3.18373104702e-05
0.000105227288313
-2.50708729287e-05
0.000112394779866
-1.58489506412e-05
0.000117232828883
-4.0602967583e-06
0.000122248859422
1.01085175523e-05
0.000116310054908
2.34238597877e-05
7.89834111839e-05
4.3426343415e-05
3.40057311908e-05
4.39427520887e-05
7.42612460363e-06
3.00726281869e-05
4.28782697715e-07
1.21879746569e-05
2.96823415121e-06
6.31903583874e-07
6.08941552243e-07
7.64320845107e-06
2.43941664027e-07
4.86433822767e-06
4.57729718268e-06
-6.63828831071e-08
1.61895157396e-06
-1.32876752186e-07
1.62103675966e-06
-8.77142521797e-08
9.26252132643e-07
-1.77836388344e-07
1.23200473834e-06
-3.29147283512e-07
1.4437190274e-06
-3.78754331259e-07
1.60255162453e-06
-3.63292554691e-07
1.41822569372e-06
-4.98960375668e-07
1.28839242722e-06
-4.71942042605e-07
1.04512054642e-06
-5.21895084561e-07
8.8025764964e-07
-5.99828674903e-07
9.70307055202e-07
-6.92665786572e-07
1.06595503867e-06
-8.21241743263e-07
1.30032414638e-06
-7.86411183366e-07
1.31991815737e-06
-8.46701001823e-07
1.02018726948e-06
-9.47772017757e-07
1.23174817229e-06
-1.01645619995e-06
1.43045405176e-06
-1.04699856001e-06
1.47914068526e-06
-1.09130198679e-06
1.50468992695e-06
-1.14108240774e-06
1.48088461379e-06
-1.19549946806e-06
1.44954354717e-06
-1.2609454358e-06
1.40893189899e-06
-1.36167427015e-06
1.24092650879e-06
-1.40578502931e-06
9.47038412779e-07
-1.43168177047e-06
8.56070704223e-07
-1.41499771749e-06
7.94183062152e-07
-1.5423589558e-06
8.76261826595e-07
-1.62576672333e-06
9.12933883991e-07
-1.83795388647e-06
1.17261274752e-06
-2.02318154264e-06
1.54225083097e-06
-2.08567885381e-06
1.55545421865e-06
-2.12883899884e-06
1.49797057762e-06
-2.17767840857e-06
1.45586720388e-06
-2.26418737834e-06
1.48694258186e-06
-2.34997128005e-06
1.49763558456e-06
-2.418097215e-06
1.48314827375e-06
-2.494116776e-06
1.49842425692e-06
-2.58529638237e-06
1.51975379169e-06
-2.67601537267e-06
1.52022479297e-06
-2.7800099705e-06
1.51769958424e-06
-2.88508614276e-06
1.48722514472e-06
-2.98485649365e-06
1.43865745697e-06
-3.08782384957e-06
1.38219172759e-06
-3.20781628379e-06
1.34099867355e-06
-3.35494773034e-06
1.30737788858e-06
-3.46031697915e-06
1.14242043006e-06
-3.48083567548e-06
8.54914877683e-07
-3.44793966697e-06
5.75736725085e-07
-3.43618324749e-06
4.33272636929e-07
-3.44653848543e-06
3.26275487716e-07
-3.45011835518e-06
1.81922673808e-07
-3.44469782539e-06
1.69616095107e-08
-3.41656397265e-06
-1.32813347638e-07
-3.37841857782e-06
-1.55672582506e-07
-3.39601322671e-06
1.79655755653e-07
-2.80722432839e-06
9.56229221212e-06
-6.05798595508e-06
1.91849707935e-05
-1.02332556039e-05
1.34810298664e-05
-5.33616421285e-06
-5.91304393625e-06
1.10902238928e-05
-2.61327705548e-05
3.67493621053e-05
-4.02633277877e-05
5.74105281144e-05
-4.84666428232e-05
7.73933739726e-05
-5.30279202395e-05
9.58845830472e-05
-5.46941614738e-05
0.000112052854239
-5.40339559734e-05
0.000126554756401
-5.07246477453e-05
0.000139512051152
-4.47935724828e-05
0.000150862706334
-3.64209144988e-05
0.00016065743896
-2.56434551215e-05
0.000169023393283
-1.24263227509e-05
0.000176215110906
2.9165640123e-06
0.000180064053547
1.95755889873e-05
0.000185385995171
3.81060645996e-05
0.0001781977666
5.11327262801e-05
0.00014788070871
6.03925228257e-05
8.42994075691e-05
7.57715710969e-05
2.47623158399e-05
6.01686840805e-05
-6.76002395187e-07
3.30817182708e-05
-6.09859603301e-07
4.80267097499e-06
3.96790558715e-06
-4.67034618643e-08
1.66641994305e-06
-9.20448248803e-08
1.66762648195e-06
-8.72281958266e-08
9.21781092456e-07
-2.11380153427e-07
1.35696628189e-06
-3.30534111283e-07
1.56347694481e-06
-3.7238719498e-07
1.64532797109e-06
-3.5347054541e-07
1.39967930516e-06
-5.01868364523e-07
1.43745083255e-06
-4.92692087181e-07
1.03639519976e-06
-5.32506530289e-07
9.20463358798e-07
-6.00881136082e-07
1.03937542253e-06
-6.86904876483e-07
1.15245933902e-06
-8.01399810666e-07
1.41551137907e-06
-7.31346507691e-07
1.25055446399e-06
-8.20820281997e-07
1.11032116563e-06
-9.23685031694e-07
1.33534565277e-06
-9.95897875979e-07
1.50356413596e-06
-1.00842638381e-06
1.49237677083e-06
-1.05171191134e-06
1.54879795219e-06
-1.09656021127e-06
1.52665112421e-06
-1.14548279432e-06
1.49932620934e-06
-1.21791715181e-06
1.48228503551e-06
-1.30586182811e-06
1.32998439179e-06
-1.36361056357e-06
1.00550137315e-06
-1.43054847306e-06
9.23700319487e-07
-1.55360546105e-06
9.17851777407e-07
-1.70183446866e-06
1.02550966523e-06
-1.82393480725e-06
1.03623571164e-06
-1.93121318038e-06
1.28129802384e-06
-1.96643506482e-06
1.57896789823e-06
-2.0230078199e-06
1.61342858655e-06
-2.03256677642e-06
1.50881714187e-06
-2.10593656817e-06
1.530495082e-06
-2.20794654027e-06
1.59028792079e-06
-2.2469161912e-06
1.53784549988e-06
-2.30905793625e-06
1.546572607e-06
-2.41464144252e-06
1.60533563367e-06
-2.5105244705e-06
1.61697947661e-06
-2.60373751709e-06
1.61482254349e-06
-2.68266916919e-06
1.59806007128e-06
-2.76817832474e-06
1.57415345683e-06
-2.87140135832e-06
1.54324334602e-06
-2.97957679094e-06
1.49171744007e-06
-2.99793983067e-06
1.3606486575e-06
-2.81771067933e-06
1.12842447133e-06
-2.51957137498e-06
8.45419046188e-07
-2.33516245938e-06
6.71455090537e-07
-2.38405338532e-06
6.25437227294e-07
-2.5062622483e-06
5.5608757045e-07
-2.54253267949e-06
3.63198387118e-07
-2.49570488308e-06
1.35558530455e-07
-2.36109677625e-06
-1.17431148501e-07
-2.085115222e-06
-4.08198065026e-07
-1.56218610823e-06
-6.77949086502e-07
-5.13557876623e-07
-8.67336428273e-07
5.02134872314e-06
4.02978218962e-06
2.77758755781e-06
2.14265254715e-05
1.28004525809e-05
3.45855276288e-06
3.53307496557e-05
-2.84426549199e-05
5.81176288587e-05
-4.89186834983e-05
7.91427422433e-05
-6.12878637097e-05
9.91828349971e-05
-6.85063235462e-05
0.000118176378873
-7.20210977596e-05
0.00013595798452
-7.24754396706e-05
0.000152252428507
-7.03281434311e-05
0.000167194741447
-6.56667548214e-05
0.000180932395113
-5.85311927606e-05
0.00019352512156
-4.90139467818e-05
0.000205049896981
-3.71690565528e-05
0.000215627908484
-2.30058354337e-05
0.000225349913359
-6.80697395088e-06
0.000233799617391
1.11247870854e-05
0.000241163076176
3.0742533895e-05
0.000241901647152
5.03949731248e-05
0.000233471923717
6.88228875159e-05
0.000220676112492
8.85664126676e-05
0.000178958118323
0.000101887386918
9.17438938942e-05
0.00012030135043
1.30664242679e-05
8.34786605911e-05
1.70356226894e-05
-2.99158762883e-08
1.6965867601e-06
-5.54709434894e-08
1.6930013352e-06
-1.00438859595e-07
9.67400095679e-07
-2.52548779861e-07
1.50965124527e-06
-3.22332893628e-07
1.63413071725e-06
-3.62486480513e-07
1.6858784793e-06
-3.6712260972e-07
1.40509963358e-06
-4.75030001147e-07
1.54580389147e-06
-4.9004029931e-07
1.05175406995e-06
-5.30206413203e-07
9.61148102375e-07
-5.9266013312e-07
1.10224224793e-06
-6.64623358379e-07
1.22523740969e-06
-7.45134356805e-07
1.49652823006e-06
-7.18956701223e-07
1.22484480445e-06
-8.0612506257e-07
1.19812345528e-06
-8.94661557477e-07
1.42464213043e-06
-9.5219654322e-07
1.56165556192e-06
-9.62949413594e-07
1.50387671009e-06
-1.01069961464e-06
1.59722434863e-06
-1.05086581883e-06
1.56737461114e-06
-1.08629722881e-06
1.53563530641e-06
-1.16535608663e-06
1.56241960175e-06
-1.23903567228e-06
1.40448477085e-06
-1.29886930507e-06
1.06614827594e-06
-1.35989239766e-06
9.85306319014e-07
-1.39488407767e-06
9.53512727423e-07
-1.39415074146e-06
1.02549962266e-06
-1.46768533277e-06
1.1107425677e-06
-1.66985576797e-06
1.48469010185e-06
-1.8282230594e-06
1.73854929929e-06
-1.8867785426e-06
1.67318490154e-06
-1.94742769437e-06
1.57062473937e-06
-2.04309106779e-06
1.62744056425e-06
-2.08346776073e-06
1.63179581774e-06
-2.11454291766e-06
1.57007233389e-06
-2.22522311756e-06
1.65845340094e-06
-2.32273907838e-06
1.70406864018e-06
-2.41123322078e-06
1.7067337215e-06
-2.4985266038e-06
1.70343844603e-06
-2.58307649333e-06
1.68398945369e-06
-2.66555296861e-06
1.65795270722e-06
-2.70804120894e-06
1.58694650362e-06
-2.63453345114e-06
1.41933245434e-06
-2.39055858485e-06
1.11776899651e-06
-2.12371032313e-06
8.62689749213e-07
-2.00839971817e-06
7.31088590707e-07
-2.02137272269e-06
6.8530180935e-07
-2.04965314152e-06
6.5434557071e-07
-1.98353234322e-06
4.9092906028e-07
-1.87184112666e-06
2.52299431447e-07
-1.71898301967e-06
-1.6697315789e-08
-1.56958503876e-06
-2.6638305095e-07
-1.3611696974e-06
-6.16164183799e-07
-8.86028184573e-07
-1.15223538861e-06
5.40327564739e-07
-2.29333037134e-06
6.98433745044e-06
-2.41470523139e-06
2.28636501923e-05
5.54821443314e-06
4.97972578478e-05
-2.34754625338e-05
7.48622634778e-05
-5.35073847927e-05
9.74713780888e-05
-7.15273794371e-05
0.000118196865128
-8.20130280214e-05
0.000137502043703
-8.78113771652e-05
0.00015562487433
-9.01439357542e-05
0.00017269988259
-8.9550584411e-05
0.000188739115543
-8.63676028583e-05
0.000203825297329
-8.07532762157e-05
0.000218076994357
-7.27834075866e-05
0.000231585299758
-6.25231483079e-05
0.00024442861469
-5.00137689465e-05
0.000256688834269
-3.52679641891e-05
0.000268177514652
-1.82976939718e-05
0.000278683288148
6.1741786877e-07
0.000287966392213
2.14585361962e-05
0.00029435561316
4.40049677848e-05
0.0002951567517
6.80208471748e-05
0.000288323445259
9.53981444704e-05
0.000264818565179
0.000125390603738
0.000225544894313
0.000159570109326
0.000114596503301
0.000194430989178
0.000131629937508
-2.27259604099e-08
1.72002570355e-06
-4.31324668319e-08
1.71462789612e-06
-1.25467943673e-07
1.05007125992e-06
-2.58247768139e-07
1.64326380336e-06
-2.88773123431e-07
1.66508411086e-06
-3.22902433489e-07
1.72075304327e-06
-3.88080481135e-07
1.47063931602e-06
-4.34019882793e-07
1.59230258332e-06
-4.75871959179e-07
1.09411530812e-06
-5.22590788008e-07
1.00824964634e-06
-5.83471612674e-07
1.16379035952e-06
-6.49418646705e-07
1.29148554524e-06
-7.18279437272e-07
1.56606693794e-06
-7.49597132597e-07
1.25671187375e-06
-8.13832605735e-07
1.26287864382e-06
-8.80063239103e-07
1.49139810807e-06
-9.22028959331e-07
1.60432139842e-06
-9.41596141857e-07
1.52387413984e-06
-9.80089907524e-07
1.63625828237e-06
-1.01050374339e-06
1.59851212594e-06
-1.02614428221e-06
1.55180681752e-06
-1.10427910123e-06
1.64123761409e-06
-1.16531194494e-06
1.46652341331e-06
-1.23233751843e-06
1.133893962e-06
-1.29860237951e-06
1.05229024427e-06
-1.34048335604e-06
9.96000511195e-07
-1.38820193268e-06
1.07389981773e-06
-1.53959559549e-06
1.26306164419e-06
-1.72149205831e-06
1.66757182304e-06
-1.73729134727e-06
1.75545326703e-06
-1.70878732207e-06
1.64562979556e-06
-1.7549718953e-06
1.61793145502e-06
-1.8116572241e-06
1.68521026299e-06
-1.91702982749e-06
1.73829959049e-06
-2.03990525687e-06
1.69403044997e-06
-2.14991278906e-06
1.76955175845e-06
-2.22199959079e-06
1.77728013572e-06
-2.29508788572e-06
1.78099299383e-06
-2.37395921404e-06
1.78357720454e-06
-2.44341772946e-06
1.75466654898e-06
-2.48494110889e-06
1.70062234539e-06
-2.46357463715e-06
1.56663894914e-06
-2.27833523729e-06
1.2350549038e-06
-2.07183978494e-06
9.12233428954e-07
-2.01928717774e-06
8.11092543046e-07
-2.06933319046e-06
7.82117071992e-07
-2.09405949203e-06
7.10877397964e-07
-1.98014038323e-06
5.41409710411e-07
-1.76758491689e-06
2.791986131e-07
-1.58411138574e-06
7.00714213442e-08
-1.44305636466e-06
-1.56921779997e-07
-1.47797600187e-06
-2.30674001471e-07
-1.65655180127e-06
-4.36719403136e-07
-1.69647292363e-06
-1.11142835897e-06
8.30864865887e-07
-4.81850570883e-06
8.57061166137e-06
-1.0153330444e-05
4.37352598597e-05
-2.96160739555e-05
8.36066708881e-05
-6.33465329e-05
0.000111004487343
-8.09049110402e-05
0.000132956547865
-9.34791218264e-05
0.00015261856057
-0.000101674892234
0.000170937741544
-0.00010613058939
0.000188265272761
-0.000107471687653
0.000204797339486
-0.000106083027006
0.000220632197729
-0.000102203002596
0.000235856336877
-9.59780928078e-05
0.000250569984252
-8.74979271047e-05
0.000264868464765
-7.68227900463e-05
0.000278837052398
-6.39839500788e-05
0.000292547992622
-4.89808796212e-05
0.000306026221736
-3.1778181542e-05
0.000319015118941
-1.23735501528e-05
0.000330999641841
9.47239441684e-06
0.000341195759231
3.38078307431e-05
0.000347865815308
6.13493147545e-05
0.000349315286638
9.39463998467e-05
0.000341419668655
0.000133282655346
0.000317025433849
0.000183962154851
0.000255254675938
0.00025619443673
0.000386882620199
-1.91754454131e-08
1.73926590502e-06
-4.72780378349e-08
1.74262339435e-06
-1.60985134838e-07
1.16444143542e-06
-2.43826109493e-07
1.72653515474e-06
-2.43792010722e-07
1.66571321201e-06
-2.78731026059e-07
1.75614848205e-06
-4.01769762237e-07
1.59422593072e-06
-3.78200676385e-07
1.56935104318e-06
-4.57892872315e-07
1.17414075627e-06
-5.15095425846e-07
1.06597308984e-06
-5.7523277339e-07
1.22427230421e-06
-6.38621677365e-07
1.35564167056e-06
-7.0085227474e-07
1.62869508823e-06
-7.49919848496e-07
1.30620628573e-06
-8.14659867742e-07
1.32817202864e-06
-8.68724186196e-07
1.5460124179e-06
-8.93602825646e-07
1.62952634753e-06
-9.07200358208e-07
1.53805479572e-06
-9.4958306547e-07
1.67911723229e-06
-9.71129758166e-07
1.6202739037e-06
-9.63087015376e-07
1.54432569038e-06
-1.01802680745e-06
1.69701609588e-06
-1.08251906782e-06
1.53169333222e-06
-1.16121256829e-06
1.21338723256e-06
-1.23487642865e-06
1.12663999455e-06
-1.30507993186e-06
1.066770243e-06
-1.39306932215e-06
1.16269522012e-06
-1.58934473176e-06
1.46012185386e-06
-1.62902274121e-06
1.70828442288e-06
-1.64324366779e-06
1.77037057501e-06
-1.67261441199e-06
1.67598218808e-06
-1.79567837277e-06
1.74206231539e-06
-1.82603144797e-06
1.71676623546e-06
-1.87173283759e-06
1.78513211729e-06
-1.96830945349e-06
1.79159712346e-06
-2.0340605141e-06
1.83631882261e-06
-2.11733620946e-06
1.86155967155e-06
-2.19246063546e-06
1.85724975903e-06
-2.24648351967e-06
1.83873116246e-06
-2.29337462458e-06
1.80261099475e-06
-2.32490137923e-06
1.73307202377e-06
-2.19425254405e-06
1.43683828471e-06
-1.96834085099e-06
1.01001047824e-06
-1.89356512884e-06
8.38345896261e-07
-1.9320787939e-06
8.50559735197e-07
-1.95369364725e-06
8.04829372126e-07
-1.85194482062e-06
6.09921575571e-07
-1.65180384929e-06
3.41829828596e-07
-1.486336808e-06
1.14939595409e-07
-1.44658994191e-06
3.16558557224e-08
-1.46550558926e-06
-1.36358119697e-07
-1.96950361483e-06
2.75557883255e-07
-2.33180026305e-06
-7.12755832584e-08
7.88433700749e-06
-1.13218343754e-05
2.96908532772e-05
-2.66195911165e-05
6.14889742518e-05
-4.19491118758e-05
9.803833039e-05
-6.61638948706e-05
0.000122561004041
-8.78686866025e-05
0.000144229708747
-0.000102573292191
0.000163720975468
-0.000112970163526
0.000181934898385
-0.000119888720517
0.000199341462152
-0.000123537259718
0.000216119278152
-0.000124249797736
0.000232370831052
-0.000122335073435
0.000248177918711
-0.000118010750213
0.000263626888037
-0.000111427895874
0.000278818603991
-0.000102690654117
0.000293860376364
-9.18658485355e-05
0.00030885738944
-7.8982582049e-05
0.000323900687227
-6.4026193349e-05
0.000339047571845
-4.69272953972e-05
0.000354194258925
-2.75224513006e-05
0.000369343789369
-5.67893589655e-06
0.000384016532358
1.91336009718e-05
0.000397712699303
4.76517427915e-05
0.000410183708801
8.14731110861e-05
0.000420815952262
0.000122646125765
0.000430240818438
0.000174530504157
0.000445301097602
0.000241129414031
0.000312741122669
-1.51750793224e-08
1.75521900658e-06
-6.19141567152e-08
1.79037289001e-06
-1.98467673103e-07
1.30129682033e-06
-2.17912076289e-07
1.74660084215e-06
-2.00635832009e-07
1.64880364952e-06
-2.46257041323e-07
1.80218336329e-06
-3.71289572286e-07
1.7198512304e-06
-3.16771602393e-07
1.51514793061e-06
-4.42626823109e-07
1.30062986929e-06
-5.08999475284e-07
1.13273981578e-06
-5.65045773235e-07
1.28091980892e-06
-6.25146656446e-07
1.41595633297e-06
-6.78608210495e-07
1.68279085914e-06
-7.3450396801e-07
1.362613208e-06
-8.04009164194e-07
1.39803670593e-06
-8.58244167595e-07
1.60063416799e-06
-8.55470049329e-07
1.62726436657e-06
-8.60030922268e-07
1.54282085081e-06
-9.09255729874e-07
1.72866016612e-06
-9.21580060475e-07
1.63304095332e-06
-8.99754303823e-07
1.52282096834e-06
-9.18491735056e-07
1.71612789939e-06
-1.00317535778e-06
1.61717627523e-06
-1.09058921628e-06
1.3015253365e-06
-1.16854987271e-06
1.20528365256e-06
-1.2531227983e-06
1.15215277187e-06
-1.32918456278e-06
1.23932840171e-06
-1.44908176074e-06
1.58088772376e-06
-1.432938825e-06
1.69273009373e-06
-1.47562065422e-06
1.81393810701e-06
-1.46570087409e-06
1.66682929621e-06
-1.52492067071e-06
1.80231437552e-06
-1.65772091338e-06
1.85060890122e-06
-1.7832908851e-06
1.91177746195e-06
-1.88671024078e-06
1.89603930347e-06
-1.92801430903e-06
1.87851138337e-06
-1.99365123746e-06
1.92818497204e-06
-2.05006473314e-06
1.91465355733e-06
-2.11082293796e-06
1.90043657375e-06
-2.16475091604e-06
1.85733918853e-06
-2.07134423434e-06
1.6403430659e-06
-1.81797076036e-06
1.18417083662e-06
-1.70087281187e-06
8.93634905807e-07
-1.72448669687e-06
8.62837063547e-07
-1.72919065722e-06
8.56407588948e-07
-1.62130705487e-06
6.97735117351e-07
-1.45640804208e-06
4.45618423435e-07
-1.3608245079e-06
2.46802319775e-07
-1.37004522533e-06
1.25657796509e-07
-1.83094856732e-06
4.95178421514e-07
-3.21360974758e-06
1.24970752723e-06
-3.85055563525e-06
9.18892056287e-07
1.13569494971e-05
-1.52699721093e-05
3.87949474018e-05
-3.87535579831e-05
6.87335957748e-05
-5.65551978969e-05
0.000100653345817
-7.3866812596e-05
0.000127080254959
-9.2589895673e-05
0.000148886619372
-0.000109674585778
0.000168977164331
-0.000122663551362
0.000187867073781
-0.000131859893559
0.000205808614424
-0.00013783025067
0.000223050881128
-0.000140779695235
0.000239750226123
-0.000140949514458
0.000256020217071
-0.000138605618964
0.000271970630626
-0.000133961907056
0.000287718817597
-0.000127176988992
0.000303392768982
-0.000118365695822
0.000319129114678
-0.000107603489073
0.000335070282439
-9.49253436484e-05
0.000351362577685
-8.03203836573e-05
0.000368154429082
-6.37213443936e-05
0.000385611380598
-4.49816677944e-05
0.000403770322287
-2.38400453417e-05
0.000422880374541
2.17712260509e-08
0.000443271586026
2.7258960685e-05
0.00046588115864
5.88612272519e-05
0.000492529833815
9.59930793503e-05
0.00052722751491
0.000139826664191
0.000577025543702
0.000191326415231
0.000244552264146
-1.20631416294e-08
1.76711877911e-06
-7.32719081302e-08
1.85152587754e-06
-2.1586679081e-07
1.44436674041e-06
-1.78204523811e-07
1.709198154e-06
-1.81471218284e-07
1.65241202876e-06
-2.17912791859e-07
1.83915561764e-06
-3.07696649542e-07
1.80982423129e-06
-2.71689351395e-07
1.47980453838e-06
-4.36105782535e-07
1.46537242957e-06
-5.02605684373e-07
1.19971366082e-06
-5.51747123622e-07
1.33035886272e-06
-6.06980517356e-07
1.47184423064e-06
-6.50116965893e-07
1.72624798187e-06
-7.07247023167e-07
1.42006847165e-06
-7.76687683536e-07
1.46795666912e-06
-8.35976406308e-07
1.66024201704e-06
-7.99249805882e-07
1.59066325254e-06
-8.06179627793e-07
1.55016603524e-06
-8.58144141185e-07
1.78082610277e-06
-8.52977606443e-07
1.627990847e-06
-8.44572163951e-07
1.51460906841e-06
-8.30372647924e-07
1.70244551529e-06
-9.319660609e-07
1.71929769029e-06
-1.0260238434e-06
1.39618141865e-06
-1.10373464741e-06
1.28368509483e-06
-1.19068717549e-06
1.2395550184e-06
-1.25769974252e-06
1.3071840999e-06
-1.34501693697e-06
1.66890621749e-06
-1.37717272273e-06
1.72565324764e-06
-1.37796411172e-06
1.81529419702e-06
-1.42629521113e-06
1.71595526151e-06
-1.55359391998e-06
1.93057723672e-06
-1.62238619342e-06
1.92045300407e-06
-1.67881617617e-06
1.96912663957e-06
-1.78242180021e-06
2.00054020379e-06
-1.85972401018e-06
1.9567447013e-06
-1.8922733093e-06
1.96163523886e-06
-1.93039417433e-06
1.95367265162e-06
-1.97083607685e-06
1.94156413249e-06
-1.93376035976e-06
1.82074163047e-06
-1.69448285857e-06
1.4015447139e-06
-1.51058124137e-06
1.00080191935e-06
-1.49685607671e-06
8.80733442187e-07
-1.50427419166e-06
8.71274369943e-07
-1.43460352552e-06
7.8743580567e-07
-1.31180973532e-06
5.7566370297e-07
-1.28380681151e-06
4.17762871025e-07
-1.60474995935e-06
5.6972405819e-07
-2.62135308665e-06
1.14528644131e-06
-3.61037885889e-06
1.48863337635e-06
-3.39936440656e-06
1.04332511736e-06
1.26207002077e-05
-1.50934166253e-05
3.99138523231e-05
-4.25579615889e-05
6.59168923627e-05
-6.47549499301e-05
9.34743278466e-05
-8.41115766416e-05
0.000121065440844
-0.000101457144577
0.00014613955369
-0.000117663452691
0.000168404387333
-0.000131939100238
0.000188845608663
-0.000143104588254
0.000207999644103
-0.000151013874437
0.000226116452563
-0.000155947140369
0.000243444266934
-0.000158107759648
0.000260196362347
-0.000157702025791
0.000276545675386
-0.000154955522971
0.000292649890041
-0.000150066871177
0.000308665385687
-0.000143193393617
0.000324753050566
-0.000134454418995
0.00034108155316
-0.00012393323421
0.000357830724729
-0.000111675975071
0.000375197035582
-9.76884372174e-05
0.000393403766112
-8.19300652253e-05
0.000412724660271
-6.43047334081e-05
0.000433526460146
-4.46439719168e-05
0.000456241127486
-2.26947913888e-05
0.000481601725798
1.89670007769e-06
0.00051086318084
2.95975699293e-05
0.000546132536986
6.07197457611e-05
0.000590555608517
9.53985149349e-05
0.000648905777452
0.000132972573759
0.000169141791986
-2.38097038041e-08
1.79173921021e-06
-7.19729773163e-08
1.90044700259e-06
-1.86309942349e-07
1.55896666827e-06
-1.69457778268e-07
1.69276527527e-06
-2.07420858291e-07
1.69071113952e-06
-2.2139666342e-07
1.85323390752e-06
-2.8503238922e-07
1.87406940485e-06
-2.9942008019e-07
1.49434153287e-06
-4.3341068062e-07
1.59998298949e-06
-4.91790309468e-07
1.25845369324e-06
-5.3496804535e-07
1.37399948658e-06
-5.86125819786e-07
1.52313958005e-06
-6.18325305271e-07
1.75892848614e-06
-6.72724526723e-07
1.47488663801e-06
-7.32918269594e-07
1.52835360648e-06
-7.70337871079e-07
1.69794481644e-06
-7.43434231024e-07
1.56412365405e-06
-7.71485539194e-07
1.57822857195e-06
-8.09772767224e-07
1.81939644115e-06
-7.85710602286e-07
1.60410079798e-06
-8.15988117033e-07
1.54509755452e-06
-8.31375102091e-07
1.71798502363e-06
-8.61599656433e-07
1.74991958705e-06
-9.84602027814e-07
1.51978132414e-06
-1.05220994251e-06
1.35179819291e-06
-1.13316861971e-06
1.32130933321e-06
-1.19583638073e-06
1.37038009233e-06
-1.26005078696e-06
1.73388427914e-06
-1.31776601165e-06
1.78405764452e-06
-1.34227082195e-06
1.84049697734e-06
-1.42605590667e-06
1.80040089885e-06
-1.41014430773e-06
1.91546169611e-06
-1.49192023795e-06
2.00295713984e-06
-1.62136706183e-06
2.09948138574e-06
-1.6656514411e-06
2.04567612627e-06
-1.72221508899e-06
2.01416591136e-06
-1.7756691832e-06
2.01599950989e-06
-1.80656189422e-06
1.98522531632e-06
-1.81043539047e-06
1.94586231068e-06
-1.60263297794e-06
1.61319593054e-06
-1.36103846665e-06
1.16026762417e-06
-1.29224856468e-06
9.32663048969e-07
-1.29191073276e-06
8.81283523174e-07
-1.27228366018e-06
8.52460130571e-07
-1.21514961539e-06
7.31055155517e-07
-1.23097079285e-06
5.91735797335e-07
-1.82860781802e-06
1.01745111661e-06
-2.64449518918e-06
1.38891206958e-06
-3.1202878528e-06
1.62515147704e-06
-3.00841661041e-06
1.37978017877e-06
1.1339629933e-05
-1.32974288462e-05
3.83647397288e-05
-4.21138367082e-05
6.36765566265e-05
-6.78691750238e-05
8.94946129562e-05
-9.05730916547e-05
0.000115471529939
-0.000110088429276
0.000140951605313
-0.000126936990878
0.000164873363864
-0.000141585035856
0.000186818517427
-0.00015388415926
0.000207113778265
-0.000163399842501
0.000226134093766
-0.000170034271601
0.000244137245861
-0.000173950492547
0.000261365950008
-0.000175336791835
0.000278047086606
-0.000174383633381
0.00029438055473
-0.00017128960031
0.000310550853835
-0.000166237920411
0.000326738633701
-0.000159382054017
0.000343127363828
-0.000150844164275
0.000359908857382
-0.000140715882477
0.000377289847477
-0.000129058296113
0.000395501367536
-0.000115901499293
0.000414813348904
-0.000101243827792
0.00043555775388
-8.50511100931e-05
0.000458169239101
-6.725751401e-05
0.000483244390069
-4.77718707378e-05
0.000511617575189
-2.64782050997e-05
0.000544518592612
-3.30536598965e-06
0.000583762038794
2.14733655929e-05
0.000631512691175
4.76438010201e-05
0.000690976280336
7.35065392232e-05
9.6780297625e-05
-4.7188331842e-08
1.83856255084e-06
-6.58267776555e-08
1.91903005406e-06
-1.41266806722e-07
1.63481870117e-06
-1.96040087448e-07
1.7477494407e-06
-2.38263787785e-07
1.73313854354e-06
-2.4318243818e-07
1.85861878542e-06
-2.90860289286e-07
1.92174378625e-06
-3.28915382076e-07
1.53293520224e-06
-3.86477403993e-07
1.65781302006e-06
-4.64931447218e-07
1.33723893611e-06
-5.13747394588e-07
1.42304294896e-06
-5.64045255018e-07
1.57391251874e-06
-5.87766004457e-07
1.78286535946e-06
-6.40385049731e-07
1.52772006956e-06
-6.94686611702e-07
1.58304064217e-06
-7.2178853857e-07
1.72532273515e-06
-7.45826807039e-07
1.58822536645e-06
-7.7618154665e-07
1.60897576506e-06
-7.78657184636e-07
1.82192667426e-06
-7.51338349131e-07
1.57698687417e-06
-8.56213019115e-07
1.65002551318e-06
-8.84278961769e-07
1.74625189747e-06
-8.77509277109e-07
1.7435513573e-06
-9.68766226714e-07
1.61149995287e-06
-1.01467415111e-06
1.3983210796e-06
-1.09612342347e-06
1.40309454699e-06
-1.14691565694e-06
1.42191885385e-06
-1.17417339124e-06
1.76204300288e-06
-1.25987781725e-06
1.8705001823e-06
-1.31063944429e-06
1.89187835149e-06
-1.36411001336e-06
1.85441892318e-06
-1.35343932723e-06
1.9052859451e-06
-1.44238251911e-06
2.09273973467e-06
-1.49509625183e-06
2.1528915544e-06
-1.54111619296e-06
2.09258241856e-06
-1.60189397171e-06
2.07587758216e-06
-1.64687685264e-06
2.06173098344e-06
-1.64768341984e-06
1.98649585954e-06
-1.52669156387e-06
1.82495549515e-06
-1.27691836251e-06
1.36349143561e-06
-1.15458837245e-06
1.03828373464e-06
-1.13048040446e-06
9.09230612413e-07
-1.1346330279e-06
8.86395689791e-07
-1.14554427739e-06
8.6421094274e-07
-1.27401262115e-06
8.60224629636e-07
-1.92639947814e-06
1.24543603203e-06
-2.53517116416e-06
1.62943641314e-06
-2.65739496109e-06
1.51543522836e-06
-2.7888439285e-06
1.75961353263e-06
8.47610546389e-06
-9.87575001393e-06
3.38867747976e-05
-3.87025278953e-05
5.96226662042e-05
-6.78496457589e-05
8.54248968716e-05
-9.36722124972e-05
0.00011083602655
-0.000115984945515
0.000135734048103
-0.000134986870078
0.000159800698981
-0.00015100386776
0.000182563774508
-0.00016434826259
0.000203784812384
-0.000175105358072
0.000223591429725
-0.000183206657215
0.000242231357264
-0.000188674457251
0.000259936229393
-0.000191655698324
0.000276932249419
-0.000192333238945
0.000293441082808
-0.00019089299352
0.000309671026797
-0.000187520176703
0.000325819730259
-0.00018238736044
0.000342081233311
-0.000175644397616
0.000358652018782
-0.000167415892851
0.00037573706137
-0.000157801979499
0.000393557397171
-0.000146879816655
0.000412360388502
-0.000134705835062
0.000432434313138
-0.000121319286132
0.000454129527266
-0.000106748034126
0.000477888953251
-9.10187682112e-05
0.00050429081779
-7.4175489842e-05
0.000534130730154
-5.63197031973e-05
0.000568536785118
-3.77131776816e-05
0.000608564134509
-1.85564792861e-05
0.00065611786516
8.73448938914e-08
0.000712948117702
1.6674342135e-05
2.96614115286e-05
-5.00723795686e-08
1.88945759195e-06
-5.18103912707e-08
1.92135624437e-06
-9.45211374165e-08
1.6777075333e-06
-2.11701034501e-07
1.8653306453e-06
-2.43754692671e-07
1.76548843558e-06
-2.52615336168e-07
1.86748338031e-06
-2.85198158868e-07
1.9548149513e-06
-3.32662179324e-07
1.58049219021e-06
-3.69391051492e-07
1.69494333907e-06
-4.48350256692e-07
1.41651906884e-06
-4.94785709913e-07
1.46978731433e-06
-5.4382114295e-07
1.6230206649e-06
-5.59615501977e-07
1.79896451392e-06
-6.11620616746e-07
1.58001865191e-06
-6.64740012377e-07
1.63632103163e-06
-6.89377670743e-07
1.75016071794e-06
-7.40833428794e-07
1.64004467799e-06
-7.798412347e-07
1.64793963661e-06
-7.87374280769e-07
1.82975452245e-06
-8.1584414471e-07
1.60549098175e-06
-9.22791209751e-07
1.75709333103e-06
-9.01175461846e-07
1.72468498936e-06
-8.96494802168e-07
1.73898179331e-06
-9.47752451123e-07
1.66310972803e-06
-1.04633215757e-06
1.49720869086e-06
-1.08195327487e-06
1.43943657241e-06
-1.09903525089e-06
1.43952843624e-06
-1.10654096244e-06
1.77006020909e-06
-1.22216407322e-06
1.98698431861e-06
-1.26036260332e-06
1.93079358877e-06
-1.28902821459e-06
1.88359428081e-06
-1.32216680514e-06
1.93902153074e-06
-1.31213557494e-06
2.08308901274e-06
-1.39645557441e-06
2.23798592457e-06
-1.43913206844e-06
2.13605829137e-06
-1.49639076534e-06
2.13395504637e-06
-1.52029184429e-06
2.08631699839e-06
-1.46278639233e-06
1.92927876065e-06
-1.26128985062e-06
1.62344870437e-06
-1.09527452265e-06
1.19751874911e-06
-1.03659669503e-06
9.79994221056e-07
-1.0316913129e-06
9.05072517317e-07
-1.07652242493e-06
9.32149413501e-07
-1.30671114885e-06
1.09541678928e-06
-1.81210043292e-06
1.36656393181e-06
-2.26202509322e-06
1.69714395433e-06
-2.34506049703e-06
1.71625495551e-06
-2.47888056162e-06
1.65292197634e-06
3.92159393362e-06
-4.62471179745e-06
2.68836780195e-05
-3.28292920955e-05
5.36336792523e-05
-6.54525262543e-05
7.99199112879e-05
-9.41371224276e-05
0.000105467970678
-0.000119221505727
0.00013024658301
-0.000140764490676
0.00015416772101
-0.000158908657301
0.00017707131296
-0.000173907920516
0.000198758638314
-0.000186035970442
0.000219134925954
-0.0001954820065
0.000238284235042
-0.000202356336832
0.000256390972361
-0.000206781593159
0.000273662073196
-0.000208927243313
0.000290310072125
-0.000208981739954
0.000306548353558
-0.000207131843984
0.000322584460826
-0.000203556925351
0.000338619332762
-0.000198422948266
0.00035485113337
-0.000191876991227
0.000371480162846
-0.000184045792741
0.000388714462966
-0.000175037235785
0.000406776883522
-0.000164943287537
0.000425914271309
-0.000153844392533
0.000446409628525
-0.000141815941874
0.000468598118791
-0.000128937973672
0.000492887791523
-0.000115309984891
0.000519785071957
-0.000101074306759
0.00054991690541
-8.64529158729e-05
0.000584009671509
-7.18073809217e-05
0.000623157012446
-5.7705695901e-05
0.000668432074064
-4.51899711747e-05
0.000720588524084
-3.54833551289e-05
-3.04808237513e-05
-3.80479224672e-08
1.92690306205e-06
-3.67386181911e-08
1.91993267692e-06
-8.42040027374e-08
1.72555456072e-06
-1.92670142841e-07
1.9739923707e-06
-2.25004657384e-07
1.79799394522e-06
-2.48131751941e-07
1.8910190075e-06
-2.7196927615e-07
1.97867558104e-06
-3.33306638923e-07
1.64221366633e-06
-3.75183163946e-07
1.73708224414e-06
-4.42579188814e-07
1.48410698627e-06
-4.7940253573e-07
1.50677617718e-06
-5.2451849101e-07
1.66842617843e-06
-5.32532060007e-07
1.80710958321e-06
-5.84798011085e-07
1.6323976408e-06
-6.35435346772e-07
1.68718172927e-06
-6.60009883027e-07
1.77501509363e-06
-7.30010249849e-07
1.71005836016e-06
-7.72622076438e-07
1.69085981425e-06
-7.8751435275e-07
1.84462025306e-06
-8.34521651595e-07
1.65262163889e-06
-8.71668721324e-07
1.79419620367e-06
-8.57992424867e-07
1.71095042516e-06
-8.32929001913e-07
1.71397221317e-06
-8.770418845e-07
1.70733242393e-06
-9.30906070169e-07
1.55139057129e-06
-9.74577783847e-07
1.48312096277e-06
-9.98180018176e-07
1.46337984168e-06
-1.02304891851e-06
1.79579046485e-06
-1.15536289987e-06
2.11997956186e-06
-1.18823340131e-06
1.96433134287e-06
-1.19559742782e-06
1.89159114883e-06
-1.22638932384e-06
1.97012027775e-06
-1.21007908018e-06
2.06727369716e-06
-1.23224254041e-06
2.26054664481e-06
-1.25196733344e-06
2.15639102945e-06
-1.32543171307e-06
2.2083102055e-06
-1.35940617116e-06
2.12088461518e-06
-1.27951601816e-06
1.84945841912e-06
-1.09879253959e-06
1.4426177634e-06
-9.99994786659e-07
1.09887014042e-06
-9.72148572907e-07
9.52638115281e-07
-1.01117776012e-06
9.44955938015e-07
-1.25846630978e-06
1.18038721584e-06
-1.62499413635e-06
1.46302820868e-06
-1.8538790854e-06
1.596562004e-06
-1.91188501544e-06
1.75719129261e-06
-2.08690377479e-06
1.89497899985e-06
-1.57910504615e-06
1.15640787629e-06
1.83745503584e-05
-2.45644051293e-05
4.63901606665e-05
-6.08442072246e-05
7.30579593638e-05
-9.21215763981e-05
9.88970538707e-05
-0.000119977615584
0.000123865564769
-0.000144191152616
0.000147863834907
-0.000164763639271
0.000170816024782
-0.000181861527984
0.000192651283086
-0.000195743746549
0.000213308592656
-0.00020669379133
0.000232787453985
-0.000214961360923
0.000251181948313
-0.000220751325253
0.000268654786245
-0.000224254938633
0.000285397081352
-0.000225670070407
0.000301609878536
-0.000225195101432
0.000317496950929
-0.000223019521053
0.000333259606239
-0.000219320229328
0.000349095057578
-0.000214259098137
0.000365198346138
-0.000207981029375
0.00038176594117
-0.00020061419546
0.000399000329987
-0.000192272492906
0.000417115756807
-0.000183059658302
0.000436345394715
-0.000173075055354
0.000456950072844
-0.000162421749868
0.000479228616594
-0.000151217742016
0.000503529169065
-0.000139611859626
0.000530259890573
-0.000127806318304
0.000559894673003
-0.000116088879653
0.000592963377294
-0.000104877295994
0.000630028790992
-9.47725881346e-05
0.00067149622932
-8.66588608907e-05
0.000717704084227
-8.16922472261e-05
-8.14263465728e-05
-4.5997166025e-08
1.97380612976e-06
-1.80947805589e-08
1.89248245675e-06
-1.00071643926e-07
1.80767371176e-06
-1.41809900713e-07
2.01607302994e-06
-1.89970498372e-07
1.8464085609e-06
-2.30668385055e-07
1.93173863828e-06
-2.56584962511e-07
2.00495342006e-06
-3.27165542862e-07
1.71292885372e-06
-3.63589594126e-07
1.77372089224e-06
-4.36987795191e-07
1.55780257425e-06
-4.63997910989e-07
1.53395603808e-06
-5.01424330287e-07
1.705880938e-06
-5.06978936163e-07
1.81280056538e-06
-5.62803264976e-07
1.68840700064e-06
-6.04110053798e-07
1.72863077594e-06
-6.27595190696e-07
1.79856933885e-06
-7.17112568839e-07
1.79989252644e-06
-7.56960261164e-07
1.73068057931e-06
-7.63647254272e-07
1.85146672992e-06
-8.12546172874e-07
1.70151653011e-06
-7.9977425676e-07
1.78141829433e-06
-8.0025272366e-07
1.71135751927e-06
-8.03528423284e-07
1.71716666708e-06
-8.20322610445e-07
1.72410319043e-06
-8.95340883408e-07
1.62630609176e-06
-9.44229632582e-07
1.53226820999e-06
-9.15115083163e-07
1.4346056649e-06
-9.71341590058e-07
1.85203333446e-06
-1.06827837337e-06
2.21754829408e-06
-1.12967706129e-06
2.02647921032e-06
-1.1723510656e-06
1.93479295278e-06
-1.21200951495e-06
2.010264685e-06
-1.17533189412e-06
2.03073975197e-06
-1.14958299048e-06
2.23510241357e-06
-1.19456951842e-06
2.20200658053e-06
-1.20915377803e-06
2.22342598819e-06
-1.21351550532e-06
2.12567564008e-06
-1.13317396221e-06
1.76938842765e-06
-1.00164689307e-06
1.31112433543e-06
-9.39869212042e-07
1.03733833424e-06
-9.40938133724e-07
9.5425963093e-07
-1.13153235885e-06
1.1363986619e-06
-1.45599253855e-06
1.50580670526e-06
-1.57703329236e-06
1.58493785039e-06
-1.59068117446e-06
1.61156351543e-06
-1.68388318171e-06
1.85292014011e-06
-2.21406407173e-06
2.42719715143e-06
1.18979805237e-05
-1.29481152961e-05
3.91099745757e-05
-5.17743112562e-05
6.51657734085e-05
-8.69013028885e-05
9.11371054048e-05
-0.000118094502283
0.000116377490353
-0.000145219287412
0.000140615250958
-0.000168429910396
0.000163737886427
-0.000187887068616
0.000185701394911
-0.000203825714032
0.000206497380921
-0.000216540346075
0.000226145486527
-0.000226342482586
0.000244707518905
-0.000233523968801
0.000262299295741
-0.000238343674732
0.000279080104354
-0.000241036323952
0.000295232160748
-0.000241822711245
0.000310946939978
-0.000240910480214
0.000326418336176
-0.000238491534987
0.000341838582418
-0.000234741118536
0.000357396667537
-0.00022981785354
0.000373279220082
-0.00022386428768
0.000389672962473
-0.000217008681162
0.000406768080886
-0.000209368404121
0.000424762413777
-0.000201054835678
0.000443866353154
-0.000192179908129
0.000464308279927
-0.00018286465488
0.000486339904021
-0.000173250425504
0.000510240427997
-0.000163513491035
0.000536317144454
-0.000153884136075
0.000564898333553
-0.000144671048226
0.000596311658428
-0.000136291579814
0.000630842861058
-0.000129304914906
0.000668635483237
-0.00012445271201
0.000709585297592
-0.000122642711749
-0.000124848396668
-4.73032987443e-08
2.02036674884e-06
-2.79070095683e-08
1.87295479443e-06
-1.04077293521e-07
1.8840948774e-06
-1.22837915255e-07
2.03492361212e-06
-1.67074100008e-07
1.89074298647e-06
-2.08499689272e-07
1.97345628085e-06
-2.38193188671e-07
2.03470745834e-06
-3.09418215754e-07
1.78435383004e-06
-3.39585066727e-07
1.8041921019e-06
-4.28935685006e-07
1.64721773396e-06
-4.49370079e-07
1.55448781912e-06
-4.73157660936e-07
1.7298074692e-06
-4.90058086321e-07
1.82981996158e-06
-5.5308039211e-07
1.75145283816e-06
-5.81473903504e-07
1.75710479771e-06
-6.0710997056e-07
1.82445861276e-06
-7.02705898352e-07
1.89545509166e-06
-7.34790919883e-07
1.76292692561e-06
-7.26292451848e-07
1.84297668366e-06
-7.69790553483e-07
1.74505110422e-06
-7.60931805704e-07
1.77254093465e-06
-7.7659409329e-07
1.72695303037e-06
-8.2178226024e-07
1.76224195829e-06
-8.30095545835e-07
1.7323384503e-06
-9.26592465438e-07
1.72296244423e-06
-9.68163797495e-07
1.57375317357e-06
-9.8568920802e-07
1.45180113573e-06
-9.2588256425e-07
1.79249112928e-06
-9.58498618874e-07
2.25051306458e-06
-1.05469617378e-06
2.12313619613e-06
-1.10125491497e-06
1.98193055426e-06
-1.09044688412e-06
1.99973563615e-06
-1.0814609797e-06
2.02199450015e-06
-1.05845729254e-06
2.21237500158e-06
-1.09209768051e-06
2.23597307906e-06
-1.07550820791e-06
2.2075559935e-06
-1.08192082736e-06
2.13281067918e-06
-1.02070917331e-06
1.70818219559e-06
-9.30565767048e-07
1.22116896066e-06
-8.86707505056e-07
9.93835618756e-07
-9.41199618656e-07
1.00953583569e-06
-1.24448298682e-06
1.44027680749e-06
-1.38552816643e-06
1.64733099498e-06
-1.36180681875e-06
1.56230967102e-06
-1.33264470931e-06
1.58290479454e-06
-1.09068667607e-06
1.61319351056e-06
2.4009453929e-06
-1.0594943314e-06
2.88560137175e-05
-3.93990894858e-05
5.56314630826e-05
-7.85515993462e-05
8.21151240032e-05
-0.000113387192679
0.000107725534512
-0.000143706590012
0.00013230563816
-0.000169800576643
0.00015571887637
-0.000191844026323
0.000177900959017
-0.000210069872461
0.000198852616126
-0.000224778017583
0.000218617052626
-0.000236305400332
0.000237268011443
-0.000244994050194
0.000254909642814
-0.000251166206606
0.000271678109993
-0.000255112748934
0.00028773555847
-0.000257094378598
0.00030325909028
-0.000257346851512
0.000318431800116
-0.000256083800766
0.000333437449614
-0.000253497802678
0.000348457417112
-0.000249761713065
0.000363669404921
-0.000245030484545
0.000379247794189
-0.000239443339138
0.000395365150736
-0.000233126729639
0.000412194453496
-0.000226198432158
0.000429911773164
-0.000218772928777
0.000448699209415
-0.000210968165651
0.00046874760944
-0.000202913939354
0.000490258363059
-0.000194762112376
0.000513442873966
-0.000186698988088
0.000538517722271
-0.000178959930536
0.000565692029416
-0.000171846201942
0.000595142623427
-0.000165742988241
0.000626972428273
-0.000161135635298
0.000661141129049
-0.000158622263239
0.000697400716476
-0.000158902907814
-0.00016253894582
-3.17712573148e-08
2.0529853656e-06
-6.09774102586e-08
1.90248152095e-06
-1.05626812379e-07
1.92879760179e-06
-1.27932382009e-07
2.05742065048e-06
-1.61398952857e-07
1.92436362726e-06
-1.89994233044e-07
2.00204403356e-06
-2.20215953377e-07
2.06509836298e-06
-2.86954080058e-07
1.85129149453e-06
-3.08761587947e-07
1.82602123019e-06
-4.16633264379e-07
1.75534358864e-06
-4.39133832853e-07
1.57708034608e-06
-4.47205811677e-07
1.73790875519e-06
-4.71839315586e-07
1.85443300954e-06
-5.52468786175e-07
1.83222237356e-06
-5.7092707501e-07
1.7756590222e-06
-5.95749288205e-07
1.84921108093e-06
-6.6582761156e-07
1.96571571393e-06
-6.9219369788e-07
1.78927461449e-06
-6.91856580499e-07
1.8426551694e-06
-7.40631112703e-07
1.79388171723e-06
-7.64903343785e-07
1.79677488788e-06
-8.21612570945e-07
1.78359666091e-06
-8.69009846835e-07
1.80950453822e-06
-8.86826151661e-07
1.75005187302e-06
-8.86899044195e-07
1.72286499162e-06
-9.25483548441e-07
1.61220554177e-06
-9.63405845044e-07
1.48976150121e-06
-8.37036793301e-07
1.66577641395e-06
-8.54588419903e-07
2.26778376991e-06
-9.2371761981e-07
2.19264520841e-06
-1.01160777832e-06
2.07030576649e-06
-1.04625854726e-06
2.03492581736e-06
-1.08058717178e-06
2.05659642486e-06
-9.89541085583e-07
2.12161898323e-06
-9.57046889757e-07
2.20400578455e-06
-9.42874883031e-07
2.19389881653e-06
-9.48213392474e-07
2.13828475847e-06
-9.27065138113e-07
1.68773741949e-06
-8.71162818688e-07
1.16568097714e-06
-8.63095615117e-07
9.86299092754e-07
-1.04838302399e-06
1.19528784232e-06
-1.27982885422e-06
1.67212590876e-06
-1.26573139485e-06
1.63379106119e-06
-1.29677260577e-06
1.59407018794e-06
-1.49139805848e-06
1.77877675298e-06
-1.84017469239e-06
1.96279025626e-06
1.71972122172e-05
-2.0092305536e-05
4.53257072259e-05
-6.75284861683e-05
7.2184439203e-05
-0.000105413010529
9.8057828591e-05
-0.000139262823937
0.00012297598261
-0.000168626299117
0.000146734823686
-0.000193560484149
0.000169216209274
-0.000214326214909
0.000190394826954
-0.000231249169739
0.000210310420431
-0.000244694245136
0.000229045302862
-0.000255040905271
0.000246710202515
-0.000262659572231
0.000263437817768
-0.00026789444714
0.000279379592815
-0.000271055147353
0.000294700967068
-0.000272416373959
0.000309574931807
-0.000272221430928
0.000324176402287
-0.000270685882203
0.000338678527601
-0.000268000534205
0.000353250522777
-0.000264334315512
0.000368056682923
-0.000259837254954
0.000383256393742
-0.000254643672849
0.000399004903422
-0.000248875879159
0.000415454543454
-0.000242648742664
0.000432756202794
-0.000236075292684
0.000451060741452
-0.000229273457349
0.000470519916115
-0.000222373909889
0.000491285965915
-0.000215529009901
0.000513508721007
-0.0002089226137
0.000537328418789
-0.000202780481013
0.000562861955772
-0.000197380478886
0.000590179686652
-0.000193061409409
0.000619271839633
-0.000190228548138
0.000649998964425
-0.000189350179549
0.000682059417219
-0.000190963779214
-0.000195320208661
-2.67658168055e-08
2.07899964317e-06
-6.93138247202e-08
1.94487839222e-06
-1.05972488342e-07
1.96558160419e-06
-1.35948620353e-07
2.08740424961e-06
-1.62726467935e-07
1.95113344992e-06
-1.75487347875e-07
2.01493574266e-06
-2.0537952622e-07
2.09508108121e-06
-2.69627458401e-07
1.91552895423e-06
-2.81107245756e-07
1.83778844061e-06
-4.00934972771e-07
1.875199301e-06
-4.33123047932e-07
1.60931010599e-06
-4.31080925826e-07
1.73589407423e-06
-4.47821537865e-07
1.87132195168e-06
-5.52588545841e-07
1.93693201415e-06
-5.63709382327e-07
1.78675027322e-06
-5.83647399924e-07
1.86928936774e-06
-6.18874283385e-07
2.00084091106e-06
-6.4442112925e-07
1.81480730573e-06
-6.6402251756e-07
1.8623128475e-06
-7.20744578153e-07
1.85051624278e-06
-7.3472081201e-07
1.81076214122e-06
-8.13486711863e-07
1.86222828188e-06
-8.13280801594e-07
1.80912294975e-06
-8.32195326843e-07
1.7688101742e-06
-8.56546591669e-07
1.74718470288e-06
-9.30183703951e-07
1.68583068371e-06
-9.9800227683e-07
1.5572387487e-06
-9.59590882422e-07
1.62675254332e-06
-8.04990983861e-07
2.11280543687e-06
-8.43106859975e-07
2.23062936078e-06
-9.24986815972e-07
2.1525733358e-06
-9.85201897795e-07
2.09551491375e-06
-9.6940215177e-07
2.04124374798e-06
-9.40564018115e-07
2.09313839566e-06
-8.46627062867e-07
2.11034367145e-06
-8.17797316476e-07
2.16532115355e-06
-7.83730900468e-07
2.10535632099e-06
-8.43185308207e-07
1.74764389874e-06
-8.07919801322e-07
1.13086993075e-06
-8.28323991587e-07
1.00744847909e-06
-1.06782578417e-06
1.43538699397e-06
-1.13380296525e-06
1.73832481172e-06
-1.13156481523e-06
1.63289064222e-06
-1.22309382066e-06
1.68621353672e-06
-1.4393755366e-06
1.99707666396e-06
6.80076594609e-06
-6.26877346473e-06
3.54489233279e-05
-4.87360158427e-05
6.10461039936e-05
-9.31274317239e-05
8.7229766729e-05
-0.000131599214554
0.000112587886289
-0.000164622956469
0.000136764961114
-0.000192804769824
0.000159625744804
-0.000216422256378
0.000181115365669
-0.000235816605822
0.000201255234175
-0.000251389711268
0.000220123813791
-0.00026356346325
0.000237836343572
-0.00027275406505
0.000254530595832
-0.000279354456098
0.000270358581197
-0.00028372306293
0.000285481730986
-0.000286178925623
0.000300066910294
-0.000287002173125
0.000314282387673
-0.000286437519905
0.00032829441196
-0.000284698505817
0.000342264826381
-0.000281971539238
0.000356349599981
-0.000278419670746
0.000370698019755
-0.000274186254972
0.000385452435633
-0.000269398671228
0.000400748414821
-0.000264172455327
0.000416715200946
-0.000258616145952
0.000433476307399
-0.000252837051389
0.000451150038767
-0.000246947877888
0.000469849453498
-0.000241074062085
0.000489681087633
-0.000235361417561
0.000510741316375
-0.000229983652018
0.000533109050296
-0.000225148985695
0.00055683282713
-0.000221104941054
0.000581910654929
-0.000218139871058
0.000608263250013
-0.000216581823192
0.000635695872999
-0.000216783427821
0.00066388659327
-0.000219154941979
-0.00022369317927
-2.19802109406e-08
2.10177162454e-06
-6.41615925238e-08
1.98730846493e-06
-1.11430863868e-07
2.0128641903e-06
-1.37200656548e-07
2.11322899099e-06
-1.5887820613e-07
1.97286438941e-06
-1.61457876647e-07
2.01749423116e-06
-1.88102075704e-07
2.12169855056e-06
-2.70406744183e-07
1.99803500491e-06
-2.85238877988e-07
1.85257699304e-06
-3.64117123664e-07
1.9542103978e-06
-4.2126100797e-07
1.66654253345e-06
-4.25549678387e-07
1.74021209789e-06
-4.44481979383e-07
1.89011084523e-06
-5.25659970725e-07
2.01816320475e-06
-5.43947404112e-07
1.80506572703e-06
-5.66824858186e-07
1.89200135642e-06
-5.76866230588e-07
2.01084772869e-06
-6.05894258115e-07
1.84380654112e-06
-6.2859349008e-07
1.88484695436e-06
-7.11646943169e-07
1.9335895503e-06
-7.30196748193e-07
1.82916490247e-06
-7.82551489606e-07
1.91444030717e-06
-7.88647685959e-07
1.81504033691e-06
-8.20333336022e-07
1.80035602536e-06
-8.57843701239e-07
1.78459502073e-06
-9.10788511328e-07
1.73871534984e-06
-1.01075301385e-06
1.6569048114e-06
-1.04539763354e-06
1.660876846e-06
-7.86524276412e-07
1.85303897379e-06
-8.03431312822e-07
2.2468201677e-06
-8.66584813407e-07
2.21560221053e-06
-9.3942766556e-07
2.16869774654e-06
-9.0096831241e-07
2.00313528416e-06
-8.87431693064e-07
2.07998644779e-06
-8.03653234051e-07
2.02678229328e-06
-7.07196352203e-07
2.06947865536e-06
-6.09941683008e-07
2.00839631652e-06
-7.18489780325e-07
1.85718463437e-06
-7.50068430433e-07
1.16356682085e-06
-8.7742466066e-07
1.13567133928e-06
-1.04717352026e-06
1.6056258363e-06
-1.03900570862e-06
1.73083754497e-06
-1.06408769093e-06
1.6592196666e-06
-1.29666133124e-06
1.92088246649e-06
-2.2714982462e-06
2.97804544808e-06
1.88017628352e-05
-2.73247835902e-05
4.82153963055e-05
-7.81502749017e-05
7.5281689789e-05
-0.000120196319216
0.000101092352361
-0.000157412235963
0.000125777641804
-0.00018930998752
0.000149116138757
-0.000216144505277
0.000171009277398
-0.000238316318981
0.000191460133893
-0.00025626822203
0.000210538245662
-0.000270468509068
0.000228357949571
-0.000281383824811
0.000245061248788
-0.000289458014966
0.000260805245225
-0.00029509909918
0.000275754134532
-0.000298672596499
0.000290074430657
-0.00030049985663
0.000303931740729
-0.000300860108175
0.000317488206069
-0.000299994593914
0.00033090046587
-0.000298111359799
0.000344318199572
-0.00029538984965
0.000357883084862
-0.000291985120847
0.000371728037828
-0.00028803176229
0.000385976647933
-0.000283647835679
0.000400742848037
-0.000278939215147
0.000416130821343
-0.000274004698978
0.00043223515762
-0.000268941993408
0.000449141056669
-0.000263854422566
0.000466924221598
-0.000258857911092
0.000485649732711
-0.00025408765622
0.000505369005198
-0.00024970367052
0.000526113512237
-0.000245894227043
0.000547883552045
-0.000242875615872
0.000570630441389
-0.000240887347336
0.00059423363739
-0.000240185642603
0.000618466174776
-0.000241016590612
0.000642991526099
-0.000243680651692
-0.000247932598377
-2.02278141863e-08
2.12128883654e-06
-6.23174299837e-08
2.0292414695e-06
-1.20824333858e-07
2.07138781949e-06
-1.26503239367e-07
2.11887283614e-06
-1.4308834322e-07
1.98939506586e-06
-1.51047754692e-07
2.02543820663e-06
-1.68303300234e-07
2.13904949163e-06
-2.63914161898e-07
2.09353598143e-06
-2.90561182399e-07
1.87933504561e-06
-3.08108409368e-07
1.9718375768e-06
-4.03209164571e-07
1.76159774829e-06
-4.18352829662e-07
1.75528401168e-06
-4.406432855e-07
1.9124422937e-06
-4.64638560986e-07
2.04205481904e-06
-5.08071553045e-07
1.84835314033e-06
-5.38593451947e-07
1.9224893712e-06
-5.37084941723e-07
2.00920973468e-06
-5.83295953804e-07
1.88981822877e-06
-6.13134966979e-07
1.91465501951e-06
-6.79232557074e-07
1.99948985206e-06
-7.04675831338e-07
1.8544876157e-06
-7.10157771849e-07
1.91976343687e-06
-7.4646500898e-07
1.85115270022e-06
-8.02767924809e-07
1.85648181166e-06
-8.36036253295e-07
1.81783014949e-06
-8.98877582007e-07
1.80149721202e-06
-9.88652487609e-07
1.74648149281e-06
-1.05716199699e-06
1.7289125674e-06
-9.62740719297e-07
1.75781507168e-06
-7.70178594503e-07
2.05337838007e-06
-8.09178889547e-07
2.25388779817e-06
-7.54244665034e-07
2.11339539573e-06
-8.14773100112e-07
2.06371506652e-06
-7.79074161253e-07
2.04433119681e-06
-7.34971400789e-07
1.98273906221e-06
-6.13669920489e-07
1.94807701682e-06
-4.82709761128e-07
1.87807054224e-06
-3.98812734315e-07
1.77463559307e-06
-7.64953820426e-07
1.53070325057e-06
-9.34768099082e-07
1.30632324787e-06
-9.45615696508e-07
1.61710106845e-06
-9.19658610005e-07
1.70587424685e-06
-8.26481746626e-07
1.56722143763e-06
-6.05998922671e-07
1.70253836174e-06
6.61258207538e-06
-4.23256562814e-06
3.57279125468e-05
-5.64389509362e-05
6.21088432753e-05
-0.000104533717442
8.85582849915e-05
-0.000146648265867
0.000113829821453
-0.000182685729864
0.000137703863211
-0.00021318547859
0.000160081179421
-0.000238522911596
0.000180931767136
-0.000259167784286
0.000200305540891
-0.000275642762017
0.000218310087347
-0.000288473768737
0.000235088359831
-0.000298162789046
0.000250802291433
-0.000305172626348
0.00026562162356
-0.000309919104838
0.000279716919699
-0.000312768554813
0.000293255473985
-0.000314039062062
0.000306398894109
-0.000314004161245
0.000319301494161
-0.000312897809734
0.000332109143573
-0.000310919602531
0.000344958343034
-0.000308239623789
0.000357975376574
-0.000305002708873
0.000371275401008
-0.000301332329366
0.000384961546041
-0.000297334514454
0.000399124170242
-0.00029310237784
0.000413840514222
-0.000288721592319
0.000429174836467
-0.000284276891921
0.000445178962061
-0.000279859156957
0.000461892844185
-0.000275572442938
0.000479344531975
-0.000271540027253
0.000497548583293
-0.00026790843981
0.000516501641125
-0.000264847965306
0.000536172463308
-0.000262547055727
0.000556485110198
-0.000261200557244
0.000577296239481
-0.000260997367082
0.00059835789761
-0.000262078823916
0.000619312887897
-0.000264636034853
-0.000268157556158
-2.06791456943e-08
2.14266732128e-06
-8.49465363119e-08
2.0936827343e-06
-1.21199732515e-07
2.10762385017e-06
-9.84493248683e-08
2.09608066123e-06
-1.21332623835e-07
2.01223753454e-06
-1.45003297231e-07
2.0490735979e-06
-1.55793696275e-07
2.1496899913e-06
-2.24258533568e-07
2.16204971714e-06
-2.76709484971e-07
1.93179125542e-06
-2.76534172693e-07
1.97160584058e-06
-3.85638664286e-07
1.87076502277e-06
-4.03675012555e-07
1.77330154647e-06
-4.16932342278e-07
1.92552354783e-06
-4.13465290472e-07
2.03846951533e-06
-4.73051684358e-07
1.90790678682e-06
-4.94133081234e-07
1.94339644622e-06
-5.0111644042e-07
2.01599263228e-06
-5.65857855049e-07
1.95448830218e-06
-5.91982626744e-07
1.94055479091e-06
-6.07065353239e-07
2.01442526914e-06
-6.53089249412e-07
1.90037608898e-06
-6.62697421223e-07
1.92914605725e-06
-7.21455778951e-07
1.90971581714e-06
-7.58581968514e-07
1.89343849353e-06
-7.82316642251e-07
1.84144964861e-06
-8.51464768914e-07
1.87061696877e-06
-9.17312211992e-07
1.81227701174e-06
-9.82129210727e-07
1.79349134983e-06
-1.01207213589e-06
1.7872409227e-06
-8.09533514207e-07
1.84978859802e-06
-6.50160774876e-07
2.09323308264e-06
-6.64283147934e-07
2.1265654693e-06
-6.9023316712e-07
2.0891412244e-06
-6.29028022841e-07
1.98298167812e-06
-6.01214896942e-07
1.95478182579e-06
-5.63632004587e-07
1.91055692765e-06
-4.97767133706e-07
1.81276096022e-06
-4.43146029126e-07
1.72086814239e-06
-7.64364918377e-07
1.85391840689e-06
-1.02467336904e-06
1.56798074371e-06
-9.380471232e-07
1.53095112918e-06
-9.2157678642e-07
1.69060462307e-06
-1.07129151546e-06
1.71940674968e-06
-2.14033318126e-06
2.7771674554e-06
1.95325995472e-05
-2.58964132835e-05
4.81953499361e-05
-8.51030049036e-05
7.52321916837e-05
-0.000131573398484
0.00010095689398
-0.000172375306536
0.000125403807037
-0.000207134369316
0.00014834012568
-0.000236123084435
0.000169676522746
-0.000259860329773
0.000189435596427
-0.000278927730468
0.000207711597153
-0.000293919557081
0.000224644178242
-0.000305407106012
0.000240398254551
-0.000313917599077
0.000255149428639
-0.000319924521357
0.000269074455631
-0.00032384483755
0.000282345527881
-0.000326040319472
0.000295127127328
-0.00032682133407
0.000307574345867
-0.000326452033615
0.000319831962145
-0.000325156054866
0.000332033784827
-0.000323122031751
0.00034430198154
-0.000320508400919
0.00035674614509
-0.00031744743286
0.000369462085581
-0.000314048810618
0.000382530514216
-0.000310403475546
0.000396016043605
-0.000306588435999
0.000409966875642
-0.000302672965449
0.000424415456613
-0.000298726034571
0.000439379961407
-0.00029482425598
0.000454866246118
-0.00029105935885
0.000470869572224
-0.000287544025014
0.000487375184711
-0.000284414733805
0.000504355888303
-0.000281829351299
0.000521762334724
-0.000279954085539
0.000539504997967
-0.000278943756685
0.000557428662606
-0.00027892159617
0.000575268888943
-0.00027991961904
0.000592637940838
-0.000282005469096
-0.000284351494898
-2.83408935483e-08
2.17028532351e-06
-1.03939462118e-07
2.16906228867e-06
-9.40946155493e-08
2.09767037777e-06
-7.14036385241e-08
2.0732912348e-06
-1.06038330282e-07
2.04676812799e-06
-1.38759300567e-07
2.08165349053e-06
-1.4618602405e-07
2.15710408691e-06
-1.80917658274e-07
2.1966975877e-06
-2.50934316153e-07
2.00172740192e-06
-2.47335094115e-07
1.96809405613e-06
-3.57415840017e-07
1.98079259784e-06
-3.87215080085e-07
1.80296976782e-06
-3.80616254379e-07
1.9188247377e-06
-3.77291721147e-07
2.03504938173e-06
-4.53029831453e-07
1.98343354031e-06
-4.54740207773e-07
1.94492843059e-06
-4.62845772778e-07
2.02397706059e-06
-5.44535955787e-07
2.03590591729e-06
-5.54871911015e-07
1.95071382625e-06
-5.55879679983e-07
2.01526163456e-06
-6.11818361459e-07
1.9560393166e-06
-6.16688975886e-07
1.93382490563e-06
-6.89186128348e-07
1.98194814447e-06
-7.04004151419e-07
1.90803203208e-06
-7.56800925036e-07
1.89411583056e-06
-7.96320934154e-07
1.9100725618e-06
-8.39611719626e-07
1.85554095603e-06
-8.94874503125e-07
1.84861047741e-06
-9.41588097694e-07
1.83342333925e-06
-9.13922682028e-07
1.82144141357e-06
-7.20228229663e-07
1.89850441945e-06
-6.93544500452e-07
2.09906547029e-06
-5.66344031728e-07
1.96148724418e-06
-6.08240132314e-07
2.02470740012e-06
-6.52522710262e-07
1.9991724696e-06
-6.92500293304e-07
1.95080828639e-06
-7.00968427473e-07
1.82159619418e-06
-7.87818981978e-07
1.80934475224e-06
-9.0950192973e-07
1.97760332501e-06
-1.04016858362e-06
1.69974604854e-06
-7.95220592748e-07
1.28716442881e-06
-6.16233386778e-07
1.51175673037e-06
-2.9073191785e-07
1.39754636511e-06
3.51125433464e-06
-1.01948059482e-06
3.52068020116e-05
-5.75917654733e-05
6.10032586694e-05
-0.000110903258645
8.71950622509e-05
-0.000157768469018
0.000112250076954
-0.000197432615741
0.000135793143555
-0.000230679042838
0.000157695518263
-0.000258026671932
0.000177932222872
-0.0002800980359
0.000196572099849
-0.000297568499618
0.000213746399886
-0.000311094693752
0.000229620881021
-0.00032128239109
0.000244376592954
-0.000328674095281
0.000258197404745
-0.000333746097788
0.000271262380697
-0.000336910561738
0.000283741498478
-0.00033852016389
0.00029579344177
-0.000338873984131
0.000307564583692
-0.00033822385658
0.000319188499057
-0.00033678062782
0.000330785568224
-0.00033471973023
0.000342462262405
-0.000332185700513
0.000354309914002
-0.000329295663955
0.000366403009898
-0.000326142468746
0.000378797476015
-0.0003227984886
0.000391529586297
-0.00031932109249
0.000404616141322
-0.000315760072315
0.000418056179015
-0.00031216664434
0.000431834019081
-0.000308602699385
0.00044592312704
-0.000305149101972
0.000460290019358
-0.000301911577637
0.000474897155542
-0.000299022560786
0.000489702140925
-0.000296634970243
0.000504645016646
-0.000294897524479
0.000519627228094
-0.000293926451976
0.000534483273042
-0.000293778181798
0.000548935652941
-0.000294372616228
0.000562564517981
-0.000295634804454
-0.000296362377519
-2.71823476928e-08
2.19807893418e-06
-5.88830335931e-08
2.20084002038e-06
-7.98492206032e-08
2.11858923581e-06
-7.6300880545e-08
2.06964542124e-06
-1.03495842492e-07
2.07384237094e-06
-1.30960199024e-07
2.10903579153e-06
-1.31659016484e-07
2.15764243182e-06
-1.54717969121e-07
2.21964787175e-06
-2.24224558206e-07
2.07125749026e-06
-2.34008832688e-07
1.97778957683e-06
-3.10612341661e-07
2.05733275973e-06
-3.74555158013e-07
1.86685836289e-06
-3.5580873762e-07
1.89990984787e-06
-3.50908881679e-07
2.02988072741e-06
-4.3786831949e-07
2.07021915828e-06
-4.38722306857e-07
1.94560002363e-06
-4.41895108485e-07
2.02682411296e-06
-5.049782787e-07
2.09876011726e-06
-5.17314108443e-07
1.96282518967e-06
-5.17151984167e-07
2.01477755471e-06
-5.89866046588e-07
2.02854627199e-06
-5.94715409801e-07
1.93835053076e-06
-6.32534500226e-07
2.01946526594e-06
-6.55174448939e-07
1.93042098298e-06
-7.03875361047e-07
1.94258179926e-06
-7.09489925175e-07
1.91555103968e-06
-7.5441667045e-07
1.90038191588e-06
-8.0109474089e-07
1.89511189845e-06
-8.42855151979e-07
1.87493243973e-06
-8.81916126054e-07
1.85995188025e-06
-8.71375972492e-07
1.88751355102e-06
-7.09556768876e-07
1.93659843881e-06
-7.39439642607e-07
1.99058312817e-06
-8.08867045254e-07
2.09327609967e-06
-8.46606128106e-07
2.03610763113e-06
-8.2973806467e-07
1.93324033778e-06
-7.91493089382e-07
1.78316945711e-06
-7.65360962073e-07
1.78314489029e-06
-5.92684616739e-07
1.80515955969e-06
-4.17831230972e-07
1.52529800797e-06
-5.20275096102e-07
1.38824910435e-06
-7.25139523667e-07
1.72006104923e-06
-1.65213357138e-06
2.32328976763e-06
1.74290594357e-05
-2.00984340937e-05
4.55686208597e-05
-8.57357271797e-05
7.25716852103e-05
-0.000137910835773
9.8180516578e-05
-0.000183380574417
0.000122408553714
-0.000221662868294
0.000144974828648
-0.000253246883913
0.000165788482578
-0.000278841541888
0.00018489113801
-0.000299201728863
0.00020240165516
-0.000315079964676
0.00021848420494
-0.000327178140719
0.000233324822303
-0.000336123875122
0.000247115231915
-0.000342465344586
0.000260042858473
-0.000346674542177
0.00027228519219
-0.000349153687799
0.000284006858099
-0.000350242599487
0.000295358273767
-0.000350226142121
0.000306475126124
-0.000349341426654
0.000317478175284
-0.000347784365558
0.000328472876947
-0.000345715094968
0.000339548412071
-0.000343261870153
0.00035077588861
-0.000340523752854
0.000362206022718
-0.000337573193166
0.000373867050599
-0.000334460096331
0.000385763916485
-0.000331218532374
0.000397879461988
-0.000327876200237
0.000410177867758
-0.000324465654747
0.000422609761925
-0.000321035217991
0.000435118286323
-0.000317658288505
0.000447645121976
-0.000314439098118
0.000460135261479
-0.000311513373354
0.000472535290683
-0.000309035649398
0.000484770455751
-0.000307133209607
0.000496717157287
-0.00030587359642
0.000508179257423
-0.000305240845104
0.000518868781226
-0.000305062801772
0.000528377901768
-0.000305144481025
-0.000303939804122
-1.9791875184e-08
2.21713938413e-06
-2.35058469592e-08
2.2043349401e-06
-7.93886933958e-08
2.17432648025e-06
-8.63904618084e-08
2.07653211975e-06
-9.60331358485e-08
2.0833731309e-06
-1.12117218005e-07
2.12494415972e-06
-1.11609791799e-07
2.15701349339e-06
-1.27944671592e-07
2.23591820721e-06
-2.02912111203e-07
2.14607759932e-06
-2.31877117228e-07
2.00669029114e-06
-2.52832525998e-07
2.07824661421e-06
-3.58425407367e-07
1.97227884622e-06
-3.51238920312e-07
1.8924956031e-06
-3.43456955152e-07
2.02191141242e-06
-3.90328715855e-07
2.11682832802e-06
-4.22231888812e-07
1.97717579499e-06
-4.20971727142e-07
2.02530687432e-06
-4.35223659984e-07
2.11271229439e-06
-4.85599222185e-07
2.01285693818e-06
-4.91938343282e-07
2.02087084606e-06
-5.42030700521e-07
2.07827053444e-06
-5.59001955545e-07
1.95496974957e-06
-5.54211649083e-07
2.01434454946e-06
-6.07789805757e-07
1.9836409931e-06
-6.33647475116e-07
1.9681525996e-06
-6.60314975561e-07
1.94193275035e-06
-6.91576375047e-07
1.9314237475e-06
-7.18592004569e-07
1.92193812588e-06
-7.55608125005e-07
1.91163120054e-06
-7.83793011489e-07
1.88777805606e-06
-8.17474542943e-07
1.92061358461e-06
-7.7972540784e-07
1.89805335128e-06
-7.38111213122e-07
1.94785739354e-06
-6.09460965997e-07
1.96334532836e-06
-5.17698924663e-07
1.94301363293e-06
-4.39308797178e-07
1.85364488767e-06
-4.25385939155e-07
1.76804153166e-06
-3.42799267856e-07
1.69946706136e-06
-1.28760569266e-07
1.59034114952e-06
-8.54779732021e-08
1.48087621223e-06
-1.91060504415e-07
1.49476792916e-06
-2.21837573418e-07
1.74922354764e-06
-5.87562867269e-07
2.69226654486e-06
2.98883542387e-05
-5.05819925932e-05
5.65974624242e-05
-0.000112449447072
8.31132174953e-05
-0.000164430573668
0.000108147830087
-0.000208418119302
0.000131473601675
-0.000244990713958
0.000152977836729
-0.000274752662032
0.000172655005819
-0.000298519962792
0.000190605251418
-0.000317153075662
0.000206990703469
-0.000331466434611
0.000222002853575
-0.00034219126001
0.000235842320833
-0.000349964273038
0.000248706424084
-0.000355330348415
0.000260782035055
-0.000358751022087
0.000272241815252
-0.000360614309542
0.000283242456262
-0.000361244051599
0.000293923983592
-0.000360908453884
0.000304409606067
-0.000359827803822
0.000314805638154
-0.000358181126426
0.000325200982892
-0.000356111140085
0.00033566562564
-0.000353727189968
0.000346248051112
-0.000351106831586
0.000356972184405
-0.000348297964457
0.000367835165933
-0.000345323703922
0.000378807315782
-0.000342191309065
0.000389835100002
-0.000338904623795
0.000400846987618
-0.000335478192178
0.000411760930747
-0.000331949854963
0.000422492644904
-0.000328390701343
0.000432962868389
-0.000324910040651
0.000443102547328
-0.000321653760893
0.000452844566138
-0.000318778292371
0.000462074668364
-0.00031636376964
0.000470593353326
-0.000314392723324
0.000478110128437
-0.000312758225032
0.000484285664684
-0.000311239336443
0.000488807221375
-0.000309667312308
-0.00030674125313
-2.20125013158e-08
2.23969656371e-06
-4.33130037543e-08
2.22566554332e-06
-5.74599291926e-08
2.18839723363e-06
-6.51597326221e-08
2.08411460333e-06
-7.13153882217e-08
2.08937084611e-06
-8.45524669105e-08
2.13803279724e-06
-9.32090124713e-08
2.16550545167e-06
-1.02783607097e-07
2.24528927537e-06
-1.74742161622e-07
2.21793003896e-06
-2.22161207029e-07
2.05402641785e-06
-2.10680294977e-07
2.06660134304e-06
-3.23435839152e-07
2.08488261803e-06
-3.5243755386e-07
1.92133646797e-06
-3.27021306815e-07
1.99620419349e-06
-3.20279605718e-07
2.10975067485e-06
-3.9483351583e-07
2.0514608167e-06
-3.85608277524e-07
2.01574583493e-06
-3.74922902809e-07
2.10164956408e-06
-4.5192775168e-07
2.08956780136e-06
-4.57831157254e-07
2.02641340698e-06
-4.63515589477e-07
2.08356147085e-06
-5.10940089198e-07
2.00203772252e-06
-4.98643183338e-07
2.00160580266e-06
-5.54134509747e-07
2.03874487463e-06
-5.61967961544e-07
1.97557232904e-06
-6.12738069808e-07
1.99232066486e-06
-6.21447723153e-07
1.93977318428e-06
-6.42070548489e-07
1.94221431513e-06
-6.76545887911e-07
1.94574085379e-06
-6.98761576586e-07
1.90955158592e-06
-6.98272683046e-07
1.9195259473e-06
-6.92129893165e-07
1.89104186404e-06
-6.48032270209e-07
1.90271139969e-06
-5.49176905667e-07
1.86331348572e-06
-4.55510321326e-07
1.84819877498e-06
-3.89208826463e-07
1.78621518204e-06
-3.29547080769e-07
1.70717583206e-06
-2.10702854257e-07
1.57956350199e-06
-5.6789739389e-08
1.4351406146e-06
-3.18484996968e-08
1.45494663607e-06
8.26636948654e-08
1.380489282e-06
7.42394579007e-07
1.09076128184e-06
8.15653465539e-06
-4.7240658506e-06
3.96640498746e-05
-8.20911904731e-05
6.69703858322e-05
-0.000139759704518
9.2923213716e-05
-0.000190386952831
0.000117157983369
-0.000232655590716
0.000139468661645
-0.000267303408877
0.00015983555402
-0.000295121137004
0.000178338234428
-0.000317023979924
0.000195130157672
-0.000333946194313
0.000210407188945
-0.00034674457839
0.000224380311647
-0.000356165434421
0.000237258722621
-0.000362843690386
0.000249240723695
-0.000367313312267
0.000260509110009
-0.000370020334575
0.000271229004835
-0.000371335092692
0.000281546955515
-0.000371562858473
0.000291590704625
-0.000370953025653
0.000301469254679
-0.000369707148207
0.000311272816258
-0.000367985452742
0.000321071927911
-0.000365910992235
0.000330915153455
-0.000363571131463
0.00034082543335
-0.000361017810204
0.000350796316378
-0.000358269531284
0.00036078999164
-0.000355318059332
0.000370738866254
-0.000352140868472
0.00038055124475
-0.00034871769439
0.000390120287878
-0.000345047966314
0.000399334049746
-0.000341164344636
0.000408085151983
-0.000337142577223
0.000416277378151
-0.000333103018444
0.000423827374489
-0.000329204479904
0.000430636156276
-0.00032558768748
0.000436483150254
-0.000322211243969
0.000440985888465
-0.000318895988862
0.000443652692115
-0.00031542600458
0.000444016903151
-0.000311605240484
0.000441833724783
-0.000307485198831
-0.000303449877748
-2.0403672792e-08
2.25935069668e-06
-5.13544984802e-08
2.25632113891e-06
-4.00439014315e-08
2.17689807224e-06
-3.6647282268e-08
2.08055110678e-06
-5.3415424724e-08
2.10597765111e-06
-6.75201335679e-08
2.15193431626e-06
-8.18370208746e-08
2.17960219612e-06
-8.60864474968e-08
2.24938478294e-06
-1.3668639406e-07
2.2683710018e-06
-2.03942260882e-07
2.12110525676e-06
-2.03772415525e-07
2.06629824146e-06
-2.56198714602e-07
2.13715899298e-06
-3.42812208772e-07
2.00768534774e-06
-3.08735166677e-07
1.9618398359e-06
-2.86755617241e-07
2.08747541359e-06
-3.59277217657e-07
2.1236053898e-06
-3.62476460366e-07
2.01856942989e-06
-3.47689104705e-07
2.08651389209e-06
-4.00210382362e-07
2.14169724015e-06
-4.18175081004e-07
2.0439754602e-06
-4.08462267463e-07
2.07346858385e-06
-4.68747692309e-07
2.06184579418e-06
-4.68629751898e-07
2.00103573999e-06
-4.96196684433e-07
2.06583482289e-06
-5.25231891968e-07
2.00412996132e-06
-5.46845900236e-07
2.01342237946e-06
-5.60649733013e-07
1.95306902407e-06
-5.89004694669e-07
1.97005001056e-06
-6.04891287185e-07
1.96110635275e-06
-6.26197737667e-07
1.93027447177e-06
-6.19618761074e-07
1.91224877507e-06
-6.20866748698e-07
1.89145722234e-06
-5.94973233951e-07
1.87583088968e-06
-5.55926741936e-07
1.82325421478e-06
-4.88299008361e-07
1.77956406784e-06
-4.18825523706e-07
1.7156992979e-06
-3.35079567788e-07
1.62251913845e-06
-2.48851699396e-07
1.49199831309e-06
-1.90883254543e-07
1.37578372883e-06
-2.13052489297e-07
1.47776034835e-06
-5.70979487263e-07
1.73852475821e-06
-2.07839716027e-06
2.59937592368e-06
2.30307266481e-05
-2.98296603452e-05
5.03529172505e-05
-0.000109415459969
7.71056254179e-05
-0.000166516243282
0.000102061990019
-0.000215346701231
0.000125223522023
-0.000255819753138
0.000146393105874
-0.000288475039004
0.000165566492622
-0.00031429620008
0.000182876619992
-0.000334335556993
0.0001985199368
-0.000349590823914
0.000212717536572
-0.000360943393675
0.000225692406945
-0.000369141449942
0.00023765672696
-0.000374809092209
0.000248805774154
-0.00037846338942
0.000259315348204
-0.000380530887831
0.00026934073517
-0.000381361416684
0.00027901639337
-0.000381239412079
0.000288455998188
-0.000380393491709
0.000297752664126
-0.000379004641781
0.000306978781339
-0.000377212370829
0.000316184551678
-0.000375117537593
0.000325394507535
-0.000372781844132
0.000334602577731
-0.000370226621295
0.000343767753102
-0.000367435442232
0.000352813140015
-0.000364364182106
0.000361630285267
-0.000360958759204
0.000370088766546
-0.000357176947811
0.0003780491271
-0.000353009105281
0.000385375251916
-0.000348491296897
0.000391944910132
-0.000343713041417
0.0003976516111
-0.000338810531847
0.000402395757395
-0.00033394938442
0.000406002259669
-0.00032919482254
0.00040798516197
-0.000324194762348
0.000407501337074
-0.000318412936163
0.000403547690244
-0.000311473725008
0.000395546290783
-0.000303605686289
0.000384276009114
-0.000296217159231
-0.000290999261705
-7.12730348306e-09
2.26687777171e-06
-2.08384208909e-08
2.27000481433e-06
-1.77745464161e-08
2.17368797973e-06
-3.98130522535e-08
2.10244616423e-06
-5.67825790553e-08
2.12277068716e-06
-6.42729341998e-08
2.15922090209e-06
-7.36969746875e-08
2.18882121189e-06
-6.71843894751e-08
2.24263412495e-06
-9.36549539885e-08
2.29462860018e-06
-1.71767980797e-07
2.19905833369e-06
-2.03792130368e-07
2.09816848592e-06
-1.84894302456e-07
2.11802881591e-06
-2.96632917529e-07
2.11918896946e-06
-3.07961959765e-07
1.9728960995e-06
-2.68925305681e-07
2.04805598842e-06
-2.90079553011e-07
2.14436039823e-06
-3.42812292339e-07
2.07093022958e-06
-3.23135884892e-07
2.06643443129e-06
-3.21580011446e-07
2.13968539349e-06
-3.80147634786e-07
2.10213760235e-06
-3.70641740232e-07
2.06348521681e-06
-4.11502836619e-07
2.10221080561e-06
-4.35419026635e-07
2.02446807353e-06
-4.17016521369e-07
2.04688499951e-06
-4.76834295981e-07
2.06337795901e-06
-4.81772648734e-07
2.01777044236e-06
-5.21240624472e-07
1.99188311838e-06
-5.35940809099e-07
1.98407990559e-06
-5.50006869404e-07
1.97443191216e-06
-5.85116053321e-07
1.96460678301e-06
-5.91781957999e-07
1.91806051241e-06
-5.96428229409e-07
1.89514708164e-06
-5.80714664913e-07
1.85909745848e-06
-5.53212721602e-07
1.79470162353e-06
-5.15958728542e-07
1.74122709705e-06
-4.54565027209e-07
1.65332838341e-06
-3.8541433073e-07
1.55220059929e-06
-3.14226249305e-07
1.41952896009e-06
-2.38836919612e-07
1.29992360009e-06
-9.19662351229e-08
1.33040838899e-06
-6.7168561078e-08
1.71619122613e-06
-4.43569720636e-07
2.97936719747e-06
3.51959030621e-05
-6.54638897417e-05
6.04831756859e-05
-0.00013470673756
8.60675145826e-05
-0.000192104942534
0.000110144157393
-0.000239426861006
0.000132223187742
-0.000277901500669
0.000152209068155
-0.000308463084631
0.000170173698086
-0.00033226264002
0.000186301589683
-0.000350465037921
0.000200825321672
-0.000364115991355
0.00021398554675
-0.000374104945341
0.000226012084865
-0.000381169221601
0.000237115872749
-0.000385914039111
0.000247486030743
-0.000388834636285
0.00025728896008
-0.000390334848479
0.000266668121408
-0.000390741554433
0.000275744069293
-0.000390316292047
0.000284614713914
-0.000389265026402
0.00029335563129
-0.000387746416411
0.00030201967696
-0.000385877243207
0.000310634566921
-0.000383733232629
0.000319197790441
-0.000381345854051
0.000327670161827
-0.00037869977107
0.000335971367942
-0.000375737423414
0.000343981139491
-0.000372374738173
0.000351547843765
-0.000368526264549
0.000358503444052
-0.000364133367815
0.00036468126682
-0.000359187783048
0.000369931367964
-0.000353742248944
0.000374131965997
-0.000347914513721
0.00037718408518
-0.00034186348608
0.000378986181568
-0.000335752258723
0.000379240937894
-0.000329450375788
0.000376961216221
-0.000321915840669
0.000370335406706
-0.000311788323943
0.000356824007089
-0.000297964346466
0.000333776209719
-0.000280560467443
0.000302862636316
-0.000265304184739
-0.00028373107629
3.22425605085e-09
2.26291420448e-06
8.79365599028e-09
2.26408982616e-06
1.60695082114e-08
2.16622324888e-06
-5.6876447754e-08
2.17521769561e-06
-6.5832165209e-08
2.13154381058e-06
-6.22554566246e-08
2.15543552976e-06
-6.27240289164e-08
2.18902579358e-06
-4.72445714763e-08
2.22690612166e-06
-5.65695626405e-08
2.30373490034e-06
-1.2979149457e-07
2.27207251115e-06
-1.86830967347e-07
2.15499802003e-06
-1.77425803016e-07
2.10841865082e-06
-2.17255717264e-07
2.15875970206e-06
-2.96374385534e-07
2.05168517014e-06
-2.62994388558e-07
2.01431212146e-06
-2.34527545307e-07
2.11549136714e-06
-3.02456866362e-07
2.13843739408e-06
-3.01488236304e-07
2.06499697158e-06
-2.73526604128e-07
2.11127713417e-06
-3.31561940053e-07
2.1596699673e-06
-3.39886047321e-07
2.07130123877e-06
-3.33332312946e-07
2.09514164734e-06
-3.88755369698e-07
2.07930756341e-06
-3.89913080944e-07
2.04744701982e-06
-4.22470199376e-07
2.09530030363e-06
-4.48910338384e-07
2.04349780152e-06
-4.73500755946e-07
2.01572367921e-06
-4.94878321787e-07
2.00462585057e-06
-5.22123278751e-07
2.00078496654e-06
-5.4775459827e-07
1.98925182061e-06
-5.66001838826e-07
1.9352671918e-06
-5.80872391233e-07
1.90890521697e-06
-5.78620323492e-07
1.85569639958e-06
-5.71699529369e-07
1.78658583945e-06
-5.47943269785e-07
1.71630268526e-06
-5.0977505751e-07
1.61396529389e-06
-4.48995688174e-07
1.49021045951e-06
-3.62682137414e-07
1.33200861834e-06
-2.33362605751e-07
1.1690705935e-06
1.17033580948e-07
9.80095842336e-07
1.17205299321e-06
6.62544185876e-07
7.95478789101e-06
-3.80130614853e-06
4.08677689034e-05
-9.83845177387e-05
6.85585110814e-05
-0.000162404038446
9.39401237023e-05
-0.000217491579264
0.000117167177262
-0.000262657668662
0.000138140182652
-0.000298877391084
0.00015692014126
-0.000327245366547
0.00017367737125
-0.000349021842163
0.000188649359861
-0.000365438759372
0.000202096863641
-0.000377565062395
0.000214273040432
-0.000386282553901
0.000225409598549
-0.000392307105008
0.000235712802919
-0.000396218471312
0.000245363083309
-0.000398486064987
0.00025451541115
-0.000399488250216
0.00026329958651
-0.000399526743746
0.000271820556986
-0.000398838220725
0.000280158853062
-0.000397604237155
0.000288370991918
-0.000395959430238
0.000296488625383
-0.000393995722862
0.00030451469202
-0.000391760120804
0.000312416138062
-0.000389248108474
0.000320115884054
-0.000386400317519
0.000327488989778
-0.000383111335596
0.0003343674925
-0.00037925405804
0.00034055497548
-0.000374714589538
0.000345848343967
-0.000369427598857
0.000350061315003
-0.000363401639783
0.000353043827414
-0.000356725658574
0.000354697074598
-0.000349568643568
0.000354961339967
-0.000342128612909
0.000353781567449
-0.000334573401622
0.000350731161354
-0.000326400916714
0.000344122895465
-0.000315308858607
0.000330911455306
-0.00029857873044
0.000306548251213
-0.000273603002248
0.000263903537784
-0.000237917210296
0.00019082082579
-0.000192224455008
-9.29103276002e-05
-4.79935831825e-10
2.26371264545e-06
-2.93924183226e-09
2.26649839298e-06
1.13162290798e-08
2.15181390531e-06
-2.92145951065e-08
2.21555406906e-06
-5.30727742804e-08
2.1552167775e-06
-5.18479899775e-08
2.15397270611e-06
-4.718730663e-08
2.1841015157e-06
-3.44315463125e-08
2.21387064331e-06
-2.74315010515e-08
2.29644747521e-06
-7.20209506567e-08
2.31641632282e-06
-1.47037296093e-07
2.22980313307e-06
-1.78681958077e-07
2.13984537513e-06
-1.53239315006e-07
2.13304474322e-06
-2.28159742232e-07
2.12627959492e-06
-2.6089675422e-07
2.04669378153e-06
-2.09900152827e-07
2.06408635236e-06
-2.16562131934e-07
2.14460927084e-06
-2.7883466807e-07
2.12681399431e-06
-2.44178262456e-07
2.07610875974e-06
-2.46708986464e-07
2.16164298357e-06
-3.07344480989e-07
2.13140835952e-06
-2.94915169154e-07
2.08211728439e-06
-3.37439323552e-07
2.12120593798e-06
-3.63294752714e-07
2.07265769363e-06
-3.57523205341e-07
2.08879193683e-06
-3.99842215839e-07
2.08504019721e-06
-4.27870848812e-07
2.04290270542e-06
-4.61934149586e-07
2.03774834806e-06
-4.83150118897e-07
2.02096113054e-06
-5.15525049014e-07
2.02051473332e-06
-5.58242317986e-07
1.97677660815e-06
-5.79641144367e-07
1.92905434049e-06
-5.90372214111e-07
1.86513691449e-06
-6.03090505897e-07
1.7980025021e-06
-5.96697599127e-07
1.70855771126e-06
-5.71363073531e-07
1.58724581031e-06
-5.19729342133e-07
1.43710332134e-06
-4.69985809541e-07
1.28021725519e-06
-4.44047392007e-07
1.14115324028e-06
-6.00213450319e-07
1.13684913087e-06
-1.79837015166e-06
1.85877825356e-06
2.31333815655e-05
-2.87386148707e-05
5.04156759598e-05
-0.00012567614765
7.69046381856e-05
-0.000188900078503
0.000101187058238
-0.00024177922502
0.000123249518096
-0.000284724028594
0.000142997714098
-0.000318628610783
0.000160538455404
-0.000344788581501
0.000176099979177
-0.000364585472921
0.000189955959572
-0.000379296599931
0.000202383383137
-0.000389994153358
0.000213639482317
-0.000397540172763
0.000223952786118
-0.000402621797368
0.000233521842286
-0.000405788809662
0.000242516291315
-0.000407481698201
0.000251077873407
-0.000408050937288
0.000259321061589
-0.000407770964036
0.000267333629481
-0.000406851763406
0.000275177337792
-0.000405448868195
0.000282888351884
-0.000403671328325
0.000290475607628
-0.000401583828773
0.000297914801311
-0.000399200143496
0.000305138301587
-0.000396472422231
0.000312025608045
-0.000393288435899
0.000318401354537
-0.000389487898233
0.000324045641898
-0.000384899182198
0.000328716353005
-0.000379386150597
0.000332178729097
-0.000372890862024
0.00033423479002
-0.000365458584939
0.000334748026166
-0.000357239799322
0.0003336641136
-0.000348485617571
0.000330993970877
-0.00033945940687
0.000326791286769
-0.000330371742887
0.000320443168865
-0.00032005415719
0.000309179658675
-0.00030404711351
0.000288543037231
-0.000277943703994
0.000252995980871
-0.000238057926447
0.000194759649864
-0.000179683171143
8.4950273675e-05
-8.24149684425e-05
-7.96045489356e-06
-5.50111932418e-09
2.26847372532e-06
-1.77217288714e-08
2.27838224645e-06
-3.189202149e-08
2.16572601816e-06
7.80001521238e-09
2.17565849208e-06
-3.42633963912e-08
2.19703518528e-06
-3.92531493852e-08
2.15870364663e-06
-3.28265781389e-08
2.17738342887e-06
-2.47567183803e-08
2.20547786675e-06
2.05175666742e-09
2.26933842157e-06
-1.06456387372e-08
2.32883700003e-06
-8.13684440396e-08
2.30027829216e-06
-1.40799783413e-07
2.19903527229e-06
-1.39575451889e-07
2.13153846312e-06
-1.45035791717e-07
2.13142321806e-06
-2.278161725e-07
2.12910435318e-06
-2.12524408572e-07
2.04835955673e-06
-1.67753098587e-07
2.09938049932e-06
-2.23036391705e-07
2.18156676183e-06
-2.28417543506e-07
2.08094629003e-06
-2.00742645129e-07
2.13341648224e-06
-2.56334567558e-07
2.18638677905e-06
-2.71602569482e-07
2.09677271862e-06
-2.76616413696e-07
2.12555617678e-06
-3.10805874312e-07
2.10612284915e-06
-3.25777134098e-07
2.10299465544e-06
-3.49464832127e-07
2.10787415418e-06
-3.93708786969e-07
2.08619829653e-06
-4.16191773435e-07
2.05919487419e-06
-4.53461251039e-07
2.05709841589e-06
-5.08545210441e-07
2.07430753419e-06
-5.43349441054e-07
2.01024680522e-06
-5.7001164042e-07
1.95432208173e-06
-6.01861230026e-07
1.89554841715e-06
-6.4299567101e-07
1.83765468993e-06
-6.60291630139e-07
1.72430261779e-06
-6.58276344133e-07
1.58368023731e-06
-6.42742476176e-07
1.41973746646e-06
-6.07137140443e-07
1.24262758542e-06
-5.38782937286e-07
1.07164744274e-06
-6.95285718807e-07
1.29102961585e-06
-2.88966073782e-06
4.05019101547e-06
3.47239482146e-05
-6.63650377623e-05
5.94998110177e-05
-0.000150460531358
8.43355740452e-05
-0.000213742567573
0.000107397582451
-0.000264846370112
0.000128222688585
-0.000305553068384
0.00014672157991
-0.000337130633658
0.000163041271249
-0.000361110861864
0.00017745202084
-0.000378998449996
0.000190253713629
-0.000392100248165
0.000201732247534
-0.000401474439924
0.00021214329722
-0.000407952801171
0.000221708456078
-0.000412188395329
0.000230616203839
-0.000414697869954
0.000239023625283
-0.000415890329528
0.000247057671509
-0.00041608609959
0.00025481601778
-0.000415530351797
0.000262368007798
-0.000414404727101
0.000269755598832
-0.000412837381069
0.000276993716229
-0.000410910321348
0.000284067269239
-0.000408658225141
0.00029092207586
-0.000406055767332
0.000297451267944
-0.000403002418778
0.000303484718393
-0.000399322686464
0.00030879052923
-0.000394794518349
0.000313092949736
-0.000389202423725
0.000316103764293
-0.000382397818781
0.000317560005395
-0.000374347958886
0.000317258525388
-0.000365158002678
0.000315087527238
-0.000355069680646
0.000311049640957
-0.000344448652184
0.00030524074913
-0.000333651560342
0.000297868112989
-0.000323000450219
0.000287859066545
-0.000310046879337
0.000270358927097
-0.000286548505663
0.00023829234204
-0.000245878974811
0.000178981999618
-0.000178749007084
7.57076138131e-05
-7.64090067771e-05
2.86985417579e-06
-9.57792819057e-06
-5.0903206914e-06
-1.41433558621e-09
2.27015962259e-06
-5.38440122416e-09
2.28220438599e-06
-5.78998674308e-08
2.21805853962e-06
-8.5156837918e-09
2.12601683584e-06
-2.41482970504e-08
2.21239936915e-06
-2.70253354085e-08
2.16130247393e-06
-1.8014194091e-08
2.16804895952e-06
-9.47901167192e-09
2.19661215379e-06
2.3257016166e-08
2.23625753555e-06
3.42449124064e-08
2.3175194805e-06
1.82420430564e-09
2.33240413646e-06
-7.62247849572e-08
2.2768006742e-06
-1.17496216879e-07
2.17253577708e-06
-1.05259592829e-07
2.11886084121e-06
-1.35753544168e-07
2.15920117698e-06
-2.00056159597e-07
2.11225650459e-06
-1.67843580945e-07
2.0666947242e-06
-1.38988683233e-07
2.15217395052e-06
-1.94896115391e-07
2.13630758138e-06
-1.8476038691e-07
2.12269367303e-06
-1.76467569132e-07
2.17747519168e-06
-2.22493910189e-07
2.14215238567e-06
-2.29507443338e-07
2.1318747105e-06
-2.55544744847e-07
2.13140925327e-06
-2.81474558466e-07
2.12810432355e-06
-3.02627882356e-07
2.1281160039e-06
-3.40716666423e-07
2.12329635073e-06
-3.78905902641e-07
2.0962929635e-06
-4.33517475036e-07
2.11044437557e-06
-4.71093156387e-07
2.11053346308e-06
-5.10915865049e-07
2.04863171156e-06
-5.65815230256e-07
2.00769390088e-06
-6.33211894714e-07
1.96135799366e-06
-7.00491874499e-07
1.90324878391e-06
-7.60244616999e-07
1.78236438708e-06
-8.07666292018e-07
1.62928972515e-06
-8.36695746648e-07
1.44682615981e-06
-7.2976277704e-07
1.13350953646e-06
-3.42611029196e-07
6.8290218603e-07
7.08675361405e-07
2.39396965028e-07
4.14773955096e-06
6.06238142536e-07
3.87008188763e-05
-0.000100928186001
6.55638319029e-05
-0.000177331597513
9.00921797077e-05
-0.000238277312952
0.000112262933872
-0.000287022075666
0.000131951471441
-0.0003252455037
0.000149254369507
-0.000354436680912
0.000164414653305
-0.000376273789609
0.000177749224504
-0.000392335292365
0.000189578865496
-0.000403931889232
0.000200193844979
-0.000412091195385
0.000209844988358
-0.000417605543685
0.000218744641026
-0.000421089490415
0.000227069450301
-0.000423023994544
0.000234962461747
-0.000423784541427
0.000242534471767
-0.000423659217739
0.000249865234863
-0.000422862139467
0.000257004850885
-0.000421545302385
0.000263975000698
-0.000419808431368
0.000270768978774
-0.000417705156516
0.000277346627681
-0.000415236693553
0.000283620999879
-0.000412330935456
0.000289440721786
-0.000408822920509
0.000294579336692
-0.000404462078416
0.000298742495948
-0.000398958458719
0.000301595409576
-0.000392056139036
0.000302803882049
-0.000383607098347
0.00030207868418
-0.000373623610902
0.00029921412369
-0.000362294280392
0.00029412831933
-0.000349984766722
0.000286883255682
-0.000337204553918
0.000277677689641
-0.000324447216002
0.000266896014659
-0.000312220450751
0.000252320317571
-0.000295472633049
0.000225298082297
-0.000259527983376
0.000169510635849
-0.000190092667701
6.86608437811e-05
-7.78999843008e-05
2.29354275668e-06
-1.00420023521e-05
-7.03106181805e-07
-6.58062931678e-06
-5.79377779549e-06
5.13506849771e-10
2.26888581575e-06
-2.23256211627e-09
2.28461146994e-06
-5.52710667817e-08
2.27080777226e-06
-5.09228995546e-08
2.12142405526e-06
-4.58129520289e-09
2.16579289822e-06
-4.21953323825e-09
2.16062339763e-06
4.34786285543e-09
2.15915926044e-06
1.33307211751e-08
2.18727056939e-06
3.32521960905e-08
2.21596760696e-06
6.26177690132e-08
2.28779787771e-06
6.11551212382e-08
2.33352669281e-06
1.03332474518e-08
2.32731300013e-06
-5.81044114584e-08
2.24066497735e-06
-8.88311044728e-08
2.1492534813e-06
-6.82912799363e-08
2.13829532048e-06
-1.26553461489e-07
2.17008508276e-06
-1.54298643982e-07
2.09396550625e-06
-1.06526925022e-07
2.10387810474e-06
-1.22872142045e-07
2.15207552186e-06
-1.56560373889e-07
2.15578788377e-06
-1.35733286947e-07
2.15602067617e-06
-1.56819254206e-07
2.16256684137e-06
-1.84356978168e-07
2.15869248843e-06
-2.01432107579e-07
2.14770850784e-06
-2.25493395731e-07
2.15131335571e-06
-2.58849691514e-07
2.16054888465e-06
-2.91925665205e-07
2.15534910067e-06
-3.51341633125e-07
2.15455954295e-06
-3.92617298479e-07
2.15047617559e-06
-4.29463235186e-07
2.14598451281e-06
-4.97610827536e-07
2.1152596642e-06
-5.65859028175e-07
2.07431355551e-06
-6.51660826728e-07
2.04540349876e-06
-7.41285214039e-07
1.99100539236e-06
-8.48966932705e-07
1.8881153048e-06
-9.84909436527e-07
1.76310426491e-06
-1.11391716367e-06
1.5734257522e-06
-1.10079531085e-06
1.11825440815e-06
-7.11998475274e-07
2.92056857325e-07
1.10635201708e-06
-1.58137666927e-06
1.36281075671e-05
-1.19193921864e-05
4.43261507944e-05
-0.000131638215562
7.10061275998e-05
-0.000204020058416
9.47713591018e-05
-0.000262048892225
0.000115901135451
-0.000308156747159
0.000134442787307
-0.00034379101418
0.000150595725212
-0.000370592774567
0.000164672489385
-0.000390353197302
0.000177022620452
-0.000404687702274
0.000187977297187
-0.00041488855432
0.000197825304404
-0.000421940967289
0.000206809874411
-0.000426591686396
0.000215132477939
-0.000429413512416
0.000222956587406
-0.000430849385733
0.000230409919722
-0.000431239045042
0.000237586073196
-0.000430836443503
0.000244546212435
-0.000429823272374
0.000251321024789
-0.000428321037377
0.000257912089547
-0.000426400364544
0.000264291282307
-0.000424085168531
0.000270392555115
-0.000421338751519
0.00027609301263
-0.000418032148428
0.00028119093902
-0.000413921587599
0.000285396809792
-0.000408668679591
0.000288348894988
-0.000401911280815
0.000289651990506
-0.000393359970558
0.000288927218035
-0.000382883093676
0.000285859497543
-0.000370556653949
0.000280235135442
-0.00035667073558
0.000271984823234
-0.000341735275793
0.000261191901546
-0.000326412687528
0.000248204694505
-0.000311461435551
0.000233619882771
-0.000297637106798
0.000212561423049
-0.000274415699326
0.000168942084185
-0.000215909557133
6.88451427812e-05
-8.99964892813e-05
2.7671354243e-06
-1.18218428274e-05
-4.84566989339e-07
-6.78995962937e-06
-3.70758269386e-07
-6.69523540597e-06
-6.16430517146e-06
2.52938331054e-09
2.26657178231e-06
-6.0301489655e-09
2.29302255388e-06
-1.77072317126e-08
2.282286375e-06
-5.74718855394e-08
2.16097196396e-06
-1.64616265622e-08
2.1245183452e-06
5.65728387162e-10
2.14330957407e-06
2.25674059439e-08
2.13681168355e-06
3.5968166263e-08
2.17349648596e-06
4.47203031109e-08
2.20683197746e-06
8.14242873597e-08
2.25069893963e-06
9.31848913978e-08
2.32138176478e-06
9.20875490217e-08
2.328055044e-06
2.62056586447e-08
2.30620397899e-06
-3.99701349702e-08
2.21510286791e-06
-5.47307133969e-08
2.15269044448e-06
-4.49724094975e-08
2.15990870265e-06
-9.62544491183e-08
2.14477813817e-06
-9.13695209283e-08
2.09847752172e-06
-6.39627685383e-08
2.12409545825e-06
-8.01890523347e-08
2.17139236453e-06
-1.04803923383e-07
2.17999004442e-06
-1.03697852502e-07
2.16077822852e-06
-1.22615728432e-07
2.17687371029e-06
-1.47985076014e-07
2.17229037875e-06
-1.76904916088e-07
2.17937619717e-06
-2.02836345402e-07
2.18553445516e-06
-2.4809765349e-07
2.19957648918e-06
-2.87111832214e-07
2.19245634929e-06
-3.30681591636e-07
2.1927874815e-06
-3.72839431495e-07
2.18676835579e-06
-4.38548372834e-07
2.17947549882e-06
-5.18480066062e-07
2.15261185479e-06
-6.21362406969e-07
2.14645743269e-06
-7.47309163917e-07
2.11500502293e-06
-9.36538269112e-07
2.07519823068e-06
-1.19996314525e-06
2.02411662982e-06
-1.47501311403e-06
1.84589566141e-06
-1.886112984e-06
1.52624978458e-06
-2.58629973967e-06
9.89748999097e-07
-3.64756025379e-06
-5.22714493624e-07
2.73389778696e-05
-4.29179554203e-05
5.19663287994e-05
-0.000156277191051
7.61299529701e-05
-0.000228191726426
9.83687939336e-05
-0.000284293738865
0.000118264247582
-0.000328056823187
0.000135662772249
-0.000361193229947
0.000150743193107
-0.000385676217998
0.000163839801305
-0.00040345235753
0.000175316468184
-0.000416166557748
0.000185506298197
-0.000425080298483
0.000194692744681
-0.000431129100081
0.000203109857754
-0.000435010304898
0.000210947312833
-0.000437252316505
0.000218354415352
-0.000438257710866
0.000225442621296
-0.000438328362061
0.000232287732505
-0.000437682576053
0.000238932317002
-0.00043646879771
0.000245388194775
-0.000434777792733
0.000251637750167
-0.000432650739652
0.000257632204346
-0.000430080399554
0.000263278954956
-0.000426986239235
0.000268415550011
-0.000423169455619
0.000272783716639
-0.000418290443887
0.000276024705677
-0.000411910352309
0.000277706596949
-0.000403593846201
0.000277375507919
-0.000393029570661
0.000274612500688
-0.000380120769342
0.00026907970695
-0.000365024581525
0.000260551620347
-0.000348143358472
0.000248935486752
-0.000330119989237
0.000234218851842
-0.000311697116464
0.000216735110044
-0.000293979099363
0.000196850182023
-0.000277753476874
0.000165774307944
-0.000243340756357
7.59338129098e-05
-0.000126069778371
3.63533689331e-06
-1.769786326e-05
-1.17869351917e-07
-8.0686746244e-06
-3.12645453859e-08
-6.87701857257e-06
-9.885373344e-08
-6.62711390683e-06
-6.26353804416e-06
1.36507160097e-08
2.25220819212e-06
1.04170131629e-08
2.29589636587e-06
2.32669356194e-08
2.26917877389e-06
-3.45697066659e-08
2.21857634747e-06
-5.80558803204e-08
2.14776387535e-06
-2.6963634939e-08
2.11191065934e-06
2.38252620534e-08
2.08568549516e-06
5.00884812589e-08
2.14686099123e-06
6.16352388754e-08
2.1948796763e-06
8.72796197782e-08
2.22463446264e-06
1.23464258426e-07
2.28479165774e-06
1.28538233661e-07
2.32257798222e-06
1.17442935447e-07
2.3169309055e-06
4.51885318527e-08
2.28698775401e-06
-1.6760635261e-08
2.21427825931e-06
-1.19848487106e-08
2.15473085812e-06
-1.53573405218e-08
2.1476928563e-06
-4.87123454702e-08
2.13132146143e-06
-4.12677487147e-08
2.11609018262e-06
-1.45250727898e-08
2.14403368029e-06
-2.71282847987e-08
2.1919339396e-06
-5.95429791136e-08
2.19249738918e-06
-6.22656793773e-08
2.17887280045e-06
-8.57802475892e-08
2.19501635127e-06
-1.15800542478e-07
2.20854278919e-06
-1.38913173781e-07
2.20772373508e-06
-1.67551217932e-07
2.22721407087e-06
-1.99787320206e-07
2.22358470631e-06
-2.4179287238e-07
2.23359343402e-06
-2.91671199277e-07
2.23533664403e-06
-3.729739689e-07
2.25931010205e-06
-4.81930650839e-07
2.2599410725e-06
-5.97274167667e-07
2.26003152307e-06
-7.59827416915e-07
2.2756110257e-06
-1.01452713629e-06
2.32775662633e-06
-1.29268808998e-06
2.29997992924e-06
-1.70266763216e-06
2.25307227877e-06
-2.44454998812e-06
2.26572495218e-06
-3.7842734021e-06
2.32722099417e-06
-6.95968098814e-06
2.64378094756e-06
3.28122541881e-05
-8.27071281533e-05
5.57497932516e-05
-0.0001792247778
7.86795234227e-05
-0.000251128641844
0.000100080838614
-0.000305700456721
0.000119077252467
-0.000347057453785
0.000135536853297
-0.000377656212957
0.000149704844568
-0.000399847009686
0.000161962309126
-0.000415712184713
0.000172694534258
-0.000426900819461
0.000182238735403
-0.000434626273022
0.000190873763454
-0.000439765694841
0.000198824660869
-0.000442962595029
0.000206268943968
-0.000444697852246
0.000213341109354
-0.000445331008131
0.000220135827159
-0.000445124113939
0.000226711143732
-0.000444258840366
0.000233091740715
-0.000442850273139
0.000239271882998
-0.000440958750367
0.000245216292847
-0.000438595915967
0.000250856791503
-0.0004357216184
0.00025607349966
-0.000432203635061
0.000260660285996
-0.000427756897421
0.000264295942558
-0.000421926739195
0.000266547810124
-0.000414162837111
0.000266914269379
-0.000403960918957
0.000264888872571
-0.000391004765253
0.000260020906997
-0.000375253404126
0.000251956588371
-0.000356960834911
0.000240464992
-0.000336652350818
0.000225442066433
-0.000315097730654
0.000206855595517
-0.000293111632846
0.000184872582559
-0.000271997286179
0.000156359771141
-0.000249241602105
9.60442040438e-05
-0.000183025486126
1.33098199061e-05
-4.33352961509e-05
2.4320911692e-06
-6.8201330323e-06
1.16363507352e-06
-6.80019453592e-06
5.91552328327e-07
-6.30465433233e-06
2.19107814e-07
-6.25547118656e-06
-6.04420279455e-06
3.2123648464e-08
2.22018211848e-06
3.9637781609e-08
2.28819747492e-06
3.84588426777e-08
2.27013365666e-06
-1.57239300701e-09
2.25837865557e-06
-5.53908263303e-08
2.20133516201e-06
-4.95560802724e-08
2.10582117429e-06
1.61158846638e-09
2.03421598856e-06
4.2012387465e-08
2.10609693044e-06
6.82033988849e-08
2.16828507966e-06
8.68959357847e-08
2.20552339484e-06
1.30275927215e-07
2.24096815363e-06
1.46036914847e-07
2.30638604529e-06
1.65684506432e-07
2.29686028116e-06
1.37781001021e-07
2.31449316056e-06
7.90255723093e-08
2.27263830149e-06
2.5501538712e-08
2.20785276144e-06
3.65262055542e-08
2.13622549196e-06
2.78549144145e-08
2.13949092635e-06
4.92795454608e-09
2.13846962811e-06
1.39864095676e-08
2.13438036639e-06
4.09743725692e-08
2.16428142684e-06
2.55622677684e-08
2.20721504613e-06
-5.33815838567e-09
2.20904708796e-06
-1.8728150645e-08
2.20763903688e-06
-3.10874792193e-08
2.22006703117e-06
-5.32412010502e-08
2.22898239429e-06
-7.41567589838e-08
2.24714754216e-06
-1.16008773714e-07
2.26437650104e-06
-1.56409347496e-07
2.27282820636e-06
-2.33486138876e-07
2.31110387916e-06
-3.04345995087e-07
2.32874627837e-06
-4.00947612757e-07
2.35500229796e-06
-5.27611860021e-07
2.38503405808e-06
-7.19442252401e-07
2.46562550964e-06
-9.47603670939e-07
2.55397719657e-06
-1.24583088386e-06
2.59606665475e-06
-1.74447901731e-06
2.74953153038e-06
-2.4135151102e-06
2.93224752593e-06
-3.35918860342e-06
3.26985417328e-06
-4.84472023233e-06
4.12427156716e-06
2.76362010717e-05
-0.00011520381507
5.45191916772e-05
-0.00020611602519
7.85977963372e-05
-0.000275213132926
9.99470361197e-05
-0.000327054235658
0.000118405567058
-0.000365519596639
0.00013414656617
-0.00039340017233
0.0001475703526
-0.000413273271159
0.00015913291397
-0.000427276859512
0.000169250157673
-0.000437019889651
0.000178266886491
-0.000443644603114
0.000186458682494
-0.000447958906275
0.000194041683716
-0.000450546862007
0.000201180726346
-0.000451838034429
0.000207994920797
-0.000452146239371
0.000214562079698
-0.000451692220653
0.000220923182107
-0.000450620817917
0.000227086468995
-0.000449014369664
0.000233030578961
-0.000446903617258
0.000238704601376
-0.000444270645343
0.000244022465285
-0.000441040151271
0.000248835998821
-0.00043701779942
0.000252890504478
-0.000431812009059
0.000255795627146
-0.000424832438943
0.000257042473805
-0.000415410245637
0.000256065163185
-0.000402984138869
0.000252317102879
-0.000387257220994
0.000245330027996
-0.000368266802168
0.000234741020956
-0.000346372272332
0.000220295478763
-0.000322207230113
0.000201823141321
-0.000296625924779
0.000179396235536
-0.000270685676796
0.000154098410501
-0.000246700255207
0.000124803659197
-0.00021994712446
4.01564910999e-05
-9.83781762588e-05
4.72167562156e-06
-7.90032115208e-06
2.94054801397e-06
-5.03884831384e-06
1.75869411457e-06
-5.61836621512e-06
1.02909808907e-06
-5.57549374341e-06
4.646649148e-07
-5.69049943389e-06
-5.57984221971e-06
4.72973169523e-08
2.17220740399e-06
5.96561077181e-08
2.27545283628e-06
4.95267647031e-08
2.27997450255e-06
3.64691461267e-08
2.27118767832e-06
-3.14934904404e-09
2.24072436458e-06
-3.64079612435e-08
2.13882956622e-06
-3.29069131964e-08
2.03042637617e-06
1.69813343307e-08
2.05587247202e-06
5.92842451019e-08
2.12559331955e-06
8.95883269958e-08
2.17478678597e-06
1.21846349221e-07
2.20826156516e-06
1.69491542381e-07
2.25828267911e-06
1.73912010185e-07
2.29199433116e-06
1.93637258566e-07
2.29433094099e-06
1.66638411119e-07
2.29921984878e-06
1.22589030722e-07
2.25148226647e-06
8.27996862959e-08
2.17557275521e-06
8.96422711054e-08
2.13217874964e-06
8.42884771334e-08
2.14329552521e-06
6.92248078529e-08
2.14884961003e-06
7.69110477902e-08
2.15597167569e-06
9.58347542976e-08
2.18762332368e-06
8.30390983776e-08
2.22113588917e-06
6.02539629334e-08
2.22967649631e-06
5.47157573045e-08
2.22481410691e-06
4.42285359849e-08
2.23861556826e-06
9.19781760806e-09
2.28125695302e-06
-2.11451759441e-08
2.29371696621e-06
-7.38164197047e-08
2.32438407614e-06
-1.18044553494e-07
2.35414099495e-06
-1.81790111914e-07
2.39121674065e-06
-2.7736177892e-07
2.44920246993e-06
-4.23228455795e-07
2.52942494678e-06
-6.03193525311e-07
2.64404530159e-06
-8.02663388838e-07
2.75185715715e-06
-1.0981573903e-06
2.88987420098e-06
-1.44627891644e-06
3.09553015796e-06
-1.84127858049e-06
3.32541729098e-06
-2.37036131091e-06
3.79807966424e-06
-3.20145477444e-06
4.94921115076e-06
2.48545331296e-05
-0.000143267456057
5.26789976368e-05
-0.000233946038175
7.73476265062e-05
-0.000299886087055
9.86019444838e-05
-0.000348312045019
0.000116586787608
-0.000383507321804
0.000131708691086
-0.00040852450095
0.000144502084827
-0.000426068741597
0.000155486714016
-0.00043826328997
0.000165102814118
-0.00044663757052
0.000173699768482
-0.000452242956873
0.000181548140932
-0.00045580852935
0.000188853681573
-0.000457853529054
0.000195767299274
-0.000458752675875
0.000202392136392
-0.000458772012857
0.000208789506259
-0.000458090454157
0.000214984649598
-0.000456816760386
0.000220971377126
-0.000455001842549
0.000226715068912
-0.000452648004019
0.000232151417068
-0.00044970764761
0.00023717800399
-0.000446067351998
0.000241616613789
-0.000441456993245
0.000245158055073
-0.00043535400303
0.000247336817777
-0.000427011733621
0.00024756842922
-0.000415642358596
0.000245233829601
-0.000400650018966
0.00023976721618
-0.000381791043927
0.000230710502068
-0.000359210488384
0.000217723039157
-0.000333385141097
0.000200539562393
-0.000305024069487
0.000178834030152
-0.000274920893542
0.000152147359409
-0.000243999653054
0.000118958574785
-0.000213511991181
7.14691569365e-05
-0.000172457234858
5.78446708676e-06
-3.26931040292e-05
3.25347634877e-06
-5.36902895676e-06
2.91343673768e-06
-4.69869709129e-06
2.07738349481e-06
-4.78223426736e-06
1.30140242122e-06
-4.79918302983e-06
6.50653450889e-07
-5.04041391504e-06
-4.92895345965e-06
4.97855292583e-08
2.12246958691e-06
6.47799588348e-08
2.26023585472e-06
6.70293021338e-08
2.27745627813e-06
6.34903796531e-08
2.27446405612e-06
4.97063173907e-08
2.25425443738e-06
4.93785694059e-09
2.18334519067e-06
-3.89756478021e-08
2.07408076982e-06
-7.31110684946e-10
2.01731609675e-06
4.95609271411e-08
2.07492408604e-06
9.18229250846e-08
2.13210437989e-06
1.25182859816e-07
2.17445022448e-06
1.75080896747e-07
2.20791800308e-06
2.06389184487e-07
2.26020846905e-06
2.16544999845e-07
2.28372088495e-06
2.35921407497e-07
2.27939831709e-06
2.14977518535e-07
2.27198205666e-06
1.74541612154e-07
2.21558065008e-06
1.3975862466e-07
2.16650450228e-06
1.47274116829e-07
2.13527388199e-06
1.43388432721e-07
2.1521894865e-06
1.49048538191e-07
2.14971579142e-06
1.41288533293e-07
2.19475073776e-06
1.63447942158e-07
2.1983108358e-06
1.57639707933e-07
2.23477663451e-06
1.43525258199e-07
2.23819267318e-06
1.31014092473e-07
2.25034619523e-06
1.13305520685e-07
2.29812279373e-06
8.74027476886e-08
2.31870347039e-06
6.3159724396e-08
2.34766060876e-06
2.49794780473e-08
2.39127409594e-06
-6.40143837515e-08
2.47907487805e-06
-1.576463616e-07
2.54165041662e-06
-2.74817824953e-07
2.64538445995e-06
-4.01678719635e-07
2.76968584394e-06
-5.54070579468e-07
2.90301567658e-06
-7.44357020923e-07
3.07884018579e-06
-9.80254767877e-07
3.33031845806e-06
-1.2825469119e-06
3.62649658263e-06
-1.73164444574e-06
4.2448300978e-06
-2.51185786136e-06
5.72838615328e-06
2.39210299324e-05
-0.000169706705747
5.12360205979e-05
-0.000261264749111
7.56789061689e-05
-0.000324331947367
9.65206237089e-05
-0.000369156294275
0.000113939853748
-0.000400928749172
0.0001284570447
-0.000423043616358
0.000140684470568
-0.000438297869995
0.000151177498996
-0.000448757833745
0.000160385920028
-0.000455847349499
0.000168655779453
-0.000460514039318
0.000176247956066
-0.000463401814581
0.000183354764497
-0.000464961348366
0.000190111413789
-0.000465510252585
0.000196604644196
-0.000465266099386
0.000202880127682
-0.000464366730794
0.000208949203933
-0.000462886575687
0.000214793634697
-0.000460846961852
0.000220368043481
-0.00045822305843
0.000225596923877
-0.000454937131531
0.000230362772655
-0.000450833770643
0.000234454415673
-0.000445549172013
0.000237500732301
-0.000438400830414
0.000238955266389
-0.000428466748796
0.000238161346952
-0.000414848896794
0.000234462160459
-0.000396951250142
0.000227298040698
-0.000374627305789
0.000216255824648
-0.000348168590357
0.000201072564689
-0.000318202146667
0.000181590948722
-0.000285542708638
0.00015766517093
-0.000250995563226
0.000129039109679
-0.000215373908143
9.31527805335e-05
-0.000177625330887
3.5696426177e-05
-0.000115000109814
9.47253150589e-06
-6.46878643783e-06
6.05291326461e-06
-1.94908928847e-06
4.04510697525e-06
-2.69064056391e-06
2.676911383e-06
-3.41396843987e-06
1.65590442703e-06
-3.77852268759e-06
8.1048450293e-07
-4.19444262614e-06
-4.11875221811e-06
3.24065764706e-08
2.08941861043e-06
6.15548642321e-08
2.23068690255e-06
7.73920638412e-08
2.26128586579e-06
8.65186226393e-08
2.26503985055e-06
8.52505714218e-08
2.25525303983e-06
5.74054777113e-08
2.21094382413e-06
-5.33417187995e-09
2.13655937071e-06
-8.82980860272e-09
2.02051959221e-06
4.21282808057e-08
2.02362300129e-06
9.26181626166e-08
2.08121109144e-06
1.3609753793e-07
2.13052824588e-06
1.73705608288e-07
2.16984102123e-06
2.27533649501e-07
2.20590439189e-06
2.51464118397e-07
2.25931542861e-06
2.91085139211e-07
2.23931276728e-06
2.95405044748e-07
2.26721605463e-06
2.62020913627e-07
2.248508654e-06
2.38194424318e-07
2.18987978489e-06
2.14852958962e-07
2.15814611628e-06
2.04490176145e-07
2.16203340251e-06
2.23659654014e-07
2.12999953062e-06
2.34124680928e-07
2.18370202475e-06
2.35521969724e-07
2.19629853932e-06
2.50504945275e-07
2.2191562557e-06
2.45443917002e-07
2.24258455216e-06
2.30278227871e-07
2.26480987759e-06
2.32227547415e-07
2.29542701207e-06
2.2353911329e-07
2.32661666709e-06
2.04133389517e-07
2.36622913817e-06
1.35005490074e-07
2.45949453629e-06
8.25238304877e-08
2.53062103394e-06
1.58997278951e-08
2.60733682482e-06
-6.06131180306e-08
2.72096225307e-06
-1.45957937821e-07
2.8541039078e-06
-2.56011967528e-07
3.01215465448e-06
-4.06436697442e-07
3.2283712408e-06
-6.28054817009e-07
3.55065201077e-06
-9.07651328445e-07
3.90494450815e-06
-1.20609740189e-06
4.54352200966e-06
-1.69751779341e-06
6.21639419991e-06
2.35455429396e-05
-0.000194951624631
5.00420327537e-05
-0.000287763271926
7.38068833159e-05
-0.000348098686337
9.39652701546e-05
-0.000389316433884
0.000110703298294
-0.000417668389184
0.000124597355516
-0.000436939163054
0.000136294731014
-0.000449996617088
0.000146359567328
-0.000458823938292
0.000155235168819
-0.00046472412077
0.000163254630078
-0.000468534582329
0.000170663116247
-0.000470811300586
0.000177635825308
-0.000471934983894
0.000184290543056
-0.000472165830155
0.000190697622965
-0.000471673978536
0.000196888460069
-0.000470558312752
0.000202862684841
-0.000468861494078
0.000208592475993
-0.000466577401261
0.000214024084957
-0.000463655271418
0.000219072677527
-0.000459986290701
0.000223606422564
-0.000455368045438
0.000227376561895
-0.000449319812461
0.000229940809425
-0.000440965549625
0.000230666265348
-0.000429192652669
0.000228830277591
-0.000413013324658
0.000223756632458
-0.000391877990491
0.000214916559874
-0.000365787570268
0.000201965375235
-0.00033521769149
0.00018473214664
-0.000300969155687
0.000163174005309
-0.000263984855729
0.00013746498349
-0.000225286785526
0.000108516198215
-0.000186425512998
7.78225393891e-05
-0.000146931251409
1.79564231385e-05
-5.51331875735e-05
8.94593577776e-06
2.54205806425e-06
6.43948812692e-06
5.57631326074e-07
4.65951812477e-06
-9.10509246393e-07
3.10172146433e-06
-1.85609696704e-06
1.98093193489e-06
-2.65743446612e-06
9.8934844868e-07
-3.20353006858e-06
-3.12932991433e-06
1.06128048032e-08
2.07883391151e-06
5.37091909185e-08
2.18734506456e-06
8.08469148449e-08
2.23384187526e-06
1.01749097469e-07
2.24383088152e-06
1.11950318925e-07
2.24476200146e-06
9.92058695266e-08
2.22341440122e-06
6.18377995575e-08
2.1736677322e-06
1.06243994021e-08
2.07146166847e-06
3.42918713252e-08
1.99963961152e-06
8.95740535733e-08
2.02555379509e-06
1.43802168414e-07
2.07587335244e-06
1.91037865059e-07
2.12214506455e-06
2.36044414147e-07
2.16042576705e-06
2.93454490194e-07
2.20142557403e-06
3.10028020486e-07
2.22227402558e-06
3.51676221602e-07
2.22509637122e-06
3.43744228097e-07
2.25598669406e-06
3.36256189608e-07
2.19692256331e-06
3.15289763975e-07
2.17864727624e-06
2.9802922522e-07
2.17881962385e-06
2.90662922652e-07
2.1368729145e-06
3.29864658936e-07
2.14396825699e-06
3.38670298451e-07
2.18693715222e-06
3.47550284056e-07
2.20970065717e-06
3.47999164639e-07
2.24154566997e-06
3.55941855144e-07
2.2562508114e-06
3.60479675133e-07
2.29025660549e-06
3.61793553326e-07
2.32463678052e-06
3.19753738169e-07
2.40756663826e-06
2.9143861796e-07
2.4870885673e-06
2.67663221573e-07
2.55368034162e-06
2.23238359647e-07
2.65105372549e-06
1.70453665908e-07
2.77305185427e-06
1.07184183634e-07
2.91668510254e-06
2.22579362264e-08
3.09640741232e-06
-1.23282100477e-07
3.37317065381e-06
-2.67621577064e-07
3.69450116527e-06
-4.72038500416e-07
4.10880969106e-06
-4.78862069394e-07
4.54862243471e-06
-6.68151388173e-07
6.40645282936e-06
2.33521805839e-05
-0.000218974111305
4.89357067755e-05
-0.000313347984758
7.17908495625e-05
-0.000370954980239
9.1084183872e-05
-0.000408610934934
0.000107049230926
-0.000433634612728
0.000120299570397
-0.00045019065882
0.000131491439301
-0.000461189616439
0.000141177261987
-0.000468510849356
0.000149779870156
-0.000473327771267
0.000157610312358
-0.000476366012672
0.000164892185779
-0.000478094106057
0.0001717802987
-0.000478823971267
0.000178373940045
-0.000478760288723
0.000184727749442
-0.000478028550494
0.000190860659182
-0.000476691931505
0.000196762903898
-0.000474764398801
0.000202399389917
-0.000472214499253
0.000207710004526
-0.000468966456001
0.000212601954027
-0.000464878769506
0.000216929090432
-0.000459695678127
0.000220398243252
-0.000452789429869
0.000222484647303
-0.000443052392935
0.000222464209785
-0.000429172626385
0.000219557841559
-0.000410107340888
0.000213092020978
-0.000385412516218
0.000202596070479
-0.00035529192577
0.000187817888808
-0.000320439768897
0.000168681799974
-0.000281833307912
0.000145172876433
-0.000240476247619
0.000117274440635
-0.000197388977385
8.44468569606e-05
-0.000153597967567
4.46037330442e-05
-0.000107088536669
3.64543893945e-06
-1.41747467849e-05
5.50874423178e-06
6.78935121611e-07
5.46129570969e-06
6.05235085748e-07
4.60256699392e-06
-5.16788899261e-08
3.43396735327e-06
-6.87506357066e-07
2.19675910268e-06
-1.42065259796e-06
1.08644533185e-06
-2.09302978856e-06
-2.04315675272e-06
1.04726474471e-08
2.0677509755e-06
4.96367451757e-08
2.14779210899e-06
8.52154207353e-08
2.19792268219e-06
1.10294548704e-07
2.21842417063e-06
1.29279064749e-07
2.22546647724e-06
1.28165014238e-07
2.22424745317e-06
1.1406439724e-07
2.1874993105e-06
7.29183282507e-08
2.1123355323e-06
4.19240429942e-08
2.03033627104e-06
8.24579594791e-08
1.98467629064e-06
1.46893905794e-07
2.01103990371e-06
2.07127909136e-07
2.06147319212e-06
2.60827827029e-07
2.10626102293e-06
3.20330874984e-07
2.14144997022e-06
3.56645533964e-07
2.18547926368e-06
3.76165332138e-07
2.20511284915e-06
4.2097897096e-07
2.21071940189e-06
4.12244959079e-07
2.20521233095e-06
4.08338317511e-07
2.18211689483e-06
4.02631576725e-07
2.18407795297e-06
3.96390466807e-07
2.14265432705e-06
4.18750835232e-07
2.12113725633e-06
4.45725328398e-07
2.1594708831e-06
4.56762249899e-07
2.19816586707e-06
4.6277728628e-07
2.23501624754e-06
4.75650140961e-07
2.24286600946e-06
4.96757845281e-07
2.26862221084e-06
4.84085346859e-07
2.33677217202e-06
4.76162750316e-07
2.41494747108e-06
4.78464745061e-07
2.48425869599e-06
4.64703754912e-07
2.56692335459e-06
4.38826856107e-07
2.67642902259e-06
4.06540128295e-07
2.80485181318e-06
3.63999483944e-07
2.95875959324e-06
2.98734919017e-07
3.16124492173e-06
1.89324735381e-07
3.48223412967e-06
1.06967457662e-07
3.77623085514e-06
9.07065222395e-08
4.12446755784e-06
1.41324899788e-07
4.4987945116e-06
1.4647482754e-07
6.39949575307e-06
2.31930048351e-05
-0.000242020351537
4.7835180941e-05
-0.000337990627946
6.96516551162e-05
-0.000392772137718
8.79689262475e-05
-0.00042692902993
0.000103104032245
-0.000448770620331
0.000115701856308
-0.000462789440924
0.000126411754104
-0.000471900495617
0.000135759719677
-0.000477859804645
0.000144137162714
-0.000481706190238
0.000151825722992
-0.00048405552117
0.000159022865029
-0.000485292156076
0.000165860907676
-0.000485662872353
0.000172420585219
-0.000485320771558
0.00017874218958
-0.000484350902989
0.000184834281998
-0.00048278471731
0.000190679917976
-0.000480610672964
0.000196238662529
-0.000477773832594
0.000201445530865
-0.000474173865558
0.000206200485662
-0.000469634225861
0.000210342200545
-0.00046383785774
0.000213523463892
-0.000455971129185
0.000215123523639
-0.0004446528604
0.00021432346434
-0.000428372949228
0.000210300741506
-0.000406084969435
0.000202409568408
-0.000377521660746
0.000190266949217
-0.000343149583742
0.000173746671027
-0.000303919731269
0.000152921788355
-0.000261008726091
0.000127941955422
-0.000215496924096
9.89649682673e-05
-0.000168412469603
6.50663017366e-05
-0.000119700285244
2.21569359187e-05
-6.41792394311e-05
7.74280029248e-06
2.39414162425e-07
6.19424489187e-06
2.2275315587e-06
5.28156684618e-06
1.51794416934e-06
4.44511986185e-06
7.84771038357e-07
3.5474936287e-06
2.10120878248e-07
2.3999449924e-06
-2.73088976414e-07
1.1649330717e-06
-8.5877790431e-07
-8.78056182732e-07
2.89761269652e-08
2.03876153698e-06
5.41245370328e-08
2.12239751843e-06
9.10869749738e-08
2.16065296933e-06
1.18020560537e-07
2.19116711618e-06
1.40762418363e-07
2.20240755296e-06
1.56307683324e-07
2.20839475017e-06
1.45405705837e-07
2.1981162234e-06
1.24264204198e-07
2.13320510291e-06
9.22866482597e-08
2.06202770235e-06
8.39668773858e-08
1.99268237043e-06
1.43410054401e-07
1.95123910438e-06
2.14673635348e-07
1.98979879789e-06
2.80199789709e-07
2.04029187267e-06
3.39068613844e-07
2.08211460105e-06
4.01735421156e-07
2.12234117812e-06
4.4050924211e-07
2.16586763292e-06
4.72686838903e-07
2.17808966966e-06
4.96880143461e-07
2.18058150798e-06
4.98918780069e-07
2.17964993238e-06
5.08480750483e-07
2.17409671659e-06
5.10779826993e-07
2.13994204183e-06
5.26266420656e-07
2.10523230355e-06
5.53267837051e-07
2.13204453935e-06
5.71550557425e-07
2.17944729764e-06
5.91609648366e-07
2.21453543098e-06
6.0535804532e-07
2.2286995716e-06
6.18274255909e-07
2.25530029797e-06
6.31041556215e-07
2.3236054612e-06
6.51095925153e-07
2.39451671797e-06
6.58919646511e-07
2.47607149933e-06
6.61142800028e-07
2.56435778777e-06
6.59700193663e-07
2.67755364012e-06
6.49560950374e-07
2.8146968994e-06
6.31907740034e-07
2.97615302828e-06
5.8754383475e-07
3.20539590627e-06
5.67089725367e-07
3.50248377791e-06
5.38979721293e-07
3.80432422723e-06
6.29703183063e-07
4.03378832136e-06
5.08865933574e-07
4.6184227013e-06
7.86763803182e-07
6.12293754024e-06
2.30975999599e-05
-0.000264331795435
4.67245638408e-05
-0.000361617794892
6.74081727379e-05
-0.000413456134307
8.46839767136e-05
-0.00044420539387
9.8964171024e-05
-0.000463051518273
0.000110916724376
-0.000474742793053
0.000121171898482
-0.00048215653993
0.000130218434917
-0.000486907248527
0.000138408399513
-0.000489897075321
0.000145989042586
-0.000491637073299
0.000153129054001
-0.000492433044889
0.00015993771095
-0.000492472362605
0.000166478212704
-0.000491862051122
0.000172778402242
-0.000490651813008
0.000178838628117
-0.000488845602927
0.000184636673522
-0.000486409322113
0.000190128204411
-0.000483265912933
0.000195244248211
-0.000479290412673
0.000199877570267
-0.000474268009358
0.00020384982294
-0.000467810539063
0.00020674677625
-0.000458868481071
0.000207836004311
-0.000445742461947
0.00020620180587
-0.000426739097362
0.000200994222431
-0.000400877703503
0.000191620872539
-0.00036814859654
0.000177811452092
-0.000329340412062
0.000159584482865
-0.000285693031077
0.000137175377944
-0.000238600033441
0.000110942237923
-0.000189264468227
8.16425275227e-05
-0.000139113538511
5.05758611426e-05
-8.86341317329e-05
1.19136124397e-05
-2.55173388041e-05
6.60924855318e-06
5.5437661329e-06
5.47077886601e-06
3.36598030213e-06
4.68713246791e-06
2.3015508017e-06
3.99309754294e-06
1.47877512446e-06
3.30270595447e-06
9.00347315935e-07
2.43289785357e-06
5.96277299223e-07
1.07366160627e-06
5.00902792501e-07
1.95375218758e-07
4.41993626999e-08
1.99400921153e-06
6.45070894202e-08
2.10171730388e-06
9.34105295522e-08
2.1314174949e-06
1.21996239723e-07
2.16225307643e-06
1.45988307684e-07
2.17808312739e-06
1.68914795244e-07
2.18514689383e-06
1.81284325417e-07
2.18544607013e-06
1.60134198986e-07
2.15406651432e-06
1.55780609078e-07
2.06609630968e-06
1.31422399996e-07
2.01674039683e-06
1.4465219716e-07
1.93767711492e-06
2.11813264329e-07
1.92227200653e-06
2.87590840875e-07
1.96409891847e-06
3.60038147783e-07
2.00922967014e-06
4.25623873264e-07
2.05629785152e-06
4.95553614769e-07
2.09548230592e-06
5.37131211506e-07
2.13606479643e-06
5.67087510994e-07
2.15019745232e-06
5.90237713109e-07
2.15609249459e-06
6.13679332874e-07
2.15026553054e-06
6.28684370491e-07
2.1245573064e-06
6.3946758617e-07
2.0940786917e-06
6.63913501821e-07
2.10722968141e-06
6.96455062228e-07
2.14655334786e-06
7.20868183804e-07
2.18977870435e-06
7.43154991558e-07
2.20609700648e-06
7.59870041932e-07
2.23828948372e-06
7.90759262255e-07
2.29245189916e-06
8.15884743311e-07
2.36914881229e-06
8.38726312724e-07
2.45301819273e-06
8.58225800125e-07
2.5446761949e-06
8.69244905369e-07
2.66638592018e-06
8.73018430951e-07
2.81081308341e-06
8.77241061786e-07
2.97186380256e-06
8.88171930992e-07
3.19446374079e-06
9.37605932008e-07
3.45313928015e-06
9.73592942731e-07
3.76823031897e-06
1.00372438731e-06
4.00331107412e-06
9.23245603184e-07
4.69997198128e-06
1.40697676293e-06
5.63817174832e-06
2.30301325529e-05
-0.000285954026501
4.55668057887e-05
-0.00038415436191
6.50651144588e-05
-0.000432954632066
8.12754260173e-05
-0.000460416114552
9.4705509189e-05
-0.000476482166977
0.000106036294559
-0.00048607427046
0.000115868706118
-0.000491989729158
0.000124646413809
-0.000495685791277
0.000132677278292
-0.000497928799686
0.000140171834347
-0.000499132486234
0.0001472694934
-0.000499531536284
0.000154057476214
-0.000499261133665
0.000160583328502
-0.000498388639131
0.000166864621129
-0.000496933780188
0.000172895476888
-0.000494877073766
0.000178649888023
-0.0004921642887
0.000184080515614
-0.000488697043866
0.000189114701171
-0.000484325054337
0.000193637402064
-0.000478791128596
0.000197450435852
-0.000471623958181
0.000200055661606
-0.000461474066866
0.000200591564592
-0.000446278699999
0.000198046334755
-0.000424194178509
0.000191561844428
-0.000394393498426
0.000180624338678
-0.000357211343823
0.000165096106048
-0.000313812439499
0.000145150218938
-0.000265747483598
0.000121167903323
-0.000214618297371
9.3524871041e-05
-0.000161622170958
6.25358634538e-05
-0.000108125427925
2.72148010978e-05
-5.33135635188e-05
3.03452412104e-06
-1.33706325613e-06
4.15824200394e-06
4.42001905588e-06
4.20526800409e-06
3.31886261821e-06
3.82949064181e-06
2.67719510894e-06
3.31253088282e-06
1.99555893427e-06
2.75361268271e-06
1.45917412813e-06
2.12466430259e-06
1.22526719237e-06
1.23491074118e-06
1.39014256447e-06
1.43061170224e-06
4.45652823008e-08
1.94940260061e-06
6.72585687855e-08
2.07879138988e-06
8.57689580448e-08
2.11261927462e-06
1.15870427003e-07
2.13183558771e-06
1.45536872255e-07
2.14808676216e-06
1.75067049998e-07
2.15528585923e-06
2.03886638741e-07
2.15630324087e-06
2.10770972254e-07
2.14687454993e-06
2.00832188694e-07
2.07574691199e-06
2.10534131914e-07
2.00674243741e-06
1.94426074914e-07
1.95348205306e-06
2.23587486898e-07
1.89277176738e-06
2.86162807462e-07
1.90116107394e-06
3.6947319397e-07
1.92551684379e-06
4.49561519267e-07
1.97579103167e-06
5.22583342775e-07
2.02202971679e-06
5.97149278376e-07
2.06107255887e-06
6.42003958253e-07
2.10493047721e-06
6.79998958571e-07
2.11771016835e-06
7.11966140222e-07
2.11793334235e-06
7.36304109818e-07
2.09987872882e-06
7.5676814408e-07
2.07329240657e-06
7.85023694486e-07
2.07867259738e-06
8.22209184651e-07
2.10907954168e-06
8.57886560625e-07
2.1538439151e-06
8.85283389296e-07
2.17846869832e-06
9.1276489309e-07
2.21061550135e-06
9.47254086185e-07
2.25780227615e-06
9.81196117569e-07
2.33508627411e-06
1.01442531839e-06
2.41970109642e-06
1.04654178205e-06
2.51251626066e-06
1.08099641591e-06
2.63193433042e-06
1.10642946273e-06
2.78543229047e-06
1.14219350119e-06
2.93620308942e-06
1.19449723971e-06
3.14233054927e-06
1.24609809813e-06
3.40170789331e-06
1.32159323128e-06
3.69298130483e-06
1.34574242647e-06
3.97956889175e-06
1.42139913127e-06
4.62344682348e-06
1.8153074224e-06
5.24556568428e-06
2.28669672032e-05
-0.000307005590341
4.4315623093e-05
-0.000405602761961
6.26263615663e-05
-0.0004512653515
7.77832804316e-05
-0.000475573228638
9.03920274207e-05
-0.000489091291655
0.000101137134153
-0.00049681988856
0.00011058144297
-0.000501434653872
0.000119118288499
-0.000504223319117
0.000127009338091
-0.000505820568801
0.000134428641044
-0.000506552516399
0.000141487784445
-0.000506591390395
0.000148254130113
-0.000506028156521
0.000154761974698
-0.000504897113906
0.000161020759826
-0.00050319314386
0.000167020046939
-0.000500876884686
0.000172731015273
-0.000497875730059
0.000178103718891
-0.000494070173787
0.000183061569189
-0.000489283292409
0.000187480541337
-0.000483210456186
0.000191138827282
-0.000475282575778
0.000193433004401
-0.000463768552256
0.000193354147473
-0.000446200133348
0.000189799288742
-0.000420639587955
0.000181925753594
-0.000386520207759
0.000169323481525
-0.000344609312586
0.000152000516625
-0.000296489763709
0.000130281894436
-0.000244029308833
0.000104698300436
-0.000189035542052
7.57723201521e-05
-0.000132697090524
4.48461080703e-05
-7.7199919698e-05
1.04540983375e-05
-1.89216916574e-05
3.32953221033e-06
5.78750344861e-06
3.415749557e-06
4.33372686532e-06
3.29992959586e-06
3.43453854124e-06
3.00453367606e-06
2.97240433698e-06
2.53866848909e-06
2.4612865717e-06
2.11763443525e-06
1.87995661851e-06
1.72223457418e-06
1.62045625219e-06
7.40264512356e-07
2.37262673745e-06
2.17074463028e-06
4.25125393814e-08
1.90640618227e-06
5.11922166935e-08
2.06976596294e-06
7.12209387207e-08
2.09227145178e-06
1.05908140299e-07
2.09682346683e-06
1.46056235438e-07
2.10760100268e-06
1.86269892496e-07
2.11472808605e-06
2.2597571341e-07
2.11625847939e-06
2.59576291778e-07
2.11295412507e-06
2.52924869521e-07
2.08209456614e-06
2.71578890687e-07
1.98780298866e-06
2.87023850882e-07
1.93773343689e-06
2.95053168515e-07
1.88443289014e-06
3.01131401162e-07
1.89474025835e-06
3.76790580585e-07
1.84950778874e-06
4.6280374677e-07
1.88939863943e-06
5.53955832018e-07
1.9304831597e-06
6.34763289542e-07
1.97986672319e-06
7.12525593768e-07
2.02678129569e-06
7.65109214208e-07
2.06475889585e-06
8.07320494754e-07
2.07538445398e-06
8.41125930994e-07
2.06576500423e-06
8.66435654567e-07
2.04770426957e-06
9.06510247083e-07
2.03834365845e-06
9.48496011796e-07
2.06687255493e-06
9.87482398084e-07
2.11466099819e-06
1.0301780881e-06
2.13561972009e-06
1.06738106393e-06
2.17329594019e-06
1.1059927082e-06
2.21912144698e-06
1.14795377521e-06
2.29309565269e-06
1.1926738224e-06
2.37500830157e-06
1.23876340862e-06
2.46650367173e-06
1.2800250918e-06
2.59081336355e-06
1.32909632917e-06
2.73656284423e-06
1.40131250251e-06
2.86424350977e-06
1.4695315553e-06
3.07444448472e-06
1.53355622443e-06
3.33809927951e-06
1.61619225495e-06
3.61065265168e-06
1.69642783413e-06
3.89926126821e-06
1.77337638448e-06
4.54762748433e-06
2.04087983276e-06
4.97768773408e-06
2.26212810741e-05
-0.000327584569218
4.29842486461e-05
-0.000425965063887
6.01177874447e-05
-0.000468398546301
7.42508714266e-05
-0.000489706215576
8.60807181131e-05
-0.000500921222872
9.62827470237e-05
-0.000507022150012
0.000105372900695
-0.000510525145452
0.000113690795223
-0.000512541631825
0.000121452428558
-0.00051358266733
0.000128797723624
-0.000513898302181
0.000135813400669
-0.000513607559931
0.000142549932191
-0.00051276516769
0.000149030902843
-0.000511378538648
0.000155259514306
-0.000509422177592
0.000161221993867
-0.000506839751697
0.00016688720901
-0.000503541298839
0.00017220257562
-0.000499385864007
0.000177086883319
-0.000494167898743
0.000181405469823
-0.000487529322876
0.000184908141923
-0.000478785508903
0.000186859532821
-0.000465720194311
0.000186084934377
-0.000445425767406
0.000181400715817
-0.000415955590866
0.000172009257055
-0.000377128951865
0.00015763486648
-0.000330235161881
0.000138449683584
-0.000277304939362
0.000114902390757
-0.000220482837783
8.75116276393e-05
-0.000161645608448
5.63629775631e-05
-0.00010154927191
2.11780838003e-05
-4.2015318088e-05
8.96645031252e-07
1.35980362451e-06
1.89663058502e-06
4.78752685802e-06
2.34777870096e-06
3.8824845312e-06
2.36103011604e-06
3.4211355842e-06
2.17840597922e-06
3.15484525113e-06
1.71263603102e-06
2.92682036939e-06
1.19450467031e-06
2.39804660726e-06
9.43992626774e-07
1.87108213602e-06
4.69925450852e-07
2.84639972507e-06
2.64088665486e-06
3.09556142526e-08
1.87539277635e-06
4.56916262815e-08
2.05477131915e-06
7.33753823001e-08
2.06427487955e-06
1.11409588932e-07
2.05845178777e-06
1.59927593617e-07
2.0587312518e-06
2.10453608034e-07
2.06384563624e-06
2.5968675477e-07
2.06667385675e-06
3.06603461621e-07
2.06569913637e-06
3.29637639687e-07
2.0587461414e-06
3.21474326734e-07
1.99566849337e-06
3.46287177157e-07
1.91263481834e-06
3.82339335695e-07
1.84807355273e-06
4.03956645066e-07
1.87280719782e-06
4.26449486754e-07
1.82668551101e-06
4.85872108418e-07
1.82963047828e-06
5.77479728949e-07
1.83851786067e-06
6.76163403065e-07
1.88082137493e-06
7.60306438327e-07
1.94228113769e-06
8.47388488386e-07
1.97733829016e-06
9.03853663709e-07
2.01860637145e-06
9.47837969075e-07
2.02150257825e-06
9.88173726468e-07
2.00712488622e-06
1.03191908112e-06
1.99439314374e-06
1.07921037504e-06
2.01940306726e-06
1.12781587155e-06
2.06591928159e-06
1.1710630332e-06
2.09227290638e-06
1.21703261718e-06
2.1272762941e-06
1.26402214632e-06
2.17212642191e-06
1.31285432576e-06
2.24431890342e-06
1.36262377504e-06
2.32534527772e-06
1.41927175816e-06
2.41003544979e-06
1.48231700224e-06
2.52801412585e-06
1.55647290148e-06
2.66271127837e-06
1.62409021344e-06
2.79700429333e-06
1.69253607455e-06
3.00645304762e-06
1.80066373017e-06
3.23046321225e-06
1.90901646536e-06
3.50278306199e-06
2.04713995504e-06
3.76186584842e-06
2.05786143289e-06
4.53660188159e-06
2.39636258481e-06
4.6406422343e-06
2.23635342764e-05
-0.000347550523747
4.16008517176e-05
-0.000445201344413
5.75688049164e-05
-0.000484365758501
7.07181316925e-05
-0.000502855036809
8.18194170133e-05
-0.000512022196817
9.15231348463e-05
-0.000516725698875
0.000100289638841
-0.000519291602071
0.000108403526833
-0.000520655559123
0.00011603791234
-0.000521217166279
0.000123302583917
-0.000521163134394
0.000130263328732
-0.000520568502534
0.000136957028018
-0.000519459081839
0.000143398938055
-0.000517820673638
0.00014958750248
-0.000515610964847
0.000155506391119
-0.0005127588586
0.000161122229796
-0.000509157346785
0.000166379460357
-0.000504643296959
0.000171191209447
-0.000498979844792
0.000175410206098
-0.000491748510417
0.000178752163711
-0.000482127657935
0.000180316964671
-0.000467285175268
0.000178746458853
-0.000443855441743
0.000172791919983
-0.000410001215184
0.000161732192909
-0.000366069404301
0.000145458264215
-0.00031396149937
0.000124350180621
-0.000256197467062
9.90409378477e-05
-0.00019517433095
6.99802096472e-05
-0.000132585827707
3.63453783156e-05
-6.79150150142e-05
5.59355481212e-06
-1.12633293117e-05
1.35888260189e-06
5.59459592759e-06
1.5617072455e-06
4.58467969847e-06
1.65544240288e-06
3.78864186964e-06
1.60197594117e-06
3.47444153679e-06
1.42713215965e-06
3.32950547795e-06
1.10907326156e-06
3.24477326386e-06
5.74848849684e-07
2.93209530666e-06
3.16600699404e-07
2.1291931392e-06
1.95701170294e-07
2.96760280655e-06
2.83643969436e-06
6.41123362331e-09
1.86847593848e-06
4.98107315959e-08
2.01100295461e-06
8.49566504112e-08
2.02877510006e-06
1.30589265879e-07
2.01246550648e-06
1.87665265717e-07
2.00129827444e-06
2.46760516963e-07
2.00439013094e-06
3.03550368584e-07
2.00952720673e-06
3.57613509079e-07
2.01129153476e-06
4.07248539433e-07
2.00878335643e-06
4.09455437115e-07
1.99315909166e-06
3.94659129026e-07
1.92714188042e-06
4.1041055604e-07
1.83204646734e-06
4.94599121052e-07
1.78832332671e-06
5.32730865165e-07
1.78824144666e-06
5.7156661193e-07
1.79047040823e-06
6.25510522076e-07
1.78424858544e-06
7.11837877563e-07
1.79417089156e-06
8.08963336709e-07
1.8448381306e-06
9.07264231694e-07
1.87873326138e-06
9.90360354771e-07
1.9352258025e-06
1.0509112212e-06
1.96069826572e-06
1.09950291061e-06
1.95831979771e-06
1.1506617181e-06
1.94305418469e-06
1.2031437555e-06
1.9667821463e-06
1.25642970644e-06
2.01252843544e-06
1.31377427658e-06
2.03487259515e-06
1.36831466202e-06
2.07272345896e-06
1.42098442151e-06
2.11950352154e-06
1.47922434126e-06
2.18618102928e-06
1.54448085172e-06
2.26026877171e-06
1.61782667713e-06
2.33693404664e-06
1.68535131236e-06
2.46080606098e-06
1.77722545161e-06
2.5712263085e-06
1.85463609723e-06
2.72005879117e-06
1.95425069441e-06
2.9073944411e-06
2.06970749832e-06
3.11564506082e-06
2.21275302568e-06
3.36039377494e-06
2.34535360633e-06
3.62959197167e-06
2.37620729653e-06
4.50708613776e-06
2.80183966492e-06
4.21561392288e-06
2.20651227148e-05
-0.000366811468293
4.01499389658e-05
-0.000463284522043
5.49892607351e-05
-0.000499203769528
6.72133580731e-05
-0.000515078075251
7.76441459116e-05
-0.000522452109378
8.68942645355e-05
-0.000525975104415
9.53626036963e-05
-0.00052775935281
0.000103280298325
-0.000528572788801
0.000110782535165
-0.000528719034977
0.000117954033003
-0.000528334362284
0.000124844077539
-0.000527458351499
0.000131479211332
-0.00052609409256
0.000137868424819
-0.000524209815501
0.000144006421878
-0.000521748937903
0.00014987467764
-0.000518627122506
0.000155437294838
-0.000514720002235
0.000160635225994
-0.000509841288446
0.000165374662426
-0.000503719361473
0.00016949363345
-0.000495867578943
0.00017266733058
-0.000485301457776
0.000173791263505
-0.000468409223848
0.000171309061348
-0.000441373351716
0.000163928880898
-0.000402621144607
0.000151035817852
-0.000353176511531
0.000132692388617
-0.000295618413313
0.000109443644488
-0.000232949375423
8.21568824867e-05
-0.000167888417538
5.24998874292e-05
-0.000102929416361
1.38730449781e-05
-2.92883369453e-05
-6.9642122137e-07
3.30634752637e-06
3.63735096211e-07
4.53451199042e-06
8.40064190848e-07
4.10830256319e-06
9.92481272083e-07
3.63610198689e-06
9.91754402728e-07
3.47502011742e-06
9.1740139366e-07
3.40371712885e-06
8.04850514028e-07
3.35713263463e-06
4.83044889538e-07
3.25382224805e-06
2.00450707017e-07
2.41186767443e-06
3.61996234921e-07
2.80574799272e-06
3.19857601717e-06
-2.10783099292e-08
1.88951943036e-06
3.15068053732e-08
1.95816317163e-06
7.93487069322e-08
1.98061518836e-06
1.45076851598e-07
1.94639112493e-06
2.15368166088e-07
1.93065235877e-06
2.83597503419e-07
1.93580195776e-06
3.47252754855e-07
1.94551348765e-06
4.06247072193e-07
1.95194606446e-06
4.61617370216e-07
1.95307903965e-06
5.04568449448e-07
1.94989082196e-06
5.02682391279e-07
1.92873902415e-06
4.75865749162e-07
1.85859104989e-06
5.04991664317e-07
1.75893686688e-06
5.90039976351e-07
1.70291649085e-06
6.68130130536e-07
1.71208835208e-06
7.20055703148e-07
1.73202805847e-06
7.77002910726e-07
1.73693356399e-06
8.57421317647e-07
1.76413618274e-06
9.50807860722e-07
1.7850745727e-06
1.0511855431e-06
1.83459351412e-06
1.14656303328e-06
1.86509599107e-06
1.20827158278e-06
1.89641768338e-06
1.26522204515e-06
1.88595250941e-06
1.32882713482e-06
1.90305902862e-06
1.39462804301e-06
1.94665462181e-06
1.45338691807e-06
1.97608113881e-06
1.51724763043e-06
2.00888554168e-06
1.58089108724e-06
2.05593722367e-06
1.64526143986e-06
2.12196010146e-06
1.72197527141e-06
2.18376637512e-06
1.80485772603e-06
2.25433592026e-06
1.88638856252e-06
2.37963343812e-06
1.96646257975e-06
2.49158433836e-06
2.06545038289e-06
2.62159124027e-06
2.17638113651e-06
2.79708734051e-06
2.2854411498e-06
3.00730533541e-06
2.41758530996e-06
3.22896547471e-06
2.53460308253e-06
3.51358784877e-06
2.58698153216e-06
4.45524643814e-06
3.05246560431e-06
3.75179835402e-06
2.16298097359e-05
-0.000385386139552
3.85929006376e-05
-0.000480245465142
5.23781799867e-05
-0.000512987215613
6.3756961141e-05
-0.00052645524645
7.35811985649e-05
-0.000532274929386
8.24197775764e-05
-0.000534812418169
9.06089990283e-05
-0.000535947467491
9.83313995339e-05
-0.000536294218364
0.00010569086866
-0.000536077683308
0.000112752644257
-0.000535395445695
0.000119553894956
-0.000534259045521
0.000126113802784
-0.000532653554158
0.000132436712052
-0.000530532386566
0.000138514204187
-0.000527826175242
0.000144325556309
-0.000524438297392
0.000149831832187
-0.000520226159798
0.000154969902471
-0.000514979294117
0.000159637606587
-0.000508387042852
0.000163656269868
-0.000499886250073
0.000166653530755
-0.000488298757145
0.000167273432301
-0.000469029173769
0.00016375228895
-0.000437852266034
0.000154788373389
-0.000393657317232
0.000139917902605
-0.000338306208947
0.000119404290371
-0.000275105297158
9.38216908344e-05
-0.000207367333357
6.30566095239e-05
-0.000137123849168
2.60026682948e-05
-6.58760171072e-05
-4.6540565808e-07
-2.82006483573e-06
-7.01943342296e-07
3.54298992464e-06
3.96853443185e-08
3.79288693779e-06
3.75470933094e-07
3.77242715806e-06
5.07374455714e-07
3.50407243704e-06
5.43786586966e-07
3.43847306568e-06
5.37218598338e-07
3.41015144019e-06
5.08469164885e-07
3.3857999622e-06
4.16005103121e-07
3.3461640104e-06
1.8723718866e-07
2.64045076303e-06
1.42919239917e-07
2.85031462281e-06
3.34140386053e-06
-3.65124646201e-08
1.92554297774e-06
3.29845809144e-09
1.91800788105e-06
6.88095778475e-08
1.91475978632e-06
1.54288443821e-07
1.86057294898e-06
2.32700648446e-07
1.8518946994e-06
3.07918948028e-07
1.86023295549e-06
3.79696428662e-07
1.87338125243e-06
4.46773363033e-07
1.88451783467e-06
5.08801524618e-07
1.89070965377e-06
5.6736877763e-07
1.89100194949e-06
6.10538291531e-07
1.88526940349e-06
6.09829469909e-07
1.8590275358e-06
5.85046618015e-07
1.78346163784e-06
6.11182801552e-07
1.6765314105e-06
7.00426796424e-07
1.62259181869e-06
7.93924129896e-07
1.63826666424e-06
8.74765092011e-07
1.65582550141e-06
9.47569216753e-07
1.69107053519e-06
1.01940586257e-06
1.71299048711e-06
1.10836987816e-06
1.74540251464e-06
1.21176114837e-06
1.76150195479e-06
1.30475681823e-06
1.80325103357e-06
1.37338157981e-06
1.81718698439e-06
1.44301496901e-06
1.83332492905e-06
1.51795589966e-06
1.87164985577e-06
1.59326010534e-06
1.9007618195e-06
1.66126909984e-06
1.94090940361e-06
1.72731506705e-06
1.98998542188e-06
1.80568514463e-06
2.04374249e-06
1.88744812544e-06
2.10221957244e-06
1.95489325122e-06
2.18717025404e-06
2.0552173515e-06
2.27966227726e-06
2.14801430607e-06
2.39922135511e-06
2.24379049735e-06
2.52633856695e-06
2.34047865765e-06
2.7010428775e-06
2.45969800474e-06
2.88881389311e-06
2.5531153311e-06
3.13639311122e-06
2.66903125247e-06
3.39845170334e-06
2.71914486364e-06
4.40648163517e-06
3.0730365587e-06
3.39944630692e-06
2.09998176148e-05
-0.000403309772817
3.69104641784e-05
-0.000496153507723
4.97418021792e-05
-0.000525816227498
6.03696607023e-05
-0.000537080994512
6.96518097866e-05
-0.000541555136449
7.81142102053e-05
-0.000543273052525
8.60351731336e-05
-0.000543866823761
9.35564212717e-05
-0.000543814044802
0.00010075814221
-0.000543278152331
0.000107691374657
-0.000542327613911
0.000114385103446
-0.00054095187427
0.000120853548887
-0.000539121267342
0.000127097643497
-0.000536775887398
0.000133106104295
-0.000533834174747
0.000138855796969
-0.000530187633771
0.000144304075151
-0.000525674178875
0.000149383184359
-0.000520058220682
0.000153981083773
-0.000512984824457
0.000157900567956
-0.000503805670867
0.000160714057291
-0.000491112213767
0.000160757957437
-0.000469073075624
0.000156060111184
-0.000433154434077
0.000145353137613
-0.000382950409162
0.00012837034085
-0.000321323654182
0.000105609511953
-0.000252344931734
7.80060079489e-05
-0.000179764375792
4.68107975564e-05
-0.000105928996304
6.75819058382e-06
-2.58234223522e-05
-3.46099672575e-08
3.97280385951e-06
-2.48496144328e-07
3.75690344881e-06
-9.50040835444e-08
3.63934446409e-06
8.48770868039e-08
3.59244561646e-06
1.75182705903e-07
3.41364511534e-06
2.24535009633e-07
3.38900480912e-06
2.49491093614e-07
3.3850968921e-06
2.60549075948e-07
3.37462093773e-06
2.76206226554e-07
3.33043272941e-06
1.19494619599e-07
2.79723961631e-06
-3.72696778193e-08
3.00688351028e-06
3.30424217521e-06
-7.98264336562e-09
1.93344894764e-06
1.07897046283e-08
1.89897204686e-06
8.68296848402e-08
1.83842190189e-06
1.66193450987e-07
1.78088969037e-06
2.3887877826e-07
1.7788813084e-06
3.14409402618e-07
1.78436653196e-06
3.95118291104e-07
1.79233154372e-06
4.73922444601e-07
1.80536896378e-06
5.47768715084e-07
1.81652261818e-06
6.16777674339e-07
1.82166398688e-06
6.81490970183e-07
1.82024907756e-06
7.28337308549e-07
1.81189227708e-06
7.3621393324e-07
1.77532026766e-06
7.24727809323e-07
1.68777573017e-06
7.47861683911e-07
1.59922505396e-06
8.40414784809e-07
1.54547880944e-06
9.40172881997e-07
1.55582895605e-06
1.03582349804e-06
1.59517997954e-06
1.12582277642e-06
1.62276370996e-06
1.21065579703e-06
1.66036108343e-06
1.29480331799e-06
1.67717200046e-06
1.39150283452e-06
1.70639111624e-06
1.47866984162e-06
1.72989288564e-06
1.55816136533e-06
1.75374090044e-06
1.64187744791e-06
1.78788136308e-06
1.72150667564e-06
1.82112087967e-06
1.79853181674e-06
1.86392319938e-06
1.8715809301e-06
1.91702621058e-06
1.95014202494e-06
1.96532420698e-06
2.034451356e-06
2.01810501424e-06
2.1224033246e-06
2.099478962e-06
2.2180780892e-06
2.18431603466e-06
2.33482563984e-06
2.28287924953e-06
2.43874866082e-06
2.42292427504e-06
2.53630868878e-06
2.60408606388e-06
2.634865455e-06
2.79099461491e-06
2.71331775608e-06
3.05875967073e-06
2.77758182438e-06
3.33524131264e-06
2.75422041433e-06
4.43108865064e-06
2.85712411297e-06
3.29815371912e-06
2.01859565928e-05
-0.00042063506412
3.51294835167e-05
-0.000511094214451
4.71100831928e-05
-0.000537794262711
5.70805331207e-05
-0.000547049051362
6.5876388968e-05
-0.000550348766503
7.39860006779e-05
-0.000551380597661
8.16393161898e-05
-0.000551518260937
8.89470593119e-05
-0.000551120093507
9.59729465629e-05
-0.000550302553958
0.000102758106665
-0.00054911148226
0.000109326235752
-0.00054751891524
0.000115688352821
-0.000545482473841
0.000121842797145
-0.000542929594828
0.000127775557634
-0.000539766342151
0.000133460746446
-0.000535872363914
0.00013885136843
-0.000531064450429
0.000143874601104
-0.000525081199503
0.000148406939542
-0.000517516986923
0.000152231154614
-0.00050762976808
0.000154855789375
-0.0004937367843
0.000154241726523
-0.000468458971407
0.000148216587963
-0.000427129291883
0.000135608924424
-0.000370342813964
0.000116411466745
-0.000302126567756
9.12431039827e-05
-0.000227176875027
6.03328121387e-05
-0.000148854231054
2.29991394196e-05
-6.85956624557e-05
-1.57230807855e-06
-1.25193022042e-06
-9.28118775187e-07
3.3286329967e-06
-5.25662228203e-07
3.35441659704e-06
-3.21164970278e-07
3.43476787637e-06
-1.3130814264e-07
3.40248012323e-06
-4.61907215875e-08
3.32841336345e-06
1.31606272704e-08
3.32954544523e-06
5.50546765812e-08
3.34310793229e-06
9.35970719993e-08
3.33600388183e-06
1.69298169324e-07
3.25463379957e-06
3.27200153533e-08
2.93366620058e-06
-1.27961860573e-07
3.16774220778e-06
3.17621844202e-06
3.78336122835e-08
1.89511109964e-06
6.02534860002e-08
1.87620584906e-06
1.17332439076e-07
1.78101774983e-06
1.83675254524e-07
1.71423596135e-06
2.51872453311e-07
1.71036411978e-06
3.24113490037e-07
1.7118009767e-06
4.03246286408e-07
1.71286905958e-06
4.88638416941e-07
1.71964408776e-06
5.75373720986e-07
1.72945153628e-06
6.57020716493e-07
1.73968747324e-06
7.33510499941e-07
1.74344245005e-06
8.05133528361e-07
1.7399745781e-06
8.52835471496e-07
1.72734788894e-06
8.67040885096e-07
1.67332435142e-06
8.77379356191e-07
1.58866109951e-06
9.27897054059e-07
1.49474718732e-06
1.00030642585e-06
1.48320104524e-06
1.1013260264e-06
1.49394662197e-06
1.2038853308e-06
1.52000143343e-06
1.30259749185e-06
1.56145877752e-06
1.39218600026e-06
1.58740851313e-06
1.48428683177e-06
1.61414137598e-06
1.57945378904e-06
1.63460678271e-06
1.66614004903e-06
1.66696521219e-06
1.75496085994e-06
1.69900432839e-06
1.83966197998e-06
1.73640308228e-06
1.91578793746e-06
1.78781988607e-06
2.00304554935e-06
1.82983131203e-06
2.10299210739e-06
1.86548277276e-06
2.19456471702e-06
1.92668685187e-06
2.29553608972e-06
1.99871386263e-06
2.40833175076e-06
2.07178509012e-06
2.51071945824e-06
2.18082834579e-06
2.61863189008e-06
2.31542885817e-06
2.71612110009e-06
2.5071252925e-06
2.78274172695e-06
2.72500140832e-06
2.85643922135e-06
2.98584484084e-06
2.89399145359e-06
3.29864650953e-06
2.88763925694e-06
4.43848105267e-06
2.54237524789e-06
3.64522578387e-06
1.93166880465e-05
-0.00043740642159
3.33650037046e-05
-0.000525139892689
4.45566088123e-05
-0.000548983399666
5.39316204964e-05
-0.000556421728281
6.22747018063e-05
-0.000558689643834
7.00378628081e-05
-0.000559141707921
7.74129723519e-05
-0.000558891482317
8.44892196676e-05
-0.000558194640624
9.13195300998e-05
-0.000557131350239
9.79376491643e-05
-0.000555728286365
0.000104363679274
-0.000553943813756
0.000110606410515
-0.000551724257087
0.000116662223373
-0.000548984619184
0.000122514512799
-0.000545617995491
0.000128134406141
-0.000541491748747
0.000133470043447
-0.000536399697495
0.000138443298168
-0.000530054160657
0.000142917608735
-0.000521991087438
0.000146654800434
-0.000511366815933
0.000149090070384
-0.000496171954145
0.000147726700527
-0.000467095536425
0.000140208803211
-0.000419611372264
0.000125515641157
-0.000355649767712
0.000103951427115
-0.000280562456649
7.66397020338e-05
-0.000199865588522
4.56163698926e-05
-0.000117831058932
4.32077723928e-06
-2.73000334494e-05
-5.90896224212e-07
3.65972374036e-06
-6.57440984771e-07
3.39513697293e-06
-5.88058837326e-07
3.28496629792e-06
-4.34233051014e-07
3.28085185533e-06
-2.60074199403e-07
3.22821651481e-06
-1.81303766951e-07
3.24953466559e-06
-1.17336126968e-07
3.26548084319e-06
-6.89095447424e-08
3.29459422735e-06
-3.23579253885e-08
3.29935301017e-06
5.7262716079e-08
3.16493631497e-06
-2.15726702637e-08
3.01253894535e-06
-1.25527825801e-07
3.27154225017e-06
3.05075032151e-06
6.31234034e-08
1.83186566265e-06
1.07363091142e-07
1.83168013412e-06
1.35353167211e-07
1.75274122765e-06
2.0341590796e-07
1.64586434144e-06
2.75933459639e-07
1.63753028232e-06
3.50059846559e-07
1.63735450304e-06
4.24746682806e-07
1.6378624901e-06
5.05636549127e-07
1.6384326007e-06
5.93996257196e-07
1.64076916364e-06
6.87237286488e-07
1.64612405108e-06
7.75470079315e-07
1.65489476853e-06
8.58901747676e-07
1.65624298464e-06
9.35948739267e-07
1.6500238419e-06
9.75122717263e-07
1.63390221408e-06
9.93905009361e-07
1.56965824569e-06
1.02333693659e-06
1.46511059188e-06
1.09733772326e-06
1.40900525801e-06
1.18196219435e-06
1.40913311389e-06
1.27195968286e-06
1.42981854268e-06
1.38589309189e-06
1.44734788176e-06
1.4885776479e-06
1.48456539797e-06
1.58142762773e-06
1.52115358168e-06
1.67316705012e-06
1.54275067984e-06
1.76942599968e-06
1.57061671809e-06
1.8649716629e-06
1.6033991629e-06
1.94884601172e-06
1.65249755618e-06
2.04809046725e-06
1.68857393369e-06
2.15487509439e-06
1.72307797806e-06
2.25315728593e-06
1.76726300606e-06
2.35459818155e-06
1.82534395647e-06
2.46399644165e-06
1.8894552212e-06
2.57118280511e-06
1.96478376119e-06
2.67142501328e-06
2.08083595752e-06
2.7817964349e-06
2.20537639812e-06
2.89241038706e-06
2.39692625222e-06
2.99015099677e-06
2.62780721938e-06
3.07422662863e-06
2.90241720803e-06
3.07771792555e-06
3.29595234197e-06
3.21046325995e-06
4.30686723526e-06
2.42279023539e-06
4.43421959465e-06
1.87581746307e-05
-0.000453738897025
3.1825401389e-05
-0.000538204837819
4.21803404642e-05
-0.000559336219067
5.09630372523e-05
-0.000565202416007
5.88574482819e-05
-0.000566582154007
6.62639815173e-05
-0.000566546463355
7.33413819867e-05
-0.000565967244642
8.01646554083e-05
-0.000565016424584
8.67794518543e-05
-0.00056374481622
9.32130452511e-05
-0.000562160705148
9.94824178042e-05
-0.000560212170055
0.000105594552741
-0.000557835521445
0.000111544394376
-0.000554933732676
0.000117313156042
-0.000551386154518
0.000122868935682
-0.000547047045505
0.000128154830161
-0.000541685210662
0.00013308739227
-0.00053498643598
0.00013751553454
-0.000526419014207
0.000141179984602
-0.000515031113955
0.000143432188545
-0.000498424043167
0.000141221768316
-0.000464885036135
0.000132051524839
-0.000410441082667
0.000115111823656
-0.000338710147425
9.08406929931e-05
-0.000256291715605
5.97439329072e-05
-0.000168768749347
2.29123312627e-05
-8.10000106829e-05
-2.2257075482e-06
-2.16205704406e-06
-1.39120987465e-06
2.82517898343e-06
-9.50813582878e-07
2.95467811007e-06
-7.67127456031e-07
3.10119998356e-06
-5.53777845552e-07
3.06740834222e-06
-3.8440915862e-07
3.05874553598e-06
-2.91773586947e-07
3.15679247326e-06
-2.16345169859e-07
3.18995193832e-06
-1.49377840849e-07
3.22753776651e-06
-9.29607562798e-08
3.24285847921e-06
-7.14737651099e-08
3.14335635016e-06
-1.03166314296e-07
3.04409805119e-06
-1.39217831594e-07
3.3077024723e-06
2.91147820505e-06
7.04989674671e-08
1.76086601855e-06
1.29823020722e-07
1.77201411961e-06
1.55453401254e-07
1.72677040554e-06
2.2795527212e-07
1.57305671469e-06
3.04503693595e-07
1.56067277202e-06
3.81558239556e-07
1.55998860086e-06
4.5866041789e-07
1.56044899604e-06
5.36862600162e-07
1.55991966007e-06
6.19259275522e-07
1.55806116135e-06
7.10649948918e-07
1.55442209929e-06
8.09204736594e-07
1.55603064435e-06
9.07137357796e-07
1.55801019974e-06
1.00113180224e-06
1.55574665986e-06
1.08925306626e-06
1.5455231661e-06
1.13867887052e-06
1.52000215147e-06
1.14388647168e-06
1.45970151656e-06
1.19048117233e-06
1.3622301112e-06
1.27942420651e-06
1.32001803007e-06
1.36681696979e-06
1.34225830753e-06
1.45932739537e-06
1.35468337082e-06
1.55349658926e-06
1.39025191836e-06
1.66957601017e-06
1.40494221415e-06
1.77437360563e-06
1.43784061699e-06
1.86681349384e-06
1.47808443092e-06
1.96101023386e-06
1.5091296684e-06
2.07315663006e-06
1.54029864426e-06
2.17503738918e-06
1.58666250729e-06
2.27266540192e-06
1.62543429164e-06
2.3879742194e-06
1.65196005445e-06
2.498243658e-06
1.71510491636e-06
2.60678016402e-06
1.78097558181e-06
2.70941076359e-06
1.8622538935e-06
2.84172050466e-06
1.94866892167e-06
2.97825860264e-06
2.06906670375e-06
3.11556982489e-06
2.25993039552e-06
3.2420724795e-06
2.50170810639e-06
3.35158733427e-06
2.79342178263e-06
3.4285309383e-06
3.21970782292e-06
3.66577345163e-06
4.0704027589e-06
2.98928433602e-06
5.11258247035e-06
1.86107421571e-05
-0.000469358572734
3.0579578471e-05
-0.000550172057377
4.00245153703e-05
-0.000568779674788
4.81857411922e-05
-0.000573362250748
5.56170642829e-05
-0.000574012178353
6.26479632075e-05
-0.000573576145818
6.94044104308e-05
-0.000572722568134
7.59524470797e-05
-0.0005715634255
8.23326460944e-05
-0.000570124074388
8.85658542412e-05
-0.00056839306497
9.46657597033e-05
-0.000566311321108
0.000100637568071
-0.0005638066682
0.000106475383491
-0.000560770976203
0.000112158958616
-0.00055706924669
0.000117653640789
-0.000552541326513
0.000122897702183
-0.000546928952543
0.000127802670491
-0.000539891147869
0.000132201894393
-0.000530818052177
0.000135816089877
-0.000518645153966
0.000137901157898
-0.000500508997307
0.000134736860333
-0.000461720638125
0.000123748847581
-0.000399453061841
0.000104447229297
-0.000319408652769
7.7694708597e-05
-0.000229539321556
4.49995180058e-05
-0.000136074282833
4.78549797314e-06
-4.07859898909e-05
-7.12633940078e-07
3.33605728263e-06
-9.39559404821e-07
3.05206258917e-06
-9.49595767108e-07
2.96464949447e-06
-8.35187099651e-07
2.98670929744e-06
-6.7494383036e-07
2.90707283142e-06
-5.21068624118e-07
2.90476570435e-06
-4.26294840178e-07
3.061909172e-06
-3.51587834382e-07
3.11514068519e-06
-2.80243347045e-07
3.15609495848e-06
-2.09655522399e-07
3.17216438752e-06
-1.91171932918e-07
3.12478350282e-06
-1.40865545893e-07
2.99379431113e-06
-8.56288941052e-08
3.25231520151e-06
2.82588743304e-06
7.11892976904e-08
1.68952386746e-06
1.4111102742e-07
1.701773394e-06
1.83339687749e-07
1.68424220881e-06
2.55842684074e-07
1.50025255191e-06
3.34915792266e-07
1.48129222989e-06
4.1452639905e-07
1.48007101769e-06
4.94056065356e-07
1.48061483335e-06
5.74495807709e-07
1.4791749041e-06
6.57475816102e-07
1.47477626733e-06
7.43885328055e-07
1.46770607694e-06
8.40576278279e-07
1.45903540743e-06
9.4641468744e-07
1.45187095515e-06
1.05685604691e-06
1.44501888184e-06
1.16297413664e-06
1.43913984362e-06
1.25513920923e-06
1.42760029011e-06
1.30802688528e-06
1.4066074602e-06
1.32298707415e-06
1.34709443286e-06
1.36969693061e-06
1.27315172347e-06
1.45878252944e-06
1.25302575979e-06
1.55376809817e-06
1.25955739693e-06
1.65061773919e-06
1.29326884264e-06
1.74046013092e-06
1.31498036591e-06
1.83818609835e-06
1.34000686244e-06
1.94397024251e-06
1.37220281322e-06
2.05699906413e-06
1.39601521873e-06
2.15928380296e-06
1.43794365243e-06
2.26814298745e-06
1.47773804927e-06
2.38747839367e-06
1.50604379842e-06
2.49429099226e-06
1.54509970437e-06
2.60296800548e-06
1.60639130846e-06
2.73770152786e-06
1.64622757076e-06
2.87849161692e-06
1.72147567777e-06
3.02576294396e-06
1.80146806934e-06
3.16210553292e-06
1.93284146905e-06
3.31713996036e-06
2.10507624137e-06
3.49670670135e-06
2.32239665756e-06
3.68162101087e-06
2.60886582294e-06
3.88644154006e-06
3.0153661621e-06
3.96805321938e-06
3.98965880786e-06
3.94709207256e-06
5.13437907246e-06
1.87862229466e-05
-0.000484196177569
2.94965779077e-05
-0.000560881459677
3.80378243693e-05
-0.000577320138598
4.55752289124e-05
-0.000580898964325
5.25303616017e-05
-0.00058096667312
5.91659650791e-05
-0.000580211161785
6.55788918419e-05
-0.000579134935775
7.18303653406e-05
-0.000577814373171
7.79576835702e-05
-0.00057625088728
8.39755640129e-05
-0.000574410468361
8.98941916688e-05
-0.000572229497296
9.57168933763e-05
-0.000569628952388
0.000101437530032
-0.000566491232672
0.000107035417259
-0.000562666796659
0.000112473674254
-0.000557979294999
0.000117686426422
-0.000552141457776
0.000122580556857
-0.000544785088774
0.000126973415213
-0.000535210740377
0.000130568495993
-0.00052224011373
0.000132516677513
-0.000502457061884
0.000128296500337
-0.000457500380503
0.000115334443754
-0.000386491015532
9.34197714053e-05
-0.000297494187055
6.35420163047e-05
-0.000199661903345
2.75980440059e-05
-0.000100130425521
-2.14271724326e-06
-1.10452507837e-05
-1.59843239554e-06
2.79179561329e-06
-1.29402890782e-06
2.74763254614e-06
-1.13827543037e-06
2.80883406946e-06
-9.6010617395e-07
2.80845877398e-06
-8.13410038144e-07
2.76028249058e-06
-6.82188837315e-07
2.77344057073e-06
-5.93035059552e-07
2.97264118291e-06
-5.14849071071e-07
3.03684287059e-06
-4.36547877025e-07
3.07769179835e-06
-3.58413835494e-07
3.09393778104e-06
-2.52145768353e-07
3.01841796919e-06
-1.15978798348e-07
2.85749489919e-06
4.25379690945e-08
3.09387077513e-06
2.86836996608e-06
6.87692933608e-08
1.62025165978e-06
1.56350416496e-07
1.61385098798e-06
2.16906121847e-07
1.62333443995e-06
2.82086489013e-07
1.43476742973e-06
3.66113175953e-07
1.39696676605e-06
4.47994375128e-07
1.3978936038e-06
5.28530294379e-07
1.3997809569e-06
6.10307773144e-07
1.39710052622e-06
6.95671059518e-07
1.38911096864e-06
7.8614377569e-07
1.37693200965e-06
8.82523926926e-07
1.36235222259e-06
9.86804617211e-07
1.34729497242e-06
1.10016527006e-06
1.33137300835e-06
1.21970725519e-06
1.3193330396e-06
1.33795484384e-06
1.30911448966e-06
1.44293696073e-06
1.30141976673e-06
1.49536496118e-06
1.29448929604e-06
1.51134848567e-06
1.257013231e-06
1.56271312629e-06
1.20152525805e-06
1.63525737667e-06
1.18688931334e-06
1.71965891372e-06
1.20875275924e-06
1.81065117528e-06
1.22387931449e-06
1.91631160367e-06
1.23424279458e-06
2.02592353791e-06
1.26249141786e-06
2.13906811323e-06
1.28278111285e-06
2.25225262686e-06
1.3246680616e-06
2.35767628231e-06
1.37222368838e-06
2.47079071684e-06
1.39283016313e-06
2.60227378913e-06
1.41351690914e-06
2.74866085163e-06
1.45990566509e-06
2.87695126079e-06
1.51785004434e-06
3.01269388164e-06
1.58566814498e-06
3.15978604159e-06
1.65433194834e-06
3.32658913467e-06
1.76602998967e-06
3.52291784616e-06
1.90880120037e-06
3.75631634861e-06
2.08904106098e-06
4.01399156585e-06
2.3512823309e-06
4.26803347038e-06
2.76145817435e-06
4.44202187597e-06
3.81634020374e-06
4.848734612e-06
4.72863683518e-06
1.91026960194e-05
-0.00049844957306
2.85198196985e-05
-0.000570298211322
3.6186103737e-05
-0.000584986229174
4.31051632768e-05
-0.000587817938973
4.95707284126e-05
-0.000587432218054
5.57916563309e-05
-0.00058643208792
6.18402583491e-05
-0.000585183540692
6.77748945391e-05
-0.000583748984904
7.36309783283e-05
-0.000582106920576
7.94183463621e-05
-0.000580197745997
8.51439679722e-05
-0.000577955000399
9.08092093559e-05
-0.000575294048117
9.64081759577e-05
-0.000572090041935
0.000101920894637
-0.000568179354881
0.000107308974244
-0.000563367218657
0.000112503464817
-0.00055733581564
0.000117406862646
-0.00054968835576
0.000121819756021
-0.000539623544546
0.000125430331844
-0.000525850593948
0.000127274632341
-0.000504301285214
0.000121886287665
-0.000452112012821
0.000106856817113
-0.000371461631948
8.23934185594e-05
-0.000273031019852
4.97972753054e-05
-0.000167066138215
1.17142243488e-05
-6.20474132832e-05
-1.40272965827e-06
2.07175508475e-06
-1.43671000147e-06
2.82578061235e-06
-1.38143408679e-06
2.69231225338e-06
-1.26208160787e-06
2.68941107847e-06
-1.09286207032e-06
2.63915436592e-06
-9.56122529588e-07
2.62344558841e-06
-8.81659734556e-07
2.69886958413e-06
-7.75796205645e-07
2.86666347719e-06
-6.71077295616e-07
2.93201466092e-06
-5.60231358804e-07
2.966743696e-06
-4.44555418968e-07
2.97816129653e-06
-2.87186994132e-07
2.86095931532e-06
-1.67058280996e-07
2.73735244828e-06
-3.23265890568e-09
2.92990831232e-06
2.86515828719e-06
6.63886880239e-08
1.55368317373e-06
1.75521480745e-07
1.50438610664e-06
2.4776865176e-07
1.55078096637e-06
3.13106591263e-07
1.36912563711e-06
4.03002046129e-07
1.30677944838e-06
4.84217598716e-07
1.31639240276e-06
5.61897780711e-07
1.32181893643e-06
6.42153583528e-07
1.31655666122e-06
7.29231272877e-07
1.3017430512e-06
8.24846705399e-07
1.28102276426e-06
9.28728150382e-07
1.2581805553e-06
1.03994688632e-06
1.23579115608e-06
1.15534143054e-06
1.21570706503e-06
1.27520470046e-06
1.19921759283e-06
1.39885791628e-06
1.18523501405e-06
1.52077220883e-06
1.17930568163e-06
1.62848255508e-06
1.18660343758e-06
1.69244559412e-06
1.19290084355e-06
1.71505625045e-06
1.17878721305e-06
1.74942422579e-06
1.15240699094e-06
1.82418037978e-06
1.13388917522e-06
1.91855957761e-06
1.1293994137e-06
2.00981841553e-06
1.14288446442e-06
2.10932199638e-06
1.16289378306e-06
2.21649870831e-06
1.17550735624e-06
2.33612896269e-06
1.20493609937e-06
2.46112841737e-06
1.24710494683e-06
2.58870965505e-06
1.26512280788e-06
2.70604358306e-06
1.29604411408e-06
2.83010239852e-06
1.33570371403e-06
2.98770427648e-06
1.36009854115e-06
3.1503574995e-06
1.42286491191e-06
3.29708875669e-06
1.50745781538e-06
3.46337267691e-06
1.59962716468e-06
3.67776153101e-06
1.69422645829e-06
3.93129783472e-06
1.83535592297e-06
4.23613380653e-06
2.04617200446e-06
4.57500412079e-06
2.42291636681e-06
4.99818840644e-06
3.39326243063e-06
5.8372372707e-06
3.88958974556e-06
1.95554753984e-05
-0.000512167364296
2.76421141976e-05
-0.00057838491872
3.44571329975e-05
-0.00059180152271
4.07526505319e-05
-0.000594113835377
4.67098582187e-05
-0.000593389848255
5.2496088751e-05
-0.000592218756701
5.81612326429e-05
-0.000590849094617
6.37594593069e-05
-0.000589347577048
6.93251496369e-05
-0.000587672903133
7.48656319809e-05
-0.000585738449389
8.03858286375e-05
-0.000583475339881
8.58852262784e-05
-0.000580793526385
9.1358503259e-05
-0.000577563345052
9.67875322317e-05
-0.000573608372783
0.000102133269459
-0.000568712926202
0.000107325345347
-0.000562527839689
0.000112261941757
-0.000554624919983
0.000116726212521
-0.000544087759986
0.0001203897994
-0.000529514148323
0.000122153237033
-0.000506064700294
0.000115388723618
-0.000445347517921
9.79959791287e-05
-0.000354069092423
7.10610357318e-05
-0.00024609639935
3.82483748037e-05
-0.000134253650065
-8.3188111194e-07
-2.29670222293e-05
-1.7844770189e-06
3.02439864322e-06
-1.66101867655e-06
2.70230610139e-06
-1.55694230966e-06
2.58817767424e-06
-1.38800374213e-06
2.52039422499e-06
-1.25341890399e-06
2.50447887455e-06
-1.13530089193e-06
2.50522831375e-06
-1.06705276881e-06
2.63051334067e-06
-9.36786761591e-07
2.73628792172e-06
-8.01680123595e-07
2.79680311254e-06
-6.63705582852e-07
2.82867398791e-06
-5.05977790668e-07
2.82034330658e-06
-3.01192118702e-07
2.65608606042e-06
-2.25011018981e-07
2.6610519716e-06
-1.23405942113e-07
2.82833516642e-06
2.741703461e-06
7.26602664042e-08
1.48053481326e-06
1.88598519154e-07
1.38811557783e-06
2.69416887946e-07
1.46958030299e-06
3.65675797864e-07
1.27254785059e-06
4.53359990214e-07
1.21880199496e-06
5.30129561438e-07
1.23933198563e-06
6.02328588683e-07
1.24932483922e-06
6.82127114779e-07
1.2364584548e-06
7.74856218851e-07
1.20871137765e-06
8.80406224271e-07
1.17517281579e-06
9.95998052939e-07
1.14229832308e-06
1.11750318547e-06
1.11401062717e-06
1.24038734228e-06
1.09256689274e-06
1.36272028713e-06
1.07665057437e-06
1.48227634756e-06
1.06546977015e-06
1.59255759871e-06
1.06884008304e-06
1.69364361423e-06
1.0853560599e-06
1.79516302326e-06
1.09124064174e-06
1.88468947496e-06
1.0891357894e-06
1.9447974286e-06
1.09218700504e-06
1.98962177084e-06
1.08896476463e-06
2.04447191043e-06
1.07445489173e-06
2.11862845123e-06
1.06864230393e-06
2.21349176522e-06
1.06794355315e-06
2.31396592386e-06
1.07494194751e-06
2.41741426072e-06
1.10137914405e-06
2.52112942722e-06
1.14326918617e-06
2.64043527621e-06
1.1456738218e-06
2.79402820028e-06
1.14229320601e-06
2.9615243969e-06
1.1680207458e-06
3.09682855273e-06
1.22458628234e-06
3.22461112413e-06
1.29485059486e-06
3.38254239063e-06
1.34927986399e-06
3.57504845288e-06
1.40680924599e-06
3.78912880254e-06
1.4798660074e-06
4.06103574861e-06
1.56292841654e-06
4.39624193611e-06
1.71060920126e-06
4.79310891171e-06
2.02552691297e-06
5.44512106044e-06
2.7408621817e-06
7.2045800749e-06
2.13060610378e-06
2.03274527986e-05
-0.000525290493541
2.68317770774e-05
-0.000584889390262
3.28075718671e-05
-0.000597777709378
3.84750007899e-05
-0.000599781783398
4.3906740067e-05
-0.000598822177223
4.92411542449e-05
-0.00059755378874
5.45072293591e-05
-0.000596115781586
5.97514917425e-05
-0.000594592405839
6.5007540384e-05
-0.000592929453016
7.02836188437e-05
-0.000591014942298
7.55848259497e-05
-0.000588776877471
8.09094280452e-05
-0.00058611837393
8.6253010614e-05
-0.000582907103779
9.16004553854e-05
-0.000578955938082
9.69132339232e-05
-0.000574025777886
0.00010212193636
-0.00056773660379
0.000107120695427
-0.000559623699679
0.000111675679511
-0.00054864278831
0.000115444181937
-0.000533282662692
0.000117179740776
-0.000507800299339
0.000108803428151
-0.000436971322215
8.84525578267e-05
-0.000333718552253
5.71973050644e-05
-0.000214841398471
1.94147290056e-05
-9.647098365e-05
-2.78316733091e-06
-7.69069242206e-07
-2.17725656165e-06
2.41851558221e-06
-1.87309891649e-06
2.39811023728e-06
-1.68762129735e-06
2.40262774465e-06
-1.52764483735e-06
2.36033163685e-06
-1.39938689634e-06
2.37612701331e-06
-1.29917035821e-06
2.4049125236e-06
-1.19433936426e-06
2.52557919029e-06
-1.03920738629e-06
2.58105489474e-06
-8.76249383722e-07
2.63375033617e-06
-7.06621371111e-07
2.65895731428e-06
-5.07367496683e-07
2.62100407125e-06
-3.35726092088e-07
2.48436111806e-06
-2.78337041197e-07
2.60363215444e-06
-1.87438648995e-07
2.73732376566e-06
2.55427082246e-06
1.04366260824e-07
1.37589508225e-06
1.97140411917e-07
1.29495375694e-06
2.98520544429e-07
1.36784044446e-06
4.3398714311e-07
1.13673841547e-06
5.22362505078e-07
1.13008324631e-06
6.1214967304e-07
1.14920107871e-06
7.04349497182e-07
1.15677187339e-06
8.1378564178e-07
1.12666459299e-06
9.3905954369e-07
1.08308574649e-06
1.07033292538e-06
1.04356765888e-06
1.19836128384e-06
1.01396407976e-06
1.31603938676e-06
9.96056002786e-07
1.41898634524e-06
9.89373248584e-07
1.50691358741e-06
9.885059499e-07
1.58604222261e-06
9.86149663154e-07
1.67032951224e-06
9.84381977293e-07
1.765904864e-06
9.89627675414e-07
1.86462670978e-06
9.92383609984e-07
1.96243660655e-06
9.91207327731e-07
2.06151330858e-06
9.9300611663e-07
2.14626505861e-06
1.00411897555e-06
2.20789665093e-06
1.01274200921e-06
2.25491230094e-06
1.02154918705e-06
2.31038070257e-06
1.01239882101e-06
2.38166275443e-06
1.00357261549e-06
2.48507158702e-06
9.97870945343e-07
2.6239460239e-06
1.00426881942e-06
2.76899963302e-06
1.00047870681e-06
2.89495060606e-06
1.01616527302e-06
3.0131755125e-06
1.04958832354e-06
3.13414820256e-06
1.10336142282e-06
3.28586607279e-06
1.14283348686e-06
3.45896070755e-06
1.17581000799e-06
3.62950588913e-06
1.23590270867e-06
3.81965927541e-06
1.28910753806e-06
4.05644391185e-06
1.32552779649e-06
4.37136319833e-06
1.39495456892e-06
4.84399127778e-06
1.55250347798e-06
5.79891337329e-06
1.78612120649e-06
9.23311887868e-06
-1.30432197776e-06
2.14475019841e-05
-0.000537504786682
2.60351349219e-05
-0.000589477062215
3.11754321913e-05
-0.00060291837082
3.62113894528e-05
-0.000604818286442
4.11071545647e-05
-0.000603718593667
4.59785626272e-05
-0.000602425896224
5.08350670777e-05
-0.000600972988661
5.57114276977e-05
-0.000599469435799
6.06400562571e-05
-0.000597858683939
6.56337257528e-05
-0.000596009134147
7.07009173805e-05
-0.000593844499627
7.58402839152e-05
-0.000591258086535
8.10491048603e-05
-0.000588116192792
8.63166226253e-05
-0.000584223658587
9.16066032612e-05
-0.00057931592069
9.68543414182e-05
-0.00057298445171
0.000101950250232
-0.000564719723799
0.000106644838255
-0.000553337438837
0.000110584639695
-0.000537222548085
0.000112381267475
-0.0005095970073
0.000102224055963
-0.000426814400534
7.8964188086e-05
-0.00031045880868
4.48473476818e-05
-0.000180724571907
2.9157470329e-06
-5.45395316542e-05
-1.36642030446e-06
3.51312128247e-06
-1.73335795025e-06
2.78540672742e-06
-1.82015279855e-06
2.48483105176e-06
-1.73033645078e-06
2.31272538903e-06
-1.64457365844e-06
2.27447723586e-06
-1.52178420548e-06
2.25324350425e-06
-1.43389633284e-06
2.31692777064e-06
-1.27752393879e-06
2.36911139093e-06
-1.10450999662e-06
2.40794808551e-06
-9.17386486723e-07
2.44653828678e-06
-7.2404614724e-07
2.46553331846e-06
-5.17918651399e-07
2.41479475933e-06
-4.12106555968e-07
2.37846537988e-06
-3.17350822894e-07
2.50876872118e-06
-2.15380747498e-07
2.63535585775e-06
2.33885027451e-06
1.60093897416e-07
1.21529034805e-06
2.20087802693e-07
1.23455889461e-06
3.3592632214e-07
1.25155500973e-06
5.04507061093e-07
9.67785480351e-07
6.21749718299e-07
1.01246149288e-06
7.0952697585e-07
1.06102242469e-06
8.1537265542e-07
1.05051190394e-06
9.44979270772e-07
9.96657024133e-07
1.08072650115e-06
9.46972678059e-07
1.20793584618e-06
9.16031130474e-07
1.32163415672e-06
8.99976824271e-07
1.42175130145e-06
8.95686097082e-07
1.51212164095e-06
8.987807522e-07
1.60147992784e-06
8.98950731851e-07
1.69155521597e-06
8.95898472082e-07
1.77751882534e-06
8.98259150015e-07
1.86439440986e-06
9.02609686148e-07
1.94615624612e-06
9.10497193123e-07
2.01829889983e-06
9.18957850587e-07
2.09229676136e-06
9.18915977526e-07
2.17649659895e-06
9.19840416713e-07
2.26551739511e-06
9.23651946226e-07
2.35750261574e-06
9.29502218216e-07
2.44622592362e-06
9.23611102825e-07
2.53757575026e-06
9.12151938527e-07
2.63224019798e-06
9.03118634798e-07
2.72970483508e-06
9.0670399547e-07
2.82529362442e-06
9.04758761512e-07
2.92585382754e-06
9.15444568078e-07
3.03737454926e-06
9.37853945379e-07
3.18420540065e-06
9.56251013802e-07
3.33569340822e-06
9.90980239487e-07
3.48179311364e-06
1.02934551542e-06
3.64279831335e-06
1.07432693632e-06
3.81575425148e-06
1.11565837192e-06
4.03438439849e-06
1.10603434174e-06
4.35260961622e-06
1.07642796417e-06
4.68862509184e-06
1.21620280784e-06
4.70762098424e-06
1.76656262915e-06
1.16518332617e-05
-8.24896014347e-06
2.27843915546e-05
-0.000548637251347
2.50958873295e-05
-0.000591788832785
2.94572529315e-05
-0.000607280239135
3.38883812911e-05
-0.000609250051845
3.82545845048e-05
-0.000608085494623
4.26579467382e-05
-0.000606829983673
4.70973280179e-05
-0.00060541308559
5.15950110696e-05
-0.000603967795344
5.6180837722e-05
-0.000602445126141
6.08742668506e-05
-0.000600703102422
6.56904638014e-05
-0.000598661156758
7.06312839413e-05
-0.000596199287914
7.56973759599e-05
-0.000593182596799
8.08840351773e-05
-0.000589410573519
8.61599884565e-05
-0.000584592073115
9.14704381817e-05
-0.000578295083013
9.67037794991e-05
-0.000569953185576
0.000101599695887
-0.000558233482583
0.000105796418725
-0.000541419357356
0.00010773784906
-0.000511538590982
9.54058584872e-05
-0.000414482460405
6.89318171357e-05
-0.000283985002553
3.31032826632e-05
-0.000144896111501
-3.5519124758e-06
-1.7884328685e-05
-2.57723247939e-06
2.538327521e-06
-2.22122645663e-06
2.42929762068e-06
-2.05116406028e-06
2.3146749264e-06
-1.9232045821e-06
2.18467441466e-06
-1.79684999162e-06
2.14802983849e-06
-1.6708524625e-06
2.12715306598e-06
-1.53295954404e-06
2.17894269146e-06
-1.36428004731e-06
2.20034160857e-06
-1.18052046167e-06
2.22410003616e-06
-9.73440445658e-07
2.23937189733e-06
-7.60261077491e-07
2.2522707479e-06
-5.67061779198e-07
2.2215105719e-06
-4.56603678677e-07
2.26791792372e-06
-3.28418816863e-07
2.38053723316e-06
-1.92188178681e-07
2.49902444055e-06
2.1466560093e-06
1.9615393077e-07
1.01879132657e-06
2.66265921996e-07
1.16396956178e-06
3.59113465078e-07
1.1582951322e-06
4.93172549585e-07
8.33398011267e-07
6.38514573454e-07
8.66740629036e-07
7.44218995327e-07
9.54875629673e-07
8.87120235865e-07
9.07166249948e-07
1.03416612491e-06
8.49210814621e-07
1.16577999783e-06
8.1500766377e-07
1.27595896235e-06
8.05551648206e-07
1.37134435597e-06
8.04332577814e-07
1.45499729366e-06
8.11808178216e-07
1.52953167542e-06
8.24046306127e-07
1.60532781805e-06
8.2297754277e-07
1.68860725421e-06
8.12460027754e-07
1.77897854708e-06
8.07745690842e-07
1.86977846314e-06
8.11683537272e-07
1.95990438762e-06
8.20261617712e-07
2.05127933333e-06
8.27487803813e-07
2.1386013266e-06
8.31514101846e-07
2.22233387081e-06
8.36041380488e-07
2.30864579815e-06
8.37286288654e-07
2.40543154761e-06
8.32667651691e-07
2.51225627914e-06
8.16740734296e-07
2.62016560039e-06
8.04192651322e-07
2.71472243922e-06
8.08505443179e-07
2.80586327213e-06
8.15485463996e-07
2.88428049643e-06
8.26238765137e-07
2.97201275194e-06
8.27558567243e-07
3.08848846376e-06
8.21167536514e-07
3.21974109131e-06
8.24708262525e-07
3.3496557386e-06
8.60753064991e-07
3.47869149448e-06
8.99814202826e-07
3.62795363259e-06
9.24727855203e-07
3.80890586337e-06
9.33851136623e-07
4.01795657875e-06
8.9660796471e-07
4.25628604922e-06
8.37300906919e-07
4.72377466157e-06
7.48264202711e-07
6.05398917541e-06
4.36068305136e-07
1.50167280297e-05
-1.72338636046e-05
2.3963904932e-05
-0.000557585218983
2.3814288921e-05
-0.000591640166708
2.75534561811e-05
-0.000611020356331
3.14505703129e-05
-0.000613148078614
3.53058356986e-05
-0.000611941615363
3.92350408195e-05
-0.000610759990152
4.32478000453e-05
-0.000609426580483
4.7357082555e-05
-0.000608077745546
5.15869162868e-05
-0.000606675552517
5.59623971415e-05
-0.000605079101096
6.05077103325e-05
-0.000603206914281
6.52318579295e-05
-0.000600923812472
7.01419242961e-05
-0.000598092981807
7.52416356017e-05
-0.000594510547
8.05082530154e-05
-0.000589858921749
8.59023955547e-05
-0.00058368939571
9.13113702358e-05
-0.000575362326515
9.64773869597e-05
-0.000563399603794
0.000101049694588
-0.000545991764323
0.000103287013928
-0.000513776007611
8.82517114004e-05
-0.000399447360201
5.73230126059e-05
-0.000253056150073
1.63460738108e-05
-0.000103919315752
-2.43522246537e-06
8.96880282792e-07
-2.40542335336e-06
2.50841600021e-06
-2.32513157132e-06
2.34890116913e-06
-2.20780596597e-06
2.19725514058e-06
-2.09980801766e-06
2.07658654837e-06
-1.97149159979e-06
2.01962201772e-06
-1.84012032453e-06
1.99569131683e-06
-1.65473647484e-06
1.9934697139e-06
-1.46482364897e-06
2.01034119073e-06
-1.25814062295e-06
2.01733083064e-06
-1.02044592322e-06
2.00159359413e-06
-8.08905451567e-07
2.04064583568e-06
-6.43505093411e-07
2.05602172629e-06
-5.0793102076e-07
2.13225441353e-06
-3.6469843184e-07
2.23719716647e-06
-1.72755570096e-07
2.30705835261e-06
1.97386202304e-06
1.73747717432e-07
8.44581931861e-07
3.05005778674e-07
1.03225408431e-06
4.13370436949e-07
1.04950448771e-06
4.5226371522e-07
7.94148393244e-07
5.84077145639e-07
7.34519780108e-07
7.80082913379e-07
7.58397642998e-07
9.51401222804e-07
7.35415208571e-07
1.0824532263e-06
7.17788040206e-07
1.18348480855e-06
7.13669235869e-07
1.25402399729e-06
7.3474690158e-07
1.32042408647e-06
7.3770176148e-07
1.40297909989e-06
7.29047567017e-07
1.50194042877e-06
7.24901279105e-07
1.60431349472e-06
7.20439727401e-07
1.70163500166e-06
7.14993686311e-07
1.79456266334e-06
7.14690203737e-07
1.88550888252e-06
7.20626283337e-07
1.9762089084e-06
7.29465644682e-07
2.0665526285e-06
7.37064205161e-07
2.15656063009e-06
7.41441290467e-07
2.24879782913e-06
7.43755087864e-07
2.34288731082e-06
7.43160031652e-07
2.43758513176e-06
7.3794478699e-07
2.52653724247e-06
7.27770337219e-07
2.61950028692e-06
7.11214761131e-07
2.71825949802e-06
7.09726016292e-07
2.82097154812e-06
7.12738344905e-07
2.93314723595e-06
7.13990836201e-07
3.04005587451e-06
7.20533410706e-07
3.13223213245e-06
7.28804439911e-07
3.22184989851e-06
7.34868357669e-07
3.34041046541e-06
7.41804863708e-07
3.47255648037e-06
7.67425887553e-07
3.5951843561e-06
8.01390569829e-07
3.7213669168e-06
8.07288526037e-07
3.84431173971e-06
7.72595472411e-07
3.99477787705e-06
6.86260486604e-07
4.20559214982e-06
5.37653859042e-07
4.29153877126e-06
3.39236623309e-07
1.14336852498e-05
-2.43841005581e-05
2.22731729347e-05
-0.00056842615817
2.23860842512e-05
-0.000591754743308
2.56370689327e-05
-0.000614273034016
2.8933280762e-05
-0.000616445773507
3.22416801313e-05
-0.000615251289491
3.56753164375e-05
-0.000614194677387
3.92476614784e-05
-0.000612999802509
4.29575987293e-05
-0.000611788404687
4.68180927057e-05
-0.000610536647864
5.08562148994e-05
-0.00060911772382
5.5105858014e-05
-0.000607456976858
5.95876454508e-05
-0.00060540595471
6.43196612214e-05
-0.000602825295187
6.93179399478e-05
-0.000599509085746
7.45744985017e-05
-0.000595115687273
8.00708713358e-05
-0.000589185961893
8.56904868226e-05
-0.000580982077691
9.11880702327e-05
-0.000568897307288
9.6231359489e-05
-0.000551035183698
9.89116107302e-05
-0.000516456357229
8.09327268777e-05
-0.000381468522263
4.71936959643e-05
-0.000219317331722
8.85827547989e-07
-5.76114572051e-05
-2.17246483744e-06
3.95512521851e-06
-2.45021463504e-06
2.78608112193e-06
-2.46242677867e-06
2.36101968982e-06
-2.39740232958e-06
2.13213915949e-06
-2.29360341277e-06
1.9726995332e-06
-2.1505373213e-06
1.87647081413e-06
-1.97640895833e-06
1.82147690928e-06
-1.77587517993e-06
1.79284968806e-06
-1.55880244261e-06
1.79318148095e-06
-1.34016132145e-06
1.79860365758e-06
-1.13678251753e-06
1.79812849938e-06
-9.43329160463e-07
1.84710299169e-06
-7.51273715835e-07
1.86387335443e-06
-5.59842540034e-07
1.94072262296e-06
-4.07767293217e-07
2.08505682643e-06
-1.5843483312e-07
2.05762709653e-06
1.8154105651e-06
1.16871221457e-07
7.2738221461e-07
2.99007587401e-07
8.49647774565e-07
4.68043471827e-07
8.79990323221e-07
5.38005320537e-07
7.23736444755e-07
6.59519831365e-07
6.12524743632e-07
8.18563498969e-07
5.98919749771e-07
9.36958827287e-07
6.16661363612e-07
1.01286156715e-06
6.41582979978e-07
1.09423872577e-06
6.32032296587e-07
1.20016369294e-06
6.285797335e-07
1.31071353292e-06
6.26934060479e-07
1.41561793323e-06
6.23943343596e-07
1.51731451583e-06
6.23031131491e-07
1.61469314813e-06
6.22906369788e-07
1.70565309012e-06
6.23903233895e-07
1.79158573668e-06
6.286417609e-07
1.87662018409e-06
6.35495496089e-07
1.96361193464e-06
6.42389562535e-07
2.05248852221e-06
6.48121823163e-07
2.14389565416e-06
6.49982784655e-07
2.23601153637e-06
6.51607455118e-07
2.32875626773e-06
6.50398070655e-07
2.42686093324e-06
6.398381748e-07
2.53168701483e-06
6.22952854788e-07
2.63323627281e-06
6.09682688682e-07
2.73503573596e-06
6.07942584692e-07
2.83895176743e-06
6.08820253594e-07
2.94209156544e-06
6.1081610521e-07
3.04448296253e-06
6.18051004169e-07
3.15402877689e-06
6.19135146482e-07
3.26444626259e-06
6.2420084788e-07
3.35039665444e-06
6.55696616797e-07
3.42361548398e-06
6.93683582753e-07
3.50772348329e-06
7.17088572416e-07
3.60094858799e-06
7.13110905357e-07
3.69603459067e-06
6.77037279265e-07
3.78967053546e-06
5.92127633491e-07
3.86672196962e-06
4.57662325481e-07
3.86814117644e-06
3.39066292668e-07
9.22634262937e-06
-2.97965904841e-05
2.02195968189e-05
-0.000579422022505
2.03645034605e-05
-0.000591902385969
2.33474663387e-05
-0.000617258303728
2.61420241136e-05
-0.000619242251208
2.89591331049e-05
-0.000618069879398
3.19198306481e-05
-0.000617156541267
3.50542074166e-05
-0.000616135059809
3.83568324894e-05
-0.00061509172802
4.18336472398e-05
-0.000614014000545
4.55122452291e-05
-0.00061279676614
4.94355362996e-05
-0.000611380624221
5.3639547462e-05
-0.000609610274091
5.81584699837e-05
-0.000607344474383
6.30263682743e-05
-0.000604377206954
6.82610920785e-05
-0.000600350603754
7.38765123922e-05
-0.000594801536666
7.97597541242e-05
-0.000586865450575
8.56948357334e-05
-0.000574832509065
9.13078758938e-05
-0.000556648318823
9.43682599101e-05
-0.000519516926495
7.20691854897e-05
-0.000359169621861
3.35738192059e-05
-0.000180822002631
-5.27143429332e-06
-1.87662072415e-05
-3.53798489653e-06
2.2216434482e-06
-2.98877709051e-06
2.23680424278e-06
-2.7964285763e-06
2.16858285683e-06
-2.68057211217e-06
2.01619529139e-06
-2.53655789573e-06
1.82859924642e-06
-2.34618083053e-06
1.68601355434e-06
-2.13379498335e-06
1.60900852855e-06
-1.90906415163e-06
1.56803493196e-06
-1.67694221859e-06
1.56097044965e-06
-1.45516541607e-06
1.57673811394e-06
-1.24091818182e-06
1.58379127851e-06
-1.01979888759e-06
1.62589334936e-06
-8.16730172425e-07
1.66070591174e-06
-5.9265042305e-07
1.71654394074e-06
-4.40660559548e-07
1.93295064752e-06
-1.72375484634e-07
1.7892979838e-06
1.64299423254e-06
7.39532994297e-08
6.52951868329e-07
2.53943598105e-07
6.69193930619e-07
4.02285708561e-07
7.31158136157e-07
4.79610227694e-07
6.45905584225e-07
6.11562710544e-07
4.80174862018e-07
7.23984961849e-07
4.86175250767e-07
8.4145019876e-07
4.98900725242e-07
9.74211349141e-07
5.08555078161e-07
1.09494390908e-06
5.11042500983e-07
1.20935323276e-06
5.1394402972e-07
1.31765435718e-06
5.18417493515e-07
1.41794832153e-06
5.23468702715e-07
1.51118461079e-06
5.29627677233e-07
1.59781518537e-06
5.36141154376e-07
1.67785573377e-06
5.4373840815e-07
1.75373082161e-06
5.52667998495e-07
1.83378881415e-06
5.55344774158e-07
1.9275394106e-06
5.48569821046e-07
2.03065168633e-06
5.44950244389e-07
2.13435269035e-06
5.46248614556e-07
2.23729413666e-06
5.48647047493e-07
2.34080401942e-06
5.46892838435e-07
2.44448156166e-06
5.36179974648e-07
2.54740616772e-06
5.20066803613e-07
2.64762052849e-06
5.09519050584e-07
2.74742521354e-06
5.08188642949e-07
2.84965553868e-06
5.06630595006e-07
2.95618348102e-06
5.04289587187e-07
3.06717433319e-06
5.07048094921e-07
3.17120552668e-06
5.15007209473e-07
3.25756752288e-06
5.3779153929e-07
3.3380220444e-06
5.74914194996e-07
3.42084757523e-06
6.10814466444e-07
3.48441326152e-06
6.52815836908e-07
3.51872879569e-06
6.78395461279e-07
3.53595912602e-06
6.58579185547e-07
3.57304527756e-06
5.52585143698e-07
3.59257347324e-06
4.38692098821e-07
3.63087066063e-06
2.76419299317e-07
7.61683059403e-06
-3.38112649184e-05
1.83813536303e-05
-0.000590190822137
1.76091667647e-05
-0.000591133671944
2.06025236212e-05
-0.000620254514676
2.30624206104e-05
-0.000621704252122
2.54728221772e-05
-0.000620481869652
2.79848345356e-05
-0.000619669672324
3.06705413027e-05
-0.000618821612439
3.35412462683e-05
-0.000617963028124
3.66063365936e-05
-0.000617079565916
3.98933198665e-05
-0.00061608409555
4.34497556365e-05
-0.000614937362659
4.73275259436e-05
-0.000613488276318
5.15801912198e-05
-0.000611597357161
5.62651328939e-05
-0.000609062323004
6.14382550004e-05
-0.00060552388621
6.71614140108e-05
-0.000600524831384
7.3366198029e-05
-0.000593070357812
7.99497486841e-05
-0.000581416174147
8.64609132414e-05
-0.000563159658208
9.01675919794e-05
-0.000523223855532
6.18897296885e-05
-0.000330891958653
1.71127636204e-05
-0.000136045051424
-2.27969755472e-06
6.26251019907e-07
-2.67311614044e-06
2.61502988477e-06
-2.88160753829e-06
2.44521976953e-06
-2.92792906496e-06
2.21482041087e-06
-2.85461190869e-06
1.94278853479e-06
-2.71479082915e-06
1.68869965334e-06
-2.53055256083e-06
1.50169369322e-06
-2.31411906768e-06
1.39249648987e-06
-2.08392171872e-06
1.33775045037e-06
-1.8404785594e-06
1.31743833918e-06
-1.60422173692e-06
1.34038467256e-06
-1.37372460881e-06
1.35319790038e-06
-1.14376497813e-06
1.39583045743e-06
-9.24067085671e-07
1.44090423592e-06
-6.88422749138e-07
1.48078737218e-06
-4.76508611146e-07
1.72095069556e-06
-2.37960774314e-07
1.55065113793e-06
1.4050025469e-06
6.36838311896e-08
5.88878639274e-07
2.2307762333e-07
5.09392756927e-07
3.62988557109e-07
5.90727055373e-07
4.63995864707e-07
5.44448230948e-07
5.97738205751e-07
3.46121927771e-07
7.21694324025e-07
3.61926240996e-07
8.48735939492e-07
3.71576361462e-07
9.7403699265e-07
3.82992161996e-07
1.09126913915e-06
3.93570482377e-07
1.20034254027e-06
4.04651600077e-07
1.30199877209e-06
4.16565844743e-07
1.39583084646e-06
4.29463544593e-07
1.48218085967e-06
4.43127549006e-07
1.56197191495e-06
4.56221191713e-07
1.64119775744e-06
4.64402172776e-07
1.73221071148e-06
4.61558199308e-07
1.83701652214e-06
4.5045665825e-07
1.94473774583e-06
4.40781253228e-07
2.0512299555e-06
4.38412219458e-07
2.15545361673e-06
4.41999483877e-07
2.2573909708e-06
4.46707635989e-07
2.35803085893e-06
4.46271893164e-07
2.45965559968e-06
4.34597927475e-07
2.56341715582e-06
4.16367621393e-07
2.6665287085e-06
4.06486419375e-07
2.76819145825e-06
4.06609539397e-07
2.87178920452e-06
4.03103490023e-07
2.98271114689e-06
3.93421363748e-07
3.09487665683e-06
3.9489670489e-07
3.19640532369e-06
4.1350079012e-07
3.28895847971e-06
4.45102036349e-07
3.37416905699e-06
4.89729739025e-07
3.43966460374e-06
5.44892148692e-07
3.48059191687e-06
6.11640271323e-07
3.48211500673e-06
6.75995979276e-07
3.40938700466e-06
7.30099525858e-07
3.22848706724e-06
7.3162004845e-07
3.04963239729e-06
6.12813052084e-07
3.23841241671e-06
7.97562578476e-08
5.73689509074e-06
-3.63902860587e-05
1.56248794153e-05
-0.000600083494488
1.50080577839e-05
-0.000590520339007
1.77628158515e-05
-0.000623011669089
1.9846777155e-05
-0.000623789893357
2.18485491224e-05
-0.000622484819353
2.38968388582e-05
-0.00062171876807
2.61030905122e-05
-0.000621028429803
2.8503275177e-05
-0.000620363606977
3.11161854477e-05
-0.000619692771019
3.396844761e-05
-0.000618936580986
3.71061088397e-05
-0.00061807521225
4.05940433632e-05
-0.000616976368626
4.45069009094e-05
-0.000615510362245
4.89301487581e-05
-0.00061348569643
5.39649782168e-05
-0.000610558843128
5.97215410675e-05
-0.000606281496679
6.62164588662e-05
-0.000599565378285
7.35863926163e-05
-0.000588786236984
8.14864761103e-05
-0.000571060025668
8.72826647755e-05
-0.000529020135189
5.41123719033e-05
-0.000297721763949
2.91398435998e-06
-8.48469910411e-05
-1.59912614663e-06
5.13934064442e-06
-2.65243153226e-06
3.66826670269e-06
-3.05896847212e-06
2.85167267171e-06
-3.15451012244e-06
2.31027785343e-06
-3.08858542845e-06
1.87678235362e-06
-2.93334823451e-06
1.53338627792e-06
-2.73025008416e-06
1.29851862896e-06
-2.49563801053e-06
1.15780716764e-06
-2.24756909719e-06
1.0895972938e-06
-1.9922808155e-06
1.06205876698e-06
-1.7457166433e-06
1.09371839107e-06
-1.52405104772e-06
1.13142694977e-06
-1.28544140403e-06
1.15711137736e-06
-1.03649433108e-06
1.19184338542e-06
-8.08389192471e-07
1.25256763025e-06
-5.56466646656e-07
1.46889759793e-06
-3.01155345371e-07
1.29526490742e-06
1.10380823129e-06
7.50745979874e-08
5.13348078128e-07
1.72334396749e-07
4.1167925765e-07
3.46698739677e-07
4.15896688106e-07
4.99021615202e-07
3.91700619474e-07
5.9746849055e-07
2.47409256307e-07
7.14573630653e-07
2.44546834487e-07
8.34510049372e-07
2.51393860785e-07
9.50303600223e-07
2.66948746081e-07
1.06092957833e-06
2.82731048683e-07
1.16645755086e-06
2.98910678061e-07
1.26765080652e-06
3.15197017833e-07
1.36416264597e-06
3.32777054424e-07
1.45549481782e-06
3.5165989264e-07
1.54522777768e-06
3.66354766045e-07
1.64087273521e-06
3.68654916858e-07
1.74255959531e-06
3.59768024878e-07
1.84913025324e-06
3.43811334915e-07
1.95712468073e-06
3.32721942845e-07
2.06344903378e-06
3.32054431239e-07
2.16842814173e-06
3.37004032354e-07
2.27086443058e-06
3.44284849671e-07
2.36958191562e-06
3.47592522495e-07
2.47133045994e-06
3.32912109661e-07
2.58095702419e-06
3.06836655289e-07
2.69113487666e-06
2.96413658263e-07
2.79406105723e-06
3.03814942762e-07
2.89467460701e-06
3.02594590931e-07
3.00628575165e-06
2.81938745286e-07
3.12167799075e-06
2.79600796113e-07
3.22471209812e-06
3.10561399239e-07
3.32008828315e-06
3.49869921341e-07
3.40992834902e-06
3.9983463452e-07
3.48937458366e-06
4.65644392414e-07
3.53918489572e-06
5.61919955208e-07
3.52120401097e-06
6.93976673025e-07
3.3797486784e-06
8.70141718645e-07
3.03853063594e-06
1.0707528598e-06
2.6052053131e-06
1.04518504466e-06
2.40840939388e-06
2.46608426712e-07
2.95425659166e-06
-3.69253235138e-05
1.20052481287e-05
-0.000609134499491
1.2610292385e-05
-0.000591125817839
1.49401538446e-05
-0.000625341680858
1.65390732497e-05
-0.000625388889418
1.80693521198e-05
-0.00062401496446
1.96255611853e-05
-0.000623274886314
2.13307089719e-05
-0.000622733402413
2.32305949921e-05
-0.000622263405989
2.53498682019e-05
-0.000621811922572
2.77158291864e-05
-0.000621302512398
3.03690632444e-05
-0.000620728393842
3.33827467436e-05
-0.000619990077263
3.68535355783e-05
-0.000618981147763
4.09044277028e-05
-0.000617536644865
4.56969867214e-05
-0.000615351419077
5.13944885565e-05
-0.000611979037132
5.81055911377e-05
-0.000606276514775
6.61262149872e-05
-0.000596806982226
7.52143474229e-05
-0.000580148121572
8.4326641445e-05
-0.000538132574696
5.19162829192e-05
-0.000265311519283
-2.89658032814e-06
-3.00342726761e-05
-3.24552938492e-06
5.48820539632e-06
-3.61527106319e-06
4.03791397069e-06
-3.71742818903e-06
2.95375799353e-06
-3.6241014975e-06
2.21687274614e-06
-3.42748316213e-06
1.68010110195e-06
-3.18648779113e-06
1.29231915919e-06
-2.91667643805e-06
1.02864593805e-06
-2.64745158995e-06
8.88504937289e-07
-2.38490071461e-06
8.26968378143e-07
-2.14934969744e-06
8.26412232818e-07
-1.92304044215e-06
8.67309739716e-07
-1.68655829868e-06
8.94833723126e-07
-1.45377471059e-06
9.2421833468e-07
-1.23198547688e-06
9.69936788015e-07
-9.93313752716e-07
1.01376985182e-06
-6.16507661745e-07
1.09198543265e-06
-2.45556826418e-07
9.24223018876e-07
8.58228596805e-07
1.32599524373e-07
3.80074127096e-07
2.39782987735e-07
3.03897969308e-07
3.73647824816e-07
2.81566240318e-07
4.61543953744e-07
3.03436210215e-07
5.54958259571e-07
1.53768987094e-07
6.65477002253e-07
1.33807640395e-07
7.79807819168e-07
1.36842262865e-07
8.86383081781e-07
1.60173971315e-07
9.90587433733e-07
1.78332073451e-07
1.09561379096e-06
1.93708871252e-07
1.20472704366e-06
2.05911288273e-07
1.31610887196e-06
2.21246048484e-07
1.42873214097e-06
2.38892432722e-07
1.53869348307e-06
2.56270971163e-07
1.64029673365e-06
2.66937507937e-07
1.74143487837e-06
2.58539817246e-07
1.8508972522e-06
2.34275392649e-07
1.96194380367e-06
2.21629077635e-07
2.07036538798e-06
2.23609328652e-07
2.17921881304e-06
2.28155018722e-07
2.28390528314e-06
2.39631734266e-07
2.38219277397e-06
2.49365257945e-07
2.4904569438e-06
2.24748361211e-07
2.61678665105e-06
1.80627635961e-07
2.74076621726e-06
1.72593784269e-07
2.85111312812e-06
1.9362496063e-07
2.94751755233e-06
2.06387407019e-07
3.03394047149e-06
1.95686957998e-07
3.13801025732e-06
1.7574629054e-07
3.25331222744e-06
1.95500709534e-07
3.35828992883e-06
2.45083769482e-07
3.4710704487e-06
2.87549377593e-07
3.58277817414e-06
3.54392649696e-07
3.67026056748e-06
4.75102062956e-07
3.69026250269e-06
6.74406649765e-07
3.54118686656e-06
1.01993278615e-06
2.94747323835e-06
1.66325046779e-06
1.96149267093e-06
2.03208446801e-06
-3.08553868178e-06
5.32510885984e-06
1.84258710587e-06
-4.18271666786e-05
7.8277831327e-06
-0.000615115653033
1.03996191599e-05
-0.000593694737925
1.22201368551e-05
-0.000627160244314
1.31622294638e-05
-0.000626329421926
1.40979554574e-05
-0.000624949509513
1.51260403062e-05
-0.000624302003284
1.6323829456e-05
-0.000623930478976
1.77126464275e-05
-0.000623651652415
1.93062123743e-05
-0.000623405095071
2.11313486878e-05
-0.000623127342892
2.32205215884e-05
-0.000622817377692
2.56467652394e-05
-0.000622416176843
2.85214904261e-05
-0.000621855799088
3.20092636565e-05
-0.000621024356261
3.63597786012e-05
-0.000619701894838
4.18812549828e-05
-0.000617500469165
4.89587252091e-05
-0.000613353945477
5.79635313432e-05
-0.000605811730219
6.78612843307e-05
-0.000590045964661
7.75579164836e-05
-0.000547829015346
3.39037824978e-05
-0.000221657259646
-2.72918083264e-06
6.59865279859e-06
-4.2882837198e-06
7.04724001397e-06
-4.64142449293e-06
4.39099087798e-06
-4.52172878282e-06
2.83399990678e-06
-4.19302683223e-06
1.88811723579e-06
-3.81175458399e-06
1.29877325583e-06
-3.47642613686e-06
9.56938081903e-07
-3.16915042421e-06
7.21305070469e-07
-2.83986621542e-06
5.59150307994e-07
-2.55927041547e-06
5.4629225378e-07
-2.35009808412e-06
6.17151549205e-07
-2.12782609118e-06
6.449385987e-07
-1.86996024039e-06
6.36865106894e-07
-1.58631431069e-06
6.40469003019e-07
-1.26860378589e-06
6.52125670715e-07
-9.20037387151e-07
6.65105629359e-07
-5.08965844638e-07
6.80817339008e-07
-1.81094208119e-07
5.96304116943e-07
6.77100890536e-07
1.7607733908e-07
2.03009952889e-07
3.4895927759e-07
1.30441905745e-07
4.51572049288e-07
1.78512004573e-07
5.15418882221e-07
2.39216659813e-07
5.08981651803e-07
1.59929688457e-07
6.02915076717e-07
3.96529146894e-08
7.14522460685e-07
2.50406694198e-08
8.13859618428e-07
6.06660034282e-08
9.21833848031e-07
7.01813694336e-08
1.04301059782e-06
7.23740691573e-08
1.16940724827e-06
7.93543499952e-08
1.29512327785e-06
9.5388675624e-08
1.41256880063e-06
1.21305380403e-07
1.51652605401e-06
1.52195868666e-07
1.60870795248e-06
1.74644357198e-07
1.70464279226e-06
1.62521859532e-07
1.82225762234e-06
1.16593567357e-07
1.95599449366e-06
8.78605870739e-08
2.08732660775e-06
9.22664978991e-08
2.21483800249e-06
1.00665734413e-07
2.35277940513e-06
1.0173683224e-07
2.50393681917e-06
9.82906470617e-08
2.63103008403e-06
9.77711895508e-08
2.72181446684e-06
8.99880823299e-08
2.81355873436e-06
8.10186454592e-08
2.9169012602e-06
9.04662950176e-08
3.02185531279e-06
1.01633346286e-07
3.11905224731e-06
9.87027356645e-08
3.20170146476e-06
9.33557000817e-08
3.2900779796e-06
1.07362415255e-07
3.40440498058e-06
1.3125384512e-07
3.54124565737e-06
1.51093855858e-07
3.69773563233e-06
1.98575052783e-07
3.87189860158e-06
3.02024409723e-07
4.03765555709e-06
5.09765758154e-07
4.08754823277e-06
9.69234384073e-07
3.27207460277e-06
2.47960579234e-06
1.85210805625e-06
3.47210567538e-06
-2.29916820669e-05
3.01959039675e-05
1.85385219686e-06
-6.66432731297e-05
2.75762677706e-07
-0.000613531527318
8.87271063824e-06
-0.00060228733944
9.89347149844e-06
-0.000628178141383
9.67348314643e-06
-0.000626107280157
9.84857066469e-06
-0.000625122997275
1.03355044389e-05
-0.00062478768951
1.10490190632e-05
-0.000624643076258
1.194325114e-05
-0.000624545170874
1.30013094866e-05
-0.00062446265235
1.42412084037e-05
-0.00062436685507
1.56849469171e-05
-0.00062426086573
1.73915623713e-05
-0.000624122595375
1.94620862301e-05
-0.000623926209375
2.20656050646e-05
-0.000623627773202
2.54999233639e-05
-0.000623136141543
3.02667616071e-05
-0.0006222672064
3.73588236129e-05
-0.000620445944953
4.8103589e-05
-0.000616556496912
6.23896660446e-05
-0.000604331908081
8.04642744718e-05
-0.00056590345484
8.71056061913e-06
-0.000149903182873
-5.66500700989e-06
2.09742372147e-05
-6.76239607278e-06
8.14459258804e-06
-6.23672767934e-06
3.8652809829e-06
-5.42592995232e-06
2.02315367719e-06
-4.71902587173e-06
1.18117400354e-06
-4.18899526444e-06
7.68694297141e-07
-3.76123178317e-06
5.29123444086e-07
-3.38493752602e-06
3.44947862398e-07
-3.02534405918e-06
1.99489710911e-07
-2.7012927754e-06
2.22154750146e-07
-2.41141294556e-06
3.27185066121e-07
-2.13022159973e-06
3.63656623299e-07
-1.83739175182e-06
3.43945916328e-07
-1.52690177183e-06
3.29888732636e-07
-1.21237195478e-06
3.37507079793e-07
-9.01041122077e-07
3.53680605263e-07
-5.75218635619e-07
3.54932837742e-07
-2.80788387083e-07
3.0180548318e-07
3.96263066435e-07
2.02572739027e-07
3.32805156394e-07
5.11105928226e-07
7.50078807233e-07
9.09815556054e-07
9.4932280235e-07
9.74261351054e-07
1.03482274927e-06
1.1049159789e-06
1.17720095549e-06
1.25648095981e-06
1.35179394005e-06
1.47303708209e-06
1.6251705319e-06
1.79976635281e-06
1.96224527048e-06
2.07881740106e-06
2.16666801802e-06
2.25894218597e-06
2.35962770914e-06
2.46140046995e-06
2.55974472327e-06
2.65758385859e-06
2.74765789833e-06
2.8287644751e-06
2.91933373986e-06
3.02107071832e-06
3.11990651898e-06
3.21338788943e-06
3.32098812847e-06
3.45243593902e-06
3.60385368933e-06
3.80303725263e-06
4.10559762408e-06
4.61530228655e-06
5.58444338385e-06
8.06683041932e-06
1.15437680581e-05
4.17634155439e-05
-2.48565345241e-05
-1.33854724394e-05
9.32896400957e-06
6.15211135047e-06
5.04577402987e-06
4.92351473323e-06
5.13636386489e-06
5.493713102e-06
5.94884041885e-06
6.486424242e-06
7.1197226511e-06
7.85898163272e-06
8.73645852327e-06
9.81031372136e-06
1.11825817469e-05
1.30464981342e-05
1.57793339907e-05
2.03334037443e-05
2.87769407829e-05
4.94450925242e-05
0.000108541880691
-4.13611107724e-05
-2.03868793455e-05
-1.22423021163e-05
-8.3770442945e-06
-6.35390819754e-06
-5.17275611051e-06
-4.40408385062e-06
-3.87498841343e-06
-3.53006977957e-06
-3.33062103878e-06
-3.10851110641e-06
-2.78137318203e-06
-2.41776111938e-06
-2.07386140037e-06
-1.74401938376e-06
-1.40656258349e-06
-1.05292122172e-06
-6.98023538502e-07
-3.96263066435e-07
)
;
boundaryField
{
frontAndBack
{
type empty;
value nonuniform 0();
}
upperWall
{
type calculated;
value uniform 0;
}
lowerWall
{
type calculated;
value uniform 0;
}
inlet
{
type calculated;
value nonuniform List<scalar>
20
(
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
-0.000625
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
20
(
0.000519440799276
0.000645213125281
0.000724315353683
0.000763337131831
0.00078006656346
0.000780730408782
0.00076864938178
0.000753007150703
0.000735091136621
0.00071484054427
0.000692259466334
0.000667230825466
0.000639537750279
0.000608831735672
0.00057457527948
0.000535954963149
0.000491608394193
0.000438541620536
0.000371825249256
0.00029559309294
)
;
}
}
// ************************************************************************* //
| [
"as998@snu.edu.in"
] | as998@snu.edu.in | |
99bef536169d19f7bc0e80cb701d5f68cbdfee69 | 776733107e8a3843776fa50375f3800aa2f13379 | /Lista de desafios/Questão 01/exercicio1.cpp | 449b08938883b20d3c4c5e9e8e74ccbf691974cc | [] | no_license | lucas54neves/gcc224-ialg | a0145d89481c4ac5dbd2c35231685b9d7240623f | c34e1a5f4dc27acb41a4637d3fc8b91c94167293 | refs/heads/master | 2020-03-17T19:51:23.041672 | 2018-05-18T00:06:18 | 2018-05-18T00:06:18 | 133,880,964 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 481 | cpp | #include <iostream>
using namespace std;
int main () {
int largura, altura, xMouse, yMouse;
float xConvertido, yConvertido, larguraCentro, alturaCentro;
cin >> largura;
cin >> altura;
cin >> xMouse;
cin >> yMouse;
larguraCentro = largura / 2.0;
alturaCentro = altura / 2.0;
xConvertido = (xMouse - larguraCentro) / larguraCentro;
yConvertido = (double)(alturaCentro - yMouse) / alturaCentro;
cout << xConvertido << endl;
cout << yConvertido << endl;
return 0;
}
| [
"34668346+lucas54neves@users.noreply.github.com"
] | 34668346+lucas54neves@users.noreply.github.com |
f5573e545bfca472b5cc62f625e7816dac93db9e | e39d84d42f480da7b58095f8e6dcf736d3c6ebbe | /projectOne/main.cpp | 72ed1253401e9ca751d259fc5ae8f7a546d1f766 | [] | no_license | BigMacStorm/imageProcessing | 5d82bdc3726ab36c27326dab1af15cba5cfa1f58 | 713d14297fce661c54de300ae2888dbe91d51d7f | refs/heads/master | 2020-05-18T15:37:16.408954 | 2015-12-09T21:00:10 | 2015-12-09T21:00:10 | 42,554,074 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,302 | cpp | #include <iostream>
#include <cstdlib>
#include "image.h"
#include <fstream>
#include "image.cpp"
#include <cstdlib>
#include <cstring>
#include <math.h>
#include <ctime>
#include <algorithm>
using namespace std;
//Reads the image into a 2d array
void readImage(string fname, ImageType& image);
//writes the image from the image class to a file specified by fname
void writeImage(string fname, ImageType& image);
//reads meta data of the image.
void readImageHeader(string fname, int& N, int& M, int& Q, bool& type);
//image shrink function
void shrinkImage(ImageType oldImage, ImageType& newImage, int shrinkVal, string newImageFname);
//expand image function
void expandImage(ImageType oldImage, ImageType& newImage, int growVal, string newImageFName);
void histogramEq(ImageType oldImage, ImageType& newImage, string newImageName);
void padImage( ImageType& paddedImage, ImageType oldImage, int padValue);
void sharpenImage(ImageType oldImage, ImageType& sharpImage, string maskType,int padVal);
void saltAndPeppaNoise(ImageType& oldImage, int distortionPercent);
void medianFilter(ImageType oldImage, ImageType& medianImage, int padVal);
int main()
{
/*
The following is the order of steps needed to read and write an image.
This code opens the lenna.pgm image, and then saves it again
*/
//Decliration of variables, latter the file name will be passed as an argument
string fileName = "lenna.pgm";
int N, M, Q;
bool imageFormat;
//Before you declare your Image Type Object, you have to run readImageHeader to get the info of the image
//N,M,Q, and imageFormat are all passed by refrence.
readImageHeader(fileName, N,M,Q,imageFormat);
//Only after the readImageHeader is run, can you create your imageType Object in this format.
ImageType myImage(N,M,Q);
//Will read the image in and store the pixel value in myImage.pixelValue
readImage(fileName,myImage);
//will Write the image in myImage into the given new file name.
//For testing we will shrink to a 128x128 image
//input the new size of the image
//create the pad value, value will add that man zeros from the edge of the image, IE value of 1 will be 1 set of zeros around the edge
int padValue = 1;
//create the padded image with the extra length needed to support the padding
ImageType paddedImage(N+(padValue*2),M+(padValue*2),Q);
ImageType sharpImage(N,M,Q);
//place the old image inside the padded image
padImage( paddedImage,myImage, padValue);
/* uncomment for salt and peper and median filter
saltAndPeppaNoise(myImage,10);
medianFilter(paddedImage, sharpImage, padValue);
*/
//performs the specified shappen function, either, "Prewitt", "Sobel", or "Laplacian" is case sensitive.
//also requiers the padValue for calculations
/* uncomment and change sharpening type for shaprening filter
sharpenImage(paddedImage, sharpImage, "Laplacian", padValue);
*/
return (0);
}
/*
medianFilter:
Writen By: Jeremiah Berns
Description: Will take an image, and apply the median filtering to it. It will then output the image to a file.
*/
void medianFilter(ImageType padded, ImageType& medianImage, int padVal)
{
//varibale decleration
int tempMatrix[3][3], flatMatrix[9];
int N,M,Q,padN,padM, tempPixel;
padded.getImageInfo(padN,padM,Q);
//main loop to go through the function
for(int i=padVal; i<padN-padVal;i++)
{
for(int j=padVal;j<padM-padVal;j++)
{
for (int k=0;k<3;k++)
{
//builds the 3x3 matrix
for(int l=0;l<3;l++)
{
padded.getPixelVal(i-padVal+k,j-padVal+l,tempPixel);
tempMatrix[k][l] = tempPixel;
}
//converts the 3x3 matrix to a flat matix
for(int m=0;m<3;m++)
{
for(int n=0;n<3;n++)
{
flatMatrix[m*3+n] = tempMatrix[n][m];
}
}
}
//sort the matrix, and place the median value in the new image
sort(flatMatrix,flatMatrix+9);
medianImage.setPixelVal(i-padVal,j-padVal, flatMatrix[4]);
}
}
//write the image
writeImage("MedianFilter.pgm",medianImage);
}
/*
SaltAndPeppaNoise:
Written by: Jeremiah Berns
Dependincies: ctime, Image.h, Image.cpp
Description: Will take the passed image, and the degrigation percentage, then apply salt and pepper noise to the image
based on how much of the image should be distroted.
*/
void saltAndPeppaNoise(ImageType& oldImage, int distortionPercent)
{
int N,M,Q, totalPix, numOfDistortions;
oldImage.getImageInfo(N,M,Q);
totalPix = N*M;
numOfDistortions = totalPix/(100/distortionPercent);
cout<<numOfDistortions<<endl;
srand(time(0));
for(int i=0;i<numOfDistortions;i++)
{
oldImage.setPixelVal(rand()%256, rand()%256, 255);
}
writeImage("saltAndPeppa.pgm", oldImage);
}
/*
SharpenImage:
Writen by: Jeremiah Berns
dependencies: image.h, image.cpp, math.h
Discription: This funtion will take in a padded imageType opbject, the new image to store the sharp image,
the value of the padding applied to the padded image, and the name of the sharpening to be
done. It will perform the desired sharpening, if the selected sharpening type generates both
a X, and Y gradient, then those images will be printed as well.
*/
void sharpenImage(ImageType padded, ImageType& sharpImage, string maskType,int padVal)
{
//Variable decliration.
int N,M,Q,padN,padM, tempValX=0, tempValY=0, tempPixel,tempPixelTwo;
int prewittX[3][3],prewittY[3][3], sobelX[3][3],sobelY[3][3], laplacian[3][3];
sharpImage.getImageInfo(N,M,Q);
padded.getImageInfo(padN,padM,Q);
//load masks
//Prewitt
prewittX[0][0] = prewittX[1][0] =prewittX[2][0] = -1;
prewittX[0][1] = prewittX[1][1] =prewittX[2][1] = 0;
prewittX[0][2] = prewittX[1][2] =prewittX[2][2] = 1;
prewittY[0][0] = prewittY[0][1] =prewittY[0][2] = -1;
prewittY[1][0] = prewittY[1][1] =prewittY[1][2] = 0;
prewittY[2][0] = prewittY[2][1] =prewittY[2][2] = 1;
//Sobel
sobelX[0][0] = sobelX[2][0] = -1;
sobelX[1][0] = -2;
sobelX[0][1] = sobelX[1][1] = sobelX[2][1] = 0;
sobelX[0][2] = sobelX[2][2] = 1;
sobelX[1][2] = 2;
sobelY[0][0] = sobelY[0][2] = -1;
sobelY[0][1] = -2;
sobelY[1][0] = sobelY[1][1] = sobelY[1][2] = 0;
sobelY[2][0] = sobelY[2][2] = 1;
sobelY[2][1] = 2;
//laplacian
laplacian[0][0]=laplacian[0][2]=laplacian[2][0]=laplacian[2][2] = 0;
laplacian[1][0]=laplacian[0][1]=laplacian[2][1]=laplacian[1][2] = 1;
laplacian[1][1] = -4;
//If prewitt sharpening
if (maskType == "Prewitt")
{
//gradient mask of both the x and y direction
ImageType gradX(N,M,Q);
ImageType gradY(N,M,Q);
//main loop to go through the function
for(int i=padVal; i<padN-padVal;i++)
{
for(int j=padVal;j<padM-padVal;j++)
{
//inner loop that interates over a 3x3 area, applies the mask, then sets the calculated convolution value to the gradX and GradY masks
for (int k=0;k<3;k++)
{
for(int l=0;l<3;l++)
{
padded.getPixelVal(i-padVal+k,j-padVal+l,tempPixel);
tempValY += tempPixel* prewittY[k][l];
tempValX+= tempPixel* prewittX[k][l];
}
}
if(tempValX > 255)
{
tempValX = 255;
}
else if(tempValX < 0)
{
tempValX = 0;
}
if(tempValY > 255)
{
tempValY = 255;
}
else if(tempValY < 0)
{
tempValY = 0;
}
gradY.setPixelVal(i-padVal,j-padVal,tempValY);
gradX.setPixelVal(i-padVal,j-padVal,tempValX);
tempValX=0;
tempValY=0;
}
}
//output of the gradX and grad Y images
writeImage("prewittGradX.pgm", gradX);
writeImage("prewittGradY.pgm", gradY);
tempValX = tempValY = 0;
//calculation of the combined grad x and y images
for(int i=0;i<N;i++)
{
for(int j=0;j<M;j++)
{
gradX.getPixelVal(i,j,tempPixel);
gradY.getPixelVal(i,j,tempPixelTwo);
tempPixel = tempPixel*tempPixel;
tempPixelTwo = tempPixelTwo*tempPixelTwo;
tempPixel = tempPixel+tempPixelTwo;
tempPixel = sqrt(tempPixel);
if(tempPixel > 255)
{
tempPixel = 255;
}
sharpImage.setPixelVal(i,j,tempPixel);
tempPixel = tempPixelTwo = 0;
}
}
//the final prewitt sharp image
writeImage("PrewittShapImage.pgm",sharpImage);
}
//if sobel
else if (maskType == "Sobel")
{
//decleration of the grad x and grad y images
ImageType gradX(N,M,Q);
ImageType gradY(N,M,Q);
//main loop to calculate the gradx and grady images
for(int i=padVal; i<padN-padVal;i++)
{
for(int j=padVal;j<padM-padVal;j++)
{
//inner loop dividing the image into 3x3 areas to apply the convolution of the mask
for (int k=0;k<3;k++)
{
for(int l=0;l<3;l++)
{
padded.getPixelVal(i-padVal+k,j-padVal+l,tempPixel);
tempValY += tempPixel* sobelY[k][l];
tempValX+= tempPixel* sobelX[k][l];
}
}
if(tempValX > 255)
{
tempValX = 255;
}
else if(tempValX < 0)
{
tempValX = 0;
}
if(tempValY > 255)
{
tempValY = 255;
}
else if(tempValY < 0)
{
tempValY = 0;
}
gradY.setPixelVal(i-padVal,j-padVal,tempValY);
gradX.setPixelVal(i-padVal,j-padVal,tempValX);
tempValX=0;
tempValY=0;
}
}
//outputs the gradX and gradY images
writeImage("SobelGradX.pgm", gradX);
writeImage("SobelGradY.pgm", gradY);
tempValX = tempValY = 0;
//calculates the final sharpened image
for(int i=0;i<N;i++)
{
for(int j=0;j<M;j++)
{
gradX.getPixelVal(i,j,tempPixel);
gradY.getPixelVal(i,j,tempPixelTwo);
tempPixel = tempPixel*tempPixel;
tempPixelTwo = tempPixelTwo*tempPixelTwo;
tempPixel = tempPixel+tempPixelTwo;
tempPixel = sqrt(tempPixel);
if(tempPixel > 255)
{
tempPixel = 255;
}
sharpImage.setPixelVal(i,j,tempPixel);
tempPixel = tempPixelTwo = 0;
}
}
//writes the sobel sharppened image
writeImage("SobelSharpImage.pgm",sharpImage);
}
//if lapacian
else if (maskType == "Laplacian")
{
//main loop to calculate the laplacian sharppened mask
for(int i=padVal; i<padN-padVal;i++)
{
for(int j=padVal;j<padM-padVal;j++)
{
for (int k=0;k<3;k++)
{
for(int l=0;l<3;l++)
{
padded.getPixelVal(i-padVal+k,j-padVal+l,tempPixel);
tempValX+= tempPixel* laplacian[k][l];
}
}
if(tempValX > 255)
{
tempValX = 255;
}
else if(tempValX < 0)
{
tempValX = 0;
}
sharpImage.setPixelVal(i-padVal,j-padVal,tempValX);
tempValX=0;
}
}
//outputs the laplacian sharp image
writeImage("lapacianSharp.pgm", sharpImage);
tempValX = tempValY = 0;
}
//if you spelled the type of image wrong....dont do that
else
{
cout<<"No valid mask type"<<endl;
}
}
/*
PadImage:
Writen by: Jeremiah Berns
dependencies: Image.h, image.cpp
Discription: PadImage will take in 2 image objects, the old image, and the new image, which is the size of the old image,
plus 2x the pad value. This function will then place the image in the center of the padded image and return
it.
*/
void padImage( ImageType& paddedImage, ImageType oldImage, int padValue)
{
//variable declaration
int N,M,Q,tempValue;
//get paddImage info
paddedImage.getImageInfo(N,M,Q);
//zero out padded image
for(int i=0; i<N;i++)
{
for(int j=0; j<M;j++)
{
paddedImage.setPixelVal(i,j,0);
}
}
//loop through the padded image, and place the old image with in it.
for(int i=padValue;i<N-padValue;i++)
{
for(int j = padValue;j<M-padValue;j++)
{
oldImage.getPixelVal(i-padValue,j-padValue,tempValue);
paddedImage.setPixelVal(i,j,tempValue);
}
}
}
//readimage Function
void readImage(string fname, ImageType& image)
{
int i, j;
int N, M, Q;
unsigned char *charImage;
char header [100], *ptr;
ifstream ifp;
ifp.open(fname.c_str(), ios::in | ios::binary);
if (!ifp) {
cout << "Can't read image: " << fname << endl;
exit(1);
}
// read header
ifp.getline(header,100,'\n');
if ( (header[0]!=80) || /* 'P' */
(header[1]!=53) ) { /* '5' */
cout << "Image " << fname << " is not PGM" << endl;
exit(1);
}
ifp.getline(header,100,'\n');
while(header[0]=='#')
ifp.getline(header,100,'\n');
M=strtol(header,&ptr,0);
N=atoi(ptr);
ifp.getline(header,100,'\n');
Q=strtol(header,&ptr,0);
cout<<Q<<endl;
charImage = (unsigned char *) new unsigned char [M*N];
ifp.read( reinterpret_cast<char *>(charImage), (M*N)*sizeof(unsigned char));
if (ifp.fail()) {
exit(1);
}
ifp.close();
//
// Convert the unsigned characters to integers
//
int val;
for(i=0; i<N; i++)
for(j=0; j<M; j++) {
val = (int)charImage[i*M+j];
image.setPixelVal(i, j, val);
}
}
//Write image function
void writeImage(string fname, ImageType& image)
{
int i, j;
int N, M, Q;
unsigned char *charImage;
ofstream ofp;
image.getImageInfo(N, M, Q);
charImage = (unsigned char *) new unsigned char [M*N];
// convert the integer values to unsigned char
int val;
for(i=0; i<N; i++)
for(j=0; j<M; j++) {
image.getPixelVal(i, j, val);
charImage[i*M+j]=(unsigned char)val;
}
ofp.open(fname.c_str(), ios::out | ios::binary);
if (!ofp) {
cout << "Can't open file: " << fname << endl;
exit(1);
}
ofp << "P5" << endl;
ofp << M << " " << N << endl;
ofp << Q << endl;
ofp.write( reinterpret_cast<char *>(charImage), (M*N)*sizeof(unsigned char));
if (ofp.fail()) {
cout << "Can't write image " << fname << endl;
exit(0);
}
ofp.close();
}
//Read image header funtion
void readImageHeader(string fname, int& N, int& M, int& Q, bool& type)
{
int i, j;
unsigned char *charImage;
char header [100], *ptr;
ifstream ifp;
ifp.open(fname.c_str(), ios::in | ios::binary);
if (!ifp) {
cout << "Can't read image: " << fname << endl;
exit(1);
}
// read header
type = false; // PGM
ifp.getline(header,100,'\n');
if ( (header[0] == 80) && /* 'P' */
(header[1]== 53) ) { /* '5' */
type = false;
}
else if ( (header[0] == 80) && /* 'P' */
(header[1] == 54) ) { /* '6' */
type = true;
}
else {
cout << "Image " << fname << " is not PGM or PPM" << endl;
exit(1);
}
ifp.getline(header,100,'\n');
while(header[0]=='#')
ifp.getline(header,100,'\n');
M=strtol(header,&ptr,0);
N=atoi(ptr);
ifp.getline(header,100,'\n');
Q=strtol(header,&ptr,0);
ifp.close();
}
/*
shrink Image funtion.
Writen By Jeremiah Berns.
Dependincies: image.h, image.cpp
Discription: Will take in the old image, and the new image, and the pixel value
based apon the shrink value passed to it. It will place that value
from the old image into the new image, then save the new image with
the passed in file name.
*/
void shrinkImage(ImageType oldImage, ImageType& newImage, int shrinkVal, string newImageFname)
{
//Variable decliration
int rows, col, Q, tempValue;
//Variable setting
oldImage.getImageInfo(rows, col, Q);
for(int i=0; i<rows;i++)
{
for(int j=0;j<col;j++)
{
if(i%shrinkVal == 0 && j%shrinkVal ==0)
{
oldImage.getPixelVal(i,j, tempValue);
newImage.setPixelVal(i/shrinkVal,j/shrinkVal,tempValue);
}
}
}
writeImage(newImageFname, newImage);
}
/*
Expand image function
Writen by: Jeremiah Berns
Dependincies, image.cpp, image.h
Discription: Will accept the shrunken image, the grow size of the image, and then
expand the image back to 256x256
*/
void expandImage(ImageType oldImage, ImageType& newImage, int growVal, string newImageName)
{
//Variable decliration
int rows, cols, Q, tempValue;
//Variable setting
oldImage.getImageInfo(rows, cols, Q);
for(int i=0;i<rows;i++)
{
for(int j=0;j<cols;j++)
{
oldImage.getPixelVal(i,j, tempValue);
for(int k=0;k<growVal;k++)
{
for(int l=0;l<growVal;l++)
{
newImage.setPixelVal(i*growVal+k,j*growVal+l,tempValue);
}
}
}
}
writeImage(newImageName, newImage);
}
/*
Histogram Equalization function
Written by: Jeremiah Berns
Dependincies:image.h, image.cpp
Discription: This function will perform the histogram equalization algorithem to the oldImage
and will output the newImage with the given newImageName.
*/
void histogramEq(ImageType oldImage, ImageType& newImage, string newImageName)
{
int rows, cols, Q, pixelValue, pixelCount;
oldImage.getImageInfo(rows,cols,Q);
pixelCount = rows*cols;
int adjustedHistogram[Q];
double histogramArray[Q], equalizedHistogram[Q];
double probabilityArray[Q], cumulativeProbability[Q], probTotal=0;
for (int i = 0; i<Q;i++)
{
histogramArray[i] = 0;
equalizedHistogram[i] = 0;
}
for(int i=0; i<rows;i++)
{
for(int j=0; j<cols;j++)
{
oldImage.getPixelVal(i,j,pixelValue);
histogramArray[pixelValue]+=1;
}
}
for(int i=0;i<Q;i++)
{
probTotal+= histogramArray[i]/pixelCount;
cumulativeProbability[i] = probTotal;
cumulativeProbability[i] = cumulativeProbability[i]*255;
adjustedHistogram[i] = cumulativeProbability[i];
cout<<adjustedHistogram[i]<<endl;
}
for(int i=0; i<rows;i++)
{
for(int j=0; j<cols;j++)
{
oldImage.getPixelVal(i,j,pixelValue);
newImage.setPixelVal(i,j,adjustedHistogram[pixelValue-1]);
}
}
writeImage(newImageName, newImage);
}
| [
"jberns407@gmail.com"
] | jberns407@gmail.com |
f1091ab926045df3416cb0a7d12358aada899529 | dd85ae4439f70b0f515aa9ce16f952b52d7d97e0 | /module07/ex01/iter.hpp | aa0afc192eaf9f59074039820019d620083af4f0 | [] | no_license | feechka-patrick/cpp-module | 1a4808958887dfed968bb17f28ed439330dbad74 | ca73218e3ce702a9c78211799152740021ec1f1f | refs/heads/master | 2023-08-29T18:02:05.452620 | 2021-11-12T18:15:05 | 2021-11-12T18:15:05 | 392,346,790 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 206 | hpp | #ifndef ITER_HPP
# define ITER_HPP
# include <iostream>
template<typename T>
void iter(T *array, size_t length, void (*f)(const T&))
{
for (size_t i = 0; i < length; i++)
f(array[i]);
}
#endif | [
"nmisfit@student.21-school.ru"
] | nmisfit@student.21-school.ru |
ba218d46e67bbc80dae9503ec5b52fdee34294bd | a6f4c8c91414d62fad5f8f7f53b1dee9c9d099ee | /R-Portable-Mac/library/BH/include/boost/asio/detail/handler_alloc_helpers.hpp | ee2e80c81d808814107e9931842ecc1b81cdecf9 | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"CC0-1.0"
] | permissive | sdownin/sequencer | 6a2d70777fbd8109e26f126229b5ee10348cf4e7 | 045d0580e673cba6a3bd8ed1a12ff19494bf36fa | refs/heads/master | 2023-08-04T08:06:02.891739 | 2023-08-03T04:07:36 | 2023-08-03T04:07:36 | 221,256,941 | 2 | 1 | CC0-1.0 | 2023-02-04T15:06:14 | 2019-11-12T16:00:50 | C++ | UTF-8 | C++ | false | false | 5,985 | hpp | //
// detail/handler_alloc_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_HPP
#define BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/memory.hpp>
#include <boost/asio/detail/noncopyable.hpp>
#include <boost/asio/detail/recycling_allocator.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/handler_alloc_hook.hpp>
#include <boost/asio/detail/push_options.hpp>
// Calls to asio_handler_allocate and asio_handler_deallocate must be made from
// a namespace that does not contain any overloads of these functions. The
// boost_asio_handler_alloc_helpers namespace is defined here for that purpose.
namespace boost_asio_handler_alloc_helpers {
template <typename Handler>
inline void* allocate(std::size_t s, Handler& h)
{
#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
return ::operator new(s);
#else
using boost::asio::asio_handler_allocate;
return asio_handler_allocate(s, boost::asio::detail::addressof(h));
#endif
}
template <typename Handler>
inline void deallocate(void* p, std::size_t s, Handler& h)
{
#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
::operator delete(p);
#else
using boost::asio::asio_handler_deallocate;
asio_handler_deallocate(p, s, boost::asio::detail::addressof(h));
#endif
}
} // namespace boost_asio_handler_alloc_helpers
namespace boost {
namespace asio {
namespace detail {
template <typename Handler, typename T>
class hook_allocator
{
public:
typedef T value_type;
template <typename U>
struct rebind
{
typedef hook_allocator<Handler, U> other;
};
explicit hook_allocator(Handler& h)
: handler_(h)
{
}
template <typename U>
hook_allocator(const hook_allocator<Handler, U>& a)
: handler_(a.handler_)
{
}
T* allocate(std::size_t n)
{
return static_cast<T*>(
boost_asio_handler_alloc_helpers::allocate(sizeof(T) * n, handler_));
}
void deallocate(T* p, std::size_t n)
{
boost_asio_handler_alloc_helpers::deallocate(p, sizeof(T) * n, handler_);
}
//private:
Handler& handler_;
};
template <typename Handler>
class hook_allocator<Handler, void>
{
public:
typedef void value_type;
template <typename U>
struct rebind
{
typedef hook_allocator<Handler, U> other;
};
explicit hook_allocator(Handler& h)
: handler_(h)
{
}
template <typename U>
hook_allocator(const hook_allocator<Handler, U>& a)
: handler_(a.handler_)
{
}
//private:
Handler& handler_;
};
template <typename Handler, typename Allocator>
struct get_hook_allocator
{
typedef Allocator type;
static type get(Handler&, const Allocator& a)
{
return a;
}
};
template <typename Handler, typename T>
struct get_hook_allocator<Handler, std::allocator<T> >
{
typedef hook_allocator<Handler, T> type;
static type get(Handler& handler, const std::allocator<T>&)
{
return type(handler);
}
};
} // namespace detail
} // namespace asio
} // namespace boost
#define BOOST_ASIO_DEFINE_HANDLER_PTR(op) \
struct ptr \
{ \
Handler* h; \
op* v; \
op* p; \
~ptr() \
{ \
reset(); \
} \
static op* allocate(Handler& handler) \
{ \
typedef typename ::boost::asio::associated_allocator< \
Handler>::type associated_allocator_type; \
typedef typename ::boost::asio::detail::get_hook_allocator< \
Handler, associated_allocator_type>::type hook_allocator_type; \
BOOST_ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
::boost::asio::detail::get_hook_allocator< \
Handler, associated_allocator_type>::get( \
handler, ::boost::asio::get_associated_allocator(handler))); \
return a.allocate(1); \
} \
void reset() \
{ \
if (p) \
{ \
p->~op(); \
p = 0; \
} \
if (v) \
{ \
typedef typename ::boost::asio::associated_allocator< \
Handler>::type associated_allocator_type; \
typedef typename ::boost::asio::detail::get_hook_allocator< \
Handler, associated_allocator_type>::type hook_allocator_type; \
BOOST_ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
::boost::asio::detail::get_hook_allocator< \
Handler, associated_allocator_type>::get( \
*h, ::boost::asio::get_associated_allocator(*h))); \
a.deallocate(static_cast<op*>(v), 1); \
v = 0; \
} \
} \
} \
/**/
#define BOOST_ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(op) \
struct ptr \
{ \
const Alloc* a; \
void* v; \
op* p; \
~ptr() \
{ \
reset(); \
} \
static op* allocate(const Alloc& a) \
{ \
typedef typename ::boost::asio::detail::get_recycling_allocator< \
Alloc>::type recycling_allocator_type; \
BOOST_ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
::boost::asio::detail::get_recycling_allocator<Alloc>::get(a)); \
return a1.allocate(1); \
} \
void reset() \
{ \
if (p) \
{ \
p->~op(); \
p = 0; \
} \
if (v) \
{ \
typedef typename ::boost::asio::detail::get_recycling_allocator< \
Alloc>::type recycling_allocator_type; \
BOOST_ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
::boost::asio::detail::get_recycling_allocator<Alloc>::get(*a)); \
a1.deallocate(static_cast<op*>(v), 1); \
v = 0; \
} \
} \
} \
/**/
#include <boost/asio/detail/pop_options.hpp>
#endif // BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_HPP
| [
"pgordon@cbuscollaboratory.com"
] | pgordon@cbuscollaboratory.com |
992273eb7dc3f139de953700e16770b735f9d812 | 415984c24c97d4252d6241788024c20d5d6362b5 | /Arduino/encodertest/encodertest.ino | 186e5328a3482135ac17c7aa9cea837067dc5ab4 | [] | no_license | sbavlani/Rotary-encoder | 0d599c78a383c7bea359d8e97b28221302cea653 | 53ac6d61e40c1fdbf352d25dcbfc1418d299e68e | refs/heads/master | 2021-01-20T18:39:09.446799 | 2016-07-08T09:23:43 | 2016-07-08T09:23:43 | 62,876,628 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,090 | ino | int pinA = 3; //Connected to CLK pin
int pinB = 4; // Connected to DT pin
int encoderPosCount = 0; // Determine position of encoder. Encoder completes full rotation after 30 clicks
int pinALast;
int aVal;
boolean bCW;
void setup() {
pinMode (pinA,INPUT);
pinMode (pinB,INPUT);
pinALast = digitalRead(pinA);
Serial.begin (115200);
}
void loop() {
aVal = digitalRead(pinA);
if (aVal != pinALast){ // Means the knob is rotating
// if the knob is rotating, we need to determine direction
// We do that by reading pin B.
if (digitalRead(pinB) != aVal) { // Means pin A Changed first - We're Rotating Clockwise
encoderPosCount ++;
bCW = true;
} else {// Otherwise B changed first and we're moving CCW
bCW = false;
encoderPosCount--;
}
Serial.print ("Rotated: ");
if (bCW){
Serial.println ("clockwise");
}else{
Serial.println("counterclockwise");
}
Serial.print("Encoder Position: ");
Serial.println(encoderPosCount);
}
pinALast = aVal;
}
| [
"noreply@github.com"
] | sbavlani.noreply@github.com |
496843ef3b4f5b0383954ccf13602d4b41dc0601 | 3ff1fe3888e34cd3576d91319bf0f08ca955940f | /tione/include/tencentcloud/tione/v20211111/model/MetricData.h | d58688132528c2d087916fd446e482cdcf49d97d | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-cpp | 9f5df8220eaaf72f7eaee07b2ede94f89313651f | 42a76b812b81d1b52ec6a217fafc8faa135e06ca | refs/heads/master | 2023-08-30T03:22:45.269556 | 2023-08-30T00:45:39 | 2023-08-30T00:45:39 | 188,991,963 | 55 | 37 | Apache-2.0 | 2023-08-17T03:13:20 | 2019-05-28T08:56:08 | C++ | UTF-8 | C++ | false | false | 10,686 | 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_TIONE_V20211111_MODEL_METRICDATA_H_
#define TENCENTCLOUD_TIONE_V20211111_MODEL_METRICDATA_H_
#include <string>
#include <vector>
#include <map>
#include <tencentcloud/core/utils/rapidjson/document.h>
#include <tencentcloud/core/utils/rapidjson/writer.h>
#include <tencentcloud/core/utils/rapidjson/stringbuffer.h>
#include <tencentcloud/core/AbstractModel.h>
#include <tencentcloud/tione/v20211111/model/DataPoint.h>
namespace TencentCloud
{
namespace Tione
{
namespace V20211111
{
namespace Model
{
/**
* 指标数据
*/
class MetricData : public AbstractModel
{
public:
MetricData();
~MetricData() = default;
void ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const;
CoreInternalOutcome Deserialize(const rapidjson::Value &value);
/**
* 获取训练任务id
* @return TaskId 训练任务id
*
*/
std::string GetTaskId() const;
/**
* 设置训练任务id
* @param _taskId 训练任务id
*
*/
void SetTaskId(const std::string& _taskId);
/**
* 判断参数 TaskId 是否已赋值
* @return TaskId 是否已赋值
*
*/
bool TaskIdHasBeenSet() const;
/**
* 获取时间戳.unix timestamp,单位为秒
注意:此字段可能返回 null,表示取不到有效值。
* @return Timestamp 时间戳.unix timestamp,单位为秒
注意:此字段可能返回 null,表示取不到有效值。
*
*/
int64_t GetTimestamp() const;
/**
* 设置时间戳.unix timestamp,单位为秒
注意:此字段可能返回 null,表示取不到有效值。
* @param _timestamp 时间戳.unix timestamp,单位为秒
注意:此字段可能返回 null,表示取不到有效值。
*
*/
void SetTimestamp(const int64_t& _timestamp);
/**
* 判断参数 Timestamp 是否已赋值
* @return Timestamp 是否已赋值
*
*/
bool TimestampHasBeenSet() const;
/**
* 获取用户uin
注意:此字段可能返回 null,表示取不到有效值。
* @return Uin 用户uin
注意:此字段可能返回 null,表示取不到有效值。
*
*/
std::string GetUin() const;
/**
* 设置用户uin
注意:此字段可能返回 null,表示取不到有效值。
* @param _uin 用户uin
注意:此字段可能返回 null,表示取不到有效值。
*
*/
void SetUin(const std::string& _uin);
/**
* 判断参数 Uin 是否已赋值
* @return Uin 是否已赋值
*
*/
bool UinHasBeenSet() const;
/**
* 获取本次上报数据所处的训练周期数。
注意:此字段可能返回 null,表示取不到有效值。
* @return Epoch 本次上报数据所处的训练周期数。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
int64_t GetEpoch() const;
/**
* 设置本次上报数据所处的训练周期数。
注意:此字段可能返回 null,表示取不到有效值。
* @param _epoch 本次上报数据所处的训练周期数。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
void SetEpoch(const int64_t& _epoch);
/**
* 判断参数 Epoch 是否已赋值
* @return Epoch 是否已赋值
*
*/
bool EpochHasBeenSet() const;
/**
* 获取本次上报数据所处的训练迭代次数。
注意:此字段可能返回 null,表示取不到有效值。
* @return Step 本次上报数据所处的训练迭代次数。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
int64_t GetStep() const;
/**
* 设置本次上报数据所处的训练迭代次数。
注意:此字段可能返回 null,表示取不到有效值。
* @param _step 本次上报数据所处的训练迭代次数。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
void SetStep(const int64_t& _step);
/**
* 判断参数 Step 是否已赋值
* @return Step 是否已赋值
*
*/
bool StepHasBeenSet() const;
/**
* 获取训练停止所需的迭代总数。
注意:此字段可能返回 null,表示取不到有效值。
* @return TotalSteps 训练停止所需的迭代总数。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
int64_t GetTotalSteps() const;
/**
* 设置训练停止所需的迭代总数。
注意:此字段可能返回 null,表示取不到有效值。
* @param _totalSteps 训练停止所需的迭代总数。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
void SetTotalSteps(const int64_t& _totalSteps);
/**
* 判断参数 TotalSteps 是否已赋值
* @return TotalSteps 是否已赋值
*
*/
bool TotalStepsHasBeenSet() const;
/**
* 获取数据点。数组元素为不同指标的数据。数组长度不超过10。
注意:此字段可能返回 null,表示取不到有效值。
* @return Points 数据点。数组元素为不同指标的数据。数组长度不超过10。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
std::vector<DataPoint> GetPoints() const;
/**
* 设置数据点。数组元素为不同指标的数据。数组长度不超过10。
注意:此字段可能返回 null,表示取不到有效值。
* @param _points 数据点。数组元素为不同指标的数据。数组长度不超过10。
注意:此字段可能返回 null,表示取不到有效值。
*
*/
void SetPoints(const std::vector<DataPoint>& _points);
/**
* 判断参数 Points 是否已赋值
* @return Points 是否已赋值
*
*/
bool PointsHasBeenSet() const;
private:
/**
* 训练任务id
*/
std::string m_taskId;
bool m_taskIdHasBeenSet;
/**
* 时间戳.unix timestamp,单位为秒
注意:此字段可能返回 null,表示取不到有效值。
*/
int64_t m_timestamp;
bool m_timestampHasBeenSet;
/**
* 用户uin
注意:此字段可能返回 null,表示取不到有效值。
*/
std::string m_uin;
bool m_uinHasBeenSet;
/**
* 本次上报数据所处的训练周期数。
注意:此字段可能返回 null,表示取不到有效值。
*/
int64_t m_epoch;
bool m_epochHasBeenSet;
/**
* 本次上报数据所处的训练迭代次数。
注意:此字段可能返回 null,表示取不到有效值。
*/
int64_t m_step;
bool m_stepHasBeenSet;
/**
* 训练停止所需的迭代总数。
注意:此字段可能返回 null,表示取不到有效值。
*/
int64_t m_totalSteps;
bool m_totalStepsHasBeenSet;
/**
* 数据点。数组元素为不同指标的数据。数组长度不超过10。
注意:此字段可能返回 null,表示取不到有效值。
*/
std::vector<DataPoint> m_points;
bool m_pointsHasBeenSet;
};
}
}
}
}
#endif // !TENCENTCLOUD_TIONE_V20211111_MODEL_METRICDATA_H_
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
a743f2c873f23396f6df473838f240e256b08783 | 65d3c23337b057c0187ce00430db0172dcda50bc | /Userland/Libraries/LibDebug/Dwarf/DIE.h | a1f4a278e8a46651ef363a9a8e99ace6a319d034 | [
"BSD-2-Clause"
] | permissive | Fly-Style/serenity | 7b6620b2bfb25b4fd4a542c5363c42155b53036c | 7400e3d8fc5ecd2be83830cab0c9bf560b7d2105 | refs/heads/master | 2023-04-08T21:37:59.264810 | 2021-04-20T17:47:23 | 2021-04-20T17:47:23 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,265 | h | /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "CompilationUnit.h"
#include "DwarfTypes.h"
#include <AK/Function.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/Optional.h>
#include <AK/Types.h>
namespace Debug::Dwarf {
class CompilationUnit;
// DIE = Debugging Information Entry
class DIE {
public:
DIE(const CompilationUnit&, u32 offset);
struct AttributeValue {
enum class Type : u8 {
UnsignedNumber,
SignedNumber,
LongUnsignedNumber,
String,
DieReference, // Reference to another DIE in the same compilation unit
Boolean,
DwarfExpression,
SecOffset,
RawBytes,
} type;
union {
u32 as_u32;
i32 as_i32;
u64 as_u64;
const char* as_string; // points to bytes in the memory mapped elf image
bool as_bool;
struct {
u32 length;
const u8* bytes; // points to bytes in the memory mapped elf image
} as_raw_bytes;
} data {};
};
u32 offset() const { return m_offset; }
u32 size() const { return m_size; }
bool has_children() const { return m_has_children; }
EntryTag tag() const { return m_tag; }
Optional<AttributeValue> get_attribute(const Attribute&) const;
void for_each_child(Function<void(const DIE& child)> callback) const;
bool is_null() const { return m_tag == EntryTag::None; }
DIE get_die_at_offset(u32 offset) const;
private:
AttributeValue get_attribute_value(AttributeDataForm form,
InputMemoryStream& debug_info_stream) const;
const CompilationUnit& m_compilation_unit;
u32 m_offset { 0 };
u32 m_data_offset { 0 };
size_t m_abbreviation_code { 0 };
EntryTag m_tag { EntryTag::None };
bool m_has_children { false };
u32 m_size { 0 };
};
}
| [
"kling@serenityos.org"
] | kling@serenityos.org |
3c8e038ffd259f82ce1aa731f9326d5bb2db11c8 | 9e6e8afb7c77068ca971c348d00979f9dee5272f | /huffman编码poj1521 Entropy.cpp | 6089d070ae380f0a30c2d189b7dfe75f0565fdd8 | [] | no_license | Jesse-Mcrae/Codes | 69d13d6a7d5ae96256b1d05a28bcdc28593df243 | 5cda22406a4b5f4fe27902f6be32f74483fb8c42 | refs/heads/master | 2020-06-30T22:11:14.626070 | 2019-10-28T11:11:41 | 2019-10-28T11:11:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 652 | cpp | #include<bits/stdc++.h>
using namespace std;
double ask;
int main()
{
string s;
double Huffman;
priority_queue<int,vector<int>,greater<int> > q;
while(getline(cin,s) && s!="END")
{
ask=s.size()*8;
int t=1;
sort(s.begin(),s.end());
for(int i=1;i<s.size();i++)
{
if(s[i]!=s[i-1])
{
q.push(t);
t=1;
}
else t++;
}
q.push(t);
Huffman=0;
while(q.size()>1)
{
int ops=q.top();
q.pop();
int oops=q.top();
q.pop();
q.push(ops+oops);
Huffman+=ops+oops;
}
q.pop();
}
double divide=ask/Huffman;
printf("%.0lf %.0lf %.1lf",ask,Huffman,divide);
return 0;
}
| [
"noreply@github.com"
] | Jesse-Mcrae.noreply@github.com |
72ea4f12a70d6517e942a4d356b1adc099b9c430 | 5bf10f2b54b03ba0f18c921691bf882c8ab1882c | /src/cc/qfsc/qfs.h | 39afe316f52f021541a559a3fedccb75f8470202 | [
"Apache-2.0"
] | permissive | subrata4096/qfs-repair | fa383430a6a8e386946b2bad4ae290e54462cf6d | dba4ef5b78ad4b1bd8ef6e8ff902471afbd704a2 | refs/heads/master | 2021-01-20T18:36:03.401370 | 2015-10-16T20:55:21 | 2015-10-16T20:55:21 | 40,488,701 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,550 | h | // QFS C API
//
// This file contains C compatible binds for the KfsClient C++ API. It
// attempts to provide a simple and idiomatic mapping into C function space,
// reducing allocations and copies where possible.
//
// At this time, these bindings are considered experimental and there is no
// guarantee that the ABI format will remain the same between releases.
#ifndef LIBQFSC
#define LIBQFSC
#ifdef __cplusplus
#include <string>
#include <vector>
extern "C" {
#endif // __cplusplus
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
// TODO(sday): Add size checks at compile for size of off_t, size_t, ssize_t,
// uid_t, gid_t and mode_t to ensure they match qfs. We're not going to add a
// bunch of specialized types to port these to other systems, but compilation
// should fail if the storage sizes are too small.
// QFS is the opaque handle used to manage a callers usage of the qfs
// library. QFS should only be allocated and freed via qfs_connect and
// qfs_release.
struct QFS;
enum qfs_striper_type {
KFS_STRIPED_FILE_TYPE_UNKNOWN = 0,
KFS_STRIPED_FILE_TYPE_NONE = 1,
KFS_STRIPED_FILE_TYPE_RS = 2,
KFS_STRIPED_FILE_TYPE_RS_JERASURE = 3 //subrata: this is important. And this is what are going to use for our custom implementation
};
// From KfsClient.h
#define QFS_MAX_FILENAME_LEN 256
// qfs_attr provides data about a file in qfs.
struct qfs_attr {
// From KFS::KfsFileAttr
const char filename[QFS_MAX_FILENAME_LEN];
// From KFS::Permissions
uid_t uid;
gid_t gid;
mode_t mode;
// From KFS::FileAttr
int64_t id; /// i-node number
struct timeval mtime; /// modification time
struct timeval ctime; /// attribute change time
struct timeval crtime; /// creation time
bool directory; /// is this a directory?
size_t size; /// logical eof
size_t chunks; /// number of chunks in the file or files in directory
size_t directories; /// directories count
int16_t replicas;
int16_t stripes;
int16_t recovery_stripes;
enum qfs_striper_type striper_type;
int32_t stripe_size;
int8_t min_stier;
int8_t max_stier;
};
// qfs_iter is an opaque, iterator type, used for reentrant iteration.
struct qfs_iter;
// qfs_connect connects to the specified metaserver, returning a QFS handle.
// On error, this function will return NULL.
struct QFS* qfs_connect(const char* host, int port);
// qfs_release disconnects and deallocates any resources or memory
// associated with this QFS handle.
void qfs_release(struct QFS* qfs);
// qfs_strerror will return the a human-readable string corresponding to
// status. This function can be applied safely to the result of most qfs
// methods.
const char* qfs_strerror(int status, char* buffer, size_t len);
// qfs_cd changes the current working directory for the provided QFS handle.
int qfs_cd(struct QFS* qfs, const char* path);
// qfs_setcwd sets the current working directory for the QFS handle.
int qfs_setwd(struct QFS* qfs, const char* path);
// qfs_getwd writes the working directory into wd, up to len characters.
// The full written length is returned including a trailing null byte. If
// the return value is greater than or equal to the len argument, the
// working directory was truncated.
int qfs_getwd(struct QFS* qfs, char* wd, size_t len);
// qfs_mkdir creates the directory at path, with mode, returning a negative
// integer on error.
int qfs_mkdir(struct QFS* qfs, const char* path, mode_t mode);
// qfs_mkdirs will create a directory and any non-existent parents specified
// by path. It is the analogue to 'mkdir -p'.
int qfs_mkdirs(struct QFS* qfs, const char* path, mode_t mode);
// qfs_rmdir removes the directory at path.
int qfs_rmdir(struct QFS* qfs, const char* path);
// qfs_rmdirs recursively removes the directory at path and any of its
// children.
int qfs_rmdirs(struct QFS* qfs, const char* path);
// qfs_iter_free releases any memory allocated by any iterable function,
// returning the iterator to a fresh state.
void qfs_iter_free(struct qfs_iter** iter);
// qfs_readdir iterates through all directory entries in the given path,
// writing the result into attr after each call, returning the 1-based,
// reverse index (see below for recommend usage). If an error occurred, the
// return value will be negative and contain an errno. The parameter iter
// should be freed with qfs_iter_free regardless of the result.
//
// If any results in attr need to be used, they must be copied out before
// the next iteration, as the storage location may be reused or freed.
//
// Note that this scheme is meant to reduce memory copies from C++ data
// structures; qfs_readdir will still require enough memory internally to
// store all the directory entries at a given path.
//
// Usage:
//
// qfs_iter iter = NULL;
// struct qfs_attr attr;
// int left;
// while((left = qfs_readdir(qfs, "/", &iter, &attr) > 0) {
// // ... work with attr
// if(some condition) {
// // qfs_readdir_iter_free must be called if breaking iteration.
// qfs_iter_free(&iter);
// break;
// }
// }
//
// if(left < 0) { // handle error condition }
//
int qfs_readdir(struct QFS* qfs, const char* path, struct qfs_iter** iter, struct qfs_attr* attr);
// qfs_readdirnames iterates through all the file names in the given path if
// it is a directory, pointing the result at the directing name, returning
// the reverse, 1-based index of the entry. The iter parameter should be
// freed with qfs_iter_free, regardless of the result. If value pointed to
// by dentry is to be used after the next following call to
// qfs_readdirnames, it should be copied before continuing to the next
// iteration.
//
// The semantics of this function are similar to qfs_readdir and the same
// conventions should be followed in its use.
//
// If only the filenames are required, use this function as opposed to
// qfs_readdir to reduce to memory storage requirements. The memory required
// is still linear in the number of directory entries, but only the file
// names are stored, rather than the entire attribute structure.
int qfs_readdirnames(struct QFS* qfs, const char* path, struct qfs_iter** iter, const char** dentry);
// Omitted OpenDirectory has been omitted because its similar in
// functionality to ReaddirPlus, doesn't save on KfsClient/FileTable memory
// usage and is harder to use.
// qfs_stat/qfs_stat_fd provide the qfs_attr for the file at path or
// reference by id.
int qfs_stat(struct QFS* qfs, const char* path, struct qfs_attr* attr);
int qfs_stat_fd(struct QFS* qfs, int fd, struct qfs_attr* attr);
// Omitted GetNumChunks in favor of call to Stat
ssize_t qfs_get_chunksize(struct QFS* qfs, const char* path);
// Omitted UpdateFileSize due to lack of difference from Sync.
// qfs_exists returns true if the file or directory referenced by path
// exists.
bool qfs_exists(struct QFS* qfs, const char* path);
// qfs_isfile returns true if the entry at path is a regular file.
bool qfs_isfile(struct QFS* qfs, const char* path);
// qfs_isdirectory returns true if path is a directory.
bool qfs_isdirectory(struct QFS* qfs, const char* path);
// Omitted BlockInfo, EnumerateBlocks, CompareChunkReplicas
// qfs_verify_checksums/qfs_verify_checksums_fd verifies the checksums for
// all replicas specified by path or fd, returning 0 on OK, 1 on mismatch
// and negative on error.
int qfs_verify_checksums(struct QFS* qfs, const char* path);
int qfs_verify_checksums_fd(struct QFS* qfs, int fd);
// qfs_remove removes the file specified by path.
int qfs_remove(struct QFS* qfs, const char* path);
// qfs_rename renames the file or directory at oldpath to newpath.
int qfs_rename(struct QFS* qfs, const char* oldpath, const char* newpath);
// Omitted ColaesceBlocks
// qfs_set_mtime sets the modification time to timeval.
int qfs_set_mtime(struct QFS* qfs, const char* path, struct timeval* mtime);
// qfs_create will create a file at path, returning an opening fd for
// writing. qfs_create will fail if the file already exists.
int qfs_create(struct QFS* qfs, const char* path);
// qfs_open opens a file for reading, returning a valid file descriptor, if
// successful.
int qfs_open(struct QFS* qfs, const char* path);
// qfs_open_file opens a file with the specified path, mode, and params.
int qfs_open_file(struct QFS* qfs, const char* path, int oflags, uint16_t mode, const char* params);
// qfs_close closes the provided fd.
int qfs_close(struct QFS* qfs, int fd);
// TODO(sday): qfs_record_append/qfs_atomic_record_append should be omitted
// as they are really deprecated in the C++ API.
// qfs_record_append appends the record, defined by buf and len, to the
// provided fd.
int qfs_record_append(struct QFS* qfs, int fd, const char* buf, size_t len);
// qfs_atomic_record_append atomically appends the record, defined by buf
// and len, to the provided fd.
int qfs_atomic_record_append(struct QFS* qfs, int fd, const char* buf, size_t len);
// qfs_read reads up to len bytes from fd into buf at the current file
// position.
ssize_t qfs_read(struct QFS* qfs, int fd, void* buf, size_t len);
// qfs_pread reads up len bytes from fd into buf at offset without updating
// the current file position.
ssize_t qfs_pread(struct QFS* qfs, int fd, void *buf, size_t len, off_t offset);
// qfs_write writes len bytes from buf to fd at the current file position.
ssize_t qfs_write(struct QFS* qfs, int fd, const void *buf, size_t len);
// qfs_pwrite writes len bytes to fd at offset without updating the currect
// file position.
ssize_t qfs_pwrite(struct QFS* qfs, int fd, const void *buf, size_t len, off_t offset);
// qfs_set_skipholes instructs the client to skip holes when reading fd.
void qfs_set_skipholes(struct QFS* qfs, int fd);
// qfs_sync syncs out any unwritten data to fd.
int qfs_sync(struct QFS* qfs, int fd);
// qfs_set_eofmark sets the end of file mark for the given fd.
void qfs_set_eofmark(struct QFS* qfs, int fd, off_t offset);
// qfs_seek changes the current file position based on offset and whence,
// returning the resulting seek offset.
off_t qfs_seek(struct QFS* qfs, int fd, off_t offset, int whence);
// qfs_tell returns the current position in fd.
off_t qfs_tell(struct QFS* qfs, int fd);
// qfs_truncate/qfs_truncate_fd truncates the file specified by fd to the
// provided offset.
int qfs_truncate(struct QFS* qfs, const char* path, off_t offset);
int qfs_truncate_fd(struct QFS* qfs, int fd, off_t offset);
// qfs_prune removes all data up to offset from the head of fd.
int qfs_prune(struct QFS* qfs, int fd, int64_t offset);
// qfs_chmod, et. al change the file mode for the path or fd. qfs_chmodr
// does so recursively.
int qfs_chmod(struct QFS* qfs, const char* path, mode_t mode);
int qfs_chmod_fd(struct QFS* qfs, int fd, mode_t mode);
int qfs_chmod_r(struct QFS* qfs, const char* path, mode_t mode);
// qfs_chown, et. al changes the owner of the file specified by path or fd.
// qfs_chown_r does so recursively.
int qfs_chown(struct QFS* qfs, const char* name, uint32_t user, uint32_t group);
int qfs_chown_r(struct QFS* qfs, const char* name, uint32_t user, uint32_t group);
int qfs_chown_fd(struct QFS* qfs, int fd, uint32_t user, uint32_t group);
// qfs_get_metaserver_location returns the current metaserver location in
// host:port format. Up to len-1 data will be written to location, followed
// by a terminating \0. If the return value is greater than or equal to len,
// the write was truncated.
int qfs_get_metaserver_location(struct QFS* qfs, char* location, size_t len);
// Omitted GetReplicationFactor omitted in favor of stat call
// qfs_set_replicationfactor sets the replication factor for the node at
// path. qfs_set_replicationfactor_r does so for path and its children.
int16_t qfs_set_replicationfactor(struct QFS* qfs, const char* path, int16_t replicas);
int16_t qfs_set_replicationfactor_r(struct QFS* qfs, const char* path, int16_t replicas);
// qfs_get_data_locations/_fd iterates over the inner product of the block
// and all its locations that make up the region of the file for the
// specified path or fd. The iteration state is managed via iter, which
// should be freed by qfs_locations_iter_free if the iteration does not
// complete. The semantics are similar to that of qfs_readdir, except the
// return value corresponds to the number of blocks left, rather than the
// number of calls, returning 0 when complete and -errno on error.
//
// Usage:
//
// qfs_iter iter;
// char** location;
// int nentries;
// int res;
//
// while((res = qfs_get_data_locations(qfs,
// "/test", 0, 134217728, &iter, &chunk, &location)) > 0) {
// printf("chunk: %lli location: %s\n", chunk, location);
//
// if(some condition) {
// // Early termination requires a free of iter.
// break;
// }
// }
//
// if(res < 0) {
// printf("error getting data locations: %s\n", qfs_strerror(res));
// }
//
// qfs_iter_free(iter);
//
int qfs_get_data_locations(struct QFS* qfs,
const char* path, off_t offset, size_t len,
struct qfs_iter** iter, off_t* chunk, const char** locations);
int qfs_get_data_locations_fd(struct QFS* qfs,
int fd, off_t offset, size_t len,
struct qfs_iter** iter, off_t* chunk, const char** locations);
// qfs_get_default_iotimeout/qfs_set_default_iotimeout accesses and set the
// default io timeout used with this instance of qfs.
void qfs_set_default_iotimeout(struct QFS* qfs, int nsecs);
int qfs_get_default_iotimeout(struct QFS* qfs);
// qfs_get_retrydelay/qfs_set_retrydelay accesses and sets the retry delay
// for filesystem operations.
void qfs_set_retrydelay(struct QFS* qfs, int nsecs);
int qfs_get_retrydelay(struct QFS* qfs);
// qfs_set_max_retryperop/qfs_get_max_retryperop sets the maximum number of
// retries per QFS operation before reporting failure.
void qfs_set_max_retryperop(struct QFS* qfs, int retries);
int qfs_get_max_retryperop(struct QFS* qfs);
// qfs_set_default_iobuffersize/qfs_get_default_iobuffersize controls the
// default io buffer size used for new file descriptors. This does not
// affect currently open files.
size_t qfs_set_default_iobuffersize(struct QFS* qfs, size_t size);
size_t qfs_get_default_iobuffersize(struct QFS* qfs);
// qfs_set_iobuffersize/qfs_get_iobuffersize controls the buffer size used
// for operations on fd.
size_t qfs_set_iobuffersize(struct QFS* qfs, int fd, size_t size);
size_t qfs_get_iobuffersize(struct QFS* qfs, int fd);
// qfs_set_default_readaheadsize/qfs_get_default_readaheadsize controls the
// readaheadsize applied to newly opened files.
size_t qfs_set_default_readaheadsize(struct QFS* qfs, size_t size);
size_t qfs_get_default_readaheadsize(struct QFS* qfs);
// qfs_set_readaheadsize/qfs_get_readaheadsize controls the current
// readahead size for a given file descriptor.
size_t qfs_set_readaheadsize(struct QFS* qfs, int fd, size_t size);
size_t qfs_get_readaheadsize(struct QFS* qfs, int fd);
// GetFileOrChunkInfo as the specific use case is not clear.
// qfs_set_default_sparsefilesupport enables sparse file support for new
// file descriptors.
void qfs_set_default_sparsefilesupport(struct QFS* qfs, bool flag);
// qfs_set_sparsefilesupport enables sparse file support for the given fd.
// This call must be issued before the first read.
int qfs_set_sparsefilesupport(struct QFS* qfs, int fd, bool flag);
// qfs_set_fileattributerevalidatetime sets the time after which file
// attributes are considered stale and must be re-read.
void qfs_set_fileattributerevalidatetime(struct QFS* qfs, int seconds);
// NOTE(sday): The following methods concerning users and groups should be
// considered extra experimental. While we've exposed a useful set of the
// C++ functionality, this will likely change.
void qfs_set_umask(struct QFS* qfs, mode_t mode);
mode_t qfs_get_umask(struct QFS* qfs);
uint32_t qfs_getuid(struct QFS* qfs);
// qfs_get_userandgroupnames looks up the names for uid and gid and writes
// up to ulen or glen bytes to user and group, respectively.
int qfs_get_userandgroupnames(struct QFS* qfs,
uid_t uid, gid_t gid,
char* user, size_t ulen,
char* group, size_t glen);
// qfs_get_userandgroupids looks up the uid and gid named by user and group.
int qfs_get_userandgroupids(struct QFS* qfs,
char* user, char* group,
uid_t* uid, gid_t* gid);
// Omitted GetReplication in favor of Stat call
// qfs_set_euserandegroup sets the effective, primary user and group and the
// current group memberships.
int qfs_set_euserandegroup(struct QFS* qfs,
uid_t uid, gid_t gid,
gid_t* gids, int ngroups);
// TODO(sday): Provide some control over the logging system from the c
// client. It can be handy for debugging.
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // LIBQFSC
| [
"subrata4096@gmail.com"
] | subrata4096@gmail.com |
131e17ffc9aae4e5aa9dccf029858b3024861f0a | 179b22e8de93e4576afb7abe7105a186d37de5a4 | /OpenProjectCreator/ExtendedVPCParser.h | b8db7a8f720f1d260d4dc5b422f71a4211c38728 | [
"BSD-Source-Code"
] | permissive | ozxybox/OpenProjectCreator | 94775a172431ec6db1a7f883a4dbdb34694cc15d | 8432283ac8caea9fd3f973840d9cd5e8b5722ab0 | refs/heads/master | 2022-11-17T10:11:19.604675 | 2020-06-23T16:45:09 | 2020-06-23T16:45:09 | 266,699,251 | 1 | 1 | NOASSERTION | 2020-06-23T01:43:19 | 2020-05-25T06:17:23 | C++ | UTF-8 | C++ | false | false | 86 | h | #pragma once
#include "VPCParser.h"
class ExtendedVPCParser : public VPCParser
{
};
| [
"kieferstashu@gmail.com"
] | kieferstashu@gmail.com |
24354302197844a0020dda61327f4031c52d3df8 | 973238bc7fa2f929204fbd75ee54a5aa1a34781e | /De_1/src/BanDoc.h | fdd492cbc8f2fd00ce088510fa5e843b19ea5ea5 | [] | no_license | nguyenvanson9x/JAVA | 00aa60e1611a37f61be7a393f2254899367fb106 | 9b41608015cc23668f57b9cc450ad86cbcffd2b9 | refs/heads/master | 2021-01-20T00:20:26.286203 | 2017-05-31T14:23:52 | 2017-05-31T14:23:52 | 89,112,692 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 640 | h | /*
* BanDoc.h
*
* Created on: Mar 17, 2017
* Author: Nguyen Van Son
*/
#ifndef BANDOC_H_
#define BANDOC_H_
#include "Nguoi.h"
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
class BanDoc: public Nguoi {
//friend class QLMS;
private:
int ma_the_doc, loai_ban_doc;
public:
BanDoc();
virtual ~BanDoc();
void nhap_BanDoc();
void xuat_BanDoc();
void write_BanDoc(fstream &w) {
w.write(reinterpret_cast<const char*>(this), sizeof(BanDoc));
}
void read_BanDoc(fstream &r) {
r.read(reinterpret_cast<char*>(this), sizeof(BanDoc));
}
};
#endif /* BANDOC_H_ */
| [
"asanfc9x@gmail.com"
] | asanfc9x@gmail.com |
6140f2de6e9a0dfe3cb719e195353a712dcd4659 | 6e54448e4e7dcefea9f484792774a21130840342 | /src/video_rxtx/sage.cpp | 3f6809df000f7f2b2177e776628b8c4aed2098dd | [
"BSD-3-Clause",
"OpenSSL"
] | permissive | mohnkhan/UltraGrid | 14249b2a92817ec67858173f16ce710e090aba5a | 43889a469171c2e569ee45e502ba6ff96a26b842 | refs/heads/master | 2020-05-01T03:55:59.083962 | 2019-03-05T17:17:12 | 2019-03-22T09:18:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,086 | cpp | /**
* @file video_rxtx/sage.cpp
* @author Martin Pulec <pulec@cesnet.cz>
*/
/*
* Copyright (c) 2013-2014 CESNET z.s.p.o.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, is permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of CESNET nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config_unix.h"
#include "config_win32.h"
#endif // HAVE_CONFIG_H
#include <string>
#include <sstream>
#include "host.h"
#include "lib_common.h"
#include "video_display.h"
#include "video_rxtx/sage.h"
#include "video_rxtx.h"
#include "video.h"
using namespace std;
sage_video_rxtx::sage_video_rxtx(map<string, param_u> const ¶ms) :
video_rxtx(params)
{
ostringstream oss;
if (params.at("opts").ptr) {
oss << static_cast<const char *>(params.at("opts").ptr) << ":";
}
oss << "fs=" << static_cast<const char *>(params.at("receiver").ptr);
oss << ":tx"; // indicates that we are in tx mode
int ret = initialize_video_display(&m_sender_mod, "sage",
oss.str().c_str(), 0, NULL, &m_sage_tx_device);
if(ret != 0) {
throw string("Unable to initialize SAGE TX.");
}
ret = pthread_create(&m_thread_id, NULL, (void * (*)(void *)) display_run,
&m_sage_tx_device);
assert(ret == 0);
memset(&m_saved_video_desc, 0, sizeof(m_saved_video_desc));
}
void sage_video_rxtx::send_frame(shared_ptr<video_frame> tx_frame)
{
if(!video_desc_eq(m_saved_video_desc,
video_desc_from_frame(tx_frame.get()))) {
display_reconfigure(m_sage_tx_device,
video_desc_from_frame(tx_frame.get()), VIDEO_NORMAL);
m_saved_video_desc = video_desc_from_frame(tx_frame.get());
}
struct video_frame *frame =
display_get_frame(m_sage_tx_device);
memcpy(frame->tiles[0].data, tx_frame->tiles[0].data,
tx_frame->tiles[0].data_len);
display_put_frame(m_sage_tx_device, frame, PUTF_NONBLOCK);
}
sage_video_rxtx::~sage_video_rxtx()
{
// poisoned pill to exit thread
display_put_frame(m_sage_tx_device, NULL, PUTF_NONBLOCK);
pthread_join(m_thread_id, NULL);
display_done(m_sage_tx_device);
}
static video_rxtx *create_video_rxtx_sage(std::map<std::string, param_u> const ¶ms)
{
return new sage_video_rxtx(params);
}
static const struct video_rxtx_info sage_video_rxtx_info = {
"SAGE",
create_video_rxtx_sage
};
REGISTER_MODULE(sage, &sage_video_rxtx_info, LIBRARY_CLASS_VIDEO_RXTX, VIDEO_RXTX_ABI_VERSION);
| [
"pulec@cesnet.cz"
] | pulec@cesnet.cz |
8fc3f9b6cb27e7fbb074d1b9d7992cc39d0554fc | 2356d2a68be40016dd3490fc9eeefa4d257120f3 | /addons/ark_custom_units/config.cpp | 250a13394182bc039c55137201356f87493203cb | [] | no_license | kami-/ark_inhouse | 940d43fd16981958b321cee68c62a8f5954da959 | 6a7dfdf3c772e34579f4834571eee17855fc2ed7 | refs/heads/master | 2021-01-20T21:19:34.458078 | 2018-10-16T21:03:56 | 2018-10-16T21:03:56 | 60,200,301 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,360 | cpp | #include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
author = "ARK";
authors[] = {"ARK"};
url = "http://www.ark-group.org";
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"ark_main",
"cup_weapons_sa61",
"cup_weapons_makarov",
"cup_weapons_pk",
"cup_Weapons_rpg18",
"cup_weapons_rpg7",
"cup_weapons_ammunition",
"CUP_Creatures_People_Civil_Chernarus",
"CUP_Creatures_Military_ACR",
"CUP_Creatures_Military_BAF",
"CUP_Creatures_Military_Chedaki",
"CUP_Creatures_Military_Germany",
"CUP_Creatures_Military_NAPA",
"CUP_Creatures_Military_PMC",
"CUP_Creatures_Military_RACS",
"CUP_Creatures_Military_Russia",
"CUP_Creatures_Military_SLA",
"CUP_Creatures_Military_Taki",
"CUP_Creatures_Military_TakiInsurgents",
"CUP_Creatures_Military_USArmy",
"CUP_Creatures_Military_USMC",
"hlcweapons_core",
"hlcweapons_aks",
"skn_nbc_units"
};
VERSION_CONFIG;
};
};
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp" | [
"root.cyruz@gmail.com"
] | root.cyruz@gmail.com |
874e270db533ec3f1f27f6a97fbf7e9637a703c7 | c2efdc6047b98a3c89b2bee8c032222ac5fad7f8 | /Assignment 2/DataSequence.cpp | cf1bdf077adb47d94eccfacf1ae47cabb2574d90 | [] | no_license | DivyanshiRajput/CPP | 8da67f4946f4c3d2348356adcd69cc2e978080db | 71dc786911cca4514fc00317631a7b7dceabd090 | refs/heads/main | 2023-01-23T10:30:38.501653 | 2020-11-20T17:18:04 | 2020-11-20T17:18:04 | 306,387,962 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,444 | cpp | #include<iostream>
#include<cstdlib>
#include "DataSequence.h"
#include "Histogram.h"
using namespace std;
//constructor
DataSequence:: DataSequence(int size, float* values)
:size(size)
{
this->sequence = new float[size];
for(int i = 0; i < size; i++)
{
this->sequence[i] = values[i];
}
this->sort(sequence, size);
}
//destructor
DataSequence:: ~DataSequence()
{
delete[] sequence;
}
//sorting function
void DataSequence:: sort(float* sequence, int size)
{
for (int i = 0; i < size-1; i++)
{
for (int j = 0; j < size-i-1; j++)
{
if (sequence[j] > sequence[j+1])
{
float temp = sequence[j];
sequence[j] = sequence[j+1];
sequence[j+1] = temp;
}
}
}
this->min = sequence[0];
this->max = sequence[size-1];
float sum = 0;
for (int i = 0; i < size; i++)
{
sum += *(sequence+i);
}
this->mean = sum/size;
if (size%2 == 1)
{
this->median = sequence[(size)/2];
}
else
{
this->median = (sequence[(size)/2] + sequence[(size-1)/2])/2;
}
}
//getters
float DataSequence:: getMean()
{
return mean;
}
float DataSequence:: getMedian()
{
return median;
}
float DataSequence:: getMin()
{
return min;
}
float DataSequence:: getMax()
{
return max;
}
Histogram DataSequence:: genHistogram(int n)
{
return Histogram(n, sequence, size);
}
| [
"noreply@github.com"
] | DivyanshiRajput.noreply@github.com |
1ecb819062c31cceebbe402dca4e3002fec36a79 | 753d47547e78da443cc964241e9b8c72556c8217 | /SYCL/DeprecatedFeatures/queue_old_interop.cpp | e6f0e234ec3cbe4d56bb1b8997dc93e57ff74102 | [
"LicenseRef-scancode-unknown-license-reference",
"NCSA",
"LLVM-exception",
"Apache-2.0"
] | permissive | intel/llvm-test-suite | d52de8f95b3f2500ed70cf3f3461cc346bea01a8 | 2e687fcd57149112d7b29e9e85bf74ce85f1119c | refs/heads/intel | 2023-05-28T08:59:07.287800 | 2023-03-27T23:53:19 | 2023-03-27T23:53:19 | 272,825,916 | 22 | 156 | NOASSERTION | 2023-09-08T11:41:32 | 2020-06-16T22:36:38 | Logos | UTF-8 | C++ | false | false | 3,804 | cpp | // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -D__SYCL_INTERNAL_API %s -o %t.out
// RUN: %BE_RUN_PLACEHOLDER %t.out
//
// hip_nvidia has problems constructing queues due to `No device of requested
// type available`.
// XFAIL: hip_nvidia
//==-------- queue_old_interop.cpp - SYCL queue OpenCL interop test --------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <iostream>
#include <sycl/sycl.hpp>
using namespace sycl;
std::string get_type(const device &dev) {
return dev.is_gpu() ? "OpenCL.GPU" : "OpenCL.CPU";
}
void print_queue_info(const queue &q) {
std::cout << "ID=" << std::hex
<< ((q.get_context().get_platform().get_backend() !=
sycl::backend::opencl)
? nullptr
: q.get())
<< std::endl;
std::cout << "queue wraps " << get_type(q.get_device()) << " device"
<< std::endl;
}
int main() {
try {
std::cout << "Create default queue." << std::endl;
queue q;
print_queue_info(q);
} catch (device_error e) {
std::cout << "Failed to create device for context" << std::endl;
}
auto devices = device::get_devices();
device &deviceA = devices[0];
device &deviceB = (devices.size() > 1 ? devices[1] : devices[0]);
{
std::cout << "move constructor" << std::endl;
queue Queue(deviceA);
size_t hash = std::hash<queue>()(Queue);
queue MovedQueue(std::move(Queue));
assert(hash == std::hash<queue>()(MovedQueue));
if (deviceA.get_platform().get_backend() == sycl::backend::opencl) {
assert(MovedQueue.get() != nullptr);
}
}
{
std::cout << "move assignment operator" << std::endl;
queue Queue(deviceA);
size_t hash = std::hash<queue>()(Queue);
queue WillMovedQueue(deviceB);
WillMovedQueue = std::move(Queue);
assert(hash == std::hash<queue>()(WillMovedQueue));
if (deviceA.get_platform().get_backend() == sycl::backend::opencl) {
assert(WillMovedQueue.get() != nullptr);
}
}
{
std::cout << "copy constructor" << std::endl;
queue Queue(deviceA);
size_t hash = std::hash<queue>()(Queue);
queue QueueCopy(Queue);
assert(hash == std::hash<queue>()(Queue));
assert(hash == std::hash<queue>()(QueueCopy));
assert(Queue == QueueCopy);
}
{
std::cout << "copy assignment operator" << std::endl;
queue Queue(deviceA);
size_t hash = std::hash<queue>()(Queue);
queue WillQueueCopy(deviceB);
WillQueueCopy = Queue;
assert(hash == std::hash<queue>()(Queue));
assert(hash == std::hash<queue>()(WillQueueCopy));
assert(Queue == WillQueueCopy);
}
{
property_list pl = {};
queue Queue(pl);
try {
Queue.throw_asynchronous();
} catch (const std::bad_function_call &e) {
std::cout << "Default asynchronous handler call failed: " << e.what()
<< std::endl;
throw;
}
}
{
default_selector Selector;
device Device = Selector.select_device();
context Context(Device);
queue Queue(Context, Selector);
assert(Context == Queue.get_context());
}
{
context Context(deviceA);
queue Queue(Context, deviceA);
assert(Context == Queue.get_context());
}
if (devices.size() > 1) {
bool GotException = false;
try {
context Context(deviceA);
queue Queue(Context, deviceB);
assert(Context == Queue.get_context());
} catch (std::exception &e) {
std::cout << "Exception check passed: " << e.what() << std::endl;
GotException = true;
}
assert(GotException);
}
}
| [
"noreply@github.com"
] | intel.noreply@github.com |
544cb53a9643d803e8cb6dd702a9513b745e438e | 0203ad47f492276b802f504c59ba19c484509170 | /4_step_test/4_step_test.ino | 5e15b46853859944a7238e4b384033710eb0520c | [] | no_license | 0942792494/Luan_Van | 5a3353e42de47ca6b4b6b24a9314f4108043468c | fa0fec01ebd14c9ec38077856ac88239de2688a0 | refs/heads/main | 2023-02-08T10:51:57.176399 | 2020-12-31T15:25:40 | 2020-12-31T15:25:40 | 325,819,040 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,451 | ino | #include <SoftwareSerial.h>
#include <AccelStepper.h>
SoftwareSerial Bluetooth(A8, 38); // Arduino(RX, TX) - HC-05 Bluetooth (TX, RX)
// Define the stepper motors and the pins the will use
AccelStepper LeftBackWheel(1, 42, 43); // (Type:driver, STEP, DIR) - Stepper1
AccelStepper LeftFrontWheel(1, 40, 41); // Stepper2
AccelStepper RightBackWheel(1, 44, 45); // Stepper3
AccelStepper RightFrontWheel(1, 46, 47); // Stepper4
#define led 14
int wheelSpeed = 150;
int dataIn, m;
int lbw[50], lfw[50], rbw[50], rfw[50]; // for storing positions/steps
int index = 0;
void setup() {
// Set initial seed values for the steppers
LeftFrontWheel.setMaxSpeed(300);
LeftBackWheel.setMaxSpeed(300);
RightFrontWheel.setMaxSpeed(300);
RightBackWheel.setMaxSpeed(300);
Serial.begin(38400);
Bluetooth.begin(38400); // Default baud rate of the Bluetooth module
Bluetooth.setTimeout(1);
delay(20);
pinMode(led, OUTPUT);
}
void loop() {
// Check for incoming data
if (Bluetooth.available() > 0) {
dataIn = Bluetooth.read(); // Read the data
if (dataIn == 0) {
m = 0;
}
if (dataIn == 1) {
m = 1;
}
if (dataIn == 2) {
m = 2;
}
if (dataIn == 3) {
m = 3;
}
if (dataIn == 4) {
m = 4;
}
if (dataIn == 5) {
m = 5;
}
if (dataIn == 6) {
m = 6;
}
if (dataIn == 7) {
m = 7;
}
if (dataIn == 8) {
m = 8;
}
if (dataIn == 9) {
m = 9;
}
if (dataIn == 10) {
m = 10;
}
if (dataIn == 11) {
m = 11;
}
if (dataIn == 12) {
m = 12;
}
if (dataIn == 14) {
m = 14;
}
// Set speed
if (dataIn >= 16) {
wheelSpeed = dataIn * 10;
Serial.println(wheelSpeed);
}
}
if (m == 4) {
moveSidewaysLeft();
}
if (m == 5) {
moveSidewaysRight();
}
if (m == 2) {
moveForward();
}
if (m == 7) {
moveBackward();
}
if (m == 3) {
moveRightForward();
}
if (m == 1) {
moveLeftForward();
}
if (m == 8) {
moveRightBackward();
}
if (m == 6) {
moveLeftBackward();
}
if (m == 9) {
rotateLeft();
}
if (m == 10) {
rotateRight();
}
if (m == 0) {
stopMoving();
}
//Serial.println(dataIn);
// If button "SAVE" is pressed
if (m == 12) {
if (index == 0) {
LeftBackWheel.setCurrentPosition(0);
LeftFrontWheel.setCurrentPosition(0);
RightBackWheel.setCurrentPosition(0);
RightFrontWheel.setCurrentPosition(0);
}
lbw[index] = LeftBackWheel.currentPosition(); // save position into the array
lfw[index] = LeftFrontWheel.currentPosition();
rbw[index] = RightBackWheel.currentPosition();
rfw[index] = RightFrontWheel.currentPosition();
index++; // Increase the array index
m = 0;
}
if (m == 14) {
runSteps();
if (dataIn != 14) {
stopMoving();
memset(lbw, 0, sizeof(lbw)); // Clear the array data to 0
memset(lfw, 0, sizeof(lfw));
memset(rbw, 0, sizeof(rbw));
memset(rfw, 0, sizeof(rfw));
index = 0; // Index to 0
}
}
LeftFrontWheel.runSpeed();
LeftBackWheel.runSpeed();
RightFrontWheel.runSpeed();
RightBackWheel.runSpeed();
// Monitor the battery voltage
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0 / 1023.00) * 3; // Convert the reading values from 5v to suitable 12V i
//Serial.println(voltage);
// If voltage is below 11V turn on the LED
if (voltage < 11) {
digitalWrite(led, HIGH);
}
else {
digitalWrite(led, LOW);
}
}
void runSteps() {
for (int i = index - 1; i >= 0; i--) { // Run through all steps(index)
LeftFrontWheel.moveTo(lfw[i]);
LeftFrontWheel.setSpeed(wheelSpeed);
LeftBackWheel.moveTo(lbw[i]);
LeftBackWheel.setSpeed(wheelSpeed);
RightFrontWheel.moveTo(rfw[i]);
RightFrontWheel.setSpeed(wheelSpeed);
RightBackWheel.moveTo(rbw[i]);
RightBackWheel.setSpeed(wheelSpeed);
while (LeftBackWheel.currentPosition() != lbw[i] & LeftFrontWheel.currentPosition() != lfw[i] & RightFrontWheel.currentPosition() != rfw[i] & RightBackWheel.currentPosition() != rbw[i]) {
LeftFrontWheel.runSpeedToPosition();
LeftBackWheel.runSpeedToPosition();
RightFrontWheel.runSpeedToPosition();
RightBackWheel.runSpeedToPosition();
if (Bluetooth.available() > 0) { // Check for incomding data
dataIn = Bluetooth.read();
if ( dataIn == 15) { // If button "PAUSE" is pressed
while (dataIn != 14) { // Wait until "RUN" is pressed again
if (Bluetooth.available() > 0) {
dataIn = Bluetooth.read();
if ( dataIn == 13) {
stopMoving();
break;
}
}
}
}
if (dataIn >= 16) {
wheelSpeed = dataIn * 10;
dataIn = 14;
}
if ( dataIn == 13) {
break;
}
}
}
}
// Go back through steps
for (int i = 1; i <= index - 1; i++) { // Run through all steps(index)
LeftFrontWheel.moveTo(lfw[i]);
LeftFrontWheel.setSpeed(wheelSpeed);
LeftBackWheel.moveTo(lbw[i]);
LeftBackWheel.setSpeed(wheelSpeed);
RightFrontWheel.moveTo(rfw[i]);
RightFrontWheel.setSpeed(wheelSpeed);
RightBackWheel.moveTo(rbw[i]);
RightBackWheel.setSpeed(wheelSpeed);
while (LeftBackWheel.currentPosition() != lbw[i]& LeftFrontWheel.currentPosition() != lfw[i] & RightFrontWheel.currentPosition() != rfw[i] & RightBackWheel.currentPosition() != rbw[i]) {
LeftFrontWheel.runSpeedToPosition();
LeftBackWheel.runSpeedToPosition();
RightFrontWheel.runSpeedToPosition();
RightBackWheel.runSpeedToPosition();
//Serial.print(" current: ");
//Serial.println(LeftBackWheel.currentPosition());
if (Bluetooth.available() > 0) { // Check for incomding data
dataIn = Bluetooth.read();
if ( dataIn == 15) { // If button "PAUSE" is pressed
while (dataIn != 14) { // Wait until "RUN" is pressed again
if (Bluetooth.available() > 0) {
dataIn = Bluetooth.read();
if ( dataIn == 13) {
stopMoving();
break;
}
}
}
}
if (dataIn >= 16) {
wheelSpeed = dataIn * 10;
dataIn = 14;
}
if ( dataIn == 13) {
//Serial.println("DEKI");
break;
}
}
}
}
}
void moveForward() {
LeftFrontWheel.setSpeed(wheelSpeed);
LeftBackWheel.setSpeed(wheelSpeed);
RightFrontWheel.setSpeed(wheelSpeed);
RightBackWheel.setSpeed(wheelSpeed);
}
void moveBackward() {
LeftFrontWheel.setSpeed(-wheelSpeed);
LeftBackWheel.setSpeed(-wheelSpeed);
RightFrontWheel.setSpeed(-wheelSpeed);
RightBackWheel.setSpeed(-wheelSpeed);
}
void moveSidewaysRight() {
LeftFrontWheel.setSpeed(wheelSpeed);
LeftBackWheel.setSpeed(-wheelSpeed);
RightFrontWheel.setSpeed(-wheelSpeed);
RightBackWheel.setSpeed(wheelSpeed);
}
void moveSidewaysLeft() {
LeftFrontWheel.setSpeed(-wheelSpeed);
LeftBackWheel.setSpeed(wheelSpeed);
RightFrontWheel.setSpeed(wheelSpeed);
RightBackWheel.setSpeed(-wheelSpeed);
}
void rotateLeft() {
LeftFrontWheel.setSpeed(-wheelSpeed);
LeftBackWheel.setSpeed(-wheelSpeed);
RightFrontWheel.setSpeed(wheelSpeed);
RightBackWheel.setSpeed(wheelSpeed);
}
void rotateRight() {
LeftFrontWheel.setSpeed(wheelSpeed);
LeftBackWheel.setSpeed(wheelSpeed);
RightFrontWheel.setSpeed(-wheelSpeed);
RightBackWheel.setSpeed(-wheelSpeed);
}
void moveRightForward() {
LeftFrontWheel.setSpeed(wheelSpeed);
LeftBackWheel.setSpeed(0);
RightFrontWheel.setSpeed(0);
RightBackWheel.setSpeed(wheelSpeed);
}
void moveRightBackward() {
LeftFrontWheel.setSpeed(0);
LeftBackWheel.setSpeed(-wheelSpeed);
RightFrontWheel.setSpeed(-wheelSpeed);
RightBackWheel.setSpeed(0);
}
void moveLeftForward() {
LeftFrontWheel.setSpeed(0);
LeftBackWheel.setSpeed(wheelSpeed);
RightFrontWheel.setSpeed(wheelSpeed);
RightBackWheel.setSpeed(0);
}
void moveLeftBackward() {
LeftFrontWheel.setSpeed(-wheelSpeed);
LeftBackWheel.setSpeed(0);
RightFrontWheel.setSpeed(0);
RightBackWheel.setSpeed(-wheelSpeed);
}
void stopMoving() {
LeftFrontWheel.setSpeed(0);
LeftBackWheel.setSpeed(0);
RightFrontWheel.setSpeed(0);
RightBackWheel.setSpeed(0);
}
| [
"nguyenvanvinhcm1@gmail.com"
] | nguyenvanvinhcm1@gmail.com |
087570891946ef17133353b5e639196cfd71cab1 | 8cfc0ca50f8670ef47d3da6543262fb12b3d9ff8 | /bordercollieyoutoo-master/devel/include/costmap_2d/VoxelPluginConfig.h | e3a35db9d0d1a2a1784ae980cbdd2c9f05739b47 | [] | no_license | lololalayoho/BorderCollieYouToo | 10fddc70c243f8025d2f530f64f4473e58fed70a | 2a3e04a4e635d7b5c0bd569636e4f89f07c42e6e | refs/heads/master | 2022-06-21T06:21:08.177255 | 2020-05-08T03:55:08 | 2020-05-08T03:55:08 | 262,221,670 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 32,016 | h | //#line 2 "/opt/ros/kinetic/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
// *********************************************************
//
// File autogenerated for the costmap_2d package
// by the dynamic_reconfigure package.
// Please do not edit.
//
// ********************************************************/
#ifndef __costmap_2d__VOXELPLUGINCONFIG_H__
#define __costmap_2d__VOXELPLUGINCONFIG_H__
#if __cplusplus >= 201103L
#define DYNAMIC_RECONFIGURE_FINAL final
#else
#define DYNAMIC_RECONFIGURE_FINAL
#endif
#include <dynamic_reconfigure/config_tools.h>
#include <limits>
#include <ros/node_handle.h>
#include <dynamic_reconfigure/ConfigDescription.h>
#include <dynamic_reconfigure/ParamDescription.h>
#include <dynamic_reconfigure/Group.h>
#include <dynamic_reconfigure/config_init_mutex.h>
#include <boost/any.hpp>
namespace costmap_2d
{
class VoxelPluginConfigStatics;
class VoxelPluginConfig
{
public:
class AbstractParamDescription : public dynamic_reconfigure::ParamDescription
{
public:
AbstractParamDescription(std::string n, std::string t, uint32_t l,
std::string d, std::string e)
{
name = n;
type = t;
level = l;
description = d;
edit_method = e;
}
virtual void clamp(VoxelPluginConfig &config, const VoxelPluginConfig &max, const VoxelPluginConfig &min) const = 0;
virtual void calcLevel(uint32_t &level, const VoxelPluginConfig &config1, const VoxelPluginConfig &config2) const = 0;
virtual void fromServer(const ros::NodeHandle &nh, VoxelPluginConfig &config) const = 0;
virtual void toServer(const ros::NodeHandle &nh, const VoxelPluginConfig &config) const = 0;
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, VoxelPluginConfig &config) const = 0;
virtual void toMessage(dynamic_reconfigure::Config &msg, const VoxelPluginConfig &config) const = 0;
virtual void getValue(const VoxelPluginConfig &config, boost::any &val) const = 0;
};
typedef boost::shared_ptr<AbstractParamDescription> AbstractParamDescriptionPtr;
typedef boost::shared_ptr<const AbstractParamDescription> AbstractParamDescriptionConstPtr;
// Final keyword added to class because it has virtual methods and inherits
// from a class with a non-virtual destructor.
template <class T>
class ParamDescription DYNAMIC_RECONFIGURE_FINAL : public AbstractParamDescription
{
public:
ParamDescription(std::string a_name, std::string a_type, uint32_t a_level,
std::string a_description, std::string a_edit_method, T VoxelPluginConfig::* a_f) :
AbstractParamDescription(a_name, a_type, a_level, a_description, a_edit_method),
field(a_f)
{}
T (VoxelPluginConfig::* field);
virtual void clamp(VoxelPluginConfig &config, const VoxelPluginConfig &max, const VoxelPluginConfig &min) const
{
if (config.*field > max.*field)
config.*field = max.*field;
if (config.*field < min.*field)
config.*field = min.*field;
}
virtual void calcLevel(uint32_t &comb_level, const VoxelPluginConfig &config1, const VoxelPluginConfig &config2) const
{
if (config1.*field != config2.*field)
comb_level |= level;
}
virtual void fromServer(const ros::NodeHandle &nh, VoxelPluginConfig &config) const
{
nh.getParam(name, config.*field);
}
virtual void toServer(const ros::NodeHandle &nh, const VoxelPluginConfig &config) const
{
nh.setParam(name, config.*field);
}
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, VoxelPluginConfig &config) const
{
return dynamic_reconfigure::ConfigTools::getParameter(msg, name, config.*field);
}
virtual void toMessage(dynamic_reconfigure::Config &msg, const VoxelPluginConfig &config) const
{
dynamic_reconfigure::ConfigTools::appendParameter(msg, name, config.*field);
}
virtual void getValue(const VoxelPluginConfig &config, boost::any &val) const
{
val = config.*field;
}
};
class AbstractGroupDescription : public dynamic_reconfigure::Group
{
public:
AbstractGroupDescription(std::string n, std::string t, int p, int i, bool s)
{
name = n;
type = t;
parent = p;
state = s;
id = i;
}
std::vector<AbstractParamDescriptionConstPtr> abstract_parameters;
bool state;
virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &config) const = 0;
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &config) const =0;
virtual void updateParams(boost::any &cfg, VoxelPluginConfig &top) const= 0;
virtual void setInitialState(boost::any &cfg) const = 0;
void convertParams()
{
for(std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = abstract_parameters.begin(); i != abstract_parameters.end(); ++i)
{
parameters.push_back(dynamic_reconfigure::ParamDescription(**i));
}
}
};
typedef boost::shared_ptr<AbstractGroupDescription> AbstractGroupDescriptionPtr;
typedef boost::shared_ptr<const AbstractGroupDescription> AbstractGroupDescriptionConstPtr;
// Final keyword added to class because it has virtual methods and inherits
// from a class with a non-virtual destructor.
template<class T, class PT>
class GroupDescription DYNAMIC_RECONFIGURE_FINAL : public AbstractGroupDescription
{
public:
GroupDescription(std::string a_name, std::string a_type, int a_parent, int a_id, bool a_s, T PT::* a_f) : AbstractGroupDescription(a_name, a_type, a_parent, a_id, a_s), field(a_f)
{
}
GroupDescription(const GroupDescription<T, PT>& g): AbstractGroupDescription(g.name, g.type, g.parent, g.id, g.state), field(g.field), groups(g.groups)
{
parameters = g.parameters;
abstract_parameters = g.abstract_parameters;
}
virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &cfg) const
{
PT* config = boost::any_cast<PT*>(cfg);
if(!dynamic_reconfigure::ConfigTools::getGroupState(msg, name, (*config).*field))
return false;
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
boost::any n = &((*config).*field);
if(!(*i)->fromMessage(msg, n))
return false;
}
return true;
}
virtual void setInitialState(boost::any &cfg) const
{
PT* config = boost::any_cast<PT*>(cfg);
T* group = &((*config).*field);
group->state = state;
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
boost::any n = boost::any(&((*config).*field));
(*i)->setInitialState(n);
}
}
virtual void updateParams(boost::any &cfg, VoxelPluginConfig &top) const
{
PT* config = boost::any_cast<PT*>(cfg);
T* f = &((*config).*field);
f->setParams(top, abstract_parameters);
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
boost::any n = &((*config).*field);
(*i)->updateParams(n, top);
}
}
virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &cfg) const
{
const PT config = boost::any_cast<PT>(cfg);
dynamic_reconfigure::ConfigTools::appendGroup<T>(msg, name, id, parent, config.*field);
for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
{
(*i)->toMessage(msg, config.*field);
}
}
T (PT::* field);
std::vector<VoxelPluginConfig::AbstractGroupDescriptionConstPtr> groups;
};
class DEFAULT
{
public:
DEFAULT()
{
state = true;
name = "Default";
}
void setParams(VoxelPluginConfig &config, const std::vector<AbstractParamDescriptionConstPtr> params)
{
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator _i = params.begin(); _i != params.end(); ++_i)
{
boost::any val;
(*_i)->getValue(config, val);
if("enabled"==(*_i)->name){enabled = boost::any_cast<bool>(val);}
if("footprint_clearing_enabled"==(*_i)->name){footprint_clearing_enabled = boost::any_cast<bool>(val);}
if("max_obstacle_height"==(*_i)->name){max_obstacle_height = boost::any_cast<double>(val);}
if("origin_z"==(*_i)->name){origin_z = boost::any_cast<double>(val);}
if("z_resolution"==(*_i)->name){z_resolution = boost::any_cast<double>(val);}
if("z_voxels"==(*_i)->name){z_voxels = boost::any_cast<int>(val);}
if("unknown_threshold"==(*_i)->name){unknown_threshold = boost::any_cast<int>(val);}
if("mark_threshold"==(*_i)->name){mark_threshold = boost::any_cast<int>(val);}
if("combination_method"==(*_i)->name){combination_method = boost::any_cast<int>(val);}
}
}
bool enabled;
bool footprint_clearing_enabled;
double max_obstacle_height;
double origin_z;
double z_resolution;
int z_voxels;
int unknown_threshold;
int mark_threshold;
int combination_method;
bool state;
std::string name;
}groups;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
bool enabled;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
bool footprint_clearing_enabled;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
double max_obstacle_height;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
double origin_z;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
double z_resolution;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
int z_voxels;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
int unknown_threshold;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
int mark_threshold;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
int combination_method;
//#line 228 "/opt/ros/kinetic/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
bool __fromMessage__(dynamic_reconfigure::Config &msg)
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
int count = 0;
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
if ((*i)->fromMessage(msg, *this))
count++;
for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i ++)
{
if ((*i)->id == 0)
{
boost::any n = boost::any(this);
(*i)->updateParams(n, *this);
(*i)->fromMessage(msg, n);
}
}
if (count != dynamic_reconfigure::ConfigTools::size(msg))
{
ROS_ERROR("VoxelPluginConfig::__fromMessage__ called with an unexpected parameter.");
ROS_ERROR("Booleans:");
for (unsigned int i = 0; i < msg.bools.size(); i++)
ROS_ERROR(" %s", msg.bools[i].name.c_str());
ROS_ERROR("Integers:");
for (unsigned int i = 0; i < msg.ints.size(); i++)
ROS_ERROR(" %s", msg.ints[i].name.c_str());
ROS_ERROR("Doubles:");
for (unsigned int i = 0; i < msg.doubles.size(); i++)
ROS_ERROR(" %s", msg.doubles[i].name.c_str());
ROS_ERROR("Strings:");
for (unsigned int i = 0; i < msg.strs.size(); i++)
ROS_ERROR(" %s", msg.strs[i].name.c_str());
// @todo Check that there are no duplicates. Make this error more
// explicit.
return false;
}
return true;
}
// This version of __toMessage__ is used during initialization of
// statics when __getParamDescriptions__ can't be called yet.
void __toMessage__(dynamic_reconfigure::Config &msg, const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__, const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__) const
{
dynamic_reconfigure::ConfigTools::clear(msg);
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->toMessage(msg, *this);
for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i)
{
if((*i)->id == 0)
{
(*i)->toMessage(msg, *this);
}
}
}
void __toMessage__(dynamic_reconfigure::Config &msg) const
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
__toMessage__(msg, __param_descriptions__, __group_descriptions__);
}
void __toServer__(const ros::NodeHandle &nh) const
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->toServer(nh, *this);
}
void __fromServer__(const ros::NodeHandle &nh)
{
static bool setup=false;
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->fromServer(nh, *this);
const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++){
if (!setup && (*i)->id == 0) {
setup = true;
boost::any n = boost::any(this);
(*i)->setInitialState(n);
}
}
}
void __clamp__()
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
const VoxelPluginConfig &__max__ = __getMax__();
const VoxelPluginConfig &__min__ = __getMin__();
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->clamp(*this, __max__, __min__);
}
uint32_t __level__(const VoxelPluginConfig &config) const
{
const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
uint32_t level = 0;
for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
(*i)->calcLevel(level, config, *this);
return level;
}
static const dynamic_reconfigure::ConfigDescription &__getDescriptionMessage__();
static const VoxelPluginConfig &__getDefault__();
static const VoxelPluginConfig &__getMax__();
static const VoxelPluginConfig &__getMin__();
static const std::vector<AbstractParamDescriptionConstPtr> &__getParamDescriptions__();
static const std::vector<AbstractGroupDescriptionConstPtr> &__getGroupDescriptions__();
private:
static const VoxelPluginConfigStatics *__get_statics__();
};
template <> // Max and min are ignored for strings.
inline void VoxelPluginConfig::ParamDescription<std::string>::clamp(VoxelPluginConfig &config, const VoxelPluginConfig &max, const VoxelPluginConfig &min) const
{
(void) config;
(void) min;
(void) max;
return;
}
class VoxelPluginConfigStatics
{
friend class VoxelPluginConfig;
VoxelPluginConfigStatics()
{
VoxelPluginConfig::GroupDescription<VoxelPluginConfig::DEFAULT, VoxelPluginConfig> Default("Default", "", 0, 0, true, &VoxelPluginConfig::groups);
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.enabled = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.enabled = 1;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.enabled = 1;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<bool>("enabled", "bool", 0, "Whether to use this plugin or not", "", &VoxelPluginConfig::enabled)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<bool>("enabled", "bool", 0, "Whether to use this plugin or not", "", &VoxelPluginConfig::enabled)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.footprint_clearing_enabled = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.footprint_clearing_enabled = 1;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.footprint_clearing_enabled = 1;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<bool>("footprint_clearing_enabled", "bool", 0, "Whether to clear the robot's footprint of lethal obstacles", "", &VoxelPluginConfig::footprint_clearing_enabled)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<bool>("footprint_clearing_enabled", "bool", 0, "Whether to clear the robot's footprint of lethal obstacles", "", &VoxelPluginConfig::footprint_clearing_enabled)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.max_obstacle_height = 0.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.max_obstacle_height = 50.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.max_obstacle_height = 2.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<double>("max_obstacle_height", "double", 0, "Max Obstacle Height", "", &VoxelPluginConfig::max_obstacle_height)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<double>("max_obstacle_height", "double", 0, "Max Obstacle Height", "", &VoxelPluginConfig::max_obstacle_height)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.origin_z = 0.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.origin_z = std::numeric_limits<double>::infinity();
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.origin_z = 0.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<double>("origin_z", "double", 0, "The z origin of the map in meters.", "", &VoxelPluginConfig::origin_z)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<double>("origin_z", "double", 0, "The z origin of the map in meters.", "", &VoxelPluginConfig::origin_z)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.z_resolution = 0.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.z_resolution = 50.0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.z_resolution = 0.2;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<double>("z_resolution", "double", 0, "The z resolution of the map in meters/cell.", "", &VoxelPluginConfig::z_resolution)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<double>("z_resolution", "double", 0, "The z resolution of the map in meters/cell.", "", &VoxelPluginConfig::z_resolution)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.z_voxels = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.z_voxels = 16;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.z_voxels = 10;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("z_voxels", "int", 0, "The number of voxels to in each vertical column.", "", &VoxelPluginConfig::z_voxels)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("z_voxels", "int", 0, "The number of voxels to in each vertical column.", "", &VoxelPluginConfig::z_voxels)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.unknown_threshold = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.unknown_threshold = 16;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.unknown_threshold = 15;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("unknown_threshold", "int", 0, "The number of unknown cells allowed in a column considered to be known", "", &VoxelPluginConfig::unknown_threshold)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("unknown_threshold", "int", 0, "The number of unknown cells allowed in a column considered to be known", "", &VoxelPluginConfig::unknown_threshold)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.mark_threshold = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.mark_threshold = 16;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.mark_threshold = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("mark_threshold", "int", 0, "The maximum number of marked cells allowed in a column considered to be free", "", &VoxelPluginConfig::mark_threshold)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("mark_threshold", "int", 0, "The maximum number of marked cells allowed in a column considered to be free", "", &VoxelPluginConfig::mark_threshold)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__min__.combination_method = 0;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__max__.combination_method = 2;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__default__.combination_method = 1;
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.abstract_parameters.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("combination_method", "int", 0, "Method for combining two layers", "{'enum_description': 'Method for combining layers enum', 'enum': [{'srcline': 16, 'description': 'b', 'srcfile': '/home/nvidia/catkin_ws/src/costmap_2d/cfg/VoxelPlugin.cfg', 'cconsttype': 'const int', 'value': 0, 'ctype': 'int', 'type': 'int', 'name': 'Overwrite'}, {'srcline': 17, 'description': 'a', 'srcfile': '/home/nvidia/catkin_ws/src/costmap_2d/cfg/VoxelPlugin.cfg', 'cconsttype': 'const int', 'value': 1, 'ctype': 'int', 'type': 'int', 'name': 'Maximum'}]}", &VoxelPluginConfig::combination_method)));
//#line 290 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__param_descriptions__.push_back(VoxelPluginConfig::AbstractParamDescriptionConstPtr(new VoxelPluginConfig::ParamDescription<int>("combination_method", "int", 0, "Method for combining two layers", "{'enum_description': 'Method for combining layers enum', 'enum': [{'srcline': 16, 'description': 'b', 'srcfile': '/home/nvidia/catkin_ws/src/costmap_2d/cfg/VoxelPlugin.cfg', 'cconsttype': 'const int', 'value': 0, 'ctype': 'int', 'type': 'int', 'name': 'Overwrite'}, {'srcline': 17, 'description': 'a', 'srcfile': '/home/nvidia/catkin_ws/src/costmap_2d/cfg/VoxelPlugin.cfg', 'cconsttype': 'const int', 'value': 1, 'ctype': 'int', 'type': 'int', 'name': 'Maximum'}]}", &VoxelPluginConfig::combination_method)));
//#line 245 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
Default.convertParams();
//#line 245 "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
__group_descriptions__.push_back(VoxelPluginConfig::AbstractGroupDescriptionConstPtr(new VoxelPluginConfig::GroupDescription<VoxelPluginConfig::DEFAULT, VoxelPluginConfig>(Default)));
//#line 366 "/opt/ros/kinetic/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
for (std::vector<VoxelPluginConfig::AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i)
{
__description_message__.groups.push_back(**i);
}
__max__.__toMessage__(__description_message__.max, __param_descriptions__, __group_descriptions__);
__min__.__toMessage__(__description_message__.min, __param_descriptions__, __group_descriptions__);
__default__.__toMessage__(__description_message__.dflt, __param_descriptions__, __group_descriptions__);
}
std::vector<VoxelPluginConfig::AbstractParamDescriptionConstPtr> __param_descriptions__;
std::vector<VoxelPluginConfig::AbstractGroupDescriptionConstPtr> __group_descriptions__;
VoxelPluginConfig __max__;
VoxelPluginConfig __min__;
VoxelPluginConfig __default__;
dynamic_reconfigure::ConfigDescription __description_message__;
static const VoxelPluginConfigStatics *get_instance()
{
// Split this off in a separate function because I know that
// instance will get initialized the first time get_instance is
// called, and I am guaranteeing that get_instance gets called at
// most once.
static VoxelPluginConfigStatics instance;
return &instance;
}
};
inline const dynamic_reconfigure::ConfigDescription &VoxelPluginConfig::__getDescriptionMessage__()
{
return __get_statics__()->__description_message__;
}
inline const VoxelPluginConfig &VoxelPluginConfig::__getDefault__()
{
return __get_statics__()->__default__;
}
inline const VoxelPluginConfig &VoxelPluginConfig::__getMax__()
{
return __get_statics__()->__max__;
}
inline const VoxelPluginConfig &VoxelPluginConfig::__getMin__()
{
return __get_statics__()->__min__;
}
inline const std::vector<VoxelPluginConfig::AbstractParamDescriptionConstPtr> &VoxelPluginConfig::__getParamDescriptions__()
{
return __get_statics__()->__param_descriptions__;
}
inline const std::vector<VoxelPluginConfig::AbstractGroupDescriptionConstPtr> &VoxelPluginConfig::__getGroupDescriptions__()
{
return __get_statics__()->__group_descriptions__;
}
inline const VoxelPluginConfigStatics *VoxelPluginConfig::__get_statics__()
{
const static VoxelPluginConfigStatics *statics;
if (statics) // Common case
return statics;
boost::mutex::scoped_lock lock(dynamic_reconfigure::__init_mutex__);
if (statics) // In case we lost a race.
return statics;
statics = VoxelPluginConfigStatics::get_instance();
return statics;
}
//#line 16 "/home/nvidia/catkin_ws/src/costmap_2d/cfg/VoxelPlugin.cfg"
const int VoxelPlugin_Overwrite = 0;
//#line 17 "/home/nvidia/catkin_ws/src/costmap_2d/cfg/VoxelPlugin.cfg"
const int VoxelPlugin_Maximum = 1;
}
#undef DYNAMIC_RECONFIGURE_FINAL
#endif // __VOXELPLUGINRECONFIGURATOR_H__
| [
"3chlwlsdn@hanmail.net"
] | 3chlwlsdn@hanmail.net |
7020f5be0b44f69183e56e2a06d2dfd6346d2e70 | 1d7f8363324c092b0f04144515bf0e46a0a14940 | /2017/C语言课程设计/TeacherGarage_mfc/Elevator_dialog/LightBitmapButton.cpp | f346f0dadaaa35d6ed81c45216496703d008af6e | [] | no_license | jtrfid/C-Repositories | ddd7f6ca82c275d299b8ffaca0b44b76c945f33d | c285cb308d23a07e1503c20def32b571876409be | refs/heads/master | 2021-01-23T09:02:12.113799 | 2019-05-02T05:00:46 | 2019-05-02T05:00:46 | 38,694,237 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 3,538 | cpp | // LightBitmapButton.cpp : 实现文件
//
#include "stdafx.h"
#include "Elevator_dialog.h"
#include "LightBitmapButton.h"
// CLightBitmapButton
IMPLEMENT_DYNAMIC(CLightBitmapButton, CBitmapButton)
CLightBitmapButton::CLightBitmapButton()
{
m_LightOn = false;
}
CLightBitmapButton::~CLightBitmapButton()
{
}
BEGIN_MESSAGE_MAP(CLightBitmapButton, CBitmapButton)
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONDBLCLK()
END_MESSAGE_MAP()
// CLightBitmapButton 消息处理程序
// 左键按下,如果当前Light is Off, 置为on;否则保持现状。
void CLightBitmapButton::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
// 消息执行顺序:控件的消息执行在前,对话框的按钮命令执行在后。OnLButtonDblClk 消息会额外引起一次OnLButtonDown及其对话框按钮单击命令的发生。
// (1) CLightBitmapButton::OnLButtonDown
// (2) 对话框点击按钮命令BN_CLICKED,如,CElevator_dialogDlg::OnBnClickedBtnup1()
if(!m_LightOn) m_LightOn = true;
Invalidate(FALSE);
CBitmapButton::OnLButtonDown(nFlags, point);
}
// 双击左键,Light is off
void CLightBitmapButton::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
// 消息执行顺序: 控件的消息执行在前,对话框的按钮命令执行在后。OnLButtonDblClk 消息会额外引起一次OnLButtonDown及其对话框按钮单击命令的发生。
// (1) CLightBitmapButton::OnLButtonDown
// (2) 对话框点击按钮命令,如,CElevator_dialogDlg::OnBnClickedBtnup1()
// (3) CLightBitmapButton::OnLButtonDblClk()
// (4) 对话框双击按钮命令BN_DOUBLECLICKED,如,CElevator_dialogDlg::OnDoubleclickedBtnup1()
m_LightOn = false;
// Invalidate( BOOL bErase = TRUE );
// Invalidates the entire client area of CWnd
// bErase: Specifies whether the background within the update region is to be erased.
Invalidate(FALSE);
CBitmapButton::OnLButtonDblClk(nFlags, point);
}
// 自绘, 灯亮LightOn=true(按钮显示第二幅图),否则LightOn=false(按钮显示第一幅图),
// 控件失效,即未使能,显示第三幅图片
void CLightBitmapButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
// TODO: 添加您的代码以绘制指定项
ASSERT(lpDrawItemStruct != NULL);
// must have at least the first bitmap loaded before calling DrawItem
ASSERT(m_bitmap.m_hObject != NULL); // 至少有一个正常显示的CBitmap对象
CBitmap* pBitmap = &m_bitmap; // 第一个图片正常显示(Light off)
UINT state = lpDrawItemStruct->itemState;
if ((state & ODS_DISABLED) && m_bitmapFocus.m_hObject != NULL)
pBitmap = &m_bitmapFocus; // 第三个图片用于未使能按钮(disable)
else if(m_LightOn && m_bitmapSel.m_hObject != NULL)
pBitmap = &m_bitmapSel; // 第二个图片,左键按下后显示(Light on)
// draw the whole button
CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
CDC memDC;
memDC.CreateCompatibleDC(pDC);
CBitmap* pOld = memDC.SelectObject(pBitmap);
if (pOld == NULL)
return; // destructors will clean up
CRect rect;
rect.CopyRect(&lpDrawItemStruct->rcItem);
pDC->BitBlt(rect.left, rect.top, rect.Width(), rect.Height(),
&memDC, 0, 0, SRCCOPY);
memDC.SelectObject(pOld);
}
// 被关联到窗口前被调用
void CLightBitmapButton::PreSubclassWindow()
{
// TODO: 在此添加专用代码和/或调用基类
ModifyStyle(0, BS_OWNERDRAW); // 自绘
CBitmapButton::PreSubclassWindow();
}
| [
"jtrfid@qq.com"
] | jtrfid@qq.com |
a555609c1b0efac02452eded79764f2ccf31098f | fb3c1e036f18193d6ffe59f443dad8323cb6e371 | /src/base/iphone/XSocket.cpp | d52a58a7c7fff73426af87ff5cc6b8d9278fe2c0 | [] | no_license | playbar/nstest | a61aed443af816fdc6e7beab65e935824dcd07b2 | d56141912bc2b0e22d1652aa7aff182e05142005 | refs/heads/master | 2021-06-03T21:56:17.779018 | 2016-08-01T03:17:39 | 2016-08-01T03:17:39 | 64,627,195 | 3 | 1 | null | null | null | null | GB18030 | C++ | false | false | 4,035 | cpp | // XSocket.cpp: implementation of the XSocket class.
//
//////////////////////////////////////////////////////////////////////
#include "StdAfxGGBase.h"
#ifdef __APPLE__
//#include <sys/socket.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <sys/select.h>
#include <netdb.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#endif
#include "XSocket.h"
#include "XMutex.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
#define T_RETRIES 3
#define T_TIMEOUT 500
XSocket::XSocket()
{
m_hSocket=XNULL;
}
XSocket::~XSocket()
{
}
int XSocket::ConnectTCP(XPCTSTR strHost, XU16 uPort)
{
if(m_bConnected) return XC_OK;
if(m_hSocket==XNULL)
{
hostent *phostent=gethostbyname(strHost);
if(phostent==XNULL)
return XC_ERROR;
struct in_addr ip_addr;
memcpy(&ip_addr,phostent->h_addr_list[0],4);///h_addr_list[0]里4个字节,每个字节8位
struct sockaddr_in& destAddr=(sockaddr_in&)m_destAddr;
memset((void *)&destAddr,0,sizeof(destAddr));
destAddr.sin_family=AF_INET;
destAddr.sin_port=htons(uPort);
destAddr.sin_addr=ip_addr;
m_hSocket=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
// unsigned long ul = 1;
// int ret = ioctlsocket(m_hSocket, FIONBIO, (unsigned long*)&ul);
// if(ret==SOCKET_ERROR){closesocket(m_hSocket);m_hSocket=XNULL;return XC_ERROR;}
//Modify Sync
int flags=fcntl(m_hSocket,F_GETFL,0);
fcntl(m_hSocket,F_SETFL,flags|O_NONBLOCK);
}
m_bConnected=XFALSE;
int nRet=connect(m_hSocket,(struct sockaddr*)&m_destAddr,sizeof(m_destAddr));
if(nRet == -1)
{
//Modift Sync
//return XC_ERROR;
return XC_WAIT;
}
else if(nRet!=0)
return XC_ERROR;
else
{
m_bConnected=XTRUE;
return XC_OK;
}
return XC_WAIT;
}
XBOOL XSocket::Close()
{
if(m_hSocket!=XNULL) close(m_hSocket);
m_hSocket=XNULL;
m_bConnected=XFALSE;
return XTRUE;
}
XINT XSocket::WaitForReply(XU8 nTime)
{
if(m_hSocket==XNULL) return NOTCONNECTED;
struct timeval Timeout={0,nTime?nTime:100};
if(!m_bConnected)
{
fd_set mask;
FD_ZERO(&mask);
FD_SET(m_hSocket,&mask);
int nv = select(m_hSocket + 1, 0, &mask, 0, &Timeout);
switch (nv)
{
case -1:
close(m_hSocket);
m_hSocket=XNULL;
return CONNECTERROR;
case 0:
return CONNECTTIMEOUT;
default:
m_bConnected=XTRUE;
return CONNECTOK;
}
}
fd_set readfds;
//XU32 nTime=m_info.nTimeout;
if(nTime<1)
{
Timeout.tv_sec=0;
Timeout.tv_usec=100;
nTime=1;
}
FD_ZERO(&readfds); // clear the fd_set
FD_SET(m_hSocket,&readfds); // indicate that we want to
int nv=select(m_hSocket + 1, &readfds, NULL, NULL, &Timeout);
if(nv>0)
{
if (FD_ISSET(m_hSocket, &readfds))
{
return REVOK;
}
}
else if (nv == 0)
{
//
}
else
return REVERROR;
// readfds.fd_count = 1;
// //readfds.fd_array[0] = m_hSocket;
// readfds.fd_array[0] = m_hSocket;//recSocket;
// int nv=select(1, &readfds, NULL, NULL, &Timeout);
// if(nv>0)
// return REVOK;
// else if(nv==SOCKET_ERROR) return REVERROR;
return REVTIMEOUT;
}
int XSocket::Send(void *pData, int nSize)
{
try {
int v=sendto(m_hSocket,(char*)pData,nSize,0,(struct sockaddr*)&m_destAddr,sizeof(m_destAddr));
return v;
} catch (...) {
return SENDERROR;
}
return SENDERROR;
}
int XSocket::Receive(void *pData, int nSize)
{
sockaddr addr;
// int n=sizeof(addr);
socklen_t n = sizeof(addr);
return recvfrom(m_hSocket,(char*)pData,nSize,0,&addr,&n);
}
XBOOL XSocket::CheckSocket()
{
if(m_hSocket!=XNULL)
{
if(WaitForReply(0)>=XWAIT_OK)
{
XU32 data;
if(Receive((char*)&data,sizeof(XU32))==0)
{
Close();
return XFALSE;
}
}
}
return XTRUE;
}
| [
"hgl868@126.com"
] | hgl868@126.com |
e905266ff0da06326b000e63e4edb1de7884a7ae | 2d926da3a7e99582bcc09e9a61e70a0d7175e8f8 | /src/Magnum/GL/Test/TextureArrayGLTest.cpp | e7f558b828de98df3200857ed1125bd5aaa38d89 | [
"MIT"
] | permissive | black6816/magnum | 5879fdf569b19bd835c1db87d3d5ce2f211e6c9f | a49602987499379e4a2d155472961d99ddfc75ba | refs/heads/master | 2022-12-12T23:11:44.387207 | 2022-11-16T16:53:06 | 2022-11-19T14:26:39 | 155,795,059 | 0 | 0 | null | 2018-11-02T01:01:51 | 2018-11-02T01:01:51 | null | UTF-8 | C++ | false | false | 77,624 | cpp | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
#include <Corrade/TestSuite/Compare/Container.h>
#include "Magnum/Image.h"
#include "Magnum/ImageView.h"
#include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h"
#include "Magnum/GL/BufferImage.h"
#include "Magnum/GL/OpenGLTester.h"
#include "Magnum/GL/PixelFormat.h"
#include "Magnum/GL/TextureArray.h"
#include "Magnum/GL/TextureFormat.h"
#include "Magnum/Math/Color.h"
#include "Magnum/Math/Range.h"
#ifndef MAGNUM_TARGET_WEBGL
#include <Corrade/Containers/String.h>
#endif
#ifndef MAGNUM_TARGET_WEBGL
#include "Magnum/GL/ImageFormat.h"
#endif
namespace Magnum { namespace GL { namespace Test { namespace {
struct TextureArrayGLTest: OpenGLTester {
explicit TextureArrayGLTest();
#ifndef MAGNUM_TARGET_GLES
void construct1D();
#endif
void construct2D();
void constructMove();
#ifndef MAGNUM_TARGET_GLES
void wrap1D();
#endif
void wrap2D();
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
void label1D();
#endif
void label2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void bind1D();
#endif
void bind2D();
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
void bindImage1D();
#endif
void bindImage2D();
#endif
#ifndef MAGNUM_TARGET_GLES
template<class T> void sampling1D();
#endif
template<class T> void sampling2D();
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
void samplingSrgbDecode1D();
#endif
void samplingSrgbDecode2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void samplingSwizzle1D();
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void samplingSwizzle2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger1D();
#endif
#ifndef MAGNUM_TARGET_WEBGL
void samplingBorderInteger2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void samplingDepthStencilMode1D();
#endif
#ifndef MAGNUM_TARGET_WEBGL
void samplingDepthStencilMode2D();
#endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
void samplingBorder2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void storage1D();
#endif
void storage2D();
#ifndef MAGNUM_TARGET_GLES
void image1D();
void image1DBuffer();
void image1DQueryView();
void subImage1D();
void subImage1DBuffer();
void subImage1DQuery();
void subImage1DQueryView();
void subImage1DQueryBuffer();
/* View query assertions tested in AbstractTextureGLTest */
void compressedImage1D();
void compressedImage1DBuffer();
void compressedImage1DQueryView();
void compressedSubImage1D();
void compressedSubImage1DBuffer();
void compressedSubImage1DQuery();
void compressedSubImage1DQueryView();
void compressedSubImage1DQueryBuffer();
/* View query assertions tested in AbstractTextureGLTest */
#endif
void image2D();
void image2DBuffer();
#ifndef MAGNUM_TARGET_GLES
void image2DQueryView();
#endif
void subImage2D();
void subImage2DBuffer();
#ifndef MAGNUM_TARGET_GLES
void subImage2DQuery();
void subImage2DQueryView();
void subImage2DQueryBuffer();
/* View query assertions tested in AbstractTextureGLTest */
#endif
void compressedImage2D();
void compressedImage2DBuffer();
#ifndef MAGNUM_TARGET_GLES
void compressedImage2DQueryView();
#endif
void compressedSubImage2D();
void compressedSubImage2DBuffer();
#ifndef MAGNUM_TARGET_GLES
void compressedSubImage2DQuery();
void compressedSubImage2DQueryView();
void compressedSubImage2DQueryBuffer();
/* View query assertions tested in AbstractTextureGLTest */
#endif
#ifndef MAGNUM_TARGET_GLES
void generateMipmap1D();
#endif
void generateMipmap2D();
#ifndef MAGNUM_TARGET_GLES
void invalidateImage1D();
#endif
void invalidateImage2D();
#ifndef MAGNUM_TARGET_GLES
void invalidateSubImage1D();
#endif
void invalidateSubImage2D();
};
struct GenericSampler {
typedef Magnum::SamplerFilter Filter;
typedef Magnum::SamplerMipmap Mipmap;
typedef Magnum::SamplerWrapping Wrapping;
};
struct GLSampler {
typedef GL::SamplerFilter Filter;
typedef GL::SamplerMipmap Mipmap;
typedef GL::SamplerWrapping Wrapping;
};
#ifndef MAGNUM_TARGET_GLES
constexpr UnsignedByte Data1D[]{
0, 0, 0, 0, 0, 0, 0, 0,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
};
const struct {
const char* name;
Containers::ArrayView<const UnsignedByte> data;
PixelStorage storage;
Containers::ArrayView<const UnsignedByte> dataSparse;
std::size_t offset;
} PixelStorage1DData[]{
{"default pixel storage",
Containers::arrayView(Data1D).exceptPrefix(8), {},
Containers::arrayView(Data1D).exceptPrefix(8), 0},
{"skip Y",
Containers::arrayView(Data1D).exceptPrefix(8), PixelStorage{}.setSkip({0, 1, 0}),
Containers::arrayView(Data1D), 8}};
#endif
constexpr UnsignedByte Data2D[]{
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
};
const struct {
const char* name;
Containers::ArrayView<const UnsignedByte> data;
PixelStorage storage;
Containers::ArrayView<const UnsignedByte> dataSparse;
std::size_t offset;
} PixelStorage2DData[]{
{"default pixel storage",
Containers::arrayView(Data2D).exceptPrefix(16), {},
Containers::arrayView(Data2D).exceptPrefix(16), 0},
{"skip Z",
Containers::arrayView(Data2D).exceptPrefix(16), PixelStorage{}.setSkip({0, 0, 1}),
Containers::arrayView(Data2D), 16}};
/* Just 4x4x3 0x00 - 0x7f compressed using RGBA DXT3 by the driver */
constexpr UnsignedByte CompressedData2D[]{
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 17, 17, 34, 34, 51, 51, 67,
232, 57, 0, 0, 213, 255, 170, 2,
68, 84, 85, 101, 102, 118, 119, 119,
239, 123, 8, 66, 213, 255, 170, 2
};
const struct {
const char* name;
Containers::ArrayView<const UnsignedByte> data;
#ifndef MAGNUM_TARGET_GLES
CompressedPixelStorage storage;
#endif
Containers::ArrayView<const UnsignedByte> dataSparse;
std::size_t offset;
} CompressedPixelStorage2DData[]{
{"default pixel storage",
Containers::arrayView(CompressedData2D).exceptPrefix(16),
#ifndef MAGNUM_TARGET_GLES
{},
#endif
Containers::arrayView(CompressedData2D).exceptPrefix(16), 0},
#ifndef MAGNUM_TARGET_GLES
{"skip Y",
Containers::arrayView(CompressedData2D).exceptPrefix(16),
CompressedPixelStorage{}
.setCompressedBlockSize({4, 4, 1})
.setCompressedBlockDataSize(16)
.setSkip({0, 0, 1}),
Containers::arrayView(CompressedData2D), 16}
#endif
};
TextureArrayGLTest::TextureArrayGLTest() {
addTests({
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::construct1D,
#endif
&TextureArrayGLTest::construct2D,
&TextureArrayGLTest::constructMove,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::wrap1D,
#endif
&TextureArrayGLTest::wrap2D,
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::label1D,
#endif
&TextureArrayGLTest::label2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::bind1D,
#endif
&TextureArrayGLTest::bind2D,
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::bindImage1D,
#endif
&TextureArrayGLTest::bindImage2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::sampling1D<GenericSampler>,
&TextureArrayGLTest::sampling1D<GLSampler>,
#endif
&TextureArrayGLTest::sampling2D<GenericSampler>,
&TextureArrayGLTest::sampling2D<GLSampler>,
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingSrgbDecode1D,
#endif
&TextureArrayGLTest::samplingSrgbDecode2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingSwizzle1D,
#endif
#ifndef MAGNUM_TARGET_WEBGL
&TextureArrayGLTest::samplingSwizzle2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingBorderInteger1D,
#endif
#ifndef MAGNUM_TARGET_WEBGL
&TextureArrayGLTest::samplingBorderInteger2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingDepthStencilMode1D,
#endif
#ifndef MAGNUM_TARGET_WEBGL
&TextureArrayGLTest::samplingDepthStencilMode2D,
#endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
&TextureArrayGLTest::samplingBorder2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::storage1D,
#endif
&TextureArrayGLTest::storage2D});
#ifndef MAGNUM_TARGET_GLES
addInstancedTests({
&TextureArrayGLTest::image1D,
&TextureArrayGLTest::image1DBuffer,
&TextureArrayGLTest::image1DQueryView,
&TextureArrayGLTest::subImage1D,
&TextureArrayGLTest::subImage1DBuffer,
&TextureArrayGLTest::subImage1DQuery,
&TextureArrayGLTest::subImage1DQueryView,
&TextureArrayGLTest::subImage1DQueryBuffer},
Containers::arraySize(PixelStorage1DData));
addTests({&TextureArrayGLTest::compressedImage1D,
&TextureArrayGLTest::compressedImage1DBuffer,
&TextureArrayGLTest::compressedImage1DQueryView,
&TextureArrayGLTest::compressedSubImage1D,
&TextureArrayGLTest::compressedSubImage1DBuffer,
&TextureArrayGLTest::compressedSubImage1DQuery,
&TextureArrayGLTest::compressedSubImage1DQueryView,
&TextureArrayGLTest::compressedSubImage1DQueryBuffer});
#endif
addInstancedTests({
&TextureArrayGLTest::image2D,
&TextureArrayGLTest::image2DBuffer,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::image2DQueryView,
#endif
&TextureArrayGLTest::subImage2D,
&TextureArrayGLTest::subImage2DBuffer,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::subImage2DQuery,
&TextureArrayGLTest::subImage2DQueryView,
&TextureArrayGLTest::subImage2DQueryBuffer
#endif
}, Containers::arraySize(PixelStorage2DData));
addInstancedTests({
&TextureArrayGLTest::compressedImage2D,
&TextureArrayGLTest::compressedImage2DBuffer,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::compressedImage2DQueryView,
#endif
&TextureArrayGLTest::compressedSubImage2D,
&TextureArrayGLTest::compressedSubImage2DBuffer,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::compressedSubImage2DQuery,
&TextureArrayGLTest::compressedSubImage2DQueryView,
&TextureArrayGLTest::compressedSubImage2DQueryBuffer
#endif
}, Containers::arraySize(CompressedPixelStorage2DData));
addTests({
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::generateMipmap1D,
#endif
&TextureArrayGLTest::generateMipmap2D,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::invalidateImage1D,
#endif
&TextureArrayGLTest::invalidateImage2D,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::invalidateSubImage1D,
#endif
&TextureArrayGLTest::invalidateSubImage2D
});
}
#ifndef MAGNUM_TARGET_WEBGL
using namespace Containers::Literals;
#endif
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::construct1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
{
Texture1DArray texture;
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_VERIFY(texture.id() > 0);
}
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::construct2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
{
Texture2DArray texture;
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_VERIFY(texture.id() > 0);
}
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TextureArrayGLTest::constructMove() {
/* Move constructor tested in AbstractTexture, here we just verify there
are no extra members that would need to be taken care of */
CORRADE_COMPARE(sizeof(Texture2DArray), sizeof(AbstractTexture));
CORRADE_VERIFY(std::is_nothrow_move_constructible<Texture2DArray>::value);
CORRADE_VERIFY(std::is_nothrow_move_assignable<Texture2DArray>::value);
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::wrap1D() {
GLuint id;
glGenTextures(1, &id);
/* Releasing won't delete anything */
{
auto texture = Texture1DArray::wrap(id, ObjectFlag::DeleteOnDestruction);
CORRADE_COMPARE(texture.release(), id);
}
/* ...so we can wrap it again */
Texture1DArray::wrap(id);
glDeleteTextures(1, &id);
}
#endif
void TextureArrayGLTest::wrap2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
GLuint id;
glGenTextures(1, &id);
/* Releasing won't delete anything */
{
auto texture = Texture2DArray::wrap(id, ObjectFlag::DeleteOnDestruction);
CORRADE_COMPARE(texture.release(), id);
}
/* ...so we can wrap it again */
Texture2DArray::wrap(id);
glDeleteTextures(1, &id);
}
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::label1D() {
/* No-Op version is tested in AbstractObjectGLTest */
if(!Context::current().isExtensionSupported<Extensions::KHR::debug>() &&
!Context::current().isExtensionSupported<Extensions::EXT::debug_label>())
CORRADE_SKIP("Required extension is not available");
Texture1DArray texture;
CORRADE_COMPARE(texture.label(), "");
MAGNUM_VERIFY_NO_GL_ERROR();
/* Test the string size gets correctly used, instead of relying on null
termination */
texture.setLabel("MyTexture!"_s.exceptSuffix(1));
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(texture.label(), "MyTexture");
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::label2D() {
/* No-Op version is tested in AbstractObjectGLTest */
if(!Context::current().isExtensionSupported<Extensions::KHR::debug>() &&
!Context::current().isExtensionSupported<Extensions::EXT::debug_label>())
CORRADE_SKIP("Required extension is not available");
Texture2DArray texture;
CORRADE_COMPARE(texture.label(), "");
MAGNUM_VERIFY_NO_GL_ERROR();
/* Test the string size gets correctly used, instead of relying on null
termination */
texture.setLabel("MyTexture!"_s.exceptSuffix(1));
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(texture.label(), "MyTexture");
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::bind1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.bind(15);
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::unbind(15);
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::bind(7, {&texture, nullptr, &texture});
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::unbind(7, 3);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::bind2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.bind(15);
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::unbind(15);
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::bind(7, {&texture, nullptr, &texture});
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::unbind(7, 3);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::bindImage1D() {
if(!Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>())
CORRADE_SKIP(Extensions::ARB::shader_image_load_store::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, {32, 4})
.bindImage(2, 0, 1, ImageAccess::ReadWrite, ImageFormat::RGBA8);
MAGNUM_VERIFY_NO_GL_ERROR();
texture.bindImageLayered(3, 0, ImageAccess::ReadWrite, ImageFormat::RGBA8);
AbstractTexture::unbindImage(2);
AbstractTexture::unbindImage(3);
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::bindImages(1, {&texture, nullptr, &texture});
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::unbindImages(1, 3);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::bindImage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>())
CORRADE_SKIP(Extensions::ARB::shader_image_load_store::string() << "is not supported.");
#else
if(!Context::current().isVersionSupported(Version::GLES310))
CORRADE_SKIP("OpenGL ES 3.1 is not supported.");
#endif
Texture2DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, {32, 32, 4})
.bindImage(2, 0, 1, ImageAccess::ReadWrite, ImageFormat::RGBA8);
MAGNUM_VERIFY_NO_GL_ERROR();
texture.bindImageLayered(3, 0, ImageAccess::ReadWrite, ImageFormat::RGBA8);
AbstractTexture::unbindImage(2);
AbstractTexture::unbindImage(3);
MAGNUM_VERIFY_NO_GL_ERROR();
#ifndef MAGNUM_TARGET_GLES
AbstractTexture::bindImages(1, {&texture, nullptr, &texture});
MAGNUM_VERIFY_NO_GL_ERROR();
AbstractTexture::unbindImages(1, 3);
MAGNUM_VERIFY_NO_GL_ERROR();
#endif
}
#endif
#ifndef MAGNUM_TARGET_GLES
template<class T> void TextureArrayGLTest::sampling1D() {
setTestCaseTemplateName(std::is_same<T, GenericSampler>::value ?
"GenericSampler" : "GLSampler");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setMinificationFilter(T::Filter::Linear, T::Mipmap::Linear)
.setMagnificationFilter(T::Filter::Linear)
.setMinLod(-750.0f)
.setMaxLod(750.0f)
.setLodBias(0.5f)
.setBaseLevel(1)
.setMaxLevel(750)
.setWrapping(T::Wrapping::ClampToBorder)
.setBorderColor(Color3(0.5f))
.setMaxAnisotropy(Sampler::maxMaxAnisotropy())
.setCompareMode(SamplerCompareMode::CompareRefToTexture)
.setCompareFunction(SamplerCompareFunction::GreaterOrEqual);
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TextureArrayGLTest::samplingSrgbDecode1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::EXT::texture_sRGB_decode::string() << "is not supported.");
Texture1DArray texture;
texture.setSrgbDecode(false);
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TextureArrayGLTest::samplingSwizzle1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::texture_swizzle>())
CORRADE_SKIP(Extensions::ARB::texture_swizzle::string() << "is not supported.");
Texture1DArray texture;
texture.setSwizzle<'b', 'g', 'r', '0'>();
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TextureArrayGLTest::samplingBorderInteger1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_integer>())
CORRADE_SKIP(Extensions::EXT::texture_integer::string() << "is not supported.");
Texture1DArray a;
a.setWrapping(SamplerWrapping::ClampToBorder)
.setBorderColor(Vector4i(1, 56, 78, -2));
Texture1DArray b;
b.setWrapping(SamplerWrapping::ClampToBorder)
.setBorderColor(Vector4ui(35, 56, 78, 15));
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TextureArrayGLTest::samplingDepthStencilMode1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::ARB::stencil_texturing::string() << "is not supported.");
Texture1DArray texture;
texture.setDepthStencilMode(SamplerDepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
template<class T> void TextureArrayGLTest::sampling2D() {
setTestCaseTemplateName(std::is_same<T, GenericSampler>::value ?
"GenericSampler" : "GLSampler");
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setMinificationFilter(T::Filter::Linear, T::Mipmap::Linear)
.setMagnificationFilter(T::Filter::Linear)
#ifndef MAGNUM_TARGET_GLES2
.setMinLod(-750.0f)
.setMaxLod(750.0f)
#ifndef MAGNUM_TARGET_GLES
.setLodBias(0.5f)
#endif
.setBaseLevel(1)
.setMaxLevel(750)
#endif
#ifndef MAGNUM_TARGET_GLES
.setWrapping(T::Wrapping::ClampToBorder)
.setBorderColor(Color3(0.5f))
#else
.setWrapping(T::Wrapping::ClampToEdge)
#endif
.setMaxAnisotropy(Sampler::maxMaxAnisotropy())
#ifndef MAGNUM_TARGET_GLES
.setCompareMode(SamplerCompareMode::CompareRefToTexture)
.setCompareFunction(SamplerCompareFunction::GreaterOrEqual)
#endif
;
MAGNUM_VERIFY_NO_GL_ERROR();
}
#ifndef MAGNUM_TARGET_WEBGL
void TextureArrayGLTest::samplingSrgbDecode2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::EXT::texture_sRGB_decode::string() << "is not supported.");
Texture2DArray texture;
texture.setSrgbDecode(false);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void TextureArrayGLTest::samplingSwizzle2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::texture_swizzle>())
CORRADE_SKIP(Extensions::ARB::texture_swizzle::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setSwizzle<'b', 'g', 'r', '0'>();
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void TextureArrayGLTest::samplingMaxLevel2D() {
if(!Context::current().isExtensionSupported<Extensions::APPLE::texture_max_level>())
CORRADE_SKIP(Extensions::APPLE::texture_max_level::string() << "is not supported.");
Texture2DArray texture;
texture.setMaxLevel(750);
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TextureArrayGLTest::samplingCompare2D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::shadow_samplers>() ||
!Context::current().isExtensionSupported<Extensions::NV::shadow_samplers_array>())
CORRADE_SKIP(Extensions::NV::shadow_samplers_array::string() << "is not supported.");
Texture2DArray texture;
texture.setCompareMode(SamplerCompareMode::CompareRefToTexture)
.setCompareFunction(SamplerCompareFunction::GreaterOrEqual);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void TextureArrayGLTest::samplingBorderInteger2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_integer>())
CORRADE_SKIP(Extensions::EXT::texture_integer::string() << "is not supported.");
#else
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_border_clamp>())
CORRADE_SKIP(Extensions::EXT::texture_border_clamp::string() << "is not supported.");
#endif
Texture2DArray a;
a.setWrapping(SamplerWrapping::ClampToBorder)
.setBorderColor(Vector4i(1, 56, 78, -2));
Texture2DArray b;
b.setWrapping(SamplerWrapping::ClampToBorder)
.setBorderColor(Vector4ui(35, 56, 78, 15));
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#ifndef MAGNUM_TARGET_WEBGL
void TextureArrayGLTest::samplingDepthStencilMode2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::ARB::stencil_texturing::string() << "is not supported.");
#else
if(!Context::current().isVersionSupported(Version::GLES310))
CORRADE_SKIP("OpenGL ES 3.1 is not supported.");
#endif
Texture2DArray texture;
texture.setDepthStencilMode(SamplerDepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
void TextureArrayGLTest::samplingBorder2D() {
if(!Context::current().isExtensionSupported<Extensions::NV::texture_border_clamp>() &&
!Context::current().isExtensionSupported<Extensions::EXT::texture_border_clamp>())
CORRADE_SKIP("No required extension is supported.");
Texture2DArray texture;
texture.setWrapping(SamplerWrapping::ClampToBorder)
.setBorderColor(Color3(0.5f));
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::storage1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(5, TextureFormat::RGBA8, Vector2i(32));
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(texture.imageSize(0), Vector2i(32, 32));
CORRADE_COMPARE(texture.imageSize(1), Vector2i(16, 32));
CORRADE_COMPARE(texture.imageSize(2), Vector2i( 8, 32));
CORRADE_COMPARE(texture.imageSize(3), Vector2i( 4, 32));
CORRADE_COMPARE(texture.imageSize(4), Vector2i( 2, 32));
CORRADE_COMPARE(texture.imageSize(5), Vector2i( 0, 0)); /* not available */
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::storage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setStorage(5, TextureFormat::RGBA8, Vector3i(32));
MAGNUM_VERIFY_NO_GL_ERROR();
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
#ifdef MAGNUM_TARGET_GLES
if(!Context::current().isVersionSupported(Version::GLES310))
CORRADE_SKIP("OpenGL ES 3.1 not supported, skipping image size testing");
#endif
CORRADE_COMPARE(texture.imageSize(0), Vector3i(32, 32, 32));
CORRADE_COMPARE(texture.imageSize(1), Vector3i(16, 16, 32));
CORRADE_COMPARE(texture.imageSize(2), Vector3i( 8, 8, 32));
CORRADE_COMPARE(texture.imageSize(3), Vector3i( 4, 4, 32));
CORRADE_COMPARE(texture.imageSize(4), Vector3i( 2, 2, 32));
CORRADE_COMPARE(texture.imageSize(5), Vector3i( 0, 0, 0)); /* not available */
MAGNUM_VERIFY_NO_GL_ERROR();
#endif
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::image1D() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setImage(0, TextureFormat::RGBA8, ImageView2D{
PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(2), PixelStorage1DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
Image2D image = texture.image(0, {PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.flags(), ImageFlag2D::Array);
CORRADE_COMPARE(image.size(), Vector2i(2));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage1DData[testCaseInstanceId()].offset),
PixelStorage1DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::image1DBuffer() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setImage(0, TextureFormat::RGBA8, BufferImage2D{
PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(2), PixelStorage1DData[testCaseInstanceId()].dataSparse,
BufferUsage::StaticDraw});
MAGNUM_VERIFY_NO_GL_ERROR();
BufferImage2D image = texture.image(0,
{PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);
auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector2i(2));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData).exceptPrefix(PixelStorage1DData[testCaseInstanceId()].offset),
PixelStorage1DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::image1DQueryView() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setImage(0, TextureFormat::RGBA8, ImageView2D{
PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(2), PixelStorage1DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
Containers::Array<char> data{PixelStorage1DData[testCaseInstanceId()].offset + 2*2*4};
MutableImageView2D image{PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i{2}, data, ImageFlag2D::Array};
texture.image(0, image);
MAGNUM_VERIFY_NO_GL_ERROR();
/* Doesn't matter what flags are set, they stay untouched */
CORRADE_COMPARE(image.flags(), ImageFlag2D::Array);
CORRADE_COMPARE(image.size(), Vector2i(2));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage1DData[testCaseInstanceId()].offset),
PixelStorage1DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
constexpr UnsignedByte Zero1D[4*4*4] = {};
constexpr UnsignedByte SubData1DComplete[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0, 0, 0, 0,
0, 0, 0, 0, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
void TextureArrayGLTest::subImage1D() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setImage(0, TextureFormat::RGBA8,
ImageView2D(PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(4), Zero1D));
texture.setSubImage(0, Vector2i(1), ImageView2D{
PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(2), PixelStorage1DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
Image2D image = texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector2i(4));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()),
Containers::arrayView(SubData1DComplete),
TestSuite::Compare::Container);
}
void TextureArrayGLTest::subImage1DBuffer() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setImage(0, TextureFormat::RGBA8,
ImageView2D(PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(4), Zero1D));
texture.setSubImage(0, Vector2i(1), BufferImage2D{
PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(2),
PixelStorage1DData[testCaseInstanceId()].dataSparse,
BufferUsage::StaticDraw});
MAGNUM_VERIFY_NO_GL_ERROR();
BufferImage2D image = texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);
auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector2i(4));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData),
Containers::arrayView(SubData1DComplete),
TestSuite::Compare::Container);
}
void TextureArrayGLTest::subImage1DQuery() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, Vector2i{4})
.setSubImage(0, {}, ImageView2D{PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i{4}, SubData1DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
Image2D image = texture.subImage(0, Range2Di::fromSize(Vector2i{1}, Vector2i{2}),
{PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.flags(), ImageFlag2D::Array);
CORRADE_COMPARE(image.size(), Vector2i{2});
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage1DData[testCaseInstanceId()].offset),
PixelStorage1DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::subImage1DQueryView() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, Vector2i{4})
.setSubImage(0, {}, ImageView2D{PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i{4}, SubData1DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
Containers::Array<char> data{PixelStorage1DData[testCaseInstanceId()].offset + 2*2*4};
MutableImageView2D image{PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i{2}, data, ImageFlag2D::Array};
texture.subImage(0, Range2Di::fromSize(Vector2i{1}, Vector2i{2}), image);
MAGNUM_VERIFY_NO_GL_ERROR();
/* Doesn't matter what flags are set, they stay untouched */
CORRADE_COMPARE(image.flags(), ImageFlag2D::Array);
CORRADE_COMPARE(image.size(), Vector2i{2});
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage1DData[testCaseInstanceId()].offset),
PixelStorage1DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::subImage1DQueryBuffer() {
setTestCaseDescription(PixelStorage1DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, Vector2i{4})
.setSubImage(0, {}, ImageView2D{PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i{4}, SubData1DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
BufferImage2D image = texture.subImage(0, Range2Di::fromSize(Vector2i{1}, Vector2i{2}),
{PixelStorage1DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);
auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector2i{2});
/* Was broken on NV since 370.xx (May 2017), fixed in 390.25 (Mar 2018) */
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData).exceptPrefix(PixelStorage1DData[testCaseInstanceId()].offset),
PixelStorage1DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::compressedImage1D() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedImage1DBuffer() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedImage1DQueryView() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedSubImage1D() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedSubImage1DBuffer() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedSubImage1DQuery() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedSubImage1DQueryView() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
void TextureArrayGLTest::compressedSubImage1DQueryBuffer() {
CORRADE_SKIP("No 1D texture compression format exists.");
}
#endif
void TextureArrayGLTest::image2D() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setImage(0, TextureFormat::RGBA8, ImageView3D{
PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(2),
PixelStorage2DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
/** @todo How to test this on ES? */
#ifndef MAGNUM_TARGET_GLES
Image3D image = texture.image(0, {PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.flags(), ImageFlag3D::Array);
CORRADE_COMPARE(image.size(), Vector3i(2));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage2DData[testCaseInstanceId()].offset),
PixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
#endif
}
void TextureArrayGLTest::image2DBuffer() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setImage(0, TextureFormat::RGBA8, BufferImage3D{
PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(2),
PixelStorage2DData[testCaseInstanceId()].dataSparse,
BufferUsage::StaticDraw});
MAGNUM_VERIFY_NO_GL_ERROR();
/** @todo How to test this on ES? */
#ifndef MAGNUM_TARGET_GLES
BufferImage3D image = texture.image(0, {PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);
auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector3i(2));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData).exceptPrefix(PixelStorage2DData[testCaseInstanceId()].offset),
PixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
#endif
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::image2DQueryView() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture2DArray texture;
texture.setImage(0, TextureFormat::RGBA8, ImageView3D{
PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(2),
PixelStorage2DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
Containers::Array<char> data{PixelStorage2DData[testCaseInstanceId()].offset + 2*2*2*4};
MutableImageView3D image{PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i{2}, data};
texture.image(0, image);
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector3i(2));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage2DData[testCaseInstanceId()].offset),
PixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
#endif
constexpr UnsignedByte Zero2D[4*4*4*4]{};
#ifndef MAGNUM_TARGET_GLES
constexpr UnsignedByte SubData2DComplete[]{
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, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0, 0, 0, 0,
0, 0, 0, 0, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 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, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0, 0, 0, 0,
0, 0, 0, 0, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 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, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
#endif
void TextureArrayGLTest::subImage2D() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setImage(0, TextureFormat::RGBA8,
ImageView3D(PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(4), Zero2D));
texture.setSubImage(0, Vector3i(1), ImageView3D{
PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(2),
PixelStorage2DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
/** @todo How to test this on ES? */
#ifndef MAGNUM_TARGET_GLES
Image3D image = texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector3i(4));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()),
Containers::arrayView(SubData2DComplete),
TestSuite::Compare::Container);
#endif
}
void TextureArrayGLTest::subImage2DBuffer() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setImage(0, TextureFormat::RGBA8,
ImageView3D(PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(4), Zero2D));
texture.setSubImage(0, Vector3i(1), BufferImage3D{
PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(2),
PixelStorage2DData[testCaseInstanceId()].dataSparse,
BufferUsage::StaticDraw});
MAGNUM_VERIFY_NO_GL_ERROR();
/** @todo How to test this on ES? */
#ifndef MAGNUM_TARGET_GLES
BufferImage3D image = texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);
const auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector3i(4));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData),
Containers::arrayView(SubData2DComplete),
TestSuite::Compare::Container);
#endif
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::subImage2DQuery() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
Texture2DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, Vector3i{4})
.setSubImage(0, {}, ImageView3D{PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i{4}, SubData2DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
Image3D image = texture.subImage(0, Range3Di::fromSize(Vector3i{1}, Vector3i{2}),
{PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.flags(), ImageFlag3D::Array);
CORRADE_COMPARE(image.size(), Vector3i{2});
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage2DData[testCaseInstanceId()].offset),
PixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::subImage2DQueryView() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
Texture2DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, Vector3i{4})
.setSubImage(0, {}, ImageView3D{PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i{4}, SubData2DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
Containers::Array<char> data{PixelStorage2DData[testCaseInstanceId()].offset + 2*2*2*4};
MutableImageView3D image{PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i{2}, data, ImageFlag3D::Array};
texture.subImage(0, Range3Di::fromSize(Vector3i{1}, Vector3i{2}), image);
MAGNUM_VERIFY_NO_GL_ERROR();
/* Doesn't matter what flags are set, they stay untouched */
CORRADE_COMPARE(image.flags(), ImageFlag3D::Array);
CORRADE_COMPARE(image.size(), Vector3i{2});
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(PixelStorage2DData[testCaseInstanceId()].offset),
PixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::subImage2DQueryBuffer() {
setTestCaseDescription(PixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
Texture2DArray texture;
texture.setStorage(1, TextureFormat::RGBA8, Vector3i{4})
.setSubImage(0, {}, ImageView3D{PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i{4}, SubData2DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
BufferImage3D image = texture.subImage(0, Range3Di::fromSize(Vector3i{1}, Vector3i{2}),
{PixelStorage2DData[testCaseInstanceId()].storage,
PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);
const auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), Vector3i{2});
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData).exceptPrefix(PixelStorage2DData[testCaseInstanceId()].offset),
PixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
#endif
void TextureArrayGLTest::compressedImage2D() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
#elif defined(MAGNUM_TARGET_WEBGL)
if(!Context::current().isExtensionSupported<Extensions::WEBGL::compressed_texture_s3tc>())
CORRADE_SKIP(Extensions::WEBGL::compressed_texture_s3tc::string() << "is not supported.");
#else
if(!Context::current().isExtensionSupported<Extensions::ANGLE::texture_compression_dxt3>())
CORRADE_SKIP(Extensions::ANGLE::texture_compression_dxt3::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setCompressedImage(0, CompressedImageView3D{
#ifndef MAGNUM_TARGET_GLES
CompressedPixelStorage2DData[testCaseInstanceId()].storage,
#endif
CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2},
CompressedPixelStorage2DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
#ifndef MAGNUM_TARGET_GLES
CompressedImage3D image = texture.compressedImage(0, {CompressedPixelStorage2DData[testCaseInstanceId()].storage});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.flags(), ImageFlag3D::Array);
CORRADE_COMPARE(image.size(), (Vector3i{4, 4, 2}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(CompressedPixelStorage2DData[testCaseInstanceId()].offset),
CompressedPixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
#endif
}
void TextureArrayGLTest::compressedImage2DBuffer() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
#elif defined(MAGNUM_TARGET_WEBGL)
if(!Context::current().isExtensionSupported<Extensions::WEBGL::compressed_texture_s3tc>())
CORRADE_SKIP(Extensions::WEBGL::compressed_texture_s3tc::string() << "is not supported.");
#else
if(!Context::current().isExtensionSupported<Extensions::ANGLE::texture_compression_dxt3>())
CORRADE_SKIP(Extensions::ANGLE::texture_compression_dxt3::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setCompressedImage(0, CompressedBufferImage3D{
#ifndef MAGNUM_TARGET_GLES
CompressedPixelStorage2DData[testCaseInstanceId()].storage,
#endif
CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2},
CompressedPixelStorage2DData[testCaseInstanceId()].dataSparse,
BufferUsage::StaticDraw});
MAGNUM_VERIFY_NO_GL_ERROR();
#ifndef MAGNUM_TARGET_GLES
CompressedBufferImage3D image = texture.compressedImage(0, {CompressedPixelStorage2DData[testCaseInstanceId()].storage}, BufferUsage::StaticRead);
const auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), (Vector3i{4, 4, 2}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData).exceptPrefix(CompressedPixelStorage2DData[testCaseInstanceId()].offset),
CompressedPixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
#endif
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::compressedImage2DQueryView() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
Texture2DArray texture;
texture.setCompressedImage(0, CompressedImageView3D{
CompressedPixelStorage2DData[testCaseInstanceId()].storage,
CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2},
CompressedPixelStorage2DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
Containers::Array<char> data{CompressedPixelStorage2DData[testCaseInstanceId()].offset + 2*16};
MutableCompressedImageView3D image{CompressedPixelStorage2DData[testCaseInstanceId()].storage, CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2}, data};
texture.compressedImage(0, image);
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), (Vector3i{4, 4, 2}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(CompressedPixelStorage2DData[testCaseInstanceId()].offset),
CompressedPixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
#endif
/* Just 12x4x4 zeros compressed using RGBA DXT3 by the driver */
constexpr UnsignedByte CompressedZero2D[3*4*16]{};
#ifndef MAGNUM_TARGET_GLES
/* Combination of CompressedZero2D and CompressedData2D */
constexpr UnsignedByte CompressedSubData2DComplete[]{
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, 0,
0, 17, 17, 34, 34, 51, 51, 67,
232, 57, 0, 0, 213, 255, 170, 2,
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,
68, 84, 85, 101, 102, 118, 119, 119,
239, 123, 8, 66, 213, 255, 170, 2,
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, 0
};
#endif
void TextureArrayGLTest::compressedSubImage2D() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
#elif defined(MAGNUM_TARGET_WEBGL)
if(!Context::current().isExtensionSupported<Extensions::WEBGL::compressed_texture_s3tc>())
CORRADE_SKIP(Extensions::WEBGL::compressed_texture_s3tc::string() << "is not supported.");
#else
if(!Context::current().isExtensionSupported<Extensions::ANGLE::texture_compression_dxt3>())
CORRADE_SKIP(Extensions::ANGLE::texture_compression_dxt3::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setCompressedImage(0, CompressedImageView3D{CompressedPixelFormat::RGBAS3tcDxt3,
Vector3i{12, 4, 4}, CompressedZero2D});
texture.setCompressedSubImage(0, {4, 0, 1}, CompressedImageView3D{
#ifndef MAGNUM_TARGET_GLES
CompressedPixelStorage2DData[testCaseInstanceId()].storage,
#endif
CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2},
CompressedPixelStorage2DData[testCaseInstanceId()].dataSparse});
MAGNUM_VERIFY_NO_GL_ERROR();
#ifndef MAGNUM_TARGET_GLES
CompressedImage3D image = texture.compressedImage(0, {});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), (Vector3i{12, 4, 4}));
{
CORRADE_EXPECT_FAIL_IF(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && (Context::current().detectedDriver() & Context::DetectedDriver::NVidia),
"Non-default compressed pixel storage for array textures behaves weirdly on NVidia");
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()),
Containers::arrayView(CompressedSubData2DComplete),
TestSuite::Compare::Container);
}
#endif
}
void TextureArrayGLTest::compressedSubImage2DBuffer() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
#elif defined(MAGNUM_TARGET_WEBGL)
if(!Context::current().isExtensionSupported<Extensions::WEBGL::compressed_texture_s3tc>())
CORRADE_SKIP(Extensions::WEBGL::compressed_texture_s3tc::string() << "is not supported.");
#else
if(!Context::current().isExtensionSupported<Extensions::ANGLE::texture_compression_dxt3>())
CORRADE_SKIP(Extensions::ANGLE::texture_compression_dxt3::string() << "is not supported.");
#endif
#ifndef MAGNUM_TARGET_GLES
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setCompressedImage(0, CompressedImageView3D{CompressedPixelFormat::RGBAS3tcDxt3,
Vector3i{12, 4, 4}, CompressedZero2D});
texture.setCompressedSubImage(0, {4, 0, 1}, CompressedBufferImage3D{
#ifndef MAGNUM_TARGET_GLES
CompressedPixelStorage2DData[testCaseInstanceId()].storage,
#endif
CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2},
CompressedPixelStorage2DData[testCaseInstanceId()].dataSparse,
BufferUsage::StaticDraw});
MAGNUM_VERIFY_NO_GL_ERROR();
#ifndef MAGNUM_TARGET_GLES
CompressedBufferImage3D image = texture.compressedImage(0, {}, BufferUsage::StaticRead);
const auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), (Vector3i{12, 4, 4}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData),
Containers::arrayView(CompressedSubData2DComplete),
TestSuite::Compare::Container);
#endif
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::compressedSubImage2DQuery() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage == CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::internalformat_query2>())
CORRADE_SKIP(Extensions::ARB::internalformat_query2::string() << "is not supported.");
Texture2DArray texture;
texture.setStorage(1, TextureFormat::CompressedRGBAS3tcDxt3, {12, 4, 4})
.setCompressedSubImage(0, {}, CompressedImageView3D{CompressedPixelFormat::RGBAS3tcDxt3,
{12, 4, 4}, CompressedSubData2DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
CompressedImage3D image = texture.compressedSubImage(0, Range3Di::fromSize({4, 0, 1}, {4, 4, 2}), {CompressedPixelStorage2DData[testCaseInstanceId()].storage});
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.flags(), ImageFlag3D::Array);
CORRADE_COMPARE(image.size(), (Vector3i{4, 4, 2}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(CompressedPixelStorage2DData[testCaseInstanceId()].offset),
CompressedPixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::compressedSubImage2DQueryView() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage == CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::internalformat_query2>())
CORRADE_SKIP(Extensions::ARB::internalformat_query2::string() << "is not supported.");
Texture2DArray texture;
texture.setStorage(1, TextureFormat::CompressedRGBAS3tcDxt3, {12, 4, 4})
.setCompressedSubImage(0, {}, CompressedImageView3D{CompressedPixelFormat::RGBAS3tcDxt3,
{12, 4, 4}, CompressedSubData2DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
Containers::Array<char> data{CompressedPixelStorage2DData[testCaseInstanceId()].offset + 2*16};
MutableCompressedImageView3D image{CompressedPixelStorage2DData[testCaseInstanceId()].storage, CompressedPixelFormat::RGBAS3tcDxt3, {4, 4, 2}, data, ImageFlag3D::Array};
texture.compressedSubImage(0, Range3Di::fromSize({4, 0, 1}, {4, 4, 2}), image);
MAGNUM_VERIFY_NO_GL_ERROR();
/* Doesn't matter what flags are set, they stay untouched */
CORRADE_COMPARE(image.flags(), ImageFlag3D::Array);
CORRADE_COMPARE(image.size(), (Vector3i{4, 4, 2}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(image.data()).exceptPrefix(CompressedPixelStorage2DData[testCaseInstanceId()].offset),
CompressedPixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::compressedSubImage2DQueryBuffer() {
setTestCaseDescription(CompressedPixelStorage2DData[testCaseInstanceId()].name);
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::ARB::get_texture_sub_image>())
CORRADE_SKIP(Extensions::ARB::get_texture_sub_image::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_compression_s3tc>())
CORRADE_SKIP(Extensions::EXT::texture_compression_s3tc::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage != CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::compressed_texture_pixel_storage>())
CORRADE_SKIP(Extensions::ARB::compressed_texture_pixel_storage::string() << "is not supported.");
if(CompressedPixelStorage2DData[testCaseInstanceId()].storage == CompressedPixelStorage{} && !Context::current().isExtensionSupported<Extensions::ARB::internalformat_query2>())
CORRADE_SKIP(Extensions::ARB::internalformat_query2::string() << "is not supported.");
Texture2DArray texture;
texture.setStorage(1, TextureFormat::CompressedRGBAS3tcDxt3, {12, 4, 4})
.setCompressedSubImage(0, {}, CompressedImageView3D{CompressedPixelFormat::RGBAS3tcDxt3,
{12, 4, 4}, CompressedSubData2DComplete});
MAGNUM_VERIFY_NO_GL_ERROR();
CompressedBufferImage3D image = texture.compressedSubImage(0, Range3Di::fromSize({4, 0, 1}, {4, 4, 2}), {
#ifndef MAGNUM_TARGET_GLES
CompressedPixelStorage2DData[testCaseInstanceId()].storage
#endif
}, BufferUsage::StaticRead);
const auto imageData = image.buffer().data();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(image.size(), (Vector3i{4, 4, 2}));
CORRADE_COMPARE_AS(Containers::arrayCast<UnsignedByte>(imageData).exceptPrefix(CompressedPixelStorage2DData[testCaseInstanceId()].offset),
CompressedPixelStorage2DData[testCaseInstanceId()].data,
TestSuite::Compare::Container);
}
void TextureArrayGLTest::generateMipmap1D() {
if(!Context::current().isExtensionSupported<Extensions::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::ARB::framebuffer_object::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setImage(0, TextureFormat::RGBA8,
ImageView2D(PixelFormat::RGBA, PixelType::UnsignedByte, Vector2i(32)));
CORRADE_COMPARE(texture.imageSize(0), Vector2i(32));
CORRADE_COMPARE(texture.imageSize(1), Vector2i( 0));
texture.generateMipmap();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_COMPARE(texture.imageSize(0), Vector2i(32, 32));
CORRADE_COMPARE(texture.imageSize(1), Vector2i(16, 32));
CORRADE_COMPARE(texture.imageSize(2), Vector2i( 8, 32));
CORRADE_COMPARE(texture.imageSize(3), Vector2i( 4, 32));
CORRADE_COMPARE(texture.imageSize(4), Vector2i( 2, 32));
CORRADE_COMPARE(texture.imageSize(5), Vector2i( 1, 32));
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::generateMipmap2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::ARB::framebuffer_object::string() << "is not supported.");
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setImage(0, TextureFormat::RGBA8,
ImageView3D(PixelFormat::RGBA, PixelType::UnsignedByte, Vector3i(32)));
/** @todo How to test this on ES? */
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE(texture.imageSize(0), Vector3i(32));
CORRADE_COMPARE(texture.imageSize(1), Vector3i( 0));
#endif
texture.generateMipmap();
MAGNUM_VERIFY_NO_GL_ERROR();
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE(texture.imageSize(0), Vector3i(32, 32, 32));
CORRADE_COMPARE(texture.imageSize(1), Vector3i(16, 16, 32));
CORRADE_COMPARE(texture.imageSize(2), Vector3i( 8, 8, 32));
CORRADE_COMPARE(texture.imageSize(3), Vector3i( 4, 4, 32));
CORRADE_COMPARE(texture.imageSize(4), Vector3i( 2, 2, 32));
CORRADE_COMPARE(texture.imageSize(5), Vector3i( 1, 1, 32));
MAGNUM_VERIFY_NO_GL_ERROR();
#endif
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::invalidateImage1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(2, TextureFormat::RGBA8, Vector2i(32));
texture.invalidateImage(1);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::invalidateImage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setStorage(2, TextureFormat::RGBA8, Vector3i(32));
texture.invalidateImage(1);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayGLTest::invalidateSubImage1D() {
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
Texture1DArray texture;
texture.setStorage(2, TextureFormat::RGBA8, Vector2i(32));
texture.invalidateSubImage(1, Vector2i(2), Vector2i(8));
MAGNUM_VERIFY_NO_GL_ERROR();
}
#endif
void TextureArrayGLTest::invalidateSubImage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
CORRADE_SKIP(Extensions::EXT::texture_array::string() << "is not supported.");
#endif
Texture2DArray texture;
texture.setStorage(2, TextureFormat::RGBA8, Vector3i(32));
texture.invalidateSubImage(1, Vector3i(2), Vector3i(8));
MAGNUM_VERIFY_NO_GL_ERROR();
}
}}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::TextureArrayGLTest)
| [
"mosra@centrum.cz"
] | mosra@centrum.cz |
05eb0db66f0e6b32b3a360a17b92197f3ab84a11 | 3623a34d18c65e3087d038b17b8f9a1231764647 | /ActionShooting/Draw2DObject.cpp | 5b013db5f082a0284db4b58d6ff148eb1dc71247 | [] | no_license | Taka03/DogFight | 3f47e6ef84ac87234f54904487f4617b80c7ffc8 | 76f5065a0b56d705ab0b546810261a80b31e2ce5 | refs/heads/master | 2021-03-12T20:06:23.790726 | 2013-05-07T13:31:34 | 2013-05-07T13:31:34 | null | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 623 | cpp | #include "Draw2DObject.h"
//============================================================================
//コンストラクタ
//============================================================================
//[input]
// pName:ファイル名
//===========================================================================
CDraw2DObject::CDraw2DObject( const char *pName )
:CDrawObject( pName ),
{
}
//============================================================================
//デストラクタ
//============================================================================
CDraw2DObject::~CDraw2DObject( )
{
}
| [
"luigemansion@yahoo.co.jp"
] | luigemansion@yahoo.co.jp |
ef18693eda0308014a4e1aa80c28c5c2d4b24baa | b3283c88e4ddb5f228f16448be6e9dee3d8cb272 | /ngy313/detail/opengl_texture.hpp | 7c212c688c60e454257c0f06f940e4b19ed4ec4e | [
"BSD-3-Clause",
"BSL-1.0"
] | permissive | nagoya313/ngy313 | ae386c84a4d3b5b68d5e172b32de9cd0fe90cf5c | 7c93a3edf69080559049d5e759a4db1be5e1e2fd | refs/heads/master | 2021-01-10T19:09:18.562953 | 2011-07-27T17:12:19 | 2011-07-27T17:12:19 | 1,025,796 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,902 | hpp | #ifndef NGY313_DETAIL_OPENGL_TEXTURE_HPP_
#define NGY313_DETAIL_OPENGL_TEXTURE_HPP_
#include <cassert>
#include <functional>
#include <memory>
#include <tuple>
#include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
#include <boost/signals2/trackable.hpp>
#include <GL/gl.h>
namespace ngy313 { namespace detail {
template <typename Device>
struct texture_delete {
explicit texture_delete(const Device &device) : device_(&device) {}
void operator ()(const GLuint *texture) const {
assert(texture && device_);
const typename Device::scoped_render render(*device_);
glDeleteTextures(1, texture);
delete texture;
}
private:
const Device *device_;
};
template <typename Device>
struct texture_handle {
typedef std::unique_ptr<GLuint, texture_delete<Device>> type;
};
template <typename Device>
struct texture_tuple {
typedef std::tuple<typename texture_handle<Device>::type, int, int> type;
};
template <typename Device,
typename Result = typename texture_tuple<Device>::type>
Result create_empty_texture(const Device &device, int width, int height) {
const typename Device::scoped_render render(device);
typename texture_handle<Device>::type id(new GLuint(),
texture_delete<Device>(device));
glGenTextures(1, id.get());
glBindTexture(GL_TEXTURE_2D, *id);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGBA,
width,
height,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
nullptr);
return std::make_tuple(std::move(id), width, height);
}
template <typename Device,
typename Texture,
typename Pred,
typename Result = typename texture_tuple<Device>::type>
Result create_texture(Device &device, Texture &texture, Pred pred) {
const typename Device::scoped_render render(device);
if (render.succeeded()) {
return pred(device);
} else {
const auto func = [&device, pred] {return pred(device);};
device.after_reset().connect(boost::bind(
&Texture::template reset<decltype(func)>,
&texture,
func));
return std::make_tuple(typename texture_handle<Device>::type(
nullptr,
texture_delete<Device>(device)),
0,
0);
}
}
template <typename Device>
class opengl_texture : public boost::signals2::trackable {
public:
typedef const typename texture_handle<Device>::type &handle_type;
typedef std::tuple<typename texture_handle<Device>::type,
int,
int> texture_tuple;
explicit opengl_texture(Device &device, int width, int height)
: data_(create_texture(device,
*this,
[&](Device &device) {
return create_empty_texture(device,
width,
height);
})) {}
template <typename Image>
explicit opengl_texture(Device &device, const Image &image)
: data_(create_texture(device, *this, image)) {}
int width() const {
return std::get<1>(data_);
}
int height() const {
return std::get<2>(data_);
}
handle_type handle() const {
return std::get<0>(data_);
}
template <typename Pred>
void reset(Pred data) {
data_ = data();
}
private:
texture_tuple data_;
};
}}
#endif
| [
"nagoya313@gmail.com"
] | nagoya313@gmail.com |
c0c2d3b65ac0c2ffdaed7e1bf88c8d490600c8a8 | 31574641b4b90bd5da95fc0595e91370c57ee32b | /src/util/statcollector.h | fe9973f4db15978c4d76f7d53aacfadb3b6a2aa3 | [] | no_license | jgera/trackingwsn | c2671e2610b6c16295ce2fe63adca50f539aec7d | 7c54b9a9cf0c34563cc40d1453d0e90fd53addf4 | refs/heads/master | 2021-01-15T09:33:35.118152 | 2014-02-14T09:32:36 | 2014-02-14T09:32:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,885 | h | //
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//
#ifndef __TRACKINGWSN_STATCOLLECTOR_H_
#define __TRACKINGWSN_STATCOLLECTOR_H_
#include <omnetpp.h>
/**
* Statistics Collector
*/
class StatCollector : public cSimpleModule
{
private:
cMessage *pollTSE; // Timer for polling total sensor energy
int numRecvPacket; // Number of successfully received packets
int numLostPacket; // Number of lost packets
simsignal_t totalSensorEnergySignal;
simsignal_t sigRecvPacket;
simsignal_t sigLostPacket;
simsignal_t estErrSignal;
/**
* Record remaining energy of sensor nodes
*/
void recRemainingEnergy();
protected:
virtual void initialize();
virtual void handleMessage(cMessage *msg);
public:
StatCollector();
~StatCollector();
/* Calculate total energy and emit it */
void pollTotalSensorEnergy();
/* Increase number of successfully received packets (payload frames) */
void incRecvPacket();
/* Increase number of lost packets (payload frames) */
void incLostPacket();
/* Record estimation error */
void recEstError(double err);
void finish();
};
#endif
| [
"quannt24@gmail.com"
] | quannt24@gmail.com |
0a6e751fa55471e71d1160421ec6391e093d3091 | edc515702562a96aa31e3c353075b2f56f0bdd5d | /firstProject/Joint Project 1/enemySentry.cpp | ef693e44f191860bb7d526b887559f373dce22e4 | [] | no_license | AndrewHBashorum/Project-One | b40309fc441001b0e8d89f02b116673f47d39e37 | c8ec03659faf92e144be4a08b40d407365625367 | refs/heads/master | 2020-04-26T17:49:29.373583 | 2019-03-04T10:43:42 | 2019-03-04T10:43:42 | 173,725,272 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,161 | cpp |
#include "enemySentry.h"
#include "Globals.h"
#include "Player.h"
EnemySentry::EnemySentry() // default constructor
{
loadImageEnemy(); // load the image file for the sprite
speed = 2.8; // the average speed
direction = WEST;
}
void EnemySentry::restart() // resets enemy sentry
{
speed = 2.8; // the average speed
direction = WEST; // reset directiom
bulletHitSentry = false; // reset bools
enemyDied = false;
leftScreen = false;
}
void EnemySentry::setPosition(int t_Xpos, int t_Ypos) // set Pos of sentry to new inputed c0-ords
{
enemySprite.setPosition(t_Xpos, t_Ypos);
}
sf::Sprite EnemySentry::getEnemyBody() // returns sprite
{
return enemySprite; // enemy sprite
}
void EnemySentry::die() // if enemy is shot function
{
enemyDied = true; // enemy is dead / bool for drawing
bulletHitSentry = true; // bullet hit sentry
enemySprite.setPosition(2000,2000); // set Pos and off screen
int num = (rand() % 7) + 1; // random number between 1 and 7
if (num == 2) // random chance of dropping item
{
droppedBase = true;
}
else
droppedBase = false;
}
void EnemySentry::enemySetSpeed(int t_speed)
{
speed = t_speed; // set new speed of enemy sentry
}
void EnemySentry::enemyMoveLeft() // moves enemy left
{
enemySprite.setTexture(enemyWest); // sets texture to west
if (enemySprite.getPosition().x >= 1) // border checking
{
enemySprite.setPosition(enemySprite.getPosition().x - speed, enemySprite.getPosition().y); // minuses speed from x c0-ord of sentry
}
else // off-screen
{
enemySprite.setPosition(enemySprite.getPosition().x + SCREEN_WIDTH, enemySprite.getPosition().y); // minuses speed from y c0-ord of sentry
leftScreen = true; //
}
}
void EnemySentry::enemyMoveRight() // moves enemy right
{
enemySprite.setTexture(enemyEast); // moves enemy east
if (enemySprite.getPosition().x <= SCREEN_WIDTH) // border checking
{
enemySprite.setPosition(enemySprite.getPosition().x + speed, enemySprite.getPosition().y); // updates x pos of sentry
}
else if (enemyDied == false) // enemy still alive / // off-screen
{
enemySprite.setPosition(enemySprite.getPosition().x - SCREEN_WIDTH, enemySprite.getPosition().y); // updates y pos of sentry
leftScreen = true;
}
}
void EnemySentry::enemyMoveUp() // moves enemy north
{
enemySprite.setTexture(enemyNorth); // sets texture to north facing texture
if (enemySprite.getPosition().y > 0) // border checking
{
enemySprite.setPosition(enemySprite.getPosition().x, enemySprite.getPosition().y - speed); // updates y co-ord of the sentry
}
else // off-screen
{
enemySprite.setPosition(enemySprite.getPosition().x , enemySprite.getPosition().y + SCREEN_HEIGHT); // moves back to south of screen
leftScreen = true; // enemy has reached base off-screen so base should lose health
}
}
void EnemySentry::enemyMoveDown() // moves enemy south
{
enemySprite.setTexture(enemySouth); // sets texture to south facing sentry
if (enemySprite.getPosition().y < SCREEN_HEIGHT) // border checking
{
enemySprite.setPosition(enemySprite.getPosition().x, enemySprite.getPosition().y + speed); // updates y co-ord of the sentry
}
else // off-screen
{
enemySprite.setPosition(enemySprite.getPosition().x, enemySprite.getPosition().y - SCREEN_HEIGHT); // moves enemy back to south of screen
leftScreen = true;
}
}
void EnemySentry::setSpeed(int t_speed) // set new speed of enemy sentry
{
speed = t_speed;
}
void EnemySentry::loadImageEnemy()
{
if (!enemyWest.loadFromFile("ASSETS/IMAGES/enemy1_left.png")) // Loads tecture for player moving left
{
std::cout << "error with enemy1_left file";
}
if (!enemyEast.loadFromFile("ASSETS/IMAGES/enemy1_right.png")) // Loads tecture for player moving left
{
std::cout << "error with enemy1_right file";
}
if (!enemyNorth.loadFromFile("ASSETS/IMAGES/enemy1_up.png")) // Loads tecture for player moving left
{
std::cout << "error with enemy1_up file";
}
if (!enemySouth.loadFromFile("ASSETS/IMAGES/enemy1_down.png")) // Loads tecture for player moving left
{
std::cout << "error with enemy1_down file";
}
enemySprite.setTexture(enemyWest); // default texture setting
} | [
"c00238900@ITCARLOW.IE"
] | c00238900@ITCARLOW.IE |
1d6c34063a760ebef6e180b9a4309dc8113c810b | 1b30fe279bdb494e6099b8c2a9fa2e5f553514e6 | /VideoXpertSdk-ExampleRunner/Source/Drawings/DeleteDrawing.h | 1e1a0e7dbc471bfe9c78ef0cbeaaf0f55726d77d | [] | no_license | pelcointegrations/VideoXpertSdk-Examples | 1698009547b17b87ea7fcf965ea11c03946e4645 | ad6cde92feb91368290530ca04c8721eb6849de8 | refs/heads/master | 2022-01-19T07:18:41.753929 | 2022-01-12T20:00:47 | 2022-01-12T20:00:47 | 165,760,147 | 3 | 1 | null | 2021-04-21T19:45:15 | 2019-01-15T01:01:40 | C# | UTF-8 | C++ | false | false | 1,848 | h | #pragma once
#include "Plugin.h"
#include "VxSdk.h"
namespace ExampleRunner {
namespace Drawings {
/// <summary>
/// This plugin sample delete a selected drawing from the current system.
/// </summary>
class DeleteDrawing : public ExampleRunner::Common::Plugin {
public:
DeleteDrawing(const std::string description) : ExampleRunner::Common::Plugin(description) { }
~DeleteDrawing() { }
/// <summary>
/// Delete a selected drawing from the current system.
/// </summary>
/// <param name="dataModel">Instance of data model.</param>
ExampleRunner::Common::Plugin* Run(ExampleRunner::Common::DataModel* dataModel) override;
protected:
/// <summary>
/// Get a collection of drawings from the given VideoExpert system.
/// </summary>
/// <param name="vxSystem">Pointer to the VideoExpert system.</param>
/// <returns>A collection of drawings.</returns>
static VxSdk::VxCollection<VxSdk::IVxDrawing**> GetDrawings(VxSdk::IVxSystem* vxSystem);
/// <summary>
/// Prints the given collection of drawings to the screen.
/// </summary>
/// <param name="drawingCollection">Collection of drawings.</param>
static void PrintDrawings(VxSdk::VxCollection<VxSdk::IVxDrawing**> drawingCollection);
/// <summary>
/// Select a drawing from the given collection by user input.
/// </summary>
/// <param name="drawings">Collection of drawing.</param>
/// <returns>Index of the selected drawing in the given collection.</returns>
int SelectDrawingIndex(VxSdk::VxCollection<VxSdk::IVxDrawing**> &drawings);
};
}
}
| [
"Zach.Moore@schneider-electric.com"
] | Zach.Moore@schneider-electric.com |
925b8955ff07d92e9c28a22305134537dc6d4301 | cc40d6b758088e9ba56641e91c35e1ea85b64e07 | /third_party/spirv-tools/test/opt/dominator_tree/unreachable_for.cpp | d346d16de1d96b7e9641c1f9f8f7b0d1e9e478ce | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | chinmaygarde/filament | 1091b664f1ba4cc9b63c31c73f63ec8b449acd22 | 030ba324e0db96dfd31c0c1e016ae44001d92b00 | refs/heads/master | 2020-03-26T00:25:48.310901 | 2018-08-13T22:26:23 | 2018-08-13T22:26:23 | 144,320,013 | 1 | 0 | Apache-2.0 | 2018-08-10T18:29:11 | 2018-08-10T18:29:11 | null | UTF-8 | C++ | false | false | 3,737 | cpp | // Copyright (c) 2017 Google 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 <string>
#include <vector>
#include <gmock/gmock.h>
#include "../assembly_builder.h"
#include "../function_utils.h"
#include "../pass_fixture.h"
#include "../pass_utils.h"
#include "opt/dominator_analysis.h"
#include "opt/pass.h"
namespace spvtools {
namespace opt {
namespace {
using ::testing::UnorderedElementsAre;
using PassClassTest = PassTest<::testing::Test>;
/*
Generated from the following GLSL
#version 440 core
void main() {
for (int i = 0; i < 1; i++) {
break;
}
}
*/
TEST_F(PassClassTest, UnreachableNestedIfs) {
const std::string text = R"(
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main"
OpExecutionMode %4 OriginUpperLeft
OpSource GLSL 440
OpName %4 "main"
OpName %8 "i"
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeInt 32 1
%7 = OpTypePointer Function %6
%9 = OpConstant %6 0
%16 = OpConstant %6 1
%17 = OpTypeBool
%4 = OpFunction %2 None %3
%5 = OpLabel
%8 = OpVariable %7 Function
OpStore %8 %9
OpBranch %10
%10 = OpLabel
OpLoopMerge %12 %13 None
OpBranch %14
%14 = OpLabel
%15 = OpLoad %6 %8
%18 = OpSLessThan %17 %15 %16
OpBranchConditional %18 %11 %12
%11 = OpLabel
OpBranch %12
%13 = OpLabel
%20 = OpLoad %6 %8
%21 = OpIAdd %6 %20 %16
OpStore %8 %21
OpBranch %10
%12 = OpLabel
OpReturn
OpFunctionEnd
)";
// clang-format on
std::unique_ptr<IRContext> context =
BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, text,
SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS);
Module* module = context->module();
EXPECT_NE(nullptr, module) << "Assembling failed for shader:\n"
<< text << std::endl;
const Function* f = spvtest::GetFunction(module, 4);
DominatorAnalysis* analysis = context->GetDominatorAnalysis(f);
EXPECT_TRUE(analysis->Dominates(5, 5));
EXPECT_TRUE(analysis->Dominates(5, 10));
EXPECT_TRUE(analysis->Dominates(5, 14));
EXPECT_TRUE(analysis->Dominates(5, 11));
EXPECT_TRUE(analysis->Dominates(5, 12));
EXPECT_TRUE(analysis->Dominates(10, 10));
EXPECT_TRUE(analysis->Dominates(10, 14));
EXPECT_TRUE(analysis->Dominates(10, 11));
EXPECT_TRUE(analysis->Dominates(10, 12));
EXPECT_TRUE(analysis->Dominates(14, 14));
EXPECT_TRUE(analysis->Dominates(14, 11));
EXPECT_TRUE(analysis->Dominates(14, 12));
EXPECT_TRUE(analysis->Dominates(11, 11));
EXPECT_TRUE(analysis->Dominates(12, 12));
EXPECT_TRUE(analysis->StrictlyDominates(5, 10));
EXPECT_TRUE(analysis->StrictlyDominates(5, 14));
EXPECT_TRUE(analysis->StrictlyDominates(5, 11));
EXPECT_TRUE(analysis->StrictlyDominates(5, 12));
EXPECT_TRUE(analysis->StrictlyDominates(10, 14));
EXPECT_TRUE(analysis->StrictlyDominates(10, 11));
EXPECT_TRUE(analysis->StrictlyDominates(10, 12));
EXPECT_TRUE(analysis->StrictlyDominates(14, 11));
EXPECT_TRUE(analysis->StrictlyDominates(14, 12));
}
} // namespace
} // namespace opt
} // namespace spvtools
| [
"romainguy@google.com"
] | romainguy@google.com |
95a4f4c59cedc4828ab28f595229cf4bdb8d7c91 | cc3198013ee01bcf0363393dc65ba70ef66f8e48 | /trunk/mamep/src/emu/bus/plus4/sid.h | 8a23dcb2b84cd3b74131ba0015e87ece453ffef7 | [] | no_license | svn2github/mameplus | 9188a20f6cec8223478288429a631c8d8f75dead | 2e7d741ede3bf495c04a399a77e9d36d088315d5 | refs/heads/master | 2020-12-24T15:14:08.317156 | 2015-01-10T14:10:50 | 2015-01-10T14:10:50 | 11,351,283 | 9 | 14 | null | null | null | null | UTF-8 | C++ | false | false | 1,887 | h | // license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Commodore Plus/4 SID cartridge emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
**********************************************************************/
#pragma once
#ifndef __PLUS4_SID_CARTRIDGE__
#define __PLUS4_SID_CARTRIDGE__
#include "emu.h"
#include "exp.h"
#include "bus/vcs_ctrl/ctrl.h"
#include "sound/dac.h"
#include "sound/mos6581.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> plus4_sid_cartridge_device
class plus4_sid_cartridge_device : public device_t,
public device_plus4_expansion_card_interface
{
public:
// construction/destruction
plus4_sid_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual const rom_entry *device_rom_region() const;
virtual machine_config_constructor device_mconfig_additions() const;
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
// device_plus4_expansion_card_interface overrides
virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
virtual void plus4_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
virtual void plus4_breset_w(int state);
private:
required_device<mos6581_device> m_sid;
required_device<vcs_control_port_device> m_joy;
};
// device type definition
extern const device_type PLUS4_SID;
#endif
| [
"yuifan@e0215e0a-1e64-f442-9f1d-d2f61a7f4648"
] | yuifan@e0215e0a-1e64-f442-9f1d-d2f61a7f4648 |
1ce22903bb8f680ee40e825ee2b4baa930e158fd | ae80aedec98b74798d122de607f5bb04ffd7a426 | /NumConvPerf/Benchmarks/Num2StrString.cpp | 8b45ae0c00d944cf7e9aed7c5097d7570359ca6d | [
"MIT"
] | permissive | cristian-szabo/benchmark-numeric-conversion | 8554b612bb813ec98f0a8cf419bf715308fbc0e1 | 837c9a483b18523e2660a4102ba714c0ff1bf16e | refs/heads/master | 2022-09-11T01:15:03.468863 | 2020-05-25T18:59:28 | 2020-05-25T18:59:28 | 262,662,955 | 0 | 0 | MIT | 2020-06-01T21:19:39 | 2020-05-09T21:34:52 | C++ | UTF-8 | C++ | false | false | 1,750 | cpp | #include "Test.hpp"
#include "Fixtures/Num2StrStringFixture.hpp"
#include "Datasets/NumberDatasets.hpp"
#include "Datasets/IterationDatasets.hpp"
#include "Datasets/CartesianProductDataset.hpp"
TEST_SUITE_BEGIN(Performance)
TEST_SUITE_BEGIN(Num2Str)
TEST_SUITE_BEGIN(String)
REGISTER_FIXTURE_DATA_TEST_CASE(U8, Num2StrStringFixture<uint8_t>, TestCase::Mode::All, Combine(DatasetNumberU8, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(S8, Num2StrStringFixture<int8_t>, TestCase::Mode::All, Combine(DatasetNumberS8, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(U16, Num2StrStringFixture<uint16_t>, TestCase::Mode::All, Combine(DatasetNumberU16, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(S16, Num2StrStringFixture<int16_t>, TestCase::Mode::All, Combine(DatasetNumberS16, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(U32, Num2StrStringFixture<uint32_t>, TestCase::Mode::All, Combine(DatasetNumberU32, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(S32, Num2StrStringFixture<int32_t>, TestCase::Mode::All, Combine(DatasetNumberS32, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(U64, Num2StrStringFixture<uint64_t>, TestCase::Mode::All, Combine(DatasetNumberU64, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(S64, Num2StrStringFixture<int64_t>, TestCase::Mode::All, Combine(DatasetNumberS64, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(F32, Num2StrStringFixture<float>, TestCase::Mode::All, Combine(DatasetNumberF32, DatasetSmallIterations))
REGISTER_FIXTURE_DATA_TEST_CASE(F64, Num2StrStringFixture<double>, TestCase::Mode::All, Combine(DatasetNumberF64, DatasetSmallIterations))
TEST_SUITE_END()
TEST_SUITE_END()
TEST_SUITE_END()
| [
"cristian.szabo@thingsonedge.co.uk"
] | cristian.szabo@thingsonedge.co.uk |
85a319ba2b6050edd9b5b00064069297d3065dda | ce6f5f7cb0e13c8e81d246f77963c0be9c04b878 | /C++/uva10306.cpp | 9ecec97bdadf429a517ce909346475702e011dd7 | [] | no_license | HankLyu/NCPC_pratice | 63d629665c2afa98e724a1a7cff8effcfd4fd2ad | 3ecfa0067a281fdaf7f81cb4ba88904b1f0a5fad | refs/heads/master | 2021-01-20T02:47:42.979283 | 2014-12-03T03:07:44 | 2014-12-03T03:07:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 761 | cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#define INF 2e9
#define maxx 305
using namespace std;
struct node{
int x,y;
}p[45];
int main()
{
int test;
scanf("%d",&test);
while(test--){
int m,n;
int dp[maxx][maxx];
scanf("%d %d",&m,&n);
for(int i=0;i<m;i++){
scanf("%d %d",&p[i].x,&p[i].y);
}
for(int i=0;i<=n;i++)
for(int j=0;j<=n;j++)
dp[i][j]=INF;
dp[0][0]=0;
for(int i=0;i<m;i++)
for(int j=p[i].x;j<=n;j++)
for(int k=p[i].y;k<=n;k++){
dp[j][k]=min(dp[j][k],
dp[j-p[i].x][k-p[i].y]+1);
}
int ans=INF,t=n*n;
for(int i=0;i<=n;i++)
for(int j=0;j<=n;j++)
if(i*i + j*j==t)
ans=min(dp[i][j],ans);
if(ans != INF) printf("%d\n",ans);
else printf("not possible\n");
}
return 0;
}
| [
"hanklgs9564@gmail.com"
] | hanklgs9564@gmail.com |
5a0b7af50ec9b5544a4fdea0f7341f350a8b9abf | 25fd637bec941415c67aabd5b9db96535237affd | /fiz_w3/common/input.cpp | 97f51c961c3effd6663117f2243deb948da5ce75 | [] | no_license | mtokarski/Fizyka | 40b01e5331b933d5fa8cba6f6f6acbfd42e137d5 | 3bf5842995828b237eb3258375d8412437a6e1ea | refs/heads/master | 2016-09-15T18:08:42.187262 | 2013-09-18T08:37:24 | 2013-09-18T08:37:24 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,645 | cpp | /** @file input.cpp
* @brief common input functions
*
* @author Bartlomiej Filipek
* @date April 2011
*/
#include "stdafx.h"
#include "input.h"
Camera::Camera()
{
m_isLeftPressed = false;
m_isMiddlePressed = false;
m_angleX = 0.0f;
m_angleY = 0.0f;
m_zoom = 0.0f;
m_deltaAngX = 0.0f;
m_deltaAngY = 0.0f;
m_deltaZoom = 0.0f;
m_lastX = m_lastY = 0;
}
void Camera::ChangeViewportSize(int w, int h)
{
// Prevent a divide by zero, when window is too short
// (you cant make a window of zero width).
if(h == 0)
h = 1;
m_screenWidth = w;
m_screenHeight = h;
m_screenRatio = 1.0f * w / h;
// Reset the coordinate system before modifying
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// Set the viewport to be the entire window
glViewport(0, 0, w, h);
// Set the clipping volume
gluPerspective(45, m_screenRatio, 0.1, 1000);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void Camera::PressSpecialKey(int key, int x, int y)
{
switch (key) {
case GLUT_KEY_LEFT : m_deltaAngX = -1.1f;break;
case GLUT_KEY_RIGHT : m_deltaAngX = 1.1f;break;
case GLUT_KEY_UP : m_deltaAngY = 1.1f;break;
case GLUT_KEY_DOWN : m_deltaAngY = -1.1f; break;
}
}
void Camera::ReleaseSpecialKey(int key, int x, int y)
{
switch (key) {
case GLUT_KEY_LEFT : m_deltaAngX = 0.0f; break;
case GLUT_KEY_RIGHT : m_deltaAngX = 0.0f; break;
case GLUT_KEY_UP : m_deltaAngY = 0.0f; break;
case GLUT_KEY_DOWN : m_deltaAngY = 0.0f; break;
}
}
void Camera::ProcessMouse(int button, int state, int x, int y)
{
if (button == GLUT_LEFT_BUTTON)
{
if (state == GLUT_DOWN)
{
m_isLeftPressed = true;
m_lastX = x;
m_lastY = y;
//printf("left mouse button pressed...\n");
}
else if (state == GLUT_UP)
{
m_isLeftPressed = false;
//printf("left mouse button up...\n");
}
}
else if (button == GLUT_MIDDLE_BUTTON)
{
if (state == GLUT_DOWN)
{
m_isMiddlePressed = true;
m_lastX = x;
m_lastY = y;
//printf("left mouse button pressed...\n");
}
else if (state == GLUT_UP)
{
m_isMiddlePressed = false;
//printf("left mouse button up...\n");
}
}
}
void Camera::ProcessMouseMotion(int x, int y)
{
int dx = m_lastX - x;
int dy = m_lastY - y;
m_lastX = x;
m_lastY = y;
if (m_isLeftPressed)
{
m_angleX -= dx*0.5f;
m_angleY -= dy*0.5f;
}
if (m_isMiddlePressed)
{
m_zoom += dy*0.1f;
}
}
void Camera::Update(double deltaTime)
{
m_zoom += m_deltaZoom;
m_angleX += m_deltaAngX;
m_angleY += m_deltaAngY;
}
void Camera::SetSimpleView()
{
glTranslatef(0.0f, 0.0f, -m_zoom);
glRotatef(m_angleX, 0.0f, 1.0f, 0.0f);
glRotatef(m_angleY, 1.0f, 0.0f, 0.0f);
} | [
"mp.tokarski@uj.edu.pl"
] | mp.tokarski@uj.edu.pl |
42be56cd23ba83f5e1fd695c85182aefc0bddbc8 | efe1e4dd102cc49a442f644a90fe1bd682a99747 | /project/BST.cpp | 6c455cafe89f5c114786c2e3e59cd25018bd1866 | [] | no_license | yanghaku/datastructure | d9acde31a6e8ec9981cdb8f2f6795a9632e67a62 | 729d33f779bedb44a639cd87412f77f250083c64 | refs/heads/master | 2020-04-09T18:55:03.452157 | 2018-12-13T15:20:17 | 2018-12-13T15:20:17 | 160,528,148 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,588 | cpp | #include"BinTree.cpp"
/**====================binary search tree ======================*/
template<typename K,typename V>struct Entry{// 词条模板类
K key; V value;//关键码,键值
Entry(K k=K(),V v=V()):key(k),value(v){};//构造函数
Entry(Entry<K,V>const& e):key(e.key),value(e.value){};//复制构造函数
//比较器
bool operator< (Entry<K,V>const& e){return key <e.key; }
bool operator> (Entry<K,V>const& e){return key >e.key; }
bool operator>=(Entry<K,V>const& e){return key>=e.key; }
bool operator<=(Entry<K,V>const& e){return key<=e.key; }
bool operator==(Entry<K,V>const& e){return key==e.key; }
bool operator!=(Entry<K,V>const& e){return key!=e.key; }
};
template<typename T>class BST : public BinTree<T> {
protected:
BinNodePosi(T) _hot; //命中节点的父亲
BinNodePosi(T) connect34(// 3+4结构, 联接3个节点及四课子树
BinNodePosi(T),BinNodePosi(T),BinNodePosi(T),
BinNodePosi(T),BinNodePosi(T),BinNodePosi(T),BinNodePosi(T) );
BinNodePosi(T) rotateAt(BinNodePosi(T) x); // 对x及其父亲,祖父作统一的旋转
public:
virtual BinNodePosi(T) & search(const T& e); // 查找
virtual BinNodePosi(T) insert (const T& e); // 插入
virtual bool remove ( const T& e); // 删除
};
template<typename T>
static BinNodePosi(T) & searchIn(BinNodePosi(T)& v,const T& e,BinNodePosi(T)& hot){
if(!v || (e==v->data) )return v;// 递归基
hot=v;
return searchIn( ((e<v->data)? v->lc: v->rc), e, hot);
}
template<typename T>BinNodePosi(T) & BST<T>::search(const T& e){
return searchIn( _root, e, _hot=nullptr);
}
| [
"git@github.com"
] | git@github.com |
3d573774f422f616b2585ecf55128d3c5e8895ae | 61f661ee029c4aaf113350483ac9cd4d53f674dc | /NEUPlateR_server-master/Action/CarAction/update_car_action.cpp | 408a88a70dcb104d1710cea5bd51d0932239df11 | [] | no_license | jingma-git/NEUPlate | 17488cf06c4679b0502bf280c0817e25ec557c2d | 79bf7c001e3d395a82e131414d22954f70ff8029 | refs/heads/master | 2023-08-14T06:40:59.921182 | 2021-09-25T06:57:08 | 2021-09-25T06:57:08 | 409,620,951 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 446 | cpp | #include "update_car_action.h"
IMPLEMENT_ACTION(update_car, CUpdateCarAction)
void CUpdateCarAction::run()
{
try{
QJsonObject car_json=req->get_json("car");
CCar car(car_json);
int status_code=Car::update_car(car);
resp->put("car_id",car.car_id());
resp->set_status_code(status_code);
}catch(NullException e){
resp->set_status_code(StatusCode::ERROR_PARAMS);
return ;
}
}
| [
"11921154@zju.edu.cn"
] | 11921154@zju.edu.cn |
e8b1682462f76249377a22df2000dfbf91068b82 | ca75f207f584091440d2bae0f208d2066b81cc8e | /src/PrePost/Import/ImportFromCSV.h | b843d93108a6c29330d47d4389e4df75e91a4dbe | [
"MIT"
] | permissive | toporunner/PANSFEM2 | 73bdd35224f57d66de9d4bd827c79c51c614b664 | 5ca886a89ebac1df6449513149843d0721bce1b4 | refs/heads/master | 2023-05-28T14:52:24.570514 | 2021-01-20T11:47:10 | 2021-01-20T11:47:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,711 | h | //*****************************************************************************
//Title :PANSFEM2/PrePost/Import/ImportFromCSV.h
//Author :Tanabe Yuta
//Date :2019/10/01
//Copyright :(C)2019 TanabeYuta
//*****************************************************************************
#pragma once
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include "../../LinearAlgebra/Models/Vector.h"
namespace PANSFEM2 {
//********************ImportNodesFromCSV********************
template<class T>
bool ImportNodesFromCSV(std::vector<Vector<T> >& _nodes, std::string _fname) {
std::ifstream ifs(_fname);
if (!ifs.is_open()) {
std::cout << "Node file " << _fname << " open error!" << std::endl;
return false;
}
//.....Pass a line.....
std::string str0;
std::getline(ifs, str0);
while (!ifs.eof()) {
//.....Read a line.....
std::string buf;
ifs >> buf;
std::istringstream sbuf(buf);
std::string str;
//.....Get id of a node.....
std::getline(sbuf, str, ',');
if (!str.empty()) {
//.....Read values of a node.....
std::vector<T> x;
while(std::getline(sbuf, str, ',')) {
x.push_back(stod(str));
}
//.....Add a node.....
_nodes.push_back(Vector<T>(x));
}
}
ifs.close();
return true;
}
//********************ImportElementFromCSV********************
bool ImportElementsFromCSV(std::vector<std::vector<int> >& _elements, std::string _fname) {
std::ifstream ifs(_fname);
if (!ifs.is_open()) {
std::cout << "Element file " << _fname << " open error!" << std::endl;
return false;
}
//.....Pass a line.....
std::string str0;
std::getline(ifs, str0);
while (!ifs.eof()) {
//.....Read a line.....
std::string buf;
ifs >> buf;
std::istringstream sbuf(buf);
std::string str;
//.....Get id of an element.....
std::getline(sbuf, str, ',');
if (!str.empty()) {
//.....Get ids of nodes in an element.....
std::vector<int> element;
while (std::getline(sbuf, str, ',')) {
element.push_back(stoi(str));
}
//.....Add an element.....
_elements.push_back(element);
}
}
ifs.close();
return true;
}
//********************ImportDirichletConditionFromCSV********************
template<class T>
bool ImportDirichletFromCSV(std::vector<std::pair<std::pair<int, int>, T> >& _ufixed, std::string _fname) {
std::ifstream ifs(_fname);
if (!ifs.is_open()) {
std::cout << "Dirichlet Condition file " << _fname << " open error!" << std::endl;
return false;
}
//.....Pass a line.....
std::string str0;
std::getline(ifs, str0);
while (!ifs.eof()) {
//.....Read a line.....
std::string buf;
ifs >> buf;
std::istringstream sbuf(buf);
std::string str;
//.....Get id of a node.....
std::getline(sbuf, str, ',');
if (!str.empty()) {
int idn = stoi(str);
for(int i = 0; std::getline(sbuf, str, ','); i++) {
if(str != "free") {
_ufixed.push_back(std::make_pair(std::make_pair(idn, i), stod(str)));
}
}
}
}
ifs.close();
return true;
}
//********************ImportNeumannConditionFromCSV********************
template<class T>
bool ImportNeumannFromCSV(std::vector<std::pair<std::pair<int, int>, T> >& _qfixed, std::string _fname) {
std::ifstream ifs(_fname);
if (!ifs.is_open()) {
std::cout << "Dirichlet Condition file " << _fname << " open error!" << std::endl;
return false;
}
//.....Pass a line.....
std::string str0;
std::getline(ifs, str0);
while (!ifs.eof()) {
//.....Read a line.....
std::string buf;
ifs >> buf;
std::istringstream sbuf(buf);
std::string str;
//.....Get id of a node.....
std::getline(sbuf, str, ',');
if (!str.empty()) {
int idn = stoi(str);
for(int i = 0; std::getline(sbuf, str, ','); i++) {
if(str != "free") {
_qfixed.push_back(std::make_pair(std::make_pair(idn, i), stod(str)));
}
}
}
}
ifs.close();
return true;
}
//********************ImportInitialConditionFromCSV********************
template<class T>
bool ImportInitialFromCSV(std::vector<Vector<T> >& _u, std::string _fname) {
std::ifstream ifs(_fname);
if (!ifs.is_open()) {
std::cout << "Initial Condition file " << _fname << " open error!" << std::endl;
return false;
}
//.....Pass a line.....
std::string str0;
std::getline(ifs, str0);
while (!ifs.eof()) {
//.....Read a line.....
std::string buf;
ifs >> buf;
std::istringstream sbuf(buf);
std::string str;
//.....Get id of a node.....
std::getline(sbuf, str, ',');
if (!str.empty()) {
int idn = stoi(str);
for (int i = 0; i < _u[idn].SIZE(); i++) {
std::getline(sbuf, str, ',');
if (str != "free") {
_u[idn](i) = stod(str);
}
}
}
}
ifs.close();
return true;
}
//********************ImportPeriodicBoundaryConditionFromCSV*******************
bool ImportPeriodicFromCSV(std::vector<std::pair<int, int> >& _ufixed, std::string _fname) {
std::ifstream ifs(_fname);
if (!ifs.is_open()) {
std::cout << "Periodic Boundary Condition file " << _fname << " open error!" << std::endl;
return false;
}
//.....Pass a line.....
std::string str0;
std::getline(ifs, str0);
while (!ifs.eof()) {
//.....Read a line.....
std::string buf;
ifs >> buf;
std::istringstream sbuf(buf);
std::string str;
//.....Get id of a node.....
std::getline(sbuf, str, ',');
if (!str.empty()) {
int masterid = stoi(str);
std::getline(sbuf, str, ',');
int slaveid = stoi(str);
_ufixed.push_back(std::make_pair(masterid, slaveid));
}
}
ifs.close();
return true;
}
} | [
"yutatanabe510@gmail.com"
] | yutatanabe510@gmail.com |
d6a24aa583df60245b64b2f375e942560cfd0f9d | d05d19f0f30a2b52824164b9ebba74754d92c231 | /libraries/chain/db_market.cpp | 41d9bd399aba7cf1ddd0de4e1737a3f096416793 | [
"MIT"
] | permissive | moonstonedac/moonstone | 6c35975d166b99098b1d6ab2f1ed27e7f2b9b650 | 089b6ea165b652d62b795a47059907cf991d67a9 | refs/heads/master | 2020-06-10T18:36:35.821485 | 2017-01-27T16:56:55 | 2017-01-27T16:56:55 | 75,908,930 | 2 | 2 | null | 2017-01-27T16:56:56 | 2016-12-08T06:15:04 | C++ | UTF-8 | C++ | false | false | 23,357 | cpp | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <moonstone/chain/database.hpp>
#include <moonstone/chain/account_object.hpp>
#include <moonstone/chain/asset_object.hpp>
#include <moonstone/chain/hardfork.hpp>
#include <moonstone/chain/market_object.hpp>
#include <fc/uint128.hpp>
namespace moonstone { namespace chain {
void database::update_settlement_price(const asset_object& mia)
{ try {
const asset_smartasset_data_object& smartasset = mia.smartasset_data(*this);
const auto& limit_order_idx = get_index_type<limit_order_index>();
const auto& limit_price_idx = limit_order_idx.indices().get<by_price>();
auto limit_itr = limit_price_idx.lower_bound(price::max(smartasset.options.short_backing_asset, mia.get_id()));
price maxbid = (*limit_itr).sell_price;
auto basepriceid = maxbid.base;
maxbid.base = maxbid.quote;
maxbid.quote = basepriceid;
modify( smartasset, [&]( asset_smartasset_data_object& obj ){
obj.current_feed.settlement_price = maxbid;
});
} FC_CAPTURE_AND_RETHROW( (mia)) }
/**
* All margin positions are force closed at the swan price
* Collateral received goes into a force-settlement fund
* No new margin positions can be created for this asset
* No more price feed updates
* Force settlement happens without delay at the swan price, deducting from force-settlement fund
* No more asset updates may be issued.
*/
void database::globally_settle_asset( const asset_object& mia, const price& settlement_price )
{ try {
/*
elog( "BLACK SWAN!" );
debug_dump();
edump( (mia.symbol)(settlement_price) );
*/
const asset_smartasset_data_object& smartasset = mia.smartasset_data(*this);
FC_ASSERT( !smartasset.has_settlement(), "black swan already occurred, it should not happen again" );
const asset_object& backing_asset = smartasset.options.short_backing_asset(*this);
asset collateral_gathered = backing_asset.amount(0);
const asset_dynamic_data_object& mia_dyn = mia.dynamic_asset_data_id(*this);
auto original_mia_supply = mia_dyn.current_supply;
const call_order_index& call_index = get_index_type<call_order_index>();
const auto& call_price_index = call_index.indices().get<by_price>();
// cancel all call orders and accumulate it into collateral_gathered
auto call_itr = call_price_index.lower_bound( price::min( smartasset.options.short_backing_asset, mia.id ) );
auto call_end = call_price_index.upper_bound( price::max( smartasset.options.short_backing_asset, mia.id ) );
while( call_itr != call_end )
{
auto pays = call_itr->get_debt() * settlement_price;
if( pays > call_itr->get_collateral() )
pays = call_itr->get_collateral();
collateral_gathered += pays;
const auto& order = *call_itr;
++call_itr;
FC_ASSERT( fill_order( order, pays, order.get_debt() ) );
}
modify( smartasset, [&]( asset_smartasset_data_object& obj ){
assert( collateral_gathered.asset_id == settlement_price.quote.asset_id );
obj.settlement_price = mia.amount(original_mia_supply) / collateral_gathered; //settlement_price;
obj.settlement_fund = collateral_gathered.amount;
});
/// After all margin positions are closed, the current supply will be reported as 0, but
/// that is a lie, the supply didn't change. We need to capture the current supply before
/// filling all call orders and then restore it afterward. Then in the force settlement
/// evaluator reduce the supply
modify( mia_dyn, [&]( asset_dynamic_data_object& obj ){
obj.current_supply = original_mia_supply;
});
} FC_CAPTURE_AND_RETHROW( (mia)(settlement_price) ) }
void database::cancel_order(const force_settlement_object& order, bool create_virtual_op)
{
adjust_balance(order.owner, order.balance);
if( create_virtual_op )
{
asset_settle_cancel_operation vop;
vop.settlement = order.id;
vop.account = order.owner;
vop.amount = order.balance;
push_applied_operation( vop );
}
remove(order);
}
void database::cancel_order( const limit_order_object& order, bool create_virtual_op )
{
auto refunded = order.amount_for_sale();
modify( order.seller(*this).statistics(*this),[&]( account_statistics_object& obj ){
if( refunded.asset_id == asset_id_type() )
{
obj.total_core_in_orders -= refunded.amount;
}
});
adjust_balance(order.seller, refunded);
adjust_balance(order.seller, order.deferred_fee);
if( create_virtual_op )
{
limit_order_cancel_operation vop;
vop.order = order.id;
vop.fee_paying_account = order.seller;
push_applied_operation( vop );
}
remove(order);
}
bool maybe_cull_small_order( database& db, const limit_order_object& order )
{
/**
* There are times when the AMOUNT_FOR_SALE * SALE_PRICE == 0 which means that we
* have hit the limit where the seller is asking for nothing in return. When this
* happens we must refund any balance back to the seller, it is too small to be
* sold at the sale price.
*
* If the order is a taker order (as opposed to a maker order), so the price is
* set by the counterparty, this check is deferred until the order becomes unmatched
* (see #555) -- however, detecting this condition is the responsibility of the caller.
*/
if( order.amount_to_receive().amount == 0 )
{
//ilog( "applied epsilon logic" );
db.cancel_order(order);
return true;
}
return false;
}
bool database::apply_order(const limit_order_object& new_order_object, bool allow_black_swan)
{
auto order_id = new_order_object.id;
const asset_object& sell_asset = get(new_order_object.amount_for_sale().asset_id);
const asset_object& receive_asset = get(new_order_object.amount_to_receive().asset_id);
// Possible optimization: We only need to check calls if both are true:
// - The new order is at the front of the book
// - The new order is below the call limit price
bool called_some = check_call_orders(sell_asset, allow_black_swan);
called_some |= check_call_orders(receive_asset, allow_black_swan);
if( called_some && !find_object(order_id) ) // then we were filled by call order
return true;
const auto& limit_price_idx = get_index_type<limit_order_index>().indices().get<by_price>();
// TODO: it should be possible to simply check the NEXT/PREV iterator after new_order_object to
// determine whether or not this order has "changed the book" in a way that requires us to
// check orders. For now I just lookup the lower bound and check for equality... this is log(n) vs
// constant time check. Potential optimization.
auto max_price = ~new_order_object.sell_price;
auto limit_itr = limit_price_idx.lower_bound(max_price.max());
auto limit_end = limit_price_idx.upper_bound(max_price);
bool finished = false;
while( !finished && limit_itr != limit_end )
{
auto old_limit_itr = limit_itr;
++limit_itr;
// match returns 2 when only the old order was fully filled. In this case, we keep matching; otherwise, we stop.
finished = (match(new_order_object, *old_limit_itr, old_limit_itr->sell_price) != 2);
}
//Possible optimization: only check calls if the new order completely filled some old order
//Do I need to check both assets?
check_call_orders(sell_asset, allow_black_swan);
check_call_orders(receive_asset, allow_black_swan);
const limit_order_object* updated_order_object = find< limit_order_object >( order_id );
if( updated_order_object == nullptr )
return true;
if( head_block_time() <= HARDFORK_555_TIME )
return false;
// before #555 we would have done maybe_cull_small_order() logic as a result of fill_order() being called by match() above
// however after #555 we need to get rid of small orders -- #555 hardfork defers logic that was done too eagerly before, and
// this is the point it's deferred to.
return maybe_cull_small_order( *this, *updated_order_object );
}
/**
* Matches the two orders,
*
* @return a bit field indicating which orders were filled (and thus removed)
*
* 0 - no orders were matched
* 1 - bid was filled
* 2 - ask was filled
* 3 - both were filled
*/
template<typename OrderType>
int database::match( const limit_order_object& usd, const OrderType& core, const price& match_price )
{
assert( usd.sell_price.quote.asset_id == core.sell_price.base.asset_id );
assert( usd.sell_price.base.asset_id == core.sell_price.quote.asset_id );
assert( usd.for_sale > 0 && core.for_sale > 0 );
auto usd_for_sale = usd.amount_for_sale();
auto core_for_sale = core.amount_for_sale();
asset usd_pays, usd_receives, core_pays, core_receives;
if( usd_for_sale <= core_for_sale * match_price )
{
core_receives = usd_for_sale;
usd_receives = usd_for_sale * match_price;
}
else
{
//This line once read: assert( core_for_sale < usd_for_sale * match_price );
//This assert is not always true -- see trade_amount_equals_zero in operation_tests.cpp
//Although usd_for_sale is greater than core_for_sale * match_price, core_for_sale == usd_for_sale * match_price
//Removing the assert seems to be safe -- apparently no asset is created or destroyed.
usd_receives = core_for_sale;
core_receives = core_for_sale * match_price;
}
core_pays = usd_receives;
usd_pays = core_receives;
assert( usd_pays == usd.amount_for_sale() ||
core_pays == core.amount_for_sale() );
int result = 0;
result |= fill_order( usd, usd_pays, usd_receives, false );
result |= fill_order( core, core_pays, core_receives, true ) << 1;
assert( result != 0 );
return result;
}
int database::match( const limit_order_object& bid, const limit_order_object& ask, const price& match_price )
{
return match<limit_order_object>( bid, ask, match_price );
}
asset database::match( const call_order_object& call,
const force_settlement_object& settle,
const price& match_price,
asset max_settlement )
{ try {
FC_ASSERT(call.get_debt().asset_id == settle.balance.asset_id );
FC_ASSERT(call.debt > 0 && call.collateral > 0 && settle.balance.amount > 0);
auto settle_for_sale = std::min(settle.balance, max_settlement);
auto call_debt = call.get_debt();
asset call_receives = std::min(settle_for_sale, call_debt);
asset call_pays = call_receives * match_price;
asset settle_pays = call_receives;
asset settle_receives = call_pays;
/**
* If the least collateralized call position lacks sufficient
* collateral to cover at the match price then this indicates a black
* swan event according to the price feed, but only the market
* can trigger a black swan. So now we must cancel the forced settlement
* object.
*/
MOONSTONE_ASSERT( call_pays < call.get_collateral(), black_swan_exception, "" );
assert( settle_pays == settle_for_sale || call_receives == call.get_debt() );
fill_order(call, call_pays, call_receives);
fill_order(settle, settle_pays, settle_receives);
return call_receives;
} FC_CAPTURE_AND_RETHROW( (call)(settle)(match_price)(max_settlement) ) }
bool database::fill_order( const limit_order_object& order, const asset& pays, const asset& receives, bool cull_if_small )
{ try {
cull_if_small |= (head_block_time() < HARDFORK_555_TIME);
FC_ASSERT( order.amount_for_sale().asset_id == pays.asset_id );
FC_ASSERT( pays.asset_id != receives.asset_id );
const account_object& seller = order.seller(*this);
const asset_object& recv_asset = receives.asset_id(*this);
auto issuer_fees = pay_market_fees( recv_asset, receives );
pay_order( seller, receives - issuer_fees, pays );
assert( pays.asset_id != receives.asset_id );
push_applied_operation( fill_order_operation( order.id, order.seller, pays, receives, issuer_fees ) );
// conditional because cheap integer comparison may allow us to avoid two expensive modify() and object lookups
if( order.deferred_fee > 0 )
{
modify( seller.statistics(*this), [&]( account_statistics_object& statistics )
{
statistics.pay_fee( order.deferred_fee, get_global_properties().parameters.cashback_vesting_threshold );
} );
}
if( pays == order.amount_for_sale() )
{
remove( order );
return true;
}
else
{
modify( order, [&]( limit_order_object& b ) {
b.for_sale -= pays.amount;
b.deferred_fee = 0;
});
if( cull_if_small )
return maybe_cull_small_order( *this, order );
return false;
}
} FC_CAPTURE_AND_RETHROW( (order)(pays)(receives) ) }
bool database::fill_order( const call_order_object& order, const asset& pays, const asset& receives )
{ try {
//idump((pays)(receives)(order));
FC_ASSERT( order.get_debt().asset_id == receives.asset_id );
FC_ASSERT( order.get_collateral().asset_id == pays.asset_id );
FC_ASSERT( order.get_collateral() >= pays );
optional<asset> collateral_freed;
modify( order, [&]( call_order_object& o ){
o.debt -= receives.amount;
o.collateral -= pays.amount;
if( o.debt == 0 )
{
collateral_freed = o.get_collateral();
o.collateral = 0;
}
});
const asset_object& mia = receives.asset_id(*this);
assert( mia.is_market_issued() );
const asset_dynamic_data_object& mia_ddo = mia.dynamic_asset_data_id(*this);
modify( mia_ddo, [&]( asset_dynamic_data_object& ao ){
//idump((receives));
ao.current_supply -= receives.amount;
});
const account_object& borrower = order.borrower(*this);
if( collateral_freed || pays.asset_id == asset_id_type() )
{
const account_statistics_object& borrower_statistics = borrower.statistics(*this);
if( collateral_freed )
adjust_balance(borrower.get_id(), *collateral_freed);
modify( borrower_statistics, [&]( account_statistics_object& b ){
if( collateral_freed && collateral_freed->amount > 0 )
b.total_core_in_orders -= collateral_freed->amount;
if( pays.asset_id == asset_id_type() )
b.total_core_in_orders -= pays.amount;
assert( b.total_core_in_orders >= 0 );
});
}
assert( pays.asset_id != receives.asset_id );
push_applied_operation( fill_order_operation{ order.id, order.borrower, pays, receives, asset(0, pays.asset_id) } );
if( collateral_freed )
remove( order );
return collateral_freed.valid();
} FC_CAPTURE_AND_RETHROW( (order)(pays)(receives) ) }
bool database::fill_order(const force_settlement_object& settle, const asset& pays, const asset& receives)
{ try {
bool filled = false;
auto issuer_fees = pay_market_fees(get(receives.asset_id), receives);
if( pays < settle.balance )
{
modify(settle, [&pays](force_settlement_object& s) {
s.balance -= pays;
});
filled = false;
} else {
filled = true;
}
adjust_balance(settle.owner, receives - issuer_fees);
assert( pays.asset_id != receives.asset_id );
push_applied_operation( fill_order_operation{ settle.id, settle.owner, pays, receives, issuer_fees } );
if (filled)
remove(settle);
return filled;
} FC_CAPTURE_AND_RETHROW( (settle)(pays)(receives) ) }
/**
* Starting with the least collateralized orders, fill them if their
* call price is above the max(lowest bid,call_limit).
*
* This method will return true if it filled a short or limit
*
* @param mia - the market issued asset that should be called.
* @param enable_black_swan - when adjusting collateral, triggering a black swan is invalid and will throw
* if enable_black_swan is not set to true.
*
* @return true if a margin call was executed.
*/
bool database::check_call_orders(const asset_object& mia, bool enable_black_swan)
{ try {
if( !mia.is_market_issued() ) return false;
if( check_for_blackswan( mia, enable_black_swan ) )
return false;
const asset_smartasset_data_object& smartasset = mia.smartasset_data(*this);
if( smartasset.is_prediction_market ) return false;
if( smartasset.current_feed.settlement_price.is_null() ) return false;
const call_order_index& call_index = get_index_type<call_order_index>();
const auto& call_price_index = call_index.indices().get<by_price>();
const limit_order_index& limit_index = get_index_type<limit_order_index>();
const auto& limit_price_index = limit_index.indices().get<by_price>();
// looking for limit orders selling the most USD for the least CORE
auto max_price = price::max( mia.id, smartasset.options.short_backing_asset );
// stop when limit orders are selling too little USD for too much CORE
auto min_price = smartasset.current_feed.max_short_squeeze_price();
if (max_price.base.asset_id != min_price.base.asset_id)
return false;
assert( max_price.base.asset_id == min_price.base.asset_id );
// NOTE limit_price_index is sorted from greatest to least
auto limit_itr = limit_price_index.lower_bound( max_price );
auto limit_end = limit_price_index.upper_bound( min_price );
if( limit_itr == limit_end )
return false;
auto call_min = price::min( smartasset.options.short_backing_asset, mia.id );
auto call_max = price::max( smartasset.options.short_backing_asset, mia.id );
auto call_itr = call_price_index.lower_bound( call_min );
auto call_end = call_price_index.upper_bound( call_max );
bool filled_limit = false;
bool margin_called = false;
while( !check_for_blackswan( mia, enable_black_swan ) && call_itr != call_end )
{
bool filled_call = false;
price match_price;
asset usd_for_sale;
if( limit_itr != limit_end )
{
assert( limit_itr != limit_price_index.end() );
match_price = limit_itr->sell_price;
usd_for_sale = limit_itr->amount_for_sale();
}
else return margin_called;
match_price.validate();
// would be margin called, but there is no matching order #436
bool feed_protected = ( smartasset.current_feed.settlement_price > ~call_itr->call_price );
if( feed_protected && (head_block_time() > HARDFORK_436_TIME) )
return margin_called;
// would be margin called, but there is no matching order
if( match_price > ~call_itr->call_price )
return margin_called;
if( feed_protected )
{
ilog( "Feed protected margin call executing (HARDFORK_436_TIME not here yet)" );
idump( (*call_itr) );
idump( (*limit_itr) );
}
// idump((*call_itr));
// idump((*limit_itr));
// ilog( "match_price <= ~call_itr->call_price performing a margin call" );
margin_called = true;
auto usd_to_buy = call_itr->get_debt();
if( usd_to_buy * match_price > call_itr->get_collateral() )
{
elog( "black swan detected" );
edump((enable_black_swan));
FC_ASSERT( enable_black_swan );
globally_settle_asset(mia, smartasset.current_feed.settlement_price );
return true;
}
asset call_pays, call_receives, order_pays, order_receives;
if( usd_to_buy >= usd_for_sale )
{ // fill order
call_receives = usd_for_sale;
order_receives = usd_for_sale * match_price;
call_pays = order_receives;
order_pays = usd_for_sale;
filled_limit = true;
filled_call = (usd_to_buy == usd_for_sale);
} else { // fill call
call_receives = usd_to_buy;
order_receives = usd_to_buy * match_price;
call_pays = order_receives;
order_pays = usd_to_buy;
filled_call = true;
}
FC_ASSERT( filled_call || filled_limit );
auto old_call_itr = call_itr;
if( filled_call ) ++call_itr;
fill_order(*old_call_itr, call_pays, call_receives);
auto old_limit_itr = filled_limit ? limit_itr++ : limit_itr;
fill_order(*old_limit_itr, order_pays, order_receives, true);
} // whlie call_itr != call_end
return margin_called;
} FC_CAPTURE_AND_RETHROW() }
void database::pay_order( const account_object& receiver, const asset& receives, const asset& pays )
{
const auto& balances = receiver.statistics(*this);
modify( balances, [&]( account_statistics_object& b ){
if( pays.asset_id == asset_id_type() )
{
b.total_core_in_orders -= pays.amount;
}
});
adjust_balance(receiver.get_id(), receives);
}
asset database::calculate_market_fee( const asset_object& trade_asset, const asset& trade_amount )
{
assert( trade_asset.id == trade_amount.asset_id );
if( !trade_asset.charges_market_fees() )
return trade_asset.amount(0);
if( trade_asset.options.market_fee_percent == 0 )
return trade_asset.amount(0);
fc::uint128 a(trade_amount.amount.value);
a *= trade_asset.options.market_fee_percent;
a /= MOONSTONE_100_PERCENT;
asset percent_fee = trade_asset.amount(a.to_uint64());
if( percent_fee.amount > trade_asset.options.max_market_fee )
percent_fee.amount = trade_asset.options.max_market_fee;
return percent_fee;
}
asset database::pay_market_fees( const asset_object& recv_asset, const asset& receives )
{
auto issuer_fees = calculate_market_fee( recv_asset, receives );
assert(issuer_fees <= receives );
//Don't dirty undo state if not actually collecting any fees
if( issuer_fees.amount > 0 )
{
const auto& recv_dyn_data = recv_asset.dynamic_asset_data_id(*this);
modify( recv_dyn_data, [&]( asset_dynamic_data_object& obj ){
//idump((issuer_fees));
obj.accumulated_fees += issuer_fees.amount;
});
}
return issuer_fees;
}
} }
| [
"moonstonedac@gmail.com"
] | moonstonedac@gmail.com |
6d38b82a2d3722a15fe6cd6224b174d09972aea8 | c7bd5c7b4e7c54f9727879fb2e1c6646d3072333 | /ComparedClustering/C++Compare/kmeans/main.cpp | 983362183e9118a5079af62322ab4686c988c311 | [
"MIT"
] | permissive | mericy/ClusteringComparison | e93169dea90917136a71820f1eb4c808ed7a76f1 | 98b2d45e3e085e1c1565800cc6a9319b8a6082d9 | refs/heads/main | 2023-04-14T07:49:29.791221 | 2021-11-26T16:56:34 | 2021-11-26T16:56:34 | 431,849,087 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,380 | cpp | #include <chrono>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#include "KMeans.hpp"
int main(int argc, char **argv)
{
if (argc != 5)
{
cout << "Two parameters needed i.e; input_file output_file cluster_size max_iter" << endl;
return 0;
}
vector<Point> points;
string filename = argv[1];
string outfilename = argv[2];
ifstream waveFile(filename);
string line;
int dim = 8;
while (getline(waveFile, line))
{
vector<float> wave;
wave.push_back(stof(line));
for (int j = 0; j < dim - 1; j++)
{
getline(waveFile, line);
wave.push_back(stof(line));
}
Point point(wave);
points.push_back(point);
}
int cluster = stoi(argv[3]);
int epoch = stoi(argv[4]);
KMeans km = KMeans(points, cluster, epoch);
KMeansResults results = km.run(true);
std::cout << "Finished " << results.epoch << " epoch in " << (float)results.time / 1000 << " secs." << std::endl;
ofstream out(outfilename);
for (int i = 0; i < cluster; i++)
{
for (int j = 0; j < dim - 1; j++)
{
out << results.iter_centroids[i].values[j] << " ";
}
out << results.iter_centroids[i].values[dim - 1] << std::endl;
}
out.close();
return 0;
}
| [
"mericyucel@gmail.com"
] | mericyucel@gmail.com |
5c01478a3253ca9c246dbab2dba8c068539af4bc | 1ea6376da2a821ea7afeec84cf1a401044477d67 | /C++/GeneratePermutation.cpp | 5dc32cef64927fe312c7bdb37d3e2f050036fe5c | [] | no_license | lusifer65/algorithms | ac491f6f67a7922bf4d25080d67fda35d5099720 | 85075cbf05b7d99663107572f2e506bed5264e92 | refs/heads/master | 2022-12-10T10:07:02.557563 | 2021-10-25T19:49:14 | 2021-10-25T19:49:14 | 293,450,701 | 0 | 0 | null | 2020-09-07T07:14:16 | 2020-09-07T07:14:15 | null | UTF-8 | C++ | false | false | 918 | cpp | #include <bits/stdc++.h>
using namespace std;
void generate(int index, int n, vector<int>& v, vector<vector<int>>& res, vector<int> A) {
if(index == n ) {
res.push_back(v);
return;
}
for(int i = 0; i < n; i++) {
if(v[i] == -1) {
v[i] = A[index];
generate(index + 1, n, v, res, A);
v[i] = -1;
}
}
}
vector<vector<int>> permute(vector<int> &A) {
vector<vector<int>> res;
int n = A.size();
vector<int> v(n, -1);
generate(0, n, v, res, A);
return res;
}
void print(vector<vector<int>> res) {
for(int i = 0; i < int(res.size()); i++) {
for(int j = 0; j < int(res[i].size()); j++) {
cout << res[i][j] << " ";
}
cout << endl;
}
return;
}
int main() {
int n;
cin >> n;
vector<int> arr(n);
for(int i = 0; i < n; i++) cin >> arr[i];
vector<vector<int>> res = permute(arr);
print(res);
return 0;
}
| [
"noreply@github.com"
] | lusifer65.noreply@github.com |
fa95bca030dd8b0938e0faed3fae93ba2a12c256 | e5d703474d37bead76fb749f260d10011b0aeba4 | /_Archiv/ToDoList/Shared/popupListboxctrl.cpp | 511d0664efe2c828cda2e63a0a3d626dc5e44658 | [] | no_license | jithuin/infogeezer | d87e68366c155d0da35f3ec8b845c1fc517287cf | 4b83e7e04429dd305954039ce0dae3ee0c1f4924 | refs/heads/master | 2021-01-10T09:10:06.215280 | 2014-11-16T23:13:22 | 2014-11-16T23:13:22 | 51,506,142 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,742 | cpp | //_ **********************************************************
//_
//_ Name: InputListCtrlListbox.cpp
//_ Purpose:
//_ Created: 15 September 1998
//_ Author: D.R.Godson
//_ Modified By:
//_
//_ Copyright (c) 1998 Brilliant Digital Entertainment Inc.
//_
//_ **********************************************************
// InputListCtrlEdit.cpp : implementation file
//
#include "stdafx.h"
//#include "resource.h"
#include "PopupListBoxCtrl.h"
#include "PopupeditCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPopupListBoxCtrl
CPopupListBoxCtrl::CPopupListBoxCtrl()
{
m_bEditEnded = FALSE;
m_nID = 0;
m_pParent = NULL;
m_bAutoHide = TRUE;
m_bAutoTrack = TRUE;
// enter and cancel no longer work w/o accelerators
/*
LPCTSTR lpszResourceName = MAKEINTRESOURCE(IDR_POPUPLISTCTRL);
HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_ACCELERATOR);
m_hAccelerator = ::LoadAccelerators(hInst, lpszResourceName);
ASSERT (m_hAccelerator);
*/
}
CPopupListBoxCtrl::~CPopupListBoxCtrl()
{
}
BEGIN_MESSAGE_MAP(CPopupListBoxCtrl, CListBox)
//{{AFX_MSG_MAP(CPopupListBoxCtrl)
ON_WM_KILLFOCUS()
ON_WM_CREATE()
ON_WM_KEYDOWN()
ON_WM_GETDLGCODE()
ON_WM_CTLCOLOR()
ON_WM_DESTROY()
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
ON_WM_MOUSEMOVE()
// ON_COMMAND(ID_POPUPLISTCTRL_ENTER, OnEnter)
// ON_COMMAND(ID_POPUPLISTCTRL_CANCEL, OnCancel)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPopupListBoxCtrl message handlers
void CPopupListBoxCtrl::OnKillFocus(CWnd* pNewWnd)
{
// tell parent edit has been cancelled only if it hasn't already been
// dealt with
if (!m_bEditEnded)
{
// note: popup listbox is somewhat different from the
// popup editbox in so far as losing focus constitutes
// a cancel NOT an end
// the FALSE says that the user canceled by losing the focus
GetParent()->SendMessage(WM_PCANCELEDIT, m_nID, FALSE);
m_bEditEnded = TRUE;
}
if (m_bAutoHide)
Hide();
CListBox::OnKillFocus(pNewWnd);
}
BOOL CPopupListBoxCtrl::Create(CWnd* pParentWnd, UINT nID, BOOL bSort)
{
DWORD dwStyle;
// note: listbox must be popup window so it can be drawn over other windows
dwStyle = WS_POPUP | WS_BORDER | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_VSCROLL;
if (bSort)
dwStyle |= LBS_SORT;
m_nID = nID;
m_pParent = pParentWnd;
return CWnd::CreateEx(0, _T("LISTBOX"), NULL, dwStyle, 0, 0, 0, 0, pParentWnd->m_hWnd, (HMENU)NULL);
}
int CPopupListBoxCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CListBox::OnCreate(lpCreateStruct) == -1)
return -1;
SetFont(CFont::FromHandle((HFONT)::GetStockObject(ANSI_VAR_FONT)));
SetItemHeight(0, 16);
return 0;
}
void CPopupListBoxCtrl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// don't do anything if someone else has already dealt with it
if (m_bEditEnded)
return;
// if key is return then end edit
if (nChar == VK_RETURN)
{
OnEnter();
return;
}
// if key is esacpe then cancel edit
else if (nChar == VK_ESCAPE)
{
OnCancel();
return;
}
CListBox::OnKeyDown(nChar, nRepCnt, nFlags);
}
void CPopupListBoxCtrl::OnEnter()
{
// the TRUE says that the user selected intentionally
m_bEditEnded = TRUE; // must set this first
GetParent()->SendMessage(WM_PENDEDIT, m_nID, TRUE);
if (m_bAutoHide)
Hide();
}
void CPopupListBoxCtrl::OnCancel()
{
// the TRUE says that the user canceled intentionally
m_bEditEnded = TRUE; // must set this first
GetParent()->SendMessage(WM_PCANCELEDIT, m_nID, TRUE);
if (m_bAutoHide)
Hide();
}
UINT CPopupListBoxCtrl::OnGetDlgCode()
{
return DLGC_WANTALLKEYS | DLGC_WANTCHARS;
}
void CPopupListBoxCtrl::Show(CRect rPos)
{
// move the listbox if req
if (!rPos.IsRectNull())
MoveWindow(rPos);
// show the listbox and enable
ShowWindow(SW_SHOW);
EnableWindow(TRUE);
SetFocus();
// do this to prevent all the title bars changing to inactive
// when the focus moves to us
AfxGetMainWnd()->SendMessage(WM_NCACTIVATE, (WPARAM)TRUE);
}
void CPopupListBoxCtrl::Hide()
{
// hide all and disable
ShowWindow(SW_HIDE);
EnableWindow(FALSE);
GetParent()->UpdateWindow();
// make sure the parent is properly reactivated
GetParent()->PostMessage(WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, FALSE), (LPARAM)m_hWnd);
}
void CPopupListBoxCtrl::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint)
{
CRect rPos;
ValidateRect(x, y, nWidth, nHeight);
CListBox::MoveWindow(x, y, nWidth, nHeight, bRepaint);
}
void CPopupListBoxCtrl::MoveWindow(LPCRECT lpRect, BOOL bRepaint)
{
MoveWindow(lpRect->left, lpRect->top, lpRect->right - lpRect->left, lpRect->bottom - lpRect->top,
bRepaint);
}
void CPopupListBoxCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
CListBox::OnLButtonDown(nFlags, point);
m_bEditEnded = TRUE;
GetParent()->SendMessage(WM_PENDEDIT, m_nID);
if (m_bAutoHide)
Hide();
}
void CPopupListBoxCtrl::ValidateWidth(int& nWidth)
{
int nMinWidth = 0;
CClientDC dc(this);
CString sText;
int nNumItems;
CSize sizeText;
// iterate thru list items to ensure that width >= max string
nNumItems = GetCount();
dc.SelectObject(GetFont());
while (nNumItems--)
{
GetText(nNumItems, sText);
sizeText = dc.GetTextExtent(sText);
nMinWidth = max(nMinWidth, sizeText.cx);
}
nWidth = max(nWidth, nMinWidth + 8);
}
void CPopupListBoxCtrl::ValidateHeight(int& nHeight)
{
int nMaxHeight, nItemHeight;
int nNumItems;
nNumItems = GetCount();
nItemHeight = GetItemHeight(0);
// if the list is empty then just adjust the height to be
// a multiple of the item height
nHeight = (nHeight / nItemHeight) * nItemHeight;
nMaxHeight = nNumItems ? nNumItems * nItemHeight : nHeight;
nHeight = min(nHeight, nMaxHeight) + 2;
}
void CPopupListBoxCtrl::OnMouseMove(UINT nFlags, CPoint point)
{
CRect rItem;
CListBox::OnMouseMove(nFlags, point);
// if we're visible and enabled and auto tracking, then move
// the selection to the item under the cursor
if (m_bAutoTrack && IsWindowVisible() && IsWindowEnabled())
{
int nNumItems, nHit = -1;
int nCurSel = GetCurSel();
// determine item under point
// Note: ItemFromPoint() does not work under NT, so...
nNumItems = GetCount();
while (nNumItems--)
{
GetItemRect(nNumItems, rItem);
if (rItem.PtInRect(point)) // found
{
nHit = nNumItems;
break;
}
}
if (nHit != -1 && nHit != nCurSel)
SetCurSel(nHit);
}
}
CWnd* CPopupListBoxCtrl::GetParent()
{
if (m_pParent)
return m_pParent;
// else
return CListBox::GetParent();
}
void CPopupListBoxCtrl::ValidateRect(int& nX, int& nY, int& nWidth, int& nHeight)
{
CRect rScreen;
// validate width and height
ValidateWidth(nWidth);
ValidateHeight(nHeight);
// adjust x and y to ensure fully within screen area
CWnd::GetDesktopWindow()->GetWindowRect(rScreen);
if (nX + nWidth > rScreen.Width())
nX = rScreen.Width() - nWidth;
if (nY + nHeight > rScreen.Height())
nY = rScreen.Height() - nHeight;
}
BOOL CPopupListBoxCtrl::PreTranslateMessage(MSG* pMsg)
{
// handle accelerator keys
if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)
{
// try handling it ourself
if (m_hAccelerator && ::TranslateAccelerator(GetSafeHwnd(), m_hAccelerator, pMsg))
return TRUE;
}
return CListBox::PreTranslateMessage(pMsg);
}
| [
"leonzrt@gmail.com"
] | leonzrt@gmail.com |
e5c4edf185c6b650609daddb86fb7848fafb5b49 | 78dc80b3cfbabfdedf2d2ebd0ed01d3eb83bb106 | /stone-util/print-ib-props.cc | fcead8d4b03313ae26aac3e124489205b50301bf | [
"Apache-2.0"
] | permissive | hooddanielc/stone | cc77d9d7c31380fa61889d3dfd78cccf9675b52e | e3bfd674e35a6e0c11a6985fb61cf63accb73a1a | refs/heads/master | 2021-01-01T16:21:47.897884 | 2018-10-22T06:42:38 | 2018-10-22T06:42:38 | 97,812,420 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 684 | cc | #include <iostream>
#include <sstream>
#define PASTE(name) PASTE_2(name)
#define PASTE_2(name) #name
inline std::string get_src_root() noexcept {
return PASTE(IB_SRC_ROOT);
}
inline std::string get_project_path(const std::string &relative) noexcept {
std::stringstream ss;
ss << get_src_root();
if (relative.at(0) != '/') {
ss << "/";
}
ss << relative;
return ss.str();
}
inline std::string get_out_root() noexcept {
return PASTE(IB_OUT_ROOT);
}
#undef PASTE_2
#undef PASTE
int main(int, char*[]) {
std::cout << "IB_SRC_ROOT = '" << get_src_root() << "'" << std::endl;
std::cout << "IB_OUT_ROOT = '" << get_out_root() << "'" << std::endl;
return 0;
}
| [
"hood.danielc@gmail.com"
] | hood.danielc@gmail.com |
4ca1f10de4f8d87001c12b63bfe0e8893741cf4a | 7a811197fcfb0904080b07dc02f0db09ca2aba7c | /Source/Engine/Graphics/GraphicsSwapchain/GraphicsSwapchain.h | def6dbca9b6613aa7700b359a99d5baf02f56a2e | [] | no_license | dbowler92/D3D11Engine | 3af8abdd883bdf3930ffbe227c3e45906d871d87 | 1391d6353932aed3380b23e9828203f4cb7cca85 | refs/heads/master | 2020-11-30T04:56:26.986818 | 2017-08-12T19:15:06 | 2017-08-12T19:15:06 | 96,707,671 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 496 | h | //GraphicsSwapchain.h
//Created 09/07/17
//Created By Daniel Bowler
//
//Interface to the swapchain + back buffer mechanisms.
#pragma once
#include <Config/EngineConfig.h> //Build settings
#ifdef ENGINE_CONFIG_GRAPHICS_API_D3D11
#include "D3D11/D3D11GraphicsSwapchain.h"
#endif
namespace EngineAPI
{
namespace Graphics
{
class GraphicsSwapchain : public RENDERING_PLATFORM_IMPLEMENTATION(GraphicsSwapchain)
{
public:
GraphicsSwapchain() {};
~GraphicsSwapchain() {};
};
};
}; | [
"dbowler1192@gmail.com"
] | dbowler1192@gmail.com |
f5b4fb878bec9f6b3428c1458bab3e750f70fa1a | 9dc52759708db93fa01041fcb6df30709eaf9046 | /check_connect_mysql/check_connect_mysql.cpp | 5806939c57323f6d36d6e22c9e092e6064c19e6c | [] | no_license | wangt1xiuyi/my_server_http_web | 266c855081c4c304c6652d1ed2f8918a3d35ddbd | 95d407891947d51a94a92bb09404bfbf13a29fd8 | refs/heads/master | 2020-03-17T22:51:56.083864 | 2018-05-31T13:30:03 | 2018-05-31T13:30:03 | 134,021,145 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,125 | cpp | //#include"/usr/include/mysql/mysql.h"
#include<mysql/mysql.h>
#include<iostream>
#include<string>
#include<string.h>
#include<cstdio>
#include"connection_pool.h"
#include<map>
using namespace std;
int main(int argc,char *argv[])
{
map<string,string> users;
if(argc!=3){
return 0;
}
connection_pool *connPool=connection_pool::GetInstance("localhost","root","root","test_c",3306,5);
MYSQL *mysql=connPool->GetConnection();
if(mysql_query(mysql,"SELECT username,passwd FROM user"))
{
printf("INSERT error:%s\n",mysql_error(mysql));
return -1;
}
MYSQL_RES *result=mysql_store_result(mysql);
int num_fields=mysql_num_fields(result);
MYSQL_FIELD *fields=mysql_fetch_fields(result);
while(MYSQL_ROW row=mysql_fetch_row(result))
{
string temp1(row[0]);
string temp2(row[1]);
users[temp1]=temp2;
}
string name(argv[1]);
string passwd(argv[2]);
if(users.find(name)!=users.end()&&users[name]==passwd)
printf("1\n");
else
printf("0\n");
mysql_free_result(result);
connPool->DestroyPool();
}
| [
"13547954130@163.com"
] | 13547954130@163.com |
b8527abcf6d9c2cd2383ec7045c585062950e15d | 930f56326abb890be3a865e8bcc23da049275366 | /src/aadcDemo/helper/AADC_ExtPythonServer/ExtPythonServer.h | 30d01ca9f5335a1cf03bd01dff92c0ca3775cb7c | [] | no_license | leongeim/AADC2017 | 02ebcfc4461780c1851815e8c6bbb0c9ed4fc51c | 98927f33cb5bcae025e4f85176b854ceb97fa9e8 | refs/heads/master | 2020-04-10T22:10:39.497542 | 2017-11-16T15:26:19 | 2017-11-16T15:26:19 | null | 0 | 0 | null | null | null | null | WINDOWS-1258 | C++ | false | false | 15,095 | h | /*****************************************************************************
Copyright (c)
Audi Autonomous Driving Cup. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following acknowledgement: “This product includes software developed by the Audi AG and its contributors for Audi Autonomous Driving Cup.”
4. Neither the name of Audi nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY AUDI AG AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUDI AG OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************
* $Author:: spiesra $ $Date:: 2017-05-12 09:39:39#$ $Rev:: 63110 $
**********************************************************************/
#ifndef EXTERNPYTHONSERVER_CLASS_H
#define EXTERNPYTHONSERVER_CLASS_H
#include "stdafx.h"
#include "ADTF_OpenCV_helper.h"
// these files are first available after the install script was performed once
#include "ExtService.h"
#include "ExtIf_types.h"
#include "aadc_classification_structs.h"
#include "aadc_myclassification_structs.h"
#define OID_ADTF_FILTER_DEF "adtf.aadc.ExtPythonServer" //unique for a filter
#define ADTF_FILTER_DESC "AADC External Python Server" //this appears in the Component Tree in ADTF
#define ADTF_FILTER_VERSION_SUB_NAME "ExtPythonServer"//must match with accepted_version_...
#define ADTF_FILTER_VERSION_ACCEPT_LABEL "accepted_version"//sets the version entry
#define ADTF_FILTER_VERSION_STRING "1.0.0"//version string
#define ADTF_FILTER_VERSION_Major 1//this values will be compared, major version change - will not work
#define ADTF_FILTER_VERSION_Minor 0//change will work but notice
#define ADTF_FILTER_VERSION_Build 0//change will work but notice
//the detailed description of the filter
#define ADTF_FILTER_VERSION_LABEL "this filter creates the THRIFT RPC Client which can receive data and transmit image data. \n$Rev:: 62947"
//necessary because stupid WinGDI.h redefines it
#undef GetObject
/*!
* @defgroup ExtPythonServer External Python Server
* @{
* \image html ExternalPythonServer.PNG "Plugin ExtPythonServer"
*
* This filter transmits images over a thrift RPC to a Remote Thrift RPC Server. This server could be implemented in Python, Java etc and receives the image data and can perform some operations with the data. For further information refer to
* https://thrift.apache.org/
* and
* https://thrift.apache.org/tutorial/py
*
* The following diagramm shows the data flow of the ADTF External Python Server Filter and a corresponding Python Instance. An Example for this python module is also included in the AADC source
* \image html ExternalPythonServerGraph.png "Data Flow ExtPythonServer"
*
* \b Dependencies \n
* This plugin needs the following libraries:
* \li Boost v.1.57.0
* \li Thrift v.0.9.3
* \li OpenSSL v.1.0.1
* \li OpenCV v.3.2.0
*
* <b> Plugin Properties</b> \n
* <table>
* <tr><th>Property<th>Description<th>Default
* <tr><td>Thrift Port<td>Port number for Thrift Server<td>1833
* <tr><td>Thrift IP Address<td>The ip v4 adress of the thrift RPC server<td>127.0.0.1
* <tr><td>Enable debug outputs to console <td>If enabled additional debug information is printed to the console (Warning: decreases performance)<td>false
* <tr><td>Send Bitmap Format<td>If a complete bitmap including the bitmap header should be send to thrift server<td>false
* </table>
*
* <b> Input Pins</b>
* <table>
* <tr><th>Pin<th>Description<th>MajorType<th>SubType
* <tr><td>Video_Input<td>pin for imagedata to transmit to thrift<td>MEDIA_TYPE_VIDEO<td>MEDIA_SUBTYPE_VIDEO_UNCOMPRESSED
* </table>
*
* <b> Output Pins</b>
* <table>
* <tr><th>Pin<th>Description<th>MajorType<th>SubType
* <tr><td>Response<td>response string from python server<td>MEDIA_TYPE_STRUCTURED_DATA<td>MEDIA_SUBTYPE_STRUCT_STRUCTURED
* </table>
*
* <b>Plugin Details</b>
* <table>
* <tr><td>Path<td>src/aadcDemo/helper/AADC_ExtPythonServer
* <tr><td>Filename<td>aadc_ExtPythonServer.plb
* <tr><td>Version<td>1.0.0
* </table>
*/
//! Class of Extern Thrift RPC Client
/*!
* This class is the main class of the Extern Thrift RPC Client Filter
*/
class ExtPythonServer : public adtf::cFilter,
public adtf::IKernelThreadFunc
{
public:
/*! This macro does all the plugin setup stuff */
ADTF_FILTER_VERSION(OID_ADTF_FILTER_DEF,
ADTF_FILTER_DESC,
adtf::OBJCAT_Tool,
ADTF_FILTER_VERSION_SUB_NAME,
ADTF_FILTER_VERSION_Major,
ADTF_FILTER_VERSION_Minor,
ADTF_FILTER_VERSION_Build,
ADTF_FILTER_VERSION_LABEL
);
/*! decides wether or not the debug output are printed in the ADTF console */
static const cString PropEnableConsoleLogName;
/*! description of the property */
static const cString PropEnableConsoleLogDesc;
/*! default value of the property */
static const tBool PropEnableConsoleLogDefault;
/*! decides wether or not the debug output are printed in the ADTF console */
static const cString PropSendBitmapFormatName;
/*! description of the property */
static const cString PropSendBitmapFormatDesc;
/*! default value of the property */
static const tInt PropSendBitmapFormatDefault;
/*! name of the property */
static const cString PropThriftPortName;
/*! description of the property */
static const cString PropThriftPortDesc;
/*! default value of the property */
static const tInt PropThriftPortDefault;
/*! name of the property */
static const cString PropThriftIPV4AddressName;
/*! description of the property */
static const cString PropThriftIPV4AddressDesc;
/*! default value of the property */
static const cString PropThriftIPV4AddressDefault;
public:
/*! constructor for template class
* \param __info [in] This is the name of the filter instance.
*/
ExtPythonServer(const tChar* __info);
/*! the destructor for this class
*/
~ExtPythonServer();
/*! Implements the default cFilter state machine call. It will be
* called automatically by changing the filters state and needs
* to be overwritten by the special filter.
* Please see page_filter_life_cycle for further information on when the state of a filter changes.
* \param [in] eStage The Init function will be called when the filter state changes as follows:\n
* \return Standard Result Code.
* \param [in,out] __exception_ptr An Exception pointer where exceptions will be put when failed.
* If not using the cException smart pointer, the interface has to
* be released by calling Unref().
*/
tResult Init(tInitStage eStage, ucom::IException** __exception_ptr);
/*! This Function is always called when any property has changed. This should be the only place
* to read from the properties itself and store their values in a member.
*
* \param [in] strName the name of the property that has changed.
* \
* \return Returns a standard result code.
*/
tResult PropertyChanged(const tChar* strName);
/*! Implements the default cFilter state machine calls. It will be
* called automatically by changing the filters state IFilter::State_Ready -> IFilter::State_Running
* and can be overwritten by the special filter.
*
* \param __exception_ptr [inout] An Exception pointer where exceptions will be put when failed.
* If not using the cException smart pointer, the interface has to
* be released by calling Unref().
* \return Standard Result Code.
*
* \note This method will be also called during the shutdown of a configuration if the Filter is connected to the Message Bus.
* (see: section_message_bus)! This has to be done, to disconnect the Message Bus and to avoid Race Conditions.
*
*/
tResult Start(ucom::IException** __exception_ptr = NULL);
/*! This Function will be called by all pins the filter is registered to.
* \param [in] pSource Pointer to the sending pin's IPin interface.
* \param [in] nEventCode Event code. For allowed values see IPinEventSink::tPinEventCode
* \param [in] nParam1 Optional integer parameter.
* \param [in] nParam2 Optional integer parameter.
* \param [in] pMediaSample Address of an IMediaSample interface pointers.
* \
* \return Returns a standard result code.
* \warning This function will not implement a thread-safe synchronization between the calls from different sources.
* You need to synchronize this call by your own. Have a look to adtf_util::__synchronized , adtf_util::__synchronized_obj .
*/
tResult OnPinEvent(IPin* pSource, tInt nEventCode, tInt nParam1, tInt nParam2, IMediaSample* pMediaSample);
/*! Implements the default cFilter state machine calls. It will be
* called automatically by changing the filters state IFilter::State_Running -> IFilter::State_Ready
* and can be overwritten by the special filter.
*
* \param __exception_ptr [inout] An Exception pointer where exceptions will be put when failed.
* If not using the cException smart pointer, the interface has to
* be released by calling Unref().
*
* \return Standard Result Code.
*
* \note This method will be also called during the shutdown of a configuration if the Filter is connected to the Message Bus.
* (see: section_message_bus)! This has to be done, to disconnect the Message Bus and to avoid Race Conditions.
*
*/
tResult Stop(ucom::IException** __exception_ptr = NULL);
/*! Implements the default cFilter state machine call. It will be
* called automatically by changing the filters state and needs
* to be overwritten by the special filter.
* Please see page_filter_life_cycle for further information on when the state of a filter changes.
*
* \param eStage [in] The Init function will be called when the filter state changes as follows:\n
* \param __exception_ptr [inout] An Exception pointer where exceptions will be put when failed.
* If not using the cException smart pointer, the interface has to
* be released by calling Unref().
*
* \return Standard Result Code.
*/
tResult Shutdown(tInitStage eStage, ucom::IException** __exception_ptr = NULL);
tResult UpdateOutputImageFormat(const cv::Mat& outputImage);
private:
/*! function to set the m_sProcessFormat and the m_sInputFormat variables
\param pFormat the new format for the input and input pin
\result RETURN_NOERROR if successful
*/
tResult UpdateInputImageFormat(const tBitmapFormat* pFormat);
/*! processes a received media sample with UTC time
* \param pMediaSample the incomining the media sample
* \result Returns a standard result code.
*
*/
tResult Process(IMediaSample* pMediaSample);
/*! transmits the received string response via the output pin
* \param response the response string from thrift server
* \result Returns a standard result code.
*/
tResult Transmit(const std::vector<myClassificationResult>& response);
/*! input pin for utc time */
cVideoPin m_inputPinImageData;
cVideoPin m_oVideoOutputPin;
/*! input pin for utc time */
cOutputPin m_outputResponseData;
/*! bitmap format of input pin */
tBitmapFormat m_sInputFormat;
/*! bitmap format of output pin */
tBitmapFormat m_sOutputFormat;
/*! the opencv data type */
tInt m_openCVType;
/*! tha last received input image*/
cv::Mat m_inputImage;
/*! the struct with all the properties*/
struct filterProperties
{
/*! stores if debug output should be printed */
tBool enableDebugOutput;
/*! port number for server*/
tUInt32 server_port;
/*! the ip v4 adress of the thrift RPC server */
cString server_addressIPV4;
/*! Uf a complete bitmap including the bitmap header should be send to thrift server */
tInt sendFormat;
bool m_outputImageDebug;
}
/*! the filter properties of this class */
m_filterProperties;
/*! the external interface thrift client */
boost::shared_ptr<ext_iface::ExtServiceClient> m_thriftClient;
/*! critical section for send to thrift */
cCriticalSection m_critSectionSendToPython;
/*! the thread for the server */
cKernelThread m_oThriftClientThread;
protected:
/*! The ThreadFunc callback.
* \param pThread [in] The kernel thread called from.
* \param pvUserData [in] The user data of the thread, given at
* @see cKernelThread::Create.
* \param szUserData [in] The user data size of the thread, given at @see
* cKernelThread::Create.
* \return Standard result
*/
tResult ThreadFunc(cKernelThread* pThread, tVoid* pvUserData, tSize szUserData);
/*! buffer for received data from inputPin and send to thrift */
ext_iface::TDataRaw m_thriftRawMessageBuffer;
/*! buffer for received data from inputPin and send to thrift */
ext_iface::TImageParams m_thriftImageParamsBuffer;
};
/*!
*@}
*/
#endif //ExtPythonServer_CLASS_H
| [
"UniAutonom@aadc-2017.de"
] | UniAutonom@aadc-2017.de |
158d8a2b13848e0f97deaa8f4104e5f930214648 | fad354de10252cf074d5727232682440bdced572 | /project/include/system/ValuePointer.h | 6e571594ec0a5de0b307260b4bd6ab56f95c7057 | [
"LicenseRef-scancode-free-unknown",
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"MPL-1.1",
"LGPL-2.0-only",
"LicenseRef-scancode-public-domain",
"GPL-3.0-only"
] | permissive | openfl/lime | 12bf58892e11df1b40e9cd8d75939b33bba29a27 | d4a04c80df33bbbd7e2fc54c5f6dc9d32b2ad83e | refs/heads/develop | 2023-09-01T17:21:02.054726 | 2023-08-19T16:39:16 | 2023-08-19T16:39:16 | 10,876,724 | 410 | 380 | MIT | 2023-08-19T16:39:18 | 2013-06-23T02:49:06 | JavaScript | UTF-8 | C++ | false | false | 805 | h | #ifndef LIME_SYSTEM_VALUE_POINTER_H
#define LIME_SYSTEM_VALUE_POINTER_H
#include <system/CFFI.h>
namespace lime {
class ValuePointer {
public:
ValuePointer (vobj* handle);
ValuePointer (vdynamic* handle);
ValuePointer (vclosure* handle);
ValuePointer (value handle);
~ValuePointer ();
void* Call ();
void* Call (void* arg0);
void* Call (void* arg0, void* arg1);
void* Call (void* arg0, void* arg1, void* arg2);
void* Call (void* arg0, void* arg1, void* arg2, void* arg3);
void* Call (void* arg0, void* arg1, void* arg2, void* arg3, void* arg4);
void* Get () const;
bool IsCFFIValue ();
bool IsHLValue ();
void Set (vobj* handle);
void Set (value handle);
private:
gcroot cffiRoot;
value* cffiValue;
vobj* hlValue;
};
}
#endif | [
"jgranick@users.noreply.github.com"
] | jgranick@users.noreply.github.com |
c1ed6461ad24b7d9df92344fb2bd9b7e1fd41157 | df8f92a7459d1a28a6b32ceda553676465283954 | /renderer/WorleyNoise.h | 21e1ce0bd5eaf323ecc7b91e18437166f08b9226 | [] | no_license | dustars/dustar | 806a17167fc64d3a4045d5694bc72a6996d1aabf | cd76ccdf0019814e862bcf84fab3b56e34029041 | refs/heads/master | 2023-05-12T07:13:22.819370 | 2021-04-21T14:32:08 | 2021-04-21T14:32:08 | 240,114,239 | 1 | 0 | null | 2020-12-18T11:16:25 | 2020-02-12T21:00:27 | C++ | UTF-8 | C++ | false | false | 780 | h | /*
Description:
Worley noise class.
Created:
6/27/2020
Last Updated:
7/25/2020
To Do:
>Compute Shader. (Optional)
>Optimization.
See http://webstaff.itn.liu.se/~stegu/GLSL-cellular/GLSL-cellular-notes.pdf for
possible optimizations. (2x2x2 search region is not applicable to my program)
*/
#pragma once
#include "../core/math/Math.h"
#include <vector>
class WorleyNoise
{
public:
WorleyNoise(std::size_t resolution = 128, std::size_t cellsNums = 6, int seed = 0);
float Noise(float x, float y, float z);
float FBMNoise(float x, float y, float z, std::size_t octaves, float lacunarity = 2.f, float gain = 0.707f);
private:
std::size_t resolution; //the resolution of noise
std::size_t cellsNums; //the number of cells
std::vector<Vector3> featurePoints;
}; | [
"auty789@hotmail.com"
] | auty789@hotmail.com |
b15a276684d1e47fe8736c63fa8c6df27673944f | 2a6d385c7737aea3c6b49eef9252babb7557b909 | /SHNtupliser/interface/GenFuncs.h | 61e9c20b243857f861e1b37c7a233ed0481de15d | [] | no_license | Sam-Harper/usercode | 1b302a4b647e479d27a9501f9576bd04b07e111a | fa43427fac80d773978ea67b78be58d264f39ec8 | refs/heads/120XNtup | 2022-08-26T12:59:53.388853 | 2022-07-12T16:52:46 | 2022-07-12T16:52:46 | 15,675,175 | 1 | 11 | null | 2022-07-21T13:27:57 | 2014-01-06T13:54:22 | Python | UTF-8 | C++ | false | false | 1,161 | h | #ifndef SHARPER_SHNTUPLISER_GENFUNCS_H
#define SHARPER_SHNTUPLISER_GENFUNCS_H
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
class SHMCParticle;
class SHGenInfo;
namespace heep{
class Event;
}
class GenFuncs {
private:
static constexpr int kNrPartThresToStoreAll=10; //if the number of gen particles is <= this value, we store all of them
GenFuncs()=delete;
public:
static SHMCParticle makeMCParticle(const reco::GenParticle* genPart,const std::vector<reco::GenParticle>& particles);
static void fillGenInfo(const heep::Event& heepEvt,SHGenInfo& genInfo,bool addMCParts,bool addWeights);
static void getAllDaughters(const reco::Candidate* part,
std::vector<const reco::Candidate*>& daughters);
static std::pair<int,int> findDaughters(int partNr,const std::vector<std::pair<int,int> >& mothers);
static void fillPDFInfo(const heep::Event& heepEvt,SHGenInfo& genInfo);
static void fillMCParticles(const heep::Event& heepEvt,SHGenInfo& genInfo);
static void fillLHEParticles(const heep::Event& heepEvt,SHGenInfo& genInfo);
static void fillWeights(const heep::Event& heepEvt,SHGenInfo& genInfo);
};
#endif
| [
"sam.j.harper@gmail.com"
] | sam.j.harper@gmail.com |
697f84a744e2e2d19bb3550062f11427b0e47579 | b34668278d825d49092a4db176e7a0f17b4d8e41 | /include/lattice_symmetries/lattice_symmetries.h | 20391a5c53a087e7dcf838b4ece470f496517c32 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | skphy/lattice-symmetries | adf6a2d8ddd57a9cd5b097a49d13574ff205a6ca | b6793fa9eeae6b9cbaa3844beec14ffe5ccfad45 | refs/heads/master | 2023-08-24T16:27:54.157131 | 2021-10-25T18:05:56 | 2021-10-25T18:05:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,301 | h | // Copyright (c) 2019-2020, Tom Westerhout
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef LATTICE_SYMMETRIES_H
#define LATTICE_SYMMETRIES_H
#define LATTICE_SYMMETRIES_UNREACHABLE __builtin_unreachable()
#define LATTICE_SYMMETRIES_LIKELY(x) __builtin_expect(x, 1)
#define LATTICE_SYMMETRIES_UNLIKELY(x) __builtin_expect(x, 0)
#define LATTICE_SYMMETRIES_EXPORT __attribute__((visibility("default")))
#define LATTICE_SYMMETRIES_NORETURN __attribute__((noreturn))
#if defined(__clang__)
# define LATTICE_SYMMETRIES_CLANG() 1
# define LATTICE_SYMMETRIES_GCC() 0
# define LATTICE_SYMMETRIES_MSVC() 0
#elif defined(__GNUC__) || defined(__GNUG__)
# define LATTICE_SYMMETRIES_CLANG() 0
# define LATTICE_SYMMETRIES_GCC() 1
# define LATTICE_SYMMETRIES_MSVC() 0
#elif defined(_MSC_VER)
# define LATTICE_SYMMETRIES_CLANG() 0
# define LATTICE_SYMMETRIES_GCC() 0
# define LATTICE_SYMMETRIES_MSVC() 1
#else
# define LATTICE_SYMMETRIES_CLANG() 0
# define LATTICE_SYMMETRIES_GCC() 0
# define LATTICE_SYMMETRIES_MSVC() 0
#endif
#if !defined(LATTICE_SYMMETRIES_FORCEINLINE)
# if defined(_MSC_VER)
# define LATTICE_SYMMETRIES_FORCEINLINE __forceinline
# elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4)
# define LATTICE_SYMMETRIES_FORCEINLINE inline __attribute__((__always_inline__))
# else
# define LATTICE_SYMMETRIES_FORCEINLINE inline
# endif
#endif
#if !defined(LATTICE_SYMMETRIES_NOINLINE)
# if defined(_MSC_VER)
# define LATTICE_SYMMETRIES_NOINLINE __declspec(noinline)
# elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4)
# if defined(__CUDACC__) // nvcc doesn't always parse __noinline__,
# define LATTICE_SYMMETRIES_NOINLINE __attribute__((noinline))
# else
# define LATTICE_SYMMETRIES_NOINLINE __attribute__((__noinline__))
# endif
# else
# define LATTICE_SYMMETRIES_NOINLINE
# endif
#endif
#if defined(__AVX2__)
# define LATTICE_SYMMETRIES_HAS_AVX2() 1
#else
# define LATTICE_SYMMETRIES_HAS_AVX2() 0
#endif
#if defined(__AVX__)
# define LATTICE_SYMMETRIES_HAS_AVX() 1
#else
# define LATTICE_SYMMETRIES_HAS_AVX() 0
#endif
#if defined(__SSE4_1__) && defined(__SSE4_2__)
# define LATTICE_SYMMETRIES_HAS_SSE4() 1
#else
# define LATTICE_SYMMETRIES_HAS_SSE4() 0
#endif
#if !defined(__SSE2__) && !defined(__x86_64__)
# error "unsupported architecture; lattice-symmetries currently only works on x86_64"
#endif
#if defined(__cplusplus)
# include <cstdint>
#else
# include <stdbool.h>
# include <stdint.h>
#endif
#if !defined(LATTICE_SYMMETRIES_COMPLEX128)
# if defined(__cplusplus)
# include <complex>
# define LATTICE_SYMMETRIES_COMPLEX128 std::complex<double>
# else
# define LATTICE_SYMMETRIES_COMPLEX128 _Complex double
# endif
#endif
#if defined(__cplusplus)
extern "C" {
#endif
typedef enum ls_error_code {
LS_SUCCESS = 0, ///< No error
LS_OUT_OF_MEMORY, ///< Memory allocation failed
LS_INVALID_ARGUMENT, ///< Argument to a function is invalid
LS_INVALID_HAMMING_WEIGHT, ///< Invalid Hamming weight
LS_INVALID_SPIN_INVERSION, ///< Invalid value for spin_inversion
LS_INVALID_NUMBER_SPINS, ///< Invalid number of spins
LS_INVALID_PERMUTATION, ///< Argument is not a valid permutation
LS_INVALID_SECTOR, ///< Sector exceeds the periodicity of the operator
LS_INVALID_STATE, ///< Invalid basis state
LS_INVALID_DATATYPE, ///< Invalid datatype
LS_PERMUTATION_TOO_LONG, ///< Such long permutations are not supported
LS_INCOMPATIBLE_SYMMETRIES, ///< Symmetries are incompatible
LS_NOT_A_REPRESENTATIVE, ///< Spin configuration is not a representative
LS_WRONG_BASIS_TYPE, ///< Expected a basis of different type
LS_CACHE_NOT_BUILT, ///< List of representatives is not yet built
LS_COULD_NOT_OPEN_FILE, ///< Failed to open file
LS_FILE_IO_FAILED, ///< File input/output failed
LS_CACHE_IS_CORRUPT, ///< File does not contain a list of representatives
LS_OPERATOR_IS_COMPLEX, ///< Trying to apply complex operator to real vector
LS_DIMENSION_MISMATCH, ///< Operator dimension does not match vector length
LS_SYSTEM_ERROR, ///< Unknown error
} ls_error_code;
char const* ls_error_to_string(ls_error_code code);
void ls_destroy_string(char const* message);
typedef void (*ls_error_handler)(char const* expr, char const* file, unsigned line,
char const* function, char const* msg);
void ls_set_check_fail_handler(ls_error_handler func);
void ls_set_assert_fail_handler(ls_error_handler func);
LATTICE_SYMMETRIES_NORETURN
void ls_assert_fail(char const* expr, char const* file, unsigned line, char const* function,
char const* msg);
LATTICE_SYMMETRIES_NORETURN
void ls_check_fail(char const* expr, char const* file, unsigned line, char const* function,
char const* msg);
#define LATTICE_SYMMETRIES_CHECK(cond, msg) \
(LATTICE_SYMMETRIES_LIKELY(cond) \
? ((void)0) \
: ls_check_fail(#cond, __FILE__, __LINE__, __FUNCTION__, msg))
#if !defined(NDEBUG)
# define LATTICE_SYMMETRIES_ASSERT(cond, msg) \
(LATTICE_SYMMETRIES_LIKELY(cond) \
? ((void)0) \
: ls_assert_fail(#cond, __FILE__, __LINE__, __FUNCTION__, msg))
#else
# define LATTICE_SYMMETRIES_ASSERT(cond, msg) ((void)0)
#endif
bool ls_is_logging_enabled();
void ls_enable_logging();
void ls_disable_logging();
bool ls_has_avx2();
bool ls_has_avx();
bool ls_has_sse4();
#define LATTICE_SYMMETRIES_DISPATCH(func, ...) \
if (ls_has_avx2()) { return ::lattice_symmetries::avx2::func(__VA_ARGS__); } \
if (ls_has_avx()) { return ::lattice_symmetries::avx::func(__VA_ARGS__); } \
if (ls_has_sse4()) { return ::lattice_symmetries::sse4::func(__VA_ARGS__); } \
return ::lattice_symmetries::sse2::func(__VA_ARGS__)
// This is an internal function!
void ls_private_log_debug(char const* file, unsigned line, char const* function, char const* fmt,
...);
#define LATTICE_SYMMETRIES_LOG_DEBUG(fmt, ...) \
ls_private_log_debug(__FILE__, __LINE__, __FUNCTION__, fmt, __VA_ARGS__)
typedef uint64_t ls_bits64;
typedef struct ls_bits512 {
ls_bits64 words[8];
} ls_bits512;
typedef struct ls_symmetry ls_symmetry;
ls_error_code ls_create_symmetry(ls_symmetry** ptr, unsigned length, unsigned const permutation[],
unsigned sector);
void ls_destroy_symmetry(ls_symmetry* symmetry);
unsigned ls_get_sector(ls_symmetry const* symmetry);
double ls_get_phase(ls_symmetry const* symmetry);
void ls_get_eigenvalue(ls_symmetry const* symmetry, void* out);
unsigned ls_get_periodicity(ls_symmetry const* symmetry);
unsigned ls_symmetry_get_number_spins(ls_symmetry const* symmetry);
unsigned ls_symmetry_get_network_depth(ls_symmetry const* symmetry);
void ls_symmetry_get_network_masks(ls_symmetry const* symmetry, void* out, uint64_t stride);
void ls_symmetry_get_network_shifts(ls_symmetry const* symmetry, unsigned* shifts);
void ls_apply_symmetry(ls_symmetry const* symmetry, ls_bits512* bits);
void ls_batched_apply_symmetry(ls_symmetry const* symmetry, uint64_t count, uint64_t* spins,
uint64_t stride);
void ls_symmetry_get_permutation(ls_symmetry const* symmetry, unsigned out[]);
uint64_t ls_symmetry_sizeof();
typedef struct ls_group ls_group;
ls_error_code ls_create_group(ls_group** ptr, unsigned size, ls_symmetry const* generators[]);
ls_error_code ls_create_trivial_group(ls_group** ptr, unsigned number_spins);
void ls_destroy_group(ls_group* group);
unsigned ls_get_group_size(ls_group const* group);
ls_symmetry const* ls_group_get_symmetries(ls_group const* group);
int ls_group_get_number_spins(ls_group const* group);
int ls_group_get_network_depth(ls_group const* group);
int ls_group_dump_symmetry_info(ls_group const* group, void* masks, unsigned* shifts,
LATTICE_SYMMETRIES_COMPLEX128* eigenvalues);
typedef struct ls_spin_basis ls_spin_basis;
typedef struct ls_states ls_states;
ls_error_code ls_create_spin_basis(ls_spin_basis** ptr, ls_group const* group,
unsigned number_spins, int hamming_weight, int spin_inversion);
ls_spin_basis* ls_copy_spin_basis(ls_spin_basis const* basis);
void ls_destroy_spin_basis(ls_spin_basis* basis);
unsigned ls_get_number_spins(ls_spin_basis const* basis);
unsigned ls_get_number_bits(ls_spin_basis const* basis);
int ls_get_hamming_weight(ls_spin_basis const* basis);
int ls_get_spin_inversion(ls_spin_basis const* basis);
bool ls_has_symmetries(ls_spin_basis const* basis);
ls_error_code ls_get_number_states(ls_spin_basis const* basis, uint64_t* out);
ls_error_code ls_build(ls_spin_basis* basis);
ls_error_code ls_build_unsafe(ls_spin_basis* basis, uint64_t size,
uint64_t const representatives[]);
void ls_get_state_info(ls_spin_basis const* basis, ls_bits512 const* bits,
ls_bits512* representative, void* character, double* norm);
void ls_batched_get_state_info(ls_spin_basis const* basis, uint64_t count, ls_bits512 const* spins,
uint64_t spins_stride, ls_bits512* repr, uint64_t repr_stride,
LATTICE_SYMMETRIES_COMPLEX128* eigenvalues,
uint64_t eigenvalues_stride, double* norm, uint64_t norm_stride);
ls_error_code ls_is_representative(ls_spin_basis const* basis, uint64_t count,
uint64_t const bits[], uint8_t out[]);
ls_error_code ls_get_index(ls_spin_basis const* basis, uint64_t bits, uint64_t* index);
ls_error_code ls_batched_get_index(ls_spin_basis const* basis, uint64_t count,
ls_bits64 const* spins, uint64_t spins_stride, uint64_t* out,
uint64_t out_stride);
ls_error_code ls_get_states(ls_states** ptr, ls_spin_basis const* basis);
void ls_destroy_states(ls_states* states);
uint64_t const* ls_states_get_data(ls_states const* states);
uint64_t ls_states_get_size(ls_states const* states);
// NOTE: THIS IS HIGHTLY EXPERIMENTAL! {{{
typedef struct ls_flat_spin_basis ls_flat_spin_basis;
ls_error_code ls_convert_to_flat_spin_basis(ls_flat_spin_basis** ptr, ls_spin_basis const* basis);
void ls_destroy_flat_spin_basis(ls_flat_spin_basis* ptr);
uint64_t ls_get_buffer_size_for_flat_spin_basis(ls_flat_spin_basis const* basis);
ls_error_code ls_serialize_flat_spin_basis(ls_flat_spin_basis const* basis, char* buffer,
uint64_t size);
ls_error_code ls_deserialize_flat_spin_basis(ls_flat_spin_basis** ptr, char const* buffer,
uint64_t size);
unsigned ls_flat_spin_basis_number_spins(ls_flat_spin_basis const* basis);
int ls_flat_spin_basis_hamming_weight(ls_flat_spin_basis const* basis);
int ls_flat_spin_basis_spin_inversion(ls_flat_spin_basis const* basis);
void ls_flat_spin_basis_state_info(ls_flat_spin_basis const* basis, uint64_t count,
void const* spin, void* repr,
LATTICE_SYMMETRIES_COMPLEX128* character, double* norm);
void ls_flat_spin_basis_is_representative(ls_flat_spin_basis const* basis, uint64_t count,
void const* spin, uint8_t* is_repr, double* norm);
uint64_t ls_binary_search(uint64_t const* data, uint64_t size, uint64_t key);
// }}} END EXPERIMENTAL STUFF
ls_error_code ls_save_cache(ls_spin_basis const* basis, char const* filename);
ls_error_code ls_load_cache(ls_spin_basis* basis, char const* filename);
typedef struct ls_interaction ls_interaction;
typedef struct ls_operator ls_operator;
ls_error_code ls_create_interaction1(ls_interaction** ptr, void const* matrix_2x2,
unsigned number_nodes, uint16_t const* nodes);
ls_error_code ls_create_interaction2(ls_interaction** ptr, void const* matrix_4x4,
unsigned number_edges, uint16_t const (*edges)[2]);
ls_error_code ls_create_interaction3(ls_interaction** ptr, void const* matrix_8x8,
unsigned number_triangles, uint16_t const (*triangles)[3]);
ls_error_code ls_create_interaction4(ls_interaction** ptr, void const* matrix_16x16,
unsigned number_plaquettes, uint16_t const (*plaquettes)[4]);
void ls_destroy_interaction(ls_interaction* interaction);
bool ls_interaction_is_real(ls_interaction const* interaction);
ls_error_code ls_create_operator(ls_operator** ptr, ls_spin_basis const* basis,
unsigned number_terms, ls_interaction const* const terms[]);
void ls_destroy_operator(ls_operator* op);
typedef enum {
LS_FLOAT32,
LS_FLOAT64,
LS_COMPLEX64,
LS_COMPLEX128,
} ls_datatype;
typedef ls_error_code (*ls_callback)(ls_bits512 const* bits, void const* coeff, void* cxt);
ls_error_code ls_operator_apply(ls_operator const* op, ls_bits512 const* bits, ls_callback func,
void* cxt);
uint64_t ls_batched_operator_apply(ls_operator const* op, uint64_t count, ls_bits512 const* spins,
ls_bits512* out_spins, LATTICE_SYMMETRIES_COMPLEX128* out_coeffs,
uint64_t* out_counts);
ls_error_code ls_operator_matmat(ls_operator const* op, ls_datatype dtype, uint64_t size,
uint64_t block_size, void const* x, uint64_t x_stride, void* y,
uint64_t y_stride);
ls_error_code ls_operator_expectation(ls_operator const* op, ls_datatype dtype, uint64_t size,
uint64_t block_size, void const* x, uint64_t x_stride,
void* out);
uint64_t ls_operator_max_buffer_size(ls_operator const* op);
bool ls_operator_is_real(ls_operator const* op);
#if defined(__cplusplus)
} // extern "C"
#endif
#if defined(__cplusplus)
# include <system_error>
namespace std {
template <> struct is_error_code_enum<ls_error_code> : true_type {};
} // namespace std
namespace lattice_symmetries {
class ls_error_category : public std::error_category {
public:
[[nodiscard]] auto name() const noexcept -> const char* final;
[[nodiscard]] auto message(int c) const -> std::string final;
};
auto get_error_category() noexcept -> ls_error_category const&;
} // namespace lattice_symmetries
inline auto make_error_code(ls_error_code const e) noexcept -> std::error_code
{
return {static_cast<int>(e), lattice_symmetries::get_error_category()};
}
#endif
#endif // LATTICE_SYMMETRIES_H
| [
"14264576+twesterhout@users.noreply.github.com"
] | 14264576+twesterhout@users.noreply.github.com |
1bb1f4dc29929dc9312e3d4f53f3aebe80a09687 | 9471b2743486250464fe6a7e962f663033fdb265 | /POJ/3600/3411616_AC_125MS_380K.cc | 13d1fc7cababe212fd21b66c8641474a76a3c2fb | [] | no_license | liruqi/topcoder | 25d1ce9fdb836c94d8229f11dc74e3e3a9819e53 | 17df44464c91db51a1a24a9658c41ccb1501870b | refs/heads/master | 2023-01-23T00:13:11.810623 | 2023-01-13T01:28:12 | 2023-01-13T01:28:12 | 6,572,063 | 6 | 6 | null | 2014-11-16T09:17:56 | 2012-11-07T00:31:47 | C++ | UTF-8 | C++ | false | false | 880 | cc | #include<algorithm>
#include<iostream>
#include<list>
using namespace std;
int rowA,rowB,colA,colB,r,c;
char ia[21][21],ib[21][21],it[21][21];
int equal(int lt){
int rr;
for(rr=0;rr<rowA;rr++)
if(ia[rr][c]!=it[rr][lt])
return 0;
return 1;
}
//compare col
int compare(){
int last=0;
for(c=0;c<colA;c++){
for(;last<colB && !equal(last);last++);
if(last==colB)
return 0;
}
return 1;
}
int main(){
scanf("%d",&rowA);
scanf("%d",&colA);
for(r=0;r<rowA;r++)
scanf("%s",ia[r]);
scanf("%d",&rowB);
scanf("%d",&colB);
for(r=0;r<rowB;r++)
scanf("%s",ib[r]);
int i,k;
for(k=0;k<(1<<rowB);k++)
if(__builtin_popcount(k)==rowA){
i=0;
for(r=0;r<rowB;r++) if(k & (1<<r))
memcpy(it[i++],ib[r],colB);
if(compare()){
//printf("%d",k);
puts("Yes");
return 0;
}
}
puts("No");
}
| [
"liruqi@conew.com"
] | liruqi@conew.com |
c3da492bc72eb88af7e58d017f7b3fb3c6bcf11d | 1a237e96a8ebac59ee86ff992c0b5a29c42bb2e4 | /main.cpp | b7da108128a6844ddbef0a5160ce752b44f5f2b7 | [] | no_license | lkwangpy/WaterColumnViewer | 905d241bc37578fb469b860633ea7f26edafcc35 | 4bcddf83373f2cca577e1ee2bcb3aa11a80b82d5 | refs/heads/master | 2021-01-18T07:34:42.072688 | 2015-02-25T12:27:44 | 2015-02-25T12:27:44 | 43,421,018 | 1 | 0 | null | 2015-09-30T08:24:24 | 2015-09-30T08:24:24 | null | UTF-8 | C++ | false | false | 1,836 | cpp | #include "mainwindow.h"
#include <QApplication>
#include <QDir>
#include <QFileInfo>
#include <QFileInfoList>
#include <omp.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
switch (argc) {
case 1:
{
MainWindow w;
w.show();
return a.exec();
break;
}
case 2:
{
MainWindow w;
w.open_file(QString(argv[1]));
w.show();
return a.exec();
}
case 3:
{
if (QString(argv[1]) == "--as") {
WCI_Generater w;
QFileInfo _info(QString::fromAscii(argv[2]));
if (_info.suffix() == "wcd") {
w.open_file(_info.absoluteFilePath());
w.draw_WCAS(0, 0);
}
}
break;
}
case 4:
case 6:
{
if ( QString(argv[1]) == "--as" && QString(argv[2]) == "--D") {
QString out_dir(".");
if (argc == 6 && QString(argv[4]) == "--O")
out_dir = QString(argv[5]);
QDir dir;//( );
if (dir.cd( QString(argv[3] )))
{
QStringList list;
list << "*.wcd";
QFileInfoList d_wcdfiles = dir.entryInfoList(list, QDir::Files);
// #pragma omp parallel for num_threads(2)
for (int i = 0; i < d_wcdfiles.size(); i++)
{
WCI_Generater* w = new WCI_Generater;
w->open_file(d_wcdfiles[i].absoluteFilePath());
w->draw_WCAS(0, 0, out_dir);
// printf( QObject::tr("%1:The parallel region is executed by thread %2\n").arg(i).arg(omp_get_thread_num()).toStdString().c_str() );
delete w;
}
}
}
}
default:
break;
}
return 0;
}
| [
"juny.yan@foxmail.com"
] | juny.yan@foxmail.com |
868c5b975dd117bdb081d2bc603c6a2d4dc2baf0 | afef3b48d3fb8a69b2eb5cb8d6459c409e1defd0 | /sparta/test/Parameter/Param_test.cpp | 3cedeebe4e23aeac273fc145256cbdd47c5f4c6d | [
"MIT"
] | permissive | criusx/map | a2bf62ad2e67cdf23d2eeb1151315b342ef132e3 | 7a934d1721ac1257503f7f324b54eb898750ab0d | refs/heads/master | 2020-12-04T06:08:25.537385 | 2019-12-30T15:22:35 | 2019-12-30T15:22:35 | 231,648,145 | 0 | 0 | MIT | 2020-01-03T19:03:22 | 2020-01-03T19:03:21 | null | UTF-8 | C++ | false | false | 59,817 | cpp | #include <iostream>
#include <memory>
#include <cstring>
#include "Device.hpp"
#include "sparta/sparta.hpp"
#include "sparta/simulation/Parameter.hpp"
#include "sparta/utils/SpartaAssert.hpp"
#include "sparta/utils/SpartaTester.hpp"
#include "sparta/utils/Printing.hpp"
#include "sparta/simulation/TreeNode.hpp"
#include "sparta/kernel/Scheduler.hpp"
#include "sparta/simulation/Clock.hpp"
#include "sparta/app/Simulation.hpp"
TEST_INIT;
// Test result constants
const uint32_t EXPECTED_NUM_PARAMS = 57;
const uint32_t EXPECTED_BOUND_TYPES = 14;
class ExampleSimulator : public sparta::app::Simulation{
public:
ExampleSimulator() : sparta::app::Simulation("Test_special_params"){}
virtual ~ExampleSimulator(){
getRoot()->enterTeardown();
}
private:
void buildTree_() override{};
void configureTree_() override{};
void bindTree_() override{};
};
int main ()
{
// Typical usage for simulator startup
// 1. Allocate ParameterSetSubclass (with defaults)
// 2. Assign (ownership) to Placeholder DeviceTreeNode
// 4. Populate from config file(s)
// 5. Populate manually (from C++ code)
// 6. Validate params
// 7. Construct Resource (Unit) with params (through factory)
// 8. Delete ParameterSetSubclass
// a. after construction of Resource?
// b. during destruction of DeviceTreeNode
// Instantiation of tree node, scheduler and clock.
std::unique_ptr<ExampleSimulator> sim(new ExampleSimulator);
// Get root of device tree
auto rtn = sim->getRoot();
// Attach two children node to root
sparta::TreeNode node_1(rtn, "node_1", "Left node of root");
sparta::TreeNode node_2(rtn, "node_2", "Right node of root");
// Specific Parameter Set for root node
std::unique_ptr<SampleDevice::SampleDeviceParameterSet>
sps(new SampleDevice::SampleDeviceParameterSet(rtn));
// Specific Parameter Set for root left child
std::unique_ptr<SampleDevice::SampleDeviceParameterSet>
sps_left(new SampleDevice::SampleDeviceParameterSet(&node_1));
// Specific Parameter Set for root right child
std::unique_ptr<SampleDevice::SampleDeviceParameterSet>
sps_right(new SampleDevice::SampleDeviceParameterSet(&node_2));
sim->buildTree();
sim->configureTree();
// Generic Parameter Set
sparta::ParameterSet* gps = sps.get();
// ParameterSet members (generic)
std::cout << "gps: " << gps->getName() << " " << gps->getNumParameters() << " params" << std::endl;
EXPECT_TRUE(gps->getName() == "params");
EXPECT_TRUE(gps->getNumParameters() == EXPECTED_NUM_PARAMS); // From SampleDeviceParameterSet class and base class(es)
EXPECT_NOTHROW(gps->getParameter("length"));
EXPECT_TRUE(gps->hasParameter("length"));
// ParameterSet members (specific)
std::cout << "sps: " << sps->getName() << " " << sps->getNumParameters() << " params" << std::endl;
EXPECT_TRUE(sps->getName() == "params");
EXPECT_NOTHROW(sps->getParameter("length"));
EXPECT_TRUE(sps->hasParameter("length"));
EXPECT_NOTHROW(sps->getParameter("dummy_locked_var"));
EXPECT_TRUE(sps->hasParameter("dummy_locked_var"));
EXPECT_TRUE(sps->getNumParameters() == EXPECTED_NUM_PARAMS); // From SampleDeviceParameterSet class and base class(es)
// Don't got changing the structure of key value pairs without updating this test
EXPECT_TRUE(sps->getNumBoundTypes() == EXPECTED_BOUND_TYPES);
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Test locked parameter///////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
EXPECT_NOTHROW(sps->getParameter("dummy_locked_var"));
EXPECT_TRUE(sps->hasParameter("dummy_locked_var"));
EXPECT_NOTHROW(sps_left->getParameter("dummy_locked_var"));
EXPECT_TRUE(sps_left->hasParameter("dummy_locked_var"));
EXPECT_NOTHROW(sps_right->getParameter("dummy_locked_var"));
EXPECT_TRUE(sps_right->hasParameter("dummy_locked_var"));
// Test read and write of locked parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing locked parameters of root
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 0u);
std::cout << sps->dummy_locked_var << std::endl;
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps->dummy_locked_var, 0x03); // This is a parameter read.
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 1u); // Should increment read count
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_locked_var.setValueFromString("0x0A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x0A);
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 1u);
std::cout << (sps->dummy_locked_var == 0x0A) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 2u);
EXPECT_EQUAL(sps->dummy_locked_var, 0x0A); // Should increment read count during parameter read
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 3u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_locked_var.setValueFromString("0x0F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x0F);
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 1u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_locked_var.setValueFromString("0x1A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x1A);
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 1u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_locked_var.setValueFromString("0x18")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x18);
EXPECT_EQUAL(sps->dummy_locked_var.getReadCount(), 1u);
// Test read and write of locked parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing locked parameters of root left child
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 0u);
std::cout << sps_left->dummy_locked_var << std::endl;
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x03); // This is a parameter read.
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 1u); // Should increment read count
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_locked_var.setValueFromString("0x0B")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x0B);
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 1u);
std::cout << (sps_left->dummy_locked_var == 0x0B) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 2u);
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x0B); // Should increment read count during parameter read
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 3u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_locked_var.setValueFromString("0x2F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x2F);
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 1u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_locked_var.setValueFromString("0x1D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x1D);
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 1u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_locked_var.setValueFromString("0x10")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x10);
EXPECT_EQUAL(sps_left->dummy_locked_var.getReadCount(), 1u);
// Test read and write of locked parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing locked parameters of root right child
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 0u);
std::cout << sps_right->dummy_locked_var << std::endl;
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x03); // This is a parameter read.
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 1u); // Should increment read count
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_locked_var.setValueFromString("0x0FF")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x0FF);
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 1u);
std::cout << (sps_right->dummy_locked_var == 0x0FF) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 2u);
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x0FF); // Should increment read count during parameter read
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 3u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_locked_var.setValueFromString("0x3C")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x3C);
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 1u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_locked_var.setValueFromString("0x4E")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x4E);
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 1u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_locked_var.setValueFromString("0x18A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x18A);
EXPECT_EQUAL(sps_right->dummy_locked_var.getReadCount(), 1u);
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Test volatile locked parameter//////////////////////
/////////////////////////////////////////////////////////////////////////////////////
EXPECT_NOTHROW(sps->getParameter("dummy_locked_var_2"));
EXPECT_TRUE(sps->hasParameter("dummy_locked_var_2"));
EXPECT_NOTHROW(sps_left->getParameter("dummy_locked_var_2"));
EXPECT_TRUE(sps_left->hasParameter("dummy_locked_var_2"));
EXPECT_NOTHROW(sps_right->getParameter("dummy_locked_var_2"));
EXPECT_TRUE(sps_right->hasParameter("dummy_locked_var_2"));
// Test read and write of locked parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Test volatile locked parameters of root
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 0u);
std::cout << sps->dummy_locked_var_2 << std::endl;
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x00); // This is a parameter read.
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 1u); // Should increment read count
EXPECT_NOTHROW(sps->dummy_locked_var_2.setValueFromString("0x0B")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x0B);
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 1u); // Setting values resets read count.
std::cout << (sps->dummy_locked_var_2 == 0x0B) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 2u);
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x0B); // Should increment read count during parameter read
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 3u);
EXPECT_NOTHROW(sps->dummy_locked_var_2.setValueFromString("0x2F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x2F);
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 1u);
EXPECT_NOTHROW(sps->dummy_locked_var_2.setValueFromString("0x16")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x16);
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 1u);
EXPECT_NOTHROW(sps->dummy_locked_var_2.setValueFromString("0x8A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x8A);
EXPECT_EQUAL(sps->dummy_locked_var_2.getReadCount(), 1u);
// Test read and write of locked parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Test volatile locked parameters of root left child
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 0u);
std::cout << sps_left->dummy_locked_var_2 << std::endl;
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x00); // This is a parameter read.
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 1u); // Should increment read count
EXPECT_NOTHROW(sps_left->dummy_locked_var_2.setValueFromString("0x1E")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x1E);
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 1u); // Setting values resets read count.
std::cout << (sps_left->dummy_locked_var_2 == 0x1E) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 2u);
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x1E); // Should increment read count during parameter read
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 3u);
EXPECT_NOTHROW(sps_left->dummy_locked_var_2.setValueFromString("0x2A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x2A);
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 1u);
EXPECT_NOTHROW(sps_left->dummy_locked_var_2.setValueFromString("0x16A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x16A);
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 1u);
EXPECT_NOTHROW(sps_left->dummy_locked_var_2.setValueFromString("0x8AC")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x8AC);
EXPECT_EQUAL(sps_left->dummy_locked_var_2.getReadCount(), 1u);
// Test read and write of locked parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Test volatile locked parameters of root right child
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 0u);
std::cout << sps_right->dummy_locked_var_2 << std::endl;
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x00); // This is a parameter read.
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 1u); // Should increment read count
EXPECT_NOTHROW(sps_right->dummy_locked_var_2.setValueFromString("0xCB")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0xCB);
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 1u); // Setting values resets read count.
std::cout << (sps_right->dummy_locked_var_2 == 0xCB) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 2u);
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0xCB); // Should increment read count during parameter read
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 3u);
EXPECT_NOTHROW(sps_right->dummy_locked_var_2.setValueFromString("0x2FA")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x2FA);
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 1u);
EXPECT_NOTHROW(sps_right->dummy_locked_var_2.setValueFromString("0x26A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x26A);
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 1u);
EXPECT_NOTHROW(sps_right->dummy_locked_var_2.setValueFromString("0x8AA")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x8AA);
EXPECT_EQUAL(sps_right->dummy_locked_var_2.getReadCount(), 1u);
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Test hidden parameter///////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
EXPECT_NOTHROW(sps->getParameter("dummy_hidden_var"));
EXPECT_TRUE(sps->hasParameter("dummy_hidden_var"));
EXPECT_NOTHROW(sps_left->getParameter("dummy_hidden_var"));
EXPECT_TRUE(sps_left->hasParameter("dummy_hidden_var"));
EXPECT_NOTHROW(sps_right->getParameter("dummy_hidden_var"));
EXPECT_TRUE(sps_right->hasParameter("dummy_hidden_var"));
// Test read and write of hidden parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing hidden parameters of root
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 0u);
std::cout << sps->dummy_hidden_var << std::endl;
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps->dummy_hidden_var, 0xA3); // This is a parameter read.
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 1u); // Should increment read count
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var.setValueFromString("0x0A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var, 0x0A);
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 1u);
std::cout << (sps->dummy_hidden_var == 0x0A) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 2u);
EXPECT_EQUAL(sps->dummy_hidden_var, 0x0A); // Should increment read count during parameter read
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 3u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var.setValueFromString("0x0F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var, 0x0F);
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 1u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var.setValueFromString("0x1A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var, 0x1A);
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 1u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var.setValueFromString("0x18")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var, 0x18);
EXPECT_EQUAL(sps->dummy_hidden_var.getReadCount(), 1u);
// Test read and write of hidden parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing hidden parameters of root left child
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 0u);
std::cout << sps_left->dummy_hidden_var << std::endl;
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0xA3); // This is a parameter read.
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 1u); // Should increment read count
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var.setValueFromString("0x0B")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x0B);
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 1u);
std::cout << (sps_left->dummy_hidden_var == 0x0B) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 2u);
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x0B); // Should increment read count during parameter read
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 3u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var.setValueFromString("0x2F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x2F);
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 1u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var.setValueFromString("0x1D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x1D);
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 1u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var.setValueFromString("0x10")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x10);
EXPECT_EQUAL(sps_left->dummy_hidden_var.getReadCount(), 1u);
// Test read and write of hidden parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing hidden parameters of root right child
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 0u);
std::cout << sps_right->dummy_hidden_var << std::endl;
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0xA3); // This is a parameter read.
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 1u); // Should increment read count
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var.setValueFromString("0x0FF")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x0FF);
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 1u);
std::cout << (sps_right->dummy_hidden_var == 0x0FF) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 2u);
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x0FF); // Should increment read count during parameter read
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 3u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var.setValueFromString("0x3C")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x3C);
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 1u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var.setValueFromString("0x4E")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x4E);
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 1u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var.setValueFromString("0x18A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x18A);
EXPECT_EQUAL(sps_right->dummy_hidden_var.getReadCount(), 1u);
// Test to see that hidden parameters show up in dump list of parameters before lockdown phase is applied
auto sps_param_list = sps->dumpList();
auto sps_left_param_list = sps_left->dumpList();
auto sps_right_param_list = sps_right->dumpList();
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var_2"), std::string::npos);
EXPECT_NOTEQUAL(sps_left_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_left_param_list.find("dummy_hidden_var_2"), std::string::npos);
EXPECT_NOTEQUAL(sps_right_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_right_param_list.find("dummy_hidden_var_2"), std::string::npos);
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Test volatile hidden parameter//////////////////////
/////////////////////////////////////////////////////////////////////////////////////
EXPECT_NOTHROW(sps->getParameter("dummy_hidden_var_2"));
EXPECT_TRUE(sps->hasParameter("dummy_hidden_var_2"));
EXPECT_NOTHROW(sps_left->getParameter("dummy_hidden_var_2"));
EXPECT_TRUE(sps_left->hasParameter("dummy_hidden_var_2"));
EXPECT_NOTHROW(sps_right->getParameter("dummy_hidden_var_2"));
EXPECT_TRUE(sps_right->hasParameter("dummy_hidden_var_2"));
// Test read and write of hidden parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing hidden parameters of root
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 0u);
std::cout << sps->dummy_hidden_var_2 << std::endl;
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0xA4); // This is a parameter read.
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 1u); // Should increment read count
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var_2.setValueFromString("0x0A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x0A);
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 1u);
std::cout << (sps->dummy_hidden_var_2 == 0x0A) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 2u);
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x0A); // Should increment read count during parameter read
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 3u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var_2.setValueFromString("0x0F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x0F);
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 1u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var_2.setValueFromString("0x1A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x1A);
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 1u);
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var_2.setValueFromString("0x18")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x18);
EXPECT_EQUAL(sps->dummy_hidden_var_2.getReadCount(), 1u);
// Test read and write of hidden parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing hidden parameters of root left child
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 0u);
std::cout << sps_left->dummy_hidden_var_2 << std::endl;
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0xA4); // This is a parameter read.
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 1u); // Should increment read count
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var_2.setValueFromString("0x0B")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x0B);
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 1u);
std::cout << (sps_left->dummy_hidden_var_2 == 0x0B) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 2u);
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x0B); // Should increment read count during parameter read
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 3u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var_2.setValueFromString("0x2F")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x2F);
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 1u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var_2.setValueFromString("0x1D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x1D);
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 1u);
sps_left->resetReadCounts();
EXPECT_NOTHROW(sps_left->dummy_hidden_var_2.setValueFromString("0x10")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x10);
EXPECT_EQUAL(sps_left->dummy_hidden_var_2.getReadCount(), 1u);
// Test read and write of hidden parameter. This will happen as many times as the modeler
// wishes till the parameter lockdown phase is not applied.
// Testing hidden parameters of root right child
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 0u);
std::cout << sps_right->dummy_hidden_var_2 << std::endl;
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 0u); // Should not be incremented in cout above
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0xA4); // This is a parameter read.
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 1u); // Should increment read count
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var_2.setValueFromString("0x0FF")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x0FF);
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 1u);
std::cout << (sps_right->dummy_hidden_var_2 == 0x0FF) << std::endl; // Should increment read count during comparison
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 2u);
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x0FF); // Should increment read count during parameter read
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 3u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var_2.setValueFromString("0x3C")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x3C);
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 1u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var_2.setValueFromString("0x4E")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x4E);
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 1u);
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var_2.setValueFromString("0x18A")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x18A);
EXPECT_EQUAL(sps_right->dummy_hidden_var_2.getReadCount(), 1u);
// Test to see that hidden parameters show up in dump list of parameters before lockdown phase is applied
sps_param_list = sps->dumpList();
sps_left_param_list = sps_left->dumpList();
sps_right_param_list = sps_right->dumpList();
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var_2"), std::string::npos);
EXPECT_NOTEQUAL(sps_left_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_left_param_list.find("dummy_hidden_var_2"), std::string::npos);
EXPECT_NOTEQUAL(sps_right_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_right_param_list.find("dummy_hidden_var_2"), std::string::npos);
// Important point to note:
// Here the Simulation class is explicitly calling to lockdown all LOCKED_PARAMETERS and
// and HIDDEN_PARAMETERS. After this phase, LOCKED_PARAMETERS cannot be overwritten anymore
// and HIDDEN_PARAMETERS are also locked as well as hidden from printouts, dumps.
// Point to note is this lock-down phase has no effect on regular parameters and they can still
// be overwritten multiple times till Tree Finalize phase comes. Only if the ParameterSet has any
// LOCKED/HIDDEN parameters, this phase would actually do something different. Otherwise, this
// phase is a no-op.
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Tree Node 1 Lockdown////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
sim->getRoot()->getChild("node_1")->lockdownParameters();
// Locked and volatile locked parameters of node_1 subtree cannot be set anymore after Lockdown phase
EXPECT_THROW(sps_left->dummy_locked_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x10);
EXPECT_THROW(sps_left->dummy_locked_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x8AC);
// Hidden and volatile hidden parameters of node_1 subtree cannot be set anymore after Lockdown phase
EXPECT_THROW(sps_left->dummy_hidden_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x10);
EXPECT_THROW(sps_left->dummy_hidden_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x10);
// Test to see that hidden parameters show up in dump list of parameters after lockdown phase is applied
sps_left_param_list = sps_left->dumpList();
EXPECT_EQUAL(sps_left_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_EQUAL(sps_left_param_list.find("dummy_hidden_var_2"), std::string::npos);
// Since only node_1 has been locked, node_2 can still manipulate its locked parameters
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_locked_var.setValueFromString("0x1C")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x1C);
EXPECT_NOTHROW(sps_right->dummy_locked_var_2.setValueFromString("0x8C")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x8C);
// Since only node_1 has been locked, node_2 can still manipulate its hidden parameters
sps_right->resetReadCounts();
EXPECT_NOTHROW(sps_right->dummy_hidden_var.setValueFromString("0x11")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x11);
EXPECT_NOTHROW(sps_right->dummy_hidden_var_2.setValueFromString("0x12")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x12);
// Test to see that hidden node_2 parameters show up in dump list of parameters after lockdown phase is applied
sps_right_param_list = sps_right->dumpList();
EXPECT_NOTEQUAL(sps_right_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_right_param_list.find("dummy_hidden_var_2"), std::string::npos);
// Since only node_1 has been locked, root can still manipulate its locked parameters
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_locked_var.setValueFromString("0x1D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x1D);
EXPECT_NOTHROW(sps->dummy_locked_var_2.setValueFromString("0x8D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x8D);
// Since only node_1 has been locked, root can still manipulate its hidden parameters
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_hidden_var.setValueFromString("0x1D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var, 0x1D);
EXPECT_NOTHROW(sps->dummy_hidden_var_2.setValueFromString("0x8D")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x8D);
// Test to see that hidden root parameters show up in dump list of parameters after lockdown phase is applied
sps_param_list = sps->dumpList();
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var_2"), std::string::npos);
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Tree Node 2 Lockdown////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
sim->getRoot()->getChild("node_2")->lockdownParameters();
// Locked and volatile locked parameters of node_1 subtree(locked) cannot be set
EXPECT_THROW(sps_left->dummy_locked_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x10);
EXPECT_THROW(sps_left->dummy_locked_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x8AC);
// Hidden and volatile hidden parameters of node_1 subtree cannot be set anymore after Lockdown phase
EXPECT_THROW(sps_left->dummy_hidden_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var, 0x10);
EXPECT_THROW(sps_left->dummy_hidden_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_hidden_var_2, 0x10);
// Test to see that hidden node_1 parameters show up in dump list of parameters after lockdown phase is applied
sps_left_param_list = sps_left->dumpList();
EXPECT_EQUAL(sps_left_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_EQUAL(sps_left_param_list.find("dummy_hidden_var_2"), std::string::npos);
// Locked and volatile locked parameters of node_2 subtree cannot be set anymore after lockdown phase
EXPECT_THROW(sps_right->dummy_locked_var.setValueFromString("0x8C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x1C);
EXPECT_THROW(sps_right->dummy_locked_var_2.setValueFromString("0x28C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x8C);
// Hidden and volatile hidden parameters of node_2 subtree cannot be set anymore after Lockdown phase
EXPECT_THROW(sps_right->dummy_hidden_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var, 0x11);
EXPECT_THROW(sps_right->dummy_hidden_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_hidden_var_2, 0x12);
// Test to see that hidden parameters show up in dump list of parameters after lockdown phase is applied
sps_right_param_list = sps_right->dumpList();
EXPECT_EQUAL(sps_right_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_EQUAL(sps_right_param_list.find("dummy_hidden_var_2"), std::string::npos);
// Since only node_1 and node_2 has been locked, root can still manipulate its locked parameters
sps->resetReadCounts();
EXPECT_NOTHROW(sps->dummy_locked_var.setValueFromString("0x1DE")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x1DE);
EXPECT_NOTHROW(sps->dummy_locked_var_2.setValueFromString("0x8DA")); // Should allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x8DA);
// Test to see that hidden root parameters show up in dump list of parameters after lockdown phase is applied
sps_param_list = sps->dumpList();
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_NOTEQUAL(sps_param_list.find("dummy_hidden_var_2"), std::string::npos);
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Root Node Lockdown//////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
sim->getRoot()->lockdownParameters();
// Locked and volatile locked parameters of node_1 subtree(locked) cannot be set
EXPECT_THROW(sps_left->dummy_locked_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var, 0x10);
EXPECT_THROW(sps_left->dummy_locked_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_left->dummy_locked_var_2, 0x8AC);
// Locked and volatile locked parameters of node_2 subtree cannot be set anymore after lockdown phase
EXPECT_THROW(sps_right->dummy_locked_var.setValueFromString("0x8C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var, 0x1C);
EXPECT_THROW(sps_right->dummy_locked_var_2.setValueFromString("0x28C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps_right->dummy_locked_var_2, 0x8C);
// Locked and volatile locked parameters of root can no longer be manipulated
EXPECT_THROW(sps->dummy_locked_var.setValueFromString("0x1B")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var, 0x1DE);
EXPECT_THROW(sps->dummy_locked_var_2.setValueFromString("0xAA")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_locked_var_2, 0x8DA);
// Hidden and volatile hidden parameters of root subtree cannot be set anymore after Lockdown phase
EXPECT_THROW(sps->dummy_hidden_var.setValueFromString("0x0C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var, 0x1D);
EXPECT_THROW(sps->dummy_hidden_var_2.setValueFromString("0x7C")); // Should not allow pre-lockdown phase
EXPECT_EQUAL(sps->dummy_hidden_var_2, 0x8D);
// Test to see that hidden root parameters show up in dump list of parameters after lockdown phase is applied
sps_param_list = sps->dumpList();
EXPECT_EQUAL(sps_param_list.find("dummy_hidden_var"), std::string::npos);
EXPECT_EQUAL(sps_param_list.find("dummy_hidden_var_2"), std::string::npos);
// Regular parameters can still be configured till TREE_FINALIZE.
sps->resetReadCounts();
EXPECT_THROW(sps->verifyAllRead()); // None of them read
EXPECT_EQUAL(sps->length.getReadCount(), 0u);
sps->length.ignore(); // Increment read count
EXPECT_TRUE(sps->length.isIgnored());
EXPECT_EQUAL(sps->length.getReadCount(), 0u);
EXPECT_EQUAL(sps->test_bool.getReadCount(), 0u);
EXPECT_THROW(sps->verifyAllRead()); // Not all of them read
EXPECT_EQUAL(sps->length.getReadCount(), 0u); // still one
sps->ignoreAll();
EXPECT_NOTHROW(sps->verifyAllRead());
EXPECT_EQUAL(sps->length.getReadCount(), 0u);
EXPECT_EQUAL(sps->length.isIgnored(), true);
EXPECT_EQUAL(sps->test_bool.getReadCount(), 0u);
EXPECT_EQUAL(sps->test_bool.isIgnored(), true);
std::cout << sps->length << std::endl;
std::cout << (sps->length == 10) << std::endl; // Should increment during comparison
EXPECT_EQUAL(sps->length.getReadCount(), 1u); // Should not be incremented in cout above
sps->length.getNumValues(); // Should not increment read count because this is scalar
EXPECT_EQUAL(sps->length.getReadCount(), 1u); // Should not be incremented in cout above
EXPECT_EQUAL(sps->test_boolvec.getReadCount(), 0u);
sps->test_boolvec.getNumValues(); // SHOULD increment read count because this is a vector
EXPECT_EQUAL(sps->test_boolvec.getReadCount(), 1u);
EXPECT_EQUAL(sps->myenum.getReadCount(), 0u);
EXPECT_EQUAL(sps->myenum.isIgnored(), true);
// Individual parameters
std::cout << sps->length << " "
<< sps->length.getName() << " "
<< sps->length.getDesc() << " "
<< sps->length.getDefault() << " "
<< sps->length.getTypeName() << " "
<< std::endl;
// Look at type of structured parameters
std::cout << sps->test_stringvecvec << " "
<< sps->test_stringvecvec.getName() << " "
<< sps->test_stringvecvec.getDesc() << " "
<< sps->test_stringvecvec.getDefault() << " "
<< sps->test_stringvecvec.getTypeName() << " "
<< std::endl;
// Check dimensions of vector and non-vector types
EXPECT_EQUAL(sps->test_stringvecvec.getDimensionality(), 2);
EXPECT_EQUAL(sps->test_stringvecvec.getVectorSizeAt({}), 4);
EXPECT_EQUAL(sps->test_stringvecvec.getVectorSizeAt({0}), 1);
EXPECT_EQUAL(sps->test_stringvecvec.getItemValueFromString({0,0}), "1");
EXPECT_THROW(sps->test_stringvecvec.getItemValueFromString({0,1})); // Too deep
EXPECT_EQUAL(sps->test_stringvecvec.getVectorSizeAt({1}), 2);
EXPECT_EQUAL(sps->test_stringvecvec.getItemValueFromString({1,0}), "2");
EXPECT_EQUAL(sps->test_stringvecvec.getItemValueFromString({1,1}), "3");
EXPECT_THROW(sps->test_stringvecvec.getItemValueFromString({1,2})); // Too deep
EXPECT_EQUAL(sps->test_stringvecvec.getVectorSizeAt({2}), 3);
EXPECT_EQUAL(sps->test_stringvecvec.getItemValueFromString({2,0}), "4");
EXPECT_EQUAL(sps->test_stringvecvec.getItemValueFromString({2,1}), "5");
EXPECT_EQUAL(sps->test_stringvecvec.getItemValueFromString({2,2}), "6");
EXPECT_THROW(sps->test_stringvecvec.getItemValueFromString({2,3})); // Too deep
EXPECT_EQUAL(sps->test_stringvecvec.getVectorSizeAt({3}), 0);
EXPECT_THROW(sps->test_stringvecvec.getItemValueFromString({3,0})); // Too deep
EXPECT_EQUAL(sps->length.getDimensionality(), 0);
EXPECT_EQUAL(sps->test_boolvec.getDimensionality(), 1);
EXPECT_EQUAL(sps->test_stringvec.getDimensionality(), 1);
bool sca_bool = false;
int32_t sca_int32 = 0;
uint32_t sca_uint32 = 0;
int64_t sca_int64 = 0;
uint64_t sca_uint64 = 0;
double sca_double = 0.0;
std::string sca_string;
std::string sca_charptr;
std::vector<bool> vec_bool;
std::vector<int32_t> vec_int32;
std::vector<uint32_t> vec_uint32;
std::vector<int64_t> vec_int64;
std::vector<uint64_t> vec_uint64;
std::vector<double> vec_double;
std::vector<std::string> vec_string;
bool tmp_bool = false;
EXPECT_NOTHROW(sca_bool = sps->test_bool);
EXPECT_TRUE(sca_bool == true);
EXPECT_EQUAL(sps->test_bool, true);
EXPECT_EQUAL(gps->getParameterValueAs<bool>("test_bool"), true);
EXPECT_EQUAL(gps->getParameter("test_bool")->getValueAs<bool>(), true);
EXPECT_THROW(gps->getParameter("test_bool")->getValueAs<uint32_t>());
EXPECT_NOTHROW(sca_int32 = sps->test_int32);
EXPECT_TRUE(sca_int32 == -1);
EXPECT_EQUAL(sps->test_int32, -1);
EXPECT_EQUAL(gps->getParameterValueAs<int32_t>("test_int32"), -1);
EXPECT_EQUAL(gps->getParameter("test_int32")->getValueAs<int32_t>(), -1);
EXPECT_NOTHROW(sca_uint32 = sps->test_uint32);
EXPECT_TRUE(sca_uint32 == 2);
EXPECT_EQUAL(sps->test_uint32, 2);
EXPECT_EQUAL(gps->getParameterValueAs<uint32_t>("test_uint32"), 2);
EXPECT_EQUAL(gps->getParameter("test_uint32")->getValueAs<uint32_t>(), 2);
EXPECT_NOTHROW(sca_int64 = sps->test_int64);
EXPECT_TRUE(sca_int64 == -3);
EXPECT_NOTHROW(sca_uint64 = sps->test_uint64);
EXPECT_TRUE(sca_uint64 == 4);
EXPECT_NOTHROW(sca_double = sps->test_double);
EXPECT_TRUE(sca_double == 5.6);
// TODO: Support string copy constrctor.
EXPECT_NOTHROW(sca_string = sps->test_string);
EXPECT_NOTHROW(sca_string = sps->test_string.getValue());
EXPECT_TRUE(sca_string == "this is a test string");
EXPECT_TRUE(sps->test_string == "this is a test string");
EXPECT_NOTHROW((void)((std::string)sps->test_string == "this is a test string"));
EXPECT_NOTHROW( EXPECT_EQUAL(gps->getParameterValueAs<std::string>("test_string"), "this is a test string") );
EXPECT_THROW(gps->getParameterValueAs<std::string>("this does not exist and is an invalid name anyway"));
EXPECT_THROW(gps->getParameterValueAs<uint32_t>("test_string"));
EXPECT_NOTHROW(vec_bool = sps->test_boolvec.getValue());
EXPECT_NOTHROW(vec_bool = sps->test_boolvec);
EXPECT_TRUE(sps->test_boolvec == std::vector<bool>({false, false, true, true, false, true})); // Parameter Write after read
EXPECT_NOTHROW(vec_bool = (std::vector<bool>)sps->test_boolvec);
EXPECT_EQUAL(sps->myenum, MY_ENUM_DEFAULT);
sps->myenum.setValueFromString("0"); // Parameter Write after read
EXPECT_EQUAL(sps->myenum, MY_ENUM_DEFAULT);
sps->myenum.setValueFromString("1");
EXPECT_EQUAL(sps->myenum, MY_ENUM_OTHER);
EXPECT_THROW(sps->myenum.setValueFromString("2"));
EXPECT_EQUAL(sps->myenum.getTypeName(), "MyEnum");
EXPECT_NOTHROW(vec_int32 = sps->test_int32vec.getValue());
EXPECT_NOTHROW(vec_int32 = sps->test_int32vec);
EXPECT_NOTHROW(vec_uint32 = sps->test_uint32vec.getValue());
EXPECT_NOTHROW(vec_uint32 = sps->test_uint32vec);
EXPECT_NOTHROW(vec_int64 = sps->test_int64vec.getValue());
EXPECT_NOTHROW(vec_int64 = sps->test_int64vec);
EXPECT_NOTHROW(vec_uint64 = sps->test_uint64vec.getValue());
EXPECT_NOTHROW(vec_uint64 = sps->test_uint64vec);
EXPECT_NOTHROW(vec_double = sps->test_doublevec.getValue());
EXPECT_NOTHROW(vec_double = sps->test_doublevec);
EXPECT_NOTHROW(vec_double = (std::vector<double>)sps->test_doublevec);
EXPECT_NOTHROW(vec_string = sps->test_stringvec.getValue());
EXPECT_NOTHROW(vec_string = sps->test_stringvec);
EXPECT_NOTHROW(vec_string = (std::vector<std::string>)sps->test_stringvec);
// Getting Parameters
sparta::ParameterBase const * p = gps->getParameter("length");
std::cout << *p << " "
<< p->getName() << " "
<< p->getDesc() << " "
<< p->getTypeName() << " "
<< std::endl;
// Finding Parameters by pattern
std::vector<sparta::ParameterBase*> result1;
result1.clear();
EXPECT_EQUAL((gps->findParameters("length", result1)), 1u);
EXPECT_EQUAL(result1.size(), (size_t)1);
std::cout << "result of search for \"length\": " << result1 << std::endl << std::endl;
result1.clear();
EXPECT_EQUAL((gps->findParameters("lengt*", result1)), 1u);
EXPECT_EQUAL(result1.size(), (size_t)1);
std::cout << "result of search for \"lengt*\": " << result1 << std::endl << std::endl;
result1.clear();
EXPECT_EQUAL((gps->findParameters("test_*", result1)), 15u);
EXPECT_EQUAL(result1.size(), (size_t)15);
std::cout << "result of search for \"test_*\": " << result1 << std::endl << std::endl;
result1.clear();
EXPECT_EQUAL((gps->findParameters("*st_*", result1)), 15u);
EXPECT_EQUAL(result1.size(), (size_t)15);
std::cout << "result of search for \"*st_*\": " << result1 << std::endl << std::endl;
result1.clear();
EXPECT_EQUAL((gps->findParameters("*st_*vec", result1)), 8u);
EXPECT_EQUAL(result1.size(), (size_t)8);
std::cout << "result of search for \"*st_*vec\": " << result1 << std::endl << std::endl;
result1.clear();
EXPECT_EQUAL((gps->findParameters("*64vec", result1)), 2u);
EXPECT_EQUAL(result1.size(), (size_t)2);
std::cout << "result of search for \"*64vec\": " << result1 << std::endl << std::endl;
result1.clear();
EXPECT_EQUAL((gps->findParameters("*", result1)), (uint32_t)EXPECTED_NUM_PARAMS);
EXPECT_EQUAL(result1.size(), (size_t)EXPECTED_NUM_PARAMS);
std::cout << "result of search for \"*\": " << result1 << std::endl << std::endl;
// Down into all params, then up from each, then search for "length"
// Algorithm will find a "legnth" through each path, so set will be
// N "length" parameters where N is the total number of parameters in
// this parameter set.
result1.clear();
EXPECT_EQUAL((gps->findParameters("*..length", result1)), (uint32_t)EXPECTED_NUM_PARAMS);
EXPECT_EQUAL(result1.size(), (size_t)EXPECTED_NUM_PARAMS);
std::cout << "result of search for \"*..length\": " << result1 << std::endl << std::endl;
// Down into all params, then up from each, then search for test_*.
// Result count should be total params multiplied by number of params
// beginning with test_
result1.clear();
EXPECT_EQUAL((gps->findParameters("*..test_*", result1)), (uint32_t)EXPECTED_NUM_PARAMS * 15);
EXPECT_EQUAL(result1.size(), (size_t)EXPECTED_NUM_PARAMS * 15);
std::cout << "result of search for \"*..test_*\": " << result1 << std::endl << std::endl;
// Will find test_int64, test_uint64, test_int64vec, and test_uint64vec
result1.clear();
EXPECT_EQUAL((gps->findParameters("test_?int64*", result1)), (uint32_t)4);
EXPECT_EQUAL(result1.size(), (size_t)4);
std::cout << "result of search for \"test_?int64*\": " << result1 << std::endl << std::endl;
// Will find test_uint64vec
result1.clear();
EXPECT_EQUAL((gps->findParameters("test_+int64+", result1)), (uint32_t)1);
EXPECT_EQUAL(result1.size(), (size_t)1);
std::cout << "result of search for \"test_+int64+\": " << result1 << std::endl << std::endl;
// Will find test_uint64vec
result1.clear();
EXPECT_EQUAL((gps->findParameters("*st_uint64+", result1)), (uint32_t)1);
EXPECT_EQUAL(result1.size(), (size_t)1);
std::cout << "result of search for \"*st_uint64+\": " << result1 << std::endl << std::endl;
// Scalar type modification
tmp_bool = !sps->test_bool;
sps->test_bool = tmp_bool; // Write after read
sps->test_bool = !sps->test_bool;
std::cout << sca_bool << std::endl;
std::cout << sca_int32 << std::endl;
std::cout << sca_uint32 << std::endl;
std::cout << sca_int64 << std::endl;
std::cout << sca_uint64 << std::endl;
std::cout << sca_double << std::endl;
std::cout << sca_string << std::endl;
std::cout << sps->test_bool << std::endl;
std::cout << sps->test_int32 << std::endl;
std::cout << sps->test_uint32 << std::endl;
std::cout << sps->test_int64 << std::endl;
std::cout << sps->test_uint64 << std::endl;
std::cout << sps->test_double << std::endl;
std::cout << sps->test_string << std::endl;
// Vector type printing
std::cout << vec_bool << std::endl;
std::cout << vec_int32 << std::endl;
std::cout << vec_uint32 << std::endl;
std::cout << vec_int64 << std::endl;
std::cout << vec_uint64 << std::endl;
std::cout << vec_double << std::endl;
std::cout << vec_string << std::endl;
std::cout << sps->test_boolvec << std::endl;
std::cout << sps->test_int32vec << std::endl;
std::cout << sps->test_uint32vec << std::endl;
std::cout << sps->test_int64vec << std::endl;
std::cout << sps->test_uint64vec << std::endl;
std::cout << sps->test_doublevec << std::endl;
std::cout << sps->test_stringvec << std::endl;
// Check quoting of strings
std::cout << "String quoting:" << std::endl;
// Scalar string:
std::cout << "Original: " << sps->test_string.getValueAsString() << std::endl;
auto old = sps->test_string.setStringQuote("'");
std::cout << "Quoted: " << sps->test_string.getValueAsString() << std::endl;
sps->test_string.setStringQuote(old);
std::cout << "Original (again): " << sps->test_string.getValueAsString() << std::endl;
// Vector string:
std::cout << "Original: " << sps->test_stringvec.getValueAsString() << std::endl;
old = sps->test_stringvec.setStringQuote("'");
std::cout << "Quoted: " << sps->test_stringvec.getValueAsString() << std::endl;
sps->test_stringvec.setStringQuote(old);
std::cout << "Original (again): " << sps->test_stringvec.getValueAsString() << std::endl;
// Vector of vectors of strings:
std::cout << "Original: " << sps->test_stringvecvec.getValueAsString() << std::endl;
old = sps->test_stringvecvec.setStringQuote("%%");
std::cout << "Quoted: " << sps->test_stringvecvec.getValueAsString() << std::endl;
sps->test_stringvecvec.setStringQuote(old);
std::cout << "Original (again): " << sps->test_stringvecvec.getValueAsString() << std::endl;
// Introspection
// Iterate all names (parameters)
std::cout << "Names:";
for(const std::string& n : gps->getNames()){
std::cout << " " << n;
}
std::cout << std::endl << std::endl;
// Iteration
// Generally, iteration should only be done on the generic parameter set
// since subclasses can hide iteration member [functions] like 'begin', 'end', etc.
// Iterate with preincrement
std::cout << "Params (preinc):";
sparta::ParameterSet::iterator itr;
for(itr = gps->begin(); itr != gps->end(); ++itr){
std::cout << " " << *(*itr);
}
std::cout << std::endl << std::endl;
// Iterate with postincrement
std::cout << "Params (postinc):";
sparta::ParameterSet::iterator itr2;
for(itr2 = gps->begin(); itr2 != gps->end(); itr2++){
std::cout << " " << *(*itr2);
}
std::cout << std::endl << std::endl;
// No-Copying allowed
// None of this is legal.
/*SampleDevice::SampleDeviceParameterSet sps_copy("dummy");
sps_copy = *sps;
SampleDevice::SampleDeviceParameterSet sps_copy2(*sps);
sparta::ParmeterSet gps_copy("dummy");
gps_copy = *gps;
sparta::ParameterSet sps_copy2(*gps);
SampleDevice::SampleDeviceParameterSetWithCopyMethods sps_wcm;
SampleDevice::SampleDeviceParameterSetWithCopyMethods sps_wcm_copy;
sps_wcm_copy = sps_wcm;
SampleDevice::SampleDeviceParameterSetWithCopyMethods sps_wcm_copy2(sps_wcm);
*/
// Immediate (indpendent) Validation
std::string sps_errs;
EXPECT_TRUE(sps->validateIndependently(sps_errs));
EXPECT_TRUE(sps_errs == "");
std::cout << sps_errs << std::endl;
std::string gps_errs;
EXPECT_TRUE(gps->validateIndependently(gps_errs));
EXPECT_TRUE(gps_errs == "");
std::cout << gps_errs << std::endl;
// Callback-based (dependent) Validation
sps_errs = "";
EXPECT_TRUE(sps->validateDependencies(0, sps_errs));
EXPECT_TRUE(sps_errs == "");
std::cout << sps_errs << std::endl;
gps_errs = "";
EXPECT_TRUE(gps->validateDependencies(0, gps_errs));
EXPECT_TRUE(gps_errs == "");
std::cout << gps_errs << std::endl;
// Print out parameter sets
std::cout << "Specific ParameterSet:" << std::endl << sps.get() << std::endl << sps->dumpList() << std::endl;
std::cout << "General ParameterSet:" << std::endl << gps << std::endl << sps->dumpList() << std::endl;
std::cout << "Specific ParameterSet for root left child:" << std::endl << sps_left.get() << std::endl << sps_left->dumpList() << std::endl;
std::cout << "Speciifc ParameterSet for root right child:" << std::endl << sps_right.get() << std::endl << sps_right->dumpList() << std::endl;
// Modify the parameters and look for callbacks
EXPECT_TRUE(sps->ypsA_var1 == 1);
EXPECT_TRUE(sps->xpsA_var2 == 2);
sps->zpsA_var0 = 10; // Writing zpsA_var0 will update paA val[1,2]
EXPECT_EQUAL(sps->ypsA_var1, 5);
EXPECT_EQUAL(sps->xpsA_var2, 6);
sps->ypsA_var1 = 10; // Writing zpsA_var1 will update paA val[1,2] (Write after read for both)
EXPECT_EQUAL(sps->ypsA_var1, 10);
EXPECT_EQUAL(sps->xpsA_var2, 8);
// Create Units
DeviceWithParams* d0 = 0;
EXPECT_NOTHROW(d0 = createDevice("dev0", sps.get()));
delete d0;
DeviceWithParams* d1 = 0;
EXPECT_NOTHROW(d1 = createDevice("dev1", dynamic_cast<SampleDevice::SampleDeviceParameterSet*>(gps)));
delete d1;
// Test ParameterBase::equals()
sparta::ParameterBase *test_bool1 = sps->getParameter("test_bool");
sparta::ParameterBase *test_bool2 = sps->getParameter("test_bool");
EXPECT_TRUE(test_bool1->equals(*test_bool2));
sparta::ParameterBase *test_uint32_1 = sps->getParameter("test_uint32");
sparta::ParameterBase *test_uint32_2 = sps->getParameter("test_uint32");
EXPECT_TRUE(test_uint32_1->equals(*test_uint32_2));
sparta::ParameterBase *dummy00 = sps->getParameter("dummy00");
sparta::ParameterBase *dummy01 = sps->getParameter("dummy01");
EXPECT_FALSE(dummy00->equals(*dummy01));
// Done
sim->finalizeTree();
REPORT_ERROR;
return ERROR_CODE;
}
| [
"klingaard@gmail.com"
] | klingaard@gmail.com |
374087bccfec748771848fc7c3c4b04de67c6e56 | ea867ba4cdf3a5fcd867d7ddcd26619a46e82bf5 | /dllist.h | 2230d630b48d02799d39abe44c21014a7ded6ffb | [] | no_license | hazman117/pa-2 | 7ee5895ecda55c0e05fa5c39cf73b214d52966c8 | 0bbd68665df756c4c1520a86d576bc4ee2920778 | refs/heads/master | 2021-01-10T11:36:48.728033 | 2015-10-30T20:21:59 | 2015-10-30T20:21:59 | 45,274,422 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,155 | h | #ifndef __Dllist_h__
#define __Dllist_h__
#include <cstdint>
// this class represents each memory block ... it can be used for representing a
// node in a doubly linked list.
// You wiil have to give 'friend' access to the class that implements the doubly
// linked list, so the pointers can be accessed (adjusted) from outside the class.
class MemBlock {
private:
uint32_t address;
uint32_t size;
MemBlock *nxt;
MemBlock *prv;
public:
MemBlock(uint32_t a, uint32_t s);
~MemBlock();
void shrink_by(uint32_t s);
uint32_t get_addr();
uint32_t get_size();
friend class DLList;
};
class DLList {
private:
MemBlock *head;
MemBlock *tail;
public:
DLList();
~DLList();
void push_back(uint32_t a, uint32_t s);
void insert(uint32_t a, uint32_t s);
void display();
MemBlock *find_first_by_size(uint32_t b);
MemBlock *find_best_by_size(uint32_t b);
void remove(MemBlock *p);
MemBlock *find_by_address(uint32_t a);
int DLList::get_amt();
int DLList::get_add(int b);
};
#endif | [
"bhazard17@gmail.com"
] | bhazard17@gmail.com |
eb12a3e4e73fbab76ff50e729decdfa731bb3152 | 1cb38256ac644d1673ba56d85b04bc2c65a4f160 | /src/components/NodeVisuals.cpp | f5230b265a50b91b265539927ad6304d94ab69d6 | [
"MIT"
] | permissive | Zmorra/REGoth-bs | 4973006af85e52a9650eb7f29847c2b00d889c7a | 8f785ce6ffcd969bee93685236e7cac0e23fafcb | refs/heads/master | 2020-05-16T18:32:00.672185 | 2019-04-24T08:38:15 | 2019-04-24T08:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,517 | cpp | #include "NodeVisuals.hpp"
#include <Components/BsCRenderable.h>
#include <Animation/BsSkeleton.h>
#include <Components/BsCBone.h>
#include <Components/BsCRenderable.h>
#include <Mesh/BsMesh.h>
#include <Scene/BsSceneObject.h>
#include <components/Visual.hpp>
#include <components/VisualStaticMesh.hpp>
namespace REGoth
{
NodeVisuals::NodeVisuals(const bs::HSceneObject& parent)
: bs::Component(parent)
{
}
bool NodeVisuals::hasNode(const bs::String& name) const
{
bs::SPtr<bs::Skeleton> skeleton = getSkeleton();
if (!skeleton) return false;
for (bs::UINT32 i = 0; i < skeleton->getNumBones(); i++)
{
if (skeleton->getBoneInfo(i).name == name) return true;
}
return false;
}
void NodeVisuals::attachVisualToNode(const bs::String& node, const bs::String& visual)
{
clearNodeAttachment(node);
bs::HSceneObject boneSO = bs::SceneObject::create(node);
enum
{
KeepWorldTransform = true,
MoveRelativeToParent = false,
};
boneSO->setParent(SO(), MoveRelativeToParent);
bs::HBone bone = boneSO->addComponent<bs::CBone>();
bone->setBoneName(node);
bool hasCreated = Visual::addToSceneObject(boneSO, visual);
if (!hasCreated)
{
clearNodeAttachment(node);
bs::gDebug().logWarning("[NodeVisuals] Failed to attach visual '" + visual + "' to node '" +
node + "'");
}
}
void NodeVisuals::attachMeshToNode(const bs::String& node, BsZenLib::Res::HMeshWithMaterials mesh)
{
clearNodeAttachment(node);
bs::HSceneObject boneSO = bs::SceneObject::create(node);
enum
{
KeepWorldTransform = true,
MoveRelativeToParent = false,
};
boneSO->setParent(SO(), MoveRelativeToParent);
bs::HBone bone = boneSO->addComponent<bs::CBone>();
bone->setBoneName(node);
bs::HRenderable renderable = boneSO->addComponent<bs::CRenderable>();
renderable->setMesh(mesh->getMesh());
renderable->setMaterials(mesh->getMaterials());
}
void NodeVisuals::clearNodeAttachment(const bs::String& node)
{
bs::HSceneObject bone = SO()->findChild(node);
if (!bone.isDestroyed())
{
bone->destroy();
}
}
bs::SPtr<bs::Skeleton> NodeVisuals::getSkeleton() const
{
bs::HRenderable renderable = SO()->getComponent<bs::CRenderable>();
if (!renderable) return nullptr;
if (!renderable->getMesh()) return nullptr;
return renderable->getMesh()->getSkeleton();
}
} // namespace REGoth
| [
"a.taulien@live.de"
] | a.taulien@live.de |
c1d4800150da765aa4469e735a428f229e8e4a9a | 5ba0d7904565645e37c3c6307dbbda6b7d7cdcda | /proj/IntersectionTest.h | 5bcaf8aa30573258d4e59e56351463a9aa378b9c | [] | no_license | JuncongLin/SketchFusion | 7b867ddb1f9e79e0441eca7daa461f9867ac89e9 | beab0d096a95502a610c5ae94f5c40904c7e47b2 | refs/heads/master | 2020-05-13T14:17:55.003127 | 2019-04-16T06:54:20 | 2019-04-16T06:54:20 | 181,631,004 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 487 | h | #pragma once
#include "Box3.h"
#include "..\OpenGLBasic\Arcball\Vector3d.h"
#include "Triangle3.h"
#include "Point3.h"
#include "Plane.h"
class CIntersectionTest
{
public:
CIntersectionTest(void);
~CIntersectionTest(void);
static bool Box_LineSegment(CBox3 box, const CPoint3& ls,const CPoint3& le,CVector3d org,double dim);
static bool Box_Triangle(CBox3& box, CTriangle3& tri,CVector3d org,double dim);
static bool Box_Plane(CBox3 box, CPlane& plane,CVector3d org,double dim);
};
| [
"jclin@xmu.edu.cn"
] | jclin@xmu.edu.cn |
4dd988560f3032452f25aacf44e79659d29b8953 | 17575d8276d36cf5b32d0b6645fb5dd1b5c0962a | /array-python-cpp/convu.cpp | 545d90849e153c49119b0fe245f3223e3e833c1c | [] | no_license | upul/WhiteBoard | 2f720acc1b1c1e0002f8e0d7842c23707c58debe | e81feb8172add6b893fb4496a590c43f863a0346 | refs/heads/master | 2022-09-26T21:07:25.271461 | 2021-05-13T13:31:27 | 2021-05-13T13:31:27 | 47,049,709 | 8 | 20 | null | 2022-09-23T22:34:42 | 2015-11-29T04:20:21 | Jupyter Notebook | UTF-8 | C++ | false | true | 154,418 | cpp | /* Generated by Cython 0.26.1 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
"convutils.h"
],
"extra_compile_args": [
"-std=c++11",
"-O3"
],
"language": "c++",
"name": "convu",
"sources": [
"convu.pyx",
"convutils.cpp"
]
},
"module_name": "convu"
}
END: Cython Metadata */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_26_1"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
#define __stdcall
#endif
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __fastcall
#define __fastcall
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
#if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
#define HAVE_LONG_LONG
#endif
#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
#define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#undef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 1
#undef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 0
#undef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 0
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#elif defined(PYSTON_VERSION)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#if PY_VERSION_HEX < 0x02070000
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
#define CYTHON_USE_PYTYPE_LOOKUP 1
#endif
#if PY_MAJOR_VERSION < 3
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#if PY_VERSION_HEX < 0x02070000
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#elif !defined(CYTHON_USE_PYLONG_INTERNALS)
#define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#ifndef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 1
#endif
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#if PY_VERSION_HEX < 0x030300F0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#elif !defined(CYTHON_USE_UNICODE_WRITER)
#define CYTHON_USE_UNICODE_WRITER 1
#endif
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#ifndef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 1
#endif
#ifndef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 1
#endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#undef SHIFT
#undef BASE
#undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
#define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
#ifndef METH_FASTCALL
#define METH_FASTCALL 0x80
#endif
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
Py_ssize_t nargs, PyObject *kwnames);
#else
#define __Pyx_PyCFunctionFast _PyCFunctionFast
#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
0 : _PyUnicode_Ready((PyObject *)(op)))
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
#define CYTHON_PEP393_ENABLED 0
#define PyUnicode_1BYTE_KIND 1
#define PyUnicode_2BYTE_KIND 2
#define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
#else
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
#define PyObject_Malloc(s) PyMem_Malloc(s)
#define PyObject_Free(p) PyMem_Free(p)
#define PyObject_Realloc(p) PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
#define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
#else
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
#define PyObject_ASCII(o) PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
#define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
#define PyInt_FromString PyLong_FromString
#define PyInt_FromUnicode PyLong_FromUnicode
#define PyInt_FromLong PyLong_FromLong
#define PyInt_FromSize_t PyLong_FromSize_t
#define PyInt_FromSsize_t PyLong_FromSsize_t
#define PyInt_AsLong PyLong_AsLong
#define PyInt_AS_LONG PyLong_AS_LONG
#define PyInt_AsSsize_t PyLong_AsSsize_t
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#define PyNumber_Int PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
#ifndef PyUnicode_InternFromString
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#endif
#if PY_VERSION_HEX < 0x030200A4
typedef long Py_hash_t;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
#else
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#if CYTHON_USE_ASYNC_SLOTS
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#else
typedef struct {
unaryfunc am_await;
unaryfunc am_aiter;
unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#endif
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
#define CYTHON_RESTRICT __restrict__
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#define CYTHON_RESTRICT __restrict
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_RESTRICT restrict
#else
#define CYTHON_RESTRICT
#endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
# if defined(__cplusplus)
template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
# else
# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED
# else
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
#ifndef _MSC_STDINT_H_
#if _MSC_VER < 1300
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t;
#endif
#endif
#else
#include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
#ifdef __cplusplus
#if __has_cpp_attribute(fallthrough)
#define CYTHON_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if __has_attribute(fallthrough) || (defined(__GNUC__) && defined(__attribute__))
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#endif
#endif
#endif
#ifndef __cplusplus
#error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
#if defined(__clang__)
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
#else
#define CYTHON_INLINE inline
#endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
x.~T();
}
template<typename T>
class __Pyx_FakeReference {
public:
__Pyx_FakeReference() : ptr(NULL) { }
__Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
T *operator->() { return ptr; }
T *operator&() { return ptr; }
operator T&() { return *ptr; }
template<typename U> bool operator ==(U other) { return *ptr == other; }
template<typename U> bool operator !=(U other) { return *ptr != other; }
private:
T *ptr;
};
#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
float value;
memset(&value, 0xFF, sizeof(value));
return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
__pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
#else
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
#endif
#ifndef __PYX_EXTERN_C
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#endif
#define __PYX_HAVE__convu
#define __PYX_HAVE_API__convu
#include <vector>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include "convutils.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */
#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
(sizeof(type) < sizeof(Py_ssize_t)) ||\
(sizeof(type) > sizeof(Py_ssize_t) &&\
likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX) &&\
(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
v == (type)PY_SSIZE_T_MIN))) ||\
(sizeof(type) == sizeof(Py_ssize_t) &&\
(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX))) )
#if defined (__cplusplus) && __cplusplus >= 201103L
#include <cstdlib>
#define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
#define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
#define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
const Py_UNICODE *u_end = u;
while (*u_end++) ;
return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
PyObject* ascii_chars_u = NULL;
PyObject* ascii_chars_b = NULL;
const char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
if (strcmp(default_encoding_c, "ascii") == 0) {
__Pyx_sys_getdefaultencoding_not_ascii = 0;
} else {
char ascii_chars[128];
int c;
for (c = 0; c < 128; c++) {
ascii_chars[c] = c;
}
__Pyx_sys_getdefaultencoding_not_ascii = 1;
ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
if (!ascii_chars_u) goto bad;
ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
PyErr_Format(
PyExc_ValueError,
"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
default_encoding_c);
goto bad;
}
Py_DECREF(ascii_chars_u);
Py_DECREF(ascii_chars_b);
}
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
Py_XDECREF(ascii_chars_u);
Py_XDECREF(ascii_chars_b);
return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
return -1;
}
#endif
#endif
/* Test for GCC > 2.95 */
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
static const char *__pyx_f[] = {
"stringsource",
"convu.pyx",
};
/*--- Type declarations ---*/
struct __pyx_obj_5convu_PyIm2Col;
/* "convu.pyx":18
* int stride_height, int stride_width)
*
* cdef class PyIm2Col: # <<<<<<<<<<<<<<
* cdef Im2Col *thisptr
*
*/
struct __pyx_obj_5convu_PyIm2Col {
PyObject_HEAD
utils::Im2Col *thisptr;
};
/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
typedef struct {
void (*INCREF)(void*, PyObject*, int);
void (*DECREF)(void*, PyObject*, int);
void (*GOTREF)(void*, PyObject*, int);
void (*GIVEREF)(void*, PyObject*, int);
void* (*SetupContext)(const char*, int, const char*);
void (*FinishContext)(void**);
} __Pyx_RefNannyAPIStruct;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
if (acquire_gil) {\
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
PyGILState_Release(__pyx_gilstate_save);\
} else {\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
}
#else
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
#define __Pyx_RefNannyFinishContext()\
__Pyx_RefNanny->FinishContext(&__pyx_refnanny)
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
#define __Pyx_RefNannyDeclarations
#define __Pyx_RefNannySetupContext(name, acquire_gil)
#define __Pyx_RefNannyFinishContext()
#define __Pyx_INCREF(r) Py_INCREF(r)
#define __Pyx_DECREF(r) Py_DECREF(r)
#define __Pyx_GOTREF(r)
#define __Pyx_GIVEREF(r)
#define __Pyx_XINCREF(r) Py_XINCREF(r)
#define __Pyx_XDECREF(r) Py_XDECREF(r)
#define __Pyx_XGOTREF(r)
#define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_XDECREF(tmp);\
} while (0)
#define __Pyx_DECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_DECREF(tmp);\
} while (0)
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
PyTypeObject* tp = Py_TYPE(obj);
if (likely(tp->tp_getattro))
return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
if (likely(tp->tp_getattr))
return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
/* KeywordStringCheck.proto */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
const char* function_name);
/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif
/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif
/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
#endif
/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
PyListObject* L = (PyListObject*) list;
Py_ssize_t len = Py_SIZE(list);
if (likely(L->allocated > len)) {
Py_INCREF(x);
PyList_SET_ITEM(list, len, x);
Py_SIZE(list) = len+1;
return 0;
}
return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif
/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);
/* CLineInTraceback.proto */
static int __Pyx_CLineForTraceback(int c_line);
/* CodeObjectCache.proto */
typedef struct {
PyCodeObject* code_object;
int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
int count;
int max_count;
__Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename);
/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
try {
if (PyErr_Occurred())
; // let the latest Python exn pass through and ignore the current one
else
throw;
} catch (const std::bad_alloc& exn) {
PyErr_SetString(PyExc_MemoryError, exn.what());
} catch (const std::bad_cast& exn) {
PyErr_SetString(PyExc_TypeError, exn.what());
} catch (const std::bad_typeid& exn) {
PyErr_SetString(PyExc_TypeError, exn.what());
} catch (const std::domain_error& exn) {
PyErr_SetString(PyExc_ValueError, exn.what());
} catch (const std::invalid_argument& exn) {
PyErr_SetString(PyExc_ValueError, exn.what());
} catch (const std::ios_base::failure& exn) {
PyErr_SetString(PyExc_IOError, exn.what());
} catch (const std::out_of_range& exn) {
PyErr_SetString(PyExc_IndexError, exn.what());
} catch (const std::overflow_error& exn) {
PyErr_SetString(PyExc_OverflowError, exn.what());
} catch (const std::range_error& exn) {
PyErr_SetString(PyExc_ArithmeticError, exn.what());
} catch (const std::underflow_error& exn) {
PyErr_SetString(PyExc_ArithmeticError, exn.what());
} catch (const std::exception& exn) {
PyErr_SetString(PyExc_RuntimeError, exn.what());
}
catch (...)
{
PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
}
}
#endif
/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);
/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
/* Module declarations from 'libcpp.vector' */
/* Module declarations from 'convu' */
static PyTypeObject *__pyx_ptype_5convu_PyIm2Col = 0;
static std::vector<double> __pyx_convert_vector_from_py_double(PyObject *); /*proto*/
static std::vector<std::vector<double> > __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(PyObject *); /*proto*/
static std::vector<std::vector<std::vector<double> > > __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___(PyObject *); /*proto*/
static std::vector<std::vector<std::vector<std::vector<double> > > > __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___(PyObject *); /*proto*/
static PyObject *__pyx_convert_vector_to_py_double(const std::vector<double> &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(const std::vector<std::vector<double> > &); /*proto*/
#define __Pyx_MODULE_NAME "convu"
int __pyx_module_is_main_convu = 0;
/* Implementation of 'convu' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_images[] = "images";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_filter_width[] = "filter_width";
static const char __pyx_k_stride_width[] = "stride_width";
static const char __pyx_k_filter_height[] = "filter_height";
static const char __pyx_k_padding_width[] = "padding_width";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_stride_height[] = "stride_height";
static const char __pyx_k_padding_height[] = "padding_height";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_filter_height;
static PyObject *__pyx_n_s_filter_width;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_images;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_padding_height;
static PyObject *__pyx_n_s_padding_width;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_stride_height;
static PyObject *__pyx_n_s_stride_width;
static PyObject *__pyx_n_s_test;
static int __pyx_pf_5convu_8PyIm2Col___cinit__(struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self); /* proto */
static void __pyx_pf_5convu_8PyIm2Col_2__dealloc__(struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5convu_8PyIm2Col_4im2col(struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self, PyObject *__pyx_v_images, PyObject *__pyx_v_filter_height, PyObject *__pyx_v_filter_width, PyObject *__pyx_v_padding_height, PyObject *__pyx_v_padding_width, PyObject *__pyx_v_stride_height, PyObject *__pyx_v_stride_width); /* proto */
static PyObject *__pyx_pf_5convu_8PyIm2Col_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5convu_8PyIm2Col_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_5convu_PyIm2Col(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
/* "convu.pyx":21
* cdef Im2Col *thisptr
*
* def __cinit__(self): # <<<<<<<<<<<<<<
* self.thisptr = new Im2Col()
*
*/
/* Python wrapper */
static int __pyx_pw_5convu_8PyIm2Col_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5convu_8PyIm2Col_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
__pyx_r = __pyx_pf_5convu_8PyIm2Col___cinit__(((struct __pyx_obj_5convu_PyIm2Col *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static int __pyx_pf_5convu_8PyIm2Col___cinit__(struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
utils::Im2Col *__pyx_t_1;
__Pyx_RefNannySetupContext("__cinit__", 0);
/* "convu.pyx":22
*
* def __cinit__(self):
* self.thisptr = new Im2Col() # <<<<<<<<<<<<<<
*
* def __dealloc__(self):
*/
try {
__pyx_t_1 = new utils::Im2Col();
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(1, 22, __pyx_L1_error)
}
__pyx_v_self->thisptr = __pyx_t_1;
/* "convu.pyx":21
* cdef Im2Col *thisptr
*
* def __cinit__(self): # <<<<<<<<<<<<<<
* self.thisptr = new Im2Col()
*
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_AddTraceback("convu.PyIm2Col.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "convu.pyx":24
* self.thisptr = new Im2Col()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
* del self.thisptr
*
*/
/* Python wrapper */
static void __pyx_pw_5convu_8PyIm2Col_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5convu_8PyIm2Col_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
__pyx_pf_5convu_8PyIm2Col_2__dealloc__(((struct __pyx_obj_5convu_PyIm2Col *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
}
static void __pyx_pf_5convu_8PyIm2Col_2__dealloc__(struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
/* "convu.pyx":25
*
* def __dealloc__(self):
* del self.thisptr # <<<<<<<<<<<<<<
*
* def im2col(self, images, filter_height, filter_width,
*/
delete __pyx_v_self->thisptr;
/* "convu.pyx":24
* self.thisptr = new Im2Col()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
* del self.thisptr
*
*/
/* function exit code */
__Pyx_RefNannyFinishContext();
}
/* "convu.pyx":27
* del self.thisptr
*
* def im2col(self, images, filter_height, filter_width, # <<<<<<<<<<<<<<
* padding_height, padding_width,
* stride_height, stride_width):
*/
/* Python wrapper */
static PyObject *__pyx_pw_5convu_8PyIm2Col_5im2col(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5convu_8PyIm2Col_5im2col(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_images = 0;
PyObject *__pyx_v_filter_height = 0;
PyObject *__pyx_v_filter_width = 0;
PyObject *__pyx_v_padding_height = 0;
PyObject *__pyx_v_padding_width = 0;
PyObject *__pyx_v_stride_height = 0;
PyObject *__pyx_v_stride_width = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("im2col (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_images,&__pyx_n_s_filter_height,&__pyx_n_s_filter_width,&__pyx_n_s_padding_height,&__pyx_n_s_padding_width,&__pyx_n_s_stride_height,&__pyx_n_s_stride_width,0};
PyObject* values[7] = {0,0,0,0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_images)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filter_height)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, 1); __PYX_ERR(1, 27, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filter_width)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, 2); __PYX_ERR(1, 27, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_padding_height)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, 3); __PYX_ERR(1, 27, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_padding_width)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, 4); __PYX_ERR(1, 27, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride_height)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, 5); __PYX_ERR(1, 27, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 6:
if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride_width)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, 6); __PYX_ERR(1, 27, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "im2col") < 0)) __PYX_ERR(1, 27, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
}
__pyx_v_images = values[0];
__pyx_v_filter_height = values[1];
__pyx_v_filter_width = values[2];
__pyx_v_padding_height = values[3];
__pyx_v_padding_width = values[4];
__pyx_v_stride_height = values[5];
__pyx_v_stride_width = values[6];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("im2col", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 27, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("convu.PyIm2Col.im2col", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_5convu_8PyIm2Col_4im2col(((struct __pyx_obj_5convu_PyIm2Col *)__pyx_v_self), __pyx_v_images, __pyx_v_filter_height, __pyx_v_filter_width, __pyx_v_padding_height, __pyx_v_padding_width, __pyx_v_stride_height, __pyx_v_stride_width);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_5convu_8PyIm2Col_4im2col(struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self, PyObject *__pyx_v_images, PyObject *__pyx_v_filter_height, PyObject *__pyx_v_filter_width, PyObject *__pyx_v_padding_height, PyObject *__pyx_v_padding_width, PyObject *__pyx_v_stride_height, PyObject *__pyx_v_stride_width) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
std::vector<std::vector<std::vector<std::vector<double> > > > __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("im2col", 0);
/* "convu.pyx":30
* padding_height, padding_width,
* stride_height, stride_width):
* return self.thisptr.im2col(images, filter_height, filter_width, # <<<<<<<<<<<<<<
* padding_height, padding_width, stride_height, stride_width)
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___(__pyx_v_images); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_filter_height); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
__pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_filter_width); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
/* "convu.pyx":31
* stride_height, stride_width):
* return self.thisptr.im2col(images, filter_height, filter_width,
* padding_height, padding_width, stride_height, stride_width) # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_padding_height); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 31, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_padding_width); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 31, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_stride_height); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 31, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_stride_width); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 31, __pyx_L1_error)
/* "convu.pyx":30
* padding_height, padding_width,
* stride_height, stride_width):
* return self.thisptr.im2col(images, filter_height, filter_width, # <<<<<<<<<<<<<<
* padding_height, padding_width, stride_height, stride_width)
*
*/
__pyx_t_8 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(__pyx_v_self->thisptr->im2col(__pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 30, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;
/* "convu.pyx":27
* del self.thisptr
*
* def im2col(self, images, filter_height, filter_width, # <<<<<<<<<<<<<<
* padding_height, padding_width,
* stride_height, stride_width):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("convu.PyIm2Col.im2col", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
*/
/* Python wrapper */
static PyObject *__pyx_pw_5convu_8PyIm2Col_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5convu_8PyIm2Col_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_5convu_8PyIm2Col_6__reduce_cython__(((struct __pyx_obj_5convu_PyIm2Col *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_5convu_8PyIm2Col_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":2
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
* def __setstate_cython__(self, __pyx_state):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 2, __pyx_L1_error)
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("convu.PyIm2Col.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":3
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
/* Python wrapper */
static PyObject *__pyx_pw_5convu_8PyIm2Col_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5convu_8PyIm2Col_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_5convu_8PyIm2Col_8__setstate_cython__(((struct __pyx_obj_5convu_PyIm2Col *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_5convu_8PyIm2Col_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5convu_PyIm2Col *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":4
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 4, __pyx_L1_error)
/* "(tree fragment)":3
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("convu.PyIm2Col.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_double")
* cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
static std::vector<double> __pyx_convert_vector_from_py_double(PyObject *__pyx_v_o) {
std::vector<double> __pyx_v_v;
PyObject *__pyx_v_item = NULL;
std::vector<double> __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
PyObject *__pyx_t_4 = NULL;
double __pyx_t_5;
__Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_double", 0);
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 47, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "vector.from_py":48
* cdef vector[X] v
* for item in o:
* v.push_back(<X>item) # <<<<<<<<<<<<<<
* return v
*
*/
__pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_item); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
__pyx_v_v.push_back(((double)__pyx_t_5));
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":49
* for item in o:
* v.push_back(<X>item)
* return v # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = __pyx_v_v;
goto __pyx_L0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_double")
* cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_pretend_to_initialize(&__pyx_r);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static std::vector<std::vector<double> > __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(PyObject *__pyx_v_o) {
std::vector<std::vector<double> > __pyx_v_v;
PyObject *__pyx_v_item = NULL;
std::vector<std::vector<double> > __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
PyObject *__pyx_t_4 = NULL;
std::vector<double> __pyx_t_5;
__Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___", 0);
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 47, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "vector.from_py":48
* cdef vector[X] v
* for item in o:
* v.push_back(<X>item) # <<<<<<<<<<<<<<
* return v
*
*/
__pyx_t_5 = __pyx_convert_vector_from_py_double(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
__pyx_v_v.push_back(((std::vector<double> )__pyx_t_5));
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":49
* for item in o:
* v.push_back(<X>item)
* return v # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = __pyx_v_v;
goto __pyx_L0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___")
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_pretend_to_initialize(&__pyx_r);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static std::vector<std::vector<std::vector<double> > > __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___(PyObject *__pyx_v_o) {
std::vector<std::vector<std::vector<double> > > __pyx_v_v;
PyObject *__pyx_v_item = NULL;
std::vector<std::vector<std::vector<double> > > __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
PyObject *__pyx_t_4 = NULL;
std::vector<std::vector<double> > __pyx_t_5;
__Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___", 0);
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 47, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "vector.from_py":48
* cdef vector[X] v
* for item in o:
* v.push_back(<X>item) # <<<<<<<<<<<<<<
* return v
*
*/
__pyx_t_5 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
__pyx_v_v.push_back(((std::vector<std::vector<double> > )__pyx_t_5));
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":49
* for item in o:
* v.push_back(<X>item)
* return v # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = __pyx_v_v;
goto __pyx_L0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___")
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_pretend_to_initialize(&__pyx_r);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static std::vector<std::vector<std::vector<std::vector<double> > > > __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___(PyObject *__pyx_v_o) {
std::vector<std::vector<std::vector<std::vector<double> > > > __pyx_v_v;
PyObject *__pyx_v_item = NULL;
std::vector<std::vector<std::vector<std::vector<double> > > > __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
PyObject *__pyx_t_4 = NULL;
std::vector<std::vector<std::vector<double> > > __pyx_t_5;
__Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___", 0);
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 47, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "vector.from_py":48
* cdef vector[X] v
* for item in o:
* v.push_back(<X>item) # <<<<<<<<<<<<<<
* return v
*
*/
__pyx_t_5 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e___(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
__pyx_v_v.push_back(((std::vector<std::vector<std::vector<double> > > )__pyx_t_5));
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":49
* for item in o:
* v.push_back(<X>item)
* return v # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = __pyx_v_v;
goto __pyx_L0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___")
* cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_vector_3c_std_3a__3a_vector_3c_std_3a__3a_vector_3c_double_3e____3e____3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_pretend_to_initialize(&__pyx_r);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_double")
* cdef object __pyx_convert_vector_to_py_double(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
static PyObject *__pyx_convert_vector_to_py_double(const std::vector<double> &__pyx_v_v) {
size_t __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
size_t __pyx_t_2;
size_t __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_double", 0);
/* "vector.to_py":61
* @cname("__pyx_convert_vector_to_py_double")
* cdef object __pyx_convert_vector_to_py_double(vector[X]& v):
* return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_v.size();
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
__pyx_t_4 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_double")
* cdef object __pyx_convert_vector_to_py_double(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(const std::vector<std::vector<double> > &__pyx_v_v) {
size_t __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
size_t __pyx_t_2;
size_t __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___", 0);
/* "vector.to_py":61
* @cname("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___")
* cdef object __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(vector[X]& v):
* return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_v.size();
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
__pyx_t_4 = __pyx_convert_vector_to_py_double((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___")
* cdef object __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_tp_new_5convu_PyIm2Col(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
} else {
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
if (unlikely(__pyx_pw_5convu_8PyIm2Col_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
return o;
bad:
Py_DECREF(o); o = 0;
return NULL;
}
static void __pyx_tp_dealloc_5convu_PyIm2Col(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++Py_REFCNT(o);
__pyx_pw_5convu_8PyIm2Col_3__dealloc__(o);
--Py_REFCNT(o);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
}
static PyMethodDef __pyx_methods_5convu_PyIm2Col[] = {
{"im2col", (PyCFunction)__pyx_pw_5convu_8PyIm2Col_5im2col, METH_VARARGS|METH_KEYWORDS, 0},
{"__reduce_cython__", (PyCFunction)__pyx_pw_5convu_8PyIm2Col_7__reduce_cython__, METH_NOARGS, 0},
{"__setstate_cython__", (PyCFunction)__pyx_pw_5convu_8PyIm2Col_9__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
static PyTypeObject __pyx_type_5convu_PyIm2Col = {
PyVarObject_HEAD_INIT(0, 0)
"convu.PyIm2Col", /*tp_name*/
sizeof(struct __pyx_obj_5convu_PyIm2Col), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_5convu_PyIm2Col, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
0, /*tp_compare*/
#endif
#if PY_MAJOR_VERSION >= 3
0, /*tp_as_async*/
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_5convu_PyIm2Col, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_5convu_PyIm2Col, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
0, /*tp_del*/
0, /*tp_version_tag*/
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
};
static PyMethodDef __pyx_methods[] = {
{0, 0, 0, 0}
};
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
#if PY_VERSION_HEX < 0x03020000
{ PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
#else
PyModuleDef_HEAD_INIT,
#endif
"convu",
0, /* m_doc */
-1, /* m_size */
__pyx_methods /* m_methods */,
NULL, /* m_reload */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL /* m_free */
};
#endif
static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
{&__pyx_n_s_filter_height, __pyx_k_filter_height, sizeof(__pyx_k_filter_height), 0, 0, 1, 1},
{&__pyx_n_s_filter_width, __pyx_k_filter_width, sizeof(__pyx_k_filter_width), 0, 0, 1, 1},
{&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
{&__pyx_n_s_images, __pyx_k_images, sizeof(__pyx_k_images), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
{&__pyx_n_s_padding_height, __pyx_k_padding_height, sizeof(__pyx_k_padding_height), 0, 0, 1, 1},
{&__pyx_n_s_padding_width, __pyx_k_padding_width, sizeof(__pyx_k_padding_width), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
{&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
{&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
{&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
{&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
{&__pyx_n_s_stride_height, __pyx_k_stride_height, sizeof(__pyx_k_stride_height), 0, 0, 1, 1},
{&__pyx_n_s_stride_width, __pyx_k_stride_width, sizeof(__pyx_k_stride_width), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 61, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
}
static int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
/* "(tree fragment)":2
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
* def __setstate_cython__(self, __pyx_state):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
/* "(tree fragment)":4
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
*/
__pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__2);
__Pyx_GIVEREF(__pyx_tuple__2);
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__Pyx_RefNannyFinishContext();
return -1;
}
static int __Pyx_InitGlobals(void) {
if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
return 0;
__pyx_L1_error:;
return -1;
}
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initconvu(void); /*proto*/
PyMODINIT_FUNC initconvu(void)
#else
PyMODINIT_FUNC PyInit_convu(void); /*proto*/
PyMODINIT_FUNC PyInit_convu(void)
#endif
{
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannyDeclarations
#if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
PyErr_Clear();
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
if (!__Pyx_RefNanny)
Py_FatalError("failed to import 'refnanny' module");
}
#endif
__Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_convu(void)", 0);
if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
#ifdef __Pyx_CyFunction_USED
if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_FusedFunction_USED
if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_Coroutine_USED
if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_Generator_USED
if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_StopAsyncIteration_USED
if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
/*--- Library function declarations ---*/
/*--- Threads initialization code ---*/
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
#ifdef WITH_THREAD /* Python build with threading support? */
PyEval_InitThreads();
#endif
#endif
/*--- Module creation code ---*/
#if PY_MAJOR_VERSION < 3
__pyx_m = Py_InitModule4("convu", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
#else
__pyx_m = PyModule_Create(&__pyx_moduledef);
#endif
if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
Py_INCREF(__pyx_d);
__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
__pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
#if CYTHON_COMPILING_IN_PYPY
Py_INCREF(__pyx_b);
#endif
if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
/*--- Initialize various global constants etc. ---*/
if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
if (__pyx_module_is_main_convu) {
if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
}
#if PY_MAJOR_VERSION >= 3
{
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
if (!PyDict_GetItemString(modules, "convu")) {
if (unlikely(PyDict_SetItemString(modules, "convu", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
}
}
#endif
/*--- Builtin init code ---*/
if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
/*--- Constants init code ---*/
if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
/*--- Global init code ---*/
/*--- Variable export code ---*/
/*--- Function export code ---*/
/*--- Type init code ---*/
if (PyType_Ready(&__pyx_type_5convu_PyIm2Col) < 0) __PYX_ERR(1, 18, __pyx_L1_error)
__pyx_type_5convu_PyIm2Col.tp_print = 0;
if (PyObject_SetAttrString(__pyx_m, "PyIm2Col", (PyObject *)&__pyx_type_5convu_PyIm2Col) < 0) __PYX_ERR(1, 18, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5convu_PyIm2Col) < 0) __PYX_ERR(1, 18, __pyx_L1_error)
__pyx_ptype_5convu_PyIm2Col = &__pyx_type_5convu_PyIm2Col;
/*--- Type import code ---*/
/*--- Variable import code ---*/
/*--- Function import code ---*/
/*--- Execution code ---*/
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
#endif
/* "convu.pyx":1
* # distutils: language = c++ # <<<<<<<<<<<<<<
* # distutils: sources = convutils.cpp
*
*/
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___")
* cdef object __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
/*--- Wrapped vars code ---*/
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
if (__pyx_m) {
if (__pyx_d) {
__Pyx_AddTraceback("init convu", 0, __pyx_lineno, __pyx_filename);
}
Py_DECREF(__pyx_m); __pyx_m = 0;
} else if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_ImportError, "init convu");
}
__pyx_L0:;
__Pyx_RefNannyFinishContext();
#if PY_MAJOR_VERSION < 3
return;
#else
return __pyx_m;
#endif
}
/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
PyObject *m = NULL, *p = NULL;
void *r = NULL;
m = PyImport_ImportModule((char *)modname);
if (!m) goto end;
p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
if (!p) goto end;
r = PyLong_AsVoidPtr(p);
end:
Py_XDECREF(p);
Py_XDECREF(m);
return (__Pyx_RefNannyAPIStruct *)r;
}
#endif
/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
if (unlikely(!result)) {
PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
"name '%U' is not defined", name);
#else
"name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
}
return result;
}
/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
Py_ssize_t num_min,
Py_ssize_t num_max,
Py_ssize_t num_found)
{
Py_ssize_t num_expected;
const char *more_or_less;
if (num_found < num_min) {
num_expected = num_min;
more_or_less = "at least";
} else {
num_expected = num_max;
more_or_less = "at most";
}
if (exact) {
more_or_less = "exactly";
}
PyErr_Format(PyExc_TypeError,
"%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
func_name, more_or_less, num_expected,
(num_expected == 1) ? "" : "s", num_found);
}
/* KeywordStringCheck */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
PyObject *kwdict,
const char* function_name,
int kw_allowed)
{
PyObject* key = 0;
Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
goto invalid_keyword;
return 1;
#else
while (PyDict_Next(kwdict, &pos, &key, 0)) {
#if PY_MAJOR_VERSION < 3
if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
#endif
if (unlikely(!PyUnicode_Check(key)))
goto invalid_keyword_type;
}
if ((!kw_allowed) && unlikely(key))
goto invalid_keyword;
return 1;
invalid_keyword_type:
PyErr_Format(PyExc_TypeError,
"%.200s() keywords must be strings", function_name);
return 0;
#endif
invalid_keyword:
PyErr_Format(PyExc_TypeError,
#if PY_MAJOR_VERSION < 3
"%.200s() got an unexpected keyword argument '%.200s'",
function_name, PyString_AsString(key));
#else
"%s() got an unexpected keyword argument '%U'",
function_name, key);
#endif
return 0;
}
/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name,
PyObject* kw_name)
{
PyErr_Format(PyExc_TypeError,
#if PY_MAJOR_VERSION >= 3
"%s() got multiple values for keyword argument '%U'", func_name, kw_name);
#else
"%s() got multiple values for keyword argument '%s'", func_name,
PyString_AsString(kw_name));
#endif
}
/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
PyObject *kwds,
PyObject **argnames[],
PyObject *kwds2,
PyObject *values[],
Py_ssize_t num_pos_args,
const char* function_name)
{
PyObject *key = 0, *value = 0;
Py_ssize_t pos = 0;
PyObject*** name;
PyObject*** first_kw_arg = argnames + num_pos_args;
while (PyDict_Next(kwds, &pos, &key, &value)) {
name = first_kw_arg;
while (*name && (**name != key)) name++;
if (*name) {
values[name-argnames] = value;
continue;
}
name = first_kw_arg;
#if PY_MAJOR_VERSION < 3
if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
while (*name) {
if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
&& _PyString_Eq(**name, key)) {
values[name-argnames] = value;
break;
}
name++;
}
if (*name) continue;
else {
PyObject*** argname = argnames;
while (argname != first_kw_arg) {
if ((**argname == key) || (
(CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
&& _PyString_Eq(**argname, key))) {
goto arg_passed_twice;
}
argname++;
}
}
} else
#endif
if (likely(PyUnicode_Check(key))) {
while (*name) {
int cmp = (**name == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
#endif
PyUnicode_Compare(**name, key);
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
if (cmp == 0) {
values[name-argnames] = value;
break;
}
name++;
}
if (*name) continue;
else {
PyObject*** argname = argnames;
while (argname != first_kw_arg) {
int cmp = (**argname == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
#endif
PyUnicode_Compare(**argname, key);
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
if (cmp == 0) goto arg_passed_twice;
argname++;
}
}
} else
goto invalid_keyword_type;
if (kwds2) {
if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
} else {
goto invalid_keyword;
}
}
return 0;
arg_passed_twice:
__Pyx_RaiseDoubleKeywordsError(function_name, key);
goto bad;
invalid_keyword_type:
PyErr_Format(PyExc_TypeError,
"%.200s() keywords must be strings", function_name);
goto bad;
invalid_keyword:
PyErr_Format(PyExc_TypeError,
#if PY_MAJOR_VERSION < 3
"%.200s() got an unexpected keyword argument '%.200s'",
function_name, PyString_AsString(key));
#else
"%s() got an unexpected keyword argument '%U'",
function_name, key);
#endif
bad:
return -1;
}
/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
PyObject *result;
ternaryfunc call = func->ob_type->tp_call;
if (unlikely(!call))
return PyObject_Call(func, arg, kw);
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
return NULL;
result = (*call)(func, arg, kw);
Py_LeaveRecursiveCall();
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
PyErr_SetString(
PyExc_SystemError,
"NULL result without error in PyObject_Call");
}
return result;
}
#endif
/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
tmp_type = tstate->curexc_type;
tmp_value = tstate->curexc_value;
tmp_tb = tstate->curexc_traceback;
tstate->curexc_type = type;
tstate->curexc_value = value;
tstate->curexc_traceback = tb;
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
*type = tstate->curexc_type;
*value = tstate->curexc_value;
*tb = tstate->curexc_traceback;
tstate->curexc_type = 0;
tstate->curexc_value = 0;
tstate->curexc_traceback = 0;
}
#endif
/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
CYTHON_UNUSED PyObject *cause) {
__Pyx_PyThreadState_declare
Py_XINCREF(type);
if (!value || value == Py_None)
value = NULL;
else
Py_INCREF(value);
if (!tb || tb == Py_None)
tb = NULL;
else {
Py_INCREF(tb);
if (!PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"raise: arg 3 must be a traceback or None");
goto raise_error;
}
}
if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
if (!value) {
Py_INCREF(Py_None);
value = Py_None;
}
#endif
PyErr_NormalizeException(&type, &value, &tb);
} else {
if (value) {
PyErr_SetString(PyExc_TypeError,
"instance exception may not have a separate value");
goto raise_error;
}
value = type;
type = (PyObject*) Py_TYPE(type);
Py_INCREF(type);
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
PyErr_SetString(PyExc_TypeError,
"raise: exception class must be a subclass of BaseException");
goto raise_error;
}
}
__Pyx_PyThreadState_assign
__Pyx_ErrRestore(type, value, tb);
return;
raise_error:
Py_XDECREF(value);
Py_XDECREF(type);
Py_XDECREF(tb);
return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
PyObject* owned_instance = NULL;
if (tb == Py_None) {
tb = 0;
} else if (tb && !PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"raise: arg 3 must be a traceback or None");
goto bad;
}
if (value == Py_None)
value = 0;
if (PyExceptionInstance_Check(type)) {
if (value) {
PyErr_SetString(PyExc_TypeError,
"instance exception may not have a separate value");
goto bad;
}
value = type;
type = (PyObject*) Py_TYPE(value);
} else if (PyExceptionClass_Check(type)) {
PyObject *instance_class = NULL;
if (value && PyExceptionInstance_Check(value)) {
instance_class = (PyObject*) Py_TYPE(value);
if (instance_class != type) {
int is_subclass = PyObject_IsSubclass(instance_class, type);
if (!is_subclass) {
instance_class = NULL;
} else if (unlikely(is_subclass == -1)) {
goto bad;
} else {
type = instance_class;
}
}
}
if (!instance_class) {
PyObject *args;
if (!value)
args = PyTuple_New(0);
else if (PyTuple_Check(value)) {
Py_INCREF(value);
args = value;
} else
args = PyTuple_Pack(1, value);
if (!args)
goto bad;
owned_instance = PyObject_Call(type, args, NULL);
Py_DECREF(args);
if (!owned_instance)
goto bad;
value = owned_instance;
if (!PyExceptionInstance_Check(value)) {
PyErr_Format(PyExc_TypeError,
"calling %R should have returned an instance of "
"BaseException, not %R",
type, Py_TYPE(value));
goto bad;
}
}
} else {
PyErr_SetString(PyExc_TypeError,
"raise: exception class must be a subclass of BaseException");
goto bad;
}
#if PY_VERSION_HEX >= 0x03030000
if (cause) {
#else
if (cause && cause != Py_None) {
#endif
PyObject *fixed_cause;
if (cause == Py_None) {
fixed_cause = NULL;
} else if (PyExceptionClass_Check(cause)) {
fixed_cause = PyObject_CallObject(cause, NULL);
if (fixed_cause == NULL)
goto bad;
} else if (PyExceptionInstance_Check(cause)) {
fixed_cause = cause;
Py_INCREF(fixed_cause);
} else {
PyErr_SetString(PyExc_TypeError,
"exception causes must derive from "
"BaseException");
goto bad;
}
PyException_SetCause(value, fixed_cause);
}
PyErr_SetObject(type, value);
if (tb) {
#if CYTHON_COMPILING_IN_PYPY
PyObject *tmp_type, *tmp_value, *tmp_tb;
PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
Py_INCREF(tb);
PyErr_Restore(tmp_type, tmp_value, tb);
Py_XDECREF(tmp_tb);
#else
PyThreadState *tstate = PyThreadState_GET();
PyObject* tmp_tb = tstate->curexc_traceback;
if (tb != tmp_tb) {
Py_INCREF(tb);
tstate->curexc_traceback = tb;
Py_XDECREF(tmp_tb);
}
#endif
}
bad:
Py_XDECREF(owned_instance);
return;
}
#endif
/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
int ret;
PyObject *name_attr;
name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
if (likely(name_attr)) {
ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
} else {
ret = -1;
}
if (unlikely(ret < 0)) {
PyErr_Clear();
ret = 0;
}
Py_XDECREF(name_attr);
return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
int ret = 0;
PyObject *object_reduce = NULL;
PyObject *object_reduce_ex = NULL;
PyObject *reduce = NULL;
PyObject *reduce_ex = NULL;
PyObject *reduce_cython = NULL;
PyObject *setstate = NULL;
PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
#else
if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#else
object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
if (!setstate) PyErr_Clear();
if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
}
PyType_Modified((PyTypeObject*)type_obj);
}
}
goto GOOD;
BAD:
if (!PyErr_Occurred())
PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
ret = -1;
GOOD:
#if !CYTHON_COMPILING_IN_CPYTHON
Py_XDECREF(object_reduce);
Py_XDECREF(object_reduce_ex);
#endif
Py_XDECREF(reduce);
Py_XDECREF(reduce_ex);
Py_XDECREF(reduce_cython);
Py_XDECREF(setstate);
Py_XDECREF(setstate_cython);
return ret;
}
/* CLineInTraceback */
static int __Pyx_CLineForTraceback(int c_line) {
#ifdef CYTHON_CLINE_IN_TRACEBACK
return ((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0;
#else
PyObject *use_cline;
#if CYTHON_COMPILING_IN_CPYTHON
PyObject **cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
if (likely(cython_runtime_dict)) {
use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
} else
#endif
{
PyObject *ptype, *pvalue, *ptraceback;
PyObject *use_cline_obj;
PyErr_Fetch(&ptype, &pvalue, &ptraceback);
use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
if (use_cline_obj) {
use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
Py_DECREF(use_cline_obj);
} else {
use_cline = NULL;
}
PyErr_Restore(ptype, pvalue, ptraceback);
}
if (!use_cline) {
c_line = 0;
PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
}
else if (PyObject_Not(use_cline) != 0) {
c_line = 0;
}
return c_line;
#endif
}
/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
int start = 0, mid = 0, end = count - 1;
if (end >= 0 && code_line > entries[end].code_line) {
return count;
}
while (start < end) {
mid = start + (end - start) / 2;
if (code_line < entries[mid].code_line) {
end = mid;
} else if (code_line > entries[mid].code_line) {
start = mid + 1;
} else {
return mid;
}
}
if (code_line <= entries[mid].code_line) {
return mid;
} else {
return mid + 1;
}
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
PyCodeObject* code_object;
int pos;
if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
return NULL;
}
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
return NULL;
}
code_object = __pyx_code_cache.entries[pos].code_object;
Py_INCREF(code_object);
return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
int pos, i;
__Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
if (unlikely(!code_line)) {
return;
}
if (unlikely(!entries)) {
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
if (likely(entries)) {
__pyx_code_cache.entries = entries;
__pyx_code_cache.max_count = 64;
__pyx_code_cache.count = 1;
entries[0].code_line = code_line;
entries[0].code_object = code_object;
Py_INCREF(code_object);
}
return;
}
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
PyCodeObject* tmp = entries[pos].code_object;
entries[pos].code_object = code_object;
Py_DECREF(tmp);
return;
}
if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
int new_max = __pyx_code_cache.max_count + 64;
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
__pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
if (unlikely(!entries)) {
return;
}
__pyx_code_cache.entries = entries;
__pyx_code_cache.max_count = new_max;
}
for (i=__pyx_code_cache.count; i>pos; i--) {
entries[i] = entries[i-1];
}
entries[pos].code_line = code_line;
entries[pos].code_object = code_object;
__pyx_code_cache.count++;
Py_INCREF(code_object);
}
/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
const char *funcname, int c_line,
int py_line, const char *filename) {
PyCodeObject *py_code = 0;
PyObject *py_srcfile = 0;
PyObject *py_funcname = 0;
#if PY_MAJOR_VERSION < 3
py_srcfile = PyString_FromString(filename);
#else
py_srcfile = PyUnicode_FromString(filename);
#endif
if (!py_srcfile) goto bad;
if (c_line) {
#if PY_MAJOR_VERSION < 3
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
#else
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
#endif
}
else {
#if PY_MAJOR_VERSION < 3
py_funcname = PyString_FromString(funcname);
#else
py_funcname = PyUnicode_FromString(funcname);
#endif
}
if (!py_funcname) goto bad;
py_code = __Pyx_PyCode_New(
0,
0,
0,
0,
0,
__pyx_empty_bytes, /*PyObject *code,*/
__pyx_empty_tuple, /*PyObject *consts,*/
__pyx_empty_tuple, /*PyObject *names,*/
__pyx_empty_tuple, /*PyObject *varnames,*/
__pyx_empty_tuple, /*PyObject *freevars,*/
__pyx_empty_tuple, /*PyObject *cellvars,*/
py_srcfile, /*PyObject *filename,*/
py_funcname, /*PyObject *name,*/
py_line,
__pyx_empty_bytes /*PyObject *lnotab*/
);
Py_DECREF(py_srcfile);
Py_DECREF(py_funcname);
return py_code;
bad:
Py_XDECREF(py_srcfile);
Py_XDECREF(py_funcname);
return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename) {
PyCodeObject *py_code = 0;
PyFrameObject *py_frame = 0;
if (c_line) {
c_line = __Pyx_CLineForTraceback(c_line);
}
py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
if (!py_code) {
py_code = __Pyx_CreateCodeObjectForTraceback(
funcname, c_line, py_line, filename);
if (!py_code) goto bad;
__pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
}
py_frame = PyFrame_New(
PyThreadState_GET(), /*PyThreadState *tstate,*/
py_code, /*PyCodeObject *code,*/
__pyx_d, /*PyObject *globals,*/
0 /*PyObject *locals*/
);
if (!py_frame) goto bad;
__Pyx_PyFrame_SetLineNumber(py_frame, py_line);
PyTraceBack_Here(py_frame);
bad:
Py_XDECREF(py_code);
Py_XDECREF(py_frame);
}
/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
{\
func_type value = func_value;\
if (sizeof(target_type) < sizeof(func_type)) {\
if (unlikely(value != (func_type) (target_type) value)) {\
func_type zero = 0;\
if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
return (target_type) -1;\
if (is_unsigned && unlikely(value < zero))\
goto raise_neg_overflow;\
else\
goto raise_overflow;\
}\
}\
return (target_type) value;\
}
/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
const int neg_one = (int) -1, const_zero = (int) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
if (sizeof(int) < sizeof(long)) {
__PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
return (int) val;
}
} else
#endif
if (likely(PyLong_Check(x))) {
if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (int) 0;
case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
case 2:
if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
}
}
break;
case 3:
if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
}
}
break;
case 4:
if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
}
}
break;
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON
if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow;
}
#else
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
return (int) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
if (sizeof(int) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (int) 0;
case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
case -2:
if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case 2:
if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case -3:
if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case 3:
if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case -4:
if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case 4:
if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
}
#endif
if (sizeof(int) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
{
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
int val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
PyObject *tmp = v;
v = PyNumber_Long(tmp);
Py_DECREF(tmp);
}
#endif
if (likely(v)) {
int one = 1; int is_little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&val;
int ret = _PyLong_AsByteArray((PyLongObject *)v,
bytes, sizeof(val),
is_little, !is_unsigned);
Py_DECREF(v);
if (likely(!ret))
return val;
}
#endif
return (int) -1;
}
} else {
int val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
if (!tmp) return (int) -1;
val = __Pyx_PyInt_As_int(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
"value too large to convert to int");
return (int) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to int");
return (int) -1;
}
/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
if (sizeof(size_t) < sizeof(long)) {
__PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
return (size_t) val;
}
} else
#endif
if (likely(PyLong_Check(x))) {
if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (size_t) 0;
case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
case 2:
if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
case 3:
if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
case 4:
if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON
if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow;
}
#else
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
return (size_t) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
if (sizeof(size_t) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (size_t) 0;
case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
case -2:
if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 2:
if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case -3:
if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 3:
if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case -4:
if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 4:
if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
}
#endif
if (sizeof(size_t) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
{
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
size_t val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
PyObject *tmp = v;
v = PyNumber_Long(tmp);
Py_DECREF(tmp);
}
#endif
if (likely(v)) {
int one = 1; int is_little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&val;
int ret = _PyLong_AsByteArray((PyLongObject *)v,
bytes, sizeof(val),
is_little, !is_unsigned);
Py_DECREF(v);
if (likely(!ret))
return val;
}
#endif
return (size_t) -1;
}
} else {
size_t val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
if (!tmp) return (size_t) -1;
val = __Pyx_PyInt_As_size_t(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
"value too large to convert to size_t");
return (size_t) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to size_t");
return (size_t) -1;
}
/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
const long neg_one = (long) -1, const_zero = (long) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
if (sizeof(long) < sizeof(long)) {
return PyInt_FromLong((long) value);
} else if (sizeof(long) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
}
} else {
if (sizeof(long) <= sizeof(long)) {
return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
}
}
{
int one = 1; int little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&value;
return _PyLong_FromByteArray(bytes, sizeof(long),
little, !is_unsigned);
}
}
/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
const long neg_one = (long) -1, const_zero = (long) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
if (sizeof(long) < sizeof(long)) {
__PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
return (long) val;
}
} else
#endif
if (likely(PyLong_Check(x))) {
if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (long) 0;
case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
case 2:
if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
case 3:
if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
case 4:
if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON
if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow;
}
#else
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
return (long) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
if (sizeof(long) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (long) 0;
case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
case -2:
if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 2:
if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case -3:
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 3:
if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case -4:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 4:
if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
}
#endif
if (sizeof(long) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
{
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
long val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
PyObject *tmp = v;
v = PyNumber_Long(tmp);
Py_DECREF(tmp);
}
#endif
if (likely(v)) {
int one = 1; int is_little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&val;
int ret = _PyLong_AsByteArray((PyLongObject *)v,
bytes, sizeof(val),
is_little, !is_unsigned);
Py_DECREF(v);
if (likely(!ret))
return val;
}
#endif
return (long) -1;
}
} else {
long val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
if (!tmp) return (long) -1;
val = __Pyx_PyInt_As_long(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
"value too large to convert to long");
return (long) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to long");
return (long) -1;
}
/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
char ctversion[4], rtversion[4];
PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
char message[200];
PyOS_snprintf(message, sizeof(message),
"compiletime version %s of module '%.100s' "
"does not match runtime version %s",
ctversion, __Pyx_MODULE_NAME, rtversion);
return PyErr_WarnEx(NULL, message, 1);
}
return 0;
}
/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while (t->p) {
#if PY_MAJOR_VERSION < 3
if (t->is_unicode) {
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
} else if (t->intern) {
*t->p = PyString_InternFromString(t->s);
} else {
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
}
#else
if (t->is_unicode | t->is_str) {
if (t->intern) {
*t->p = PyUnicode_InternFromString(t->s);
} else if (t->encoding) {
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
} else {
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
}
} else {
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
}
#endif
if (!*t->p)
return -1;
if (PyObject_Hash(*t->p) == -1)
PyErr_Clear();
++t;
}
return 0;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
Py_ssize_t ignore;
return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
__Pyx_sys_getdefaultencoding_not_ascii &&
#endif
PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
char* defenc_c;
PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
if (!defenc) return NULL;
defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
{
char* end = defenc_c + PyBytes_GET_SIZE(defenc);
char* c;
for (c = defenc_c; c < end; c++) {
if ((unsigned char) (*c) >= 128) {
PyUnicode_AsASCIIString(o);
return NULL;
}
}
}
#endif
*length = PyBytes_GET_SIZE(defenc);
return defenc_c;
#else
if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
if (PyUnicode_IS_ASCII(o)) {
*length = PyUnicode_GET_LENGTH(o);
return PyUnicode_AsUTF8(o);
} else {
PyUnicode_AsASCIIString(o);
return NULL;
}
#else
return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
} else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
if (PyByteArray_Check(o)) {
*length = PyByteArray_GET_SIZE(o);
return PyByteArray_AS_STRING(o);
} else
#endif
{
char* result;
int r = PyBytes_AsStringAndSize(o, &result, length);
if (unlikely(r < 0)) {
return NULL;
} else {
return result;
}
}
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
int is_true = x == Py_True;
if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
PyNumberMethods *m;
#endif
const char *name = NULL;
PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
if (PyInt_Check(x) || PyLong_Check(x))
#else
if (PyLong_Check(x))
#endif
return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
if (m && m->nb_int) {
name = "int";
res = PyNumber_Int(x);
}
else if (m && m->nb_long) {
name = "long";
res = PyNumber_Long(x);
}
#else
if (m && m->nb_int) {
name = "int";
res = PyNumber_Long(x);
}
#endif
#else
res = PyNumber_Int(x);
#endif
if (res) {
#if PY_MAJOR_VERSION < 3
if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
if (!PyLong_Check(res)) {
#endif
PyErr_Format(PyExc_TypeError,
"__%.4s__ returned non-%.4s (type %.200s)",
name, name, Py_TYPE(res)->tp_name);
Py_DECREF(res);
return NULL;
}
}
else if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_TypeError,
"an integer is required");
}
return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
Py_ssize_t ival;
PyObject *x;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_CheckExact(b))) {
if (sizeof(Py_ssize_t) >= sizeof(long))
return PyInt_AS_LONG(b);
else
return PyInt_AsSsize_t(x);
}
#endif
if (likely(PyLong_CheckExact(b))) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)b)->ob_digit;
const Py_ssize_t size = Py_SIZE(b);
if (likely(__Pyx_sst_abs(size) <= 1)) {
ival = likely(size) ? digits[0] : 0;
if (size == -1) ival = -ival;
return ival;
} else {
switch (size) {
case 2:
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case -2:
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case 3:
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case -3:
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case 4:
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case -4:
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
}
}
#endif
return PyLong_AsSsize_t(b);
}
x = PyNumber_Index(b);
if (!x) return -1;
ival = PyInt_AsSsize_t(x);
Py_DECREF(x);
return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
return PyInt_FromSize_t(ival);
}
#endif /* Py_PYTHON_H */
| [
"upulbandara@gmail.com"
] | upulbandara@gmail.com |
671d5fd7ebd7a0aab5626382d0c3a7c06aa63b4c | e89487c0792142a61cada0711dde8e1fcc921f28 | /C++/project08.cpp | d7925c0b1b28902244596fa6c77d06734fe3b844 | [] | no_license | jrs023/ProjectEuler | ae814a72d907222b8bb48131b77d463ba74953b6 | b3bba5ec3f96a0128f897dc3fa437e5c44f5390a | refs/heads/master | 2021-01-10T09:23:12.471309 | 2016-11-13T02:53:13 | 2016-11-13T02:53:13 | 44,712,206 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,372 | cpp | //ProjectEuler Number 8
//by Josh Smith
#include <iostream>
#include <string>
using namespace std;
int main() {
string s = "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450";
size_t max = 0;
size_t value = 1;
for(size_t i = 0; i < s.size()-13; i++){
value = 1;
for(size_t j = 0; j < 13; j++){
value = value * (s[i+j]- '0');
}
if(value > max){
max = value;
}
}
cout << max << endl;
return 0;
}
| [
"jrs023@uark.edu"
] | jrs023@uark.edu |
dd01a72c1c2381a1a23efe9871733d0af2fcae5f | 28a3903ace2bee9d64428af0b2cea63ec1e7af11 | /src/Core/IImage.cpp | 41a17320d8ddcc15e209dfa20c0213dd2788185f | [] | no_license | thennequin/InitialProject | e90a551c8b38e9c458eabb8c9b1c9d3a5395e9a0 | 89ab9de41a1191da38ea002f7233f8de0a9cb0af | refs/heads/master | 2021-01-10T02:29:10.419919 | 2018-04-21T13:30:20 | 2018-04-21T13:30:20 | 43,328,862 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,011 | cpp | //---------------------------------------------
// Initial Engine
// Image loader Module
//
// By Thibault HENNEQUIN
// January 12th 2008
//---------------------------------------------
#define _IIMAGE_COMPILE_
#include <windows.h>
#include <libgfl.h>
#include "Initial/ILogger.h"
#include "Initial/Core/IImage.h"
#include "Initial/Core/Image/TGA.h"
namespace Initial
{
namespace Core
{
void IImage::_Init()
{
m_iWidth=0;
m_iHeight=0;
m_iFormat=IIF_NONE;
m_pData=NULL;
}
IImage::IImage()
{
_Init();
}
IImage::IImage(IImage& copy)
{
_Init();
*this=copy;
}
IImage::IImage(IString filename)
{
_Init();
Load(filename);
}
IImage::~IImage()
{
if (m_pData)
free(m_pData);
}
unsigned char* IImage::GetData()
{
return (unsigned char*)m_pData;
}
ImageFormat IImage::GetFormat()
{
return m_iFormat;
}
int IImage::GetWidth()
{
return m_iWidth;
}
int IImage::GetHeight()
{
return m_iHeight;
}
void IImage::SetImage(int width, int height, ImageFormat format)
{
m_iWidth=width;
m_iHeight=height;
m_iFormat=format;
if (m_pData)
free(m_pData);
m_pData=malloc(m_iWidth*m_iHeight*m_iFormat);
}
void IImage::SetData(void *data)
{
if (m_pData && data)
{
memcpy(m_pData,data,m_iWidth*m_iHeight*m_iFormat);
}
}
bool IImage::Load(IString filename)
{
gflLibraryInit();
GFL_LOAD_PARAMS load_option;
GFL_BITMAP *bitmap;
GFL_FILE_INFORMATION file_info;
GFL_ERROR error;
gflGetDefaultLoadParams( &load_option );
//load_option.ColorModel = GFL_RGBA;
error = gflLoadBitmap( filename.c_str(), &bitmap, &load_option, &file_info );
if ( error )
{
error = gflLoadBitmap( ("Textures/"+filename).c_str(), &bitmap, &load_option, &file_info );
}
if ( error )
{
printf("Pas de fichier trouver\n");
}else
{
//GFL_SAVE_PARAMS save_option;
//gflGetDefaultSaveParams(&save_option);
//gflSaveBitmap("c:/test.bmp",bitmap,&save_option);
int CPP=0;
bool Error=false;
if (bitmap->ComponentsPerPixel==3)
m_iFormat=IIF_RGB;
else if (bitmap->ComponentsPerPixel==4)
m_iFormat=IIF_RGBA;
else{
printf("Format non supporte\n");
Error=true;
}
if (Error==false)
{
m_iWidth=bitmap->Width;
m_iHeight=bitmap->Height;
m_pData=malloc(m_iWidth*m_iHeight*m_iFormat);
memcpy(m_pData,bitmap->Data,m_iWidth*m_iHeight*m_iFormat);
}
gflFreeBitmap( bitmap );
return true;
}
gflLibraryExit();
return false;
}
void IImage::Save(IString filename)
{
Image::SaveTGA(filename,this);
}
void IImage::operator =(IImage ©)
{
SetImage(copy.m_iWidth,copy.m_iHeight,copy.m_iFormat);
SetData(copy.m_pData);
}
}
}
| [
"cameleonth@9ba7cb8f-89f9-4171-b643-8b30d4d3aa91"
] | cameleonth@9ba7cb8f-89f9-4171-b643-8b30d4d3aa91 |
07f070f4b431cdb848cefcb6fc9b6d672f795368 | f4ac515f7d98202ca2a05c2036373eeef8e78916 | /src/field_advance/standard/pipeline/compute_curl_b_pipeline_v16.cc | 0da2042d9d247e12cacfc39560ee02c018247bdf | [
"BSD-3-Clause"
] | permissive | lanl/vpic | b5b52de384292985f4d9f98147ccc63108018799 | 5d1aa3cceac48c5ff36e131cd26c89a85b118d75 | refs/heads/master | 2023-04-11T22:08:48.789627 | 2023-02-16T15:55:15 | 2023-02-16T15:55:15 | 51,323,352 | 136 | 76 | NOASSERTION | 2023-02-16T15:55:17 | 2016-02-08T20:04:21 | C++ | UTF-8 | C++ | false | false | 8,775 | cc | #define IN_sfa
#define IN_compute_curl_b_pipeline
#include "compute_curl_b_pipeline.h"
#include "../sfa_private.h"
#if defined(V16_ACCELERATION)
using namespace v16;
void
compute_curl_b_pipeline_v16( pipeline_args_t * args,
int pipeline_rank,
int n_pipeline )
{
DECLARE_STENCIL();
int n_voxel;
DISTRIBUTE_VOXELS( 2,nx, 2,ny, 2,nz, 16,
pipeline_rank, n_pipeline,
x, y, z, n_voxel );
const v16float vpx( px );
const v16float vpy( py );
const v16float vpz( pz );
v16float save1, dummy;
v16float f0_cbx, f0_cby, f0_cbz;
v16float f0_tcax, f0_tcay, f0_tcaz;
v16float fx_cby, fx_cbz;
v16float fy_cbx, fy_cbz;
v16float fz_cbx, fz_cby;
v16float m_f0_rmux, m_f0_rmuy, m_f0_rmuz;
v16float m_fx_rmuy, m_fx_rmuz;
v16float m_fy_rmux, m_fy_rmuz;
v16float m_fz_rmux, m_fz_rmuy;
v16float f0_cbx_rmux, f0_cby_rmuy, f0_cbz_rmuz;
field_t * ALIGNED(16) f000, * ALIGNED(16) f001, * ALIGNED(16) f002, * ALIGNED(16) f003; // Voxel block
field_t * ALIGNED(16) f004, * ALIGNED(16) f005, * ALIGNED(16) f006, * ALIGNED(16) f007; // Voxel block
field_t * ALIGNED(16) f008, * ALIGNED(16) f009, * ALIGNED(16) f010, * ALIGNED(16) f011; // Voxel block
field_t * ALIGNED(16) f012, * ALIGNED(16) f013, * ALIGNED(16) f014, * ALIGNED(16) f015; // Voxel block
field_t * ALIGNED(16) fx00, * ALIGNED(16) fx01, * ALIGNED(16) fx02, * ALIGNED(16) fx03; // Voxel block +x neighbors
field_t * ALIGNED(16) fx04, * ALIGNED(16) fx05, * ALIGNED(16) fx06, * ALIGNED(16) fx07; // Voxel block +x neighbors
field_t * ALIGNED(16) fx08, * ALIGNED(16) fx09, * ALIGNED(16) fx10, * ALIGNED(16) fx11; // Voxel block +x neighbors
field_t * ALIGNED(16) fx12, * ALIGNED(16) fx13, * ALIGNED(16) fx14, * ALIGNED(16) fx15; // Voxel block +x neighbors
field_t * ALIGNED(16) fy00, * ALIGNED(16) fy01, * ALIGNED(16) fy02, * ALIGNED(16) fy03; // Voxel block +y neighbors
field_t * ALIGNED(16) fy04, * ALIGNED(16) fy05, * ALIGNED(16) fy06, * ALIGNED(16) fy07; // Voxel block +y neighbors
field_t * ALIGNED(16) fy08, * ALIGNED(16) fy09, * ALIGNED(16) fy10, * ALIGNED(16) fy11; // Voxel block +y neighbors
field_t * ALIGNED(16) fy12, * ALIGNED(16) fy13, * ALIGNED(16) fy14, * ALIGNED(16) fy15; // Voxel block +y neighbors
field_t * ALIGNED(16) fz00, * ALIGNED(16) fz01, * ALIGNED(16) fz02, * ALIGNED(16) fz03; // Voxel block +z neighbors
field_t * ALIGNED(16) fz04, * ALIGNED(16) fz05, * ALIGNED(16) fz06, * ALIGNED(16) fz07; // Voxel block +z neighbors
field_t * ALIGNED(16) fz08, * ALIGNED(16) fz09, * ALIGNED(16) fz10, * ALIGNED(16) fz11; // Voxel block +z neighbors
field_t * ALIGNED(16) fz12, * ALIGNED(16) fz13, * ALIGNED(16) fz14, * ALIGNED(16) fz15; // Voxel block +z neighbors
// Process the bulk of the voxels 16 at a time
INIT_STENCIL();
for( ; n_voxel > 15; n_voxel -= 16 )
{
f000 = f0; fx00 = fx; fy00 = fy; fz00 = fz; NEXT_STENCIL();
f001 = f0; fx01 = fx; fy01 = fy; fz01 = fz; NEXT_STENCIL();
f002 = f0; fx02 = fx; fy02 = fy; fz02 = fz; NEXT_STENCIL();
f003 = f0; fx03 = fx; fy03 = fy; fz03 = fz; NEXT_STENCIL();
f004 = f0; fx04 = fx; fy04 = fy; fz04 = fz; NEXT_STENCIL();
f005 = f0; fx05 = fx; fy05 = fy; fz05 = fz; NEXT_STENCIL();
f006 = f0; fx06 = fx; fy06 = fy; fz06 = fz; NEXT_STENCIL();
f007 = f0; fx07 = fx; fy07 = fy; fz07 = fz; NEXT_STENCIL();
f008 = f0; fx08 = fx; fy08 = fy; fz08 = fz; NEXT_STENCIL();
f009 = f0; fx09 = fx; fy09 = fy; fz09 = fz; NEXT_STENCIL();
f010 = f0; fx10 = fx; fy10 = fy; fz10 = fz; NEXT_STENCIL();
f011 = f0; fx11 = fx; fy11 = fy; fz11 = fz; NEXT_STENCIL();
f012 = f0; fx12 = fx; fy12 = fy; fz12 = fz; NEXT_STENCIL();
f013 = f0; fx13 = fx; fy13 = fy; fz13 = fz; NEXT_STENCIL();
f014 = f0; fx14 = fx; fy14 = fy; fz14 = fz; NEXT_STENCIL();
f015 = f0; fx15 = fx; fy15 = fy; fz15 = fz; NEXT_STENCIL();
//------------------------------------------------------------------------//
// Load field data.
//------------------------------------------------------------------------//
load_16x3_tr( &f000->cbx, &f001->cbx, &f002->cbx, &f003->cbx,
&f004->cbx, &f005->cbx, &f006->cbx, &f007->cbx,
&f008->cbx, &f009->cbx, &f010->cbx, &f011->cbx,
&f012->cbx, &f013->cbx, &f014->cbx, &f015->cbx,
f0_cbx, f0_cby, f0_cbz );
load_16x4_tr( &f000->tcax, &f001->tcax, &f002->tcax, &f003->tcax,
&f004->tcax, &f005->tcax, &f006->tcax, &f007->tcax,
&f008->tcax, &f009->tcax, &f010->tcax, &f011->tcax,
&f012->tcax, &f013->tcax, &f014->tcax, &f015->tcax,
f0_tcax, f0_tcay, f0_tcaz, save1 );
load_16x3_tr( &fx00->cbx, &fx01->cbx, &fx02->cbx, &fx03->cbx,
&fx04->cbx, &fx05->cbx, &fx06->cbx, &fx07->cbx,
&fx08->cbx, &fx09->cbx, &fx10->cbx, &fx11->cbx,
&fx12->cbx, &fx13->cbx, &fx14->cbx, &fx15->cbx,
dummy, fx_cby, fx_cbz );
load_16x3_tr( &fy00->cbx, &fy01->cbx, &fy02->cbx, &fy03->cbx,
&fy04->cbx, &fy05->cbx, &fy06->cbx, &fy07->cbx,
&fy08->cbx, &fy09->cbx, &fy10->cbx, &fy11->cbx,
&fy12->cbx, &fy13->cbx, &fy14->cbx, &fy15->cbx,
fy_cbx, dummy, fy_cbz );
load_16x2_tr( &fz00->cbx, &fz01->cbx, &fz02->cbx, &fz03->cbx,
&fz04->cbx, &fz05->cbx, &fz06->cbx, &fz07->cbx,
&fz08->cbx, &fz09->cbx, &fz10->cbx, &fz11->cbx,
&fz12->cbx, &fz13->cbx, &fz14->cbx, &fz15->cbx,
fz_cbx, fz_cby );
# define LOAD_RMU(V,D) m_f##V##_rmu##D=v16float( m[f##V##00->fmat##D].rmu##D, \
m[f##V##01->fmat##D].rmu##D, \
m[f##V##02->fmat##D].rmu##D, \
m[f##V##03->fmat##D].rmu##D, \
m[f##V##04->fmat##D].rmu##D, \
m[f##V##05->fmat##D].rmu##D, \
m[f##V##06->fmat##D].rmu##D, \
m[f##V##07->fmat##D].rmu##D, \
m[f##V##08->fmat##D].rmu##D, \
m[f##V##09->fmat##D].rmu##D, \
m[f##V##10->fmat##D].rmu##D, \
m[f##V##11->fmat##D].rmu##D, \
m[f##V##12->fmat##D].rmu##D, \
m[f##V##13->fmat##D].rmu##D, \
m[f##V##14->fmat##D].rmu##D, \
m[f##V##15->fmat##D].rmu##D )
LOAD_RMU(0,x); LOAD_RMU(0,y); LOAD_RMU(0,z);
LOAD_RMU(x,y); LOAD_RMU(x,z);
LOAD_RMU(y,x); LOAD_RMU(y,z);
LOAD_RMU(z,x); LOAD_RMU(z,y);
# undef LOAD_RMU
f0_cbx_rmux = f0_cbx * m_f0_rmux;
f0_cby_rmuy = f0_cby * m_f0_rmuy;
f0_cbz_rmuz = f0_cbz * m_f0_rmuz;
f0_tcax = fms( vpy,
fnms( fy_cbz, m_fy_rmuz, f0_cbz_rmuz ),
vpz * fnms( fz_cby, m_fz_rmuy, f0_cby_rmuy ) );
f0_tcay = fms( vpz,
fnms( fz_cbx, m_fz_rmux, f0_cbx_rmux ),
vpx * fnms( fx_cbz, m_fx_rmuz, f0_cbz_rmuz ) );
f0_tcaz = fms( vpx,
fnms( fx_cby, m_fx_rmuy, f0_cby_rmuy ),
vpy * fnms( fy_cbx, m_fy_rmux, f0_cbx_rmux ) );
//------------------------------------------------------------------------//
// Note:
//------------------------------------------------------------------------//
// Unlike load_16x3 versus load_16x4, store_16x4 is much more efficient
// than store_16x3.
//------------------------------------------------------------------------//
store_16x4_tr( f0_tcax, f0_tcay, f0_tcaz, save1,
&f000->tcax, &f001->tcax, &f002->tcax, &f003->tcax,
&f004->tcax, &f005->tcax, &f006->tcax, &f007->tcax,
&f008->tcax, &f009->tcax, &f010->tcax, &f011->tcax,
&f012->tcax, &f013->tcax, &f014->tcax, &f015->tcax );
}
}
#else
void
compute_curl_b_pipeline_v16( pipeline_args_t * args,
int pipeline_rank,
int n_pipeline )
{
// No v16 implementation.
ERROR( ( "No compute_curl_b_pipeline_v16 implementation." ) );
}
#endif
| [
"noreply@github.com"
] | lanl.noreply@github.com |
f38ceb793d14ae0db2517c1d409cda0acfb893bb | dc804a6bff10318cea0546c2f1e2011d9a7a4679 | /Code/BP_framework/main.cpp | a536674c58c380632fe6cc3e5d51eeca2afbd39e | [] | no_license | PetrBarborka/BPrace | eb31df0ab32f79f27e18c460157c89925de3604d | 124cb72a695ec08c58417c1dd2c4e23629f29361 | refs/heads/master | 2021-01-18T21:42:36.496517 | 2016-05-12T21:51:55 | 2016-05-12T21:51:55 | 53,330,925 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,407 | cpp | //#include <QCoreApplication>
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/xfeatures2d.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
#include <fstream>
//#include <streambuf>
//#include <string>
#include <regex>
#include "utility.hpp"
#include "detection.hpp"
#include "description.hpp"
#include "homography.hpp"
//#include <boost/program_options/options_description.hpp>
//#include <boost/program_options/option.hpp>
//#include <boost/program_options/variables_map.hpp>
//#include "boost/program_options/parsers.hpp"
//#include "boost/algorithm/string.hpp"
//#include <ctime>
#include "json.hpp"
//#include <exception>
using json = nlohmann::json;
using namespace BP;
//namespace BP {
int main(int argc, char *argv[]) {
// std::cout << "argc: " << argc << "\n";
// for (int i = 0; i < argc; i++) {
// std::cout << "argv[" << i << "]: " << argv[i] << "\n";
// }
jsons_t conf_files = parseArgs(argc, argv);
// std::cout << "parseArgs ok";
if (conf_files.pictures.begin()++ == conf_files.pictures.end()) {
std::cout << "No pictures to test. --help for usage.\n";
return 0;
}
std::vector<homography_t> hgs;
computeAllHGs(hgs, conf_files.pictures, conf_files.config, conf_files.output);
if (hgs[0].show) {
cv::waitKey(0);
}
return 0;
}
//} //namespace BP
| [
"grim.ramone@gmail.com"
] | grim.ramone@gmail.com |
fa158ff961ac4559ccc40b58d442b1b7b6629a22 | 8536c27cbb8265d1fbc1ddd45e2081fd01abdfa7 | /MPI/lab2.cpp | a906774a99b34f413a29a1673c16bf491b61a6b7 | [] | no_license | tsimafeip/master-course | 03e6dd8e87ceebd4a67c636459579b796a03df97 | 3035792666fe167b2052e1d482768df2241e1d67 | refs/heads/master | 2021-07-20T06:55:25.152586 | 2021-01-03T19:28:40 | 2021-01-03T19:28:59 | 230,803,994 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,401 | cpp | //#include <mpi.h>
//#include <iostream>
//#include <string>
//#include <cmath>
//
//const int MSG_SEND_DOUBLE = 33;
//
//double f(double x) {
// return cos(x);
//}
//
//void send_idx(int idx, int dest) {
// MPI_Send(&idx, 1, MPI_INT, dest, MSG_SEND_DOUBLE, MPI_COMM_WORLD);
//}
//
//int main(int argc, char** argv) {
// int world_rank, world_size, master = 0, n = std::stoi(argv[1]), r = std::stoi(argv[2]), FINALIZE = -1;
// int a = 0, b = 1;
// double long_step = (b - a) * 1.0 / n;
// double short_step = long_step / r;
//
// MPI_Init(NULL, NULL);
//
// MPI_Comm_size(MPI_COMM_WORLD, &world_size);
//
// MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
//
// if (world_rank != master) {
// int i = 0;
// double partial_sum = 0.0;
// while (true) {
// // MPI_Send(
// // void* data,
// // int count,
// // MPI_Datatype datatype,
// // int destination,
// // int tag,
// // MPI_Comm communicator)
// MPI_Send(&partial_sum, 1, MPI_DOUBLE, master, MSG_SEND_DOUBLE, MPI_COMM_WORLD);
// // MPI_Recv(
// // void* data,
// // int count,
// // MPI_Datatype datatype,
// // int source,
// // int tag,
// // MPI_Comm communicator,
// // MPI_Status* status)
// MPI_Recv(&i, 1, MPI_INT, master, MSG_SEND_DOUBLE, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
// if (i == FINALIZE) {
// break;
// }
//
// double current_segment_start = a + i * long_step;
// partial_sum = 0;
// for (int r_i = 0; r_i < r; r_i++) {
// partial_sum += f(current_segment_start + r_i*short_step);
// }
// }
// }
// else {
// int processed_segments = 0, finalized_processes = 0;
// double final_sum = f(a), partial_sum;
// MPI_Status slave_status;
// // World size - amount of the working processes. We should extract master process and do not forget that process count starts from 1.
// while (finalized_processes < world_size-1) {
// MPI_Recv(&partial_sum, 1, MPI_DOUBLE, MPI_ANY_SOURCE, MSG_SEND_DOUBLE, MPI_COMM_WORLD, &slave_status);
// final_sum += partial_sum;
// if (processed_segments >= n) {
// send_idx(FINALIZE, slave_status.MPI_SOURCE);
// finalized_processes++;
// std::cout << "Finalized process " << finalized_processes << std::endl;
// }
// else {
// send_idx(processed_segments++, slave_status.MPI_SOURCE);
// }
// }
//
// std::cout << "Sum: " << final_sum * short_step << std::endl;
// }
//
// MPI_Finalize();
//
// return 0;
//} | [
"noreply@github.com"
] | tsimafeip.noreply@github.com |
d6399e55567dd4273549866cde7f3f0e1667238f | 3438e8c139a5833836a91140af412311aebf9e86 | /chrome/browser/chrome_device_client.h | a4ed096d07bfbcf1670d166c5001e7e300b7c9c4 | [
"BSD-3-Clause"
] | permissive | Exstream-OpenSource/Chromium | 345b4336b2fbc1d5609ac5a67dbf361812b84f54 | 718ca933938a85c6d5548c5fad97ea7ca1128751 | refs/heads/master | 2022-12-21T20:07:40.786370 | 2016-10-18T04:53:43 | 2016-10-18T04:53:43 | 71,210,435 | 0 | 2 | BSD-3-Clause | 2022-12-18T12:14:22 | 2016-10-18T04:58:13 | null | UTF-8 | C++ | false | false | 992 | h | // Copyright 2014 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_CHROME_DEVICE_CLIENT_H_
#define CHROME_BROWSER_CHROME_DEVICE_CLIENT_H_
#include "device/base/device_client.h"
#include <memory>
#include "base/compiler_specific.h"
#include "base/macros.h"
// Implementation of device::DeviceClient that returns //device service
// singletons appropriate for use within the Chrome application.
class ChromeDeviceClient : device::DeviceClient {
public:
ChromeDeviceClient();
~ChromeDeviceClient() override;
// device::DeviceClient implementation
device::UsbService* GetUsbService() override;
device::HidService* GetHidService() override;
private:
std::unique_ptr<device::HidService> hid_service_;
std::unique_ptr<device::UsbService> usb_service_;
DISALLOW_COPY_AND_ASSIGN(ChromeDeviceClient);
};
#endif // CHROME_BROWSER_CHROME_DEVICE_CLIENT_H_
| [
"support@opentext.com"
] | support@opentext.com |
c8202bd61e29f2628f585ea0ac7e5936c747b2df | 0dafa49f8b54e61ff635846ae9c3bcb327e17f06 | /Aufgabe3_b/main.cpp | 438d99cbec25013696ffd5cc196411ebf792abb4 | [] | no_license | Xellon92/Aufgabe3_b | c3e032a93365070a2675679b4a9fac12439fe905 | 7670a5fd9dcf67266086989c59d1df334dad9883 | refs/heads/master | 2020-09-08T07:59:04.663772 | 2019-11-12T18:57:24 | 2019-11-12T18:57:24 | 221,070,793 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 185 | cpp | #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
| [
"noreply@github.com"
] | Xellon92.noreply@github.com |
0c0c5320df3feec243980c16ad8a4dc7f6e25904 | 3c1679c8077bc4d2d9ee4cb4a197e2c108da4188 | /src/DirectoryCopier.h | d4b14222e7eef01f827df2871a3686eb0a0837af | [] | no_license | Teemperor/min-c | 1548d365e889fd338100ad25df8d62d6b49b1362 | 33f08705589edbfc5306b39dd4e2eca08487bc0a | refs/heads/master | 2020-04-06T06:22:42.406454 | 2017-02-28T13:48:53 | 2017-02-28T13:48:53 | 82,918,680 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,155 | h | #ifndef DIRECTORYCOPIER_H
#define DIRECTORYCOPIER_H
#include <string>
#include <vector>
#include <sys/stat.h>
#include <sys/types.h>
#include <random>
#include <unordered_map>
class DirectoryCopier {
public:
struct File {
std::string dirPath;
// full relative file path. Same as dirPath for directories
std::string filePath;
// file name
std::string fileName;
mode_t mode;
bool operator==(const File& other) const {
return filePath == other.filePath;
}
};
private:
std::string dir_;
std::mt19937 randomGenerator_;
std::vector<File> dirList_;
std::vector<File> fileList_;
std::unordered_map<std::string, File> fileMap_;
void traverseDir(const std::string& path);
public:
DirectoryCopier(const std::string& dir);
void recreate();
void createShallowCopy(const std::string& target);
void createDeepCopy(const std::string& target, const File& file);
const std::vector<File>& getFileList() const {
return fileList_;
}
const File& getFileByFilepath(const std::string& filePath) const;
};
#endif // DIRECTORYCOPIER_H
| [
"teemperor@gmail.com"
] | teemperor@gmail.com |
296191bdfa251970d8d7437f489e46b6b7ac1026 | e71807c58b97bc7c7ee286b5eb6c42421c0c0c22 | /ZKeyboardMouseHook.cpp | 0766db0857408475f1f184389475424cfc845424 | [] | no_license | henriquegnandt/Gunz1.5 | b42e086e3fe77084023c8aa6c2d037466d49c7ba | 36678e8c367e1a2ce8af6eed4fd54b3d76e67709 | refs/heads/master | 2022-04-13T13:20:24.702946 | 2020-03-27T00:47:37 | 2020-03-27T00:47:37 | 250,406,234 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,091 | cpp | #include "stdafx.h"
#include "OISInputManager.h"
#include "OISException.h"
#include "OISMouse.h"
#include "OISEvents.h"
#include "OISForceFeedback.h"
#include <iostream>
#include <vector>
#include <sstream>
#include "resource.h"
using namespace OIS;
#include "ZKeyboardMouseHook.h"
ZKeyboardMouseHook* ZKeyboardMouseHook::m_pInstance = NULL;
class EventHandler : public MouseListener
{
public:
EventHandler() {}
~EventHandler() {}
bool mouseMoved( const MouseEvent &arg ) {
const OIS::MouseState& s = arg.state;
std::cout << "\nMouseMoved: Abs("
<< s.X.abs << ", " << s.Y.abs << ", " << s.Z.abs << ") Rel("
<< s.X.rel << ", " << s.Y.rel << ", " << s.Z.rel << ")";
return true;
}
bool mousePressed( const MouseEvent &arg, MouseButtonID id ) {
const OIS::MouseState& s = arg.state;
std::cout << "\nMouse button #" << id << " pressed. Abs("
<< s.X.abs << ", " << s.Y.abs << ", " << s.Z.abs << ") Rel("
<< s.X.rel << ", " << s.Y.rel << ", " << s.Z.rel << ")";
return true;
}
bool mouseReleased( const MouseEvent &arg, MouseButtonID id ) {
const OIS::MouseState& s = arg.state;
std::cout << "\nMouse button #" << id << " released. Abs("
<< s.X.abs << ", " << s.Y.abs << ", " << s.Z.abs << ") Rel("
<< s.X.rel << ", " << s.Y.rel << ", " << s.Z.rel << ")";
return true;
}
};
ZKeyboardMouseHook::ZKeyboardMouseHook()
{
m_pInstance = this;
ParamList pl;
g_InputManager = InputManager::createInputSystem(pl);
g_InputManager->enableAddOnFactory(InputManager::AddOn_All);
g_m = (Mouse*)g_InputManager->createInputObject( OISMouse, true );
EventHandler handler;
g_m->setEventCallback( &handler );
const MouseState &ms = g_m->getMouseState();
ms.width = 1024;
ms.height = 768;
}
ZKeyboardMouseHook::~ZKeyboardMouseHook()
{
ZKeyboardMouseHook::m_pInstance = NULL;
}
void ZKeyboardMouseHook::Thread() {
try
{
while(true)
{
Sleep(90);
MSG msg;
while( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
if( g_m )
{
g_m->capture();
if( !g_m->buffered() )
handleNonBufferedMouse();
}
}
}
catch( const Exception &ex )
{
#if defined OIS_WIN32_PLATFORM
MessageBox( NULL, ex.eText, "An exception has occurred!", MB_OK |
MB_ICONERROR | MB_TASKMODAL);
#else
std::cout << "\nOIS Exception Caught!\n" << "\t" << ex.eText << "[Line "
<< ex.eLine << " in " << ex.eFile << "]\nExiting App";
#endif
}
catch(std::exception &ex)
{
std::cout << "Caught std::exception: what = " << ex.what() << std::endl;
}
//Destroying the manager will cleanup unfreed devices
if( g_InputManager )
InputManager::destroyInputSystem(g_InputManager);
}
LRESULT DlgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
return FALSE;
}
void ZKeyboardMouseHook::handleNonBufferedMouse()
{
const MouseState &ms = g_m->getMouseState();
std::cout << "\nMouse: Abs(" << ms.X.abs << " " << ms.Y.abs << " " << ms.Z.abs
<< ") B: " << ms.buttons << " Rel(" << ms.X.rel << " " << ms.Y.rel << " " << ms.Z.rel << ")";
} | [
"henrique.gnandt@trustt.com.br"
] | henrique.gnandt@trustt.com.br |
1aa83cece433599bf1ff9e6ebc7c76962e3eee6a | 39f3baeb1824e9f93773038856c469778e23180c | /inc/vnLog.h | b7275a417ae0a644f3ebda506e785e7324aa00d2 | [] | no_license | signorinotang/vn2d | 965d247f0db1348eed0977628bcb4326bcd5a4e2 | d653e2b787532f428d227a8613aa961d1e97c89f | refs/heads/master | 2020-03-28T19:11:14.709615 | 2014-07-03T02:30:20 | 2014-07-03T02:30:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,217 | h | //
// vnLog.h
// vnbase
//
// Created by Wayne on 13-12-20.
// Copyright (c) 2013 viichi.com. All rights reserved.
//
#ifndef vnbase_vnLog_h
#define vnbase_vnLog_h
#include "vnSingleton.h"
#include "vnRefCounted.h"
#include "vnFastMutex.h"
#include <vector>
#include <sstream>
#define VN_LOG_DEBUG(x) \
{\
_vn_ns::Log &_log = _vn_ns::Log::instance();\
if (_log.checkLevel(_vn_ns::Log::kDebug)) {\
_vn_ns::Log::stream(_log, _vn_ns::Log::kDebug) << x;\
}\
}
#define VN_LOG_INFO(x) \
{\
_vn_ns::Log &_log = _vn_ns::Log::instance();\
if (_log.checkLevel(_vn_ns::Log::kInformation)) {\
_vn_ns::Log::stream(_log, _vn_ns::Log::kInformation) << x;\
}\
}
#define VN_LOG_WARN(x) \
{\
_vn_ns::Log &_log = _vn_ns::Log::instance();\
if (_log.checkLevel(_vn_ns::Log::kWarning)) {\
_vn_ns::Log::stream(_log, _vn_ns::Log::kWarning) << x; \
}\
}
#define VN_LOG_ERROR(x) \
{\
_vn_ns::Log &_log = _vn_ns::Log::instance();\
if (_log.checkLevel(_vn_ns::Log::kError)) {\
_vn_ns::Log::stream(_log, _vn_ns::Log::kError) << x; \
}\
}
#define VN_LOG_FATAL(x) \
{\
_vn_ns::Log &_log = _vn_ns::Log::instance();\
if (_log.checkLevel(_vn_ns::Log::kFatalError)) {\
_vn_ns::Log::stream(_log, _vn_ns::Log::kFatalError) << x; \
}\
}
_vn_begin
class LogPrinter;
class _vn_base_api Log : public Singleton<Log> {
public:
enum Level {
kDebug = 0,
kInformation,
kWarning,
kError,
kFatalError
};
class _vn_base_api stream {
friend class Log;
public:
stream(Level);
stream(Log &, Level);
~stream();
stream & operator <<(bool v);
stream & operator <<(s8 v);
stream & operator <<(u8 v);
stream & operator <<(s16 v);
stream & operator <<(u16 v);
stream & operator <<(s32 v);
stream & operator <<(u32 v);
stream & operator <<(s64 v);
stream & operator <<(u64 v);
stream & operator <<(f32 v);
stream & operator <<(f64 v);
stream & operator <<(long v);
stream & operator <<(unsigned long v);
stream & operator <<(const c8 *v);
stream & operator <<(const str8 &v);
stream & operator <<(const c16 *v);
stream & operator <<(const str16 &v);
stream & operator <<(const c32 *v);
stream & operator <<(const str32 &v);
private:
Level m_level;
Log &m_log;
std::basic_ostringstream<c8> m_oss;
};
Log();
~Log();
void addPrinter(LogPrinter *printer, bool grab = true);
void removePrinter(LogPrinter *printer);
void removeAllPrinters();
bool checkLevel(Level ll);
void setLevel(Level ll);
Level getLevel() const;
private:
void _output(Level ll, const str8 &content);
friend class stream;
typedef std::vector<LogPrinter *> Printers;
Printers m_printers;
Level m_level;
};
class _vn_base_api LogPrinter : public RefCounted {
public:
void print(Log::Level, const str8 &);
protected:
virtual void _print(Log::Level, const str8 &) = 0;
private:
FastMutex m_lock;
};
class _vn_base_api LogPrinterSTDOUT : public LogPrinter {
protected:
virtual void _print(Log::Level, const str8 &);
};
_vn_end
#endif
| [
"tanghailong@longsgoo.com"
] | tanghailong@longsgoo.com |
b7628e089ebd71d5c8b772fb1a88c95cb5224e0c | 7416235b0d156e9778766844141eec453ba5803e | /CPUDrivenGPUTest2/Software_d3d9_Driver/Software_d3d9_Driver/IDirect3DStateBlock9Hook.h | eb450cadd0e4de6478e84cc9a6fe483240fb1c17 | [
"Zlib"
] | permissive | code-tom-code/FPGAGPUTesting | 1dd575767226503c014e71337b43990a69870188 | 1ae15035637c1bdabc73fefd66e0046793666447 | refs/heads/master | 2023-08-04T12:02:43.399872 | 2023-08-03T04:29:29 | 2023-08-03T04:29:29 | 222,173,769 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 19,703 | h | #pragma once
#include "IDirect3DDevice9Hook.h"
enum StateBlockSetCallType : unsigned char
{
SBT_SetFVF = 0,
SBT_SetIndices,
SBT_SetMaterial,
SBT_SetNPatchMode,
SBT_SetPixelShader,
SBT_SetScissorRect,
SBT_SetViewport,
SBT_SetVertexDeclaration,
SBT_SetVertexShader,
SBT_SetCurrentTexturePalette,
SBT_MAX
};
struct capturedStateBitmask
{
capturedStateBitmask()
{
memset(this, 0, sizeof(*this) );
}
~capturedStateBitmask()
{
delete capturedLights;
capturedLights = NULL;
}
// TODO: All of the other captureable device state (textures, vertex decls, VB's, IB's, texture stage states, etc.)
struct _capturedRenderstates
{
unsigned captureRenderstate[0x100 / 32];
} capturedRenderstates;
union _capturedUserClipPlanes
{
DWORD userClipPlanesBitmask;
struct
{
BOOL userClipPlane0 : 1; BOOL userClipPlane1 : 1; BOOL userClipPlane2 : 1; BOOL userClipPlane3 : 1;
BOOL userClipPlane4 : 1; BOOL userClipPlane5 : 1; BOOL userClipPlane6 : 1; BOOL userClipPlane7 : 1;
BOOL userClipPlane8 : 1; BOOL userClipPlane9 : 1; BOOL userClipPlane10 : 1; BOOL userClipPlane11 : 1;
BOOL userClipPlane12 : 1; BOOL userClipPlane13 : 1; BOOL userClipPlane14 : 1; BOOL userClipPlane15 : 1;
BOOL userClipPlane16 : 1; BOOL userClipPlane17 : 1; BOOL userClipPlane18 : 1; BOOL userClipPlane19 : 1;
BOOL userClipPlane20 : 1; BOOL userClipPlane21 : 1; BOOL userClipPlane22 : 1; BOOL userClipPlane23 : 1;
BOOL userClipPlane24 : 1; BOOL userClipPlane25 : 1; BOOL userClipPlane26 : 1; BOOL userClipPlane27 : 1;
BOOL userClipPlane28 : 1; BOOL userClipPlane29 : 1; BOOL userClipPlane30 : 1; BOOL userClipPlane31 : 1;
} userClipPlanesNamed;
} capturedUserClipPlanes;
static_assert(sizeof(capturedUserClipPlanes) == sizeof(DWORD), "Error: Unexpected union size!");
union _capturedStreamSources
{
unsigned short streamSourcesBitmask;
struct
{
unsigned short streamSource0 : 1; unsigned short streamSource1 : 1; unsigned short streamSource2 : 1; unsigned short streamSource3 : 1;
unsigned short streamSource4 : 1; unsigned short streamSource5 : 1; unsigned short streamSource6 : 1; unsigned short streamSource7 : 1;
unsigned short streamSource8 : 1; unsigned short streamSource9 : 1; unsigned short streamSource10 : 1; unsigned short streamSource11 : 1;
unsigned short streamSource12 : 1; unsigned short streamSource13 : 1; unsigned short streamSource14 : 1; unsigned short streamSource15 : 1;
} streamSourcesNamed;
} capturedStreamSources;
static_assert(sizeof(capturedStreamSources) == sizeof(unsigned short), "Error: Unexpected union size!");
union _capturedStreamSourceFreq
{
unsigned short streamSourceFreqBitmask;
struct
{
unsigned short streamSourceFreq0 : 1; unsigned short streamSourceFreq1 : 1; unsigned short streamSourceFreq2 : 1; unsigned short streamSourceFreq3 : 1;
unsigned short streamSourceFreq4 : 1; unsigned short streamSourceFreq5 : 1; unsigned short streamSourceFreq6 : 1; unsigned short streamSourceFreq7 : 1;
unsigned short streamSourceFreq8 : 1; unsigned short streamSourceFreq9 : 1; unsigned short streamSourceFreq10 : 1; unsigned short streamSourceFreq11 : 1;
unsigned short streamSourceFreq12 : 1; unsigned short streamSourceFreq13 : 1; unsigned short streamSourceFreq14 : 1; unsigned short streamSourceFreq15 : 1;
} streamSourceFreqsNamed;
} capturedStreamSourceFreq;
static_assert(sizeof(capturedStreamSourceFreq) == sizeof(unsigned short), "Error: Unexpected union size!");
struct _capturedTransforms
{
bool viewCaptured;
bool projectionCaptured;
union
{
unsigned char textureTransformsCapturedBitmask;
struct
{
unsigned char textureTransform0 : 1; unsigned char textureTransform1 : 1; unsigned char textureTransform2 : 1; unsigned char textureTransform3 : 1;
unsigned char textureTransform4 : 1; unsigned char textureTransform5 : 1; unsigned char textureTransform6 : 1; unsigned char textureTransform7 : 1;
} textureTransformsCapturedNamed;
} textureTransformsCaptured;
static_assert(sizeof(textureTransformsCaptured) == sizeof(unsigned char), "Error: Unexpected union size!");
unsigned captureWorldTransforms[MAX_WORLD_TRANSFORMS / 32];
} capturedTransforms;
struct capturedShaderConstants
{
unsigned long floatsCaptured[4096 / 32];
union nonFloatCapturedBits
{
struct
{
unsigned short constant0 : 1; unsigned short constant1 : 1; unsigned short constant2 : 1; unsigned short constant3 : 1;
unsigned short constant4 : 1; unsigned short constant5 : 1; unsigned short constant6 : 1; unsigned short constant7 : 1;
unsigned short constant8 : 1; unsigned short constant9 : 1; unsigned short constant10 : 1; unsigned short constant11 : 1;
unsigned short constant12 : 1; unsigned short constant13 : 1; unsigned short constant14 : 1; unsigned short constant15 : 1;
} capturedConstantsNamed;
unsigned short capturedConstantsBitmask;
};
static_assert(sizeof(nonFloatCapturedBits) == sizeof(unsigned short), "Error: Unexpected union size!");
nonFloatCapturedBits intCaptured;
nonFloatCapturedBits boolCaptured;
inline void MarkSetShaderConstantF(const UINT constantIndex)
{
if (constantIndex >= 4096)
return;
const unsigned constantSetIndex = constantIndex / 32;
const unsigned constantSetBitmask = (1 << (constantIndex % 32) );
floatsCaptured[constantSetIndex] |= constantSetBitmask;
}
inline void MarkSetShaderConstantNonF(const UINT constantIndex, nonFloatCapturedBits& nonFCapture)
{
if (constantIndex >= 16)
return;
const unsigned short constantSetBitmask = (1 << constantIndex);
nonFCapture.capturedConstantsBitmask |= constantSetBitmask;
}
inline void MarkSetShaderConstantI(const UINT constantIndex)
{
MarkSetShaderConstantNonF(constantIndex, intCaptured);
}
inline void MarkSetShaderConstantB(const UINT constantIndex)
{
MarkSetShaderConstantNonF(constantIndex, boolCaptured);
}
inline void MarkSetAllShaderConstantsCaptured()
{
for (unsigned x = 0; x < ARRAYSIZE(floatsCaptured); ++x)
floatsCaptured[x] = 0xFFFFFFFF;
intCaptured.capturedConstantsBitmask = 0xFFFF;
boolCaptured.capturedConstantsBitmask = 0xFFFF;
}
};
capturedShaderConstants capturedPixelShaderConstants;
capturedShaderConstants capturedVertexShaderConstants;
struct _capturedTextures
{
unsigned captureTextures[(MAX_NUM_SAMPLERS + 31) / 32];
} capturedTextures;
struct _capturedTextureStageStates
{
union _stageStateBits
{
struct
{
unsigned colorOp : 1; // D3DTSS_COLOROP = bit 0
unsigned colorArg1 : 1; // D3DTSS_COLORARG1 = bit 1
unsigned colorArg2 : 1; // D3DTSS_COLORARG2 = bit 2
unsigned alphaOp : 1; // D3DTSS_ALPHAOP = bit 3
unsigned alphaArg1 : 1; // D3DTSS_ALPHAARG1 = bit 4
unsigned alphaArg2 : 1; // D3DTSS_ALPHAARG2 = bit 5
unsigned bumpEnvMat00 : 1; // D3DTSS_BUMPENVMAT00 = bit 6
unsigned bumpEnvMat01 : 1; // D3DTSS_BUMPENVMAT01 = bit 7
unsigned bumpEnvMat10 : 1; // D3DTSS_BUMPENVMAT10 = bit 8
unsigned bumpEnvMat11 : 1; // D3DTSS_BUMPENVMAT11 = bit 9
unsigned texCoordIndex : 1; // D3DTSS_TEXCOORDINDEX = bit 10
unsigned unused0 : 10;
unsigned bumpEnvLScale : 1; // D3DTSS_BUMPENVLSCALE = bit 21
unsigned bumpEnvLOffset : 1; // D3DTSS_BUMPENVLOFFSET = bit 22
unsigned textureTransformFlags : 1; // D3DTSS_TEXTURETRANSFORMFLAGS = bit 23
unsigned unused1 : 1;
unsigned colorArg0 : 1; // D3DTSS_COLORARG0 = bit 25
unsigned alphaArg0 : 1; // D3DTSS_ALPHAARG0 = bit 26
unsigned resultArg : 1; // D3DTSS_RESULTARG = bit 27
unsigned unused2 : 3;
unsigned constant : 1; // D3DTSS_CONSTANT = bit 31
} stageStateNamed;
unsigned stageStateBitfields;
};
static_assert(sizeof(_stageStateBits) == sizeof(unsigned), "Error: Unexpected union size!");
_stageStateBits capturedTextureStages[MAX_NUM_TEXTURE_STAGE_STATES];
} capturedTextureStageStates;
struct _capturedSamplerStates
{
union _samplerStateUnion
{
struct
{
unsigned short unused0 : 1;//= 0
unsigned short ADDRESSU : 1;//= 1 D3DTEXTUREADDRESS for U coordinate
unsigned short ADDRESSV : 1;//= 2 D3DTEXTUREADDRESS for V coordinate
unsigned short ADDRESSW : 1;//= 3 D3DTEXTUREADDRESS for W coordinate
unsigned short BORDERCOLOR : 1;//= 4 D3DCOLOR
unsigned short MAGFILTER : 1;//= 5 D3DTEXTUREFILTER filter to use for magnification
unsigned short MINFILTER : 1;//= 6 D3DTEXTUREFILTER filter to use for minification
unsigned short MIPFILTER : 1;//= 7 D3DTEXTUREFILTER filter to use between mipmaps during minification
unsigned short MIPMAPLODBIAS : 1;//= 8 float Mipmap LOD bias
unsigned short MAXMIPLEVEL : 1;//= 9 DWORD 0..(n-1) LOD index of largest map to use (0 == largest)
unsigned short MAXANISOTROPY : 1;//= 10 DWORD maximum anisotropy
unsigned short SRGBTEXTURE : 1;//= 11 Default = 0 (which means Gamma 1.0, no correction required.) else correct for Gamma = 2.2
unsigned short ELEMENTINDEX : 1;//= 12 When multi-element texture is assigned to sampler, this indicates which element index to use. Default = 0.
unsigned short DMAPOFFSET : 1;//= 13 Offset in vertices in the pre-sampled displacement map. Only valid for D3DDMAPSAMPLER sampler
} samplerStateNamed;
unsigned short samplerStateBitmask;
};
_samplerStateUnion samplerStates[MAX_NUM_SAMPLERS];
} capturedSamplerStates;
struct lightCaptureStruct
{
lightCaptureStruct() : captureLightEnable(false), lightEnable(false), captureSetLight(false)
{
}
bool captureLightEnable;
bool lightEnable;
bool captureSetLight;
};
std::map<UINT, lightCaptureStruct>* capturedLights;
bool singleCallStatesCaptured[SBT_MAX];
};
class IDirect3DStateBlock9Hook : public IDirect3DStateBlock9
{
public:
IDirect3DStateBlock9Hook(LPDIRECT3DSTATEBLOCK9 _realObject, IDirect3DDevice9Hook* _parentDevice, const bool _isCompleteStateBlock) : realObject(_realObject), parentDevice(_parentDevice), refCount(1), internalStateBlockType( (const D3DSTATEBLOCKTYPE)0), isCompleteStateBlock(_isCompleteStateBlock)
{
#ifdef _DEBUG
if (realObject)
CreationCallStack = realObject->CreationCallStack;
#endif
}
virtual ~IDirect3DStateBlock9Hook()
{
#ifdef WIPE_ON_DESTRUCT_D3DHOOKOBJECT
memset(this, 0x00000000, sizeof(*this) );
#endif
}
/*** IUnknown methods ***/
virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE QueryInterface(THIS_ REFIID riid, void** ppvObj) override;
virtual COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE AddRef(THIS) override;
virtual COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE Release(THIS) override;
/*** IDirect3DStateBlock9 methods ***/
virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetDevice(THIS_ IDirect3DDevice9** ppDevice) override;
virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE Capture(THIS) override;
virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE Apply(THIS) override;
/*** IDirect3DStateBlock9Hook methods ***/
inline void SetRealObject(LPDIRECT3DSTATEBLOCK9 _realObject)
{
#ifdef _DEBUG
if (_realObject == NULL)
{
// SetRealObject() should never be used to NULL out the underlying state block object
__debugbreak();
}
if (realObject != NULL)
{
// SetRealObject() should never be used to change an existing state block's underlying real state block
__debugbreak();
}
#endif
realObject = _realObject;
#ifdef _DEBUG
if (realObject)
CreationCallStack = realObject->CreationCallStack;
#endif
}
inline DeviceState* const GetDeviceStateForWrite()
{
return &stateBlockState;
}
inline const DeviceState* const GetDeviceStateForRead()
{
return &stateBlockState;
}
inline void MarkRenderStateAsCaptured(const D3DRENDERSTATETYPE renderState)
{
#ifdef _DEBUG
if (renderState > 255)
{
__debugbreak(); // Should never get here
}
#endif
const unsigned dwordIndex = renderState / 32;
const unsigned bitMask = 1 << (renderState % 32);
capturedStates.capturedRenderstates.captureRenderstate[dwordIndex] |= bitMask;
}
template <const StateBlockSetCallType callType>
inline void MarkSetCallAsCaptured()
{
capturedStates.singleCallStatesCaptured[callType] = true;
}
inline void MarkSetClipPlaneCaptured(const DWORD clipPlaneIndex)
{
if (clipPlaneIndex < D3DMAXUSERCLIPPLANES)
capturedStates.capturedUserClipPlanes.userClipPlanesBitmask |= (1 << clipPlaneIndex);
}
inline void MarkSetStreamSourceCaptured(const UINT streamNumber)
{
if (streamNumber < MAX_D3D9_STREAMS)
capturedStates.capturedStreamSources.streamSourcesBitmask |= (1 << streamNumber);
}
inline void MarkSetStreamSourceFreqCaptured(const UINT streamNumber)
{
if (streamNumber < MAX_D3D9_STREAMS)
capturedStates.capturedStreamSourceFreq.streamSourceFreqBitmask |= (1 << streamNumber);
}
inline void MarkSetTransformCaptured(const D3DTRANSFORMSTATETYPE Transform)
{
if (Transform < D3DTS_WORLD)
{
switch (Transform)
{
case D3DTS_VIEW:
capturedStates.capturedTransforms.viewCaptured = true;
break;
case D3DTS_PROJECTION:
capturedStates.capturedTransforms.projectionCaptured = true;
break;
case D3DTS_TEXTURE0:
case D3DTS_TEXTURE1:
case D3DTS_TEXTURE2:
case D3DTS_TEXTURE3:
case D3DTS_TEXTURE4:
case D3DTS_TEXTURE5:
case D3DTS_TEXTURE6:
case D3DTS_TEXTURE7:
{
const unsigned char setBitMask = (1 << (Transform - D3DTS_TEXTURE0) );
capturedStates.capturedTransforms.textureTransformsCaptured.textureTransformsCapturedBitmask |= setBitMask;
}
break;
default:
// Should never be here, but do nothing in this case
break;
}
}
else if (Transform < D3DTS_WORLDMATRIX(MAX_WORLD_TRANSFORMS) ) // World transforms
{
const unsigned worldTransformIndex = Transform - D3DTS_WORLD;
const unsigned dwordIndex = worldTransformIndex / 32;
const unsigned bitMask = 1 << (worldTransformIndex % 32);
capturedStates.capturedTransforms.captureWorldTransforms[dwordIndex] |= bitMask;
}
else
{
// Should never be here, but do nothing in this case
#ifdef _DEBUG
__debugbreak();
#endif
}
}
inline void MarkSetPixelShaderConstantF(const UINT constantIndex)
{
capturedStates.capturedPixelShaderConstants.MarkSetShaderConstantF(constantIndex);
}
inline void MarkSetPixelShaderConstantI(const UINT constantIndex)
{
capturedStates.capturedPixelShaderConstants.MarkSetShaderConstantI(constantIndex);
}
inline void MarkSetPixelShaderConstantB(const UINT constantIndex)
{
capturedStates.capturedPixelShaderConstants.MarkSetShaderConstantB(constantIndex);
}
inline void MarkSetVertexShaderConstantF(const UINT constantIndex)
{
capturedStates.capturedVertexShaderConstants.MarkSetShaderConstantF(constantIndex);
}
inline void MarkSetVertexShaderConstantI(const UINT constantIndex)
{
capturedStates.capturedVertexShaderConstants.MarkSetShaderConstantI(constantIndex);
}
inline void MarkSetVertexShaderConstantB(const UINT constantIndex)
{
capturedStates.capturedVertexShaderConstants.MarkSetShaderConstantB(constantIndex);
}
inline void MarkSetTextureCaptured(const UINT textureIndex)
{
#ifdef _DEBUG
if (textureIndex > MAX_NUM_SAMPLERS)
{
__debugbreak(); // Should never get here
}
#endif
const unsigned dwordIndex = textureIndex / 32;
const unsigned bitMask = 1 << (textureIndex % 32);
capturedStates.capturedTextures.captureTextures[dwordIndex] |= bitMask;
}
inline void MarkSetTextureStageStateCaptured(const UINT textureStageNum, const D3DTEXTURESTAGESTATETYPE stateType)
{
if (textureStageNum >= D3DDP_MAXTEXCOORD)
{
#ifdef _DEBUG
__debugbreak(); // Should never be here
#endif
return;
}
if (stateType < D3DTSS_COLOROP || stateType > D3DTSS_CONSTANT)
{
#ifdef _DEBUG
__debugbreak(); // Should never be here
#endif
return;
}
const unsigned stateIndex = stateType - 1;
const unsigned stateBitmask = 1 << stateIndex;
capturedStates.capturedTextureStageStates.capturedTextureStages[textureStageNum].stageStateBitfields |= stateBitmask;
}
inline void MarkSetSamplerStateCaptured(const UINT SamplerNum, const D3DSAMPLERSTATETYPE type)
{
if (SamplerNum >= MAX_NUM_SAMPLERS)
{
#ifdef _DEBUG
__debugbreak(); // Should never be here
#endif
return;
}
if (type < D3DSAMP_ADDRESSU || type > D3DSAMP_DMAPOFFSET)
{
#ifdef _DEBUG
__debugbreak(); // Should never be here
#endif
return;
}
const unsigned short samplerTypeBitmask = 1 << type;
capturedStates.capturedSamplerStates.samplerStates[SamplerNum].samplerStateBitmask |= samplerTypeBitmask;
}
inline void MarkLightEnableCaptured(const UINT lightNum, const bool doEnable)
{
if (capturedStates.capturedLights == NULL)
capturedStates.capturedLights = new std::map<UINT, capturedStateBitmask::lightCaptureStruct>;
std::map<UINT, capturedStateBitmask::lightCaptureStruct>::iterator findExistingLightIt = capturedStates.capturedLights->find(lightNum);
if (findExistingLightIt == capturedStates.capturedLights->end() )
{
capturedStateBitmask::lightCaptureStruct newLightCapture;
newLightCapture.captureLightEnable = true;
newLightCapture.lightEnable = doEnable;
capturedStates.capturedLights->insert(std::make_pair(lightNum, newLightCapture) );
}
else
{
capturedStateBitmask::lightCaptureStruct& foundLightCapture = findExistingLightIt->second;
foundLightCapture.captureLightEnable = true;
foundLightCapture.lightEnable = doEnable;
}
}
inline void MarkSetLightCaptured(const UINT lightNum)
{
if (capturedStates.capturedLights == NULL)
capturedStates.capturedLights = new std::map<UINT, capturedStateBitmask::lightCaptureStruct>;
std::map<UINT, capturedStateBitmask::lightCaptureStruct>::iterator findExistingLightIt = capturedStates.capturedLights->find(lightNum);
if (findExistingLightIt == capturedStates.capturedLights->end() )
{
capturedStateBitmask::lightCaptureStruct newLightCapture;
newLightCapture.captureSetLight = true;
capturedStates.capturedLights->insert(std::make_pair(lightNum, newLightCapture) );
}
else
{
capturedStateBitmask::lightCaptureStruct& foundLightCapture = findExistingLightIt->second;
foundLightCapture.captureSetLight = true;
}
}
// This is intended to be called from IDirect3DDevice9Hook::CreateStateBlock
void InitializeListAndCapture(const D3DSTATEBLOCKTYPE type);
protected:
LPDIRECT3DSTATEBLOCK9 realObject;
IDirect3DDevice9Hook* parentDevice;
unsigned __int64 refCount;
D3DSTATEBLOCKTYPE internalStateBlockType;
bool isCompleteStateBlock; // true if this state block was created from IDirect3DDevice9::CreateStateBlock(), or false if this state block was created from IDirect3DDevice9::BeginStateBlock() + IDirect3DDevice9::EndStateBlock()
__declspec(align(16) ) DeviceState stateBlockState;
__declspec(align(16) ) capturedStateBitmask capturedStates;
};
| [
"48116778+code-tom-code@users.noreply.github.com"
] | 48116778+code-tom-code@users.noreply.github.com |
dc1a8454824357da47d734f4ea0d2b10b1f25a6f | e1ff993c7adad6c89a85d470bc904e7d852601d4 | /Operations/ArrayDeclaration.h | e8728c398b6937484a7aa8e34485927c5bedf3ef | [] | no_license | i2070p/R-nd | a3a2926e4f1c403c2d5b1361289550b49352cf33 | 7b870b6bf2ae87457357e47bad46d9eb0c2fa270 | refs/heads/master | 2021-01-19T05:09:56.630283 | 2015-05-24T23:09:32 | 2015-05-24T23:09:32 | 34,376,132 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 719 | h | #pragma once
#include "SimpleOperation.h"
#include "../Elements/NameElement.h"
#include "../StackAdapter.h"
#include "Type.h"
#include "Expression.h"
#include "../Strings.h"
using namespace std;
class ArrayDeclaration : public SimpleOperation {
public:
ArrayDeclaration(Operation * parent, NameElement* var, Type * type, int size) : SimpleOperation(parent) {
this->var = var;
this->type = type;
this->size = size;
}
protected:
NameElement * var;
Type * type;
int size;
void generate(SpimCodeContainer * spimCode) {
stringstream line;
// this->type->setArrayType();
spimCode->addArray(this->var->toString(), this->type, this->size);
}
};
| [
"meti@devdeb"
] | meti@devdeb |
9249ca94ef8b7a7035e76c27c046433e4f18882d | 550963b7a93f47c1c011ee0a20c98c1662884e79 | /src/qt/coincontroltreewidget.cpp | 1146ae0952cbd2bef10422b7f0b2c2d24bcf27be | [
"MIT"
] | permissive | bankonme/MUE-Src | eb1a0e4462d7d5f0632775646aa0c8eab200578d | 598ceebd4a90417a65c23a9d69232f836ef3b89c | refs/heads/master | 2021-01-17T23:25:47.305638 | 2015-06-10T00:36:28 | 2015-06-10T00:36:28 | 40,028,999 | 1 | 0 | null | 2015-07-31T23:39:22 | 2015-07-31T23:39:20 | null | UTF-8 | C++ | false | false | 1,094 | cpp | // Copyright (c) 2009-2015 Bitcoin Developers
// Copyright (c) 2014-2015 MonetaryUnit Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "coincontroltreewidget.h"
#include "coincontroldialog.h"
CoinControlTreeWidget::CoinControlTreeWidget(QWidget *parent) :
QTreeWidget(parent)
{
}
void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Space) // press spacebar -> select checkbox
{
event->ignore();
int COLUMN_CHECKBOX = 0;
this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
}
else if (event->key() == Qt::Key_Escape) // press esc -> close dialog
{
event->ignore();
CoinControlDialog *coinControlDialog = (CoinControlDialog*)this->parentWidget();
coinControlDialog->done(QDialog::Accepted);
}
else
{
this->QTreeWidget::keyPressEvent(event);
}
}
| [
"upgradeadvice@gmail.com"
] | upgradeadvice@gmail.com |
6e95a190ed15ce7ce79a618ea0463fee0570f069 | 28bf7793cde66074ac6cbe2c76df92bd4803dab9 | /answers/kshitizpriyam/Day 19/Q2.cpp | 7fc5c372b7e5d55f8316571ef8e137219b1be163 | [
"MIT"
] | permissive | Codechef-SRM-NCR-Chapter/30-DaysOfCode-March-2021 | 2dee33e057ba22092795a6ecc6686a9d31607c9d | 66c7d85025481074c93cfda7853b145c88a30da4 | refs/heads/main | 2023-05-29T10:33:31.795738 | 2021-06-10T14:57:30 | 2021-06-10T14:57:30 | 348,153,476 | 22 | 135 | MIT | 2021-06-10T14:57:31 | 2021-03-15T23:37:26 | Java | UTF-8 | C++ | false | false | 454 | cpp | #include<iostream>
using namespace std;
int count_triplets(int a[], int n, int X){
int count=0;
for(int i=0;i<n-2;i++){
for(int j=i+1;j<n-1;j++){
for(int k=j+1;k<n;k++)
if(a[i]+a[j]+a[k]<X)
count++;
}
}
return count;
}
int main(){
int a[100],n,X;
cout<<"Enter a limit: ";
cin>>n;
cout<<"Enter the array: ";
for(int i=0;i<n;i++){
cin>>a[i];
}
cout<<"Enter the no. : ";
cin>>X;
cout<<count_triplets(a,n,X)<<endl;
}
| [
"noreply@github.com"
] | Codechef-SRM-NCR-Chapter.noreply@github.com |
9026c9aeeffca4df6c383e830dcc28c2cdb972c7 | 6bf47fbfba9c064a130ee33abba9a0032dd469f9 | /CPP01/ex00/main.cpp | d9cd59039dfb5a73f097a0a1e6fca7e6befd0080 | [] | no_license | Kirakise/CPPModules | 0713e74687f2e42c89c220133283b327ce1e2d99 | 3d4f09c09c11a700322a5d185e8cebe68fad2982 | refs/heads/master | 2023-08-30T15:37:52.968582 | 2021-11-01T19:18:22 | 2021-11-01T19:18:22 | 376,305,632 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 259 | cpp | #include "Zombie.hpp"
int main()
{
Zombie type1arr[10];
std::srand(std::time(NULL));
for (int i = 0; i < 10; i++)
{
type1arr[i].randname(5);
type1arr[i].announce();
}
std::cout << "Here comes random chump!" << std::endl;
Zombie::RandomChump(5);
} | [
"rcaraway@oa-j3.msk.21-school.ru"
] | rcaraway@oa-j3.msk.21-school.ru |
aafc3d9c020f96f36905a2f2ffb1bbe5284f3f11 | 5ecc2a46c53bf2b65dd1fac65a772647784b5ef5 | /venv/Lib/site-packages/tensorflow/include/external/llvm-project/mlir/include/mlir/Interfaces/DataLayoutTypeInterface.cpp.inc | fcd9f3a099e925abc35af31d01f72ed40bb90eba | [
"LLVM-exception",
"Apache-2.0"
] | permissive | kanungosuyash/CSCI527game | 8578185853d14aebe04e099ab056da8c5233d8de | 7fbc9da0360756402fa01d6eebb87a8bb9236d71 | refs/heads/master | 2023-08-02T12:40:28.694846 | 2021-09-13T16:11:49 | 2021-09-13T16:11:49 | 401,088,055 | 1 | 0 | null | 2021-09-13T00:19:46 | 2021-08-29T16:22:30 | Python | UTF-8 | C++ | false | false | 1,913 | inc | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Interface Definitions *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
unsigned mlir::DataLayoutTypeInterface::getTypeSize(const ::mlir::DataLayout & dataLayout, ::mlir::DataLayoutEntryListRef params) const {
return getImpl()->getTypeSize(getImpl(), *this, dataLayout, params);
}
unsigned mlir::DataLayoutTypeInterface::getTypeSizeInBits(const ::mlir::DataLayout & dataLayout, ::mlir::DataLayoutEntryListRef params) const {
return getImpl()->getTypeSizeInBits(getImpl(), *this, dataLayout, params);
}
unsigned mlir::DataLayoutTypeInterface::getABIAlignment(const ::mlir::DataLayout & dataLayout, ::mlir::DataLayoutEntryListRef params) const {
return getImpl()->getABIAlignment(getImpl(), *this, dataLayout, params);
}
unsigned mlir::DataLayoutTypeInterface::getPreferredAlignment(const ::mlir::DataLayout & dataLayout, ::mlir::DataLayoutEntryListRef params) const {
return getImpl()->getPreferredAlignment(getImpl(), *this, dataLayout, params);
}
bool mlir::DataLayoutTypeInterface::areCompatible(::mlir::DataLayoutEntryListRef oldLayout, ::mlir::DataLayoutEntryListRef newLayout) const {
return getImpl()->areCompatible(getImpl(), *this, oldLayout, newLayout);
}
::mlir::LogicalResult mlir::DataLayoutTypeInterface::verifyEntries(::mlir::DataLayoutEntryListRef entries, ::mlir::Location loc) const {
return getImpl()->verifyEntries(getImpl(), *this, entries, loc);
}
| [
"msingh60@usc.edu"
] | msingh60@usc.edu |
cbebaf6e9d93bf68dfc5f4e02cffdfaa040508fc | f0e276cd595518a98c857b3cf9a9db95bc639d70 | /list_list_int.cpp | 2148930387b79a7a2f79ac0e1d3b0765e32fbb5b | [] | no_license | greshem/develop_cpp | caa6fa4f07d925ff1423cab2f29684de40748eb3 | 4f3d4b780eed8d7d678b975c7f098f58bb3b860e | refs/heads/master | 2021-01-19T01:53:15.922285 | 2017-10-08T07:25:35 | 2017-10-08T07:25:35 | 45,077,580 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 855 | cpp | //主要是为了体现struct 的operator 操作符.
#include <list>
#include <algorithm>
#include <iostream>
using namespace std;
struct Exist
{
int Target;
Exist( const int& t ):Target(t){};
bool operator()( const int& s ) { return s == Target; }
};
main()
{
list<int> list_int;
list<int>::iterator it;
int i;
for(i=0; i<=10 ;i++)
{
list_int.push_back(i);
}
if( ( it = find_if(list_int.begin(), list_int.end(), Exist(8) )) != list_int.end())
{
cout<<"found it "<<*it<<endl;
}
cout<<"current size "<<list_int.size()<<endl;
list_int.erase(it);
for(it = list_int.begin(); it!= list_int.end(); it++)
{
cout<<"<<"<<*it<<endl;
}
cout<<"current size "<<list_int.size();
//cin >>i;
return 0;
}
| [
"qianzhongjie@gmail.com"
] | qianzhongjie@gmail.com |
ad5c6171954c99685628414c844ffe7a457d70bb | d72232061a899e1d8236f44c8f9e05f7548c8f9e | /Level 3 HW Submission/2.3/2.3.7/2.3.7/TestPoint.cpp | b3be88ed613b38aa6e98774daabda6c64eafb4b9 | [] | no_license | wentaozou1/BaruchCPPHW | 6072ec8ec68aea878fc1eb5a6833234d3bb05911 | 15f97e03b01338931257247064e86a48eef6fce7 | refs/heads/master | 2020-03-22T16:53:48.310355 | 2018-07-12T03:23:00 | 2018-07-12T03:23:00 | 140,358,934 | 0 | 0 | null | 2018-07-10T01:05:25 | 2018-07-10T01:05:25 | null | UTF-8 | C++ | false | false | 970 | cpp | // TestPoint.cpp
//
// @author Xinyuan Zhang
// @version 1.0 07/11/18
#include "Point.hpp"
#include <iostream>
#include <string>
using namespace std;
void main()
{
double x1, y1;
double x2, y2;
cout << "Please input x and y of Point1 separated by space" << endl;
if (!(cin >> x1 >> y1))
{
cout << "Input Error." << endl;
return;
}
Point p1(x1, y1);
cout << p1.ToString() << endl;
cout << p1.X() << " " << p1.Y() << endl;
cout << "Please input x and y of Point2 separated by space" << endl;
if (!(cin >> x2 >> y2))
{
cout << "Input Error." << endl;
return;
}
Point p2(x2, y2);
cout << p2.ToString() << endl;
cout << p2.X() << " " << p2.Y() << endl;
cout << "The distance between origin and " << p1.ToString() << " is "
<< p1.Distance() << "." << endl;
cout << "The distance between " << p1.ToString() << " and " << p2.ToString()
<< " is " << p1.Distance(p2) << "." << endl;
const Point cp(1.5, 3.9);
cout << cp.X() << endl;
}
| [
"wentaozou1@gmail.com"
] | wentaozou1@gmail.com |
86b8dc6fda512e50834517c4e7e42183f2d2d5a5 | a0da5737e2fa604c6347186fffaec388a37485d6 | /app/PrintVisitor.cpp | 9897d838589d8cb4d4f75dc5405ae87edec5d363 | [] | no_license | DevilsCat/Horn-Clause-Resolving-Application | 9143bf5cb4e5a01278c8fab41dad2accd7d8ecf3 | 23d564c5977033470a6ac7ba7567b248f6652d3d | refs/heads/master | 2021-01-10T17:07:10.816942 | 2015-12-18T00:03:23 | 2015-12-18T00:03:23 | 48,200,115 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,044 | cpp | // PrintVisitor.cpp -- This file defines a PrintVisitor class to print contents in horn clause AST tree.
// Created by Yu Xiao, Anqi Zhang, all right reserved.
//
#include "stdafx.h"
#include "Utils.h"
#include "PrintVisitor.h"
#include "HornclauseASTNodes.h"
#include "HornclauseTokens.h"
#include <iostream>
void PrintVisitor::OnPreVisit(HornclauseNode*) {
std::cout << Encode("(");
}
void PrintVisitor::OnPreVisit(BodyNode*) {
std::cout << Encode("(");
}
void PrintVisitor::OnPreVisit(PredicateNode*) {
std::cout << Encode("(");
}
void PrintVisitor::OnVisit(SymbolNode* node) {
std::cout << Encode(*(node->symbol_ptr_));
}
void PrintVisitor::OnVisit(NameNode* node) {
std::cout << Encode(*(node->label_ptr_));
}
void PrintVisitor::OnPostVisit(HornclauseNode*) {
std::cout << Encode(")") << std::endl;
}
void PrintVisitor::OnPostVisit(HeadNode*) {}
void PrintVisitor::OnPostVisit(BodyNode*) {
std::cout << Encode(")");
}
void PrintVisitor::OnPostVisit(PredicateNode*) {
std::cout << Encode(")");
}
| [
"xiaoyuxqx@gmail.com"
] | xiaoyuxqx@gmail.com |
882c85442f0e329b3b2f288865d087c20dbd50f6 | 10d051b0fc316f389d5782c8009d96aac270b67c | /TestInclude/main.cpp | 8cd149924d58d0b52f136707e1bf89eafcf0f019 | [
"MIT"
] | permissive | xyz1001/BlogExamples | 24d84fc9cfcaf9963ef937b15a1811cc95d1b1da | a20cf77c1e16b948c7c414bec6a3ab9c4c64ad4e | refs/heads/master | 2021-06-27T14:49:01.633939 | 2020-09-24T08:23:30 | 2020-09-24T08:23:30 | 147,134,896 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 78 | cpp | #include <string>
using namespace std;
int main()
{
return 0;
}
| [
"zgzf1001@gmail.com"
] | zgzf1001@gmail.com |
d635d6fdfc751a9a78fa6e3ddab04253b087781a | 64deac97ba623ea62e23494fa1757e13da74f2d0 | /AnotherOne/AnotherOne/AnotherOne.cpp | 6adeacc52a45cc46d40c6c3b867ecfd22f61e3fa | [] | no_license | william-tam/Another-one | 59a9412ef7a9a113461b85b9c8bf13a2e19e4330 | 5e746d2f1bcf0cf682e2cbc7a4b998ecd8ac32cf | refs/heads/master | 2023-03-24T06:12:52.151635 | 2021-03-15T00:14:58 | 2021-03-15T00:14:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,852 | cpp | // AnotherOne.cpp : Defines the entry point for the application.
//
#include "framework.h"
#include "AnotherOne.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
WCHAR szTitle[MAX_LOADSTRING]; // The title bar text
WCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
// Forward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: Place code here.
// Initialize global strings
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadStringW(hInstance, IDC_ANOTHERONE, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_ANOTHERONE));
MSG msg;
// Main message loop:
while (GetMessage(&msg, nullptr, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEXW wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ANOTHERONE));
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_ANOTHERONE);
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
return RegisterClassExW(&wcex);
}
//
// FUNCTION: InitInstance(HINSTANCE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
hInst = hInstance; // Store instance handle in our global variable
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_COMMAND:
{
int wmId = LOWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
}
break;
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code that uses hdc here...
EndPaint(hWnd, &ps);
}
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// Message handler for about box.
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
return (INT_PTR)TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE;
}
| [
"79667361+willt2021@users.noreply.github.com"
] | 79667361+willt2021@users.noreply.github.com |
0e2494192b2cb30991af1f0e853c2c56dc0dd402 | ce5d175f79908e17c37a96bfe78d7043bf4f3b5d | /FinalSubmission1/FinalRiskSubmission/MyObservable/MyObserver.h | 68057c8ef052058fd69a5ff6e38f7de5ec89706f | [] | no_license | Netopya/COMP-345-Project | 305cfe6cafbfb19028dc730cb68c6d9988c297a4 | 8286af4ccf95036e15a101224c8ae20534685533 | refs/heads/master | 2020-12-26T02:09:39.166381 | 2015-12-07T03:03:53 | 2015-12-15T14:09:39 | 43,391,798 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 254 | h | #ifndef MYOBSERVER_H
#define MYOBSERVER_H
/*
* Observer Interface for the Observer Pattern.
*/
class MyObserver {
public:
virtual void update(class MyObservable* observable) = 0; //Called when being notified of a change from the observable.
};
#endif | [
"maximemorinqc@hotmail.ca"
] | maximemorinqc@hotmail.ca |
fa596790623e3ba08d478e9ada6060cd38c8d79c | 738a808a17ffc4143f6e5c9f21d2ecbd0608fad1 | /Menus/Menu de repiticion.cpp | 8f9a6b88f3a8faea85c09521e0ff5b417d1e36c8 | [] | no_license | KaiKuroba/Tarea- | 39237e05b81880d59318261841162efabca2d42d | 2be9551c1d9d08093f1b69d004d17f0ef1885326 | refs/heads/main | 2023-07-06T14:34:41.184453 | 2021-08-05T22:07:29 | 2021-08-05T22:07:29 | 393,180,964 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 694 | cpp | #include <conio.h>
#include <stdio.h>
#include <cstdio>
using namespace std;
int main(void)
{
char usuario[20];
printf( "Introduzca su nombre estimado usuario: " );
scanf( "%s", usuario );
printf( "Hola %s, Iniciaremos el sistema ordinal.", usuario, 161 );
int opc = 0, num1 = 0, num2 = 0;
do{
("cls");
printf( " Menu Ordinal Scarlet Elija Una Opcion Para Empezar\n");
printf("1 Sistema De Rastreo \n");
printf("2 Busqueda De Lugares \n");
printf("3 Busqueda De Musica \n");
printf("4 Cerrar Sistema Ordinal Scarlet\n");
printf(" Escoge una opcion usuario:");
scanf ("%d", &opc);
switch(opc) {
}
} while(opc = 4 );
return 0;
}
| [
"noreply@github.com"
] | KaiKuroba.noreply@github.com |
60ad879140f13c4e0382680adab994526fea4459 | 9a99594d4b5080d9b8afb055d4ee6d0d9daa5d15 | /gdSTL/memory_pool/__default_alloc_template.h | b6ab61bf4f419c206ce20f96a2e6a4a384117bcf | [] | no_license | Gd58/gdSTL | 78c9f48d3986f2936d58ef2d34a5bcfe92708ee5 | 8d5c3e06240dc338345b45dabbc6e9c852602df8 | refs/heads/master | 2020-12-24T15:49:55.246036 | 2015-11-30T13:06:49 | 2015-11-30T13:06:49 | 46,853,034 | 0 | 0 | null | null | null | null | ISO-8859-3 | C++ | false | false | 4,834 | h | /* the interface writed by SGIĦĦSTL*/
#ifndef __DEFAULT_ALLOC_TEMPLATE__
#define __DEFAULT_ALLOC_TEMPLATE__
#ifndef __MALLOC_ALLOC_TEMPLATE__
#include "__malloc_alloc_template.h"
#endif
enum{ALIGN = 8};
enum{ MAX_BYTE = 128 };
enum{N_FREELIST = MAX_BYTE / ALIGN};
template<bool threads,int n>//here the thread to insist mutithread
class __default_alloc_template{
private:
union object{
union object* next = 0;
char data[0];
};
private:
static size_t ROUND_UP(size_t bytes){
return (((bytes) + ALIGN - 1)&~(ALIGN - 1));
}
static size_t index(size_t bytes){
return (((bytes) + ALIGN - 1) / ALIGN - 1);
}
static object* volatile freelist[N_FREELIST];
static void* refill(size_t);
static char* chunk_alloc(size_t, int&);
public:
static void* allocate(size_t);
static void* reallocate(void*, size_t);
static void deallocate(void*, size_t);
static char* start_free;
static char* end_free;
static size_t heap_size;
};
template<bool threads, int n>char* __default_alloc_template<threads, n>::start_free = 0;
template<bool threads, int n>char* __default_alloc_template<threads, n>::end_free = 0;
template<bool threads, int n>size_t __default_alloc_template<threads, n>::heap_size = 0;
template<bool threads, int n>
typename __default_alloc_template<threads, n>::object* volatile __default_alloc_template<threads, n>::freelist[16] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
template<bool threads, int n>
void* __default_alloc_template<threads, n>::allocate(size_t t){
object *result;
object* volatile* myfreelist;
if (t > size_t(MAX_BYTE)){
return malloc_alloc::allocate(t);
}
myfreelist = freelist + index(t);
result = *myfreelist;//here to get really memory
if(0 == result){
void* r = refill(ROUND_UP(t));
return r;
}
*myfreelist =result->next;
return static_cast<void*>(result);
}
//here the key point
//static char* chunk_alloc(size_t, int&);
template<bool threads,int n>
char* __default_alloc_template<threads, n>::chunk_alloc(size_t N, int& node){
size_t end_storage = end_free - start_free;
size_t total_alloc = N * node;
char* result = nullptr;
object *curobj = nullptr;
object* volatile * my_free_list;
if (end_storage >= total_alloc){
result = start_free;
start_free += total_alloc;
return static_cast<char*>(result);
}
else if (end_storage >= N){
node = end_storage / N;//the left can be used by how many chunks
total_alloc = node * N;//here distribution the left memory
result = start_free;
start_free += total_alloc;
return static_cast<char*>(result);
}
else{//here to deal to cannot distibution one chunk
if(end_storage > 0){
my_free_list = freelist + index(end_storage);
((object*)(start_free))->next = *my_free_list;
*my_free_list = (object*)(start_free);
}
size_t get_bytes = 2 * total_alloc + ROUND_UP(heap_size >> 4);
start_free = static_cast<char*>(malloc(get_bytes));
object* p = nullptr;
if (start_free == 0){//here it cannot to distibution anything
for (int i = N; i < MAX_BYTE; i += ALIGN){
my_free_list = freelist + index(i);
p = *my_free_list;
if (p){
(*my_free_list) = (p->next);
start_free = (char*)p;
end_free = start_free + i;
return chunk_alloc(N, node);
}
}
end_free = 0;
start_free = static_cast<char*>(malloc_alloc::allocate(get_bytes));
}
heap_size += get_bytes;
end_free = start_free + get_bytes;
return chunk_alloc(N, node);
}
}
// here to find N byte in memory pool
template<bool threads,int n>
void* __default_alloc_template<threads, n>::refill(size_t N){
int node = 20;//here node = 20 but I donot think it's reasonable;
char* pchunk= chunk_alloc(N, node);//here is to use the chunk alloc to get more than N bytes
object* volatile* my_free_list;
object* result = 0;
if (1 == node){
return (void*)(pchunk);//here illustrate the only one chunk
}
else{
my_free_list = freelist + index(N);
result = (object*)(pchunk);
//here It's customed memory
//here now the the chunk which result point to must be used now
// so *freelist pointer the second chunk
object* next_object = (object*)(pchunk + N);
*my_free_list = next_object;
object* cur_obj = 0;
for (int i = 1;; ++i){
cur_obj = next_object;
next_object = (object*)((char*)(cur_obj) + N);
if (node - 1 == i){
cur_obj ->next = 0;
break;
}
else{
cur_obj->next = next_object;
}
}
}
return (void*)(result);
}
template<bool threads,int n>
void __default_alloc_template<threads, n>::deallocate(void* p,size_t t){
object* volatile* my_free_list = freelist + index(t);
object* result = *my_free_list;
if (t > (size_t)MAX_BYTE){
malloc_alloc::deallocate(p, t);
return;
}
*my_free_list = static_cast<object*>(p);
((object*)(p))->next = result;
}
typedef __default_alloc_template<false, 0> default_alloc;
#endif | [
"Gd58@outlook.com"
] | Gd58@outlook.com |
6aab5a1223cd3b132a752a0ef918b966483cf39d | 1359bb193ce7ec547ae07862c207b6b68d7d8d8e | /LeetCode Contests/Largest Number After Mutating Substring.cpp | 88cffdabdf67a7dba95ad5aa5ec69a285e3add50 | [] | no_license | yukta22/leetcode | f13f6d96c0e7254651de55ce9ab54ca5f5992e6b | 8d1352415146adf7cb8963e6c80c78111c89dc4f | refs/heads/main | 2023-08-14T11:01:48.541234 | 2021-09-28T09:36:45 | 2021-09-28T09:36:45 | 328,369,449 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 657 | cpp | https://leetcode.com/contest/weekly-contest-251/problems/largest-number-after-mutating-substring/
class Solution {
public:
string maximumNumber(string num, vector<int>& change) {
int n = num.size();
int flag = 0;
for(int i = 0 ; i < n ; i++){
int d = num[i] - '0';
if(d > change[d]){
if(flag){
break;
}
}
else if(d < change[d]){
flag = 1;
num[i] = '0' + change[d];
}
}
return num;
}
};
| [
"noreply@github.com"
] | yukta22.noreply@github.com |
e811c1f6cfa171807f56afdc174a44e399f49cd9 | 8df198126a11543066c64a98a9d5ee24c7fa7618 | /(((... All online judge practice and contest ...)))/@++++ Vai , Sir , Lab contest ++++/TPC/09/H - Cinema.cpp | 8c2bb07479ec2dc3843c278d013b68b16f72ed94 | [] | no_license | mehadi-trackrep/ACM_Programming_related | eef0933febf44e3b024bc45afb3195b854eba719 | 7303931aa9f2ab68d76bbe04b06157b00ac9f6a6 | refs/heads/master | 2021-10-09T03:15:09.188172 | 2018-12-20T09:35:22 | 2018-12-20T09:35:22 | 117,265,703 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,538 | cpp | /*
BISMILLAH HIR RAHMANIR RAHIM .. "ALLAH IS ALMIGHTY" .
###########################################################################
# #
# // // ////// // // /\ //////\\ ///////// #
# // / / // // // // / \ // \ // #
# // / // ///// //////// /////\ // | // #
# // // // // // / \ // / // #
# // // ////// // // / \ //////// ///////// #
# #
###########################################################################
SUST
*/
//#include <bits/stdc++.h>
/// Containers Start
#include <iostream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <utility>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <cstdlib>
#include <iterator>
#include <algorithm>
/// C Header Files
#include <cstdio>
#include <cctype>
#include <cmath>
#include <math.h>
#include <ctime>
#include <tgmath.h>
#include <cstring>
/// Containers End
using namespace std;
/// debug , template er maddhome same name er function use kora jay for different task er jonno ...
template<class T1> void deb(T1 e1) /// for 1 output
{
cout<<e1<<endl;
}
template<class T1,class T2> void deb(T1 e1,T2 e2) /// for 2 outputs
{
cout<<e1<<" "<<e2<<endl;
}
template<class T1,class T2,class T3> void deb(T1 e1,T2 e2,T3 e3) /// for 3 outputs
{
cout<<e1<<" "<<e2<<" "<<e3<<endl;
}
template<class T1,class T2,class T3,class T4> void deb(T1 e1,T2 e2,T3 e3,T4 e4) /// for 4 outputs
{
cout<<e1<<" "<<e2<<" "<<e3<<" "<<e4<<endl;
}
template<class T1,class T2,class T3,class T4,class T5> void deb(T1 e1,T2 e2,T3 e3,T4 e4,T5 e5) /// for 5 outputs
{
cout<<e1<<" "<<e2<<" "<<e3<<" "<<e4<<" "<<e5<<endl;
}
template<class T1,class T2,class T3,class T4,class T5,class T6> void deb(T1 e1,T2 e2,T3 e3,T4 e4,T5 e5,T6 e6) /// for 6 outputs
{
cout<<e1<<" "<<e2<<" "<<e3<<" "<<e4<<" "<<e5<<" "<<e6<<endl;
}
/// short form ...
#define ff first
#define ss second
#define pb push_back
#define sf scanf
#define pf printf
/// pair,map, ... short form ...
#define pii pair<int,int>
#define psi pair<string,int>
#define pis pair<int,string>
#define mpis map <int,string>
#define mpii map <int,int>
#define mpsi map <string,int>
/// Function short form ...
#define mem(a,x) memset(a,x,sizeof(a))
#define memc(a,c) memset(a,'c',sizeof(a)) /// char memset
#define sf1(a) scanf("%d", &a)
#define sf2(a,b) scanf("%d %d",&a, &b)
#define sf3(a,b,c) scanf("%d %d %d", &a, &b, &c)
#define sf4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d)
#define sf1ll(a) scanf("%lld", &a)
#define sf2ll(a,b) scanf("%lld %lld", &a, &b)
#define sf3ll(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)
#define sf4ll(a,b,c,d) scanf("%lld %lld %lld %lld", &a, &b, &c, &d)
#define pf1(a) scanf("%d\n", a)
#define pf2(a,b) scanf("%d %d\n",a,b)
#define pf3(a,b,c) scanf("%d %d %d\n", a, b, c)
#define pf4(a,b,c,d) scanf("%d %d %d %d\n", a, b, c, d)
#define pf1ll(a) scanf("%lld\n", a)
#define pf2ll(a,b) scanf("%lld %lld\n", a, b)
#define pf3ll(a,b,c) scanf("%lld %lld %lld\n", a, b, c)
#define pf4ll(a,b,c,d) scanf("%lld %lld %lld %lld\n", a, b, c, d)
/// loop short form ...
#define loop_tc(tc) for(int cas=1; cas<=tc; cas++) /// V.V.I.
#define fi(i,a,b) for(int i=a; i<=b; i++)
#define fd(i,a,b) for(int i=a; i>=b; i--)
///
#define READ freopen("input.txt", "r", stdin);
#define WRITE freopen("output.txt", "w", stdout);
// moves
//int dx[]= {-1,-1,0,0,1,1};
//int dy[]= {-1,0,-1,1,0,1};
//int dx[]= {0,0,1,-1}; /*4 side move*/
//int dy[]= {-1,1,0,0}; /*4 side move*/
//int dx[]= {1,1,0,-1,-1,-1,0,1};/*8 side move*/
//int dy[]= {0,1,1,1,0,-1,-1,-1};/*8 side move*/
//int dx[]={1,1,2,2,-1,-1,-2,-2};/*night move*/
//int dy[]={2,-2,1,-1,2,-2,1,-1};/*night move*/
/// mathematical short form ...
#define pi acos(-1.0)
#define ll long long
#define ull unsigned long long
#define mod 1000000007
#define PINF 2147483646.9
#define pinf 2147483646.9 /// positive infinite
#define NINF (-1)*2147483646.9
#define ninf (-1)*2147483646.9 /// negative infinite
#define mxn 100 /// node number // node number
#define SIZ 500000
bool flag;
int N,E;
int main()
{
int tc,c,k;
sf1(tc);
loop_tc(tc)
{
sf2(c,k);
k++;
string s;
cin >> s;
int cnt = 0,ck=0;
for(int j=1; j<=c; j++)
{
if(cnt == k)
{
ck = 1;
break;
}
if(j == c) break;
if(s[j] == '0' && s[j-1] == '0') cnt++;
else if(s[j-1] == '0') cnt++;
else cnt = 0;
}
if(s[c-1] == '0')
{
if(cnt == k-1) ck=1;
}
if(ck) printf("yes\n");
else printf("no\n");
}
return 0;
}
/// save test cases
/**
**/
| [
"mehadi541@gmail.com"
] | mehadi541@gmail.com |
9027643a8ecd885bfd8956e4eff446a86b92b58d | c9c4d467432423ad7e718cfa226ee965cd83075c | /.history/try_20210506213222.cpp | 165cef325bf833603ca6714f01f29ecaf41be10d | [] | no_license | WZH-hub/BUPT_2021_C-_lab | 8cb4fafed13ec3f77044cc5835b5bbdf07e24fe8 | 531334b37adb831fe2a824703e0c90ca21808b7f | refs/heads/master | 2023-04-24T07:57:37.492322 | 2021-05-13T01:47:08 | 2021-05-13T01:47:08 | 358,433,723 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 336 | cpp | #include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
class Type
{
private:
int num;
public:
int getnum()
{
printf(" num:%d ", num);
}
void change()
{
int now;
cin >> now;
num = now;
}
};
int main()
{
Type a;
a.getnum();
a.getnum()
} | [
"wangzhenhao137@163.com"
] | wangzhenhao137@163.com |
6556f920e680c82713bc8d54c8109ee4bd2279c8 | 56c22711cfe618ebb43b3d5ee2a6e01311177a89 | /UTSO/utso21p2.cpp | 1c6a8639fcb04a9a56098c34f080c26b14a84208 | [
"MIT"
] | permissive | crackersamdjam/DMOJ-Solutions | f6f5709eb6648a01570b4c8992d26a664fd019c6 | 97992566595e2c7bf41b5da9217d8ef61bdd1d71 | refs/heads/master | 2023-07-09T07:14:12.105762 | 2021-08-09T03:05:01 | 2021-08-09T03:05:01 | 394,041,849 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 896 | cpp | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
#ifndef ONLINE_JUDGE
template<typename T>
void pr(T a){std::cerr<<a<<std::endl;}
template<typename T,typename... Args>
void pr(T a, Args... args) {std::cerr<<a<<' ',pr(args...);}
#else
template<typename... Args>
void pr(Args... args){}
#endif
int n, k;
int main(){
cin>>k;
for(int n = 1; n <= 101; n++){
assert(n != 101);
int cur = n*(n-1)/2+n;
vector<int> ans;
for(int i = n; i > 0; i--){
int v = i*(i-1)/2+i;
while(cur-v >= k){
cur -= v;
if(size(ans))
ans.emplace_back(1);
for(int j = 0; j < i; j++)
ans.emplace_back(2);
}
}
while(size(ans) < n)
ans.emplace_back(1);
if(size(ans) > n or cur != k)
continue;
// cout<<cur<<' '<<k<<endl;
cout<<n<<'\n';
for(int i: ans)
cout<<i<<' ';
break;
}
} | [
"45298690+crackersamdjam@users.noreply.github.com"
] | 45298690+crackersamdjam@users.noreply.github.com |
2dca7cf2cceb85f81031d74639fa15349b1085e9 | ec0108e0fd9c6e0a04b0ac8575add06f382582f1 | /codeforces/314-codeforces-round-187/C.cpp | ceac5fb58760a1f543b6fc108c4def40a7228677 | [] | no_license | robotcator/acm-icpc | b5ac23604c2eb4345275ac76b6d10f9fc1135b69 | 6d64309c9875418359031fc7fb75e8f6401affd3 | refs/heads/master | 2021-01-18T07:32:49.086985 | 2014-07-28T02:32:16 | 2014-07-28T02:32:16 | 22,862,729 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,016 | cpp | // Codeforces Round #187
// Problem C -- Sereja and Subsequences
#include <cstdio>
#include <cstring>
const int N = 100000;
const int M = 1000000 + 1;
const int MOD = (int)1e9 + 7;
int n, a[N], last[M], product[N];
int count[M];
void add(int k, int v) {
for (; k < M; k += -k & k) {
(count[k] += v) %= MOD;
}
}
int ask(int k) {
int ret = 0;
for (; k; k -= -k & k) {
(ret += count[k]) %= MOD;
}
return ret;
}
int main() {
scanf("%d", &n);
for (int i = 0; i < n; ++ i) {
scanf("%d", a + i);
}
memset(last, -1, sizeof(last));
for (int i = 0; i < n; ++ i) {
product[i] = (long long)(ask(a[i]) + 1) * a[i] % MOD;
int &j = last[a[i]];
if (j != -1) {
add(a[j], MOD - product[j]);
product[j] = 0;
}
add(a[i], product[i]);
j = i;
}
int answer = 0;
for (int i = 0; i < n; ++ i) {
(answer += product[i]) %= MOD;
}
printf("%d\n", answer);
return 0;
}
| [
"ftiasch0@gmail.com"
] | ftiasch0@gmail.com |
bf0a25ffc0ebaae4aac8005cac75479ac7a922b0 | 4296ad62fc2d1c0111af5e9c9ef5b8336256674e | /src/minpro/a.cpp | 4d151b0a409d29e79c9f373457622a99908a2d5b | [] | no_license | emakryo/cmpro | 8aa50db1d84fb85e515546f37e675121be9de5c2 | 81db478cc7da06a9b99a7888e39952ddb82cdbe5 | refs/heads/master | 2023-02-09T12:36:47.893287 | 2023-01-23T12:07:03 | 2023-01-23T12:07:03 | 79,899,196 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 543 | cpp | #include<iostream>
#include<iomanip>
//#include<cstdio>
#include<vector>
#include<map>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cassert>
using namespace std;
typedef long long ll;
int main(){
string s;
cin >> s;
map<char, int> count;
for(int i=0; i<s.size(); i++){
if(s[i]!='y'&&s[i]!='a'&&s[i]!='h'&&s[i]!='o'){
cout << "NO" << endl;
return 0;
}
count[s[i]]++;
}
if(count['y']==1&&count['a']==1&&count['h']==1&&count['o']==2){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
| [
"emak.ryo@gmail.com"
] | emak.ryo@gmail.com |
e08449fa0a7851692a5b0ce428c96bf5819ea937 | 3f7110998ecee46e6e3e6a2e7c415c3b41c565fb | /src/System/InterruptedException.cpp | 26fe128f2088c5a957157f57a2b2b09fc9961a67 | [
"MIT"
] | permissive | thehomosapien/avengerscoin | b1d37e92c1606b9f3c75b6b50e91a2c0a07cfd07 | b3243edf1a4524005b78fef4204f4374210a3b3c | refs/heads/master | 2020-05-16T03:34:06.173234 | 2019-04-22T10:23:57 | 2019-04-22T10:23:57 | 182,728,350 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 477 | cpp | // Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2014-2017 XDN developers
// Copyright (c) 2016-2017 BXC developers
// Copyright (c) 2017-2019 UltraNote developers
// Copyright (c) 2019 Avengers developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "InterruptedException.h"
namespace {
#ifdef MSVC
char suppressMSVCWarningLNK4221;
#endif
}
| [
"rishabhshukla@opulasoft.com"
] | rishabhshukla@opulasoft.com |
ed4450dba678ab2f70074b10d6bf9ba6f6ee0e8b | ed4f0ae5cfc032012cc21fc6ab2a80459825db77 | /arrays/2 dim array.cpp | 97f48e3d951f8a9ff34d51d393f19b0d5f67f726 | [] | no_license | ZainArif/C-program-practices | 5cb88cb422256cd35ce92ae81521124b3502a266 | 21047c2c6a01339c4582c40f28c43304ac59b2d3 | refs/heads/master | 2020-04-08T18:34:19.712748 | 2018-11-29T06:05:50 | 2018-11-29T06:05:50 | 159,614,341 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 118 | cpp | #include<stdio.h>
#include<conio.h>
int main()
{
int dim[2][3]={ {1,2,3}, {4,5,6} };
printf("%d",dim[0][0]);
}
| [
"zainarif14197@gmail.com"
] | zainarif14197@gmail.com |
b3cbd3626318bb73fc3e74a27e83a6b5576ea39d | ea8ba7cfc4f4773ed516e094ded4bc36502f93b5 | /branch/old_angsys/angsys_beta3/include/angsys/ang/dom/xml/ixml_node.h | 4f29b67b36a1d3fbd0cefcc0beae3ac989a29249 | [
"Apache-2.0"
] | permissive | ChuyX3/angsys | 15f896f0b4823b63a14aff8e35a30f344f2c30e8 | 89b2eaee866bcfd11e66efda49b38acc7468c780 | refs/heads/master | 2021-07-07T18:58:39.437477 | 2020-06-29T05:33:08 | 2020-06-29T05:33:08 | 92,321,439 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,197 | h | #ifndef __ANG_DOM_XML_H__
#error ...
#elif !defined __ANG_DOM_XML_IXML_NODE_H__
#define __ANG_DOM_XML_IXML_NODE_H__
namespace ang
{
namespace dom
{
namespace xml
{
ang_begin_interface(LINK ixml_node, ixml_object)
visible vcall xml_node_t xml_parent()const pure
visible vcall xml_document_t xml_parent_doc()const pure
visible vcall xml_node_t xml_first_child()const pure
visible vcall xml_node_t xml_last_child()const pure
visible vcall xml_node_t xml_prev_sibling()const pure
visible vcall xml_node_t xml_next_sibling()const pure
visible vcall xml_node_t xml_clone(xml_document_t)const pure
visible vcall bool xml_has_name()const pure
visible vcall bool xml_has_value()const pure
visible vcall bool xml_has_namespace()const pure
visible vcall bool xml_has_children()const pure
visible vcall bool xml_has_attributes()const pure
visible vcall xml_text_t xml_name()const pure
visible vcall xml_text_t xml_value()const pure
visible vcall xml_text_t xml_namespace()const pure
visible vcall xml_node_t xml_namespace(cstr_t)const pure
visible vcall ixml_collection_t xml_children()const pure
visible vcall xml_attributes_t xml_attributes()const pure
visible vcall void xml_parent(xml_node_t) pure
visible vcall void xml_prev_sibling(xml_node_t) pure
visible vcall void xml_next_sibling(xml_node_t) pure
//allow ixml_collection;
//allow xml_document;
ang_end_interface();
ang_begin_interface(LINK ixml_serializable)
visible vcall bool load(xml_node_t)pure
visible vcall bool save(xml_document_t)const pure
visible vcall void async_worker(core::async::idispatcher_t)pure
visible vcall core::async::iasync<bool> load_async(dom::xml::xml_node_t)pure
visible vcall core::async::iasync<bool> save_async(dom::xml::xml_document_t)const pure
ang_end_interface();
}
}
ANG_BEGIN_INTF_WRAPPER(LINK, dom::xml::ixml_node)
operator dom::xml::xml_text_t()const;
dom::xml::xml_node_t operator[](cstr_t)const;
template<typename T, text::encoding E> dom::xml::xml_node_t operator[](str_view<T, E> str)const;
ANG_END_INTF_WRAPPER();
}
#endif//__ANG_DOM_XML_IXML_NODE_H__
| [
"chuyangel.rm@gmail.com"
] | chuyangel.rm@gmail.com |
c5800ec9bdf22aab7ce58c2fce6547f721cd2f09 | 6d6d408af32b6ce6ef2529e65d7543d8d41082e3 | /Chapter_16/listing_16_22_ilist/src/ilist.cpp | b6f8f769d5c96740129d5390b8cb549c69d95645 | [] | no_license | eugene-bogorodsk/S_Prata_Prime_C-_exercise | 52e52b59e26bfb2f33a344a57c97b69b74ede060 | 1a6dd062e42ac4515df81f23bd425a5a85a05199 | refs/heads/master | 2020-08-28T22:51:08.657340 | 2019-12-19T08:50:58 | 2019-12-19T08:50:58 | 217,844,234 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,172 | cpp | //============================================================================
// Name : ilist.cpp
// Author :
// Version :using initializer_list
// Copyright : Your copyright notice
// Description : listing 16.22
//============================================================================
#include <iostream>
#include <initializer_list>
double sum(std::initializer_list<double> il);
double average(const std::initializer_list<double> & ril);
int main() {
using std::cout;
cout<<"List l: sum = "<<sum({2,3,4})
<<",ave = "<<average({2,3,4})<<'\n';
std::initializer_list<double> d1 = {1.1,2.2,3.3,4.4,5.5};
cout<<"List 2: sum = "<<sum(d1)
<<", ave = "<<average(d1)<<'\n';
d1={16.0,25.0,36.0,40.0,64.0};
cout<<"List 3: sum = "<<sum(d1)
<<", ave = "<<average(d1)<<'\n';
return 0;
}
double sum(std::initializer_list<double> il)
{
double tot=0;
for(auto p = il.begin();p !=il.end(); p++)
tot += *p;
return tot;
}
double average(const std::initializer_list<double>& ril)
{
double tot = 0;
int n = ril.size();
double ave=0.0;
if(n>0)
{
for(auto p = ril.begin();p !=ril.end();p++)
tot+=*p;
ave=tot/n;
}
return ave;
}
| [
"e.mitichkin@yandex.ru"
] | e.mitichkin@yandex.ru |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.