码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
BRIEF 特征描述子
Binary Robust Independent Elementary Features 1. BRIEF的基本原理 我们已经知道SIFT特征采用了128维的特征描述子,由于描述子用的浮点数,所以它将会占用512 bytes的空间。类似地,对于SURF特征,常见的是64维的描述子,它也将占用256...
分类:其他好文   时间:2014-11-07 16:28:38    阅读次数:292
数据结构 之 二叉堆(Heap)
注:本节主要讨论最大堆(最小堆同理)。 一、堆的概念     堆,又称二叉堆。同二叉查找树一样,堆也有两个性质,即结构性和堆序性。     1、结构性质:     堆是一棵被完全填满的二叉树,有可能的例外是在底层,底层上的元素从左到右填入。这样的树称为完全二叉树(complete binary tree)。下图就是这样一个例子。         对于完全二叉树,有这样一些...
分类:其他好文   时间:2014-11-07 13:08:12    阅读次数:266
Gem5下同时模拟多个benchmark
仅模拟一个benchmark的脚本 # Copyright (c) 2006-2008 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are...
分类:其他好文   时间:2014-11-07 11:17:39    阅读次数:385
VxWorks进程间通信2 -- 信号量
VxWorks进程间通信2 -- 信号量一.信号量的概念是实现任务互斥、同步操作的主要机制。VxWorks提供的信号量经过了高度优化,在所有任务间通信机制中,速度最快。二.信号量的分类Binary Semaphores(二进制):完成互斥、同步操作的最佳方式;速度最快,最常用。Mutual Excl...
分类:系统相关   时间:2014-11-07 11:04:12    阅读次数:227
[LeetCode] Binary Tree Preorder Traversal
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:其他好文   时间:2014-11-07 09:43:14    阅读次数:211
Maximum Depth of Binary Tree
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:其他好文   时间:2014-11-07 00:58:54    阅读次数:259
《算法导论》习题2.3-6 改进的InsertSort
InsertSort中有关键的一步是把当前元素A[i]插入到已经排好序的A[1,i-1]的合适的位置上,在原始的InsertSort算法中,采用的是从后往前一步一步查找的方法,习题2.3-6要求利用习题2.3-5中的binary search的方法,加速这个插入的过程。把binary search ...
分类:编程语言   时间:2014-11-06 21:52:18    阅读次数:220
《算法导论》习题2.3-5 二分搜索 Binary Search
地球人都知道“二分查找”,方法也非常简单,但是你能不能在10分钟内写出一个没有bug的程序呢?知易行难,自己动手写一下试一试吧。public class BinarySearch { public static int search(int [] A,int target,int a, int...
分类:编程语言   时间:2014-11-06 21:52:14    阅读次数:180
二叉搜索的各种bugs——重复递增序列
int binary_search(int* A, int value, int p, int r);int main(int argc, char *argv[]){ int A[] = {1, 2, 3, 4, 4, 4, 4, 4, 4, 5}; int index...
分类:其他好文   时间:2014-11-06 21:26:23    阅读次数:220
Python3实现最小堆建堆算法
今天看Python CookBook中关于“求list中最大(最小)的N个元素”的内容,介绍了直接使用python的heapq模块的nlargest和nsmallest函数的解决方式,记得学习数据结构的时候有个堆排序算法,所以顺便研究了一下“堆”结构(这里特指二叉堆)。概念所谓二叉堆(binary ...
分类:编程语言   时间:2014-11-06 19:40:59    阅读次数:470
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!