C++ std library

Preface

Record the std library used, usage and usage scenarios, etc., without the source code.
Also only write down the functions I have used

map

1. Map is an associative container, which stores the elements formed by the combination of the key value Key and the mapped value Value in a specific order.
2. In the map, the element always uses its internal comparison object (Compare) according to its key and follows the specified strict weak order criterion. If you don’t need sorting but a dictionary, use unordered_map

//引用
#include <map>
//创建
std::map<std::string,int> map
//迭代器遍历
for(std::map<std::string,int>::iterator i=map.begin();i!=map.end();++i)
{
    
    
//访问元素
std::cout<<i->first<<" "<<i->second<<std::endl;
}

Algorithm 1: Dynamic Scheduler
One One One One One One One One One One One One One One One One One One
Input the node that finish the task
Output
for node nodenode in n o d e L i s t nodeList nodeList do:
      f i n i s h T i m e [ n o d e ] finishTime[node] finishTime[node] ← ← 0
      l o a d T i m e [ n o d e ] loadTime[node] loadTime[node] ← ← 0
      t a s k R e m a i n [ n o d e ] taskRemain[node] t a s k R e m a i n [ n o d e ] ← ← 0
for t a s k task task in t a s k l i s t tasklist tasklist do:
      find the n o d e node node such that f i n i s h T i m e [ n o d e ] finishTime[node] finishTime[node]+ l o a d T i m e [ n o d e ] ∗ t a s k R e m a i n [ n o d e ] loadTime[node]*taskRemain[node] loadTime[node]taskRemain[node] is minmum
      t a r g e t target target ← ← t a s k R e m a i n [ n o d e ] taskRemain[node] taskRemain[node]++
      t a r g e t target target ← ← t a s k R e m a i n [ n o d e ] taskRemain[node] t a s k R e m a i n [ n o d e ] ++

Algorithm 2: Tail Latency Handler
One One One One One One One One One One One One One One One One

Guess you like

Origin blog.csdn.net/weixin_44602409/article/details/108937572