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
int a = 0 |
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
double simpsonIntegral(double a, double b, int n, const std::function<double (double)> &f) { | |
const double width = (b-a)/n; | |
double simpson_integral = 0; | |
for(int step = 0; step < n; step++) { | |
const double x1 = a + step*width; | |
const double x2 = a + (step+1)*width; | |
simpson_integral += (x2-x1)/6.0*(f(x1) + 4.0*f(0.5*(x1+x2)) + f(x2)); | |
} |
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
double trapezoidalIntegral(double a, double b, int n, const std::function<double (double)> &f) { | |
const double width = (b-a)/n; | |
double trapezoidal_integral = 0; | |
for(int step = 0; step < n; step++) { | |
const double x1 = a + step*width; | |
const double x2 = a + (step+1)*width; | |
trapezoidal_integral += 0.5*(x2-x1)*(f(x1) + f(x2)); | |
} |
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
[bmahr@localhost gradleNative]$ ./gradlew tasks | |
> Task :tasks | |
------------------------------------------------------------ | |
Tasks runnable from root project | |
------------------------------------------------------------ | |
Build tasks | |
----------- |
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
plugins { | |
id 'cpp-unit-test' | |
} | |
unitTest { | |
dependencies { | |
implementation project(':greeter') | |
} | |
baseName = "greeterTest" |
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
plugins { | |
id 'cpp-library' | |
} | |
library { | |
linkage = [Linkage.SHARED] | |
targetMachines = [ | |
machines.windows.x86_64, | |
machines.macOS.x86_64, |
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
plugins { | |
id 'cpp-application' | |
} | |
application { | |
dependencies { | |
implementation project(':greeter') | |
} | |
targetMachines = [ |
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
. | |
├── app | |
│ ├── build.gradle | |
│ └── src | |
│ └── main | |
│ └── cpp | |
│ └── main.cpp | |
├── build.gradle | |
├── gradle | |
│ └── wrapper |
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
pipeline { | |
agent any | |
options { | |
buildDiscarder(logRotator(numToKeepStr: '10')) | |
} | |
parameters { | |
booleanParam name: 'RUN_TESTS', defaultValue: true, description: 'Run Tests?' | |
booleanParam name: 'RUN_ANALYSIS', defaultValue: true, description: 'Run Static Code Analysis?' |
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
cmake_minimum_required(VERSION 2.8.11) | |
project(VtkFboInQtQuick) | |
set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
set(CMAKE_AUTOMOC ON) | |
find_package(VTK REQUIRED) | |
include(${VTK_USE_FILE}) |