⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 args.cc

📁 贝叶斯优化算法是一种新的演化算法
💻 CC
字号:
// ################################################################################
//
// name:          args.cc
//
// author:        Martin Pelikan
//
// purpose:       functions for manipulation with arguments passed to a program
//
// last modified: February 1999
//
// ################################################################################

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#include "args.h"

// ================================================================================
//
// name:          isArg
//
// function:      checks whether there is a particular parameter in command line 
//                parameters
//
// parameters:    s............the parameter to look for
//                argc.........the number of arguments sent to the program
//                argv.........an array of arguments sent to the program (including
//                             its name and the path)
//
// returns:       (int) 1 if the parameter has been found, 0 otherwise
//
// ================================================================================

int isArg(char *s, int argc, char **argv)
{

  for (int i=0; i<argc; i++)  
      if (!strcmp(s,argv[i]))
	 return 1;

  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -