text
stringlengths
3.08k
12.5k
// This is core/vnl/algo/vnl_cholesky.cxx #ifdef VCL_NEEDS_PRAGMA_INTERFACE #pragma implementation #endif //: // \file // vnl_cholesky // \author <NAME>, Oxford RRG // Created: 08 Dec 96 // //----------------------------------------------------------------------------- #include <cmath> #include <iostream> #include "vn...
#pragma once #include <memory> #include <stdexcept> #include <volk.h> #include <vk_mem_alloc.h> #include "context.hpp" #include "log.hpp" #define VREN_DEFINE_VK_RAII(_raii_t, _t, _dtor_lambda) \ namespace vren { \ using _raii_t = vren::vk_handle_wrapper<_t>; \ } \ \ template<> \ inline void vren:...
/* * Copyright 2012 <NAME>, CRACS & INESC-TEC, DCC/FCUP * * 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...
#include "puzzle/database.hpp" #include "boost/dynamic_bitset.hpp" #include "boost/filesystem.hpp" #include <queue> #include <bitset> PatternDatabase::PatternDatabase(int n, const vector<int> &tracked) : n(n), m_tracked(tracked) { m_size = 1; m_map.resize(n*n); m_multiple.reserve(tracked.size()+1); ...
#include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include <SDL2/SDL_mixer.h> #include <Box2D/Box2D.h> #include <iostream> #include <string> #include <ctime> #include <cmath> // Bivrost // The frames per second const int FRAMES_PER_SECOND = 60; const int SCREEN_TICKS_PER_FRAME = 1000 / FRAMES_PER_SECOND; const int S...
#include <math.h> #include <iostream> #include <GLUT/glut.h> #include "ParticleSystem.h" using namespace std; ParticleSystem::ParticleSystem() { fuel = 0; angle = 0.0; label = false; } void ParticleSystem::newSpeed(float destination[3]) { float x, y, z; float len; x = (2.0 * ((GLfloat) rand ()) / ((GLfloat) ...
/** * @file llfloaterhardwaresettings.cpp * @brief Menu of all the different graphics hardware settings * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify i...
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ #include "graph.hh" #include <stdexcept> #include "ggutils.hh" #include "thunk.hh" #include "thunk_reader.hh" #include "thunk_writer.hh" using namespace std; using namespace gg; using namespace gg::thunk; string ExecutionGraph::add_thunk...
/** * Copyright 2020 Huawei Technologies Co., Ltd * * 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 ...
#include <iostream> #include <optional> #include <string> #include <ros/ros.h> #include <geometry_msgs/PoseStamped.h> #include <geometry_msgs/Transform.h> #include <geometry_msgs/TransformStamped.h> #include <nav_msgs/Odometry.h> #include <message_filters/subscriber.h> #include <tf2/LinearMath/Quaternion.h> #include <t...
#include "src/RRTStar/rrt_star.h" #include "src/RRTStar/py_cpp_struct.h" #include <algorithm> #include <eigen3/Eigen/Dense> #include <vector> #include <map> double SPACEDIM = 2.0; double PI = 3.14159; extern "C" { Node* getRandomNodeWithinRadius(RRT *rrt) { Node *q_new = rrt->getRandomNode(); Nod...
#include "v8go.h" #include "v8.h" #include "libplatform/libplatform.h" #include <cstdlib> #include <cstring> #include <string> #include <sstream> #include <stdio.h> using namespace v8; auto default_platform = platform::NewDefaultPlatform(); auto default_allocator = ArrayBuffer::Allocator::NewDefaultAllocator(); ty...
#include <asteroid_scanner.hpp> #include <algorithm> #include <cassert> #include <cmath> #include <numeric> #include <ostream> Vector2::Vector2() :x(0), y(0) {} Vector2::Vector2(int xx, int yy) :x(xx), y(yy) {} bool operator==(Vector2 const& lhs, Vector2 const& rhs) { return (lhs.x == rhs.x) && (lhs.y =...
#include "CurvatureCurveFit.h" namespace CurvatureRegistry { registry<CurvatureCurveFit> registerCurvefit("curvefit"); } CurvatureCurveFit::CurvatureCurveFit(CurvatureInput& input) :Curvature(input) { input.pack.ReadNumber("neighbors", ParameterPack::KeyType::Optional, NumNeighbors_); } void CurvatureCurveFi...
#include "matrix.h" #include <iostream> #include <fstream> #include <vector> #include <math.h> #include <cstdlib> #include <cmath> #include <random> #include <ctime> #include <chrono> void read_fort(int &ntri, int &irad, int &nterm, std::vector<int> &triang2, std::vector<int> &trija2, std::vector<double...
// Real valued polynomials #include <vector> #include <complex> using namespace std; using ll = long long; /*snippet-begin*/ template<class T> struct poly_real { typedef complex<T> C; static int bitrev(int x, int n) { int y = 0; while (n--) y = (y << 1) | (x & 1), x >>= 1; ...
/** * @file core.cpp * @author Jiaoyi * @brief * @version 0.1 * @date 2021-03-16 * * @copyright Copyright (c) 2021 * */ #include <vector> #include "../include/carmi_common.h" #include "../include/carmi_external.h" #include "../include/construct/construction.h" #include "../include/func/calculate_space.h" #inc...
#include "tgaimage.h" #include "model.h" #include <limits> #include "softgl.h" #include "mathmatic.h" #include "phongshader.h" #include "depthshader.h" const TGAColor white = TGAColor(255, 255, 255, 255); const TGAColor red = TGAColor(255, 0, 0, 255); const TGAColor green = TGAColor(0, 255, 0, 255); Vec3f light_dir(1...
/* * ofxFourUpDisplay.cpp * emptyExample * * Created by <NAME> on 06/01/2011. * */ #include "ofxFourUpDisplay.h" ofxFourUpDisplay::ofxFourUpDisplay(ofScene3d *scene, ofRectangle rect) { this->scene = scene; movingCentre = false; x = rect.x; y = rect.y; width = rect.width; height = rect.height; // ...
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
// // Created by <NAME> on 2020/7/14. // #include "H264Parser.h" int H264Parser::Parse(std::string &file) { NALU_t *n; int buffersize=100000; //FILE *myout=fopen("output_log.txt","wb+"); FILE *myout=stdout; FILE *h264bitstream = fopen(file.c_str(), "rb+"); if (h264bitstream==NULL){ printf("Open file...
// Copyright 2019 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 w...
/** * Authors: <NAME> * Institutions: DroneMapper.com * Date: 05/01/2019 * Email: <EMAIL> */ #include <iostream> #include <sstream> #include <string> #include <opencv2/highgui/highgui.hpp> #include <opencv2/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #define WIN32_LEAN_AND_MEAN #include <wind...
#include <kernel/cpu/ports.hpp> #include <kernel/drivers/screen.hpp> #include <lib/memutils.hpp> // Print functions int print_char(char chr, int col, int row, char attr) { unsigned char *vid_mem = (unsigned char *)VGA_ADDRESS; // If text overflows, show a red 'E' in right bottom corner if (col >= MAX_COLS || r...
#include "stdafx.h" #include "Game.h" #include "MenuMain.h" #include "SplashScreen.h" #include "questions.h" #include "showText.h" #include "playingScreen.h" #include "IncorrectScreen.h" #include "correctScreen.h" #include "PauseScreen.h" #include "Player.h" #include "GameOverScreen.h" #include "HighScoreScreen.h" #inc...
#include "skully.h" void Skully::drawWatchFace(){ display.fillScreen(GxEPD_BLACK); display.setTextColor(GxEPD_WHITE); display.drawBitmap(0, 0, pirate, 200, 200, GxEPD_WHITE); drawTime(); drawWDay(); drawDate(); drawSteps(); //drawTemperature(); drawBattery(); for(uint8_t i=0; i<3;...
#include "aoc.h" static void parse_op(int64_t input, int64_t& opcode, int64_t& step, std::vector<int64_t>& param_modes) { param_modes.clear(); opcode = input % 100; switch (opcode) { case 1: // add case 2: // multiply case 7: // less-than case 8: // equals if (input > 99) param_mod...
#include <boost/graph/use_mpi.hpp> #include <boost/config.hpp> #include <boost/throw_exception.hpp> #include <boost/graph/distributed/adjacency_list.hpp> #include <boost/property_map/parallel/distributed_property_map.hpp> #include <boost/graph/distributed/mpi_process_group.hpp> #include <boost/graph/distributed/concept...
/* * $Revision: 565 $ $Date: 2011-02-15 16:00:43 -0800 (Tue, 15 Feb 2011) $ * * Copyright by Astos Solutions GmbH, Germany * * this file is published under the Astos Solutions Free Public License * For details on copyright and terms of use see * http://www.astos.de/Astos_Solutions_Free_Public_License.html */ ...
// Copyright 2021 <NAME> #include <cmath> #include <climits> #include <limits> #include "../../../3rdparty/unapproved/unapproved.h" #include "../../../modules/task_4/chesnokov_a_jarvis/jarvis.h" bool almost_equal(double x, double y, int ulp) { // the machine epsilon has to be scaled to the magnitude of the values u...
#include <Arduino.h> /* Este programa permite que um esp32 com o sensor DHT11 de temperatura e umidade, se conecte ao Azure IoT Central e envie telemetria e comandos ao dispositivo iot. No arquivo iot_configs possui as credencias do wifi e a string de conexão do dps. A string de conexão do dispositivo ...
#include <cmath> #include <exception> #include <iostream> #include <stdexcept> #include <string> #include <vector> #include <boost/lexical_cast.hpp> #include <boost/program_options.hpp> #include <frovedis.hpp> #include <frovedis/core/dvector.hpp> #include <frovedis/core/zipped_dvectors.hpp> #include <frovedis/matrix/...
#include <gtest/gtest.h> #include "libbmsdi/bmsdi_message.h" #include "libbmsdi/helpers.h" static void checkMessage( BMSDIMessage *msg, const uint8_t len, const uint8_t answer[] ) { //ASSERT_EQ( len, align32(len) ); uint8_t *data = (uint8_t *)msg; for( int i = 0; i < len; ++i ) { ASSERT_EQ( answer[i], ...
//===-- CSKYAsmBackend.cpp - CSKY Assembler Backend -----------------------===// // // 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 "Grid.h" #include <string> #include <istream> #include <stdio.h> /* printf */ #include <cstring> #include <fstream> #include <sstream> #include <cstdlib> Grid::Grid(const char* fileName, int startX, int startY) : sX(startX), sY(startY), width(0), height(0) { minNode = NULL; minPathLen...
/*************************************************************************** * tests/mng/test_bmlayer.cpp * * Part of FOXXLL. See http://foxxll.org * * Copyright (C) 2007 <NAME> <<EMAIL>> * Copyright (C) 2009 <NAME> <<EMAIL>> * Copyright (C) 2013 <NAME> <<EMAIL>> * * Distributed under the Boost Software ...
// // ParticleManager.cpp // Iyan3D // // Created by Karthik on 01/02/16. // Copyright © 2016 Smackall Games. All rights reserved. // #include "ParticleManager.h" ParticleManager::ParticleManager() { type = NODE_TYPE_PARTICLES; startColor = Vector4(1.0,1.0,1.0,1.0); midColor = Vector4(1.0, 1.0, 0.0, 1...
#include<bits/stdc++.h> #include<unistd.h> using namespace std; #define FZ(n) memset((n),0,sizeof(n)) #define FMO(n) memset((n),-1,sizeof(n)) #define F first #define S second #define PB push_back #define ALL(x) begin(x),end(x) #define SZ(x) ((int)(x).size()) #define IOS ios_base::sync_with_stdio(0); cin.tie(0) template...
#include <dictionary.h> #include <stdio.h> #include <dictionary_any.h> NetCore::CStr toBin(unsigned int in, unsigned char bits) { NetCore::CStr out; assert(bits > 0); //unsigned int i = 0; while(bits--) { out += ((in & (1 << bits)) == 0 ? '0' : '1'); } //out += ((in & 1) ==...
/* Universal auto-detecting DHT11 or DHT22 sensor. Copyright (c) 2019 <NAME> https://github.com/timcharper 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, includ...
/* This file is part of PyMesh. Copyright (c) 2015 by <NAME> */ #include "MixedMeshTiler.h" #include <iostream> #include <sstream> #include <Core/Exception.h> #include <Math/MatrixUtils.h> #include "MeshTilerHelper.h" using namespace PyMesh; using namespace MeshTilerHelper; using namespace MatrixUtils; MixedMeshTiler...
/****************************** LICENSE ******************************* * (C) Copyright 1996-2017 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the pr...
#include "adc_driver.h" #include <vector> #include "sysfs_adc.h" /* "/devices/" DriverId "/meta/name" = Config.DeviceName "/devices/" DriverId "/controls/" Config.Channels[i].Id = measured voltage "/devices/" DriverId "/controls/" Config.Channels[i].Id "/meta/ord...
#include <gtest/gtest.h> #define private public #include "range/watch.h" #include "frame/sf_util.h" int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } namespace { using namespace sharkstore::dataserver; class TestWatcherSet: public range::WatcherSet{ public: ...
#include "objectctrlpipeline.h" #include "rendertexture.h" #include "commandbuffer.h" #include "components/camera.h" #include "components/actor.h" #include "components/transform.h" #include "components/scene.h" #include "components/renderable.h" #include "resources/material.h" #include "resources/mesh.h" #include ...
// // Created by seetadev on 2019/10/31. // #include "ClarityQuality.h" #include "seeta/DataHelper.h" #include "seeta/ImageProcess.h" /** * @see The Blur Effect: Perception and Estimation with a New No-Reference Perceptual Blur Metric * @param data * @param width * @param height * @return */ float reblur(const...
#include "Angel.h" #include<iostream> using namespace std; #define BUFFER_OFFSET(offset) ((GLvoid*)(offset)) unsigned int width = 512; unsigned int height = 512; GLuint vao; GLuint buffer; GLuint simpleShader; unsigned int NumFaces; unsigned int NumTriangles; unsigned int NumVertices; vec3 *points; vec3 *colors; ...
#include <cstdio> #include <algorithm> #include <fstream> #include <iostream> #include <vector> #include <queue> #include <map> #include <cstring> #include <string> #include <set> #include <stack> #include <omp.h> #define pb push_back #define mp make_pair #define f first #define s second #define ll long long using na...
#include "Boss.h" #include "TreeSearch.hpp" int _width; AIShoot::AIShoot(AIPosition p, vec2D v, int hitbox) { _startPos = p; _theoryPos = p; _hitbox = hitbox; _direction = v; } const bool AIShoot::increaseShoot() { _theoryPos.X += static_cast<int>(_direction.X); _theoryPos.Y += static_cast<int>(_direct...
/* Copyright (c) <2009> <Newton Game Dynamics> * * 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 any purpose, * inclu...
// @@@ START COPYRIGHT @@@ // // 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 you under the Apache License, Version 2...
/* Lzip - LZMA lossless data compressor Copyright (C) 2008-2017 <NAME>. 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 l...
#include "Box.h" // Include headers from this project. #include "ObjectSortingContainer.h" #include "ListHelper.h" #include "MathHelper.h" // Include standard libraries. #include <sstream> #include <math.h> // See Box.h for the constructors. // Get one of the box's vertical sides. std::vector<Point2D> Box::getVerti...
#include <algorithm> #include <cassert> #include "IEMath.h" #include "IEVector4.h" #include "IEVector3.h" const IEVector4 IEVector4::ZeroVector = IEVector4(0.0f, 0.0f, 0.0f, 0.0f); const IEVector4 IEVector4::XAxis = IEVector4(1.0f, 0.0f, 0.0f, 0.0f); const IEVector4 IEVector4::YAxis = IEVector4(0.0f, 1.0f, 0.0f, 0.0f...
#include "Switch.hpp" #include "../others/Utils.cpp" Switch::Switch(int _id, int _ports): id(_id), portsCount(_ports) { FD_ZERO(&masterSet); FD_SET(0, &masterSet); for (int i = 0; i < portsCount; i++) { string inName = "fifos/s" + to_string(id) + "-" + to_string(i+1) + "-" + "in"; string outN...
#include "tdm_refine_greedy.h" #include "tdm_db.h" #include "timing_graph.h" #include "tdm_net.h" void TdmRefine::solve() { log() << "==================== begin TDM refinement(greedy) ====================" << endl; tdmDatabase.reportSol(); tdmDatabase.updateTiming(); auto timingGraph = tdmDatabase.get...
// 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 you under the Apache License, Version 2.0 (the // "License"); you may...
/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be usefu...
// SPDX-License-Identifier: Apache-2.0 /* Copyright 2019 Blue Cheetah Analog Design 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 requi...
#include "Vaos.h" #include <vector> using namespace glm; using namespace std; #pragma pack(push, 1) struct Vertex { vec3 position; PackedColor color; }; #pragma pack(pop) // Buffers a single face of a voxel in the given vector static void BufferFace(vec3 center, vec3 normal, vec3 color, vector<Vertex>& vert...
#include <boost/python.hpp> #include <boost/python/suite/indexing/vector_indexing_suite.hpp> #include "Map.h" #include "MapPoint.h" #include "KeyFrame.h" #include "KeyFrameDatabase.h" #include "Converter.h" #include <string> #include <vector> using namespace std; using boost::python::vector_indexing_suite; vector<...
#include <sstream> #include <fstream> #include "phys-services/I3EventCounter.h" #include "dataclasses/physics/I3EventHeader.h" using std::ostringstream; I3_MODULE(I3EventCounter); I3EventCounter :: I3EventCounter(const I3Context& ctx) : I3Module(ctx), physCount_(0), statusCount_(0), geometryCount_(0), ca...
/*! LTC4151: High Voltage I2C Current and Voltage Monitor @verbatim The LTC4151 is a high side power monitor that operates over a wide voltage range of 7V to 80V. In default operation mode, the onboard 12-bit ADC continuously measures high side current, input voltage and an external voltage. Data is reported ...
/** * Mobius Software LTD * Copyright 2015-2018, Mobius Software LTD * * This 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 2.1 of * the License, or (at your option) any later ve...
#include "deal_2dpts.hpp" void get_over01_idx(std::string path_over01_idx, Eigen::VectorXi &over01_idx) { puts("get idx z over -0.1"); FILE *fp; fopen_s(&fp, path_over01_idx.c_str(), "r"); int n; fscanf_s(fp, "%d", &n); printf("number of idx: %d\n", n); over01_idx.resize(n); for (int i = 0; i < n; i+...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <random> #include <chrono> using namespace std; using namespace __gnu_pbds; #define endl '\n' typedef long long ll; typedef pair<int, int> pii; //typedef tree<int,null_type,less<int>,rb_tree_tag, tree_orde...
#include "TexBox.h" #include "../Bindable/BindableBase.h" #include "../GraphicsThrowMacros.h" #include "../Surface.h" TexBox::TexBox(Graphics& gfx, std::mt19937& rng, std::uniform_real_distribution<float>& adist, std::uniform_real_distribution<float>& ddist, std::uniform_real_distribution<float>& odist, std::unif...
/* * Basic.cpp * * Created on: 2019年10月1日 * Author: happe */ #include "Basic.h" #include <stdlib.h> #include <string.h> #include <stdio.h> #include <stdarg.h> #include <cmath> #include <chrono> // It Work!!! volatile SystemTicker_t System_Clock = 0; void randomSeed(unsigned long seed) { if (seed != 0...
#pragma once #include <functional> #include <stdexcept> #include <ostream> #include <utility> #include <array> namespace mendel { using size_t = unsigned long; template <typename T> class node final { public: T data; node *next = nullptr; node() = delete; node(node *next_node) : next(next_node) {} templat...
/*************************************************************************** cmodel.cpp - description ------------------- copyright : (C) 2005 by MOUSSA email : <EMAIL> ***********************************************************...
#include "stdafx.h" #include "assimpFlags.hpp" #include "ObjectRegistryBase.hpp" #include "settings.hpp" #include "mapLoader.hpp" #include "terminalColors.hpp" std::string stripNodeName(std::string fullName) { std::size_t nameExtraStart = fullName.find("_$Assimp"); std::size_t underscorePos = fullName.find("_"); //...
#include <GL/gl.h> #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <math.h> float size = 1.0f; float angle = 0; float tx = 0; float ty = 0; float tz = 0; GLenum drawType = GL_FILL; void changeSize(int w, int h) { // Prevent a divide by zero, when window is too...
// // profile.cpp // BitQA // // Created by <NAME> on 13/05/2016. // Copyright © 2016 CSCI222. All rights reserved. // #include <stdio.h> #include "../includes/html.hpp" #include "../includes/database.hpp" #include "../process/user.hpp" #include "../includes/md5.hpp" #include "../process/report.hpp" using namespac...
/* * Author : <NAME> * Date : March 08, 2020 * Problem : https://leetcode.com/problems/house-robber-ii/ * Solution : http://buttercola.blogspot.com/2015/09/leetcode-house-robber-ii.html * Build : g++ -std=c++11 -lstdc++ house_robber_2.cpp */ #include <iostream> #include <vector> #include <string.h> u...
#include <iostream> #include "sre/Texture.hpp" #include "sre/Renderer.hpp" #include "sre/Material.hpp" #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/euler_angles.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtc/matrix_transform.hpp> #include <sre/SDLRenderer.hpp> #include <sre/impl/GL.hpp> #include <glm/gt...
#include "vector_vector.h" #include "data_frame.h" #include "EM_vv_store.h" #include "local_vv_store.h" #include "local_vec_store.h" #include "factor.h" #include "sparse_matrix.h" using namespace fm; class adj_apply: public gr_apply_operate<local_vec_store> { public: virtual void run(const void *key, const local_vec...
// Copyright PinaPL // // test.cpp // PinaPL // #include <Eigen/Dense> #include <vector> #include <fstream> #include <string> #include "weights.hpp" #include "cell.hpp" #include "test.hpp" #include "iostream" void single_cell_test() { int input_size = 4; int output_size = 4; std::cout << "sequence_size ...
// // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // License Agreement // ...
#include "itkImageFileWriter.h" #include "itkBinaryThresholdImageFilter.h" #include "itkBinaryContourImageFilter.h" #include "itkImageRegionIterator.h" #include "itkNeighborhoodIterator.h" #include "itkConstantBoundaryCondition.h" #include "itkSmoothingRecursiveGaussianImageFilter.h" #include "itkPluginUtilities.h" ...
// pch #include "PreCompiled.h" #include "SimplexNoise.h" using namespace Voxel; using namespace Voxel::Noise; std::unique_ptr<SimplexNoise> Manager::worldNoise = nullptr; std::unique_ptr<SimplexNoise> Manager::temperatureNoise = nullptr; std::unique_ptr<SimplexNoise> Manager::moistureNoise = nullptr; std::unique_pt...
#include "grammar/grammar.h" #include "gtest/gtest.h" using jucc::grammar::Parser; TEST(grammar, Parser0) { Parser parser = Parser("../test/grammar/grammar_test_0.g"); ASSERT_EQ(true, parser.Parse()); ASSERT_EQ("<primary_expression>", parser.GetStartSymbol()); std::vector<std::string> terminals = {"else", ...
#include <boost/asio.hpp> #include <boost/locale.hpp> #include <string> #include <vector> #include <iostream> #include <locale> #include <codecvt> #include <cstring> #include <cstdlib> #include <random> #include <chrono> #include <thread> #include "../include/cpp-base64/base64.h" using namespace boost::asio; static c...
// Copyright (c) 2019, Compiler Tree Technologies Pvt Ltd. // 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, // th...
// ──── INCLUDE ──── // Library Headers #include <Qaterial/Layout.hpp> // Dependencies Headers // Qt Headers // Stl Headers #include <cmath> // ──── DECLARATION ──── using namespace qaterial; // ──── FUNCTIONS ──── LayoutAttached::LayoutAttached(QObject* object) : _extraLarge(Layout::defaultPreferredFill(La...
/* * RepetitiveRamReviewer * Copyright (C) 2020 <NAME> * * SPDX-License-Identifier: MIT */ #include "RepetitiveRamReviewer.h" #include <Arduino.h> void dumpUInt16(uint16_t val, uint8_t base = 10, char fill = ' ', uint8_t width = 4); extern void *__brkval; extern uint8_t __heap_start; extern uint8_t __stack; Re...
#include <iostream> #include <cstdio> #include <ctime> #include <boost/numeric/mtl/mtl.hpp> #include "boost/program_options.hpp" using namespace std; using namespace mtl; using namespace mtl::mat; namespace po = boost::program_options; // m: numRows, n: numCols inline double simpleDenseTest_MTL(int m, int n, int num...
#include "stdafx.h" #include "HTTPRequest.h" #include <iostream> #include <istream> #include <ostream> #include <string> #include <boost/algorithm/string.hpp> HTTPRequest::HTTPRequest(void) :socket(IOService) ,pcBuffer(NULL) ,pcBufferMaxSize(256*1024) ,pcBufferSize(0) ,pcBufferPosition(0) { ...
#include <stdio.h> #include "matrix_util.h" #include "CGSolve.h" #include <time.h> extern "C"{ void dgesv_(int* N, int* NRHS, double* A, int* LDA, int* IPIV, double* B, int* LDB, int* INFO); } const char* format="%12.5f "; int main(){ int N=160; double threshold=1e-10; int iterMax=1000; double** A=alloc_dmatrix...
// CensusBureau.cpp : Defines the entry point for the console application. // #include "stdafx.h" using namespace std; const int INFANT = 18; const int YOUNG = 29; const int MIDDLEAGED = 50; const int OLD = 69; const int REALLYOLD = 70; map<int, int> organizeValues(int ages[], int size); map<string, int> organizeSta...
//Huffman编码不唯一 //Huffman编码是最优编码,但最优编码不一定是Huffman编码 //需要满足的条件 //1最优:wpl最小 建立Huffman树计算最小wpl判断学生的提交是否正确 //2无歧义:前缀码 建树过程中检查是否满足前缀码要求 #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #define MinData -1 #define N 64 typedef struct HuTreeNode *HuffmanTree; typedef struct HNode *Heap; typedef ...
#include <iostream> #include <fstream> #include <filesystem> #include <Windows.h> #include "FastFileCryptor.h" #include "Key.h" #include <iostream> struct S2FFHeader { uint64_t Magic; uint32_t Version; uint32_t VersionEx; uint32_t Flags; uint32_t Unk[3]; }; void FastFileCryptor::InitTomCrypt() { if (register_ha...
/* * See the file LICENSE for redistribution information. * * Copyright (c) 2004,2009 Oracle. All rights reserved. * * ******* * * queryForDocumentValue * * This program performs various XQuery queries against a Berkeley DB XML container and then * retrieves information of interest from the retrieved document(s). You...
//%Header { /***************************************************************************** * * File: src/GL/GLTextureClip.cpp * * Copyright: <NAME> 2002-2007, 2020 * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software...
/*! * @file system.cpp * * Copyright (c) 2017 <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 restriction, including without limitation the rights * to use, copy, mod...
#include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <sys/time.h> // Input variables /* Количество ячеек вдоль координат x, y, z */ #define in 20 #define jn 20 #define kn 20 int a = 1; double X = 2.0, Y = 2.0, Z = 2.0; double e = 0.00001; // MPI int rank, size; /* A...
/*******************************************************************- C++ -****\ * * FindSymbol v1.0 * (c) 2015 <NAME> * * This file is distributed under the MIT Open Source License. See * LICENSE.TXT for details. * \***************************************************...
/* * Copyright 2000 by <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 ...
// // FILE NAME: CIDKernel_PlatformStrOps.Hpp // // AUTHOR: <NAME> // // CREATED: 04/27/1999 // // COPYRIGHT: Charmed Quark Systems, Ltd - 2019 // // This software is copyrighted by 'Charmed Quark Systems, Ltd' and // the author (<NAME>.) It is licensed under the MIT Open Source // license: // // https://opensour...
/** * Implementation of the 'ExpressionParser' class. */ #include <string> #include <vector> #include "symachin/Expression.h" #include "symachin/ExpressionParser.h" #include "symachin/ExpressionParserException.h" using namespace std; using namespace symachin; /** * Constructor. */ ExpressionParser::ExpressionPar...
/* * Copyright (c) 2017-2021, Alibaba Group Holding Limited * 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 applica...