"A strict weak ordering is a binary relation < on a set S that is a strict partial order (a transitive relation that is irreflexive, or equivalently, that is asymmetric) in which the relation "neither a < b nor b < a" is transitive. "
https://stackoverflow.com/questions/979759/operator-and-strict-weak-ordering
我记得人话版是[有错请纠正]: 一个STL的容器,放的是自定义的数据类型,例如struct Person {...}; 只需要定义<运算符。STL内部是如何判断等于的?if(!(a<b) && !(b<a))则说明a等于b。好得很,这给编译器的优化留下了巨大的生存空间啊。再定义operator==太过了。
>=就是!<,<=呢?我不知道。< || ==,< || (!< && !<)?
请问single total order是啥意思?
===
我记得这些都是书:《C++程序设计语言》、《Linux系统编程》、《Unix开发环境》、《Windows网络编程》、《Windows多媒体编程》……
不能啥都往std里放啊。C++ 22再放点图像、音视频处理的算法?那C++课只能本科最后一年再上,研究生还得开《高级C++编程》
我觉得:C++语言本身、常用容器、strcmp,atoi之类,就差不多了。
===
咱也文化下:-):没有数据结构的编程语言是无用的。STL容器是数据结构的合理延伸。算法+数据结构=程序(这句抄的),它们之间有着正交性(不是making love),换而言之,某个算法可以应用于多种容器。i.e. A particular algorithm can be employed to fuck containers of various kinds. The relationship can be consummated in many programming languages.
Oh, my algorithm is having regular coitus with a hashset.
What's he talking, Amy?
记错了。The Big Bang Theory, 4-5:
Sheldon: I assure you I am quite real and I'm having regular intercourse with your daughter.
Mrs. Fowler: What?
Sheldon: Oh, yes. We're like wild animals in heat. It's a wonder neither of us has been hurt.
Mrs. Fowler: Amy, what is he saying?
talk可以及物,talking rubbish,但似乎不及物更多:What are you talking about? 语言啊语言
--
修改:billybear04 FROM 106.121.70.*
FROM 106.121.161.*