-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
187 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Version: 1.2.0 | ||
Date: 2024-01-09 00:49:39 UTC | ||
SHA: 1e9ab0f499b8b7417460b491bdf635dda84fcce8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,24 @@ | ||
# Platform | ||
|
||
|field |value | | ||
|:--------|:-------------------------------------------| | ||
|version |R version 4.3.2 (2023-10-31) | | ||
|os |macOS Ventura 13.6.3 | | ||
|system |aarch64, darwin20 | | ||
|ui |RStudio | | ||
|language |(EN) | | ||
|collate |en_US.UTF-8 | | ||
|ctype |en_US.UTF-8 | | ||
|tz |Asia/Seoul | | ||
|date |2023-12-18 | | ||
|rstudio |2023.06.0+421 Mountain Hydrangea (desktop) | | ||
|pandoc |3.1.11 @ /opt/homebrew/bin/ (via rmarkdown) | | ||
|field |value | | ||
|:--------|:------------------------------------------| | ||
|version |R version 4.3.2 (2023-10-31) | | ||
|os |macOS Sonoma 14.2.1 | | ||
|system |x86_64, darwin20 | | ||
|ui |RStudio | | ||
|language |(EN) | | ||
|collate |en_US.UTF-8 | | ||
|ctype |en_US.UTF-8 | | ||
|tz |Asia/Seoul | | ||
|date |2024-01-08 | | ||
|rstudio |2023.12.0+369 Ocean Storm (desktop) | | ||
|pandoc |3.1.11.1 @ /usr/local/bin/ (via rmarkdown) | | ||
|
||
# Dependencies | ||
|
||
|package |old |new |Δ | | ||
|:-----------|:-----|:--------|:--| | ||
|bvhar |1.0.2 |1.1.0 |* | | ||
|checkmate |NA |2.3.1 |* | | ||
|cli |NA |3.6.2 |* | | ||
|cpp11 |NA |0.4.7 |* | | ||
|fansi |NA |1.0.6 |* | | ||
|ggridges |NA |0.5.5 |* | | ||
|matrixStats |NA |1.2.0 |* | | ||
|scales |NA |1.3.0 |* | | ||
|stringi |NA |1.8.3 |* | | ||
|tensorA |NA |0.36.2.1 |* | | ||
|vctrs |NA |0.6.5 |* | | ||
|package |old |new |Δ | | ||
|:-------|:-----|:-----|:--| | ||
|bvhar |1.1.0 |1.2.0 |* | | ||
|
||
# Revdeps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "bvharinterrupt.h" | ||
|
||
std::atomic<bool> bvharinterrupt::_interrupted(false); | ||
|
||
bvharinterrupt::bvharinterrupt() { | ||
std::signal(SIGINT, bvharinterrupt::handle_signal); | ||
} | ||
|
||
bool bvharinterrupt::is_interrupted() { | ||
return _interrupted.load(); | ||
} | ||
|
||
void bvharinterrupt::handle_signal(int signal) { | ||
if (signal == SIGINT) { | ||
_interrupted.store(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef BVHARINTERRUPT_H | ||
#define BVHARINTERRUPT_H | ||
|
||
#include <csignal> | ||
#include <atomic> | ||
|
||
class bvharinterrupt { | ||
private: | ||
static std::atomic<bool> _interrupted; | ||
static void handle_signal(int signal); | ||
public: | ||
bvharinterrupt(); | ||
virtual ~bvharinterrupt() = default; | ||
static bool is_interrupted(); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "bvharprogress.h" | ||
|
||
bvharprogress::bvharprogress(int total, bool verbose) : _current(0), _total(total), _width(50), _verbose(verbose) {} | ||
|
||
void bvharprogress::increment() { | ||
_current++; | ||
} | ||
|
||
void bvharprogress::update() { | ||
if (!_verbose) { | ||
return; // not display when verbose is false | ||
} | ||
int percent = _current * 100 / _total; | ||
Rcpp::Rcout << "\r"; | ||
for (int i = 0; i < _width; i++) { | ||
if (i < (percent * _width / 100)) { | ||
Rcpp::Rcout << "#"; | ||
} else { | ||
Rcpp::Rcout << " "; | ||
} | ||
} | ||
Rcpp::Rcout << " " << percent << "%"; | ||
Rcpp::Rcout.flush(); | ||
if (_current >= _total) { | ||
Rcpp::Rcout << "\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef BVHARPROGRESS_H | ||
#define BVHARPROGRESS_H | ||
|
||
#include <Rcpp.h> | ||
#include <atomic> | ||
|
||
class bvharprogress { | ||
private: | ||
std::atomic<int> _current; | ||
int _total; | ||
int _width; | ||
bool _verbose; | ||
public: | ||
bvharprogress(int total, bool verbose); | ||
virtual ~bvharprogress() = default; | ||
void update(); | ||
void increment(); | ||
bool is_interrupted() const; | ||
void set_interrupt(bool flag); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.