sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
010b321aadf33edcecce697087f418933cd89dab87209397ea00b7f10375e547 | C | 58,255 | 1,478 | /*
LZ4 - Fast LZ compression algorithm
Copyright (C) 2011-2017, Yann Collet.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
... |
bda4ff9498a05bdbb93fdf2a5164a02c81667f918c2cc79ee51184c781f019ec | C | 60,784 | 2,094 | #include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void make_box1(double *x, int N, double scal, int bs,
int *box, int *lis, int *mxi) {
int i, ix;
for (i=0;i<=bs;i++) box[i]=-1;
for (i=0;i<=bs;i++) mxi[i]=0;
for(i=0;i<N;i++) {ix=(int)(x[i]*scal);lis[i]=box[ix]; box[ix]=i; mxi... |
51da9b20983c44267be52c117401906de7041462ad25bead93a6a7298f84bae4 | C | 61,170 | 1,961 | #include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <limits.h>
#include "phil.h"
#include "BsplnWgt.h"
#include "quant.h"
/************************************************************************/
static int buildFloatImage (short ... |
b0bc818b5bf1de5e0a77c31198ea65781c0598e4a9d2eff6858edf2e7ae4b686 | C | 63,040 | 2,066 | /* hts.c -- format-neutral I/O, indexing, and iterator API functions.
Copyright (C) 2008, 2009, 2012-2016 Genome Research Ltd.
Copyright (C) 2012, 2013 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and as... |
e298531eec72f1be2e281e399081a6ba4b3795b45fea9b5561390e7d9337ba15 | C | 63,836 | 1,545 | #include "htslib/sam.h"
#include "htslib/hts.h"
#include "htslib/faidx.h"
#include "htslib/kstring.h"
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <pthread.h>
#include "MethylDac... |
fd7ad55462550d7cd7c3fecf1da1aea73bdcd157d12eac7a221155b2810c3b13 | C | 64,737 | 1,782 | /* stats.c -- This is the former bamcheck integrated into samtools/htslib.
Copyright (C) 2020-2021, 2024 Genome Research Ltd.
Author: James Bonfield <jkb@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softw... |
53e5f515e05c71f230467cdf89a1282b9508fd0a8fb19a6a32338f33c069721a | C | 66,379 | 2,094 | /*<html><pre> -<a href="qh-geom.htm"
>-------------------------------</a><a name="TOP">-</a>
geom2.c
infrequently used geometric routines of qhull
see qh-geom.htm and geom.h
Copyright (c) 1993-2015 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull/geom2.c#6 $$Cha... |
cd6e737d8403893a1a15eb232d11e875483ae6f4567e1174af220804fa495ce7 | C | 68,093 | 2,096 | /*<html><pre> -<a href="qh-geom_r.htm"
>-------------------------------</a><a name="TOP">-</a>
geom2_r.c
infrequently used geometric routines of qhull
see qh-geom_r.htm and geom_r.h
Copyright (c) 1993-2015 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull_r/geom2... |
3bf646d0ef754e3927a259051d23f85c3c63d118a420710e48c1c5c7fcbb79a7 | C | 68,959 | 1,904 | /* sam_view.c -- SAM<->BAM<->CRAM conversion.
Copyright (C) 2009-2026 Genome Research Ltd.
Portions copyright (C) 2009, 2011, 2012 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentatio... |
fb1c93a55b46de6d144a728c2a7ee6507f87937b9f19e774b980e04a06c88f4c | C | 69,208 | 1,947 | /* bam_sort.c -- sorting and merging.
Copyright (C) 2008-2016 Genome Research Ltd.
Portions copyright (C) 2009-2012 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Author: Martin Pollard <mp15@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this soft... |
a89b86a5fb25481b79c6c2c9aff92e31743d2d65492c51e7c4c9c93215a1935a | C | 69,508 | 2,073 | /* sam.c -- SAM and BAM file I/O and manipulation.
Copyright (C) 2008-2010, 2012-2016 Genome Research Ltd.
Copyright (C) 2010, 2012, 2013 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated docum... |
9e745fc2ebbc78429c6caf0a102f164329d30effca84f7c65eec0f9399153048 | C | 70,232 | 1,730 | /* stats.c -- This is the former bamcheck integrated into samtools/htslib.
Copyright (C) 2012-2015 Genome Research Ltd.
Author: Petr Danecek <pd3@sanger.ac.uk>
Author: Sam Nicholls <sam@samnicholls.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and ass... |
0e74e0f152877b2cbfb3a465766d52a8931b105bd0d25d876e6b97d282026cd5 | C | 71,431 | 2,000 | /*
* Brute force symmetry analyzer.
* This is actually C++ program, masquerading as a C one!
*
* (C) 1996, 2003 S. Patchkovskii, Serguei.Patchkovskii@sympatico.ca
* modifications by S. Dohm and S. Ehlert
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the G... |
be453dbe217547cd33fc65932c54799fb444ff43e2c121573d58017f3ef355d7 | C | 73,080 | 1,608 |
#include "../headers/rpdb.h"
/*
* Copyright <2012> <Vincent Le Guilloux,Peter Schmidtke, Pierre Tuffery>
* Copyright <2013-2018> <Peter Schmidtke, Vincent Le Guilloux>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), t... |
79410933b6fd8b17551aabdc86a081b77d602a01ed928820c9c81fd5250c785c | C | 74,085 | 2,521 | /*
* Copyright (C) 2000-2014, Thomas Maier-Komor
*
* This is the source code of mbuffer.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at... |
b04dbef166fc4207a1f17877c29f1953f97e371d56fc5ddd150cbcfa01814df6 | C | 74,196 | 2,378 | #include "stdio.h"
#include "string.h"
#include "math.h"
#include <stdlib.h>
#include "R.h"
void bounded_monotone_fndr(double *vector,int size);
void bounded_monotone_fdr(double *vector,int size);
int least_concave_majorant(double *x,double *F, int first_point, int final_point, double *F_g, double *f_g, int size, dou... |
51877107fbda28134ad6dc7ccdfd0e518711628bcb4df25effe7cfab39805449 | C | 74,570 | 2,100 |
/*<html><pre> -<a href="qh-globa_r.htm"
>-------------------------------</a><a name="TOP">-</a>
global_r.c
initializes all the globals of the qhull application
see README
see libqhull_r.h for qh.globals and function prototypes
see qhull_ra.h for internal functions
... |
63674a9beddcbaa4dfd4c753eff902b01ab1e813a43fac904f0a540578e648ca | C | 75,745 | 2,217 |
/*<html><pre> -<a href="qh-globa.htm"
>-------------------------------</a><a name="TOP">-</a>
global.c
initializes all the globals of the qhull application
see README
see libqhull.h for qh.globals and function prototypes
see qhull_a.h for internal functions
Copyrig... |
e456a860d7b9a8181604d22468579d5ea8281b31c831797a2da5805ccc5e18b5 | C | 83,158 | 3,159 | /*
Copyright (c) 2012-2014 Genome Research Ltd.
Author: James Bonfield <jkb@sanger.ac.uk>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this l... |
8d0795d3c2ba8d4aebc94885e617eeccc32a470f8a2613dfcae738827bfe0a20 | C | 87,379 | 3,105 | /*
Copyright (c) 2012-2013 Genome Research Ltd.
Author: James Bonfield <jkb@sanger.ac.uk>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this l... |
d290373bae1642c1f38878a53ec9413b5f6245da5d0b29cbdb6879547efe2bb1 | C | 89,163 | 2,751 | /* bam_markdup.c -- Mark duplicates from a coord sorted file that has gone
through fixmates with the mate scoring option on.
Copyright (C) 2017-2026 Genome Research Ltd.
Author: Andrew Whitwham <aw7@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a co... |
d7db6ea0945f35172f26b3e7a6bbc328030c1a3c5cce4a4919429437a978cd4e | C | 91,924 | 2,620 | /************************************************************************/
/* */
/* Task: Extraction and insertion into volumes of line arrays */
/* Full set of conversions (double)-(float)-(short) */
/* */
/************************************************************************/... |
27037763beb532a4a78564c8851076c1a6f19167f0b3c4fc79346529c8ae8a30 | C | 97,545 | 2,501 | /*
* =====================================================================================
*
* Filename: main.cm
*
* Description: Generate streamlines by integrating orientation field, then
* compute intersections with requested projection surface
*
* Version: 2.0
* C... |
c495f0774452c766a7cf97e478e040934cec7bdab60cb0d99b173f26d7c87275 | C | 102,923 | 2,727 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <time.h>
enum load_mode {
LOAD_MMAP,
LOAD_PARALLEL,
LOAD_SEQUENTIAL
};
enum save_mode {
SAVE_PARALLEL,
SAVE_SEQUENTIAL
};
#def... |
042f473b256b9d027a5fd73d8f05d7964285d3288bc80de11f44c911d726e095 | C | 112,857 | 4,604 | /*
Copyright (c) 2012-2014 Genome Research Ltd.
Author: James Bonfield <jkb@sanger.ac.uk>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this l... |
2fd58bedbd51344395fda148b8df7afc1b9be16d675b19781cb4dbf05f04fa93 | C | 114,389 | 3,222 | /*<html><pre> -<a href="qh-poly.htm"
>-------------------------------</a><a name="TOP">-</a>
poly2.c
implements polygons and simplices
see qh-poly.htm, poly.h and libqhull.h
frequently used code is in poly.c
Copyright (c) 1993-2015 The Geometry Center.
$Id: //main/20... |
f96d0b81b414204607c1d52367150aaff5995f6f7dbec7e99ed06e5afee12ca4 | C | 117,516 | 3,222 | /*<html><pre> -<a href="qh-poly_r.htm"
>-------------------------------</a><a name="TOP">-</a>
poly2_r.c
implements polygons and simplicies
see qh-poly_r.htm, poly_r.h and libqhull_r.h
frequently used code is in poly_r.c
Copyright (c) 1993-2015 The Geometry Center.
$... |
4295c2372cb5699e576f463e03c7eadb33f0da55f890bd2efbb32ae941813d27 | C | 120,463 | 3,483 | /* vcf.c -- VCF/BCF API functions.
Copyright (C) 2012, 2013 Broad Institute.
Copyright (C) 2012-2016 Genome Research Ltd.
Portions copyright (C) 2014 Intel Corporation.
Author: Heng Li <lh3@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... |
e1cc5629727c105edc18f611bf8e42246096d755fb483f012eede7f1640411f5 | C | 121,929 | 3,628 | /*<html><pre> -<a href="qh-merge.htm#TOC"
>-------------------------------</a><a name="TOP">-</a>
merge.c
merges non-convex facets
see qh-merge.htm and merge.h
other modules call qh_premerge() and qh_postmerge()
the user may call qh_postmerge() to perform additional mer... |
0ff5a2371dc4c068ee4f97912dcc7eb98175397c70b14ce8fabf383ff6c681cc | C | 124,326 | 2,996 | /* stats.c -- This is the former bamcheck integrated into samtools/htslib.
Copyright (C) 2012-2026 Genome Research Ltd.
Author: Petr Danecek <pd3@sanger.ac.uk>
Author: Sam Nicholls <sam@samnicholls.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and ass... |
34a7214b1df853e8df72bb2710a2535c4a94e35dc300489948f2fdaf1156d187 | C | 124,929 | 3,627 | /*<html><pre> -<a href="qh-merge_r.htm#TOC"
>-------------------------------</a><a name="TOP">-</a>
merge_r.c
merges non-convex facets
see qh-merge_r.htm and merge_r.h
other modules call qh_premerge() and qh_postmerge()
the user may call qh_postmerge() to perform additi... |
ceece629430273773ae8872fe8eec83900df8c80d971942e3040ed21d39f7159 | C | 126,159 | 3,595 | /* bam_consensus.c -- consensus subcommand.
Copyright (C) 1998-2001,2003 Medical Research Council (Gap4/5 source)
Copyright (C) 2003-2005,2007-2026 Genome Research Ltd.
Author: James Bonfield <jkb@sanger.ac.uk>
The primary work here is GRL since 2021, under an MIT license.
Sections derived from Gap5, wh... |
d672a214c29dbf6e43d5541016d472a0bd351341c87dabbd5de40136f69cfab8 | C | 133,754 | 4,062 | /*<html><pre> -<a href="qh-io.htm"
>-------------------------------</a><a name="TOP">-</a>
io.c
Input/Output routines of qhull application
see qh-io.htm and io.h
see user.c for qh_errprint and qh_printfacetlist
unix.c calls qh_readpoints and qh_produce_output
unix.c... |
7dd3fdf10e25a934c1c36d9ab0d043ea898743335e70ace5f91559b73dd13690 | C | 138,406 | 4,062 | /*<html><pre> -<a href="qh-io_r.htm"
>-------------------------------</a><a name="TOP">-</a>
io_r.c
Input/Output routines of qhull application
see qh-io_r.htm and io_r.h
see user_r.c for qh_errprint and qh_printfacetlist
unix_r.c calls qh_readpoints and qh_produce_outpu... |
23f9a8dd928d0fff8a652d59750088c96a7f5cd2487d63252132c71f8e0a3e54 | C | 138,417 | 3,968 | /* bam_sort.c -- sorting and merging.
Copyright (C) 2008-2026 Genome Research Ltd.
Portions copyright (C) 2009-2012 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Author: Martin Pollard <mp15@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this soft... |
26ea69267c80c7c833832e0634b18c77a478a098bdab218eb4c35c69c09c097b | C | 143,855 | 4,784 | /* The C clustering library.
* Copyright (C) 2002 Michiel Jan Laurens de Hoon.
*
* This library was written at the Laboratory of DNA Information Analysis,
* Human Genome Center, Institute of Medical Science, University of Tokyo,
* 4-6-1 Shirokanedai, Minato-ku, Tokyo 108-8639, Japan.
* Contact: mdehoon 'AT' gsc.r... |
6623bdd8181b1153e1ac53ffb4b65da358224ea77ede11f134badf59d0dcab9a | C | 200,000 | 4,669 | /* Generated by Cython 0.29.32 */
#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSIO... |
814804d572b607dc6dec19bd243996e64244d5b40a5f52ef50cbcb560ea521e7 | C | 200,000 | 4,600 | /* Generated by Cython 0.27.3 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython ... |
e566fd22e55c4e365698f9a1775c57465697126e73e3a5bcf059f9f08b396f99 | C++ | 93 | 4 | #include "Instrumentor.h"
// if true, benchmarking is active.
bool rayx::BENCH_FLAG = false; |
e568ca42ede918e91038fd07276e92df2369b9e6bdfa74f687e92242a0c4fbfe | C++ | 153 | 5 | // This is currently just to establish the base structure of the project.
#include <iostream>
void main() { std::cout << "Hello World!" << std::endl; } |
a1c0ba2845ee5a11294b9ead34275cc00aa3a83df784c9b0841124ffc2a095d6 | C++ | 174 | 9 | #include "TerminalApp.h"
int main(int argc, char** argv) {
RAYX_PROFILE_FUNCTION_STDOUT();
TerminalApp app = TerminalApp(argc, argv);
app.run();
return 0;
} |
3aedb985d3f135b6d7d3ffdd7b5196a4132bb67cca51bace8e17d4fc38e72156 | C++ | 209 | 9 | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "proj.h"
|
ff71ae4e371514164b6e00eef4d04233bbc5922d89fbb6fbbd1440f6423da45f | C++ | 221 | 15 | #include <vector>
#ifndef TUI_HPP_
#include "tui.hpp"
#endif
using namespace std;
int main(const int argc, const char* argv[]) {
if (argc == 1) {
main_title();
}
return quick_operate(argc, argv);
} |
67e263b8e86848cf7780125a57d54fe6d1af12aeb9afaa50d458062269b46c54 | C++ | 243 | 15 | #include "Approx.h"
#include "Constants.h"
namespace rayx {
// double pow simple
RAYX_FN_ACC
double RAYX_API dpow(double a, int b) {
double res = 1;
for (int i = 1; i <= b; i++) { res *= a; }
return res;
}
} // namespace rayx
|
3fa42840701f185db5fa4f1c0f214d36e016ae01bc5c57ce96e3412db6fe3577 | C++ | 275 | 14 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
bool check_is_na(double x) {
return Rcpp::traits::is_na<REALSXP>(x);
}
|
9c213ef4deb54bc0713c8dd176be0d14e50379572e5faa9aeef2b5f241405863 | C++ | 276 | 14 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
bool haveSameSign(double a, double b) {
return (a >= 0) == (b >= 0);
} |
da2f178574e869602d9d82f8b4da470538147f692658c6c13ca34bb477fad811 | C++ | 278 | 16 | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "utils.h"
namespace starspace {
namespace detail {
thread_local int id;
}
}
|
d715929392b5a35a4ab4810b8229656b2789ecbcd73e1251c2ead83e0eaf4e86 | C++ | 332 | 14 | #include "mol_state.hpp"
#include "util/debug.hpp"
namespace steps::dist {
std::ostream& operator<<(std::ostream& os, const Occupancy& o) {
os << "correction_: " << o.corrections_ << '\n';
os << "ids_: " << o.ids_ << '\n';
os << "start_time_: " << o.start_time_ << '\n';
return os;
}
} // namespace ... |
2ca3a3ae74f83dcaee466045a22f6e25de757f898e5bcd62fc163bf492d5ad47 | C++ | 334 | 16 | #ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#define CGLTF_IMPLEMENTATION
#include "../extern/cgltf.h"
#define FAST_OBJ_IMPLEMENTATION
#include "../extern/fast_obj.h"
#define MICRO_PLY_IMPL
#include "../extern/micro_ply.h"
#undef CGLTF_IMPLEMENTATION
#undef FAST_OBJ_IMPLEMENTATION
#undef M... |
b3fcddf427fd99c12701798d4a749d0eae35d5f88bc11cba694aee34ecdd7489 | C++ | 387 | 26 | /*
* Track maximum memory usage between 2 points
*
*/
#include "memory_tracker.hpp"
#include "peak_rss.hpp"
namespace steps::util {
void MemoryTracker::start() {
init_ = peak_rss();
}
void MemoryTracker::stop() {
final_ = peak_rss();
}
/*
* return value is in bytes
*/
std::size_t MemoryTracker::diff()... |
1012ff249eff34741ed02d719b3c1310e8fce7cc5cefbf43a29c9bfc82327448 | C++ | 389 | 24 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K(double x, arma::vec egvalues)
{
double res = 0.0;
const int en = egvalues.size();
for(int i = 0; i < en; i++)
{
res = res + log(... |
3e0b4a2d9424159accba9eefdb07d5ce59cbeb9c63022c297fbd50c3b332eece | C++ | 406 | 24 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K1(double x, arma::vec egvalues, double q)
{
double res = 0.0;
const int en = egvalues.size();
for(int i = 0; i < en; i++)
{
res =... |
8a2fc3563001ef04423032fec2d71bcc14616bcc733547374195c5102c602c6d | C++ | 408 | 24 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K2(double x, arma::vec egvalues)
{
double res = 0.0;
const int en = egvalues.size();
for(int i = 0; i < en; i++)
{
res = res + pow... |
84074746dd07701794594f023fa55115bcef31e150f72799427555038eaf3d10 | C++ | 415 | 16 | #include "distmemb.hpp"
namespace steps::dist {
DistMemb::DistMemb(const model::membrane_id& membrane,
DistMesh& mesh,
const std::set<model::patch_id>& patches,
double capac)
: pID(membrane)
, meshRef(mesh)
, pPatches(patches)
, pCapacitance(cap... |
5ec73a6be0a55a9b5420b4ef67d3ea4037eea11a46af55e3306401111956b5ba | C++ | 478 | 16 | #include "mpi/dist/tetopsplit/kproc/propensities.hpp"
#include "boost/iostreams/device/null.hpp"
#include "boost/iostreams/stream.hpp"
#include <catch2/catch_test_macros.hpp>
TEST_CASE("propensities", "[steps4]") {
boost::iostreams::stream<boost::iostreams::null_sink> null_ostr(
(boost::iostreams::null_s... |
9f141930841729d349bb3aa5755b9482384b6b30f645a8dbc754e9b14f57bb52 | C++ | 483 | 25 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K_Binary_SPA(double x, arma::vec muhat, arma::vec G)
{
double res = 0.0;
const int n = muhat.size();
... |
7736f2772f1c9aab53f17683ad939b4833322f85bbac1b65f975b02e89f1f0cd | C++ | 497 | 26 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K_Binary_SPA_alt(double x, arma::vec muhat, arma::vec G)
{
double res = 0.0;
const int n = muhat.size()... |
d4e7e611ff7227e0892af0bff156771b1ee45d14eba7f319e5f8e9dad0793fa9 | C++ | 500 | 28 | /*
* Track time usage between 2 points.
*
*/
#include "time_tracker.hpp"
namespace steps::util {
void TimeTracker::start() {
init_ = std::chrono::steady_clock::now();
}
void TimeTracker::stop() {
final_ = std::chrono::steady_clock::now();
}
/*
* return value is in seconds
*/
double TimeTracker::diff(... |
8d2fbac32a3f98ab11195b5317bdd7f86915e784cb1ea3e9909a366bc5cb163e | C++ | 520 | 21 | #include "Angle.h"
#include <sstream>
#include "Debug/Debug.h"
#include "Debug/Instrumentor.h"
#include "Shader/Constants.h"
namespace rayx {
/// Converts an angle in degrees to radians.
Rad Deg::toRad() const { return Rad(deg * PI / 180); }
/// Converts an angle in radians to degrees.
Deg Rad::toDeg() const { ret... |
4b9d865878f2c5a65229356e4ae1104662f3894e5dbf45498859569159d2ef25 | C++ | 525 | 27 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K1_Binary_SPA(double x, arma::vec muhat, arma::vec G, double q)
{
double res = 0.0;
const int n = muhat... |
93ebfc0fb213b108bb28ac6cd1d951c306e65d79d1ff04edd7694b7294cf64f5 | C++ | 546 | 27 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K1_Binary_SPA_alt(double x, arma::vec muhat, arma::vec G, double q)
{
double res = 0.0;
const int n = m... |
054253caf8032d19697568ac7b04781714601086ed26d39d39871cb97d978662 | C++ | 595 | 30 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K2_Binary_SPA(double x, arma::vec muhat, arma::vec G)
{
double res = 0.0;
double temp1 = 0.0;
double temp... |
e03fe67f07985d5c436cc3504f629e57420fecfa82e70e2d8fa2fbf468108309 | C++ | 598 | 29 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <math.h>
using namespace Rcpp;
// [[Rcpp::export]]
double K2_Binary_SPA_alt(double x, arma::vec muhat, arma::vec G)
{
double res = 0.0;
double temp1 = 0.0;
double ... |
5ea0e046349e658d0ecf4ac6b22758452476d5868dc088765e963254f380f5a7 | C++ | 601 | 20 | #include "LightSource.h"
#include <cmath>
#include "Beamline/EnergyDistribution.h"
#include "Design/DesignSource.h"
namespace rayx {
LightSourceBase::LightSourceBase(const DesignSource& dSource) : m_numberOfRays(static_cast<uint32_t>(dSource.getNumberOfRays())) {}
// needed for many of the light sources, from two a... |
4fdb2773d77ea4fc5078f1a1c4e98b46af025608ed2f8162dd017a0a2fe13dd2 | C++ | 607 | 21 | #include "SphericalCoords.h"
namespace rayx {
RAYX_FN_ACC
void RAYX_API sphericalCoordsToDirection(double phi, double psi, glm::dvec3& out_direction) {
double cos_psi = glm::cos(psi);
double cos_phi = glm::cos(phi);
double sin_psi = glm::sin(psi);
double sin_phi = glm::sin(phi);
out_direction = g... |
9d01a86715a5c089248a5cd5b2ca6fb8878837c47e90bfecf32d5eed35079192 | C++ | 671 | 14 | // ***************************************************************************
// BamException_p.cpp (c) 2011 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
// Last modified: 25 October 2011 (DB)
// -----------------------... |
458b9c23ab6cc1473b657b815f07ce73e65a9363102ca097581c9620ed25e11b | C++ | 685 | 29 | #include "util/optional_num.hpp"
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
using steps::util::NoneType;
using steps::util::OptionalNum;
TEST_CASE("OptionalNum_isValue") {
auto v3 = OptionalNum<int>(3);
REQUIRE(v3.value() == 3);
REQUIRE(*v3 == 3)... |
ffffbe42a14c1c2c7e9efae96b0bf2e7c08d2341caa5cbc8997036a5f5b5d348 | C++ | 693 | 24 | #include <filesystem>
#include "CanonicalizePath.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "setupTests.h"
int GLOBAL_ARGC = 0;
char** GLOBAL_ARGV = nullptr;
int main(int argc, char** argv) {
std::filesystem::path outputDir = canonicalizeRepositoryPath("Intern/rayx-core/tests/output");
... |
3182a2b6a4ef3449331f52a909225fed466e9ece75f8f318ab6070623ae386d6 | C++ | 694 | 26 | #include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
Rcpp::NumericMatrix legendre(Rcpp::NumericVector x, int p) {
int n = x.size();
Rcpp::IntegerVector polies (p+1);
for(int i=0; i < polies.length(); i++)
polies[i] = (i*2+1);
Rcpp::NumericVector squirts = sqrt(polies);
Rcpp::NumericMatrix y(n, p);... |
7bd6ede764dc87ed16d35a10b4a1ac1b22f906ed1c72001c0a5e9a67ea7cc28b | C++ | 705 | 47 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#define STRICT_R_HEADERS
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
double CCT_pval(arma::vec x, arma::vec weights)
{
double cct_stat = 0.0;
double pval = 0.0;
bool lower = false;
bool logp = false;
... |
d9f1641b57345cf9ade1dce687c0689197649ff3416fa5479b5a8c2c14fe6e02 | C++ | 710 | 39 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// declare K1 (first derivative)
double K1(double x, arma::vec egvalues, double q);
// [[Rcpp::export]]
double Bisection(arma::vec egvalues, double q, double xmin, double xmax)
{
... |
b7896a7fc4e5636240d68f434035387e19a5621bb0fe0f3ab76c0a5022f98770 | C++ | 753 | 62 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#include <RcppArmadillo.h>
using namespace Rcpp;
// [[Rcpp::export]]
arma::mat matrix_impute(arma::mat G) {
int i,j;
int n = G.n_rows;
int p = G.n_cols;
arma::vec AF;
AF.zeros(p);
double num = 0;
// Calculate AF
for(i = 0; i < p; i++)
{
... |
1afbea4766024f598b8c020dfeb805c183786247dcd425b8a4284d09ca868720 | C++ | 827 | 35 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
eef435e1b098cff21be85860d0d4642cd8f90080d0d7d5a8d58471b8158b106a | C++ | 834 | 31 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
87b3dd905fd1b75a9e57f67c8836566f70c83ad61c23b84b2467ac1e78cfc81c | C++ | 851 | 32 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
633c564159b73ff2d206b3c462cf4c744b616a58d217e00bae6735fc71e80857 | C++ | 853 | 33 | #include <chrono>
#include <cmath>
#include <thread>
#include "util/tracker/time_tracker.hpp"
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
TEST_CASE("TimeTracker_zero") {
steps::util::TimeTracker tracker{};
tracker.start();
tracker.stop();
REQUI... |
79590cf4ffc16489f05752ebf21c010aba9888e81fdd2c5cb75d987fdc392892 | C++ | 857 | 25 | #include "Cubic.h"
namespace rayx {
// rotates for the cubic collision by angle alpha (taken from RAY-UI)
RAYX_FN_ACC
glm::dvec3 RAYX_API cubicPosition(const glm::dvec3& __restrict rayPosition, double alpha) {
double yy = rayPosition[1];
double y = yy * glm::cos(alpha) - rayPosition[2] * glm::sin(alpha);
... |
53cd8e198a6ffd38b53371fae891c02c5b0ba732a929e1889da932077918e0da | C++ | 867 | 35 | #include "util/pqueue.hpp"
#include <catch2/catch_test_macros.hpp>
TEST_CASE("pqueue") {
steps::util::PQueue<double, int> pq;
// add in non-sorted order
pq.push(0, 0);
pq.push(3.1, 3);
pq.push(2, 1);
pq.push(2.5, 2);
// add twice
pq.push(4, 1);
// override processed of element in ... |
7a48c93ccb811ba8985c28ba75c307356ef1acc4c5def12d2e3f52ede7ab65b0 | C++ | 868 | 27 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
06fe1f973b81e34fc4fb956e1fd441409a000dedbadbe868d46e39c4a1c4d20e | C++ | 870 | 26 | /*
* Copyright (C) 2011 Regents of the University of Michigan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later v... |
54f078c7a2dd3b5edf597bd01e88a5cba3805e23f6dd3d089135d40732f1f965 | C++ | 871 | 28 | /*
* Copyright (C) 2010 Regents of the University of Michigan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later v... |
343d88a49b762c2d3e97676636059ebe5aef05924688bf9f54af11c8e5be1e26 | C++ | 888 | 27 | /*
* Copyright (C) 2010 Regents of the University of Michigan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later v... |
6145d5b15b19584eb74d105ccf886fc21dc080e1d68a4a4b44d130dcf2bedc6d | C++ | 898 | 20 |
/*
* Copyright (C) 2011 Regents of the University of Michigan,
* Hyun Min Kang, Matthew Flickenger, Matthew Snyder,
* and Goncalo Abecasis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Pub... |
3f5cede4716effda70edfa9c07a749514373c220bd9e85c07502c1aad43f0864 | C++ | 904 | 52 | // [[Rcpp::depends(RcppArmadillo)]]
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
List Indiv_Score_Test_SMMAT(arma::sp_mat G, const arma::mat& P, arma::vec residuals)
{
int i;
// number of markers
int p = G.n_cols;
// Uscore
arma::rowvec Uscore = trans(residuals)*G;
a... |
cc8b6140e014a5607a4b13f49414bfc7e6f139df60c900d33dd4471326eae3d2 | C++ | 910 | 38 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
8c3804a926778dedef543596fa0cbb1924663398d1c73443df5f075358781b56 | C++ | 912 | 42 | /****************************************************************************
**
** Copyright (c) 2008-2015 C.B. Barber. All rights reserved.
** $Id: //main/2015/qhull/src/libqhullcpp/QhullStat.cpp#3 $$Change: 2066 $
** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
**
**********************************************... |
70fe129365bb405ab1071fc6328b5006d49066cff69149308d64b854e515a380 | C++ | 925 | 29 | /*
* Copyright (C) 2010 Regents of the University of Michigan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later v... |
dfac0c3a2ac0068204ee5426d66f394593334d80adf73bb8c4f94f2adee4954f | C++ | 935 | 33 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
8eaebf49a8f0e75a527c8a0735122437c5d442993a0b3e041a62b4160eccdc4f | C++ | 936 | 40 | #include "std.h"
#include "functions.h"
bool functions::fileExists(const std::string& fileName)
{
std::fstream fin;
fin.open(fileName.c_str(),std::ios::in);
if( fin.is_open() )
{
fin.close();
return true;
}
fin.close();
return false;
}
void functions::tokenize(const string& str,
vector<stri... |
2499d1f83262b51b138880070057784e8e073bede5e8f0210dbcde9784c2ff64 | C++ | 937 | 42 | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "../starspace.h"
#include <iostream>
#include <boost/algorithm/string/predicate.hpp>
using namespace std;
using namespac... |
43afe690e111aef2a9e9b2bed6e9dad4d39e91af887a7de5f0291f4ee7a17dd4 | C++ | 956 | 33 | #include <cmath>
#include <iterator>
#include <numeric>
#include "math/constants.hpp"
#include "math/ghk.hpp"
#include <catch2/catch_test_macros.hpp>
using steps::math::FARADAY;
using steps::math::GAS_CONSTANT;
using steps::math::GHKcurrent;
using steps::math::permeability;
constexpr double T = 310.15;
constexpr do... |
3c6d48131f82bc72d9ff4927cb48eff1a7504d84784f83b877a318b3ee61e6bd | C++ | 991 | 30 | #include "diffdef.hpp"
#include "compdef.hpp"
#include "statedef.hpp"
namespace steps::dist {
Diffdef::Diffdef(const Compdef& compdef,
container::kproc_id kproc,
container::diffusion_id t_diffusion,
container::species_id species,
osh::Real t_dcst)
... |
c3d94243baa41a214420f9b60f17951f1848e9d7db2b93794b5406aa2a5a840e | C++ | 1,022 | 46 | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "../starspace.h"
#include <iostream>
#include <boost/algorithm/string/predicate.hpp>
using namespace std;
using namespac... |
e94ae1f5027f6eb1c195f5e3b77ba080d4607c14b2cddbe280cec8274f1d612d | C++ | 1,022 | 25 | #include "CanonicalizePath.h"
#include <cstring>
#include <stdexcept>
#include "Debug/Debug.h"
namespace rayx {
/// this function assumes that `base` is already an absolute path
std::filesystem::path canonicalize(const std::filesystem::path& relPath, const std::filesystem::path& base) {
if (!base.is_absolute())... |
0bcd15fe8a44dc587b2546fa5a09cba4abd7e144e152167cb38f041881de8e92 | C++ | 1,041 | 85 | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::interfaces(r, cpp)]]
#include <RcppArmadillo.h>
using namespace Rcpp;
// [[Rcpp::export]]
List matrix_flip(arma::mat G) {
int i,j;
int n = G.n_rows;
int p = G.n_cols;
arma::vec AF;
AF.zeros(p);
arma::vec MAF;
MAF.zeros(p);
double num = 0;
// Calculate AF
f... |
6b5f82dab5276a1c5db0f61196a16bd94b55fa39a0e1bf98c752f9d64b079619 | C++ | 1,043 | 26 | /*
* Copyright (C) 2010 Regents of the University of Michigan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later v... |
c781b3b61caf3100fb9783becce1fc468da46a7cfbc9afb2ae9c0228042c588a | C++ | 1,060 | 39 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
340325209b10280b57b23d45bc6c3c503b1fd3d3d724a0acaed4c5ebef8b3240 | C++ | 1,082 | 35 | #include "BundleHistory.h"
BundleHistory convertRaysToBundleHistory(rayx::Rays rays, const int numSources) {
RAYX_PROFILE_FUNCTION_STDOUT();
rays = rays.sortByPathIdAndPathEventId();
const auto size = rays.size();
BundleHistory bundle;
for (int i = 0; i < size;) {
const auto c... |
8e4ae8c098a77cbbcfaeb3c70bcaf5f4caff218033f01ec634b903010b981898 | C++ | 1,083 | 20 | #include "c_api.h"
#include "VarFlow.h"
#include <highgui.h>
#include <opencv2/opencv.hpp>
void varflow(int width, int height, int max_level, int start_level, int n1, int n2,
float rho, float alpha, float sigma, void* U, void* V,
void* I1, void* I2) {
VarFlow Opti... |
7daf154785d12f55fbec04b962bcb2ce305a05b030ab6a3bdf899334b2b5d0c6 | C++ | 1,115 | 35 | /* Copyright (c) 2008-2026 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.