check: run pre-commit on all files
This commit is contained in:
1 parent
7b8d97646c
commit
4c127797da
29 files changed
+92
-92
No files matched your search
@@ -36,7 +36,7 @@
|
||||
|
||||
using namespace units::aliases::isq;
|
||||
|
||||
// Some basic specs for the warship
|
||||
// Some basic specs for the warship
|
||||
struct Ship {
|
||||
si::fps::length::ft<> length;
|
||||
si::fps::length::ft<> draft;
|
||||
@@ -45,7 +45,7 @@ struct Ship {
|
||||
si::fps::speed::ft_per_s<> speed;
|
||||
si::fps::mass::lb<> mass;
|
||||
|
||||
si::fps::length::in<> mainGuns;
|
||||
si::fps::length::in<> mainGuns;
|
||||
si::fps::mass::lb<> shellMass;
|
||||
si::fps::speed::ft_per_s<> shellSpeed;
|
||||
si::fps::power::ft_pdl_per_s<> power;
|
||||
@@ -80,7 +80,7 @@ int main()
|
||||
using namespace units::aliases::isq::si;
|
||||
using namespace units::aliases::isq::si::fps;
|
||||
using units::aliases::isq::si::fps::length::ft; // to disambiguate from si::femptotonne
|
||||
|
||||
|
||||
// KMS Bismark, using the units the Germans would use, taken from Wiki
|
||||
auto bismark = Ship{.length{m<>(251.)}, .draft{m<>(9.3)}, .beam{m<>(36)}, .speed{km_per_h<>(56)}, .mass{t<>(50'300)}, .mainGuns{mm<>(380)}, .shellMass{kg<>(800)}, .shellSpeed{m_per_s<>(820.)}, .power{kW<>(110.45)}};
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ void matrix_of_quantity_add()
|
||||
void matrix_of_quantity_multiply_same()
|
||||
{
|
||||
std::cout << "\nmatrix_of_quantity_multiply_same:\n";
|
||||
|
||||
|
||||
matrix<length::m<>> v = {{ m<>(1), m<>(2), m<>(3) }, { m<>(4), m<>(5), m<>(6) }, { m<>(7), m<>(8), m<>(9) }};
|
||||
vector<length::m<>> u = { m<>(3), m<>(2), m<>(1) };
|
||||
|
||||
@@ -304,7 +304,7 @@ void quantity_of_matrix_add()
|
||||
void quantity_of_matrix_multiply_same()
|
||||
{
|
||||
std::cout << "\nquantity_of_matrix_multiply_same:\n";
|
||||
|
||||
|
||||
length_m<> v(matrix<>{{ 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }});
|
||||
length_v<> u(vector<>{ 3, 2, 1 });
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ int main()
|
||||
|
||||
const auto process_noise_variance = 0.0001 * (deg_C * deg_C);
|
||||
const estimation initial = { state{ quantity_point(10. * deg_C) }, pow<2>(100. * deg_C) };
|
||||
const std::array measurements = {
|
||||
const std::array measurements = {
|
||||
quantity_point(49.95 * deg_C),
|
||||
quantity_point(49.967 * deg_C),
|
||||
quantity_point(50.1 * deg_C),
|
||||
|
||||
@@ -73,7 +73,7 @@ int main()
|
||||
|
||||
const auto process_noise_variance = 0.0001 * (deg_C * deg_C);
|
||||
const estimation initial = { state{ quantity_point(10. * deg_C) }, pow<2>(100. * deg_C) };
|
||||
const std::array measurements = {
|
||||
const std::array measurements = {
|
||||
quantity_point(50.45 * deg_C),
|
||||
quantity_point(50.967 * deg_C),
|
||||
quantity_point(51.6 * deg_C),
|
||||
|
||||
@@ -73,7 +73,7 @@ int main()
|
||||
|
||||
const auto process_noise_variance = 0.15 * (deg_C * deg_C);
|
||||
const estimation initial = { state{ quantity_point(10. * deg_C) }, pow<2>(100. * deg_C) };
|
||||
const std::array measurements = {
|
||||
const std::array measurements = {
|
||||
quantity_point(50.45 * deg_C),
|
||||
quantity_point(50.967 * deg_C),
|
||||
quantity_point(51.6 * deg_C),
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
using namespace units::isq;
|
||||
|
||||
|
||||
// Some basic specs for the warship
|
||||
// Some basic specs for the warship
|
||||
struct Ship {
|
||||
si::fps::length<si::fps::foot> length;
|
||||
si::fps::length<si::fps::foot> draft;
|
||||
@@ -46,7 +46,7 @@ struct Ship {
|
||||
si::fps::speed<si::fps::foot_per_second> speed;
|
||||
si::fps::mass<si::fps::pound> mass;
|
||||
|
||||
si::fps::length<si::fps::inch> mainGuns;
|
||||
si::fps::length<si::fps::inch> mainGuns;
|
||||
si::fps::mass<si::fps::pound> shellMass;
|
||||
si::fps::speed<si::fps::foot_per_second> shellSpeed;
|
||||
si::fps::power<si::fps::foot_poundal_per_second> power;
|
||||
@@ -81,7 +81,7 @@ int main()
|
||||
{
|
||||
using namespace units::isq::si::literals;
|
||||
using namespace units::isq::si::fps::literals;
|
||||
|
||||
|
||||
// KMS Bismark, using the units the Germans would use, taken from Wiki
|
||||
auto bismark = Ship{.length{251._q_m}, .draft{9.3_q_m}, .beam{36_q_m}, .speed{56_q_km_per_h}, .mass{50'300_q_t}, .mainGuns{380_q_mm}, .shellMass{800_q_kg}, .shellSpeed{820._q_m_per_s}, .power{110.45_q_kW}};
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ void matrix_of_quantity_add()
|
||||
void matrix_of_quantity_multiply_same()
|
||||
{
|
||||
std::cout << "\nmatrix_of_quantity_multiply_same:\n";
|
||||
|
||||
|
||||
matrix<si::length<si::metre>> v = {{ 1_q_m, 2_q_m, 3_q_m }, { 4_q_m, 5_q_m, 6_q_m }, { 7_q_m, 8_q_m, 9_q_m }};
|
||||
vector<si::length<si::metre>> u = { 3_q_m, 2_q_m, 1_q_m };
|
||||
|
||||
@@ -303,7 +303,7 @@ void quantity_of_matrix_add()
|
||||
void quantity_of_matrix_multiply_same()
|
||||
{
|
||||
std::cout << "\nquantity_of_matrix_multiply_same:\n";
|
||||
|
||||
|
||||
length_m<> v(matrix<>{{ 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }});
|
||||
length_v<> u(vector<>{ 3, 2, 1 });
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
using namespace units::isq;
|
||||
|
||||
|
||||
// Some basic specs for the warship
|
||||
// Some basic specs for the warship
|
||||
struct Ship {
|
||||
si::fps::length<si::fps::foot> length;
|
||||
si::fps::length<si::fps::foot> draft;
|
||||
@@ -49,7 +49,7 @@ struct Ship {
|
||||
si::fps::speed<si::fps::foot_per_second> speed;
|
||||
si::fps::mass<si::fps::pound> mass;
|
||||
|
||||
si::fps::length<si::fps::inch> mainGuns;
|
||||
si::fps::length<si::fps::inch> mainGuns;
|
||||
si::fps::mass<si::fps::pound> shellMass;
|
||||
si::fps::speed<si::fps::foot_per_second> shellSpeed;
|
||||
si::fps::power<si::fps::foot_poundal_per_second> power;
|
||||
@@ -85,7 +85,7 @@ int main()
|
||||
using namespace units::isq::si::references;
|
||||
using namespace units::isq::si::fps::references;
|
||||
using units::isq::si::fps::references::ft; // collides with si::femtotonne (alias unit of mass)
|
||||
|
||||
|
||||
// KMS Bismark, using the units the Germans would use, taken from Wiki
|
||||
auto bismark = Ship{.length{251. * m}, .draft{9.3 * m}, .beam{36 * m}, .speed{56 * (km / h)}, .mass{50'300 * t}, .mainGuns{380 * mm}, .shellMass{800 * kg}, .shellSpeed{820. * (m / s)}, .power{110.45 * kW}};
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ void matrix_of_quantity_add()
|
||||
void matrix_of_quantity_multiply_same()
|
||||
{
|
||||
std::cout << "\nmatrix_of_quantity_multiply_same:\n";
|
||||
|
||||
|
||||
matrix<si::length<si::metre>> v = {{ 1 * m, 2 * m, 3 * m }, { 4 * m, 5 * m, 6 * m }, { 7 * m, 8 * m, 9 * m }};
|
||||
vector<si::length<si::metre>> u = { 3 * m, 2 * m, 1 * m };
|
||||
|
||||
@@ -303,7 +303,7 @@ void quantity_of_matrix_add()
|
||||
void quantity_of_matrix_multiply_same()
|
||||
{
|
||||
std::cout << "\nquantity_of_matrix_multiply_same:\n";
|
||||
|
||||
|
||||
length_m<> v(matrix<>{{ 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }});
|
||||
length_v<> u(vector<>{ 3, 2, 1 });
|
||||
|
||||
|
||||
Reference in new issue
Block a user