Enviar pesquisa
Carregar
Brief introduction of Boost.ICL
•
Transferir como PPTX, PDF
•
0 gostou
•
695 visualizações
Y
yak1ex
Seguir
Not presented anywhere.
Leia menos
Leia mais
Tecnologia
Educação
Vista de apresentação de diapositivos
Denunciar
Compartilhar
Vista de apresentação de diapositivos
Denunciar
Compartilhar
1 de 15
Baixar agora
Recomendados
ぱっと見でわかるC++11
ぱっと見でわかるC++11
えぴ 福田
C++0x in programming competition
C++0x in programming competition
yak1ex
20180728 halide-study
20180728 halide-study
Fixstars Corporation
Map
Map
kikairoya
Cython intro prelerease
Cython intro prelerease
Shiqiao Du
Emcjp item21
Emcjp item21
MITSUNARI Shigeo
Cloud TPU Driver API ソースコード解析
Cloud TPU Driver API ソースコード解析
Mr. Vengineer
C++14 Overview
C++14 Overview
Akira Takahashi
Recomendados
ぱっと見でわかるC++11
ぱっと見でわかるC++11
えぴ 福田
C++0x in programming competition
C++0x in programming competition
yak1ex
20180728 halide-study
20180728 halide-study
Fixstars Corporation
Map
Map
kikairoya
Cython intro prelerease
Cython intro prelerease
Shiqiao Du
Emcjp item21
Emcjp item21
MITSUNARI Shigeo
Cloud TPU Driver API ソースコード解析
Cloud TPU Driver API ソースコード解析
Mr. Vengineer
C++14 Overview
C++14 Overview
Akira Takahashi
Emcpp item31
Emcpp item31
mitsutaka_takeda
C++ ポインタ ブートキャンプ
C++ ポインタ ブートキャンプ
Kohsuke Yuasa
Emcjp item33,34
Emcjp item33,34
MITSUNARI Shigeo
Effective Modern C++ 読書会 Item 35
Effective Modern C++ 読書会 Item 35
Keisuke Fukuda
組み込みでこそC++を使う10の理由
組み込みでこそC++を使う10の理由
kikairoya
Wrapping a C++ library with Cython
Wrapping a C++ library with Cython
fuzzysphere
Boost.Coroutine
Boost.Coroutine
melpon
Cython ことはじめ
Cython ことはじめ
gion_XY
20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン
yohhoy
Fork/Join Framework。そしてLambdaへ。
Fork/Join Framework。そしてLambdaへ。
Yuichi Sakuraba
BoostAsioで可読性を求めるのは間違っているだろうか
BoostAsioで可読性を求めるのは間違っているだろうか
Yuki Miyatake
boost tour 1.48.0 all
boost tour 1.48.0 all
Akira Takahashi
C++でHello worldを書いてみた
C++でHello worldを書いてみた
firewood
Continuation with Boost.Context
Continuation with Boost.Context
Akira Takahashi
競技プログラミングにおけるコードの書き方とその利便性
競技プログラミングにおけるコードの書き方とその利便性
Hibiki Yamashiro
NumPyが物足りない人へのCython入門
NumPyが物足りない人へのCython入門
Shiqiao Du
llvm入門
llvm入門
MITSUNARI Shigeo
新しい並列for構文のご提案
新しい並列for構文のご提案
yohhoy
C++11概要 ライブラリ編
C++11概要 ライブラリ編
egtra
コルーチンの使い方
コルーチンの使い方
Naohiro Yoshikawa
C++0x in programming competition
C++0x in programming competition
yak1ex
競技プログラミングのためのC++入門
競技プログラミングのためのC++入門
natrium11321
Mais conteúdo relacionado
Mais procurados
Emcpp item31
Emcpp item31
mitsutaka_takeda
C++ ポインタ ブートキャンプ
C++ ポインタ ブートキャンプ
Kohsuke Yuasa
Emcjp item33,34
Emcjp item33,34
MITSUNARI Shigeo
Effective Modern C++ 読書会 Item 35
Effective Modern C++ 読書会 Item 35
Keisuke Fukuda
組み込みでこそC++を使う10の理由
組み込みでこそC++を使う10の理由
kikairoya
Wrapping a C++ library with Cython
Wrapping a C++ library with Cython
fuzzysphere
Boost.Coroutine
Boost.Coroutine
melpon
Cython ことはじめ
Cython ことはじめ
gion_XY
20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン
yohhoy
Fork/Join Framework。そしてLambdaへ。
Fork/Join Framework。そしてLambdaへ。
Yuichi Sakuraba
BoostAsioで可読性を求めるのは間違っているだろうか
BoostAsioで可読性を求めるのは間違っているだろうか
Yuki Miyatake
boost tour 1.48.0 all
boost tour 1.48.0 all
Akira Takahashi
C++でHello worldを書いてみた
C++でHello worldを書いてみた
firewood
Continuation with Boost.Context
Continuation with Boost.Context
Akira Takahashi
競技プログラミングにおけるコードの書き方とその利便性
競技プログラミングにおけるコードの書き方とその利便性
Hibiki Yamashiro
NumPyが物足りない人へのCython入門
NumPyが物足りない人へのCython入門
Shiqiao Du
llvm入門
llvm入門
MITSUNARI Shigeo
新しい並列for構文のご提案
新しい並列for構文のご提案
yohhoy
C++11概要 ライブラリ編
C++11概要 ライブラリ編
egtra
コルーチンの使い方
コルーチンの使い方
Naohiro Yoshikawa
Mais procurados
(20)
Emcpp item31
Emcpp item31
C++ ポインタ ブートキャンプ
C++ ポインタ ブートキャンプ
Emcjp item33,34
Emcjp item33,34
Effective Modern C++ 読書会 Item 35
Effective Modern C++ 読書会 Item 35
組み込みでこそC++を使う10の理由
組み込みでこそC++を使う10の理由
Wrapping a C++ library with Cython
Wrapping a C++ library with Cython
Boost.Coroutine
Boost.Coroutine
Cython ことはじめ
Cython ことはじめ
20分くらいでわかった気分になれるC++20コルーチン
20分くらいでわかった気分になれるC++20コルーチン
Fork/Join Framework。そしてLambdaへ。
Fork/Join Framework。そしてLambdaへ。
BoostAsioで可読性を求めるのは間違っているだろうか
BoostAsioで可読性を求めるのは間違っているだろうか
boost tour 1.48.0 all
boost tour 1.48.0 all
C++でHello worldを書いてみた
C++でHello worldを書いてみた
Continuation with Boost.Context
Continuation with Boost.Context
競技プログラミングにおけるコードの書き方とその利便性
競技プログラミングにおけるコードの書き方とその利便性
NumPyが物足りない人へのCython入門
NumPyが物足りない人へのCython入門
llvm入門
llvm入門
新しい並列for構文のご提案
新しい並列for構文のご提案
C++11概要 ライブラリ編
C++11概要 ライブラリ編
コルーチンの使い方
コルーチンの使い方
Semelhante a Brief introduction of Boost.ICL
C++0x in programming competition
C++0x in programming competition
yak1ex
競技プログラミングのためのC++入門
競技プログラミングのためのC++入門
natrium11321
CLR/H No.35-2
CLR/H No.35-2
Nobuhisa Koizumi
.NET Core 2.x 時代の C#
.NET Core 2.x 時代の C#
信之 岩永
Impractical Introduction of Boost Spirit Qi [PPT]
Impractical Introduction of Boost Spirit Qi [PPT]
yak1ex
2008.10.18 L4u Tech Talk
2008.10.18 L4u Tech Talk
mitamex4u
Pfi Seminar 2010 1 7
Pfi Seminar 2010 1 7
Preferred Networks
Python physicalcomputing
Python physicalcomputing
Noboru Irieda
C++コンパイラ GCCとClangからのメッセージをお読みください
C++コンパイラ GCCとClangからのメッセージをお読みください
digitalghost
C++ lecture-1
C++ lecture-1
sunaemon
PL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database Analytics
Kohei KaiGai
Replace Output Iterator and Extend Range JP
Replace Output Iterator and Extend Range JP
Akira Takahashi
初めてのSTL
初めてのSTL
HCPC: 北海道大学競技プログラミングサークル
VerilatorとSystemC
VerilatorとSystemC
Mr. Vengineer
Slide
Slide
Takefumi MIYOSHI
最新C++事情 C++14-C++20 (2018年10月)
最新C++事情 C++14-C++20 (2018年10月)
Akihiko Matuura
C++ tips 3 カンマ演算子編
C++ tips 3 カンマ演算子編
道化師 堂華
Polyphony の行く末(2018/3/3)
Polyphony の行く末(2018/3/3)
ryos36
入出力
入出力
rippro
Python standard 2022 Spring
Python standard 2022 Spring
anyakichi
Semelhante a Brief introduction of Boost.ICL
(20)
C++0x in programming competition
C++0x in programming competition
競技プログラミングのためのC++入門
競技プログラミングのためのC++入門
CLR/H No.35-2
CLR/H No.35-2
.NET Core 2.x 時代の C#
.NET Core 2.x 時代の C#
Impractical Introduction of Boost Spirit Qi [PPT]
Impractical Introduction of Boost Spirit Qi [PPT]
2008.10.18 L4u Tech Talk
2008.10.18 L4u Tech Talk
Pfi Seminar 2010 1 7
Pfi Seminar 2010 1 7
Python physicalcomputing
Python physicalcomputing
C++コンパイラ GCCとClangからのメッセージをお読みください
C++コンパイラ GCCとClangからのメッセージをお読みください
C++ lecture-1
C++ lecture-1
PL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database Analytics
Replace Output Iterator and Extend Range JP
Replace Output Iterator and Extend Range JP
初めてのSTL
初めてのSTL
VerilatorとSystemC
VerilatorとSystemC
Slide
Slide
最新C++事情 C++14-C++20 (2018年10月)
最新C++事情 C++14-C++20 (2018年10月)
C++ tips 3 カンマ演算子編
C++ tips 3 カンマ演算子編
Polyphony の行く末(2018/3/3)
Polyphony の行く末(2018/3/3)
入出力
入出力
Python standard 2022 Spring
Python standard 2022 Spring
Mais de yak1ex
Introduction to programming competition [revised][PDF]
Introduction to programming competition [revised][PDF]
yak1ex
Introduction to programming competition [revised]
Introduction to programming competition [revised]
yak1ex
Introduction to programming competition
Introduction to programming competition
yak1ex
Brief introduction of Boost.ICL [PDF]
Brief introduction of Boost.ICL [PDF]
yak1ex
Brief introduction of Boost.ICL
Brief introduction of Boost.ICL
yak1ex
GC in C++0x [eng]
GC in C++0x [eng]
yak1ex
GC in C++0x
GC in C++0x
yak1ex
Mais de yak1ex
(7)
Introduction to programming competition [revised][PDF]
Introduction to programming competition [revised][PDF]
Introduction to programming competition [revised]
Introduction to programming competition [revised]
Introduction to programming competition
Introduction to programming competition
Brief introduction of Boost.ICL [PDF]
Brief introduction of Boost.ICL [PDF]
Brief introduction of Boost.ICL
Brief introduction of Boost.ICL
GC in C++0x [eng]
GC in C++0x [eng]
GC in C++0x
GC in C++0x
Último
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
Toru Tamaki
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
Toru Tamaki
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
Toru Tamaki
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
taisei2219
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Hiroki Ichikura
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Yuma Ohgami
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
iPride Co., Ltd.
Último
(9)
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
Brief introduction of Boost.ICL
1.
ICL(Interval Container
Library) 2011/2/26 Boost 勉強会 #4 未発表 @yak_ex / 新 康孝 紹介 詳解
2.
自己紹介 氏名: 新
康孝 (あたらし やすたか) Twitter ID: yak_ex Web: http://yak3.myhome.cx:8080/junks C++ / Perl が主戦場 現在、仕事でコードに触れていないので競技プログラミング(TopCoder、Codeforces)で潤い補充 闇の軍団に憧れるただの C++ 好き 今回は ICL のさわりだけ、というかさわりしか分からない
3.
ぼくのかんがえた「ぶーすと」のぶんるい アプリより 大規模
小規模 実装より
4.
ぼくのかんがえた「ぶーすと」のぶんるい ~1.25 アプリより
test graph progress_display たんはココ thread 大規模 小規模 regex crc pool tokenizer random lexical_cast function array rational type_traits timer iterators operators any tuple 実装より
5.
ぼくのかんがえた「ぶーすと」のぶんるい ~1.30 アプリより
異次元 preprocessor test spirit date_time graph filesystem progress_display たんはココ thread 大規模 小規模 format regex crc pool tokenizer random lexical_cast function array lambda rational type_traits timer iterators multi_array mpl any optional tuple 実装より
6.
ぼくのかんがえた「ぶーすと」のぶんるい ~1.35 アプリより
異次元 preprocessor asio test gil wave spirit date_time graph filesystem progress_display たんはココ statechart thread serialization 大規模 小規模 format program_options interprocess regex crc pool xpressive tokenizer random lexical_cast bimap function multi_index intrusive parameter array lambda range ptr_container fusion variant rational type_traits timer iterators foreach multi_array mpl typeof any optional tuple 実装より
7.
ぼくのかんがえた「ぶーすと」のぶんるい ~1.40 アプリより
異次元 preprocessor asio test gil accmulators wave spirit date_time graph filesystem progress_display たんはココ statechart thread serialization 大規模 小規模 format program_options interprocess proto regex crc pool xpressive tokenizer random lexical_cast scope_exit bimap function unordered multi_index intrusive parameter array lambda flyweight range ptr_container fusion variant rational type_traits timer iterators foreach multi_array mpl typeof any optional tuple 実装より
8.
ぼくのかんがえた「ぶーすと」のぶんるい ~1.45 アプリより
異次元 preprocessor asio test gil accmulators wave spirit date_time graph property_tree filesystem polygon progress_display たんはココ msm statechart thread serialization 大規模 小規模 uuid format program_options interprocess proto regex crc pool xpressive tokenizer random lexical_cast scope_exit bimap function unordered multi_index intrusive parameter array lambda flyweight range ptr_container fusion variant rational type_traits timer iterators foreach multi_array mpl typeof any optional tuple 実装より
9.
ぼくのかんがえた「ぶーすと」のぶんるい ~1.46 アプリより
異次元 preprocessor asio test gil accmulators wave spirit date_time graph property_tree filesystem polygon ICL progress_display たんはココ msm statechart thread serialization 大規模 小規模 uuid format program_options interprocess proto regex crc pool xpressive tokenizer random lexical_cast scope_exit bimap function unordered multi_index intrusive parameter array lambda flyweight range ptr_container fusion variant rational type_traits timer iterators foreach multi_array mpl typeof any optional tuple 実装より
10.
ここで競技コーディングのお時間です akira さん(仮名)はパーティーを開くことになりました。N
人のお客さんが参加する予定ですが参加時間帯[si, ti)が皆ばらばらです。場所の予約のために参加人数の最も多い時間帯を知りたいのでプログラムを作って akira さんを助けてあげましょう。 1 ≦ N ≦ 1000 -109 ≦ si < ti ≦ 109,si,ti は整数 (i=1,2,…,N) 参加人数が同じ時間帯が隣接している場合、参加者が異なっていても一つの時間帯と見なす 同一参加人数の時間帯が複数ある場合は最長の時間帯を、同じ長さの時間帯が複数ある場合は開始時刻がもっとも早い時間帯を返す 入力: N<改行>s1<空白>t1<改行>…sN<空白>tN<改行> 出力:開始時刻<空白>終了時刻<空白>人数<改行>
11.
解答例全文 using ICL
#include <iostream> #include <algorithm> #include <utility> #include <boost/icl/interval_map.hpp> int main(void) { boost::icl::interval_map<int, int> sum; int n; std::cin >> n; for(int i = 0; i < n; ++i) { int s, t; std::cin >> s >> t; sum += std::make_pair(boost::icl::interval<int>::right_open(s, t), 1); } typedef boost::icl::interval_map<int, int>::value_type value_type; auto it = max_element(sum.begin(), sum.end(), [](const value_type &v1, const value_type &v2) { return v1.second < v2.second || (v1.second == v2.second && v1.first.upper() - v1.first.lower() < v2.first.upper() - v2.first.lower()) || (v1.second == v2.second && v1.first.upper() - v1.first.lower() == v2.first.upper() - v2.first.lower() && v1.first.lower() < v2.first.lower()); }); std::cout << it->first.lower() << ' ' << it->first.upper() << ' ' << it->second << std::endl; return 0; } #include 含めて 25 行
12.
解答例全文 using ICL
#include <iostream> #include <algorithm> #include <utility> #include <boost/icl/interval_map.hpp> int main(void) { boost::icl::interval_map<int, int> sum; int n; std::cin >> n; for(int i = 0; i < n; ++i) { int s, t; std::cin >> s >> t; sum += std::make_pair(boost::icl::interval<int>::right_open(s, t), 1); } typedef boost::icl::interval_map<int, int>::value_type value_type; auto it = max_element(sum.begin(), sum.end(), [](const value_type &v1, const value_type &v2) { return v1.second < v2.second || (v1.second == v2.second && v1.first.upper() - v1.first.lower() < v2.first.upper() - v2.first.lower()) || (v1.second == v2.second && v1.first.upper() - v1.first.lower() == v2.first.upper() - v2.first.lower() && v1.first.lower() < v2.first.lower()); }); std::cout << it->first.lower() << ' ' << it->first.upper() << ' ' << it->second << std::endl; return 0; } ヘッダのインクルード 入力と登録 最大値取得 出力
13.
解答例 入力と登録
boost::icl::interval_map<int, int> sum; int n; std::cin >> n; for(int i = 0; i < n; ++i) { int s, t; std::cin >> s >> t; sum += std::make_pair(boost::icl::interval<int>::right_open(s, t), 1); } 今回は数だが集合も可能 右開区間 [s, t) 1 1 + + 1 1 split_interval_map 1 interval_map 2 1 1 1 1
14.
解答例 最大値取得 typedef
boost::icl::interval_map<int, int>::value_type value_type; auto it = max_element(sum.begin(), sum.end(), [](const value_type &v1, const value_type &v2) { return v1.second < v2.second || (v1.second == v2.second && v1.first.upper() - v1.first.lower() < v2.first.upper() - v2.first.lower()) || (v1.second == v2.second && v1.first.upper() - v1.first.lower() == v2.first.upper() - v2.first.lower() && v1.first.lower() < v2.first.lower()); }); // 集計値は second // 区間は first (upper(), lower() で境界値) 集計された区間の結果を iteration 可能なので普通に max_element で最大値取得
15.
Interval Container Library
1.46 で導入 開区間、閉区間等全部取り扱い可能 区間に対する集合演算、「集計」が可能 interval_set, interval_map 区間の統合方法として join, separate, split を選択可能 ストリーム出力有り(例:{(1,3][4.6](7,8]}) Traits 用意すれば自前の interval を突っ込むことも可能 数値に限定されないので例えばcotinuous_interval<std::string> w(“a”, “c”) // right_openとか書くと a, b で始まる文字列全部を表すことになる。 Example がいっぱいなのでそれ見ればOK interval_set a interval_set b interval_set a - b
Baixar agora