Coder Social home page Coder Social logo

sedgewickwayne.algorithms's Introduction

SedgewickWayne.Algorithms

Porting algorithms by Robert Sedgewick and Kevin Wayne in .NET.

Initial approach was to convert java archives with IKVM, then use ILSpy on the generated bytecode to produce cs files. Those files would then have to be stripped off the unnecessary metadata. Source: algs4.jar.

Instead, it seems easier to port java files from the Princeton repo or the duplicated Brazilian one.

Pages

Below is the work for which porting was finished and unit tests passing.

Files which have been generated by means of IKVM and ILSpy but not yet included in the project, or haven't been ported yet listed in the algorithms to do list.

ikvm

IKVM outputs reside in the ante folder and are not included in the project. The approach of refactoring IKVM produced code was dropped because most of the code looked bad, especially inner classes for linked lists, list nodes and enumerators, and even after trimming metadata, severe refactoring was needed.

Replaced tokens: using IKVM.Attributes;, using java.lang;, In.__<clinit>();, [HideFromJava], using java.util;, using ikvm.lang;, Throwable.__<suppressFillInStackTrace>();, using java.io;, using ikvm.@internal;, : java.lang.Object, using IKVM.Runtime;, using System.Runtime.CompilerServices;, using System;, [MethodImpl(MethodImplOptions.NoInlining)]

Replaced regex: \[LineNumberTable\([^\)]+\)\], ^.*(\[[^\]\(\)]+\([^\]\(\)]+\)[^\]\(\)]*\])$ with \/\/\1, (\[Implements\(new string\[\]\r\n[^{]+{[^\]]+\]), \[LineNumberTable\(new byte\[\]\r\n[^{]+{[^}]+\}\), [LineNumberTable(\d\d), Modifiers(Modifiers.Static | Modifiers.Synthetic)]

sedgewickwayne.algorithms's People

Contributors

illegitimis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.