当前位置: 首页 > article >正文

哈希密钥:解锁unordered容器的极速潜能

目录一.unordered系列关联式容器二:unordered_set1:unordered_set用法详解1.1:模板参数介绍1.2:unordered_set的构造函数1.3:常用接口使用1.3.1:insert与erase1.3.2:find与size与empty1.3.3:clear与swap与count1.3.4:迭代器1.3.5:桶操作三:unordered_map1:unorder_map用法详解1.1:模板参数介绍1.2:unordered_map的接口说明1.2.1:unordered_map的构造函数1.2.2:unordered_map的容量1.2.3:unordered_map的迭代器1.2.4:unordered_map的元素访问1.2.5:unordered_map的查询1.2.6:unordered_map的修改操作1.2.6.1:insert与erase1.2.6.2:clear与swap1.2.7:unordered_map的桶操作四:unordered_set和set的使用差异五:unordered_map和map的使用差异一.unordered系列关联式容器在C98中STL提供了底层为红黑树结构的一系列关联式容器在查询时效率可达到log2N即最差情况下需要比较红黑树的高度次,当树中的节点非常多时查询效率也不理想。最好的查询是进行很少的比较次数就能够将元素找到因此在C11中STL又提供了4个unordered系列的关联式容器这四个容器与红黑树结构的关联式容器使用方式基本类似只是其底层结构不同.二:unordered_setunordered_set是不按特定顺序存储键值的关联式容器其允许通过键值快速的索引到对应的元素。在unordered_set中,元素的值同时也是唯一地标识它的key。在内部unordered_set中的元素没有按照任何特定的顺序排序为了能在常数范围内找到指定的Keyunordered_set将相同哈希值的键值放在相同的桶中。在unordered_set容器通过key访问单个元素要比set快但它通常在遍历元素子集的范围迭代效率较低。它的迭代器至少是前向迭代器。1:unordered_set用法详解1.1:模板参数介绍template class Key, // unordered_set::key_type/value_type class Hash hashKey, // unordered_set::hasher class Pred equal_toKey, // unordered_set::key_equal class Alloc allocatorKey // unordered_set::allocator_type class unordered_set;1.Key键类型用于定义键的数据类型必须是可哈希可比较的2.Hash哈希函数类型默认std::hashKey将键转换为size_t类型的哈希值可以使用stl内置的哈希函数该参数可以缺省如果用unordered_SET存储自定义数据类型则需要自己设置哈希函数.3.KeyEqual键相等比较函数默认std::equal_toKey判断两个键是否相等可以使用stl内置的键相等比较函数该参数可缺省如果用unordered_set存储自定义数据类型则需要自己设计键相等比较函数该函数是实现键值去重和查找必不可少的.4.Allocator分配器类型默认std::allocatorpairconst Key, T管理内存的分配和释放1.2:unordered_set的构造函数构造一个某类型的空容器。拷贝构造某同类型容器的复制品。使用迭代器拷贝构造某一段内容。#include iostream using namespace std; #include unordered_set int main() { vectorint v1 { 1,2,3,4,5,6,7,8,9 }; //构造 unordered_setint s1; //拷贝构造 unordered_setint s2(s1); //迭代器构造 unordered_setint s3(v1.begin(), v1.end()); for (const auto e : s3) cout e ; cout endl; return 0; }1.3:常用接口使用成员函数功能insert插入指定元素erase删除指定元素find查找指定元素size获取容器中元素的个数empty判断容器是否为空clear清空容器swap交换两个容器中的数据count获取容器中指定元素值的元素个数1.3.1:insert与erase#include iostream using namespace std; #include unordered_set void TestInsertAndErase() { unordered_setint us1; us1.insert(1); us1.insert(2); us1.insert(7); us1.insert(5); us1.insert(9); us1.insert(25); us1.insert(4); for (const auto e : us1) cout e ; cout endl; us1.erase(25); us1.erase(9); us1.erase(7); for (const auto e : us1) cout e ; cout endl; } int main() { TestInsertAndErase(); }1.3.2:find与size与empty#include iostream using namespace std; #include unordered_set void TestFindAndSizeAndEmpty() { unordered_setint us1; us1.insert(1); us1.insert(2); us1.insert(7); us1.insert(5); us1.insert(9); us1.insert(25); us1.insert(4); //返回的是该数值的迭代器 cout *(us1.find(5)) endl; cout Size: us1.size() endl; cout us1.empty() endl; } int main() { TestFindAndSizeAndEmpty(); }1.3.3:clear与swap与count#include iostream using namespace std; #include unordered_set void TestInsertAndErase() { unordered_setint us1; us1.insert(1); us1.insert(2); us1.insert(7); us1.insert(5); us1.insert(9); us1.insert(25); us1.insert(4); for (const auto e : us1) cout e ; cout endl; us1.erase(25); us1.erase(9); us1.erase(7); for (const auto e : us1) cout e ; cout endl; } void TestFindAndSizeAndEmpty() { unordered_setint us1; us1.insert(1); us1.insert(2); us1.insert(7); us1.insert(5); us1.insert(9); us1.insert(25); us1.insert(4); //返回的是该数值的迭代器 cout *(us1.find(5)) endl; cout Size: us1.size() endl; cout us1.empty() endl; } void TestClearAndSwapAndCount() { unordered_setint us1; us1.insert(1); us1.insert(2); us1.insert(7); us1.insert(5); us1.insert(9); us1.insert(25); us1.insert(4); unordered_setint us2; us2.insert(6); us2.insert(3); us2.insert(8); us2.insert(11); us2.insert(17); us2.insert(20); us2.insert(20); us2.insert(20); cout 交换前 endl; for (auto e : us1) cout e ; cout endl; for (auto e : us2) cout e ; cout endl; us1.swap(us2); cout 交换后 endl; for (auto e : us1) cout e ; cout endl; for (auto e : us2) cout e ; cout endl; cout us1.count(2): us1.count(2) endl; cout us2.count(20): us1.count(20) endl; us1.clear(); us2.clear(); cout us1:size: us1.size() endl; cout us2:size: us2.size() endl; } int main() { TestClearAndSwapAndCount(); }1.3.4:迭代器#include iostream using namespace std; #include unordered_set void TestIterator() { unordered_setint us1 { 10,20,30,40,50,60 }; unordered_setint::iterator it us1.begin(); while(it ! us1.end()) { cout *it ; it; } cout endl; for (auto element : us1) cout element ; cout endl; } int main() { TestIterator(); }1.3.5:桶操作STL实现哈希表示意图对于哈希值相同的元素STL选择将其用链表链接起来挂到同一个桶上面去。在C STL中unordered_set和unordered_map的默认最大负载因子是 1.0负载因子 插入元素数量 / 桶数量这意味着当容器中的元素数量超过桶的数量时即负载因子 1.0就会触发扩容。#include iostream using namespace std; #include unordered_set void TestBucket() { unordered_setint uset { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; cout bucket_count: uset.bucket_count() endl; // 桶的数量 cout max_bucket_count: uset.max_bucket_count() endl; cout load_factor: uset.load_factor() endl; // 负载因子 cout max_load_factor: uset.max_load_factor() endl; // 最大负载因子 // 遍历桶 for (size_t i 0; i uset.bucket_count(); i) { cout Bucket i has uset.bucket_size(i) elements endl; } // 查找元素所在的桶 int val 5; cout val is in bucket uset.bucket(val) endl; } int main() { TestBucket(); }三:unordered_mapunordered_map是存储key,value键值对的关联式容器其允许通过keys快速的索引到与其对应的value.在unordered_map中键值通常用于唯一地标识元素而映射值是一个对象其内容与此键关联。键和映射值的类型可能不同。在内部unordered_map没有对keyvalue按照任何特定的顺序排序为了能在常数范围内找到key所对应的valueunordered_map将相同哈希值的键值对放在相同的桶中。unordered_map容器通过key访问单个元素要比map快但它通常在遍历元素子集的范围迭代方面效率较低。unordered_maps实现了直接访问操作符operator[],它允许使用key作为参数直接访问value它的迭代器至少是前向迭代器.1:unorder_map用法详解1.1:模板参数介绍template class Key, // unordered_map::key_type class T, // unordered_map::mapped_type class Hash hashKey, // unordered_map::hasher class Pred equal_toKey, // unordered_map::key_equal class Alloc allocator pairconst Key,T // unordered_map::allocator_type class unordered_map;Key键类型定义键的数据类型必须是可哈希和可比较的T值类型定义与键关联的的值的类型.Hash哈希函数类型默认:std::hashKey将键转换为size_t类型的哈希值KeyEqual键相等比较函数默认std::equal_toKey判断两个键是否相等内置数据类型和string类可以使用stl内置的键相等比较函数该参数可缺省如果用unordered_set存储自定义数据类型则需要自己设计键相等比较函数该函数是实现键值去重和查找必不可少的。Allocator分配器类型默认std::allocatorpairconst Key, T管理内存的分配和释放绝大多数情况使用默认分配器特殊场景如嵌入式系统、实时系统可能需要自定义分配器.1.2:unordered_map的接口说明1.2.1:unordered_map的构造函数#include iostream using namespace std; #include unordered_set #include unordered_map void TestConstructor() { unordered_mapstring, int m1{ {abc, 1}, {awb, 2}, {ccd, 3} }; unordered_mapstring, int m2(m1); unordered_mapstring, int m3; } int main() { TestConstructor(); return 0; }1.2.2:unordered_map的容量函数声明功能介绍bool empty() const检测unordered_map是否为空size_t size() const获获取unordered_map的有效元素个数#include iostream using namespace std; #include unordered_set #include unordered_map void TestCapacity() { unordered_mapstring, int m1{ {abc, 1}, {awb, 2}, {ccd, 3} }; cout m1.size() endl; cout m1.empty() endl; } int main() { TestConstructor(); TestCapacity(); return 0; }1.2.3:unordered_map的迭代器函数声明功能介绍begin返回unordered_map第一个元素的迭代器end返回unordered_map最后一个元素下一个位置的迭代器cbegin返回unordered_map第一个元素的const迭代器cend返回unordered_map最后一个元素下一个位置的const迭代器#include iostream using namespace std; #include unordered_set #include unordered_map void TestIterator() { unordered_mapstring,int m1{ {abc, 1}, {awb, 2}, {ccd, 3} }; unordered_mapstring, int::iterator it m1.begin(); while (it ! m1.end()) { cout it-first it-second endl; it; } cout endl; unordered_mapstring, int::const_iterator rit m1.cbegin(); while (rit ! m1.cend()) { cout rit-first rit-second endl; rit; } } int main() { TestIterator(); return 0; }1.2.4:unordered_map的元素访问函数声明功能介绍operator[]返回与key对应的value没有一个默认值注意:该函数中实际调用哈希桶的插入操作用参数key与V()构造一个默认值往底层哈希桶中插入如果key不在哈希桶中插入成功返回V()插入失败说明key已经在哈希桶中将key对应的value返回.#include iostream using namespace std; #include unordered_set #include unordered_map void TestElementAccess() { unordered_mapstring, int m1 { {abc,1},{awb,2}}; cout m1[abc] endl; cout m1[awb] endl; cout m1[ccd] endl; cout endl; } int main() { TestElementAccess(); return 0; }1.2.5:unordered_map的查询函数声明功能介绍iterator find(const K key)返回key在哈希桶中的位置size_t count(const K key)返回哈希桶中关键码为key的键值对的个数#include iostream using namespace std; #include unordered_set #include unordered_map void TestFindAndCount() { unordered_mapstring, int m1 { {abc,1},{awb,2},{ccd,3},{awd,4} }; unordered_mapstring, int::iterator it m1.find(abc); cout it-first : it-second endl; cout m1.count(abc) endl; } int main() { TestFindAndCount(); return 0; }注意unordered_map中key是不能重复的因此count函数的返回值最大为11.2.6:unordered_map的修改操作函数声明功能介绍insert向容器中插入键值对erase删除容器中的键值对void clear()清空容器中有效元素个数void swap(unordered map)交换两个容器中的元素1.2.6.1:insert与erase#include iostream using namespace std; #include unordered_set #include unordered_map void TestModify() { unordered_mapstring, int m1 { {abc,1},{awb,2}}; m1.insert({ ccd,3 }); m1.insert({ awd,4 }); unordered_mapstring, int::iterator it m1.begin(); while(it ! m1.end()) { cout it-first : it-second endl; it; } cout endl; m1.erase(abc); m1.erase(awd); for (auto e : m1) { cout e.first : e.second endl; } } int main() { TestModify(); return 0; }1.2.6.2:clear与swap#include iostream using namespace std; #include unordered_set #include unordered_map void TestClearAndSwap() { unordered_mapstring, int m1 { {abc,1},{awb,2}}; unordered_mapstring, int m2 { {ccd,3},{awd,4}}; cout 交换前 endl; for (const auto e : m1) { cout e.first : e.second endl; } cout endl; for (const auto e : m2) { cout e.first : e.second endl; } cout 交换后 endl; m1.swap(m2); for (const auto e : m1) { cout e.first : e.second endl; } cout endl; for (const auto e : m2) { cout e.first : e.second endl; } m1.clear(); m2.clear(); cout m1:size: m1.size() endl; cout m2:size: m2.size() endl; } int main() { TestClearAndSwap(); return 0; }1.2.7:unordered_map的桶操作函数声明功能介绍size_t bucket count()const返回哈希桶中桶的总个数size_t bucket size(size_t n) const返回n号桶中有效元素的总个数size_t bucket(const K key)返回元素key所在的桶号#include iostream using namespace std; #include unordered_set #include unordered_map void TestBucketOperation() { unordered_mapstring, int m1 { {abc,1},{awb,2},{ccd,3},{awd,4} }; cout m1.bucket_count() endl; cout m1.bucket_size(2) endl; cout m1.bucket(abc) endl; } int main() { TestBucketOperation(); return 0; }四:unordered_set和set的使用差异unordered_set和set的第一个差异是对key的要求不同set要求Key支持小于比较而unordered_set要求Key支持转成整形且支持等于比较要理解unordered_set的这个两点要求得后续结合哈希表底层实现才能真正理解也就是说这本质是哈希表的要求。unordered_set和set的第二个差异是迭代器的差异set的iterator是双向迭代器unordered_set是单向迭代器其次set底层是红黑树红黑树是二叉搜索树走中序遍历是有序的所以set迭代器的遍历是有序去重.而unordered_set底层是哈希表迭代器遍历是无序去重。unordered_set和set的第三个差异是性能的差异整体而言大多数场景下unordered_set的增删查改更快⼀些因为红黑树增删查改效率是O(logN)而哈希表增删查平均效率是O(1).#include iostream using namespace std; #include unordered_set #include unordered_map #include set void Test() { const size_t N 1000000; unordered_setint us; setint s; vectorint v; v.reserve(N); srand(time(0)); for (size_t i 0; i N; i) { //v.push_back(rand()); // N⽐较⼤时重复值⽐较多 v.push_back(rand() i); // 重复值相对少 //v.push_back(i); // 没有重复有序 } size_t begin1 clock(); for (auto e : v) { s.insert(e); } size_t end1 clock(); cout set insert: end1 - begin1 endl; size_t begin2 clock(); us.reserve(N); for (auto e : v) { us.insert(e); } size_t end2 clock(); cout unordered_set insert: end2 - begin2 endl; int m1 0; size_t begin3 clock(); for (auto e : v) { auto ret s.find(e); if (ret ! s.end()) { m1; } } size_t end3 clock(); cout set find: end3 - begin3 - m1 endl; int m2 0; size_t begin4 clock(); for (auto e : v) { auto ret us.find(e); if (ret ! us.end()) { m2; } } size_t end4 clock(); cout unorered_set find: end4 - begin4 - m2 endl; cout 插入数据个数 s.size() endl; cout 插入数据个数 us.size() endl endl; size_t begin5 clock(); for (auto e : v) { s.erase(e); } size_t end5 clock(); cout set erase: end5 - begin5 endl; size_t begin6 clock(); for (auto e : v) { us.erase(e); } size_t end6 clock(); cout unordered_set erase: end6 - begin6 endl endl; } int main() { Test(); return 0; }五:unordered_map和map的使用差异unordered_map和map的第⼀个差异是对key的要求不同map要求Key支持小于比较而unordered_map要求Key支持转成整形且支持等于比较要理解unordered_map的这个两点要求得后续结合哈希表底层实现才能真正理解也就是说这本质是哈希表的要求。unordered_map和map的第二个差异是迭代器的差异map的iterator是双向迭代器unordered_map是单向迭代器其次map底层是红黑树红黑树是二叉搜索树走中序遍历是有序的所以map迭代器遍历是Key有序 去重。而unordered_map底层是哈希表迭代器遍历是Key无序去重.unordered_map和map的第三个差异是性能的差异整体而言大多数数场景下unordered_map的增删查改更快⼀些因为红黑树树增删查改效率是O(logN) 而哈希表增删查平均效率是O(1)具体可以参看下⾯代码的演示的对比差异。#include iostream using namespace std; #include unordered_set #include unordered_map #include map #include set void Test() { const size_t N 1000000; unordered_mapint, int um; mapint, int m; vectorint v; v.reserve(N); srand(time(0)); for (size_t i 0; i N; i) { //v.push_back(rand()); // N比较大时重复值比较多 v.push_back(rand() i); // 重复值相对少 //v.push_back(i); // 没有重复有序 } size_t begin1 clock(); for (auto e : v) { m.insert({e,e}); } size_t end1 clock(); cout map insert: end1 - begin1 endl; size_t begin2 clock(); um.reserve(N); for (auto e : v) { um.insert({e,e}); } size_t end2 clock(); cout unordered_map insert: end2 - begin2 endl; int m1 0; size_t begin3 clock(); for (auto e : v) { auto ret m.find(e); if (ret ! m.end()) { m1; } } size_t end3 clock(); cout set find: end3 - begin3 - m1 endl; int m2 0; size_t begin4 clock(); for (auto e : v) { auto ret um.find(e); if (ret ! um.end()) { m2; } } size_t end4 clock(); cout unorered_set find: end4 - begin4 - m2 endl; cout 插入数据个数 m.size() endl; cout 插入数据个数 um.size() endl endl; size_t begin5 clock(); for (auto e : v) { m.erase(e); } size_t end5 clock(); cout map erase: end5 - begin5 endl; size_t begin6 clock(); for (auto e : v) { um.erase(e); } size_t end6 clock(); cout unordered_map erase: end6 - begin6 endl endl; } int main() { Test(); return 0; }

相关文章:

哈希密钥:解锁unordered容器的极速潜能

目录 一.unordered系列关联式容器 二:unordered_set 1:unordered_set用法详解 1.1:模板参数介绍 1.2:unordered_set的构造函数 1.3:常用接口使用 1.3.1:insert与erase 1.3.2:find与size与empty 1.3.3:clear与swap与count 1.3.4:迭代器 1.3.5:桶操作 三:unordered_ma…...

31.在函数组件里如何使用多个 state 变量?

在 React 中,你可以通过多次调用 useState 来管理多个彼此独立的状态。每一次 useState(...) 都会创建一块独立的 state,以及对应的更新函数,这样更清晰、也更便于维护。示例:在一个表单里管理多个 stateimport React, { useState…...

OPA策略引擎:从原理到Kubernetes集成的云原生策略管理实践

1. 项目概述:什么是 OPA,以及它为何如此重要如果你在云原生、微服务或者 DevOps 领域工作,那么“策略即代码”这个概念你一定不陌生。而提到策略即代码,就绕不开Open Policy Agent,也就是我们常说的 OPA。简单来说&…...

13.有没有PCB焊接过程的图片,没有自己怎么弄

1.有没要PCB焊接过程的图片,没有自己怎么弄解释:我们并不提供PCB焊接过程的图片,如果有需要的同学可以自己用我们提供的PCB文件打印PCB板子(打印下单不会的看本站下单教程),然后自己使用电烙铁焊接一片&…...

1. 开发工具软件介绍

1.开发工具软件怎么安装 我们提供的开发工具就是这个项目需要用到的软件,包括keil5安装包、STLINK驱动、AD软件等等 软件介绍 Keil5 是一款针对ARM架构单片机(尤其是STM32系列)的集成开发环境(IDE),集成了…...

Transformer线性层与激活函数:原理与优化实践

1. Transformer模型中的线性层与激活函数解析在Transformer架构中,线性层(Linear Layers)和激活函数(Activation Functions)构成了模型处理信息的基础单元。不同于传统神经网络,Transformer通过自注意力机制…...

Changelogger:实时更新日志聚合器的架构设计与工程实践

1. 项目概述与核心价值在技术迭代日新月异的今天,尤其是AI工具和开发者软件领域,几乎每天都有新的功能发布、API更新或产品迭代。作为一名长期泡在代码和产品里的从业者,我深有体会:错过一个关键更新,可能意味着浪费数…...

新能源上市公司361个指标数据2000-2021年

01、数据简介新能源汽车是指采用非常规的燃料如石油等作为动力来源,或者采用新型动力装置,采用先进的技术原理,具有新技术新结构的汽车,根据《新能源汽车产业发展规划(2021—2035年)》,我国将深…...

各地级市数字经济政策文本词频统计2002-2022年

01、数据介绍全国各地级市大力发展电子信息制造业,加快数字经济产业基础建设,建设数字经济创新生态,推动数字化转型和商业模式创新,布局数字经济未来产业,加快发展智能制造、数字化营销等数字经济新业态模式&#xff0…...

专利转让数据库1985-2021年

01、数据简介专利所有权转让是指专利获得国家知识产权局授权,获得专利的所有权,专利权人将其拥有的专利权转让给个人以及企业等法律行为。转让行为在国务院专利行政部门进行登记,签订书面合同。通过转让合同取得专利申请权或专利权的合同当事…...

全国排污许可证详细信息数据库2023年

01、数据简介排污许可证是允许排污单位排放一定数量污染物的凭证。它是由环境保护行政主管部门在排污单位提出申请后,经审查合格后发放的。排污许可证制度是环境管理的重要手段,可以强制对企业污染物排放控制和管理,对研究污染控制和环境治理…...

sfsEdgeStore 使用golang 是否有竞争力

sfsEdgeStore 使用 Golang 不仅具有极强的竞争力,而且是其在工业物联网边缘侧生存的“杀手锏”。结合刚才我们讨论的“Java 在国内业务层的统治地位”以及搜索到的资料,sfsEdgeStore 选择 Go 语言是典型的**“在正确的场景使用了正确的工具”**。以下是 …...

自洽性与Agent的结合

让智能体学会“自我验证”,提升决策可靠性。随着大语言模型(LLM)从单纯的“对话接口”演进为“行动中枢”,AI Agent(智能体)正逐步突破“被动响应”的局限,向“自主决策、主动执行”的高阶形态演…...

AI日报:24小时全球科技热点速览

每日AI新闻推送:近24小时全球科技热点深度报告 日期:2026年4月24日 摘要:过去24小时内,AI领域迎来密集爆发。具身智能从“炫技”转向“实干”,数据成为核心瓶颈与竞争高地;特斯拉Optimus V3定档年中亮相&a…...

基于PraisonAI的多智能体编排框架:从YAML配置到生产部署全解析

1. 项目概述:当AI遇上AI,一个能指挥大模型的“指挥官”最近在折腾AI应用开发的朋友,可能都遇到过这样的困境:手头有好几个强大的模型,比如OpenAI的GPT-4、Anthropic的Claude,还有开源的Llama 3,…...

设计Section 12:Related PCB Assembly Services

这个区块只做 Related Services 内链卡片。不做:FAQ Schema FAQ 区 Ninja Tables Fluent Forms Custom HTML Gutenberg Spacer Gutenberg Separator Phase 2 占位内容一、使用组件结构Gutenberg Group └── Gutenberg Group├── Gutenberg Group:橙色…...

定义类的方法和CRC建模

在面向对象分析与设计(OOAD)中,定义类的方法 和 CRC 建模 是衔接“需求分析”与“详细设计”的关键技术。前者关注如何为类分配职责(行为),后者提供了一种轻量、协作式的建模方法来验证类的职责与协作关系。 一、定义类的方法 1.1 什么是类的方法? 类的方法(Method)…...

量子机器学习:原理、算法与工程实践

1. 量子机器学习:当传统算力遇到物理极限 三年前我在处理一个蛋白质折叠预测项目时,第一次真切感受到经典计算机的算力瓶颈。当模型参数超过1亿,即使使用最先进的GPU集群,训练周期仍然长达两周。正是那次经历让我开始关注量子计算…...

【风暴之城】游玩日记 新手攻略(3)

游玩记录 开局 被封印的皇家森林要精准伐木,用shift单选树木 蓝图 木工直接拿下先开一片小地看看封印方向蓝图基石 按照“老头环的小迷妹”的攻略来看,农民的补给是t!,其他两个是T3指令 1吧这个地图应该会比较缺木头而且可以立即完…...

NVSentinel:Kubernetes AI集群的智能健康管理方案

1. 项目概述:NVSentinel 如何为 Kubernetes AI 集群提供智能健康管理在当今AI驱动的生产环境中,Kubernetes已成为GPU工作负载的事实标准平台。然而,管理这些集群中的GPU节点绝非易事——从确保训练任务持续进展到维持服务流量稳定&#xff0c…...

Unity最强捏脸系统来了!Character Customizer:基于BlendShape与骨骼驱动的角色定制系统设计

在当今游戏开发中,“角色个性化”几乎已经成为标配功能。从《GTA》《模拟人生》到各类 MMO、开放世界游戏,玩家都希望打造独一无二的角色形象。而在 Unity 中,如果从零实现一套高扩展性的角色定制系统,成本其实非常高。 今天我们要…...

GITEE通过API下载发新版的附件

首先需要创建私人令牌,然后进行下面的步骤:1. 获取仓库的最后更新的Release->拿到Release ID https://gitee.com/api/v5/repos/{owner}/{repo}/releases/latest2. 获取仓库下的指定 Release 的所有附件 -> 拿到附件ID https://gitee.com/api/v5/re…...

AI率检测工具到底有何不同?10款主流aigc检测工具横评告诉你ai查重的真相!

2026年答辩季临近,AIGC检测已经成为大多数高校论文审核的标配流程。不管你有没有用过A论文,学校都可能会查一遍AI率。很多同学的第一反应就是:ai率查重要多少钱?有没有能免费查AI率的工具? 有免费的aigc检测工具&…...

想免费查AI率?有4个网站可以免费aigc检测,附详细操作步骤!

2026年答辩季临近,AIGC检测已经成为大多数高校论文审核的标配流程。不管你有没有用过A论文,学校都可能会查一遍AI率。很多同学的第一反应就是:ai率查重要多少钱?有没有能免费查AI率的工具? 有免费的aigc检测工具&…...

Arm Neoverse V1 PMU架构与性能监控实战

1. Neoverse V1 PMU架构深度解析1.1 PMUv3p4架构特性Arm Neoverse V1采用的PMUv3p4是Armv8.4-A架构中的性能监控扩展实现。这个版本在基础PMU功能上引入了多项增强特性:扩展事件空间:通过新增的PMMIR_EL1寄存器提供更多微架构事件编码空间,支…...

Obsidian Smart Connections实战指南:高效连接笔记与AI的智能神器

Obsidian Smart Connections实战指南:高效连接笔记与AI的智能神器 【免费下载链接】obsidian-smart-connections Chat with your notes & see links to related content with AI embeddings. Use local models or 100 via APIs like Claude, Gemini, ChatGPT &a…...

基于LangGraph的多智能体AI内容生成系统XunLong实战指南

1. 项目概述:一个基于多智能体协作的AI内容生成系统最近在折腾一个挺有意思的开源项目,叫XunLong。简单来说,这是一个利用大语言模型(LLM)驱动的多模态内容生成系统。你可以把它理解为一个“AI内容工厂”,你…...

为Open WebUI构建安全代码执行沙箱:基于gVisor的本地LLM增强方案

1. 项目概述:为Open WebUI构建安全的代码执行沙箱如果你正在本地部署大语言模型,比如用Ollama跑Llama 3或者Qwen,并且通过Open WebUI这个漂亮的Web界面来交互,那你可能遇到过这样的场景:你问模型“帮我写个Python脚本来…...

LLMStack:低代码平台如何简化大模型应用开发与RAG系统构建

1. 项目概述:当低代码遇上大模型,LLMStack如何重塑应用开发最近在折腾AI应用落地的朋友,估计都听过或者用过LangChain、LlamaIndex这类框架。它们确实强大,但上手门槛不低,你得懂点编程,对AI模型的工作流也…...

R语言机器学习实战:10大内置数据集应用指南

1. R语言机器学习数据集实战指南在数据科学领域,R语言一直保持着不可替代的地位。作为一名长期使用R进行预测建模的数据分析师,我深刻体会到优质数据集对模型效果的决定性影响。很多初学者常陷入"巧妇难为无米之炊"的困境——掌握了各种算法却…...