ICode9

精准搜索请尝试: 精确搜索
  • Greedy algorithm2022-02-22 19:33:25

    贪心算法的基本思想: 贪心总是作出当前看来最好的选择,也就是说贪心算法并不从整体最优考虑,它所作出的选择只是在某种意义上的局部最优选择。 贪心算法的基本要素: 1.贪心选择性质: 所谓贪心选择性质是指求问题的整体最优解可以通过一系列局部最优的选择,即贪心选择来达到。这是贪

  • 图计算 on nLive:Nebula 的图计算实践2022-02-18 11:04:20

    本文首发于 Nebula Graph Community 公众号 在 #图计算 on nLive# 直播活动中,来自 Nebula 研发团队的 nebula-plato 维护者郝彤和 nebula-algorithm 维护者 Nicole 分别同大家分享了他她眼中的图计算。 嘉宾们 王昌圆:论坛 ID:Nicole,nebula-algorithm 维护者; 郝彤:论坛 ID:caton-h

  • ShardingSphere 4.0.0 RC-1 版本个人心得2022-02-16 14:35:28

    Standard策略以下报错: Cannot find range sharding strategy in sharding rule. 原因:   配置文件属性名写法 y_order_detail_item:  actual-data-nodes: ds0.y_order_detail_item_$->{2019..2022}    table-strategy:      standard:         shardingColumn

  • Data Structures and Algorithm Analysis in Java-Chapter 2(算法分析)2022-02-14 23:34:52

    算法:算法是为求解一个问题需要遵循的、被清楚指定的简单指令的集合。 一、数学基础 分析算法的资源消耗。 定义1:如果存在正常数c,正常数n0: T(N)的增长率小于或等于f(N)的增长率 定义2:如果存在正常数c,正常数n0: T(N)的增长率大于或等于g(N)的增长率 定义3: 当且仅当 T(N)的增长率等

  • LeetCode Algorithm 116. 填充每个节点的下一个右侧节点指针2022-02-10 21:03:57

    116. 填充每个节点的下一个右侧节点指针 Ideas 通过示例图可以很明显的看出来,next指针指向每一层的下一个节点,所以肯定跟二叉树的层序遍历有关。 然后,,,就没有然后了,层序遍历稍微改一下逻辑就可以了。 Code Python class Solution: def connect(self, root: 'Optional[Node]')

  • 基于爬行动物搜索RSA优化LSTM的时间序列预测2022-02-08 15:33:59

       0 引言         基于LSTM进行时间序列预测方法简单有效。LSTM的出现为时间序列预测提供了一个新的研究方向。然而,与大部分网络模型一样,LSTM效果受其超参数设置的影响。为此,本文采用爬行动物搜索Reptile Search Algorithm (RSA)优化LSTM网络超参数,建立RSA-LSTM模型 ,

  • [STL]algorithm头文件下的max(), min(), abs(),swap(),reverse()函数2022-02-07 13:00:10

    max(x, y)返回x与y的最大值,min(x, y)返回x与y的最小值。如果想比较三个数,可以写成max/min(x, max/min(y, z))。 abs(x)返回x的绝对值,这里的x需要是整数,浮点型的绝对值需要使用math头文件下的fabs()。 示例如下: #include <iostream> #include <algorithm> using namespace std; i

  • java设计模式之组合模式2022-02-01 19:33:17

    设计模式种的组合模式不是类与类之间那个组合。 而是只业务逻辑种的那种树形数据结构,比如文件目录、公司的组织架构等。 这种模式在实际的项目开发中并不那么常用。但是,一旦数据满足树形结构,应用这种模式就能发挥很大的作用,能让代码变得非常简洁。 我们以文件目录为例,通过实现一个

  • C++头文件 <algorithm>的 常用函数(详细)2022-01-30 16:33:09

    1.sort( ) 用于排序,默认从小到大排。 2.max( ):两数最大 3.min():两数最小 4.abs():求一个数的绝对值   (  与<cmath>中的fbs(),不同,因abs()只用于整型变量 ) 5.swap(): 交换 x 与 y 的值 6.reverse(): 反转数组函数   (1)翻转整个数组   例: #include <iostream> #include <alg

  • 神奇的 algorithm2022-01-29 11:03:41

    next_permutation 这个函数每运行一次就可以把数组排成下一个字典序数列;与之对应的是prev_permutation,即排出上一个字典序 很容易得出总排列数为: \(A_{n}^{n}=n!\) #include<iostream> #include<algorithm> using namespace std; int a[10]; int sum = 1; int main() { int n;

  • NLMeans-A non-local algorithm for image denoising算法分析2022-01-29 00:01:45

    论文名称:A non-local algorithm for image denoising 论文下载:https://www.researchgate.net/profile/Bartomeu-Coll/publication/4156453_A_non-local_algorithm_for_image_denoising/links/0f317534c2cac194e4000000/A-non-local-algorithm-for-image-denoising.pdfhttps://ww

  • Smoothed Z-score Algorithm 数据异常点算法2022-01-24 16:05:45

    Smoothed Z-score Algorithm 简介 时序异常检测,可以检测实时时间序列数据中的峰值信号并且平滑数据数据的一种算法,说人话就是找出数据的异常突变点并且同时平滑曲线,线性O(n)复杂度 原理 利用数据均值(mean)和标准差(std)来判断数据是否为异常值 算法具体实现:使用一个长度为lag的滑

  • Github项目分享——hello-algorithm2022-01-20 13:33:05

    hello-algorithm 项目地址 https://github.com/geekxh/hello-algorithm 项目介绍 针对小白的算法训练 | 包括四部分:①.算法基础 ②.力扣图解 ③.大厂面经 ④.CS_汇总 | 附:1、千本开源电子书 2、百张技术思维导图 4ei-1642656359670)]

  • 计算机图形学 - 实验: Bresenham’s Line Algorithm2022-01-10 15:02:57

    本博客基于课程"计算机图形学",教材使用为计算机图形学(第4版) [Computer Graphics with OpenGL, Fourth Edition],部分代码模板便来自于此教材,并且有所改动。大部分内容来自本人实验报告,有错误是难以避免的,若有表述错误或bug欢迎指出。 实验思路 此代码通过一些判断将会出现的需要进

  • 【鼠群优化算法】基于鼠群优化算法求解单目标优化问题(Rat Swarm Optimizer,RSO)matlab代码2022-01-09 17:03:00

    1 简介 This paper presents a novel bio-inspired optimization algorithm called Rat Swarm Optimizer (RSO) for solving the challenging optimization problems. The main inspiration of this optimizer is the chasing and attacking behaviors of rats in nature. This

  • 《Genetic Algorithm Essentials》---遗传算法要点---思维导图---20222022-01-08 20:02:03

    书名:《Genetic Algorithm Essentials》 作者:Oliver Kramer 出版社:Springer 出版时间:2017年

  • 机器学习:维特比算法(Viterbi Algorithm)【场景:HMM模型中的解码问题(求给定观测序列的条件概率P(I|O,λ)最大时的隐藏状态序列)、“篱笆网络”最短/最大路径、分词】【动态规划】2022-01-03 23:58:23

    一、维特比算法(Viterbi Algorithm)讲解方式01:篱笆网络(Lattice)的最短路径问题 已知下图的篱笆网络,每个节点之间的数字表示相邻节点之间的距离,举个例子来说,如果我走,这个距离是。那么如果让你从A走到E,最短路径是哪一条呢? 显然大家都知道,通过穷举的方法是很容易得到最短路径,可是

  • algorithm-visualizer 算法可视化服务器自己搭建2022-01-01 21:01:36

    git clone git@github.com:algorithm-visualizer/algorithm-visualizer yarn&&yarn start git clone git@github.com:algorithm-visualizer/server yarn&&yarn start 第一个程序是webui,程序起来后有页面,没法执行算法动画 第二个程序是算法请求的后台 一般情况下第二个程序起

  • Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyde2021-12-27 16:58:35

    报错: Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyde 解决:包没下载下来 下载替换到自己maven仓库: 仓库位置:…\repository\org\pentaho\pentaho-aggdesigner-algorithm\5.1.5-jhyde jar包下载地址: https://public.nexus.pentaho.org/

  • Algorithm:在排序数组中查找元素的第一个和最后一个位置2021-12-26 12:06:31

    给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。 如果数组中不存在目标值 target,返回 [-1, -1]。 进阶: 你可以设计并实现时间复杂度为 O(log n) 的算法解决此问题吗?   示例 1: 输入:nums = [5,7,7,8,8,10], target =

  • Algorithm-线性dp-leetcode-300. 最长递增子序列2021-12-25 15:02:18

    java import java.util.Arrays; class Solution { public int lengthOfLIS(int[] nums) { int n = nums.length; int[] dp = new int[n]; Arrays.fill(dp, 1);//core for (int i = 1; i < n; i++) { for (int j = 0; j &

  • Algorithm-路径问题-路径个数和路径和2021-12-18 23:37:21

    62. 不同路径 class Solution { public int uniquePaths(int m, int n) { int[][] dp = new int[m][n]; dp[0][0] = 1; for (int i = 1; i < m; i++) { dp[i][0] = 1; } for (int i = 1; i < n; i++) {

  • LeetCode Algorithm 700. 二叉搜索树中的搜索2021-12-18 09:59:25

    700. 二叉搜索树中的搜索 Ideas 通过二叉搜索树的定义,可以容易的写出递归。 Code C++ class Solution { public: TreeNode* searchBST(TreeNode* root, int val) { if (root == NULL) { return NULL; } if (root->val == val) { return root; } else

  • 数据结构参考索引2021-12-15 19:34:17

    Data Structures and Algorithm Design Part Ⅰ 01.Introduction Ⅱ E.Iteration+Recursion: 01E-09 \(T(3)\leqslant3\)

  • LeetCode Algorithm 剑指 Offer 06. 从尾到头打印链表2021-12-14 10:32:31

    剑指 Offer 06. 从尾到头打印链表 Ideas 遍历链表,每次在vector的头部insert当前元素值。 Code C++ class Solution { public: vector<int> reversePrint(ListNode* head) { vector<int> ans; while (head) { ans.insert(ans.begin(), head->val); head = head-

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有