TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 137

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 137', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | if you are really interested in the details of operation of this function I strongly advise you to study that reference very carefully in conjunction with the explanation here. To clarify this algorithm we will work through a somewhat simplified example as we examine the code. For ease in calculation we will set TOP_VALUE to 255 or 11111111 binary rather than 65535 as in the actual program as a result high will start out at 255 as well. We will also use a single constant frequency table Figure sampfreq containing only four entries rather than selecting a 256-entry table according to the previous character and modifying it as we see each character so our translate and both_weights tables Figures samptrans and sampboth respectively will be adjusted correspondingly. Instead of ASCII we will use the codes from 0 for A to 3 for D in our example message. Sample frequency table Figure sampfreq Character Frequency code A B 00010011 1 3 C D 00000010 0 2 Sample translate table Figure samptrans Index Value 0 1 1 2 2 8 3 52 Sample both_weights table Figure sampboth First Second Index Index 0 1 2 3 0 2 3 9 53 1 3 4 10 54 2 9 10 16 60 3 53 54 60 104 As we begin encode_symbol we establish temp_freq_info as a pointer to the structure containing the current frequency table. Next we set f req_ptr to the address of the frequency table itself and total_freq to the stored total frequency in the frequency structure as we will see shortly total_f req is used to determine what fraction of the frequency range is accounted for by the particular character being encoded. The final operation before entering the frequency accumulation loop is to set prev_cum to 0. This variable is used to keep track of the cumulative frequency of all characters up to but not including the one being encoded this is used to determine the position of the character being encoded as a part of the entire range of possibilities. Now we are ready to enter the frequency accumulation loop which is shown in Figure .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.