text
stringlengths
3.08k
22k
/** \file permutation_network.cpp \author <EMAIL> (Original in Java, <NAME>) \author <EMAIL> \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation Copyright (C) 2015 Engineering Cryptographic Protocols Group, TU Darmstadt This program is free software: you can redistribute...
/* =============================================================================== FILE: lasexample_add_rgb.cpp CONTENTS: This source code serves as an example how you can easily use LASlib to read one LAS / LAZ file without RGB colors and write a LAS / LAZ file with RGB colors. P...
// Copyright (c) 2017 olibre <<EMAIL>> // // This file is licensed under the "Fair License": // Usage of the works is permitted provided // that this instrument is retained with the works, // so that any entity that uses the works // is notified of this instrument. // DISCLAIMER: THE WORKS ARE WITHO...
#include <iostream> #include <iomanip> #include <fstream> #include <chrono> #include <vector> #include <cmath> #include <cstdlib> #include <functional> #include <sstream> #include <boost/multiprecision/cpp_bin_float.hpp> #include <boost/multiprecision/cpp_int.hpp> #include "psm.h" using namespace std; using namespac...
// This is brcv/shp/dbsk2d/algo/dbsk2d_bnd_preprocess_arcs.cxx //: // \file #include "dbsk2d_bnd_preprocess.h" #include <vcl_algorithm.h> #include <vgl/vgl_distance.h> #include "../../dbgl/algo/dbgl_circ_arc.h" #include "../../dbgl/algo/dbgl_closest_point.h" #include "../dbsk2d_bnd_utils.h" #include "../dbsk2d_i...
#include "test.hh" template<typename Value_t1, typename Value_t2, std::size_t kSize> static bool checkAddition(const Value_t1& value1, const Value_t2& value2, const WMPUInt<kSize>& expectedResult) { const WMPUInt<kSize> result = value1 + value2; if(result != expectedResult) re...
/* * DJI_Pro_App.cpp * * Created on: Mar 17, 2015 * Author: <NAME> */ #include "DJI_Pro_Link.h" #include "DJI_Pro_App.h" #include <string.h> #include <stdio.h> #include <pthread.h> #include <sys/time.h> #include <unistd.h> static dji_sdk_data_msg_t recv_data = {0}; static unsigned char Pro_Encode_Data[102...
// // Copyright (c) 2017 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
#include "gtest/gtest.h" #include <iostream> #include <cmath> #include <iomanip> #include <string> #include <sstream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include "cuImage.h" #include "cuSIFT.h" #include "extras/rigidTransform.h" #include "ex...
#include <OdaCommon.h> #include "DbArcGripPoints.h" #include <DbArc.h> #include <Ge/GeCircArc3d.h> #include <Ge/GeMatrix3d.h> #include "OdGripPointsModule.h" OdResult OdDbArcGripPointsPE::getGripPoints(const OdDbEntity* entity, OdGePoint3dArray& gripPoints) const { const auto GripPointsSize {gripPoints.size()}; OdDb...
// ***************************************************************************** /*! \file src/PDE/Integrate/Volume.cpp \copyright 2012-2015 <NAME>, 2016-2018 Los Alamos National Security, LLC., 2019 Triad National Security, LLC. All rights reserved. See the LICENSE file ...
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
#include "StatsCounter.hpp" #include "Command.hpp" #include "Event.hpp" #include "Features/Speedrun/SpeedrunTimer.hpp" #include "Modules/Engine.hpp" #include "Modules/Server.hpp" #include <fstream> #include <iomanip> #include <iostream> #include <numeric> #include <sstream> Variable sar_statcounter_filePath("sar_sta...
/* * * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
/* PowerLogger DIY multi-channel voltage/current data logger https://github.com:avaldebe/PowerLogger/ Based on - DisplayReadings example fom INA library https://github.com/SV-Zanshin/INA - QuickStart example form the SdFat library https://github.com/greiman/SdFat - Object example on the CircularBuffer library ...
/* * Copyright 2021 The Modelbox Project 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 requi...
/** * Copyright (C) 2020 Xilinx, Inc * * 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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
/* * test_mat4.cpp * test_runner * * Created by Justin on 29/09/08. * Copyright 2008 Monkey Style Games. All rights reserved. * */ #include <UnitTest++.h> #include "math/mat4.h" #include "math/vec4.h" namespace // private { struct Fixture { Fixture() : m_mat4( Lxt::Vec4( 0.0f, 1.0f, 2.0f, ...
//***************************************************************************** // Copyright 2017-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
/**********************************************************************/ // A generic stencil-based 3D Jacobi solver // // Course Material for HPCSE-II, Spring 2019, ETH Zurich // // Authors: <NAME> // // License: Use if you like, but gi...
#include <Mesh.h> Mesh::Mesh(const std::vector<Triangle>& triangleList, size_t materialId, bool softShadingFlag) { this->bvhRoot = new BVH(triangleList, 0, 200, 0); this->materialId = materialId; this->softShadingFlag = softShadingFlag; } bool Mesh::Intersect(const Ray& ray, IntersectionReport&...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <malloc.h> #include <new.h> #include <windows.h> #include "base/basictypes.h" // This shim make it possible to perform additional checks on...
/** * @file ComPc.cpp */ #include "ComPc.h" ComPc::ComPc(USART_TypeDef *port) : Usart(huart1) { __HAL_RCC_USART1_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PUL...
// // Created by <NAME> on 2019-07-30. // #include <cmath> #include <algorithm> #include <vector> #include <fstream> #include <unistd.h> #include "SSATANX.h" #include "utilities/Utility.h" #include "algorithms/AndersonTauLeap.h" std::mt19937_64 SSATANX::generator{std::random_device{}()}; SSATANX::SSATANX() { gen...
/* * Copyright (c) 2020 Advanced Micro Devices, Inc. * All rights reserved. * * For use for simulation and test purposes only * * 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 cod...
/* @file sample_rawrecord.cpp * @brief Example of recording data in raw format and compressed (zip). * * @section LICENSE * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABI...
#include <iostream> #include <string> #include <experimental/filesystem> #include <thread> #include "WorkersHub.h" #include "main.h" #include "anyoption.h" #include "Config.h" #include "Output.h" #include "Input.h" #include "Worker.h" using namespace std; AnyOption* get_args(int argc, char** argv); string test_int(co...
#include "geometrycentral/arap.h" #include <Eigen/SparseCholesky> #include <Eigen/SVD> #include <Eigen/Dense> using namespace geometrycentral; ARAP::ARAP(HalfedgeMesh* m, Geometry<Euclidean>* g) : mesh(m), geom(g), vertexIndices(mesh), isoTriangleParam(mesh), uvCoords(mesh) { vertexIndices = mesh->getVertexIndices...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004-2019 musikcube team // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redist...
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
/* * Copyright (C) 2017 The Android Open Source Project * * 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 app...
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2011 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the Licens...
//===- odla_compute.cc ----------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // Copyright (c) 2020 Graphcore Ltd. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance ...
#include "IntegerFunctionTests.h" bool testIntegerFunctions(std::string &reportString) { std::string testName = "rsIntegerFunctions"; bool testResult = true; testResult &= testIntAbs(reportString); testResult &= testBinomialCoefficients(reportString); testResult &= testMultinomialCoefficients(reportString);...
/* * mod_v8 for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * Copyright (C) 2013-2014, <NAME> <<EMAIL>> * * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with...
// // Created by <NAME> on 2019-12-05. // //UnitTest16 //Random size from 1 to 1000000 //This unit test is WIP #define LOSSRATE 2 // 2% lost frames #define BROKEN 2 // 2% superframes broken #define OUTOFORDER 10 // 10% out of order deliveries #define NUMBER_TOTAL_PACKETS 1000 //Number of total packets sent in this u...
#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Framework/interface/makeRefToBaseProdFrom.h" #include "FWCore/ParameterSet/interface/Parame...
// Original work Copyright (c) 2017, University of Minnesota // Modified work Copyright 2019, <NAME> // // ADMM-Elastic Uses the BSD 2-Clause License (http://www.opensource.org/licenses/BSD-2-Clause) // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the f...
/************************************************************************** stereo.cpp - Layer III IS stereo decoding subroutines. Author(s): <NAME> Copyright (c) 1999-2000 <NAME>. *************************************************************************/ /*****************************************************...
// Tencent is pleased to support the open source community by making Mars available. // Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. // Licensed under the MIT License (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the Licens...
/* Copyright (c) 2014 UCR-UAS * You should have recieved a copy of the MIT license with this file. * Engineer: <NAME> * Description: This is the BISON-Transfer server version. * What dose it do? Tarring and insanity. * This is indeed a child-processed server. */ // ================= TODO ================= // Re...
// This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2002, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here...
/* * Copyright (c) 2007 MIPS Technologies, 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 condi...
#include "InventoryConfig.h" #include "GameItems/Lookup.h" #include "Inventory/Item.h" #include "Inventory/Structs.h" #include "Inventory/StructsFromJson.h" #include "Backend/BackendSimulator.h" #include "StaticData.h" #include "Backend/Response/ResponseHandler.h" #include "GameIntegration/Inventory.h" constexpr a...
#pragma once #include <boost/iterator/iterator_adaptor.hpp> #include <iostream> #include "fmmtl/meta/func_traits.hpp" template <typename Kernel> struct KernelTraits { public: typedef KernelTraits<Kernel> self_type; typedef Kernel kernel_type; typedef type...
/* Copyright 2021 larkwiot 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 writin...
/* * Copyright 2020 Google, LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/core/SkCanvas.h" #include "include/core/SkDeferredDisplayList.h" #include "include/core/SkDeferredDisplayListRecorder.h" #include "include/core/SkPaint.h" #i...
#include "helper_functions.h" #include "operator.h" #include "variable.h" #include "h2_mutexes.h" #include <cassert> #include <iostream> #include <fstream> using namespace std; Operator::Operator(istream &in, const vector<Variable *> &variables) : spurious(false) { check_magic(in, "begin_operator"); in >> ws; ...
/****************************************************************************** * Copyright 2018 The Apollo 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 ...
// ALGORITHM: // Left wall portion. // Explore all components emanating from a gint within jumpSize of left wall // of the current block. Use the sieve array to mark any gint that has been // visited along the way. If we punch through the right-hand side of the block, // immediately stop and replace current block with ...
/* * Copyright (c) 2019, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
#include <Rcpp.h> #include <stdlib.h> #include <cstring> using namespace Rcpp; // Definitions of structures, etc struct node { // for variable nodes (individuals) int idx; char name[30]; // the ID of the individual int is_sample; // 1 if the individual is part of the sample int n_up; // number of ...
#include <stdio.h> #include <iostream> #include <vector> #include <string> #include <cmath> #include <cstring> #include "timer.hpp" #include "common.h" #include "mmio.h" // Intel MKL libraries #include "mkl.h" #include "mkl_blas.h" #include "mkl_spblas.h" #include "mkl_service.h" using namespace std; /*** so...
//===-- LibiptDecoder.cpp --======-----------------------------------------===// // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===------------------------------...
#include "gamehud.h" GameHUD::GameHUD() { _topGfx = Hardware::getTopGfx(); _bottomGfx = Hardware::getBottomGfx(); } void GameHUD::drawTimerBar(s32 remainingTime) { // Rather than draw a bar representing the amount of time left to elapse, // we overwrite the existing graphics from right to left with a b...
/************************************************************************* * * * Tokamak Physics Engine, Copyright (C) 2002-2007 <NAME>. * * All rights reserved. Email: <EMAIL> * * Web: www.to...
/* Space Marine - <NAME>, Copyright 2013 */ #include "spm_defines.h" #include "spm_game.h" #include "spm_surface.h" #include "spm_camera.h" #include "spm_timer.h" #include "spm_enemy.h" #include "spm_static.h" #include "spm_pickup.h" #include "spm_collision.h" #include "spm_bitmap_font.h" #include "spm_soundfx.h" #inc...
#include "tile.h" #include "mandelbrot.h" #include <iostream> using PrecType = MandelbrotHolder::PrecType; using Complex = MandelbrotHolder::Complex; MandelbrotHolder::MandelbrotHolder(std::function<void()> scheduler) : scheduler(std::move(scheduler)) , threading(std::thread::hardware_concurrency() > 1 ? std::thre...
#include <string> #include <sys/resource.h> #include "lib/EasyBMP.h" #include <omp.h> #include <stdint.h> #include <mpi.h> #define N 1000 #define CHUNKSIZE 100 using namespace std; long double tiempo(void){ struct rusage usage; getrusage(RUSAGE_SELF,&usage); return( (long double) usage.ru_utime.tv_sec + (l...
#include "RecoPixelVertexing/PixelVertexFinding/interface/PixelVertexProducer.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include "DataFormats/VertexReco/interface/VertexFwd.h" #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" #include ...
/* Copyright (C) 2019 IBM Corp. * This program is 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...
// // Cubism3D // Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland. // Distributed under the terms of the MIT license. // // Created by <NAME> (<EMAIL>) and // <NAME> (<EMAIL>). // #include "smarties.h" #include "Simulation.h" #include "operators/SGS_RL.h" #include "spectralOperators/SpectralManip.h" #include...
/***************************************************************************** * McPAT * SOFTWARE LICENSE AGREEMENT * Copyright 2012 Hewlett-Packard Development Company, L.P. * All Rights Reserved * * Redistribution and use i...
#include "pch.h" #include "TriAcePS1Scanner.h" #include "TriAcePS1Seq.h" #include "TriAcePS1InstrSet.h" #include "VGMColl.h" using namespace std; #define DEFAULT_UFSIZE 0x100000 TriAcePS1Scanner::TriAcePS1Scanner() = default; TriAcePS1Scanner::~TriAcePS1Scanner() = default; void TriAcePS1Scanner::Scan(RawFile *fi...
/*! * \file WiredTable.hpp * \author <NAME> * \copyright (c) 2019-2020 <NAME>. * The project is released under the MIT License. * \date January 29, 2020: created */ #pragma once #include <type_traits> #include <algorithm> #include <vector> #include <list> #include <stdexcept> #include "utils.hpp" #include "Col...
/* Copyright (c) 2016, 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 ...
#include <memory> #include <toppra/algorithm/toppra.hpp> #include <toppra/constraint.hpp> #include <toppra/constraint/linear_joint_acceleration.hpp> #include <toppra/constraint/linear_joint_velocity.hpp> #include <toppra/geometric_path.hpp> #include <toppra/geometric_path/piecewise_poly_path.hpp> #include <toppra/toppr...
#include "glslfx/glslfx.h" #include <GL/glew.h> #include <GL/glx.h> #include <cstdio> #include <cstring> static int level = 1; /* verbosity level: 0-2 where 0 is quiet */ static enum { VALIDATE, ENUMERATE } mode = VALIDATE; #ifndef TESS_EVALUATION_SHADER # define TESS_EVALUATION_SHADER 0x8E87 # define TESS_CONTROL_...
/*** DEVSIM Copyright 2013 Devsim 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 of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
#include <string.h> #include <iostream> #include <math.h> #include "FireLog.h" #include "FireSight.hpp" #include "version.h" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "jansson.h" #include "MatUtil.hpp" #include "jo_util.hpp" usin...
#include "leetcode.hpp" /* 879. 盈利计划 帮派里有 G 名成员,他们可能犯下各种各样的罪行。 第 i 种犯罪会产生 profit[i] 的利润,它要求 group[i] 名成员共同参与。 让我们把这些犯罪的任何子集称为盈利计划,该计划至少产生 P 的利润。 有多少种方案可以选择?因为答案很大,所以返回它模 10^9 + 7 的值。 示例 1: 输入:G = 5, P = 3, group = [2,2], profit = [2,3] 输出:2 解释: 至少产生 3 的利润,该帮派可以犯下罪 0 和罪 1 ,或仅犯下罪 1 。 总的来说,有两种方案。 示例 2: 输入:G = 10, ...
// Copyright (c) 2020-2021 AVME Developers // Distributed under the MIT/X11 software license, see the accompanying // file LICENSE or http://www.opensource.org/licenses/mit-license.php. #include <qmlwrap/QmlSystem.h> void QmlSystem::loadARC20Tokens() { QmlSystem::w.loadARC20Tokens(); } QVariantList QmlSystem::getA...
/* * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
#include "../KoralFX.hpp" #include "../KoralfxComponents.hpp" #include <string> struct Beatovnik : Module { enum ParamIds { WIDTH_PARAM, TIME_PARAM, TIME_T_PARAM, NUM_PARAMS }; enum InputIds { CLOCK_INPUT, NUM_INPUTS }; enum OutputIds { CV_OUTPUT, BEAT2X_MUL_OUTPUT, BEAT4X_MUL_OUTPUT, BEAT2X...
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
#include <iostream> #include "../../optixdvr/optixdvr.hpp" #include "../../optixdvr/optixdvr_instance.hpp" #include "../../optixdvr/utils/argparse.hpp" void SetUpAndParseArgs(int argc, char *argv[]) { /* Set up available program arguments */ Arguments::AddFlagArgument("Lighting", "-l", "--enable_lighting"); Argume...
/* Copyright (c) 2010-2012, <NAME> - All rights reserved. This code is intended for use with the Cinder C++ library: http://libcinder.org Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source c...
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef unsigned long long llu; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef pair<int, int> pii; typedef pair<...
#include "PolyFinder.hpp" Poly::Poly(int _termSize, std::vector<int>& _power) { termSize = _termSize; power = _power; } void Poly::PrintPolyInfo() { printf("For inputs in the range of: \n"); printf("%.20lf ~ %.20lf\n", xlb, xub); if (termSize == 0) { printf("How can a polynomial have no t...
/** * @file april_tags.cpp * @brief Example application for April tags library * @author: <NAME> * * Opens the first available camera (typically a built in camera in a * laptop) and continuously detects April tags in the incoming * images. Detections are both visualized in the live image and shown * in the text...
// SquareOne.cpp #include "SquareOne.h" #include <wx/debug.h> wxIMPLEMENT_DYNAMIC_CLASS( SquareOne, TwistyPuzzle ); SquareOne::SquareOne( void ) { topCutShapeHandle = 0; bottomCutShapeHandle = 0; rightCutShapeHandle = 0; leftCutShapeHandle = 0; wedgeAngle = M_PI / 6.0; topRight = nullptr; t...
//////////////////////////////////////////////////////////////////////////////// // // Package: Eudoxus // // SubPackage: GStreamer // // Plug-Ins: libgstonipduenc, libgstonipdudec // // File: gstonipdu.cxx // /*! \file * * $LastChangedDate: 2015-11-20 15:52:58 -0700 (Fri, 20 Nov 2015) $ * $Rev: 4213 ...
/********************* */ /*! \file sets_translate.cpp ** \verbatim ** Original author: <NAME> ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York Universi...
// link to the problem https://adventofcode.com/2021/day/23 #include <algorithm> #include <iostream> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> const std::unordered_map<char, int> char_factor{ {'A', 1}, {'B', 10}, {'C', 100}, {'D', 1000}}; using...
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- #include <RcppArmadillo.h> #include <lemon/list_graph.h> #include <lemon/dfs.h> #include <lemon/lgf_reader.h> #include <lemon/adaptors.h> #include "findPath.h" #include <iostream> #include <fstream> #include <string> using namespace Rc...
/* ** ClanLib SDK ** Copyright (c) 1997-2016 The ClanLib Team ** ** 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 is granted to anyone to use this software for a...
// CumNormalInv.c // Author: <NAME> #include <stdio.h> #include <math.h> #include <stdlib.h> #include "HJM_type.h" FTYPE CumNormalInv( FTYPE u ); void CumNormalInv_vector( FTYPE* u ,FTYPE* output ,unsigned long int gvl); /**********************************************************************/ static FTYPE a[4] = ...
/* * Copyright © 2012 Linaro Limited * * This file is part of the glmark2 OpenGL (ES) 2.0 benchmark. * * glmark2 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 y...
#include <iostream> #include <unordered_set> #include <thread> #include <mutex> #include <condition_variable> #include <ConciseArgs> #include <lcm/lcm-cpp.hpp> #include <bot_lcmgl_client/lcmgl.h> #include <maps/Collector.hpp> #include <maps/Utils.hpp> #include <maps/MapManager.hpp> #include <maps/LocalMap.hpp> #incl...
// Copyright 2021 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 of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
#include "Framework.h" Camera::Camera() : moveSpeed(200.0f), rotSpeed(0.004f), wheelSpeed(1000.0f), target(nullptr), distance(20.0f), height(20.0f), moveDamping(5.0f), rotDamping(0.0f) { tag = "CameraTransform"; viewBuffer = new ViewBuffer(); view = XMMatrixIdentity(); //Load(); } Camera::~Camera() { //Save(...
#include <iostream> #include <fstream> #include <allegro.h> #include <time.h> using namespace std; #define DIM 10 #define HALL 'X' #define PAC 'P' #define DIAMOND '-' #define DEMON 'D' #define EMPTY 'Y' #define SPRITE_SIZE 50 #define UP 3 #define RIGHT 0 #define DOWN 1 #define LEFT 2 #define BORD 10 bool load_map(cha...
/** * A place for C++ stuff, since for now it cannot be avoided (IMGUI mostly). * * @file cpp_stuff.cpp * @date Jun 5, 2021 * @author <NAME> */ #include "cpp_stuff.h" #include "SDL.h" #include "imgui.h" #include "program.h" #include "stb_sprintf.h" // stbsp_snprintf #include "math.h" // ...
/* Copyright 2017 <NAME> This file is part of TopNetCpp, a translation and enhancement of Fortran TopNet. TopNetCpp 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 Li...
#include <Graphics/SpriteBatch.h> #include <Graphics/TextureRegion.h> #include <Utils/Logger.h> #include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/Texture.hpp> #include <glm/glm.hpp> const unsigned short VERTICES_IN_QUAD = 4; SpriteBatch::SpriteBatch(sf::RenderTargetPtr renderTarget, int capacity) ...
/** * 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 "helper_functions.h" using std::string; using ...
/*! @file test_orientation_tools.cpp * @brief Test orientation functions * * Test the orientation related functions in orientation_tools.h * Does not check any spatial stuff */ #include "Math/orientation_tools.h" #include "gmock/gmock.h" #include "gtest/gtest.h" using namespace ori; /*! * Check radians to deg...
// Copyright (c) 2022, ETH Zurich and UNC Chapel Hill. // 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 // notic...
/* * Copyright 2020 <NAME>, <NAME>, and <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...