function [varargout] = GraphGIUBrowseGraph(varargin)
% Loads GIU dialog which allows browsing a graph
%
% Receives:
% Graph - structure - (optional) The graph loaded with GraphLoad or WikiGraphLoad
% Returns:
% Path - vector - Path; list of nodes selected by the user.
%
% See Also:
% GraphLoad, GraphGetGraphVariables, WikiGraphLoad, GraphGIUBrowseGraph
%
% Example:
% Path = GraphGIUBrowseGraph(WikiGraph);
% Created:
%
% Lev Muchnik 27/07/2005, lev@topspin.co.il, +972-54-4326496
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Dispatcher
if nargin>0 & ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK
try
% [varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
catch
disp([lasterr ' ( ' varargin{1} ' )' ]);
end
else % Just load:
fig = GraphGIUBrowseGraph('InitGUI');
% uiwait(fig);
if nargout > 0 & ishandle(fig)
varargout{1} = [];
% delete(fig);
elseif nargout > 0
varargout{1} = [];
% elseif ishandle(fig)
% delete (fig);
end
end
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function Properties = GetProperties()
Properties = [];
Properties.ControlPanelHeight = 30;
Properties.ButtonPanelHeight = 30;
Properties.PathPanelHeight = 20;
Properties.ButtonSize = [60 17];
Properties.PopupMenuSize = [120 17];
Properties.InterbuttonGap = 10;
Properties.DetailsPanelWidth = 175;
Properties.ScrollBarWidth = 14;
Properties.NodeDetailsListBoxWidth = 200;
Properties.NodeDetailsListBoxGap = 20;
Properties.MaxNumberOfListElements = 500;
Properties.Font = [];
[FilePath FileName] = fileparts(mfilename('fullpath'));
FileName = [FilePath '\' FileName '.mat'];
if exist(FileName,'file')==2
try
Loaded = load(FileName,'-mat');
Fields = fieldnames(Loaded.Properties);
for i = 1 : numel(Fields)
Properties = setfield(Properties,Fields{i},getfield(Loaded.Properties,Fields{i}));
end
catch
end
end
%% Initialize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function fig = InitGUI
%% Initialize parameters
Properties = GetProperties();
ScreenSize = get(0,'ScreenSize');
FigureSize = [ScreenSize(3)*3/4 ScreenSize(4)*3/4];
FigureSize = round([(ScreenSize(3)-FigureSize(1))/2 (ScreenSize(4)-FigureSize(2))/2 FigureSize(1) FigureSize(2) ]);
set(0,'Units','points');
%% Create Figure;
fig = figure('Units','Points','Position',FigureSize,...
'Tag',['Figure_' mfilename],'DoubleBuffer','on',...
'MenuBar','none','NumberTitle','off','WindowStyle','normal','Resize','on',...
'Color',get(0,'defaultUicontrolBackgroundColor'),'Visible','on',...
'ResizeFcn','GraphGIUBrowseGraph(''Figure_GraphGIUBrowseGraph_ResizeFcn'',gcbo,[],guidata(gcbo));',...
'DeleteFcn','GraphGIUBrowseGraph(''Figure_GraphGIUBrowseGraph_DeleteFcn'',gcbo,[],guidata(gcbo));',...
'Name','Graph Select Dialog'...
);
%
% 'CreateFcn','BAS_MainFigure(''Figure_BrukerAnalysis_CreateFcn'',gcbo,[],guidata(gcbo));',...
%
FigureSize = get(fig,'Position');
Sz = [1 FigureSize(4)-Properties.ControlPanelHeight-1 FigureSize(3)-2 Properties.ControlPanelHeight];
ControlsPanel = uicontrol(fig,'Style','frame','Units','Points','Position',round(Sz),...
'Visible','on','Tag','ControlsPanel_Frame');
Sz = [1 FigureSize(4)-Properties.PathPanelHeight-Properties.ControlPanelHeight-2 FigureSize(3)-2 Properties.PathPanelHeight];
PathPanel = uicontrol(fig,'Style','frame','Units','Points','Position',round(Sz),...
'Visible','on','Tag','PathPanel_Frame');
Sz = get(ControlsPanel,'Position');
Sz = [Sz(3)-Properties.ButtonSize(1)-Properties.InterbuttonGap Sz(2) + (Properties.ControlPanelHeight-Properties.ButtonSize(2))/2 Properties.ButtonSize(1) Properties.ButtonSize(2)];
CloseButton = uicontrol(fig,'Style','pushbutton','Units','Points','Position',round(Sz),...
'Visible','on','Tag','CloseButton_PushButton','String','Close',...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_CloseButton_Click'',gcbo,[],guidata(gcbo));'...
);
Sz = get(ControlsPanel,'Position');
Sz = [Properties.InterbuttonGap Sz(2) + (Properties.ControlPanelHeight-Properties.PopupMenuSize(2))/2 Properties.PopupMenuSize(1) Properties.PopupMenuSize(2)];
SelectedGraphPopup = uicontrol(fig,'Style','popupmenu','Units','Points','Position',round(Sz),...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_VariablesListbox_ButtonDown'',gcbo,[],guidata(gcbo));',...
'Visible','on','Tag','SelectedGraphButton_PushButton','String',GraphGetGraphVariables()...
);
Sz = get(SelectedGraphPopup,'Position');
Sz = [Sz(1)+Sz(3)+1 Sz(2) Properties.ButtonSize(1) Properties.ButtonSize(2)];
VariablesListRefreshPushButton = uicontrol(fig,'Style','pushbutton','Units','Points','Position',round(Sz),...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_VariablesListbox_ButtonDown'',gcbo,[],guidata(gcbo));',...
'Visible','on','Tag','VariablesListRefresh_PushButton','String','Refresh'...
);
Sz = get(ControlsPanel,'Position');
Sz2 = Sz(2) + (Properties.ControlPanelHeight-Properties.PopupMenuSize(2))/2;
Sz = get(VariablesListRefreshPushButton,'Position');
Sz = [Sz(1)+Sz(3)+Properties.InterbuttonGap Sz2 Properties.PopupMenuSize(1) Properties.PopupMenuSize(2)];
SortOrderPopup = uicontrol(fig,'Style','popupmenu','Units','Points','Position',round(Sz),...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_SortOrderSelect_ButtonDown'',gcbo,[],guidata(gcbo));',...
'Visible','on','Tag','SortOrder_Popup','String',{ 'ID', 'Name' }...
);
Sz = get(ControlsPanel,'Position');
Sz2 = Sz(2) + (Properties.ControlPanelHeight-Properties.ButtonSize(2))/2;
Sz = get(SortOrderPopup,'Position');
Sz = [Sz(1)+Sz(3)+Properties.InterbuttonGap Sz2 Properties.ButtonSize(1)*1.5 Properties.ButtonSize(2)];
SortDirectionToggleButton = uicontrol(fig,'Style','togglebutton','Units','Points','Position',round(Sz),...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_SortDirection_ToggleButton'',gcbo,[],guidata(gcbo));',...
'Visible','on','Tag','SortDirection_ToggleButton','String','Now: Ascending' , 'Value',1 ...
);
Sz = get(ControlsPanel,'Position');
Sz2 = Sz(2) + (Properties.ControlPanelHeight-Properties.ButtonSize(2))/2;
Sz = get(SortDirectionToggleButton ,'Position');
Sz = [Sz(1)+Sz(3)+Properties.InterbuttonGap Sz2 Properties.ButtonSize(1) Properties.ButtonSize(2)];
FontSelectPushbutton = uicontrol(fig,'Style','pushbutton','Units','Points','Position',round(Sz),...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_FontSelectSelect_ButtonDown'',gcbo,[],guidata(gcbo));',...
'Visible','on','Tag','FontSelect_Pushbutton','String','Select Font'...
);
Sz = get(FontSelectPushbutton,'Position');
Sz1 = Sz(1)+Sz(3) + Properties.InterbuttonGap;
Sz = get(ControlsPanel,'Position');
Sz = [Sz1 Sz(2) + (Properties.ControlPanelHeight-Properties.PopupMenuSize(2))/2 0.5*Properties.PopupMenuSize(1) Properties.PopupMenuSize(2)];
BrowseDirectionPopup = uicontrol(fig,'Style','popupmenu','Units','Points','Position',round(Sz),...
'Callback','GraphGIUBrowseGraph(''GraphGIUBrowseGraph_BrowseDirectionbox_ButtonDown'',gcbo,[],guidata(gcbo));',...
'Visible','on','Tag','BrowseDirection_Popup ','String',{'direct','inverse','both'}...
);
Sz = get(BrowseDirectionPopup ,'Position');
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
复杂网络的matlab源程序(好不容易找到) (132个子文件)
GraphGIUBrowseGraph.m 52KB
GraphExportToGML.m 12KB
GraphPlotNodesDegreeDistributionNature.m 7KB
GraphPlotNodesDegreeDistribution.m 7KB
GraphGIUSelectGraph.m 7KB
ObjectCreateGraph.m 5KB
GraphLoad.m 4KB
GraphBetweennessDegreeHierarchy.m 4KB
GraphExportToFile.m 3KB
GraphDrawGraphViz.m 3KB
GraphGetNodeProperty.m 3KB
mexGraphClusteringCoefficient.m 3KB
GraphDrawPajek.m 3KB
GraphCountUnderectionality.m 3KB
GraphNodeDistancesDistribution.m 3KB
mexGraphAverageNearestNeighborDegree.m 2KB
GraphCountNodesDegree.m 2KB
mexGraphNodeCountShortestPasses.m 2KB
GraphNodeRemove.m 2KB
GraphLinkAdd.m 2KB
GraphSetNodeProperty.m 2KB
GraphBetweennessCentrality.m 2KB
GraphLinkRemove.m 2KB
mexGraphNodeConnectivityFunnel.m 2KB
mexGraphBoxCounting.m 2KB
mexGraphNodeConnectivity.m 2KB
GraphRemoveUnlinkedNodes.m 2KB
GraphCountStatistics.m 2KB
mexGraphPageRank.m 2KB
mexGraphBetweennessCentrality.m 2KB
ObjectCreate.m 2KB
mexNodeSurroundings.m 2KB
GraphLinkFind.m 2KB
GraphComponents.m 2KB
GraphNodeFirstNeighbours.m 2KB
GraphComponentsDirected.m 2KB
GraphSaveAsDirectedListToFile.m 2KB
mexGraphConnectedComponents.m 1KB
mexGraphMergeNodes.m 1KB
GraphNodeAdd.m 1KB
mexBetweenesCentrality.m 1KB
FIOProcessInputParameters.m 1KB
mexGraphFlowHierarchy.m 1KB
FIOTestInput.m 1KB
mexGraphHITS.m 1KB
mexGraphSqueeze.m 1KB
GraphGetNodeNames.m 1KB
GraphGenerateCompleteBipartiteGraph.m 1KB
GraphCreateRandomGraph.m 1KB
mexNodeNeighbours.m 1KB
mexGraphCreateRandomGraph.m 1KB
mexGraphNeighboursOverlap.m 1KB
mexGraphAllNodeShortestPasses.m 1KB
GraphKShell.m 1KB
GraphGenerateCompleteGraph.m 1KB
GraphConvertFromV2.m 1KB
mexGraphKCore.m 1KB
GraphCountNodeDegree.m 1KB
ObjectAddSignature.m 1KB
GraphRemoveDuplicateLinks.m 1KB
FIOAddParameter.m 1KB
GraphGenerateCompleteKPartiteGraph.m 1KB
GraphCountNumberOfNodes.m 1013B
ObjectIsType.m 1006B
mexCirclesOfDegree.m 969B
mexGraphGeneratePoissonRandomGraph.m 946B
GraphGetGraphVariables.m 920B
ObjectGetType.m 850B
GraphSaveToFile.m 830B
GraphLoadFromFile.m 762B
GraphNodeIDs.m 752B
GraphCountNumberOfLinks.m 745B
GraphMakeUndirected.m 725B
FIOParameterNames.m 709B
mexGraphNodeRemove.m 701B
GraphReverseLinks.m 580B
FigureHandle.m 316B
GraphGIUBrowseGraph.mat 488B
mexGraphBoxCounting.mexw32 128KB
mexGraphNodeConnectivityFunnel.mexw32 124KB
mexCirclesOfDegree.mexw32 124KB
mexGraphHITS.mexw32 120KB
mexGraphNodeCountShortestPasses.mexw32 120KB
mexGraphPageRank.mexw32 116KB
mexGraphCountCircles.mexw32 116KB
mexBetweenesCentrality.mexw32 116KB
mexGraphNodeConnectivity.mexw32 116KB
mexNodeSurroundings.mexw32 112KB
mexGraphCreateRandomGraph.mexw32 108KB
mexGraphFlowHierarchy.mexw32 108KB
mexGraphClustersList.mexw32 108KB
mexGraphConnectedComponents.mexw32 108KB
mexGraphAllNodeShortestPasses.mexw32 108KB
mexGraphAverageNearestNeighborDegree.mexw32 104KB
mexGraphBetweennessCentrality.mexw32 104KB
mexGraphClusteringCoefficient.mexw32 104KB
mexGraphAllNodeNeighbours.mexw32 104KB
mexGraphKCore.mexw32 100KB
mexNodeNeighbours.mexw32 96KB
mexGraphMergeNodes.mexw32 96KB
共 132 条
- 1
- 2
sxwang05
- 粉丝: 4
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 80632180.jpg
- 李旭国体注入追踪[5.0](1).zip
- semantic.c
- C语言基础-C语言编程基础之Leetcode编程题解之第39题组合总和.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第38题外观数列.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第37题解数独.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第36题有效的数独.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第35题搜索插入位置.zip
- index.wxml
- C语言基础-C语言编程基础之Leetcode编程题解之第33题搜索旋转排序数组.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论30