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
!**************************************************** | |
! 逆行列の計算(余因子行列) | |
! | |
! DATE AUTHOR VERSION | |
! 2019.12.24 mk-mode.com 1.00 新規作成 | |
! | |
! Copyright(C) 2013 mk-mode.com All Rights Reserved. | |
!**************************************************** | |
! | |
module const |
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
#include "calc.hpp" | |
#include <cmath> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
namespace my_lib { |
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
/********************************************* | |
* 線形計画法(シンプレックス法) * | |
*********************************************/ | |
#include <iostream> // for cout | |
#include <stdio.h> // for printf() | |
#define N_ROW 4 // 行数 | |
#define N_COL 6 // 列数 | |
#define N_VAR 2 // 変数の数 |
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
require 'json' | |
require 'net/https' | |
# 各種定数 | |
URL_BASE = "https://graph.facebook.com/{ユーザID or ユーザ名}" | |
APP_ID = "{Facebook アプリの APP-ID}" | |
APP_SECRET = "{Facebook アプリの APP-SECRET}" | |
# [CLASS] Facebook API | |
class FbApi |
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
!************************************************************ | |
! LU 分解(クラウト法(Crout method)) | |
! | |
! date name version | |
! 2019.03.08 mk-mode.com 1.00 新規作成 | |
! | |
! Copyright(C) 2019 mk-mode.com All Rights Reserved. | |
!************************************************************ | |
! | |
module const |
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
#! /usr/local/bin/ruby | |
#********************************************* | |
# Ruby script to calculate a simple lenear regression line. | |
# : y = a + b * x | |
# : 連立方程式を ガウスの消去法で解く方法 | |
#********************************************* | |
# | |
class Array | |
def reg_line(y) | |
# 以下の場合は例外スロー |
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
#include "calc.hpp" | |
#include <cmath> | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
// 定数 | |
static constexpr double kAlpha = 0.01; // 学習率 | |
static constexpr double kEps = 1.0e-12; // 閾値 |
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
#include "calc.hpp" | |
#include <cmath> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
/** | |
* @brief 配列サイズ取得 |
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
/*********************************************************** | |
C++ 行列ライブラリ Eigen のテスト | |
* 様々な定義、宣言、計算方法を試行 | |
* ベクトルの変数は英小文字、行列の変数は英大文字としている | |
DATE AUTHOR VERSION | |
2022.10.20 mk-mode.com 1.00 新規作成 | |
Copyright(C) 2022 mk-mode.com All Rights Reserved. | |
***********************************************************/ |
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
#! /usr/local/bin/python3.6 | |
""" | |
Multiplication of big-digit values with Toom-Cook 3-way method | |
""" | |
import random | |
import sys | |
import traceback | |
class MultiplyToomCook3: |