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

teratermから入って、emacsでプログラム編集していると、"M-x" を "Alt-x" として使えませんでした。

".emacs"の設定でも変えられなかったので、もしかしたらteratermの設定の問題かもしれない思い、ちょっと調べたみたら。

設定→キーボード→Metaキーで変更できました。

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;

}