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
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
537c9254e256c3f42220a3ba90b0a0c8e16f8e39
6d59b8fa0ac393720a687a8d5cbe80ab25ff97a4
/aws-cpp-sdk-ssm/include/aws/ssm/model/UpdateOpsItemRequest.h
17ab82e46155f72509939309c9f192be48ff2d69
[ "MIT", "Apache-2.0", "JSON" ]
permissive
175703252/aws-sdk-cpp
20149ad1b06d5b7759fb01a45bf1214e298ba306
c07bd636471ba79f709b03a489a1a036b655d3b2
refs/heads/master
2021-03-10T20:43:30.772193
2020-03-10T19:19:04
2020-03-10T19:19:04
246,483,735
1
0
Apache-2.0
2020-03-11T05:34:57
2020-03-11T05:34:56
null
UTF-8
C++
false
false
44,417
h
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/ssm/SSM_EXPORTS.h> #include <aws/ssm/SSMRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSMap.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/ssm/model/OpsItemStatus.h> #include <aws/ssm/model/OpsItemDataValue.h> #include <aws/ssm/model/OpsItemNotification.h> #include <aws/ssm/model/RelatedOpsItem.h> #include <utility> namespace Aws { namespace SSM { namespace Model { /** */ class AWS_SSM_API UpdateOpsItemRequest : public SSMRequest { public: UpdateOpsItemRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateOpsItem"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline const Aws::String& GetDescription() const{ return m_description; } /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline UpdateOpsItemRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline UpdateOpsItemRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** * <p>Update the information about the OpsItem. Provide enough information so that * users reading this OpsItem for the first time understand the issue. </p> */ inline UpdateOpsItemRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline const Aws::Map<Aws::String, OpsItemDataValue>& GetOperationalData() const{ return m_operationalData; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline bool OperationalDataHasBeenSet() const { return m_operationalDataHasBeenSet; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline void SetOperationalData(const Aws::Map<Aws::String, OpsItemDataValue>& value) { m_operationalDataHasBeenSet = true; m_operationalData = value; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline void SetOperationalData(Aws::Map<Aws::String, OpsItemDataValue>&& value) { m_operationalDataHasBeenSet = true; m_operationalData = std::move(value); } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& WithOperationalData(const Aws::Map<Aws::String, OpsItemDataValue>& value) { SetOperationalData(value); return *this;} /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& WithOperationalData(Aws::Map<Aws::String, OpsItemDataValue>&& value) { SetOperationalData(std::move(value)); return *this;} /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& AddOperationalData(const Aws::String& key, const OpsItemDataValue& value) { m_operationalDataHasBeenSet = true; m_operationalData.emplace(key, value); return *this; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& AddOperationalData(Aws::String&& key, const OpsItemDataValue& value) { m_operationalDataHasBeenSet = true; m_operationalData.emplace(std::move(key), value); return *this; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& AddOperationalData(const Aws::String& key, OpsItemDataValue&& value) { m_operationalDataHasBeenSet = true; m_operationalData.emplace(key, std::move(value)); return *this; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& AddOperationalData(Aws::String&& key, OpsItemDataValue&& value) { m_operationalDataHasBeenSet = true; m_operationalData.emplace(std::move(key), std::move(value)); return *this; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& AddOperationalData(const char* key, OpsItemDataValue&& value) { m_operationalDataHasBeenSet = true; m_operationalData.emplace(key, std::move(value)); return *this; } /** * <p>Add new keys or edit existing key-value pairs of the OperationalData map in * the OpsItem object.</p> <p>Operational data is custom data that provides useful * reference details about the OpsItem. For example, you can specify log files, * error strings, license keys, troubleshooting tips, or other relevant data. You * enter operational data as key-value pairs. The key has a maximum length of 128 * characters. The value has a maximum size of 20 KB.</p> <important> * <p>Operational data keys <i>can't</i> begin with the following: amazon, aws, * amzn, ssm, /amazon, /aws, /amzn, /ssm.</p> </important> <p>You can choose to * make the data searchable by other users in the account or you can restrict * search access. Searchable data means that all users with access to the OpsItem * Overview page (as provided by the <a>DescribeOpsItems</a> API action) can view * and search on the specified data. Operational data that is not searchable is * only viewable by users who have access to the OpsItem (as provided by the * <a>GetOpsItem</a> API action).</p> <p>Use the <code>/aws/resources</code> key in * OperationalData to specify a related resource in the request. Use the * <code>/aws/automations</code> key in OperationalData to associate an Automation * runbook with the OpsItem. To view AWS CLI example commands that use these keys, * see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems">Creating * OpsItems Manually</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& AddOperationalData(const char* key, const OpsItemDataValue& value) { m_operationalDataHasBeenSet = true; m_operationalData.emplace(key, value); return *this; } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline const Aws::Vector<Aws::String>& GetOperationalDataToDelete() const{ return m_operationalDataToDelete; } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline bool OperationalDataToDeleteHasBeenSet() const { return m_operationalDataToDeleteHasBeenSet; } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline void SetOperationalDataToDelete(const Aws::Vector<Aws::String>& value) { m_operationalDataToDeleteHasBeenSet = true; m_operationalDataToDelete = value; } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline void SetOperationalDataToDelete(Aws::Vector<Aws::String>&& value) { m_operationalDataToDeleteHasBeenSet = true; m_operationalDataToDelete = std::move(value); } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline UpdateOpsItemRequest& WithOperationalDataToDelete(const Aws::Vector<Aws::String>& value) { SetOperationalDataToDelete(value); return *this;} /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline UpdateOpsItemRequest& WithOperationalDataToDelete(Aws::Vector<Aws::String>&& value) { SetOperationalDataToDelete(std::move(value)); return *this;} /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline UpdateOpsItemRequest& AddOperationalDataToDelete(const Aws::String& value) { m_operationalDataToDeleteHasBeenSet = true; m_operationalDataToDelete.push_back(value); return *this; } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline UpdateOpsItemRequest& AddOperationalDataToDelete(Aws::String&& value) { m_operationalDataToDeleteHasBeenSet = true; m_operationalDataToDelete.push_back(std::move(value)); return *this; } /** * <p>Keys that you want to remove from the OperationalData map.</p> */ inline UpdateOpsItemRequest& AddOperationalDataToDelete(const char* value) { m_operationalDataToDeleteHasBeenSet = true; m_operationalDataToDelete.push_back(value); return *this; } /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline const Aws::Vector<OpsItemNotification>& GetNotifications() const{ return m_notifications; } /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline bool NotificationsHasBeenSet() const { return m_notificationsHasBeenSet; } /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline void SetNotifications(const Aws::Vector<OpsItemNotification>& value) { m_notificationsHasBeenSet = true; m_notifications = value; } /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline void SetNotifications(Aws::Vector<OpsItemNotification>&& value) { m_notificationsHasBeenSet = true; m_notifications = std::move(value); } /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline UpdateOpsItemRequest& WithNotifications(const Aws::Vector<OpsItemNotification>& value) { SetNotifications(value); return *this;} /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline UpdateOpsItemRequest& WithNotifications(Aws::Vector<OpsItemNotification>&& value) { SetNotifications(std::move(value)); return *this;} /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline UpdateOpsItemRequest& AddNotifications(const OpsItemNotification& value) { m_notificationsHasBeenSet = true; m_notifications.push_back(value); return *this; } /** * <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent * when this OpsItem is edited or changed.</p> */ inline UpdateOpsItemRequest& AddNotifications(OpsItemNotification&& value) { m_notificationsHasBeenSet = true; m_notifications.push_back(std::move(value)); return *this; } /** * <p>The importance of this OpsItem in relation to other OpsItems in the * system.</p> */ inline int GetPriority() const{ return m_priority; } /** * <p>The importance of this OpsItem in relation to other OpsItems in the * system.</p> */ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** * <p>The importance of this OpsItem in relation to other OpsItems in the * system.</p> */ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** * <p>The importance of this OpsItem in relation to other OpsItems in the * system.</p> */ inline UpdateOpsItemRequest& WithPriority(int value) { SetPriority(value); return *this;} /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline const Aws::Vector<RelatedOpsItem>& GetRelatedOpsItems() const{ return m_relatedOpsItems; } /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline bool RelatedOpsItemsHasBeenSet() const { return m_relatedOpsItemsHasBeenSet; } /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline void SetRelatedOpsItems(const Aws::Vector<RelatedOpsItem>& value) { m_relatedOpsItemsHasBeenSet = true; m_relatedOpsItems = value; } /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline void SetRelatedOpsItems(Aws::Vector<RelatedOpsItem>&& value) { m_relatedOpsItemsHasBeenSet = true; m_relatedOpsItems = std::move(value); } /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline UpdateOpsItemRequest& WithRelatedOpsItems(const Aws::Vector<RelatedOpsItem>& value) { SetRelatedOpsItems(value); return *this;} /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline UpdateOpsItemRequest& WithRelatedOpsItems(Aws::Vector<RelatedOpsItem>&& value) { SetRelatedOpsItems(std::move(value)); return *this;} /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline UpdateOpsItemRequest& AddRelatedOpsItems(const RelatedOpsItem& value) { m_relatedOpsItemsHasBeenSet = true; m_relatedOpsItems.push_back(value); return *this; } /** * <p>One or more OpsItems that share something in common with the current * OpsItems. For example, related OpsItems can include OpsItems with similar error * messages, impacted resources, or statuses for the impacted resource.</p> */ inline UpdateOpsItemRequest& AddRelatedOpsItems(RelatedOpsItem&& value) { m_relatedOpsItemsHasBeenSet = true; m_relatedOpsItems.push_back(std::move(value)); return *this; } /** * <p>The OpsItem status. Status can be <code>Open</code>, <code>In * Progress</code>, or <code>Resolved</code>. For more information, see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing * OpsItem Details</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline const OpsItemStatus& GetStatus() const{ return m_status; } /** * <p>The OpsItem status. Status can be <code>Open</code>, <code>In * Progress</code>, or <code>Resolved</code>. For more information, see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing * OpsItem Details</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** * <p>The OpsItem status. Status can be <code>Open</code>, <code>In * Progress</code>, or <code>Resolved</code>. For more information, see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing * OpsItem Details</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline void SetStatus(const OpsItemStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** * <p>The OpsItem status. Status can be <code>Open</code>, <code>In * Progress</code>, or <code>Resolved</code>. For more information, see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing * OpsItem Details</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline void SetStatus(OpsItemStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** * <p>The OpsItem status. Status can be <code>Open</code>, <code>In * Progress</code>, or <code>Resolved</code>. For more information, see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing * OpsItem Details</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& WithStatus(const OpsItemStatus& value) { SetStatus(value); return *this;} /** * <p>The OpsItem status. Status can be <code>Open</code>, <code>In * Progress</code>, or <code>Resolved</code>. For more information, see <a * href="http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing * OpsItem Details</a> in the <i>AWS Systems Manager User Guide</i>.</p> */ inline UpdateOpsItemRequest& WithStatus(OpsItemStatus&& value) { SetStatus(std::move(value)); return *this;} /** * <p>The ID of the OpsItem.</p> */ inline const Aws::String& GetOpsItemId() const{ return m_opsItemId; } /** * <p>The ID of the OpsItem.</p> */ inline bool OpsItemIdHasBeenSet() const { return m_opsItemIdHasBeenSet; } /** * <p>The ID of the OpsItem.</p> */ inline void SetOpsItemId(const Aws::String& value) { m_opsItemIdHasBeenSet = true; m_opsItemId = value; } /** * <p>The ID of the OpsItem.</p> */ inline void SetOpsItemId(Aws::String&& value) { m_opsItemIdHasBeenSet = true; m_opsItemId = std::move(value); } /** * <p>The ID of the OpsItem.</p> */ inline void SetOpsItemId(const char* value) { m_opsItemIdHasBeenSet = true; m_opsItemId.assign(value); } /** * <p>The ID of the OpsItem.</p> */ inline UpdateOpsItemRequest& WithOpsItemId(const Aws::String& value) { SetOpsItemId(value); return *this;} /** * <p>The ID of the OpsItem.</p> */ inline UpdateOpsItemRequest& WithOpsItemId(Aws::String&& value) { SetOpsItemId(std::move(value)); return *this;} /** * <p>The ID of the OpsItem.</p> */ inline UpdateOpsItemRequest& WithOpsItemId(const char* value) { SetOpsItemId(value); return *this;} /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline const Aws::String& GetTitle() const{ return m_title; } /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline UpdateOpsItemRequest& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline UpdateOpsItemRequest& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** * <p>A short heading that describes the nature of the OpsItem and the impacted * resource.</p> */ inline UpdateOpsItemRequest& WithTitle(const char* value) { SetTitle(value); return *this;} /** * <p>Specify a new category for an OpsItem.</p> */ inline const Aws::String& GetCategory() const{ return m_category; } /** * <p>Specify a new category for an OpsItem.</p> */ inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; } /** * <p>Specify a new category for an OpsItem.</p> */ inline void SetCategory(const Aws::String& value) { m_categoryHasBeenSet = true; m_category = value; } /** * <p>Specify a new category for an OpsItem.</p> */ inline void SetCategory(Aws::String&& value) { m_categoryHasBeenSet = true; m_category = std::move(value); } /** * <p>Specify a new category for an OpsItem.</p> */ inline void SetCategory(const char* value) { m_categoryHasBeenSet = true; m_category.assign(value); } /** * <p>Specify a new category for an OpsItem.</p> */ inline UpdateOpsItemRequest& WithCategory(const Aws::String& value) { SetCategory(value); return *this;} /** * <p>Specify a new category for an OpsItem.</p> */ inline UpdateOpsItemRequest& WithCategory(Aws::String&& value) { SetCategory(std::move(value)); return *this;} /** * <p>Specify a new category for an OpsItem.</p> */ inline UpdateOpsItemRequest& WithCategory(const char* value) { SetCategory(value); return *this;} /** * <p>Specify a new severity for an OpsItem.</p> */ inline const Aws::String& GetSeverity() const{ return m_severity; } /** * <p>Specify a new severity for an OpsItem.</p> */ inline bool SeverityHasBeenSet() const { return m_severityHasBeenSet; } /** * <p>Specify a new severity for an OpsItem.</p> */ inline void SetSeverity(const Aws::String& value) { m_severityHasBeenSet = true; m_severity = value; } /** * <p>Specify a new severity for an OpsItem.</p> */ inline void SetSeverity(Aws::String&& value) { m_severityHasBeenSet = true; m_severity = std::move(value); } /** * <p>Specify a new severity for an OpsItem.</p> */ inline void SetSeverity(const char* value) { m_severityHasBeenSet = true; m_severity.assign(value); } /** * <p>Specify a new severity for an OpsItem.</p> */ inline UpdateOpsItemRequest& WithSeverity(const Aws::String& value) { SetSeverity(value); return *this;} /** * <p>Specify a new severity for an OpsItem.</p> */ inline UpdateOpsItemRequest& WithSeverity(Aws::String&& value) { SetSeverity(std::move(value)); return *this;} /** * <p>Specify a new severity for an OpsItem.</p> */ inline UpdateOpsItemRequest& WithSeverity(const char* value) { SetSeverity(value); return *this;} private: Aws::String m_description; bool m_descriptionHasBeenSet; Aws::Map<Aws::String, OpsItemDataValue> m_operationalData; bool m_operationalDataHasBeenSet; Aws::Vector<Aws::String> m_operationalDataToDelete; bool m_operationalDataToDeleteHasBeenSet; Aws::Vector<OpsItemNotification> m_notifications; bool m_notificationsHasBeenSet; int m_priority; bool m_priorityHasBeenSet; Aws::Vector<RelatedOpsItem> m_relatedOpsItems; bool m_relatedOpsItemsHasBeenSet; OpsItemStatus m_status; bool m_statusHasBeenSet; Aws::String m_opsItemId; bool m_opsItemIdHasBeenSet; Aws::String m_title; bool m_titleHasBeenSet; Aws::String m_category; bool m_categoryHasBeenSet; Aws::String m_severity; bool m_severityHasBeenSet; }; } // namespace Model } // namespace SSM } // namespace Aws
[ "aws-sdk-cpp-automation@github.com" ]
aws-sdk-cpp-automation@github.com
f524659e1a87b22561c381e1dbd213c38633f68c
21ff46d8b8cfe1efd0722950e44076cbe2c803e5
/glipf/include/glipf/sources/frame-source.h
8fd37a272ab1167a74796ebdf89eb9d2d6701439
[ "BSD-2-Clause" ]
permissive
cognitivesystems/smartcamera
6ec5839f30a34ecd5e5e03bb430b842c73aa6f55
5374193260e6385becfe8086a70d21d650314beb
refs/heads/master
2021-01-18T06:35:21.332981
2017-03-08T06:50:07
2017-03-08T06:50:07
84,283,927
1
0
null
null
null
null
UTF-8
C++
false
false
1,288
h
#ifndef sources_frame_source_h #define sources_frame_source_h #include "frame-properties.h" #include <cstdint> #include <stdexcept> namespace glipf { namespace sources { /// Exception raised when a frame source fails to initialise. class FrameSourceInitializationError : public std::runtime_error { public: using std::runtime_error::runtime_error; }; /// Abstract base class defining the common API of all frame sources. class FrameSource { public: virtual ~FrameSource() {}; /// Return the properties of frames produced by the frame source. virtual const FrameProperties& getFrameProperties() const = 0; /** * Capture a frame and return its data. * * \note The number of bytes returned depends on the properties of the * frame (as reported by @ref getFrameProperties) and can be * calculated as follows: * ~~~ * // frameSource is an instance of a concrete subclass of FrameSource * std::pair<size_t, size_t> frameDimensions = frameSource.getFrameProperties.dimensions(); * size_t pixelCount = frameDimensions.first * frameDimensions.second; * size_t byteCount = pixelCount * 3; * ~~~ */ virtual const uint8_t* grabFrame() = 0; }; } // end namespace sources } // end namespace glipf #endif // sources_frame_source_h
[ "surajnair1@gmail.com" ]
surajnair1@gmail.com
9676ac8495117e86a554b51a2183000b1cfa4933
c6d9feead8cdf2cd0e489fdf406db5bdcd34469e
/Orange/src/Orange/Renderer/RenderCommand.cpp
c8f0dd1cb6169a180e06b3b9b23ce1d058fae5c3
[ "Apache-2.0" ]
permissive
christianwaldmann/Orange
ca96f3e5e68dbf98ab9b821cf02651b60fea980e
2f8ef0fe6a310e45e984733bdab65de9c31ca1a0
refs/heads/master
2023-03-09T14:32:13.075008
2021-03-01T11:57:15
2021-03-01T11:57:15
323,442,645
0
0
Apache-2.0
2021-03-01T11:57:16
2020-12-21T20:38:19
C++
UTF-8
C++
false
false
187
cpp
#include "ogpch.h" #include "RenderCommand.h" #include "Platform/OpenGL/OpenGLRendererAPI.h" namespace Orange { RendererAPI* RenderCommand::s_RendererAPI = new OpenGLRendererAPI; }
[ "waldmann-christian@web.de" ]
waldmann-christian@web.de
50db7255c9c18f6b2ec05c24dbb716dab5dc0d07
3fbe1e13c6171a82416b29a82645832b4228c0e7
/Source/UnderTheCouch/Player/PlayerNCamera.h
6545d67714151a8a26be17d72a6a0c714e6f5fbd
[ "MIT" ]
permissive
codarth/UnderTheCouch
4280727cd444157861c8b833ae5a5e5ac4f06fc4
896aea463cdfa98c846de999c66635ee79900abd
refs/heads/master
2020-09-06T09:01:08.724348
2019-11-22T02:31:03
2019-11-22T02:31:03
220,380,896
0
0
null
null
null
null
UTF-8
C++
false
false
1,829
h
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Pawn.h" #include "PlayerNCamera.generated.h" UCLASS() class UNDERTHECOUCH_API APlayerNCamera : public APawn { GENERATED_BODY() public: // Sets default values for this pawn's properties APlayerNCamera(); protected: // Called when the game starts or when spawned virtual void BeginPlay() override; public: // Called every frame virtual void Tick(float DeltaTime) override; // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; UPROPERTY(VisibleAnywhere, Category = Camera) class USpringArmComponent* SpringArm; class UCameraComponent* Camera; UPROPERTY(VisibleAnywhere, Category = Display) class UStaticMeshComponent* Mesh; // TODO: Don't really need a mesh UPROPERTY(VisibleAnywhere, Category = Camera) float TargetArmLength = 1000.0f; UPROPERTY(VisibleAnywhere, Category = Camera) bool bCameraLag = true; UPROPERTY(VisibleAnywhere, Category = Camera) float CameraLagSpeed = 5.0f; UPROPERTY(VisibleAnywhere, Category = Movement) float MovementScaler = 400.0f; UPROPERTY(VisibleAnywhere, Category = Movement) float ZoomMin = 50.0f; UPROPERTY(VisibleAnywhere, Category = Movement) float ZoomMax = 5000.0f; UPROPERTY(VisibleAnywhere, Category = Movement) float ZoomFactor = 50.0f; // TODO: Remove UPROPERTY where not needed private: void MoveForward(float Value); void MoveRight(float Value); void CameraPan(float Value); void CameraTilt(float Value); void EnableRotate(); void DisableRotate(); void Zoom(float Value); FVector2D MovementInput; FRotator RotateInput; bool b_RotateEnabled; float PitchMin = -80.0f; float PitchMax = -15.0f; };
[ "zimquo@gmail.com" ]
zimquo@gmail.com
bcd9f6a671924c2265125c27ec4b9c8def3e1f98
b26e71da234b9076e0c3ef9a5ae2d917964b63f6
/lib/indrnn_forward_gpu.cu.cc
1dbef1a83d8a49d12d178428959f70dcc999b0a2
[ "Apache-2.0" ]
permissive
sarwar3328/haste
cc1f95e2ab15163d01ee05457e99ce91c94c9b5b
9da2454584d5b5bc9b2ae84a3fa2b271306ec622
refs/heads/master
2022-10-20T15:31:27.005169
2020-07-04T23:17:53
2020-07-04T23:55:50
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,515
cc
// Copyright 2020 LMNT, Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ============================================================================== #include <cublas_v2.h> #include <cuda_runtime_api.h> #include "blas.h" #include "haste.h" #include "inline_ops.h" namespace { template<typename T, bool Training, bool ApplyZoneout> __global__ void IndrnnFwdOps( const int steps, const int batch_size, const int hidden_size, const T* Wx, const T* u, const T* b, const T* h, T* h_out, const float zoneout_prob, const T* zoneout_mask) { const int row = blockDim.x * blockIdx.x + threadIdx.x; const int col = blockDim.y * blockIdx.y + threadIdx.y; if (row >= hidden_size || col >= batch_size) return; const int idx = col * hidden_size + row; const int NH = batch_size * hidden_size; const T u_row = u[row]; const T b_row = b[row]; for (int i = 0; i < steps * NH; i += NH) { const T a = Wx[idx + i] + u_row * h[idx + i] + b_row; T cur_h_value = tanh(a); if (ApplyZoneout) { if (Training) { cur_h_value = (cur_h_value - h[idx + i]) * zoneout_mask[idx + i] + h[idx + i]; } else { cur_h_value = (zoneout_prob * h[idx + i]) + ((1.0f - zoneout_prob) * cur_h_value); } } h_out[idx + i] = cur_h_value; } } } // anonymous namespace namespace haste { namespace v0 { namespace indrnn { template<typename T> struct ForwardPass<T>::private_data { bool training; int batch_size; int input_size; int hidden_size; cublasHandle_t blas_handle; cudaStream_t stream; cudaStream_t sync_stream; }; template<typename T> ForwardPass<T>::ForwardPass( const bool training, const int batch_size, const int input_size, const int hidden_size, const cublasHandle_t& blas_handle, const cudaStream_t& stream) : data_(new private_data) { data_->training = training; data_->batch_size = batch_size; data_->input_size = input_size; data_->hidden_size = hidden_size; data_->blas_handle = blas_handle; data_->sync_stream = stream; cudaStreamCreate(&data_->stream); } template<typename T> ForwardPass<T>::~ForwardPass() { if (data_->sync_stream) { cudaEvent_t event; cudaEventCreateWithFlags(&event, cudaEventDisableTiming); cudaEventRecord(event, data_->stream); cudaStreamWaitEvent(data_->sync_stream, event, 0); cudaEventDestroy(event); } else { cudaStreamSynchronize(data_->stream); } cudaStreamDestroy(data_->stream); delete data_; } template<typename T> void ForwardPass<T>::Run( const int steps, const T* W, const T* u, const T* b, const T* x, T* h, T* workspace, const float zoneout_prob, const T* zoneout_mask) { static const T alpha = static_cast<T>(1.0); static const T beta = static_cast<T>(0.0); const bool training = data_->training; const int batch_size = data_->batch_size; const int input_size = data_->input_size; const int hidden_size = data_->hidden_size; const cublasHandle_t blas_handle = data_->blas_handle; const cudaStream_t stream = data_->stream; cudaStream_t save_stream; cublasGetStream(blas_handle, &save_stream); cublasSetStream(blas_handle, stream); blas<T>::gemm(blas_handle, CUBLAS_OP_N, CUBLAS_OP_N, hidden_size, steps * batch_size, input_size, &alpha, W, hidden_size, x, input_size, &beta, workspace, hidden_size); const dim3 blockDim(64, 16); const dim3 gridDim( (hidden_size + blockDim.x - 1) / blockDim.x, (batch_size + blockDim.y - 1) / blockDim.y); const int NH = batch_size * hidden_size; if (training) { if (zoneout_prob && zoneout_mask) { IndrnnFwdOps<T, true, true><<<gridDim, blockDim, 0, stream>>>( steps, batch_size, hidden_size, workspace, u, b, h, h + NH, zoneout_prob, zoneout_mask); } else { IndrnnFwdOps<T, true, false><<<gridDim, blockDim, 0, stream>>>( steps, batch_size, hidden_size, workspace, u, b, h, h + NH, 0.0f, nullptr); } } else { if (zoneout_prob && zoneout_mask) { IndrnnFwdOps<T, false, true><<<gridDim, blockDim, 0, stream>>>( steps, batch_size, hidden_size, workspace, u, b, h, h + NH, zoneout_prob, zoneout_mask); } else { IndrnnFwdOps<T, false, false><<<gridDim, blockDim, 0, stream>>>( steps, batch_size, hidden_size, workspace, u, b, h, h + NH, 0.0f, nullptr); } } cublasSetStream(blas_handle, save_stream); } template class ForwardPass<float>; template class ForwardPass<double>; } // namespace indrnn } // namespace v0 } // namespace haste
[ "sharvil.nanavati@gmail.com" ]
sharvil.nanavati@gmail.com
80390b3d1bbc8cbfc0c3fd55f5f9f6e7652b527d
c0caed81b5b3e1498cbca4c1627513c456908e38
/src/protocols/membrane/SetMembranePositionMover.hh
1fd5646f575f7c7c76293bae02e98ef31b84af45
[]
no_license
malaifa/source
5b34ac0a4e7777265b291fc824da8837ecc3ee84
fc0af245885de0fb82e0a1144422796a6674aeae
refs/heads/master
2021-01-19T22:10:22.942155
2017-04-19T14:13:07
2017-04-19T14:13:07
88,761,668
0
2
null
null
null
null
UTF-8
C++
false
false
7,028
hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. // (c) For more information, see http://www.rosettacommons.org. Questions about this can be // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu. /// @file protocols/membrane/SetMembranePositionMover.hh /// /// @brief Sets the membrane position normal and center /// @details Sets the membrane position normal and center /// CAUTION: ONLY FOR FLEXIBLE MEMBRANE AND FIXED PROTEIN!!! /// Last Modified: 6/28/14 /// /// @author Rebecca Alford (rfalford12@gmail.com) #ifndef INCLUDED_protocols_membrane_SetMembranePositionMover_hh #define INCLUDED_protocols_membrane_SetMembranePositionMover_hh // Unit Headers #include <protocols/membrane/SetMembranePositionMover.fwd.hh> // Project Headers #include <protocols/moves/Mover.hh> #include <protocols/simple_moves/UniformPositionMover.hh> // Package Headers #include <core/pose/Pose.fwd.hh> #include <core/types.hh> // Utility Headers #include <numeric/xyzVector.hh> namespace protocols { namespace membrane { /// @brief Membrane Position Translation-Rotation Mover class SetMembranePositionMover : public protocols::moves::Mover { public: //////////////////// /// Constructors /// //////////////////// /// @brief Construct a Default Membrane Position Mover SetMembranePositionMover(); /// @brief Custom Constructor /// @details Specify a new membrane center and normal /// to move this position to SetMembranePositionMover( core::Vector center, core::Vector normal ); /// @brief Copy Constructor /// @details Make a deep copy of this mover object SetMembranePositionMover( SetMembranePositionMover const & src ); /// @brief Assignment Operator /// @details Make a deep copy of this mover object, overriding the assignment operator SetMembranePositionMover & operator=( SetMembranePositionMover const & src ); /// @brief Destructor ~SetMembranePositionMover(); ///////////////////// /// Mover Methods /// ///////////////////// /// @brief Get the name of this mover virtual std::string get_name() const; /// @brief Apply Rotation/Translation to Membrane /// @brief Translate the membrane position in this pose /// to the new center position, and rotate to new normal virtual void apply( core::pose::Pose & pose ); /////////////////////////////// /// Rosetta Scripts Methods /// /////////////////////////////// /// @brief Create a Clone of this mover virtual protocols::moves::MoverOP clone() const; /// @brief Create a Fresh Instance of this Mover virtual protocols::moves::MoverOP fresh_instance() const; /// @brief Pase Rosetta Scripts Options for this Mover void parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ); private: // Store new normal/center pair core::Vector center_; core::Vector normal_; }; /// @brief Membrane Position Rotation Move /// @details Rotate the orientation of the membrane position to a new /// normal position. Applies rotation to jump class SetMembraneNormalMover : public protocols::moves::Mover { public: //////////////////// /// Constructors /// //////////////////// /// @brief Construct a Default Membrane Position Mover SetMembraneNormalMover(); /// @brief Custom Constructor /// @details Specify a new normal to rotate membranes to /// to move this position to SetMembraneNormalMover( core::Vector normal ); /// @brief Copy Constructor /// @details Make a deep copy of this mover object SetMembraneNormalMover( SetMembraneNormalMover const & src ); /// @brief Assignment Operator /// @details Make a deep copy of this mover object, overriding the assignment operator SetMembraneNormalMover & operator=( SetMembraneNormalMover const & src ); /// @brief Destructor ~SetMembraneNormalMover(); ///////////////////// /// Mover Methods /// ///////////////////// /// @brief Get the name of this mover virtual std::string get_name() const; /// @brief Apply Rotation to Membrane /// @brief Rotate the membrane to the new normal position virtual void apply( core::pose::Pose & pose ); /////////////////////////////// /// Rosetta Scripts Methods /// /////////////////////////////// /// @brief Create a Clone of this mover virtual protocols::moves::MoverOP clone() const; /// @brief Create a Fresh Instance of this Mover virtual protocols::moves::MoverOP fresh_instance() const; /// @brief Pase Rosetta Scripts Options for this Mover void parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ); private: // Store new normal core::Vector normal_; }; /// @brief Membrane Position Translation Move /// @details Translate the center of the membrane stub ot the specified position class SetMembraneCenterMover : public protocols::moves::Mover { public: //////////////////// /// Constructors /// //////////////////// /// @brief Construct a Default Membrane Position Mover SetMembraneCenterMover(); /// @brief Custom Constructor /// @details Specify a new center position to translate this stub to SetMembraneCenterMover( core::Vector center ); /// @brief Copy Constructor /// @details Make a deep copy of this mover object SetMembraneCenterMover( SetMembraneCenterMover const & src ); /// @brief Assignment Operator /// @details Make a deep copy of this mover object, overriding the assignment operator SetMembraneCenterMover & operator=( SetMembraneCenterMover const & src ); /// @brief Destructor ~SetMembraneCenterMover(); ///////////////////// /// Mover Methods /// ///////////////////// /// @brief Get the name of this mover virtual std::string get_name() const; /// @brief Apply Translation to membrane position /// @brief Translate membrane position to new center virtual void apply( core::pose::Pose & pose ); /////////////////////////////// /// Rosetta Scripts Methods /// /////////////////////////////// /// @brief Create a Clone of this mover virtual protocols::moves::MoverOP clone() const; /// @brief Create a Fresh Instance of this Mover virtual protocols::moves::MoverOP fresh_instance() const; /// @brief Pase Rosetta Scripts Options for this Mover void parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ); private: // Store new center core::Vector center_; }; } // membrane } // protocols #endif // #ifndef INCLUDED_protocols_membrane_SetMembranePositionMover_hh
[ "malaifa@yahoo.com" ]
malaifa@yahoo.com
301a8e3d88bc32f6110059c54ca1cbc7f30c5861
6d6906fd33e913fcb904f83fa24d6c18bfe64e72
/Mainwind/Mainwind/GeneratedFiles/Release/moc_trprint.cpp
16ff29b8a2b5d6e9837daa62c3d075ba1ee25b81
[]
no_license
thunderning/blood
d2ef5043e88a7e45d7a547f37a7bf6eb019c86c3
f9e5f51834b15a26e1a873d8f02e877c97d77f9b
refs/heads/master
2021-01-21T13:08:20.707739
2016-03-28T17:47:32
2016-03-28T17:47:32
54,815,760
0
0
null
null
null
null
UTF-8
C++
false
false
2,558
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'trprint.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../../trprint.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'trprint.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.6.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_trprint_t { QByteArrayData data[1]; char stringdata0[8]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_trprint_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_trprint_t qt_meta_stringdata_trprint = { { QT_MOC_LITERAL(0, 0, 7) // "trprint" }, "trprint" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_trprint[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount 0 // eod }; void trprint::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { Q_UNUSED(_o); Q_UNUSED(_id); Q_UNUSED(_c); Q_UNUSED(_a); } const QMetaObject trprint::staticMetaObject = { { &QDialog::staticMetaObject, qt_meta_stringdata_trprint.data, qt_meta_data_trprint, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} }; const QMetaObject *trprint::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *trprint::qt_metacast(const char *_clname) { if (!_clname) return Q_NULLPTR; if (!strcmp(_clname, qt_meta_stringdata_trprint.stringdata0)) return static_cast<void*>(const_cast< trprint*>(this)); return QDialog::qt_metacast(_clname); } int trprint::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } QT_END_MOC_NAMESPACE
[ "498279281@qq.com" ]
498279281@qq.com
5b4a885df5262141482424d32284165363627a18
e862f48c627b8effec2a25b37c590ca4f2649fc0
/src/pwiz-4209/pwiz/data/identdata/DiffTest.cpp
b98bb828c36bafe7d9103d40bc8c0039768934b9
[ "Apache-2.0" ]
permissive
Bandeira/sps
ec82a77c315cf1aff9761c801d1dc63cb5c5e9f0
1809945c9e5a6836a753a434d2c8570941130021
refs/heads/master
2016-09-01T08:18:34.221603
2015-12-10T23:56:52
2015-12-10T23:56:52
47,741,477
0
0
null
null
null
null
UTF-8
C++
false
false
39,750
cpp
// // $Id: DiffTest.cpp 4129 2012-11-20 00:05:37Z chambm $ // // // Original author: Robert Burke <robert.burke@proteowizard.org> // // Copyright 2009 Spielberg Family Center for Applied Proteomics // University of Southern California, Los Angeles, California 90033 // // 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 "Diff.hpp" #include "TextWriter.hpp" #include "examples.hpp" #include "pwiz/utility/misc/unit.hpp" #include "pwiz/utility/misc/Std.hpp" #include <cstring> using namespace pwiz::util; using namespace pwiz::data; using namespace pwiz::data::diff_impl; using namespace pwiz::identdata; namespace proteome = pwiz::proteome; // TODO: Add Identifiable diff to all subclasses of Identifiable ostream* os_ = 0; const double epsilon = numeric_limits<double>::epsilon(); void testIdentifiable() { if (os_) *os_ << "testIdentifiable()\n"; Identifiable a, b; a.id="id1"; a.name="a_name"; b = a; Diff<Identifiable, DiffConfig> diff(a, b); if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(!diff); b.id="id2"; b.name="b_name"; diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); // // test handling for ids which often differ only // by a trailing version number // b=a; a.id += "_1.2.3"; b.id += "_1.2.4"; DiffConfig config; Diff<Identifiable, DiffConfig> diff0(config); diff0(a, b); if (os_) *os_ << diff_string<TextWriter>(diff0) << endl; unit_assert(diff0); config.ignoreVersions = true; Diff<Identifiable, DiffConfig> diff1(config); diff1(a, b); if (os_) *os_ << diff_string<TextWriter>(diff1) << endl; unit_assert(!diff1); a.id += "x"; // no longer looks like one of our version strings Diff<Identifiable, DiffConfig> diff2(config); diff2(a, b); if (os_) *os_ << diff_string<TextWriter>(diff2) << endl; unit_assert(diff2); } void testFragmentArray() { if (os_) *os_ << "testFragmentArray()\n"; FragmentArray a, b; a.values.push_back(1.0); a.measurePtr = MeasurePtr(new Measure("Measure_ref")); b = a; Diff<FragmentArray, DiffConfig> diff(a, b); unit_assert(!diff); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; a.values.push_back(2.1); b.values.push_back(2.0); b.measurePtr = MeasurePtr(new Measure("fer_erusaeM")); diff(a, b); // a diff was found unit_assert(diff); // the values of the diff are correct unit_assert(diff.a_b.values.size() == 2); unit_assert_equal(0.0, diff.a_b.values[0], 1e-6); unit_assert_equal(0.1, diff.a_b.values[1], 1e-6); unit_assert(diff.b_a.values.size() == 2); unit_assert_equal(0.0, diff.b_a.values[0], 1e-6); unit_assert_equal(-0.1, diff.b_a.values[1], 1e-6); unit_assert(diff.a_b.measurePtr.get()); unit_assert(diff.a_b.measurePtr->id == "Measure_ref"); unit_assert(diff.b_a.measurePtr.get()); unit_assert(diff.b_a.measurePtr->id == "fer_erusaeM"); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; } void testIonType() { if (os_) *os_ << "testIonType()\n"; IonType a, b; a.index.push_back(1); a.charge = 1; a.cvid = MS_frag__a_ion; a.fragmentArray.push_back(FragmentArrayPtr(new FragmentArray)); b = a; Diff<IonType, DiffConfig> diff(a, b); unit_assert(!diff); if (os_ && diff) *os_ << diff_string<TextWriter>(diff) << endl; b.index.back() = 2; b.charge = 2; b.cvid = MS_frag__z_ion; b.fragmentArray.push_back(FragmentArrayPtr(new FragmentArray)); b.fragmentArray.back()->measurePtr = MeasurePtr(new Measure("Graduated_cylinder")); diff(a, b); // a diff was found unit_assert(diff); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // and correctly unit_assert(diff.a_b.index.size() == 1); unit_assert(diff.b_a.index.size() == 1); unit_assert_equal(*diff.a_b.index.begin(), 1.0, epsilon); unit_assert_equal(*diff.b_a.index.begin(), 2.0, epsilon); unit_assert_equal(diff.a_b.charge, 1.0, epsilon); unit_assert_equal(diff.b_a.charge, 2.0, epsilon); unit_assert(diff.a_b.cvid == MS_frag__a_ion); unit_assert(diff.b_a.cvid == MS_frag__z_ion); unit_assert(diff.b_a.fragmentArray.size() == 1); unit_assert(diff.b_a.fragmentArray.back()->measurePtr.get()); unit_assert(diff.b_a.fragmentArray.back()->measurePtr->id == "Graduated_cylinder"); } void testMeasure() { if (os_) *os_ << "testMeasure()\n"; Measure a, b; a.set(MS_product_ion_m_z, 200); b = a; Diff<Measure, DiffConfig> diff(a, b); unit_assert(!diff); b.set(MS_product_ion_intensity, 1); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.cvParams.size() == 0); unit_assert(diff.b_a.cvParams.size() == 1); unit_assert(diff.b_a.hasCVParam(MS_product_ion_intensity)); } void testSearchModification() { if (os_) *os_ << "testSearchModification()\n"; SearchModification a, b; a.massDelta = 1; a.residues.push_back('A'); a.residues.push_back('B'); a.set(UNIMOD_Gln__pyro_Glu); b = a; Diff<SearchModification, DiffConfig> diff(a, b); unit_assert(!diff); b.massDelta = 10; b.residues.push_back('C'); b.cvParams.clear(); b.set(UNIMOD_Oxidation); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // diff was found unit_assert(diff); // and correctly unit_assert_equal(diff.a_b.massDelta, 9, epsilon); unit_assert_equal(diff.b_a.massDelta, 9, epsilon); unit_assert(diff.a_b.residues.empty()); unit_assert(diff.b_a.residues.size() == 1 && diff.b_a.residues[0] == 'C'); unit_assert(!diff.a_b.cvParams.empty()); unit_assert(diff.a_b.cvParams[0].cvid == UNIMOD_Gln__pyro_Glu); unit_assert(!diff.b_a.cvParams.empty()); unit_assert(diff.b_a.cvParams[0].cvid == UNIMOD_Oxidation); } void testPeptideEvidence() { if (os_) *os_ << "testPeptideEvidence()\n"; PeptideEvidence a, b; Diff<PeptideEvidence, DiffConfig> diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(!diff); a.dbSequencePtr = DBSequencePtr(new DBSequence("DBSequence_ref")); a.start = 1; a.end = 6; a.pre = '-'; a.post = '-'; a.translationTablePtr = TranslationTablePtr(new TranslationTable("TranslationTable_ref")); a.frame = 0; a.isDecoy = true; a.set(MS_Mascot_score, 15.71); b = a; diff(a,b); unit_assert(!diff); b.dbSequencePtr = DBSequencePtr(new DBSequence("fer_ecneuqeSBD")); b.start = 2; b.end = 7; b.pre = 'A'; b.post = 'A'; b.translationTablePtr = TranslationTablePtr(new TranslationTable("fer_elbaTnoitalsnarT")); b.frame = 1; b.isDecoy = false; b.set(MS_Mascot_expectation_value, 0.0268534444565851); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.dbSequencePtr.get()); unit_assert(diff.a_b.dbSequencePtr->id == "DBSequence_ref"); unit_assert(diff.b_a.dbSequencePtr.get()); unit_assert(diff.b_a.dbSequencePtr->id == "fer_ecneuqeSBD"); unit_assert(diff.a_b.translationTablePtr.get()); unit_assert(diff.a_b.translationTablePtr->id == "TranslationTable_ref"); unit_assert(diff.b_a.translationTablePtr.get()); unit_assert(diff.b_a.translationTablePtr->id == "fer_elbaTnoitalsnarT"); unit_assert_equal(diff.a_b.start, 1.0, epsilon); unit_assert_equal(diff.b_a.start, 2.0, epsilon); unit_assert_equal(diff.a_b.end, 6.0, epsilon); unit_assert_equal(diff.b_a.end, 7.0, epsilon); unit_assert(diff.a_b.pre == '-'); unit_assert(diff.b_a.pre == 'A'); unit_assert(diff.a_b.post == '-'); unit_assert(diff.b_a.post == 'A'); unit_assert_equal(diff.a_b.frame, 0.0, epsilon); unit_assert_equal(diff.b_a.frame, 1.0, epsilon); unit_assert(diff.a_b.isDecoy == true); unit_assert(diff.b_a.isDecoy == false); unit_assert(diff.a_b.cvParams.size() == 0); unit_assert(diff.b_a.cvParams.size() == 1); unit_assert(diff.b_a.hasCVParam(MS_Mascot_expectation_value)); } void testProteinAmbiguityGroup() { if (os_) *os_ << "testProteinAmbiguityGroup()\n"; ProteinAmbiguityGroup a, b; a.proteinDetectionHypothesis.push_back(ProteinDetectionHypothesisPtr(new ProteinDetectionHypothesis)); a.proteinDetectionHypothesis.back()->dbSequencePtr = DBSequencePtr(new DBSequence("DBSequence_ref")); a.set(MS_Mascot_score, 164.4); b = a; Diff<ProteinAmbiguityGroup, DiffConfig> diff(a, b); unit_assert(!diff); b.proteinDetectionHypothesis.clear(); b.set(MS_Mascot_expectation_value, 0.0268534444565851); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.proteinDetectionHypothesis.size() == 1); unit_assert(diff.b_a.proteinDetectionHypothesis.size() == 0); unit_assert(diff.a_b.proteinDetectionHypothesis.back()->dbSequencePtr->id == "DBSequence_ref"); unit_assert(diff.a_b.cvParams.size() == 0); unit_assert(diff.b_a.cvParams.size() == 1); unit_assert(diff.b_a.hasCVParam(MS_Mascot_expectation_value)); // TODO check vals also? } void testPeptideHypothesis() { if (os_) *os_ << "testPeptideHypothesis()\n"; PeptideHypothesis a, b; Diff<PeptideHypothesis, DiffConfig> diff(a,b); unit_assert(!diff); a.peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_a")); a.spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_a"))); b.peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_b")); b.spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_b"))); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.peptideEvidencePtr.get()); unit_assert(diff.a_b.peptideEvidencePtr->id =="pe_a"); unit_assert(diff.b_a.peptideEvidencePtr.get()); unit_assert(diff.b_a.peptideEvidencePtr->id == "pe_b"); unit_assert(diff.a_b.spectrumIdentificationItemPtr.size() == 1); unit_assert(diff.a_b.spectrumIdentificationItemPtr.back()->id =="sii_a"); unit_assert(diff.b_a.spectrumIdentificationItemPtr.size() == 1); unit_assert(diff.b_a.spectrumIdentificationItemPtr.back()->id == "sii_b"); } void testProteinDetectionHypothesis() { if (os_) *os_ << "testProteinDetectionHypothesis()\n"; ProteinDetectionHypothesis a, b; Diff<ProteinDetectionHypothesis, DiffConfig> diff(a,b); unit_assert(!diff); a.dbSequencePtr = DBSequencePtr(new DBSequence("DBSequence_ref")); b.dbSequencePtr = DBSequencePtr(new DBSequence("fer_ecneuqeSBD")); a.passThreshold = true; b.passThreshold = false; a.peptideHypothesis.push_back(PeptideHypothesis()); b.peptideHypothesis.push_back(PeptideHypothesis()); a.peptideHypothesis.back().peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_a")); a.peptideHypothesis.back().spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_a"))); b.peptideHypothesis.back().peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_b")); b.peptideHypothesis.back().spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_b"))); a.set(MS_Mascot_expectation_value); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.dbSequencePtr.get()); unit_assert(diff.a_b.dbSequencePtr->id =="DBSequence_ref"); unit_assert(diff.b_a.dbSequencePtr.get()); unit_assert(diff.b_a.dbSequencePtr->id == "fer_ecneuqeSBD"); unit_assert(diff.a_b.passThreshold == true); unit_assert(diff.b_a.passThreshold == false); unit_assert(diff.a_b.peptideHypothesis.size() == 1); unit_assert(diff.b_a.peptideHypothesis.size() == 1); unit_assert(diff.a_b.peptideHypothesis.back().peptideEvidencePtr->id == "pe_a"); unit_assert(diff.b_a.peptideHypothesis.back().peptideEvidencePtr->id == "pe_b"); unit_assert(diff.a_b.peptideHypothesis.back().spectrumIdentificationItemPtr.size() == 1); unit_assert(diff.a_b.peptideHypothesis.back().spectrumIdentificationItemPtr.back()->id =="sii_a"); unit_assert(diff.b_a.peptideHypothesis.back().spectrumIdentificationItemPtr.size() == 1); unit_assert(diff.b_a.peptideHypothesis.back().spectrumIdentificationItemPtr.back()->id == "sii_b"); unit_assert(diff.a_b.cvParams.size() == 1); unit_assert(diff.b_a.cvParams.size() == 0); unit_assert(diff.a_b.hasCVParam(MS_Mascot_expectation_value)); } void testSpectrumIdentificationList() { if (os_) *os_ << "testSpectrumIdentificationList()\n"; SpectrumIdentificationList a, b; Diff<SpectrumIdentificationList, DiffConfig> diff(a,b); unit_assert(!diff); a.numSequencesSearched = 9; b.numSequencesSearched = 5; MeasurePtr testMeasure(new Measure()); testMeasure->set(MS_Mascot_expectation_value); a.fragmentationTable.push_back(testMeasure); SpectrumIdentificationResultPtr testSIRPtr(new SpectrumIdentificationResult()); testSIRPtr->set(MS_Mascot_expectation_value); a.spectrumIdentificationResult.push_back(testSIRPtr); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert_equal(diff.a_b.numSequencesSearched,9.0,epsilon); unit_assert_equal(diff.b_a.numSequencesSearched,5.0,epsilon); unit_assert(diff.a_b.fragmentationTable.size() == 1); unit_assert(diff.b_a.fragmentationTable.size() == 0); unit_assert(diff.a_b.fragmentationTable.back()->hasCVParam(MS_Mascot_expectation_value)); unit_assert(diff.a_b.spectrumIdentificationResult.size() == 1); unit_assert(diff.b_a.spectrumIdentificationResult.size() == 0); unit_assert(diff.a_b.spectrumIdentificationResult.back()->hasCVParam(MS_Mascot_expectation_value)); } void testProteinDetectionList() { if (os_) *os_ << "testProteinDetectionList()\n"; ProteinDetectionList a,b; Diff<ProteinDetectionList, DiffConfig> diff(a,b); unit_assert(!diff); a.proteinAmbiguityGroup.push_back(ProteinAmbiguityGroupPtr(new ProteinAmbiguityGroup())); a.proteinAmbiguityGroup.back()->set(MS_Mascot_expectation_value, 0.0268534444565851); a.set(MS_frag__z_ion); b.set(MS_frag__b_ion); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.proteinAmbiguityGroup.size() == 1); unit_assert(diff.b_a.proteinAmbiguityGroup.size() == 0); unit_assert(diff.a_b.proteinAmbiguityGroup.back()->hasCVParam(MS_Mascot_expectation_value)); unit_assert(diff.a_b.cvParams.size() == 1); unit_assert(diff.b_a.cvParams.size() == 1); unit_assert(diff.a_b.hasCVParam(MS_frag__z_ion)); unit_assert(diff.b_a.hasCVParam(MS_frag__b_ion)); } void testAnalysisData() { if (os_) *os_ << "testAnalysisData()\n"; AnalysisData a, b; Diff<AnalysisData, DiffConfig> diff(a,b); unit_assert(!diff); a.spectrumIdentificationList.push_back(boost::shared_ptr<SpectrumIdentificationList>(new SpectrumIdentificationList())); a.spectrumIdentificationList.back()->numSequencesSearched = 5; b.spectrumIdentificationList.push_back(boost::shared_ptr<SpectrumIdentificationList>(new SpectrumIdentificationList())); b.spectrumIdentificationList.back()->numSequencesSearched = 15; a.proteinDetectionListPtr = ProteinDetectionListPtr(new ProteinDetectionList("rosemary")); b.proteinDetectionListPtr = ProteinDetectionListPtr(new ProteinDetectionList("sage")); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.spectrumIdentificationList.size() == 1); unit_assert(diff.b_a.spectrumIdentificationList.size() == 1); unit_assert_equal(diff.a_b.spectrumIdentificationList.back()->numSequencesSearched, 5.0, epsilon); unit_assert_equal(diff.b_a.spectrumIdentificationList.back()->numSequencesSearched, 15.0, epsilon); unit_assert(diff.a_b.proteinDetectionListPtr.get()); unit_assert(diff.b_a.proteinDetectionListPtr.get()); unit_assert(diff.a_b.proteinDetectionListPtr->id == "rosemary"); unit_assert(diff.b_a.proteinDetectionListPtr->id == "sage"); } void testSearchDatabase() { if (os_) *os_ << "testSearchDatabase()" << endl; SearchDatabase a, b; Diff<SearchDatabase, DiffConfig> diff(a,b); unit_assert(!diff); a.version = "1.0"; b.version = "1.1"; a.releaseDate = "20090726"; b.releaseDate = "20090727"; a.numDatabaseSequences = 5; b.numDatabaseSequences = 15; a.numResidues = 3; b.numResidues = 13; a.fileFormat.cvid = MS_frag__z_ion; a.databaseName.set(MS_frag__z_ion); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.version == "1.0"); unit_assert(diff.b_a.version == "1.1"); unit_assert(diff.a_b.releaseDate == "20090726"); unit_assert(diff.b_a.releaseDate == "20090727"); unit_assert_equal(diff.a_b.numDatabaseSequences, 5.0, epsilon); unit_assert_equal(diff.b_a.numDatabaseSequences, 15.0, epsilon); unit_assert_equal(diff.a_b.numResidues, 3.0, epsilon); unit_assert_equal(diff.b_a.numResidues, 13.0, epsilon); unit_assert(!diff.a_b.fileFormat.empty()); unit_assert(diff.b_a.fileFormat.empty()); unit_assert(diff.a_b.fileFormat.cvid == MS_frag__z_ion); unit_assert(diff.a_b.databaseName.cvParams.size() == 1); unit_assert(diff.b_a.databaseName.cvParams.size() == 0); unit_assert(diff.a_b.databaseName.hasCVParam(MS_frag__z_ion)); } void testSpectraData() { if (os_) *os_ << "testSpectraData()\n" << endl; SpectraData a, b; Diff<SpectraData, DiffConfig> diff(a,b); unit_assert(!diff); a.location = "mahtomedi"; b.location = "white_bear_lake"; a.externalFormatDocumentation.push_back("wikipedia"); b.externalFormatDocumentation.push_back("ehow"); a.fileFormat.cvid = MS_frag__b_ion; diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.location == "mahtomedi"); unit_assert(diff.b_a.location == "white_bear_lake"); unit_assert(diff.a_b.externalFormatDocumentation.size() == 1); unit_assert(diff.b_a.externalFormatDocumentation.size() == 1); unit_assert(diff.a_b.externalFormatDocumentation.back() == "wikipedia"); unit_assert(diff.b_a.externalFormatDocumentation.back() == "ehow"); unit_assert(!diff.a_b.fileFormat.empty()); unit_assert(diff.b_a.fileFormat.empty()); unit_assert(diff.a_b.fileFormat.cvid == MS_frag__b_ion); } void testSourceFile() { if (os_) *os_ << "testSourceFile()\n" << endl; SourceFile a,b; Diff<SourceFile, DiffConfig> diff(a,b); unit_assert(!diff); a.location = "madison"; b.location = "middleton"; a.fileFormat.cvid = MS_wolf; a.externalFormatDocumentation.push_back("The Idiot's Guide to External Formats"); b.externalFormatDocumentation.push_back("External Formats for Dummies"); a.set(MS_sample_number); b.set(MS_sample_name); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.location == "madison"); unit_assert(diff.b_a.location == "middleton"); unit_assert(!diff.a_b.fileFormat.empty()); unit_assert(diff.b_a.fileFormat.empty()); unit_assert(diff.a_b.fileFormat.cvid == MS_wolf); unit_assert(diff.a_b.externalFormatDocumentation.size() == 1); unit_assert(diff.b_a.externalFormatDocumentation.size() == 1); unit_assert(diff.a_b.externalFormatDocumentation.back() == "The Idiot's Guide to External Formats"); unit_assert(diff.b_a.externalFormatDocumentation.back() == "External Formats for Dummies"); unit_assert(diff.a_b.cvParams.size() == 1); unit_assert(diff.b_a.cvParams.size() == 1); unit_assert(diff.a_b.hasCVParam(MS_sample_number)); unit_assert(diff.b_a.hasCVParam(MS_sample_name)); } void testInputs() { if (os_) *os_ << "testInputs()\n"; Inputs a, b; Diff<Inputs, DiffConfig> diff(a,b); unit_assert(!diff); a.sourceFile.push_back(SourceFilePtr(new SourceFile())); a.sourceFile.back()->location = "Sector 9"; a.searchDatabase.push_back(SearchDatabasePtr(new SearchDatabase())); a.searchDatabase.back()->numDatabaseSequences = 100; a.spectraData.push_back(SpectraDataPtr(new SpectraData())); a.spectraData.back()->location = "Cloud 9"; diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.sourceFile.size() == 1); unit_assert(diff.b_a.sourceFile.size() == 0); unit_assert(diff.a_b.sourceFile.back()->location == "Sector 9"); unit_assert(diff.a_b.searchDatabase.size() == 1); unit_assert(diff.b_a.searchDatabase.size() == 0); unit_assert_equal(diff.a_b.searchDatabase.back()->numDatabaseSequences, 100.0, epsilon); unit_assert(diff.a_b.spectraData.size() == 1); unit_assert(diff.b_a.spectraData.size() == 0); unit_assert(diff.a_b.spectraData.back()->location == "Cloud 9"); } void testEnzyme() { if (os_) *os_ << "testEnzyme()\n"; Enzyme a,b; Diff<Enzyme, DiffConfig> diff(a,b); if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(!diff); a.id = "Donald Trump"; b.id = "Donald Duck"; a.nTermGain = "y"; b.nTermGain = "n"; a.cTermGain = "y"; b.cTermGain = "n"; a.terminalSpecificity = proteome::Digestion::SemiSpecific; b.terminalSpecificity = proteome::Digestion::FullySpecific; a.missedCleavages = 1; b.missedCleavages = 5; a.minDistance = 2; b.minDistance = 4; a.siteRegexp = "^"; b.siteRegexp = "$"; a.enzymeName.set(MS_Trypsin); diff(a,b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.id == "Donald Trump"); unit_assert(diff.b_a.id == "Donald Duck"); unit_assert(diff.a_b.nTermGain == "y"); unit_assert(diff.b_a.nTermGain == "n"); unit_assert(diff.a_b.cTermGain == "y"); unit_assert(diff.a_b.terminalSpecificity == proteome::Digestion::SemiSpecific); unit_assert(diff.b_a.terminalSpecificity == proteome::Digestion::FullySpecific); unit_assert(diff.b_a.cTermGain == "n"); unit_assert(diff.a_b.missedCleavages == 1); unit_assert(diff.b_a.missedCleavages == 5); unit_assert(diff.a_b.minDistance == 2); unit_assert(diff.b_a.minDistance == 4); unit_assert(diff.a_b.siteRegexp == "^"); unit_assert(diff.b_a.siteRegexp == "$"); unit_assert(diff.a_b.enzymeName.cvParams.size() == 1); unit_assert(diff.b_a.enzymeName.cvParams.size() == 0); unit_assert(diff.a_b.enzymeName.hasCVParam(MS_Trypsin)); } void testEnzymes() { if (os_) *os_ << "testEnzymes()\n"; Enzymes a, b; Diff<Enzymes, DiffConfig> diff(a, b); if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl; a.independent = "indep"; b.enzymes.push_back(EnzymePtr(new Enzyme())); } void testMassTable() { if (os_) *os_ << "testMassTable()\n"; MassTable a, b; a.id = "id"; a.msLevel.push_back(1); ResiduePtr c(new Residue()); a.residues.push_back(c); AmbiguousResiduePtr d(new AmbiguousResidue()); a.ambiguousResidue.push_back(d); b = a; Diff<MassTable, DiffConfig> diff(a, b); unit_assert(!diff); b.id = "b_id"; diff(a, b); unit_assert(diff); a.id = "b_id"; b.msLevel.push_back(2); diff(a, b); unit_assert(diff); b.msLevel.push_back(2); b.residues.clear(); diff(a, b); unit_assert(diff); a.residues.clear(); b.ambiguousResidue.clear(); diff(a, b); unit_assert(diff); } void testResidue() { if (os_) *os_ << "testResidue()\n"; Residue a, b; a.code = 'A'; a.mass = 1.0; b = a; Diff<Residue, DiffConfig> diff(a, b); unit_assert(!diff); b.code = 'C'; b.mass = 2.0; diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert(diff.a_b.code == 'A'); unit_assert(diff.b_a.code == 'C'); unit_assert_equal(diff.a_b.mass, 1.0, epsilon); unit_assert_equal(diff.b_a.mass, 1.0, epsilon); } void testAmbiguousResidue() { if (os_) *os_ << "testAmbiguousResidue()\n"; AmbiguousResidue a, b; a.code = 'Z'; a.set(MS_alternate_single_letter_codes, "E Q"); b = a; Diff<AmbiguousResidue, DiffConfig> diff(a, b); unit_assert(!diff); b.code = 'B'; b.set(MS_alternate_single_letter_codes, "D N"); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert(diff.a_b.code == 'Z'); unit_assert(diff.b_a.code == 'B'); unit_assert(diff.a_b.cvParam(MS_alternate_single_letter_codes).value == "E Q"); unit_assert(diff.b_a.cvParam(MS_alternate_single_letter_codes).value == "D N"); } void testFilter() { if (os_) *os_ << "testFilter()\n"; Filter a, b; a.filterType.set(MS_DB_filter_taxonomy); a.include.set(MS_DB_PI_filter); a.exclude.set(MS_translation_table); b = a; Diff<Filter, DiffConfig> diff(a, b); unit_assert(!diff); b.filterType.clear(); b.filterType.set(MS_database_filtering); b.include.clear(); b.include.set(MS_DB_filter_on_accession_numbers); b.exclude.clear(); b.exclude.set(MS_DB_MW_filter); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert(diff.a_b.filterType.hasCVParam(MS_DB_filter_taxonomy)); unit_assert(diff.b_a.filterType.hasCVParam(MS_database_filtering)); unit_assert(diff.a_b.include.hasCVParam(MS_DB_PI_filter)); unit_assert(diff.b_a.include.hasCVParam(MS_DB_filter_on_accession_numbers)); unit_assert(diff.a_b.exclude.hasCVParam(MS_translation_table)); unit_assert(diff.b_a.exclude.hasCVParam(MS_DB_MW_filter)); } void testDatabaseTranslation() { if (os_) *os_ << "testDatabaseTranslation()\n"; DatabaseTranslation a, b; a.frames.push_back(1); a.frames.push_back(2); TranslationTablePtr tt(new TranslationTable("TT_1", "TT_1")); tt->set(MS_translation_table, "GATTACA"); tt->set(MS_translation_table_description, "http://somewhere.com"); a.translationTable.push_back(tt); b = a; Diff<DatabaseTranslation, DiffConfig> diff(a, b); unit_assert(!diff); b.translationTable.clear(); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert_operator_equal(0, diff.a_b.frames.size()); unit_assert_operator_equal(0, diff.b_a.frames.size()); unit_assert_operator_equal(1, diff.a_b.translationTable.size()); unit_assert_operator_equal(0, diff.b_a.translationTable.size()); b = a; b.frames.push_back(3); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert_operator_equal(0, diff.a_b.frames.size()); unit_assert_operator_equal(1, diff.b_a.frames.size()); unit_assert_operator_equal(0, diff.a_b.translationTable.size()); unit_assert_operator_equal(0, diff.b_a.translationTable.size()); } void testSpectrumIdentificationProtocol() { if (os_) *os_ << "testSpectrumIdentificationProtocol()\n"; SpectrumIdentificationProtocol a("a_id", "a_name"), b; a.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("a_as")); a.searchType.cvid = MS_pmf_search; a.additionalSearchParams.set(MS_Sequest_CleavesAt, "cleavage"); SearchModificationPtr smp(new SearchModification()); smp->fixedMod = true; a.modificationParams.push_back(smp); a.enzymes.enzymes.push_back(EnzymePtr(new Enzyme("a_enzyme"))); a.massTable.push_back(MassTablePtr(new MassTable("mt_id"))); a.fragmentTolerance.set(MS_search_tolerance_plus_value, 1.0); a.parentTolerance.set(MS_search_tolerance_plus_value, 2.0); a.threshold.set(MS_search_tolerance_minus_value, 3.0); FilterPtr filter = FilterPtr(new Filter()); filter->filterType.set(MS_FileFilter); a.databaseFilters.push_back(filter); a.databaseTranslation = DatabaseTranslationPtr(new DatabaseTranslation()); b = a; Diff<SpectrumIdentificationProtocol, DiffConfig> diff(a, b); unit_assert(!diff); b.id = "b_id"; b.name = "b_name"; diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // TODO debug removal - put it back //unit_assert(diff); b.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("b_as")); b.searchType.cvid = MS_ms_ms_search; b.additionalSearchParams.set(MS_Sequest_CleavesAt, "land"); b.modificationParams.clear(); b.enzymes.enzymes.clear(); b.massTable.clear(); b.fragmentTolerance.set(MS_search_tolerance_plus_value, 4.0); b.parentTolerance.set(MS_search_tolerance_plus_value, 5.0); b.threshold.set(MS_search_tolerance_minus_value, 6.0); b.databaseFilters.clear(); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); } void testProteinDetectionProtocol() { if (os_) *os_ << "testProteinDetectionProtocol()\n"; ProteinDetectionProtocol a("a_id", "a_name"), b; a.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware()); a.analysisParams.set(MS_low_intensity_threshold); a.threshold.set(MS_low_intensity_threshold); b = a; Diff<ProteinDetectionProtocol, DiffConfig> diff(a, b); unit_assert(!diff); b.id = "b_id"; b.name = "b_name"; diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; //unit_assert(diff); } void testAnalysisProtocolCollection() { if (os_) *os_ << "testAnalysisProtocolCollection()\n"; } void testContact() { if (os_) *os_ << "testContact()\n"; Contact a("a_id", "a_name"), b; a.set(MS_contact_address, "address"); a.set(MS_contact_phone_number, "phone"); a.set(MS_contact_email, "email"); a.set(MS_contact_fax_number, "fax"); a.set(MS_contact_toll_free_phone_number, "tollFreePhone"); b = a; Diff<Contact, DiffConfig> diff(a, b); unit_assert(!diff); b.id = "b_id"; b.name = "b_name"; diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); b.set(MS_contact_address, "b_address"); b.set(MS_contact_phone_number, "b_phone"); b.set(MS_contact_email, "b_email"); b.set(MS_contact_fax_number, "b_fax"); b.set(MS_contact_toll_free_phone_number, "b_tollFreePhone"); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); } void testPerson() { if (os_) *os_ << "testPerson()\n"; Person a, b; a.lastName = "last"; a.firstName = "first"; a.midInitials = "mi"; a.affiliations.push_back(OrganizationPtr(new Organization("org"))); b = a; Diff<Person, DiffConfig> diff(a, b); unit_assert(!diff); b.lastName = "smith"; diff(a, b); unit_assert(diff); a.lastName = "smith"; b.firstName = "john"; diff(a, b); unit_assert(diff); a.firstName = "john"; b.midInitials = "j.j."; diff(a, b); unit_assert(diff); a.midInitials = "j.j."; b.affiliations.clear(); diff(a, b); unit_assert(diff); } void testOrganization() { if (os_) *os_ << "testOrganization()\n"; } void testBibliographicReference() { if (os_) *os_ << "testBibliographicReference()\n"; } void testProteinDetection() { if (os_) *os_ << "testProteinDetection()\n"; } void testSpectrumIdentification() { if (os_) *os_ << "testSpectrumIdentification()\n"; } void testAnalysisCollection() { if (os_) *os_ << "testAnalysisCollection()\n"; } void testDBSequence() { if (os_) *os_ << "testDBSequence()\n"; } void testModification() { if (os_) *os_ << "testModification()\n"; } void testSubstitutionModification() { if (os_) *os_ << "testSubstitutionModification()\n"; } void testPeptide() { if (os_) *os_ << "testPeptide()\n"; } void testSequenceCollection() { if (os_) *os_ << "testSequenceCollection()\n"; } void testSampleComponent() { if (os_) *os_ << "testSampleComponent()\n"; } void testSample() { if (os_) *os_ << "testSample()\n"; Sample a, b; a.contactRole.push_back(ContactRolePtr(new ContactRole(MS_role_type, ContactPtr(new Person("contactPtr"))))); b = a; Diff<Sample, DiffConfig> diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(!diff); b.contactRole.back().reset(new ContactRole(MS_role_type, ContactPtr(new Person("fer_rehto")))); b.set(MS_sample_name); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; // a diff was found unit_assert(diff); // and correctly unit_assert(diff.a_b.cvParams.size() == 0); unit_assert(diff.b_a.cvParams.size() == 1); unit_assert(diff.a_b.contactRole.size() == 1); unit_assert(diff.b_a.contactRole.size() == 1); unit_assert(diff.a_b.contactRole.back().get()); unit_assert(diff.b_a.contactRole.back().get()); unit_assert(diff.a_b.contactRole.back()->contactPtr.get()); unit_assert(diff.b_a.contactRole.back()->contactPtr.get()); unit_assert(diff.a_b.contactRole.back()->contactPtr->id == "contactPtr"); unit_assert(diff.b_a.contactRole.back()->contactPtr->id == "fer_rehto"); unit_assert(diff.b_a.hasCVParam(MS_sample_name)); } void testSpectrumIdentificationItem() { if (os_) *os_ << "testSpectrumIdentificationItem()\n"; } void testSpectrumIdentificationResult() { if (os_) *os_ << "testSpectrumIdentificationResult()\n"; } void testAnalysisSampleCollection() { if (os_) *os_ << "testAnalysisSampleCollection()\n"; } void testProvider() { if (os_) *os_ << "testProvider()\n"; } void testContactRole() { if (os_) *os_ << "testContactRole()\n"; ContactRole a, b; a.contactPtr = ContactPtr(new Person("cid", "cname")); a.cvid = MS_software_vendor; b = a; Diff<ContactRole, DiffConfig> diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(!diff); b.contactPtr = ContactPtr(new Organization("cid2", "cname2")); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert(diff.b_a.contactPtr.get()); unit_assert(diff.a_b.contactPtr.get()); unit_assert(diff.a_b.contactPtr->id == "cid"); unit_assert(diff.b_a.contactPtr->id == "cid2"); unit_assert(diff.a_b.contactPtr->name == "cname"); unit_assert(diff.b_a.contactPtr->name == "cname2"); } void testAnalysisSoftware() { if (os_) *os_ << "testAnalysisSoftware()\n"; AnalysisSoftware a, b; Diff<AnalysisSoftware, DiffConfig> diff(a,b); unit_assert(!diff); // a.version a.version="version"; // b.contactRole // a.softwareName // b.URI b.URI="URI"; // a.customizations a.customizations="customizations"; diff(a, b); } void testDataCollection() { if (os_) *os_ << "testDataCollection()\n"; DataCollection a, b; Diff<DataCollection, DiffConfig> diff(a, b); unit_assert(!diff); // a.inputs a.inputs.sourceFile.push_back(SourceFilePtr(new SourceFile())); b.inputs.searchDatabase.push_back(SearchDatabasePtr(new SearchDatabase())); a.inputs.spectraData.push_back(SpectraDataPtr(new SpectraData())); // b.analysisData b.analysisData.spectrumIdentificationList.push_back(SpectrumIdentificationListPtr(new SpectrumIdentificationList())); diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; } void testIdentData() { if (os_) *os_ << "testIdentData()\n"; IdentData a, b; examples::initializeTiny(a); examples::initializeTiny(b); Diff<IdentData, DiffConfig> diff(a, b); unit_assert(!diff); a.cvs.push_back(CV()); b.analysisSoftwareList.push_back(AnalysisSoftwarePtr(new AnalysisSoftware)); a.auditCollection.push_back(ContactPtr(new Contact())); b.bibliographicReference.push_back(BibliographicReferencePtr(new BibliographicReference)); // a.analysisSampleCollection // b.sequenceCollection // a.analysisCollection // b.analysisProtocolCollection // a.dataCollection // b.bibliographicReference diff(a, b); if (os_) *os_ << diff_string<TextWriter>(diff) << endl; unit_assert(diff); unit_assert(diff.a_b.cvs.size() == 1); unit_assert(diff.b_a.cvs.empty()); } void test() { testIdentifiable(); testContact(); testContactRole(); testFragmentArray(); testIonType(); testMeasure(); testPeptideEvidence(); testProteinAmbiguityGroup(); testProteinDetectionHypothesis(); testDataCollection(); testSpectrumIdentificationList(); testProteinDetectionList(); testAnalysisData(); testSearchDatabase(); testSpectraData(); testSourceFile(); testInputs(); testEnzyme(); testEnzymes(); testMassTable(); testResidue(); testAmbiguousResidue(); testFilter(); testDatabaseTranslation(); testSpectrumIdentificationProtocol(); testProteinDetectionProtocol(); testAnalysisProtocolCollection(); testPerson(); testOrganization(); testBibliographicReference(); testProteinDetection(); testSpectrumIdentification(); testAnalysisCollection(); testDBSequence(); testModification(); testSubstitutionModification(); testPeptide(); testSequenceCollection(); testSampleComponent(); testSample(); testSearchModification(); testSpectrumIdentificationItem(); testSpectrumIdentificationResult(); testAnalysisSampleCollection(); testProvider(); testAnalysisSoftware(); testAnalysisSoftware(); testIdentData(); } int main(int argc, char* argv[]) { TEST_PROLOG_EX(argc, argv, "_IdentData") try { if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout; test(); } catch (exception& e) { TEST_FAILED(e.what()) } catch (...) { TEST_FAILED("Caught unknown exception.") } TEST_EPILOG }
[ "ming@localhost" ]
ming@localhost
040e368a17a634ecbc4759a869ffdfd9538b390a
5108175f21c5c77e31ceca09597f6dc102655451
/DX11UWA Left Handed/DX11UWA/DX11UWA/Content/ShaderStructures.h
7468de419d2a1f6cd80304e0406976be16d2406c
[]
no_license
ConnorCraig25/GraphicsIIproject
61e9c3784e08f82c565ea269dbb8c7be3e395224
19d47ef336f60930a2e1f6c36f920a14706758b4
refs/heads/master
2020-12-03T10:30:14.165896
2017-07-27T01:27:38
2017-07-27T01:27:38
95,605,355
0
0
null
null
null
null
UTF-8
C++
false
false
505
h
#pragma once namespace DX11UWA { // Constant buffer used to send MVP matrices to the vertex shader. struct ModelViewProjectionConstantBuffer { DirectX::XMFLOAT4X4 model; DirectX::XMFLOAT4X4 view; DirectX::XMFLOAT4X4 projection; }; // Used to send per-vertex data to the vertex shader. struct VertexPositionColor { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT3 color; }; struct VertexPositionUVNormal { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT3 uv; DirectX::XMFLOAT3 normal; }; }
[ "ccraig@fullsail.edu" ]
ccraig@fullsail.edu
b058d460d924ce7fca3f1edb21e1e2bb1c100360
4f1212e6f69f1966d5ca900f6a8d5e5895186098
/09. geometric objects/Rectangle.h
8a07b5272bf9ffb34c3a9e4d15bf520cf6781b57
[]
no_license
ffuis-aljosa/2017-OOP
ca6eb1ea28f88386a1b4ad22a1423960981f4124
c95b9f5cd12be63f5dfec6fb3a5412012bd2665e
refs/heads/master
2021-09-01T19:05:36.802715
2017-12-28T10:33:21
2017-12-28T10:33:21
109,244,939
1
0
null
null
null
null
UTF-8
C++
false
false
1,208
h
#ifndef RECTANGLE_H_INCLUDED #define RECTANGLE_H_INCLUDED #include "GeometricObject.h" #include "Point.h" #include <stdexcept> using namespace std; class Rectangle : GeometricObject { private: Point upperLeftVertex; double width; double height; public: Rectangle(string _name, Point _upperLeftVertex, double _width, double _height) : GeometricObject(_name), upperLeftVertex(_upperLeftVertex) { setWidth(_width); setHeight(_height); } void setWidth(double _width) { if (_width < 0) throw runtime_error("Sirina ne moze biti manja od 0"); width = _width; } void setHeight(double _height) { if (_height < 0) throw runtime_error("Visina ne moze biti manja od 0"); height = _height; } double area() { return width * height; } double circumference() { return 2 * (width + height); } Point getUpperLeftVertex() { return upperLeftVertex; } Point getLowerRightVertex() { return Point(upperLeftVertex.getX() + width, upperLeftVertex.getY() - height); } }; #endif // RECTANGLE_H_INCLUDED
[ "a.sljuka@ffuis.edu.ba" ]
a.sljuka@ffuis.edu.ba
c920a7156d442d5c7df7618ac5e637bd96eafb7b
5b2574dae711499728be550581c57754fb6531e3
/Section 5/Video 5.5/main.cpp
861590ce98e77a2d45b569d20b94c1718b4c8b96
[ "MIT" ]
permissive
vabtree/Building-Blocks-of-Application-Development-with-C-source
398398ab5516008a1894d822b87396190280bbec
38b2a8883be76c7bf0d11605392256150d9f4074
refs/heads/master
2022-08-17T19:03:21.156356
2018-04-02T11:48:03
2018-04-02T11:48:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
735
cpp
#include <iostream> #include <vector> // row -> |--|--|--| // |--|--|--| // |--|--|--| // |--|--|--| template <typename T = int> class matrix { private: size_t mRows, mCols; std::vector<std::vector<T>* > mRowData; public: matrix(const size_t& rows, const size_t& cols) { mRows = rows; mCols = cols; mRowData.reserve(rows); for (int i = 0; i < mRows; i++) { mRowData.push_back(new std::vector<T>(cols)); } } std::vector<T>& operator[](const size_t& row_id) { return *(mRowData[row_id]); } }; int main() { matrix<double> md(2, 2); md[1][1] = 56.4; std::cout << md[1][1] << std::endl; return 0; }
[ "harshg@packtpub.com" ]
harshg@packtpub.com
3c02a2834fddef2c506acd451d4c30b28f958265
4f650c5c875862e3869730d8c5987adf84adc391
/HBSSSE/mwSICARDActX/mwSICARDActXPropPage.h
0e13fcd52700acdf661cc8ed0b0837cb1e129546
[]
no_license
shenguotao/SSSE_HeBei
4cf1bfcc82a23c40c1f0a2a4106f1c04a351f530
2eba065fe5dd62818823f78122642a2c1de62dd8
refs/heads/master
2021-01-01T05:07:45.948276
2017-01-20T15:30:45
2017-01-20T15:30:45
78,948,994
2
3
null
2017-01-20T15:27:33
2017-01-14T15:42:57
C
GB18030
C++
false
false
586
h
#pragma once // mwSICARDActXPropPage.h : CmwSICARDActXPropPage 属性页类的声明。 // CmwSICARDActXPropPage : 有关实现的信息,请参阅 mwSICARDActXPropPage.cpp。 class CmwSICARDActXPropPage : public COlePropertyPage { DECLARE_DYNCREATE(CmwSICARDActXPropPage) DECLARE_OLECREATE_EX(CmwSICARDActXPropPage) // 构造函数 public: CmwSICARDActXPropPage(); // 对话框数据 enum { IDD = IDD_PROPPAGE_MWSICARDACTX }; // 实现 protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 // 消息映射 protected: DECLARE_MESSAGE_MAP() };
[ "18618219527@163.com" ]
18618219527@163.com
1377b080d0fdfa25c2424a82328d14033b7c240b
bc7cdf36f7bb5cd09d93719171438a7680f5a604
/src/server/game/Combat/HostileRefManager.cpp
85afdf646077a26ffe196b288f6c13e9090623c1
[]
no_license
bahajan95/BattleCore
41f03a281770e4903be96a48930bd70a398aae72
88d436c9422a433d26fe89aff2ecfb3b11fba778
refs/heads/master
2020-04-10T00:49:28.254803
2015-05-17T22:10:34
2015-05-17T22:10:34
50,763,988
1
3
null
2016-01-31T07:43:00
2016-01-31T07:43:00
null
UTF-8
C++
false
false
5,289
cpp
/* * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "HostileRefManager.h" #include "ThreatManager.h" #include "Unit.h" #include "DBCStructure.h" #include "SpellMgr.h" #include "SpellInfo.h" HostileRefManager::~HostileRefManager() { deleteReferences(); } //================================================= // send threat to all my hateres for the victim // The victim is hated than by them as well // use for buffs and healing threat functionality void HostileRefManager::threatAssist(Unit* victim, float baseThreat, SpellInfo const* threatSpell) { if (getSize() == 0) return; HostileReference* ref = getFirst(); float threat = ThreatCalcHelper::calcThreat(victim, iOwner, baseThreat, (threatSpell ? threatSpell->GetSchoolMask() : SPELL_SCHOOL_MASK_NORMAL), threatSpell); threat /= getSize(); while (ref) { if (ThreatCalcHelper::isValidProcess(victim, ref->GetSource()->GetOwner(), threatSpell)) ref->GetSource()->doAddThreat(victim, threat); ref = ref->next(); } } //================================================= void HostileRefManager::addTempThreat(float threat, bool apply) { HostileReference* ref = getFirst(); while (ref) { if (apply) { if (ref->getTempThreatModifier() == 0.0f) ref->addTempThreat(threat); } else ref->resetTempThreat(); ref = ref->next(); } } //================================================= void HostileRefManager::addThreatPercent(int32 percent) { HostileReference* ref = getFirst(); while (ref) { ref->addThreatPercent(percent); ref = ref->next(); } } //================================================= // The online / offline status is given to the method. The calculation has to be done before void HostileRefManager::setOnlineOfflineState(bool isOnline) { HostileReference* ref = getFirst(); while (ref) { ref->setOnlineOfflineState(isOnline); ref = ref->next(); } } //================================================= // The online / offline status is calculated and set void HostileRefManager::updateThreatTables() { HostileReference* ref = getFirst(); while (ref) { ref->updateOnlineStatus(); ref = ref->next(); } } //================================================= // The references are not needed anymore // tell the source to remove them from the list and free the mem void HostileRefManager::deleteReferences() { HostileReference* ref = getFirst(); while (ref) { HostileReference* nextRef = ref->next(); ref->removeReference(); delete ref; ref = nextRef; } } //================================================= // delete one reference, defined by faction void HostileRefManager::deleteReferencesForFaction(uint32 faction) { HostileReference* ref = getFirst(); while (ref) { HostileReference* nextRef = ref->next(); if (ref->GetSource()->GetOwner()->GetFactionTemplateEntry()->faction == faction) { ref->removeReference(); delete ref; } ref = nextRef; } } //================================================= // delete one reference, defined by Unit void HostileRefManager::deleteReference(Unit* creature) { HostileReference* ref = getFirst(); while (ref) { HostileReference* nextRef = ref->next(); if (ref->GetSource()->GetOwner() == creature) { ref->removeReference(); delete ref; break; } ref = nextRef; } } //================================================= // set state for one reference, defined by Unit void HostileRefManager::setOnlineOfflineState(Unit* creature, bool isOnline) { HostileReference* ref = getFirst(); while (ref) { HostileReference* nextRef = ref->next(); if (ref->GetSource()->GetOwner() == creature) { ref->setOnlineOfflineState(isOnline); break; } ref = nextRef; } } //================================================= void HostileRefManager::UpdateVisibility() { HostileReference* ref = getFirst(); while (ref) { HostileReference* nextRef = ref->next(); if (!ref->GetSource()->GetOwner()->CanSeeOrDetect(GetOwner())) { nextRef = ref->next(); ref->removeReference(); delete ref; } ref = nextRef; } }
[ "adonai@xaker.ru" ]
adonai@xaker.ru
c5bb7e774e05dd5d67c790765ef044d68e379900
8dc84558f0058d90dfc4955e905dab1b22d12c08
/content/test/gpu_browsertest_helpers.h
bdd296556d3fec426d52c0238120ce00c345ab7d
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
C++
false
false
895
h
// Copyright 2018 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 CONTENT_TEST_GPU_BROWSERTEST_HELPERS_H_ #define CONTENT_TEST_GPU_BROWSERTEST_HELPERS_H_ #include "base/memory/scoped_refptr.h" namespace gpu { class GpuChannelHost; } namespace ui { class ContextProviderCommandBuffer; } namespace content { // Synchronously establishes a connection to the GPU process and returns the // GpuChannelHost. scoped_refptr<gpu::GpuChannelHost> GpuBrowsertestEstablishGpuChannelSyncRunLoop(); // Creates a new ContextProviderCommandBuffer using the provided // GpuChannelHost. scoped_refptr<ui::ContextProviderCommandBuffer> GpuBrowsertestCreateContext( scoped_refptr<gpu::GpuChannelHost> gpu_channel_host); } // namespace content #endif // CONTENT_TEST_GPU_BROWSERTEST_HELPERS_H_
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
ca46c8696e0983329bcbd1a3e401c1b6f427ddf2
f8328b71ffbf5ea2b25e9b016b20d9978357b08a
/hw1/src/example2.cpp
1114614e6d4aa7a3240b4a50d02fd494a1aa5bee
[]
no_license
ChaseCarthen/cs791a
5aaa351ac5e295966f48b9d40b6bf069f46d69a0
6c547c6e3e476938a7cfc958f588a4485acbe411
refs/heads/master
2020-04-11T10:05:00.647363
2014-09-28T08:48:07
2014-09-28T08:48:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
19,044
cpp
#include <GL/glew.h> #include "wx/wx.h" #include "wx/sizer.h" #include "wx/glcanvas.h" #include <example2.h> #include <shader.h> #include <iostream> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/gtx/rotate_vector.hpp> #include <gishandler.h> #include <mainframe.h> // include OpenGL #ifdef __WXMAC__ #include "OpenGL/glu.h" #include "OpenGL/gl.h" #else //#include <GL/glu.h> #include <GL/gl.h> #endif using namespace std; bool initialize(); /*struct Vertex { GLfloat position[3]; GLfloat color[3]; };*/ int cs=0; GLuint program; GLuint vbo_geometry; GLuint elements; GLuint texture; //uniform locations GLint loc_mvpmat;// Location of the modelviewprojection matrix in the shader wxImage image; //attribute locations GLint loc_position; GLint loc_color; GLint shader_status; GLint loc_height; GLint colorm; float max_height = 2; //transform matrices glm::mat4 model;//obj->world each object should have its own model matrix glm::mat4 view;//world->eye glm::mat4 projection;//eye->clip glm::mat4 mvp;//premultiplied modelviewprojection glm::vec3 position = glm::vec3(1.0, 20.0, 1.0); glm::vec3 direction = {0,0,1.0}; int w = 640, h = 480; float angle = 0; float angle2 = 0; class MyApp: public wxApp { virtual bool OnInit(); wxFrame *frame; BasicGLPane * glPane; public: }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL); //frame = new wxFrame((wxFrame *)NULL, -1, wxT("Hello GL World"), wxPoint(50,50), wxSize(400,200)); int args[] = {WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0}; //glPane = new BasicGLPane( (wxFrame*) frame, args); //sizer->Add(glPane, 1,wxEXPAND); //glPane->starter = false; //frame->SetSizer(sizer); //frame->SetAutoLayout(true); //cout << "Initializing!!" << std::endl; //if(!initialize()) // return false; //frame->Show(); //glPane->starter = true; MainFrame *MainWin = new MainFrame( _("Terrain Opener"), wxPoint(1, 1), wxSize(300, 200)); //MainWin->Show(TRUE); // show the window SetTopWindow(MainWin); // and finally, set it as the main window glPane = new BasicGLPane( (wxFrame*) MainWin, args); sizer->Add(glPane, 1,wxEXPAND); //glPane->starter = false; MainWin->SetSizer(sizer); MainWin->SetAutoLayout(true); if(!initialize()) return false; MainWin->Show(true); return TRUE; //return true; } // some useful events to use void BasicGLPane::mouseMoved(wxMouseEvent& event) {} void BasicGLPane::onCharEvent(wxKeyEvent& event) { } void BasicGLPane::mouseDown(wxMouseEvent& event) {} void BasicGLPane::mouseWheelMoved(wxMouseEvent& event) {} void BasicGLPane::mouseReleased(wxMouseEvent& event) {} void BasicGLPane::rightClick(wxMouseEvent& event) {} void BasicGLPane::mouseLeftWindow(wxMouseEvent& event) {} void BasicGLPane::keyPressed(wxKeyEvent& event) { if(event.GetKeyCode() == wxKeyCode('A')) { angle += 90; } else if(event.GetKeyCode() == wxKeyCode('D')) { angle -= 90; } if(event.GetKeyCode() == wxKeyCode('W')) { angle2 += 90; } else if(event.GetKeyCode() == wxKeyCode('S')) { angle2 -= 90; } //std::cout << " " << angle << "KEY PRESSLED2" << position.x << ":POSITION" << position.z << std::endl; // std::cout << " " << angle << "KEY PRESSLED" << position.x << ":POSITION" << position.z << std::endl; //direction.rotateY(90.0f); direction = glm::vec3(0,0,1); direction = glm::rotateY(direction,angle*3.14f/180.f); direction = glm::rotateX(direction,angle2*3.14f/180.f); glm::vec3 motionvector = glm::vec3(0,0,0); if(event.GetKeyCode() == WXK_LEFT) { position.x -= 1; } if(event.GetKeyCode() == WXK_RIGHT) { position.x += 1; } if(event.GetKeyCode() == WXK_UP) { direction = glm::normalize(direction); motionvector = 2.f*direction; } if(event.GetKeyCode() == WXK_DOWN) { direction = glm::normalize(direction); motionvector = -2.f * direction; } position += motionvector; view = glm::lookAt( position, //Eye Position glm::vec3(position+direction), //Focus point glm::vec3(0.0, 1.0, 0.0)); //Positive Y is up Refresh(); } void BasicGLPane::keyReleased(wxKeyEvent& event) { } void BasicGLPane::InitializeGLEW() { //prepare2DViewport(0,0,getWidth(), getHeight()); // The current canvas has to be set before GLEW can be initialized. wxGLCanvas::SetCurrent(*m_context); GLenum err = glewInit(); // If Glew doesn't initialize correctly. if(GLEW_OK != err) { std::cerr << "Error:" << glewGetString(err) << std::endl; const GLubyte* String = glewGetErrorString(err); wxMessageBox("GLEW is not initialized"); } glEnable(GL_TEXTURE_1D); wxInitAllImageHandlers(); image.LoadFile("colorMap.png"); glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_1D, texture); // sample: specify texture parameters //glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); //glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); /* Linear filtering usually looks best for text */ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); //glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); //glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); // set the active texture cout << "IMAGE DIM " << image.GetWidth() << " " << image.GetHeight() << endl; glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, image.GetWidth(), 0, GL_RGB, GL_UNSIGNED_BYTE, image.GetData()); } // Vertices and faces of a simple cube to demonstrate 3D render // source: http://www.opengl.org/resources/code/samples/glut_examples/examples/cube.c GLfloat v[8][3]; GLint faces[6][4] = { /* Vertex indices for the 6 faces of a cube. */ {0, 1, 2, 3}, {3, 2, 6, 7}, {7, 6, 5, 4}, {4, 5, 1, 0}, {5, 6, 2, 1}, {7, 4, 0, 3} }; BasicGLPane::BasicGLPane(wxFrame* parent, int* args) : wxGLCanvas(parent, wxID_ANY, args, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE) { m_context = new wxGLContext(this); Parent = parent; // prepare a simple cube to demonstrate 3D render // source: http://www.opengl.org/resources/code/samples/glut_examples/examples/cube.c v[0][0] = v[1][0] = v[2][0] = v[3][0] = -1; v[4][0] = v[5][0] = v[6][0] = v[7][0] = 1; v[0][1] = v[1][1] = v[4][1] = v[5][1] = -1; v[2][1] = v[3][1] = v[6][1] = v[7][1] = 1; v[0][2] = v[3][2] = v[4][2] = v[7][2] = 1; v[1][2] = v[2][2] = v[5][2] = v[6][2] = -1; // To avoid flashing on MSW SetBackgroundStyle(wxBG_STYLE_CUSTOM); InitializeGLEW(); //parent->SetStatusText( "Welcome to wxWidgets!" ); std::cout << "Creating Context" << getWidth() << " " << getHeight() << std::endl; //cout << "IMAGE DIMENSIONS" << image.GetWidth() << " " << image.GetHeight() << endl; //initialize(); } BasicGLPane::~BasicGLPane() { glDeleteProgram(program); glDeleteBuffers(1, &vbo_geometry); delete m_context; } void BasicGLPane::resized(wxSizeEvent& evt) { // wxGLCanvas::OnSize(evt); glViewport( 0, 0, getWidth(), getHeight()); projection = glm::perspective( 45.0f, //the FoV typically 90 degrees is good which is what this is set to float(getWidth())/float(getHeight()), //Aspect Ratio, so Circles stay Circular 0.01f, //Distance to the near plane, normally a small value like this 100.0f); //Distance to the far plane, std::cout << "REFRESHING" << std::endl; Refresh(); } /** Inits the OpenGL viewport for drawing in 3D. */ void BasicGLPane::prepare3DViewport(int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y) { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Black Background glClearDepth(1.0f); // Depth Buffer Setup glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glEnable(GL_COLOR_MATERIAL); glViewport(topleft_x, topleft_y, bottomrigth_x-topleft_x, bottomrigth_y-topleft_y); glMatrixMode(GL_PROJECTION); glLoadIdentity(); float ratio_w_h = (float)(bottomrigth_x-topleft_x)/(float)(bottomrigth_y-topleft_y); gluPerspective(45 /*view angle*/, ratio_w_h, 0.1 /*clip close*/, 200 /*clip far*/); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } /** Inits the OpenGL viewport for drawing in 2D. */ void BasicGLPane::prepare2DViewport(int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y) { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Black Background glEnable(GL_TEXTURE_1D); // textures glEnable(GL_COLOR_MATERIAL); glEnable(GL_BLEND); glDisable(GL_DEPTH_TEST); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glViewport(topleft_x, topleft_y, bottomrigth_x-topleft_x, bottomrigth_y-topleft_y); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(topleft_x, bottomrigth_x, bottomrigth_y, topleft_y); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } int BasicGLPane::getWidth() { return GetSize().x; } int BasicGLPane::getHeight() { return GetSize().y; } void BasicGLPane::render( wxPaintEvent& evt ) { if(!IsShown()) return; //return; //if(starter) //{ std::cout << "Rendering" << getWidth() << " " << getHeight() << std::endl; wxGLCanvas::SetCurrent(*m_context); wxPaintDC(this); // only to be used in paint events. use wxClientDC to paint outside the paint event // glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //--Render the scene //clear the screen glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClearColor(0.0, 0.0, 0.2, 1.0); //premultiply the matrix for this example mvp = projection * view * model; //enable the shader program glUseProgram(program); //upload the matrix to the shader glUniformMatrix4fv(loc_mvpmat, 1, GL_FALSE, glm::value_ptr(mvp)); glUniform1f(loc_height,max_height); //set up the Vertex Buffer Object so it can be drawn glEnableVertexAttribArray(loc_position); glEnableVertexAttribArray(loc_color); glEnable(GL_TEXTURE_1D); glUniform1i(colorm, 0); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_1D, texture); glBindBuffer(GL_ARRAY_BUFFER, vbo_geometry); std::cout << loc_position << " " << loc_color << std::endl; //set pointers into the vbo for each of the attributes(position and color) glVertexAttribPointer( loc_position,//location of attribute 3,//number of elements GL_FLOAT,//type GL_FALSE,//normalized? sizeof(Vertex),//stride 0);//offset glVertexAttribPointer( loc_color, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex,color)); // Index buffer glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elements); // Draw the triangles ! glDrawElements( GL_LINES, // mode cs, // count GL_UNSIGNED_INT, // type (void*)0 // element array buffer offset ); //return; //glDrawArrays(GL_TRIANGLES, 0, 36);//mode, starting index, count //clean up glDisableVertexAttribArray(loc_position); glDisableVertexAttribArray(loc_color); //swap the buffers //glutSwapBuffers(); glFlush(); SwapBuffers(); //} } bool initialize() { GLuint vertex_shader; GLuint frag_shader; // A Cube! Vertex geometry[] = { {{-1.0, -1.0, -1.0}, {0.0, 0.0, 0.0}}, {{-1.0, -1.0, 1.0}, {0.0, 0.0, 1.0}}, {{-1.0, 1.0, 1.0}, {0.0, 1.0, 1.0}}, {{1.0, 1.0, -1.0}, {1.0, 1.0, 0.0}}, {{-1.0, -1.0, -1.0}, {0.0, 0.0, 0.0}}, {{-1.0, 1.0, -1.0}, {0.0, 1.0, 0.0}}, {{1.0, -1.0, 1.0}, {1.0, 0.0, 1.0}}, {{-1.0, -1.0, -1.0}, {0.0, 0.0, 0.0}}, {{1.0, -1.0, -1.0}, {1.0, 0.0, 0.0}}, {{1.0, 1.0, -1.0}, {1.0, 1.0, 0.0}}, {{1.0, -1.0, -1.0}, {1.0, 0.0, 0.0}}, {{-1.0, -1.0, -1.0}, {0.0, 0.0, 0.0}}, {{-1.0, -1.0, -1.0}, {0.0, 0.0, 0.0}}, {{-1.0, 1.0, 1.0}, {0.0, 1.0, 1.0}}, {{-1.0, 1.0, -1.0}, {0.0, 1.0, 0.0}}, {{1.0, -1.0, 1.0}, {1.0, 0.0, 1.0}}, {{-1.0, -1.0, 1.0}, {0.0, 0.0, 1.0}}, {{-1.0, -1.0, -1.0}, {0.0, 0.0, 0.0}}, {{-1.0, 1.0, 1.0}, {0.0, 1.0, 1.0}}, {{-1.0, -1.0, 1.0}, {0.0, 0.0, 1.0}}, {{1.0, -1.0, 1.0}, {1.0, 0.0, 1.0}}, {{1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}}, {{1.0, -1.0, -1.0}, {1.0, 0.0, 0.0}}, {{1.0, 1.0, -1.0}, {1.0, 1.0, 0.0}}, {{1.0, -1.0, -1.0}, {1.0, 0.0, 0.0}}, {{1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}}, {{1.0, -1.0, 1.0}, {1.0, 0.0, 1.0}}, {{1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}}, {{1.0, 1.0, -1.0}, {1.0, 1.0, 0.0}}, {{-1.0, 1.0, -1.0}, {0.0, 1.0, 0.0}}, {{1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}}, {{-1.0, 1.0, -1.0}, {0.0, 1.0, 0.0}}, {{-1.0, 1.0, 1.0}, {0.0, 1.0, 1.0}}, {{1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}}, {{-1.0, 1.0, 1.0}, {0.0, 1.0, 1.0}}, {{1.0, -1.0, 1.0}, {1.0, 0.0, 1.0}} }; program = glCreateProgram(); vertex_shader = glCreateShader(GL_VERTEX_SHADER); //shade2 = shader(vertex_shader); frag_shader = glCreateShader(GL_FRAGMENT_SHADER); //shade = shader(frag_shader); shader shade2(vertex_shader); shader shade(frag_shader); if(!shade.open("../shaders/frag.shader")) { cout << "Failed to open shader" << std::endl; return false; } if(!shade2.open("../shaders/vert.shader")) { cout << "Failed to open shader" << endl; return false; } if(!shade.compile()) { cout << "Failed to compile" << endl; return false; } if(!shade2.compile()) { cout << "failed to compile" << endl; } if(!shade2.link(program)) { cout << "failed to link" << endl; } if(!shade.link(program)) { cout << "failed to link" << endl; } //glTexImage2D(GL_TEXTURE_1D, 0, ship.bytes_per_pixel, ship.width, ship.height, 0, GetDataFormat(), GetDataType(), ship.pixel_data); //glGetProgramiv(program, GL_LINK_STATUS, &shader_status); //if(!shader_status) //{ // std::cerr << "[F] THE SHADER PROGRAM FAILED TO LINK" << std::endl; // return false; //} // Create a Vertex Buffer object to store this vertex info on the GPU //glGenBuffers(1, &vbo_geometry); //glBindBuffer(GL_ARRAY_BUFFER, vbo_geometry); //glBufferData(GL_ARRAY_BUFFER, sizeof(geometry), geometry, GL_STATIC_DRAW); vector<vector<float>> floatarr = vector<vector<float>>(getRawValuesFromFile("test.pgm")); if(floatarr.size() == 0) { return false; } cout << "GOT RAW VALUES! " << floatarr.size() << endl; float min=100000000,max=-100000; for(int i =0; i < floatarr.size(); i++) for(int j = 0; j < floatarr[i].size(); j++) { //cout << "LOOP" << j << " " << floatarr[i].size() << endl; float v = floatarr[i][j]; if(v > max) { max = v; } if(v < min && v > 0) { min = v; } if(v < 0) { floatarr[i][j] = 0; } } std::cout << "Creating Mesh" << min << " " << max<< std::endl; cs=fromRawCreateMesh(floatarr,min,max,vbo_geometry,elements); //Now we set the locations of the attributes and uniforms //this allows us to access them easily while rendering loc_position = glGetAttribLocation(program, const_cast<const char*>("v_position")); if(loc_position == -1) { std::cerr << "[F] POSITION NOT FOUND" << std::endl; return false; } loc_color = glGetAttribLocation(program, const_cast<const char*>("v_color")); if(loc_color == -1) { std::cerr << "[F] V_COLOR NOT FOUND" << std::endl; return false; } loc_height = glGetUniformLocation(program, const_cast<const char*>("h")); if(loc_height == -1) { std::cerr << "[F] HEIGHT NOT FOUND" << std::endl; return false; } loc_mvpmat = glGetUniformLocation(program, const_cast<const char*>("mvpMatrix")); if(loc_mvpmat == -1) { std::cerr << "[F] MVPMATRIX NOT FOUND" << std::endl; return false; } colorm = glGetUniformLocation(program, "tex"); if(colorm == -1) { std::cerr << "[F] Color Map NOT FOUND" << std::endl; return false; } std::cout << loc_mvpmat << " " << loc_color << " " << loc_position << std::endl; //--Init the view and projection matrices // if you will be having a moving camera the view matrix will need to more dynamic // ...Like you should update it before you render more dynamic // for this project having them static will be fine view = glm::lookAt( glm::vec3(0.0, 5.0, 0.0), //Eye Position glm::vec3(0, 10.0, 1.0), //Focus point glm::vec3(0.0, 1.0, 0.0)); //Positive Y is up // projection = glm::perspective( 45.0f, //the FoV typically 90 degrees is good which is what this is set to // float(w)/float(h), //Aspect Ratio, so Circles stay Circular // 0.01f, //Distance to the near plane, normally a small value like this // 100.0f); //Distance to the far plane, //enable depth testing glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); return true; }
[ "chasec2331@gmail.com" ]
chasec2331@gmail.com
58cdcc41ef8e762eaef6c5a07bee85fefb2ea797
7f237f107ae6e22a2c4c87b7bf25a2e5cdb05b75
/Source/Engine/Physics/MotionState.cpp
434c780c0febd12183f6cd39db9879a8dfc675a0
[]
no_license
rshageev/Avalanche
9aecee505104cc0e8149837196c717d595b50e75
50e4316590cf2ebb1378390c8fb1256123abf948
refs/heads/master
2023-02-22T07:52:16.594639
2015-11-11T16:07:18
2015-11-11T16:07:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,047
cpp
#include "stdafx.h" #include "MotionState.h" inline btVector3 toBtVec(const Vector3f &vec) { return btVector3(vec.x, vec.y, vec.z); } inline btQuaternion toBtQuat(const Quaternion &quat) { return btQuaternion(quat.x, quat.y, quat.z, quat.w); } inline Vector3f toAvVec(const btVector3 &vec) { return Vector3f(vec.getX(), vec.getY(), vec.getZ()); } inline Quaternion toAvQuat(const btQuaternion &quat) { return Quaternion(quat.getX(), quat.getY(), quat.getZ(), quat.getW()); } AvMotionState::AvMotionState(TransformComponent *transform) : _transform(transform) { } void AvMotionState::SetTransform(TransformComponent *transform) { _transform = transform; } void AvMotionState::getWorldTransform(btTransform &worldTrans) const { worldTrans.setOrigin( toBtVec(_transform->position) ); worldTrans.setRotation( toBtQuat(_transform->rotation) ); } void AvMotionState::setWorldTransform(const btTransform &worldTrans) { _transform->position = toAvVec(worldTrans.getOrigin()); _transform->rotation = toAvQuat(worldTrans.getRotation()); }
[ "renatsh@playrix.com" ]
renatsh@playrix.com
a4703cf45151c36fe1f049e3e41cffea5370f94c
d4c720f93631097ee048940d669e0859e85eabcf
/chrome/browser/ash/app_restore/app_launch_handler.cc
5fb075bbddb9418f1362e8cc74517d5ad7459122
[ "BSD-3-Clause" ]
permissive
otcshare/chromium-src
26a7372773b53b236784c51677c566dc0ad839e4
3b920d87437d9293f654de1f22d3ea341e7a8b55
refs/heads/webnn
2023-03-21T03:20:15.377034
2023-01-25T21:19:44
2023-01-25T21:19:44
209,262,645
18
21
BSD-3-Clause
2023-03-23T06:20:07
2019-09-18T08:52:07
null
UTF-8
C++
false
false
8,621
cc
// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ash/app_restore/app_launch_handler.h" #include <utility> #include <vector> #include "apps/launcher.h" #include "base/bind.h" #include "base/callback.h" #include "base/task/single_thread_task_runner.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" #include "chrome/browser/apps/app_service/app_service_proxy_factory.h" #include "chrome/browser/apps/app_service/browser_app_launcher.h" #include "chrome/browser/apps/app_service/metrics/app_platform_metrics.h" #include "chrome/browser/profiles/profile.h" #include "components/app_constants/constants.h" #include "components/app_restore/full_restore_read_handler.h" #include "components/services/app_service/public/cpp/app_launch_util.h" #include "components/services/app_service/public/cpp/intent.h" #include "components/services/app_service/public/cpp/types_util.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/extension.h" namespace ash { namespace { // Returns apps::AppTypeName used for metrics. apps::AppTypeName GetHistogrameAppType(apps::AppType app_type) { switch (app_type) { case apps::AppType::kUnknown: return apps::AppTypeName::kUnknown; case apps::AppType::kArc: return apps::AppTypeName::kArc; case apps::AppType::kBuiltIn: case apps::AppType::kCrostini: return apps::AppTypeName::kUnknown; case apps::AppType::kChromeApp: return apps::AppTypeName::kChromeApp; case apps::AppType::kWeb: return apps::AppTypeName::kWeb; case apps::AppType::kMacOs: case apps::AppType::kPluginVm: case apps::AppType::kStandaloneBrowser: case apps::AppType::kStandaloneBrowserChromeApp: case apps::AppType::kRemote: case apps::AppType::kBorealis: case apps::AppType::kBruschetta: case apps::AppType::kExtension: case apps::AppType::kStandaloneBrowserExtension: return apps::AppTypeName::kUnknown; case apps::AppType::kSystemWeb: return apps::AppTypeName::kSystemWeb; } } } // namespace AppLaunchHandler::AppLaunchHandler(Profile* profile) : profile_(profile) {} AppLaunchHandler::~AppLaunchHandler() = default; bool AppLaunchHandler::HasRestoreData() { return restore_data_ && !restore_data_->app_id_to_launch_list().empty(); } void AppLaunchHandler::OnAppUpdate(const apps::AppUpdate& update) { if (update.AppId() == app_constants::kChromeAppId || !restore_data_ || !update.ReadinessChanged()) { return; } if (!apps_util::IsInstalled(update.Readiness())) { restore_data_->RemoveApp(update.AppId()); return; } // If the app is not ready, don't launch the app for the restoration. if (update.Readiness() != apps::Readiness::kReady) return; // If there is no restore data or the launch list for the app is empty, don't // launch the app. const auto& app_id_to_launch_list = restore_data_->app_id_to_launch_list(); if (app_id_to_launch_list.find(update.AppId()) == app_id_to_launch_list.end()) { return; } base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&AppLaunchHandler::LaunchApp, GetWeakPtrAppLaunchHandler(), update.AppType(), update.AppId())); } void AppLaunchHandler::OnAppTypeInitialized(apps::AppType app_type) { // Do nothing: overridden by subclasses. } void AppLaunchHandler::OnAppRegistryCacheWillBeDestroyed( apps::AppRegistryCache* cache) { apps::AppRegistryCache::Observer::Observe(nullptr); } void AppLaunchHandler::LaunchApps() { // If there is no launch list from the restore data, we don't need to handle // launching. const auto& launch_list = restore_data_->app_id_to_launch_list(); if (launch_list.empty()) return; // Observe AppRegistryCache to get the notification when the app is ready. DCHECK( apps::AppServiceProxyFactory::IsAppServiceAvailableForProfile(profile_)); auto* cache = &apps::AppServiceProxyFactory::GetForProfile(profile_) ->AppRegistryCache(); Observe(cache); for (const auto app_type : cache->InitializedAppTypes()) { OnAppTypeInitialized(app_type); } // Add the app to `app_ids` if there is a launch list from the restore data // for the app. std::set<std::string> app_ids; cache->ForEachApp([&app_ids, &launch_list](const apps::AppUpdate& update) { if (update.Readiness() == apps::Readiness::kReady && launch_list.find(update.AppId()) != launch_list.end()) { app_ids.insert(update.AppId()); } }); for (const auto& app_id : app_ids) { // Chrome browser web pages are restored separately, so we don't need to // launch browser windows. if (app_id == app_constants::kChromeAppId) continue; LaunchApp(cache->GetAppType(app_id), app_id); } } bool AppLaunchHandler::ShouldLaunchSystemWebAppOrChromeApp( const std::string& app_id, const ::app_restore::RestoreData::LaunchList& launch_list) { return true; } void AppLaunchHandler::LaunchApp(apps::AppType app_type, const std::string& app_id) { DCHECK(restore_data_); DCHECK_NE(app_id, app_constants::kChromeAppId); const auto it = restore_data_->app_id_to_launch_list().find(app_id); if (it == restore_data_->app_id_to_launch_list().end() || it->second.empty()) { restore_data_->RemoveApp(app_id); return; } switch (app_type) { case apps::AppType::kArc: // ArcAppLaunchHandler handles ARC apps restoration and ARC apps // restoration could be delayed, so return to preserve the restore data // for ARC apps. return; case apps::AppType::kChromeApp: case apps::AppType::kWeb: case apps::AppType::kSystemWeb: case apps::AppType::kStandaloneBrowserChromeApp: if (ShouldLaunchSystemWebAppOrChromeApp(app_id, it->second)) LaunchSystemWebAppOrChromeApp(app_type, app_id, it->second); break; case apps::AppType::kStandaloneBrowser: // For Lacros, we can't use the AppService launch interface to restore, // but call Lacros interface to restore with session restore. return; case apps::AppType::kBuiltIn: case apps::AppType::kCrostini: case apps::AppType::kPluginVm: case apps::AppType::kUnknown: case apps::AppType::kMacOs: case apps::AppType::kRemote: case apps::AppType::kBorealis: case apps::AppType::kBruschetta: case apps::AppType::kExtension: case apps::AppType::kStandaloneBrowserExtension: NOTREACHED(); break; } restore_data_->RemoveApp(app_id); } void AppLaunchHandler::LaunchSystemWebAppOrChromeApp( apps::AppType app_type, const std::string& app_id, const app_restore::RestoreData::LaunchList& launch_list) { auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile_); DCHECK(proxy); if (app_type == apps::AppType::kChromeApp || app_type == apps::AppType::kStandaloneBrowserChromeApp) { OnExtensionLaunching(app_id); } for (const auto& it : launch_list) { RecordRestoredAppLaunch(GetHistogrameAppType(app_type)); if (it.second->handler_id.has_value()) { const extensions::Extension* extension = extensions::ExtensionRegistry::Get(profile_)->GetInstalledExtension( app_id); if (extension) { DCHECK(it.second->file_paths.has_value()); apps::LaunchPlatformAppWithFileHandler(profile_, extension, it.second->handler_id.value(), it.second->file_paths.value()); } continue; } // Desk templates may have partial data. See http://crbug/1232520 if (!it.second->container.has_value() || !it.second->disposition.has_value() || !it.second->display_id.has_value()) { continue; } apps::AppLaunchParams params( app_id, static_cast<apps::LaunchContainer>(it.second->container.value()), static_cast<WindowOpenDisposition>(it.second->disposition.value()), it.second->override_url.value_or(GURL()), apps::LaunchSource::kFromFullRestore, it.second->display_id.value(), it.second->file_paths.has_value() ? it.second->file_paths.value() : std::vector<base::FilePath>{}, it.second->intent ? it.second->intent->Clone() : nullptr); params.restore_id = it.first; proxy->LaunchAppWithParams(std::move(params)); } } } // namespace ash
[ "chromium-scoped@luci-project-accounts.iam.gserviceaccount.com" ]
chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
5d9dd011ffbf60e8abe7bcdd8961e6178dfc42dc
31eae0d913d8b1af8ce0bc5fd516b0844efec1f3
/Cpp/Modules/Include/LinearTableFunctionProvider.h
d274b9f300f0717c873eca0ca5e849f637fd35f3
[]
no_license
Olov81/synth3
5424c52e8b081d9ebc1b30150f6656da81bd6a31
38b9945448b91b459a45da4b5545983ae3cd38a8
refs/heads/master
2022-12-19T15:51:00.723366
2020-08-19T20:43:17
2020-08-19T20:43:17
288,816,922
0
0
null
null
null
null
UTF-8
C++
false
false
326
h
#pragma once #include "ILinearFunctionProvider.h" class LinearTableFunctionProvider : public ILinearFunctionProvider { public: LinearTableFunctionProvider(std::vector<LinearFunction> table); LinearFunction GetFunction(const double& omega) const override; private: std::vector<LinearFunction> _table; };
[ "devnull@localhost" ]
devnull@localhost
d47ff2f0eb54b46cececd68203388d6c86c06f40
1e006c14837be0e7b6ed9a0f5870907638dfd402
/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include/boost/fusion/container/generation/list_tie.hpp
376f71d0fac341e358c6807e56a116d66d21af1c
[ "BSL-1.0" ]
permissive
slowfranklin/synology-ds
b9cd512d86ffc4d61949e6d72012b8cff8d58813
5a6dc5e1cfde5be3104f412e5a368bc8d615dfa6
refs/heads/master
2021-10-24T01:38:38.120574
2019-03-20T13:01:12
2019-03-20T13:01:12
176,933,470
1
1
null
null
null
null
UTF-8
C++
false
false
3,502
hpp
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman 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_PP_IS_ITERATING #if !defined(FUSION_LIST_TIE_07192005_0109) #define FUSION_LIST_TIE_07192005_0109 #include <boost/preprocessor/iterate.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> #include <boost/preprocessor/repetition/repeat_from_to.hpp> #include <boost/fusion/container/list/list.hpp> #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #include <boost/fusion/container/generation/detail/preprocessed/list_tie.hpp> #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list_tie" FUSION_MAX_LIST_SIZE_STR".hpp") #endif /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman 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) This is an auto-generated file. Do not edit! ==============================================================================*/ #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 1) #endif namespace boost { namespace fusion { struct void_; namespace result_of { template < BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( FUSION_MAX_LIST_SIZE, typename T, void_) , typename Extra = void_ > struct list_tie; } // $$$ shouldn't we remove_reference first to allow references? $$$ #define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& #define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/list_tie.hpp> #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() #undef BOOST_FUSION_REF }} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(output: null) #endif #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES #endif #else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// // // Preprocessor vertical repetition code // /////////////////////////////////////////////////////////////////////////////// #define N BOOST_PP_ITERATION() namespace result_of { template <BOOST_PP_ENUM_PARAMS(N, typename T)> #define TEXT(z, n, text) , text struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > #undef TEXT { typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type; }; } template <BOOST_PP_ENUM_PARAMS(N, typename T)> BOOST_FUSION_GPU_ENABLED inline list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) { return list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( BOOST_PP_ENUM_PARAMS(N, _)); } #undef N #endif // defined(BOOST_PP_IS_ITERATING)
[ "slow@samba.org" ]
slow@samba.org
c2e1887f2762c8a084f9166f4ce578f62d0c160e
9f214e4b1c0dd393ef6482d9f45752e888b7fc2c
/include/LinuxTCPClient.h
5f72605f93941b0fa4f1ec1009bb540c155c24cc
[]
no_license
guedjm/Basic_abstration
dc1991c8e12fd768c1ccd4cf73f8732da901cb4f
cd0e4643575311431f96d4041212ed7320cc7eee
refs/heads/master
2016-08-11T01:55:22.747166
2016-01-07T00:05:38
2016-01-07T00:05:38
49,168,736
0
0
null
null
null
null
UTF-8
C++
false
false
784
h
#pragma once #ifndef _WIN32 # include "ITCPClient.h" # include "myTCPSocket.h" class LinuxTCPClient : public ITCPClient { public: LinuxTCPClient(); virtual ~LinuxTCPClient(); virtual int closeSock(); virtual int getWriteFd() const; virtual bool writeAvailable() const; virtual void writeAvailable(bool); virtual void prepareData(std::string const &, int); virtual bool pendingData() const; virtual int writeData(); virtual int getReadFd() const; virtual bool readAvailable() const; virtual void readAvailable(bool); virtual int readData(std::string &); virtual int connectTo(std::string const &, short); private: bool _writeAvailable; bool _readAvailable; int _toSendLen; std::string _toSend; myTCPSocket _sock; }; #endif
[ "maxime.guedj@epitech.eu" ]
maxime.guedj@epitech.eu
eee4b829f37254710258b1df7b33f4e1bd34afd5
fbecd060030896fed648e57493fd9f68e1134a78
/src/ex12_10.cc
e11fe62689ab98f63b9cac4e2c08bc9fb3a7573a
[]
no_license
amoe/acceleratedcpp
24e6594742619e3bea66d5f748aa394bf2e967da
947c73c5b9bdf02f47fe09712f065278f337005e
refs/heads/master
2023-01-07T15:53:31.586878
2020-11-03T08:52:53
2020-11-03T08:52:53
280,228,131
0
0
null
null
null
null
UTF-8
C++
false
false
1,067
cc
#include <list> #include <iostream> #include <vector> #include "ex12_10.hh" using std::list; using std::vector; using std::cout; using std::endl; void test_copy() { Vec<int> nums; nums.push_back(8); nums.push_back(5); nums.push_back(3); nums.push_back(2); Vec<int> nums2 = nums; for (Vec<int>::const_iterator it = nums2.begin(); it != nums2.end(); it++) { cout << *it << endl; } // This should never show up in the output nums.push_back(42); for (Vec<int>::const_iterator it = nums2.begin(); it != nums2.end(); it++) { cout << *it << endl; } } int main() { cout << "Starting." << endl; vector<int> fib1 = {8, 5, 3, 2}; Vec<int> fib2(fib1.begin(), fib1.end()); for (Vec<int>::const_iterator it = fib2.begin(); it != fib2.end(); it++) { cout << *it << endl; } test_copy(); vector<char> foo = {'h', 'e', 'l', 'l', 'o'}; Str s4(foo.begin(), foo.end()); cout << "String value: '" << s4 << "'" << endl; cout << "End." << endl; return 0; }
[ "amoebae@gmail.com" ]
amoebae@gmail.com
83e0c29352716abe2e8369a1cf4e610e6d198000
47bc067058e4d45f8729670b1bfa19aceaadc156
/project_euler/10.cpp
3116275a0d9f4a6b9e904b3332a6eca6004de9b0
[]
no_license
return19/All-C-Codes
0bd0df357cd4bbc6552e1d943df792a1b4d806bb
b1c2269d2436a0cd65a5ef022595300c4827520f
refs/heads/master
2021-09-09T16:13:53.464406
2018-03-17T17:02:55
2018-03-17T17:02:55
125,650,568
0
0
null
null
null
null
UTF-8
C++
false
false
717
cpp
#include<bits/stdc++.h> using namespace std; long long s[1010000]; long long csum[1010000]; void solve() { long long i,j,k; s[0]=s[1]=1; for(i=2;i<1000100;i++) { if(s[i]==0) { k=2; for(j=i*2;j<1000100;j=i*k) { s[j]=1; k++; } } } for(i=2;i<1000100;i++) { if(s[i]==0) { csum[i]=i; } csum[i]+=csum[i-1]; } } int main() { long long test,i,j,k,t; long long n; scanf("%lld",&test); solve(); for(t=0;t<test;t++) { scanf("%lld",&n); printf("%lld\n",csum[n]); } return 0; }
[ "abhinandan1941996@gmail.com" ]
abhinandan1941996@gmail.com
2e1a6f8d454a8ae6a43db3f7f7f499022bc39784
cf58d74018ed456f6a2ec9e9d83ccd4ba41e5a47
/Hackerrank/absolutepermute.cpp
25c76f148dfb06a0218ed4739aeb16f7fbd624b2
[]
no_license
jaishreedhage/Competitive-coding
b0e2a8331e69e044f4b537102b17d3d9a923d985
df57007a011a10f46e4cceb99a3aca6bc71f1982
refs/heads/master
2021-07-14T13:05:13.674795
2017-10-20T06:19:57
2017-10-20T06:19:57
107,639,988
1
1
null
null
null
null
UTF-8
C++
false
false
1,038
cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #include <sstream> #include <iostream> #include <algorithm> #include <unordered_map> using namespace std; int main(){ int t; cin >> t; for(int a0 = 0; a0 < t; a0++){ int n; int k; cin >> n >> k; int ar[n+1]={0}; int flag=0; for(int i=1;i<=n;i++){ if(i+k>=1 || i+k<=n){ } else{ flag=1; break; } } if(flag==1) cout<<-1<<endl; else{ for(int i=1;i<=n;i++) cout<<ar[i]<<" "; cout<<endl; } } return 0; }
[ "Jaishree_Dhage@Jaishrees-MacBook-Pro.local" ]
Jaishree_Dhage@Jaishrees-MacBook-Pro.local
b5380aa233d4df481dd8161a3b664d1bff334eb6
0ceac58dc78b4f138dcd4f53f54880d654a64448
/treeworks/code/mpi/tree_compute.hpp
a705b0b3e305c6c8d0ae0d3cb148629e5972ad40
[]
no_license
mkmojo/inbox
a68e40b77e0af3f76fe34b0f792c837c287a75a8
8651374e1c4b5ded243a517b2e94b1b9a2928679
refs/heads/master
2021-05-29T05:51:08.314886
2015-10-29T18:05:14
2015-10-29T18:05:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,435
hpp
/*** * Project: TreeWorks * * File: tree_compute.hpp * Created: Mar 25, 2009 * * Author: Abhinav Sarje <abhinav.sarje@gmail.com> */ #ifndef MPI_TREE_COMPUTE_HPP #define MPI_TREE_COMPUTE_HPP #include <vector> #include <iterator> #include "mpi_data.hpp" #include "base_tree.hpp" #include "specialized_generate.hpp" #include "../jaz/sys_tools.hpp" namespace tw { namespace mpi { class TreeCompute { private: enum AlgorithmChoice { none, local_computation, no_dependency, upward_acc_rev, upward_acc_special, upward_acc_general, downward_acc_special, downward_acc_general, downward_acc_rev }; // enum AlgorithmChoice MPI_data mpi_data_; public: TreeCompute(MPI_Comm comm) { mpi_data_ = comm; } // the upward accumulation special version template<typename Tree> bool generate_interaction_set(const Tree& t, UpwardAccumulationGenerate generate, const typename Tree::tree_node &node, std::vector<std::vector<typename Tree::tree_node> >& interaction_sets, AlgorithmChoice& generate_type) { //std::cout << mpi_data_.rank() << ". This is the curious case " // << "of upward accumulation." << std::endl; typedef typename Tree::tree_node tree_node; std::vector<tree_node> temp_interaction_set; std::back_insert_iterator<std::vector<tree_node> > temp_interaction_set_iter(temp_interaction_set); generate_type = upward_acc_special; return generate(t, node, temp_interaction_set_iter); } // generate_interaction_set() // the downward accumulation special version template<typename Tree> bool generate_interaction_set(const Tree& t, DownwardAccumulationGenerate generate, const typename Tree::tree_node &node, std::vector<std::vector<typename Tree::tree_node> >& interaction_sets, AlgorithmChoice& generate_type) { //std::cout << mpi_data_.rank() << ". This is the curious case " // << "of downward accumulation." << std::endl; typedef typename Tree::tree_node tree_node; std::vector<tree_node> temp_interaction_set; std::back_insert_iterator<std::vector<tree_node> > temp_interaction_set_iter(temp_interaction_set); generate_type = downward_acc_special; return generate(t, node, temp_interaction_set_iter); } // generate_interaction_set() // the general version template<typename Tree, typename GenerateFunction> bool generate_interaction_set(const Tree& t, GenerateFunction generate, const typename Tree::tree_node &node, std::vector<std::vector<typename Tree::tree_node> >& interaction_sets, AlgorithmChoice& generate_type) { //std::cout << mpi_data_.rank() << ". This is the curious case of generality." // << std::endl; typedef typename Tree::tree_node tree_node; std::vector<tree_node> temp_interaction_set; std::back_insert_iterator<std::vector<tree_node> > temp_interaction_set_iter(temp_interaction_set); bool temp_flag = generate(t, node, temp_interaction_set_iter); interaction_sets.push_back(temp_interaction_set); generate_type = none; // test //std::cout << mpi_data_.rank() << "." << " " // << temp_interaction_set.size() << std::endl; /*std::cout << mpi_data_.rank() << ". I-set of " << node.small_cell() << ", size = " << temp_interaction_set.size() << std::endl; for(int i = 0; i < temp_interaction_set.size(); ++ i) { std::cout << " " << i << ". " << temp_interaction_set[i].is_leaf() << " " << temp_interaction_set[i].level() << " " << temp_interaction_set[i].small_cell() << " " << temp_interaction_set[i].large_cell() << " (" << temp_interaction_set[i].parent().proc_id_ << ", " << temp_interaction_set[i].parent().index_ << ") " << temp_interaction_set[i].num_children() << " " << temp_interaction_set[i].num_points() << std::endl; } // for */ return temp_flag; } // generate_interaction_set() template <typename Tree, typename GenerateFunction, typename CombineFunction> bool operator()(Tree& t, GenerateFunction generate, CombineFunction combine) { typedef Tree tree_type; typedef typename Tree::tree_node tree_node; typedef typename Tree::index_type index_type; typedef typename Tree::iterator node_iterator; if(mpi_data_.rank() == 0) std::cout << "+ performing tree compute ... "; MPI_Barrier(mpi_data_.comm()); double tree_compute_total_time_s = MPI_Wtime(); double generate_time_s = MPI_Wtime(); // there are t.size() nodes in the local tree // apply generate function to each of them // and obtain a list of tree_nodes for each std::vector<std::vector<tree_node> > interaction_sets; bool dependency_flag = false; AlgorithmChoice generate_type = none; // apply generate function on all nodes of the tree for(node_iterator iter = t.begin(); iter != t.end(); ++ iter) { //unsigned long int memory = jaz::mem_usage(); //if(mpi_data_.rank() == 0) // std::cout << mpi_data_.rank() << "." << temp << " Memory used in bytes = " // << memory << std::endl; //if(mpi_data_.rank() == 0) //std::cout << mpi_data_.rank() << ". [" << (*iter).index().proc_id_ << ", " // << (*iter).index().index_ << "], parent = (" // << (*iter).parent().proc_id_ << ", " // << (*iter).parent().index_ << ")" << std::endl; AlgorithmChoice temp_generate_type = none; bool temp_flag = generate_interaction_set(t, generate, *iter, interaction_sets, temp_generate_type); // check that flag for each call to generate returns the same thing if(iter == t.begin()) { dependency_flag = temp_flag; generate_type = temp_generate_type; } else { if(temp_flag != dependency_flag) { std::cerr << "Grave error: DEPENDENCY_FLAG of all interaction sets " << "are not the same! Aborting." << std::endl; return false; } // if if(temp_generate_type != generate_type) { std::cerr << "Grave error: Conflict in generate_type! Aborting." << std::endl; return false; } // if } // if-else } // for MPI_Barrier(mpi_data_.comm()); double generate_time_e = MPI_Wtime(); double detection_time_s = MPI_Wtime(); AlgorithmChoice combine_case = none; // identify the local computation case: each node has itself in its i-set // each node should have 1 node in its i-set and it shud be itself // (the dependency flag may be either true or false) if(generate_type == none) { int i = 0; for(node_iterator iter = t.begin(); iter != t.end(); ++ iter, ++ i) { // check if i-set sizes are == 1 if(interaction_sets[i].size() != 1) break; // check if the node in i-set is itself if(!(interaction_sets[i][0].index() == (*iter).index())) break; } // for if(i == interaction_sets.size()) generate_type = local_computation; } // if if(dependency_flag == false) { // This is simple, just use each node in the interaction // set of each local node and perform the computations. Call this case no_dep. if(generate_type == local_computation) combine_case = local_computation; else combine_case = no_dependency; } else { // if(dependency_flag == true), then using the interaction set of each local node, // find a local consensus of the levels, the special cases of children/parent only, // and conditions for uniqueness of parent, and then find a global consensus. // If there is no global consensus, notify that dependency cannot be satisfied. // Else, the following cases occur for each local node u and remote node v: // * upward_acc_rev. each node in at most 1 i-set, and level(u) > level(v) // * b. each node in at most 1 i-set, and level(u) < level(v) // * c. each node has at most 1 in i-set, and level(u) > level(v) // * downward_acc_rev. each node has at most 1 in i-set, and level(u) < level(v) // Cases upward_acc_rev and b result in upward accumulation (where in // upward_acc_rev, the tree is upside-down, and b is the original case of // upward tree accumulation when all v are u's children). // Cases c and downward_acc_rev result in downward accumulation (where in // downward_acc_rev, the tree is upside-down, and c is the original case of // downward tree accumulation). // Case b -> either one of the following: // * upward_acc_special: where each all (and only) children are in the i-set. // * upward_acc_general: the other cases. // Case c -> either one of the following: // * downward_acc_special: where only the parent is present in i-set. // * downward_acc_general: the other cases. if(generate_type == local_computation) combine_case = local_computation; else if(generate_type == upward_acc_special) combine_case = upward_acc_special; else if(generate_type == downward_acc_special) combine_case = downward_acc_special; else { // detect the cases for the special cases of upward and downward accumulations // check for special downward accumulation: if(combine_case == none) { //std::cout << "Checking for the special case of downward accumulation" // << std::endl; // for each node check if the I-set has only one node in it // and check about the levels of the nodes int i = 0; for(node_iterator iter = t.begin(); iter != t.end(); ++ iter, ++ i) { if(!(*iter).is_root()) { // check if i-set sizes are == 1 if(interaction_sets[i].size() != 1) break; // check if the node in i-set of each node is its parent if(!interaction_sets[i][0].is_parent(*iter)) break; } // if } // for if(i == interaction_sets.size()) combine_case = downward_acc_special; } // if // check for special upward accumulation: if(combine_case == none) { //std::cout << "Checking for the special case of upward accumulation" // << std::endl; // for each node check if the I-set has same # of nodes as its # of children // and check for each node if it is its child int i = 0; for(node_iterator iter = t.begin(); iter != t.end(); ++ iter, ++ i) { if(!(*iter).is_leaf()) { // check if i-set sizes are == num of children if((*iter).num_children() != interaction_sets[i].size()) break; // check if the node in i-set of each node is its parent bool break_flag = false; for(int j = 0; j < interaction_sets[i].size(); ++j) { if(!interaction_sets[i][j].is_child(*iter)) { break_flag = true; break; } // if } // for if(break_flag) break; } // if } // for if(i == interaction_sets.size()) combine_case = upward_acc_special; } // if // implement algorithm detection for other general cases // ... } // if-else } // if-else MPI_Barrier(mpi_data_.comm()); // find consensus combine_case among all procs AlgorithmChoice* consensus = new AlgorithmChoice[mpi_data_.size()]; MPI_Allgather(&combine_case, 1, MPI_INT, consensus, 1, MPI_INT, mpi_data_.comm()); for(int i = 0; i < mpi_data_.size(); ++ i) { if(consensus[i] != combine_case) { std::cerr << "Error in obtaining consensus for computations! Aborting." << std::endl; return false; } // if } // for double detection_time_e = MPI_Wtime(); // Currently only the special cases, upward_acc_special and downward_acc_special, // are implemented, were the nodes in the all i-sets are all children, or the parent, // respectively. In these cases, new dependency forest is not constructed. double compute_time_s = 0.0; double compute_time_e = 0.0; switch(combine_case) { case local_computation: // Local computation: apply the combine function to each node locally //std::cout << "Local computations case." << std::endl; compute_time_s = MPI_Wtime(); t.local_compute(combine, mpi_data_); compute_time_e = MPI_Wtime(); break; case no_dependency: // look into the paper dealing with this case and do the corresponding // implementation for special cases if needed. // All the nodes in the interaction set are already available at the // local processor, since they were required from the generate function. //std::cout << mpi_data_.rank() << ". No dependency case." << std::endl; compute_time_s = MPI_Wtime(); t.no_dependency_compute(combine, interaction_sets, mpi_data_); compute_time_e = MPI_Wtime(); break; case upward_acc_special: // The Upward Accumulation: i-set has all and only the children, for all nodes //std::cout << "Upward accumulation special case." << std::endl; compute_time_s = MPI_Wtime(); t.upward_accumulate(combine, mpi_data_); compute_time_e = MPI_Wtime(); break; case downward_acc_special: // The Downward Accumulation: i-set has only one node, and it is the // parent, for all nodes //std::cout << "Downward accumulation special case." << std::endl; compute_time_s = MPI_Wtime(); t.downward_accumulate(combine, mpi_data_); compute_time_e = MPI_Wtime(); break; case upward_acc_rev: case upward_acc_general: case downward_acc_general: case downward_acc_rev: std::cout << "Not yet implemented!" << std::endl; break; default: std::cerr << "Something went very wrong in algorithm detection." << std::endl; return false; } // switch MPI_Barrier(mpi_data_.comm()); double tree_compute_total_time_e = MPI_Wtime(); if(mpi_data_.rank() == 0) { std::cout << "done: " << (tree_compute_total_time_e - tree_compute_total_time_s) * 1000 << "ms" << " [g: " << (generate_time_e - generate_time_s) * 1000 << "ms" << ", d: " << (detection_time_e - detection_time_s) * 1000 << "ms" << ", c: " << (compute_time_e - compute_time_s) * 1000 << "ms]" << std::endl; } // if // test /*if(mpi_data_.rank() == 0) t.print_tree(); */ return true; } // operator()() }; // class TreeCompute } // namespace mpi } // namespace tw #endif // MPI_TREE_COMPUTE_HPP
[ "qiuqiyuan@gmail.com" ]
qiuqiyuan@gmail.com
fea3041791633f282280de7af474849b18b0caf6
c348efe40b4afac1de31e1cf93b800510f9d52f6
/Riverside Community College (RCC)/CIS-17A/Final/Problem3/Prob3TableInherited.cpp
0095b2352162aa5c42e94adc578caafb7971fedc
[]
no_license
acoustictime/CollegeCode
5b57dc45459c35694e3df002a587bacc4f99f81a
a8ec647fa4b5a6a90f34f1c8715dfea88cefe6c6
refs/heads/master
2020-03-28T19:22:04.384018
2018-09-16T18:37:22
2018-09-16T18:37:22
148,968,472
1
0
null
null
null
null
UTF-8
C++
false
false
371
cpp
// Prob3TableInherited.cpp: implementation of the Prob3TableInherited class. // ////////////////////////////////////////////////////////////////////// #include "Prob3TableInherited.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction //////////////////////////////////////////////////////////////////////
[ "Acoustictime@James-MacBook-Pro.local" ]
Acoustictime@James-MacBook-Pro.local
67bccfce5c0cd898027f2a4696ca5583b53658da
6d8109ce6bf17d3a15c6c4f5afa822f5457cdd72
/src/discrete_space_information/environment_navxythetalat.cpp
f0802ef14deb265466f11f8bdce723cf2482a34e
[]
no_license
shivamvats/sbpl_mha
f7678b50cebed87305749ad00aa59789e6146987
03f7201525873a9cd8ec71a29a1f362821d62506
refs/heads/master
2021-01-18T02:35:58.234264
2016-06-01T18:25:26
2016-06-01T18:25:26
60,197,949
1
0
null
null
null
null
UTF-8
C++
false
false
121,106
cpp
/* * Copyright (c) 2008, Maxim Likhachev * 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 University of Pennsylvania 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 OWNER 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. */ #include <cmath> #include <cstring> #include <ctime> #include <sbpl/discrete_space_information/environment_navxythetalat.h> #include <sbpl/utils/2Dgridsearch.h> #include <sbpl/utils/key.h> #include <sbpl/utils/mdp.h> #include <sbpl/utils/mdpconfig.h> using namespace std; #if TIME_DEBUG static clock_t time3_addallout = 0; static clock_t time_gethash = 0; static clock_t time_createhash = 0; static clock_t time_getsuccs = 0; #endif static long int checks = 0; #define XYTHETA2INDEX(X,Y,THETA) (THETA + X*EnvNAVXYTHETALATCfg.NumThetaDirs + \ Y*EnvNAVXYTHETALATCfg.EnvWidth_c*EnvNAVXYTHETALATCfg.NumThetaDirs) //-----------------constructors/destructors------------------------------- EnvironmentNAVXYTHETALATTICE::EnvironmentNAVXYTHETALATTICE() { EnvNAVXYTHETALATCfg.obsthresh = ENVNAVXYTHETALAT_DEFAULTOBSTHRESH; //the value that pretty much makes it disabled EnvNAVXYTHETALATCfg.cost_inscribed_thresh = EnvNAVXYTHETALATCfg.obsthresh; //the value that pretty much makes it disabled EnvNAVXYTHETALATCfg.cost_possibly_circumscribed_thresh = -1; grid2Dsearchfromstart = NULL; grid2Dsearchfromgoal = NULL; bNeedtoRecomputeStartHeuristics = true; bNeedtoRecomputeGoalHeuristics = true; iteration = 0; EnvNAVXYTHETALAT.bInitialized = false; EnvNAVXYTHETALATCfg.actionwidth = NAVXYTHETALAT_DEFAULT_ACTIONWIDTH; EnvNAVXYTHETALATCfg.NumThetaDirs = NAVXYTHETALAT_THETADIRS; //no memory allocated in cfg yet EnvNAVXYTHETALATCfg.Grid2D = NULL; EnvNAVXYTHETALATCfg.ActionsV = NULL; EnvNAVXYTHETALATCfg.PredActionsV = NULL; } EnvironmentNAVXYTHETALATTICE::~EnvironmentNAVXYTHETALATTICE() { SBPL_PRINTF("destroying XYTHETALATTICE\n"); if (grid2Dsearchfromstart != NULL) delete grid2Dsearchfromstart; grid2Dsearchfromstart = NULL; if (grid2Dsearchfromgoal != NULL) delete grid2Dsearchfromgoal; grid2Dsearchfromgoal = NULL; if (EnvNAVXYTHETALATCfg.Grid2D != NULL) { for (int x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) delete[] EnvNAVXYTHETALATCfg.Grid2D[x]; delete[] EnvNAVXYTHETALATCfg.Grid2D; EnvNAVXYTHETALATCfg.Grid2D = NULL; } //delete actions if (EnvNAVXYTHETALATCfg.ActionsV != NULL) { for (int tind = 0; tind < EnvNAVXYTHETALATCfg.NumThetaDirs; tind++) delete[] EnvNAVXYTHETALATCfg.ActionsV[tind]; delete[] EnvNAVXYTHETALATCfg.ActionsV; EnvNAVXYTHETALATCfg.ActionsV = NULL; } if (EnvNAVXYTHETALATCfg.PredActionsV != NULL) { delete[] EnvNAVXYTHETALATCfg.PredActionsV; EnvNAVXYTHETALATCfg.PredActionsV = NULL; } } //--------------------------------------------------------------------- //-------------------problem specific and local functions--------------------- static unsigned int inthash(unsigned int key) { key += (key << 12); key ^= (key >> 22); key += (key << 4); key ^= (key >> 9); key += (key << 10); key ^= (key >> 2); key += (key << 7); key ^= (key >> 12); return key; } void EnvironmentNAVXYTHETALATTICE::SetConfiguration(int width, int height, const unsigned char* mapdata, int startx, int starty, int starttheta, int goalx, int goaly, int goaltheta, double cellsize_m, double nominalvel_mpersecs, double timetoturn45degsinplace_secs, const vector<sbpl_2Dpt_t> & robot_perimeterV) { EnvNAVXYTHETALATCfg.EnvWidth_c = width; EnvNAVXYTHETALATCfg.EnvHeight_c = height; EnvNAVXYTHETALATCfg.StartX_c = startx; EnvNAVXYTHETALATCfg.StartY_c = starty; EnvNAVXYTHETALATCfg.StartTheta = starttheta; if (EnvNAVXYTHETALATCfg.StartX_c < 0 || EnvNAVXYTHETALATCfg.StartX_c >= EnvNAVXYTHETALATCfg.EnvWidth_c) { SBPL_ERROR("ERROR: illegal start coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.StartY_c < 0 || EnvNAVXYTHETALATCfg.StartY_c >= EnvNAVXYTHETALATCfg.EnvHeight_c) { SBPL_ERROR("ERROR: illegal start coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.StartTheta < 0 || EnvNAVXYTHETALATCfg.StartTheta >= EnvNAVXYTHETALATCfg.NumThetaDirs) { SBPL_ERROR("ERROR: illegal start coordinates for theta\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.EndX_c = goalx; EnvNAVXYTHETALATCfg.EndY_c = goaly; EnvNAVXYTHETALATCfg.EndTheta = goaltheta; if (EnvNAVXYTHETALATCfg.EndX_c < 0 || EnvNAVXYTHETALATCfg.EndX_c >= EnvNAVXYTHETALATCfg.EnvWidth_c) { SBPL_ERROR("ERROR: illegal goal coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.EndY_c < 0 || EnvNAVXYTHETALATCfg.EndY_c >= EnvNAVXYTHETALATCfg.EnvHeight_c) { SBPL_ERROR("ERROR: illegal goal coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.EndTheta < 0 || EnvNAVXYTHETALATCfg.EndTheta >= EnvNAVXYTHETALATCfg.NumThetaDirs) { SBPL_ERROR("ERROR: illegal goal coordinates for theta\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.FootprintPolygon = robot_perimeterV; EnvNAVXYTHETALATCfg.nominalvel_mpersecs = nominalvel_mpersecs; EnvNAVXYTHETALATCfg.cellsize_m = cellsize_m; EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs = timetoturn45degsinplace_secs; //allocate the 2D environment EnvNAVXYTHETALATCfg.Grid2D = new unsigned char*[EnvNAVXYTHETALATCfg.EnvWidth_c]; for (int x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) { EnvNAVXYTHETALATCfg.Grid2D[x] = new unsigned char[EnvNAVXYTHETALATCfg.EnvHeight_c]; } //environment: if (0 == mapdata) { for (int y = 0; y < EnvNAVXYTHETALATCfg.EnvHeight_c; y++) { for (int x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) { EnvNAVXYTHETALATCfg.Grid2D[x][y] = 0; } } } else { for (int y = 0; y < EnvNAVXYTHETALATCfg.EnvHeight_c; y++) { for (int x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) { EnvNAVXYTHETALATCfg.Grid2D[x][y] = mapdata[x + y * width]; } } } } void EnvironmentNAVXYTHETALATTICE::ReadConfiguration(FILE* fCfg) { //read in the configuration of environment and initialize EnvNAVXYTHETALATCfg structure char sTemp[1024], sTemp1[1024]; int dTemp; int x, y; //discretization(cells) if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early (discretization)\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "discretization(cells):"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format (discretization)\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early (discretization)\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.EnvWidth_c = atoi(sTemp); if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early (discretization)\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.EnvHeight_c = atoi(sTemp); // Scan for optional NumThetaDirs parameter. Check for following obsthresh. if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "NumThetaDirs:"); if (strcmp(sTemp1, sTemp) != 0) { // optional NumThetaDirs not available; default is NAVXYTHETALAT_THETADIRS (16) strcpy(sTemp1, "obsthresh:"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); throw new SBPL_Exception(); } else { EnvNAVXYTHETALATCfg.NumThetaDirs = NAVXYTHETALAT_THETADIRS; } } else { if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early (NumThetaDirs)\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.NumThetaDirs = atoi(sTemp); //obsthresh: if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early (obsthresh)\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "obsthresh:"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); SBPL_PRINTF("see existing examples of env files for the right format of heading\n"); throw new SBPL_Exception(); } } // obsthresh if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.obsthresh = atoi(sTemp); SBPL_PRINTF("obsthresh = %d\n", EnvNAVXYTHETALATCfg.obsthresh); //cost_inscribed_thresh: if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "cost_inscribed_thresh:"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); SBPL_PRINTF("see existing examples of env files for the right format of heading\n"); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.cost_inscribed_thresh = atoi(sTemp); SBPL_PRINTF("cost_inscribed_thresh = %d\n", EnvNAVXYTHETALATCfg.cost_inscribed_thresh); //cost_possibly_circumscribed_thresh: if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "cost_possibly_circumscribed_thresh:"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); SBPL_PRINTF("see existing examples of env files for the right format of heading\n"); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.cost_possibly_circumscribed_thresh = atoi(sTemp); SBPL_PRINTF("cost_possibly_circumscribed_thresh = %d\n", EnvNAVXYTHETALATCfg.cost_possibly_circumscribed_thresh); //cellsize if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "cellsize(meters):"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.cellsize_m = atof(sTemp); //speeds if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "nominalvel(mpersecs):"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.nominalvel_mpersecs = atof(sTemp); if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } strcpy(sTemp1, "timetoturn45degsinplace(secs):"); if (strcmp(sTemp1, sTemp) != 0) { SBPL_ERROR("ERROR: configuration file has incorrect format\n"); SBPL_PRINTF("Expected %s got %s\n", sTemp1, sTemp); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs = atof(sTemp); //start(meters,rads): if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.StartX_c = CONTXY2DISC(atof(sTemp), EnvNAVXYTHETALATCfg.cellsize_m); if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.StartY_c = CONTXY2DISC(atof(sTemp), EnvNAVXYTHETALATCfg.cellsize_m); if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.StartTheta = ContTheta2Disc(atof(sTemp), EnvNAVXYTHETALATCfg.NumThetaDirs); if (EnvNAVXYTHETALATCfg.StartX_c < 0 || EnvNAVXYTHETALATCfg.StartX_c >= EnvNAVXYTHETALATCfg.EnvWidth_c) { SBPL_ERROR("ERROR: illegal start coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.StartY_c < 0 || EnvNAVXYTHETALATCfg.StartY_c >= EnvNAVXYTHETALATCfg.EnvHeight_c) { SBPL_ERROR("ERROR: illegal start coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.StartTheta < 0 || EnvNAVXYTHETALATCfg.StartTheta >= EnvNAVXYTHETALATCfg.NumThetaDirs) { SBPL_ERROR("ERROR: illegal start coordinates for theta\n"); throw new SBPL_Exception(); } //end(meters,rads): if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.EndX_c = CONTXY2DISC(atof(sTemp), EnvNAVXYTHETALATCfg.cellsize_m); if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.EndY_c = CONTXY2DISC(atof(sTemp), EnvNAVXYTHETALATCfg.cellsize_m); if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.EndTheta = ContTheta2Disc(atof(sTemp), EnvNAVXYTHETALATCfg.NumThetaDirs); ; if (EnvNAVXYTHETALATCfg.EndX_c < 0 || EnvNAVXYTHETALATCfg.EndX_c >= EnvNAVXYTHETALATCfg.EnvWidth_c) { SBPL_ERROR("ERROR: illegal end coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.EndY_c < 0 || EnvNAVXYTHETALATCfg.EndY_c >= EnvNAVXYTHETALATCfg.EnvHeight_c) { SBPL_ERROR("ERROR: illegal end coordinates\n"); throw new SBPL_Exception(); } if (EnvNAVXYTHETALATCfg.EndTheta < 0 || EnvNAVXYTHETALATCfg.EndTheta >= EnvNAVXYTHETALATCfg.NumThetaDirs) { SBPL_ERROR("ERROR: illegal goal coordinates for theta\n"); throw new SBPL_Exception(); } //allocate the 2D environment EnvNAVXYTHETALATCfg.Grid2D = new unsigned char*[EnvNAVXYTHETALATCfg.EnvWidth_c]; for (x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) { EnvNAVXYTHETALATCfg.Grid2D[x] = new unsigned char[EnvNAVXYTHETALATCfg.EnvHeight_c]; } //environment: if (fscanf(fCfg, "%s", sTemp) != 1) { SBPL_ERROR("ERROR: ran out of env file early\n"); throw new SBPL_Exception(); } for (y = 0; y < EnvNAVXYTHETALATCfg.EnvHeight_c; y++) for (x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) { if (fscanf(fCfg, "%d", &dTemp) != 1) { SBPL_ERROR("ERROR: incorrect format of config file\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.Grid2D[x][y] = dTemp; } } bool EnvironmentNAVXYTHETALATTICE::ReadinCell(sbpl_xy_theta_cell_t* cell, FILE* fIn) { char sTemp[60]; if (fscanf(fIn, "%s", sTemp) == 0) return false; cell->x = atoi(sTemp); if (fscanf(fIn, "%s", sTemp) == 0) return false; cell->y = atoi(sTemp); if (fscanf(fIn, "%s", sTemp) == 0) return false; cell->theta = atoi(sTemp); //normalize the angle cell->theta = NORMALIZEDISCTHETA(cell->theta, EnvNAVXYTHETALATCfg.NumThetaDirs); return true; } bool EnvironmentNAVXYTHETALATTICE::ReadinPose(sbpl_xy_theta_pt_t* pose, FILE* fIn) { char sTemp[60]; if (fscanf(fIn, "%s", sTemp) == 0) return false; pose->x = atof(sTemp); if (fscanf(fIn, "%s", sTemp) == 0) return false; pose->y = atof(sTemp); if (fscanf(fIn, "%s", sTemp) == 0) return false; pose->theta = atof(sTemp); pose->theta = normalizeAngle(pose->theta); return true; } bool EnvironmentNAVXYTHETALATTICE::ReadinMotionPrimitive(SBPL_xytheta_mprimitive* pMotPrim, FILE* fIn) { char sTemp[1024]; int dTemp; char sExpected[1024]; int numofIntermPoses; //read in actionID strcpy(sExpected, "primID:"); if (fscanf(fIn, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fIn, "%d", &pMotPrim->motprimID) != 1) return false; //read in start angle strcpy(sExpected, "startangle_c:"); if (fscanf(fIn, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fIn, "%d", &dTemp) == 0) { SBPL_ERROR("ERROR reading startangle\n"); return false; } pMotPrim->starttheta_c = dTemp; //read in end pose strcpy(sExpected, "endpose_c:"); if (fscanf(fIn, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (ReadinCell(&pMotPrim->endcell, fIn) == false) { SBPL_ERROR("ERROR: failed to read in endsearchpose\n"); return false; } //read in action cost strcpy(sExpected, "additionalactioncostmult:"); if (fscanf(fIn, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fIn, "%d", &dTemp) != 1) return false; pMotPrim->additionalactioncostmult = dTemp; //read in intermediate poses strcpy(sExpected, "intermediateposes:"); if (fscanf(fIn, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fIn, "%d", &numofIntermPoses) != 1) return false; //all intermposes should be with respect to 0,0 as starting pose since it will be added later and should be done //after the action is rotated by initial orientation for (int i = 0; i < numofIntermPoses; i++) { sbpl_xy_theta_pt_t intermpose; if (ReadinPose(&intermpose, fIn) == false) { SBPL_ERROR("ERROR: failed to read in intermediate poses\n"); return false; } pMotPrim->intermptV.push_back(intermpose); } //check that the last pose corresponds correctly to the last pose sbpl_xy_theta_pt_t sourcepose; sourcepose.x = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.y = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.theta = DiscTheta2Cont(pMotPrim->starttheta_c, EnvNAVXYTHETALATCfg.NumThetaDirs); double mp_endx_m = sourcepose.x + pMotPrim->intermptV[pMotPrim->intermptV.size() - 1].x; double mp_endy_m = sourcepose.y + pMotPrim->intermptV[pMotPrim->intermptV.size() - 1].y; double mp_endtheta_rad = pMotPrim->intermptV[pMotPrim->intermptV.size() - 1].theta; int endx_c = CONTXY2DISC(mp_endx_m, EnvNAVXYTHETALATCfg.cellsize_m); int endy_c = CONTXY2DISC(mp_endy_m, EnvNAVXYTHETALATCfg.cellsize_m); int endtheta_c = ContTheta2Disc(mp_endtheta_rad, EnvNAVXYTHETALATCfg.NumThetaDirs); if (endx_c != pMotPrim->endcell.x || endy_c != pMotPrim->endcell.y || endtheta_c != pMotPrim->endcell.theta) { SBPL_ERROR( "ERROR: incorrect primitive %d with startangle=%d " "last interm point %f %f %f does not match end pose %d %d %d\n", pMotPrim->motprimID, pMotPrim->starttheta_c, pMotPrim->intermptV[pMotPrim->intermptV.size() - 1].x, pMotPrim->intermptV[pMotPrim->intermptV.size() - 1].y, pMotPrim->intermptV[pMotPrim->intermptV.size() - 1].theta, pMotPrim->endcell.x, pMotPrim->endcell.y, pMotPrim->endcell.theta); return false; } return true; } bool EnvironmentNAVXYTHETALATTICE::ReadMotionPrimitives(FILE* fMotPrims) { char sTemp[1024], sExpected[1024]; float fTemp; int dTemp; int totalNumofActions = 0; SBPL_PRINTF("Reading in motion primitives..."); //read in the resolution strcpy(sExpected, "resolution_m:"); if (fscanf(fMotPrims, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fMotPrims, "%f", &fTemp) == 0) return false; if (fabs(fTemp - EnvNAVXYTHETALATCfg.cellsize_m) > ERR_EPS) { SBPL_ERROR("ERROR: invalid resolution %f (instead of %f) in the dynamics file\n", fTemp, EnvNAVXYTHETALATCfg.cellsize_m); return false; } //read in the angular resolution strcpy(sExpected, "numberofangles:"); if (fscanf(fMotPrims, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fMotPrims, "%d", &dTemp) == 0) return false; if (dTemp != EnvNAVXYTHETALATCfg.NumThetaDirs) { SBPL_ERROR("ERROR: invalid angular resolution %d angles (instead of %d angles) in the motion primitives file\n", dTemp, EnvNAVXYTHETALATCfg.NumThetaDirs); return false; } //read in the total number of actions strcpy(sExpected, "totalnumberofprimitives:"); if (fscanf(fMotPrims, "%s", sTemp) == 0) return false; if (strcmp(sTemp, sExpected) != 0) { SBPL_ERROR("ERROR: expected %s but got %s\n", sExpected, sTemp); return false; } if (fscanf(fMotPrims, "%d", &totalNumofActions) == 0) { return false; } for (int i = 0; i < totalNumofActions; i++) { SBPL_xytheta_mprimitive motprim; if (EnvironmentNAVXYTHETALATTICE::ReadinMotionPrimitive(&motprim, fMotPrims) == false) return false; EnvNAVXYTHETALATCfg.mprimV.push_back(motprim); } SBPL_PRINTF("done "); return true; } void EnvironmentNAVXYTHETALATTICE::ComputeReplanningDataforAction(EnvNAVXYTHETALATAction_t* action) { int j; //iterate over all the cells involved in the action sbpl_xy_theta_cell_t startcell3d, endcell3d; for (int i = 0; i < (int)action->intersectingcellsV.size(); i++) { //compute the translated affected search Pose - what state has an //outgoing action whose intersecting cell is at 0,0 startcell3d.theta = action->starttheta; startcell3d.x = -action->intersectingcellsV.at(i).x; startcell3d.y = -action->intersectingcellsV.at(i).y; //compute the translated affected search Pose - what state has an //incoming action whose intersecting cell is at 0,0 endcell3d.theta = NORMALIZEDISCTHETA(action->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); endcell3d.x = startcell3d.x + action->dX; endcell3d.y = startcell3d.y + action->dY; //store the cells if not already there for (j = 0; j < (int)affectedsuccstatesV.size(); j++) { if (affectedsuccstatesV.at(j) == endcell3d) break; } if (j == (int)affectedsuccstatesV.size()) affectedsuccstatesV.push_back(endcell3d); for (j = 0; j < (int)affectedpredstatesV.size(); j++) { if (affectedpredstatesV.at(j) == startcell3d) break; } if (j == (int)affectedpredstatesV.size()) affectedpredstatesV.push_back(startcell3d); }//over intersecting cells //add the centers since with h2d we are using these in cost computations //---intersecting cell = origin //compute the translated affected search Pose - what state has an outgoing action whose intersecting cell is at 0,0 startcell3d.theta = action->starttheta; startcell3d.x = -0; startcell3d.y = -0; //compute the translated affected search Pose - what state has an incoming action whose intersecting cell is at 0,0 endcell3d.theta = NORMALIZEDISCTHETA(action->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); endcell3d.x = startcell3d.x + action->dX; endcell3d.y = startcell3d.y + action->dY; //store the cells if not already there for (j = 0; j < (int)affectedsuccstatesV.size(); j++) { if (affectedsuccstatesV.at(j) == endcell3d) break; } if (j == (int)affectedsuccstatesV.size()) affectedsuccstatesV.push_back(endcell3d); for (j = 0; j < (int)affectedpredstatesV.size(); j++) { if (affectedpredstatesV.at(j) == startcell3d) break; } if (j == (int)affectedpredstatesV.size()) affectedpredstatesV.push_back(startcell3d); //---intersecting cell = outcome state //compute the translated affected search Pose - what state has an outgoing action whose intersecting cell is at 0,0 startcell3d.theta = action->starttheta; startcell3d.x = -action->dX; startcell3d.y = -action->dY; //compute the translated affected search Pose - what state has an incoming action whose intersecting cell is at 0,0 endcell3d.theta = NORMALIZEDISCTHETA(action->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); endcell3d.x = startcell3d.x + action->dX; endcell3d.y = startcell3d.y + action->dY; for (j = 0; j < (int)affectedsuccstatesV.size(); j++) { if (affectedsuccstatesV.at(j) == endcell3d) break; } if (j == (int)affectedsuccstatesV.size()) affectedsuccstatesV.push_back(endcell3d); for (j = 0; j < (int)affectedpredstatesV.size(); j++) { if (affectedpredstatesV.at(j) == startcell3d) break; } if (j == (int)affectedpredstatesV.size()) affectedpredstatesV.push_back(startcell3d); } //computes all the 3D states whose outgoing actions are potentially affected //when cell (0,0) changes its status it also does the same for the 3D states //whose incoming actions are potentially affected when cell (0,0) changes its //status void EnvironmentNAVXYTHETALATTICE::ComputeReplanningData() { //iterate over all actions //orientations for (int tind = 0; tind < EnvNAVXYTHETALATCfg.NumThetaDirs; tind++) { //actions for (int aind = 0; aind < EnvNAVXYTHETALATCfg.actionwidth; aind++) { //compute replanning data for this action ComputeReplanningDataforAction(&EnvNAVXYTHETALATCfg.ActionsV[tind][aind]); } } } //here motionprimitivevector contains actions only for 0 angle void EnvironmentNAVXYTHETALATTICE::PrecomputeActionswithBaseMotionPrimitive( vector<SBPL_xytheta_mprimitive>* motionprimitiveV) { SBPL_PRINTF("Pre-computing action data using base motion primitives...\n"); EnvNAVXYTHETALATCfg.ActionsV = new EnvNAVXYTHETALATAction_t*[EnvNAVXYTHETALATCfg.NumThetaDirs]; EnvNAVXYTHETALATCfg.PredActionsV = new vector<EnvNAVXYTHETALATAction_t*> [EnvNAVXYTHETALATCfg.NumThetaDirs]; vector<sbpl_2Dcell_t> footprint; //iterate over source angles for (int tind = 0; tind < EnvNAVXYTHETALATCfg.NumThetaDirs; tind++) { SBPL_PRINTF("pre-computing for angle %d out of %d angles\n", tind, EnvNAVXYTHETALATCfg.NumThetaDirs); EnvNAVXYTHETALATCfg.ActionsV[tind] = new EnvNAVXYTHETALATAction_t[motionprimitiveV->size()]; //compute sourcepose sbpl_xy_theta_pt_t sourcepose; sourcepose.x = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.y = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.theta = DiscTheta2Cont(tind, EnvNAVXYTHETALATCfg.NumThetaDirs); //iterate over motion primitives for (size_t aind = 0; aind < motionprimitiveV->size(); aind++) { EnvNAVXYTHETALATCfg.ActionsV[tind][aind].aind = aind; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].starttheta = tind; double mp_endx_m = motionprimitiveV->at(aind).intermptV[motionprimitiveV->at(aind).intermptV.size() - 1].x; double mp_endy_m = motionprimitiveV->at(aind).intermptV[motionprimitiveV->at(aind).intermptV.size() - 1].y; double mp_endtheta_rad = motionprimitiveV->at(aind).intermptV[motionprimitiveV->at(aind).intermptV.size() - 1].theta; double endx = sourcepose.x + (mp_endx_m * cos(sourcepose.theta) - mp_endy_m * sin(sourcepose.theta)); double endy = sourcepose.y + (mp_endx_m * sin(sourcepose.theta) + mp_endy_m * cos(sourcepose.theta)); int endx_c = CONTXY2DISC(endx, EnvNAVXYTHETALATCfg.cellsize_m); int endy_c = CONTXY2DISC(endy, EnvNAVXYTHETALATCfg.cellsize_m); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta = ContTheta2Disc(mp_endtheta_rad + sourcepose.theta, EnvNAVXYTHETALATCfg.NumThetaDirs); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX = endx_c; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY = endy_c; if (EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY != 0 || EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX != 0) EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost = (int)(ceil(NAVXYTHETALAT_COSTMULT_MTOMM * EnvNAVXYTHETALATCfg.cellsize_m / EnvNAVXYTHETALATCfg.nominalvel_mpersecs * sqrt((double)(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX * EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX + EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY * EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY)))); else //cost of turn in place EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost = (int)(NAVXYTHETALAT_COSTMULT_MTOMM * EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs * fabs(computeMinUnsignedAngleDiff(mp_endtheta_rad, 0)) / (PI_CONST / 4.0)); //compute and store interm points as well as intersecting cells EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].interm3DcellsV.clear(); sbpl_xy_theta_cell_t previnterm3Dcell; previnterm3Dcell.theta = previnterm3Dcell.x = previnterm3Dcell.y = 0; for (int pind = 0; pind < (int)motionprimitiveV->at(aind).intermptV.size(); pind++) { sbpl_xy_theta_pt_t intermpt = motionprimitiveV->at(aind).intermptV[pind]; //rotate it appropriately double rotx = intermpt.x * cos(sourcepose.theta) - intermpt.y * sin(sourcepose.theta); double roty = intermpt.x * sin(sourcepose.theta) + intermpt.y * cos(sourcepose.theta); intermpt.x = rotx; intermpt.y = roty; intermpt.theta = normalizeAngle(sourcepose.theta + intermpt.theta); //store it (they are with reference to 0,0,stattheta (not //sourcepose.x,sourcepose.y,starttheta (that is, half-bin)) EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.push_back(intermpt); } //now compute the intersecting cells for this motion (including ignoring the source footprint) get_2d_motion_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV, EnvNAVXYTHETALATCfg.cellsize_m); #if DEBUG SBPL_FPRINTF(fDeb, "action tind=%d aind=%d: dX=%d dY=%d endtheta=%d (%.2f degs -> %.2f degs) " "cost=%d (mprim: %.2f %.2f %.2f)\n", tind, (int)aind, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, sourcepose.theta * 180.0 / PI_CONST, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.size() - 1].theta * 180.0 / PI_CONST, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost, mp_endx_m, mp_endy_m, mp_endtheta_rad); #endif //add to the list of backward actions int targettheta = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta; if (targettheta < 0) targettheta = targettheta + EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.PredActionsV[targettheta].push_back(&(EnvNAVXYTHETALATCfg.ActionsV[tind][aind])); } } //set number of actions EnvNAVXYTHETALATCfg.actionwidth = motionprimitiveV->size(); //now compute replanning data ComputeReplanningData(); SBPL_PRINTF("done pre-computing action data based on motion primitives\n"); } //here motionprimitivevector contains actions for all angles void EnvironmentNAVXYTHETALATTICE::PrecomputeActionswithCompleteMotionPrimitive( vector<SBPL_xytheta_mprimitive>* motionprimitiveV) { SBPL_PRINTF("Pre-computing action data using motion primitives for every angle...\n"); EnvNAVXYTHETALATCfg.ActionsV = new EnvNAVXYTHETALATAction_t*[EnvNAVXYTHETALATCfg.NumThetaDirs]; EnvNAVXYTHETALATCfg.PredActionsV = new vector<EnvNAVXYTHETALATAction_t*> [EnvNAVXYTHETALATCfg.NumThetaDirs]; vector<sbpl_2Dcell_t> footprint; if (motionprimitiveV->size() % EnvNAVXYTHETALATCfg.NumThetaDirs != 0) { SBPL_ERROR("ERROR: motionprimitives should be uniform across actions\n"); throw new SBPL_Exception(); } EnvNAVXYTHETALATCfg.actionwidth = ((int)motionprimitiveV->size()) / EnvNAVXYTHETALATCfg.NumThetaDirs; //iterate over source angles int maxnumofactions = 0; for (int tind = 0; tind < EnvNAVXYTHETALATCfg.NumThetaDirs; tind++) { SBPL_PRINTF("pre-computing for angle %d out of %d angles\n", tind, EnvNAVXYTHETALATCfg.NumThetaDirs); EnvNAVXYTHETALATCfg.ActionsV[tind] = new EnvNAVXYTHETALATAction_t[EnvNAVXYTHETALATCfg.actionwidth]; //compute sourcepose sbpl_xy_theta_pt_t sourcepose; sourcepose.x = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.y = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.theta = DiscTheta2Cont(tind, EnvNAVXYTHETALATCfg.NumThetaDirs); //iterate over motion primitives int numofactions = 0; int aind = -1; for (int mind = 0; mind < (int)motionprimitiveV->size(); mind++) { //find a motion primitive for this angle if (motionprimitiveV->at(mind).starttheta_c != tind) continue; aind++; numofactions++; //action index EnvNAVXYTHETALATCfg.ActionsV[tind][aind].aind = aind; //start angle EnvNAVXYTHETALATCfg.ActionsV[tind][aind].starttheta = tind; //compute dislocation EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta = motionprimitiveV->at(mind).endcell.theta; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX = motionprimitiveV->at(mind).endcell.x; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY = motionprimitiveV->at(mind).endcell.y; //compute and store interm points as well as intersecting cells EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].interm3DcellsV.clear(); sbpl_xy_theta_cell_t previnterm3Dcell; previnterm3Dcell.x = 0; previnterm3Dcell.y = 0; // Compute all the intersected cells for this action (intermptV and interm3DcellsV) for (int pind = 0; pind < (int)motionprimitiveV->at(mind).intermptV.size(); pind++) { sbpl_xy_theta_pt_t intermpt = motionprimitiveV->at(mind).intermptV[pind]; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.push_back(intermpt); // also compute the intermediate discrete cells if not there already sbpl_xy_theta_pt_t pose; pose.x = intermpt.x + sourcepose.x; pose.y = intermpt.y + sourcepose.y; pose.theta = intermpt.theta; sbpl_xy_theta_cell_t intermediate2dCell; intermediate2dCell.x = CONTXY2DISC(pose.x, EnvNAVXYTHETALATCfg.cellsize_m); intermediate2dCell.y = CONTXY2DISC(pose.y, EnvNAVXYTHETALATCfg.cellsize_m); // add unique cells to the list if (EnvNAVXYTHETALATCfg.ActionsV[tind][aind].interm3DcellsV.size() == 0 || intermediate2dCell.x != previnterm3Dcell.x || intermediate2dCell.y != previnterm3Dcell.y) { EnvNAVXYTHETALATCfg.ActionsV[tind][aind].interm3DcellsV.push_back(intermediate2dCell); } previnterm3Dcell = intermediate2dCell; } //compute linear and angular time double linear_distance = 0; for (unsigned int i = 1; i < EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.size(); i++) { double x0 = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[i - 1].x; double y0 = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[i - 1].y; double x1 = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[i].x; double y1 = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[i].y; double dx = x1 - x0; double dy = y1 - y0; linear_distance += sqrt(dx * dx + dy * dy); } double linear_time = linear_distance / EnvNAVXYTHETALATCfg.nominalvel_mpersecs; double angular_distance = fabs(computeMinUnsignedAngleDiff(DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs), DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].starttheta, EnvNAVXYTHETALATCfg.NumThetaDirs))); double angular_time = angular_distance / ((PI_CONST / 4.0) / EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs); //make the cost the max of the two times EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost = (int)(ceil(NAVXYTHETALAT_COSTMULT_MTOMM * max(linear_time, angular_time))); //use any additional cost multiplier EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost *= motionprimitiveV->at(mind).additionalactioncostmult; //now compute the intersecting cells for this motion (including ignoring the source footprint) get_2d_motion_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, motionprimitiveV->at(mind).intermptV, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV, EnvNAVXYTHETALATCfg.cellsize_m); #if DEBUG SBPL_FPRINTF(fDeb, "action tind=%2d aind=%2d: dX=%3d dY=%3d endtheta=%3d (%6.2f degs -> %6.2f degs) " "cost=%4d (mprimID %3d: %3d %3d %3d) numofintermcells = %d numofintercells=%d\n", tind, aind, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[0].theta * 180 / PI_CONST, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV[EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.size() - 1].theta * 180 / PI_CONST, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost, motionprimitiveV->at(mind).motprimID, motionprimitiveV->at(mind).endcell.x, motionprimitiveV->at(mind).endcell.y, motionprimitiveV->at(mind).endcell.theta, (int)EnvNAVXYTHETALATCfg.ActionsV[tind][aind].interm3DcellsV.size(), (int)EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV.size()); #endif //add to the list of backward actions int targettheta = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta; if (targettheta < 0) targettheta = targettheta + EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.PredActionsV[targettheta].push_back(&(EnvNAVXYTHETALATCfg.ActionsV[tind][aind])); } if (maxnumofactions < numofactions) maxnumofactions = numofactions; } //at this point we don't allow nonuniform number of actions if (motionprimitiveV->size() != (size_t)(EnvNAVXYTHETALATCfg.NumThetaDirs * maxnumofactions)) { SBPL_ERROR("ERROR: nonuniform number of actions is not supported " "(maxnumofactions=%d while motprims=%d thetas=%d\n", maxnumofactions, (unsigned int)motionprimitiveV->size(), EnvNAVXYTHETALATCfg.NumThetaDirs); throw new SBPL_Exception(); } //now compute replanning data ComputeReplanningData(); SBPL_PRINTF("done pre-computing action data based on motion primitives\n"); } void EnvironmentNAVXYTHETALATTICE::DeprecatedPrecomputeActions() { SBPL_PRINTF("Use of DeprecatedPrecomputeActions() is deprecated and probably doesn't work!\n"); //construct list of actions SBPL_PRINTF("Pre-computing action data using the motion primitives for a 3D kinematic planning...\n"); EnvNAVXYTHETALATCfg.ActionsV = new EnvNAVXYTHETALATAction_t*[EnvNAVXYTHETALATCfg.NumThetaDirs]; EnvNAVXYTHETALATCfg.PredActionsV = new vector<EnvNAVXYTHETALATAction_t*> [EnvNAVXYTHETALATCfg.NumThetaDirs]; vector<sbpl_2Dcell_t> footprint; //iterate over source angles for (int tind = 0; tind < EnvNAVXYTHETALATCfg.NumThetaDirs; tind++) { SBPL_PRINTF("processing angle %d\n", tind); EnvNAVXYTHETALATCfg.ActionsV[tind] = new EnvNAVXYTHETALATAction_t[EnvNAVXYTHETALATCfg.actionwidth]; //compute sourcepose sbpl_xy_theta_pt_t sourcepose; sourcepose.x = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.y = DISCXY2CONT(0, EnvNAVXYTHETALATCfg.cellsize_m); sourcepose.theta = DiscTheta2Cont(tind, EnvNAVXYTHETALATCfg.NumThetaDirs); //the construction assumes that the robot first turns and then goes along this new theta int aind = 0; for (; aind < 3; aind++) { EnvNAVXYTHETALATCfg.ActionsV[tind][aind].aind = aind; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].starttheta = tind; //-1,0,1 EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta = (tind + aind - 1) % EnvNAVXYTHETALATCfg.NumThetaDirs; double angle = DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX = (int)(cos(angle) + 0.5 * (cos(angle) > 0 ? 1 : -1)); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY = (int)(sin(angle) + 0.5 * (sin(angle) > 0 ? 1 : -1)); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost = (int)(ceil(NAVXYTHETALAT_COSTMULT_MTOMM * EnvNAVXYTHETALATCfg.cellsize_m / EnvNAVXYTHETALATCfg.nominalvel_mpersecs * sqrt((double)(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX * EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX + EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY * EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY)))); //compute intersecting cells sbpl_xy_theta_pt_t pose; pose.x = DISCXY2CONT(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.cellsize_m); pose.y = DISCXY2CONT(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.cellsize_m); pose.theta = angle; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV.clear(); get_2d_footprint_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV, pose, EnvNAVXYTHETALATCfg.cellsize_m); RemoveSourceFootprint(sourcepose, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV); #if DEBUG SBPL_PRINTF("action tind=%d aind=%d: endtheta=%d (%f) dX=%d dY=%d cost=%d\n", tind, aind, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, angle, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost); #endif //add to the list of backward actions int targettheta = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta; if (targettheta < 0) targettheta = targettheta + EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.PredActionsV[targettheta].push_back(&(EnvNAVXYTHETALATCfg.ActionsV[tind][aind])); } //decrease and increase angle without movement aind = 3; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].aind = aind; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].starttheta = tind; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta = tind - 1; if (EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta < 0) EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta += EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX = 0; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY = 0; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost = (int)(NAVXYTHETALAT_COSTMULT_MTOMM * EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs); //compute intersecting cells sbpl_xy_theta_pt_t pose; pose.x = DISCXY2CONT(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.cellsize_m); pose.y = DISCXY2CONT(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.cellsize_m); pose.theta = DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV.clear(); get_2d_footprint_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV, pose, EnvNAVXYTHETALATCfg.cellsize_m); RemoveSourceFootprint(sourcepose, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV); #if DEBUG SBPL_PRINTF("action tind=%d aind=%d: endtheta=%d (%f) dX=%d dY=%d cost=%d\n", tind, aind, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs), EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost); #endif //add to the list of backward actions int targettheta = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta; if (targettheta < 0) targettheta = targettheta + EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.PredActionsV[targettheta].push_back(&(EnvNAVXYTHETALATCfg.ActionsV[tind][aind])); aind = 4; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].aind = aind; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].starttheta = tind; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta = (tind + 1) % EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX = 0; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY = 0; EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost = (int)(NAVXYTHETALAT_COSTMULT_MTOMM * EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs); //compute intersecting cells pose.x = DISCXY2CONT(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.cellsize_m); pose.y = DISCXY2CONT(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.cellsize_m); pose.theta = DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intermptV.clear(); EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV.clear(); get_2d_footprint_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV, pose, EnvNAVXYTHETALATCfg.cellsize_m); RemoveSourceFootprint(sourcepose, &EnvNAVXYTHETALATCfg.ActionsV[tind][aind].intersectingcellsV); #if DEBUG SBPL_PRINTF("action tind=%d aind=%d: endtheta=%d (%f) dX=%d dY=%d cost=%d\n", tind, aind, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, DiscTheta2Cont(EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs), EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dX, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].dY, EnvNAVXYTHETALATCfg.ActionsV[tind][aind].cost); #endif //add to the list of backward actions targettheta = EnvNAVXYTHETALATCfg.ActionsV[tind][aind].endtheta; if (targettheta < 0) targettheta = targettheta + EnvNAVXYTHETALATCfg.NumThetaDirs; EnvNAVXYTHETALATCfg.PredActionsV[targettheta].push_back(&(EnvNAVXYTHETALATCfg.ActionsV[tind][aind])); } //now compute replanning data ComputeReplanningData(); SBPL_PRINTF("done pre-computing action data\n"); } void EnvironmentNAVXYTHETALATTICE::InitializeEnvConfig(vector<SBPL_xytheta_mprimitive>* motionprimitiveV) { //aditional to configuration file initialization of EnvNAVXYTHETALATCfg if necessary //dXY dirs EnvNAVXYTHETALATCfg.dXY[0][0] = -1; EnvNAVXYTHETALATCfg.dXY[0][1] = -1; EnvNAVXYTHETALATCfg.dXY[1][0] = -1; EnvNAVXYTHETALATCfg.dXY[1][1] = 0; EnvNAVXYTHETALATCfg.dXY[2][0] = -1; EnvNAVXYTHETALATCfg.dXY[2][1] = 1; EnvNAVXYTHETALATCfg.dXY[3][0] = 0; EnvNAVXYTHETALATCfg.dXY[3][1] = -1; EnvNAVXYTHETALATCfg.dXY[4][0] = 0; EnvNAVXYTHETALATCfg.dXY[4][1] = 1; EnvNAVXYTHETALATCfg.dXY[5][0] = 1; EnvNAVXYTHETALATCfg.dXY[5][1] = -1; EnvNAVXYTHETALATCfg.dXY[6][0] = 1; EnvNAVXYTHETALATCfg.dXY[6][1] = 0; EnvNAVXYTHETALATCfg.dXY[7][0] = 1; EnvNAVXYTHETALATCfg.dXY[7][1] = 1; sbpl_xy_theta_pt_t temppose; temppose.x = 0.0; temppose.y = 0.0; temppose.theta = 0.0; vector<sbpl_2Dcell_t> footprint; get_2d_footprint_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, &footprint, temppose, EnvNAVXYTHETALATCfg.cellsize_m); SBPL_PRINTF("number of cells in footprint of the robot = %d\n", (unsigned int)footprint.size()); for (vector<sbpl_2Dcell_t>::iterator it = footprint.begin(); it != footprint.end(); ++it) { SBPL_PRINTF("Footprint cell at (%d, %d)\n", it->x, it->y); } #if DEBUG SBPL_FPRINTF(fDeb, "footprint cells (size=%d):\n", (int)footprint.size()); for(int i = 0; i < (int) footprint.size(); i++) { SBPL_FPRINTF(fDeb, "%d %d (cont: %.3f %.3f)\n", footprint.at(i).x, footprint.at(i).y, DISCXY2CONT(footprint.at(i).x, EnvNAVXYTHETALATCfg.cellsize_m), DISCXY2CONT(footprint.at(i).y, EnvNAVXYTHETALATCfg.cellsize_m)); } #endif if (motionprimitiveV == NULL) DeprecatedPrecomputeActions(); else PrecomputeActionswithCompleteMotionPrimitive(motionprimitiveV); } bool EnvironmentNAVXYTHETALATTICE::IsValidCell(int X, int Y) { return (X >= 0 && X < EnvNAVXYTHETALATCfg.EnvWidth_c && Y >= 0 && Y < EnvNAVXYTHETALATCfg.EnvHeight_c && EnvNAVXYTHETALATCfg.Grid2D[X][Y] < EnvNAVXYTHETALATCfg.obsthresh); } bool EnvironmentNAVXYTHETALATTICE::IsWithinMapCell(int X, int Y) { return (X >= 0 && X < EnvNAVXYTHETALATCfg.EnvWidth_c && Y >= 0 && Y < EnvNAVXYTHETALATCfg.EnvHeight_c); } bool EnvironmentNAVXYTHETALATTICE::IsValidConfiguration(int X, int Y, int Theta) { vector<sbpl_2Dcell_t> footprint; sbpl_xy_theta_pt_t pose; //compute continuous pose pose.x = DISCXY2CONT(X, EnvNAVXYTHETALATCfg.cellsize_m); pose.y = DISCXY2CONT(Y, EnvNAVXYTHETALATCfg.cellsize_m); pose.theta = DiscTheta2Cont(Theta, EnvNAVXYTHETALATCfg.NumThetaDirs); //compute footprint cells get_2d_footprint_cells(EnvNAVXYTHETALATCfg.FootprintPolygon, &footprint, pose, EnvNAVXYTHETALATCfg.cellsize_m); //iterate over all footprint cells for (int find = 0; find < (int)footprint.size(); find++) { int x = footprint.at(find).x; int y = footprint.at(find).y; if (x < 0 || x >= EnvNAVXYTHETALATCfg.EnvWidth_c || y < 0 || y >= EnvNAVXYTHETALATCfg.EnvHeight_c || EnvNAVXYTHETALATCfg.Grid2D[x][y] >= EnvNAVXYTHETALATCfg.obsthresh) { return false; } } return true; } int EnvironmentNAVXYTHETALATTICE::GetActionCost(int SourceX, int SourceY, int SourceTheta, EnvNAVXYTHETALATAction_t* action) { sbpl_2Dcell_t cell; sbpl_xy_theta_cell_t interm3Dcell; int i; //TODO - go over bounding box (minpt and maxpt) to test validity and skip //testing boundaries below, also order intersect cells so that the four //farthest pts go first if (!IsValidCell(SourceX, SourceY)) return INFINITECOST; if (!IsValidCell(SourceX + action->dX, SourceY + action->dY)) return INFINITECOST; if (EnvNAVXYTHETALATCfg.Grid2D[SourceX + action->dX][SourceY + action->dY] >= EnvNAVXYTHETALATCfg.cost_inscribed_thresh) { return INFINITECOST; } //need to iterate over discretized center cells and compute cost based on them unsigned char maxcellcost = 0; for (i = 0; i < (int)action->interm3DcellsV.size(); i++) { interm3Dcell = action->interm3DcellsV.at(i); interm3Dcell.x = interm3Dcell.x + SourceX; interm3Dcell.y = interm3Dcell.y + SourceY; if (interm3Dcell.x < 0 || interm3Dcell.x >= EnvNAVXYTHETALATCfg.EnvWidth_c || interm3Dcell.y < 0 || interm3Dcell.y >= EnvNAVXYTHETALATCfg.EnvHeight_c) return INFINITECOST; maxcellcost = __max(maxcellcost, EnvNAVXYTHETALATCfg.Grid2D[interm3Dcell.x][interm3Dcell.y]); //check that the robot is NOT in the cell at which there is no valid orientation if (maxcellcost >= EnvNAVXYTHETALATCfg.cost_inscribed_thresh) return INFINITECOST; } //check collisions that for the particular footprint orientation along the action if (EnvNAVXYTHETALATCfg.FootprintPolygon.size() > 1 && (int)maxcellcost >= EnvNAVXYTHETALATCfg.cost_possibly_circumscribed_thresh) { checks++; for (i = 0; i < (int)action->intersectingcellsV.size(); i++) { //get the cell in the map cell = action->intersectingcellsV.at(i); cell.x = cell.x + SourceX; cell.y = cell.y + SourceY; //check validity if (!IsValidCell(cell.x, cell.y)) return INFINITECOST; //if(EnvNAVXYTHETALATCfg.Grid2D[cell.x][cell.y] > currentmaxcost) ////cost computation changed: cost = max(cost of centers of the //robot along action) // currentmaxcost = EnvNAVXYTHETALATCfg.Grid2D[cell.x][cell.y]; // //intersecting cells are only used for collision checking } } //to ensure consistency of h2D: maxcellcost = __max(maxcellcost, EnvNAVXYTHETALATCfg.Grid2D[SourceX][SourceY]); int currentmaxcost = (int)__max(maxcellcost, EnvNAVXYTHETALATCfg.Grid2D[SourceX + action->dX][SourceY + action->dY]); return action->cost * (currentmaxcost + 1); //use cell cost as multiplicative factor } double EnvironmentNAVXYTHETALATTICE::EuclideanDistance_m(int X1, int Y1, int X2, int Y2) { int sqdist = ((X1 - X2) * (X1 - X2) + (Y1 - Y2) * (Y1 - Y2)); return EnvNAVXYTHETALATCfg.cellsize_m * sqrt((double)sqdist); } //calculates a set of cells that correspond to the specified footprint //adds points to it (does not clear it beforehand) void EnvironmentNAVXYTHETALATTICE::CalculateFootprintForPose(sbpl_xy_theta_pt_t pose, vector<sbpl_2Dcell_t>* footprint, const vector<sbpl_2Dpt_t>& FootprintPolygon) { int pind; #if DEBUG // SBPL_PRINTF("---Calculating Footprint for Pose: %f %f %f---\n", // pose.x, pose.y, pose.theta); #endif //handle special case where footprint is just a point if (FootprintPolygon.size() <= 1) { sbpl_2Dcell_t cell; cell.x = CONTXY2DISC(pose.x, EnvNAVXYTHETALATCfg.cellsize_m); cell.y = CONTXY2DISC(pose.y, EnvNAVXYTHETALATCfg.cellsize_m); for (pind = 0; pind < (int)footprint->size(); pind++) { if (cell.x == footprint->at(pind).x && cell.y == footprint->at(pind).y) break; } if (pind == (int)footprint->size()) footprint->push_back(cell); return; } vector<sbpl_2Dpt_t> bounding_polygon; unsigned int find; double max_x = -INFINITECOST, min_x = INFINITECOST, max_y = -INFINITECOST, min_y = INFINITECOST; sbpl_2Dpt_t pt(0, 0); for (find = 0; find < FootprintPolygon.size(); find++) { //rotate and translate the corner of the robot pt = FootprintPolygon[find]; //rotate and translate the point sbpl_2Dpt_t corner; corner.x = cos(pose.theta) * pt.x - sin(pose.theta) * pt.y + pose.x; corner.y = sin(pose.theta) * pt.x + cos(pose.theta) * pt.y + pose.y; bounding_polygon.push_back(corner); #if DEBUG // SBPL_PRINTF("Pt: %f %f, Corner: %f %f\n", pt.x, pt.y, corner.x, corner.y); #endif if (corner.x < min_x || find == 0) { min_x = corner.x; } if (corner.x > max_x || find == 0) { max_x = corner.x; } if (corner.y < min_y || find == 0) { min_y = corner.y; } if (corner.y > max_y || find == 0) { max_y = corner.y; } } #if DEBUG // SBPL_PRINTF("Footprint bounding box: %f %f %f %f\n", min_x, max_x, min_y, max_y); #endif //initialize previous values to something that will fail the if condition during the first iteration in the for loop int prev_discrete_x = CONTXY2DISC(pt.x, EnvNAVXYTHETALATCfg.cellsize_m) + 1; int prev_discrete_y = CONTXY2DISC(pt.y, EnvNAVXYTHETALATCfg.cellsize_m) + 1; int prev_inside = 0; int discrete_x; int discrete_y; for (double x = min_x; x <= max_x; x += EnvNAVXYTHETALATCfg.cellsize_m / 3) { for (double y = min_y; y <= max_y; y += EnvNAVXYTHETALATCfg.cellsize_m / 3) { pt.x = x; pt.y = y; discrete_x = CONTXY2DISC(pt.x, EnvNAVXYTHETALATCfg.cellsize_m); discrete_y = CONTXY2DISC(pt.y, EnvNAVXYTHETALATCfg.cellsize_m); //see if we just tested this point if (discrete_x != prev_discrete_x || discrete_y != prev_discrete_y || prev_inside == 0) { #if DEBUG // SBPL_PRINTF("Testing point: %f %f Discrete: %d %d\n", pt.x, pt.y, discrete_x, discrete_y); #endif if (IsInsideFootprint(pt, &bounding_polygon)) { //convert to a grid point #if DEBUG // SBPL_PRINTF("Pt Inside %f %f\n", pt.x, pt.y); #endif sbpl_2Dcell_t cell; cell.x = discrete_x; cell.y = discrete_y; //insert point if not there already int pind = 0; for (pind = 0; pind < (int)footprint->size(); pind++) { if (cell.x == footprint->at(pind).x && cell.y == footprint->at(pind).y) break; } if (pind == (int)footprint->size()) footprint->push_back(cell); prev_inside = 1; #if DEBUG // SBPL_PRINTF("Added pt to footprint: %f %f\n", pt.x, pt.y); #endif } else { prev_inside = 0; } } else { #if DEBUG //SBPL_PRINTF("Skipping pt: %f %f\n", pt.x, pt.y); #endif } prev_discrete_x = discrete_x; prev_discrete_y = discrete_y; }//over x_min...x_max } } //calculates a set of cells that correspond to the footprint of the base //adds points to it (does not clear it beforehand) void EnvironmentNAVXYTHETALATTICE::CalculateFootprintForPose(sbpl_xy_theta_pt_t pose, vector<sbpl_2Dcell_t>* footprint) { CalculateFootprintForPose(pose, footprint, EnvNAVXYTHETALATCfg.FootprintPolygon); } //removes a set of cells that correspond to the specified footprint at the sourcepose //adds points to it (does not clear it beforehand) void EnvironmentNAVXYTHETALATTICE::RemoveSourceFootprint(sbpl_xy_theta_pt_t sourcepose, vector<sbpl_2Dcell_t>* footprint, const vector<sbpl_2Dpt_t>& FootprintPolygon) { vector<sbpl_2Dcell_t> sourcefootprint; //compute source footprint get_2d_footprint_cells(FootprintPolygon, &sourcefootprint, sourcepose, EnvNAVXYTHETALATCfg.cellsize_m); //now remove the source cells from the footprint for (int sind = 0; sind < (int)sourcefootprint.size(); sind++) { for (int find = 0; find < (int)footprint->size(); find++) { if (sourcefootprint.at(sind).x == footprint->at(find).x && sourcefootprint.at(sind).y == footprint->at(find).y) { footprint->erase(footprint->begin() + find); break; } }//over footprint }//over source } //removes a set of cells that correspond to the footprint of the base at the sourcepose //adds points to it (does not clear it beforehand) void EnvironmentNAVXYTHETALATTICE::RemoveSourceFootprint(sbpl_xy_theta_pt_t sourcepose, vector<sbpl_2Dcell_t>* footprint) { RemoveSourceFootprint(sourcepose, footprint, EnvNAVXYTHETALATCfg.FootprintPolygon); } //------------------------------------------------------------------------------ //------------------------------Heuristic computation-------------------------- void EnvironmentNAVXYTHETALATTICE::EnsureHeuristicsUpdated(bool bGoalHeuristics) { if (bNeedtoRecomputeStartHeuristics && !bGoalHeuristics) { grid2Dsearchfromstart->search(EnvNAVXYTHETALATCfg.Grid2D, EnvNAVXYTHETALATCfg.cost_inscribed_thresh, EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.StartY_c, EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.EndY_c, SBPL_2DGRIDSEARCH_TERM_CONDITION_TWOTIMESOPTPATH); bNeedtoRecomputeStartHeuristics = false; SBPL_PRINTF("2dsolcost_infullunits=%d\n", (int)(grid2Dsearchfromstart->getlowerboundoncostfromstart_inmm(EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.EndY_c) / EnvNAVXYTHETALATCfg.nominalvel_mpersecs)); } if (bNeedtoRecomputeGoalHeuristics && bGoalHeuristics) { grid2Dsearchfromgoal->search(EnvNAVXYTHETALATCfg.Grid2D, EnvNAVXYTHETALATCfg.cost_inscribed_thresh, EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.EndY_c, EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.StartY_c, SBPL_2DGRIDSEARCH_TERM_CONDITION_TWOTIMESOPTPATH); bNeedtoRecomputeGoalHeuristics = false; SBPL_PRINTF("2dsolcost_infullunits=%d\n", (int)(grid2Dsearchfromgoal->getlowerboundoncostfromstart_inmm(EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.StartY_c) / EnvNAVXYTHETALATCfg.nominalvel_mpersecs)); } } void EnvironmentNAVXYTHETALATTICE::ComputeHeuristicValues() { //whatever necessary pre-computation of heuristic values is done here SBPL_PRINTF("Precomputing heuristics...\n"); //allocated 2D grid searches grid2Dsearchfromstart = new SBPL2DGridSearch(EnvNAVXYTHETALATCfg.EnvWidth_c, EnvNAVXYTHETALATCfg.EnvHeight_c, (float)EnvNAVXYTHETALATCfg.cellsize_m); grid2Dsearchfromgoal = new SBPL2DGridSearch(EnvNAVXYTHETALATCfg.EnvWidth_c, EnvNAVXYTHETALATCfg.EnvHeight_c, (float)EnvNAVXYTHETALATCfg.cellsize_m); //set OPEN type to sliding buckets grid2Dsearchfromstart->setOPENdatastructure(SBPL_2DGRIDSEARCH_OPENTYPE_SLIDINGBUCKETS); grid2Dsearchfromgoal->setOPENdatastructure(SBPL_2DGRIDSEARCH_OPENTYPE_SLIDINGBUCKETS); SBPL_PRINTF("done\n"); } //------------debugging functions--------------------------------------------- bool EnvironmentNAVXYTHETALATTICE::CheckQuant(FILE* fOut) { for (double theta = -10; theta < 10; theta += 2.0 * PI_CONST / EnvNAVXYTHETALATCfg.NumThetaDirs * 0.01) { int nTheta = ContTheta2Disc(theta, EnvNAVXYTHETALATCfg.NumThetaDirs); double newTheta = DiscTheta2Cont(nTheta, EnvNAVXYTHETALATCfg.NumThetaDirs); int nnewTheta = ContTheta2Disc(newTheta, EnvNAVXYTHETALATCfg.NumThetaDirs); SBPL_FPRINTF(fOut, "theta=%f(%f)->%d->%f->%d\n", theta, theta * 180 / PI_CONST, nTheta, newTheta, nnewTheta); if (nTheta != nnewTheta) { SBPL_ERROR("ERROR: invalid quantization\n"); return false; } } return true; } //----------------------------------------------------------------------------- //-----------interface with outside functions----------------------------------- bool EnvironmentNAVXYTHETALATTICE::InitializeEnv(const char* sEnvFile, const vector<sbpl_2Dpt_t>& perimeterptsV, const char* sMotPrimFile) { EnvNAVXYTHETALATCfg.FootprintPolygon = perimeterptsV; FILE* fCfg = fopen(sEnvFile, "r"); if (fCfg == NULL) { SBPL_ERROR("ERROR: unable to open %s\n", sEnvFile); throw new SBPL_Exception(); } ReadConfiguration(fCfg); fclose(fCfg); if (sMotPrimFile != NULL) { FILE* fMotPrim = fopen(sMotPrimFile, "r"); if (fMotPrim == NULL) { SBPL_ERROR("ERROR: unable to open %s\n", sMotPrimFile); throw new SBPL_Exception(); } if (ReadMotionPrimitives(fMotPrim) == false) { SBPL_ERROR("ERROR: failed to read in motion primitive file\n"); throw new SBPL_Exception(); } InitGeneral(&EnvNAVXYTHETALATCfg.mprimV); fclose(fMotPrim); } else InitGeneral( NULL); SBPL_PRINTF("size of env: %d by %d\n", EnvNAVXYTHETALATCfg.EnvWidth_c, EnvNAVXYTHETALATCfg.EnvHeight_c); return true; } bool EnvironmentNAVXYTHETALATTICE::InitializeEnv(const char* sEnvFile) { FILE* fCfg = fopen(sEnvFile, "r"); if (fCfg == NULL) { SBPL_ERROR("ERROR: unable to open %s\n", sEnvFile); throw new SBPL_Exception(); } ReadConfiguration(fCfg); fclose(fCfg); InitGeneral( NULL); return true; } bool EnvironmentNAVXYTHETALATTICE::InitializeEnv(int width, int height, const vector<sbpl_2Dpt_t> & perimeterptsV, double cellsize_m, double nominalvel_mpersecs, double timetoturn45degsinplace_secs, unsigned char obsthresh, const char* sMotPrimFile, EnvNAVXYTHETALAT_InitParms params) { EnvNAVXYTHETALATCfg.NumThetaDirs = params.numThetas; return InitializeEnv(width, height, params.mapdata, params.startx, params.starty, params.starttheta, params.goalx, params.goaly, params.goaltheta, params.goaltol_x, params.goaltol_y, params.goaltol_theta, perimeterptsV, cellsize_m, nominalvel_mpersecs, timetoturn45degsinplace_secs, obsthresh, sMotPrimFile); } bool EnvironmentNAVXYTHETALATTICE::InitializeEnv(int width, int height, const unsigned char* mapdata, double startx, double starty, double starttheta, double goalx, double goaly, double goaltheta, double goaltol_x, double goaltol_y, double goaltol_theta, const vector<sbpl_2Dpt_t> & perimeterptsV, double cellsize_m, double nominalvel_mpersecs, double timetoturn45degsinplace_secs, unsigned char obsthresh, const char* sMotPrimFile) { SBPL_PRINTF("env: initialize with width=%d height=%d start=%.3f %.3f %.3f " "goalx=%.3f %.3f %.3f cellsize=%.3f nomvel=%.3f timetoturn=%.3f, obsthresh=%d\n", width, height, startx, starty, starttheta, goalx, goaly, goaltheta, cellsize_m, nominalvel_mpersecs, timetoturn45degsinplace_secs, obsthresh); SBPL_PRINTF("NOTE: goaltol parameters currently unused\n"); SBPL_PRINTF("perimeter has size=%d\n", (unsigned int)perimeterptsV.size()); for (int i = 0; i < (int)perimeterptsV.size(); i++) { SBPL_PRINTF("perimeter(%d) = %.4f %.4f\n", i, perimeterptsV.at(i).x, perimeterptsV.at(i).y); } EnvNAVXYTHETALATCfg.obsthresh = obsthresh; //TODO - need to set the tolerance as well SetConfiguration(width, height, mapdata, CONTXY2DISC(startx, cellsize_m), CONTXY2DISC(starty, cellsize_m), ContTheta2Disc(starttheta, EnvNAVXYTHETALATCfg.NumThetaDirs), CONTXY2DISC(goalx, cellsize_m), CONTXY2DISC(goaly, cellsize_m), ContTheta2Disc(goaltheta, EnvNAVXYTHETALATCfg.NumThetaDirs), cellsize_m, nominalvel_mpersecs, timetoturn45degsinplace_secs, perimeterptsV); if (sMotPrimFile != NULL) { FILE* fMotPrim = fopen(sMotPrimFile, "r"); if (fMotPrim == NULL) { SBPL_ERROR("ERROR: unable to open %s\n", sMotPrimFile); throw new SBPL_Exception(); } if (ReadMotionPrimitives(fMotPrim) == false) { SBPL_ERROR("ERROR: failed to read in motion primitive file\n"); throw new SBPL_Exception(); } fclose(fMotPrim); } if (EnvNAVXYTHETALATCfg.mprimV.size() != 0) { InitGeneral(&EnvNAVXYTHETALATCfg.mprimV); } else InitGeneral( NULL); return true; } bool EnvironmentNAVXYTHETALATTICE::InitGeneral(vector<SBPL_xytheta_mprimitive>* motionprimitiveV) { //Initialize other parameters of the environment InitializeEnvConfig(motionprimitiveV); //initialize Environment InitializeEnvironment(); //pre-compute heuristics ComputeHeuristicValues(); return true; } bool EnvironmentNAVXYTHETALATTICE::InitializeMDPCfg(MDPConfig *MDPCfg) { //initialize MDPCfg with the start and goal ids MDPCfg->goalstateid = EnvNAVXYTHETALAT.goalstateid; MDPCfg->startstateid = EnvNAVXYTHETALAT.startstateid; return true; } void EnvironmentNAVXYTHETALATTICE::PrintHeuristicValues() { #ifndef ROS const char* heur = "heur.txt"; #endif FILE* fHeur = SBPL_FOPEN(heur, "w"); if (fHeur == NULL) { SBPL_ERROR("ERROR: could not open debug file to write heuristic\n"); throw new SBPL_Exception(); } SBPL2DGridSearch* grid2Dsearch = NULL; for (int i = 0; i < 2; i++) { if (i == 0 && grid2Dsearchfromstart != NULL) { grid2Dsearch = grid2Dsearchfromstart; SBPL_FPRINTF(fHeur, "start heuristics:\n"); } else if (i == 1 && grid2Dsearchfromgoal != NULL) { grid2Dsearch = grid2Dsearchfromgoal; SBPL_FPRINTF(fHeur, "goal heuristics:\n"); } else continue; for (int y = 0; y < EnvNAVXYTHETALATCfg.EnvHeight_c; y++) { for (int x = 0; x < EnvNAVXYTHETALATCfg.EnvWidth_c; x++) { if (grid2Dsearch->getlowerboundoncostfromstart_inmm(x, y) < INFINITECOST) SBPL_FPRINTF(fHeur, "%5d ", grid2Dsearch->getlowerboundoncostfromstart_inmm(x, y)); else SBPL_FPRINTF(fHeur, "XXXXX "); } SBPL_FPRINTF(fHeur, "\n"); } } SBPL_FCLOSE(fHeur); } void EnvironmentNAVXYTHETALATTICE::SetAllPreds(CMDPSTATE* state) { //implement this if the planner needs access to predecessors SBPL_ERROR("ERROR in EnvNAVXYTHETALAT... function: SetAllPreds is undefined\n"); throw new SBPL_Exception(); } void EnvironmentNAVXYTHETALATTICE::GetSuccs(int SourceStateID, vector<int>* SuccIDV, vector<int>* CostV) { GetSuccs(SourceStateID, SuccIDV, CostV, NULL); } void EnvironmentNAVXYTHETALATTICE::GetLazySuccs(int SourceStateID, std::vector<int>* SuccIDV, std::vector<int>* CostV, std::vector<bool>* isTrueCost){ GetLazySuccs(SourceStateID, SuccIDV, CostV, isTrueCost, NULL); } void EnvironmentNAVXYTHETALATTICE::GetSuccsWithUniqueIds(int SourceStateID, std::vector<int>* SuccIDV, std::vector<int>* CostV){ GetSuccsWithUniqueIds(SourceStateID, SuccIDV, CostV, NULL); } void EnvironmentNAVXYTHETALATTICE::GetLazySuccsWithUniqueIds(int SourceStateID, std::vector<int>* SuccIDV, std::vector<int>* CostV, std::vector<bool>* isTrueCost){ GetLazySuccsWithUniqueIds(SourceStateID, SuccIDV, CostV, isTrueCost, NULL); } const EnvNAVXYTHETALATConfig_t* EnvironmentNAVXYTHETALATTICE::GetEnvNavConfig() { return &EnvNAVXYTHETALATCfg; } bool EnvironmentNAVXYTHETALATTICE::UpdateCost(int x, int y, unsigned char newcost) { #if DEBUG //SBPL_FPRINTF(fDeb, "Cost updated for cell %d %d from old cost=%d to new cost=%d\n", x,y,EnvNAVXYTHETALATCfg.Grid2D[x][y], newcost); #endif EnvNAVXYTHETALATCfg.Grid2D[x][y] = newcost; bNeedtoRecomputeStartHeuristics = true; bNeedtoRecomputeGoalHeuristics = true; return true; } bool EnvironmentNAVXYTHETALATTICE::SetMap(const unsigned char* mapdata) { int xind = -1, yind = -1; for (xind = 0; xind < EnvNAVXYTHETALATCfg.EnvWidth_c; xind++) { for (yind = 0; yind < EnvNAVXYTHETALATCfg.EnvHeight_c; yind++) { EnvNAVXYTHETALATCfg.Grid2D[xind][yind] = mapdata[xind + yind * EnvNAVXYTHETALATCfg.EnvWidth_c]; } } bNeedtoRecomputeStartHeuristics = true; bNeedtoRecomputeGoalHeuristics = true; return true; } void EnvironmentNAVXYTHETALATTICE::PrintEnv_Config(FILE* fOut) { //implement this if the planner needs to print out EnvNAVXYTHETALAT. configuration SBPL_ERROR("ERROR in EnvNAVXYTHETALAT... function: PrintEnv_Config is undefined\n"); throw new SBPL_Exception(); } void EnvironmentNAVXYTHETALATTICE::PrintTimeStat(FILE* fOut) { #if TIME_DEBUG SBPL_FPRINTF(fOut, "time3_addallout = %f secs, time_gethash = %f secs, time_createhash = %f secs, " "time_getsuccs = %f\n", time3_addallout/(double)CLOCKS_PER_SEC, time_gethash/(double)CLOCKS_PER_SEC, time_createhash/(double)CLOCKS_PER_SEC, time_getsuccs/(double)CLOCKS_PER_SEC); #endif } bool EnvironmentNAVXYTHETALATTICE::IsObstacle(int x, int y) { #if DEBUG SBPL_FPRINTF(fDeb, "Status of cell %d %d is queried. Its cost=%d\n", x,y,EnvNAVXYTHETALATCfg.Grid2D[x][y]); #endif return (EnvNAVXYTHETALATCfg.Grid2D[x][y] >= EnvNAVXYTHETALATCfg.obsthresh); } void EnvironmentNAVXYTHETALATTICE::GetEnvParms(int *size_x, int *size_y, int* num_thetas, double* startx, double* starty, double*starttheta, double* goalx, double* goaly, double* goaltheta, double* cellsize_m, double* nominalvel_mpersecs, double* timetoturn45degsinplace_secs, unsigned char* obsthresh, vector< SBPL_xytheta_mprimitive>* mprimitiveV) { *num_thetas = EnvNAVXYTHETALATCfg.NumThetaDirs; GetEnvParms(size_x, size_y, startx, starty, starttheta, goalx, goaly, goaltheta, cellsize_m, nominalvel_mpersecs, timetoturn45degsinplace_secs, obsthresh, mprimitiveV); } void EnvironmentNAVXYTHETALATTICE::GetEnvParms(int *size_x, int *size_y, double* startx, double* starty, double*starttheta, double* goalx, double* goaly, double* goaltheta, double* cellsize_m, double* nominalvel_mpersecs, double* timetoturn45degsinplace_secs, unsigned char* obsthresh, vector<SBPL_xytheta_mprimitive>* mprimitiveV) { *size_x = EnvNAVXYTHETALATCfg.EnvWidth_c; *size_y = EnvNAVXYTHETALATCfg.EnvHeight_c; *startx = DISCXY2CONT(EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.cellsize_m); *starty = DISCXY2CONT(EnvNAVXYTHETALATCfg.StartY_c, EnvNAVXYTHETALATCfg.cellsize_m); *starttheta = DiscTheta2Cont(EnvNAVXYTHETALATCfg.StartTheta, EnvNAVXYTHETALATCfg.NumThetaDirs); *goalx = DISCXY2CONT(EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.cellsize_m); *goaly = DISCXY2CONT(EnvNAVXYTHETALATCfg.EndY_c, EnvNAVXYTHETALATCfg.cellsize_m); *goaltheta = DiscTheta2Cont(EnvNAVXYTHETALATCfg.EndTheta, EnvNAVXYTHETALATCfg.NumThetaDirs); *cellsize_m = EnvNAVXYTHETALATCfg.cellsize_m; *nominalvel_mpersecs = EnvNAVXYTHETALATCfg.nominalvel_mpersecs; *timetoturn45degsinplace_secs = EnvNAVXYTHETALATCfg.timetoturn45degsinplace_secs; *obsthresh = EnvNAVXYTHETALATCfg.obsthresh; *mprimitiveV = EnvNAVXYTHETALATCfg.mprimV; } bool EnvironmentNAVXYTHETALATTICE::PoseContToDisc(double px, double py, double pth, int &ix, int &iy, int &ith) const { ix = CONTXY2DISC(px, EnvNAVXYTHETALATCfg.cellsize_m); iy = CONTXY2DISC(py, EnvNAVXYTHETALATCfg.cellsize_m); ith = ContTheta2Disc(pth, EnvNAVXYTHETALATCfg.NumThetaDirs); // ContTheta2Disc() normalizes the angle return (pth >= -2 * PI_CONST) && (pth <= 2 * PI_CONST) && (ix >= 0) && (ix < EnvNAVXYTHETALATCfg.EnvWidth_c) && (iy >= 0) && (iy < EnvNAVXYTHETALATCfg.EnvHeight_c); } bool EnvironmentNAVXYTHETALATTICE::PoseDiscToCont(int ix, int iy, int ith, double &px, double &py, double &pth) const { px = DISCXY2CONT(ix, EnvNAVXYTHETALATCfg.cellsize_m); py = DISCXY2CONT(iy, EnvNAVXYTHETALATCfg.cellsize_m); pth = normalizeAngle(DiscTheta2Cont(ith, EnvNAVXYTHETALATCfg.NumThetaDirs)); return (ith >= 0) && (ith < EnvNAVXYTHETALATCfg.NumThetaDirs) && (ix >= 0) && (ix < EnvNAVXYTHETALATCfg.EnvWidth_c) && (iy >= 0) && (iy < EnvNAVXYTHETALATCfg.EnvHeight_c); } unsigned char EnvironmentNAVXYTHETALATTICE::GetMapCost(int x, int y) { return EnvNAVXYTHETALATCfg.Grid2D[x][y]; } bool EnvironmentNAVXYTHETALATTICE::SetEnvParameter(const char* parameter, int value) { if (EnvNAVXYTHETALAT.bInitialized == true) { SBPL_ERROR("ERROR: all parameters must be set before initialization of the environment\n"); return false; } SBPL_PRINTF("setting parameter %s to %d\n", parameter, value); if (strcmp(parameter, "cost_inscribed_thresh") == 0) { if (value < 0 || value > 255) { SBPL_ERROR("ERROR: invalid value %d for parameter %s\n", value, parameter); return false; } EnvNAVXYTHETALATCfg.cost_inscribed_thresh = (unsigned char)value; } else if (strcmp(parameter, "cost_possibly_circumscribed_thresh") == 0) { if (value < 0 || value > 255) { SBPL_ERROR("ERROR: invalid value %d for parameter %s\n", value, parameter); return false; } EnvNAVXYTHETALATCfg.cost_possibly_circumscribed_thresh = value; } else if (strcmp(parameter, "cost_obsthresh") == 0) { if (value < 0 || value > 255) { SBPL_ERROR("ERROR: invalid value %d for parameter %s\n", value, parameter); return false; } EnvNAVXYTHETALATCfg.obsthresh = (unsigned char)value; } else { SBPL_ERROR("ERROR: invalid parameter %s\n", parameter); return false; } return true; } int EnvironmentNAVXYTHETALATTICE::GetEnvParameter(const char* parameter) { if (strcmp(parameter, "cost_inscribed_thresh") == 0) { return (int)EnvNAVXYTHETALATCfg.cost_inscribed_thresh; } else if (strcmp(parameter, "cost_possibly_circumscribed_thresh") == 0) { return (int)EnvNAVXYTHETALATCfg.cost_possibly_circumscribed_thresh; } else if (strcmp(parameter, "cost_obsthresh") == 0) { return (int)EnvNAVXYTHETALATCfg.obsthresh; } else { SBPL_ERROR("ERROR: invalid parameter %s\n", parameter); throw new SBPL_Exception(); } } //------------------------------------------------------------------------------ //-----------------XYTHETA Enivornment (child) class--------------------------- EnvironmentNAVXYTHETALAT::~EnvironmentNAVXYTHETALAT() { SBPL_PRINTF("destroying XYTHETALAT\n"); //delete the states themselves first for (int i = 0; i < (int)StateID2CoordTable.size(); i++) { delete StateID2CoordTable.at(i); StateID2CoordTable.at(i) = NULL; } StateID2CoordTable.clear(); //delete hashtable if (Coord2StateIDHashTable != NULL) { delete[] Coord2StateIDHashTable; Coord2StateIDHashTable = NULL; } if (Coord2StateIDHashTable_lookup != NULL) { delete[] Coord2StateIDHashTable_lookup; Coord2StateIDHashTable_lookup = NULL; } } void EnvironmentNAVXYTHETALAT::GetCoordFromState(int stateID, int& x, int& y, int& theta) const { EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[stateID]; x = HashEntry->X; y = HashEntry->Y; theta = HashEntry->Theta; } int EnvironmentNAVXYTHETALAT::GetStateFromCoord(int x, int y, int theta) { EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(x, y, theta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(x, y, theta); } return OutHashEntry->stateID; } void EnvironmentNAVXYTHETALAT::ConvertStateIDPathintoXYThetaPath(vector<int>* stateIDPath, vector<sbpl_xy_theta_pt_t>* xythetaPath) { vector<EnvNAVXYTHETALATAction_t*> actionV; vector<int> CostV; vector<int> SuccIDV; int targetx_c, targety_c, targettheta_c; int sourcex_c, sourcey_c, sourcetheta_c; SBPL_PRINTF("checks=%ld\n", checks); xythetaPath->clear(); #if DEBUG SBPL_FPRINTF(fDeb, "converting stateid path into coordinates:\n"); #endif for (int pind = 0; pind < (int)(stateIDPath->size()) - 1; pind++) { int sourceID = stateIDPath->at(pind); int targetID = stateIDPath->at(pind + 1); #if DEBUG GetCoordFromState(sourceID, sourcex_c, sourcey_c, sourcetheta_c); #endif //get successors and pick the target via the cheapest action SuccIDV.clear(); CostV.clear(); actionV.clear(); GetSuccs(sourceID, &SuccIDV, &CostV, &actionV); int bestcost = INFINITECOST; int bestsind = -1; #if DEBUG GetCoordFromState(sourceID, sourcex_c, sourcey_c, sourcetheta_c); GetCoordFromState(targetID, targetx_c, targety_c, targettheta_c); SBPL_FPRINTF(fDeb, "looking for %d %d %d -> %d %d %d (numofsuccs=%d)\n", sourcex_c, sourcey_c, sourcetheta_c, targetx_c, targety_c, targettheta_c, (int)SuccIDV.size()); #endif for (int sind = 0; sind < (int)SuccIDV.size(); sind++) { #if DEBUG int x_c, y_c, theta_c; GetCoordFromState(SuccIDV[sind], x_c, y_c, theta_c); SBPL_FPRINTF(fDeb, "succ: %d %d %d\n", x_c, y_c, theta_c); #endif if (SuccIDV[sind] == targetID && CostV[sind] <= bestcost) { bestcost = CostV[sind]; bestsind = sind; } } if (bestsind == -1) { SBPL_ERROR("ERROR: successor not found for transition:\n"); GetCoordFromState(sourceID, sourcex_c, sourcey_c, sourcetheta_c); GetCoordFromState(targetID, targetx_c, targety_c, targettheta_c); SBPL_PRINTF("%d %d %d -> %d %d %d\n", sourcex_c, sourcey_c, sourcetheta_c, targetx_c, targety_c, targettheta_c); throw new SBPL_Exception(); } //now push in the actual path int sourcex_c, sourcey_c, sourcetheta_c; GetCoordFromState(sourceID, sourcex_c, sourcey_c, sourcetheta_c); double sourcex, sourcey; sourcex = DISCXY2CONT(sourcex_c, EnvNAVXYTHETALATCfg.cellsize_m); sourcey = DISCXY2CONT(sourcey_c, EnvNAVXYTHETALATCfg.cellsize_m); //TODO - when there are no motion primitives we should still print source state for (int ipind = 0; ipind < ((int)actionV[bestsind]->intermptV.size()) - 1; ipind++) { //translate appropriately sbpl_xy_theta_pt_t intermpt = actionV[bestsind]->intermptV[ipind]; intermpt.x += sourcex; intermpt.y += sourcey; #if DEBUG int nx = CONTXY2DISC(intermpt.x, EnvNAVXYTHETALATCfg.cellsize_m); int ny = CONTXY2DISC(intermpt.y, EnvNAVXYTHETALATCfg.cellsize_m); SBPL_FPRINTF(fDeb, "%.3f %.3f %.3f (%d %d %d cost=%d) ", intermpt.x, intermpt.y, intermpt.theta, nx, ny, ContTheta2Disc(intermpt.theta, EnvNAVXYTHETALATCfg.NumThetaDirs), EnvNAVXYTHETALATCfg.Grid2D[nx][ny]); if(ipind == 0) SBPL_FPRINTF(fDeb, "first (heur=%d)\n", GetStartHeuristic(sourceID)); else SBPL_FPRINTF(fDeb, "\n"); #endif //store xythetaPath->push_back(intermpt); } } } //returns the stateid if success, and -1 otherwise int EnvironmentNAVXYTHETALAT::SetGoal(double x_m, double y_m, double theta_rad) { int x = CONTXY2DISC(x_m, EnvNAVXYTHETALATCfg.cellsize_m); int y = CONTXY2DISC(y_m, EnvNAVXYTHETALATCfg.cellsize_m); int theta = ContTheta2Disc(theta_rad, EnvNAVXYTHETALATCfg.NumThetaDirs); SBPL_PRINTF("env: setting goal to %.3f %.3f %.3f (%d %d %d)\n", x_m, y_m, theta_rad, x, y, theta); if (!IsWithinMapCell(x, y)) { SBPL_ERROR("ERROR: trying to set a goal cell %d %d that is outside of map\n", x, y); return -1; } if (!IsValidConfiguration(x, y, theta)) { SBPL_PRINTF("WARNING: goal configuration is invalid\n"); } EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(x, y, theta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(x, y, theta); } //need to recompute start heuristics? if (EnvNAVXYTHETALAT.goalstateid != OutHashEntry->stateID) { bNeedtoRecomputeStartHeuristics = true; //because termination condition may not plan all the way to the new goal bNeedtoRecomputeGoalHeuristics = true; //because goal heuristics change } EnvNAVXYTHETALAT.goalstateid = OutHashEntry->stateID; EnvNAVXYTHETALATCfg.EndX_c = x; EnvNAVXYTHETALATCfg.EndY_c = y; EnvNAVXYTHETALATCfg.EndTheta = theta; return EnvNAVXYTHETALAT.goalstateid; } //returns the stateid if success, and -1 otherwise int EnvironmentNAVXYTHETALAT::SetStart(double x_m, double y_m, double theta_rad) { int x = CONTXY2DISC(x_m, EnvNAVXYTHETALATCfg.cellsize_m); int y = CONTXY2DISC(y_m, EnvNAVXYTHETALATCfg.cellsize_m); int theta = ContTheta2Disc(theta_rad, EnvNAVXYTHETALATCfg.NumThetaDirs); if (!IsWithinMapCell(x, y)) { SBPL_ERROR("ERROR: trying to set a start cell %d %d that is outside of map\n", x, y); return -1; } SBPL_PRINTF("env: setting start to %.3f %.3f %.3f (%d %d %d)\n", x_m, y_m, theta_rad, x, y, theta); if (!IsValidConfiguration(x, y, theta)) { SBPL_PRINTF("WARNING: start configuration %d %d %d is invalid\n", x, y, theta); } EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(x, y, theta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(x, y, theta); } //need to recompute start heuristics? if (EnvNAVXYTHETALAT.startstateid != OutHashEntry->stateID) { bNeedtoRecomputeStartHeuristics = true; //because termination condition can be not all states TODO - make it dependent on term. condition bNeedtoRecomputeGoalHeuristics = true; } //set start EnvNAVXYTHETALAT.startstateid = OutHashEntry->stateID; EnvNAVXYTHETALATCfg.StartX_c = x; EnvNAVXYTHETALATCfg.StartY_c = y; EnvNAVXYTHETALATCfg.StartTheta = theta; return EnvNAVXYTHETALAT.startstateid; } void EnvironmentNAVXYTHETALAT::PrintState(int stateID, bool bVerbose, FILE* fOut /*=NULL*/) { #if DEBUG if(stateID >= (int)StateID2CoordTable.size()) { SBPL_ERROR("ERROR in EnvNAVXYTHETALAT... function: stateID illegal (2)\n"); throw new SBPL_Exception(); } #endif if (fOut == NULL) fOut = stdout; EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[stateID]; if (stateID == EnvNAVXYTHETALAT.goalstateid && bVerbose) { SBPL_FPRINTF(fOut, "the state is a goal state\n"); } if (bVerbose) SBPL_FPRINTF(fOut, "X=%d Y=%d Theta=%d\n", HashEntry->X, HashEntry->Y, HashEntry->Theta); else SBPL_FPRINTF(fOut, "%.3f %.3f %.3f\n", DISCXY2CONT(HashEntry->X, EnvNAVXYTHETALATCfg.cellsize_m), DISCXY2CONT(HashEntry->Y, EnvNAVXYTHETALATCfg.cellsize_m), DiscTheta2Cont(HashEntry->Theta, EnvNAVXYTHETALATCfg.NumThetaDirs)); } EnvNAVXYTHETALATHashEntry_t* EnvironmentNAVXYTHETALAT::GetHashEntry_lookup(int X, int Y, int Theta) { if (X < 0 || X >= EnvNAVXYTHETALATCfg.EnvWidth_c || Y < 0 || Y >= EnvNAVXYTHETALATCfg.EnvHeight_c || Theta < 0 || Theta >= EnvNAVXYTHETALATCfg.NumThetaDirs) return NULL; int index = XYTHETA2INDEX(X,Y,Theta); return Coord2StateIDHashTable_lookup[index]; } EnvNAVXYTHETALATHashEntry_t* EnvironmentNAVXYTHETALAT::GetHashEntry_hash(int X, int Y, int Theta) { #if TIME_DEBUG clock_t currenttime = clock(); #endif int binid = GETHASHBIN(X, Y, Theta); #if DEBUG if ((int)Coord2StateIDHashTable[binid].size() > 5) { SBPL_FPRINTF(fDeb, "WARNING: Hash table has a bin %d (X=%d Y=%d) of size %d\n", binid, X, Y, (int)Coord2StateIDHashTable[binid].size()); PrintHashTableHist(fDeb); } #endif //iterate over the states in the bin and select the perfect match vector<EnvNAVXYTHETALATHashEntry_t*>* binV = &Coord2StateIDHashTable[binid]; for (int ind = 0; ind < (int)binV->size(); ind++) { EnvNAVXYTHETALATHashEntry_t* hashentry = binV->at(ind); if (hashentry->X == X && hashentry->Y == Y && hashentry->Theta == Theta) { #if TIME_DEBUG time_gethash += clock()-currenttime; #endif return hashentry; } } #if TIME_DEBUG time_gethash += clock()-currenttime; #endif return NULL; } EnvNAVXYTHETALATHashEntry_t* EnvironmentNAVXYTHETALAT::CreateNewHashEntry_lookup(int X, int Y, int Theta) { int i; #if TIME_DEBUG clock_t currenttime = clock(); #endif EnvNAVXYTHETALATHashEntry_t* HashEntry = new EnvNAVXYTHETALATHashEntry_t; HashEntry->X = X; HashEntry->Y = Y; HashEntry->Theta = Theta; HashEntry->iteration = 0; HashEntry->stateID = StateID2CoordTable.size(); //insert into the tables StateID2CoordTable.push_back(HashEntry); int index = XYTHETA2INDEX(X,Y,Theta); #if DEBUG if(Coord2StateIDHashTable_lookup[index] != NULL) { SBPL_ERROR("ERROR: creating hash entry for non-NULL hashentry\n"); throw new SBPL_Exception(); } #endif Coord2StateIDHashTable_lookup[index] = HashEntry; //insert into and initialize the mappings int* entry = new int[NUMOFINDICES_STATEID2IND]; StateID2IndexMapping.push_back(entry); for (i = 0; i < NUMOFINDICES_STATEID2IND; i++) { StateID2IndexMapping[HashEntry->stateID][i] = -1; } if (HashEntry->stateID != (int)StateID2IndexMapping.size() - 1) { SBPL_ERROR("ERROR in Env... function: last state has incorrect stateID\n"); throw new SBPL_Exception(); } #if TIME_DEBUG time_createhash += clock()-currenttime; #endif return HashEntry; } EnvNAVXYTHETALATHashEntry_t* EnvironmentNAVXYTHETALAT::CreateNewHashEntry_hash(int X, int Y, int Theta) { int i; #if TIME_DEBUG clock_t currenttime = clock(); #endif EnvNAVXYTHETALATHashEntry_t* HashEntry = new EnvNAVXYTHETALATHashEntry_t; HashEntry->X = X; HashEntry->Y = Y; HashEntry->Theta = Theta; HashEntry->iteration = 0; HashEntry->stateID = StateID2CoordTable.size(); //insert into the tables StateID2CoordTable.push_back(HashEntry); //get the hash table bin i = GETHASHBIN(HashEntry->X, HashEntry->Y, HashEntry->Theta); //insert the entry into the bin Coord2StateIDHashTable[i].push_back(HashEntry); //insert into and initialize the mappings int* entry = new int[NUMOFINDICES_STATEID2IND]; StateID2IndexMapping.push_back(entry); for (i = 0; i < NUMOFINDICES_STATEID2IND; i++) { StateID2IndexMapping[HashEntry->stateID][i] = -1; } if (HashEntry->stateID != (int)StateID2IndexMapping.size() - 1) { SBPL_ERROR("ERROR in Env... function: last state has incorrect stateID\n"); throw new SBPL_Exception(); } #if TIME_DEBUG time_createhash += clock()-currenttime; #endif return HashEntry; } void EnvironmentNAVXYTHETALAT::GetSuccs(int SourceStateID, vector<int>* SuccIDV, vector<int>* CostV, vector< EnvNAVXYTHETALATAction_t*>* actionV /*=NULL*/) { int aind; #if TIME_DEBUG clock_t currenttime = clock(); #endif //clear the successor array SuccIDV->clear(); CostV->clear(); SuccIDV->reserve(EnvNAVXYTHETALATCfg.actionwidth); CostV->reserve(EnvNAVXYTHETALATCfg.actionwidth); if (actionV != NULL) { actionV->clear(); actionV->reserve(EnvNAVXYTHETALATCfg.actionwidth); } //goal state should be absorbing if (SourceStateID == EnvNAVXYTHETALAT.goalstateid) return; //get X, Y for the state EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[SourceStateID]; //iterate through actions for (aind = 0; aind < EnvNAVXYTHETALATCfg.actionwidth; aind++) { EnvNAVXYTHETALATAction_t* nav3daction = &EnvNAVXYTHETALATCfg.ActionsV[(unsigned int)HashEntry->Theta][aind]; int newX = HashEntry->X + nav3daction->dX; int newY = HashEntry->Y + nav3daction->dY; int newTheta = NORMALIZEDISCTHETA(nav3daction->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); //skip the invalid cells if (!IsValidCell(newX, newY)) continue; //get cost int cost = GetActionCost(HashEntry->X, HashEntry->Y, HashEntry->Theta, nav3daction); if (cost >= INFINITECOST) continue; EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(newX, newY, newTheta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(newX, newY, newTheta); } SuccIDV->push_back(OutHashEntry->stateID); CostV->push_back(cost); if (actionV != NULL) actionV->push_back(nav3daction); } #if TIME_DEBUG time_getsuccs += clock()-currenttime; #endif } void EnvironmentNAVXYTHETALAT::GetPreds(int TargetStateID, vector<int>* PredIDV, vector<int>* CostV) { //TODO- to support tolerance, need: // a) generate preds for goal state based on all possible goal state variable settings, // b) change goal check condition in gethashentry c) change // getpredsofchangedcells and getsuccsofchangedcells functions int aind; #if TIME_DEBUG clock_t currenttime = clock(); #endif //get X, Y for the state EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[TargetStateID]; //clear the successor array PredIDV->clear(); CostV->clear(); PredIDV->reserve(EnvNAVXYTHETALATCfg.PredActionsV[(unsigned int)HashEntry->Theta].size()); CostV->reserve(EnvNAVXYTHETALATCfg.PredActionsV[(unsigned int)HashEntry->Theta].size()); //iterate through actions vector<EnvNAVXYTHETALATAction_t*>* actionsV = &EnvNAVXYTHETALATCfg.PredActionsV[(unsigned int)HashEntry->Theta]; for (aind = 0; aind < (int)EnvNAVXYTHETALATCfg.PredActionsV[(unsigned int)HashEntry->Theta].size(); aind++) { EnvNAVXYTHETALATAction_t* nav3daction = actionsV->at(aind); int predX = HashEntry->X - nav3daction->dX; int predY = HashEntry->Y - nav3daction->dY; int predTheta = nav3daction->starttheta; //skip the invalid cells if (!IsValidCell(predX, predY)) continue; //get cost int cost = GetActionCost(predX, predY, predTheta, nav3daction); if (cost >= INFINITECOST) continue; EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(predX, predY, predTheta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(predX, predY, predTheta); } PredIDV->push_back(OutHashEntry->stateID); CostV->push_back(cost); } #if TIME_DEBUG time_getsuccs += clock()-currenttime; #endif } void EnvironmentNAVXYTHETALAT::SetAllActionsandAllOutcomes(CMDPSTATE* state) { int cost; #if DEBUG if(state->StateID >= (int)StateID2CoordTable.size()) { SBPL_ERROR("ERROR in Env... function: stateID illegal\n"); throw new SBPL_Exception(); } if((int)state->Actions.size() != 0) { SBPL_ERROR("ERROR in Env_setAllActionsandAllOutcomes: actions already exist for the state\n"); throw new SBPL_Exception(); } #endif //goal state should be absorbing if (state->StateID == EnvNAVXYTHETALAT.goalstateid) return; //get X, Y for the state EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[state->StateID]; //iterate through actions for (int aind = 0; aind < EnvNAVXYTHETALATCfg.actionwidth; aind++) { EnvNAVXYTHETALATAction_t* nav3daction = &EnvNAVXYTHETALATCfg.ActionsV[(unsigned int)HashEntry->Theta][aind]; int newX = HashEntry->X + nav3daction->dX; int newY = HashEntry->Y + nav3daction->dY; int newTheta = NORMALIZEDISCTHETA(nav3daction->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); //skip the invalid cells if (!IsValidCell(newX, newY)) continue; //get cost cost = GetActionCost(HashEntry->X, HashEntry->Y, HashEntry->Theta, nav3daction); if (cost >= INFINITECOST) continue; //add the action CMDPACTION* action = state->AddAction(aind); #if TIME_DEBUG clock_t currenttime = clock(); #endif EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(newX, newY, newTheta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(newX, newY, newTheta); } action->AddOutcome(OutHashEntry->stateID, cost, 1.0); #if TIME_DEBUG time3_addallout += clock()-currenttime; #endif } } void EnvironmentNAVXYTHETALAT::GetPredsofChangedEdges(vector<nav2dcell_t> const * changedcellsV, vector<int> *preds_of_changededgesIDV) { nav2dcell_t cell; sbpl_xy_theta_cell_t affectedcell; EnvNAVXYTHETALATHashEntry_t* affectedHashEntry; //increment iteration for processing savings iteration++; for (int i = 0; i < (int)changedcellsV->size(); i++) { cell = changedcellsV->at(i); //now iterate over all states that could potentially be affected for (int sind = 0; sind < (int)affectedpredstatesV.size(); sind++) { affectedcell = affectedpredstatesV.at(sind); //translate to correct for the offset affectedcell.x = affectedcell.x + cell.x; affectedcell.y = affectedcell.y + cell.y; //insert only if it was actually generated affectedHashEntry = (this->*GetHashEntry)(affectedcell.x, affectedcell.y, affectedcell.theta); if (affectedHashEntry != NULL && affectedHashEntry->iteration < iteration) { preds_of_changededgesIDV->push_back(affectedHashEntry->stateID); affectedHashEntry->iteration = iteration; //mark as already inserted } } } } void EnvironmentNAVXYTHETALAT::GetSuccsofChangedEdges(vector<nav2dcell_t> const * changedcellsV, vector<int> *succs_of_changededgesIDV) { nav2dcell_t cell; sbpl_xy_theta_cell_t affectedcell; EnvNAVXYTHETALATHashEntry_t* affectedHashEntry; SBPL_ERROR("ERROR: getsuccs is not supported currently\n"); throw new SBPL_Exception(); //increment iteration for processing savings iteration++; //TODO - check for (int i = 0; i < (int)changedcellsV->size(); i++) { cell = changedcellsV->at(i); //now iterate over all states that could potentially be affected for (int sind = 0; sind < (int)affectedsuccstatesV.size(); sind++) { affectedcell = affectedsuccstatesV.at(sind); //translate to correct for the offset affectedcell.x = affectedcell.x + cell.x; affectedcell.y = affectedcell.y + cell.y; //insert only if it was actually generated affectedHashEntry = (this->*GetHashEntry)(affectedcell.x, affectedcell.y, affectedcell.theta); if (affectedHashEntry != NULL && affectedHashEntry->iteration < iteration) { succs_of_changededgesIDV->push_back(affectedHashEntry->stateID); affectedHashEntry->iteration = iteration; //mark as already inserted } } } } void EnvironmentNAVXYTHETALAT::InitializeEnvironment() { EnvNAVXYTHETALATHashEntry_t* HashEntry; int maxsize = EnvNAVXYTHETALATCfg.EnvWidth_c * EnvNAVXYTHETALATCfg.EnvHeight_c * EnvNAVXYTHETALATCfg.NumThetaDirs; if (maxsize <= SBPL_XYTHETALAT_MAXSTATESFORLOOKUP) { SBPL_PRINTF("environment stores states in lookup table\n"); Coord2StateIDHashTable_lookup = new EnvNAVXYTHETALATHashEntry_t*[maxsize]; for (int i = 0; i < maxsize; i++) Coord2StateIDHashTable_lookup[i] = NULL; GetHashEntry = &EnvironmentNAVXYTHETALAT::GetHashEntry_lookup; CreateNewHashEntry = &EnvironmentNAVXYTHETALAT::CreateNewHashEntry_lookup; //not using hash table HashTableSize = 0; Coord2StateIDHashTable = NULL; } else { SBPL_PRINTF("environment stores states in hashtable\n"); //initialize the map from Coord to StateID HashTableSize = 4 * 1024 * 1024; //should be power of two Coord2StateIDHashTable = new vector<EnvNAVXYTHETALATHashEntry_t*> [HashTableSize]; GetHashEntry = &EnvironmentNAVXYTHETALAT::GetHashEntry_hash; CreateNewHashEntry = &EnvironmentNAVXYTHETALAT::CreateNewHashEntry_hash; //not using hash Coord2StateIDHashTable_lookup = NULL; } //initialize the map from StateID to Coord StateID2CoordTable.clear(); //create start state if ((HashEntry = (this->*GetHashEntry)(EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.StartY_c, EnvNAVXYTHETALATCfg.StartTheta)) == NULL) { //have to create a new entry HashEntry = (this->*CreateNewHashEntry)(EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.StartY_c, EnvNAVXYTHETALATCfg.StartTheta); } EnvNAVXYTHETALAT.startstateid = HashEntry->stateID; //create goal state if ((HashEntry = (this->*GetHashEntry)(EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.EndY_c, EnvNAVXYTHETALATCfg.EndTheta)) == NULL) { //have to create a new entry HashEntry = (this->*CreateNewHashEntry)(EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.EndY_c, EnvNAVXYTHETALATCfg.EndTheta); } EnvNAVXYTHETALAT.goalstateid = HashEntry->stateID; //initialized EnvNAVXYTHETALAT.bInitialized = true; } //examples of hash functions: map state coordinates onto a hash value //#define GETHASHBIN(X, Y) (Y*WIDTH_Y+X) //here we have state coord: <X1, X2, X3, X4> unsigned int EnvironmentNAVXYTHETALAT::GETHASHBIN(unsigned int X1, unsigned int X2, unsigned int Theta) { return inthash(inthash(X1) + (inthash(X2) << 1) + (inthash(Theta) << 2)) & (HashTableSize - 1); } void EnvironmentNAVXYTHETALAT::PrintHashTableHist(FILE* fOut) { int s0 = 0, s1 = 0, s50 = 0, s100 = 0, s200 = 0, s300 = 0, slarge = 0; for (int j = 0; j < HashTableSize; j++) { if ((int)Coord2StateIDHashTable[j].size() == 0) s0++; else if ((int)Coord2StateIDHashTable[j].size() < 5) s1++; else if ((int)Coord2StateIDHashTable[j].size() < 25) s50++; else if ((int)Coord2StateIDHashTable[j].size() < 50) s100++; else if ((int)Coord2StateIDHashTable[j].size() < 100) s200++; else if ((int)Coord2StateIDHashTable[j].size() < 400) s300++; else slarge++; } SBPL_FPRINTF(fOut, "hash table histogram: 0:%d, <5:%d, <25:%d, <50:%d, <100:%d, <400:%d, >400:%d\n", s0, s1, s50, s100, s200, s300, slarge); } int EnvironmentNAVXYTHETALAT::GetFromToHeuristic(int FromStateID, int ToStateID) { #if USE_HEUR==0 return 0; #endif #if DEBUG if(FromStateID >= (int)StateID2CoordTable.size() || ToStateID >= (int)StateID2CoordTable.size()) { SBPL_ERROR("ERROR in EnvNAVXYTHETALAT... function: stateID illegal\n"); throw new SBPL_Exception(); } #endif //get X, Y for the state EnvNAVXYTHETALATHashEntry_t* FromHashEntry = StateID2CoordTable[FromStateID]; EnvNAVXYTHETALATHashEntry_t* ToHashEntry = StateID2CoordTable[ToStateID]; //TODO - check if one of the gridsearches already computed and then use it. return (int)(NAVXYTHETALAT_COSTMULT_MTOMM * EuclideanDistance_m(FromHashEntry->X, FromHashEntry->Y, ToHashEntry->X, ToHashEntry->Y) / EnvNAVXYTHETALATCfg.nominalvel_mpersecs); } int EnvironmentNAVXYTHETALAT::GetGoalHeuristic(int stateID) { #if USE_HEUR==0 return 0; #endif #if DEBUG if (stateID >= (int)StateID2CoordTable.size()) { SBPL_ERROR("ERROR in EnvNAVXYTHETALAT... function: stateID illegal\n"); throw new SBPL_Exception(); } #endif EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[stateID]; //computes distances from start state that is grid2D, so it is EndX_c EndY_c int h2D = grid2Dsearchfromgoal->getlowerboundoncostfromstart_inmm(HashEntry->X, HashEntry->Y); int hEuclid = (int)(NAVXYTHETALAT_COSTMULT_MTOMM * EuclideanDistance_m(HashEntry->X, HashEntry->Y, EnvNAVXYTHETALATCfg.EndX_c, EnvNAVXYTHETALATCfg.EndY_c)); //define this function if it is used in the planner (heuristic backward search would use it) return (int)(((double)__max(h2D, hEuclid)) / EnvNAVXYTHETALATCfg.nominalvel_mpersecs); } int EnvironmentNAVXYTHETALAT::GetStartHeuristic(int stateID) { #if USE_HEUR==0 return 0; #endif #if DEBUG if (stateID >= (int)StateID2CoordTable.size()) { SBPL_ERROR("ERROR in EnvNAVXYTHETALAT... function: stateID illegal\n"); throw new SBPL_Exception(); } #endif EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[stateID]; int h2D = grid2Dsearchfromstart->getlowerboundoncostfromstart_inmm(HashEntry->X, HashEntry->Y); int hEuclid = (int)(NAVXYTHETALAT_COSTMULT_MTOMM * EuclideanDistance_m(EnvNAVXYTHETALATCfg.StartX_c, EnvNAVXYTHETALATCfg.StartY_c, HashEntry->X, HashEntry->Y)); //define this function if it is used in the planner (heuristic backward search would use it) return (int)(((double)__max(h2D, hEuclid)) / EnvNAVXYTHETALATCfg.nominalvel_mpersecs); } int EnvironmentNAVXYTHETALAT::SizeofCreatedEnv() { return (int)StateID2CoordTable.size(); } //------------------------------------------------------------------------------ void EnvironmentNAVXYTHETALAT::GetLazySuccs(int SourceStateID, std::vector<int>* SuccIDV, std::vector<int>* CostV, std::vector<bool>* isTrueCost, std::vector<EnvNAVXYTHETALATAction_t*>* actionV /*=NULL*/) { int aind; #if TIME_DEBUG clock_t currenttime = clock(); #endif //clear the successor array SuccIDV->clear(); CostV->clear(); SuccIDV->reserve(EnvNAVXYTHETALATCfg.actionwidth); CostV->reserve(EnvNAVXYTHETALATCfg.actionwidth); isTrueCost->reserve(EnvNAVXYTHETALATCfg.actionwidth); if (actionV != NULL) { actionV->clear(); actionV->reserve(EnvNAVXYTHETALATCfg.actionwidth); } //goal state should be absorbing if (SourceStateID == EnvNAVXYTHETALAT.goalstateid) return; //get X, Y for the state EnvNAVXYTHETALATHashEntry_t* HashEntry = StateID2CoordTable[SourceStateID]; //iterate through actions for (aind = 0; aind < EnvNAVXYTHETALATCfg.actionwidth; aind++) { EnvNAVXYTHETALATAction_t* nav3daction = &EnvNAVXYTHETALATCfg.ActionsV[(unsigned int)HashEntry->Theta][aind]; int newX = HashEntry->X + nav3daction->dX; int newY = HashEntry->Y + nav3daction->dY; int newTheta = NORMALIZEDISCTHETA(nav3daction->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); //skip the invalid cells if (!IsValidCell(newX, newY)) continue; if(!actionV){//if we are supposed to return the action, then don't do lazy EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if((OutHashEntry = (this->*GetHashEntry)(newX, newY, newTheta)) == NULL) OutHashEntry = (this->*CreateNewHashEntry)(newX, newY, newTheta); SuccIDV->push_back(OutHashEntry->stateID); CostV->push_back(nav3daction->cost); isTrueCost->push_back(false); continue; } //get cost int cost = GetActionCost(HashEntry->X, HashEntry->Y, HashEntry->Theta, nav3daction); if (cost >= INFINITECOST) continue; EnvNAVXYTHETALATHashEntry_t* OutHashEntry; if ((OutHashEntry = (this->*GetHashEntry)(newX, newY, newTheta)) == NULL) { //have to create a new entry OutHashEntry = (this->*CreateNewHashEntry)(newX, newY, newTheta); } SuccIDV->push_back(OutHashEntry->stateID); CostV->push_back(cost); isTrueCost->push_back(true); if (actionV != NULL) actionV->push_back(nav3daction); } #if TIME_DEBUG time_getsuccs += clock()-currenttime; #endif } int EnvironmentNAVXYTHETALAT::GetTrueCost(int parentID, int childID){ EnvNAVXYTHETALATHashEntry_t* fromHash = StateID2CoordTable[parentID]; EnvNAVXYTHETALATHashEntry_t* toHash = StateID2CoordTable[childID]; for(int i=0; i<EnvNAVXYTHETALATCfg.actionwidth; i++){ EnvNAVXYTHETALATAction_t* nav3daction = &EnvNAVXYTHETALATCfg.ActionsV[(unsigned int)fromHash->Theta][i]; int newX = fromHash->X + nav3daction->dX; int newY = fromHash->Y + nav3daction->dY; int newTheta = NORMALIZEDISCTHETA(nav3daction->endtheta, EnvNAVXYTHETALATCfg.NumThetaDirs); //skip the invalid cells if(!IsValidCell(newX, newY)) continue; EnvNAVXYTHETALATHashEntry_t* hash; if((hash = (this->*GetHashEntry)(newX, newY, newTheta)) == NULL) continue; if(hash->stateID != toHash->stateID) continue; //get cost int cost = GetActionCost(fromHash->X, fromHash->Y, fromHash->Theta, nav3daction); if(cost >= INFINITECOST) return -1; return cost; } printf("this should never happen! we didn't find the state we need to get the true cost for!\n"); throw new SBPL_Exception(); return -1; } void EnvironmentNAVXYTHETALAT::GetSuccsWithUniqueIds(int SourceStateID, std::vector<int>* SuccIDV, std::vector<int>* CostV, std::vector<EnvNAVXYTHETALATAction_t*>* actionV /*=NULL*/){ GetSuccs(SourceStateID, SuccIDV, CostV, actionV); } void EnvironmentNAVXYTHETALAT::GetLazySuccsWithUniqueIds(int SourceStateID, std::vector<int>* SuccIDV, std::vector<int>* CostV, std::vector<bool>* isTrueCost, std::vector<EnvNAVXYTHETALATAction_t*>* actionV /*=NULL*/){ GetLazySuccs(SourceStateID, SuccIDV, CostV, isTrueCost, actionV); } bool EnvironmentNAVXYTHETALAT::isGoal(int id){ return EnvNAVXYTHETALAT.goalstateid == id; } //void EnvironmentNAVXYTHETALAT::GetPreds(int TargetStateID, std::vector<int>* PredIDV, std::vector<int>* CostV, std::vector<bool>* isTrueCost); //void EnvironmentNAVXYTHETALAT::GetPredsWithUniqueIds(int TargetStateID, std::vector<int>* PredIDV, std::vector<int>* CostV); //void EnvironmentNAVXYTHETALAT::GetPredsWithUniqueIds(int TargetStateID, std::vector<int>* PredIDV, std::vector<int>* CostV, std::vector<bool>* isTrueCost);
[ "venkatrn@andrew.cmu.edu" ]
venkatrn@andrew.cmu.edu
4e3856d5d7110fe9aa79aac856b4c631ff50d06b
cf8ddfc720bf6451c4ef4fa01684327431db1919
/SDK/ARKSurvivalEvolved_PrimalItemStructure_StoneCeilingWithTrapdoor_classes.hpp
4ad44ec774b82388273111f2f93c9a0e63c0d025
[ "MIT" ]
permissive
git-Charlie/ARK-SDK
75337684b11e7b9f668da1f15e8054052a3b600f
c38ca9925309516b2093ad8c3a70ed9489e1d573
refs/heads/master
2023-06-20T06:30:33.550123
2021-07-11T13:41:45
2021-07-11T13:41:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
983
hpp
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemStructure_StoneCeilingWithTrapdoor_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass PrimalItemStructure_StoneCeilingWithTrapdoor.PrimalItemStructure_StoneCeilingWithTrapdoor_C // 0x0000 (0x0AE0 - 0x0AE0) class UPrimalItemStructure_StoneCeilingWithTrapdoor_C : public UPrimalItemStructure_BaseCeilingWithTrapdoor_C { public: static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass PrimalItemStructure_StoneCeilingWithTrapdoor.PrimalItemStructure_StoneCeilingWithTrapdoor_C"); return ptr; } void ExecuteUbergraph_PrimalItemStructure_StoneCeilingWithTrapdoor(int EntryPoint); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "sergey.2bite@gmail.com" ]
sergey.2bite@gmail.com
f57281a4e1de71a14be3205d0f2661e6a7629759
2e7c251c97dda8031dbda355e1bc36cb8bc1a9ea
/Simp/Simp/Src/File.cpp
8b112e7698d6e2dad3a364b7be6e6bfc0d06b76a
[]
no_license
15831944/studies
98677ed4bf173c4a1647f2fde2d98f9debe0f072
5347e517318b921aa799e11d310527be273be3fd
refs/heads/master
2023-06-12T17:00:01.774021
2021-07-09T09:38:12
2021-07-09T09:38:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
114
cpp
// File.cpp // #include "StdAfx.h" #include <Simp/File.h> static const _TCHAR* THIS_FILE = _T(__FILE__);
[ "breaker.zy@gmail.com" ]
breaker.zy@gmail.com
e280be99d7c819c83c01308c58ac3dbbcae5be63
10f96d8c37877439ae4d13e5248a4540ca85e65b
/src/palette.hpp
77513384947f0ea43fd9fe4850aca60120ff714a
[]
no_license
jakubcerveny/hogtess
cca2f91ae01614d9a381b75862e24a29c2e84585
37508f86ada8d9d217b7181177891dd621ce0c23
refs/heads/master
2021-06-06T16:37:21.657442
2020-06-06T08:34:13
2020-06-06T08:34:13
106,323,937
13
1
null
null
null
null
UTF-8
C++
false
false
209
hpp
#ifndef hogtess_palette_hpp_included__ #define hogtess_palette_hpp_included__ const int RGB_Palette_3_Size = 65; extern float RGB_Palette_3[RGB_Palette_3_Size][3]; #endif // hogtess_palette_hpp_included__
[ "jakub.cerveny@gmail.com" ]
jakub.cerveny@gmail.com
54d2f5cc086650db5e114da4bb6f13955cfbd674
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5662291475300352_0/C++/IITianUG/GoogleR3.cpp
ce90d7e7f4a9c3f08f881e8684a9f6628df552da
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
744
cpp
#include<bits/stdc++.h> using namespace std; int main() { ifstream IF; ofstream OF; int t,trm,i,d[100],h[100],m[100],n,xx,yy; IF.open("input.txt"); OF.open("output.txt"); IF>>t; for(trm=1;trm<=t;trm++) { IF>>n; for(i=0;i<n;i++) { IF>>d[i]>>h[i]>>m[i]; } if(n==1) OF<<"Case #"<<trm<<": "<<0<<endl; else { m[0]=m[0]/360+m[0]%360+d[0]; m[1]=m[1]/360+m[1]%360+d[1]; xx =max(m[0],m[1]); yy = min(m[0],m[1]); xx = xx/yy; if(xx>=2) OF<<"Case #"<<trm<<": "<<1<<endl; else OF<<"Case #"<<trm<<": "<<0<<endl; } } IF.close(); OF.close(); return 0; }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
ac13d267ac51bada4bba07c52f58c392b5df6e17
d0e9fbbbc0955cc349e04a862baaf48d27f35db5
/src/Clickable.h
55af0e97718a25d677b841742b965ca067b638fa
[]
no_license
clementschmitt/DataDefense
b346eb83514ad2b5a85ec7104e578944034b90bb
f45f993ec364db6b46f2d4ad68d64847ad68479f
refs/heads/master
2021-01-22T06:38:17.205520
2013-11-27T16:42:37
2013-11-27T16:42:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
273
h
#ifndef CLICKABLE_H #define CLICKABLE_H #include "VisibleGameObject.h" class Clickable : public VisibleGameObject { public: Clickable(); ~Clickable(); void Callback( void (*f)()); void Exec() const; private: void (*_callback)(); }; #endif
[ "mathieu.nerv@gmail.com" ]
mathieu.nerv@gmail.com
833d49454295e165d53debdf744832305d5548b5
2ef6a773dd5288e6526b70e484fb0ec0104529f4
/poj.org/3654/4218559_AC_32MS_504K.cc
87786a89144b1086a4ad3dc9cad0714ca5e46181
[]
no_license
thebeet/online_judge_solution
f09426be6b28f157b1e5fd796c2eef99fb9978d8
7e8c25ff2e1f42cc9835e9cc7e25869a9dbbc0a1
refs/heads/master
2023-08-31T15:19:26.619898
2023-08-28T10:51:24
2023-08-28T10:51:24
60,448,261
1
0
null
null
null
null
UTF-8
C++
false
false
3,101
cc
/* * PKU3654::Electronic_Document_Security.cpp * * Created on: Oct 9, 2008 7:09:04 PM * Author: TheBeet * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <iostream> #include <algorithm> #include <string> #include <vector> #include <map> using namespace std; int main() { string inp; int ti(0); while ((cin >> inp), inp != "#") { cout << ++ti << ":"; map<char, map<char, bool> > ans; map<char, string> ansstr; string token; ans.clear(); ansstr.clear(); int pos; while (inp.size() > 0) { string op; if ((pos = inp.find(',')) == inp.npos) { token = inp; inp = ""; } else { token = inp.substr(0, pos); inp = inp.substr(pos + 1, inp.size() - pos - 1); } string left, right; if ((pos = token.find('-')) != token.npos) { left = token.substr(0, pos); right = token.substr(pos + 1, token.size() - pos - 1); op = "-"; for (int i = 0; i < left.size(); ++i) { for (int j = 0; j < right.size(); ++j) { ans[left[i]].erase(right[j]); } } } else if ((pos = token.find('+')) != token.npos) { left = token.substr(0, pos); right = token.substr(pos + 1, token.size() - pos - 1); op = "+"; for (int i = 0; i < left.size(); ++i) { for (int j = 0; j < right.size(); ++j) { ans[left[i]][right[j]] = true; } } } else if ((pos = token.find('=')) != token.npos) { left = token.substr(0, pos); right = token.substr(pos + 1, token.size() - pos - 1); op = "="; map<char, bool> newans; for (int j = 0; j < right.size(); ++j) { newans[right[j]] = true; } for (int i = 0; i < left.size(); ++i) { ans[left[i]] = newans; } } // cerr << left << " " << op << " " << right << endl; } char pre = '\0'; for (char a = 'A'; a <= 'Z'; ++a) { if (ans[a].size() == 0) { continue; } else { if (pre != '\0') { for (char b = 'a'; b <= 'z'; ++b) { if (ans[a][b]) { ansstr[a].push_back(b); } } if (ansstr[a] == ansstr[pre]) { cout << a; } else { cout << ansstr[pre] << a; } pre = a; } else { pre = a; for (char b = 'a'; b <= 'z'; ++b) { if (ans[a][b]) { ansstr[a].push_back(b); } } cout << a; } } } if (pre != '\0') { cout << ansstr[pre]; } cout << endl; } return 0; }
[ "项光特" ]
项光特
317f823d51344382aaa5632e691f0e775e142ce1
60e1416d08834036e7ca9cb1adb36635f7ada57e
/libpmf-1.41/util.cpp
274ea1338ef6e00301c3d40541da5d974ef7b3cb
[ "BSD-3-Clause" ]
permissive
DavidMcDonald1993/atp
d8b807a71b14e97b90979310301103a2fcdb66ab
baa7ba751b7be7306f624043989bf3ecde3148d4
refs/heads/master
2020-09-12T15:03:59.448968
2020-06-08T10:11:20
2020-06-08T10:11:20
222,460,966
1
0
BSD-3-Clause
2019-11-18T13:54:31
2019-11-18T13:54:31
null
UTF-8
C++
false
false
5,621
cpp
#include "util.h" #define MALLOC(type, size) (type*)malloc(sizeof(type)*(size)) // load utility for CCS RCS void load(const char* srcdir, smat_t &R, testset_t &T, bool with_weights){ // add testing later char filename[1024], buf[1024]; sprintf(filename,"%s/meta",srcdir); FILE *fp = fopen(filename,"r"); long m, n, nnz; fscanf(fp, "%ld %ld", &m, &n); fscanf(fp, "%ld %s", &nnz, buf); sprintf(filename,"%s/%s", srcdir, buf); R.load(m, n, nnz, filename, with_weights); if(fscanf(fp, "%ld %s", &nnz, buf)!= EOF){ sprintf(filename,"%s/%s", srcdir, buf); T.load(m, n, nnz, filename); } fclose(fp); //double bias = R.get_global_mean(); R.remove_bias(bias); T.remove_bias(bias); return ; } // Save a mat_t A to a file in row_major order. // row_major = true: A is stored in row_major order, // row_major = false: A is stored in col_major order. void save_mat_t(mat_t A, FILE *fp, bool row_major){ if (fp == NULL) fprintf(stderr, "output stream is not valid.\n"); long m = row_major? A.size(): A[0].size(); long n = row_major? A[0].size(): A.size(); fwrite(&m, sizeof(long), 1, fp); fwrite(&n, sizeof(long), 1, fp); vec_t buf(m*n); if (row_major) { size_t idx = 0; for(size_t i = 0; i < m; ++i) for(size_t j = 0; j < n; ++j) buf[idx++] = A[i][j]; } else { size_t idx = 0; for(size_t i = 0; i < m; ++i) for(size_t j = 0; j < n; ++j) buf[idx++] = A[j][i]; } fwrite(&buf[0], sizeof(double), m*n, fp); } // Load a matrix from a file and return a mat_t matrix // row_major = true: the returned A is stored in row_major order, // row_major = false: the returened A is stored in col_major order. mat_t load_mat_t(FILE *fp, bool row_major){ if (fp == NULL) fprintf(stderr, "input stream is not valid.\n"); long m, n; fread(&m, sizeof(long), 1, fp); fread(&n, sizeof(long), 1, fp); vec_t buf(m*n); fread(&buf[0], sizeof(double), m*n, fp); mat_t A; if (row_major) { A = mat_t(m, vec_t(n)); size_t idx = 0; for(size_t i = 0; i < m; ++i) for(size_t j = 0; j < n; ++j) A[i][j] = buf[idx++]; } else { A = mat_t(n, vec_t(m)); size_t idx = 0; for(size_t i = 0; i < m; ++i) for(size_t j = 0; j < n; ++j) A[j][i] = buf[idx++]; } return A; } void initial(mat_t &X, long n, long k){ X = mat_t(n, vec_t(k)); srand48(0L); for(long i = 0; i < n; ++i){ for(long j = 0; j < k; ++j) X[i][j] = 0.1*drand48(); //-1; //X[i][j] = 0; //-1; } } void initial_col(mat_t &X, long k, long n){ X = mat_t(k, vec_t(n)); srand48(0L); for(long i = 0; i < n; ++i) for(long j = 0; j < k; ++j) X[j][i] = 0.1*drand48(); } double dot(const vec_t &a, const vec_t &b){ double ret = 0; #pragma omp parallel for for(int i = a.size()-1; i >=0; --i) ret+=a[i]*b[i]; return ret; } double dot(const mat_t &W, const int i, const mat_t &H, const int j){ int k = W.size(); double ret = 0; for(int t = 0; t < k; ++t) ret+=W[t][i]*H[t][j]; return ret; } double dot(const mat_t &W, const int i, const vec_t &H_j){ int k = H_j.size(); double ret = 0; for(int t = 0; t < k; ++t) ret+=W[t][i]*H_j[t]; return ret; } double norm(const vec_t &a){ double ret = 0; for(int i = a.size()-1; i >=0; --i) ret+=a[i]*a[i]; return ret; } double norm(const mat_t &M) { double reg = 0; for(int i = M.size()-1; i>=0; --i) reg += norm(M[i]); return reg; } double calloss(const smat_t &R, const mat_t &W, const mat_t &H){ double loss = 0; int k = H.size(); for(long c = 0; c < R.cols; ++c){ for(long idx = R.col_ptr[c]; idx < R.col_ptr[c+1]; ++idx){ double diff = - R.val[idx]; diff += dot(W[R.row_idx[idx]], H[c]); loss += diff*diff; } } return loss; } double calobj(const smat_t &R, const mat_t &W, const mat_t &H, const double lambda, bool iscol){ double loss = 0; int k = iscol?H.size():0; vec_t Hc(k); for(long c = 0; c < R.cols; ++c){ if(iscol) for(int t=0;t<k;++t) Hc[t] = H[t][c]; for(long idx = R.col_ptr[c]; idx < R.col_ptr[c+1]; ++idx){ double diff = - R.val[idx]; if(iscol) diff += dot(W, R.row_idx[idx], Hc); else diff += dot(W[R.row_idx[idx]], H[c]); loss += (R.with_weights? R.weight[idx] : 1.0) * diff*diff; } } double reg = 0; if(iscol) { for(int t=0;t<k;++t) { for(long r=0;r<R.rows;++r) reg += W[t][r]*W[t][r]*R.nnz_of_row(r); for(long c=0;c<R.cols;++c) reg += H[t][c]*H[t][c]*R.nnz_of_col(c); } } else { for(long r=0;r<R.rows;++r) reg += R.nnz_of_row(r)*norm(W[r]); for(long c=0;c<R.cols;++c) reg += R.nnz_of_col(c)*norm(H[c]); } reg *= lambda; return loss + reg; } double calrmse(testset_t &testset, const mat_t &W, const mat_t &H, bool iscol){ size_t nnz = testset.nnz; double rmse = 0, err; for(size_t idx = 0; idx < nnz; ++idx){ err = -testset[idx].v; if(iscol) err += dot(W, testset[idx].i, H, testset[idx].j); else err += dot(W[testset[idx].i], H[testset[idx].j]); rmse += err*err; } return sqrt(rmse/nnz); } double calrmse_r1(testset_t &testset, vec_t &Wt, vec_t &Ht){ size_t nnz = testset.nnz; double rmse = 0, err; #pragma omp parallel for reduction(+:rmse) for(size_t idx = 0; idx < nnz; ++idx){ testset[idx].v -= Wt[testset[idx].i]*Ht[testset[idx].j]; rmse += testset[idx].v*testset[idx].v; } return sqrt(rmse/nnz); } double calrmse_r1(testset_t &testset, vec_t &Wt, vec_t &Ht, vec_t &oldWt, vec_t &oldHt){ size_t nnz = testset.nnz; double rmse = 0, err; #pragma omp parallel for reduction(+:rmse) for(size_t idx = 0; idx < nnz; ++idx){ testset[idx].v -= Wt[testset[idx].i]*Ht[testset[idx].j] - oldWt[testset[idx].i]*oldHt[testset[idx].j]; rmse += testset[idx].v*testset[idx].v; } return sqrt(rmse/nnz); }
[ "sjk2412@163.com" ]
sjk2412@163.com
34ebb13c39440b191a15c41d6a57627ff796dfbf
363cbc43dad2f8a3cb08ca343b95c1d08f6c60c6
/analysis/macro/ReweightPU.cpp
1b29fcdf3fab0dae6cb43cae56d1d33015bd593e
[]
no_license
DebabrataBhowmik/MonoHiggsToGG
45af4363928b48d51ae50210a18a1bb19eb909c5
b22984b06d3b1f767dcf15796c66f07581bf39f0
refs/heads/master
2022-01-26T02:30:39.866888
2019-04-02T09:50:26
2019-04-02T09:50:26
179,046,566
0
1
null
null
null
null
UTF-8
C++
false
false
7,367
cpp
#include "ReweightPU.hh" ReweightPU::ReweightPU(const TString MC, const TString Data, const Double_t lumi, const Int_t nBins, const TString indir, const TString outdir, const TString type) { // save samples for PU weighting fMCName = MC; fDataName = Data; fInDir = indir; std::cout << "Comparing " << fMCName.Data() << " vs. " << fDataName.Data() <<std::endl; // save lumi fLumi = lumi; // set nBins for nvtx distribution fNBins = nBins+1; fMin = -0.5; fMax = Double_t(nBins)+0.5; // std::cout << "lumi " << lumi << " nbins " << nBins << std::endl; // set outputs fOutDir = outdir; MakeOutDirectory(outdir); fOutType = type; // Initialize output TH1D's for data fOutDataNvtx = new TH1D("nvtx_data","",fNBins,fMin,fMax); fOutDataNvtx->Sumw2(); // Initialize outputs for MC fOutMCNvtx = new TH1D("nvtx_mc","",fNBins,fMin,fMax); fOutMCNvtx->Sumw2(); // Intialize Ratio Hist fOutDataOverMCNvtx = new TH1D("nvtx_dataOverMC","",fNBins,fMin,fMax); fOutDataOverMCNvtx->Sumw2(); // Initialize Output root file to be used by other macros ... eventually could integrate... no need now fOutFile = new TFile(Form("%s/PURW_MC.root",fOutDir.Data()),"RECREATE"); } ReweightPU::~ReweightPU() { //delete hists delete fOutDataNvtx; delete fOutMCNvtx; delete fOutDataOverMCNvtx; //delete delete fOutFile; } DblVec ReweightPU::GetPUWeights() { DblVec puweights; // return weights // get vtx distribution for data first // files + trees + tmp hist for data TString filename = Form("%s%s.root",fInDir.Data(),fDataName.Data()); TFile * fileData = TFile::Open(filename.Data()); CheckValidFile(fileData,filename); TTree * treeData = (TTree*)fileData->Get("DiPhotonTree"); CheckValidTree(treeData,"DiPhotonTree",filename); TH1D * tmpnvtxData = new TH1D("tmpnvtxData","",fNBins,fMin,fMax); tmpnvtxData->Sumw2(); // fill each input data nvtx std::cout << "Reading data nvtx: " << filename.Data() << std::endl; treeData->Draw("nvtx>>tmpnvtxData"); // add input data hist to total data hist fOutDataNvtx->Add(tmpnvtxData); //tmpnvtxData->Draw(); //fOutDataNvtx->Draw(); fOutDataNvtx->Print(); // delete objects delete tmpnvtxData; delete treeData; delete fileData; // get vtx distribution for mc second // files + trees for mc + tmp hists filename = Form("%s%s.root",fInDir.Data(),fMCName.Data()); TFile * fileMC = TFile::Open(filename.Data()); CheckValidFile(fileMC,filename); TTree * treeMC = (TTree*)fileMC->Get("DiPhotonTree"); CheckValidTree(treeMC,"DiPhotonTree",filename); TH1D * tmpnvtxMC = new TH1D("tmpnvtxMC","",fNBins,fMin,fMax); tmpnvtxMC->Sumw2(); // fill each input mc nvtx std::cout << "Reading MC nvtx: " << filename.Data() << std::endl; treeMC->Draw("nvtx>>tmpnvtxMC"); // add input mc hist to total mc hist fOutMCNvtx->Add(tmpnvtxMC); fOutMCNvtx->Print(); // delete objects delete tmpnvtxMC; delete treeMC; delete fileMC; // Set line colors fOutDataNvtx->SetLineColor(kRed); fOutMCNvtx->SetLineColor(kBlue); // use these for scaling and rescaling const Double_t int_DataNvtx = fOutDataNvtx->Integral(); const Double_t int_MCNvtx = fOutMCNvtx->Integral(); //std::cout << "DataNvtx = " << int_DataNvtx << " MCNvtx = " << int_MCNvtx << std::endl; TCanvas * c0 = new TCanvas(); // Draw before reweighting --> unscaled c0->cd(); c0->SetTitle("Before PU Reweighting Unnormalized"); // draw and save in output directory --> appended by what selection we used for this pu reweight fOutDataNvtx->Draw("PE"); fOutMCNvtx->Draw("HIST SAME"); CMSLumi(c0,0,fLumi); c0->SetLogy(1); // save log c0->SaveAs(Form("%snvtx_%s_beforePURW_unnorm_log.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); c0->SetLogy(0); // save lin c0->SaveAs(Form("%snvtx_%s_beforePURW_unnorm.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); ///////////////////////////////////////////// // SCALE HERE TO GET REWEIGHTING // ///////////////////////////////////////////// // scale to unit area to not bias against data fOutDataNvtx->Scale(1.0/int_DataNvtx); fOutMCNvtx->Scale(1.0/int_MCNvtx); // Draw before reweighting -- scaled TCanvas * c1 = new TCanvas(); c1->cd(); c1->SetTitle("Before PU Reweighting Normalized"); // draw and save in output directory --> appended by what selection we used for this pu reweight fOutDataNvtx->Draw("PE"); fOutMCNvtx->Draw("HIST SAME"); CMSLumi(c1,0,fLumi); c1->SetLogy(1); // save log c1->SaveAs(Form("%snvtx_%s_beforePURW_norm_log.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); c1->SetLogy(0); // save lin c1->SaveAs(Form("%snvtx_%s_beforePURW_norm.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); ///////////////////////////////////////////// // DIVIDE HERE TO GET REWEIGHTING // ///////////////////////////////////////////// // copy fOutDataNvtx to save output of reweights properly for (Int_t ibin = 1; ibin <= fNBins; ibin++) { fOutDataOverMCNvtx->SetBinContent(ibin,fOutDataNvtx->GetBinContent(ibin)); } // divide Data/MC after copy, now this original hist will be used for reweighting fOutDataOverMCNvtx->Divide(fOutMCNvtx); ///////////////////////////////////////////// // STORE HERE TO USE REWEIGHTING // ///////////////////////////////////////////// // push back reweights and then scale MC to demonstrate that it works for (Int_t ibin = 1; ibin <= fNBins; ibin++) { // push back reweights puweights.push_back(fOutDataOverMCNvtx->GetBinContent(ibin)); // scale MC appropriately Double_t tmp = fOutMCNvtx->GetBinContent(ibin); fOutMCNvtx->SetBinContent(ibin,puweights[ibin-1]*tmp); } fOutFile->cd(); fOutDataOverMCNvtx->Write(); TCanvas * c = new TCanvas(); fOutDataOverMCNvtx->Draw("PE"); CMSLumi(c,0,fLumi); c->SetLogy(1); c->SaveAs(Form("%spurw_%s_log.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); c->SetLogy(0); c->SaveAs(Form("%spurw_%s.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); // Draw after reweighting TCanvas * c2 = new TCanvas(); c2->cd(); c2->SetTitle("After PU Reweighting Normalized"); // draw output and save it, see comment above about selection fOutDataNvtx->Draw("PE"); fOutMCNvtx->Draw("HIST SAME"); CMSLumi(c2,0,fLumi); c2->SetLogy(1); // save log c2->SaveAs(Form("%snvtx_%s_afterPURW_norm_log.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); c2->SetLogy(0); // save lin c2->SaveAs(Form("%snvtx_%s_afterPURW_norm.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); TCanvas * c3 = new TCanvas(); // Draw before reweighting --> unscaled c3->cd(); c3->SetTitle("After PU Reweighting Unnormalized"); // now that the reweighting is applied, see total events again fOutDataNvtx->Scale(int_DataNvtx); fOutMCNvtx->Scale(int_MCNvtx); fOutDataNvtx->Draw("PE"); fOutMCNvtx->Draw("HIST SAME"); CMSLumi(c3,0,fLumi); c3->SetLogy(1); // save log c3->SaveAs(Form("%snvtx_%s_afterPURW_unnorm_log.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); c3->SetLogy(0); // save lin c3->SaveAs(Form("%snvtx_%s_afterPURW_unnorm.%s",fOutDir.Data(),fMCName.Data(),fOutType.Data())); delete c0; delete c1; delete c2; delete c3; return puweights; }
[ "mez34@cornell.edu" ]
mez34@cornell.edu
d2799c1d768695c8806e5161343dbcc0d2f778f0
078d16366463370cc74caea92f9b35e43d9870be
/Module 3/part3-cute_measures/usecases/uc_broadcaster_publishes_sensor_readings/broadcaster_publishes_sensor_readings.h
c256074df44c4af3a904d55b52ac4fb9d3a4d515
[ "MIT" ]
permissive
PacktPublishing/End-to-End-GUI-development-with-Qt5
6cac1289c6b03dbc94435d9c4ee971d7b71049b4
8ac713da23aac4b305b12ee1ef6ec60362bcd391
refs/heads/master
2023-02-03T09:16:34.581304
2023-01-30T09:56:23
2023-01-30T09:56:23
138,880,448
26
10
null
null
null
null
UTF-8
C++
false
false
399
h
// broadcaster_publishes_sensor_readings.h #ifndef BROADCASTER_PUBLISHES_SENSOR_READINGS_H #define BROADCASTER_PUBLISHES_SENSOR_READINGS_H //#include <QDebug> namespace entities { class Sensor; class Broadcaster; } namespace usecases { bool broadcaster_publishes_sensor_readings(entities::Broadcaster& broadcaster, entities::Sensor& sensor); } #endif // BROADCASTER_PUBLISHES_SENSOR_READINGS_H
[ "35489117+gaurav-packt@users.noreply.github.com" ]
35489117+gaurav-packt@users.noreply.github.com
696cdd218ae5a086d67eecd5855d90b5e9a0baed
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/squid/gumtree/squid_new_hunk_1137.cpp
c048007cf7b72362cee5b15d4869c81e29776bb9
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
973
cpp
#endif debugs(0, DBG_IMPORTANT, "Rotate log file " << lf->path); /* Rotate numbers 0 through N up one */ for (int16_t i = nRotate; i > 1;) { --i; snprintf(from, MAXPATHLEN, "%s.%d", realpath, i - 1); snprintf(to, MAXPATHLEN, "%s.%d", realpath, i); xrename(from, to); } /* Rotate the current log to .0 */ logfileFlush(lf); file_close(ll->fd); /* always close */ if (nRotate > 0) { snprintf(to, MAXPATHLEN, "%s.%d", realpath, 0); xrename(realpath, to); } /* Reopen the log. It may have been renamed "manually" */ ll->fd = file_open(realpath, O_WRONLY | O_CREAT | O_TEXT); if (DISK_ERROR == ll->fd && lf->flags.fatal) { int xerrno = errno; debugs(50, DBG_CRITICAL, MYNAME << "ERROR: " << lf->path << ": " << xstrerr(xerrno)); fatalf("Cannot open %s: %s", lf->path, xstrerr(xerrno)); } } static void logfile_mod_stdio_close(Logfile * lf) {
[ "993273596@qq.com" ]
993273596@qq.com
ba7cfa5d9d25fdd901bac35863af4c0aca5a7430
4ccf7aa23ae97ce06ebbea5ecb311d9e5604d28a
/unfinished/mainD.cpp
310e4698069a68759500abb16135315c1f4865ff
[ "LicenseRef-scancode-other-permissive", "MIT" ]
permissive
TieWay59/HappyACEveryday
25682d30aafed3a51f645562fb7e5348e9515417
6474a05a9eafc83e9c185ba8e6d716f7d44eade0
refs/heads/master
2021-08-22T21:29:31.138853
2021-06-16T04:19:14
2021-06-16T04:19:14
190,430,779
3
1
null
null
null
null
UTF-8
C++
false
false
1,615
cpp
/* * https://nanti.jisuanke.com/t/41402 * */ //#include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <vector> #include <string.h> #include <tuple> #define _debug(x) cerr<<#x<<" = "<<x<<endl using namespace std; typedef long long ll; const int MAXN = 2e3 + 59; const int MAXM = 2e5 + 59; const ll MOD = 998244353; const ll INF = 0x0f0f0f0f; int kase; int n, m; // 1 6 12 40 int main() { // ios_base::sync_with_stdio(false); // cin.tie(nullptr); scanf("%d", &n); ll ans = 0; for (ll i = 1; i <= n; ++i) { for (ll j = 1; j <= n; ++j) { for (ll k = 1; k <= n; ++k) { for (ll l = 1; l <= n; ++l) { for (ll i1 = 1; i1 <= n; ++i1) { for (int k1 = 1; k1 <= n; ++k1) { for (int l1 = 1; l1 <= n; ++l1) { for (int m1 = 1; m1 <= n; ++m1) { if (i + j + k + l + i1 + k1 + l1 + m1 == i * j * k * l * i1 * k1 * l1 * m1) { // _debug(i); // _debug(j); // _debug(k); // _debug(l); // _debug(i1); // cerr << "===================" << endl; ans++; } } } } } } } } } printf("%lld\n", ans); return 0; }
[ "tieway59@foxmail.com" ]
tieway59@foxmail.com
5915aa2637c42c4f8e0c1b49a9524cc4d2545745
e5922a33275ce4f56aa2679c0f6b318b4a960831
/leetcode/NoTest/NO-62.cpp
538a2b8b9b06c65915db5781d0b1d1fc6c0667e2
[]
no_license
shengzhemi/MyPratice
d4d03d8d865b1642ab5b5a02d316b290dfc5a56d
013fda7928d4ffd933e0ba3fd7396a008a3b85e3
refs/heads/master
2021-05-14T19:42:27.311792
2020-09-02T23:01:23
2020-09-02T23:01:23
115,431,823
0
0
null
null
null
null
UTF-8
C++
false
false
439
cpp
class Solution { public: int uniquePaths(int m, int n) { if (m == 0 || n == 0) { return 0; } int a[101] = {0}; a[1] = 1; for (int i = 1; i <= m; i++) { int last = 0; for (int j = 1; j <= n; j++) { int current = last + a[j]; last = current; a[j] = current; } } return a[n]; } };
[ "shengzhemi@foxmail.com" ]
shengzhemi@foxmail.com
d65424ec0226ae76f8e8256057106525623277a7
73851f9774cb398915b9351433fe13d52de1269d
/tests/vtm/FixedSizeMemoryManagerTest.cpp
7529e1d17352aa53cd022a043c9b0421977973f0
[ "Apache-2.0" ]
permissive
mvoronoy/OP.MagicTrie
9aa980de539f6b51da58e920cb6a36ecee163755
33ce736d9e68e927eaa4adc0553836036b076e64
refs/heads/main
2023-06-24T03:50:53.133460
2023-06-15T19:16:22
2023-06-15T19:16:22
41,084,715
0
0
null
null
null
null
UTF-8
C++
false
false
9,627
cpp
#include <op/utest/unit_test.h> #include <op/utest/unit_test_is.h> #include <op/trie/Trie.h> #include <op/vtm/SegmentManager.h> #include <op/vtm/CacheManager.h> #include <op/vtm/EventSourcingSegmentManager.h> #include <set> #include <cassert> #include <iterator> using namespace OP::trie; using namespace OP::utest; static const char *node_file_name = "FixedSizeMemoryManager.test"; static OP_CONSTEXPR(const) unsigned test_nodes_count_c = 101; template <class FixedSizeMemoryManager, class SegmentTopology> void test_Generic(OP::utest::TestRuntime &tresult, SegmentTopology& topology) { auto &mngr = topology.OP_TEMPL_METH(slot)<FixedSizeMemoryManager>(); auto b100 = mngr.allocate(); mngr.deallocate(b100); tresult.assert_true(topology.segment_manager().available_segments() == 1); topology._check_integrity(); std::vector<FarAddress> allocated_addrs(test_nodes_count_c); //exhaust all nodes in single segment and check new segment allocation for (auto i = 0; i < test_nodes_count_c; ++i) { OP::vtm::TransactionGuard op_g(topology.segment_manager().begin_transaction()); auto pos = mngr.allocate(); auto &wr = *topology.segment_manager().template wr_at<typename FixedSizeMemoryManager::payload_t>(pos); tresult.assert_true(wr.inc == 57); wr.inc += i; op_g.commit(); allocated_addrs[i] = pos; if ((i + 1) < test_nodes_count_c) { tresult.assert_true( topology.segment_manager().available_segments() == 1, OP_CODE_DETAILS(<< "There must be single segment")); } } //as soon FixedSizeMemoryManager contains ThreadPool folowing line became probabilistic //tresult.assert_true(topology.segment_manager().available_segments() == 1, // OP_CODE_DETAILS(<<"There must be single segment")); mngr.allocate(); tresult.assert_true(topology.segment_manager().available_segments() == 2, OP_CODE_DETAILS(<<"New segment must be allocated")); //test all values kept correct value for (auto i = 0; i < test_nodes_count_c; ++i) { auto to_test = view<typename FixedSizeMemoryManager::payload_t>(topology, allocated_addrs[i]); tresult.assert_true(i + 57 == to_test->inc, "Invalid value stored"); } topology._check_integrity(); // now free all in random order and exhaust again std::random_device rd; std::mt19937 g(rd()); std::shuffle(allocated_addrs.begin(), allocated_addrs.end(), g); for (const auto& addr : allocated_addrs) { mngr.deallocate(addr); } allocated_addrs.clear(); topology._check_integrity(); for (auto i = 0; i < 2*test_nodes_count_c; ++i) { OP::vtm::TransactionGuard op_g(topology.segment_manager().begin_transaction()); auto pos = mngr.allocate(); auto& wr = *topology.segment_manager().template wr_at<typename FixedSizeMemoryManager::payload_t>(pos); tresult.assert_true(wr.inc == 57); wr.inc += i; op_g.commit(); allocated_addrs.push_back(pos); if ((i + 2) < 2 * test_nodes_count_c) { tresult.assert_true(topology.segment_manager().available_segments() == 2, OP_CODE_DETAILS(<< "No new segments must be allocated")); } } //test all values kept correct value for (auto i = 0; i < 2 * test_nodes_count_c; ++i) { auto to_test = view<typename FixedSizeMemoryManager::payload_t>(topology, allocated_addrs[i]); tresult.assert_true(i + 57 == to_test->inc, "Invalid value stored"); } } void test_NodeManager(OP::utest::TestRuntime &tresult) { struct TestPayload {/*The size of Payload selected to be bigger than FixedSizeMemoryManager::ZeroHeader */ TestPayload() { v1 = 0; inc = 57; v2 = 3.; } std::uint64_t v1; std::uint32_t inc; double v2; }; typedef FixedSizeMemoryManager<TestPayload, test_nodes_count_c> test_node_manager_t; auto tmngr1 = OP::trie::SegmentManager::OP_TEMPL_METH(create_new)<EventSourcingSegmentManager>( node_file_name, OP::trie::SegmentOptions() .segment_size(0x110000)); SegmentTopology<test_node_manager_t> mngrToplogy (tmngr1); test_Generic<test_node_manager_t>(tresult, mngrToplogy); } void test_Multialloc(OP::utest::TestRuntime& tresult) { struct TestPayload { TestPayload() = delete; TestPayload( double ax1, char ac1, int an1) : x1(ax1), c1(ac1), n1(an1) {} TestPayload(const TestPayload&) = default; double x1; char c1; int n1; }; typedef FixedSizeMemoryManager<TestPayload, test_nodes_count_c> test_node_manager_t; auto tmngr1 = OP::trie::SegmentManager::OP_TEMPL_METH(create_new) < EventSourcingSegmentManager > (node_file_name, OP::trie::SegmentOptions() .segment_size(0x110000)); SegmentTopology<test_node_manager_t> mngrToplogy(tmngr1); auto &fmm = mngrToplogy.OP_TEMPL_METH(slot)< test_node_manager_t >(); TestPayload generation(5.7, 'a', 11); OP::vtm::TransactionGuard op_g(mngrToplogy.segment_manager().begin_transaction()); constexpr size_t N = 10; constexpr size_t const buf_size_c = test_nodes_count_c / N; FarAddress result[buf_size_c]; fmm.allocate_n(result, std::extent_v<decltype(result)>, [&](size_t i, auto* p) { return new (p) TestPayload{ generation }; }); op_g.commit(); for (auto i = 0; i < std::extent_v<decltype(result)>; ++i) { auto to_test = view<TestPayload>(mngrToplogy, result[i]); tresult.assert_that<equals>(to_test->c1, generation.c1); tresult.assert_that<equals>(to_test->n1, generation.n1); tresult.assert_that<equals>(to_test->x1, generation.x1); } mngrToplogy._check_integrity(); for (auto p = std::begin(result); p != std::end(result); ++p) { fmm.deallocate(*p); } mngrToplogy._check_integrity(); tresult.assert_that<equals>(1, mngrToplogy.segment_manager().available_segments(), OP_CODE_DETAILS(<<"There must be single segment")); auto usage = fmm.usage_info(); tresult.assert_that<equals>(0, usage.first, OP_CODE_DETAILS(<< "All must be free")); tresult.assert_that<equals>(test_nodes_count_c, usage.second, OP_CODE_DETAILS(<< "Free count must be:" << test_nodes_count_c)); FarAddress single; fmm.allocate_n(&single, 0, [&](size_t i, auto* ) { tresult.fail("Lambda must not be called for 0-size"); }); tresult.assert_that<equals>(single, FarAddress{}); usage = fmm.usage_info(); tresult.assert_that<equals>(0, usage.first, OP_CODE_DETAILS(<< "All must be free")); tresult.assert_that<equals>(test_nodes_count_c, usage.second, OP_CODE_DETAILS(<< "Free count must be:" << test_nodes_count_c)); generation.c1++, generation.n1++, generation.x1++; std::vector<FarAddress> buffer; //as soon as test_nodes_count_c is odd runing allocate_n several times //going to surpass the segment threshold for (size_t i = 0, blsz = 1; i < N+N/2; ++i, ++blsz) { buffer.resize(buffer.size() + blsz); auto beg = buffer.end() - blsz; fmm.allocate_n(&*beg, blsz, [&](size_t i, auto* ptr) { return new (ptr) TestPayload(generation); }); for (; beg != buffer.end(); ++beg) { auto to_test = view<TestPayload>(mngrToplogy, *beg); tresult.assert_that<equals>(to_test->c1, generation.c1); tresult.assert_that<equals>(to_test->n1, generation.n1); tresult.assert_that<equals>(to_test->x1, generation.x1); } } mngrToplogy._check_integrity(); tresult.assert_that<equals>(2, mngrToplogy.segment_manager().available_segments(), OP_CODE_DETAILS(<< "There must be one more segment")); for (const auto& addr : buffer) { fmm.deallocate(addr); } mngrToplogy._check_integrity(); usage = fmm.usage_info(); tresult.assert_that<equals>(0, usage.first, OP_CODE_DETAILS(<< "All must be free")); tresult.assert_that<equals>(2 * test_nodes_count_c, usage.second, OP_CODE_DETAILS(<< "Free count must be:" << test_nodes_count_c)); } void test_NodeManagerSmallPayload(OP::utest::TestRuntime &tresult) { struct TestPayloadSmall {/*The size of Payload selected to be smaller than FixedSizeMemoryManager::ZeroHeader */ TestPayloadSmall() { inc = 57; } std::uint32_t inc; }; //The size of payload smaller than FixedSizeMemoryManager::ZeroHeader typedef FixedSizeMemoryManager<TestPayloadSmall, test_nodes_count_c> test_node_manager_t; auto tmngr1 = OP::trie::SegmentManager::create_new<EventSourcingSegmentManager>(node_file_name, OP::trie::SegmentOptions() .segment_size(0x110000)); SegmentTopology<test_node_manager_t> mngrToplogy (tmngr1); test_Generic<test_node_manager_t>(tresult, mngrToplogy); } static auto& module_suite = OP::utest::default_test_suite("FixedSizeMemoryManager") .declare("general", test_NodeManager) .declare("multialloc", test_Multialloc) .declare("small-payload", test_NodeManagerSmallPayload) ;
[ "mvoronoy@gmail.com" ]
mvoronoy@gmail.com
1bd3de6ac3851eeb065847b86c10ed69716f9a31
c40b3a302218d020820f5d557e3f21e6b09a9974
/src/components/MCWiFi/MCWiFi.cpp
4231a5aad33c00bf228e3d7774408da6df5342f9
[]
no_license
manugildev/modular-cubes-embedded
f231aa55ec31c74b28ec20ff5899aaa35e7c2086
29eeb15bc633ff3e8a47503520978e8a500abeac
refs/heads/master
2021-03-19T17:28:20.078397
2019-11-05T22:29:26
2019-11-05T22:29:26
85,623,916
0
0
null
null
null
null
UTF-8
C++
false
false
5,990
cpp
#include <ESP8266WiFi.h> #include <components/MCWiFi/MCWiFi.h> #include <configuration/Configuration.h> #include <data/ModularCube.h> void MCWiFi::setup() { pinMode(2, OUTPUT); // Just to blink whenever is connecting maxDevicesPerAP = 4; String mssid = String(String(CUBES_WIFI_SSID) + "_M"); String wifiName = generateSSID(); String connectTo = getConnectTo(wifiName); if (wifiName == mssid) { createWiFiAP(wifiName.c_str()); Cube.setMaster(true); if (connectToWiFi(connectTo.c_str(), WIFI_PASSWORD, 10000)) Cube.setWlan(connectTo); WiFi.mode(WIFI_AP_STA); IPAddress ip = WiFi.softAPIP(); Cube.setLocalIP(String(ip[3])); } else { if (connectToWiFi(connectTo.c_str(), "", 10000)) Cube.setWlan(connectTo); WiFi.mode(WIFI_STA); IPAddress ip = WiFi.localIP(); Cube.setLocalIP(String(ip[3])); } Cube.setAPName(wifiName); Cube.setConnectionMode(WiFi.getMode()); } void MCWiFi::loop() { if (!WiFi.isConnected()) { Serial.println("Disconnected: Rebooting..."); Cube.reboot(); } } // Connect to any wifi bool MCWiFi::connectToWiFi(const char *ssid, const char *pass, int wait) { WiFi.begin(ssid, pass); Serial.printf("\nConnecting to %s ", ssid); int tries = 0; int maxTries = (wait / 100) + 1; // We try to connect for X times, if it doesn't work we just stop while (tries < maxTries) { if (WiFi.status() != WL_CONNECTED) { Serial.print("."); digitalWrite(2, LOW); delay(50); digitalWrite(2, HIGH); delay(50); tries++; } else if (WiFi.status() == WL_CONNECTED) { Serial.printf("\nConnected to %s\n", ssid); Serial.print("Local IP: "); Serial.println(WiFi.localIP()); return true; } else if (WiFi.status() == WL_CONNECT_FAILED) { digitalWrite(2, LOW); Serial.printf("\nConnection to %s failed.\n", ssid); } } digitalWrite(2, LOW); Serial.printf("\nConnection to %s failed.\n", ssid); return false; } // Checks if the wifi passed in the parameters exist, returns true or false bool MCWiFi::checkIfWiFiExists(const char *ssid, int wait) { Serial.printf("Trying to find %s...\n", ssid); int tries = 0; int maxTries = (wait / 10) + 1; // We set the WiFi to Station Mode and Disconnect from any other WiFi WiFi.mode(WIFI_STA); WiFi.disconnect(); while (tries < maxTries) { int n = WiFi.scanNetworks(); Serial.printf("%i - %i network(s) found. ", tries, n); for (int i = 0; i < n; i++) { if (WiFi.SSID(i) == ssid) { return true; } } Serial.printf("%s Not found.\n", ssid); delay(10); tries++; } Serial.printf("After %i tries %s could not be found.\n", tries, ssid); return false; } // Creates WiFi Hotspot bool MCWiFi::createWiFiAP(const char *ssid, const char *pass) { Serial.printf("Starting Access Point: %s\n", ssid); WiFi.softAP(ssid, pass); String ip = WiFi.softAPIP().toString(); Serial.printf("AP IP adress: %s", ip.c_str()); } // Algorithm that generates an ssid name for the current cube based on the cubes // that are already around String MCWiFi::generateSSID() { const char *mssid = String(String(CUBES_WIFI_SSID) + "_M").c_str(); String smssid = String(String(CUBES_WIFI_SSID) + "_M"); if (!checkIfWiFiExists(mssid)) { Cube.setMaster(true); return mssid; } else { WiFi.mode(WIFI_STA); WiFi.disconnect(); int n = WiFi.scanNetworks(); int maxNumber = 0; Serial.printf("%i network(s) found. \n", n); // This bucle should return the maximum index of the network for (int i = 0; i < n; i++) { String curr_ssid = WiFi.SSID(i); if (curr_ssid.startsWith(CUBES_WIFI_SSID) && curr_ssid != smssid) { int number = curr_ssid.substring(curr_ssid.indexOf("_") + 1).toInt(); Serial.printf("Number found %i\n", number); if (number > maxNumber) { maxNumber = number; } } } String previous = ""; if (maxNumber == 0) { return String(String(CUBES_WIFI_SSID) + "_0001"); } else { char buffer[4] = ""; sprintf(buffer, "%04d", maxNumber); previous = buffer; } // Generate the SSID based on the number String nT = previous; char nA[nT.length() + 1]; strcpy(nA, nT.c_str()); // Reverse to work with it const size_t len = strlen(nA); for (size_t i = 0; i < len / 2; i++) std::swap(nA[i], nA[len - i - 1]); // TODO: Make this so it can fill the gaps for (int i = 0; i < strlen(nA); i++) { int tN = nA[i] - '0'; // Convert char to int if (tN >= maxDevicesPerAP) { nA[i] = '1'; } else { nA[i] = (tN + 1) + '0'; break; } } previous = String(nA); // Reverse the string to return final string for (size_t i = 0; i < len / 2; i++) std::swap(nA[i], nA[len - i - 1]); String next = String(nA); return String(String(CUBES_WIFI_SSID) + "_" + next); } } // Gets the name of the network this cube should be connecting to, based on the // name that the generateSSID algorithm generated String MCWiFi::getConnectTo(String apssid) { String mssid = String(String(CUBES_WIFI_SSID) + "_M"); if (apssid == mssid) { return WIFI_SSID; } else { int start = apssid.indexOf("_") + 1; int end = apssid.length(); int number = apssid.substring(start, end).toInt(); // If the nodes are primary if (number > 0 && number <= maxDevicesPerAP) return mssid; // If the nodes are not primary char buffer[4] = ""; String snum = String(number); int finalNum = snum.substring(0, snum.length() - 1).toInt(); sprintf(buffer, "%04d", finalNum); return String(String(CUBES_WIFI_SSID) + "_" + buffer); } } String MCWiFi::ipAdressToString(const IPAddress &ipAddress) { return String(ipAddress[0]) + String(".") + String(ipAddress[1]) + String(".") + String(ipAddress[2]) + String(".") + String(ipAddress[3]); } MCWiFi MC_WiFi;
[ "madtriangl3@gmail.com" ]
madtriangl3@gmail.com
8ed4dc0fd5e2250127107b02ea8ad7f61aa48699
7a6e2a3492b6e237a70b12d75fd05b7a77472af3
/cplus/expression/prac_4.32.cpp
a8e900cd19721847e4ef7839df673ce4aa04a29f
[]
no_license
timtingwei/prac
e44b7e4634a931d36ed7e09770447f5dba5f25e6
ae77fa781934226ab1e22d6aba6dba152dd15bfe
refs/heads/master
2020-05-21T17:53:07.144037
2017-10-10T14:55:52
2017-10-10T14:55:52
63,440,125
3
0
null
null
null
null
GB18030
C++
false
false
643
cpp
#include <iostream> #include <vector> #include <string> using std::cin; using std::cout; using std::endl; using std::vector; using std::string; int prac_432() { //解释下面循环含义 constexpr int size = 5; int ia[size] = { 1,2,3,4,5 }; //初始化 指针ptr指向数组ia的首元素,ix初始化为0;当ix值和size相等或 ptr指向尾元素的后一位,循环停止;每进行一次循环,ix+1,ptr+1,表达式返回+1后的ptr for (int *ptr = ia, ix = 0; ix != size && ptr != ia + size; ++ix, ++ptr) cout << ix << " " << (*ptr) << endl; /* 输出: 0 1 1 2 2 3 3 4 4 5 */ system("pause"); return 0; }
[ "timtingwei@hotmail.com" ]
timtingwei@hotmail.com
67c0045d1c4b394eebddcfe121f785cea2a2abe2
d4f6dc94f10e4e0f230be917160d0e850f5ba86f
/server/base/test/ThreadPool_test.cc
586efa6a6737f677c9a42adaff2d25a113470348
[]
no_license
zxm1990/TcpServer
10ff877e898bfdea8d60d368edac809a8fe9afd5
cdc7007132d8c896b57ae31291fc9321eafc4494
refs/heads/master
2021-01-13T17:13:11.327049
2017-05-14T01:09:15
2017-05-14T01:09:15
81,882,115
0
1
null
null
null
null
UTF-8
C++
false
false
1,161
cc
#include <server/base/ThreadPool.h> #include <server/base/CountDownLatch.h> #include <server/base/CurrentThread.h> #include <server/base/Logging.h> #include <boost/bind.hpp> #include <stdio.h> void print() { printf("tid=%d\n", server::CurrentThread::tid()); } void printString(const std::string& str) { LOG_INFO << str; usleep(100*1000); } void test(int maxSize) { LOG_WARN << "Test ThreadPool with max queue size = " << maxSize; server::ThreadPool pool("MainThreadPool"); pool.setMaxQueueSize(maxSize); //创建5个线程的线程池 pool.start(5); LOG_WARN << "Adding"; pool.run(print); pool.run(print); for (int i = 0; i < 100; ++i) { char buf[32]; snprintf(buf, sizeof buf, "task %d", i); pool.run(boost::bind(printString, std::string(buf))); } LOG_WARN << "Done"; server::CountDownLatch latch(1); pool.run(boost::bind(&server::CountDownLatch::countDown, &latch)); latch.wait(); pool.stop(); } int main() { //server::Logger loger(__FILE__, __LINE__, server::Logger::TRACE, __func__); //loger.setLogLevel(server::Logger::TRACE); //test(0); //test(1); test(5); //test(10); //test(50); }
[ "hejunjian2012@163.com" ]
hejunjian2012@163.com
d6fa3666291e0e016324b03180fa0fb608a6cc21
d6a05971f3a5b3ce7ea7b278d100985437b83e31
/runtime/src/launcher/cpp/androidLauncher.cpp
aa40c34cb02aae3cedb84ac7e10bd377dffcdd0b
[ "Apache-2.0" ]
permissive
ftomassetti/kotlin-native
66d52a402b3a8a433e932d1ffca0edf969ecf4d6
f04827cd573792a70a0bea0f4d839ac4c50e42e5
refs/heads/master
2021-01-25T00:48:36.181450
2017-06-13T09:52:30
2017-06-17T18:23:08
94,693,619
0
0
null
2017-06-18T14:49:59
2017-06-18T14:49:59
null
UTF-8
C++
false
false
6,701
cpp
/* * Copyright 2010-2017 JetBrains s.r.o. * * 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 "Memory.h" #include "Natives.h" #include "Runtime.h" #include "KString.h" #include "Types.h" #ifdef KONAN_ANDROID #include <unistd.h> #include <pthread.h> #include <sys/types.h> #include <sys/socket.h> #include "androidLauncher.h" #include <android/log.h> #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "Konan_main", __VA_ARGS__)) #define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, "Konan_main", __VA_ARGS__)) /* For debug builds, always enable the debug traces in this library */ #ifndef NDEBUG # define LOGV(...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, "Konan_main", __VA_ARGS__)) #else # define LOGV(...) ((void)0) #endif //--- main --------------------------------------------------------------------// extern "C" KInt Konan_start(const ObjHeader*); namespace { int pipeC, pipeKonan; NativeActivityState nativeActivityState; } extern "C" void getNativeActivityState(NativeActivityState* state) { state->activity = nativeActivityState.activity; state->savedState = nativeActivityState.savedState; state->savedStateSize = nativeActivityState.savedStateSize; state->looper = nativeActivityState.looper; } extern "C" void notifySysEventProcessed() { int8_t message; write(pipeKonan, &message, sizeof(message)); } namespace { void* entry(void* param) { ALooper* looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS); ALooper_addFd(looper, pipeKonan, LOOPER_ID_SYS, ALOOPER_EVENT_INPUT, NULL, NULL); nativeActivityState.looper = looper; RuntimeState* state = InitRuntime(); if (state == nullptr) { LOGE("Unable to init runtime\n"); return nullptr; } KInt exitStatus; { ObjHolder args; AllocArrayInstance(theArrayTypeInfo, 0, args.slot()); exitStatus = Konan_start(args.obj()); } DeinitRuntime(state); return nullptr; } void runKonan_start() { int pipes[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, pipes)) { LOGE("Could not create pipe: %s", strerror(errno)); return; } pipeC = pipes[0]; pipeKonan = pipes[1]; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_t thread; pthread_create(&thread, &attr, entry, nullptr); } void putEventSynchronously(void* event) { uint64_t value = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(event)); if (write(pipeC, &value, sizeof(value)) != sizeof(value)) { LOGE("Failure writing event: %s\n", strerror(errno)); } int8_t response; if (read(pipeC, &response, sizeof(response)) != sizeof(response)) { LOGE("Failure reading response: %s\n", strerror(errno)); } } void onDestroy(ANativeActivity* activity) { LOGV("onDestroy called"); NativeActivityEvent event = { DESTROY }; putEventSynchronously(&event); } void onStart(ANativeActivity* activity) { LOGV("onStart called"); NativeActivityEvent event = { START }; putEventSynchronously(&event); } void onResume(ANativeActivity* activity) { LOGV("onResume called"); NativeActivitySaveStateEvent event = { RESUME }; putEventSynchronously(&event); } void* onSaveInstanceState(ANativeActivity* activity, size_t* outLen) { LOGV("onSaveInstanceState called"); NativeActivitySaveStateEvent event = { SAVE_INSTANCE_STATE }; putEventSynchronously(&event); *outLen = event.savedStateSize; return event.savedState; } void onPause(ANativeActivity* activity) { LOGV("onPause called"); NativeActivityEvent event = { PAUSE }; putEventSynchronously(&event); } void onStop(ANativeActivity* activity) { LOGV("onStop called"); NativeActivityEvent event = { STOP }; putEventSynchronously(&event); } void onConfigurationChanged(ANativeActivity* activity) { LOGV("onConfigurationChanged called"); NativeActivityEvent event = { CONFIGURATION_CHANGED }; putEventSynchronously(&event); } void onLowMemory(ANativeActivity* activity) { LOGV("onLowMemory called"); NativeActivityEvent event = { LOW_MEMORY }; putEventSynchronously(&event); } void onWindowFocusChanged(ANativeActivity* activity, int focused) { LOGV("onWindowFocusChanged called"); NativeActivityEvent event = { focused ? WINDOW_GAINED_FOCUS : WINDOW_LOST_FOCUS }; putEventSynchronously(&event); } void onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window) { LOGV("onNativeWindowCreated called"); NativeActivityWindowEvent event = { NATIVE_WINDOW_CREATED, window }; putEventSynchronously(&event); } void onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* window) { LOGV("onNativeWindowDestroyed called"); NativeActivityWindowEvent event = { NATIVE_WINDOW_DESTROYED, window }; putEventSynchronously(&event); } void onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue) { LOGV("onInputQueueCreated called"); NativeActivityQueueEvent event = { INPUT_QUEUE_CREATED, queue }; putEventSynchronously(&event); } void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) { LOGV("onInputQueueDestroyed called"); NativeActivityQueueEvent event = { INPUT_QUEUE_DESTROYED, queue }; putEventSynchronously(&event); } } extern "C" void Konan_main(ANativeActivity* activity, void* savedState, size_t savedStateSize) { nativeActivityState = {activity, savedState, savedStateSize}; activity->callbacks->onDestroy = onDestroy; activity->callbacks->onStart = onStart; activity->callbacks->onResume = onResume; activity->callbacks->onSaveInstanceState = onSaveInstanceState; activity->callbacks->onPause = onPause; activity->callbacks->onStop = onStop; activity->callbacks->onConfigurationChanged = onConfigurationChanged; activity->callbacks->onLowMemory = onLowMemory; activity->callbacks->onWindowFocusChanged = onWindowFocusChanged; activity->callbacks->onNativeWindowCreated = onNativeWindowCreated; activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed; activity->callbacks->onInputQueueCreated = onInputQueueCreated; activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed; runKonan_start(); } #endif // KONAN_ANDROID
[ "igor.chevdar@jetbrains.com" ]
igor.chevdar@jetbrains.com
4b6fbb07ec672fab32c56c91f5f2086887e49315
6f26f3bfea63412ff871883c6e8ad4308e31fa91
/Character/Player.h
22d0b191a7810b923500b1651b0ad809526ab6fa
[]
no_license
Turupawn/STGD
6820abfc8a535ef0cc36dee2ad671134c2f93d7a
ba8c2bfd84776515f42bdf3ca4bb1323d57bef25
refs/heads/master
2020-06-02T04:12:53.083006
2014-04-08T16:01:47
2014-04-08T16:01:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,042
h
#ifndef PLAYER_H #define PLAYER_H #include <map> #include <list> #include <vector> #include "TinyXml/tinyxml.h" #include "RosalilaGraphics/RosalilaGraphics.h" #include "RosalilaSound/RosalilaSound.h" #include "RosalilaInputs/RosalilaInputs.h" #include "../Spells/Bullet.h" #include "../Spells/Pattern.h" #include "Character.h" class Player : public Character { Image*life_bar; //Slow bar variables Image*slow_bar; int slow_decrement; int slow_increment; int slow_cooldown_increment; bool slow_in_cooldown; int slow_bar_x; int slow_bar_y; int slow_bar_rect_offset_x; int slow_bar_rect_offset_y; int slow_bar_rect_height; int slow_bar_rect_width; Color slow_bar_color; Color slow_bar_cooldown_color; public: bool raped; int cont_release_rape; bool unbind_right_press; Player(Sound* sonido,RosalilaGraphics* painter,Receiver* receiver,std::string name); void logic(int stage_velocity); void inputControl(); void render(); void loadPlayerFromXML(); }; #endif
[ "antares_43@hotmail.com" ]
antares_43@hotmail.com
3a69889fd8c967b7ceec98e284c8dd21023f6e3c
0d839be7ab1554d4632a1723afbfb286be6a6601
/main.cpp
46dcda86c858eff92b337393cbfc08c04910cb5f
[]
no_license
arager1/Cards
be220dc75c77acc06987bf4f2d8cdc77ce0bed19
2ec08c55dd138c27aab16957943442a8235e9077
refs/heads/master
2021-07-08T11:42:34.086977
2017-10-04T14:03:17
2017-10-04T14:03:17
105,773,863
0
0
null
null
null
null
UTF-8
C++
false
false
244
cpp
#include "Pokergame.h" #include <iostream> int main(){ Pokergame game; game.addPlayer("Alec", 10000); game.addPlayer("Nick", 10000); game.addPlayer("Danielle", 10000); game.addPlayer("Logan", 10000); game.deal(7); game.print(); }
[ "arager@umich.edu" ]
arager@umich.edu
3b8ee3ccb7d199b7726edb33e821310b545d2bae
0a5f9a707ea8f5e8fe0cc5d0d631dfb9dadcdb90
/CGUITexturedSkin.cpp
114449f10fcdd921f76bf23452d71ad76c535e53
[]
no_license
q4a/dakar2011
8adda624d997fb2d22066bcbd6d799a0604045c7
7f0049d132eac5bb147e860ca33d27bf03dd80c7
refs/heads/master
2021-04-03T20:12:54.458317
2010-12-22T13:01:14
2010-12-22T13:01:14
248,392,928
0
0
null
null
null
null
UTF-8
C++
false
false
29,771
cpp
#include "CGUITexturedSkin.h" using namespace irr; using namespace core; using namespace video; using namespace io; using namespace gui; namespace irr { namespace gui { CGUITexturedSkin::CGUITexturedSkin(IGUIEnvironment * pEnv, irr::io::IFileSystem * ifs) { pGuiEnv = pEnv; pGuiEnv->grab(); pVideo = pEnv->getVideoDriver(); pVideo->grab(); pFileSystem = ifs; pFileSystem->grab(); SpriteBank = 0; pSkinTexture = 0; pSkinImage = 0; IGUIFont* builtinfont = pEnv->getBuiltInFont(); IGUIFontBitmap* bitfont = 0; if (builtinfont && builtinfont->getType() == EGFT_BITMAP) bitfont = (IGUIFontBitmap*)builtinfont; if (bitfont) setSpriteBank( bitfont->getSpriteBank() ); for (u32 i=0; i<EGDF_COUNT; ++i) fonts[i] = 0; colors[EGDC_3D_DARK_SHADOW] = video::SColor(101,50,50,50); colors[EGDC_3D_SHADOW] = video::SColor(101,130,130,130); colors[EGDC_3D_FACE] = video::SColor(101,210,210,210); colors[EGDC_3D_HIGH_LIGHT] = video::SColor(101,255,255,255); colors[EGDC_3D_LIGHT] = video::SColor(101,210,210,210); colors[EGDC_ACTIVE_BORDER] = video::SColor(101,16,14,115); colors[EGDC_ACTIVE_CAPTION] = video::SColor(200,255,255,255); colors[EGDC_APP_WORKSPACE] = video::SColor(101,100,100,100); colors[EGDC_BUTTON_TEXT] = video::SColor(240,10,10,10); colors[EGDC_GRAY_TEXT] = video::SColor(240,130,130,130); colors[EGDC_HIGH_LIGHT] = video::SColor(101,8,36,107); colors[EGDC_HIGH_LIGHT_TEXT] = video::SColor(240,255,255,255); colors[EGDC_INACTIVE_BORDER] = video::SColor(101,165,165,165); colors[EGDC_INACTIVE_CAPTION] = video::SColor(101,210,210,210); colors[EGDC_TOOLTIP] = video::SColor(200,0,0,0); colors[EGDC_TOOLTIP_BACKGROUND]= video::SColor(200,255,255,225); colors[EGDC_SCROLLBAR] = video::SColor(101,230,230,230); colors[EGDC_WINDOW] = video::SColor(101,255,255,255); colors[EGDC_WINDOW_SYMBOL] = video::SColor(200,10,10,10); colors[EGDC_ICON] = video::SColor(200,255,255,255); colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,8,36,107); sizes[EGDS_SCROLLBAR_SIZE] = 14; sizes[EGDS_MENU_HEIGHT] = 30; sizes[EGDS_WINDOW_BUTTON_WIDTH] = 15; sizes[EGDS_CHECK_BOX_WIDTH] = 18; sizes[EGDS_MESSAGE_BOX_WIDTH] = 500; sizes[EGDS_MESSAGE_BOX_HEIGHT] = 200; sizes[EGDS_BUTTON_WIDTH] = 80; sizes[EGDS_BUTTON_HEIGHT] = 30; sizes[EGDS_TEXT_DISTANCE_X] = 2; sizes[EGDS_TEXT_DISTANCE_Y] = 0; texts[EGDT_MSG_BOX_OK] = L"OK"; texts[EGDT_MSG_BOX_CANCEL] = L"Cancel"; texts[EGDT_MSG_BOX_YES] = L"Yes"; texts[EGDT_MSG_BOX_NO] = L"No"; texts[EGDT_WINDOW_CLOSE] = L"Close"; texts[EGDT_WINDOW_RESTORE] = L"Restore"; texts[EGDT_WINDOW_MINIMIZE] = L"Minimize"; texts[EGDT_WINDOW_MAXIMIZE] = L"Maximize"; icons[EGDI_WINDOW_MAXIMIZE] = 225; icons[EGDI_WINDOW_RESTORE] = 226; icons[EGDI_WINDOW_CLOSE] = 227; icons[EGDI_WINDOW_MINIMIZE] = 228; icons[EGDI_CURSOR_UP] = 229; icons[EGDI_CURSOR_DOWN] = 230; icons[EGDI_CURSOR_LEFT] = 231; icons[EGDI_CURSOR_RIGHT] = 232; icons[EGDI_MENU_MORE] = 232; icons[EGDI_CHECK_BOX_CHECKED] = 0; icons[EGDI_DROP_DOWN] = 234; icons[EGDI_SMALL_CURSOR_UP] = 235; icons[EGDI_SMALL_CURSOR_DOWN] = 236; icons[EGDI_RADIO_BUTTON_CHECKED] = 237; icons[EGDI_MORE_LEFT] = 238; icons[EGDI_MORE_RIGHT] = 239; icons[EGDI_MORE_UP] = 240; icons[EGDI_MORE_DOWN] = 241; icons[EGDI_WINDOW_RESIZE] = 242; icons[EGDI_EXPAND] = 243; icons[EGDI_COLLAPSE] = 244; icons[EGDI_FILE] = 245; icons[EGDI_DIRECTORY] = 246; } CGUITexturedSkin::~CGUITexturedSkin() { for (u32 i=0; i<EGDF_COUNT; ++i) { if (fonts[i]) fonts[i]->drop(); } if (SpriteBank) SpriteBank->drop(); if ( pSkinTexture ) { pSkinTexture->drop(); pSkinTexture = 0; } if ( pSkinImage ) { pSkinImage->drop(); pSkinImage = 0; } pGuiEnv->drop(); pVideo->drop(); pFileSystem->drop(); } // Protected helper functions... bool CGUITexturedSkin::readSkinXml( const c8 * guiSkinXmlFile ) { IXMLReaderUTF8 * pXml = pFileSystem->createXMLReaderUTF8( guiSkinXmlFile ); if ( !pXml ) { return false; } skinFilename = guiSkinXmlFile; while ( pXml->read() ) { if ( EXN_ELEMENT == pXml->getNodeType() ) { if ( isNodeName( pXml, "guiskin" ) ) { skinName = pXml->getAttributeValue( "name" ); skinTextureFilename = pXml->getAttributeValue( "texture" ); } else if ( isNodeName( pXml, "buttonNormal" ) ) // Normal button { core::array< c8 * > nodeList; nodeList.push_back( "left" ); nodeList.push_back( "middle" ); nodeList.push_back( "right" ); nodeList.push_back( "imageCoord" ); s32 texCoordIndex = ESTC_ENUM_INVALID; s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { switch ( findResult ) { case 0: texCoordIndex = ESTC_BUTTON_NORMAL_LEFT; break; case 1: texCoordIndex = ESTC_BUTTON_NORMAL_MIDDLE; break; case 2: texCoordIndex = ESTC_BUTTON_NORMAL_RIGHT; break; case 3: if ( ESTC_ENUM_INVALID != texCoordIndex ) { skinTexCoords[texCoordIndex] = decodeImageCoord( pXml ); } break; } } } else if ( isNodeName( pXml, "buttonPressed" ) ) // Pressed button { core::array< c8 * > nodeList; nodeList.push_back( "left" ); nodeList.push_back( "middle" ); nodeList.push_back( "right" ); nodeList.push_back( "imageCoord" ); s32 texCoordIndex = ESTC_ENUM_INVALID; s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { switch ( findResult ) { case 0: texCoordIndex = ESTC_BUTTON_PRESSED_LEFT; break; case 1: texCoordIndex = ESTC_BUTTON_PRESSED_MIDDLE; break; case 2: texCoordIndex = ESTC_BUTTON_PRESSED_RIGHT; break; case 3: if ( ESTC_ENUM_INVALID != texCoordIndex ) { skinTexCoords[texCoordIndex] = decodeImageCoord( pXml ); } break; } } } else if ( isNodeName( pXml, "checkBox" ) ) // Tab button { core::array< c8 * > nodeList; nodeList.push_back( "unchecked" ); nodeList.push_back( "checked" ); nodeList.push_back( "imageCoord" ); s32 checkBoxType = ESTC_CHECK_BOX_UNCHECKED; s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { switch ( findResult ) { case 0: checkBoxType = ESTC_CHECK_BOX_UNCHECKED; break; case 1: checkBoxType = ESTC_CHECK_BOX_CHECKED; break; case 2: skinTexCoords[checkBoxType] = decodeImageCoord( pXml ); break; } } } else if ( isNodeName( pXml, "menuPane" ) ) // Menu pane { core::array< c8 * > nodeList; nodeList.push_back( "imageCoord" ); s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { if ( 0 == findResult ) { skinTexCoords[ESTC_MENU_PANE] = decodeImageCoord( pXml ); } } } else if ( isNodeName( pXml, "sunkenPane" ) ) // Sunken pane { core::array< c8 * > nodeList; nodeList.push_back( "imageCoord" ); s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { if ( 0 == findResult ) { skinTexCoords[ESTC_SUNKEN_PANE] = decodeImageCoord( pXml ); } } } else if ( isNodeName( pXml, "tabBody" ) ) // Tab body { core::array< c8 * > nodeList; nodeList.push_back( "imageCoord" ); s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { if ( 0 == findResult ) { skinTexCoords[ESTC_TAB_BODY] = decodeImageCoord( pXml ); } } } else if ( isNodeName( pXml, "tabButton" ) ) // Tab button { core::array< c8 * > nodeList; nodeList.push_back( "active" ); nodeList.push_back( "inactive" ); nodeList.push_back( "imageCoord" ); s32 buttonType = ESTC_TAB_BUTTON_ACTIVE; s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { switch ( findResult ) { case 0: buttonType = ESTC_TAB_BUTTON_ACTIVE; break; case 1: buttonType = ESTC_TAB_BUTTON_INACTIVE; break; case 2: skinTexCoords[buttonType] = decodeImageCoord( pXml ); break; } } } else if ( isNodeName( pXml, "toolBar" ) ) // Toolbar { core::array< c8 * > nodeList; nodeList.push_back( "left" ); nodeList.push_back( "middle" ); nodeList.push_back( "right" ); nodeList.push_back( "imageCoord" ); s32 texCoordIndex = ESTC_ENUM_INVALID; s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { switch ( findResult ) { case 0: texCoordIndex = ESTC_TOOLBAR_LEFT; break; case 1: texCoordIndex = ESTC_TOOLBAR_MIDDLE; break; case 2: texCoordIndex = ESTC_TOOLBAR_RIGHT; break; case 3: if ( ESTC_ENUM_INVALID != texCoordIndex ) { skinTexCoords[texCoordIndex] = decodeImageCoord( pXml ); } break; } } } else if ( isNodeName( pXml, "window" ) ) // Window { core::array< c8 * > nodeList; nodeList.push_back( "upperLeftCorner" ); nodeList.push_back( "upperRightCorner" ); nodeList.push_back( "lowerLeftCorner" ); nodeList.push_back( "lowerRightCorner" ); nodeList.push_back( "upperEdge" ); nodeList.push_back( "lowerEdge" ); nodeList.push_back( "leftEdge" ); nodeList.push_back( "rightEdge" ); nodeList.push_back( "interior" ); nodeList.push_back( "titleBar" ); nodeList.push_back( "imageCoord" ); s32 texCoordIndex = ESTC_ENUM_INVALID; s32 nodeDepth = 0; for ( s32 findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ); findResult != -1; findResult = findInterestedSubNode( pXml, nodeList, nodeDepth ) ) { switch ( findResult ) { case 0: texCoordIndex = ESTC_WINDOW_UPPER_LEFT_CORNER; break; case 1: texCoordIndex = ESTC_WINDOW_UPPER_RIGHT_CORNER; break; case 2: texCoordIndex = ESTC_WINDOW_LOWER_LEFT_CORNER; break; case 3: texCoordIndex = ESTC_WINDOW_LOWER_RIGHT_CORNER; break; case 4: texCoordIndex = ESTC_WINDOW_UPPER_EDGE; break; case 5: texCoordIndex = ESTC_WINDOW_LOWER_EDGE; break; case 6: texCoordIndex = ESTC_WINDOW_LEFT_EDGE; break; case 7: texCoordIndex = ESTC_WINDOW_RIGHT_EDGE; break; case 8: texCoordIndex = ESTC_WINDOW_INTERIOR; tileWindowInterior = stringc( pXml->getAttributeValue( "tile" ) ).equals_ignore_case( stringc( "true" ) ); break; case 9: texCoordIndex = ESTC_WINDOW_TITLEBAR; break; case 10: if ( ESTC_ENUM_INVALID != texCoordIndex ) { skinTexCoords[texCoordIndex] = decodeImageCoord( pXml ); } break; } } } } } // end while pXml->read() // Drop the Xml reader to free it pXml->drop(); return true; } bool CGUITexturedSkin::isNodeName( IXMLReaderUTF8 * pXml, const c8 * pNodeName ) { // do case insensitive string compare with current node name if ( stringc( pNodeName ).equals_ignore_case( stringc( pXml->getNodeName() ) ) ) { return true; } return false; } s32 CGUITexturedSkin::findInterestedSubNode( IXMLReaderUTF8 * pXml, core::array< c8 * > nodeList, s32 & currNodeDepth ) { bool done = false; while ( pXml->read() && !done ) { if ( EXN_ELEMENT == pXml->getNodeType() ) { currNodeDepth++; for ( u32 i = 0; i < nodeList.size(); i++ ) { if ( isNodeName( pXml, nodeList[i] ) ) { return (s32)i; } } } else if ( EXN_ELEMENT_END == pXml->getNodeType() ) { currNodeDepth--; if ( currNodeDepth < 0 ) { done = true; } } } return -1; } core::rect<s32> CGUITexturedSkin::decodeImageCoord( IXMLReaderUTF8 * pXml ) { core::rect<s32> returnRect; const c8 * pCoordStr = 0; s32 index = 0; s32 tempValue = 0; // This stores number of coordinate values converted s32 numCoordObtained = 0; if ( pXml->read() && EXN_TEXT == pXml->getNodeType() ) { pCoordStr = pXml->getNodeData(); } else { return returnRect; } while ( pCoordStr[index] != 0 ) { if ( pCoordStr[index] >= '0' && pCoordStr[index] <= '9' ) { tempValue *= 10; tempValue += (s32) (pCoordStr[index] - '0'); } else if ( pCoordStr[index] == ',' ) { switch ( numCoordObtained ) { case 0: returnRect.UpperLeftCorner.X = tempValue; numCoordObtained++; break; case 1: returnRect.UpperLeftCorner.Y = tempValue; numCoordObtained++; break; case 2: returnRect.LowerRightCorner.X = tempValue; numCoordObtained++; break; case 3: returnRect.LowerRightCorner.Y = tempValue; numCoordObtained++; break; } tempValue = 0; } if ( pCoordStr[index+1] == 0 ) { // This will return the number when the end of string is reached returnRect.LowerRightCorner.Y = tempValue; numCoordObtained++; } index++; } return returnRect; } // Public function... bool CGUITexturedSkin::setSkin( const c8 * guiSkinXmlFile ) { if ( !readSkinXml( guiSkinXmlFile ) ) { // fail to load or parse xml file return false; } if ( pSkinTexture ) { // release existing skin texture pSkinTexture->drop(); pSkinTexture = 0; } pSkinTexture = pVideo->getTexture( skinTextureFilename.c_str() ); if ( !pSkinTexture ) { // fail to load texture return false; } pSkinTexture->grab(); if ( pSkinImage ) { // release existing skin image pSkinImage->drop(); pSkinImage = 0; } pSkinImage = pVideo->createImageFromFile( skinTextureFilename.c_str() ); if ( !pSkinImage ) { return false; } return true; } void CGUITexturedSkin::draw3DButtonPanePressed(IGUIElement*element, const core::rect<s32> &rect, const core::rect<s32> *clip) { // Draw the left side core::rect<s32> buttonPressedLeft = skinTexCoords[ESTC_BUTTON_PRESSED_LEFT]; f32 leftHtRatio = (f32)rect.getHeight() / buttonPressedLeft.getHeight(); core::rect<s32> leftDestRect = rect; s32 leftWidth = (s32)(buttonPressedLeft.getWidth() * leftHtRatio); leftDestRect.LowerRightCorner.X = rect.UpperLeftCorner.X + (leftWidth<=rect.getWidth()?leftWidth:rect.getWidth()); pVideo->draw2DImage(pSkinTexture,leftDestRect,buttonPressedLeft,0,0,true); // Draw the right side core::rect<s32> buttonPressedRight = skinTexCoords[ESTC_BUTTON_PRESSED_RIGHT]; f32 rightHtRatio = (f32)rect.getHeight() / buttonPressedRight.getHeight(); core::rect<s32> rightDestRect = rect; s32 rightWidth = (s32)(buttonPressedRight.getWidth() * rightHtRatio); rightDestRect.UpperLeftCorner.X = rect.LowerRightCorner.X - (rightWidth<=rect.getWidth()?rightWidth:rect.getWidth()); pVideo->draw2DImage(pSkinTexture,rightDestRect,buttonPressedRight,0,0,true); // Draw the middle core::rect<s32> buttonPressedMiddle = skinTexCoords[ESTC_BUTTON_PRESSED_MIDDLE]; core::rect<s32> middleDestRect = rect; middleDestRect.UpperLeftCorner.X = leftDestRect.LowerRightCorner.X; middleDestRect.LowerRightCorner.X = rightDestRect.UpperLeftCorner.X; pVideo->draw2DImage(pSkinTexture,middleDestRect,buttonPressedMiddle,0,0,true); } void CGUITexturedSkin::draw3DButtonPaneStandard(IGUIElement *element, const core::rect<s32> &rect, const core::rect<s32> *clip) { // Draw the left side core::rect<s32> buttonNormalLeft = skinTexCoords[ESTC_BUTTON_NORMAL_LEFT]; f32 leftHtRatio = (f32)rect.getHeight() / buttonNormalLeft.getHeight(); core::rect<s32> leftDestRect = rect; s32 leftWidth = (s32)(buttonNormalLeft.getWidth() * leftHtRatio); leftDestRect.LowerRightCorner.X = rect.UpperLeftCorner.X + (leftWidth<=rect.getWidth()?leftWidth:rect.getWidth()); pVideo->draw2DImage(pSkinTexture,leftDestRect,buttonNormalLeft,0,0,true); // Draw the right side core::rect<s32> buttonNormalRight = skinTexCoords[ESTC_BUTTON_NORMAL_RIGHT]; f32 rightHtRatio = (f32)rect.getHeight() / buttonNormalRight.getHeight(); core::rect<s32> rightDestRect = rect; s32 rightWidth = (s32)(buttonNormalRight.getWidth() * rightHtRatio); rightDestRect.UpperLeftCorner.X = rect.LowerRightCorner.X - (rightWidth<=rect.getWidth()?rightWidth:rect.getWidth()); pVideo->draw2DImage(pSkinTexture,rightDestRect,buttonNormalRight,0,0,true); // Draw the middle core::rect<s32> buttonNormalMiddle = skinTexCoords[ESTC_BUTTON_NORMAL_MIDDLE]; core::rect<s32> middleDestRect = rect; middleDestRect.UpperLeftCorner.X = leftDestRect.LowerRightCorner.X; middleDestRect.LowerRightCorner.X = rightDestRect.UpperLeftCorner.X; pVideo->draw2DImage(pSkinTexture,middleDestRect,buttonNormalMiddle,0,0,true); } void CGUITexturedSkin::draw3DMenuPane(IGUIElement *element, const core::rect<s32> &rect, const core::rect<s32> *clip) { core::rect<s32> menuPane = skinTexCoords[ESTC_MENU_PANE]; pVideo->draw2DImage(pSkinTexture,rect,menuPane,0,0,true); } void CGUITexturedSkin::draw3DSunkenPane(IGUIElement *element, video::SColor bgcolor, bool flat, bool fillBackGround, const core::rect<s32> &rect, const core::rect<s32> *clip) { s32 type = ESTC_SUNKEN_PANE; if ( EGUIET_CHECK_BOX == element->getType() ) { if ( ( (IGUICheckBox*)element)->isChecked() ) { type = ESTC_CHECK_BOX_CHECKED; } else { type = ESTC_CHECK_BOX_UNCHECKED; } } core::rect<s32> sunkenPane = skinTexCoords[type]; pVideo->draw2DImage(pSkinTexture,rect,sunkenPane,0,0,true); } void CGUITexturedSkin::draw3DTabBody(IGUIElement *element, bool border, bool background, const core::rect<s32> &rect, const core::rect<s32> *clip , s32 tabHeight, gui::EGUI_ALIGNMENT alignment) { core::rect<s32> tabBody = skinTexCoords[ESTC_TAB_BODY]; core::rect<s32> destRect = rect; destRect.UpperLeftCorner.Y += getSize(EGDS_BUTTON_HEIGHT); pVideo->draw2DImage(pSkinTexture,destRect,tabBody,0,0,true); } void CGUITexturedSkin::draw3DTabButton(IGUIElement *element, bool active, const core::rect<s32> &rect, const core::rect<s32> *clip, gui::EGUI_ALIGNMENT alignment) { s32 buttonType = active ? ESTC_TAB_BUTTON_ACTIVE : ESTC_TAB_BUTTON_INACTIVE; core::rect<s32> tabButton = skinTexCoords[buttonType]; pVideo->draw2DImage(pSkinTexture,rect,tabButton,0,0,true); } void CGUITexturedSkin::draw3DToolBar(IGUIElement *element, const core::rect<s32> &rect, const core::rect<s32> *clip) { // Draw the left side core::rect<s32> toolBarLeft = skinTexCoords[ESTC_TOOLBAR_LEFT]; f32 leftHtRatio = (f32)rect.getHeight() / toolBarLeft.getHeight(); core::rect<s32> leftDestRect = rect; s32 leftWidth = (s32)(toolBarLeft.getWidth() * leftHtRatio); leftDestRect.LowerRightCorner.X = rect.UpperLeftCorner.X + (leftWidth<=rect.getWidth()?leftWidth:rect.getWidth()); pVideo->draw2DImage(pSkinTexture,leftDestRect,toolBarLeft,0,0,true); // Draw the right side core::rect<s32> toolBarRight = skinTexCoords[ESTC_TOOLBAR_RIGHT]; f32 rightHtRatio = (f32)rect.getHeight() / toolBarRight.getHeight(); core::rect<s32> rightDestRect = rect; s32 rightWidth = (s32)(toolBarRight.getWidth() * rightHtRatio); rightDestRect.UpperLeftCorner.X = rect.LowerRightCorner.X - (rightWidth<=rect.getWidth()?rightWidth:rect.getWidth()); pVideo->draw2DImage(pSkinTexture,rightDestRect,toolBarRight,0,0,true); // Draw the middle core::rect<s32> toolBarMiddle = skinTexCoords[ESTC_TOOLBAR_MIDDLE]; core::rect<s32> middleDestRect = rect; middleDestRect.UpperLeftCorner.X = leftDestRect.LowerRightCorner.X; middleDestRect.LowerRightCorner.X = rightDestRect.UpperLeftCorner.X; pVideo->draw2DImage(pSkinTexture,middleDestRect,toolBarMiddle,0,0,true); } core::rect< s32 > CGUITexturedSkin::draw3DWindowBackground(IGUIElement *element, bool drawTitleBar, video::SColor titleBarColor, const core::rect< s32 > &rect, const core::rect< s32 > *clip, core::rect<s32>* checkClientArea ) { // Draw top left corner core::rect<s32> topLeftCorner = skinTexCoords[ESTC_WINDOW_UPPER_LEFT_CORNER]; core::rect<s32> topLeftCornerDest = rect; topLeftCornerDest.LowerRightCorner.X = topLeftCornerDest.UpperLeftCorner.X + topLeftCorner.getWidth(); topLeftCornerDest.LowerRightCorner.Y = topLeftCornerDest.UpperLeftCorner.Y + topLeftCorner.getHeight(); pVideo->draw2DImage(pSkinTexture,topLeftCornerDest,topLeftCorner,0,0,true); // Draw top right corner core::rect<s32> topRightCorner = skinTexCoords[ESTC_WINDOW_UPPER_RIGHT_CORNER]; core::rect<s32> topRightCornerDest = rect; topRightCornerDest.UpperLeftCorner.X = rect.LowerRightCorner.X - topRightCorner.getWidth(); topRightCornerDest.LowerRightCorner.Y = rect.UpperLeftCorner.Y + topRightCorner.getHeight(); pVideo->draw2DImage(pSkinTexture,topRightCornerDest,topRightCorner,0,0,true); // Draw bottom left corner core::rect<s32> bottomLeftCorner = skinTexCoords[ESTC_WINDOW_LOWER_LEFT_CORNER]; core::rect<s32> bottomLeftCornerDest = rect; bottomLeftCornerDest.LowerRightCorner.X = rect.UpperLeftCorner.X + bottomLeftCorner.getWidth(); bottomLeftCornerDest.UpperLeftCorner.Y = rect.LowerRightCorner.Y - bottomLeftCorner.getHeight(); pVideo->draw2DImage(pSkinTexture,bottomLeftCornerDest,bottomLeftCorner,0,0,true); // Draw top right corner core::rect<s32> bottomRightCorner = skinTexCoords[ESTC_WINDOW_LOWER_RIGHT_CORNER]; core::rect<s32> bottomRightCornerDest = rect; bottomRightCornerDest.UpperLeftCorner.X = rect.LowerRightCorner.X - bottomRightCorner.getWidth(); bottomRightCornerDest.UpperLeftCorner.Y = rect.LowerRightCorner.Y - bottomRightCorner.getHeight(); pVideo->draw2DImage(pSkinTexture,bottomRightCornerDest,bottomRightCorner,0,0,true); // Draw top edge core::rect<s32> topEdge = skinTexCoords[ESTC_WINDOW_UPPER_EDGE]; core::rect<s32> topEdgeDest = rect; topEdgeDest.UpperLeftCorner.X = rect.UpperLeftCorner.X + topLeftCorner.getWidth(); topEdgeDest.LowerRightCorner.X = rect.LowerRightCorner.X - topRightCorner.getWidth(); topEdgeDest.LowerRightCorner.Y = rect.UpperLeftCorner.Y + topEdge.getHeight(); pVideo->draw2DImage(pSkinTexture,topEdgeDest,topEdge,0,0,true); // Draw bottom edge core::rect<s32> bottomEdge = skinTexCoords[ESTC_WINDOW_LOWER_EDGE]; core::rect<s32> bottomEdgeDest = rect; bottomEdgeDest.UpperLeftCorner.X = rect.UpperLeftCorner.X + bottomLeftCorner.getWidth(); bottomEdgeDest.UpperLeftCorner.Y = rect.LowerRightCorner.Y - bottomEdge.getHeight(); bottomEdgeDest.LowerRightCorner.X = rect.LowerRightCorner.X - bottomRightCorner.getWidth(); pVideo->draw2DImage(pSkinTexture,bottomEdgeDest,bottomEdge,0,0,true); // Draw left edge core::rect<s32> leftEdge = skinTexCoords[ESTC_WINDOW_LEFT_EDGE]; core::rect<s32> leftEdgeDest = rect; leftEdgeDest.UpperLeftCorner.Y = rect.UpperLeftCorner.Y + topLeftCorner.getHeight(); leftEdgeDest.LowerRightCorner.X = rect.UpperLeftCorner.X + leftEdge.getWidth(); leftEdgeDest.LowerRightCorner.Y = rect.LowerRightCorner.Y - bottomLeftCorner.getHeight(); pVideo->draw2DImage(pSkinTexture,leftEdgeDest,leftEdge,0,0,true); // Draw right edge core::rect<s32> rightEdge = skinTexCoords[ESTC_WINDOW_RIGHT_EDGE]; core::rect<s32> rightEdgeDest = rect; rightEdgeDest.UpperLeftCorner.X = rect.LowerRightCorner.X - rightEdge.getWidth(); rightEdgeDest.UpperLeftCorner.Y = rect.UpperLeftCorner.Y + topRightCorner.getHeight(); rightEdgeDest.LowerRightCorner.Y = rect.LowerRightCorner.Y - bottomRightCorner.getHeight(); pVideo->draw2DImage(pSkinTexture,rightEdgeDest,rightEdge,0,0,true); // Draw interior core::rect<s32> interior = skinTexCoords[ESTC_WINDOW_INTERIOR]; core::rect<s32> interiorDest = rect; interiorDest.UpperLeftCorner.X = rect.UpperLeftCorner.X + leftEdge.getWidth(); interiorDest.UpperLeftCorner.Y = rect.UpperLeftCorner.Y + topEdge.getHeight(); interiorDest.LowerRightCorner.X = rect.LowerRightCorner.X - rightEdge.getWidth(); interiorDest.LowerRightCorner.Y = rect.LowerRightCorner.Y - bottomEdge.getHeight(); pVideo->draw2DImage(pSkinTexture,interiorDest,interior,0,0,true); if (drawTitleBar) { // Draw title bar core::rect<s32> titleBar = skinTexCoords[ESTC_WINDOW_TITLEBAR]; core::rect<s32> titleBarDest = rect; titleBarDest.UpperLeftCorner.X = rect.UpperLeftCorner.X + 3; titleBarDest.UpperLeftCorner.Y = rect.UpperLeftCorner.Y + 3; titleBarDest.LowerRightCorner.X = rect.UpperLeftCorner.X + titleBar.getWidth(); titleBarDest.LowerRightCorner.Y = rect.UpperLeftCorner.Y + titleBar.getHeight(); pVideo->draw2DImage(pSkinTexture,titleBarDest,titleBar,0,0,true); return titleBarDest; } return rect; } SColor CGUITexturedSkin::getColor(EGUI_DEFAULT_COLOR color) const { if ((u32)color < EGDC_COUNT) return colors[color]; else return video::SColor(); } void CGUITexturedSkin::setColor(EGUI_DEFAULT_COLOR which, SColor newColor) { if ((u32)which < EGDC_COUNT) colors[which] = newColor; if ( 0 == which ) { SetSkinAlpha( newColor.getAlpha() ); } } s32 CGUITexturedSkin::getSize(EGUI_DEFAULT_SIZE size) const { if ((u32)size < EGDS_COUNT) return sizes[size]; else return 0; } void CGUITexturedSkin::setSize(EGUI_DEFAULT_SIZE which, s32 size) { if ((u32)which < EGDS_COUNT) sizes[which] = size; } const wchar_t * CGUITexturedSkin::getDefaultText(EGUI_DEFAULT_TEXT text) const { if ((u32)text < EGDT_COUNT) return texts[text].c_str(); else return texts[0].c_str(); } void CGUITexturedSkin::setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t *newText) { if ((u32)which < EGDT_COUNT) texts[which] = newText; } IGUIFont * CGUITexturedSkin::getFont(EGUI_DEFAULT_FONT which) const { if (((u32)which < EGDS_COUNT) && fonts[which]) return fonts[which]; else return fonts[EGDF_DEFAULT]; } void CGUITexturedSkin::setFont(IGUIFont *font, EGUI_DEFAULT_FONT which) { if ((u32)which >= EGDS_COUNT) return; if (fonts[which]) fonts[which]->drop(); fonts[which] = font; if (fonts[which]) fonts[which]->grab(); } IGUISpriteBank* CGUITexturedSkin::getSpriteBank() const { return SpriteBank; } void CGUITexturedSkin::setSpriteBank(IGUISpriteBank* bank) { if (SpriteBank) SpriteBank->drop(); if (bank) bank->grab(); SpriteBank = bank; } u32 CGUITexturedSkin::getIcon(EGUI_DEFAULT_ICON icon) const { if ((u32)icon < EGDI_COUNT) return icons[icon]; else return 0; } void CGUITexturedSkin::setIcon(EGUI_DEFAULT_ICON icon, u32 index) { if ((u32)icon < EGDI_COUNT) icons[icon] = index; } void CGUITexturedSkin::drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, const core::position2di position, u32 starttime, u32 currenttime, bool loop, const core::rect<s32>* clip) { if (!SpriteBank) return; SpriteBank->draw2DSprite(icons[icon], position, clip, video::SColor(255,0,0,0), starttime, currenttime, loop, true); } void CGUITexturedSkin::draw2DRectangle(IGUIElement* element, const video::SColor &color, const core::rect<s32>& pos, const core::rect<s32>* clip) { pVideo->draw2DRectangle(color, pos, clip); } void CGUITexturedSkin::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const { out->addString( "SkinFilename", skinFilename.c_str() ); } void CGUITexturedSkin::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) { irr::core::stringc file = in->getAttributeAsString( "SkinFilename" ); setSkin( file.c_str() ); } void CGUITexturedSkin::SetSkinAlpha( u32 a ) { if ( !pSkinImage || !pSkinTexture ) { return; } if ( ECF_A8R8G8B8 != pSkinImage->getColorFormat() || ECF_A8R8G8B8 != pSkinTexture->getColorFormat() ) { // Working with 32 bit colour format only for now return; } irr::core::dimension2d<u32> imageSize = pSkinImage->getDimension(); irr::u32 pixelMask = pSkinImage->getRedMask() | pSkinImage->getGreenMask() | pSkinImage->getBlueMask(); irr::u32 alphaBits = (a << 24 | a << 16 | a << 8 | a) & pSkinImage->getAlphaMask(); irr::u32 imagePitch = pSkinImage->getPitch(); irr::u32 texturePitch = pSkinTexture->getPitch(); irr::u32 imagePixelSize = pSkinImage->getBytesPerPixel(); irr::u32 texturePixelSize = imagePixelSize; irr::u8 * pImageData = (irr::u8 *) pSkinImage->lock(); irr::u8 * pTextureData = (irr::u8 *) pSkinTexture->lock(); for ( irr::s32 y = 0; y < imageSize.Height; ++y ) { for ( irr::s32 x = 0; x < imageSize.Width; ++x ) { irr::u32 * pImagePixel = (irr::u32*)pImageData; irr::u32 * pTexturePixel = (irr::u32*)pTextureData; if ( (*pImagePixel & pSkinImage->getAlphaMask()) != 0 ) { *pTexturePixel = (*pImagePixel & pixelMask) | alphaBits; } pImageData += imagePixelSize; pTextureData += texturePixelSize; } // Somehow incrementing the pointer by pitch results in out of bounds memory access, while not using it works fine //pImageData += imagePitch; //pTextureData += texturePitch; } pSkinImage->unlock(); pSkinTexture->unlock(); } } // end namespace gui } // end namespace irr
[ "btuska@0b255d0d-b62e-4858-a3ea-23bff437c660" ]
btuska@0b255d0d-b62e-4858-a3ea-23bff437c660
833b2a7cfab10a67277da2702a8d3b4928958669
999049ae2313712363c8229d04f4efc9ac167b61
/Round366/A.cpp
755917904385f9c4b032b9e1fd9f07e34e93569c
[]
no_license
XiaoXiaoLui/CodeForces
fa2f254c2adedf759019622598912d53d9bdfa18
1c4b12450a3b8be958fd81d98acb03dcfed2220d
refs/heads/master
2021-01-11T02:09:09.927403
2016-10-13T16:36:50
2016-10-13T16:36:50
70,825,476
0
0
null
null
null
null
UTF-8
C++
false
false
588
cpp
#include <iostream> #include <cstdio> #include <vector> #include <set> #include <map> #include <algorithm> #include <string> #include <cmath> #include <cstring> #include <queue> using namespace std; #define pii pair<int, int> #define mp make_pair<int, int> typedef long long ll; int main() { string str; int n, i; scanf("%d", &n); n--; str = "I hate "; for (i = 0; i < n; i++) { if (i & 1) { str += "that I hate "; } else { str += "that I love "; } } str += "it"; printf("%s\n", str.c_str()); return 0; }
[ "980821718@qq.com" ]
980821718@qq.com
591323805b1115014d4cb1d7afca5340e43ce8ab
83bacfbdb7ad17cbc2fc897b3460de1a6726a3b1
/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp
802d8a7698d3d91a052b9064fc58cbc4e0242ade
[ "Apache-2.0", "BSD-2-Clause", "LGPL-2.1-only", "LGPL-2.0-only", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "GPL-1.0-or-later", "GPL-2.0-only", "LicenseRef-scancode-other-copyleft" ]
permissive
cool2528/miniblink49
d909e39012f2c5d8ab658dc2a8b314ad0050d8ea
7f646289d8074f098cf1244adc87b95e34ab87a8
refs/heads/master
2020-06-05T03:18:43.211372
2019-06-01T08:57:37
2019-06-01T08:59:56
192,294,645
2
0
Apache-2.0
2019-06-17T07:16:28
2019-06-17T07:16:27
null
UTF-8
C++
false
false
2,526
cpp
/* * Copyright (C) 2013 Google Inc. 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 Google Inc. 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 * OWNER 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. */ #include "config.h" #include "core/svg/properties/SVGAnimatedProperty.h" #include "core/svg/SVGElement.h" namespace blink { SVGAnimatedPropertyBase::SVGAnimatedPropertyBase(AnimatedPropertyType type, SVGElement* contextElement, const QualifiedName& attributeName) : m_type(type) , m_isReadOnly(false) , m_contextElement(contextElement) , m_attributeName(attributeName) { ASSERT(m_contextElement); ASSERT(m_attributeName != QualifiedName::null()); } SVGAnimatedPropertyBase::~SVGAnimatedPropertyBase() { } void SVGAnimatedPropertyBase::animationEnded() { synchronizeAttribute(); } void SVGAnimatedPropertyBase::synchronizeAttribute() { AtomicString value(currentValueBase()->valueAsString()); m_contextElement->setSynchronizedLazyAttribute(m_attributeName, value); } bool SVGAnimatedPropertyBase::isSpecified() const { return isAnimating() || contextElement()->hasAttribute(attributeName()); } } // namespace blink
[ "22249030@qq.com" ]
22249030@qq.com
580b53d1d7a59ff0df255d46b39daab24143aac6
ffcc6e8c4fe677b0e4ccd87abe1da6f7db2d3dea
/noaaParser/Data_Block.h
bd1da5d657c73cdad471c47d45a6b4ff9df17920
[]
no_license
jrober/NOAAparser
271152134cb76974e618f1dca742d0374273da60
4119a7e70df8ae81192e1462d15a4922ccc20e86
refs/heads/master
2020-07-27T06:15:17.922291
2019-09-24T22:00:14
2019-09-24T22:00:14
208,898,440
0
0
null
2019-09-24T22:00:15
2019-09-16T21:09:03
C++
UTF-8
C++
false
false
397
h
#pragma once #include "Data_Record.h" #include "Header.h" #include<vector> class Data_Block { private: vector<Data_Record> dr; Header header; public: // default constructor Data_Block() {}; // initialization constructor Data_Block(Header headerIn, vector<Data_Record> drIN) { dr = drIN; header = headerIn; }; void coutData_Block(); void fileOut(ofstream& os); };
[ "justinrobertsdw@gmail.com" ]
justinrobertsdw@gmail.com
73e336babba1f12e7db2dc29adbb6b1dee7f34c3
0d99bcb8b8717008c1ec9b080c6c86c2b1710eee
/날씨/build/Android/Preview2/app/src/main/include/Fuse.Controls.Fallbac-8b30b373.h
2ae77006ddfc9fa34cfa5a3be1f4b3d585f485c8
[]
no_license
shj4849/Fuse
526d92bc49a0a2d8087beece987b1701dc35cccc
447f49f96f9dadf203f5f91e8a1d67f19d8ecc04
refs/heads/master
2021-05-15T23:08:09.523726
2017-12-21T05:28:53
2017-12-21T05:28:53
106,758,124
0
0
null
null
null
null
UTF-8
C++
false
false
2,006
h
// This file was generated based on C:/Users/t2/AppData/Local/Fusetools/Packages/Fuse.Controls.Primitives/1.4.0/TextControls/FallbackTextRenderer/WordWrapInfo.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Uno.Object.h> namespace g{namespace Fuse{namespace Controls{namespace FallbackTextRenderer{struct DefaultTextRenderer;}}}} namespace g{namespace Fuse{namespace Controls{namespace FallbackTextRenderer{struct WordWrapInfo;}}}} namespace g{ namespace Fuse{ namespace Controls{ namespace FallbackTextRenderer{ // internal sealed class WordWrapInfo :5 // { uType* WordWrapInfo_typeof(); void WordWrapInfo__ctor__fn(WordWrapInfo* __this, ::g::Fuse::Controls::FallbackTextRenderer::DefaultTextRenderer* textRenderer, bool* isEnabled, float* wrapWidth, float* fontSize, float* lineHeight, float* lineSpacing, float* absoluteZoom); void WordWrapInfo__Equals_fn(WordWrapInfo* __this, uObject* obj, bool* __retval); void WordWrapInfo__GetHashCode_fn(WordWrapInfo* __this, int* __retval); void WordWrapInfo__New1_fn(::g::Fuse::Controls::FallbackTextRenderer::DefaultTextRenderer* textRenderer, bool* isEnabled, float* wrapWidth, float* fontSize, float* lineHeight, float* lineSpacing, float* absoluteZoom, WordWrapInfo** __retval); struct WordWrapInfo : uObject { uStrong< ::g::Fuse::Controls::FallbackTextRenderer::DefaultTextRenderer*> TextRenderer; bool IsEnabled; float WrapWidth; float FontSize; float LineHeight; float LineSpacing; float AbsoluteZoom; void ctor_(::g::Fuse::Controls::FallbackTextRenderer::DefaultTextRenderer* textRenderer, bool isEnabled, float wrapWidth, float fontSize, float lineHeight, float lineSpacing, float absoluteZoom); static WordWrapInfo* New1(::g::Fuse::Controls::FallbackTextRenderer::DefaultTextRenderer* textRenderer, bool isEnabled, float wrapWidth, float fontSize, float lineHeight, float lineSpacing, float absoluteZoom); }; // } }}}} // ::g::Fuse::Controls::FallbackTextRenderer
[ "shj4849@naver.com" ]
shj4849@naver.com
db095801a03755cf4fa04b12bcac9fcc7e019bc4
b3ad4d576ef130245216bd6174d18225f491cd3a
/dreamhack-io/Memory_Corruption_C++/BOF/container-6.cpp
6e2839f9b1748c3702e67a122fd674241954fa0f
[]
no_license
dnsdudrla97/pwn
fed44b09d1c1d12c1325401d85713ed0f403e22b
72532e531b2cb98fb254fce5cd55889f483475a6
refs/heads/master
2023-02-02T18:15:29.476146
2020-12-22T05:41:06
2020-12-22T05:41:06
277,975,117
2
0
null
null
null
null
UTF-8
C++
false
false
371
cpp
// g++ -o container-6 container-6.cpp -std=c++11 #include <iostream> #include <vector> void f(const std::vector<int> &c) { for(auto i = c.begin(), e = i + c.size(); i != e; ++i) { std::cout << *i << std::endl; } } int main(void) { std::vector<int> v; v.push_back(1); v.push_back(2); v.push_back(3); v.push_back(4); v.push_back(5); f(v); }
[ "dnsdudrla97@naver.com" ]
dnsdudrla97@naver.com
291514ec055f00ad4269325f2e551b7d70b64672
a9ba52226f0f2f40b123aaa3a7ed798006d0f2a3
/宝箱(Zombie's Treasure Chest, Shanghai 2011, UVa 12325)/main.cpp
8441cc9fbda66a44c1aa8e067f3b6ab16546a8ec
[]
no_license
Wu0409/NOIP_solution
21dd9048ec45d7386c67050c75ecb2c9381b97fb
23815f3863c483966e7ec062c1b2cab383da0b49
refs/heads/master
2023-08-08T01:39:50.919380
2020-03-30T14:22:35
2020-03-30T14:22:35
235,752,069
0
0
null
null
null
null
UTF-8
C++
false
false
1,700
cpp
//书本P210 //考察: //QUESTION:宝箱 //备注:这个写法在数字很小,而n很大时,枚举量太大 #include <iostream> #include <vector> #include <map> using namespace std; //体积 - 价值 int s1 = 34,v1 = 34; //option1 int s2 = 5, v2 = 3; //option2 int current_max = 0; //当前最优解 vector <int> ans; int all_value(vector <int> result){ int value = 0; for(int i = 0;i < result.size();i++){ result[i] == 1 ? value += v1 : value += v2; } return value; } void solution(int leftover,vector <int> result){ if(leftover < 0) return; int minimum = min(s1,s2); int maximum = max(s1,s2); int opt_min,opt_max; minimum == s1? opt_min = 1,opt_max = 2 : opt_min = 2,opt_max = 1; if(leftover < minimum){ //装不下任何东西 int all_v = all_value(result); if(all_v > current_max){ //找到更好的解 current_max = all_v; ans = result; //放入答案 } return; } if(leftover >= minimum){ if(leftover < maximum){ //只能选择小的价值的 result.push_back(opt_min); solution(leftover - minimum,result); } if(leftover >= maximum){ result.push_back(opt_min); solution(leftover - minimum,result); result.pop_back(); result.push_back(opt_max); solution(leftover - maximum,result); result.pop_back(); } } } int main() { vector <int> result; solution(100,result); //输出结果 for(int i:ans){ cout<<i<<" "; } cout<<endl; cout<<"总价值:"<<all_value(ans)<<endl; return 0; }
[ "872093177@qq.com" ]
872093177@qq.com
e90df3f822d57689fc7980ecd98bfe9bf527a75d
fc73264e6a2632dc229962e2e55e8f7e51af646a
/solid/system/socketaddress.hpp
53f86f0d765584876af5b293953df4527967d41e
[ "BSL-1.0" ]
permissive
zodsoft/solidframe
8b259b208bda99bd85029664d92a05a0f254420c
136e913027cd94a54bff3dee4b0a6673f2123a7f
refs/heads/master
2021-01-12T23:59:56.403982
2016-12-22T09:50:52
2016-12-22T09:50:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,766
hpp
// solid/system/socketaddress.hpp // // Copyright (c) 2007, 2008 Valentin Palade (vipalade @ gmail . com) // // This file is part of SolidFrame framework. // // 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 SYSTEM_SOCKETADDRESS_HPP #define SYSTEM_SOCKETADDRESS_HPP #ifndef SOLID_ON_WINDOWS #include <sys/un.h> #include <arpa/inet.h> #endif #include <ostream> #include <array> #include "solid/system/common.hpp" #include "solid/system/socketinfo.hpp" #if defined(SOLID_USE_CPP11) && !defined(USHAREDBACKEND) #include <memory> #elif defined(UBOOSTSHAREDPTR) && !defined(USHAREDBACKEND) #include "boost/shared_ptr.hpp" #else #include "solid/system/sharedbackend.hpp" #endif #ifndef SOLID_HAS_NO_INLINES #include "solid/system/cassert.hpp" #include "solid/system/debug.hpp" #endif namespace solid{ class SocketDevice; //struct sockaddr_in; //struct sockaddr_in6; //================================================================== //! An interator for POSIX addrinfo (see man getaddrinfo) /*! Usually it will hold all data needed for creating and connecting a socket. Use ResolverData::begin() to get started. */ struct ResolveIterator{ ResolveIterator(); ResolveIterator& next(); int family()const; int type()const; int protocol()const; size_t size()const; sockaddr* sockAddr()const; operator bool()const; ResolveIterator &operator++(); bool operator==(const ResolveIterator &_rrit)const; private: friend struct ResolveData; ResolveIterator(addrinfo *_pa); const addrinfo *paddr; }; //================================================================== struct DirectResoveInfo{ enum FlagsE{ #ifndef SOLID_ON_WINDOWS CannonName = AI_CANONNAME, All = AI_ALL, AddrConfig = AI_ADDRCONFIG, V4Mapped = AI_V4MAPPED, NumericHost = AI_NUMERICHOST, NumericService = AI_NUMERICSERV, #else CannonName, All, AddrConfig, V4Mapped, NumericHost, NumericService, #endif Numeric = NumericHost | NumericService, }; }; //! A shared pointer for POSIX addrinfo (see man getaddrinfo) /*! Use synchronous_resolve to create ResolveData objects. */ struct ResolveData{ typedef ResolveIterator const_iterator; ResolveData(); ResolveData(addrinfo *_pai); ResolveData(const ResolveData &_rai); ~ResolveData(); //! Get an iterator to he first resolved ip address const_iterator begin()const; const_iterator end()const; //! Check if the returned list of ip addresses is empty bool empty()const; void clear(); ResolveData& operator=(const ResolveData &_rrd); private: static void delete_addrinfo(void *_pv); #if defined(SOLID_USE_CPP11) && !defined(USHAREDBACKEND) typedef std::shared_ptr<addrinfo> AddrInfoSharedPtrT; AddrInfoSharedPtrT aiptr; #elif defined(UBOOSTSHAREDPTR) && !defined(USHAREDBACKEND) typedef boost::shared_ptr<addrinfo> AddrInfoSharedPtrT; AddrInfoSharedPtrT aiptr; #else SharedStub *pss; #endif }; ResolveData synchronous_resolve(const char *_node, const char *_service); ResolveData synchronous_resolve( const char *_node, const char *_service, int _flags, int _family = -1, int _type = -1, int _proto = -1 ); ResolveData synchronous_resolve(const char *_node, int _port); ResolveData synchronous_resolve( const char *_node, int _port, int _flags, int _family = -1, int _type = -1, int _proto = -1 ); struct SocketAddressStub; struct ReverseResolveInfo{ enum FlagsE{ #ifndef SOLID_ON_WINDOWS NameRequest = NI_NAMEREQD, Datagram = NI_DGRAM, NoFQDN = NI_NOFQDN, NumericHost = NI_NUMERICHOST, NumericService = NI_NUMERICSERV, #else NameRequest, Datagram, NoFQDN, NumericHost, NumericService, #endif Numeric = NumericHost | NumericService, }; }; bool synchronous_resolve(std::string &_rhost, std::string &_rserv, const SocketAddressStub &_rsa, int _flags = 0); //================================================================== struct SocketAddress; struct SocketAddressInet; struct SocketAddressInet4; struct SocketAddressInet6; struct SocketAddressLocal; #ifdef SOLID_ON_WINDOWS typedef int socklen_t; #endif //! A pair of a sockaddr pointer and a size /*! It is a commodity structure, it will not allocate data for sockaddr pointer nor it will delete it. Use this structure with SocketAddress and ResolveIterator */ struct SocketAddressStub{ SocketAddressStub(sockaddr *_pa = nullptr, size_t _sz = 0); SocketAddressStub(const ResolveIterator &_it); SocketAddressStub(const SocketAddress &_rsa); SocketAddressStub(const SocketAddressInet &_rsa); SocketAddressStub(const SocketAddressInet4 &_rsa); SocketAddressStub(const SocketAddressInet6 &_rsa); SocketAddressStub(const SocketAddressLocal &_rsa); SocketAddressStub& operator=(const ResolveIterator &_it); SocketAddressStub& operator=(const SocketAddress &_rsa); SocketAddressStub& operator=(const SocketAddressInet &_rsa); SocketAddressStub& operator=(const SocketAddressInet4 &_rsa); SocketAddressStub& operator=(const SocketAddressInet6 &_rsa); SocketAddressStub& operator=(const SocketAddressLocal &_rsa); operator const sockaddr*()const; void clear(); SocketInfo::Family family()const; bool isInet4()const; bool isInet6()const; bool isLocal()const; socklen_t size()const; int port()const; const sockaddr *sockAddr()const; private: const sockaddr *addr; socklen_t sz; }; //================================================================== //! Holds a generic socket address /*! On unix it can be either: inet_v4, inet_v6 or unix/local address */ struct SocketAddress{ private: union AddrUnion{ sockaddr addr; sockaddr_in inaddr4; sockaddr_in6 inaddr6; #ifndef SOLID_ON_WINDOWS sockaddr_un localaddr; #endif }; public: enum {Capacity = sizeof(AddrUnion)}; SocketAddress(); SocketAddress(const SocketAddressStub &); SocketAddress(const char* _addr, int _port); SocketAddress(const char* _path); SocketAddress& operator=(const SocketAddressStub &); SocketInfo::Family family()const; bool isInet4()const; bool isInet6()const; bool isLocal()const; bool isLoopback()const; bool isInvalid()const; bool empty()const; const socklen_t& size()const; const sockaddr* sockAddr()const; operator const sockaddr*()const; bool operator<(const SocketAddress &_raddr)const; bool operator==(const SocketAddress &_raddr)const; void address(const char*_str); const in_addr& address4()const; const in6_addr& address6()const; int port()const; bool port(int _port); void clear(); size_t hash()const; size_t addressHash()const; void path(const char*_pth); const char* path()const; private: friend class SocketDevice; operator sockaddr*(); sockaddr* sockAddr(); AddrUnion d; socklen_t sz; }; //================================================================== struct SocketAddressInet{ private: union AddrUnion{ sockaddr addr; sockaddr_in inaddr4; sockaddr_in6 inaddr6; }; public: enum {Capacity = sizeof(AddrUnion)}; typedef std::array<uint8_t, 4> DataArray4T; typedef std::array<uint8_t, 16> DataArray6T; SocketAddressInet(); SocketAddressInet(const SocketAddressStub &); SocketAddressInet(const char* _addr, int _port = 0); SocketAddressInet& operator=(const SocketAddressStub &); SocketInfo::Family family()const; bool isInet4()const; bool isInet6()const; bool isLoopback()const; bool isInvalid()const; bool empty()const; const socklen_t& size()const; const sockaddr* sockAddr()const; operator const sockaddr*()const; bool toBinary(DataArray4T &_bin, uint16_t &_port)const; bool toBinary(DataArray6T &_bin, uint16_t &_port)const; void fromBinary(const DataArray4T &_bin, uint16_t _port = 0); void fromBinary(const DataArray6T &_bin, uint16_t _port = 0); bool operator<(const SocketAddressInet &_raddr)const; bool operator==(const SocketAddressInet &_raddr)const; void address(const char*_str); const in_addr& address4()const; const in6_addr& address6()const; int port()const; bool port(int _port); void clear(); size_t hash()const; size_t addressHash()const; private: friend class SocketDevice; operator sockaddr*(); sockaddr* sockAddr(); AddrUnion d; socklen_t sz; }; //================================================================== struct SocketAddressInet4{ private: union AddrUnion{ sockaddr addr; sockaddr_in inaddr4; }; public: enum {Capacity = sizeof(AddrUnion)}; typedef std::array<uint8_t, 4> DataArrayT; SocketAddressInet4(); SocketAddressInet4(const SocketAddressStub &); SocketAddressInet4(const char* _addr, int _port = 0); SocketAddressInet4(uint32_t _addr, int _port); SocketAddressInet4(const DataArrayT &_addr, int _port = 0); //SocketAddressInet4& operator=(const ResolveIterator &); SocketAddressInet4& operator=(const SocketAddressStub &); SocketInfo::Family family()const; bool isInet4()const; bool isLoopback()const; bool isInvalid()const; socklen_t size()const; const sockaddr* sockAddr()const; //operator sockaddr*(){return sockAddr();} operator const sockaddr*()const; void toBinary(DataArrayT &_bin, uint16_t &_port)const; void toUInt(uint32_t &_addr, uint16_t &_port)const; void fromBinary(const DataArrayT &_bin, uint16_t _port = 0); void fromUInt(uint32_t _addr, uint16_t _port = 0); bool operator<(const SocketAddressInet4 &_raddr)const; bool operator==(const SocketAddressInet4 &_raddr)const; void address(const char*_str); const in_addr& address()const; int port()const; void port(int _port); void clear(); size_t hash()const; size_t addressHash()const; private: friend class SocketDevice; operator sockaddr*(); sockaddr* sockAddr(); AddrUnion d; }; //================================================================== struct SocketAddressInet6{ private: union AddrUnion{ sockaddr addr; sockaddr_in6 inaddr6; }; public: enum {Capacity = sizeof(AddrUnion)}; typedef std::array<uint8_t, 16> DataArrayT; SocketAddressInet6(); SocketAddressInet6(const SocketAddressStub &); SocketAddressInet6(const char* _addr, int _port = 0); SocketAddressInet6(const DataArrayT &_addr, int _port = 0); SocketAddressInet6& operator=(const SocketAddressStub &); SocketInfo::Family family()const; bool isInet6()const; bool isLoopback()const; bool isInvalid()const; bool empty()const; socklen_t size()const; const sockaddr* sockAddr()const; operator const sockaddr*()const; void toBinary(DataArrayT &_bin, uint16_t &_port)const; void fromBinary(const DataArrayT &_bin, uint16_t _port = 0); bool operator<(const SocketAddressInet6 &_raddr)const; bool operator==(const SocketAddressInet6 &_raddr)const; void address(const char*_str); const in6_addr& address()const; int port()const; void port(int _port); void clear(); size_t hash()const; size_t addressHash()const; private: friend class SocketDevice; operator sockaddr*(); sockaddr* sockAddr(); AddrUnion d; }; //================================================================== bool operator<(const in_addr &_inaddr1, const in_addr &_inaddr2); bool operator==(const in_addr &_inaddr1, const in_addr &_inaddr2); bool operator<(const in6_addr &_inaddr1, const in6_addr &_inaddr2); bool operator==(const in6_addr &_inaddr1, const in6_addr &_inaddr2); size_t in_addr_hash(const in_addr &_inaddr); size_t in_addr_hash(const in6_addr &_inaddr); std::ostream& operator<<(std::ostream& _ros, const SocketAddressInet4& _rsa); std::ostream& operator<<(std::ostream& _ros, const SocketAddressInet& _rsa); std::ostream& operator<<(std::ostream& _ros, const SocketAddress& _rsa); //================================================================== #ifndef SOLID_ON_WINDOWS struct SocketAddressLocal{ private: union AddrUnion{ sockaddr addr; sockaddr_un localaddr; }; public: enum {Capacity = sizeof(AddrUnion)}; SocketAddressLocal(); SocketAddressLocal(const char* _path); SocketAddressLocal& operator=(const SocketAddressStub &); SocketInfo::Family family()const; bool empty()const; const socklen_t& size()const; const sockaddr* sockAddr()const; operator const sockaddr*()const; bool operator<(const SocketAddressLocal &_raddr)const; bool operator==(const SocketAddressLocal &_raddr)const; void clear(); size_t hash()const; size_t addressHash()const; void path(const char*_pth); const char* path()const; private: friend class SocketDevice; operator sockaddr*(); sockaddr* sockAddr(); AddrUnion d; socklen_t sz; }; #endif //================================================================== #ifndef SOLID_HAS_NO_INLINES #include "solid/system/socketaddress.ipp" #endif //================================================================== }//namespace solid #endif
[ "vipalade@gmail.com" ]
vipalade@gmail.com
50f07db97abfe301bed5a4d5fc05cfca4d5b0270
933b95b8f6b640d5c4456ac573d4e74898f6c8f2
/mediapipe/examples/desktop/demo_run_graph_main_gpu.cc
687a704ebeeb190dc94cd0f94e979df726f3977e
[ "Apache-2.0" ]
permissive
lukereichold/mediapipe
03e8a602cf98bddb9e1a60c73149312d96f88c86
1cc2e6f549119054130d9e9a02012a7221da5992
refs/heads/master
2020-10-02T06:08:13.571951
2019-12-13T00:02:22
2019-12-13T00:02:22
227,718,415
1
0
Apache-2.0
2019-12-12T23:57:41
2019-12-12T23:57:40
null
UTF-8
C++
false
false
7,985
cc
// Copyright 2019 The MediaPipe Authors. // // 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. // // An example of sending OpenCV webcam frames into a MediaPipe graph. // This example requires a linux computer and a GPU with EGL support drivers. #include "mediapipe/framework/calculator_framework.h" #include "mediapipe/framework/formats/image_frame.h" #include "mediapipe/framework/formats/image_frame_opencv.h" #include "mediapipe/framework/port/commandlineflags.h" #include "mediapipe/framework/port/file_helpers.h" #include "mediapipe/framework/port/opencv_highgui_inc.h" #include "mediapipe/framework/port/opencv_imgproc_inc.h" #include "mediapipe/framework/port/opencv_video_inc.h" #include "mediapipe/framework/port/parse_text_proto.h" #include "mediapipe/framework/port/status.h" #include "mediapipe/gpu/gl_calculator_helper.h" #include "mediapipe/gpu/gpu_buffer.h" #include "mediapipe/gpu/gpu_shared_data_internal.h" constexpr char kInputStream[] = "input_video"; constexpr char kOutputStream[] = "output_video"; constexpr char kWindowName[] = "MediaPipe"; DEFINE_string( calculator_graph_config_file, "", "Name of file containing text format CalculatorGraphConfig proto."); DEFINE_string(input_video_path, "", "Full path of video to load. " "If not provided, attempt to use a webcam."); DEFINE_string(output_video_path, "", "Full path of where to save result (.mp4 only). " "If not provided, show result in a window."); ::mediapipe::Status RunMPPGraph() { std::string calculator_graph_config_contents; MP_RETURN_IF_ERROR(mediapipe::file::GetContents( FLAGS_calculator_graph_config_file, &calculator_graph_config_contents)); LOG(INFO) << "Get calculator graph config contents: " << calculator_graph_config_contents; mediapipe::CalculatorGraphConfig config = mediapipe::ParseTextProtoOrDie<mediapipe::CalculatorGraphConfig>( calculator_graph_config_contents); LOG(INFO) << "Initialize the calculator graph."; mediapipe::CalculatorGraph graph; MP_RETURN_IF_ERROR(graph.Initialize(config)); LOG(INFO) << "Initialize the GPU."; ASSIGN_OR_RETURN(auto gpu_resources, mediapipe::GpuResources::Create()); MP_RETURN_IF_ERROR(graph.SetGpuResources(std::move(gpu_resources))); mediapipe::GlCalculatorHelper gpu_helper; gpu_helper.InitializeForTest(graph.GetGpuResources().get()); LOG(INFO) << "Initialize the camera or load the video."; cv::VideoCapture capture; const bool load_video = !FLAGS_input_video_path.empty(); if (load_video) { capture.open(FLAGS_input_video_path); } else { capture.open(0); } RET_CHECK(capture.isOpened()); cv::VideoWriter writer; const bool save_video = !FLAGS_output_video_path.empty(); if (save_video) { LOG(INFO) << "Prepare video writer."; cv::Mat test_frame; capture.read(test_frame); // Consume first frame. capture.set(cv::CAP_PROP_POS_AVI_RATIO, 0); // Rewind to beginning. writer.open(FLAGS_output_video_path, mediapipe::fourcc('a', 'v', 'c', '1'), // .mp4 capture.get(cv::CAP_PROP_FPS), test_frame.size()); RET_CHECK(writer.isOpened()); } else { cv::namedWindow(kWindowName, /*flags=WINDOW_AUTOSIZE*/ 1); #if (CV_MAJOR_VERSION >= 3) && (CV_MINOR_VERSION >= 2) capture.set(cv::CAP_PROP_FRAME_WIDTH, 640); capture.set(cv::CAP_PROP_FRAME_HEIGHT, 480); capture.set(cv::CAP_PROP_FPS, 30); #endif } LOG(INFO) << "Start running the calculator graph."; ASSIGN_OR_RETURN(mediapipe::OutputStreamPoller poller, graph.AddOutputStreamPoller(kOutputStream)); MP_RETURN_IF_ERROR(graph.StartRun({})); LOG(INFO) << "Start grabbing and processing frames."; size_t frame_timestamp = 0; bool grab_frames = true; while (grab_frames) { // Capture opencv camera or video frame. cv::Mat camera_frame_raw; capture >> camera_frame_raw; if (camera_frame_raw.empty()) break; // End of video. cv::Mat camera_frame; cv::cvtColor(camera_frame_raw, camera_frame, cv::COLOR_BGR2RGB); if (!load_video) { cv::flip(camera_frame, camera_frame, /*flipcode=HORIZONTAL*/ 1); } // Wrap Mat into an ImageFrame. auto input_frame = absl::make_unique<mediapipe::ImageFrame>( mediapipe::ImageFormat::SRGB, camera_frame.cols, camera_frame.rows, mediapipe::ImageFrame::kGlDefaultAlignmentBoundary); cv::Mat input_frame_mat = mediapipe::formats::MatView(input_frame.get()); camera_frame.copyTo(input_frame_mat); // Prepare and add graph input packet. MP_RETURN_IF_ERROR( gpu_helper.RunInGlContext([&input_frame, &frame_timestamp, &graph, &gpu_helper]() -> ::mediapipe::Status { // Convert ImageFrame to GpuBuffer. auto texture = gpu_helper.CreateSourceTexture(*input_frame.get()); auto gpu_frame = texture.GetFrame<mediapipe::GpuBuffer>(); glFlush(); texture.Release(); // Send GPU image packet into the graph. MP_RETURN_IF_ERROR(graph.AddPacketToInputStream( kInputStream, mediapipe::Adopt(gpu_frame.release()) .At(mediapipe::Timestamp(frame_timestamp++)))); return ::mediapipe::OkStatus(); })); // Get the graph result packet, or stop if that fails. mediapipe::Packet packet; if (!poller.Next(&packet)) break; std::unique_ptr<mediapipe::ImageFrame> output_frame; // Convert GpuBuffer to ImageFrame. MP_RETURN_IF_ERROR(gpu_helper.RunInGlContext( [&packet, &output_frame, &gpu_helper]() -> ::mediapipe::Status { auto& gpu_frame = packet.Get<mediapipe::GpuBuffer>(); auto texture = gpu_helper.CreateSourceTexture(gpu_frame); output_frame = absl::make_unique<mediapipe::ImageFrame>( mediapipe::ImageFormatForGpuBufferFormat(gpu_frame.format()), gpu_frame.width(), gpu_frame.height(), mediapipe::ImageFrame::kGlDefaultAlignmentBoundary); gpu_helper.BindFramebuffer(texture); const auto info = mediapipe::GlTextureInfoForGpuBufferFormat(gpu_frame.format(), 0); glReadPixels(0, 0, texture.width(), texture.height(), info.gl_format, info.gl_type, output_frame->MutablePixelData()); glFlush(); texture.Release(); return ::mediapipe::OkStatus(); })); // Convert back to opencv for display or saving. cv::Mat output_frame_mat = mediapipe::formats::MatView(output_frame.get()); cv::cvtColor(output_frame_mat, output_frame_mat, cv::COLOR_RGB2BGR); if (save_video) { writer.write(output_frame_mat); } else { cv::imshow(kWindowName, output_frame_mat); // Press any key to exit. const int pressed_key = cv::waitKey(5); if (pressed_key >= 0 && pressed_key != 255) grab_frames = false; } } LOG(INFO) << "Shutting down."; if (writer.isOpened()) writer.release(); MP_RETURN_IF_ERROR(graph.CloseInputStream(kInputStream)); return graph.WaitUntilDone(); } int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); gflags::ParseCommandLineFlags(&argc, &argv, true); ::mediapipe::Status run_status = RunMPPGraph(); if (!run_status.ok()) { LOG(ERROR) << "Failed to run the graph: " << run_status.message(); } else { LOG(INFO) << "Success!"; } return 0; }
[ "jqtang@google.com" ]
jqtang@google.com
6184adc0bf35d1101ab51d13fbb1d7d4b94a7228
bae10b03c0b051a4e1b8a2110a3ad7fb3d33c84c
/G4beamline-3.06-source/g4bl/UNUSED/OLD/BLQtToolBar.cc
8d6830654b4b8a194dbb0606297087b29bc62160
[]
no_license
QUASAR-Group/Codes
a99e78e745e7e491cfb214030e168e489416fcbd
5d81c48c653d9cb409d941ab7234b913a123f1cc
refs/heads/master
2020-03-22T18:02:59.507670
2019-05-10T14:47:41
2019-05-10T14:47:41
140,433,391
0
1
null
null
null
null
UTF-8
C++
false
false
4,197
cc
// BLQtToolBar.cc #ifdef G4BL_VISUAL #ifdef G4BL_GUI #include <QAction> #include "G4UImanager.hh" #include "G4VViewer.hh" #include "G4Scene.hh" #include "G4ViewParameters.hh" #include "BLQtToolBar.h" #include "BLVisManager.hh" BLQtToolBar::BLQtToolBar() : QToolBar(), axesVisible(false) { nEv = new QLineEdit("1"); nEv->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred); nEv->setToolTip("Number of events per run."); //nEv->setMinimumWidth(40); //QSizePolicy sp = nEv->sizePolicy(); //sp.setHorizontalStretch(1); //nEv->setSizePolicy(sp); addWidget(nEv); QAction *a = addAction("Start Run"); connect(a, SIGNAL(triggered()), this, SLOT(run())); a->setToolTip("Start a run with the above number of events; draw them."); addSeparator(); a = addAction("Home"); connect(a, SIGNAL(triggered()), this, SLOT(home())); a->setToolTip("Restore the viewer to Home position."); a = addAction("Set Home"); connect(a, SIGNAL(triggered()), this, SLOT(setHome())); a->setToolTip("Set the Home position to the current view."); addSeparator(); a = addAction("Top View"); connect(a, SIGNAL(triggered()), this, SLOT(setViewpoint())); a->setToolTip("Show system viewed from top (+y)."); a = addAction("Left View"); connect(a, SIGNAL(triggered()), this, SLOT(setViewpoint())); a->setToolTip("Show system viewed from left side (+x)."); a = addAction("Right View"); connect(a, SIGNAL(triggered()), this, SLOT(setViewpoint())); a->setToolTip("Show system viewed from right side (-x)."); a = addAction("Front View"); connect(a, SIGNAL(triggered()), this, SLOT(setViewpoint())); a->setToolTip("Show system viewed from front (+z)."); a = addAction("Rear View"); connect(a, SIGNAL(triggered()), this, SLOT(setViewpoint())); a->setToolTip("Show system viewed from rear (-z)."); a = addAction("Bottom View"); connect(a, SIGNAL(triggered()), this, SLOT(setViewpoint())); a->setToolTip("Show system viewed from bottom (-y)."); addSeparator(); a = addAction("Show Axes"); connect(a, SIGNAL(triggered()), this, SLOT(showAxes())); a->setToolTip("Display (Red,Green,Blue) Axes at the origin."); getHomeCommands(); } void BLQtToolBar::run() { int n = nEv->text().toInt(); QString cmd("/run/beamOn "+QString::number(n)); G4UImanager::GetUIpointer()->ApplyCommand(qPrintable(cmd)); } void BLQtToolBar::home() { Q_FOREACH(QString s, homeCommands) { G4UImanager::GetUIpointer()->ApplyCommand(qPrintable(s)); } } void BLQtToolBar::setHome() { getHomeCommands(); } void BLQtToolBar::setViewpoint() { QAction *a = dynamic_cast<QAction*>(sender()); if(a != 0) { QString text = a->text(); QStringList cmds; // make it unlikely new viewpoint is along up vector cmds << "/vis/viewer/set/upVector 0.315 -.823 .51"; if(text.startsWith("Front")) cmds << "/vis/viewer/set/viewpointVector 0 0 1" << "/vis/viewer/set/upVector 0 1 0"; else if(text.startsWith("Rear")) cmds << "/vis/viewer/set/viewpointVector 0 0 -1" << "/vis/viewer/set/upVector 0 1 0"; else if(text.startsWith("Top")) cmds << "/vis/viewer/set/viewpointVector 0 1 0" << "/vis/viewer/set/upVector 1 0 0"; else if(text.startsWith("Bottom")) cmds << "/vis/viewer/set/viewpointVector 0 -1 0" << "/vis/viewer/set/upVector -1 0 0"; else if(text.startsWith("Left")) cmds << "/vis/viewer/set/viewpointVector 1 0 0" << "/vis/viewer/set/upVector 0 1 0"; else if(text.startsWith("Right")) cmds << "/vis/viewer/set/viewpointVector -1 0 0" << "/vis/viewer/set/upVector 0 1 0"; Q_FOREACH(QString s, cmds) { G4UImanager::GetUIpointer()->ApplyCommand(qPrintable(s)); } } } void BLQtToolBar::showAxes() { G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/add/axes"); } void BLQtToolBar::getHomeCommands() { G4Point3D p = BLVisManager::getObject()->GetCurrentScene() ->GetStandardTargetPoint(); G4VViewer *viewer = BLVisManager::getObject()->GetCurrentViewer(); const G4ViewParameters &param = viewer->GetViewParameters(); G4String s = param.CameraAndLightingCommands(p).c_str(); homeCommands = QString(s.c_str()).split("\n"); } #endif // G4BL_GUI #else // !G4BL_VISUAL int dummy_g4bltoolbar=0; #endif // G4BL_VISUAL
[ "volodymyr.rodin@gmail.com" ]
volodymyr.rodin@gmail.com
7a6a0b1445b8507c105554b023f1ba3f4e87e08e
c5c4b8c6231c55df710c3bd680a4395fe8ff2d63
/include/gphyx/PhysicsManagerT.h
d13a25eb89b3059a8098bb425fff938823dd9088
[]
no_license
grynca/gphyx
19ccbe77140e69f13e64b37287be3eb95e9a68ce
6793e753d8703a91d2fb7ebe0b9397d8caa9166d
refs/heads/master
2021-04-26T22:14:07.885065
2018-03-06T09:07:42
2018-03-06T09:07:42
124,048,791
0
0
null
null
null
null
UTF-8
C++
false
false
4,684
h
#ifndef PHYSICSMANAGERT_H #define PHYSICSMANAGERT_H #include "gphyx_config.h" #include "joints.h" #include "maths/shapes/Shape.h" #include "maths/shapes/OverlapHelper.h" #include "types/containers/PolyPool.h" namespace grynca { // keeps internal copy of Speeds for better cache coherence // (in hash map with key BodyIdT - Hasher<BodyIdT> must be available) template <typename Derived/*CRTP*/, typename BodiesPairHandler> class PhysicsManagerT : private SAPManagerC<Derived, gphyx::SAPDomain> { public: typedef SAPManagerC<Derived, gphyx::SAPDomain> Base; typedef PolyPool<JointTypes::getTypesCount(), Joint, Derived> JointsPool; typedef ObjFunc<void()> OverlapCbFunc; PhysicsManagerT(f32 updates_per_sec = 60); Base& accSAP(); BodiesPairHandler& accBPH(); void setUPS(f32 updates_per_sec); f32 getUpdatesPerSec()const; f32 getUpdateDt()const; void addCollider(Collider& coll, const Transform& tr, Index body_id); void removeCollider(Collider& coll); void moveCollider(const Collider& coll, const Vec2& move_vec); void updateCollider(const Collider& coll, const Transform& tr); // calculates tentative velocity void updateVelocity(Body& b, Speed& spd_io); void updateContacts(); void solve(); void updateTransform(const Speed& spd, Transform& tr_io); Vec2 updateTransform2(const Speed& spd, Transform& tr_io); // returns move vector which caller can use for moving with collider u32 getContactsCount()const; // Joints template <typename JointType, typename... InitArgs> JointType& addJoint(Index body_id1, Index body_id2, InitArgs&&... args); void removeJoint(Index id); template <typename JointType> const JointType& getJoint(Index id)const; template <typename JointType> JointType& accJoint(Index id); const Joint& getJoint(Index id)const; Joint& accJoint(Index id); // OverlapCallbacks template <typename Functor> void setBeginOverlapCb(u32 group1_id, u32 group2_id); template <typename Functor> void setOnOverlapCb(u32 group1_id, u32 group2_id); template <typename Functor> void setEndOverlapCb(u32 group1_id, u32 group2_id); // setting for multiple groups specified with mask template <typename Functor> void setBeginOverlapCbs(u32 group1_id, CollisionGroupsMask groups2_mask); template <typename Functor> void setOnOverlapCbs(u32 group1_id, CollisionGroupsMask groups2_mask); template <typename Functor> void setEndOverlapCbs(u32 group1_id, CollisionGroupsMask groups2_mask); void clear(); std::string getOverlapCallbacksDebugString()const; // in case you want to call it yourself (e.g. do some custom handling + default) void defaultPhysicalOverlap(); protected: friend class SAPManagerBase<gphyx::SAPDomain>; struct PreStepJoints_ { template <typename TP, typename T> static void f(Derived& pm); }; struct StepJoints_ { template <typename TP, typename T> static void f(Derived& pm, bool& small); }; // overriden from base bool beforeBoxesOverlap_(gphyx::SAPBox&, gphyx::SAPBox&); void afterBoxesOverlap_(gphyx::SAPBox&, gphyx::SAPBox&); Derived& getAsD_(); void initCallbacks_(); OverlapCbFunc& accCbs_(OverlapCbFunc* cbs_arr, u32 row, u32 col); template <typename OnSpeedFunc> void solveInner_(const OnSpeedFunc& osf); void getSpeedsFromBph_(u32 &spdA_id_out, u32 &spdB_id_out); ARect transformBound_(const Collider& coll, const Transform& tr); f32 ups_, dt_; BodiesPairHandler bph_; OverlapHelper ohlp_; gphyx::SpeedsHashMapT speeds_; // overlap callbacks OverlapCbFunc begin_op_cbs_[GPHYX_MAX_CGROUPS*GPHYX_MAX_CGROUPS]; OverlapCbFunc on_op_cbs_[GPHYX_MAX_CGROUPS*GPHYX_MAX_CGROUPS]; OverlapCbFunc end_op_cbs_[GPHYX_MAX_CGROUPS*GPHYX_MAX_CGROUPS]; // contact joints (last only 1 tick) fast_vector<ContactJoint<1> > contacts1_; fast_vector<ContactJoint<2> > contacts2_; // persistant joints JointsPool joints_; }; template <typename BodiesPairHandler> class PhysicsManagerSimpleT : public PhysicsManagerT<PhysicsManagerSimpleT<BodiesPairHandler>, BodiesPairHandler> {}; } #undef PMT #include "PhysicsManagerT.inl" #endif //PHYSICSMANAGERT_H
[ "grynca@gmail.com" ]
grynca@gmail.com
e1437c5ff3af4e2c0dcc1f622ee2889a620c0fcf
33691f66e73fdfe7d90caebf51bc39b60ffd8a38
/UserInterface/GeneratedFiles/Debug/moc_DrawController.cpp
e5e6633f7a39e8f296eecded6d18cd4a221e341b
[]
no_license
Frenor/CCCP
9bc494dc5ed0bc049dc71a3735897ea33e663bbf
91994c73af62aa6f3c1b7a812ee1ae6f8092a30a
refs/heads/master
2020-05-07T09:23:06.667397
2014-11-24T16:30:43
2014-11-24T16:30:43
25,698,291
1
0
null
null
null
null
UTF-8
C++
false
false
5,414
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'DrawController.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../../DrawController.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'DrawController.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_DrawController_t { QByteArrayData data[13]; char stringdata[156]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_DrawController_t, stringdata) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_DrawController_t qt_meta_stringdata_DrawController = { { QT_MOC_LITERAL(0, 0, 14), QT_MOC_LITERAL(1, 15, 15), QT_MOC_LITERAL(2, 31, 0), QT_MOC_LITERAL(3, 32, 7), QT_MOC_LITERAL(4, 40, 5), QT_MOC_LITERAL(5, 46, 8), QT_MOC_LITERAL(6, 55, 10), QT_MOC_LITERAL(7, 66, 9), QT_MOC_LITERAL(8, 76, 9), QT_MOC_LITERAL(9, 86, 11), QT_MOC_LITERAL(10, 98, 12), QT_MOC_LITERAL(11, 111, 25), QT_MOC_LITERAL(12, 137, 18) }, "DrawController\0setActiveEntity\0\0Entity*\0" "reset\0setModel\0DrawModel*\0DrawModel\0" "doneEvent\0cancelEvent\0actorClicked\0" "vtkSmartPointer<vtkActor>\0actorDoubleClicked" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_DrawController[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 7, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // slots: name, argc, parameters, tag, flags 1, 1, 49, 2, 0x0a /* Public */, 4, 0, 52, 2, 0x0a /* Public */, 5, 1, 53, 2, 0x0a /* Public */, 8, 0, 56, 2, 0x0a /* Public */, 9, 0, 57, 2, 0x0a /* Public */, 10, 1, 58, 2, 0x0a /* Public */, 12, 1, 61, 2, 0x0a /* Public */, // slots: parameters QMetaType::Void, 0x80000000 | 3, 2, QMetaType::Void, QMetaType::Void, 0x80000000 | 6, 7, QMetaType::Void, QMetaType::Void, QMetaType::Void, 0x80000000 | 11, 2, QMetaType::Void, 0x80000000 | 11, 2, 0 // eod }; void DrawController::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { DrawController *_t = static_cast<DrawController *>(_o); switch (_id) { case 0: _t->setActiveEntity((*reinterpret_cast< Entity*(*)>(_a[1]))); break; case 1: _t->reset(); break; case 2: _t->setModel((*reinterpret_cast< DrawModel*(*)>(_a[1]))); break; case 3: _t->doneEvent(); break; case 4: _t->cancelEvent(); break; case 5: _t->actorClicked((*reinterpret_cast< vtkSmartPointer<vtkActor>(*)>(_a[1]))); break; case 6: _t->actorDoubleClicked((*reinterpret_cast< vtkSmartPointer<vtkActor>(*)>(_a[1]))); break; default: ; } } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { switch (_id) { default: *reinterpret_cast<int*>(_a[0]) = -1; break; case 0: switch (*reinterpret_cast<int*>(_a[1])) { default: *reinterpret_cast<int*>(_a[0]) = -1; break; case 0: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< Entity* >(); break; } break; case 2: switch (*reinterpret_cast<int*>(_a[1])) { default: *reinterpret_cast<int*>(_a[0]) = -1; break; case 0: *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< DrawModel* >(); break; } break; } } } const QMetaObject DrawController::staticMetaObject = { { &GraphicController::staticMetaObject, qt_meta_stringdata_DrawController.data, qt_meta_data_DrawController, qt_static_metacall, 0, 0} }; const QMetaObject *DrawController::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *DrawController::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_DrawController.stringdata)) return static_cast<void*>(const_cast< DrawController*>(this)); return GraphicController::qt_metacast(_clname); } int DrawController::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = GraphicController::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 7) qt_static_metacall(this, _c, _id, _a); _id -= 7; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 7) qt_static_metacall(this, _c, _id, _a); _id -= 7; } return _id; } QT_END_MOC_NAMESPACE
[ "fredrik@nordmoen.com" ]
fredrik@nordmoen.com
d63a959664866c84dade07e89eb2023d64a4c0d0
a01851ad710157c72e2a122a1f7735639f6db225
/L921. Minimum Add to Make Parentheses Valid.cpp
e536c312d18ac7168d6e3bb4991854591f32f776
[]
no_license
we-are-kicking-lhx/xinxinalgorithm
9089629b210a5a0e199f374c74afc24742644f03
e988e3bca6438af6933378f374afb2627a5708fe
refs/heads/master
2021-06-27T10:50:22.979162
2020-11-23T07:01:23
2020-11-23T07:01:23
173,912,054
2
0
null
null
null
null
UTF-8
C++
false
false
382
cpp
class Solution { public: int minAddToMakeValid(string S) { int n = 0, r = 0; for (int i = 0; i < S.size(); i++) { if (S[i] == '(') r++; else { if (r != 0) r--; else n++; } } return n + r; } };
[ "1917089423@qq.com" ]
1917089423@qq.com
08046449bcd5ba2554d9eaa2080a6281144e2167
5c675c06498225ae57662796f252eb0a9ec48947
/graphicmap.cpp
73a64afde1a6c0ae4ea6d2c2bc4f8326c59189e4
[]
no_license
aminrd/SharifWars
86e5bc1b095c71c37b95d32a48b5a7aac55b89c3
30b4ac1c1c9410b3737675392c93ceb0295634a3
refs/heads/master
2020-04-06T20:10:46.685075
2019-08-20T17:32:12
2019-08-20T17:32:12
157,764,302
0
0
null
null
null
null
UTF-8
C++
false
false
2,523
cpp
#include "graphicmap.h" #include <QPainter> #include <gameobject.h> #include <QHeaderView> #include <QScrollBar> #include "map.h" #include "player.h" #include "gameobject.h" GraphicMap::GraphicMap(QTableWidget* _table, Map* _map, QWidget* parent){ map=_map; maptable=_table; } void GraphicMap::paintEvent(QPaintEvent* event){ QWidget::paintEvent(event); QPainter p(this); int width_block=this->width()/map->GetColcount(); int height_block=this->height()/map->GetRowcount(); int start_height=this->height()- (height_block*map->GetRowcount()); start_height/=2; int start_width=this->width()- (width_block*map->GetColcount()); start_width/=2; for(int i=0; i<map->GetRowcount(); i++) for(int j=0; j<map->GetColcount(); j++){ int number=0;//number of game object in the block vector <GameObject*> temp_checker; temp_checker=map->getBlock(i,j)->getObjects(); number=0; //-----------------------------------------------------------------show empty block if(map->getBlock(i,j)->getEmpty()==true) { //show empty block p.setBrush(QColor(20,80,20,220)); } else{ Player s; int id=temp_checker[number]->getPlayer()->getPlayerID(); switch(id){ case -1: p.setBrush(QColor(200,200,200,220)); break; case 1: p.setBrush(QColor(80,20,20,220)); break; case 2: p.setBrush(QColor(20,20,80,220)); break; case 3: p.setBrush(QColor(80,80,20,220)); break; case 4: p.setBrush(QColor(80,20,80,220)); break; case 5: p.setBrush(QColor(20,80,80,220)); break; } } p.setPen(Qt::NoPen); p.drawRect(j*width_block+start_width,i*height_block+start_height,width_block,height_block); } p.setBrush(Qt::NoBrush); p.setPen(Qt::blue); p.drawRect(start_width+maptable->horizontalScrollBar()->value()*width_block , start_height+maptable->verticalScrollBar()->value()*height_block , width_block*47, height_block*18); }
[ "aghaee@cs.ubc.ca" ]
aghaee@cs.ubc.ca
78248540162ac681b330e2fb6ff550e2ec68d342
8f8ae70775eda42f71d0e6354b9caba4576f3310
/firefoamcases/cases/singleBox/constant/LESProperties
8f3596985f84227fd8eaa161347ebcd7ffdda033
[]
no_license
hong27/myFireFoamCases
6070bb35781717b58bdec2f1a35be79077ce8111
8709c8aa7f1aa1718f3fbf0c7cdc7b284f531c57
refs/heads/master
2020-06-14T01:38:28.073535
2019-07-02T12:03:25
2019-07-02T12:03:25
194,851,906
0
0
null
null
null
null
UTF-8
C++
false
false
1,955
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object LESProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // LESModel oneEqEddy; //LESModel WALE; //delta vanDriest; delta cubeRootVol; turbulence on; printCoeffs on; WALECoeffs { cw 0.5; } oneEqEddyCoeffs { ck 0.03; Prt 1; } cubeRootVolCoeffs { deltaCoeff 1; } PrandtlCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } smoothCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } maxDeltaRatio 1.1; } Cdelta 0.158; } vanDriestCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } smoothCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } maxDeltaRatio 1.1; } Aplus 26; Cdelta 0.158; } smoothCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } maxDeltaRatio 1.1; } // ************************************************************************* //
[ "linjianhongljh@gmail.com" ]
linjianhongljh@gmail.com
76fdeb34332eaf2115e27c3e0343729e190e93f0
81464366d3d2ab91a6600be8646d0856d413d8be
/Sum_on_right_side.cpp
19ad21245feb1460671142c5725faf4835ddb4c5
[]
no_license
SunnyJaiswal5297/Basic_c_programs
08f289d04817f81222ceaacd7362e47fbae2935e
a2fd6168ce4ff075be6488c172200da21058dd93
refs/heads/master
2022-12-03T09:53:35.189234
2020-07-28T17:17:17
2020-07-28T17:17:17
283,201,986
1
0
null
null
null
null
UTF-8
C++
false
false
671
cpp
#include<iostream> #include<time.h> using namespace std; int main() { clock_t start=clock(); int t; cin>>t; while(t--) { int n,i,j; cin>>n; int arr[n],b[n]; for(i=0;i<n;i++) { cin>>arr[i]; b[i]=0; } for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(arr[i]>arr[j]) { b[i]++; } } } for(i=0;i<n;i++) cout<<b[i]<<" "; cout<<"\n"; } cout<<((clock()-start)/CLOCKS_PER_SEC); return 0; }
[ "s2jaiswal.sj@gmail.com" ]
s2jaiswal.sj@gmail.com
5e5758d8f9f1e65e6255f1ee142804ab51b59f0e
4cdd282955b32e41705c1dc3c077e7625af740ef
/main.cpp
ad4fd81644adc0e3151caaa631050a9fb90afb98
[]
no_license
Makgalemela/Checkers-Game
bb096deb33a60a67ada3ed2af9551c0497a5c3c8
3131543446ff828258fce82a615c9101ca852fda
refs/heads/master
2023-02-13T06:59:28.921853
2021-01-01T14:46:49
2021-01-01T14:46:49
322,437,680
0
0
null
2021-01-10T10:15:58
2020-12-17T23:31:49
C++
UTF-8
C++
false
false
1,028
cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <cstdlib> #include <time.h> #include <string> #include "checkers.h" using namespace std; ///The function read the board sizes and feed them to the game engine vector<int> boardSizes(){ int temp_size = 0; ifstream inFile; inFile.open("input.txt"); vector<int> arrSizes; while (inFile.is_open() && inFile>>temp_size){ if(temp_size%2 ==0){ if(temp_size >5){ if(temp_size <13){ arrSizes.push_back(temp_size); } } } } return arrSizes; } int main() { srand(time(NULL)); vector<int> boardsize(boardSizes()); for(int i = 0 ; i < boardsize.size(); i++){ checkers c(boardsize.at(i)); c.startGame(); while(c.startNewGame()==false){ c.randomiser(); c.secondAlgorithm(); } c.finalScore(); c.writeHistory(" "); } return 0; }
[ "gugurachelmvelase102@gmail.com" ]
gugurachelmvelase102@gmail.com
c7864cad8799cce9a427e8517375e76358e0b6bb
3a8b30c331b4e0e6f81cb7823e98ee667b3b2180
/QSW/wov/ribbonemitter.h
ab78e8308b37607d5f6ef0d16346a5b24e75933f
[ "MIT" ]
permissive
sidsukana/QSpellWork
2f67ed88267731eacdef693651b3740facc85d2e
d25a76935e506d347c862442f891dab6dab12380
refs/heads/qsw-2.0
2022-07-11T05:05:55.445428
2022-06-27T11:50:17
2022-06-27T11:50:17
16,616,945
20
23
MIT
2022-06-27T11:50:28
2014-02-07T14:30:18
C++
UTF-8
C++
false
false
1,274
h
#ifndef RIBBON_EMITTER_H #define RIBBON_EMITTER_H #include <QObject> #include <QOpenGLShaderProgram> #include <QOpenGLBuffer> #include <QOpenGLFunctions> #include "m2structures.h" #include "animatedvalue.h" #include "mvp.h" #include "particleemitter.h" struct Ribbon { QVector3D position; QVector3D up; }; class RibbonEmitter : public QObject { Q_OBJECT public: RibbonEmitter(const M2RibbonEmitter &emitter, const quint32 *sequences, const QByteArray &data, QOpenGLFunctions* funcs); void update(quint32 animation, quint32 time, QMatrix4x4 boneMatrix); void render(QOpenGLShaderProgram *program, MVP viewProjection); qint32 getBoneId() const; qint32 getTextureId() const; private: void initialize(); qint32 m_bone; QVector3D m_position; QList<qint32> m_textures; QList<qint32> m_blending; AnimatedValue<QVector3D> m_color; AnimatedValue<qint16> m_opacity; AnimatedValue<float> m_above; AnimatedValue<float> m_below; float m_segments; float m_length; float m_angle; QList<Ribbon> m_ribbons; ParticleVertex *m_vertices; QOpenGLBuffer *m_vertexBuffer; bool m_initialized; QOpenGLFunctions* m_funcs; }; #endif
[ "pgsilent@gmail.com" ]
pgsilent@gmail.com
700f3ead5c13fc61207d2c4b3cf23d7406940a7c
6c5fb5b74be518a5103b812f3b648c4eab8f99d5
/competitive_programming/chapter3_greedy_involving_sorting/uva11100.cc
27eb5624a04c3085d0dd0bede47c4fc3d1db76dc
[]
no_license
thyagostall/competitive
1bfc44232773693edbfb59526650f47622d69791
db5ed16ae0ef745fc407f6baabb0df2e505eb85e
refs/heads/master
2021-01-22T06:44:35.390582
2018-10-03T03:56:14
2018-10-03T03:56:14
81,784,040
0
0
null
2017-06-17T17:11:15
2017-02-13T04:14:27
C++
UTF-8
C++
false
false
1,765
cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; ostream &operator<<(ostream &out, const vector<int> &v); ostream &operator<<(ostream &out, const vector<vector<int>> &v); vector<vector<int>> compute_bags(vector<int> &bag_sizes); int compute_bag_qty(vector<int> &bag_sizes); int main() { int bag_qty, case_num = 0; while (cin >> bag_qty && bag_qty) { vector<int> bag_sizes(bag_qty, 0); for (int i = 0; i < bag_qty; i++) { cin >> bag_sizes[i]; } if (case_num++) cout << endl; vector<vector<int>> bags = compute_bags(bag_sizes); cout << bags.size() << endl; cout << bags; } } ostream &operator<<(ostream &out, const vector<int> &v) { for (int i = 0; i < v.size(); i++) { if (i) out << " "; out << v[i]; } return out; } ostream &operator<<(ostream &out, const vector<vector<int>> &v) { for (int i = 0; i < v.size(); i++) { out << v[i] << endl; } return out; } vector<vector<int>> compute_bags(vector<int> &bag_sizes) { vector<vector<int>> bags; sort(bag_sizes.begin(), bag_sizes.end()); int bag_qty = compute_bag_qty(bag_sizes); for (int i = 0; i < bag_qty; i++) { vector<int> bag; for (int j = i; j < bag_sizes.size(); j += bag_qty) { bag.push_back(bag_sizes[j]); } bags.push_back(bag); } return bags; } int compute_bag_qty(vector<int> &bag_sizes) { int bag_qty = 1, current_streak = 1; for (int i = 1; i < bag_sizes.size(); i++) { if (bag_sizes[i] == bag_sizes[i - 1]) { bag_qty = max(++current_streak, bag_qty); } else { current_streak = 1; } } return bag_qty; }
[ "thstall@gmail.com" ]
thstall@gmail.com
ace1f5777dc271c732c973f417d7005cfe8214f9
1834c0796ee324243f550357c67d8bcd7c94de17
/SDK/TCF_WBP_Item_Death_structs.hpp
e095b66b73560bb94b5189140b0a3de04928bd36
[]
no_license
DarkCodez/TCF-SDK
ce41cc7dab47c98b382ad0f87696780fab9898d2
134a694d3f0a42ea149a811750fcc945437a70cc
refs/heads/master
2023-08-25T20:54:04.496383
2021-10-25T11:26:18
2021-10-25T11:26:18
423,337,506
1
0
null
2021-11-01T04:31:21
2021-11-01T04:31:20
null
UTF-8
C++
false
false
290
hpp
#pragma once // The Cycle Frontier (1.X) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "TCF_Basic.hpp" #include "TCF_ScreenSystem_classes.hpp" #include "TCF_UMG_classes.hpp" #include "TCF_Prospect_classes.hpp" namespace SDK { } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "30532128+pubgsdk@users.noreply.github.com" ]
30532128+pubgsdk@users.noreply.github.com
9068580d40fd09204699ab35eb9f16d5d239729f
a8597563c1349d1ff2820cfc528d3d8d05b74bc7
/Webkit-owb/generated_sources/WebCore/JSHTMLAppletElement.cpp
387d2350b2bddbc88c5e2f3821e5686878eaa7f9
[]
no_license
lentinic/EAWebKit
68f8288b96d3b629f0466e94287ece37820a322d
132ee635f9cd4cfce92ad4da823c83d54b95e993
refs/heads/master
2021-01-15T22:09:35.942573
2011-06-28T16:41:01
2011-06-28T16:41:01
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
10,094
cpp
/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * This file was modified by Electronic Arts Inc Copyright © 2009 */ #include "config.h" #include "JSHTMLAppletElement.h" #include <wtf/GetPtr.h> #include "AtomicString.h" #include "HTMLAppletElement.h" #include "JSHTMLAppletElementCustom.h" #include "KURL.h" using namespace KJS; namespace WebCore { /* Hash table */ static const HashTableValue JSHTMLAppletElementTableValues[13] = { { "align", (intptr_t)JSHTMLAppletElement::AlignAttrNum, DontDelete, 0 }, { "alt", (intptr_t)JSHTMLAppletElement::AltAttrNum, DontDelete, 0 }, { "archive", (intptr_t)JSHTMLAppletElement::ArchiveAttrNum, DontDelete, 0 }, { "code", (intptr_t)JSHTMLAppletElement::CodeAttrNum, DontDelete, 0 }, { "codeBase", (intptr_t)JSHTMLAppletElement::CodeBaseAttrNum, DontDelete, 0 }, { "height", (intptr_t)JSHTMLAppletElement::HeightAttrNum, DontDelete, 0 }, { "hspace", (intptr_t)JSHTMLAppletElement::HspaceAttrNum, DontDelete, 0 }, { "name", (intptr_t)JSHTMLAppletElement::NameAttrNum, DontDelete, 0 }, { "object", (intptr_t)JSHTMLAppletElement::ObjectAttrNum, DontDelete, 0 }, { "vspace", (intptr_t)JSHTMLAppletElement::VspaceAttrNum, DontDelete, 0 }, { "width", (intptr_t)JSHTMLAppletElement::WidthAttrNum, DontDelete, 0 }, { "constructor", (intptr_t)JSHTMLAppletElement::ConstructorAttrNum, DontEnum, 0 }, { 0, 0, 0, 0 } }; static const HashTable JSHTMLAppletElementTable = { 127, JSHTMLAppletElementTableValues, 0 }; /* Hash table for constructor */ static const HashTableValue JSHTMLAppletElementConstructorTableValues[1] = { { 0, 0, 0, 0 } }; static const HashTable JSHTMLAppletElementConstructorTable = { 0, JSHTMLAppletElementConstructorTableValues, 0 }; class JSHTMLAppletElementConstructor : public DOMObject { public: JSHTMLAppletElementConstructor(ExecState* exec) : DOMObject(exec->lexicalGlobalObject()->objectPrototype()) { putDirect(exec->propertyNames().prototype, JSHTMLAppletElementPrototype::self(exec), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); JSValue* getValueProperty(ExecState*, int token) const; virtual const ClassInfo* classInfo() const { return &s_info; } static const ClassInfo s_info; virtual bool implementsHasInstance() const { return true; } }; const ClassInfo JSHTMLAppletElementConstructor::s_info = { "HTMLAppletElementConstructor", 0, &JSHTMLAppletElementConstructorTable, 0 }; bool JSHTMLAppletElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot<JSHTMLAppletElementConstructor, DOMObject>(exec, &JSHTMLAppletElementConstructorTable, this, propertyName, slot); } JSValue* JSHTMLAppletElementConstructor::getValueProperty(ExecState* exec, int token) const { // The token is the numeric value of its associated constant return jsNumber(exec, token); } /* Hash table for prototype */ static const HashTableValue JSHTMLAppletElementPrototypeTableValues[1] = { { 0, 0, 0, 0 } }; static const HashTable JSHTMLAppletElementPrototypeTable = { 0, JSHTMLAppletElementPrototypeTableValues, 0 }; const ClassInfo JSHTMLAppletElementPrototype::s_info = { "HTMLAppletElementPrototype", 0, &JSHTMLAppletElementPrototypeTable, 0 }; JSObject* JSHTMLAppletElementPrototype::self(ExecState* exec) { // Changed by Paul Pedriana (1/2009), as the static new was creating a memory leak. If this gets called a lot then we can consider making it a static pointer that's freed on shutdown. const Identifier prototypeIdentifier(exec, "[[JSHTMLAppletElement.prototype]]"); return KJS::cacheGlobalObject<JSHTMLAppletElementPrototype>(exec, prototypeIdentifier); } const ClassInfo JSHTMLAppletElement::s_info = { "HTMLAppletElement", &JSHTMLElement::s_info, &JSHTMLAppletElementTable , 0 }; JSHTMLAppletElement::JSHTMLAppletElement(JSObject* prototype, HTMLAppletElement* impl) : JSHTMLElement(prototype, impl) { } bool JSHTMLAppletElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { if (canGetItemsForName(exec, static_cast<HTMLAppletElement*>(impl()), propertyName)) { slot.setCustom(this, nameGetter); return true; } if (customGetOwnPropertySlot(exec, propertyName, slot)) return true; return getStaticValueSlot<JSHTMLAppletElement, Base>(exec, &JSHTMLAppletElementTable, this, propertyName, slot); } JSValue* JSHTMLAppletElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case AlignAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->align()); } case AltAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->alt()); } case ArchiveAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->archive()); } case CodeAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->code()); } case CodeBaseAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->codeBase()); } case HeightAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->height()); } case HspaceAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->hspace()); } case NameAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->name()); } case ObjectAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->object()); } case VspaceAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->vspace()); } case WidthAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); return jsString(exec, imp->width()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; } void JSHTMLAppletElement::put(ExecState* exec, const Identifier& propertyName, JSValue* value) { if (customPut(exec, propertyName, value)) return; lookupPut<JSHTMLAppletElement, Base>(exec, propertyName, value, &JSHTMLAppletElementTable, this); } void JSHTMLAppletElement::putValueProperty(ExecState* exec, int token, JSValue* value) { switch (token) { case AlignAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setAlign(valueToStringWithNullCheck(exec, value)); break; } case AltAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setAlt(valueToStringWithNullCheck(exec, value)); break; } case ArchiveAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setArchive(valueToStringWithNullCheck(exec, value)); break; } case CodeAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setCode(valueToStringWithNullCheck(exec, value)); break; } case CodeBaseAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setCodeBase(valueToStringWithNullCheck(exec, value)); break; } case HeightAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setHeight(valueToStringWithNullCheck(exec, value)); break; } case HspaceAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setHspace(valueToStringWithNullCheck(exec, value)); break; } case NameAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setName(valueToStringWithNullCheck(exec, value)); break; } case ObjectAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setObject(valueToStringWithNullCheck(exec, value)); break; } case VspaceAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setVspace(valueToStringWithNullCheck(exec, value)); break; } case WidthAttrNum: { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(impl()); imp->setWidth(valueToStringWithNullCheck(exec, value)); break; } } } JSValue* JSHTMLAppletElement::getConstructor(ExecState* exec) { // Changed by Paul Pedriana (1/2009), as the static new was creating a memory leak. If this gets called a lot then we can consider making it a static pointer that's freed on shutdown. const Identifier constructorIdentifier(exec, "[[HTMLAppletElement.constructor]]"); return KJS::cacheGlobalObject<JSHTMLAppletElementConstructor>(exec, constructorIdentifier); } }
[ "nanashi4129@gmail.com" ]
nanashi4129@gmail.com
20c31a6cded7b078a69fc90cb7b5c4098bc00cfb
0cdbd51c06a8385f928bcaea7ae58da5d5d635fa
/W07 - Exam2 Review/Operator-overloading/Rational.cpp
8548b9c671ed9cd87b923032f7f3800cf421f82f
[]
no_license
yilin2548/UIndy-CSCI-156-50
dc6f155d410570833d39e27891a38c3a84f81568
852065df15ab3d0352c1c481dc018636e9cef484
refs/heads/master
2021-05-05T10:17:41.195367
2018-04-30T19:53:49
2018-04-30T19:53:49
117,909,544
0
0
null
null
null
null
UTF-8
C++
false
false
3,155
cpp
// Name: Yilin Liu-Leitke // Date: 2/15/18 // Desc: Implementation of the Rational class. // iostream is not neccassary because cout is not used. #include <sstream> // Be sure to include the .h file! #include "Rational.h" using namespace std; // Default constructor Rational::Rational(){ numerator = 1; denominator = 1; } // Overloaded constructor Rational::Rational(const int &top, const int &bottom){ numerator = top; denominator = bottom; } // Setters void Rational::setNumerator(const int &top){ numerator = top; } void Rational::setDenominator(const int &bottom){ denominator = bottom; } // Getters int Rational::getNumerator() const{ return numerator; } int Rational::getDenominator() const{ return denominator; } // Print string Rational::print() const{ stringstream s; s << numerator << "/" << denominator; return s.str(); } // multBy(int) void Rational::multBy(const int &n){ numerator = numerator * n; } // addBy(int) void Rational::addBy(const int &n){ numerator += denominator * n; } // mult(Rational) Rational Rational::mult(const Rational &other) const{ // Rational ret; // ret.numerator = numerator * other.numerator; // ret.denominator = denominator * other.denominator; // return ret; // Or you can do the following one line: return Rational(numerator * other.numerator, denominator * other.denominator); } // add(Rational) Rational Rational::add(const Rational &other) const{ Rational ret; ret.numerator = numerator * other.denominator + other.numerator * denominator; ret.denominator = denominator * other.denominator; return ret; } // isEqualTo(Rational) bool Rational::isEqualTo(const Rational &other) const{ int ltop = numerator * other.denominator; int rtop = other.numerator * denominator; return ltop == rtop; } // isGreaterThan(Rational) bool Rational::isGreaterThan(const Rational &other) const{ int ltop = numerator * other.denominator; int rtop = other.numerator * denominator; return ltop > rtop; } // isGreaterOrEqualTo bool Rational::isGreaterOrEqualTo(const Rational &other) const{ return isEqualTo(other) || isGreaterThan(other); } // operator overloading Rational Rational::operator+(const Rational &rhs) const{ return add(rhs); } Rational Rational::operator-(const Rational &rhs) const{ Rational ret; ret.numerator = numerator * rhs.denominator - rhs.numerator * denominator; ret.denominator = denominator * rhs.denominator; return ret; // return add(negate(rhs)); } Rational Rational::operator*(const Rational &rhs) const{ return mult(rhs); } Rational Rational::operator/(const Rational &rhs) const{ return mult(Rational(rhs.denominator, rhs.numerator)); // return mult(invert(rhs)); } bool Rational::operator<(const Rational &rhs) const{ return !isGreaterOrEqualTo(rhs); } bool Rational::operator>(const Rational &rhs) const{ return isGreaterThan(rhs); } bool Rational::operator==(const Rational &rhs) const{ return isEqualTo(rhs); } ostream& operator<<(ostream &o, const Rational &r){ o << r.print(); return o; }
[ "yilin2548@gmail.com" ]
yilin2548@gmail.com
0c7903d97b801e391b007fe046db1de07164bd5a
ff5b427352226fc308b8f10ebce3f563c51cf9bd
/Algorithms/Strings/Sherlock and Anagrams.cpp
ccd351ab48f989cd523280c2b3f29964ec903602
[]
no_license
davidffa/HackerRank-Cpp
622520cab05764abde301ce44e2a8730aa28e83c
9bcbbcea8a66811d182915eedfb6965d7907ea01
refs/heads/master
2022-11-05T11:00:42.827861
2020-06-21T20:45:42
2020-06-21T20:45:42
272,500,629
3
0
null
null
null
null
UTF-8
C++
false
false
526
cpp
#include <bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; int ans=0; map<vector<int>, int> mp; for (int i=1; i<=s.length(); i++) { for (int j=0; j<s.length()&&j+i<=s.length(); j++) { string s1= s.substr(j, i); vector<int> v(26, 0); for (char c : s1) ++v[c-'a']; ++mp[v]; } } for (auto p : mp) { ans += p.second*(p.second-1)/2; } cout << ans << "\n"; } int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { solve(); } return 0; }
[ "davidfilipeamorim@gmail.com" ]
davidfilipeamorim@gmail.com
0ae32cafdc3d2bf431ef71945806ee9920995739
309d7e225969cacc90b9c812a9226c2386651d2b
/sources/core/inc/TimerController.class.hpp
0d09a069a9ecaec3903c0f379478c0db9671a59a
[]
no_license
Hadrien-Estela/Gbmu
a62350e532c7f63a4f9ca6202694c787705ec323
cc61e80867ee6bff00d186b3e7007af50e403bd3
refs/heads/master
2021-09-28T21:04:03.284880
2018-11-20T15:54:15
2018-11-20T15:54:15
117,264,806
1
0
null
null
null
null
UTF-8
C++
false
false
2,820
hpp
// ************************************************************************** // // // // ::: :::::::: // // TimerController.class.hpp :+: :+: :+: // // +:+ +:+ +:+ // // By: hestela <hestela@student.42.fr> +#+ +:+ +#+ // // +#+#+#+#+#+ +#+ // // Created: 2016/01/01 14:06:59 by hestela #+# #+# // // Updated: 2016/01/01 14:06:59 by hestela ### ########.fr // // // // ************************************************************************** // #ifndef TIMERCONTROLLER_CLASS_HPP # define TIMERCONTROLLER_CLASS_HPP # include <iostream> # include <fstream> # include "Cpu.class.hpp" # include "SerialIO.class.hpp" # include "Defines.hpp" /* ************************* USED REGISTERS ************************ -- DIV Register (Divider Register) [0xFF04] This register is incremented 16384 (~16779 on SGB) times a second. Writing any value sets it to $00. -- TIMA Register (Timer counter) [0xFF05] This timer is incremented by a clock frequency specified by the TAC register ($FF07). The timer generates an interrupt when it overflows. -- TMA Register (Timer Modulo) [0xFF06] When the TIMA overflows, this data will be loaded. -- TAC Register (Timer Control) [0xFF07] BIT 2: Timer Stop. ( 0 = Stop | 1 = start ) BITS 0-1: Input Clock Select 00: 4. 096 KHz 01: 262. 144 Khz 10: 65. 536 KHz 11: 16. 384 KHz */ namespace Gbmu { class TimerController { private: enum InputClock // values of Bits 01 of TAC register in cycles { Clock_00 = 1024, Clock_01 = 16, Clock_10 = 64, Clock_11 = 256 }; private: Cpu* _cpu; // get a pointer to the Cpu ( the parent ) struct SerialIO::IORegisters* _IOREGS; // get a pointer to the IO registers size_t _cyclesTIMA; // Cycle counter for TIMA size_t _cyclesDIV; // Cycle counter for DIV public: TimerController( Cpu* cpu ); virtual ~TimerController( void ); void reset ( void ); void update ( uint8_t const& cycles ); void onWriteDIV ( void ); void onWriteTAC ( uint8_t const& value ); void saveState ( std::fstream& file ); void loadState ( std::fstream& file ); private: bool timerStarted ( void ) const; size_t InputClock ( void ) const; }; } #else namespace Gbmu { class TimerController; } #endif // !TIMERCONTROLLER_CLASS_HPP
[ "hadrienestela@gmail.com" ]
hadrienestela@gmail.com
a8750460986afff6527e7deebba25ee6f0894d23
c27b97c85778eaf84a5d1b36c5f52687bbeb705a
/C++/1004.cpp
a4ff41b615013c6aee21277b58fa4aa40951ca20
[]
no_license
ongss/coding
c7d158caba72a5f795aca87821543d5d1a0afd14
679adbac41b03b88f47c568967e7dc99eaf22b67
refs/heads/master
2021-04-29T14:01:32.823293
2018-02-16T15:12:21
2018-02-16T15:12:21
121,764,614
0
0
null
null
null
null
UTF-8
C++
false
false
3,432
cpp
#include<stdio.h> int main() { int a,b,cnt=0,d,e,i,j,k=0,l,clas,n=0,stn; scanf("%d %d",&a,&b); int cls[1000]={0},std[1000]={0},line[1000]={0},nwline[1000]={0},clsline[1000]; for(i=0;i<b;i++) { scanf("%d %d",&cls[i],&std[i]); } for(i=0;;i++) { scanf("%c",&b); if(b=='E') { scanf("%d",&line[k]); for(j=0;j<b;j++) { if(line[k]==std[j]) { clsline[k]=cls[j]; k++; } if(clsline[j]!=clsline[j+1]&&clsline[j+1]!=0) { clas=clsline[j+1]; stn=line[j+1]; for(e=k-1;e>=0;e--) { if(clas==clsline[e]) { for(d=k-e-1;d>0;d--) { line[d+1]=line[d]; clsline[d+1]=clsline[d]; } clsline[e]=clas; line[e]=stn; } } } } } if(b=='D') cnt++; if(b=='X') break; } /*for(i=0;i<k;i++) { for(j=0;j<k;j++) { if(clsline[j]!=0) { clas=clsline[j]; break; } } for(j=0;j<k;j++) { if(clas==clsline[j]) { nwline[n]=line[j]; clsline[j]=0; n++; } } }*/ for(i=0;i<k;i++) { printf("%d ",line[i]); //printf("%d" ,clsline[i]); } scanf(" "); }
[ "ong54321@hotmail.com" ]
ong54321@hotmail.com
cc1d7bc242aeb257ad594fb4295d7921f9e424a2
5df1a677af9379c9a82f1b29359a65ad8cbc385e
/CodeForces/PastContest/777/B.cpp
1c6561d5a968d659f4fd5f5d44f7b9b42841d956
[]
no_license
heyshb/Competitive-Programming
92741a4e7234e1ebce685c1b870f1287bee18f1a
363ef78d950afb53f0e5f1d2329f27dd7b9a44c2
refs/heads/master
2021-12-15T03:12:37.676111
2021-12-01T14:32:25
2021-12-01T14:32:25
122,315,094
1
0
null
null
null
null
UTF-8
C++
false
false
939
cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; int N; char s[1010]; int sum[2][10]; int v[2][1010]; int len[2]; int main() { scanf("%d",&N); scanf("%s",s); for (int i=0;i<N;i++)sum[0][s[i]-'0']++; scanf("%s",s); for (int i=0;i<N;i++)sum[1][s[i]-'0']++; for (int i=0;i<2;i++) { len[i] = 0; for (int j=0;j<10;j++) for (int k=0;k<sum[i][j];k++) v[i][++len[i]] = j; } v[1][N+1] = -1; v[0][N+1] = -1; /* for (int i=0;i<2;i++) { for (int j=1;j<=N;j++)printf("%d",v[i][j]); puts(""); } */ for (int i=1;i<=N;i++)printf("%d",v[0][i]);puts(""); for (int i=1;i<=N;i++)printf("%d",v[0][i]);puts(""); int now=1, ans=N; for (int i=1;i<=N;i++) { while(now<=N && v[1][now]<v[0][i])now++; if (v[1][now]>=v[0][i]) ans--; } printf("%d\n",ans); now=1; ans=0; for (int i=1;i<=N;i++) { while(now<=N && v[1][now]<=v[0][i])now++; if (v[1][now]>v[0][i]) ans++; } printf("%d\n",ans); }
[ "heyshb@vip.qq.com" ]
heyshb@vip.qq.com
bee2cd261b6b3c57df3c85e950b9601357c47688
c7ebab4f0bb325fddd99e2e6952241e6d5177faf
/EventLoopThread.h
fad3725c33023384341417f46d25065e6aa98a7a
[]
no_license
zhuqiweigit/mymuduo
d1cd19a4a10ad7c2d2d327dafa3a6c9379d8c76a
31701d4b72cf29051bf721ea1d720535b048b39c
refs/heads/main
2023-03-08T03:49:18.547494
2021-02-26T12:51:39
2021-02-26T12:51:39
342,574,386
0
0
null
null
null
null
UTF-8
C++
false
false
621
h
#pragma once #include <functional> #include <mutex> #include <condition_variable> #include <string> #include "noncopyable.h" #include "Thread.h" class EventLoop; class EventLoopThread{ public: using ThreadInitCallBack = std::function<void(EventLoop*)>; EventLoopThread(const ThreadInitCallBack& cb = ThreadInitCallBack(), const std::string &name = std::string()); ~EventLoopThread(); EventLoop* startLoop(); private: void threadFunc(); EventLoop* loop_; bool exiting_; Thread thread_; std::mutex mutex_; std::condition_variable cond_; ThreadInitCallBack callback_; };
[ "XXX@xx.com" ]
XXX@xx.com
292ae258db5a43c5064a4dae991337c97fcd9943
06f93fbd24e9bb5592e1bfc56d5a5969414c042f
/7. Reverse Integer.cpp
4fccd5ee675fc19717a7c5560210b8e838804332
[]
no_license
bigdaddyyjm/LeetCode
1c78cd087bf2043e296cb4090333d1c35d20aa89
b016bc003427c6808f350d076d4d99c51f603d12
refs/heads/master
2021-03-27T19:30:48.945711
2017-12-25T15:03:45
2017-12-25T15:03:45
115,010,146
0
0
null
null
null
null
UTF-8
C++
false
false
840
cpp
class Solution { public: int reverse(int x) { int flag; unsigned long long ans=0; int ele; vector<int> list_x; if(x>=0){flag=1;} else {flag=0;} int a = abs(x); //if(unsigned(x)>INT_MAX)return 0; while(a!=0){ ele = a%10; list_x.push_back(ele); a = a/10; } //int last_ans = 0; for(int i=0;i<list_x.size();i++){ //if(ans > ans + pow(10,(list_x.size()-i-1))*list_x[i])return 0; ans = ans + pow(10,(list_x.size()-i-1))*list_x[i]; //if (last_ans > ans)return 0; } if(ans > INT_MAX)return 0; if(flag == 1)return ans; else return 0-ans; //{ // if(flag == 1) return ans; // else return 0-ans; //} } };
[ "yangjingmin@Pilgrim" ]
yangjingmin@Pilgrim
cad0289820035fbfeb4c4031f41bae3f9e5f0ff3
5168d97461d4335784082f88ba2f90d3dee71769
/Coding Questions/2-D Array/Class Questions/AvgFilter.cpp
95287f4ce07dda8fdd874af57d92d84e6edab083
[]
no_license
parasjain929/Karma
eb4021397f085cbc24a08b2651d2d20103047484
7e52e7f5698f8a6e15684800ee336ae24dae8c36
refs/heads/master
2020-06-01T23:27:10.785809
2019-07-05T08:57:04
2019-07-05T08:57:04
190,964,636
1
2
null
null
null
null
UTF-8
C++
false
false
634
cpp
#include<bits/stdc++.h> using namespace std; int main() { int i,j,temp,n,x,y; cin>>n; int a[n][n]; for(i=0;i<n;i++) { for(j=0;j<n;j++) cin>>a[i][j]; } for(i=1;i<n-1;i++) { temp=0; for(j=1;j<n-1;j++) { for(x=-1;x<=1;x++) { for(y=-1;y<=1;y++) { temp+=a[i+x][j+y]; } } a[i][j]=temp/9; } } for(i=0;i<n;i++) { for(j=0;j<n;j++) {cout<<a[i][n]; } cout<<endl;} }
[ "parasjain929@gmail.com" ]
parasjain929@gmail.com
e2af09d4ce19a1e26cde2d0c86922ceb643dacf5
ac68ee4921c4a3fe613ecf5207b4e09bb3e9aef7
/day-04/day4.cpp
cb40809f88b1bbcce2b64781cfb1e7cc4a4c4332
[ "MIT" ]
permissive
WhoSoup/aoc2019
33f000c483c61f684fec616047e6a9026e6dd013
90f68bb555e93d41a9ffc8e84bcda4548d41d26c
refs/heads/master
2020-09-22T09:21:36.452539
2019-12-22T11:55:26
2019-12-22T11:55:26
225,135,836
0
0
null
null
null
null
UTF-8
C++
false
false
907
cpp
#include <iostream> #include <vector> std::pair<bool,bool> valid(int pw) { bool repeat = false; bool repeat2 = false; int run = 0; int prev = 10; // going reverse, so higher than 9 while (pw > 0) { int r = pw % 10; if (prev < r) { return std::pair<bool,bool>{false,false}; } if (prev == r) { repeat = true; run++; } else { if (run == 1) { repeat2 = true; } run = 0; } pw /= 10; prev = r; } return std::pair<bool,bool>{repeat, repeat2 || run == 1}; } int main() { int start = 353096, end = 843212; int v = 0, v2 = 0; for (int i = start; i <= end; i++) { auto p = valid(i); if (p.first) v++; if (p.second) v2++; } std::cout << v << std::endl; std::cout << v2 << std::endl; }
[ "who.soup@gmail.com" ]
who.soup@gmail.com
2f21af0814056322fdb3c8a7ce82ba46d38fd994
208524c136c96caf0aa2cd1799c8ff6eb84f466f
/study/12_3197.cpp
a8026be6935eb76374abeaccebf02298df534151
[]
no_license
jisun-16/beakjoon-online-judge-with-c-
96d04198a5de67f04183464cf08cff0ad5cb087c
f229466cb025b186a5fbc369a9b36ca2282627b1
refs/heads/master
2021-11-25T14:20:19.502289
2021-11-06T05:59:06
2021-11-06T05:59:06
205,304,301
0
0
null
null
null
null
UHC
C++
false
false
1,606
cpp
#include<iostream> #include<queue> #include<cstring> using namespace std; const int dx[]={-1,0,1,0},dy[]={0,-1,0,1}; int r,c; int area_num[1501][1501]; char lake[1501][1501]; bool visited[1501][1501]; pair<int,int> swan; queue<pair<int,int> > water_q,water_nq,swan_q,swan_nq; bool avail(int x,int y){ return x>=0&&x<r&&y>=0&&y<c; } int main(){ ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); cin>>r>>c; for(int i=0;i<r;i++) for(int j=0;j<c;j++){ cin>>lake[i][j]; if(lake[i][j]=='L') swan={i,j}; if(lake[i][j]!='X') water_q.push({i,j}); } int ans=0,fin=false; swan_q.push({swan}); visited[swan.first][swan.second]=true; while(true){ while(!swan_q.empty()&&!fin){ int x=swan_q.front().first,y=swan_q.front().second; swan_q.pop(); for(int i=0;i<4;i++){ int nx=x+dx[i],ny=y+dy[i]; if(!avail(nx,ny)||visited[nx][ny]) continue; visited[nx][ny]=true; if(lake[nx][ny]=='.') swan_q.push({nx,ny}); else if(lake[nx][ny]=='X') swan_nq.push({nx,ny}); else if(lake[nx][ny]=='L'){ fin=true; break; } } }//만날 수 있는지 체크 if(fin){ cout<<ans<<'\n'; return 0; } while(!water_q.empty()){ int x=water_q.front().first,y=water_q.front().second; water_q.pop(); for(int i=0;i<4;i++){ int nx=x+dx[i],ny=y+dy[i]; if(!avail(nx,ny)) continue; if(lake[nx][ny]=='X'){ lake[nx][ny]='.'; water_nq.push({nx,ny}); } } }//얼음->물 water_q=water_nq; swan_q=swan_nq; water_nq=queue<pair<int,int> >(); swan_nq=queue<pair<int,int> >(); ans++; } }
[ "limjisun97@naver.com" ]
limjisun97@naver.com
231361dd8fd2f10d46b47cbaf174d3691cb73f60
7bdce218461971fb5804059038de061fde3c1187
/MarkdownParserCore/Regexpression.cpp
01897d74134c2da4ecbd6ea14e68ddf01e51ac61
[]
no_license
jh-isw/MarkdownParser
691d023b62ae4ddf26faf42fd9e10d9b7c22365f
0af83e1013f9dfe53be537df1efb66fcf906ebfa
refs/heads/master
2021-07-10T05:46:47.470307
2017-10-09T08:01:06
2017-10-09T08:01:06
106,251,967
0
0
null
null
null
null
UTF-8
C++
false
false
3,228
cpp
// // Created by blacknote on 08.04.17. // #include "stdafx.h" #include <stdio.h> #include <stdarg.h> #include <iostream> #include "Regexpression.h" Regexpression::Regexpression() { } void Regexpression::regexh1(std::stringstream* instrstream) { std::string line; std::stringstream retstrstream; std::regex regh1search("^#{1}[^#]"); std::regex regh1op("^#{1}[\\s\\t]+|^#{1}"); while (getline(*instrstream, line)) { if (!isEof(instrstream)) { if (std::regex_search(line, regh1search)) { line = regex_replace(line, regh1op, "<h1>"); std::regex regh1clcond1("[\\s\\t]+$"); std::regex regh1clcond2("$"); if (std::regex_search(line, regh1clcond1)) line = regex_replace(line, regh1clcond1, "</h1>"); else if (std::regex_search(line, regh1clcond2)) line = regex_replace(line, regh1clcond2, "</h1>"); retstrstream << line << std::endl; } else { retstrstream << line << std::endl; } } else { std::cout << "failed to read line" << std::endl; } } instrstream->swap(retstrstream); } void Regexpression::regexh2(std::stringstream* instrstream) { std::string line; std::stringstream retstrstream; std::regex regh2search("^#{2}[^#]"); std::regex regh2op("^#{2}[\\s\\t]+|^#{2}"); while (getline(*instrstream, line)) { if (!isEof(instrstream)) { if (std::regex_search(line, regh2search)) { line = regex_replace(line, regh2op, "<h2>"); std::regex regh2clcond1("[\\s\\t]+$"); std::regex regh2clcond2("$"); if (std::regex_search(line, regh2clcond1)) line = regex_replace(line, regh2clcond1, "</h2>"); else if (std::regex_search(line, regh2clcond2)) line = regex_replace(line, regh2clcond2, "</h2>"); retstrstream << line << std::endl; } else { retstrstream << line << std::endl; } } else { std::cout << "failed to read line" << std::endl; } } instrstream->swap(retstrstream); } /* std::string Regexpression::regexlist(std::string) { return std::__cxx11::string(); } */ void Regexpression::regexbold(std::stringstream* instrstream) { std::string line; std::stringstream retstrstream; std::regex regboldsearch("(\\*\\*)(\\w)*(\\*\\*)"); std::regex regh2op("(?<=(\\*\\*){1})"); while (getline(*instrstream, line)) { if (!isEof(instrstream)) { if (std::regex_search(line, regboldsearch)) { line = regex_replace(line, regh2op, "<b>"); //std::regex regh2clcond1( "[\\s\\t]+$" ); //std::regex regh2clcond2( "$" ); //if( std::regex_search( line, regh2clcond1 ) ) line = regex_replace(line, regh2op, "</b>"); //else if( std::regex_search( line, regh2clcond2 ) ) //line = regex_replace( line, regh2clcond2, "</h2>" ); retstrstream << line << std::endl; } else { retstrstream << line << std::endl; } } else { std::cout << "failed to read line" << std::endl; } } instrstream->swap(retstrstream); } /* std::string Regexpression::regexitalic(std::string) { return std::__cxx11::string(); } std::string Regexpression::regexquote(std::string) { return std::__cxx11::string(); }*/ bool Regexpression::isEof( std::stringstream* instrstream ) { if (instrstream->eof()) return true; return false; }
[ "jan.hecht@jh-isw.de" ]
jan.hecht@jh-isw.de
19136515ec06a0f5377695103548a2b02832822c
36466c39d3ae94c2f936d4fdfe0fd4b034bbfa80
/3rdparty/mkldnn/src/common/mkldnn_debug.cpp
7fbef3f04b551ae813b5b8c9bab5a14118c35a18
[ "Apache-2.0", "Intel", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "BSL-1.0", "MIT", "BSD-2-Clause", "Zlib", "NCSA", "LicenseRef-scancode-generic-cla", "BSD-2-Clause-Views" ]
permissive
zhouhuaman/dgt
ccc674dc6abb055eeb5b88eaa0177de3a051b362
a1df50efa3b635c20ddaa6bc5068e5f7bb863b5e
refs/heads/master
2022-11-27T21:53:05.980980
2020-01-13T09:33:14
2020-01-13T09:33:14
233,558,790
1
2
Apache-2.0
2022-11-23T15:05:17
2020-01-13T09:29:56
C++
UTF-8
C++
false
false
11,090
cpp
/******************************************************************************* * Copyright 2018 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ /* DO NOT EDIT, AUTO-GENERATED */ #include <assert.h> #include "mkldnn_debug.h" #include "mkldnn_types.h" const char *mkldnn_status2str(mkldnn_status_t v) { if (v == mkldnn_success) return "success"; if (v == mkldnn_out_of_memory) return "out_of_memory"; if (v == mkldnn_try_again) return "try_again"; if (v == mkldnn_invalid_arguments) return "invalid_arguments"; if (v == mkldnn_not_ready) return "not_ready"; if (v == mkldnn_unimplemented) return "unimplemented"; if (v == mkldnn_iterator_ends) return "iterator_ends"; if (v == mkldnn_runtime_error) return "runtime_error"; if (v == mkldnn_not_required) return "not_required"; assert(!"unknown status"); return "unknown status"; } const char *mkldnn_dt2str(mkldnn_data_type_t v) { if (v == mkldnn_data_type_undef) return "undef"; if (v == mkldnn_f32) return "f32"; if (v == mkldnn_s32) return "s32"; if (v == mkldnn_s16) return "s16"; if (v == mkldnn_s8) return "s8"; if (v == mkldnn_u8) return "u8"; assert(!"unknown dt"); return "unknown dt"; } const char *mkldnn_rmode2str(mkldnn_round_mode_t v) { if (v == mkldnn_round_nearest) return "round_nearest"; if (v == mkldnn_round_down) return "round_down"; assert(!"unknown rmode"); return "unknown rmode"; } const char *mkldnn_fmt2str(mkldnn_memory_format_t v) { if (v == mkldnn_format_undef) return "undef"; if (v == mkldnn_any) return "any"; if (v == mkldnn_blocked) return "blocked"; if (v == mkldnn_x) return "x"; if (v == mkldnn_nc) return "nc"; if (v == mkldnn_ncw) return "ncw"; if (v == mkldnn_nwc) return "nwc"; if (v == mkldnn_nchw) return "nchw"; if (v == mkldnn_nhwc) return "nhwc"; if (v == mkldnn_chwn) return "chwn"; if (v == mkldnn_ncdhw) return "ncdhw"; if (v == mkldnn_ndhwc) return "ndhwc"; if (v == mkldnn_oi) return "oi"; if (v == mkldnn_io) return "io"; if (v == mkldnn_oiw) return "oiw"; if (v == mkldnn_wio) return "wio"; if (v == mkldnn_oihw) return "oihw"; if (v == mkldnn_hwio) return "hwio"; if (v == mkldnn_hwio_s8s8) return "hwio_s8s8"; if (v == mkldnn_ihwo) return "ihwo"; if (v == mkldnn_oidhw) return "oidhw"; if (v == mkldnn_dhwio) return "dhwio"; if (v == mkldnn_goiw) return "goiw"; if (v == mkldnn_goihw) return "goihw"; if (v == mkldnn_hwigo) return "hwigo"; if (v == mkldnn_hwigo_s8s8) return "hwigo_s8s8"; if (v == mkldnn_goidhw) return "goidhw"; if (v == mkldnn_ntc) return "ntc"; if (v == mkldnn_tnc) return "tnc"; if (v == mkldnn_ldsnc) return "ldsnc"; if (v == mkldnn_ldigo) return "ldigo"; if (v == mkldnn_ldgoi) return "ldgoi"; if (v == mkldnn_ldgo) return "ldgo"; if (v == mkldnn_nCw8c) return "nCw8c"; if (v == mkldnn_nCw16c) return "nCw16c"; if (v == mkldnn_nChw8c) return "nChw8c"; if (v == mkldnn_nChw16c) return "nChw16c"; if (v == mkldnn_nCdhw8c) return "nCdhw8c"; if (v == mkldnn_nCdhw16c) return "nCdhw16c"; if (v == mkldnn_Owi8o) return "Owi8o"; if (v == mkldnn_OIw8i8o) return "OIw8i8o"; if (v == mkldnn_OIw8o8i) return "OIw8o8i"; if (v == mkldnn_OIw16i16o) return "OIw16i16o"; if (v == mkldnn_OIw16o16i) return "OIw16o16i"; if (v == mkldnn_Oiw16o) return "Oiw16o"; if (v == mkldnn_Owi16o) return "Owi16o"; if (v == mkldnn_OIw8i16o2i) return "OIw8i16o2i"; if (v == mkldnn_OIw8o16i2o) return "OIw8o16i2o"; if (v == mkldnn_IOw16o16i) return "IOw16o16i"; if (v == mkldnn_oIhw8i) return "oIhw8i"; if (v == mkldnn_oIhw16i) return "oIhw16i"; if (v == mkldnn_OIhw8i8o) return "OIhw8i8o"; if (v == mkldnn_OIhw16i16o) return "OIhw16i16o"; if (v == mkldnn_OIhw4i16o4i) return "OIhw4i16o4i"; if (v == mkldnn_OIhw4i16o4i_s8s8) return "OIhw4i16o4i_s8s8"; if (v == mkldnn_OIhw8i16o2i) return "OIhw8i16o2i"; if (v == mkldnn_OIhw8o16i2o) return "OIhw8o16i2o"; if (v == mkldnn_OIhw8o8i) return "OIhw8o8i"; if (v == mkldnn_OIhw16o16i) return "OIhw16o16i"; if (v == mkldnn_IOhw16o16i) return "IOhw16o16i"; if (v == mkldnn_Oihw8o) return "Oihw8o"; if (v == mkldnn_Oihw16o) return "Oihw16o"; if (v == mkldnn_Ohwi8o) return "Ohwi8o"; if (v == mkldnn_Ohwi16o) return "Ohwi16o"; if (v == mkldnn_OhIw16o4i) return "OhIw16o4i"; if (v == mkldnn_oIdhw8i) return "oIdhw8i"; if (v == mkldnn_oIdhw16i) return "oIdhw16i"; if (v == mkldnn_OIdhw8i8o) return "OIdhw8i8o"; if (v == mkldnn_OIdhw8o8i) return "OIdhw8o8i"; if (v == mkldnn_Odhwi8o) return "Odhwi8o"; if (v == mkldnn_OIdhw16i16o) return "OIdhw16i16o"; if (v == mkldnn_OIdhw16o16i) return "OIdhw16o16i"; if (v == mkldnn_Oidhw16o) return "Oidhw16o"; if (v == mkldnn_Odhwi16o) return "Odhwi16o"; if (v == mkldnn_OIdhw8i16o2i) return "OIdhw8i16o2i"; if (v == mkldnn_gOwi8o) return "gOwi8o"; if (v == mkldnn_gOIw8o8i) return "gOIw8o8i"; if (v == mkldnn_gOIw8i8o) return "gOIw8i8o"; if (v == mkldnn_gOIw16i16o) return "gOIw16i16o"; if (v == mkldnn_gOIw16o16i) return "gOIw16o16i"; if (v == mkldnn_gOiw16o) return "gOiw16o"; if (v == mkldnn_gOwi16o) return "gOwi16o"; if (v == mkldnn_gOIw8i16o2i) return "gOIw8i16o2i"; if (v == mkldnn_gOIw8o16i2o) return "gOIw8o16i2o"; if (v == mkldnn_gIOw16o16i) return "gIOw16o16i"; if (v == mkldnn_gOIhw8i8o) return "gOIhw8i8o"; if (v == mkldnn_gOIhw16i16o) return "gOIhw16i16o"; if (v == mkldnn_gOIhw4i16o4i) return "gOIhw4i16o4i"; if (v == mkldnn_gOIhw4i16o4i_s8s8) return "gOIhw4i16o4i_s8s8"; if (v == mkldnn_gOIhw8i16o2i) return "gOIhw8i16o2i"; if (v == mkldnn_gOIhw8o16i2o) return "gOIhw8o16i2o"; if (v == mkldnn_gOIhw8o8i) return "gOIhw8o8i"; if (v == mkldnn_gOIhw16o16i) return "gOIhw16o16i"; if (v == mkldnn_gIOhw16o16i) return "gIOhw16o16i"; if (v == mkldnn_gOihw8o) return "gOihw8o"; if (v == mkldnn_gOihw16o) return "gOihw16o"; if (v == mkldnn_gOhwi8o) return "gOhwi8o"; if (v == mkldnn_gOhwi16o) return "gOhwi16o"; if (v == mkldnn_Goihw8g) return "Goihw8g"; if (v == mkldnn_Goihw16g) return "Goihw16g"; if (v == mkldnn_gOhIw16o4i) return "gOhIw16o4i"; if (v == mkldnn_gOIdhw8i8o) return "gOIdhw8i8o"; if (v == mkldnn_gOIdhw8o8i) return "gOIdhw8o8i"; if (v == mkldnn_gOdhwi8o) return "gOdhwi8o"; if (v == mkldnn_gOIdhw8i16o2i) return "gOIdhw8i16o2i"; if (v == mkldnn_gOIdhw16i16o) return "gOIdhw16i16o"; if (v == mkldnn_gOIdhw16o16i) return "gOIdhw16o16i"; if (v == mkldnn_gOidhw16o) return "gOidhw16o"; if (v == mkldnn_gOdhwi16o) return "gOdhwi16o"; if (v == mkldnn_wino_fmt) return "wino_fmt"; if (v == mkldnn_ldigo_p) return "ldigo_p"; if (v == mkldnn_ldgoi_p) return "ldgoi_p"; if (v == mkldnn_format_last) return "format_last"; assert(!"unknown fmt"); return "unknown fmt"; } const char *mkldnn_prop_kind2str(mkldnn_prop_kind_t v) { if (v == mkldnn_prop_kind_undef) return "undef"; if (v == mkldnn_forward_training) return "forward_training"; if (v == mkldnn_forward_inference) return "forward_inference"; if (v == mkldnn_forward_scoring) return "forward_scoring"; if (v == mkldnn_forward) return "forward"; if (v == mkldnn_backward) return "backward"; if (v == mkldnn_backward_data) return "backward_data"; if (v == mkldnn_backward_weights) return "backward_weights"; if (v == mkldnn_backward_bias) return "backward_bias"; assert(!"unknown prop_kind"); return "unknown prop_kind"; } const char *mkldnn_prim_kind2str(mkldnn_primitive_kind_t v) { if (v == mkldnn_undefined_primitive) return "undef"; if (v == mkldnn_memory) return "memory"; if (v == mkldnn_view) return "view"; if (v == mkldnn_reorder) return "reorder"; if (v == mkldnn_shuffle) return "shuffle"; if (v == mkldnn_concat) return "concat"; if (v == mkldnn_concat_inplace) return "concat_inplace"; if (v == mkldnn_sum) return "sum"; if (v == mkldnn_convolution) return "convolution"; if (v == mkldnn_deconvolution) return "deconvolution"; if (v == mkldnn_eltwise) return "eltwise"; if (v == mkldnn_relu) return "relu"; if (v == mkldnn_softmax) return "softmax"; if (v == mkldnn_pooling) return "pooling"; if (v == mkldnn_lrn) return "lrn"; if (v == mkldnn_batch_normalization) return "batch_normalization"; if (v == mkldnn_inner_product) return "inner_product"; if (v == mkldnn_convolution_relu) return "convolution_relu"; if (v == mkldnn_rnn) return "rnn"; assert(!"unknown prim_kind"); return "unknown prim_kind"; } const char *mkldnn_alg_kind2str(mkldnn_alg_kind_t v) { if (v == mkldnn_alg_kind_undef) return "undef"; if (v == mkldnn_convolution_direct) return "convolution_direct"; if (v == mkldnn_convolution_winograd) return "convolution_winograd"; if (v == mkldnn_eltwise_relu) return "eltwise_relu"; if (v == mkldnn_eltwise_tanh) return "eltwise_tanh"; if (v == mkldnn_eltwise_elu) return "eltwise_elu"; if (v == mkldnn_eltwise_square) return "eltwise_square"; if (v == mkldnn_eltwise_abs) return "eltwise_abs"; if (v == mkldnn_eltwise_sqrt) return "eltwise_sqrt"; if (v == mkldnn_eltwise_linear) return "eltwise_linear"; if (v == mkldnn_eltwise_bounded_relu) return "eltwise_bounded_relu"; if (v == mkldnn_eltwise_soft_relu) return "eltwise_soft_relu"; if (v == mkldnn_eltwise_logistic) return "eltwise_logistic"; if (v == mkldnn_pooling_max) return "pooling_max"; if (v == mkldnn_pooling_avg_include_padding) return "pooling_avg_include_padding"; if (v == mkldnn_pooling_avg_exclude_padding) return "pooling_avg_exclude_padding"; if (v == mkldnn_pooling_avg) return "pooling_avg"; if (v == mkldnn_lrn_across_channels) return "lrn_across_channels"; if (v == mkldnn_lrn_within_channel) return "lrn_within_channel"; if (v == mkldnn_deconvolution_direct) return "deconvolution_direct"; if (v == mkldnn_deconvolution_winograd) return "deconvolution_winograd"; if (v == mkldnn_vanilla_rnn) return "vanilla_rnn"; if (v == mkldnn_vanilla_lstm) return "vanilla_lstm"; if (v == mkldnn_vanilla_gru) return "vanilla_gru"; if (v == mkldnn_gru_linear_before_reset) return "gru_linear_before_reset"; assert(!"unknown alg_kind"); return "unknown alg_kind"; }
[ "zhouhuman@163.com" ]
zhouhuman@163.com
580ead725676fe4a04d637ee87fcb3575a0a6e2c
b4c88ea247bbe0892cca93f77b7172c3e48b0c42
/system/portable/devices/misc/include/DeviceMCP2510SPI.h
9bc6796daaf269b8745171bdf2a5270d0d82300f
[]
no_license
micro-os-plus/micro-os-plus-i
09c420c846ad4cf6f8b91144001b5fc2880c7d7b
d17eb4471b754eeb868bba80f2b1d5f9021443b1
refs/heads/master
2023-05-27T06:00:27.536050
2023-05-20T07:43:50
2023-05-20T07:43:50
62,032,946
1
0
null
null
null
null
UTF-8
C++
false
false
497
h
/* * Copyright (C) 2011 Liviu Ionescu. * * This file is part of the uOS++ distribution. */ #ifndef DEVICEMCP2510SPI_H_ #define DEVICEMCP2510SPI_H_ #include "portable/kernel/include/OS_Defines.h" #if defined(OS_CONFIG_BOARD_AVI_A07527) #include "portable/devices/misc/include/DeviceSPIUsart.h" class DeviceMCP2510SPI : public DeviceSPIUsart { public: }; #else #error "Missing OS_CONFIG_BOARD_* definition" #endif #endif /* DEVICEMCP2510SPI_H_ */
[ "ilg@livius.net" ]
ilg@livius.net
2f2bc632db55ee262dce90ec7ec088fc6a2eb29d
924de80dab7907fdb03ab1cafeea6e399d9759c6
/LIBRARY/WINDOWS/INCLUDES/GTEngine/Include/Graphics/GteBlendTransformController.h
aef587f478353ba5dd6bb6d9239e5878ad042c73
[]
no_license
x-tox-man/xengine
866fd44d79207c71c6ad2709a66496d392ec0f6d
81b9445795422969848acfffde59136e1eb66fbe
refs/heads/master
2021-04-29T10:39:43.257184
2020-10-25T10:48:54
2020-10-25T10:48:54
77,837,329
0
1
null
null
null
null
UTF-8
C++
false
false
2,877
h
// David Eberly, Geometric Tools, Redmond WA 98052 // Copyright (c) 1998-2016 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // File Version: 2.1.0 (2016/01/25) #pragma once #include <Graphics/GteTransformController.h> #include <memory> namespace gte { class GTE_IMPEXP BlendTransformController : public TransformController { public: // The transformations consist of translation, rotation, and uniform // scale. The rotation and scale blending is either geometric or // arithmetic, as specified in the other constructor inputs. Translation // blending is always arithmetic. Let {R0,S0,T0} and {R1,S1,T1} be the // transformation channels, and let weight w be in [0,1]. Let {R,S,T} be // the blended result. Let q0, q1, and q be quaternions corresponding to // R0, R1, and R with Dot(q0,q1) >= 0 and A = angle(q0,q1) = // acos(Dot(q0,q1)). // // Translation: T = (1-w)*T0 + w*T1 // // Arithmetic rotation: q = Normalize((1-w)*q0 + w*q1) // Geometric rotation: // q = Slerp(w,q0,q1) // = (sin((1-w)*A)*q0 + sin(w*A)*q1)/sin(A) // // Arithmetic scale: s = (1-w)*s0 + w*s1 for each channel s0, s1, s // Geometric scale: s = sign(s0)*sign(s1)*pow(|s0|,1-w)*pow(|s1|,w) // If either of s0 or s1 is zero, then s is zero. BlendTransformController( std::shared_ptr<TransformController> const& controller0, std::shared_ptr<TransformController> const& controller1, bool geometricRotation, bool geometricScale); // Member access. The weight w is a number for which 0 <= w <= 1. inline std::shared_ptr<TransformController> const& GetController0() const; inline std::shared_ptr<TransformController> const& GetController1() const; inline void SetWeight(float weight); inline float GetWeight() const; // The animation update. The application time is in milliseconds. virtual bool Update(double applicationTime); protected: // Set the object for 'this' and for the managed controllers. virtual void SetObject(ControlledObject* object); std::shared_ptr<TransformController> mController0, mController1; float mWeight; bool mRSMatrices, mGeometricRotation, mGeometricScale; }; inline std::shared_ptr<TransformController> const& BlendTransformController::GetController0() const { return mController0; } inline std::shared_ptr<TransformController> const& BlendTransformController::GetController1() const { return mController1; } inline void BlendTransformController::SetWeight(float weight) { mWeight = weight; } inline float BlendTransformController::GetWeight() const { return mWeight; } }
[ "x_tox_man@hotmail.com" ]
x_tox_man@hotmail.com
91e919d50706a0c708834d37fa0ddb6b2ce4a48e
f3397365f6d031ea0ed1b9d6993eaad389073624
/src/turtlebot3_server.cpp
111658c427c5d4b5559dfc584dc122060459411d
[]
no_license
mtt5/turtlebot3_example_cpp
c29757273c07cd68f847deea20fa189fc7dde283
ca63dcd432199fbfd60110cac6e644ab1b950a88
refs/heads/master
2020-05-31T18:50:39.732749
2019-06-05T18:25:22
2019-06-05T18:25:22
190,442,837
0
0
null
null
null
null
UTF-8
C++
false
false
5,847
cpp
#include <ros/ros.h> #include <actionlib/server/simple_action_server.h> #include <math.h> #include <geometry_msgs/Twist.h> #include <geometry_msgs/Point.h> #include <geometry_msgs/Quaternion.h> #include <nav_msgs/Odometry.h> #include <sensor_msgs/JointState.h> #include <turtlebot3_msgs/SensorState.h> #include "turtlebot3_example/Turtlebot3Action.h" #include <vector> class Turtlebot3_Action{ public: Turtlebot3_Action(std::string name):action_name_(name), action_server_(nh_,name,boost::bind(&Turtlebot3_Action::executeCB,this,_1),false){ //stats_sub_ = nh_.subscribe("joint_states",1,&Turtlebot3_Action::stats_CB,this); //odom_sub_ = nh_.subscribe("odom",1,&Turtlebot3_Action::odom_CB,this); //init_state_ = true; action_server_.start(); ROS_INFO("server on"); } void executeCB(const turtlebot3_example::Turtlebot3GoalConstPtr &goal){ int mode = goal->goal.x; float length = goal->goal.y; int count = goal->goal.z; bool success = true; bool circle_mode = true; bool half_patrol = false; int circle_count = 0; //ROS_INFO("%d,%f,%d",mode,length,count); //position_ = geometry_msgs::Point(); //r_ = 15; //r1_ = 1; stats_sub_ = nh_.subscribe("joint_states",1000,&Turtlebot3_Action::stats_CB,this); odom_sub_ = nh_.subscribe("odom",1000,&Turtlebot3_Action::odom_CB,this); cmd_vel_pub_ = nh_.advertise<geometry_msgs::Twist>("cmd_vel",5); for(int i = 0;i<count;++i){ if(mode == 1){ std::vector<float> area(4,0); area[0] = area[1] = length; for(int j = 0;j<=3;++j){ go_front(area[j],j); r1_.sleep(); turn(-90); } } else if(mode == 2){ std::vector<float> area(3,0); area[0] = area[1] = length; for(int j =0;j<=2;++j){ go_front(area[j],j); r1_.sleep(); turn(-120); } } else if(mode == 3){ //later } } if(success){ result_.result.result = ""; ROS_INFO("%s:Succeeded", action_name_.c_str()); action_server_.setSucceeded(result_.result); } } void stats_CB(const sensor_msgs::JointState::ConstPtr &msg){ float TICK2RAD = 0.001533981; float last_pos = 0.0; float diff_pos = 0.0; float cur_pos = 0.0; int encoder = 0; cur_pos = msg->position[0]; diff_pos = cur_pos - last_pos; encoder = encoder + int(diff_pos / TICK2RAD); right_encoder_ = encoder; } void odom_CB(const nav_msgs::Odometry::ConstPtr &msg){ position_.x = msg->pose.pose.position.x; position_.y = msg->pose.pose.position.y; position_.z = msg->pose.pose.position.z; //ROS_INFO("received position"); }; void go_front(const float length,const int count){ if(count == 0){ while(position_.x<length){ //ROS_INFO("%f",position_.x); command_.linear.x = 0.1; command_.angular.z = 0.0; cmd_vel_pub_.publish(command_); r_.sleep(); } } else if(count == 1){ while(position_.y<length){ command_.linear.x = 0.1; command_.angular.z = 0.0; cmd_vel_pub_.publish(command_); r_.sleep(); } } else if(count == 2){ while(position_.x>length){ command_.linear.x = 0.1; command_.angular.z = 0.0; cmd_vel_pub_.publish(command_); r_.sleep(); } } else{ while(position_.y>length){ command_.linear.x = 0.1; command_.angular.z = 0.0; cmd_vel_pub_.publish(command_); r_.sleep(); } } command_.linear.x = 0.0; cmd_vel_pub_.publish(command_); r_.sleep(); } void turn(const int degree){ if(init_state_){ init_right_encoder_ = right_encoder_; init_state_ = false; } float diff_encoder = ((M_PI/180)*degree*0.080)/(0.207/4096); //ROS_INFO("%f",diff_encoder); while(abs(init_right_encoder_ - right_encoder_)<abs(diff_encoder)){ if(diff_encoder >= 0 ) command_.angular.z = -0.5; else command_.angular.z = 0.5; cmd_vel_pub_.publish(command_); r_.sleep(); } init_state_ = true; command_.angular.z = 0.0; cmd_vel_pub_.publish(command_); r_.sleep(); } private: ros::NodeHandle nh_; actionlib::SimpleActionServer<turtlebot3_example::Turtlebot3Action> action_server_; std::string action_name_; ros::Subscriber stats_sub_; ros::Subscriber odom_sub_; ros::Publisher cmd_vel_pub_; turtlebot3_example::Turtlebot3ActionFeedback feedback_; turtlebot3_example::Turtlebot3ActionResult result_; //geometry_msgs::Point init_Position_; geometry_msgs::Point position_; geometry_msgs::Twist command_; bool init_state_ = true; //float TICK2RAD = 0.001533981; //float last_pos = 0.0; //float diff_pos = 0.0; //float cur_pos = 0.0; //int encoder = 0; int right_encoder_ = 0; int init_right_encoder_ = 0; ros::Rate r_ = 15; ros::Rate r1_ = 1 ; }; int main(int argc, char** argv){ ros::init(argc,argv,"turtlebot3"); Turtlebot3_Action server(ros::this_node::getName()); ros::spin(); return 0; }
[ "ma.tiant@husky.neu.edu" ]
ma.tiant@husky.neu.edu
d42d936f294ae67a619571ea82cdb1bd0846be21
509b32cf65d208b8f6284b139999b59a29556d1b
/alvere/alvere_application/src/systems/s_direction_from_movement.hpp
5136aa5b759a1c9b820e9367c83c6fff219e981e
[]
no_license
geoorgeous/alvere_engine
1725b57aea848635cc667a0d64d66be54d8079ed
71176a6690ffd46c0b1953450afaa6fb4b990647
refs/heads/master
2021-08-04T06:05:12.879753
2020-05-18T21:43:08
2020-05-18T21:43:08
172,511,977
0
0
null
null
null
null
UTF-8
C++
false
false
537
hpp
#pragma once #include <alvere/world/system/query_updated_system.hpp> #include "components/c_direction.hpp" #include "components/physics/c_movement.hpp" class S_DirectionFromMovement : public alvere::QueryUpdatedSystem<C_Direction, const C_Movement> { public: void Update(float deltaTime, C_Direction & direction, const C_Movement & movement) { if (movement.m_Horizontal < 0.0f) { direction.m_Direction = Direction::Left; } else if (movement.m_Horizontal > 0.0f) { direction.m_Direction = Direction::Right; } } };
[ "jameskime100@googlemail.com" ]
jameskime100@googlemail.com
01e70b02579d5d10bcc9e44bfa6494d128d3ef41
29b81bdc013d76b057a2ba12e912d6d4c5b033ef
/boost/include/boost/gil/extension/io/io_error.hpp
ceb4a15214b31c3f6fe60072456bb1c74175c035
[]
no_license
GSIL-Monitor/third_dependences
864d2ad73955ffe0ce4912966a4f0d1c60ebd960
888ebf538db072a92d444a9e5aaa5e18b0f11083
refs/heads/master
2020-04-17T07:32:49.546337
2019-01-18T08:47:28
2019-01-18T08:47:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
129
hpp
version https://git-lfs.github.com/spec/v1 oid sha256:0e399cae8f216763b202d3b38a9fb2db1ca68a7fdc97e9416fcee04912b22592 size 1566
[ "you@example.com" ]
you@example.com
d34889fc4438908fe6f6e64b937836410926c198
71a6536c475747a261ed168df6f9de1307cb0e2a
/wnt_ASTNode.h
a591051b4949a2def58e5606d7c6b8543183f04f
[]
no_license
glaretechnologies/winter
f33737d5de8aa5c47af83cf483b77effe614b948
78eb7a531ee4b41b5893f9e4ed368e4b3f3ce2b9
refs/heads/master
2023-07-09T12:14:52.305663
2023-07-05T14:46:31
2023-07-05T14:46:31
175,217,041
5
0
null
null
null
null
UTF-8
C++
false
false
37,237
h
/*===================================================================== ASTNode.h --------- Copyright Glare Technologies Limited 2019 - File created by ClassTemplate on Wed Jun 11 03:55:25 2008 =====================================================================*/ #pragma once #include "wnt_Type.h" #include "wnt_FunctionSignature.h" #include "wnt_ExternalFunction.h" #include "BaseException.h" #include "TokenBase.h" #include "Value.h" #include <utils/Reference.h> #include <utils/RefCounted.h> #include <utils/Platform.h> #include <utils/PlatformUtils.h> #include <utils/SmallVector.h> #include <string> #include <vector> #include <set> #include <unordered_set> namespace llvm { class Function; }; namespace llvm { class Value; }; namespace llvm { class Module; }; namespace llvm { class LLVMContext; }; namespace llvm { class TargetData; }; namespace llvm { class Instruction; }; namespace llvm { class ConstantFolder; }; namespace llvm { class DataLayout; }; namespace llvm { class IRBuilderDefaultInserter; }; namespace llvm { template<typename T, typename Inserter > class IRBuilder; }; namespace Winter { class VMState; class Linker; class LetASTNode; class AnonFunction; class Value; class BuiltInFunctionImpl; class FunctionDefinition; class LetBlock; class ASTNode; class SourceBuffer; class ComparisonExpression; class TraversalPayload; class LetBlock; class NamedConstant; struct ProgramStats; class SrcLocation; struct WinterCPUInfo; typedef std::map<ASTNode*, ASTNode*> CloneMapType; class ASTNodeVisitor : public RefCounted { public: virtual ~ASTNodeVisitor(){} virtual void visit(ASTNode& node, TraversalPayload& payload) = 0; }; class TraversalPayload { public: enum Operation { //LinkFunctions, BindVariables, TypeCoercion, TypeCheck, ComputeCanConstantFold, ConstantFolding, //SubstituteType, // for making concrete types out of generic types. //OperatorOverloadConversion, // Converting '+' to op_add etc.. //GetCleanupNodes, CheckInDomain, // Check that calls to elem() etc.. are in bounds. InlineFunctionCalls, // inline function calls SubstituteVariables, // Used in InlineFunctionCalls passes: replace all variables in the function body with the argument values. CustomVisit, // Calls supplied ASTNodeVisitor on each node visited. UpdateUpRefs, // When cloning a subtree of nodes, update upwards pointers to point into the new subtree. DeadFunctionElimination, // Removes all function definitions that are not reachable (through direct or indirect function calls) from the set of entry functions. DeadCodeElimination_ComputeAlive, // Works out which let variables are referenced. DeadCodeElimination_RemoveDead, // Removes let variables that are not referenced. CountFunctionCalls, // Compute calls_to_func_count. calls_to_func_count is used in inlining decision. CountArgumentRefs, // Count the number of references to each function argument in the body of each function. Used for inlining decision. AddAnonFuncsToLinker, // Adds anonymous functions to linker, to codegen. GetAllNamesInScope, // A pass over a function to get the set of names used, so that we can avoid them when generating new names for inlined let vars. UnbindVariables, // Unbind certain variables. Used after cloning an expression during inlining. SimplifyIfExpression // Replace "if(true, a, b)" with "a" etc.. }; TraversalPayload(Operation e) : operation(e), tree_changed(false), current_named_constant(NULL), check_bindings(false) {} Linker* linker; Operation operation; std::vector<TypeRef> type_mappings; // for substitute type operation. bool tree_changed; //bool capture_variables; // If true, variables and function expressions will capture variable and add to captured_vars //vector<CapturedVar> captured_vars; // For when parsing anon functions //vector<LetBlock*> let_block_stack; std::vector<FunctionDefinition*> func_def_stack; //std::vector<NamedConstant*> named_constant_stack; NamedConstant* current_named_constant; //bool all_variables_bound; // Are all variables in a given function body bound? Used in BindVariables pass. // Used in SubstituteVariables pass: FunctionDefinition* func_args_to_sub; // This is the function whose body is getting inlined into the call site. std::vector<Reference<ASTNode> > variable_substitutes; // Used in SubstituteVariables pass std::map<std::pair<ASTNode*, int>, std::string> new_let_var_name_map; int new_order_num; Reference<ASTNodeVisitor> custom_visitor; bool check_bindings; // If this is true, this is the final binding pass. Any unbound functions or variables should throw an exception. // Types that are captured by a function closure (lambda expression). std::set<TypeRef> captured_types; // Used in UpdateUpRefs: CloneMapType clone_map; // Used in DeadFunctionElimination and DeadCodeElimination: std::unordered_set<ASTNode*> reachable_nodes; std::vector<ASTNode*> nodes_to_process; std::unordered_set<ASTNode*> processed_nodes; std::map<FunctionDefinition*, int> calls_to_func_count; // GetAllNamesInScope, InlineFunctionCalls: std::unordered_set<std::string>* used_names; SmallVector<Reference<ASTNode>, 4> garbage; // For Storing a ref to a node so it won't get deleted (due to ref count going to zero) while a function on it is still being executed. }; void printMargin(int depth, std::ostream& s); bool isIntExactlyRepresentableAsFloat(int64 x); bool isIntExactlyRepresentableAsDouble(int64 x); bool checkFoldExpression(Reference<ASTNode>& e, TraversalPayload& payload, std::vector<ASTNode*>& stack); // Returns true if folding took place or e is already a literal. void doImplicitIntToFloatTypeCoercionForFloatReturn(Reference<ASTNode>& expr, TraversalPayload& payload); void doImplicitIntToDoubleTypeCoercionForDoubleReturn(Reference<ASTNode>& expr, TraversalPayload& payload); BufferPosition errorContext(const ASTNode* n); std::string errorContextString(const ASTNode* n); BufferPosition errorContext(const ASTNode& n); std::string errorContextString(const ASTNode& n); BufferPosition errorContext(const SrcLocation& src_location); std::string errorContextString(const SrcLocation& src_location); BufferPosition errorContext(const ASTNode& n, TraversalPayload& payload); bool isTargetDefinedBeforeAllInStack(const std::vector<FunctionDefinition*>& func_def_stack, int target_function_order_num); bool expressionIsWellTyped(ASTNode& e, TraversalPayload& payload_); bool shouldRefCount(EmitLLVMCodeParams& params, const Reference<ASTNode>& expr); bool shouldRefCount(EmitLLVMCodeParams& params, const ASTNode& expr); void addMetaDataCommentToInstruction(EmitLLVMCodeParams& params, llvm::Instruction* instr, const std::string& s); void emitDestructorOrDecrCall(EmitLLVMCodeParams& params, const ASTNode& e, llvm::Value* value, const std::string& comment); bool mayEscapeCurrentlyBuildingFunction(EmitLLVMCodeParams& params, const TypeRef& type); void replaceAllUsesWith(Reference<ASTNode>& old_node, Reference<ASTNode>& new_node); const std::string mapOpenCLCVarName(const std::unordered_set<std::string>& opencl_c_keywords, const std::string& s); // Rename to something that isn't a keyword if is one. // Clones sub-tree, and updates up-refs to point into new subtree where possible. Reference<ASTNode> cloneASTNodeSubtree(Reference<ASTNode>& n); class CleanUpInfo { public: CleanUpInfo(){} CleanUpInfo(const ASTNode* node_, llvm::Value* value_) : node(node_), value(value_) {} const ASTNode* node; llvm::Value* value; }; class CommonFunctions { public: FunctionDefinition* allocateStringFunc; FunctionDefinition* freeStringFunc; FunctionDefinition* allocateVArrayFunc; FunctionDefinition* freeVArrayFunc; FunctionDefinition* allocateClosureFunc; FunctionDefinition* freeClosureFunc; llvm::Function* incrStringRefCountLLVMFunc; llvm::Function* incrVArrayRefCountLLVMFunc; llvm::Function* incrClosureRefCountLLVMFunc; }; class EmitLLVMCodeParams { public: FunctionDefinition* currently_building_func_def; const WinterCPUInfo* cpu_info; // These template arguments are the defaults from IRBuilder.h. Written explicitly here so we can forwards declare this type. llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter >* builder; llvm::Module* module; llvm::Function* currently_building_func; llvm::LLVMContext* context; const llvm::DataLayout/*TargetData*/* target_data; std::vector<LetBlock*> let_block_stack; // Pointers to all the let blocks that are parents of the current node std::map<const LetASTNode*, llvm::Value* > let_values; std::vector<CleanUpInfo> cleanup_values; // A list of ASTNodes that need to emit cleanup code (Ref decrement code) at the end of the function CommonFunctions common_functions; std::vector<llvm::Value*> argument_values; // Use for function specialisation in Array fold(). std::set<VRef<const Type>, ConstTypeVRefLessThan>* destructors_called_types; bool emit_refcounting_code; bool emit_trace_code; ProgramStats* stats; }; class EmitOpenCLCodeParams { public: EmitOpenCLCodeParams() : emit_in_bound_asserts(false) {} std::string file_scope_code; std::string file_scope_func_defs; /* An expression in Winter, when transformed to OpenCL C, may not be expressible as just as an expression. Rather, it may require one or more additional statements. Such statements will be writted to blocks.back(). For example, let blocks are not easily (efficiently) expressible in C: (we don't want to duplicate sin call) let x = sin(x) in x + x In this case the directly returned OpenCL C code will be "x + x", but the code "x = sin(x)" will be put in blocks.back(). */ std::vector<std::string> blocks; std::set<TupleTypeRef, TypeRefLessThan> tuple_types_used; std::unordered_set<std::string> opencl_c_keywords; int uid; // A counter for generating unique names bool emit_comments; bool emit_in_bound_asserts; }; struct GetTimeBoundParams { GetTimeBoundParams() : max_bound_computation_steps(1 << 22), steps(0) {} // Maximum number of 'steps' (function call expressions encountered currently) to allow when computing the bound, // before the computation is terminated and an exception thrown. size_t max_bound_computation_steps; size_t steps; }; struct GetSpaceBoundParams { GetSpaceBoundParams() : max_bound_computation_steps(1 << 22), steps(0), is_root_function(true) {} // Maximum number of 'steps' (function call expressions encountered currently) to allow when computing the bound, // before the computation is terminated and an exception thrown. size_t max_bound_computation_steps; size_t steps; bool is_root_function; // Is this the first function for which getSpaceBound() is called on? // (or has getSpaceBound() been called on a function def via a function expression) }; struct GetSpaceBoundResults { GetSpaceBoundResults(size_t stack_space_, size_t heap_space_) : stack_space(stack_space_), heap_space(heap_space_) {} size_t stack_space; size_t heap_space; void operator += (const GetSpaceBoundResults& b) { stack_space += b.stack_space; heap_space += b.heap_space; } }; inline GetSpaceBoundResults operator + (const GetSpaceBoundResults& a, const GetSpaceBoundResults& b) { return GetSpaceBoundResults(a.stack_space + b.stack_space, a.heap_space + b.heap_space); } struct WinterCPUInfo { enum Arch { Arch_x64, Arch_ARM64 }; bool isX64() const { return arch == Arch_x64; } Arch arch; PlatformUtils::CPUInfo cpu_info; // set if arch == Arch_x64 }; /*===================================================================== ASTNode ------- Abstract syntax tree node. =====================================================================*/ class ASTNode : public RefCounted { public: enum ASTNodeType { BufferRootType, FunctionDefinitionType, FunctionExpressionType, VariableASTNodeType, FloatLiteralType, DoubleLiteralType, IntLiteralType, BoolLiteralType, StringLiteralType, CharLiteralType, MapLiteralType, ArrayLiteralType, VArrayLiteralType, VectorLiteralType, TupleLiteralType, AdditionExpressionType, SubtractionExpressionType, MulExpressionType, DivExpressionType, BinaryBitwiseExpressionType, BinaryBooleanType, UnaryMinusExpressionType, LetType, ComparisonExpressionType, AnonFunctionType, LetBlockType, ArraySubscriptType, IfExpressionType, NamedConstantType, LogicalNegationExprType }; ASTNode(ASTNodeType node_type_, const SrcLocation& loc_) : node_type(node_type_), location(loc_), can_maybe_constant_fold(false) {} virtual ~ASTNode() {} virtual ValueRef exec(VMState& vmstate) = 0; inline ASTNodeType nodeType() const { return node_type; } virtual TypeRef type() const = 0; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack) {} // Replace the given child node reference. virtual void updateChild(const ASTNode* old_val, Reference<ASTNode>& new_val) { assert(0); } // Emit LLVM code to compute the value for this AST node. // If the value type is pass-by-pointer, and return_space_pointer is non-null, then code MAY be emitted // to store the value at the memory pointed to by return_space_pointer. // However, since the value could be stored in a constant global, return_space_pointer doesn't have to be used. // Returns a pointer to the mem location where the value is stored. virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* return_space_pointer = NULL) const = 0; // Emit cleanup (ref count decrement and delete) code at the end of the function //virtual void emitCleanupLLVMCode(EmitLLVMCodeParams& params, llvm::Value* val) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map) = 0; // clone_map will map from old node to new node. virtual void print(int depth, std::ostream& s) const = 0; virtual std::string sourceString(int depth) const = 0; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const = 0; // True iff the expression does not depend on any variables virtual bool isConstant() const = 0; // For constant folding. // We can't evaluate an expression for constant folding unless we know the expression is defined. // For example, elem(a, i) may not be proven defined yet. virtual bool provenDefined() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const = 0; // Only FunctionDefinitions need return stack size information, other nodes can return 0. virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const = 0; // e.g. number of AST nodes in subtree. // For deciding whether to inline a function. virtual size_t getSubtreeCodeComplexity() const = 0; const SrcLocation& srcLocation() const { return location; } // Can this AST node potentially be replaced with a literal node? bool can_maybe_constant_fold; // std::vector<UpRefBase*> uprefs; // UpRefs that refer to this node. protected: static llvm::Value* emitExternalLinkageCall(const std::string& target_name, EmitLLVMCodeParams& params); private: // GLARE_DISABLE_COPY(ASTNode) ASTNodeType node_type; SrcLocation location; }; typedef Reference<ASTNode> ASTNodeRef; //void updateIndexBounds(TraversalPayload& payload, const ComparisonExpression& comp_expr, const ASTNodeRef& index, int& i_lower, int& i_upper); bool expressionsHaveSameValue(const ASTNodeRef& a, const ASTNodeRef& b); class BufferRoot : public ASTNode { public: BufferRoot(const SrcLocation& loc) : ASTNode(BufferRootType, loc) {} std::vector<ASTNodeRef> top_level_defs; // Either function definitions or named constants. virtual ValueRef exec(VMState& vmstate){ return ValueRef(); } virtual TypeRef type() const { throw BaseException("root has no type."); } virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; }; class FloatLiteral : public ASTNode { public: FloatLiteral(float v, const SrcLocation& loc) : ASTNode(FloatLiteralType, loc), value(v) { this->can_maybe_constant_fold = true; } virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return TypeRef(new Float()); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; } virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(4, 0); } virtual size_t getSubtreeCodeComplexity() const { return 1; } float value; }; class DoubleLiteral : public ASTNode { public: DoubleLiteral(double v, const SrcLocation& loc) : ASTNode(DoubleLiteralType, loc), value(v) { this->can_maybe_constant_fold = true; } virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return TypeRef(new Double()); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; } virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(8, 0); } virtual size_t getSubtreeCodeComplexity() const { return 1; } double value; }; class IntLiteral : public ASTNode { public: IntLiteral(int64 v, int num_bits_, bool is_signed_, const SrcLocation& loc) : ASTNode(IntLiteralType, loc), value(v), num_bits(num_bits_), is_signed(is_signed_) { assert(num_bits == 16 || num_bits == 32 || num_bits == 64); this->can_maybe_constant_fold = true; } virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return TypeRef(new Int(num_bits, is_signed)); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; } virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const { return 1; } int64 value; int num_bits; bool is_signed; }; class StringLiteral : public ASTNode { public: StringLiteral(const std::string& v, const SrcLocation& loc); virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return TypeRef(new String()); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; //virtual void emitCleanupLLVMCode(EmitLLVMCodeParams& params, llvm::Value* val) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; std::string value; mutable bool llvm_allocated_on_heap; }; class CharLiteral : public ASTNode { public: CharLiteral(const std::string& v, const SrcLocation& loc); virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return new CharType(); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; //virtual void emitCleanupLLVMCode(EmitLLVMCodeParams& params, llvm::Value* val) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; } virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(1, 0); } virtual size_t getSubtreeCodeComplexity() const { return 1; } std::string value; // utf-8 encoded char. }; class BoolLiteral : public ASTNode { public: BoolLiteral(bool v, const SrcLocation& loc) : ASTNode(BoolLiteralType, loc), value(v) { can_maybe_constant_fold = true; } bool value; virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return TypeRef(new Bool()); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const { return true; } virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; } virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(1, 0); } virtual size_t getSubtreeCodeComplexity() const { return 1; } }; class MapLiteral : public ASTNode { public: MapLiteral(const SrcLocation& loc) : ASTNode(MapLiteralType, loc) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return maptype; } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; TypeRef maptype; std::vector<std::pair<ASTNodeRef, ASTNodeRef> > items; }; class AdditionExpression : public ASTNode { public: AdditionExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(AdditionExpressionType, loc), a(a_), b(b_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const; virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; ASTNodeRef a; ASTNodeRef b; mutable TypeRef expr_type; // cached; }; class SubtractionExpression : public ASTNode { public: SubtractionExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(SubtractionExpressionType, loc), a(a_), b(b_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const; virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; ASTNodeRef a; ASTNodeRef b; mutable TypeRef expr_type; // cached; }; class MulExpression : public ASTNode { public: MulExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(MulExpressionType, loc), a(a_), b(b_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const; virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; ASTNodeRef a; ASTNodeRef b; mutable TypeRef expr_type; // cached; }; class DivExpression : public ASTNode { public: DivExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(DivExpressionType, loc), a(a_), b(b_), proven_defined(false) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const; virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual bool provenDefined() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; private: void checkNoOverflow(TraversalPayload& payload, std::vector<ASTNode*>& stack); void checkNoZeroDivide(TraversalPayload& payload, std::vector<ASTNode*>& stack); public: ASTNodeRef a; ASTNodeRef b; bool proven_defined; mutable TypeRef expr_type; // cached; }; class BinaryBitwiseExpression : public ASTNode { public: enum BitwiseType { BITWISE_AND, BITWISE_OR, BITWISE_XOR, BITWISE_LEFT_SHIFT, BITWISE_RIGHT_SHIFT }; BinaryBitwiseExpression(BitwiseType t, const ASTNodeRef& a, const ASTNodeRef& b, const SrcLocation& loc); virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const; virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; private: const std::string opToken() const; BitwiseType t; ASTNodeRef a; ASTNodeRef b; }; class BinaryBooleanExpr : public ASTNode { public: enum Type { AND, OR }; BinaryBooleanExpr(Type t, const ASTNodeRef& a, const ASTNodeRef& b, const SrcLocation& loc); virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return a->type(); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; Type t; ASTNodeRef a; ASTNodeRef b; }; class UnaryMinusExpression : public ASTNode { public: UnaryMinusExpression(const SrcLocation& loc, const ASTNodeRef& expr_) : ASTNode(UnaryMinusExpressionType, loc), expr(expr_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return expr->type(); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; ASTNodeRef expr; }; // e.g. !x class LogicalNegationExpr : public ASTNode { public: LogicalNegationExpr(const SrcLocation& loc, const ASTNodeRef& expr_) : ASTNode(LogicalNegationExprType, loc), expr(expr_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return expr->type(); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; ASTNodeRef expr; }; class ComparisonExpression : public ASTNode { public: ComparisonExpression(const Reference<TokenBase>& token_, const ASTNodeRef a_, const ASTNodeRef b_, const SrcLocation& loc) : ASTNode(ComparisonExpressionType, loc), token(token_), a(a_), b(b_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return new Bool(); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; const std::string getOverloadedFuncName() const; // returns e.g. op_lt, op_gt etc.. Reference<TokenBase> token; ASTNodeRef a; ASTNodeRef b; }; // Not used currently. class ArraySubscript : public ASTNode { public: ArraySubscript(const ASTNodeRef& subscript_expr_, const SrcLocation& loc) : ASTNode(ArraySubscriptType, loc), subscript_expr(subscript_expr_) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const { return subscript_expr->type(); } virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; ASTNodeRef subscript_expr; }; class NamedConstant : public ASTNode { public: NamedConstant(const TypeRef& declared_type_, const std::string& name_, const ASTNodeRef& value_expr_, const SrcLocation& loc, int order_num_) : ASTNode(NamedConstantType, loc), declared_type(declared_type_), name(name_), value_expr(value_expr_), order_num(order_num_), llvm_value(NULL) {} virtual ValueRef exec(VMState& vmstate); virtual TypeRef type() const; virtual void print(int depth, std::ostream& s) const; virtual std::string sourceString(int depth) const; virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const; virtual Reference<ASTNode> clone(CloneMapType& clone_map); virtual bool isConstant() const; virtual size_t getTimeBound(GetTimeBoundParams& params) const; virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const; virtual size_t getSubtreeCodeComplexity() const; TypeRef declared_type; // May be NULL if no type was declared. std::string name; ASTNodeRef value_expr; int order_num; mutable llvm::Value* llvm_value; }; typedef Reference<NamedConstant> NamedConstantRef; /*class AnonFunction : public ASTNode { public: AnonFunction() {} virtual Value* exec(VMState& vmstate); virtual ASTNodeType nodeType() const { return AnonFunctionType; } virtual TypeRef type() const { return thetype; } virtual void print(int depth, std::ostream& s) const; virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack); virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params) const; vector<FunctionDefinition::FunctionArg> args; ASTNodeRef body; TypeRef thetype; };*/ } //end namespace Lang
[ "nick@indigorenderer.com" ]
nick@indigorenderer.com
348e280c0618bc784af3e092bea7d76caef281df
ad0797c84ffd8354fd5b0baaf242128bd5bfb43f
/fwdmodel_flobs.cc
74900152745178e2e09421195f7cd58c5a9a6738
[]
no_license
mosszhaodphil/FABBER_UAT
1a053700e881b8865148d0a3899e0c04c4080f56
5ec706f8fc93a00aac9b6d830a6b0f8117994abc
refs/heads/master
2020-04-06T12:08:15.710689
2015-03-25T08:09:57
2015-03-25T08:09:57
31,378,979
0
0
null
2016-09-20T18:44:40
2015-02-26T17:23:11
C++
UTF-8
C++
false
false
8,001
cc
/* fwdmodel_flobs.cc - Does FLOBS Adrian Groves, FMRIB Image Analysis Group Copyright (C) 2007 University of Oxford */ /* Part of FSL - FMRIB's Software Library http://www.fmrib.ox.ac.uk/fsl fsl@fmrib.ox.ac.uk Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance Imaging of the Brain), Department of Clinical Neurology, Oxford University, Oxford, UK LICENCE FMRIB Software Library, Release 5.0 (c) 2012, The University of Oxford (the "Software") The Software remains the property of the University of Oxford ("the University"). The Software is distributed "AS IS" under this Licence solely for non-commercial use in the hope that it will be useful, but in order that the University as a charitable foundation protects its assets for the benefit of its educational and research purposes, the University makes clear that no condition is made or to be implied, nor is any warranty given or to be implied, as to the accuracy of the Software, or that it will be suitable for any particular purpose or for use under any specific conditions. Furthermore, the University disclaims all responsibility for the use which is made of the Software. It further disclaims any liability for the outcomes arising from using the Software. The Licensee agrees to indemnify the University and hold the University harmless from and against any and all claims, damages and liabilities asserted by third parties (including claims for negligence) which arise directly or indirectly from the use of the Software or the sale of any products based on the Software. No part of the Software may be reproduced, modified, transmitted or transferred in any form or by any means, electronic or mechanical, without the express permission of the University. The permission of the University is not required if the said reproduction, modification, transmission or transference is done without financial return, the conditions of this Licence are imposed upon the receiver of the product, and all original and amended source code is included in any transmitted product. You may be held legally responsible for any copyright infringement that is caused or encouraged by your failure to abide by these terms and conditions. You are not permitted under this Licence to use this Software commercially. Use for which any financial return is received shall be defined as commercial use, and includes (1) integration of all or part of the source code or the Software into a product for sale or license by or on behalf of Licensee to third parties or (2) use of the Software or any derivative of it for research with the final aim of developing software products for sale or license to a third party or (3) use of the Software or any derivative of it for research with the final aim of developing non-software products for sale or license to a third party, or (4) use of the Software to provide any service to an external organisation for which payment is received. If you are interested in using the Software commercially, please contact Isis Innovation Limited ("Isis"), the technology transfer company of the University, to negotiate a licence. Contact details are: innovation@isis.ox.ac.uk quoting reference DE/9564. */ #include "fwdmodel_flobs.h" #include <iostream> #include <newmatio.h> #include <stdexcept> #include "newimage/newimageall.h" using namespace NEWIMAGE; #include "easylog.h" string FlobsFwdModel::ModelVersion() const { return "$Id: fwdmodel_flobs.cc,v 1.4 2008/04/03 13:22:39 adriang Exp $"; } void FlobsFwdModel::HardcodedInitialDists(MVNDist& prior, MVNDist& posterior) const { Tracer_Plus tr("FlobsFwdModel::HardcodedInitialDists"); assert(prior.means.Nrows() == NumParams()); // Set priors prior.means = 0; SymmetricMatrix precisions = IdentityMatrix(NumParams()) * 1e-12; prior.SetPrecisions(precisions); posterior = prior; // if (useSeparateScale) // { // // Set informative initial posterior // // Shape = first basis function, magnitude 1. // posterior.means(1) = 1; // posterior.means(NumParams()) = 1; // } } void FlobsFwdModel::Evaluate(const ColumnVector& params, ColumnVector& result) const { Tracer_Plus tr("FlobsFwdModel::Evaluate"); assert(params.Nrows() == NumParams()); // if (useSeparateScale) // { // ColumnVector beta = params.Rows(1,basis.Ncols()); // //double betaBar = params(NumParams()); // result = basis * beta; // * betaBar; Now it's purely linear and ignore betaBar! // assert(false); // TODO: update for nuisance parameters // } if (usePolarCoordinates) { assert(basis.Ncols() == 2); ColumnVector beta = params.Rows(1,basis.Ncols()); double betaBar = params(1); beta(1) = cos(beta(2)); beta(2) = sin(beta(2)); result = basis * beta * betaBar; // No nuisance stuff yet. assert(params.Nrows() == 2); } else { ColumnVector beta = params.Rows(1,basis.Ncols()); double betaBar = params(1); beta(1) = 1.0; // fixed shape=1, scale=betaBar result = basis * beta * betaBar; beta = params.Rows(basis.Ncols()+1,params.Nrows()); result += nuisanceBasis * beta; } return; // answer is in the "result" vector } void FlobsFwdModel::ModelUsage() { // if (useSeparateScale) { cout << "Usage for --model=flobs6:\n" << " --basis=<basis_functions>\n" << " A scale parameter will automatically be added.\n" << " Always use with the --flobs-prior-adjust option!!! \n" << " (Future work: specify several scaling factors, for multi-event stimuli)\n\n"; } // else { cout << "Usage for --model=flobs5:\n" << " --basis=<basis_functions>\n" << " The first basis function will serve as the scaling factor (fixed shape==1)\n"; } // TODO: add --nuisance= option } FlobsFwdModel::FlobsFwdModel(ArgsType& args, bool polar) // : useSeparateScale(sepScale) : usePolarCoordinates(polar) { string basisFile = args.Read("basis"); LOG_ERR( " Reading basis functions: " << basisFile << endl ); basis = read_vest(basisFile); LOG_ERR( " Read " << basis.Ncols() << " basis functions of length " << basis.Nrows() << endl); basisFile = args.ReadWithDefault("nuisance","null"); if (basisFile == "null") { nuisanceBasis.ReSize(basis.Nrows(), 0); } else if (basisFile == "offset") { nuisanceBasis.ReSize(basis.Nrows(), 1); nuisanceBasis = 1; } else { LOG_ERR( " Reading nuisance basis functions: " << basisFile << endl ); nuisanceBasis = read_vest(basisFile); LOG_ERR( " Read " << nuisanceBasis.Ncols() << " nuisance basis functions of length " << nuisanceBasis.Nrows() << endl); } if (nuisanceBasis.Nrows() != basis.Nrows()) throw Invalid_option("Basis length mismatch!\n"); } void FlobsFwdModel::DumpParameters(const ColumnVector& vec, const string& indent) const { // if (useSeparateScale) // LOG << indent << "Scale = " << vec(NumParams()) << ", shape:\n" // << vec.Rows(1, NumParams()-1); // else LOG << indent << "Scale = " << vec(1) << ", shape:\n1 (fixed)\n" << vec.Rows(2, NumParams()); // TODO: should dump nuisanceBasis too } void FlobsFwdModel::NameParams(vector<string>& names) const { names.clear(); for (int i = 1; i <= basis.Ncols(); i++) names.push_back("basis_" + stringify(i)); // if (useSeparateScale) // names.push_back("scale"); for (int i = 1; i <= nuisanceBasis.Ncols(); i++) names.push_back("nuisance_"+stringify(i)); assert(names.size() == (unsigned)NumParams()); }
[ "mosszhao@Mosss-MacBook-Pro.local" ]
mosszhao@Mosss-MacBook-Pro.local
4951508cf547ab3e47a3faac02971cfeb7230c2c
37f241dab8c4356d0549eac15878d73c84334af0
/src/rpcrawtransaction.cpp
7cbbd04b46d006f491735391019ad8e47b1672b8
[ "MIT" ]
permissive
onyxcoin/Onyxcoin
caeffa61b0b1f6d23de2ed520af7a1f6c690d897
f171305cc6f61b9b375e471f65c6bc6d19d4e700
refs/heads/master
2020-05-27T08:13:50.371668
2014-07-30T16:34:28
2014-07-30T16:34:28
22,436,059
1
1
null
null
null
null
UTF-8
C++
false
false
20,286
cpp
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> #include "base58.h" #include "bitcoinrpc.h" #include "txdb.h" #include "init.h" #include "main.h" #include "net.h" #include "wallet.h" using namespace std; using namespace boost; using namespace boost::assign; using namespace json_spirit; void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex) { txnouttype type; vector<CTxDestination> addresses; int nRequired; out.push_back(Pair("asm", scriptPubKey.ToString())); if (fIncludeHex) out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end()))); if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) { out.push_back(Pair("type", GetTxnOutputType(TX_NONSTANDARD))); return; } out.push_back(Pair("reqSigs", nRequired)); out.push_back(Pair("type", GetTxnOutputType(type))); Array a; BOOST_FOREACH(const CTxDestination& addr, addresses) a.push_back(CBitcoinAddress(addr).ToString()); out.push_back(Pair("addresses", a)); } void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry) { entry.push_back(Pair("txid", tx.GetHash().GetHex())); entry.push_back(Pair("version", tx.nVersion)); entry.push_back(Pair("time", (boost::int64_t)tx.nTime)); entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime)); Array vin; BOOST_FOREACH(const CTxIn& txin, tx.vin) { Object in; if (tx.IsCoinBase()) in.push_back(Pair("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()))); else { in.push_back(Pair("txid", txin.prevout.hash.GetHex())); in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n)); Object o; o.push_back(Pair("asm", txin.scriptSig.ToString())); o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()))); in.push_back(Pair("scriptSig", o)); } in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence)); vin.push_back(in); } entry.push_back(Pair("vin", vin)); Array vout; for (unsigned int i = 0; i < tx.vout.size(); i++) { const CTxOut& txout = tx.vout[i]; Object out; out.push_back(Pair("value", ValueFromAmount(txout.nValue))); out.push_back(Pair("n", (boost::int64_t)i)); Object o; ScriptPubKeyToJSON(txout.scriptPubKey, o, false); out.push_back(Pair("scriptPubKey", o)); vout.push_back(out); } entry.push_back(Pair("vout", vout)); if (hashBlock != 0) { entry.push_back(Pair("blockhash", hashBlock.GetHex())); map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock); if (mi != mapBlockIndex.end() && (*mi).second) { CBlockIndex* pindex = (*mi).second; if (pindex->IsInMainChain()) { entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight)); entry.push_back(Pair("time", (boost::int64_t)pindex->nTime)); entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime)); } else entry.push_back(Pair("confirmations", 0)); } } } Value getrawtransaction(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "getrawtransaction <txid> [verbose=0]\n" "If verbose=0, returns a string that is\n" "serialized, hex-encoded data for <txid>.\n" "If verbose is non-zero, returns an Object\n" "with information about <txid>."); uint256 hash; hash.SetHex(params[0].get_str()); bool fVerbose = false; if (params.size() > 1) fVerbose = (params[1].get_int() != 0); CTransaction tx; uint256 hashBlock = 0; if (!GetTransaction(hash, tx, hashBlock)) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction"); CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << tx; string strHex = HexStr(ssTx.begin(), ssTx.end()); if (!fVerbose) return strHex; Object result; result.push_back(Pair("hex", strHex)); TxToJSON(tx, hashBlock, result); return result; } Value listunspent(const Array& params, bool fHelp) { if (fHelp || params.size() > 3) throw runtime_error( "listunspent [minconf=1] [maxconf=9999999] [\"address\",...]\n" "Returns array of unspent transaction outputs\n" "with between minconf and maxconf (inclusive) confirmations.\n" "Optionally filtered to only include txouts paid to specified addresses.\n" "Results are an array of Objects, each of which has:\n" "{txid, vout, scriptPubKey, amount, confirmations}"); RPCTypeCheck(params, list_of(int_type)(int_type)(array_type)); int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); int nMaxDepth = 9999999; if (params.size() > 1) nMaxDepth = params[1].get_int(); set<CBitcoinAddress> setAddress; if (params.size() > 2) { Array inputs = params[2].get_array(); BOOST_FOREACH(Value& input, inputs) { CBitcoinAddress address(input.get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Onyxcoin address: ")+input.get_str()); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str()); setAddress.insert(address); } } Array results; vector<COutput> vecOutputs; pwalletMain->AvailableCoins(vecOutputs, false); BOOST_FOREACH(const COutput& out, vecOutputs) { if (out.nDepth < nMinDepth || out.nDepth > nMaxDepth) continue; if(setAddress.size()) { CTxDestination address; if(!ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) continue; if (!setAddress.count(address)) continue; } int64_t nValue = out.tx->vout[out.i].nValue; const CScript& pk = out.tx->vout[out.i].scriptPubKey; Object entry; entry.push_back(Pair("txid", out.tx->GetHash().GetHex())); entry.push_back(Pair("vout", out.i)); CTxDestination address; if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) { entry.push_back(Pair("address", CBitcoinAddress(address).ToString())); if (pwalletMain->mapAddressBook.count(address)) entry.push_back(Pair("account", pwalletMain->mapAddressBook[address])); } entry.push_back(Pair("scriptPubKey", HexStr(pk.begin(), pk.end()))); entry.push_back(Pair("amount",ValueFromAmount(nValue))); entry.push_back(Pair("confirmations",out.nDepth)); results.push_back(entry); } return results; } Value createrawtransaction(const Array& params, bool fHelp) { if (fHelp || params.size() != 2) throw runtime_error( "createrawtransaction [{\"txid\":txid,\"vout\":n},...] {address:amount,...}\n" "Create a transaction spending given inputs\n" "(array of objects containing transaction id and output number),\n" "sending to given address(es).\n" "Returns hex-encoded raw transaction.\n" "Note that the transaction's inputs are not signed, and\n" "it is not stored in the wallet or transmitted to the network."); RPCTypeCheck(params, list_of(array_type)(obj_type)); Array inputs = params[0].get_array(); Object sendTo = params[1].get_obj(); CTransaction rawTx; BOOST_FOREACH(Value& input, inputs) { const Object& o = input.get_obj(); const Value& txid_v = find_value(o, "txid"); if (txid_v.type() != str_type) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing txid key"); string txid = txid_v.get_str(); if (!IsHex(txid)) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected hex txid"); const Value& vout_v = find_value(o, "vout"); if (vout_v.type() != int_type) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing vout key"); int nOutput = vout_v.get_int(); if (nOutput < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout must be positive"); CTxIn in(COutPoint(uint256(txid), nOutput)); rawTx.vin.push_back(in); } set<CBitcoinAddress> setAddress; BOOST_FOREACH(const Pair& s, sendTo) { CBitcoinAddress address(s.name_); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Onyxcoin address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); setAddress.insert(address); CScript scriptPubKey; scriptPubKey.SetDestination(address.Get()); int64_t nAmount = AmountFromValue(s.value_); CTxOut out(nAmount, scriptPubKey); rawTx.vout.push_back(out); } CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss << rawTx; return HexStr(ss.begin(), ss.end()); } Value decoderawtransaction(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "decoderawtransaction <hex string>\n" "Return a JSON object representing the serialized, hex-encoded transaction."); RPCTypeCheck(params, list_of(str_type)); vector<unsigned char> txData(ParseHex(params[0].get_str())); CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION); CTransaction tx; try { ssData >> tx; } catch (std::exception &e) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } Object result; TxToJSON(tx, 0, result); return result; } Value decodescript(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "decodescript <hex string>\n" "Decode a hex-encoded script."); RPCTypeCheck(params, list_of(str_type)); Object r; CScript script; if (params[0].get_str().size() > 0){ vector<unsigned char> scriptData(ParseHexV(params[0], "argument")); script = CScript(scriptData.begin(), scriptData.end()); } else { // Empty scripts are valid } ScriptPubKeyToJSON(script, r, false); r.push_back(Pair("p2sh", CBitcoinAddress(script.GetID()).ToString())); return r; } Value signrawtransaction(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 4) throw runtime_error( "signrawtransaction <hex string> [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [<privatekey1>,...] [sighashtype=\"ALL\"]\n" "Sign inputs for raw transaction (serialized, hex-encoded).\n" "Second optional argument (may be null) is an array of previous transaction outputs that\n" "this transaction depends on but may not yet be in the blockchain.\n" "Third optional argument (may be null) is an array of base58-encoded private\n" "keys that, if given, will be the only keys used to sign the transaction.\n" "Fourth optional argument is a string that is one of six values; ALL, NONE, SINGLE or\n" "ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.\n" "Returns json object with keys:\n" " hex : raw transaction with signature(s) (hex-encoded string)\n" " complete : 1 if transaction has a complete set of signature (0 if not)" + HelpRequiringPassphrase()); RPCTypeCheck(params, list_of(str_type)(array_type)(array_type)(str_type), true); vector<unsigned char> txData(ParseHex(params[0].get_str())); CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION); vector<CTransaction> txVariants; while (!ssData.empty()) { try { CTransaction tx; ssData >> tx; txVariants.push_back(tx); } catch (std::exception &e) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } } if (txVariants.empty()) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Missing transaction"); // mergedTx will end up with all the signatures; it // starts as a clone of the rawtx: CTransaction mergedTx(txVariants[0]); bool fComplete = true; // Fetch previous transactions (inputs): map<COutPoint, CScript> mapPrevOut; for (unsigned int i = 0; i < mergedTx.vin.size(); i++) { CTransaction tempTx; MapPrevTx mapPrevTx; CTxDB txdb("r"); map<uint256, CTxIndex> unused; bool fInvalid; // FetchInputs aborts on failure, so we go one at a time. tempTx.vin.push_back(mergedTx.vin[i]); tempTx.FetchInputs(txdb, unused, false, false, mapPrevTx, fInvalid); // Copy results into mapPrevOut: BOOST_FOREACH(const CTxIn& txin, tempTx.vin) { const uint256& prevHash = txin.prevout.hash; if (mapPrevTx.count(prevHash) && mapPrevTx[prevHash].second.vout.size()>txin.prevout.n) mapPrevOut[txin.prevout] = mapPrevTx[prevHash].second.vout[txin.prevout.n].scriptPubKey; } } // Add previous txouts given in the RPC call: if (params.size() > 1 && params[1].type() != null_type) { Array prevTxs = params[1].get_array(); BOOST_FOREACH(Value& p, prevTxs) { if (p.type() != obj_type) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "expected object with {\"txid'\",\"vout\",\"scriptPubKey\"}"); Object prevOut = p.get_obj(); RPCTypeCheck(prevOut, map_list_of("txid", str_type)("vout", int_type)("scriptPubKey", str_type)); string txidHex = find_value(prevOut, "txid").get_str(); if (!IsHex(txidHex)) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "txid must be hexadecimal"); uint256 txid; txid.SetHex(txidHex); int nOut = find_value(prevOut, "vout").get_int(); if (nOut < 0) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "vout must be positive"); string pkHex = find_value(prevOut, "scriptPubKey").get_str(); if (!IsHex(pkHex)) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "scriptPubKey must be hexadecimal"); vector<unsigned char> pkData(ParseHex(pkHex)); CScript scriptPubKey(pkData.begin(), pkData.end()); COutPoint outpoint(txid, nOut); if (mapPrevOut.count(outpoint)) { // Complain if scriptPubKey doesn't match if (mapPrevOut[outpoint] != scriptPubKey) { string err("Previous output scriptPubKey mismatch:\n"); err = err + mapPrevOut[outpoint].ToString() + "\nvs:\n"+ scriptPubKey.ToString(); throw JSONRPCError(RPC_DESERIALIZATION_ERROR, err); } } else mapPrevOut[outpoint] = scriptPubKey; } } bool fGivenKeys = false; CBasicKeyStore tempKeystore; if (params.size() > 2 && params[2].type() != null_type) { fGivenKeys = true; Array keys = params[2].get_array(); BOOST_FOREACH(Value k, keys) { CBitcoinSecret vchSecret; bool fGood = vchSecret.SetString(k.get_str()); if (!fGood) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY,"Invalid private key"); CKey key; bool fCompressed; CSecret secret = vchSecret.GetSecret(fCompressed); key.SetSecret(secret, fCompressed); tempKeystore.AddKey(key); } } else EnsureWalletIsUnlocked(); const CKeyStore& keystore = (fGivenKeys ? tempKeystore : *pwalletMain); int nHashType = SIGHASH_ALL; if (params.size() > 3 && params[3].type() != null_type) { static map<string, int> mapSigHashValues = boost::assign::map_list_of (string("ALL"), int(SIGHASH_ALL)) (string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY)) (string("NONE"), int(SIGHASH_NONE)) (string("NONE|ANYONECANPAY"), int(SIGHASH_NONE|SIGHASH_ANYONECANPAY)) (string("SINGLE"), int(SIGHASH_SINGLE)) (string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)) ; string strHashType = params[3].get_str(); if (mapSigHashValues.count(strHashType)) nHashType = mapSigHashValues[strHashType]; else throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid sighash param"); } bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE); // Sign what we can: for (unsigned int i = 0; i < mergedTx.vin.size(); i++) { CTxIn& txin = mergedTx.vin[i]; if (mapPrevOut.count(txin.prevout) == 0) { fComplete = false; continue; } const CScript& prevPubKey = mapPrevOut[txin.prevout]; txin.scriptSig.clear(); // Only sign SIGHASH_SINGLE if there's a corresponding output: if (!fHashSingle || (i < mergedTx.vout.size())) SignSignature(keystore, prevPubKey, mergedTx, i, nHashType); // ... and merge in other signatures: BOOST_FOREACH(const CTransaction& txv, txVariants) { txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig); } if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, 0)) fComplete = false; } Object result; CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << mergedTx; result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end()))); result.push_back(Pair("complete", fComplete)); return result; } Value sendrawtransaction(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 1) throw runtime_error( "sendrawtransaction <hex string>\n" "Submits raw transaction (serialized, hex-encoded) to local node and network."); RPCTypeCheck(params, list_of(str_type)); // parse hex string from parameter vector<unsigned char> txData(ParseHex(params[0].get_str())); CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION); CTransaction tx; // deserialize binary data stream try { ssData >> tx; } catch (std::exception &e) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } uint256 hashTx = tx.GetHash(); // See if the transaction is already in a block // or in the memory pool: CTransaction existingTx; uint256 hashBlock = 0; if (GetTransaction(hashTx, existingTx, hashBlock)) { if (hashBlock != 0) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("transaction already in block ")+hashBlock.GetHex()); // Not in block, but already in the memory pool; will drop // through to re-relay it. } else { // push to local node CTxDB txdb("r"); if (!tx.AcceptToMemoryPool(txdb)) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX rejected"); SyncWithWallets(tx, NULL, true); } RelayTransaction(tx, hashTx); return hashTx.GetHex(); }
[ "onyx@carsencustoms.com" ]
onyx@carsencustoms.com
da643a5bfdda54a804f507a3a76825f405432a6e
381d916e2203ec6c770432ea05326ddf1c2f9c2a
/te0711_prj.srcs/sources_1/bd/design_1/ip/design_1_axi_smc_0/sim/design_1_axi_smc_0_sc.h
e08958568520dfccca58e03d7813789d5b29ed23
[]
no_license
wknitter/te0711_prj
a9effa207176cecfee450ce149269df18de201aa
d9cf337a411de0fd2f58487c8ca9213d170ceeda
refs/heads/main
2023-04-25T00:06:32.129719
2021-05-18T17:57:16
2021-05-18T17:57:16
357,305,325
0
1
null
null
null
null
UTF-8
C++
false
false
3,452
h
#ifndef IP_DESIGN_1_AXI_SMC_0_SC_H_ #define IP_DESIGN_1_AXI_SMC_0_SC_H_ // (c) Copyright 1995-2021 Xilinx, Inc. All rights reserved. // // This file contains confidential and proprietary information // of Xilinx, Inc. and is protected under U.S. and // international copyright and other intellectual property // laws. // // DISCLAIMER // This disclaimer is not a license and does not grant any // rights to the materials distributed herewith. Except as // otherwise provided in a valid license issued to you by // Xilinx, and to the maximum extent permitted by applicable // law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND // WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES // AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING // BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- // INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and // (2) Xilinx shall not be liable (whether in contract or tort, // including negligence, or under any other theory of // liability) for any loss or damage of any kind or nature // related to, arising under or in connection with these // materials, including for any direct, or any indirect, // special, incidental, or consequential loss or damage // (including loss of data, profits, goodwill, or any type of // loss or damage suffered as a result of any action brought // by a third party) even if such damage or loss was // reasonably foreseeable or Xilinx had been advised of the // possibility of the same. // // CRITICAL APPLICATIONS // Xilinx products are not designed or intended to be fail- // safe, or for use in any application requiring fail-safe // performance, such as life-support or safety devices or // systems, Class III medical devices, nuclear facilities, // applications related to the deployment of airbags, or any // other applications that could lead to death, personal // injury, or severe property or environmental damage // (individually and collectively, "Critical // Applications"). Customer assumes the sole risk and // liability of any use of Xilinx products in Critical // Applications, subject only to applicable laws and // regulations governing limitations on product liability. // // THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS // PART OF THIS FILE AT ALL TIMES. // // DO NOT MODIFY THIS FILE. #ifndef XTLM #include "xtlm.h" #endif #ifndef SYSTEMC_INCLUDED #include <systemc> #endif #if defined(_MSC_VER) #define DllExport __declspec(dllexport) #elif defined(__GNUC__) #define DllExport __attribute__ ((visibility("default"))) #else #define DllExport #endif class smartconnect; class DllExport design_1_axi_smc_0_sc : public sc_core::sc_module { public: design_1_axi_smc_0_sc(const sc_core::sc_module_name& nm); virtual ~design_1_axi_smc_0_sc(); public: // module socket-to-socket TLM interface xtlm::xtlm_aximm_target_socket* S00_AXI_tlm_aximm_read_socket; xtlm::xtlm_aximm_target_socket* S00_AXI_tlm_aximm_write_socket; xtlm::xtlm_aximm_target_socket* S01_AXI_tlm_aximm_read_socket; xtlm::xtlm_aximm_target_socket* S01_AXI_tlm_aximm_write_socket; xtlm::xtlm_aximm_initiator_socket* M00_AXI_tlm_aximm_read_socket; xtlm::xtlm_aximm_initiator_socket* M00_AXI_tlm_aximm_write_socket; protected: smartconnect* mp_impl; private: design_1_axi_smc_0_sc(const design_1_axi_smc_0_sc&); const design_1_axi_smc_0_sc& operator=(const design_1_axi_smc_0_sc&); }; #endif // IP_DESIGN_1_AXI_SMC_0_SC_H_
[ "whitney@knitronics.com" ]
whitney@knitronics.com
db4536a17a1e4418159037e208a3c27f25a9b14b
0e007b1afb6ce6d5522a7471fef740439f56011d
/base-usage/cplusplus/client-server/test_client2.cpp
4e7feb9da7d4f681192e5b05b242c2983948ee61
[ "Unlicense" ]
permissive
sczzq/symmetrical-spoon
9ab7813c5238bb43a1c4e60244781f05bc422470
aa0c27bb40a482789c7c6a7088307320a007b49b
refs/heads/master
2021-06-03T21:00:45.448102
2020-09-01T07:12:55
2020-09-01T07:12:55
90,471,406
0
0
null
null
null
null
UTF-8
C++
false
false
2,791
cpp
/************************************************************************* > File Name: test_client2.cpp > Author: ziqiang > Mail: ziqiang_free@163.com > Created Time: Mon 08 May 2017 09:54:35 PM CST ************************************************************************/ #include <iostream> using namespace std; #include <sys/types.h> #include <sys/socket.h> #include <stdio.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <fcntl.h> #include <sys/shm.h> #define MYPORT 7000 #define BUFFER_SIZE 1024 int main() { int sock_cli; fd_set rfds; struct timeval tv; int retval, maxfd; ///定义sockfd sock_cli = socket(AF_INET,SOCK_STREAM, 0); ///定义sockaddr_in struct sockaddr_in servaddr; memset(&servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_port = htons(MYPORT); ///服务器端口 servaddr.sin_addr.s_addr = inet_addr("127.0.0.1"); ///服务器ip //连接服务器,成功返回0,错误返回-1 if (connect(sock_cli, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { perror("connect"); exit(1); } while(1){ /*把可读文件描述符的集合清空*/ FD_ZERO(&rfds); /*把标准输入的文件描述符加入到集合中*/ FD_SET(0, &rfds); maxfd = 0; /*把当前连接的文件描述符加入到集合中*/ FD_SET(sock_cli, &rfds); /*找出文件描述符集合中最大的文件描述符*/ if(maxfd < sock_cli) maxfd = sock_cli; /*设置超时时间*/ tv.tv_sec = 5; tv.tv_usec = 0; /*等待聊天*/ retval = select(maxfd+1, &rfds, NULL, NULL, &tv); if(retval == -1){ printf("select出错,客户端程序退出\n"); break; }else if(retval == 0){ printf("客户端没有任何输入信息,并且服务器也没有信息到来,waiting...\n"); continue; }else{ /*服务器发来了消息*/ if(FD_ISSET(sock_cli,&rfds)){ char recvbuf[BUFFER_SIZE]; int len; len = recv(sock_cli, recvbuf, sizeof(recvbuf),0); printf("%s", recvbuf); memset(recvbuf, 0, sizeof(recvbuf)); } /*用户输入信息了,开始处理信息并发送*/ if(FD_ISSET(0, &rfds)){ char sendbuf[BUFFER_SIZE]; fgets(sendbuf, sizeof(sendbuf), stdin); send(sock_cli, sendbuf, strlen(sendbuf),0); //发送 memset(sendbuf, 0, sizeof(sendbuf)); } } } close(sock_cli); return 0; }
[ "ziqiang_free@163.com" ]
ziqiang_free@163.com
89a0da2b7641816defe5d1e0f88bc284de366f75
579f6399b3f8238eee552b8a70b5940db894a3eb
/koryakin.afanasy/A1/circle.hpp
555dd8773eab5a4434f7a3cdad6f284427bf1557
[]
no_license
a-kashirin-official/spbspu-labs-2018
9ac7b7abaa626d07497104f20f7ed7feb6359ecf
aac2bb38fe61c12114975f034b498a116e7075c3
refs/heads/master
2020-03-19T04:18:15.774227
2018-12-02T22:21:38
2018-12-02T22:21:38
135,814,536
0
0
null
null
null
null
UTF-8
C++
false
false
408
hpp
#ifndef CIRCLE_H #define CIRCLE_H #include "shape.hpp" #include "base-types.hpp" class Circle : public Shape { public: Circle(const point_t &center, const double radius); double getArea() const override; rectangle_t getFrameRect() const override; void move(const double dx, const double dy) override; void move(const point_t &p) override; private: point_t center_; double radius_; }; #endif
[ "a.kashirin.official@gmail.com" ]
a.kashirin.official@gmail.com
c19d4792102ca2b1594e9282fac7fcb821280a6c
8a7f7233a07c758242dc9f864fad6e52d33f3e10
/src/blockchain_utilities/cn_deserialize.cpp
939d84421bea062cfb115fd1aa33474f7626328a
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
uniblockchain/ultrapoint-core
cbf3304cdd8d21fb3e0c55ebb01d7b3ff9e4482d
bd88de3b0aa45a666b19a3f79d50b0d4728417ce
refs/heads/master
2021-08-31T06:05:44.452980
2017-12-16T11:13:04
2017-12-16T11:24:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
7,172
cpp
// Copyright (c) 2014-2017, The Monero Project // // 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. 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. #include "cryptonote_basic/cryptonote_basic.h" #include "cryptonote_basic/tx_extra.h" #include "cryptonote_core/blockchain.h" #include "blockchain_utilities.h" #include "common/command_line.h" #include "version.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "bcutil" namespace po = boost::program_options; using namespace epee; using namespace cryptonote; int main(int argc, char* argv[]) { uint32_t log_level = 0; std::string input; tools::sanitize_locale(); boost::filesystem::path output_file_path; po::options_description desc_cmd_only("Command line options"); po::options_description desc_cmd_sett("Command line options and settings options"); const command_line::arg_descriptor<std::string> arg_output_file = {"output-file", "Specify output file", "", true}; const command_line::arg_descriptor<uint32_t> arg_log_level = {"log-level", "", log_level}; const command_line::arg_descriptor<std::string> arg_input = {"input", "Specify input has a hexadecimal string", ""}; command_line::add_arg(desc_cmd_sett, arg_output_file); command_line::add_arg(desc_cmd_sett, arg_log_level); command_line::add_arg(desc_cmd_sett, arg_input); command_line::add_arg(desc_cmd_only, command_line::arg_help); po::options_description desc_options("Allowed options"); desc_options.add(desc_cmd_only).add(desc_cmd_sett); po::variables_map vm; bool r = command_line::handle_error_helper(desc_options, [&]() { po::store(po::parse_command_line(argc, argv, desc_options), vm); po::notify(vm); return true; }); if (! r) return 1; if (command_line::get_arg(vm, command_line::arg_help)) { std::cout << "Ultrapoint '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } log_level = command_line::get_arg(vm, arg_log_level); input = command_line::get_arg(vm, arg_input); if (input.empty()) { std::cerr << "--input is mandatory" << std::endl; return 1; } mlog_configure("", true); std::string m_config_folder; std::ostream *output; std::ofstream *raw_data_file = NULL; if (command_line::has_arg(vm, arg_output_file)) { output_file_path = boost::filesystem::path(command_line::get_arg(vm, arg_output_file)); const boost::filesystem::path dir_path = output_file_path.parent_path(); if (!dir_path.empty()) { if (boost::filesystem::exists(dir_path)) { if (!boost::filesystem::is_directory(dir_path)) { std::cerr << "output directory path is a file: " << dir_path << std::endl; return 1; } } else { if (!boost::filesystem::create_directory(dir_path)) { std::cerr << "Failed to create directory " << dir_path << std::endl; return 1; } } } raw_data_file = new std::ofstream(); raw_data_file->open(output_file_path.string(), std::ios_base::out | std::ios::trunc); if (raw_data_file->fail()) return 1; output = raw_data_file; } else { output_file_path = ""; output = &std::cout; } cryptonote::blobdata blob; if (!epee::string_tools::parse_hexstr_to_binbuff(input, blob)) { std::cerr << "Invalid hex input" << std::endl; std::cerr << "Invalid hex input: " << input << std::endl; return 1; } cryptonote::block block; cryptonote::transaction tx; std::vector<cryptonote::tx_extra_field> fields; if (cryptonote::parse_and_validate_block_from_blob(blob, block)) { std::cout << "Parsed block:" << std::endl; std::cout << cryptonote::obj_to_json_str(block) << std::endl; } else if (cryptonote::parse_and_validate_tx_from_blob(blob, tx)) { std::cout << "Parsed transaction:" << std::endl; std::cout << cryptonote::obj_to_json_str(tx) << std::endl; if (cryptonote::parse_tx_extra(tx.extra, fields)) { std::cout << "tx_extra has " << fields.size() << " field(s)" << std::endl; for (size_t n = 0; n < fields.size(); ++n) { std::cout << "field " << n << ": "; if (typeid(cryptonote::tx_extra_padding) == fields[n].type()) std::cout << "extra padding: " << boost::get<cryptonote::tx_extra_padding>(fields[n]).size << " bytes"; else if (typeid(cryptonote::tx_extra_pub_key) == fields[n].type()) std::cout << "extra pub key: " << boost::get<cryptonote::tx_extra_pub_key>(fields[n]).pub_key; else if (typeid(cryptonote::tx_extra_nonce) == fields[n].type()) std::cout << "extra nonce: " << epee::string_tools::buff_to_hex_nodelimer(boost::get<cryptonote::tx_extra_nonce>(fields[n]).nonce); else if (typeid(cryptonote::tx_extra_merge_mining_tag) == fields[n].type()) std::cout << "extra merge mining tag: depth " << boost::get<cryptonote::tx_extra_merge_mining_tag>(fields[n]).depth << ", merkle root " << boost::get<cryptonote::tx_extra_merge_mining_tag>(fields[n]).merkle_root; else if (typeid(cryptonote::tx_extra_mysterious_minergate) == fields[n].type()) std::cout << "extra minergate custom: " << epee::string_tools::buff_to_hex_nodelimer(boost::get<cryptonote::tx_extra_mysterious_minergate>(fields[n]).data); else std::cout << "unknown"; std::cout << std::endl; } } else { std::cout << "Failed to parse tx_extra" << std::endl; } } else { std::cerr << "Not a recognized CN type" << std::endl; return 1; } if (output->fail()) return 1; output->flush(); if (raw_data_file) delete raw_data_file; return 0; }
[ "devtnga@gmail.com" ]
devtnga@gmail.com
c36bb2366deea47d0fad8d374f0a67bc337b0b0e
063e25de1aebb2b22f8f79416377a5a7de991df4
/StepTest.cpp
3b92302a71222b247f777e3c38f48ab94002af71
[]
no_license
samsaradog/tttcpp
f1f0dae8b74cf26338ac04d6a7e9f44acb0797dd
a6aa12d25501d4a754c2b5a134f779448237c644
refs/heads/master
2020-06-06T16:49:54.153975
2012-08-09T20:40:28
2012-08-09T20:40:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,696
cpp
// file StepTest.cpp #include <iostream> #include <cppunit/config/SourcePrefix.h> #include "StepTest.h" #include "StepFactory.h" CPPUNIT_TEST_SUITE_REGISTRATION( StepTest ); //--------------------------------------------------------------- void StepTest::setUp() { StepFactory the_factory; step_m_p = the_factory.getSteps(); } //--------------------------------------------------------------- void StepTest::tearDown() { if ( NULL != step_m_p ) { delete step_m_p; step_m_p = NULL; } } //--------------------------------------------------------------- // This step checks for a valid user move void StepTest::testStep1() { game_m.addMove(1, &human_m); string message(""); bool keep_playing = step_m_p->makeMove(1, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "Square 2 not available. Please choose another.\n" ); CPPUNIT_ASSERT( keep_playing ); } //--------------------------------------------------------------- // This step says that if adding the human move means the // human wins, announce the win and end the game. void StepTest::testStep2() { game_m.addMove(2, &human_m); game_m.addMove(3, &human_m); string message(""); bool keep_playing = step_m_p->makeMove(4, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "The Human has won. Congratulations!\n"); CPPUNIT_ASSERT( !keep_playing ); } //--------------------------------------------------------------- // This step says that if there is no move left after the human // moves, declare a draw and end the game. void StepTest::testStep3() { for ( int i = 1; i < 9; i++ ) game_m.addMove(i, &computer_m); string message(""); bool keep_playing = step_m_p->makeMove(0, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "Draw Game.\n"); CPPUNIT_ASSERT( !keep_playing ); } //--------------------------------------------------------------- // This step checks whether the computer can make a winning move. // If so, make the move and announce the win. void StepTest::testStep4() { game_m.addMove(3, &computer_m); game_m.addMove(8, &computer_m); string message(""); bool keep_playing = step_m_p->makeMove(1, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "Computer Wins!\n" ); CPPUNIT_ASSERT( !keep_playing ); } //--------------------------------------------------------------- // This step is for the computer making a blocking move. This first // version is when the blocking move is the last available, creating // a draw void StepTest::testStep5a() { game_m.addMove(0, &computer_m); game_m.addMove(1, &computer_m); game_m.addMove(3, &computer_m); game_m.addMove(8, &computer_m); game_m.addMove(2, &human_m); game_m.addMove(4, &human_m); game_m.addMove(7, &human_m); string message(""); bool keep_playing = step_m_p->makeMove(5, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "Draw Game.\n" ); CPPUNIT_ASSERT( !keep_playing ); } //--------------------------------------------------------------- // This next case is as above, but the game can continue void StepTest::testStep5b() { game_m.addMove(3, &computer_m); game_m.addMove(8, &computer_m); game_m.addMove(2, &human_m); game_m.addMove(7, &human_m); string message(""); bool keep_playing = step_m_p->makeMove(6, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "" ); CPPUNIT_ASSERT( keep_playing ); } //--------------------------------------------------------------- // This step is the last in the chain. It has the computer pick // a square based on its rules. The first case creates a draw. void StepTest::testLastStepA() { game_m.addMove(1, &computer_m); game_m.addMove(4, &computer_m); game_m.addMove(6, &computer_m); game_m.addMove(8, &computer_m); game_m.addMove(2, &human_m); game_m.addMove(3, &human_m); game_m.addMove(5, &human_m); string message(""); bool keep_playing = step_m_p->makeMove(0, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "Draw Game.\n" ); CPPUNIT_ASSERT( !keep_playing ); } //--------------------------------------------------------------- // This case does not create a draw void StepTest::testLastStepB() { game_m.addMove(1, &computer_m); game_m.addMove(3, &human_m); string message(""); bool keep_playing = step_m_p->makeMove(6, message, &human_m, &computer_m, &game_m); CPPUNIT_ASSERT( message == "" ); CPPUNIT_ASSERT( keep_playing ); } //---------------------------------------------------------------
[ "shinkyo@iglou.com" ]
shinkyo@iglou.com
896146af3ac9501934e94468e143324cc76b6f87
6fddb9789cdcae612766266ee05d1ad850b9f0ab
/CppFizzBuzz04b/include/range/v3/iterator/diffmax_t.hpp
57a280cd7e8d5e6c180633c3d3c3d9f20f7d331a
[]
no_license
melston/cppFizzBuzz
a8488b35981fc1ab69f4100df0082a2e2cfba8e7
adc2cdeb8b187288857a23b01908a6f1727641c1
refs/heads/master
2020-05-27T17:19:51.376255
2019-06-06T04:32:12
2019-06-06T04:32:12
188,717,867
0
0
null
null
null
null
UTF-8
C++
false
false
17,514
hpp
/// \file // Range v3 library // // Copyright Eric Niebler 2019-present // // Use, modification and distribution is subject to 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) // // Project home: https://github.com/ericniebler/range-v3 // #ifndef RANGES_V3_ITERATOR_DIFFMAX_T_HPP #define RANGES_V3_ITERATOR_DIFFMAX_T_HPP #include <cstdint> #include <iosfwd> #include <limits> #include <concepts/concepts.hpp> #include <range/v3/range_fwd.hpp> #include <range/v3/iterator/concepts.hpp> namespace ranges { /// \cond namespace detail { struct diffmax_t { private: bool neg_; std::uintmax_t val_; struct tag {}; constexpr diffmax_t(tag, bool neg, std::uintmax_t val) : neg_(val && neg) , val_(val) {} /// \cond constexpr /*c++14*/ void _check() { RANGES_ENSURE(!neg_ || val_); } static constexpr diffmax_t _normalize(bool neg, std::uintmax_t val) { return diffmax_t{tag{}, val && neg, val}; } /// \endcond public: diffmax_t() = default; template<typename T> constexpr CPP_ctor(diffmax_t)(T val)(noexcept(true) requires Integral<T>) : neg_(0 > val) , val_(0 > val ? static_cast<std::uintmax_t>(-val) : static_cast<std::uintmax_t>(val)) {} constexpr friend bool operator<(diffmax_t a, diffmax_t b) noexcept { a._check(); b._check(); return a.neg_ ? (b.neg_ ? a.val_ > b.val_ : true) : (b.neg_ ? false : a.val_ < b.val_); } constexpr friend bool operator>(diffmax_t a, diffmax_t b) noexcept { return b < a; } constexpr friend bool operator<=(diffmax_t a, diffmax_t b) noexcept { return !(b < a); } constexpr friend bool operator>=(diffmax_t a, diffmax_t b) noexcept { return !(a < b); } constexpr friend bool operator==(diffmax_t a, diffmax_t b) noexcept { a._check(); b._check(); return a.val_ == b.val_ && a.neg_ == b.neg_; } constexpr friend bool operator!=(diffmax_t a, diffmax_t b) noexcept { return !(a == b); } constexpr friend diffmax_t operator+(diffmax_t a) noexcept { return a; } constexpr friend diffmax_t operator-(diffmax_t a) noexcept { return _normalize(!a.neg_, a.val_); } constexpr friend diffmax_t operator+(diffmax_t a, diffmax_t b) noexcept { return a.neg_ == b.neg_ ? diffmax_t{tag{}, a.neg_, a.val_ + b.val_} : (a.neg_ ? (a.val_ > b.val_ ? diffmax_t{tag{}, true, a.val_ - b.val_} : diffmax_t{tag{}, false, b.val_ - a.val_}) : (b.val_ > a.val_ ? diffmax_t{tag{}, true, b.val_ - a.val_} : diffmax_t{tag{}, false, a.val_ - b.val_})); } constexpr friend diffmax_t operator-(diffmax_t a, diffmax_t b) noexcept { return a + -b; } constexpr friend diffmax_t operator*(diffmax_t a, diffmax_t b) noexcept { return _normalize(a.neg_ ^ b.neg_, a.val_ * b.val_); } constexpr friend diffmax_t operator/(diffmax_t a, diffmax_t b) noexcept { return _normalize(a.neg_ ^ b.neg_, a.val_ / b.val_); } constexpr friend diffmax_t operator%(diffmax_t a, diffmax_t b) noexcept { return _normalize(a.neg_, a.val_ % b.val_); } static constexpr std::uintmax_t compl_if(bool neg, std::uintmax_t val) noexcept { return neg ? ~val + 1 : val; } constexpr friend diffmax_t operator&(diffmax_t a, diffmax_t b) noexcept { return _normalize( a.neg_ && b.neg_, compl_if( a.neg_ && b.neg_, compl_if(a.neg_, a.val_) & compl_if(b.neg_, b.val_))); } constexpr friend diffmax_t operator|(diffmax_t a, diffmax_t b) noexcept { return _normalize( a.neg_ || b.neg_, compl_if( a.neg_ || b.neg_, compl_if(a.neg_, a.val_) | compl_if(b.neg_, b.val_))); } constexpr friend diffmax_t operator^(diffmax_t a, diffmax_t b) noexcept { return _normalize( bool(a.neg_ ^ b.neg_), compl_if( bool(a.neg_ ^ b.neg_), compl_if(a.neg_, a.val_) ^ compl_if(b.neg_, b.val_))); } constexpr friend diffmax_t operator<<(diffmax_t a, diffmax_t b) noexcept { RANGES_ENSURE(!a.neg_); return b.neg_ ? diffmax_t{tag{}, false, a.val_ >> b.val_} : diffmax_t{tag{}, false, a.val_ << b.val_}; } constexpr friend diffmax_t operator>>(diffmax_t a, diffmax_t b) noexcept { return b.neg_ ? diffmax_t{tag{}, a.neg_, a.val_ << b.val_} : diffmax_t{tag{}, a.neg_, a.val_ >> b.val_}; } constexpr /*c++14*/ friend diffmax_t& operator+=(diffmax_t& a, diffmax_t b) noexcept { return (a = a + b); } constexpr /*c++14*/ friend diffmax_t& operator-=(diffmax_t& a, diffmax_t b) noexcept { return (a = a - b); } constexpr /*c++14*/ friend diffmax_t& operator*=(diffmax_t& a, diffmax_t b) noexcept { return (a = a * b); } constexpr /*c++14*/ friend diffmax_t& operator/=(diffmax_t& a, diffmax_t b) noexcept { return (a = a / b); } constexpr /*c++14*/ friend diffmax_t& operator%=(diffmax_t& a, diffmax_t b) noexcept { return (a = a % b); } constexpr /*c++14*/ friend diffmax_t& operator&=(diffmax_t& a, diffmax_t b) noexcept { return (a = a & b); } constexpr /*c++14*/ friend diffmax_t& operator|=(diffmax_t& a, diffmax_t b) noexcept { return (a = a | b); } constexpr /*c++14*/ friend diffmax_t& operator^=(diffmax_t& a, diffmax_t b) noexcept { return (a = a ^ b); } constexpr /*c++14*/ friend diffmax_t& operator<<=(diffmax_t& a, diffmax_t b) noexcept { a = (a << b); return a; } constexpr /*c++14*/ friend diffmax_t& operator>>=(diffmax_t& a, diffmax_t b) noexcept { a = (a >> b); return a; } template<typename T> constexpr /*c++14*/ friend auto operator+=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} + b)); } template<typename T> constexpr /*c++14*/ friend auto operator-=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} - b)); } template<typename T> constexpr /*c++14*/ friend auto operator*=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} * b)); } template<typename T> constexpr /*c++14*/ friend auto operator/=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} / b)); } template<typename T> constexpr /*c++14*/ friend auto operator%=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} % b)); } template<typename T> constexpr /*c++14*/ friend auto operator&=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} & b)); } template<typename T> constexpr /*c++14*/ friend auto operator|=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} | b)); } template<typename T> constexpr /*c++14*/ friend auto operator^=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { return (a = static_cast<T>(diffmax_t{a} ^ b)); } template<typename T> constexpr /*c++14*/ friend auto operator<<=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { a = static_cast<T>(diffmax_t{a} << b); return a; } template<typename T> constexpr /*c++14*/ friend auto operator>>=(T& a, diffmax_t b) noexcept -> CPP_broken_friend_ret(T&)( requires Integral<T>) { a = static_cast<T>(diffmax_t{a} >> b); return a; } constexpr /*c++14*/ friend diffmax_t& operator++(diffmax_t& a) noexcept { a.neg_ = (a.neg_ ? --a.val_ : ++a.val_) && a.neg_; return a; } constexpr /*c++14*/ friend diffmax_t& operator--(diffmax_t& a) noexcept { a.neg_ = (a.neg_ ? ++a.val_ : --a.val_) && a.neg_; return a; } constexpr /*c++14*/ friend diffmax_t operator++(diffmax_t& a, int) noexcept { auto tmp = a; ++a; return tmp; } constexpr /*c++14*/ friend diffmax_t operator--(diffmax_t& a, int) noexcept { auto tmp = a; --a; return tmp; } CPP_template(typename T)( requires Integral<T>) explicit constexpr operator T() const noexcept { return neg_ ? -static_cast<T>(val_) : static_cast<T>(val_); } explicit constexpr operator bool() const noexcept { return val_ != 0; } constexpr bool operator!() const noexcept { return val_ == 0; } template<typename Ostream> friend auto operator<<(Ostream& sout, diffmax_t a) -> CPP_broken_friend_ret(std::ostream&)( requires DerivedFrom< Ostream, std::basic_ostream< typename Ostream::char_type, typename Ostream::traits_type>>) { return sout << (&"-"[!a.neg_]) << a.val_; } }; template<> RANGES_INLINE_VAR constexpr bool _is_integer_like_<diffmax_t> = true; } /// \endcond } /// \cond RANGES_DIAGNOSTIC_PUSH RANGES_DIAGNOSTIC_IGNORE_MISMATCHED_TAGS namespace std { template <> struct numeric_limits< ::ranges::detail::diffmax_t > { static constexpr bool is_specialized = true; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr bool has_denorm = false; static constexpr bool has_denorm_loss = false; static constexpr std::float_round_style round_style = std::round_toward_zero; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr int digits = CHAR_BIT * sizeof(std::uintmax_t) + 1; static constexpr int digits10 = static_cast<int>(digits * 0.301029996); // digits * std::log10(2) static constexpr int max_digits10 = 0; static constexpr int radix = 2; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr ::ranges::detail::diffmax_t max() noexcept { return std::uintmax_t(-1); } static constexpr ::ranges::detail::diffmax_t min() noexcept { return -max(); } static constexpr ::ranges::detail::diffmax_t lowest() noexcept { return min(); } static constexpr ::ranges::detail::diffmax_t epsilon() noexcept { return 0; } static constexpr ::ranges::detail::diffmax_t round_error() noexcept { return 0; } static constexpr ::ranges::detail::diffmax_t infinity() noexcept { return 0; } static constexpr ::ranges::detail::diffmax_t quiet_NaN() noexcept { return 0; } static constexpr ::ranges::detail::diffmax_t signaling_NaN() noexcept { return 0; } static constexpr ::ranges::detail::diffmax_t denorm_min() noexcept { return 0; } }; template <> struct numeric_limits< ::ranges::detail::diffmax_t const > : numeric_limits< ::ranges::detail::diffmax_t > {}; template <> struct numeric_limits< ::ranges::detail::diffmax_t volatile > : numeric_limits< ::ranges::detail::diffmax_t > {}; template <> struct numeric_limits< ::ranges::detail::diffmax_t const volatile > : numeric_limits< ::ranges::detail::diffmax_t > {}; #if RANGES_CXX_INLINE_VARIABLES >= RANGES_CXX_INLINE_VARIABLES_17 inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_specialized; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_signed; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_integer; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_exact; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_infinity; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_quiet_NaN; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_signaling_NaN; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_denorm; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_denorm_loss; inline constexpr std::float_round_style numeric_limits< ::ranges::detail::diffmax_t >::round_style; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_iec559; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_bounded; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_modulo; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::digits; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::digits10; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::max_digits10; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::radix; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::min_exponent; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::min_exponent10; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::max_exponent; inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::max_exponent10; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::traps; inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::tinyness_before; #endif } // namespace std RANGES_DIAGNOSTIC_POP /// \endcond #endif
[ "melston1777@gmail.com" ]
melston1777@gmail.com
c9803d81d66a47a65e50f09e83e4d1d4d8e3f022
4b8886c64703f9025c91f7d38c356cf1b001b2a1
/Library/Il2cppBuildCache/WebGL/il2cppOutput/UnityEngine.AnimationModule.cpp
a7afcd9017579913a9b51d670e4948a898617822
[]
no_license
MikoCode/CaveRide
cdb5394d9e81afd18d99f6d97a19e640620b904e
330cb9f8879163a630fb11950e1d4fa52c36fcfd
refs/heads/main
2023-08-27T21:01:19.421432
2021-11-13T10:05:57
2021-11-13T10:05:57
355,978,043
0
0
null
null
null
null
UTF-8
C++
false
false
242,487
cpp
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> template <typename R, typename T1> struct VirtualFuncInvoker1 { typedef R (*Func)(void*, T1, const RuntimeMethod*); static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); return ((Func)invokeData.methodPtr)(obj, p1, invokeData.method); } }; // System.Char[] struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34; // System.Delegate[] struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8; // System.IntPtr[] struct IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6; // System.Diagnostics.StackTrace[] struct StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971; // UnityEngine.AnimationEvent struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF; // UnityEngine.AnimationState struct AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD; // UnityEngine.Animator struct Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149; // UnityEngine.AnimatorOverrideController struct AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA; // System.Delegate struct Delegate_t; // System.DelegateData struct DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288; // System.Collections.IDictionary struct IDictionary_t99871C56B8EC2452AC5C4CF3831695E617B89D3A; // System.InvalidCastException struct InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463; // System.InvalidOperationException struct InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB; // System.Reflection.MethodInfo struct MethodInfo_t; // UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A; // System.Runtime.Serialization.SafeSerializationManager struct SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F; // UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A; // UnityEngine.StateMachineBehaviour struct StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F; // System.String struct String_t; // System.Void struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5; // UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback struct OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C; IL2CPP_EXTERN_C RuntimeClass* AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C String_t* _stringLiteral4DEE968069F34C26613ADFCD69C41EFC29314286; IL2CPP_EXTERN_C String_t* _stringLiteral860B9EA7CDAB02A8A4B38336805EAE2FBA31F09C; IL2CPP_EXTERN_C String_t* _stringLiteral8DC2252638D84FAF2C30B95D54EC83F52FA6C630; IL2CPP_EXTERN_C String_t* _stringLiteral98C704D69BD1A288ED31DEE4ED4E50097A2D7018; IL2CPP_EXTERN_C String_t* _stringLiteralA3C8FF345EC45846B2EE6801F84DD49340F0A9E1; IL2CPP_EXTERN_C String_t* _stringLiteralBF563F6FCC25CE41FFE0BF7590AF9F4475916665; IL2CPP_EXTERN_C String_t* _stringLiteralD2435BFAEB0372E848D9BE812E3B06AB862CC3D1; IL2CPP_EXTERN_C String_t* _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709; IL2CPP_EXTERN_C String_t* _stringLiteralE066D08B565F88D413FDACA14C42BFF008FF4EB9; IL2CPP_EXTERN_C String_t* _stringLiteralF5510C45DDAD777CCB4893578D995C9739F990F2; IL2CPP_EXTERN_C const RuntimeMethod* AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_RuntimeMethod_var; struct Delegate_t_marshaled_com; struct Delegate_t_marshaled_pinvoke; struct Exception_t_marshaled_com; struct Exception_t_marshaled_pinvoke; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A;; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com;; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke;; struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8; IL2CPP_EXTERN_C_BEGIN IL2CPP_EXTERN_C_END #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <Module> struct U3CModuleU3E_t3C417EDD55E853BAA084114A5B12880739B4473C { public: public: }; // System.Object struct Il2CppArrayBounds; // System.Array // System.Attribute struct Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 : public RuntimeObject { public: public: }; // System.String struct String_t : public RuntimeObject { public: // System.Int32 System.String::m_stringLength int32_t ___m_stringLength_0; // System.Char System.String::m_firstChar Il2CppChar ___m_firstChar_1; public: inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); } inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; } inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; } inline void set_m_stringLength_0(int32_t value) { ___m_stringLength_0 = value; } inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); } inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; } inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; } inline void set_m_firstChar_1(Il2CppChar value) { ___m_firstChar_1 = value; } }; struct String_t_StaticFields { public: // System.String System.String::Empty String_t* ___Empty_5; public: inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); } inline String_t* get_Empty_5() const { return ___Empty_5; } inline String_t** get_address_of_Empty_5() { return &___Empty_5; } inline void set_Empty_5(String_t* value) { ___Empty_5 = value; Il2CppCodeGenWriteBarrier((void**)(&___Empty_5), (void*)value); } }; // System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject { public: public: }; // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com { }; // UnityEngine.AnimatorClipInfo struct AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 { public: // System.Int32 UnityEngine.AnimatorClipInfo::m_ClipInstanceID int32_t ___m_ClipInstanceID_0; // System.Single UnityEngine.AnimatorClipInfo::m_Weight float ___m_Weight_1; public: inline static int32_t get_offset_of_m_ClipInstanceID_0() { return static_cast<int32_t>(offsetof(AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610, ___m_ClipInstanceID_0)); } inline int32_t get_m_ClipInstanceID_0() const { return ___m_ClipInstanceID_0; } inline int32_t* get_address_of_m_ClipInstanceID_0() { return &___m_ClipInstanceID_0; } inline void set_m_ClipInstanceID_0(int32_t value) { ___m_ClipInstanceID_0 = value; } inline static int32_t get_offset_of_m_Weight_1() { return static_cast<int32_t>(offsetof(AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610, ___m_Weight_1)); } inline float get_m_Weight_1() const { return ___m_Weight_1; } inline float* get_address_of_m_Weight_1() { return &___m_Weight_1; } inline void set_m_Weight_1(float value) { ___m_Weight_1 = value; } }; // UnityEngine.AnimatorStateInfo struct AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA { public: // System.Int32 UnityEngine.AnimatorStateInfo::m_Name int32_t ___m_Name_0; // System.Int32 UnityEngine.AnimatorStateInfo::m_Path int32_t ___m_Path_1; // System.Int32 UnityEngine.AnimatorStateInfo::m_FullPath int32_t ___m_FullPath_2; // System.Single UnityEngine.AnimatorStateInfo::m_NormalizedTime float ___m_NormalizedTime_3; // System.Single UnityEngine.AnimatorStateInfo::m_Length float ___m_Length_4; // System.Single UnityEngine.AnimatorStateInfo::m_Speed float ___m_Speed_5; // System.Single UnityEngine.AnimatorStateInfo::m_SpeedMultiplier float ___m_SpeedMultiplier_6; // System.Int32 UnityEngine.AnimatorStateInfo::m_Tag int32_t ___m_Tag_7; // System.Int32 UnityEngine.AnimatorStateInfo::m_Loop int32_t ___m_Loop_8; public: inline static int32_t get_offset_of_m_Name_0() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_Name_0)); } inline int32_t get_m_Name_0() const { return ___m_Name_0; } inline int32_t* get_address_of_m_Name_0() { return &___m_Name_0; } inline void set_m_Name_0(int32_t value) { ___m_Name_0 = value; } inline static int32_t get_offset_of_m_Path_1() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_Path_1)); } inline int32_t get_m_Path_1() const { return ___m_Path_1; } inline int32_t* get_address_of_m_Path_1() { return &___m_Path_1; } inline void set_m_Path_1(int32_t value) { ___m_Path_1 = value; } inline static int32_t get_offset_of_m_FullPath_2() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_FullPath_2)); } inline int32_t get_m_FullPath_2() const { return ___m_FullPath_2; } inline int32_t* get_address_of_m_FullPath_2() { return &___m_FullPath_2; } inline void set_m_FullPath_2(int32_t value) { ___m_FullPath_2 = value; } inline static int32_t get_offset_of_m_NormalizedTime_3() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_NormalizedTime_3)); } inline float get_m_NormalizedTime_3() const { return ___m_NormalizedTime_3; } inline float* get_address_of_m_NormalizedTime_3() { return &___m_NormalizedTime_3; } inline void set_m_NormalizedTime_3(float value) { ___m_NormalizedTime_3 = value; } inline static int32_t get_offset_of_m_Length_4() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_Length_4)); } inline float get_m_Length_4() const { return ___m_Length_4; } inline float* get_address_of_m_Length_4() { return &___m_Length_4; } inline void set_m_Length_4(float value) { ___m_Length_4 = value; } inline static int32_t get_offset_of_m_Speed_5() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_Speed_5)); } inline float get_m_Speed_5() const { return ___m_Speed_5; } inline float* get_address_of_m_Speed_5() { return &___m_Speed_5; } inline void set_m_Speed_5(float value) { ___m_Speed_5 = value; } inline static int32_t get_offset_of_m_SpeedMultiplier_6() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_SpeedMultiplier_6)); } inline float get_m_SpeedMultiplier_6() const { return ___m_SpeedMultiplier_6; } inline float* get_address_of_m_SpeedMultiplier_6() { return &___m_SpeedMultiplier_6; } inline void set_m_SpeedMultiplier_6(float value) { ___m_SpeedMultiplier_6 = value; } inline static int32_t get_offset_of_m_Tag_7() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_Tag_7)); } inline int32_t get_m_Tag_7() const { return ___m_Tag_7; } inline int32_t* get_address_of_m_Tag_7() { return &___m_Tag_7; } inline void set_m_Tag_7(int32_t value) { ___m_Tag_7 = value; } inline static int32_t get_offset_of_m_Loop_8() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA, ___m_Loop_8)); } inline int32_t get_m_Loop_8() const { return ___m_Loop_8; } inline int32_t* get_address_of_m_Loop_8() { return &___m_Loop_8; } inline void set_m_Loop_8(int32_t value) { ___m_Loop_8 = value; } }; // UnityEngine.AnimatorTransitionInfo struct AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0 { public: // System.Int32 UnityEngine.AnimatorTransitionInfo::m_FullPath int32_t ___m_FullPath_0; // System.Int32 UnityEngine.AnimatorTransitionInfo::m_UserName int32_t ___m_UserName_1; // System.Int32 UnityEngine.AnimatorTransitionInfo::m_Name int32_t ___m_Name_2; // System.Boolean UnityEngine.AnimatorTransitionInfo::m_HasFixedDuration bool ___m_HasFixedDuration_3; // System.Single UnityEngine.AnimatorTransitionInfo::m_Duration float ___m_Duration_4; // System.Single UnityEngine.AnimatorTransitionInfo::m_NormalizedTime float ___m_NormalizedTime_5; // System.Boolean UnityEngine.AnimatorTransitionInfo::m_AnyState bool ___m_AnyState_6; // System.Int32 UnityEngine.AnimatorTransitionInfo::m_TransitionType int32_t ___m_TransitionType_7; public: inline static int32_t get_offset_of_m_FullPath_0() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_FullPath_0)); } inline int32_t get_m_FullPath_0() const { return ___m_FullPath_0; } inline int32_t* get_address_of_m_FullPath_0() { return &___m_FullPath_0; } inline void set_m_FullPath_0(int32_t value) { ___m_FullPath_0 = value; } inline static int32_t get_offset_of_m_UserName_1() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_UserName_1)); } inline int32_t get_m_UserName_1() const { return ___m_UserName_1; } inline int32_t* get_address_of_m_UserName_1() { return &___m_UserName_1; } inline void set_m_UserName_1(int32_t value) { ___m_UserName_1 = value; } inline static int32_t get_offset_of_m_Name_2() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_Name_2)); } inline int32_t get_m_Name_2() const { return ___m_Name_2; } inline int32_t* get_address_of_m_Name_2() { return &___m_Name_2; } inline void set_m_Name_2(int32_t value) { ___m_Name_2 = value; } inline static int32_t get_offset_of_m_HasFixedDuration_3() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_HasFixedDuration_3)); } inline bool get_m_HasFixedDuration_3() const { return ___m_HasFixedDuration_3; } inline bool* get_address_of_m_HasFixedDuration_3() { return &___m_HasFixedDuration_3; } inline void set_m_HasFixedDuration_3(bool value) { ___m_HasFixedDuration_3 = value; } inline static int32_t get_offset_of_m_Duration_4() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_Duration_4)); } inline float get_m_Duration_4() const { return ___m_Duration_4; } inline float* get_address_of_m_Duration_4() { return &___m_Duration_4; } inline void set_m_Duration_4(float value) { ___m_Duration_4 = value; } inline static int32_t get_offset_of_m_NormalizedTime_5() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_NormalizedTime_5)); } inline float get_m_NormalizedTime_5() const { return ___m_NormalizedTime_5; } inline float* get_address_of_m_NormalizedTime_5() { return &___m_NormalizedTime_5; } inline void set_m_NormalizedTime_5(float value) { ___m_NormalizedTime_5 = value; } inline static int32_t get_offset_of_m_AnyState_6() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_AnyState_6)); } inline bool get_m_AnyState_6() const { return ___m_AnyState_6; } inline bool* get_address_of_m_AnyState_6() { return &___m_AnyState_6; } inline void set_m_AnyState_6(bool value) { ___m_AnyState_6 = value; } inline static int32_t get_offset_of_m_TransitionType_7() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___m_TransitionType_7)); } inline int32_t get_m_TransitionType_7() const { return ___m_TransitionType_7; } inline int32_t* get_address_of_m_TransitionType_7() { return &___m_TransitionType_7; } inline void set_m_TransitionType_7(int32_t value) { ___m_TransitionType_7 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.AnimatorTransitionInfo struct AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_pinvoke { int32_t ___m_FullPath_0; int32_t ___m_UserName_1; int32_t ___m_Name_2; int32_t ___m_HasFixedDuration_3; float ___m_Duration_4; float ___m_NormalizedTime_5; int32_t ___m_AnyState_6; int32_t ___m_TransitionType_7; }; // Native definition for COM marshalling of UnityEngine.AnimatorTransitionInfo struct AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_com { int32_t ___m_FullPath_0; int32_t ___m_UserName_1; int32_t ___m_Name_2; int32_t ___m_HasFixedDuration_3; float ___m_Duration_4; float ___m_NormalizedTime_5; int32_t ___m_AnyState_6; int32_t ___m_TransitionType_7; }; // System.Boolean struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37 { public: // System.Boolean System.Boolean::m_value bool ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___m_value_0)); } inline bool get_m_value_0() const { return ___m_value_0; } inline bool* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(bool value) { ___m_value_0 = value; } }; struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields { public: // System.String System.Boolean::TrueString String_t* ___TrueString_5; // System.String System.Boolean::FalseString String_t* ___FalseString_6; public: inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___TrueString_5)); } inline String_t* get_TrueString_5() const { return ___TrueString_5; } inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; } inline void set_TrueString_5(String_t* value) { ___TrueString_5 = value; Il2CppCodeGenWriteBarrier((void**)(&___TrueString_5), (void*)value); } inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___FalseString_6)); } inline String_t* get_FalseString_6() const { return ___FalseString_6; } inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; } inline void set_FalseString_6(String_t* value) { ___FalseString_6 = value; Il2CppCodeGenWriteBarrier((void**)(&___FalseString_6), (void*)value); } }; // UnityEngine.Animations.DiscreteEvaluationAttribute struct DiscreteEvaluationAttribute_tF3D5E95A11BF8B0C9B7A458849A893C62AB8807B : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 { public: public: }; // System.Enum struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA : public ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 { public: public: }; struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields { public: // System.Char[] System.Enum::enumSeperatorCharArray CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* ___enumSeperatorCharArray_0; public: inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields, ___enumSeperatorCharArray_0)); } inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; } inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; } inline void set_enumSeperatorCharArray_0(CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* value) { ___enumSeperatorCharArray_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value); } }; // Native definition for P/Invoke marshalling of System.Enum struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_pinvoke { }; // Native definition for COM marshalling of System.Enum struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_com { }; // System.Int32 struct Int32_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046 { public: // System.Int32 System.Int32::m_value int32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046, ___m_value_0)); } inline int32_t get_m_value_0() const { return ___m_value_0; } inline int32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(int32_t value) { ___m_value_0 = value; } }; // System.IntPtr struct IntPtr_t { public: // System.Void* System.IntPtr::m_value void* ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); } inline void* get_m_value_0() const { return ___m_value_0; } inline void** get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(void* value) { ___m_value_0 = value; } }; struct IntPtr_t_StaticFields { public: // System.IntPtr System.IntPtr::Zero intptr_t ___Zero_1; public: inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); } inline intptr_t get_Zero_1() const { return ___Zero_1; } inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; } inline void set_Zero_1(intptr_t value) { ___Zero_1 = value; } }; // UnityEngine.Animations.NotKeyableAttribute struct NotKeyableAttribute_tE0C94B5FF990C6B4BB118486BCA35CCDA91AA905 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 { public: public: }; // UnityEngine.Quaternion struct Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 { public: // System.Single UnityEngine.Quaternion::x float ___x_0; // System.Single UnityEngine.Quaternion::y float ___y_1; // System.Single UnityEngine.Quaternion::z float ___z_2; // System.Single UnityEngine.Quaternion::w float ___w_3; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___x_0)); } inline float get_x_0() const { return ___x_0; } inline float* get_address_of_x_0() { return &___x_0; } inline void set_x_0(float value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___y_1)); } inline float get_y_1() const { return ___y_1; } inline float* get_address_of_y_1() { return &___y_1; } inline void set_y_1(float value) { ___y_1 = value; } inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___z_2)); } inline float get_z_2() const { return ___z_2; } inline float* get_address_of_z_2() { return &___z_2; } inline void set_z_2(float value) { ___z_2 = value; } inline static int32_t get_offset_of_w_3() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___w_3)); } inline float get_w_3() const { return ___w_3; } inline float* get_address_of_w_3() { return &___w_3; } inline void set_w_3(float value) { ___w_3 = value; } }; struct Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_StaticFields { public: // UnityEngine.Quaternion UnityEngine.Quaternion::identityQuaternion Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___identityQuaternion_4; public: inline static int32_t get_offset_of_identityQuaternion_4() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_StaticFields, ___identityQuaternion_4)); } inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 get_identityQuaternion_4() const { return ___identityQuaternion_4; } inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 * get_address_of_identityQuaternion_4() { return &___identityQuaternion_4; } inline void set_identityQuaternion_4(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 value) { ___identityQuaternion_4 = value; } }; // UnityEngine.SharedBetweenAnimatorsAttribute struct SharedBetweenAnimatorsAttribute_t1F94A6AF21AC0F90F38FFEDE964054F34A117279 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 { public: public: }; // System.Single struct Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E { public: // System.Single System.Single::m_value float ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E, ___m_value_0)); } inline float get_m_value_0() const { return ___m_value_0; } inline float* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(float value) { ___m_value_0 = value; } }; // UnityEngine.Vector3 struct Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E { public: // System.Single UnityEngine.Vector3::x float ___x_2; // System.Single UnityEngine.Vector3::y float ___y_3; // System.Single UnityEngine.Vector3::z float ___z_4; public: inline static int32_t get_offset_of_x_2() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___x_2)); } inline float get_x_2() const { return ___x_2; } inline float* get_address_of_x_2() { return &___x_2; } inline void set_x_2(float value) { ___x_2 = value; } inline static int32_t get_offset_of_y_3() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___y_3)); } inline float get_y_3() const { return ___y_3; } inline float* get_address_of_y_3() { return &___y_3; } inline void set_y_3(float value) { ___y_3 = value; } inline static int32_t get_offset_of_z_4() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___z_4)); } inline float get_z_4() const { return ___z_4; } inline float* get_address_of_z_4() { return &___z_4; } inline void set_z_4(float value) { ___z_4 = value; } }; struct Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields { public: // UnityEngine.Vector3 UnityEngine.Vector3::zeroVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___zeroVector_5; // UnityEngine.Vector3 UnityEngine.Vector3::oneVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___oneVector_6; // UnityEngine.Vector3 UnityEngine.Vector3::upVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___upVector_7; // UnityEngine.Vector3 UnityEngine.Vector3::downVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___downVector_8; // UnityEngine.Vector3 UnityEngine.Vector3::leftVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___leftVector_9; // UnityEngine.Vector3 UnityEngine.Vector3::rightVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___rightVector_10; // UnityEngine.Vector3 UnityEngine.Vector3::forwardVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___forwardVector_11; // UnityEngine.Vector3 UnityEngine.Vector3::backVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___backVector_12; // UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___positiveInfinityVector_13; // UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___negativeInfinityVector_14; public: inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___zeroVector_5)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_zeroVector_5() const { return ___zeroVector_5; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_zeroVector_5() { return &___zeroVector_5; } inline void set_zeroVector_5(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___zeroVector_5 = value; } inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___oneVector_6)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_oneVector_6() const { return ___oneVector_6; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_oneVector_6() { return &___oneVector_6; } inline void set_oneVector_6(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___oneVector_6 = value; } inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___upVector_7)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_upVector_7() const { return ___upVector_7; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_upVector_7() { return &___upVector_7; } inline void set_upVector_7(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___upVector_7 = value; } inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___downVector_8)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_downVector_8() const { return ___downVector_8; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_downVector_8() { return &___downVector_8; } inline void set_downVector_8(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___downVector_8 = value; } inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___leftVector_9)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_leftVector_9() const { return ___leftVector_9; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_leftVector_9() { return &___leftVector_9; } inline void set_leftVector_9(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___leftVector_9 = value; } inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___rightVector_10)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_rightVector_10() const { return ___rightVector_10; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_rightVector_10() { return &___rightVector_10; } inline void set_rightVector_10(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___rightVector_10 = value; } inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___forwardVector_11)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_forwardVector_11() const { return ___forwardVector_11; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_forwardVector_11() { return &___forwardVector_11; } inline void set_forwardVector_11(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___forwardVector_11 = value; } inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___backVector_12)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_backVector_12() const { return ___backVector_12; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_backVector_12() { return &___backVector_12; } inline void set_backVector_12(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___backVector_12 = value; } inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___positiveInfinityVector_13)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; } inline void set_positiveInfinityVector_13(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___positiveInfinityVector_13 = value; } inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___negativeInfinityVector_14)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; } inline void set_negativeInfinityVector_14(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___negativeInfinityVector_14 = value; } }; // System.Void struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5 { public: union { struct { }; uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1]; }; public: }; // UnityEngine.AnimationEventSource struct AnimationEventSource_t1B170B0043F7F21E0AA3577B3220584CA3797630 { public: // System.Int32 UnityEngine.AnimationEventSource::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(AnimationEventSource_t1B170B0043F7F21E0AA3577B3220584CA3797630, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; // UnityEngine.Animations.AnimationHumanStream struct AnimationHumanStream_t98A25119C1A24795BA152F54CF9F0673EEDF1C3F { public: // System.IntPtr UnityEngine.Animations.AnimationHumanStream::stream intptr_t ___stream_0; public: inline static int32_t get_offset_of_stream_0() { return static_cast<int32_t>(offsetof(AnimationHumanStream_t98A25119C1A24795BA152F54CF9F0673EEDF1C3F, ___stream_0)); } inline intptr_t get_stream_0() const { return ___stream_0; } inline intptr_t* get_address_of_stream_0() { return &___stream_0; } inline void set_stream_0(intptr_t value) { ___stream_0 = value; } }; // UnityEngine.Animations.AnimationStream struct AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714 { public: // System.UInt32 UnityEngine.Animations.AnimationStream::m_AnimatorBindingsVersion uint32_t ___m_AnimatorBindingsVersion_0; // System.IntPtr UnityEngine.Animations.AnimationStream::constant intptr_t ___constant_1; // System.IntPtr UnityEngine.Animations.AnimationStream::input intptr_t ___input_2; // System.IntPtr UnityEngine.Animations.AnimationStream::output intptr_t ___output_3; // System.IntPtr UnityEngine.Animations.AnimationStream::workspace intptr_t ___workspace_4; // System.IntPtr UnityEngine.Animations.AnimationStream::inputStreamAccessor intptr_t ___inputStreamAccessor_5; // System.IntPtr UnityEngine.Animations.AnimationStream::animationHandleBinder intptr_t ___animationHandleBinder_6; public: inline static int32_t get_offset_of_m_AnimatorBindingsVersion_0() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___m_AnimatorBindingsVersion_0)); } inline uint32_t get_m_AnimatorBindingsVersion_0() const { return ___m_AnimatorBindingsVersion_0; } inline uint32_t* get_address_of_m_AnimatorBindingsVersion_0() { return &___m_AnimatorBindingsVersion_0; } inline void set_m_AnimatorBindingsVersion_0(uint32_t value) { ___m_AnimatorBindingsVersion_0 = value; } inline static int32_t get_offset_of_constant_1() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___constant_1)); } inline intptr_t get_constant_1() const { return ___constant_1; } inline intptr_t* get_address_of_constant_1() { return &___constant_1; } inline void set_constant_1(intptr_t value) { ___constant_1 = value; } inline static int32_t get_offset_of_input_2() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___input_2)); } inline intptr_t get_input_2() const { return ___input_2; } inline intptr_t* get_address_of_input_2() { return &___input_2; } inline void set_input_2(intptr_t value) { ___input_2 = value; } inline static int32_t get_offset_of_output_3() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___output_3)); } inline intptr_t get_output_3() const { return ___output_3; } inline intptr_t* get_address_of_output_3() { return &___output_3; } inline void set_output_3(intptr_t value) { ___output_3 = value; } inline static int32_t get_offset_of_workspace_4() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___workspace_4)); } inline intptr_t get_workspace_4() const { return ___workspace_4; } inline intptr_t* get_address_of_workspace_4() { return &___workspace_4; } inline void set_workspace_4(intptr_t value) { ___workspace_4 = value; } inline static int32_t get_offset_of_inputStreamAccessor_5() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___inputStreamAccessor_5)); } inline intptr_t get_inputStreamAccessor_5() const { return ___inputStreamAccessor_5; } inline intptr_t* get_address_of_inputStreamAccessor_5() { return &___inputStreamAccessor_5; } inline void set_inputStreamAccessor_5(intptr_t value) { ___inputStreamAccessor_5 = value; } inline static int32_t get_offset_of_animationHandleBinder_6() { return static_cast<int32_t>(offsetof(AnimationStream_t32D9239CBAA66CE867094B820035B2121D7E2714, ___animationHandleBinder_6)); } inline intptr_t get_animationHandleBinder_6() const { return ___animationHandleBinder_6; } inline intptr_t* get_address_of_animationHandleBinder_6() { return &___animationHandleBinder_6; } inline void set_animationHandleBinder_6(intptr_t value) { ___animationHandleBinder_6 = value; } }; // System.Delegate struct Delegate_t : public RuntimeObject { public: // System.IntPtr System.Delegate::method_ptr Il2CppMethodPointer ___method_ptr_0; // System.IntPtr System.Delegate::invoke_impl intptr_t ___invoke_impl_1; // System.Object System.Delegate::m_target RuntimeObject * ___m_target_2; // System.IntPtr System.Delegate::method intptr_t ___method_3; // System.IntPtr System.Delegate::delegate_trampoline intptr_t ___delegate_trampoline_4; // System.IntPtr System.Delegate::extra_arg intptr_t ___extra_arg_5; // System.IntPtr System.Delegate::method_code intptr_t ___method_code_6; // System.Reflection.MethodInfo System.Delegate::method_info MethodInfo_t * ___method_info_7; // System.Reflection.MethodInfo System.Delegate::original_method_info MethodInfo_t * ___original_method_info_8; // System.DelegateData System.Delegate::data DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___data_9; // System.Boolean System.Delegate::method_is_virtual bool ___method_is_virtual_10; public: inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_ptr_0)); } inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; } inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; } inline void set_method_ptr_0(Il2CppMethodPointer value) { ___method_ptr_0 = value; } inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t, ___invoke_impl_1)); } inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; } inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; } inline void set_invoke_impl_1(intptr_t value) { ___invoke_impl_1 = value; } inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t, ___m_target_2)); } inline RuntimeObject * get_m_target_2() const { return ___m_target_2; } inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; } inline void set_m_target_2(RuntimeObject * value) { ___m_target_2 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_target_2), (void*)value); } inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_3)); } inline intptr_t get_method_3() const { return ___method_3; } inline intptr_t* get_address_of_method_3() { return &___method_3; } inline void set_method_3(intptr_t value) { ___method_3 = value; } inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t, ___delegate_trampoline_4)); } inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; } inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; } inline void set_delegate_trampoline_4(intptr_t value) { ___delegate_trampoline_4 = value; } inline static int32_t get_offset_of_extra_arg_5() { return static_cast<int32_t>(offsetof(Delegate_t, ___extra_arg_5)); } inline intptr_t get_extra_arg_5() const { return ___extra_arg_5; } inline intptr_t* get_address_of_extra_arg_5() { return &___extra_arg_5; } inline void set_extra_arg_5(intptr_t value) { ___extra_arg_5 = value; } inline static int32_t get_offset_of_method_code_6() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_code_6)); } inline intptr_t get_method_code_6() const { return ___method_code_6; } inline intptr_t* get_address_of_method_code_6() { return &___method_code_6; } inline void set_method_code_6(intptr_t value) { ___method_code_6 = value; } inline static int32_t get_offset_of_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_info_7)); } inline MethodInfo_t * get_method_info_7() const { return ___method_info_7; } inline MethodInfo_t ** get_address_of_method_info_7() { return &___method_info_7; } inline void set_method_info_7(MethodInfo_t * value) { ___method_info_7 = value; Il2CppCodeGenWriteBarrier((void**)(&___method_info_7), (void*)value); } inline static int32_t get_offset_of_original_method_info_8() { return static_cast<int32_t>(offsetof(Delegate_t, ___original_method_info_8)); } inline MethodInfo_t * get_original_method_info_8() const { return ___original_method_info_8; } inline MethodInfo_t ** get_address_of_original_method_info_8() { return &___original_method_info_8; } inline void set_original_method_info_8(MethodInfo_t * value) { ___original_method_info_8 = value; Il2CppCodeGenWriteBarrier((void**)(&___original_method_info_8), (void*)value); } inline static int32_t get_offset_of_data_9() { return static_cast<int32_t>(offsetof(Delegate_t, ___data_9)); } inline DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * get_data_9() const { return ___data_9; } inline DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 ** get_address_of_data_9() { return &___data_9; } inline void set_data_9(DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * value) { ___data_9 = value; Il2CppCodeGenWriteBarrier((void**)(&___data_9), (void*)value); } inline static int32_t get_offset_of_method_is_virtual_10() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_is_virtual_10)); } inline bool get_method_is_virtual_10() const { return ___method_is_virtual_10; } inline bool* get_address_of_method_is_virtual_10() { return &___method_is_virtual_10; } inline void set_method_is_virtual_10(bool value) { ___method_is_virtual_10 = value; } }; // Native definition for P/Invoke marshalling of System.Delegate struct Delegate_t_marshaled_pinvoke { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___data_9; int32_t ___method_is_virtual_10; }; // Native definition for COM marshalling of System.Delegate struct Delegate_t_marshaled_com { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___data_9; int32_t ___method_is_virtual_10; }; // System.Exception struct Exception_t : public RuntimeObject { public: // System.String System.Exception::_className String_t* ____className_1; // System.String System.Exception::_message String_t* ____message_2; // System.Collections.IDictionary System.Exception::_data RuntimeObject* ____data_3; // System.Exception System.Exception::_innerException Exception_t * ____innerException_4; // System.String System.Exception::_helpURL String_t* ____helpURL_5; // System.Object System.Exception::_stackTrace RuntimeObject * ____stackTrace_6; // System.String System.Exception::_stackTraceString String_t* ____stackTraceString_7; // System.String System.Exception::_remoteStackTraceString String_t* ____remoteStackTraceString_8; // System.Int32 System.Exception::_remoteStackIndex int32_t ____remoteStackIndex_9; // System.Object System.Exception::_dynamicMethods RuntimeObject * ____dynamicMethods_10; // System.Int32 System.Exception::_HResult int32_t ____HResult_11; // System.String System.Exception::_source String_t* ____source_12; // System.Runtime.Serialization.SafeSerializationManager System.Exception::_safeSerializationManager SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13; // System.Diagnostics.StackTrace[] System.Exception::captured_traces StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14; // System.IntPtr[] System.Exception::native_trace_ips IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* ___native_trace_ips_15; public: inline static int32_t get_offset_of__className_1() { return static_cast<int32_t>(offsetof(Exception_t, ____className_1)); } inline String_t* get__className_1() const { return ____className_1; } inline String_t** get_address_of__className_1() { return &____className_1; } inline void set__className_1(String_t* value) { ____className_1 = value; Il2CppCodeGenWriteBarrier((void**)(&____className_1), (void*)value); } inline static int32_t get_offset_of__message_2() { return static_cast<int32_t>(offsetof(Exception_t, ____message_2)); } inline String_t* get__message_2() const { return ____message_2; } inline String_t** get_address_of__message_2() { return &____message_2; } inline void set__message_2(String_t* value) { ____message_2 = value; Il2CppCodeGenWriteBarrier((void**)(&____message_2), (void*)value); } inline static int32_t get_offset_of__data_3() { return static_cast<int32_t>(offsetof(Exception_t, ____data_3)); } inline RuntimeObject* get__data_3() const { return ____data_3; } inline RuntimeObject** get_address_of__data_3() { return &____data_3; } inline void set__data_3(RuntimeObject* value) { ____data_3 = value; Il2CppCodeGenWriteBarrier((void**)(&____data_3), (void*)value); } inline static int32_t get_offset_of__innerException_4() { return static_cast<int32_t>(offsetof(Exception_t, ____innerException_4)); } inline Exception_t * get__innerException_4() const { return ____innerException_4; } inline Exception_t ** get_address_of__innerException_4() { return &____innerException_4; } inline void set__innerException_4(Exception_t * value) { ____innerException_4 = value; Il2CppCodeGenWriteBarrier((void**)(&____innerException_4), (void*)value); } inline static int32_t get_offset_of__helpURL_5() { return static_cast<int32_t>(offsetof(Exception_t, ____helpURL_5)); } inline String_t* get__helpURL_5() const { return ____helpURL_5; } inline String_t** get_address_of__helpURL_5() { return &____helpURL_5; } inline void set__helpURL_5(String_t* value) { ____helpURL_5 = value; Il2CppCodeGenWriteBarrier((void**)(&____helpURL_5), (void*)value); } inline static int32_t get_offset_of__stackTrace_6() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTrace_6)); } inline RuntimeObject * get__stackTrace_6() const { return ____stackTrace_6; } inline RuntimeObject ** get_address_of__stackTrace_6() { return &____stackTrace_6; } inline void set__stackTrace_6(RuntimeObject * value) { ____stackTrace_6 = value; Il2CppCodeGenWriteBarrier((void**)(&____stackTrace_6), (void*)value); } inline static int32_t get_offset_of__stackTraceString_7() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTraceString_7)); } inline String_t* get__stackTraceString_7() const { return ____stackTraceString_7; } inline String_t** get_address_of__stackTraceString_7() { return &____stackTraceString_7; } inline void set__stackTraceString_7(String_t* value) { ____stackTraceString_7 = value; Il2CppCodeGenWriteBarrier((void**)(&____stackTraceString_7), (void*)value); } inline static int32_t get_offset_of__remoteStackTraceString_8() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_8)); } inline String_t* get__remoteStackTraceString_8() const { return ____remoteStackTraceString_8; } inline String_t** get_address_of__remoteStackTraceString_8() { return &____remoteStackTraceString_8; } inline void set__remoteStackTraceString_8(String_t* value) { ____remoteStackTraceString_8 = value; Il2CppCodeGenWriteBarrier((void**)(&____remoteStackTraceString_8), (void*)value); } inline static int32_t get_offset_of__remoteStackIndex_9() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackIndex_9)); } inline int32_t get__remoteStackIndex_9() const { return ____remoteStackIndex_9; } inline int32_t* get_address_of__remoteStackIndex_9() { return &____remoteStackIndex_9; } inline void set__remoteStackIndex_9(int32_t value) { ____remoteStackIndex_9 = value; } inline static int32_t get_offset_of__dynamicMethods_10() { return static_cast<int32_t>(offsetof(Exception_t, ____dynamicMethods_10)); } inline RuntimeObject * get__dynamicMethods_10() const { return ____dynamicMethods_10; } inline RuntimeObject ** get_address_of__dynamicMethods_10() { return &____dynamicMethods_10; } inline void set__dynamicMethods_10(RuntimeObject * value) { ____dynamicMethods_10 = value; Il2CppCodeGenWriteBarrier((void**)(&____dynamicMethods_10), (void*)value); } inline static int32_t get_offset_of__HResult_11() { return static_cast<int32_t>(offsetof(Exception_t, ____HResult_11)); } inline int32_t get__HResult_11() const { return ____HResult_11; } inline int32_t* get_address_of__HResult_11() { return &____HResult_11; } inline void set__HResult_11(int32_t value) { ____HResult_11 = value; } inline static int32_t get_offset_of__source_12() { return static_cast<int32_t>(offsetof(Exception_t, ____source_12)); } inline String_t* get__source_12() const { return ____source_12; } inline String_t** get_address_of__source_12() { return &____source_12; } inline void set__source_12(String_t* value) { ____source_12 = value; Il2CppCodeGenWriteBarrier((void**)(&____source_12), (void*)value); } inline static int32_t get_offset_of__safeSerializationManager_13() { return static_cast<int32_t>(offsetof(Exception_t, ____safeSerializationManager_13)); } inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; } inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; } inline void set__safeSerializationManager_13(SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * value) { ____safeSerializationManager_13 = value; Il2CppCodeGenWriteBarrier((void**)(&____safeSerializationManager_13), (void*)value); } inline static int32_t get_offset_of_captured_traces_14() { return static_cast<int32_t>(offsetof(Exception_t, ___captured_traces_14)); } inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* get_captured_traces_14() const { return ___captured_traces_14; } inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971** get_address_of_captured_traces_14() { return &___captured_traces_14; } inline void set_captured_traces_14(StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* value) { ___captured_traces_14 = value; Il2CppCodeGenWriteBarrier((void**)(&___captured_traces_14), (void*)value); } inline static int32_t get_offset_of_native_trace_ips_15() { return static_cast<int32_t>(offsetof(Exception_t, ___native_trace_ips_15)); } inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* get_native_trace_ips_15() const { return ___native_trace_ips_15; } inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; } inline void set_native_trace_ips_15(IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* value) { ___native_trace_ips_15 = value; Il2CppCodeGenWriteBarrier((void**)(&___native_trace_ips_15), (void*)value); } }; struct Exception_t_StaticFields { public: // System.Object System.Exception::s_EDILock RuntimeObject * ___s_EDILock_0; public: inline static int32_t get_offset_of_s_EDILock_0() { return static_cast<int32_t>(offsetof(Exception_t_StaticFields, ___s_EDILock_0)); } inline RuntimeObject * get_s_EDILock_0() const { return ___s_EDILock_0; } inline RuntimeObject ** get_address_of_s_EDILock_0() { return &___s_EDILock_0; } inline void set_s_EDILock_0(RuntimeObject * value) { ___s_EDILock_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___s_EDILock_0), (void*)value); } }; // Native definition for P/Invoke marshalling of System.Exception struct Exception_t_marshaled_pinvoke { char* ____className_1; char* ____message_2; RuntimeObject* ____data_3; Exception_t_marshaled_pinvoke* ____innerException_4; char* ____helpURL_5; Il2CppIUnknown* ____stackTrace_6; char* ____stackTraceString_7; char* ____remoteStackTraceString_8; int32_t ____remoteStackIndex_9; Il2CppIUnknown* ____dynamicMethods_10; int32_t ____HResult_11; char* ____source_12; SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13; StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14; Il2CppSafeArray/*NONE*/* ___native_trace_ips_15; }; // Native definition for COM marshalling of System.Exception struct Exception_t_marshaled_com { Il2CppChar* ____className_1; Il2CppChar* ____message_2; RuntimeObject* ____data_3; Exception_t_marshaled_com* ____innerException_4; Il2CppChar* ____helpURL_5; Il2CppIUnknown* ____stackTrace_6; Il2CppChar* ____stackTraceString_7; Il2CppChar* ____remoteStackTraceString_8; int32_t ____remoteStackIndex_9; Il2CppIUnknown* ____dynamicMethods_10; int32_t ____HResult_11; Il2CppChar* ____source_12; SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13; StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14; Il2CppSafeArray/*NONE*/* ___native_trace_ips_15; }; // UnityEngine.HumanLimit struct HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 { public: // UnityEngine.Vector3 UnityEngine.HumanLimit::m_Min Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___m_Min_0; // UnityEngine.Vector3 UnityEngine.HumanLimit::m_Max Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___m_Max_1; // UnityEngine.Vector3 UnityEngine.HumanLimit::m_Center Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___m_Center_2; // System.Single UnityEngine.HumanLimit::m_AxisLength float ___m_AxisLength_3; // System.Int32 UnityEngine.HumanLimit::m_UseDefaultValues int32_t ___m_UseDefaultValues_4; public: inline static int32_t get_offset_of_m_Min_0() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_Min_0)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_m_Min_0() const { return ___m_Min_0; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_m_Min_0() { return &___m_Min_0; } inline void set_m_Min_0(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___m_Min_0 = value; } inline static int32_t get_offset_of_m_Max_1() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_Max_1)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_m_Max_1() const { return ___m_Max_1; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_m_Max_1() { return &___m_Max_1; } inline void set_m_Max_1(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___m_Max_1 = value; } inline static int32_t get_offset_of_m_Center_2() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_Center_2)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_m_Center_2() const { return ___m_Center_2; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_m_Center_2() { return &___m_Center_2; } inline void set_m_Center_2(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___m_Center_2 = value; } inline static int32_t get_offset_of_m_AxisLength_3() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_AxisLength_3)); } inline float get_m_AxisLength_3() const { return ___m_AxisLength_3; } inline float* get_address_of_m_AxisLength_3() { return &___m_AxisLength_3; } inline void set_m_AxisLength_3(float value) { ___m_AxisLength_3 = value; } inline static int32_t get_offset_of_m_UseDefaultValues_4() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_UseDefaultValues_4)); } inline int32_t get_m_UseDefaultValues_4() const { return ___m_UseDefaultValues_4; } inline int32_t* get_address_of_m_UseDefaultValues_4() { return &___m_UseDefaultValues_4; } inline void set_m_UseDefaultValues_4(int32_t value) { ___m_UseDefaultValues_4 = value; } }; // UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A : public RuntimeObject { public: // System.IntPtr UnityEngine.Object::m_CachedPtr intptr_t ___m_CachedPtr_0; public: inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A, ___m_CachedPtr_0)); } inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; } inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; } inline void set_m_CachedPtr_0(intptr_t value) { ___m_CachedPtr_0 = value; } }; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_StaticFields { public: // System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1; public: inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); } inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; } inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; } inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value) { ___OffsetOfInstanceIDInCPlusPlusObject_1 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke { intptr_t ___m_CachedPtr_0; }; // Native definition for COM marshalling of UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com { intptr_t ___m_CachedPtr_0; }; // UnityEngine.Playables.PlayableHandle struct PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A { public: // System.IntPtr UnityEngine.Playables.PlayableHandle::m_Handle intptr_t ___m_Handle_0; // System.UInt32 UnityEngine.Playables.PlayableHandle::m_Version uint32_t ___m_Version_1; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A, ___m_Handle_0)); } inline intptr_t get_m_Handle_0() const { return ___m_Handle_0; } inline intptr_t* get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(intptr_t value) { ___m_Handle_0 = value; } inline static int32_t get_offset_of_m_Version_1() { return static_cast<int32_t>(offsetof(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A, ___m_Version_1)); } inline uint32_t get_m_Version_1() const { return ___m_Version_1; } inline uint32_t* get_address_of_m_Version_1() { return &___m_Version_1; } inline void set_m_Version_1(uint32_t value) { ___m_Version_1 = value; } }; struct PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_StaticFields { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Playables.PlayableHandle::m_Null PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Null_2; public: inline static int32_t get_offset_of_m_Null_2() { return static_cast<int32_t>(offsetof(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_StaticFields, ___m_Null_2)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Null_2() const { return ___m_Null_2; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Null_2() { return &___m_Null_2; } inline void set_m_Null_2(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Null_2 = value; } }; // UnityEngine.Playables.PlayableOutputHandle struct PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 { public: // System.IntPtr UnityEngine.Playables.PlayableOutputHandle::m_Handle intptr_t ___m_Handle_0; // System.UInt32 UnityEngine.Playables.PlayableOutputHandle::m_Version uint32_t ___m_Version_1; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1, ___m_Handle_0)); } inline intptr_t get_m_Handle_0() const { return ___m_Handle_0; } inline intptr_t* get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(intptr_t value) { ___m_Handle_0 = value; } inline static int32_t get_offset_of_m_Version_1() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1, ___m_Version_1)); } inline uint32_t get_m_Version_1() const { return ___m_Version_1; } inline uint32_t* get_address_of_m_Version_1() { return &___m_Version_1; } inline void set_m_Version_1(uint32_t value) { ___m_Version_1 = value; } }; struct PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1_StaticFields { public: // UnityEngine.Playables.PlayableOutputHandle UnityEngine.Playables.PlayableOutputHandle::m_Null PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 ___m_Null_2; public: inline static int32_t get_offset_of_m_Null_2() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1_StaticFields, ___m_Null_2)); } inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 get_m_Null_2() const { return ___m_Null_2; } inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 * get_address_of_m_Null_2() { return &___m_Null_2; } inline void set_m_Null_2(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 value) { ___m_Null_2 = value; } }; // UnityEngine.SkeletonBone struct SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E { public: // System.String UnityEngine.SkeletonBone::name String_t* ___name_0; // System.String UnityEngine.SkeletonBone::parentName String_t* ___parentName_1; // UnityEngine.Vector3 UnityEngine.SkeletonBone::position Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position_2; // UnityEngine.Quaternion UnityEngine.SkeletonBone::rotation Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation_3; // UnityEngine.Vector3 UnityEngine.SkeletonBone::scale Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___scale_4; public: inline static int32_t get_offset_of_name_0() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___name_0)); } inline String_t* get_name_0() const { return ___name_0; } inline String_t** get_address_of_name_0() { return &___name_0; } inline void set_name_0(String_t* value) { ___name_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___name_0), (void*)value); } inline static int32_t get_offset_of_parentName_1() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___parentName_1)); } inline String_t* get_parentName_1() const { return ___parentName_1; } inline String_t** get_address_of_parentName_1() { return &___parentName_1; } inline void set_parentName_1(String_t* value) { ___parentName_1 = value; Il2CppCodeGenWriteBarrier((void**)(&___parentName_1), (void*)value); } inline static int32_t get_offset_of_position_2() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___position_2)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_position_2() const { return ___position_2; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_position_2() { return &___position_2; } inline void set_position_2(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___position_2 = value; } inline static int32_t get_offset_of_rotation_3() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___rotation_3)); } inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 get_rotation_3() const { return ___rotation_3; } inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 * get_address_of_rotation_3() { return &___rotation_3; } inline void set_rotation_3(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 value) { ___rotation_3 = value; } inline static int32_t get_offset_of_scale_4() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___scale_4)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_scale_4() const { return ___scale_4; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_scale_4() { return &___scale_4; } inline void set_scale_4(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___scale_4 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.SkeletonBone struct SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_pinvoke { char* ___name_0; char* ___parentName_1; Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position_2; Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation_3; Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___scale_4; }; // Native definition for COM marshalling of UnityEngine.SkeletonBone struct SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_com { Il2CppChar* ___name_0; Il2CppChar* ___parentName_1; Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position_2; Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation_3; Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___scale_4; }; // UnityEngine.TrackedReference struct TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514 : public RuntimeObject { public: // System.IntPtr UnityEngine.TrackedReference::m_Ptr intptr_t ___m_Ptr_0; public: inline static int32_t get_offset_of_m_Ptr_0() { return static_cast<int32_t>(offsetof(TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514, ___m_Ptr_0)); } inline intptr_t get_m_Ptr_0() const { return ___m_Ptr_0; } inline intptr_t* get_address_of_m_Ptr_0() { return &___m_Ptr_0; } inline void set_m_Ptr_0(intptr_t value) { ___m_Ptr_0 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.TrackedReference struct TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshaled_pinvoke { intptr_t ___m_Ptr_0; }; // Native definition for COM marshalling of UnityEngine.TrackedReference struct TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshaled_com { intptr_t ___m_Ptr_0; }; // UnityEngine.Animations.AnimationClipPlayable struct AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; // UnityEngine.AnimationEvent struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF : public RuntimeObject { public: // System.Single UnityEngine.AnimationEvent::m_Time float ___m_Time_0; // System.String UnityEngine.AnimationEvent::m_FunctionName String_t* ___m_FunctionName_1; // System.String UnityEngine.AnimationEvent::m_StringParameter String_t* ___m_StringParameter_2; // UnityEngine.Object UnityEngine.AnimationEvent::m_ObjectReferenceParameter Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * ___m_ObjectReferenceParameter_3; // System.Single UnityEngine.AnimationEvent::m_FloatParameter float ___m_FloatParameter_4; // System.Int32 UnityEngine.AnimationEvent::m_IntParameter int32_t ___m_IntParameter_5; // System.Int32 UnityEngine.AnimationEvent::m_MessageOptions int32_t ___m_MessageOptions_6; // UnityEngine.AnimationEventSource UnityEngine.AnimationEvent::m_Source int32_t ___m_Source_7; // UnityEngine.AnimationState UnityEngine.AnimationEvent::m_StateSender AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * ___m_StateSender_8; // UnityEngine.AnimatorStateInfo UnityEngine.AnimationEvent::m_AnimatorStateInfo AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___m_AnimatorStateInfo_9; // UnityEngine.AnimatorClipInfo UnityEngine.AnimationEvent::m_AnimatorClipInfo AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 ___m_AnimatorClipInfo_10; public: inline static int32_t get_offset_of_m_Time_0() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_Time_0)); } inline float get_m_Time_0() const { return ___m_Time_0; } inline float* get_address_of_m_Time_0() { return &___m_Time_0; } inline void set_m_Time_0(float value) { ___m_Time_0 = value; } inline static int32_t get_offset_of_m_FunctionName_1() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_FunctionName_1)); } inline String_t* get_m_FunctionName_1() const { return ___m_FunctionName_1; } inline String_t** get_address_of_m_FunctionName_1() { return &___m_FunctionName_1; } inline void set_m_FunctionName_1(String_t* value) { ___m_FunctionName_1 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_FunctionName_1), (void*)value); } inline static int32_t get_offset_of_m_StringParameter_2() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_StringParameter_2)); } inline String_t* get_m_StringParameter_2() const { return ___m_StringParameter_2; } inline String_t** get_address_of_m_StringParameter_2() { return &___m_StringParameter_2; } inline void set_m_StringParameter_2(String_t* value) { ___m_StringParameter_2 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_StringParameter_2), (void*)value); } inline static int32_t get_offset_of_m_ObjectReferenceParameter_3() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_ObjectReferenceParameter_3)); } inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * get_m_ObjectReferenceParameter_3() const { return ___m_ObjectReferenceParameter_3; } inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A ** get_address_of_m_ObjectReferenceParameter_3() { return &___m_ObjectReferenceParameter_3; } inline void set_m_ObjectReferenceParameter_3(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * value) { ___m_ObjectReferenceParameter_3 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_ObjectReferenceParameter_3), (void*)value); } inline static int32_t get_offset_of_m_FloatParameter_4() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_FloatParameter_4)); } inline float get_m_FloatParameter_4() const { return ___m_FloatParameter_4; } inline float* get_address_of_m_FloatParameter_4() { return &___m_FloatParameter_4; } inline void set_m_FloatParameter_4(float value) { ___m_FloatParameter_4 = value; } inline static int32_t get_offset_of_m_IntParameter_5() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_IntParameter_5)); } inline int32_t get_m_IntParameter_5() const { return ___m_IntParameter_5; } inline int32_t* get_address_of_m_IntParameter_5() { return &___m_IntParameter_5; } inline void set_m_IntParameter_5(int32_t value) { ___m_IntParameter_5 = value; } inline static int32_t get_offset_of_m_MessageOptions_6() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_MessageOptions_6)); } inline int32_t get_m_MessageOptions_6() const { return ___m_MessageOptions_6; } inline int32_t* get_address_of_m_MessageOptions_6() { return &___m_MessageOptions_6; } inline void set_m_MessageOptions_6(int32_t value) { ___m_MessageOptions_6 = value; } inline static int32_t get_offset_of_m_Source_7() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_Source_7)); } inline int32_t get_m_Source_7() const { return ___m_Source_7; } inline int32_t* get_address_of_m_Source_7() { return &___m_Source_7; } inline void set_m_Source_7(int32_t value) { ___m_Source_7 = value; } inline static int32_t get_offset_of_m_StateSender_8() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_StateSender_8)); } inline AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * get_m_StateSender_8() const { return ___m_StateSender_8; } inline AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD ** get_address_of_m_StateSender_8() { return &___m_StateSender_8; } inline void set_m_StateSender_8(AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * value) { ___m_StateSender_8 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_StateSender_8), (void*)value); } inline static int32_t get_offset_of_m_AnimatorStateInfo_9() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_AnimatorStateInfo_9)); } inline AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA get_m_AnimatorStateInfo_9() const { return ___m_AnimatorStateInfo_9; } inline AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA * get_address_of_m_AnimatorStateInfo_9() { return &___m_AnimatorStateInfo_9; } inline void set_m_AnimatorStateInfo_9(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA value) { ___m_AnimatorStateInfo_9 = value; } inline static int32_t get_offset_of_m_AnimatorClipInfo_10() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_AnimatorClipInfo_10)); } inline AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 get_m_AnimatorClipInfo_10() const { return ___m_AnimatorClipInfo_10; } inline AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 * get_address_of_m_AnimatorClipInfo_10() { return &___m_AnimatorClipInfo_10; } inline void set_m_AnimatorClipInfo_10(AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 value) { ___m_AnimatorClipInfo_10 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.AnimationEvent struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke { float ___m_Time_0; char* ___m_FunctionName_1; char* ___m_StringParameter_2; Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke ___m_ObjectReferenceParameter_3; float ___m_FloatParameter_4; int32_t ___m_IntParameter_5; int32_t ___m_MessageOptions_6; int32_t ___m_Source_7; AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * ___m_StateSender_8; AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___m_AnimatorStateInfo_9; AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 ___m_AnimatorClipInfo_10; }; // Native definition for COM marshalling of UnityEngine.AnimationEvent struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com { float ___m_Time_0; Il2CppChar* ___m_FunctionName_1; Il2CppChar* ___m_StringParameter_2; Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com* ___m_ObjectReferenceParameter_3; float ___m_FloatParameter_4; int32_t ___m_IntParameter_5; int32_t ___m_MessageOptions_6; int32_t ___m_Source_7; AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * ___m_StateSender_8; AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___m_AnimatorStateInfo_9; AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 ___m_AnimatorClipInfo_10; }; // UnityEngine.Animations.AnimationLayerMixerPlayable struct AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_StaticFields { public: // UnityEngine.Animations.AnimationLayerMixerPlayable UnityEngine.Animations.AnimationLayerMixerPlayable::m_NullPlayable AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_StaticFields, ___m_NullPlayable_1)); } inline AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Animations.AnimationMixerPlayable struct AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_StaticFields { public: // UnityEngine.Animations.AnimationMixerPlayable UnityEngine.Animations.AnimationMixerPlayable::m_NullPlayable AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_StaticFields, ___m_NullPlayable_1)); } inline AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Animations.AnimationMotionXToDeltaPlayable struct AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_StaticFields { public: // UnityEngine.Animations.AnimationMotionXToDeltaPlayable UnityEngine.Animations.AnimationMotionXToDeltaPlayable::m_NullPlayable AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_StaticFields, ___m_NullPlayable_1)); } inline AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Animations.AnimationOffsetPlayable struct AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_StaticFields { public: // UnityEngine.Animations.AnimationOffsetPlayable UnityEngine.Animations.AnimationOffsetPlayable::m_NullPlayable AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_StaticFields, ___m_NullPlayable_1)); } inline AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Animations.AnimationPlayableOutput struct AnimationPlayableOutput_t14570F3E63619E52ABB0B0306D4F4AAA6225DE17 { public: // UnityEngine.Playables.PlayableOutputHandle UnityEngine.Animations.AnimationPlayableOutput::m_Handle PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationPlayableOutput_t14570F3E63619E52ABB0B0306D4F4AAA6225DE17, ___m_Handle_0)); } inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 value) { ___m_Handle_0 = value; } }; // UnityEngine.Animations.AnimationPosePlayable struct AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_StaticFields { public: // UnityEngine.Animations.AnimationPosePlayable UnityEngine.Animations.AnimationPosePlayable::m_NullPlayable AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_StaticFields, ___m_NullPlayable_1)); } inline AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Animations.AnimationRemoveScalePlayable struct AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_StaticFields { public: // UnityEngine.Animations.AnimationRemoveScalePlayable UnityEngine.Animations.AnimationRemoveScalePlayable::m_NullPlayable AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_StaticFields, ___m_NullPlayable_1)); } inline AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Animations.AnimationScriptPlayable struct AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_StaticFields { public: // UnityEngine.Animations.AnimationScriptPlayable UnityEngine.Animations.AnimationScriptPlayable::m_NullPlayable AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_StaticFields, ___m_NullPlayable_1)); } inline AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.AnimationState struct AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD : public TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514 { public: public: }; // UnityEngine.Animations.AnimatorControllerPlayable struct AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 { public: // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::m_Handle PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0; public: inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4, ___m_Handle_0)); } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; } inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; } inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value) { ___m_Handle_0 = value; } }; struct AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_StaticFields { public: // UnityEngine.Animations.AnimatorControllerPlayable UnityEngine.Animations.AnimatorControllerPlayable::m_NullPlayable AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___m_NullPlayable_1; public: inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_StaticFields, ___m_NullPlayable_1)); } inline AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; } inline AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; } inline void set_m_NullPlayable_1(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 value) { ___m_NullPlayable_1 = value; } }; // UnityEngine.Component struct Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // UnityEngine.HumanBone struct HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D { public: // System.String UnityEngine.HumanBone::m_BoneName String_t* ___m_BoneName_0; // System.String UnityEngine.HumanBone::m_HumanName String_t* ___m_HumanName_1; // UnityEngine.HumanLimit UnityEngine.HumanBone::limit HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 ___limit_2; public: inline static int32_t get_offset_of_m_BoneName_0() { return static_cast<int32_t>(offsetof(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D, ___m_BoneName_0)); } inline String_t* get_m_BoneName_0() const { return ___m_BoneName_0; } inline String_t** get_address_of_m_BoneName_0() { return &___m_BoneName_0; } inline void set_m_BoneName_0(String_t* value) { ___m_BoneName_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_BoneName_0), (void*)value); } inline static int32_t get_offset_of_m_HumanName_1() { return static_cast<int32_t>(offsetof(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D, ___m_HumanName_1)); } inline String_t* get_m_HumanName_1() const { return ___m_HumanName_1; } inline String_t** get_address_of_m_HumanName_1() { return &___m_HumanName_1; } inline void set_m_HumanName_1(String_t* value) { ___m_HumanName_1 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_HumanName_1), (void*)value); } inline static int32_t get_offset_of_limit_2() { return static_cast<int32_t>(offsetof(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D, ___limit_2)); } inline HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 get_limit_2() const { return ___limit_2; } inline HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 * get_address_of_limit_2() { return &___limit_2; } inline void set_limit_2(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 value) { ___limit_2 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.HumanBone struct HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_pinvoke { char* ___m_BoneName_0; char* ___m_HumanName_1; HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 ___limit_2; }; // Native definition for COM marshalling of UnityEngine.HumanBone struct HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_com { Il2CppChar* ___m_BoneName_0; Il2CppChar* ___m_HumanName_1; HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 ___limit_2; }; // UnityEngine.Motion struct Motion_t3EAEF01D52B05F10A21CC9B54A35C8F3F6BA3A67 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // System.MulticastDelegate struct MulticastDelegate_t : public Delegate_t { public: // System.Delegate[] System.MulticastDelegate::delegates DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* ___delegates_11; public: inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); } inline DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* get_delegates_11() const { return ___delegates_11; } inline DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8** get_address_of_delegates_11() { return &___delegates_11; } inline void set_delegates_11(DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* value) { ___delegates_11 = value; Il2CppCodeGenWriteBarrier((void**)(&___delegates_11), (void*)value); } }; // Native definition for P/Invoke marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_pinvoke : public Delegate_t_marshaled_pinvoke { Delegate_t_marshaled_pinvoke** ___delegates_11; }; // Native definition for COM marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_com : public Delegate_t_marshaled_com { Delegate_t_marshaled_com** ___delegates_11; }; // UnityEngine.RuntimeAnimatorController struct RuntimeAnimatorController_t6F70D5BE51CCBA99132F444EFFA41439DFE71BAB : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // Native definition for P/Invoke marshalling of UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_pinvoke : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke { }; // Native definition for COM marshalling of UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_com : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com { }; // System.SystemException struct SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62 : public Exception_t { public: public: }; // UnityEngine.AnimationClip struct AnimationClip_tD9BFD73D43793BA608D5C0B46BE29EB59E40D178 : public Motion_t3EAEF01D52B05F10A21CC9B54A35C8F3F6BA3A67 { public: public: }; // UnityEngine.AnimatorOverrideController struct AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA : public RuntimeAnimatorController_t6F70D5BE51CCBA99132F444EFFA41439DFE71BAB { public: // UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback UnityEngine.AnimatorOverrideController::OnOverrideControllerDirty OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * ___OnOverrideControllerDirty_4; public: inline static int32_t get_offset_of_OnOverrideControllerDirty_4() { return static_cast<int32_t>(offsetof(AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA, ___OnOverrideControllerDirty_4)); } inline OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * get_OnOverrideControllerDirty_4() const { return ___OnOverrideControllerDirty_4; } inline OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C ** get_address_of_OnOverrideControllerDirty_4() { return &___OnOverrideControllerDirty_4; } inline void set_OnOverrideControllerDirty_4(OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * value) { ___OnOverrideControllerDirty_4 = value; Il2CppCodeGenWriteBarrier((void**)(&___OnOverrideControllerDirty_4), (void*)value); } }; // UnityEngine.Behaviour struct Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9 : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 { public: public: }; // System.InvalidCastException struct InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62 { public: public: }; // System.InvalidOperationException struct InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62 { public: public: }; // UnityEngine.StateMachineBehaviour struct StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F : public ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A { public: public: }; // UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback struct OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C : public MulticastDelegate_t { public: public: }; // UnityEngine.Animator struct Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 : public Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif // System.Delegate[] struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8 : public RuntimeArray { public: ALIGN_FIELD (8) Delegate_t * m_Items[1]; public: inline Delegate_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Delegate_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Delegate_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value); } inline Delegate_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Delegate_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Delegate_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value); } }; IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke& marshaled); IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_back(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke& marshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled); IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_cleanup(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke& marshaled); IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_com(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com& marshaled); IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_com_back(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com& marshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled); IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_com_cleanup(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com& marshaled); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationLayerMixerPlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMixerPlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMotionXToDeltaPlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationOffsetPlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationPosePlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationRemoveScalePlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationScriptPlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimatorControllerPlayable>() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::op_Equality(UnityEngine.Playables.PlayableHandle,UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___x0, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___y1, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationClipPlayable::Equals(UnityEngine.Animations.AnimationClipPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 ___other0, const RuntimeMethod* method); // System.Void System.Object::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405 (RuntimeObject * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsValid() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationLayerMixerPlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_gshared)(__this, method); } // System.Void System.InvalidCastException::.ctor(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3 (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * __this, String_t* ___message0, const RuntimeMethod* method); // System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439 (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationLayerMixerPlayable::Equals(UnityEngine.Animations.AnimationLayerMixerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___other0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Playables.PlayableHandle::get_Null() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612 (const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMixerPlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_gshared)(__this, method); } // System.Void UnityEngine.Animations.AnimationMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationMixerPlayable::Equals(UnityEngine.Animations.AnimationMixerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___other0, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMotionXToDeltaPlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_gshared)(__this, method); } // System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93 (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationMotionXToDeltaPlayable::Equals(UnityEngine.Animations.AnimationMotionXToDeltaPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___other0, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationOffsetPlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_gshared)(__this, method); } // System.Void UnityEngine.Animations.AnimationOffsetPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049 (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationOffsetPlayable::Equals(UnityEngine.Animations.AnimationOffsetPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___other0, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationPosePlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_gshared)(__this, method); } // System.Void UnityEngine.Animations.AnimationPosePlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationPosePlayable::Equals(UnityEngine.Animations.AnimationPosePlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___other0, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationRemoveScalePlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_gshared)(__this, method); } // System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationRemoveScalePlayable::Equals(UnityEngine.Animations.AnimationRemoveScalePlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___other0, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationScriptPlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_gshared)(__this, method); } // System.Void UnityEngine.Animations.AnimationScriptPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.Animations.AnimationScriptPlayable::Equals(UnityEngine.Animations.AnimationScriptPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___other0, const RuntimeMethod* method); // System.Void UnityEngine.Animator::SetTriggerString(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method); // System.Void UnityEngine.Animator::ResetTriggerString(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method); // System.Void UnityEngine.Animations.AnimatorControllerPlayable::SetHandle(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // System.Void UnityEngine.Animations.AnimatorControllerPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method); // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, const RuntimeMethod* method); // System.Void System.InvalidOperationException::.ctor(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void InvalidOperationException__ctor_mC012CE552988309733C896F3FEA8249171E4402E (InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB * __this, String_t* ___message0, const RuntimeMethod* method); // System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimatorControllerPlayable>() inline bool PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method) { return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_gshared)(__this, method); } // System.Boolean UnityEngine.Animations.AnimatorControllerPlayable::Equals(UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___other0, const RuntimeMethod* method); // System.Void UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback::Invoke() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback_Invoke_m21DB79300E852ED93F2521FFC03EC4D858F6B330 (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __this, const RuntimeMethod* method); // System.Void UnityEngine.ScriptableObject::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063 (ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A * __this, const RuntimeMethod* method); #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationClipPlayable::Equals(UnityEngine.Animations.AnimationClipPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122((AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *)__this, /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1; L_1 = AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122((AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *)(&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); bool L_2; L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0016; } IL_0016: { bool L_3 = V_0; return L_3; } } IL2CPP_EXTERN_C bool AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814_AdjustorThunk (RuntimeObject * __this, AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 ___other0, const RuntimeMethod* method) { AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *>(__this + _offset); bool _returnValue; _returnValue = AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814(_thisAdjusted, ___other0, method); return _returnValue; } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.AnimationEvent IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& unmarshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke& marshaled) { Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL); } IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_back(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke& marshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& unmarshaled) { Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.AnimationEvent IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_cleanup(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.AnimationEvent IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_com(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& unmarshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com& marshaled) { Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL); } IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_com_back(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com& marshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& unmarshaled) { Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.AnimationEvent IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_com_cleanup(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com& marshaled) { } // System.Void UnityEngine.AnimationEvent::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationEvent__ctor_mA2780A113EA8DD56C3C2EDD0D60BBA78047BACDE (AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709); s_Il2CppMethodInitialized = true; } { Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL); __this->set_m_Time_0((0.0f)); __this->set_m_FunctionName_1(_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709); __this->set_m_StringParameter_2(_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709); __this->set_m_ObjectReferenceParameter_3((Object_tF2F3778131EFF286AF62B7B013A170F95A91571A *)NULL); __this->set_m_FloatParameter_4((0.0f)); __this->set_m_IntParameter_5(0); __this->set_m_MessageOptions_6(0); __this->set_m_Source_7(0); __this->set_m_StateSender_8((AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD *)NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralD2435BFAEB0372E848D9BE812E3B06AB862CC3D1)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *>(__this + _offset); AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439 (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationLayerMixerPlayable::Equals(UnityEngine.Animations.AnimationLayerMixerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439((AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *)__this, /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1; L_1 = AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439((AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *)(&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); bool L_2; L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0016; } IL_0016: { bool L_3 = V_0; return L_3; } } IL2CPP_EXTERN_C bool AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA_AdjustorThunk (RuntimeObject * __this, AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___other0, const RuntimeMethod* method) { AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *>(__this + _offset); bool _returnValue; _returnValue = AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__cctor_mBE9F47E968D356F7BB549E705A4E91E1AEAEE807 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 L_1; memset((&L_1), 0, sizeof(L_1)); AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B((&L_1), L_0, /*hidden argument*/NULL); ((AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_StaticFields*)il2cpp_codegen_static_fields_for(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral4DEE968069F34C26613ADFCD69C41EFC29314286)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *>(__this + _offset); AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationMixerPlayable::Equals(UnityEngine.Animations.AnimationMixerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3((AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *)__this, /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1; L_1 = AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3((AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *)(&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); bool L_2; L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0016; } IL_0016: { bool L_3 = V_0; return L_3; } } IL2CPP_EXTERN_C bool AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B_AdjustorThunk (RuntimeObject * __this, AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___other0, const RuntimeMethod* method) { AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *>(__this + _offset); bool _returnValue; _returnValue = AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationMixerPlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__cctor_m8DB71DF60AD75D3274E24FDB9DAC8F4D8FDD5C1D (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 L_1; memset((&L_1), 0, sizeof(L_1)); AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0((&L_1), L_0, /*hidden argument*/NULL); ((AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_StaticFields*)il2cpp_codegen_static_fields_for(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93 (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral8DC2252638D84FAF2C30B95D54EC83F52FA6C630)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *>(__this + _offset); AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationMotionXToDeltaPlayable::Equals(UnityEngine.Animations.AnimationMotionXToDeltaPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA((AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *)__this, /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1; L_1 = AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA((AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *)(&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); bool L_2; L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0016; } IL_0016: { bool L_3 = V_0; return L_3; } } IL2CPP_EXTERN_C bool AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E_AdjustorThunk (RuntimeObject * __this, AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___other0, const RuntimeMethod* method) { AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *>(__this + _offset); bool _returnValue; _returnValue = AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__cctor_m0C46BAE776A8D7FAB7CEE08C4D6EBC63B08708FD (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 L_1; memset((&L_1), 0, sizeof(L_1)); AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93((&L_1), L_0, /*hidden argument*/NULL); ((AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_StaticFields*)il2cpp_codegen_static_fields_for(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationOffsetPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralA3C8FF345EC45846B2EE6801F84DD49340F0A9E1)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *>(__this + _offset); AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049 (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationOffsetPlayable::Equals(UnityEngine.Animations.AnimationOffsetPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049((AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *)(&___other0), /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = L_0; RuntimeObject * L_2 = Box(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var, &L_1); RuntimeObject * L_3 = Box(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var, __this); bool L_4; L_4 = VirtualFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2); *__this = *(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *)UnBox(L_3); V_0 = L_4; goto IL_001c; } IL_001c: { bool L_5 = V_0; return L_5; } } IL2CPP_EXTERN_C bool AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA_AdjustorThunk (RuntimeObject * __this, AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___other0, const RuntimeMethod* method) { AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *>(__this + _offset); bool _returnValue; _returnValue = AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationOffsetPlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__cctor_m00251ED10BD7F52F20BC9D0A36B9C8AC52F15FA6 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 L_1; memset((&L_1), 0, sizeof(L_1)); AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E((&L_1), L_0, /*hidden argument*/NULL); ((AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_StaticFields*)il2cpp_codegen_static_fields_for(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationPosePlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralE066D08B565F88D413FDACA14C42BFF008FF4EB9)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *>(__this + _offset); AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationPosePlayable::Equals(UnityEngine.Animations.AnimationPosePlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE((AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *)(&___other0), /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = L_0; RuntimeObject * L_2 = Box(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var, &L_1); RuntimeObject * L_3 = Box(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var, __this); bool L_4; L_4 = VirtualFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2); *__this = *(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *)UnBox(L_3); V_0 = L_4; goto IL_001c; } IL_001c: { bool L_5 = V_0; return L_5; } } IL2CPP_EXTERN_C bool AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1_AdjustorThunk (RuntimeObject * __this, AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___other0, const RuntimeMethod* method) { AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *>(__this + _offset); bool _returnValue; _returnValue = AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationPosePlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__cctor_m61B5F097B084BBB3CD21AE5E565AB35450C85B1C (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 L_1; memset((&L_1), 0, sizeof(L_1)); AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57((&L_1), L_0, /*hidden argument*/NULL); ((AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_StaticFields*)il2cpp_codegen_static_fields_for(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral98C704D69BD1A288ED31DEE4ED4E50097A2D7018)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *>(__this + _offset); AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationRemoveScalePlayable::Equals(UnityEngine.Animations.AnimationRemoveScalePlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8((AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *)(&___other0), /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = L_0; RuntimeObject * L_2 = Box(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var, &L_1); RuntimeObject * L_3 = Box(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var, __this); bool L_4; L_4 = VirtualFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2); *__this = *(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *)UnBox(L_3); V_0 = L_4; goto IL_001c; } IL_001c: { bool L_5 = V_0; return L_5; } } IL2CPP_EXTERN_C bool AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397_AdjustorThunk (RuntimeObject * __this, AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___other0, const RuntimeMethod* method) { AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *>(__this + _offset); bool _returnValue; _returnValue = AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__cctor_mA35B93BA4FDEDAA98ACE6A314BF0ED50839B8A98 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 L_1; memset((&L_1), 0, sizeof(L_1)); AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F((&L_1), L_0, /*hidden argument*/NULL); ((AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_StaticFields*)il2cpp_codegen_static_fields_for(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimationScriptPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; { bool L_0; L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_0 = L_0; bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { bool L_2; L_2 = PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_RuntimeMethod_var); V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0); bool L_3 = V_1; if (!L_3) { goto IL_0026; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral860B9EA7CDAB02A8A4B38336805EAE2FBA31F09C)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56_RuntimeMethod_var))); } IL_0026: { } IL_0027: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0; __this->set_m_Handle_0(L_5); return; } } IL2CPP_EXTERN_C void AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *>(__this + _offset); AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18(_thisAdjusted, method); return _returnValue; } // System.Boolean UnityEngine.Animations.AnimationScriptPlayable::Equals(UnityEngine.Animations.AnimationScriptPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18((AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *)__this, /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1; L_1 = AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18((AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *)(&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); bool L_2; L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0016; } IL_0016: { bool L_3 = V_0; return L_3; } } IL2CPP_EXTERN_C bool AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8_AdjustorThunk (RuntimeObject * __this, AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___other0, const RuntimeMethod* method) { AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *>(__this + _offset); bool _returnValue; _returnValue = AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimationScriptPlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__cctor_m2E7AD0269606C2EB23E1A6A1407E53ACAE1C6F31 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B L_1; memset((&L_1), 0, sizeof(L_1)); AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56((&L_1), L_0, /*hidden argument*/NULL); ((AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_StaticFields*)il2cpp_codegen_static_fields_for(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animator::SetTrigger(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTrigger_m2D79D155CABD81B1CC75EFC35D90508B58D7211C (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method) { { String_t* L_0 = ___name0; Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Animator::ResetTrigger(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTrigger_m02F8CF7EABE466CC3D008A8538171E14BFB907FA (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method) { { String_t* L_0 = ___name0; Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2(__this, L_0, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.Animator::get_hasBoundPlayables() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, const RuntimeMethod* method) { typedef bool (*Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A_ftn) (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 *); static Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::get_hasBoundPlayables()"); bool icallRetVal = _il2cpp_icall_func(__this); return icallRetVal; } // System.Void UnityEngine.Animator::SetTriggerString(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method) { typedef void (*Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0_ftn) (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 *, String_t*); static Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetTriggerString(System.String)"); _il2cpp_icall_func(__this, ___name0); } // System.Void UnityEngine.Animator::ResetTriggerString(System.String) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method) { typedef void (*Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2_ftn) (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 *, String_t*); static Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::ResetTriggerString(System.String)"); _il2cpp_icall_func(__this, ___name0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Animations.AnimatorControllerPlayable::.ctor(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); __this->set_m_Handle_0(L_0); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = ___handle0; AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *)__this, L_1, /*hidden argument*/NULL); return; } } IL2CPP_EXTERN_C void AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset); AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8(_thisAdjusted, ___handle0, method); } // UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::GetHandle() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, const RuntimeMethod* method) { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0; memset((&V_0), 0, sizeof(V_0)); { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0(); V_0 = L_0; goto IL_000a; } IL_000a: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0; return L_1; } } IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue; _returnValue = AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C(_thisAdjusted, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimatorControllerPlayable::SetHandle(UnityEngine.Playables.PlayableHandle) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; bool V_2 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * L_0 = __this->get_address_of_m_Handle_0(); bool L_1; L_1 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)L_0, /*hidden argument*/NULL); V_0 = L_1; bool L_2 = V_0; if (!L_2) { goto IL_001b; } } { InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB * L_3 = (InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB_il2cpp_TypeInfo_var))); InvalidOperationException__ctor_mC012CE552988309733C896F3FEA8249171E4402E(L_3, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralBF563F6FCC25CE41FFE0BF7590AF9F4475916665)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_RuntimeMethod_var))); } IL_001b: { bool L_4; L_4 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL); V_1 = L_4; bool L_5 = V_1; if (!L_5) { goto IL_0041; } } { bool L_6; L_6 = PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_RuntimeMethod_var); V_2 = (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0); bool L_7 = V_2; if (!L_7) { goto IL_0040; } } { InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_8 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var))); InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_8, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralF5510C45DDAD777CCB4893578D995C9739F990F2)), /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_8, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_RuntimeMethod_var))); } IL_0040: { } IL_0041: { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_9 = ___handle0; __this->set_m_Handle_0(L_9); return; } } IL2CPP_EXTERN_C void AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method) { AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset); AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38(_thisAdjusted, ___handle0, method); } // System.Boolean UnityEngine.Animations.AnimatorControllerPlayable::Equals(UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___other0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } bool V_0 = false; { PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *)__this, /*hidden argument*/NULL); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1; L_1 = AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *)(&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); bool L_2; L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0016; } IL_0016: { bool L_3 = V_0; return L_3; } } IL2CPP_EXTERN_C bool AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730_AdjustorThunk (RuntimeObject * __this, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___other0, const RuntimeMethod* method) { AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted; int32_t _offset = 1; _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset); bool _returnValue; _returnValue = AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730(_thisAdjusted, ___other0, method); return _returnValue; } // System.Void UnityEngine.Animations.AnimatorControllerPlayable::.cctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__cctor_m82C2FF3AEAD5D042648E50B513269EF367C51EB4 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var); PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0; L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL); AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 L_1; memset((&L_1), 0, sizeof(L_1)); AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8((&L_1), L_0, /*hidden argument*/NULL); ((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_StaticFields*)il2cpp_codegen_static_fields_for(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.AnimatorOverrideController::OnInvalidateOverrideController(UnityEngine.AnimatorOverrideController) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorOverrideController_OnInvalidateOverrideController_m579571520B7C607B6983D4973EBAE982EAC9AA40 (AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA * ___controller0, const RuntimeMethod* method) { bool V_0 = false; { AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA * L_0 = ___controller0; OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * L_1 = L_0->get_OnOverrideControllerDirty_4(); V_0 = (bool)((!(((RuntimeObject*)(OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C *)L_1) <= ((RuntimeObject*)(RuntimeObject *)NULL)))? 1 : 0); bool L_2 = V_0; if (!L_2) { goto IL_001a; } } { AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA * L_3 = ___controller0; OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * L_4 = L_3->get_OnOverrideControllerDirty_4(); OnOverrideControllerDirtyCallback_Invoke_m21DB79300E852ED93F2521FFC03EC4D858F6B330(L_4, /*hidden argument*/NULL); } IL_001a: { return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.AnimatorTransitionInfo IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& unmarshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_pinvoke& marshaled) { marshaled.___m_FullPath_0 = unmarshaled.get_m_FullPath_0(); marshaled.___m_UserName_1 = unmarshaled.get_m_UserName_1(); marshaled.___m_Name_2 = unmarshaled.get_m_Name_2(); marshaled.___m_HasFixedDuration_3 = static_cast<int32_t>(unmarshaled.get_m_HasFixedDuration_3()); marshaled.___m_Duration_4 = unmarshaled.get_m_Duration_4(); marshaled.___m_NormalizedTime_5 = unmarshaled.get_m_NormalizedTime_5(); marshaled.___m_AnyState_6 = static_cast<int32_t>(unmarshaled.get_m_AnyState_6()); marshaled.___m_TransitionType_7 = unmarshaled.get_m_TransitionType_7(); } IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_back(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_pinvoke& marshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& unmarshaled) { int32_t unmarshaled_m_FullPath_temp_0 = 0; unmarshaled_m_FullPath_temp_0 = marshaled.___m_FullPath_0; unmarshaled.set_m_FullPath_0(unmarshaled_m_FullPath_temp_0); int32_t unmarshaled_m_UserName_temp_1 = 0; unmarshaled_m_UserName_temp_1 = marshaled.___m_UserName_1; unmarshaled.set_m_UserName_1(unmarshaled_m_UserName_temp_1); int32_t unmarshaled_m_Name_temp_2 = 0; unmarshaled_m_Name_temp_2 = marshaled.___m_Name_2; unmarshaled.set_m_Name_2(unmarshaled_m_Name_temp_2); bool unmarshaled_m_HasFixedDuration_temp_3 = false; unmarshaled_m_HasFixedDuration_temp_3 = static_cast<bool>(marshaled.___m_HasFixedDuration_3); unmarshaled.set_m_HasFixedDuration_3(unmarshaled_m_HasFixedDuration_temp_3); float unmarshaled_m_Duration_temp_4 = 0.0f; unmarshaled_m_Duration_temp_4 = marshaled.___m_Duration_4; unmarshaled.set_m_Duration_4(unmarshaled_m_Duration_temp_4); float unmarshaled_m_NormalizedTime_temp_5 = 0.0f; unmarshaled_m_NormalizedTime_temp_5 = marshaled.___m_NormalizedTime_5; unmarshaled.set_m_NormalizedTime_5(unmarshaled_m_NormalizedTime_temp_5); bool unmarshaled_m_AnyState_temp_6 = false; unmarshaled_m_AnyState_temp_6 = static_cast<bool>(marshaled.___m_AnyState_6); unmarshaled.set_m_AnyState_6(unmarshaled_m_AnyState_temp_6); int32_t unmarshaled_m_TransitionType_temp_7 = 0; unmarshaled_m_TransitionType_temp_7 = marshaled.___m_TransitionType_7; unmarshaled.set_m_TransitionType_7(unmarshaled_m_TransitionType_temp_7); } // Conversion method for clean up from marshalling of: UnityEngine.AnimatorTransitionInfo IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_cleanup(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.AnimatorTransitionInfo IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_com(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& unmarshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_com& marshaled) { marshaled.___m_FullPath_0 = unmarshaled.get_m_FullPath_0(); marshaled.___m_UserName_1 = unmarshaled.get_m_UserName_1(); marshaled.___m_Name_2 = unmarshaled.get_m_Name_2(); marshaled.___m_HasFixedDuration_3 = static_cast<int32_t>(unmarshaled.get_m_HasFixedDuration_3()); marshaled.___m_Duration_4 = unmarshaled.get_m_Duration_4(); marshaled.___m_NormalizedTime_5 = unmarshaled.get_m_NormalizedTime_5(); marshaled.___m_AnyState_6 = static_cast<int32_t>(unmarshaled.get_m_AnyState_6()); marshaled.___m_TransitionType_7 = unmarshaled.get_m_TransitionType_7(); } IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_com_back(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_com& marshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& unmarshaled) { int32_t unmarshaled_m_FullPath_temp_0 = 0; unmarshaled_m_FullPath_temp_0 = marshaled.___m_FullPath_0; unmarshaled.set_m_FullPath_0(unmarshaled_m_FullPath_temp_0); int32_t unmarshaled_m_UserName_temp_1 = 0; unmarshaled_m_UserName_temp_1 = marshaled.___m_UserName_1; unmarshaled.set_m_UserName_1(unmarshaled_m_UserName_temp_1); int32_t unmarshaled_m_Name_temp_2 = 0; unmarshaled_m_Name_temp_2 = marshaled.___m_Name_2; unmarshaled.set_m_Name_2(unmarshaled_m_Name_temp_2); bool unmarshaled_m_HasFixedDuration_temp_3 = false; unmarshaled_m_HasFixedDuration_temp_3 = static_cast<bool>(marshaled.___m_HasFixedDuration_3); unmarshaled.set_m_HasFixedDuration_3(unmarshaled_m_HasFixedDuration_temp_3); float unmarshaled_m_Duration_temp_4 = 0.0f; unmarshaled_m_Duration_temp_4 = marshaled.___m_Duration_4; unmarshaled.set_m_Duration_4(unmarshaled_m_Duration_temp_4); float unmarshaled_m_NormalizedTime_temp_5 = 0.0f; unmarshaled_m_NormalizedTime_temp_5 = marshaled.___m_NormalizedTime_5; unmarshaled.set_m_NormalizedTime_5(unmarshaled_m_NormalizedTime_temp_5); bool unmarshaled_m_AnyState_temp_6 = false; unmarshaled_m_AnyState_temp_6 = static_cast<bool>(marshaled.___m_AnyState_6); unmarshaled.set_m_AnyState_6(unmarshaled_m_AnyState_temp_6); int32_t unmarshaled_m_TransitionType_temp_7 = 0; unmarshaled_m_TransitionType_temp_7 = marshaled.___m_TransitionType_7; unmarshaled.set_m_TransitionType_7(unmarshaled_m_TransitionType_temp_7); } // Conversion method for clean up from marshalling of: UnityEngine.AnimatorTransitionInfo IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_com_cleanup(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_com& marshaled) { } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.HumanBone IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& unmarshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_pinvoke& marshaled) { marshaled.___m_BoneName_0 = il2cpp_codegen_marshal_string(unmarshaled.get_m_BoneName_0()); marshaled.___m_HumanName_1 = il2cpp_codegen_marshal_string(unmarshaled.get_m_HumanName_1()); marshaled.___limit_2 = unmarshaled.get_limit_2(); } IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_back(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_pinvoke& marshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& unmarshaled) { unmarshaled.set_m_BoneName_0(il2cpp_codegen_marshal_string_result(marshaled.___m_BoneName_0)); unmarshaled.set_m_HumanName_1(il2cpp_codegen_marshal_string_result(marshaled.___m_HumanName_1)); HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 unmarshaled_limit_temp_2; memset((&unmarshaled_limit_temp_2), 0, sizeof(unmarshaled_limit_temp_2)); unmarshaled_limit_temp_2 = marshaled.___limit_2; unmarshaled.set_limit_2(unmarshaled_limit_temp_2); } // Conversion method for clean up from marshalling of: UnityEngine.HumanBone IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_cleanup(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_pinvoke& marshaled) { il2cpp_codegen_marshal_free(marshaled.___m_BoneName_0); marshaled.___m_BoneName_0 = NULL; il2cpp_codegen_marshal_free(marshaled.___m_HumanName_1); marshaled.___m_HumanName_1 = NULL; } // Conversion methods for marshalling of: UnityEngine.HumanBone IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_com(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& unmarshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_com& marshaled) { marshaled.___m_BoneName_0 = il2cpp_codegen_marshal_bstring(unmarshaled.get_m_BoneName_0()); marshaled.___m_HumanName_1 = il2cpp_codegen_marshal_bstring(unmarshaled.get_m_HumanName_1()); marshaled.___limit_2 = unmarshaled.get_limit_2(); } IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_com_back(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_com& marshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& unmarshaled) { unmarshaled.set_m_BoneName_0(il2cpp_codegen_marshal_bstring_result(marshaled.___m_BoneName_0)); unmarshaled.set_m_HumanName_1(il2cpp_codegen_marshal_bstring_result(marshaled.___m_HumanName_1)); HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 unmarshaled_limit_temp_2; memset((&unmarshaled_limit_temp_2), 0, sizeof(unmarshaled_limit_temp_2)); unmarshaled_limit_temp_2 = marshaled.___limit_2; unmarshaled.set_limit_2(unmarshaled_limit_temp_2); } // Conversion method for clean up from marshalling of: UnityEngine.HumanBone IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_com_cleanup(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_com& marshaled) { il2cpp_codegen_marshal_free_bstring(marshaled.___m_BoneName_0); marshaled.___m_BoneName_0 = NULL; il2cpp_codegen_marshal_free_bstring(marshaled.___m_HumanName_1); marshaled.___m_HumanName_1 = NULL; } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.SkeletonBone IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& unmarshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_pinvoke& marshaled) { marshaled.___name_0 = il2cpp_codegen_marshal_string(unmarshaled.get_name_0()); marshaled.___parentName_1 = il2cpp_codegen_marshal_string(unmarshaled.get_parentName_1()); marshaled.___position_2 = unmarshaled.get_position_2(); marshaled.___rotation_3 = unmarshaled.get_rotation_3(); marshaled.___scale_4 = unmarshaled.get_scale_4(); } IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_back(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_pinvoke& marshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& unmarshaled) { unmarshaled.set_name_0(il2cpp_codegen_marshal_string_result(marshaled.___name_0)); unmarshaled.set_parentName_1(il2cpp_codegen_marshal_string_result(marshaled.___parentName_1)); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E unmarshaled_position_temp_2; memset((&unmarshaled_position_temp_2), 0, sizeof(unmarshaled_position_temp_2)); unmarshaled_position_temp_2 = marshaled.___position_2; unmarshaled.set_position_2(unmarshaled_position_temp_2); Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 unmarshaled_rotation_temp_3; memset((&unmarshaled_rotation_temp_3), 0, sizeof(unmarshaled_rotation_temp_3)); unmarshaled_rotation_temp_3 = marshaled.___rotation_3; unmarshaled.set_rotation_3(unmarshaled_rotation_temp_3); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E unmarshaled_scale_temp_4; memset((&unmarshaled_scale_temp_4), 0, sizeof(unmarshaled_scale_temp_4)); unmarshaled_scale_temp_4 = marshaled.___scale_4; unmarshaled.set_scale_4(unmarshaled_scale_temp_4); } // Conversion method for clean up from marshalling of: UnityEngine.SkeletonBone IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_cleanup(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_pinvoke& marshaled) { il2cpp_codegen_marshal_free(marshaled.___name_0); marshaled.___name_0 = NULL; il2cpp_codegen_marshal_free(marshaled.___parentName_1); marshaled.___parentName_1 = NULL; } // Conversion methods for marshalling of: UnityEngine.SkeletonBone IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_com(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& unmarshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_com& marshaled) { marshaled.___name_0 = il2cpp_codegen_marshal_bstring(unmarshaled.get_name_0()); marshaled.___parentName_1 = il2cpp_codegen_marshal_bstring(unmarshaled.get_parentName_1()); marshaled.___position_2 = unmarshaled.get_position_2(); marshaled.___rotation_3 = unmarshaled.get_rotation_3(); marshaled.___scale_4 = unmarshaled.get_scale_4(); } IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_com_back(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_com& marshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& unmarshaled) { unmarshaled.set_name_0(il2cpp_codegen_marshal_bstring_result(marshaled.___name_0)); unmarshaled.set_parentName_1(il2cpp_codegen_marshal_bstring_result(marshaled.___parentName_1)); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E unmarshaled_position_temp_2; memset((&unmarshaled_position_temp_2), 0, sizeof(unmarshaled_position_temp_2)); unmarshaled_position_temp_2 = marshaled.___position_2; unmarshaled.set_position_2(unmarshaled_position_temp_2); Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 unmarshaled_rotation_temp_3; memset((&unmarshaled_rotation_temp_3), 0, sizeof(unmarshaled_rotation_temp_3)); unmarshaled_rotation_temp_3 = marshaled.___rotation_3; unmarshaled.set_rotation_3(unmarshaled_rotation_temp_3); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E unmarshaled_scale_temp_4; memset((&unmarshaled_scale_temp_4), 0, sizeof(unmarshaled_scale_temp_4)); unmarshaled_scale_temp_4 = marshaled.___scale_4; unmarshaled.set_scale_4(unmarshaled_scale_temp_4); } // Conversion method for clean up from marshalling of: UnityEngine.SkeletonBone IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_com_cleanup(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_com& marshaled) { il2cpp_codegen_marshal_free_bstring(marshaled.___name_0); marshaled.___name_0 = NULL; il2cpp_codegen_marshal_free_bstring(marshaled.___parentName_1); marshaled.___parentName_1 = NULL; } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.StateMachineBehaviour::OnStateEnter(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateEnter_m0B5055A01EEF9070E7611D3C3165AAA118D22953 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateUpdate(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateUpdate_m2FF9D5AD07DF99860C7B0033791FE08F2EF919F1 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateExit(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateExit_mE8EADFCEA482A101BF13AFB773A06C3C2C8B3208 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateMove(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMove_mB51A6EA16DA5038BF7C4E46863C8ECA1338EFBDD (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateIK(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateIK_m2BB5A0CD4B083CCDFAC7EE2F8233D2B11825197F (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateMachineEnter(UnityEngine.Animator,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineEnter_m8696CC6EE9DC7577A07023F84DCF6E4F80E75ACC (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, int32_t ___stateMachinePathHash1, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateMachineExit(UnityEngine.Animator,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineExit_m7FD170C30229751A93F64C26AFFF9C9BA057BF3D (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, int32_t ___stateMachinePathHash1, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateEnter(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateEnter_m0027D5548D58C0E2777A4CF9420F015FD56CEC18 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller3, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateUpdate(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateUpdate_mF81F7D0AB02EB31012A7C50E75295C40301A5055 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller3, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateExit(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateExit_m795DAE1099CF045D5E61ABBBAD017455F48B0707 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller3, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateMove(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMove_m29F850CE0258906408520515E4E157D43AFEB181 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller3, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateIK(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateIK_m96E18AE1A75046F85EB7FEB5C05CEC7377F72C1F (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller3, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateMachineEnter(UnityEngine.Animator,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineEnter_mF2DF6E7A25D30F05E99984F3E8D4083D695F23CA (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, int32_t ___stateMachinePathHash1, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::OnStateMachineExit(UnityEngine.Animator,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineExit_m8AC70A1160FE329D0E1EC31F08B1E85B59DB516D (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, int32_t ___stateMachinePathHash1, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller2, const RuntimeMethod* method) { { return; } } // System.Void UnityEngine.StateMachineBehaviour::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour__ctor_mDB0650FD738799E5880150E656D4A88524D0EBE0 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, const RuntimeMethod* method) { { ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063(__this, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __this, const RuntimeMethod* method) { typedef void (DEFAULT_CALL *PInvokeFunc)(); PInvokeFunc il2cppPInvokeFunc = reinterpret_cast<PInvokeFunc>(il2cpp_codegen_get_method_pointer(((RuntimeDelegate*)__this)->method)); // Native function invocation il2cppPInvokeFunc(); } // System.Void UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback::.ctor(System.Object,System.IntPtr) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback__ctor_mA35F55BEB8A4BD57D109684E857F85C1F0A6C1B5 (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method) { __this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1)); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Void UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback::Invoke() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback_Invoke_m21DB79300E852ED93F2521FFC03EC4D858F6B330 (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __this, const RuntimeMethod* method) { DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* delegateArrayToInvoke = __this->get_delegates_11(); Delegate_t** delegatesToInvoke; il2cpp_array_size_t length; if (delegateArrayToInvoke != NULL) { length = delegateArrayToInvoke->max_length; delegatesToInvoke = reinterpret_cast<Delegate_t**>(delegateArrayToInvoke->GetAddressAtUnchecked(0)); } else { length = 1; delegatesToInvoke = reinterpret_cast<Delegate_t**>(&__this); } for (il2cpp_array_size_t i = 0; i < length; i++) { Delegate_t* currentDelegate = delegatesToInvoke[i]; Il2CppMethodPointer targetMethodPointer = currentDelegate->get_method_ptr_0(); RuntimeObject* targetThis = currentDelegate->get_m_target_2(); RuntimeMethod* targetMethod = (RuntimeMethod*)(currentDelegate->get_method_3()); if (!il2cpp_codegen_method_is_virtual(targetMethod)) { il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod); } bool ___methodIsStatic = MethodIsStatic(targetMethod); int ___parameterCount = il2cpp_codegen_method_parameter_count(targetMethod); if (___methodIsStatic) { if (___parameterCount == 0) { // open typedef void (*FunctionPointerType) (const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetMethod); } else { // closed typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } else { // closed typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } } #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "79205367+MikoCode@users.noreply.github.com" ]
79205367+MikoCode@users.noreply.github.com
1f750285c7d8ff23d3154faf133df719b5afcf0f
4352b5c9e6719d762e6a80e7a7799630d819bca3
/tutorials/eulerVortex.twitch/eulerVortex.cyclic.twitch/4.83/p
fd80026168f20e562a72877bc8b54a1b33695528
[]
no_license
dashqua/epicProject
d6214b57c545110d08ad053e68bc095f1d4dc725
54afca50a61c20c541ef43e3d96408ef72f0bcbc
refs/heads/master
2022-02-28T17:20:20.291864
2019-10-28T13:33:16
2019-10-28T13:33:16
184,294,390
1
0
null
null
null
null
UTF-8
C++
false
false
69,356
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "4.83"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField nonuniform List<scalar> 10000 ( 0.999985 0.999988 0.999991 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00004 1.00005 1.00005 1.00006 1.00007 1.0001 1.00018 1.00031 1.00055 1.00092 1.00146 1.0022 1.00315 1.00432 1.00567 1.00717 1.00876 1.01039 1.01198 1.01349 1.01486 1.01605 1.01704 1.0178 1.01834 1.01864 1.01871 1.01855 1.01817 1.01756 1.01673 1.01569 1.01445 1.01306 1.01156 1.01 1.00845 1.00697 1.00561 1.00441 1.00338 1.00252 1.00184 1.0013 1.00089 1.00059 1.00037 1.00022 1.00012 1.00006 1.00002 0.999995 0.999985 0.999982 0.999982 0.999979 0.999983 0.999987 0.999991 0.999993 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00006 1.00007 1.00008 1.00009 1.00013 1.0002 1.00033 1.00057 1.00096 1.00155 1.00238 1.00348 1.00485 1.00648 1.00832 1.0103 1.01234 1.01436 1.01628 1.01804 1.01959 1.02089 1.02194 1.02273 1.02326 1.02356 1.02361 1.02344 1.02304 1.0224 1.02152 1.02039 1.01901 1.0174 1.0156 1.01367 1.0117 1.00976 1.00793 1.00628 1.00485 1.00364 1.00266 1.00189 1.0013 1.00086 1.00055 1.00033 1.00018 1.00009 1.00003 0.999998 0.999982 0.999976 0.999977 0.999973 0.999977 0.999983 0.999987 0.999991 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00007 1.00008 1.00009 1.00011 1.00015 1.00021 1.00034 1.00057 1.00096 1.00158 1.00248 1.00371 1.00528 1.00719 1.00937 1.01176 1.01424 1.01671 1.01905 1.0212 1.02307 1.02465 1.02591 1.02688 1.02757 1.02801 1.02823 1.02825 1.02808 1.02773 1.02716 1.02636 1.0253 1.02394 1.02227 1.0203 1.01808 1.01571 1.0133 1.01095 1.00877 1.00684 1.00518 1.00382 1.00273 1.00189 1.00126 1.00081 1.00049 1.00028 1.00014 1.00005 1 0.99998 0.999971 0.999969 0.999965 0.999971 0.999977 0.999983 0.999988 0.999992 0.999994 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00007 1.00009 1.00011 1.00013 1.00016 1.00022 1.00034 1.00056 1.00094 1.00156 1.0025 1.00382 1.00557 1.00773 1.01026 1.01306 1.01599 1.01891 1.02167 1.02416 1.02631 1.02806 1.02942 1.03042 1.0311 1.03153 1.03175 1.03183 1.03178 1.03164 1.03139 1.03102 1.03048 1.0297 1.02861 1.02714 1.02526 1.02297 1.02037 1.01756 1.01471 1.01196 1.00945 1.00724 1.00539 1.00389 1.00272 1.00183 1.00119 1.00073 1.00042 1.00022 1.00009 1.00002 0.999982 0.999966 0.999962 0.999956 0.999962 0.99997 0.999977 0.999984 0.999989 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.00009 1.00012 1.00014 1.00018 1.00023 1.00034 1.00053 1.00089 1.00148 1.00242 1.0038 1.00568 1.00807 1.01093 1.01413 1.01751 1.02087 1.02403 1.02682 1.02914 1.03094 1.03223 1.03307 1.03353 1.03369 1.03367 1.03355 1.03339 1.03324 1.03313 1.03307 1.03301 1.03291 1.03267 1.03216 1.03126 1.02984 1.02785 1.02532 1.02235 1.01912 1.01585 1.01273 1.0099 1.00746 1.00545 1.00385 1.00263 1.00173 1.00108 1.00064 1.00034 1.00016 1.00005 0.999991 0.999963 0.999955 0.999947 0.999953 0.999962 0.999971 0.999979 0.999985 0.99999 0.999993 0.999996 0.999998 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.00009 1.00012 1.00015 1.00019 1.00024 1.00033 1.00051 1.00082 1.00137 1.00227 1.00365 1.0056 1.00816 1.01131 1.0149 1.01872 1.02252 1.02604 1.02908 1.03148 1.0332 1.03424 1.0347 1.03469 1.03433 1.03378 1.03315 1.03257 1.03211 1.03183 1.03176 1.03192 1.03226 1.03273 1.03323 1.03361 1.03365 1.03316 1.03195 1.02996 1.02723 1.02393 1.02032 1.01666 1.0132 1.01011 1.00749 1.00536 1.00371 1.00247 1.00157 1.00095 1.00053 1.00026 1.0001 1.00001 0.999966 0.999949 0.999939 0.999944 0.999953 0.999964 0.999973 0.999981 0.999987 0.999991 0.999994 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00002 1.00003 1.00004 1.00006 1.00008 1.00011 1.00015 1.00019 1.00024 1.00033 1.00047 1.00074 1.00123 1.00206 1.00338 1.00533 1.008 1.01137 1.01531 1.01955 1.02378 1.02766 1.0309 1.03331 1.03482 1.03546 1.03534 1.03463 1.03352 1.03218 1.03079 1.02949 1.0284 1.0276 1.02718 1.02714 1.02751 1.02826 1.02936 1.0307 1.03213 1.03341 1.03426 1.03436 1.03348 1.03155 1.02866 1.02506 1.02109 1.01709 1.01335 1.01006 1.00732 1.00513 1.00347 1.00225 1.00138 1.0008 1.00042 1.00018 1.00005 0.999977 0.999947 0.999934 0.999935 0.999944 0.999955 0.999966 0.999976 0.999983 0.999989 0.999993 0.999996 0.999997 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00005 1.00008 1.00011 1.00014 1.00019 1.00024 1.00032 1.00044 1.00067 1.00108 1.00181 1.00302 1.0049 1.00758 1.01109 1.01531 1.01996 1.02462 1.02885 1.03228 1.03465 1.03587 1.03599 1.03516 1.03359 1.03154 1.02925 1.02691 1.0247 1.02276 1.0212 1.0201 1.01953 1.01951 1.02005 1.02114 1.02277 1.02488 1.02736 1.02997 1.03239 1.03419 1.03499 1.0345 1.03264 1.02959 1.0257 1.0214 1.01711 1.01316 1.00975 1.00695 1.00478 1.00315 1.00198 1.00117 1.00064 1.00031 1.00011 1 0.999951 0.999933 0.999927 0.999934 0.999946 0.999959 0.99997 0.999979 0.999986 0.999991 0.999994 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00002 1.00003 1.00004 1.00007 1.0001 1.00013 1.00018 1.00023 1.00031 1.00041 1.0006 1.00094 1.00155 1.00262 1.00434 1.00692 1.01047 1.0149 1.0199 1.02498 1.0296 1.03324 1.03558 1.03649 1.03603 1.0344 1.0319 1.02883 1.02549 1.02212 1.01893 1.01606 1.01364 1.01174 1.01041 1.00972 1.00969 1.01032 1.01163 1.01362 1.01628 1.01958 1.02335 1.02729 1.03095 1.03377 1.03526 1.0351 1.03326 1.03001 1.02582 1.02124 1.01673 1.01265 1.0092 1.00643 1.00431 1.00277 1.00168 1.00095 1.00049 1.0002 1.00005 0.999965 0.999939 0.999922 0.999925 0.999937 0.999951 0.999964 0.999974 0.999983 0.999989 0.999993 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00005 1.00008 1.00012 1.00016 1.00022 1.00029 1.00038 1.00054 1.00081 1.00131 1.0022 1.00371 1.0061 1.00954 1.01405 1.01934 1.02484 1.02988 1.03381 1.03618 1.03682 1.03579 1.03337 1.02993 1.02584 1.02146 1.01707 1.01292 1.00917 1.00592 1.00324 1.00116 0.999728 0.998964 0.998893 0.999531 1.0009 1.00301 1.00593 1.00968 1.01421 1.01933 1.02464 1.02952 1.03329 1.03535 1.03538 1.03344 1.02993 1.02545 1.02062 1.01598 1.01186 1.00845 1.00578 1.00378 1.00235 1.00138 1.00074 1.00034 1.00012 0.999994 0.999955 0.999922 0.999918 0.999928 0.999942 0.999957 0.999969 0.999979 0.999986 0.999991 0.999995 0.999996 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00003 1.00004 1.00007 1.0001 1.00014 1.0002 1.00027 1.00035 1.00048 1.0007 1.00109 1.00181 1.00308 1.00517 1.00838 1.01281 1.01827 1.02416 1.02968 1.034 1.03652 1.03699 1.03549 1.03235 1.02802 1.02296 1.01761 1.0123 1.00729 1.00276 0.998805 0.99548 0.992796 0.990745 0.989324 0.988541 0.988416 0.988971 0.990235 0.992253 0.995103 0.998889 1.00369 1.00945 1.01591 1.02251 1.02848 1.03299 1.03538 1.03539 1.0332 1.02936 1.02459 1.01959 1.0149 1.01084 1.00756 1.00504 1.00321 1.00193 1.00108 1.00054 1.00022 1.00004 0.999986 0.99993 0.999915 0.99992 0.999934 0.999949 0.999963 0.999975 0.999983 0.999989 0.999993 0.999996 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00005 1.00008 1.00012 1.00017 1.00024 1.00032 1.00043 1.0006 1.00091 1.00146 1.00248 1.00424 1.00707 1.01124 1.0167 1.02291 1.02895 1.03379 1.03663 1.03712 1.0353 1.03157 1.02647 1.02055 1.01432 1.00819 1.00245 0.997276 0.992779 0.988994 0.985904 0.983462 0.981615 0.98032 0.979564 0.979362 0.979748 0.980766 0.98248 0.984992 0.988452 0.993035 0.998846 1.0058 1.01351 1.02125 1.02806 1.03299 1.0354 1.03513 1.03253 1.0283 1.02327 1.01818 1.01355 1.00965 1.00657 1.00427 1.00263 1.00152 1.0008 1.00037 1.00012 1.00004 0.999948 0.999916 0.999915 0.999926 0.999942 0.999957 0.99997 0.99998 0.999987 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00004 1.00006 1.0001 1.00015 1.00021 1.00028 1.00038 1.00052 1.00075 1.00118 1.00196 1.00336 1.00574 1.00947 1.0147 1.02107 1.02761 1.03311 1.0365 1.03724 1.03533 1.0312 1.02547 1.01882 1.01183 1.00498 0.998611 0.99293 0.988045 0.983978 0.980692 0.978106 0.976116 0.974618 0.973537 0.972838 0.97253 0.972658 0.973293 0.974524 0.976475 0.979326 0.983308 0.988654 0.995464 1.00357 1.01239 1.02102 1.02832 1.0333 1.03538 1.03456 1.03141 1.02678 1.02157 1.01649 1.01201 1.00835 1.00554 1.0035 1.00208 1.00115 1.00056 1.00022 1.00011 0.999979 0.999925 0.999913 0.99992 0.999935 0.999951 0.999965 0.999976 0.999984 0.99999 0.999994 0.999996 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00002 1.00003 1.00005 1.00008 1.00012 1.00017 1.00024 1.00033 1.00045 1.00063 1.00095 1.00153 1.0026 1.0045 1.00765 1.0124 1.01867 1.02563 1.03187 1.03604 1.03732 1.03561 1.03131 1.02516 1.01792 1.01029 1.00281 0.995879 0.989763 0.984592 0.980386 0.977087 0.974579 0.972716 0.971336 0.970293 0.96948 0.968846 0.968393 0.968176 0.968293 0.968871 0.970067 0.972087 0.975197 0.979703 0.985854 0.993691 1.00288 1.01264 1.02183 1.02921 1.03379 1.03518 1.03361 1.02984 1.02485 1.01954 1.01458 1.01037 1.00703 1.00453 1.00277 1.00158 1.00082 1.00036 1.00021 1.00003 0.999943 0.999915 0.999916 0.999929 0.999945 0.99996 0.999972 0.999982 0.999988 0.999993 0.999995 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00006 1.00009 1.00014 1.0002 1.00028 1.00038 1.00053 1.00077 1.00119 1.00198 1.00343 1.00594 1.01 1.01585 1.02296 1.02995 1.03511 1.03727 1.03608 1.03193 1.02559 1.01793 1.00975 1.00171 0.994259 0.987732 0.982305 0.978027 0.974835 0.972581 0.971072 0.97009 0.969424 0.968892 0.96837 0.967794 0.96716 0.966523 0.965998 0.965754 0.966003 0.966994 0.969023 0.972437 0.977577 0.984653 0.993563 1.00375 1.01418 1.02353 1.0305 1.03426 1.03465 1.03219 1.02781 1.02255 1.01728 1.01257 1.0087 1.00574 1.00359 1.00211 1.00115 1.00055 1.00034 1.00009 0.999972 0.999924 0.999915 0.999925 0.99994 0.999956 0.999969 0.999979 0.999986 0.999992 0.999995 0.999997 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1.00001 1.00001 1.00002 1.00004 1.00007 1.0001 1.00016 1.00023 1.00032 1.00044 1.00062 1.00093 1.00149 1.00255 1.00446 1.00772 1.01282 1.01969 1.02723 1.03353 1.03689 1.03662 1.03297 1.02672 1.01885 1.01025 1.00168 0.993717 0.986753 0.981034 0.976666 0.973611 0.971708 0.970716 0.970354 0.970342 0.970427 0.970412 0.970171 0.969644 0.968819 0.967733 0.966491 0.965288 0.964399 0.964147 0.96489 0.967011 0.970902 0.976881 0.985035 0.99504 1.00606 1.0168 1.02582 1.0319 1.03446 1.03365 1.03026 1.02536 1.01998 1.01489 1.01054 1.00709 1.00453 1.00274 1.00154 1.00079 1.0005 1.00018 1.00001 0.999941 0.999919 0.999922 0.999935 0.999951 0.999965 0.999976 0.999984 0.99999 0.999994 0.999996 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1.00001 1.00002 1.00003 1.00005 1.00008 1.00012 1.00018 1.00026 1.00036 1.0005 1.00073 1.00113 1.00187 1.00326 1.00574 1.00988 1.01605 1.02372 1.03107 1.03593 1.037 1.03425 1.02845 1.02061 1.01174 1.00272 0.994215 0.986746 0.980646 0.976093 0.973109 0.971554 0.971154 0.971554 0.972392 0.973336 0.97412 0.974559 0.974555 0.974075 0.973106 0.971641 0.969726 0.967528 0.965361 0.963651 0.962865 0.963466 0.965899 0.970545 0.977615 0.986979 0.998014 1.00957 1.02017 1.02833 1.03307 1.03414 1.03206 1.02783 1.02258 1.01725 1.01249 1.00858 1.0056 1.00346 1.00201 1.00107 1.0007 1.00029 1.00007 0.999967 0.999927 0.999923 0.999933 0.999947 0.999962 0.999974 0.999983 0.999989 0.999993 0.999996 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1.00001 1.00002 1.00003 1.00005 1.00009 1.00013 1.0002 1.00029 1.00041 1.00057 1.00086 1.00138 1.00234 1.00413 1.00728 1.0124 1.01959 1.02761 1.03406 1.0369 1.03553 1.03057 1.02309 1.01417 1.00478 0.995738 0.987674 0.981052 0.976156 0.97309 0.971771 0.971927 0.97314 0.974935 0.976876 0.978615 0.979913 0.980643 0.980779 0.980349 0.979354 0.977728 0.975388 0.972374 0.968963 0.965664 0.963104 0.961907 0.962624 0.965703 0.971432 0.97982 0.990431 1.00229 1.01396 1.02385 1.03064 1.03367 1.03313 1.02984 1.02496 1.01958 1.01449 1.01017 1.00678 1.00428 1.00255 1.00141 1.00094 1.00043 1.00014 1 0.999942 0.999927 0.999932 0.999945 0.999959 0.999971 0.999981 0.999988 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 0.999999 1 1 0.999998 1 1 0.999999 1.00001 1 1.00001 1.00002 1.00003 1.00006 1.0001 1.00015 1.00022 1.00032 1.00046 1.00065 1.00101 1.00167 1.00291 1.00517 1.00911 1.01526 1.02323 1.03101 1.03591 1.03646 1.03284 1.02608 1.01739 1.00781 0.998278 0.98955 0.982244 0.97679 0.973413 0.972117 0.972674 0.974637 0.977413 0.980404 0.983132 0.985288 0.986723 0.987431 0.987513 0.987103 0.986253 0.984837 0.982585 0.979282 0.975008 0.970254 0.96581 0.962548 0.961234 0.962451 0.966572 0.973699 0.983534 0.995265 1.00756 1.01878 1.02737 1.03233 1.03345 1.03133 1.02705 1.02178 1.0165 1.01182 1.00803 1.00518 1.00316 1.0018 1.00121 1.00059 1.00023 1.00005 0.999963 0.999934 0.999933 0.999943 0.999957 0.999969 0.999979 0.999986 0.999991 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 0.999997 1 1 0.999998 1.00001 1.00001 1.00001 1.00003 1.00004 1.00006 1.00011 1.00017 1.00023 1.00035 1.00051 1.00074 1.00118 1.00203 1.00359 1.0064 1.0112 1.01834 1.02671 1.03361 1.03655 1.03487 1.02933 1.02121 1.0117 1.0018 0.992411 0.984289 0.978037 0.974052 0.972475 0.973165 0.975688 0.979367 0.983411 0.987116 0.99002 0.991932 0.992879 0.993052 0.992738 0.992235 0.991691 0.990954 0.989549 0.986883 0.982632 0.977048 0.970978 0.965576 0.961956 0.960974 0.963166 0.96873 0.977475 0.988715 1.00123 1.01339 1.0235 1.03024 1.03306 1.03225 1.02877 1.0238 1.01845 1.0135 1.00935 1.00614 1.00382 1.00224 1.00152 1.00077 1.00034 1.0001 0.999991 0.999947 0.999937 0.999944 0.999956 0.999968 0.999978 0.999985 0.999991 0.999994 0.999997 0.999998 0.999999 0.999999 1 1 1 0.999999 1 1 0.999998 1 0.999997 1 1 0.999996 1.00001 1.00001 1.00001 1.00003 1.00005 1.00006 1.00012 1.00019 1.00025 1.00038 1.00058 1.00085 1.00137 1.00244 1.00438 1.00781 1.01352 1.02151 1.02977 1.03526 1.03612 1.03245 1.0254 1.01626 1.00621 0.996268 0.987289 0.980039 0.975121 0.972876 0.973318 0.976087 0.98047 0.985503 0.990192 0.993779 0.995909 0.996616 0.996205 0.995137 0.993949 0.99314 0.992995 0.993388 0.993681 0.992868 0.990026 0.984873 0.97804 0.970872 0.964915 0.961472 0.961394 0.965061 0.972393 0.982806 0.995179 1.00792 1.01924 1.02758 1.03205 1.03264 1.03009 1.02559 1.0203 1.01515 1.01069 1.00715 1.00454 1.00272 1.00185 1.00098 1.00046 1.00017 1.00003 0.999963 0.999944 0.999946 0.999956 0.999967 0.999977 0.999984 0.99999 0.999994 0.999997 0.999998 0.999999 0.999999 1 1 1 0.999999 1 1 0.999998 1 0.999997 0.999999 1.00001 0.999995 1 1.00002 1 1.00003 1.00006 1.00006 1.00012 1.00021 1.00027 1.00039 1.00064 1.00097 1.0016 1.00292 1.0053 1.0094 1.01601 1.02455 1.03222 1.03598 1.03486 1.02955 1.0213 1.0114 1.00107 0.991309 0.982981 0.976853 0.973517 0.973228 0.975796 0.980553 0.986417 0.992098 0.996438 0.998726 0.998845 0.997182 0.994414 0.991334 0.988757 0.987397 0.987682 0.989545 0.992264 0.994499 0.99468 0.991719 0.985656 0.977736 0.969883 0.963979 0.961394 0.962843 0.968431 0.977689 0.98958 1.00256 1.01477 1.02449 1.03051 1.03251 1.03101 1.0271 1.022 1.01675 1.01203 1.00819 1.00529 1.00323 1.00221 1.00121 1.0006 1.00025 1.00007 0.999985 0.999954 0.99995 0.999957 0.999967 0.999977 0.999984 0.99999 0.999994 0.999996 0.999998 0.999999 1 0.999999 1 1 1 1 1 0.999997 1 1 0.999995 1.00001 0.999996 0.999999 1.00002 1 1.00002 1.00007 1.00007 1.00011 1.00024 1.0003 1.0004 1.0007 1.00112 1.00185 1.00344 1.00634 1.01115 1.01854 1.02729 1.03397 1.03593 1.03303 1.02638 1.0172 1.00676 0.996338 0.986985 0.97953 0.97474 0.973187 0.974977 0.979619 0.986019 0.992651 0.997918 1.0006 1.00019 0.996966 0.99178 0.985742 0.979996 0.975628 0.973555 0.974325 0.977902 0.983528 0.989673 0.994254 0.99531 0.991949 0.984886 0.976155 0.968219 0.963133 0.962151 0.965701 0.97349 0.984578 0.997466 1.01028 1.02112 1.02855 1.03194 1.03154 1.02832 1.02352 1.01825 1.01335 1.00924 1.00606 1.00377 1.00258 1.00145 1.00075 1.00034 1.00012 1.00001 0.999968 0.999956 0.999959 0.999968 0.999976 0.999984 0.999989 0.999993 0.999996 0.999998 0.999999 0.999999 1 1 1 1 0.999999 1 0.999996 1 1 0.999991 1.00001 1 0.99999 1.00003 1.00001 1.00001 1.00009 1.00009 1.0001 1.00025 1.00033 1.00041 1.00076 1.0013 1.00214 1.00401 1.00748 1.01303 1.02101 1.02959 1.03509 1.03532 1.03085 1.02311 1.01323 1.00242 0.992079 0.98333 0.976944 0.973664 0.974014 0.97788 0.984334 0.991738 0.998102 1.00164 1.00124 0.996781 0.989039 0.979395 0.969393 0.960502 0.954069 0.951228 0.952639 0.958237 0.967148 0.977708 0.987541 0.994003 0.995161 0.990813 0.982677 0.973587 0.966341 0.962914 0.964234 0.970289 0.980285 0.992786 1.0059 1.01763 1.0263 1.03099 1.03171 1.02926 1.02484 1.01965 1.01461 1.01026 1.00684 1.00432 1.00297 1.0017 1.0009 1.00043 1.00017 1.00004 0.999984 0.999964 0.999963 0.999969 0.999977 0.999984 0.999989 0.999993 0.999996 0.999998 0.999999 0.999999 1 1 1 1 0.999998 1 0.999997 0.999999 1.00001 0.999987 1.00001 1.00001 0.99998 1.00003 1.00003 0.99999 1.00009 1.00011 1.00008 1.00024 1.00038 1.00042 1.00079 1.0015 1.00248 1.00461 1.00869 1.01499 1.0233 1.0314 1.03567 1.03432 1.02845 1.01983 1.00947 0.998446 0.988325 0.980344 0.975193 0.973531 0.975806 0.981587 0.989356 0.996843 1.0017 1.00216 0.99745 0.987879 0.97474 0.959896 0.945293 0.932721 0.923843 0.920123 0.922432 0.930618 0.943474 0.959006 0.974624 0.987306 0.994296 0.994323 0.988381 0.979319 0.970565 0.96491 0.963952 0.968095 0.976763 0.988615 1.00177 1.01414 1.02386 1.02975 1.03156 1.02992 1.02595 1.0209 1.01579 1.01126 1.00761 1.00488 1.00335 1.00196 1.00107 1.00054 1.00023 1.00008 1 0.999974 0.999968 0.999972 0.999978 0.999984 0.99999 0.999993 0.999996 0.999998 0.999998 0.999999 1 1 1 1 0.999997 1 0.999999 0.999995 1.00001 0.999987 1 1.00002 0.999975 1.00002 1.00005 0.999978 1.00007 1.00015 1.00007 1.00021 1.00044 1.00045 1.0008 1.0017 1.00288 1.00522 1.00992 1.01695 1.02535 1.03273 1.03582 1.03311 1.02596 1.01659 1.00599 0.994914 0.985083 0.97799 0.974207 0.974198 0.978292 0.985658 0.99403 1.00051 1.00264 0.998973 0.98911 0.973703 0.954381 0.933409 0.913172 0.895914 0.88379 0.878823 0.882312 0.894048 0.912168 0.93386 0.956061 0.975563 0.989199 0.994818 0.992492 0.984716 0.975298 0.967829 0.964693 0.966846 0.974018 0.98501 0.997976 1.01076 1.02134 1.0283 1.03116 1.03032 1.02686 1.02201 1.01688 1.0122 1.00836 1.00543 1.00373 1.00222 1.00124 1.00064 1.0003 1.00011 1.00002 0.999987 0.999974 0.999975 0.99998 0.999985 0.99999 0.999993 0.999996 0.999998 0.999998 0.999999 1 1 0.999999 1 0.999997 1 1 0.99999 1.00001 0.999993 0.999989 1.00003 0.999978 0.999997 1.00008 0.99998 1.00003 1.00019 1.00007 1.00015 1.00048 1.00051 1.00079 1.00189 1.00334 1.00588 1.01111 1.01885 1.02717 1.03362 1.03563 1.03179 1.02351 1.01347 1.00281 0.991864 0.982343 0.976195 0.973881 0.975482 0.981151 0.989615 0.997757 1.00218 1.00066 0.992266 0.976802 0.954873 0.928191 0.89947 0.871826 0.848273 0.831695 0.824883 0.829838 0.846425 0.871836 0.901764 0.932068 0.959261 0.980162 0.992192 0.994593 0.989257 0.980085 0.971343 0.966252 0.966431 0.97201 0.981985 0.994569 1.00757 1.01883 1.02673 1.03055 1.03051 1.02757 1.02297 1.01786 1.01308 1.00907 1.00597 1.0041 1.00247 1.00141 1.00075 1.00037 1.00016 1.00005 1 0.999982 0.999979 0.999982 0.999986 0.999991 0.999994 0.999996 0.999998 0.999999 0.999999 1 1 0.999999 1 0.999998 1 1.00001 0.999988 1.00001 1 0.999976 1.00004 0.999993 0.999969 1.00009 1 0.999984 1.00021 1.00011 1.00008 1.00049 1.00062 1.00078 1.00202 1.00385 1.00658 1.01221 1.02059 1.02878 1.03418 1.03512 1.03047 1.02122 1.01048 0.999938 0.989324 0.980091 0.974851 0.974077 0.977177 0.984039 0.993015 1.00014 1.0017 0.996055 0.98275 0.961338 0.931817 0.895831 0.856951 0.819655 0.788118 0.765991 0.756831 0.763555 0.786342 0.821314 0.862073 0.902632 0.938816 0.967635 0.986614 0.99452 0.992589 0.984546 0.975142 0.968411 0.966714 0.970669 0.979523 0.99158 1.00463 1.0164 1.0251 1.02979 1.03051 1.02809 1.02377 1.01874 1.01388 1.00973 1.00648 1.00445 1.00271 1.00157 1.00086 1.00043 1.0002 1.00007 1.00002 0.999992 0.999985 0.999985 0.999988 0.999992 0.999994 0.999996 0.999998 0.999999 0.999999 1 0.999999 1 1 1 0.999997 1.00001 0.999989 1 1.00002 0.999968 1.00003 1.00002 0.999945 1.00008 1.00005 0.999937 1.00019 1.00018 1.00002 1.00045 1.00075 1.00081 1.00208 1.00435 1.00735 1.01319 1.02209 1.03023 1.03452 1.03435 1.02917 1.01922 1.00771 0.997287 0.987285 0.978335 0.973835 0.97462 0.979087 0.986644 0.995537 1.0011 0.999384 0.989474 0.971253 0.943363 0.90463 0.856803 0.805195 0.756461 0.716066 0.688035 0.676446 0.685267 0.715221 0.761455 0.815269 0.86823 0.914871 0.952285 0.978518 0.992347 0.994506 0.988366 0.97893 0.970945 0.967543 0.969906 0.977588 0.989014 1.00197 1.01411 1.02348 1.02894 1.03036 1.02846 1.02443 1.01949 1.01459 1.01033 1.00695 1.00477 1.00294 1.00172 1.00096 1.0005 1.00024 1.0001 1.00003 1 0.99999 0.999989 0.99999 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 0.999999 1 1 1 0.999996 1.00001 0.999994 0.999995 1.00002 0.999971 1.00001 1.00004 0.999937 1.00005 1.0001 0.999915 1.00013 1.00026 0.999996 1.00034 1.00086 1.00092 1.00208 1.00478 1.00818 1.01409 1.02329 1.0315 1.03478 1.0334 1.02785 1.01762 1.00526 0.994775 0.985674 0.977103 0.973027 0.975302 0.981044 0.988748 0.997033 1.00085 0.995798 0.98163 0.958425 0.923339 0.873607 0.811642 0.745629 0.68499 0.636098 0.602684 0.589138 0.600458 0.63785 0.695759 0.763556 0.830247 0.888498 0.935064 0.968632 0.988436 0.995009 0.991333 0.982438 0.97362 0.968751 0.969615 0.976125 0.986859 0.999628 1.01201 1.02192 1.02805 1.0301 1.02869 1.02495 1.02012 1.01521 1.01087 1.00737 1.00505 1.00314 1.00187 1.00106 1.00056 1.00028 1.00013 1.00005 1.00001 0.999997 0.999992 0.999993 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 0.999996 1.00001 1 0.999988 1.00002 0.999983 0.999988 1.00006 0.999952 1 1.00013 0.999932 1.00004 1.0003 1.00003 1.00021 1.00092 1.00111 1.00208 1.00507 1.00902 1.01496 1.02416 1.03251 1.03509 1.03241 1.02644 1.01639 1.00331 0.992354 0.984319 0.976439 0.972373 0.975875 0.982918 0.990296 0.997524 0.999753 0.991593 0.973107 0.944732 0.901906 0.840068 0.762915 0.682377 0.610694 0.554461 0.516775 0.502368 0.516761 0.56109 0.629556 0.710541 0.790907 0.861125 0.917055 0.957824 0.983362 0.994326 0.993391 0.985471 0.976222 0.970161 0.969675 0.975064 0.98509 0.997603 1.01013 1.02047 1.02717 1.02977 1.0288 1.02534 1.02063 1.01574 1.01133 1.00775 1.0053 1.00333 1.002 1.00115 1.00063 1.00032 1.00015 1.00007 1.00002 1 0.999997 0.999996 0.999995 0.999997 0.999998 0.999998 0.999999 0.999999 1 1 1 1 1 0.999998 1 1 0.999987 1.00002 0.999999 0.999974 1.00005 0.999983 0.999963 1.00012 0.999983 0.999963 1.00028 1.00012 1.0001 1.00087 1.00132 1.00215 1.0052 1.00977 1.01585 1.02478 1.03319 1.03549 1.0316 1.02491 1.01537 1.00206 0.990123 0.982954 0.976316 0.971943 0.976088 0.984579 0.991415 0.997139 0.998139 0.987365 0.964429 0.930636 0.880177 0.806645 0.715125 0.621413 0.540162 0.47788 0.437492 0.423993 0.442029 0.491967 0.568552 0.660406 0.752979 0.834484 0.8994 0.946936 0.977733 0.992794 0.994619 0.98793 0.978581 0.97161 0.96996 0.974327 0.98367 0.995894 1.00849 1.01916 1.02632 1.0294 1.02882 1.02561 1.02104 1.01616 1.01172 1.00807 1.0055 1.00348 1.00211 1.00123 1.00068 1.00036 1.00018 1.00008 1.00003 1.00001 1 0.999999 0.999997 0.999998 0.999999 0.999999 1 0.999999 1 0.999999 1 1 1 1 1 1 0.999993 1.00001 1.00001 0.999975 1.00003 1.00001 0.999949 1.00009 1.00004 0.999925 1.0002 1.00021 1.00007 1.00073 1.00149 1.00232 1.00523 1.0103 1.01675 1.02528 1.03349 1.03588 1.03119 1.0234 1.0143 1.00152 0.988378 0.981336 0.976522 0.971946 0.975788 0.985809 0.992382 0.996112 0.996138 0.983624 0.956267 0.916767 0.859558 0.776609 0.673554 0.569138 0.479901 0.4129 0.371932 0.361334 0.382995 0.436344 0.517687 0.61706 0.719295 0.810479 0.883344 0.936805 0.972122 0.990761 0.995152 0.98979 0.980585 0.972963 0.970358 0.973836 0.982559 0.994491 1.00711 1.01802 1.02555 1.02902 1.02877 1.02579 1.02133 1.01649 1.01202 1.00832 1.00566 1.0036 1.0022 1.00129 1.00073 1.0004 1.0002 1.0001 1.00005 1.00002 1.00001 1 1 0.999999 0.999999 0.999999 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 0.999998 1 1.00001 0.999987 1.00001 1.00002 0.999965 1.00003 1.00006 0.999944 1.0001 1.00023 1.00012 1.00058 1.00153 1.00256 1.00525 1.01055 1.01753 1.0258 1.0335 1.03607 1.03121 1.02223 1.013 1.00142 0.98752 0.979474 0.976586 0.972595 0.975095 0.986241 0.993438 0.99487 0.993688 0.980662 0.949581 0.904075 0.841209 0.75248 0.642574 0.531068 0.435798 0.365709 0.326291 0.319681 0.344021 0.398164 0.480622 0.583653 0.692279 0.790824 0.870073 0.928265 0.967105 0.98858 0.995149 0.991059 0.982154 0.974116 0.970771 0.973521 0.981714 0.993381 1.00598 1.01707 1.02488 1.02866 1.02866 1.02587 1.02151 1.01671 1.01224 1.00852 1.00577 1.00369 1.00227 1.00135 1.00077 1.00043 1.00023 1.00012 1.00006 1.00003 1.00001 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999999 1 0.999998 1 1 0.999999 1 1 1.00001 0.999992 1 1.00004 0.999989 1.00003 1.00018 1.00019 1.00049 1.00144 1.00276 1.00536 1.01057 1.01803 1.02636 1.03345 1.03595 1.03149 1.02173 1.01158 1.00126 0.987732 0.977821 0.97595 0.973795 0.974527 0.985524 0.994486 0.9941 0.990783 0.978296 0.945413 0.894096 0.825961 0.734838 0.623666 0.50996 0.411626 0.340372 0.303425 0.30022 0.325773 0.378593 0.459216 0.562333 0.673822 0.77688 0.860493 0.921961 0.963171 0.986596 0.994792 0.99178 0.983246 0.974989 0.971123 0.973323 0.981102 0.992553 1.00512 1.01632 1.02433 1.02833 1.02852 1.02587 1.0216 1.01684 1.01238 1.00865 1.00583 1.00375 1.00232 1.00139 1.00081 1.00045 1.00025 1.00013 1.00007 1.00003 1.00002 1.00001 1 1 1 1 1 1 1 1 0.999999 1 1 0.999998 1 0.999998 0.999998 1.00001 0.999993 1 1.00001 0.99999 1.00001 1 0.999998 1.00002 1.00002 1.00009 1.00022 1.00049 1.00129 1.00283 1.00553 1.01051 1.01816 1.02683 1.03353 1.03563 1.03169 1.02197 1.01055 1.00061 0.988637 0.977135 0.974455 0.974866 0.97477 0.983758 0.994844 0.994452 0.988004 0.975858 0.94409 0.888904 0.81529 0.722857 0.614423 0.503586 0.40636 0.336291 0.301554 0.300046 0.325368 0.375772 0.453029 0.553797 0.665096 0.769697 0.855302 0.918325 0.960641 0.985066 0.994256 0.992025 0.98385 0.97553 0.971356 0.973198 0.980699 0.991996 1.00453 1.0158 1.02392 1.02804 1.02836 1.0258 1.0216 1.01688 1.01244 1.00871 1.00584 1.00377 1.00235 1.00142 1.00083 1.00047 1.00026 1.00014 1.00008 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 0.999999 1 1 0.999998 1 1 0.999994 1.00001 0.999994 0.999993 1.00002 0.99998 0.999995 1.00002 0.999967 0.999995 1.00004 1.00002 1.00017 1.00053 1.00118 1.00273 1.00563 1.01048 1.018 1.02701 1.03377 1.03541 1.03163 1.02261 1.01044 0.999667 0.98937 0.977824 0.972795 0.974823 0.975957 0.981913 0.993639 0.995726 0.98673 0.97308 0.9444 0.889739 0.812114 0.717348 0.61171 0.506364 0.414462 0.348695 0.316309 0.31504 0.339052 0.386778 0.460365 0.557519 0.666334 0.769788 0.854956 0.917653 0.959701 0.984139 0.993663 0.991867 0.983983 0.975722 0.971441 0.973121 0.980486 0.991705 1.00422 1.01549 1.02365 1.02782 1.02819 1.02567 1.02151 1.01682 1.01241 1.00871 1.00581 1.00376 1.00235 1.00143 1.00084 1.00049 1.00028 1.00015 1.00008 1.00005 1.00003 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 0.999998 1 1 0.999993 1.00001 1 0.999984 1.00002 0.999989 0.999974 1.00003 0.99997 0.999948 1.00004 1 1.00008 1.00052 1.00116 1.00256 1.00555 1.01045 1.01772 1.02681 1.03398 1.03552 1.03148 1.02313 1.01126 0.999209 0.989336 0.979304 0.972187 0.97338 0.977051 0.981275 0.990988 0.996407 0.987987 0.971395 0.94461 0.89491 0.818478 0.722235 0.617457 0.517017 0.432761 0.373868 0.344428 0.342653 0.364763 0.409954 0.480039 0.572793 0.677189 0.777019 0.859435 0.919979 0.960409 0.983884 0.99308 0.99136 0.983674 0.975571 0.971371 0.973085 0.980463 0.991683 1.00418 1.01543 1.02354 1.02766 1.028 1.02548 1.02133 1.01668 1.01231 1.00864 1.00573 1.00371 1.00233 1.00143 1.00085 1.0005 1.00029 1.00016 1.00009 1.00005 1.00003 1.00002 1.00001 1 1 1 1 1 1 1 0.999999 1 1 0.999999 0.999999 1 0.999996 1 1.00001 0.999986 1.00001 1 0.999965 1.00001 0.999991 0.999919 1 1.00002 1.00001 1.00042 1.00115 1.00242 1.00529 1.01028 1.01742 1.02634 1.0339 1.03589 1.03167 1.02339 1.0124 0.999903 0.98897 0.98033 0.973118 0.971704 0.976593 0.981879 0.988616 0.995045 0.990513 0.973093 0.94544 0.900969 0.831625 0.739494 0.637396 0.542131 0.465902 0.413337 0.385532 0.38214 0.401914 0.444657 0.511195 0.598722 0.696927 0.790825 0.868299 0.924997 0.96261 0.98426 0.992528 0.99054 0.982957 0.975101 0.971165 0.973103 0.98064 0.991939 1.00443 1.01559 1.02358 1.02757 1.02781 1.02523 1.02108 1.01645 1.01212 1.00851 1.0056 1.00364 1.00229 1.00141 1.00085 1.0005 1.00029 1.00017 1.0001 1.00006 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 0.999995 0.999995 1 0.999977 0.999979 0.999994 0.999929 0.999938 1.00001 1.00001 1.00029 1.00106 1.00233 1.00496 1.00987 1.01705 1.0258 1.0335 1.03621 1.03237 1.0238 1.01327 1.00148 0.989429 0.980412 0.974512 0.971414 0.97462 0.981877 0.988031 0.992638 0.991477 0.977692 0.94999 0.907863 0.846404 0.764334 0.671951 0.586605 0.518189 0.468423 0.439307 0.433127 0.450263 0.490248 0.552541 0.633669 0.724078 0.810162 0.880854 0.932233 0.965996 0.985116 0.99197 0.989431 0.981876 0.974358 0.970862 0.973207 0.98104 0.992485 1.00497 1.016 1.02377 1.02754 1.0276 1.02492 1.02073 1.01613 1.01186 1.00832 1.00543 1.00353 1.00223 1.00138 1.00084 1.0005 1.0003 1.00017 1.0001 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999998 1 0.999998 1 0.999995 0.999994 0.99999 0.999968 0.999971 0.99995 0.999904 0.999958 1.00002 1.0002 1.00089 1.00222 1.00466 1.00927 1.01644 1.02522 1.03298 1.03627 1.03328 1.02482 1.01402 1.00303 0.991156 0.980603 0.974983 0.972415 0.973083 0.979872 0.988 0.991665 0.990641 0.981463 0.95828 0.918911 0.863031 0.792207 0.715335 0.643928 0.582013 0.532755 0.502188 0.49418 0.509089 0.545786 0.602659 0.67587 0.756846 0.833546 0.896088 0.94107 0.970205 0.986252 0.991325 0.988036 0.980479 0.973405 0.970522 0.973446 0.981697 0.993341 1.0058 1.01663 1.0241 1.02757 1.02737 1.02455 1.02031 1.01573 1.01154 1.00807 1.00522 1.0034 1.00215 1.00134 1.00082 1.00049 1.0003 1.00018 1.0001 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999998 1 0.999996 0.999997 1 0.999985 0.999989 0.999977 0.999946 0.999946 0.99991 0.999896 0.999987 1.00017 1.00071 1.00199 1.00437 1.00862 1.01554 1.02445 1.03245 1.03617 1.03405 1.02632 1.01529 1.00424 0.993265 0.982109 0.974908 0.972957 0.973077 0.977334 0.986123 0.991907 0.990798 0.983355 0.966091 0.9335 0.885295 0.826375 0.764449 0.70339 0.645598 0.598831 0.570531 0.563097 0.576339 0.609184 0.65954 0.723461 0.793532 0.859484 0.912818 0.950702 0.974763 0.987424 0.990497 0.986353 0.978822 0.972321 0.970225 0.973882 0.982652 0.994526 1.00693 1.01748 1.02456 1.02763 1.02712 1.0241 1.0198 1.01526 1.01114 1.00777 1.00498 1.00324 1.00206 1.00128 1.00079 1.00048 1.00029 1.00018 1.00011 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 1 1 0.999992 1 0.999989 0.999977 0.999983 0.999946 0.99992 0.999915 0.999877 0.999913 1.00013 1.00059 1.0017 1.00398 1.00799 1.01448 1.02334 1.03181 1.03612 1.03466 1.02782 1.01732 1.00577 0.994924 0.984478 0.975926 0.97252 0.973135 0.976187 0.983092 0.990669 0.992263 0.986328 0.972461 0.947724 0.911701 0.867154 0.816288 0.76068 0.707709 0.667419 0.643969 0.637553 0.648688 0.676995 0.719987 0.773708 0.832012 0.88645 0.929967 0.960368 0.979165 0.988345 0.989367 0.984383 0.976973 0.971201 0.97006 0.974587 0.983949 0.996061 1.00836 1.01854 1.02512 1.0277 1.02681 1.02358 1.01921 1.0147 1.01068 1.00742 1.0047 1.00306 1.00195 1.00122 1.00075 1.00046 1.00028 1.00017 1.00011 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999998 1 1 0.999992 0.999997 0.999997 0.999972 0.999973 0.99996 0.999902 0.999892 0.999886 0.999858 1.00004 1.00051 1.00143 1.00349 1.0073 1.01339 1.02196 1.03083 1.03607 1.03533 1.02916 1.01956 1.00818 0.996632 0.986518 0.978187 0.972776 0.972127 0.975443 0.981231 0.988073 0.992312 0.990364 0.980125 0.96184 0.936809 0.903925 0.861644 0.813904 0.770728 0.739017 0.719486 0.712901 0.721453 0.744911 0.780114 0.823297 0.869713 0.912675 0.946455 0.96944 0.983032 0.988794 0.987846 0.982142 0.975018 0.970159 0.970133 0.97564 0.985636 0.997958 1.01007 1.01978 1.02576 1.02776 1.02645 1.02297 1.01853 1.01407 1.01016 1.00703 1.00441 1.00286 1.00183 1.00115 1.00072 1.00044 1.00027 1.00017 1.0001 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 0.999997 0.999992 0.999996 0.99998 0.999959 0.999962 0.99991 0.999861 0.999879 0.999846 0.999934 1.00038 1.00121 1.00298 1.00649 1.01224 1.02043 1.02948 1.03574 1.03611 1.0306 1.02166 1.011 0.999237 0.988423 0.980336 0.97447 0.971549 0.973699 0.979842 0.986257 0.991003 0.992477 0.987514 0.975446 0.956783 0.930649 0.897365 0.861713 0.830308 0.805917 0.789243 0.782937 0.78969 0.808543 0.836016 0.869078 0.904304 0.936491 0.961159 0.977249 0.98601 0.988607 0.985899 0.979691 0.973072 0.969322 0.970557 0.977117 0.987752 1.00022 1.01204 1.02115 1.02642 1.02777 1.02599 1.02226 1.01776 1.01337 1.00959 1.00661 1.00409 1.00266 1.0017 1.00107 1.00067 1.00042 1.00026 1.00016 1.0001 1.00006 1.00004 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999998 0.999994 0.99999 0.999986 0.99996 0.999948 0.999923 0.999853 0.999848 0.999841 0.999877 1.00022 1.00099 1.00253 1.00562 1.01096 1.01879 1.02789 1.035 1.0367 1.03229 1.02388 1.01368 1.00246 0.991206 0.982257 0.976337 0.972432 0.972301 0.977401 0.984338 0.989929 0.992765 0.991155 0.984032 0.971255 0.953188 0.93038 0.905348 0.882008 0.862903 0.849668 0.844938 0.850502 0.86472 0.884681 0.90862 0.93407 0.956737 0.973249 0.983202 0.987736 0.987629 0.983526 0.977126 0.971278 0.968834 0.971446 0.979096 0.990328 1.00285 1.01424 1.02262 1.02707 1.02771 1.02543 1.02145 1.01691 1.0126 1.00897 1.00615 1.00376 1.00244 1.00156 1.00099 1.00063 1.0004 1.00025 1.00016 1.0001 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999997 1 0.999999 0.999996 0.999998 0.999989 0.999981 0.99997 0.999943 0.999915 0.999868 0.999827 0.999807 0.999853 1.0001 1.00073 1.00211 1.0048 1.00958 1.01696 1.02609 1.03391 1.0369 1.03393 1.02641 1.01647 1.00563 0.9947 0.985076 0.978059 0.973584 0.972347 0.975161 0.981123 0.987862 0.992277 0.992647 0.989374 0.983547 0.974338 0.959772 0.941534 0.924375 0.910763 0.901236 0.897777 0.901672 0.911137 0.924271 0.940524 0.957918 0.972639 0.982244 0.987007 0.988041 0.985807 0.980787 0.974587 0.9698 0.968843 0.97291 0.981636 0.993378 1.00581 1.01662 1.02413 1.02765 1.02752 1.02473 1.02053 1.01597 1.01178 1.00832 1.00567 1.00343 1.00222 1.00143 1.00091 1.00058 1.00037 1.00023 1.00015 1.00009 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 1 1 0.999995 0.999997 0.999994 0.999979 0.999969 0.999955 0.999902 0.999873 0.999837 0.999769 0.999815 1.00002 1.00049 1.00166 1.00404 1.00822 1.01496 1.02399 1.03249 1.03674 1.03526 1.02898 1.0197 1.00893 0.998192 0.988772 0.980648 0.974782 0.972768 0.974123 0.978191 0.984469 0.990646 0.994177 0.994951 0.993726 0.988683 0.978446 0.966451 0.956464 0.948148 0.941339 0.938603 0.940887 0.946362 0.954184 0.964517 0.975452 0.983689 0.987767 0.988517 0.986945 0.983262 0.977861 0.972273 0.968826 0.9695 0.975047 0.98478 0.996894 1.00906 1.01911 1.0256 1.0281 1.02717 1.02389 1.01949 1.01495 1.01091 1.00764 1.00518 1.00309 1.002 1.00129 1.00083 1.00053 1.00034 1.00022 1.00014 1.00009 1.00006 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999996 0.999994 0.999997 0.999981 0.999964 0.999964 0.999907 0.999861 0.99985 0.999761 0.999762 0.999951 1.00031 1.00123 1.00328 1.00692 1.01292 1.02158 1.03061 1.03624 1.03626 1.03132 1.02312 1.01267 1.00191 0.992539 0.984067 0.977111 0.973565 0.973525 0.976255 0.981595 0.988136 0.993385 0.996653 0.997819 0.995366 0.989778 0.984191 0.979406 0.973993 0.969137 0.967468 0.968683 0.971188 0.975293 0.98128 0.987026 0.989992 0.989853 0.987823 0.984633 0.980238 0.975006 0.970425 0.968552 0.970943 0.977934 0.988546 1.00084 1.01253 1.02162 1.02694 1.02836 1.02662 1.02288 1.01833 1.01386 1.01 1.00695 1.00468 1.00275 1.00179 1.00115 1.00074 1.00048 1.00031 1.0002 1.00013 1.00008 1.00005 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 1 0.999998 0.999999 0.999995 0.999994 0.999985 0.999967 0.999959 0.999919 0.999866 0.999843 0.999772 0.999735 0.99987 1.00016 1.00088 1.00256 1.00566 1.01096 1.01895 1.02822 1.03521 1.03688 1.03347 1.02637 1.01662 1.00624 0.996554 0.987663 0.980399 0.975678 0.973608 0.974683 0.979017 0.984598 0.989622 0.994362 0.998255 0.999421 0.998241 0.996565 0.994177 0.990624 0.98781 0.987019 0.987018 0.987223 0.988773 0.99149 0.993094 0.992051 0.989059 0.985443 0.981544 0.977109 0.972542 0.969296 0.96916 0.973283 0.981615 0.992915 1.00515 1.01611 1.02404 1.02807 1.02837 1.02584 1.0217 1.01706 1.01271 1.00907 1.00624 1.00419 1.00243 1.00158 1.00102 1.00066 1.00043 1.00028 1.00018 1.00012 1.00008 1.00005 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999997 0.999998 0.999994 0.999985 0.999975 0.999959 0.999922 0.999883 0.999841 0.999765 0.999743 0.999807 0.999999 1.00062 1.00192 1.00447 1.00907 1.01623 1.02544 1.03348 1.03694 1.03537 1.02941 1.02052 1.01088 1.00115 0.991731 0.984066 0.9786 0.97498 0.974132 0.976502 0.980728 0.986095 0.992435 0.997659 0.999992 1.00081 1.00151 1.00116 0.999608 0.998466 0.997884 0.99677 0.995617 0.99556 0.995732 0.994181 0.990543 0.986151 0.982083 0.978253 0.974322 0.970806 0.969126 0.970805 0.976597 0.986095 0.99783 1.00972 1.01968 1.02625 1.02889 1.02806 1.02481 1.02035 1.0157 1.01152 1.00812 1.00555 1.0037 1.00212 1.00138 1.0009 1.00059 1.00038 1.00025 1.00016 1.00011 1.00007 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999996 0.999998 0.999998 0.999981 0.999979 0.999969 0.999915 0.999898 0.999858 0.999752 0.999755 0.999772 0.999872 1.00039 1.00139 1.00344 1.00724 1.01353 1.02236 1.03102 1.0363 1.03674 1.03221 1.02444 1.01551 1.00601 0.996545 0.988352 0.981904 0.977376 0.975308 0.975622 0.978085 0.982909 0.988758 0.993131 0.995982 0.999014 1.00171 1.00249 1.00214 1.002 1.0014 0.99974 0.998075 0.996988 0.995201 0.991559 0.986733 0.982201 0.978541 0.975328 0.972284 0.970085 0.97011 0.973595 0.980914 0.991329 1.00318 1.0144 1.02309 1.02812 1.02932 1.0274 1.02351 1.01883 1.01425 1.01031 1.00718 1.00487 1.00323 1.00183 1.0012 1.00078 1.00051 1.00034 1.00022 1.00015 1.0001 1.00006 1.00004 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 0.999998 0.999997 0.999998 0.999984 0.99998 0.999975 0.999921 0.999908 0.999868 0.999763 0.99976 0.999742 0.999804 1.00017 1.00095 1.00257 1.00558 1.01096 1.01903 1.02795 1.03486 1.03729 1.03455 1.02827 1.02015 1.01097 1.00173 0.993311 0.986164 0.980837 0.977517 0.975934 0.976541 0.979572 0.983574 0.987413 0.991699 0.996183 0.999017 0.99995 1.00056 1.00104 1.00021 0.998259 0.996412 0.994549 0.991437 0.986873 0.982116 0.978347 0.975597 0.973287 0.97134 0.970605 0.972376 0.977576 0.986202 0.997216 1.00882 1.01901 1.02616 1.02951 1.02927 1.02635 1.02195 1.01717 1.01276 1.00909 1.00627 1.00422 1.00279 1.00156 1.00103 1.00068 1.00045 1.0003 1.0002 1.00013 1.00008 1.00006 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 1 1 0.999997 0.999999 0.999997 0.999986 0.999986 0.999971 0.999935 0.999924 0.999864 0.999794 0.999772 0.999716 0.999761 1.00001 1.00061 1.00182 1.00417 1.00859 1.01559 1.0244 1.03256 1.03689 1.03621 1.03171 1.0247 1.01612 1.00712 0.998698 0.99133 0.985153 0.980238 0.977229 0.976847 0.978418 0.980653 0.983599 0.987527 0.991145 0.993323 0.994825 0.996307 0.996784 0.995619 0.993787 0.992061 0.98975 0.986094 0.981699 0.977919 0.975401 0.973761 0.97247 0.971728 0.972522 0.975996 0.982735 0.992369 1.00359 1.01453 1.02332 1.0287 1.0303 1.02867 1.0249 1.02016 1.01541 1.01124 1.0079 1.00539 1.0036 1.00238 1.00132 1.00087 1.00058 1.00038 1.00026 1.00017 1.00011 1.00007 1.00005 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999997 1 0.999994 0.999987 0.999994 0.999968 0.999943 0.999942 0.999864 0.999819 0.999789 0.999715 0.999724 0.999898 1.00035 1.00122 1.00303 1.00651 1.01226 1.02052 1.0294 1.03545 1.03697 1.03448 1.02892 1.02124 1.01274 1.00449 0.996868 0.98996 0.984311 0.980781 0.979214 0.978548 0.978688 0.980425 0.983284 0.98574 0.987506 0.989273 0.990671 0.990701 0.989573 0.98826 0.98679 0.984369 0.98092 0.977488 0.975123 0.973932 0.97335 0.973069 0.973572 0.975895 0.980961 0.988987 0.999247 1.01022 1.02004 1.02709 1.03052 1.03038 1.02752 1.02308 1.01818 1.01359 1.00974 1.00675 1.00457 1.00304 1.002 1.0011 1.00073 1.00049 1.00033 1.00022 1.00015 1.0001 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999997 1 0.999996 0.999989 0.999996 0.99997 0.999955 0.999945 0.999881 0.999843 0.999798 0.999733 0.999712 0.999817 1.00013 1.00076 1.00216 1.00475 1.00925 1.01653 1.02547 1.03289 1.03665 1.03636 1.03247 1.02602 1.01843 1.0106 1.00282 0.9956 0.989759 0.985439 0.981954 0.979298 0.978497 0.979637 0.981219 0.982296 0.983417 0.984828 0.985625 0.985279 0.984414 0.983541 0.982215 0.979958 0.977259 0.975171 0.974249 0.974203 0.974515 0.97519 0.976933 0.980727 0.987195 0.996164 1.00658 1.01679 1.02503 1.03006 1.03146 1.0297 1.02581 1.02094 1.01606 1.01175 1.00829 1.00568 1.00381 1.00253 1.00167 1.00091 1.00061 1.00041 1.00028 1.00019 1.00013 1.00008 1.00006 1.00004 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 1 0.999997 1 1 0.999995 0.999994 0.999994 0.999974 0.999969 0.999946 0.999898 0.999869 0.999812 0.999745 0.999727 0.999775 0.999954 1.00044 1.0015 1.00336 1.00672 1.01271 1.02099 1.02928 1.03511 1.03707 1.03509 1.03027 1.02393 1.01672 1.0091 1.0019 0.995732 0.990434 0.985893 0.98281 0.981541 0.981131 0.980647 0.980463 0.981116 0.981976 0.982101 0.981566 0.981001 0.980399 0.979225 0.977443 0.975801 0.975072 0.975344 0.976166 0.977226 0.978832 0.981803 0.986951 0.99454 1.00401 1.01403 1.02292 1.02917 1.03198 1.03141 1.02824 1.0236 1.01856 1.01388 1.00996 1.00692 1.00469 1.00313 1.00207 1.00137 1.00074 1.0005 1.00034 1.00023 1.00016 1.00011 1.00007 1.00005 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999996 1 1 0.999993 0.999999 0.999993 0.999976 0.999978 0.999952 0.999912 0.999889 0.999835 0.999763 0.999746 0.999759 0.999838 1.00019 1.00097 1.00231 1.00478 1.00931 1.01635 1.02479 1.0322 1.03635 1.03661 1.03378 1.02883 1.02241 1.01535 1.00858 1.00236 0.996583 0.991631 0.988035 0.985509 0.983383 0.981745 0.981115 0.981236 0.981206 0.980683 0.980119 0.979794 0.979345 0.978422 0.977334 0.976791 0.977173 0.978271 0.979687 0.9814 0.983942 0.988101 0.99441 1.00273 1.01213 1.02114 1.02817 1.03212 1.03267 1.03032 1.02607 1.02101 1.01605 1.01172 1.00826 1.00566 1.0038 1.00253 1.00167 1.00111 1.0006 1.00041 1.00028 1.00019 1.00013 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999995 1 0.999994 0.999981 0.999983 0.999959 0.999928 0.999906 0.999855 0.999792 0.999767 0.999751 0.999785 1.00002 1.00056 1.00154 1.00336 1.0066 1.01205 1.01976 1.02793 1.03404 1.03676 1.03613 1.03276 1.02755 1.02158 1.01546 1.00925 1.0032 0.99799 0.993874 0.990467 0.987572 0.985525 0.984413 0.983662 0.982758 0.981867 0.981357 0.981106 0.980691 0.980056 0.97967 0.980024 0.981164 0.982771 0.984631 0.986985 0.990466 0.995696 1.00284 1.01135 1.02002 1.02737 1.03209 1.03359 1.03203 1.02825 1.02331 1.01818 1.01352 1.00967 1.0067 1.00454 1.00303 1.00201 1.00134 1.00089 1.00048 1.00033 1.00023 1.00016 1.00011 1.00007 1.00005 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 1 0.999998 0.999998 1 0.999992 0.999989 0.999985 0.999962 0.999948 0.99992 0.999871 0.999828 0.999792 0.99975 0.999769 0.999924 1.00026 1.00096 1.0023 1.00459 1.00854 1.01481 1.02268 1.0301 1.03511 1.03685 1.03555 1.03211 1.02738 1.02178 1.01576 1.01006 1.00515 1.00084 0.996863 0.993457 0.990987 0.989244 0.987721 0.986321 0.98534 0.984855 0.984542 0.984141 0.983837 0.984068 0.985057 0.986647 0.988577 0.990859 0.993903 0.998285 1.00434 1.01181 1.01982 1.02703 1.03213 1.03429 1.03342 1.03012 1.02537 1.02017 1.01526 1.01107 1.00777 1.00531 1.00357 1.00237 1.00158 1.00105 1.00071 1.00038 1.00027 1.00018 1.00013 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999998 0.999999 1 0.999993 0.999994 0.999988 0.999968 0.999961 0.999933 0.999891 0.999857 0.999818 0.999771 0.999771 0.999856 1.00007 1.00055 1.00151 1.00313 1.00591 1.01056 1.01724 1.02484 1.03147 1.03559 1.03677 1.03539 1.03205 1.02744 1.02236 1.01741 1.01265 1.00799 1.00368 1.00017 0.997499 0.995265 0.993255 0.991656 0.990658 0.990097 0.989669 0.989338 0.989392 0.990112 0.9915 0.993347 0.99554 0.998283 1.00202 1.00711 1.01353 1.02065 1.02736 1.03242 1.0349 1.03451 1.03164 1.02713 1.02193 1.01686 1.01242 1.00882 1.00609 1.00412 1.00275 1.00183 1.00122 1.00082 1.00056 1.0003 1.00021 1.00015 1.0001 1.00007 1.00005 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 0.999999 0.999999 0.999995 0.999996 0.999988 0.999977 0.999968 0.999944 0.999913 0.999885 0.999839 0.999798 0.99979 0.999822 0.999946 1.00027 1.00093 1.00208 1.00402 1.00731 1.01241 1.01911 1.02622 1.03213 1.03571 1.03667 1.03535 1.03243 1.02858 1.02423 1.01962 1.01511 1.01112 1.00778 1.00489 1.00229 1.00008 0.998466 0.997429 0.996726 0.996211 0.99602 0.996404 0.997464 0.999078 1.0011 1.00357 1.00677 1.01103 1.01641 1.0225 1.02842 1.03308 1.03553 1.03536 1.03279 1.0285 1.02339 1.01824 1.01362 1.00979 1.00683 1.00466 1.00312 1.00208 1.00138 1.00093 1.00063 1.00043 1.00023 1.00017 1.00012 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999998 1 1 0.999998 1 0.999997 0.999998 0.999996 0.99999 0.999984 0.999975 0.999954 0.999932 0.999905 0.999865 0.99983 0.999812 0.999816 0.999884 1.0001 1.00053 1.00132 1.00268 1.00495 1.0086 1.01386 1.02031 1.02686 1.03223 1.03553 1.03657 1.03564 1.0333 1.03003 1.0263 1.02252 1.01895 1.01567 1.01264 1.00996 1.00781 1.00625 1.00514 1.00433 1.00385 1.00387 1.00452 1.00578 1.0075 1.00966 1.01237 1.01587 1.02024 1.02523 1.03015 1.03408 1.03618 1.03597 1.03354 1.02944 1.02444 1.01931 1.0146 1.01062 1.00749 1.00515 1.00347 1.00231 1.00154 1.00103 1.00069 1.00048 1.00033 1.00018 1.00013 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 0.999998 1 0.999997 0.999999 0.999997 0.999992 0.999987 0.999981 0.999964 0.999948 0.999924 0.99989 0.999859 0.999836 0.999826 0.999863 0.999991 1.00027 1.0008 1.00174 1.0033 1.00581 1.00962 1.01481 1.02089 1.02689 1.03178 1.03494 1.03627 1.036 1.03443 1.032 1.02913 1.02614 1.02319 1.02042 1.01799 1.01604 1.01455 1.01341 1.01262 1.01227 1.01249 1.01331 1.01463 1.01637 1.01855 1.0213 1.02468 1.02851 1.03229 1.03528 1.03675 1.03627 1.03384 1.02987 1.02502 1.01998 1.01528 1.01125 1.00801 1.00555 1.00377 1.00252 1.00168 1.00112 1.00075 1.00051 1.00036 1.00025 1.00014 1.0001 1.00007 1.00005 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999998 1 0.999999 0.999998 0.999994 0.999992 0.999984 0.999974 0.999959 0.99994 0.999914 0.999887 0.99986 0.999845 0.999862 0.999936 1.00011 1.00046 1.00109 1.00215 1.00385 1.00649 1.01033 1.01525 1.02079 1.02621 1.03081 1.0341 1.03584 1.03615 1.03536 1.03387 1.03195 1.0298 1.02766 1.02571 1.02407 1.02274 1.02171 1.02105 1.02088 1.02123 1.02206 1.02328 1.02486 1.02684 1.02922 1.03188 1.03445 1.03636 1.03705 1.03614 1.03359 1.02972 1.02505 1.02018 1.0156 1.01161 1.00836 1.00585 1.004 1.00268 1.00179 1.00119 1.0008 1.00054 1.00038 1.00027 1.00019 1.0001 1.00007 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999997 0.999996 0.999994 0.999987 0.99998 0.99997 0.999954 0.999931 0.999912 0.999887 0.99987 0.999872 0.999911 1.00002 1.00024 1.00066 1.00137 1.00251 1.0043 1.00696 1.01061 1.01514 1.02016 1.02509 1.02937 1.03261 1.03472 1.03577 1.03593 1.03538 1.03436 1.03313 1.03189 1.03075 1.02977 1.02902 1.02859 1.02856 1.02891 1.02959 1.03054 1.03174 1.03316 1.0347 1.03609 1.03693 1.03679 1.0354 1.0327 1.02892 1.02448 1.01987 1.0155 1.01166 1.00848 1.00599 1.00413 1.00279 1.00186 1.00123 1.00082 1.00056 1.00038 1.00027 1.00019 1.00014 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 0.999999 1 0.999998 0.999998 0.999995 0.999992 0.999986 0.999976 0.999965 0.999949 0.99993 0.999912 0.999894 0.999889 0.99991 0.999973 1.00011 1.00038 1.00085 1.0016 1.0028 1.0046 1.00716 1.01053 1.01457 1.01898 1.02337 1.02736 1.03065 1.03309 1.03466 1.03549 1.03576 1.03565 1.03531 1.03486 1.0344 1.03405 1.03389 1.03394 1.0342 1.0346 1.03511 1.03569 1.03626 1.03663 1.03653 1.03567 1.03386 1.03106 1.02743 1.0233 1.01904 1.01498 1.01138 1.00837 1.00597 1.00415 1.00282 1.00188 1.00125 1.00083 1.00056 1.00038 1.00027 1.00019 1.00014 1.0001 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 0.999998 1 0.999999 0.999998 0.999998 0.999997 0.999993 0.999991 0.999983 0.999973 0.999962 0.999948 0.999931 0.999917 0.999911 0.999918 0.999953 1.00004 1.00021 1.00051 1.00101 1.0018 1.00299 1.00471 1.00706 1.01006 1.01361 1.01746 1.0213 1.02488 1.02799 1.03052 1.03245 1.03383 1.03475 1.0353 1.03558 1.03571 1.03579 1.03586 1.03595 1.03604 1.03609 1.03609 1.03596 1.03559 1.03482 1.03347 1.03142 1.02864 1.02527 1.02153 1.0177 1.01405 1.01078 1.00801 1.00577 1.00404 1.00276 1.00185 1.00123 1.00081 1.00054 1.00037 1.00026 1.00018 1.00013 1.0001 1.00007 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 1 0.999998 0.999998 0.999995 0.999992 0.999988 0.999982 0.999971 0.999961 0.999948 0.999936 0.999928 0.999932 0.999955 1.00001 1.00012 1.00031 1.00063 1.00114 1.00191 1.00305 1.00465 1.00675 1.00934 1.01232 1.01554 1.01883 1.02197 1.02482 1.02727 1.02929 1.03087 1.03208 1.03295 1.03357 1.03398 1.03423 1.03433 1.03425 1.034 1.03354 1.0328 1.03171 1.03016 1.0281 1.02552 1.02251 1.01925 1.01593 1.01275 1.00988 1.00742 1.0054 1.00382 1.00263 1.00177 1.00117 1.00077 1.00051 1.00034 1.00023 1.00017 1.00012 1.00009 1.00007 1.00005 1.00003 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 0.999998 1 0.999998 1 1 0.999999 0.999999 1 0.999997 0.999997 0.999996 0.99999 0.999986 0.999981 0.999971 0.999962 0.999954 0.999946 0.999945 0.999958 0.999995 1.00006 1.00019 1.00039 1.00072 1.00122 1.00197 1.00301 1.00441 1.0062 1.00836 1.01084 1.0135 1.0162 1.01881 1.02123 1.02339 1.02523 1.02674 1.02793 1.02882 1.02944 1.02978 1.02986 1.02968 1.02922 1.02847 1.02738 1.02593 1.02408 1.02186 1.01933 1.01661 1.01384 1.01119 1.00876 1.00665 1.00489 1.00349 1.00242 1.00163 1.00108 1.0007 1.00046 1.0003 1.0002 1.00014 1.0001 1.00008 1.00006 1.00005 1.00004 1.00002 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1 1 0.999999 1 0.999998 1 1 0.999999 0.999999 1 0.999997 0.999997 0.999994 0.999991 0.999986 0.999981 0.999973 0.999964 0.999962 0.999961 0.999967 0.999989 1.00004 1.00012 1.00025 1.00046 1.00079 1.00126 1.00192 1.00285 1.00405 1.00554 1.00728 1.00924 1.01132 1.01345 1.01553 1.01747 1.01921 1.0207 1.02193 1.02287 1.02352 1.02388 1.02395 1.02371 1.02318 1.02233 1.02117 1.0197 1.01793 1.01594 1.01379 1.01159 1.00946 1.00749 1.00574 1.00427 1.00307 1.00215 1.00145 1.00096 1.00062 1.00039 1.00025 1.00017 1.00011 1.00008 1.00006 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 1 1 1 1 1 1 0.999999 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 0.999998 0.999999 1 0.999997 0.999996 0.999995 0.999989 0.999985 0.999981 0.999977 0.999972 0.99997 0.999978 0.999991 1.00002 1.00008 1.00017 1.0003 1.00051 1.00081 1.00125 1.00183 1.00261 1.00358 1.00476 1.00612 1.00763 1.00922 1.01082 1.01236 1.01379 1.01506 1.01613 1.01696 1.01755 1.01786 1.01791 1.01767 1.01716 1.01638 1.01534 1.01406 1.01259 1.01099 1.00933 1.0077 1.00616 1.00478 1.00359 1.00261 1.00183 1.00124 1.00082 1.00052 1.00032 1.0002 1.00012 1.00008 1.00006 1.00004 1.00004 1.00003 1.00003 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 0.999999 1 0.999999 1 1 0.999999 1 1 0.999999 0.999999 0.999999 0.999997 0.999995 0.999995 0.99999 0.999986 0.999984 0.999981 0.99998 0.999984 0.999996 1.00002 1.00005 1.00011 1.00021 1.00034 1.00054 1.00081 1.00118 1.00167 1.0023 1.00308 1.00399 1.005 1.0061 1.00724 1.00837 1.00944 1.01042 1.01125 1.01191 1.01237 1.01261 1.01263 1.01242 1.01199 1.01135 1.01051 1.00951 1.00839 1.0072 1.00601 1.00487 1.00382 1.0029 1.00212 1.0015 1.00101 1.00066 1.00041 1.00024 1.00014 1.00008 1.00005 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 0.999999 1 1 0.999999 1 1 0.999998 0.999999 0.999999 0.999997 0.999994 0.999995 0.999992 0.999987 0.999988 0.999988 0.999989 0.999999 1.00001 1.00004 1.00008 1.00015 1.00024 1.00036 1.00053 1.00077 1.00109 1.00148 1.00197 1.00255 1.00321 1.00394 1.00471 1.00549 1.00624 1.00692 1.00752 1.00799 1.00832 1.00848 1.00848 1.00831 1.00797 1.00748 1.00685 1.00612 1.00532 1.0045 1.00368 1.00292 1.00224 1.00165 1.00116 1.00078 1.0005 1.0003 1.00017 1.00008 1.00003 1.00001 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 1 1 0.999999 1 1 0.999999 0.999999 1 0.999998 0.999998 0.999999 0.999997 0.999995 0.999994 0.999994 0.99999 0.999992 0.999996 0.999999 1.00001 1.00003 1.00006 1.0001 1.00017 1.00025 1.00037 1.00052 1.00071 1.00096 1.00127 1.00163 1.00205 1.00252 1.00301 1.00351 1.00401 1.00446 1.00485 1.00516 1.00538 1.00548 1.00546 1.00532 1.00507 1.00471 1.00427 1.00376 1.00321 1.00266 1.00213 1.00165 1.00122 1.00086 1.00057 1.00035 1.0002 1.00009 1.00003 0.999993 0.999978 0.999976 0.99998 0.999987 0.999993 0.999998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999999 1 1 0.999999 0.999999 1 0.999999 0.999998 0.999999 0.999997 0.999996 0.999996 0.999997 0.999994 0.999995 1 1.00001 1.00002 1.00005 1.00008 1.00013 1.00018 1.00026 1.00035 1.00048 1.00064 1.00083 1.00105 1.00131 1.00159 1.0019 1.00221 1.00252 1.0028 1.00305 1.00324 1.00336 1.00341 1.00338 1.00327 1.00309 1.00284 1.00253 1.0022 1.00184 1.00148 1.00115 1.00085 1.00059 1.00038 1.00022 1.00011 1.00003 0.999981 0.999958 0.999951 0.999954 0.999962 0.999971 0.99998 0.999988 0.999994 0.999998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 0.999999 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999999 1 0.999999 0.999998 1 1 0.999998 0.999999 0.999998 0.999996 0.999996 0.999998 1 1 1.00001 1.00002 1.00004 1.00006 1.00009 1.00013 1.00019 1.00025 1.00033 1.00043 1.00055 1.00069 1.00084 1.00102 1.0012 1.00139 1.00157 1.00174 1.00188 1.00198 1.00205 1.00206 1.00203 1.00194 1.00181 1.00163 1.00143 1.00121 1.00098 1.00076 1.00056 1.00038 1.00023 1.00012 1.00003 0.999976 0.999944 0.99993 0.999929 0.999935 0.999946 0.999959 0.99997 0.99998 0.999988 0.999993 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 1 1 0.999999 1 1 0.999998 1 1 0.999998 1 1 0.999997 0.999998 1 0.999999 0.999998 1 1 1.00001 1.00002 1.00003 1.00005 1.00007 1.0001 1.00014 1.00018 1.00024 1.0003 1.00038 1.00046 1.00055 1.00066 1.00076 1.00087 1.00097 1.00106 1.00114 1.00119 1.00122 1.00121 1.00117 1.00111 1.00101 1.00089 1.00075 1.00061 1.00047 1.00034 1.00022 1.00012 1.00004 0.999979 0.999941 0.99992 0.999912 0.999915 0.999924 0.999936 0.999949 0.999962 0.999972 0.999981 0.999988 0.999993 0.999996 0.999998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 0.999999 1 1 0.999999 0.999999 1 1 0.999998 1 1 0.999999 1 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.0001 1.00013 1.00017 1.00021 1.00026 1.00031 1.00037 1.00043 1.00049 1.00055 1.00061 1.00065 1.00069 1.00071 1.00071 1.00069 1.00066 1.0006 1.00053 1.00045 1.00037 1.00027 1.00019 1.00011 1.00004 0.999985 0.999945 0.99992 0.999906 0.999903 0.999907 0.999917 0.99993 0.999943 0.999956 0.999968 0.999977 0.999985 0.99999 0.999994 0.999997 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 0.999999 1 1 1 1 1.00001 1.00002 1.00003 1.00004 1.00006 1.00007 1.0001 1.00012 1.00015 1.00018 1.00022 1.00025 1.00029 1.00032 1.00035 1.00038 1.0004 1.00041 1.00042 1.00041 1.00039 1.00036 1.00031 1.00026 1.00021 1.00015 1.00009 1.00004 0.999996 0.999958 0.99993 0.999912 0.999903 0.999903 0.999908 0.999917 0.999929 0.999942 0.999954 0.999964 0.999974 0.999981 0.999987 0.999992 0.999995 0.999997 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 1 0.999999 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00007 1.00009 1.00011 1.00013 1.00015 1.00017 1.0002 1.00022 1.00023 1.00024 1.00025 1.00025 1.00025 1.00023 1.00021 1.00019 1.00016 1.00012 1.00008 1.00004 1.00001 0.999974 0.999948 0.999929 0.999917 0.999911 0.99991 0.999914 0.999922 0.999932 0.999943 0.999954 0.999964 0.999973 0.99998 0.999986 0.999991 0.999994 0.999996 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1 1 1 0.999999 0.999999 1 1 0.999998 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00006 1.00008 1.00009 1.00011 1.00012 1.00013 1.00014 1.00015 1.00016 1.00016 1.00015 1.00015 1.00013 1.00012 1.0001 1.00007 1.00004 1.00002 0.999996 0.999974 0.999955 0.99994 0.999929 0.999923 0.999923 0.999926 0.999933 0.999941 0.999949 0.999958 0.999966 0.999974 0.99998 0.999985 0.99999 0.999993 0.999995 0.999997 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 0.999999 1 1 0.999998 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00004 1.00005 1.00006 1.00007 1.00008 1.00009 1.00009 1.0001 1.0001 1.0001 1.00009 1.00009 1.00008 1.00006 1.00005 1.00003 1.00001 0.999997 0.99998 0.999965 0.999954 0.999947 0.999943 0.999942 0.999943 0.999946 0.99995 0.999956 0.999963 0.99997 0.999976 0.999982 0.999987 0.999991 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00003 1.00003 1.00004 1.00004 1.00005 1.00005 1.00006 1.00006 1.00006 1.00006 1.00006 1.00005 1.00004 1.00004 1.00003 1.00001 1 0.999993 0.999984 0.999976 0.999969 0.999964 0.999961 0.999961 0.999963 0.999966 0.99997 0.999974 0.999978 0.999982 0.999986 0.999989 0.999991 0.999994 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00001 1.00001 1 0.999994 0.99999 0.999987 0.999985 0.999984 0.999983 0.999983 0.999984 0.999985 0.999987 0.99999 0.999992 0.999994 0.999995 0.999997 0.999998 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 0.999999 1 1 0.999999 1 1 1 1 0.999999 1 1 0.999999 1 1 1 0.999999 0.999999 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 0.999999 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999997 0.999997 0.999996 0.999995 0.999993 0.99999 0.999989 0.999987 0.999986 0.999985 0.999986 0.999987 0.999989 0.999992 0.999997 1 1.00001 1.00001 1.00002 1.00002 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 0.999999 1 1 0.999999 1 1 1 0.999999 0.999997 0.999997 0.999995 0.999992 0.999988 0.999985 0.999982 0.999978 0.999974 0.999971 0.999969 0.99997 0.999972 0.999976 0.999982 0.999989 0.999998 1.00001 1.00002 1.00003 1.00004 1.00005 1.00006 1.00006 1.00007 1.00007 1.00007 1.00007 1.00007 1.00006 1.00006 1.00005 1.00004 1.00004 1.00003 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 0.999999 0.999998 0.999997 0.999994 0.99999 0.999987 0.999983 0.999978 0.999971 0.999966 0.999961 0.999957 0.999956 0.999958 0.999961 0.999969 0.99998 0.999993 1.00001 1.00002 1.00004 1.00006 1.00008 1.00009 1.0001 1.00011 1.00012 1.00012 1.00012 1.00011 1.00011 1.0001 1.00009 1.00008 1.00007 1.00006 1.00005 1.00004 1.00003 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999995 0.999992 0.999988 0.999982 0.999975 0.999967 0.99996 0.999954 0.999948 0.999946 0.999946 0.999951 0.99996 0.999974 0.999991 1.00001 1.00004 1.00007 1.00009 1.00012 1.00014 1.00016 1.00017 1.00018 1.00019 1.00019 1.00019 1.00018 1.00017 1.00016 1.00014 1.00012 1.00011 1.00009 1.00008 1.00006 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999996 0.999994 0.999989 0.999983 0.999975 0.999967 0.999958 0.99995 0.999943 0.999938 0.999939 0.999944 0.999956 0.999975 1 1.00003 1.00007 1.00011 1.00015 1.00018 1.00022 1.00025 1.00028 1.00029 1.0003 1.00031 1.0003 1.00029 1.00028 1.00026 1.00023 1.00021 1.00018 1.00016 1.00013 1.00011 1.00009 1.00007 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999995 0.999991 0.999985 0.999978 0.999969 0.999959 0.999949 0.99994 0.999935 0.999935 0.999943 0.999959 0.999985 1.00002 1.00006 1.00012 1.00017 1.00023 1.00029 1.00035 1.0004 1.00044 1.00047 1.00049 1.0005 1.00049 1.00048 1.00046 1.00043 1.00039 1.00035 1.00031 1.00027 1.00023 1.00019 1.00016 1.00013 1.0001 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999994 0.999989 0.999982 0.999973 0.999962 0.99995 0.999941 0.999936 0.999937 0.999947 0.999969 1 1.00005 1.00012 1.00019 1.00028 1.00037 1.00046 1.00055 1.00063 1.0007 1.00075 1.00079 1.00081 1.00081 1.00079 1.00076 1.00071 1.00065 1.00059 1.00053 1.00046 1.00039 1.00033 1.00028 1.00022 1.00018 1.00014 1.00011 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999994 0.999987 0.999978 0.999967 0.999956 0.999947 0.999941 0.999943 0.999956 0.999985 1.00003 1.0001 1.00019 1.0003 1.00042 1.00056 1.0007 1.00084 1.00097 1.00109 1.00118 1.00125 1.0013 1.00131 1.00129 1.00125 1.00119 1.0011 1.00101 1.0009 1.00079 1.00068 1.00058 1.00048 1.0004 1.00032 1.00025 1.00019 1.00015 1.00011 1.00008 1.00005 1.00004 1.00002 1.00001 1.00001 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999994 0.999986 0.999976 0.999965 0.999955 0.999949 0.999953 0.99997 1.00001 1.00007 1.00016 1.00028 1.00043 1.00061 1.00081 1.00102 1.00123 1.00144 1.00163 1.0018 1.00193 1.00202 1.00207 1.00208 1.00204 1.00196 1.00184 1.0017 1.00154 1.00137 1.00119 1.00102 1.00086 1.00071 1.00058 1.00046 1.00036 1.00027 1.00021 1.00015 1.00011 1.00007 1.00005 1.00003 1.00002 1.00001 1 1 0.999999 0.999999 0.999999 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1 1 0.999995 0.999986 0.999976 0.999967 0.999962 0.999967 0.999989 1.00004 1.00011 1.00023 1.00039 1.00059 1.00084 1.00112 1.00142 1.00174 1.00206 1.00237 1.00264 1.00288 1.00306 1.00317 1.00323 1.00322 1.00314 1.00301 1.00282 1.00259 1.00234 1.00207 1.0018 1.00153 1.00128 1.00105 1.00084 1.00067 1.00052 1.00039 1.00029 1.00021 1.00015 1.0001 1.00006 1.00004 1.00002 1.00001 1 1 0.999999 0.999998 0.999998 0.999997 0.999997 0.999998 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1 0.999998 0.999989 0.999981 0.999977 0.999984 1.00001 1.00007 1.00016 1.00031 1.00051 1.00078 1.0011 1.00149 1.00192 1.00237 1.00284 1.00331 1.00374 1.00412 1.00444 1.00468 1.00484 1.0049 1.00486 1.00474 1.00453 1.00424 1.0039 1.00351 1.0031 1.00269 1.00228 1.0019 1.00155 1.00124 1.00097 1.00075 1.00056 1.00041 1.0003 1.00021 1.00014 1.00009 1.00005 1.00003 1.00001 1.00001 1 0.999997 0.999996 0.999996 0.999995 0.999996 0.999997 0.999998 0.999999 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00001 1.00001 1 0.999998 0.999995 1 1.00003 1.0001 1.00021 1.00038 1.00063 1.00097 1.00139 1.0019 1.00248 1.00311 1.00378 1.00445 1.00509 1.00569 1.00621 1.00664 1.00695 1.00715 1.00721 1.00715 1.00696 1.00666 1.00625 1.00575 1.00519 1.00459 1.00398 1.00338 1.00281 1.00229 1.00182 1.00143 1.00109 1.00081 1.00059 1.00042 1.00029 1.00019 1.00012 1.00007 1.00004 1.00002 1.00001 0.999998 0.999995 0.999994 0.999994 0.999992 0.999994 0.999995 0.999997 0.999998 0.999999 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00006 1.00013 1.00025 1.00045 1.00075 1.00116 1.00169 1.00233 1.00309 1.00393 1.00484 1.00577 1.00669 1.00756 1.00835 1.00903 1.00958 1.00998 1.01022 1.01029 1.01019 1.00993 1.00952 1.00896 1.00828 1.00751 1.00667 1.00581 1.00495 1.00412 1.00336 1.00268 1.00209 1.00159 1.00119 1.00086 1.00061 1.00042 1.00028 1.00018 1.0001 1.00006 1.00003 1.00001 0.999997 0.999992 0.999991 0.999991 0.999989 0.999991 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00005 1.00008 1.00015 1.00029 1.00051 1.00085 1.00133 1.00196 1.00276 1.00372 1.0048 1.00599 1.00723 1.00847 1.00968 1.01081 1.01181 1.01265 1.01333 1.01381 1.01408 1.01416 1.01403 1.0137 1.01317 1.01246 1.01159 1.01058 1.00947 1.0083 1.00711 1.00596 1.00488 1.0039 1.00305 1.00233 1.00174 1.00126 1.00089 1.00061 1.0004 1.00025 1.00015 1.00008 1.00004 1.00001 0.999996 0.999989 0.999987 0.999987 ) ; boundaryField { emptyPatches_empt { type empty; } top_cyc { type cyclic; } bottom_cyc { type cyclic; } inlet_cyc { type cyclic; } outlet_cyc { type cyclic; } } // ************************************************************************* //
[ "tdg@debian" ]
tdg@debian
eb3f5ff7f0e0fea98a39a59d1d32977cb6f54988
257592e3ab692064e4545d30c58bed7cda59e8ad
/FunctionGenerator/pci.cpp
7d81263aab3d08b456da218dc0c74e6a507d8a37
[]
no_license
CheMingLee/PMC6_DLL_FunctionGenerator
8e5ac8ae6220ca8dbd7d574711aa570f5b846eb6
66c725f2e73cd85b8324e3908c9a865746ae86e6
refs/heads/master
2023-02-24T21:43:50.027263
2021-01-28T10:54:36
2021-01-28T10:54:36
329,289,703
0
0
null
null
null
null
BIG5
C++
false
false
14,155
cpp
// pci.cpp : 定義 PCI通訊功能 #include "stdafx.h" #include <stdio.h> #include "pci.h" #include "Dev_PMC6.h" #include <setupapi.h> #include <winioctl.h> #include "ctrlcard.h" //#define _MEGSHOW #define KER_RW //Bill_20100202 reply status #define PCI_NO_DATA 0 #define PCI_READ_END 1 #define PCI_RETRY 2 #define _NOCARD #define PCI_READ_OFFSET 128 #define PCI_WRITE_OFFSET 0 extern CDev_PMC6 g_DevPMC6; unsigned long g_lErr; HDC hDC; extern long g_PMC6_Auth[MAX_ID]; void PCI_ShowErrCode(BYTE byErrCode,BYTE bReturnCode) { char szT[256]; #ifndef _DEBUG return; #endif g_lErr++; hDC = ::GetDC(NULL); if (byErrCode == 0) { sprintf_s(szT, "<<%ld >>" , g_lErr); } else { sprintf_s(szT, "<<Retry = %ld, %ld>>" , byErrCode,bReturnCode); } ::TextOut(hDC, 0,0, szT, (int)strlen(szT)); ::ReleaseDC(NULL, hDC); //MessageBox(NULL,szT,0,0); } // PCI control base function //============================================================ //Bill_20100709 BOOL PCI_TransmitBlock(BYTE *WBuf,ULONG WSize,BYTE *RBuf,ULONG RBSize,ULONG *RSize,ULONG BackData) { BYTE TBuf[256]; DWORD IoctlCode = IOCTL_GPD_TRANSMITBLOCK; #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard]; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard]; #endif #ifdef _NOCARD if(g_DevPMC6.m_hHandle[g_DevPMC6.m_dwSelectCard] == NULL) { return FALSE; } #endif if(WSize > (248)) return FALSE; #ifndef PMC6_WIN64 *(PULONG)TBuf = addr; *(PULONG)(TBuf + 4) = BackData; *(PULONG)(TBuf + 8) = WSize; memcpy(TBuf + 12,WBuf,WSize); return g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read TBuf, // Buffer to driver. WSize + 12, // Length of buffer in bytes. RBuf, // Buffer from driver. RBSize, // Length of buffer in bytes. RSize, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); #else *(PUINT64)TBuf = addr; *(PULONG)(TBuf + 8) = BackData; *(PULONG)(TBuf + 12) = WSize; memcpy(TBuf + 16,WBuf,WSize); return g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read TBuf, // Buffer to driver. WSize + 16, // Length of buffer in bytes. RBuf, // Buffer from driver. RBSize, // Length of buffer in bytes. RSize, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); #endif } DWORD PCI_GetStReg() { BYTE buf[4]; DWORD Databuf; DWORD DataLength; DWORD ReturnedLength; DWORD IoctlCode = IOCTL_GPD_READ_MEMORY_ULONG; #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard]; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard]; #endif DataLength = 4; g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read &addr, // Buffer to driver. sizeof(addr), // Length of buffer in bytes. buf, // Buffer from driver. DataLength, // Length of buffer in bytes. &ReturnedLength, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); //emission_20100109_改善效能問題 BYTE* pbyData = (BYTE*)(&Databuf); pbyData[0] = buf[0]; pbyData[1] = buf[1]; pbyData[2] = buf[2]; pbyData[3] = buf[3]; /* memcpy(((BYTE *)&sDatabuf) ,&buf[1],1); memcpy(((BYTE *)&sDatabuf + 1),&buf[0],1); */ //emission_20100109_改善效能問題 return Databuf; } BOOL PCI_SetStReg(WORD bit,WORD On) { BYTE *buf; BYTE data_buf[12]; DWORD StReg; DWORD mask = 1 << bit; DWORD DataLength; DWORD ReturnedLength; DWORD IoctlCode = IOCTL_GPD_WRITE_MEMORY_ULONG; #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard]; //emission_20100109_改善效能問題 BYTE* pbyData = (BYTE*)(&addr); data_buf[0] = pbyData[0]; data_buf[1] = pbyData[1]; data_buf[2] = pbyData[2]; data_buf[3] = pbyData[3]; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard]; //emission_20100109_改善效能問題 BYTE* pbyData = (BYTE*)(&addr); data_buf[0] = pbyData[0]; data_buf[1] = pbyData[1]; data_buf[2] = pbyData[2]; data_buf[3] = pbyData[3]; data_buf[4] = pbyData[4]; data_buf[5] = pbyData[5]; data_buf[6] = pbyData[6]; data_buf[7] = pbyData[7]; #endif StReg = PCI_GetStReg(); if(On) StReg = StReg | mask; else { mask = ~mask; StReg = StReg & mask; } buf = (BYTE *)&StReg; #ifndef PMC6_WIN64 data_buf[4] = buf[0]; data_buf[5] = buf[1]; data_buf[6] = buf[2]; data_buf[7] = buf[3]; DataLength = 8; #else data_buf[8] = buf[0]; data_buf[9] = buf[1]; data_buf[10] = buf[2]; data_buf[11] = buf[3]; DataLength = 12; #endif /* memcpy(data_buf,&addr,4); sStReg = PCI_GetStReg(); if(On) sStReg = sStReg | mask; else { mask = !mask; sStReg = sStReg & mask; } memcpy(&data_buf[4],&buf[1],1); memcpy(&data_buf[5],&buf[0],1); */ //emission_20100109_改善效能問題 return g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read data_buf, // Buffer to driver. DataLength, // Length of buffer in bytes. NULL, // Buffer from driver. 0, // Length of buffer in bytes. &ReturnedLength, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); } BOOL PCI_SetDataSize(WORD sDSize) { BYTE *buf; BYTE data_buf[6]; DWORD DataLength; DWORD ReturnedLength; DWORD IoctlCode = IOCTL_GPD_WRITE_MEMORY_USHORT; #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 2; memcpy(data_buf,&addr,4); buf = (BYTE *)&sDSize; //emission_20100109_改善效能問題 data_buf[4] = buf[1]; data_buf[5] = buf[0]; // memcpy(&data_buf[4],&buf[1],1); // memcpy(&data_buf[5],&buf[0],1); //emission_20100109_改善效能問題 DataLength = 6; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 2; memcpy(data_buf,&addr,8); buf = (BYTE *)&sDSize; data_buf[8] = buf[1]; data_buf[9] = buf[0]; DataLength = 10; #endif return g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read data_buf, // Buffer to driver. DataLength, // Length of buffer in bytes. NULL, // Buffer from driver. 0, // Length of buffer in bytes. &ReturnedLength, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); } WORD PCI_GetDataSize() { BYTE buf[2]; WORD sDatabuf; DWORD DataLength; DWORD ReturnedLength; DWORD IoctlCode = IOCTL_GPD_READ_MEMORY_USHORT; #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 2; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 2; #endif DataLength = 2; g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read &addr, // Buffer to driver. sizeof(addr), // Length of buffer in bytes. buf, // Buffer from driver. DataLength, // Length of buffer in bytes. &ReturnedLength, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); //emission_20100109_改善效能問題 BYTE* pbyData = (BYTE*)(&sDatabuf); *pbyData = buf[1]; pbyData = (BYTE*)(&sDatabuf)+1; *pbyData = buf[0]; //memcpy(((BYTE *)&sDatabuf) ,&buf[1],1); //memcpy(((BYTE *)&sDatabuf + 1),&buf[0],1); //emission_20100109_改善效能問題 return sDatabuf; } BOOL PCI_Write(BYTE* data_buf,WORD data_count) { BYTE copy_buf[8]; DWORD DataLength; DWORD ReturnedLength; BOOL IoctlResult; DWORD IoctlCode; #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 4; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 4; #endif WORD PCI_StReg; WORD data_count4; //data 4 倍數 WORD data_remain; // 非4倍數的剩餘資料 //wait write tag low #ifdef _NOCARD if(g_DevPMC6.m_hHandle[g_DevPMC6.m_dwSelectCard] == NULL) { return 0; } #endif while((PCI_GetStReg() & 0x0001) == 0x0001) { } if(data_count > 4096) return 0; PCI_SetDataSize(data_count); data_count4 = data_count / 4; data_remain = data_count % 4; IoctlCode = IOCTL_GPD_WRITE_MEMORY_ULONG; //4 for(int i = 0 ; i< data_count4 ; i++) { #ifndef PMC6_WIN64 memcpy(copy_buf,&addr,4); memcpy(copy_buf + 4,data_buf + (i * 4),4); DataLength =8; addr+= 4; IoctlResult = g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read copy_buf, // Buffer to driver. DataLength, // Length of buffer in bytes. NULL, // Buffer from driver. 0, // Length of buffer in bytes. &ReturnedLength, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); #else memcpy(copy_buf,&addr,8); memcpy(copy_buf + 8,data_buf + (i * 4),4); DataLength =12; addr+= 4; IoctlResult = g_DevPMC6.Dev_DeviceIo( IoctlCode, // IO Control code for Read copy_buf, // Buffer to driver. DataLength, // Length of buffer in bytes. NULL, // Buffer from driver. 0, // Length of buffer in bytes. &ReturnedLength, // Bytes placed in DataBuffer. NULL // NULL means wait till op. completes. ); #endif if(!IoctlResult) return IoctlResult; } if(data_remain > 0) { IoctlCode = IOCTL_GPD_WRITE_MEMORY_UCHAR; //1 for(int i = 0 ; i< data_remain ; i++) { #ifndef PMC6_WIN64 memcpy(copy_buf,&addr,4); memcpy(copy_buf + 4,data_buf + (i + data_count4 * 4),1); DataLength =5; addr++; IoctlResult = g_DevPMC6.Dev_DeviceIo(IoctlCode,copy_buf,DataLength,NULL,0,&ReturnedLength,NULL); #else memcpy(copy_buf,&addr,8); memcpy(copy_buf + 8,data_buf + (i + data_count4 * 4),1); DataLength =9; addr++; IoctlResult = g_DevPMC6.Dev_DeviceIo(IoctlCode,copy_buf,DataLength,NULL,0,&ReturnedLength,NULL); #endif if(!IoctlResult) return IoctlResult; } } PCI_StReg = 0x0001; PCI_SetStReg(0,1); return 1; } WORD PCI_Read(BYTE* data_buf,DWORD data_count) { //Bill_20201216 多卡上限調整修改 static int iVarInit = 0; static WORD index[MAX_ID] = {0,0,0,0}; WORD dsize,i; BYTE bybuf[4]; DWORD ReturnedLength; DWORD IoctlCode; //Bill_20201216 多卡上限調整修改 if(!iVarInit) { iVarInit = 1; for(i = 0;i < MAX_ID;i++) index[i] = 0; } #ifndef PMC6_WIN64 DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 4 + index[g_DevPMC6.m_dwSelectCard]; #else UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 4 + index[g_DevPMC6.m_dwSelectCard]; #endif WORD data_count4; WORD data_remain; #ifdef _NOCARD if(g_DevPMC6.m_hHandle[g_DevPMC6.m_dwSelectCard] == NULL) { return 1; } #endif //wait write tag low if((PCI_GetStReg() & 0x0002) == 0x0002) { dsize = PCI_GetDataSize(); if((index[g_DevPMC6.m_dwSelectCard] + data_count) > dsize) data_count = dsize - index[g_DevPMC6.m_dwSelectCard]; index[g_DevPMC6.m_dwSelectCard] += (WORD)data_count; data_count4 = (WORD)data_count / 4; data_remain = (WORD)data_count % 4; i = 0; while(i < data_count) { if(addr % 4 != 0) { IoctlCode = IOCTL_GPD_READ_MEMORY_UCHAR; g_DevPMC6.Dev_DeviceIo(IoctlCode,&addr,sizeof(addr),bybuf,1,&ReturnedLength,NULL); *(data_buf + i) = bybuf[0]; addr ++; i++; } else { if((DWORD)(i + 4) <= data_count) { IoctlCode = IOCTL_GPD_READ_MEMORY_ULONG; g_DevPMC6.Dev_DeviceIo(IoctlCode,&addr,sizeof(addr),bybuf,4,&ReturnedLength,NULL); memcpy(data_buf + i,bybuf,4); addr += 4; i += 4; } else { IoctlCode = IOCTL_GPD_READ_MEMORY_UCHAR; g_DevPMC6.Dev_DeviceIo(IoctlCode,&addr,sizeof(addr),bybuf,1,&ReturnedLength,NULL); *(data_buf + i) = bybuf[0]; addr ++; i++; } } } if(index[g_DevPMC6.m_dwSelectCard] >= dsize) { index[g_DevPMC6.m_dwSelectCard] = 0; PCI_SetStReg(1,0); } } else return 0; return 1; } //============================================================ //判斷是否需要回應 BOOL PCI_CheckReplay(unsigned short usCmd) { BOOL bReBack; bReBack = FALSE; if (usCmd == CMD_SETLED || usCmd == CMD_GETLED || usCmd == CMD_GETDIGITAL || usCmd == CMD_GETANALOG || usCmd == CMD_GETRUNTIME) { bReBack = TRUE; } return bReBack; } BOOL PCI_Write_Datas(unsigned short usCmd, char *pData, unsigned short usSize) { BOOL bRet = TRUE; BYTE szExt[256]; BYTE ReadBuf[256]; ULONG ReturnLen; ULONG ReBack = PCI_CheckReplay(usCmd); BOOL Ret = PCI_READ_END; memcpy(szExt, &usCmd, 2); memcpy(szExt + 2, &usSize, 2); if(usSize > 0 && usSize <= 252) { memcpy(szExt + 4, pData, usSize); } do { if(!PCI_TransmitBlock(szExt, 4 + usSize, ReadBuf, sizeof(ReadBuf), &ReturnLen, ReBack)) { bRet = FALSE; break; } if(ReBack) { if(ReturnLen < 4) Ret = PCI_RETRY; else { unsigned short FbCmd; memcpy(&FbCmd, ReadBuf, 2); if(FbCmd != usCmd) Ret = PCI_RETRY; else { unsigned short FbSize; memcpy(&FbSize, ReadBuf + 2, 2); memset(&g_DevPMC6.m_ReadBuffer[g_DevPMC6.m_dwSelectCard][0], 0, 256); memcpy(&g_DevPMC6.m_ReadBuffer[g_DevPMC6.m_dwSelectCard][0], ReadBuf + 4, FbSize); Ret = PCI_READ_END; } } } }while(Ret == PCI_RETRY); return bRet; }
[ "jmli1993@gmail.com" ]
jmli1993@gmail.com
0a9981ca96dbd52af16f11ab04f14f72ef7aab16
72f92da77af907d49db9a6e1d82b78ec683e60ce
/practices/cpp/level1/√ p05_Canvas/Circ.cpp
102bbb7b9195cb9e827986f55fa3338c4ddce5df
[]
no_license
ldzhangyx/CCpp2016
f0f9f52e15c7b871719ddb7ad9502bf92641aa16
42ea8150ced35100fc2bf65afb420b1167002e66
refs/heads/master
2021-01-15T21:15:05.952470
2016-06-24T09:17:45
2016-06-24T09:17:45
52,485,652
0
0
null
2016-02-25T00:53:20
2016-02-25T00:53:20
null
UTF-8
C++
false
false
67
cpp
// // Created by Administrator on 2016/6/13. // #include "Circ.h"
[ "ldzhangyx@outlook.com" ]
ldzhangyx@outlook.com
f8417f64cdc4d8fe7b31c5fe1bf7e04498e17f40
e08bcb770a05655d1bd803b8fca9defc6698188a
/examples/postfix/composite_operation.hh
c7640bd3f90f81081e11fca2c7a943b2485ab200
[]
no_license
elsys/oop-2016-2017
f006c9e717d83b6efa152d89b7f61be8ec4a4740
cadc4f2b55adb68655f0fb568ccc0e9b156c426c
refs/heads/master
2021-01-11T03:10:12.609194
2018-05-31T05:53:57
2018-05-31T05:53:57
70,146,655
13
21
null
2017-04-04T11:47:17
2016-10-06T11:12:08
PostScript
UTF-8
C++
false
false
373
hh
#ifndef COMPOSITE_OPERATION_HH__ #define COMPOSITE_OPERATION_HH__ #include <list> #include "operation.hh" class CompositeOperation: public Operation { std::list<Operation*> operations_; public: CompositeOperation(const std::string& name); ~CompositeOperation(); void add_operation(Operation* op); void execute(Context& context) const; }; #endif
[ "lubomir.chorbadjiev@gmail.com" ]
lubomir.chorbadjiev@gmail.com
bbbc20eed67ded3fb4d1ae1cda5ffd5e002e824f
d6b4bdf418ae6ab89b721a79f198de812311c783
/intlpartnersmgt/src/v20220928/model/DescribeCustomerInfoResponse.cpp
a572e0dadae77d3da879c2e8e53c5b9b0cb018e4
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp-intl-en
d0781d461e84eb81775c2145bacae13084561c15
d403a6b1cf3456322bbdfb462b63e77b1e71f3dc
refs/heads/master
2023-08-21T12:29:54.125071
2023-08-21T01:12:39
2023-08-21T01:12:39
277,769,407
2
0
null
null
null
null
UTF-8
C++
false
false
4,570
cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <tencentcloud/intlpartnersmgt/v20220928/model/DescribeCustomerInfoResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Intlpartnersmgt::V20220928::Model; using namespace std; DescribeCustomerInfoResponse::DescribeCustomerInfoResponse() : m_dataHasBeenSet(false) { } CoreInternalOutcome DescribeCustomerInfoResponse::Deserialize(const string &payload) { rapidjson::Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Core::Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Core::Error("response `Response` is null or not object")); } rapidjson::Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Core::Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Core::Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Core::Error(errorCode, errorMsg).SetRequestId(requestId)); } if (rsp.HasMember("Data") && !rsp["Data"].IsNull()) { if (!rsp["Data"].IsArray()) return CoreInternalOutcome(Core::Error("response `Data` is not array type")); const rapidjson::Value &tmpValue = rsp["Data"]; for (rapidjson::Value::ConstValueIterator itr = tmpValue.Begin(); itr != tmpValue.End(); ++itr) { DescribeCustomerInfoData item; CoreInternalOutcome outcome = item.Deserialize(*itr); if (!outcome.IsSuccess()) { outcome.GetError().SetRequestId(requestId); return outcome; } m_data.push_back(item); } m_dataHasBeenSet = true; } return CoreInternalOutcome(true); } string DescribeCustomerInfoResponse::ToJsonString() const { rapidjson::Document value; value.SetObject(); rapidjson::Document::AllocatorType& allocator = value.GetAllocator(); if (m_dataHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Data"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); int i=0; for (auto itr = m_data.begin(); itr != m_data.end(); ++itr, ++i) { value[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator); (*itr).ToJsonObject(value[key.c_str()][i], allocator); } } rapidjson::Value iKey(rapidjson::kStringType); string key = "RequestId"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value().SetString(GetRequestId().c_str(), allocator), allocator); rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); value.Accept(writer); return buffer.GetString(); } vector<DescribeCustomerInfoData> DescribeCustomerInfoResponse::GetData() const { return m_data; } bool DescribeCustomerInfoResponse::DataHasBeenSet() const { return m_dataHasBeenSet; }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
a68d4cf6a617f0de643a9cf6559ba876ca66babe
078544d216185416a840399172f07ccd1caad07f
/friendtrackerUI/src/RegistrationHandler.cpp
0185281918ebc320e713d3ce501b766956091ad4
[]
no_license
sukwon0709/friendtrackerUI
23bec4ee5e885e5a6829c26dc02155ae1707ff41
14d64d60288b53584b968e018e2e979f6732a2a8
refs/heads/master
2021-01-10T19:45:06.595769
2013-04-03T00:41:29
2013-04-03T00:41:29
8,827,293
0
1
null
null
null
null
UTF-8
C++
false
false
7,803
cpp
/** * Connect to BBM * * by Sukwon Oh */ #include "RegistrationHandler.hpp" #include <bb/cascades/AbstractPane> #include <bb/cascades/Application> #include <bb/cascades/QmlDocument> #include <bb/system/SystemDialog> #include <bb/platform/bbm/Context> #include <bb/platform/bbm/RegistrationState> #include "LoginMessage.h" #include "ServerInterface.h" #include <QList> #include <iostream> using namespace std; using namespace bb::cascades; using namespace bb::platform::bbm; using namespace bb::system; RegistrationHandler::RegistrationHandler(const QUuid &uuid, QObject *parent) : QObject(parent) , m_context(uuid) , m_isAllowed(false) , m_progress(BbmRegistrationProgress::NotStarted) , m_temporaryError(false) , m_statusMessage(tr("Please wait while the application connects to BBM.")) { QmlDocument* qml = QmlDocument::create("asset:///registration.qml") .parent(this); qml->setContextProperty("_registrationHandler", this); AbstractPane *root = qml->createRootObject<AbstractPane>(); Application::instance()->setScene(root); if (uuid.isNull()) { SystemDialog *uuidDialog = new SystemDialog("OK"); uuidDialog->setTitle("UUID Error"); uuidDialog->setBody("Invalid/Empty UUID, please set correctly in main.cpp"); connect(uuidDialog, SIGNAL(finished(bb::system::SystemUiResult::Type)), this, SLOT(dialogFinished(bb::system::SystemUiResult::Type))); uuidDialog->show(); return; } connect(&m_context, SIGNAL(registrationStateUpdated( bb::platform::bbm::RegistrationState::Type)), this, SLOT(processRegistrationStatus( bb::platform::bbm::RegistrationState::Type))); } void RegistrationHandler::registerApplication() { m_progress = BbmRegistrationProgress::Started; processRegistrationStatus(m_context.registrationState()); } void RegistrationHandler::processRegistrationStatus(const RegistrationState::Type state) { // Based on the state, decide whether we need to register. If we already // registered successfully once (i.e. on a previous application run), then // we will not call requestRegisterApplication() again. qDebug() << "Received a BBM Social Platform registration access state=" << state; switch(m_progress) { case BbmRegistrationProgress::Pending: if (state != RegistrationState::Pending) { registrationFinished(); return; } // Otherwise, ignore since registration is still in progress. break; case BbmRegistrationProgress::Started: if (m_context.isAccessAllowed()) { // Access is allowed, the application is registered. registrationFinished(); return; } if (m_context.registrationState() == RegistrationState::Unknown) { // Status is not yet known. Wait for an event that will deliver the // status. qDebug() << "BBM Social Platform access state is UNKNOWN; waiting " "for the initial status"; return; } // Start registration. if (m_context.requestRegisterApplication()) { // Registration started. The user will see a dialog informing them // that your application is connecting to BBM. m_progress = BbmRegistrationProgress::Pending; qDebug() << "BBM Social Platform registration started"; qDebug() << "Verify you are using a valid UUID"; return; } // Could not start registration. No dialogs were shown. qDebug() << "BBM Social Platform registration could not be started"; registrationFinished(); break; case BbmRegistrationProgress::Finished: if (m_context.isAccessAllowed() != m_isAllowed) { // Access to the BBM Social Platform has changed. registrationFinished(); } break; default: qDebug() << "Ignoring BBM Social Platform access state=" << state << "when progress=" << m_progress; break; } } void RegistrationHandler::registrationFinished() { // Finish registration and use the state to decide which message to show // the user. m_progress = BbmRegistrationProgress::Finished; switch (m_context.registrationState()) { case RegistrationState::Allowed: m_statusMessage = tr("Application connected to BBM. Press Continue."); m_temporaryError = false; finishRegistration(); break; // This error code is not yet available in the NDK. // case RegistrationState::BbmDisabled: // m_statusMessage = tr("Cannot connect to BBM. BBM is not setup. " // "Open BBM to set it up and try again."); // m_temporaryError = false; // break; case RegistrationState::BlockedByRIM: m_statusMessage = tr("Disconnected by RIM. RIM is preventing this " "application from connecting to BBM."); m_temporaryError = false; break; case RegistrationState::BlockedByUser: m_statusMessage = tr("Disconnected. Go to Settings -> Security and " "Privacy -> Application Permissions and " "connect this application to BBM."); m_temporaryError = false; break; case RegistrationState::InvalidUuid: // You should be resolving this error at development time. m_statusMessage = tr("Invalid UUID. Report this error to the " "vendor."); m_temporaryError = true; break; case RegistrationState::MaxAppsReached: m_statusMessage = tr("Too many applications are connected to BBM. " "Uninstall one or more applications and try " "again."); m_temporaryError = false; break; case RegistrationState::Expired: case RegistrationState::MaxDownloadsReached: m_statusMessage = tr("Cannot connect to BBM. Download this " "application from AppWorld to keep using it."); m_temporaryError = false; break; case RegistrationState::NoDataConnection: m_statusMessage = tr("Check your Internet connection and try again."); m_temporaryError = true; break; case RegistrationState::Pending: // The user will never see this. The BBM Social Platform already // displays a "Connecting" dialog. m_statusMessage = tr("Connecting to BBM. Please wait."); m_temporaryError = false; break; case RegistrationState::Unknown: m_statusMessage = tr("Determining the status. Please wait."); m_temporaryError = false; break; case RegistrationState::Unregistered: case RegistrationState::UnexpectedError: case RegistrationState::TemporaryError: case RegistrationState::CancelledByUser: default: // If new error codes are added, treat them as temporary errors. m_statusMessage = tr("Would you like to connect the application to " "BBM?"); m_temporaryError = true; break; } if (m_context.isAccessAllowed()) { m_isAllowed = true; } else { m_isAllowed = false; } qDebug() << "Finished BBM Social Platform registration, success=" << m_isAllowed << "temporaryError=" << m_temporaryError; emit stateChanged(); } void RegistrationHandler::dialogFinished(bb::system::SystemUiResult::Type value) { Q_UNUSED(value); Application::exit(-1); } void RegistrationHandler::finishRegistration() { emit registered(); }
[ "s3oh@uwaterloo.ca" ]
s3oh@uwaterloo.ca
86030c8f0df20f20e1d8ca226f91355ca1127a7c
fb6e1b288e76b34903b5d79262e5942148f1b188
/TestCapi/Test_CDHashAVLTree.cpp
2fc661c8a9363b230c039b37d788fe802a564257
[]
no_license
zhangnju/capi
2fee06bb32b4871ca79dc062115a8dacf6b3febf
bc64605c18e47b90dd2f69ff9d1d622e3a89d6a1
refs/heads/master
2020-03-18T01:31:13.212222
2018-05-20T11:52:06
2018-05-20T11:52:06
134,145,645
0
0
null
null
null
null
ISO-8859-13
C++
false
false
2,844
cpp
/* * Copyright (c) 2006-2008 * Author: Weiming Zhou * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. */ #include <windows.h> #include <process.h> #include <stdio.h> #include <time.h> #include <omp.h> #include "TestApi.h" #include "CDHashAVLTree.h" void TestCase_CDHashAVLTree_TestCase1(void); void TestCase_CDHashAVLTree_TestCase2(void); void Test_CDHashAVLTree() { TestCase_Add(TestCase_CDHashAVLTree_TestCase1); TestCase_Add(TestCase_CDHashAVLTree_TestCase2); } REGISTER_TESTFUNC(Test_CDHashAVLTree) extern void *IntCopy(void *p); //¼ūTest_DHashAVLTree.cpp void TestCase_CDHashAVLTree_TestCase1(void) { CDHashAVLTree dtree(2, HashInt, IntCompare, NULL, IntCopy); int i; for ( i = 400; i > 0 ; i-- ) { if ( i == 32 ) { printf( "i = %ld\n", i); } dtree.Insert((void *)i); } int a = 3; int ret = -1; ret = (int)dtree.Find((void *)a); assertTrue( ret == a); for ( i = 1; i <= 400; i++ ) { ret = (int)dtree.Find((void *)i); if ( ret != i ) { printf("ret = %ld, i = %ld\n", ret, i); } } dtree.Delete((void *)a); ret = (int)dtree.Find((void *)a); assertTrue(ret == 0); dtree.Insert((void *)a); for ( i = 1; i <= 400; i++ ) { ret = (int)dtree.Find((void *)i); if ( ret != i ) { printf("ret = %ld, i = %ld\n", ret, i); } } printf("TestCase1 Finished.\n"); } void CDHashAVLTree_Find_Thread(LPVOID args) { CDHashAVLTree *p = (CDHashAVLTree *)args; int Key; int i; int data = 1001; for(i = 0; i < 100000; i++) { Key = (int)p->Find((void *)data); assertTrue(Key == data || Key == 0); } } void TestCase_CDHashAVLTree_TestCase2(void) { CDHashAVLTree dtree(32768, HashInt, IntCompare, NULL, IntCopy); int i; clock_t t1, t2; t1 = clock(); //#pragma omp parallel for num_threads(4) schedule(static, 16) for ( i = 1; i <= 1000000; i++ ) { dtree.Insert((void *)i); } t2 = clock(); printf("CDHashAVLTree::Insert, time = %ld\n", t2-t1); int data = 1001; _beginthread(CDHashAVLTree_Find_Thread, 0, (void *)&dtree); for ( i = 0; i < 100000; i++ ) { dtree.Delete((void *)data); dtree.Insert((void *)data); } t1 = clock(); #pragma omp parallel for //schedule(static, 4096) for ( i = 1; i <= 1000000; i++ ) { int Key; Key = (int)dtree.Find((void *)i); } t2 = clock(); printf("CDHashAVLTree::Find 1000000, time = %ld\n", t2-t1); t1 = clock(); #pragma omp parallel for //schedule(static, 4096) for ( i = 1; i <= 1000000; i++ ) { int Key; Key = (int)dtree.Find((void *)i); } t2 = clock(); printf("CDHashAVLTree::Find 1000000, time = %ld\n", t2-t1); Sleep(100); }
[ "nzhangnju@gmail.com" ]
nzhangnju@gmail.com