text
stringlengths
3.08k
12.5k
//////////////////////////////////////////////////////////////////////////////// // // Package: RoadNarrows Robotics Application Tool Kit // // Link: https://github.com/roadnarrows-robotics/rnr-sdk // // Library: librnr_appkit // // File: CmdDef.cxx // /*! \file * * \brief Command line command definitio...
//===-- ARMSubtarget.cpp - ARM Subtarget Information ----------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
#include "gmres_functions.H" Precon::Precon() {} void Precon::Define(const BoxArray& ba_in, const DistributionMapping& dmap_in, const Geometry& geom_in) { BL_PROFILE_VAR("Precon::Define()",Precon); phi.define (ba_in,dmap_in,1,1); mac_rhs.define(ba_in,dmap_in,1,...
// STD #include <chrono> #include <cstring> #include <fstream> #include <iomanip> #include <stdio.h> #include <string> // Local includes #include "minc_api.hpp" #include "minc_cli.h" #include "minc_dbg.h" #include "minc_pkgmgr.h" #include "minc_svr.h" const char* HELP_MESSAGE = "Minimal Compiler\n" "\n" "Usage: mi...
//======================================================================================== // 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 //=====================================================...
// Task 4 - Render the letter R using OpenGL // - Implement a function to generate bezier curve points // - Generate multiple points on each bezier curve // - Draw lines connecting the generated points using OpenGL #include <iostream> #include <vector> #include <ppgso/ppgso.h> #include <shaders/...
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- * vim: set ts=8 sts=2 et sw=2 tw=80: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ...
/* World Generation code based on <NAME>'s Open Builder https://github.com/Hopson97/open-builder MIT License Copyright (c) 2019 <NAME> 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 res...
#include "2_Read_Sensors.h" #include <arduino.h> #include "defines.h" adc_attenuation_t attenuation = ADC_11db; void ADC_SetGain() { analogSetAttenuation(attenuation); } uint16_t analogAvgRead(uint8_t pin) { return 0; } float analogRawToMilliVolts(uint16_t adc_reading) { // uint16_t max_reading = 8191;...
#include "llvm/ADT/PostOrderIterator.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Instructions.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/GraphWriter.h" #include "llvm/IR/IRBuilder.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Transforms/Utils/BasicBlockUt...
/*========================================================================= Program: Open IGT Link -- Example for Tracker Client Program Module: $RCSfile: $ Language: C++ Date: $Date: $ Version: $Revision: $ Copyright (c) Insight Software Consortium. All rights reserved. This software is d...
#include <cstdlib> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include <algorithm> #include "max_set_list.h" using std::vector; using std::string; using std::cout; using std::cerr; using std::endl; class Results { public: vector<std::pair<string, string>> best_set...
/* This file is part of PyMesh. Copyright (c) 2015 by <NAME> */ #include "TetgenWrapper.h" #include <iostream> #include <tetgen.h> #include <Core/Exception.h> #include <Mesh.h> #include <tetgen.h> #include "TetgenException.h" using namespace PyMesh; void TetgenWrapper::run() { tetgenio in, out, addin, bgmin; ...
#include "greedy.h" // Constructor de copia Problema::Problema(int num, vector<vector<double> > m1, vector<vector<double> > m2){ n=num; MatrizHabitaciones=m1; MatrizOficinistas=m2; } /* Se pasa una matriz de distacias a habitaciones u de flujo de trabajo de oficinistas y genera el vector de distancias...
#include <iostream> #include <fstream> #include <sstream> #include <cstdio> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <unordered_map> #include <set> #include <iterator> #include <cassert> #include "Eigen/Dense" #define uint unsigned int using namespace Eigen; using namespace s...
/* Copyright 2018-2019, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2019, <NAME>itaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the ...
#include "../Constants.h" #include <sstream> //#include <string> #include "Skill.hpp" #include <SDL2/SDL_image.h> #include <SDL2/SDL_render.h> #include "../actions/Outcome.hpp" #include "../GamePhase.hpp" #include "../GameState.hpp" #include "../Entity.hpp" #include "../GameMessages.hpp" #include "../map/GameMap.h...
#include "../include/Model.hpp" Model::Model(std::string path) { this->loadModel(path); } void Model::draw(Shader shader) { for(GLuint i = 0; i < this->meshes.size(); i++) this->meshes[i].draw(shader); } bool Model::exists() { return this->meshes.size() != 0; } void Model::loadModel(std::string ...
#include <algorithm> #include <iomanip> #include <map> #include <memory> #include <mutex> #include <sstream> #include <string> #include <vector> #include "audio-encoders.hpp" #include "obs-app.hpp" #include "window-main.hpp" using namespace std; static const string encoders[] = { "ffmpeg_aac", "mf_aac", "libfdk_a...
// // Equation.c // MathTools // // Created by <NAME> on 5/12/13. // // #include "Equation.h" // These functions here will not do validation check #pragma mark - One Unknown LineEquaRt rootOfLinearEquation(const LineEquaParam &param) { // ax + b = c RationalNumber a = param.a, b = param.b, c = param.c; ...
#include <bits/stdc++.h> using namespace std; #define SIZE 330010 const double pi = acos(-1.0); class Complex { public: double real, imag; Complex operator + (const Complex & snd) & { return Complex{real + snd.real, imag + snd.imag}; }; Complex operator - (const Complex & snd) & { return Complex...
/**************************************************************************** * @file graphs.cpp * @author <NAME> <riccardo.battistini2(at)studio.unibo.it> * * @brief Algorithms for undirected unweighted graphs manipulation. * * Copyright 2021 (c) 2021 by <NAME> * * Redistribution and use in source and binary f...
#include <bitset> #include <deque> #include <iostream> #include <string> #include <vector> using namespace std; #define DUMP_VAR(x) \ std::cout << __func__ << ":" << __LINE__ << "::" << #x << "=<" << x << ">" \ << std::endl; #define HEX_V...
#include <Eigen/Eigenvalues> #include <boost/timer/timer.hpp> #include <iostream> #include "eigen-qp.hpp" using namespace std; using namespace Eigen; using namespace EigenQP; /* * min 0.5 x.Q.x + c.x * * Ax <= b * Ex = d * * See: http://etd.dtu.dk/thesis/220437/ep08_19.pdf */ // #define NV_FIXED 8 // #defin...
#include "LFSCLraProof.h" //LFSCLraAdd ... void LFSCLraAdd::print_pf( std::ostream& s, int ind ) { s<<"(lra_add_"; s <<kind_to_str(d_op1); s <<"_"; s << kind_to_str(d_op2); s <<" _ _ _ "; d_children[0]->print(s, ind+1); s<<" "; d_children[1]->print(s, ind+1); s<<")"; } LFSCProof* LFSCLraAdd::Make(...
/** * A class which describes the properties and actions of a device session. * * @date July 7, 2014 * @author <NAME> * @version 0.1 * * Copyright 2013 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this fil...
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
/* * Copyright 2007-2021 CM4all GmbH * All rights reserved. * * author: <NAME> <<EMAIL>> * * 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 ...
/* Author: <NAME> Date: September2, 2020 */ #include <iostream> #include <fstream> #include <cstdint> #include <sys/ioctl.h> #include <unistd.h> #include <cmath> using namespace std; #pragma pack(push, 1) struct BMPFileHeader { uint16_t magic_number{0}; uint32_t file_size{0}; uint16_t reserved1{0}; ...
/*************************************************************************** * Copyright (C) by GFZ Potsdam * * * * You can redistribute and/or modify this program under the * * terms o...
#include <iostream> #include "srrg_boss/serializer.h" #include "srrg_messages/instances.h" #include "srrg_system_utils/parse_command_line.h" #include "srrg_system_utils/system_utils.h" using namespace srrg2_core; // clang-format off const char* banner[] = {"This program computes the BF feature matches between two im...
#include "Shoal.h" float Shoal::defaultScale = 1.0f; float Shoal::defaultAlign = 12.0f; float Shoal::defaultSpeed = 4.0f; float Shoal::defaultMinBoundZ = 0; float Shoal::defaultMaxBoundZ = 600; float Shoal::defaultEscapeSpeed = 50.0f; float Shoal::maxForce = 20000.0f; float Shoal::additional_vx = 0.04250f; float Sh...
/* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain soft...
/* ** Copyright 2015 Centreon ** ** 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 ...
#include <cinttypes> #include <utility> #include <vector> #include "asm_ostream.hpp" #include "asm_syntax.hpp" #include "crab/cfg.hpp" #include "spec_type_descriptors.hpp" using std::string; using std::to_string; using std::vector; class AssertExtractor { program_info info; const bool is_privileged = info.p...
#pragma once #include "Game.hpp" namespace CatanRanker { constexpr const double EloRatingStartingValue{1000.0}; constexpr const double EloRatingStandardMaximumUpdateFactor{64.0}; const std::map<int8_t, double> NumberOfPlayersToEloRatingMaximumUpdateFactor{ {3, EloRatingStandardMaximumUpdateFactor / 2}, // Each p...
// ----------------------------------------------------------------------------- // The MIT License // // Copyright(c) 2020 <NAME>, // // 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 wi...
#include "Prefab.h" #include "SceneGraph.h" #include "Model.h" #include "Common/GameData/trick_serializers.h" #include "Common/GameData/GameDataStore.h" #include "Common/GameData/scenegraph_serializers.h" //for getFilepathCaseInsensitive #include <QDir> #include <QDebug> namespace SEGS { struct GeoSet; } QHash<QStr...
//g++ -I/usr/include/libxml2 verifyxmllicense.cpp -lcrypto++ -lxml2 -o verifyxmllicense #include <iostream> #include <map> #include <vector> #include <sstream> #include <stdexcept> using namespace std; #include <libxml/parser.h> #include <libxml/tree.h> #include <crypto++/rsa.h> #include <crypto++/osrng.h> #include <c...
#include <iostream> #include <set> #include <unordered_set> #include <random> #include <string> #include <chrono> static const std::vector<char>& charset() { static std::vector<char> characters( {'0','1','2','3','4', '5','6','7','8','9', 'A','B','C','D','E','F', 'G','H','I','J','K', 'L...
#include <constants.h> #include <gfuncs.h> /* Hook's sec 3 B treatment - consistency test! */ /* We consider 1 epoch in which all black holes decay - matter domination! */ double nbl_hook(double lgni, double lambda, double lgmass){ // determine the decay time double dect = pow(10., (3.*lgmass-17.803)) ; // s // ...
/* This file is part of Into. * Copyright (C) Intopii 2013. * All rights reserved. * * Licensees holding a commercial Into license may use this file in * accordance with the commercial license agreement. Please see * LICENSE.commercial for commercial licensing terms. * * Alternatively, this file may be used und...
#include "Toolset.h" #include "Component.h" #include "fw/dotted.h" #include "fw/sha512.h" #include <fstream> #include <fw/filesystem.hpp> #include <string> #include <cstdlib> std::string Toolset::getNameFor(const Component &component) { return component.GetName(); } std::unique_ptr<Toolset> ParseToolset(const s...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 30005; const int INF = 0x3f3f3f3f; #define lson(x) ((x)<<1) #define rson(x) (((x)<<1)|1) int lc[maxn << 2], rc[maxn << 2], s[maxn << 2], m[maxn << 2], val[maxn]; inline void pushup(int u) { s[u] = s[lson(u)] + s[rson(u)...
// Animation.cpp: implementation of the CAnimation class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Animation.h" #include "DXUtil.h" #include "vertextypes.h" #include "TerraFighterApp.h" #ifdef _DEBUG #define new DEBUG_NEW #endif /////////////////////////...
/** * \brief A block structure defined over the variables * * A block structure defined over the variables such that each block contains * 1 or more variables, with the invariant that all constraints inside a block * are satisfied by keeping the variables fixed relative to one another * * Authors: * <NAME> <<...
/* * UniShader - Interface for GPGPU and working with shader programs * Copyright (c) 2011-2013 <NAME> - <EMAIL> * * This software is provided 'as-is', without any express or * implied warranty. In no event will the authors be held * liable for any damages arising from the use of this software. * * Permission i...
//#include <bits/stdc++.h> // //using namespace std; //#include <stdio.h> //#include <string.h> struct node { int r=0,g=0,b=0; int change=0; // r=g=b=change=0; }; struct node tree[800100]; int full=2, partial=1, unchanged=0; int n,m; char s[200100]; void setNode(struct node &...
#include <math.h> #include <stdlib.h> #include <time.h> #include "metodoPotencia.cpp" void normalizar(std::vector<double>& x) { double norma2 = 0; for (int i=0; i<x.size(); ++i) { norma2 = norma2 + (x[i] * x[i]); } norma2 = sqrt(norma2); for (int i=0; i<x.size(); ++i) { x[i] = x[i] / norma2; } } //Matr...
// Copyright (c) 2020 gyselroth GmbH // Licensed under the MIT License - https://opensource.org/licenses/MIT #include <docxbox/docx/xml/visitor/docx_xml_remove.h> docx_xml_remove::docx_xml_remove( int argc, const std::vector<std::string>& argv) : docx_xml(argc, argv) {} bool docx_xml_remove::RemoveBetweenStrings...
#include "Arduino_GC9106.h" #include "SPI.h" Arduino_GC9106::Arduino_GC9106( Arduino_DataBus *bus, int8_t rst, uint8_t r, bool ips, int16_t w, int16_t h, uint8_t col_offset1, uint8_t row_offset1, uint8_t col_offset2, uint8_t row_offset2) : Arduino_TFT(bus, rst, r, ips, w, h, col_offset1, row_offset1, c...
#include <vector> #include <thread> #include <chrono> #include <iostream> #include <cstdio> #include "DataDriver.h" #define MAX_RET_CNT_C 1000 struct DmaBuffer { int32_t size; uint32_t index; void* data; }; struct PGPEvent { DmaBuffer buffers[4]; // uint8_t bufferMask = 0; uint8_t counter = 0...
#include "kernel.h" #include "main.h" #include "thread.h" #include "bitmap.h" #include "list.h" #include "request.h" #define SEATS_NUMBER 20 #define REQUESTS_NUMBER 20 Bitmap *seats = new Bitmap(SEATS_NUMBER); // Bitmap for seats information int seatsMap[SEATS_NUMBER] = {0}; // Array for seat-request/passen...
/* * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This p...
#include <cmath> #include <gtest/gtest.h> #include <ros/ros.h> #include <geometry_msgs/PoseStamped.h> #include <nmea_msgs/Sentence.h> #define DUMMY_NMEA_SENTENCE_0 \ "$GPGGA,0,80.000,N,90.000,E,1,08,0.9,545.4,M,46.9,M,,*47" #define DUMMY_NMEA_SENTENCE_1 ...
/* * Frame.cpp * * Created on: Jul 27, 2015 * Author: richard * * Copyright 2017 <NAME> * Licensed under the MIT License */ #include "Frame.h" #include <opencv2/core/cvdef.h> #include <opencv2/core/mat.hpp> #include <opencv2/core/mat.inl.hpp> #include <opencv2/core/types.hpp> #include <opencv2/imgcode...
/* Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd. 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 ...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: defines a RCon class used to send rcon commands to remote servers // // $NoKeywords: $ //============================================================================= #include "banlist.h" #include "Iresponse.h" #include "Playe...
// <NAME>, CS 549 HW 5 #include "opencv2/opencv.hpp" #include <stdio.h> #include <vector> #include <cmath> #include <numeric> using namespace cv; using namespace std; typedef enum { DISPLAY_RAW, DISPLAY_SOBEL, DISPLAY_HOUGH, DISPLAY_LINE, DISPLAY_COUNT } DisplayMode; // Taken from http://stackoverflow.com/ques...
#include "acsedo.h" void Acsedo::webSocketEvent(WStype_t type, uint8_t * payload, size_t lenght) { switch(type) { case WStype_DISCONNECTED: DEBUG_PRINT("[WSc] Disconnected!\n"); break; case WStype_CONNECTED: { DEBUG_PRINT("[WSc] Connected to url: ...
#include <vector> #include <string> #include <opencv2/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/features2d.hpp> #include <opencv2/xfeatures2d.hpp> #include <opencv2/xfeatures2d/nonfree.hpp> #include "dataStructures.h" #include "matching2D.hpp" using name...
#include "radio.hpp" /* o trecho: vector_robos(v) serve para acoplar o vector com os robos a classe de transmissao */ Radio::Radio(std::vector<Robo>& v) : vector_robos(v) { /* abrindo a porta serial para leitura e escrita */ USB = open(caminho_dispositivo, O_RDWR| O_NOCTTY | O_NDELAY); /* setando todos os campos ...
#include <iostream> #include "example_config.hpp" // for setting up which string_view implementation is used #include "svbb/split.hpp" #include "svbb/util.hpp" // svbb::make_view #include <stdlib.h> #include <chrono> #include <vector> #include <string> #include <sstream> // std::stringstream #include <string.h> #i...
#include <stdio.h> #include <unistd.h> #include <stdint.h> #include <stdarg.h> #include <errno.h> #include <stdlib.h> #include <execinfo.h> using namespace std; #include <log.h> #include <list> static list<char *> tmp_data; int32_t c_log_runtime_level = C_LOG_RUN_LEVEL; const char *strbacktrace ( int32_t levels, c...
/* * Copyright (c) 2012 The Trustees of University of Illinois. * All rights reserved. * * Author(s): <NAME> <<EMAIL>> * */ /* * dsde_exchange_reduce_scatter.cpp * * Created on: Dec 8, 2011 * Author: htor */ #include "dsde_internal.h" typedef struct { DSDE_Free_fn free_fn; ///< t...
#include "constants.hpp" #include "game_object.hpp" #include "maze/maze.hpp" #include "objects/character.hpp" #include <cstdlib> #include <list> Maze::Maze() { // Initiate cells for (int i = 0; i < NCOLS; i++) { std::vector<Cell> temp; for (int j = 0; j < NROWS; j++) { temp.push_ba...
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <fstream> #include <string> #include <string_view> #include <vector> #include <iostream> #include <filesystem> #include <thread> #include <taskflow/taskflow.hpp> #include "parallel_hashmap/phmap.h" #include "split_file.hpp" #include "compare_files.hp...
/* * linux/kernel/fork.c * * (C) 1991 <NAME> */ /* * 'fork.c' contains the help-routines for the 'fork' system call * (see also system_call.s), and some misc functions ('verify_area'). * Fork is rather simple, once you get the hang of it, but the memory * management can be a bitch. See 'mm/mm.c': 'copy_pag...
/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* -----------------------------...
/* * Copyright (C) 2018 by Author: Aroudj, Samir * TU Darmstadt - Graphics, Capture and Massively Parallel Computing * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the License.txt file for details. */ #include "Math/MathHelper.h" #incl...
// // Created by kawa on 9/30/18. // #include "convert.hpp" ConvertPCL::ConvertPCL() : camera_matrix (cv::Mat_<double>(3, 3)), dist_coeffs (cv::Mat_<float>(1, 5)), degree (180/3.1415926), count (0) { load = new loadParams(); setupParams(); startSenser(); setupArUco(); } Conve...
#include "MoteInterface.h" #include <stdio.h> #include <thread> MoteInterface::MoteInterface(){ enableOperation = true; } MoteInterface::~MoteInterface(){ //#ifdef __linux__ // close(s); //#elif _WIN32 // closesocket(s); // WSACleanup(); //#else // //#endif } void MoteInterface::startMoteUDPInterface(uint16_t port...
// __BEGIN_LICENSE__ // Copyright (c) 2006-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NASA Vision Workbench is licensed under the Apache License, // Version 2.0 (the "License"); you may not use this f...
#include <iostream> #include "BpSinkAsync.h" #include "BpSinkAsyncRunner.h" #include "SignalHandler.h" #include <boost/filesystem.hpp> #include <boost/program_options.hpp> #include <boost/lexical_cast.hpp> #include "Uri.h" void BpSinkAsyncRunner::MonitorExitKeypressThreadFunction() { std::cout << "Keyboard Interru...
/* * Copyright (c) 2008 <NAME>, <NAME>, <NAME> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR...
#include <glib-unix.h> #include <glib.h> #include <stdlib.h> #include <unistd.h> #include <algorithm> #include <cstdlib> #include <iostream> #include <memory> #include <sstream> #include <thread> #include <vector> #include "nvm_programmer.h" #include "updi_common.h" using namespace updi; using namespace std; static...
#include "m3g/m3g.hpp" #include "data.hpp" #include <GL/glut.h> #include <iostream> #include <vector> using namespace std; using namespace m3g; std::vector<Object3D*> objs; World* wld = NULL; static void draw_string (int x, int y, const char* s) { while (*s) { glWindowPos2i (x+=8, y); glutBitmapC...
#include "route.h" const double INFINITY = 0x0FFFFFF; Route::Route() : startID(-1), endID(-1), isHOV(false), pathCalculated(false) { for(int i= 0; i < MAX_NODES; i++) //default to empty graph { nodeCost[i] = INFINITY; //shortest cost to get to node from start sourceNode[i] = -1; //number of node we ca...
#include <bits/stdc++.h> using namespace std; const int MOD = 998244353; // 998244853; template <typename T> struct modular { constexpr modular() : val(0){} constexpr modular(const modular<T>& _m) : val(_m.val) {} template <typename U> constexpr modular(const U& _r = U()) { val = -MOD <= _r && _...
// multiplication.cpp : test suite runner for multiplication of abitrary precision integers // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include <iostream> #include <string> // configure the ...
#include <cassert> #include <tuple> #include <string> #include "shadowlru.h" #include "shadowslab.h" #include "mc.h" #include "common.h" shadowslab::shadowslab(stats stat) : Policy{stat} , slabs{} , slabids{} , slab_for_key{} , next_slabid{0} , size_curve{} , slab_count{} { if (stat.memcachier_clas...
#include <iostream> #include <vector> #include <cmath> #include <string.h> #include "complex.h" #include "input_image.h" #include <thread> using std::vector; struct horizThread_data { Complex *dftData; Complex *data; int iH; int width; int expOp; Complex sumOp; }; struct vertThread_data { ...
#include <benchmark/benchmark.h> #include <cstring> #include <type_traits> #include <utility> #include <optional> #include <vector> #include "robin-hood-set.h" #include "ska-flathash.h" inline unsigned bernstein_hash(const char *s) { unsigned hashv = 0; while (*s) hashv = 33*hashv + *s++; return hashv; } ...
#include <dirent.h> #include <unistd.h> #include <string> #include <vector> #include <iostream> #include <iomanip> #include "../include/linux_parser.h" using std::stof; using std::string; using std::to_string; using std::vector; // DONE: An example of how to read data from the filesystem string LinuxParser::Operati...
/*========================================================================* * * * Distributed by Whiteley Research Inc., Sunnyvale, California, USA * * http://wrcad.com * * Copyright (...
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <numeric> using namespace std; // --------------------K-Center Problem-------------------- // This is a Greedy Algorithm, what try to solve the K-Center // NP-Hard Problem in Polinomal Time. // !This is NOT the standard Greedy algo fo...
/*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. ** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtBluetooth module of the Qt Toolkit. ** ** $QT_BEGIN_L...
struct Ponytail { struct Adj { cxSphere mSph; int mJntId; }; struct Node { cxMtx mWMtx; cxMtx mPrevWMtx; cxVec mPos; cxVec mPrevPos; cxVec mAdd; float mMaxDist; float mForce; float mRate; float mLimitTheta; float mLimitPhi; int mJntId; uint32_t mAttr; }; ScnObj* m...
#include <iostream> #include "app_window.h" #include <stdio.h> #include <rtools\ai\textures.h> #include <rtools\ai\material.h> #include <rtools\ai\mesh.h> #include <rtools\ai\shaders.h> #include <rtools\post\deferred.h> #include <game\models\model_laser.h> #include <game\particle\particles.h> #define PI_F 3.151592654...
#include <cassert> #include <iostream> #include <vector> #include "sphere.h" #include "cylinder.h" #include "hollow_sphere.h" #include "ellipsoid.h" #include "single_helix.h" #include "iq.h" using namespace std; void TestGetFormFactor_sphere() { Sphere sphere(1.0); IQ iq1(10,0.001, 0.3); sphere.GetFormFactor(&...
#include <iostream> #include <string> #include "debug.h" static bool debugMode = false; std::string color (Color color, std::string text) { return std::string () + "\033[" + std::to_string (30 + color) + "m" + text + "\033[m" ; } void printFact (const Domain & domain, const Fact & fact) { const Predicate &...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #include <windows.h> #include "CreateModWizard.h" #include "sdklauncher_main.h" #include "filesystem_tools.h" #include "sdklauncherdialog.h" ...
#include "camera.h" #include "input.h" #include "mytime.h" #include "vec3math.h" #include <windows.h> #include <string> #include <iostream> extern bool m_mouseLocked; extern int camera_mode; extern int camera_switch_cd; const glm::vec3 Camera::UP(0,1,0); const glm::vec3 Camera::DOWN(0,-1,0); const glm::vec3 Camera:...
/* 朴素dijkstra算法 O(n^2+m), n 表示点数 m 表示边数 */ const int N = 510, M = 100010; int h[N], e[M], ne[M], w[M], d[N], idx; bool v[N]; //是否被访问过 该节点 int n, m; void dijkstra() { d[1] = 0; for (int i = 1; i < n; i++) { int x = 0; for (int j = 1; j <= n ; j++) if (!v[j] && (x == 0 || d[x] > d[j])...
#include <iostream> using std::cout; using std::endl; #include <string> using std::string; #include <unordered_set> using std::unordered_set; #include <sstream> using std::stringstream; #include <map> using std::map; using std::multimap; #include <vector> using std::vector; #include <algorithm> #include <utility> #inc...
#include <mqtt_monitor/mqtt_ur_monitor.h> #include "../include/mqtt_monitor/mqtt_ur_monitor.h" MqttUrMonitor::MqttUrMonitor(ros::NodeHandle nh) : nh_(nh) { start_time = ros::Time::now(); update_time = start_time; nh_.param<bool>("is_sim", in_cloud, false); ROS_INFO_STREAM("Is This Node in AWS Cloud? " << in...
/* * WED_Orthophoto.cpp * SceneryTools * * Created by bsupnik on 5/26/09. * Copyright 2009 Laminar Research. All rights reserved. * */ #include "WED_Orthophoto.h" #include "IGIS.h" #include "WED_ToolUtils.h" #include "WED_Ring.h" #include "WED_TextureNode.h" #include "WED_TextureBezierNode.h" #include "WED_...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define gc getchar() #define pc(x) putchar(x) template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;} template<typename T> void print...
/** \file velocity_jogging_node.cpp \brief * default frequency: 125. \author <NAME> \date 16/5/2019 */ #include "ros/ros.h" #include "six_dof_vel_controller.h" #include "ext_work.h" #include "std_msgs/Float64MultiArray.h" //#include "queue" //#include "s_curve_functions.cpp" const double sm=180, vm=130, am=...
// // Copyright (c) 2019, <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: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions a...