- 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倍以上かかっている。
Submit前確認リスト
フォワードイテレータの受け取りしか考えていなかった。
InsertなどのInputIteratorを受け取るメソッドに投げる。
実装しましょう。
std::out_of_range("vector");
に修正する
std::swapを使って良いから。
vector.data()というメソッドがあるらしい。
stlの20倍以上かかっている。
templateで受け取る比較演算が必要
可読性が低いのでリファクタする
vectorのinsertが怪しそう。
実効速度早くなる。
vector.resize(10);
vector.resize(15, 42);
vector.size(); // 16になる
friendを使わなくてよくなる。
現在はbase()でcurrentの比較を行っている。
ここで使わないと実装必須のequalとlexicographical_compareの出番がなくなる。
概要
対応
現状begin()から見ている。当然遅い。
stlの20倍以上かかっている。
AVL or RB どっちにしようか考え中。
treeのコピーが上手く行ってなさそう
cpp referenceのURIを見て気づいた。
概要
stlの20倍以上かかっている。
対応
iterator insert(const_iterator pos, const value_type& value);
そのままposにvalueを代入する処理があった。
capacityがない場合に要素の確保が必要。
その他のinsertと同じような実装に修正する。
な… 何を言っているのか わからねーと思うが
おれも 何をされたのか わからなかった…
名前空間 std内に作る必要がある
AVL木やイテレーターを用いて各機能を実装する。
リファレンスはこちら
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.