我的数据结构c(给自己用的)
目录
顺序表:
链表:
栈:
队列:
我想在之后的大学数据结构课上需要自己写来做题,但每次都自己写,那太麻烦了,所以我就将这个博客来把所有的C语言的数据结构弄上去,
问我为什么不用GitHub,虽说也托管上去了,哈哈机房访问的GitHub太慢了!
顺序表:
头文件
#pragma once
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>// 队列先进先出typedef int QUDataType;typedef struct QueueNode
{struct QueueNode* next;QUDataType x;
}QueueNode;typedef struct QUEUE
{QueueNode* head;QueueNode* tail;
}Queue;//初始化
void QueueInit(Queue* pq);//入队列
void QueuePush(Queue* pq,QUDataType x);//出队列
void QueuePop(Queue* pq);//取头数据
QUDataType QueueFront(Queue* pq);//取尾数据
QUDataType QueueBack(Queue* pq);//有几个数据int QueueSize(Queue* pq);//是否为空bool QueueEmpty(Queue* pq);//打印
void Print(Queue* pq);
函数文件:
#define _CRT_SECURE_NO_WARNINGS 1
#include"main.h"void Checkcapacity(SL* pc)
{if (pc->size == pc->capacity){int newcapacity = pc->capacity == 0 ? 4 : pc->capacity * 2;SLDataType* str = (SLDataType*)realloc(pc->a, newcapacity * sizeof(SLDataType));if (str == NULL){perror("realloc");exit(-1);}}
}void print(SL* pc)
{int i = 0;for (i = 0; i < pc->size; i++){printf("%d ", pc->a[i]);}
}//回收空间
void SeqlistDestory(SL* pc)
{free(pc->a);pc->a = NULL;pc->capacity = pc->size = 0;
}void SeqListInit(SL* pc)
{pc->a = NULL;pc->size = 0;pc->capacity = 0;
}void SeqListPushback(SL* pc, SLDataType x)
{//如果没有空间或根本没有就增容:if (pc->size == pc->capacity){int newcapacity = pc->capacity == 0 ? 4 : pc->capacity * 2;SLDataType* str = (SLDataType*)realloc(pc->a,newcapacity*sizeof(SLDataType));if (str == NULL){perror("realloc");exit(-1);}pc->a = str;str = NULL;pc->capacity = newcapacity;}pc->a[pc->size] = x;pc->size++;
}void SeqlistPopback(SL* pc)
{if (pc->size == 0){printf("没有了喵~\n");return;}pc->a[pc->size - 1] = 0;pc->size--;
}void SeqlistPushfront(SL* pc, SLDataType x)
{if (pc->size == pc->capacity){int newcapacity = pc->capacity == 0 ? 4 : pc->capacity * 2;SLDataType* str = (SLDataType*)realloc(pc->a, newcapacity * sizeof(SLDataType));if (str == NULL){perror("realloc");exit(-1);}pc->a = str;str = NULL;pc->capacity = newcapacity;}pc->size += 1;for (int i = pc->size; i>=0; i--){pc->a[i+1] = pc->a[i];}pc->a[0]=x;
}void SeqlistPopfront(SL* pc)
{if (pc->size == 0){printf("没u删除的元素喵~\n");}int i = 1;for (i = i; i <= pc->size+1; i++){pc->a[i - 1] = pc->a[i];}pc->size -= 1;
}//插入数字
void Seqlistinsert(SL* pc, int pos, SLDataType x)
{Checkcapacity(pc);pc->size += 1;int i=pos;for (i = pos; i < pc->size; i++){pc->a[i] = pc->a[i - 1];}pc->a[pos - 1] = x;
}//查找数字()
int Seqlistfind_bydata(SL* pc, SLDataType x)
{int i = 0;for (i; i < pc->size; i++){if (pc->a[i] == x){printf("返回第一个下标\n");return i;}}printf("找不到\n");return -1;
}//删除指定数字
void Seqlistdelet(SL* pc, SLDataType x)
{int i = 0;for (i = 0; i < pc->size; i++){if (x == pc->a[i]){for (i; i < pc->size; i++){pc->a[i] = pc->a[i + 1];}pc->size--;break;}}printf("没这个数字哦\n");return;
}
链表:
头文件:
#pragma once
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>//单链表的英文 Single linked listtypedef int SLLdatatype;typedef struct SListNode
{SLLdatatype data;struct SListNode*next;
}SLL;//打印
void SLLprint(SLL* phead);//尾部存储
void SLLpushback(SLL**phead,SLLdatatype x);//头部存储
void SLLpushfront(SLL** phead, SLLdatatype x);void SLLpushfront2(SLL** phead, SLLdatatype x);//尾部删除
void SLLpopback(SLL** phead);//头部删除
void SLLpopfront(SLL** phead);//查找
void SLL_find_print(SLL* phead, SLLdatatype x);//查下标
SLL* SLL_findpos(SLL* phead, SLLdatatype x);// 指定位置插入
void SLL_inset(SLL** phead, SLL* pos, SLLdatatype x);//指定位置删除
void SLL_pos_del(SLL** phead, SLL* pos);//销毁链表
void SLL_destory(SLL* *phead);
函数文件:
#define _CRT_SECURE_NO_WARNINGS 1
#include"main.h"SLL* creatnode( SLLdatatype x)
{SLL* newnode = (SLL*)malloc(sizeof(SLL));if (newnode == NULL){perror("malloc");exit(-1);}newnode->data = x;newnode->next = NULL;return newnode;
}//打印
void SLLprint(SLL* phead)
{/*SLL* cur = phead;*/while (phead != NULL){printf("%d ", phead->data);phead = phead->next;}printf("->NULL\n");
}void SLLpushback(SLL**phead,SLLdatatype x)
{SLL* newnode = (SLL*)malloc(sizeof(SLL));newnode->data = x;newnode->next = NULL;if (*phead == NULL){*phead = newnode;}else{SLL* tail = *phead;while (tail->next != NULL){tail = tail->next;}tail->next = newnode;}
}void SLLpushfront(SLL** phead, SLLdatatype x)
{SLL* newnode = (SLL*)malloc(sizeof(SLL));newnode->data = x;newnode->next = NULL;if (phead == NULL){*phead = newnode;}else{newnode->next = *phead;*phead = newnode;}}void SLLpushfront2(SLL** phead, SLLdatatype x)
{SLL* newnode = creatnode(x);newnode->next = *phead;*phead = newnode;
}//尾部删除
void SLLpopback(SLL** phead){SLL*tail = *phead;SLL* str = NULL;if (*phead==NULL){return ;}if (tail->next ==NULL){free(tail);*phead = NULL;}else{while (tail->next!=NULL){str = tail;tail = tail->next;}free(tail);tail = NULL;str->next = NULL;}
}//头部删除
void SLLpopfront(SLL** phead)
{if (*phead == NULL){return;}if ((*phead)->next == NULL){*phead = NULL;}else{SLL* front = *phead;(*phead)=(*phead)->next;free(front);front = NULL;}
}//找加打印
void SLL_find_print(SLL* phead, SLLdatatype x)
{if (phead == NULL){return;}while (phead->data!=x){if (phead->next== NULL){break;}phead = phead->next;}if (phead->next == NULL){printf("找不到喵~\n");}else{printf("%d\n", phead->data);}
}//查下标
SLL* SLL_findpos(SLL* phead, SLLdatatype x)
{if (phead == NULL){return NULL;}else{while (phead){if (phead->data == x){return phead;}phead = phead->next;}}printf("找不到\n");return NULL;
}// 指定位置插入
void SLL_inset(SLL** phead, SLL* pos, SLLdatatype x)
{if (*phead == NULL){return;}else{SLL* find = *phead;while (find){if (find->next == pos){SLL* newnode = creatnode(x);newnode->next = find->next;find->next = newnode;return;}find = find->next;}}
}//指定位置删除
void SLL_pos_del(SLL** phead, SLL* pos)
{if (*phead == NULL){return;}else{SLL* find = *phead;SLL* findpos = NULL;while (find){if (find->next == pos){findpos = find->next;find->next = findpos->next;free(findpos);findpos = NULL;return;}find = find->next;}}}//销毁链表
void SLL_destory(SLL** phead)
{if (*phead == NULL){return;}else{ while ((*phead)->next!=NULL){SLL* tailpos = *phead;SLL* tail = NULL;while (tailpos->next != NULL){tail = tailpos;tailpos = tailpos->next;}free(tailpos);tail->next = NULL;tailpos = NULL;}free(*phead);*phead = NULL;}
}
栈:
头文件:
#pragma once
#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>typedef int STDataType;typedef struct Stack
{STDataType* a;int top;int capacity;
}ST;//初始化栈
void StackIint(ST* ps);//销毁栈
void Stackdestory(ST* pc);//push
void StackPush(ST* ps, STDataType x);//pop
void StackPop(ST* ps);//取栈顶数据
STDataType Stacktop(ST* ps);//有多少数据
int StackSize(ST* ps);//判断是否为空
bool StackEmpty(ST* ps);int minStackGetMin(ST* obj);
函数:
#define _CRT_SECURE_NO_WARNINGS 1
#include"main.h"//初始化单链表
void StackIint(ST* ps)
{assert(ps);ps->a = NULL;ps->capacity = 0;ps->top = 0;
}//销毁栈
void Stackdestory(ST* pc)
{assert(pc);free(pc->a);pc->a = NULL;pc->capacity = pc->top = 0;
}//push
void StackPush(ST* ps, STDataType x)
{assert(ps);if (ps->capacity == ps->top){ps->capacity =ps->capacity== 0 ? 4 : 2 * ps->capacity;STDataType* temp = (STDataType*)realloc(ps->a, sizeof(STDataType) * ps->capacity);if (temp == NULL){printf("realloc fail\n");exit(-1);}ps->a = temp;}ps->a[ps->top] = x;ps->top += 1;}int minStackGetMin(ST* obj) {int i = 0;int min = obj->a[i];for (i = 1; i<obj->top; i++){if (obj->a[i] < min){min = obj->a[i];}}return min;
}//pop
void StackPop(ST* ps)
{assert(ps->top > 0);ps->top--;
}//取栈顶数据
STDataType Stacktop(ST* ps)
{assert(!StackEmpty(ps));return ps->a[ps->top - 1];
}//有多少数据
int StackSize(ST* ps)
{assert(!StackEmpty(ps));return ps->top;
}
//判断是否为空
bool StackEmpty(ST* ps)
{return ps->top == 0;
}
队列:
头文件:
#pragma once
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>// 队列先进先出typedef int QUDataType;typedef struct QueueNode
{struct QueueNode* next;QUDataType x;
}QueueNode;typedef struct QUEUE
{QueueNode* head;QueueNode* tail;
}Queue;//初始化
void QueueInit(Queue* pq);//入队列
void QueuePush(Queue* pq,QUDataType x);//出队列
void QueuePop(Queue* pq);//取头数据
QUDataType QueueFront(Queue* pq);//取尾数据
QUDataType QueueBack(Queue* pq);//有几个数据int QueueSize(Queue* pq);//是否为空bool QueueEmpty(Queue* pq);//打印
void Print(Queue* pq);
函数:
#define _CRT_SECURE_NO_WARNINGS 1
#include"main.h"//初始化
void QueueInit(Queue* pq)
{assert(pq);pq->head = NULL;pq->tail = NULL;
}void QueueDestory(Queue* pq)
{assert(pq);QueueNode* cur = pq->head;while (cur!=NULL){QueueNode* next = cur->next;free(cur);cur = next;}pq->head = NULL;pq->tail = NULL;}//入队列
void QueuePush(Queue* pq, QUDataType x)
{assert(pq);if (pq->head == NULL && pq->tail == NULL){QueueNode* newnode = (QueueNode*)malloc(sizeof(QueueNode));newnode->x = x;newnode->next = NULL;pq->head=newnode;pq->tail=newnode;}else{QueueNode* newnode = (QueueNode*)malloc(sizeof(QueueNode));newnode->x = x;newnode->next = NULL;QueueNode* tail1 = NULL;tail1 = pq->tail;tail1->next = newnode;pq->tail = newnode;}
}//出队列
void QueuePop(Queue* pq)
{assert(pq);if (pq->head ==NULL){exit(-1);}QueueNode* head1 = pq->head->next;free(pq->head);pq->head = head1;if (pq->head == NULL){pq->head = pq->tail = NULL;}
}//取头数据
QUDataType QueueFront(Queue* pq)
{assert(pq);assert(pq->head);return pq->head->x;
}//取尾数据
QUDataType QueueBack(Queue* pq)
{assert(pq);assert(pq->head);return pq->tail->x;
}//有几个数据int QueueSize(Queue* pq)
{assert(pq);int count = 0;QueueNode*pos = pq->head;while (pos != NULL){count += 1;pos = pos->next;}return count;
}//是否为空
bool QueueEmpty(Queue* pq)
{assert(pq);if (pq->head){return false;}return true;
}//打印
void Print(Queue* pq)
{assert(pq);assert(pq->head);QueueNode* pos = pq->head;while (pos != NULL){printf("%d ", pos->x);pos = pos->next;}printf("\n");
} typedef struct {Queue* q1;Queue* q2;
} MyStack;MyStack* myStackCreate() {MyStack* st = (MyStack*)malloc(sizeof(MyStack));st->q1 = (QUEUE*)malloc(sizeof(QUEUE));st->q2 = (QUEUE*)malloc(sizeof(QUEUE));return st;
}void myStackPush(MyStack* obj, int x) {if (!QueueEmpty(obj->q1)){QueuePush(obj->q1, x);}else{QueuePush(obj->q2, x);}
}int myStackPop(MyStack* obj) {Queue* empty = obj->q1;Queue* noempty = obj->q2;if (!QueueEmpty(obj->q1)){empty = obj->q2;noempty = obj->q1;}int top = QueueBack(noempty);while (QueueSize(noempty) > 0){QueuePush(empty, QueueFront(noempty));QueuePop(noempty);}return top;}int myStackTop(MyStack* obj) {if (!QueueEmpty(obj->q1)){return QueueBack(obj->q1);}return QueueBack(obj->q2);
}bool myStackEmpty(MyStack* obj) {if (QueueEmpty(obj->q1) || QueueEmpty(obj->q2)){return false;}return true;}void myStackFree(MyStack* obj) {free(obj->q1);free(obj->q2);free(obj);
}
相关文章:
我的数据结构c(给自己用的)
目录 顺序表: 链表: 栈: 队列: 我想在之后的大学数据结构课上需要自己写来做题,但每次都自己写,那太麻烦了,所以我就将这个博客来把所有的C语言的数据结构弄上去, 问我为什么不…...

使用Arcgis对欧洲雷达高分辨率降水数据重投影
当前需要使用欧洲高分辨雷达降水数据,但是这个数据的投影问题非常头疼。实际的投影应该长这样(https://gist.github.com/kmuehlbauer/645e42a53b30752230c08c20a9c964f9?permalink_comment_id2954366https://gist.github.com/kmuehlbauer/645e42a53b307…...

[Python] scikit-learn中数据集模块介绍和使用案例
sklearn.datasets模块介绍 在scikit-learn中,可以使用sklearn.datasets模块中的函数来构建数据集。这个模块提供了用于加载和生成数据集的函数。 API Reference — scikit-learn 1.4.0 documentation 以下是一些常用的sklearn.datasets模块中的函数 load_iris() …...
Qt-互斥量-临界区-QMutex-QMutexLocker-QReadWriteLock
文章目录 1.QMutex2.QMutexLocker3.QReadWriteLock 在Qt中,互斥量(Mutex)是用于同步多线程访问共享资源的一种机制。临界区(Critical Section)是指一段必须由单个线程执行的代码区域,防止多个线程同时执行这…...

《PCI Express体系结构导读》随记 —— 第II篇 第4章 PCIe总线概述(6)
接前一篇文章:《PCI Express体系结构导读》随记 —— 第II篇 第4章 PCIe总线概述(5) 4.1 PCIe总线的基础知识 与PCI总线不同,PCIe总线使用端到端的连接方式,在一条PCIe链路的两端只能各连接一个设备,这两个…...

uniapp 高德地图显示
1. uniapp 高德地图显示 使用前需到**高德开放平台(https://lbs.amap.com/)**创建应用并申请Key 登录 高德开放平台,进入“控制台”,如果没有注册账号请先根据页面提示注册账号 打开 “应用管理” -> “我的应用”页面…...

2024年最新幻兽帕鲁服务器搭建教程
玩转幻兽帕鲁服务器,阿里云推出新手0基础一键部署幻兽帕鲁服务器教程,傻瓜式一键部署,3分钟即可成功创建一台Palworld专属服务器,成本仅需26元,阿里云服务器网aliyunfuwuqi.com分享2024年新版基于阿里云搭建幻兽帕鲁服…...
重新配置vue项目时出现的:连接已断开问题
在新机器上配置完node.js、vue-cli,配置了node_modules后,命令行运行vue ui后,出现了如下报错: C:\Users\LEN>vue ui 🚀 Starting GUI... 🌠 Ready on http://localhost:8000 node:events:496throw e…...

四、Redis之配置文件
redis配置文件的名称 redis.conf 通过命令 find / -name redis.confvim redis.conf通过 : set nu 设置行号: set nonu 取消行号/关键字 搜索关键字: set noh 取消高亮选择4.1 Units 配置大小单位,开头定义了一些基本的度量单位,只支持 bytes&#…...
libevent源码解析--event,event_callback,event_base
1.概述 实现一个基础tcp网络库,以基于tcp网络库构建服务端应用,客户端应用为起点,我们的核心诉求有: a. tcp网络库管理工作线程。 b. tcp网络库产生服务端对象,通过启动接口,开启服务端监听。进一步&…...

C语言进阶之文件操作
一、什么是文件 磁盘上的文件是文件。 但是在程序设计中,我们一般谈的文件有两种:程序文件、数据文件(从文件功能的角度来分类的)。 1)程序文件 包括源程序文件(后缀为.c),目标文件ÿ…...
互联网摸鱼日报(2024-02-02)
互联网摸鱼日报(2024-02-02) 博客园新闻 马斯克:Neuralink已探测到神经信号 Linus新年首骂:和谷歌大佬大吵4天,“你的代码就是垃圾” 从零手搓MoE大模型,大神级教程来了 无人出租车深圳中心区收费载客,硅谷同款&am…...
2024美赛C题:网球中的动量
解析:https://mp.weixin.qq.com/s/TOPvJ-5pjgsvjvYXt6E9Fg 2023年温网男篮决赛,20岁的西班牙新星卡洛斯阿尔卡拉斯 击败了36岁的诺瓦克德约科维奇。这场失利是德约科维奇自2013年以来首次在温布尔登输球 并结束了大满贯历史上最伟大的球员之一的非凡表现…...

20.HarmonyOS App(JAVA)表格布局Layout使用方法
ability_main.xml,实现计算器键盘按钮 <?xml version"1.0" encoding"utf-8"?> <TableLayoutxmlns:ohos"http://schemas.huawei.com/res/ohos"ohos:height"match_parent"ohos:width"match_parent"oho…...

Android使用ScrollView导致鼠标点击事件无效
平台 测试平台: RK3288 Android8.1RK3588 Android 12 问题 首先, 这个问题的前提是, 使用的输入设备是**鼠标**, 普通的触摸屏并不会出现这个问题. 大致的流程是APP的UI布局中采用ScrollView作为根容器, 之后添加各类子控件, 在一起准备就绪后, 使用鼠标进行功能测试, 出现…...

【开源】SpringBoot框架开发大学计算机课程管理平台
目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块2.1 实验课程档案模块2.2 实验资源模块2.3 学生实验模块 三、系统设计3.1 用例设计3.2 数据库设计3.2.1 实验课程档案表3.2.2 实验资源表3.2.3 学生实验表 四、系统展示五、核心代码5.1 一键生成实验5.2 提交实验5.3 批阅实…...

Mac Shift切换输入法 - shift切换中英文 - Karabiner-Elements
转载自 https://www.jianshu.com/p/677ae7d9beda...

智慧港口:山海鲸可视化引领未来
随着疫情的结束,全球贸易迎来新的春天,港口作为物流枢纽的地位日益凸显。然而,传统港口的运营和管理方式已无法满足现代物流的需求。为了提高港口运营效率,降低成本,智慧港口的概念应运而生。作为山海鲸可视化的开发者…...

Linux 网络编程 + 笔记
协议:一组规则 分层模型结构: OSI七层模型:物理层、数据链路层、网络层、传输层、会话层、表示层、应用层TCP/IP 4层模型:链路层/网络接口层、网络层、传输层、应用层 应用层:http、ftp、nfs、ssh、telnet、传输层&am…...
顺序表应用3:元素位置互换之移位算法
顺序表应用3:元素位置互换之移位算法 Description 一个长度为len(1<len<1000000)的顺序表,数据元素的类型为整型,将该表分成两半,前一半有m个元素,后一半有len-m个元素(1<m<len),借…...
在软件开发中正确使用MySQL日期时间类型的深度解析
在日常软件开发场景中,时间信息的存储是底层且核心的需求。从金融交易的精确记账时间、用户操作的行为日志,到供应链系统的物流节点时间戳,时间数据的准确性直接决定业务逻辑的可靠性。MySQL作为主流关系型数据库,其日期时间类型的…...
Leetcode 3577. Count the Number of Computer Unlocking Permutations
Leetcode 3577. Count the Number of Computer Unlocking Permutations 1. 解题思路2. 代码实现 题目链接:3577. Count the Number of Computer Unlocking Permutations 1. 解题思路 这一题其实就是一个脑筋急转弯,要想要能够将所有的电脑解锁&#x…...

MMaDA: Multimodal Large Diffusion Language Models
CODE : https://github.com/Gen-Verse/MMaDA Abstract 我们介绍了一种新型的多模态扩散基础模型MMaDA,它被设计用于在文本推理、多模态理解和文本到图像生成等不同领域实现卓越的性能。该方法的特点是三个关键创新:(i) MMaDA采用统一的扩散架构…...

OPenCV CUDA模块图像处理-----对图像执行 均值漂移滤波(Mean Shift Filtering)函数meanShiftFiltering()
操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 在 GPU 上对图像执行 均值漂移滤波(Mean Shift Filtering),用于图像分割或平滑处理。 该函数将输入图像中的…...
AGain DB和倍数增益的关系
我在设置一款索尼CMOS芯片时,Again增益0db变化为6DB,画面的变化只有2倍DN的增益,比如10变为20。 这与dB和线性增益的关系以及传感器处理流程有关。以下是具体原因分析: 1. dB与线性增益的换算关系 6dB对应的理论线性增益应为&…...

人机融合智能 | “人智交互”跨学科新领域
本文系统地提出基于“以人为中心AI(HCAI)”理念的人-人工智能交互(人智交互)这一跨学科新领域及框架,定义人智交互领域的理念、基本理论和关键问题、方法、开发流程和参与团队等,阐述提出人智交互新领域的意义。然后,提出人智交互研究的三种新范式取向以及它们的意义。最后,总结…...

处理vxe-table 表尾数据是单独一个接口,表格tableData数据更新后,需要点击两下,表尾才是正确的
修改bug思路: 分别把 tabledata 和 表尾相关数据 console.log() 发现 更新数据先后顺序不对 settimeout延迟查询表格接口 ——测试可行 升级↑:async await 等接口返回后再开始下一个接口查询 ________________________________________________________…...
关于uniapp展示PDF的解决方案
在 UniApp 的 H5 环境中使用 pdf-vue3 组件可以实现完整的 PDF 预览功能。以下是详细实现步骤和注意事项: 一、安装依赖 安装 pdf-vue3 和 PDF.js 核心库: npm install pdf-vue3 pdfjs-dist二、基本使用示例 <template><view class"con…...
掌握 HTTP 请求:理解 cURL GET 语法
cURL 是一个强大的命令行工具,用于发送 HTTP 请求和与 Web 服务器交互。在 Web 开发和测试中,cURL 经常用于发送 GET 请求来获取服务器资源。本文将详细介绍 cURL GET 请求的语法和使用方法。 一、cURL 基本概念 cURL 是 "Client URL" 的缩写…...
云原生周刊:k0s 成为 CNCF 沙箱项目
开源项目推荐 HAMi HAMi(原名 k8s‑vGPU‑scheduler)是一款 CNCF Sandbox 级别的开源 K8s 中间件,通过虚拟化 GPU/NPU 等异构设备并支持内存、计算核心时间片隔离及共享调度,为容器提供统一接口,实现细粒度资源配额…...