Thread: using bubble sort to sort a matrix by sum..

  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    using bubble sort to sort a matrix by sum..

    i tried to use buble sort
    i marked the start end the end
    with comments (start sorting code ,end sorting code)
    its not working

    Code:
    #include <stdio.h>
    
    int main()   { //star
    	int i,j,k,temp,temp3[50];
    	int rows = 50;
       int cols = 50;
       int jndex,input;
    //	int sum2=0;  sum2 is never used
    
       /* You can't make an array without telling it's size. rows and cols
       have not been assigned a value, yet. 
       */
       int matrix[50][50];
    //	int matrix[rows][cols];
    //	int sum[rows][cols];
       int sum[50][50];
    //	int temp1[rows][cols];
       int temp1[50][50];
    //	int transpose [cols][rows];
       int transpose [50][50];
    	int index,kndex,tndex,gndex,lndex;
       int rows_sum[50];
       //int rows_sum[rows]; //rows could be ANY value, still.
    
    /* your program isn't designed for this
       printf("enter rows and cols [1..50] ==> ");
    	scanf("%d %d",&rows,&cols);
    */
    /* You can save yourself this code, just by making the array initialize to
    zero's, when you declare it:
    row_sum[4] = { 0 };
    This only works when you first declare them, not at any later time
    */
     printf("enter the size of a  matrix:");
       scanf("%d %d",&rows,&cols); 
    	for (index = 0; index < rows; index++)
    	{
    	    rows_sum[index]=0;
    		for (kndex = 0; kndex < cols; kndex++)
    		{
    			matrix[index][kndex] = 0;
    			sum[index][kndex] = 0;
    			temp1[index][kndex] = 0;
    			
    			transpose[index][kndex] = 0;
    		}//end inner for
    		temp3[index] = 0;
    	}//end outer for
    	printf("enter numbers in a row for a matrix:"); //stat input
    	for (index = rows - 1;index >= 0; index--)
    	{
    		for (kndex = cols - 1; kndex >= 0; kndex--)
    		{
    			scanf("%d", &matrix[index][kndex]);
    			transpose[kndex][index] = matrix[index][kndex];
    		}
    	}
    	i = getchar();  //needed because of scanf()
    	//end input
    	//start power operation
    	//  rows sum
    	for (index = 0; index < rows; index++)
    	{
    		for (kndex = 0; kndex < cols; kndex++){
    			rows_sum[index]=rows_sum[index]+matrix[index][kndex];
    		printf("%d ",matrix[index][kndex]);
    		}
    		printf("\n");
    	}
          //  end rows sum
    
                                                            //star sorting code
    	for (index=0; index<rows-1; index++) {
      for (jndex=0; jndex<rows-1-index; jndex++)
        if (rows_sum[jndex+1] < rows_sum[jndex]) {  /* compare the two neighbors */
          temp = rows_sum[jndex];         /* swap a[j] and a[j+1]      */
          rows_sum[jndex] = rows_sum[jndex+1];
          rows_sum[jndex+1] = temp;
                   			  for (kndex=0; kndex<rows; kndex++){//inner for
                      temp3[kndex] =matrix[index][kndex];
    				  matrix[jndex][kndex]=matrix[jndex+1][kndex];
                       rows_sum[jndex+1] =temp3[kndex];
    			  }//end inner 
    		                                                   //end sorting code
      }
    }
       //print the swapped matrix
       for(i = 0; i < rows; i++)  {
          putchar('\n');
          for(j = 0; j < cols; j++)  
             printf(" %d", matrix[i][j]);
       }
       i = getchar();
       return 0;
    }//end main
    Last edited by transgalactic2; 12-22-2008 at 09:05 AM.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Code:
    for (kndex=0; kndex<rows; kndex++){//inner for
                      temp3[kndex] =matrix[index][kndex];  //Oops!  Should be jndex
    I have to write something here or it won't let me post.

  3. #3
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    where jndex?
    there are three places
    Code:
    temp3[kndex] =matrix[index][kndex];  //Oops!  Should be jndex
    ??

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    I know there are three places where it could go on that line. But there's only one place that makes sense for it to go. Remember what you're trying to do, here.

  5. #5
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    i tried
    temp3[kndex] =matrix[jndex][kndex];

    i tried
    temp3[jndex] =matrix[index][jndex];

    those are the only cases

    its not working

    Code:
    #include <stdio.h>
    
    int main()   { //star
    	int i,j,k,temp,temp3[50];
    	int rows = 50;
       int cols = 50;
       int jndex,input;
    //	int sum2=0;  sum2 is never used
    
       /* You can't make an array without telling it's size. rows and cols
       have not been assigned a value, yet.
       */
       int matrix[50][50];
    //	int matrix[rows][cols];
    //	int sum[rows][cols];
       int sum[50][50];
    //	int temp1[rows][cols];
       int temp1[50][50];
    //	int transpose [cols][rows];
       int transpose [50][50];
    	int index,kndex,tndex,gndex,lndex;
       int rows_sum[50];
       //int rows_sum[rows]; //rows could be ANY value, still.
    
    /* your program isn't designed for this
       printf("enter rows and cols [1..50] ==> ");
    	scanf("%d %d",&rows,&cols);
    */
    /* You can save yourself this code, just by making the array initialize to
    zero's, when you declare it:
    row_sum[4] = { 0 };
    This only works when you first declare them, not at any later time
    */
     printf("enter the size of a  matrix:");
       scanf("%d %d",&rows,&cols);
    	for (index = 0; index < rows; index++)
    	{
    	    rows_sum[index]=0;
    		for (kndex = 0; kndex < cols; kndex++)
    		{
    			matrix[index][kndex] = 0;
    			sum[index][kndex] = 0;
    			temp1[index][kndex] = 0;
    
    			transpose[index][kndex] = 0;
    		}//end inner for
    		temp3[index] = 0;
    	}//end outer for
    	printf("enter numbers in a row for a matrix:"); //stat input
    	for (index = rows - 1;index >= 0; index--)
    	{
    		for (kndex = cols - 1; kndex >= 0; kndex--)
    		{
    			scanf("%d", &matrix[index][kndex]);
    			transpose[kndex][index] = matrix[index][kndex];
    		}
    	}
    	i = getchar();  //needed because of scanf()
    	//end input
    	//start power operation
    	//  rows sum
    	for (index = 0; index < rows; index++)
    	{
    		for (kndex = 0; kndex < cols; kndex++){
    			rows_sum[index]=rows_sum[index]+matrix[index][kndex];
    		printf("%d ",matrix[index][kndex]);
    		}
    		printf("\n");
    	}
          //  end rows sum
    
                                                            //star sorting code
    	for (index=0; index<rows-1; index++) {
      for (jndex=0; jndex<rows-1-index; jndex++)
        if (rows_sum[jndex+1] < rows_sum[jndex]) {  /* compare the two neighbors */
          temp = rows_sum[jndex];         /* swap a[j] and a[j+1]      */
          rows_sum[jndex] = rows_sum[jndex+1];
          rows_sum[jndex+1] = temp;
                   			  for (kndex=0; kndex<rows; kndex++){//inner for////////////////////////////////////
                      temp3[jndex] =matrix[index][jndex];
    				  matrix[jndex][kndex]=matrix[jndex+1][kndex];
                       rows_sum[jndex+1] =temp3[kndex];
    			  }//end inner
    		                                                   //end sorting code
      }
    }
       //print the swapped matrix
       for(i = 0; i < rows; i++)  {
          putchar('\n');
          for(j = 0; j < cols; j++)
             printf(" %d", matrix[i][j]);
       }
       i = getchar();
       return 0;
    }//end main

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Except for all the cases that you failed to do, of course. Remember what you are trying to do: you are trying to swap matrix[jndex][kndex] with matrix[jndex+1][kndex]. Now go back to inside your for loop and do so.

  7. #7
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    did I put it correctly?
    it doesnt sort
    Code:
    #include <stdio.h>
    
    int main()   { //star
    	int i,j,k,temp,temp3[50];
    	int rows = 50;
       int cols = 50;
       int jndex,input;
    //	int sum2=0;  sum2 is never used
    
       /* You can't make an array without telling it's size. rows and cols
       have not been assigned a value, yet.
       */
       int matrix[50][50];
    //	int matrix[rows][cols];
    //	int sum[rows][cols];
       int sum[50][50];
    //	int temp1[rows][cols];
       int temp1[50][50];
    //	int transpose [cols][rows];
       int transpose [50][50];
    	int index,kndex,tndex,gndex,lndex;
       int rows_sum[50];
       //int rows_sum[rows]; //rows could be ANY value, still.
    
    /* your program isn't designed for this
       printf("enter rows and cols [1..50] ==> ");
    	scanf("%d %d",&rows,&cols);
    */
    /* You can save yourself this code, just by making the array initialize to
    zero's, when you declare it:
    row_sum[4] = { 0 };
    This only works when you first declare them, not at any later time
    */
     printf("enter the size of a  matrix:");
       scanf("%d %d",&rows,&cols);
    	for (index = 0; index < rows; index++)
    	{
    	    rows_sum[index]=0;
    		for (kndex = 0; kndex < cols; kndex++)
    		{
    			matrix[index][kndex] = 0;
    			sum[index][kndex] = 0;
    			temp1[index][kndex] = 0;
    
    			transpose[index][kndex] = 0;
    		}//end inner for
    		temp3[index] = 0;
    	}//end outer for
    	printf("enter numbers in a row for a matrix:"); //stat input
    	for (index = rows - 1;index >= 0; index--)
    	{
    		for (kndex = cols - 1; kndex >= 0; kndex--)
    		{
    			scanf("%d", &matrix[index][kndex]);
    			transpose[kndex][index] = matrix[index][kndex];
    		}
    	}
    	i = getchar();  //needed because of scanf()
    	//end input
    	//start power operation
    	//  rows sum
    	for (index = 0; index < rows; index++)
    	{
    		for (kndex = 0; kndex < cols; kndex++){
    			rows_sum[index]=rows_sum[index]+matrix[index][kndex];
    		printf("%d ",matrix[index][kndex]);
    		}
    		printf("\n");
    	}
          //  end rows sum
    
                                                            //star sorting code
    	for (index=0; index<rows-1; index++) {
      for (jndex=0; jndex<rows-1-index; jndex++)
        if (rows_sum[jndex+1] < rows_sum[jndex]) {  /* compare the two neighbors */
          temp = rows_sum[jndex];         /* swap a[j] and a[j+1]      */
          rows_sum[jndex] = rows_sum[jndex+1];
          rows_sum[jndex+1] = temp;
                   			  for (kndex=0; kndex<rows; kndex++){//inner for////////////////////////////////////
                      matrix[jndex+1][kndex] =matrix[jndex][kndex];
    				  matrix[jndex][kndex]=matrix[jndex+1][kndex];
                       rows_sum[jndex+1] =temp3[kndex];
    			  }//end inner
    		                                                   //end sorting code
      }
    }
       //print the swapped matrix
       for(i = 0; i < rows; i++)  {
          putchar('\n');
          for(j = 0; j < cols; j++)
             printf(" %d", matrix[i][j]);
       }
       i = getchar();
       return 0;
    }//end main
    Last edited by transgalactic2; 12-22-2008 at 11:29 AM.

  8. #8
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    No. You knew how to swap things up above; perhaps you should remind yourself. You need to use a temp as above.

  9. #9
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    i used temp as in the buble sort
    its not working

    Code:
    #include <stdio.h>
    
    int main()   { //star
    	int i,j,k,temp,temp3[50];
    	int rows = 50;
       int cols = 50;
       int jndex,input;
    //	int sum2=0;  sum2 is never used
    
       /* You can't make an array without telling it's size. rows and cols
       have not been assigned a value, yet.
       */
       int matrix[50][50];
    //	int matrix[rows][cols];
    //	int sum[rows][cols];
       int sum[50][50];
    //	int temp1[rows][cols];
       int temp1[50][50];
    //	int transpose [cols][rows];
       int transpose [50][50];
    	int index,kndex,tndex,gndex,lndex;
       int rows_sum[50];
       //int rows_sum[rows]; //rows could be ANY value, still.
    
    /* your program isn't designed for this
       printf("enter rows and cols [1..50] ==> ");
    	scanf("%d %d",&rows,&cols);
    */
    /* You can save yourself this code, just by making the array initialize to
    zero's, when you declare it:
    row_sum[4] = { 0 };
    This only works when you first declare them, not at any later time
    */
     printf("enter the size of a  matrix:");
       scanf("%d %d",&rows,&cols);
    	for (index = 0; index < rows; index++)
    	{
    	    rows_sum[index]=0;
    		for (kndex = 0; kndex < cols; kndex++)
    		{
    			matrix[index][kndex] = 0;
    			sum[index][kndex] = 0;
    			temp1[index][kndex] = 0;
    
    			transpose[index][kndex] = 0;
    		}//end inner for
    		temp3[index] = 0;
    	}//end outer for
    	printf("enter numbers in a row for a matrix:"); //stat input
    	for (index = rows - 1;index >= 0; index--)
    	{
    		for (kndex = cols - 1; kndex >= 0; kndex--)
    		{
    			scanf("%d", &matrix[index][kndex]);
    			transpose[kndex][index] = matrix[index][kndex];
    		}
    	}
    	i = getchar();  //needed because of scanf()
    	//end input
    	//start power operation
    	//  rows sum
    	for (index = 0; index < rows; index++)
    	{
    		for (kndex = 0; kndex < cols; kndex++){
    			rows_sum[index]=rows_sum[index]+matrix[index][kndex];
    		printf("%d ",matrix[index][kndex]);
    		}
    		printf("\n");
    	}
          //  end rows sum
    
                                                            //star sorting code
    	for (index=0; index<rows-1; index++) {
      for (jndex=0; jndex<rows-1-index; jndex++)
        if (rows_sum[jndex+1] < rows_sum[jndex]) {  /* compare the two neighbors */
          temp = rows_sum[jndex];         /* swap a[j] and a[j+1]      */
          rows_sum[jndex] = rows_sum[jndex+1];
          rows_sum[jndex+1] = temp;
                   			  for (kndex=0; kndex<rows; kndex++){//inner for////////////////////////////////////
                   			      temp3[kndex]=rows_sum[jndex];
                      matrix[jndex+1][kndex] =matrix[jndex][kndex];
    				  matrix[jndex][kndex]=matrix[jndex+1][kndex];
                       rows_sum[jndex+1] =temp3[kndex];
    			  }//end inner
    		                                                   //end sorting code
      }
    }
       //print the swapped matrix
       for(i = 0; i < rows; i++)  {
          putchar('\n');
          for(j = 0; j < cols; j++)
             printf(" %d", matrix[i][j]);
       }
       i = getchar();
       return 0;
    }//end main

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    I've tried writing comments that aren't insulting, and I've failed, so I'll just stick to the facts: a swap involves three statements:
    Code:
    temp = this;
    this = that;
    that = temp;
    it never involves four statements, and it never involves a "real" item that isn't one of the things being swapped (like rows_sum[jndex]). You are trying to swap matrix[jndex+1][kndex] and matrix[jndex][kndex]. Do so.

  11. #11
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    how to find sub matrices..

    i solved it like you said
    thanks
    Last edited by transgalactic2; 12-22-2008 at 01:22 PM.

  12. #12
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Could you replace tabs with 4 spaces, and fix your indentation before posting please.

    It looks like the problem is that the code in the "inner for" is not code for performing a swap. It has too many lines. Make things easy on yourself by removing that temp3 array. You can just reuse that single temp variable you already have. It makes no difference that you want to swap a whole array because you should still do that by only swapping a single element at a time.
    Also, why would rows_sum even appear in that inner loop? You've already swapped that, so all you have left to do is the swapping of the matrix rows.
    The "inner for" should probably only contain something like these 3 lines:
    Code:
    	temp=matrix[jndex][kndex];
    	matrix[jndex][kndex]=matrix[jndex+1][kndex];
    	matrix[jndex+1][kndex] =temp;
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  13. #13
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    i thought i solved it
    but its not working
    ??

    Code:
    #include <stdio.h>
    
    int main()   { //star
    	int holder2[50],x,x1,y,i,j,k,temp,temp3[50],holder;
    	int rows = 50;
       int cols = 50;
       int jndex,input;
    //	int sum2=0;  sum2 is never used
    
       /* You can't make an array without telling it's size. rows and cols
       have not been assigned a value, yet.
       */
       int matrix[50][50];
    //	int matrix[rows][cols];
    //	int sum[rows][cols];
       int sum[50][50];
    //	int temp1[rows][cols];
       int temp1[50][50];
    //	int transpose [cols][rows];
       int transpose [50][50];
    	int index,kndex,tndex,gndex,lndex;
       int rows_sum[50];
       //int rows_sum[rows]; //rows could be ANY value, still.
    
    /* your program isn't designed for this
       printf("enter rows and cols [1..50] ==> ");
    	scanf("%d %d",&rows,&cols);
    */
    /* You can save yourself this code, just by making the array initialize to
    zero's, when you declare it:
    row_sum[4] = { 0 };
    This only works when you first declare them, not at any later time
    */
     printf("enter the size of a  matrix:");
       scanf("%d %d",&rows,&cols);
    	for (index = 0; index < rows; index++)
    	{
    	    holder2[kndex]=0;
    	    rows_sum[index]=0;
    		for (kndex = 0; kndex < cols; kndex++)
    		{
    
    			matrix[index][kndex] = 0;
    			sum[index][kndex] = 0;
    			temp1[index][kndex] = 0;
    
    			transpose[index][kndex] = 0;
    		}//end inner for
    		temp3[index] = 0;
    	}//end outer for
    	printf("enter numbers in a row for a matrix:"); //stat input
    	for (index = 0;index <rows; index++)
    	{
    		for (kndex = 0; kndex<cols; kndex++)
    		{
    			scanf("%d", &matrix[index][kndex]);
    			transpose[kndex][index] = matrix[index][kndex];
    		}
    	}
    	i = getchar();  //needed because of scanf()
    	//end input
    	//start power operation
    	//  rows sum
    	for (index = 0; index < rows; index++)
    	{
    		for (kndex = 0; kndex < cols; kndex++){
    			rows_sum[index]=rows_sum[index]+matrix[index][kndex];
    
    		}
        //		printf("\n");
    	}
          //  end rows sum
    
                                                           //star sorting code
    
    
    	 for(x = 0; x <rows; x++)
        for(y = 0; y < rows-1; y++)
          if(rows_sum[y] > rows_sum[y+1]) {
    
    
                  for(x1 = 0; x1 <rows; x1++){
                    holder2[x1]=matrix[y+1][x1];
                   }
    
    
            holder = rows_sum[y+1];
    
    
    
                  for(x1 = 0; x1 <rows; x1++){
                    matrix[y+1][x1]=matrix[y][x1];
                   }
    
    
            rows_sum[y+1] = rows_sum[y];
    
    
    
                  for(x1 = 0; x1 <rows; x1++){
                    matrix[y][x1]=holder2[x1];
                   }
    
            rows_sum[y] = holder;
          }
    
    
       //print the swapped matrix
       for(i = 0; i < rows; i++)  {
          putchar('\n');
          for(j = 0; j < cols; j++)
             printf(" %d", matrix[i][j]);
       }
       i = getchar();
    
       return 0;
    }//end main

  14. #14
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    i changed the code exactly like the buble sort
    i add the row swap par and it doesnt work

    http://img371.imageshack.us/img371/9926/50883916wi6.gif

    Code:
    #include <stdio.h>
    
    int main()   { //star
    	int holder2[50],x,x1,y,i,j,k,temp,temp3[50],holder;
    	int rows = 50;
       int cols = 50;
       int jndex,input;
    //	int sum2=0;  sum2 is never used
    
       /* You can't make an array without telling it's size. rows and cols
       have not been assigned a value, yet.
       */
       int matrix[50][50];
    //	int matrix[rows][cols];
    //	int sum[rows][cols];
       int sum[50][50];
    //	int temp1[rows][cols];
       int temp1[50][50];
    //	int transpose [cols][rows];
       int transpose [50][50];
    	int index,kndex,tndex,gndex,lndex;
       int rows_sum[50];
       //int rows_sum[rows]; //rows could be ANY value, still.
    
    /* your program isn't designed for this
       printf("enter rows and cols [1..50] ==> ");
    	scanf("%d %d",&rows,&cols);
    */
    /* You can save yourself this code, just by making the array initialize to
    zero's, when you declare it:
    row_sum[4] = { 0 };
    This only works when you first declare them, not at any later time
    */
     printf("enter the size of a  matrix:");
       scanf("%d %d",&rows,&cols);
    	for (index = 0; index < rows; index++)
    	{
    	    holder2[kndex]=0;
    	    rows_sum[index]=0;
    		for (kndex = 0; kndex < cols; kndex++)
    		{
    
    			matrix[index][kndex] = 0;
    			sum[index][kndex] = 0;
    			temp1[index][kndex] = 0;
    
    			transpose[index][kndex] = 0;
    		}//end inner for
    		temp3[index] = 0;
    	}//end outer for
    	printf("enter numbers in a row for a matrix:"); //stat input
    	for (index = 0;index <rows; index++)
    	{
    		for (kndex = 0; kndex<cols; kndex++)
    		{
    			scanf("%d", &matrix[index][kndex]);
    			transpose[kndex][index] = matrix[index][kndex];
    			printf("%d ",matrix[index][kndex]);
    		}
    		printf("\n");
    	}
    	i = getchar();  //needed because of scanf()
    	//end input
    	//start power operation
    	//  rows sum
    	for (index = 0; index < rows; index++)
    	{
    		for (kndex = 0; kndex < cols; kndex++){
    			rows_sum[index]=rows_sum[index]+matrix[index][kndex];
    
    		}
        //		printf("\n");
    	}
          //  end rows sum
    
                                                           //star sorting code
    
    
    	 for(x = 0; x <rows; x++)
        for(y = 0; y < rows-1; y++)
          if(rows_sum[y] > rows_sum[y+1]) {
            holder = rows_sum[y+1];
                   for(x1 = 0; x1 <rows; x1++){
                    holder2[x1]=matrix[y+1][x1];
                   }
            rows_sum[y+1] = rows_sum[y];
                 for(x1 = 0; x1 <rows; x1++){
                    matrix[y+1][x1]=matrix[y][x1];
                   }
            rows_sum[y] = holder;
    
             for(x1 = 0; x1 <rows; x1++){
                    matrix[y][x1]=holder2[x1];
                   }
          }
       //print the swapped matrix
       for(i = 0; i < rows; i++)  {
          putchar('\n');
          for(j = 0; j < cols; j++)
             printf(" %d", matrix[i][j]);
       }
       i = getchar();
    
       return 0;
    }//end main
    Last edited by transgalactic2; 12-22-2008 at 01:56 PM.

  15. #15
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Clean up the souce before going any further as iMalc suggests... it's VERY hard to read.

    See http://cpwiki.sf.net/Indentation if you need a guide to indenting

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. testing a bubble sort algorithm
    By rushhour in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2009, 01:00 AM
  3. Bubble Sort Query
    By coolboarderguy in forum C Programming
    Replies: 2
    Last Post: 04-15-2008, 12:50 AM
  4. What is a matrix's purpose in OpenGL
    By jimboob in forum Game Programming
    Replies: 5
    Last Post: 11-14-2004, 12:19 AM
  5. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM