sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
9e8f9ab617938f6d7d5b360e38132d04e4d662118a5ffd1dca396e9ead2e0751 | C++ | 2,252 | 77 | /*
Author: Nate Sutton, 2022
References:
https://stackoverflow.com/questions/3383817/limit-floating-point-precision
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iostream>
#include <regex>
#include <math.h>
using namespace std;
double set_prec(double value, dou... |
c5a7c1fd680da49eb78548c8d23ebda13365e6468f0756aaf949a51b8b356aef | C++ | 2,255 | 69 | #include <torch/extension.h>
#include <c10/cuda/CUDAGuard.h>
#include <vector>
// CUDA forward declarations
std::vector<torch::Tensor> axisangle2mat_forward_cuda(
torch::Tensor axisangle);
std::vector<torch::Tensor> axisangle2mat_backward_cuda(
torch::Tensor grad_mat,
torch::Tensor axisangle);
std::vecto... |
2d396b3cd4bda1ec5902e3afe03dea4db19d8d06debc59985d5eb97de54ac86c | C++ | 2,266 | 66 | /**
* \file register_loader_saver_gbwt.cpp
* Defines IO for a GBWT index from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_gbwt.hpp"
#include <gbwt/gbwt.h>
#include <gbwt/dynamic_gbwt.h>
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void register_l... |
8516a63a4f81469d53ef996a979b3158999851b781285e3a61890d41c7bdedaa | C++ | 2,305 | 63 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
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... |
66c454fd0c3cc1574597c1c6d77b103075995541a4c019ce115851ef7f43b11e | C++ | 2,310 | 73 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
c34be45d2fbae4f59b00b120f203f3ee9cd973af9a7eced34de84b5ab4e8f5ad | C++ | 2,325 | 71 | /**
* \file intersect_path_offsets.cpp
*
* Contains implementation of intersect_path_offsets function
*/
#include "intersect_path_offsets.hpp"
#include <algorithm>
//#define debug
namespace vg {
namespace algorithms {
using namespace std;
bool intersect_path_offsets(const path_offset_collection_t& a_offsets,... |
5300be4e7c25bfcc178e66dec7f8c7153ea630767c7580fda8e54e28c6a36f6a | C++ | 2,341 | 104 | #include "qwt3d_parametricsurface.h"
#include "qwt3d_surfaceplot.h"
using namespace Qwt3D;
ParametricSurface::ParametricSurface()
:GridMapping()
{
}
ParametricSurface::ParametricSurface(SurfacePlot& pw)
:GridMapping()
{
plotwidget_p = &pw;
uperiodic_ = false;
vperiodic_ = false;
}
ParametricS... |
558831684c95a22e5f89b82979a86f6aa7e71903d23624f4ab201b2f65e0aeba | C++ | 2,342 | 74 |
#include <random>
#define DONT_USE_UNMAPPABLE_TUPLES
#include <nl-randvar.h>
#include <Delimited.hpp>
#include <BerkUnkWord.hpp>
DiscreteDomain<int> domC;
class C : public Delimited<DiscreteDomainRV<int,domC>> {
public:
C ( ) : Delimited<DiscreteDomainRV<int,domC>> ( ) { }
C ( int i ) ... |
d0edfb079ca920042442445781b8865d26ac39d5362f15de8b6586c7289a4941 | C++ | 2,387 | 68 | /**
* \file register_loader_saver_hash_graph.cpp
* Defines IO for a HashGraph from stream files.
*/
#include <arpa/inet.h>
#include <vg/io/registry.hpp>
#include "register_loader_saver_hash_graph.hpp"
#include "load_proto_to_graph.hpp"
#include "converted_hash_graph.hpp"
#include "../handle.hpp"
#include <bdsg/has... |
db94e3c3df75885a74090a321ec1e25df4afb2a780950ee52740de152540887c | C++ | 2,403 | 73 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
d869be07132636e5b4a085c50cdd95af7c6cbda9e7ab51d266218534a2b93099 | C++ | 2,427 | 76 | //
// mex_top_eig.cpp
//
//
// Created by Bo_Royce on 8/17/16.
//
//
#include <mex.h>
#include <stdio.h>
#include <math.h>
#include <iostream>
#include "annoylib.h"
#include "kissrandom.h"
#include <time.h>
#include <map>
void make_top_neighbors_annoy(double *X, int NK, int NN,int NF,double *ind,double *val){
... |
f287d8a010a3b881e33c69066fdfb16cdb4a8c88f20879128f5868a909169200 | C++ | 2,463 | 101 | /*!
* \file MyGoalSampleableRegion.cpp
*
* Created on: Nov 20, 2018
* Author: Florian Achermann, ASL
*/
#include "MyGoalSampleableRegion.hpp"
#include <iostream>
#include <cmath>
namespace intel_wind {
namespace planning {
MyGoalSampleableRegion::MyGoalSampleableRegion(const ob::SpaceInformationPtr& si_... |
c70ae1ede27e18da73243034957305e6e6820f7654608ea8310169fcfba09078 | C++ | 2,471 | 82 | #include <Eigen/Core>
#include <iostream>
#include "timer.h"
#include <SymEigsSolver.h>
#include <GenEigsSolver.h>
using namespace Spectra;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using Eigen::MatrixXcd;
using Eigen::VectorXcd;
void eigs_sym_Cpp(MatrixXd &M, VectorXd &init_resid, int k, int m,
... |
e23b83998f4e2167cc659dad1c7c8f19050154acd30b9e45312a6c41e091c5a9 | C++ | 2,517 | 80 | //! \file us_thread_worker.cpp
#include "us_thread_worker.h"
#include "us_util.h"
#include "us_settings.h"
#include "us_astfem_math.h"
#include "us_astfem_rsa.h"
#include "us_lamm_astfvm.h"
#include "us_model.h"
#include "us_sleep.h"
#include "us_math2.h"
#include "us_constants.h"
#include "us_memory.h"
// Construct ... |
a65755c57c96d7898d330607662530d3fdcd0823466b05014a05e6d9848a17fd | C++ | 2,520 | 85 | #include <iostream>
#include <fstream>
#include <cassert>
#include "region.hpp"
namespace vg {
std::ostream& operator<<(std::ostream& out, const Region& region) {
out << region.seq;
if (region.start != -1 || region.end != -1) {
out << ":";
if (region.start != -1) {
out << region.st... |
6f5689278c5a640ba475248b2ada18c24c90929ed25295b145f52244eb734da1 | C++ | 2,541 | 95 | /**
* \file null_masking_graph.cpp: contains the implementation of NullMaskingGraph
*/
#include "null_masking_graph.hpp"
namespace vg {
using namespace std;
NullMaskingGraph::NullMaskingGraph(const HandleGraph* graph) : graph(graph) {
graph->for_each_handle([&](const handle_t& handle) {
if (graph->g... |
1e4e606b15dde019a90e27d73f65ca95fe9fc1f024ffe1a798d5dd5c07fd06d5 | C++ | 2,551 | 73 | /**
* \file mem_accelerator.hpp
*
* Implements an index for accelerating GCSA2 queries
*/
#include "mem_accelerator.hpp"
#include <sdsl/util.hpp>
#include <cmath>
namespace vg {
MEMAccelerator::MEMAccelerator(const gcsa::GCSA& gcsa_index, size_t k) : k(k)
{
// compute the minimum width required to express th... |
45f3a526600e8252cd576b9315ae329aa874a3cb94fd7c1d40574652e0d923e7 | C++ | 2,564 | 79 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
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... |
43d820c1582df07283316c49897b8c44df96a84042119259312399aad59ec538 | C++ | 2,569 | 82 | /**
* \file reverse_graph.cpp: contains the implementation of ReverseGraph
*/
#include "reverse_graph.hpp"
namespace vg {
using namespace std;
ReverseGraph::ReverseGraph(const HandleGraph* forward_graph, bool complement) :
forward_graph(forward_graph), complement(complement) {
// nothing to ... |
8892c7a5cf96d69bf52edd752f9c64010efe326d0d48a9d45a1ef6cf92531a69 | C++ | 2,575 | 77 |
#include <random>
#define DONT_USE_UNMAPPABLE_TUPLES
#include <nl-randvar.h>
#include <Delimited.hpp>
#include <BerkUnkWord.hpp>
#include <RandoUnkWord.hpp>
DiscreteDomain<int> domC;
class C : public Delimited<DiscreteDomainRV<int,domC>> {
public:
C ( ) : Delimited<DiscreteDomainRV<int,domC>> ( ) ... |
3712836d86b24049c484197d3d6387381afa43de9126ff9f6f09dc14d4a0ace4 | C++ | 2,631 | 115 | /*
* WindGrid.cpp
*
* Created on: Nov 22, 2018
* Author: Florian Achermann, ASL
*/
#include "WindGrid.hpp"
#include <cmath>
namespace intel_wind {
namespace planning {
WindGrid::WindGrid() {
}
bool WindGrid::getWind(double x, double y, double z, float* u, float* v, float* w) const {
// assign output... |
755b325a94a533c09b685293233439bece0a7bc3fc436508eaf0afd4bd76dca2 | C++ | 2,644 | 106 | #if defined(_MSC_VER) /* MSVC Compiler */
#pragma warning ( disable : 4305 )
#pragma warning ( disable : 4786 )
#endif
#include <float.h>
#include "qwt3d_plot.h"
using namespace Qwt3D;
/**
Set the rotation angle of the object. If you look along the respective axis towards ascending values,
the rotat... |
2a9c4c6a324baaba6962200d02e784a18fc2a2b4fab8eccf2815346ce7ef9031 | C++ | 2,649 | 52 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
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... |
f2a2bbb3b52763e251fae633a6a4f83658488955a95c48aa7db3c70ca43ac4bb | C++ | 2,670 | 98 | /// \file path_index.cpp
///
/// Unit tests for the PathIndex class, which indexes paths for random access.
///
#include <iostream>
#include <string>
#include <sstream>
#include "../mem_accelerator.hpp"
#include "../utility.hpp"
#include "../build_index.hpp"
#include "catch.hpp"
#include "support/random_graph.hpp"
... |
b7522e8a3cc3e59c139366619822d7bd0ee97e805835d446c7332dcca58bf75b | C++ | 2,672 | 87 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
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... |
c18fdee23e0fad29563c78c8edb76a70efa4fa821f525367b6f5d76325bc4c01 | C++ | 2,674 | 88 | /*
* PrairieLink ProcessFrame
* ------------------------
* Processes a stream of raw samples into a final frame. The following
* processing steps are performed:
* 1. 'Bit-shift'
* 2. Average only >0 values
* 3. Flip even/odd lines
*
* Lloyd Russell 2017
*/
#include "mex.h"
// The computational routine
void ... |
ba5968d65aa4655911091a21673624ee45408dba745f604417fdced2cd5449bb | C++ | 2,676 | 102 | #include <qapplication.h>
#include <qsplitter.h>
#include <qtimer.h>
#include "autoswitch.h"
using namespace Qwt3D;
//--------------------------------------------------------------------
// autoswitch.cpp
//
// Demonstrates autoswitching axes with a cutted saddle as data
//-------------... |
ea516248c735571974360570e0b776cd7b9fbf99558128d33bcbe4fdf5c7afd7 | C++ | 2,679 | 116 | #include "shd.h"
SHD::SHD(
unsigned int max_harmonics,
vector < shd_point > & model,
vector < vector < shd_double > > & F,
vector < shd_double > & q,
vector < shd_double > & I,
int debug_level
)
{
this->max_harmonics = max_harmonics;
thi... |
c51c15b3bbfef09efec8cb42d87482f9ee5f52f0a8f0676b67b46daa725dfa92 | C++ | 2,683 | 135 | #include "Windows.h"
#include "mex.h"
#include "matrix.h"
//#include "LinAlg.h"
#include <vector>
class vec3d
{
private:
double x,y,z;
public:
vec3d(const double _x, const double _y, const double _z){x=_x; y=_y; z=_z;}
vec3d(const vec3d& rhs){x=rhs.x; y=rhs.y; z=rhs.z;}
double Norm() const {return sqrt(x*x+y*... |
f1c95b3729605ac77e7cb24e68ac50883d2eabc1c9b57306c69a9d00c9256fd3 | C++ | 2,695 | 84 | #include "position.hpp"
namespace vg {
pos_t make_pos_t(const Position& pos) {
return make_tuple(pos.node_id(), pos.is_reverse(), pos.offset());
}
pos_t make_pos_t(const position_t& pos) {
return make_tuple(pos.node_id(), pos.is_reverse(), pos.offset());
}
pos_t make_pos_t(gcsa::node_type node) {
re... |
e78b0fad34391205ed77ab7663366dfae7ab318b1415663a84170958a3fc25b6 | C++ | 2,723 | 90 | #include <cmath>
#include <cstdlib>
#include <utility>
#include "NumericUtils.hpp"
namespace NumericUtils {
double sum(const double x[], uint64 N) {
double ans = 0;
for (uint64 n = 0; n < N; n++)
ans += x[n];
return ans;
}
double mean(const std::vector <double> &x) {
uint64 N = x.size(); r... |
e47be1b00112ecd7dea39117a9d1ee328454668cc642201e644c04eddb738195 | C++ | 2,733 | 67 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
e3db00fba3ee397af260bf861191d514e8825830b173c6670fff7364d59c02d8 | C++ | 2,743 | 93 | #include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
using namespace std;
struct node{
string loopName;
string distance;
string ra, rb, rab;
string ES, FDR, poisson_p_value;
long long int sta, ena;
long long int stb, enb;
string... |
007f80853513106dd4dcd45e6574aabc4f3b6dac6a3ac028ceeaddd9be22acea | C++ | 2,746 | 98 | //! \file us_resids_bitmap.cpp
#include "us_resids_bitmap.h"
#include "us_settings.h"
#include "us_gui_settings.h"
#include <qwt_legend.h>
// constructor: residuals bitmap widget
US_ResidsBitmap::US_ResidsBitmap( QVector< QVector< double > >& resids,
QWidget* wparent )
: US_WidgetsDialog( wparent, Qt::WindowF... |
c7b56e7c0ff371af99a67df7dffa57c830b56ceb9c77e17226a80822376b8b9a | C++ | 2,758 | 50 | // Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// calculateVectors
std::vector <std::vector<int>> calculateVectors(std::vector<int> nodeColors, IntegerMatrix edges, bool directed, bool weighted, i... |
ad99883e0bca3d845cdbe342701e23f611c651a0cf788e629c0a4a0255e17213 | C++ | 2,771 | 70 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
d8c7cb490bc9a02aa55de6d2636b0af2cb4ba1417eb22cd065a3573c619ca98f | C++ | 2,775 | 61 | /**
* \file pad_band.cpp
*
* Defines implementation for band padding functions for banded global alignment.
*/
#include "pad_band.hpp"
#include <cmath>
namespace vg {
namespace algorithms {
std::function<size_t(const Alignment&, const HandleGraph&)> pad_band_random_walk_internal(double band_padding_multiplier... |
70b3d484ab76b27282d3e1931b088a71a7bc812e523ae7ca3e38da43a3f921af | C++ | 2,787 | 92 | /// \file annotation.cpp
///
/// Unit tests for the annotations system on Alignments and MultipathAlignments
///
#include <iostream>
#include <string>
#include "vg/io/json2pb.h"
#include <vg/vg.pb.h>
#include "../annotation.hpp"
#include "catch.hpp"
namespace vg {
namespace unittest {
using namespace std;
TEST_CA... |
6b9fbd5f4d5161a7c729a83871320298346eff9458776baeee05ae3c63961bb0 | C++ | 2,799 | 128 | #include "AtomTypeMap.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
AtomTypeMap::AtomTypeMap()
{
}
void
AtomTypeMap::read(std::string filename)
{
std::fstream file {filename};
if (not file)
{
std::stringstream msg;
msg << "Opening atom... |
e462d53ae37a36ba1ec2f86480744ed9489e8ce1201c4549bdf70e544270be54 | C++ | 2,811 | 135 | #include <math.h>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <complex>
#include <string>
#include <stdint.h>
using namespace std;
void natural_spline( vector < double > &x,
vector < double > &y,
vector < double > &y2
... |
370200522a092b895a292450d0825237af959becc3a63c27daec57b9669428b2 | C++ | 2,823 | 88 | #include <Rcpp.h>
#include "tsne.h"
using namespace Rcpp;
// Function that runs the Barnes-Hut implementation of t-SNE
// [[Rcpp::export]]
Rcpp::List Rtsne_cpp(NumericVector I, NumericVector J, NumericVector V, int no_dims_in, double perplexity_in, double theta_in, bool verbose, int max_iter, NumericMatrix Y_in, bool ... |
28cfbc1e352b1fc7f5e8f25dca7a5b087ee954a7d6188e4e70add434fc041ec9 | C++ | 2,847 | 52 | #include "readfilter.hpp"
namespace vg {
using namespace std;
using namespace vg::io;
ostream& operator<<(ostream& os, const Counts& counts) {
os << "Total Filtered: " << counts.counts[Counts::FilterName::filtered] << " / "
<< counts.counts[Counts::FilterName::read] << endl
<< "Read ... |
7d3d068500607cfa7ea6efbc3aa97c840790d99f5f9a7fea3234415c3f258293 | C++ | 2,863 | 79 | /**
* \file flat_file_back_translation.cpp
* Implementation for flat-file-backed named-node back-translation.
*/
#include "flat_file_back_translation.hpp"
#include "utility.hpp"
namespace vg {
FlatFileBackTranslation::FlatFileBackTranslation(std::istream& stream) {
if (!stream) {
// File didn't open p... |
2f8f712743ac649d37dd2b256d14382cf38c75434e5a19cb8c33209e61759887 | C++ | 2,866 | 94 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
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... |
499a7031389334f95af1cf71a5461eb0606c5b286d3e4a27a6f03c8118fe38b1 | C++ | 2,888 | 74 | /**
* \file register_loader_saver_vg.cpp
* Defines IO for a VG graph from stream files of Graph objects.
*/
#include <vg/io/registry.hpp>
#include <vg/io/protobuf_iterator.hpp>
#include "register_loader_saver_vg.hpp"
#include "../vg.hpp"
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;... |
2029fc9896e1f5c509376b863735c0060626c2e0af653c024c95d6e686519790 | C++ | 2,898 | 71 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
ad69b55b8751b989154fed099a254a4b8b842aa62108319f954fc6277bdc9709 | C++ | 2,936 | 91 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
fea81b5fc064eabb3eb2704cd54b4d072a86fe0415345766824d810c3662d690 | C++ | 3,007 | 144 | #include "Gaussian.hpp"
#include <iostream>
#include <iomanip>
#include <limits>
#include <cmath>
#include "GridayException.hpp"
Gaussian::Gaussian(GReal scale, GReal width, GReal rcut) :
PairEnergy {},
mScale {scale},
mWidth {width},
//mSigSq {sig * sig},
mRcut {rcut},
mRcutSq {rcut * rcut}... |
d194325dae4fa51d7d0b1c88d40b1f2c68ae9dc2203416843f740e702436ece2 | C++ | 3,008 | 147 | #include <qlayout.h>
#include <qslider.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include "enrichmentmainwindow.h"
#include "enrichments.h"
#include "../../../include/qwt3d_function.h"
using namespace Qwt3D;
class Hat : public Function
{
public:
Hat(SurfacePlot& pw)
:Function(pw)
{... |
aae0758fa440e18fb676cc94391af99f5f21956a56bad0a6156db4248ae85510 | C++ | 3,014 | 76 | /**
* \file back_translating_alignment_emitter.cpp
* Implementation for BackTranslatingAlignmentEmitter
*/
#include "back_translating_alignment_emitter.hpp"
#include "algorithms/back_translate.hpp"
namespace vg {
using namespace std;
BackTranslatingAlignmentEmitter::BackTranslatingAlignmentEmitter(const NamedNo... |
4fb71cd5b59ffe390ba5c69c42563cb77e8cf4faf57233f82b082760ab162675 | C++ | 3,024 | 102 | // Test ../include/LinAlg/UpperHessenbergEigen.h and
// ../include/LinAlg/TridiagEigen.h
#include <LinAlg/UpperHessenbergEigen.h>
#include <LinAlg/TridiagEigen.h>
#include <Eigen/Eigenvalues>
#include <ctime>
using namespace Spectra;
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
using Eigen::MatrixXd;
using Ei... |
64f0c352b3809fd6635a57e920b3cf3d82dbfb282f4275d74e480a2d129b2878 | C++ | 3,040 | 86 | //
// mex_top_eig.cpp
//
//
// Created by Bo_Royce on 8/17/16.
//
//
#include <mex.h>
#include <stdio.h>
#include <math.h>
#include <iostream>
#include <Eigen/SparseCore>
#include <Eigen/Core>
#include <SymEigsSolver.h>
#include <MatOp/SparseSymMatProd.h>
#include <time.h>
using namespace Eigen;
using namespace Spe... |
48b07bcdc3da4e460f32cbf91c0839fb03812425630fa5662dc3896445b8bbbc | C++ | 3,055 | 89 | /**
* \file job_schedule.cpp: implements JobSchedule
*/
#include "job_schedule.hpp"
#include <thread>
#include <chrono>
#include <mutex>
#include <atomic>
#include "utility.hpp"
namespace vg {
using namespace std;
JobSchedule::JobSchedule(const vector<pair<int64_t, int64_t>>& job_requirements,
... |
888ac6c768e48c1eb3c36bb9bf61fb7b792cf552a159f69cca6b53fbecb14d8e | C++ | 3,084 | 107 | /**
* \file dinucleotide_machine.cpp
*
* Implements DinucleotideMachine
*
*/
#include "dinucleotide_machine.hpp"
//#define debug_machine
#ifdef debug_machine
#include <bitset>
#endif
namespace vg {
DinucleotideMachine::DinucleotideMachine() {
// build the transition table for the state machine
for... |
173677eba26356d409ae383d967cff65abd8d188ac2fc4894095e286613db1e2 | C++ | 3,127 | 117 | /// \file hfile_cppstream.cpp
///
/// Unit tests for hFILE* C++ stream wrapper
///
#include <vg/io/hfile_cppstream.hpp>
#include "catch.hpp"
#include <htslib/hfile.h>
#include <sstream>
namespace vg {
namespace unittest {
using namespace std;
using namespace vg::io;
TEST_CASE("input streams can be wrapped as hFI... |
f548f3d4e16f51b0e7a09fcf9b6a07306c6cc1e8de3d3eadc76c67d12b5e4867 | C++ | 3,159 | 79 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
0adef2a2e5be0840e4a90521eee03d004293ea72db8ba222dd8b3b03f8d66633 | C++ | 3,162 | 113 | /**
* \file interval_union.cpp: contains the implementation of IntervalUnion
*/
#include "interval_union.hpp"
#include <cassert>
#include <iostream>
namespace vg {
using namespace std;
void IntervalUnion::add(size_t begin, size_t end) {
assert(begin <= end);
if (begin == end) {
// empty interva... |
4f91680c7769a4111f7a3eeecd6a828211de796d58bea51c3f0c54ecf30fd9d3 | C++ | 3,172 | 126 | #include <cstdint>
#include <iostream>
#include <string>
#include <string_view>
#include <vector>
#include <graphtyper/typer/variant_candidate.hpp>
#include <graphtyper/utilities/logging.hpp>
namespace gyper
{
bool VariantCandidate::add_base_in_front(bool const add_N)
{
Variant new_var;
new_var.abs_pos = abs_pos;... |
dc819c01302e1ebd6b45c08911e36f5d7b3ffb6be8939396afa6e084ce920a66 | C++ | 3,181 | 95 | /*
References: htlines://www.tutorialspoint.com/Read-whole-ASCII-file-into-Cplusplus-std-string
htlines://cplusplus.com/reference/regex/regex_match/
htlines://www.tutorialspoint.com/how-to-read-a-text-file-with-cplusplus
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#includ... |
b688370b481516ac29bc99cb32f26a252e5444161a42d4922536e1828a273f51 | C++ | 3,188 | 91 | /*
Copyright (c) 2026, PyData Development Team
All rights reserved.
Distributed under the terms of the BSD Simplified License.
The full license is in the LICENSE file, distributed with this software.
*/
#include "pandas/moments.h"
#include "pandas/simd/moments_simd.hpp"
#include <optional>
#include <span>
namespace... |
4f93b79caa0042aa504dfe2891d28bc5ac44fb395336c742cbae14fea0f54353 | C++ | 3,192 | 121 | #include <Eigen/Core>
#include <iostream>
#include <GenEigsComplexShiftSolver.h>
#include <MatOp/DenseGenComplexShiftSolve.h>
using namespace Spectra;
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
typedef Eigen::MatrixXd Matrix;
typedef Eigen::VectorXd Vector;
typedef Eigen::MatrixXcd ComplexMatrix;
typedef Eigen:... |
37204d32f0de819a181b6291b815a9d6ba86a5bc39fa21097379251c3f1e89a4 | C++ | 3,196 | 153 | #include <iostream>
#include <ctime>
#include <string>
#include <sstream>
#include "./include/nr3.h"
#include <cmath>
#include "./include/network.h"
#include "./include/forwardmethod.h"
using namespace std;
int main(int argc, char *argv[]){
string text_input = argv[1];
int n;
int cont;
int cort = 100;
//---... |
722cdf88eb5fac341c4f14518c0530734019ddc7e8f62e42bcc15f53c0d117e5 | C++ | 3,197 | 105 | #include <atomic>
#include "subpath_overlay.hpp"
#include <handlegraph/util.hpp>
namespace vg {
using namespace std;
using namespace handlegraph;
SubpathOverlay::SubpathOverlay(const PathHandleGraph* backing,
const step_handle_t& begin, const step_handle_t& end) : backing_graph(backin... |
315581ead0f8ce2cb3ac6be90bc16d98a4dff3104aa695fd8cc2bad91c7cfcc1 | C++ | 3,211 | 110 | //! \file us_long_messagebox.cpp
#include "us_long_messagebox.h"
#include "us_gui_settings.h"
#include "us_settings.h"
// Main constructor with title and message
US_LongMessageBox::US_LongMessageBox( const QString& title,
const QString& message,
... |
0c553492ad9ddc8355b6dfb73b97da84c5dafb7e7dc04fcb1375ead31439231d | C++ | 3,214 | 111 | /** \file concat_main.cpp
*
* Defines the "vg concat" subcommand
*/
#include <omp.h>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include "subcommand.hpp"
#include "../option.hpp"
#include "../xg.hpp"
#include "../vg.hpp"
#include <vg/io/stream.hpp>
#include <vg/io/vpkg.hpp>
#include "../io/save_... |
f0315dbb1addf69a705d83c4315638e1caee063d95afe47a138b20aac6abd97a | C++ | 3,241 | 100 | #include "us_abde_main.h"
#include "us_license_t.h"
#include "us_license.h"
//! \brief Main program for US_Buoyancy. Loads translators and starts
// the class US_FitMeniscus.
int main( int argc, char* argv[] )
{
QApplication application( argc, argv );
#include "main1.inc"
// License is OK. Start u... |
4aeac8831173a75c9f5ffe0433d61cf565afcedfa2293b1c7d640f08b17a3405 | C++ | 3,242 | 90 | #include "us_clipdata.h"
#include "us_gui_settings.h"
US_ClipData::US_ClipData( double& concentration, double& radius,
double meniscus, double loading, QWidget* p, Qt::WindowFlags f )
: US_WidgetsDialog( p, f ), conc( concentration ), rad( radius )
{
setPalette ( US_GuiSettings::frameColor() );
setA... |
407e1841bdcd94b63aeda59803987ab1b032e770cd435ff17f4347004c9daa0e | C++ | 3,255 | 76 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
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... |
4899294016a91d1ad863666fee90e448e5d851acae87405b5fd1de29dad52e82 | C++ | 3,255 | 140 | #include "qwt3d_drawable.h"
using namespace Qwt3D;
Drawable::~Drawable()
{
detachAll();
}
void Drawable::saveGLState()
{
glGetBooleanv(GL_LINE_SMOOTH, &ls);
glGetBooleanv(GL_POLYGON_SMOOTH, &pols);
glGetFloatv(GL_LINE_WIDTH, &lw);
glGetIntegerv(GL_BLEND_SRC, &blsrc);
glGetIntegerv(GL_BLEND_DST,... |
cae64cad559baa3ad1d31921ec5f38aefe74ce391be0d96b01af15eb9b6da654 | C++ | 3,257 | 106 | #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <Python.h>
#include <numpy/arrayobject.h>
#include <stdint.h>
#include <iostream>
#include <complex>
#include "integration.hpp"
static PyObject *integral(PyObject *self, PyObject *args);
/////// Python-module-related functions and tables
// The module's meth... |
e87ae5b26db4b1309c6533bace8f0f4e6ad16d596972f33b74dc7b8180651011 | C++ | 3,276 | 118 | /**
* \file xdrop_aliigner.cpp: contains implementation of XdropAligner
*/
#include "dozeu_interface.hpp"
// Configure dozeu:
// We want the full length bonus included
#ifndef DZ_FULL_LENGTH_BONUS
#define DZ_FULL_LENGTH_BONUS
#endif
// We want the non-quality adjusted versions of functions
#ifdef DZ_QUAL_ADJ
#undef... |
4d73f0aed66da51654ca5536c6f438e676e7f09f91435ff3deb0cb498db56104 | C++ | 3,281 | 93 | #include "qt_test_base.h"
#include "us_defines.h"
#include "us_settings.h"
#include <QCryptographicHash>
#include <QDir>
#include <QFile>
#include <QSettings>
namespace
{
QByteArray fileDigest( const QString& path )
{
QFile file( path );
if ( ! file.open( QIODevice::ReadOnly ) )
return QByteArray();
... |
cfc8f0080c8f9a6f1a3dc64bdc1b33469025fda628369e18c5ce4ff656ee8e84 | C++ | 3,293 | 143 | //! \file us_selectbox.cpp
#include "us_gui_settings.h"
#include "us_selectbox.h"
// A class for creating widgets with options referred to
// by a logical ID
US_SelectBase::US_SelectBase()
{
}
// The implementation routines for a combo box
US_SelectBox::US_SelectBox( QWidget* parent )
: QComboBox( par... |
6bd4516082f025c1f7ed55730e85c889cf3cec0804841ba0772007039e3f204d | C++ | 3,294 | 96 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
d9faa78a68d7aec0a60d7d3c8b1d656ba816e6c7b89f024c1abe7fca75fba793 | C++ | 3,299 | 82 | #include <cstdint>
#include <iostream>
#include <graphtyper/typer/variant_support.hpp>
#include <graphtyper/utilities/options.hpp>
namespace gyper
{
void VariantSupport::set_depth(uint16_t const _depth)
{
// Make sure that the depth is never reduced
depth = std::max(depth, _depth);
}
double VariantSupport::get_r... |
0a967a3b232a7fa4893d570e751142f9c976eed03264e6aeb32c2a11ab2fccf6 | C++ | 3,304 | 110 | #include <vector>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <sstream>
#include "StringUtils.hpp"
namespace StringUtils {
using std::vector;
using std::string;
using std::cout;
using std::cerr;
using std::endl;
int stoi(const string &s) {
int i;
if (sscanf... |
decfadea167e8d89d3404699d1f26df9fe6bc923bcced131a528f666eea7dfe9 | C++ | 3,335 | 143 | //! \file us_selectbox_ra.cpp
#include "us_gui_settings.h"
#include "us_selectbox_ra.h"
// A class for creating widgets with options referred to
// by a logical ID
US_SelectBaseRa::US_SelectBaseRa()
{
}
// The implementation routines for a combo box
US_SelectBoxRa::US_SelectBoxRa( QWidget* parent )
: ... |
e6a5a3da9d61108e90e6e55be564e78cb8eab638b3e2e5c8c52f9ec4bd3f1c62 | C++ | 3,369 | 113 | #include <cassert>
#include <cstdint>
#include <limits>
#include <graphtyper/utilities/logging.hpp>
#include <graphtyper/utilities/snp_hwe.hpp>
/*
// Source: http://csg.sph.umich.edu/abecasis/Exact/snp_hwe.c
//
// This code implements an exact SNP test of Hardy-Weinberg Equilibrium as described in
// Wigginton, JE, C... |
863851566b3d281747222c6b88bb18936d32ae6b0eb9c94ebfc95a29ff75294e | C++ | 3,370 | 118 | #include "gff_reader.hpp"
namespace vg {
map<string, string> GFFRecord::parse_attributes() {
map<string, string> parsed_attributes;
stringstream attr_stream(attributes);
string buffer;
while (attr_stream.good()) {
getline(attr_stream, buffer, ';');... |
a1bcb54f888b2782dff0be702b135712421405818b0c4ad4a78abf6470817e1d | C++ | 3,371 | 107 | /// \file deletion_aligner.cpp
///
/// unit tests for the DeletionAligner
///
#include <iostream>
#include "path.hpp"
#include "deletion_aligner.hpp"
#include "support/random_graph.hpp"
#include "catch.hpp"
#include "bdsg/hash_graph.hpp"
namespace vg {
namespace unittest {
TEST_CASE("Deletion aligner finds optima... |
0998775008f06119f8e64b26561990dcbd09f5b0f48fecacf607d1eddae5d974 | C++ | 3,380 | 115 |
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <set>
#include <string>
#include "omp.h"
#include "OspreyParams.hpp"
#include "PhaseImpMissing.hpp"
#include "Variant.hpp"
#include "VCFReader.hpp"
#include "VCFWriter.hpp"
#include "format.hpp"
#include "timestamp.hpp"
using namespace std;
using name... |
74d2b42027e02800ac25f3efea9eeea2d2f44985908ed3f86d19fc20644ad404 | C++ | 3,413 | 110 | #include <bits/stdc++.h>
using namespace std;typedef long long ll;typedef pair<int,int> pii;
template<class orz>inline void read(orz &x){x=0;bool f=0;char ch=getchar();while(ch<'0'||ch>'9')(ch=='-')&&(f=1),ch=getchar();while(ch>='0'&&ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();f&&(x=-x);}
template<class orz>inline voi... |
f613d36f9e8cb561c8b03a993a85635eeb5701a52df2515fc3b3c4b9ffe2b4ff | C++ | 3,439 | 97 | #include <climits>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <string>
#include <graphtyper/graph/graph.hpp>
#include <graphtyper/index/rocksdb.hpp>
#include <graphtyper/typer/aligner.hpp>
#include <graphtyper/utilities/type_conversions.hpp> // to_uint64()
#include <catch2/ca... |
dd55b54a5b3164499086a8e5623ede4387fe45002129ab310390cc1d04ca6a95 | C++ | 3,459 | 119 | /**
* \file subgraph.cpp: contains the implementation of SubHandleGraph
*/
#include "subgraph.hpp"
#include <atomic>
namespace vg {
using namespace std;
SubHandleGraph::SubHandleGraph(const HandleGraph* super) : super(super) {
// nothing to do
}
void SubHandleGraph::add_handle(const han... |
7112ea48018bff8d8a651cb1e109895d6c0f9c21dee85849ddab71497ff2033e | C++ | 3,461 | 145 | #include <fstream>
#include <string>
#include <cereal/archives/binary.hpp>
#include <cereal/types/vector.hpp>
#include <graphtyper/graph/haplotype_calls.hpp>
#include <graphtyper/utilities/logging.hpp>
/*
namespace gyper
{
//
/// HaplotypeCalls
//
HaplotypeCall::HaplotypeCall(Haplotype const & hap)
{
calls = ha... |
29bb293a073df108973b03b74bf99b512b187ab980e33525fe74504ef2aa1548 | C++ | 3,528 | 106 | /// \file hts_alignment_emitter.cpp
///
/// unit tests for alignment emitter creation
#include <sys/stat.h>
#include <iostream>
#include "../handle.hpp"
#include "../utility.hpp"
#include <bdsg/hash_graph.hpp>
#include <bdsg/overlays/overlay_helper.hpp>
#include "catch.hpp"
#include "../hts_alignment_emitter.hpp"
... |
98c7675433c550dd70589a42306eaa4aee89bb4e8847eb8ade602b0e22db89c5 | C++ | 3,568 | 78 | /**
* \file surjecting_alignment_emitter.cpp
* Implementation for SurjectingAlignmentEmitter
*/
#include "surjecting_alignment_emitter.hpp"
#include "hts_alignment_emitter.hpp"
#include <map>
namespace vg {
using namespace std;
SurjectingAlignmentEmitter::SurjectingAlignmentEmitter(const PathPositionHandleGrap... |
357991a371b44553f64d3d881e6933408a4698694e5c8a7d9cf232fc98c346cb | C++ | 3,604 | 166 | /*
* HeightMapClass.cpp
*
* Created on: Nov 21, 2018
* Author: Florian Achermann, ASL
*/
#include "HeightMapClass.hpp"
#include <cmath>
#include <cstddef>
#include "params.hpp"
namespace intel_wind {
namespace planning {
HeightMapClass::HeightMapClass() :
max_x_(0.0),
min_x_(0.0),
max_y_(0.... |
8e71b3e4215ddb008448a4d9fab64371336751a12287b8e8faef83ca413829a8 | C++ | 3,613 | 116 | //! \file us_intensity_ra.cpp
#include "us_intensity_ra.h"
#include "us_settings.h"
#include "us_gui_settings.h"
#include "us_util.h"
#include "us_gui_util.h"
US_IntensityRa::US_IntensityRa(
const QString runID,
const QString triple,
const QVector< double >& data,
const QVector< double >& s... |
43da797d2d50d9e39f4595ae32e98d4a45f1dd11a75387d82b89c48d40fb3e9f | C++ | 3,661 | 140 | #include <cstdint>
#include <string>
#include <vector>
#include <parallel_hashmap/phmap.h>
#include <graphtyper/constants.hpp>
#include <graphtyper/typer/read.hpp>
#include <graphtyper/utilities/logging.hpp>
namespace gyper
{
bool Alignment::has_indel_event(Tindel_events::iterator indel_event) const
{
for (auto co... |
028ec1c7b0d759434d441f56df7b3d32bf9d9e328e80360df0878f44d601d16e | C++ | 3,664 | 103 | /** \file
*
* Unit tests for recombinator.cpp, specifically for clipping gref fragments to a
* sampled graph.
*/
#include "../recombinator.hpp"
#include "catch.hpp"
#include <vector>
namespace vg {
namespace unittest {
//------------------------------------------------------------------------------
namespace... |
758edab1ddc64b3c3e21c2305299d5f3e88a495af0e05c2ec9dcfed0656e71d4 | C++ | 3,669 | 103 | // =============================================================
// =============================================================
#include <iostream>
#include <iomanip> // cout precision
#include <math.h>
#include "VectorMatrix.h"
#include "NervousSystem.h"
using namespace std;
///////////////////////////////////////... |
cc2fe05a2d88f923c18058e5ed95331656d4d3bd9d953b2545584e871b1835d5 | C++ | 3,672 | 136 | //! \file us_helpdaemon.cpp
#include "us_helpdaemon.h"
#include "us_settings.h"
#if QT_VERSION > 0x050000
#include <QtWidgets/QApplication>
#else
#include <QtSingleApplication>
#endif
US_HelpDaemon::US_HelpDaemon( const QString& page, QObject* o ) : QObject( o )
{
// special Q_OS_WIN code apparently does not work ... |
ad151900380991c6eb8c1373ecbe985eb23ae32f9d9b1b03097122a9c7b1b2f9 | C++ | 3,719 | 124 | /** \file dotplot_main.cpp
*
* Defines the "vg dotplot" subcommand, which renders dotplots from an xg index relating the embedded paths
*/
#include <omp.h>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include "subcommand.hpp"
#include "../vg.hpp"
#include "../xg.hpp"
#include <vg/io/vpkg.hpp>
#i... |
78ee74b6423c4fb6c79c4fa1920014697f90e3d64cd669967800a23fef705659 | C++ | 3,726 | 99 | /**
* \file split_strand_graph.cpp: contains the implementation of StrandSplitGraph
*/
#include "split_strand_graph.hpp"
namespace vg {
using namespace std;
StrandSplitGraph::StrandSplitGraph(const HandleGraph* graph) : graph(graph){
// nothing to do
}
bool StrandSplitGraph::has_node(id... |
e3e30fa92af4309f4559c4e1a31765a88428f8c9bea8db9688e8c987c34d76f3 | C++ | 3,818 | 145 | #include <array>
#include <cassert>
#include <initializer_list>
#include <utility>
#include <vector>
#include <graphtyper/constants.hpp>
#include <graphtyper/graph/alt.hpp>
#include <graphtyper/utilities/logging.hpp>
namespace gyper
{
Alt::Alt(std::vector<char> && _seq) : seq(std::forward<std::vector<char>>(_seq))
{
... |
076cb5bb62ea1c822a08284f4cbc4026f8e8237f8e62659caf7b6ddc00ed5ea7 | C++ | 3,830 | 151 | //! \file us_table.cpp
#include "us_table.h"
#include "us_gui_settings.h"
US_Table::US_Table( QMap< double, double >& map,
const QString& type,
bool& change,
QWidget* parent,
Qt::WindowFla... |
866eec8bb47eb37c4e05185d7739e2311257c7ae3251afbbba7df860d96f7950 | C++ | 3,834 | 124 | ///
/// \file position.cpp
///
/// Unit tests for Position and pos_t manipulation
///
#include "catch.hpp"
#include "../position.hpp"
#include <vg/vg.pb.h>
namespace vg {
namespace unittest {
TEST_CASE( "Position can be reversed", "[position]" ) {
Position forward;
forward.set_node_id(123);
forward.set... |
1951b1af45d6fe71577e069b70d2c9c9a2ca103b0b47209849e6f023471b9434 | C++ | 3,870 | 105 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
2dc9ec803f4c6a5da1002b456cd2e9ae5c00d7088b51e2bb205e8a6771c2d3f9 | C++ | 3,898 | 126 | //! \file us_intensity.cpp
#include "us_intensity.h"
#include "us_settings.h"
#include "us_gui_settings.h"
#include "us_util.h"
#include "us_gui_util.h"
US_Intensity::US_Intensity(
const QString runID,
const QString triple,
const QVector< double >& data,
const QVector< double >& scan )
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.