- Frontend Developer.
- Team member at NextUI.
- X(Twitter): @ryo_manba
- LinkedIn: ryo-manba
ryo-manba / ft_containers Goto Github PK
View Code? Open in Web Editor NEWReimplementation of STL containers.
License: MIT License
Reimplementation of STL containers.
License: MIT License
stlの20倍以上かかっている。
std::out_of_range("vector");
に修正する
フォワードイテレータの受け取りしか考えていなかった。
InsertなどのInputIteratorを受け取るメソッドに投げる。
な… 何を言っているのか わからねーと思うが
おれも 何をされたのか わからなかった…
AVL or RB どっちにしようか考え中。
AVL木やイテレーターを用いて各機能を実装する。
リファレンスはこちら
std::swapを使って良いから。
templateで受け取る比較演算が必要
vector.data()というメソッドがあるらしい。
vectorのinsertが怪しそう。
stlの20倍以上かかっている。
Submit前確認リスト
実装しましょう。
実効速度早くなる。
概要
stlの20倍以上かかっている。
対応
stlの20倍以上かかっている。
可読性が低いのでリファクタする
名前空間 std内に作る必要がある
treeのコピーが上手く行ってなさそう
vector.resize(10);
vector.resize(15, 42);
vector.size(); // 16になる
概要
対応
cpp referenceのURIを見て気づいた。
現状begin()から見ている。当然遅い。
friendを使わなくてよくなる。
現在はbase()でcurrentの比較を行っている。
ここで使わないと実装必須のequalとlexicographical_compareの出番がなくなる。
iterator insert(const_iterator pos, const value_type& value);
そのままposにvalueを代入する処理があった。
capacityがない場合に要素の確保が必要。
その他のinsertと同じような実装に修正する。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.