line

pyheatintegration.line.convert_to_excel_data(lines_: list[tuple[tuple[float, float], tuple[float, float]]]) tuple[list[float], list[float]]

直線のリストをx座標のリストとy座標のリストに変換します。

パラメータ

lines (list[Line]) -- 直線のリスト

戻り値

x座標のリストとy座標のリスト

戻り値の型

typle[list[float], list[float]]

サンプル

>>> convert_to_excel_data([((0, 0), (1, 2)), ((1, 2), (3, 3)), ((3, 3), (4, 5))])
([0, 1, 3, 4], [0, 2, 3, 5])
>>> convert_to_excel_data([((0, 0), (1, 2)), ((1, 0), (2, 2))])
([0, 1, 1, 2], [0, 2, 0, 2])
pyheatintegration.line.extract_x(lines: list[tuple[tuple[float, float], tuple[float, float]]]) list[float]

xy座標系における複数の直線から重複のないxの値を返します。

パラメータ

lines (list[Line]) -- 直線。

戻り値

x座標の値。

戻り値の型

list[float]

サンプル

>>> extract_x([((0, 0), (1, 1)), ((1, 1), (2, 2)), ((2, 2), (3, 5)), ((3, 3), (5, 8))])
[0, 1, 2, 3, 5]
pyheatintegration.line.y_range(lines: list[tuple[tuple[float, float], tuple[float, float]]]) tuple[float, float]

xy座標系における複数の直線からyの最小値と最大値を返します。

直線は広義単調増加であることを期待しています。

パラメータ

list[Line] (lines) -- 直線。

戻り値

最小値と最大値。

戻り値の型

tuple[float, float]

サンプル

>>> y_range([((0, 0), (1, 1)), ((1, 1), (2, 2)), ((2, 2), (3, 5)), ((3, 3), (5, 8))])
(0, 8)