User Profile

Collapse

Profile Sidebar

Collapse
AceKnocks
AceKnocks
Last Activity: Apr 10 '08, 09:56 PM
Joined: Jan 2 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • AceKnocks
    started a topic Lisp(y) A* search implementation

    Lisp(y) A* search implementation

    Thanks Jos for that encouragement. :)

    Let's see if you really allowed your Lisp(y) knowledge to fade away in midst of those C's and Java's.. Here goes,

    If we have following array

    Code:
    (setf *possible-die-combinations* (make-array '(20 6)
    :initial-contents
    '((1 3 2 4 5 6)
    (1 2 4 5 3 6)
    (1 4 5 3 2 6)
    (1 5 3 2 4 6)
    (2 3 6 4 1 5)
    (2 6 4 1 3 5)
    (2 4 1 3 6 5)
    ...
    See more | Go to post
    Last edited by acoder; Apr 8 '08, 11:05 AM. Reason: Added code tags

  • Thanks Jos for defending the objective. In this problem we were not assigned to make multiple BSTrees, rather just one tree which would have all these functions. :)

    As far as writing a non-recursive (loop-iterative) height function is concerned, I could not come up with any and therefore implemented an overridden recursive function in the same class and called that recursive function from this non-recursive function.

    ...
    See more | Go to post

    Leave a comment:


  • finding height of a binary search tree without using recursion

    I have been given this interface,
    Code:
    interface BinarySearchTree {
       public void insert(Integer data);
       public int size();
       public int height();
       public boolean contains(Integer target);
    }
    and I have to implement BST with all these functions. I have implemented the first insert and size like this way -
    Code:
    class Node {
        Node left, right;
        Integer
    ...
    See more | Go to post

  • AceKnocks
    replied to Common problem solver framework design
    in C
    Well, the update about this problem is that I have finished designing my solver for problem 2 and now I am starting off to integrate problem 1 now with my solver.

    The solver as objective requires, should be able to solve any kind of problem depending upon the states validated by the specialized classes' rules and for me, it is working beautifully. :)

    Once I will finish integrating the complete three (with the fourth...
    See more | Go to post

    Leave a comment:


  • AceKnocks
    replied to Linker Error: Unresolved external symbol
    in C
    Yep, I do agree on that but here I class B has to count instances of the class A's objects created at any given point in time.
    See more | Go to post

    Leave a comment:


  • AceKnocks
    replied to Linker Error: Unresolved external symbol
    in C
    Just got to know that if we need to access a static data member from a class within a file scope, we need to define it after class declaration.

    http://msdn2.microsoft .com/en-us/library/b1b5y48f(VS.80) .aspx

    Resolved! :)
    See more | Go to post

    Leave a comment:


  • AceKnocks
    started a topic Linker Error: Unresolved external symbol
    in C

    Linker Error: Unresolved external symbol

    Hi all,
    I have these two classes with following structure

    Code:
    //main.cpp
    
    class Tree {
    public:
    static bool flag;
    Tree() { 
    flag = true;
    }
    };
    
    class b {
    public:
    static bool isValid();
    };
    
    static isValid() {
    if (Tree::flag) ... some code
    }
    When compiling the above code, there were no...
    See more | Go to post

  • AceKnocks
    replied to Common problem solver framework design
    in C
    I missed reading this reply earlier. From the given keyword "FSM", I went through FSM and came across Turing Machine described at http://en.wikipedia.or g/wiki/Turing_machine.

    What attracts me towards Turing machine, is its ability to store -
    - all finite set of states
    - a transition function
    - the initial state
    - final state

    Now for pblm2, I can store all possible states of the...
    See more | Go to post

    Leave a comment:


  • AceKnocks
    replied to Common problem solver framework design
    in C
    After reading Abstract Factory Design Pattern, it looks like I can make use of it to atleast abstract the object creation mechanism from the specialized classes to just a factory class.

    Abstract Factory Design Pattern will help me create the generic and centralized object creation mechanism whereby the client (specialized classes) requests the object factory (base class) to create objects of a generic type, though the factory class...
    See more | Go to post

    Leave a comment:


  • AceKnocks
    replied to Common problem solver framework design
    in C
    Thanks for your pointer towards factory method design pattern. I have just started reading about it online. It could as well prove to be a solution to my objective. Let me skim through this topic for some time to allow me to gain some basic understanding about its possible implementations ....
    See more | Go to post

    Leave a comment:


  • AceKnocks
    replied to Common problem solver framework design
    in C
    No, my intent is of course not to encode specific class for a specific problem as I will be completely ignoring the primary objective of designing a generic framework (not the specialized classes).

    Well, as my objective says that the solver must be able to process all given problems, though on an abstract level. It will not have any specific knowledge about the specific puzzle because according to me the specialized classes will...
    See more | Go to post

    Leave a comment:


  • AceKnocks
    started a topic Common problem solver framework design
    in C

    Common problem solver framework design

    I am working on a framework design problem in which I have to design a C++ based framework capable of solving three puzzles for now but actually it should work with a general puzzle of any kind and I need your able help in this activity.

    Objective -

    In this activity you will design a framework capable of solving any puzzle of a specific type and, as a test of this framework, use the framework to solve a very simple puzzle....
    See more | Go to post
No activity results to display
Show More
Working...