blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 247 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2 values | repo_name stringlengths 4 111 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 58 | visit_date timestamp[ns]date 2015-07-25 18:16:41 2023-09-06 10:45:08 | revision_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | committer_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | github_id int64 3.89k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 25 values | gha_event_created_at timestamp[ns]date 2012-06-07 00:51:45 2023-09-14 21:58:52 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-08-24 19:49:39 ⌀ | gha_language stringclasses 159 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 10.5M | extension stringclasses 111 values | filename stringlengths 1 195 | text stringlengths 7 10.5M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f804c3555b457c7dc32df3bfd6fb1021e18f989 | eacd2e1163177864f436846e2adf7d7c1f8abbb2 | /day70_CountNumberofHops.cpp | 5757a77487d6b106d5ca8e6a9f0b2dccaf4f22cf | [] | no_license | 08saurav/100_days_codes | 0b423b110b1355b35857851abf7b706729552e7f | ba48a393b6d70881e1187be249913bc9b1fed56b | refs/heads/master | 2022-12-19T06:05:23.218430 | 2020-09-27T09:39:51 | 2020-09-27T09:39:51 | 298,994,929 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 991 | cpp | day70_CountNumberofHops.cpp | /*
* =====================================================================================
*
* Filename: day70_CountNumberofHops.cpp
*
* Description:
*
* Version: 1.0
* Created: 09/12/2020 07:41:45 PM
* Revision: none
* Compiler: gcc
*
* Author: Saurabh Bhartia (SB), s.bhartia.sb98@gmail.com
* Organization:
*
* =====================================================================================
*/
#include <stdlib.h>
#include<bits/stdc++.h>
using namespace std;
int find_ways(int n,int x,int y,int z,int dp[])
{
// cout <<n <<" " << dp[n] << endl;
if(n==0)
return 1;
if(n<0)
return 0;
if(dp[n]!=0)
return dp[n];
return dp[n]=find_ways(n-x,x,y,z,dp)+find_ways(n-y,x,y,z,dp)+find_ways(n-z,x,y,z,dp);
}
int main()
{
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
int dp[n];
for(int i=0;i<=n;i++)
dp[i]=0;
cout <<find_ways(n,1,2,3,dp) << endl;
}
return 0;
}
|
d92a12c57316428984af5c1913a061d6546f3409 | 01c286c750aa34f8bed760d3919e5a58539f4a8e | /Codeforces/459A.cpp | d0be045484db17b107e1f1a8c1f9c33e1b1c22be | [
"MIT"
] | permissive | Alipashaimani/Competitive-programming | 17686418664fb32a3f736bb4d57317dc6657b4a4 | 5d55567b71ea61e69a6450cda7323c41956d3cb9 | refs/heads/master | 2023-04-19T03:21:22.172090 | 2021-05-06T15:30:25 | 2021-05-06T15:30:25 | 241,510,661 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 628 | cpp | 459A.cpp | //InTheNameOfGod
#include<bits/stdc++.h>
using namespace std;
int main(){
int x1 , y1 , x2 , y2 ;
cin >> x1 >> y1 >> x2 >> y2 ;
int deltaX = abs ( x1 - x2 );
int deltaY = abs ( y1 - y2 );
if ( x1 == y1 && x2 == y2 || deltaX == deltaY ){
cout<<x1<< " " << y2 << " " << x2 << " " << y1;
}
else if ( x1 == x2 ) {
cout<< x1 + deltaY << " " << y1 << " " << x2 + deltaY << " " << y2 ;
}
else if ( y1 == y2 ){
cout << x1 << " " << y1 + deltaX << " " << x2 << " " << y2 + deltaX ;
}
else
cout << -1;
}
|
e3186ad6dd1f157b277fa0913eba08e71b635e2a | 679bc625578bce022ab8737682e08eb1d89a3b39 | /path_planner/src/planner/Planner.h | 59e70c46779060f32dfaeee179b81b8cc7436e71 | [] | no_license | mr-d-self-driving/path_planner-1 | d801e80eb0e41688eaeed00b65bff1b37f60bcce | 59da871fa0af7e6c86cb6e78a9419683a04ae4ba | refs/heads/master | 2023-06-18T23:50:19.140302 | 2020-08-21T20:04:59 | 2020-08-21T20:04:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,275 | h | Planner.h | #ifndef SRC_PLANNER_H
#define SRC_PLANNER_H
#include <vector>
#include <path_planner_common/State.h>
#include "../common/map/Map.h"
#include "search/Vertex.h"
#include <path_planner_common/DubinsPlan.h>
#include "PlannerConfig.h"
/**
* Interface to represent all planners. This might not have been really necessary but when I ported everything to C++
* I started with implementing a dumb planner here and more complex up the hierarchy. The dumber planners didn't get
* updated when we switched to ribbons so now this is basically just an interface.
*/
class Planner {
public:
/**
* Hold all the stats for the planner.
*
* TODO! -- CPU time?
*/
struct Stats {
unsigned long Samples;
unsigned long Generated;
unsigned long Expanded;
unsigned long Iterations;
double PlanFValue;
double PlanCollisionPenalty = 0;
double PlanTimePenalty;
double PlanHValue;
unsigned long PlanDepth;
DubinsPlan Plan;
};
Planner();
virtual ~Planner() = default;
/**
* Plan using the provided planning problem and configuration. Guaranteed to return before timeRemaining has elapsed.
* @param ribbonManager the ribbon manager
* @param start the start state
* @param config planner configuration
* @param previousPlan previous plan to help seed search
* @param timeRemaining computation time bound
* @return
*/
virtual Stats plan(const RibbonManager& ribbonManager, const State& start, PlannerConfig config,
const DubinsPlan& previousPlan, double timeRemaining);
/**
* Construct a single plan by tracing back from the given vertex to the root.
* @param v
* @param smoothing
* @param obstacles
* @return
*/
DubinsPlan tracePlan(const std::shared_ptr<Vertex>& v, bool smoothing, const DynamicObstaclesManager& obstacles);
/**
* Manually set the planner config. Meant for testing.
* @param config
*/
void setConfig(PlannerConfig config);
protected:
/**
* Utility to get the current time in seconds.
* @return
*/
double now() const;
PlannerConfig m_Config;
Stats m_Stats;
};
#endif //SRC_PLANNER_H
|
e7962954b78932b359c0b874a4d13580854a0080 | 97528ffe2960a8bc122eca00016cde2056f37054 | /replace_words/replace_words.cpp | f02a0005063e0dd34a36a345a06a516a39f104ab | [] | no_license | aravind-kumar/Coding | f5875161a2129fb8e2528da9ace42438282ee81b | d71438058fd39fe4bc7d642bd4b5d11333bfe848 | refs/heads/master | 2021-10-26T02:47:14.293087 | 2019-04-09T23:56:28 | 2019-04-09T23:56:28 | 71,275,972 | 0 | 0 | null | 2018-05-18T06:18:35 | 2016-10-18T17:55:38 | C++ | UTF-8 | C++ | false | false | 1,916 | cpp | replace_words.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <string>
using namespace std;
class Solution {
public:
struct Trie {
vector<Trie*> children;
bool isWord;
Trie() {
for(int i=0;i<26;++i) {
children.push_back(nullptr);
}
isWord = false;
}
void insert(string word) {
Trie *current = this;
for(char character : word) {
if(current->children[character-'a'] == nullptr) {
current->children[character-'a'] = new Trie();
}
current = current->children[character-'a'];
}
current->isWord = true;
}
/** Returns if the word is in the trie. */
string search(string word) {
Trie *current = this;
string rootWord = "";
for(char character : word) {
if(current->isWord) {
return rootWord;
}
rootWord.push_back(character);
if(current->children[character-'a'] == nullptr) {
return "";
}
current = current->children[character-'a'];
}
return current->isWord ? rootWord : "";
}
};
/** Inserts a word into the trie. */
string replaceWords(vector<string>& dict, string sentence) {
Trie *root = new Trie();
for(string word : dict) {
root->insert(word);
}
string output = "";
string word;
istringstream words(sentence);
while(words>>word) {
string rootWord = root->search(word);
output += rootWord != "" ? rootWord : word;
output += " ";
}
output.pop_back();
return output;
}
};
int main() {
return 0;
}
|
9e98b0c87e6e080384bb2ea7fd4d498e1f061ac2 | 232bdf11e6d48d54876842f76e9e28d622590e83 | /source/common/qmsgdevicebondinfo.cpp | 11ba5cb91daf8a7dd849221fa9c4adecf00de03e | [
"Apache-2.0"
] | permissive | c6supper/json_serialize_deserialize_qt | 22a1c24a4d967a2ca9a8e9c8e6485f4ee581c62a | c70e89056900835221309f7c54dcca2e9fefe498 | refs/heads/master | 2023-05-27T06:13:39.867301 | 2021-06-15T01:47:49 | 2021-06-15T01:47:49 | 377,003,767 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,945 | cpp | qmsgdevicebondinfo.cpp | #include "qmessagefactory.h"
#include "qmsgdevicebondinfo.h"
using namespace QRserver;
using namespace QProfile;
using namespace rserver;
QMessageSelfRegisteration<QMsgDeviceBondInfo> registerQMsgDeviceBondInfo(
eDeviceBondInfo);
QMsgDeviceBondInfo::QMsgDeviceBondInfo(QObject *parent)
: QAbstractBinMsg(eDeviceBondInfo, parent), m_mutex(new QMutex())
{
}
QMsgDeviceBondInfo::QMsgDeviceBondInfo(const QMsgDeviceBondInfo
&message)
: QAbstractBinMsg(message), m_mutex(new QMutex())
{
}
QMsgDeviceBondInfo::~QMsgDeviceBondInfo()
{
m_mutex->lock();
while (!m_deviceList.isEmpty())
delete m_deviceList.takeFirst();
m_mutex->unlock();
delete m_mutex;
}
const QVariantList QMsgDeviceBondInfo::deviceList() const
{
QMutexLocker locker(m_mutex);
QVariantList deviceList;
QList<QDeviceInfo *>::const_iterator i;
for (i = m_deviceList.constBegin(); i != m_deviceList.constEnd(); ++i) {
QVariant deviceVar = (*i)->toVariant();
deviceList.append(deviceVar);
}
return deviceList;
}
void QMsgDeviceBondInfo::setDeviceList(const QVariantList deviceList)
{
if (this->deviceList() == deviceList) {
qprofileDebug(QtDebugMsg) << "device is the same";
return;
}
QMutexLocker locker(m_mutex);
while (!m_deviceList.isEmpty())
delete m_deviceList.takeFirst();
QList<QVariant>::const_iterator i;
for (i = deviceList.constBegin(); i != deviceList.constEnd(); ++i) {
QDeviceInfo *device = new QDeviceInfo(this);
device->fromVariant((*i).toMap());
if (!device->canAssignOption()) {
continue;
}
// make sure platform version shown at the beginning
if (device->isChassis()) {
m_deviceList.prepend(device);
} else {
m_deviceList.append(device);
}
}
}
qint32 QMsgDeviceBondInfo::moduleCanAssignOptionCount() const
{
return (m_deviceList.count() - 1);
}
QDataStream &QMsgDeviceBondInfo::read(QDataStream &in)
{
return in;
}
QDataStream &QMsgDeviceBondInfo::write(QDataStream &out) const
{
QMutexLocker locker(m_mutex);
QList<QDeviceInfo *>::const_iterator i;
QStringAttribute devSn;
for (i = m_deviceList.constBegin(); i != m_deviceList.constEnd(); ++i) {
if ((*i)->isChassis()) {
st_PlatformSnInfo stPlatSnInfo;
bzero(&stPlatSnInfo, sizeof(st_PlatformSnInfo));
stPlatSnInfo.type = (*i)->deviceType();
devSn.setValue(QVariant((*i)->serialNumber()));
devSn.toChar(stPlatSnInfo.platformSn, sizeof(stPlatSnInfo.platformSn));
stPlatSnInfo.moduleCount = moduleCanAssignOptionCount();
out.writeRawData((const char *)&stPlatSnInfo, sizeof(stPlatSnInfo));
} else {
st_ModuleSnInfo stModuleSnInfo;
bzero(&stModuleSnInfo, sizeof(st_ModuleSnInfo));
stModuleSnInfo.type = (*i)->deviceType();
devSn.setValue(QVariant((*i)->serialNumber()));
devSn.toChar(stModuleSnInfo.moduleSn, sizeof(stModuleSnInfo.moduleSn));
out.writeRawData((const char *)&stModuleSnInfo, sizeof(stModuleSnInfo));
}
}
return out;
}
const QByteArray QMsgDeviceBondInfo::toByteArray() const
{
st_PlatformSnInfo stPlatSnInfo;
bzero(&stPlatSnInfo, sizeof(st_PlatformSnInfo));
QByteArray messageArray((const char *)&stPlatSnInfo,
sizeof(stPlatSnInfo));
st_ModuleSnInfo stModuleSnInfo;
bzero(&stModuleSnInfo, sizeof(st_ModuleSnInfo));
qint32 count = moduleCanAssignOptionCount();
while (count-- > 0) {
messageArray.append((const char *)&stModuleSnInfo,
sizeof(stModuleSnInfo));
}
QDataStream out(&messageArray, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_6);
out << *this;
return messageArray;
}
|
325f0f49c76bc558c873eebee5b4c60e12dc92e5 | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/git/gumtree/git_repos_function_2379_git-2.13.1.cpp | 84a82d30571030caa4a47fd31fdba96ae53a86d4 | [] | 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 | 1,385 | cpp | git_repos_function_2379_git-2.13.1.cpp | int read_directory(struct dir_struct *dir, const char *path,
int len, const struct pathspec *pathspec)
{
struct untracked_cache_dir *untracked;
if (has_symlink_leading_path(path, len))
return dir->nr;
untracked = validate_untracked_cache(dir, len, pathspec);
if (!untracked)
/*
* make sure untracked cache code path is disabled,
* e.g. prep_exclude()
*/
dir->untracked = NULL;
if (!len || treat_leading_path(dir, path, len, pathspec))
read_directory_recursive(dir, path, len, untracked, 0, pathspec);
QSORT(dir->entries, dir->nr, cmp_name);
QSORT(dir->ignored, dir->ignored_nr, cmp_name);
if (dir->untracked) {
static struct trace_key trace_untracked_stats = TRACE_KEY_INIT(UNTRACKED_STATS);
trace_printf_key(&trace_untracked_stats,
"node creation: %u\n"
"gitignore invalidation: %u\n"
"directory invalidation: %u\n"
"opendir: %u\n",
dir->untracked->dir_created,
dir->untracked->gitignore_invalidated,
dir->untracked->dir_invalidated,
dir->untracked->dir_opened);
if (dir->untracked == the_index.untracked &&
(dir->untracked->dir_opened ||
dir->untracked->gitignore_invalidated ||
dir->untracked->dir_invalidated))
the_index.cache_changed |= UNTRACKED_CHANGED;
if (dir->untracked != the_index.untracked) {
free(dir->untracked);
dir->untracked = NULL;
}
}
return dir->nr;
} |
44a3bd416d49d46372154434e650083372b766f7 | 2b53d73fbc40783b095f29e7cfb5b9b76a94b78d | /Algorithm/NHN_Pretest::2.cpp | 62fd20427e80a27e83b1318da37dcf72c714552c | [] | no_license | bananabeat/UC-Algorithm | c4ecb126237e92bfeec023115b7e45de135b2c51 | e4de57b000e75ce38efa36e1588637fb88b3c820 | refs/heads/master | 2018-09-19T20:21:35.484005 | 2018-06-06T09:36:23 | 2018-06-06T09:36:23 | 103,009,409 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,687 | cpp | NHN_Pretest::2.cpp | //
// NHN_Pretest::2.cpp
// Algorithm
//
// Created by Seungsoo on 4/17/18.
// Copyright © 2018 Seungsoo. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <string>
#include <cmath>
#include <queue>
#include <memory>
#include <limits.h>
#include <sstream>
using namespace std;
string inputString;
vector<string> tokenizingString(string input) {
string tmp;
vector<string> words;
stringstream stream(input);
while(getline(stream, tmp,' ')) {
words.push_back(tmp);
}
return words;
}
int main() {
getline(cin, inputString);
auto words = tokenizingString(inputString);
int vowel = 0, constant = 0;
int vowel_count = 0, constant_count = 0;
bool isvowel = false, isconstant = false;
for(int i = 0; i < words.size(); i++) {
for(int j = 0; j < words[i].length(); j++) {
if(words[i][j] == 'a' || words[i][j] == 'e' || words[i][j] == 'i' || words[i][j] == 'o' || words[i][j] == 'u') {
vowel++;
constant = 0;
}
else {
vowel = 0;
constant++;
}
if(!isvowel && vowel == 2) { // 단어 중 모음이 연속 2개가 두번 나올 경우 방지
vowel_count++;
isvowel = true;
}
if(isconstant && constant == 3) {
constant_count++;
isconstant = true;
}
}
vowel = constant = 0;
isvowel = isconstant = false;
}
cout << vowel_count << endl << constant_count << endl;
return 0;
}
|
e383abd3bd9b487062122c21e740c41e25068fbb | ecf8b8492726363162c9048b07712aa9224e6201 | /Practica3TPV/Practica1-DavidPatricia/Boton.cpp | 61efede5d2f3dd36c838ca251535cf1d2053b7bf | [] | no_license | DavidGonzalezJ/TPV | 9831ec038fd9bb2e90d3205948a98c076e37ecd8 | 954ee4e01e17ea4f732c148e6b43b76722dcead7 | refs/heads/master | 2020-05-16T07:08:47.488643 | 2017-03-25T16:42:35 | 2017-03-25T16:42:35 | null | 0 | 0 | null | null | null | null | ISO-8859-10 | C++ | false | false | 563 | cpp | Boton.cpp | #include "Boton.h"
Boton::Boton(JuegoPG* game,CallBack_t* callback, int py, Texturas_t textur):cb(callback)
{
juego = game;
textura = textur;
rect->x = juego->getWindowWidth()/2 - 120;
rect->y = py;
juego->getTextura(textura)->daTamaņo(rect->h, rect->w);
}
Boton::~Boton()
{
}
void Boton::draw()const {
juego->getTextura(textura)->draw(juego->getRender(), rect, nullptr);
}
void Boton::update() {
}
bool Boton::onClick() {
int x, y;
bool pulsa= false;
juego->getMousePos(x, y);
if (dentro(x, y)) {
cb(juego);
pulsa = true;
}
return pulsa;
} |
41cd1a212742fea27580c7c272ee3b1c2e9badb3 | 2c5e22d9511f87cd14aa2ec0d11c2a1c26f17862 | /Kmp/BruteForce.cc | 3f089f48e0c2bb2ad065d64bd266268f5f84c979 | [] | no_license | fang0099/Mr.Fundamental | 4fa4e290a8e396f761baa25e4a5373cc994c6773 | 979886ba4a140c0bc412b3f4f0c1be7a08879074 | refs/heads/master | 2020-06-03T10:00:30.246900 | 2014-09-08T16:13:41 | 2014-09-08T16:13:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,615 | cc | BruteForce.cc | #include <iostream>
#include <stdexcept>
#include <cstring>
int BruteForce(char* text, char* query)
{
int textLen = strlen(text);
int queryLen = strlen(query);
int i = 0, j = 0;
while(i < textLen && j <queryLen)
{
if(text[i] == query[j])
{
i++;
j++;
}
else
{
i = i - j +1;
j = 0;
}
}
if(j == queryLen)
return i - j;
else
return -1;
}
void GetNext(char* p, int next[])
{
int pLen = strlen(p);
next[0] = -1;
int k = -1;
int j = 0;
while(j < pLen - 1)
{
if(k == -1 || p[j] == p[k])
{
++k;
++j;
next[j] = k;
}
else
{
k = next[k];
}
}
}
int KmpSearch(char* s, char* p)
{
int i = 0, j = 0;
int sLen = strlen(s);
int pLen = strlen(p);
int *next = new int[pLen];
GetNext(p,next);
while( i <sLen && j < pLen)
{
if( j == -1 || s[i] == p[j])
{
i++;
j++;
}
else
{
j = next[j];
}
}
if( j == pLen)
return i - j;
else
return -1;
}
int main(int argc, char* argv[])
{
// char* text = "fangyonghao";
// char* query = "yong";
try
{
if(argc == 1)
throw std::runtime_error("no input");
}
catch(const std::runtime_error& error)
{
std::cout<<error.what()<<std::endl;
return -1;
}
std::cout<<"pos:"<<KmpSearch(argv[1],argv[2])<<std::endl;
return 0;
}
|
cfa63bc48aad10a803d2bc1a4820c48bc27c1ac5 | eed84ce06ec32c605ace41f634b3fd1a7f6eaa31 | /State-Estimation/src/LinearStateSpaceModel.h | 89eefef2cf907a6f7b925102dde970882b170104 | [
"MIT"
] | permissive | roberttully95/State-Estimation | f1c93ce47c68d23af016cfea77b375913f295bca | ef028ce51fc11a675f5762121df956d8c5a57c87 | refs/heads/main | 2023-04-01T08:30:55.033306 | 2021-04-07T04:00:52 | 2021-04-07T04:00:52 | 355,260,003 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,416 | h | LinearStateSpaceModel.h | #pragma once
#include <Eigen/Core>
/**
* @brief Defines the state space model.
* @tparam T The type of data contained in the model.
* @tparam n The number of states in the system.
* @tparam q The number of inputs to the system.
* @tparam p The number of outputs of the system.
*/
template <typename T, int n, int q, int p>
class LinearStateSpaceModel
{
public:
/**
* @brief Default constructor. Initializes everything to zero.
*/
LinearStateSpaceModel()
{
this->A.setZero();
this->x.setZero();
this->B.setZero();
this->u.setZero();
this->y.setZero();
this->C.setZero();
this->D.setZero();
}
/**
* @brief Constructor with the state-space matrices provided.
* @param A The state transition matrix.
* @param B The control matrix.
* @param C The output matrix.
* @param D The feed-forward matrix.
*/
LinearStateSpaceModel(const Eigen::Matrix<T, n, n>& A, const Eigen::Matrix<T, n, p>& B, const Eigen::Matrix<T, q, n>& C, const Eigen::Matrix<T, q, p>& D)
{
this->A = A;
this->x.setZero();
this->B = B;
this->u.setZero();
this->y.setZero();
this->C = C;
this->D = D;
}
~LinearStateSpaceModel() = default;
// Define the dimesions of the system
Eigen::Matrix<T, n, n> A;
Eigen::Matrix<T, n, 1> x;
Eigen::Matrix<T, n, p> B;
Eigen::Matrix<T, p, 1> u;
Eigen::Matrix<T, q, 1> y;
Eigen::Matrix<T, q, n> C;
Eigen::Matrix<T, q, p> D;
/**
* @brief Defines the state-space matrices.
* @param A The state transition matrix.
* @param B The control matrix.
* @param C The output matrix.
* @param D The feed-forward matrix.
*/
void set_state_matrices(const Eigen::Matrix<T, n, n>& A, const Eigen::Matrix<T, n, p>& B, const Eigen::Matrix<T, q, n>& C, const Eigen::Matrix<T, q, p>& D)
{
this->A = A;
this->B = B;
this->C = C;
this->D = D;
}
/**
* @brief Overrides the current state of the system.
* @param x The n x 1 vector containing the state of the system.
*/
void set_state(const Eigen::Matrix<T, n, 1>& x)
{
this->x = x;
}
/**
* @brief Overrides the current input of the system.
* @param u The p x 1 vector containing the state of the system.
*/
void set_input(const Eigen::Matrix<T, p, 1>& u)
{
this->u = u;
}
/**
* @brief Propogates the system based on the current state and updates the state variables and output.
*/
void propogate()
{
auto x_dot = A * x + B * u;
y = C * x + D * u;
x = x_dot;
}
};
|
ac56a5ab1092905c8dff9b98e2c72a6c15d04bb7 | 2fe651fcfc2549ffb4e09ffbaa46448bb01fd7eb | /MyHashMap/main.cpp | b9fbc2ed847c1dba608f3f546e991611b70d93e9 | [] | no_license | IamDreamcatcher/cplusplus | 6e47749f636842ab2f1d8a12d4afdc5aad677aad | a930a26ea962276bde7b2bd0ca88ab3b0cc25d43 | refs/heads/main | 2023-08-08T01:47:08.220979 | 2021-09-18T17:09:32 | 2021-09-18T17:09:32 | 407,918,311 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,297 | cpp | main.cpp | #include <algorithm>
#include <functional>
#include <iostream>
#include <list>
template <typename KeyType, typename ValueType, typename Hasher = std::hash<KeyType>>
class MyHashMap {
private:
struct Cell
{
std::list<std::pair<const KeyType, ValueType >> chain;
};
Hasher hasher_;
Cell* cells_;
size_t size_;
size_t capacity;
size_t used_cells_;
void rehash() {
size_t new_capacity = capacity * 2;
Cell* new_cells_ = new Cell[new_capacity];
size_t new_used_cells_ = 0;
for (size_t i = 0; i < capacity; i++) {
for (auto x : cells_[i].chain) {
KeyType key = x.first;
ValueType value = x.second;
auto hash = static_cast<size_t>(hasher_(key)) % new_capacity;
new_cells_[hash].chain.push_back(std::make_pair(key, value));
if (new_cells_[hash].chain.size() == 1) {
new_used_cells_++;
}
}
}
delete[] cells_;
cells_ = new_cells_;
capacity = new_capacity;
used_cells_ = new_used_cells_;
}
public:
MyHashMap(size_t size = 7) : hasher_() {
cells_ = new Cell[size];
capacity = size;
size_ = 0;
used_cells_ = 0;
}
~MyHashMap() {
clear();
delete[] cells_;
}
void clear() {
for (size_t i = 0; i < capacity; i++) {
cells_[i].chain.clear();
}
cells_ = new Cell[7];
size_ = 0;
capacity = 7;
used_cells_ = 0;
}
size_t size() {
return size_;
}
void insert(KeyType key, ValueType value) {
auto hash = static_cast<size_t>(hasher_(key)) % capacity;
if (contains(key)) {
erase(key);
}
cells_[hash].chain.push_back(std::make_pair(key, value));
size_++;
if (cells_[hash].chain.size() == 1) {
used_cells_++;
}
if (capacity * 0.6 < used_cells_) {
rehash();
}
}
void erase(KeyType key) {
auto hash = static_cast<size_t>(hasher_(key)) % capacity;
if (contains(key)) {
for (auto x : cells_[hash].chain) {
if (x.first == key) {
cells_[hash].chain.remove(x);
break;
}
}
size_--;
if (cells_[hash].chain.size() == 1) {
used_cells_--;
}
}
}
bool contains(KeyType key) {
auto hash = static_cast<size_t>(hasher_(key)) % capacity;
for (auto x : cells_[hash].chain) {
if (x.first == key) return true;
}
return false;
}
ValueType operator[](KeyType key) const {
auto hash = static_cast<size_t>(hasher_(key)) % capacity;
if (contains(key)) {
for (auto x : cells_[hash].chain) {
if (x.first == key) {
return x.second;
}
}
}
return ValueType();
}
ValueType& operator[](KeyType key) {
auto hash = static_cast<size_t>(hasher_(key)) % capacity;
if (!contains(key)) {
insert(key, ValueType());
}
for (auto x : cells_[hash].chain) {
if (x.first == key) {
auto it = std::find(cells_[hash].chain.begin(), cells_[hash].chain.end(), x);
return it -> second;
}
}
}
};
class MyHasher {
public:
size_t operator()(std::string s) {
size_t hash = 0;
size_t md = 1e9 + 7;
for (int i = 0; i < s.size(); i++) {
hash = (hash * 269 + (int)s[i]) % md;
}
return hash;
}
};
int main() {
MyHashMap <int, int> map(3);
map.insert(1, 10);
map.insert(2, 20);
map.insert(3, 30);
map.insert(4, 40);
map[2] = 100;
map[1] += 200;
std::cout << map.size() << '\n';
std::cout << map[1] << '\n';
std::cout << map[2] << '\n';
map.erase(1);
map.erase(2);
std::cout << map.contains(1) << '\n';
std::cout << map.contains(4) << '\n';
map.clear();
std::cout << map.size() << '\n' << '\n';
MyHashMap <std::string, int, MyHasher> map2;
map2.insert("I", 10);
map2.insert("am", 20);
map2.insert("loxxxxxxxxx", 30);
map2.insert("dddddddddd", 40);
map2["I"] = 100;
map2["am"] += 200;
std::cout << map2.size() << '\n';
std::cout << map2["I"] << '\n';
std::cout << map2["am"] << '\n';
map2.erase("I");
map2.erase("am");
std::cout << map2.contains("I") << '\n';
std::cout << map2.contains("dddddddddd") << '\n';
std::cout << map2.size() << '\n';
return 0;
} |
71a250971258db293f74ae54f733297385bcd4a3 | 0a4e0ecd0cc0421165af9885a2d853522ee409dc | /include/operator/operator_zero_one.h | a978a63acd95e64e4606bbfcb0eb96901db95a81 | [
"BSD-2-Clause"
] | permissive | DebSarma/caffe2_cpp_tutorial | c6ac4c81f78621fae9a67fb6aa65b3ad25d98ed9 | 30ddc298c3b5d7ca5c9b34743620fcf7f5d50cfb | refs/heads/master | 2020-12-02T07:56:17.471002 | 2017-07-06T00:45:41 | 2017-07-06T00:45:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,710 | h | operator_zero_one.h | #ifndef OPERATOR_ZERO_ONE_H
#define OPERATOR_ZERO_ONE_H
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename T, class Context>
class ZeroOneOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
ZeroOneOp(const OperatorDef& def, Workspace* ws)
: Operator<Context>(def, ws) {}
bool RunOnDevice() override;
protected:
INPUT_TAGS(PREDICTION, LABEL);
};
template <>
bool ZeroOneOp<float, CPUContext>::RunOnDevice() {
auto& X = Input(PREDICTION);
auto& label = Input(LABEL);
DCHECK_EQ(X.ndim(), 2);
int N = X.dim32(0);
int D = X.dim32(1);
DCHECK_EQ(label.ndim(), 1);
DCHECK_EQ(label.dim32(0), N);
const auto* Xdata = X.data<float>();
const auto* labelData = label.data<int>();
for (int i = 0; i < N; ++i) {
auto label_i = labelData[i];
auto label_pred = Xdata[i * D + label_i];
auto correct = true;
for (int j = 0; j < D; ++j) {
auto pred = Xdata[i * D + j];
if ((pred > label_pred) || (pred == label_pred && j < label_i)) {
correct = false;
break;
}
}
std::cout << correct;
}
std::cout << std::endl;
return true;
}
namespace {
REGISTER_CPU_OPERATOR(ZeroOne, ZeroOneOp<float, CPUContext>);
OPERATOR_SCHEMA(ZeroOne)
.NumInputs(2)
.NumOutputs(0)
.ScalarType(TensorProto::FLOAT)
.SetDoc("Write images to file.")
.Input(0, "predictions", "2-D tensor (Tensor<float>) of size "
"(num_batches x num_classes) containing scores")
.Input(1, "labels", "1-D tensor (Tensor<int>) of size (num_batches) having "
"the indices of true labels");
SHOULD_NOT_DO_GRADIENT(ZeroOne);
} // namespace
} // namespace caffe2
#endif // OPERATOR_ZERO_ONE_H
|
71bf57e4106a48897fbd4c6f7e007f863838b649 | 209d3218abad16458c9fc895776aaeba810bffdb | /Classes/base/Colors.h | 19b6cbb9091b6d09bad193d74df8bbc91e131ae3 | [] | no_license | zhongxuqi/calculate24 | c8e4fd17d6fedb9416d2a6e2ec061dde50b38a6d | 4c59a58014d0f4b6848bfa0b5f8135f6c1aaf64d | refs/heads/master | 2022-02-28T12:47:05.443206 | 2022-02-15T04:48:50 | 2022-02-15T04:48:50 | 100,356,206 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 677 | h | Colors.h | #ifndef __COLORS_H__
#define __COLORS_H__
#include "cocos2d.h"
#include "GameEngine.h"
class Colors {
public:
static cocos2d::Color4B Transparent;
static cocos2d::Color4B HalfTransparent;
static cocos2d::Color4B White;
static cocos2d::Color4B BgColor;
static cocos2d::Color4B OutNumberColor;
static cocos2d::Color4B *NumberColors;
static cocos2d::Color4B Number24DefaultColor;
static cocos2d::Color4B Number24FailColor;
static cocos2d::Color4B Number24SuccessColor;
static cocos2d::Color4B DangerColor;
static cocos2d::Color4B SuccessColor;
static cocos2d::Color4B GetColorsByNumber(AccurateNumber *accurateNumber);
};
#endif |
f3a1feed125aad24f702ce581664bcb1ffc660f4 | 0d333b24164f47c114e8d581f7b895ae852b35c5 | /your-engine-name/src/Engine.cpp | 5388cda533a2506880d1ac6c34ae0d80018a619e | [] | no_license | ackoujens/learning-opengl | 5b2fd7d3347387afad5fa417c8c69447a3a84665 | 1fb3910b2c3a994611eb37c140b913e61de273eb | refs/heads/master | 2020-04-06T07:18:12.754356 | 2016-09-02T10:45:19 | 2016-09-02T10:45:19 | 65,668,012 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,405 | cpp | Engine.cpp | #include <Engine.hpp>
Engine::Engine() {
using namespace std;
window = NULL;
title = "Untitled Application";
width = 640;
height = 480;
cout << "Engine Created" << endl;
}
Engine::~Engine() {
using namespace std;
cout << "Engine destroyed" << endl;
}
static void error_callback(int error, const char* description) {
fprintf(stderr, "Error %s\n", description);
}
void Engine::init() {
glfwSetErrorCallback(error_callback);
}
void Engine::startup() {
}
void Engine::shutdown() {}
void Engine::run(Engine *app) {
using namespace std;
// GLFW Init
if (!glfwInit()) fprintf( stderr, "GLFW initialization failed !\n");
else cout << "GLFW initialized" << endl;
init();
// 4x antialiasing
glfwWindowHint(GLFW_SAMPLES, 4);
// Enabled OSX to use a more advanced OpenGL Version
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
// For MacOS
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// Don't use old OpenGL
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
// Create Window
this->window = glfwCreateWindow(this->width,
this->height,
this->title,
NULL,
NULL);
if (!window) { fprintf(stderr, "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try 2.1 version of the tutorials.\n" ); glfwTerminate(); }
else { cout << "Window or OpenGL context created" << endl; }
glfwMakeContextCurrent(this->window);
// If I ever use GLEW
/*
glewExperimental=true; // needed in core profile
if (glewInit() != GLEW_OK) {
fprintf(stderr, "Failed to initialize GLEW\n");
return -1;
} */
startup();
cout << "Running " << title << " ..." << endl;
// Game Loop
while (!glfwWindowShouldClose(this->window)) {
if(glfwGetKey(this->window, GLFW_KEY_ESCAPE) == GLFW_PRESS) {
cout << "Closing GLFW window" << endl;
glfwSetWindowShouldClose(this->window, true);
}
render(glfwGetTime());
glfwSwapBuffers(this->window);
glfwPollEvents();
}
// Destruct
shutdown();
glfwDestroyWindow(window);
glfwTerminate();
}
void Engine::render(double currentTime){}
|
3a38941fb420598adae10851f99767806f847c8a | 80a69c9fc8604d06cdee3bec3a1faa9fdb304e8f | /src/transport/TortuosityBase.cpp | fecb71e22e301cdd1440e41202af70845745b31c | [] | no_license | Yuanfeng-Wang/CSM_Cantera | d01e9127bf6013ad4ea6ba2ae51e51b672bd8051 | a7ffb2d619ec129842633187d41c185ea8f1bd2c | refs/heads/master | 2021-05-01T20:08:05.372250 | 2014-04-30T21:03:18 | 2014-04-30T21:03:18 | 120,960,352 | 2 | 0 | null | 2018-02-09T22:01:11 | 2018-02-09T22:01:10 | null | UTF-8 | C++ | false | false | 3,382 | cpp | TortuosityBase.cpp | /**
* @file TortuosityBase.cpp
* Base class to compute the increase in diffusive path length associated with
* tortuous path diffusion through, for example, porous media.
*/
/*
* Copyright (2005) Sandia Corporation. Under the terms of
* Contract DE-AC04-94AL85000 with Sandia Corporation, the
* U.S. Government retains certain rights in this software.
*/
#include "TortuosityBase.h"
#include "cantera/base/ctexceptions.h"
#include <string>
namespace Cantera
{
//====================================================================================================================
static void err(const std::string r)
{
throw Cantera::CanteraError("TortuosityBase", "Error calling base class " + r);
}
//====================================================================================================================
// Default constructor
TortuosityBase::TortuosityBase()
{
}
//====================================================================================================================
// Copy Constructor
/*
* @param right Object to be copied
*/
TortuosityBase::TortuosityBase(const TortuosityBase& right)
{
*this = right;
}
//====================================================================================================================
// Default destructor for TortuosityBase
TortuosityBase::~TortuosityBase()
{
}
//====================================================================================================================
// Assignment operator
/*
* @param right Object to be copied
*/
TortuosityBase& TortuosityBase::operator=(const TortuosityBase& right)
{
if (&right == this) {
return *this;
}
return *this;
}
//====================================================================================================================
// Duplication operator
/*
* @return Returns a pointer to a duplicate of the current object given a
* base class pointer
*/
TortuosityBase* TortuosityBase::duplMyselfAsTortuosityBase() const
{
TortuosityBase* tb = new TortuosityBase(*this);
return tb;
}
//====================================================================================================================
// The tortuosity factor models the effective increase in the diffusive transport length.
/*
* This method returns \f$ 1/\tau^2 \f$ in the description of the flux
*
* \f$ C_T D_i \nabla X_i / \tau^2 \f$.
*
*
*/
doublereal TortuosityBase::tortuosityFactor(doublereal porosity)
{
err("tortuosityFactor");
return 0.0;
}
//====================================================================================================================
// The McMillan number is the ratio of the flux-like variable to the value it would have without porous flow.
/*
* The McMillan number combines the effect of tortuosity
* and volume fraction of the transported phase. The net flux
* observed is then the product of the McMillan number and the
* non-porous transport rate. For a conductivity in a non-porous
* media, \f$ \kappa_0 \f$, the conductivity in the porous media
* would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
*/
doublereal TortuosityBase::McMillanFactor(doublereal porosity)
{
err("McMillanFactor");
return 0.0;
}
//====================================================================================================================
}
|
bbc8864c9dd250becb729e891c561ccabe58b161 | ef2649a0c4638d5bb443507b36c3998961d46e01 | /modules/jsonprocessor.cpp | d6080d915d51307b3abeede9761ab5dea87bd27f | [] | no_license | astraleuro/libraryeditor | cea52704b4a9fac73fe41bbf633808a88b8f6f49 | c4452c91151ac09ab7a8dd11a55e1ab442eb7acd | refs/heads/master | 2022-11-06T01:30:39.870456 | 2020-06-22T13:26:57 | 2020-06-22T13:26:57 | 264,369,677 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,726 | cpp | jsonprocessor.cpp | #include "modules/jsonprocessor.h"
QJsonObject initJsonObject()
{
QJsonObject json;
json[ARTS_KEY] = QJsonArray();
json[AUTHORS_KEY] = QJsonArray();
json[ERAS_KEY] = QJsonArray();
return json;
}
QString stringArrayToString(QJsonArray data)
{
QString str;
for (int i = 0; i < data.count(); i++)
str += data[i].toString() + ", ";
str.remove(str.count() - 2, 2);
return str;
}
QStringList stringArrayToList(QJsonArray data)
{
QStringList list;
for (int i = 0; i < data.count(); i++)
list.append(data[i].toString());
return list;
}
QStringList objectArrayToList(QJsonArray data, QString key)
{
QStringList list;
QJsonObject object;
for (int i = 0; i < data.count(); i++) {
object = data[i].toObject();
if (object.contains(key))
list.append(object[key].toString());
}
return list;
}
void removeArraySelectedItems(QJsonArray &array, QList<QTableWidgetItem *> range)
{
for (int i = range.count() - 1; i >= 0; i--)
if (0 == range[i]->column())
array.removeAt(range[i]->row());
}
QStringList takeListByObjectKey(QString key, QJsonArray array)
{
QStringList list;
QString item;
for (int i = 0; i < array.count(); i++) {
item = array[i].toObject()[key].toString();
if (!item.isEmpty())
list.append(item);
}
return list;
}
QJsonArray removeKeyInObjectArray(QString subkey, QString key, QJsonArray array)
{
QJsonArray subArray;
QJsonObject object;
for (int i = 0; i < array.count(); i++) {
object = array[i].toObject();
subArray = object[key].toArray();
if (subArray.contains(subkey)) {
for (int j = 0; j < subArray.count(); j++)
if (subArray[j].toString() == subkey) {
subArray.removeAt(j);
object[key] = subArray;
array[i] = object;
break;
}
}
}
return array;
}
QJsonArray clearKeyInObjectArray(QString subkey, QString key, QJsonArray array)
{
QJsonObject object;
for (int i = 0; i < array.count(); i++) {
object = array[i].toObject();
if (object[key] == subkey) {
object[key] = "";
array[i] = object;
}
}
return array;
}
QJsonArray modifyObjectsKeyInArray(QString prefix, QString key, QJsonArray array)
{
QJsonObject item;
for (int i = 0; i < array.count(); i++) {
item = array[i].toObject();
if (item.contains(key)) {
item[key] = prefix + item[key].toString();
array[i] = item;
}
}
return array;
}
QJsonArray bubbleSortByKey(QJsonArray array, QString key, bool order, QVector<int> &swaps)
{
bool isSwap;
int index;
QJsonObject object;
swaps.resize(array.count());
for (int i = 0; i < swaps.count(); i++)
swaps[i] = i;
for (int i = 0; i < array.count() - 1; i++) {
for (int j = 0; j < array.count() - i - 1; j++) {
isSwap = false;
switch (array[j].toObject()[key].type()) {
case QJsonValue::Bool:
if ((order && array[j].toObject()[key].toBool() > array[j + 1].toObject()[key].toBool()) ||
(!order && array[j].toObject()[key].toBool() < array[j + 1].toObject()[key].toBool()))
isSwap = true;
break;
case QJsonValue::Double:
if ((order && array[j].toObject()[key].toDouble() > array[j + 1].toObject()[key].toDouble()) ||
(!order && array[j].toObject()[key].toDouble() < array[j + 1].toObject()[key].toDouble()))
isSwap = true;
break;
case QJsonValue::Array:
if ((order && stringArrayToString(array[j].toObject()[key].toArray()) > stringArrayToString(array[j + 1].toObject()[key].toArray())) ||
(!order && stringArrayToString(array[j].toObject()[key].toArray()) < stringArrayToString(array[j + 1].toObject()[key].toArray())))
isSwap = true;
break;
default:
if ((order && array[j].toObject()[key].toString() > array[j + 1].toObject()[key].toString()) ||
(!order && array[j].toObject()[key].toString() < array[j + 1].toObject()[key].toString()))
isSwap = true;
break;
}
if (isSwap) {
index = swaps[j];
swaps[j] = swaps[j + 1];
swaps[j + 1] = index;
object = array[j].toObject();
array[j] = array[j + 1];
array[j + 1] = object;
}
}
}
return array;
}
int indexOfObjectByKey(QString uniqueKey, QString data, QJsonArray array)
{
int index = -1;
for (int i = 0; i < array.count(); i++)
if (array[i].toObject()[uniqueKey] == data) {
index = i;
break;
}
return index;
}
bool isValidSchema(QJsonValue file, QJsonValue schema)
{
bool isOk;
QJsonValue fVal, sVal;
QJsonObject fObj, sObj;
QJsonArray fArr, sArr;
if (file.type() == schema.type()) {
switch (schema.type()) {
case QJsonValue::Object:
fObj = file.toObject();
sObj = schema.toObject();
if (fObj.keys() != sObj.keys())
return false;
isOk = true;
for (QString key : fObj.keys()) {
if (fObj[key].type() != sObj[key].type())
return false;
if (fObj[key].isArray())
isOk = isValidSchema(fObj[key].toArray(), sObj[key].toArray());
else if (fObj[key].isObject())
isOk = isValidSchema(fObj[key].toObject(), sObj[key].toObject());
if (isOk)
return true;
else
return false;
}
break;
case QJsonValue::Array:
fArr = file.toArray();
sArr = schema.toArray();
isOk = true;
sVal = sArr[0];
for (int i = 0; i < fArr.count(); i++) {
fVal = fArr[i];
if (fVal.type() != sVal.type())
return false;
if (fVal.isObject())
isOk = isValidSchema(fArr[i].toObject(), sVal.toObject());
if (!isOk)
return false;
}
return isOk;
break;
default:
return false;
}
return false;
} else
return false;
}
QJsonArray changeKeyInObjectArray(QString prevArg, QString newArg, QString key, QJsonArray array)
{
QJsonObject object;
QJsonArray subArray;
bool isReplaced;
for (int i = 0; i < array.count(); i++) {
object = array[i].toObject();
if (object.keys().contains(key)) {
if (object[key].isString() && object[key].toString() == prevArg) {
object[key] = newArg;
array[i] = object;
} else if (object[key].isArray()){
isReplaced = false;
subArray = object[key].toArray();
for (int j = 0; j < subArray.count(); j++)
if (subArray[j].toString() == prevArg) {
subArray[j] = newArg;
object[key] = subArray;
isReplaced = true;
break;
}
if (isReplaced)
array[i] = object;
}
}
}
return array;
}
|
40789874450195345ed5ef5a566039b62c705274 | e5845ec9522c8b8131af0d76be402de74d3b591f | /house.hpp | 3c47ef1ebe2d861d6993f02ba500521575c7e8b7 | [] | no_license | ceciliavision/gamePokemon | a148169057fc5253a49f0a51a9fb4740f9fedd8a | 40d14fc117f41c196027d8d67796905b27fb6576 | refs/heads/master | 2021-01-10T13:28:56.898079 | 2016-02-27T05:01:49 | 2016-02-27T05:01:49 | 52,650,581 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,263 | hpp | house.hpp | #include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "texture.h"
#include <iostream>
using namespace std;
/// This is a house class that creates a house object onto the scene
class house{
private:
float _x; /// the x-position of the house object
float _y; /// the y-position of the house object
float _z; /// the z-position of the house object
float _r; /// the rotation angle of the house object
int _width; /// the width of the house
int _length; /// the length of the house
int _floor; /// the number of stories of the house
string _name; /// name of the house object for later reference
public:
/// default constructor
house(){
cout << "In: default vector constructor"
<< endl;
_x = 0;
_y = 0;
_z = 0;
_r = 0;
_width = 5;
_length = 4;
_name = "";
_floor = 1;
};
///constructor with input house position, house size, story number and the object name
house(float xp, float yp, float zp, float yr, int l, int w, int s, string name){
_x = xp;
_y = yp;
_z = zp;
_r = yr;
_width = w;
_length = l;
_floor = s;
_name = name;
};
/// the method that starts the draw of the house object
void startDraw(house h){
glPushMatrix();
glTranslatef(h._x, h._y, h._z);
glRotatef(h._r, 0,1,0);
GLfloat MatAmbiant[4] = {1.0f, 1.0f, 1.0f, 1.0f};
GLfloat MatDiffuse[4] = {1.0f, 1.0f, 1.0f, 1.0f};
GLfloat MatSpecular[4] = {1.0f, 1.0f, 1.0f, 1.0f};
GLfloat MatShininess[] = {5.0f};
glMaterialfv(GL_FRONT, GL_AMBIENT, MatAmbiant);
glMaterialfv(GL_FRONT, GL_DIFFUSE, MatDiffuse);
glMaterialfv(GL_FRONT, GL_SPECULAR, MatSpecular);
glMaterialfv(GL_FRONT, GL_SHININESS, MatShininess);
};
/// the method that draws the body of the house object
void drawBase(house h){
Texture t;
for (int i=0;i<h._floor;i++){
glNormal3f(0.0f, 0.0f, 1.0f);
/// link the texture to certain vertices of the object
t.charger("./res/brickS.tga");
glEnable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3d(-h._width, h._length+i*h._length, h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(-h._width, 0+i*h._length, h._length);
glTexCoord2f(1.0f, 1.0f);
glVertex3d(h._width, 0+i*h._length, h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(h._width, h._length+i*h._length, h._length);
glEnd();
glDisable(GL_TEXTURE_2D);
/// Back wall
glNormal3f(0.0f, 0.0f, -1.0f);
t.charger("./res/brickF.tga");
glEnable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3d(h._width, h._length+i*h._length, -h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(h._width, 0+i*h._length, -h._length);
glTexCoord2f(1.0f, 1.0f);
glVertex3d(-h._width, 0+i*h._length, -h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(-h._width, h._length+i*h._length, -h._length);
glEnd();
/// Left Wall
glNormal3f(-1.0f, 0.0f, 0.0f);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3d(-h._width, h._length+i*h._length, -h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(-h._width, 0+i*h._length, -h._length);
glTexCoord2f(1.0f, 1.0f);
glVertex3d(-h._width, 0+i*h._length, h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(-h._width, h._length+i*h._length, h._length);
glEnd();
/// Right Wall
glNormal3f(1.0f, 0.0f, 0.0f);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3d(h._width, h._length+i*h._length, h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(h._width, 0+i*h._length, h._length);
glTexCoord2f(1.0f, 1.0f);
glVertex3d(h._width, 0+i*h._length, -h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(h._width, h._length+i*h._length, -h._length);
glEnd();
}
};
/// method that draws the roof of the house
void drawRoof(house h){
Texture t;
int _height = h._width+h._length;
/// To construct a slanted roof of the house, this is the triangle before
glNormal3f(0.0f, 0.0f, 1.0f);
glBegin(GL_TRIANGLES);
glTexCoord2f(0.0f, 0.0f);
glVertex3d( 0, _height+(h._floor-1)*h._length, h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(-h._width, h._length+(h._floor-1)*h._length, h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(h._width, h._length+(h._floor-1)*h._length, h._length);
glEnd();
/// Rear Triangle
glNormal3f(1.0f, 0.0f, -1.0f);
glBegin(GL_TRIANGLES);
glTexCoord2f(0.0f, 0.0f);
glVertex3d( 0, _height+(h._floor-1)*h._length, -h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(h._width, h._length+(h._floor-1)*h._length, -h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(-h._width, h._length+(h._floor-1)*h._length, -h._length);
glEnd();
glDisable(GL_TEXTURE_2D);
GLfloat MatAmbiantToit[4] = {0.5f, 0.0f, 0.0f, 1.0f};
GLfloat MatDiffuseToit[4] = {0.8f, 0.0f, 0.0f, 1.0f};
GLfloat MatSpecularToit[4] = {0.2f, 0.2f, 0.2f, 1.0f};
GLfloat MatShininessToit[] = {5.0f};
glMaterialfv(GL_FRONT, GL_AMBIENT, MatAmbiantToit);
glMaterialfv(GL_FRONT, GL_DIFFUSE, MatDiffuseToit);
glMaterialfv(GL_FRONT, GL_SPECULAR, MatSpecularToit);
glMaterialfv(GL_FRONT, GL_SHININESS, MatShininessToit);
/// Roof slope right, use the normal vector to decide how tilted the roof is
glNormal3f(0.71f, 0.71f, 0.0f);
t.charger("./res/brickR.tga");
glEnable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3d(0, _height+(h._floor-1)*h._length, h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(h._width, h._length+(h._floor-1)*h._length, h._length);
glTexCoord2f(1.0f, 1.0f);
glVertex3d(h._width, h._length+(h._floor-1)*h._length, -h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d(0, _height+(h._floor-1)*h._length, -h._length);
glEnd();
/// Roof slope left
glNormal3f(-0.71f, 0.71f, 0.0f);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3d( 0, _height+(h._floor-1)*h._length, -h._length);
glTexCoord2f(0.0f, 1.0f);
glVertex3d(-h._width, h._length+(h._floor-1)*h._length, -h._length);
glTexCoord2f(1.0f, 1.0f);
glVertex3d(-h._width, h._length+(h._floor-1)*h._length, h._length);
glTexCoord2f(1.0f, 0.0f);
glVertex3d( 0, _height+(h._floor-1)*h._length, h._length);
glEnd();
glDisable(GL_TEXTURE_2D);
glPopMatrix();
};
/// the method that combines all the above draw parts to draw a complete house object
void draw(house h){
startDraw(h);
drawBase(h);
drawRoof(h);
};
};
|
2ef7fe999e035b6b1c21a65e3e52147cda2c894f | 0117179ba2e666b907f936e3f4c3fb398f9ca0b2 | /Realm/Public/RealmCharacter.h | 944ff5f3213059e08cdd2f322c11c1fdf27a9f21 | [] | no_license | EDK3D-dev/Mythos-Realm | 10873dc68ce054031454d6f0610e15f95a35b70e | d5e6c3b66a1d083ec5921e33fa2d29157633bef2 | refs/heads/master | 2022-04-16T20:57:08.489635 | 2017-03-05T17:16:04 | 2017-03-05T17:16:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 546 | h | RealmCharacter.h | #pragma once
#include "StatsManager.h"
#include "RealmPlayerController.h"
#include "RealmCharacter.generated.h"
UCLASS(ABSTRACT)
class ARealmCharacter : public ACharacter
{
GENERATED_UCLASS_BODY()
protected:
/* reference to the player controller */
UPROPERTY(replicated, BlueprintReadOnly, Category=Realm)
ARealmPlayerController* playerController;
public:
void SetPlayerController(ARealmPlayerController* newPC)
{
playerController = newPC;
}
ARealmPlayerController* GetPlayerController() const
{
return playerController;
}
}; |
8c197b8d3c882757d39004731666dd7ba780f651 | 8c8fa08fbff27103261cd60d9b197dd046f13725 | /include/sr2tr/Relation.hpp | 7b114fcd6d1c554e5e6ced65a5c0f376beceb1f1 | [
"MIT"
] | permissive | rstancioiu/SR2TR | 4a7a6b7c8b2cd30e948ac4646582709d9c09e88d | 34c693716932212061fbf8028b2ea84aa5406f2d | refs/heads/master | 2021-07-14T21:18:20.665057 | 2021-03-18T21:13:50 | 2021-03-18T21:13:50 | 82,048,083 | 0 | 0 | MIT | 2021-03-18T21:13:50 | 2017-02-15T10:21:36 | C++ | UTF-8 | C++ | false | false | 171 | hpp | Relation.hpp | #pragma once
#include <vector>
namespace sr2tr {
using Interval = std::pair<double, double>;
using Relation = std::vector<std::vector<Interval>>;
} // namespace sr2tr |
b93393e54e0ea88b0f138c4021259c47c835a092 | d3cf6d15fd4d29b8f146c26cea14c9bbe30d9f66 | /src/Layout/LayoutManager.cpp | b9c26d7f8f7022a4bf79692908795809156865e8 | [] | no_license | ImanolGo/MurmurRenderer | c942cd2c42628f685cfce42cf2f14023cff666e5 | 0225dc21f92801cf995b3b715f96721b8be4c0fe | refs/heads/master | 2021-01-20T20:15:51.526209 | 2016-10-24T14:44:34 | 2016-10-24T14:44:34 | 63,713,578 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,661 | cpp | LayoutManager.cpp | /*
* LayoutManager.cpp
* Murmur
*
* Created by Imanol Gomez on 17/06/15.
*
*/
#include "ofMain.h"
#include "AppManager.h"
#include "SettingsManager.h"
#include "ViewManager.h"
#include "LayoutManager.h"
const int LayoutManager::MARGIN = 30;
const int LayoutManager::PADDING = 10;
LayoutManager::LayoutManager(): Manager(), m_cropLeft(0), m_cropRight(0), m_cropTop(0), m_cropBottom(0), m_isMasked(true)
{
//Intentionally left empty
}
LayoutManager::~LayoutManager()
{
ofLogNotice() <<"LayoutManager::Destructor";
}
void LayoutManager::setup()
{
if(m_initialized)
return;
Manager::setup();
this->createTextVisuals();
this->createSvgVisuals();
this->createImageVisuals();
//this->addVisuals();
ofLogNotice() <<"LayoutManager::initialized";
}
void LayoutManager::createTextVisuals()
{
///To implement in case we have text visuals
}
void LayoutManager::createSvgVisuals()
{
///To implement in case we have text visuals
}
void LayoutManager::createImageVisuals()
{
//this->createBackground();
}
void LayoutManager::createBackground()
{
}
void LayoutManager::draw()
{
// ofPushStyle();
// ofSetColor(0, 0, 0);
// ofRect(0,0,m_cropLeft,ofGetHeight());
// ofRect(0,0,ofGetWidth(),m_cropTop);
// ofRect(ofGetWidth()-m_cropRight,0, m_cropRight, ofGetHeight());
// ofRect(0,ofGetHeight()-m_cropBottom,ofGetWidth(),m_cropBottom);
// ofPopStyle();
}
void LayoutManager::addVisuals()
{
int depthLevel = -1;
for(SvgMap::iterator it = m_svgVisuals.begin(); it!= m_svgVisuals.end(); ++it){
//AppManager::getInstance().getViewManager().addOverlay(it->second,depthLevel);
}
for(TextMap::iterator it = m_textVisuals.begin(); it!= m_textVisuals.end(); ++it){
//AppManager::getInstance().getViewManager().addOverlay(it->second,depthLevel);
}
for(ImageMap::iterator it = m_imageVisuals.begin(); it!= m_imageVisuals.end(); ++it){
// AppManager::getInstance().getViewManager().addOverlay(it->second,depthLevel);
}
}
void LayoutManager::onCropLeft( int & pixels)
{
m_cropLeft = pixels;
AppManager::getInstance().getMaskManager().setMaskWindowFront();
}
void LayoutManager::onCropRight( int & pixels)
{
m_cropRight = pixels;
AppManager::getInstance().getMaskManager().setMaskWindowFront();
}
void LayoutManager::onCropTop( int & pixels)
{
m_cropTop = pixels;
AppManager::getInstance().getMaskManager().setMaskWindowFront();
}
void LayoutManager::onCropBottom(int & pixels)
{
m_cropBottom = pixels;
AppManager::getInstance().getMaskManager().setMaskWindowFront();
}
|
c327688ce96e731ee269bcee46158c70233a594b | 5bcef487c295028a30772326a7254d9530ec3986 | /1307.cpp | e1fe773b54726ec59c261e97da3efe3850b3dfc3 | [] | no_license | LibertyChaser/Luogu | d72ffe7fcb0e4db6d706c61b7fed377e915e061a | 8665cd53874a689df3873bdc1c0e01b3d2259d2a | refs/heads/main | 2023-07-06T12:14:49.694497 | 2021-08-15T01:55:18 | 2021-08-15T01:55:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 247 | cpp | 1307.cpp | #include<iostream>
int main(int argc, char const *argv[])
{
int input, output;
std::cin >> input;
while (input != 0)
{
output = output * 10 + input % 10;
input /= 10;
}
std::cout << output;
return 0;
}
|
78084349d59a5cf9120df232bcb1a01972ca5112 | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /third_party/libjingle_xmpp/xmpp/jid_unittest.cc | 8057b70542a53d3becd991adbbb591c739dc0309 | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | C++ | false | false | 3,592 | cc | jid_unittest.cc | /*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/libjingle_xmpp/xmpp/jid.h"
#include "testing/gtest/include/gtest/gtest.h"
using jingle_xmpp::Jid;
TEST(JidTest, TestDomain) {
Jid jid("dude");
EXPECT_EQ("", jid.node());
EXPECT_EQ("dude", jid.domain());
EXPECT_EQ("", jid.resource());
EXPECT_EQ("dude", jid.Str());
EXPECT_EQ("dude", jid.BareJid().Str());
EXPECT_TRUE(jid.IsValid());
EXPECT_TRUE(jid.IsBare());
EXPECT_FALSE(jid.IsFull());
}
TEST(JidTest, TestNodeDomain) {
Jid jid("walter@dude");
EXPECT_EQ("walter", jid.node());
EXPECT_EQ("dude", jid.domain());
EXPECT_EQ("", jid.resource());
EXPECT_EQ("walter@dude", jid.Str());
EXPECT_EQ("walter@dude", jid.BareJid().Str());
EXPECT_TRUE(jid.IsValid());
EXPECT_TRUE(jid.IsBare());
EXPECT_FALSE(jid.IsFull());
}
TEST(JidTest, TestDomainResource) {
Jid jid("dude/bowlingalley");
EXPECT_EQ("", jid.node());
EXPECT_EQ("dude", jid.domain());
EXPECT_EQ("bowlingalley", jid.resource());
EXPECT_EQ("dude/bowlingalley", jid.Str());
EXPECT_EQ("dude", jid.BareJid().Str());
EXPECT_TRUE(jid.IsValid());
EXPECT_FALSE(jid.IsBare());
EXPECT_TRUE(jid.IsFull());
}
TEST(JidTest, TestNodeDomainResource) {
Jid jid("walter@dude/bowlingalley");
EXPECT_EQ("walter", jid.node());
EXPECT_EQ("dude", jid.domain());
EXPECT_EQ("bowlingalley", jid.resource());
EXPECT_EQ("walter@dude/bowlingalley", jid.Str());
EXPECT_EQ("walter@dude", jid.BareJid().Str());
EXPECT_TRUE(jid.IsValid());
EXPECT_FALSE(jid.IsBare());
EXPECT_TRUE(jid.IsFull());
}
TEST(JidTest, TestNode) {
Jid jid("walter@");
EXPECT_EQ("", jid.node());
EXPECT_EQ("", jid.domain());
EXPECT_EQ("", jid.resource());
EXPECT_EQ("", jid.Str());
EXPECT_EQ("", jid.BareJid().Str());
EXPECT_FALSE(jid.IsValid());
EXPECT_TRUE(jid.IsBare());
EXPECT_FALSE(jid.IsFull());
}
TEST(JidTest, TestResource) {
Jid jid("/bowlingalley");
EXPECT_EQ("", jid.node());
EXPECT_EQ("", jid.domain());
EXPECT_EQ("", jid.resource());
EXPECT_EQ("", jid.Str());
EXPECT_EQ("", jid.BareJid().Str());
EXPECT_FALSE(jid.IsValid());
EXPECT_TRUE(jid.IsBare());
EXPECT_FALSE(jid.IsFull());
}
TEST(JidTest, TestNodeResource) {
Jid jid("walter@/bowlingalley");
EXPECT_EQ("", jid.node());
EXPECT_EQ("", jid.domain());
EXPECT_EQ("", jid.resource());
EXPECT_EQ("", jid.Str());
EXPECT_EQ("", jid.BareJid().Str());
EXPECT_FALSE(jid.IsValid());
EXPECT_TRUE(jid.IsBare());
EXPECT_FALSE(jid.IsFull());
}
TEST(JidTest, TestFunky) {
Jid jid("bowling@muchat/walter@dude");
EXPECT_EQ("bowling", jid.node());
EXPECT_EQ("muchat", jid.domain());
EXPECT_EQ("walter@dude", jid.resource());
EXPECT_EQ("bowling@muchat/walter@dude", jid.Str());
EXPECT_EQ("bowling@muchat", jid.BareJid().Str());
EXPECT_TRUE(jid.IsValid());
EXPECT_FALSE(jid.IsBare());
EXPECT_TRUE(jid.IsFull());
}
TEST(JidTest, TestFunky2) {
Jid jid("muchat/walter@dude");
EXPECT_EQ("", jid.node());
EXPECT_EQ("muchat", jid.domain());
EXPECT_EQ("walter@dude", jid.resource());
EXPECT_EQ("muchat/walter@dude", jid.Str());
EXPECT_EQ("muchat", jid.BareJid().Str());
EXPECT_TRUE(jid.IsValid());
EXPECT_FALSE(jid.IsBare());
EXPECT_TRUE(jid.IsFull());
}
|
86fb4347fdda415adcc96827e1c56ce937496c41 | 581d6eeb48dbd442dca27c1fa83689c58ffea2c9 | /Sources/Elastos/Frameworks/Droid/Base/Core/inc/elastos/droid/view/CPhysicalDisplayInfo.h | ef5669b6c42154851cb67e0b0420778ae18031ec | [
"Apache-2.0"
] | permissive | TheTypoMaster/ElastosRDK5_0 | bda12b56271f38dfb0726a4b62cdacf1aa0729a7 | e59ba505e0732c903fb57a9f5755d900a33a80ab | refs/heads/master | 2021-01-20T21:00:59.528682 | 2015-09-19T21:29:08 | 2015-09-19T21:29:08 | 42,790,116 | 0 | 0 | null | 2015-09-19T21:23:27 | 2015-09-19T21:23:26 | null | UTF-8 | C++ | false | false | 2,129 | h | CPhysicalDisplayInfo.h |
#ifndef __ELASTOS_DROID_VIEW_CPHYSICALDISPLAYINFO_H__
#define __ELASTOS_DROID_VIEW_CPHYSICALDISPLAYINFO_H__
#include "_Elastos_Droid_View_CPhysicalDisplayInfo.h"
namespace Elastos {
namespace Droid {
namespace View {
CarClass(CPhysicalDisplayInfo)
{
public:
CPhysicalDisplayInfo();
CARAPI constructor();
CARAPI constructor(
/* [in] */ IPhysicalDisplayInfo* other);
ECode Equals(
/* [in] */ IPhysicalDisplayInfo* other,
/* [out] */ Boolean* equals);
CARAPI Equals(
/* [in] */ IInterface* other,
/* [out] */ Boolean * result);
CARAPI GetHashCode(
/* [out] */ Int32* hash);
ECode CopyFrom(
/* [in] */ IPhysicalDisplayInfo* other);
// // For debugging purposes
// @Override
// public String toString() {
// return "PhysicalDisplayInfo{" + width + " x " + height + ", " + refreshRate + " fps, "
// + "density " + density + ", " + xDpi + " x " + yDpi + " dpi, secure " + secure
// + "}";
// }
CARAPI GetWidth(
/* [out] */ Int32* width);
CARAPI SetWidth(
/* [in] */ Int32 width);
CARAPI GetHeight(
/* [out] */ Int32* height);
CARAPI SetHeight(
/* [in] */ Int32 height);
CARAPI GetRefreshRate(
/* [out] */ Float* refreshRate);
CARAPI SetRefreshRate(
/* [in] */ Float refreshRate);
CARAPI GetDensity(
/* [out] */ Float* density);
CARAPI SetDensity(
/* [in] */ Float density);
CARAPI GetXDpi(
/* [out] */ Float* xDpi);
CARAPI SetXDpi(
/* [in] */ Float xDpi);
CARAPI GetYDpi(
/* [out] */ Float* yDpi);
CARAPI SetYDpi(
/* [in] */ Float yDpi);
CARAPI GetSecure(
/* [out] */ Boolean* secure);
CARAPI SetSecure(
/* [in] */ Boolean secure);
public:
Int32 mWidth;
Int32 mHeight;
Float mRefreshRate;
Float mDensity;
Float mXDpi;
Float mYDpi;
Boolean mSecure;
};
} // namespace View
} // namespace Droid
} // namespace Elastos
#endif //__ELASTOS_DROID_VIEW_CPHYSICALDISPLAYINFO_H__
|
dd93919af4adca43809acb214386633ac926a454 | 67789ab9aefc939a73dbe1e4ae85e77edeb23d53 | /August-2020/8-Aug-2020/main.cpp | cf43a15b9a4a3d8510767e92cf638ef89173f828 | [] | no_license | Chanderkan7/100lines | c7491176b55eb9d5dbb3b64aab45a0c605602883 | 468ac00bea94ad5dbfd0088e54dcee73ac0f4607 | refs/heads/master | 2023-01-31T08:43:12.115260 | 2020-12-15T17:52:46 | 2020-12-15T17:52:46 | 291,942,876 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,491 | cpp | main.cpp | #include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
class student
{
int rollno;
char name[50];
int p_marks, c_marks, m_marks, e_marks, cs_marks;
double per;
char grade;
void calculate();
public:
void getdata();
void showdata() const;
void show_tabular() const;
int retrollno() const;
};
void student::calculate()
{
per = (p_marks + c_marks + m_marks + cs_marks)/5.0;
if(per>=60)
grade = 'A';
else if(per>=50)
grade = 'B';
else if (per >=33 )
grade = 'C';
else
grade = 'F';
}
void student::getdata()
{
cout << "\n Enter the roll number of student. ";
cin >> rollno;
cout<<"\n\n Enter the name of student. ";
cin.ignore();
cin.getline(name,50);
cout << "\nEnter the marks in Physics out of 100: ";
cin>>p_marks;
cout << "\nEnter the marks in Chemistry out of 100: ";
cin>>c_marks;
cout << "\nEnter the marks in Maths out of 100: ";
cin>>m_marks;
cout << "\nEnter the marks in English out of 100: ";
cin>>e_marks;
cout << "\nEnter the marks in Computer Science out of 100: ";
cin>>cs_marks;
calculate();
}
void student::showdata()const
{
cout <<"\nRoll number of student: " << rollno;
cout <<"\nName of student: " << name;
cout <<"\nMarks in Physics: "<<p_marks;
cout <<"\nMarks in Chemistry: "<<c_marks;
cout <<"\nMarks in Maths: "<<m_marks;
cout <<"\nMarks in Computer Science: "<<cs_marks;
cout <<"\nPercentage of student is: " << per;
cout <<"\nGrade of student is: "<<grade;
}
void student::show_tabular() const
{
cout<<rollno<<setw(6)<<" "<<name<<setw(10)<<p_marks<<setw(4)<<
c_marks<<setw(4)<<m_marks<<setw(4)<<e_marks<<setw(4)<<setw(4)<<
per<<setw(4)<<grade<<endl;
}
int student::retrollno() const
{
return rollno;
}
void write_student();
void display_all();
void display_sp(int);
void modify_student(int);
void delete_student(int);
void class_result();
void result();
void intro();
void entry_menu();
int main()
{
char ch;
cout.setf(ios::fixed|ios::showpoint);
cout<<setprecision(2);
intro();
do
{
system("cls");
cout << "\n\n\n\tMAIN MENU";
cout << "\n\n\t01. RESULT MENU";
cout << "\n\n\t02. ENTRY/EDIT MENU";
cout << "\n\n\t03. Exit";
cout << "\n\n\tPlease Select Your Option (1-3) ";
cin >> ch;
switch(ch)
{
case '1' : result();
break;
case '2' : entry_menu();
break;
case '3' :
break;
default : cout << "\a";
}
}
while (ch!='3');
return 0;
}
void write_student()
{
student st;
ofstream outFile;
outFile.open("student.dat", ios::binary|ios::app);
st.getdata();
outFile.write(reinterpret_cast<char *> (&st), sizeof(student));
outFile.close();
cout << "\n\nStudent record has been created!";
cin.ignore();
cin.get();
}
void display_all()
{
student st;
ifstream inFile;
inFile.open("student.dat", ios::binary);
if(!inFile)
{
cout << "File could not be opened! Press any key...";
cin.ignore();
cin.get();
return;
}
cout << "\n\n\n\t\tDISPLAY ALL RECORD!!!\n\n";
while(inFile.read(reinterpret_cast<char *> (&st), sizeof(student)))
{
st.showdata();
cout <<"\n\n======================================\n";
}
inFile.close();
cin.ignore();
cin.get();
}
void display_sp(int n)
{
student st;
ifstream inFile;
inFile.open("student.dat", ios::binary);
if(!inFile)
{
cout << "File could not be opened! Press any key...";
cin.ignore();
cin.get();
return;
}
bool flag=false;
while (inFile.read(reinterpret_cast<char *> (&st) , sizeof(student)))
{
if(st.retrollno()==n)
{
st.showdata();
flag = true;
}
}
inFile.close();
if(flag==false)
cout << "\n\nrecord does not exist!";
cin.ignore();
cin.get();
}
void modify_student(int n)
{
bool found = false;
student st;
fstream File;
File.open("student.dat", ios::binary|ios::in|ios::out);
if(!File)
{
cout << "File could not be opened! Press any key...";
cin.ignore();
return;
}
while(!File.eof() && found == false)
{
File.read(reinterpret_cast<char *> (&st), sizeof(student));
if(st.retrollno()==n)
{
st.showdata();
cout << "\n\nPlease enter the new details of student.\n";
st.getdata();
int pos=(-1)*static_cast<int>(sizeof(st));
File.seekp(pos, ios::cur);
File.write(reinterpret_cast<char *> (&st), sizeof(student));
cout <<"\n\n\t Record Updated";
found = true;
}
}
File.close();
if (found == false)
cout << "\n\nRecord not found ";
cin.ignore();
cin.get();
}
void delete_student(int n)
{
student st;
ifstream inFile;
inFile.open("student.dat", ios::binary);
if(!inFile)
{
cout << "File could not be opened. Press any key...";
cin.ignore();
cin.get();
return;
}
ofstream outFile;
outFile.open("Temp.dat", ios::out);
inFile.seekg(0, ios::beg);
while(inFile.read(reinterpret_cast<char *> (&st), sizeof(student)))
{
if (st.retrollno() != n)
{
outFile.write(reinterpret_cast<char *> (&st), sizeof(student));
}
}
outFile.close();
inFile.close();
remove("student.dat");
rename("Temp.dat", "student.dat");
cout<<"\n\n\t Record Deleted...";
cin.ignore();
cin.get();
}
void class_result()
{
student st;
ifstream inFile;
inFile.open("student.dat",ios::binary);
if(!inFile)
{
cout << "File could not be opened. Press any key...";
cin.ignore();
cin.get();
return;
}
cout << "\n\n\t ALL STUDENTS RESULT \n\n";
cout <<"======================================================\n";
cout <<"R.No Name P C M E CS %age Grade"<<endl;
cout <<"======================================================\n";
while(inFile.read(reinterpret_cast<char *> (&st), sizeof(student)))
{
st.show_tabular();
}
cin.ignore();
cin.get();
inFile.close();
}
void result()
{
char ch;
int rno;
system("cls");
cout << "\n\n\tRESULT MENU";
cout << "\n\n\t1. Class Result";
cout << "\n\n\t2. Student Report Card";
cout << "\n\n\t3. Back to main menu";
cout << "\n\n\n\t Enter Choice (1/2/3): ";
cin>>ch;
system("cls");
switch(ch)
{
case '1' : class_result(); break;
case '2' : cout << "\n\n\t Enter Roll Number of Student: ";
cin>>rno;
display_sp(rno);
break;
case '3': break;
default: cout << "\a";
}
}
void intro()
{
cout << "\n\n\n\t\t STUDENT";
cout << "\n\n\t\tREPORT CARD";
cout << "\n\n\n\t MADE BY: Sulabh Aggarwal";
cout << "\n\n\n\t Implemented by: Chanderkant Tiwari";
cin.get();
}
void entry_menu()
{
char ch;
int num;
system("cls");
cout << "\n\n\n\tENTRY MENU";
cout << "\n\n\t1.CREATE STUDENT RECORD";
cout << "\n\n\t2.DISPLAY ALL RECORDS";
cout << "\n\n\t3.SEARCH STUDENT RECORD";
cout << "\n\n\t4.MODIFY STUDENT RECORD";
cout << "\n\n\t5.DELETE STUDENT RECORD";
cout << "\n\n\t6.BACK TO MAIN MENU";
cout << "\n\n\tPLEASE ENTER YOUR CHOICE (1-6) ";
cin >> ch;
system("cls");
switch(ch)
{
case '1' : write_student(); break;
case '2' : display_all(); break;
case '3' : cout << "\n\n\tPlease Enter the roll no: "; cin>>num;
display_sp(num);break;
case '4' : cout << "\n\n\tPlease Enter the roll no: ";
cin>>num; modify_student(num); break;
case '5' : cout << "\n\n\tPlease Enter the roll no: ";
cin >> num;
delete_student(num); break;
case '6': break;
default: cout<<"\a"; entry_menu();
}
}
|
1544c59cafcf1f1ad74ad2e6d1414346b423a87c | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/CMake/CMake-gumtree/Kitware_CMake_repos_basic_block_block_18827.cpp | c77e7c6abf3fed9d2410a9aaa0bfc1e6953a4dc7 | [] | 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 | 74 | cpp | Kitware_CMake_repos_basic_block_block_18827.cpp | (initsize <= 0)
bufsize = 4096;
else
bufsize = (size_t) initsize |
600e8a90678860db763de6d0aa7820a1ccfcc980 | 6fcdbb23b52acbd3c1f32c55308801f1067a6ac6 | /ProgramForClient/RhinoClientCode/Extend/project/ExtendHS/MyWebView.cpp | c739db83e9262ad18c56d6414ddd364135acfdd6 | [
"Apache-2.0"
] | permissive | jyqiu1216/Rino | e507b70a2796cb356cd7ce90578981802ee5008c | eb8c110e7a551ee9bd736792a957a544c5ffdeb5 | refs/heads/master | 2020-04-13T21:41:26.474356 | 2017-05-19T07:39:42 | 2017-05-19T07:39:42 | 86,565,153 | 3 | 2 | null | null | null | null | GB18030 | C++ | false | false | 2,528 | cpp | MyWebView.cpp | #include "MyWebView.h"
MyWebView::MyWebView(QWidget *parent)
: QWebEngineView(parent)
, m_hWinHS(NULL)
{
//QObject::connect(this, SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
//QObject::connect(this, SIGNAL(loadProgress(int)), this, SLOT(onLoadProgress(int)));
//QObject::connect(this, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
//setWindowOpacity(1);
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint | Qt::Dialog);
setAttribute(Qt::WA_TranslucentBackground, true);
//this->setAutoFillBackground(true);
this->page()->setBackgroundColor(QColor(0, 0, 0, 0));
}
MyWebView::~MyWebView()
{
}
void MyWebView::setHSHwnd(HWND _hWnd)
{
m_hWinHS = _hWnd;
//::SetParent((HWND)winId(), m_hWinHS);
}
void MyWebView::paintEvent(QPaintEvent *)
{
//QPainter painter(this);
//painter.drawPixmap(0, 0, m_backgroundPix);//绘制图像
//painter.fillRect(this->rect(), QColor(255,255,0,50));
}
void MyWebView::timerEventFunction()
{
//qDebug("timer event");
}
#include <QDebug>
void MyWebView::onLoadStarted()
{
//this->hide();
//this->setWindowOpacity(0);
}
void MyWebView::onLoadProgress(int progress)
{
//if (progress == 100)
//{
// this->setWindowOpacity(1);
// this->show();
//}
}
void MyWebView::onLoadFinished(bool result)
{
//printf("页面加载完成: %s\n", result ? "成功" : "失败");
}
void MyWebView::enterEvent(QEvent *)
{
//::MoveWindow((HWND)winId(), m_pos.x(), m_pos.y(), m_size.width(), m_size.height(), true);
//static QPropertyAnimation* anima = new QPropertyAnimation(this, "geometry");
//anima->setDuration(1000);
//anima->setStartValue(QRect(m_x, m_y, m_width, 43));
//anima->setEndValue(QRect(m_x, m_y, m_width, m_height));
//anima->start();
::SwitchToThisWindow(m_hWinHS, true);
}
void MyWebView::leaveEvent(QEvent *)
{
//::MoveWindow((HWND)winId(), m_pos.x(), m_pos.y(), m_size.width(), 40, true);
//resize(m_size.width(), 43);
//static QPropertyAnimation* anima = new QPropertyAnimation(this, "geometry");
//anima->setDuration(1000);
//anima->setStartValue(QRect(m_x, m_y, m_width, m_height));
//anima->setEndValue(QRect(m_x, m_y, m_width, 43));
//anima->start();
//
//if (m_hWndParent)
//{
// SwitchToThisWindow(m_hWndParent, true);
//}
::SwitchToThisWindow(m_hWinHS, true);
}
void MyWebView::setWindowSize(int _x, int _y, int _w, int _h)
{
m_x = _x;
m_y = _y;
m_width = _w;
m_height = _h;
RECT rt;
::GetWindowRect(m_hWinHS, &rt);
//move(rt.left + _x, rt.top + _y);
move(_x, _y);
resize(_w, _h);
}
|
7f2cc44ea325ac5ee1b720b5b1e2c56459df1a79 | 8dca25d64e554e6eb0050d8b87de313d37ba0ab9 | /1200/1339B-Sorted Adjacent Differences.cpp | f87c3b6dfe255af8dc6612cf3b09cbdb9b5abf85 | [] | no_license | Ii-xD-iI/CodeForces | d57e26a8ffa846bce2f853149ebd5dc745562b17 | 4226aed69f849bba6c49059b328c164ed955befb | refs/heads/master | 2023-03-16T06:59:31.679988 | 2021-02-28T18:35:22 | 2021-02-28T18:35:22 | 290,790,921 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,206 | cpp | 1339B-Sorted Adjacent Differences.cpp | #include "bits/stdc++.h"
//PRAY :ORZ FENCING: orz orz orz orz orz
//PRAY :DOLPHINGARLIC: orz orz orz orz orz
//PRAY :DORI: orz orz orz orz orz orz orz
//PRAY :SAHIL KUCHLOUS: orz orz orz orz orz
//pray :stefan: orz orz orz orz orz orz orz
//pray :foshy: orz orz orz orz orz orz orz
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define elif else if
#define Int long long
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(0);
int t;cin>>t;
while(t--){
long long n;cin>>n;
vector<long long> v(n);
for(int i {};i<n;i++)cin>>v[i];
sort(all(v));
if(n%2==0){//even
Int l=n/2+1;
Int r=l+1;
for(int i {};i<(n/2);++i){
cout << v[(l--)-2] << " " << v[(r++)-2] << ' ';
}
}
else{//odd
cout << v[n/2]<<" ";
Int l=n/2-1,r=n/2+1;
for(int i {};i<(n/2);i++){
cout << v[(l--)] << " " << v[(r++)] << " ";
}
cout << '\n';
}
}
return 0;
}
//TASKKILL /F /IM main.exe
/*
6:15 PM
10/1/2020 mm/d/yyyy
if its even i was couting last element at last
but
hab to cout middle first
oof Test 4
5 WA on test 4 o boy
*/
|
0d96cb929912ff85757cad69f1ea55bdadbdcea0 | 7c6d308aea046e19a414a537b2d8b7cbd96c7d26 | /Objects/monsters/BaseShooterMonster.h | e34b22bd28e19559d55564d20f351085d90b8430 | [] | no_license | MAGANER/BrutalASCII | 7863a7ab0b5de9b9e595c5111e30d80a815288e8 | 64d701e7783fdb8d74bdfd93bfdbefb84355656c | refs/heads/master | 2022-01-23T11:33:25.065583 | 2019-07-19T17:02:56 | 2019-07-19T17:02:56 | 197,807,548 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,482 | h | BaseShooterMonster.h | #ifndef BASESHOOTERMONSTER_H
#define BASESHOOTERMONSTER_H
#include"mod.h"
#include"Monster.h"
#include"Timer.h"
#include"Physics/CollisionChecker.h"
/*
base class for monsters with guns
*/
class BaseShooterMonster : public Monster
{
private:
CollisionChecker coll_checker;
int old_direction;
private:
int target_seeing_radius; // see target if it's in the radius
Vector2f target_vision_radius[2]; //0 elem is start, 1 elem is end
int attack_direction;
Timer* shooting_timer;
protected:
bool try_to_avoid_bullet;
int avoiding_direction;
bool pos_taken;
Vector2f pos_before_running;
void run_in_fear(int direction, bool able_to_go);
void shoot(int direction,vector<Bullet*>& monster_bullets);
bool is_bullet_near(vector<Bullet*>& hero_bullets);
void animate();
public:
BaseShooterMonster(GraphicalSettings graph_settings,
PhysicalSettings phys_settings,
GameSettings game_settings,
int visible_radius);
virtual ~BaseShooterMonster();
void search_target(Vector2f target_pos);
void compute_target_vision_rad();
bool does_see_any_wall(vector<GameObject*>& walls);
void attack();
void attack(vector<Bullet*>& monster_bullets);
virtual void avoid_bullet(vector<Bullet*> & hero_bullets, bool& able_to_go) =0;
virtual void follow_target() =0;
};
#endif // BASESHOOTERMONSTER_H
|
5652b386c451b258b6997b0fe0be685390a3c79a | 2ea7ef6b80f58888b76c786b1dcb327074157867 | /EulerRender/src/graphics/Skybox.cpp | cba39c9fe3964e17c3fbaba4964ab89d280b3acb | [
"MIT"
] | permissive | jjovanovski/EulerRender | ec4fb8cca3663e44d55f65730a65eae2195bcf9f | 9ef87b4c0c3667414edc8104c84d3ac08aa2303d | refs/heads/master | 2020-04-09T05:36:46.741745 | 2019-02-09T18:27:57 | 2019-02-09T18:27:57 | 160,071,807 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,915 | cpp | Skybox.cpp | #include "Skybox.h"
#include <stb_image.h>
#include <iostream>
using namespace Euler;
Skybox::Skybox(std::vector<std::string> textures) {
// create texture
glGenTextures(1, &id);
glBindTexture(GL_TEXTURE_CUBE_MAP, id);
int width, height, channels;
for (int i = 0; i < textures.size(); i++) {
unsigned char* data = stbi_load(textures[i].c_str(), &width, &height, &channels, 0);
if (data) {
if (channels == 4) {
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
} else {
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
}
}
stbi_image_free(data);
}
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
skyboxMesh = new Mesh();
int rings = 30;
int sectors = 30;
float d_theta = 180.0f / rings;
float d_phi = 360.0f / sectors;
float theta = -90.0f;
float phi = 0.0f;
float PI = 3.141592f;
float DEG = PI / 180.0f;
float x, y, z;
for (int i = 0; i <= rings; i++) {
phi = 0.0f;
for (int j = 0; j < sectors; j++) {
float x = cos(theta*DEG)*cos(phi*DEG);
float y = cos(theta*DEG)*sin(phi*DEG);
float z = sin(theta*DEG);
float u = atan2(x, z) / (2.0 * PI) + 0.5f;
float v = y * 0.5f + 0.5f;
float normalLen = x * x + y * y + z * z;
float dot = y;
float tx = 0 - x * (dot / normalLen);
float ty = 1 - y * (dot / normalLen);
float tz = 0 - z * (dot / normalLen);
skyboxMesh->vertices.push_back(Vertex(x, y, z, x, y, z, 3 * u, v, tx, ty, tz));
if (j < sectors) {
skyboxMesh->indices.push_back((i + 1)*(sectors)+(j + 1) % sectors);
skyboxMesh->indices.push_back(i*(sectors)+(j + 1) % sectors);
skyboxMesh->indices.push_back(i*(sectors)+j);
skyboxMesh->indices.push_back((i + 1)*(sectors)+j);
skyboxMesh->indices.push_back((i + 1)*(sectors)+(j + 1) % sectors);
skyboxMesh->indices.push_back(i*(sectors)+j);
}
phi += d_phi;
}
theta += d_theta;
}
skyboxMesh->Upload();
/*// create mesh
float skyboxVertices[] = {
// Front face
-1.0, -1.0, 1.0,
1.0, -1.0, 1.0,
1.0, 1.0, 1.0,
-1.0, 1.0, 1.0,
// Back face
-1.0, -1.0, -1.0,
-1.0, 1.0, -1.0,
1.0, 1.0, -1.0,
1.0, -1.0, -1.0,
// Top face
-1.0, 1.0, -1.0,
-1.0, 1.0, 1.0,
1.0, 1.0, 1.0,
1.0, 1.0, -1.0,
// Bottom face
-1.0, -1.0, -1.0,
1.0, -1.0, -1.0,
1.0, -1.0, 1.0,
-1.0, -1.0, 1.0,
// Right face
1.0, -1.0, -1.0,
1.0, 1.0, -1.0,
1.0, 1.0, 1.0,
1.0, -1.0, 1.0,
// Left face
-1.0, -1.0, -1.0,
-1.0, -1.0, 1.0,
-1.0, 1.0, 1.0,
-1.0, 1.0, -1.0
};
skyboxMesh = new Mesh();
for (int i = 0; i < 3 * 4 * 6; i += 3) {
skyboxMesh->vertices.push_back(Vertex(skyboxVertices[i], skyboxVertices[i + 1], skyboxVertices[i + 2]));
}
int skyboxIndices[] = {
0, 1, 2, 0, 2, 3, // front
4, 5, 6, 4, 6, 7, // back
8, 9, 10, 8, 10, 11, // top
12, 13, 14, 12, 14, 15, // bottom
16, 17, 18, 16, 18, 19, // right
20, 21, 22, 20, 22, 23, // left
};
// add the indices in reversed winding order
for (int i = 35; i >= 0; i--) {
skyboxMesh->indices.push_back(skyboxIndices[i]);
}
skyboxMesh->Upload();*/
}
Skybox::~Skybox() {
Dispose();
}
void Skybox::Dispose() {
delete skyboxMesh;
glDeleteTextures(1, &id);
}
void Skybox::Draw() {
glDepthMask(GL_FALSE);
skyboxMesh->Bind();
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_CUBE_MAP, id);
glDrawElements(GL_TRIANGLES, skyboxMesh->indices.size(), GL_UNSIGNED_INT, 0);
glDepthMask(GL_TRUE);
} |
989b2cc814a6aeb1f2cb3da2430ba68ac845b371 | 84b1b3f4bd827502475ca657844608867b8fc275 | /kinectsSyphonServer/src/ofApp.cpp | a3726be2dc5b49ccfe874f29b279267f48cc6fa5 | [] | no_license | pampanie/kinectsSyphonServer | 7a7f6aca0bd62c9912305d7854db4b7d5ea3d509 | d594195aacfd6e9d75de2510232acfe26119a1e0 | refs/heads/master | 2020-03-07T13:36:07.130636 | 2018-03-31T09:34:12 | 2018-03-31T09:34:12 | 127,505,249 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,921 | cpp | ofApp.cpp | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetLogLevel(OF_LOG_VERBOSE);
ofSetFrameRate(30);
ofSetVerticalSync(false);
// init syphon servers
k1SyphonServer.setName("kinect1 output syphon");
k2SyphonServer.setName("kinect2 output syphon");
// init kinect kinect2 .............................................
kinect1.setRegistration(true);
// kinect1.init();
//kinect.init(true); // shows infrared instead of RGB video image
kinect1.init(false, false); // disable video image (faster fps)
kinect1.open(); // opens first available kinect
//kinect.open(1); // open a kinect by id, starting with 0 (sorted by serial # lexicographically))
//kinect.open("A00362A08602047A"); // open a kinect using it's unique serial #
// print the intrinsic IR sensor values
if(kinect1.isConnected()) {
ofLogNotice() << "sensor-emitter dist: " << kinect1.getSensorEmitterDistance() << "cm";
ofLogNotice() << "sensor-camera dist: " << kinect1.getSensorCameraDistance() << "cm";
ofLogNotice() << "zero plane pixel size: " << kinect1.getZeroPlanePixelSize() << "mm";
ofLogNotice() << "zero plane dist: " << kinect1.getZeroPlaneDistance() << "mm";
}
// colorImg.allocate(kinect1.width, kinect1.height);
k1GrayImage.allocate(kinect1.width, kinect1.height);
k1GrayImageThreshNear.allocate(kinect1.width, kinect1.height);
k1GrayImageThreshFar.allocate(kinect1.width, kinect1.height);
//see how many devices we have.
ofxKinectV2 tmp;
vector <ofxKinectV2::KinectDeviceInfo> deviceList = tmp.getDeviceList();
// cout << deviceList.size() << endl;
kinect2.open(deviceList[0].serial);
k2GrayImage.allocate(kinect2.getDepthPixels().getWidth(),kinect2.getDepthPixels().getHeight());
k2GrayImageThreshNear.allocate(kinect2.getDepthPixels().getWidth(), kinect2.getDepthPixels().getHeight());
k2GrayImageThreshFar.allocate(kinect2.getDepthPixels().getWidth(), kinect2.getDepthPixels().getHeight());
gui.setup("settings");
gui.setDefaultBackgroundColor(ofColor(0, 0, 0, 127));
gui.setDefaultFillColor(ofColor(160, 160, 160, 160));
// ............... kinect
gui.add(bThreshWithOpenCV.set("thresh with opencv",false));
gui.add(k1GrayThreshNear.set("kinect1 near",0,1,255));
gui.add(k1GrayThreshFar.set("kinect1 far",0,1,255));
gui.add(k1Angle.set("kinect1 angle",0,2,90));
gui.add(k2Near.set("kinect2 near",0,100,10000));
gui.add(k2Far.set("kinect2 far",0,100,6000));
// gui.add(k2Angle.set("kinect2 angle",0,2,90));
gui.add(k2GrayThreshNear.set("kinect2 gray near",0,1,255));
gui.add(k2GrayThreshFar.set("kinect2 gray far",0,1,255));
// seva setting with give name
if (!ofFile("settings.xml"))
gui.saveToFile("settings.xml");
gui.loadFromFile("settings.xml");
}
//--------------------------------------------------------------
void ofApp::update(){
kinect1.setCameraTiltAngle(k1Angle.get());
kinect1.update();
// there is a new frame and we are connected
if(kinect1.isFrameNew()) {
// load grayscale depth image from the kinect1 source
k1GrayImage.setFromPixels(kinect1.getDepthPixels());
// we do two thresholds - one for the far plane and one for the near plane
// we then do a cvAnd to get the pixels which are a union of the two thresholds
if(bThreshWithOpenCV) {
k1GrayImageThreshNear = k1GrayImage;
k1GrayImageThreshFar = k1GrayImage;
k1GrayImageThreshNear.threshold(k1GrayThreshNear.get(), true);
k1GrayImageThreshFar.threshold(k1GrayThreshFar.get());
cvAnd(k1GrayImageThreshNear.getCvImage(), k1GrayImageThreshFar.getCvImage(), k1GrayImage.getCvImage(), NULL);
} else {
// or we do it ourselves - show people how they can work with the pixels
ofPixels & pix = k1GrayImage.getPixels();
int numPixels = pix.size();
for(int i = 0; i < numPixels; i++) {
if(pix[i] < k1GrayThreshNear.get() && pix[i] > k1GrayThreshFar.get()) {
pix[i] = 255;
} else {
pix[i] = 0;
}
}
}
// update the cv images
k1GrayImage.flagImageChanged();
}
// kinect2
kinect2.update();
if(kinect2.isFrameNew()){
kinect2.minDistance = k2Near.get();
kinect2.maxDistance = k2Far.get();
// load grayscale depth image from the kinect1 source
k2GrayImage.setFromPixels(kinect2.getDepthPixels());
// we do two thresholds - one for the far plane and one for the near plane
// we then do a cvAnd to get the pixels which are a union of the two thresholds
if(bThreshWithOpenCV) {
k2GrayImageThreshNear = k2GrayImage;
k2GrayImageThreshFar = k2GrayImage;
k2GrayImageThreshNear.threshold(k2GrayThreshNear.get(), true);
k2GrayImageThreshFar.threshold(k2GrayThreshFar.get());
cvAnd(k2GrayImageThreshNear.getCvImage(), k2GrayImageThreshFar.getCvImage(), k2GrayImage.getCvImage(), NULL);
} else {
// or we do it ourselves - show people how they can work with the pixels
ofPixels & pix = k2GrayImage.getPixels();
int numPixels = pix.size();
for(int i = 0; i < numPixels; i++) {
if(pix[i] < k2GrayThreshNear.get() && pix[i] > k2GrayThreshFar.get()) {
pix[i] = 255;
} else {
pix[i] = 0;
}
}
}
// update the cv images
k2GrayImage.flagImageChanged();
}
k1SyphonServer.publishTexture(&k1GrayImage.getTexture());
k2SyphonServer.publishTexture(&k2GrayImage.getTexture());
}
//--------------------------------------------------------------
void ofApp::draw(){
k1GrayImage.draw(650,0);
k2GrayImage.draw(0,0);
gui.draw();
}
//--------------------------------------------------------------
void ofApp::exit(){
kinect1.setCameraTiltAngle(0); // zero the tilt on exit
kinect1.close();
kinect2.close();
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y ){
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseEntered(int x, int y){
}
//--------------------------------------------------------------
void ofApp::mouseExited(int x, int y){
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){
}
|
c7bac926228025e666f13bcfb1815cad4920b773 | 9d097f6ab5eac8ea4e7ed3c8a60eba53ba7d0603 | /main.cpp | e1a6a7dfec4c372485dcddd98e7712815821d210 | [] | no_license | zh0ng/gameProgram2016_1 | 2eb2dc91ed3cdf646a344638aa8905518a372130 | 2001c079435111c2e22adc30165e17c9d4bc6004 | refs/heads/master | 2020-06-11T02:16:01.617802 | 2016-12-11T13:32:40 | 2016-12-11T13:32:40 | 76,025,326 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 4,122 | cpp | main.cpp | #include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "gl/glut.h"
// 轨道宽度
const GLfloat INNER_TORUS_RADIUS = 0.02;
GLfloat originX = 0.0;
GLfloat originY = 4.0;
GLfloat originZ = -22.0;
GLfloat speedRatio = 1.0;
GLfloat originAngle = -55.0;
// 行星
GLfloat rot0 = 0.0;
GLfloat rot1 = 0.0;
GLfloat rot2 = 0.0;
GLfloat rot3 = 0.0;
GLfloat rot4 = 0.0;
GLfloat rot5 = 0.0;
GLfloat rot6 = 0.0;
GLfloat rot7 = 0.0;
GLfloat rot8 = 0.0;
GLfloat rot9 = 0.0;
void solidSphere(GLdouble radius, GLint slices = 32, GLint stacks = 32)
{
glutSolidSphere(radius, slices, stacks);
}
void drawPlanet(GLfloat r, GLfloat g, GLfloat b, GLfloat torus_radius, GLfloat angularSpeed,
GLfloat radius, void (*fun)() = NULL)
{
glPushMatrix();
glColor3f(r, g, b);
// 辅助轨道
glRotatef(90, 1.0, 0, 0.0);
glutSolidTorus(INNER_TORUS_RADIUS, torus_radius, 10, 64);
glRotatef(-90, 1.0, 0, 0.0);
// 公转速度
glRotatef(angularSpeed, 0.0, 1.0, 0.0);
// 公转半径
glTranslatef(torus_radius, 0.0, 0.0);
solidSphere(radius);
if (fun != NULL)
fun();
glPopMatrix();
}
// 绘制地球的卫星-月亮
void drawMoon()
{
const GLfloat r = 0.6;
glColor3f(0.5, r, 0.5);
glRotatef(rot9, 0.0, 1.0, 0.0);
glTranslatef(r, 0.0, 0.0);
solidSphere(0.1, 10, 8);
}
// 绘制土星光环
void drawSaturnRing()
{
glRotatef(90, 1.0, 0, 0.0);
glutSolidTorus(0.1, 1.25, 10, 64);
glutSolidTorus(0.07, 1.65, 10, 64);
}
void display()
{
// 清空画面
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glLoadIdentity();
glTranslatef(originX, originY, originZ);
glRotatef(90.0 + originAngle, 1.0, 0.0, 0);
// 太阳
glColor3f(1.0, 0.0, 0.0);
solidSphere(2.0);
// 水星
drawPlanet(0.0, 1.0, 1.0, 2.5, rot0, 0.2);
// 金星
drawPlanet(0.0, 1.0, 0.0, 3.4, rot1, 0.3);
// 地球
drawPlanet(0.0, 0.0, 1.0, 5.0, rot2, 0.4, drawMoon);
// 火星
drawPlanet(1.0, 0.0, 0.0, 6.6, rot3, 0.5);
// 木星
drawPlanet(1.0, 0.1, 1.0, 8.5, rot4, 1.0);
// 土星
drawPlanet(1.0, 1.0, 0.0, 12.5, rot5, 0.85, drawSaturnRing);
// 天王星
drawPlanet(0.0, 1.0, 1.0, 15.5, rot6, 0.15);
// 海王星
drawPlanet(0.0, 0.0, 0.5, 17.5, rot7, 0.145);
// 冥王星
drawPlanet(0.5, 0.5, 0.5, 19.5, rot8, 0.145);
glutSwapBuffers();
glFlush();
}
void rotate(GLfloat& rot, GLfloat angle)
{
rot += angle * speedRatio;
if (rot >= 360.0)
rot -= 360.0;
}
void idle()
{
rotate(rot2, 0.1);
rotate(rot0, 0.416);
rotate(rot1, 0.1631);
rotate(rot3, 0.053);
rotate(rot4, 0.0083);
rotate(rot5, 0.0034);
rotate(rot6, 0.00119);
rotate(rot7, 0.00069);
rotate(rot8, 0.0008);
rotate(rot9, 1.0);
glutPostRedisplay();
}
void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei)w, (GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(70.0, (GLdouble)w / (GLdouble)h, 1.0, 100.0);
glMatrixMode(GL_MODELVIEW);
}
void onSpecialKeyDown(int key, int x, int y)
{
printf("key=%d\n", key);
switch (key)
{
case 101:
originY -= 0.2;
break;
case 103:
originY += 0.2;
break;
case 100:
originX += 0.2;
break;
case 102:
originX -= 0.2;
break;
case 104:
originAngle += 1.5;
break;
case 105:
originAngle -= 1.5;
break;
}
}
void onNormalKeyDown(unsigned char key, int x, int y)
{
printf("key=%c\n", key);
switch (key)
{
case '-':
originZ -= 0.2;
break;
case '=':
originZ += 0.2;
break;
case '[':
speedRatio -= 0.15;
break;
case ']':
speedRatio += 0.15;
break;
case 27:
exit(0);
break;
}
}
void main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(900, 600);
glutInitWindowPosition(80, 80);
glutCreateWindow("九大行星模拟(方向键:平移,-=键:缩放,[]键:运行速度,PgDn/PgUp键:观察角度)");
glutKeyboardFunc(onNormalKeyDown);
glutSpecialFunc(onSpecialKeyDown);
// 设置背景色为黑色
glClearColor(0.0, 0.0, 0.0, 0.0);
glClearDepth(1.0);
glShadeModel(GL_FLAT);
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutIdleFunc(idle);
glutMainLoop();
return;
} |
ae2b71b4d67f216895df91ec7269b23333300075 | 1634d4f09e2db354cf9befa24e5340ff092fd9db | /Wonderland/Wonderland/Old Files/Source/Engine/Systems/Resource System/Texture/FTexture.cpp | ad6c4929bf26ef066fc32c8c8e7657688390a459 | [
"MIT"
] | permissive | RodrigoHolztrattner/Wonderland | cd5a977bec96fda1851119a8de47b40b74bd85b7 | ffb71d47c1725e7cd537e2d1380962b5dfdc3d75 | refs/heads/master | 2021-01-10T15:29:21.940124 | 2017-10-01T17:12:57 | 2017-10-01T17:12:57 | 84,469,251 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,869 | cpp | FTexture.cpp | ///////////////////////////////////////////////////////////////////////////////
// Filename: FTexture.cpp
///////////////////////////////////////////////////////////////////////////////
#include "FTexture.h"
#include "..\..\Video\FGraphic.h"
#include "..\..\Support\File\FDataSeeker.h"
FTexture::FTexture()
{
}
FTexture::FTexture(const FTexture& other)
{
}
FTexture::~FTexture()
{
}
void FTexture::Release()
{
// Call the base function
IResource::Release();
}
void FTexture::Load(unsigned char* _resourceData)
{
bool result;
// Load the targa image
result = LoadTarga(_resourceData, 0); // _textureUnit ?
if (!result)
{
// ASSERT
return;
}
return;
}
void FTexture::Update(float _time)
{
// ...
// ...
}
bool FTexture::LoadTarga(unsigned char* _resourceData, unsigned int _textureUnit)
{
FDataSeeker dataSeeker;
int width, height, bpp, imageSize;
unsigned int count;
TargaHeader targaFileHeader;
// Get the file header.
dataSeeker.Get(sizeof(TargaHeader), _resourceData, &targaFileHeader);
// Get the important information from the header.
width = (int)targaFileHeader.width;
height = (int)targaFileHeader.height;
bpp = (int)targaFileHeader.bpp;
// Set the texture size
m_TextureSize.x = width;
m_TextureSize.y = height;
// Check that it is 32 bit and not 24 bit.
if (bpp != 32)
{
return false;
}
// Calculate the size of the 32 bit image data.
imageSize = width * height * 4;
// Get space for the raw data
m_TextureRawData = new unsigned char[imageSize];
// Read in the targa image data.
dataSeeker.Get(imageSize, _resourceData, m_TextureRawData);
// Set the unique texture unit in which to store the data.
glActiveTexture(GL_TEXTURE0 + _textureUnit);
// Generate an ID for the texture.
glGenTextures(1, &m_TextureHandle);
// Bind the texture as a 2D texture.
glBindTexture(GL_TEXTURE_2D, m_TextureHandle);
// Load the image data into the texture unit.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_TextureRawData);
// Set the texture color to either wrap around or clamp to the edge.
if (true)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
}
else
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
}
// Set the texture filtering.
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
// Generate mipmaps for the texture.
glGenerateMipmap(GL_TEXTURE_2D);
// Set that the texture is loaded.
// m_Loaded = true;
return true;
}
bool FTexture::SetShaderTexture(unsigned int _shaderProgram, unsigned int _textureSlot, unsigned int _texturePosition, const char* _textureName)
{
unsigned int location;
// Set the active texture and bind it
glActiveTexture(_textureSlot);
glBindTexture(GL_TEXTURE_2D, GetHandle());
// Set the texture in the pixel shader to use the data from the first texture unit.
location = glGetUniformLocation(_shaderProgram, _textureName);
if (location == -1)
{
return false;
}
glUniform1i(location, _texturePosition);
return true;
}
WVector4 FTexture::PixelInfo(WVector2 _textureCoordinate)
{
WVector2 coordinates;
unsigned int pixelIndex;
// Get the real coordinates
coordinates.x = Lerp(0.0f, m_TextureSize.x, _textureCoordinate.x);
coordinates.y = Lerp(0.0f, m_TextureSize.y, _textureCoordinate.y);
// Set the pixel index
pixelIndex = (coordinates.y * m_TextureSize.y * 4) + coordinates.x * 4; // Maybe is the inverse order
// Return the pixel info
return WVector4(m_TextureRawData[pixelIndex + 0] / 256.0f, m_TextureRawData[pixelIndex + 1] / 256.0f, m_TextureRawData[pixelIndex + 2] / 256.0f, m_TextureRawData[pixelIndex + 3] / 256.0f);
} |
4e140917e9164d93ea60e587d4a77209164bdb2d | 83b05bc83a25b8b90c52e2ba83dc67990c767814 | /include/draw.h | 78d818bdbb45267bc4cc1ec4a2ee78625f7a80b5 | [] | no_license | XueQinliang/monopoly | 2942bd66da8110f6e1bf9f623d1bd805c9010003 | d7a39912079adf76b3daf77e16de0ca6f76e0d0e | refs/heads/main | 2023-04-18T21:32:04.304152 | 2021-05-10T08:43:43 | 2021-05-10T08:43:43 | 365,968,428 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 651 | h | draw.h | #ifndef DRAW_H
#define DRAW_H
#include "person.h"
using namespace std;
Vector2 PositionTransfer(int i);
void mapdrawblocks(Block blocksi[20]);
void mapdrawline();
void mapdrawdice(int value);
void mapdrawpeoplepicture(Person player[]);
void mapdrawpeoplecare();
void mapdrawpeople(Person player[]);
void mapdrawpeopleinfo();
void mapdrawblockinfo(int x, int y);
void mapdrawmessagegivemoney();
void mapdrawmessagehouse();
void mapdrawmessageblock();
void mapdrawturn();
void mapdrawtitle();
void DrawBlock(Block block, Vector2 position);
void mapdrawdisplay();
void mapdrawover(Color c = BLACK);
extern int choosebutton;
#endif |
3ef97b1e4e0fce1f625081dca75e67b028a6757e | b02b68bf92724d9dea0644c5a3a5b60fe6811e87 | /src/GNDStk/Defaulted/test/Defaulted.test.cpp | b01999a9123ba5b9c8d629b36245eb706a8283cb | [
"BSD-2-Clause"
] | permissive | njoy/GNDStk | c7c86390acd969a40102e5fb120f00a16a9f5408 | 208d078db20abce5baa5185b4c50be52f094444a | refs/heads/master | 2023-08-19T03:48:33.362623 | 2021-11-04T14:44:10 | 2021-11-04T14:44:10 | 210,242,550 | 2 | 1 | NOASSERTION | 2023-07-19T19:42:11 | 2019-09-23T01:47:06 | C++ | UTF-8 | C++ | false | false | 234 | cpp | Defaulted.test.cpp |
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "GNDStk.hpp"
SCENARIO("Testing Defaulted<T>") {
// fixme
// Is there really anything to do here, for Defaulted<T>
// in general, that isn't already in other tests?
}
|
c748f97568ecec121d932119f38569b004b23f11 | f6a8c46fed9988802e1d58bce865964c2efd63f7 | /cpp_07/ex00/main.cpp | 41bc5281d20d8b5512384af4acb45851c3d8dc67 | [] | no_license | aquinoa-nba/Cpp_modules | adedf7e955f56e01d3bde5643e3cb0512deee7a8 | dd36891f15b4d7a91dbeef5b850eea4f8257307b | refs/heads/master | 2023-08-19T02:27:54.814411 | 2021-10-08T16:02:55 | 2021-10-08T16:02:55 | 372,608,645 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,141 | cpp | main.cpp | #include "whatever.hpp"
int main(void)
{
{
int intValue1(1);
int intValue2(2);
std::string str1("String 1");
std::string str2("String 2");
for (int i = 0; i < 2; i++)
{
std::cout << '\n';
std::cout << intValue1 << ' ' << intValue2 << "\n" << str1 << ' ' << str2 << "\n";
std::cout << "min int: " << min(intValue1, intValue2) << '\n';
std::cout << "max int: " << max(intValue1, intValue2) << '\n';
std::cout << "min str: " << min(str1, str2) << '\n';
std::cout << "max str: " << max(str1, str2) << '\n';
swap(intValue1, intValue2);
swap(str1, str2);
}
}
std:: cout << "__________________________\n\n";
{
int a = 2;
int b = 3;
::swap( a, b );
std::cout << "a = " << a << ", b = " << b << std::endl;
std::cout << "min( a, b ) = " << ::min( a, b ) << std::endl;
std::cout << "max( a, b ) = " << ::max( a, b ) << std::endl;
std::string c = "chaine1";
std::string d = "chaine2";
::swap(c, d);
std::cout << "c = " << c << ", d = " << d << std::endl;
std::cout << "min( c, d ) = " << ::min( c, d ) << std::endl;
std::cout << "max( c, d ) = " << ::max( c, d ) << std::endl;
}
}
|
d5d677471368ad9d9655ca52a63a9ddcc90e4ddd | e7aeaee39ec0eb4239e182e4e36178dbd0055dbe | /src/Request.cpp | 68c0d758696fd73514154ec7b61817853653fa3b | [
"MIT"
] | permissive | stefjen07/SwiftySyncCommon | df4fc29694b9e3c0d3eda1160607c013135ac0a7 | 70c4fb8636f8da8b31124ba32b0d7b015c68ed87 | refs/heads/main | 2023-07-15T17:53:18.728529 | 2021-08-24T15:05:53 | 2021-08-24T15:05:53 | 389,103,837 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,234 | cpp | Request.cpp | #include "Request.hpp"
using namespace std;
void DataRequest::encode(CoderContainer* container) {
if (container->type == CoderType::json) {
JSONEncodeContainer* jsonContainer = dynamic_cast<JSONEncodeContainer*>(container);
jsonContainer->encode(collectionName, "collection");
jsonContainer->encode(documentName, "document");
jsonContainer->encode(body, "body");
jsonContainer->encode(id, "id");
}
}
void DataRequest::decode(CoderContainer* container) {
if (container->type == CoderType::json) {
JSONDecodeContainer* jsonContainer = dynamic_cast<JSONDecodeContainer*>(container);
collectionName = jsonContainer->decode(string(), "collection");
documentName = jsonContainer->decode(string(), "document");
body = jsonContainer->decode(string(), "body");
id = jsonContainer->decode(string(), "id");
}
}
void FieldRequest::encode(CoderContainer* container) {
if (container->type == CoderType::json) {
JSONEncodeContainer* jsonContainer = dynamic_cast<JSONEncodeContainer*>(container);
jsonContainer->encode(value, "value");
jsonContainer->encode(path, "path");
}
}
void FieldRequest::decode(CoderContainer* container) {
if (container->type == CoderType::json) {
JSONDecodeContainer* jsonContainer = dynamic_cast<JSONDecodeContainer*>(container);
value = jsonContainer->decode(string(), "value");
path = jsonContainer->decode(vector<string>(), "path");
}
}
void FunctionRequest::encode(CoderContainer* container) {
if (container->type == CoderType::json) {
JSONEncodeContainer* jsonContainer = dynamic_cast<JSONEncodeContainer*>(container);
jsonContainer->encode(name, "name");
jsonContainer->encode(inputData, "input");
jsonContainer->encode(id, "id");
}
}
void FunctionRequest::decode(CoderContainer* container) {
if (container->type == CoderType::json) {
JSONDecodeContainer* jsonContainer = dynamic_cast<JSONDecodeContainer*>(container);
name = jsonContainer->decode(string(), "name");
inputData = jsonContainer->decode(DataUnit(), "input");
id = jsonContainer->decode(string(), "id");
}
} |
a9d4c41e8727af838f837364e9665b36ebfb4141 | c20c4812ac0164c8ec2434e1126c1fdb1a2cc09e | /Source/Source/KG3DEngine/KG3DEngine/KG3DModelShadowRenderer.h | a3c9691f67b6225366dc91f4e2bbeebba8bdac10 | [
"MIT"
] | permissive | uvbs/FullSource | f8673b02e10c8c749b9b88bf18018a69158e8cb9 | 07601c5f18d243fb478735b7bdcb8955598b9a90 | refs/heads/master | 2020-03-24T03:11:13.148940 | 2018-07-25T18:30:25 | 2018-07-25T18:30:25 | 142,408,505 | 2 | 2 | null | 2018-07-26T07:58:12 | 2018-07-26T07:58:12 | null | GB18030 | C++ | false | false | 2,169 | h | KG3DModelShadowRenderer.h | ////////////////////////////////////////////////////////////////////////////////
//
// FileName : KG3DModelShadowRendererSolid.h
// Version : 1.0
// Creator : Chen Tianhong
// Create Date : 2007-9-17 15:35:13
// Comment :
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _INCLUDE_KG3DMODELSHADOWRENDERER_H_
#define _INCLUDE_KG3DMODELSHADOWRENDERER_H_
#include "KG3DCommonObject.h"
////////////////////////////////////////////////////////////////////////////////
class KG3DTexture;
struct KG3DModelShadowRendererEffectParams;
class KG3DModel;
struct KG3DModelShadowRenderer : public KG3DCommonObjectSimple
{
virtual HRESULT Render(KGCH::TFrontAccessProxy<KG3DModel*>& SortedModelsIt) = 0; //保证同时只有一个Scene在用,不然会出错,现在StrentchRect的操作异步
STDMETHOD(FrameMove)(THIS)PURE;
virtual ULONG STDMETHODCALLTYPE Release( void)PURE;
virtual HRESULT InputShadowDummy(const D3DXVECTOR3& Pos, FLOAT fScaleFactor) = 0;//外部的,需要绘制脚底影子的,从这里Input。必须在渲染过程中Input,然后在Render中会被Flush掉。因为ModelShadowRender是Singleton,所以要在但个渲染过程中保持对其独占,即在一个Render中Input并Render。当然如果不用这个函数,就没有这个问题。
virtual ULONG SynchronizedStrenchRect(BOOL bSynchronized) = 0; //返回旧的状态
virtual ~KG3DModelShadowRenderer() = 0{}
static bool IsModelShadowNeedToBeRender(KG3DModel& modelRef);
};
struct KG3DModelShadowRendererDummy : public KG3DModelShadowRenderer
{
STDMETHOD_(ULONG, GetType)(){return 0;}
virtual HRESULT Render(KGCH::TFrontAccessProxy<KG3DModel*>& SortedModelsIt){return E_FAIL;}
STDMETHOD(FrameMove)(THIS){return E_FAIL;}
virtual ULONG STDMETHODCALLTYPE Release( void){return 0;}
virtual HRESULT InputShadowDummy(const D3DXVECTOR3& Pos, FLOAT fScaleFactor){return E_FAIL;}
virtual ULONG SynchronizedStrenchRect(BOOL bSynchronized){return TRUE;}
};
KG3DModelShadowRenderer& g_GetModelShadowRenderer();//需要时会自动构建
VOID g_ModelShadowRendererRelease();
#endif //_INCLUDE_KG3DMODELSHADOWRENDERER_H_
|
363465377da849665a294d59d0e9f61c96125442 | 9605ae8945f85f71c069885848c46c33454b9331 | /source/BaseTexture.h | 84394428ae864abc0bbdc20d2e0c6802b61dad0d | [] | no_license | tectronics/cvekas | f7e197f62c6a454feb0c75324defd1878f2db371 | 70b97c27730f7536718f07e44dc71c8bae7705f2 | refs/heads/master | 2018-03-26T07:45:38.654284 | 2010-04-26T20:38:53 | 2010-04-26T20:38:53 | 48,547,868 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,327 | h | BaseTexture.h | #ifndef BASETEXTURE_H
#define BASETEXTURE_H
#include "Resource.h"
#include "CommonTypes.h"
#include "MemUtils.h"
namespace Cvekas {
/// Base of all texture types
class BaseTexture : public Resource
{
public:
/// Constructor
BaseTexture(ResourceId id, D3DDevicePtr device, const std::string& name, D3DFORMAT format)
:
Resource(name, id),
texture(NULL),
device(device),
format(format),
is_released(false)
{};
/// Destructor
virtual ~BaseTexture()
{
if(!is_released)
{
safeRelease(texture);
is_released = true;
}
};
/// Returns pointer to IDirect3DBaseTexture9 stored in this %BaseTexture
IDirect3DBaseTexture9* getD3DTexture() const { return texture; };
/// Returns format of texture
const D3DFORMAT getFormat() const { return format; };
/// TEMPORARY: Returns description of top level of texture (first mipmap, or whole texture if no mipmaps)
const D3DSURFACE_DESC& getTopLevelDescription() const { return description; };
virtual void onDeviceLost() = 0;
virtual void onDeviceReset() = 0;
protected:
IDirect3DBaseTexture9* texture;
D3DDevicePtr device;
D3DFORMAT format;
D3DSURFACE_DESC description;
bool is_released;
};
typedef boost::shared_ptr<BaseTexture> TexturePtr;
} // namespace
#endif |
6783f29ee5ade97a796506f1cab7e2b74460ae6f | 558cc3137f86e478208c827c99b493069d9e50fe | /Chapter 14/Exercise 05/Exercise 05.cpp | 240736b1d045cffdee05dd7cb9b005ff8a688b80 | [] | no_license | j-mathes/PPP | 3d50645ad592fe265335158c170b0d5f40f82e02 | 4a616d1f6181823d60e1e53728cd77693b9f63a0 | refs/heads/master | 2021-04-12T08:26:05.510055 | 2019-01-23T03:38:39 | 2019-01-23T03:38:39 | 126,012,025 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,267 | cpp | Exercise 05.cpp | //----------------------------------------------------------------------------
// File: Exercise 05.cpp
// Date: 2019-01-01
// Author: Jared
//----------------------------------------------------------------------------
// Solution:Chapter 14
// Project: Exercise 05
//----------------------------------------------------------------------------
// Description: Striped Rectangle class
//----------------------------------------------------------------------------
#include "../../std_lib_facilities.h"
#include "../../Graph.h"
#include "../../Simple_window.h"
#include "../Classes/Striped_Rectangle.h"
//----------------------------------------------------------------------------
// main
//----------------------------------------------------------------------------
int main()
try
{
using namespace Graph_lib;
const int tlX = 50;
const int tlY = 50;
const int winX = 800;
const int winY = 800;
Point tl{ tlX,tlY };
Simple_window win{ tl,winX,winY,"Chapter 14, Exercise 05" };
Striped_Rectangle sr(Point{ 50,50 }, 300, 100);
sr.set_color(Color::blue);
sr.set_fill_color(Color::green);
win.attach(sr);
win.wait_for_button();
return 0;
}
catch (exception& e)
{
cerr << "exception: " << e.what() << endl;
}
catch (...)
{
cerr << "exception\n";
} |
dbd2e8bdb7273bf39d7039ab51f6e3130a44866f | 397de467115775da05ae98426bca4583711df0c6 | /Visual C++ Example/第13章 网络编程/实例308——多人在线的网络聊天室——服务器/ChatRoomServer/ClientSocketList.cpp | d080ba1ade8b6752457140d594fc4e24b5e2c075 | [
"Unlicense"
] | permissive | hyller/GladiatorLibrary | d6f6dfae0026464950f67fd97877baeeb40b6c9a | f6b0b1576afae27ecd042055db5f655ccd41710b | refs/heads/master | 2023-04-27T11:26:09.118078 | 2022-03-31T08:22:16 | 2022-03-31T08:22:16 | 39,110,689 | 7 | 6 | Unlicense | 2023-04-21T20:51:57 | 2015-07-15T02:00:05 | C | UTF-8 | C++ | false | false | 1,056 | cpp | ClientSocketList.cpp | // ClientSocketList.cpp: implementation of the CClientSocketList class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ChatRoomServer.h"
#include "ClientSocketList.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CClientSocketList::CClientSocketList()
{
Head=0;
}
CClientSocketList::~CClientSocketList()
{
}
BOOL CClientSocketList::Add(CClientSocket *add)
{
CClientSocket *tmp=Head;
if (!Head)
{
Head=add;
return true;
}
while (tmp->Next) tmp=tmp->Next;
tmp->Next=add;
return true;
}
BOOL CClientSocketList::Sends(CClientSocket *tmp)
{
char buff[1000];
int n;
CClientSocket *curr=Head;
n=tmp->Receive(buff,1000);
buff[n]=0;
while (curr)
{
curr->Send(buff,n);
curr=curr->Next;
}
return true;
}
|
75883bd59033021f8e464a6d8c08daf0e4f2f2da | 2afbaf7cec2619c9102152de9593b7d59b1b05ed | /CConfig.cpp | 9e4d68e994df74d9ce5b8d6777e2dfd0d6b15436 | [] | no_license | Childcity/CS_IpCameraServer | 84e8fdb9b12ca6033ecc4c2cb17b1b3a2c3ebed9 | 54a121c84b34fbe9c35f06ab739c40ed7523d394 | refs/heads/master | 2020-04-18T21:00:48.599042 | 2019-04-24T08:20:33 | 2019-04-24T08:20:33 | 167,753,640 | 1 | 0 | null | 2019-03-22T23:37:27 | 2019-01-27T00:23:01 | C++ | UTF-8 | C++ | false | false | 10,197 | cpp | CConfig.cpp | #include "CConfig.h"
using INIWriter = samilton::INIWriter;
CConfig::KeyBindings::KeyBindings(const string exePath)
{
size_t found = exePath.find_last_of("/\\");
exeName_ = exePath.substr(found + 1);
exeFolderPath_ = exePath.substr(0, (exePath.size() - exeName_.size()));
dbPath = exeFolderPath_ + "defaultEmptyDb.sqlite3";
blockOrClusterSize = 4096;
waitTimeMillisec = 50;
countOfEttempts = 200;
allowCheckingSensProviderID = true;
ipAdress = "127.0.0.1";
port = 65044;
threads = 4;
timeoutToDropConnection = 5 * 60 * 1000; //5 min
logDir = exeFolderPath_ + "logs";
logToStdErr = false;
stopLoggingIfFullDisk = true;
verbousLog = 0;
minLogLevel = 0;
serviceName = "CS_IpCameraServerSvc";
};
CConfig::CConfig(string exePath)
: keyBindings(exePath)
, defaultKeyBindings(exePath) {
}
void CConfig::Load()
{
try{
setLocale();
updateKeyBindings();
initGlog();
LOG(INFO) <<"Log lines have next format:"
<<"\nLmmdd hh:mm:ss.uuuuuu threadid file:line] msg...";
}catch (std::exception &e){
LOG(FATAL) <<"Unexpected error: " <<e.what();
}
}
CConfig::Status CConfig::getStatus() const
{
return status;
}
void CConfig::setLocale() const
{
//std::locale cp1251_locale("ru_RU.CP866");
//std::locale::global(cp1251_locale);
setlocale(LC_CTYPE, "");
}
void CConfig::setStatusOk()
{
status = LOADED_OK;
}
void CConfig::setStatusError()
{
status = ERROR;
}
string CConfig::getConstructedNameOfLogDir() const
{
std::time_t t = std::time(nullptr); // get time now
std::tm *now = std::localtime(&t);
char dateTimeBuffer [80] = {' '};
strftime (dateTimeBuffer,80, "%d-%m-%Y_%H-%M-%S", now);
return string(dateTimeBuffer);
}
void CConfig::initGlog()
{
if( this->ERROR == getStatus() ){
keyBindings = defaultKeyBindings;
}
string newFolder = keyBindings.logDir + "/" + getConstructedNameOfLogDir();
fLS::FLAGS_log_dir = newFolder;
FLAGS_logtostderr = keyBindings.logToStdErr;
FLAGS_stop_logging_if_full_disk = keyBindings.stopLoggingIfFullDisk;
FLAGS_v = static_cast<google::int32>(keyBindings.verbousLog);
FLAGS_minloglevel = static_cast<google::int32>(keyBindings.minLogLevel);
#ifdef WIN32
CreateDirectoryW(ConverterUTF8_UTF16<std::string, std::wstring>(keyBindings.logDir).c_str(), NULL);
CreateDirectoryW(ConverterUTF8_UTF16<std::string, std::wstring>(newFolder).c_str(), NULL);
#else
google::InstallFailureSignalHandler();
int ret = mkdir(keyBindings.logDir.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
if ((0 != ret) && (EEXIST != errno)) {
//log directory not exist or permission denied or other error
LOG(FATAL) << "Error: can't create or use log dir '" << keyBindings.logDir << "': " << strerror(errno);
}
ret = mkdir(newFolder.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
if ((0 != ret) && (EEXIST != errno)) {
//log directory not exist or permission denied or other error
LOG(FATAL) << "Error: can't create or use log dir '" << newFolder << "': " << strerror(errno);
}
#endif // WIN32
google::InitGoogleLogging(defaultKeyBindings.exeName_.c_str());
}
void CConfig::updateKeyBindings() {
string pathToSettings = defaultKeyBindings.exeFolderPath_ + SETTINGS_FILE_NAME;
INIReader settings(pathToSettings);
if (settings.ParseError() < 0) {
//!!! This log massage go to stderr ONLY, because GLOG is not initialized yet !
LOG(WARNING) << "Can't load '" << pathToSettings << "', creating default bindings";
saveKeyBindings();
} else {
//Server settings
keyBindings.port = settings.GetInteger("ServerSettings", "Port", -1L);
keyBindings.threads = settings.GetInteger("ServerSettings", "Threads", -1L);
keyBindings.ipAdress = settings.Get("ServerSettings", "IpAddress", "0");
keyBindings.timeoutToDropConnection = settings.GetInteger("ServerSettings", "TimeoutToDropConnection", -1L);
keyBindings.allowCheckingSensProviderID = settings.GetBoolean("ServerSettings", "AllowCheckingSensProviderID", true);
//DB settings
keyBindings.dbPath = settings.Get("DatabaseSettings", "PathToDatabaseFile", "_a");
keyBindings.blockOrClusterSize = settings.GetInteger("DatabaseSettings", "BlockOrClusterSize", -1L);
keyBindings.waitTimeMillisec = settings.GetInteger("DatabaseSettings", "WaitTimeMillisec", -1L);
keyBindings.countOfEttempts = settings.GetInteger("DatabaseSettings", "CountOfAttempts", -1L);
//Log settings
keyBindings.logDir = settings.Get("LogSettings", "LogDir", "_a");
keyBindings.logToStdErr = settings.GetBoolean("LogSettings", "LogToStdErr", false);
keyBindings.stopLoggingIfFullDisk = settings.GetBoolean("LogSettings", "StopLoggingIfFullDisk", false);
keyBindings.verbousLog = settings.GetInteger("LogSettings", "DeepLogging", 0L);
keyBindings.minLogLevel = settings.GetInteger("LogSettings", "MinLogLevel", 0L);
//Service settings (only for windows)
keyBindings.serviceName = settings.Get("ServiceSettings", "ServiceName", "_a");
if (keyBindings.port <= 0L || keyBindings.threads <= 0L || keyBindings.ipAdress == "0"
|| keyBindings.blockOrClusterSize == -1L || keyBindings.countOfEttempts <= 0L
|| keyBindings.waitTimeMillisec <= 0L
|| keyBindings.timeoutToDropConnection <= 0L
|| keyBindings.dbPath == "_a"
|| keyBindings.logDir == "_a"
|| keyBindings.serviceName == "_a") {
//!!! This log massage go to stderr ONLY, because GLOG is not initialized yet !
LOG(WARNING) << "Format of settings is not correct. Trying to save settings by default...";
saveKeyBindings();
return;
}
if(keyBindings.logDir.empty()){
keyBindings.logDir = defaultKeyBindings.logDir;
}
if(keyBindings.serviceName.empty()){
keyBindings.serviceName = defaultKeyBindings.serviceName;
}
if (keyBindings.dbPath.empty()) {
keyBindings.dbPath = defaultKeyBindings.dbPath;
}
//If we |here|, settings loaded correctly and we can continue
setStatusOk();
}
}
void CConfig::saveKeyBindings() {
setStatusError();
INIWriter settings(INIWriter::INIcommentType::windowsType, true);
//Server settings
settings["ServerSettings"]["Port"] = defaultKeyBindings.port;
settings["ServerSettings"]["Threads"] = defaultKeyBindings.threads;
settings["ServerSettings"]["IpAddress"] = defaultKeyBindings.ipAdress;
settings["ServerSettings"]["TimeoutToDropConnection"]("5 min") = defaultKeyBindings.timeoutToDropConnection;
settings["ServerSettings"]["AllowCheckingSensProviderID"] = defaultKeyBindings.allowCheckingSensProviderID;
//DB settings
settings["DatabaseSettings"]["PathToDatabaseFile"] = defaultKeyBindings.dbPath;
settings["DatabaseSettings"]["BlockOrClusterSize"]("Set, according to your file system block/cluster size. This make sqlite db more faster") = defaultKeyBindings.blockOrClusterSize;
settings["DatabaseSettings"]["WaitTimeMillisec"]("Time, that thread waiting before next attempt to begin 'write transaction'") = defaultKeyBindings.waitTimeMillisec;
settings["DatabaseSettings"]["CountOfAttempts"]("Number of attempts to begin 'write transaction'") = defaultKeyBindings.countOfEttempts;
//Log settings
settings["LogSettings"]["LogDir"] = defaultKeyBindings.logDir;
settings["LogSettings"]["LogToStdErr"] = defaultKeyBindings.logToStdErr;
settings["LogSettings"]["StopLoggingIfFullDisk"] = defaultKeyBindings.stopLoggingIfFullDisk;
settings["LogSettings"]["DeepLogging"] = defaultKeyBindings.verbousLog;
settings["LogSettings"]["MinLogLevel"] = defaultKeyBindings.minLogLevel;
//Service settings (only for windows)
settings["ServiceSettings"]["ServiceName"]("Only for Windows! In *NIX this parameter will be missed") = defaultKeyBindings.serviceName;
string pathToSettings = defaultKeyBindings.exeFolderPath_ + SETTINGS_FILE_NAME;
std::ofstream file(pathToSettings, std::ios::trunc);
if(file.bad()){
//!!! This log massage go to stderr ONLY, because GLOG is not initialized yet !
LOG(WARNING) << "Can't open '" + pathToSettings +"' for writing. Default settings did not saved!";
return;
}
file << settings << std::endl
<< "\n; *** Log parameters ***\n"
"; Log lines have this form:\n"
"; \n"
"; Lmmdd hh : mm:ss.uuuuuu threadid file : line] msg...\n"
"; \n"
"; where the fields are defined as follows :\n"
"; \n"
"; L A single character, representing the log level\n"
"; (eg 'I' for INFO)\n"
"; mm The month(zero padded; ie May is '05')\n"
"; dd The day(zero padded)\n"
"; hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds\n"
"; threadid The space - padded thread ID as returned by GetTID()\n"
"; (this matches the PID on Linux)\n"
"; file The file name\n"
"; line The line number\n"
"; msg The user - supplied message\n"
"; \n"
"; Example:\n"
"; \n"
"; I1103 11 : 57 : 31.739339 24395 google.cc : 2341] Command line : . / some_prog\n"
"; I1103 11 : 57 : 31.739403 24395 google.cc : 2342] Process id 24395\n"
"; \n"
"; NOTE: although the microseconds are useful for comparing events on\n"
"; a single machine, clocks on different machines may not be well\n"
"; synchronized.Hence, use caution when comparing the low bits of\n"
"; timestamps from different machines.\n"
";\n"
"; Log messages to stderr(console)\t instead of logfiles\n"
"; LogToStdErr = false\n"
";\n"
"; This is ierarchy of errors: FATAL<-WARNINGS<-INFO\n"
"; Log message at or above this level. Default 0, that represent INFO and above\n"
"; MinLogLevel = 0\n"
";\n"
"; Deep log for debuging. 0 = off, 1 = on\n"
"; DeepLogging = 0\n"
"\n"
"; Log folder. Default tmp directory\n"
"; LogDir = logs\n"
"\n"
"; true - print log to standard error stream (by default it is console)\n"
"; false - print log to log file\n"
"; LogToStdErr = true\n"
"\n"
"; true - allow checking ip camera sensor provider. (If in db doesn't exist sensor provider -> skip camera_event from camera)\n"
"; AllowCheckingSensProviderID = true";
//!!! This log massage go to stderr ONLY, because GLOG is not initialized yet !
LOG(WARNING) << "Default settings saved to'" << pathToSettings << "'";
file.close();
} |
bb107412597147c0b44ece6ac65e1ac795ece4d2 | e0feac125fb92c3d1834f9c9c89baf4ab9428fc6 | /recclasses/private/recclasses/I3DirectHitsValues.cxx | 33db0a143bc49025930bbe4a69065d8a05ae9e9d | [] | no_license | AlexHarn/bfrv1_icetray | e6b04d04694376488cec93bb4b2d649734ae8344 | 91f939afecf4a9297999b022cea807dea407abe9 | refs/heads/master | 2022-12-04T13:35:02.495569 | 2020-08-27T22:14:40 | 2020-08-27T22:14:40 | 275,841,407 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,696 | cxx | I3DirectHitsValues.cxx | /**
* $Id$
*
* Copyright (C) 2012
* Martin Wolf <martin.wolf@icecube.wisc.edu>
* and the IceCube Collaboration <http://www.icecube.wisc.edu>
*
* @file I3DirectHitsValues.cxx
* @version $Revision$
* @date $Date$
* @author Martin Wolf <martin.wolf@icecube.wisc.edu>
* @brief This file contains the implementation of the I3DirectHitsValues class,
* which is an I3FrameObject holding the values for a particular class of
* direct hits.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* 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 <iostream>
#include "icetray/serialization.h"
#include "icetray/I3Units.h"
#include "recclasses/I3DirectHitsValues.h"
//______________________________________________________________________________
template <class Archive>
void
I3DirectHitsValues::
serialize(Archive& ar, unsigned version)
{
if(version > i3directhitsvalues_version_)
log_fatal("Attempting to read version %u from file but running version "
"%u of I3DirectHitsValues class.",
version, i3directhitsvalues_version_
);
ar & make_nvp("I3FrameObject", base_object<I3FrameObject>(*this));
ar & make_nvp("NDirStrings", this->nDirStrings_);
ar & make_nvp("NDirDoms", this->nDirDoms_);
ar & make_nvp("NDirPulses", this->nDirPulses_);
ar & make_nvp("QDirPulses", this->qDirPulses_);
ar & make_nvp("NEarlyStrings", this->nEarlyStrings_);
ar & make_nvp("NEarlyDoms", this->nEarlyDoms_);
ar & make_nvp("NEarlyPulses", this->nEarlyPulses_);
ar & make_nvp("QEarlyPulses", this->qEarlyPulses_);
ar & make_nvp("NLateStrings", this->nLateStrings_);
ar & make_nvp("NLateDoms", this->nLateDoms_);
ar & make_nvp("NLatePulses", this->nLatePulses_);
ar & make_nvp("QLatePulses", this->qLatePulses_);
ar & make_nvp("DirTrackLength", this->dirTrackLength_);
ar & make_nvp("DirTrackHitDistributionSmoothness", this->dirTrackHitDistributionSmoothness_);
}
I3_SERIALIZABLE(I3DirectHitsValues);
//______________________________________________________________________________
std::ostream&
operator<<(std::ostream& oss, const I3DirectHitsValues& rhs)
{
return(rhs.Print(oss));
}
std::ostream&
I3DirectHitsValues::Print(std::ostream& oss) const
{
oss << "I3DirectHitsValues(" <<
"NDirStrings: " << GetNDirStrings() << ", " <<
"NDirDoms: " << GetNDirDoms() << ", " <<
"NDirPulses: " << GetNDirPulses() << ", " <<
"QDirPulses [PE]: " << GetQDirPulses() << ", " <<
"NEarlyStrings: " << GetNEarlyStrings() << ", " <<
"NEarlyDoms: " << GetNEarlyDoms() << ", " <<
"NEarlyPulses: " << GetNEarlyPulses() << ", " <<
"QEarlyPulses [PE]: " << GetQEarlyPulses() << ", " <<
"NLateStrings: " << GetNLateStrings() << ", " <<
"NLateDoms: " << GetNLateDoms() << ", " <<
"NLatePulses: " << GetNLatePulses() << ", " <<
"QLatePulses [PE]: " << GetQLatePulses() << ", " <<
"DirTrackLength [m]: " << GetDirTrackLength()/I3Units::m << ", " <<
"DirTrackHitDistributionSmoothness: " << GetDirTrackHitDistributionSmoothness() <<
")";
return oss;
}
|
b994a0a5a63b2568db66f4c3ea36d62855d11a22 | 967e35501861a4be63e19e41cfe04fe3cbc55825 | /include/semver/parser.hpp | ef3eb5bd49691c7968c9b95bb0eb1d4df2941082 | [] | no_license | ken-matsui/semver | 08b5e03212455aaa4cc3deeddaaf483cc3a2e08a | 3b758656fba810e2563cca0164a8184f84963c08 | refs/heads/master | 2022-03-10T18:55:47.628727 | 2019-11-09T23:51:37 | 2019-11-09T23:51:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 224 | hpp | parser.hpp | #ifndef SEMVER_PARSER_HPP
#define SEMVER_PARSER_HPP
#include <semver/parser/lexer.hpp>
#include <semver/parser/parser.hpp>
#include <semver/parser/range.hpp>
#include <semver/parser/token.hpp>
#endif // !SEMVER_PARSER_HPP
|
458c7ef12f3f694ebc0fb2e6e0a2a83cf83de7f6 | aa2b9e991e6de107062f93e683bdf25c5e3644a9 | /nowcoder_合并两个排序的链表.cpp | 68f193781a4099802ffb6e843b50c3d094789410 | [] | no_license | huhan3ng/algorithm | eebbaa7f06775993d7d72b79388dd027b85b0490 | 4178088b82e7a87aba21d628a31a2caec7557561 | refs/heads/master | 2020-06-11T09:22:14.503608 | 2018-01-03T08:44:24 | 2018-01-03T08:44:24 | 75,701,092 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 989 | cpp | nowcoder_合并两个排序的链表.cpp | /*
struct ListNode {
int val;
struct ListNode *next;
ListNode(int x) :
val(x), next(NULL) {
}
};*/
class Solution {
public:
ListNode* Merge(ListNode* pHead1, ListNode* pHead2)
{
struct ListNode head(0);
struct ListNode* pRet = &head;
struct ListNode* pTmp = pRet;
while(pHead1 || pHead2){
if(pHead1==NULL){
pTmp->next = pHead2;
pTmp = pHead2;
pHead2=pHead2->next;
} else if(pHead2==NULL){
pTmp->next = pHead1;
pTmp = pHead1;
pHead1=pHead1->next;
} else if(pHead1->val < pHead2->val){
pTmp->next = pHead1;
pTmp = pHead1;
pHead1=pHead1->next;
} else {
pTmp->next = pHead2;
pTmp = pHead2;
pHead2=pHead2->next;
}
}
return pRet->next;
}
}; |
bd34f157baf1b9146fed7a9d581176232b325f0f | a0f45dac9048e2fcb1297c73c4f14811e91d2fdb | /src/Frames/Frames2d/Projections/LambertProjection.cc | a01a336e4a18d876a30a4eb21385d6f6a4191ead | [] | no_license | snoplus/snogoggles | ef6bd1078d5327d8263362e0cc6a04fac24243b6 | ae6051ba5b0fe9caf0bd569d4f3577b28afa421b | refs/heads/master | 2016-09-05T21:19:38.710515 | 2013-06-13T15:10:16 | 2013-06-13T15:10:16 | 3,463,699 | 4 | 1 | null | 2013-03-29T23:44:57 | 2012-02-16T20:34:27 | C++ | UTF-8 | C++ | false | false | 601 | cc | LambertProjection.cc | #include <TVector3.h>
#include <cmath>
using namespace std;
#include <Viewer/LambertProjection.hh>
using namespace Viewer;
using namespace Viewer::Frames;
sf::Vector2<double>
LambertProjection::Project( sf::Vector3<double> channelPos )
{
TVector3 pmtPos( channelPos.x, channelPos.y, channelPos.z );
pmtPos = pmtPos.Unit();
const double x = sqrt( 2 / ( 1 - pmtPos.z() ) ) * pmtPos.x() / 4.0 + 0.5; // Projected circle radius is 2 thus diameter 4
const double y = sqrt( 2 / ( 1 - pmtPos.z() ) ) * pmtPos.y() / 4.0 + 0.5; // +0.5 such that x,y E [0, 1)
return sf::Vector2<double>( x, y );
}
|
829280e5b8cda47bd24b18f16d91c03d692a19a0 | 97464d13e7e45ec9b273d4eb20ca02088be1fad8 | /CPP_04/ex03/include/Character.hpp | 0c1822dbc0a373b4d32ca80555fcbd34f8fb8fad | [] | no_license | Fihiz/42-final_CPP | 3ce081a671c50067ee95137a4aac27d4d72bcaf2 | 66231ca45febd97ddc0c8b37be0c63b74365fee4 | refs/heads/master | 2023-06-07T20:56:41.129719 | 2021-06-19T14:28:09 | 2021-06-19T14:28:09 | 357,507,821 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,691 | hpp | Character.hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Character.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sad-aude <sad-aude@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/04/08 23:20:41 by salome #+# #+# */
/* Updated: 2021/04/11 15:57:20 by sad-aude ### ########lyon.fr */
/* */
/* ************************************************************************** */
#ifndef CHARACTER_HPP
# define CHARACTER_HPP
#include "ICharacter.hpp"
class Character : public ICharacter
{
private:
Character( void ); // Default constructor -> Putting in private
// To not be instantiated without any name
std::string _name;
AMateria *_inventory[4]; // Inventory of 4 materia
int _held;
int _heldMax;
public:
// Coplien form
Character( std::string const &name );
Character( Character const &src );
Character &operator=( Character const &rhs );
virtual ~Character( void );
// Getters
std::string const & getName( void ) const;
int getHeld( void ) const;
int getHeldMax( void ) const;
// Methods
void equip( AMateria* m );
void unequip( int idx );
void use( int idx, ICharacter& target );
};
#endif |
a662e0d230a2ce745e97270116838386c9bee967 | 073d897026fe96aba6be0062600eb9199c5600d5 | /Volleyball/player.h | a876d0d4a0f818bf79bb609fcb31b87bd90984e8 | [] | no_license | rvrhiv/VolleyballGame | f5a61c912513259300856b432a2fafde06ef1b0c | 8c781311cbdf1d1110a75db7820cc2445eb7bfd9 | refs/heads/master | 2023-04-11T20:31:16.014174 | 2019-12-05T21:30:01 | 2019-12-05T21:30:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 694 | h | player.h | #ifndef PLAYER_H
#define PLAYER_H
#include <QGraphicsPixmapItem>
#include <QKeyEvent>
#include <entity.h>
class Player : public Entity, public QGraphicsPixmapItem
{
Q_OBJECT
public:
Player();
qreal getSpeedX() const;
qreal getSpeedY() const;
void setSpeedX(qreal speedX);
void setSpeedY(qreal speedY);
public slots:
void tick() override;
void keyPress(QKeyEvent * event);
void keyRelease(QKeyEvent * event);
private:
std::size_t width_, height_;
qreal speedX_, speedY_;
bool isRight_, isLeft_, isUp_;
protected:
void move() override;
void colliding() override;
void checkMaxSpeed() override;
void checkCollisionWithScene() override;
};
#endif // PLAYER_H
|
e0b912c8848ceb2529f27bf80ff9406d1f0cecf1 | d62bf94d80f37216346e4b490157e861e6f5fd70 | /i686-cpp/kernel.cpp | 81d4ed842122eced001469e9ea4cd6cf67d325e9 | [] | no_license | shsr04/os | 7c1bb4a698d147ad62cb33209909bd55df80cd0e | 495d8fc5a0f8e7a79d144224cdc0b56233e19179 | refs/heads/master | 2020-04-12T16:40:37.106351 | 2019-11-22T10:08:25 | 2019-11-22T10:08:25 | 162,620,521 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,280 | cpp | kernel.cpp | #if defined(__linux__) || !defined(__i386__)
#error "The kernel must target x86 bare metal!"
#endif
#include "category.hpp"
#include "kernel/core.hpp"
#include "kernel/game_of_life.hpp"
#include "kernel/initializer_list.hpp"
#include "kernel/kbd.hpp"
#include "kernel/matrix.hpp"
#include "kernel/mod.hpp"
#include "kernel/multiboot.h"
#include "kernel/ps2.hpp"
#include "kernel/rand.hpp"
#include "kernel/term.hpp"
#include "kernel/time.hpp"
extern "C" void kernel_main(multiboot_info_t *mb, uint32 magic, uint32 seed) {
term::terminal term(term::VGA_COLS, term::VGA_ROWS);
term.clear();
term.write("Loaded GRUB info: ", int_to_string<16>(magic).str(), "\n");
mod::module_list mods(*mb);
if (mods.size() > 0) {
term.write("Loaded ", int_to_string(mods.size()).str(), " modules\n");
for (auto &&a : mods) {
term.write("Module ", int_to_string(a.index).str(), ": from ",
int_to_string<16>(a().mod_start).str(), " to ",
int_to_string<16>(a().mod_end).str(), "\n");
term.write(" ", reinterpret_cast<const char *>(a().cmdline), "\n");
}
}
if ((mb->flags & 1) == 1) {
term.write("Mem size: ", int_to_string(mb->mem_upper * KB / MB).str(),
" MB\n");
}
term.write("PS/2: ");
if (ps2::startup())
term.write("OK\n");
else
term::fatal_error(term, "FAIL (shutting down)\n");
rand::random_gen rnd(seed);
while (true) {
term.write("> ");
auto &&line = kbd::get_line(term);
auto &&command = line.extract_word(0).value;
auto &¶m = line.extract_word(1).value;
if (command == "exit") {
halt();
}
if (command == "reset") {
ps2::hard_reset();
}
if (command == "clear") {
term.clear();
}
if (command == "read") {
auto address = reinterpret_cast<uint32 *>(string_to_int<16>(param));
term.write("-> 0x", int_to_string<16>(*address).str(), "\n");
}
if (command == "flip") {
term.flipped = !term.flipped;
}
if (command == "stoi") {
if (param != "") {
term.write("non-empty ");
}
term.write("OK: '", param.str(), "'\n");
}
if (command == "mod") {
if (param != "" && mods.entry_point(string_to_int(param))) {
auto proc = mods.entry_point(string_to_int(param)).value;
time::delay(100);
term.write(">>> ", int_to_string<16>(proc()).str(), "\n");
} else {
term.write("Usage: mod <num>\n\tnum: module number ");
if (mb->mods_count > 0)
term.write("(max: ", int_to_string(mb->mods_count).str(),
")\n");
else
term.write("(none loaded)\n");
}
}
if (command == "game") {
game_of_life g(term);
g.run();
}
if (command == "matrix") {
auto n = param != "" ? string_to_int(param) : 1;
term.colour = term::vga_colour(term::GREEN);
term.flipped = true;
term.wrap = true;
for (int a = 0; a < n; a++) {
term.clear();
for (auto _ : range(0, term.max_col)) {
(void)_;
for (auto _ : range(0, term.max_row)) {
(void)_;
if (rnd.next(10) == 1) {
term.write('\n');
break;
}
term.write(char(' ' + (rnd.next(64))));
time::delay(30);
}
}
}
term.flipped = false;
term.wrap = false;
term.colour = term::vga_colour(term::WHITE);
}
if (command == "coredump") {
for (auto a : range(0, (term.max_row + 2) * term.max_col)) {
(void)a;
term.write(char('$' + (rnd.next(40))));
time::delay(20);
}
}
}
term.write("Hello!\n");
}
|
50b29c87cd4bd231325ae804caa5dde79742ec36 | a00426c1cb1c62ea68cf0ec4b41b641da0371b76 | /eclipse-workspace-c++/SumOfAllIntegers/src/SumOfAllIntegers.cpp | 3ceab1f18f5434710bbed93bc84e19961c44104d | [] | no_license | BinodKumarD/c-programs | 2d77480a87bf96f27f4e3c83f2523e8592e650cb | 61e1e1a252e3f6e186162c294f6087bad99cc8e6 | refs/heads/main | 2023-05-29T18:14:31.905045 | 2021-06-13T04:54:34 | 2021-06-13T04:54:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 618 | cpp | SumOfAllIntegers.cpp | //============================================================================
// Name : SumOfAllIntegers.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
int main() {
cout << "Enter a first number: "<<endl;
int n1,n2,sum=0;
cin>>n1;
cout<<"Enter a second number: "<<endl;
cin>>n2;
for(int i=n1;i<=n2;i++){
if(i%2==0){
sum+=i;
}
}
cout<<"sum between "<<n1<<" and "<<n2<<" is: "<<sum;
return 0;
}
|
cb7ba440dc88d5a139c5f9a3b0d231e2b7d7848d | f0544365f859806c5f16fe7e6ba1d24d4eb4914a | /380-smooshed-morse-code-1/make_seq_13.cpp | feda763a68c258c0c1108168486e58c05ba8cb73 | [] | no_license | pegeler/dailyprogrammer | 799d8af2d9961767b136b72fdc556edfbb3a993e | c12a92939a95a0fde8a4ca75e3223d55825bb59f | refs/heads/master | 2021-06-26T18:32:44.259236 | 2020-09-25T03:19:52 | 2020-09-25T03:19:52 | 151,892,558 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 361 | cpp | make_seq_13.cpp | #include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
StringVector make_all_seqs_13() {
int n = 0x002000;
StringVector out(n);
for ( int i = 0; i < n; i++ )
{
for ( int j = 0; j < 13; j++ )
{
out[i] += ( i >> j ) & 1 ? "." : "-";
}
}
return out;
}
/*** R
seqs <- make_all_seqs_13()
head(seqs)
tail(seqs)
length(seqs)
*/
|
4bc3b45098427f1046989e791718d70f239cace2 | 940761f88c82874d3d71fa325c160bd5115ff04f | /Code/Engine/Engine/Music.h | eeddbdbe8edb446c92c8c6d8411a5830526fce67 | [] | no_license | Crawping/Game-Engine | 517f93e205d4fbbf8ffa36720f886c4e9c982d8d | 11bdba445cd0a458129be512d8cac1064e910ee4 | refs/heads/master | 2020-03-27T01:08:32.719341 | 2015-05-26T16:37:34 | 2015-05-26T16:37:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 396 | h | Music.h | #pragma once
#include"precompiled.h"
#include "AudioSystemPrereqs.h"
class Music : public IAudio{
public:
Music(AudioSystem* p_system);
~Music(void);
bool Load(const string& filepath); // Set Sound type 3D or 2D
void Play();
void Stop();
void Pause();
void SetLoop(bool value);
void SetVolume(float volume);
private:
FMOD::Sound* m_sound;
FMOD::Channel* m_channel;
float m_volume;
}; |
4d0df6c83a54e077f18d31684203a8b1e6d74e4a | 1786f51414ac5919b4a80c7858e11f7eb12cb1a9 | /CF1186D.cpp | 74d120cb98c806f3dc1c15c7085b3f9c746a0ddd | [] | no_license | SetsunaChyan/OI_source_code | 206c4d7a0d2587a4d09beeeb185765bca0948f27 | bb484131e02467cdccd6456ea1ecb17a72f6e3f6 | refs/heads/master | 2020-04-06T21:42:44.429553 | 2019-12-02T09:18:54 | 2019-12-02T09:18:54 | 157,811,588 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 403 | cpp | CF1186D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n,a[100005];
ll sum=0;
double b[100005];
int main()
{
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%lf",&b[i]);
a[i]=floor(b[i]);
sum+=a[i];
}
sum=-sum;
for(int i=0;i<n;i++)
if(sum&&floor(b[i])!=b[i]) printf("%d\n",a[i]+1),sum--; else printf("%d\n",a[i]);
return 0;
}
|
6e81a6efbdb279dabea85ec48a3b7fa145d7e7a2 | d939f87a5af0468356fbbed2a40036d984c95561 | /Test2/Code/MajorTomsMachine/majorTomsCode.cpp | 8915623ee8f3a7d49df1de2588b4546350f79530 | [] | no_license | ManuelsPonce/ACC_Comp_Arch | 644dc8783d9666dfc41a2f3504681d9112ac8f51 | 6c8328c1a7df645e7ddbf22316146df3a40f8af9 | refs/heads/master | 2020-05-03T04:40:44.605045 | 2019-03-29T15:10:15 | 2019-03-29T15:10:15 | 178,428,547 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,293 | cpp | majorTomsCode.cpp | #include <iostream>
#include <string>
//declarations
bool isOper(char c);
bool isInt(char c);
bool isAddOrSub(char c);
int addMachine(int result, int integer);
int subMachine(int result, int integer);
int main(){
//declerations
int reg1 = 0;
int reg2 = 0;
char oper;
char key = 0;
int index = 0;
//getting input from user
std::string input;
std::cout << "enter expression: ";
getline(std::cin, input);
key = input[index];
while(key != '\0'){
std::cout << "Processing: ";
std::cout << key << std::endl;
if(isOper(key)){
oper = key;
}
else if (isInt(key)){
reg2 = key - '0';
switch(oper){
case '+':
{
reg1 = addMachine(reg1,reg2);
break;
}
case '-':
{
reg1 = subMachine(reg1,reg2);
break;
}
}
}
std::cout << "Display: " << reg1 << std::endl;
++index;
key = input[index];
}
return 0;
}
bool isOper(char c)
{
if(c == '+' || c=='-')
return true;
return false;
}
bool isInt(char c)
{
if(c >= '0' && c <= '9')
return true;
return false;
}
int addMachine(int result, int integer)
{
for(int i=0; i<integer; i++)
result = result + 1;
return result;
}
int subMachine(int result, int integer)
{
for(int i=0; i<integer; i++)
result = result - 1;
return result;
}
|
f784c1d03865572d367e7ce3d450e9d80f960bf0 | b414fa1e79a7aa19bc8255fb35c21dfb5488224c | /Arquivos Extras/TP/Aprendendo/Vetor de objetos/PessoaArray.h | 6f2117ffb3f852538a78d74f1fd5dd3edb31c49c | [
"MIT"
] | permissive | noemiacintia/TP | a5fac33aea7065b95a198125331a041a83d090a8 | d2eeeac4288e22db74ace693a1bf763bfb84dfc1 | refs/heads/main | 2023-05-11T02:41:27.070941 | 2021-05-25T23:11:56 | 2021-05-25T23:11:56 | 344,129,383 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 310 | h | PessoaArray.h | #ifndef PESSOAARRAY_H
#define PESSOAARRAY_H
class Pessoa{
private:
string nome;
long int cpf;
public:
Pessoa();
void setNome(string);
void setCPF(long int);
string getNome();
long int getCPF();
};
#endif
|
e7129bde1803cabd6c65792f2a35b9974df54ccb | a33aac97878b2cb15677be26e308cbc46e2862d2 | /program_data/PKU_raw/76/505.c | e3eade8dbc31f107dcce939db68cade05744aa10 | [] | no_license | GabeOchieng/ggnn.tensorflow | f5d7d0bca52258336fc12c9de6ae38223f28f786 | 7c62c0e8427bea6c8bec2cebf157b6f1ea70a213 | refs/heads/master | 2022-05-30T11:17:42.278048 | 2020-05-02T11:33:31 | 2020-05-02T11:33:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 673 | c | 505.c | int main()
{
int n,i,k,d;
scanf("%d",&n);
struct qj{
int a;
int b;
}qj[n],c;
for(i=0;i<n;i++){
scanf("%d%d",&(qj[i].a),&(qj[i].b));
}
d=qj[0].b;
for(i=0;i<n;i++){
if(qj[i].b>d){
d=qj[i].b;
}
}
for(k=1;k<n;k++){
for(i=0;i<n-k;i++){
if(qj[i].a>qj[i+1].a){
c=qj[i];
qj[i]=qj[i+1];
qj[i+1]=c;
}
}
}
for(i=1;i<n;i++){
if(qj[0].b>=qj[i].a&&qj[0].b<qj[i].b){
qj[0].b=qj[i].b;
}
}
if(qj[0].b==d){
printf("%d %d",qj[0].a,qj[0].b);
}else{
printf("no");
}
return 0;
}
|
8ba1d4dc43510c613f0470020896795fe1d332ca | 366e2cdd40f6afef727cf24f71c70e555410fef5 | /dev/pickers/randomcenterpicker.h | 9fdd1a64873baad8a6b8257c9474e2625ecb7257 | [] | no_license | benkopolis/kmeanstriangleclustering | 20a1060040074dfd28125c8b87b2d387e6bf65f5 | 8714d70f1a3e6542d44cfe16e29ce97de64622ff | refs/heads/master | 2020-12-24T13:17:10.643581 | 2017-03-22T20:31:07 | 2017-03-22T20:31:07 | 32,231,248 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,629 | h | randomcenterpicker.h | #ifndef RANDOMCENTERPICKER_H
#define RANDOMCENTERPICKER_H
#include <chrono>
#include <functional>
#include <random>
#include "abstractcenterspicker.h"
#include "commons/centersdata.h"
template<typename PointType>
class RandomCenterPicker : public AbstractCentersPicker<PointType>
{
public:
RandomCenterPicker()
{
this->_clustersDistribution = NULL;
}
virtual ~RandomCenterPicker()
{
if (this->_clustersDistribution != NULL)
delete this->_clustersDistribution;
}
virtual PartitionData *performInitialPartition(unsigned clusters, AbstractPointsSpace* ps)
{
PartitionData* data = new PartitionData(clusters, ps->getDeclaredNumPoints());
this->initialData = new CentersData(clusters);
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
this->_clustersDistribution = new std::uniform_int_distribution<unsigned>(0, clusters - 1);
this->_generator = new std::default_random_engine(seed);
this->_clusterId = std::bind(*(this->_clustersDistribution), *(this->_generator));
unsigned cid;
for (unsigned pid = 0; pid < ps->getDeclaredNumPoints(); pid++)
{
cid = this->_clusterId();
data->assign_unsafe(pid, cid);
this->addCoordsToCenter(ps->getPoint(pid), cid);
}
this->divideCentersCoords(data);
return data;
}
private:
std::function<unsigned()> _clusterId;
std::uniform_int_distribution<unsigned>* _clustersDistribution;
std::default_random_engine* _generator;
};
#endif // RANDOMCENTERPICKER_H
|
c3627c98fcfb3a5d1da8c1da2c60e16bb73b2df1 | 793a0ef0cbd50645284afd48e76b5b1b558d080e | /Laboratorio_2/Ejercicios 1.cpp | e1b8507b92ffa1e4ab6419865194fec9681f3105 | [] | no_license | Cj72001/Portafolio_00038619 | 042f1734420c613b93356706b35701e465c0b547 | c87b117b09cd91e4426e06b545c079b72a6f5eee | refs/heads/master | 2020-07-21T12:29:43.078153 | 2019-11-19T03:55:31 | 2019-11-19T03:55:31 | 206,865,139 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 459 | cpp | Ejercicios 1.cpp | //Ejercicio 1.
#include <iostream>
using namespace std;
int euclides(int mayor, int menor, int mcd)
{
if(mcd==0)
return menor;
else{
mayor=menor;
menor=mcd;
mcd=mayor%menor;
return euclides(mayor, menor, mcd);
}
}
int main()
{
int mayor=0, menor=0;
cout << "Ingrese Mayor: "<< endl; cin >> mayor;
cout << "Ingrese Menor: "<< endl; cin >> menor;
int mcd= mayor%menor;
cout << "MCD: "<<euclides(mayor, menor, mcd);
}
|
339b2d89500bc7a4c9af26ffa46a8fa762ed709e | 1fae6cee0c0ddb460bf432b030dc523109bd5e6c | /astar/expanded_ex1.cpp | 9399e45f8bce957e07d8017d6a1259b27e6df81b | [] | no_license | konaseema/cppnd | 85278be457c19281679f88579a27b7548052b032 | 433024786a8e707f1f0aba8b0320e70ceca67099 | refs/heads/master | 2022-12-03T10:34:06.307629 | 2020-08-24T05:22:26 | 2020-08-24T05:22:26 | 275,689,233 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,274 | cpp | expanded_ex1.cpp |
#include <vector>
using std::vector;
void ExpandNeighbors(const vector<int> ¤t_node, int goal[2],
vector<vector<int>> &open, vector<vector<State>> &grid) {
int x = current_node[0];
int y = current_node[1];
int g = current_node[2];
const int delta[4][2]{{-1, 0}, {0, -1}, {1, 0}, {0, 1}};
for (int i = 0; i < 4; i++) {
int a = x + delta[i][0];
int b = y + delta[i][1];
if (CheckValidCell(a, b, grid)) {
int g1 = g + 1;
int h = Heuristic(a, b, goal[0], goal[1]);
AddToOpen(a, b, g1, h, open, grid);
}
}
}
/*void ExpandNeighbors(const vector<int> ¤t, int goal[2],
vector<vector<int>> &openlist, vector<vector<State>> &grid) {
// Get current node's data.
int x = current[0];
int y = current[1];
int g = current[2];
// Loop through current node's potential neighbors.
for (int i = 0; i < 4; i++) {
int x2 = x + delta[i][0];
int y2 = y + delta[i][1];
// Check that the potential neighbor's x2 and y2 values are on the grid and
not closed. if (CheckValidCell(x2, y2, grid)) {
// Increment g value and add neighbor to open list.
int g2 = g + 1;
int h2 = Heuristic(x2, y2, goal[0], goal[1]);
AddToOpen(x2, y2, g2, h2, openlist, grid);
}
}
}*/
|
b6ca762912fd7e8d55a966aabf573542bb31c0ba | 6f7bbb6ab98a97fa81ec44b130983171f47a6912 | /isam/service/NetworkService/AccountNetworkService.cpp | 89084050220fdcb870cf6923b1cb5506b5898870 | [] | no_license | tshengtec/isam | ab3ae9c12e8be116217c373f095a375aa5495ead | 23fae47768ae28749930c01eee5a8622d4d0a3b0 | refs/heads/master | 2021-01-19T17:04:49.112450 | 2018-02-08T03:42:57 | 2018-02-08T03:42:57 | 101,044,112 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,551 | cpp | AccountNetworkService.cpp | #include "AccountNetworkService.h"
#include "AccountService.h"
#include <QJsonDocument>
#include <QDebug>
AccountNetworkService::AccountNetworkService()
{
connect(&m_manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(finishedSlot(QNetworkReply*)));
}
void AccountNetworkService::getAccountInfo(QString account, QString password, QString type)
{
m_account = account;
m_type = type;
m_passwordMD5 = QCryptographicHash::hash(password.toLatin1(), QCryptographicHash::Md5);
QString url = "";
if (m_type == accountTypeList[0]) {
url = "http://api.erp.slktea.com/isam-web-merchant/auth?"
"account=" + m_account +"&password=" + m_passwordMD5.toHex();
}
else if (m_type == accountTypeList[1]) {
url = "http://api.cashier.slktea.com/isam-web-cashier/auth?"
"account=" + m_account +"&password=" + m_passwordMD5.toHex();
}
m_manager.get(QNetworkRequest(QUrl(url)));
}
void AccountNetworkService::finishedSlot(QNetworkReply *reply)
{
QByteArray bytes = reply->readAll(); // bytes
QString jsonString = QString::fromUtf8(bytes);
m_jsonObj = this->getJsonObjectFromString(jsonString);
if (reply->error() == QNetworkReply::NoError)
{
m_jsonObj.insert("passwordMD5", QString(m_passwordMD5.toHex()));
m_jsonObj.insert("type", m_type);
emit returnLoginStatus(true);
}
else {
emit returnLoginStatus(false);
}
reply->deleteLater();
}
QJsonObject AccountNetworkService::getJsonObj()
{
return m_jsonObj;
}
|
a322d08c3cb31d7e236b651ecac54d26e208572b | 119db868b2bbb5b92e02129f123053096d2354dd | /queue_usingLL.cpp | e7744d548a5de7436d280b624d3fb68bcf821af5 | [] | no_license | shah5995/data-structure-stack-queue-hashing-heap | c47537bcf7a7cd865cd5e6b32867e6dd358be412 | fd82bbc69bd2f8fb55f4e6fcb8aa2c94d471cc42 | refs/heads/master | 2020-05-03T04:53:20.954096 | 2019-03-29T15:53:43 | 2019-03-29T15:53:43 | 178,434,588 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 963 | cpp | queue_usingLL.cpp | #include<iostream>
using namespace std;
template<typename T>
struct node
{
T data;
node *next;
};
template<typename T>
class queue
{
node<T> *head;
node<T> * tail;
int size;
public:
queue()
{
head=NULL;
tail=NULL;
size=0;
}
void enqueue(int data)
{
node<T> *temp=new node<T>;
temp->data=data;
temp->next=NULL;
if(size==0)
{
tail=temp;
head=temp;
size++;
return;
}
tail->next=temp;
tail=temp;
size++;
}
void deque()
{
if(size==0)
{
cout<<"not possible";
return;
}
node<T> *temp=head;
head=head->next;
delete(temp);
size--;
}
bool isempty()
{
if(size==0)
{
return 1;
}
else return 0;
}
int top()
{
return(head->data);
}
};
int main()
{
queue<int> q;
cout<<q.isempty()<<endl;
q.enqueue(5);
q.enqueue(10);q.enqueue(8);q.enqueue(6);
cout<<q.top()<<endl;q.deque();
cout<<q.top();
}
|
49e8c4edd380c1e30e92fbee04d9dfc4ebc05c5c | 5bccada0cb80c2f69313a45bd2930d42e4cd5998 | /contests/csacademy/round62/d.cpp | 0eed81315fd226a7b63aef0880edd8f4ca888539 | [] | no_license | luucasv/Competitive-Programming | d3a6161eb12539e53b59ff5f4368714c324b5801 | 86d1cf59968fdbd1bf7824a238f26971fa291db7 | refs/heads/master | 2018-11-16T15:59:56.191230 | 2018-09-26T02:01:32 | 2018-09-26T02:01:32 | 77,718,240 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 682 | cpp | d.cpp | #include <bits/stdc++.h>
using namespace std;
const int ms = 2e5 + 20;
int v[ms];
int cnt[ms];
int main() {
int n;
cin >> n;
int ma = 0, ma2 = 0;
int tot = 0;
for (int i = 1; i <= n; i++) {
scanf("%d", v + i);
if (v[i] > v[ma]) {
ma2 = ma;
ma = i;
cnt[i]--;
tot++;
// cout << ">>>> tot " << i << " " << ma << ' ' << ma2 << ' ' << cnt[i] << '\n';
} else if (v[i] > v[ma2]) {
cnt[ma]++;
ma2 = i;
// cout << ">>>> pat " << i << " " << ma << ' ' << ma2 << ' ' << cnt[ma2] << '\n';
}
}
int ans = 0;
for (int i = 1; i <= n; i++) {
ans = max(ans, cnt[i] + tot);
}
cout << ans << endl;
return 0;
} |
8a2f208dedda8660c0ec27f0ab30a6e00b3fcb55 | 717571eb490eefaec0cd52dc1b49b1e59da31361 | /include/BLIB/Interfaces/GUI/Elements/Notebook.hpp | d655921cf76b6b660de83fd4c9ec1d2c6aac05ca | [] | no_license | benreid24/BLIB | d726c48ceab133071e6bf81a638f3217ce4dfe5a | a5e4cf2eba649089940c2414e3dce57b654e0d59 | refs/heads/master | 2023-08-31T23:02:12.963457 | 2023-07-25T19:25:43 | 2023-07-25T19:25:43 | 234,001,128 | 1 | 0 | null | 2023-09-10T23:09:36 | 2020-01-15T04:54:14 | C++ | UTF-8 | C++ | false | false | 5,749 | hpp | Notebook.hpp | #ifndef BLIB_GUI_ELEMENTS_NOTEBOOK_HPP
#define BLIB_GUI_ELEMENTS_NOTEBOOK_HPP
#include <BLIB/Interfaces/GUI/Elements/Box.hpp>
#include <BLIB/Interfaces/GUI/Elements/Container.hpp>
#include <BLIB/Interfaces/GUI/Elements/Label.hpp>
#include <list>
namespace bl
{
namespace gui
{
/**
* @brief A notebook with tabs and pages. The tabs are horizontally positioned across the top
* of the element. Each page is typically a Box. Allows more sophisticated UI's
*
* @ingroup GUI
*
*/
class Notebook : public Container {
public:
typedef std::shared_ptr<Notebook> Ptr;
typedef std::function<void()> PageChangedCb;
virtual ~Notebook() = default;
/**
* @brief Create a new empty Notebook
*
* @return Ptr The new Notebook
*/
static Ptr create();
/**
* @brief Container struct representing a page in the notebook
*
*/
struct Page {
/// The internal name of the page
const std::string name;
/// The label at the top of the notebook
Label::Ptr label;
/// Any element that is the actual page content
Element::Ptr content;
/// Callback to trigger when the page is opened
PageChangedCb onOpen;
/// Callback to trigger when the page is closed
PageChangedCb onClose;
Page(const std::string& name, const Label::Ptr& label, const Element::Ptr& content,
const PageChangedCb& onOpen, const PageChangedCb& onClose);
};
/**
* @brief Sets a maximum width for the tabs to take up. Tabs beyond this size will scroll
*
* @param maxWidth The maximum width of the top tabs, in pixels. Set negative for no max
*/
void setMaxTabWidth(float maxWidth);
/**
* @brief Add a new page to the Notebook
*
* @param name The name of the page. This is not visible anywhere
* @param title The title to put in the button
* @param content The content to put in the notebook when the page is selected
* @param onOpen Callback to trigger when this page is selected
* @param onClose Callback to trigger when this page is left
*/
void addPage(
const std::string& name, const std::string& title, const Element::Ptr& content,
const PageChangedCb& onOpen = []() {}, const PageChangedCb& onClose = []() {});
/**
* @brief Returns the active page itself
*
*/
Page* getActivePage() const;
/**
* @brief Returns the index of the active page
*
*/
unsigned int getActivePageIndex() const;
/**
* @brief Returns the number of pages in the Notebook
*
*/
unsigned int pageCount() const;
/**
* @brief Set the Active Page
*
* @param i Index of the page to make active
*/
void makePageActive(unsigned int index);
/**
* @brief Returns a real only reference to all the pages. Useful for Renderers
*
*/
const std::list<Page>& getPages() const;
/**
* @brief Returns the name of the active page
*
*/
const std::string& getActivePageName() const;
/**
* @brief Returns a pointer to the page at the given index
*
* @param index Index of the page to access. 0 based
* @return Page* Pointer to the page requested. May be null if out of bounds
*/
Page* getPageByIndex(unsigned int index);
/**
* @brief Returns a pointer to the page with the given name
*
* @param name Name of the page to fetch
* @return Page* Pointer to the page requested. May be null if name not found
*/
Page* getPageByName(const std::string& name);
/**
* @brief Deletes the page at the given index
*
*/
void removePageByIndex(unsigned int index);
/**
* @brief Removes the page with the given name
*
*/
void removePageByName(const std::string& name);
/**
* @brief Returns the acquisition of the tabs for the notebook
*
*/
const sf::FloatRect& getTabAcquisition() const;
protected:
/**
* @brief Create a new empty Notebook
*
*/
Notebook();
/**
* @brief Computes space required across all tabs
*
*/
virtual sf::Vector2f minimumRequisition() const override;
/**
* @brief Repacks the tabs and their content
*
*/
virtual void onAcquisition() override;
/**
* @brief Called by a child element that is dirty. Parent element gets to decide if it makes
* itself dirty or not
*
* @param childRequester The child requesting to dirty this parent
*/
virtual void requestMakeDirty(const Element* childRequester) override;
/**
* @brief Renders the notebook
*
* @param target The target to render to
* @param states Render states to apply
* @param renderer The renderer to use
*/
virtual void doRender(sf::RenderTarget& target, sf::RenderStates states,
const Renderer& renderer) const override;
/**
* @brief Passes the event down to the tabs and active page content
*
* @param event The event to send
* @return True if consumed, false if the event should keep sending
*/
virtual bool propagateEvent(const Event& event) override;
private:
Box::Ptr tabArea;
std::list<Page> pages;
std::unordered_map<std::string, std::list<Page>::iterator> pageMap;
Page* activePage;
sf::FloatRect tabAcquisition;
float maxWidth;
float scroll;
void makePageActiveDirect(Page* page);
void onMove();
std::list<Page>::iterator getIterator(unsigned int i);
sf::FloatRect contentArea() const;
void constrainScroll();
};
} // namespace gui
} // namespace bl
#endif
|
135159b9f60ea1e4131326fdd24ebb7074107708 | 3f9a0a2c460ca2c36409e64efc553f82404eb0b7 | /Creature_Species.hpp | 251e37293f547823b2cbf8b8a619d8c8abe8c27c | [] | no_license | RyanBabij/WorldSim | 9bdeaae850e96c44f6c16a24d8edecef24ff93d5 | 148a909e662b854d759f56d4305fd88eab5fb77c | refs/heads/master | 2023-03-06T17:28:33.626888 | 2023-03-04T04:54:26 | 2023-03-04T04:54:26 | 100,097,164 | 24 | 2 | null | 2020-07-13T08:54:33 | 2017-08-12T07:36:21 | C++ | UTF-8 | C++ | false | false | 1,038 | hpp | Creature_Species.hpp | #pragma once
#ifndef WORLDSIM_CREATURE_SPECIES_HPP
#define WORLDSIM_CREATURE_SPECIES_HPP
/* WorldSim: Creature_Species
#include "Creature_Species.hpp"
Meta information about all Creatures of a certain type.
Creature instances should be generated from here.
This is necessary because unlike something like Flora, Creatures may have individually different attributes.
*/
#include <Container/Table/TableInterface.hpp>
#include <Interface/HasTexture.hpp>
class Creature;
class World_Biome;
class Creature_Species: public TableInterface, public HasTexture
{
public:
World_Biome* biome;
std::string name;
int spawnWeight;
Texture* baseTexture;
Creature_Species(std::string _name, int _spawnWeight);
// return an instance of this species
Creature* spawn();
void setBaseTexture(Texture* _texture);
// TABLE INTERFACE
std::string getColumn(std::string _column) override;
std::string getColumnType(std::string _column) override;
// HASTEXTURE
Texture* currentTexture () override;
};
#endif
|
4b14c082de9d950819c0752fab5160065197b7b9 | 5b0e4360b2eaeb0bb6891f3fbb57c05c03d04f88 | /cpp/include/string/manacher.cpp | 17662121bc49a8423792a91f969390e97db4dd2c | [
"MIT"
] | permissive | asi1024/competitive-library | aaa8ea5b1730ff2e851829aebdc875e9cf600eed | 0b6dc9ecd4d2762a103b029cada7decd02614f09 | refs/heads/master | 2023-01-09T10:11:22.613067 | 2023-01-04T00:03:30 | 2023-01-04T00:03:30 | 40,754,273 | 23 | 5 | MIT | 2023-01-04T00:03:31 | 2015-08-15T10:03:35 | C++ | UTF-8 | C++ | false | false | 443 | cpp | manacher.cpp | #include "../template/includes.cpp"
template <typename string_t> std::vector<int> manacher(const string_t &s) {
const int n = s.size();
std::vector<int> rad(n);
int i = 0, j = 0, k = 0;
while (i < n) {
while (i - j >= 0 && i + j < n && s[i - j] == s[i + j]) ++j;
rad[i] = j;
for (k = 1; i - k >= 0 && i + k < n && k + rad[i - k] < j; ++k) {
rad[i + k] = rad[i - k];
}
i += k;
j -= k;
}
return rad;
}
|
9c79d2a83c2ce4144e535d934e8857394e63e223 | 6e587dee2d595e0a05c9e17d2cafcff1bba06461 | /Multiply Strings.cpp | 09dce96a9f6bc9f15ee6edded7d3b382f6110dfa | [] | no_license | liuxinhao/leetcode-1 | 0c887883ee9bd7d987dd74a3ebb3b65e00a36096 | a15ac7e68d3713c2f6427f2334a27c925311b171 | refs/heads/master | 2021-01-17T08:19:19.895277 | 2013-08-07T06:51:25 | 2013-08-07T06:51:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,667 | cpp | Multiply Strings.cpp | void split(string &src, int* arr){
int len = src.size();
stringstream ss;
for (int i = 0; i != (len-1)/4 + 1; i++){
ss.clear();
string tmp = src.substr(i*4, 4);
ss<<tmp;
ss>>arr[i];
}
return ;
}
bool inline iszero(string &s1){
return (s1.size() == 1 && s1[0] == '0');
}
class Solution {
public:
string multiply(string num1, string num2) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
if (iszero(num1) || iszero(num2))
return "0";
int arr1[100], arr2[100], result[201];
stringstream ss;
memset(arr1, 0, sizeof(arr1));
memset(arr2, 0, sizeof(arr2));
memset(result, 0, sizeof(result));
int app = 0;
while(num1.size() % 4)
num1 = num1 + "0", app++;
while(num2.size() % 4)
num2 = num2 + "0", app++;
int len1 = num1.size(), len2 = num2.size();
string ret = "", tmp="";
//reverse(num1.begin(), num1.end());
//reverse(num2.begin(), num2.end());
split(num1, arr1);
split(num2, arr2);
for (int i = 0; i != (len1-1)/4+1; i++){
for (int j = 0; j != (len2-1)/4+1; j++){
result[i+j] += arr1[i] * arr2[j];
}
}
for (int i = len1/4+len2/4-1; i != -1; i--){
result[i] += result[i+1]/10000;
result[i+1] %= 10000;
}
ss<<result[0];
ss>>tmp;
ret += tmp;
for (int i = 1; i != (len1-1)/4 + (len2-1)/4+1; i++){
ss.clear();
ss<<result[i];
ss>>tmp;
while(tmp.size() < 4)
tmp = "0" + tmp;
ret += tmp;
}
ret = ret.substr(0, ret.size() - app);
return ret;
}
};
|
387ca864175f94a1b412dfacc3e432f3e1d63b1e | 3df7d823338b0bcab7fb1c715d6144df9d405e8c | /GameEng/GameEng/main.cpp | 8c50d5913a27d4514d7305ebe2eecff43cbb80be | [] | no_license | Chankalino/Game-Engine | 8f1a4c8bb7f6a67b8bc17807a1b4dfbce351a230 | 6697c5b551d8afaae3a5706fb17acdec3beed7a7 | refs/heads/master | 2020-03-31T14:44:11.748153 | 2018-10-16T20:50:21 | 2018-10-16T20:50:21 | 152,307,097 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 395 | cpp | main.cpp | #include <iostream>
#include <GLFW\glfw3.h>
#include "src\graphics\window.h"
int main() {
using namespace sparky;
using namespace graphics;
Window window("Sparky!", 800, 600);
while (!window.closed())
{
window.update();
}
//system("PAUSE");
return 0;
}
//Fuck Off..
// I think I fixed it
//Fuck yeeeeessssss!!!!
// Roger that its perfect .. bro from tomorrow we start no delays |
e86336e194a98f60faa9563f8b8bba06e3ca77a1 | e011ba994121bba2543c72a868374d1f1bca2c5a | /Solarmodul.h | 8134551078f77db7da59ea327519f60ede7e4c44 | [] | no_license | maroprjs/Posterboard | e9c5b9422cf8a15e2698757bc963718d3f1d1410 | 6ed916ca52a7a9b4034f8775e09403282952adf0 | refs/heads/master | 2022-12-28T02:32:09.002156 | 2020-03-02T07:50:59 | 2020-03-02T07:50:59 | 302,642,096 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,586 | h | Solarmodul.h | /*
* Solarmodul.h
*
* Created on: 18 Feb 2020
* Author: maro
*/
#ifndef SOLARMODUL_H_
#define SOLARMODUL_H_
#include "TypeDefs.h"
#include "AvgStd.h"
#define INITIAL_CALIBRATION_TIME (10000) //DEFAULT_SAMPLE_INTERVAL * NUM_OF_STD_SAMPLES * 10 (10 more values for calibration)
#define DEFAULT_SAMPLE_INTERVAL (100) //[ms]
#define NUM_OF_STD_SAMPLES (10)
#define CALIBRATION_UPDATE_INTERVAL (60000)
#define SIGNAL_MIN (0)
#define SIGNAL_MAX (1024)
#define SOLAR_POWER_AVTIVE_TIME (30000) //how long solar panel will report light, even it was there only shortl
class Solarmodul {
public:
Solarmodul(sensingPin_t sensingPin, pinSample_t* currentSample, interval_t interval = DEFAULT_SAMPLE_INTERVAL, interval_t powerActiveTime = SOLAR_POWER_AVTIVE_TIME);
void setup();
void loop();
void calibrate(interval_t = INITIAL_CALIBRATION_TIME);
void start();
void stop();
bool isOn(void);
bool isOff(void);
bool statusHasChanged(void);
virtual ~Solarmodul();
private:
interval_t _sampleInterval;
interval_t _powerActiveTime;
interval_t _calibrationValueUpdateInterval;
sensingPin_t _sensingPin;
pinSample_t* _currentSample;
//pinSample_t _lastSample;
pinSample_t _deviationMax;
pinSample_t _sampleDeviation;
AvgStd* _avgStd;
on_off_state_t _emitSolarPower;//light emission on or off
elapsedMillis_t _startMillis; //used for sample interval
elapsedMillis_t _startMillisPowerActive; //when light is recognized
elapsedMillis_t _lastCalibrationUpdated;
bool _stopped;
bool _statusHasChanged;
void updateCalibrationValues(void);
};
#endif /* SOLARMODUL_H_ */
|
318f6c78b2e1d37170b73748c4e7551259947a56 | 5b32a675f6dd61aede7d6b1f508d47d6a50ec870 | /prueba de impresion/main.cpp | 79094032c64ffb0a57258f46d7696fa19bc8638d | [] | no_license | Sepulveda25/Informatica_2011 | 49c4117a9d53a97c4dada56e6519579fa79404ce | 336985c50a03f3cd9da6437bc5fdb74cd1bad3a9 | refs/heads/master | 2023-04-05T02:15:36.462310 | 2018-06-08T03:47:52 | 2018-06-08T03:47:52 | 356,075,736 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 738 | cpp | main.cpp | #include <cstdlib>
#include <iostream>
#include <cmath>
#include <conio.h>
using namespace std;
const int pi=3.1416;
int main(int argc, char *argv[])
{
int f,c;
double x;
char imag[20][50];
for(f=0;f<20;f++)
{
for(c=0;c<50;c++)
{
imag[f][c]='O';
}
}
for(c=0;c<50;c++)
{
x=c;
x=((x*pi)/180)*10;
f=(-8)*sin(x)+10;
imag[f][c]='F';
}
for(f=0;f<20;f++)//imprimo matriz imag
{
for(c=0;c<50;c++)
{
cout<<imag[f][c];
}
cout<<"\n";
}
cin.ignore(2);
return EXIT_SUCCESS;
}
|
56aa0cbe065a18fcd2e6b1e22bf5579cb2f66234 | 554a8ab4a37b9d527f869f19394e44ba72306eb3 | /WinCalc05/Store.cpp | 6f28185e6dce940f89fac0ae39849544a927282a | [] | no_license | anoopemacs/cpp_in_action | 0ce438c7e06613a08ea683c6cb630e7f8eb565d4 | 6414b4a6dec03f66349c66c01a43a8bf32713a88 | refs/heads/master | 2021-01-19T15:24:55.363667 | 2017-04-14T00:32:57 | 2017-04-14T00:32:57 | 88,213,175 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,582 | cpp | Store.cpp | #include "Store.h"
// (c) Bartosz Milewski 2000
#include "SymTab.h"
#include "Serial.h"
#include "Notify.h"
#include <cmath>
Store::Store (SymbolTable & symTab)
:_sink (0)
{
AddConstants (symTab);
}
void Store::AddConstants (SymbolTable & symTab)
{
// add predefined constants
// Note: if more needed, do a more general job
unsigned id = symTab.ForceAdd ("e");
AddValue (id, std::exp (1.0));
id = symTab.ForceAdd ("pi");
AddValue (id, 2.0 * std::acos (0.0));
_firstVarId = id + 1;
}
void Store::SetValue (unsigned id, double val)
{
if (id < _cell.size ())
{
_cell [id] = val;
_isInit [id] = true;
}
else
{
AddValue (id, val);
}
// Notify of change
if (_sink)
_sink->UpdateItem (id);
}
void Store::RefreshNotify () const
{
if (_sink == 0)
return;
for (unsigned i = 0; i < _cell.size (); ++i)
{
if (_isInit [i] == true)
_sink->AddItem (i);
}
}
void Store::AddValue (unsigned id, double val)
{
_cell.resize (id + 1);
_isInit.resize (id + 1);
_cell [id] = val;
_isInit [id] = true;
}
void Store::Serialize (Serializer & out) const
{
unsigned len = _cell.size ();
out.PutULong (len);
for (unsigned i = 0; i < len; ++i)
{
out.PutDouble (_cell [i]);
out.PutBool (_isInit [i]);
}
}
void Store::DeSerialize (DeSerializer & in)
{
_cell.clear ();
_isInit.clear ();
unsigned long len = in.GetULong ();
_cell.resize (len);
_isInit.resize (len);
for (unsigned i = 0; i < len; ++i)
{
_cell [i] = in.GetDouble ();
_isInit [i] = in.GetBool ();
}
}
|
c0b922090c045875d545ead8caf82434de350d5a | 978f2643ffed7a57d47097bd8dbaded53d2abdb7 | /w7/Hero.h | 1554c011b1407b0e5999f1249dd822be8ba80569 | [] | no_license | pphoangvu/OPP244 | 6382edb7b83f982c31e77f87da8e07d290676a04 | 87ebe05120ffbfdaae7be1694d4c0f6433fbd97a | refs/heads/master | 2023-02-06T19:01:38.193790 | 2020-12-29T22:19:31 | 2020-12-29T22:19:31 | 325,398,382 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 580 | h | Hero.h | /*
Name: Vu Pham
StudentID: 129908174
Lab: 07
In lab
Section: AB
*/
#ifndef HERO_H_
#define HERO_H_
#include <cstring>
#include <iostream>
using namespace std;
namespace sict {
class Hero {
char name[40];
int health;
int strength;
public:
Hero();
Hero(const char name[], int health, int strenght);
void operator-=(int attack);
bool isAlive() const;
int attackStrength() const;
friend ostream& operator<<(std::ostream& os, const Hero& hero);
};
const Hero& operator*(const Hero& first, const Hero& second);
}
#endif
|
f6899c9db49feef2d605dded2def1ee9e47c81d9 | e7e497b20442a4220296dea1550091a457df5a38 | /main_project/search/NameCheck/neparse/AbStd.h | 705c78128455386ef3af6dc583a599e6eb707812 | [] | no_license | gunner14/old_rr_code | cf17a2dedf8dfcdcf441d49139adaadc770c0eea | bb047dc88fa7243ded61d840af0f8bad22d68dee | refs/heads/master | 2021-01-17T18:23:28.154228 | 2013-12-02T23:45:33 | 2013-12-02T23:45:33 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,873 | h | AbStd.h | #ifndef __AB_STD_H__
#define __AB_STD_H__
#include <string>
#include <queue>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <vector>
#include <ext/hash_map>
#include <list>
#include <utility>
#include <fstream>
#include <algorithm>
#include <set>
#include <map>
#include <assert.h>
#include <pthread.h>
#include "AbTypeDef.h"
using namespace std;
using namespace __gnu_cxx;
template<typename T> class AbHashPoint{
public:
size_t operator()(T const *key)const { return key->hash();}
bool operator()(T const *item1, T const *item2) const { return *item1 == *item2;}
};
template<typename T> class AbHash{
public:
size_t operator()(T const& key)const { return key.hash();}
bool operator()(T const &item1, T const &item2) const { return item1 == item2;}
};
class AbHashChar{
public:
size_t operator()(const char* str) const { return __stl_hash_string(str);}
bool operator()(const char* item1, const char* item2) const { return strcmp(item1,item2)==0;}
};
class AbHashCaseChar{
public:
size_t operator()(const char* str) const { return __stl_hash_string(str); }
bool operator()(const char* item1, const char* item2) const{ return strcasecmp(item1,item2)==0;}
};
template <typename T> class AbPointLess{
public:
bool operator()(T const *item1, T const *item2) const { return *item1<*item2;}
};
class AbCharLess{
public:
bool operator()(const char* item1, const char* item2) const{ return strcmp(item1,item2)<0;}
};
class AbCharCaseLess{
public:
bool operator()(const char* item1, const char* item2) const{ return strcasecmp(item1,item2)<0;}
};
class AbHashUint64{
public:
size_t operator()(UINT64 key)const { return key&0xFFFFFF;}
size_t operator()(UINT64 key1, UINT64 key2)const { return key1==key2;}
};
class AbUint64Less{
public:
int operator()(UINT64 item1, UINT64 item2) const { return item1<item2;}
};
class AbHashString{
public:
size_t operator()(const string& str) const { return __stl_hash_string(str.c_str()); }
};
class AbRwLockRead{
public:
AbRwLockRead (pthread_rwlock_t* pLock):m_pLock(pLock){
if (m_pLock){
pthread_rwlock_rdlock(m_pLock);
}
}
~AbRwLockRead (){
if (m_pLock) pthread_rwlock_unlock(m_pLock);
}
private:
pthread_rwlock_t* m_pLock;
};
class AbRwLockWrite{
public:
AbRwLockWrite (pthread_rwlock_t* pLock):m_pLock(pLock){
if (m_pLock){
pthread_rwlock_wrlock(m_pLock);
}
}
~AbRwLockWrite (){
if (m_pLock) pthread_rwlock_unlock(m_pLock);
}
private:
pthread_rwlock_t* m_pLock;
};
class AbMutexLock{
public:
AbMutexLock(pthread_mutex_t* pLock):m_pLock(pLock){
if (m_pLock){
pthread_mutex_lock(m_pLock);
}
}
~AbMutexLock(){
if (m_pLock) pthread_mutex_unlock(m_pLock);
}
private:
pthread_mutex_t* m_pLock;
};
#endif
|
680712fba9bcd5e08c8e6ce9d526f489927685f2 | a1f5aacca70f843b91cb02e9ae1b9368e6216b39 | /Homework/HW1/Ex_2_Dotcross/dotcross.cpp | adf2ab24f30954179cc2ca1ccd96d45178ce8f6c | [] | no_license | austinwklein/cs201 | 123a22b3b6074f379062b597c64a6d6b8df67fa9 | f22e23b9bbfdb51aa673945cecbb7016a53e41b8 | refs/heads/main | 2023-03-08T23:10:23.593791 | 2021-03-03T08:02:17 | 2021-03-03T08:02:17 | 332,566,090 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,410 | cpp | dotcross.cpp | // Boilerplate
/*
* Austin Klein
* CS 201
* 1/25/2021
* HW 1
* dotcross.cpp
*/
// Design
/* Write a C++ program that calculates the dot product and cross product of a 3-component vector.
*
* Allow the user to type in 3 floating point numbers for x, y, z each for vector A and vector B
* Calculate the dot product (AxBx + AyBy + AzBz) and print the result
* Calculate the cross product and print the result
* Cx = AyBz - AzBy
* Cy = AzBx - AxBz
* Cz = AxBy - AyBx
* Print the result in a nice format like "A dot B = answer" or "A cross B = (x, y, z)"
* Use the <iomanip> header to format the numbers so they have exactly 5 decimal places using std::setprecision().
* See documentation for guidance.
* https://en.cppreference.com/w/cpp/io/manip/setprecision
* https://en.cppreference.com/w/cpp/header/iomanip
*/
#include <iostream>
#include <iomanip>
using std::cout;
using std::cin;
using std::endl;
using std::setprecision;
int main() {
// Variables for vector A (x, y, and z)
float ax, ay, az;
// Variables for vector B (x, y, and z)
float bx, by, bz;
// Vector A user input
cout << "Input x, y, and z for vector A: " << endl;
cout << "Ax:";
cin >> setprecision(5) >> ax;
cout << "Ay:";
cin >> setprecision(5) >> ay;
cout << "Az:";
cin >> setprecision(5) >> az;
cout << endl;
// Vector B user input
cout << "Input x, y, and z for vector B: " << endl;
cout << "Bx:";
cin >> setprecision(5) >> bx;
cout << "By:";
cin >> setprecision(5) >> by;
cout << "Bz:";
cin >> setprecision(5) >> bz;
cout << endl;
// Dot product of A and B
float dp = (ax * bx + ay * by + az * bz);
cout << "Dot product:" << endl;
cout << " A: (" << ax << ", " << ay << ", " << az << ")" << endl;
cout << " * B: (" << bx << ", " << by << ", " << bz << ")" << endl;
cout << " = " << dp << endl;
cout << endl;
// Cross product of A and B
float cx = (ay * bz - az * by);
float cy = (az * bx - ax * bz);
float cz = (ax * by - ay * bx);
cout << "Cross product:" << endl;
cout << " A: (" << ax << ", " << ay << ", " << az << ")" << endl;
cout << " * B: (" << bx << ", " << by << ", " << bz << ")" << endl;
cout << " = C: (" << cx << ", " << cy << ", " << cz << ")" << endl;
return 0;
}
|
76030909e34aa22bfa1677933c35bcb4e2dc1062 | 5b15c760f34ada89bd1ac5e5e48d5754cab14e10 | /Codes/ultra sonic sensor/buzzer_and_tank_level/buzzer_and_tank_level.ino | e129f9c393ca41eb10d4a94717a4e5e4c225291c | [] | no_license | Adityagupta2590/Aurdino-UNO-Tutorial-Interfacing-with-sensors- | 6e65fbf8e63f47f072a442980b4e139277d94bf3 | 9d91e6f631c2facc7142ec8d79069d61b5af93cf | refs/heads/master | 2020-07-26T04:07:29.007648 | 2016-11-14T17:53:52 | 2016-11-14T17:53:52 | 73,731,137 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,076 | ino | buzzer_and_tank_level.ino | //this usses ultrasonic sensor for detection application is shown for tank level indicator
const int buzzer = 7; // Sensor Input for buzzer
//const int trigPin = 2;// Sensor Input for ultra sonic
//const int echoPin = 4;// Sensor Input for ultra sonic
const int trigPin = 5;// Sensor Input for ultra sonic
const int echoPin = 6;// Sensor Input for ultra sonic
void setup()
{
pinMode(buzzer, INPUT); // set a pin for buzzer output
Serial.begin(9600); // initialize serial communication:
}
void loop()
{
long duration, inches, cm;
// The sensor is triggered by a HIGH pulse of 10 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
pinMode(trigPin, OUTPUT);
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Read the signal from the sensor: a HIGH pulse whose
// duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);
// convert the time into a distance
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);
delay(100);
if (cm<20)
{
// buzz(buzzer, 2500, 500); // buzz the buzzer on pin 4 at 2500Hz for 500 milliseconds
long delayValue = 100000000;
digitalWrite(buzzer,HIGH); // write the buzzer pin high to push out the diaphram
delayMicroseconds(delayValue); // wait for the calculated delay value
// digitalWrite(buzzer,LOW); // write the buzzer pin low to pull back the diaphram
// delayMicroseconds(delayValue); // wait againf or the calculated delay value
// delay(1000); // wait a bit between buzzes
}
Serial.print(inches);
Serial.print("in, ");
Serial.print(cm);
Serial.print("cm");
Serial.println();
digitalWrite(buzzer,LOW);
}
long microsecondsToInches(long microseconds)
{
return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds)
{
return microseconds / 29 / 2;
}
|
499600ee4c0dcb781f8ab3234bca093732d2caa1 | db3f4fe9faf7eb098ba5b75e7985ff46e6424e58 | /include/integratorxx/quadratures/delley/delley_1202.hpp | 60adb204f9988810cda33033106dcc7d24fd78b9 | [
"BSD-3-Clause"
] | permissive | wavefunction91/IntegratorXX | d1567c3e7d724201ea8c4dbca55ecfd5eb7def28 | ea07dedd37e7bd49ea06394eb811599002b34b49 | refs/heads/master | 2023-08-22T20:10:22.164576 | 2023-08-10T19:37:42 | 2023-08-10T19:37:42 | 172,990,735 | 2 | 5 | BSD-3-Clause | 2023-09-13T15:33:15 | 2019-02-27T21:10:06 | C++ | UTF-8 | C++ | false | false | 136,501 | hpp | delley_1202.hpp | #pragma once
namespace IntegratorXX {
namespace DelleyGrids {
/**
* \brief Delley Quadrature specification for order 59 grid with 1202 points
*
*/
template <typename T>
struct delley_1202 {
static constexpr std::array<cartesian_pt_t<T>, 1202> points = {
0.10000000000000000E+01, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.10000000000000000E+01,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.10000000000000000E+01,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.10000000000000000E+01, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.10000000000000000E+01, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.10000000000000000E+01,
0.57735026918962584E+00, 0.57735026918962584E+00,
0.57735026918962584E+00, 0.57735026918962584E+00,
0.57735026918962584E+00, -0.57735026918962584E+00,
0.57735026918962584E+00, -0.57735026918962584E+00,
0.57735026918962584E+00, 0.57735026918962584E+00,
-0.57735026918962584E+00, -0.57735026918962584E+00,
-0.57735026918962584E+00, 0.57735026918962584E+00,
0.57735026918962584E+00, -0.57735026918962584E+00,
0.57735026918962584E+00, -0.57735026918962584E+00,
-0.57735026918962584E+00, -0.57735026918962584E+00,
0.57735026918962584E+00, -0.57735026918962584E+00,
-0.57735026918962584E+00, -0.57735026918962584E+00,
0.70710678118654746E+00, 0.70710678118654746E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.70710678118654746E+00, 0.70710678118654746E+00,
0.70710678118654746E+00, 0.00000000000000000E+00,
0.70710678118654746E+00, 0.70710678118654746E+00,
-0.70710678118654746E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.70710678118654746E+00,
-0.70710678118654746E+00, -0.70710678118654746E+00,
0.00000000000000000E+00, 0.70710678118654746E+00,
-0.70710678118654746E+00, 0.70710678118654746E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.70710678118654746E+00, 0.70710678118654746E+00,
0.70710678118654746E+00, 0.00000000000000000E+00,
-0.70710678118654746E+00, -0.70710678118654746E+00,
-0.70710678118654746E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.70710678118654746E+00,
-0.70710678118654746E+00, -0.70710678118654746E+00,
0.00000000000000000E+00, -0.70710678118654746E+00,
0.99862068179991925E+00, 0.37126364496570891E-01,
0.37126364496570891E-01, 0.37126364496570891E-01,
0.99862068179991925E+00, 0.37126364496570891E-01,
0.37126364496570891E-01, 0.37126364496570891E-01,
0.99862068179991925E+00, 0.99862068179991925E+00,
0.37126364496570891E-01, -0.37126364496570891E-01,
0.37126364496570891E-01, 0.99862068179991925E+00,
-0.37126364496570891E-01, 0.37126364496570891E-01,
0.37126364496570891E-01, -0.99862068179991925E+00,
0.99862068179991925E+00, -0.37126364496570891E-01,
0.37126364496570891E-01, 0.37126364496570891E-01,
-0.99862068179991925E+00, 0.37126364496570891E-01,
0.37126364496570891E-01, -0.37126364496570891E-01,
0.99862068179991925E+00, 0.99862068179991925E+00,
-0.37126364496570891E-01, -0.37126364496570891E-01,
0.37126364496570891E-01, -0.99862068179991925E+00,
-0.37126364496570891E-01, 0.37126364496570891E-01,
-0.37126364496570891E-01, -0.99862068179991925E+00,
-0.99862068179991925E+00, 0.37126364496570891E-01,
0.37126364496570891E-01, -0.37126364496570891E-01,
0.99862068179991925E+00, 0.37126364496570891E-01,
-0.37126364496570891E-01, 0.37126364496570891E-01,
0.99862068179991925E+00, -0.99862068179991925E+00,
0.37126364496570891E-01, -0.37126364496570891E-01,
-0.37126364496570891E-01, 0.99862068179991925E+00,
-0.37126364496570891E-01, -0.37126364496570891E-01,
0.37126364496570891E-01, -0.99862068179991925E+00,
-0.99862068179991925E+00, -0.37126364496570891E-01,
0.37126364496570891E-01, -0.37126364496570891E-01,
-0.99862068179991925E+00, 0.37126364496570891E-01,
-0.37126364496570891E-01, -0.37126364496570891E-01,
0.99862068179991925E+00, -0.99862068179991925E+00,
-0.37126364496570891E-01, -0.37126364496570891E-01,
-0.37126364496570891E-01, -0.99862068179991925E+00,
-0.37126364496570891E-01, -0.37126364496570891E-01,
-0.37126364496570891E-01, -0.99862068179991925E+00,
0.99161073972201386E+00, 0.91400604122622228E-01,
0.91400604122622228E-01, 0.91400604122622228E-01,
0.99161073972201386E+00, 0.91400604122622228E-01,
0.91400604122622228E-01, 0.91400604122622228E-01,
0.99161073972201386E+00, 0.99161073972201386E+00,
0.91400604122622228E-01, -0.91400604122622228E-01,
0.91400604122622228E-01, 0.99161073972201386E+00,
-0.91400604122622228E-01, 0.91400604122622228E-01,
0.91400604122622228E-01, -0.99161073972201386E+00,
0.99161073972201386E+00, -0.91400604122622228E-01,
0.91400604122622228E-01, 0.91400604122622228E-01,
-0.99161073972201386E+00, 0.91400604122622228E-01,
0.91400604122622228E-01, -0.91400604122622228E-01,
0.99161073972201386E+00, 0.99161073972201386E+00,
-0.91400604122622228E-01, -0.91400604122622228E-01,
0.91400604122622228E-01, -0.99161073972201386E+00,
-0.91400604122622228E-01, 0.91400604122622228E-01,
-0.91400604122622228E-01, -0.99161073972201386E+00,
-0.99161073972201386E+00, 0.91400604122622228E-01,
0.91400604122622228E-01, -0.91400604122622228E-01,
0.99161073972201386E+00, 0.91400604122622228E-01,
-0.91400604122622228E-01, 0.91400604122622228E-01,
0.99161073972201386E+00, -0.99161073972201386E+00,
0.91400604122622228E-01, -0.91400604122622228E-01,
-0.91400604122622228E-01, 0.99161073972201386E+00,
-0.91400604122622228E-01, -0.91400604122622228E-01,
0.91400604122622228E-01, -0.99161073972201386E+00,
-0.99161073972201386E+00, -0.91400604122622228E-01,
0.91400604122622228E-01, -0.91400604122622228E-01,
-0.99161073972201386E+00, 0.91400604122622228E-01,
-0.91400604122622228E-01, -0.91400604122622228E-01,
0.99161073972201386E+00, -0.99161073972201386E+00,
-0.91400604122622228E-01, -0.91400604122622228E-01,
-0.91400604122622228E-01, -0.99161073972201386E+00,
-0.91400604122622228E-01, -0.91400604122622228E-01,
-0.91400604122622228E-01, -0.99161073972201386E+00,
0.97627660639468505E+00, 0.15310778524699062E+00,
0.15310778524699062E+00, 0.15310778524699062E+00,
0.97627660639468505E+00, 0.15310778524699062E+00,
0.15310778524699062E+00, 0.15310778524699062E+00,
0.97627660639468505E+00, 0.97627660639468505E+00,
0.15310778524699062E+00, -0.15310778524699062E+00,
0.15310778524699062E+00, 0.97627660639468505E+00,
-0.15310778524699062E+00, 0.15310778524699062E+00,
0.15310778524699062E+00, -0.97627660639468505E+00,
0.97627660639468505E+00, -0.15310778524699062E+00,
0.15310778524699062E+00, 0.15310778524699062E+00,
-0.97627660639468505E+00, 0.15310778524699062E+00,
0.15310778524699062E+00, -0.15310778524699062E+00,
0.97627660639468505E+00, 0.97627660639468505E+00,
-0.15310778524699062E+00, -0.15310778524699062E+00,
0.15310778524699062E+00, -0.97627660639468505E+00,
-0.15310778524699062E+00, 0.15310778524699062E+00,
-0.15310778524699062E+00, -0.97627660639468505E+00,
-0.97627660639468505E+00, 0.15310778524699062E+00,
0.15310778524699062E+00, -0.15310778524699062E+00,
0.97627660639468505E+00, 0.15310778524699062E+00,
-0.15310778524699062E+00, 0.15310778524699062E+00,
0.97627660639468505E+00, -0.97627660639468505E+00,
0.15310778524699062E+00, -0.15310778524699062E+00,
-0.15310778524699062E+00, 0.97627660639468505E+00,
-0.15310778524699062E+00, -0.15310778524699062E+00,
0.15310778524699062E+00, -0.97627660639468505E+00,
-0.97627660639468505E+00, -0.15310778524699062E+00,
0.15310778524699062E+00, -0.15310778524699062E+00,
-0.97627660639468505E+00, 0.15310778524699062E+00,
-0.15310778524699062E+00, -0.15310778524699062E+00,
0.97627660639468505E+00, -0.97627660639468505E+00,
-0.15310778524699062E+00, -0.15310778524699062E+00,
-0.15310778524699062E+00, -0.97627660639468505E+00,
-0.15310778524699062E+00, -0.15310778524699062E+00,
-0.15310778524699062E+00, -0.97627660639468505E+00,
0.95124706748057852E+00, 0.21809288916606115E+00,
0.21809288916606115E+00, 0.21809288916606115E+00,
0.95124706748057852E+00, 0.21809288916606115E+00,
0.21809288916606115E+00, 0.21809288916606115E+00,
0.95124706748057852E+00, 0.95124706748057852E+00,
0.21809288916606115E+00, -0.21809288916606115E+00,
0.21809288916606115E+00, 0.95124706748057852E+00,
-0.21809288916606115E+00, 0.21809288916606115E+00,
0.21809288916606115E+00, -0.95124706748057852E+00,
0.95124706748057852E+00, -0.21809288916606115E+00,
0.21809288916606115E+00, 0.21809288916606115E+00,
-0.95124706748057852E+00, 0.21809288916606115E+00,
0.21809288916606115E+00, -0.21809288916606115E+00,
0.95124706748057852E+00, 0.95124706748057852E+00,
-0.21809288916606115E+00, -0.21809288916606115E+00,
0.21809288916606115E+00, -0.95124706748057852E+00,
-0.21809288916606115E+00, 0.21809288916606115E+00,
-0.21809288916606115E+00, -0.95124706748057852E+00,
-0.95124706748057852E+00, 0.21809288916606115E+00,
0.21809288916606115E+00, -0.21809288916606115E+00,
0.95124706748057852E+00, 0.21809288916606115E+00,
-0.21809288916606115E+00, 0.21809288916606115E+00,
0.95124706748057852E+00, -0.95124706748057852E+00,
0.21809288916606115E+00, -0.21809288916606115E+00,
-0.21809288916606115E+00, 0.95124706748057852E+00,
-0.21809288916606115E+00, -0.21809288916606115E+00,
0.21809288916606115E+00, -0.95124706748057852E+00,
-0.95124706748057852E+00, -0.21809288916606115E+00,
0.21809288916606115E+00, -0.21809288916606115E+00,
-0.95124706748057852E+00, 0.21809288916606115E+00,
-0.21809288916606115E+00, -0.21809288916606115E+00,
0.95124706748057852E+00, -0.95124706748057852E+00,
-0.21809288916606115E+00, -0.21809288916606115E+00,
-0.21809288916606115E+00, -0.95124706748057852E+00,
-0.21809288916606115E+00, -0.21809288916606115E+00,
-0.21809288916606115E+00, -0.95124706748057852E+00,
0.91580688620866835E+00, 0.28398745322001745E+00,
0.28398745322001745E+00, 0.28398745322001745E+00,
0.91580688620866835E+00, 0.28398745322001745E+00,
0.28398745322001745E+00, 0.28398745322001745E+00,
0.91580688620866835E+00, 0.91580688620866835E+00,
0.28398745322001745E+00, -0.28398745322001745E+00,
0.28398745322001745E+00, 0.91580688620866835E+00,
-0.28398745322001745E+00, 0.28398745322001745E+00,
0.28398745322001745E+00, -0.91580688620866835E+00,
0.91580688620866835E+00, -0.28398745322001745E+00,
0.28398745322001745E+00, 0.28398745322001745E+00,
-0.91580688620866835E+00, 0.28398745322001745E+00,
0.28398745322001745E+00, -0.28398745322001745E+00,
0.91580688620866835E+00, 0.91580688620866835E+00,
-0.28398745322001745E+00, -0.28398745322001745E+00,
0.28398745322001745E+00, -0.91580688620866835E+00,
-0.28398745322001745E+00, 0.28398745322001745E+00,
-0.28398745322001745E+00, -0.91580688620866835E+00,
-0.91580688620866835E+00, 0.28398745322001745E+00,
0.28398745322001745E+00, -0.28398745322001745E+00,
0.91580688620866835E+00, 0.28398745322001745E+00,
-0.28398745322001745E+00, 0.28398745322001745E+00,
0.91580688620866835E+00, -0.91580688620866835E+00,
0.28398745322001745E+00, -0.28398745322001745E+00,
-0.28398745322001745E+00, 0.91580688620866835E+00,
-0.28398745322001745E+00, -0.28398745322001745E+00,
0.28398745322001745E+00, -0.91580688620866835E+00,
-0.91580688620866835E+00, -0.28398745322001745E+00,
0.28398745322001745E+00, -0.28398745322001745E+00,
-0.91580688620866835E+00, 0.28398745322001745E+00,
-0.28398745322001745E+00, -0.28398745322001745E+00,
0.91580688620866835E+00, -0.91580688620866835E+00,
-0.28398745322001745E+00, -0.28398745322001745E+00,
-0.28398745322001745E+00, -0.91580688620866835E+00,
-0.28398745322001745E+00, -0.28398745322001745E+00,
-0.28398745322001745E+00, -0.91580688620866835E+00,
0.86961691518195405E+00, 0.34911776009637646E+00,
0.34911776009637646E+00, 0.34911776009637646E+00,
0.86961691518195405E+00, 0.34911776009637646E+00,
0.34911776009637646E+00, 0.34911776009637646E+00,
0.86961691518195405E+00, 0.86961691518195405E+00,
0.34911776009637646E+00, -0.34911776009637646E+00,
0.34911776009637646E+00, 0.86961691518195405E+00,
-0.34911776009637646E+00, 0.34911776009637646E+00,
0.34911776009637646E+00, -0.86961691518195405E+00,
0.86961691518195405E+00, -0.34911776009637646E+00,
0.34911776009637646E+00, 0.34911776009637646E+00,
-0.86961691518195405E+00, 0.34911776009637646E+00,
0.34911776009637646E+00, -0.34911776009637646E+00,
0.86961691518195405E+00, 0.86961691518195405E+00,
-0.34911776009637646E+00, -0.34911776009637646E+00,
0.34911776009637646E+00, -0.86961691518195405E+00,
-0.34911776009637646E+00, 0.34911776009637646E+00,
-0.34911776009637646E+00, -0.86961691518195405E+00,
-0.86961691518195405E+00, 0.34911776009637646E+00,
0.34911776009637646E+00, -0.34911776009637646E+00,
0.86961691518195405E+00, 0.34911776009637646E+00,
-0.34911776009637646E+00, 0.34911776009637646E+00,
0.86961691518195405E+00, -0.86961691518195405E+00,
0.34911776009637646E+00, -0.34911776009637646E+00,
-0.34911776009637646E+00, 0.86961691518195405E+00,
-0.34911776009637646E+00, -0.34911776009637646E+00,
0.34911776009637646E+00, -0.86961691518195405E+00,
-0.86961691518195405E+00, -0.34911776009637646E+00,
0.34911776009637646E+00, -0.34911776009637646E+00,
-0.86961691518195405E+00, 0.34911776009637646E+00,
-0.34911776009637646E+00, -0.34911776009637646E+00,
0.86961691518195405E+00, -0.86961691518195405E+00,
-0.34911776009637646E+00, -0.34911776009637646E+00,
-0.34911776009637646E+00, -0.86961691518195405E+00,
-0.34911776009637646E+00, -0.34911776009637646E+00,
-0.34911776009637646E+00, -0.86961691518195405E+00,
0.81257372229991565E+00, 0.41214314614443093E+00,
0.41214314614443093E+00, 0.41214314614443093E+00,
0.81257372229991565E+00, 0.41214314614443093E+00,
0.41214314614443093E+00, 0.41214314614443093E+00,
0.81257372229991565E+00, 0.81257372229991565E+00,
0.41214314614443093E+00, -0.41214314614443093E+00,
0.41214314614443093E+00, 0.81257372229991565E+00,
-0.41214314614443093E+00, 0.41214314614443093E+00,
0.41214314614443093E+00, -0.81257372229991565E+00,
0.81257372229991565E+00, -0.41214314614443093E+00,
0.41214314614443093E+00, 0.41214314614443093E+00,
-0.81257372229991565E+00, 0.41214314614443093E+00,
0.41214314614443093E+00, -0.41214314614443093E+00,
0.81257372229991565E+00, 0.81257372229991565E+00,
-0.41214314614443093E+00, -0.41214314614443093E+00,
0.41214314614443093E+00, -0.81257372229991565E+00,
-0.41214314614443093E+00, 0.41214314614443093E+00,
-0.41214314614443093E+00, -0.81257372229991565E+00,
-0.81257372229991565E+00, 0.41214314614443093E+00,
0.41214314614443093E+00, -0.41214314614443093E+00,
0.81257372229991565E+00, 0.41214314614443093E+00,
-0.41214314614443093E+00, 0.41214314614443093E+00,
0.81257372229991565E+00, -0.81257372229991565E+00,
0.41214314614443093E+00, -0.41214314614443093E+00,
-0.41214314614443093E+00, 0.81257372229991565E+00,
-0.41214314614443093E+00, -0.41214314614443093E+00,
0.41214314614443093E+00, -0.81257372229991565E+00,
-0.81257372229991565E+00, -0.41214314614443093E+00,
0.41214314614443093E+00, -0.41214314614443093E+00,
-0.81257372229991565E+00, 0.41214314614443093E+00,
-0.41214314614443093E+00, -0.41214314614443093E+00,
0.81257372229991565E+00, -0.81257372229991565E+00,
-0.41214314614443093E+00, -0.41214314614443093E+00,
-0.41214314614443093E+00, -0.81257372229991565E+00,
-0.41214314614443093E+00, -0.41214314614443093E+00,
-0.41214314614443093E+00, -0.81257372229991565E+00,
0.74472946963210651E+00, 0.47189936271491267E+00,
0.47189936271491267E+00, 0.47189936271491267E+00,
0.74472946963210651E+00, 0.47189936271491267E+00,
0.47189936271491267E+00, 0.47189936271491267E+00,
0.74472946963210651E+00, 0.74472946963210651E+00,
0.47189936271491267E+00, -0.47189936271491267E+00,
0.47189936271491267E+00, 0.74472946963210651E+00,
-0.47189936271491267E+00, 0.47189936271491267E+00,
0.47189936271491267E+00, -0.74472946963210651E+00,
0.74472946963210651E+00, -0.47189936271491267E+00,
0.47189936271491267E+00, 0.47189936271491267E+00,
-0.74472946963210651E+00, 0.47189936271491267E+00,
0.47189936271491267E+00, -0.47189936271491267E+00,
0.74472946963210651E+00, 0.74472946963210651E+00,
-0.47189936271491267E+00, -0.47189936271491267E+00,
0.47189936271491267E+00, -0.74472946963210651E+00,
-0.47189936271491267E+00, 0.47189936271491267E+00,
-0.47189936271491267E+00, -0.74472946963210651E+00,
-0.74472946963210651E+00, 0.47189936271491267E+00,
0.47189936271491267E+00, -0.47189936271491267E+00,
0.74472946963210651E+00, 0.47189936271491267E+00,
-0.47189936271491267E+00, 0.47189936271491267E+00,
0.74472946963210651E+00, -0.74472946963210651E+00,
0.47189936271491267E+00, -0.47189936271491267E+00,
-0.47189936271491267E+00, 0.74472946963210651E+00,
-0.47189936271491267E+00, -0.47189936271491267E+00,
0.47189936271491267E+00, -0.74472946963210651E+00,
-0.74472946963210651E+00, -0.47189936271491267E+00,
0.47189936271491267E+00, -0.47189936271491267E+00,
-0.74472946963210651E+00, 0.47189936271491267E+00,
-0.47189936271491267E+00, -0.47189936271491267E+00,
0.74472946963210651E+00, -0.74472946963210651E+00,
-0.47189936271491267E+00, -0.47189936271491267E+00,
-0.47189936271491267E+00, -0.74472946963210651E+00,
-0.47189936271491267E+00, -0.47189936271491267E+00,
-0.47189936271491267E+00, -0.74472946963210651E+00,
0.66624225373610446E+00, 0.52731454528423360E+00,
0.52731454528423360E+00, 0.52731454528423360E+00,
0.66624225373610446E+00, 0.52731454528423360E+00,
0.52731454528423360E+00, 0.52731454528423360E+00,
0.66624225373610446E+00, 0.66624225373610446E+00,
0.52731454528423360E+00, -0.52731454528423360E+00,
0.52731454528423360E+00, 0.66624225373610446E+00,
-0.52731454528423360E+00, 0.52731454528423360E+00,
0.52731454528423360E+00, -0.66624225373610446E+00,
0.66624225373610446E+00, -0.52731454528423360E+00,
0.52731454528423360E+00, 0.52731454528423360E+00,
-0.66624225373610446E+00, 0.52731454528423360E+00,
0.52731454528423360E+00, -0.52731454528423360E+00,
0.66624225373610446E+00, 0.66624225373610446E+00,
-0.52731454528423360E+00, -0.52731454528423360E+00,
0.52731454528423360E+00, -0.66624225373610446E+00,
-0.52731454528423360E+00, 0.52731454528423360E+00,
-0.52731454528423360E+00, -0.66624225373610446E+00,
-0.66624225373610446E+00, 0.52731454528423360E+00,
0.52731454528423360E+00, -0.52731454528423360E+00,
0.66624225373610446E+00, 0.52731454528423360E+00,
-0.52731454528423360E+00, 0.52731454528423360E+00,
0.66624225373610446E+00, -0.66624225373610446E+00,
0.52731454528423360E+00, -0.52731454528423360E+00,
-0.52731454528423360E+00, 0.66624225373610446E+00,
-0.52731454528423360E+00, -0.52731454528423360E+00,
0.52731454528423360E+00, -0.66624225373610446E+00,
-0.66624225373610446E+00, -0.52731454528423360E+00,
0.52731454528423360E+00, -0.52731454528423360E+00,
-0.66624225373610446E+00, 0.52731454528423360E+00,
-0.52731454528423360E+00, -0.52731454528423360E+00,
0.66624225373610446E+00, -0.66624225373610446E+00,
-0.52731454528423360E+00, -0.52731454528423360E+00,
-0.52731454528423360E+00, -0.66624225373610446E+00,
-0.52731454528423360E+00, -0.52731454528423360E+00,
-0.52731454528423360E+00, -0.66624225373610446E+00,
0.47838093807695226E+00, 0.62094753324440188E+00,
0.62094753324440188E+00, 0.62094753324440188E+00,
0.47838093807695226E+00, 0.62094753324440188E+00,
0.62094753324440188E+00, 0.62094753324440188E+00,
0.47838093807695226E+00, 0.47838093807695226E+00,
0.62094753324440188E+00, -0.62094753324440188E+00,
0.62094753324440188E+00, 0.47838093807695226E+00,
-0.62094753324440188E+00, 0.62094753324440188E+00,
0.62094753324440188E+00, -0.47838093807695226E+00,
0.47838093807695226E+00, -0.62094753324440188E+00,
0.62094753324440188E+00, 0.62094753324440188E+00,
-0.47838093807695226E+00, 0.62094753324440188E+00,
0.62094753324440188E+00, -0.62094753324440188E+00,
0.47838093807695226E+00, 0.47838093807695226E+00,
-0.62094753324440188E+00, -0.62094753324440188E+00,
0.62094753324440188E+00, -0.47838093807695226E+00,
-0.62094753324440188E+00, 0.62094753324440188E+00,
-0.62094753324440188E+00, -0.47838093807695226E+00,
-0.47838093807695226E+00, 0.62094753324440188E+00,
0.62094753324440188E+00, -0.62094753324440188E+00,
0.47838093807695226E+00, 0.62094753324440188E+00,
-0.62094753324440188E+00, 0.62094753324440188E+00,
0.47838093807695226E+00, -0.47838093807695226E+00,
0.62094753324440188E+00, -0.62094753324440188E+00,
-0.62094753324440188E+00, 0.47838093807695226E+00,
-0.62094753324440188E+00, -0.62094753324440188E+00,
0.62094753324440188E+00, -0.47838093807695226E+00,
-0.47838093807695226E+00, -0.62094753324440188E+00,
0.62094753324440188E+00, -0.62094753324440188E+00,
-0.47838093807695226E+00, 0.62094753324440188E+00,
-0.62094753324440188E+00, -0.62094753324440188E+00,
0.47838093807695226E+00, -0.47838093807695226E+00,
-0.62094753324440188E+00, -0.62094753324440188E+00,
-0.62094753324440188E+00, -0.47838093807695226E+00,
-0.62094753324440188E+00, -0.62094753324440188E+00,
-0.62094753324440188E+00, -0.47838093807695226E+00,
0.36983086645942581E+00, 0.65697227118572910E+00,
0.65697227118572910E+00, 0.65697227118572910E+00,
0.36983086645942581E+00, 0.65697227118572910E+00,
0.65697227118572910E+00, 0.65697227118572910E+00,
0.36983086645942581E+00, 0.36983086645942581E+00,
0.65697227118572910E+00, -0.65697227118572910E+00,
0.65697227118572910E+00, 0.36983086645942581E+00,
-0.65697227118572910E+00, 0.65697227118572910E+00,
0.65697227118572910E+00, -0.36983086645942581E+00,
0.36983086645942581E+00, -0.65697227118572910E+00,
0.65697227118572910E+00, 0.65697227118572910E+00,
-0.36983086645942581E+00, 0.65697227118572910E+00,
0.65697227118572910E+00, -0.65697227118572910E+00,
0.36983086645942581E+00, 0.36983086645942581E+00,
-0.65697227118572910E+00, -0.65697227118572910E+00,
0.65697227118572910E+00, -0.36983086645942581E+00,
-0.65697227118572910E+00, 0.65697227118572910E+00,
-0.65697227118572910E+00, -0.36983086645942581E+00,
-0.36983086645942581E+00, 0.65697227118572910E+00,
0.65697227118572910E+00, -0.65697227118572910E+00,
0.36983086645942581E+00, 0.65697227118572910E+00,
-0.65697227118572910E+00, 0.65697227118572910E+00,
0.36983086645942581E+00, -0.36983086645942581E+00,
0.65697227118572910E+00, -0.65697227118572910E+00,
-0.65697227118572910E+00, 0.36983086645942581E+00,
-0.65697227118572910E+00, -0.65697227118572910E+00,
0.65697227118572910E+00, -0.36983086645942581E+00,
-0.36983086645942581E+00, -0.65697227118572910E+00,
0.65697227118572910E+00, -0.65697227118572910E+00,
-0.36983086645942581E+00, 0.65697227118572910E+00,
-0.65697227118572910E+00, -0.65697227118572910E+00,
0.36983086645942581E+00, -0.36983086645942581E+00,
-0.65697227118572910E+00, -0.65697227118572910E+00,
-0.65697227118572910E+00, -0.36983086645942581E+00,
-0.65697227118572910E+00, -0.65697227118572910E+00,
-0.65697227118572910E+00, -0.36983086645942581E+00,
0.25258395570071762E+00, 0.68417883090701437E+00,
0.68417883090701437E+00, 0.68417883090701437E+00,
0.25258395570071762E+00, 0.68417883090701437E+00,
0.68417883090701437E+00, 0.68417883090701437E+00,
0.25258395570071762E+00, 0.25258395570071762E+00,
0.68417883090701437E+00, -0.68417883090701437E+00,
0.68417883090701437E+00, 0.25258395570071762E+00,
-0.68417883090701437E+00, 0.68417883090701437E+00,
0.68417883090701437E+00, -0.25258395570071762E+00,
0.25258395570071762E+00, -0.68417883090701437E+00,
0.68417883090701437E+00, 0.68417883090701437E+00,
-0.25258395570071762E+00, 0.68417883090701437E+00,
0.68417883090701437E+00, -0.68417883090701437E+00,
0.25258395570071762E+00, 0.25258395570071762E+00,
-0.68417883090701437E+00, -0.68417883090701437E+00,
0.68417883090701437E+00, -0.25258395570071762E+00,
-0.68417883090701437E+00, 0.68417883090701437E+00,
-0.68417883090701437E+00, -0.25258395570071762E+00,
-0.25258395570071762E+00, 0.68417883090701437E+00,
0.68417883090701437E+00, -0.68417883090701437E+00,
0.25258395570071762E+00, 0.68417883090701437E+00,
-0.68417883090701437E+00, 0.68417883090701437E+00,
0.25258395570071762E+00, -0.25258395570071762E+00,
0.68417883090701437E+00, -0.68417883090701437E+00,
-0.68417883090701437E+00, 0.25258395570071762E+00,
-0.68417883090701437E+00, -0.68417883090701437E+00,
0.68417883090701437E+00, -0.25258395570071762E+00,
-0.25258395570071762E+00, -0.68417883090701437E+00,
0.68417883090701437E+00, -0.68417883090701437E+00,
-0.25258395570071762E+00, 0.68417883090701437E+00,
-0.68417883090701437E+00, -0.68417883090701437E+00,
0.25258395570071762E+00, -0.25258395570071762E+00,
-0.68417883090701437E+00, -0.68417883090701437E+00,
-0.68417883090701437E+00, -0.25258395570071762E+00,
-0.68417883090701437E+00, -0.68417883090701437E+00,
-0.68417883090701437E+00, -0.25258395570071762E+00,
0.12832618665972312E+00, 0.70126043301236307E+00,
0.70126043301236307E+00, 0.70126043301236307E+00,
0.12832618665972312E+00, 0.70126043301236307E+00,
0.70126043301236307E+00, 0.70126043301236307E+00,
0.12832618665972312E+00, 0.12832618665972312E+00,
0.70126043301236307E+00, -0.70126043301236307E+00,
0.70126043301236307E+00, 0.12832618665972312E+00,
-0.70126043301236307E+00, 0.70126043301236307E+00,
0.70126043301236307E+00, -0.12832618665972312E+00,
0.12832618665972312E+00, -0.70126043301236307E+00,
0.70126043301236307E+00, 0.70126043301236307E+00,
-0.12832618665972312E+00, 0.70126043301236307E+00,
0.70126043301236307E+00, -0.70126043301236307E+00,
0.12832618665972312E+00, 0.12832618665972312E+00,
-0.70126043301236307E+00, -0.70126043301236307E+00,
0.70126043301236307E+00, -0.12832618665972312E+00,
-0.70126043301236307E+00, 0.70126043301236307E+00,
-0.70126043301236307E+00, -0.12832618665972312E+00,
-0.12832618665972312E+00, 0.70126043301236307E+00,
0.70126043301236307E+00, -0.70126043301236307E+00,
0.12832618665972312E+00, 0.70126043301236307E+00,
-0.70126043301236307E+00, 0.70126043301236307E+00,
0.12832618665972312E+00, -0.12832618665972312E+00,
0.70126043301236307E+00, -0.70126043301236307E+00,
-0.70126043301236307E+00, 0.12832618665972312E+00,
-0.70126043301236307E+00, -0.70126043301236307E+00,
0.70126043301236307E+00, -0.12832618665972312E+00,
-0.12832618665972312E+00, -0.70126043301236307E+00,
0.70126043301236307E+00, -0.70126043301236307E+00,
-0.12832618665972312E+00, 0.70126043301236307E+00,
-0.70126043301236307E+00, -0.70126043301236307E+00,
0.12832618665972312E+00, -0.12832618665972312E+00,
-0.70126043301236307E+00, -0.70126043301236307E+00,
-0.70126043301236307E+00, -0.12832618665972312E+00,
-0.70126043301236307E+00, -0.70126043301236307E+00,
-0.70126043301236307E+00, -0.12832618665972312E+00,
0.00000000000000000E+00, 0.10723822154781661E+00,
0.99423335482132236E+00, 0.99423335482132236E+00,
0.00000000000000000E+00, 0.10723822154781661E+00,
0.10723822154781661E+00, 0.99423335482132236E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.99423335482132236E+00, 0.10723822154781661E+00,
0.10723822154781661E+00, 0.00000000000000000E+00,
0.99423335482132236E+00, 0.99423335482132236E+00,
0.10723822154781661E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.10723822154781661E+00,
-0.99423335482132236E+00, -0.99423335482132236E+00,
0.00000000000000000E+00, 0.10723822154781661E+00,
0.10723822154781661E+00, -0.99423335482132236E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.99423335482132236E+00, 0.10723822154781661E+00,
0.10723822154781661E+00, 0.00000000000000000E+00,
-0.99423335482132236E+00, -0.99423335482132236E+00,
0.10723822154781661E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.10723822154781661E+00,
0.99423335482132236E+00, 0.99423335482132236E+00,
0.00000000000000000E+00, -0.10723822154781661E+00,
-0.10723822154781661E+00, 0.99423335482132236E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.99423335482132236E+00, -0.10723822154781661E+00,
-0.10723822154781661E+00, 0.00000000000000000E+00,
0.99423335482132236E+00, 0.99423335482132236E+00,
-0.10723822154781661E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.10723822154781661E+00,
-0.99423335482132236E+00, -0.99423335482132236E+00,
0.00000000000000000E+00, -0.10723822154781661E+00,
-0.10723822154781661E+00, -0.99423335482132236E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.99423335482132236E+00, -0.10723822154781661E+00,
-0.10723822154781661E+00, 0.00000000000000000E+00,
-0.99423335482132236E+00, -0.99423335482132236E+00,
-0.10723822154781661E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.25820689594969681E+00,
0.96608964329611902E+00, 0.96608964329611902E+00,
0.00000000000000000E+00, 0.25820689594969681E+00,
0.25820689594969681E+00, 0.96608964329611902E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.96608964329611902E+00, 0.25820689594969681E+00,
0.25820689594969681E+00, 0.00000000000000000E+00,
0.96608964329611902E+00, 0.96608964329611902E+00,
0.25820689594969681E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.25820689594969681E+00,
-0.96608964329611902E+00, -0.96608964329611902E+00,
0.00000000000000000E+00, 0.25820689594969681E+00,
0.25820689594969681E+00, -0.96608964329611902E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.96608964329611902E+00, 0.25820689594969681E+00,
0.25820689594969681E+00, 0.00000000000000000E+00,
-0.96608964329611902E+00, -0.96608964329611902E+00,
0.25820689594969681E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.25820689594969681E+00,
0.96608964329611902E+00, 0.96608964329611902E+00,
0.00000000000000000E+00, -0.25820689594969681E+00,
-0.25820689594969681E+00, 0.96608964329611902E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.96608964329611902E+00, -0.25820689594969681E+00,
-0.25820689594969681E+00, 0.00000000000000000E+00,
0.96608964329611902E+00, 0.96608964329611902E+00,
-0.25820689594969681E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.25820689594969681E+00,
-0.96608964329611902E+00, -0.96608964329611902E+00,
0.00000000000000000E+00, -0.25820689594969681E+00,
-0.25820689594969681E+00, -0.96608964329611902E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.96608964329611902E+00, -0.25820689594969681E+00,
-0.25820689594969681E+00, 0.00000000000000000E+00,
-0.96608964329611902E+00, -0.96608964329611902E+00,
-0.25820689594969681E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.41727529553067166E+00,
0.90878013168191052E+00, 0.90878013168191052E+00,
0.00000000000000000E+00, 0.41727529553067166E+00,
0.41727529553067166E+00, 0.90878013168191052E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.90878013168191052E+00, 0.41727529553067166E+00,
0.41727529553067166E+00, 0.00000000000000000E+00,
0.90878013168191052E+00, 0.90878013168191052E+00,
0.41727529553067166E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.41727529553067166E+00,
-0.90878013168191052E+00, -0.90878013168191052E+00,
0.00000000000000000E+00, 0.41727529553067166E+00,
0.41727529553067166E+00, -0.90878013168191052E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.90878013168191052E+00, 0.41727529553067166E+00,
0.41727529553067166E+00, 0.00000000000000000E+00,
-0.90878013168191052E+00, -0.90878013168191052E+00,
0.41727529553067166E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.41727529553067166E+00,
0.90878013168191052E+00, 0.90878013168191052E+00,
0.00000000000000000E+00, -0.41727529553067166E+00,
-0.41727529553067166E+00, 0.90878013168191052E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.90878013168191052E+00, -0.41727529553067166E+00,
-0.41727529553067166E+00, 0.00000000000000000E+00,
0.90878013168191052E+00, 0.90878013168191052E+00,
-0.41727529553067166E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.41727529553067166E+00,
-0.90878013168191052E+00, -0.90878013168191052E+00,
0.00000000000000000E+00, -0.41727529553067166E+00,
-0.41727529553067166E+00, -0.90878013168191052E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.90878013168191052E+00, -0.41727529553067166E+00,
-0.41727529553067166E+00, 0.00000000000000000E+00,
-0.90878013168191052E+00, -0.90878013168191052E+00,
-0.41727529553067166E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.57003669117925038E+00,
0.82161923706143336E+00, 0.82161923706143336E+00,
0.00000000000000000E+00, 0.57003669117925038E+00,
0.57003669117925038E+00, 0.82161923706143336E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.82161923706143336E+00, 0.57003669117925038E+00,
0.57003669117925038E+00, 0.00000000000000000E+00,
0.82161923706143336E+00, 0.82161923706143336E+00,
0.57003669117925038E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, 0.57003669117925038E+00,
-0.82161923706143336E+00, -0.82161923706143336E+00,
0.00000000000000000E+00, 0.57003669117925038E+00,
0.57003669117925038E+00, -0.82161923706143336E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.82161923706143336E+00, 0.57003669117925038E+00,
0.57003669117925038E+00, 0.00000000000000000E+00,
-0.82161923706143336E+00, -0.82161923706143336E+00,
0.57003669117925038E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.57003669117925038E+00,
0.82161923706143336E+00, 0.82161923706143336E+00,
0.00000000000000000E+00, -0.57003669117925038E+00,
-0.57003669117925038E+00, 0.82161923706143336E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
0.82161923706143336E+00, -0.57003669117925038E+00,
-0.57003669117925038E+00, 0.00000000000000000E+00,
0.82161923706143336E+00, 0.82161923706143336E+00,
-0.57003669117925038E+00, 0.00000000000000000E+00,
0.00000000000000000E+00, -0.57003669117925038E+00,
-0.82161923706143336E+00, -0.82161923706143336E+00,
0.00000000000000000E+00, -0.57003669117925038E+00,
-0.57003669117925038E+00, -0.82161923706143336E+00,
0.00000000000000000E+00, 0.00000000000000000E+00,
-0.82161923706143336E+00, -0.57003669117925038E+00,
-0.57003669117925038E+00, 0.00000000000000000E+00,
-0.82161923706143336E+00, -0.82161923706143336E+00,
-0.57003669117925038E+00, 0.00000000000000000E+00,
0.52106394770112842E-01, 0.17717740226153253E+00,
0.98279860182639467E+00, 0.52106394770112842E-01,
0.98279860182639467E+00, 0.17717740226153253E+00,
0.98279860182639467E+00, 0.52106394770112842E-01,
0.17717740226153253E+00, 0.17717740226153253E+00,
0.52106394770112842E-01, 0.98279860182639467E+00,
0.17717740226153253E+00, 0.98279860182639467E+00,
0.52106394770112842E-01, 0.98279860182639467E+00,
0.17717740226153253E+00, 0.52106394770112842E-01,
0.52106394770112842E-01, 0.17717740226153253E+00,
-0.98279860182639467E+00, 0.52106394770112842E-01,
-0.98279860182639467E+00, 0.17717740226153253E+00,
-0.98279860182639467E+00, 0.52106394770112842E-01,
0.17717740226153253E+00, 0.17717740226153253E+00,
0.52106394770112842E-01, -0.98279860182639467E+00,
0.17717740226153253E+00, -0.98279860182639467E+00,
0.52106394770112842E-01, -0.98279860182639467E+00,
0.17717740226153253E+00, 0.52106394770112842E-01,
0.52106394770112842E-01, -0.17717740226153253E+00,
0.98279860182639467E+00, 0.52106394770112842E-01,
0.98279860182639467E+00, -0.17717740226153253E+00,
0.98279860182639467E+00, 0.52106394770112842E-01,
-0.17717740226153253E+00, -0.17717740226153253E+00,
0.52106394770112842E-01, 0.98279860182639467E+00,
-0.17717740226153253E+00, 0.98279860182639467E+00,
0.52106394770112842E-01, 0.98279860182639467E+00,
-0.17717740226153253E+00, 0.52106394770112842E-01,
0.52106394770112842E-01, -0.17717740226153253E+00,
-0.98279860182639467E+00, 0.52106394770112842E-01,
-0.98279860182639467E+00, -0.17717740226153253E+00,
-0.98279860182639467E+00, 0.52106394770112842E-01,
-0.17717740226153253E+00, -0.17717740226153253E+00,
0.52106394770112842E-01, -0.98279860182639467E+00,
-0.17717740226153253E+00, -0.98279860182639467E+00,
0.52106394770112842E-01, -0.98279860182639467E+00,
-0.17717740226153253E+00, 0.52106394770112842E-01,
-0.52106394770112842E-01, 0.17717740226153253E+00,
0.98279860182639467E+00, -0.52106394770112842E-01,
0.98279860182639467E+00, 0.17717740226153253E+00,
0.98279860182639467E+00, -0.52106394770112842E-01,
0.17717740226153253E+00, 0.17717740226153253E+00,
-0.52106394770112842E-01, 0.98279860182639467E+00,
0.17717740226153253E+00, 0.98279860182639467E+00,
-0.52106394770112842E-01, 0.98279860182639467E+00,
0.17717740226153253E+00, -0.52106394770112842E-01,
-0.52106394770112842E-01, 0.17717740226153253E+00,
-0.98279860182639467E+00, -0.52106394770112842E-01,
-0.98279860182639467E+00, 0.17717740226153253E+00,
-0.98279860182639467E+00, -0.52106394770112842E-01,
0.17717740226153253E+00, 0.17717740226153253E+00,
-0.52106394770112842E-01, -0.98279860182639467E+00,
0.17717740226153253E+00, -0.98279860182639467E+00,
-0.52106394770112842E-01, -0.98279860182639467E+00,
0.17717740226153253E+00, -0.52106394770112842E-01,
-0.52106394770112842E-01, -0.17717740226153253E+00,
0.98279860182639467E+00, -0.52106394770112842E-01,
0.98279860182639467E+00, -0.17717740226153253E+00,
0.98279860182639467E+00, -0.52106394770112842E-01,
-0.17717740226153253E+00, -0.17717740226153253E+00,
-0.52106394770112842E-01, 0.98279860182639467E+00,
-0.17717740226153253E+00, 0.98279860182639467E+00,
-0.52106394770112842E-01, 0.98279860182639467E+00,
-0.17717740226153253E+00, -0.52106394770112842E-01,
-0.52106394770112842E-01, -0.17717740226153253E+00,
-0.98279860182639467E+00, -0.52106394770112842E-01,
-0.98279860182639467E+00, -0.17717740226153253E+00,
-0.98279860182639467E+00, -0.52106394770112842E-01,
-0.17717740226153253E+00, -0.17717740226153253E+00,
-0.52106394770112842E-01, -0.98279860182639467E+00,
-0.17717740226153253E+00, -0.98279860182639467E+00,
-0.52106394770112842E-01, -0.98279860182639467E+00,
-0.17717740226153253E+00, -0.52106394770112842E-01,
0.11156409571564867E+00, 0.24757164634262877E+00,
0.96242492303262273E+00, 0.11156409571564867E+00,
0.96242492303262273E+00, 0.24757164634262877E+00,
0.96242492303262273E+00, 0.11156409571564867E+00,
0.24757164634262877E+00, 0.24757164634262877E+00,
0.11156409571564867E+00, 0.96242492303262273E+00,
0.24757164634262877E+00, 0.96242492303262273E+00,
0.11156409571564867E+00, 0.96242492303262273E+00,
0.24757164634262877E+00, 0.11156409571564867E+00,
0.11156409571564867E+00, 0.24757164634262877E+00,
-0.96242492303262273E+00, 0.11156409571564867E+00,
-0.96242492303262273E+00, 0.24757164634262877E+00,
-0.96242492303262273E+00, 0.11156409571564867E+00,
0.24757164634262877E+00, 0.24757164634262877E+00,
0.11156409571564867E+00, -0.96242492303262273E+00,
0.24757164634262877E+00, -0.96242492303262273E+00,
0.11156409571564867E+00, -0.96242492303262273E+00,
0.24757164634262877E+00, 0.11156409571564867E+00,
0.11156409571564867E+00, -0.24757164634262877E+00,
0.96242492303262273E+00, 0.11156409571564867E+00,
0.96242492303262273E+00, -0.24757164634262877E+00,
0.96242492303262273E+00, 0.11156409571564867E+00,
-0.24757164634262877E+00, -0.24757164634262877E+00,
0.11156409571564867E+00, 0.96242492303262273E+00,
-0.24757164634262877E+00, 0.96242492303262273E+00,
0.11156409571564867E+00, 0.96242492303262273E+00,
-0.24757164634262877E+00, 0.11156409571564867E+00,
0.11156409571564867E+00, -0.24757164634262877E+00,
-0.96242492303262273E+00, 0.11156409571564867E+00,
-0.96242492303262273E+00, -0.24757164634262877E+00,
-0.96242492303262273E+00, 0.11156409571564867E+00,
-0.24757164634262877E+00, -0.24757164634262877E+00,
0.11156409571564867E+00, -0.96242492303262273E+00,
-0.24757164634262877E+00, -0.96242492303262273E+00,
0.11156409571564867E+00, -0.96242492303262273E+00,
-0.24757164634262877E+00, 0.11156409571564867E+00,
-0.11156409571564867E+00, 0.24757164634262877E+00,
0.96242492303262273E+00, -0.11156409571564867E+00,
0.96242492303262273E+00, 0.24757164634262877E+00,
0.96242492303262273E+00, -0.11156409571564867E+00,
0.24757164634262877E+00, 0.24757164634262877E+00,
-0.11156409571564867E+00, 0.96242492303262273E+00,
0.24757164634262877E+00, 0.96242492303262273E+00,
-0.11156409571564867E+00, 0.96242492303262273E+00,
0.24757164634262877E+00, -0.11156409571564867E+00,
-0.11156409571564867E+00, 0.24757164634262877E+00,
-0.96242492303262273E+00, -0.11156409571564867E+00,
-0.96242492303262273E+00, 0.24757164634262877E+00,
-0.96242492303262273E+00, -0.11156409571564867E+00,
0.24757164634262877E+00, 0.24757164634262877E+00,
-0.11156409571564867E+00, -0.96242492303262273E+00,
0.24757164634262877E+00, -0.96242492303262273E+00,
-0.11156409571564867E+00, -0.96242492303262273E+00,
0.24757164634262877E+00, -0.11156409571564867E+00,
-0.11156409571564867E+00, -0.24757164634262877E+00,
0.96242492303262273E+00, -0.11156409571564867E+00,
0.96242492303262273E+00, -0.24757164634262877E+00,
0.96242492303262273E+00, -0.11156409571564867E+00,
-0.24757164634262877E+00, -0.24757164634262877E+00,
-0.11156409571564867E+00, 0.96242492303262273E+00,
-0.24757164634262877E+00, 0.96242492303262273E+00,
-0.11156409571564867E+00, 0.96242492303262273E+00,
-0.24757164634262877E+00, -0.11156409571564867E+00,
-0.11156409571564867E+00, -0.24757164634262877E+00,
-0.96242492303262273E+00, -0.11156409571564867E+00,
-0.96242492303262273E+00, -0.24757164634262877E+00,
-0.96242492303262273E+00, -0.11156409571564867E+00,
-0.24757164634262877E+00, -0.24757164634262877E+00,
-0.11156409571564867E+00, -0.96242492303262273E+00,
-0.24757164634262877E+00, -0.96242492303262273E+00,
-0.11156409571564867E+00, -0.96242492303262273E+00,
-0.24757164634262877E+00, -0.11156409571564867E+00,
0.17465516775786261E+00, 0.31736152466119766E+00,
0.93208220401432018E+00, 0.17465516775786261E+00,
0.93208220401432018E+00, 0.31736152466119766E+00,
0.93208220401432018E+00, 0.17465516775786261E+00,
0.31736152466119766E+00, 0.31736152466119766E+00,
0.17465516775786261E+00, 0.93208220401432018E+00,
0.31736152466119766E+00, 0.93208220401432018E+00,
0.17465516775786261E+00, 0.93208220401432018E+00,
0.31736152466119766E+00, 0.17465516775786261E+00,
0.17465516775786261E+00, 0.31736152466119766E+00,
-0.93208220401432018E+00, 0.17465516775786261E+00,
-0.93208220401432018E+00, 0.31736152466119766E+00,
-0.93208220401432018E+00, 0.17465516775786261E+00,
0.31736152466119766E+00, 0.31736152466119766E+00,
0.17465516775786261E+00, -0.93208220401432018E+00,
0.31736152466119766E+00, -0.93208220401432018E+00,
0.17465516775786261E+00, -0.93208220401432018E+00,
0.31736152466119766E+00, 0.17465516775786261E+00,
0.17465516775786261E+00, -0.31736152466119766E+00,
0.93208220401432018E+00, 0.17465516775786261E+00,
0.93208220401432018E+00, -0.31736152466119766E+00,
0.93208220401432018E+00, 0.17465516775786261E+00,
-0.31736152466119766E+00, -0.31736152466119766E+00,
0.17465516775786261E+00, 0.93208220401432018E+00,
-0.31736152466119766E+00, 0.93208220401432018E+00,
0.17465516775786261E+00, 0.93208220401432018E+00,
-0.31736152466119766E+00, 0.17465516775786261E+00,
0.17465516775786261E+00, -0.31736152466119766E+00,
-0.93208220401432018E+00, 0.17465516775786261E+00,
-0.93208220401432018E+00, -0.31736152466119766E+00,
-0.93208220401432018E+00, 0.17465516775786261E+00,
-0.31736152466119766E+00, -0.31736152466119766E+00,
0.17465516775786261E+00, -0.93208220401432018E+00,
-0.31736152466119766E+00, -0.93208220401432018E+00,
0.17465516775786261E+00, -0.93208220401432018E+00,
-0.31736152466119766E+00, 0.17465516775786261E+00,
-0.17465516775786261E+00, 0.31736152466119766E+00,
0.93208220401432018E+00, -0.17465516775786261E+00,
0.93208220401432018E+00, 0.31736152466119766E+00,
0.93208220401432018E+00, -0.17465516775786261E+00,
0.31736152466119766E+00, 0.31736152466119766E+00,
-0.17465516775786261E+00, 0.93208220401432018E+00,
0.31736152466119766E+00, 0.93208220401432018E+00,
-0.17465516775786261E+00, 0.93208220401432018E+00,
0.31736152466119766E+00, -0.17465516775786261E+00,
-0.17465516775786261E+00, 0.31736152466119766E+00,
-0.93208220401432018E+00, -0.17465516775786261E+00,
-0.93208220401432018E+00, 0.31736152466119766E+00,
-0.93208220401432018E+00, -0.17465516775786261E+00,
0.31736152466119766E+00, 0.31736152466119766E+00,
-0.17465516775786261E+00, -0.93208220401432018E+00,
0.31736152466119766E+00, -0.93208220401432018E+00,
-0.17465516775786261E+00, -0.93208220401432018E+00,
0.31736152466119766E+00, -0.17465516775786261E+00,
-0.17465516775786261E+00, -0.31736152466119766E+00,
0.93208220401432018E+00, -0.17465516775786261E+00,
0.93208220401432018E+00, -0.31736152466119766E+00,
0.93208220401432018E+00, -0.17465516775786261E+00,
-0.31736152466119766E+00, -0.31736152466119766E+00,
-0.17465516775786261E+00, 0.93208220401432018E+00,
-0.31736152466119766E+00, 0.93208220401432018E+00,
-0.17465516775786261E+00, 0.93208220401432018E+00,
-0.31736152466119766E+00, -0.17465516775786261E+00,
-0.17465516775786261E+00, -0.31736152466119766E+00,
-0.93208220401432018E+00, -0.17465516775786261E+00,
-0.93208220401432018E+00, -0.31736152466119766E+00,
-0.93208220401432018E+00, -0.17465516775786261E+00,
-0.31736152466119766E+00, -0.31736152466119766E+00,
-0.17465516775786261E+00, -0.93208220401432018E+00,
-0.31736152466119766E+00, -0.93208220401432018E+00,
-0.17465516775786261E+00, -0.93208220401432018E+00,
-0.31736152466119766E+00, -0.17465516775786261E+00,
0.23902784793817239E+00, 0.38542911506692235E+00,
0.89124075600747465E+00, 0.23902784793817239E+00,
0.89124075600747465E+00, 0.38542911506692235E+00,
0.89124075600747465E+00, 0.23902784793817239E+00,
0.38542911506692235E+00, 0.38542911506692235E+00,
0.23902784793817239E+00, 0.89124075600747465E+00,
0.38542911506692235E+00, 0.89124075600747465E+00,
0.23902784793817239E+00, 0.89124075600747465E+00,
0.38542911506692235E+00, 0.23902784793817239E+00,
0.23902784793817239E+00, 0.38542911506692235E+00,
-0.89124075600747465E+00, 0.23902784793817239E+00,
-0.89124075600747465E+00, 0.38542911506692235E+00,
-0.89124075600747465E+00, 0.23902784793817239E+00,
0.38542911506692235E+00, 0.38542911506692235E+00,
0.23902784793817239E+00, -0.89124075600747465E+00,
0.38542911506692235E+00, -0.89124075600747465E+00,
0.23902784793817239E+00, -0.89124075600747465E+00,
0.38542911506692235E+00, 0.23902784793817239E+00,
0.23902784793817239E+00, -0.38542911506692235E+00,
0.89124075600747465E+00, 0.23902784793817239E+00,
0.89124075600747465E+00, -0.38542911506692235E+00,
0.89124075600747465E+00, 0.23902784793817239E+00,
-0.38542911506692235E+00, -0.38542911506692235E+00,
0.23902784793817239E+00, 0.89124075600747465E+00,
-0.38542911506692235E+00, 0.89124075600747465E+00,
0.23902784793817239E+00, 0.89124075600747465E+00,
-0.38542911506692235E+00, 0.23902784793817239E+00,
0.23902784793817239E+00, -0.38542911506692235E+00,
-0.89124075600747465E+00, 0.23902784793817239E+00,
-0.89124075600747465E+00, -0.38542911506692235E+00,
-0.89124075600747465E+00, 0.23902784793817239E+00,
-0.38542911506692235E+00, -0.38542911506692235E+00,
0.23902784793817239E+00, -0.89124075600747465E+00,
-0.38542911506692235E+00, -0.89124075600747465E+00,
0.23902784793817239E+00, -0.89124075600747465E+00,
-0.38542911506692235E+00, 0.23902784793817239E+00,
-0.23902784793817239E+00, 0.38542911506692235E+00,
0.89124075600747465E+00, -0.23902784793817239E+00,
0.89124075600747465E+00, 0.38542911506692235E+00,
0.89124075600747465E+00, -0.23902784793817239E+00,
0.38542911506692235E+00, 0.38542911506692235E+00,
-0.23902784793817239E+00, 0.89124075600747465E+00,
0.38542911506692235E+00, 0.89124075600747465E+00,
-0.23902784793817239E+00, 0.89124075600747465E+00,
0.38542911506692235E+00, -0.23902784793817239E+00,
-0.23902784793817239E+00, 0.38542911506692235E+00,
-0.89124075600747465E+00, -0.23902784793817239E+00,
-0.89124075600747465E+00, 0.38542911506692235E+00,
-0.89124075600747465E+00, -0.23902784793817239E+00,
0.38542911506692235E+00, 0.38542911506692235E+00,
-0.23902784793817239E+00, -0.89124075600747465E+00,
0.38542911506692235E+00, -0.89124075600747465E+00,
-0.23902784793817239E+00, -0.89124075600747465E+00,
0.38542911506692235E+00, -0.23902784793817239E+00,
-0.23902784793817239E+00, -0.38542911506692235E+00,
0.89124075600747465E+00, -0.23902784793817239E+00,
0.89124075600747465E+00, -0.38542911506692235E+00,
0.89124075600747465E+00, -0.23902784793817239E+00,
-0.38542911506692235E+00, -0.38542911506692235E+00,
-0.23902784793817239E+00, 0.89124075600747465E+00,
-0.38542911506692235E+00, 0.89124075600747465E+00,
-0.23902784793817239E+00, 0.89124075600747465E+00,
-0.38542911506692235E+00, -0.23902784793817239E+00,
-0.23902784793817239E+00, -0.38542911506692235E+00,
-0.89124075600747465E+00, -0.23902784793817239E+00,
-0.89124075600747465E+00, -0.38542911506692235E+00,
-0.89124075600747465E+00, -0.23902784793817239E+00,
-0.38542911506692235E+00, -0.38542911506692235E+00,
-0.23902784793817239E+00, -0.89124075600747465E+00,
-0.38542911506692235E+00, -0.89124075600747465E+00,
-0.23902784793817239E+00, -0.89124075600747465E+00,
-0.38542911506692235E+00, -0.23902784793817239E+00,
0.30294669735289820E+00, 0.45074225931570644E+00,
0.83967536240498564E+00, 0.30294669735289820E+00,
0.83967536240498564E+00, 0.45074225931570644E+00,
0.83967536240498564E+00, 0.30294669735289820E+00,
0.45074225931570644E+00, 0.45074225931570644E+00,
0.30294669735289820E+00, 0.83967536240498564E+00,
0.45074225931570644E+00, 0.83967536240498564E+00,
0.30294669735289820E+00, 0.83967536240498564E+00,
0.45074225931570644E+00, 0.30294669735289820E+00,
0.30294669735289820E+00, 0.45074225931570644E+00,
-0.83967536240498564E+00, 0.30294669735289820E+00,
-0.83967536240498564E+00, 0.45074225931570644E+00,
-0.83967536240498564E+00, 0.30294669735289820E+00,
0.45074225931570644E+00, 0.45074225931570644E+00,
0.30294669735289820E+00, -0.83967536240498564E+00,
0.45074225931570644E+00, -0.83967536240498564E+00,
0.30294669735289820E+00, -0.83967536240498564E+00,
0.45074225931570644E+00, 0.30294669735289820E+00,
0.30294669735289820E+00, -0.45074225931570644E+00,
0.83967536240498564E+00, 0.30294669735289820E+00,
0.83967536240498564E+00, -0.45074225931570644E+00,
0.83967536240498564E+00, 0.30294669735289820E+00,
-0.45074225931570644E+00, -0.45074225931570644E+00,
0.30294669735289820E+00, 0.83967536240498564E+00,
-0.45074225931570644E+00, 0.83967536240498564E+00,
0.30294669735289820E+00, 0.83967536240498564E+00,
-0.45074225931570644E+00, 0.30294669735289820E+00,
0.30294669735289820E+00, -0.45074225931570644E+00,
-0.83967536240498564E+00, 0.30294669735289820E+00,
-0.83967536240498564E+00, -0.45074225931570644E+00,
-0.83967536240498564E+00, 0.30294669735289820E+00,
-0.45074225931570644E+00, -0.45074225931570644E+00,
0.30294669735289820E+00, -0.83967536240498564E+00,
-0.45074225931570644E+00, -0.83967536240498564E+00,
0.30294669735289820E+00, -0.83967536240498564E+00,
-0.45074225931570644E+00, 0.30294669735289820E+00,
-0.30294669735289820E+00, 0.45074225931570644E+00,
0.83967536240498564E+00, -0.30294669735289820E+00,
0.83967536240498564E+00, 0.45074225931570644E+00,
0.83967536240498564E+00, -0.30294669735289820E+00,
0.45074225931570644E+00, 0.45074225931570644E+00,
-0.30294669735289820E+00, 0.83967536240498564E+00,
0.45074225931570644E+00, 0.83967536240498564E+00,
-0.30294669735289820E+00, 0.83967536240498564E+00,
0.45074225931570644E+00, -0.30294669735289820E+00,
-0.30294669735289820E+00, 0.45074225931570644E+00,
-0.83967536240498564E+00, -0.30294669735289820E+00,
-0.83967536240498564E+00, 0.45074225931570644E+00,
-0.83967536240498564E+00, -0.30294669735289820E+00,
0.45074225931570644E+00, 0.45074225931570644E+00,
-0.30294669735289820E+00, -0.83967536240498564E+00,
0.45074225931570644E+00, -0.83967536240498564E+00,
-0.30294669735289820E+00, -0.83967536240498564E+00,
0.45074225931570644E+00, -0.30294669735289820E+00,
-0.30294669735289820E+00, -0.45074225931570644E+00,
0.83967536240498564E+00, -0.30294669735289820E+00,
0.83967536240498564E+00, -0.45074225931570644E+00,
0.83967536240498564E+00, -0.30294669735289820E+00,
-0.45074225931570644E+00, -0.45074225931570644E+00,
-0.30294669735289820E+00, 0.83967536240498564E+00,
-0.45074225931570644E+00, 0.83967536240498564E+00,
-0.30294669735289820E+00, 0.83967536240498564E+00,
-0.45074225931570644E+00, -0.30294669735289820E+00,
-0.30294669735289820E+00, -0.45074225931570644E+00,
-0.83967536240498564E+00, -0.30294669735289820E+00,
-0.83967536240498564E+00, -0.45074225931570644E+00,
-0.83967536240498564E+00, -0.30294669735289820E+00,
-0.45074225931570644E+00, -0.45074225931570644E+00,
-0.30294669735289820E+00, -0.83967536240498564E+00,
-0.45074225931570644E+00, -0.83967536240498564E+00,
-0.30294669735289820E+00, -0.83967536240498564E+00,
-0.45074225931570644E+00, -0.30294669735289820E+00,
0.36498322605976535E+00, 0.51235184864198713E+00,
0.77735630690703506E+00, 0.36498322605976535E+00,
0.77735630690703506E+00, 0.51235184864198713E+00,
0.77735630690703506E+00, 0.36498322605976535E+00,
0.51235184864198713E+00, 0.51235184864198713E+00,
0.36498322605976535E+00, 0.77735630690703506E+00,
0.51235184864198713E+00, 0.77735630690703506E+00,
0.36498322605976535E+00, 0.77735630690703506E+00,
0.51235184864198713E+00, 0.36498322605976535E+00,
0.36498322605976535E+00, 0.51235184864198713E+00,
-0.77735630690703506E+00, 0.36498322605976535E+00,
-0.77735630690703506E+00, 0.51235184864198713E+00,
-0.77735630690703506E+00, 0.36498322605976535E+00,
0.51235184864198713E+00, 0.51235184864198713E+00,
0.36498322605976535E+00, -0.77735630690703506E+00,
0.51235184864198713E+00, -0.77735630690703506E+00,
0.36498322605976535E+00, -0.77735630690703506E+00,
0.51235184864198713E+00, 0.36498322605976535E+00,
0.36498322605976535E+00, -0.51235184864198713E+00,
0.77735630690703506E+00, 0.36498322605976535E+00,
0.77735630690703506E+00, -0.51235184864198713E+00,
0.77735630690703506E+00, 0.36498322605976535E+00,
-0.51235184864198713E+00, -0.51235184864198713E+00,
0.36498322605976535E+00, 0.77735630690703506E+00,
-0.51235184864198713E+00, 0.77735630690703506E+00,
0.36498322605976535E+00, 0.77735630690703506E+00,
-0.51235184864198713E+00, 0.36498322605976535E+00,
0.36498322605976535E+00, -0.51235184864198713E+00,
-0.77735630690703506E+00, 0.36498322605976535E+00,
-0.77735630690703506E+00, -0.51235184864198713E+00,
-0.77735630690703506E+00, 0.36498322605976535E+00,
-0.51235184864198713E+00, -0.51235184864198713E+00,
0.36498322605976535E+00, -0.77735630690703506E+00,
-0.51235184864198713E+00, -0.77735630690703506E+00,
0.36498322605976535E+00, -0.77735630690703506E+00,
-0.51235184864198713E+00, 0.36498322605976535E+00,
-0.36498322605976535E+00, 0.51235184864198713E+00,
0.77735630690703506E+00, -0.36498322605976535E+00,
0.77735630690703506E+00, 0.51235184864198713E+00,
0.77735630690703506E+00, -0.36498322605976535E+00,
0.51235184864198713E+00, 0.51235184864198713E+00,
-0.36498322605976535E+00, 0.77735630690703506E+00,
0.51235184864198713E+00, 0.77735630690703506E+00,
-0.36498322605976535E+00, 0.77735630690703506E+00,
0.51235184864198713E+00, -0.36498322605976535E+00,
-0.36498322605976535E+00, 0.51235184864198713E+00,
-0.77735630690703506E+00, -0.36498322605976535E+00,
-0.77735630690703506E+00, 0.51235184864198713E+00,
-0.77735630690703506E+00, -0.36498322605976535E+00,
0.51235184864198713E+00, 0.51235184864198713E+00,
-0.36498322605976535E+00, -0.77735630690703506E+00,
0.51235184864198713E+00, -0.77735630690703506E+00,
-0.36498322605976535E+00, -0.77735630690703506E+00,
0.51235184864198713E+00, -0.36498322605976535E+00,
-0.36498322605976535E+00, -0.51235184864198713E+00,
0.77735630690703506E+00, -0.36498322605976535E+00,
0.77735630690703506E+00, -0.51235184864198713E+00,
0.77735630690703506E+00, -0.36498322605976535E+00,
-0.51235184864198713E+00, -0.51235184864198713E+00,
-0.36498322605976535E+00, 0.77735630690703506E+00,
-0.51235184864198713E+00, 0.77735630690703506E+00,
-0.36498322605976535E+00, 0.77735630690703506E+00,
-0.51235184864198713E+00, -0.36498322605976535E+00,
-0.36498322605976535E+00, -0.51235184864198713E+00,
-0.77735630690703506E+00, -0.36498322605976535E+00,
-0.77735630690703506E+00, -0.51235184864198713E+00,
-0.77735630690703506E+00, -0.36498322605976535E+00,
-0.51235184864198713E+00, -0.51235184864198713E+00,
-0.36498322605976535E+00, -0.77735630690703506E+00,
-0.51235184864198713E+00, -0.77735630690703506E+00,
-0.36498322605976535E+00, -0.77735630690703506E+00,
-0.51235184864198713E+00, -0.36498322605976535E+00,
0.42386447815223405E+00, 0.56937024984684415E+00,
0.70438371840217640E+00, 0.42386447815223405E+00,
0.70438371840217640E+00, 0.56937024984684415E+00,
0.70438371840217640E+00, 0.42386447815223405E+00,
0.56937024984684415E+00, 0.56937024984684415E+00,
0.42386447815223405E+00, 0.70438371840217640E+00,
0.56937024984684415E+00, 0.70438371840217640E+00,
0.42386447815223405E+00, 0.70438371840217640E+00,
0.56937024984684415E+00, 0.42386447815223405E+00,
0.42386447815223405E+00, 0.56937024984684415E+00,
-0.70438371840217640E+00, 0.42386447815223405E+00,
-0.70438371840217640E+00, 0.56937024984684415E+00,
-0.70438371840217640E+00, 0.42386447815223405E+00,
0.56937024984684415E+00, 0.56937024984684415E+00,
0.42386447815223405E+00, -0.70438371840217640E+00,
0.56937024984684415E+00, -0.70438371840217640E+00,
0.42386447815223405E+00, -0.70438371840217640E+00,
0.56937024984684415E+00, 0.42386447815223405E+00,
0.42386447815223405E+00, -0.56937024984684415E+00,
0.70438371840217640E+00, 0.42386447815223405E+00,
0.70438371840217640E+00, -0.56937024984684415E+00,
0.70438371840217640E+00, 0.42386447815223405E+00,
-0.56937024984684415E+00, -0.56937024984684415E+00,
0.42386447815223405E+00, 0.70438371840217640E+00,
-0.56937024984684415E+00, 0.70438371840217640E+00,
0.42386447815223405E+00, 0.70438371840217640E+00,
-0.56937024984684415E+00, 0.42386447815223405E+00,
0.42386447815223405E+00, -0.56937024984684415E+00,
-0.70438371840217640E+00, 0.42386447815223405E+00,
-0.70438371840217640E+00, -0.56937024984684415E+00,
-0.70438371840217640E+00, 0.42386447815223405E+00,
-0.56937024984684415E+00, -0.56937024984684415E+00,
0.42386447815223405E+00, -0.70438371840217640E+00,
-0.56937024984684415E+00, -0.70438371840217640E+00,
0.42386447815223405E+00, -0.70438371840217640E+00,
-0.56937024984684415E+00, 0.42386447815223405E+00,
-0.42386447815223405E+00, 0.56937024984684415E+00,
0.70438371840217640E+00, -0.42386447815223405E+00,
0.70438371840217640E+00, 0.56937024984684415E+00,
0.70438371840217640E+00, -0.42386447815223405E+00,
0.56937024984684415E+00, 0.56937024984684415E+00,
-0.42386447815223405E+00, 0.70438371840217640E+00,
0.56937024984684415E+00, 0.70438371840217640E+00,
-0.42386447815223405E+00, 0.70438371840217640E+00,
0.56937024984684415E+00, -0.42386447815223405E+00,
-0.42386447815223405E+00, 0.56937024984684415E+00,
-0.70438371840217640E+00, -0.42386447815223405E+00,
-0.70438371840217640E+00, 0.56937024984684415E+00,
-0.70438371840217640E+00, -0.42386447815223405E+00,
0.56937024984684415E+00, 0.56937024984684415E+00,
-0.42386447815223405E+00, -0.70438371840217640E+00,
0.56937024984684415E+00, -0.70438371840217640E+00,
-0.42386447815223405E+00, -0.70438371840217640E+00,
0.56937024984684415E+00, -0.42386447815223405E+00,
-0.42386447815223405E+00, -0.56937024984684415E+00,
0.70438371840217640E+00, -0.42386447815223405E+00,
0.70438371840217640E+00, -0.56937024984684415E+00,
0.70438371840217640E+00, -0.42386447815223405E+00,
-0.56937024984684415E+00, -0.56937024984684415E+00,
-0.42386447815223405E+00, 0.70438371840217640E+00,
-0.56937024984684415E+00, 0.70438371840217640E+00,
-0.42386447815223405E+00, 0.70438371840217640E+00,
-0.56937024984684415E+00, -0.42386447815223405E+00,
-0.42386447815223405E+00, -0.56937024984684415E+00,
-0.70438371840217640E+00, -0.42386447815223405E+00,
-0.70438371840217640E+00, -0.56937024984684415E+00,
-0.70438371840217640E+00, -0.42386447815223405E+00,
-0.56937024984684415E+00, -0.56937024984684415E+00,
-0.42386447815223405E+00, -0.70438371840217640E+00,
-0.56937024984684415E+00, -0.70438371840217640E+00,
-0.42386447815223405E+00, -0.70438371840217640E+00,
-0.56937024984684415E+00, -0.42386447815223405E+00,
0.59058888532355087E-01, 0.33546162890664882E+00,
0.94020079941288115E+00, 0.59058888532355087E-01,
0.94020079941288115E+00, 0.33546162890664882E+00,
0.94020079941288115E+00, 0.59058888532355087E-01,
0.33546162890664882E+00, 0.33546162890664882E+00,
0.59058888532355087E-01, 0.94020079941288115E+00,
0.33546162890664882E+00, 0.94020079941288115E+00,
0.59058888532355087E-01, 0.94020079941288115E+00,
0.33546162890664882E+00, 0.59058888532355087E-01,
0.59058888532355087E-01, 0.33546162890664882E+00,
-0.94020079941288115E+00, 0.59058888532355087E-01,
-0.94020079941288115E+00, 0.33546162890664882E+00,
-0.94020079941288115E+00, 0.59058888532355087E-01,
0.33546162890664882E+00, 0.33546162890664882E+00,
0.59058888532355087E-01, -0.94020079941288115E+00,
0.33546162890664882E+00, -0.94020079941288115E+00,
0.59058888532355087E-01, -0.94020079941288115E+00,
0.33546162890664882E+00, 0.59058888532355087E-01,
0.59058888532355087E-01, -0.33546162890664882E+00,
0.94020079941288115E+00, 0.59058888532355087E-01,
0.94020079941288115E+00, -0.33546162890664882E+00,
0.94020079941288115E+00, 0.59058888532355087E-01,
-0.33546162890664882E+00, -0.33546162890664882E+00,
0.59058888532355087E-01, 0.94020079941288115E+00,
-0.33546162890664882E+00, 0.94020079941288115E+00,
0.59058888532355087E-01, 0.94020079941288115E+00,
-0.33546162890664882E+00, 0.59058888532355087E-01,
0.59058888532355087E-01, -0.33546162890664882E+00,
-0.94020079941288115E+00, 0.59058888532355087E-01,
-0.94020079941288115E+00, -0.33546162890664882E+00,
-0.94020079941288115E+00, 0.59058888532355087E-01,
-0.33546162890664882E+00, -0.33546162890664882E+00,
0.59058888532355087E-01, -0.94020079941288115E+00,
-0.33546162890664882E+00, -0.94020079941288115E+00,
0.59058888532355087E-01, -0.94020079941288115E+00,
-0.33546162890664882E+00, 0.59058888532355087E-01,
-0.59058888532355087E-01, 0.33546162890664882E+00,
0.94020079941288115E+00, -0.59058888532355087E-01,
0.94020079941288115E+00, 0.33546162890664882E+00,
0.94020079941288115E+00, -0.59058888532355087E-01,
0.33546162890664882E+00, 0.33546162890664882E+00,
-0.59058888532355087E-01, 0.94020079941288115E+00,
0.33546162890664882E+00, 0.94020079941288115E+00,
-0.59058888532355087E-01, 0.94020079941288115E+00,
0.33546162890664882E+00, -0.59058888532355087E-01,
-0.59058888532355087E-01, 0.33546162890664882E+00,
-0.94020079941288115E+00, -0.59058888532355087E-01,
-0.94020079941288115E+00, 0.33546162890664882E+00,
-0.94020079941288115E+00, -0.59058888532355087E-01,
0.33546162890664882E+00, 0.33546162890664882E+00,
-0.59058888532355087E-01, -0.94020079941288115E+00,
0.33546162890664882E+00, -0.94020079941288115E+00,
-0.59058888532355087E-01, -0.94020079941288115E+00,
0.33546162890664882E+00, -0.59058888532355087E-01,
-0.59058888532355087E-01, -0.33546162890664882E+00,
0.94020079941288115E+00, -0.59058888532355087E-01,
0.94020079941288115E+00, -0.33546162890664882E+00,
0.94020079941288115E+00, -0.59058888532355087E-01,
-0.33546162890664882E+00, -0.33546162890664882E+00,
-0.59058888532355087E-01, 0.94020079941288115E+00,
-0.33546162890664882E+00, 0.94020079941288115E+00,
-0.59058888532355087E-01, 0.94020079941288115E+00,
-0.33546162890664882E+00, -0.59058888532355087E-01,
-0.59058888532355087E-01, -0.33546162890664882E+00,
-0.94020079941288115E+00, -0.59058888532355087E-01,
-0.94020079941288115E+00, -0.33546162890664882E+00,
-0.94020079941288115E+00, -0.59058888532355087E-01,
-0.33546162890664882E+00, -0.33546162890664882E+00,
-0.59058888532355087E-01, -0.94020079941288115E+00,
-0.33546162890664882E+00, -0.94020079941288115E+00,
-0.59058888532355087E-01, -0.94020079941288115E+00,
-0.33546162890664882E+00, -0.59058888532355087E-01,
0.12172350510959870E+00, 0.40902684270853573E+00,
0.90436741993932990E+00, 0.12172350510959870E+00,
0.90436741993932990E+00, 0.40902684270853573E+00,
0.90436741993932990E+00, 0.12172350510959870E+00,
0.40902684270853573E+00, 0.40902684270853573E+00,
0.12172350510959870E+00, 0.90436741993932990E+00,
0.40902684270853573E+00, 0.90436741993932990E+00,
0.12172350510959870E+00, 0.90436741993932990E+00,
0.40902684270853573E+00, 0.12172350510959870E+00,
0.12172350510959870E+00, 0.40902684270853573E+00,
-0.90436741993932990E+00, 0.12172350510959870E+00,
-0.90436741993932990E+00, 0.40902684270853573E+00,
-0.90436741993932990E+00, 0.12172350510959870E+00,
0.40902684270853573E+00, 0.40902684270853573E+00,
0.12172350510959870E+00, -0.90436741993932990E+00,
0.40902684270853573E+00, -0.90436741993932990E+00,
0.12172350510959870E+00, -0.90436741993932990E+00,
0.40902684270853573E+00, 0.12172350510959870E+00,
0.12172350510959870E+00, -0.40902684270853573E+00,
0.90436741993932990E+00, 0.12172350510959870E+00,
0.90436741993932990E+00, -0.40902684270853573E+00,
0.90436741993932990E+00, 0.12172350510959870E+00,
-0.40902684270853573E+00, -0.40902684270853573E+00,
0.12172350510959870E+00, 0.90436741993932990E+00,
-0.40902684270853573E+00, 0.90436741993932990E+00,
0.12172350510959870E+00, 0.90436741993932990E+00,
-0.40902684270853573E+00, 0.12172350510959870E+00,
0.12172350510959870E+00, -0.40902684270853573E+00,
-0.90436741993932990E+00, 0.12172350510959870E+00,
-0.90436741993932990E+00, -0.40902684270853573E+00,
-0.90436741993932990E+00, 0.12172350510959870E+00,
-0.40902684270853573E+00, -0.40902684270853573E+00,
0.12172350510959870E+00, -0.90436741993932990E+00,
-0.40902684270853573E+00, -0.90436741993932990E+00,
0.12172350510959870E+00, -0.90436741993932990E+00,
-0.40902684270853573E+00, 0.12172350510959870E+00,
-0.12172350510959870E+00, 0.40902684270853573E+00,
0.90436741993932990E+00, -0.12172350510959870E+00,
0.90436741993932990E+00, 0.40902684270853573E+00,
0.90436741993932990E+00, -0.12172350510959870E+00,
0.40902684270853573E+00, 0.40902684270853573E+00,
-0.12172350510959870E+00, 0.90436741993932990E+00,
0.40902684270853573E+00, 0.90436741993932990E+00,
-0.12172350510959870E+00, 0.90436741993932990E+00,
0.40902684270853573E+00, -0.12172350510959870E+00,
-0.12172350510959870E+00, 0.40902684270853573E+00,
-0.90436741993932990E+00, -0.12172350510959870E+00,
-0.90436741993932990E+00, 0.40902684270853573E+00,
-0.90436741993932990E+00, -0.12172350510959870E+00,
0.40902684270853573E+00, 0.40902684270853573E+00,
-0.12172350510959870E+00, -0.90436741993932990E+00,
0.40902684270853573E+00, -0.90436741993932990E+00,
-0.12172350510959870E+00, -0.90436741993932990E+00,
0.40902684270853573E+00, -0.12172350510959870E+00,
-0.12172350510959870E+00, -0.40902684270853573E+00,
0.90436741993932990E+00, -0.12172350510959870E+00,
0.90436741993932990E+00, -0.40902684270853573E+00,
0.90436741993932990E+00, -0.12172350510959870E+00,
-0.40902684270853573E+00, -0.40902684270853573E+00,
-0.12172350510959870E+00, 0.90436741993932990E+00,
-0.40902684270853573E+00, 0.90436741993932990E+00,
-0.12172350510959870E+00, 0.90436741993932990E+00,
-0.40902684270853573E+00, -0.12172350510959870E+00,
-0.12172350510959870E+00, -0.40902684270853573E+00,
-0.90436741993932990E+00, -0.12172350510959870E+00,
-0.90436741993932990E+00, -0.40902684270853573E+00,
-0.90436741993932990E+00, -0.12172350510959870E+00,
-0.40902684270853573E+00, -0.40902684270853573E+00,
-0.12172350510959870E+00, -0.90436741993932990E+00,
-0.40902684270853573E+00, -0.90436741993932990E+00,
-0.12172350510959870E+00, -0.90436741993932990E+00,
-0.40902684270853573E+00, -0.12172350510959870E+00,
0.18575051945473350E+00, 0.47853206759224354E+00,
0.85819799860416190E+00, 0.18575051945473350E+00,
0.85819799860416190E+00, 0.47853206759224354E+00,
0.85819799860416190E+00, 0.18575051945473350E+00,
0.47853206759224354E+00, 0.47853206759224354E+00,
0.18575051945473350E+00, 0.85819799860416190E+00,
0.47853206759224354E+00, 0.85819799860416190E+00,
0.18575051945473350E+00, 0.85819799860416190E+00,
0.47853206759224354E+00, 0.18575051945473350E+00,
0.18575051945473350E+00, 0.47853206759224354E+00,
-0.85819799860416190E+00, 0.18575051945473350E+00,
-0.85819799860416190E+00, 0.47853206759224354E+00,
-0.85819799860416190E+00, 0.18575051945473350E+00,
0.47853206759224354E+00, 0.47853206759224354E+00,
0.18575051945473350E+00, -0.85819799860416190E+00,
0.47853206759224354E+00, -0.85819799860416190E+00,
0.18575051945473350E+00, -0.85819799860416190E+00,
0.47853206759224354E+00, 0.18575051945473350E+00,
0.18575051945473350E+00, -0.47853206759224354E+00,
0.85819799860416190E+00, 0.18575051945473350E+00,
0.85819799860416190E+00, -0.47853206759224354E+00,
0.85819799860416190E+00, 0.18575051945473350E+00,
-0.47853206759224354E+00, -0.47853206759224354E+00,
0.18575051945473350E+00, 0.85819799860416190E+00,
-0.47853206759224354E+00, 0.85819799860416190E+00,
0.18575051945473350E+00, 0.85819799860416190E+00,
-0.47853206759224354E+00, 0.18575051945473350E+00,
0.18575051945473350E+00, -0.47853206759224354E+00,
-0.85819799860416190E+00, 0.18575051945473350E+00,
-0.85819799860416190E+00, -0.47853206759224354E+00,
-0.85819799860416190E+00, 0.18575051945473350E+00,
-0.47853206759224354E+00, -0.47853206759224354E+00,
0.18575051945473350E+00, -0.85819799860416190E+00,
-0.47853206759224354E+00, -0.85819799860416190E+00,
0.18575051945473350E+00, -0.85819799860416190E+00,
-0.47853206759224354E+00, 0.18575051945473350E+00,
-0.18575051945473350E+00, 0.47853206759224354E+00,
0.85819799860416190E+00, -0.18575051945473350E+00,
0.85819799860416190E+00, 0.47853206759224354E+00,
0.85819799860416190E+00, -0.18575051945473350E+00,
0.47853206759224354E+00, 0.47853206759224354E+00,
-0.18575051945473350E+00, 0.85819799860416190E+00,
0.47853206759224354E+00, 0.85819799860416190E+00,
-0.18575051945473350E+00, 0.85819799860416190E+00,
0.47853206759224354E+00, -0.18575051945473350E+00,
-0.18575051945473350E+00, 0.47853206759224354E+00,
-0.85819799860416190E+00, -0.18575051945473350E+00,
-0.85819799860416190E+00, 0.47853206759224354E+00,
-0.85819799860416190E+00, -0.18575051945473350E+00,
0.47853206759224354E+00, 0.47853206759224354E+00,
-0.18575051945473350E+00, -0.85819799860416190E+00,
0.47853206759224354E+00, -0.85819799860416190E+00,
-0.18575051945473350E+00, -0.85819799860416190E+00,
0.47853206759224354E+00, -0.18575051945473350E+00,
-0.18575051945473350E+00, -0.47853206759224354E+00,
0.85819799860416190E+00, -0.18575051945473350E+00,
0.85819799860416190E+00, -0.47853206759224354E+00,
0.85819799860416190E+00, -0.18575051945473350E+00,
-0.47853206759224354E+00, -0.47853206759224354E+00,
-0.18575051945473350E+00, 0.85819799860416190E+00,
-0.47853206759224354E+00, 0.85819799860416190E+00,
-0.18575051945473350E+00, 0.85819799860416190E+00,
-0.47853206759224354E+00, -0.18575051945473350E+00,
-0.18575051945473350E+00, -0.47853206759224354E+00,
-0.85819799860416190E+00, -0.18575051945473350E+00,
-0.85819799860416190E+00, -0.47853206759224354E+00,
-0.85819799860416190E+00, -0.18575051945473350E+00,
-0.47853206759224354E+00, -0.47853206759224354E+00,
-0.18575051945473350E+00, -0.85819799860416190E+00,
-0.47853206759224354E+00, -0.85819799860416190E+00,
-0.18575051945473350E+00, -0.85819799860416190E+00,
-0.47853206759224354E+00, -0.18575051945473350E+00,
0.24941121623622364E+00, 0.54343035696939002E+00,
0.80154693707835289E+00, 0.24941121623622364E+00,
0.80154693707835289E+00, 0.54343035696939002E+00,
0.80154693707835289E+00, 0.24941121623622364E+00,
0.54343035696939002E+00, 0.54343035696939002E+00,
0.24941121623622364E+00, 0.80154693707835289E+00,
0.54343035696939002E+00, 0.80154693707835289E+00,
0.24941121623622364E+00, 0.80154693707835289E+00,
0.54343035696939002E+00, 0.24941121623622364E+00,
0.24941121623622364E+00, 0.54343035696939002E+00,
-0.80154693707835289E+00, 0.24941121623622364E+00,
-0.80154693707835289E+00, 0.54343035696939002E+00,
-0.80154693707835289E+00, 0.24941121623622364E+00,
0.54343035696939002E+00, 0.54343035696939002E+00,
0.24941121623622364E+00, -0.80154693707835289E+00,
0.54343035696939002E+00, -0.80154693707835289E+00,
0.24941121623622364E+00, -0.80154693707835289E+00,
0.54343035696939002E+00, 0.24941121623622364E+00,
0.24941121623622364E+00, -0.54343035696939002E+00,
0.80154693707835289E+00, 0.24941121623622364E+00,
0.80154693707835289E+00, -0.54343035696939002E+00,
0.80154693707835289E+00, 0.24941121623622364E+00,
-0.54343035696939002E+00, -0.54343035696939002E+00,
0.24941121623622364E+00, 0.80154693707835289E+00,
-0.54343035696939002E+00, 0.80154693707835289E+00,
0.24941121623622364E+00, 0.80154693707835289E+00,
-0.54343035696939002E+00, 0.24941121623622364E+00,
0.24941121623622364E+00, -0.54343035696939002E+00,
-0.80154693707835289E+00, 0.24941121623622364E+00,
-0.80154693707835289E+00, -0.54343035696939002E+00,
-0.80154693707835289E+00, 0.24941121623622364E+00,
-0.54343035696939002E+00, -0.54343035696939002E+00,
0.24941121623622364E+00, -0.80154693707835289E+00,
-0.54343035696939002E+00, -0.80154693707835289E+00,
0.24941121623622364E+00, -0.80154693707835289E+00,
-0.54343035696939002E+00, 0.24941121623622364E+00,
-0.24941121623622364E+00, 0.54343035696939002E+00,
0.80154693707835289E+00, -0.24941121623622364E+00,
0.80154693707835289E+00, 0.54343035696939002E+00,
0.80154693707835289E+00, -0.24941121623622364E+00,
0.54343035696939002E+00, 0.54343035696939002E+00,
-0.24941121623622364E+00, 0.80154693707835289E+00,
0.54343035696939002E+00, 0.80154693707835289E+00,
-0.24941121623622364E+00, 0.80154693707835289E+00,
0.54343035696939002E+00, -0.24941121623622364E+00,
-0.24941121623622364E+00, 0.54343035696939002E+00,
-0.80154693707835289E+00, -0.24941121623622364E+00,
-0.80154693707835289E+00, 0.54343035696939002E+00,
-0.80154693707835289E+00, -0.24941121623622364E+00,
0.54343035696939002E+00, 0.54343035696939002E+00,
-0.24941121623622364E+00, -0.80154693707835289E+00,
0.54343035696939002E+00, -0.80154693707835289E+00,
-0.24941121623622364E+00, -0.80154693707835289E+00,
0.54343035696939002E+00, -0.24941121623622364E+00,
-0.24941121623622364E+00, -0.54343035696939002E+00,
0.80154693707835289E+00, -0.24941121623622364E+00,
0.80154693707835289E+00, -0.54343035696939002E+00,
0.80154693707835289E+00, -0.24941121623622364E+00,
-0.54343035696939002E+00, -0.54343035696939002E+00,
-0.24941121623622364E+00, 0.80154693707835289E+00,
-0.54343035696939002E+00, 0.80154693707835289E+00,
-0.24941121623622364E+00, 0.80154693707835289E+00,
-0.54343035696939002E+00, -0.24941121623622364E+00,
-0.24941121623622364E+00, -0.54343035696939002E+00,
-0.80154693707835289E+00, -0.24941121623622364E+00,
-0.80154693707835289E+00, -0.54343035696939002E+00,
-0.80154693707835289E+00, -0.24941121623622364E+00,
-0.54343035696939002E+00, -0.54343035696939002E+00,
-0.24941121623622364E+00, -0.80154693707835289E+00,
-0.54343035696939002E+00, -0.80154693707835289E+00,
-0.24941121623622364E+00, -0.80154693707835289E+00,
-0.54343035696939002E+00, -0.24941121623622364E+00,
0.31122759471496081E+00, 0.60311616930963097E+00,
0.73443057575595028E+00, 0.31122759471496081E+00,
0.73443057575595028E+00, 0.60311616930963097E+00,
0.73443057575595028E+00, 0.31122759471496081E+00,
0.60311616930963097E+00, 0.60311616930963097E+00,
0.31122759471496081E+00, 0.73443057575595028E+00,
0.60311616930963097E+00, 0.73443057575595028E+00,
0.31122759471496081E+00, 0.73443057575595028E+00,
0.60311616930963097E+00, 0.31122759471496081E+00,
0.31122759471496081E+00, 0.60311616930963097E+00,
-0.73443057575595028E+00, 0.31122759471496081E+00,
-0.73443057575595028E+00, 0.60311616930963097E+00,
-0.73443057575595028E+00, 0.31122759471496081E+00,
0.60311616930963097E+00, 0.60311616930963097E+00,
0.31122759471496081E+00, -0.73443057575595028E+00,
0.60311616930963097E+00, -0.73443057575595028E+00,
0.31122759471496081E+00, -0.73443057575595028E+00,
0.60311616930963097E+00, 0.31122759471496081E+00,
0.31122759471496081E+00, -0.60311616930963097E+00,
0.73443057575595028E+00, 0.31122759471496081E+00,
0.73443057575595028E+00, -0.60311616930963097E+00,
0.73443057575595028E+00, 0.31122759471496081E+00,
-0.60311616930963097E+00, -0.60311616930963097E+00,
0.31122759471496081E+00, 0.73443057575595028E+00,
-0.60311616930963097E+00, 0.73443057575595028E+00,
0.31122759471496081E+00, 0.73443057575595028E+00,
-0.60311616930963097E+00, 0.31122759471496081E+00,
0.31122759471496081E+00, -0.60311616930963097E+00,
-0.73443057575595028E+00, 0.31122759471496081E+00,
-0.73443057575595028E+00, -0.60311616930963097E+00,
-0.73443057575595028E+00, 0.31122759471496081E+00,
-0.60311616930963097E+00, -0.60311616930963097E+00,
0.31122759471496081E+00, -0.73443057575595028E+00,
-0.60311616930963097E+00, -0.73443057575595028E+00,
0.31122759471496081E+00, -0.73443057575595028E+00,
-0.60311616930963097E+00, 0.31122759471496081E+00,
-0.31122759471496081E+00, 0.60311616930963097E+00,
0.73443057575595028E+00, -0.31122759471496081E+00,
0.73443057575595028E+00, 0.60311616930963097E+00,
0.73443057575595028E+00, -0.31122759471496081E+00,
0.60311616930963097E+00, 0.60311616930963097E+00,
-0.31122759471496081E+00, 0.73443057575595028E+00,
0.60311616930963097E+00, 0.73443057575595028E+00,
-0.31122759471496081E+00, 0.73443057575595028E+00,
0.60311616930963097E+00, -0.31122759471496081E+00,
-0.31122759471496081E+00, 0.60311616930963097E+00,
-0.73443057575595028E+00, -0.31122759471496081E+00,
-0.73443057575595028E+00, 0.60311616930963097E+00,
-0.73443057575595028E+00, -0.31122759471496081E+00,
0.60311616930963097E+00, 0.60311616930963097E+00,
-0.31122759471496081E+00, -0.73443057575595028E+00,
0.60311616930963097E+00, -0.73443057575595028E+00,
-0.31122759471496081E+00, -0.73443057575595028E+00,
0.60311616930963097E+00, -0.31122759471496081E+00,
-0.31122759471496081E+00, -0.60311616930963097E+00,
0.73443057575595028E+00, -0.31122759471496081E+00,
0.73443057575595028E+00, -0.60311616930963097E+00,
0.73443057575595028E+00, -0.31122759471496081E+00,
-0.60311616930963097E+00, -0.60311616930963097E+00,
-0.31122759471496081E+00, 0.73443057575595028E+00,
-0.60311616930963097E+00, 0.73443057575595028E+00,
-0.31122759471496081E+00, 0.73443057575595028E+00,
-0.60311616930963097E+00, -0.31122759471496081E+00,
-0.31122759471496081E+00, -0.60311616930963097E+00,
-0.73443057575595028E+00, -0.31122759471496081E+00,
-0.73443057575595028E+00, -0.60311616930963097E+00,
-0.73443057575595028E+00, -0.31122759471496081E+00,
-0.60311616930963097E+00, -0.60311616930963097E+00,
-0.31122759471496081E+00, -0.73443057575595028E+00,
-0.60311616930963097E+00, -0.73443057575595028E+00,
-0.31122759471496081E+00, -0.73443057575595028E+00,
-0.60311616930963097E+00, -0.31122759471496081E+00,
0.62662506241541696E-01, 0.49322211848512848E+00,
0.86764356284627075E+00, 0.62662506241541696E-01,
0.86764356284627075E+00, 0.49322211848512848E+00,
0.86764356284627075E+00, 0.62662506241541696E-01,
0.49322211848512848E+00, 0.49322211848512848E+00,
0.62662506241541696E-01, 0.86764356284627075E+00,
0.49322211848512848E+00, 0.86764356284627075E+00,
0.62662506241541696E-01, 0.86764356284627075E+00,
0.49322211848512848E+00, 0.62662506241541696E-01,
0.62662506241541696E-01, 0.49322211848512848E+00,
-0.86764356284627075E+00, 0.62662506241541696E-01,
-0.86764356284627075E+00, 0.49322211848512848E+00,
-0.86764356284627075E+00, 0.62662506241541696E-01,
0.49322211848512848E+00, 0.49322211848512848E+00,
0.62662506241541696E-01, -0.86764356284627075E+00,
0.49322211848512848E+00, -0.86764356284627075E+00,
0.62662506241541696E-01, -0.86764356284627075E+00,
0.49322211848512848E+00, 0.62662506241541696E-01,
0.62662506241541696E-01, -0.49322211848512848E+00,
0.86764356284627075E+00, 0.62662506241541696E-01,
0.86764356284627075E+00, -0.49322211848512848E+00,
0.86764356284627075E+00, 0.62662506241541696E-01,
-0.49322211848512848E+00, -0.49322211848512848E+00,
0.62662506241541696E-01, 0.86764356284627075E+00,
-0.49322211848512848E+00, 0.86764356284627075E+00,
0.62662506241541696E-01, 0.86764356284627075E+00,
-0.49322211848512848E+00, 0.62662506241541696E-01,
0.62662506241541696E-01, -0.49322211848512848E+00,
-0.86764356284627075E+00, 0.62662506241541696E-01,
-0.86764356284627075E+00, -0.49322211848512848E+00,
-0.86764356284627075E+00, 0.62662506241541696E-01,
-0.49322211848512848E+00, -0.49322211848512848E+00,
0.62662506241541696E-01, -0.86764356284627075E+00,
-0.49322211848512848E+00, -0.86764356284627075E+00,
0.62662506241541696E-01, -0.86764356284627075E+00,
-0.49322211848512848E+00, 0.62662506241541696E-01,
-0.62662506241541696E-01, 0.49322211848512848E+00,
0.86764356284627075E+00, -0.62662506241541696E-01,
0.86764356284627075E+00, 0.49322211848512848E+00,
0.86764356284627075E+00, -0.62662506241541696E-01,
0.49322211848512848E+00, 0.49322211848512848E+00,
-0.62662506241541696E-01, 0.86764356284627075E+00,
0.49322211848512848E+00, 0.86764356284627075E+00,
-0.62662506241541696E-01, 0.86764356284627075E+00,
0.49322211848512848E+00, -0.62662506241541696E-01,
-0.62662506241541696E-01, 0.49322211848512848E+00,
-0.86764356284627075E+00, -0.62662506241541696E-01,
-0.86764356284627075E+00, 0.49322211848512848E+00,
-0.86764356284627075E+00, -0.62662506241541696E-01,
0.49322211848512848E+00, 0.49322211848512848E+00,
-0.62662506241541696E-01, -0.86764356284627075E+00,
0.49322211848512848E+00, -0.86764356284627075E+00,
-0.62662506241541696E-01, -0.86764356284627075E+00,
0.49322211848512848E+00, -0.62662506241541696E-01,
-0.62662506241541696E-01, -0.49322211848512848E+00,
0.86764356284627075E+00, -0.62662506241541696E-01,
0.86764356284627075E+00, -0.49322211848512848E+00,
0.86764356284627075E+00, -0.62662506241541696E-01,
-0.49322211848512848E+00, -0.49322211848512848E+00,
-0.62662506241541696E-01, 0.86764356284627075E+00,
-0.49322211848512848E+00, 0.86764356284627075E+00,
-0.62662506241541696E-01, 0.86764356284627075E+00,
-0.49322211848512848E+00, -0.62662506241541696E-01,
-0.62662506241541696E-01, -0.49322211848512848E+00,
-0.86764356284627075E+00, -0.62662506241541696E-01,
-0.86764356284627075E+00, -0.49322211848512848E+00,
-0.86764356284627075E+00, -0.62662506241541696E-01,
-0.49322211848512848E+00, -0.49322211848512848E+00,
-0.62662506241541696E-01, -0.86764356284627075E+00,
-0.49322211848512848E+00, -0.86764356284627075E+00,
-0.62662506241541696E-01, -0.86764356284627075E+00,
-0.49322211848512848E+00, -0.62662506241541696E-01,
0.12677748006842826E+00, 0.56321230207620998E+00,
0.81652885640221884E+00, 0.12677748006842826E+00,
0.81652885640221884E+00, 0.56321230207620998E+00,
0.81652885640221884E+00, 0.12677748006842826E+00,
0.56321230207620998E+00, 0.56321230207620998E+00,
0.12677748006842826E+00, 0.81652885640221884E+00,
0.56321230207620998E+00, 0.81652885640221884E+00,
0.12677748006842826E+00, 0.81652885640221884E+00,
0.56321230207620998E+00, 0.12677748006842826E+00,
0.12677748006842826E+00, 0.56321230207620998E+00,
-0.81652885640221884E+00, 0.12677748006842826E+00,
-0.81652885640221884E+00, 0.56321230207620998E+00,
-0.81652885640221884E+00, 0.12677748006842826E+00,
0.56321230207620998E+00, 0.56321230207620998E+00,
0.12677748006842826E+00, -0.81652885640221884E+00,
0.56321230207620998E+00, -0.81652885640221884E+00,
0.12677748006842826E+00, -0.81652885640221884E+00,
0.56321230207620998E+00, 0.12677748006842826E+00,
0.12677748006842826E+00, -0.56321230207620998E+00,
0.81652885640221884E+00, 0.12677748006842826E+00,
0.81652885640221884E+00, -0.56321230207620998E+00,
0.81652885640221884E+00, 0.12677748006842826E+00,
-0.56321230207620998E+00, -0.56321230207620998E+00,
0.12677748006842826E+00, 0.81652885640221884E+00,
-0.56321230207620998E+00, 0.81652885640221884E+00,
0.12677748006842826E+00, 0.81652885640221884E+00,
-0.56321230207620998E+00, 0.12677748006842826E+00,
0.12677748006842826E+00, -0.56321230207620998E+00,
-0.81652885640221884E+00, 0.12677748006842826E+00,
-0.81652885640221884E+00, -0.56321230207620998E+00,
-0.81652885640221884E+00, 0.12677748006842826E+00,
-0.56321230207620998E+00, -0.56321230207620998E+00,
0.12677748006842826E+00, -0.81652885640221884E+00,
-0.56321230207620998E+00, -0.81652885640221884E+00,
0.12677748006842826E+00, -0.81652885640221884E+00,
-0.56321230207620998E+00, 0.12677748006842826E+00,
-0.12677748006842826E+00, 0.56321230207620998E+00,
0.81652885640221884E+00, -0.12677748006842826E+00,
0.81652885640221884E+00, 0.56321230207620998E+00,
0.81652885640221884E+00, -0.12677748006842826E+00,
0.56321230207620998E+00, 0.56321230207620998E+00,
-0.12677748006842826E+00, 0.81652885640221884E+00,
0.56321230207620998E+00, 0.81652885640221884E+00,
-0.12677748006842826E+00, 0.81652885640221884E+00,
0.56321230207620998E+00, -0.12677748006842826E+00,
-0.12677748006842826E+00, 0.56321230207620998E+00,
-0.81652885640221884E+00, -0.12677748006842826E+00,
-0.81652885640221884E+00, 0.56321230207620998E+00,
-0.81652885640221884E+00, -0.12677748006842826E+00,
0.56321230207620998E+00, 0.56321230207620998E+00,
-0.12677748006842826E+00, -0.81652885640221884E+00,
0.56321230207620998E+00, -0.81652885640221884E+00,
-0.12677748006842826E+00, -0.81652885640221884E+00,
0.56321230207620998E+00, -0.12677748006842826E+00,
-0.12677748006842826E+00, -0.56321230207620998E+00,
0.81652885640221884E+00, -0.12677748006842826E+00,
0.81652885640221884E+00, -0.56321230207620998E+00,
0.81652885640221884E+00, -0.12677748006842826E+00,
-0.56321230207620998E+00, -0.56321230207620998E+00,
-0.12677748006842826E+00, 0.81652885640221884E+00,
-0.56321230207620998E+00, 0.81652885640221884E+00,
-0.12677748006842826E+00, 0.81652885640221884E+00,
-0.56321230207620998E+00, -0.12677748006842826E+00,
-0.12677748006842826E+00, -0.56321230207620998E+00,
-0.81652885640221884E+00, -0.12677748006842826E+00,
-0.81652885640221884E+00, -0.56321230207620998E+00,
-0.81652885640221884E+00, -0.12677748006842826E+00,
-0.56321230207620998E+00, -0.56321230207620998E+00,
-0.12677748006842826E+00, -0.81652885640221884E+00,
-0.56321230207620998E+00, -0.81652885640221884E+00,
-0.12677748006842826E+00, -0.81652885640221884E+00,
-0.56321230207620998E+00, -0.12677748006842826E+00,
0.19060182227792369E+00, 0.62698055090243920E+00,
0.75535841435335105E+00, 0.19060182227792369E+00,
0.75535841435335105E+00, 0.62698055090243920E+00,
0.75535841435335105E+00, 0.19060182227792369E+00,
0.62698055090243920E+00, 0.62698055090243920E+00,
0.19060182227792369E+00, 0.75535841435335105E+00,
0.62698055090243920E+00, 0.75535841435335105E+00,
0.19060182227792369E+00, 0.75535841435335105E+00,
0.62698055090243920E+00, 0.19060182227792369E+00,
0.19060182227792369E+00, 0.62698055090243920E+00,
-0.75535841435335105E+00, 0.19060182227792369E+00,
-0.75535841435335105E+00, 0.62698055090243920E+00,
-0.75535841435335105E+00, 0.19060182227792369E+00,
0.62698055090243920E+00, 0.62698055090243920E+00,
0.19060182227792369E+00, -0.75535841435335105E+00,
0.62698055090243920E+00, -0.75535841435335105E+00,
0.19060182227792369E+00, -0.75535841435335105E+00,
0.62698055090243920E+00, 0.19060182227792369E+00,
0.19060182227792369E+00, -0.62698055090243920E+00,
0.75535841435335105E+00, 0.19060182227792369E+00,
0.75535841435335105E+00, -0.62698055090243920E+00,
0.75535841435335105E+00, 0.19060182227792369E+00,
-0.62698055090243920E+00, -0.62698055090243920E+00,
0.19060182227792369E+00, 0.75535841435335105E+00,
-0.62698055090243920E+00, 0.75535841435335105E+00,
0.19060182227792369E+00, 0.75535841435335105E+00,
-0.62698055090243920E+00, 0.19060182227792369E+00,
0.19060182227792369E+00, -0.62698055090243920E+00,
-0.75535841435335105E+00, 0.19060182227792369E+00,
-0.75535841435335105E+00, -0.62698055090243920E+00,
-0.75535841435335105E+00, 0.19060182227792369E+00,
-0.62698055090243920E+00, -0.62698055090243920E+00,
0.19060182227792369E+00, -0.75535841435335105E+00,
-0.62698055090243920E+00, -0.75535841435335105E+00,
0.19060182227792369E+00, -0.75535841435335105E+00,
-0.62698055090243920E+00, 0.19060182227792369E+00,
-0.19060182227792369E+00, 0.62698055090243920E+00,
0.75535841435335105E+00, -0.19060182227792369E+00,
0.75535841435335105E+00, 0.62698055090243920E+00,
0.75535841435335105E+00, -0.19060182227792369E+00,
0.62698055090243920E+00, 0.62698055090243920E+00,
-0.19060182227792369E+00, 0.75535841435335105E+00,
0.62698055090243920E+00, 0.75535841435335105E+00,
-0.19060182227792369E+00, 0.75535841435335105E+00,
0.62698055090243920E+00, -0.19060182227792369E+00,
-0.19060182227792369E+00, 0.62698055090243920E+00,
-0.75535841435335105E+00, -0.19060182227792369E+00,
-0.75535841435335105E+00, 0.62698055090243920E+00,
-0.75535841435335105E+00, -0.19060182227792369E+00,
0.62698055090243920E+00, 0.62698055090243920E+00,
-0.19060182227792369E+00, -0.75535841435335105E+00,
0.62698055090243920E+00, -0.75535841435335105E+00,
-0.19060182227792369E+00, -0.75535841435335105E+00,
0.62698055090243920E+00, -0.19060182227792369E+00,
-0.19060182227792369E+00, -0.62698055090243920E+00,
0.75535841435335105E+00, -0.19060182227792369E+00,
0.75535841435335105E+00, -0.62698055090243920E+00,
0.75535841435335105E+00, -0.19060182227792369E+00,
-0.62698055090243920E+00, -0.62698055090243920E+00,
-0.19060182227792369E+00, 0.75535841435335105E+00,
-0.62698055090243920E+00, 0.75535841435335105E+00,
-0.19060182227792369E+00, 0.75535841435335105E+00,
-0.62698055090243920E+00, -0.19060182227792369E+00,
-0.19060182227792369E+00, -0.62698055090243920E+00,
-0.75535841435335105E+00, -0.19060182227792369E+00,
-0.75535841435335105E+00, -0.62698055090243920E+00,
-0.75535841435335105E+00, -0.19060182227792369E+00,
-0.62698055090243920E+00, -0.62698055090243920E+00,
-0.19060182227792369E+00, -0.75535841435335105E+00,
-0.62698055090243920E+00, -0.75535841435335105E+00,
-0.19060182227792369E+00, -0.75535841435335105E+00,
-0.62698055090243920E+00, -0.19060182227792369E+00,
0.64245492242205882E-01, 0.63942796347491027E+00,
0.76616212139003936E+00, 0.64245492242205882E-01,
0.76616212139003936E+00, 0.63942796347491027E+00,
0.76616212139003936E+00, 0.64245492242205882E-01,
0.63942796347491027E+00, 0.63942796347491027E+00,
0.64245492242205882E-01, 0.76616212139003936E+00,
0.63942796347491027E+00, 0.76616212139003936E+00,
0.64245492242205882E-01, 0.76616212139003936E+00,
0.63942796347491027E+00, 0.64245492242205882E-01,
0.64245492242205882E-01, 0.63942796347491027E+00,
-0.76616212139003936E+00, 0.64245492242205882E-01,
-0.76616212139003936E+00, 0.63942796347491027E+00,
-0.76616212139003936E+00, 0.64245492242205882E-01,
0.63942796347491027E+00, 0.63942796347491027E+00,
0.64245492242205882E-01, -0.76616212139003936E+00,
0.63942796347491027E+00, -0.76616212139003936E+00,
0.64245492242205882E-01, -0.76616212139003936E+00,
0.63942796347491027E+00, 0.64245492242205882E-01,
0.64245492242205882E-01, -0.63942796347491027E+00,
0.76616212139003936E+00, 0.64245492242205882E-01,
0.76616212139003936E+00, -0.63942796347491027E+00,
0.76616212139003936E+00, 0.64245492242205882E-01,
-0.63942796347491027E+00, -0.63942796347491027E+00,
0.64245492242205882E-01, 0.76616212139003936E+00,
-0.63942796347491027E+00, 0.76616212139003936E+00,
0.64245492242205882E-01, 0.76616212139003936E+00,
-0.63942796347491027E+00, 0.64245492242205882E-01,
0.64245492242205882E-01, -0.63942796347491027E+00,
-0.76616212139003936E+00, 0.64245492242205882E-01,
-0.76616212139003936E+00, -0.63942796347491027E+00,
-0.76616212139003936E+00, 0.64245492242205882E-01,
-0.63942796347491027E+00, -0.63942796347491027E+00,
0.64245492242205882E-01, -0.76616212139003936E+00,
-0.63942796347491027E+00, -0.76616212139003936E+00,
0.64245492242205882E-01, -0.76616212139003936E+00,
-0.63942796347491027E+00, 0.64245492242205882E-01,
-0.64245492242205882E-01, 0.63942796347491027E+00,
0.76616212139003936E+00, -0.64245492242205882E-01,
0.76616212139003936E+00, 0.63942796347491027E+00,
0.76616212139003936E+00, -0.64245492242205882E-01,
0.63942796347491027E+00, 0.63942796347491027E+00,
-0.64245492242205882E-01, 0.76616212139003936E+00,
0.63942796347491027E+00, 0.76616212139003936E+00,
-0.64245492242205882E-01, 0.76616212139003936E+00,
0.63942796347491027E+00, -0.64245492242205882E-01,
-0.64245492242205882E-01, 0.63942796347491027E+00,
-0.76616212139003936E+00, -0.64245492242205882E-01,
-0.76616212139003936E+00, 0.63942796347491027E+00,
-0.76616212139003936E+00, -0.64245492242205882E-01,
0.63942796347491027E+00, 0.63942796347491027E+00,
-0.64245492242205882E-01, -0.76616212139003936E+00,
0.63942796347491027E+00, -0.76616212139003936E+00,
-0.64245492242205882E-01, -0.76616212139003936E+00,
0.63942796347491027E+00, -0.64245492242205882E-01,
-0.64245492242205882E-01, -0.63942796347491027E+00,
0.76616212139003936E+00, -0.64245492242205882E-01,
0.76616212139003936E+00, -0.63942796347491027E+00,
0.76616212139003936E+00, -0.64245492242205882E-01,
-0.63942796347491027E+00, -0.63942796347491027E+00,
-0.64245492242205882E-01, 0.76616212139003936E+00,
-0.63942796347491027E+00, 0.76616212139003936E+00,
-0.64245492242205882E-01, 0.76616212139003936E+00,
-0.63942796347491027E+00, -0.64245492242205882E-01,
-0.64245492242205882E-01, -0.63942796347491027E+00,
-0.76616212139003936E+00, -0.64245492242205882E-01,
-0.76616212139003936E+00, -0.63942796347491027E+00,
-0.76616212139003936E+00, -0.64245492242205882E-01,
-0.63942796347491027E+00, -0.63942796347491027E+00,
-0.64245492242205882E-01, -0.76616212139003936E+00,
-0.63942796347491027E+00, -0.76616212139003936E+00,
-0.64245492242205882E-01, -0.76616212139003936E+00,
-0.63942796347491027E+00, -0.64245492242205882E-01};
static constexpr std::array<T, 1202> weights = {
0.11051892332675715E-03, 0.11051892332675715E-03, 0.11051892332675715E-03,
0.11051892332675715E-03, 0.11051892332675715E-03, 0.11051892332675715E-03,
0.91331597864435614E-03, 0.91331597864435614E-03, 0.91331597864435614E-03,
0.91331597864435614E-03, 0.91331597864435614E-03, 0.91331597864435614E-03,
0.91331597864435614E-03, 0.91331597864435614E-03, 0.92052327380907418E-03,
0.92052327380907418E-03, 0.92052327380907418E-03, 0.92052327380907418E-03,
0.92052327380907418E-03, 0.92052327380907418E-03, 0.92052327380907418E-03,
0.92052327380907418E-03, 0.92052327380907418E-03, 0.92052327380907418E-03,
0.92052327380907418E-03, 0.92052327380907418E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.36904218980178988E-03,
0.36904218980178988E-03, 0.36904218980178988E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.56039909286806605E-03,
0.56039909286806605E-03, 0.56039909286806605E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.68652976292826089E-03,
0.68652976292826089E-03, 0.68652976292826089E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.77203385511456302E-03,
0.77203385511456302E-03, 0.77203385511456302E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.83015459588947952E-03,
0.83015459588947952E-03, 0.83015459588947952E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.86866925501796288E-03,
0.86866925501796288E-03, 0.86866925501796288E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.89270762858468904E-03,
0.89270762858468904E-03, 0.89270762858468904E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.90608202385682190E-03,
0.90608202385682190E-03, 0.90608202385682190E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91197772549408669E-03,
0.91197772549408669E-03, 0.91197772549408669E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91287201386041814E-03,
0.91287201386041814E-03, 0.91287201386041814E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91307149356917349E-03,
0.91307149356917349E-03, 0.91307149356917349E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91528737845541163E-03,
0.91528737845541163E-03, 0.91528737845541163E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.91874362743216544E-03,
0.91874362743216544E-03, 0.91874362743216544E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.51769773129656943E-03,
0.51769773129656943E-03, 0.51769773129656943E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.73311436821014173E-03,
0.73311436821014173E-03, 0.73311436821014173E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.84632328363799282E-03,
0.84632328363799282E-03, 0.84632328363799282E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.90311226942539917E-03,
0.90311226942539917E-03, 0.90311226942539917E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.64857784531632563E-03,
0.64857784531632563E-03, 0.64857784531632563E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.74350309109823688E-03,
0.74350309109823688E-03, 0.74350309109823688E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.81017314974680173E-03,
0.81017314974680173E-03, 0.81017314974680173E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.85562992573118128E-03,
0.85562992573118128E-03, 0.85562992573118128E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.88502823412654448E-03,
0.88502823412654448E-03, 0.88502823412654448E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.90226929384269153E-03,
0.90226929384269153E-03, 0.90226929384269153E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.91057602589701258E-03,
0.91057602589701258E-03, 0.91057602589701258E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.79985278918390538E-03,
0.79985278918390538E-03, 0.79985278918390538E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.84833895745943305E-03,
0.84833895745943305E-03, 0.84833895745943305E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.88110481824257207E-03,
0.88110481824257207E-03, 0.88110481824257207E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.90100916771050860E-03,
0.90100916771050860E-03, 0.90100916771050860E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.91078135794827046E-03,
0.91078135794827046E-03, 0.91078135794827046E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.88032086797382603E-03,
0.88032086797382603E-03, 0.88032086797382603E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.90213422990406537E-03,
0.90213422990406537E-03, 0.90213422990406537E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91315780031894355E-03,
0.91315780031894355E-03, 0.91315780031894355E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03, 0.91580161746934654E-03,
0.91580161746934654E-03, 0.91580161746934654E-03};
};
} // namespace DelleyGrids
} // namespace IntegratorXX |
d4ae5de6445e4c318b22bdfdba016d694f0b82c9 | bbf1128c68a54925f1ae6d06b43b0fcab977aff7 | /OpenGL/Src/tests/TestDepthTest.h | 31c3932ccf66255e7d9e1a6b803d7b8a250ef288 | [] | no_license | RoaFE/OpenGLRenderer | 7d27515be40fdea966485c88bf962e6977fffdbb | 5f2557094e1b50b14f162515c49d451489d32dad | refs/heads/master | 2023-02-15T10:11:30.480751 | 2021-01-06T18:23:55 | 2021-01-06T18:23:55 | 316,569,076 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 941 | h | TestDepthTest.h | #ifndef TestDepthTest_H
#define TestDepthTest_H
#include "Test.h"
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "VertexBuffer.h"
#include "VertexBufferLayout.h"
#include "IndexBuffer.h"
#include "VertexArray.h"
#include "Shader.h"
#include "Texture.h"
#include "gameObjects/GameObject.h"
#include "gameObjects/Mesh.h"
#include "Camera.h"
#include <vector>
namespace test {
class TestDepthTest : public Test
{
public:
TestDepthTest();
~TestDepthTest();
void OnUpdate(float dt) override;
void OnRender() override;
void OnImGuiRender() override;
private:
float m_ClearColour[4];
glm::vec3 m_Scale;
glm::vec4 m_Rotation;
glm::vec3 m_Translation;
glm::mat4 proj;
glm::mat4 view;
float m_FoV;
Shader* m_Shader;
Texture* m_Texture;
std::vector<GameObject*> cubes;
GameObject cube;
Mesh cubeMesh;
Camera cam;
bool m_CameraControl;
bool m_SpaceHold;
};
}
#endif
|
8fbfc03f0051df35a07deb353afdf3ad91413a9b | 6e63127f96815ede029f4c62bd9c8ddbc0b5d71c | /src/ProductDefinition.cpp | 8e4b03a748820d2cc79c73459a2b078bdb15fcdf | [
"BSD-3-Clause"
] | permissive | jawilkins/cas-proto | 8146f1f1616f9657e9df43056e2c679e621c3a8d | 495c1298d6321fdf47bb1bcb078ce6bee2db06c0 | refs/heads/main | 2023-06-02T11:27:23.876681 | 2021-06-19T18:46:34 | 2021-06-19T18:46:34 | 375,045,000 | 0 | 1 | BSD-3-Clause | 2021-06-19T18:46:34 | 2021-06-08T14:46:21 | C++ | UTF-8 | C++ | false | false | 338 | cpp | ProductDefinition.cpp | #include "cas-proto/ProductDefinition.h"
CAS_PROTO_API ProductDefinition::ProductDefinition()
: FunctionDefinition(2)
{}
CAS_PROTO_API ProductDefinition& ProductDefinition::getInstance()
{
static ProductDefinition* instance = 0;
if (!instance) {
instance = new ProductDefinition();
}
return *instance;
}
|
097cbba3ae5f4f7bb939a198873e0293e20e1743 | 9f31769e138ac9c6703fd3a49d57c10ecef5fa0b | /vectorofvector.cpp | 4ee3a97fd306b35b4bdfdf13713e8bf75dae77ad | [] | no_license | ShivanshBhushan/Standered_Template_Library | e1d4761d0a330cf8c3ef1fa2a2b24be38f3f8c6b | c6f6c1f7ab29a3a2b824c1ddec2ff86c48fca11c | refs/heads/master | 2023-05-27T16:37:54.749101 | 2021-06-14T11:19:54 | 2021-06-14T11:19:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 682 | cpp | vectorofvector.cpp | #include <iostream>
#include <vector>
using namespace std;
void print_vec(vector<int> v)
{
for (int i = 0; i < v.size(); i++)
{
cout << v[i] << " ";
}
cout << endl;
}
int main()
{
int N;
vector<vector<int>> v;
cout << "enter the row size: ";
cin >> N;
for (int i = 0; i < N; i++)
{
int n;
cout << "the coloumn size: ";
cin >> n;
vector<int> temp;
for (int i = 0; i < n; i++)
{
int x;
cin >> x;
temp.push_back(x);
}
v.push_back(temp);
}
for (int i = 0; i < v.size(); i++)
{
print_vec(v[i]);
}
return 0;
} |
7a4d69fc67cf067246515e9285e9dae4434e5fc0 | 9acd561fad28a8787f1a4e2a2c74eeec987db7c9 | /cpp/MyDemo/createLogs/src_sim/tools.h | 082315a4e1ac1f58a22f46f7b32492da30ee3cae | [] | no_license | dongjiahong/documents | 9ab3ca6fc2b0309a453001de8b7c77f4882de269 | 852a48721982393373606bbe85679a36c4b66e26 | refs/heads/master | 2020-04-24T09:04:50.692828 | 2019-02-22T11:20:58 | 2019-02-22T11:20:58 | 171,851,720 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 838 | h | tools.h | #pragma once
#include <time.h>
#include <string>
#include <iostream>
#include "singleton.h"
using namespace std;
namespace superman{ //超人命名空间里是我的工具集
class MyTime :public Singleton<MyTime>{
public:
MyTime() {;}
string GetLocalYMD();//获取系统时间年月日
string GetLocalYMD(const string &division);//获取系统时间年月日
string GetLocalHMS();//获取系统时间时分秒
string GetLocalHMS(const string &division);//获取系统时间时分秒
long GetCurrentTimestamp();
string GetLocalTimeYear();
string GetLocalTimeMonth();
string GetLocalTimeDay();
string GetLocalTimeHour();
string GetLocalTimeMinute();
string GetLocalTimeSecond();
void initTime();
private:
string year,month,day,hour,minute,second;
};
}; //-->superman
|
b3a5347c070d7f85a6b6b438702995c3eb748daa | ca3f4a0582e6e7ce5e128d88e56b2e2409bb1e82 | /lab2/swapsort.cpp | a50292ffa52a87d74be05942435cf286b5fc8073 | [] | no_license | rolnor/lab2 | 7952d4ee0c781115319fd00d08220c19d3988207 | 8cf6e12dfae034c0d4b4ab7e77095848be6c95b0 | refs/heads/master | 2023-01-23T04:41:42.408528 | 2020-11-22T12:33:22 | 2020-11-22T12:33:22 | 314,597,205 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 999 | cpp | swapsort.cpp | #include <Header.h>
int swap_main()
{
int a = 1;
int b, c;
char c_order = 'a';
bool order;
while (true)
{
cout << "Enter a (0 to quit): ";
cin >> a;
if (a == 0)
break;
cout << "Enter b: ";
cin >> b;
cout << "Enter c: ";
cin >> c;
cout << "ascending or descending [a/d]: ";
cin >> c_order;
if (c_order == 'a')
order = 1;
else order = 0;
swap_sort(a, b, c, &order);
cout << "Result: " << a << ',' << b << ',' << c << endl;
}
cout << "Bye bye!" << endl;
return 0;
}
void swap_sort(int& a, int& b, int& c, bool *order)
{
int temp;
if (*order == 1)
{
if (!(a <= b && b <= c))
{
if (a > b)
{
temp = b;
b = a;
a = temp;
}
if (b > c)
{
temp = c;
c = b;
b = temp;
}
swap_sort(a, b, c, order);
}
}
else
{
if (!(a >= b && b >= c))
{
if (a < b)
{
temp = b;
b = a;
a = temp;
}
if (b < c)
{
temp = c;
c = b;
b = temp;
}
swap_sort(a, b, c, order);
}
}
} |
8ea9497d03d5c38033f459140c0bb118d884bd45 | 77e43bc3b05a22fb97e117975157e63c9ab2c2fe | /server-code/src/service/zone/scene_service/message_handler/MsgSceneProcess.cpp | 95ace739162c738881c7c25f80ee39a2e413ddb1 | [] | no_license | luoxz-ai/mmo-server | fe4ef9a4ce540ad18314cbf298f00f74a11c24a6 | 6dcd98c0ebfd2d971d3b9766ca78844e7e262889 | refs/heads/master | 2023-01-12T23:37:26.127202 | 2020-11-18T02:37:13 | 2020-11-18T02:37:13 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 368 | cpp | MsgSceneProcess.cpp | #include "MsgProcessRegister.h"
#include "SceneService.h"
void SceneMessageHandlerRegister()
{
__ENTER_FUNCTION
auto pNetMsgProcess = SceneService()->GetNetMsgProcess();
for(const auto& [k, v]: MsgProcRegCenter<CSceneService>::instance().m_MsgProc)
{
pNetMsgProcess->Register(k, std::get<0>(v), std::get<1>(v));
}
__LEAVE_FUNCTION
}
|
b736e79c68bab32d2d76d9ee5f9b6d9037f10a5d | 5e6910a3e9a20b15717a88fd38d200d962faedb6 | /Codeforces/Contests/CF1360/e.cpp | b25fc9e06d8085ce748130f05d482b427b8cba32 | [] | no_license | khaledsliti/CompetitiveProgramming | f1ae55556d744784365bcedf7a9aaef7024c5e75 | 635ef40fb76db5337d62dc140f38105595ccd714 | refs/heads/master | 2023-08-29T15:12:04.935894 | 2023-08-15T13:27:12 | 2023-08-15T13:27:12 | 171,742,989 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 946 | cpp | e.cpp | // We only fail when we stop trying
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define endl '\n'
#define D(x) cerr << #x << " = " << (x) << '\n'
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
typedef long long ll;
const int N = 50;
int n;
string s[N];
int dp[N][N];
int main()
{
int T;
cin >> T;
while(T--) {
cin >> n;
for(int i = 0; i < n; i++) {
cin >> s[i];
for(int j = 0; j < n; j++)
dp[i][j] = 0;
}
bool good = true;
for(int i = n - 1; i >= 0; i--) {
for(int j = n - 1; j >= 0; j--) {
if(s[i][j] == '1') {
if(i == n - 1) dp[i][j] = 1;
else if(j == n - 1) dp[i][j] = 1;
else if(dp[i + 1][j] || dp[i][j + 1]) dp[i][j] = 1;
if(!dp[i][j])
good = false;
}
}
}
if(good) cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}
|
01dae22bc7277f5f1b4eea14a194fe160cdc73d5 | 83ae0f6b31e2aced0f5e247317dbbf4bd20c0f02 | /C++/CodeForces/CodeForces_A. Way Too Long Words.cpp | 79b0ed512d4931f4ed16cb2d9af538c9eda16200 | [] | no_license | mostafaelsayyad/ProblemSolving | c35d2a4f61ac9f1a4073899eb7e768834572b3cb | 9a9047f214049a61aaadefdeadd5950c9c47b7f8 | refs/heads/master | 2020-04-06T06:25:07.335857 | 2015-08-14T08:44:06 | 2015-08-14T08:44:06 | 40,704,446 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 265 | cpp | CodeForces_A. Way Too Long Words.cpp | #include<iostream>
#include<string>
using namespace std;
int main()
{
string str;
int n;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>str;
int size=str.size();
if(size>10)
cout<<str[0]<<size-2<<str[size-1]<<endl;
else
cout<<str<<endl;
}
return 0;
}
|
f5529c96c1f218d83685d4ef31831d122d37cfb4 | 0ecad8cea631c4c5b9f02b4e4b5e94b14132de9d | /customerMap.h | 8db924fda0341c151aa2eddd6717e6cd8b5df43f | [] | no_license | uwddesmond/CSS-343-Assignment-4 | ae850ec26096674fcac83e37acf746f4b1da5b6b | de90e33aa829c6624151005fdde80fb256beab1c | refs/heads/master | 2021-04-26T22:59:03.675656 | 2018-03-12T03:16:33 | 2018-03-12T03:16:33 | 123,909,202 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 345 | h | customerMap.h | #pragma once
#ifndef CUSTOMERMAP_H
#define CUSTOMERMAP_H
#include <string>
#include "customer.h"
using namespace std;
class customerMap {
public:
customerMap();
~customerMap();
void insert(Customer*);
Customer* find(int);
private:
int hashFunction(int);
CustomerNode* customers[10];
};
#endif // CUSTOMERMAP_H
|
07f5e000c38767c09043a5e2fc8c0d69fee4f3f7 | 2bef08c9deacb056e3d05f636c4da41247d77709 | /GUI/GLWidget.cpp | e18aaf7d30d693365d49c2d11c55ad1a853a6af7 | [] | no_license | bence21/Grafika | b2716fd2bc35f8698af180685cafea12e9f0ecea | 59c5fa08a44dae0dc61a787759bc8c6cc3bcac35 | refs/heads/master | 2021-01-23T00:44:31.003843 | 2017-07-06T17:48:10 | 2017-07-06T17:48:10 | 92,837,844 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 39,542 | cpp | GLWidget.cpp | #include "GLWidget.h"
#include <iostream>
using namespace std;
using namespace cagd;
#include <GL/GLU.h>
#include <Core/Exceptions.h>
#include"../Core/Matrices.h"
#include"../Test/TestFunctions.h"
namespace cagd
{
GLWidget::~GLWidget(){
for(GLuint i=0;i<_pc.GetColumnCount();++i) {
if(_pc[i]) {
delete _pc[i],_pc[i]=0;
}
}
for(GLuint i=0;i<_image_of_pc.GetColumnCount();++i) {
if(_image_of_pc[i]) {
delete _image_of_pc[i],_image_of_pc[i]=0;
}
}
for(GLuint i=0;i<_ps.GetColumnCount();++i) {
if(_image_of_ps[i]) {
delete _image_of_ps[i],_image_of_ps[i]=0;
}
if(_ps[i]) {
delete _ps[i],_ps[i]=0;
}
}
if(dl) {
delete dl;
}
for(int i=0;i<patchNr;++i){
if(_before_interpolation[i]) {
delete _before_interpolation[i],_before_interpolation[i]=0;
}
if(_after_interpolation[i]) {
delete _after_interpolation[i],_after_interpolation[i]=0;
}
}
}
//--------------------------------
// special and default constructor
//--------------------------------
GLWidget::GLWidget(QWidget *parent, const QGLFormat &format): QGLWidget(format, parent)
{
indexX=0;
indexY=0;
}
//--------------------------------------------------------------------------------------
// this virtual function is called once before the first call to paintGL() or resizeGL()
//--------------------------------------------------------------------------------------
void GLWidget::initializeGL()
{
// creating a perspective projection matrix
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
_aspect = (float)width() / (float)height();
_z_near = 1.0;
_z_far = 1000.0;
_fovy = 45.0;
gluPerspective(_fovy, _aspect, _z_near, _z_far);
// setting the model view matrix
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
_eye[0] = _eye[1] = 0.0, _eye[2] = 6.0;
_center[0] = _center[1] = _center[2] = 0.0;
_up[0] = _up[2] = 0.0, _up[1] = 1.0;
gluLookAt(_eye[0], _eye[1], _eye[2], _center[0], _center[1], _center[2], _up[0], _up[1], _up[2]);
// enabling depth test
glEnable(GL_DEPTH_TEST);
// setting the color of background
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
// initial values of transformation parameters
_angle_x = _angle_y = _angle_z = 0.0;
_trans_x = _trans_y = _trans_z = 0.0;
_zoom = 1.0;
try
{
// initializing the OpenGL Extension Wrangler library
GLenum error = glewInit();
if (error != GLEW_OK)
{
throw Exception("Could not initialize the OpenGL Extension Wrangler Library!");
}
if (!glewIsSupported("GL_VERSION_2_0"))
{
throw Exception("Your graphics card is not compatible with OpenGL 2.0+! "
"Try to update your driver or buy a new graphics adapter!");
}
// create and store your geometry in display lists or vertex buffer objects
// ...
// fstream log("log.txt",ios_base::out);
// if(!_shaders.InstallShaders("Shaders/*.vert","Shaders/*.frag",GL_TRUE,log)){
// log.close();
// throw;
// }
// log.close();
// _shaders.Enable();
// _shaders.SetUniformVariable1f("scale_factor",4.0);
// //...
// _shaders.Disable();
}
catch (Exception &e)
{
cout << e << endl;
}
glEnable(GL_POINT_SMOOTH);
glHint(GL_POINT_SMOOTH_HINT,GL_NICEST);
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);
glEnable(GL_POLYGON_SMOOTH);
glHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);
glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
glEnable(GL_DEPTH);
glewInit();
_curve_count=5;
//_pc= new RowMatrix<>();
_pc.ResizeColumns(_curve_count);
_image_of_pc.ResizeColumns(_curve_count);
_ps.ResizeColumns(_curve_count);
_image_of_ps.ResizeColumns(_curve_count);
_pc_index=0;
RowMatrix<ParametricCurve3::Derivative> derivative(3);
//int functionIndex=5;
//_pc=0;
/*
switch (functionIndex) {
case 2:
derivative(0)=torus_knot::d0;
derivative(1)=torus_knot::d1;
derivative(2)=torus_knot::d2;
_pc=new ParametricCurve3(derivative,torus_knot::u_min,torus_knot::u_max);
break;
case 3:
derivative(0)=epicycloid::d0;
derivative(1)=epicycloid::d1;
derivative(2)=epicycloid::d2;
_pc=new ParametricCurve3(derivative,epicycloid::u_min,epicycloid::u_max);
break;
case 4:
derivative(0)=vivianis::d0;
derivative(1)=vivianis::d1;
derivative(2)=vivianis::d2;
_pc=new ParametricCurve3(derivative,vivianis::u_min,vivianis::u_max);
break;
case 5:
derivative(0)=mobius::d0;
derivative(1)=mobius::d1;
derivative(2)=mobius::d2;
_pc=new ParametricCurve3(derivative,mobius::u_min,mobius::u_max);
break;
default:
derivative(0)=spiral_on_cone::d0;
derivative(1)=spiral_on_cone::d1;
derivative(2)=spiral_on_cone::d2;
_pc=new ParametricCurve3(derivative,spiral_on_cone::u_min,spiral_on_cone::u_max);
break;
}*/
GLint k=0;
_pc[k]=0;
derivative(0)=torus_knot::d0;
derivative(1)=torus_knot::d1;
derivative(2)=torus_knot::d2;
_pc[k]=new ParametricCurve3(derivative,torus_knot::u_min,torus_knot::u_max);
_pc[++k]=0;
derivative(0)=epicycloid::d0;
derivative(1)=epicycloid::d1;
derivative(2)=epicycloid::d2;
_pc[k]=new ParametricCurve3(derivative,epicycloid::u_min,epicycloid::u_max);
_pc[++k]=0;
derivative(0)=vivianis::d0;
derivative(1)=vivianis::d1;
derivative(2)=vivianis::d2;
_pc[k]=new ParametricCurve3(derivative,vivianis::u_min,vivianis::u_max);
_pc[++k]=0;
derivative(0)=mobius::d0;
derivative(1)=mobius::d1;
derivative(2)=mobius::d2;
_pc[k]=new ParametricCurve3(derivative,mobius::u_min,mobius::u_max);
_pc[++k]=0;
derivative(0)=spiral_on_cone::d0;
derivative(1)=spiral_on_cone::d1;
derivative(2)=spiral_on_cone::d2;
_pc[k]=new ParametricCurve3(derivative,spiral_on_cone::u_min,spiral_on_cone::u_max);
TriangularMatrix<ParametricSurface3::PartialDerivative> derivs(2);
derivs(0, 0) = torus::d00;
derivs(1, 0) = torus::d10;
derivs(1, 1) = torus::d01;
k=0;
_ps[k] = 0;
_ps[k] = new ParametricSurface3(derivs, torus::u_min, torus::u_max, torus::v_min, torus::v_max);
derivs(0, 0) = mobiusSurface::d00;
derivs(1, 0) = mobiusSurface::d10;
derivs(1, 1) = mobiusSurface::d01;
_ps[++k] = 0;
_ps[k] = new ParametricSurface3(derivs, mobiusSurface::u_min, mobiusSurface::u_max, mobiusSurface::v_min, mobiusSurface::v_max);
derivs(0, 0) = steiner::d00;
derivs(1, 0) = steiner::d10;
derivs(1, 1) = steiner::d01;
_ps[++k] = 0;
_ps[k] = new ParametricSurface3(derivs, steiner::u_min, steiner::u_max, steiner::v_min, steiner::v_max);
derivs(0, 0) = dini::d00;
derivs(1, 0) = dini::d10;
derivs(1, 1) = dini::d01;
_ps[++k] = 0;
_ps[k] = new ParametricSurface3(derivs, dini::u_min, dini::u_max, dini::v_min, dini::v_max);
derivs(0, 0) = enneper::d00;
derivs(1, 0) = enneper::d10;
derivs(1, 1) = enneper::d01;
_ps[++k] = 0;
_ps[k] = new ParametricSurface3(derivs, enneper::u_min, enneper::u_max, enneper::v_min, enneper::v_max);
for(GLint i=0;i<=k;++i){
if(!_pc[i])
{
cerr<<"Error at new ParametricCurve3\n";
}
if(!_ps[i])
{
cerr<<"Error at new ParametricSurface3\n";
}
}
GLuint div_point_count=200;
GLenum usage_flag=GL_STATIC_DRAW;
_image_of_pc.ResizeColumns(_curve_count);
for(GLuint i=0;i<_curve_count;++i){
_image_of_pc[i]=0;
_image_of_pc[i]=_pc[i]->GenerateImage(div_point_count,usage_flag);
_image_of_ps[i]=0;
_image_of_ps[i]=_ps[i]->GenerateImage(div_point_count,div_point_count);
if(!_image_of_pc[i])
{
cerr<<"Error at _pc->GenerateImage\n";
}
if(!_image_of_ps[i])
{
cerr<<"Error at _pc->GenerateImage\n";
}
if(i==1){
if(!_image_of_pc[i]->UpdateVertexBufferObjects(usage_flag,0.1))
// if(!_image_of_pc[i]->UpdateVertexBufferObjects(usage_flag))
{
cout<<"Could not create the vertex buffer object of the parametric curve!\n";
}
} else if(!_image_of_pc[i]->UpdateVertexBufferObjects(usage_flag))
{
cout<<"Could not create the vertex buffer object of the parametric curve!\n";
}
if (!_image_of_ps[i] -> UpdateVertexBufferObjects(usage_flag))
{
cout<<"Could not create the vertex buffer object of the parametric surface!" << endl;
}
}
showCyclicCurves=false;
showParametricCurves=false;
showParametricSurface=false;
showModel=false;
showPatch=true;
initCyclicCurves();
initModel();
dl =0;
HCoordinate3 direction(0.0, 0.0, 1.0, 0.0);
Color4 ambient(0.4, 0.4, 0.4, 1.0);
Color4 diffuse(0.8, 0.8, 0.8, 1.0);
Color4 specular(1.0, 1.0, 1.0, 1.0);
dl = new DirectionalLight(GL_LIGHT0, direction, ambient, diffuse, specular);
_materials[0] = MatFBBrass;
_materials[1] = MatFBEmerald;
_materials[2] = MatFBRuby;
_materials[3] = MatFBGold;
_materials[4] = MatFBSilver;
initBezierPatch();
}
void GLWidget::initBezierPatch() {
_joinDirectionValue=0;
#define MAX_DATA_POINTS 100
_data_points.resize(MAX_DATA_POINTS);
for(int i=0;i<MAX_DATA_POINTS;++i) {
_data_points[i] = cagd::Matrix<cagd::DCoordinate3>(4,4);
}
_patch.resize(MAX_DATA_POINTS);
_before_interpolation.resize(MAX_DATA_POINTS);
_after_interpolation.resize(MAX_DATA_POINTS);
int k=0;
_patch[k].SetData(0,0,-2.0,-2.0,0.0);
_patch[k].SetData(0,1,-2.0,-1.0,0.0);
_patch[k].SetData(0,2,-2.0,1.0,0.0);
_patch[k].SetData(0,3,-2.0,2.0,0.0);
_patch[k].SetData(1,0,-1.0,-2.0,0.0);
_patch[k].SetData(1,1,-1.0,-1.0,2.0);
_patch[k].SetData(1,2,-1.0,1.0,2.0);
_patch[k].SetData(1,3,-1.0,2.0,0.0);
_patch[k].SetData(2,0,1.0,-2.0,0.0);
_patch[k].SetData(2,1,1.0,-1.0,2.0);
_patch[k].SetData(2,2,1.0,1.0,2.0);
_patch[k].SetData(2,3,1.0,2.0,0.0);
_patch[k].SetData(3,0,2.0,-2.0,0.0);
_patch[k].SetData(3,1,2.0,-1.0,0.0);
_patch[k].SetData(3,2,2.0,1.0,0.0);
_patch[k].SetData(3,3,2.0,2.0,0.0);
_patch[k].UpdateVertexBufferObjectsOfData();
_before_interpolation[k] = _patch[k].GenerateImage(30,30,GL_STATIC_DRAW);
if(_before_interpolation[k]) {
if (!_before_interpolation[k]->UpdateVertexBufferObjects())
{
cout << "VBO-err" << endl;
}
cout<<"before interpolation\n";
}
RowMatrix<GLdouble> u_knot_vector(4);
u_knot_vector(0) = 0.0;
u_knot_vector(1) = 1.0/3.0;
u_knot_vector(2) = 2.0/3.0;
u_knot_vector(3) = 1.0;
ColumnMatrix<GLdouble> v_knot_vector(4);
u_knot_vector(0) = 0.0;
u_knot_vector(1) = 1.0/3.0;
u_knot_vector(2) = 2.0/3.0;
u_knot_vector(3) = 1.0;
Matrix<DCoordinate3> data_points_to_interpolate(4,4);
for(GLuint row = 0; row<4;++row)
for(GLuint column = 0;column<4;++column)
_patch[k].GetData(row,column,data_points_to_interpolate(row,column));
if(_patch[k].UpdateDataForInterpolation(u_knot_vector,v_knot_vector, data_points_to_interpolate))
{
_after_interpolation[k] = _patch[k].GenerateImage(30,30,GL_STATIC_DRAW);
if(_after_interpolation[k]) {
_after_interpolation[k]->UpdateVertexBufferObjects();
cout<<"after interpolation\n";
}
}
patchNr=0;
}
void GLWidget::initModel() {
// glFrontFace(GL_CCW);
//model
if (_mouse.LoadFromOFF("debug/Models/elephant.off", true))
// if (_mouse.LoadFromOFF("debug/Models/dinsr.off", true))
// if (_mouse.LoadFromOFF("debug/Models/space.off", true))
// if (_mouse.LoadFromOFF("debug/Models/volkswagon.off", true))
// if (_mouse.LoadFromOFF("debug/Models/king.off", true))
// if (_mouse.LoadFromOFF("debug/Models/cube.off", true))
{
if (_mouse.UpdateVertexBufferObjects(GL_DYNAMIC_DRAW))
{
_angle = 0.0;
// _timer->start();
}
}
}
//-----------------------
// the rendering function
//-----------------------
void GLWidget::paintGL()
{
// clears the color and depth buffers
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// stores/duplicates the original model view matrix
glPushMatrix();
// applying transformations
glRotatef(_angle_x, 1.0, 0.0, 0.0);
glRotatef(_angle_y, 0.0, 1.0, 0.0);
glRotatef(_angle_z, 0.0, 0.0, 1.0);
glTranslated(_trans_x, _trans_y, _trans_z);
glScaled(_zoom, _zoom, _zoom);
// render your geometry (this is oldest OpenGL rendering technique, later we will use some advanced methods)
// glColor3f(1.0f, 1.0f, 1.0f);
// glBegin(GL_LINES);
// glVertex3f(0.0f, 0.0f, 0.0f);
// glVertex3f(1.1f, 0.0f, 0.0f);
// glVertex3f(0.0f, 0.0f, 0.0f);
// glVertex3f(0.0f, 1.1f, 0.0f);
// glVertex3f(0.0f, 0.0f, 0.0f);
// glVertex3f(0.0f, 0.0f, 1.1f);
// glEnd();
// glBegin(GL_TRIANGLES);
// // attributes
// glColor3f(1.0f, 0.0f, 0.0f);
// // associated with position
// glVertex3f(1.0f, 0.0f, 0.0f);
// // attributes
// glColor3f(0.0, 1.0, 0.0);
// // associated with position
// glVertex3f(0.0, 1.0, 0.0);
// // attributes
// glColor3f(0.0f, 0.0f, 1.0f);
// // associated with position
// glVertex3f(0.0f, 0.0f, 1.0f);
// glEnd();
// pops the current matrix stack, replacing the current matrix with the one below it on the stack,
// i.e., the original model view matrix is restored
// glPopMatrix();
// glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
// glPushMatrix();
if(showParametricCurves) {
if(_image_of_pc[_pc_index]) {
glColor3f(1.0,0.0,0.0);
_image_of_pc[_pc_index]->RenderDerivatives(0,GL_LINE_STRIP);
glPointSize(5.0);
glColor3f(0.0,0.5,0.0);
_image_of_pc[_pc_index]->RenderDerivatives(1,GL_LINES);
_image_of_pc[_pc_index]->RenderDerivatives(1,GL_POINTS);
glColor3f(0.1f,0.5f,0.9f);
_image_of_pc[_pc_index]->RenderDerivatives(2,GL_LINES);
_image_of_pc[_pc_index]->RenderDerivatives(2,GL_POINTS);
glPointSize(1.0);
}
}
if(showCyclicCurves) {
cyclicCurvesRender();
}
if(showParametricSurface) {
parametricSurfaceRender();
}
if(showModel) {
_materials[selectedMaterial].Apply();
modelRender();
}
if(showPatch) {
if(showUV) {
glDisable(GL_LIGHTING);
glDisable(GL_NORMALIZE);
glDisable(GL_LIGHT0);
glColor3f(1.0f,0.0f,0.0f);
for(int k=0;k<_u_isoline.size();++k){
for(int i=0;i<_u_isoline[k]->GetColumnCount();++i)
(*_u_isoline[k])[i]->RenderDerivatives(0,GL_LINE_STRIP);
}
glColor3f(1.0f,1.0f,1.0f);
for(int k=0;k<_v_isoline.size();++k){
for(int i=0;i<_v_isoline[k]->GetColumnCount();++i) {
glColor3f(1.0f,1.0f,1.0f);
(*_v_isoline[k])[i]->RenderDerivatives(0,GL_LINE_STRIP);
// glPointSize(5.0);
glColor4f(0.0,0.5,0.0,0.9);
// GenericCurve3.RenderDerivatives()
(*_v_isoline[k])[i]->RenderDerivatives(1,GL_LINES);
(*_v_isoline[k])[i]->RenderDerivatives(1,GL_POINTS);
// glColor3f(0.1f,0.5f,0.9f);
// (*_v_isoline[k])[i]->RenderDerivatives(2,GL_LINES);
// (*_v_isoline[k])[i]->RenderDerivatives(2,GL_POINTS);
// glPointSize(1.0);
}
// for(int i=0;i<_u_isoline[k]->GetColumnCount();++i) {
// for(int i=0;i<1;++i) {
// RowMatrix<GenericCurve3*> * tmp=_u_isoline[k];
// GenericCurve3*tmp2;
// tmp2=(GenericCurve3*)&tmp[i];
// tmp2->RenderDerivatives(0,GL_LINE_STRIP);
// // _u_isoline[k][i]->RenderDerivatives(0,GL_LINE_STRIP);
// // _v_isoline[k][i].RenderDerivatives(0,GL_LINE_STRIP);
// }
}
}
_materials[selectedMaterial].Apply();
glEnable(GL_LIGHTING);
glEnable(GL_NORMALIZE);
glEnable(GL_LIGHT0);
for(int k=0;k<patchNr;++k){
// BicubicBezierPatch.GenerateUIsoparametricLines()
// _u_isoline[k]->Render();
if(showControlNet){
if (!_patch[k].RenderData())
{
cout << "Could not render control net!" << endl;
}
}
if(showBeforeInterpolation){
if(_before_interpolation[k]) {
// MatFBRuby.Apply();
// glPointSize(10.0);
glColor3f(1.0, 0.0, 0.0);
_before_interpolation[k]->Render();
}
}
if(showAfterInterpolation){
if(_after_interpolation[k]) {
glEnable(GL_BLEND);
glDepthMask(GL_FALSE);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
// MatFBSilver.Apply();
MatFBTurquoise.Apply();
_after_interpolation[k]->Render();
glDepthMask(GL_TRUE);
glDisable(GL_BLEND);
}
}
}
glDisable(GL_LIGHTING);
glDisable(GL_NORMALIZE);
glDisable(GL_LIGHT0);
}
glPopMatrix();
// MatFB Brass.Apply();
// _shaders.Enable();
// _model.Render();
// _shaders.Disable();
//(
// float color[4*10]={0.1,10.3,30.4,40.5};
// _shaders.SetUniformVariable4fv("outline.color[0]",1,color);
// ...)
}
void GLWidget::initCyclicCurves()
{
_cc = nullptr;
_image_of_cc = nullptr;
_n = 3;
_cc = new CyclicCurves3(_n);
GLdouble step = TWO_PI / (2 * _n + 1);
for (GLuint i = 0; i <= 2 * _n; i++)
{
GLdouble u = i * step;
DCoordinate3& cp = (*_cc)[i];
cp[0] = cos(u);
cp[1] = sin(u);
cp[2] = cos(u) * i;
}
_cc -> UpdateVertexBufferObjectsOfData();
GLuint _max_order_of_derivatives = 2;
GLuint _div_point_count = 100;
_image_of_cc = _cc -> GenerateImage(_max_order_of_derivatives, _div_point_count);
_image_of_cc -> UpdateVertexBufferObjects();
_icc = new CyclicCurves3(_n);
_d.ResizeRows(2 * _n + 1);
_u_icc.ResizeRows(2 * _n + 1);
for (GLuint i = 0; i <= 2 * _n; i++)
{
_u_icc[i] = i * step;
DCoordinate3 &p = _d[i];
p[0] = cos(_u_icc[i]);
p[1] = sin(_u_icc[i]);
p[2] = cos(_u_icc[i]) * i;
}
if (!_icc->UpdateDataForInterpolation(_u_icc, _d))
{
//error
}
_icc->UpdateVertexBufferObjectsOfData();
_image_of_icc = _icc->GenerateImage(_max_order_of_derivatives, _div_point_count);
_image_of_icc->UpdateVertexBufferObjects();
}
void GLWidget::cyclicCurvesRender()
{
glColor3f(0.5, 0.5, 0.5);
glPointSize(10.0);
glBegin(GL_POINTS);
for (GLuint i = 0; i <= 2 * _n; i++)
{
glVertex3f(_d[i][0], _d[i][1], _d[i][2]);
}
glEnd();
glPointSize(1.0);
cyclicCurveRender();
interpolatingCyclicCurveRender();
if (_icc)
{
glColor3f(1.0, 0.0, 1.0);
_cc->RenderData(GL_LINE_LOOP);
}
}
void GLWidget::cyclicCurveRender()
{
if (_image_of_cc)
{
glColor3f(1.0, 0.0, 0.0);
_image_of_cc -> RenderDerivatives(0, GL_LINE_STRIP);
}
}
void GLWidget::interpolatingCyclicCurveRender()
{
if (_image_of_icc) {
glColor3f(1.0, 1.0, 0.0);
_image_of_icc -> RenderDerivatives(0, GL_LINE_LOOP);
}
}
void GLWidget::parametricSurfaceRender()
{
if (dl)
{
glEnable(GL_LIGHTING);
glEnable(GL_NORMALIZE);
//glEnable(GL_LIGHT0);
dl->Enable();
if (_image_of_ps[_pc_index])
{
_image_of_ps[_pc_index]->Render();
}
dl->Disable();
glDisable(GL_NORMALIZE);
glDisable(GL_LIGHTING);
// glDisable(GL_LIGHT0);
}
}
void GLWidget::modelRender()
{
glEnable(GL_LIGHTING);
glEnable(GL_NORMALIZE);
glEnable(GL_LIGHT0);
switch (_pc_index) {
case 0:
MatFBBrass.Apply();
break;
case 1:
MatFBRuby.Apply();
break;
case 2:
MatFBPearl.Apply();
break;
case 3:
MatFBTurquoise.Apply();
break;
case 4:
MatFBGold.Apply();
break;
case 5:
MatFBBrass.Apply();
break;
default:
break;
}
_mouse.Render();
glDisable(GL_LIGHTING);
glDisable(GL_NORMALIZE);
glDisable(GL_LIGHT0);
}
//----------------------------------------------------------------------------
// when the main window is resized one needs to redefine the projection matrix
//----------------------------------------------------------------------------
void GLWidget::resizeGL(int w, int h)
{
// setting the new size of the rendering context
glViewport(0, 0, w, h);
// redefining the projection matrix
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
_aspect = (float)w / (float)h;
gluPerspective(_fovy, _aspect, _z_near, _z_far);
// switching back to the model view matrix
glMatrixMode(GL_MODELVIEW);
updateGL();
}
//-----------------------------------
// implementation of the public slots
//-----------------------------------
void GLWidget::_animate()
{
GLfloat *vertex = _mouse.MapVertexBuffer(GL_READ_WRITE);
GLfloat *normal = _mouse.MapNormalBuffer(GL_READ_ONLY);
_angle += DEG_TO_RADIAN;
if(_angle >= TWO_PI) _angle -= TWO_PI;
GLfloat scale = sin(_angle) / 3000.0;
for (GLuint i = 0; i < _mouse.VertexCount(); ++i)
{
for (GLuint coordinate = 0; coordinate < 3; ++coordinate, ++vertex, ++normal)
*vertex += scale * (*normal);
}
_mouse.UnmapVertexBuffer();
_mouse.UnmapNormalBuffer();
updateGL();
}
void GLWidget::set_angle_x(int value)
{
if (_angle_x != value)
{
_angle_x = value;
updateGL();
}
}
void GLWidget::set_angle_y(int value)
{
if (_angle_y != value)
{
_angle_y = value;
updateGL();
}
}
void GLWidget::set_angle_z(int value)
{
if (_angle_z != value)
{
_angle_z = value;
updateGL();
}
}
void GLWidget::set_zoom_factor(double value)
{
if (_zoom != value)
{
_zoom = value;
updateGL();
}
}
void GLWidget::set_trans_x(double value)
{
if (_trans_x != value)
{
_trans_x = value;
updateGL();
}
}
void GLWidget::set_trans_y(double value)
{
if (_trans_y != value)
{
_trans_y = value;
updateGL();
}
}
void GLWidget::set_trans_z(double value)
{
if (_trans_z != value)
{
_trans_z = value;
updateGL();
}
}
void GLWidget::setConstant(int value)
{
epicycloid::constant2=value;
vivianis::constant2=value;
if (mobius::constant2 != value)
{
mobius::constant2 = value;
cout<<mobius::constant2<<"\n";
delete _pc[1];
delete _image_of_pc[1];
_pc[1]=0;
RowMatrix<ParametricCurve3::Derivative> derivative(3);
derivative(0)=epicycloid::d0;
derivative(1)=epicycloid::d1;
derivative(2)=epicycloid::d2;
_pc[1]=new ParametricCurve3(derivative,epicycloid::u_min,epicycloid::u_max);
_image_of_pc[1]=0;
_image_of_pc[1]=_pc[1]->GenerateImage(200);
if(!_image_of_pc[1])
{
cerr<<"Error at _pc->GenerateImage\n";
}
if(!_image_of_pc[1]->UpdateVertexBufferObjects(GL_STATIC_DRAW,0.1))
// if(!_image_of_pc[1]->UpdateVertexBufferObjects(GL_STATIC_DRAW))
{
cout<<"Could not create the vertex buffer object of the parametric curve!\n";
}
updateGL();
}
}
void GLWidget::setParametricCurveIndex(int index){
if(_pc_index!=index)
{
_pc_index=index;
updateGL();
}
}
void GLWidget::setShowParametricCurve(bool x){
if(showParametricCurves!=x){
showParametricCurves=x;
updateGL();
}
}
void GLWidget::setShowCyclicCurve(bool x){
if(showCyclicCurves!=x){
showCyclicCurves=x;
updateGL();
}
}
void GLWidget::setShowParametricSurface(bool x){
if(showParametricSurface!=x){
showParametricSurface=x;
updateGL();
}
}
void GLWidget::setShowModel(bool x){
if(showModel!=x){
showModel=x;
updateGL();
}
}
void GLWidget::setShowPatch(bool x){
if(showPatch!=x){
showPatch=x;
updateGL();
}
}
void GLWidget::setJoinDirection(int direction) {
_joinDirectionValue=direction;
}
void GLWidget::addNewBicubicBezierSurface(GLint x,GLint y){
bool was=false;
if(lastX!=-1&&x==0&&y==0) {
was=true;
if(direction==1) {
if(-lastX+3==lastY){
direction=2;
x=lastX+3;
y=lastY;
}else{
x=lastX;
y=lastY+3;
}
}
else if(direction==2) {
if(lastX==lastY){
direction=3;
x=lastX;
y=lastY-3;
}else{
x=lastX+3;
y=lastY;
}
}
else if(direction==3) {
if(lastX==-lastY){
direction=4;
x=lastX-3;
y=lastY;
}else{
x=lastX;
y=lastY-3;
}
}
else if(direction==4) {
if(lastX==lastY){
direction=1;
x=lastX;
y=lastY+3;
}else{
x=lastX-3;
y=lastY;
}
}
}
lastX=x;
lastY=y;
patchNr++;
_patch.resize(patchNr);
_before_interpolation.resize(patchNr);
_after_interpolation.resize(patchNr);
GLuint i = patchNr-1;
// _patch[i].SetData(0,0,x,y,0.0);
// _patch[i].SetData(0,1,x,y+1.0,0.0);
// _patch[i].SetData(0,2,x,y+2.0,0.0);
// _patch[i].SetData(0,3,x,y+3.0,0.0);
// _patch[i].SetData(1,0,x+1.0,y,0.0);
// _patch[i].SetData(1,1,x+1.0,y+1.0,1.0);
// _patch[i].SetData(1,2,x+1.0,y+2.0,0.0);
// _patch[i].SetData(1,3,x+1.0,y+3.0,2.0);
// _patch[i].SetData(2,0,x+2.0,y,0.0);
// _patch[i].SetData(2,1,x+2.0,y+1.0,0.0);
// _patch[i].SetData(2,2,x+2.0,y+2.0,1.0);
// _patch[i].SetData(2,3,x+2.0,y+3.0,0.0);
// _patch[i].SetData(3,0,x+3.0,y,0.0);
// _patch[i].SetData(3,1,x+3.0,y+1.0,0.0);
// _patch[i].SetData(3,2,x+3.0,y+2.0,0.0);
// _patch[i].SetData(3,3,x+3.0,y+3.0,0.0);
//Random
int z;
int q=3,p=1;
z=rand()%q-p;
_patch[i].SetData(0,0,x,y,z);
z=rand()%q-p;
_patch[i].SetData(0,1,x,y+1.0,z);
z=rand()%q-p;
_patch[i].SetData(0,2,x,y+2.0,z);
z=rand()%q-p;
_patch[i].SetData(0,3,x,y+3.0,z);
z=rand()%q-p;
_patch[i].SetData(1,0,x+1.0,y,z);
z=rand()%q-p;
_patch[i].SetData(1,1,x+1.0,y+1.0,z);
z=rand()%q-p;
_patch[i].SetData(1,2,x+1.0,y+2.0,z);
z=rand()%q-p;
_patch[i].SetData(1,3,x+1.0,y+3.0,z);
z=rand()%q-p;
_patch[i].SetData(2,0,x+2.0,y,z);
z=rand()%q-p;
_patch[i].SetData(2,1,x+2.0,y+1.0,z);
z=rand()%q-p;
_patch[i].SetData(2,2,x+2.0,y+2.0,z);
z=rand()%q-p;
_patch[i].SetData(2,3,x+2.0,y+3.0,z);
z=rand()%q-p;
_patch[i].SetData(3,0,x+3.0,y,z);
z=rand()%q-p;
_patch[i].SetData(3,1,x+3.0,y+1.0,z);
z=rand()%q-p;
_patch[i].SetData(3,2,x+3.0,y+2.0,z);
z=rand()%q-p;
_patch[i].SetData(3,3,x+3.0,y+3.0,z);
_patch[i].UpdateVertexBufferObjectsOfData();
moveBicubicBezierSurface(4,i);
if(was&&i>0) {
int tmp1=firstToJoin;
int tmp2=secondToJoin;
int tmp3=_joinDirectionValue;
secondToJoin=i;
int g=sqrt(i);
if(g*g!=i&&i!=g*g+g){
if(direction%2==1){
firstToJoin=(g-1)*(g-1)-((g+1)*(g+1)-i-1);
if(direction==3){
_joinDirectionValue=2;
}
else if(direction==1){
_joinDirectionValue=3;
}
join();
}
else {
firstToJoin=(g-1)*(g-1)-((g+1)*(g+1)-i-1)+2;
if(direction==4){
_joinDirectionValue=1;
}
else if(direction==2){
_joinDirectionValue=0;
}
join();
}
if(direction==3){
_joinDirectionValue=1;
}
else if(direction==4){
_joinDirectionValue=3;
}
else if(direction==1){
_joinDirectionValue=0;
}
else if(direction==2){
_joinDirectionValue=2;
}
firstToJoin=i-1;
join();
}
else {
if(direction==3){
_joinDirectionValue=1;
}
else if(direction==4){
_joinDirectionValue=3;
}
else if(direction==1){
_joinDirectionValue=0;
}
else if(direction==2){
_joinDirectionValue=2;
}
firstToJoin=i-1;
join();
}
firstToJoin=tmp1;
secondToJoin=tmp2;
_joinDirectionValue=tmp3;
}
_u_isoline.resize(patchNr);
_v_isoline.resize(patchNr);
// BicubicBezierPatch.GenerateUIsoparametricLines()
_u_isoline[i]=_patch[i].GenerateUIsoparametricLines(30,1,30);
_v_isoline[i]=_patch[i].GenerateVIsoparametricLines(25,1,30);
for(int k=0;k<_u_isoline[i]->GetColumnCount();++k) {
(*_u_isoline[i])[k]->UpdateVertexBufferObjects();
}
for(int k=0;k<_v_isoline[i]->GetColumnCount();++k) {
(*_v_isoline[i])[k]->UpdateVertexBufferObjects(GL_STATIC_DRAW,0.1);
}
}
void GLWidget::setX(int x){
this->indexX = x;
}
void GLWidget::setY(int y){
this->indexY=y;
}
void GLWidget::addNewMesh(){
addNewBicubicBezierSurface(indexX,indexY);
}
void GLWidget::set_show_control_net(bool value){
showControlNet=value;
updateGL();
}
void GLWidget::set_after_interpolation(bool value){
showAfterInterpolation=value;
updateGL();
}
void GLWidget::set_before_interpolation(bool value){
showBeforeInterpolation=value;
updateGL();
}
void GLWidget::setFirstToJoin(int first){
firstToJoin=first;
}
void GLWidget::setSecondToJoin(int second){
secondToJoin=second;
}
void GLWidget::setMovingID(int mID){
movingID=mID;
}
void GLWidget::moveLeft(){
moveBicubicBezierSurface(0,movingID);
updateGL();
}
void GLWidget::moveRight(){
moveBicubicBezierSurface(1,movingID);
updateGL();
}
void GLWidget::moveDown(){
moveBicubicBezierSurface(2,movingID);
updateGL();
}
void GLWidget::moveUp(){
moveBicubicBezierSurface(3,movingID);
updateGL();
}
void GLWidget::moveBicubicBezierSurface(int dir, GLint i){
if(i>=patchNr) {
return;
}
switch(dir){
case 0:
for(GLuint row=0;row<4;++row){
for(GLuint column=0;column<4;++column){
GLdouble xx,yy,zz;
_patch[i].GetData(row,column,xx,yy,zz);
_patch[i].SetData(row,column,xx-1,yy,zz);
}
}
break;
case 1:
for(GLuint row=0;row<4;++row){
for(GLuint column=0;column<4;++column){
GLdouble xx,yy,zz;
_patch[i].GetData(row,column,xx,yy,zz);
_patch[i].SetData(row,column,xx+1,yy,zz);
}
}
break;
case 2:
for(GLuint row=0;row<4;++row){
for(GLuint column=0;column<4;++column){
GLdouble xx,yy,zz;
_patch[i].GetData(row,column,xx,yy,zz);
_patch[i].SetData(row,column,xx,yy-1,zz);
}
}
break;
case 3:
for(GLuint row=0;row<4;++row){
for(GLuint column=0;column<4;++column){
GLdouble xx,yy,zz;
_patch[i].GetData(row,column,xx,yy,zz);
_patch[i].SetData(row,column,xx,yy+1,zz);
}
}
break;
}
_patch[i].UpdateVertexBufferObjectsOfData();
//generatethemeshofthesurface_patch
_before_interpolation[i]=_patch[i].GenerateImage(30,30,GL_STATIC_DRAW);
if(_before_interpolation[i])
_before_interpolation[i]->UpdateVertexBufferObjects();
//defineaninterpolationproblem:
//1:createaknotvectorinu-direction
RowMatrix<GLdouble> u_knot_vektor(4);
u_knot_vektor(0)=0.0;
u_knot_vektor(1)=1.0/3.0;
u_knot_vektor(2)=2.0/3.0;
u_knot_vektor(3)=1.0;
//2:createaknotvectorinv-direction
ColumnMatrix<GLdouble>v_knot_vektor(4);
v_knot_vektor(0)=0.0;
v_knot_vektor(1)=1.0/3.0;
v_knot_vektor(2)=2.0/3.0;
v_knot_vektor(3)=1.0;
//3:defineamatrixofdata_points,e.}.setthemtotheoriginalcontrolpoints
Matrix<DCoordinate3> data_points_to_interpolate(4,4);
for(GLuint row=0;row<4;++row)
for(GLuint column=0;column<4;++column){
_patch[i].GetData(row,column,data_points_to_interpolate(row,column));
_patch[i].GetData(row,column,_data_points[i](row,column));
}
//4:solvetheinterpolationproblemandgeneratethemeshoftheinterpolating_patch
if(_patch[i].UpdateDataForInterpolation(u_knot_vektor,v_knot_vektor,data_points_to_interpolate))
{
_after_interpolation[i] = _patch[i].GenerateImage(30,30,GL_STATIC_DRAW);
if(_after_interpolation[i])
_after_interpolation[i]->UpdateVertexBufferObjects();
}
for(GLuint row=0;row<4;++row)
for(GLuint column=0;column<4;++column){
_patch[i].SetData(row,column,_data_points[i](row,column));
}
updateGL();
}
void GLWidget::join(){
int first = firstToJoin, second =secondToJoin;
join(first,second,_joinDirectionValue);
}
void GLWidget::join(int first,int second,int joinDirectionValue){
for (int i = 0; i < 4; ++i)
{
switch (joinDirectionValue)
{
case 0:
//North
_patch[second](i, 1) = 2*_patch[first](i, 3) - _patch[first](i, 2);
_patch[second](i, 0) = _patch[first](i, 3);
_patch[first].north=second;
_patch[second].south=first;
break;
case 1:
//South
_patch[second](i, 2) = 2*_patch[first](i, 0) - _patch[first](i, 1);
_patch[second](i, 3) = _patch[first](i, 0);
_patch[first].south=second;
_patch[second].north=first;
break;
case 2:
//East
_patch[second](1, i) = 2*_patch[first](3, i) - _patch[first](2, i);
_patch[second](0, i) = _patch[first](3, i);
_patch[first].east=second;
_patch[second].west=first;
break;
case 3:
//West
_patch[second](2, i) = 2*_patch[first](0, i) - _patch[first](1, i);
_patch[second](3, i) = _patch[first](0, i);
_patch[first].west=second;
_patch[second].east=first;
break;
default:
return;
}
}
// patchUpdate(first);
patchUpdate(second);
}
void GLWidget::patchUpdate(int i) {
_patch[i].UpdateVertexBufferObjectsOfData();
//generatethemeshofthesurface_patch
_before_interpolation[i]=_patch[i].GenerateImage(30,30,GL_STATIC_DRAW);
if(_before_interpolation[i])
_before_interpolation[i]->UpdateVertexBufferObjects();
//defineaninterpolationproblem:
//1:createaknotvectorinu-direction
RowMatrix<GLdouble> u_knot_vektor(4);
u_knot_vektor(0)=0.0;
u_knot_vektor(1)=1.0/3.0;
u_knot_vektor(2)=2.0/3.0;
u_knot_vektor(3)=1.0;
//2:createaknotvectorinv-direction
ColumnMatrix<GLdouble>v_knot_vektor(4);
v_knot_vektor(0)=0.0;
v_knot_vektor(1)=1.0/3.0;
v_knot_vektor(2)=2.0/3.0;
v_knot_vektor(3)=1.0;
//3:defineamatrixofdata_points,e.}.setthemtotheoriginalcontrolpoints
Matrix<DCoordinate3> data_points_to_interpolate(4,4);
for(GLuint row=0;row<4;++row)
for(GLuint column=0;column<4;++column){
_patch[i].GetData(row,column,data_points_to_interpolate(row,column));
_patch[i].GetData(row,column,_data_points[i](row,column));
}
//4:solvetheinterpolationproblemandgeneratethemeshoftheinterpolating_patch
if(_patch[i].UpdateDataForInterpolation(u_knot_vektor,v_knot_vektor,data_points_to_interpolate))
{
_after_interpolation[i] = _patch[i].GenerateImage(30,30,GL_STATIC_DRAW);
if(_after_interpolation[i])
_after_interpolation[i]->UpdateVertexBufferObjects();
}
for(GLuint row=0;row<4;++row)
for(GLuint column=0;column<4;++column){
_patch[i].SetData(row,column,_data_points[i](row,column));
}
updateGL();
}
void GLWidget::setMaterialIndex(int value) {
if(selectedMaterial!=value){
selectedMaterial=value;
updateGL();
}
}
void GLWidget::setChangeControlIndexPatch(int i){
changeControlIndexPatch=i;
}
void GLWidget::setChangeControlIndexI(int i){
changeControlIndexI=i;
}
void GLWidget::setChangeControlIndexJ(int j){
changeControlIndexJ=j;
}
void GLWidget::onUpChangeControl() {
modifyZ(0.1,true);
}
void GLWidget::onDownChangeControl() {
modifyZ(-0.1,true);
}
void GLWidget::modifyZ(GLdouble z,bool first){
GLint i = changeControlIndexPatch;
GLdouble xx, yy, zz;
_patch[i].GetData(changeControlIndexI,changeControlIndexJ,xx,yy,zz);
_patch[i].SetData(changeControlIndexI,changeControlIndexJ,xx,yy,zz+z);
if(first){
if(changeControlIndexI==0) {
if(_patch[i].west!=-1) {
changeControlIndexPatch=_patch[i].west;
changeControlIndexI=3;
modifyZ(z,false);
changeControlIndexI=0;
changeControlIndexPatch=i;
}
}
if(changeControlIndexJ==0) {
if(_patch[i].south!=-1) {
changeControlIndexPatch=_patch[i].south;
changeControlIndexJ=3;
modifyZ(z,false);
join(i,changeControlIndexPatch,1);
changeControlIndexJ=0;
changeControlIndexPatch=i;
}
}
if(changeControlIndexI==3) {
if(_patch[i].east!=-1) {
changeControlIndexI=0;
changeControlIndexPatch=_patch[i].east;
modifyZ(z,false);
// join(i,changeControlIndexPatch,2);
changeControlIndexI=3;
changeControlIndexPatch=i;
}
}
if(changeControlIndexJ==3) {
if(_patch[i].north!=-1) {
changeControlIndexPatch=_patch[i].north;
changeControlIndexJ=0;
modifyZ(z,false);
// join(i,changeControlIndexPatch,0);
changeControlIndexJ=3;
changeControlIndexPatch=i;
}
}
if(_patch[i].west!=-1) {
join(i,_patch[i].west,3);
}
if(_patch[i].north!=-1) {
join(i,_patch[i].north,0);
}
if(_patch[i].south!=-1) {
join(i,_patch[i].south,1);
}
if(_patch[i].east!=-1) {
join(i,_patch[i].east,2);
}
}
// else {
// if(changeControlIndexI==0) {
// if(_patch[i].west!=-1) {
// changeControlIndexPatch=_patch[i].west;
// join(i,changeControlIndexPatch,3);
// changeControlIndexPatch=i;
// }
// }
// if(changeControlIndexJ==0) {
// if(_patch[i].south!=-1) {
// changeControlIndexPatch=_patch[i].south;
// join(i,changeControlIndexPatch,1);
// changeControlIndexPatch=i;
// }
// }
// if(changeControlIndexI==3) {
// if(_patch[i].east!=-1) {
// changeControlIndexPatch=_patch[i].east;
// join(i,changeControlIndexPatch,2);
// changeControlIndexPatch=i;
// }
// }
// if(changeControlIndexJ==3) {
// if(_patch[i].north!=-1) {
// changeControlIndexPatch=_patch[i].north;
// join(i,changeControlIndexPatch,0);
// changeControlIndexPatch=i;
// }
// }
// }
_patch[i].UpdateVertexBufferObjectsOfData();
//generatethemeshofthesurface_patch
_before_interpolation[i]=_patch[i].GenerateImage(30,30,GL_STATIC_DRAW);
if(_before_interpolation[i])
_before_interpolation[i]->UpdateVertexBufferObjects();
//defineaninterpolationproblem:
//1:createaknotvectorinu-direction
RowMatrix<GLdouble> u_knot_vektor(4);
u_knot_vektor(0)=0.0;
u_knot_vektor(1)=1.0/3.0;
u_knot_vektor(2)=2.0/3.0;
u_knot_vektor(3)=1.0;
//2:createaknotvectorinv-direction
ColumnMatrix<GLdouble>v_knot_vektor(4);
v_knot_vektor(0)=0.0;
v_knot_vektor(1)=1.0/3.0;
v_knot_vektor(2)=2.0/3.0;
v_knot_vektor(3)=1.0;
//3:defineamatrixofdata_points,e.}.setthemtotheoriginalcontrolpoints
Matrix<DCoordinate3> data_points_to_interpolate(4,4);
for(GLuint row=0;row<4;++row)
for(GLuint column=0;column<4;++column){
_patch[i].GetData(row,column,data_points_to_interpolate(row,column));
_patch[i].GetData(row,column,_data_points[i](row,column));
}
//4:solvetheinterpolationproblemandgeneratethemeshoftheinterpolating_patch
if(_patch[i].UpdateDataForInterpolation(u_knot_vektor,v_knot_vektor,data_points_to_interpolate))
{
_after_interpolation[i] = _patch[i].GenerateImage(30,30,GL_STATIC_DRAW);
if(_after_interpolation[i])
_after_interpolation[i]->UpdateVertexBufferObjects();
}
for(GLuint row=0;row<4;++row)
for(GLuint column=0;column<4;++column){
_patch[i].SetData(row,column,_data_points[i](row,column));
}
if(first){
updateGL();
}
}
void GLWidget::setShowUV(bool value) {
showUV=value;
updateGL();
}
}
|
a22dca6ef019a3ce0191a9128d4e64d22407713c | e8625cb62ad86482da226492cd22e19a7cfa0972 | /D2EngineFileWorker/Test/Test.cpp | 2a20ddd7af0a0cb2f9b74b87491cf57dce306e65 | [] | no_license | herofyf/McsfDj2DEngine | b4856e1d11cad6e1886db3df885c2b510b31ee97 | 0d1e8e1532d90f12ee0c0ad36d42827e69e1a0b0 | refs/heads/master | 2021-01-09T20:09:28.625870 | 2016-12-05T07:25:51 | 2016-12-05T07:25:51 | 62,190,055 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 942 | cpp | Test.cpp | // Test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <ace/ACE.h>
#include "d2engine_netfile_comm.h"
#include "d2engine_netfile_operator.h"
using namespace D2ENGINE_FILEWORKER_NS;
int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
int n;
NetFileOperator *pNetFileOp = NetFileOperator::GetInstance();
pNetFileOp->Initialize("..\\..\\..\\..\\..\\UIH\\bin_debug\\Temp\\CachedNetFiles");
SeriesFilesCache scacheFiles;
scacheFiles.onNewSeriesLoad();
std::string strFileName = "Z:\\ACE64d.lib";
std::string strNewFileName ;
scacheFiles.CacheFile(strFileName, strNewFileName);
//scacheFiles.onNewSeriesLoad();
//strFileName = "E:\\temp\\ddd\ssdf\TraceManager.h";
strFileName = "Z:\\ACE64d.lib";
scacheFiles.CacheFile(strFileName, strNewFileName);
std::cin >> n;
scacheFiles.onNewSeriesLoad();
pNetFileOp->Release();
std::cin >> n;
return 0;
}
|
e61e924786aa2dad6ad01f4193361b817a8cd135 | 766580e63fc7a4fc05605395621903301e22eaca | /v4.1/mensaje.cpp | f98d09ea660e243e8cf32234f843fc7a04e93f8c | [] | no_license | sscanf/mtx15 | 6c4099511a2cedcadbddf1bd4398ef434d4f144e | 58cea778dab6d9db7df76c9e9f83d3ff635eadaa | refs/heads/master | 2020-06-24T01:07:13.518304 | 2019-07-25T11:02:14 | 2019-07-25T11:02:14 | 198,803,069 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,029 | cpp | mensaje.cpp | // Mensaje.cpp : implementation file
//
#include "stdafx.h"
#include "sexshop.h"
#include "Mensaje.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMensaje dialog
CMensaje::CMensaje(CWnd* pParent /*=NULL*/)
: CDialog(CMensaje::IDD, pParent)
{
//{{AFX_DATA_INIT(CMensaje)
m_mensaje = _T("");
//}}AFX_DATA_INIT
}
void CMensaje::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMensaje)
DDX_Text(pDX, IDC_MENSAJE, m_mensaje);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMensaje, CDialog)
//{{AFX_MSG_MAP(CMensaje)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMensaje message handlers
void CMensaje::mensaje(CString mensaje)
{
m_mensaje=mensaje;
UpdateData (FALSE);
}
|
132f610ca4fd73870e79a06edc2cbf09e1ef0c37 | ffa270b91035f35d6028fb7b23fd6937ab3215b5 | /main.cpp | 1029527ff31aed518ac96af61680e55cf9fdc18c | [
"MIT"
] | permissive | lothas/CodingPractice | 53861d5866a7fec34561e82cbe63a9f546d80159 | 1a837c38c1d5ac897d93d3cb9c33347c663db2ac | refs/heads/master | 2020-03-27T08:03:04.807869 | 2016-08-20T10:01:35 | 2016-08-20T10:01:35 | 63,082,508 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,695 | cpp | main.cpp | #include <iostream>
#include <vector>
#include <GL/glut.h>
#include "NavGUI.h"
#include "MobileRobot.h"
#include "A_Star.h"
#include "ParticleFilter.h"
#include "Matrix2D.h"
#define N_PARTICLES 50
using namespace std;
void map_display();
void sense_display();
void keyboard(unsigned char key, int x, int y);
void specialKeys(int key, int x, int y);
void setup_colors(Matrix2D& colors);
void setup_map(Matrix2D& map_mat);
int win_width = 800;
int win_height = 600;
NavGUI nav_gui = NavGUI(win_width, win_height);
NavGUI* NavGUI::this_inst = &nav_gui;
Matrix2D map_mat = Matrix2D(40, 60, 1);
Matrix2D colors = Matrix2D(6, 3, 0);
MobileRobot robot(4, 6, 0);
ParticleFilter pFilt(N_PARTICLES);
A_Star a_star_planner;
int mode = 0;
int main(int argc, char** argv)
{
setup_colors(colors);
setup_map(map_mat);
// Robot initial position
map_mat.data[35][4] = 4;
// Add a target
map_mat.data[2][52] = 5;
// map_mat.print();
// Initialize A* planner
a_star_planner.set_map(&map_mat);
a_star_planner.set_start(4, 4);
a_star_planner.set_target(35, 48);
// Provide robot with physical map
robot.set_map(&map_mat);
// Initialize particles
pFilt.set_robot(&robot);
pFilt.set_gt_map(&map_mat);
pFilt.initialize();
nav_gui.set_ext_display_fcn(map_display);
nav_gui.set_ext_display_fcn2(sense_display);
nav_gui.set_ext_keyboard_fcn(keyboard);
nav_gui.set_ext_special_fcn(specialKeys);
nav_gui.init(argc, argv);
return 0;
}
void map_display() {
nav_gui.drawMatrix(a_star_planner.a_map_mat, &colors);
robot.render();
pFilt.render();
}
void sense_display() {
Matrix2D* sense_mat = robot.rect_sense();
if (sense_mat) {
// sense_mat->print();
nav_gui.drawMatrix(sense_mat, &colors);
}
}
/* ------------ Keyboard Function ---------- */
void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 'm': // Move the robot with arrow keys
mode = 0;
break;
case 'p': // Start planning with A*
mode = 1;
break;
}
}
/* Callback handler for special-key event */
void specialKeys(int key, int x, int y) {
switch (key) {
case GLUT_KEY_RIGHT:
switch (mode) {
case 0:
robot.actuate(ROT_RIGHT);
pFilt.actuate(ROT_RIGHT);
break;
case 1:
a_star_planner.step_fwd();
break;
}
break;
case GLUT_KEY_LEFT:
switch (mode) {
case 0:
robot.actuate(ROT_LEFT);
pFilt.actuate(ROT_LEFT);
break;
case 1:
a_star_planner.step_fwd();
break;
}
break;
case GLUT_KEY_UP:
switch (mode) {
case 0:
robot.actuate(MOVE_FWD);
pFilt.actuate(MOVE_FWD);
break;
}
}
}
void setup_map(Matrix2D& map_mat) {
// ################### Set-up map matrix ###################
for (unsigned int i = 0; i<map_mat.cols; ++i) {
// Add top and bottom map borders
map_mat.data[0][i] = 0;
map_mat.data[map_mat.rows-1][i] = 0;
}
for (unsigned int i = 0; i<map_mat.rows; ++i) {
// Add left and right map borders
map_mat.data[i][0] = 0;
map_mat.data[i][map_mat.cols-1] = 0;
}
for (unsigned int i = 0; i<map_mat.cols; ++i) {
// Add hallways
map_mat.data[8][i] = 0;
map_mat.data[12][i] = 0;
map_mat.data[26][i] = 0;
map_mat.data[30][i] = 0;
}
for (unsigned int i = 0; i<8; ++i) {
// Add room dividers
map_mat.data[i][6] = 0;
map_mat.data[i][18] = 0;
map_mat.data[i][26] = 0;
map_mat.data[i][40] = 0;
}
for (unsigned int i = 12; i<26; ++i) {
// Add room dividers
map_mat.data[i][12] = 0;
map_mat.data[i][32] = 0;
map_mat.data[i][36] = 0;
}
for (unsigned int i = 30; i<map_mat.rows; ++i) {
// Add room dividers
map_mat.data[i][10] = 0;
map_mat.data[i][20] = 0;
map_mat.data[i][30] = 0;
map_mat.data[i][45] = 0;
}
// Open doors
map_mat.data[3][6] = 1; map_mat.data[4][6] = 1; map_mat.data[5][6] = 1;
map_mat.data[8][14] = 1; map_mat.data[8][15] = 1; map_mat.data[8][16] = 1;
map_mat.data[8][21] = 1; map_mat.data[8][22] = 1; map_mat.data[8][23] = 1;
map_mat.data[8][21] = 1; map_mat.data[8][22] = 1; map_mat.data[8][23] = 1;
map_mat.data[8][29] = 1; map_mat.data[8][30] = 1; map_mat.data[8][31] = 1;
map_mat.data[8][48] = 1; map_mat.data[8][49] = 1; map_mat.data[8][50] = 1;
map_mat.data[12][8] = 1; map_mat.data[12][9] = 1; map_mat.data[12][10] = 1;
map_mat.data[12][33] = 1; map_mat.data[12][34] = 1; map_mat.data[12][35] = 1;
map_mat.data[26][8] = 1; map_mat.data[26][9] = 1; map_mat.data[26][10] = 1;
map_mat.data[26][28] = 1; map_mat.data[26][29] = 1; map_mat.data[26][30] = 1;
map_mat.data[26][33] = 1; map_mat.data[26][34] = 1; map_mat.data[26][35] = 1;
map_mat.data[26][38] = 1; map_mat.data[26][39] = 1; map_mat.data[26][40] = 1;
map_mat.data[26][55] = 1; map_mat.data[26][56] = 1; map_mat.data[26][57] = 1;
map_mat.data[30][14] = 1; map_mat.data[30][15] = 1; map_mat.data[30][16] = 1;
map_mat.data[30][33] = 1; map_mat.data[30][34] = 1; map_mat.data[30][35] = 1;
map_mat.data[30][55] = 1; map_mat.data[30][56] = 1; map_mat.data[30][57] = 1;
map_mat.data[32][10] = 1; map_mat.data[33][10] = 1; map_mat.data[34][10] = 1;
map_mat.data[32][20] = 1; map_mat.data[33][20] = 1; map_mat.data[34][20] = 1;
}
void setup_colors(Matrix2D& colors) {
// ################### Set-up colors ###################
// Obstacle color
colors.data[0][0] = 0; colors.data[0][1] = 0; colors.data[0][2] = 0;
// Empty color
colors.data[1][0] = 255; colors.data[1][1] = 255; colors.data[1][2] = 255;
// Algorithm "seen" color
colors.data[2][0] = 0; colors.data[2][1] = 0; colors.data[2][2] = 255;
// Robot path color
colors.data[3][0] = 60; colors.data[3][1] = 200; colors.data[3][2] = 60;
// Robot color
colors.data[4][0] = 120; colors.data[4][1] = 120; colors.data[4][2] = 140;
// Target color
colors.data[5][0] = 200; colors.data[5][1] = 200; colors.data[5][2] = 60;
// colors.print();
}
|
f58765d3434d5f258ae3c360c5ffe15e6382c272 | 2734314d0b13fbee5b1fea37138fece718efaaee | /source_files/quad_tree.cpp | 0e1a67f6a330c8d9d8be77d6a7f94442e518a4b3 | [] | no_license | jackhodgkiss/RAFV | a00183e821f7cc50bf9f69babe239db2c3e3c39d | bfcc284654705176ac66f629debf7f9c46e392c5 | refs/heads/master | 2022-02-18T22:54:59.002764 | 2019-09-14T18:23:29 | 2019-09-14T18:23:29 | 208,454,335 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 661 | cpp | quad_tree.cpp | #include "../header_files/quad_tree.hpp"
#include <iostream>
QuadTree::QuadTree(unsigned short width, unsigned short height,
unsigned short max_level, std::vector<Coordinate>& vault_data)
: width(width), height(height), max_level(max_level), vault_data(vault_data)
{
this->root = std::make_shared<Quadrant>(0, 0, this->width, this->height,
0, this->max_level, this->vault_data, this->tree_map);
this->tree_map.push_back(root);
}
std::vector<int> QuadTree::get_occupants(int index)
{
return this->tree_map.at(index)->get_occupants();
}
Coordinate QuadTree::get_center(int index)
{
return this->tree_map.at(index)->center;
} |
1b97b1594fc35f2a2563be48373991156bedc05f | dd994c1dcf4ac94c15f1ebe4caba322de70b0d9e | /109/Server/GameEngine/Message/TestStruct.cpp | f35a4930fa8f58f335ac6d637993c415952ecca5 | [] | no_license | coderguang/miniGameEngine | 8a870a5b9e4f92065d4cb44a69d44348911382d2 | 93eb522b74c5763941d45d3afdfa6793efeba253 | refs/heads/master | 2022-02-16T07:31:43.983958 | 2019-08-22T09:53:17 | 2019-08-22T09:53:17 | 113,191,648 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,549 | cpp | TestStruct.cpp | #include "TestStruct.h"
#include "engine/rpc/rpcHelper.h"
using namespace csg;
using namespace Message;
void Message::_csg_write(CSerializeStream& __os,ETestStruct __enumType){
__os.write(static_cast<byte_t>(__enumType));
}
void Message::_csg_read(CSerializeStream& __is,ETestStruct& __enumType){
byte_t value;
__is.read(value);
__enumType=static_cast<ETestStruct>(value);
if(__enumType>5||__enumType<1)
{
throw CException("ExceptionCodeSerialize",ExceptionCodeSerialize);
}
}
Message::STestStruct::STestStruct()
{
_csg_init();
}
Message::STestStruct::STestStruct(const STestStruct& __other)
{
if(this==&__other)
{
return;
}
*this=__other;
}
Message::STestStruct& Message::STestStruct::operator=(const STestStruct& __other)
{
if(this==&__other)
{
return *this;
}
IMsgBase::operator=(__other);
a = __other.a;
b = __other.b;
str = __other.str;
ib = __other.ib;
return *this;
}
int Message::STestStruct::getType()const{
return _msgType;
}
csg::IMsgBase* Message::STestStruct::clone()
{
return new STestStruct(*this);
}
bool Message::STestStruct::operator==(const STestStruct& __other)const
{
return !operator!=(__other);
}
bool Message::STestStruct::operator!=(const STestStruct& __other)const
{
if(this==&__other)
{
return false;
}
if(a != __other.a)
{
return true;
}
if(b != __other.b)
{
return true;
}
if(str != __other.str)
{
return true;
}
if(ib != __other.ib)
{
return true;
}
return false;
}
bool Message::STestStruct::operator<(const STestStruct& __other)const
{
if(this==&__other)
{
return false;
}
if(a < __other.a)
{
return true;
}
else if(__other.a<a)
{
return false;
}
if(b < __other.b)
{
return true;
}
else if(__other.b<b)
{
return false;
}
if(str < __other.str)
{
return true;
}
else if(__other.str<str)
{
return false;
}
if(ib < __other.ib)
{
return true;
}
else if(__other.ib<ib)
{
return false;
}
return false;
}
void Message::STestStruct::_csg_init(){
a=0;
b=false;
str="";
ib.clear();
};
void Message::STestStruct::_csg_read(CSerializeStream& __is){
__is.read(a);
__is.read(b);
__is.read(str);
__is.read(ib);
};
void Message::STestStruct::_csg_write(CSerializeStream& __os)const{
__os.write(a);
__os.write(b);
__os.write(str);
__os.write(ib);
};
void Message::CTestStruct::regist()
{
csg::CMsgManager::instance()->regist(new STestStruct());
}
|
4a1502deab038d1565d76fec36692f63c93c3f85 | 67d4b73fa612c33ccd33ab7bd98ebf185ceb4fe2 | /DataMag/PrettyEdit.cpp | 053a8bc9048a26a79f2fd7065b6fa437facb581a | [
"Apache-2.0"
] | permissive | lvan100/DataMag | 5b13086f3fea8c6f6fa3c01bf0ede33b4e1fa0ea | a9995c3af1f08b62d6cb64c9dad43e083f790369 | refs/heads/master | 2020-12-25T17:25:47.013698 | 2016-08-10T09:07:50 | 2016-08-10T09:07:50 | 37,748,519 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,336 | cpp | PrettyEdit.cpp | #include "stdafx.h"
#include "PrettyEdit.h"
IMPLEMENT_DYNAMIC(CPrettyEdit, CEdit)
CPrettyEdit::CPrettyEdit()
: m_bFocused(FALSE)
{
}
CPrettyEdit::~CPrettyEdit()
{
}
BEGIN_MESSAGE_MAP(CPrettyEdit, CEdit)
ON_WM_CREATE()
ON_WM_SETFOCUS()
ON_WM_KILLFOCUS()
ON_WM_ERASEBKGND()
END_MESSAGE_MAP()
int CPrettyEdit::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CEdit::OnCreate(lpCreateStruct) == -1)
return -1;
Init();
return 0;
}
void CPrettyEdit::PreSubclassWindow()
{
CEdit::PreSubclassWindow();
Init();
}
void CPrettyEdit::Init()
{
CRect rc;
GetClientRect(&rc);
CDC* pDC = GetDC();
TEXTMETRIC tm;
pDC->GetTextMetrics(&tm);
int nFontHeight = tm.tmHeight + tm.tmExternalLeading;
int offY = (rc.Height() - nFontHeight) / 2 + 1;
rc.OffsetRect(5,offY);
rc.right -= 11;
SetRectNP(&rc);
ReleaseDC(pDC);
}
BOOL CPrettyEdit::OnEraseBkgnd(CDC* pDC)
{
CRect rcClient;
GetClientRect(rcClient);
CBrush whiteBrush(RGB(255,255,255));
pDC->FillRect(rcClient, &whiteBrush);
if (GetFocus() == this) {
pDC->FrameRect(rcClient, &afxGlobalData.brHilite);
}
return TRUE;
}
void CPrettyEdit::OnSetFocus(CWnd* pOldWnd)
{
CEdit::OnSetFocus(pOldWnd);
m_bFocused = TRUE;
Invalidate(TRUE);
}
void CPrettyEdit::OnKillFocus(CWnd* pNewWnd)
{
CEdit::OnKillFocus(pNewWnd);
m_bFocused = FALSE;
Invalidate(TRUE);
} |
1717ae4774a13eb9308e6e323ee7e91bb3399bb1 | c56e99de42866dc29f283d7f59381e308bff9e1f | /d3dutil.h | 765ab272c397cac19062e5c4814c582bf94eeff0 | [
"MIT"
] | permissive | borybory/OOP_PocketBall | 00131d3106ade28f214283b8768cd4d322b01ac1 | 40b787024f29a077114b7929b468ebf5d941c4fe | refs/heads/master | 2020-09-07T02:02:29.913118 | 2015-11-16T10:49:20 | 2015-11-16T10:49:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,962 | h | d3dutil.h | //-----------------------------------------------------------------------------
// File: D3DUtil.h
//
// Desc: Helper functions and typing shortcuts for Direct3D programming.
//
// Copyright (c) 1997-2001 Microsoft Corporation. All rights reserved
//-----------------------------------------------------------------------------
#ifndef D3DUTIL_H
#define D3DUTIL_H
#include <D3D9.h>
#include <D3DX9Math.h>
//-----------------------------------------------------------------------------
// Name: D3DUtil_InitMaterial()
// Desc: Initializes a D3DMATERIAL9 structure, setting the diffuse and ambient
// colors. It does not set emissive or specular colors.
//-----------------------------------------------------------------------------
VOID D3DUtil_InitMaterial(D3DMATERIAL9& mtrl, FLOAT r = 0.0f, FLOAT g = 0.0f,
FLOAT b = 0.0f, FLOAT a = 1.0f);
//-----------------------------------------------------------------------------
// Name: D3DUtil_InitLight()
// Desc: Initializes a D3DLIGHT structure, setting the light position. The
// diffuse color is set to white, specular and ambient left as black.
//-----------------------------------------------------------------------------
VOID D3DUtil_InitLight(D3DLIGHT9& light, D3DLIGHTTYPE ltType,
FLOAT x = 0.0f, FLOAT y = 0.0f, FLOAT z = 0.0f);
//-----------------------------------------------------------------------------
// Name: D3DUtil_CreateTexture()
// Desc: Helper function to create a texture. It checks the root path first,
// then tries the DXSDK media path (as specified in the system registry).
//-----------------------------------------------------------------------------
HRESULT D3DUtil_CreateTexture(LPDIRECT3DDEVICE9 pd3dDevice, TCHAR* strTexture,
LPDIRECT3DTEXTURE9* ppTexture,
D3DFORMAT d3dFormat = D3DFMT_UNKNOWN);
//-----------------------------------------------------------------------------
// Name: D3DUtil_GetCubeMapViewMatrix()
// Desc: Returns a view matrix for rendering to a face of a cubemap.
//-----------------------------------------------------------------------------
D3DXMATRIX D3DUtil_GetCubeMapViewMatrix(DWORD dwFace);
//-----------------------------------------------------------------------------
// Name: D3DUtil_GetRotationFromCursor()
// Desc: Returns a quaternion for the rotation implied by the window's cursor
// position.
//-----------------------------------------------------------------------------
D3DXQUATERNION D3DUtil_GetRotationFromCursor(HWND hWnd,
FLOAT fTrackBallRadius = 1.0f);
//-----------------------------------------------------------------------------
// Name: D3DUtil_SetDeviceCursor
// Desc: Builds and sets a cursor for the D3D device based on hCursor.
//-----------------------------------------------------------------------------
HRESULT D3DUtil_SetDeviceCursor(LPDIRECT3DDEVICE9 pd3dDevice, HCURSOR hCursor,
BOOL bAddWatermark);
//-----------------------------------------------------------------------------
// Name: class CD3DArcBall
// Desc:
//-----------------------------------------------------------------------------
class CD3DArcBall
{
INT m_iWidth; // ArcBall's window width
INT m_iHeight; // ArcBall's window height
FLOAT m_fRadius; // ArcBall's radius in screen coords
FLOAT m_fRadiusTranslation; // ArcBall's radius for translating the target
D3DXQUATERNION m_qDown; // Quaternion before button down
D3DXQUATERNION m_qNow; // Composite quaternion for current drag
D3DXMATRIXA16 m_matRotation; // Matrix for arcball's orientation
D3DXMATRIXA16 m_matRotationDelta; // Matrix for arcball's orientation
D3DXMATRIXA16 m_matTranslation; // Matrix for arcball's position
D3DXMATRIXA16 m_matTranslationDelta; // Matrix for arcball's position
BOOL m_bDrag; // Whether user is dragging arcball
BOOL m_bRightHanded; // Whether to use RH coordinate system
D3DXVECTOR3 ScreenToVector(int sx, int sy);
public:
LRESULT HandleMouseMessages(HWND, UINT, WPARAM, LPARAM);
D3DXMATRIX* GetRotationMatrix()
{
return &m_matRotation;
}
D3DXMATRIX* GetRotationDeltaMatrix()
{
return &m_matRotationDelta;
}
D3DXMATRIX* GetTranslationMatrix()
{
return &m_matTranslation;
}
D3DXMATRIX* GetTranslationDeltaMatrix()
{
return &m_matTranslationDelta;
}
BOOL IsBeingDragged()
{
return m_bDrag;
}
VOID SetRadius(FLOAT fRadius);
VOID SetWindow(INT w, INT h, FLOAT r = 0.9);
VOID SetRightHanded(BOOL bRightHanded)
{
m_bRightHanded = bRightHanded;
}
CD3DArcBall();
};
//-----------------------------------------------------------------------------
// Name: class CD3DCamera
// Desc:
//-----------------------------------------------------------------------------
class CD3DCamera
{
D3DXVECTOR3 m_vEyePt; // Attributes for view matrix
D3DXVECTOR3 m_vLookatPt;
D3DXVECTOR3 m_vUpVec;
D3DXVECTOR3 m_vView;
D3DXVECTOR3 m_vCross;
D3DXMATRIXA16 m_matView;
D3DXMATRIXA16 m_matBillboard; // Special matrix for billboarding effects
FLOAT m_fFOV; // Attributes for projection matrix
FLOAT m_fAspect;
FLOAT m_fNearPlane;
FLOAT m_fFarPlane;
D3DXMATRIXA16 m_matProj;
public:
// Access functions
D3DXVECTOR3 GetEyePt()
{
return m_vEyePt;
}
D3DXVECTOR3 GetLookatPt()
{
return m_vLookatPt;
}
D3DXVECTOR3 GetUpVec()
{
return m_vUpVec;
}
D3DXVECTOR3 GetViewDir()
{
return m_vView;
}
D3DXVECTOR3 GetCross()
{
return m_vCross;
}
D3DXMATRIX GetViewMatrix()
{
return m_matView;
}
D3DXMATRIX GetBillboardMatrix()
{
return m_matBillboard;
}
D3DXMATRIX GetProjMatrix()
{
return m_matProj;
}
VOID SetViewParams(D3DXVECTOR3& vEyePt, D3DXVECTOR3& vLookatPt,
D3DXVECTOR3& vUpVec);
VOID SetProjParams(FLOAT fFOV, FLOAT fAspect, FLOAT fNearPlane,
FLOAT fFarPlane);
CD3DCamera();
};
#endif // D3DUTIL_H
|
e107cf579dd12b8b80096447cf63e987d870caaa | 6f5febee7108d328864679b06af918a912b09831 | /src/l1_transport/tcp/tcp-transport.h | 50db61dcd0b3a93574ff9b71de5dc09899b15bd7 | [
"MIT"
] | permissive | dapaulid/libremo | 7b816cff22ba5af3d078fc5c7014fdf1c06e00cc | 3aa1da6ed13586e842906f21c2eb4c82fec716fe | refs/heads/master | 2020-09-06T20:57:40.254397 | 2020-04-15T14:30:41 | 2020-04-15T14:30:41 | 220,548,548 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,714 | h | tcp-transport.h | //------------------------------------------------------------------------------
/**
* @license
* Copyright (c) Daniel Pauli <dapaulid@gmail.com>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
//------------------------------------------------------------------------------
#pragma once
//------------------------------------------------------------------------------
// includes
//------------------------------------------------------------------------------
//
// project
#include "l1_transport/transport.h"
#include "l0_system/socket.h"
#include "l0_system/worker.h"
#include "tcp-channel.h"
//
// C++
//
//
//------------------------------------------------------------------------------
namespace remo {
namespace trans {
//------------------------------------------------------------------------------
using namespace sys;
//------------------------------------------------------------------------------
// forward declarations
//------------------------------------------------------------------------------
//
class TcpTransport;
//------------------------------------------------------------------------------
// helper class declaration
//------------------------------------------------------------------------------
//
/**
* This class handles the actual socket communication for all our channels.
*
* The functionality is separated from TcpTransport in order to avoid
* concurrent access to member variables.
*/
class TcpThread: public Worker
{
// ctor/dtor
public:
TcpThread(TcpTransport* a_transport);
virtual ~TcpThread();
//! add a channel to be handled by this thread
//! takes ownership
void add_channel(TcpChannel* a_channel);
void remove_channel(TcpChannel* a_channel);
void shutdown() override;
// protected member functions
protected:
//! handle communication
virtual void action() override;
//! handle startup/shutdown
virtual void do_startup() override;
virtual void do_shutdown() override;
//! called when server socket is ready to accept a new connection
void handle_incoming_connection();
//! called when the receiving end of the "pseudo queue" is ready to receive
void handle_cmd();
//! internal add channel
void do_add_channel(TcpChannel* a_channel);
// private members
private:
//! our transport controller (owner)
TcpTransport* m_transport;
//! sockets handled by this thread
SocketSet m_sockets;
//! socket for accepting incoming connections
Socket m_serversock;
//! sockets used as "pseudo-queue" for poor man's inter-thread communication
Socket m_ctrl_in;
Socket m_ctrl_out;
};
//------------------------------------------------------------------------------
// class declaration
//------------------------------------------------------------------------------
//
class TcpTransport: public Transport
{
// types
public:
//! class specific settings go here
struct Settings: public Transport::Settings {
//! "server" socket address
SockAddr listen_addr = SockAddr(":1986");
} settings;
// ctor/dtor
public:
TcpTransport(const Settings& a_settings);
virtual ~TcpTransport();
// public member functions
public:
//! create a new channel that connects to the given endpoint
virtual Channel* connect(const std::string& a_endpoint) override;
//! handle close event
virtual void closed(Channel* a_channel) override;
// private members
private:
//! worker thread doing the socket communication
TcpThread m_thread;
};
//------------------------------------------------------------------------------
} // end namespace trans
} // end namespace remo
//------------------------------------------------------------------------------
|
d36ea4c6a4055fde8ad12e7b46ab0e1154229e1b | c801f272839fb6fe2e3f2dfee9e433bfe872e8ac | /inc/imguiWindows/spriteInfoIMGUI.h | b91e15ba87e3bf8c5865a1c03787938f98db2308 | [] | no_license | MrWisski/DorkestEngine | 171a88d674ce2856ab466e39619b8bda25c7f927 | 97660822d8acdb0fb900d2edd26a653a736de65e | refs/heads/master | 2023-07-18T11:11:50.022807 | 2021-09-06T15:10:36 | 2021-09-06T15:10:36 | 370,745,490 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,155 | h | spriteInfoIMGUI.h | #pragma once
#include <imgui.h>
#include <imgui-SFML.h>
#include <Util/Math/Vector2.h>
#include <array>
class spriteInfo {
public:
void render(Vector2i windowSize)
{
if (this->vis) {
*open = true;
this->Draw("Sprite Data", open, windowSize);
if (*open == false) {
this->vis = false;
}
}
}
void show()
{
this->vis = true;
}
void hide()
{
this->vis = false;
}
void toggleShowHide()
{
this->vis = !this->vis;
}
spriteInfo() {
open = new bool(false);
for (size_t x = 0; x < 16; x++) name.at(x) = std::string("").c_str()[x];
for (size_t x = 0; x < 16; x++) altGroup.at(x) = std::string("").c_str()[x];
locx = 0; locy = 0;
scale = 1.0f;
vis = false;
}
~spriteInfo() {
}
void clear() {
for (size_t x = 0; x < 16; x++) name.at(x) = std::string("").c_str()[x];
for (size_t x = 0; x < 16; x++) altGroup.at(x) = std::string("").c_str()[x];
for (size_t x = 0; x < 16; x++) threeByGroup.at(x) = std::string("").c_str()[x];
c[0] = 1;
c[1] = 1;
c[2] = 1;
c[3] = 1;
scale = 1.0f;
is3x3 = false;
}
void setName(std::string newname) {
for (size_t x = 0; x < 16; x++) {
if (x < newname.length()) {
name.at(x) = newname.c_str()[x];
}
else {
name.at(x) = std::string("").c_str()[x];
}
}
}
std::string getName() {
return std::string(name.data());
}
void setAltGroup(std::string newgroup) {
for (size_t x = 0; x < 16; x++) {
if (x < newgroup.length()) {
altGroup.at(x) = newgroup.c_str()[x];
}
else {
altGroup.at(x) = std::string("").c_str()[x];
}
}
}
std::string getAltGroup() {
return std::string(altGroup.data());
}
std::string get3x3GroupName() {
return std::string(threeByGroup.data());
}
void set3x3GroupName(std::string newName) {
for (size_t x = 0; x < 16; x++) {
if (x < newName.length()) {
altGroup.at(x) = newName.c_str()[x];
}
else {
altGroup.at(x) = std::string("").c_str()[x];
}
}
}
bool getIs3x3() { return is3x3; }
void setIs3x3(bool newState) {
is3x3 = newState;
}
std::array<char, 16> name;
std::string namestr;
std::array<char, 16> altGroup;
std::array<char, 16> threeByGroup;
bool is3x3 = false;
std::string altGroupstr;
int locx, locy;
float c[4] = { 1,1,1,1 };
float scale;
private:
bool vis;
bool* open;
void Draw(const char* title, bool* p_open, Vector2i w) {
ImGui::SetNextWindowSize(ImVec2(300, 300), ImGuiCond_Always);// ImGuiCond_FirstUseEver);
ImGui::SetNextWindowPos(ImVec2(w.x - 300, 0), ImGuiCond_Always);
if (!ImGui::Begin(title, p_open))
{
ImGui::End();
return;
}
ImGui::Text("Sprite Name");
ImGui::InputText("", name.data(), 16);
std::string t = "Location" + std::to_string(locx) + ", " + std::to_string(locy);
ImGui::Text(t.c_str());
ImGui::Text("Default Tint Color");
ImGui::ColorEdit4(" ", c);
ImGui::Text("Scale Factor");
ImGui::InputFloat(" ", &scale);
ImGui::Text("Alt-Group Name");
ImGui::InputText(" ", altGroup.data(), 16);
ImGui::Checkbox("Is 3x3", &is3x3);
ImGui::Text("3x3 Group Name");
ImGui::InputText(" ", threeByGroup.data(), 16);
ImGui::End();
}
}; |
5b1dfd8cc4c1e7bd21c00b415f975d93873199a6 | cec5605082eccbdf421ea894a61442340ab13506 | /source/classes/decoder.cpp | 7b63cbd9087c5441bc13090791f2ce53ee01e642 | [] | no_license | bjarmi/PA3-Data_Compression | 21390a0a5f60190bc09cdba72ba82ce3f97d410b | 5363375957f0d85d0dc8fbe1d657835d952ca899 | refs/heads/master | 2023-03-11T21:53:00.003765 | 2021-02-28T23:57:33 | 2021-02-28T23:57:33 | 342,288,156 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,443 | cpp | decoder.cpp | #include <string>
#include <map>
#include <fstream>
#include <sstream>
#include <iostream>
#include "../headers/decoder.h"
Decoder::Decoder(std::map<std::string, std::string> lexicon,
std::string input_file, std::string output_file)
{
_lexicon = std::move(lexicon);
_input_file = std::move(input_file);
_output_file = std::move(output_file);
_decode();
}
Decoder::Decoder(std::string input_file, std::string output_file)
{
_input_file = std::move(input_file);
_output_file = std::move(output_file);
_get_lexicon();
_parse_encoding();
}
// Initiate decoding instructions.
void Decoder::_decode()
{
_write_lexicon();
_parse_encoding();
}
// Read lexicon from file header.
std::map<std::string, std::string> Decoder::_get_lexicon()
{
std::map<std::string, std::string> payload;
std::string key, value;
std::ifstream file(_input_file);
if (file.is_open())
{
while (file >> key >> value)
payload[key] = value;
file.close();
return payload;
}
throw std::runtime_error("Couldn't open input file.");
}
// Decode from input_file to output_file with the lexicon.
void Decoder::_parse_encoding()
{
try
{
std::ifstream in_file(_input_file);
std::string buffer;
int start_index = _get_code_start_index() + 1;
in_file.seekg(start_index);
_parse(in_file, buffer);
}
catch (std::ifstream::failure& error)
{
throw error;
}
}
// Attempt to parse an encoded symbol.
void Decoder::_parse(std::ifstream& in_file, std::string& buffer)
{
char symbol;
while (in_file >> symbol)
{
buffer.append(reinterpret_cast<const char*>(symbol));
if (_lexicon.count(buffer))
{
_write(buffer);
buffer.clear();
}
}
}
// Write lexicon to file.
void Decoder::_write_lexicon()
{
std::ostringstream payload;
for (auto const& pair : _lexicon)
payload << pair.first << " " << pair.second << "\n";
payload << "\\\n";
_write(payload.str());
}
// Write code to file.
void Decoder::_write(const std::string& text)
{
std::ofstream file(_output_file, std::ios::app);
if (file.is_open())
{
file << text;
file.close();
return;
}
throw std::runtime_error("Couldn't open output file.");
}
// Returns the index that marks where the code in the input file starts.
int Decoder::_get_code_start_index()
{
std::ifstream file(_input_file);
char symbol;
while (file >> symbol)
if (symbol == '\\')
return file.tellg();
throw std::runtime_error("Couldn't find separator.");
}
|
64ebbf115f238619a10f50f601e2dd137501e613 | 83fdff0ba5625a98ad74a59b6d87e076f65871fe | /Solution/Problem_000616/p616.cpp | 2a78636d75eb2d01543bf364d43fb7addcb203be | [] | no_license | offamitkumar/UVA--Online-Judge | 96039f5126138e2ce7aab56e01fde1f877fdc989 | 4707597e8e5f9b8c2f78badbf929a1952176c717 | refs/heads/master | 2021-10-31T01:25:29.119866 | 2021-10-07T07:32:53 | 2021-10-07T07:32:53 | 236,480,892 | 4 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,624 | cpp | p616.cpp | #include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <queue>
#include <stack>
#include <string>
#include <cstring>
#include <cmath>
#include <map>
#include <vector>
#include <array>
#include <set>
#include <climits>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <bitset>
#include <numeric>
using namespace std;
using namespace __gnu_pbds;
typedef tree< // find_by_order & order_of_key
long long ,
null_type ,
less<long long> ,
rb_tree_tag ,
tree_order_statistics_node_update
> new_set;
#define MOD 1000000007
int main(void){
#ifdef HELL_JUDGE
freopen("input","r",stdin);
freopen("output","w",stdout);
freopen("error","w",stderr);
#endif
long long n;
auto check = [](long long i , long long n){
long long sum{};
for(long long j=0;j<i;++j){
if(n%i!=1){
return false;
}
n-=1;
sum+=(n/i);
n-=(n/i);
}
if((n)%i!=0){
return false;
}
return true;
};
while(cin>>n && n!=-1){
bool answer_found = false;
long long i;
for(i=(sqrt(n)+1); i>=1; --i){
if(check(i , n)){
answer_found = true;
goto output;
}
}
output:
if(answer_found){
cout<<n<<" coconuts, "<<i<<" people and 1 monkey\n";
}else
cout<<n<<" coconuts, no solution\n";
}
return 0;
}
|
fadbbca8fb69e4e37fe9a8141e0fdc50b568e744 | 3322a7cafeeeaebafb9e361b78a42aef307940b2 | /cf959B.cpp | 718fcda2f13f90ab43bf6a053b27b8790d07c21f | [] | no_license | gou4shi1/oj | 7b75318722567d2aa8c4c5f15ebd5d48c8d8d5e9 | 50be1c73b497b95e10204801bbfd984bbc266eb4 | refs/heads/master | 2020-03-20T23:12:21.232950 | 2018-07-06T14:00:42 | 2018-07-06T14:00:42 | 137,834,894 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,766 | cpp | cf959B.cpp | /************************************************************************
* File Name : cf959B.cpp
* Purpose : dsu
* Creation Date : 2018年04月15日
* Last Modified : 2018年04月15日 星期日 22时09分38秒
* Created By : admin@goushi.me
************************************************************************/
#include <bits/stdc++.h>
using namespace std;
// const
const int N = 100000 + 10;
const int INF = 0x3f3f3f3f;
const int _INF = 0x80000000;
const int MOD = 1000000000 + 7;
const double EPS = 1E-8;
// long long
typedef long long LL;
#ifdef _WIN32
#define lld I64d
#endif
// vector
typedef vector<int> VI;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
// pair
typedef pair<int, int> PII;
#define mp make_pair
#define fi first
#define se second
#define mst(a,x) memset(a,x,sizeof(a))
int n, k, m;
int a[N];
map<string, int> _map;
// dsu
int fa[N];
void init() {
for (int i = 0; i <= n; ++i)
fa[i] = i;
}
int find(int u) {
return fa[u] == u ? u : fa[u] = find(fa[u]);
}
void unin(int u, int v) {
int fu = find(u), fv = find(v);
a[fv] = min(a[fv], a[fu]);
fa[fu] = fv;
}
int main() {
#ifdef LOCAL
freopen("in", "r", stdin);
#endif
cin >> n >> k >> m;
init();
for (int i = 1; i <= n; ++i) {
string w;
cin >> w;
_map[w] = i;
}
for (int i = 1; i <= n; ++i) {
cin >> a[i];
}
for (int i = 1; i <= k; ++i) {
int x, t0, t;
cin >> x >> t0;
while (--x) {
cin >> t;
unin(t0, t);
}
}
LL sum = 0;
for (int i = 1; i <= m; ++i) {
string w;
cin >> w;
sum += a[find(_map[w])];
}
cout << sum << endl;
return 0;
}
|
76128a3ce7b1f74e632f827fe7ff539313b08c55 | 046ceee5bc174f836411450f51ebc9139535e88d | /src/CollisionCallback.cpp | 3e453d6626f98b339d60891ae52dcce8af805d28 | [] | no_license | xubingyue/supermaritimekart | 81723189a5041882064eed0a179447196779bada | f1a04df33baf08940ff1c04d7fe02e4f9f0b7413 | refs/heads/master | 2021-01-18T10:32:07.505638 | 2011-06-16T18:41:35 | 2011-06-16T18:41:35 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,517 | cpp | CollisionCallback.cpp | #include <ode/ode.h>
#include <dtCore/transformable.h>
#include <dtCore/physical.h>
#include <dtCore/odecontroller.h>
//Coulomb friction coefficient. This must be in the range 0 to dInfinity.
//0 results in a frictionless contact, and dInfinity results in a contact that never slips.
const double kMu = 100.0;
// Restitution parameter (0..1). 0 means the surfaces are not bouncy at all, 1 is maximum bouncyness.
const double kBounce = 0.01;
//The minimum incoming velocity necessary for bounce. Incoming velocities
//below this will effectively have a bounce parameter of 0.
const double kBounceVel = 0.01;
////////////////////////////////////////////////////////////////////////////////
//static
void nearCallback(void *data, dGeomID o1, dGeomID o2)
{
if (o1 == 0 || o2 == 0)
{
//no geometry
return;
}
dtCore::Transformable* c1 = static_cast<dtCore::Transformable*>(dGeomGetData(o1));
dtCore::Transformable* c2 = static_cast<dtCore::Transformable*>(dGeomGetData(o2));
dtCore::ODEController* odeControl = static_cast<dtCore::ODEController*>(data);
const int N = 4;
dContactGeom contactGeoms[N];
int numContacts = dCollide (o1, o2, N, contactGeoms, sizeof(dContactGeom));
if (numContacts > 0 && c1 != NULL && c2 != NULL)
{
dContact contact;
for (int i=0; i<numContacts; i++)
{
contact.surface.mode = dContactBounce;
contact.surface.mu = (dReal)kMu;
contact.surface.bounce = (dReal)kBounce;
contact.surface.bounce_vel = (dReal)kBounceVel;
contact.geom = contactGeoms[i];
// Make sure to call these both, because in the case of
// Trigger, meaningful stuff happens even if the return
// is false.
if (c1->FilterContact(&contact, c2) && c2->FilterContact(&contact, c1))
{
dtCore::Physical* p1 = dynamic_cast<dtCore::Physical*>(c1);
dtCore::Physical* p2 = dynamic_cast<dtCore::Physical*>(c2);
if (p1 != NULL || p2 != NULL)
{
dJointID joint = dJointCreateContact(odeControl->GetWorldID(),
odeControl->GetContactJointGroupID(),
&contact);
dJointAttach(joint,
p1->DynamicsEnabled() ? p1->GetBodyID() : 0,
p2->DynamicsEnabled() ? p2->GetBodyID() : 0);
}
}
}
}
}
|
a6768780ff31c09255922960b41ce3bf045b48d3 | 4ac4d0379cbe17886b3ec9c1648805d4d97f07b0 | /lecture_example/DAY4/5_move11.cpp | 221693cbd3e383bf1f34be678a5a4ee547f3e9f6 | [] | no_license | nado6miri/cpp_idioms | 1708c61d944e1908b07bac20da6b64916bc67385 | 400ad8cac1a7a841376cf52b5a792ffa9989df56 | refs/heads/master | 2020-06-13T21:20:10.566602 | 2019-07-26T03:11:29 | 2019-07-26T03:11:29 | 194,790,340 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 2,761 | cpp | 5_move11.cpp | #include <iostream>
#include <string>
#include <vector>
// noexcept 지시어 : 함수가 예외가 없음(있음)을 알리는 것
// void foo() noexcept
// void foo() noexcept(true)
// void foo() noexcept(false)
// noexcept 연산자 : 표현식이 예외가 있는지 조사하는것
// bool b = noexcept(foo())
// bool b = noexcept(T())
// bool b = noexcept(T(T()))
class Test
{
int data;
std::string s = "hello";
public:
Test() {}
~Test() {}
Test(const Test& t) : data(t.data), s(t.s) { std::cout << __FUNCSIG__ << std::endl; }
Test& operator=(const Test& t)
{
data = t.data;
s = t.s;
std::cout << __FUNCSIG__ << std::endl;
return *this;
}
// move 와 예외
// move 계열 함수를 만들때는 예외가 나오지 않게 만들고
// 예외가 없다고 꼭 컴파일러에게 알려 주자!
// noexcept : 예외가 없다는 의미
// noexcept(true) : 예외가 없다.
// noexcept(false) : 예외가 있을수 있다.
// sizeof(표현식) : 표현식 크기
// decltype(표현식) : 표현식 타입
// noexcept(표현식) : 표현식의 예외 여부 조사.
// Test(Test&& t) noexcept (
// noexcept( std::string(std::string())) : data(t.data), s(std::move(t.s))
Test(Test&& t) noexcept (
std::is_nothrow_move_constructible<std::string>::value) : data(t.data), s(std::move(t.s))
{
std::cout << __FUNCSIG__ << std::endl;
}
Test& operator=(Test&& t) noexcept (
std::is_move_assignable<std::string>::value)
{
data = t.data;
s = std::move(t.s);
std::cout << __FUNCSIG__ << std::endl;
return *this;
}
};
// 중요한 이야기
class Object
{
Test data;
public:
Object() {}
//void setData(Test d) { data = d; }
// setter 만들기 1. const & -항상 복사 사용
// void setData(const Test& d) { data = d; }
// 아래 코드는 역시 항상 복사(const 는 move 될수 없다.)
// void setData(const Test& d) { data = std::move(d); }
// setter 2. 2개를 만들자
// const & 버전과 && 버전으로 2개 만들자
//void setData(const Test& d) { data = d; }
//void setData(Test&& d) { data = std::move(d); }
// setter 3. call by value 는 아주 나쁠까 ?
// void setData(Test d) { data = std::move(d); }
// setter 4. forwarding reference
template<typename T> void setData(T&& d)
{
// data = d; // 1 무조건 복사
// data = std::move(d); // 2 무조건 move
data = std::forward<T>(d); // 3
}
};
int main()
{
Object obj;
Test data;
obj.setData(data); // 복사 대입 1회
// 복사 생성 1회, move 대입 1회
obj.setData(std::move(data));// move 대입 1회
// move 생성 1회, move대입 1회
}
|
fe22d4b2ca5089bb56f09b6e8b421f850f9d23e4 | e6bbc5f633bd641219487cc2c31608a3e32dd4b7 | /PestilenceEngine/code/src/inputManager.cpp | d45200a4e426e1ceded086846460550ae9d29589 | [] | no_license | RIT-IGME-GameEngines-Projects/Pestilence-Engine | 7d3fd5dfbab0ca14e277230d584762f26f8b821b | e61a7256ac9fcdb07b142a880daeee07d2946ebc | refs/heads/master | 2016-09-11T02:52:32.694618 | 2015-05-21T21:38:56 | 2015-05-21T21:38:56 | 30,922,231 | 1 | 0 | null | 2015-05-21T21:38:57 | 2015-02-17T15:10:16 | C++ | UTF-8 | C++ | false | false | 659 | cpp | inputManager.cpp | #include "inputManager.h"
InputManager::InputManager() { }
InputManager::~InputManager() {
release();
}
InputManager& InputManager::instance() {
static InputManager instance;
return instance;
}
void InputManager::release() {
}
void InputManager::keyboard(unsigned char key, int x, int y) {
switch (key) {
case 033:
exit(0);
break;
case '4':
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
break;
case '5':
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
break;
case '3':
glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
break;
}
Camera::instance().keyboard(key, x, y);
}
void InputManager::mouse(int button, int state, int x, int y) {
} |
fc6a69806af22435eb42df95f62bc7332407799d | b78f8189953687abe8a3ea5c0d9aee56aeae31ca | /Mashiro/Scene/src/AnimationModel.cpp | 7435829da2c7f7d99a6f6a3952563ebb7f3d2a10 | [] | no_license | peterkinalex/Yoserusu | 97c6249643ef66f108c92401a254eb51a6e1c576 | 63abdb523fede1b6ff58cf029364bceaedbb510f | refs/heads/master | 2020-12-28T19:57:24.277082 | 2014-06-01T09:21:39 | 2014-06-01T09:58:51 | 58,017,800 | 1 | 1 | null | 2016-05-04T02:48:40 | 2016-05-04T02:48:40 | null | UTF-8 | C++ | false | false | 3,761 | cpp | AnimationModel.cpp | #include "Mashiro/Mashiro.h"
#include "Mashiro/Scene/AnimationModel.h"
#include "Mashiro/Graphics/Texture.h"
#include "Mashiro/Graphics/RenderTarget.h"
#include "Mashiro/Graphics/GraphicsManager.h"
#include "Mashiro/Graphics/src/GraphicsManagerImpl.h"
#include "Mashiro/Graphics/Enum.h"
#include "Mashiro/Math/Vector3.h"
#include "Mashiro/Math/Functions.h"
#include "Mashiro/Base/Impl/ReferenceType.h"
#include "Mashiro/Math/Matrix.h"
#include "AnimationModelImpl.h"
namespace Mashiro{
using namespace Mashiro::Graphics;
namespace Scene {
AnimationModel::AnimationModel( Impl* impl ) : mImpl( impl ){
if( mImpl ){
mImpl->refer();
}
}
void AnimationModel::draw() const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->draw();
}
void AnimationModel::setAngle( const Vector3& angle ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setAngle( angle );
}
void AnimationModel::setColor( const Vector3& color, int num ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setColor( color, num );
}
void AnimationModel::setScale( const Vector3& scale ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setScale( scale );
}
void AnimationModel::setPosition( const Vector3& position ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setPosition( position );
}
void AnimationModel::setPosition( const Vector2& pos ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
//mImpl->setPosition( pos, gManagerImpl->mShaderParameter.mProjection, gManagerImpl->mShaderParameter.mView );
}
void AnimationModel::setTexture( const Texture& tex, int num ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setTexture( tex, num );
}
void AnimationModel::setTexture(const RenderTarget& targetTexture, int num /*= 0 */) {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setTexture( targetTexture, num );
}
void AnimationModel::setTransparaency( float c ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setTransparaency( c );
}
void AnimationModel::setAnimation( const FBXSkinMeshLoader& fbx ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setAnimation( fbx.mImpl );
}
void AnimationModel::setAnimation( const SINFileLoader& sin ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setAnimation( sin.mImpl );
}
void AnimationModel::setStartAnimation( int t ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setStartAnimation( t );
}
void AnimationModel::setStopAnimationTime( int t ){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->setStopAnimation( t );
}
void AnimationModel::update(){
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->update();
}
void AnimationModel::draw( const Matrix& world ) const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
mImpl->draw( world );
}
const Vector3* AnimationModel::angle() const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
return &mImpl->mAngle;
}
const Vector3* AnimationModel::scale() const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
return &mImpl->mScale;
}
const Vector3* AnimationModel::color() const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
return &mImpl->mColor;
}
float AnimationModel::transparaency() const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
return mImpl->mTrans;
}
const Vector3* AnimationModel::position() const {
ASSERT( mImpl && "Graphics::Model : This is empty Object" );
return &mImpl->mPosition;
}
#define TYPE AnimationModel
#include "Mashiro/Base/Impl/ReferenceTypeTemplate.h"
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.