上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: 层次聚类关键方法#coding:UTF-8#Hierarchical clustering 层次聚类from E_distance import Euclidean_distancefrom yezi import yeziclass bicluster: def __init__(self, vec, left=None,right=None,distance=0.0,id=None): self.left = left self.right = right #每次聚类都是一对数据,left保存其中一个数据,right保存另一个 self.v... 阅读全文
posted @ 2013-11-24 23:12 Key_Ky 阅读(17626) 评论(2) 推荐(2) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;using System.IO;namespace WindowsFormsApplication3{ public partial class Fo... 阅读全文
posted @ 2013-11-18 22:45 Key_Ky 阅读(409) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "stdlib.h"#include "stdio.h"#include #include #define MaxSize 1000using namespace std;typedef struct node{ int num; node * lchild; node * rchild;};struct chain{ node * Node; chain * next;}*head;typedef struct Stack{ int data[MaxSize]; int top 阅读全文
posted @ 2013-11-17 17:11 Key_Ky 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: 进退法例子,遇到具体问题还得修改,以后最速下降梯度法的梯度方向是变化的,这是其中一个要考虑的改变。进退法具体算法:实现代码:#include "StdAfx.h"#include #include #include #define N 2using namespace std;float testFunction(float z[N]){ float f; f = z[0] * z[0] + z[1] * z[1] - 8 * z[0] - 12 * z[1] + 52; //函数 return(f);}void main(){ float x[N],s[N],f[N].. 阅读全文
posted @ 2013-11-17 10:13 Key_Ky 阅读(1580) 评论(0) 推荐(0) 编辑
摘要: #coding: UTF-8import pearson_distancefrom pearson_distance import pearson_distancefrom math import sqrtimport random def print_matchs(matchs) : for i in range(len(matchs)) : print i , '---->', for item in matchs[i] : print item, print print '-'*20 def kme... 阅读全文
posted @ 2013-11-16 12:24 Key_Ky 阅读(2243) 评论(2) 推荐(0) 编辑
摘要: C++中struct rankPoint{ float sim;};extern "C" __declspec(dllexport) int getRank(rankPoint prank[20000]){ for(int i = 0; i < 20000; i++) prank[i].sim = 0; for(int i = 0; i < 7; i++) prank[i].sim = i; return 0;}C#中using System;using System.Collections.Generic;using System.Linq;usi... 阅读全文
posted @ 2013-11-03 16:29 Key_Ky 阅读(2015) 评论(0) 推荐(0) 编辑
摘要: Opencv中将CvMat转为IplImage,并在内存获得起头指针,而不用cvSaveImage(),贴上代码IplImage * imgg = NULL; imgg = cvCreateImage(cvSize(modelF[0].Matrix->cols,modelF[0].Matrix->rows),IPL_DEPTH_8U,1); float ve; for(int n = 0; n rows; n++){ for(int m = 0; m cols; m++){ ve = CV_MAT_ELEM(*(modelF[0].... 阅读全文
posted @ 2013-09-19 23:08 Key_Ky 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 我要完成一个添加登陆模块的任务,小编人仍然是菜鸟,所以我借鉴了百度的登陆模块,试图做出一个类似于百度那样的登陆模式。百度登陆模块有以下几个特点需要我学习,通过学习列出我的需求。第一,当点击“登陆”时,会弹出一个对话框实现登陆,它屏蔽了主页。第二,该对话框要有一些登陆的基本要素,例如:输入用户名,密码,验证码,错误提示等等。第三,点击“登陆”button后,登陆的信息会在网页右上角保存,并实现登出的功能。第四,实现后台数据库的查询用户信息,插入用户搜索信息,插入用户注册信息等功能。接下来我将依次实现这几个需求和在我在实现中遇到的技术难题,虽然做出来的页面外观并不是很好,但是基本功能还是齐全的.. 阅读全文
posted @ 2013-08-30 23:45 Key_Ky 阅读(5785) 评论(0) 推荐(0) 编辑
摘要: 今天看了点Javascript里面关于object的一些基本知识,主要想记录的是Querying and Setting Properties,当然object里面最重要的仍然是prototype,还有生成类的一些基本规则。先从生成对象开始:关于object['property']这种访问属性的方法有下面两种应用://第一种://第二种: 阅读全文
posted @ 2013-01-07 15:26 Key_Ky 阅读(136) 评论(0) 推荐(0) 编辑
摘要: ---恢复内容开始--- 今天看了Javascript的statement,看的不是很认真,所以今天就对操作符in和instanceof还有循环声明for/in进行备忘。对于in操作符,他的左操作数是string型或者可以转换为string的类型,他的右操作数是类类型。如果左操作数是右操作数的一个属性,那么该表达式值为true。例子:var point = { x:1, y:1 }; // Define an object"x" in point // => true: object has property named "x""z&qu 阅读全文
posted @ 2013-01-06 02:57 Key_Ky 阅读(167) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页