plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | SNEEManchester/qosa-snee-master | display.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@partition/display.m | 418 | utf_8 | ae9e949b545733845abb6b85831f4c9e | function display(p)
% display(p) --- used to display paritions to the console
[m,n] = size(p.array);
outstr = '{ ';
for k=m:-1:1
part = find(p.array(k,:));
outstr = [outstr,disp_part(part),' '];
end
outstr = [outstr,'}'];
disp(outstr);
end
function s = disp_part(part)
s = '{';
for k=1:length(part)
s ... |
github | SNEEManchester/qosa-snee-master | springxy.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/springxy.m | 1,027 | utf_8 | c3885564556024b329481179ee6c93ad | function e=springxy(g)
% springxy(g) --- find a spring embedding of g
%
% This routine is very slow. distxy(g) does a good job and is faster.
%
% REQUIRE THE OPTIMIZATION TOOLBOX
tic;
n = nv(g);
con = isconnected(g);
if (hasxy(g))
xy0 = getxy(g);
else
xy0 = 5*randn(n,2);
end
% opts = optimset('TolX',0.1, '... |
github | SNEEManchester/qosa-snee-master | dfstree.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/dfstree.m | 831 | utf_8 | fddd7ac9e75bae04744db86a787dfe0f | function dfstree(t,g,v)
% dfstree(t,g,v) --- create a depth-first spanning tree of g
% The tree is rooted a the vertex v (or vertex 1 if missing). If g is not
% connected, we generate a tree only for the component containing v;
% vertices in the other components are isolated vertices in t.
if nargin==2
v = 1;
en... |
github | SNEEManchester/qosa-snee-master | graffle.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/graffle.m | 3,003 | utf_8 | 1706e8b0d2d5470c1bf3c9488a5eb28d | function graffle(g, filename, width, rad)
% graffle(g, filename, width, rad) --- write graph in OmniGraffle format
%
% This writes a graph to the disk with the file name specified in the
% second argument (default is 'graph.graffle').
% The width (3rd argument) gives the overall size of the plot
% (default=450).
% The... |
github | SNEEManchester/qosa-snee-master | hamiltonian_cycle.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/hamiltonian_cycle.m | 1,820 | utf_8 | 30f4ac14830c2e338c94ccbd60bb705a | function [hlist, exists] = hamiltonian_cycle(g,h)
% hamiltonian_cycle(g) --- find a Hamiltonian cycle in g (if one exists)
% This can be called with two output arguments:
% [hlist, exists] = hamiltonian_cycle(g)
% the 2nd output argument is set to 0 if no trail exists.
% This can also be called hamiltonian_cycle(h,... |
github | SNEEManchester/qosa-snee-master | save.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/save.m | 1,551 | utf_8 | 0f50f8ba447e363aef48a538ff950fbc | function save(g,filename)
% save(g,filename) --- save a graph to disk
% The graph g is saved to a file named in the argument filename.
fid = fopen(filename,'w');
if (fid == -1)
error(['Cannot open "', filename, '" for output']);
end
n = nv(g);
m = ne(g);
fprintf(fid,'%%saved graph data\n');
fprintf(fid,'sp = ... |
github | SNEEManchester/qosa-snee-master | renumber.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/renumber.m | 1,291 | utf_8 | 033a7670b99e1b469733b96e1cf54e74 | function renumber(g,perm)
% renumber the vertices of a graph
% renumber(g,perm) --- renumber the vertices of a graph accoring to a
% permutation
% renumber(p,part) --- renumber vertices according to a partition.
%
% perm should be a permutation of 1 through n
% the graph's vertices are permutated so that the old vertex... |
github | SNEEManchester/qosa-snee-master | color.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/color.m | 4,287 | utf_8 | 2af0f5bae1025e3c67ceb9b2717ed3f8 | function p = color(g,algo,max_time)
% color(g,algo) --- color the graph g by a given algorithm
% The algorithms are as follows:
%
% 'greedy': the default, puts vertices in descending order of degree
% and runs sequential coloring
%
% 'rs': random sequence, puts vertices in random order and
%... |
github | SNEEManchester/qosa-snee-master | chromatic_poly.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/chromatic_poly.m | 3,117 | utf_8 | 7022d60f26a35d559b8f59a9eb4e59cb | function out = chromatic_poly(g)
% chrompoly(g) --- find the chromatic polynomial of g
% Warning: This algorithm is slow and unusable except for small graphs.
% Author: James Preen
out = chrompoly(double(matrix(g)));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Here is James Preen's .m file very lightly ed... |
github | SNEEManchester/qosa-snee-master | dist.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/dist.m | 1,665 | utf_8 | 7223e2d08e1a93b44b2d1326b7f150cc | function d = dist(g,v,w)
% dist(g,v,w) and dist(g,v) --- find distance(s) between vertices
% The form dist(g,v,w) finds the distance between vertices v and w.
% The form dist(g,v) returns a vector distance from v to all other vertices
% in the graph.
% The form dist(g) returns an n-by-n matrix whose ij entry is the dis... |
github | SNEEManchester/qosa-snee-master | iso.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/iso.m | 9,195 | utf_8 | fa591c3b0e6b8cef0f857855621392e8 | function [yn,p] = iso(g,h,options)
% [yn,p] = iso(g,h,options) --- is g isomorphic to h?
% Given graphs g and h, determine whether or not the graphs are isomorphic,
% and if so, return a permutation p such that renumber(g,p) makes g==h.
%
% Returns yn = 1 if isomorphic and yn = 0 if not. The optional p is a
% permuta... |
github | SNEEManchester/qosa-snee-master | interval_graph.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/interval_graph.m | 580 | utf_8 | 9ae20abc426e53511cbc6c8741846d7b | function interval_graph(g,ilist)
% interval_graph(g,ilist) --- create an interval graph
% ilist is an n-by-2 list of intervals.
[n,x] = size(ilist);
for i=1:n
ilist(i,:) = sort(ilist(i,:));
end
[ilist,idx] = sortrows(ilist);
resize(g,n);
clear_edges(g);
rmxy(g);
for i=1:n-1
a = ilist(i,:);
for j=i+1:n
... |
github | SNEEManchester/qosa-snee-master | bridges.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/bridges.m | 2,155 | utf_8 | 2cdf91a4c2ea482f89dd866fa3e6a759 | function blist = bridges(g,algo)
% bridges(g,algo) --- find all cut edges in g
% algo specifies the algorithm. Current choices are these:
%
% 'path' Deletes each edge from the graph and checks if there is a path
% between its endpoints. A few tricks are employed so we don't
% have to check every ... |
github | SNEEManchester/qosa-snee-master | sgf.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/sgf.m | 1,848 | utf_8 | e3522fd9117242f8c8b02fafdc40f54f | function A = sgf(g,M)
% sgf --- simple graph format: a 2-column matrix representation
% A = sgf(g) --- make the simple graph format matrix of g
% sgf(g,M) --- overwrite g with the graph specified in M
%
% The simple graph format is a 2-column matrix representation of a graph.
% This format optionally includes embeddi... |
github | SNEEManchester/qosa-snee-master | components.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/components.m | 628 | utf_8 | d4350b4340900961b363822caf7303d1 | function p = components(g)
% components(g) --- find the components of the graph g
% If g has n vertices, this returns a partition of the [n] based on the
% components of g.
n = nv(g);
indicator = zeros(n,1);
c = 0;
while (nnz(indicator)<n)
c = c+1;
% find first zero entry in indicator
i = find(indicator==... |
github | SNEEManchester/qosa-snee-master | shiftgraph.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/shiftgraph.m | 793 | utf_8 | 1d9281b904e38ceccffb387d5510936c | function shiftgraph(g,k,t)
% shiftgraph(g,k,t) -- create a shiftgraph g based on t-tuples of k symbols
resize(g,0);
n = k^t;
if (n>1000)
sparse(g)
end
resize(g,n);
edgelist = [];
for v=1:n
vec = num2tuple(v-1,k,t);
label(g,v,int2str(vec))
for j=0:k-1
wec = shift(vec,j);
w = tuple2num(wec,k)+1;
if (v~=w)
... |
github | SNEEManchester/qosa-snee-master | selective.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/selective.m | 1,130 | utf_8 | 53d9aa5f9d0765dc6c80b4d0395503a6 | function selective(g,n,n0,d)
% selective(g,n,n0,d) --- selective attachment random graph
% overwrite g with a random graph with a degree-d selective attachment
% graph on n vertices starting with n0 isolated vertices.
%
% That is, we begin with n0 isolated vertices. We then add vertices one at
% a time. Each new vertex... |
github | SNEEManchester/qosa-snee-master | line_graph.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/line_graph.m | 766 | utf_8 | e0fa6af1a8be26b36cd1d532b4361f6e | function line_graph(g,h)
% line_graph(g,h) --- set g to be the line graph of h
% The line graph of h is the intersection graph of its edges.
elist = sortrows(edges(h));
[m,c] = size(elist);
resize(g,m);
rmxy(g);
clear_edges(g);
for i=1:m-1;
a = elist(i,:);
for j=i+1:m
b = elist(j,:);
if commo... |
github | SNEEManchester/qosa-snee-master | grid.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/grid.m | 1,038 | utf_8 | d835d1c0bca9f1158dde43f4ce731c67 | function grid(g,a,b)
% grid(g,a,b) --- create an a-by-b grid graph
% grid(g,a) is the same as grid(g,a,a)
global GRAPH_MAGIC
if nargin==2
b = a;
end
n = a*b;
resize(g,0);
resize(g,n);
for i=1:a % row index
for j=1:b % col index
v = ij2v(i,j,a,b);
% left
if (i>1)
... |
github | SNEEManchester/qosa-snee-master | cartesian.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/cartesian.m | 1,058 | utf_8 | 02ede9c91e2f1280c8c2427cdc32a414 | function cartesian(g,h1,h2)
% cartesian(g,h1,h2) --- overwrite g with the product of h1 and h2
n1 = nv(h1);
n2 = nv(h2);
n = n1 * n2;
resize(g,n);
clear_edges(g);
for u=1:n-1
for v=u+1:n
[u1,u2] = splitout(u,n1,n2);
[v1,v2] = splitout(v,n1,n2);
if (u1==v1) & has(h2,u2,v2)
... |
github | SNEEManchester/qosa-snee-master | distxy.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/distxy.m | 1,299 | utf_8 | e6bfe9a6303c3dabce55efdafc22cd99 | function e = distxy(g, D)
% distxy(g) -- give g a distance based embedding
% we attempt to embed g in the plane so that the graph-theoretic distance
% between vertices matches the eucliden distance.
%
% This may also be called distxy(g,D) where D is a distance matrix. (By
% default D is the standard shortest-path dis... |
github | SNEEManchester/qosa-snee-master | cayley.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/cayley.m | 2,590 | utf_8 | 055d7d222c715ab1a7d18cf0839326f6 | function cayley(g,perms,verbose)
% cayley(g,perms) -- create a Cayley graph (undirected)
% g is the graph to be written
% perms is a cell array of permutations that are the generators of a group.
% The vertices of g are the elements of the generated group. There is an
% edge from u to v in g provided there is a generat... |
github | SNEEManchester/qosa-snee-master | prufer.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/prufer.m | 1,831 | utf_8 | 12402c3193b5669353882c4c4dc9f71f | function output = prufer(g, code)
% prufer --- convert a tree to/from its Prufer code
% output = prufer(g) returns the Prufer code for g (assuming g is a tree)
% prufer(g,code) overwrites g with a tree based on the code
%
% The Prufer code is a way to map bijectively trees on n vertices
% into n-2 long sequences of i... |
github | SNEEManchester/qosa-snee-master | sl2graph.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/sl2graph.m | 2,393 | utf_8 | 126d50710b1bb8e9e959ddbc755d93cf | function sl2graph(g,p)
% sl2graph(g,p) -- create an SL(2,p) graph
% g is the graph to be created
% p is a prime
% the vertices of g correspond to 2-by-2 matrices with determinant equal to
% 1 and entries modulo p
% Two vertices are adjacent if one can be obtained from the other by
% multiplication by either [1 1; 0 1] ... |
github | SNEEManchester/qosa-snee-master | color.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@graph/old-versions/color.m | 984 | utf_8 | 095f994d4e260db689584c928d66d0ee | function p = color(g,algo)
% color(g,algo) --- color the graph g by a given algorithm
% At present, the only algorithm (and the default) is 'greedy'.
if nargin == 1
algo = 'greedy';
end
if strcmp(algo,'greedy')
p = greedy_color(g);
return
end
error(['Algorithm "', algo, '" not implemented']);
functio... |
github | SNEEManchester/qosa-snee-master | display.m | .m | qosa-snee-master/src/matlab/wheresched/matgraph/@permutation/display.m | 581 | utf_8 | a20343862c5dcdfd246fd7f8193a8704 | function st = display(p)
% display(p) --- display a permutation in disjoint cycle form.
% special case if the permutation is empty
if (length(p)==0)
disp('()')
return
end
c = cycles(p);
outstr = '';
for k=1:length(c)
outstr = [outstr,list_to_cycle(c{k})];
end
if nargout > 0
st = outstr;
else
disp(... |
github | YutingZhang/fgs-obj-master | prepare_batch.m | .m | fgs-obj-master/caffe/matlab/caffe/prepare_batch.m | 1,299 | utf_8 | a90bb4b5e8c0870fa315af5a6b6a1cbc | % ------------------------------------------------------------------------
function images = prepare_batch(image_files,IMAGE_MEAN,batch_size)
% ------------------------------------------------------------------------
if nargin < 2
d = load('ilsvrc_2012_mean');
IMAGE_MEAN = d.image_mean;
end
num_images = length... |
github | YutingZhang/fgs-obj-master | matcaffe_demo.m | .m | fgs-obj-master/caffe/matlab/caffe/matcaffe_demo.m | 3,344 | utf_8 | 669622769508a684210d164ac749a614 | function [scores, maxlabel] = matcaffe_demo(im, use_gpu)
% scores = matcaffe_demo(im, use_gpu)
%
% Demo of the matlab wrapper using the ILSVRC network.
%
% input
% im color image as uint8 HxWx3
% use_gpu 1 to use the GPU, 0 to use the CPU
%
% output
% scores 1000-dimensional ILSVRC score vector
%
% You m... |
github | YutingZhang/fgs-obj-master | boxes_and_scores_after_nms.m | .m | fgs-obj-master/dependency/evaluation/boxes_and_scores_after_nms.m | 1,681 | utf_8 | 1b2091b1a5179d63900ad8e23db3fa57 | function [ chosenBs, chosenSs ] = boxes_and_scores_after_nms( ...
boxes, scores, NMS_Threshold, MaxKeptBoxPerImage, MaxKeptObjectPerImage )
% support both cell array and a single input
if ~exist('MaxKeptBoxPerImage','var') || isempty(MaxKeptBoxPerImage)
MaxKeptBoxPerImage = inf;
end
if ~exist('MaxKeptObjectPe... |
github | YutingZhang/fgs-obj-master | firstKindexB.m | .m | fgs-obj-master/dependency/utils/algorithm/firstKindexB.m | 636 | utf_8 | 2aa3fe677697f9927cc0d1d3325c972f | function chosenIdxB = firstKindexB( a, k, varargin )
if iscell(a)
if isscalar(k)
chosenIdxB = cellfun( @(a1) {firstKindexB_single(a1, k, varargin{:})}, a );
else
chosenIdxB = arrayfun( @(a1,k1) {firstKindexB_single(a1{1}, k1, varargin{:})}, a, k );
end
else
chosenIdxB = firstKindexB_sin... |
github | YutingZhang/fgs-obj-master | timed_iter_func.m | .m | fgs-obj-master/dependency/utils/algorithm/timed_iter_func.m | 524 | utf_8 | d302035184c4e39acc5c31780bf303a0 | function wrapped_func = timed_iter_func( time_out, func )
% wrapped_func = timed_iter_func( timeout, func )
tinfo.ftimer = first_call_start_timer;
tinfo.time_out = time_out;
wrapped_func = @(varargin) timed_iter_func_wrap( tinfo, func, varargin{:} );
end
function varargout = timed_iter_func_wrap( tinfo, func, var... |
github | YutingZhang/fgs-obj-master | minFuncX.m | .m | fgs-obj-master/dependency/utils/algorithm/minFuncX.m | 2,699 | utf_8 | 2fecc721fd3bb8b01b777a7f176134e9 | function varargout = minFuncX(funObj,x0,options,varargin)
% functions the same as minFunc, but extended as follows:
% 1) It accepts any kind of x0 (including cell and struct)
% 2) It supports timeout (in second), timeout_handler ('error', 'stop')
if ~exist( 'options', 'var' )
options = [];
end
% set up objective ... |
github | YutingZhang/fgs-obj-master | relativepath.m | .m | fgs-obj-master/dependency/relative_path/relativepath.m | 2,973 | utf_8 | 31e8428b8deb8cfe46fcce3dc27fe990 | function rel_path = relativepath( tgt_path, act_path )
%RELATIVEPATH returns the relative path from an actual path to the target path.
% Both arguments must be strings with absolute paths.
% The actual path is optional, if omitted the current dir is used instead.
% In case the volume drive letters don't mat... |
github | YutingZhang/fgs-obj-master | compute_str_loss_max_L1.m | .m | fgs-obj-master/dependency/classifier/svm_structured_loss/compute_str_loss_max_L1.m | 2,776 | utf_8 | ce0a28d0314f028e401d94ad894147c4 | % ------------------------------------------
% structured loss function for detection
% w : dim x 1
% bias : 1 x 1
% xpgt : dim x # examples (positive example)
% xph (cell) : dim x # examples (hard negative for positive example)
% stloss (cell) : 1 x # examples (hard negative for positi... |
github | YutingZhang/fgs-obj-master | compute_str_loss_sum_L1.m | .m | fgs-obj-master/dependency/classifier/svm_structured_loss/compute_str_loss_sum_L1.m | 3,008 | utf_8 | b4f15940a28be0316b7a9eaccb54c15a | % ------------------------------------------
% structured loss function for detection
% w : dim x 1
% bias : 1 x 1
% xpgt : dim x # examples (positive example)
% xph (cell) : dim x # examples (hard negative for positive example)
% stloss (cell) : 1 x # examples (hard negative for positi... |
github | YutingZhang/fgs-obj-master | svm_str_loss_grad_multiclass.m | .m | fgs-obj-master/dependency/classifier/svm_structured_loss/svm_str_loss_grad_multiclass.m | 17,650 | utf_8 | 792df627073fea7bc46b08ad703f0c15 | function [svm_model, cachePos, cacheNeg] = svm_str_loss_grad_multiclass...
( cachePos, idsBagPos, numBags, factorFeatScaling, ...
funcBag, funcBagFilter, posOverlapThresh, negOverlapThresh, ...
numMaxAddedNeg, numMaxAddedAmb, numEpoch, SVM_C, SVM_bias, SVM_PosW, ...
SVM_ConstType, SVM_HingeLossType, Los... |
github | YutingZhang/fgs-obj-master | bboxes_augmentation.m | .m | fgs-obj-master/dependency/preprocess/bboxes_augmentation.m | 8,339 | utf_8 | ae37206ff94e305de01f4fe103d9fdfb | function [ augBoxes, augIds ] = bboxes_augmentation( ...
gtBoxes, gtIds, augFactor, useMirror, varargin )
% Random :
% [ augBoxes, augImIds ] = bboxes_augmentation( gtBoxes, gtImIds, augFactor, useMirror, maxJittering )
% [ augBoxes, augImIds ] = bboxes_augmentation( gtBoxes, gtImIds, augFactor, useMirror, maxCente... |
github | YutingZhang/fgs-obj-master | GetProposedFeature.m | .m | fgs-obj-master/dependency/features/GetProposedFeature.m | 2,915 | utf_8 | ed7e6139893cb16e460758b406197ba2 | function [feat, full_index] = GetProposedFeature( list_type, fn, ...
Features4Proposed_SpecificDir, idxFeatType )
if ( ~exist( 'Features4Proposed_SpecificDir', 'var' ) || isempty(Features4Proposed_SpecificDir) ) ...
&& evalin( 'caller', 'exist(''SPECIFIC_DIRS'',''var'')' )
Features4Proposed_SpecificDir... |
github | YutingZhang/fgs-obj-master | example_layout.m | .m | fgs-obj-master/voc2007/VOCdevkit/example_layout.m | 4,470 | utf_8 | faaf53dfba2457f3f7e5542cd51ad5fb | function example_layout
% change this path if you install the VOC code elsewhere
addpath([cd '/VOCcode']);
% initialize VOC options
VOCinit;
% train and test detector
cls='person';
detector=train(VOCopts,cls); % train detector
test(VOCopts,cls,detector); ... |
github | YutingZhang/fgs-obj-master | example_detector.m | .m | fgs-obj-master/voc2007/VOCdevkit/example_detector.m | 4,054 | utf_8 | 96655f9bbe885774da45363e4516017c | function example_detector
% change this path if you install the VOC code elsewhere
addpath([cd '/VOCcode']);
% initialize VOC options
VOCinit;
% train and test detector for each class
for i=1:VOCopts.nclasses
cls=VOCopts.classes{i};
detector=train(VOCopts,cls); % train d... |
github | YutingZhang/fgs-obj-master | create_segmentations_from_detections.m | .m | fgs-obj-master/voc2007/VOCdevkit/create_segmentations_from_detections.m | 3,667 | utf_8 | e991547b4a595e58313d5b11c0a91942 | % Creates segmentation results from detection results.
% CREATE_SEGMENTATIONS_FROM_DETECTIONS(ID) creates segmentations from
% the detection results with identifier ID e.g. 'comp3'. All detections
% will be used, no matter what their confidence level.
%
% CREATE_SEGMENTATIONS_FROM_DETECTIONS(ID, CONFIDENCE) as above... |
github | YutingZhang/fgs-obj-master | example_segmenter.m | .m | fgs-obj-master/voc2007/VOCdevkit/example_segmenter.m | 366 | utf_8 | 811cf1eb98ef8899c06077d47bd601f6 | % example_segmenter Segmentation algorithm based on detection results.
%
% This segmenter requires that some detection results are present in
% 'Results' e.g. by running 'example_detector'.
%
% Segmentations are generated from detection bounding boxes.
function example_segmenter
VOCinit
create_segmentations_from_detec... |
github | YutingZhang/fgs-obj-master | example_classifier.m | .m | fgs-obj-master/voc2007/VOCdevkit/example_classifier.m | 2,884 | utf_8 | 4d037fe9f87eb5181d869b1435e95025 | function example_classifier
% change this path if you install the VOC code elsewhere
addpath([cd '/VOCcode']);
% initialize VOC options
VOCinit;
% train and test classifier for each class
for i=1:VOCopts.nclasses
cls=VOCopts.classes{i};
classifier=train(VOCopts,cls); % tr... |
github | YutingZhang/fgs-obj-master | VOCevalseg.m | .m | fgs-obj-master/voc2007/VOCdevkit/VOCcode/VOCevalseg.m | 2,709 | utf_8 | 3d832544dce45b76923c6413db5ca130 | %VOCEVALSEG Creates a confusion matrix for a set of segmentation results.
% VOCEVALSEG(VOCopts,ID); prints out the per class and overall
% segmentation accuracies.
%
% [ACCURACIES,AVACC,CONF] = VOCEVALSEG(VOCopts,ID) returns the per class
% percentage ACCURACIES, the average accuracy AVACC and the confusion
% mat... |
github | YutingZhang/fgs-obj-master | VOClabelcolormap.m | .m | fgs-obj-master/voc2007/VOCdevkit/VOCcode/VOClabelcolormap.m | 691 | utf_8 | 0bfcd3122e62038f83e2d64f456d556b | % VOCLABELCOLORMAP Creates a label color map such that adjacent indices have different
% colors. Useful for reading and writing index images which contain large indices,
% by encoding them as RGB images.
%
% CMAP = VOCLABELCOLORMAP(N) creates a label color map with N entries.
function cmap = labelcolormap(N)
i... |
github | YutingZhang/fgs-obj-master | VOCwritexml.m | .m | fgs-obj-master/voc2007/VOCdevkit/VOCcode/VOCwritexml.m | 1,166 | utf_8 | 5eee01a8259554f83bf00cf9cf2992a2 | function VOCwritexml(rec, path)
fid=fopen(path,'w');
writexml(fid,rec,0);
fclose(fid);
function xml = writexml(fid,rec,depth)
fn=fieldnames(rec);
for i=1:length(fn)
f=rec.(fn{i});
if ~isempty(f)
if isstruct(f)
for j=1:length(f)
fprintf(fid,'%s',re... |
github | YutingZhang/fgs-obj-master | VOCreadrecxml.m | .m | fgs-obj-master/voc2007/VOCdevkit/VOCcode/VOCreadrecxml.m | 1,768 | utf_8 | 06d769a5965f7c528e4a080b97078333 | function rec = VOCreadrecxml(path)
x=VOCreadxml(path);
x=x.annotation;
rec=rmfield(x,'object');
rec.size.width=str2double(rec.size.width);
rec.size.height=str2double(rec.size.height);
rec.size.depth=str2double(rec.size.depth);
rec.segmented=strcmp(rec.segmented,'1');
rec.imgname=[x.folder '/JPEGImages... |
github | YutingZhang/fgs-obj-master | VOCxml2struct.m | .m | fgs-obj-master/voc2007/VOCdevkit/VOCcode/VOCxml2struct.m | 1,920 | utf_8 | 6a873dba4b24c57e9f86a15ee12ea366 | function res = VOCxml2struct(xml)
xml(xml==9|xml==10|xml==13)=[];
[res,xml]=parse(xml,1,[]);
function [res,ind]=parse(xml,ind,parent)
res=[];
if ~isempty(parent)&&xml(ind)~='<'
i=findchar(xml,ind,'<');
res=trim(xml(ind:i-1));
ind=i;
[tag,ind]=gettag(xml,i);
if ~strcmp(tag,['/' pare... |
github | YutingZhang/fgs-obj-master | PASreadrectxt.m | .m | fgs-obj-master/voc2007/VOCdevkit/VOCcode/PASreadrectxt.m | 3,180 | utf_8 | b6cdf9e30c54cbe0759f4cd4ee29f25c | function record=PASreadrectxt(filename)
[fd,syserrmsg]=fopen(filename,'rt');
if (fd==-1),
PASmsg=sprintf('Could not open %s for reading',filename);
PASerrmsg(PASmsg,syserrmsg);
end;
matchstrs=initstrings;
record=PASemptyrecord;
notEOF=1;
while (notEOF),
line=fgetl(fd);
notEOF=ischar(li... |
github | sywcxx/gps-sim-master | satvisible.m | .m | gps-sim-master/satvisible.m | 1,091 | utf_8 | dcebb2fe49c914dcbdc88b8e2e852ed4 | %******************************************
% Name: satvisible.m
% Function: determine whether the satellite is visible
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function satvisible()
global SimGlobal;
global CT;
t=SimGlobal.t;
userS... |
github | sywcxx/gps-sim-master | selecteph.m | .m | gps-sim-master/selecteph.m | 973 | utf_8 | c02193f2149d92fb5bcf0d050eff6015 | %******************************************
% Name: selecteph.m
% Function: Select the valid ephemeris for each satellite
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function satdata=selecteph()
global SimGlobal;
global CT;
t=SimGlobal.t;... |
github | sywcxx/gps-sim-master | genchannel.m | .m | gps-sim-master/genchannel.m | 1,420 | utf_8 | 0b1bd43aadb2d24b6a4ae62236dc9303 | %******************************************
% Name: genchannel.m
% Function: generate the channel data.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function genchannel()
global SimGlobal;
global CT;
ZeroChan=ChanData;
chan1=SimGlobal.a... |
github | sywcxx/gps-sim-master | init.m | .m | gps-sim-master/init.m | 1,280 | utf_8 | fb6ba9fab960cd5a504bbae0b96f112c | %******************************************
% Name: init.m
% Function: initialize the system
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function init()
global SimGlobal;
global CT;
%***********define the constant********************
C... |
github | sywcxx/gps-sim-master | readsp3.m | .m | gps-sim-master/readsp3.m | 1,192 | utf_8 | 397059c97c22371902d1f741af70212a | %******************************************
% Name: readsp3.m
% Funciton: load the precision ephemeris data
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function [preephdata]=readsp3(filename)
% open the sp3 file
fid=fopen(filename,'r');
% read the pre... |
github | sywcxx/gps-sim-master | transtime.m | .m | gps-sim-master/transtime.m | 1,062 | utf_8 | 4b0c1b6cb4d762b1f691cb516079f87f | %******************************************
% Name: transtime.m
% Function: Calculate the transfer time.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function transtime()
global SimGlobal;
global CT;
t=SimGlobal.t;
userState=SimGlobal.... |
github | sywcxx/gps-sim-master | readrinex.m | .m | gps-sim-master/readrinex.m | 2,817 | utf_8 | c6e556074b408e600d94858d515916cc | %******************************************
% Name: readrinex.m
% Function: load the ephemeris data
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function [noeph,ephdata]=readrinex(filename)
% open the rinex file
fid=fopen(filename,'r');
%find the strin... |
github | sywcxx/gps-sim-master | genmessage.m | .m | gps-sim-master/genmessage.m | 9,823 | utf_8 | 59677ce153a9b925226f1909c95a3c3c | %******************************************
% Name: genmessage.m
% Function: generate the nav message.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function genmessage()
global SimGlobal;
global CT;
t=SimGlobal.t;
tongbuma='10001011';
... |
github | sywcxx/gps-sim-master | LLA2WGS.m | .m | gps-sim-master/gs_function/LLA2WGS.m | 667 | utf_8 | 0849c263a7ad59ccd8f2615d7f26b239 | %******************************************
% Name: LLA2WGS.m
% Function: convert lla to wgs 84.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function wgsPVA = LLA2WGS(llaPVA)
global CT;
ecc=sqrt(CT.F*(2-CT.F));
pha=llaPVA.pos.first*CT.PI/180;... |
github | sywcxx/gps-sim-master | GenCACode.m | .m | gps-sim-master/gs_function/GenCACode.m | 1,028 | utf_8 | 625962e0c83e4fc6d7ad002185312d84 | %******************************************
% Name: GenCACode.m
% Function: generate the CA code.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function cacode = GenCACode(PRN)
g2s = [ 5, 6, 7, 8, 17, 18, 139, 140, 141, 251, ...
252, 25... |
github | sywcxx/gps-sim-master | WGS2ENU.m | .m | gps-sim-master/gs_function/WGS2ENU.m | 806 | utf_8 | 9bbd68548aa325834ade93d1e56b1057 | %******************************************
% Name: WGS2ENU.m
% Function: convert wgs 84 to enu.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function [alpha,theta]= WGS2ENU(userPVA,satPVA)
global CT;
llaPVA=WGS2LLA(userPVA);
pha=llaPVA.pos... |
github | sywcxx/gps-sim-master | UTC2GPST.m | .m | gps-sim-master/gs_function/UTC2GPST.m | 1,316 | utf_8 | 167f4f287c2f488c716b03b92fadebdf | %******************************************
% Name: UTC2GPST.m
% Function: convert utc to gpst.
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function [weekno,gpstime] = UTC2GPST(sT)
year=sT.year;
if(year<100)
year=year+2000;
end
month=sT.month;
... |
github | sywcxx/gps-sim-master | WGS2WGS.m | .m | gps-sim-master/gs_function/WGS2WGS.m | 525 | utf_8 | 6e2bc9ac73ebd0c99b404445ef8e4806 | %******************************************
% Name: WGS2WGS.m
% Function: coordinate rotation
% Author: Liwei Jia
% Date: 2015-05-31
% Email: liweij2008@gmail.com
%******************************************
function wgsPVA2 = WGS2WGS(wgsPVA1,Tp)
global CT;
s=[cos(CT.WE*Tp),sin(CT.WE*Tp),0;
-sin(CT.WE*Tp),c... |
github | clum/RCAMAircraftVisualization-master | popmail_demo.m | .m | RCAMAircraftVisualization-master/matlab/tcp_udp_ip_2_0_6/tcp_udp_ip/popmail_demo.m | 2,617 | utf_8 | 9c22cfaef0da0dc0c80247d7344389cd | function popmail_demo(site,user,pass)
% popmail_demo - Demo that read mail from pop mail server (not delete).
% The first lines of each mail will be printed out.
%
% Syntax:
% popmail_demo(site,user,password)
% or
% popmail_demo site user password
% or
% popmail_demo
%
% In the last case you ... |
github | kunaljathal/musixmatch-master | FeatureExtractor.m | .m | musixmatch-master/FeatureExtractor.m | 9,764 | utf_8 | 5b96fb54ed562bba949d174df4bff6a4 | % *************************************************************************
% Kunal Jathal
% MusixMatch
%
% FEATURE EXTRACTOR w/built-in Beat Detection & Chorus Location
%
% Name: FeatureExtractor
%
% Description:
%
% This function implements extracts features from an audio snippet. It does
% this by basically fir... |
github | kunaljathal/musixmatch-master | chorusClassifierFinal.m | .m | musixmatch-master/chorusClassifierFinal.m | 5,433 | utf_8 | fe1242f1d8015972e79e0ac468868b59 | % *************************************************************************
% Kunal Jathal
% MusixMatch
%
% CHORUS CLASSIFIER
%
% Name: chorusClassifierFinal
%
% Description:
%
% This function implements a basic chorus detection classifier. It uses a
% training set of audio snippets that contain either just a vers... |
github | kunaljathal/musixmatch-master | fft2melmx.m | .m | musixmatch-master/fft2melmx.m | 4,881 | utf_8 | e1a49e2e10684f4ed9037b93281d3de6 | function [wts,binfrqs] = fft2melmx(nfft, sr, nfilts, width, minfrq, maxfrq, htkmel, constamp)
% wts = fft2melmx(nfft, sr, nfilts, width, minfrq, maxfrq, htkmel, constamp)
% Generate a matrix of weights to combine FFT bins into Mel
% bins. nfft defines the source FFT size at sampling rate sr.
% Optional ... |
github | muntadher/cost2100model-master | get_para.m | .m | cost2100model-master/matlab/get_para.m | 21,946 | utf_8 | 3de3dba31676db027b4de1730baf0457 | function [paraEx paraSt] = get_para(network,scenario,Nlink,Band,freq,snapRate, snapNum, posBS,posMS,veloMS)
%GET_PARA Generate the external and stochastic parameters of the scenario
%Default call: [paraEx paraSt] = get_para(network,scenario,Nlink,freq,snapRate, snapNum,
%posBS,posMS,veloMS)
%
%------
%Input:
%--... |
github | muntadher/cost2100model-master | get_cluster.m | .m | cost2100model-master/matlab/get_cluster.m | 9,645 | utf_8 | a63fc8e3a33881a2188999b4289ce757 | function cluster = get_cluster( VR, VRtable, paraEx, paraSt )
%GET_CLUSTER function to generate the cluster
%Default call: VR = get_VR( VR, VRtable, paraEx, paraSt)
%------
%Input:
%------
%paraEx,paraSt: external parameters and stochastic parameters
%VRtable: VR assignment table
%VR: VR distribution
%------
%Output:
%... |
github | danialzaman/HuffmanEncoder-master | Huffman.m | .m | HuffmanEncoder-master/Huffman.m | 777 | utf_8 | 854afa1349b838303acada8598dad1bf | function [code]=Huffman(b);
b=b(:)/sum(b);
c=huff5(b);
code=char(getfirstcode(c,length(b)));
%---------------------------------------------------------------
function y= getfirstcode(a,n)
global y
y=cell(n,1);
getsecondcode(a,[])
%----------------------------------------------------------------
function gets... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | getMagnitude.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/getMagnitude.m | 1,051 | utf_8 | da787d5efd3e20b8df1073dc4edbd9ba | % Pixelwise magnitude of a MxNx2 matrix
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | colorspace.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/colorspace.m | 13,594 | utf_8 | 215545a77760d9902c242ec852774e48 | function varargout = colorspace(Conversion,varargin)
% COLORSPACE Convert a color image between color representations.
% B = COLORSPACE(S,A) converts the color representation of image A
% where S is a string specifying the conversion. S tells the
% source and destination color spaces, S = 'dest<-src', or
% ... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | edge_canny.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/edge_canny.m | 9,169 | utf_8 | 8c71cc5732dd5dd95ca6ecb7d9378f7f | function [eout,thresh,mag] = edge_canny(varargin)
[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});
% Check that the user specified a valid number of output arguments
% Transform to a double precision intensity image if necessary
if ~isa(a,'double') && ~isa(a,'single')
a = im2single(a);
end
... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | makeSuperpixelIndexUnique.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/makeSuperpixelIndexUnique.m | 1,684 | utf_8 | f32976a490b308a0ddf5219fe8ec52e2 | % Function to turn per-frame superpixel labels into unique per-shot labels
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | getFlowGradient.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/getFlowGradient.m | 1,690 | utf_8 | 88db2d346a3c9af572e124aec6fcf676 | % Function to compute the gradient of the given optical flow
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the Lice... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | imdir.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/imdir.m | 707 | utf_8 | b7af7a4868ea297cb9ce6561eef81c38 | function D=imdir(dirname,filter)
% IMDIR lists image content in the directory specified by dirname.
% Returns a structure similar to the one returned by MATLAB's dir
% function. Additional filter on the image file name can be specified.
%
% See also DIR
% (c) Michael Rubinstein, MIT
%
if nargin<2
filter='';
e... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | computeSuperpixels.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Preprocessing/computeSuperpixels.m | 3,220 | utf_8 | 49051140290c8e90ad3a7d5337281587 | % Function to compute some given superpixel method for a given shot
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of t... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | computeSLIC.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Preprocessing/computeSLIC.m | 1,904 | utf_8 | c10fa81de70fb903e2935ffb1f3a5ab1 | % Wrapper to compute the SLIC superpixels of a given shot
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | computeColor.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Preprocessing/computeColor.m | 3,142 | utf_8 | a36a650437bc93d4d8ffe079fe712901 | function img = computeColor(u,v)
% computeColor color codes flow field U, V
% According to the c++ source code of Daniel Scharstein
% Contact: schar@middlebury.edu
% Author: Deqing Sun, Department of Computer Science, Brown University
% Contact: dqsun@cs.brown.edu
% $Date: 2007-10-31 21:20:30 (Wed, 31 O... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | computeOpticalFlow.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Preprocessing/computeOpticalFlow.m | 2,923 | utf_8 | 2f6e37e662f4950ef5a748360982d34f | % Wrapper to compute some given optical flow method
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
%... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | loadFlow.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Loaders/loadFlow.m | 1,396 | utf_8 | 8ae11a96191374a22708379442f917ab | % Function to load the stored optical flow based on some given method
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | loadSuperpixels.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Loaders/loadSuperpixels.m | 1,598 | utf_8 | d36fe8befc9a5773c92ffd73cf8aa8eb | % Function to load the superpixel oversegmentation of given method
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of th... |
github | shenjianbing/Saliency-Aware-Video-Object-Segmentation-old--master | readFrame.m | .m | Saliency-Aware-Video-Object-Segmentation-old--master/code/subCode/Loaders/readFrame.m | 2,015 | utf_8 | d74db28c2c85c436b2e31678a9f2f3e6 | % Function to load a particular frame
%
% Copyright (C) 2013 Anestis Papazoglou
%
% You can redistribute and/or modify this software for non-commercial use
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your o... |
github | antivariant/robot1-master | smVrepMotor.m | .m | robot1-master/Simulink/smVrepMotor.m | 2,352 | utf_8 | e608d4c1e5d59812d5f3015e52abe150 | function smVrepMotor(block)
setup(block);
%%%%%%%%%
% Setup %
%%%%%%%%%
function setup(block)
%% Input and Output configuration
block.NumInputPorts = 1;
block.NumOutputPorts = 0;
block.InputPort(1).DatatypeID = 0; % double
block.InputPort(1).Complexity = 'Real';
block.InputPort(1).Dim... |
github | antivariant/robot1-master | smVrepStep.m | .m | robot1-master/Simulink/smVrepStep.m | 1,914 | utf_8 | 28348652a836325254dda80219ae89dc | function smVrepStep(block)
setup(block);
%%%%%%%%%
% Setup %
%%%%%%%%%
function setup(block)
%% Input and Output configuration
block.NumInputPorts = 1;
block.NumOutputPorts = 0;
block.InputPort(1).DatatypeID = 0; % double
block.InputPort(1).Complexity = 'Real';
block.InputPort(1).Dimen... |
github | Ouroboros/lldb-master | member_pointer_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/member_pointer_runme.m | 922 | utf_8 | 5d65cb03abdda4efc4dd89ee739e27b6 | # Example using pointers to member functions
member_pointer
function check(what,expected,actual)
if (expected != actual)
error ("Failed: %s, Expected: %f, Actual: %f",what,expected,actual);
endif
end
# Get the pointers
area_pt = areapt;
perim_pt = perimeterpt;
# Create some objects
s = Square(10);
# Do s... |
github | Ouroboros/lldb-master | director_basic_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/director_basic_runme.m | 1,734 | utf_8 | b6b47f50cd7b79dce886ca9a71659d86 | director_basic
function self=OctFoo()
global director_basic;
self=subclass(director_basic.Foo());
self.ping=@OctFoo_ping;
end
function string=OctFoo_ping(self)
string="OctFoo::ping()";
end
a = OctFoo();
if (!strcmp(a.ping(),"OctFoo::ping()"))
error(a.ping())
endif
if (!strcmp(a.pong(),"Foo::pong();OctFoo... |
github | Ouroboros/lldb-master | director_string_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/director_string_runme.m | 456 | utf_8 | 253061c50e9f69d1d7f90b0bf7c64b21 | director_string
function out=get_first(self)
out = strcat(self.A.get_first()," world!");
end
function process_text(self,string)
self.A.process_text(string);
self.smem = "hello";
end
B=@(string) subclass(A(string),'get_first',@get_first,'process_text',@process_text);
b = B("hello");
b.get(0);
if (!strcmp(b.ge... |
github | Ouroboros/lldb-master | li_boost_shared_ptr_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/li_boost_shared_ptr_runme.m | 15,570 | utf_8 | c59971fb402b541f4e403faab2f3ab68 | 1;
li_boost_shared_ptr;
function verifyValue(expected, got)
if (expected ~= got)
error("verify value failed.");% Expected: ", expected, " Got: ", got)
end
endfunction
function verifyCount(expected, k)
got = use_count(k);
if (expected ~= got)
error("verify use_count failed. Expected: %d Go... |
github | Ouroboros/lldb-master | voidtest_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/voidtest_runme.m | 489 | utf_8 | e8f18ed9dcf24d5fabce570c881dde59 | voidtest
voidtest.globalfunc();
f = voidtest.Foo();
f.memberfunc();
voidtest.Foo_staticmemberfunc();
function fvoid()
end
try
a = f.memberfunc();
catch
end_try_catch
try
a = fvoid();
catch
end_try_catch
v1 = voidtest.vfunc1(f);
v2 = voidtest.vfunc2(f);
if (swig_this(v1) != swig_this(v2))
error
endif
v3 =... |
github | Ouroboros/lldb-master | director_detect_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/director_detect_runme.m | 654 | utf_8 | b67110f81021223aa13bcfcf1a6db401 | director_detect
global MyBar=@(val=2) subclass(director_detect.Bar(),'val',val,@get_value,@get_class,@just_do_it,@clone);
function val=get_value(self)
self.val = self.val + 1;
val = self.val;
end
function ptr=get_class(self)
global director_detect;
self.val = self.val + 1;
ptr=director_detect.A();
end
... |
github | Ouroboros/lldb-master | preproc_constants_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/preproc_constants_runme.m | 533 | utf_8 | 917a1bdadc03d5ce92d7468e9c4c81b2 | preproc_constants
assert(CONST_INT1, 10)
assert(CONST_DOUBLE3, 12.3)
assert(CONST_BOOL1, true)
assert(CONST_CHAR, 'x')
assert(CONST_STRING1, "const string")
# Test global constants can be seen within functions
function test_global()
global CONST_INT1
global CONST_DOUBLE3
global CONST_BOOL1
global CO... |
github | Ouroboros/lldb-master | director_classic_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/director_classic_runme.m | 2,411 | utf_8 | 168e96aff7298695046a230adc01e911 | director_classic
TargetLangPerson=@() subclass(Person(),'id',@(self) "TargetLangPerson");
TargetLangChild=@() subclass(Child(),'id',@(self) "TargetLangChild");
TargetLangGrandChild=@() subclass(GrandChild(),'id',@(self) "TargetLangGrandChild");
# Semis - don't override id() in target language
TargetLangSemiPerson=@()... |
github | Ouroboros/lldb-master | cpp11_strongly_typed_enumerations_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/cpp11_strongly_typed_enumerations_runme.m | 9,095 | utf_8 | 79292c56985d5d809f0dd6ca56afc4f7 | cpp11_strongly_typed_enumerations
function newvalue = enumCheck(actual, expected)
if (actual != expected);
error("Enum value mismatch. Expected: %d Actual: %d", expected, actual);
endif
newvalue = expected + 1;
end
val = 0;
val = enumCheck(cpp11_strongly_typed_enumerations.Enum1_Val1, val);
val = enumCheck(... |
github | Ouroboros/lldb-master | li_std_vector_enum_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/li_std_vector_enum_runme.m | 376 | utf_8 | 3915e1d2851c46706f5ee2878da627c4 | li_std_vector_enum
function check(a, b)
if (a != b)
error("incorrect match");
endif
end
ev = EnumVector();
check(ev.nums(0), 10);
check(ev.nums(1), 20);
check(ev.nums(2), 30);
it = ev.nums.begin();
v = it.value();
check(v, 10);
it.next();
v = it.value();
check(v, 20);
#expected = 10
#ev.nums.each do|val|
... |
github | Ouroboros/lldb-master | exception_order_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/exception_order_runme.m | 898 | utf_8 | a9559c0998ed1178eef715d5314f32e1 | exception_order
function check_lasterror(expected)
if (!strcmp(lasterror.message, expected))
# Take account of older versions prefixing with "error: " and adding a newline at the end
if (!strcmp(regexprep(lasterror.message, 'error: (.*)\n$', '$1'), expected))
error(["Bad exception order. Expected: \"",... |
github | Ouroboros/lldb-master | director_abstract_runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/test-suite/octave/director_abstract_runme.m | 993 | utf_8 | 010e2a8f3e12a660ec6f6b89f629f5fd | director_abstract
MyFoo=@() subclass(director_abstract.Foo(),@ping);
function out=ping(self)
out="MyFoo::ping()";
end
a = MyFoo();
if (!strcmp(a.ping(),"MyFoo::ping()"))
error(a.ping())
endif
if (!strcmp(a.pong(),"Foo::pong();MyFoo::ping()"))
error(a.pong())
endif
MyExample1=@() subclass(director_abstract.... |
github | Ouroboros/lldb-master | runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/octave/class/runme.m | 1,017 | utf_8 | 402733d5ff5c5f0ec147a476914de00a | # file: runme.m
# This file illustrates the proxy class C++ interface generated
# by SWIG.
swigexample
# ----- Object creation -----
printf("Creating some objects:\n");
c = swigexample.Circle(10)
s = swigexample.Square(10)
# ----- Access a static member -----
printf("\nA total of %i shapes were created\n", swigex... |
github | Ouroboros/lldb-master | runme.m | .m | lldb-master/tools/swigwin-3.0.5/Examples/octave/module_load/runme.m | 1,662 | utf_8 | 383122eccc45eeee51c841b36eab5129 | # file: runme_args.m
# load module
clear all;
swigexample;
assert(cvar.ivar == ifunc);
assert(exist("swigexample","var"));
clear all
swigexample;
assert(cvar.ivar == ifunc);
assert(exist("swigexample","var"));
clear all
# load module in a function globally before base context
clear all;
function testme
swigexample;... |
github | FMassin/m-NnK-master | wsac.m | .m | m-NnK-master/NaiNo-Kami/NNK/wsac.m | 2,116 | utf_8 | 33dc0e92734989978bb704c4c28e1bc0 | %WSAC Write SAC binary files.
% WSAC('sacfile') writes a SAC (seismic analysis code) binary
% format file
%
% Default byte order is big-endian. M-file can be set to default
% little-endian byte order.
%
% Examples:
%
% wsac('KATH.R',kath);
%
% wsac('SQRL.R',sqrl,'AAK.R',aak);
%
% by Michael... |
github | FMassin/m-NnK-master | lh.m | .m | m-NnK-master/NaiNo-Kami/NNK/lh.m | 12,831 | utf_8 | cb469d551acd700d0ac73aed84fd72d7 | %LH list SAC header
%
% Read or set matlab variables to SAC header variables from
% SAC files read in to matlab with rsac.m
%
% Examples:
%
% To list all defined header variables in the file KATH:
% lh(KATH)
%
% To assign the SAC variable DELTA from station KATH to
% the matlab variable dt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.