This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <vector> | |
#include <iostream> | |
#ifndef Edge_H_INCLUDED | |
#define Edge_H_INCLUDED | |
using namespace std; | |
class Edge{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <vector> | |
#include <iostream> | |
#ifndef Edge_H_INCLUDED | |
#define Edge_H_INCLUDED | |
using namespace std; | |
class Edge{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
using namespace System; | |
using namespace System::Reflection; | |
using namespace System::Runtime::CompilerServices; | |
using namespace System::Runtime::InteropServices; | |
using namespace System::Security::Permissions; | |
// | |
// General Information about an assembly is controlled through the following |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************** | |
Lab 1 Perspective Vector Display System | |
THE GEORGE WASHINGTON UNIVERSITY | |
Department of Computer Science | |
CS 6554 - Computer Graphics II - Spring 2014 | |
Name: Wenhui Zhang | |
GWid: G35379915 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
\usepackage{amscd} | |
\usepackage{amsmath} | |
\usepackage{amssymb} | |
\usepackage{amsthm} | |
\usepackage{epsfig} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Do an R-mode using prcomp(), for correlation and covariance among variables | |
#for Q-mode PCA :the data set should be transposed before procceeding | |
#Q-mode focuses on correlations and covariance among samples | |
mydata<-read.table(file="/Users/WenhuiZhang/Desktop/hypeScpec_R/R_hyperspectra/mydata.txt",header=TRUE,row.name=1,sep=",") | |
mydata.pca<-prcomp(mydata,retx=TRUE,center=TRUE,scale.=TRUE) | |
#variable means set to zero, and variance set to one sample scores stored in mydata.pca$x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%http://en.wikipedia.org/wiki/Dijkstra's_algorithm | |
%W stands for the pic/path weight distibution | |
%n total number of spots | |
function [l,z]=Dijkstra(W) | |
n = size (W,1); | |
for i = 1 :n | |
l(i)=W(1,i); | |
z(i)=1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%http://en.wikipedia.org/wiki/Particle_swarm_optimization | |
function [pso F] = pso_2D() | |
% FUNCTION PSO --------USE Particle Swarm Optimization Algorithm | |
%global present; | |
% close all; | |
pop_size = 10; % pop_size | |
part_size = 2; % part_siz=n-D | |
gbest = zeros(1,part_size+1); | |
max_gen = 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [R,Rlength]=geneticTSP(D,n,C,m,alpha) | |
[N,NN]=size(D); | |
farm=zeros(n,N); | |
for i=1:n | |
farm(i,:)=randperm(N); | |
end | |
R=farm(1,:); | |
len=zeros(n,1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit analogu; | |
interface | |
uses | |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, | |
Menus, ToolWin, ComCtrls, ImgList, ExtCtrls, mpfileu, mpviewu; | |
type |