Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

データ構造とロジック #2

Closed
kawasin73 opened this issue Jun 20, 2018 · 3 comments
Closed

データ構造とロジック #2

kawasin73 opened this issue Jun 20, 2018 · 3 comments
Assignees

Comments

@kawasin73
Copy link
Owner

kawasin73 commented Jun 20, 2018

データ構造と、操作のロジックをまとめる

@kawasin73 kawasin73 self-assigned this Jun 20, 2018
@kawasin73 kawasin73 changed the title データ構造 データ構造とロジック Jun 20, 2018
@kawasin73
Copy link
Owner Author

kawasin73 commented Jun 20, 2018

データ構造

ソートされた2次元配列で表す

空間インデックスもあるが、今回は、点の集まりを扱うため、機能が多いので採用しない

全てのサイズを保持する

@kawasin73
Copy link
Owner Author

インターフェイス

  • 追加 Add(x, y)
    • 1点を追加する
  • 削除 Remove(minx, maxx, miny, maxy)
    • 範囲を削除する
  • 全部のサイズ Total() -> int
    • 全サイズを返す
  • インデックスでの削除 RemoveIndex(i)
    • 先頭から i 番目のものを削除

@kawasin73
Copy link
Owner Author

kawasin73 commented Jun 22, 2018

PlotTable に実装した。
データ構造については、十分速いので、2次元配列のソートはしない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant