http://dopal.cs.uec.ac.jp/okamotoy/lect/2022/ip/lect11.pdf