2023年最新智能优化算法之——IBI逻辑优化算法(IBL),附MATLAB代码

news2024/11/18 8:36:32

今天给大家带来一个有意思的智能优化算法,IBL算法。

先说效果:在CEC2005函数集测试,基本上毫无压力,把把都能预测的很准确,而且速度极快。大家可以自行尝试哈。

为啥说这个算法有意思呢,大家看IBL的英文全称是:Incomprehensible but Intelligible-in-time logics,我在这里给大家直译成中文就是:难以理解但又能及时理解的逻辑。可能我翻译的不太准确啊,但是我又结合他的摘要,大概的理解就是:人类的思维不像计算机那样,人类的思维是可以随着时间、事物的变化而变化的,在之前看起来毫无逻辑的事情,在经过人类学习一段时间后,这个事情就会变得很有逻辑了。不得不说老外这个思维是真的奇特哈,根据这个也能提出一个新算法,而且效果还很不错。大家感兴趣的可以去看看原文。

参考文献:

Mirrashid, M.; Naderpour, H. Incomprehensible but Intelligible-in-time logics: Theory and optimization algorithm. Knowl.-Based Syst. 2023, 264, 110305. doi点击链接跳转原文 

废话不多说,依旧是2005函数集的测试,附上2005函数集的理论范围:

 大部分优化函数在F8上的表现是不太好的,也就寻优到-4000多,咱们试一下这个IBL:

WOW,直接就干到-9700多去了,看样子不错呀,回头了我会将2023年最新的算法做一个对比,决一雌雄一下。

再试一个F14的,理论值是1,能找到0.998004,还阔以

 

 最后再来一个:

上核心代码!

function [Bests_Results,n_it_phase1,n_it_phase2,n_it_phase3,costs1,costs2,costs3] = ILA (CostFunction,Vmin,Vmax,nV,nNL,nModel,nIt,mIt_Phase1,mIt_Phase2,Bmin,Bmax,nRep,nIt_classification)

%% Initialization
Empty.NL = [];                                % Current NL
Empty.NLprevious = [];                        % Previous NL
Empty.Cost = inf;
Empty1.NL = [];                               % Current NL
Empty1.Average = [];                          % Previous NL
Empty1.Cost = inf;
Empty1.Members = [];
Experts = repmat (Empty, nNL, 1);             % Experts
n_it_phase1 = round(nIt*mIt_Phase1);          % Number of iterations in phase 1
n_it_phase2 = round(nIt*mIt_Phase2);          % Number of iterations in phase 2
n_it_phase3 = nIt-n_it_phase1-n_it_phase2;    % Number of iterations in phase 3
costs1 = zeros(n_it_phase1,1);                        % Costs of the phase 1
costs2 = zeros(n_it_phase2,1);                        % Costs of the phase 2
costs3 = zeros(n_it_phase3,1);                        % Costs of the phase 3
n_Groups = zeros(nModel,1);
Em.NL = [];
Em1.NL = [];
Em1.Cost = inf;
Expert_IbI = repmat (Em1, 1, 1);            % The best solution of the current generation
Logic = repmat (Em1, 1, 1);                 % The best solution before the current generation
Expert_new = repmat (Em1, 1, 1);
K0 = repmat (Em, nNL, 1);                   % Knowledge 0
K1 = repmat (Em, nNL, 1);                   % Knowledge 1
Expert_new.NL = [];
Expert_new.Cost = inf;
Knowledge_Phase1 = K0;
Knowledge_Phase2 = K0;
Knowledge_Phase3 = K0;
GroupNumber = ones(nNL,1);
Em2.NL = [];
Em2.Cost = inf;
Bests_Results = repmat (Em2, nIt, 1);

if length(Vmin) ~= (nV)
    Vmin=Vmin.*ones(1,nV);
    Vmax=Vmax.*ones(1,nV);
end

for i = 1:nNL
    Experts(i).NL = unifrnd(Vmin,Vmax,1,nV);
    Experts(i).NLprevious = unifrnd(Vmin,Vmax,1,nV);
    Experts(i).Cost = CostFunction(Experts(i).NL);
end

% Extract the Logic (Best NL in the previous solutions)
for i = 1:nNL
    if CostFunction(Experts(i).NLprevious) <= Logic.Cost
        Logic.Cost = CostFunction(Experts(i).NLprevious); % The best solution of before the current generation
        Logic.NL = Experts(i).NLprevious;
    end
    if Experts(i).Cost <= Expert_IbI.Cost
        Expert_IbI.Cost = Experts(i).Cost;    % The best solution of the current generation
        Expert_IbI.NL = Experts(i).NL;
    end
end

n_t = zeros(nModel,1);
nt = round((n_it_phase1)/nModel);
for m = 1:nModel
    n_t(m,1) = nt;
end
n_t(nModel,1) = (n_it_phase1)-(nModel-1)*nt;

for m = 1:nModel
    n_Groups(m,1) = randi(round(nNL/2));     % Number of workgropus in each model
end

%% Phase 0: Grouping (Clustering)

for m = 1:nModel
    
    % Clustering
    MAT = zeros(nNL,nV);
    for i = 1:nNL
        MAT(i,:) = Experts(i).NL;
    end
    opts = statset('MaxIter',nIt_classification);
    lastwarn('Success');
    GroupNumber0 = GroupNumber;
    GroupNumber = kmeans(MAT,n_Groups(m,1),'Distance','sqeuclidean','Replicates',nRep,'Options',opts);
    [warningMessage, warningMessageID] = lastwarn;
    if contains(warningMessage, 'Failed to converge')
        warnStruct = warning('off');
        GroupNumber = GroupNumber0;
        if m ==1
            n_Groups(m,1) = 1;
        else
            n_Groups(m,1) = n_Groups(m-1,1);
        end
    end
    Experts_Groups = repmat (Empty1, n_Groups(m,1),1);
    n_members = zeros(n_Groups(m,1),1);
    
    for c = 1:n_Groups(m,1)
        nn=0;
        for i = 1:nNL
            if GroupNumber(i,1) == c
                nn = nn+1;
            end
        end
        n_members(c,1) = nn;
        Experts_Groups(c).Members = repmat (Em, n_members(c,1), 1);
    end
    
    %% Phase 1: Workgropus
    for it_phase1 = 1:n_t(m,1)
        
        for c = 1:n_Groups(m,1)
            SUM = 0;
            num = 0;
            for i = 1:nNL
                if GroupNumber(i,1) == c
                    num = num+1;
                    SUM = Experts(i).NL + SUM;
                    Experts_Groups(c).Members(num).NL = Experts(i).NL;
                    if Experts(i).Cost <= Experts_Groups(c).Cost
                        Experts_Groups(c).NL = Experts(i).NL;
                        Experts_Groups(c).Cost = Experts(i).Cost;
                    end
                end
            end
            Experts_Groups(c).Average = SUM./n_members(c,1);
        end
        
        % Calculate the ratios
        D = zeros(nNL,1);
        P = zeros(nNL,1);
        C = zeros(nNL,1);
        for i = 1:nNL
            C(i,1) = sqrt(sum((Experts(i).NL-Logic.NL).^2));
            D(i,1) = sqrt(sum((Experts(i).NL-Experts(i).NLprevious).^2));
            P(i,1) = sqrt(sum((Experts(i).NL-Experts_Groups(GroupNumber(i,1)).NL).^2));
        end
        min_D = min(D); max_D = max(D);
        min_P = min(P); max_P = max(P);
        min_C = min(C); max_C = max(C);
        
        Rc = (C-min_C)./(max_C-min_C);
        Rp = (P-min_P)./(max_P-min_P);
        RD = (D-min_D)./(max_D-min_D);
        Bc = Bmin + (Bmax-Bmin)*rand();
        Bp = Bmin + (Bmax-Bmin)*rand();
        BD = Bmin + (Bmax-Bmin)*rand();
        
        for i = 1:nNL
            B = Bmin + (Bmax-Bmin)*rand();
            if (Rc(i,1) <= Bc) && (Rp(i,1) <= Bp)
                random_member = randi (n_members(GroupNumber(i,1),1));
                K0(i).NL = Rp(i,1).*(Experts(i).NL + Experts_Groups(GroupNumber(i,1)).Members(random_member).NL)./2;
            elseif (Rc(i,1) <= Bc) && (Rp(i,1) > Bp)
                K0(i).NL = Rp(i,1).*(Experts(i).NL + Experts_Groups(GroupNumber(i,1)).Average)./2;
            elseif (Rc(i,1) > Bc) && (Rp(i,1) <= Bp)
                random_member = randi (n_members(GroupNumber(i,1),1));
                K0(i).NL = Rp(i,1).*(Experts_Groups(GroupNumber(i,1)).NL + Experts_Groups(GroupNumber(i,1)).Members(random_member).NL)./2;
            elseif (Rc(i,1) > Bc) && (Rp(i,1) > Bp)
                K0(i).NL = Rp(i,1).*(Experts_Groups(GroupNumber(i,1)).NL + Experts_Groups(GroupNumber(i,1)).Average)./2;
            end
            
            if RD(i,1)<= BD
                K1(i).NL = (rand()).*(Experts_Groups(GroupNumber(i,1)).Average);
            else
                K1(i).NL = (rand()).*(unifrnd(Vmin,Vmax,1,nV));
            end
            
            Knowledge_Phase1(i).NL = abs(K0(i).NL + K1(i).NL)./2;
            
            % Update the NL
            alpha1 = -1.5+3.*rand(1,nV);
            Expert_new.NL = Experts(i).NL + alpha1.*(Knowledge_Phase1(i).NL);
            Expert_new.NL = max(Expert_new.NL, Vmin);
            Expert_new.NL = min(Expert_new.NL, Vmax);
            E1 = Experts(i).NL;
            Expert_new.Cost = CostFunction(Expert_new.NL);
            
            COEF = -1.5+3*rand();
            K = rand().*Experts_Groups(GroupNumber(i,1)).NL;
            NEW.NL = COEF.*(Expert_new.NL) + K;
            NEW.NL = max(NEW.NL, Vmin);
            NEW.NL = min(NEW.NL, Vmax);
            NEW.Cost = CostFunction(NEW.NL);
            if NEW.Cost < Expert_new.Cost
                Expert_new = NEW;
            end
            
            
            if Expert_new.Cost < Experts(i).Cost
                Experts(i).NL = Expert_new.NL;
                Experts(i).Cost = Expert_new.Cost;
            end
            if Experts(i).NL ~= E1
                Experts(i).NLprevious = E1;
            end
            E1 = Expert_IbI.NL;
            if Experts(i).Cost < Expert_IbI.Cost
                Expert_IbI.Cost = Experts(i).Cost;
                Expert_IbI.NL = Experts(i).NL;
            end
            if Expert_IbI.NL ~= E1
                Logic.NL = E1;
            end
        end
        
        costs1((m-1)*(n_t(1,1))+it_phase1,1) = Expert_IbI.Cost;
        Bests_Results((m-1)*(n_t(1,1))+it_phase1).NL = Expert_IbI.NL;
        Bests_Results((m-1)*(n_t(1,1))+it_phase1).Cost = Expert_IbI.Cost;
        
    end
end
NUM = n_it_phase1;
for it_phase2 = 1:n_it_phase2
NUM = NUM+1;    
    % Calculate the ratios
    for i = 1:nNL
        C(i,1) = sqrt(sum((Experts(i).NL-Logic.NL).^2));
        D(i,1) = sqrt(sum((Experts(i).NL-Experts(i).NLprevious).^2));
        P(i,1) = sqrt(sum((Experts(i).NL-Expert_IbI.NL).^2));
    end
    min_D = min(D); max_D = max(D);
    min_P = min(P); max_P = max(P);
    min_C = min(C); max_C = max(C);
    
    Rc = (C-min_C)./(max_C-min_C);
    Rp = (P-min_P)./(max_P-min_P);
    RD = (D-min_D)./(max_D-min_D);
    Bc = Bmin + (Bmax-Bmin)*rand();
    Bp = Bmin + (Bmax-Bmin)*rand();
    BD = Bmin + (Bmax-Bmin)*rand();
    
    for i = 1:nNL
        B = Bmin + (Bmax-Bmin)*rand();
        if (Rc(i,1) <= Bc) && (Rp(i,1) <= Bp)
            random_member = randi (nNL);
            K0(i).NL = Rp(i,1).*(Experts(i).NL + Experts(random_member).NL)./2;
        elseif (Rc(i,1) <= Bc) && (Rp(i,1) > Bp)
            SUM = 0;
            for ii = 1:nNL
                SUM = Experts(ii).NL + SUM;
            end
            Average = SUM./nNL;
            K0(i).NL = Rp(i,1).*(Experts(i).NL + Average)./2;
        elseif (Rc(i,1) > Bc) && (Rp(i,1) <= Bp)
            random_member = randi (nNL);
            K0(i).NL = Rp(i,1).*(Expert_IbI.NL + Experts(random_member).NL)./2;
        elseif (Rc(i,1) > Bc) && (Rp(i,1) > Bp)
            SUM = 0;
            for ii = 1:nNL
                SUM = Experts(ii).NL + SUM;
            end
            Average = SUM./nNL;
            K0(i).NL = Rp(i,1).*(Expert_IbI.NL + Average)./2;
        end
        
        if RD(i,1)<= BD
            SUM = 0;
            for ii = 1:nNL
                SUM = Experts(ii).NL + SUM;
            end
            Average = SUM./nNL;
            K1(i).NL = (rand()).*(Average);
        else
            K1(i).NL = (rand()).*(unifrnd(Vmin,Vmax,1,nV));
        end
        
        % Update the NL
        Knowledge_Phase2(i).NL = abs(K0(i).NL + K1(i).NL)./2;
        alpha2 = -0.75+1.5.*rand(1,nV);
        Expert_new.NL = Experts(i).NL + alpha2.*(Knowledge_Phase2(i).NL);
        Expert_new.NL = max(Expert_new.NL, Vmin);
        Expert_new.NL = min(Expert_new.NL, Vmax);
        E1 = Experts(i).NL;
        Expert_new.Cost = CostFunction(Expert_new.NL);
        
        COEF = -0.75+1.5*rand();
        K = rand().*(Expert_IbI.NL);
        NEW.NL = COEF.*(Expert_new.NL) + K;
        NEW.NL = max(NEW.NL, Vmin);
        NEW.NL = min(NEW.NL, Vmax);
        NEW.Cost = CostFunction(NEW.NL);
        
        if NEW.Cost < Expert_new.Cost
            Expert_new = NEW;
        end
        
        if Expert_new.Cost < Experts(i).Cost
            Experts(i).NL = Expert_new.NL;
            Experts(i).Cost = Expert_new.Cost;
        end
        if Experts(i).NL ~= E1
            Experts(i).NLprevious = E1;
        end
        E1 = Expert_IbI.NL;
        if Experts(i).Cost < Expert_IbI.Cost
            Expert_IbI.Cost = Experts(i).Cost;
            Expert_IbI.NL = Experts(i).NL;
        end
        if Expert_IbI.NL ~= E1
            Logic.NL = E1;
        end
    end
    
    costs2(it_phase2,1) = Expert_IbI.Cost;
    Bests_Results(NUM).NL = Expert_IbI.NL;
    Bests_Results(NUM).Cost = Expert_IbI.Cost;
end

%% Phase 3: IbI Logic Search

for it_phase3 = 1:n_it_phase3
NUM = NUM+1;    
    for i = 1:nNL
        SUM = 0;
        for ii = 1:nNL
            SUM = SUM + Experts(ii).NL;
        end
        Average = SUM./nNL;
        
        factor = randi(2);
        if factor == 1
            Knowledge_Phase3(i).NL = abs(Average - Experts(randi(nNL)).NL);
        else
            Knowledge_Phase3(i).NL = abs(Average - Expert_IbI.NL);
        end
        alpha3 = -0.25+0.5.*rand(1,nV);
        Expert_new.NL = Experts(i).NL + alpha3.*(Knowledge_Phase3(i).NL);
        
        Expert_new.NL = max(Expert_new.NL, Vmin);
        Expert_new.NL = min(Expert_new.NL, Vmax);
        Expert_new.Cost = CostFunction(Expert_new.NL);
        
        COEF = -0.25+0.5*rand();
        K = rand().*(Expert_IbI.NL);
        NEW.NL = COEF.*(Expert_new.NL) + K;
        NEW.NL = max(NEW.NL, Vmin);
        NEW.NL = min(NEW.NL, Vmax);
        NEW.Cost = CostFunction(NEW.NL);
        if NEW.Cost < Expert_new.Cost
            Expert_new = NEW;
        end
        
        if Expert_new.Cost < Experts(i).Cost
            Experts(i).NL = Expert_new.NL;
            Experts(i).Cost = Expert_new.Cost;
        end
        if Experts(i).Cost < Expert_IbI.Cost
            Expert_IbI.Cost = Experts(i).Cost;
            Expert_IbI.NL = Experts(i).NL;
        end
    end
    costs3(it_phase3,1) = Expert_IbI.Cost;
    Bests_Results(NUM).NL = Expert_IbI.NL;
    Bests_Results(NUM).Cost = Expert_IbI.Cost;
end

%% Extract the results
Expert_IbI.Cost = CostFunction(Expert_IbI.NL);

end

 下方小卡片回复关键词:2023,免费获取2023年智能优化算法合集matlab代码。

后续会继续发布2023年其他最新优化算法,敬请关注。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/670353.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

史上最大图灵测试实验完成150万人类参与1000万次对话,判断对面是人还是AI

本文 介绍 了AI 21实验室推出了一个好玩的社交图灵游戏——「人类还是机器人&#xff1f;」 【导读】这个「人类还是AI?」的游戏一经推出&#xff0c;就被广大网友们玩疯了&#xff01;如今全世界已有150万人参与&#xff0c;网友们大方分享自己鉴AI的秘诀。 历上规模最大的…

解决:torch.cuda.is_available()一直返回False,显卡是NVIDA GeForce MX250

目录 1. 背景2. 发现问题根源3. 解决问题 1. 背景 AI时代了&#xff0c;之前一直不怎么用到的小米笔记本Pro的 NVIDA GeForce MX250独显&#xff0c;就想着让它发挥余热&#xff0c;免得买了这么多年&#xff0c;一直闲置&#xff0c;浪费。 无脑按照chatGPT给的例子&#x…

为什么Django要引入CSRF令牌?答:主要是为了防止跨站伪造请求攻击,那么什么是跨站伪造请求攻击呢?

“CSRF”的英文全称是&#xff1a;“Cross-Site Request Forgery”&#xff0c;翻译过来就是&#xff1a;“跨站请求伪造”。 那么什么是跨站伪造请求攻击呢&#xff1f;看下面这张图就够了。 注意&#xff1a;看上面这张图请按图中标注的1到6的顺序阅读。 Django通过引入CS…

一文详解!接口自动化的关键思路和解决方案

目录 引言 正文 一.接口传参 二. 外部数据源 三. 测试断言 四. 环境切换 五. 批量测试 总结 一.接口自动化的工具思维和测试思维 二.贯穿整个接口自动化项目的三个基本思路&#xff1a; 引言 与UI相比&#xff0c;接口一旦研发完成&#xff0c;通常变更或重构的频率…

使用nps搭建内网穿透服务

使用nps搭建内网穿透服务 如何使用nps搭建内网穿透服务前提准备操作流程配置服务端配置客户端 P2P模式&#xff0c;大流量低延迟 正式开始之前呢&#xff0c;先介绍一下什么是内网穿透&#xff1a; 内网穿透&#xff08;NAT穿透&#xff09;是一种技术&#xff0c;它允许您通过…

软件测试简历编写以及软件测试面试题大全

目录 前言&#xff1a; 一、简历重要性以及编写原则 二、简历模板 三、简历包装 四、互联网公司常用接口测试面试题 五、互联网公司常面自动化测试面试题 前言&#xff1a; 软件测试是软件开发过程中必不可少的一环&#xff0c;也是一个不断发展和变化的领域。在寻找软件测试职…

广角积分球均匀光源

现阶段&#xff0c;摄影测量技术已涉及多行多业&#xff0c;其在交通、考古以及景物三维重建中的应用尤为显著&#xff0c;但是普通相机取景范围有限&#xff0c;不能全面捕获整个空间信息&#xff0c;因此一种新型相机--全景相机逐步被应用到实际当中。80年代初&#xff0c;国…

场景解析丨活用PDCA循环,让你的项目管理更高效!

聚焦制造业共性项目管控难题 结合装备制造行业特性&#xff0c; 从PDCA循环角度&#xff0c; 通过痛点、解决方案、实际案例的剖析&#xff0c; 看企业如何做好项目管理。 本期干货内容分享 1. 计划的可执行性 计划要达成共识&#xff0c;打造合理三级计划体系 2. 执行的…

Android预装apk

预装APK到system/app目录 注&#xff1a;APK名字不能含有中文、空格等特殊字符。 在 驱动路径/android/vendor/aw/public/prebuild/apk 创建一个目录存放对应的APK将所需预装的APK放入该目录中在该目录中创建 Android.mk文件&#xff0c;并编译 # 文件名 LOCAL_PATH : $(call…

supervisor简介

1、概述 supervisor是一个用python语言编写的进程管理工具&#xff0c;它可以很方便的监听、启动、停止、重启一个或多个进程。当一个进程意外被杀死&#xff0c;supervisor监听到进程死后&#xff0c;可以很方便的让进程自动恢复&#xff0c;不再需要程序员或系统管理员自己编…

回调函数(callback)是什么?一文理解回调函数(callback)

这里写目录标题 一、什么是回调函数1.1、回调函数的定义和基本概念1.2、回调函数的作用和使用场景 二、回调函数的实现方法2.1、函数指针2.2、函数对象/functor2.3、匿名函数/lambda表达式 三、回调函数的应用举例四、回调函数的优缺点五、回调函数与其他编程概念的关系5.1、回…

性能提升30%!袋鼠云数栈基于 Apache Hudi 的性能优化实战解析

Apache Hudi 是一款开源的数据湖解决方案&#xff0c;它能够帮助企业更好地管理和分析海量数据&#xff0c;支持高效的数据更新和查询。并提供多种数据压缩和存储格式以及索引功能&#xff0c;从而为企业数据仓库实践提供更加灵活和高效的数据处理方式。 在金融领域&#xff0…

Mysql高阶语句(一)

Mysql高阶语句&#xff08;一&#xff09; 一、MySQL高级进阶SQL 语句1、SELECT斜体样式2、DISTINCT3、WHERE4、AND、OR5、IN6、BETWEEN7、通配符、LIKE8、ORDER BY9、| | 连接符10、GROUP BY11、HAVING 二、函数1、数学函数2、聚合函数3、字符串函数4、日期时间函数 一、MySQL…

短视频矩阵源码

短视频矩阵源码的开发部署其实并不难&#xff0c;主要依托于抖音平台各种开放权限进行研发&#xff0c;市面上常见的源码功能构建也是大同小异&#xff0c;主要处理还在于细节及产品优化上。 如&#xff1a; 1. 视频制作板块&#xff0c;文字转语音功能&#xff0c;当然各种云&…

【人工智能技术专题】「入门到精通系列教程」零基础带你进军人工智能领域的全流程技术体系和实战指南(NLP、GPT-Pre-Training和数据标注都是什么)

零基础带你进军人工智能领域的全流程技术体系和实战指南&#xff08;NLP、GPT-Pre-Training和数据标注都是什么&#xff09; 前言专栏介绍专栏说明学习大纲前提条件面向读者学习目标核心内容NLP自然话言理解指的是什么定义概念涉及到的领域技术与应用关系 重要性语言结构剖析分…

AI已在职场大规模应用,求职者被要求熟练使用ChatGPT

“能熟练使用ChatGPT、Midjourney等AI软件生产高质量文图内容完成辅助工作。”当这条岗位要求悄然出现在今夏的应聘季&#xff0c;时光仿佛被拉回到数十年前&#xff0c;那个要求“会使用Word、Excel等计算机软件”的求职年代。 彼时&#xff0c;因为计算机的逐渐普及&#xf…

Linux服务器Jenkins部署打包Android

程序猿日常 记Jenkins部署打包Android介绍 Jenkins 自动打包 Android 应用&#xff0c;后面介绍打包Flutter应用&#xff0c;然后介绍打包Android原生Flutter混合应用 准备工作 1.jenkins服务器地址 账户密码 2.项目git地址 访问账号密码 3.ssh 链接服务器账户密码 安装An…

【Java高级语法】(十)面向对象:掀开Java 的面向对象盖章时代,一起来发现OOP的有趣编程秘密!~

Java高级语法详解之面向对象 1️⃣ 类和对象2️⃣ 三大特性2.1 封装(Encapsulation)2.2 继承(Inheritance)2.3 多态(Polymorphism) 3️⃣ 面向对象编程&#xff08;OOP&#xff09;和面向过程编程&#xff08;PP&#xff09;4️⃣ 方法重载和方法重写&#x1f50d; 小结&#x…

MySQL高级SQL语句操作一

MySQL高级SQL语句操作 一、准备环境二、常用操作三、通配符与like1、通配符2、like 四、ORDER BY五、函数1、数学函数2、聚合函数3、字符串函数 六、GROUP BY七、HAVING八、别名&#xff08;字段別名 、表格別名&#xff09;九、子查询&#xff08;连接表格&#xff09; 一、准…

记录--前端实现文件预览(pdf、excel、word、图片)

这里给大家分享我在网上总结出来的一些知识&#xff0c;希望对大家有所帮助 前端实现文件预览功能 需求&#xff1a;实现一个在线预览pdf、excel、word、图片等文件的功能。 介绍&#xff1a;支持pdf、xlsx、docx、jpg、png、jpeg。 以下使用Vue3代码实现所有功能&#xff0c;建…