-
Notifications
You must be signed in to change notification settings - Fork 0
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
12 changed files
with
470 additions
and
48 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 |
---|---|---|
@@ -1,12 +1,9 @@ | ||
# Put custom tests in this file. | ||
|
||
# Uncommenting the following line of code will disable | ||
# auto-detection of new variables and thus prevent swirl from | ||
# executing every command twice, which can slow things down. | ||
|
||
# AUTO_DETECT_NEWVAR <- FALSE | ||
|
||
# However, this means that you should detect user-created | ||
# variables when appropriate. The answer test, creates_new_var() | ||
# can be used for for the purpose, but it also re-evaluates the | ||
# expression which the user entered, so care must be taken. | ||
# Uncommenting the following line of code will disable | ||
# auto-detection of new variables and thus prevent swirl from | ||
# executing every command twice, which can slow things down. | ||
# AUTO_DETECT_NEWVAR <- FALSE | ||
# However, this means that you should detect user-created | ||
# variables when appropriate. The answer test, creates_new_var() | ||
# can be used for for the purpose, but it also re-evaluates the | ||
# expression which the user entered, so care must be taken. |
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,2 @@ | ||
ggplot2 | ||
microbenchmark |
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,13 +1,15 @@ | ||
# Code placed in this file fill be executed every time the | ||
# lesson is started. Any variables created here will show up in | ||
# the user's working directory and thus be accessible to them | ||
# throughout the lesson. | ||
# lesson is started. Any variables created here will show up in | ||
# the user's working directory and thus be accessible to them | ||
# throughout the lesson. | ||
|
||
.get_course_path <- function(){ | ||
.get_course_path <- function() { | ||
tryCatch(swirl:::swirl_courses_dir(), | ||
error = function(c) {file.path(find.package("swirl"),"Courses")} | ||
error = function(c) { | ||
file.path(find.package("swirl"), "Courses") | ||
} | ||
) | ||
} | ||
|
||
|
||
add_f_txt <- readLines(file.path(.get_course_path(), "AquaFortR_Swirl", "First_Lesson", "add_f.f90")) | ||
add_f_txt <- readLines(file.path(.get_course_path(), "AquaFortR_Swirl", "First_Lesson", "add_f.f90")) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
First_Lesson | ||
Second_Lesson |
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,9 @@ | ||
# Put custom tests in this file. | ||
# Uncommenting the following line of code will disable | ||
# auto-detection of new variables and thus prevent swirl from | ||
# executing every command twice, which can slow things down. | ||
# AUTO_DETECT_NEWVAR <- FALSE | ||
# However, this means that you should detect user-created | ||
# variables when appropriate. The answer test, creates_new_var() | ||
# can be used for for the purpose, but it also re-evaluates the | ||
# expression which the user entered, so care must be taken. |
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 @@ | ||
ggplot2 | ||
microbenchmark | ||
dotCall64 |
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,34 @@ | ||
# Code placed in this file fill be executed every time the | ||
# lesson is started. Any variables created here will show up in | ||
# the user's working directory and thus be accessible to them | ||
# throughout the lesson. | ||
|
||
.get_course_path <- function() { | ||
tryCatch(swirl:::swirl_courses_dir(), | ||
error = function(c) { | ||
file.path(find.package("swirl"), "Courses") | ||
} | ||
) | ||
} | ||
|
||
xcorr2D_f_txt <- readLines(file.path(.get_course_path(), "AquaFortR_Swirl", "Second_Lesson", "xcorr2D.f90")) | ||
|
||
source(file.path(.get_course_path(), "AquaFortR_Swirl", "Second_Lesson", "xcorr2D_r.R")) | ||
|
||
xcorr2D_f0<- function(a, b){ | ||
m <- nrow(a) | ||
n <- ncol(a) | ||
p <- nrow(b) | ||
q <- ncol(b) | ||
|
||
k <- m + p - 1 | ||
l <- n + q - 1 | ||
|
||
string_vector<-c(rep("integer", 6), rep("double" , 3)) | ||
|
||
cc_F <- cc_F<-matrix(0, k,l) | ||
result <- .C64("xcorr2d_f", | ||
SIGNATURE = string_vector, | ||
m, n, p, q, k, l, a, b, | ||
cc_F)$cc_F | ||
return(result)} |
Oops, something went wrong.