Matrices library is now!!!

This is a discussion on Matrices library is now!!! within the C++ Programming forums, part of the General Programming Boards category; How, finally i figured out how to make the library and it worked . Attached in zip file. Read me ...

  1. #1
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186

    Matrices library is now!!!

    How, finally i figured out how to make the library and it worked . Attached in zip file.

    Read me contains all information

    http://www.geocities.com/achillis_sw...library1.0.zip

    enjoy
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    feels good to finish a project doesnt it? if your serious about it and want to keep working on it you might consider adding a license to it.

    i took a quick look at the header.. i dont think you need an 'about' function, i doubt it would ever be used, but this is of course not my project. (however it COULD be since theres no license or copyright! )

    also, instead of the .txt file for documentation, i would suggest making a simple HTML page, or even sticking with a .txt file but changing the layout, check other pages for how they describe a class, for example: http://www.cplusplus.com/reference/i.../stringstream/
    its much easier than using the FAQ-style documentation you have there.

    just some constructive criticism!

  3. #3
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    If feels good?? It feels greaaaaaaaaaatt

    And don't worry about the doc for now I will get one on my website as soon as i release stable version

    how can get license for it btw

    thank you for your help indeed
    Last edited by Hussain Hani; 05-03-2007 at 11:30 PM.
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  4. #4
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    i dont know anything about applying the license or of many variations of licences, but there are many. one popular one is GPL, check it out: http://www.gnu.org/copyleft/gpl.html. or search around for another licences that you agree with.

  5. #5
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    ohh it looks hard. I think i'm gonna stick to "about" :S
    thank alot for your help
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  6. #6
    Registered User
    Join Date
    May 2006
    Posts
    903
    You could make it much more simple in terms of memory management. It would be a lot safer as well.

    Code:
    template <class T>
    class Matrix
    {
    public:
        Matrix();
        // ...
    
    private:
        std::vector< std::vector<T> > m_Matrice;
    };

  7. #7
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    i will consider that . I'm in touch with Boost.org, and it seemed from their constant emails that they are interested

    I'm looking for the stable version that will have more features and more efficient memory management
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  8. #8
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    Hi, I released the latest version of the library + full documentation
    it has some cool new features :
    +Multiplication
    +Addition
    +Subtraction
    +Getting rows
    +Getting columns

    http://www.nightvisiongames.com/matrixlib.htm

    give it a shot and give me feed back
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  9. #9
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    for an official site, check out sourceforge.net or freshmeat.net. they are sites to promote usually free or open source software. try and see if there is a section relevant to your project and upload it. it would be better and would be the central source of news, documentation, and downloads.

    edit: your link isnt loading for me

  10. #10
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    ok, i uploaded the zipped file, it has zipped file of library + header + documentation in a website

    http://www.geocities.com/achillis_sword/web.zip

    enjoy
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  11. #11
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    What is the point of matrices? I know they are used a lot, but why?

    Edit: Congratulation with finishing this off
    Last edited by h3ro; 05-06-2007 at 05:10 AM.

  12. #12
    Registered User
    Join Date
    Sep 2001
    Posts
    752
    Fast 3d graphics is basically just raster graphics with a -lot- of matrix operations going on in the background.

    Every rotation, every transformation, every scalar operation is a matrix.

    Every triangle is a row a different matrix.
    Callou collei we'll code the way
    Of prime numbers and pings!

  13. #13
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    try the features of this library
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  14. #14
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    First, well done on releasing your first project. next some constructive criticism:

    • first you absolutely must include some more info in your header file. At the very least, you should put author, date, revision, copyright and warranty disclaimer. Theoretically I could use this code and if it didn't work, I could sue you. (it's not very likely but you should protect yourself). I'd recommend the boost licence, but there are others. to use it you just need to add
      Code:
      // Copyright Hussain Hani 2007.
      // Distributed under the Boost Software License, Version 1.0. (See
      // http://www.boost.org/LICENSE_1_0.txt)
    • why is matrix restricted to floats? you could make the library a template and then users could have matrices of doubles/ints/complex numbers/whatever.
    • what happens if I create a Matrix and use it without calling build? will it fail? if so, wouldn't it make more sense to require rows and columns as arguements to the constructor?
    • how does print() work? the normal c++ convention would be to make an overloaded '<<' operator. that would work with printing and with files (and any other stream)
    • if you're overloading the +, - and * ops it's customary to overload +=, -= and *= too. In fact you should overload those first and then op+ is simply
      Code:
      Matrix operator+(const Matrix& rhs)
      {
          Matrix result(*this);
          result += rhs;
          return result;
      }
    • const correctness - print(), getr(), getc() and about() should be const. op+, - and * should return const Matrix. this prevents accidental mistakes like (m1 * m2 = m3), which is legal but useless in your code.


    That's a few points from reading the header. If you want to post the source, I'll have a look at that too. Finally, wrt to boost, they won't accept a closed source library, so you'll have to provide the source. Plus I don't think the library is up to boosts standards yet.

    Sorry if that's a bit harsh. Please take the criticism in the spirit in which it's intended, which is to help you improve the library. It's a good first attempt, but it needs work.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  15. #15
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    and some more: i dont understand why people have to go all out with colors in documents. it happens often by my professors at university, too. i would recommend changing your .htm documentation to simple white background with black text. i dont see a need to make it look like a Doom game!

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's an import library?
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 06-19-2009, 06:00 PM
  2. Property Set Library (PSL) - Announcement
    By vultur_gryphus in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-29-2008, 07:04 AM
  3. Makefile for a library
    By sirmoreno in forum Linux Programming
    Replies: 5
    Last Post: 06-04-2006, 05:52 AM
  4. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 08:55 AM
  5. Problem multiplying rotation matrices together
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-04-2003, 09:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21