text
stringlengths
3.08k
22k
/* * Copyright (C) 2005 - 2012 MaNGOS <http://www.getmangos.com/> * * Copyright (C) 2008 - 2012 Trinity <http://www.trinitycore.org/> * * Copyright (C) 2010 - 2012 ProjectSkyfire <http://www.projectskyfire.org/> * * Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/> * * This program is free software; ...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; typedef int Face; typedef long long int64; typedef pair<int, int> ii; const double EPS = 1e-9; const int C = 4; // Combination size const int MAXV = 100; // Max. number of vertices const int MA...
/* Taito 8741 emulation 1.comminucation main and sub cpu 2.dipswitch and key handling program types */ #include "driver.h" #include "tait8741.h" //#define __log__ 1 #define CMD_IDLE 0 #define CMD_08 1 #define CMD_4a 2 typedef struct TAITO8741_status{ unsigned char toData; /* to host data */ unsigned ch...
#include <glm\gtc\matrix_transform.hpp> #include <glm\gtc\random.hpp> #include <SFML\System.hpp> #include "Config\PhysicsConfig.h" #include "Generators\BuildingGenerator.h" #include "Generators\ColorGenerator.h" #include "Generators\PhysicsGenerator.h" #include "Managers\TerrainManager.h" #include "Math\PhysicsOps.h" #...
#include <GL\glew.h> #define GLFW_NO_GLU 1 #include <GLFW\glfw3.h> #include "sphere.h" #include "sphere_graphics.h" #include "system.h" #include <iostream> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/rotate_vector.hpp> #define M_PI 3.14159265f /* Define function prototypes */ static void error_callback(...
#include <algorithm> #include <array> #include <cassert> #include <functional> #include <iostream> #include <vector> using namespace std; // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0200r0.html template<class Fun> class y_combinator_result { Fun fun_; public: template<class T> explicit y_combin...
/*******************************************************************/ /* */ /* ADOBE CONFIDENTIAL */ /* _ _ _ _ _ _ _ _ _ _ _ _ _ */ /* ...
#include "../../../src/monge_matrix_min/smawk.hpp" #include <gtest/gtest.h> #include <functional> #include <random> #include <sstream> TEST(MongeMatrixMin_SMAWK, EdgeCase) { int mongeArr[1][1] = { {10}, }; std::vector<size_t> expRowsArgmin{0}; std::vector<size_t> rowsArgmin(1); std::funct...
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/** * Copyright (c) 2014, Institute of Telematics, Karlsruhe Institute of Technology. * * This file is part of the PktAnon project. PktAnon is distributed under 2-clause BSD licence. * See LICENSE file found in the top-level directory of this distribution. */ #include "IPv4PacketTransformation.h" #include "Pseu...
/* * InitializeIMU.cpp * Helps with initializing IMU states * Created on: Aug 26, 2018 * Author: <NAME> */ #include "pch.h" #include "InitializeIMU.h" using namespace std; using namespace Eigen; // Constants const double Om = 7.2921155e-5; const double PI = 3.1415926536; // Gravitational acceleration ECEF comp...
#include "base/glfw_base.h" #include "common/camera.h" #include "common/shader.h" #include "common/texture.h" // settings const unsigned int SCR_WIDTH = 1280; const unsigned int SCR_HEIGHT = 720; class GlfwBaseCallbackImpl : public GlfwBaseCallback { public: GlfwBaseCallbackImpl() { } bool IsWindowCreatedOve...
// v2 FABRIK algorithm for 20' Rover // v2 basically ignores the 4th joint, finds the angle of 1st joint by making the plane (which consists of other joints) turn towards the target // FABRIK algorithm is applied to the joints in the same plane (Joints 2,3,5 and the target. Algorithm is applied for 2D space) #include ...
/************************************************************************************************* * Tests for tkrzw_sys_config.h * * Copyright 2020 Google LLC * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy...
/* Copyright 2020 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distribu...
#include "windows.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <opencv2/opencv.hpp> #include <math.h> #include "CoreSLAM.h" #define TEST_FILENAME "test_lab.dat" #define TEST_SCAN_SIZE 682 #define TEST_MIN_DIST 20 #define TEST_ANGLE_MIN -120 #define TEST_ANGLE_MAX +120 #define TEST_OFFSET_LASE...
/* ***************************************************************** * * map_manager * * Copyright (c) 2019 * Institute of Mechatronic Systems, * Leibniz Universitaet Hannover. * (BSD License) * All rights reserved. * * http://www.imes.uni-hannover.de * * This software is distributed WITHOUT ANY WARRANTY; w...
// // Created by zhong on 2021/5/1. // #include "instance.hh" using namespace DRL; #include "third_party/imgui/imgui.h" #include "third_party/imgui/imgui_impl_glfw.h" #include "third_party/imgui/imgui_impl_opengl3.h" void InstanceRender::setup_states() { glEnable(GL_DEPTH_TEST); auto root_path = decltype(resMgr)::...
#include <iostream> #include <opencv2/core.hpp> #include <opencv2/dnn.hpp> #include <opencv2/dnn/shape_utils.hpp> #include <opencv2/dnn/all_layers.hpp> #include <opencv2/dnn/layer.details.hpp> // CV_DNN_REGISTER_LAYER_CLASS using namespace cv; using namespace cv::dnn; using namespace std; int batch = 5; int features...
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation the rights to use,...
//======================================================================================== // Athena++ astrophysical MHD code // Copyright(C) 2014 <NAME> <<EMAIL>> and other code contributors // Licensed under the 3-clause BSD License, see LICENSE file for details //=====================================================...
#include <iostream> #include <opencv2/opencv.hpp> #include <vector> using namespace std; using namespace cv; const unsigned char DARKER = 1; const unsigned char SIMILAR = 2; const unsigned char BRIGHTER = 3; const int RED = 2; const int GREEN = 1; const int BLUE = 0; const int MAX_CANDIDATE = 16; const int MAX_CONSECU...
#define NOMINMAX #include "renderer.h" #include <vector> #include <numeric> #include <random> #include <numbers> #include <cmath> #include <memory> //namespace { // constexpr float FLOAT_INFINITY = std::numeric_limits<float>::max(); // // struct Vertex { // float x, y, z; // }; // // struct PolygonIndex { // ...
#include<iostream> #include<vector> #include<algorithm> #include<random> #include<string> using namespace std; using std::vector; class Card { enum Value {ACE = 1, TWO, THREE, FOUR,FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING} ; enum Suit {CLUBS, DIAMONDS, HEARTS, SPADES}; public: //fields Value val...
#include <unistd.h> #include <fcntl.h> #include <signal.h> #include <pthread.h> #include <sys/ptrace.h> #include <sys/inotify.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/mount.h> #include <vector> #include <bitset> #include <utils.hpp> #include "jokerhide.hpp" using namespace std; static int inoti...
/* * gdiplus.cpp * Copyright (c) 2017 <NAME> * Released under the MIT License. */ #include "ruby_gdiplus.h" VALUE mGdiplus; VALUE mInternals; VALUE cGpObject; VALUE eGdiplus; VALUE cGuid; VALUE cImageCodecInfo; VALUE cImage; VALUE cBitmap; VALUE cPixelFormat; VALUE cEncoderParameterValueType; VALUE cBrushType; V...
#include "berkeley_gfx.hpp" #include "renderer.hpp" #include "pipelines.hpp" #include "command_buffer.hpp" #include "buffer.hpp" #include "texture_system.hpp" #include <string> #include <fstream> #include <streambuf> #include <imgui.h> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/transform.hpp> #includ...
#include <bits/stdc++.h> using namespace std; /* Problem : Find number of divisors of n where 1<=n<=10^18 * * https://codeforces.com/gym/100753/attachments/download/3533/2015-german-collegiate-programming-contest-gcpc-15-en.pdf * F. Divisions * * Solution/Implementation is correct * but codeforces doesn't sup...
/* Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2....
// Copyright 2013 The CARFAC Authors. All Rights Reserved. // Author: <NAME> <<EMAIL>> // // This file is part of an implementation of Lyon's cochlear model: // "Cascade of Asymmetric Resonators with Fast-Acting Compression" // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this f...
#define FASTLED_ALLOW_INTERRUPTS 0 // External Libs #include <Arduino.h> #include <FS.h> #include <WiFi.h> #include <SPI.h> #include <AsyncTCP.h> #include <SPIFFS.h> #include <ESPAsyncWebServer.h> #include <ESPAsyncWiFiManager.h> #include <FastLED.h> #include <FastLED_NeoMatrix.h> #include <AsyncJson.h> #i...
#include "Hexagon.h" #include "FindAruco.h" #include "FindBoardLocs.h" /** Finds the hexagon tiles with surf, corrects thier centers, and returns a vector of tiles * corrresponding to each of the smaller hexagonal game board pieces. */ vector<Tile> findAllHexTiles(const Mat& image){ Mat hexImage=image.clone(); vect...
// Copyright 2013 Tera Insights, LLC. All Rights Reserved. #include "CommReceiver.h" #include "CommManager.h" #include "CommunicationFramework.h" #include "Errors.h" #include "Logging.h" #include "RemoteMacros.h" #include "RemoteMessage.h" #include "CommConfig.h" #include "SerializeJson.h" #include <string> #include ...
#include <stdio.h> #include <vector> #include <stdint.h> #include <math.h> #include <windows.h> #include <process.h> #include <mmsystem.h> #include <mmreg.h> #pragma comment(lib, "winmm.lib") #pragma comment(lib, "user32.lib") #pragma comment(lib, "ole32.lib") class Sound { HANDLE hThread = nullptr; enum { SIGNAL...
// Copyright 2017 InnoVisioNate Inc. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "SpreadsheetBackEnd.h" SpreadsheetBackEnd::_IPropertyPage *SpreadsheetBackEnd::pIPropertyPage = NULL; SpreadsheetBackEnd::Spreadshee...
/* * Filename: Validator.cpp * * Classification: SECRET//NOFORN * Classified By: * * Tool Name: Validator * Requirement #: 2015-XXXX * * Author: ??? * Date Created: 02/11/2015 * Version 1.0: 02/11/2015 (???) * * This tool takes a list of dirty strings/data (in the form of a Marble Receipt) * and ver...
// ------------------------------------------------------------------ // run with: knucleotide 0 < ../examples/knucleotide-input.txt // ------------------------------------------------------------------ // // output should be: // // T 31.520 // A 29.600 // C 19.480 // G 19.400 // // AT 9.922 // TT 9.602 // TA 9.402 /...
/* * Copyright (c) 2015, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the follo...
#include <iostream> //Command Prompt Input output #include <fstream> //Usage of Files #include <curses.h> #include<cstring> #include "Rope_tree.h" using namespace std; string alphabet="a b c d e f g h i j k l m n o p q r s t u v w x y z"; //used for validation string line, guessed, word, display; Rope *wordRope; int ...
/*****************************************************************/ /* NAME: <NAME> */ /* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */ /* FILE: NodeRecord.cpp */ /* DATE: Feb 27th 2010 ...
#define WIN32_LEAN_AND_MEAN #include <shlobj_core.h> #include <windows.h> #include <winreg.h> #include <string> #include <vector> #include <list> using namespace std; string ReadFileFromDisk(const wstring &path) { FILE *config = _wfopen(path.c_str(), L"r+t"); if(config == nullptr) return string(); ...
/// /// @file /// This file contains definition of the Archiver class - container for epoch/microblock handling related classes /// #include <logos/consensus/consensus_container.hpp> #include <logos/epoch/recall_handler.hpp> #include <logos/lib/epoch_time_util.hpp> #include <logos/epoch/archiver.hpp> Archiver::Archiv...
#include <iostream> #include <opencv2/opencv.hpp> #include "matchlib.h" using namespace std; using namespace cv; void matchlib(){ cout << "Hello from matchlib" << endl; } vector<Point> TemplateMatch(Mat srcImg, Mat templImg, float threshold, float tolerance) { vector<Point> matchLocations; Point tempLoc; Mat...
/* ------------------------------------------------------------------------------------ * * File SkeletalAnimation.cpp * Description This source file is part of OGRE * (Object-oriented Graphics Rendering Engine) * Author <NAME> * * ---------------------...
/* * Copyright 2010, Haiku, Inc. All Rights Reserved. * Copyright 2008-2009, <NAME>. All Rights Reserved. * Copyright 2004-2008, <NAME>. All Rights Reserved. * Copyright 2004-2007, <NAME>. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: * <NAME>, <EMAIL> * <NAME>, <EMAIL> ...
// // Created by <NAME> on 29/08/2017. // #include <navtools/rhumbline.hpp> #include <navtools/utils/mathUtils.hpp> #include <navtools/Ellipsoid.hpp> #include <navtools/Longitude.hpp> #include <cmath> #include <sstream> #include <fmt/ostream.h> using namespace ntl; static double meridionalDistance(const Latitude &la...
// this is actually just a single query #include "KDTree.h" #ifndef CPPONLY #include "mex.h" void retrieve_tree( const mxArray* matptr, KDTree* & tree){ // retrieve pointer from the MX form double* pointer0 = mxGetPr(matptr); // check that I actually received something if( pointer0 == NULL ) m...
#include "rpn/rpn.h" double eval(std::queue<std::shared_ptr<Token>> tokens, double variable) { std::stack<std::shared_ptr<Token>> call_stack = std::stack<std::shared_ptr<Token>>(); while (!tokens.empty()) { std::shared_ptr<Token> current_token = tokens.front(); tokens.pop(); swi...
#include "Player.h" #include "../Engine.h" #include "Map.h" #include "Actor.h" #include "Gui.h" #include "Pickable.h" #include "Destructible.h" #include "../Systems/RenderSystem.h" #include <iostream> Player::Player(const EntityWPtr &owner, const RenderSystemPtr &system) : Totem::Component<Player, Proper...
#include <cmath> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <sys/mman.h> #include <pthread.h> #include <getopt.h> #include <errno.h> #include <util/runnable.h> #include <ring_buffer.h> #include <core/datatypes.h> #include <core/util.h> #include <core/vertex-domain.h> #includ...
#include "ThreadScheduler.h" #include <string> #include <fstream> #include <streambuf> #include <cstdlib> #include <iostream> #include <chrono> #include <algorithm> #include <atomic> #include "GameMap.h" #ifdef AI_PROFILER #include <google/profiler.h> #endif class Loader { private: ai::AIRegistry _registry; // add ...
#include <chuffed/core/propagator.h> #include <iostream> #include "EdExplFinder.h" class EditDistance : public Propagator { public: enum ExplLevel { // generate naive explanation if all seq variables are fixed only E_NAIVE, // generate explanation on any domain change, E_FULL, }...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <iostream> #include <vector> #include <chrono> #include <string> #include <map> #include <ctime> #include <sstream> #include <cstring> #include "WasatchVCPP.h" using std::vector; using std::string; using std::map; //////////////...
// 2020/07/30 // xxh3/xxHash switcher for VC++(SSE2/AVX2/AVX512) by H.Shirouzu #include "xxh3.h" #include "xxh3_sw.h" #ifdef XXH3_SW_MAIN #include <windows.h> #include <stdio.h> int main() { XXH3_state_t *xxh3 = XXH3_createState_sw(); XXH3_128bits_reset_sw(xxh3); BYTE data[] = "abcdef"; XXH3_1...
/******************************************************************************* * * Copyrights <NAME> 2014 <<EMAIL>> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of ...
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <limits> #include <tuple> #include <utility> #include <sstream> #include <iostream> #include <iomani...
/* Job Scheduling * * DOCUMENTATION * * Assumptions: * 1. Priority of no 2 jobs will ever be equal (given). * * Data Structures Used: * + The system has the following data structures: * -- A map of unique_id to each job. * -> Efficient lookup by unique_id (assigned by us). * -> An binary tree was...
#include "main.h" #include "coms.h" #include "json.h" #include "can.h" #include <NativeEthernet.h> #include <NativeEthernetUdp.h> QueueHandle_t gpsQueue; SemaphoreHandle_t udpMutex; uint8_t mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; IPAddress ip(192, 168, 137, 177); IPAddress broadcastIP(192, 168, 137, 255); u...
#include <TFT_eSPI.h> #include <vector> #include <algorithm> #include "analogvideo.h" /* glitch effect functions */ void glitch_vert_scroll(TFT_eSPI *tft, uint16_t *fb, int v_offset) { int h = tft->height(); int w = tft->width(); uint16_t offset = v_offset % h; uint16_t fb_temp[h * w]; glitch...
#pragma once #include <inttypes.h> #include <map> #include <phosg/Encoding.hh> #include <memory> #include <vector> #include "MemoryContext.hh" //////////////////////////////////////////////////////////////////////////////// // Overall structure // PEFF files have, in this order: // - PEFFHeader ...
/* * (c) Copyright 2018 Hewlett Packard Enterprise Development LP * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless...
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation the rights to use,...
#include <iostream> #include <climits> #include <algorithm> #include <vector> using namespace std; // specific code const int MAXN = 200000; const int NEUTRAL_VALUE = INT_MIN; const int NEUTRAL_DELTA = 0; int joinValues(int leftValue, int rightValue) { return max(leftValue, rightValue); } int joinDeltas(int oldDel...
/* ============================================================================ * Freetype GL - A C OpenGL Freetype engine * Platform: Any * WWW: http://code.google.com/p/freetype-gl/ * ---------------------------------------------------------------------------- * Copyright 2011,2012 <NAME>. All rights ...
/* * HoriDiffRepository.cpp * * Created on: Apr 14, 2014 * Author: carlosos */ #include <cmath> #include <sstream> #include <boost/make_shared.hpp> #include "Definitions.h" #include "HoriDiffRepository.h" #include "Utils.h" HoriDiffRepository::HoriDiffRepository() {} HoriDiffRepository::~HoriDiffRepository...
/* * The text rendering system was created * entirely by <NAME> */ #include <iostream> #include <glm/gtc/matrix_transform.hpp> #include <ft2build.h> #include FT_FREETYPE_H #include "TextRenderer.h" //#include "resource_manager.h" TextRenderer::TextRenderer() : TextShader("text") { glGenVertexArrays(1, &this->VA...
// FaceRecognition.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include "pch.h" #include <iostream> #include <sstream> #include <set> #include <vector> #include <opencv2/opencv.hpp> #include <opencv2/face.hpp> using namespace std; using namespace cv; using namespace cv::face; int studentNum; set<string> nameResult; vec...
// c++ includes #include <omp.h> #include <unistd.h> //ros includes #include "ros/ros.h" #include "nav_msgs/Odometry.h" #include "nav_msgs/OccupancyGrid.h" #include "sensor_msgs/PointCloud2.h" #include "sensor_msgs/Image.h" #include <std_msgs/Int64.h> #include "stereo_msgs/DisparityImage.h" #include "sensor_msgs/Camera...
/* -------------------------------------------------------------------------- * * OpenMMAmoeba * * -------------------------------------------------------------------------- * * This is part of the OpenMM molecular simulation toolkit originating from * ...
// operators.cpp // Copyright (c) 2014 - 2017, zhiayang // Licensed under the Apache License Version 2.0. #include "defs.h" #include "pts.h" #include "parser.h" #include "parser_internal.h" #include "memorypool.h" using namespace ast; using namespace lexer; using TT = lexer::TokenType; namespace parser { Operator...
#include "StdAfx.h" #include "exporter.h" RMDMesh::RMDMesh() { memset(objname,0,64); } void MyExporter::ExportGeomObject(INode * node) { if (!ISEXP(EXPORT_MESH)) return; // fileheader.objectcount++; int i,k; // for loops Point3 vert; TimeValue currtime = m_ip->GetTime(); ObjectState os = node->EvalWorldState(c...
/** * @author <NAME> * @file mismatch_ff.cc Implementation of ParMismatch and QuotMismatch * * * COMMENTS: * * Mismatch of punctuation marks. * ParMismatchFF: mismatch between opening and closing brackets within a hypothesis * QuotMismatchFF: mismatch between of quotation marks between source and hypo...
////////////////////////////////// // // == A reuse distance based GPU cache model // This file is part of a cache model for GPUs. The cache model is based on // reuse distance theory extended to work with GPUs. The cache model primarly // focusses on modelling NVIDIA's Fermi architecture. // // == More information on ...
/* * Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "...
/****************************************************************************** ** Copyright (C) 1998 by CEA ******************************************************************************* ** ** UNIT ** ** Version: 1.0 ** ** Author: <NAME> ** ** Date: 98/01/12 ** ** File: MR_Edge...
#include <stdio.h> #include <cstdlib> #include <stdint.h> #include <layers.hpp> using namespace std; void *alloc_2D(int i, int j, size_t bytes) { void **ret = (void **)malloc(i * sizeof(void *)); for (int i_idx = 0; i_idx < i; i_idx++) ret[i_idx] = malloc(j * bytes); return ret; } void *alloc_3D(int i, int j, ...
/* * Copyright (c) 2016 Intel Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #include <vector> #include <sstream> #include "orcm/common/dataContainer.hpp" #include "orcm/util/string_utils.h" #include "ipmi_sensor_tests.hpp" #include "timeoutHelper.hpp" #d...
#include "bead.h" #include <iostream> #include <cmath> #include <sstream> double Bead::getDistanceModulus( Bead* other ) { DirVect* distance = new DirVect( this->r, other->r ); double dist = distance->modulus; delete distance; return dist; } void Bead::pbcCorrectDistanceCompInChain( double* d, double* coord, ...
/******************************************************************** * This file is part of the tool Normalizer of the project Discover. * * Copyright (c) 2020-2022 Singapore Blockchain Innovation Programme. * All rights reserved. *******************************************************************/ #include "Pas...
#include "Texture3D.h" Texture3D::Texture3D(VulkanDevice* device, uint32_t width, uint32_t height, uint32_t depth, VkFormat format) : device(device), width(width), height(height), depth(depth), textureFormat(format) {} Texture3D::~Texture3D() { if (textureSampler3D != VK_NULL_HANDLE) { vkDestroySampler(device->G...
/* * SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Lic...
// // Copyright (c) 2017 Regents of the SIGNET lab, University of Padova. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyrigh...
#include <boost/lexical_cast.hpp> #include "debug.h" #include "mm_sparse_solver.h" #include "scale_model.h" #include <ctime> #include <fstream> #define INITIAL_LENGTH 1 MM::MM() { } MM::~MM() { } void MM::Clear() { action_to_index_.clear(); index_to_action_.clear(); state_to_index_.clear(); index_to...
/* * MessageProcessor.cpp * * Created on: Mar 22, 2015 * Author: jonno */ #include "MessageProcessor.h" #include <string> #include <sstream> #include <iostream> using namespace std; MessageProcessor::MessageProcessor(Node* node) { // store a raw pointer because we will not outlive Node // famous last wo...
// // main.cpp // hrml_parser // // Created by <NAME> on 13/07/2018. // Copyright © 2018 <NAME>. All rights reserved. // #include <algorithm> #include <iostream> #include <string> #include <sstream> #include <vector> #include <stack> #include <map> #include <ctype.h> #include <assert.h> using std::string; enum T...
/* ATM90E26 Energy Monitor Demo Application The MIT License (MIT) Copyright (c) 2016 whatnick and Ryzee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including wi...
// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup"; -*- // vi:set ts=4 sts=4 sw=4 noet : // Copyright 2008, The TPIE development team // // This file is part of TPIE. // // TPIE is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public ...
/*----------------------------------------------------------- * 2c - Cross Platform 3D Application Framework *----------------------------------------------------------- * Copyright © 2011 – 2011 France Telecom * This software is distributed under the Apache 2.0 license. * http://www.apache.org/licenses/LICENSE-2....
#include <pybind11/pybind11.h> #include <pybind11/eigen.h> namespace py = pybind11; using namespace pybind11::literals; // enables the _a literal #include <Carna/base/FrameRenderer.h> #include <Carna/base/Node.h> #include <Carna/base/Camera.h> #include <Carna/base/Geometry.h> #include <Carna/base/GeometryFeature.h> ...
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: <NAME> */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include <limits> #include "helper_functions.h" using s...
/* * $Id: TcpDataLink.cpp 6659 2014-12-15 16:05:37Z oschwaldp $ * * * Distributed under the OpenDDS License. * See: http://www.opendds.org/license.html */ #include "Tcp_pch.h" #include "TcpDataLink.h" #include "TcpReceiveStrategy.h" #include "TcpInst.h" #include "TcpSendStrategy.h" #include "dds/DCPS/transport/f...
/* * This file is part of MQT QFR library which is released under the MIT license. * See file README.md or go to https://www.cda.cit.tum.de/research/quantum/ for more information. */ #pragma once #include "Definitions.hpp" #include "dd/GateMatrixDefinitions.hpp" #include "dd/Package.hpp" #include "operations/ClassicC...
// Copyright 2020 <NAME> #include <mpi.h> #include <vector> #include <string> #include <random> #include <ctime> #include <algorithm> #include <iostream> #include "../../../modules/task_3/egorov_k_batcher_sort/batcher_sort.h" std::vector<int> getRandomVector(int sz) { std::mt19937 gen; gen.seed(s...
#include <string.h> #include "template.h" #undef ARDUINOJSON_USE_LONG_LONG #include <Arduino.h> #include <ArduinoOTA.h> #include <WebServer.h> #include <WebSocketsServer.h> #include <WiFi.h> #include <WiFiClient.h> #include "esp32-hal-psram.h" #include "evaluate.h" #include "read.h" using namespace std; struct read...
/* Copyright 2011 - 2015 Occam Robotics Inc - All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and th...
#include "ObjectDetector.h" using namespace cv; using namespace std; ObjectDetector::ObjectDetector() { } ObjectDetector::~ObjectDetector() { } void ObjectDetector::loaddetectFile(std::string fname) { detector.load(fname); } void ObjectDetector::verifySVM() { string verify = "vef"; cout << "\nVerification data...
//------------------------------------------------------------------------ // // File: shell\themes\test\ctlperf\samples.cpp // // Contents: Sample control initialization routines, taken from ThemeSel by RFernand. // Add new control initialization data here. // // Classes: None // //-------------...
#include "pr.hpp" #include <iostream> #include <memory> float sqr( float x ) { return x * x; } template <class T> T bezier( T ps[4], float t ) { const auto p4 = glm::mix( ps[0], ps[1], t ); const auto p5 = glm::mix( ps[1], ps[2], t ); const auto p6 = glm::mix( ps[2], ps[3], t ); const auto p7 = glm::mix( p4, p...
#include "LEDStringManager.h" #include "LogManager.h" #include <Arduino.h> #include <FastLED.h> #ifdef FRONT_STRINGS #define NUM_LEDS_PER_STRING 150 #define NUM_STRINGS_LEFT 4 #define NUM_STRINGS_RIGHT 3 #define NUM_BUFFER_LEDS 1 #else #define NUM_LEDS_PER_STRING 201 #define NUM_STRINGS_LEFT 0 #de...
#include <map> #include <list> #include <deque> #include <cmath> #include <chrono> #include <limits> #include <vector> #include <utility> #include <fstream> #include <iostream> #include <stdexcept> #include <algorithm> #include <unordered_map> class Coordinates final { private: static uint64_t constexpr cShiftX = 32...