2021/04,江端さんの技術メモ

/////////////////////////////////////////
//  gcc -g life_0813.c -o life_0813
/////////////////////////////////////////

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

/// グローバル変数で強行する
struct date
{
  int day;
  int month;
  int year;
};

enum sex {woman, man};
enum marrige {unmarried, married, divorce, remarriage};
 

struct person {
  int age; //年齢
  enum sex sex;  // 性別
  enum marrige marrige;  // 成婚

  struct person *prev;  /* 前の構造体を示すポインタ */
  struct person *next;  /* 次の構造体を示すポインタ */
};



double men[100],women[100]; // 年齢別人口 平成22年データ 単位は1000人
double men_death_rate[100],women_death_rate[100];  //死亡率 平成22年データ
double men_unmarried_rate[100],women_unmarried_rate[100];  //未婚率 平成22年データ

double men_existance_matching_rate[100];	// 有配偶率 (平成22年)
double women_existance_matching_rate[100];	// 有配偶率 (平成22年)
// 初婚、再婚関係なく、その世代に対して。
// 結婚している比率

double men_divorce_rate[100]; // 有配偶離婚率
double women_divorce_rate[100]; // 有配偶離婚率


// ○ 結婚している人に対する離婚率
double men_remarrige_ratio[100];
double women_remarrige_ratio[100]; // 再婚率 (2010年)

int initial_data();// 死亡率 平成22年データ (資料  厚生労働省大臣官房統計情報部人口動態・保健統計課「人口動態統計」)							

void delete_person(
				  struct person **p_person,
				  struct person **p_first_person,
				  struct person **p_last_person)   // メモリを消す処理e
{
  struct person *temp_p_person;

  if (*p_first_person == *p_last_person){
	//printf("p_first_person == p_last_person\n");
	exit(0);
  }

  if (*p_person == *p_first_person){ // 最初の場合
	*p_first_person = (*p_person)->next;
	(*p_first_person)->prev = NULL;
	//printf("C1");
	free(*p_person);
	*p_person = *p_first_person;
  }
  else if (*p_person == *p_last_person){ //最後の場合
	*p_last_person = (*p_person)->prev;
	(*p_last_person)->next = NULL;
	//printf("C2");
	free(*p_person);
	*p_person = *p_last_person;
  }
  else {
	(*p_person)->next->prev = (*p_person)->prev;
	(*p_person)->prev->next = (*p_person)->next;
	temp_p_person = (*p_person)->prev; // 一つ前のポインタに退避
	//printf("C3");
	free(*p_person);

	*p_person = temp_p_person;
  }

}


population_counter(struct person *p_first_person)
{
  struct person *p_person;
  int count;

  p_person = p_first_person;  //最初の一人
  count = 0;
  while (p_person != NULL){
	count++;
	p_person = p_person->next;
  }
  //printf("count=%d \n", count);
}


int main ()
{
  int i, k, count;
  struct person *p_person, *p_prev_person, *p_next_person;
  struct person *p_first_person, *p_last_person;
  int women_pop, men_pop;
  double dd;


  // 日本国民一億人のデータを作る 

  //printf("checked -1.\r\n");

  initial_data();  // 初期データ入力

  //printf("checked 0.\r\n");

  srand(10); // 乱数のシード


  ////////////  現状データの入力 ////////////
  
  // 最初の一人(0人目)  99歳の女性と仮定する。
  p_person= (struct person *)malloc(sizeof(struct person));
  if(p_person == NULL) {
      printf("メモリが確保できません\n");
      exit(EXIT_FAILURE);
   }
  p_person->sex = woman;
  p_person->age = 99;


  p_first_person = p_person;  //最初の一人

  // (最後に)ポインタをリンクする
  p_person->prev = NULL;
  p_prev_person = p_person;

  for(i=99; i>=0; i--){
	women_pop = women[i] * 1000;
	men_pop = men[i] * 1000;

	for(k=0; k<women_pop; k++){
	  p_person= (struct person *)malloc(sizeof(struct person));
	  if(p_person == NULL) {
		printf("メモリが確保できません %d\n",i);
		exit(EXIT_FAILURE);
	  }
	  
	  p_person->sex = woman;
	  p_person->age = i;

	  // (最後に)ポインタをリンクする
	  p_prev_person->next = p_person;
	  p_person->prev = p_prev_person;
	  p_person->next = NULL;
	  p_prev_person = p_person;
	  
	}

	for(k=0; k<men_pop; k++){
	  p_person= (struct person *)malloc(sizeof(struct person));
	  if(p_person == NULL) {
		printf("メモリが確保できません %d\n",i);
		exit(EXIT_FAILURE);
	  }
	  
	  p_person->sex = man;
	  p_person->age = i;

	  // (最後に)ポインタをリンクする
	  p_prev_person->next = p_person;
	  p_person->prev = p_prev_person;
	  p_person->next = NULL;
	  p_prev_person = p_person;
	  
	}
  }
  p_last_person = p_person;



  //printf("checked 1.\n");

  // 既婚(離婚も含む)・未婚の入力 (乱数で入力する) (離婚人口も含む)
  p_person = p_first_person;  //最初の一人
  while (p_person != NULL){

	if (p_person->sex == woman){ // 女性の場合
	  if (women_unmarried_rate[p_person->age] >= rand()/32768.0){
		p_person->marrige = unmarried;
	  }
	  else {
		p_person->marrige = married;
	  }
	}
	else{// 男性の場合
	  if (men_unmarried_rate[p_person->age] >= rand()/32768.0){
		p_person->marrige = unmarried;
	  }
	  else {
		p_person->marrige = married;
	  }
	}
	p_person = p_person->next;
  }
  //printf("count=%d \n", count);

  // 離婚させる (ここは男女で分ける必要ないが、詳細データが手に入った時に反映)
  p_person = p_first_person;  //最初の一人
  while (p_person != NULL){

	if (p_person->sex == woman){ // 女性の場合
	  if ((p_person->marrige == married) || (p_person->marrige == remarriage)){ // 結婚している

		if( women_divorce_rate[p_person->age] >= rand()/32768.0){
		  p_person->marrige = divorce; // 離婚させる
		}
	  }
	}
	else{// 男性の場合
	  if ((p_person->marrige == married) || (p_person->marrige == remarriage)){ // 結婚している
		if( men_divorce_rate[p_person->age] >= rand()/32768.0){
		  p_person->marrige = divorce; // 離婚させる
		}
	  }
	}
	p_person = p_person->next;
  }

  // 再婚させる 

  // 離婚している人に対する再婚率 (に変換する式)
  //    = 
  // 再婚率 x その世代の人口数 / 離婚(×未婚、結婚)人口
  // としなければなない
  

  // 上記の解釈間違いの可能性あり


  // 離婚した人を再婚させる (ここは男女で分ける必要がある)

  p_person = p_first_person;  //最初の一人

  while (p_person != NULL){
	if (p_person->sex == woman){ // 女性の場合
	  if (p_person->marrige == divorce){ // 離婚している
		if( women_remarrige_ratio[p_person->age] >= rand()/32768.0){
		  p_person->marrige = remarriage; // 再婚させる
		}
	  }
	}
	else{// 男性の場合
	  if (p_person->marrige == divorce){ // 離婚している
		if( men_remarrige_ratio[p_person->age] >= rand()/32768.0){
		  p_person->marrige = remarriage; // 再婚させる
		}
	  }
	}
	p_person = p_person->next;
  }
		
 // (T.B.D.)
	
  //初期値チェックルーチン


#if 1
  p_person = p_first_person;  //最初の一人

  printf("性別,年齢,成婚\n");

  while (p_person != NULL){
	
	if (p_person->sex == woman)
	  printf("女性,");
	else
	  printf("男性,");

	printf("%d,",p_person->age);

	if (p_person->marrige == unmarried)
	  printf("未婚\n");
	else if (p_person->marrige == married)
	  printf("結婚\n");
	else if (p_person->marrige == divorce)
	  printf("離婚\n");
	else if (p_person->marrige == remarriage)
	  printf("再婚\n");
	
	p_person = p_person->next;
  }

  //printf("count=%d \n", count);

#endif


  //初期値チェックルーチン 終り

  ////////////  現状データの入力 終わり ////////////

  p_person = p_first_person;  //最初の一人

  count = 0;
  while (p_person != NULL){
	count++;
	p_person = p_person->next;
  }
  //printf("count=%d \n", count);

  // (1)100歳以上は、いない(死んだ)ことにする。
  //     → person->age が100になったらオブジェクトを開放

#if 0 
//時間計測の為、コメントアウト

  for(i=0; i<100; i++){//100年分を回す
	
	//printf("%d\n",i);
	
	p_person = p_first_person;  //最初の一人

	while (p_person != NULL){
	  p_person->age++;
	  if (p_person->age == 100){ //100歳以上は削除
		  delete_person(&p_person,&p_first_person,&p_last_person);
	  }
	  p_person = p_person->next;
	}

	population_counter(p_first_person);
  }

  
  p_person = p_first_person;  //最初の一人

  count = 0;
  while (p_person != NULL){
	count++;
	p_person = p_person->next;
  }
  //printf("count=%d \n", count);
  
#endif // 時間計測の為、コメントアウト

}



int initial_data()
{
	men[ 0]=549   ; men_death_rate[ 0]=0.0025   ;
	men[ 1]=535   ; men_death_rate[ 1]=0.0004   ;
	men[ 2]=535   ; men_death_rate[ 2]=0.0002   ;	
	men[ 3]=550   ; men_death_rate[ 3]=0.0002   ;	
	men[ 4]=548   ; men_death_rate[ 4]=0.0002   ;

	men[ 5]=544   ; men_death_rate[ 5]=0.0001   ;
	men[ 6]=542   ; men_death_rate[ 6]=0.0001   ;
	men[ 7]=562   ; men_death_rate[ 7]=0.0001   ;
	men[ 8]=574   ; men_death_rate[ 8]=0.0001   ;
	men[ 9]=589   ; men_death_rate[ 9]=0.0001   ;

	men[10]=597   ; men_death_rate[10]=0.0001   ;
	men[11]=604   ; men_death_rate[11]=0.0001   ;
	men[12]=604   ; men_death_rate[12]=0.0001   ;
	men[13]=613   ; men_death_rate[13]=0.0001   ;
	men[14]=610   ; men_death_rate[14]=0.0001   ;

	men[15]=607   ; men_death_rate[15]=0.0003   ;
	men[16]=627   ; men_death_rate[16]=0.0003   ;
	men[17]=632   ; men_death_rate[17]=0.0003   ;
	men[18]=621   ; men_death_rate[18]=0.0003   ;
	men[19]=631   ; men_death_rate[19]=0.0003   ;

	men[20]=623   ; men_death_rate[20]=0.0006   ;
	men[21]=632   ; men_death_rate[21]=0.0006   ;
	men[22]=648   ; men_death_rate[22]=0.0006   ;
	men[23]=668   ; men_death_rate[23]=0.0006   ;
	men[24]=683   ; men_death_rate[24]=0.0006   ;

	men[25]=697   ; men_death_rate[25]=0.0007   ;
	men[26]=723   ; men_death_rate[26]=0.0007   ;
	men[27]=745   ; men_death_rate[27]=0.0007   ;
	men[28]=754   ; men_death_rate[28]=0.0007   ;
	men[29]=754   ; men_death_rate[29]=0.0007   ;

	men[30]=764   ; men_death_rate[30]=0.0008   ;
	men[31]=797   ; men_death_rate[31]=0.0008   ;
	men[32]=818   ; men_death_rate[32]=0.0008   ;
	men[33]=852   ; men_death_rate[33]=0.0008   ;
	men[34]=873   ; men_death_rate[34]=0.0008   ;

	men[35]=917   ; men_death_rate[35]=0.0010   ;
	men[36]=960   ; men_death_rate[36]=0.0010   ;
	men[37]=1012  ; men_death_rate[37]=0.0010   ;
	men[38]=1028  ; men_death_rate[38]=0.0010   ;
	men[39]=1010  ; men_death_rate[39]=0.0010   ;

	men[40]=982   ; men_death_rate[40]=0.0015   ;
	men[41]=954   ; men_death_rate[41]=0.0015   ;
	men[42]=937   ; men_death_rate[42]=0.0015   ;
	men[43]=916   ; men_death_rate[43]=0.0015   ;
	men[44]=915   ; men_death_rate[44]=0.0015   ;

	men[45]=713   ; men_death_rate[45]=0.0024   ;
	men[46]=882   ; men_death_rate[46]=0.0024   ;
	men[47]=826   ; men_death_rate[47]=0.0024   ;
	men[48]=805   ; men_death_rate[48]=0.0024   ;
	men[49]=778   ; men_death_rate[49]=0.0024   ;

	men[50]=765   ; men_death_rate[50]=0.0038   ;
	men[51]=770   ; men_death_rate[51]=0.0038   ;
	men[52]=783   ; men_death_rate[52]=0.0038   ;
	men[53]=761   ; men_death_rate[53]=0.0038   ;
	men[54]=740   ; men_death_rate[54]=0.0038   ;

	men[55]=776   ; men_death_rate[55]=0.0063   ;
	men[56]=803   ; men_death_rate[56]=0.0063   ;
	men[57]=803   ; men_death_rate[57]=0.0063   ;
	men[58]=850   ; men_death_rate[58]=0.0063   ;
	men[59]=896   ; men_death_rate[59]=0.0063   ;

	men[60]=949   ; men_death_rate[60]=0.0093   ;
	men[61]=1018  ; men_death_rate[61]=0.0093   ;
	men[62]=1111  ; men_death_rate[62]=0.0093   ;
	men[63]=1099  ; men_death_rate[63]=0.0093   ;
	men[64]=1042  ; men_death_rate[64]=0.0093   ;

	men[65]=645   ; men_death_rate[65]=0.0146   ;
	men[66]=684   ; men_death_rate[66]=0.0146   ;
	men[67]=825   ; men_death_rate[67]=0.0146   ;
	men[68]=794   ; men_death_rate[68]=0.0146   ;
	men[69]=809   ; men_death_rate[69]=0.0146   ;

	men[70]=780   ; men_death_rate[70]=0.0227   ;
	men[71]=698   ; men_death_rate[71]=0.0227   ;
	men[72]=599   ; men_death_rate[72]=0.0227   ;
	men[73]=627   ; men_death_rate[73]=0.0227   ;
	men[74]=631   ; men_death_rate[74]=0.0227   ;

	men[75]=616   ; men_death_rate[75]=0.0396   ;
	men[76]=571   ; men_death_rate[76]=0.0396   ;
	men[77]=521   ; men_death_rate[77]=0.0396   ;
	men[78]=501   ; men_death_rate[78]=0.0396   ;
	men[79]=470   ; men_death_rate[79]=0.0396   ;

	men[80]=430   ; men_death_rate[80]=0.0705   ;
	men[81]=385   ; men_death_rate[81]=0.0705   ;
	men[82]=350   ; men_death_rate[82]=0.0705   ;
	men[83]=316   ; men_death_rate[83]=0.0705   ;
	men[84]=281   ; men_death_rate[84]=0.0705   ;

	men[85]=247   ; men_death_rate[85]=0.1200   ;
	men[86]=202   ; men_death_rate[86]=0.1200   ;
	men[87]=158   ; men_death_rate[87]=0.1200   ;
	men[88]=122   ; men_death_rate[88]=0.1200   ;
	men[89]=98    ; men_death_rate[89]=0.1200   ;

	men[90]=78    ; men_death_rate[90]=0.2025   ;
	men[91]=67    ; men_death_rate[91]=0.2025   ;
	men[92]=44    ; men_death_rate[92]=0.2025   ;
	men[93]=36    ; men_death_rate[93]=0.2025   ;
	men[94]=28    ; men_death_rate[94]=0.2025   ;

	men[95]=21    ; men_death_rate[95]=0.3188   ;
	men[96]=15    ; men_death_rate[96]=0.3188   ;
	men[97]=11    ; men_death_rate[97]=0.3188   ;
	men[98]=7     ; men_death_rate[98]=0.3188   ;
	men[99]=5     ; men_death_rate[99]=0.3188   ;

	women[ 0]=520; women_death_rate[ 0]=0.0021  ;
	women[ 1]=510; women_death_rate[ 1]=0.0004  ;
	women[ 2]=511; women_death_rate[ 2]=0.0002  ;
	women[ 3]=525; women_death_rate[ 3]=0.0001  ;
	women[ 4]=522; women_death_rate[ 4]=0.0001  ;

	women[ 5]=518; women_death_rate[ 5]=0.0001   ;
	women[ 6]=517; women_death_rate[ 6]=0.0001   ;
	women[ 7]=538; women_death_rate[ 7]=0.0001   ;
	women[ 8]=545; women_death_rate[ 8]=0.0001   ;
	women[ 9]=561; women_death_rate[ 9]=0.0001   ;

	women[10]=568; women_death_rate[10]=0.0001   ;
	women[11]=573; women_death_rate[11]=0.0001   ;
	women[12]=576; women_death_rate[12]=0.0001   ;
	women[13]=585; women_death_rate[13]=0.0001   ;
	women[14]=583; women_death_rate[14]=0.0001   ;

	women[15]=578; women_death_rate[15]=0.0002   ;
	women[16]=595; women_death_rate[16]=0.0002   ;
	women[17]=597; women_death_rate[17]=0.0002   ;
	women[18]=589; women_death_rate[18]=0.0002   ;
	women[19]=599; women_death_rate[19]=0.0002   ;

	women[20]=596; women_death_rate[20]=0.0003   ;
	women[21]=605; women_death_rate[21]=0.0003   ;
	women[22]=622; women_death_rate[22]=0.0003   ;
	women[23]=638; women_death_rate[23]=0.0003   ;
	women[24]=655; women_death_rate[24]=0.0003   ;

	women[25]=667; women_death_rate[25]=0.0003   ;
	women[26]=697; women_death_rate[26]=0.0003   ;
	women[27]=719; women_death_rate[27]=0.0003   ;
	women[28]=729; women_death_rate[28]=0.0003   ;
	women[29]=734; women_death_rate[29]=0.0003   ;

	women[30]=742; women_death_rate[30]=0.0004   ;
	women[31]=774; women_death_rate[31]=0.0004   ;
	women[32]=794; women_death_rate[32]=0.0004   ;
	women[33]=828; women_death_rate[33]=0.0004   ;
	women[34]=849; women_death_rate[34]=0.0004   ;

	women[35]=890; women_death_rate[35]=0.0006   ;
	women[36]=931; women_death_rate[36]=0.0006   ;
	women[37]=982; women_death_rate[37]=0.0006   ;
	women[38]=1001; women_death_rate[38]=0.0006   ;
	women[39]=981; women_death_rate[39]=0.0006   ;

	women[40]=958; women_death_rate[40]=0.0008   ;
	women[41]=931; women_death_rate[41]=0.0008   ;
	women[42]=920; women_death_rate[42]=0.0008   ;
	women[43]=902; women_death_rate[43]=0.0008   ;
	women[44]=898; women_death_rate[44]=0.0008   ;

	women[45]=705; women_death_rate[45]=0.0013   ;
	women[46]=872; women_death_rate[46]=0.0013   ;
	women[47]=815; women_death_rate[47]=0.0013   ;
	women[48]=798; women_death_rate[48]=0.0013   ;
	women[49]=772; women_death_rate[49]=0.0013   ;

	women[50]=760; women_death_rate[50]=0.0019   ;
	women[51]=768; women_death_rate[51]=0.0019   ;
	women[52]=783; women_death_rate[52]=0.0019   ;
	women[53]=765; women_death_rate[53]=0.0019   ;
	women[54]=744; women_death_rate[54]=0.0019   ;

	women[55]=783; women_death_rate[55]=0.0028   ;
	women[56]=810; women_death_rate[56]=0.0028   ;
	women[57]=813; women_death_rate[57]=0.0028   ;
	women[58]=868; women_death_rate[58]=0.0028   ;
	women[59]=918; women_death_rate[59]=0.0028   ;

	women[60]=975; women_death_rate[60]=0.0039   ;
	women[61]=1051; women_death_rate[61]=0.0039   ;
	women[62]=1152; women_death_rate[62]=0.0039   ;
	women[63]=1146; women_death_rate[63]=0.0039   ;
	women[64]=1090; women_death_rate[64]=0.0039   ;

	women[65]=685; women_death_rate[65]=0.0060   ;
	women[66]=741; women_death_rate[66]=0.0060   ;
	women[67]=903; women_death_rate[67]=0.0060   ;
	women[68]=875; women_death_rate[68]=0.0060   ;
	women[69]=899; women_death_rate[69]=0.0060   ;

	women[70]=873; women_death_rate[70]=0.0098   ;
	women[71]=793; women_death_rate[71]=0.0098   ;
	women[72]=690; women_death_rate[72]=0.0098   ;
	women[73]=738; women_death_rate[73]=0.0098   ;
	women[74]=755; women_death_rate[74]=0.0098   ;

	women[75]=753; women_death_rate[75]=0.0179   ;
	women[76]=718; women_death_rate[76]=0.0179   ;
	women[77]=675; women_death_rate[77]=0.0179   ;
	women[78]=671; women_death_rate[78]=0.0179   ;
	women[79]=646; women_death_rate[79]=0.0179   ;

	women[80]=614; women_death_rate[80]=0.0343   ;
	women[81]=573; women_death_rate[81]=0.0343   ;
	women[82]=547; women_death_rate[82]=0.0343   ;
	women[83]=515; women_death_rate[83]=0.0343   ;
	women[84]=482; women_death_rate[84]=0.0343   ;

	women[85]=454; women_death_rate[85]=0.0691   ;
	women[86]=405; women_death_rate[86]=0.0691   ;
	women[87]=349; women_death_rate[87]=0.0691   ;
	women[88]=313; women_death_rate[88]=0.0691   ;
	women[89]=276; women_death_rate[89]=0.0691   ;

	women[90]=236; women_death_rate[90]=0.1312   ;
	women[91]=213; women_death_rate[91]=0.1312   ;
	women[92]=146; women_death_rate[92]=0.1312   ;
	women[93]=128; women_death_rate[93]=0.1312   ;
	women[94]=106; women_death_rate[94]=0.1312   ;

	women[95]=87 ; women_death_rate[95]=0.2381   ;
	women[96]=63 ; women_death_rate[96]=0.2381   ;
	women[97]=49 ; women_death_rate[97]=0.2381   ;
	women[98]=35 ; women_death_rate[98]=0.2381   ;
	women[99]=25 ; women_death_rate[99]=0.2381   ;

	/////////////////////////////////////////////

	// 未婚率 (平成22年)

	men_unmarried_rate[ 0]=1.000   ;	
	men_unmarried_rate[ 1]=1.000   ;
	men_unmarried_rate[ 2]=1.000   ;
	men_unmarried_rate[ 3]=1.000   ;
	men_unmarried_rate[ 4]=1.000   ;

	men_unmarried_rate[ 5]=1.000   ;
	men_unmarried_rate[ 6]=1.000   ;
	men_unmarried_rate[ 7]=1.000   ;
	men_unmarried_rate[ 8]=1.000   ;
	men_unmarried_rate[ 9]=1.000   ;

	men_unmarried_rate[10]=1.000   ;
	men_unmarried_rate[11]=1.000   ;
	men_unmarried_rate[12]=1.000   ;
	men_unmarried_rate[13]=1.000   ;
	men_unmarried_rate[14]=1.000   ;

	men_unmarried_rate[15]=1.000   ;
	men_unmarried_rate[16]=1.000   ;
	men_unmarried_rate[17]=1.000   ;
	men_unmarried_rate[18]=0.975   ;
	men_unmarried_rate[19]=0.975   ;

	men_unmarried_rate[20]=0.910   ;
	men_unmarried_rate[21]=0.910   ;
	men_unmarried_rate[22]=0.910   ;
	men_unmarried_rate[23]=0.910   ;
	men_unmarried_rate[24]=0.910   ;

	men_unmarried_rate[25]=0.645   ;
	men_unmarried_rate[26]=0.645   ;
	men_unmarried_rate[27]=0.645   ;
	men_unmarried_rate[28]=0.645   ;
	men_unmarried_rate[29]=0.645   ;

	men_unmarried_rate[30]=0.413   ;
	men_unmarried_rate[31]=0.413   ;
	men_unmarried_rate[32]=0.413   ;
	men_unmarried_rate[33]=0.413   ;
	men_unmarried_rate[34]=0.413   ;

	men_unmarried_rate[35]=0.370   ;
	men_unmarried_rate[36]=0.370   ;
	men_unmarried_rate[37]=0.370   ;
	men_unmarried_rate[38]=0.370   ;
	men_unmarried_rate[39]=0.370   ;

	men_unmarried_rate[40]=0.229   ;
	men_unmarried_rate[41]=0.229   ;
	men_unmarried_rate[42]=0.229   ;
	men_unmarried_rate[43]=0.229   ;
	men_unmarried_rate[44]=0.229   ;

	men_unmarried_rate[45]=0.166   ;
	men_unmarried_rate[46]=0.166   ;
	men_unmarried_rate[47]=0.166   ;
	men_unmarried_rate[48]=0.166   ;
	men_unmarried_rate[49]=0.166   ;

	men_unmarried_rate[50]=0.189   ;
	men_unmarried_rate[51]=0.189   ;
	men_unmarried_rate[52]=0.189   ;
	men_unmarried_rate[53]=0.189   ;
	men_unmarried_rate[54]=0.189   ;

	men_unmarried_rate[55]=0.139   ;
	men_unmarried_rate[56]=0.139   ;
	men_unmarried_rate[57]=0.139   ;
	men_unmarried_rate[58]=0.139   ;
	men_unmarried_rate[59]=0.139   ;

	men_unmarried_rate[60]=0.068   ;
	men_unmarried_rate[61]=0.068   ;
	men_unmarried_rate[62]=0.068   ;
	men_unmarried_rate[63]=0.068   ;
	men_unmarried_rate[64]=0.068   ;

	men_unmarried_rate[65]=0.042   ;
	men_unmarried_rate[66]=0.042   ;
	men_unmarried_rate[67]=0.042   ;
	men_unmarried_rate[68]=0.042   ;
	men_unmarried_rate[69]=0.042   ;

	men_unmarried_rate[70]=0.015   ;
	men_unmarried_rate[71]=0.015   ;
	men_unmarried_rate[72]=0.015   ;
	men_unmarried_rate[73]=0.015   ;
	men_unmarried_rate[74]=0.015   ;

	men_unmarried_rate[75]=0.012   ;
	men_unmarried_rate[76]=0.012   ;
	men_unmarried_rate[77]=0.012   ;
	men_unmarried_rate[78]=0.012   ;
	men_unmarried_rate[79]=0.012   ;

	men_unmarried_rate[80]=0.012   ;
	men_unmarried_rate[81]=0.012   ;
	men_unmarried_rate[82]=0.012   ;
	men_unmarried_rate[83]=0.012   ;
	men_unmarried_rate[84]=0.012   ;

	men_unmarried_rate[85]=0.011   ;
	men_unmarried_rate[86]=0.011   ;
	men_unmarried_rate[87]=0.011   ;
	men_unmarried_rate[88]=0.011   ;
	men_unmarried_rate[89]=0.011   ;

	men_unmarried_rate[90]=0.011   ;
	men_unmarried_rate[91]=0.011   ;
	men_unmarried_rate[92]=0.011   ;
	men_unmarried_rate[93]=0.011   ;
	men_unmarried_rate[94]=0.011   ;

	men_unmarried_rate[95]=0.011   ;
	men_unmarried_rate[96]=0.011   ;
	men_unmarried_rate[97]=0.011   ;
	men_unmarried_rate[98]=0.011   ;
	men_unmarried_rate[99]=0.011   ;

	women_unmarried_rate[ 0]=1.000   ;	
	women_unmarried_rate[ 1]=1.000   ;	
	women_unmarried_rate[ 2]=1.000   ;	
	women_unmarried_rate[ 3]=1.000   ;	
	women_unmarried_rate[ 4]=1.000   ;	
	
	women_unmarried_rate[ 5]=1.000   ;	
	women_unmarried_rate[ 6]=1.000   ;	
	women_unmarried_rate[ 7]=1.000   ;	
	women_unmarried_rate[ 8]=1.000   ;	
	women_unmarried_rate[ 9]=1.000   ;	
	
	women_unmarried_rate[10]=1.000   ;	
	women_unmarried_rate[11]=1.000   ;	
	women_unmarried_rate[12]=1.000   ;	
	women_unmarried_rate[13]=1.000   ;	
	women_unmarried_rate[14]=1.000   ;	
	
	women_unmarried_rate[15]=1.000   ;
	women_unmarried_rate[16]=0.984   ;
	women_unmarried_rate[17]=0.984   ;
	women_unmarried_rate[18]=0.984   ;
	women_unmarried_rate[19]=0.984   ;
	
	women_unmarried_rate[20]=0.898   ;
	women_unmarried_rate[21]=0.898   ;
	women_unmarried_rate[22]=0.898   ;
	women_unmarried_rate[23]=0.898   ;
	women_unmarried_rate[24]=0.898   ;
	
	women_unmarried_rate[25]=0.607   ;
	women_unmarried_rate[26]=0.607   ;
	women_unmarried_rate[27]=0.607   ;
	women_unmarried_rate[28]=0.607   ;
	women_unmarried_rate[29]=0.607   ;
	
	women_unmarried_rate[30]=0.374   ; 
	women_unmarried_rate[31]=0.374   ; 
	women_unmarried_rate[32]=0.374   ; 
	women_unmarried_rate[33]=0.374   ; 
	women_unmarried_rate[34]=0.374   ; 
	
	women_unmarried_rate[35]=0.250   ;
	women_unmarried_rate[36]=0.250   ;
	women_unmarried_rate[37]=0.250   ;
	women_unmarried_rate[38]=0.250   ;
	women_unmarried_rate[39]=0.250   ;
	
	women_unmarried_rate[40]=0.224   ;
	women_unmarried_rate[41]=0.224   ;
	women_unmarried_rate[42]=0.224   ;
	women_unmarried_rate[43]=0.224   ;
	women_unmarried_rate[44]=0.224   ;
	
	women_unmarried_rate[45]=0.154   ; 
	women_unmarried_rate[46]=0.154   ; 
	women_unmarried_rate[47]=0.154   ; 
	women_unmarried_rate[48]=0.154   ; 
	women_unmarried_rate[49]=0.154   ; 
	
	women_unmarried_rate[50]=0.114   ;  
	women_unmarried_rate[51]=0.114   ;  
	women_unmarried_rate[52]=0.114   ;  
	women_unmarried_rate[53]=0.114   ;  
	women_unmarried_rate[54]=0.114   ;  
	
	women_unmarried_rate[55]=0.073   ;
	women_unmarried_rate[56]=0.073   ;
	women_unmarried_rate[57]=0.073   ;
	women_unmarried_rate[58]=0.073   ;
	women_unmarried_rate[59]=0.073   ;
	
	women_unmarried_rate[60]=0.055   ; 
	women_unmarried_rate[61]=0.055   ; 
	women_unmarried_rate[62]=0.055   ; 
	women_unmarried_rate[63]=0.055   ; 
	women_unmarried_rate[64]=0.055   ; 
	
	women_unmarried_rate[65]=0.053   ; 
	women_unmarried_rate[66]=0.053   ; 
	women_unmarried_rate[67]=0.053   ; 
	women_unmarried_rate[68]=0.053   ; 
	women_unmarried_rate[69]=0.053   ; 
	
	women_unmarried_rate[70]=0.033   ; 
	women_unmarried_rate[71]=0.033   ; 
	women_unmarried_rate[72]=0.033   ; 
	women_unmarried_rate[73]=0.033   ; 
	women_unmarried_rate[74]=0.033   ; 
	
	women_unmarried_rate[75]=0.044   ;
	women_unmarried_rate[76]=0.044   ;
	women_unmarried_rate[77]=0.044   ;
	women_unmarried_rate[78]=0.044   ;
	women_unmarried_rate[79]=0.044   ;
	
	women_unmarried_rate[80]=0.078   ;
	women_unmarried_rate[81]=0.078   ;
	women_unmarried_rate[82]=0.078   ;
	women_unmarried_rate[83]=0.078   ;
	women_unmarried_rate[84]=0.078   ;
	
	women_unmarried_rate[85]=0.033   ;
	women_unmarried_rate[86]=0.033   ;
	women_unmarried_rate[87]=0.033   ;
	women_unmarried_rate[88]=0.033   ;
	women_unmarried_rate[89]=0.033   ;
	
	women_unmarried_rate[90]=0.033   ;
	women_unmarried_rate[91]=0.033   ;
	women_unmarried_rate[92]=0.033   ;
	women_unmarried_rate[93]=0.033   ;
	women_unmarried_rate[94]=0.033   ;
	
	women_unmarried_rate[95]=0.033   ;
	women_unmarried_rate[96]=0.033   ;
	women_unmarried_rate[97]=0.033   ;
	women_unmarried_rate[98]=0.033   ;
	women_unmarried_rate[99]=0.033   ;
   
	// 有配偶率 (平成22年)

	// 初婚、再婚関係なく、その世代に対して。
	// 結婚している比率
	
	//国勢調査の男女別の有配偶者の数はなぜ違うのか

	men_existance_matching_rate[ 0]=0.000   ;	
	men_existance_matching_rate[ 1]=0.000   ;
	men_existance_matching_rate[ 2]=0.000   ;
	men_existance_matching_rate[ 3]=0.000   ;
	men_existance_matching_rate[ 4]=0.000   ;

	men_existance_matching_rate[ 5]=0.000   ;
	men_existance_matching_rate[ 6]=0.000   ;
	men_existance_matching_rate[ 7]=0.000   ;
	men_existance_matching_rate[ 8]=0.000   ;
	men_existance_matching_rate[ 9]=0.000   ;

	men_existance_matching_rate[10]=0.000   ;
	men_existance_matching_rate[11]=0.000   ;
	men_existance_matching_rate[12]=0.000   ;
	men_existance_matching_rate[13]=0.000   ;
	men_existance_matching_rate[14]=0.000   ;

	men_existance_matching_rate[15]=0.011   ;
	men_existance_matching_rate[16]=0.011   ;
	men_existance_matching_rate[17]=0.011   ;
	men_existance_matching_rate[18]=0.011   ;
	men_existance_matching_rate[19]=0.011   ;

	men_existance_matching_rate[20]=0.036   ;
	men_existance_matching_rate[21]=0.036   ;
	men_existance_matching_rate[22]=0.036   ;
	men_existance_matching_rate[23]=0.036   ;
	men_existance_matching_rate[24]=0.036   ;

	men_existance_matching_rate[25]=0.241   ;
	men_existance_matching_rate[26]=0.241   ;
	men_existance_matching_rate[27]=0.241   ;
	men_existance_matching_rate[28]=0.241   ;
	men_existance_matching_rate[29]=0.241   ;

	men_existance_matching_rate[30]=0.497   ;
	men_existance_matching_rate[31]=0.497   ;
	men_existance_matching_rate[32]=0.497   ;
	men_existance_matching_rate[33]=0.497   ;
	men_existance_matching_rate[34]=0.497   ;

	men_existance_matching_rate[35]=0.530   ;
	men_existance_matching_rate[36]=0.530   ;
	men_existance_matching_rate[37]=0.530   ;
	men_existance_matching_rate[38]=0.530   ;
	men_existance_matching_rate[39]=0.530   ;

	men_existance_matching_rate[40]=0.694   ;
	men_existance_matching_rate[41]=0.694   ;
	men_existance_matching_rate[42]=0.694   ;
	men_existance_matching_rate[43]=0.694   ;
	men_existance_matching_rate[44]=0.694   ;

	men_existance_matching_rate[45]=0.741   ;
	men_existance_matching_rate[46]=0.741   ;
	men_existance_matching_rate[47]=0.741   ;
	men_existance_matching_rate[48]=0.741   ;
	men_existance_matching_rate[49]=0.741   ;

	men_existance_matching_rate[50]=0.700   ;
	men_existance_matching_rate[51]=0.700   ;
	men_existance_matching_rate[52]=0.700   ;
	men_existance_matching_rate[53]=0.700   ;
	men_existance_matching_rate[54]=0.700   ;

	men_existance_matching_rate[55]=0.765   ;
	men_existance_matching_rate[56]=0.765   ;
	men_existance_matching_rate[57]=0.765   ;
	men_existance_matching_rate[58]=0.765   ;
	men_existance_matching_rate[59]=0.765   ;

	men_existance_matching_rate[60]=0.842   ;
	men_existance_matching_rate[61]=0.842   ;
	men_existance_matching_rate[62]=0.842   ;
	men_existance_matching_rate[63]=0.842   ;
	men_existance_matching_rate[64]=0.842   ;

	men_existance_matching_rate[65]=0.824   ;
	men_existance_matching_rate[66]=0.824   ;
	men_existance_matching_rate[67]=0.824   ;
	men_existance_matching_rate[68]=0.824   ;
	men_existance_matching_rate[69]=0.824   ;

	men_existance_matching_rate[70]=0.838   ;
	men_existance_matching_rate[71]=0.838   ;
	men_existance_matching_rate[72]=0.838   ;
	men_existance_matching_rate[73]=0.838   ;
	men_existance_matching_rate[74]=0.838   ;

	men_existance_matching_rate[75]=0.817   ;
	men_existance_matching_rate[76]=0.817   ;
	men_existance_matching_rate[77]=0.817   ;
	men_existance_matching_rate[78]=0.817   ;
	men_existance_matching_rate[79]=0.817   ;

	men_existance_matching_rate[80]=0.730   ;
	men_existance_matching_rate[81]=0.730   ;
	men_existance_matching_rate[82]=0.730   ;
	men_existance_matching_rate[83]=0.730   ;
	men_existance_matching_rate[84]=0.730   ;

	men_existance_matching_rate[85]=0.708   ;
	men_existance_matching_rate[86]=0.708   ;
	men_existance_matching_rate[87]=0.708   ;
	men_existance_matching_rate[88]=0.708   ;
	men_existance_matching_rate[89]=0.708   ;

	men_existance_matching_rate[90]=0.708   ;
	men_existance_matching_rate[91]=0.708   ;
	men_existance_matching_rate[92]=0.708   ;
	men_existance_matching_rate[93]=0.708   ;
	men_existance_matching_rate[94]=0.708   ;

	men_existance_matching_rate[95]=0.708   ;
	men_existance_matching_rate[96]=0.708   ;
	men_existance_matching_rate[97]=0.708   ;
	men_existance_matching_rate[98]=0.708   ;
	men_existance_matching_rate[99]=0.708   ;

	women_existance_matching_rate[ 0]=0.000   ;	
	women_existance_matching_rate[ 1]=0.000   ;	
	women_existance_matching_rate[ 2]=0.000   ;	
	women_existance_matching_rate[ 3]=0.000   ;	
	women_existance_matching_rate[ 4]=0.000   ;	
	
	women_existance_matching_rate[ 5]=0.000   ;	
	women_existance_matching_rate[ 6]=0.000   ;	
	women_existance_matching_rate[ 7]=0.000   ;	
	women_existance_matching_rate[ 8]=0.000   ;	
	women_existance_matching_rate[ 9]=0.000   ;	
	
	women_existance_matching_rate[10]=0.000   ;	
	women_existance_matching_rate[11]=0.000   ;	
	women_existance_matching_rate[12]=0.000   ;	
	women_existance_matching_rate[13]=0.000   ;	
	women_existance_matching_rate[14]=0.000   ;	
	
	women_existance_matching_rate[15]=0.008   ;
	women_existance_matching_rate[16]=0.008   ;
	women_existance_matching_rate[17]=0.008   ;
	women_existance_matching_rate[18]=0.008   ;
	women_existance_matching_rate[19]=0.008   ;
	
	women_existance_matching_rate[20]=0.052   ;
	women_existance_matching_rate[21]=0.052   ;
	women_existance_matching_rate[22]=0.052   ;
	women_existance_matching_rate[23]=0.052   ;
	women_existance_matching_rate[24]=0.052   ;
	
	women_existance_matching_rate[25]=0.312   ;
	women_existance_matching_rate[26]=0.312   ;
	women_existance_matching_rate[27]=0.312   ;
	women_existance_matching_rate[28]=0.312   ;
	women_existance_matching_rate[29]=0.312   ;
	
	women_existance_matching_rate[30]=0.569   ; 
	women_existance_matching_rate[31]=0.569   ; 
	women_existance_matching_rate[32]=0.569   ; 
	women_existance_matching_rate[33]=0.569   ; 
	women_existance_matching_rate[34]=0.569   ; 
	
	women_existance_matching_rate[35]=0.667   ;
	women_existance_matching_rate[36]=0.667   ;
	women_existance_matching_rate[37]=0.667   ;
	women_existance_matching_rate[38]=0.667   ;
	women_existance_matching_rate[39]=0.667   ;
	
	women_existance_matching_rate[40]=0.229   ;
	women_existance_matching_rate[41]=0.229   ;
	women_existance_matching_rate[42]=0.229   ;
	women_existance_matching_rate[43]=0.229   ;
	women_existance_matching_rate[44]=0.229   ;
	
	women_existance_matching_rate[45]=0.712   ; 
	women_existance_matching_rate[46]=0.712   ; 
	women_existance_matching_rate[47]=0.712   ; 
	women_existance_matching_rate[48]=0.712   ; 
	women_existance_matching_rate[49]=0.712   ; 
	
	women_existance_matching_rate[50]=0.755   ;  
	women_existance_matching_rate[51]=0.755   ;  
	women_existance_matching_rate[52]=0.755   ;  
	women_existance_matching_rate[53]=0.755   ;  
	women_existance_matching_rate[54]=0.755   ;  
	
	women_existance_matching_rate[55]=0.789   ;
	women_existance_matching_rate[56]=0.789   ;
	women_existance_matching_rate[57]=0.789   ;
	women_existance_matching_rate[58]=0.789   ;
	women_existance_matching_rate[59]=0.789   ;
	
	women_existance_matching_rate[60]=0.733   ; 
	women_existance_matching_rate[61]=0.733   ; 
	women_existance_matching_rate[62]=0.733   ; 
	women_existance_matching_rate[63]=0.733   ; 
	women_existance_matching_rate[64]=0.733   ; 
	
	women_existance_matching_rate[65]=0.663   ; 
	women_existance_matching_rate[66]=0.663   ; 
	women_existance_matching_rate[67]=0.663   ; 
	women_existance_matching_rate[68]=0.663   ; 
	women_existance_matching_rate[69]=0.663   ; 
	
	women_existance_matching_rate[70]=0.650   ; 
	women_existance_matching_rate[71]=0.650   ; 
	women_existance_matching_rate[72]=0.650   ; 
	women_existance_matching_rate[73]=0.650   ; 
	women_existance_matching_rate[74]=0.650   ; 
	
	women_existance_matching_rate[75]=0.462   ;
	women_existance_matching_rate[76]=0.462   ;
	women_existance_matching_rate[77]=0.462   ;
	women_existance_matching_rate[78]=0.462   ;
	women_existance_matching_rate[79]=0.462   ;
	
	women_existance_matching_rate[80]=0.326   ;
	women_existance_matching_rate[81]=0.326   ;
	women_existance_matching_rate[82]=0.326   ;
	women_existance_matching_rate[83]=0.326   ;
	women_existance_matching_rate[84]=0.326   ;
	
	women_existance_matching_rate[85]=0.093   ;
	women_existance_matching_rate[86]=0.093   ;
	women_existance_matching_rate[87]=0.093   ;
	women_existance_matching_rate[88]=0.093   ;
	women_existance_matching_rate[89]=0.093   ;
	
	women_existance_matching_rate[90]=0.093   ;
	women_existance_matching_rate[91]=0.093   ;
	women_existance_matching_rate[92]=0.093   ;
	women_existance_matching_rate[93]=0.093   ;
	women_existance_matching_rate[94]=0.093   ;
	
	women_existance_matching_rate[95]=0.093   ;
	women_existance_matching_rate[96]=0.093   ;
	women_existance_matching_rate[97]=0.093   ;
	women_existance_matching_rate[98]=0.093   ;
	women_existance_matching_rate[99]=0.093   ;

	//有配偶離婚率  Divorce rates for married population
	// 平成22年データ
	// ○ 結婚している人に対する離婚率
	// × 人口に対する離婚率

	men_divorce_rate[0] = 0.0000 ;//結婚できないから、
	men_divorce_rate[1] = 0.0000 ;//離婚もできない
	men_divorce_rate[2] = 0.0000 ;
	men_divorce_rate[3] = 0.0000 ;
	men_divorce_rate[4] = 0.0000 ;

	men_divorce_rate[5] = 0.0000 ;
	men_divorce_rate[6] = 0.0000 ;
	men_divorce_rate[7] = 0.0000 ;
	men_divorce_rate[8] = 0.0000 ;
	men_divorce_rate[9] = 0.0000 ;

	men_divorce_rate[10] = 0.0000 ;
	men_divorce_rate[11] = 0.0000 ;
	men_divorce_rate[12] = 0.0000 ;
	men_divorce_rate[13] = 0.0000 ;
	men_divorce_rate[14] = 0.0000 ;  

	men_divorce_rate[15] = 0.0000 ;
	men_divorce_rate[16] = 0.0000 ;
	men_divorce_rate[17] = 0.0000 ;
	men_divorce_rate[18] = 0.4809 ;
	men_divorce_rate[19] = 0.4809 ;

	men_divorce_rate[20] = 0.4705 ;
	men_divorce_rate[21] = 0.4705 ;
	men_divorce_rate[22] = 0.4705 ;
	men_divorce_rate[23] = 0.4705 ;
	men_divorce_rate[24] = 0.4705 ;

	men_divorce_rate[25] = 0.2283 ;
	men_divorce_rate[26] = 0.2283 ;
	men_divorce_rate[27] = 0.2283 ;
	men_divorce_rate[28] = 0.2283 ;
	men_divorce_rate[29] = 0.2283 ;

	men_divorce_rate[30] = 0.1521 ;
	men_divorce_rate[31] = 0.1521 ;
	men_divorce_rate[32] = 0.1521 ;
	men_divorce_rate[33] = 0.1521 ;
 	men_divorce_rate[34] = 0.1521 ;

 	men_divorce_rate[35] = 0.1165 ;
 	men_divorce_rate[36] = 0.1165 ;
 	men_divorce_rate[37] = 0.1165 ;
 	men_divorce_rate[38] = 0.1165 ;
 	men_divorce_rate[39] = 0.1165 ;

 	men_divorce_rate[40] = 0.0939 ;
 	men_divorce_rate[41] = 0.0939 ;
 	men_divorce_rate[42] = 0.0939 ;
 	men_divorce_rate[43] = 0.0939 ;
 	men_divorce_rate[44] = 0.0939 ;

 	men_divorce_rate[45] = 0.0703 ;
 	men_divorce_rate[46] = 0.0703 ;
 	men_divorce_rate[47] = 0.0703 ;
 	men_divorce_rate[48] = 0.0703 ;
 	men_divorce_rate[49] = 0.0703 ;

 	men_divorce_rate[50] = 0.0495 ;
 	men_divorce_rate[51] = 0.0495 ;
 	men_divorce_rate[52] = 0.0495 ;
 	men_divorce_rate[53] = 0.0495 ;
 	men_divorce_rate[54] = 0.0495 ;

 	men_divorce_rate[55] = 0.0309 ;
 	men_divorce_rate[56] = 0.0309 ;
 	men_divorce_rate[57] = 0.0309 ;
 	men_divorce_rate[58] = 0.0309 ;
 	men_divorce_rate[59] = 0.0309 ;

 	men_divorce_rate[60] = 0.0194 ;
 	men_divorce_rate[61] = 0.0194 ;
 	men_divorce_rate[62] = 0.0194 ;
 	men_divorce_rate[63] = 0.0194 ;
 	men_divorce_rate[64] = 0.0194 ;

 	men_divorce_rate[65] = 0.0110 ;
 	men_divorce_rate[66] = 0.0110 ;
 	men_divorce_rate[67] = 0.0110 ;
 	men_divorce_rate[68] = 0.0110 ;
 	men_divorce_rate[69] = 0.0110 ;

 	men_divorce_rate[70] = 0.0040 ;
 	men_divorce_rate[71] = 0.0040 ;
 	men_divorce_rate[72] = 0.0040 ;
 	men_divorce_rate[73] = 0.0040 ;
 	men_divorce_rate[74] = 0.0040 ;

 	men_divorce_rate[75] = 0.0040 ;
 	men_divorce_rate[76] = 0.0040 ;
 	men_divorce_rate[77] = 0.0040 ;
 	men_divorce_rate[78] = 0.0040 ;
 	men_divorce_rate[79] = 0.0040 ;

 	men_divorce_rate[80] = 0.0040 ;
 	men_divorce_rate[81] = 0.0040 ;
 	men_divorce_rate[82] = 0.0040 ;
 	men_divorce_rate[83] = 0.0040 ;
 	men_divorce_rate[84] = 0.0040 ;

 	men_divorce_rate[85] = 0.0040 ;
 	men_divorce_rate[86] = 0.0040 ;
 	men_divorce_rate[87] = 0.0040 ;
 	men_divorce_rate[88] = 0.0040 ;
 	men_divorce_rate[89] = 0.0040 ;

 	men_divorce_rate[90] = 0.0040 ;
 	men_divorce_rate[91] = 0.0040 ;
 	men_divorce_rate[92] = 0.0040 ;
 	men_divorce_rate[93] = 0.0040 ;
 	men_divorce_rate[94] = 0.0040 ;

 	men_divorce_rate[95] = 0.0040 ;
 	men_divorce_rate[96] = 0.0040 ;
 	men_divorce_rate[97] = 0.0040 ;
 	men_divorce_rate[98] = 0.0040 ;
 	men_divorce_rate[99] = 0.0040 ;

	women_divorce_rate[0] = 0.0000 ;//結婚できないから、
	women_divorce_rate[1] = 0.0000 ;//離婚もできない
	women_divorce_rate[2] = 0.0000 ;
	women_divorce_rate[3] = 0.0000 ;
	women_divorce_rate[4] = 0.0000 ;

	women_divorce_rate[5] = 0.0000 ;
	women_divorce_rate[6] = 0.0000 ;
	women_divorce_rate[7] = 0.0000 ;
	women_divorce_rate[8] = 0.0000 ;
	women_divorce_rate[9] = 0.0000 ;

	women_divorce_rate[10] = 0.0000 ;
	women_divorce_rate[11] = 0.0000 ;
	women_divorce_rate[12] = 0.0000 ;
	women_divorce_rate[13] = 0.0000 ;
	women_divorce_rate[14] = 0.0000 ;  

	women_divorce_rate[15] = 0.0000 ;
	women_divorce_rate[16] = 0.8274 ;
	women_divorce_rate[17] = 0.8274 ;
	women_divorce_rate[18] = 0.8274 ;
	women_divorce_rate[19] = 0.8274 ;

	women_divorce_rate[20] = 0.4834 ;
	women_divorce_rate[21] = 0.4834 ;
	women_divorce_rate[22] = 0.4834 ;
	women_divorce_rate[23] = 0.4834 ;
	women_divorce_rate[24] = 0.4834 ;

	women_divorce_rate[25] = 0.2288 ;
	women_divorce_rate[26] = 0.2288 ;
	women_divorce_rate[27] = 0.2288 ;
	women_divorce_rate[28] = 0.2288 ;
	women_divorce_rate[29] = 0.2288 ;

	women_divorce_rate[30] = 0.1480 ;
	women_divorce_rate[31] = 0.1480 ;
	women_divorce_rate[32] = 0.1480 ;
	women_divorce_rate[33] = 0.1480 ;
 	women_divorce_rate[34] = 0.1480 ;

 	women_divorce_rate[35] = 0.1090 ;
 	women_divorce_rate[36] = 0.1090 ;
 	women_divorce_rate[37] = 0.1090 ;
 	women_divorce_rate[38] = 0.1090 ;
 	women_divorce_rate[39] = 0.1090 ;

 	women_divorce_rate[40] = 0.0833 ;
 	women_divorce_rate[41] = 0.0833 ;
 	women_divorce_rate[42] = 0.0833 ;
 	women_divorce_rate[43] = 0.0833 ;
 	women_divorce_rate[44] = 0.0833 ;

 	women_divorce_rate[45] = 0.0560 ;
 	women_divorce_rate[46] = 0.0560 ;
 	women_divorce_rate[47] = 0.0560 ;
 	women_divorce_rate[48] = 0.0560 ;
 	women_divorce_rate[49] = 0.0560 ;

 	women_divorce_rate[50] = 0.0322 ;
 	women_divorce_rate[51] = 0.0322 ;
 	women_divorce_rate[52] = 0.0322 ;
 	women_divorce_rate[53] = 0.0322 ;
 	women_divorce_rate[54] = 0.0322 ;

 	women_divorce_rate[55] = 0.0172 ;
 	women_divorce_rate[56] = 0.0172 ;
 	women_divorce_rate[57] = 0.0172 ;
 	women_divorce_rate[58] = 0.0172 ;
 	women_divorce_rate[59] = 0.0172 ;

 	women_divorce_rate[60] = 0.0113 ;
 	women_divorce_rate[61] = 0.0113 ;
 	women_divorce_rate[62] = 0.0113 ;
 	women_divorce_rate[63] = 0.0113 ;
 	women_divorce_rate[64] = 0.0113 ;

 	women_divorce_rate[65] = 0.0073 ;
 	women_divorce_rate[66] = 0.0073 ;
 	women_divorce_rate[67] = 0.0073 ;
 	women_divorce_rate[68] = 0.0073 ;
 	women_divorce_rate[69] = 0.0073 ;

 	women_divorce_rate[70] = 0.0028 ;
 	women_divorce_rate[71] = 0.0028 ;
 	women_divorce_rate[72] = 0.0028 ;
 	women_divorce_rate[73] = 0.0028 ;
 	women_divorce_rate[74] = 0.0028 ;

 	women_divorce_rate[75] = 0.0028 ;
 	women_divorce_rate[76] = 0.0028 ;
 	women_divorce_rate[77] = 0.0028 ;
 	women_divorce_rate[78] = 0.0028 ;
 	women_divorce_rate[79] = 0.0028 ;

 	women_divorce_rate[80] = 0.0028 ;
 	women_divorce_rate[81] = 0.0028 ;
 	women_divorce_rate[82] = 0.0028 ;
 	women_divorce_rate[83] = 0.0028 ;
 	women_divorce_rate[84] = 0.0028 ;

 	women_divorce_rate[85] = 0.0028 ;
 	women_divorce_rate[86] = 0.0028 ;
 	women_divorce_rate[87] = 0.0028 ;
 	women_divorce_rate[88] = 0.0028 ;
 	women_divorce_rate[89] = 0.0028 ;

 	women_divorce_rate[90] = 0.0028 ;
 	women_divorce_rate[91] = 0.0028 ;
 	women_divorce_rate[92] = 0.0028 ;
 	women_divorce_rate[93] = 0.0028 ;
 	women_divorce_rate[94] = 0.0028 ;

 	women_divorce_rate[95] = 0.0028 ;
 	women_divorce_rate[96] = 0.0028 ;
 	women_divorce_rate[97] = 0.0028 ;
 	women_divorce_rate[98] = 0.0028 ;
 	women_divorce_rate[99] = 0.0028 ;


	// 再婚率 (2010年)

	// × 離婚している人に対する再婚率
	// ○ 世代人口(未婚、結婚、離婚関係なし)に対する再婚率
	
	// ということで、計算式に注意しなければならない。
	//  (というか、なんで、最初からそういう数値にしないんだ!)

	// 離婚している人に対する再婚率 (に変換する式)
	//    = 
	// 再婚率 x その世代の人口数 / 離婚(×未婚、結婚)人口
	// としなければなない

	//表6-6 性,年齢(5歳階級)別再婚率:1930~2010年	
	//(‰) 
	//年  齢	2010年

	men_remarrige_ratio[0] = 0.0000;
	men_remarrige_ratio[1] = 0.0000;
	men_remarrige_ratio[2] = 0.0000;
	men_remarrige_ratio[3] = 0.0000;
	men_remarrige_ratio[4] = 0.0000;

	men_remarrige_ratio[5] = 0.0000;
	men_remarrige_ratio[6] = 0.0000;
	men_remarrige_ratio[7] = 0.0000;
	men_remarrige_ratio[8] = 0.0000;
	men_remarrige_ratio[9] = 0.0000;

	men_remarrige_ratio[10] = 0.0000;
	men_remarrige_ratio[11] = 0.0000;
	men_remarrige_ratio[12] = 0.0000;
	men_remarrige_ratio[13] = 0.0000;
	men_remarrige_ratio[14] = 0.0000;

	men_remarrige_ratio[15] = 0.0000;
	men_remarrige_ratio[16] = 0.0000;
	men_remarrige_ratio[17] = 0.0000;
	men_remarrige_ratio[18] = 0.0001;
	men_remarrige_ratio[19] = 0.0001;

	men_remarrige_ratio[20] = 0.0048;
	men_remarrige_ratio[21] = 0.0048;
	men_remarrige_ratio[22] = 0.0048;
	men_remarrige_ratio[23] = 0.0048;
	men_remarrige_ratio[24] = 0.0048;

	men_remarrige_ratio[25] = 0.0226;
	men_remarrige_ratio[26] = 0.0226;
	men_remarrige_ratio[27] = 0.0226;
	men_remarrige_ratio[28] = 0.0226;
	men_remarrige_ratio[29] = 0.0226;

	men_remarrige_ratio[30] = 0.0448;
	men_remarrige_ratio[31] = 0.0448;
	men_remarrige_ratio[32] = 0.0448;
	men_remarrige_ratio[33] = 0.0448;
	men_remarrige_ratio[34] = 0.0448; 

	men_remarrige_ratio[35] = 0.0476;
	men_remarrige_ratio[36] = 0.0476;
	men_remarrige_ratio[37] = 0.0476;
	men_remarrige_ratio[38] = 0.0476;
	men_remarrige_ratio[39] = 0.0476;

	men_remarrige_ratio[40] = 0.0371;
	men_remarrige_ratio[41] = 0.0371;
	men_remarrige_ratio[42] = 0.0371;
	men_remarrige_ratio[43] = 0.0371;
	men_remarrige_ratio[44] = 0.0371; 

	men_remarrige_ratio[45] = 0.0261;
	men_remarrige_ratio[46] = 0.0261;
	men_remarrige_ratio[47] = 0.0261;
	men_remarrige_ratio[48] = 0.0261;
	men_remarrige_ratio[49] = 0.0261;

	men_remarrige_ratio[50] = 0.0180;
	men_remarrige_ratio[51] = 0.0180;
	men_remarrige_ratio[52] = 0.0180;
	men_remarrige_ratio[53] = 0.0180;
	men_remarrige_ratio[54] = 0.0180;

	men_remarrige_ratio[55] = 0.0123;
	men_remarrige_ratio[56] = 0.0123;
	men_remarrige_ratio[57] = 0.0123;
	men_remarrige_ratio[58] = 0.0123;
	men_remarrige_ratio[59] = 0.0123;

	men_remarrige_ratio[60] = 0.0091;
	men_remarrige_ratio[61] = 0.0091;
	men_remarrige_ratio[62] = 0.0091;
	men_remarrige_ratio[63] = 0.0091;
	men_remarrige_ratio[64] = 0.0091;

	men_remarrige_ratio[65] = 0.0056;
	men_remarrige_ratio[66] = 0.0056;
	men_remarrige_ratio[67] = 0.0056;
	men_remarrige_ratio[68] = 0.0056;
	men_remarrige_ratio[69] = 0.0056;

	men_remarrige_ratio[70] = 0.0025;
	men_remarrige_ratio[71] = 0.0025;
	men_remarrige_ratio[72] = 0.0025;
	men_remarrige_ratio[73] = 0.0025;
	men_remarrige_ratio[74] = 0.0025;

	men_remarrige_ratio[75] = 0.0025;
	men_remarrige_ratio[76] = 0.0025;
	men_remarrige_ratio[77] = 0.0025;
	men_remarrige_ratio[78] = 0.0025;
	men_remarrige_ratio[79] = 0.0025;

	men_remarrige_ratio[80] = 0.0025;
	men_remarrige_ratio[81] = 0.0025;
	men_remarrige_ratio[82] = 0.0025;
	men_remarrige_ratio[83] = 0.0025;
	men_remarrige_ratio[84] = 0.0025;

	men_remarrige_ratio[85] = 0.0025;
	men_remarrige_ratio[86] = 0.0025;
	men_remarrige_ratio[87] = 0.0025;
	men_remarrige_ratio[88] = 0.0025;
	men_remarrige_ratio[89] = 0.0025;

	men_remarrige_ratio[90] = 0.0025;
	men_remarrige_ratio[91] = 0.0025;
	men_remarrige_ratio[92] = 0.0025;
	men_remarrige_ratio[93] = 0.0025;
	men_remarrige_ratio[94] = 0.0025;

	men_remarrige_ratio[95] = 0.0025;
	men_remarrige_ratio[96] = 0.0025;
	men_remarrige_ratio[97] = 0.0025;
	men_remarrige_ratio[98] = 0.0025;
	men_remarrige_ratio[99] = 0.0025;

	women_remarrige_ratio[0] = 0.0000;
	women_remarrige_ratio[1] = 0.0000;
	women_remarrige_ratio[2] = 0.0000;
	women_remarrige_ratio[3] = 0.0000;
	women_remarrige_ratio[4] = 0.0000;

	women_remarrige_ratio[5] = 0.0000;
	women_remarrige_ratio[6] = 0.0000;
	women_remarrige_ratio[7] = 0.0000;
	women_remarrige_ratio[8] = 0.0000;
	women_remarrige_ratio[9] = 0.0000;

	women_remarrige_ratio[10] = 0.0000;
	women_remarrige_ratio[11] = 0.0000;
	women_remarrige_ratio[12] = 0.0000;
	women_remarrige_ratio[13] = 0.0000;
	women_remarrige_ratio[14] = 0.0000;

	women_remarrige_ratio[15] = 0.0000;
	women_remarrige_ratio[16] = 0.0004;
	women_remarrige_ratio[17] = 0.0004;
	women_remarrige_ratio[18] = 0.0004;
	women_remarrige_ratio[19] = 0.0004;
	
	women_remarrige_ratio[20] = 0.0103;
	women_remarrige_ratio[21] = 0.0103;
	women_remarrige_ratio[22] = 0.0103;
	women_remarrige_ratio[23] = 0.0103;
	women_remarrige_ratio[24] = 0.0103;

	women_remarrige_ratio[25] = 0.0345;
	women_remarrige_ratio[26] = 0.0345;
	women_remarrige_ratio[27] = 0.0345;
	women_remarrige_ratio[28] = 0.0345;
	women_remarrige_ratio[29] = 0.0345;

	women_remarrige_ratio[30] = 0.0501;
	women_remarrige_ratio[31] = 0.0501;
	women_remarrige_ratio[32] = 0.0501;
	women_remarrige_ratio[33] = 0.0501;
	women_remarrige_ratio[34] = 0.0501;

	women_remarrige_ratio[35] = 0.0438;
	women_remarrige_ratio[36] = 0.0438;
	women_remarrige_ratio[37] = 0.0438;
	women_remarrige_ratio[38] = 0.0438;
	women_remarrige_ratio[39] = 0.0438;

	women_remarrige_ratio[40] = 0.0269;
	women_remarrige_ratio[41] = 0.0269;
	women_remarrige_ratio[42] = 0.0269;
	women_remarrige_ratio[43] = 0.0269;
	women_remarrige_ratio[44] = 0.0269;

	women_remarrige_ratio[45] = 0.0176; 
	women_remarrige_ratio[46] = 0.0176; 
	women_remarrige_ratio[47] = 0.0176; 
	women_remarrige_ratio[48] = 0.0176; 
	women_remarrige_ratio[49] = 0.0176; 

	women_remarrige_ratio[50] = 0.0115; 
	women_remarrige_ratio[51] = 0.0115; 
	women_remarrige_ratio[52] = 0.0115; 
	women_remarrige_ratio[53] = 0.0115; 
	women_remarrige_ratio[54] = 0.0115; 

	women_remarrige_ratio[55] = 0.0069; 
	women_remarrige_ratio[56] = 0.0069; 
	women_remarrige_ratio[57] = 0.0069; 
	women_remarrige_ratio[58] = 0.0069; 
	women_remarrige_ratio[59] = 0.0069; 

	women_remarrige_ratio[60] = 0.0043; 
	women_remarrige_ratio[61] = 0.0043; 
	women_remarrige_ratio[62] = 0.0043;  
	women_remarrige_ratio[63] = 0.0043;  
	women_remarrige_ratio[64] = 0.0043;
  
	women_remarrige_ratio[65] = 0.0025;
	women_remarrige_ratio[66] = 0.0025;
	women_remarrige_ratio[67] = 0.0025;
	women_remarrige_ratio[68] = 0.0025;
	women_remarrige_ratio[69] = 0.0025;

	women_remarrige_ratio[70] = 0.0007;
	women_remarrige_ratio[71] = 0.0007;
	women_remarrige_ratio[72] = 0.0007;
	women_remarrige_ratio[73] = 0.0007;
	women_remarrige_ratio[74] = 0.0007;

	women_remarrige_ratio[75] = 0.0007;
	women_remarrige_ratio[76] = 0.0007;
	women_remarrige_ratio[77] = 0.0007;
	women_remarrige_ratio[78] = 0.0007;
	women_remarrige_ratio[79] = 0.0007;

	women_remarrige_ratio[80] = 0.0007;
	women_remarrige_ratio[81] = 0.0007;
	women_remarrige_ratio[82] = 0.0007;
	women_remarrige_ratio[83] = 0.0007;
	women_remarrige_ratio[84] = 0.0007;

	women_remarrige_ratio[85] = 0.0007;
	women_remarrige_ratio[86] = 0.0007;
	women_remarrige_ratio[87] = 0.0007;
	women_remarrige_ratio[88] = 0.0007;
	women_remarrige_ratio[89] = 0.0007;

	women_remarrige_ratio[90] = 0.0007;
	women_remarrige_ratio[91] = 0.0007;
	women_remarrige_ratio[92] = 0.0007;
	women_remarrige_ratio[93] = 0.0007;
	women_remarrige_ratio[94] = 0.0007;

	women_remarrige_ratio[95] = 0.0007;
	women_remarrige_ratio[96] = 0.0007;
	women_remarrige_ratio[97] = 0.0007;
	women_remarrige_ratio[98] = 0.0007;
	women_remarrige_ratio[99] = 0.0007;

}

2014,江端さんの忘備録

(昨日の続きです)

ごく最近に聞いた話なのですが、結婚披露宴にも「格」というのがあるそうです。

Recently, I heard the story that there is a "rank" in a wedding ceremony.

なんでも、大学教授などを呼べば「格」が上がるのだそうです。

They said, for example, the rank will go up when a college professor is in the ceremony.

―― そうかぁーーー?

"It it true?"

私、調子にのって、お世話になった教授を二人とも呼んでしまいました。

In my case, I invited two professors who managed my study in my college to my wedding ceremony.

ゼミでは色々あったけど、楽しく知的な日々を一緒に創って頂いた恩師でしたので。

They could give me an enjoyable and intelligent college life even though there was a lot of trouble.

(石原先生、戸高先生。お元気ですか?)

(Ishihara-sensei, Todaka-sensei. How have you been?)

でも、「格」とかそういうことを考えたことは、一度もありませんでした。

Anyway, I didn't think the rank at all.

それはさておき。

It is enough.

-----

とある結婚披露宴の司会を頼まれた時のことです。

There was a time when I was asked to be the MC of a wedding ceremony.

直前打合せをしている時、

When I did the meeting before the ceremony,

『絶対に、この祝電だけは読み上げてくれ』

I was asked to read a congratulatory telegram carefully and considerably.

と、そうとう念入りに頼まれたことがあります。

「妙な依頼だなぁ」と思って、ひょいと表書きを見たところ、そこには、

I thought that it was an odd request, and I watched the sender's name

―― 『内閣総理大臣』という文字と、その当時の総理大臣の名前

The title "prime minister" and his name of the day.

が記載されていました。

なるほど。

I got it.

まあ、なんというか、これも、一種の「格」なのかもしれません。

Well, how to say, I thought it might be a kind of "rank."

ただ、これと同文の電報は、その日の日本の結婚披露宴に、同時に事務的に1000通以上も発送されていたのじゃないかなー、と思っています。

However, I also thought that more than one thousand telegrams with the same message were going to be released on the same day,

電報一本のコストで、政治献金をして貰えるのであれば、こんなに「美味しい」商売はないでしょうしね。

It was an accessible business to send a telegram to a wedding ceremony if the statesperson got the political donation.

-----

それはさておき。

Anyway,

何を価値観とするかは個人の自由です。

It was a matter of personal choice and their sense of worth.

私がとやかく言うことはではありません。

I didn't do anything about that.

そして、私は与えられた任務として、その「内閣総理大臣閣下の電報」を、声高らかに読み上げたのです。

I read aloud the "telegram from the prime minister" as my given mission.

2014,江端さんの忘備録

宇宙戦艦ヤマトは素晴しい作品です。2199は特に素晴らしかったです。

"Space battle ship YAMATO" is really excellent. Especially the version of "2199" is splendid.

しかし、私がものごころついたころから、どうしても納得できないセリフがあります。

There are however, the lines that I can never understand since I can remember.

「エネルギー充填120%!」

"120% of energy filling"

-----

なぜなら、この後に続くシーンは、こうなるはずだからです。

The scene must be the followings.

「エネルギー過充填にて、エネルギー伝導導管破砕! 」

"Excessive energy is filling and the energy conduction pipes are crushed!"

「波動エンジン、筐体強度臨界を突破します!」

"The wave engine is going to be broken through the housing strength critical point!!"

「ヤマト、爆発します!!」

"Yamato will explode!”

漆黒の宇宙空間が、目映い光で覆われた後、ゆっくりと元の状態に戻り、エンディングテーマとテロップが流れる。

After dazzling light over outer space of the jet black covered, it returns to an original state slowly, and an ending theme and a telop are appeared.

―― 宇宙戦艦ヤマト 完

Space battle ship YAMATO is completed.

―― スペックを守らなかった戦士達

Soldiers who did not follow specifications

------

どんな機械であれ、スペックの上限を超えて使ってはダメです。

You should not use any machine over the limitation of specification.

120%も充填したら、未来の宇宙戦艦だって壊れますよ。本当の話です。

If you fill more than "100%" of energy, even if it is a future space battle ship, the ship is going to be destroyed. It is a true story.

"120%"に、「なんか凄い」を込めたい気持ちはよく分かるのです。

I can understand the feeling that someone want to load "something great" in the world "120%".

しかし、技術立国日本を維持する為には、まず、機械の常識を少年少女達に理解して貰わなくてはなりません。

However, if we should maintain "technical nation, Japan", at first you must have boys and girls understand the common sense of the machine.

------

他は何も直さなくてもいいから、この「120%」というコンセプトだけは、なんとかなりませんかね?

I think that you don't have to modify anything but the concept of "120%".

未分類

///////////////////////////////////////////////////////////
//                                                       //
//                                                       //  
//          メモリ消去用の実験テストプログラム           //
//                                                       //  
//                                                       //  
//                                                       //  
//                                       2014/06/29      //  
///////////////////////////////////////////////////////////

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

enum sex {woman, man};
 
typedef struct person {
  enum sex sex;  //性別
  int age; //年齢

  struct person *prev;  /* 前の構造体を示すポインタ */
  struct person *next;  /* 次の構造体を示すポインタ */
} person;



int main ()
{
  // 10人分のデータを作る 

  int i, k, count;
  person  *p_person, *p_prev_person, *p_next_person;
  person  *p_first_person, *p_last_person, *temp_p_person;


  printf("checked 0.\n");

  ////////////  現状データの入力 ////////////
  
   p_person= (person *)malloc(sizeof(person));
  if(p_person == NULL) {
      printf("メモリが確保できません\n");
      exit(EXIT_FAILURE);
   }

  p_person->sex = woman;
  p_person->age = 10;

  p_first_person = p_person;  //最初の一人

  // (最後に)ポインタをリンクする
  p_person->prev = NULL;
  p_prev_person = p_person;

  for(i=9; i>=0; i--){
	
	p_person= (person *)malloc(sizeof(person));
	  if(p_person == NULL) {
		printf("メモリが確保できません %d\n",i);
		exit(EXIT_FAILURE);
	  }
	  
	  p_person->sex = woman;
	  p_person->age = i;
	  
	  
	  // (最後に)ポインタをリンクする
	  p_prev_person->next = p_person;
	  p_person->prev = p_prev_person;
	  p_person->next = NULL;
	  p_prev_person = p_person;
  }

	  
  p_last_person = p_person; //最後の一人

  printf("checked 1.\n");

  ////////////  現状データの入力 終わり ////////////

  ////////////  データ削除の処理例 ////////////


  p_person = p_first_person;  //最初の一人
  
  while (p_person != NULL){
	
	
	if (p_person->age == 3){
	  
	  // メモリを消す前の処理
	  if (p_person == p_first_person){ // 最初の場合
		p_first_person = p_person->next;
		p_first_person->prev = NULL;
		free(p_person);
		
		p_person = p_first_person;
		
		printf("C1:");	  
	  }
	  else if (p_person == p_last_person){ //最後の場合
		p_last_person = p_person->prev;
		p_last_person->next = NULL;
		free(p_person);
		
		p_person = p_last_person;
		
		printf("C2:");	  
	  }
	  else {
		p_person->next->prev = p_person->prev;
		p_person->prev->next = p_person->next;
		temp_p_person = p_person->prev; // 一つ前のポインタに退避
		
		free(p_person);
		
		p_person = temp_p_person;
		
		printf("C3:");	  
	  }
	}
	
	p_person = p_person->next;
	
  }

  ////////////  確認フェーズ ////////////

  if (p_first_person == p_last_person){
	printf("passed exit\n");
	exit(0);
  }



  p_person = p_first_person;  

  while (p_person != NULL){
	printf("%d ",p_person->age);
	p_person = p_person->next;
  }


}






#if 0
  p_person = p_first_person;  

  while (p_person != NULL){
	printf("%d ",p_person->age);
	p_person = p_person->next;
  }

  p_person = p_last_person;  

  while (p_person != NULL){
	printf("%d ",p_person->age);
	p_person = p_person->prev;
  }

#endif

2014,江端さんの忘備録

私はかねがねから、家族に対して、

I always tell my family that

「痛みが100%になってからでは遅い。70%の段階で『叫べ』」と言い含めています。

When you feel pain, cry to me at the 70% level. It is going to be late after at 100%.

100%では手遅れになるからです。

It must be too late at 100%.

-----

こんにちは。小田急電鉄さん。

Hello, Mr Odakyu-Dentetsu.

「脱線事故は23時に復旧予定」というアナウンスに、私は文句を言うつもりはないのですよ。

I don't have any intention to complain about your announce, "the derailment accident will recover by 23:00"

事故のない制御システムはないし、未来は常に分からないものです。

There is no control system without accident, and nobody knows the future.

でもね、「本日中の復旧断念」というアナウンスを、今(23時)に出して、どーする。

Mind you. What do you expect me with releasing your announcement of "abandoned the recovery in today" at 23:00?

例えば、「本日中の復旧は無理かもしれません」と、2時間前の21時に言ってくれたら、私には、打てる手があったかもしれません。

For example, if you had told me, "the recovery today might be impossible," at 21:00, I could have to do something to go home.

-----

しかし、遅着遅延がデフォルトの小田急電鉄が、この程度のことに気がつかない訳がない。

I thought Mr.Odakyu-dentetsu, whose delay and late arrival were usual, had no reason to notice such tips.

当然、このような戦略には、当然、「裏」があると考えてしかるべきであろう。

I think that Mr.Odakyu-dentetsu used this strategy because of another reason.

しかし、それは何だろう?

I don't know the tip.

それを考えながら、今日は寂しく一人オフィスの椅子の上で仮眠でも取ることにしましょう。

Thinking of this tip, I am going to take a nap on my chair this night.

-----

にしても、その理由が、

If the reason was based on

『脱線事故が、半日やそこらで復旧すると信じている、間抜けな人間なんぞは、救出しなくて良い』

"We don't have to save foolish people who believe in the recovery against derailment accident.

という考えに基づくものであるなら、私は激怒できないし、してはならない。

I cannot rage. I should not rage.

激怒というよりは、「なるほど、私は間抜けだ」と納得しなければならないでしょう。

Rather than raging, I have to accept my foolishness.

私は、ただの利用者ではなく、制御システムの研究員です。

Because I am a control system engineer rather than an ordinal users

制御システムに通じている人間なのですから、「その事故のインパクトを見抜けなかったのか」、と指摘されたら、グウの音も出ません。

I am familiar with control systems, so when you pointed out, "could you see through the impact of the accident?" I was lost for words.

-----

『ふーん、5時間で脱線事故を復旧させるのか。最近の鉄道の復旧力って、凄いのだなー』

"Hmm. The railway company can recover from a derailment accident in just five hours. It is great."

と、素直に感心していた「馬鹿」が、ここにいます。

Who was impressed with the "idiot" here?

江端さんの忘備録

先日、たまたまYoutubeで、アニメ「氷菓」をレビューしました。

Yesterday, I happened to watch an animation "Kyouka" by Youtube.

アニメそのものとしても、大変素晴しい作品なのですが、それ以上に、この作品の凄いところは、単なる青春映像ではなく、人生そのものを映している、という点にあります。

This animation is no complaints. This original work of art is wonderful. Moreover the deeply important point is that this work shows not only bloom of youth but also life itself.

-----

"とある運動部に補欠がいた。補欠はレギュラーになろうと極めて激しく努力したが、レギュラーにはなれなかった。そのクラブには、その補欠よりずっと有能な人材が揃っていたから。"

There was a substitute player in certain sports club. The substitute was very vigorous effort to become a regular, but he did not regular. Because qualified members were enough in that club.

"その中でも、天性の才の持ち主がいた。もちろん、補欠の技量とは天と地の開きがあった。

A girl-genius was among them. Of course her ability was far from the substitute.

"彼女はある大会で非常に優れた活躍をし、MVPにも選ばれた。インタビュアーが彼女に聞いた。「大活躍でしたね。秘訣は何ですか?」彼女はこう答えた。

She played very well in a tournament and she was selected as the MVP too.

When an interviewer asked her why she won, she answered,

"「ただ、運が良かっただけです」"

"Just good luck"

"この答えは、その補欠にはあまりに辛辣に響いたと思うけど。どう?"

I think the answer was too acrimonious for the substitute. How do you think?"

"誰でも自分を自覚するべきだ。でないと。……見ている側が馬鹿馬鹿しい"

Anyone should be aware of themselves. If not, we feel that we all are fool clown.

(氷菓 第10話 「万人の死角」)

(Hyouka episode 10 ""Blind spot for all of people")

-----

私が今の職場に入社して、先ず、最初に覚えた絶望。

The first desperation after joining my company was

それが、

―― 努力は才能を越えない

"Ability counts for more than effort."

努力で越えられる程度の能力は、しょせんは「才能」の名に値しないものなのです。

The ability that was overcome by effort is not suitable for the name "ability".

私の父は、よく私に「努力は天才に勝つ」と教えてくれましたが、残念ながら、父は、人生において「天才」に巡り合う機会がなかったのでしょう。

However my father often told me that "effort pays in long run", I am afraid that he had no chance to meet a real genius.

「天才」の前に対峙した時の、その圧倒的に、神々しいまでの能力というものを、―― 多分、父は知らない。

Maybe he didn't know that overwhelming and awe-inspiring ability a genius owned.

-----

絶望という泥の中で這いずり回って生きることは、本当に苦しいことなのです。

Living by crawling in the mud of despair would therefore really painful.

だから、高みを目指すことから降りる人や、降りていく人を、私だけは、非難したくないのです。

So, I do not want to blame anyone go down or get out of the aim of heights.

2014,江端さんの忘備録

先日、「GUIは滅亡する」とシャーシャーと言い放ちながら、まるでそれを忘れてかのように、―― 一言の自己批判もなく ―― 未だに、自信たっぷりに、 別の将来の技術を語っているヤツがいる ――

The other day, some persons now keep talking big about the future technology, thought they had told us about the wrong predict of "GUI ruin".

という話をしました。

「オブジェクト指向言語」という概念が華やかになりつつ頃、彼らは、同じように、その当時、FORTRANやCOBOLを、あざ嗤っていたのです。

When the object oriented language became a trend twenty years ago, they had burned FORTRAN and COBOL in effigy with saying

―― あんな汚い言語は、直に廃れてなくなる

"Like that dirty languages are going to be ruined."

と。

■ITR社の調査によれば、日本ではJava、Visual Basicに次いで、COBOLは3番目に利用意向が高い

According to ITR report, the use of COBOL is the third after Java and Visual Basic

■IPAのレポートによると、1位のJava(25.4%)に次いでCOBOLは16.8%で2位。

According to IPA report, the existing COBOL code is 16.8% after Java (25.4%).

■ガートナーによれば、COBOLは全プログラム約3,100億行のうちの約65%の約2,000億行あって、毎年約50億行が増えている

According to Gartner report, the code is increasing five billions every year, and the ratio of code make up 65%, two hundred billion of all code of three hundred ten billion

ま、調査というのはその視点や手法によって、自由に結果を調整できるものですから、これを直接信じるかどうかは別問題として、

Though I know well any result of research is controllable from methods and views.

「廃れてなくなる」が、完全に外れたことは、確かでしょう。

It's an indisputable fact that the ruin is out of question.

-----

FORTRANにしても、COBOLにしても、その過去の遺産(ライブラリ群)というのは、物凄い数量でしょう。加えて、何十年に渡る徹底的な利用実績は、他のライブラリ群の比ではありません。

Even if in FORTRAN or COBOL, the legacy of the past (library group), would be enormous quantity. In addition, the experiences in use over several decades are credible.

当時の、私達エンジニアは、この「遺産(レガシー)」という考え方を、徹底的に軽視していたのです。

At the time, we engineer, thoroughly had neglected to this idea "Heritage (Legacy)".

これまで、コンピュータソフトウェアの世界では、様々なイノベーションがありましたが、この圧倒的な「遺産」を淘汰することは、ついにできなかったのです。

In the world of computer software, a lot of innovative technologies have happened, but we finally couldn't cull this overwhelming "heritage" eventually.

-----

つまり、古いものは、「古い」というだけで、「新しい」より莫大な価値がある(こともある)のです

In other words, just say, "Old" in itself (is suppose to) has a huge value than the "New".

古参のエンジニアが、一見、ぼーっとして、なーんにもできない使えない奴のように見えて、彼らは、凄い資産(レガシー)を蓄積しているのです。

At first glance, senior engineers look like to be daydreaming and useless for everything but they have accumulated (Legacy) great assets.

分かりますね。若いエンジニアの諸君。

Mr. /Ms. young engineers. Do you understand?

シニアエンジニアを馬鹿にすると、怖い目に会いますよ。

If you make fun of them, you could encounter dangerous situations.

彼等が本気を出せば、レガシーな技術力に加えて、不当な職位の権力を濫用して、

If they go all out, they use technical legacy skills, abuse the power of unreasonable positions, in addition to,

―― あなたを地獄に落します。

make you land in hell.

2014,江端さんの忘備録

昨夜、西尾維新さんの最新刊、「終物語(下)」を楽しく読んでいました。

Last night, I enjoyed reading "Owari-monogatari(latter)" written by Ishin Nishio-san.

主人公の二人がデートでカラオケボックスに行って、カラオケ装置による歌唱力の合計得点を競い会うというシーンがでてきました。

In the book, the scene that the hero and heroine competed in singing songs with scores from the karaoke-machine appeared.

機械による歌唱力の得点というのは ―― エンジニアとして断言しますが ―― 全然当てになりませんよ。

As an engineer, I can determine that the score is not trustworthiness absolutely.

だって、その機械のパラメータを設定している当人が、エンジニアですから。

The parameters of the machine must be tuned by engineers.

エンジニアの思考形態は大体読み取れるんですよ、私は。

I can estimate how the engineers make the score algorism.

(1)音程の周波数解析をする、(2)音量の特徴点が発生する時間の差異を計算する、(3)上記(2)(3)のシンクロ率を評価関数として得点化する。

(1)analysis of key frequency, (2)calculation of the time between specified points of sound, (3)making score as synchronic ratios from the (2)(3).

多分、この3つくらいでしょう。

Maybe there looks like the above three points.

搭載できるメモリやCPUの性能を考えれば、これ以上の機能を搭載するエンジニアはいないだろうし、多分「やる気もない」と思う。

No engineer tries to load another function from the view points of memory and CPU and have spirit to do them.

この3つのパラメータの場合、自分なりの個性で上手く歌おうとすればするほど得点は悪くなる ―― まあ、だから、「戦場ヶ原ひたぎ」さんは、落ち込む必要はないんです。

According to the above parameters, the score becomes worse, the better she sings a song.

So, I think that Ms. Hitagi Senjyougahara doesn't let her down.

-----

私が学生の頃、大学祭では「コンピュータうらない」というのが結構流行っていたのですが、あれくらい当てにならないものはありません。

When I was a college student, there were many branches that showed "Computer fortune-telling" in college festival. I know well that are squiffy doo.

なにしろ、文系で外国文学を専攻していた、私の嫁さんが、占いプログラムのコードを入力していたくらいですから。

My wife who majored in English literature input the programming code to personal computer.

『凄いじゃん! アルゴリズムから設計したの?』

"Great! Did you design the algorism?"

と驚く私に、

I was surprised to heat it from her, she said,

『いやー、なんかパソコン月刊誌に書かれていた文字を打ち込んだだけだけど』

"I just input meaningless many characters from a PC magazine"

と言っていました。

「コンピュータ」と言うだけで無条件に信頼され、「コンピュータを操作できる」ということだけで、不当なくらい絶大な尊敬を勝ち得ていた ――

私にとって、そんな幸せな時代があったのですよ、かつては。

The period absolutely existed that

Everybody believe anything with the word "computer”, and everybody respected me only because I could use computer.

Once, the days made me happy overwhelmingly with no reason.

2014,江端さんの忘備録

中学や高校の課外クラブ活動(いわゆる部活)というのは、私達にとってはごく普通の日常であったと思います。

Extracurricular activities in junior high/high school are every day in Japan.

何のコラムで読んだのか忘れましたが、中国では、この「部活」という概念がなく、アニメやコミックの中で登場する、この「部活」が一種のフィクションまたはイリュージョンとして把握されているらしいとのことです。

In China, there is no concept of "Extracurricular activity in junior high/high school," Chinese people grasp that it is a kind of fiction or fancy dream.

『文化の違いだなぁ』と深く感に入ったのを覚えています。

I moved to hear the story by thinking of a "different culture."

-----

日本のアニメやコミックでは、よく「風紀委員」というものが登場します。

"School committee for discipline" often happens in Japanese comics and animation.

特に恋愛もののコンテンツに良く登場します。まあ、「恋愛」と「風紀」というのが対立概念(か、どうかは知りませんが)から導かれるストーリーが、面白い、と。

It is about to appear in love stories. The opposition between "love" and "moral" amuses readers.

実は、私、この「風紀委員」なるものが、フィクションだと思っていたのです。

To tell you the truth, I thought "School Committee for Discipline" was a fiction

昨日まで。

Until yesterday.

嫁さんの高校に、風紀委員がいたと聞いて驚いてしまいました。

I was shocked to hear from my wife that "it existed."

私の狭い概念では、

By my narrow thought

風紀委員

"School committee for discipline"

組織による私生活への干渉

"Enforcement of personal privacy" by school

国家による表現の自由の制限

"Restriction against freedom of expression by government"

戦前の特別高等警(いわゆる特高)

"Special political police in WW2"

ちょっと他の人とは違う、歪な閉じた思考形態が完成しておりまして、「風紀委員」なる存在を(無意識に)拒否していたようです。

I have completed the above funny sequences and unconsciously denied the existence of the "School Committee for Discipline" for a long time.

-----

まあ、私も、中学や高校では、生徒会役員として、生徒の自主的な表現の自由(頭髪、着衣、その他)の弾圧を続けていましたし、

However, I kept cracking down on students' free expression (hairstyle, clothes, etc.) as a member of the student government.

今でも、会社で、安全衛生委員として、社員の職場環境を、会社の規定されたフォーマット("5S"なるルール等)に押しつけるように弾圧を続けています。

Now, I keep cracking down on coworkers to enforce company rules("5S", etc.) as a safety and health committee member.

-----

自由を標榜する者が、自由の弾圧者である ―― ということは、結構、普通に見られる日常ですけどね。

"A person who advocates free is a person of coercion" in a day-to-day situation.

2014,江端さんの忘備録

私は学生の頃、大学の自治会の役員に立候補したことがあるような気がします。

When I was a college student, I was about to become a candidate of student association.

なんで、そんなあいまいな言い方をするかというと、―― よく覚えていないからです。

The reason why I tell you like such an ambiguous talking is that I don't remember it.

私の大学時代は、大きく前半と後半に大別できると思っております。

I think I can divide the former college life, and the latter.

前半を代表する内容はこちら「正しいデモのやりかた」になります。

This "Right way to demonstrating" was a representing column of the former, and

後半を代表する内容はこっち「やさしい水素爆弾の作り方 」ですね。

This "Right way to make hydrogen bomb" is of the latter.

大学自治会と強いコネを持っていたので、「名前を貸してくれ」と言われたら、ホイホイと名前を貸していたりしていた訳です。

At the former period, I had a strong connection with the association, so I usually gave my name easily.

ま、そんな訳で、

For the reason,

様々な政治的な集会のポスターが無秩序に張られ、ペンキで「インターナショナルの歌詞」や、チェ・ゲバラやトロツキーの語録が書き殴られた壁の中、

I could be in a walk around the front office of the association, that there are many posters and graffiti a politically charged term on the whole walls.

自治会本部の部屋にスタスタと入っていく私を、工学部の友人達は、畏怖(というか驚愕というか、嫌悪というか)の目で見ていたように思います。

I think that my friends of engineering department looked at me with awe (or consternation or disgust).

-----

ある日のこと、鴨川の東側に位置する、日本を代表する国立大学を拠点とする左翼集団が、こともあろうに、私の大学のキャンパスで集会を開いていました。

At a day in my college life, left-wing militants based on the famous National University in Kyoto occupied the college campus and held a rally.

私は激怒しました。

I was inflamed with rage.

これが学内の極右団体の集会や、カルト宗教団体の勧誘であったとしても、私はこれほどには怒らなかったと思います。

Even if they were right-wing extremists or religious cults, I believed that I didn't be in a rage.

他の大学の団体に、自分の大学のキャンパスを占拠されている屈辱で、体が震えるほどの怒りを感じました。

I felt tremble anger with abasement with controlling effectively by left-wing militants of neighbor college.

-----

『先輩、こんな暴挙を許していいんですか! 武装して強制排除しましょう!!』

"Can we forgive this outrange, Chairman! Armed and let's eviction!!"

I exclaimed.

と叫び続ける私に、自治会の先輩は、私には応えず、彼等の集会を冷静な目で観察し続けていました。

The chairman of the association ignored me, and he kept silent and watching them quietly.

その態度は(江端、今は動くな)と無言の圧力をかけるものでした。

The attitude seemed to be a kind of pressure for me, with "Ebata, don't move now"

今になって思えば、自治会の先輩の判断は正しいものだったと思います。

Now I think that his judgment seemed to be correct.

彼等の全国的な組織力、武力、統率力等、そして「彼等は集会を終えれば、立ち去る」ことなどを、総合的に判断すれば、

I should have thought of their powers, organizations, forces, and the fact "they left from our campus eventually".

こちらから「仕掛ける」ことは、政治的に正しい行動ではなかったのです。

"Lunching any attach from our side" was not correct politically.

-----

今、クリミア半島では、ロシア軍による実効支配中が進行中のようです。

Now in the Crimea peninsula, the Russian military seems to be in progress under the effective control.

そこには、私のような者と、先輩のような者がいるはずです。

There seems to be two types of person in peninsula, like me and like the chairman.

彼らがどう動くのか、今、私は注意深く見守っています。

I am watching carefully how they move now.