in

.NET Opensource

Community for opensource projects by Christoph Rüegg

Complex vectors & matrices

Last post 05-23-2008 8:13 by Christo. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-22-2008 17:56

    Complex vectors & matrices

    I'm looking into creating complex variants of the Matrix & Vector classes. The IMatrix & IVector interfaces are restrictive because it requires double elements. Ideally IMatrix & IVector should be generic interfaces. 

        public interface IVector where T : struct
        {
            int Length { get; }

            T this[int i] { get; set; }
        }

     

        public interface IMatrix<T> where T : struct
        {
            int ColumnCount { get; }
            int RowCount { get; }

            T this[int i, int j] { get; set; }
        }

     

  • 05-22-2008 18:24 In reply to

    Re: Complex vectors & matrices

    I'm currently working on complex vectors and matrices. I started to implement them independently (i.e. a new non-generic type ComplexMatrix and ComplexVector), but I agree that it would make sense to share a generic interface.

    Unfortunately this might be a breaking change. I expect that by now most users work with the Matrix type directly instead of the interface, so it would not cause much code change on their side. But I assume it would still require a recompilation. Nevertheless, I think we should do it.

    Filed under: ,
  • 05-23-2008 8:13 In reply to

    Re: Complex vectors & matrices

    That's great.

    I didn't see anything in svn and assumed that it wasn't being worked on. Hope to get a taste of it soon.

Page 1 of 1 (3 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems