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