Skip to content

Instantly share code, notes, and snippets.

mk-mode komasaru

Block or report user

Report or block komasaru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@komasaru
komasaru / calc.cpp
Created May 25, 2020
C++ source code to calculate a simple regression curve(sqrt)
View calc.cpp
#include "calc.hpp"
#include <cmath>
#include <iostream>
#include <sstream>
#include <vector>
/**
* @brief 単回帰曲線(ルート回帰)の計算
*
@komasaru
komasaru / calc.cpp
Last active May 21, 2020
C++ source code to calculate a simple regression curve(4d).
View calc.cpp
#include "calc.hpp"
#include <iostream>
#include <sstream>
#include <vector>
/**
* @brief 単回帰曲線(4次)の計算
*
* @param[ref] a (double)
@komasaru
komasaru / calc.cpp
Last active May 21, 2020
C++ source code to calculate a simple regression curve(3d).
View calc.cpp
#include "calc.hpp"
#include <iostream>
#include <sstream>
#include <vector>
/**
* @brief 単回帰曲線(3次)の計算
*
* @param[ref] a (double)
@komasaru
komasaru / calc.cpp
Last active May 21, 2020
C++ source code to calculate a simple regression curve(2d).
View calc.cpp
#include "calc.hpp"
#include <iostream>
#include <sstream>
#include <vector>
/**
* @brief 単回帰曲線(2次)の計算
*
* @param[ref] a (double)
@komasaru
komasaru / calc.cpp
Last active May 19, 2020
C++ source code to calculate a simple linear regression line.
View calc.cpp
#include "calc.hpp"
#include <iostream>
#include <sstream>
#include <vector>
/**
* @brief 単回帰直線の計算
*
* @param[ref] 切片 a (double)
@komasaru
komasaru / csv.cpp
Created Mar 7, 2020
C++ source code to read csv data(v2).
View csv.cpp
#include "csv.hpp"
#include <iostream>
#include <string>
#include <vector>
// getline: 1行取得し、必要に応じて伸張
int Csv::getline(std::string& str) {
char c;
@komasaru
komasaru / inverse_matrix.f95
Created Feb 5, 2020
Fortran 95 source code to calculate an inverse matrix by cofactor matrix.
View inverse_matrix.f95
!****************************************************
! 逆行列の計算(余因子行列)
!
! DATE AUTHOR VERSION
! 2019.12.24 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2013 mk-mode.com All Rights Reserved.
!****************************************************
!
module const
@komasaru
komasaru / determinant.f95
Created Feb 5, 2020
Fortran 95 source code to calculate a determinant by cofactor expansion.
View determinant.f95
!****************************************************
! 行列式の計算(余因子展開)
!
! DATE AUTHOR VERSION
! 2019.12.23 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2013 mk-mode.com All Rights Reserved.
!****************************************************
!
module const
@komasaru
komasaru / test_inverse_matrix.rb
Created Feb 4, 2020
Ruby script to calculate an inverse matrix by cofactor matrix.
View test_inverse_matrix.rb
#! /usr/local/bin/ruby
#***************************************************************
# Ruby script to calculate an inverse matrix by cofactor matrix.
#***************************************************************
#
class TestInverseMatrix
#MTX = [
# [2]
#]
#MTX = [
@komasaru
komasaru / test_determinant.rb
Created Feb 4, 2020
Ruby script to calculate a determinant by cofactor expansion.
View test_determinant.rb
#! /usr/local/bin/ruby
#**************************************************************
# Ruby script to calculate a determinant by cofactor expansion.
#**************************************************************
#
class TestDeterminant
#MTX = [
# [1]
#]
#MTX = [
You can’t perform that action at this time.