You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: clique_graph.m
    path of file: ./repos/CBIG/external_packages/matlab/default_packages/matlab_bgl
    
    the code of the file until where you have to start completion: function [A] = clique_graph(n,varargin)
% CLIQUE_GRAPH Generate the clique graph or bipartite clique graph
%
% The clique graph is a graph with as many edges as possible.
%
% A = clique_graph(n) generates a clique with n vertices and returns the
% adjacency matrix A.
%
% A = clique_graph([m n]) generates a bipartite clique with m vertices on
% one side and n vertices on the other side.
%
% A = cycle_graph(...,options) can generate variants of the clique graph
% [...] = cycle_graph(n,options) can generate variants on the cycle graph
%   options.selfloops: add self loops to the graph [{0} | 1]

    
function [A] = clique_graph(n,varargin)
% CLIQUE_GRAPH Generate the clique graph or bipartite clique graph
%
% The clique graph is a graph with as many edges as possible.
%
% A = clique_graph(n) generates a clique with n vertices and returns the
% adjacency matrix A.
%
% A = clique_graph([m n]) generates a bipartite clique with m vertices on
% one side and n vertices on the other side.
%
% A = cycle_graph(...,options) can generate variants of the clique graph
% [...] = cycle_graph(n,options) can generate variants on the cycle graph
%   options.selfloops: add self loops to the graph [{0} | 1]
%
% Example:
%   A = clique_graph(4);
%   test_planar_graph(A);
%   A = clique_graph(5);
%   test_planar_graph(A);

% David Gleich
% Copyright, Stanford University, 2008

%% History
%  2007-10-01: Initial coding
%%

options = struct('selfloops', 0);
options = merge_options(options,varargin{:});

if isscalar(n)
    A = ones(n,n);
    if ~options.selfloops,
        A = A - diag(diag(A));
    end