- 博客(46)
- 资源 (13)
- 收藏
- 关注
原创 Read-only data members
Read-only data membersOne means of achieving this (proxies are another, properties are a third)is by providing a public data member which is a const referenceto an actual (non-const) priv
2008-11-01 13:34:00 626
转载 C++禁止继承
Analyzing the problemThe problem is very simple: create a mechanism whereby its possibleto mark a class (say, NotABase) as being uninheritable, such thatattempting to derive a class from
2008-11-01 13:24:00 1692
转载 Viterbi algorithm
The Viterbi algorithm is a dynamic programming algorithm for finding the most likely sequence of hidden states – called the Viterbi path – that results in a sequence of observed events, especially in
2008-10-27 13:38:00 1450
转载 隐Markov模型续
解决问题1 后向法与前向法类似定义后向变量Viterbi算法目的:给定观察序列O以及模型λ,如何选择一个对应的状态序列S ,使得S能够最为合理的解释观察序列O?N和T分别为状态个数和序列长度定义:我们所要找的就是T时刻最大的所代表δt( i) 的那个状态序列Viterbi算法(续)Baum-Welch算法(模型训练算法)目的:给定观察值序列O,通过计算确定一个模型λ , 使得P(O| λ)最大。算
2008-10-27 13:18:00 1292
转载 马尔可夫链
一个隐马尔可夫模型 (HMM) 是一个五元组: (ΩX , ΩO, A, B, π ) 其中: ΩX = {q1,...qN}:状态的有限集合 ΩO = {v1,...,vM}:观察值的有限集合 A = {aij},aij = p(Xt+1 = qj |Xt = qi):转移概率 B = {bik},bik = p(Ot = vk | X
2008-10-27 11:25:00 1640 1
原创 只能用一条语句输出
写一个函数 int p(int i, int N); 能够输出i到N再到i,即以参数1,7调用函数,输出结果为 1 2 3 4 5 6 7 6 5 4 3 2 1 要求只用一个语句完成,不允许用?:等n多操作符和关键字。只能用一个printf库函数int p(int i,int N){ return (printf(
2008-10-24 14:19:00 600
转载 Bit Twiddling Hacks
Bit Twiddling Hacks By Sean Eron Andersonseander@cs.stanford.edu Individually, the code snippets here are in the public domain (unless otherwise noted) — feel free to use them however you please. Th
2008-10-23 19:33:00 1040
原创 Serialization: Understand
Serialization is a handy and powerful aspect of Java. Being able to persist objects onto disk and read them later is one of the most under-used features of Java I think. In the base cases, serializati
2008-10-23 13:51:00 468
原创 Java Inner Class
if you declare a class like thisclass OuterClass{ static class A{ class B{ public void get(){ Class C{ } } } }}there will be four class generated:OuterClass.classOuterClass$A
2008-10-23 13:50:00 454
原创 How to build a independent java program
There are several factors which will affect the program independence.1: The main factor which will affect the program is which Java platform your program deploy to.2: There exits several version o
2008-10-23 13:50:00 151
原创 the class inspection in JVM
before the Java classloader begin to excute a class file, it will need to check out the file four times.1.check the structure of the file the first inspection happen before the class was loaded. J
2008-10-23 13:49:00 531
原创 SecurityManager
The Java Security was make up of ClassLoader, Class file inspection, Build-in security and securityManager.the build-in security includes: safely type cast,structual memomry access,gc,bound check of
2008-10-23 13:48:00 1216
原创 what is a synthetic field and method
if you overview the bytecode of a java class file, maybe you will find a keyword synthetic which is not include in the keyword of java language. so when will synthetic come out in the bytecode in a cl
2008-10-23 13:47:00 1208
原创 Lecture Notes on Static Analysis
Thanks to Michael I.Schwartzbach. We will read his paper Lecture Notes on Static Analysis.Lecture Notes on Static Analysis Michael I. Schwartzbach BRICS, Department of Computer Science University of
2008-10-23 13:46:00 846
原创 The structure of a class file
1: magic number: 4 bytes, OxCAFEBABE which can help to recognize a java class file easily2: minor_version and major_version: 4 bytesfor example,in java 2 platform the major_version is updated from
2008-10-23 13:46:00 116
原创 Lattices
supposed a poset ≤>, if it has a supermum and infimum so we will call ≤> Lattices. • Reflexivity: ∀x ∈ S : x ≤ x• Transitivity: ∀x, y, z ∈ S : x ≤ y ∧ y ⊑ z ⇒ x ≤ z• Anti-symmetry: ∀x, y ∈
2008-10-23 13:44:00 634
转载 Java1.5泛型指南中文版(Java1.5 Generic Tutorial)
Java1.5泛型指南中文版(Java1.5 Generic Tutorial)英文版pdf下载链接:http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf译者: chengchengji@163.comhttp://blog.csdn.net/explorers/archive/2005/08/15/454837.aspx#_Toc1
2008-10-23 13:43:00 723
原创 Forwards, Backwards, May, and Must
The four classical analyses that we have seen so far can be classified in various ways. They are all just instances of the general monotone framework, but their constraints have a particular structure
2008-10-23 13:42:00 527
原创 Java Class File Structrue
A class file consists of a single ClassFile structure: ClassFile { u4 magic; u2 minor_version; u2 major_version; u2 constant_pool_count; cp_info constant_pool[constant_pool_count-1]; u
2008-10-23 13:05:00 144
原创 Stream buf
#include #include int main(int argc, char* argv[]){ assert(argc==2); ifstream in(argv[1]); assert(in); cout}...main(){ ifstream in("aa.cpp");
2008-10-23 13:04:00 132
原创 pointer to member
class widget{public: int a; void h(int); void g(int);};void widget::g(int i){}main(){ widget w; int widget::* pm=&widget::a; void (widget::*pmem)(in
2008-10-23 13:03:00 440
原创 two types of template
templateclass T,int len>void QuickSort(T (&list)[len],int left,int right){ if(left>=right) return; int mid=RandomPartition(list,left,right); QuickSort(list,left,mid-1); QuickSort(l
2008-10-23 13:02:00 390
原创 Function Pointer
void * (*(*fp1)(int))[10];fp1是一个指向函数的指针,该函数接受一个int参数并返回一个指向含有10个void指针数组的指针float (*(*fp2)(int,int,float))(int);fp2是一个指向函数的指针,该函数接受三个参数(int,int,float)且返回一个指向函数的指针,该函数接受一个int参数并返回floattypedef do
2008-10-23 13:01:00 418
原创 Smart Pointer
#include using namespace std;class Object{ string name,value;public: void getName(){cout void getValue(){cout};class Container{ vector vec;public: void add(Object* obj){
2008-10-23 12:59:00 396
原创 operator->*
#include using namespace std;class Dog{public: int run(int i)const{ cout"run" return i; } int eat(int i)const{ cout"eat" return i; } int sleep(int i)const{ cout"sle
2008-10-23 12:57:00 797
原创 C++ unexpected throw exception
#pragma once #include class Up{};class Fit{};void g();void f(int i)throw(Up,Fit){ switch(i){ case 1: throw Up(); case 2: throw Fit(); } g();}void g(){ in
2008-10-23 12:54:00 737
原创 template
#pragma once #include #include #include //allocator #include using namespace std;templateclass T,size_t N=10>class Array{ T data[N]; size_t count;public: Array(){c
2008-10-23 12:50:00 484
原创 Container
你介意如果容器的底层使用了引用计数吗?如果是,你就得避开string,因为很多string的实现是用引用计数(参见条款13)。你也不能用rope,因为权威的rope实现是基于引用计数的(参见条款50)。于是你得重新审核你的string,你可以考虑使用vector。 你需要插入和删除的事务性语义吗?也就是说,你需要有可靠地回退插入和删除的能力吗?如果是,你就需要使用基于节点的容器。如果你需要多元
2008-10-23 12:49:00 1000
原创 mem_fun/mem_fun_ref
template // 用于不带参数的non-const成员函数 mem_fun_t // 的mem_fun声明。 mem_fun(R(C::*pmf)()); // C是类,R是被指向 list lpw; // 同上 ... for_each(lpw.begin(), lpw.end(), mem_fun(&Widget::test)); // 这个现在可以编译了
2008-10-23 12:48:00 452
原创 friend template
templateclass T>class Friendly;templateclass T>void f(const Friendly&);templateclass T> class Friendly{ T t;public: Friendly(const T& theT):t(theT){} friend void fconst
2008-10-23 12:47:00 565
原创 curiously recurring template pattern
#include using namespace std;templateclass T> class Counted{ static int count; public: Counted(){++count;} Counted(const Conted&){++count;} ~Counted(){--count;} st
2008-10-23 12:46:00 463
原创 template metaprogram
#include using namespace std;templateint n>struct Factorial{ enum{val=Factorial::val*n};};templatestruct Factorial{ enum{val=1};};templateint N,int P> struct Power{ enum{val=N
2008-10-23 12:44:00 533
原创 Web挖掘技术
Web挖掘技术 一、数据挖掘数据挖掘是运用计算机及信息技术,从大量的、不完全的数据集中获取隐含在其中的有用知识的高级过程。Web 数据挖掘是从数据挖掘发展而来,是数据挖掘技术在Web 技术中的应用。Web 数据挖掘是一项综合技术,通过从Internet 上的资源中抽取信息来提高Web 技术的利用效率,也就是从Web 文档结构和试用的集合中发现隐含的模式。数据挖掘涉及的学科
2008-10-23 12:43:00 1645
转载 文本特征提取方法研究
文本特征提取方法研究一、课题背景概述文本挖掘是一门交叉性学科,涉及数据挖掘、机器学习、模式识别、人工智能、统计学、计算机语言学、计算机网络技术、信息学等多个领域。文本挖掘就是从大量的文档中发现隐含知识和模式的一种方法和工具,它从数据挖掘发展而来,但与传统的数据挖掘又有许多不同。文本挖掘的对象是海量、异构、分布的文档(web);文档内容是人类所使用的自然语言,缺乏计算机可理解的语义。传统数据
2008-10-23 12:42:00 2439
原创 Inside the C++ Object Model chapter 1
1.1.1 简单对象模型 对象由一系列的slots组成,每个slot中存放着指向对象的一个成员(数据成员与函数成员)的指针,成员按其在类中声明的顺序排序,查找成员等效于查找其在对象中的索引。类对象大小的计算方式:指针大小乘以成员数目(参见书-图1.1)。 本模型采用空间与执行期效率为代价简化编译器设计复杂度,对象的大小不会因为成员类型的不同而改变――类对象中存储的都是指针。 本模型关于
2008-10-23 12:40:00 544
原创 图的各种算法实现
#ifndef _ALGORITHM_H_2008_ #define _ALGORITHM_H_2008_ #include "Graph.h" //深度优先遍历算法 templatebool pre,class FirstArg,class ResultType>void DFS(Graph& graph,Graph::size_t start,const point
2008-10-23 12:19:00 524
原创 图的接口定义
// Copyright 2008 All Rights Reserved. // Author: Zhiyi ZHOU #pragma once #ifndef _GRAPH_H_2008_ #define _GRAPH_H_2008_ #include #include #include #include #include #in
2008-10-23 12:17:00 512
原创 图的邻接矩阵实现
// Copyright 2008 All Rights Reserved. // Author: Zhiyi ZHOU #ifndef _MATRIXGRPAH_H_2008_ #define _MATRIXGRPAH_H_2008_ #include "Graph.h" #include class MatrixVertex:public Vertex{p
2008-10-23 12:15:00 694
原创 Vector Algebra Related
You have a point in space having known coordinates, say P(x1, y1, z1). There is a vector coming out of this point in the direction, D(ai + bj + ck), write pseudo code to find the coordinates of an ano
2008-10-23 00:14:00 444
原创 remove a loop from a linked list
Lets consider an example of a linked list contained a loop:1--> 2--> 3--> 4--> 5-->6-->7 (connected back to 5)how to detect the loop and how to remove the loop from the last node of the linked lis
2008-10-22 22:11:00 555
模式分类_第二版_中文版.pdf
2008-12-04
The Java Virtual Machine Specification(Second Edition)
2008-12-04
支持向量机导论.pdf
2008-12-04
Intel汇编语言程序设计(第四版)3
2008-12-04
Intel汇编语言程序设计(第四版)2
2008-12-04
Intel汇编语言程序设计(第四版)1
2008-12-04
Forward Analysis of Updatable Timed Automata.pdf
2008-06-21
Program Analysis and Specialization for the c program language.pdf
2008-06-04
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人