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: three_crossover_mutation.m
    path of file: ./repos/Mathematics/mm/matlab/2018/F/code/three_GA
    
    the code of the file until where you have to start completion: %%{ 
% 交叉
% in： 种群 grop_soure ，航班表 Flight_table，登机口类型表 Gate_table，交叉概率 cros_weight
% 单点交叉  k之后的基因全部 交换
function [grop_cros] = three_crossover_mutation(grop_soure, Flight_table, Gate_table, cros_weight)
    FS = size(Flight_table);
    %GS = size(Gate_table);
    grop_size = size(grop_soure);
    grop_nums = grop_size(3); % 种群数量
    Flight_nums = FS(1);      % 航班数量   基因数量
    % Gate_nums = GS(2);      % 登机口数量

    grop_cros = grop_soure; % 初始化交叉后的种群
    %disp(Flight_nums);
    
    for i = 1 : 2 : grop_nums% 前后两个父代 交叉产生子代，再从交叉点之后检查，不合适的基因，使
    
function [grop_cros] = three_crossover_mutation(grop_soure, Flight_table, Gate_table, cros_weight)
    FS = size(Flight_table);
    %GS = size(Gate_table);
    grop_size = size(grop_soure);
    grop_nums = grop_size(3); % 种群数量
    Flight_nums = FS(1);      % 航班数量   基因数量
    % Gate_nums = GS(2);      % 登机口数量

    grop_cros = grop_soure; % 初始化交叉后的种群
    %disp(Flight_nums);
    
    for i = 1 : 2 : grop_nums% 前后两个父代 交叉产生子代，再从交叉点之后检查，不合适的基因，使用变异产出合适的基于
       % 单点交叉产出交叉点 cros_point
       cros_point = ceil(rand() * (Flight_nums-1)); % 1 ~ N-1
       % disp(cros_point);
       
       % 双点交叉  cros_point1 cros_point2
       %{
        flag = 1;
        while flag == 1
            cros_point1 = ceil(rand() * Flight_nums);
            cros_point2 = ceil(rand() * Flight_nums);
            if cros_point2 > cros_point1
                flag = 0;
                break;
            end