sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
4e7555aa2d811faefcebcea291f909b111b48d989a34ed6f8c2b5218660b6c03 | C++ | 2,314 | 89 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <ctime>
#include <iostream>
#inclu... |
2e8166726205ca0ee174363ea07eba8bb7a6e34f1ec2a6ad6ecb8186ae279d7a | C++ | 2,377 | 75 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "TestAttributesFS.hpp"
using name... |
b5f72b77313b7bc022d395f761c2c9e8297b718d0e813226ac046576f705591c | C++ | 2,388 | 136 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "H5Object.hpp"
#include "H5Excepti... |
3e132f476a85e1ebdaa68f1cdcdabd6e1262c3ceedd7547691c9f814bd45d17a | C++ | 2,424 | 78 | // Copyright © 2016 German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
//
// Author: Christian Kellner <kellner@bio.lm... |
4dd3bfc55595c2ef10bb1794116d06974b92885534bd7270dafe9dcdd860a7b7 | C++ | 2,457 | 122 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "EntityHDF5.hpp"
#include <nix/ut... |
9129b1eb1256d1683e746cacbeca0b350125abe0a72172f0afea63334ff7f1aa | C++ | 2,509 | 80 | // Copyright (C) 2025 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
#include "overlap/overlap.hpp"
#include <limits>
#include <type_traits>
tem... |
73ef3fb3b500d0bcbef132619054393a04c3577817253097628ce38949c68922 | C++ | 2,536 | 68 | // Copyright (C) 2015-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("RegularizedWedgeArea") {
using namespace overlap::detail;
... |
1078295be21561c6b648f9f1cb27bb3e23065de3ca5908306c80abb0575e189c | C++ | 2,539 | 109 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "TagHDF5.hpp"
#include <nix/util/u... |
c41aceace75e24c46a6c07dd8ca3f03dad4fada28c8bbad6b50456016e2a686b | C++ | 2,559 | 89 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "EntityWithMetadataHDF5.hpp"
#inc... |
190410e421d5d8113add50dae9e60bb6ef1249b894b2783b1d3310b40b5cd094 | C++ | 2,647 | 68 | // UWOT -- An R package for dimensionality reduction using UMAP
//
// Copyright (C) 2018 James Melville
//
// This file is part of UWOT
//
// UWOT 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... |
75a1fe4d7452dd3cee275977dff32e61e1104f1b8c7fdc52e6ff9f31d82d7cdd | C++ | 2,651 | 91 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <iostream>
#include "Direct... |
c4e5eb7479cd3340aff5c81d60b4dbd4af14f5a1b5401ab4918d036a84bc5155 | C++ | 2,675 | 72 | /**
* Copyright 2026, XGBoost Contributors
*/
#include "random_projection.h"
#include <cmath> // for sqrt
#include <cstddef> // for size_t
#include <cstdint> // for uint32_t
#include <random> // for normal_distribution
#include "../collective/broadcast.h" // for Broadcast
#include "../common/kernel.h" ... |
b5bfdf35365abf1f97ec25df23d1b33188c4ac623779febad9e77309db4c6b55 | C++ | 2,724 | 78 | // Copyright (C) 2015-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("NormalNewell") {
using Scalar = overlap::Scalar;
using V... |
5c53d8e4ed87213ba4217ed8c310b72317ff21e2427825b7ce101e1488b62dae | C++ | 2,831 | 73 | /**
* Copyright 2026, XGBoost Contributors
* \file normal_metric.cc
* \brief CPU implementation and registration of normal negative log-likelihood.
*/
#include "normal_metric.h"
#include <dmlc/registry.h>
#include <array> // for array
#include <cstddef> // for size_t
#include <set> // for set
#include <s... |
51aa807bff2be4a00bd8e8238f0524a438ccb631776989dca9d90ec67fe69e36 | C++ | 2,849 | 91 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
a900bb873b57bd25ca26201ae6d6dd8f2c90c244a7ea85fea0ad2d6d37a692fb | C++ | 2,878 | 128 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "NamedEntityHDF5.hpp"
#include <n... |
911abadddc8041bf441b7a9522f225191a7f90e819c25aedd2931d76fe69f93f | C++ | 2,879 | 73 | // Copyright © 2020 German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
//
// Author: Jan Grewe <jan.grewe@g-node.org>
... |
c6012e8716f33a98a8a533ab809a93881157e7d29dbd231d8db43400b971014f | C++ | 2,931 | 122 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
01bf060867afebe7c7528232073d39b8773854b3b75fde386e5410fd52a97e03 | C++ | 2,992 | 89 | // Copyright (C) 2015-2026 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
// In "EdgeOffCenter" we seem to hit an edge case where the calculation of the
// intersection ... |
a088063d53479a3ce41300cf1b34099a56f172ab555e7183822ec2ae1679a9af | C++ | 3,024 | 82 | /**
* Copyright 2024-2026, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/global_config.h> // for GlobalConfigThreadLocalStore
#include <cstddef> // for size_t
#include <cstdint> // for int32_t
#include <future> // for async, future, launch
#include <stdexcept> // for runtime_error
#i... |
6bb3be38f0aa5dce6bd1002737cf0768a7e97db54680b2b26c727884948de78c | C++ | 3,074 | 89 | /**
* Copyright 2015-2025, XGBoost Contributors
*
* @brief Registry of all objective functions.
*/
#include <dmlc/registry.h>
#include <xgboost/context.h>
#include <xgboost/objective.h>
#include <sstream> // for stringstream
#include <string> // for string
namespace dmlc {
DMLC_REGISTRY_ENABLE(::xgboost::ObjFu... |
fc3e31f4bfdff7b13eca3d6c6ab3a466976afbe5c25afdc636746fec58c634c5 | C++ | 3,104 | 140 | #include "mex.h"
#include "cv_src/cv.h"
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <ctype.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
int i, j, oi, oj, k;
int imw, imh;
int tpw, tph;
int resw, resh;
int outw, outh; // real size of ou... |
72e8997e27126ae8d8f9385eec265c90fb218b51f4e1b7e080b5e42d91d419e2 | C++ | 3,106 | 83 | /**
* Copyright 2026, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <array> // for array
#include <cmath> // for hypot
#include <cstddef> // for size_t
#include <vector> // for vector
#include "../../../src/common/kernel.h" // for DispatchKernel
#include "../../../src/gbm/random_projection.h"
... |
23e4b609c1e2ad9f1f8e177ee3c16adcbc0118134aa4b1e6d9fd38676a1869e5 | C++ | 3,121 | 105 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "SourceFS.hpp"
#include <ni... |
06755082d4acf1a3ace3f52ae8aa7e0b5a3bf3e0f646c1170af49cadff09e351 | C++ | 3,122 | 88 | /**
* Copyright 2018-2023, XGBoost Contributors
*/
#include "test_hinge.h"
#include <xgboost/context.h>
#include <xgboost/objective.h>
#include <limits>
#include "../../../src/common/linalg_op.h"
#include "../helpers.h"
namespace xgboost {
void TestHingeObj(const Context* ctx) {
std::unique_ptr<ObjFunction> obj... |
d80e77379c974016ff20a59e78204eef90bf4da3d5854d72ddaf2476d0798f69 | C++ | 3,145 | 110 | // Copyright (C) 2021-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("Elements") {
using namespace overlap;
constexpr auto eps... |
159979a6e3e35afe885f077ebc9ae96a34162a8f6b8f50e55506c533b8964303 | C++ | 3,169 | 100 | // -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
// Copyright (C) 2013 Henner Zeller <h.zeller@acm.org>
//
// 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 version 2.
//
// This ... |
353f893f89d244f64ed37aaf3935b447b9eefc26ae2d792512b17f0be1cc0854 | C++ | 3,228 | 112 | // Copyright (c) 2016, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "TestNDSize.hpp"
#include <nix/ND... |
e2441bab951d6c0cbd922e9ca5625bee2a24ad06dcddf6e20200f75c650b7094 | C++ | 3,276 | 90 | #include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
using namespace Rcpp;
/*
* Compute WLS estimates of covariance for all p by p gene pairs
*
* D: Design matrix for WLS (size n x k)
* X: Gene expression matrix (size n x p)
* W: Weight matrix (size n x p)
*
* Returns: a list with two components
* c... |
35a23671859a8212de6f1ac36a3c5a44efd2b91d40aa7c89a7186afe40dfe7b0 | C++ | 3,282 | 115 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "FeatureHDF5.hpp"
#include <nix/u... |
3885ac438acccd7f3a554acae34317ea2bb6ec592f72979d32774e19d4b62a80 | C++ | 3,287 | 80 | /**
* Copyright 2026, XGBoost Contributors
* \file poisson_obj.cc
* \brief CPU implementation and registration of the Poisson objective.
*/
#include "poisson_obj.h"
#include <dmlc/registry.h>
#include <algorithm> // for max
#include <cstddef> // for size_t
#include <cstdint> // for int32_t
#include "../co... |
82f8c62beb8abe9cc77f8bbc6b2dc6c349b680407cebe4fe2df78be5e0bc871c | C++ | 3,350 | 104 | /**
* Copyright 2022-2026, XGBoost contributors.
*/
#include <gtest/gtest.h>
#include <algorithm> // for min, max
#include <array> // for array
#include <cstddef> // for size_t
#include <limits> // for numeric_limits
#include <numeric> // for accumulate
#include <stdexcept> // for runtime_error
#inc... |
79e25ad38829110d894abebea6c9fe4dfa1fc274233ed774507f0eae25409ed8 | C++ | 3,367 | 108 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "FeatureFS.hpp"
#include <... |
9c47264a2e58eae0471708a31be503943d822f151d7468243bb8aaeaa0bcd50c | C++ | 3,405 | 107 | //
// Created by m on 6/10/16.
//
#include <iostream>
#include "MorletWaveletTransformMP.h"
#include <thread>
#include <list>
#include <cmath>
#include<ThreadPool.h>
#include "morlet.h"
using namespace std;
MorletWaveletTransformMP::MorletWaveletTransformMP (unsigned int cpus) : cpus(cpus) {
array.assign(10000... |
59d2f6369a5d3e771bf1cba8f106d3388859595af6df1e8a337a3e0a9caea267 | C++ | 3,411 | 116 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/util/util.hpp>
#include "Sour... |
ceeabfa0d71979404bbeef89238cafc3282a786973e8013a12e81d0e10cb199c | C++ | 3,416 | 109 | // Copyright (c) 2014, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/valid/checks.hpp>
#include <... |
497334311af292a00f9e90784a9bb72309ffbf61df18a82c3a3820be3d41c517 | C++ | 3,438 | 138 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "NamedEntityFS.hpp"
namesp... |
fdca010fe06d769e9a2d976d52977f8fac7824cad5a36842a80ebb67f3a7bfcb | C++ | 3,464 | 98 | /**
* Copyright 2018-2026, XGBoost Contributors
* \file hinge.cc
* \brief CPU implementation and registration of the hinge loss objective.
* \author Henry Gouk
*/
#include "hinge.h"
#include <dmlc/registry.h>
#include <algorithm> // for max
#include <cstddef> // for size_t
#include <cstdint> // for int32_... |
9f5c52234333a222f927b295197e617923724f0a53f1d7cd7dbf8d3da5c606fe | C++ | 3,482 | 72 | // Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::R... |
9b1b0636c1750892dd5a6a499ab31e7f9945429e1c0abfcdcfc2f79a51885464 | C++ | 3,486 | 103 | // Copyright (C) 2015-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("SphereTetOverlap") {
using namespace overlap;
TEST_CASE... |
bd13472942fee490a63d3d6bc096591fcabe11561424b362861906239256a628 | C++ | 3,505 | 96 | /**
* Copyright 2015-2025, XGBoost Contributors
* \file custom_metric.cc
* \brief This is an example to define plugin of xgboost.
* This plugin defines the additional metric function.
*/
#include <xgboost/base.h>
#include <xgboost/json.h>
#include <xgboost/linalg.h> // for Vector
#include <xgboost/objective.h>
#... |
316db289abac89ea011c2e409eec70dcdfcab035758a8a24e9a27e47787364d9 | C++ | 3,509 | 90 | #include <pybind11/pybind11.h>
#include "edffile.hpp"
namespace py = pybind11;
// Stolen from: https://stackoverflow.com/questions/25829143/trim-whitespace-from-a-string
std::string &rtrim(std::string &str)
{
auto it1 = std::find_if(str.rbegin(), str.rend(), [](char ch) {
return !std::isspace<char>(ch, ... |
7475737cd524fd4f860b2021b876b5bca8bf01de0bae071eebf693f733206f13 | C++ | 3,509 | 84 | /**
* Copyright 2026, XGBoost Contributors
* \file gamma_obj.cc
* \brief CPU implementation and registration of the gamma objective.
*/
#include "gamma_obj.h"
#include <dmlc/registry.h>
#include <algorithm> // for all_of, max
#include <cstddef> // for size_t
#include <cstdint> // for int32_t
#include "../... |
1395c65ed12b86285aed8792a0dcfe87b9142f2e57c9aa38a9fe3f5c418fa527 | C++ | 3,580 | 93 | /**
* Copyright 2022-2026, XGBoost Contributors
*
* @brief Utilities for estimating initial score.
*/
#include "fit_stump.h"
#include <cstddef> // for size_t
#include <cstdint> // for int32_t
#include "../collective/aggregator.h" // for GlobalSum
#include "../common/threading_utils.h" // for ParallelFor
#inc... |
13b3e809592a158a8a348b9a377bf53dd7afd7a494ab021156e037ad3f3008cd | C++ | 3,685 | 130 | // Copyright © 2014 German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
//
// Author: Christian Kellner <kellner@bio.lm... |
34ca9b1a4e3bfb9da3e6b62ac846b17f25a72110e471ca57bb6a30286b6e34c9 | C++ | 3,705 | 116 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <sstream>
#include <ctime>... |
14e12c789a13a8901b9ef6232bfded1cdfbda44e817b498a24294e834b0e55a2 | C++ | 3,755 | 149 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/Source.hpp>
#include <queue>... |
6ef149a77649efa69e4e9487c6cd129715d1a7ba6fecd06f55b8aafe7a5aae65 | C++ | 3,768 | 140 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
e16139478238020f68a51935d9c71230055d27c4d56d952e45b8e1dcc224784a | C++ | 3,783 | 98 | // Copyright (c) 2014, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <ctime>
#include <iostream>
#incl... |
9986fd4ec714a19f7b3750eeedd71469532f41b5a1c1b32d25cabdb5b8d06d19 | C++ | 3,850 | 118 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "BaseTestEntityWithSources.hpp"
#... |
7ea7bf458368b6b549a3ee8637066cc8cccfffa72111d4fd25a9cedb9b102268 | C++ | 3,872 | 95 | /**
* Copyright 2026, XGBoost Contributors
* \file tweedie_obj.cc
* \brief CPU implementation and registration of the Tweedie objective.
*/
#include "tweedie_obj.h"
#include <dmlc/registry.h>
#include <algorithm> // for max
#include <cstddef> // for size_t
#include <cstdint> // for int32_t
#include <sstrea... |
a15f608a2a13edebe79b5db2dc6969451d0327b5f227cfe7f729d84508ba600b | C++ | 3,873 | 101 | /**
* Copyright 2026, XGBoost Contributors
* \file multiclass_metric.cc
* \brief CPU implementations and registrations for multiclass metrics.
*/
#include "multiclass_metric.h"
#include <dmlc/registry.h>
#include <array>
#include <atomic>
#include <cstddef> // for size_t
#include "../collective/aggregator.h"
#i... |
8b43e9a44abf3c2bbef378000984d505efdd790f68c0457d0acb0d09f77b2145 | C++ | 3,886 | 145 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
248f552024eb79d3f7d64e9ab964fe6a0ffa0f77a170322de4003ccb121e7d81 | C++ | 3,907 | 100 | // Copyright (C) 2015-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("RegularizedWedge") {
using namespace overlap::detail;
/... |
a5b165d00dc4a59f72ab4285cc0b52630912ad141a713714aa75a2ce2d17b784 | C++ | 3,913 | 111 | // Copyright (C) 2021-2025 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include <array>
#include <cctype>
#include <locale>
#include <map>
#include <stdexcept>
#inclu... |
5719715fd30b08bfd2355971b418b1d0d680b58c61d88c9ef86bb754bada30b9 | C++ | 3,960 | 100 | // Author: "Keitaro Yamashita, Garib N. Murshudov"
// MRC Laboratory of Molecular Biology
#include <nanobind/nanobind.h>
#include <nanobind/stl/array.h>
#include <nanobind/stl/vector.h>
#include <nanobind/stl/tuple.h>
#include <gemmi/grid.hpp>
#include <gemmi/fourier.hpp>
#include <gemmi/neighbor.hpp>
#include <gemmi/... |
1f7d9ba7516aef8ff743ed07d58c2cc16a6a23b840cf0158cc651d8a1135169f | C++ | 3,978 | 97 | /**
* Copyright 2018-2025, XGBoost contributors
*/
#include "test_multiclass_obj.h"
#include <xgboost/context.h>
#include <xgboost/objective.h>
#include "../helpers.h"
namespace xgboost {
void TestSoftmaxMultiClassObjGPair(const Context* ctx) {
std::vector<std::pair<std::string, std::string>> args{{"num_class",... |
7c9a6f9695fcb27ecf131d735290064ae6e3af155b6eed2c1dc2ee836ec58da1 | C++ | 4,019 | 110 | // UWOT -- An R package for dimensionality reduction using UMAP
//
// Copyright (C) 2018 James Melville
//
// This file is part of UWOT
//
// UWOT 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... |
d89131db7ed1f1185d0963daaf4dc61333fc5ad9cf0f07c566331c990dcddb0b | C++ | 4,019 | 112 | // Copyright (C) 2015-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("SphereTetAreaTest") {
using namespace overlap;
// Spher... |
037ced8d071acb18f96dfa0e1213d1b65f6cf5efcef1bafdc3abb79f20310175 | C++ | 4,028 | 135 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
f584a6af853d075a42586e8f8dfbb7fee00e5dbc6974231ccfc8d8e2c782b97a | C++ | 4,033 | 143 | /**
* Copyright 2022-2024, XGBoost Contributors
*/
#include "threading_utils.h"
#include <algorithm> // for max, min
#include <cstdint> // for int32_t
#include <exception> // for exception
#include <filesystem> // for path, exists
#include <fstream> // for ifstream
#include <string> // for stoi, st... |
6b5044f27b9603eb7482680d9cfaa2b39da8684c85655e620a6acbdc750dc230 | C++ | 4,040 | 119 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/Block.hpp>
#include <nix/util... |
e0941da7d968aaddc3dbe70e3386840653e6651c3b1d0701845441eef7f15cd5 | C++ | 4,042 | 134 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "EntityWithSourcesHDF5.hpp"
#incl... |
0075433b63741229abed5396ee613d3911e34ed8b13f02aac9f67a6de1d543bc | C++ | 4,070 | 118 | // Copyright © 2016 German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
//
// Author: Christian Kellner <kellner@bio.lm... |
92d45fd920c443f3288a8c01dcc7252dd324f2216cc850786455b2029ec353b7 | C++ | 4,123 | 158 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
fe86dc7fb09ec685d726bb40bb1402f6b8a3776bcec5ca6238c5817a7de5cad5 | C++ | 4,171 | 149 | #include "edffile.hpp"
void EDFFile::open(std::string filename)
{
auto res = edfopen_file_readonly(filename.c_str(), &this->header, EDFLIB_DO_NOT_READ_ANNOTATIONS);
if (res != 0) {
// We're not going to try to catch each specific type of error, but
// just the most likely to be seen. More help... |
2ef480b09920bc14a4256fd006d613c6498f25bf5ff4e63c4ca3a76a2addac0d | C++ | 4,181 | 123 | // Copyright (c) 2013-2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "EntityWithMetadataFS.hpp"
#... |
0ceb12fc99c0cbb0dda511a798540e773c2a275769182b0f64094507a567ae4d | C++ | 4,262 | 114 | // UWOT -- An R package for dimensionality reduction using UMAP
//
// Copyright (C) 2018 James Melville
//
// This file is part of UWOT
//
// UWOT 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... |
1609ce32c5425e1680a0874dda318a103a0d592e8dcc221fb331a458a9d12f4a | C++ | 4,275 | 134 | // Copyright (C) 2015-2022 Severin Strobl <git@severin-strobl.de>
//
// SPDX-License-Identifier: MIT
//
// Exact calculation of the overlap volume of spheres and mesh elements.
// http://dx.doi.org/10.1016/j.jcp.2016.02.003
#include "common.hpp"
TEST_SUITE("SphereElementOverlap") {
using namespace overlap;
stati... |
a93b51c770c849273a9764ace02f35f9b2e5be777baed7a276231be1f7a20f73 | C++ | 4,284 | 112 | /*!
* Copyright 2017-2024 by Contributors
* \file updater_quantile_hist.cc
*/
#include <memory>
#include <vector>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtautological-constant-compare"
#pragma GCC diagnostic ignored "-W#pragma-messages"
#include "xgboost/gradient.h" // for GradientContainer
#... |
0d64e4f3c3a42ba2b2dd08de8acd1b9335bee7c7fee939f10d1cf3288be75033 | C++ | 4,295 | 112 | /**
* Copyright 2022-2026, XGBoost Contributors
*/
#include "stats.h"
#include <cstddef> // std::size_t
#include <numeric> // std::accumulate
#include "../collective/aggregator.h" // for GlobalSum
#include "linalg_op.h" // for Matrix
#include "numeric.h" // for TransformRe... |
806faa736603265f71f66b9aba90c18cc4b3250e6b118f85542243a20fe233be | C++ | 4,303 | 142 | /**
* Copyright 2019-2026, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <memory>
#include <vector>
#include "../filesystem.h" // TemporaryDirectory
#include "../helpers.h"
#include "xgboost/data.h"
namespace xgboost {
TEST(SparsePage, PushCSC) {
std::vector<bst_idx_t> offset{0};
std::vector<Entry... |
4e21e4a93dbfdac10f0fd70c0a1e8b4523ce48609ac9679f9654e868675a6092 | C++ | 4,399 | 106 | // Author: "Keitaro Yamashita, Garib N. Murshudov"
// MRC Laboratory of Molecular Biology
#include <nanobind/ndarray.h>
#include <nanobind/stl/vector.h>
#include <nanobind/stl/complex.h>
#include <gemmi/bessel.hpp>
#include <gemmi/math.hpp>
#include "math.hpp"
#include "array.h"
namespace nb = nanobind;
using namespac... |
8e0bc0538a2aa147a73268c30e5301026d248ad3a9d4fc8c00831ebe5af436da | C++ | 4,448 | 133 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/DataArray.hpp>
#include "hdf... |
d250beb7e2c04a5ab0e94f7e82b3c729d4fff87f42e951431935b3b2d98359bb | C++ | 4,452 | 156 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/Tag.hpp>
#include <nix/util/... |
089de0938ccaf5b519d81db0656f928dd7a0a4f139bfd6c9a20ba293b9d261dc | C++ | 4,460 | 161 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <iostream>
#include "Direct... |
d43fdc2f2ab8550d411182125e132e9baada038fe801a55e9119fdb2144b2f6d | C++ | 4,515 | 125 | /**
* Copyright 2016-2023 by XGBoost contributors
*/
#include <gtest/gtest.h>
#include <xgboost/context.h>
#include <xgboost/objective.h>
#include "../helpers.h"
#include "../objective_helpers.h"
TEST(Objective, UnknownFunction) {
xgboost::ObjFunction* obj = nullptr;
xgboost::Context tparam;
std::vector<std::... |
5c801f2ba8cdcb435c1bc4376393ee4582820505fe0ecdf6db7024aae72b42e6 | C++ | 4,517 | 150 | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// 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, i... |
2ef19c783008b8bf4070f29daf4958b3f1af9ee5ceb64441a512d6c1a53dcb13 | C++ | 4,587 | 134 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
f1391206107cd4f12ceb12acbb1a764fea9a0d04dccee08e3e839e2d57092032 | C++ | 4,593 | 238 | // tiff stream interface class implementation
#include "tiffstream.h"
const char* TiffStream::m_name = "TiffStream";
TiffStream::TiffStream()
{
m_tif = NULL;
m_inStream = NULL;
m_outStream = NULL;
m_ioStream = NULL;
m_streamLength = 0;
m_this = reinterpret_cast<thandle_t>(this);
};
TiffStream::~Tiff... |
507fa7aed7e09eef96e086a1c05ef3454d00e9b6670938bff24b11137f9b09b1 | C++ | 4,665 | 124 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
386637ac1dcb4a06fe8c02c56d1a76f06ced7258f463f9ad7d79b3c3c42f7ec8 | C++ | 4,748 | 141 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "EntityWithSourcesFS.hpp"
... |
9251b2fca34c59a6a9b2482c23638c2912c45298139e0252fa7bc7a82008f2b7 | C++ | 4,798 | 148 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
b4a2bc99c9484fc4bc296ff4cb347628abdc58836e04f2f3e82e6fa6190ec401 | C++ | 4,914 | 127 | // C wrapper implementations for frame-sequence C API
// -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
#include "frame-sequence-c.h"
#include "frame-sequence.h"
#include "led-matrix.h"
extern "C" {
FrameSequenceHandle frame_sequence_create(int width, int height) {
if (width <= 0 || height <= 0) ret... |
a8cd40644ce97189e7561496c9926a133c0fce251fdb1d0e7ee2e34d863c361c | C++ | 4,917 | 152 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "MultiTagFS.hpp"
#include ... |
c1ac5e3265e1f72f6973c3155f8c6f4a78ea07424e9872c5a122fff11f3039a1 | C++ | 4,927 | 161 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "MultiTagHDF5.hpp"
#include <nix/... |
d971f398c6780092faa96cc07779ebb33ecf373686d4e6c270d7c910e21898d9 | C++ | 4,961 | 243 | // Copyright (c) 2013 - 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "PropertyFS.hpp"
namespace... |
4718a0fd6a9f72d90a395aa36f73f125f5d77ef06088f145ee0f65b91076f339 | C++ | 5,024 | 210 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
a11f416f6658925a5567fe3b0713ad259fdf495f2341cad129f40dd3bf626901 | C++ | 5,031 | 152 | /**
* Copyright 2019-2026, XGBoost Contributors
*/
#include <dmlc/omp.h> // for omp_get_thread_num, omp_get_max_threads, omp_set_num_threads
#include <gtest/gtest.h>
#include <array> // for array
#include <atomic> // for atomic
#include <chrono> // for milliseconds
#include <cstddef> // for size_t
#... |
53e96b2c1776ffab027ba064b1f8208b1e21c66c8103060e9f9cc7b0bb69602d | C++ | 5,035 | 137 | #include "itkImage.h"
#include "itkImportImageFilter.h"
#include "itkImageRegistrationMethodv4.h"
#include "itkTranslationTransform.h"
#include "itkMattesMutualInformationImageToImageMetricv4.h"
#include"itkOnePlusOneEvolutionaryOptimizerv4.h"
#include"itkNormalVariateGenerator.h"
#include <iostream>
typedef double P... |
a47ed67613500b323faf9aa55cccca053d6ff0c632bc81dcaaf954424335542d | C++ | 5,048 | 166 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
477c6f44c6d82f93a5c3cc869f78c0e9290fd3b0b5a3bd9baab3971a784f3c7f | C++ | 5,084 | 137 | /**
* Copyright 2025-2026, XGBoost contributors
*/
#include "test_cat_container.h"
#include <gtest/gtest.h>
#include <cmath> // for std::isnan
#include <cstdint> // for uint16_t
#include <ios> // for openmode
#include <limits> // for numeric_limits
#include <memory> // for unique_ptr
#include <utility... |
b5506fb82722f5bf06daf7ef315d4ee662613d2851097006d62d94b84d15b3fa | C++ | 5,096 | 160 | // -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
//
// Example how to display an image, including animated images using
// ImageMagick. For a full utility that does a few more things, have a look
// at the led-image-viewer in ../utils
//
// Showing an image is not so complicated, essentially just copy al... |
04718b1a301f084d05b9ae4c3b2ed318e91ed13c4e034e9aaceb51e43094d393 | C++ | 5,261 | 125 | // Copyright © 2015 Adrian Stoewer <adrian.stoewer@rz.ifi.lmu.de>
// Jan Grewe <jan.grewe@g-node.org>
// German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the te... |
eba75f114620c51a7c5ad913324a4daa1366074b1fa9f94a640af97ec24568c8 | C++ | 5,337 | 176 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include <nix/MultiTag.hpp>
#include <nix/... |
3bff46ecb47deae0c1116cfb3a75ebf7f9f81f078d399d4f394433dd227a3fd9 | C++ | 5,450 | 184 | // -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
// Small example how to scroll text.
//
// This code is public domain
// (but note, that the led-matrix library this depends on is GPL v2)
// For a utility with a few more features see
// ../utils/text-scroller.cc
#include "led-matrix.h"
#include "graphi... |
e3014e8c69ca9b589b001ab927fe8ebacc7e57086c619c36675361c7d1a82329 | C++ | 5,505 | 177 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
c424a07d4dbb1ab25d49974f94aa2a73b75a66fb09ecb4d5c3b1e27c9800483f | C++ | 5,540 | 149 | // Copyright (c) 2013, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "TestNDArray.hpp"
#include "TestND... |
3a04e5c7ecb78e05d6c3c18a8965020cca94f8881b43c5ed9d1a8daee7d807bd | C++ | 5,603 | 174 | /**
* (C) Copyright 2020, 2021, 2022, 2023 IBM. All Rights Reserved.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications... |
08b6bc17b8725b59315fac646e52401731171358045afaedd9e55a65bdc63e5a | C++ | 5,664 | 179 | // -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
// Small example how write text.
//
// This code is public domain
// (but note, that the led-matrix library this depends on is GPL v2)
#include "led-matrix.h"
#include "graphics.h"
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.