Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`static_cast<time_type>` in `integrate_times`

オープン
#73 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
backend

調査の方向性

include/boost/numeric/odeint/integrate/detail/integrate_times.hpp から始め、特に 64、97、139 行付近の static_cast<time_type> の使用箇所を確認してください。TimeIterator がどのようにデリファレンスされるか、また Time と time_type がどのように定義されているかを読み、その後 Boost Units の時間型での動作を検証してください。完了条件は、報告されたコンパイラーエラーなしで integrate_times が互換性のある quantity 型を受け入れることです。

索引モデルが issue の本文から書いたものです。

説明

Hi,

it seems to me that there are a number of static_cast<time_type> in the integrate_times implementation, e.g.
https://github.com/boostorg/odeint/blob/8b4768ef4926051dbe4ffe13782d7540351ff019/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp#L64
https://github.com/boostorg/odeint/blob/8b4768ef4926051dbe4ffe13782d7540351ff019/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp#L97
https://github.com/boostorg/odeint/blob/8b4768ef4926051dbe4ffe13782d7540351ff019/include/boost/numeric/odeint/integrate/detail/integrate_times.hpp#L139
(and potentially more; L139 is where I encountered a compiler error) that don't fit the the target variables' types. Say, for instance, Time in these cases is a Boost Units quantity, then time_type, if I understand correctly, is a plain double (or other floating point format). If I further understand the TimeIterator type correctly, that type should return a Time instance on valid dereference.

Now the static_cast tries to cast a quantity to, say, double (which fails), which is then reassigned to a quantity (which should
also fail).

It seems to me that simply removing the static casts might fix the issue, although I have not spent much time looking into it.
For now I'll use another integrator but I'd be happy to help to solve this issue in the future - if my hypothesis is correct.

Best
Malte

主要言語
C++
スター
55
フォーク
59
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

boostorg/odeint のほかの issue

boostorg/odeint の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。